@solvimon/solvimon-web 0.1.0-alpha.24 → 0.1.0-alpha.26

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 (286) hide show
  1. package/README.md +14 -11
  2. package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DW10rozs.mjs → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DcrLNA_x.mjs} +6 -6
  3. package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-jWthTJk-.js → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DwbIiJBY.js} +1 -1
  4. package/dist/{Avatar.vue.es-nr8srGuK.js → Avatar.vue.es-Bm6MCMAL.js} +1 -1
  5. package/dist/{Avatar.vue.es-DzjFvLuK.mjs → Avatar.vue.es-BqQHvLGA.mjs} +1 -1
  6. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-C1prOJay.js → BillingInformation.vue_vue_type_script_setup_true_lang-0JHnqIpC.js} +1 -1
  7. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BptcwJMr.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-BFza7Nf9.mjs} +8 -8
  8. package/dist/{Button.vue.es-PbJFK8z7.mjs → Button.vue.es-C32_baQN.mjs} +1 -1
  9. package/dist/{Button.vue.es-TCF-bvDF.js → Button.vue.es-qGvnOKnK.js} +1 -1
  10. package/dist/ChargeOnDemandModal-CIiI74ls.mjs +983 -0
  11. package/dist/ChargeOnDemandModal-DIQaGnRs.js +1 -0
  12. package/dist/Checkout.entry.ce-8EcavNgT.js +2 -0
  13. package/dist/{Checkout.entry.ce-DHFx5Vnb.mjs → Checkout.entry.ce-BA5ljKj8.mjs} +1562 -1538
  14. package/dist/{Chip.vue.es-DpcOM3Ai.mjs → Chip.vue.es-CKCOY5T6.mjs} +2 -2
  15. package/dist/{Chip.vue.es-CAoisngJ.js → Chip.vue.es-D60gTbfe.js} +1 -1
  16. package/dist/{ContextMenu.vue.es-kzZ3JJHG.js → ContextMenu.vue.es-C7KI8Gz6.js} +1 -1
  17. package/dist/{ContextMenu.vue.es-tAuFp-6i.mjs → ContextMenu.vue.es-Da-lAmTl.mjs} +10 -10
  18. package/dist/{CustomerBillingInformation.vue.es-BQSl9q6W.mjs → CustomerBillingInformation.vue.es-BxBQt4Q0.mjs} +2 -2
  19. package/dist/{CustomerBillingInformation.vue.es-Nac6HgLo.js → CustomerBillingInformation.vue.es-bFUx81Ig.js} +1 -1
  20. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-R47ln7Wb.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BcTZgshS.mjs} +6 -6
  21. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BOLf-U0A.js → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-C0lJ_ESU.js} +1 -1
  22. package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-CaNXS48v.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DkbQ2MiR.mjs} +908 -891
  23. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-hBo2Y2mJ.js +1 -0
  24. package/dist/{DividerText.vue.es-LJ2kZakb.js → DividerText.vue.es-BF3gnr4e.js} +1 -1
  25. package/dist/{DividerText.vue.es-CSE7a-T0.mjs → DividerText.vue.es-DKl3FnDJ.mjs} +1 -1
  26. package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-DeotDsFP.mjs → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-C3QYra1x.mjs} +4 -4
  27. package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-GNPyrcAQ.js → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-cSQeqr0A.js} +1 -1
  28. package/dist/{ErrorNotification.vue.es-BF6swP7o.js → ErrorNotification.vue.es-BX9dHEc-.js} +1 -1
  29. package/dist/{ErrorNotification.vue.es-CVUuIt8Z.mjs → ErrorNotification.vue.es-rRKgmkzV.mjs} +1 -1
  30. package/dist/{IconButton.vue.es-CB1lIPao.js → IconButton.vue.es-Bwdfu-jm.js} +1 -1
  31. package/dist/{IconButton.vue.es-DGflbWFk.mjs → IconButton.vue.es-UlqwNPAX.mjs} +2 -2
  32. package/dist/{IconTitle.vue.es-BsdjyGlQ.mjs → IconTitle.vue.es-CK9k69tV.mjs} +3 -3
  33. package/dist/{IconTitle.vue.es-CMO8EyQl.js → IconTitle.vue.es-Cei98MBw.js} +1 -1
  34. package/dist/{Input.vue.es-CREdT4nB.js → Input.vue.es-B47l_feL.js} +1 -1
  35. package/dist/{Input.vue.es-BFbiFXsU.mjs → Input.vue.es-D9IjIWc-.mjs} +2 -2
  36. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BZ4D_-7E.js → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DKlPrxQS.js} +1 -1
  37. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Btv0rRk4.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DUfJl07Y.mjs} +2 -2
  38. package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-CrZq0d1M.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-D9Rtgapa.mjs} +2 -2
  39. package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-j-cNIRD_.js → InvoiceEntryView.vue_vue_type_script_setup_true_lang-DlJ6lELc.js} +1 -1
  40. package/dist/InvoiceSummary.vue.es-DBnR9Hs7.js +1 -0
  41. package/dist/{InvoiceSummary.vue.es-JtOIQ6SJ.mjs → InvoiceSummary.vue.es-DQ4KvTaw.mjs} +576 -565
  42. package/dist/{Modal.vue.es-BbdtdxsO.js → Modal.vue.es-8LN4gBh0.js} +1 -1
  43. package/dist/{Modal.vue.es-jT61xK_A.mjs → Modal.vue.es-B9xMiyn3.mjs} +5 -5
  44. package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-BBoZVnsK.js → PaymentErrorCard.vue_vue_type_script_setup_true_lang-B1yGKkWN.js} +1 -1
  45. package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-Dan29qmH.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-BVzL2PGe.mjs} +4 -4
  46. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-D34fD3Io.js → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DSGf6uFP.js} +1 -1
  47. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-BJZHkTqA.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-nLTPnH4j.mjs} +3 -3
  48. package/dist/{PaymentHistoryBlock-quvnCSFV.mjs → PaymentHistoryBlock-DYa99P1M.mjs} +1 -1
  49. package/dist/{PaymentHistoryBlock-Dw2wOiAI.js → PaymentHistoryBlock-Ds93gNvh.js} +1 -1
  50. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-C0XIdBbx.js → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CBZhXQfC.js} +1 -1
  51. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-5ckQd9eQ.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-D0KnSy0y.mjs} +4 -4
  52. package/dist/{PaymentIntegrationForm-D1oJREmH.js → PaymentIntegrationForm-B_Db4DG1.js} +1 -1
  53. package/dist/{PaymentIntegrationForm-CQjUZi22.mjs → PaymentIntegrationForm-UWoyZgsR.mjs} +1 -1
  54. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-C0J37ZVe.js +1 -0
  55. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-J15IDbMc.mjs +154 -0
  56. package/dist/{PaymentIntegrationFormAdyen-CyZk9ofV.mjs → PaymentIntegrationFormAdyen-D4qfNtZ_.mjs} +217 -197
  57. package/dist/PaymentIntegrationFormAdyen-HeA9XIj-.js +98 -0
  58. package/dist/{PaymentIntegrationFormStripe-D-GaLHwc.mjs → PaymentIntegrationFormStripe-BIiMCWlV.mjs} +247 -220
  59. package/dist/PaymentIntegrationFormStripe-DUCJTIAq.js +102 -0
  60. package/dist/PaymentMethod.vue.es-CJcSZ9lN.js +1 -0
  61. package/dist/{PaymentMethod.vue.es-C0j580g7.mjs → PaymentMethod.vue.es-CKu5nApX.mjs} +168 -148
  62. package/dist/{PaymentMethodForm-CDV5LR8i.js → PaymentMethodForm-1d0YIGOu.js} +1 -1
  63. package/dist/{PaymentMethodForm-Bf2Ps6eV.mjs → PaymentMethodForm-B05sHWcW.mjs} +1 -1
  64. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-BDm8l_6N.js +1 -0
  65. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-BqPu7CYA.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-D1yIYsb_.mjs} +45 -41
  66. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-BIX0k7-q.js → PaymentMethodsList.vue_vue_type_script_setup_true_lang-BE4S26JX.js} +1 -1
  67. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-9MUPbgWM.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-DGpXRtp4.mjs} +6 -6
  68. package/dist/PlanCustomizationEditor-CEMP_Dhz.js +1 -0
  69. package/dist/PlanCustomizationEditor-CpZeilm5.mjs +694 -0
  70. package/dist/{PricingGroupRangeInput.vue.es-CP7-dmxS.mjs → PricingGroupRangeInput.vue.es-CJpvUP3-.mjs} +4 -4
  71. package/dist/{PricingGroupRangeInput.vue.es-BchXhunH.js → PricingGroupRangeInput.vue.es-DZSJ5Mz0.js} +1 -1
  72. package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DJ81eUJX.mjs +141 -0
  73. package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-jrkraJMu.js +1 -0
  74. package/dist/{RadioGroupExtended.vue.es-_QMReyZ8.mjs → RadioGroupExtended.vue.es-BalV7gwp.mjs} +2 -2
  75. package/dist/{RadioGroupExtended.vue.es-Cf5R1P9a.js → RadioGroupExtended.vue.es-Dt6LH9Yh.js} +1 -1
  76. package/dist/{Section.vue.es-KRsHeFoT.mjs → Section.vue.es-D7eiXUbk.mjs} +1 -1
  77. package/dist/{Section.vue.es-CBZx5x53.js → Section.vue.es-zVXBHAL6.js} +1 -1
  78. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-UdGQMJGY.js → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BdjYFrVC.js} +1 -1
  79. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BVELHoUj.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DudMRVka.mjs} +6 -6
  80. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-D4sbq9nA.js +1 -0
  81. package/dist/{Skeleton.vue_vue_type_script_setup_true_lang-DRLoYWGY.mjs → Skeleton.vue_vue_type_script_setup_true_lang-D60YtA9z.mjs} +5 -5
  82. package/dist/StepInput.vue.es-C3Zm6Wc9.mjs +199 -0
  83. package/dist/StepInput.vue.es-mAnuCuDQ.js +1 -0
  84. package/dist/SubscriptionDetails.entry.ce-D4CsSoR9.js +1 -0
  85. package/dist/SubscriptionDetails.entry.ce-WEimiOex.mjs +1057 -0
  86. package/dist/{SubscriptionSchedules-1ikoGncQ.js → SubscriptionSchedules-Cm5Dt-1H.js} +1 -1
  87. package/dist/{SubscriptionSchedules-B6b6xf-E.mjs → SubscriptionSchedules-DrrEAPlx.mjs} +1 -1
  88. package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-Dv2bP9vv.mjs → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DHp_KtbF.mjs} +2284 -2341
  89. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-t2Awijf5.js +1 -0
  90. package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-DvYZvTV9.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-3VYfm6Hm.mjs} +3 -3
  91. package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-DZKl0Zxp.js → SubscriptionSummary.vue_vue_type_script_setup_true_lang-B41qZmcL.js} +1 -1
  92. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DTjZcOhj.js → SubscriptionsList.vue_vue_type_script_setup_true_lang-Bu-_clEa.js} +1 -1
  93. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DmeIKMYI.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-DFU0IULg.mjs} +8 -8
  94. package/dist/{TooltipParagraph.vue.es-nGFfHF1A.mjs → TooltipParagraph.vue.es-BXbOJmjr.mjs} +3 -3
  95. package/dist/TooltipParagraph.vue.es-Cph6zT31.js +1 -0
  96. package/dist/{TrialChip.vue.es-DhC5Bpmy.js → TrialChip.vue.es-C_wgHGuN.js} +1 -1
  97. package/dist/{TrialChip.vue.es-eKgO6an3.mjs → TrialChip.vue.es-C_yRujip.mjs} +2 -2
  98. package/dist/{cn.es-BD7Afj5Q.mjs → cn.es-CGa6b2Lt.mjs} +2 -2
  99. package/dist/{cn.es-BLE3T5Rx.js → cn.es-D9YMDvG2.js} +1 -1
  100. package/dist/components/BillingInformation/BillingInformation.cjs +1 -1
  101. package/dist/components/BillingInformation/BillingInformation.mjs +4 -4
  102. package/dist/components/BillingInformationForm/BillingInformationForm.cjs +1 -1
  103. package/dist/components/BillingInformationForm/BillingInformationForm.mjs +246 -230
  104. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs +1 -1
  105. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +4 -4
  106. package/dist/components/Invoice/Invoice.cjs +1 -1
  107. package/dist/components/Invoice/Invoice.mjs +201 -212
  108. package/dist/components/InvoiceDetails/InvoiceDetails.cjs +1 -1
  109. package/dist/components/InvoiceDetails/InvoiceDetails.mjs +4 -4
  110. package/dist/components/InvoiceHeader/InvoiceHeader.cjs +1 -1
  111. package/dist/components/InvoiceHeader/InvoiceHeader.mjs +2 -2
  112. package/dist/components/InvoicesList/InvoicesList.cjs +1 -1
  113. package/dist/components/InvoicesList/InvoicesList.mjs +3 -3
  114. package/dist/components/PaymentHistory/PaymentHistory.cjs +1 -1
  115. package/dist/components/PaymentHistory/PaymentHistory.mjs +4 -4
  116. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs +1 -1
  117. package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +5 -5
  118. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs +1 -1
  119. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +4 -4
  120. package/dist/components/SubscriptionsList/SubscriptionsList.cjs +1 -1
  121. package/dist/components/SubscriptionsList/SubscriptionsList.mjs +5 -5
  122. package/dist/components/WalletBalances/WalletBalances.cjs +1 -1
  123. package/dist/components/WalletBalances/WalletBalances.mjs +3 -3
  124. package/dist/{customElements-CSzbVZIH.js → customElements-C963-LtW.js} +36 -32
  125. package/dist/{customElements-DT1YyL4O.mjs → customElements-D5DAoHRI.mjs} +231 -196
  126. package/dist/{customer-Cq4fF__H.mjs → customer-DKa1B2vp.mjs} +4 -4
  127. package/dist/{customer-CJonIvSm.js → customer-TE1FnGT0.js} +1 -1
  128. package/dist/{de-DE-BSlbAnPE.js → de-DE-B4TUdnUf.js} +1 -1
  129. package/dist/{de-DE-CyvjSD9b.mjs → de-DE-CLfzTbbX.mjs} +39 -6
  130. package/dist/de-DE-DaBBl-Ak.js +1 -0
  131. package/dist/{de-DE-DXsG-vXA.mjs → de-DE-jkW2dJrX.mjs} +28 -14
  132. package/dist/en-US-BNevqm0M.js +1 -0
  133. package/dist/{en-US-xQrWj8qI.mjs → en-US-D6SGRAch.mjs} +39 -6
  134. package/dist/en-US-J85TQRI8.js +1 -0
  135. package/dist/{en-US-C939IZ5i.mjs → en-US-SDhjlY_v.mjs} +20 -5
  136. package/dist/formControl-ODrpUvcA.js +1 -0
  137. package/dist/{index-BPU8tIml.mjs → formControl-dX7l8o3c.mjs} +160 -143
  138. package/dist/icon-sprite.svg.es-BZIz7-0d.mjs +4 -0
  139. package/dist/icon-sprite.svg.es-Ds6lDf5p.js +1 -0
  140. package/dist/index.cjs +1 -1
  141. package/dist/index.mjs +4 -4
  142. package/dist/{invoices-EamWI_jz.js → invoices-ClqTWYF9.js} +1 -1
  143. package/dist/{invoices-CVZOfEOY.mjs → invoices-DJTwftJv.mjs} +1 -1
  144. package/dist/it-IT-BkPbTueL.js +1 -0
  145. package/dist/{it-IT-DT3rfjOY.js → it-IT-CSYvGmpT.js} +1 -1
  146. package/dist/{it-IT-BxpwB3oJ.mjs → it-IT-CaaFToGB.mjs} +20 -6
  147. package/dist/{it-IT-C09oObBM.mjs → it-IT-Cym1UvvK.mjs} +39 -6
  148. package/dist/{nl-NL-DfkhOJKc.js → nl-NL-CpE4IgwO.js} +1 -1
  149. package/dist/{nl-NL-na2I4aiP.mjs → nl-NL-D0MQKaql.mjs} +34 -20
  150. package/dist/{nl-NL-BhNND_yi.mjs → nl-NL-D0c4x5C0.mjs} +39 -6
  151. package/dist/nl-NL-jIfAVGv0.js +1 -0
  152. package/dist/paymentMethods-AL2U_byg.js +1 -0
  153. package/dist/{paymentMethods-By1SebnO.mjs → paymentMethods-CWzJhcWK.mjs} +16 -14
  154. package/dist/{payments-Dnjg9Se4.js → payments-BmiHMlQt.js} +1 -1
  155. package/dist/{payments-BYZLQTJ-.mjs → payments-aXyfylwk.mjs} +6 -6
  156. package/dist/pricing.es-C07bgEZx.js +1 -0
  157. package/dist/pricing.es-QYWrKMUJ.mjs +30 -0
  158. package/dist/pricingPlanSchedules-BD4GIP_F.mjs +32 -0
  159. package/dist/pricingPlanSchedules-BfsMSvN0.js +1 -0
  160. package/dist/screens/Checkout/Checkout.cjs +1 -1
  161. package/dist/screens/Checkout/Checkout.mjs +2 -2
  162. package/dist/screens/CustomerOverview/CustomerOverview.cjs +1 -1
  163. package/dist/screens/CustomerOverview/CustomerOverview.mjs +10 -10
  164. package/dist/screens/PayInvoice/PayInvoice.cjs +1 -1
  165. package/dist/screens/PayInvoice/PayInvoice.mjs +57 -55
  166. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs +1 -1
  167. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +9 -9
  168. package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs +1 -1
  169. package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +3 -769
  170. package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs +1 -1
  171. package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +243 -270
  172. package/dist/{subscription-CrVOr5MF.mjs → subscription-D1yHKUNc.mjs} +2 -2
  173. package/dist/{subscriptions-BKER9RUc.js → subscriptions-Cm83ckfl.js} +1 -1
  174. package/dist/{subscriptions-Gj3KgCZz.mjs → subscriptions-cnR5fnf7.mjs} +1 -1
  175. package/dist/types/components/{wallets/WalletModalShell.types.d.ts → payments/OnDemandPaymentModalShell/OnDemandPaymentModalShell.types.d.ts} +3 -3
  176. package/dist/types/components/payments/PaymentIntegrationForm/PaymentIntegrationForm.types.d.ts +5 -0
  177. package/dist/types/components/payments/PaymentIntegrationFormStripe/PaymentIntegrationFormStripeFrame.types.d.ts +5 -9
  178. package/dist/types/components/providers/ActionDispatchProvider/ActionDispatchProvider.vue.d.ts +7 -11
  179. package/dist/types/components/providers/AuthProvider/AuthProvider.vue.d.ts +7 -11
  180. package/dist/types/components/providers/ConfigProvider/ConfigProvider.vue.d.ts +7 -11
  181. package/dist/types/components/providers/CssOverridesProvider/CssOverridesProvider.vue.d.ts +7 -11
  182. package/dist/types/components/providers/EntryProvider/EntryProvider.vue.d.ts +7 -11
  183. package/dist/types/components/providers/ErrorBoundary/ErrorBoundary.vue.d.ts +7 -11
  184. package/dist/types/components/providers/ExperimentalFeatureProvider/ExperimentalFeatureProvider.vue.d.ts +7 -11
  185. package/dist/types/components/providers/HostElementProvider/HostElementProvider.vue.d.ts +7 -11
  186. package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +2 -2
  187. package/dist/types/components/providers/LoggerProvider/LoggerProvider.vue.d.ts +7 -11
  188. package/dist/types/components/providers/PortalProvider/PortalProvider.vue.d.ts +7 -11
  189. package/dist/types/components/providers/Provider/Provider.vue.d.ts +7 -11
  190. package/dist/types/components/providers/TeleportProvider/TeleportProvider.vue.d.ts +7 -11
  191. package/dist/types/components/providers/TranslationProvider/TranslationOverride.vue.d.ts +7 -11
  192. package/dist/types/components/providers/TranslationProvider/TranslationProvider.vue.d.ts +7 -11
  193. package/dist/types/components/subscriptions/ChargeOnDemandModal/ChargeOnDemandModal.types.d.ts +21 -0
  194. package/dist/types/components/subscriptions/OnDemandItemsCard/OnDemandItemsCard.types.d.ts +7 -0
  195. package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.configuration.types.d.ts +27 -0
  196. package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.entry.types.d.ts +1 -1
  197. package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.types.d.ts +6 -5
  198. package/dist/types/services/paymentMethods.types.d.ts +4 -2
  199. package/dist/types/services/requests.types.d.ts +5 -0
  200. package/dist/types/vendor/@solvimon/solvimon-types/index.d.ts +5 -0
  201. package/dist/types/vendor/@solvimon/solvimon-types/types/AgentContext.d.ts +3 -0
  202. package/dist/types/vendor/@solvimon/solvimon-types/types/ApprovalPolicies.d.ts +6 -1
  203. package/dist/types/vendor/@solvimon/solvimon-types/types/ChargeOnDemandPricingItems.d.ts +23 -0
  204. package/dist/types/vendor/@solvimon/solvimon-types/types/CustomFields.d.ts +16 -4
  205. package/dist/types/vendor/@solvimon/solvimon-types/types/Embeddable.d.ts +8 -0
  206. package/dist/types/vendor/@solvimon/solvimon-types/types/Invoice.d.ts +21 -6
  207. package/dist/types/vendor/@solvimon/solvimon-types/types/OAuth.d.ts +28 -0
  208. package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentAcceptor.d.ts +2 -1
  209. package/dist/types/vendor/@solvimon/solvimon-types/types/Permission.d.ts +1 -1
  210. package/dist/types/vendor/@solvimon/solvimon-types/types/Platform.d.ts +6 -1
  211. package/dist/types/vendor/@solvimon/solvimon-types/types/Portal.d.ts +5 -0
  212. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingItemConfig.d.ts +5 -0
  213. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanGroups.d.ts +31 -0
  214. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSchedule.d.ts +9 -1
  215. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanScheduleInfo.d.ts +1 -1
  216. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSubscription.d.ts +3 -3
  217. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlans.d.ts +3 -0
  218. package/dist/types/vendor/@solvimon/solvimon-types/types/Product.d.ts +2 -0
  219. package/dist/types/vendor/@solvimon/solvimon-types/types/ProductItem.d.ts +2 -0
  220. package/dist/types/vendor/@solvimon/solvimon-types/types/QuoteTemplates.d.ts +2 -0
  221. package/dist/types/vendor/@solvimon/solvimon-types/types/ResourceStatus.d.ts +1 -1
  222. package/dist/types/vendor/@solvimon/solvimon-types/types/SeatAssignment.d.ts +22 -0
  223. package/dist/types/vendor/@solvimon/solvimon-types/types/Wallet.d.ts +6 -0
  224. package/dist/types/vendor/@solvimon/solvimon-types/types/Workflows.d.ts +128 -1
  225. package/dist/{useActionDispatchProvider-DDHrhy3i.js → useActionDispatchProvider-CHkVQMaE.js} +1 -1
  226. package/dist/{useActionDispatchProvider-MjTckd4f.mjs → useActionDispatchProvider-DDYqIh3r.mjs} +1 -1
  227. package/dist/{useCustomer-BW0DBEJh.js → useCustomer-DGYtowRy.js} +1 -1
  228. package/dist/{useCustomer-CxnF7r8Z.mjs → useCustomer-XZKWsolE.mjs} +1 -1
  229. package/dist/{useCustomerFormLabels-zPc8QrwJ.mjs → useCustomerFormLabels-CcnkJLcB.mjs} +6 -6
  230. package/dist/useCustomerFormLabels-DAZziqYt.js +1 -0
  231. package/dist/{useExperimentalFeature-9teNYGuP.js → useExperimentalFeature-COOU6IZd.js} +1 -1
  232. package/dist/{useExperimentalFeature-NsSDg-e3.mjs → useExperimentalFeature-ierhOt9Q.mjs} +1 -1
  233. package/dist/{useInvoiceData-GQwk6fl4.mjs → useInvoiceData-BEK-7msA.mjs} +3 -3
  234. package/dist/{useInvoiceData-DvV2AsgC.js → useInvoiceData-CQRn8l9C.js} +1 -1
  235. package/dist/{useInvoicesList-Xnth6s6U.js → useInvoicesList-BQkKyyXa.js} +1 -1
  236. package/dist/{useInvoicesList-CGmFSQSg.mjs → useInvoicesList-C4I118KM.mjs} +7 -7
  237. package/dist/{useLoadInitialData-BvvaWeAe.mjs → useLoadInitialData-CR0kbYw8.mjs} +1 -1
  238. package/dist/{useLoadInitialData-Cjkc70u-.js → useLoadInitialData-CrKnBZs_.js} +1 -1
  239. package/dist/{usePaymentMethodAvailability-DKyscbom.js → usePaymentMethodAvailability-Ci6LeYKt.js} +1 -1
  240. package/dist/{usePaymentMethodAvailability-BWaaj3N3.mjs → usePaymentMethodAvailability-ZH-m3B-A.mjs} +12 -12
  241. package/dist/{usePaymentMethodOptions-l-wVAmIW.mjs → usePaymentMethodOptions-Ciifjo6c.mjs} +15 -13
  242. package/dist/usePaymentMethodOptions-Cqe92ZBn.js +1 -0
  243. package/dist/{usePaymentMethods-DvQVnsSV.mjs → usePaymentMethods-B-OKRyKd.mjs} +1 -1
  244. package/dist/{usePaymentMethods-BDFVB-kK.js → usePaymentMethods-BKwrl82-.js} +1 -1
  245. package/dist/usePayments-Bauj16B-.js +1 -0
  246. package/dist/{usePayments-D_dyuf6S.mjs → usePayments-CV85OV8V.mjs} +46 -41
  247. package/dist/{usePortal-BU4ibdWq.js → usePortal-DSLImEfr.js} +1 -1
  248. package/dist/{usePortal-Br5lYuPT.mjs → usePortal-H8Tv2TnZ.mjs} +1 -1
  249. package/dist/{useSubscription-DRBUt9H5.js → useSubscription-BiYNJT2e.js} +1 -1
  250. package/dist/{useSubscription-CqRae2I9.mjs → useSubscription-DqnxWNKg.mjs} +1 -1
  251. package/dist/{useTimePeriod.es-BxIGnCAP.mjs → useTimePeriod.es-B22-fno3.mjs} +1 -1
  252. package/dist/{useTimePeriod.es-DDos3-EH.js → useTimePeriod.es-D2aiyfd-.js} +1 -1
  253. package/dist/useWatchDebounced-B8iX7ykx.js +1 -0
  254. package/dist/useWatchDebounced-BHlBPcXB.mjs +20 -0
  255. package/package.json +11 -8
  256. package/dist/Checkout.entry.ce-D8O4qJ24.js +0 -2
  257. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-D_jcV7VG.js +0 -1
  258. package/dist/InvoiceSummary.vue.es-BOnvORpf.js +0 -1
  259. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-De7h9-fH.js +0 -1
  260. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DnBLj1wZ.mjs +0 -141
  261. package/dist/PaymentIntegrationFormAdyen-BQXXwpUK.js +0 -98
  262. package/dist/PaymentIntegrationFormStripe-Bs4F7oK_.js +0 -102
  263. package/dist/PaymentMethod.vue.es-CXV_ThBY.js +0 -1
  264. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-BwsRDlQJ.js +0 -1
  265. package/dist/PlanCustomizationEditor-0kEXoOcM.js +0 -1
  266. package/dist/PlanCustomizationEditor-Dv69xPbX.mjs +0 -877
  267. package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DmVJ2JQE.mjs +0 -131
  268. package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-YsI__d0V.js +0 -1
  269. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-DypW8aNJ.js +0 -1
  270. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-Cd56tuZb.js +0 -1
  271. package/dist/TooltipParagraph.vue.es-7IQdU3Tf.js +0 -1
  272. package/dist/de-DE-DXsDvO5y.js +0 -1
  273. package/dist/en-US-9xdcz3T5.js +0 -1
  274. package/dist/en-US-DHdI11k9.js +0 -1
  275. package/dist/icon-sprite.svg.es-Bt21fMEt.mjs +0 -4
  276. package/dist/icon-sprite.svg.es-Dauis9LS.js +0 -1
  277. package/dist/index-DwueOtPi.js +0 -1
  278. package/dist/it-IT-CcRIzP1A.js +0 -1
  279. package/dist/nl-NL-5PrgQl8q.js +0 -1
  280. package/dist/paymentMethods-Bwym8l9a.js +0 -1
  281. package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagement.types.d.ts +0 -47
  282. package/dist/useCustomerFormLabels-C773h3J0.js +0 -1
  283. package/dist/usePaymentMethodOptions-DuXKS36F.js +0 -1
  284. package/dist/usePayments-CIJocDhR.js +0 -1
  285. package/dist/useWatchDebounced-CAU1WI1P.js +0 -1
  286. package/dist/useWatchDebounced-DT5IicPp.mjs +0 -14
