@solvimon/solvimon-web 0.1.0-alpha.18 → 0.1.0-alpha.19

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 (610) hide show
  1. package/README.md +70 -31
  2. package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang--AVI4Q4E.js +1 -0
  3. package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-C2IRj-FB.mjs → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Y3CzulQq.mjs} +6 -3
  4. package/dist/Amount.vue.es-CRG-6dps.mjs +23 -0
  5. package/dist/Amount.vue.es-CeW8S7kT.js +1 -0
  6. package/dist/Avatar.vue.es-ClUBm_l5.js +1 -0
  7. package/dist/Avatar.vue.es-DJp6NEU_.mjs +91 -0
  8. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BWnZ98RQ.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-BUMK11Dw.mjs} +15 -7
  9. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-DzrInCPA.js +1 -0
  10. package/dist/Button.vue.es-BrWHdiEA.mjs +453 -0
  11. package/dist/Button.vue.es-aLcIdATK.js +1 -0
  12. package/dist/Chip.vue.es-DPGTweAr.mjs +164 -0
  13. package/dist/Chip.vue.es-q4c-DXXl.js +1 -0
  14. package/dist/Comparators.vue.es-CU32AC4n.mjs +120 -0
  15. package/dist/Comparators.vue.es-CfVGYJ_x.js +1 -0
  16. package/dist/ContextMenu.vue.es-BBPFQfqY.mjs +681 -0
  17. package/dist/ContextMenu.vue.es-C_TL7-kg.js +1 -0
  18. package/dist/CustomerBillingInformation.vue.es-CLmXk5B9.mjs +175 -0
  19. package/dist/CustomerBillingInformation.vue.es-s-LYXA4T.js +1 -0
  20. package/dist/CustomerPaymentMethods.lib-BKgQTCtc.js +1 -0
  21. package/dist/CustomerPaymentMethods.lib-CcSt0sl1.mjs +4 -0
  22. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-D7gL7dZX.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-B2CtcBm0.mjs} +17 -10
  23. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CMIVAoQq.js +1 -0
  24. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-BP-VRwEM.js +1 -0
  25. package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-OUg4yv7r.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-Bej5_H7r.mjs} +823 -216
  26. package/dist/Divider.vue.es-ClFG8QtG.js +1 -0
  27. package/dist/Divider.vue.es-wKkIVBgb.mjs +24 -0
  28. package/dist/DividerText.vue.es-D5ieOE1e.js +1 -0
  29. package/dist/DividerText.vue.es-DMg-DNgi.mjs +72 -0
  30. package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-5I81Qr6q.js +1 -0
  31. package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CTG5XdQt.mjs +562 -0
  32. package/dist/ErrorNotification.vue.es-BX3khKFc.js +1 -0
  33. package/dist/ErrorNotification.vue.es-C22Kt8Qn.mjs +30 -0
  34. package/dist/Expand.vue.es-C-lnbA1v.js +1 -0
  35. package/dist/Expand.vue.es-C4_XmqbR.mjs +50 -0
  36. package/dist/FormMessage.vue.es-DFQXxiSC.mjs +46 -0
  37. package/dist/FormMessage.vue.es-LeWoj774.js +1 -0
  38. package/dist/IconButton.vue.es-CVFn0Ntj.js +1 -0
  39. package/dist/IconButton.vue.es-DcC4f5EQ.mjs +231 -0
  40. package/dist/IconTitle.vue.es-DoN4GVde.js +1 -0
  41. package/dist/IconTitle.vue.es-mQCMxc64.mjs +105 -0
  42. package/dist/Input.vue.es-C8VhMKuI.js +1 -0
  43. package/dist/Input.vue.es-Dp_RH03h.mjs +239 -0
  44. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DbY35gE_.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-56fy6uY6.mjs} +2 -1
  45. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-CLUcV3qa.js +1 -0
  46. package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-flgEyaoj.js +1 -0
  47. package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-ztaMeHQc.mjs +49 -0
  48. package/dist/InvoiceSummary.vue.es-emE-mCFh.js +1 -0
  49. package/dist/InvoiceSummary.vue.es-nCYeQ4tj.mjs +2558 -0
  50. package/dist/Modal.vue.es-5EpA4Q0t.mjs +367 -0
  51. package/dist/Modal.vue.es-CX5geho3.js +1 -0
  52. package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-B_IIOBjg.js +1 -0
  53. package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-DBMgilG2.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-D7IX9qqy.mjs} +4 -2
  54. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-CupZFJSF.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-C8nvN-6f.mjs} +3 -1
  55. package/dist/PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-D1oKZZ_m.js +1 -0
  56. package/dist/{PaymentHistoryBlock-Bxr8lUGs.mjs → PaymentHistoryBlock-Dejtgyos.mjs} +1 -1
  57. package/dist/{PaymentHistoryBlock-COjIVYX4.js → PaymentHistoryBlock-RBxlC5xt.js} +1 -1
  58. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BdfWchcQ.js +1 -0
  59. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CDjGab5p.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-Dk52bjJd.mjs} +5 -1
  60. package/dist/{PaymentIntegrationForm-BSauhuKv.js → PaymentIntegrationForm-BWr7iyU6.js} +1 -1
  61. package/dist/{PaymentIntegrationForm-PIT8gHYN.mjs → PaymentIntegrationForm-CbqfAdkc.mjs} +1 -1
  62. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-D8fkE1yG.js +1 -0
  63. package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-COO2ZUhN.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DJHwpswk.mjs} +4 -3
  64. package/dist/PaymentIntegrationFormAdyen-BjPpoLF7.js +1 -0
  65. package/dist/{PaymentIntegrationFormAdyen-Cjj9aK0E.mjs → PaymentIntegrationFormAdyen-CuRwe9_9.mjs} +78 -116
  66. package/dist/PaymentIntegrationFormStripe-51KZc27R.js +1 -0
  67. package/dist/{PaymentIntegrationFormStripe-arpua_ZT.mjs → PaymentIntegrationFormStripe-JZw2m1kJ.mjs} +7 -7
  68. package/dist/PaymentMethod.vue.es-CH__kPw4.mjs +636 -0
  69. package/dist/PaymentMethod.vue.es-uVZO0Zju.js +1 -0
  70. package/dist/{PaymentMethodForm-B7T5rrNz.mjs → PaymentMethodForm-C5WqTDow.mjs} +1 -1
  71. package/dist/{PaymentMethodForm-CLz3ZS-b.js → PaymentMethodForm-CBjHdZT7.js} +1 -1
  72. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-BktA5F4r.js +1 -0
  73. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-C4Zf92QP.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-DhPTbip8.mjs} +5 -2
  74. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-CIIt6fGp.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-DbTvbHk7.mjs} +7 -3
  75. package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-XPz73RVU.js +1 -0
  76. package/dist/PricingGroupRangeInput.vue.es-A6eW-u2k.mjs +636 -0
  77. package/dist/PricingGroupRangeInput.vue.es-BuQeJCEX.js +1 -0
  78. package/dist/Section.vue.es-MEFUWCxU.mjs +79 -0
  79. package/dist/Section.vue.es-tLYXp-tF.js +1 -0
  80. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Jk34S5B7.js +1 -0
  81. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-xvgyB2Yr.mjs +1050 -0
  82. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-B_Zkbqx2.mjs +6105 -0
  83. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-CttBs_G8.js +1 -0
  84. package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-z8P1u1Gi.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-Cj36jvZF.mjs} +2 -1
  85. package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-Dl5Lg39D.js +1 -0
  86. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-CTnTWaB8.js +1 -0
  87. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-BOUSk2ZB.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-CfXgGKXA.mjs} +7 -4
  88. package/dist/TooltipParagraph.vue.es-B5aHQv9O.mjs +136 -0
  89. package/dist/TooltipParagraph.vue.es-fSwKGXKg.js +1 -0
  90. package/dist/TrialChip.vue.es-0nrqSZeY.js +1 -0
  91. package/dist/TrialChip.vue.es-Fp7Lqo-b.mjs +56 -0
  92. package/dist/api.es-C5pe8LUl.mjs +62 -0
  93. package/dist/api.es-Czekkp_X.js +1 -0
  94. package/dist/cn.es-BLHlMR4Y.js +1 -0
  95. package/dist/cn.es-DB5pDpxS.mjs +3298 -0
  96. package/dist/comparators.es-9VsCB-JI.mjs +175 -0
  97. package/dist/comparators.es-wrKHduVq.js +1 -0
  98. package/dist/component-BG6DmXcy.mjs +9 -0
  99. package/dist/component-hDuDTBt5.js +1 -0
  100. package/dist/components/BillingInformation/BillingInformation.ce.d.ts +1 -3
  101. package/dist/components/BillingInformation/BillingInformation.cjs +1 -0
  102. package/dist/components/BillingInformation/{BillingInformation.es.js → BillingInformation.mjs} +15 -26
  103. package/dist/components/BillingInformationForm/BillingInformationForm.ce.d.ts +1 -3
  104. package/dist/components/BillingInformationForm/BillingInformationForm.cjs +1 -0
  105. package/dist/components/BillingInformationForm/{BillingInformationForm.es.js → BillingInformationForm.mjs} +42 -128
  106. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.ce.d.ts +1 -3
  107. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs +1 -0
  108. package/dist/components/CustomerPaymentMethods/{CustomerPaymentMethods.es.js → CustomerPaymentMethods.mjs} +18 -51
  109. package/dist/components/Invoice/Invoice.ce.d.ts +1 -3
  110. package/dist/components/Invoice/Invoice.cjs +1 -0
  111. package/dist/components/Invoice/{Invoice.es.js → Invoice.mjs} +73 -79
  112. package/dist/components/InvoiceDetails/InvoiceDetails.ce.d.ts +1 -3
  113. package/dist/components/InvoiceDetails/InvoiceDetails.cjs +1 -0
  114. package/dist/components/InvoiceDetails/{InvoiceDetails.es.js → InvoiceDetails.mjs} +12 -24
  115. package/dist/components/InvoiceHeader/InvoiceHeader.ce.d.ts +1 -3
  116. package/dist/components/InvoiceHeader/InvoiceHeader.cjs +1 -0
  117. package/dist/components/InvoiceHeader/InvoiceHeader.mjs +73 -0
  118. package/dist/components/InvoicesList/InvoicesList.ce.d.ts +1 -3
  119. package/dist/components/InvoicesList/InvoicesList.cjs +1 -0
  120. package/dist/components/InvoicesList/{InvoicesList.es.js → InvoicesList.mjs} +12 -24
  121. package/dist/components/PaymentHistory/PaymentHistory.ce.d.ts +1 -3
  122. package/dist/components/PaymentHistory/PaymentHistory.cjs +1 -0
  123. package/dist/components/PaymentHistory/{PaymentHistory.es.js → PaymentHistory.mjs} +12 -24
  124. package/dist/components/PaymentMethodForm/PaymentMethodForm.ce.d.ts +1 -3
  125. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs +1 -0
  126. package/dist/components/PaymentMethodForm/{PaymentMethodForm.es.js → PaymentMethodForm.mjs} +15 -27
  127. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.ce.d.ts +1 -3
  128. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs +1 -0
  129. package/dist/components/SubscriptionSchedules/{SubscriptionSchedules.es.js → SubscriptionSchedules.mjs} +13 -25
  130. package/dist/components/SubscriptionsList/SubscriptionsList.ce.d.ts +1 -3
  131. package/dist/components/SubscriptionsList/SubscriptionsList.cjs +1 -0
  132. package/dist/components/SubscriptionsList/{SubscriptionsList.es.js → SubscriptionsList.mjs} +22 -53
  133. package/dist/components/WalletBalances/WalletBalances.ce.d.ts +1 -3
  134. package/dist/components/WalletBalances/WalletBalances.cjs +1 -0
  135. package/dist/components/WalletBalances/{WalletBalances.es.js → WalletBalances.mjs} +13 -25
  136. package/dist/configuration-BjYwV4_B.js +1 -0
  137. package/dist/configuration-CD8cOXAJ.mjs +15 -0
  138. package/dist/core/action-request.types.d.ts +1 -55
  139. package/dist/core/configuration.d.ts +1 -3
  140. package/dist/core/index.cjs +1 -0
  141. package/dist/core/index.d.ts +1 -11
  142. package/dist/core/index.mjs +197 -0
  143. package/dist/core/registry.ce.d.ts +1 -2
  144. package/dist/core/registry.d.ts +1 -6
  145. package/dist/core/types.d.ts +1 -121
  146. package/dist/countryData.es--zJAd6LA.mjs +252 -0
  147. package/dist/countryData.es-D3MFzU92.js +1 -0
  148. package/dist/customElements-BTJzBHMy.js +1 -0
  149. package/dist/customElements-DdFA__me.mjs +6729 -0
  150. package/dist/{customer-DovIxTG1.mjs → customer-B0AMetq6.mjs} +1 -1
  151. package/dist/customer-D7HUfF3j.js +1 -0
  152. package/dist/customer.es-C_vSWcVA.mjs +30 -0
  153. package/dist/customer.es-D42Md24r.js +1 -0
  154. package/dist/en-US-BSrbFk5W.js +1 -0
  155. package/dist/en-US-D0P7NNNZ.mjs +228 -0
  156. package/dist/{en-US-CXDO3qhq.mjs → en-US-Daw3v6GD.mjs} +8 -31
  157. package/dist/en-US-scSQQXK8.js +1 -0
  158. package/dist/error-Cg-i7gGl.js +1 -0
  159. package/dist/error-DY_I2hPx.mjs +13 -0
  160. package/dist/floating-ui.vue.es-Bv94BfDm.js +1 -0
  161. package/dist/floating-ui.vue.es-DWY7pdz8.mjs +1573 -0
  162. package/dist/formatting.es-9hM8aHSg.js +1 -0
  163. package/dist/formatting.es-D-oVnc8H.mjs +68 -0
  164. package/dist/getComposedString.es-CELkn0I7.mjs +14 -0
  165. package/dist/getComposedString.es-DvSNX-_z.js +1 -0
  166. package/dist/getCountryNameByCode.es-fP52nO_7.js +1 -0
  167. package/dist/getCountryNameByCode.es-ymC9R46j.mjs +8 -0
  168. package/dist/index-BJ3dHkSK.js +1 -0
  169. package/dist/index-C5bKRt7l.mjs +1069 -0
  170. package/dist/index.cjs +1 -0
  171. package/dist/index.d.ts +1 -17
  172. package/dist/index.es-0cystq8F.mjs +542 -0
  173. package/dist/index.es-2JWHHSgP.js +1 -0
  174. package/dist/index.mjs +42 -0
  175. package/dist/{invoices-Dk-z04lg.mjs → invoices-BSd-nKeE.mjs} +17 -16
  176. package/dist/invoices-BiqM6xN6.js +1 -0
  177. package/dist/{nl-NL-BgL_PuBn.mjs → nl-NL-B4zEBFTw.mjs} +8 -54
  178. package/dist/nl-NL-B5tuyIOM.mjs +88 -0
  179. package/dist/nl-NL-Bs3d8q6T.js +1 -0
  180. package/dist/nl-NL-DIAZWDF9.js +1 -0
  181. package/dist/object.es-DFXiU9p3.js +1 -0
  182. package/dist/object.es-jvvnR8Kr.mjs +12 -0
  183. package/dist/{paymentMethods-BnF1XYS1.mjs → paymentMethods-BsrkEbKT.mjs} +4 -16
  184. package/dist/paymentMethods-Cu2RzLgm.js +1 -0
  185. package/dist/{payments-TnRjtlOw.mjs → payments-B6Nfd6Al.mjs} +1 -1
  186. package/dist/payments-Bbm1HMQj.js +1 -0
  187. package/dist/pricing-3W7XLwL6.js +1 -0
  188. package/dist/pricing-CJxS2hr2.mjs +17 -0
  189. package/dist/pricingItemConfigs.es-BPIm6S8M.mjs +107 -0
  190. package/dist/pricingItemConfigs.es-C73cQlxQ.js +1 -0
  191. package/dist/screens/Checkout/Checkout.ce.d.ts +1 -3
  192. package/dist/screens/Checkout/Checkout.cjs +1 -0
  193. package/dist/screens/Checkout/{Checkout.es.js → Checkout.mjs} +1250 -610
  194. package/dist/screens/CustomerOverview/CustomerOverview.ce.d.ts +1 -3
  195. package/dist/screens/CustomerOverview/CustomerOverview.cjs +1 -0
  196. package/dist/screens/CustomerOverview/{CustomerOverview.es.js → CustomerOverview.mjs} +33 -36
  197. package/dist/screens/PayInvoice/PayInvoice.ce.d.ts +1 -3
  198. package/dist/screens/PayInvoice/PayInvoice.cjs +1 -0
  199. package/dist/screens/PayInvoice/{PayInvoice.es.js → PayInvoice.mjs} +21 -28
  200. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.ce.d.ts +1 -3
  201. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs +1 -0
  202. package/dist/screens/PaymentMethodsManagement/{PaymentMethodsManagement.es.js → PaymentMethodsManagement.mjs} +17 -29
  203. package/dist/screens/SubscriptionDetails/SubscriptionDetails.ce.d.ts +1 -3
  204. package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs +1 -0
  205. package/dist/screens/SubscriptionDetails/{SubscriptionDetails.es.js → SubscriptionDetails.mjs} +33 -37
  206. package/dist/screens/SubscriptionManagement/SubscriptionManagement.ce.d.ts +1 -3
  207. package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs +1 -0
  208. package/dist/screens/SubscriptionManagement/{SubscriptionManagement.es.js → SubscriptionManagement.mjs} +32 -41
  209. package/dist/slots.es-BpwYO3A3.mjs +18 -0
  210. package/dist/slots.es-Dq1PTUOv.js +1 -0
  211. package/dist/sorting.es-CjTrRfSW.mjs +105 -0
  212. package/dist/sorting.es-RyvcgbSL.js +1 -0
  213. package/dist/subscriptions-B4BOzLxR.js +1 -0
  214. package/dist/{subscriptions-vEE4Y7qm.mjs → subscriptions-C2C4WTuI.mjs} +7 -7
  215. package/dist/typeGuards.es-C4nR5FkL.js +1 -0
  216. package/dist/typeGuards.es-fwUoeMCe.mjs +12 -0
  217. package/dist/types/components/InvoiceTable/InvoiceTable.types.d.ts +19 -0
  218. package/dist/types/components/checkout/CheckoutTitle.types.d.ts +10 -0
  219. package/dist/types/components/checkout/EmptyStatePlaceholder.types.d.ts +4 -0
  220. package/dist/types/components/checkout/PromotionCodeSection.types.d.ts +8 -0
  221. package/dist/types/components/customer/BillingInformationForm/BillingInformationForm.types.d.ts +24 -0
  222. package/dist/types/components/customer/CheckoutForm/CheckoutForm.types.d.ts +32 -0
  223. package/dist/types/components/customer/CustomerPaymentMethodsBlock/CustomerPaymentMethodsBlock.types.d.ts +12 -0
  224. package/dist/types/components/payments/AddPaymentMethodModal/AddPaymentMethodModal.types.d.ts +14 -0
  225. package/dist/types/components/payments/AddPaymentMethodPane/AddPaymentMethodPane.types.d.ts +19 -0
  226. package/dist/types/components/payments/ExpressPaymentMethod/ExpressPaymentMethod.types.d.ts +74 -0
  227. package/dist/types/components/payments/ExpressPaymentMethod/ExpressPaymentMethodApplePay.types.d.ts +9 -0
  228. package/dist/types/components/payments/ExpressPaymentMethodButton/ExpressPaymentMethodButton.types.d.ts +3 -0
  229. package/dist/types/components/payments/ExpressPaymentMethods/ExpressPaymentMethods.types.d.ts +21 -0
  230. package/dist/types/components/payments/PayButton/PayButton.types.d.ts +10 -0
  231. package/dist/types/components/payments/PaymentCompletedCard/PaymentCompletedCard.types.d.ts +5 -0
  232. package/dist/types/components/payments/PaymentErrorCard/PaymentErrorCard.types.d.ts +4 -0
  233. package/dist/types/components/payments/PaymentFeedbackCard/PaymentFeedbackCard.types.d.ts +4 -0
  234. package/dist/types/components/payments/PaymentIntegrationForm/PaymentIntegrationForm.types.d.ts +72 -0
  235. package/dist/types/components/payments/PaymentIntegrationFormAdyen/PaymentIntegrationFormAdyen.types.d.ts +6 -0
  236. package/dist/types/components/payments/PaymentIntegrationFormStripe/PaymentIntegrationFormStripe.types.d.ts +7 -0
  237. package/dist/types/components/payments/PaymentIntegrationFormStripe/PaymentIntegrationFormStripeFrame.types.d.ts +61 -0
  238. package/dist/types/components/payments/PaymentMethodSelector/PaymentMethodSelector.types.d.ts +53 -0
  239. package/dist/types/components/payments/PaymentMethodsList/PaymentMethodsList.types.d.ts +8 -0
  240. package/dist/types/components/payments/SubscriptionPaymentCompletedCard/SubscriptionPaymentCompletedCard.types.d.ts +3 -0
  241. package/dist/types/components/providers/ActionDispatchProvider/ActionDispatchProvider.lib.d.ts +4 -0
  242. package/dist/types/components/providers/ActionDispatchProvider/ActionDispatchProvider.lib.types.d.ts +3 -0
  243. package/dist/types/components/providers/ActionDispatchProvider/ActionDispatchProvider.vue.d.ts +17 -0
  244. package/dist/types/components/providers/ActionDispatchProvider/composables/useActionDispatchProvider.d.ts +3 -0
  245. package/dist/types/components/providers/AuthProvider/AuthProvider.lib.d.ts +5 -0
  246. package/dist/types/components/providers/AuthProvider/AuthProvider.types.d.ts +8 -0
  247. package/dist/types/components/providers/AuthProvider/AuthProvider.vue.d.ts +18 -0
  248. package/dist/types/components/providers/AuthProvider/composables/useAuth.d.ts +3 -0
  249. package/dist/types/components/providers/AuthProvider/index.d.ts +3 -0
  250. package/dist/types/components/providers/ConfigProvider/ConfigProvider.lib.d.ts +5 -0
  251. package/dist/types/components/providers/ConfigProvider/ConfigProvider.types.d.ts +9 -0
  252. package/dist/types/components/providers/ConfigProvider/ConfigProvider.vue.d.ts +18 -0
  253. package/dist/types/components/providers/ConfigProvider/composables/useConfig.d.ts +3 -0
  254. package/dist/types/components/providers/CssOverridesProvider/CssOverridesProvider.types.d.ts +3 -0
  255. package/dist/types/components/providers/CssOverridesProvider/CssOverridesProvider.vue.d.ts +18 -0
  256. package/dist/types/components/providers/EntryProvider/EntryProvider.types.d.ts +10 -0
  257. package/dist/types/components/providers/EntryProvider/EntryProvider.vue.d.ts +22 -0
  258. package/dist/types/components/providers/ErrorBoundary/ErrorBoundary.vue.d.ts +17 -0
  259. package/dist/types/components/providers/ExperimentalFeatureProvider/ExperimentalFeatureProvider.lib.d.ts +5 -0
  260. package/dist/types/components/providers/ExperimentalFeatureProvider/ExperimentalFeatureProvider.types.d.ts +4 -0
  261. package/dist/types/components/providers/ExperimentalFeatureProvider/ExperimentalFeatureProvider.vue.d.ts +18 -0
  262. package/dist/types/components/providers/ExperimentalFeatureProvider/composables/useExperimentalFeature.d.ts +1 -0
  263. package/dist/types/components/providers/HostElementProvider/HostElementProvider.lib.d.ts +12 -0
  264. package/dist/types/components/providers/HostElementProvider/HostElementProvider.types.d.ts +3 -0
  265. package/dist/types/components/providers/HostElementProvider/HostElementProvider.vue.d.ts +18 -0
  266. package/dist/types/components/providers/HostElementProvider/composables/useHostElementProvider.d.ts +1 -0
  267. package/dist/types/components/providers/LoggerProvider/LoggerProvider.lib.d.ts +24 -0
  268. package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +40 -0
  269. package/dist/types/components/providers/LoggerProvider/LoggerProvider.vue.d.ts +20 -0
  270. package/dist/types/components/providers/LoggerProvider/composables/useLogger.d.ts +6 -0
  271. package/dist/types/components/providers/PortalProvider/PortalProvider.lib.d.ts +7 -0
  272. package/dist/types/components/providers/PortalProvider/PortalProvider.types.d.ts +11 -0
  273. package/dist/types/components/providers/PortalProvider/PortalProvider.vue.d.ts +18 -0
  274. package/dist/types/components/providers/PortalProvider/composables/usePortal.d.ts +3 -0
  275. package/dist/types/components/providers/Provider/Provider.types.d.ts +15 -0
  276. package/dist/types/components/providers/Provider/Provider.vue.d.ts +21 -0
  277. package/dist/types/components/providers/TeleportProvider/TeleportProvider.vue.d.ts +17 -0
  278. package/dist/types/components/providers/TranslationProvider/TranslationOverride.vue.d.ts +18 -0
  279. package/dist/types/components/providers/TranslationProvider/TranslationProvider.lib.d.ts +9 -0
  280. package/dist/types/components/providers/TranslationProvider/TranslationProvider.types.d.ts +22 -0
  281. package/dist/types/components/providers/TranslationProvider/TranslationProvider.vue.d.ts +18 -0
  282. package/dist/types/components/providers/index.d.ts +9 -0
  283. package/dist/types/components/shared/ScreenTitle/ScreenTitle.types.d.ts +4 -0
  284. package/dist/types/components/shared/Section/Section.types.d.ts +21 -0
  285. package/dist/types/components/shared/Skeleton.types.d.ts +5 -0
  286. package/dist/types/components/shared/SlidingPanes/SlidingPanes.types.d.ts +12 -0
  287. package/dist/types/components/subscriptions/EnabledPricingsList/EnabledPricingsList.types.d.ts +15 -0
  288. package/dist/types/components/subscriptions/EnabledPricingsList/EnabledPricingsListItem.types.d.ts +7 -0
  289. package/dist/types/components/subscriptions/OrderSummary.types.d.ts +65 -0
  290. package/dist/types/components/subscriptions/PlanCustomizationForm/AddonSingleEditor.types.d.ts +5 -0
  291. package/dist/types/components/subscriptions/PlanCustomizationForm/PlanCustomizationEditor.types.d.ts +8 -0
  292. package/dist/types/components/subscriptions/PlanCustomizationForm/PricingGroupContent.types.d.ts +4 -0
  293. package/dist/types/components/subscriptions/PlanCustomizationForm/PricingGroupEditorBase.types.d.ts +8 -0
  294. package/dist/types/components/subscriptions/PlanCustomizationForm/SeatsEditor.types.d.ts +6 -0
  295. package/dist/types/components/subscriptions/PlanCustomizationForm/SeatsEditorItem.types.d.ts +6 -0
  296. package/dist/types/components/subscriptions/PlanCustomizationForm/TieredTable.types.d.ts +5 -0
  297. package/dist/types/components/subscriptions/PlanCustomizationForm/TieredTableRow.types.d.ts +7 -0
  298. package/dist/types/components/subscriptions/SubscriptionCancellationModal/SubscriptionCancellationModal.types.d.ts +12 -0
  299. package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagement.types.d.ts +47 -0
  300. package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementForm.types.d.ts +28 -0
  301. package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementSuccess.types.d.ts +7 -0
  302. package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementSummary.types.d.ts +7 -0
  303. package/dist/types/components/subscriptions/SubscriptionSummary.types.d.ts +33 -0
  304. package/dist/types/components/subscriptions/SubscriptionsList/SubscriptionsList.types.d.ts +16 -0
  305. package/dist/types/components/subscriptions/SubscriptionsList/SubscriptionsListItem.types.d.ts +13 -0
  306. package/dist/types/components/wallets/AutoTopUpCancellationModal/AutoTopUpCancellationModal.types.d.ts +9 -0
  307. package/dist/types/components/wallets/AutoTopUpConfig/AutoTopUpConfig.types.d.ts +56 -0
  308. package/dist/types/components/wallets/AutoTopUpModal/AutoTopUpModal.types.d.ts +16 -0
  309. package/dist/types/components/wallets/ConvertedAmountInput/ConvertedAmountInput.types.d.ts +32 -0
  310. package/dist/types/components/wallets/TopUpModal/TopUpInvoicePreview.types.d.ts +11 -0
  311. package/dist/types/components/wallets/TopUpModal/TopUpModal.types.d.ts +31 -0
  312. package/dist/types/components/wallets/TopUpModal/TopUpModalForm.types.d.ts +23 -0
  313. package/dist/types/components/wallets/TopUpModal/TopUpModalSuccess.types.d.ts +11 -0
  314. package/dist/types/components/wallets/WalletModalShell.types.d.ts +24 -0
  315. package/dist/types/composables/useInvoicePreview.types.d.ts +9 -0
  316. package/dist/types/config/config.beta.d.ts +2 -0
  317. package/dist/types/config/config.dev.d.ts +2 -0
  318. package/dist/types/config/config.live.d.ts +2 -0
  319. package/dist/types/config/internalEnvironments.d.ts +11 -0
  320. package/dist/types/config/internalEnvironments.published.d.ts +7 -0
  321. package/dist/types/config/lib.d.ts +6 -0
  322. package/dist/types/config/types.d.ts +13 -0
  323. package/dist/types/index.d.ts +23 -0
  324. package/dist/types/public/components/BillingInformation/BillingInformation.entry.ce.d.ts +1 -0
  325. package/dist/types/public/components/BillingInformation/BillingInformation.entry.types.d.ts +4 -0
  326. package/dist/types/public/components/BillingInformation/BillingInformation.types.d.ts +12 -0
  327. package/dist/types/public/components/BillingInformationForm/BillingInformationForm.entry.ce.d.ts +1 -0
  328. package/dist/types/public/components/BillingInformationForm/BillingInformationForm.entry.types.d.ts +4 -0
  329. package/dist/types/public/components/BillingInformationForm/BillingInformationForm.types.d.ts +10 -0
  330. package/dist/types/public/components/CustomerPaymentMethods/CustomerPaymentMethods.entry.ce.d.ts +1 -0
  331. package/dist/types/public/components/CustomerPaymentMethods/CustomerPaymentMethods.entry.types.d.ts +6 -0
  332. package/dist/types/public/components/CustomerPaymentMethods/CustomerPaymentMethods.types.d.ts +22 -0
  333. package/dist/types/public/components/CustomerWalletBalances/CustomerWalletBalances.types.d.ts +22 -0
  334. package/dist/types/public/components/Invoice/Invoice.entry.ce.d.ts +1 -0
  335. package/dist/types/public/components/Invoice/Invoice.entry.types.d.ts +5 -0
  336. package/dist/types/public/components/Invoice/Invoice.types.d.ts +26 -0
  337. package/dist/types/public/components/InvoiceDetails/InvoiceDetails.entry.ce.d.ts +1 -0
  338. package/dist/types/public/components/InvoiceDetails/InvoiceDetails.entry.types.d.ts +5 -0
  339. package/dist/types/public/components/InvoiceDetails/InvoiceDetails.types.d.ts +9 -0
  340. package/dist/types/public/components/InvoiceHeader/InvoiceHeader.entry.ce.d.ts +1 -0
  341. package/dist/types/public/components/InvoiceHeader/InvoiceHeader.entry.types.d.ts +5 -0
  342. package/dist/types/public/components/InvoiceHeader/InvoiceHeader.types.d.ts +16 -0
  343. package/dist/types/public/components/InvoicesList/InvoicesList.entry.ce.d.ts +1 -0
  344. package/dist/types/public/components/InvoicesList/InvoicesList.entry.types.d.ts +5 -0
  345. package/dist/types/public/components/InvoicesList/InvoicesList.types.d.ts +37 -0
  346. package/dist/types/public/components/PaymentHistory/PaymentHistory.entry.ce.d.ts +1 -0
  347. package/dist/types/public/components/PaymentHistory/PaymentHistory.entry.types.d.ts +5 -0
  348. package/dist/types/public/components/PaymentHistory/PaymentHistory.types.d.ts +10 -0
  349. package/dist/types/public/components/PaymentMethodForm/PaymentMethodForm.entry.ce.d.ts +1 -0
  350. package/dist/types/public/components/PaymentMethodForm/PaymentMethodForm.entry.types.d.ts +5 -0
  351. package/dist/types/public/components/PaymentMethodForm/PaymentMethodForm.types.d.ts +38 -0
  352. package/dist/types/public/components/SubscriptionSchedules/SubscriptionSchedules.entry.ce.d.ts +1 -0
  353. package/dist/types/public/components/SubscriptionSchedules/SubscriptionSchedules.entry.types.d.ts +5 -0
  354. package/dist/types/public/components/SubscriptionSchedules/SubscriptionSchedules.types.d.ts +9 -0
  355. package/dist/types/public/components/SubscriptionsList/SubscriptionsList.entry.ce.d.ts +1 -0
  356. package/dist/types/public/components/SubscriptionsList/SubscriptionsList.entry.types.d.ts +5 -0
  357. package/dist/types/public/components/SubscriptionsList/SubscriptionsList.types.d.ts +16 -0
  358. package/dist/types/public/components/WalletBalances/WalletBalances.entry.ce.d.ts +1 -0
  359. package/dist/types/public/components/WalletBalances/WalletBalances.entry.types.d.ts +5 -0
  360. package/dist/types/public/components/WalletBalances/WalletBalances.types.d.ts +3 -0
  361. package/dist/types/public/core/action-request.types.d.ts +55 -0
  362. package/dist/types/public/core/configuration.d.ts +3 -0
  363. package/dist/types/public/core/index.d.ts +14 -0
  364. package/dist/types/public/core/registry.ce.d.ts +8 -0
  365. package/dist/types/public/core/registry.d.ts +6 -0
  366. package/dist/types/public/core/types.d.ts +120 -0
  367. package/dist/types/public/screens/Checkout/Checkout.entry.ce.d.ts +1 -0
  368. package/dist/types/public/screens/Checkout/Checkout.entry.types.d.ts +18 -0
  369. package/dist/types/public/screens/Checkout/Checkout.types.d.ts +46 -0
  370. package/dist/types/public/screens/CustomerOverview/CustomerOverview.entry.ce.d.ts +1 -0
  371. package/dist/types/public/screens/CustomerOverview/CustomerOverview.entry.types.d.ts +5 -0
  372. package/dist/types/public/screens/CustomerOverview/CustomerOverview.types.d.ts +2 -0
  373. package/dist/types/public/screens/PayInvoice/PayInvoice.entry.ce.d.ts +1 -0
  374. package/dist/types/public/screens/PayInvoice/PayInvoice.entry.types.d.ts +4 -0
  375. package/dist/types/public/screens/PayInvoice/PayInvoice.types.d.ts +23 -0
  376. package/dist/types/public/screens/PaymentMethodsManagement/PaymentMethodsManagement.entry.ce.d.ts +1 -0
  377. package/dist/types/public/screens/PaymentMethodsManagement/PaymentMethodsManagement.entry.types.d.ts +3 -0
  378. package/dist/types/public/screens/PaymentMethodsManagement/PaymentMethodsManagement.types.d.ts +7 -0
  379. package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.entry.ce.d.ts +1 -0
  380. package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.entry.types.d.ts +6 -0
  381. package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.types.d.ts +23 -0
  382. package/dist/types/public/screens/SubscriptionManagement/SubscriptionManagement.entry.ce.d.ts +1 -0
  383. package/dist/types/public/screens/SubscriptionManagement/SubscriptionManagement.entry.types.d.ts +5 -0
  384. package/dist/types/public/screens/SubscriptionManagement/SubscriptionManagement.types.d.ts +13 -0
  385. package/dist/types/public/screens/types.d.ts +4 -0
  386. package/dist/types/public/types/index.d.ts +23 -0
  387. package/dist/types/services/invoices.types.d.ts +26 -0
  388. package/dist/types/services/paymentMethods.types.d.ts +31 -0
  389. package/dist/types/services/portals.types.d.ts +68 -0
  390. package/dist/types/services/requests.types.d.ts +24 -0
  391. package/dist/types/translations/supported.d.ts +1 -0
  392. package/dist/types/types/EntryBaseProps.d.ts +10 -0
  393. package/dist/types/types/errors.d.ts +7 -0
  394. package/dist/types/types/subscription.d.ts +4 -0
  395. package/dist/types/vendor/@solvimon/solvimon-types/index.d.ts +111 -0
  396. package/dist/types/vendor/@solvimon/solvimon-types/types/Address.d.ts +17 -0
  397. package/dist/types/vendor/@solvimon/solvimon-types/types/Alerts.d.ts +72 -0
  398. package/dist/types/vendor/@solvimon/solvimon-types/types/Amount.d.ts +4 -0
  399. package/dist/types/vendor/@solvimon/solvimon-types/types/Api.d.ts +50 -0
  400. package/dist/types/vendor/@solvimon/solvimon-types/types/ApiError.d.ts +7 -0
  401. package/dist/types/vendor/@solvimon/solvimon-types/types/ApiKey.d.ts +21 -0
  402. package/dist/types/vendor/@solvimon/solvimon-types/types/ApiStatus.d.ts +7 -0
  403. package/dist/types/vendor/@solvimon/solvimon-types/types/ApprovalPolicies.d.ts +77 -0
  404. package/dist/types/vendor/@solvimon/solvimon-types/types/ApprovalRequests.d.ts +22 -0
  405. package/dist/types/vendor/@solvimon/solvimon-types/types/Attachment.d.ts +14 -0
  406. package/dist/types/vendor/@solvimon/solvimon-types/types/Band.d.ts +30 -0
  407. package/dist/types/vendor/@solvimon/solvimon-types/types/BaseResourceStatus.d.ts +3 -0
  408. package/dist/types/vendor/@solvimon/solvimon-types/types/BillingEntity.d.ts +45 -0
  409. package/dist/types/vendor/@solvimon/solvimon-types/types/BillingPeriod.d.ts +5 -0
  410. package/dist/types/vendor/@solvimon/solvimon-types/types/BillingTime.d.ts +1 -0
  411. package/dist/types/vendor/@solvimon/solvimon-types/types/ChargeOnDemandPricingItems.d.ts +24 -0
  412. package/dist/types/vendor/@solvimon/solvimon-types/types/Commitment.d.ts +9 -0
  413. package/dist/types/vendor/@solvimon/solvimon-types/types/CommitmentItem.d.ts +17 -0
  414. package/dist/types/vendor/@solvimon/solvimon-types/types/Comparator.d.ts +1 -0
  415. package/dist/types/vendor/@solvimon/solvimon-types/types/ConfigMeterProperties.d.ts +12 -0
  416. package/dist/types/vendor/@solvimon/solvimon-types/types/ConfiguredMeterValue.d.ts +9 -0
  417. package/dist/types/vendor/@solvimon/solvimon-types/types/Country.d.ts +1 -0
  418. package/dist/types/vendor/@solvimon/solvimon-types/types/CreateMeterData.d.ts +5 -0
  419. package/dist/types/vendor/@solvimon/solvimon-types/types/CreatePricingPlanVersion.d.ts +3 -0
  420. package/dist/types/vendor/@solvimon/solvimon-types/types/CreditType.d.ts +16 -0
  421. package/dist/types/vendor/@solvimon/solvimon-types/types/Currency.d.ts +8 -0
  422. package/dist/types/vendor/@solvimon/solvimon-types/types/CustomFields.d.ts +39 -0
  423. package/dist/types/vendor/@solvimon/solvimon-types/types/CustomerContact.d.ts +12 -0
  424. package/dist/types/vendor/@solvimon/solvimon-types/types/Customers.d.ts +75 -0
  425. package/dist/types/vendor/@solvimon/solvimon-types/types/Discount.d.ts +12 -0
  426. package/dist/types/vendor/@solvimon/solvimon-types/types/DiscountItem.d.ts +24 -0
  427. package/dist/types/vendor/@solvimon/solvimon-types/types/Document.d.ts +22 -0
  428. package/dist/types/vendor/@solvimon/solvimon-types/types/DueDateConfiguration.d.ts +8 -0
  429. package/dist/types/vendor/@solvimon/solvimon-types/types/Entitlement.d.ts +16 -0
  430. package/dist/types/vendor/@solvimon/solvimon-types/types/Environment.d.ts +1 -0
  431. package/dist/types/vendor/@solvimon/solvimon-types/types/EventTrace.d.ts +23 -0
  432. package/dist/types/vendor/@solvimon/solvimon-types/types/EventTraceExtended.d.ts +22 -0
  433. package/dist/types/vendor/@solvimon/solvimon-types/types/EventTraceLink.d.ts +14 -0
  434. package/dist/types/vendor/@solvimon/solvimon-types/types/EventTraceLinkExtended.d.ts +15 -0
  435. package/dist/types/vendor/@solvimon/solvimon-types/types/Features.d.ts +25 -0
  436. package/dist/types/vendor/@solvimon/solvimon-types/types/IdentityProvider.d.ts +40 -0
  437. package/dist/types/vendor/@solvimon/solvimon-types/types/IndexingSettings.d.ts +24 -0
  438. package/dist/types/vendor/@solvimon/solvimon-types/types/Integrations.d.ts +367 -0
  439. package/dist/types/vendor/@solvimon/solvimon-types/types/Invoice.d.ts +349 -0
  440. package/dist/types/vendor/@solvimon/solvimon-types/types/JWT.d.ts +22 -0
  441. package/dist/types/vendor/@solvimon/solvimon-types/types/Markup.d.ts +8 -0
  442. package/dist/types/vendor/@solvimon/solvimon-types/types/MarkupItem.d.ts +11 -0
  443. package/dist/types/vendor/@solvimon/solvimon-types/types/Meter.d.ts +32 -0
  444. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterConditions.d.ts +26 -0
  445. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterData.d.ts +25 -0
  446. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterDataExpanded.d.ts +5 -0
  447. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterProperty.d.ts +34 -0
  448. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterPropertyValue.d.ts +5 -0
  449. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterValue.d.ts +16 -0
  450. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterValueCalculation.d.ts +20 -0
  451. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterValueValue.d.ts +7 -0
  452. package/dist/types/vendor/@solvimon/solvimon-types/types/ModelType.d.ts +1 -0
  453. package/dist/types/vendor/@solvimon/solvimon-types/types/Name.d.ts +5 -0
  454. package/dist/types/vendor/@solvimon/solvimon-types/types/NotificationPreferences.d.ts +9 -0
  455. package/dist/types/vendor/@solvimon/solvimon-types/types/Payment.d.ts +124 -0
  456. package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentAcceptor.d.ts +120 -0
  457. package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentAction.d.ts +74 -0
  458. package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentMethod.d.ts +173 -0
  459. package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentMethodOptions.d.ts +45 -0
  460. package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentSchedules.d.ts +142 -0
  461. package/dist/types/vendor/@solvimon/solvimon-types/types/Permission.d.ts +1 -0
  462. package/dist/types/vendor/@solvimon/solvimon-types/types/Platform.d.ts +118 -0
  463. package/dist/types/vendor/@solvimon/solvimon-types/types/Portal.d.ts +58 -0
  464. package/dist/types/vendor/@solvimon/solvimon-types/types/Pricing.d.ts +41 -0
  465. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingCategory.d.ts +18 -0
  466. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingCategoryExtended.d.ts +9 -0
  467. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingExtended.d.ts +9 -0
  468. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingGroup.d.ts +29 -0
  469. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingItem.d.ts +40 -0
  470. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingItemConfig.d.ts +130 -0
  471. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSchedule.d.ts +103 -0
  472. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanScheduleInfo.d.ts +7 -0
  473. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanScheduleWithPlanData.d.ts +9 -0
  474. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSubscription.d.ts +80 -0
  475. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSubscriptionGroup.d.ts +10 -0
  476. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanVersion.d.ts +71 -0
  477. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanVersionExtended.d.ts +7 -0
  478. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlans.d.ts +44 -0
  479. package/dist/types/vendor/@solvimon/solvimon-types/types/Product.d.ts +22 -0
  480. package/dist/types/vendor/@solvimon/solvimon-types/types/ProductCategory.d.ts +10 -0
  481. package/dist/types/vendor/@solvimon/solvimon-types/types/ProductItem.d.ts +60 -0
  482. package/dist/types/vendor/@solvimon/solvimon-types/types/PromotionCodes.d.ts +14 -0
  483. package/dist/types/vendor/@solvimon/solvimon-types/types/QuoteTemplates.d.ts +43 -0
  484. package/dist/types/vendor/@solvimon/solvimon-types/types/QuoteVersions.d.ts +93 -0
  485. package/dist/types/vendor/@solvimon/solvimon-types/types/Quotes.d.ts +65 -0
  486. package/dist/types/vendor/@solvimon/solvimon-types/types/ReprocessLog.d.ts +31 -0
  487. package/dist/types/vendor/@solvimon/solvimon-types/types/Resource.d.ts +5 -0
  488. package/dist/types/vendor/@solvimon/solvimon-types/types/ResourceStatus.d.ts +2 -0
  489. package/dist/types/vendor/@solvimon/solvimon-types/types/Role.d.ts +19 -0
  490. package/dist/types/vendor/@solvimon/solvimon-types/types/SignatureRequest.d.ts +27 -0
  491. package/dist/types/vendor/@solvimon/solvimon-types/types/TaxCategory.d.ts +1 -0
  492. package/dist/types/vendor/@solvimon/solvimon-types/types/TaxIdentifier.d.ts +17 -0
  493. package/dist/types/vendor/@solvimon/solvimon-types/types/TaxSummary.d.ts +21 -0
  494. package/dist/types/vendor/@solvimon/solvimon-types/types/TimePeriod.d.ts +5 -0
  495. package/dist/types/vendor/@solvimon/solvimon-types/types/Timestamp.d.ts +4 -0
  496. package/dist/types/vendor/@solvimon/solvimon-types/types/Token.d.ts +6 -0
  497. package/dist/types/vendor/@solvimon/solvimon-types/types/User.d.ts +106 -0
  498. package/dist/types/vendor/@solvimon/solvimon-types/types/ValueType.d.ts +1 -0
  499. package/dist/types/vendor/@solvimon/solvimon-types/types/Wallet.d.ts +44 -0
  500. package/dist/types/vendor/@solvimon/solvimon-types/types/WalletAutoTopUpConfigs.d.ts +28 -0
  501. package/dist/types/vendor/@solvimon/solvimon-types/types/WalletType.d.ts +54 -0
  502. package/dist/types/vendor/@solvimon/solvimon-types/types/Webhook.d.ts +48 -0
  503. package/dist/types/vendor/@solvimon/solvimon-types/types/WebhookEvent.d.ts +18 -0
  504. package/dist/types/vendor/@solvimon/solvimon-types/types/Workflows.d.ts +95 -0
  505. package/dist/types/vendor/@solvimon/solvimon-types/types/forms.d.ts +1 -0
  506. package/dist/types/vendor/@solvimon/solvimon-types/utils.d.ts +17 -0
  507. package/dist/useActionDispatchProvider-Cz8xLLYA.js +1 -0
  508. package/dist/{useActionDispatchProvider-BlEf-RZ5.mjs → useActionDispatchProvider-D55t_7LY.mjs} +1 -1
  509. package/dist/{useCustomer-Cw8LXT6S.mjs → useCustomer-BNhHz9RJ.mjs} +2 -2
  510. package/dist/{useCustomer-C1XTqmrQ.js → useCustomer-DYCpgA-3.js} +1 -1
  511. package/dist/useCustomerFormLabels-Cw6QpEJY.js +1 -0
  512. package/dist/useCustomerFormLabels-mX5QpApD.mjs +1142 -0
  513. package/dist/{useIncrementalLoading-8WtKZ-mP.mjs → useIncrementalLoading-BK9pRYAU.mjs} +5 -4
  514. package/dist/useIncrementalLoading-CdtGJm_Y.js +1 -0
  515. package/dist/{useInvoiceData-BrxMo4Zt.js → useInvoiceData-BczeMpuk.js} +1 -1
  516. package/dist/{useInvoiceData-Cy_ysMsq.mjs → useInvoiceData-D-EvEioP.mjs} +2 -2
  517. package/dist/{useInvoicesList-DMsZn1tE.mjs → useInvoicesList-BJJYwkIA.mjs} +277 -31
  518. package/dist/useInvoicesList-rMg-8LbH.js +1 -0
  519. package/dist/{useLoadInitialData-BP1v7qhd.mjs → useLoadInitialData-BoGjdUu-.mjs} +1 -1
  520. package/dist/useLoadInitialData-CiJldX50.js +1 -0
  521. package/dist/{usePaymentMethodOptions-CWfGvW0U.mjs → usePaymentMethodOptions-d49aOdLB.mjs} +13 -9
  522. package/dist/usePaymentMethodOptions-fBvWYynV.js +1 -0
  523. package/dist/{usePaymentMethods-Cyk4cjoE.mjs → usePaymentMethods-Bkouz8aQ.mjs} +2 -2
  524. package/dist/{usePaymentMethods-CAFMvSOr.js → usePaymentMethods-CFL3hFW_.js} +1 -1
  525. package/dist/usePayments-BKTNn_RN.js +1 -0
  526. package/dist/usePayments-BlliAt1E.mjs +262 -0
  527. package/dist/{usePortal-0NDlbFr9.mjs → usePortal-eyA4OqjU.mjs} +1 -1
  528. package/dist/usePortal-fhri8neB.js +1 -0
  529. package/dist/useService-D73FNBjT.js +1 -0
  530. package/dist/{useService-CqfJi5ST.mjs → useService-W3Kxems4.mjs} +24 -5
  531. package/dist/useSubscription--IGLmLS6.mjs +250 -0
  532. package/dist/useSubscription-V3KSuhOY.js +1 -0
  533. package/package.json +55 -45
  534. package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Rub9ifBk.js +0 -1
  535. package/dist/ApiStatus-CyNDp_op.mjs +0 -9
  536. package/dist/ApiStatus-oqvUEWJx.js +0 -1
  537. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-DurgWlLC.js +0 -1
  538. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Df7CsbiW.js +0 -1
  539. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-mM5udvi8.js +0 -1
  540. package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-BIpg-MSJ.mjs +0 -53
  541. package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-BM3p8Pk8.js +0 -1
  542. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-D5eSNYH2.js +0 -1
  543. package/dist/InvoiceHeader.vue_vue_type_script_setup_true_lang-Ci8r6tuC.js +0 -1
  544. package/dist/InvoiceHeader.vue_vue_type_script_setup_true_lang-jshby9pF.mjs +0 -27
  545. package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-CNKxTtO7.js +0 -1
  546. package/dist/PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-D6lpD1zo.js +0 -1
  547. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-Bmgx7PSt.js +0 -1
  548. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-5XKz3kop.js +0 -1
  549. package/dist/PaymentIntegrationFormAdyen-B-Jbu2hU.js +0 -1
  550. package/dist/PaymentIntegrationFormStripe-Bnn8S1o5.js +0 -1
  551. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-UH9AVXnG.js +0 -1
  552. package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-ifai5HVr.js +0 -1
  553. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DaWlLor0.mjs +0 -217
  554. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DdUoeTUL.js +0 -1
  555. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-CyYhYYRp.mjs +0 -37
  556. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DdjYVNku.js +0 -1
  557. package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-Cu55ZvCH.js +0 -1
  558. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-BKDMwuyh.js +0 -1
  559. package/dist/component--Y7Igv5i.mjs +0 -1022
  560. package/dist/component-DIy1hvJM.js +0 -1
  561. package/dist/components/BillingInformation/BillingInformation.cjs.js +0 -1
  562. package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +0 -1
  563. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +0 -1
  564. package/dist/components/Invoice/Invoice.cjs.js +0 -1
  565. package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +0 -1
  566. package/dist/components/InvoiceHeader/InvoiceHeader.cjs.js +0 -1
  567. package/dist/components/InvoiceHeader/InvoiceHeader.es.js +0 -123
  568. package/dist/components/InvoicesList/InvoicesList.cjs.js +0 -1
  569. package/dist/components/PaymentHistory/PaymentHistory.cjs.js +0 -1
  570. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +0 -1
  571. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +0 -1
  572. package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +0 -1
  573. package/dist/components/WalletBalances/WalletBalances.cjs.js +0 -1
  574. package/dist/core/index.cjs.js +0 -1
  575. package/dist/core/index.es.js +0 -6
  576. package/dist/customer-brfznoHY.js +0 -1
  577. package/dist/en-US-BvOHPudj.js +0 -1
  578. package/dist/index-BMWWP8xj.js +0 -1
  579. package/dist/index-Do7kzLpg.mjs +0 -265
  580. package/dist/index.cjs.js +0 -1
  581. package/dist/index.es.js +0 -51
  582. package/dist/invoices-Cf3dSYSj.js +0 -1
  583. package/dist/nl-NL-COGUFg60.js +0 -1
  584. package/dist/paymentMethods-DVDC_WfL.js +0 -1
  585. package/dist/payments-DVZFO5yb.js +0 -1
  586. package/dist/pricing-CuYndX6t.js +0 -1
  587. package/dist/pricing-GwLCiSzs.mjs +0 -19
  588. package/dist/registry-Ck0Gb6rj.mjs +0 -153
  589. package/dist/registry-Cra6yoB4.js +0 -1
  590. package/dist/screens/Checkout/Checkout.cjs.js +0 -1
  591. package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +0 -1
  592. package/dist/screens/PayInvoice/PayInvoice.cjs.js +0 -1
  593. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs.js +0 -1
  594. package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs.js +0 -1
  595. package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs.js +0 -1
  596. package/dist/solvimon-web.css +0 -1
  597. package/dist/subscriptions-BFCKVHnP.js +0 -1
  598. package/dist/useActionDispatchProvider-aJOy3kr1.js +0 -1
  599. package/dist/useIncrementalLoading-CkY2klIW.js +0 -1
  600. package/dist/useInvoicesList-DmisMQzy.js +0 -1
  601. package/dist/useLoadInitialData-_BjCD0Jc.js +0 -1
  602. package/dist/usePaymentMethodOptions-xeSTmaVo.js +0 -1
  603. package/dist/usePayments-BieVBaz-.js +0 -1
  604. package/dist/usePayments-D88XSZfS.mjs +0 -42
  605. package/dist/usePortal-B954nyEB.js +0 -1
  606. package/dist/useService-BiljI7XA.js +0 -1
  607. package/dist/useSubscription-9rJpFNUF.mjs +0 -29
  608. package/dist/useSubscription-k3limdu_.js +0 -1
  609. package/dist/vendor-ui-Dfh3_g4q.js +0 -1
  610. package/dist/vendor-ui-ItGf7wJV.mjs +0 -29938
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solvimon/solvimon-web",
3
- "version": "0.1.0-alpha.18",
3
+ "version": "0.1.0-alpha.19",
4
4
  "description": "Solvimon's Front-end SDK provides you with the building blocks to create a billing self serve experience",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -11,6 +11,7 @@