@@ -1,82 +1,82 @@
1
- import { defineComponent as z, ref as E, onMounted as xt, onBeforeUnmount as Pe, computed as s, openBlock as w, createBlock as C, withCtx as h, createElementVNode as k, toDisplayString as N, createVNode as A, createTextVNode as F, createElementBlock as W, unref as r, createCommentVNode as R, renderSlot as se, createSlots as re, Fragment as ge, renderList as he, useModel as $t, watch as ee, isRef as Et, mergeModels as Ot, mergeProps as le, reactive as Ae, normalizeClass as ze, withModifiers as Ne, normalizeStyle as ke } from "vue";
1
+ import { defineComponent as z, ref as $, onMounted as xt, onBeforeUnmount as Se, computed as s, openBlock as w, createBlock as C, withCtx as _, createElementVNode as N, toDisplayString as I, createVNode as A, createTextVNode as F, createElementBlock as W, unref as r, createCommentVNode as k, renderSlot as se, createSlots as re, Fragment as he, renderList as ge, watch as X, useModel as $t, isRef as Et, mergeModels as Ot, mergeProps as le, reactive as Ae, normalizeClass as ze, withModifiers as Ne, normalizeStyle as ke } from "vue";
2
2
  import { w as Bt } from "./api.es-QaC926Xu.mjs";
3
- import { u as Q, _ as X, c as Qe, a as Ge, b as _e, g as It } from "./customElements-DT1YyL4O.mjs";
3
+ import { a as Q, _ as K, c as Qe, u as Ge, b as _e, g as It } from "./customElements-D5DAoHRI.mjs";
4
4
  import { E as Dt } from "./sessionReference-3h-6FdrC.mjs";
5
5
  import { u as Nt } from "./useService-Bh47bllz.mjs";
6
- import { _ as Ke } from "./ErrorNotification.vue.es-CVUuIt8Z.mjs";
6
+ import { _ as Ke } from "./ErrorNotification.vue.es-rRKgmkzV.mjs";
7
7
  import { i as kt, a as Me, h as Rt } from "./pricingItemConfigs.es-ORxsk_YS.mjs";
8
8
  import { b as Ce } from "./wallets.es-eH2C2ygn.mjs";
9
- import { _ as ue, a as Vt } from "./Button.vue.es-PbJFK8z7.mjs";
10
- import { _ as Xe, T as Je, a as Ze } from "./TooltipParagraph.vue.es-nGFfHF1A.mjs";
11
- import { _ as fe } from "./Section.vue.es-KRsHeFoT.mjs";
12
- import { _ as et } from "./Skeleton.vue_vue_type_script_setup_true_lang-DRLoYWGY.mjs";
13
- import { _ as tt } from "./RadioGroupExtended.vue.es-_QMReyZ8.mjs";
14
- import { u as xe, c as ie, _ as qt, a as Ft, r as ot } from "./index-BPU8tIml.mjs";
9
+ import { _ as ue, a as qt } from "./Button.vue.es-C32_baQN.mjs";
10
+ import { _ as Xe, T as Je, a as Ze } from "./TooltipParagraph.vue.es-BXbOJmjr.mjs";
11
+ import { _ as ve } from "./Section.vue.es-D7eiXUbk.mjs";
12
+ import { _ as et } from "./Skeleton.vue_vue_type_script_setup_true_lang-D60YtA9z.mjs";
13
+ import { _ as tt } from "./RadioGroupExtended.vue.es-BalV7gwp.mjs";
14
+ import { a as Vt, u as xe, c as ie, _ as Ft, d as Lt, r as ot } from "./formControl-dX7l8o3c.mjs";
15
15
  import { f as $e } from "./formatting.es-RclXHhKo.mjs";
16
- import { _ as Lt } from "./Divider.vue.es-DnP_HqLz.mjs";
16
+ import { _ as Yt } from "./Divider.vue.es-DnP_HqLz.mjs";
17
17
  import { _ as nt } from "./Expand.vue.es-BleuAfDz.mjs";