11
11
  "analyze": "vite-bundle-visualizer",
12
12
  "prebuild": "npm run build:css && npm run type-check",
13
13
  "build": "vite build",
14
+ "build:internal": "SOLVIMON_INTERNAL_ENVIRONMENTS=1 npm run build",
14
15
  "build:css": "tailwindcss -i ./src/assets/index.css -o ./.sdk/tailwind.css",
15
16
  "dev": "npm run watch",
16
17
  "playground:dev": "npm --prefix playground run dev",
@@ -27,11 +28,14 @@
27
28
  "type-check": "vue-tsc --noEmit -p tsconfig.json --composite false",
28
29
  "prewatch": "npm run build:css",
29
30
  "watch": "run-p watch:js watch:css",
30
- "watch:js": "vite build --watch",
31
+ "watch:js": "SOLVIMON_INTERNAL_ENVIRONMENTS=1 vite build --watch",
31
32
  "watch:css": "npm run build:css -- --watch",
32
33
  "translations:extract": "formatjs extract 'src/**/*.{ts,vue}*' --ignore='**/*.d.ts' --out-file 'src/translations/source.json' --flatten --additional-function-names '$t'",
33
34
  "translations:compile": "formatjs compile 'src/translations/source.json' --out-file 'src/translations/locales/en-US.json'",
34
35
  "translations:check": "node ./scripts/check-translations.mjs",
36
+ "types:check-published": "node ./scripts/ci/check-published-types.mjs",
37
+ "types:check-consumer": "node ./scripts/ci/check-consumer-types.mjs",
38
+ "bundle:check-contents": "node ./scripts/ci/check-bundle-contents.mjs",
35
39
  "logs:list": "node ./scripts/list-log-codes.mjs",
36
40
  "test:e2e:run-app": "node scripts/start-test-app.mjs",
37
41
  "test:e2e": "playwright test",
@@ -44,7 +48,7 @@
44
48
  "version:major": "npm version major --no-git-tag-version",
45
49
  "changelog:check": "node scripts/check-changelog.mjs",
46
50
  "publish:guard": "node scripts/publish-guard.mjs",
47
- "prepublishOnly": "npm run publish:guard && npm run changelog:check && npm run build",
51
+ "prepublishOnly": "npm run publish:guard && npm run changelog:check && npm run build && npm run bundle:check-contents",
48
52
  "prepare": "husky"
49
53
  },
50
54
  "lint-staged": {
@@ -54,102 +58,112 @@
54
58
  "files": [
55
59
  "dist"
56
60
  ],
57
- "main": "./dist/index.cjs.js",
58
- "module": "./dist/index.es.js",
61
+ "main": "./dist/index.cjs",
62
+ "module": "./dist/index.mjs",
59
63
  "types": "./dist/index.d.ts",
60
64
  "exports": {
61
65
  ".": {
62
66
  "types": "./dist/index.d.ts",
63
- "import": "./dist/index.es.js",
64
- "require": "./dist/index.cjs.js"
67
+ "import": "./dist/index.mjs",
68
+ "require": "./dist/index.cjs"
65
69
  },
66
70
  "./core": {
67
71
  "types": "./dist/core/index.d.ts",
68
- "import": "./dist/core/index.es.js",
69
- "require": "./dist/core/index.cjs.js"
72
+ "import": "./dist/core/index.mjs",
73
+ "require": "./dist/core/index.cjs"
70
74
  },
71
75
  "./core/action-request-types": {
72
76
  "types": "./dist/core/action-request.types.d.ts"
73
77
  },
74
78
  "./screens/checkout": {
75
79
  "types": "./dist/screens/Checkout/Checkout.ce.d.ts",
76
- "import": "./dist/screens/Checkout/Checkout.es.js",
77
- "require": "./dist/screens/Checkout/Checkout.cjs.js"
80
+ "import": "./dist/screens/Checkout/Checkout.mjs",
81
+ "require": "./dist/screens/Checkout/Checkout.cjs"
78
82
  },
79
83
  "./screens/customer-overview": {
80
84
  "types": "./dist/screens/CustomerOverview/CustomerOverview.ce.d.ts",
81
- "import": "./dist/screens/CustomerOverview/CustomerOverview.es.js",
82
- "require": "./dist/screens/CustomerOverview/CustomerOverview.cjs.js"
85
+ "import": "./dist/screens/CustomerOverview/CustomerOverview.mjs",
86
+ "require": "./dist/screens/CustomerOverview/CustomerOverview.cjs"
83
87
  },
84
88
  "./screens/subscription-management": {
85
89
  "types": "./dist/screens/SubscriptionManagement/SubscriptionManagement.ce.d.ts",
86
- "import": "./dist/screens/SubscriptionManagement/SubscriptionManagement.es.js",
87
- "require": "./dist/screens/SubscriptionManagement/SubscriptionManagement.cjs.js"
90
+ "import": "./dist/screens/SubscriptionManagement/SubscriptionManagement.mjs",
91
+ "require": "./dist/screens/SubscriptionManagement/SubscriptionManagement.cjs"
88
92
  },
89
93
  "./screens/subscription-details": {
90
94
  "types": "./dist/screens/SubscriptionDetails/SubscriptionDetails.ce.d.ts",
91
- "import": "./dist/screens/SubscriptionDetails/SubscriptionDetails.es.js",
92
- "require": "./dist/screens/SubscriptionDetails/SubscriptionDetails.cjs.js"
95
+ "import": "./dist/screens/SubscriptionDetails/SubscriptionDetails.mjs",
96
+ "require": "./dist/screens/SubscriptionDetails/SubscriptionDetails.cjs"
93
97
  },
94
98
  "./screens/pay-invoice": {
95
99
  "types": "./dist/screens/PayInvoice/PayInvoice.ce.d.ts",
96
- "import": "./dist/screens/PayInvoice/PayInvoice.es.js",
97
- "require": "./dist/screens/PayInvoice/PayInvoice.cjs.js"
100
+ "import": "./dist/screens/PayInvoice/PayInvoice.mjs",
101
+ "require": "./dist/screens/PayInvoice/PayInvoice.cjs"
102
+ },
103
+ "./screens/payment-methods-management": {
104
+ "types": "./dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.ce.d.ts",
105
+ "import": "./dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs",
106
+ "require": "./dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs"
98
107
  },
99
108
  "./components/subscriptions-list": {
100
109
  "types": "./dist/components/SubscriptionsList/SubscriptionsList.ce.d.ts",
101
- "import": "./dist/components/SubscriptionsList/SubscriptionsList.es.js",
102
- "require": "./dist/components/SubscriptionsList/SubscriptionsList.cjs.js"
110
+ "import": "./dist/components/SubscriptionsList/SubscriptionsList.mjs",
111
+ "require": "./dist/components/SubscriptionsList/SubscriptionsList.cjs"
103
112
  },
104
113
  "./components/customer-payment-methods": {
105
114
  "types": "./dist/components/CustomerPaymentMethods/CustomerPaymentMethods.ce.d.ts",
106
- "import": "./dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js",
107
- "require": "./dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js"
115
+ "import": "./dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs",
116
+ "require": "./dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs"
108
117
  },
109
118
  "./components/wallet-balances": {
110
119
  "types": "./dist/components/WalletBalances/WalletBalances.ce.d.ts",
111
- "import": "./dist/components/WalletBalances/WalletBalances.es.js",
112
- "require": "./dist/components/WalletBalances/WalletBalances.cjs.js"
120
+ "import": "./dist/components/WalletBalances/WalletBalances.mjs",
121
+ "require": "./dist/components/WalletBalances/WalletBalances.cjs"
113
122
  },
114
123
  "./components/billing-information": {
115
124
  "types": "./dist/components/BillingInformation/BillingInformation.ce.d.ts",
116
- "import": "./dist/components/BillingInformation/BillingInformation.es.js",
117
- "require": "./dist/components/BillingInformation/BillingInformation.cjs.js"
125
+ "import": "./dist/components/BillingInformation/BillingInformation.mjs",
126
+ "require": "./dist/components/BillingInformation/BillingInformation.cjs"
118
127
  },
119
128
  "./components/billing-information-form": {
120
129
  "types": "./dist/components/BillingInformationForm/BillingInformationForm.ce.d.ts",
121
- "import": "./dist/components/BillingInformationForm/BillingInformationForm.es.js",
122
- "require": "./dist/components/BillingInformationForm/BillingInformationForm.cjs.js"
130
+ "import": "./dist/components/BillingInformationForm/BillingInformationForm.mjs",
131
+ "require": "./dist/components/BillingInformationForm/BillingInformationForm.cjs"
123
132
  },
124
133
  "./components/invoice": {
125
134
  "types": "./dist/components/Invoice/Invoice.ce.d.ts",
126
- "import": "./dist/components/Invoice/Invoice.es.js",
127
- "require": "./dist/components/Invoice/Invoice.cjs.js"
135
+ "import": "./dist/components/Invoice/Invoice.mjs",
136
+ "require": "./dist/components/Invoice/Invoice.cjs"
137
+ },
138
+ "./components/invoice-header": {
139
+ "types": "./dist/components/InvoiceHeader/InvoiceHeader.ce.d.ts",
140
+ "import": "./dist/components/InvoiceHeader/InvoiceHeader.mjs",
141
+ "require": "./dist/components/InvoiceHeader/InvoiceHeader.cjs"
128
142
  },
129
143
  "./components/invoice-details": {
130
144
  "types": "./dist/components/InvoiceDetails/InvoiceDetails.ce.d.ts",
131
- "import": "./dist/components/InvoiceDetails/InvoiceDetails.es.js",
132
- "require": "./dist/components/InvoiceDetails/InvoiceDetails.cjs.js"
145
+ "import": "./dist/components/InvoiceDetails/InvoiceDetails.mjs",
146
+ "require": "./dist/components/InvoiceDetails/InvoiceDetails.cjs"
133
147
  },
134
148
  "./components/invoices-list": {
135
149
  "types": "./dist/components/InvoicesList/InvoicesList.ce.d.ts",
136
- "import": "./dist/components/InvoicesList/InvoicesList.es.js",
137
- "require": "./dist/components/InvoicesList/InvoicesList.cjs.js"
150
+ "import": "./dist/components/InvoicesList/InvoicesList.mjs",
151
+ "require": "./dist/components/InvoicesList/InvoicesList.cjs"
138
152
  },
139
153
  "./components/payment-history": {
140
154
  "types": "./dist/components/PaymentHistory/PaymentHistory.ce.d.ts",
141
- "import": "./dist/components/PaymentHistory/PaymentHistory.es.js",
142
- "require": "./dist/components/PaymentHistory/PaymentHistory.cjs.js"
155
+ "import": "./dist/components/PaymentHistory/PaymentHistory.mjs",
156
+ "require": "./dist/components/PaymentHistory/PaymentHistory.cjs"
143
157
  },
144
158
  "./components/subscription-schedules": {
145
159
  "types": "./dist/components/SubscriptionSchedules/SubscriptionSchedules.ce.d.ts",
146
- "import": "./dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js",
147
- "require": "./dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js"
160
+ "import": "./dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs",
161
+ "require": "./dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs"
148
162
  },
149
163
  "./components/payment-method-form": {
150
164
  "types": "./dist/components/PaymentMethodForm/PaymentMethodForm.ce.d.ts",
151
- "import": "./dist/components/PaymentMethodForm/PaymentMethodForm.es.js",
152
- "require": "./dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js"
165
+ "import": "./dist/components/PaymentMethodForm/PaymentMethodForm.mjs",
166
+ "require": "./dist/components/PaymentMethodForm/PaymentMethodForm.cjs"
153
167
  }
154
168
  },
155
169
  "sideEffects": false,
@@ -166,7 +180,6 @@
166
180
  "@commitlint/config-conventional": "^20.5.3",
167
181
  "@formatjs/cli": "^6.6.1",
168
182
  "@playwright/test": "^1.57.0",
169
- "@rushstack/eslint-patch": "^1.2.0",
170
183
  "@solvimon/solvimon-types": "^1.0.3",
171
184
  "@solvimon/solvimon-ui": "^1.7.8",
172
185
  "@tsconfig/node22": "^22.0.0",
@@ -175,7 +188,6 @@
175
188
  "@typescript-eslint/parser": "^8.46.2",
176
189
  "@vitejs/plugin-vue": "^5.2.3",
177
190
  "@vitest/coverage-v8": "^3.2.4",
178
- "@vitest/eslint-plugin": "1.1.20",
179
191
  "@vue/eslint-config-prettier": "^10.2.0",
180
192
  "@vue/eslint-config-typescript": "^14.6.0",
181
193
  "@vue/test-utils": "^2.4.6",
@@ -204,8 +216,6 @@
204
216
  "typescript": "~5.6.3",
205
217
  "vite": "^6.4.2",
206
218
  "vite-plugin-dts": "^4.5.3",
207
- "vite-plugin-string": "^1.2.3",
208
- "vite-plugin-vue-devtools": "^7.7.2",
209
219
  "vitest": "^3.1.1",
210
220
  "vitest-localstorage-mock": "^0.1.2",
211
221
  "vue-tsc": "^2.1.10"
@@ -1 +0,0 @@
1
- const e=require("vue"),t=require("./vendor-ui-Dfh3_g4q.js"),a=require("./EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-BM3p8Pk8.js"),o=e=>e.replaceAll("_"," ").toLowerCase().replace(/^./,e=>e.toUpperCase());function n(e){var t,a,n,r,l,i;const s=[];switch(e.type){case"CARD":s.push(e.card.brand&&o(e.card.brand),e.card.last_four_digits);break;case"ONLINE_BANKING":s.push((null==(t=e.online_banking)?void 0:t.variant)&&o(e.online_banking.variant),null==(a=e.online_banking)?void 0:a.owner_name);break;case"DIRECT_DEBIT":s.push((null==(n=e.direct_debit)?void 0:n.variant)&&o(e.direct_debit.variant),null==(r=e.direct_debit)?void 0:r.owner_name);break;case"BUY_NOW_PAY_LATER":s.push((null==(l=e.buy_now_pay_later)?void 0:l.variant)&&o(e.buy_now_pay_later.variant));break;case"DIGITAL_WALLET":s.push((null==(i=e.digital_wallet)?void 0:i.variant)&&o(e.digital_wallet.variant))}return s.filter(Boolean).join(" ")||o(e.type)}const r={class:"sr-only"},l=e.defineComponent({__name:"PaymentMethodSelector",props:{paymentMethods:{type:Array},modelValue:{type:String},label:{type:String},required:{type:Boolean},disabled:{type:Boolean},error:{type:[String,Object,Array]},rootClass:{type:String},showAddOption:{type:Boolean,default:!0},paymentMethodOptions:{type:Array}},emits:["update:modelValue","add-payment-method"],setup(o,{emit:l}){const i=o,s=l,{$t:d}=t.useIntl(),{options:m,paymentMethodsById:c}=(p=e.toRef(i,"paymentMethods"),{options:e.computed(()=>p.value.map(e=>({value:e.id,label:n(e)}))),paymentMethodsById:e.computed(()=>Object.fromEntries(p.value.map(e=>[e.id,e])))});var p;const u=e.computed({get:()=>i.modelValue,set:e=>s("update:modelValue","string"==typeof e?e:void 0)}),y=e.computed(()=>i.paymentMethods.length>0),_=e.computed(()=>{var e;return 0!==(null==(e=i.paymentMethodOptions)?void 0:e.length)});return(n,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["sv-payment-method-selector grid grid-cols-1 gap-2",o.rootClass])},[y.value||_.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",null,[y.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$10),{key:0,modelValue:u.value,"onUpdate:modelValue":l[0]||(l[0]=e=>u.value=e),class:"sv-payment-method-selector__options",name:"payment-method",direction:"column",options:e.unref(m),label:o.label,required:o.required,disabled:o.disabled,error:o.error,"show-radio":!1},{prefix:e.withCtx(({optionValue:a})=>[e.createVNode(e.unref(t._sfc_main$8),{class:"sv-payment-method-selector__option-content grow","payment-method":e.unref(c)[String(a)]},null,8,["payment-method"])]),label:e.withCtx(({option:t})=>[e.createElementVNode("span",r,e.toDisplayString(t.label),1)]),_:1},8,["modelValue","options","label","required","disabled","error"])):e.createCommentVNode("",!0)]),o.showAddOption&&_.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$6),{key:0,class:"sv-action sv-action--secondary sv-action--full-width sv-payment-method-selector__add w-full",variant:"outline",color:"gray","icon-prefix":"add",type:"button",size:"sm",disabled:o.disabled,onClick:l[1]||(l[1]=e=>s("add-payment-method"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)({defaultMessage:"Add payment method",description:"Label of the button that adds a new payment method",id:"payment_method_selector.add_payment_method"})),1)]),_:1},8,["disabled"])):o.showAddOption?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:1,variant:"body-sm",shade:"lighter",tag:"p",class:"sv-payment-method-selector__unavailable"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)({defaultMessage:"There are no available payment methods. Please contact support for more information.",description:"Shown in place of the add button when the customer cannot add any payment method",id:"payment_method_selector.no_payment_methods_available"})),1)]),_:1})):e.createCommentVNode("",!0),o.error&&!y.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$9),{key:2,class:"sv-payment-method-selector__error",message:o.error,variant:"error"},null,8,["message"])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(a._sfc_main,{key:0,class:"sv-payment-method-selector__empty",icon:"credit_card_off"},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)({defaultMessage:"No payment methods available",description:"Shown in place of the payment method choice when the customer has nothing stored and nothing can be added",id:"payment_method_selector.empty_state.title"})),1)]),_:1}))],2))}}),i=e.defineComponent({__name:"AddPaymentMethodPane",props:{customer:{type:Object},paymentMethodOptions:{type:Array},isLoading:{type:Boolean},isActive:{type:Boolean}},emits:["success","failure"],setup(t,{expose:a}){const o=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./PaymentMethodForm-CLz3ZS-b.js")).then(e=>e.default)),n=t,r=e.computed(()=>({variant:"TOKENIZE"})),l=e.ref(!1);e.watch(()=>n.isActive,e=>{l.value=l.value||!!e},{immediate:!0});const i=e.ref();return a({submit:()=>{var e;return null==(e=i.value)?void 0:e.submit()},isSaving:e.computed(()=>{var e;return!!n.isActive&&!!(null==(e=i.value)?void 0:e.isPaymentPending)})}),(a,n)=>t.customer&&l.value?(e.openBlock(),e.createBlock(e.unref(o),{key:0,ref_key:"formRef",ref:i,class:"sv-add-payment-method-pane","hide-submit-button":"",customer:t.customer,"payment-method-options":t.paymentMethodOptions??[],"is-loading":t.isLoading,configuration:r.value,onSuccess:n[0]||(n[0]=e=>a.$emit("success")),onFailure:n[1]||(n[1]=e=>a.$emit("failure",e))},null,8,["customer","payment-method-options","is-loading","configuration"])):e.createCommentVNode("",!0)}});exports._sfc_main=l,exports._sfc_main$1=i;
@@ -1,9 +0,0 @@
1
- const ApiStatus = {
2
- Initial: "INITIAL",
3
- Loading: "LOADING",
4
- Failed: "FAILED",
5
- Done: "DONE"
6
- };
7
- export {
8
- ApiStatus as A
9
- };
@@ -1 +0,0 @@
1
- exports.ApiStatus={Initial:"INITIAL",Loading:"LOADING",Failed:"FAILED",Done:"DONE"};
@@ -1 +0,0 @@
1
- const e=require("vue"),i=require("./vendor-ui-Dfh3_g4q.js"),t=require("./Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),o=require("./useActionDispatchProvider-aJOy3kr1.js"),n=e.defineComponent({__name:"BillingInformation",props:{customer:{type:Object},isLoading:{type:Boolean},configuration:{default:()=>({showEditButton:!0}),type:Object}},emits:["edit-billing-information"],setup(n){const{$t:s}=i.useIntl(),{dispatchAction:r}=o.useActionDispatchProvider();return(o,a)=>n.isLoading?(e.openBlock(),e.createBlock(t._sfc_main,{key:0,variant:"section",class:"sv-billing-information sv-root sv-component sv-loading min-h-[100px]","data-testid":"billing-information-skeleton"})):(e.openBlock(),e.createBlock(e.unref(i._sfc_main$5),{key:1,class:"sv-billing-information sv-root sv-component",customer:n.customer,"fallback-to-reference":!1},e.createSlots({_:2},[n.configuration.showEditButton?{name:"settings",fn:e.withCtx(()=>[e.createVNode(e.unref(i._sfc_main$6),{size:"sm",variant:"ghost",color:"gray","icon-prefix":"edit",class:"sv-action sv-action--ghost sv-billing-information__edit",onClick:a[0]||(a[0]=i=>e.unref(r)({action:"edit-billing-information"}))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Edit",id:"customer_overview.billing_information_block.view_all_payment_methods_link_label",description:"The link text that links to the overview page of the customer billing information"})),1)]),_:1})]),key:"0"}:void 0]),1032,["customer"]))}});exports._sfc_main=n;
@@ -1 +0,0 @@
1
- const e=require("vue"),t=require("./vendor-ui-Dfh3_g4q.js"),o=require("./PaymentMethodsList.vue_vue_type_script_setup_true_lang-ifai5HVr.js"),n=require("./Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),a=require("./useActionDispatchProvider-aJOy3kr1.js"),s=e.defineComponent({__name:"CustomerPaymentMethodsBlock",props:{paymentMethods:{type:Array},limit:{default:2,type:Number},isLoading:{type:Boolean},showViewAllButton:{type:Boolean},showAddButton:{type:Boolean}},emits:["view-all-payment-methods","add-payment-method"],setup(n){const a=n,{$t:s}=t.useIntl(),i=e.computed(()=>a.paymentMethods.length>0);return(a,d)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$2),{class:"sv-payment-methods","no-spacing":"","no-border":"",title:e.unref(s)({defaultMessage:"{count, plural, one {Payment method} other {Payment methods}}",description:"Title for the payment methods block on the customer overview page",id:"customer_overview.payment_methods.title"},{count:String(n.paymentMethods.length)})},e.createSlots({default:e.withCtx(()=>[i.value?(e.openBlock(),e.createBlock(o._sfc_main,{key:0,"payment-methods":n.paymentMethods},null,8,["payment-methods"])):(e.openBlock(),e.createBlock(e.unref(t._sfc_main$2),{key:1,class:"sv-empty-state sv-payment-methods__empty"},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$1),{variant:"body-sm",shade:"lighter","no-spacing":"",class:"sv-payment-methods__empty-message"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Add a payment method for recurring invoice payments.",description:"Helper text for adding a payment method when no payment methods are configured",id:"customer_overview.payment_methods_block.add_payment_method_helper_text"})),1)]),_:1}),n.showAddButton?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$6),{key:0,class:"sv-action sv-action--secondary sv-action--full-width sv-payment-methods__add mt-4 w-full",variant:"outline",color:"gray","icon-prefix":"add",type:"button",onClick:d[1]||(d[1]=e=>a.$emit("add-payment-method"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Add payment method",description:"Text for the add payment method button that is shown when no payment methods have been configured",id:"customer_overview.payment_methods_block.add_payment_method_button_label"})),1)]),_:1})):e.createCommentVNode("",!0)]),_:1}))]),_:2},[n.showViewAllButton?{name:"right",fn:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$6),{size:"sm",variant:"ghost",color:"gray","icon-suffix":"arrow_right_alt",class:"sv-action sv-action--ghost sv-payment-methods__view-all",type:"button",onClick:d[0]||(d[0]=e=>a.$emit("view-all-payment-methods"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"View all",id:"customer_overview.payment_methods_block.view_all_payment_methods_link_label",description:"The link text that links to the overview page of the customer invoices"})),1)]),_:1})]),key:"0"}:void 0]),1032,["title"]))}}),i=e.defineComponent({__name:"CustomerPaymentMethods",props:{isLoading:{type:Boolean},paymentMethods:{type:Array},maxPaymentMethods:{type:Number},configuration:{default:()=>({showViewAllButton:!0,showAddButton:!0}),type:Object}},setup(t){const{dispatchAction:o}=a.useActionDispatchProvider();return(a,i)=>{var d,m;return t.isLoading?(e.openBlock(),e.createBlock(n._sfc_main,{key:0,variant:"section",class:"sv-payment-methods sv-root sv-component sv-loading h-72","data-testid":"customer-payment-methods-skeleton"})):(e.openBlock(),e.createBlock(s,{key:1,class:"sv-payment-methods sv-root sv-component","is-loading":t.isLoading,"payment-methods":t.paymentMethods,"show-view-all-button":null==(d=t.configuration)?void 0:d.showViewAllButton,"show-add-button":null==(m=t.configuration)?void 0:m.showAddButton,onViewAllPaymentMethods:i[0]||(i[0]=t=>e.unref(o)({action:"view-all-payment-methods"})),onAddPaymentMethod:i[1]||(i[1]=t=>e.unref(o)({action:"add-payment-method"}))},null,8,["is-loading","payment-methods","show-view-all-button","show-add-button"]))}}});exports._sfc_main=i;
@@ -1 +0,0 @@
1
- const e=require("vue"),t=require("./vendor-ui-Dfh3_g4q.js"),o=require("./component-DIy1hvJM.js"),n=require("./useService-BiljI7XA.js"),a=require("./Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),i=require("./index-BMWWP8xj.js"),l=require("./invoices-Cf3dSYSj.js"),u=require("./useWatchDebounced-C_YxgoQ6.js"),r=require("./AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Rub9ifBk.js"),d=require("./SubscriptionSummary.vue_vue_type_script_setup_true_lang-Cu55ZvCH.js"),s=require("./usePaymentMethodOptions-xeSTmaVo.js");const c=(e=[],t)=>{if(null==t?void 0:t.pricing_item_id)return e.find(e=>(e.charge_on_demand_pricing_items??[]).some(({pricing_item_id:e})=>e===t.pricing_item_id))},p=["TOP_UP","ADD_PAYMENT_METHOD","SUCCESS"],m=e=>"object"==typeof e&&null!==e&&"pricing_item"in e,v=(e,t)=>{const o=new Set((e=>[...new Set(((null==e?void 0:e.charge_on_demand_pricing_items)??[]).flatMap(e=>m(e)&&e.pricing_plan_schedule_id?[e.pricing_plan_schedule_id]:[]))])(e));return t.flatMap(e=>{const t=(e.pricing_plan_schedule_infos??[]).filter(({id:e})=>o.has(e));return 0===t.length?[]:[{id:e.id,name:e.name||e.reference||e.id,scheduleIds:t.map(({id:e})=>e),enabledPricingIds:t.flatMap(e=>{var t;return((null==(t=e.pricing_plan_schedule)?void 0:t.enabled_pricings)??[]).flatMap(({pricing_id:e})=>e?[e]:[])})}]})},f=e=>((null==e?void 0:e.charge_on_demand_pricing_items)??[]).flatMap(o=>{var n,a;if(!m(o))return[];const i=o.pricing_item_id??(null==(n=o.pricing_item)?void 0:n.id);return i?((null==(a=o.pricing_item)?void 0:a.configs)??[]).map(n=>{const a=function(e,o){var n,a,i,l,u,r,d;if(!e.on_demand||!t.isFlexiblePricing(e))return;const s=null==(a=null==(n=e.details)?void 0:n.bands)?void 0:a[0],c=(null==(i=null==s?void 0:s.minimum_amount)?void 0:i.currency)??(null==(l=null==s?void 0:s.maximum_amount)?void 0:l.currency)??(null==(r=null==(u=null==o?void 0:o.wallet_balance.balance)?void 0:u.amount)?void 0:r.currency);if(!c)return;const p=h(o),m=p?g(e,o):void 0,v=null==(d=null==p?void 0:p.credit_type)?void 0:d.unit_name,f=e=>{if(!e)return;const t=p&&m?w(e.quantity,m.rate):void 0;return void 0!==t&&p?b(t,p):{amount:e}};return{config:{...(null==s?void 0:s.minimum_amount)&&{minimum_amount:s.minimum_amount},...(null==s?void 0:s.maximum_amount)&&{maximum_amount:s.maximum_amount}},currency:c,...m&&{creditsConfiguration:{conversionRate:m.rate,...(null==v?void 0:v.singular)&&{unitNameSingle:v.singular},...(null==v?void 0:v.plural)&&{unitNamePlural:v.plural}}},bounds:{...f(null==s?void 0:s.minimum_amount)&&{minimum:f(null==s?void 0:s.minimum_amount)},...f(null==s?void 0:s.maximum_amount)&&{maximum:f(null==s?void 0:s.maximum_amount)}}}}(n,e),l=function(e,o){var n,a,i;if(!e.on_demand||!t.hasOneOfPricingTypes(e,["FIXED"]))return;const l=null==(i=null==(a=null==(n=e.details)?void 0:n.bands)?void 0:a[0])?void 0:i.fixed_amount;if(!l)return;const u=h(o),r=u?y(e,o):void 0;return{amount:l,value:r&&u?b(r.quantity,u):{amount:l}}}(n,e);return{pricingItemId:i,...o.pricing_plan_schedule_id&&{pricingPlanScheduleId:o.pricing_plan_schedule_id},config:n,...a&&{flexiblePricing:a},...l&&{fixedPricing:l}}}):[]});const h=e=>{var t;return null==(t=null==e?void 0:e.wallet_balance.balance)?void 0:t.credits},_=(e,t)=>{var o;const n=null==(o=null==t?void 0:t.wallet)?void 0:o.wallet_type_id;return(e.wallet_grants??[]).filter(({wallet_type_id:e})=>!n||e===n)},g=(e,t)=>{var o,n;return null==(n=null==(o=_(e,t).find(({credits_grant:e})=>null==e?void 0:e.conversion))?void 0:o.credits_grant)?void 0:n.conversion},y=(e,t)=>{var o,n;return null==(n=null==(o=_(e,t).find(({credits_grant:e})=>null==e?void 0:e.credits))?void 0:o.credits_grant)?void 0:n.credits},b=(e,t)=>({credits:{...t,quantity:e}}),w=(e,t)=>{const o=Number(e),n=Number(t);return Number.isFinite(o)&&Number.isFinite(n)?String(o*n):void 0};const x=e=>{var t,o,n,a,i;return!!(null==(t=e.fixedPricing)?void 0:t.value.credits)||!!(null==(o=e.flexiblePricing)?void 0:o.creditsConfiguration)||!!(null==(i=(null==(n=e.flexiblePricing)?void 0:n.bounds.minimum)??(null==(a=e.flexiblePricing)?void 0:a.bounds.maximum))?void 0:i.credits)},M=(e=[])=>{for(const{flexiblePricing:t,fixedPricing:o}of e){const e=(null==t?void 0:t.currency)??(null==o?void 0:o.amount.currency);if(e)return e}},C=(e=[])=>{var t,o,n;for(const{fixedPricing:a,flexiblePricing:i}of e){const e=(null==a?void 0:a.value.credits)??(null==(t=(null==i?void 0:i.bounds.minimum)??(null==i?void 0:i.bounds.maximum))?void 0:t.credits);if(null==(n=null==(o=null==e?void 0:e.credit_type)?void 0:o.unit_name)?void 0:n.plural)return e.credit_type.unit_name.plural}},B=(e=[])=>{var t;for(const{flexiblePricing:o}of e){const e=null==(t=null==o?void 0:o.creditsConfiguration)?void 0:t.conversionRate;if(e)return e}},P=(e=[])=>{for(const{flexiblePricing:t}of e){const{minimum_amount:e,maximum_amount:o}=(null==t?void 0:t.config)??{};if(e||o)return{...e&&{minimum:e},...o&&{maximum:o}}}return{}},S=(e=[])=>{const t=((e=[])=>{if(e.some(x)){const t=(e=>{var t;for(const{fixedPricing:o,flexiblePricing:n}of e){const e=(null==o?void 0:o.value.credits)??(null==(t=(null==n?void 0:n.bounds.minimum)??(null==n?void 0:n.bounds.maximum))?void 0:t.credits);if(null==e?void 0:e.credit_type_id)return e.credit_type_id}})(e);return t?{creditTypeId:t}:void 0}for(const{flexiblePricing:t,fixedPricing:o}of e){const e=(null==t?void 0:t.currency)??(null==o?void 0:o.amount.currency);if(e)return{currency:e}}})(e);if(t)return{denomination:t,chargeCurrency:M(e)??"",creditUnitName:C(e),conversionRate:B(e),topUpBounds:P(e)}};const T={key:0},I=e.defineComponent({__name:"TopUpInvoicePreview",props:{pricingPlanScheduleId:{type:String},pricingItems:{type:Array}},setup(n){const i=n,{$t:r}=t.useIntl(),d=e.computed(()=>i.pricingPlanScheduleId),s=e.computed(()=>i.pricingItems),{invoicePreview:c}=function({pricingPlanScheduleId:t,pricingItems:n}){const{previewChargeOnDemandPricingItems:a}=l.createInvoicesService(),i=o.useLogger(),r=e.ref(),d=e.ref(!1);let s=0;const c=async()=>{const e=t.value,o=++s;if(!e||!n.value)return n.value&&!e&&i.warn("INVOICE_PREVIEW_SKIPPED","Skipped the top-up invoice preview: no schedule to charge it on",{missing:["pricingPlanScheduleId"]}),r.value=void 0,void(d.value=!1);d.value=!0;try{const t=await a({pricingPlanScheduleId:e,pricingItems:n.value});o===s&&(r.value=t)}catch(l){o===s&&(r.value=void 0),i.error("INVOICE_PREVIEW_FAILED","Failed to load top-up invoice preview",{},l)}finally{o===s&&(d.value=!1)}};return u.useWatchDebounced(n,()=>{c()},{debounce:400,deep:!0}),c(),{invoicePreview:r,isPreviewPending:d,loadPreview:c}}({pricingPlanScheduleId:d,pricingItems:s});return(o,n)=>(e.openBlock(),e.createBlock(a._sfc_main,{class:"sv-top-up-invoice-preview h-[152px]","data-testid":"top-up-invoice-preview-skeleton"},{default:e.withCtx(()=>[e.unref(c)?(e.openBlock(),e.createElementBlock("div",T,[e.createVNode(e.unref(t._sfc_main$31),{required:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"You will pay",description:"Label above the preview of what topping up will be invoiced for",id:"topup_modal.invoice_preview.label"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$2),{"content-background":"none"},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$29),{invoice:e.unref(c),"is-customer-facing":""},null,8,["invoice"])]),_:1})])):e.createCommentVNode("",!0)]),_:1}))}}),k=(e,t)=>e.currency??t??e.creditTypeId??"",N=(e,t)=>({quantity:e??null,currency:t}),V=(e,{denomination:t,chargeCurrency:o,creditUnitName:n,minimumTopUp:a})=>{var i,l,u,r,d;return{enabled:"ACTIVE"===(null==e?void 0:e.status),threshold:N((null==(l=null==(i=null==e?void 0:e.threshold)?void 0:i.amount)?void 0:l.quantity)??(null==(r=null==(u=null==e?void 0:e.threshold)?void 0:u.credits)?void 0:r.quantity),k(t,n)),topUpAmount:N((null==(d=null==e?void 0:e.topup_amount)?void 0:d.quantity)??a,o)}},E=(e,t)=>{var o;const n=null==(o=e.threshold)?void 0:o.quantity;return n?t.creditTypeId?{credits:{quantity:n,credit_type_id:t.creditTypeId}}:{amount:{quantity:n,currency:t.currency??""}}:{}},U=(e,t)=>{var o;return(null==(o=e.topUpAmount)?void 0:o.quantity)?{quantity:e.topUpAmount.quantity,currency:e.topUpAmount.currency??t}:void 0},A=(e,{denomination:t,chargeCurrency:o})=>({status:e.enabled?"ACTIVE":"INACTIVE",threshold:E(e,t),...U(e,o)&&{topup_amount:U(e,o)}}),O=(e,t)=>A(V(e,t),t),$=(e,t)=>JSON.stringify(e)===JSON.stringify(t),D=e=>{const t=Number(null==e?void 0:e.quantity);return(null==e?void 0:e.quantity)&&Number.isFinite(t)?t:void 0},q=e=>{const t=Number(e);return null!=e&&""!==e&&Number.isFinite(t)?t:void 0},R=(e,t,o)=>{const n=q(e),a=q(o);if(!(void 0===n||void 0===a||a<=0))return"CREDITS"===t?n/a:n*a},L=(e,t,o,n)=>t===o?q(e):R(e,t,n),F=e=>e.toFixed(2),j=(e,t)=>"AMOUNT"===t?F(e):String(Number(e.toFixed(6))),Y=(e,t,o,n)=>{const a=((e,t,o)=>"CREDITS"===t?R(e,"AMOUNT",o):q(e))(null==e?void 0:e.quantity,t,o);if(void 0!==a)return"CREDITS"===t?n(a):F(a)},H=["data-testid"],z=e.defineComponent({__name:"ConvertedAmountInput",props:e.mergeModels({unit:{type:String},modelBase:{type:String},entryBase:{type:String},conversionRate:{type:String},showConversionHint:{type:Boolean},currency:{type:String},creditUnitName:{type:String},bounds:{type:Object},label:{type:String},name:{type:String},required:{type:Boolean},disabled:{type:Boolean},error:{type:[String,Object,Array]}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const n=o,a=e.useModel(o,"modelValue"),{$t:i,formatNumber:l}=t.useIntl(),u=e.computed(()=>n.entryBase??n.modelBase),r=e.computed(()=>u.value!==n.modelBase&&void 0!==q(n.conversionRate)),d=e.ref("");function s(e){const t=L(e,u.value,n.modelBase,n.conversionRate);return void 0===t?"":j(t,n.modelBase)}e.watch(()=>[a.value,u.value,n.modelBase,n.conversionRate],([e])=>{if(!r.value)return void(d.value=e??"");if(e===s(d.value))return;const t=L(e,n.modelBase,u.value,n.conversionRate);d.value=void 0===t?"":j(t,u.value)},{immediate:!0});const c=e.computed({get:()=>d.value,set:e=>{d.value=function(e){return"string"==typeof e?e:"number"==typeof e?String(e):""}(e),a.value=r.value?s(d.value):d.value}}),p=e.computed(()=>R(d.value,u.value,n.conversionRate)),m=e.computed(()=>n.creditUnitName?n.creditUnitName:"CREDITS"===u.value?n.unit:i({defaultMessage:"credits",description:"Generic name for a wallet credit, where its credit type does not name one",id:"converted_amount_input.credits"})),v=e=>`${l(e)} ${m.value}`,f=e.computed(()=>{const e=p.value;var o,a;if(n.showConversionHint&&void 0!==e)return"CREDITS"===u.value?n.currency?i({defaultMessage:"Will cost {amount} excluding taxes",description:"Helper text under a credits field, naming what those credits cost in money",id:"converted_amount_input.cost"},{amount:(o=e,a=n.currency,t.formatAmount({quantity:F(o),currency:a}))}):void 0:i({defaultMessage:"Buys about {credits}",description:"Helper text under a money field, naming the credits that amount converts into",id:"converted_amount_input.buys"},{credits:v(e)})}),h=e=>Y(e,u.value,n.conversionRate,l),_=e.computed(()=>{var e,t,o,a;return"CREDITS"===u.value?m.value:(null==(t=null==(e=n.bounds)?void 0:e.minimum)?void 0:t.currency)??(null==(a=null==(o=n.bounds)?void 0:o.maximum)?void 0:a.currency)??n.unit}),g=e.computed(()=>{var e,t;const o=h(null==(e=n.bounds)?void 0:e.minimum),a=h(null==(t=n.bounds)?void 0:t.maximum),l=_.value;return o&&a?i({defaultMessage:"Between {minimum} and {maximum} {unit}",description:"Range of what a flexible top-up may be charged for, beside its label",id:"converted_amount_input.bounds.range"},{minimum:o,maximum:a,unit:l}):o?i({defaultMessage:"At least {minimum} {unit}",description:"Smallest amount a flexible top-up may be charged for, beside its label",id:"converted_amount_input.bounds.minimum"},{minimum:o,unit:l}):a?i({defaultMessage:"Up to {maximum} {unit}",description:"Largest amount a flexible top-up may be charged for, beside its label",id:"converted_amount_input.bounds.maximum"},{maximum:a,unit:l}):void 0});return(n,a)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$24),{modelValue:c.value,"onUpdate:modelValue":a[0]||(a[0]=e=>c.value=e),class:"sv-converted-amount-input",type:"number","as-text-type":"",name:o.name,label:o.label,required:o.required,disabled:o.disabled,error:o.error},e.createSlots({suffix:e.withCtx(()=>[e.createElementVNode("span",{"data-testid":`${o.name}-unit`},e.toDisplayString(o.unit),9,H)]),_:2},[g.value?{name:"label-suffix",fn:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$1),{tag:"span",variant:"body-xs",shade:"lighter","no-spacing":"","data-testid":`${o.name}-bounds`},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.value),1)]),_:1},8,["data-testid"])]),key:"0"}:void 0,f.value?{name:"helper",fn:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$1),{tag:"span",variant:"body-xs",shade:"lighter","no-spacing":"","data-testid":`${o.name}-conversion`},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.value),1)]),_:1},8,["data-testid"])]),key:"1"}:void 0]),1032,["modelValue","name","label","required","disabled","error"]))}}),W=e.defineComponent({__name:"Section",props:{emphasized:{type:Boolean,default:!1},contentClasses:{type:String},contentBackground:{type:String},title:{type:String},noSpacing:{type:Boolean},hasError:{type:Boolean},noBorder:{type:Boolean}},setup(o){const n=o,a=["sv-section__accent relative","before:absolute before:inset-y-0.5 before:left-0.5 before:w-0.5","before:rounded-full before:bg-primary-600"].join(" "),i=e.computed(()=>[n.emphasized?a:void 0,n.contentClasses].filter(Boolean).join(" ")),l=e.computed(()=>{const{emphasized:e,...t}=n;return t});return(o,n)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$2),e.mergeProps(l.value,{class:"sv-section","content-classes":i.value}),e.createSlots({default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:2},[o.$slots.right?{name:"right",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"right")]),key:"0"}:void 0]),1040,["content-classes"]))}}),X={class:"flex grow flex-col"},J=e.defineComponent({__name:"AutoTopUpConfig",props:{config:{type:Object},denomination:{type:Object},creditUnitName:{type:String},chargeCurrency:{type:String},conversionRate:{type:String},topUpBounds:{type:Object},showThresholdConversion:{type:Boolean,default:!0},contained:{type:Boolean},alwaysEnabled:{type:Boolean},disabled:{type:Boolean}},emits:["save"],setup(o,{expose:n,emit:a}){const l=o,u=a,{$t:r,formatNumber:d}=t.useIntl(),s=e.computed(()=>{var e,t;return{denomination:l.denomination,chargeCurrency:l.chargeCurrency,creditUnitName:l.creditUnitName,minimumTopUp:null==(t=null==(e=l.topUpBounds)?void 0:e.minimum)?void 0:t.quantity}}),c=e.ref(V(l.config,s.value)),p=e.computed(()=>k(l.denomination,l.creditUnitName)),m=e.computed(()=>l.denomination.creditTypeId?"CREDITS":"AMOUNT"),v=e.computed(()=>"CREDITS"===m.value?p.value:l.chargeCurrency),f=e.computed({get:()=>{var e;return(null==(e=c.value.threshold)?void 0:e.quantity)??""},set:e=>{c.value.threshold={quantity:e||null,currency:p.value}}}),h=e.computed({get:()=>{var e;return(null==(e=c.value.topUpAmount)?void 0:e.quantity)??""},set:e=>{c.value.topUpAmount={quantity:e||null,currency:l.chargeCurrency}}});e.watch(()=>[l.config,s.value],([e,t])=>{$(O(e,t),y())||(c.value=V(e,t))});const _=e.computed({get:()=>l.alwaysEnabled||c.value.enabled,set:e=>{c.value.enabled=e}}),g=e.computed(()=>A({...c.value,enabled:_.value},s.value)),y=()=>g.value,b=e.reactive({threshold:e.computed(()=>D(c.value.threshold)??null),topUpAmount:e.computed(()=>D(c.value.topUpAmount)??null)}),w=e=>{if(!e)return"";const o=Y(e,m.value,l.conversionRate,d);return void 0===o?t.formatAmount(e):`${o} ${v.value}`},x=i.requiredIf(()=>_.value),M=t.useValidation({threshold:{required:i.common.withMessage(()=>r({defaultMessage:"Enter the balance to top up at.",description:"Error shown under the auto top-up threshold when it is left empty",id:"auto_topup_config.threshold.required"}),x),notNegative:i.common.withMessage(()=>r({defaultMessage:"The balance to top up at cannot be negative.",description:"Error shown under the auto top-up threshold when it is below zero",id:"auto_topup_config.threshold.not_negative"}),e=>null===e||e>=0)},topUpAmount:{required:i.common.withMessage(()=>r({defaultMessage:"Enter the amount to top up with.",description:"Error shown under the auto top-up amount when it is left empty",id:"auto_topup_config.amount.required"}),x),positive:i.common.withMessage(()=>r({defaultMessage:"Top up with more than zero.",description:"Error shown under the auto top-up amount when it is zero or negative",id:"auto_topup_config.amount.positive"}),e=>null===e||e>0),atLeastMinimum:i.common.withMessage(()=>{var e;return r({defaultMessage:"Top up with at least {minimum}.",description:"Error shown under the auto top-up amount when it is below what the pricing allows",id:"auto_topup_config.amount.at_least_minimum"},{minimum:w(null==(e=l.topUpBounds)?void 0:e.minimum)})},e=>{var t;return((e,t)=>{const o=Number(null==t?void 0:t.quantity);return null===e||!(null==t?void 0:t.quantity)||!Number.isFinite(o)||e>=o})(e,null==(t=l.topUpBounds)?void 0:t.minimum)}),withinMaximum:i.common.withMessage(()=>{var e;return r({defaultMessage:"Top up with at most {maximum}.",description:"Error shown under the auto top-up amount when it is above what the pricing allows",id:"auto_topup_config.amount.within_maximum"},{maximum:w(null==(e=l.topUpBounds)?void 0:e.maximum)})},e=>{var t;return((e,t)=>{const o=Number(null==t?void 0:t.quantity);return null===e||!(null==t?void 0:t.quantity)||!Number.isFinite(o)||e<=o})(e,null==(t=l.topUpBounds)?void 0:t.maximum)})}},b),C=e.computed(()=>!$(y(),O(l.config,s.value)));function B(){return M.value.$touch(),M.value.$invalid?void 0:y()}return n({submit:function(){const e=B();e&&u("save",e)},validate:B,rule:g,hasChanges:C,isInvalid:e.computed(()=>M.value.$invalid)}),(n,a)=>(e.openBlock(),e.createBlock(W,{class:"sv-auto-topup-config","content-background":o.contained?"gray":"none","no-spacing":!o.contained,"no-border":!o.contained},{default:e.withCtx(()=>[o.alwaysEnabled?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(t._sfc_main$26),{key:0,modelValue:_.value,"onUpdate:modelValue":a[0]||(a[0]=e=>_.value=e),"no-spacing":"","label-position":"before",class:"!flex",disabled:o.disabled},{"inline-label":e.withCtx(()=>[e.createElementVNode("div",X,[e.createVNode(e.unref(t._sfc_main$1),{tag:"span",variant:"body-sm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Auto top-up",description:"Title of the automatic wallet top-up settings",id:"auto_topup_config.title"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$1),{tag:"span",variant:"body-xs",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Automatically top up your balance when it runs low.",description:"Subtitle of the automatic wallet top-up settings",id:"auto_topup_config.subtitle"})),1)]),_:1})])]),_:1},8,["modelValue","disabled"])),e.createVNode(e.unref(t._sfc_main$32),{"is-open":_.value},{default:e.withCtx(()=>[_.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["grid grid-cols-1 gap-3",{"mt-4":!o.alwaysEnabled}])},[e.createVNode(z,{modelValue:f.value,"onUpdate:modelValue":a[1]||(a[1]=e=>f.value=e),name:"auto-top-up-threshold",unit:p.value,"model-base":m.value,"entry-base":m.value,currency:o.chargeCurrency,"conversion-rate":o.conversionRate,"show-conversion-hint":o.showThresholdConversion,required:"",disabled:o.disabled,error:e.unref(M).threshold.$errors,label:e.unref(r)({defaultMessage:"When your balance falls below",description:"Label of the balance at which an automatic top-up is charged",id:"auto_topup_config.threshold.label"})},null,8,["modelValue","unit","model-base","entry-base","currency","conversion-rate","show-conversion-hint","disabled","error","label"]),e.createVNode(z,{modelValue:h.value,"onUpdate:modelValue":a[2]||(a[2]=e=>h.value=e),name:"auto-top-up-amount",unit:v.value,"model-base":"AMOUNT","entry-base":m.value,currency:o.chargeCurrency,"credit-unit-name":o.creditUnitName,"conversion-rate":o.conversionRate,bounds:o.topUpBounds,"show-conversion-hint":"",required:"",disabled:o.disabled,error:e.unref(M).topUpAmount.$errors,label:e.unref(r)({defaultMessage:"Top-up with",description:"Label of the amount every automatic top-up adds",id:"auto_topup_config.amount.label"})},null,8,["modelValue","unit","entry-base","currency","credit-unit-name","conversion-rate","bounds","disabled","error","label"])],2)):e.createCommentVNode("",!0)]),_:1},8,["is-open"])]),_:1},8,["content-background","no-spacing","no-border"]))}}),K=e=>{const t=Date.parse(e??"");return Number.isFinite(t)?t:0};function G({paymentMethods:t,selectedPaymentMethodId:o,preferredPaymentMethodId:n}){const a=e.computed(()=>[...t.value??[]].sort((e,t)=>K(t.created_at)-K(e.created_at)));return e.watch(()=>[t.value,null==n?void 0:n.value,o.value],([e,t,n],i)=>{var l;const u=null==i?void 0:i[0],r=null==e?void 0:e.find(({id:e})=>!(null==u?void 0:u.some(t=>t.id===e)));if(r&&(null==u?void 0:u.length))return void(o.value=r.id);const d=t=>!!t&&!!(null==e?void 0:e.some(e=>e.id===t));d(n)||(o.value=d(t)?t:null==(l=(null==e?void 0:e.find(({is_default:e})=>e))??a.value[0])?void 0:l.id)},{immediate:!0}),{sortedPaymentMethods:a}}function Q(){const{$t:e,formatNumber:o}=t.useIntl(),n=n=>t.formatWalletBalanceValue(e,o,n);return{formatValue:n,formatOpenBalance:e=>n(null==e?void 0:e.wallet_balance.open_balance)}}const Z={class:"sv-top-up-form"},ee={class:"grid grid-cols-1 gap-4"},te={class:"grid grid-cols-1 gap-1"},oe={class:"sv-top-up-form__option-details"},ne={key:0},ae=e.defineComponent({__name:"TopUpModalForm",props:{topUpPricingItems:{type:null},paymentMethods:{type:Array},paymentMethodOptions:{type:Array},autoTopUpConfig:{type:Object}},emits:["add-payment-method","success","save-auto-top-up","failure"],setup(n,{expose:a,emit:u}){const d=n,s=u,{$t:c}=t.useIntl(),{formatValue:p}=Q(),m=e.ref({pricing_plan_schedule_id:"",pricing_items:[],start_at:"",finalize_immediately:!1,payment_method_id:void 0,preview:!0}),v=e.computed(()=>{const e=(d.topUpPricingItems??[]).filter(e=>e.flexiblePricing||e.fixedPricing);return[...e.filter(({flexiblePricing:e})=>e),...e.filter(({flexiblePricing:e})=>!e)]}),f=e=>v.value.find(t=>t.pricingItemId===e),h=e.computed(()=>{var e,t;return null==(t=null==(e=d.topUpPricingItems)?void 0:e.find(e=>e.pricingPlanScheduleId))?void 0:t.pricingPlanScheduleId});e.watch(h,e=>{m.value.pricing_plan_schedule_id=e??""},{immediate:!0});const _=e.computed({get:()=>{var e;return null==(e=m.value.pricing_items[0])?void 0:e.pricing_item_id},set:e=>{const t=f("string"==typeof e?e:void 0);if(!t)return void(m.value.pricing_items=[]);const o=(e=>{const{config:t,currency:o}=e.flexiblePricing??{},n=null==t?void 0:t.minimum_amount;return n&&o?{quantity:n.quantity,currency:o}:void 0})(t);m.value.pricing_items=[{pricing_item_id:t.pricingItemId,...o&&{flexible_amount:o}}]}});e.watch(v,e=>{if(e.some(({pricingItemId:e})=>{var t;return e===(null==(t=m.value.pricing_items[0])?void 0:t.pricing_item_id)}))return;const t=e.find(({flexiblePricing:e})=>e)??e[0];_.value=null==t?void 0:t.pricingItemId},{immediate:!0});const g=e.computed({get:()=>{var e;return null==(e=m.value.pricing_items[0])?void 0:e.flexible_amount},set:e=>{var t;const o=null==(t=m.value.pricing_items[0])?void 0:t.pricing_item_id;o&&(m.value.pricing_items=[{pricing_item_id:o,...e&&{flexible_amount:e}}])}}),y=e=>{var o;const n=null==(o=f(String(e)))?void 0:o.fixedPricing;return(null==n?void 0:n.value.credits)?t.formatAmount(n.amount):void 0},x=e.computed(()=>{var e;return null==(e=f(String(_.value)))?void 0:e.flexiblePricing}),M=e.computed({get:()=>{var e;return(null==(e=g.value)?void 0:e.quantity)??""},set:e=>{var t;const o=null==(t=x.value)?void 0:t.currency;g.value=e&&o?{quantity:e,currency:o}:void 0}}),B=e=>e.creditsConfiguration?"CREDITS":"AMOUNT",P=e.computed(()=>C(d.topUpPricingItems)),T=e=>{var t;const o=null==(t=f(String(e)))?void 0:t.flexiblePricing;return o?[o]:[]},k=e=>{var t;return!!(null==(t=f(String(e)))?void 0:t.flexiblePricing)},N=e.computed(()=>v.value.map(e=>{var t;return{value:e.pricingItemId,label:e.fixedPricing?p(e.fixedPricing.value):c({defaultMessage:"Choose your own amount",description:"Label of the choose-your-amount option in the top-up modal",id:"topup_modal.flexible_option.label"}),...(null==(t=e.flexiblePricing)?void 0:t.bounds.minimum)&&e.flexiblePricing.bounds.maximum&&{description:c({defaultMessage:"Between {minimum} and {maximum}",description:"Bounds of the choose-your-amount option in the top-up modal",id:"topup_modal.flexible_option.bounds"},{minimum:p(e.flexiblePricing.bounds.minimum),maximum:p(e.flexiblePricing.bounds.maximum)})}}})),V=e.computed(()=>{const e=m.value.pricing_items.filter(e=>{var t;return!(null==(t=f(e.pricing_item_id))?void 0:t.flexiblePricing)||!!e.flexible_amount});return e.length>0?e:void 0}),E=e.computed(()=>!d.autoTopUpConfig&&v.value.some(({flexiblePricing:e})=>e)?S(d.topUpPricingItems):void 0),U=e.ref(),{chargeOnDemandPricingItems:A}=l.createInvoicesService(),O=o.useLogger(),$=e.ref(!1),D=e.computed(()=>!!m.value.pricing_plan_schedule_id&&!!V.value&&!!m.value.payment_method_id),q=e.reactive({paymentMethodId:e.computed(()=>m.value.payment_method_id??null)}),R=t.useValidation({paymentMethodId:{required:i.common.withMessage(()=>c({defaultMessage:"Select a payment method to pay for this top-up.",description:"Error shown under the payment methods in the top-up modal when none is selected on submit",id:"topup_modal.payment_method_required"}),i.required)}},q),L=e.computed(()=>{const[e]=m.value.pricing_items,t=f(null==e?void 0:e.pricing_item_id);return t?((e,t)=>{var o;if(e.fixedPricing)return e.fixedPricing.value;if(!e.flexiblePricing||!t)return;const{bounds:n,creditsConfiguration:a}=e.flexiblePricing,i=null==(o=n.minimum??n.maximum)?void 0:o.credits,l=a?w(t.quantity,a.conversionRate):void 0;return i&&void 0!==l?b(l,i):{amount:t}})(t,null==e?void 0:e.flexible_amount):void 0});a({submit:async function(){var e,t,o;R.value.$touch();const n=null==(e=U.value)?void 0:e.validate();if(!R.value.$invalid&&!(null==(t=U.value)?void 0:t.isInvalid)&&D.value&&!$.value){$.value=!0;try{const e=await A({pricing_plan_schedule_id:m.value.pricing_plan_schedule_id,pricing_items:V.value??[],payment_method_id:m.value.payment_method_id,preview:!1});n&&(null==(o=U.value)?void 0:o.hasChanges)&&m.value.payment_method_id&&s("save-auto-top-up",{rule:n,paymentMethodId:m.value.payment_method_id}),s("success",e)}catch(a){O.error("TOP_UP_FAILED","Failed to charge the wallet top-up",{},a),s("failure",a)}finally{$.value=!1}}},isCharging:$,canSubmit:D,chargedValue:L});const F=e.computed({get:()=>m.value.payment_method_id??void 0,set:e=>{m.value.payment_method_id=e}}),{sortedPaymentMethods:j}=G({paymentMethods:e.computed(()=>d.paymentMethods),selectedPaymentMethodId:F});return(o,a)=>(e.openBlock(),e.createElementBlock("form",Z,[e.createElementVNode("div",ee,[e.createElementVNode("div",te,[N.value.length>0?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$10),{key:0,modelValue:_.value,"onUpdate:modelValue":a[3]||(a[3]=e=>_.value=e),class:"sv-top-up-form__options",name:"top-up-pricing-item",direction:"column",required:"",disabled:$.value,options:N.value,"show-radio":!1,label:e.unref(c)({defaultMessage:"Top up amount",description:"Label above the list of ways to top up the wallet in the top-up modal",id:"topup_modal.pricing_items.label"})},{label:e.withCtx(({option:o,optionValue:n})=>[e.createElementVNode("span",null,e.toDisplayString(o.label),1),y(n)?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:0,tag:"span",variant:"body-sm",shade:"lighter",weight:"normal","no-spacing":"",class:"sv-top-up-form__option-cost"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y(n)),1)]),_:2},1024)):e.createCommentVNode("",!0)]),description:e.withCtx(({option:o,optionValue:n})=>[e.createElementVNode("div",oe,[o.description&&!k(n)?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:0,tag:"span",variant:"body-xs",shade:"lighter","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.description),1)]),_:2},1024)):e.createCommentVNode("",!0),T(n).length>0?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$32),{key:1,"is-open":String(n)===_.value,lazy:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T(n),n=>{var i,l;return e.openBlock(),e.createElementBlock("div",{key:n.currency,class:"sv-top-up-form__amount grid grid-cols-1 gap-3",onClick:a[1]||(a[1]=e.withModifiers(()=>{},["stop"])),onKeydown:a[2]||(a[2]=e.withModifiers(()=>{},["stop"]))},[o.description?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:0,tag:"span",variant:"body-xs",shade:"lighter","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.description),1)]),_:2},1024)):e.createCommentVNode("",!0),e.createVNode(z,{modelValue:M.value,"onUpdate:modelValue":a[0]||(a[0]=e=>M.value=e),name:"top-up-amount","model-base":"AMOUNT",unit:(l=n,l.creditsConfiguration?P.value??l.creditsConfiguration.unitNamePlural??l.creditsConfiguration.unitNameSingle??"":l.currency),"entry-base":B(n),currency:n.currency,"conversion-rate":null==(i=n.creditsConfiguration)?void 0:i.conversionRate,required:"",disabled:$.value},null,8,["modelValue","unit","entry-base","currency","conversion-rate","disabled"])],32)}),128))]),_:2},1032,["is-open"])):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","disabled","options","label"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",null,[e.createVNode(I,{"pricing-plan-schedule-id":h.value,"pricing-items":V.value},null,8,["pricing-plan-schedule-id","pricing-items"])]),E.value?(e.openBlock(),e.createElementBlock("div",ne,[e.createVNode(J,e.mergeProps({ref_key:"autoTopUpFormRef",ref:U,class:"sv-top-up-form__auto-top-up"},E.value,{contained:"","show-threshold-conversion":!1,disabled:$.value}),null,16,["disabled"])])):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.createVNode(e.unref(t._sfc_main$27),{spacing:"xs"})]),e.createElementVNode("div",null,[e.renderSlot(o.$slots,"payment-method",{},()=>[e.createVNode(r._sfc_main,{modelValue:F.value,"onUpdate:modelValue":a[4]||(a[4]=e=>F.value=e),class:"sv-top-up-form__payment-methods","payment-methods":e.unref(j),required:"",error:e.unref(R).paymentMethodId.$errors,"payment-method-options":n.paymentMethodOptions,disabled:$.value,label:e.unref(c)({defaultMessage:"Payment method",description:"Label above the payment method that pays for the top-up, in the top-up modal",id:"topup_modal.payment_method_selector.label"}),onAddPaymentMethod:a[5]||(a[5]=e=>s("add-payment-method"))},null,8,["modelValue","payment-methods","error","payment-method-options","disabled","label"])])])])]))}}),ie={class:"sv-top-up-success grid grid-cols-1 gap-4"},le=e.defineComponent({__name:"TopUpModalSuccess",props:{addedValue:{type:Object},invoice:{type:Object}},setup(o){const{$t:n}=t.useIntl();return(a,i)=>(e.openBlock(),e.createElementBlock("div",ie,[o.invoice?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$2),{key:0,"content-background":"none"},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$1),{tag:"span",variant:"body-sm",weight:"semibold",class:"mb-2 block"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"Receipt",description:"Heading above the invoice a completed top-up produced",id:"topup_modal.success.receipt.heading"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$29),{invoice:o.invoice,"is-customer-facing":""},null,8,["invoice"])]),_:1})):e.createCommentVNode("",!0)]))}});function ue({isOpen:o,customer:n}){const{paymentMethodOptions:a,get:i,isPending:l}=s.usePaymentMethodOptions();e.watch(()=>[o.value,n.value],([e,o])=>{e&&o&&i({customerId:o.id,country:t.getCustomerCountry(o)})},{immediate:!0});const u=e.computed(()=>l.value?void 0:a.value);return{paymentMethodOptions:a,settledOptions:u,isPending:l}}const re=["inert"],de=e.defineComponent({__name:"SlidingPanes",props:{panes:{type:Array},current:{type:String}},setup(t){const o=t,n=e.ref(!1);let a;e.watch(()=>o.current,()=>{n.value=!0,clearTimeout(a),a=setTimeout(()=>{n.value=!1},300)}),e.onBeforeUnmount(()=>{clearTimeout(a)});const i=e.ref({}),l={},u=e=>l[e]??(l[e]=t=>{i.value[e]=t instanceof HTMLElement?t:void 0}),r=function(t){const o=e.ref(0),n=e=>{o.value=(null==e?void 0:e.offsetHeight)??0},a="undefined"==typeof ResizeObserver?void 0:new ResizeObserver(e=>{var t;const o=null==(t=e[0])?void 0:t.target;n(o instanceof HTMLElement?o:void 0)});return e.watch(t,(e,t)=>{t&&(null==a||a.unobserve(t)),n(e),e&&(null==a||a.observe(e))},{immediate:!0,flush:"post"}),e.onBeforeUnmount(()=>{null==a||a.disconnect()}),o}(e.computed(()=>i.value[o.current])),d=e.computed(()=>{const e=o.panes.indexOf(o.current);return e>0?`translateX(calc(${-e} * (100% + 1rem)))`:"translateX(0px)"});return(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["sv-sliding-panes__viewport relative -mx-2 overflow-hidden px-2",n.value?"transition-[height] duration-300 ease-in-out motion-reduce:transition-none":""]),style:e.normalizeStyle(e.unref(r)?{height:`${e.unref(r)}px`}:void 0)},[e.createElementVNode("div",{class:"sv-sliding-panes__track flex items-start gap-4 transition-transform duration-300 ease-in-out motion-reduce:transition-none",style:e.normalizeStyle({transform:d.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.panes,n=>(e.openBlock(),e.createElementBlock("div",{key:n,class:"sv-sliding-panes__pane w-full shrink-0",inert:n!==t.current||void 0},[e.createElementVNode("div",{ref_for:!0,ref:u(n)},[e.renderSlot(o.$slots,n)],512)],8,re))),128))],4)],6))}}),se=e=>{var t;return((null==(t=null==e?void 0:e.wallet)?void 0:t.auto_top_up_configs)??[]).find(({status:e})=>"ACTIVE"===e)},ce=e=>e?{status:e.status,threshold:e.threshold,...e.topup_amount&&{topup_amount:e.topup_amount}}:void 0,pe=(e,t=[])=>{if((null==e?void 0:e.pricing_item_id)&&e.pricing_plan_schedule_id)return{pricingItemId:e.pricing_item_id,pricingPlanScheduleId:e.pricing_plan_schedule_id};const o=t.find(({flexiblePricing:e,pricingPlanScheduleId:t})=>e&&t);return(null==o?void 0:o.pricingPlanScheduleId)?{pricingItemId:o.pricingItemId,pricingPlanScheduleId:o.pricingPlanScheduleId}:void 0},me=({rule:e,walletBalanceItem:t,chargeTarget:o,paymentMethodId:n})=>{var a,i;const l=!!((null==(a=null==e?void 0:e.threshold)?void 0:a.amount)??(null==(i=null==e?void 0:e.threshold)?void 0:i.credits));if(e&&l&&(null==t?void 0:t.wallet_id)&&o&&n)return{wallet_id:t.wallet_id,status:e.status,threshold:e.threshold,pricing_plan_schedule_id:o.pricingPlanScheduleId,pricing_item_id:o.pricingItemId,payment_method_id:n,...e.topup_amount&&{topup_amount:e.topup_amount}}};function ve({step:t,name:o,returnTo:n}){const a=e.ref();return{paneRef:a,isActive:e.computed(()=>t.value===o),isSaving:e.computed(()=>{var e;return!!(null==(e=a.value)?void 0:e.isSaving)}),open:()=>{t.value=o},leave:()=>{t.value=n},submit:()=>{var e;return null==(e=a.value)?void 0:e.submit()}}}function fe(){const e=o.createRequestService(),t=o.useConfig(),n="/portal/auto-top-up-configs";return{getAutoTopUpConfigs:function(o){return e({url:`${t.apiUrls.config}${n}`,query:{...o},isCollection:!0})},getAutoTopUpConfig:function(o){return e({url:`${t.apiUrls.config}${n}/${o}`})},createAutoTopUpConfig:function(o){return e({url:`${t.apiUrls.config}${n}`,options:{method:"POST"},data:o})},deactivateAutoTopUpConfig:function(o){return e({url:`${t.apiUrls.config}${n}/${o}/deactivate`,options:{method:"POST"}})}}}function he(){const{createAutoTopUpConfig:t}=fe(),n=o.useLogger(),a=e.ref(!1);return{save:async e=>{if(!e||a.value)return{saved:!1};a.value=!0;try{return await t(e),{saved:!0}}catch(o){return n.error("AUTO_TOP_UP_SAVE_FAILED","Failed to save the automatic top-up rule",{},o),{saved:!1,error:o}}finally{a.value=!1}},isSaving:a}}const _e={class:"grid grid-cols-1 gap-4 pb-4"},ge={key:0,class:"mb-4"},ye={class:"sr-only"},be={class:"flex flex-col gap-2"},we=e.defineComponent({__name:"TopUpModal",props:{showModal:{type:Boolean},selectedBalanceItem:{type:Object},paymentMethods:{type:Array},customer:{type:Object},subscriptions:{type:Array}},emits:["confirm","close","auto-top-up-saved","payment-success","payment-failed"],setup(o,{emit:n}){const a=o,i=n,{$t:l}=t.useIntl(),{formatOpenBalance:u}=Q(),s=e.computed(()=>ce(se(a.selectedBalanceItem))),c=e.computed(()=>u(a.selectedBalanceItem)),h=e.computed(()=>v(a.selectedBalanceItem,a.subscriptions??[])),_=e.ref();e.watch(h,e=>{var t;e.some(({id:e})=>e===_.value)||(_.value=null==(t=e[0])?void 0:t.id)},{immediate:!0});const g=e.computed(()=>h.value.length>1),y=e.computed(()=>h.value.map(({id:e,name:t})=>({value:e,label:t}))),b=e.computed(()=>Object.fromEntries(h.value.flatMap(({id:e,enabledPricingIds:t})=>{const o=(a.subscriptions??[]).find(({id:t})=>t===e);return o?[[e,{subscription:o,enabledPricingIds:t}]]:[]}))),w=e.computed(()=>{var e;if(!a.selectedBalanceItem||!(null==(e=a.subscriptions)?void 0:e.length))return a.selectedBalanceItem;const t=h.value.find(({id:e})=>e===_.value);return t?((e,t)=>{if(!e||0===t.length)return e;const o=new Set(t);return{...e,charge_on_demand_pricing_items:(e.charge_on_demand_pricing_items??[]).filter(e=>m(e)&&!!e.pricing_plan_schedule_id&&o.has(e.pricing_plan_schedule_id))}})(a.selectedBalanceItem,t.scheduleIds):{...a.selectedBalanceItem,charge_on_demand_pricing_items:[]}}),x=e.computed(()=>f(w.value)),{paymentMethodOptions:M,settledOptions:C,isPending:B}=ue({isOpen:e.computed(()=>a.showModal),customer:e.computed(()=>a.customer)}),P=e.ref("TOP_UP"),S=e.computed(()=>(a.paymentMethods??[]).length>0),T=e.computed(()=>!B.value&&0===(M.value??[]).length),I=e.computed(()=>"TOP_UP"===P.value&&!S.value&&T.value),k=e.ref(),N=e.ref(),V=()=>{$(),i("payment-success")},{paneRef:E,isActive:U,isSaving:A,open:O,leave:$,submit:D}=ve({step:P,name:"ADD_PAYMENT_METHOD",returnTo:"TOP_UP"}),{save:q}=he(),R=e.ref(),L=e.computed(()=>{var e;return null==(e=R.value)?void 0:e.chargedValue}),F=e.computed(()=>{var e;return A.value||!!(null==(e=R.value)?void 0:e.isCharging)}),{title:j,subTitle:Y,cancelButtonText:H,confirmButtonText:z}=function({step:o,currentBalance:n,topUpValue:a}){const{$t:i,formatNumber:l}=t.useIntl();return{title:e.computed(()=>"ADD_PAYMENT_METHOD"===o.value?i({defaultMessage:"Add payment method",description:"Title of the top-up modal while the customer is adding a payment method",id:"topup_modal.add_payment_method.title"}):"SUCCESS"===o.value?i({defaultMessage:"Top-up complete",description:"Title of the top-up modal once the top-up has been charged",id:"topup_modal.success.modal_title"}):i({defaultMessage:"Top up balance",description:"Title of the wallet top-up modal",id:"topup_modal.title"})),subTitle:e.computed(()=>"ADD_PAYMENT_METHOD"===o.value?i({defaultMessage:"Add a new payment method for topping up your balance.",description:"Subtitle of the top-up modal while the customer is adding a payment method",id:"topup_modal.add_payment_method.subtitle"}):"SUCCESS"===o.value?i({defaultMessage:"Your payment went through.",description:"Subtitle of the top-up modal once the top-up has been charged",id:"topup_modal.success.modal_subtitle"}):i({defaultMessage:"Your current balance is {balance}.",description:"Subtitle of the top-up modal showing the current wallet balance",id:"topup_modal.subtitle"},{balance:n.value})),cancelButtonText:e.computed(()=>"ADD_PAYMENT_METHOD"===o.value?i({defaultMessage:"Back",description:"Label of the button that leaves the add payment method step in the top-up modal",id:"topup_modal.back_button.label"}):i({defaultMessage:"Cancel",description:"Label of the button that closes the top-up modal",id:"topup_modal.cancel_button.label"})),confirmButtonText:e.computed(()=>"ADD_PAYMENT_METHOD"===o.value?i({defaultMessage:"Save payment method",description:"Label of the confirm button in the top-up modal while adding a payment method",id:"topup_modal.save_payment_method.label"}):"SUCCESS"===o.value?i({defaultMessage:"Done",description:"Label of the button that dismisses the top-up modal once the top-up has been charged",id:"topup_modal.done_button.label"}):a.value?i({defaultMessage:"Top up balance with {value}",description:"Label of the confirm button in the top-up modal once an amount is entered",id:"topup_modal.confirm_button.label"},{value:t.formatWalletBalanceValue(i,l,a.value)}):i({defaultMessage:"Top up balance",description:"Label of the confirm button in the top-up modal while no amount is entered",id:"topup_modal.confirm_button.empty.label"}))}}({step:P,currentBalance:c,topUpValue:L}),W=()=>{var e;U.value?D():null==(e=R.value)||e.submit()},X=async({rule:e,paymentMethodId:t})=>{const{saved:o}=await q(me({rule:e,walletBalanceItem:a.selectedBalanceItem,chargeTarget:pe(void 0,x.value),paymentMethodId:t}));o&&i("auto-top-up-saved")},J=e=>{var t;k.value=e,N.value=null==(t=R.value)?void 0:t.chargedValue,P.value="SUCCESS"},K=()=>{i("confirm"),i("close")},G=()=>{F.value||(U.value?$():"SUCCESS"!==P.value?i("close"):K())},Z=e.ref(0);return e.watch(()=>a.showModal,e=>{e&&(P.value="TOP_UP",k.value=void 0,N.value=void 0,Z.value+=1)}),(n,a)=>(e.openBlock(),e.createBlock(e.unref(t.Modal),{"no-click-away":"","show-modal":o.showModal,size:"lg",title:e.unref(j),"sub-title":e.unref(Y),"cancel-button-text":e.unref(H),"confirm-button-text":e.unref(z),"is-loading":F.value,onConfirm:W,onClose:G},e.createSlots({body:e.withCtx(()=>[e.createElementVNode("div",_e,[e.createVNode(de,{panes:e.unref(p),current:P.value},{TOP_UP:e.withCtx(()=>[g.value?(e.openBlock(),e.createElementBlock("div",ge,[e.createVNode(e.unref(t._sfc_main$10),{modelValue:_.value,"onUpdate:modelValue":a[0]||(a[0]=e=>_.value=e),class:"sv-topup-modal__subscription",name:"top-up-subscription",direction:"column",required:"",options:y.value,"show-radio":!1,label:e.unref(l)({defaultMessage:"Subscription to top up",description:"Label above the list of subscriptions a top-up can be charged against, in the top-up modal",id:"topup_modal.subscriptions.label"})},{prefix:e.withCtx(({optionValue:t})=>[b.value[String(t)]?(e.openBlock(),e.createBlock(d._sfc_main,{key:0,class:"sv-topup-modal__subscription-option grow","no-spacing":"",subscription:b.value[String(t)].subscription,"enabled-pricing-ids":b.value[String(t)].enabledPricingIds},null,8,["subscription","enabled-pricing-ids"])):e.createCommentVNode("",!0)]),label:e.withCtx(({option:t})=>[e.createElementVNode("span",ye,e.toDisplayString(t.label),1)]),_:1},8,["modelValue","options","label"])])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(ae,{key:Z.value,ref_key:"topUpFormRef",ref:R,"top-up-pricing-items":x.value,"payment-methods":o.paymentMethods,"auto-top-up-config":s.value,"payment-method-options":e.unref(C),onAddPaymentMethod:e.unref(O),onSuccess:J,onSaveAutoTopUp:X},null,8,["top-up-pricing-items","payment-methods","auto-top-up-config","payment-method-options","onAddPaymentMethod"]))]),ADD_PAYMENT_METHOD:e.withCtx(()=>[e.createVNode(r._sfc_main$1,{ref_key:"addPaymentMethodRef",ref:E,customer:o.customer,"payment-method-options":e.unref(M),"is-loading":e.unref(B),"is-active":e.unref(U),onSuccess:V,onFailure:a[1]||(a[1]=e=>n.$emit("payment-failed",e))},null,8,["customer","payment-method-options","is-loading","is-active"])]),SUCCESS:e.withCtx(()=>[k.value?(e.openBlock(),e.createBlock(le,{key:0,"added-value":N.value,invoice:k.value},null,8,["added-value","invoice"])):e.createCommentVNode("",!0)]),_:1},8,["panes","current"])])]),_:2},["SUCCESS"===P.value||I.value?{name:"footer",fn:e.withCtx(()=>[e.createElementVNode("div",be,["SUCCESS"===P.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$6),{key:0,size:"lg","data-testid":"done",onClick:K},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(z)),1)]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(e.unref(t._sfc_main$6),{size:"lg",disabled:"","data-testid":"confirm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(z)),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$6),{size:"lg",color:"gray",variant:"ghost","data-testid":"cancel",onClick:G},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(H)),1)]),_:1})],64))])]),key:"0"}:void 0]),1032,["show-modal","title","sub-title","cancel-button-text","confirm-button-text","is-loading"]))}}),xe=["AUTO_TOP_UP","ADD_PAYMENT_METHOD"],Me={class:"grid grid-cols-1 gap-4 pb-4"},Ce={class:"grid grid-cols-1 gap-4"},Be=e.defineComponent({__name:"AutoTopUpModal",props:{showModal:{type:Boolean},walletBalanceItem:{type:Object},topUpItem:{type:Object},paymentMethods:{type:Array},customer:{type:Object}},emits:["saved","close","payment-success","payment-failed"],setup(o,{emit:n}){const a=o,l=n,{$t:u}=t.useIntl(),{formatOpenBalance:d}=Q(),s=e.ref("AUTO_TOP_UP"),c=e.computed(()=>d(a.walletBalanceItem)),p=e.computed(()=>f(a.walletBalanceItem)),m=e.computed(()=>S(p.value)),v=e.computed(()=>se(a.walletBalanceItem)),h=e.computed(()=>ce(v.value)),_=e.computed(()=>pe(a.topUpItem,p.value)),g=e.ref(),y=e.computed(()=>{var e,t;const o=null==(t=null==(e=g.value)?void 0:e.rule)?void 0:t.topup_amount;return(null==o?void 0:o.quantity)&&_.value?[{pricing_item_id:_.value.pricingItemId,flexible_amount:o}]:void 0}),b=e.computed(()=>{var e;return null==(e=_.value)?void 0:e.pricingPlanScheduleId}),w=e.ref(),{sortedPaymentMethods:x}=G({paymentMethods:e.computed(()=>a.paymentMethods),selectedPaymentMethodId:w,preferredPaymentMethodId:e.computed(()=>{var e;return null==(e=v.value)?void 0:e.payment_method_id})}),{paymentMethodOptions:M,settledOptions:C,isPending:B}=ue({isOpen:e.computed(()=>a.showModal),customer:e.computed(()=>a.customer)}),{paneRef:P,isActive:T,isSaving:k,open:N,leave:V,submit:E}=ve({step:s,name:"ADD_PAYMENT_METHOD",returnTo:"AUTO_TOP_UP"}),{save:U,isSaving:A}=he(),O=e.computed(()=>k.value||A.value),$=e.reactive({paymentMethodId:e.computed(()=>w.value??null)}),D=t.useValidation({paymentMethodId:{required:i.common.withMessage(()=>u({defaultMessage:"Select a payment method to pay for automatic top-ups.",description:"Error shown in the auto top-up modal when no payment method is selected",id:"auto_topup_modal.payment_method.required"}),i.required)}},$),q=e.computed(()=>"ADD_PAYMENT_METHOD"===s.value?u({defaultMessage:"Add payment method",description:"Title of the auto top-up modal while the customer is adding a payment method",id:"auto_topup_modal.add_payment_method.title"}):u({defaultMessage:"Automatic top-up",description:"Title of the automatic wallet top-up modal",id:"auto_topup_modal.title"})),R=e.computed(()=>"ADD_PAYMENT_METHOD"===s.value?u({defaultMessage:"This method pays for every automatic top-up.",description:"Subtitle of the auto top-up modal while the customer is adding a payment method",id:"auto_topup_modal.add_payment_method.subtitle"}):u({defaultMessage:"Your current balance is {balance}. Enable auto top so you can stay productive",description:"Subtitle of the automatic wallet top-up modal, naming the balance",id:"auto_topup_modal.subtitle"},{balance:c.value})),L=e.computed(()=>"ADD_PAYMENT_METHOD"===s.value?u({defaultMessage:"Back",description:"Button returning from adding a payment method to the auto top-up rule",id:"auto_topup_modal.add_payment_method.cancel"}):u({defaultMessage:"Cancel",description:"Button dismissing the auto top-up modal",id:"auto_topup_modal.cancel"})),F=e.computed(()=>"ADD_PAYMENT_METHOD"===s.value?u({defaultMessage:"Add payment method",description:"Button storing the payment method being added in the auto top-up modal",id:"auto_topup_modal.add_payment_method.confirm"}):u({defaultMessage:"Save",description:"Button saving the automatic top-up rule",id:"auto_topup_modal.confirm"}));const j=()=>{T.value?E():async function(){var e;if(D.value.$touch(),O.value)return;const{saved:t,error:o}=await U(me({rule:null==(e=g.value)?void 0:e.validate(),walletBalanceItem:a.walletBalanceItem,chargeTarget:_.value,paymentMethodId:w.value}));if(t)return l("saved"),void l("close");o&&l("payment-failed",o)}()},Y=()=>{V(),l("payment-success")},H=()=>{O.value||(T.value?V():l("close"))},z=e.ref(0);return e.watch(()=>a.showModal,e=>{e&&(s.value="AUTO_TOP_UP",w.value=void 0,z.value+=1)}),(n,a)=>(e.openBlock(),e.createBlock(e.unref(t.Modal),{"no-click-away":"","show-modal":o.showModal,size:"lg",title:q.value,"sub-title":R.value,"cancel-button-text":L.value,"confirm-button-text":F.value,"is-loading":O.value,onConfirm:j,onClose:H},{body:e.withCtx(()=>[e.createElementVNode("div",Me,[e.createVNode(de,{panes:e.unref(xe),current:s.value},{AUTO_TOP_UP:e.withCtx(()=>[e.createElementVNode("div",Ce,[m.value?(e.openBlock(),e.createBlock(J,e.mergeProps({key:z.value,ref_key:"autoTopUpFormRef",ref:g,class:"sv-auto-topup-modal__rule"},m.value,{config:h.value,"always-enabled":"",disabled:O.value}),null,16,["config","disabled"])):e.createCommentVNode("",!0),e.createVNode(I,{"pricing-plan-schedule-id":b.value,"pricing-items":y.value},null,8,["pricing-plan-schedule-id","pricing-items"]),e.createVNode(r._sfc_main,{modelValue:w.value,"onUpdate:modelValue":a[0]||(a[0]=e=>w.value=e),class:"sv-auto-topup-modal__payment-method","payment-methods":e.unref(x),"payment-method-options":e.unref(C),disabled:O.value,error:e.unref(D).paymentMethodId.$errors,label:e.unref(u)({defaultMessage:"Pay automatic top-ups with",description:"Label above the payment method an automatic top-up is charged to",id:"auto_topup_modal.payment_method.label"}),onAddPaymentMethod:e.unref(N)},null,8,["modelValue","payment-methods","payment-method-options","disabled","error","label","onAddPaymentMethod"])])]),ADD_PAYMENT_METHOD:e.withCtx(()=>[e.createVNode(r._sfc_main$1,{ref_key:"addPaymentMethodRef",ref:P,customer:o.customer,"payment-method-options":e.unref(M),"is-loading":e.unref(B),"is-active":e.unref(T),onSuccess:Y,onFailure:a[1]||(a[1]=e=>n.$emit("payment-failed",e))},null,8,["customer","payment-method-options","is-loading","is-active"])]),_:1},8,["panes","current"])])]),_:1},8,["show-modal","title","sub-title","cancel-button-text","confirm-button-text","is-loading"]))}}),Pe={class:"sv-auto-topup-cancellation-modal sv-auto-topup-cancellation-modal__body flex flex-col gap-3"},Se=e.defineComponent({__name:"AutoTopUpCancellationModal",props:{showModal:{type:Boolean},config:{type:Object}},emits:["confirmed","close"],setup(n,{emit:a}){const i=n,l=a,{$t:u}=t.useIntl(),r=o.useLogger(),{formatValue:d}=Q(),{deactivateAutoTopUpConfig:s}=fe(),c=e.ref(!1),p=e.ref(!1);e.watch(()=>i.showModal,e=>{e&&(p.value=!1)});const m=e.computed(()=>{var e,t;const o=null==(e=i.config)?void 0:e.threshold,n=null==(t=i.config)?void 0:t.topup_amount;return(null==o?void 0:o.amount)||(null==o?void 0:o.credits)?n?u({defaultMessage:"Your balance will no longer be topped up with {amount} when it falls below {threshold}. You can still top up whenever you want to.",description:"Explanation in the modal that turns a wallet automatic top-up off, naming what it charged and when",id:"auto_topup_cancellation_modal.explanation_with_amount"},{amount:d({amount:n}),threshold:d(o)}):u({defaultMessage:"Your balance will no longer be topped up automatically when it falls below {threshold}. You can still top up whenever you want to.",description:"Explanation in the modal that turns a wallet automatic top-up off, naming the threshold",id:"auto_topup_cancellation_modal.explanation_with_threshold"},{threshold:d(o)}):u({defaultMessage:"Your balance will no longer be topped up automatically. You can still top up whenever you want to.",description:"Explanation in the modal that turns a wallet automatic top-up off",id:"auto_topup_cancellation_modal.explanation"})}),v=async()=>{var e;const t=null==(e=i.config)?void 0:e.id;if(t&&!c.value){c.value=!0,p.value=!1;try{await s(t),l("confirmed"),l("close")}catch(o){r.error("AUTO_TOP_UP_CANCELLATION_FAILED","Failed to turn off a wallet's automatic top-up",{},o),p.value=!0}finally{c.value=!1}}},f=()=>{c.value||l("close")};return(o,a)=>(e.openBlock(),e.createBlock(e.unref(t.Modal),{size:"sm","show-modal":n.showModal,"is-loading":c.value,"no-click-away":c.value,"no-backdrop-close":c.value,title:e.unref(u)({defaultMessage:"Turn off automatic top-up",description:"Title of the modal that turns a wallet automatic top-up off",id:"auto_topup_cancellation_modal.title"}),"confirm-button-text":e.unref(u)({defaultMessage:"Yes, turn it off",description:"Button confirming that a wallet automatic top-up is turned off",id:"auto_topup_cancellation_modal.confirm"}),"cancel-button-text":e.unref(u)({defaultMessage:"Cancel",description:"Button dismissing the modal that turns a wallet automatic top-up off",id:"auto_topup_cancellation_modal.cancel"}),onConfirm:v,onClose:f},{body:e.withCtx(()=>[e.createElementVNode("div",Pe,[e.createVNode(e.unref(t._sfc_main$1),{variant:"body-sm",shade:"lighter",tag:"p",class:"sv-auto-topup-cancellation-modal__explanation"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.value),1)]),_:1}),p.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$16),{key:0,class:"sv-auto-topup-cancellation-modal__error sv-error",title:e.unref(u)({defaultMessage:"Could not turn off the automatic top-up. Please try again later.",description:"Error shown when turning a wallet automatic top-up off failed",id:"auto_topup_cancellation_modal.failed"})},null,8,["title"])):e.createCommentVNode("",!0)])]),_:1},8,["show-modal","is-loading","no-click-away","no-backdrop-close","title","confirm-button-text","cancel-button-text"]))}}),Te=e.defineComponent({inheritAttrs:!1,__name:"CustomerWalletBalances",props:{hasError:{type:Boolean},isLoading:{type:Boolean},walletBalances:{type:Array},showTopUpButton:{type:Boolean},customer:{type:Object},paymentMethods:{type:Array},subscriptions:{type:Array}},emits:["top-up-charged","auto-top-up-saved","auto-top-up-cancelled","payment-method-stored","payment-failed"],setup(o,{emit:n}){const i=o,l=n,{$t:u}=t.useIntl(),r=e.ref(),d=e.computed(()=>c(i.walletBalances,r.value)),s=e.computed(()=>!!d.value),p=e.ref(),m=e.computed(()=>!!p.value),v=e.computed(()=>c(i.walletBalances,p.value)),f=e.ref(),h=e.computed(()=>!!f.value);return(n,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[o.isLoading?(e.openBlock(),e.createBlock(a._sfc_main,e.mergeProps({key:0,variant:"section"},n.$attrs,{class:"sv-wallet-balances sv-root sv-component sv-loading min-h-48","data-testid":"customer-wallet-balances-skeleton"}),null,16)):o.hasError?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$16),e.mergeProps({key:1},n.$attrs,{class:"sv-wallet-balances sv-root sv-component sv-error",title:e.unref(u)({defaultMessage:"Could not load wallet balances",description:"Error shown when wallet balances fail to load",id:"wallet_balance.load_failed"})}),null,16,["title"])):o.walletBalances.length>0?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$33),e.mergeProps({key:2},n.$attrs,{class:"sv-wallet-balances sv-root sv-component","customer-wallet-balances":o.walletBalances,"show-auto-top-up":"","show-manual-top-up":"",title:e.unref(u)({defaultMessage:"{count, plural, one {Wallet} other {Wallets}}",description:"Title for the wallets block on the customer overview page",id:"customer_overview.wallet_balances_block.title"},{count:String(o.walletBalances.length)}),onTopUp:i[0]||(i[0]=e=>r.value=e),onAutoTopUp:i[1]||(i[1]=e=>p.value=e),onCancelAutoTopUp:i[2]||(i[2]=e=>f.value=e)}),null,16,["customer-wallet-balances","title"])):e.createCommentVNode("",!0),o.showTopUpButton?(e.openBlock(),e.createBlock(we,{key:3,"show-modal":s.value,"selected-balance-item":d.value,"payment-methods":o.paymentMethods,customer:o.customer,subscriptions:o.subscriptions,onClose:i[3]||(i[3]=e=>r.value=void 0),onConfirm:i[4]||(i[4]=e=>l("top-up-charged")),onPaymentSuccess:i[5]||(i[5]=e=>l("payment-method-stored")),onPaymentFailed:i[6]||(i[6]=e=>l("payment-failed",e))},null,8,["show-modal","selected-balance-item","payment-methods","customer","subscriptions"])):e.createCommentVNode("",!0),o.showTopUpButton?(e.openBlock(),e.createBlock(Be,{key:4,"show-modal":m.value,"wallet-balance-item":v.value,"top-up-item":p.value,"payment-methods":o.paymentMethods,customer:o.customer,onClose:i[7]||(i[7]=e=>p.value=void 0),onSaved:i[8]||(i[8]=e=>l("auto-top-up-saved")),onPaymentSuccess:i[9]||(i[9]=e=>l("payment-method-stored")),onPaymentFailed:i[10]||(i[10]=e=>l("payment-failed",e))},null,8,["show-modal","wallet-balance-item","top-up-item","payment-methods","customer"])):e.createCommentVNode("",!0),o.showTopUpButton?(e.openBlock(),e.createBlock(Se,{key:5,"show-modal":h.value,config:f.value,onClose:i[11]||(i[11]=e=>f.value=void 0),onConfirmed:i[12]||(i[12]=e=>l("auto-top-up-cancelled"))},null,8,["show-modal","config"])):e.createCommentVNode("",!0)],64))}});exports._sfc_main=Te,exports.useCustomerWalletBalances=function({customerId:a}){const{getCustomerWalletBalances:i}=function(){const e=o.createRequestService(),n=o.useConfig();return{getCustomerWalletBalances:function(a){const i=t.withExpand({expandParams:o.EXPAND_ALL});return e({url:`${n.apiUrls.config}/portal/customers/${a}/wallets/balance${t.serializeQueryParams(i)}`,options:{method:"POST"},data:{}})}}}(),{data:l,execute:u,apiStatus:r,error:d,isPending:s}=n.useService({service:()=>i(a)});return{walletBalances:e.computed(()=>l.value??null),apiStatus:r,error:d,fetch:u,isPending:s}};
@@ -1,53 +0,0 @@
1
- import { defineComponent, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, renderSlot } from "vue";
2
- import { b as _sfc_main$1, c as _sfc_main$2, a as _sfc_main$3 } from "./vendor-ui-ItGf7wJV.mjs";
3
- const _hoisted_1 = { class: "sv-empty-state__body flex flex-col items-center justify-center py-2" };
4
- const _sfc_main = /* @__PURE__ */ defineComponent({
5
- __name: "EmptyStatePlaceholder",
6
- props: {
7
- icon: { type: null }
8
- },
9
- setup(__props) {
10
- return (_ctx, _cache) => {
11
- return openBlock(), createBlock(unref(_sfc_main$1), { class: "sv-empty-state" }, {
12
- default: withCtx(() => [
13
- createElementVNode("div", _hoisted_1, [
14
- createVNode(unref(_sfc_main$2), {
15
- icon: __props.icon,
16
- size: "md",
17
- class: "sv-empty-state__icon text-gray-500"
18
- }, null, 8, ["icon"]),
19
- createVNode(unref(_sfc_main$3), {
20
- center: "",
21
- tag: "span",
22
- variant: "body-xs",
23
- weight: "semibold",
24
- shade: "lighter",
25
- class: "sv-empty-state__title mt-1"
26
- }, {
27
- default: withCtx(() => [
28
- renderSlot(_ctx.$slots, "title")
29
- ]),
30
- _: 3
31
- }),
32
- createVNode(unref(_sfc_main$3), {
33
- center: "",
34
- tag: "span",
35
- variant: "body-xs",
36
- shade: "lightest",
37
- class: "sv-empty-state__message mt-1"
38
- }, {
39
- default: withCtx(() => [
40
- renderSlot(_ctx.$slots, "message")
41
- ]),
42
- _: 3
43
- })
44
- ])
45
- ]),
46
- _: 3
47
- });
48
- };
49
- }
50
- });
51
- export {
52
- _sfc_main as _
53
- };
@@ -1 +0,0 @@
1
- const e=require("vue"),t=require("./vendor-ui-Dfh3_g4q.js"),s={class:"sv-empty-state__body flex flex-col items-center justify-center py-2"},a=e.defineComponent({__name:"EmptyStatePlaceholder",props:{icon:{type:null}},setup:a=>(n,c)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$2),{class:"sv-empty-state"},{default:e.withCtx(()=>[e.createElementVNode("div",s,[e.createVNode(e.unref(t._sfc_main$3),{icon:a.icon,size:"md",class:"sv-empty-state__icon text-gray-500"},null,8,["icon"]),e.createVNode(e.unref(t._sfc_main$1),{center:"",tag:"span",variant:"body-xs",weight:"semibold",shade:"lighter",class:"sv-empty-state__title mt-1"},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"title")]),_:3}),e.createVNode(e.unref(t._sfc_main$1),{center:"",tag:"span",variant:"body-xs",shade:"lightest",class:"sv-empty-state__message mt-1"},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"message")]),_:3})])]),_:3}))});exports._sfc_main=a;
@@ -1 +0,0 @@
1
- const e=require("vue"),i=require("./vendor-ui-Dfh3_g4q.js"),t={key:0,class:"sv-invoice-details__body flex flex-col gap-2"},o={class:"sv-invoice-details__row"},a={class:"sv-invoice-details__row"},n=e.defineComponent({__name:"InvoiceDetailsBlock",props:{invoice:{type:Object}},setup(n){const{$t:c,formatDate:s}=i.useIntl();return(d,l)=>(e.openBlock(),e.createBlock(e.unref(i._sfc_main$2),{class:"sv-invoice-details",title:e.unref(c)({defaultMessage:"Invoice details",description:"Title for the invoice details block on the invoice overview page",id:"sdk.invoice_details.invoice_details_block.title"})},{default:e.withCtx(()=>[n.invoice?(e.openBlock(),e.createElementBlock("div",t,[e.createElementVNode("div",o,[e.createVNode(e.unref(i._sfc_main$1),{variant:"caps-heading",class:"sv-invoice-details__label"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)({defaultMessage:"Invoice date",description:"Title for the invoice date in invoice details block on the invoice overview page",id:"sdk.invoice_details.invoice_details_block.invoice_date"})),1)]),_:1}),n.invoice.invoice_date?(e.openBlock(),e.createBlock(e.unref(i._sfc_main$1),{key:0,variant:"body-xs",class:"sv-invoice-details__value"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({date:n.invoice.invoice_date,format:"date",timezone:n.invoice.customer.timezone,offsetType:"offsetted"})),1)]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",a,[e.createVNode(e.unref(i._sfc_main$1),{variant:"caps-heading",class:"sv-invoice-details__label"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)({defaultMessage:"Due date",description:"Title for the due date in invoice details block on the invoice overview page",id:"sdk.invoice_details.invoice_details_block.due_date"})),1)]),_:1}),n.invoice.due_date?(e.openBlock(),e.createBlock(e.unref(i._sfc_main$1),{key:0,variant:"body-xs",class:"sv-invoice-details__value"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({date:n.invoice.due_date,format:"date",timezone:n.invoice.customer.timezone,offsetType:"offsetted"})),1)]),_:1})):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]),_:1},8,["title"]))}});exports._sfc_main=n;
@@ -1 +0,0 @@
1
- const e=require("vue"),o=require("./vendor-ui-Dfh3_g4q.js"),n=e.defineComponent({__name:"InvoiceHeader",props:{isLoading:{type:Boolean},invoice:{type:Object},payments:{type:Array},invoiceDownloadService:{type:Function},configuration:{type:Object}},setup:n=>(i,t)=>(e.openBlock(),e.createBlock(e.unref(o._sfc_main$4),{class:"sv-invoice-header sv-root sv-component","payment-attempts":n.payments??[],invoice:n.invoice,"download-service":()=>n.invoiceDownloadService(n.invoice.id),"show-download-button":n.configuration.enableDownloadButton,variant:"external"},null,8,["payment-attempts","invoice","download-service","show-download-button"]))});exports._sfc_main=n;
@@ -1,27 +0,0 @@
1
- import { defineComponent, openBlock, createBlock, unref } from "vue";
2
- import { e as _sfc_main$1 } from "./vendor-ui-ItGf7wJV.mjs";
3
- const _sfc_main = /* @__PURE__ */ defineComponent({
4
- __name: "InvoiceHeader",
5
- props: {
6
- isLoading: { type: Boolean },
7
- invoice: { type: Object },
8
- payments: { type: Array },
9
- invoiceDownloadService: { type: Function },
10
- configuration: { type: Object }
11
- },
12
- setup(__props) {
13
- return (_ctx, _cache) => {
14
- return openBlock(), createBlock(unref(_sfc_main$1), {
15
- class: "sv-invoice-header sv-root sv-component",
16
- "payment-attempts": __props.payments ?? [],
17
- invoice: __props.invoice,
18
- "download-service": () => __props.invoiceDownloadService(__props.invoice.id),
19
- "show-download-button": __props.configuration.enableDownloadButton,
20
- variant: "external"
21
- }, null, 8, ["payment-attempts", "invoice", "download-service", "show-download-button"]);
22
- };
23
- }
24
- });
25
- export {
26
- _sfc_main as _
27
- };
@@ -1 +0,0 @@
1
- const e=require("vue"),t=require("./vendor-ui-Dfh3_g4q.js"),a=require("./PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-D6lpD1zo.js"),n=e.defineComponent({__name:"PaymentCompletedCard",props:{amount:{type:Object},variant:{type:String}},setup(n){const i=n,{$t:s}=t.useIntl(),o=e.computed(()=>"AUTHORIZE"===i.variant?s({defaultMessage:"Payment successful",description:"The title for when a payment has been successful",id:"payment_completed_card.title.authorize"}):s({defaultMessage:"Your payment method is added",description:"The title for when a payment method was successfully added",id:"payment_completed_card.title.tokenize"}));return(i,r)=>(e.openBlock(),e.createBlock(a._sfc_main,{status:"success",title:o.value},{default:e.withCtx(()=>[n.amount?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:0,variant:"body-sm",class:"mt-1"},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$3),{icon:"check"}),e.createTextVNode(e.toDisplayString(e.unref(t.formatAmount)(n.amount)),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(t._sfc_main$1),{variant:"body-xs",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"You are being redirected...",description:"The text shown after a successful message before a redirect",id:"payment_completed_card.redirect_message"})),1)]),_:1})]),_:1},8,["title"]))}}),i={UNKNOWN_ERROR:{title:"Something went wrong",message:"An unknown error has occurred",isReloadButtonVisible:!0},AUTHORIZATION_FAILED:{title:"Payment failed",message:"The payment failed"},PAYMENT_DETAILS_CALL_FAILED:{title:"Payment details call failed",message:"There was a problem getting the payment details"},PAYMENT_METHOD_STORAGE_FAILED:{title:"Failed storing payment method",message:"Something went wrong with storing the payment method"},REDIRECT_RESULT_PAYMENT_ACCEPTOR_MISSING:{title:"Missing payment acceptor",message:"A redirect result is set, but a payment acceptor is missing in the url"},TOKENIZE_FAILED:{title:"Tokenization failed",message:"The tokenization of the payment method has failed"},PAYMENT_INTEGRATION_INITIALIZATION_FAILED:{title:"Failed loading payment methods",message:"Failed loading payment integration",isReloadButtonVisible:!0},RESOURCE_REVOKED:{title:"Resource revoked",message:"The resource has been revoked",isReloadButtonVisible:!0}},s={class:"flex flex-col items-center gap-6"},o=e.defineComponent({__name:"PaymentErrorCard",props:{error:{type:Object}},setup(n){const o=n,{$t:r}=t.useIntl(),l=e.computed(()=>i[o.error.code]),d=()=>{window.location.reload()};return(n,i)=>(e.openBlock(),e.createBlock(a._sfc_main,{status:"error",title:l.value.title},{default:e.withCtx(()=>[e.createElementVNode("div",s,[e.createVNode(e.unref(t._sfc_main$1),{variant:"body-xs",shade:"lighter",class:"mt-3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value.message),1)]),_:1}),l.value.isReloadButtonVisible?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$6),{key:0,type:"button",color:"gray",variant:"outline",onClick:d},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Try again",description:"Retry button text when an error has happened during a payment",id:"payments.retry_button.label"})),1)]),_:1})):e.createCommentVNode("",!0)])]),_:1},8,["title"]))}});exports._sfc_main=n,exports._sfc_main$1=o;
@@ -1 +0,0 @@
1
- const e=require("vue"),t=require("./vendor-ui-Dfh3_g4q.js"),s={class:"flex flex-col items-center py-10"},a=e.defineComponent({__name:"PaymentFeedbackCard",props:{status:{default:"success",type:String},title:{type:String}},setup:a=>(r,c)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$2),null,{default:e.withCtx(()=>[e.createElementVNode("div",s,[e.createVNode(e.unref(t._sfc_main$3),{icon:"success"===a.status?"check_circle":"error",class:e.normalizeClass({"text-green-400":"success"===a.status,"text-red-600":"error"===a.status}),size:"lg"},null,8,["icon","class"]),e.createVNode(e.unref(t._sfc_main$1),{variant:"heading-3",tag:"span",class:"mt-2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.title),1)]),_:1}),r.$slots.default?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:0,tag:"div",variant:"body-sm"},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default")]),_:3})):e.createCommentVNode("",!0)])]),_:3}))});exports._sfc_main=a;
@@ -1 +0,0 @@
1
- const e=require("vue"),t=require("./vendor-ui-Dfh3_g4q.js"),a={class:"sv-payment-history"},n={class:"sv-payment-history__items flex flex-col-reverse gap-1"},s={class:"sv-payment-history__item-header mb-2 flex items-center justify-between"},r=e.defineComponent({__name:"PaymentHistoryBlock",props:{paymentAttempts:{type:Array},customer:{type:Object}},setup(r){const{$t:o,formatDate:i}=t.useIntl(),m={AUTHORIZED:"green",CANCELLED:"red",ERROR:"red",PENDING:"orange",PENDING_REFUND:"orange",REFUNDED:"orange",CHARGED_BACK:"orange",REFUSED:"red"};return(c,l)=>(e.openBlock(),e.createElementBlock("div",a,[e.createVNode(e.unref(t._sfc_main$1),{tag:"h2",variant:"heading-3",class:"sv-payment-history__title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Payment history",description:"Title for the payment history block on the invoice details page",id:"sdk.invoice_details.payment_history.title"})),1)]),_:1}),e.createElementVNode("div",n,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.paymentAttempts,a=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$2),{key:a.id,class:"sv-payment-history__item mt-1 md:mt-2"},{default:e.withCtx(()=>[e.createElementVNode("div",s,[e.createVNode(e.unref(t._sfc_main$1),{variant:"caps-heading",class:"sv-payment-history__item-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Payment attempt",description:"Title for the payment attempt block",id:"sdk.invoice_details.payment_history.payment_attempt"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$7),{class:"sv-payment-history__item-status",color:m[a.result]},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t.formatEnum)(a.result)),1)]),_:2},1032,["color"])]),a.payment_method_details?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$8),{key:0,class:"sv-payment-history__payment-method","payment-method":a.payment_method_details},{description:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({date:a.created_at,format:"dateTime",offsetType:"offsetted",timezone:r.customer.timezone})),1)]),_:2},1032,["payment-method"])):e.createCommentVNode("",!0)]),_:2},1024))),128))])]))}});exports._sfc_main=r;
@@ -1 +0,0 @@
1
- const e=require("vue"),t=require("./vendor-ui-Dfh3_g4q.js"),n=e=>{var t;return"ADYEN"===(null==(t=e.integration.payment_gateway)?void 0:t.variant)},o=e=>{var t;return"STRIPE"===(null==(t=e.integration.payment_gateway)?void 0:t.variant)},a=({selectedIntegration:e,paymentMethodOption:t})=>{var n,o;return e===(null==(o=null==(n=t.integration)?void 0:n.payment_gateway)?void 0:o.variant)},r=e.defineComponent({__name:"PaymentIntegrationForm",props:{customerId:{type:String},variant:{type:String},context:{type:Object},paymentMethodOptions:{type:Array},countryCode:{type:String},invoiceId:{type:String},amount:{type:Object},selectedOption:{type:String},email:{type:String},name:{type:String},validateOnSubmit:{type:Function},forceStorePaymentMethod:{type:Boolean}},emits:["select","payment-failed","payment-success","ready"],setup(r,{expose:i,emit:m}){const c=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./PaymentIntegrationFormStripe-Bnn8S1o5.js")).then(e=>e.default)),l=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./PaymentIntegrationFormAdyen-B-Jbu2hU.js")).then(e=>e.default)),d=r,u=m;i({submit:function(){var e,t;p.value||(f.value=!0,null==(e=d.validateOnSubmit)||e.call(d));null==(t=v.value.get(p.value))||t.submit()}});const{$t:y}=t.useIntl(),s=e.ref(),p=e.computed(()=>{var e,t;return s.value??(null==(t=null==(e=d.paymentMethodOptions[0])?void 0:e.integration.payment_gateway)?void 0:t.variant)}),v=e.ref(new Map),f=e.ref(!1),g=({paymentGatewayVariant:e,paymentMethodType:t})=>{f.value=!1,s.value=e,u("select",{paymentGatewayVariant:e,paymentMethodType:t})},h=e=>t=>{var n;return v.value.set(null==(n=e.integration.payment_gateway)?void 0:n.variant,t)};return(i,m)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.paymentMethodOptions,t=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:t.integration.id},[e.unref(n)(t)?(e.openBlock(),e.createBlock(e.unref(l),{key:0,ref_for:!0,ref:h(t),context:r.context,"payment-method-option-response-entry":t,"country-code":r.countryCode,"customer-id":r.customerId,variant:r.variant,amount:r.amount,"invoice-id":r.invoiceId,selected:e.unref(a)({selectedIntegration:p.value,paymentMethodOption:t}),"validate-on-submit":r.validateOnSubmit,"force-store-payment-method":r.forceStorePaymentMethod,onSelect:g,onPaymentFailed:m[0]||(m[0]=e=>i.$emit("payment-failed",e)),onPaymentSuccess:m[1]||(m[1]=e=>i.$emit("payment-success")),onReady:m[2]||(m[2]=e=>i.$emit("ready"))},null,8,["context","payment-method-option-response-entry","country-code","customer-id","variant","amount","invoice-id","selected","validate-on-submit","force-store-payment-method"])):e.unref(o)(t)?(e.openBlock(),e.createBlock(e.unref(c),{key:1,ref_for:!0,ref:h(t),context:r.context,"payment-method-option-response-entry":t,"country-code":r.countryCode,"customer-id":r.customerId,variant:r.variant,amount:r.amount,"invoice-id":r.invoiceId,selected:e.unref(a)({selectedIntegration:p.value,paymentMethodOption:t}),email:r.email,name:r.name,"validate-on-submit":r.validateOnSubmit,"force-store-payment-method":r.forceStorePaymentMethod,onSelect:g,onPaymentFailed:m[3]||(m[3]=e=>i.$emit("payment-failed",e)),onPaymentSuccess:m[4]||(m[4]=e=>i.$emit("payment-success")),onReady:m[5]||(m[5]=e=>i.$emit("ready"))},null,8,["context","payment-method-option-response-entry","country-code","customer-id","variant","amount","invoice-id","selected","email","name","validate-on-submit","force-store-payment-method"])):e.createCommentVNode("",!0)],64))),128)),f.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$9),{key:0,variant:"error",class:"mt-2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(y)({defaultMessage:"Select a payment method",id:"payment_integration_form.select_payment_method_error",description:"Error shown when no payment method is selected"})),1)]),_:1})):e.createCommentVNode("",!0)],64))}});exports._sfc_main=r;
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("./vendor-ui-Dfh3_g4q.js"),n=require("./PaymentErrorCard.vue_vue_type_script_setup_true_lang-CNKxTtO7.js"),a=require("./payments-DVZFO5yb.js"),o=require("./adyen-BMDZQBUG.js"),r=require("./paymentMethods-DVDC_WfL.js"),i=require("./component-DIy1hvJM.js"),d=e=>{let t={};return"TOKENIZE"===e&&(t={"en-US":{payButton:"Add payment method",confirmPurchase:"Add payment method"},"fr-FR":{payButton:"Ajouter un moyen de paiement",confirmPurchase:"Ajouter un moyen de paiement"},"de-DE":{payButton:"Zahlungsmethode hinzufügen",confirmPurchase:"Zahlungsmethode hinzufügen"},"it-IT":{payButton:"Aggiungi metodo di pagamento",confirmPurchase:"Aggiungi metodo di pagamento"},"es-ES":{payButton:"Añadir método de pago",confirmPurchase:"Añadir método de pago"},"nl-NL":{payButton:"Betaalmethode toevoegen",confirmPurchase:"Betaalmethode toevoegen"},"pt-BR":{payButton:"Adicionar método de pagamento",confirmPurchase:"Adicionar método de pagamento"},"pt-PT":{payButton:"Adicionar método de pagamento",confirmPurchase:"Adicionar método de pagamento"},"pl-PL":{payButton:"Dodaj metodę płatności",confirmPurchase:"Dodaj metodę płatności"},"ru-RU":{payButton:"Добавить способ оплаты",confirmPurchase:"Добавить способ оплаты"},"sv-SE":{payButton:"Lägg till betalningsmetod",confirmPurchase:"Lägg till betalningsmetod"},"da-DK":{payButton:"Tilføj betalingsmetode",confirmPurchase:"Tilføj betalingsmetode"},"fi-FI":{payButton:"Lisää maksutapa",confirmPurchase:"Lisää maksutapa"},"no-NO":{payButton:"Legg til betalingsmetode",confirmPurchase:"Legg til betalingsmetode"},"cs-CZ":{payButton:"Přidat platební metodu",confirmPurchase:"Přidat platební metodu"},"hu-HU":{payButton:"Fizetési mód hozzáadása",confirmPurchase:"Fizetési mód hozzáadása"},"ro-RO":{payButton:"Adăugați metodă de plată",confirmPurchase:"Adăugați metodă de plată"},"ja-JP":{payButton:"支払い方法を追加",confirmPurchase:"支払い方法を追加"},"ko-KR":{payButton:"결제 수단 추가",confirmPurchase:"결제 수단 추가"},"zh-CN":{payButton:"添加支付方式",confirmPurchase:"添加支付方式"},"zh-TW":{payButton:"新增付款方式",confirmPurchase:"新增付款方式"},ar:{payButton:"إضافة وسيلة دفع",confirmPurchase:"إضافة وسيلة دفع"},"hr-HR":{payButton:"Dodajte način plačanja",confirmPurchase:"Dodajte način plačanja"},"el-GR":{payButton:"Προσθήκη μεθόδου πληρωμής",confirmPurchase:"Προσθήκη μεθόδου πληρωμής"},"sk-SK":{payButton:"Pridať spôsob platby",confirmPurchase:"Pridať spôsob platby"},"sl-SI":{payButton:"Dodajte način plačanja",confirmPurchase:"Dodajte način plačanja"},"bg-BG":{payButton:"Добавяне на начин на плащане",confirmPurchase:"Добавяне на начин на плащане"},"ca-ES":{payButton:"Afegir mètode de pagament",confirmPurchase:"Afegir mètode de pagament"},"et-EE":{payButton:"Lisa makseviis",confirmPurchase:"Lisa makseviis"},"lv-LV":{payButton:"Pievienot maksājuma veidu",confirmPurchase:"Pievienot maksājuma veidu"},"lt-LT":{payButton:"Pridėti mokėjimo metodą",confirmPurchase:"Pridėti mokėjimo metodą"}}),t},c=["applepay"];const s="ADYEN",p=e.defineComponent({__name:"PaymentIntegrationFormAdyen",props:{countryCode:{type:String},customerId:{type:String},invoiceId:{type:String},paymentMethodOptionResponseEntry:{type:Object},variant:{type:String},selected:{type:Boolean},amount:{type:Object},validateOnSubmit:{type:Function,default:()=>Promise.resolve(!0)},context:{type:Object},forceStorePaymentMethod:{type:Boolean}},emits:["select","payment-failed","payment-success","ready"],setup(p,{expose:u,emit:m}){let y=null,l=null;const h=p,_=m;u({submit:function(){try{null==y||y.submit()}catch(e){A.error("ADYEN_SUBMIT_FAILED","Failed to submit Adyen drop-in",{},e)}}});const f=e.ref(),g=e.ref(!1),E=e.ref(),A=i.useLogger(),{locale:v}=t.useIntl(),{authorizePayment:R,getPaymentDetails:P}=a.createPaymentsService(),{tokenizePaymentMethod:I}=r.createPaymentMethodsService(),b=e.inject(i.EXPERIMENTAL_FEATURE_INJECTION_KEY);async function k(){var e;const t=o.toMinorUnitAmount(h.amount),n=(null==(e=null==b?void 0:b.value)?void 0:e["express-checkout"])?function(e){return e.filter(e=>!c.some(t=>{var n;return t===(null==(n=e.type)?void 0:n.toLowerCase())}))}(o.mapAdyenPaymentMethods(h.paymentMethodOptionResponseEntry)):o.mapAdyenPaymentMethods(h.paymentMethodOptionResponseEntry);return{checkoutConfig:{amount:t,clientKey:o.getAdyenClientKeyFromPaymentMethodOptionsResponse(h.paymentMethodOptionResponseEntry),environment:o.getAdyenEnvironmentFromPaymentMethodOptionsResponse(h.paymentMethodOptionResponseEntry,A),locale:v,translations:d(h.variant),countryCode:h.countryCode,analytics:{enabled:!1},paymentMethodsResponse:{paymentMethods:n},onSubmit:N,onAdditionalDetails:w,onPaymentCompleted:D,onPaymentFailed:C,onError:x,showPayButton:!1},dropInConfig:{disableFinalAnimation:!0,paymentMethodsConfiguration:{card:{hasHolderName:!0,holderNameRequired:!0,enableStoreDetails:!h.forceStorePaymentMethod&&"AUTHORIZE"===h.variant},paypal:{intent:t.value>0?"authorize":"tokenize",showPayButton:!0}},openFirstPaymentMethod:h.selected,onSelect:({props:{type:e}})=>{e&&_("select",{paymentMethodType:e,paymentGatewayVariant:"ADYEN"})},onReady:()=>_("ready")}}}async function O(){if(f.value)try{await T();const[e,{default:t}]=await Promise.all([Promise.resolve().then(()=>require("./index-DIFK3mcJ.js")),Promise.resolve().then(()=>require("./adyen-DZsyEXkw.js"))]),{AdyenCheckout:n,Dropin:a,Card:o,Bancontact:r,Ach:i,AmazonPay:d,ApplePay:c,BcmcMobile:s,BacsDirectDebit:p,CashAppPay:u,EPS:m,GooglePay:_,Klarna:g,PayByBank:E,PayPal:A,SepaDirectDebit:v,Trustly:R,Twint:P,PayByBankUS:I,Redirect:b}=e,{checkoutConfig:O,dropInConfig:N}=await k();l=await n(O),y=new a(l,{...N,paymentMethodComponents:[o,r,i,d,c,s,p,u,m,_,g,E,A,v,R,P,I,b]}).mount(f.value),function(e){var t;const n=null==(t=f.value)?void 0:t.getRootNode();if(n instanceof ShadowRoot){const t=document.createElement("style");t.textContent=e,n.appendChild(t);const a=document.createElement("style");a.textContent="\n :host {\n --adyen-sdk-color-background-secondary: transparent;\n --adyen-sdk-color-background-primary: rgb(243 244 246 / 0.5);\n --adyen-sdk-color-outline-secondary: #e5e7eb;\n --adyen-sdk-color-outline-primary: transparent;\n --adyen-sdk-color-background-always-dark: var(--color-primary-500);\n --adyen-sdk-color-background-inverse-primary-hover: var(--color-primary-600);\n }\n\n .adyen-checkout__payment-method__image__wrapper {\n width: 32px;\n height: 32px;\n }\n\n .adyen-checkout__payment-method__image {\n height: 32px;\n }\n\n .adyen-checkout__input-wrapper,\n .adyen-checkout__input {\n border-color: rgb(229, 231, 235);\n border-radius: var(--adyen-sdk-border-radius-s, 4px);\n }\n\n .adyen-checkout__button,\n .adyen-checkout__payment-method {\n border-radius: var(--adyen-sdk-border-radius-s, 4px);\n }\n\n .adyen-checkout__payment-method {\n border-color: rgb(229, 231, 235);\n box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);\n transition: box-shadow 0.2s ease-in-out;\n }\n\n .adyen-checkout__payment-method--selected {\n box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);\n }\n\n .adyen-checkout__payment-method:after {\n transform: scale(0%);\n }\n\n .adyen-checkout__paypal__button {\n display: block !important;\n }\n\n .adyen-checkout__payment-methods-list {\n gap: 4px;\n }\n\n .adyen-checkout__dropdown__list {\n background-color: white;\n border-radius: var(--adyen-sdk-border-radius-s, 4px);\n }\n\n .adyen-checkout__payment-method.adyen-checkout__payment-method--selected:after {\n content: '✓';\n width: 20px;\n height: 20px;\n border-radius: 10px;\n background-color: var(--color-primary-600);\n position: absolute;\n top: 14px;\n right: 14px;\n text-align: center;\n line-height: 20px;\n color: white;\n transform: scale(100%);\n font-size: 12px;\n }\n\n .adyen-checkout__payment-method__header {\n padding: 8px 16px !important;\n }\n\n .adyen-checkout__payment-method__brands {\n align-items: center;\n }\n .adyen-checkout__payment-method__brand-number {\n line-height: 1;\n }\n .adyen-checkout__button__text {\n font-size: 14px;\n }\n .adyen-checkout__store-details {\n background: transparent;\n padding: 0;\n }\n .adyen-checkout__checkbox__input + .adyen-checkout__checkbox__label:after {\n border-color: rgb(229, 231, 235);\n }\n ","AUTHORIZE"===h.variant&&(a.textContent+="\n .adyen-checkout__payment-method--cashapp .adyen-checkout-pm-details-wrapper {\n display: none;\n }\n "),n.appendChild(a)}}(t)}catch(e){A.error("PAYMENT_INTEGRATION_INITIALIZATION_FAILED","Failed to mount Adyen web drop-in",{error:e})}}async function T(){y&&(y.unmount(),y=null),f.value&&(f.value.innerHTML="")}function N(...e){const[t,n,a]=e;h.validateOnSubmit().then(e=>{if(!e)return;const n=h.paymentMethodOptionResponseEntry.payment_acceptor.id,r={risk_data:o.transformObjectToAdyenObject(t.data.riskData),payment_method:o.transformObjectToAdyenObject(t.data.paymentMethod),browser_info:o.transformObjectToAdyenObject(t.data.browserInfo)};if("AUTHORIZE"===h.variant){const e=o.createReturnUrl({paymentAcceptorId:h.paymentMethodOptionResponseEntry.payment_acceptor.id,redirectUrl:window.location.href});return void R({payment_acceptor_id:n,...h.customerId?{customer_id:h.customerId}:{},payment_gateway_variant:s,adyen:{...r,store_payment_method:h.forceStorePaymentMethod||t.data.storePaymentMethod},amount:h.amount,...h.context?{context:h.context}:{},return_url:e}).then(e=>{const o=t.data.paymentMethod.type;if("ACTION_REQUIRED"===e.status&&e.action.payment_gateway_variant===s){const t=B(e,o);return t?(y.handleAction(t),void a.resolve({resultCode:e.action.adyen.result_code,action:t})):void A.error("PAYMENT_AUTHORIZATION_FAILED",`Failed payment authorization for payment acceptor with id ${n}`,{error:e})}if("AUTHORIZED"===e.payment.result)return g.value=!0,void a.resolve({resultCode:"Authorised"});A.error("PAYMENT_AUTHORIZATION_FAILED",`Failed payment authorization for payment acceptor with id ${n}`,{error:e}),a.resolve({resultCode:"Error"})}).catch(e=>{A.error("PAYMENT_AUTHORIZATION_FAILED",`Failed payment authorization for payment acceptor with id ${n}`,{error:e}),a.resolve({resultCode:"Error"})})}if("TOKENIZE"===h.variant){const e=o.createReturnUrl({paymentAcceptorId:h.paymentMethodOptionResponseEntry.payment_acceptor.id,redirectUrl:window.location.href});if(!h.customerId)return void A.error("TOKENIZATION_FAILED",`Missing customer id for payment acceptor with id ${n}`);I({customer_id:h.customerId,payment_acceptor_id:n,payment_gateway_variant:s,adyen:r,return_url:e}).then(e=>{const o=t.data.paymentMethod.type;if("ACTION_REQUIRED"===e.status&&e.action.payment_gateway_variant===s){const t=B(e,o);return t?(y.handleAction(t),void a.resolve({resultCode:e.action.adyen.result_code,action:t})):void A.error("TOKENIZATION_FAILED",`Tokenization failed for payment acceptor with id ${n}`,{error:e})}if("AUTHORIZED"===e.payment.result)return g.value=!0,void a.resolve({resultCode:"Authorised"});A.error("TOKENIZATION_FAILED",`Tokenization failed for payment acceptor with id ${n}`,{error:e}),a.resolve({resultCode:"Error"})}).catch(e=>{A.error("TOKENIZATION_FAILED",`Tokenization failed for payment acceptor with id ${n}`,{error:e}),a.resolve({resultCode:"Error"})})}}).catch(e=>{A.error("INTEGRATION_ERROR","Unhandled error in payment submission flow",{},e)})}function B(e,t){if("ACTION_REQUIRED"!==e.status)return;const n=e.action;if("ADYEN"!=n.payment_gateway_variant)return;const a=n.adyen;return{paymentMethodType:(null==a?void 0:a.payment_method_type)??t,method:n.method,url:n.url,data:n.data,type:null==a?void 0:a.action_type,paymentData:null==a?void 0:a.payment_data,sdkData:null==a?void 0:a.sdk_data}}function w(...e){const[t]=e,n=t.data.details,a=t.data.paymentData;if(h.paymentMethodOptionResponseEntry.payment_acceptor.id)return void M({detailsResult:n?(o=n,Object.fromEntries(Object.entries(o).filter(([,e])=>null!=e))):void 0,paymentDataResult:a,paymentAcceptorId:h.paymentMethodOptionResponseEntry.payment_acceptor.id});var o;const r={code:"UNKNOWN_ERROR",message:"Payment failed",error:e};_("payment-failed",r),E.value=r}function C(...e){const[t]=e,n={code:"UNKNOWN_ERROR",message:"Payment failed",error:t};_("payment-failed",n),E.value=n}function D(...e){const[,t]=e;null==t||t.unmount(),_("payment-success")}function x(...e){const[t,n]=e;if("CANCEL"===t.name)return;const a={code:"UNKNOWN_ERROR",message:"Something went wrong",error:t};A.error("INTEGRATION_ERROR","Something went wrong",{error:t}),E.value=a,null==n||n.unmount()}function M({detailsResult:e,threeDSResult:t,redirectResult:n,paymentDataResult:a,paymentAcceptorId:o}){P({paymentAcceptorId:o,paymentGatewayVariant:s,adyen:{...e?{details:e}:{},...n?{redirect_result:n}:{},...t?{threeds_result:t}:{},...a?{payment_data:a}:{}}}).then(e=>{"FAILURE"!==e.payment_status?"SUCCESS"!==e.payment_status||_("payment-success"):_("payment-failed",{code:"UNKNOWN_ERROR",message:"Failed getting payment details",error:e})}).catch(e=>{A.error("PAYMENT_DETAILS_CALL_FAILED","Failed fetching payment details",{error:e})})}return e.onMounted(()=>{O(),function(){const e=o.getQueryParam(o.REDIRECT_RESULT_QUERY_STRING),t=o.getQueryParam(o.PAYMENT_ACCEPTOR_ID_QUERY_STRING);e&&(t?M({paymentAcceptorId:t,detailsResult:{redirectResult:decodeURI(e)}}):A.error("INVALID_REDIRECT_RESULT","Redirect result is set but payment acceptor id is missing",{context:{redirectResult:e}}))}()}),e.onBeforeUnmount(()=>{T()}),e.watch(()=>h.paymentMethodOptionResponseEntry,(e,n)=>{t.isEqual(e,n)||O()},{deep:!0}),(t,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[g.value?(e.openBlock(),e.createBlock(n._sfc_main,{key:0,variant:p.variant},null,8,["variant"])):E.value?(e.openBlock(),e.createBlock(n._sfc_main$1,{key:1,error:E.value},null,8,["error"])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"dropInContainerRef",ref:f},null,512)],64))}});exports.default=p;