18
- import { a as at } from "./EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-DeotDsFP.mjs";
19
- import { _ as Yt } from "./cn.es-BD7Afj5Q.mjs";
20
- import { c as it } from "./invoices-CVZOfEOY.mjs";
21
- import { u as Ht } from "./useWatchDebounced-DT5IicPp.mjs";
22
- import { _ as Wt } from "./Input.vue.es-BFbiFXsU.mjs";
23
- import { _ as st, a as jt } from "./AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DW10rozs.mjs";
24
- import { _ as zt } from "./SubscriptionSummary.vue_vue_type_script_setup_true_lang-DvYZvTV9.mjs";
25
- import { g as Qt } from "./customer.es-B5ppZf0j.mjs";
26
- import { u as Gt } from "./usePaymentMethodOptions-l-wVAmIW.mjs";
27
- import { M as lt } from "./Modal.vue.es-jT61xK_A.mjs";
28
- const Kt = 3e4, we = 60, Te = 12, Xt = /* @__PURE__ */ z({
18
+ import { a as at } from "./EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-C3QYra1x.mjs";
19
+ import { _ as Ht } from "./cn.es-CGa6b2Lt.mjs";
20
+ import { c as it } from "./invoices-DJTwftJv.mjs";
21
+ import { u as Wt } from "./useWatchDebounced-BHlBPcXB.mjs";
22
+ import { _ as jt } from "./Input.vue.es-D9IjIWc-.mjs";
23
+ import { _ as st, a as zt } from "./AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DcrLNA_x.mjs";
24
+ import { _ as Qt } from "./SubscriptionSummary.vue_vue_type_script_setup_true_lang-3VYfm6Hm.mjs";
25
+ import { g as Gt } from "./customer.es-B5ppZf0j.mjs";
26
+ import { u as Kt } from "./usePaymentMethodOptions-Ciifjo6c.mjs";
27
+ import { M as lt } from "./Modal.vue.es-B9xMiyn3.mjs";
28
+ const Xt = 3e4, we = 60, Te = 12, Jt = /* @__PURE__ */ z({
29
29
  __name: "DateTimeAgo",
30
30
  props: {
31
31
  date: {},
32
32
  actionVerb: {}
33
33
  },
34
34
  setup(e) {
35
- const t = 60 * we, o = 24 * t, n = e, { $t: a, formatDate: i } = Q(), u = E(Date.now());
36
- let l;
35
+ const t = 60 * we, o = 24 * t, n = e, { $t: a, formatDate: i } = Q(), l = $(Date.now());
36
+ let u;
37
37
  xt(() => {
38
- l = setInterval(() => {
39
- u.value = Date.now();
40
- }, Kt);
41
- }), Pe(() => {
42
- clearInterval(l);
38
+ u = setInterval(() => {
39
+ l.value = Date.now();
40
+ }, Xt);
41
+ }), Se(() => {
42
+ clearInterval(u);
43
43
  });
44
- const p = (v, g) => {
45
- const m = (g.getFullYear() - v.getFullYear()) * Te + (g.getMonth() - v.getMonth());
46
- return g.getDate() < v.getDate() ? m - 1 : m;
47
- }, y = s(() => {
48
- const v = Math.max(0, (u.value - n.date.getTime()) / 1e3);
49
- if (v < we)
44
+ const c = (f, h) => {
45
+ const v = (h.getFullYear() - f.getFullYear()) * Te + (h.getMonth() - f.getMonth());
46
+ return h.getDate() < f.getDate() ? v - 1 : v;
47
+ }, g = s(() => {
48
+ const f = Math.max(0, (l.value - n.date.getTime()) / 1e3);
49
+ if (f < we)
50
50
  return a(
51
51
  {
52
52
  defaultMessage: "{count, plural, one {# second} other {# seconds}} ago",
53
53
  id: "dateTimeAgo.seconds",
54
54
  description: "Relative time in whole seconds"
55
55
  },
56
- { count: Math.trunc(v) }
56
+ { count: Math.trunc(f) }
57
57
  );
58
- if (v < t)
58
+ if (f < t)
59
59
  return a(
60
60
  {
61
61
  defaultMessage: "{count, plural, one {# minute} other {# minutes}} ago",
62
62
  id: "dateTimeAgo.minutes",
63
63
  description: "Relative time in whole minutes"
64
64
  },
65
- { count: Math.trunc(v / we) }
65
+ { count: Math.trunc(f / we) }
66
66
  );
67
- if (v < o)
67
+ if (f < o)
68
68
  return a(
69
69
  {
70
70
  defaultMessage: "{count, plural, one {# hour} other {# hours}} ago",
71
71
  id: "dateTimeAgo.hours",
72
72
  description: "Relative time in whole hours"
73
73
  },
74
- { count: Math.trunc(v / t) }
74
+ { count: Math.trunc(f / t) }
75
75
  );
76
- const g = p(n.date, new Date(u.value));
77
- if (g < 1) {
78
- const m = Math.trunc(v / o);
79
- return m === 1 ? a({
76
+ const h = c(n.date, new Date(l.value));
77
+ if (h < 1) {
78
+ const v = Math.trunc(f / o);
79
+ return v === 1 ? a({
80
80
  defaultMessage: "yesterday",
81
81
  id: "dateTimeAgo.yesterday",
82
82
  description: 'Relative time for a single day ago, reading as "updated yesterday" once the action verb is in front'
@@ -86,36 +86,36 @@ const Kt = 3e4, we = 60, Te = 12, Xt = /* @__PURE__ */ z({
86
86
  id: "dateTimeAgo.days",
87
87
  description: "Relative time in whole days"
88
88
  },
89
- { count: m }
89
+ { count: v }
90
90
  );
91
91
  }
92
- return g < Te ? a(
92
+ return h < Te ? a(
93
93
  {
94
94
  defaultMessage: "{count, plural, one {# month} other {# months}} ago",
95
95
  id: "dateTimeAgo.months",
96
96
  description: "Relative time in whole months"
97
97
  },
98
- { count: g }
98
+ { count: h }
99
99
  ) : a(
100
100
  {
101
101
  defaultMessage: "{count, plural, one {# year} other {# years}} ago",
102
102
  id: "dateTimeAgo.years",
103
103
  description: "Relative time in whole years"
104
104
  },
105
- { count: Math.trunc(g / Te) }
105
+ { count: Math.trunc(h / Te) }
106
106
  );
107
- }), T = s(
108
- () => n.actionVerb ? `${n.actionVerb} ${y.value}` : y.value
109
- ), x = s(
107
+ }), b = s(
108
+ () => n.actionVerb ? `${n.actionVerb} ${g.value}` : g.value
109
+ ), S = s(
110
110
  () => i({ date: n.date, format: "dateTime", offsetType: "local" })
111
111
  );
112
- return (v, g) => (w(), C(Xe, null, {
113
- tooltip: h(() => [
112
+ return (f, h) => (w(), C(Xe, null, {
113
+ tooltip: _(() => [
114
114
  A(Je, null, {
115
- default: h(() => [
115
+ default: _(() => [
116
116
  A(Ze, null, {
117
- default: h(() => [
118
- F(N(x.value), 1)
117
+ default: _(() => [
118
+ F(I(S.value), 1)
119
119
  ]),
120
120
  _: 1
121
121
  })
@@ -123,79 +123,79 @@ const Kt = 3e4, we = 60, Te = 12, Xt = /* @__PURE__ */ z({
123
123
  _: 1
124
124
  })
125
125
  ]),
126
- default: h(() => [
127
- k("span", null, N(T.value), 1)
126
+ default: _(() => [
127
+ N("span", null, I(b.value), 1)
128
128
  ]),
129
129
  _: 1
130
130
  }));
131
131
  }
132
- }), Jt = (e) => {
133
- const { $t: t, formatNumber: o } = Q(), n = (_) => Ce(t, o, _), a = s(
132
+ }), Zt = (e) => {
133
+ const { $t: t, formatNumber: o } = Q(), n = (y) => Ce(t, o, y), a = s(
134
134
  () => {
135
- var _, S;
136
- return ((S = (_ = e.walletBalance.wallet) == null ? void 0 : _.wallet_type) == null ? void 0 : S.name) || t({
135
+ var y, p;
136
+ return ((p = (y = e.walletBalance.wallet) == null ? void 0 : y.wallet_type) == null ? void 0 : p.name) || t({
137
137
  defaultMessage: "Balance",
138
138
  id: "wallet_balance.balance_label",
139
139
  description: "Label shown above a wallet's balance amount"
140
140
  });
141
141
  }
142
- ), i = (_) => {
143
- var S;
144
- return (((S = _.pricing_item) == null ? void 0 : S.configs) ?? []).filter((f) => !!f.on_demand);
145
- }, u = s(
142
+ ), i = (y) => {
143
+ var p;
144
+ return (((p = y.pricing_item) == null ? void 0 : p.configs) ?? []).filter((P) => !!P.on_demand);
145
+ }, l = s(
146
146
  () => (e.walletBalance.charge_on_demand_pricing_items ?? []).filter(
147
- (_) => i(_).some(
148
- (S) => kt(S) || Me(S)
147
+ (y) => i(y).some(
148
+ (p) => kt(p) || Me(p)
149
149
  )
150
150
  )
151
- ), l = s(
152
- () => u.value.find(
153
- (_) => i(_).some((S) => Me(S))
151
+ ), u = s(
152
+ () => l.value.find(
153
+ (y) => i(y).some((p) => Me(p))
154
154
  )
155
- ), p = s(
156
- () => !!e.showManualTopUp && u.value.length > 0
157
- ), y = s(() => !!e.showAutoTopUp && !!l.value), T = s(
155
+ ), c = s(
156
+ () => !!e.showManualTopUp && l.value.length > 0
157
+ ), g = s(() => !!e.showAutoTopUp && !!u.value), b = s(
158
158
  () => {
159
- var _, S;
160
- return (S = (_ = e.walletBalance.wallet) == null ? void 0 : _.auto_top_up_configs) == null ? void 0 : S.find(
161
- (f) => f.status === "ACTIVE"
159
+ var y, p;
160
+ return (p = (y = e.walletBalance.wallet) == null ? void 0 : y.auto_top_up_configs) == null ? void 0 : p.find(
161
+ (P) => P.status === "ACTIVE"
162
162
  );
163
163
  }
164
- ), x = s(
164
+ ), S = s(
165
165
  () => {
166
- var _, S;
167
- return (S = (_ = e.walletBalance.wallet_balance.open_balance) == null ? void 0 : _.credits) == null ? void 0 : S.credit_type;
166
+ var y, p;
167
+ return (p = (y = e.walletBalance.wallet_balance.open_balance) == null ? void 0 : y.credits) == null ? void 0 : p.credit_type;
168
168
  }
169
- ), v = (_, S) => n({
169
+ ), f = (y, p) => n({
170
170
  credits: {
171
- quantity: _,
172
- credit_type_id: S,
173
- credit_type: x.value
171
+ quantity: y,
172
+ credit_type_id: p,
173
+ credit_type: S.value
174
174
  }
175
- }), g = (_) => _.amount ? n({ amount: _.amount }) : _.credits ? v(_.credits.quantity, _.credits.credit_type_id) : "", m = s(() => {
176
- var _, S;
177
- const f = (_ = T.value) == null ? void 0 : _.pricing_item_id;
178
- if (!f)
175
+ }), h = (y) => y.amount ? n({ amount: y.amount }) : y.credits ? f(y.credits.quantity, y.credits.credit_type_id) : "", v = s(() => {
176
+ var y, p;
177
+ const P = (y = b.value) == null ? void 0 : y.pricing_item_id;
178
+ if (!P)
179
179
  return;
180
- const P = (e.walletBalance.charge_on_demand_pricing_items ?? []).filter((D) => D.pricing_item_id === f).flatMap((D) => i(D)).flatMap((D) => D.wallet_grants ?? []), O = (S = e.walletBalance.wallet) == null ? void 0 : S.wallet_type_id;
181
- return P.find((D) => D.wallet_type_id === O) ?? P[0];
180
+ const E = (e.walletBalance.charge_on_demand_pricing_items ?? []).filter((R) => R.pricing_item_id === P).flatMap((R) => i(R)).flatMap((R) => R.wallet_grants ?? []), D = (p = e.walletBalance.wallet) == null ? void 0 : p.wallet_type_id;
181
+ return E.find((R) => R.wallet_type_id === D) ?? E[0];
182
182
  }), U = s(() => {
183
- var _, S;
184
- const f = (_ = T.value) == null ? void 0 : _.topup_amount, P = (S = m.value) == null ? void 0 : S.credits_grant;
185
- if (!f || !P)
183
+ var y, p;
184
+ const P = (y = b.value) == null ? void 0 : y.topup_amount, E = (p = v.value) == null ? void 0 : p.credits_grant;
185
+ if (!P || !E)
186
186
  return "";
187
- if (P.credits)
188
- return v(
189
- P.credits.quantity,
190
- P.credits.credit_type_id
187
+ if (E.credits)
188
+ return f(
189
+ E.credits.quantity,
190
+ E.credits.credit_type_id
191
191
  );
192
- if (P.conversion) {
193
- const O = Number(f.quantity) * Number(P.conversion.rate);
194
- return v(String(O), P.conversion.credit_type_id);
192
+ if (E.conversion) {
193
+ const D = Number(P.quantity) * Number(E.conversion.rate);
194
+ return f(String(D), E.conversion.credit_type_id);
195
195
  }
196
196
  return "";
197
- }), I = s(
198
- () => T.value ? t({
197
+ }), B = s(
198
+ () => b.value ? t({
199
199
  defaultMessage: "Auto top-up enabled",
200
200
  id: "wallet_balance.auto_top_up_enabled_label",
201
201
  description: "Label shown when a wallet tops itself up automatically"
@@ -204,16 +204,16 @@ const Kt = 3e4, we = 60, Te = 12, Xt = /* @__PURE__ */ z({
204
204
  id: "wallet_balance.auto_top_up_disabled_label",
205
205
  description: "Label shown when a wallet has no automatic top-up configured"
206
206
  })
207
- ), G = s(() => {
208
- const _ = T.value;
209
- if (!_)
207
+ ), J = s(() => {
208
+ const y = b.value;
209
+ if (!y)
210
210
  return t({
211
211
  defaultMessage: "Set up an automatic top-up and your balance is increased for you whenever it drops below an amount you choose, so you never run out.",
212
212
  id: "wallet_balance.auto_top_up_setup_explanation",
213
213
  description: "Tooltip explaining what automatic top-ups do, shown when none is configured yet"
214
214
  });
215
- const S = _.topup_amount ? n({ amount: _.topup_amount }) : "", f = g(_.threshold);
216
- return !S || !f ? t({
215
+ const p = y.topup_amount ? n({ amount: y.topup_amount }) : "", P = h(y.threshold);
216
+ return !p || !P ? t({
217
217
  defaultMessage: "Your balance is topped up automatically once it runs low.",
218
218
  id: "wallet_balance.auto_top_up_generic_explanation",
219
219
  description: "Tooltip shown for an active automatic top-up whose amount or threshold is unknown"
@@ -223,31 +223,31 @@ const Kt = 3e4, we = 60, Te = 12, Xt = /* @__PURE__ */ z({
223
223
  id: "wallet_balance.auto_top_up_credits_explanation",
224
224
  description: "Tooltip explaining an automatic top-up that grants credits for a paid amount"
225
225
  },
226
- { topUpCredits: U.value, topUpAmount: S, threshold: f }
226
+ { topUpCredits: U.value, topUpAmount: p, threshold: P }
227
227
  ) : t(
228
228
  {
229
229
  defaultMessage: "Your balance is automatically increased with {topUpAmount} when it drops below {threshold}.",
230
230
  id: "wallet_balance.auto_top_up_explanation",
231
231
  description: "Tooltip explaining how the automatic top-up of a wallet balance works"
232
232
  },
233
- { topUpAmount: S, threshold: f }
233
+ { topUpAmount: p, threshold: P }
234
234
  );
235
235
  });
236
236
  return {
237
237
  walletName: a,
238
238
  formatBalance: n,
239
- manualTopUpItems: u,
240
- flexibleManualTopUpItem: l,
241
- showManualTopUp: p,
242
- showAutoTopUp: y,
243
- activeTopUpConfig: T,
244
- autoTopUpLabel: I,
245
- autoTopUpExplanation: G
239
+ manualTopUpItems: l,
240
+ flexibleManualTopUpItem: u,
241
+ showManualTopUp: c,
242
+ showAutoTopUp: g,
243
+ activeTopUpConfig: b,
244
+ autoTopUpLabel: B,
245
+ autoTopUpExplanation: J
246
246
  };
247
- }, Zt = { class: "flex flex-col gap-3 py-3" }, eo = { class: "flex flex-col gap-1 px-4" }, to = { class: "flex w-full justify-between gap-3" }, oo = { class: "flex w-full items-center gap-4" }, no = { key: 0 }, ao = {
247
+ }, eo = { class: "flex flex-col gap-3 py-3" }, to = { class: "flex flex-col gap-1 px-4" }, oo = { class: "flex w-full justify-between gap-3" }, no = { class: "flex w-full items-center gap-4" }, ao = { key: 0 }, io = {
248
248
  key: 1,
249
249
  class: "flex w-full justify-between gap-3 px-4"
250
- }, io = { class: "flex min-w-0 items-center gap-1" }, so = { class: "flex min-w-0 items-center gap-1" }, lo = { class: "shrink-0" }, uo = /* @__PURE__ */ z({
250
+ }, so = { class: "flex min-w-0 items-center gap-1" }, lo = { class: "flex min-w-0 items-center gap-1" }, uo = { class: "shrink-0" }, ro = /* @__PURE__ */ z({
251
251
  __name: "WalletBalancesItem",
252
252
  props: {
253
253
  walletBalance: {},
@@ -260,35 +260,35 @@ const Kt = 3e4, we = 60, Te = 12, Xt = /* @__PURE__ */ z({
260
260
  walletName: n,
261
261
  formatBalance: a,
262
262
  manualTopUpItems: i,
263
- flexibleManualTopUpItem: u,
264
- showManualTopUp: l,
265
- showAutoTopUp: p,
266
- activeTopUpConfig: y,
267
- autoTopUpLabel: T,
268
- autoTopUpExplanation: x
269
- } = Jt(t);
270
- return (v, g) => (w(), W("div", Zt, [
271
- k("div", eo, [
272
- k("div", to, [
273
- A(X, {
263
+ flexibleManualTopUpItem: l,
264
+ showManualTopUp: u,
265
+ showAutoTopUp: c,
266
+ activeTopUpConfig: g,
267
+ autoTopUpLabel: b,
268
+ autoTopUpExplanation: S
269
+ } = Zt(t);
270
+ return (f, h) => (w(), W("div", eo, [
271
+ N("div", to, [
272
+ N("div", oo, [
273
+ A(K, {
274
274
  variant: "body-xs",
275
275
  color: "subtle",
276
276
  "no-spacing": ""
277
277
  }, {
278
- default: h(() => [
279
- F(N(r(n)), 1)
278
+ default: _(() => [
279
+ F(I(r(n)), 1)
280
280
  ]),
281
281
  _: 1
282
282
  }),
283
- A(X, {
283
+ A(K, {
284
284
  variant: "body-xs",
285
285
  color: "subtle",
286
286
  "no-spacing": ""
287
287
  }, {
288
- default: h(() => {
289
- var m, U;
288
+ default: _(() => {
289
+ var v, U;
290
290
  return [
291
- (m = e.walletBalance.wallet_balance) != null && m.balance_at ? (w(), C(Xt, {
291
+ (v = e.walletBalance.wallet_balance) != null && v.balance_at ? (w(), C(Jt, {
292
292
  key: 0,
293
293
  date: new Date((U = e.walletBalance.wallet_balance) == null ? void 0 : U.balance_at),
294
294
  "action-verb": r(o)({
@@ -296,52 +296,52 @@ const Kt = 3e4, we = 60, Te = 12, Xt = /* @__PURE__ */ z({
296
296
  id: "wallet_balance.updated_action_verb",
297
297
  description: "Verb in front of when a wallet balance was last updated, e.g. 'updated 5 minutes ago'"
298
298
  })
299
- }, null, 8, ["date", "action-verb"])) : R("", !0)
299
+ }, null, 8, ["date", "action-verb"])) : k("", !0)
300
300
  ];
301
301
  }),
302
302
  _: 1
303
303
  })
304
304
  ]),
305
- k("div", oo, [
306
- A(X, {
305
+ N("div", no, [
306
+ A(K, {
307
307
  variant: "body-lg",
308
308
  weight: "semibold",
309
309
  "no-spacing": "",
310
310
  class: "grow"
311
311
  }, {
312
- default: h(() => [
313
- F(N(r(a)(t.walletBalance.wallet_balance.open_balance)), 1)
312
+ default: _(() => [
313
+ F(I(r(a)(t.walletBalance.wallet_balance.open_balance)), 1)
314
314
  ]),
315
315
  _: 1
316
316
  }),
317
- r(l) ? (w(), C(r(ue), {
317
+ r(u) ? (w(), C(r(ue), {
318
318
  key: 0,
319
319
  size: "xs",
320
- onClick: g[0] || (g[0] = (m) => v.$emit("top-up", r(i)[0]))
320
+ onClick: h[0] || (h[0] = (v) => f.$emit("top-up", r(i)[0]))
321
321
  }, {
322
- default: h(() => [
323
- F(N(r(o)({
322
+ default: _(() => [
323
+ F(I(r(o)({
324
324
  defaultMessage: "Top up",
325
325
  id: "v1V8kA",
326
326
  description: "Button to top up a wallet balance"
327
327
  })), 1)
328
328
  ]),
329
329
  _: 1
330
- })) : R("", !0)
330
+ })) : k("", !0)
331
331
  ])
332
332
  ]),
333
- v.$slots.graph ? (w(), W("div", no, [
334
- se(v.$slots, "graph")
335
- ])) : R("", !0),
336
- r(p) ? (w(), W("div", ao, [
337
- k("div", io, [
333
+ f.$slots.graph ? (w(), W("div", ao, [
334
+ se(f.$slots, "graph")
335
+ ])) : k("", !0),
336
+ r(c) ? (w(), W("div", io, [
337
+ N("div", so, [
338
338
  A(Xe, { class: "min-w-0" }, {
339
- tooltip: h(() => [
339
+ tooltip: _(() => [
340
340
  A(Je, null, {
341
- default: h(() => [
341
+ default: _(() => [
342
342
  A(Ze, null, {
343
- default: h(() => [
344
- F(N(r(x)), 1)
343
+ default: _(() => [
344
+ F(I(r(S)), 1)
345
345
  ]),
346
346
  _: 1
347
347
  })
@@ -349,20 +349,20 @@ const Kt = 3e4, we = 60, Te = 12, Xt = /* @__PURE__ */ z({
349
349
  _: 1
350
350
  })
351
351
  ]),
352
- default: h(() => [
353
- k("div", so, [
354
- A(X, {
352
+ default: _(() => [
353
+ N("div", lo, [
354
+ A(K, {
355
355
  variant: "body-sm",
356
356
  color: "secondary",
357
357
  "no-spacing": "",
358
358
  class: "truncate"
359
359
  }, {
360
- default: h(() => [
361
- F(N(r(T)), 1)
360
+ default: _(() => [
361
+ F(I(r(b)), 1)
362
362
  ]),
363
363
  _: 1
364
364
  }),
365
- A(Vt, {
365
+ A(qt, {
366
366
  icon: "info",
367
367
  size: "2xs",
368
368
  class: "shrink-0 cursor-help text-gray-400"
@@ -372,15 +372,15 @@ const Kt = 3e4, we = 60, Te = 12, Xt = /* @__PURE__ */ z({
372
372
  _: 1
373
373
  })
374
374
  ]),
375
- k("div", lo, [
376
- r(y) ? (w(), C(r(ue), {
375
+ N("div", uo, [
376
+ r(g) ? (w(), C(r(ue), {
377
377
  key: 0,
378
378
  size: "xs",
379
379
  intent: "secondary",
380
- onClick: g[1] || (g[1] = (m) => v.$emit("cancel-auto-top-up", r(y)))
380
+ onClick: h[1] || (h[1] = (v) => f.$emit("cancel-auto-top-up", r(g)))
381
381
  }, {
382
- default: h(() => [
383
- F(N(r(o)({
382
+ default: _(() => [
383
+ F(I(r(o)({
384
384
  defaultMessage: "Disable",
385
385
  id: "wallet_balance.auto_top_up_disable_button",
386
386
  description: "Button to turn off a wallet's automatic top-up"
@@ -391,10 +391,10 @@ const Kt = 3e4, we = 60, Te = 12, Xt = /* @__PURE__ */ z({
391
391
  key: 1,
392
392
  size: "xs",
393
393
  intent: "secondary",
394
- onClick: g[2] || (g[2] = (m) => v.$emit("auto-top-up", r(u)))
394
+ onClick: h[2] || (h[2] = (v) => f.$emit("auto-top-up", r(l)))
395
395
  }, {
396
- default: h(() => [
397
- F(N(r(o)({
396
+ default: _(() => [
397
+ F(I(r(o)({
398
398
  defaultMessage: "Enable",
399
399
  id: "wallet_balance.auto_top_up_enable_button",
400
400
  description: "Button to set up a wallet's automatic top-up"
@@ -403,10 +403,10 @@ const Kt = 3e4, we = 60, Te = 12, Xt = /* @__PURE__ */ z({
403
403
  _: 1
404
404
  }))
405
405
  ])
406
- ])) : R("", !0)
406
+ ])) : k("", !0)
407
407
  ]));
408
408
  }
409
- }), ro = { class: "flex flex-col gap-2" }, co = /* @__PURE__ */ z({
409
+ }), co = { class: "flex flex-col gap-2" }, po = /* @__PURE__ */ z({
410
410
  __name: "WalletBalances",
411
411
  props: {
412
412
  customerWalletBalances: {},
@@ -416,19 +416,19 @@ const Kt = 3e4, we = 60, Te = 12, Xt = /* @__PURE__ */ z({
416
416
  },
417
417
  emits: ["top-up", "auto-top-up", "cancel-auto-top-up"],
418
418
  setup(e) {
419
- return (t, o) => (w(), C(fe, {
419
+ return (t, o) => (w(), C(ve, {
420
420
  "no-spacing": "",
421
421
  "no-border": "",
422
422
  title: e.title
423
423
  }, re({
424
- default: h(() => [
425
- k("div", ro, [
426
- (w(!0), W(ge, null, he(e.customerWalletBalances, (n) => (w(), C(fe, {
424
+ default: _(() => [
425
+ N("div", co, [
426
+ (w(!0), W(he, null, ge(e.customerWalletBalances, (n) => (w(), C(ve, {
427
427
  key: n.wallet_id,
428
428
  "no-spacing": ""
429
429
  }, {
430
- default: h(() => [
431
- A(uo, {
430
+ default: _(() => [
431
+ A(ro, {
432
432
  "wallet-balance": n,
433
433
  "show-auto-top-up": e.showAutoTopUp,
434
434
  "show-manual-top-up": e.showManualTopUp,
@@ -445,7 +445,7 @@ const Kt = 3e4, we = 60, Te = 12, Xt = /* @__PURE__ */ z({
445
445
  }, [
446
446
  t.$slots["heading-right"] ? {
447
447
  name: "right",
448
- fn: h(() => [
448
+ fn: _(() => [
449
449
  se(t.$slots, "heading-right")
450
450
  ]),
451
451
  key: "0"
@@ -453,7 +453,7 @@ const Kt = 3e4, we = 60, Te = 12, Xt = /* @__PURE__ */ z({
453
453
  ]), 1032, ["title"]));
454
454
  }
455
455
  });
456
- function po() {
456
+ function mo() {
457
457
  const e = Qe(), t = Ge();
458
458
  function o(n) {
459
459
  return e({
@@ -468,12 +468,12 @@ function po() {
468
468
  };
469
469
  }
470
470
  function Nn({ customerId: e }) {
471
- const { getCustomerWalletBalances: t } = po(), { data: o, execute: n, apiStatus: a, error: i, isPending: u } = Nt({
471
+ const { getCustomerWalletBalances: t } = mo(), { data: o, execute: n, apiStatus: a, error: i, isPending: l } = Nt({
472
472
  service: () => t(e)
473
473
  });
474
474
  return { walletBalances: s(
475
475
  () => o.value ?? null
476
- ), apiStatus: a, error: i, fetch: n, isPending: u };
476
+ ), apiStatus: a, error: i, fetch: n, isPending: l };
477
477
  }
478
478
  const Re = (e = [], t) => {
479
479
  if (t != null && t.pricing_item_id)
@@ -482,13 +482,13 @@ const Re = (e = [], t) => {
482
482
  ({ pricing_item_id: n }) => n === t.pricing_item_id
483
483
  )
484
484
  );
485
- }, mo = ["TOP_UP", "ADD_PAYMENT_METHOD", "SUCCESS"], Ee = (e) => typeof e == "object" && e !== null && "pricing_item" in e, fo = (e) => [
485
+ }, vo = ["TOP_UP", "ADD_PAYMENT_METHOD", "SUCCESS"], Ee = (e) => typeof e == "object" && e !== null && "pricing_item" in e, fo = (e) => [
486
486
  ...new Set(
487
487
  ((e == null ? void 0 : e.charge_on_demand_pricing_items) ?? []).flatMap(
488
488
  (t) => Ee(t) && t.pricing_plan_schedule_id ? [t.pricing_plan_schedule_id] : []
489
489
  )
490
490
  )
491
- ], vo = (e, t) => {
491
+ ], ho = (e, t) => {
492
492
  const o = new Set(fo(e));
493
493
  return t.flatMap((n) => {
494
494
  const a = (n.pricing_plan_schedule_infos ?? []).filter(
@@ -501,9 +501,9 @@ const Re = (e = [], t) => {
501
501
  scheduleIds: a.map(({ id: i }) => i),
502
502
  enabledPricingIds: a.flatMap(
503
503
  (i) => {
504
- var u;
505
- return (((u = i.pricing_plan_schedule) == null ? void 0 : u.enabled_pricings) ?? []).flatMap(
506
- ({ pricing_id: l }) => l ? [l] : []
504
+ var l;
505
+ return (((l = i.pricing_plan_schedule) == null ? void 0 : l.enabled_pricings) ?? []).flatMap(
506
+ ({ pricing_id: u }) => u ? [u] : []
507
507
  );
508
508
  }
509
509
  )
@@ -526,26 +526,26 @@ const Re = (e = [], t) => {
526
526
  return [];
527
527
  const o = t.pricing_item_id ?? ((n = t.pricing_item) == null ? void 0 : n.id);
528
528
  return o ? (((a = t.pricing_item) == null ? void 0 : a.configs) ?? []).map((i) => {
529
- const u = bo(i, e), l = ho(i, e);
529
+ const l = wo(i, e), u = _o(i, e);
530
530
  return {
531
531
  pricingItemId: o,
532
532
  ...t.pricing_plan_schedule_id && {
533
533
  pricingPlanScheduleId: t.pricing_plan_schedule_id
534
534
  },
535
535
  config: i,
536
- ...u && { flexiblePricing: u },
537
- ...l && { fixedPricing: l }
536
+ ...l && { flexiblePricing: l },
537
+ ...u && { fixedPricing: u }
538
538
  };
539
539
  }) : [];
540
540
  });
541
- function ho(e, t) {
542
- var i, u, l;
541
+ function _o(e, t) {
542
+ var i, l, u;
543
543
  if (!e.on_demand || !Rt(e, ["FIXED"]))
544
544
  return;
545
- const o = (l = (u = (i = e.details) == null ? void 0 : i.bands) == null ? void 0 : u[0]) == null ? void 0 : l.fixed_amount;
545
+ const o = (u = (l = (i = e.details) == null ? void 0 : i.bands) == null ? void 0 : l[0]) == null ? void 0 : u.fixed_amount;
546
546
  if (!o)
547
547
  return;
548
- const n = rt(t), a = n ? yo(e, t) : void 0;
548
+ const n = rt(t), a = n ? bo(e, t) : void 0;
549
549
  return {
550
550
  amount: o,
551
551
  value: a && n ? Oe(a.quantity, n) : { amount: o }
@@ -560,30 +560,30 @@ const rt = (e) => {
560
560
  return (e.wallet_grants ?? []).filter(
561
561
  ({ wallet_type_id: a }) => !o || a === o
562
562
  );
563
- }, _o = (e, t) => {
563
+ }, yo = (e, t) => {
564
564
  var o, n;
565
565
  return (n = (o = dt(e, t).find(
566
566
  ({ credits_grant: a }) => a == null ? void 0 : a.conversion
567
567
  )) == null ? void 0 : o.credits_grant) == null ? void 0 : n.conversion;
568
- }, yo = (e, t) => {
568
+ }, bo = (e, t) => {
569
569
  var o, n;
570
570
  return (n = (o = dt(e, t).find(({ credits_grant: a }) => a == null ? void 0 : a.credits)) == null ? void 0 : o.credits_grant) == null ? void 0 : n.credits;
571
571
  }, Oe = (e, t) => ({ credits: { ...t, quantity: e } }), ct = (e, t) => {
572
572
  const o = Number(e), n = Number(t);
573
573
  return Number.isFinite(o) && Number.isFinite(n) ? String(o * n) : void 0;
574
574
  };
575
- function bo(e, t) {
576
- var p, y, T, x, v, g, m;
575
+ function wo(e, t) {
576
+ var c, g, b, S, f, h, v;
577
577
  if (!e.on_demand || !Me(e))
578
578
  return;
579
- const o = (y = (p = e.details) == null ? void 0 : p.bands) == null ? void 0 : y[0], n = ((T = o == null ? void 0 : o.minimum_amount) == null ? void 0 : T.currency) ?? ((x = o == null ? void 0 : o.maximum_amount) == null ? void 0 : x.currency) ?? ((g = (v = t == null ? void 0 : t.wallet_balance.balance) == null ? void 0 : v.amount) == null ? void 0 : g.currency);
579
+ const o = (g = (c = e.details) == null ? void 0 : c.bands) == null ? void 0 : g[0], n = ((b = o == null ? void 0 : o.minimum_amount) == null ? void 0 : b.currency) ?? ((S = o == null ? void 0 : o.maximum_amount) == null ? void 0 : S.currency) ?? ((h = (f = t == null ? void 0 : t.wallet_balance.balance) == null ? void 0 : f.amount) == null ? void 0 : h.currency);
580
580
  if (!n)
581
581
  return;
582
- const a = rt(t), i = a ? _o(e, t) : void 0, u = (m = a == null ? void 0 : a.credit_type) == null ? void 0 : m.unit_name, l = (U) => {
582
+ const a = rt(t), i = a ? yo(e, t) : void 0, l = (v = a == null ? void 0 : a.credit_type) == null ? void 0 : v.unit_name, u = (U) => {
583
583
  if (!U)
584
584
  return;
585
- const I = a && i ? ct(U.quantity, i.rate) : void 0;
586
- return I !== void 0 && a ? Oe(I, a) : { amount: U };
585
+ const B = a && i ? ct(U.quantity, i.rate) : void 0;
586
+ return B !== void 0 && a ? Oe(B, a) : { amount: U };
587
587
  };
588
588
  return {
589
589
  config: {
@@ -594,27 +594,27 @@ function bo(e, t) {
594
594
  ...i && {
595
595
  creditsConfiguration: {
596
596
  conversionRate: i.rate,
597
- ...(u == null ? void 0 : u.singular) && { unitNameSingle: u.singular },
598
- ...(u == null ? void 0 : u.plural) && { unitNamePlural: u.plural }
597
+ ...(l == null ? void 0 : l.singular) && { unitNameSingle: l.singular },
598
+ ...(l == null ? void 0 : l.plural) && { unitNamePlural: l.plural }
599
599
  }
600
600
  },
601
601
  bounds: {
602
- ...l(o == null ? void 0 : o.minimum_amount) && { minimum: l(o == null ? void 0 : o.minimum_amount) },
603
- ...l(o == null ? void 0 : o.maximum_amount) && { maximum: l(o == null ? void 0 : o.maximum_amount) }
602
+ ...u(o == null ? void 0 : o.minimum_amount) && { minimum: u(o == null ? void 0 : o.minimum_amount) },
603
+ ...u(o == null ? void 0 : o.maximum_amount) && { maximum: u(o == null ? void 0 : o.maximum_amount) }
604
604
  }
605
605
  };
606
606
  }
607
- const wo = (e) => {
607
+ const To = (e) => {
608
608
  var t, o, n, a, i;
609
609
  return !!((t = e.fixedPricing) != null && t.value.credits) || !!((o = e.flexiblePricing) != null && o.creditsConfiguration) || !!((i = ((n = e.flexiblePricing) == null ? void 0 : n.bounds.minimum) ?? ((a = e.flexiblePricing) == null ? void 0 : a.bounds.maximum)) != null && i.credits);
610
- }, To = (e) => {
610
+ }, Mo = (e) => {
611
611
  var t;
612
612
  for (const { fixedPricing: o, flexiblePricing: n } of e) {
613
613
  const a = (o == null ? void 0 : o.value.credits) ?? ((t = (n == null ? void 0 : n.bounds.minimum) ?? (n == null ? void 0 : n.bounds.maximum)) == null ? void 0 : t.credits);
614
614
  if (a != null && a.credit_type_id)
615
615
  return a.credit_type_id;
616
616
  }
617
- }, Mo = (e = []) => {
617
+ }, Uo = (e = []) => {
618
618
  for (const { flexiblePricing: t, fixedPricing: o } of e) {
619
619
  const n = (t == null ? void 0 : t.currency) ?? (o == null ? void 0 : o.amount.currency);
620
620
  if (n)
@@ -623,11 +623,11 @@ const wo = (e) => {
623
623
  }, pt = (e = []) => {
624
624
  var t, o, n;
625
625
  for (const { fixedPricing: a, flexiblePricing: i } of e) {
626
- const u = (a == null ? void 0 : a.value.credits) ?? ((t = (i == null ? void 0 : i.bounds.minimum) ?? (i == null ? void 0 : i.bounds.maximum)) == null ? void 0 : t.credits);
627
- if ((n = (o = u == null ? void 0 : u.credit_type) == null ? void 0 : o.unit_name) != null && n.plural)
628
- return u.credit_type.unit_name.plural;
626
+ const l = (a == null ? void 0 : a.value.credits) ?? ((t = (i == null ? void 0 : i.bounds.minimum) ?? (i == null ? void 0 : i.bounds.maximum)) == null ? void 0 : t.credits);
627
+ if ((n = (o = l == null ? void 0 : l.credit_type) == null ? void 0 : o.unit_name) != null && n.plural)
628
+ return l.credit_type.unit_name.plural;
629
629
  }
630
- }, Uo = (e = []) => {
630
+ }, Po = (e = []) => {
631
631
  var t;
632
632
  for (const { flexiblePricing: o } of e) {
633
633
  const n = (t = o == null ? void 0 : o.creditsConfiguration) == null ? void 0 : t.conversionRate;
@@ -641,9 +641,9 @@ const wo = (e) => {
641
641
  return { ...o && { minimum: o }, ...n && { maximum: n } };
642
642
  }
643
643
  return {};
644
- }, Po = (e = []) => {
645
- if (e.some(wo)) {
646
- const t = To(e);
644
+ }, Ao = (e = []) => {
645
+ if (e.some(To)) {
646
+ const t = Mo(e);
647
647
  return t ? { creditTypeId: t } : void 0;
648
648
  }
649
649
  for (const { flexiblePricing: t, fixedPricing: o } of e) {
@@ -651,79 +651,85 @@ const wo = (e) => {
651
651
  if (n)
652
652
  return { currency: n };
653
653
  }
654
- }, Ao = (e, t) => {
655
- var u;
654
+ }, Co = (e, t) => {
655
+ var l;
656
656
  if (e.fixedPricing)
657
657
  return e.fixedPricing.value;
658
658
  if (!e.flexiblePricing || !t)
659
659
  return;
660
- const { bounds: o, creditsConfiguration: n } = e.flexiblePricing, a = (u = o.minimum ?? o.maximum) == null ? void 0 : u.credits, i = n ? ct(t.quantity, n.conversionRate) : void 0;
660
+ const { bounds: o, creditsConfiguration: n } = e.flexiblePricing, a = (l = o.minimum ?? o.maximum) == null ? void 0 : l.credits, i = n ? ct(t.quantity, n.conversionRate) : void 0;
661
661
  return a && i !== void 0 ? Oe(i, a) : { amount: t };
662
662
  }, mt = (e = []) => {
663
- const t = Po(e);
663
+ const t = Ao(e);
664
664
  if (t)
665
665
  return {
666
666
  denomination: t,
667
- chargeCurrency: Mo(e) ?? "",
667
+ chargeCurrency: Uo(e) ?? "",
668
668
  creditUnitName: pt(e),
669
- conversionRate: Uo(e),
669
+ conversionRate: Po(e),
670
670
  topUpBounds: So(e)
671
671
  };
672
- }, Co = 400;
673
- function xo({
672
+ }, xo = 400;
673
+ function $o({
674
674
  pricingPlanScheduleId: e,
675
675
  pricingItems: t
676
676
  }) {
677
- const { previewChargeOnDemandPricingItems: o } = it(), n = _e(), a = E(), i = E(!1), u = It(), l = async () => {
678
- const p = e.value, y = u();
679
- if (!p || !t.value) {
680
- t.value && !p && n.warn(
677
+ const { previewChargeOnDemandPricingItems: o } = it(), n = _e(), a = $(), i = $(!1), l = $(!1), u = s(() => i.value || l.value), c = $(!1), g = It(), b = async () => {
678
+ const S = e.value, f = g();
679
+ if (l.value = !1, !S || !t.value) {
680
+ t.value && !S && n.warn(
681
681
  "INVOICE_PREVIEW_SKIPPED",
682
- "Skipped the top-up invoice preview: no schedule to charge it on",
682
+ "Skipped the on-demand charge invoice preview: no schedule to charge it on",
683
683
  { missing: ["pricingPlanScheduleId"] }
684
- ), a.value = void 0, i.value = !1;
684
+ ), a.value = void 0, i.value = !1, c.value = !1;
685
685
  return;
686
686
  }
687
- i.value = !0;
687
+ i.value = !0, c.value = !1;
688
688
  try {
689
- const T = await o({
690
- pricingPlanScheduleId: p,
689
+ const h = await o({
690
+ pricingPlanScheduleId: S,
691
691
  pricingItems: t.value
692
692
  });
693
- y() && (a.value = T);
694
- } catch (T) {
695
- y() && (a.value = void 0), n.error(
693
+ f() && (a.value = h);
694
+ } catch (h) {
695
+ f() && (a.value = void 0, c.value = !0), n.error(
696
696
  "INVOICE_PREVIEW_FAILED",
697
- "Failed to load top-up invoice preview",
698
- {},
699
- T
697
+ "Failed to load the invoice preview",
698
+ { preview: "ON_DEMAND_CHARGE" },
699
+ h
700
700
  );
701
701
  } finally {
702
- y() && (i.value = !1);
702
+ f() && (i.value = !1);
703
703
  }
704
704
  };
705
- return Ht(t, () => void l(), {
706
- debounce: Co,
705
+ return Wt(t, () => void b(), {
706
+ debounce: () => a.value || i.value || c.value ? xo : 0,
707
707
  deep: !0
708
- }), l(), { invoicePreview: a, isPreviewPending: i, loadPreview: l };
708
+ }), X(
709
+ t,
710
+ (S) => {
711
+ l.value = !!S, S || (g(), a.value = void 0, c.value = !1, i.value = !1);
712
+ },
713
+ { deep: !0, flush: "sync" }
714
+ ), b(), { invoicePreview: a, isPreviewPending: u, hasPreviewFailed: c, loadPreview: b };
709
715
  }
710
- const $o = { key: 0 }, ft = /* @__PURE__ */ z({
716
+ const Eo = { key: 0 }, vt = /* @__PURE__ */ z({
711
717
  __name: "TopUpInvoicePreview",
712
718
  props: {
713
719
  pricingPlanScheduleId: { type: String },
714
720
  pricingItems: { type: Array }
715
721
  },
716
722
  setup(e) {
717
- const t = e, { $t: o } = Q(), n = s(() => t.pricingPlanScheduleId), a = s(() => t.pricingItems), { invoicePreview: i } = xo({ pricingPlanScheduleId: n, pricingItems: a });
718
- return (u, l) => (w(), C(et, {
723
+ const t = e, { $t: o } = Q(), n = s(() => t.pricingPlanScheduleId), a = s(() => t.pricingItems), { invoicePreview: i } = $o({ pricingPlanScheduleId: n, pricingItems: a });
724
+ return (l, u) => (w(), C(et, {
719
725
  class: "sv-top-up-invoice-preview h-[152px]",
720
726
  "data-testid": "top-up-invoice-preview-skeleton"
721
727
  }, {
722
- default: h(() => [
723
- r(i) ? (w(), W("div", $o, [
724
- A(r(Yt), { required: "" }, {
725
- default: h(() => [
726
- F(N(r(o)({
728
+ default: _(() => [
729
+ r(i) ? (w(), W("div", Eo, [
730
+ A(r(Ht), { required: "" }, {
731
+ default: _(() => [
732
+ F(I(r(o)({
727
733
  defaultMessage: "You will pay",
728
734
  description: "Label above the preview of what topping up will be invoiced for",
729
735
  id: "topup_modal.invoice_preview.label"
@@ -731,8 +737,8 @@ const $o = { key: 0 }, ft = /* @__PURE__ */ z({
731
737
  ]),
732
738
  _: 1
733
739
  }),
734
- A(r(fe), { "content-background": "none" }, {
735
- default: h(() => [
740
+ A(r(ve), { "content-background": "none" }, {
741
+ default: _(() => [
736
742
  A(r(at), {
737
743
  invoice: r(i),
738
744
  "is-customer-facing": ""
@@ -740,61 +746,61 @@ const $o = { key: 0 }, ft = /* @__PURE__ */ z({
740
746
  ]),
741
747
  _: 1
742
748
  })
743
- ])) : R("", !0)
749
+ ])) : k("", !0)
744
750
  ]),
745
751
  _: 1
746
752
  }));
747
753
  }
748
- }), vt = (e, t) => e.currency ?? t ?? e.creditTypeId ?? "", Ve = (e, t) => ({
754
+ }), ft = (e, t) => e.currency ?? t ?? e.creditTypeId ?? "", qe = (e, t) => ({
749
755
  quantity: e ?? null,
750
756
  currency: t
751
757
  }), Ue = (e, { denomination: t, chargeCurrency: o, creditUnitName: n, minimumTopUp: a }) => {
752
- var i, u, l, p, y;
758
+ var i, l, u, c, g;
753
759
  return {
754
760
  enabled: (e == null ? void 0 : e.status) === "ACTIVE",
755
- threshold: Ve(
756
- ((u = (i = e == null ? void 0 : e.threshold) == null ? void 0 : i.amount) == null ? void 0 : u.quantity) ?? ((p = (l = e == null ? void 0 : e.threshold) == null ? void 0 : l.credits) == null ? void 0 : p.quantity),
757
- vt(t, n)
761
+ threshold: qe(
762
+ ((l = (i = e == null ? void 0 : e.threshold) == null ? void 0 : i.amount) == null ? void 0 : l.quantity) ?? ((c = (u = e == null ? void 0 : e.threshold) == null ? void 0 : u.credits) == null ? void 0 : c.quantity),
763
+ ft(t, n)
758
764
  ),
759
- topUpAmount: Ve(((y = e == null ? void 0 : e.topup_amount) == null ? void 0 : y.quantity) ?? a, o)
765
+ topUpAmount: qe(((g = e == null ? void 0 : e.topup_amount) == null ? void 0 : g.quantity) ?? a, o)
760
766
  };
761
- }, Eo = (e, t) => {
767
+ }, Oo = (e, t) => {
762
768
  var n;
763
769
  const o = (n = e.threshold) == null ? void 0 : n.quantity;
764
770
  return o ? t.creditTypeId ? { credits: { quantity: o, credit_type_id: t.creditTypeId } } : { amount: { quantity: o, currency: t.currency ?? "" } } : {};
765
- }, qe = (e, t) => {
771
+ }, Ve = (e, t) => {
766
772
  var o;
767
773
  return (o = e.topUpAmount) != null && o.quantity ? {
768
774
  quantity: e.topUpAmount.quantity,
769
775
  currency: e.topUpAmount.currency ?? t
770
776
  } : void 0;
771
- }, gt = (e, { denomination: t, chargeCurrency: o }) => ({
777
+ }, ht = (e, { denomination: t, chargeCurrency: o }) => ({
772
778
  status: e.enabled ? "ACTIVE" : "INACTIVE",
773
- threshold: Eo(e, t),
774
- ...qe(e, o) && {
775
- topup_amount: qe(e, o)
779
+ threshold: Oo(e, t),
780
+ ...Ve(e, o) && {
781
+ topup_amount: Ve(e, o)
776
782
  }
777
- }), Fe = (e, t) => gt(Ue(e, t), t), Le = (e, t) => JSON.stringify(e) === JSON.stringify(t), Ye = (e) => {
783
+ }), Fe = (e, t) => ht(Ue(e, t), t), Le = (e, t) => JSON.stringify(e) === JSON.stringify(t), Ye = (e) => {
778
784
  const t = Number(e == null ? void 0 : e.quantity);
779
785
  return e != null && e.quantity && Number.isFinite(t) ? t : void 0;
780
- }, Oo = (e, t) => {
786
+ }, Bo = (e, t) => {
781
787
  const o = Number(t == null ? void 0 : t.quantity);
782
788
  return e === null || !(t != null && t.quantity) || !Number.isFinite(o) || e >= o;
783
- }, Bo = (e, t) => {
789
+ }, Io = (e, t) => {
784
790
  const o = Number(t == null ? void 0 : t.quantity);
785
791
  return e === null || !(t != null && t.quantity) || !Number.isFinite(o) || e <= o;
786
- }, ve = (e) => {
792
+ }, fe = (e) => {
787
793
  const t = Number(e);
788
794
  return e != null && e !== "" && Number.isFinite(t) ? t : void 0;
789
795
  }, Be = (e, t, o) => {
790
- const n = ve(e), a = ve(o);
796
+ const n = fe(e), a = fe(o);
791
797
  if (!(n === void 0 || a === void 0 || a <= 0))
792
798
  return t === "CREDITS" ? n / a : n * a;
793
- }, He = (e, t, o, n) => t === o ? ve(e) : Be(e, t, n), Io = (e, t, o) => t === "CREDITS" ? Be(e, "AMOUNT", o) : ve(e), Ie = (e) => e.toFixed(2), We = (e, t) => t === "AMOUNT" ? Ie(e) : String(Number(e.toFixed(6))), ht = (e, t, o, n) => {
794
- const a = Io(e == null ? void 0 : e.quantity, t, o);
799
+ }, He = (e, t, o, n) => t === o ? fe(e) : Be(e, t, n), Do = (e, t, o) => t === "CREDITS" ? Be(e, "AMOUNT", o) : fe(e), Ie = (e) => e.toFixed(2), We = (e, t) => t === "AMOUNT" ? Ie(e) : String(Number(e.toFixed(6))), gt = (e, t, o, n) => {
800
+ const a = Do(e == null ? void 0 : e.quantity, t, o);
795
801
  if (a !== void 0)
796
802
  return t === "CREDITS" ? n(a) : Ie(a);
797
- }, Do = ["data-testid"], Se = /* @__PURE__ */ z({
803
+ }, No = ["data-testid"], Pe = /* @__PURE__ */ z({
798
804
  __name: "ConvertedAmountInput",
799
805
  props: /* @__PURE__ */ Ot({
800
806
  unit: { type: String },
@@ -816,92 +822,89 @@ const $o = { key: 0 }, ft = /* @__PURE__ */ z({
816
822
  }),
817
823
  emits: ["update:modelValue"],
818
824
  setup(e) {
819
- const t = e, o = $t(e, "modelValue"), { $t: n, formatNumber: a } = Q(), i = s(() => t.entryBase ?? t.modelBase), u = s(
820
- () => i.value !== t.modelBase && ve(t.conversionRate) !== void 0
821
- ), l = E("");
822
- ee(
825
+ const t = e, o = $t(e, "modelValue"), { $t: n, formatNumber: a } = Q(), i = s(() => t.entryBase ?? t.modelBase), l = s(
826
+ () => i.value !== t.modelBase && fe(t.conversionRate) !== void 0
827
+ ), u = $("");
828
+ X(
823
829
  () => [o.value, i.value, t.modelBase, t.conversionRate],
824
- ([f]) => {
825
- if (!u.value) {
826
- l.value = f ?? "";
830
+ ([p]) => {
831
+ if (!l.value) {
832
+ u.value = p ?? "";
827
833
  return;
828
834
  }
829
- if (f === y(l.value))
835
+ if (p === c(u.value))
830
836
  return;
831
837
  const P = He(
832
- f,
838
+ p,
833
839
  t.modelBase,
834
840
  i.value,
835
841
  t.conversionRate
836
842
  );
837
- l.value = P === void 0 ? "" : We(P, i.value);
843
+ u.value = P === void 0 ? "" : We(P, i.value);
838
844
  },
839
845
  { immediate: !0 }
840
846
  );
841
- function p(f) {
842
- return typeof f == "string" ? f : typeof f == "number" ? String(f) : "";
843
- }
844
- function y(f) {
845
- const P = He(f, i.value, t.modelBase, t.conversionRate);
847
+ function c(p) {
848
+ const P = He(p, i.value, t.modelBase, t.conversionRate);
846
849
  return P === void 0 ? "" : We(P, t.modelBase);
847
850
  }
848
- const T = s({
849
- get: () => l.value,
850
- set: (f) => {
851
- l.value = p(f), o.value = u.value ? y(l.value) : l.value;
851
+ const g = s({
852
+ get: () => u.value,
853
+ set: (p) => {
854
+ u.value = Vt(p), o.value = l.value ? c(u.value) : u.value;
852
855
  }
853
- }), x = s(
854
- () => Be(l.value, i.value, t.conversionRate)
855
- ), v = s(() => t.creditUnitName ? t.creditUnitName : i.value === "CREDITS" ? t.unit : n({
856
+ }), b = s(
857
+ () => Be(u.value, i.value, t.conversionRate)
858
+ ), S = s(() => t.creditUnitName ? t.creditUnitName : i.value === "CREDITS" ? t.unit : n({
856
859
  defaultMessage: "credits",
857
860
  description: "Generic name for a wallet credit, where its credit type does not name one",
858
861
  id: "converted_amount_input.credits"
859
- })), g = (f, P) => $e({ quantity: Ie(f), currency: P }), m = (f) => `${a(f)} ${v.value}`, U = s(() => {
860
- const f = t.error;
861
- return Array.isArray(f) ? f.length > 0 : !!(Et(f) ? f.value : f);
862
- }), I = s(() => {
863
- const f = x.value;
864
- if (!(U.value || !t.showConversionHint || f === void 0))
862
+ })), f = (p, P) => $e({ quantity: Ie(p), currency: P }), h = (p) => `${a(p)} ${S.value}`, v = s(() => {
863
+ const p = t.error;
864
+ return Array.isArray(p) ? p.length > 0 : !!(Et(p) ? p.value : p);
865
+ }), U = s(() => {
866
+ const p = b.value;
867
+ if (!(v.value || !t.showConversionHint || p === void 0))
865
868
  return i.value === "CREDITS" ? t.currency ? n(
866
869
  {
867
870
  defaultMessage: "Will cost {amount} excluding taxes",
868
871
  description: "Helper text under a credits field, naming what those credits cost in money",
869
872
  id: "converted_amount_input.cost"
870
873
  },
871
- { amount: g(f, t.currency) }
874
+ { amount: f(p, t.currency) }
872
875
  ) : void 0 : n(
873
876
  {
874
877
  defaultMessage: "Buys about {credits}",
875
878
  description: "Helper text under a money field, naming the credits that amount converts into",
876
879
  id: "converted_amount_input.buys"
877
880
  },
878
- { credits: m(f) }
881
+ { credits: h(p) }
879
882
  );
880
- }), G = (f) => ht(f, i.value, t.conversionRate, a), _ = s(
883
+ }), B = (p) => gt(p, i.value, t.conversionRate, a), J = s(
881
884
  () => {
882
- var f, P, O, D;
883
- return i.value === "CREDITS" ? v.value : ((P = (f = t.bounds) == null ? void 0 : f.minimum) == null ? void 0 : P.currency) ?? ((D = (O = t.bounds) == null ? void 0 : O.maximum) == null ? void 0 : D.currency) ?? t.unit;
885
+ var p, P, E, D;
886
+ return i.value === "CREDITS" ? S.value : ((P = (p = t.bounds) == null ? void 0 : p.minimum) == null ? void 0 : P.currency) ?? ((D = (E = t.bounds) == null ? void 0 : E.maximum) == null ? void 0 : D.currency) ?? t.unit;
884
887
  }
885
- ), S = s(() => {
886
- var D, b;
887
- const f = G((D = t.bounds) == null ? void 0 : D.minimum), P = G((b = t.bounds) == null ? void 0 : b.maximum), O = _.value;
888
- if (f && P)
888
+ ), y = s(() => {
889
+ var D, R;
890
+ const p = B((D = t.bounds) == null ? void 0 : D.minimum), P = B((R = t.bounds) == null ? void 0 : R.maximum), E = J.value;
891
+ if (p && P)
889
892
  return n(
890
893
  {
891
894
  defaultMessage: "Between {minimum} and {maximum} {unit}",
892
895
  description: "Range of what a flexible top-up may be charged for, beside its label",
893
896
  id: "converted_amount_input.bounds.range"
894
897
  },
895
- { minimum: f, maximum: P, unit: O }
898
+ { minimum: p, maximum: P, unit: E }
896
899
  );
897
- if (f)
900
+ if (p)
898
901
  return n(
899
902
  {
900
903
  defaultMessage: "At least {minimum} {unit}",
901
904
  description: "Smallest amount a flexible top-up may be charged for, beside its label",
902
905
  id: "converted_amount_input.bounds.minimum"
903
906
  },
904
- { minimum: f, unit: O }
907
+ { minimum: p, unit: E }
905
908
  );
906
909
  if (P)
907
910
  return n(
@@ -910,12 +913,12 @@ const $o = { key: 0 }, ft = /* @__PURE__ */ z({
910
913
  description: "Largest amount a flexible top-up may be charged for, beside its label",
911
914
  id: "converted_amount_input.bounds.maximum"
912
915
  },
913
- { maximum: P, unit: O }
916
+ { maximum: P, unit: E }
914
917
  );
915
918
  });
916
- return (f, P) => (w(), C(r(Wt), {
917
- modelValue: T.value,
918
- "onUpdate:modelValue": P[0] || (P[0] = (O) => T.value = O),
919
+ return (p, P) => (w(), C(r(jt), {
920
+ modelValue: g.value,
921
+ "onUpdate:modelValue": P[0] || (P[0] = (E) => g.value = E),
919
922
  class: "sv-converted-amount-input",
920
923
  type: "number",
921
924
  "as-text-type": "",
@@ -925,43 +928,43 @@ const $o = { key: 0 }, ft = /* @__PURE__ */ z({
925
928
  disabled: e.disabled,
926
929
  error: e.error
927
930
  }, re({
928
- suffix: h(() => [
929
- k("span", {
931
+ suffix: _(() => [
932
+ N("span", {
930
933
  "data-testid": `${e.name}-unit`
931
- }, N(e.unit), 9, Do)
934
+ }, I(e.unit), 9, No)
932
935
  ]),
933
936
  _: 2
934
937
  }, [
935
- S.value ? {
938
+ y.value ? {
936
939
  name: "label-suffix",
937
- fn: h(() => [
938
- A(r(X), {
940
+ fn: _(() => [
941
+ A(r(K), {
939
942
  tag: "span",
940
943
  variant: "body-xs",
941
944
  color: "subtle",
942
945
  "no-spacing": "",
943
946
  "data-testid": `${e.name}-bounds`
944
947
  }, {
945
- default: h(() => [
946
- F(N(S.value), 1)
948
+ default: _(() => [
949
+ F(I(y.value), 1)
947
950
  ]),
948
951
  _: 1
949
952
  }, 8, ["data-testid"])
950
953
  ]),
951
954
  key: "0"
952
955
  } : void 0,
953
- I.value ? {
956
+ U.value ? {
954
957
  name: "helper",
955
- fn: h(() => [
956
- A(r(X), {
958
+ fn: _(() => [
959
+ A(r(K), {
957
960
  tag: "span",
958
961
  variant: "body-xs",
959
962
  color: "subtle",
960
963
  "no-spacing": "",
961
964
  "data-testid": `${e.name}-conversion`
962
965
  }, {
963
- default: h(() => [
964
- F(N(I.value), 1)
966
+ default: _(() => [
967
+ F(I(U.value), 1)
965
968
  ]),
966
969
  _: 1
967
970
  }, 8, ["data-testid"])
@@ -970,7 +973,7 @@ const $o = { key: 0 }, ft = /* @__PURE__ */ z({
970
973
  } : void 0
971
974
  ]), 1032, ["modelValue", "name", "label", "required", "disabled", "error"]));
972
975
  }
973
- }), No = /* @__PURE__ */ z({
976
+ }), ko = /* @__PURE__ */ z({
974
977
  __name: "Section",
975
978
  props: {
976
979
  emphasized: { type: Boolean, default: !1 },
@@ -989,28 +992,28 @@ const $o = { key: 0 }, ft = /* @__PURE__ */ z({
989
992
  ].join(" "), n = s(
990
993
  () => [t.emphasized ? o : void 0, t.contentClasses].filter(Boolean).join(" ")
991
994
  ), a = s(() => {
992
- const { emphasized: i, ...u } = t;
993
- return u;
995
+ const { emphasized: i, ...l } = t;
996
+ return l;
994
997
  });
995
- return (i, u) => (w(), C(r(fe), le(a.value, {
998
+ return (i, l) => (w(), C(r(ve), le(a.value, {
996
999
  class: "sv-section",
997
1000
  "content-classes": n.value
998
1001
  }), re({
999
- default: h(() => [
1002
+ default: _(() => [
1000
1003
  se(i.$slots, "default")
1001
1004
  ]),
1002
1005
  _: 2
1003
1006
  }, [
1004
1007
  i.$slots.right ? {
1005
1008
  name: "right",
1006
- fn: h(() => [
1009
+ fn: _(() => [
1007
1010
  se(i.$slots, "right")
1008
1011
  ]),
1009
1012
  key: "0"
1010
1013
  } : void 0
1011
1014
  ]), 1040, ["content-classes"]));
1012
1015
  }
1013
- }), ko = { class: "flex grow flex-col" }, _t = /* @__PURE__ */ z({
1016
+ }), Ro = { class: "flex grow flex-col" }, _t = /* @__PURE__ */ z({
1014
1017
  __name: "AutoTopUpConfig",
1015
1018
  props: {
1016
1019
  config: { type: Object },
@@ -1026,57 +1029,57 @@ const $o = { key: 0 }, ft = /* @__PURE__ */ z({
1026
1029
  },
1027
1030
  emits: ["save"],
1028
1031
  setup(e, { expose: t, emit: o }) {
1029
- const n = e, a = o, { $t: i, formatNumber: u } = Q(), l = s(() => {
1030
- var b, $;
1032
+ const n = e, a = o, { $t: i, formatNumber: l } = Q(), u = s(() => {
1033
+ var T, x;
1031
1034
  return {
1032
1035
  denomination: n.denomination,
1033
1036
  chargeCurrency: n.chargeCurrency,
1034
1037
  creditUnitName: n.creditUnitName,
1035
- minimumTopUp: ($ = (b = n.topUpBounds) == null ? void 0 : b.minimum) == null ? void 0 : $.quantity
1038
+ minimumTopUp: (x = (T = n.topUpBounds) == null ? void 0 : T.minimum) == null ? void 0 : x.quantity
1036
1039
  };
1037
- }), p = E(Ue(n.config, l.value)), y = s(() => vt(n.denomination, n.creditUnitName)), T = s(
1040
+ }), c = $(Ue(n.config, u.value)), g = s(() => ft(n.denomination, n.creditUnitName)), b = s(
1038
1041
  () => n.denomination.creditTypeId ? "CREDITS" : "AMOUNT"
1039
- ), x = s(
1040
- () => T.value === "CREDITS" ? y.value : n.chargeCurrency
1041
- ), v = s({
1042
+ ), S = s(
1043
+ () => b.value === "CREDITS" ? g.value : n.chargeCurrency
1044
+ ), f = s({
1042
1045
  get: () => {
1043
- var b;
1044
- return ((b = p.value.threshold) == null ? void 0 : b.quantity) ?? "";
1046
+ var T;
1047
+ return ((T = c.value.threshold) == null ? void 0 : T.quantity) ?? "";
1045
1048
  },
1046
- set: (b) => {
1047
- p.value.threshold = { quantity: b || null, currency: y.value };
1049
+ set: (T) => {
1050
+ c.value.threshold = { quantity: T || null, currency: g.value };
1048
1051
  }
1049
- }), g = s({
1052
+ }), h = s({
1050
1053
  get: () => {
1051
- var b;
1052
- return ((b = p.value.topUpAmount) == null ? void 0 : b.quantity) ?? "";
1054
+ var T;
1055
+ return ((T = c.value.topUpAmount) == null ? void 0 : T.quantity) ?? "";
1053
1056
  },
1054
- set: (b) => {
1055
- p.value.topUpAmount = { quantity: b || null, currency: n.chargeCurrency };
1057
+ set: (T) => {
1058
+ c.value.topUpAmount = { quantity: T || null, currency: n.chargeCurrency };
1056
1059
  }
1057
1060
  });
1058
- ee(
1059
- () => [n.config, l.value],
1060
- ([b, $]) => {
1061
- Le(Fe(b, $), I()) || (p.value = Ue(b, $));
1061
+ X(
1062
+ () => [n.config, u.value],
1063
+ ([T, x]) => {
1064
+ Le(Fe(T, x), B()) || (c.value = Ue(T, x));
1062
1065
  }
1063
1066
  );
1064
- const m = s({
1065
- get: () => n.alwaysEnabled || p.value.enabled,
1066
- set: (b) => {
1067
- p.value.enabled = b;
1067
+ const v = s({
1068
+ get: () => n.alwaysEnabled || c.value.enabled,
1069
+ set: (T) => {
1070
+ c.value.enabled = T;
1068
1071
  }
1069
1072
  }), U = s(
1070
- () => gt({ ...p.value, enabled: m.value }, l.value)
1071
- ), I = () => U.value, G = Ae({
1072
- threshold: s(() => Ye(p.value.threshold) ?? null),
1073
- topUpAmount: s(() => Ye(p.value.topUpAmount) ?? null)
1074
- }), _ = (b) => {
1075
- if (!b)
1073
+ () => ht({ ...c.value, enabled: v.value }, u.value)
1074
+ ), B = () => U.value, J = Ae({
1075
+ threshold: s(() => Ye(c.value.threshold) ?? null),
1076
+ topUpAmount: s(() => Ye(c.value.topUpAmount) ?? null)
1077
+ }), y = (T) => {
1078
+ if (!T)
1076
1079
  return "";
1077
- const $ = ht(b, T.value, n.conversionRate, u);
1078
- return $ === void 0 ? $e(b) : `${$} ${x.value}`;
1079
- }, S = Ft(() => m.value), f = xe(
1080
+ const x = gt(T, b.value, n.conversionRate, l);
1081
+ return x === void 0 ? $e(T) : `${x} ${S.value}`;
1082
+ }, p = Lt(() => v.value), P = xe(
1080
1083
  {
1081
1084
  threshold: {
1082
1085
  required: ie.withMessage(
@@ -1085,7 +1088,7 @@ const $o = { key: 0 }, ft = /* @__PURE__ */ z({
1085
1088
  description: "Error shown under the auto top-up threshold when it is left empty",
1086
1089
  id: "auto_topup_config.threshold.required"
1087
1090
  }),
1088
- S
1091
+ p
1089
1092
  ),
1090
1093
  notNegative: ie.withMessage(
1091
1094
  () => i({
@@ -1093,7 +1096,7 @@ const $o = { key: 0 }, ft = /* @__PURE__ */ z({
1093
1096
  description: "Error shown under the auto top-up threshold when it is below zero",
1094
1097
  id: "auto_topup_config.threshold.not_negative"
1095
1098
  }),
1096
- (b) => b === null || b >= 0
1099
+ (T) => T === null || T >= 0
1097
1100
  )
1098
1101
  },
1099
1102
  topUpAmount: {
@@ -1103,7 +1106,7 @@ const $o = { key: 0 }, ft = /* @__PURE__ */ z({
1103
1106
  description: "Error shown under the auto top-up amount when it is left empty",
1104
1107
  id: "auto_topup_config.amount.required"
1105
1108
  }),
1106
- S
1109
+ p
1107
1110
  ),
1108
1111
  positive: ie.withMessage(
1109
1112
  () => i({
@@ -1111,88 +1114,88 @@ const $o = { key: 0 }, ft = /* @__PURE__ */ z({
1111
1114
  description: "Error shown under the auto top-up amount when it is zero or negative",
1112
1115
  id: "auto_topup_config.amount.positive"
1113
1116
  }),
1114
- (b) => b === null || b > 0
1117
+ (T) => T === null || T > 0
1115
1118
  ),
1116
1119
  atLeastMinimum: ie.withMessage(
1117
1120
  () => {
1118
- var b;
1121
+ var T;
1119
1122
  return i(
1120
1123
  {
1121
1124
  defaultMessage: "Top up with at least {minimum}.",
1122
1125
  description: "Error shown under the auto top-up amount when it is below what the pricing allows",
1123
1126
  id: "auto_topup_config.amount.at_least_minimum"
1124
1127
  },
1125
- { minimum: _((b = n.topUpBounds) == null ? void 0 : b.minimum) }
1128
+ { minimum: y((T = n.topUpBounds) == null ? void 0 : T.minimum) }
1126
1129
  );
1127
1130
  },
1128
- (b) => {
1129
- var $;
1130
- return Oo(b, ($ = n.topUpBounds) == null ? void 0 : $.minimum);
1131
+ (T) => {
1132
+ var x;
1133
+ return Bo(T, (x = n.topUpBounds) == null ? void 0 : x.minimum);
1131
1134
  }
1132
1135
  ),
1133
1136
  withinMaximum: ie.withMessage(
1134
1137
  () => {
1135
- var b;
1138
+ var T;
1136
1139
  return i(
1137
1140
  {
1138
1141
  defaultMessage: "Top up with at most {maximum}.",
1139
1142
  description: "Error shown under the auto top-up amount when it is above what the pricing allows",
1140
1143
  id: "auto_topup_config.amount.within_maximum"
1141
1144
  },
1142
- { maximum: _((b = n.topUpBounds) == null ? void 0 : b.maximum) }
1145
+ { maximum: y((T = n.topUpBounds) == null ? void 0 : T.maximum) }
1143
1146
  );
1144
1147
  },
1145
- (b) => {
1146
- var $;
1147
- return Bo(b, ($ = n.topUpBounds) == null ? void 0 : $.maximum);
1148
+ (T) => {
1149
+ var x;
1150
+ return Io(T, (x = n.topUpBounds) == null ? void 0 : x.maximum);
1148
1151
  }
1149
1152
  )
1150
1153
  }
1151
1154
  },
1152
- G
1153
- ), P = s(
1155
+ J
1156
+ ), E = s(
1154
1157
  () => !Le(
1155
- I(),
1156
- Fe(n.config, l.value)
1158
+ B(),
1159
+ Fe(n.config, u.value)
1157
1160
  )
1158
1161
  );
1159
- function O() {
1160
- return f.value.$touch(), f.value.$invalid ? void 0 : I();
1161
- }
1162
1162
  function D() {
1163
- const b = O();
1164
- b && a("save", b);
1163
+ return P.value.$touch(), P.value.$invalid ? void 0 : B();
1164
+ }
1165
+ function R() {
1166
+ const T = D();
1167
+ T && a("save", T);
1165
1168
  }
1166
1169
  return t({
1167
- submit: D,
1168
- validate: O,
1170
+ submit: R,
1171
+ validate: D,
1169
1172
  rule: U,
1170
- hasChanges: P,
1171
- isInvalid: s(() => f.value.$invalid)
1172
- }), (b, $) => (w(), C(No, {
1173
+ hasChanges: E,
1174
+ isInvalid: s(() => P.value.$invalid)
1175
+ }), (T, x) => (w(), C(ko, {
1173
1176
  class: "sv-auto-topup-config",
1174
1177
  "content-background": e.contained ? "gray" : "none",
1175
1178
  "no-spacing": !e.contained,
1176
1179
  "no-border": !e.contained
1177
1180
  }, {
1178
- default: h(() => [
1179
- e.alwaysEnabled ? R("", !0) : (w(), C(r(qt), {
1181
+ default: _(() => [
1182
+ e.alwaysEnabled ? k("", !0) : (w(), C(r(Ft), {
1180
1183
  key: 0,
1181
- modelValue: m.value,
1182
- "onUpdate:modelValue": $[0] || ($[0] = (K) => m.value = K),
1184
+ modelValue: v.value,
1185
+ "onUpdate:modelValue": x[0] || (x[0] = (G) => v.value = G),
1183
1186
  "no-spacing": "",
1184
1187
  "label-position": "before",
1185
1188
  class: "!flex",
1186
1189
  disabled: e.disabled
1187
1190
  }, {
1188
- "inline-label": h(() => [
1189
- k("div", ko, [
1190
- A(r(X), {
1191
+ "inline-label": _(() => [
1192
+ N("div", Ro, [
1193
+ A(r(K), {
1191
1194
  tag: "span",
1192
1195
  variant: "body-sm"
1193
1196
  }, {
1194
- default: h(() => [
1195
- F(N(r(i)({
1197
+ default: _(() => [
1198
+ F(I(r(i)({
1196
1199
  defaultMessage: "Auto top-up",
1197
1200
  description: "Title of the automatic wallet top-up settings",
1198
1201
  id: "auto_topup_config.title"
@@ -1200,13 +1203,13 @@ const $o = { key: 0 }, ft = /* @__PURE__ */ z({
1200
1203
  ]),
1201
1204
  _: 1
1202
1205
  }),
1203
- A(r(X), {
1206
+ A(r(K), {
1204
1207
  tag: "span",
1205
1208
  variant: "body-xs",
1206
1209
  color: "subtle"
1207
1210
  }, {
1208
- default: h(() => [
1209
- F(N(r(i)({
1211
+ default: _(() => [
1212
+ F(I(r(i)({
1210
1213
  defaultMessage: "Automatically top up your balance when it runs low.",
1211
1214
  description: "Subtitle of the automatic wallet top-up settings",
1212
1215
  id: "auto_topup_config.subtitle"
@@ -1218,38 +1221,38 @@ const $o = { key: 0 }, ft = /* @__PURE__ */ z({
1218
1221
  ]),
1219
1222
  _: 1
1220
1223
  }, 8, ["modelValue", "disabled"])),
1221
- A(r(nt), { "is-open": m.value }, {
1222
- default: h(() => [
1223
- m.value ? (w(), W("div", {
1224
+ A(r(nt), { "is-open": v.value }, {
1225
+ default: _(() => [
1226
+ v.value ? (w(), W("div", {
1224
1227
  key: 0,
1225
1228
  class: ze(["grid grid-cols-1 gap-3", { "mt-4": !e.alwaysEnabled }])
1226
1229
  }, [
1227
- A(Se, {
1228
- modelValue: v.value,
1229
- "onUpdate:modelValue": $[1] || ($[1] = (K) => v.value = K),
1230
+ A(Pe, {
1231
+ modelValue: f.value,
1232
+ "onUpdate:modelValue": x[1] || (x[1] = (G) => f.value = G),
1230
1233
  name: "auto-top-up-threshold",
1231
- unit: y.value,
1232
- "model-base": T.value,
1233
- "entry-base": T.value,
1234
+ unit: g.value,
1235
+ "model-base": b.value,
1236
+ "entry-base": b.value,
1234
1237
  currency: e.chargeCurrency,
1235
1238
  "conversion-rate": e.conversionRate,
1236
1239
  "show-conversion-hint": e.showThresholdConversion,
1237
1240
  required: "",
1238
1241
  disabled: e.disabled,
1239
- error: r(f).threshold.$errors,
1242
+ error: r(P).threshold.$errors,
1240
1243
  label: r(i)({
1241
1244
  defaultMessage: "When your balance falls below",
1242
1245
  description: "Label of the balance at which an automatic top-up is charged",
1243
1246
  id: "auto_topup_config.threshold.label"
1244
1247
  })
1245
1248
  }, null, 8, ["modelValue", "unit", "model-base", "entry-base", "currency", "conversion-rate", "show-conversion-hint", "disabled", "error", "label"]),
1246
- A(Se, {
1247
- modelValue: g.value,
1248
- "onUpdate:modelValue": $[2] || ($[2] = (K) => g.value = K),
1249
+ A(Pe, {
1250
+ modelValue: h.value,
1251
+ "onUpdate:modelValue": x[2] || (x[2] = (G) => h.value = G),
1249
1252
  name: "auto-top-up-amount",
1250
- unit: x.value,
1253
+ unit: S.value,
1251
1254
  "model-base": "AMOUNT",
1252
- "entry-base": T.value,
1255
+ "entry-base": b.value,
1253
1256
  currency: e.chargeCurrency,
1254
1257
  "credit-unit-name": e.creditUnitName,
1255
1258
  "conversion-rate": e.conversionRate,
@@ -1257,14 +1260,14 @@ const $o = { key: 0 }, ft = /* @__PURE__ */ z({
1257
1260
  "show-conversion-hint": "",
1258
1261
  required: "",
1259
1262
  disabled: e.disabled,
1260
- error: r(f).topUpAmount.$errors,
1263
+ error: r(P).topUpAmount.$errors,
1261
1264
  label: r(i)({
1262
1265
  defaultMessage: "Top-up with",
1263
1266
  description: "Label of the amount every automatic top-up adds",
1264
1267
  id: "auto_topup_config.amount.label"
1265
1268
  })
1266
1269
  }, null, 8, ["modelValue", "unit", "entry-base", "currency", "credit-unit-name", "conversion-rate", "bounds", "disabled", "error", "label"])
1267
- ], 2)) : R("", !0)
1270
+ ], 2)) : k("", !0)
1268
1271
  ]),
1269
1272
  _: 1
1270
1273
  }, 8, ["is-open"])
@@ -1286,23 +1289,23 @@ function yt({
1286
1289
  (a, i) => je(i.created_at) - je(a.created_at)
1287
1290
  )
1288
1291
  );
1289
- return ee(
1292
+ return X(
1290
1293
  () => [
1291
1294
  e.value,
1292
1295
  o == null ? void 0 : o.value,
1293
1296
  t.value
1294
1297
  ],
1295
- ([a, i, u], l) => {
1296
- var x;
1297
- const p = l == null ? void 0 : l[0], y = a == null ? void 0 : a.find(
1298
- ({ id: v }) => !(p != null && p.some((g) => g.id === v))
1298
+ ([a, i, l], u) => {
1299
+ var S;
1300
+ const c = u == null ? void 0 : u[0], g = a == null ? void 0 : a.find(
1301
+ ({ id: f }) => !(c != null && c.some((h) => h.id === f))
1299
1302
  );
1300
- if (y && (p != null && p.length)) {
1301
- t.value = y.id;
1303
+ if (g && (c != null && c.length)) {
1304
+ t.value = g.id;
1302
1305
  return;
1303
1306
  }
1304
- const T = (v) => !!v && !!(a != null && a.some((g) => g.id === v));
1305
- T(u) || (t.value = T(i) ? i : (x = (a == null ? void 0 : a.find(({ is_default: v }) => v)) ?? n.value[0]) == null ? void 0 : x.id);
1307
+ const b = (f) => !!f && !!(a != null && a.some((h) => h.id === f));
1308
+ b(l) || (t.value = b(i) ? i : (S = (a == null ? void 0 : a.find(({ is_default: f }) => f)) ?? n.value[0]) == null ? void 0 : S.id);
1306
1309
  },
1307
1310
  { immediate: !0 }
1308
1311
  ), { sortedPaymentMethods: n };
@@ -1311,7 +1314,7 @@ function ye() {
1311
1314
  const { $t: e, formatNumber: t } = Q(), o = (a) => Ce(e, t, a);
1312
1315
  return { formatValue: o, formatOpenBalance: (a) => o(a == null ? void 0 : a.wallet_balance.open_balance) };
1313
1316
  }
1314
- const Ro = { class: "sv-top-up-form" }, Vo = { class: "grid grid-cols-1 gap-4" }, qo = { class: "grid grid-cols-1 gap-1" }, Fo = { class: "sv-top-up-form__option-details" }, Lo = { key: 0 }, Yo = /* @__PURE__ */ z({
1317
+ const qo = { class: "sv-top-up-form" }, Vo = { class: "grid grid-cols-1 gap-4" }, Fo = { class: "grid grid-cols-1 gap-1" }, Lo = { class: "sv-top-up-form__option-details" }, Yo = { key: 0 }, Ho = /* @__PURE__ */ z({
1315
1318
  __name: "TopUpModalForm",
1316
1319
  props: {
1317
1320
  topUpPricingItems: { type: null },
@@ -1321,121 +1324,121 @@ const Ro = { class: "sv-top-up-form" }, Vo = { class: "grid grid-cols-1 gap-4" }
1321
1324
  },
1322
1325
  emits: ["add-payment-method", "success", "save-auto-top-up", "failure"],
1323
1326
  setup(e, { expose: t, emit: o }) {
1324
- const n = e, a = o, { $t: i } = Q(), { formatValue: u } = ye(), l = E({
1327
+ const n = e, a = o, { $t: i } = Q(), { formatValue: l } = ye(), u = $({
1325
1328
  pricing_plan_schedule_id: "",
1326
1329
  pricing_items: [],
1327
1330
  start_at: "",
1328
1331
  finalize_immediately: !1,
1329
1332
  payment_method_id: void 0,
1330
1333
  preview: !0
1331
- }), p = s(() => {
1334
+ }), c = s(() => {
1332
1335
  const d = (n.topUpPricingItems ?? []).filter(
1333
- (c) => c.flexiblePricing || c.fixedPricing
1336
+ (m) => m.flexiblePricing || m.fixedPricing
1334
1337
  );
1335
1338
  return [
1336
- ...d.filter(({ flexiblePricing: c }) => c),
1337
- ...d.filter(({ flexiblePricing: c }) => !c)
1339
+ ...d.filter(({ flexiblePricing: m }) => m),
1340
+ ...d.filter(({ flexiblePricing: m }) => !m)
1338
1341
  ];
1339
- }), y = (d) => p.value.find((c) => c.pricingItemId === d), T = s(
1342
+ }), g = (d) => c.value.find((m) => m.pricingItemId === d), b = s(
1340
1343
  () => {
1341
- var d, c;
1342
- return (c = (d = n.topUpPricingItems) == null ? void 0 : d.find((M) => M.pricingPlanScheduleId)) == null ? void 0 : c.pricingPlanScheduleId;
1344
+ var d, m;
1345
+ return (m = (d = n.topUpPricingItems) == null ? void 0 : d.find((M) => M.pricingPlanScheduleId)) == null ? void 0 : m.pricingPlanScheduleId;
1343
1346
  }
1344
1347
  );
1345
- ee(
1346
- T,
1348
+ X(
1349
+ b,
1347
1350
  (d) => {
1348
- l.value.pricing_plan_schedule_id = d ?? "";
1351
+ u.value.pricing_plan_schedule_id = d ?? "";
1349
1352
  },
1350
1353
  { immediate: !0 }
1351
1354
  );
1352
- const x = (d) => {
1353
- const { config: c, currency: M } = d.flexiblePricing ?? {}, V = c == null ? void 0 : c.minimum_amount;
1354
- return V && M ? { quantity: V.quantity, currency: M } : void 0;
1355
- }, v = s({
1355
+ const S = (d) => {
1356
+ const { config: m, currency: M } = d.flexiblePricing ?? {}, q = m == null ? void 0 : m.minimum_amount;
1357
+ return q && M ? { quantity: q.quantity, currency: M } : void 0;
1358
+ }, f = s({
1356
1359
  get: () => {
1357
1360
  var d;
1358
- return (d = l.value.pricing_items[0]) == null ? void 0 : d.pricing_item_id;
1361
+ return (d = u.value.pricing_items[0]) == null ? void 0 : d.pricing_item_id;
1359
1362
  },
1360
1363
  set: (d) => {
1361
- const c = y(typeof d == "string" ? d : void 0);
1362
- if (!c) {
1363
- l.value.pricing_items = [];
1364
+ const m = g(typeof d == "string" ? d : void 0);
1365
+ if (!m) {
1366
+ u.value.pricing_items = [];
1364
1367
  return;
1365
1368
  }
1366
- const M = x(c);
1367
- l.value.pricing_items = [
1369
+ const M = S(m);
1370
+ u.value.pricing_items = [
1368
1371
  {
1369
- pricing_item_id: c.pricingItemId,
1372
+ pricing_item_id: m.pricingItemId,
1370
1373
  ...M && { flexible_amount: M }
1371
1374
  }
1372
1375
  ];
1373
1376
  }
1374
1377
  });
1375
- ee(
1376
- p,
1378
+ X(
1379
+ c,
1377
1380
  (d) => {
1378
1381
  if (d.some(
1379
- ({ pricingItemId: V }) => {
1382
+ ({ pricingItemId: q }) => {
1380
1383
  var Y;
1381
- return V === ((Y = l.value.pricing_items[0]) == null ? void 0 : Y.pricing_item_id);
1384
+ return q === ((Y = u.value.pricing_items[0]) == null ? void 0 : Y.pricing_item_id);
1382
1385
  }
1383
1386
  ))
1384
1387
  return;
1385
- const M = d.find(({ flexiblePricing: V }) => V) ?? d[0];
1386
- v.value = M == null ? void 0 : M.pricingItemId;
1388
+ const M = d.find(({ flexiblePricing: q }) => q) ?? d[0];
1389
+ f.value = M == null ? void 0 : M.pricingItemId;
1387
1390
  },
1388
1391
  { immediate: !0 }
1389
1392
  );
1390
- const g = s({
1393
+ const h = s({
1391
1394
  get: () => {
1392
1395
  var d;
1393
- return (d = l.value.pricing_items[0]) == null ? void 0 : d.flexible_amount;
1396
+ return (d = u.value.pricing_items[0]) == null ? void 0 : d.flexible_amount;
1394
1397
  },
1395
1398
  set: (d) => {
1396
1399
  var M;
1397
- const c = (M = l.value.pricing_items[0]) == null ? void 0 : M.pricing_item_id;
1398
- c && (l.value.pricing_items = [
1399
- { pricing_item_id: c, ...d && { flexible_amount: d } }
1400
+ const m = (M = u.value.pricing_items[0]) == null ? void 0 : M.pricing_item_id;
1401
+ m && (u.value.pricing_items = [
1402
+ { pricing_item_id: m, ...d && { flexible_amount: d } }
1400
1403
  ]);
1401
1404
  }
1402
- }), m = (d) => {
1405
+ }), v = (d) => {
1403
1406
  var M;
1404
- const c = (M = y(String(d))) == null ? void 0 : M.fixedPricing;
1405
- return c != null && c.value.credits ? $e(c.amount) : void 0;
1407
+ const m = (M = g(String(d))) == null ? void 0 : M.fixedPricing;
1408
+ return m != null && m.value.credits ? $e(m.amount) : void 0;
1406
1409
  }, U = s(
1407
1410
  () => {
1408
1411
  var d;
1409
- return (d = y(String(v.value))) == null ? void 0 : d.flexiblePricing;
1412
+ return (d = g(String(f.value))) == null ? void 0 : d.flexiblePricing;
1410
1413
  }
1411
- ), I = s({
1414
+ ), B = s({
1412
1415
  get: () => {
1413
1416
  var d;
1414
- return ((d = g.value) == null ? void 0 : d.quantity) ?? "";
1417
+ return ((d = h.value) == null ? void 0 : d.quantity) ?? "";
1415
1418
  },
1416
1419
  set: (d) => {
1417
1420
  var M;
1418
- const c = (M = U.value) == null ? void 0 : M.currency;
1419
- g.value = d && c ? { quantity: d, currency: c } : void 0;
1421
+ const m = (M = U.value) == null ? void 0 : M.currency;
1422
+ h.value = d && m ? { quantity: d, currency: m } : void 0;
1420
1423
  }
1421
- }), G = (d) => d.creditsConfiguration ? "CREDITS" : "AMOUNT", _ = s(() => pt(n.topUpPricingItems)), S = (d) => d.creditsConfiguration ? _.value ?? d.creditsConfiguration.unitNamePlural ?? d.creditsConfiguration.unitNameSingle ?? "" : d.currency, f = (d) => {
1424
+ }), J = (d) => d.creditsConfiguration ? "CREDITS" : "AMOUNT", y = s(() => pt(n.topUpPricingItems)), p = (d) => d.creditsConfiguration ? y.value ?? d.creditsConfiguration.unitNamePlural ?? d.creditsConfiguration.unitNameSingle ?? "" : d.currency, P = (d) => {
1422
1425
  var M;
1423
- const c = (M = y(String(d))) == null ? void 0 : M.flexiblePricing;
1424
- return c ? [c] : [];
1425
- }, P = (d) => {
1426
- var c;
1427
- return !!((c = y(String(d))) != null && c.flexiblePricing);
1428
- }, O = s(
1429
- () => p.value.map((d) => {
1430
- var c;
1426
+ const m = (M = g(String(d))) == null ? void 0 : M.flexiblePricing;
1427
+ return m ? [m] : [];
1428
+ }, E = (d) => {
1429
+ var m;
1430
+ return !!((m = g(String(d))) != null && m.flexiblePricing);
1431
+ }, D = s(
1432
+ () => c.value.map((d) => {
1433
+ var m;
1431
1434
  return {
1432
1435
  value: d.pricingItemId,
1433
- label: d.fixedPricing ? u(d.fixedPricing.value) : i({
1436
+ label: d.fixedPricing ? l(d.fixedPricing.value) : i({
1434
1437
  defaultMessage: "Choose your own amount",
1435
1438
  description: "Label of the choose-your-amount option in the top-up modal",
1436
1439
  id: "topup_modal.flexible_option.label"
1437
1440
  }),
1438
- ...((c = d.flexiblePricing) == null ? void 0 : c.bounds.minimum) && d.flexiblePricing.bounds.maximum && {
1441
+ ...((m = d.flexiblePricing) == null ? void 0 : m.bounds.minimum) && d.flexiblePricing.bounds.maximum && {
1439
1442
  description: i(
1440
1443
  {
1441
1444
  defaultMessage: "Between {minimum} and {maximum}",
@@ -1443,25 +1446,25 @@ const Ro = { class: "sv-top-up-form" }, Vo = { class: "grid grid-cols-1 gap-4" }
1443
1446
  id: "topup_modal.flexible_option.bounds"
1444
1447
  },
1445
1448
  {
1446
- minimum: u(d.flexiblePricing.bounds.minimum),
1447
- maximum: u(d.flexiblePricing.bounds.maximum)
1449
+ minimum: l(d.flexiblePricing.bounds.minimum),
1450
+ maximum: l(d.flexiblePricing.bounds.maximum)
1448
1451
  }
1449
1452
  )
1450
1453
  }
1451
1454
  };
1452
1455
  })
1453
- ), D = s(() => {
1454
- const d = l.value.pricing_items.filter(
1455
- (c) => {
1456
+ ), R = s(() => {
1457
+ const d = u.value.pricing_items.filter(
1458
+ (m) => {
1456
1459
  var M;
1457
- return !((M = y(c.pricing_item_id)) != null && M.flexiblePricing) || !!c.flexible_amount;
1460
+ return !((M = g(m.pricing_item_id)) != null && M.flexiblePricing) || !!m.flexible_amount;
1458
1461
  }
1459
1462
  );
1460
1463
  return d.length > 0 ? d : void 0;
1461
- }), b = s(() => !n.autoTopUpConfig && p.value.some(({ flexiblePricing: c }) => c) ? mt(n.topUpPricingItems) : void 0), $ = E(), { chargeOnDemandPricingItems: K } = it(), de = _e(), J = E(!1), te = s(
1462
- () => !!l.value.pricing_plan_schedule_id && !!D.value && !!l.value.payment_method_id
1464
+ }), T = s(() => !n.autoTopUpConfig && c.value.some(({ flexiblePricing: m }) => m) ? mt(n.topUpPricingItems) : void 0), x = $(), { chargeOnDemandPricingItems: G } = it(), de = _e(), Z = $(!1), te = s(
1465
+ () => !!u.value.pricing_plan_schedule_id && !!R.value && !!u.value.payment_method_id
1463
1466
  ), ce = Ae({
1464
- paymentMethodId: s(() => l.value.payment_method_id ?? null)
1467
+ paymentMethodId: s(() => u.value.payment_method_id ?? null)
1465
1468
  }), ne = xe(
1466
1469
  {
1467
1470
  paymentMethodId: {
@@ -1477,56 +1480,56 @@ const Ro = { class: "sv-top-up-form" }, Vo = { class: "grid grid-cols-1 gap-4" }
1477
1480
  },
1478
1481
  ce
1479
1482
  ), oe = s(() => {
1480
- const [d] = l.value.pricing_items, c = y(d == null ? void 0 : d.pricing_item_id);
1481
- return c ? Ao(c, d == null ? void 0 : d.flexible_amount) : void 0;
1483
+ const [d] = u.value.pricing_items, m = g(d == null ? void 0 : d.pricing_item_id);
1484
+ return m ? Co(m, d == null ? void 0 : d.flexible_amount) : void 0;
1482
1485
  });
1483
1486
  async function pe() {
1484
- var c, M, V;
1487
+ var m, M, q;
1485
1488
  ne.value.$touch();
1486
- const d = (c = $.value) == null ? void 0 : c.validate();
1487
- if (!(ne.value.$invalid || (M = $.value) != null && M.isInvalid || !te.value || J.value)) {
1488
- J.value = !0;
1489
+ const d = (m = x.value) == null ? void 0 : m.validate();
1490
+ if (!(ne.value.$invalid || (M = x.value) != null && M.isInvalid || !te.value || Z.value)) {
1491
+ Z.value = !0;
1489
1492
  try {
1490
- const Y = await K({
1491
- pricing_plan_schedule_id: l.value.pricing_plan_schedule_id,
1492
- pricing_items: D.value ?? [],
1493
- payment_method_id: l.value.payment_method_id,
1493
+ const Y = await G({
1494
+ pricing_plan_schedule_id: u.value.pricing_plan_schedule_id,
1495
+ pricing_items: R.value ?? [],
1496
+ payment_method_id: u.value.payment_method_id,
1494
1497
  preview: !1
1495
1498
  });
1496
- d && ((V = $.value) != null && V.hasChanges) && l.value.payment_method_id && a("save-auto-top-up", {
1499
+ d && ((q = x.value) != null && q.hasChanges) && u.value.payment_method_id && a("save-auto-top-up", {
1497
1500
  rule: d,
1498
- paymentMethodId: l.value.payment_method_id
1501
+ paymentMethodId: u.value.payment_method_id
1499
1502
  }), a("success", Y);
1500
1503
  } catch (Y) {
1501
1504
  de.error("TOP_UP_FAILED", "Failed to charge the wallet top-up", {}, Y), a("failure", Y);
1502
1505
  } finally {
1503
- J.value = !1;
1506
+ Z.value = !1;
1504
1507
  }
1505
1508
  }
1506
1509
  }
1507
- t({ submit: pe, isCharging: J, canSubmit: te, chargedValue: oe });
1510
+ t({ submit: pe, isCharging: Z, canSubmit: te, chargedValue: oe });
1508
1511
  const ae = s({
1509
- get: () => l.value.payment_method_id ?? void 0,
1512
+ get: () => u.value.payment_method_id ?? void 0,
1510
1513
  set: (d) => {
1511
- l.value.payment_method_id = d;
1514
+ u.value.payment_method_id = d;
1512
1515
  }
1513
1516
  }), { sortedPaymentMethods: me } = yt({
1514
1517
  paymentMethods: s(() => n.paymentMethods),
1515
1518
  selectedPaymentMethodId: ae
1516
1519
  });
1517
- return (d, c) => (w(), W("form", Ro, [
1518
- k("div", Vo, [
1519
- k("div", qo, [
1520
- O.value.length > 0 ? (w(), C(r(tt), {
1520
+ return (d, m) => (w(), W("form", qo, [
1521
+ N("div", Vo, [
1522
+ N("div", Fo, [
1523
+ D.value.length > 0 ? (w(), C(r(tt), {
1521
1524
  key: 0,
1522
- modelValue: v.value,
1523
- "onUpdate:modelValue": c[3] || (c[3] = (M) => v.value = M),
1525
+ modelValue: f.value,
1526
+ "onUpdate:modelValue": m[3] || (m[3] = (M) => f.value = M),
1524
1527
  class: "sv-top-up-form__options",
1525
1528
  name: "top-up-pricing-item",
1526
1529
  direction: "column",
1527
1530
  required: "",
1528
- disabled: J.value,
1529
- options: O.value,
1531
+ disabled: Z.value,
1532
+ options: D.value,
1530
1533
  "show-radio": !1,
1531
1534
  label: r(i)({
1532
1535
  defaultMessage: "Top up amount",
@@ -1534,9 +1537,9 @@ const Ro = { class: "sv-top-up-form" }, Vo = { class: "grid grid-cols-1 gap-4" }
1534
1537
  id: "topup_modal.pricing_items.label"
1535
1538
  })
1536
1539
  }, {
1537
- label: h(({ option: M, optionValue: V }) => [
1538
- k("span", null, N(M.label), 1),
1539
- m(V) ? (w(), C(r(X), {
1540
+ label: _(({ option: M, optionValue: q }) => [
1541
+ N("span", null, I(M.label), 1),
1542
+ v(q) ? (w(), C(r(K), {
1540
1543
  key: 0,
1541
1544
  tag: "span",
1542
1545
  variant: "body-sm",
@@ -1545,120 +1548,120 @@ const Ro = { class: "sv-top-up-form" }, Vo = { class: "grid grid-cols-1 gap-4" }
1545
1548
  "no-spacing": "",
1546
1549
  class: "sv-top-up-form__option-cost"
1547
1550
  }, {
1548
- default: h(() => [
1549
- F(N(m(V)), 1)
1551
+ default: _(() => [
1552
+ F(I(v(q)), 1)
1550
1553
  ]),
1551
1554
  _: 2
1552
- }, 1024)) : R("", !0)
1555
+ }, 1024)) : k("", !0)
1553
1556
  ]),
1554
- description: h(({ option: M, optionValue: V }) => [
1555
- k("div", Fo, [
1556
- M.description && !P(V) ? (w(), C(r(X), {
1557
+ description: _(({ option: M, optionValue: q }) => [
1558
+ N("div", Lo, [
1559
+ M.description && !E(q) ? (w(), C(r(K), {
1557
1560
  key: 0,
1558
1561
  tag: "span",
1559
1562
  variant: "body-xs",
1560
1563
  color: "subtle",
1561
1564
  "no-spacing": ""
1562
1565
  }, {
1563
- default: h(() => [
1564
- F(N(M.description), 1)
1566
+ default: _(() => [
1567
+ F(I(M.description), 1)
1565
1568
  ]),
1566
1569
  _: 2
1567
- }, 1024)) : R("", !0),
1568
- f(V).length > 0 ? (w(), C(r(nt), {
1570
+ }, 1024)) : k("", !0),
1571
+ P(q).length > 0 ? (w(), C(r(nt), {
1569
1572
  key: 1,
1570
- "is-open": String(V) === v.value,
1573
+ "is-open": String(q) === f.value,
1571
1574
  lazy: ""
1572
1575
  }, {
1573
- default: h(() => [
1574
- (w(!0), W(ge, null, he(f(V), (Y) => {
1575
- var q;
1576
+ default: _(() => [
1577
+ (w(!0), W(he, null, ge(P(q), (Y) => {
1578
+ var V;
1576
1579
  return w(), W("div", {
1577
1580
  key: Y.currency,
1578
1581
  class: "sv-top-up-form__amount grid grid-cols-1 gap-3",
1579
- onClick: c[1] || (c[1] = Ne(() => {
1582
+ onClick: m[1] || (m[1] = Ne(() => {
1580
1583
  }, ["stop"])),
1581
- onKeydown: c[2] || (c[2] = Ne(() => {
1584
+ onKeydown: m[2] || (m[2] = Ne(() => {
1582
1585
  }, ["stop"]))
1583
1586
  }, [
1584
- M.description ? (w(), C(r(X), {
1587
+ M.description ? (w(), C(r(K), {
1585
1588
  key: 0,
1586
1589
  tag: "span",
1587
1590
  variant: "body-xs",
1588
1591
  color: "subtle",
1589
1592
  "no-spacing": ""
1590
1593
  }, {
1591
- default: h(() => [
1592
- F(N(M.description), 1)
1594
+ default: _(() => [
1595
+ F(I(M.description), 1)
1593
1596
  ]),
1594
1597
  _: 2
1595
- }, 1024)) : R("", !0),
1596
- A(Se, {
1597
- modelValue: I.value,
1598
- "onUpdate:modelValue": c[0] || (c[0] = (j) => I.value = j),
1598
+ }, 1024)) : k("", !0),
1599
+ A(Pe, {
1600
+ modelValue: B.value,
1601
+ "onUpdate:modelValue": m[0] || (m[0] = (j) => B.value = j),
1599
1602
  name: "top-up-amount",
1600
1603
  "model-base": "AMOUNT",
1601
- unit: S(Y),
1602
- "entry-base": G(Y),
1604
+ unit: p(Y),
1605
+ "entry-base": J(Y),
1603
1606
  currency: Y.currency,
1604
- "conversion-rate": (q = Y.creditsConfiguration) == null ? void 0 : q.conversionRate,
1607
+ "conversion-rate": (V = Y.creditsConfiguration) == null ? void 0 : V.conversionRate,
1605
1608
  required: "",
1606
- disabled: J.value
1609
+ disabled: Z.value
1607
1610
  }, null, 8, ["modelValue", "unit", "entry-base", "currency", "conversion-rate", "disabled"])
1608
1611
  ], 32);
1609
1612
  }), 128))
1610
1613
  ]),
1611
1614
  _: 2
1612
- }, 1032, ["is-open"])) : R("", !0)
1615
+ }, 1032, ["is-open"])) : k("", !0)
1613
1616
  ])
1614
1617
  ]),
1615
1618
  _: 1
1616
- }, 8, ["modelValue", "disabled", "options", "label"])) : R("", !0)
1619
+ }, 8, ["modelValue", "disabled", "options", "label"])) : k("", !0)
1617
1620
  ]),
1618
- k("div", null, [
1619
- A(ft, {
1620
- "pricing-plan-schedule-id": T.value,
1621
- "pricing-items": D.value
1621
+ N("div", null, [
1622
+ A(vt, {
1623
+ "pricing-plan-schedule-id": b.value,
1624
+ "pricing-items": R.value
1622
1625
  }, null, 8, ["pricing-plan-schedule-id", "pricing-items"])
1623
1626
  ]),
1624
- b.value ? (w(), W("div", Lo, [
1627
+ T.value ? (w(), W("div", Yo, [
1625
1628
  A(_t, le({
1626
1629
  ref_key: "autoTopUpFormRef",
1627
- ref: $,
1630
+ ref: x,
1628
1631
  class: "sv-top-up-form__auto-top-up"
1629
- }, b.value, {
1632
+ }, T.value, {
1630
1633
  contained: "",
1631
1634
  "show-threshold-conversion": !1,
1632
- disabled: J.value
1635
+ disabled: Z.value
1633
1636
  }), null, 16, ["disabled"])
1634
- ])) : R("", !0),
1635
- k("div", null, [
1636
- A(r(Lt), { spacing: "xs" })
1637
+ ])) : k("", !0),
1638
+ N("div", null, [
1639
+ A(r(Yt), { spacing: "xs" })
1637
1640
  ]),
1638
- k("div", null, [
1641
+ N("div", null, [
1639
1642
  se(d.$slots, "payment-method", {}, () => [
1640
1643
  A(st, {
1641
1644
  modelValue: ae.value,
1642
- "onUpdate:modelValue": c[4] || (c[4] = (M) => ae.value = M),
1645
+ "onUpdate:modelValue": m[4] || (m[4] = (M) => ae.value = M),
1643
1646
  class: "sv-top-up-form__payment-methods",
1644
1647
  "payment-methods": r(me),
1645
1648
  required: "",
1646
1649
  error: r(ne).paymentMethodId.$errors,
1647
1650
  "payment-method-options": e.paymentMethodOptions,
1648
- disabled: J.value,
1651
+ disabled: Z.value,
1649
1652
  label: r(i)({
1650
1653
  defaultMessage: "Payment method",
1651
1654
  description: "Label above the payment method that pays for the top-up, in the top-up modal",
1652
1655
  id: "topup_modal.payment_method_selector.label"
1653
1656
  }),
1654
- onAddPaymentMethod: c[5] || (c[5] = (M) => a("add-payment-method"))
1657
+ onAddPaymentMethod: m[5] || (m[5] = (M) => a("add-payment-method"))
1655
1658
  }, null, 8, ["modelValue", "payment-methods", "error", "payment-method-options", "disabled", "label"])
1656
1659
  ])
1657
1660
  ])
1658
1661
  ])
1659
1662
  ]));
1660
1663
  }
1661
- }), Ho = { class: "sv-top-up-success grid grid-cols-1 gap-4" }, Wo = /* @__PURE__ */ z({
1664
+ }), Wo = { class: "sv-top-up-success grid grid-cols-1 gap-4" }, jo = /* @__PURE__ */ z({
1662
1665
  __name: "TopUpModalSuccess",
1663
1666
  props: {
1664
1667
  addedValue: { type: Object },
@@ -1666,20 +1669,20 @@ const Ro = { class: "sv-top-up-form" }, Vo = { class: "grid grid-cols-1 gap-4" }
1666
1669
  },
1667
1670
  setup(e) {
1668
1671
  const { $t: t } = Q();
1669
- return (o, n) => (w(), W("div", Ho, [
1670
- e.invoice ? (w(), C(r(fe), {
1672
+ return (o, n) => (w(), W("div", Wo, [
1673
+ e.invoice ? (w(), C(r(ve), {
1671
1674
  key: 0,
1672
1675
  "content-background": "none"
1673
1676
  }, {
1674
- default: h(() => [
1675
- A(r(X), {
1677
+ default: _(() => [
1678
+ A(r(K), {
1676
1679
  tag: "span",
1677
1680
  variant: "body-sm",
1678
1681
  weight: "semibold",
1679
1682
  class: "mb-2 block"
1680
1683
  }, {
1681
- default: h(() => [
1682
- F(N(r(t)({
1684
+ default: _(() => [
1685
+ F(I(r(t)({
1683
1686
  defaultMessage: "Receipt",
1684
1687
  description: "Heading above the invoice a completed top-up produced",
1685
1688
  id: "topup_modal.success.receipt.heading"
@@ -1693,11 +1696,11 @@ const Ro = { class: "sv-top-up-form" }, Vo = { class: "grid grid-cols-1 gap-4" }
1693
1696
  }, null, 8, ["invoice"])
1694
1697
  ]),
1695
1698
  _: 1
1696
- })) : R("", !0)
1699
+ })) : k("", !0)
1697
1700
  ]));
1698
1701
  }
1699
1702
  });
1700
- function jo({
1703
+ function zo({
1701
1704
  step: e,
1702
1705
  currentBalance: t,
1703
1706
  topUpValue: o
@@ -1714,7 +1717,7 @@ function jo({
1714
1717
  defaultMessage: "Top up balance",
1715
1718
  description: "Title of the wallet top-up modal",
1716
1719
  id: "topup_modal.title"
1717
- })), u = s(() => e.value === "ADD_PAYMENT_METHOD" ? n({
1720
+ })), l = s(() => e.value === "ADD_PAYMENT_METHOD" ? n({
1718
1721
  defaultMessage: "Add a new payment method for topping up your balance.",
1719
1722
  description: "Subtitle of the top-up modal while the customer is adding a payment method",
1720
1723
  id: "topup_modal.add_payment_method.subtitle"
@@ -1729,7 +1732,7 @@ function jo({
1729
1732
  id: "topup_modal.subtitle"
1730
1733
  },
1731
1734
  { balance: t.value }
1732
- )), l = s(
1735
+ )), u = s(
1733
1736
  () => e.value === "ADD_PAYMENT_METHOD" ? n({
1734
1737
  defaultMessage: "Back",
1735
1738
  description: "Label of the button that leaves the add payment method step in the top-up modal",
@@ -1739,7 +1742,7 @@ function jo({
1739
1742
  description: "Label of the button that closes the top-up modal",
1740
1743
  id: "topup_modal.cancel_button.label"
1741
1744
  })
1742
- ), p = s(() => e.value === "ADD_PAYMENT_METHOD" ? n({
1745
+ ), c = s(() => e.value === "ADD_PAYMENT_METHOD" ? n({
1743
1746
  defaultMessage: "Save payment method",
1744
1747
  description: "Label of the confirm button in the top-up modal while adding a payment method",
1745
1748
  id: "topup_modal.save_payment_method.label"
@@ -1759,100 +1762,110 @@ function jo({
1759
1762
  description: "Label of the confirm button in the top-up modal while no amount is entered",
1760
1763
  id: "topup_modal.confirm_button.empty.label"
1761
1764
  }));
1762
- return { title: i, subTitle: u, cancelButtonText: l, confirmButtonText: p };
1765
+ return { title: i, subTitle: l, cancelButtonText: u, confirmButtonText: c };
1763
1766
  }
1764
1767
  function bt({
1765
1768
  isOpen: e,
1766
- customer: t
1769
+ customer: t,
1770
+ subscriptionId: o,
1771
+ onError: n
1767
1772
  }) {
1768
- const { paymentMethodOptions: o, get: n, isPending: a } = Gt();
1769
- ee(
1770
- () => [e.value, t.value],
1771
- ([u, l]) => {
1772
- !u || !l || n({
1773
- customerId: l.id,
1774
- country: Qt(l)
1775
- });
1776
- },
1773
+ const { paymentMethodOptions: a, get: i, isPending: l } = Kt(), u = async () => {
1774
+ const g = t.value;
1775
+ if (!(!e.value || !g))
1776
+ try {
1777
+ await i({
1778
+ customerId: g.id,
1779
+ ...o != null && o.value ? { subscriptionId: o.value } : {},
1780
+ country: Gt(g)
1781
+ });
1782
+ } catch (b) {
1783
+ n == null || n(b);
1784
+ }
1785
+ };
1786
+ X(
1787
+ () => [e.value, t.value, o == null ? void 0 : o.value],
1788
+ () => void u(),
1777
1789
  { immediate: !0 }
1778
1790
  );
1779
- const i = s(
1780
- () => a.value ? void 0 : o.value
1791
+ const c = s(
1792
+ () => l.value ? void 0 : a.value
1781
1793
  );
1782
- return { paymentMethodOptions: o, settledOptions: i, isPending: a };
1794
+ return { paymentMethodOptions: a, settledOptions: c, isPending: l, load: u };
1783
1795
  }
1784
- function zo(e) {
1785
- const t = E(0), o = (a) => {
1796
+ function Qo(e) {
1797
+ const t = $(0), o = (a) => {
1786
1798
  t.value = (a == null ? void 0 : a.offsetHeight) ?? 0;
1787
1799
  }, n = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver((a) => {
1788
- var u;
1789
- const i = (u = a[0]) == null ? void 0 : u.target;
1800
+ var l;
1801
+ const i = (l = a[0]) == null ? void 0 : l.target;
1790
1802
  o(i instanceof HTMLElement ? i : void 0);
1791
1803
  });
1792
- return ee(
1804
+ return X(
1793
1805
  e,
1794
1806
  (a, i) => {
1795
1807
  i && (n == null || n.unobserve(i)), o(a), a && (n == null || n.observe(a));
1796
1808
  },
1797
1809
  // `post` so the callback runs after the render that assigns the template ref, not before.
1798
1810
  { immediate: !0, flush: "post" }
1799
- ), Pe(() => {
1811
+ ), Se(() => {
1800
1812
  n == null || n.disconnect();
1801
1813
  }), t;
1802
1814
  }
1803
- const Qo = ["inert"], Go = 300, Ko = "1rem", Xo = /* @__PURE__ */ z({
1815
+ const Go = ["inert"], Ko = 300, Xo = "1rem", Jo = /* @__PURE__ */ z({
1804
1816
  __name: "SlidingPanes",
1805
1817
  props: {
1806
1818
  panes: { type: Array },
1807
1819
  current: { type: String }
1808
1820
  },
1809
1821
  setup(e) {
1810
- const t = e, o = E(!1);
1822
+ const t = e, o = $(!1);
1811
1823
  let n;
1812
- ee(
1824
+ X(
1813
1825
  () => t.current,
1814
1826
  () => {
1815
1827
  o.value = !0, clearTimeout(n), n = setTimeout(() => {
1816
1828
  o.value = !1;
1817
- }, Go);
1829
+ }, Ko);
1818
1830
  }
1819
- ), Pe(() => {
1831
+ ), Se(() => {
1820
1832
  clearTimeout(n);
1821
1833
  });
1822
- const a = E({}), i = {}, u = (T) => i[T] ?? (i[T] = (x) => {
1823
- a.value[T] = x instanceof HTMLElement ? x : void 0;
1824
- }), l = s(() => a.value[t.current]), p = zo(l), y = s(() => {
1825
- const T = t.panes.indexOf(t.current);
1826
- return T > 0 ? `translateX(calc(${-T} * (100% + ${Ko})))` : "translateX(0px)";
1834
+ const a = $({}), i = {}, l = (b) => i[b] ?? (i[b] = (S) => {
1835
+ a.value[b] = S instanceof HTMLElement ? S : void 0;
1836
+ }), u = s(() => a.value[t.current]), c = Qo(u), g = s(() => {
1837
+ const b = t.panes.indexOf(t.current);
1838
+ return b > 0 ? `translateX(calc(${-b} * (100% + ${Xo})))` : "translateX(0px)";
1827
1839
  });
1828
- return (T, x) => (w(), W("div", {
1840
+ return (b, S) => (w(), W("div", {
1829
1841
  class: ze([
1830
1842
  "sv-sliding-panes__viewport relative -mx-2 overflow-hidden px-2",
1831
1843
  o.value ? "transition-[height] duration-300 ease-in-out motion-reduce:transition-none" : ""
1832
1844
  ]),
1833
- style: ke(r(p) ? { height: `${r(p)}px` } : void 0)
1845
+ style: ke(r(c) ? { height: `${r(c)}px` } : void 0)
1834
1846
  }, [
1835
- k("div", {
1847
+ N("div", {
1836
1848
  class: "sv-sliding-panes__track flex items-start gap-4 transition-transform duration-300 ease-in-out motion-reduce:transition-none",
1837
- style: ke({ transform: y.value })
1849
+ style: ke({ transform: g.value })
1838
1850
  }, [
1839
- (w(!0), W(ge, null, he(e.panes, (v) => (w(), W("div", {
1840
- key: v,
1851
+ (w(!0), W(he, null, ge(e.panes, (f) => (w(), W("div", {
1852
+ key: f,
1841
1853
  class: "sv-sliding-panes__pane w-full shrink-0",
1842
- inert: v !== e.current || void 0
1854
+ inert: f !== e.current || void 0
1843
1855
  }, [
1844
- k("div", {
1856
+ N("div", {
1845
1857
  ref_for: !0,
1846
- ref: u(v)
1858
+ ref: l(f)
1847
1859
  }, [
1848
- se(T.$slots, v)
1860
+ se(b.$slots, f)
1849
1861
  ], 512)
1850
- ], 8, Qo))), 128))
1862
+ ], 8, Go))), 128))
1851
1863
  ], 4)
1852
1864
  ], 6));
1853
1865
  }
1854
- }), Jo = { class: "grid grid-cols-1 gap-4 pb-4" }, wt = /* @__PURE__ */ z({
1855
- __name: "WalletModalShell",
1866
+ }), wt = /* @__PURE__ */ z({
1867
+ inheritAttrs: !1,
1868
+ __name: "OnDemandPaymentModalShell",
1856
1869
  props: {
1857
1870
  showModal: { type: Boolean },
1858
1871
  title: { type: String },
@@ -1870,7 +1883,7 @@ const Qo = ["inert"], Go = 300, Ko = "1rem", Xo = /* @__PURE__ */ z({
1870
1883
  },
1871
1884
  emits: ["confirm", "cancel", "payment-success", "payment-failed"],
1872
1885
  setup(e, { expose: t }) {
1873
- const o = e, n = E(), a = s(() => o.panes.filter((i) => i !== o.addPaymentMethodPane));
1886
+ const o = e, n = $(), a = s(() => o.panes.filter((i) => i !== o.addPaymentMethodPane));
1874
1887
  return t({
1875
1888
  submit: () => {
1876
1889
  var i;
@@ -1880,7 +1893,7 @@ const Qo = ["inert"], Go = 300, Ko = "1rem", Xo = /* @__PURE__ */ z({
1880
1893
  var i;
1881
1894
  return !!((i = n.value) != null && i.isSaving);
1882
1895
  })
1883
- }), (i, u) => (w(), C(r(lt), {
1896
+ }), (i, l) => (w(), C(r(lt), {
1884
1897
  "no-click-away": "",
1885
1898
  "show-modal": e.showModal,
1886
1899
  size: "lg",
@@ -1889,43 +1902,43 @@ const Qo = ["inert"], Go = 300, Ko = "1rem", Xo = /* @__PURE__ */ z({
1889
1902
  "cancel-button-text": e.cancelButtonText,
1890
1903
  "confirm-button-text": e.confirmButtonText,
1891
1904
  "is-loading": e.isPending,
1892
- onConfirm: u[2] || (u[2] = (l) => i.$emit("confirm")),
1893
- onClose: u[3] || (u[3] = (l) => i.$emit("cancel"))
1905
+ onConfirm: l[2] || (l[2] = (u) => i.$emit("confirm")),
1906
+ onClose: l[3] || (l[3] = (u) => i.$emit("cancel"))
1894
1907
  }, re({
1895
- body: h(() => [
1896
- k("div", Jo, [
1897
- A(Xo, {
1908
+ body: _(() => [
1909
+ N("div", le({ class: "grid grid-cols-1 gap-4 pb-4" }, i.$attrs), [
1910
+ A(Jo, {
1898
1911
  panes: e.panes,
1899
1912
  current: e.step
1900
1913
  }, re({
1901
- [e.addPaymentMethodPane]: h(() => [
1902
- A(jt, {
1914
+ [e.addPaymentMethodPane]: _(() => [
1915
+ A(zt, {
1903
1916
  ref_key: "paneRef",
1904
1917
  ref: n,
1905
1918
  customer: e.customer,
1906
1919
  "payment-method-options": e.paymentMethodOptions,
1907
1920
  "is-loading": e.isPaymentMethodOptionsPending,
1908
1921
  "is-active": e.isAddingPaymentMethod,
1909
- onSuccess: u[0] || (u[0] = (l) => i.$emit("payment-success")),
1910
- onFailure: u[1] || (u[1] = (l) => i.$emit("payment-failed", l))
1922
+ onSuccess: l[0] || (l[0] = (u) => i.$emit("payment-success")),
1923
+ onFailure: l[1] || (l[1] = (u) => i.$emit("payment-failed", u))
1911
1924
  }, null, 8, ["customer", "payment-method-options", "is-loading", "is-active"])
1912
1925
  ]),
1913
1926
  _: 2
1914
1927
  }, [
1915
- he(a.value, (l) => ({
1916
- name: l,
1917
- fn: h(() => [
1918
- se(i.$slots, l)
1928
+ ge(a.value, (u) => ({
1929
+ name: u,
1930
+ fn: _(() => [
1931
+ se(i.$slots, u)
1919
1932
  ])
1920
1933
  }))
1921
1934
  ]), 1032, ["panes", "current"])
1922
- ])
1935
+ ], 16)
1923
1936
  ]),
1924
1937
  _: 2
1925
1938
  }, [
1926
1939
  i.$slots.footer ? {
1927
1940
  name: "footer",
1928
- fn: h(() => [
1941
+ fn: _(() => [
1929
1942
  se(i.$slots, "footer")
1930
1943
  ]),
1931
1944
  key: "0"
@@ -1954,14 +1967,14 @@ const Qo = ["inert"], Go = 300, Ko = "1rem", Xo = /* @__PURE__ */ z({
1954
1967
  pricingItemId: o.pricingItemId,
1955
1968
  pricingPlanScheduleId: o.pricingPlanScheduleId
1956
1969
  } : void 0;
1957
- }, St = ({
1970
+ }, Pt = ({
1958
1971
  rule: e,
1959
1972
  walletBalanceItem: t,
1960
1973
  chargeTarget: o,
1961
1974
  paymentMethodId: n
1962
1975
  }) => {
1963
- var i, u;
1964
- const a = !!(((i = e == null ? void 0 : e.threshold) == null ? void 0 : i.amount) ?? ((u = e == null ? void 0 : e.threshold) == null ? void 0 : u.credits));
1976
+ var i, l;
1977
+ const a = !!(((i = e == null ? void 0 : e.threshold) == null ? void 0 : i.amount) ?? ((l = e == null ? void 0 : e.threshold) == null ? void 0 : l.credits));
1965
1978
  if (!(!e || !a || !(t != null && t.wallet_id) || !o || !n))
1966
1979
  return {
1967
1980
  wallet_id: t.wallet_id,
@@ -1973,12 +1986,12 @@ const Qo = ["inert"], Go = 300, Ko = "1rem", Xo = /* @__PURE__ */ z({
1973
1986
  ...e.topup_amount && { topup_amount: e.topup_amount }
1974
1987
  };
1975
1988
  };
1976
- function Pt({
1989
+ function St({
1977
1990
  step: e,
1978
1991
  name: t,
1979
1992
  returnTo: o
1980
1993
  }) {
1981
- const n = E();
1994
+ const n = $();
1982
1995
  return {
1983
1996
  paneRef: n,
1984
1997
  isActive: s(() => e.value === t),
@@ -2000,28 +2013,28 @@ function Pt({
2000
2013
  }
2001
2014
  function At() {
2002
2015
  const e = Qe(), t = Ge(), o = "/portal/auto-top-up-configs";
2003
- function n(l) {
2016
+ function n(u) {
2004
2017
  return e({
2005
2018
  url: `${t.apiUrls.config}${o}`,
2006
- query: { ...l },
2019
+ query: { ...u },
2007
2020
  isCollection: !0
2008
2021
  });
2009
2022
  }
2010
- function a(l) {
2023
+ function a(u) {
2011
2024
  return e({
2012
- url: `${t.apiUrls.config}${o}/${l}`
2025
+ url: `${t.apiUrls.config}${o}/${u}`
2013
2026
  });
2014
2027
  }
2015
- function i(l) {
2028
+ function i(u) {
2016
2029
  return e({
2017
2030
  url: `${t.apiUrls.config}${o}`,
2018
2031
  options: { method: "POST" },
2019
- data: l
2032
+ data: u
2020
2033
  });
2021
2034
  }
2022
- function u(l) {
2035
+ function l(u) {
2023
2036
  return e({
2024
- url: `${t.apiUrls.config}${o}/${l}/deactivate`,
2037
+ url: `${t.apiUrls.config}${o}/${u}/deactivate`,
2025
2038
  options: { method: "POST" }
2026
2039
  });
2027
2040
  }
@@ -2029,11 +2042,11 @@ function At() {
2029
2042
  getAutoTopUpConfigs: n,
2030
2043
  getAutoTopUpConfig: a,
2031
2044
  createAutoTopUpConfig: i,
2032
- deactivateAutoTopUpConfig: u
2045
+ deactivateAutoTopUpConfig: l
2033
2046
  };
2034
2047
  }
2035
2048
  function Ct() {
2036
- const { createAutoTopUpConfig: e } = At(), t = _e(), o = E(!1);
2049
+ const { createAutoTopUpConfig: e } = At(), t = _e(), o = $(!1);
2037
2050
  return { save: async (a) => {
2038
2051
  if (!a || o.value)
2039
2052
  return { saved: !1 };
@@ -2066,140 +2079,140 @@ const Zo = {
2066
2079
  },
2067
2080
  emits: ["confirm", "close", "auto-top-up-saved", "payment-success", "payment-failed"],
2068
2081
  setup(e, { emit: t }) {
2069
- const o = e, n = t, { $t: a } = Q(), { formatOpenBalance: i } = ye(), u = s(
2082
+ const o = e, n = t, { $t: a } = Q(), { formatOpenBalance: i } = ye(), l = s(
2070
2083
  () => Mt(Tt(o.selectedBalanceItem))
2071
- ), l = s(() => i(o.selectedBalanceItem)), p = s(
2072
- () => vo(o.selectedBalanceItem, o.subscriptions ?? [])
2073
- ), y = E();
2074
- ee(
2075
- p,
2076
- (B) => {
2084
+ ), u = s(() => i(o.selectedBalanceItem)), c = s(
2085
+ () => ho(o.selectedBalanceItem, o.subscriptions ?? [])
2086
+ ), g = $();
2087
+ X(
2088
+ c,
2089
+ (O) => {
2077
2090
  var L;
2078
- B.some(
2079
- ({ id: be }) => be === y.value
2080
- ) || (y.value = (L = B[0]) == null ? void 0 : L.id);
2091
+ O.some(
2092
+ ({ id: be }) => be === g.value
2093
+ ) || (g.value = (L = O[0]) == null ? void 0 : L.id);
2081
2094
  },
2082
2095
  { immediate: !0 }
2083
2096
  );
2084
- const T = s(() => p.value.length > 1), x = s(
2085
- () => p.value.map(({ id: B, name: H }) => ({ value: B, label: H }))
2086
- ), v = s(
2097
+ const b = s(() => c.value.length > 1), S = s(
2098
+ () => c.value.map(({ id: O, name: H }) => ({ value: O, label: H }))
2099
+ ), f = s(
2087
2100
  () => Object.fromEntries(
2088
- p.value.flatMap(({ id: B, enabledPricingIds: H }) => {
2089
- const L = (o.subscriptions ?? []).find(({ id: be }) => be === B);
2090
- return L ? [[B, { subscription: L, enabledPricingIds: H }]] : [];
2101
+ c.value.flatMap(({ id: O, enabledPricingIds: H }) => {
2102
+ const L = (o.subscriptions ?? []).find(({ id: be }) => be === O);
2103
+ return L ? [[O, { subscription: L, enabledPricingIds: H }]] : [];
2091
2104
  })
2092
2105
  )
2093
- ), g = s(() => {
2106
+ ), h = s(() => {
2094
2107
  var H;
2095
2108
  if (!o.selectedBalanceItem || !((H = o.subscriptions) != null && H.length))
2096
2109
  return o.selectedBalanceItem;
2097
- const B = p.value.find(({ id: L }) => L === y.value);
2098
- return B ? go(o.selectedBalanceItem, B.scheduleIds) : { ...o.selectedBalanceItem, charge_on_demand_pricing_items: [] };
2099
- }), m = s(() => ut(g.value)), {
2110
+ const O = c.value.find(({ id: L }) => L === g.value);
2111
+ return O ? go(o.selectedBalanceItem, O.scheduleIds) : { ...o.selectedBalanceItem, charge_on_demand_pricing_items: [] };
2112
+ }), v = s(() => ut(h.value)), {
2100
2113
  paymentMethodOptions: U,
2101
- settledOptions: I,
2102
- isPending: G
2114
+ settledOptions: B,
2115
+ isPending: J
2103
2116
  } = bt({
2104
2117
  isOpen: s(() => o.showModal),
2105
2118
  customer: s(() => o.customer)
2106
- }), _ = E("TOP_UP"), S = s(() => (o.paymentMethods ?? []).length > 0), f = s(
2107
- () => !G.value && (U.value ?? []).length === 0
2108
- ), P = s(
2109
- () => _.value === "TOP_UP" && !S.value && f.value
2110
- ), O = E(), D = E(), b = () => {
2119
+ }), y = $("TOP_UP"), p = s(() => (o.paymentMethods ?? []).length > 0), P = s(
2120
+ () => !J.value && (U.value ?? []).length === 0
2121
+ ), E = s(
2122
+ () => y.value === "TOP_UP" && !p.value && P.value
2123
+ ), D = $(), R = $(), T = () => {
2111
2124
  te(), n("payment-success");
2112
2125
  }, {
2113
- paneRef: $,
2114
- isActive: K,
2126
+ paneRef: x,
2127
+ isActive: G,
2115
2128
  isSaving: de,
2116
- open: J,
2129
+ open: Z,
2117
2130
  leave: te,
2118
2131
  submit: ce
2119
- } = Pt({ step: _, name: "ADD_PAYMENT_METHOD", returnTo: "TOP_UP" }), { save: ne } = Ct(), oe = E(), pe = s(() => {
2120
- var B;
2121
- return (B = oe.value) == null ? void 0 : B.chargedValue;
2132
+ } = St({ step: y, name: "ADD_PAYMENT_METHOD", returnTo: "TOP_UP" }), { save: ne } = Ct(), oe = $(), pe = s(() => {
2133
+ var O;
2134
+ return (O = oe.value) == null ? void 0 : O.chargedValue;
2122
2135
  }), ae = s(() => {
2123
- var B;
2124
- return de.value || !!((B = oe.value) != null && B.isCharging);
2125
- }), { title: me, subTitle: d, cancelButtonText: c, confirmButtonText: M } = jo({
2126
- step: _,
2127
- currentBalance: l,
2136
+ var O;
2137
+ return de.value || !!((O = oe.value) != null && O.isCharging);
2138
+ }), { title: me, subTitle: d, cancelButtonText: m, confirmButtonText: M } = zo({
2139
+ step: y,
2140
+ currentBalance: u,
2128
2141
  topUpValue: pe
2129
- }), V = () => {
2130
- var B;
2131
- if (K.value) {
2142
+ }), q = () => {
2143
+ var O;
2144
+ if (G.value) {
2132
2145
  ce();
2133
2146
  return;
2134
2147
  }
2135
- (B = oe.value) == null || B.submit();
2148
+ (O = oe.value) == null || O.submit();
2136
2149
  }, Y = async ({
2137
- rule: B,
2150
+ rule: O,
2138
2151
  paymentMethodId: H
2139
2152
  }) => {
2140
2153
  const { saved: L } = await ne(
2141
- St({
2142
- rule: B,
2154
+ Pt({
2155
+ rule: O,
2143
2156
  walletBalanceItem: o.selectedBalanceItem,
2144
- chargeTarget: Ut(void 0, m.value),
2157
+ chargeTarget: Ut(void 0, v.value),
2145
2158
  paymentMethodId: H
2146
2159
  })
2147
2160
  );
2148
2161
  L && n("auto-top-up-saved");
2149
- }, q = (B) => {
2162
+ }, V = (O) => {
2150
2163
  var H;
2151
- O.value = B, D.value = (H = oe.value) == null ? void 0 : H.chargedValue, _.value = "SUCCESS";
2164
+ D.value = O, R.value = (H = oe.value) == null ? void 0 : H.chargedValue, y.value = "SUCCESS";
2152
2165
  }, j = () => {
2153
2166
  n("confirm"), n("close");
2154
- }, Z = () => {
2167
+ }, ee = () => {
2155
2168
  if (!ae.value) {
2156
- if (K.value) {
2169
+ if (G.value) {
2157
2170
  te();
2158
2171
  return;
2159
2172
  }
2160
- if (_.value === "SUCCESS") {
2173
+ if (y.value === "SUCCESS") {
2161
2174
  j();
2162
2175
  return;
2163
2176
  }
2164
2177
  n("close");
2165
2178
  }
2166
- }, De = E(0);
2167
- return ee(
2179
+ }, De = $(0);
2180
+ return X(
2168
2181
  () => o.showModal,
2169
- (B) => {
2170
- B && (_.value = "TOP_UP", O.value = void 0, D.value = void 0, De.value += 1);
2182
+ (O) => {
2183
+ O && (y.value = "TOP_UP", D.value = void 0, R.value = void 0, De.value += 1);
2171
2184
  }
2172
- ), (B, H) => (w(), C(wt, {
2185
+ ), (O, H) => (w(), C(wt, {
2173
2186
  ref_key: "addPaymentMethodRef",
2174
- ref: $,
2187
+ ref: x,
2175
2188
  "show-modal": e.showModal,
2176
2189
  title: r(me),
2177
2190
  "sub-title": r(d),
2178
- "cancel-button-text": r(c),
2191
+ "cancel-button-text": r(m),
2179
2192
  "confirm-button-text": r(M),
2180
2193
  "is-pending": ae.value,
2181
- panes: r(mo),
2182
- step: _.value,
2194
+ panes: r(vo),
2195
+ step: y.value,
2183
2196
  "add-payment-method-pane": "ADD_PAYMENT_METHOD",
2184
2197
  customer: e.customer,
2185
2198
  "payment-method-options": r(U),
2186
- "is-payment-method-options-pending": r(G),
2187
- "is-adding-payment-method": r(K),
2188
- onConfirm: V,
2189
- onCancel: Z,
2190
- onPaymentSuccess: b,
2191
- onPaymentFailed: H[1] || (H[1] = (L) => B.$emit("payment-failed", L))
2199
+ "is-payment-method-options-pending": r(J),
2200
+ "is-adding-payment-method": r(G),
2201
+ onConfirm: q,
2202
+ onCancel: ee,
2203
+ onPaymentSuccess: T,
2204
+ onPaymentFailed: H[1] || (H[1] = (L) => O.$emit("payment-failed", L))
2192
2205
  }, re({
2193
- TOP_UP: h(() => [
2194
- T.value ? (w(), W("div", Zo, [
2206
+ TOP_UP: _(() => [
2207
+ b.value ? (w(), W("div", Zo, [
2195
2208
  A(r(tt), {
2196
- modelValue: y.value,
2197
- "onUpdate:modelValue": H[0] || (H[0] = (L) => y.value = L),
2209
+ modelValue: g.value,
2210
+ "onUpdate:modelValue": H[0] || (H[0] = (L) => g.value = L),
2198
2211
  class: "sv-topup-modal__subscription",
2199
2212
  name: "top-up-subscription",
2200
2213
  direction: "column",
2201
2214
  required: "",
2202
- options: x.value,
2215
+ options: S.value,
2203
2216
  "show-radio": !1,
2204
2217
  label: r(a)({
2205
2218
  defaultMessage: "Subscription to top up",
@@ -2207,65 +2220,65 @@ const Zo = {
2207
2220
  id: "topup_modal.subscriptions.label"
2208
2221
  })
2209
2222
  }, {
2210
- prefix: h(({ optionValue: L }) => [
2211
- v.value[String(L)] ? (w(), C(zt, {
2223
+ prefix: _(({ optionValue: L }) => [
2224
+ f.value[String(L)] ? (w(), C(Qt, {
2212
2225
  key: 0,
2213
2226
  class: "sv-topup-modal__subscription-option grow",
2214
2227
  "no-spacing": "",
2215
- subscription: v.value[String(L)].subscription,
2216
- "enabled-pricing-ids": v.value[String(L)].enabledPricingIds
2217
- }, null, 8, ["subscription", "enabled-pricing-ids"])) : R("", !0)
2228
+ subscription: f.value[String(L)].subscription,
2229
+ "enabled-pricing-ids": f.value[String(L)].enabledPricingIds
2230
+ }, null, 8, ["subscription", "enabled-pricing-ids"])) : k("", !0)
2218
2231
  ]),
2219
- label: h(({ option: L }) => [
2220
- k("span", en, N(L.label), 1)
2232
+ label: _(({ option: L }) => [
2233
+ N("span", en, I(L.label), 1)
2221
2234
  ]),
2222
2235
  _: 1
2223
2236
  }, 8, ["modelValue", "options", "label"])
2224
- ])) : R("", !0),
2225
- (w(), C(Yo, {
2237
+ ])) : k("", !0),
2238
+ (w(), C(Ho, {
2226
2239
  key: De.value,
2227
2240
  ref_key: "topUpFormRef",
2228
2241
  ref: oe,
2229
- "top-up-pricing-items": m.value,
2242
+ "top-up-pricing-items": v.value,
2230
2243
  "payment-methods": e.paymentMethods,
2231
- "auto-top-up-config": u.value,
2232
- "payment-method-options": r(I),
2233
- onAddPaymentMethod: r(J),
2234
- onSuccess: q,
2244
+ "auto-top-up-config": l.value,
2245
+ "payment-method-options": r(B),
2246
+ onAddPaymentMethod: r(Z),
2247
+ onSuccess: V,
2235
2248
  onSaveAutoTopUp: Y
2236
2249
  }, null, 8, ["top-up-pricing-items", "payment-methods", "auto-top-up-config", "payment-method-options", "onAddPaymentMethod"]))
2237
2250
  ]),
2238
- SUCCESS: h(() => [
2239
- O.value ? (w(), C(Wo, {
2251
+ SUCCESS: _(() => [
2252
+ D.value ? (w(), C(jo, {
2240
2253
  key: 0,
2241
- "added-value": D.value,
2242
- invoice: O.value
2243
- }, null, 8, ["added-value", "invoice"])) : R("", !0)
2254
+ "added-value": R.value,
2255
+ invoice: D.value
2256
+ }, null, 8, ["added-value", "invoice"])) : k("", !0)
2244
2257
  ]),
2245
2258
  _: 2
2246
2259
  }, [
2247
- _.value === "SUCCESS" || P.value ? {
2260
+ y.value === "SUCCESS" || E.value ? {
2248
2261
  name: "footer",
2249
- fn: h(() => [
2250
- k("div", tn, [
2251
- _.value === "SUCCESS" ? (w(), C(r(ue), {
2262
+ fn: _(() => [
2263
+ N("div", tn, [
2264
+ y.value === "SUCCESS" ? (w(), C(r(ue), {
2252
2265
  key: 0,
2253
2266
  size: "lg",
2254
2267
  "data-testid": "done",
2255
2268
  onClick: j
2256
2269
  }, {
2257
- default: h(() => [
2258
- F(N(r(M)), 1)
2270
+ default: _(() => [
2271
+ F(I(r(M)), 1)
2259
2272
  ]),
2260
2273
  _: 1
2261
- })) : (w(), W(ge, { key: 1 }, [
2274
+ })) : (w(), W(he, { key: 1 }, [
2262
2275
  A(r(ue), {
2263
2276
  size: "lg",
2264
2277
  disabled: "",
2265
2278
  "data-testid": "confirm"
2266
2279
  }, {
2267
- default: h(() => [
2268
- F(N(r(M)), 1)
2280
+ default: _(() => [
2281
+ F(I(r(M)), 1)
2269
2282
  ]),
2270
2283
  _: 1
2271
2284
  }),
@@ -2273,10 +2286,10 @@ const Zo = {
2273
2286
  size: "lg",
2274
2287
  intent: "subtle",
2275
2288
  "data-testid": "cancel",
2276
- onClick: Z
2289
+ onClick: ee
2277
2290
  }, {
2278
- default: h(() => [
2279
- F(N(r(c)), 1)
2291
+ default: _(() => [
2292
+ F(I(r(m)), 1)
2280
2293
  ]),
2281
2294
  _: 1
2282
2295
  })
@@ -2298,38 +2311,38 @@ const Zo = {
2298
2311
  },
2299
2312
  emits: ["saved", "close", "payment-success", "payment-failed"],
2300
2313
  setup(e, { emit: t }) {
2301
- const o = e, n = t, { $t: a } = Q(), { formatOpenBalance: i } = ye(), u = E("AUTO_TOP_UP"), l = s(() => i(o.walletBalanceItem)), p = s(() => ut(o.walletBalanceItem)), y = s(() => mt(p.value)), T = s(() => Tt(o.walletBalanceItem)), x = s(() => Mt(T.value)), v = s(
2302
- () => Ut(o.topUpItem, p.value)
2303
- ), g = E(), m = s(() => {
2304
- var j, Z;
2305
- const q = (Z = (j = g.value) == null ? void 0 : j.rule) == null ? void 0 : Z.topup_amount;
2306
- return q != null && q.quantity && v.value ? [{ pricing_item_id: v.value.pricingItemId, flexible_amount: q }] : void 0;
2314
+ const o = e, n = t, { $t: a } = Q(), { formatOpenBalance: i } = ye(), l = $("AUTO_TOP_UP"), u = s(() => i(o.walletBalanceItem)), c = s(() => ut(o.walletBalanceItem)), g = s(() => mt(c.value)), b = s(() => Tt(o.walletBalanceItem)), S = s(() => Mt(b.value)), f = s(
2315
+ () => Ut(o.topUpItem, c.value)
2316
+ ), h = $(), v = s(() => {
2317
+ var j, ee;
2318
+ const V = (ee = (j = h.value) == null ? void 0 : j.rule) == null ? void 0 : ee.topup_amount;
2319
+ return V != null && V.quantity && f.value ? [{ pricing_item_id: f.value.pricingItemId, flexible_amount: V }] : void 0;
2307
2320
  }), U = s(() => {
2308
- var q;
2309
- return (q = v.value) == null ? void 0 : q.pricingPlanScheduleId;
2310
- }), I = E(), { sortedPaymentMethods: G } = yt({
2321
+ var V;
2322
+ return (V = f.value) == null ? void 0 : V.pricingPlanScheduleId;
2323
+ }), B = $(), { sortedPaymentMethods: J } = yt({
2311
2324
  paymentMethods: s(() => o.paymentMethods),
2312
- selectedPaymentMethodId: I,
2325
+ selectedPaymentMethodId: B,
2313
2326
  preferredPaymentMethodId: s(() => {
2314
- var q;
2315
- return (q = T.value) == null ? void 0 : q.payment_method_id;
2327
+ var V;
2328
+ return (V = b.value) == null ? void 0 : V.payment_method_id;
2316
2329
  })
2317
2330
  }), {
2318
- paymentMethodOptions: _,
2319
- settledOptions: S,
2320
- isPending: f
2331
+ paymentMethodOptions: y,
2332
+ settledOptions: p,
2333
+ isPending: P
2321
2334
  } = bt({
2322
2335
  isOpen: s(() => o.showModal),
2323
2336
  customer: s(() => o.customer)
2324
2337
  }), {
2325
- paneRef: P,
2326
- isActive: O,
2327
- isSaving: D,
2328
- open: b,
2329
- leave: $,
2330
- submit: K
2331
- } = Pt({ step: u, name: "ADD_PAYMENT_METHOD", returnTo: "AUTO_TOP_UP" }), { save: de, isSaving: J } = Ct(), te = s(() => D.value || J.value), ce = Ae({
2332
- paymentMethodId: s(() => I.value ?? null)
2338
+ paneRef: E,
2339
+ isActive: D,
2340
+ isSaving: R,
2341
+ open: T,
2342
+ leave: x,
2343
+ submit: G
2344
+ } = St({ step: l, name: "ADD_PAYMENT_METHOD", returnTo: "AUTO_TOP_UP" }), { save: de, isSaving: Z } = Ct(), te = s(() => R.value || Z.value), ce = Ae({
2345
+ paymentMethodId: s(() => B.value ?? null)
2333
2346
  }), ne = xe(
2334
2347
  {
2335
2348
  paymentMethodId: {
@@ -2345,7 +2358,7 @@ const Zo = {
2345
2358
  },
2346
2359
  ce
2347
2360
  ), oe = s(
2348
- () => u.value === "ADD_PAYMENT_METHOD" ? a({
2361
+ () => l.value === "ADD_PAYMENT_METHOD" ? a({
2349
2362
  defaultMessage: "Add payment method",
2350
2363
  description: "Title of the auto top-up modal while the customer is adding a payment method",
2351
2364
  id: "auto_topup_modal.add_payment_method.title"
@@ -2355,7 +2368,7 @@ const Zo = {
2355
2368
  id: "auto_topup_modal.title"
2356
2369
  })
2357
2370
  ), pe = s(
2358
- () => u.value === "ADD_PAYMENT_METHOD" ? a({
2371
+ () => l.value === "ADD_PAYMENT_METHOD" ? a({
2359
2372
  defaultMessage: "This method pays for every automatic top-up.",
2360
2373
  description: "Subtitle of the auto top-up modal while the customer is adding a payment method",
2361
2374
  id: "auto_topup_modal.add_payment_method.subtitle"
@@ -2365,10 +2378,10 @@ const Zo = {
2365
2378
  description: "Subtitle of the automatic wallet top-up modal, naming the balance",
2366
2379
  id: "auto_topup_modal.subtitle"
2367
2380
  },
2368
- { balance: l.value }
2381
+ { balance: u.value }
2369
2382
  )
2370
2383
  ), ae = s(
2371
- () => u.value === "ADD_PAYMENT_METHOD" ? a({
2384
+ () => l.value === "ADD_PAYMENT_METHOD" ? a({
2372
2385
  defaultMessage: "Back",
2373
2386
  description: "Button returning from adding a payment method to the auto top-up rule",
2374
2387
  id: "auto_topup_modal.add_payment_method.cancel"
@@ -2378,7 +2391,7 @@ const Zo = {
2378
2391
  id: "auto_topup_modal.cancel"
2379
2392
  })
2380
2393
  ), me = s(
2381
- () => u.value === "ADD_PAYMENT_METHOD" ? a({
2394
+ () => l.value === "ADD_PAYMENT_METHOD" ? a({
2382
2395
  defaultMessage: "Add payment method",
2383
2396
  description: "Button storing the payment method being added in the auto top-up modal",
2384
2397
  id: "auto_topup_modal.add_payment_method.confirm"
@@ -2389,48 +2402,48 @@ const Zo = {
2389
2402
  })
2390
2403
  );
2391
2404
  async function d() {
2392
- var Z;
2405
+ var ee;
2393
2406
  if (ne.value.$touch(), te.value)
2394
2407
  return;
2395
- const { saved: q, error: j } = await de(
2396
- St({
2397
- rule: (Z = g.value) == null ? void 0 : Z.validate(),
2408
+ const { saved: V, error: j } = await de(
2409
+ Pt({
2410
+ rule: (ee = h.value) == null ? void 0 : ee.validate(),
2398
2411
  walletBalanceItem: o.walletBalanceItem,
2399
- chargeTarget: v.value,
2400
- paymentMethodId: I.value
2412
+ chargeTarget: f.value,
2413
+ paymentMethodId: B.value
2401
2414
  })
2402
2415
  );
2403
- if (q) {
2416
+ if (V) {
2404
2417
  n("saved"), n("close");
2405
2418
  return;
2406
2419
  }
2407
2420
  j && n("payment-failed", j);
2408
2421
  }
2409
- const c = () => {
2410
- if (O.value) {
2411
- K();
2422
+ const m = () => {
2423
+ if (D.value) {
2424
+ G();
2412
2425
  return;
2413
2426
  }
2414
2427
  d();
2415
2428
  }, M = () => {
2416
- $(), n("payment-success");
2417
- }, V = () => {
2429
+ x(), n("payment-success");
2430
+ }, q = () => {
2418
2431
  if (!te.value) {
2419
- if (O.value) {
2420
- $();
2432
+ if (D.value) {
2433
+ x();
2421
2434
  return;
2422
2435
  }
2423
2436
  n("close");
2424
2437
  }
2425
- }, Y = E(0);
2426
- return ee(
2438
+ }, Y = $(0);
2439
+ return X(
2427
2440
  () => o.showModal,
2428
- (q) => {
2429
- q && (u.value = "AUTO_TOP_UP", I.value = void 0, Y.value += 1);
2441
+ (V) => {
2442
+ V && (l.value = "AUTO_TOP_UP", B.value = void 0, Y.value += 1);
2430
2443
  }
2431
- ), (q, j) => (w(), C(wt, {
2444
+ ), (V, j) => (w(), C(wt, {
2432
2445
  ref_key: "addPaymentMethodRef",
2433
- ref: P,
2446
+ ref: E,
2434
2447
  "show-modal": e.showModal,
2435
2448
  title: oe.value,
2436
2449
  "sub-title": pe.value,
@@ -2438,39 +2451,39 @@ const Zo = {
2438
2451
  "confirm-button-text": me.value,
2439
2452
  "is-pending": te.value,
2440
2453
  panes: r(nn),
2441
- step: u.value,
2454
+ step: l.value,
2442
2455
  "add-payment-method-pane": "ADD_PAYMENT_METHOD",
2443
2456
  customer: e.customer,
2444
- "payment-method-options": r(_),
2445
- "is-payment-method-options-pending": r(f),
2446
- "is-adding-payment-method": r(O),
2447
- onConfirm: c,
2448
- onCancel: V,
2457
+ "payment-method-options": r(y),
2458
+ "is-payment-method-options-pending": r(P),
2459
+ "is-adding-payment-method": r(D),
2460
+ onConfirm: m,
2461
+ onCancel: q,
2449
2462
  onPaymentSuccess: M,
2450
- onPaymentFailed: j[1] || (j[1] = (Z) => q.$emit("payment-failed", Z))
2463
+ onPaymentFailed: j[1] || (j[1] = (ee) => V.$emit("payment-failed", ee))
2451
2464
  }, {
2452
- AUTO_TOP_UP: h(() => [
2453
- k("div", an, [
2454
- y.value ? (w(), C(_t, le({
2465
+ AUTO_TOP_UP: _(() => [
2466
+ N("div", an, [
2467
+ g.value ? (w(), C(_t, le({
2455
2468
  key: Y.value,
2456
2469
  ref_key: "autoTopUpFormRef",
2457
- ref: g,
2470
+ ref: h,
2458
2471
  class: "sv-auto-topup-modal__rule"
2459
- }, y.value, {
2460
- config: x.value,
2472
+ }, g.value, {
2473
+ config: S.value,
2461
2474
  "always-enabled": "",
2462
2475
  disabled: te.value
2463
- }), null, 16, ["config", "disabled"])) : R("", !0),
2464
- A(ft, {
2476
+ }), null, 16, ["config", "disabled"])) : k("", !0),
2477
+ A(vt, {
2465
2478
  "pricing-plan-schedule-id": U.value,
2466
- "pricing-items": m.value
2479
+ "pricing-items": v.value
2467
2480
  }, null, 8, ["pricing-plan-schedule-id", "pricing-items"]),
2468
2481
  A(st, {
2469
- modelValue: I.value,
2470
- "onUpdate:modelValue": j[0] || (j[0] = (Z) => I.value = Z),
2482
+ modelValue: B.value,
2483
+ "onUpdate:modelValue": j[0] || (j[0] = (ee) => B.value = ee),
2471
2484
  class: "sv-auto-topup-modal__payment-method",
2472
- "payment-methods": r(G),
2473
- "payment-method-options": r(S),
2485
+ "payment-methods": r(J),
2486
+ "payment-method-options": r(p),
2474
2487
  disabled: te.value,
2475
2488
  error: r(ne).paymentMethodId.$errors,
2476
2489
  label: r(a)({
@@ -2478,7 +2491,7 @@ const Zo = {
2478
2491
  description: "Label above the payment method an automatic top-up is charged to",
2479
2492
  id: "auto_topup_modal.payment_method.label"
2480
2493
  }),
2481
- onAddPaymentMethod: r(b)
2494
+ onAddPaymentMethod: r(T)
2482
2495
  }, null, 8, ["modelValue", "payment-methods", "payment-method-options", "disabled", "error", "label", "onAddPaymentMethod"])
2483
2496
  ])
2484
2497
  ]),
@@ -2493,62 +2506,62 @@ const Zo = {
2493
2506
  },
2494
2507
  emits: ["confirmed", "close"],
2495
2508
  setup(e, { emit: t }) {
2496
- const o = e, n = t, { $t: a } = Q(), i = _e(), { formatValue: u } = ye(), { deactivateAutoTopUpConfig: l } = At(), p = E(!1), y = E(!1);
2497
- ee(
2509
+ const o = e, n = t, { $t: a } = Q(), i = _e(), { formatValue: l } = ye(), { deactivateAutoTopUpConfig: u } = At(), c = $(!1), g = $(!1);
2510
+ X(
2498
2511
  () => o.showModal,
2499
- (g) => {
2500
- g && (y.value = !1);
2512
+ (h) => {
2513
+ h && (g.value = !1);
2501
2514
  }
2502
2515
  );
2503
- const T = s(() => {
2504
- var U, I;
2505
- const g = (U = o.config) == null ? void 0 : U.threshold, m = (I = o.config) == null ? void 0 : I.topup_amount;
2506
- return !(g != null && g.amount) && !(g != null && g.credits) ? a({
2516
+ const b = s(() => {
2517
+ var U, B;
2518
+ const h = (U = o.config) == null ? void 0 : U.threshold, v = (B = o.config) == null ? void 0 : B.topup_amount;
2519
+ return !(h != null && h.amount) && !(h != null && h.credits) ? a({
2507
2520
  defaultMessage: "Your balance will no longer be topped up automatically. You can still top up whenever you want to.",
2508
2521
  description: "Explanation in the modal that turns a wallet automatic top-up off",
2509
2522
  id: "auto_topup_cancellation_modal.explanation"
2510
- }) : m ? a(
2523
+ }) : v ? a(
2511
2524
  {
2512
2525
  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.",
2513
2526
  description: "Explanation in the modal that turns a wallet automatic top-up off, naming what it charged and when",
2514
2527
  id: "auto_topup_cancellation_modal.explanation_with_amount"
2515
2528
  },
2516
- { amount: u({ amount: m }), threshold: u(g) }
2529
+ { amount: l({ amount: v }), threshold: l(h) }
2517
2530
  ) : a(
2518
2531
  {
2519
2532
  defaultMessage: "Your balance will no longer be topped up automatically when it falls below {threshold}. You can still top up whenever you want to.",
2520
2533
  description: "Explanation in the modal that turns a wallet automatic top-up off, naming the threshold",
2521
2534
  id: "auto_topup_cancellation_modal.explanation_with_threshold"
2522
2535
  },
2523
- { threshold: u(g) }
2536
+ { threshold: l(h) }
2524
2537
  );
2525
- }), x = async () => {
2526
- var m;
2527
- const g = (m = o.config) == null ? void 0 : m.id;
2528
- if (!(!g || p.value)) {
2529
- p.value = !0, y.value = !1;
2538
+ }), S = async () => {
2539
+ var v;
2540
+ const h = (v = o.config) == null ? void 0 : v.id;
2541
+ if (!(!h || c.value)) {
2542
+ c.value = !0, g.value = !1;
2530
2543
  try {
2531
- await l(g), n("confirmed"), n("close");
2544
+ await u(h), n("confirmed"), n("close");
2532
2545
  } catch (U) {
2533
2546
  i.error(
2534
2547
  "AUTO_TOP_UP_CANCELLATION_FAILED",
2535
2548
  "Failed to turn off a wallet's automatic top-up",
2536
2549
  {},
2537
2550
  U
2538
- ), y.value = !0;
2551
+ ), g.value = !0;
2539
2552
  } finally {
2540
- p.value = !1;
2553
+ c.value = !1;
2541
2554
  }
2542
2555
  }
2543
- }, v = () => {
2544
- p.value || n("close");
2556
+ }, f = () => {
2557
+ c.value || n("close");
2545
2558
  };
2546
- return (g, m) => (w(), C(r(lt), {
2559
+ return (h, v) => (w(), C(r(lt), {
2547
2560
  size: "sm",
2548
2561
  "show-modal": e.showModal,
2549
- "is-loading": p.value,
2550
- "no-click-away": p.value,
2551
- "no-backdrop-close": p.value,
2562
+ "is-loading": c.value,
2563
+ "no-click-away": c.value,
2564
+ "no-backdrop-close": c.value,
2552
2565
  title: r(a)({
2553
2566
  defaultMessage: "Turn off automatic top-up",
2554
2567
  description: "Title of the modal that turns a wallet automatic top-up off",
@@ -2564,23 +2577,23 @@ const Zo = {
2564
2577
  description: "Button dismissing the modal that turns a wallet automatic top-up off",
2565
2578
  id: "auto_topup_cancellation_modal.cancel"
2566
2579
  }),
2567
- onConfirm: x,
2568
- onClose: v
2580
+ onConfirm: S,
2581
+ onClose: f
2569
2582
  }, {
2570
- body: h(() => [
2571
- k("div", ln, [
2572
- A(r(X), {
2583
+ body: _(() => [
2584
+ N("div", ln, [
2585
+ A(r(K), {
2573
2586
  variant: "body-sm",
2574
2587
  color: "subtle",
2575
2588
  tag: "p",
2576
2589
  class: "sv-auto-topup-cancellation-modal__explanation"
2577
2590
  }, {
2578
- default: h(() => [
2579
- F(N(T.value), 1)
2591
+ default: _(() => [
2592
+ F(I(b.value), 1)
2580
2593
  ]),
2581
2594
  _: 1
2582
2595
  }),
2583
- y.value ? (w(), C(r(Ke), {
2596
+ g.value ? (w(), C(r(Ke), {
2584
2597
  key: 0,
2585
2598
  class: "sv-auto-topup-cancellation-modal__error sv-error",
2586
2599
  title: r(a)({
@@ -2588,7 +2601,7 @@ const Zo = {
2588
2601
  description: "Error shown when turning a wallet automatic top-up off failed",
2589
2602
  id: "auto_topup_cancellation_modal.failed"
2590
2603
  })
2591
- }, null, 8, ["title"])) : R("", !0)
2604
+ }, null, 8, ["title"])) : k("", !0)
2592
2605
  ])
2593
2606
  ]),
2594
2607
  _: 1
@@ -2608,26 +2621,26 @@ const Zo = {
2608
2621
  },
2609
2622
  emits: ["top-up-charged", "auto-top-up-saved", "auto-top-up-cancelled", "payment-method-stored", "payment-failed"],
2610
2623
  setup(e, { emit: t }) {
2611
- const o = e, n = t, { $t: a } = Q(), i = E(), u = s(
2624
+ const o = e, n = t, { $t: a } = Q(), i = $(), l = s(
2612
2625
  () => Re(o.walletBalances, i.value)
2613
- ), l = s(() => !!u.value), p = E(), y = s(() => !!p.value), T = s(
2614
- () => Re(o.walletBalances, p.value)
2615
- ), x = E(), v = s(() => !!x.value);
2616
- return (g, m) => (w(), W(ge, null, [
2626
+ ), u = s(() => !!l.value), c = $(), g = s(() => !!c.value), b = s(
2627
+ () => Re(o.walletBalances, c.value)
2628
+ ), S = $(), f = s(() => !!S.value);
2629
+ return (h, v) => (w(), W(he, null, [
2617
2630
  e.isLoading ? (w(), C(et, le({
2618
2631
  key: 0,
2619
2632
  variant: "section"
2620
- }, g.$attrs, {
2633
+ }, h.$attrs, {
2621
2634
  class: "sv-wallet-balances sv-root sv-component sv-loading min-h-48",
2622
2635
  "data-testid": "customer-wallet-balances-skeleton"
2623
- }), null, 16)) : e.hasError ? (w(), C(r(Ke), le({ key: 1 }, g.$attrs, {
2636
+ }), null, 16)) : e.hasError ? (w(), C(r(Ke), le({ key: 1 }, h.$attrs, {
2624
2637
  class: "sv-wallet-balances sv-root sv-component sv-error",
2625
2638
  title: r(a)({
2626
2639
  defaultMessage: "Could not load wallet balances",
2627
2640
  description: "Error shown when wallet balances fail to load",
2628
2641
  id: "wallet_balance.load_failed"
2629
2642
  })
2630
- }), null, 16, ["title"])) : e.walletBalances.length > 0 ? (w(), C(r(co), le({ key: 2 }, g.$attrs, {
2643
+ }), null, 16, ["title"])) : e.walletBalances.length > 0 ? (w(), C(r(po), le({ key: 2 }, h.$attrs, {
2631
2644
  class: "sv-wallet-balances sv-root sv-component",
2632
2645
  "customer-wallet-balances": e.walletBalances,
2633
2646
  "show-auto-top-up": "",
@@ -2640,45 +2653,49 @@ const Zo = {
2640
2653
  },
2641
2654
  { count: String(e.walletBalances.length) }
2642
2655
  ),
2643
- onTopUp: m[0] || (m[0] = (U) => i.value = U),
2644
- onAutoTopUp: m[1] || (m[1] = (U) => p.value = U),
2645
- onCancelAutoTopUp: m[2] || (m[2] = (U) => x.value = U)
2646
- }), null, 16, ["customer-wallet-balances", "title"])) : R("", !0),
2656
+ onTopUp: v[0] || (v[0] = (U) => i.value = U),
2657
+ onAutoTopUp: v[1] || (v[1] = (U) => c.value = U),
2658
+ onCancelAutoTopUp: v[2] || (v[2] = (U) => S.value = U)
2659
+ }), null, 16, ["customer-wallet-balances", "title"])) : k("", !0),
2647
2660
  e.showTopUpButton ? (w(), C(on, {
2648
2661
  key: 3,
2649
- "show-modal": l.value,
2650
- "selected-balance-item": u.value,
2662
+ "show-modal": u.value,
2663
+ "selected-balance-item": l.value,
2651
2664
  "payment-methods": e.paymentMethods,
2652
2665
  customer: e.customer,
2653
2666
  subscriptions: e.subscriptions,
2654
- onClose: m[3] || (m[3] = (U) => i.value = void 0),
2655
- onConfirm: m[4] || (m[4] = (U) => n("top-up-charged")),
2656
- onPaymentSuccess: m[5] || (m[5] = (U) => n("payment-method-stored")),
2657
- onPaymentFailed: m[6] || (m[6] = (U) => n("payment-failed", U))
2658
- }, null, 8, ["show-modal", "selected-balance-item", "payment-methods", "customer", "subscriptions"])) : R("", !0),
2667
+ onClose: v[3] || (v[3] = (U) => i.value = void 0),
2668
+ onConfirm: v[4] || (v[4] = (U) => n("top-up-charged")),
2669
+ onPaymentSuccess: v[5] || (v[5] = (U) => n("payment-method-stored")),
2670
+ onPaymentFailed: v[6] || (v[6] = (U) => n("payment-failed", U))
2671
+ }, null, 8, ["show-modal", "selected-balance-item", "payment-methods", "customer", "subscriptions"])) : k("", !0),
2659
2672
  e.showTopUpButton ? (w(), C(sn, {
2660
2673
  key: 4,
2661
- "show-modal": y.value,
2662
- "wallet-balance-item": T.value,
2663
- "top-up-item": p.value,
2674
+ "show-modal": g.value,
2675
+ "wallet-balance-item": b.value,
2676
+ "top-up-item": c.value,
2664
2677
  "payment-methods": e.paymentMethods,
2665
2678
  customer: e.customer,
2666
- onClose: m[7] || (m[7] = (U) => p.value = void 0),
2667
- onSaved: m[8] || (m[8] = (U) => n("auto-top-up-saved")),
2668
- onPaymentSuccess: m[9] || (m[9] = (U) => n("payment-method-stored")),
2669
- onPaymentFailed: m[10] || (m[10] = (U) => n("payment-failed", U))
2670
- }, null, 8, ["show-modal", "wallet-balance-item", "top-up-item", "payment-methods", "customer"])) : R("", !0),
2679
+ onClose: v[7] || (v[7] = (U) => c.value = void 0),
2680
+ onSaved: v[8] || (v[8] = (U) => n("auto-top-up-saved")),
2681
+ onPaymentSuccess: v[9] || (v[9] = (U) => n("payment-method-stored")),
2682
+ onPaymentFailed: v[10] || (v[10] = (U) => n("payment-failed", U))
2683
+ }, null, 8, ["show-modal", "wallet-balance-item", "top-up-item", "payment-methods", "customer"])) : k("", !0),
2671
2684
  e.showTopUpButton ? (w(), C(un, {
2672
2685
  key: 5,
2673
- "show-modal": v.value,
2674
- config: x.value,
2675
- onClose: m[11] || (m[11] = (U) => x.value = void 0),
2676
- onConfirmed: m[12] || (m[12] = (U) => n("auto-top-up-cancelled"))
2677
- }, null, 8, ["show-modal", "config"])) : R("", !0)
2686
+ "show-modal": f.value,
2687
+ config: S.value,
2688
+ onClose: v[11] || (v[11] = (U) => S.value = void 0),
2689
+ onConfirmed: v[12] || (v[12] = (U) => n("auto-top-up-cancelled"))
2690
+ }, null, 8, ["show-modal", "config"])) : k("", !0)
2678
2691
  ], 64));
2679
2692
  }
2680
2693
  });
2681
2694
  export {
2682
2695
  kn as _,
2696
+ St as a,
2697
+ bt as b,
2698
+ $o as c,
2699
+ wt as d,
2683
2700
  Nn as u
2684
2701
  };