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

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 (319) hide show
  1. package/README.md +9 -7
  2. package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Y3CzulQq.mjs → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Ce30EXY5.mjs} +8 -9
  3. package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-kmam2c7P.js +1 -0
  4. package/dist/{Amount.vue.es-CRG-6dps.mjs → Amount.vue.es-BO5sS1UX.mjs} +4 -2
  5. package/dist/Amount.vue.es-JDVa_3H-.js +1 -0
  6. package/dist/{Avatar.vue.es-ClUBm_l5.js → Avatar.vue.es-BGTZSAqU.js} +1 -1
  7. package/dist/{Avatar.vue.es-DJp6NEU_.mjs → Avatar.vue.es-DJzJiYtv.mjs} +1 -1
  8. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BUMK11Dw.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-Bq2mTdUs.mjs} +5 -6
  9. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-DzrInCPA.js → BillingInformation.vue_vue_type_script_setup_true_lang-BtNTRSqH.js} +1 -1
  10. package/dist/{Button.vue.es-BrWHdiEA.mjs → Button.vue.es-Cm9pLU9i.mjs} +61 -93
  11. package/dist/Button.vue.es-O8mNivLL.js +1 -0
  12. package/dist/Chip.vue.es-BBmn-qJp.mjs +120 -0
  13. package/dist/Chip.vue.es-DmCjC1hi.js +1 -0
  14. package/dist/{Comparators.vue.es-CU32AC4n.mjs → Comparators.vue.es-CYfxd5H-.mjs} +1 -1
  15. package/dist/{Comparators.vue.es-CfVGYJ_x.js → Comparators.vue.es-DK8wGjxM.js} +1 -1
  16. package/dist/{ContextMenu.vue.es-BBPFQfqY.mjs → ContextMenu.vue.es-CTc1ktXb.mjs} +23 -23
  17. package/dist/ContextMenu.vue.es-DaW0yp4Y.js +1 -0
  18. package/dist/{CustomerBillingInformation.vue.es-s-LYXA4T.js → CustomerBillingInformation.vue.es-BX0Da7Kr.js} +1 -1
  19. package/dist/{CustomerBillingInformation.vue.es-CLmXk5B9.mjs → CustomerBillingInformation.vue.es-CMZO8oLj.mjs} +3 -3
  20. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Bi_dCntQ.js +1 -0
  21. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-B2CtcBm0.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CtdFharm.mjs} +8 -10
  22. package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-Bej5_H7r.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-BDqBXbJq.mjs} +37 -34
  23. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-ZyN2vlNu.js +1 -0
  24. package/dist/{DividerText.vue.es-DMg-DNgi.mjs → DividerText.vue.es-CeAHAe_Y.mjs} +1 -1
  25. package/dist/{DividerText.vue.es-D5ieOE1e.js → DividerText.vue.es-DjT4i_YD.js} +1 -1
  26. package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CTG5XdQt.mjs → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-DLE5-9wz.mjs} +16 -16
  27. package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-5I81Qr6q.js → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-DkIK-lID.js} +1 -1
  28. package/dist/ErrorNotification.vue.es-CHyVTBGs.mjs +38 -0
  29. package/dist/ErrorNotification.vue.es-CaEFTi2k.js +1 -0
  30. package/dist/FormMessage.vue.es-Bd4_NG9H.js +1 -0
  31. package/dist/{FormMessage.vue.es-DFQXxiSC.mjs → FormMessage.vue.es-C3oxwq_8.mjs} +3 -3
  32. package/dist/IconButton.vue.es-BHdQskx0.js +1 -0
  33. package/dist/{IconButton.vue.es-DcC4f5EQ.mjs → IconButton.vue.es-KywqWWvr.mjs} +20 -23
  34. package/dist/{IconTitle.vue.es-mQCMxc64.mjs → IconTitle.vue.es-BmjBdZb_.mjs} +13 -11
  35. package/dist/IconTitle.vue.es-D9Wc3PIq.js +1 -0
  36. package/dist/Input.vue.es-DqKJhFTr.js +1 -0
  37. package/dist/{Input.vue.es-Dp_RH03h.mjs → Input.vue.es-WZGF8dfr.mjs} +28 -16
  38. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-56fy6uY6.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-B6efz7NU.mjs} +2 -2
  39. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-CLUcV3qa.js → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-LE6zBLKM.js} +1 -1
  40. package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-ztaMeHQc.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-C2aLMfu6.mjs} +2 -2
  41. package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-flgEyaoj.js → InvoiceEntryView.vue_vue_type_script_setup_true_lang-CtpFzWU3.js} +1 -1
  42. package/dist/{InvoiceSummary.vue.es-nCYeQ4tj.mjs → InvoiceSummary.vue.es-BI5sD_8F.mjs} +1057 -671
  43. package/dist/InvoiceSummary.vue.es-BWYIHezU.js +1 -0
  44. package/dist/Modal.vue.es-B_1aqm_m.js +1 -0
  45. package/dist/{Modal.vue.es-5EpA4Q0t.mjs → Modal.vue.es-qdUHDOnU.mjs} +172 -56
  46. package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-BKKXQbge.js +1 -0
  47. package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-D7IX9qqy.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-Ch1TFO7x.mjs} +7 -8
  48. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-C8nvN-6f.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-CsH47WSM.mjs} +3 -3
  49. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-D1oKZZ_m.js → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-mKNNYnMU.js} +1 -1
  50. package/dist/{PaymentHistoryBlock-Dejtgyos.mjs → PaymentHistoryBlock-CgNUV8Gy.mjs} +1 -1
  51. package/dist/{PaymentHistoryBlock-RBxlC5xt.js → PaymentHistoryBlock-Ci8aSJeb.js} +1 -1
  52. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DZwnDzha.js +1 -0
  53. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-Dk52bjJd.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-Uj1aK-dp.mjs} +16 -16
  54. package/dist/{PaymentIntegrationForm-CbqfAdkc.mjs → PaymentIntegrationForm-CLokpXvK.mjs} +1 -1
  55. package/dist/{PaymentIntegrationForm-BWr7iyU6.js → PaymentIntegrationForm-CsuueDE0.js} +1 -1
  56. package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DJHwpswk.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CRUs7sP4.mjs} +26 -8
  57. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-kKkzRi6w.js +1 -0
  58. package/dist/{PaymentIntegrationFormAdyen-CuRwe9_9.mjs → PaymentIntegrationFormAdyen-C885o8IE.mjs} +37 -29
  59. package/dist/PaymentIntegrationFormAdyen-Co19AgvG.js +1 -0
  60. package/dist/{PaymentIntegrationFormStripe-JZw2m1kJ.mjs → PaymentIntegrationFormStripe-BjMdJmDC.mjs} +8 -6
  61. package/dist/PaymentIntegrationFormStripe-DWff6wzK.js +1 -0
  62. package/dist/PaymentMethod.vue.es-CdskNJ3Z.js +1 -0
  63. package/dist/PaymentMethod.vue.es-rv-pu1CC.mjs +677 -0
  64. package/dist/{PaymentMethodForm-C5WqTDow.mjs → PaymentMethodForm-IEuDxEPN.mjs} +1 -1
  65. package/dist/{PaymentMethodForm-CBjHdZT7.js → PaymentMethodForm-hZuVHAti.js} +1 -1
  66. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-Cj60U90J.js +1 -0
  67. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-DhPTbip8.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-gA74Rak9.mjs} +21 -8
  68. package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-B3H_AWMM.js +1 -0
  69. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-DbTvbHk7.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-CTn-OxM6.mjs} +7 -7
  70. package/dist/{PricingGroupRangeInput.vue.es-A6eW-u2k.mjs → PricingGroupRangeInput.vue.es-ButaePib.mjs} +13 -17
  71. package/dist/PricingGroupRangeInput.vue.es-Cls2lm80.js +1 -0
  72. package/dist/{Section.vue.es-tLYXp-tF.js → Section.vue.es-CAJvEDn6.js} +1 -1
  73. package/dist/{Section.vue.es-MEFUWCxU.mjs → Section.vue.es-DX_9ueCG.mjs} +1 -1
  74. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-CQAkPfJz.js +1 -0
  75. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-xvgyB2Yr.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DVtMzgjc.mjs} +31 -37
  76. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-BJVXCHny.js +1 -0
  77. package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-B_Zkbqx2.mjs → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-ByO-L6nm.mjs} +171 -105
  78. package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-Cj36jvZF.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-C5zB3CgZ.mjs} +4 -4
  79. package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-CabskT-r.js +1 -0
  80. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-D-T1wGg7.js +1 -0
  81. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-CfXgGKXA.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-DKd2DIVb.mjs} +12 -13
  82. package/dist/{TooltipParagraph.vue.es-B5aHQv9O.mjs → TooltipParagraph.vue.es-C5RTcrid.mjs} +3 -3
  83. package/dist/{TooltipParagraph.vue.es-fSwKGXKg.js → TooltipParagraph.vue.es-H9fI7zzt.js} +1 -1
  84. package/dist/{TrialChip.vue.es-Fp7Lqo-b.mjs → TrialChip.vue.es-B1puKyR-.mjs} +3 -3
  85. package/dist/TrialChip.vue.es-CCs50m02.js +1 -0
  86. package/dist/accel.svg.es-CE5tIWtm.mjs +4 -0
  87. package/dist/accel.svg.es-Dt_1wJmV.js +1 -0
  88. package/dist/ach.svg.es-B4tn0_IV.js +1 -0
  89. package/dist/ach.svg.es-D4QPcIU-.mjs +4 -0
  90. package/dist/{adyen-Ba-mF3Jy.mjs → adyen-BXi_D9TQ.mjs} +14 -21
  91. package/dist/adyen-VS2sDW0m.js +1 -0
  92. package/dist/amazon-pay.svg.es-B428S4f3.js +1 -0
  93. package/dist/amazon-pay.svg.es-DUScOW15.mjs +4 -0
  94. package/dist/amex.svg.es-BCXkaVLN.mjs +4 -0
  95. package/dist/amex.svg.es-Bn9e31C3.js +1 -0
  96. package/dist/apple-pay.svg.es-Cfgn0K28.js +1 -0
  97. package/dist/apple-pay.svg.es-DlCfkt39.mjs +4 -0
  98. package/dist/bacs.svg.es-BKsvSeIP.mjs +4 -0
  99. package/dist/bacs.svg.es-hL7hLPkQ.js +1 -0
  100. package/dist/bancontact.svg.es-BbRqGgZ9.mjs +4 -0
  101. package/dist/bancontact.svg.es-DU2ejvNL.js +1 -0
  102. package/dist/carnet.svg.es-C5SFaOsa.js +1 -0
  103. package/dist/carnet.svg.es-Db-KEb13.mjs +4 -0
  104. package/dist/cartes-bancaires.svg.es-ByD-JAAi.mjs +4 -0
  105. package/dist/cartes-bancaires.svg.es-CbBJQZrk.js +1 -0
  106. package/dist/cashapp.svg.es-CnS5r_D8.mjs +4 -0
  107. package/dist/cashapp.svg.es-DE4vMu_p.js +1 -0
  108. package/dist/{cn.es-DB5pDpxS.mjs → cn.es-BEU5D0Wz.mjs} +4 -4
  109. package/dist/cn.es-DxSeYcoP.js +1 -0
  110. package/dist/components/BillingInformation/BillingInformation.cjs +1 -1
  111. package/dist/components/BillingInformation/BillingInformation.mjs +4 -4
  112. package/dist/components/BillingInformationForm/BillingInformationForm.cjs +1 -1
  113. package/dist/components/BillingInformationForm/BillingInformationForm.mjs +8 -8
  114. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs +1 -1
  115. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +4 -4
  116. package/dist/components/Invoice/Invoice.cjs +1 -1
  117. package/dist/components/Invoice/Invoice.mjs +19 -19
  118. package/dist/components/InvoiceDetails/InvoiceDetails.cjs +1 -1
  119. package/dist/components/InvoiceDetails/InvoiceDetails.mjs +3 -3
  120. package/dist/components/InvoiceHeader/InvoiceHeader.cjs +1 -1
  121. package/dist/components/InvoiceHeader/InvoiceHeader.mjs +2 -2
  122. package/dist/components/InvoicesList/InvoicesList.cjs +1 -1
  123. package/dist/components/InvoicesList/InvoicesList.mjs +3 -3
  124. package/dist/components/PaymentHistory/PaymentHistory.cjs +1 -1
  125. package/dist/components/PaymentHistory/PaymentHistory.mjs +3 -3
  126. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs +1 -1
  127. package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +5 -5
  128. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs +1 -1
  129. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +4 -4
  130. package/dist/components/SubscriptionsList/SubscriptionsList.cjs +1 -1
  131. package/dist/components/SubscriptionsList/SubscriptionsList.mjs +5 -5
  132. package/dist/components/WalletBalances/WalletBalances.cjs +1 -1
  133. package/dist/components/WalletBalances/WalletBalances.mjs +3 -3
  134. package/dist/{customElements-DdFA__me.mjs → customElements-B-89a5oH.mjs} +134 -53
  135. package/dist/customElements-DD7bpqkx.js +1 -0
  136. package/dist/{customer-D7HUfF3j.js → customer-DozNwS_a.js} +1 -1
  137. package/dist/{customer-B0AMetq6.mjs → customer-Dzj1g9lV.mjs} +1 -1
  138. package/dist/dana.svg.es-Bbn6_ktN.mjs +4 -0
  139. package/dist/dana.svg.es-DKZaseoJ.js +1 -0
  140. package/dist/dankort.svg.es-D8FgSiFf.js +1 -0
  141. package/dist/dankort.svg.es-DtAdliQq.mjs +4 -0
  142. package/dist/de-DE-BeyQVhTv.mjs +299 -0
  143. package/dist/de-DE-BvHD68Ay.js +1 -0
  144. package/dist/de-DE-CI2zQkiP.mjs +266 -0
  145. package/dist/de-DE-_40QfLNJ.js +1 -0
  146. package/dist/diners.svg.es-DhchsD1D.mjs +4 -0
  147. package/dist/diners.svg.es-SydF_H-Z.js +1 -0
  148. package/dist/discover.svg.es-B8vgzVNG.js +1 -0
  149. package/dist/discover.svg.es-BnqYPvnV.mjs +4 -0
  150. package/dist/eftpos.svg.es-DO0YPaY1.js +1 -0
  151. package/dist/eftpos.svg.es-DRLaafYa.mjs +4 -0
  152. package/dist/elo.svg.es-CTOm1rvj.js +1 -0
  153. package/dist/elo.svg.es-CgkEOP_O.mjs +4 -0
  154. package/dist/en-US--NRsi7Hz.js +1 -0
  155. package/dist/{en-US-D0P7NNNZ.mjs → en-US-5YWNEi-V.mjs} +72 -1
  156. package/dist/{en-US-Daw3v6GD.mjs → en-US-DksUWPIu.mjs} +10 -0
  157. package/dist/en-US-dqfKx3GS.js +1 -0
  158. package/dist/eps.svg.es-CApyGjyU.js +1 -0
  159. package/dist/eps.svg.es-D6IHsRYP.mjs +4 -0
  160. package/dist/formatting.es-DBtYnvI5.js +1 -0
  161. package/dist/{formatting.es-D-oVnc8H.mjs → formatting.es-eYgXv_AK.mjs} +3 -1
  162. package/dist/gcash.svg.es-BhJ-eA2z.mjs +4 -0
  163. package/dist/gcash.svg.es-JaL4fpZr.js +1 -0
  164. package/dist/girocard.svg.es-D_3LML4l.mjs +4 -0
  165. package/dist/girocard.svg.es-tVgtT23w.js +1 -0
  166. package/dist/go-pay.svg.es-6UtgwVBA.mjs +4 -0
  167. package/dist/go-pay.svg.es-fYX6yMzJ.js +1 -0
  168. package/dist/google-pay.svg.es-BYXX1em8.js +1 -0
  169. package/dist/google-pay.svg.es-CRxXgFVl.mjs +4 -0
  170. package/dist/hipercard.svg.es-Ct1-mF9F.mjs +4 -0
  171. package/dist/hipercard.svg.es-D-nmiFXB.js +1 -0
  172. package/dist/icon-sprite.svg.es-BpwT0GQ5.js +1 -0
  173. package/dist/icon-sprite.svg.es-YYqtl2IP.mjs +4 -0
  174. package/dist/ideal.svg.es-D23EhJJ2.mjs +4 -0
  175. package/dist/ideal.svg.es-DXtHE0Jb.js +1 -0
  176. package/dist/{index-C5bKRt7l.mjs → index-Cai7laNY.mjs} +1 -1
  177. package/dist/{index-BJ3dHkSK.js → index-IZaUTAsE.js} +1 -1
  178. package/dist/{index.es-0cystq8F.mjs → index.es-D5xOw_SJ.mjs} +2 -2
  179. package/dist/{invoices-BSd-nKeE.mjs → invoices-1oYkdQQV.mjs} +1 -1
  180. package/dist/{invoices-BiqM6xN6.js → invoices-BAoh6X2a.js} +1 -1
  181. package/dist/it-IT-B6blp8MI.mjs +299 -0
  182. package/dist/it-IT-CEP3oeWs.js +1 -0
  183. package/dist/it-IT-CMy1tHKZ.mjs +266 -0
  184. package/dist/it-IT-aPQY57ht.js +1 -0
  185. package/dist/jcb.svg.es-Bz6J-c0s.js +1 -0
  186. package/dist/jcb.svg.es-CcH08OoO.mjs +4 -0
  187. package/dist/kakao-pay.svg.es-DcgRDAsc.mjs +4 -0
  188. package/dist/kakao-pay.svg.es-qVTABboW.js +1 -0
  189. package/dist/klarna.svg.es-Clu-7zkp.js +1 -0
  190. package/dist/klarna.svg.es-DfIPX0gr.mjs +4 -0
  191. package/dist/maestro.svg.es-CVmNVokN.mjs +4 -0
  192. package/dist/maestro.svg.es-e8E_H2QU.js +1 -0
  193. package/dist/mastercard.svg.es-B8z0ZySS.mjs +4 -0
  194. package/dist/mastercard.svg.es-YO3_jGD6.js +1 -0
  195. package/dist/momo.svg.es-BXTQlQRy.js +1 -0
  196. package/dist/momo.svg.es-Bm5zCTOT.mjs +4 -0
  197. package/dist/{nl-NL-B4zEBFTw.mjs → nl-NL-CckNM7R9.mjs} +10 -0
  198. package/dist/nl-NL-CjoW8r_M.mjs +314 -0
  199. package/dist/nl-NL-e_vf6OuT.js +1 -0
  200. package/dist/nl-NL-zRUAuEHg.js +1 -0
  201. package/dist/nyce.svg.es-CgurqLKH.mjs +4 -0
  202. package/dist/nyce.svg.es-DM6esO47.js +1 -0
  203. package/dist/open-banking.svg.es-DUM360xB.js +1 -0
  204. package/dist/open-banking.svg.es-DzzLCVp_.mjs +4 -0
  205. package/dist/{paymentMethods-Cu2RzLgm.js → paymentMethods-CZ3ydybI.js} +1 -1
  206. package/dist/{paymentMethods-BsrkEbKT.mjs → paymentMethods-DIV78w0O.mjs} +1 -1
  207. package/dist/{payments-Bbm1HMQj.js → payments--lkjiwCt.js} +1 -1
  208. package/dist/{payments-B6Nfd6Al.mjs → payments-Cvqdrprv.mjs} +1 -1
  209. package/dist/paypal.svg.es-BdkNTf3c.js +1 -0
  210. package/dist/paypal.svg.es-DltWzW4V.mjs +4 -0
  211. package/dist/pulse.svg.es-BdpWAuIN.js +1 -0
  212. package/dist/pulse.svg.es-BecAwT-p.mjs +4 -0
  213. package/dist/screens/Checkout/Checkout.cjs +1 -1
  214. package/dist/screens/Checkout/Checkout.mjs +62 -62
  215. package/dist/screens/CustomerOverview/CustomerOverview.cjs +1 -1
  216. package/dist/screens/CustomerOverview/CustomerOverview.mjs +10 -10
  217. package/dist/screens/PayInvoice/PayInvoice.cjs +1 -1
  218. package/dist/screens/PayInvoice/PayInvoice.mjs +141 -38
  219. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs +1 -1
  220. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +12 -14
  221. package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs +1 -1
  222. package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +28 -31
  223. package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs +1 -1
  224. package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +18 -18
  225. package/dist/sepa.svg.es-BF8PYKZg.js +1 -0
  226. package/dist/sepa.svg.es-cbE9g8gV.mjs +4 -0
  227. package/dist/star.svg.es-DsCD-tSp.mjs +4 -0
  228. package/dist/star.svg.es-Q50IzqXr.js +1 -0
  229. package/dist/{subscriptions-B4BOzLxR.js → subscriptions-300o4ae0.js} +1 -1
  230. package/dist/{subscriptions-C2C4WTuI.mjs → subscriptions-DcMHBPVJ.mjs} +1 -1
  231. package/dist/trustly.svg.es-C0Ou1HWk.mjs +4 -0
  232. package/dist/trustly.svg.es-CHojqNqm.js +1 -0
  233. package/dist/twint.svg.es-CQ-ZDfy8.js +1 -0
  234. package/dist/twint.svg.es-WrZYquRs.mjs +4 -0
  235. package/dist/types/components/payments/PaymentIntegrationForm/PaymentIntegrationForm.types.d.ts +2 -0
  236. package/dist/types/components/payments/PaymentMethodsUnavailableCard/PaymentMethodsUnavailableCard.types.d.ts +8 -0
  237. package/dist/types/components/providers/LoggerProvider/LoggerProvider.lib.d.ts +8 -0
  238. package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +32 -2
  239. package/dist/types/translations/supported.d.ts +1 -1
  240. package/dist/unionpay.svg.es-DYgo83Hf.mjs +4 -0
  241. package/dist/unionpay.svg.es-YqJKKFEj.js +1 -0
  242. package/dist/url-CjULBkjW.js +1 -0
  243. package/dist/url-CvNDq4wp.mjs +22 -0
  244. package/dist/{useActionDispatchProvider-D55t_7LY.mjs → useActionDispatchProvider-BVOBO0Jx.mjs} +1 -1
  245. package/dist/{useActionDispatchProvider-Cz8xLLYA.js → useActionDispatchProvider-Cv9amjTf.js} +1 -1
  246. package/dist/{useCustomer-DYCpgA-3.js → useCustomer-DLHOs4BR.js} +1 -1
  247. package/dist/{useCustomer-BNhHz9RJ.mjs → useCustomer-EDhref7T.mjs} +1 -1
  248. package/dist/{useCustomerFormLabels-mX5QpApD.mjs → useCustomerFormLabels-B61-4xQ7.mjs} +111 -85
  249. package/dist/useCustomerFormLabels-C6wW4n2e.js +1 -0
  250. package/dist/useExperimentalFeature-0yFoaEzV.js +1 -0
  251. package/dist/useExperimentalFeature-DvxOrFPU.mjs +9 -0
  252. package/dist/{useInvoiceData-BczeMpuk.js → useInvoiceData-BSjVeJrI.js} +1 -1
  253. package/dist/{useInvoiceData-D-EvEioP.mjs → useInvoiceData-C0Y5WrbT.mjs} +2 -2
  254. package/dist/useInvoicesList-BRDZqsaB.js +1 -0
  255. package/dist/{useInvoicesList-BJJYwkIA.mjs → useInvoicesList-CYoE7q0u.mjs} +220 -184
  256. package/dist/{useLoadInitialData-BoGjdUu-.mjs → useLoadInitialData-Cp1OA8y6.mjs} +1 -1
  257. package/dist/{useLoadInitialData-CiJldX50.js → useLoadInitialData-u7IyXqb6.js} +1 -1
  258. package/dist/usePaymentMethodAvailability-B3s1lqQ2.js +1 -0
  259. package/dist/usePaymentMethodAvailability-EuhZPghG.mjs +141 -0
  260. package/dist/{usePaymentMethodOptions-fBvWYynV.js → usePaymentMethodOptions--8QpMvNm.js} +1 -1
  261. package/dist/{usePaymentMethodOptions-d49aOdLB.mjs → usePaymentMethodOptions-Cljh7HYp.mjs} +1 -1
  262. package/dist/{usePaymentMethods-Bkouz8aQ.mjs → usePaymentMethods-BJzoI8dZ.mjs} +1 -1
  263. package/dist/{usePaymentMethods-CFL3hFW_.js → usePaymentMethods-DvEnJWmB.js} +1 -1
  264. package/dist/usePayments-CANj0QVc.js +1 -0
  265. package/dist/{usePayments-BlliAt1E.mjs → usePayments-CaT1CBzE.mjs} +159 -59
  266. package/dist/{usePortal-fhri8neB.js → usePortal-BjGoSeLy.js} +1 -1
  267. package/dist/{usePortal-eyA4OqjU.mjs → usePortal-CMPQ0M9R.mjs} +1 -1
  268. package/dist/{useSubscription--IGLmLS6.mjs → useSubscription-D1UKnZAx.mjs} +1 -1
  269. package/dist/{useSubscription-V3KSuhOY.js → useSubscription-DZfRHbL7.js} +1 -1
  270. package/dist/visa.svg.es-B6aU_qRs.mjs +4 -0
  271. package/dist/visa.svg.es-D6sc4YTE.js +1 -0
  272. package/dist/vpay.svg.es-4qIqS4aX.mjs +4 -0
  273. package/dist/vpay.svg.es-CLGTyB09.js +1 -0
  274. package/dist/zip.svg.es-3PzSBe1E.mjs +4 -0
  275. package/dist/zip.svg.es-BRsgmur-.js +1 -0
  276. package/package.json +14 -2
  277. package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang--AVI4Q4E.js +0 -1
  278. package/dist/Amount.vue.es-CeW8S7kT.js +0 -1
  279. package/dist/Button.vue.es-aLcIdATK.js +0 -1
  280. package/dist/Chip.vue.es-DPGTweAr.mjs +0 -164
  281. package/dist/Chip.vue.es-q4c-DXXl.js +0 -1
  282. package/dist/ContextMenu.vue.es-C_TL7-kg.js +0 -1
  283. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CMIVAoQq.js +0 -1
  284. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-BP-VRwEM.js +0 -1
  285. package/dist/ErrorNotification.vue.es-BX3khKFc.js +0 -1
  286. package/dist/ErrorNotification.vue.es-C22Kt8Qn.mjs +0 -30
  287. package/dist/FormMessage.vue.es-LeWoj774.js +0 -1
  288. package/dist/IconButton.vue.es-CVFn0Ntj.js +0 -1
  289. package/dist/IconTitle.vue.es-DoN4GVde.js +0 -1
  290. package/dist/Input.vue.es-C8VhMKuI.js +0 -1
  291. package/dist/InvoiceSummary.vue.es-emE-mCFh.js +0 -1
  292. package/dist/Modal.vue.es-CX5geho3.js +0 -1
  293. package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-B_IIOBjg.js +0 -1
  294. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BdfWchcQ.js +0 -1
  295. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-D8fkE1yG.js +0 -1
  296. package/dist/PaymentIntegrationFormAdyen-BjPpoLF7.js +0 -1
  297. package/dist/PaymentIntegrationFormStripe-51KZc27R.js +0 -1
  298. package/dist/PaymentMethod.vue.es-CH__kPw4.mjs +0 -636
  299. package/dist/PaymentMethod.vue.es-uVZO0Zju.js +0 -1
  300. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-BktA5F4r.js +0 -1
  301. package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-XPz73RVU.js +0 -1
  302. package/dist/PricingGroupRangeInput.vue.es-BuQeJCEX.js +0 -1
  303. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Jk34S5B7.js +0 -1
  304. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-CttBs_G8.js +0 -1
  305. package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-Dl5Lg39D.js +0 -1
  306. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-CTnTWaB8.js +0 -1
  307. package/dist/TrialChip.vue.es-0nrqSZeY.js +0 -1
  308. package/dist/adyen-BMDZQBUG.js +0 -1
  309. package/dist/cn.es-BLHlMR4Y.js +0 -1
  310. package/dist/customElements-BTJzBHMy.js +0 -1
  311. package/dist/en-US-BSrbFk5W.js +0 -1
  312. package/dist/en-US-scSQQXK8.js +0 -1
  313. package/dist/formatting.es-9hM8aHSg.js +0 -1
  314. package/dist/nl-NL-B5tuyIOM.mjs +0 -88
  315. package/dist/nl-NL-Bs3d8q6T.js +0 -1
  316. package/dist/nl-NL-DIAZWDF9.js +0 -1
  317. package/dist/useCustomerFormLabels-Cw6QpEJY.js +0 -1
  318. package/dist/useInvoicesList-rMg-8LbH.js +0 -1
  319. package/dist/usePayments-BKTNn_RN.js +0 -1
@@ -0,0 +1 @@
1
+ const e=require("vue"),t=require("./api.es-Czekkp_X.js"),o=require("./customElements-DD7bpqkx.js"),n=require("./component-hDuDTBt5.js"),a=require("./useService-D73FNBjT.js"),i=require("./ErrorNotification.vue.es-CaEFTi2k.js"),l=require("./pricingItemConfigs.es-C73cQlxQ.js"),u=require("./formatting.es-DBtYnvI5.js"),r=require("./Button.vue.es-O8mNivLL.js"),d=require("./TooltipParagraph.vue.es-H9fI7zzt.js"),s=require("./Section.vue.es-CAJvEDn6.js"),c=require("./Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),p=require("./EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-DkIK-lID.js"),m=require("./index-IZaUTAsE.js"),v=require("./Divider.vue.es-ClFG8QtG.js"),f=require("./Expand.vue.es-C-lnbA1v.js"),_=require("./cn.es-DxSeYcoP.js"),h=require("./invoices-BAoh6X2a.js"),g=require("./useWatchDebounced-C_YxgoQ6.js"),y=require("./Input.vue.es-DqKJhFTr.js"),b=require("./AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-kmam2c7P.js"),w=require("./SubscriptionSummary.vue_vue_type_script_setup_true_lang-CabskT-r.js"),x=require("./customer.es-D42Md24r.js"),B=require("./usePaymentMethodOptions--8QpMvNm.js"),M=require("./Modal.vue.es-B_1aqm_m.js"),C=(e,t,o)=>{var n,a,i,l,r,d;if(null==o?void 0:o.amount)return u.formatAmount(o.amount);if(null==o?void 0:o.credits){const u=Number(o.credits.quantity),s=(1===u?null==(a=null==(n=o.credits.credit_type)?void 0:n.unit_name)?void 0:a.singular:(null==(l=null==(i=o.credits.credit_type)?void 0:i.unit_name)?void 0:l.plural)??(null==(d=null==(r=o.credits.credit_type)?void 0:r.unit_name)?void 0:d.singular))??e({defaultMessage:"credits",description:"Wallet balances credits default message",id:"wB/wXs"});return`${t(u)} ${s}`}return e({defaultMessage:"N/A",description:"Fallback wallet balance label when no balance is available",id:"PW+sL4"})},T=e.defineComponent({__name:"DateTimeAgo",props:{date:{},actionVerb:{}},setup(t){const n=3600,a=t,{$t:i,formatDate:l}=o.useIntl(),u=e.ref(Date.now());let r;e.onMounted(()=>{r=setInterval(()=>{u.value=Date.now()},3e4)}),e.onBeforeUnmount(()=>{clearInterval(r)});const s=e.computed(()=>{const e=Math.max(0,(u.value-a.date.getTime())/1e3);if(e<60)return i({defaultMessage:"{count, plural, one {# second} other {# seconds}} ago",id:"dateTimeAgo.seconds",description:"Relative time in whole seconds"},{count:Math.trunc(e)});if(e<n)return i({defaultMessage:"{count, plural, one {# minute} other {# minutes}} ago",id:"dateTimeAgo.minutes",description:"Relative time in whole minutes"},{count:Math.trunc(e/60)});if(e<86400)return i({defaultMessage:"{count, plural, one {# hour} other {# hours}} ago",id:"dateTimeAgo.hours",description:"Relative time in whole hours"},{count:Math.trunc(e/n)});const t=((e,t)=>{const o=12*(t.getFullYear()-e.getFullYear())+(t.getMonth()-e.getMonth());return t.getDate()<e.getDate()?o-1:o})(a.date,new Date(u.value));if(t<1){const t=Math.trunc(e/86400);return 1===t?i({defaultMessage:"yesterday",id:"dateTimeAgo.yesterday",description:'Relative time for a single day ago, reading as "updated yesterday" once the action verb is in front'}):i({defaultMessage:"{count, plural, one {# day} other {# days}} ago",id:"dateTimeAgo.days",description:"Relative time in whole days"},{count:t})}return t<12?i({defaultMessage:"{count, plural, one {# month} other {# months}} ago",id:"dateTimeAgo.months",description:"Relative time in whole months"},{count:t}):i({defaultMessage:"{count, plural, one {# year} other {# years}} ago",id:"dateTimeAgo.years",description:"Relative time in whole years"},{count:Math.trunc(t/12)})}),c=e.computed(()=>a.actionVerb?`${a.actionVerb} ${s.value}`:s.value),p=e.computed(()=>l({date:a.date,format:"dateTime",offsetType:"local"}));return(t,o)=>(e.openBlock(),e.createBlock(d._sfc_main,null,{tooltip:e.withCtx(()=>[e.createVNode(d.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(d._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.value),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(c.value),1)]),_:1}))}}),S=t=>{const{$t:n,formatNumber:a}=o.useIntl(),i=e=>C(n,a,e),u=e.computed(()=>{var e,o;return(null==(o=null==(e=t.walletBalance.wallet)?void 0:e.wallet_type)?void 0:o.name)||n({defaultMessage:"Balance",id:"wallet_balance.balance_label",description:"Label shown above a wallet's balance amount"})}),r=e=>{var t;return((null==(t=e.pricing_item)?void 0:t.configs)??[]).filter(e=>!!e.on_demand)},d=e.computed(()=>(t.walletBalance.charge_on_demand_pricing_items??[]).filter(e=>r(e).some(e=>l.isFixedPricing(e)||l.isFlexiblePricing(e)))),s=e.computed(()=>d.value.find(e=>r(e).some(e=>l.isFlexiblePricing(e)))),c=e.computed(()=>!!t.showManualTopUp&&d.value.length>0),p=e.computed(()=>!!t.showAutoTopUp&&!!s.value),m=e.computed(()=>{var e,o;return null==(o=null==(e=t.walletBalance.wallet)?void 0:e.auto_top_up_configs)?void 0:o.find(e=>"ACTIVE"===e.status)}),v=e.computed(()=>{var e,o;return null==(o=null==(e=t.walletBalance.wallet_balance.open_balance)?void 0:e.credits)?void 0:o.credit_type}),f=(e,t)=>i({credits:{quantity:e,credit_type_id:t,credit_type:v.value}}),_=e.computed(()=>{var e,o;const n=null==(e=m.value)?void 0:e.pricing_item_id;if(!n)return;const a=(t.walletBalance.charge_on_demand_pricing_items??[]).filter(e=>e.pricing_item_id===n).flatMap(e=>r(e)).flatMap(e=>e.wallet_grants??[]),i=null==(o=t.walletBalance.wallet)?void 0:o.wallet_type_id;return a.find(e=>e.wallet_type_id===i)??a[0]}),h=e.computed(()=>{var e,t;const o=null==(e=m.value)?void 0:e.topup_amount,n=null==(t=_.value)?void 0:t.credits_grant;if(!o||!n)return"";if(n.credits)return f(n.credits.quantity,n.credits.credit_type_id);if(n.conversion){const e=Number(o.quantity)*Number(n.conversion.rate);return f(String(e),n.conversion.credit_type_id)}return""}),g=e.computed(()=>m.value?n({defaultMessage:"Auto top-up enabled",id:"wallet_balance.auto_top_up_enabled_label",description:"Label shown when a wallet tops itself up automatically"}):n({defaultMessage:"No auto top-up enabled",id:"wallet_balance.auto_top_up_disabled_label",description:"Label shown when a wallet has no automatic top-up configured"})),y=e.computed(()=>{const e=m.value;if(!e)return n({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.",id:"wallet_balance.auto_top_up_setup_explanation",description:"Tooltip explaining what automatic top-ups do, shown when none is configured yet"});const t=e.topup_amount?i({amount:e.topup_amount}):"",o=(e=>e.amount?i({amount:e.amount}):e.credits?f(e.credits.quantity,e.credits.credit_type_id):"")(e.threshold);return t&&o?h.value?n({defaultMessage:"Your balance is automatically increased with {topUpCredits} ({topUpAmount}) when it drops below {threshold}.",id:"wallet_balance.auto_top_up_credits_explanation",description:"Tooltip explaining an automatic top-up that grants credits for a paid amount"},{topUpCredits:h.value,topUpAmount:t,threshold:o}):n({defaultMessage:"Your balance is automatically increased with {topUpAmount} when it drops below {threshold}.",id:"wallet_balance.auto_top_up_explanation",description:"Tooltip explaining how the automatic top-up of a wallet balance works"},{topUpAmount:t,threshold:o}):n({defaultMessage:"Your balance is topped up automatically once it runs low.",id:"wallet_balance.auto_top_up_generic_explanation",description:"Tooltip shown for an active automatic top-up whose amount or threshold is unknown"})});return{walletName:u,formatBalance:i,manualTopUpItems:d,flexibleManualTopUpItem:s,showManualTopUp:c,showAutoTopUp:p,activeTopUpConfig:m,autoTopUpLabel:g,autoTopUpExplanation:y}},P={class:"flex flex-col gap-3 py-3"},k={class:"flex flex-col gap-1 px-4"},N={class:"flex w-full justify-between gap-3"},V={class:"flex w-full items-center gap-4"},I={key:0},U={key:1,class:"flex w-full justify-between gap-3 px-4"},E={class:"flex min-w-0 items-center gap-1"},A={class:"flex min-w-0 items-center gap-1"},D={class:"shrink-0"},O=e.defineComponent({__name:"WalletBalancesItem",props:{walletBalance:{},showAutoTopUp:{type:Boolean},showManualTopUp:{type:Boolean}},emits:["top-up","auto-top-up","cancel-auto-top-up"],setup(t){const n=t,{$t:a}=o.useIntl(),{walletName:i,formatBalance:l,manualTopUpItems:u,flexibleManualTopUpItem:s,showManualTopUp:c,showAutoTopUp:p,activeTopUpConfig:m,autoTopUpLabel:v,autoTopUpExplanation:f}=S(n);return(_,h)=>(e.openBlock(),e.createElementBlock("div",P,[e.createElementVNode("div",k,[e.createElementVNode("div",N,[e.createVNode(o._sfc_main,{variant:"body-xs",color:"subtle","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)),1)]),_:1}),e.createVNode(o._sfc_main,{variant:"body-xs",color:"subtle","no-spacing":""},{default:e.withCtx(()=>{var o,n;return[(null==(o=t.walletBalance.wallet_balance)?void 0:o.balance_at)?(e.openBlock(),e.createBlock(T,{key:0,date:new Date(null==(n=t.walletBalance.wallet_balance)?void 0:n.balance_at),"action-verb":e.unref(a)({defaultMessage:"updated",id:"wallet_balance.updated_action_verb",description:"Verb in front of when a wallet balance was last updated, e.g. 'updated 5 minutes ago'"})},null,8,["date","action-verb"])):e.createCommentVNode("",!0)]}),_:1})]),e.createElementVNode("div",V,[e.createVNode(o._sfc_main,{variant:"body-lg",weight:"semibold","no-spacing":"",class:"grow"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)(n.walletBalance.wallet_balance.open_balance)),1)]),_:1}),e.unref(c)?(e.openBlock(),e.createBlock(e.unref(r._sfc_main$1),{key:0,size:"xs",onClick:h[0]||(h[0]=t=>_.$emit("top-up",e.unref(u)[0]))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Top up",id:"v1V8kA",description:"Button to top up a wallet balance"})),1)]),_:1})):e.createCommentVNode("",!0)])]),_.$slots.graph?(e.openBlock(),e.createElementBlock("div",I,[e.renderSlot(_.$slots,"graph")])):e.createCommentVNode("",!0),e.unref(p)?(e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("div",E,[e.createVNode(d._sfc_main,{class:"min-w-0"},{tooltip:e.withCtx(()=>[e.createVNode(d.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(d._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",A,[e.createVNode(o._sfc_main,{variant:"body-sm",color:"secondary","no-spacing":"",class:"truncate"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(v)),1)]),_:1}),e.createVNode(r._sfc_main,{icon:"info",size:"2xs",class:"shrink-0 cursor-help text-gray-400"})])]),_:1})]),e.createElementVNode("div",D,[e.unref(m)?(e.openBlock(),e.createBlock(e.unref(r._sfc_main$1),{key:0,size:"xs",intent:"secondary",onClick:h[1]||(h[1]=t=>_.$emit("cancel-auto-top-up",e.unref(m)))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Disable",id:"wallet_balance.auto_top_up_disable_button",description:"Button to turn off a wallet's automatic top-up"})),1)]),_:1})):(e.openBlock(),e.createBlock(e.unref(r._sfc_main$1),{key:1,size:"xs",intent:"secondary",onClick:h[2]||(h[2]=t=>_.$emit("auto-top-up",e.unref(s)))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Enable",id:"wallet_balance.auto_top_up_enable_button",description:"Button to set up a wallet's automatic top-up"})),1)]),_:1}))])])):e.createCommentVNode("",!0)]))}}),$={class:"flex flex-col gap-2"},q=e.defineComponent({__name:"WalletBalances",props:{customerWalletBalances:{},title:{default:void 0},showAutoTopUp:{type:Boolean,default:!1},showManualTopUp:{type:Boolean,default:!1}},emits:["top-up","auto-top-up","cancel-auto-top-up"],setup:t=>(o,n)=>(e.openBlock(),e.createBlock(s._sfc_main,{"no-spacing":"","no-border":"",title:t.title},e.createSlots({default:e.withCtx(()=>[e.createElementVNode("div",$,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customerWalletBalances,a=>(e.openBlock(),e.createBlock(s._sfc_main,{key:a.wallet_id,"no-spacing":""},{default:e.withCtx(()=>[e.createVNode(O,{"wallet-balance":a,"show-auto-top-up":t.showAutoTopUp,"show-manual-top-up":t.showManualTopUp,onTopUp:n[0]||(n[0]=e=>o.$emit("top-up",e)),onAutoTopUp:n[1]||(n[1]=e=>o.$emit("auto-top-up",e)),onCancelAutoTopUp:n[2]||(n[2]=e=>o.$emit("cancel-auto-top-up",e))},null,8,["wallet-balance","show-auto-top-up","show-manual-top-up"])]),_:2},1024))),128))])]),_:2},[o.$slots["heading-right"]?{name:"right",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"heading-right")]),key:"0"}:void 0]),1032,["title"]))});const R=(e=[],t)=>{if(null==t?void 0:t.pricing_item_id)return e.find(e=>(e.charge_on_demand_pricing_items??[]).some(({pricing_item_id:e})=>e===t.pricing_item_id))},j=["TOP_UP","ADD_PAYMENT_METHOD","SUCCESS"],L=e=>"object"==typeof e&&null!==e&&"pricing_item"in e,F=(e,t)=>{const o=new Set((e=>[...new Set(((null==e?void 0:e.charge_on_demand_pricing_items)??[]).flatMap(e=>L(e)&&e.pricing_plan_schedule_id?[e.pricing_plan_schedule_id]:[]))])(e));return t.flatMap(e=>{const t=(e.pricing_plan_schedule_infos??[]).filter(({id:e})=>o.has(e));return 0===t.length?[]:[{id:e.id,name:e.name||e.reference||e.id,scheduleIds:t.map(({id:e})=>e),enabledPricingIds:t.flatMap(e=>{var t;return((null==(t=e.pricing_plan_schedule)?void 0:t.enabled_pricings)??[]).flatMap(({pricing_id:e})=>e?[e]:[])})}]})},Y=e=>((null==e?void 0:e.charge_on_demand_pricing_items)??[]).flatMap(t=>{var o,n;if(!L(t))return[];const a=t.pricing_item_id??(null==(o=t.pricing_item)?void 0:o.id);return a?((null==(n=t.pricing_item)?void 0:n.configs)??[]).map(o=>{const n=function(e,t){var o,n,a,i,u,r,d;if(!e.on_demand||!l.isFlexiblePricing(e))return;const s=null==(n=null==(o=e.details)?void 0:o.bands)?void 0:n[0],c=(null==(a=null==s?void 0:s.minimum_amount)?void 0:a.currency)??(null==(i=null==s?void 0:s.maximum_amount)?void 0:i.currency)??(null==(r=null==(u=null==t?void 0:t.wallet_balance.balance)?void 0:u.amount)?void 0:r.currency);if(!c)return;const p=z(t),m=p?W(e,t):void 0,v=null==(d=null==p?void 0:p.credit_type)?void 0:d.unit_name,f=e=>{if(!e)return;const t=p&&m?J(e.quantity,m.rate):void 0;return void 0!==t&&p?G(t,p):{amount:e}};return{config:{...(null==s?void 0:s.minimum_amount)&&{minimum_amount:s.minimum_amount},...(null==s?void 0:s.maximum_amount)&&{maximum_amount:s.maximum_amount}},currency:c,...m&&{creditsConfiguration:{conversionRate:m.rate,...(null==v?void 0:v.singular)&&{unitNameSingle:v.singular},...(null==v?void 0:v.plural)&&{unitNamePlural:v.plural}}},bounds:{...f(null==s?void 0:s.minimum_amount)&&{minimum:f(null==s?void 0:s.minimum_amount)},...f(null==s?void 0:s.maximum_amount)&&{maximum:f(null==s?void 0:s.maximum_amount)}}}}(o,e),i=function(e,t){var o,n,a;if(!e.on_demand||!l.hasOneOfPricingTypes(e,["FIXED"]))return;const i=null==(a=null==(n=null==(o=e.details)?void 0:o.bands)?void 0:n[0])?void 0:a.fixed_amount;if(!i)return;const u=z(t),r=u?X(e,t):void 0;return{amount:i,value:r&&u?G(r.quantity,u):{amount:i}}}(o,e);return{pricingItemId:a,...t.pricing_plan_schedule_id&&{pricingPlanScheduleId:t.pricing_plan_schedule_id},config:o,...n&&{flexiblePricing:n},...i&&{fixedPricing:i}}}):[]});const z=e=>{var t;return null==(t=null==e?void 0:e.wallet_balance.balance)?void 0:t.credits},H=(e,t)=>{var o;const n=null==(o=null==t?void 0:t.wallet)?void 0:o.wallet_type_id;return(e.wallet_grants??[]).filter(({wallet_type_id:e})=>!n||e===n)},W=(e,t)=>{var o,n;return null==(n=null==(o=H(e,t).find(({credits_grant:e})=>null==e?void 0:e.conversion))?void 0:o.credits_grant)?void 0:n.conversion},X=(e,t)=>{var o,n;return null==(n=null==(o=H(e,t).find(({credits_grant:e})=>null==e?void 0:e.credits))?void 0:o.credits_grant)?void 0:n.credits},G=(e,t)=>({credits:{...t,quantity:e}}),J=(e,t)=>{const o=Number(e),n=Number(t);return Number.isFinite(o)&&Number.isFinite(n)?String(o*n):void 0};const K=e=>{var t,o,n,a,i;return!!(null==(t=e.fixedPricing)?void 0:t.value.credits)||!!(null==(o=e.flexiblePricing)?void 0:o.creditsConfiguration)||!!(null==(i=(null==(n=e.flexiblePricing)?void 0:n.bounds.minimum)??(null==(a=e.flexiblePricing)?void 0:a.bounds.maximum))?void 0:i.credits)},Q=(e=[])=>{for(const{flexiblePricing:t,fixedPricing:o}of e){const e=(null==t?void 0:t.currency)??(null==o?void 0:o.amount.currency);if(e)return e}},Z=(e=[])=>{var t,o,n;for(const{fixedPricing:a,flexiblePricing:i}of e){const e=(null==a?void 0:a.value.credits)??(null==(t=(null==i?void 0:i.bounds.minimum)??(null==i?void 0:i.bounds.maximum))?void 0:t.credits);if(null==(n=null==(o=null==e?void 0:e.credit_type)?void 0:o.unit_name)?void 0:n.plural)return e.credit_type.unit_name.plural}},ee=(e=[])=>{var t;for(const{flexiblePricing:o}of e){const e=null==(t=null==o?void 0:o.creditsConfiguration)?void 0:t.conversionRate;if(e)return e}},te=(e=[])=>{for(const{flexiblePricing:t}of e){const{minimum_amount:e,maximum_amount:o}=(null==t?void 0:t.config)??{};if(e||o)return{...e&&{minimum:e},...o&&{maximum:o}}}return{}},oe=(e=[])=>{const t=((e=[])=>{if(e.some(K)){const t=(e=>{var t;for(const{fixedPricing:o,flexiblePricing:n}of e){const e=(null==o?void 0:o.value.credits)??(null==(t=(null==n?void 0:n.bounds.minimum)??(null==n?void 0:n.bounds.maximum))?void 0:t.credits);if(null==e?void 0:e.credit_type_id)return e.credit_type_id}})(e);return t?{creditTypeId:t}:void 0}for(const{flexiblePricing:t,fixedPricing:o}of e){const e=(null==t?void 0:t.currency)??(null==o?void 0:o.amount.currency);if(e)return{currency:e}}})(e);if(t)return{denomination:t,chargeCurrency:Q(e)??"",creditUnitName:Z(e),conversionRate:ee(e),topUpBounds:te(e)}};const ne={key:0},ae=e.defineComponent({__name:"TopUpInvoicePreview",props:{pricingPlanScheduleId:{type:String},pricingItems:{type:Array}},setup(t){const n=t,{$t:a}=o.useIntl(),i=e.computed(()=>n.pricingPlanScheduleId),l=e.computed(()=>n.pricingItems),{invoicePreview:u}=function({pricingPlanScheduleId:t,pricingItems:n}){const{previewChargeOnDemandPricingItems:a}=h.createInvoicesService(),i=o.useLogger(),l=e.ref(),u=e.ref(!1),r=o.createLatestGuard(),d=async()=>{const e=t.value,o=r();if(!e||!n.value)return n.value&&!e&&i.warn("INVOICE_PREVIEW_SKIPPED","Skipped the top-up invoice preview: no schedule to charge it on",{missing:["pricingPlanScheduleId"]}),l.value=void 0,void(u.value=!1);u.value=!0;try{const t=await a({pricingPlanScheduleId:e,pricingItems:n.value});o()&&(l.value=t)}catch(d){o()&&(l.value=void 0),i.error("INVOICE_PREVIEW_FAILED","Failed to load top-up invoice preview",{},d)}finally{o()&&(u.value=!1)}};return g.useWatchDebounced(n,()=>{d()},{debounce:400,deep:!0}),d(),{invoicePreview:l,isPreviewPending:u,loadPreview:d}}({pricingPlanScheduleId:i,pricingItems:l});return(t,o)=>(e.openBlock(),e.createBlock(c._sfc_main,{class:"sv-top-up-invoice-preview h-[152px]","data-testid":"top-up-invoice-preview-skeleton"},{default:e.withCtx(()=>[e.unref(u)?(e.openBlock(),e.createElementBlock("div",ne,[e.createVNode(e.unref(_._sfc_main),{required:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"You will pay",description:"Label above the preview of what topping up will be invoiced for",id:"topup_modal.invoice_preview.label"})),1)]),_:1}),e.createVNode(e.unref(s._sfc_main),{"content-background":"none"},{default:e.withCtx(()=>[e.createVNode(e.unref(p._sfc_main$2),{invoice:e.unref(u),"is-customer-facing":""},null,8,["invoice"])]),_:1})])):e.createCommentVNode("",!0)]),_:1}))}}),ie=(e,t)=>e.currency??t??e.creditTypeId??"",le=(e,t)=>({quantity:e??null,currency:t}),ue=(e,{denomination:t,chargeCurrency:o,creditUnitName:n,minimumTopUp:a})=>{var i,l,u,r,d;return{enabled:"ACTIVE"===(null==e?void 0:e.status),threshold:le((null==(l=null==(i=null==e?void 0:e.threshold)?void 0:i.amount)?void 0:l.quantity)??(null==(r=null==(u=null==e?void 0:e.threshold)?void 0:u.credits)?void 0:r.quantity),ie(t,n)),topUpAmount:le((null==(d=null==e?void 0:e.topup_amount)?void 0:d.quantity)??a,o)}},re=(e,t)=>{var o;const n=null==(o=e.threshold)?void 0:o.quantity;return n?t.creditTypeId?{credits:{quantity:n,credit_type_id:t.creditTypeId}}:{amount:{quantity:n,currency:t.currency??""}}:{}},de=(e,t)=>{var o;return(null==(o=e.topUpAmount)?void 0:o.quantity)?{quantity:e.topUpAmount.quantity,currency:e.topUpAmount.currency??t}:void 0},se=(e,{denomination:t,chargeCurrency:o})=>({status:e.enabled?"ACTIVE":"INACTIVE",threshold:re(e,t),...de(e,o)&&{topup_amount:de(e,o)}}),ce=(e,t)=>se(ue(e,t),t),pe=(e,t)=>JSON.stringify(e)===JSON.stringify(t),me=e=>{const t=Number(null==e?void 0:e.quantity);return(null==e?void 0:e.quantity)&&Number.isFinite(t)?t:void 0},ve=e=>{const t=Number(e);return null!=e&&""!==e&&Number.isFinite(t)?t:void 0},fe=(e,t,o)=>{const n=ve(e),a=ve(o);if(!(void 0===n||void 0===a||a<=0))return"CREDITS"===t?n/a:n*a},_e=(e,t,o,n)=>t===o?ve(e):fe(e,t,n),he=e=>e.toFixed(2),ge=(e,t)=>"AMOUNT"===t?he(e):String(Number(e.toFixed(6))),ye=(e,t,o,n)=>{const a=((e,t,o)=>"CREDITS"===t?fe(e,"AMOUNT",o):ve(e))(null==e?void 0:e.quantity,t,o);if(void 0!==a)return"CREDITS"===t?n(a):he(a)},be=["data-testid"],we=e.defineComponent({__name:"ConvertedAmountInput",props:e.mergeModels({unit:{type:String},modelBase:{type:String},entryBase:{type:String},conversionRate:{type:String},showConversionHint:{type:Boolean},currency:{type:String},creditUnitName:{type:String},bounds:{type:Object},label:{type:String},name:{type:String},required:{type:Boolean},disabled:{type:Boolean},error:{type:[String,Object,Array]}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const n=t,a=e.useModel(t,"modelValue"),{$t:i,formatNumber:l}=o.useIntl(),r=e.computed(()=>n.entryBase??n.modelBase),d=e.computed(()=>r.value!==n.modelBase&&void 0!==ve(n.conversionRate)),s=e.ref("");function c(e){const t=_e(e,r.value,n.modelBase,n.conversionRate);return void 0===t?"":ge(t,n.modelBase)}e.watch(()=>[a.value,r.value,n.modelBase,n.conversionRate],([e])=>{if(!d.value)return void(s.value=e??"");if(e===c(s.value))return;const t=_e(e,n.modelBase,r.value,n.conversionRate);s.value=void 0===t?"":ge(t,r.value)},{immediate:!0});const p=e.computed({get:()=>s.value,set:e=>{s.value=function(e){return"string"==typeof e?e:"number"==typeof e?String(e):""}(e),a.value=d.value?c(s.value):s.value}}),m=e.computed(()=>fe(s.value,r.value,n.conversionRate)),v=e.computed(()=>n.creditUnitName?n.creditUnitName:"CREDITS"===r.value?n.unit:i({defaultMessage:"credits",description:"Generic name for a wallet credit, where its credit type does not name one",id:"converted_amount_input.credits"})),f=e=>`${l(e)} ${v.value}`,_=e.computed(()=>{const t=n.error;return Array.isArray(t)?t.length>0:Boolean(e.isRef(t)?t.value:t)}),h=e.computed(()=>{const e=m.value;var t,o;if(!_.value&&n.showConversionHint&&void 0!==e)return"CREDITS"===r.value?n.currency?i({defaultMessage:"Will cost {amount} excluding taxes",description:"Helper text under a credits field, naming what those credits cost in money",id:"converted_amount_input.cost"},{amount:(t=e,o=n.currency,u.formatAmount({quantity:he(t),currency:o}))}):void 0:i({defaultMessage:"Buys about {credits}",description:"Helper text under a money field, naming the credits that amount converts into",id:"converted_amount_input.buys"},{credits:f(e)})}),g=e=>ye(e,r.value,n.conversionRate,l),b=e.computed(()=>{var e,t,o,a;return"CREDITS"===r.value?v.value:(null==(t=null==(e=n.bounds)?void 0:e.minimum)?void 0:t.currency)??(null==(a=null==(o=n.bounds)?void 0:o.maximum)?void 0:a.currency)??n.unit}),w=e.computed(()=>{var e,t;const o=g(null==(e=n.bounds)?void 0:e.minimum),a=g(null==(t=n.bounds)?void 0:t.maximum),l=b.value;return o&&a?i({defaultMessage:"Between {minimum} and {maximum} {unit}",description:"Range of what a flexible top-up may be charged for, beside its label",id:"converted_amount_input.bounds.range"},{minimum:o,maximum:a,unit:l}):o?i({defaultMessage:"At least {minimum} {unit}",description:"Smallest amount a flexible top-up may be charged for, beside its label",id:"converted_amount_input.bounds.minimum"},{minimum:o,unit:l}):a?i({defaultMessage:"Up to {maximum} {unit}",description:"Largest amount a flexible top-up may be charged for, beside its label",id:"converted_amount_input.bounds.maximum"},{maximum:a,unit:l}):void 0});return(n,a)=>(e.openBlock(),e.createBlock(e.unref(y._sfc_main),{modelValue:p.value,"onUpdate:modelValue":a[0]||(a[0]=e=>p.value=e),class:"sv-converted-amount-input",type:"number","as-text-type":"",name:t.name,label:t.label,required:t.required,disabled:t.disabled,error:t.error},e.createSlots({suffix:e.withCtx(()=>[e.createElementVNode("span",{"data-testid":`${t.name}-unit`},e.toDisplayString(t.unit),9,be)]),_:2},[w.value?{name:"label-suffix",fn:e.withCtx(()=>[e.createVNode(e.unref(o._sfc_main),{tag:"span",variant:"body-xs",color:"subtle","no-spacing":"","data-testid":`${t.name}-bounds`},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.value),1)]),_:1},8,["data-testid"])]),key:"0"}:void 0,h.value?{name:"helper",fn:e.withCtx(()=>[e.createVNode(e.unref(o._sfc_main),{tag:"span",variant:"body-xs",color:"subtle","no-spacing":"","data-testid":`${t.name}-conversion`},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.value),1)]),_:1},8,["data-testid"])]),key:"1"}:void 0]),1032,["modelValue","name","label","required","disabled","error"]))}}),xe=e.defineComponent({__name:"Section",props:{emphasized:{type:Boolean,default:!1},contentClasses:{type:String},contentBackground:{type:String},title:{type:String},noSpacing:{type:Boolean},hasError:{type:Boolean},noBorder:{type:Boolean}},setup(t){const o=t,n=["sv-section__accent relative","before:absolute before:inset-y-0.5 before:left-0.5 before:w-0.5","before:rounded-full before:bg-primary-600"].join(" "),a=e.computed(()=>[o.emphasized?n:void 0,o.contentClasses].filter(Boolean).join(" ")),i=e.computed(()=>{const{emphasized:e,...t}=o;return t});return(t,o)=>(e.openBlock(),e.createBlock(e.unref(s._sfc_main),e.mergeProps(i.value,{class:"sv-section","content-classes":a.value}),e.createSlots({default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:2},[t.$slots.right?{name:"right",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"right")]),key:"0"}:void 0]),1040,["content-classes"]))}}),Be={class:"flex grow flex-col"},Me=e.defineComponent({__name:"AutoTopUpConfig",props:{config:{type:Object},denomination:{type:Object},creditUnitName:{type:String},chargeCurrency:{type:String},conversionRate:{type:String},topUpBounds:{type:Object},showThresholdConversion:{type:Boolean,default:!0},contained:{type:Boolean},alwaysEnabled:{type:Boolean},disabled:{type:Boolean}},emits:["save"],setup(t,{expose:n,emit:a}){const i=t,l=a,{$t:r,formatNumber:d}=o.useIntl(),s=e.computed(()=>{var e,t;return{denomination:i.denomination,chargeCurrency:i.chargeCurrency,creditUnitName:i.creditUnitName,minimumTopUp:null==(t=null==(e=i.topUpBounds)?void 0:e.minimum)?void 0:t.quantity}}),c=e.ref(ue(i.config,s.value)),p=e.computed(()=>ie(i.denomination,i.creditUnitName)),v=e.computed(()=>i.denomination.creditTypeId?"CREDITS":"AMOUNT"),_=e.computed(()=>"CREDITS"===v.value?p.value:i.chargeCurrency),h=e.computed({get:()=>{var e;return(null==(e=c.value.threshold)?void 0:e.quantity)??""},set:e=>{c.value.threshold={quantity:e||null,currency:p.value}}}),g=e.computed({get:()=>{var e;return(null==(e=c.value.topUpAmount)?void 0:e.quantity)??""},set:e=>{c.value.topUpAmount={quantity:e||null,currency:i.chargeCurrency}}});e.watch(()=>[i.config,s.value],([e,t])=>{pe(ce(e,t),w())||(c.value=ue(e,t))});const y=e.computed({get:()=>i.alwaysEnabled||c.value.enabled,set:e=>{c.value.enabled=e}}),b=e.computed(()=>se({...c.value,enabled:y.value},s.value)),w=()=>b.value,x=e.reactive({threshold:e.computed(()=>me(c.value.threshold)??null),topUpAmount:e.computed(()=>me(c.value.topUpAmount)??null)}),B=e=>{if(!e)return"";const t=ye(e,v.value,i.conversionRate,d);return void 0===t?u.formatAmount(e):`${t} ${_.value}`},M=m.requiredIf(()=>y.value),C=m.useValidation({threshold:{required:m.common.withMessage(()=>r({defaultMessage:"Enter the balance to top up at.",description:"Error shown under the auto top-up threshold when it is left empty",id:"auto_topup_config.threshold.required"}),M),notNegative:m.common.withMessage(()=>r({defaultMessage:"The balance to top up at cannot be negative.",description:"Error shown under the auto top-up threshold when it is below zero",id:"auto_topup_config.threshold.not_negative"}),e=>null===e||e>=0)},topUpAmount:{required:m.common.withMessage(()=>r({defaultMessage:"Enter the amount to top up with.",description:"Error shown under the auto top-up amount when it is left empty",id:"auto_topup_config.amount.required"}),M),positive:m.common.withMessage(()=>r({defaultMessage:"Top up with more than zero.",description:"Error shown under the auto top-up amount when it is zero or negative",id:"auto_topup_config.amount.positive"}),e=>null===e||e>0),atLeastMinimum:m.common.withMessage(()=>{var e;return r({defaultMessage:"Top up with at least {minimum}.",description:"Error shown under the auto top-up amount when it is below what the pricing allows",id:"auto_topup_config.amount.at_least_minimum"},{minimum:B(null==(e=i.topUpBounds)?void 0:e.minimum)})},e=>{var t;return((e,t)=>{const o=Number(null==t?void 0:t.quantity);return null===e||!(null==t?void 0:t.quantity)||!Number.isFinite(o)||e>=o})(e,null==(t=i.topUpBounds)?void 0:t.minimum)}),withinMaximum:m.common.withMessage(()=>{var e;return r({defaultMessage:"Top up with at most {maximum}.",description:"Error shown under the auto top-up amount when it is above what the pricing allows",id:"auto_topup_config.amount.within_maximum"},{maximum:B(null==(e=i.topUpBounds)?void 0:e.maximum)})},e=>{var t;return((e,t)=>{const o=Number(null==t?void 0:t.quantity);return null===e||!(null==t?void 0:t.quantity)||!Number.isFinite(o)||e<=o})(e,null==(t=i.topUpBounds)?void 0:t.maximum)})}},x),T=e.computed(()=>!pe(w(),ce(i.config,s.value)));function S(){return C.value.$touch(),C.value.$invalid?void 0:w()}return n({submit:function(){const e=S();e&&l("save",e)},validate:S,rule:b,hasChanges:T,isInvalid:e.computed(()=>C.value.$invalid)}),(n,a)=>(e.openBlock(),e.createBlock(xe,{class:"sv-auto-topup-config","content-background":t.contained?"gray":"none","no-spacing":!t.contained,"no-border":!t.contained},{default:e.withCtx(()=>[t.alwaysEnabled?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(m._sfc_main),{key:0,modelValue:y.value,"onUpdate:modelValue":a[0]||(a[0]=e=>y.value=e),"no-spacing":"","label-position":"before",class:"!flex",disabled:t.disabled},{"inline-label":e.withCtx(()=>[e.createElementVNode("div",Be,[e.createVNode(e.unref(o._sfc_main),{tag:"span",variant:"body-sm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Auto top-up",description:"Title of the automatic wallet top-up settings",id:"auto_topup_config.title"})),1)]),_:1}),e.createVNode(e.unref(o._sfc_main),{tag:"span",variant:"body-xs",color:"subtle"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Automatically top up your balance when it runs low.",description:"Subtitle of the automatic wallet top-up settings",id:"auto_topup_config.subtitle"})),1)]),_:1})])]),_:1},8,["modelValue","disabled"])),e.createVNode(e.unref(f._sfc_main),{"is-open":y.value},{default:e.withCtx(()=>[y.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["grid grid-cols-1 gap-3",{"mt-4":!t.alwaysEnabled}])},[e.createVNode(we,{modelValue:h.value,"onUpdate:modelValue":a[1]||(a[1]=e=>h.value=e),name:"auto-top-up-threshold",unit:p.value,"model-base":v.value,"entry-base":v.value,currency:t.chargeCurrency,"conversion-rate":t.conversionRate,"show-conversion-hint":t.showThresholdConversion,required:"",disabled:t.disabled,error:e.unref(C).threshold.$errors,label:e.unref(r)({defaultMessage:"When your balance falls below",description:"Label of the balance at which an automatic top-up is charged",id:"auto_topup_config.threshold.label"})},null,8,["modelValue","unit","model-base","entry-base","currency","conversion-rate","show-conversion-hint","disabled","error","label"]),e.createVNode(we,{modelValue:g.value,"onUpdate:modelValue":a[2]||(a[2]=e=>g.value=e),name:"auto-top-up-amount",unit:_.value,"model-base":"AMOUNT","entry-base":v.value,currency:t.chargeCurrency,"credit-unit-name":t.creditUnitName,"conversion-rate":t.conversionRate,bounds:t.topUpBounds,"show-conversion-hint":"",required:"",disabled:t.disabled,error:e.unref(C).topUpAmount.$errors,label:e.unref(r)({defaultMessage:"Top-up with",description:"Label of the amount every automatic top-up adds",id:"auto_topup_config.amount.label"})},null,8,["modelValue","unit","entry-base","currency","credit-unit-name","conversion-rate","bounds","disabled","error","label"])],2)):e.createCommentVNode("",!0)]),_:1},8,["is-open"])]),_:1},8,["content-background","no-spacing","no-border"]))}}),Ce=e=>{const t=Date.parse(e??"");return Number.isFinite(t)?t:0};function Te({paymentMethods:t,selectedPaymentMethodId:o,preferredPaymentMethodId:n}){const a=e.computed(()=>[...t.value??[]].sort((e,t)=>Ce(t.created_at)-Ce(e.created_at)));return e.watch(()=>[t.value,null==n?void 0:n.value,o.value],([e,t,n],i)=>{var l;const u=null==i?void 0:i[0],r=null==e?void 0:e.find(({id:e})=>!(null==u?void 0:u.some(t=>t.id===e)));if(r&&(null==u?void 0:u.length))return void(o.value=r.id);const d=t=>!!t&&!!(null==e?void 0:e.some(e=>e.id===t));d(n)||(o.value=d(t)?t:null==(l=(null==e?void 0:e.find(({is_default:e})=>e))??a.value[0])?void 0:l.id)},{immediate:!0}),{sortedPaymentMethods:a}}function Se(){const{$t:e,formatNumber:t}=o.useIntl(),n=o=>C(e,t,o);return{formatValue:n,formatOpenBalance:e=>n(null==e?void 0:e.wallet_balance.open_balance)}}const Pe={class:"sv-top-up-form"},ke={class:"grid grid-cols-1 gap-4"},Ne={class:"grid grid-cols-1 gap-1"},Ve={class:"sv-top-up-form__option-details"},Ie={key:0},Ue=e.defineComponent({__name:"TopUpModalForm",props:{topUpPricingItems:{type:null},paymentMethods:{type:Array},paymentMethodOptions:{type:Array},autoTopUpConfig:{type:Object}},emits:["add-payment-method","success","save-auto-top-up","failure"],setup(t,{expose:n,emit:a}){const i=t,l=a,{$t:r}=o.useIntl(),{formatValue:d}=Se(),s=e.ref({pricing_plan_schedule_id:"",pricing_items:[],start_at:"",finalize_immediately:!1,payment_method_id:void 0,preview:!0}),c=e.computed(()=>{const e=(i.topUpPricingItems??[]).filter(e=>e.flexiblePricing||e.fixedPricing);return[...e.filter(({flexiblePricing:e})=>e),...e.filter(({flexiblePricing:e})=>!e)]}),_=e=>c.value.find(t=>t.pricingItemId===e),g=e.computed(()=>{var e,t;return null==(t=null==(e=i.topUpPricingItems)?void 0:e.find(e=>e.pricingPlanScheduleId))?void 0:t.pricingPlanScheduleId});e.watch(g,e=>{s.value.pricing_plan_schedule_id=e??""},{immediate:!0});const y=e.computed({get:()=>{var e;return null==(e=s.value.pricing_items[0])?void 0:e.pricing_item_id},set:e=>{const t=_("string"==typeof e?e:void 0);if(!t)return void(s.value.pricing_items=[]);const o=(e=>{const{config:t,currency:o}=e.flexiblePricing??{},n=null==t?void 0:t.minimum_amount;return n&&o?{quantity:n.quantity,currency:o}:void 0})(t);s.value.pricing_items=[{pricing_item_id:t.pricingItemId,...o&&{flexible_amount:o}}]}});e.watch(c,e=>{if(e.some(({pricingItemId:e})=>{var t;return e===(null==(t=s.value.pricing_items[0])?void 0:t.pricing_item_id)}))return;const t=e.find(({flexiblePricing:e})=>e)??e[0];y.value=null==t?void 0:t.pricingItemId},{immediate:!0});const w=e.computed({get:()=>{var e;return null==(e=s.value.pricing_items[0])?void 0:e.flexible_amount},set:e=>{var t;const o=null==(t=s.value.pricing_items[0])?void 0:t.pricing_item_id;o&&(s.value.pricing_items=[{pricing_item_id:o,...e&&{flexible_amount:e}}])}}),x=e=>{var t;const o=null==(t=_(String(e)))?void 0:t.fixedPricing;return(null==o?void 0:o.value.credits)?u.formatAmount(o.amount):void 0},B=e.computed(()=>{var e;return null==(e=_(String(y.value)))?void 0:e.flexiblePricing}),M=e.computed({get:()=>{var e;return(null==(e=w.value)?void 0:e.quantity)??""},set:e=>{var t;const o=null==(t=B.value)?void 0:t.currency;w.value=e&&o?{quantity:e,currency:o}:void 0}}),C=e=>e.creditsConfiguration?"CREDITS":"AMOUNT",T=e.computed(()=>Z(i.topUpPricingItems)),S=e=>{var t;const o=null==(t=_(String(e)))?void 0:t.flexiblePricing;return o?[o]:[]},P=e=>{var t;return!!(null==(t=_(String(e)))?void 0:t.flexiblePricing)},k=e.computed(()=>c.value.map(e=>{var t;return{value:e.pricingItemId,label:e.fixedPricing?d(e.fixedPricing.value):r({defaultMessage:"Choose your own amount",description:"Label of the choose-your-amount option in the top-up modal",id:"topup_modal.flexible_option.label"}),...(null==(t=e.flexiblePricing)?void 0:t.bounds.minimum)&&e.flexiblePricing.bounds.maximum&&{description:r({defaultMessage:"Between {minimum} and {maximum}",description:"Bounds of the choose-your-amount option in the top-up modal",id:"topup_modal.flexible_option.bounds"},{minimum:d(e.flexiblePricing.bounds.minimum),maximum:d(e.flexiblePricing.bounds.maximum)})}}})),N=e.computed(()=>{const e=s.value.pricing_items.filter(e=>{var t;return!(null==(t=_(e.pricing_item_id))?void 0:t.flexiblePricing)||!!e.flexible_amount});return e.length>0?e:void 0}),V=e.computed(()=>!i.autoTopUpConfig&&c.value.some(({flexiblePricing:e})=>e)?oe(i.topUpPricingItems):void 0),I=e.ref(),{chargeOnDemandPricingItems:U}=h.createInvoicesService(),E=o.useLogger(),A=e.ref(!1),D=e.computed(()=>!!s.value.pricing_plan_schedule_id&&!!N.value&&!!s.value.payment_method_id),O=e.reactive({paymentMethodId:e.computed(()=>s.value.payment_method_id??null)}),$=m.useValidation({paymentMethodId:{required:m.common.withMessage(()=>r({defaultMessage:"Select a payment method to pay for this top-up.",description:"Error shown under the payment methods in the top-up modal when none is selected on submit",id:"topup_modal.payment_method_required"}),m.required)}},O),q=e.computed(()=>{const[e]=s.value.pricing_items,t=_(null==e?void 0:e.pricing_item_id);return t?((e,t)=>{var o;if(e.fixedPricing)return e.fixedPricing.value;if(!e.flexiblePricing||!t)return;const{bounds:n,creditsConfiguration:a}=e.flexiblePricing,i=null==(o=n.minimum??n.maximum)?void 0:o.credits,l=a?J(t.quantity,a.conversionRate):void 0;return i&&void 0!==l?G(l,i):{amount:t}})(t,null==e?void 0:e.flexible_amount):void 0});n({submit:async function(){var e,t,o;$.value.$touch();const n=null==(e=I.value)?void 0:e.validate();if(!$.value.$invalid&&!(null==(t=I.value)?void 0:t.isInvalid)&&D.value&&!A.value){A.value=!0;try{const e=await U({pricing_plan_schedule_id:s.value.pricing_plan_schedule_id,pricing_items:N.value??[],payment_method_id:s.value.payment_method_id,preview:!1});n&&(null==(o=I.value)?void 0:o.hasChanges)&&s.value.payment_method_id&&l("save-auto-top-up",{rule:n,paymentMethodId:s.value.payment_method_id}),l("success",e)}catch(a){E.error("TOP_UP_FAILED","Failed to charge the wallet top-up",{},a),l("failure",a)}finally{A.value=!1}}},isCharging:A,canSubmit:D,chargedValue:q});const R=e.computed({get:()=>s.value.payment_method_id??void 0,set:e=>{s.value.payment_method_id=e}}),{sortedPaymentMethods:j}=Te({paymentMethods:e.computed(()=>i.paymentMethods),selectedPaymentMethodId:R});return(n,a)=>(e.openBlock(),e.createElementBlock("form",Pe,[e.createElementVNode("div",ke,[e.createElementVNode("div",Ne,[k.value.length>0?(e.openBlock(),e.createBlock(e.unref(p._sfc_main$1),{key:0,modelValue:y.value,"onUpdate:modelValue":a[3]||(a[3]=e=>y.value=e),class:"sv-top-up-form__options",name:"top-up-pricing-item",direction:"column",required:"",disabled:A.value,options:k.value,"show-radio":!1,label:e.unref(r)({defaultMessage:"Top up amount",description:"Label above the list of ways to top up the wallet in the top-up modal",id:"topup_modal.pricing_items.label"})},{label:e.withCtx(({option:t,optionValue:n})=>[e.createElementVNode("span",null,e.toDisplayString(t.label),1),x(n)?(e.openBlock(),e.createBlock(e.unref(o._sfc_main),{key:0,tag:"span",variant:"body-sm",color:"subtle",weight:"normal","no-spacing":"",class:"sv-top-up-form__option-cost"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x(n)),1)]),_:2},1024)):e.createCommentVNode("",!0)]),description:e.withCtx(({option:t,optionValue:n})=>[e.createElementVNode("div",Ve,[t.description&&!P(n)?(e.openBlock(),e.createBlock(e.unref(o._sfc_main),{key:0,tag:"span",variant:"body-xs",color:"subtle","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.description),1)]),_:2},1024)):e.createCommentVNode("",!0),S(n).length>0?(e.openBlock(),e.createBlock(e.unref(f._sfc_main),{key:1,"is-open":String(n)===y.value,lazy:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S(n),n=>{var i,l;return e.openBlock(),e.createElementBlock("div",{key:n.currency,class:"sv-top-up-form__amount grid grid-cols-1 gap-3",onClick:a[1]||(a[1]=e.withModifiers(()=>{},["stop"])),onKeydown:a[2]||(a[2]=e.withModifiers(()=>{},["stop"]))},[t.description?(e.openBlock(),e.createBlock(e.unref(o._sfc_main),{key:0,tag:"span",variant:"body-xs",color:"subtle","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.description),1)]),_:2},1024)):e.createCommentVNode("",!0),e.createVNode(we,{modelValue:M.value,"onUpdate:modelValue":a[0]||(a[0]=e=>M.value=e),name:"top-up-amount","model-base":"AMOUNT",unit:(l=n,l.creditsConfiguration?T.value??l.creditsConfiguration.unitNamePlural??l.creditsConfiguration.unitNameSingle??"":l.currency),"entry-base":C(n),currency:n.currency,"conversion-rate":null==(i=n.creditsConfiguration)?void 0:i.conversionRate,required:"",disabled:A.value},null,8,["modelValue","unit","entry-base","currency","conversion-rate","disabled"])],32)}),128))]),_:2},1032,["is-open"])):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","disabled","options","label"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",null,[e.createVNode(ae,{"pricing-plan-schedule-id":g.value,"pricing-items":N.value},null,8,["pricing-plan-schedule-id","pricing-items"])]),V.value?(e.openBlock(),e.createElementBlock("div",Ie,[e.createVNode(Me,e.mergeProps({ref_key:"autoTopUpFormRef",ref:I,class:"sv-top-up-form__auto-top-up"},V.value,{contained:"","show-threshold-conversion":!1,disabled:A.value}),null,16,["disabled"])])):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.createVNode(e.unref(v._sfc_main),{spacing:"xs"})]),e.createElementVNode("div",null,[e.renderSlot(n.$slots,"payment-method",{},()=>[e.createVNode(b._sfc_main,{modelValue:R.value,"onUpdate:modelValue":a[4]||(a[4]=e=>R.value=e),class:"sv-top-up-form__payment-methods","payment-methods":e.unref(j),required:"",error:e.unref($).paymentMethodId.$errors,"payment-method-options":t.paymentMethodOptions,disabled:A.value,label:e.unref(r)({defaultMessage:"Payment method",description:"Label above the payment method that pays for the top-up, in the top-up modal",id:"topup_modal.payment_method_selector.label"}),onAddPaymentMethod:a[5]||(a[5]=e=>l("add-payment-method"))},null,8,["modelValue","payment-methods","error","payment-method-options","disabled","label"])])])])]))}}),Ee={class:"sv-top-up-success grid grid-cols-1 gap-4"},Ae=e.defineComponent({__name:"TopUpModalSuccess",props:{addedValue:{type:Object},invoice:{type:Object}},setup(t){const{$t:n}=o.useIntl();return(a,i)=>(e.openBlock(),e.createElementBlock("div",Ee,[t.invoice?(e.openBlock(),e.createBlock(e.unref(s._sfc_main),{key:0,"content-background":"none"},{default:e.withCtx(()=>[e.createVNode(e.unref(o._sfc_main),{tag:"span",variant:"body-sm",weight:"semibold",class:"mb-2 block"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"Receipt",description:"Heading above the invoice a completed top-up produced",id:"topup_modal.success.receipt.heading"})),1)]),_:1}),e.createVNode(e.unref(p._sfc_main$2),{invoice:t.invoice,"is-customer-facing":""},null,8,["invoice"])]),_:1})):e.createCommentVNode("",!0)]))}});function De({isOpen:t,customer:o}){const{paymentMethodOptions:n,get:a,isPending:i}=B.usePaymentMethodOptions();e.watch(()=>[t.value,o.value],([e,t])=>{e&&t&&a({customerId:t.id,country:x.getCustomerCountry(t)})},{immediate:!0});const l=e.computed(()=>i.value?void 0:n.value);return{paymentMethodOptions:n,settledOptions:l,isPending:i}}const Oe=["inert"],$e=e.defineComponent({__name:"SlidingPanes",props:{panes:{type:Array},current:{type:String}},setup(t){const o=t,n=e.ref(!1);let a;e.watch(()=>o.current,()=>{n.value=!0,clearTimeout(a),a=setTimeout(()=>{n.value=!1},300)}),e.onBeforeUnmount(()=>{clearTimeout(a)});const i=e.ref({}),l={},u=e=>l[e]??(l[e]=t=>{i.value[e]=t instanceof HTMLElement?t:void 0}),r=function(t){const o=e.ref(0),n=e=>{o.value=(null==e?void 0:e.offsetHeight)??0},a="undefined"==typeof ResizeObserver?void 0:new ResizeObserver(e=>{var t;const o=null==(t=e[0])?void 0:t.target;n(o instanceof HTMLElement?o:void 0)});return e.watch(t,(e,t)=>{t&&(null==a||a.unobserve(t)),n(e),e&&(null==a||a.observe(e))},{immediate:!0,flush:"post"}),e.onBeforeUnmount(()=>{null==a||a.disconnect()}),o}(e.computed(()=>i.value[o.current])),d=e.computed(()=>{const e=o.panes.indexOf(o.current);return e>0?`translateX(calc(${-e} * (100% + 1rem)))`:"translateX(0px)"});return(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["sv-sliding-panes__viewport relative -mx-2 overflow-hidden px-2",n.value?"transition-[height] duration-300 ease-in-out motion-reduce:transition-none":""]),style:e.normalizeStyle(e.unref(r)?{height:`${e.unref(r)}px`}:void 0)},[e.createElementVNode("div",{class:"sv-sliding-panes__track flex items-start gap-4 transition-transform duration-300 ease-in-out motion-reduce:transition-none",style:e.normalizeStyle({transform:d.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.panes,n=>(e.openBlock(),e.createElementBlock("div",{key:n,class:"sv-sliding-panes__pane w-full shrink-0",inert:n!==t.current||void 0},[e.createElementVNode("div",{ref_for:!0,ref:u(n)},[e.renderSlot(o.$slots,n)],512)],8,Oe))),128))],4)],6))}}),qe={class:"grid grid-cols-1 gap-4 pb-4"},Re=e.defineComponent({__name:"WalletModalShell",props:{showModal:{type:Boolean},title:{type:String},subTitle:{type:String},cancelButtonText:{type:String},confirmButtonText:{type:String},isPending:{type:Boolean},panes:{type:Array},step:{type:String},addPaymentMethodPane:{type:String},customer:{type:Object},paymentMethodOptions:{type:Array},isPaymentMethodOptionsPending:{type:Boolean},isAddingPaymentMethod:{type:Boolean}},emits:["confirm","cancel","payment-success","payment-failed"],setup(t,{expose:o}){const n=t,a=e.ref(),i=e.computed(()=>n.panes.filter(e=>e!==n.addPaymentMethodPane));return o({submit:()=>{var e;return null==(e=a.value)?void 0:e.submit()},isSaving:e.computed(()=>{var e;return!!(null==(e=a.value)?void 0:e.isSaving)})}),(o,n)=>(e.openBlock(),e.createBlock(e.unref(M.Modal),{"no-click-away":"","show-modal":t.showModal,size:"lg",title:t.title,"sub-title":t.subTitle,"cancel-button-text":t.cancelButtonText,"confirm-button-text":t.confirmButtonText,"is-loading":t.isPending,onConfirm:n[2]||(n[2]=e=>o.$emit("confirm")),onClose:n[3]||(n[3]=e=>o.$emit("cancel"))},e.createSlots({body:e.withCtx(()=>[e.createElementVNode("div",qe,[e.createVNode($e,{panes:t.panes,current:t.step},e.createSlots({[t.addPaymentMethodPane]:e.withCtx(()=>[e.createVNode(b._sfc_main$1,{ref_key:"paneRef",ref:a,customer:t.customer,"payment-method-options":t.paymentMethodOptions,"is-loading":t.isPaymentMethodOptionsPending,"is-active":t.isAddingPaymentMethod,onSuccess:n[0]||(n[0]=e=>o.$emit("payment-success")),onFailure:n[1]||(n[1]=e=>o.$emit("payment-failed",e))},null,8,["customer","payment-method-options","is-loading","is-active"])]),_:2},[e.renderList(i.value,t=>({name:t,fn:e.withCtx(()=>[e.renderSlot(o.$slots,t)])}))]),1032,["panes","current"])])]),_:2},[o.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"footer")]),key:"0"}:void 0]),1032,["show-modal","title","sub-title","cancel-button-text","confirm-button-text","is-loading"]))}}),je=e=>{var t;return((null==(t=null==e?void 0:e.wallet)?void 0:t.auto_top_up_configs)??[]).find(({status:e})=>"ACTIVE"===e)},Le=e=>e?{status:e.status,threshold:e.threshold,...e.topup_amount&&{topup_amount:e.topup_amount}}:void 0,Fe=(e,t=[])=>{if((null==e?void 0:e.pricing_item_id)&&e.pricing_plan_schedule_id)return{pricingItemId:e.pricing_item_id,pricingPlanScheduleId:e.pricing_plan_schedule_id};const o=t.find(({flexiblePricing:e,pricingPlanScheduleId:t})=>e&&t);return(null==o?void 0:o.pricingPlanScheduleId)?{pricingItemId:o.pricingItemId,pricingPlanScheduleId:o.pricingPlanScheduleId}:void 0},Ye=({rule:e,walletBalanceItem:t,chargeTarget:o,paymentMethodId:n})=>{var a,i;const l=!!((null==(a=null==e?void 0:e.threshold)?void 0:a.amount)??(null==(i=null==e?void 0:e.threshold)?void 0:i.credits));if(e&&l&&(null==t?void 0:t.wallet_id)&&o&&n)return{wallet_id:t.wallet_id,status:e.status,threshold:e.threshold,pricing_plan_schedule_id:o.pricingPlanScheduleId,pricing_item_id:o.pricingItemId,payment_method_id:n,...e.topup_amount&&{topup_amount:e.topup_amount}}};function ze({step:t,name:o,returnTo:n}){const a=e.ref();return{paneRef:a,isActive:e.computed(()=>t.value===o),isSaving:e.computed(()=>{var e;return!!(null==(e=a.value)?void 0:e.isSaving)}),open:()=>{t.value=o},leave:()=>{t.value=n},submit:()=>{var e;return null==(e=a.value)?void 0:e.submit()}}}function He(){const e=o.createRequestService(),t=o.useConfig(),n="/portal/auto-top-up-configs";return{getAutoTopUpConfigs:function(o){return e({url:`${t.apiUrls.config}${n}`,query:{...o},isCollection:!0})},getAutoTopUpConfig:function(o){return e({url:`${t.apiUrls.config}${n}/${o}`})},createAutoTopUpConfig:function(o){return e({url:`${t.apiUrls.config}${n}`,options:{method:"POST"},data:o})},deactivateAutoTopUpConfig:function(o){return e({url:`${t.apiUrls.config}${n}/${o}/deactivate`,options:{method:"POST"}})}}}function We(){const{createAutoTopUpConfig:t}=He(),n=o.useLogger(),a=e.ref(!1);return{save:async e=>{if(!e||a.value)return{saved:!1};a.value=!0;try{return await t(e),{saved:!0}}catch(o){return n.error("AUTO_TOP_UP_SAVE_FAILED","Failed to save the automatic top-up rule",{},o),{saved:!1,error:o}}finally{a.value=!1}},isSaving:a}}const Xe={key:0,class:"mb-4"},Ge={class:"sr-only"},Je={class:"flex flex-col gap-2"},Ke=e.defineComponent({__name:"TopUpModal",props:{showModal:{type:Boolean},selectedBalanceItem:{type:Object},paymentMethods:{type:Array},customer:{type:Object},subscriptions:{type:Array}},emits:["confirm","close","auto-top-up-saved","payment-success","payment-failed"],setup(t,{emit:n}){const a=t,i=n,{$t:l}=o.useIntl(),{formatOpenBalance:u}=Se(),d=e.computed(()=>Le(je(a.selectedBalanceItem))),s=e.computed(()=>u(a.selectedBalanceItem)),c=e.computed(()=>F(a.selectedBalanceItem,a.subscriptions??[])),m=e.ref();e.watch(c,e=>{var t;e.some(({id:e})=>e===m.value)||(m.value=null==(t=e[0])?void 0:t.id)},{immediate:!0});const v=e.computed(()=>c.value.length>1),f=e.computed(()=>c.value.map(({id:e,name:t})=>({value:e,label:t}))),_=e.computed(()=>Object.fromEntries(c.value.flatMap(({id:e,enabledPricingIds:t})=>{const o=(a.subscriptions??[]).find(({id:t})=>t===e);return o?[[e,{subscription:o,enabledPricingIds:t}]]:[]}))),h=e.computed(()=>{var e;if(!a.selectedBalanceItem||!(null==(e=a.subscriptions)?void 0:e.length))return a.selectedBalanceItem;const t=c.value.find(({id:e})=>e===m.value);return t?((e,t)=>{if(!e||0===t.length)return e;const o=new Set(t);return{...e,charge_on_demand_pricing_items:(e.charge_on_demand_pricing_items??[]).filter(e=>L(e)&&!!e.pricing_plan_schedule_id&&o.has(e.pricing_plan_schedule_id))}})(a.selectedBalanceItem,t.scheduleIds):{...a.selectedBalanceItem,charge_on_demand_pricing_items:[]}}),g=e.computed(()=>Y(h.value)),{paymentMethodOptions:y,settledOptions:b,isPending:x}=De({isOpen:e.computed(()=>a.showModal),customer:e.computed(()=>a.customer)}),B=e.ref("TOP_UP"),M=e.computed(()=>(a.paymentMethods??[]).length>0),T=e.computed(()=>!x.value&&0===(y.value??[]).length),S=e.computed(()=>"TOP_UP"===B.value&&!M.value&&T.value),P=e.ref(),k=e.ref(),N=()=>{A(),i("payment-success")},{paneRef:V,isActive:I,isSaving:U,open:E,leave:A,submit:D}=ze({step:B,name:"ADD_PAYMENT_METHOD",returnTo:"TOP_UP"}),{save:O}=We(),$=e.ref(),q=e.computed(()=>{var e;return null==(e=$.value)?void 0:e.chargedValue}),R=e.computed(()=>{var e;return U.value||!!(null==(e=$.value)?void 0:e.isCharging)}),{title:z,subTitle:H,cancelButtonText:W,confirmButtonText:X}=function({step:t,currentBalance:n,topUpValue:a}){const{$t:i,formatNumber:l}=o.useIntl();return{title:e.computed(()=>"ADD_PAYMENT_METHOD"===t.value?i({defaultMessage:"Add payment method",description:"Title of the top-up modal while the customer is adding a payment method",id:"topup_modal.add_payment_method.title"}):"SUCCESS"===t.value?i({defaultMessage:"Top-up complete",description:"Title of the top-up modal once the top-up has been charged",id:"topup_modal.success.modal_title"}):i({defaultMessage:"Top up balance",description:"Title of the wallet top-up modal",id:"topup_modal.title"})),subTitle:e.computed(()=>"ADD_PAYMENT_METHOD"===t.value?i({defaultMessage:"Add a new payment method for topping up your balance.",description:"Subtitle of the top-up modal while the customer is adding a payment method",id:"topup_modal.add_payment_method.subtitle"}):"SUCCESS"===t.value?i({defaultMessage:"Your payment went through.",description:"Subtitle of the top-up modal once the top-up has been charged",id:"topup_modal.success.modal_subtitle"}):i({defaultMessage:"Your current balance is {balance}.",description:"Subtitle of the top-up modal showing the current wallet balance",id:"topup_modal.subtitle"},{balance:n.value})),cancelButtonText:e.computed(()=>"ADD_PAYMENT_METHOD"===t.value?i({defaultMessage:"Back",description:"Label of the button that leaves the add payment method step in the top-up modal",id:"topup_modal.back_button.label"}):i({defaultMessage:"Cancel",description:"Label of the button that closes the top-up modal",id:"topup_modal.cancel_button.label"})),confirmButtonText:e.computed(()=>"ADD_PAYMENT_METHOD"===t.value?i({defaultMessage:"Save payment method",description:"Label of the confirm button in the top-up modal while adding a payment method",id:"topup_modal.save_payment_method.label"}):"SUCCESS"===t.value?i({defaultMessage:"Done",description:"Label of the button that dismisses the top-up modal once the top-up has been charged",id:"topup_modal.done_button.label"}):a.value?i({defaultMessage:"Top up balance with {value}",description:"Label of the confirm button in the top-up modal once an amount is entered",id:"topup_modal.confirm_button.label"},{value:C(i,l,a.value)}):i({defaultMessage:"Top up balance",description:"Label of the confirm button in the top-up modal while no amount is entered",id:"topup_modal.confirm_button.empty.label"}))}}({step:B,currentBalance:s,topUpValue:q}),G=()=>{var e;I.value?D():null==(e=$.value)||e.submit()},J=async({rule:e,paymentMethodId:t})=>{const{saved:o}=await O(Ye({rule:e,walletBalanceItem:a.selectedBalanceItem,chargeTarget:Fe(void 0,g.value),paymentMethodId:t}));o&&i("auto-top-up-saved")},K=e=>{var t;P.value=e,k.value=null==(t=$.value)?void 0:t.chargedValue,B.value="SUCCESS"},Q=()=>{i("confirm"),i("close")},Z=()=>{R.value||(I.value?A():"SUCCESS"!==B.value?i("close"):Q())},ee=e.ref(0);return e.watch(()=>a.showModal,e=>{e&&(B.value="TOP_UP",P.value=void 0,k.value=void 0,ee.value+=1)}),(o,n)=>(e.openBlock(),e.createBlock(Re,{ref_key:"addPaymentMethodRef",ref:V,"show-modal":t.showModal,title:e.unref(z),"sub-title":e.unref(H),"cancel-button-text":e.unref(W),"confirm-button-text":e.unref(X),"is-pending":R.value,panes:e.unref(j),step:B.value,"add-payment-method-pane":"ADD_PAYMENT_METHOD",customer:t.customer,"payment-method-options":e.unref(y),"is-payment-method-options-pending":e.unref(x),"is-adding-payment-method":e.unref(I),onConfirm:G,onCancel:Z,onPaymentSuccess:N,onPaymentFailed:n[1]||(n[1]=e=>o.$emit("payment-failed",e))},e.createSlots({TOP_UP:e.withCtx(()=>[v.value?(e.openBlock(),e.createElementBlock("div",Xe,[e.createVNode(e.unref(p._sfc_main$1),{modelValue:m.value,"onUpdate:modelValue":n[0]||(n[0]=e=>m.value=e),class:"sv-topup-modal__subscription",name:"top-up-subscription",direction:"column",required:"",options:f.value,"show-radio":!1,label:e.unref(l)({defaultMessage:"Subscription to top up",description:"Label above the list of subscriptions a top-up can be charged against, in the top-up modal",id:"topup_modal.subscriptions.label"})},{prefix:e.withCtx(({optionValue:t})=>[_.value[String(t)]?(e.openBlock(),e.createBlock(w._sfc_main,{key:0,class:"sv-topup-modal__subscription-option grow","no-spacing":"",subscription:_.value[String(t)].subscription,"enabled-pricing-ids":_.value[String(t)].enabledPricingIds},null,8,["subscription","enabled-pricing-ids"])):e.createCommentVNode("",!0)]),label:e.withCtx(({option:t})=>[e.createElementVNode("span",Ge,e.toDisplayString(t.label),1)]),_:1},8,["modelValue","options","label"])])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(Ue,{key:ee.value,ref_key:"topUpFormRef",ref:$,"top-up-pricing-items":g.value,"payment-methods":t.paymentMethods,"auto-top-up-config":d.value,"payment-method-options":e.unref(b),onAddPaymentMethod:e.unref(E),onSuccess:K,onSaveAutoTopUp:J},null,8,["top-up-pricing-items","payment-methods","auto-top-up-config","payment-method-options","onAddPaymentMethod"]))]),SUCCESS:e.withCtx(()=>[P.value?(e.openBlock(),e.createBlock(Ae,{key:0,"added-value":k.value,invoice:P.value},null,8,["added-value","invoice"])):e.createCommentVNode("",!0)]),_:2},["SUCCESS"===B.value||S.value?{name:"footer",fn:e.withCtx(()=>[e.createElementVNode("div",Je,["SUCCESS"===B.value?(e.openBlock(),e.createBlock(e.unref(r._sfc_main$1),{key:0,size:"lg","data-testid":"done",onClick:Q},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(X)),1)]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(e.unref(r._sfc_main$1),{size:"lg",disabled:"","data-testid":"confirm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(X)),1)]),_:1}),e.createVNode(e.unref(r._sfc_main$1),{size:"lg",intent:"subtle","data-testid":"cancel",onClick:Z},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(W)),1)]),_:1})],64))])]),key:"0"}:void 0]),1032,["show-modal","title","sub-title","cancel-button-text","confirm-button-text","is-pending","panes","step","customer","payment-method-options","is-payment-method-options-pending","is-adding-payment-method"]))}}),Qe=["AUTO_TOP_UP","ADD_PAYMENT_METHOD"],Ze={class:"grid grid-cols-1 gap-4"},et=e.defineComponent({__name:"AutoTopUpModal",props:{showModal:{type:Boolean},walletBalanceItem:{type:Object},topUpItem:{type:Object},paymentMethods:{type:Array},customer:{type:Object}},emits:["saved","close","payment-success","payment-failed"],setup(t,{emit:n}){const a=t,i=n,{$t:l}=o.useIntl(),{formatOpenBalance:u}=Se(),r=e.ref("AUTO_TOP_UP"),d=e.computed(()=>u(a.walletBalanceItem)),s=e.computed(()=>Y(a.walletBalanceItem)),c=e.computed(()=>oe(s.value)),p=e.computed(()=>je(a.walletBalanceItem)),v=e.computed(()=>Le(p.value)),f=e.computed(()=>Fe(a.topUpItem,s.value)),_=e.ref(),h=e.computed(()=>{var e,t;const o=null==(t=null==(e=_.value)?void 0:e.rule)?void 0:t.topup_amount;return(null==o?void 0:o.quantity)&&f.value?[{pricing_item_id:f.value.pricingItemId,flexible_amount:o}]:void 0}),g=e.computed(()=>{var e;return null==(e=f.value)?void 0:e.pricingPlanScheduleId}),y=e.ref(),{sortedPaymentMethods:w}=Te({paymentMethods:e.computed(()=>a.paymentMethods),selectedPaymentMethodId:y,preferredPaymentMethodId:e.computed(()=>{var e;return null==(e=p.value)?void 0:e.payment_method_id})}),{paymentMethodOptions:x,settledOptions:B,isPending:M}=De({isOpen:e.computed(()=>a.showModal),customer:e.computed(()=>a.customer)}),{paneRef:C,isActive:T,isSaving:S,open:P,leave:k,submit:N}=ze({step:r,name:"ADD_PAYMENT_METHOD",returnTo:"AUTO_TOP_UP"}),{save:V,isSaving:I}=We(),U=e.computed(()=>S.value||I.value),E=e.reactive({paymentMethodId:e.computed(()=>y.value??null)}),A=m.useValidation({paymentMethodId:{required:m.common.withMessage(()=>l({defaultMessage:"Select a payment method to pay for automatic top-ups.",description:"Error shown in the auto top-up modal when no payment method is selected",id:"auto_topup_modal.payment_method.required"}),m.required)}},E),D=e.computed(()=>"ADD_PAYMENT_METHOD"===r.value?l({defaultMessage:"Add payment method",description:"Title of the auto top-up modal while the customer is adding a payment method",id:"auto_topup_modal.add_payment_method.title"}):l({defaultMessage:"Automatic top-up",description:"Title of the automatic wallet top-up modal",id:"auto_topup_modal.title"})),O=e.computed(()=>"ADD_PAYMENT_METHOD"===r.value?l({defaultMessage:"This method pays for every automatic top-up.",description:"Subtitle of the auto top-up modal while the customer is adding a payment method",id:"auto_topup_modal.add_payment_method.subtitle"}):l({defaultMessage:"Your current balance is {balance}. Enable auto top so you can stay productive",description:"Subtitle of the automatic wallet top-up modal, naming the balance",id:"auto_topup_modal.subtitle"},{balance:d.value})),$=e.computed(()=>"ADD_PAYMENT_METHOD"===r.value?l({defaultMessage:"Back",description:"Button returning from adding a payment method to the auto top-up rule",id:"auto_topup_modal.add_payment_method.cancel"}):l({defaultMessage:"Cancel",description:"Button dismissing the auto top-up modal",id:"auto_topup_modal.cancel"})),q=e.computed(()=>"ADD_PAYMENT_METHOD"===r.value?l({defaultMessage:"Add payment method",description:"Button storing the payment method being added in the auto top-up modal",id:"auto_topup_modal.add_payment_method.confirm"}):l({defaultMessage:"Save",description:"Button saving the automatic top-up rule",id:"auto_topup_modal.confirm"}));const R=()=>{T.value?N():async function(){var e;if(A.value.$touch(),U.value)return;const{saved:t,error:o}=await V(Ye({rule:null==(e=_.value)?void 0:e.validate(),walletBalanceItem:a.walletBalanceItem,chargeTarget:f.value,paymentMethodId:y.value}));if(t)return i("saved"),void i("close");o&&i("payment-failed",o)}()},j=()=>{k(),i("payment-success")},L=()=>{U.value||(T.value?k():i("close"))},F=e.ref(0);return e.watch(()=>a.showModal,e=>{e&&(r.value="AUTO_TOP_UP",y.value=void 0,F.value+=1)}),(o,n)=>(e.openBlock(),e.createBlock(Re,{ref_key:"addPaymentMethodRef",ref:C,"show-modal":t.showModal,title:D.value,"sub-title":O.value,"cancel-button-text":$.value,"confirm-button-text":q.value,"is-pending":U.value,panes:e.unref(Qe),step:r.value,"add-payment-method-pane":"ADD_PAYMENT_METHOD",customer:t.customer,"payment-method-options":e.unref(x),"is-payment-method-options-pending":e.unref(M),"is-adding-payment-method":e.unref(T),onConfirm:R,onCancel:L,onPaymentSuccess:j,onPaymentFailed:n[1]||(n[1]=e=>o.$emit("payment-failed",e))},{AUTO_TOP_UP:e.withCtx(()=>[e.createElementVNode("div",Ze,[c.value?(e.openBlock(),e.createBlock(Me,e.mergeProps({key:F.value,ref_key:"autoTopUpFormRef",ref:_,class:"sv-auto-topup-modal__rule"},c.value,{config:v.value,"always-enabled":"",disabled:U.value}),null,16,["config","disabled"])):e.createCommentVNode("",!0),e.createVNode(ae,{"pricing-plan-schedule-id":g.value,"pricing-items":h.value},null,8,["pricing-plan-schedule-id","pricing-items"]),e.createVNode(b._sfc_main,{modelValue:y.value,"onUpdate:modelValue":n[0]||(n[0]=e=>y.value=e),class:"sv-auto-topup-modal__payment-method","payment-methods":e.unref(w),"payment-method-options":e.unref(B),disabled:U.value,error:e.unref(A).paymentMethodId.$errors,label:e.unref(l)({defaultMessage:"Pay automatic top-ups with",description:"Label above the payment method an automatic top-up is charged to",id:"auto_topup_modal.payment_method.label"}),onAddPaymentMethod:e.unref(P)},null,8,["modelValue","payment-methods","payment-method-options","disabled","error","label","onAddPaymentMethod"])])]),_:1},8,["show-modal","title","sub-title","cancel-button-text","confirm-button-text","is-pending","panes","step","customer","payment-method-options","is-payment-method-options-pending","is-adding-payment-method"]))}}),tt={class:"sv-auto-topup-cancellation-modal sv-auto-topup-cancellation-modal__body flex flex-col gap-3"},ot=e.defineComponent({__name:"AutoTopUpCancellationModal",props:{showModal:{type:Boolean},config:{type:Object}},emits:["confirmed","close"],setup(t,{emit:n}){const a=t,l=n,{$t:u}=o.useIntl(),r=o.useLogger(),{formatValue:d}=Se(),{deactivateAutoTopUpConfig:s}=He(),c=e.ref(!1),p=e.ref(!1);e.watch(()=>a.showModal,e=>{e&&(p.value=!1)});const m=e.computed(()=>{var e,t;const o=null==(e=a.config)?void 0:e.threshold,n=null==(t=a.config)?void 0:t.topup_amount;return(null==o?void 0:o.amount)||(null==o?void 0:o.credits)?n?u({defaultMessage:"Your balance will no longer be topped up with {amount} when it falls below {threshold}. You can still top up whenever you want to.",description:"Explanation in the modal that turns a wallet automatic top-up off, naming what it charged and when",id:"auto_topup_cancellation_modal.explanation_with_amount"},{amount:d({amount:n}),threshold:d(o)}):u({defaultMessage:"Your balance will no longer be topped up automatically when it falls below {threshold}. You can still top up whenever you want to.",description:"Explanation in the modal that turns a wallet automatic top-up off, naming the threshold",id:"auto_topup_cancellation_modal.explanation_with_threshold"},{threshold:d(o)}):u({defaultMessage:"Your balance will no longer be topped up automatically. You can still top up whenever you want to.",description:"Explanation in the modal that turns a wallet automatic top-up off",id:"auto_topup_cancellation_modal.explanation"})}),v=async()=>{var e;const t=null==(e=a.config)?void 0:e.id;if(t&&!c.value){c.value=!0,p.value=!1;try{await s(t),l("confirmed"),l("close")}catch(o){r.error("AUTO_TOP_UP_CANCELLATION_FAILED","Failed to turn off a wallet's automatic top-up",{},o),p.value=!0}finally{c.value=!1}}},f=()=>{c.value||l("close")};return(n,a)=>(e.openBlock(),e.createBlock(e.unref(M.Modal),{size:"sm","show-modal":t.showModal,"is-loading":c.value,"no-click-away":c.value,"no-backdrop-close":c.value,title:e.unref(u)({defaultMessage:"Turn off automatic top-up",description:"Title of the modal that turns a wallet automatic top-up off",id:"auto_topup_cancellation_modal.title"}),"confirm-button-text":e.unref(u)({defaultMessage:"Yes, turn it off",description:"Button confirming that a wallet automatic top-up is turned off",id:"auto_topup_cancellation_modal.confirm"}),"cancel-button-text":e.unref(u)({defaultMessage:"Cancel",description:"Button dismissing the modal that turns a wallet automatic top-up off",id:"auto_topup_cancellation_modal.cancel"}),onConfirm:v,onClose:f},{body:e.withCtx(()=>[e.createElementVNode("div",tt,[e.createVNode(e.unref(o._sfc_main),{variant:"body-sm",color:"subtle",tag:"p",class:"sv-auto-topup-cancellation-modal__explanation"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.value),1)]),_:1}),p.value?(e.openBlock(),e.createBlock(e.unref(i._sfc_main),{key:0,class:"sv-auto-topup-cancellation-modal__error sv-error",title:e.unref(u)({defaultMessage:"Could not turn off the automatic top-up. Please try again later.",description:"Error shown when turning a wallet automatic top-up off failed",id:"auto_topup_cancellation_modal.failed"})},null,8,["title"])):e.createCommentVNode("",!0)])]),_:1},8,["show-modal","is-loading","no-click-away","no-backdrop-close","title","confirm-button-text","cancel-button-text"]))}}),nt=e.defineComponent({inheritAttrs:!1,__name:"CustomerWalletBalances",props:{hasError:{type:Boolean},isLoading:{type:Boolean},walletBalances:{type:Array},showTopUpButton:{type:Boolean},customer:{type:Object},paymentMethods:{type:Array},subscriptions:{type:Array}},emits:["top-up-charged","auto-top-up-saved","auto-top-up-cancelled","payment-method-stored","payment-failed"],setup(t,{emit:n}){const a=t,l=n,{$t:u}=o.useIntl(),r=e.ref(),d=e.computed(()=>R(a.walletBalances,r.value)),s=e.computed(()=>!!d.value),p=e.ref(),m=e.computed(()=>!!p.value),v=e.computed(()=>R(a.walletBalances,p.value)),f=e.ref(),_=e.computed(()=>!!f.value);return(o,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.isLoading?(e.openBlock(),e.createBlock(c._sfc_main,e.mergeProps({key:0,variant:"section"},o.$attrs,{class:"sv-wallet-balances sv-root sv-component sv-loading min-h-48","data-testid":"customer-wallet-balances-skeleton"}),null,16)):t.hasError?(e.openBlock(),e.createBlock(e.unref(i._sfc_main),e.mergeProps({key:1},o.$attrs,{class:"sv-wallet-balances sv-root sv-component sv-error",title:e.unref(u)({defaultMessage:"Could not load wallet balances",description:"Error shown when wallet balances fail to load",id:"wallet_balance.load_failed"})}),null,16,["title"])):t.walletBalances.length>0?(e.openBlock(),e.createBlock(e.unref(q),e.mergeProps({key:2},o.$attrs,{class:"sv-wallet-balances sv-root sv-component","customer-wallet-balances":t.walletBalances,"show-auto-top-up":"","show-manual-top-up":"",title:e.unref(u)({defaultMessage:"{count, plural, one {Wallet} other {Wallets}}",description:"Title for the wallets block on the customer overview page",id:"customer_overview.wallet_balances_block.title"},{count:String(t.walletBalances.length)}),onTopUp:n[0]||(n[0]=e=>r.value=e),onAutoTopUp:n[1]||(n[1]=e=>p.value=e),onCancelAutoTopUp:n[2]||(n[2]=e=>f.value=e)}),null,16,["customer-wallet-balances","title"])):e.createCommentVNode("",!0),t.showTopUpButton?(e.openBlock(),e.createBlock(Ke,{key:3,"show-modal":s.value,"selected-balance-item":d.value,"payment-methods":t.paymentMethods,customer:t.customer,subscriptions:t.subscriptions,onClose:n[3]||(n[3]=e=>r.value=void 0),onConfirm:n[4]||(n[4]=e=>l("top-up-charged")),onPaymentSuccess:n[5]||(n[5]=e=>l("payment-method-stored")),onPaymentFailed:n[6]||(n[6]=e=>l("payment-failed",e))},null,8,["show-modal","selected-balance-item","payment-methods","customer","subscriptions"])):e.createCommentVNode("",!0),t.showTopUpButton?(e.openBlock(),e.createBlock(et,{key:4,"show-modal":m.value,"wallet-balance-item":v.value,"top-up-item":p.value,"payment-methods":t.paymentMethods,customer:t.customer,onClose:n[7]||(n[7]=e=>p.value=void 0),onSaved:n[8]||(n[8]=e=>l("auto-top-up-saved")),onPaymentSuccess:n[9]||(n[9]=e=>l("payment-method-stored")),onPaymentFailed:n[10]||(n[10]=e=>l("payment-failed",e))},null,8,["show-modal","wallet-balance-item","top-up-item","payment-methods","customer"])):e.createCommentVNode("",!0),t.showTopUpButton?(e.openBlock(),e.createBlock(ot,{key:5,"show-modal":_.value,config:f.value,onClose:n[11]||(n[11]=e=>f.value=void 0),onConfirmed:n[12]||(n[12]=e=>l("auto-top-up-cancelled"))},null,8,["show-modal","config"])):e.createCommentVNode("",!0)],64))}});exports._sfc_main=nt,exports.useCustomerWalletBalances=function({customerId:i}){const{getCustomerWalletBalances:l}=function(){const e=o.createRequestService(),a=o.useConfig();return{getCustomerWalletBalances:function(o){return e({url:`${a.apiUrls.config}/portal/customers/${o}/wallets/balance`,query:t.withExpand({expandParams:n.EXPAND_ALL}),options:{method:"POST"},data:{}})}}}(),{data:u,execute:r,apiStatus:d,error:s,isPending:c}=a.useService({service:()=>l(i)});return{walletBalances:e.computed(()=>u.value??null),apiStatus:d,error:s,fetch:r,isPending:c}};
@@ -1,5 +1,5 @@
1
1
  import { computed, defineComponent, openBlock, createElementBlock, normalizeClass, unref, createCommentVNode, renderSlot, createVNode, withCtx, createTextVNode, toDisplayString } from "vue";
2
- import { _ as _sfc_main$1 } from "./customElements-DdFA__me.mjs";
2
+ import { _ as _sfc_main$1 } from "./customElements-B-89a5oH.mjs";
3
3
  const dividerBaseClasses = "relative translate-y-1/2 top-1/2 border-t border-gray-100";
4
4
  const useDividerTextClasses = (props) => {
5
5
  const leftDividerClasses = computed(() => {
@@ -1 +1 @@
1
- const e=require("vue"),t=require("./customElements-BTJzBHMy.js"),s="relative translate-y-1/2 top-1/2 border-t border-gray-100",i=e.defineComponent({__name:"DividerText",props:{spacing:{default:"none"},textPosition:{default:"left"},hasOuterDivider:{type:Boolean,default:!1},text:{}},setup(i){const r=i,{leftDividerClasses:n,rightDividerClasses:a}=(t=>({leftDividerClasses:e.computed(()=>{let e=`${s}`;return t.hasOuterDivider&&"left"===t.textPosition?e+=" w-2":e+=" grow",e}),rightDividerClasses:e.computed(()=>{let e=`${s}`;return t.hasOuterDivider&&"right"===t.textPosition?e+=" w-2":e+=" grow",e})}))(r);return(s,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex gap-2",{"my-2":"xs"===i.spacing,"my-4":"sm"===i.spacing,"my-6":"md"===i.spacing,"my-8":"lg"===i.spacing,"my-10":"xl"===i.spacing}])},["left"===i.textPosition&&i.hasOuterDivider||["center","right"].includes(i.textPosition)?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(n))},null,2)):e.createCommentVNode("",!0),e.renderSlot(s.$slots,"default",{},()=>[e.createVNode(e.unref(t._sfc_main),{tag:"span","no-spacing":"",variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.text),1)]),_:1})]),"right"===i.textPosition&&i.hasOuterDivider||["center","left"].includes(i.textPosition)?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(a))},null,2)):e.createCommentVNode("",!0)],2))}});exports._sfc_main=i;
1
+ const e=require("vue"),t=require("./customElements-DD7bpqkx.js"),s="relative translate-y-1/2 top-1/2 border-t border-gray-100",i=e.defineComponent({__name:"DividerText",props:{spacing:{default:"none"},textPosition:{default:"left"},hasOuterDivider:{type:Boolean,default:!1},text:{}},setup(i){const r=i,{leftDividerClasses:n,rightDividerClasses:a}=(t=>({leftDividerClasses:e.computed(()=>{let e=`${s}`;return t.hasOuterDivider&&"left"===t.textPosition?e+=" w-2":e+=" grow",e}),rightDividerClasses:e.computed(()=>{let e=`${s}`;return t.hasOuterDivider&&"right"===t.textPosition?e+=" w-2":e+=" grow",e})}))(r);return(s,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex gap-2",{"my-2":"xs"===i.spacing,"my-4":"sm"===i.spacing,"my-6":"md"===i.spacing,"my-8":"lg"===i.spacing,"my-10":"xl"===i.spacing}])},["left"===i.textPosition&&i.hasOuterDivider||["center","right"].includes(i.textPosition)?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(n))},null,2)):e.createCommentVNode("",!0),e.renderSlot(s.$slots,"default",{},()=>[e.createVNode(e.unref(t._sfc_main),{tag:"span","no-spacing":"",variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.text),1)]),_:1})]),"right"===i.textPosition&&i.hasOuterDivider||["center","left"].includes(i.textPosition)?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(a))},null,2)):e.createCommentVNode("",!0)],2))}});exports._sfc_main=i;
@@ -1,17 +1,17 @@
1
1
  import { defineComponent, openBlock, createElementBlock, normalizeClass, createVNode, withCtx, renderSlot, createBlock, createTextVNode, toDisplayString, unref, Fragment, renderList, resolveDynamicComponent, ref, computed, createElementVNode, createCommentVNode, normalizeStyle, withDirectives, mergeProps, isRef, vModelRadio } from "vue";
2
- import { _ as _sfc_main$7, u as useIntl } from "./customElements-DdFA__me.mjs";
3
- import { _ as _sfc_main$8, T as TooltipContent, a as _sfc_main$9 } from "./TooltipParagraph.vue.es-B5aHQv9O.mjs";
2
+ import { _ as _sfc_main$7, u as useIntl } from "./customElements-B-89a5oH.mjs";
3
+ import { _ as _sfc_main$8, T as TooltipContent, a as _sfc_main$9 } from "./TooltipParagraph.vue.es-C5RTcrid.mjs";
4
4
  import { i as isEmpty } from "./useService-W3Kxems4.mjs";
5
5
  import { g as getComposedString } from "./getComposedString.es-CELkn0I7.mjs";
6
- import { _ as _sfc_main$a } from "./Amount.vue.es-CRG-6dps.mjs";
6
+ import { _ as _sfc_main$a } from "./Amount.vue.es-BO5sS1UX.mjs";
7
7
  import { _ as _sfc_main$c } from "./Divider.vue.es-wKkIVBgb.mjs";
8
8
  import { _ as _sfc_main$b } from "./Expand.vue.es-C4_XmqbR.mjs";
9
- import { _ as _sfc_main$d } from "./Button.vue.es-BrWHdiEA.mjs";
10
- import { a as useVModel } from "./index.es-0cystq8F.mjs";
11
- import { u as uniqueId, _ as _sfc_main$e } from "./cn.es-DB5pDpxS.mjs";
12
- import { _ as _sfc_main$f } from "./IconButton.vue.es-DcC4f5EQ.mjs";
13
- import { _ as _sfc_main$g } from "./FormMessage.vue.es-DFQXxiSC.mjs";
14
- import { _ as _sfc_main$h } from "./Section.vue.es-MEFUWCxU.mjs";
9
+ import { _ as _sfc_main$d } from "./Button.vue.es-Cm9pLU9i.mjs";
10
+ import { u as useVModel } from "./index.es-D5xOw_SJ.mjs";
11
+ import { u as uniqueId, _ as _sfc_main$e } from "./cn.es-BEU5D0Wz.mjs";
12
+ import { _ as _sfc_main$f } from "./IconButton.vue.es-KywqWWvr.mjs";
13
+ import { _ as _sfc_main$g } from "./FormMessage.vue.es-C3oxwq_8.mjs";
14
+ import { _ as _sfc_main$h } from "./Section.vue.es-DX_9ueCG.mjs";
15
15
  const _sfc_main$6 = /* @__PURE__ */ defineComponent({
16
16
  __name: "invoicePreviewRow",
17
17
  props: {
@@ -331,7 +331,7 @@ const _hoisted_4 = ["tabindex", "data-testid", "for", "aria-label", "onKeydown"]
331
331
  const _hoisted_5 = { class: "text-xs" };
332
332
  const _hoisted_6 = {
333
333
  key: 1,
334
- class: "mt-2 text-sm text-gray-500"
334
+ class: "mt-2 text-sm text-secondary"
335
335
  };
336
336
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
337
337
  __name: "RadioGroupExtended",
@@ -395,7 +395,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
395
395
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (option) => {
396
396
  return openBlock(), createElementBlock("div", {
397
397
  key: option.value.toString(),
398
- class: "min-w-0 flex-1"
398
+ class: "flex min-w-0 flex-1 flex-col"
399
399
  }, [
400
400
  withDirectives(createElementVNode("input", mergeProps({ ref_for: true }, _ctx.$attrs, {
401
401
  id: `${unref(idPrefix)}${option.value}`,
@@ -415,7 +415,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
415
415
  "data-testid": `radio-group-item-${option.value}`,
416
416
  for: `${unref(idPrefix)}${option.value}`,
417
417
  "aria-label": option.label + (option.description ? `: ${option.description}` : ""),
418
- class: normalizeClass(["label hover:bg-primary-50/50 relative flex h-full gap-3 rounded border border-gray-100 bg-gray-50/50 px-4 py-3 outline-none focus:bg-primary-50 focus-visible:border-primary-600 focus-visible:bg-primary-50 focus-visible:ring-1 focus-visible:ring-primary-600", {
418
+ class: normalizeClass(["label hover:bg-primary-50/50 relative flex flex-1 gap-3 rounded border border-gray-100 bg-gray-50/50 px-4 py-3 outline-none focus:bg-primary-50 focus-visible:border-primary-600 focus-visible:bg-primary-50 focus-visible:ring-1 focus-visible:ring-primary-600", {
419
419
  "cursor-pointer": !__props.disabled,
420
420
  "cursor-not-allowed": __props.disabled,
421
421
  "border-transparent bg-white ring-1 ring-primary-600": unref(model) === option.value && !__props.disabled,
@@ -462,7 +462,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
462
462
  tag: "span",
463
463
  variant: "body-xs",
464
464
  "no-spacing": "",
465
- shade: "lighter"
465
+ color: "secondary"
466
466
  }, {
467
467
  default: withCtx(() => [
468
468
  createTextVNode(toDisplayString(option.description), 1)
@@ -480,7 +480,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
480
480
  key: 0,
481
481
  id: `${unref(idPrefix)}${option.value}-warning`,
482
482
  class: "mt-1",
483
- type: unref(model) === option.value ? "danger" : "dark",
483
+ type: unref(model) === option.value ? "danger" : "neutral",
484
484
  role: "alert"
485
485
  }, {
486
486
  default: withCtx(() => [
@@ -523,7 +523,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
523
523
  tag: "span",
524
524
  variant: "body-xs",
525
525
  weight: "semibold",
526
- shade: "lighter",
526
+ color: "subtle",
527
527
  class: "sv-empty-state__title mt-1"
528
528
  }, {
529
529
  default: withCtx(() => [
@@ -535,7 +535,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
535
535
  center: "",
536
536
  tag: "span",
537
537
  variant: "body-xs",
538
- shade: "lightest",
538
+ color: "subtle",
539
539
  class: "sv-empty-state__message mt-1"
540
540
  }, {
541
541
  default: withCtx(() => [
@@ -1 +1 @@
1
- const e=require("vue"),t=require("./customElements-BTJzBHMy.js"),a=require("./TooltipParagraph.vue.es-fSwKGXKg.js"),o=require("./useService-D73FNBjT.js"),i=require("./getComposedString.es-DvSNX-_z.js"),l=require("./Amount.vue.es-CeW8S7kT.js"),n=require("./Divider.vue.es-ClFG8QtG.js"),r=require("./Expand.vue.es-C-lnbA1v.js"),s=require("./Button.vue.es-aLcIdATK.js"),d=require("./index.es-2JWHHSgP.js"),c=require("./cn.es-BLHlMR4Y.js"),u=require("./IconButton.vue.es-CVFn0Ntj.js"),p=require("./FormMessage.vue.es-LeWoj774.js"),m=require("./Section.vue.es-tLYXp-tF.js"),v=e.defineComponent({__name:"invoicePreviewRow",props:{weight:{default:"normal"},variant:{default:"body-xs"},noSpacing:{type:Boolean,default:!1}},setup:a=>(o,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-row gap-2",{"py-1.5":!a.noSpacing}])},[e.createVNode(t._sfc_main,{tag:"span",variant:a.variant,class:"grow",weight:a.weight},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"label")]),_:3},8,["variant","weight"]),e.createVNode(t._sfc_main,{tag:"span",variant:a.variant,weight:a.weight},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"value")]),_:3},8,["variant","weight"])],2))}),f=e.defineComponent({__name:"Skeleton",props:{widthClass:{default:"w-10"},heightClass:{default:"h-3"},shade:{default:"default"}},setup:t=>(a,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["rounded",[t.widthClass,t.heightClass,{"bg-gray-50/50":"default"===t.shade,"bg-gray-100/50":"dark"===t.shade,"bg-gray-200/50":"darker"===t.shade,"bg-gray-400/50":"darkest"===t.shade}]])},null,2))}),_=e.defineComponent({__name:"InvoicePreviewNoTaxesSkeleton",props:{widthClass:{default:"w-12"},heightClass:{default:"h-5"}},setup(o){const{$t:i}=t.useIntl();return(t,l)=>(e.openBlock(),e.createBlock(a._sfc_main,{"is-dark-mode":""},{tooltip:e.withCtx(()=>[e.createVNode(a.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(a._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Will be determined by billing information",description:"Tooltip content for the invoice preview when taxes are not determined by billing information",id:"invoice_preview.taxes_not_determined_by_billing_information_tooltip"})),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(f,{"width-class":o.widthClass,"height-class":o.heightClass,shade:"darker"},null,8,["width-class","height-class"])]),_:1}))}}),g=e.defineComponent({__name:"InvoicePreviewGroups",props:{invoice:{},wrapperComponent:{}},setup(t){const a=e=>e.groups.reduce((e,t)=>t.type in e?{...e,[t.type]:[...e[t.type],t]}:{...e,[t.type]:[t]},{}),n=e=>{var t,a,l;return(null==(t=e.pricing)?void 0:t.name)&&!o.isEmpty(null==(a=e.pricing)?void 0:a.name)?e.pricing.name:i.getComposedString((null==(l=e.products)?void 0:l.map(e=>e.name))??[])};return(o,i)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.invoice.periods,(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:i},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.entries(a(o)),([a,o])=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:a},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,(a,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.wrapperComponent??"div"),{key:o},{default:e.withCtx(()=>[e.createVNode(v,{"no-spacing":void 0!==t.wrapperComponent},{label:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n(a)),1)]),value:e.withCtx(()=>[e.createVNode(l._sfc_main,{value:a.amount_excluding_tax},null,8,["value"])]),_:2},1032,["no-spacing"])]),_:2},1024))),128))],64))),128))],64))),128))}}),h={class:"flex flex-col"},y=e.defineComponent({__name:"InvoicePreview",props:{invoice:{},trialInvoice:{},isCustomerFacing:{type:Boolean,default:!1},variant:{default:"default"},isPaid:{type:Boolean,default:!1},collapsible:{default:void 0},isPreviewWithoutTaxes:{type:Boolean}},setup(a){const o=a,{$t:i}=t.useIntl(),d=e.ref(void 0!==o.collapsible&&"expanded"!==o.collapsible),c=e.computed(()=>void 0!==o.collapsible),u=e.computed(()=>!!o.trialInvoice),p=e.computed(()=>o.trialInvoice?o.trialInvoice.tax_summary.total_amount:o.invoice.tax_summary.total_amount),m=()=>{c.value&&(d.value=!d.value)};return(o,f)=>(e.openBlock(),e.createElementBlock("div",h,[e.createVNode(r._sfc_main,{"is-open":!d.value,lazy:""},{default:e.withCtx(()=>[e.createElementVNode("div",null,[u.value?(e.openBlock(),e.createBlock(t._sfc_main,{key:0,variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({id:"invoice_preview.after_trial_heading",defaultMessage:"After trial",description:"After trial heading for the invoice preview"})),1)]),_:1})):e.createCommentVNode("",!0),"without-products"!==a.variant?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(g,{invoice:a.invoice},null,8,["invoice"]),e.createVNode(n._sfc_main,{spacing:"xxs"})],64)):e.createCommentVNode("",!0),e.createVNode(v,null,{label:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({id:"invoice_preview.total_excluding_taxes_heading",defaultMessage:"Total excluding taxes",description:"Total excluding taxes heading for the invoice preview"})),1)]),value:e.withCtx(()=>[e.createVNode(l._sfc_main,{value:a.invoice.tax_summary.base_amount},null,8,["value"])]),_:1}),e.createVNode(v,null,{label:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({id:"invoice_preview.taxes_heading",defaultMessage:"Taxes",description:"Taxes heading for the invoice preview"})),1)]),value:e.withCtx(()=>[a.isPreviewWithoutTaxes?(e.openBlock(),e.createBlock(_,{key:0,"width-class":"w-10","height-class":"h-4"})):(e.openBlock(),e.createBlock(l._sfc_main,{key:1,value:a.invoice.tax_summary.tax_amount},null,8,["value"]))]),_:1}),u.value?(e.openBlock(),e.createBlock(v,{key:2},{label:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({id:"invoice_preview.total_including_taxes_heading",defaultMessage:"Total including taxes",description:"Total including taxes heading for the invoice preview"})),1)]),value:e.withCtx(()=>[a.isPreviewWithoutTaxes?(e.openBlock(),e.createBlock(_,{key:0,"width-class":"w-10","height-class":"h-4"})):(e.openBlock(),e.createBlock(l._sfc_main,{key:1,value:a.invoice.tax_summary.total_amount},null,8,["value"]))]),_:1})):e.createCommentVNode("",!0),e.createVNode(n._sfc_main,{spacing:"xxs"})])]),_:1},8,["is-open"]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.value?"button":"div"),{class:e.normalizeClass({"text-left hover:cursor-pointer":c.value}),onClick:m},{default:e.withCtx(()=>[e.createVNode(v,{weight:"semibold",variant:"body-sm"},{label:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.isPaid?e.unref(i)({id:"invoice_preview.total_paid_heading",defaultMessage:"Total paid",description:"Total paid heading for the invoice preview"}):e.unref(i)({id:"invoice_preview.total_due_today_heading",defaultMessage:"Total due today",description:"Total due today heading for the invoice preview"}))+" ",1),c.value?(e.openBlock(),e.createBlock(s._sfc_main,{key:0,size:"xs",icon:"keyboard_arrow_down",class:e.normalizeClass(["text-gray-400 transition ease-in-out",{"rotate-0":d.value,"rotate-180":!d.value}])},null,8,["class"])):e.createCommentVNode("",!0)]),value:e.withCtx(()=>[a.isPreviewWithoutTaxes&&(!u.value||u.value&&"0.00"!==p.value.quantity)?(e.openBlock(),e.createBlock(_,{key:0})):(e.openBlock(),e.createBlock(l._sfc_main,{key:1,value:p.value},null,8,["value"]))]),_:1})]),_:1},8,["class"]))]))}}),x=["disabled"],w=["aria-label"],k=["id","disabled","value","aria-checked","aria-describedby"],b=["tabindex","data-testid","for","aria-label","onKeydown"],C={class:"text-xs"},B={key:1,class:"mt-2 text-sm text-gray-500"},V=e.defineComponent({__name:"RadioGroupExtended",props:{options:{},direction:{default:"row"},showRadio:{type:Boolean,default:!0},columns:{},disabled:{type:Boolean},label:{},modelValue:{type:[String,Boolean]},name:{},required:{type:Boolean},rootClass:{},error:{},variant:{}},emits:["update:modelValue"],setup(a,{emit:o}){const i=a,l=o,n=d.useVModel(i,"modelValue",l),r=e.computed(()=>i.columns?"grid":["flex","column"===i.direction?"flex-col":"flex-row"]),s=e.computed(()=>i.columns?{gridTemplateColumns:`repeat(${i.columns}, minmax(0, 1fr))`}:void 0),m=c.uniqueId(i.name?`radio_${i.name}_`:"radio_");return(o,l)=>(e.openBlock(),e.createElementBlock("fieldset",{class:e.normalizeClass(a.rootClass),disabled:a.disabled},[a.label?(e.openBlock(),e.createBlock(e.unref(c._sfc_main),{key:0,tag:"legend",required:a.required},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.label),1)]),_:1},8,["required"])):e.createCommentVNode("",!0),e.createElementVNode("div",{role:"group","aria-label":a.label,class:e.normalizeClass([r.value,"gap-1 rounded"]),style:e.normalizeStyle(s.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.options,r=>(e.openBlock(),e.createElementBlock("div",{key:r.value.toString(),class:"min-w-0 flex-1"},[e.withDirectives(e.createElementVNode("input",e.mergeProps({ref_for:!0},o.$attrs,{id:`${e.unref(m)}${r.value}`,"onUpdate:modelValue":l[0]||(l[0]=t=>e.isRef(n)?n.value=t:null),disabled:a.disabled,value:r.value,type:"radio","aria-checked":e.unref(n)===r.value,"aria-describedby":r.warning?`${e.unref(m)}${r.value}-warning`:void 0,tabindex:"-1",class:"sr-only"}),null,16,k),[[e.vModelRadio,e.unref(n)]]),e.createElementVNode("label",{tabindex:a.disabled?void 0:0,"data-testid":`radio-group-item-${r.value}`,for:`${e.unref(m)}${r.value}`,"aria-label":r.label+(r.description?`: ${r.description}`:""),class:e.normalizeClass(["label hover:bg-primary-50/50 relative flex h-full gap-3 rounded border border-gray-100 bg-gray-50/50 px-4 py-3 outline-none focus:bg-primary-50 focus-visible:border-primary-600 focus-visible:bg-primary-50 focus-visible:ring-1 focus-visible:ring-primary-600",{"cursor-pointer":!a.disabled,"cursor-not-allowed":a.disabled,"border-transparent bg-white ring-1 ring-primary-600":e.unref(n)===r.value&&!a.disabled,"opacity-60":a.disabled}]),onKeydown:e=>{return t=e,a=r.value,void(i.disabled||"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),n.value=a));var t,a}},[a.showRadio?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["material-symbols-outlined mt-px inline-block h-4 w-4 min-w-4 rounded-full leading-4",{"border-4 border-primary-800":e.unref(n)===r.value,"border border-gray-300":e.unref(n)!==r.value}])},null,2)):o.$slots.prefix?e.renderSlot(o.$slots,"prefix",{option:r,optionValue:r.value},void 0,void 0,1):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["flex min-w-0 grow flex-col",{"opacity-50":a.disabled}])},[e.createVNode(e.unref(t._sfc_main),{tag:"span",weight:"semibold","no-spacing":"",variant:"body-sm",class:"align-center flex justify-between"},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"label",{option:r,optionValue:r.value},()=>[e.createTextVNode(e.toDisplayString(r.label),1)])]),_:2},1024),e.renderSlot(o.$slots,"description",{option:r,optionValue:r.value},()=>[r.description?(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:0,tag:"span",variant:"body-xs","no-spacing":"",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.description),1)]),_:2},1024)):e.createCommentVNode("",!0)])],2),e.renderSlot(o.$slots,"suffix",{option:r,optionValue:r.value})],42,b),r.warning?(e.openBlock(),e.createBlock(e.unref(u._sfc_main),{key:0,id:`${e.unref(m)}${r.value}-warning`,class:"mt-1",type:e.unref(n)===r.value?"danger":"dark",role:"alert"},{default:e.withCtx(()=>[e.createElementVNode("span",C,e.toDisplayString(r.warning),1)]),_:2},1032,["id","type"])):e.createCommentVNode("",!0)]))),128))],14,w),a.error||o.$slots.helper?(e.openBlock(),e.createElementBlock("div",B,[a.error?(e.openBlock(),e.createBlock(e.unref(p._sfc_main),{key:0,message:a.error},null,8,["message"])):o.$slots.helper?e.renderSlot(o.$slots,"helper",{},void 0,void 0,1):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,x))}}),N={class:"sv-empty-state__body flex flex-col items-center justify-center py-2"},S={class:"sv-empty-state__action mt-3 empty:hidden"},$=e.defineComponent({__name:"EmptyStatePlaceholder",props:{icon:{type:null}},setup:a=>(o,i)=>(e.openBlock(),e.createBlock(e.unref(m._sfc_main),{class:"sv-empty-state"},{default:e.withCtx(()=>[e.createElementVNode("div",N,[e.createVNode(e.unref(s._sfc_main),{icon:a.icon,size:"md",class:"sv-empty-state__icon text-gray-500"},null,8,["icon"]),e.createVNode(e.unref(t._sfc_main),{center:"",tag:"span",variant:"body-xs",weight:"semibold",shade:"lighter",class:"sv-empty-state__title mt-1"},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"title")]),_:3}),e.createVNode(e.unref(t._sfc_main),{center:"",tag:"span",variant:"body-xs",shade:"lightest",class:"sv-empty-state__message mt-1"},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"message")]),_:3}),e.createElementVNode("div",S,[e.renderSlot(o.$slots,"action")])])]),_:3}))});exports._sfc_main=$,exports._sfc_main$1=V,exports._sfc_main$2=y,exports._sfc_main$3=f,exports._sfc_main$4=g;
1
+ const e=require("vue"),t=require("./customElements-DD7bpqkx.js"),a=require("./TooltipParagraph.vue.es-H9fI7zzt.js"),o=require("./useService-D73FNBjT.js"),i=require("./getComposedString.es-DvSNX-_z.js"),l=require("./Amount.vue.es-JDVa_3H-.js"),n=require("./Divider.vue.es-ClFG8QtG.js"),r=require("./Expand.vue.es-C-lnbA1v.js"),s=require("./Button.vue.es-O8mNivLL.js"),d=require("./index.es-2JWHHSgP.js"),c=require("./cn.es-DxSeYcoP.js"),u=require("./IconButton.vue.es-BHdQskx0.js"),p=require("./FormMessage.vue.es-Bd4_NG9H.js"),m=require("./Section.vue.es-CAJvEDn6.js"),v=e.defineComponent({__name:"invoicePreviewRow",props:{weight:{default:"normal"},variant:{default:"body-xs"},noSpacing:{type:Boolean,default:!1}},setup:a=>(o,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-row gap-2",{"py-1.5":!a.noSpacing}])},[e.createVNode(t._sfc_main,{tag:"span",variant:a.variant,class:"grow",weight:a.weight},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"label")]),_:3},8,["variant","weight"]),e.createVNode(t._sfc_main,{tag:"span",variant:a.variant,weight:a.weight},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"value")]),_:3},8,["variant","weight"])],2))}),f=e.defineComponent({__name:"Skeleton",props:{widthClass:{default:"w-10"},heightClass:{default:"h-3"},shade:{default:"default"}},setup:t=>(a,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["rounded",[t.widthClass,t.heightClass,{"bg-gray-50/50":"default"===t.shade,"bg-gray-100/50":"dark"===t.shade,"bg-gray-200/50":"darker"===t.shade,"bg-gray-400/50":"darkest"===t.shade}]])},null,2))}),_=e.defineComponent({__name:"InvoicePreviewNoTaxesSkeleton",props:{widthClass:{default:"w-12"},heightClass:{default:"h-5"}},setup(o){const{$t:i}=t.useIntl();return(t,l)=>(e.openBlock(),e.createBlock(a._sfc_main,{"is-dark-mode":""},{tooltip:e.withCtx(()=>[e.createVNode(a.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(a._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Will be determined by billing information",description:"Tooltip content for the invoice preview when taxes are not determined by billing information",id:"invoice_preview.taxes_not_determined_by_billing_information_tooltip"})),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(f,{"width-class":o.widthClass,"height-class":o.heightClass,shade:"darker"},null,8,["width-class","height-class"])]),_:1}))}}),g=e.defineComponent({__name:"InvoicePreviewGroups",props:{invoice:{},wrapperComponent:{}},setup(t){const a=e=>e.groups.reduce((e,t)=>t.type in e?{...e,[t.type]:[...e[t.type],t]}:{...e,[t.type]:[t]},{}),n=e=>{var t,a,l;return(null==(t=e.pricing)?void 0:t.name)&&!o.isEmpty(null==(a=e.pricing)?void 0:a.name)?e.pricing.name:i.getComposedString((null==(l=e.products)?void 0:l.map(e=>e.name))??[])};return(o,i)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.invoice.periods,(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:i},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.entries(a(o)),([a,o])=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:a},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,(a,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.wrapperComponent??"div"),{key:o},{default:e.withCtx(()=>[e.createVNode(v,{"no-spacing":void 0!==t.wrapperComponent},{label:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n(a)),1)]),value:e.withCtx(()=>[e.createVNode(l._sfc_main,{value:a.amount_excluding_tax},null,8,["value"])]),_:2},1032,["no-spacing"])]),_:2},1024))),128))],64))),128))],64))),128))}}),x={class:"flex flex-col"},y=e.defineComponent({__name:"InvoicePreview",props:{invoice:{},trialInvoice:{},isCustomerFacing:{type:Boolean,default:!1},variant:{default:"default"},isPaid:{type:Boolean,default:!1},collapsible:{default:void 0},isPreviewWithoutTaxes:{type:Boolean}},setup(a){const o=a,{$t:i}=t.useIntl(),d=e.ref(void 0!==o.collapsible&&"expanded"!==o.collapsible),c=e.computed(()=>void 0!==o.collapsible),u=e.computed(()=>!!o.trialInvoice),p=e.computed(()=>o.trialInvoice?o.trialInvoice.tax_summary.total_amount:o.invoice.tax_summary.total_amount),m=()=>{c.value&&(d.value=!d.value)};return(o,f)=>(e.openBlock(),e.createElementBlock("div",x,[e.createVNode(r._sfc_main,{"is-open":!d.value,lazy:""},{default:e.withCtx(()=>[e.createElementVNode("div",null,[u.value?(e.openBlock(),e.createBlock(t._sfc_main,{key:0,variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({id:"invoice_preview.after_trial_heading",defaultMessage:"After trial",description:"After trial heading for the invoice preview"})),1)]),_:1})):e.createCommentVNode("",!0),"without-products"!==a.variant?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(g,{invoice:a.invoice},null,8,["invoice"]),e.createVNode(n._sfc_main,{spacing:"xxs"})],64)):e.createCommentVNode("",!0),e.createVNode(v,null,{label:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({id:"invoice_preview.total_excluding_taxes_heading",defaultMessage:"Total excluding taxes",description:"Total excluding taxes heading for the invoice preview"})),1)]),value:e.withCtx(()=>[e.createVNode(l._sfc_main,{value:a.invoice.tax_summary.base_amount},null,8,["value"])]),_:1}),e.createVNode(v,null,{label:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({id:"invoice_preview.taxes_heading",defaultMessage:"Taxes",description:"Taxes heading for the invoice preview"})),1)]),value:e.withCtx(()=>[a.isPreviewWithoutTaxes?(e.openBlock(),e.createBlock(_,{key:0,"width-class":"w-10","height-class":"h-4"})):(e.openBlock(),e.createBlock(l._sfc_main,{key:1,value:a.invoice.tax_summary.tax_amount},null,8,["value"]))]),_:1}),u.value?(e.openBlock(),e.createBlock(v,{key:2},{label:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({id:"invoice_preview.total_including_taxes_heading",defaultMessage:"Total including taxes",description:"Total including taxes heading for the invoice preview"})),1)]),value:e.withCtx(()=>[a.isPreviewWithoutTaxes?(e.openBlock(),e.createBlock(_,{key:0,"width-class":"w-10","height-class":"h-4"})):(e.openBlock(),e.createBlock(l._sfc_main,{key:1,value:a.invoice.tax_summary.total_amount},null,8,["value"]))]),_:1})):e.createCommentVNode("",!0),e.createVNode(n._sfc_main,{spacing:"xxs"})])]),_:1},8,["is-open"]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.value?"button":"div"),{class:e.normalizeClass({"text-left hover:cursor-pointer":c.value}),onClick:m},{default:e.withCtx(()=>[e.createVNode(v,{weight:"semibold",variant:"body-sm"},{label:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.isPaid?e.unref(i)({id:"invoice_preview.total_paid_heading",defaultMessage:"Total paid",description:"Total paid heading for the invoice preview"}):e.unref(i)({id:"invoice_preview.total_due_today_heading",defaultMessage:"Total due today",description:"Total due today heading for the invoice preview"}))+" ",1),c.value?(e.openBlock(),e.createBlock(s._sfc_main,{key:0,size:"xs",icon:"keyboard_arrow_down",class:e.normalizeClass(["text-gray-400 transition ease-in-out",{"rotate-0":d.value,"rotate-180":!d.value}])},null,8,["class"])):e.createCommentVNode("",!0)]),value:e.withCtx(()=>[a.isPreviewWithoutTaxes&&(!u.value||u.value&&"0.00"!==p.value.quantity)?(e.openBlock(),e.createBlock(_,{key:0})):(e.openBlock(),e.createBlock(l._sfc_main,{key:1,value:p.value},null,8,["value"]))]),_:1})]),_:1},8,["class"]))]))}}),h=["disabled"],w=["aria-label"],k=["id","disabled","value","aria-checked","aria-describedby"],b=["tabindex","data-testid","for","aria-label","onKeydown"],C={class:"text-xs"},B={key:1,class:"mt-2 text-sm text-secondary"},V=e.defineComponent({__name:"RadioGroupExtended",props:{options:{},direction:{default:"row"},showRadio:{type:Boolean,default:!0},columns:{},disabled:{type:Boolean},label:{},modelValue:{type:[String,Boolean]},name:{},required:{type:Boolean},rootClass:{},error:{},variant:{}},emits:["update:modelValue"],setup(a,{emit:o}){const i=a,l=o,n=d.useVModel(i,"modelValue",l),r=e.computed(()=>i.columns?"grid":["flex","column"===i.direction?"flex-col":"flex-row"]),s=e.computed(()=>i.columns?{gridTemplateColumns:`repeat(${i.columns}, minmax(0, 1fr))`}:void 0),m=c.uniqueId(i.name?`radio_${i.name}_`:"radio_");return(o,l)=>(e.openBlock(),e.createElementBlock("fieldset",{class:e.normalizeClass(a.rootClass),disabled:a.disabled},[a.label?(e.openBlock(),e.createBlock(e.unref(c._sfc_main),{key:0,tag:"legend",required:a.required},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.label),1)]),_:1},8,["required"])):e.createCommentVNode("",!0),e.createElementVNode("div",{role:"group","aria-label":a.label,class:e.normalizeClass([r.value,"gap-1 rounded"]),style:e.normalizeStyle(s.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.options,r=>(e.openBlock(),e.createElementBlock("div",{key:r.value.toString(),class:"flex min-w-0 flex-1 flex-col"},[e.withDirectives(e.createElementVNode("input",e.mergeProps({ref_for:!0},o.$attrs,{id:`${e.unref(m)}${r.value}`,"onUpdate:modelValue":l[0]||(l[0]=t=>e.isRef(n)?n.value=t:null),disabled:a.disabled,value:r.value,type:"radio","aria-checked":e.unref(n)===r.value,"aria-describedby":r.warning?`${e.unref(m)}${r.value}-warning`:void 0,tabindex:"-1",class:"sr-only"}),null,16,k),[[e.vModelRadio,e.unref(n)]]),e.createElementVNode("label",{tabindex:a.disabled?void 0:0,"data-testid":`radio-group-item-${r.value}`,for:`${e.unref(m)}${r.value}`,"aria-label":r.label+(r.description?`: ${r.description}`:""),class:e.normalizeClass(["label hover:bg-primary-50/50 relative flex flex-1 gap-3 rounded border border-gray-100 bg-gray-50/50 px-4 py-3 outline-none focus:bg-primary-50 focus-visible:border-primary-600 focus-visible:bg-primary-50 focus-visible:ring-1 focus-visible:ring-primary-600",{"cursor-pointer":!a.disabled,"cursor-not-allowed":a.disabled,"border-transparent bg-white ring-1 ring-primary-600":e.unref(n)===r.value&&!a.disabled,"opacity-60":a.disabled}]),onKeydown:e=>{return t=e,a=r.value,void(i.disabled||"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),n.value=a));var t,a}},[a.showRadio?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["material-symbols-outlined mt-px inline-block h-4 w-4 min-w-4 rounded-full leading-4",{"border-4 border-primary-800":e.unref(n)===r.value,"border border-gray-300":e.unref(n)!==r.value}])},null,2)):o.$slots.prefix?e.renderSlot(o.$slots,"prefix",{option:r,optionValue:r.value},void 0,void 0,1):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["flex min-w-0 grow flex-col",{"opacity-50":a.disabled}])},[e.createVNode(e.unref(t._sfc_main),{tag:"span",weight:"semibold","no-spacing":"",variant:"body-sm",class:"align-center flex justify-between"},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"label",{option:r,optionValue:r.value},()=>[e.createTextVNode(e.toDisplayString(r.label),1)])]),_:2},1024),e.renderSlot(o.$slots,"description",{option:r,optionValue:r.value},()=>[r.description?(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:0,tag:"span",variant:"body-xs","no-spacing":"",color:"secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.description),1)]),_:2},1024)):e.createCommentVNode("",!0)])],2),e.renderSlot(o.$slots,"suffix",{option:r,optionValue:r.value})],42,b),r.warning?(e.openBlock(),e.createBlock(e.unref(u._sfc_main),{key:0,id:`${e.unref(m)}${r.value}-warning`,class:"mt-1",type:e.unref(n)===r.value?"danger":"neutral",role:"alert"},{default:e.withCtx(()=>[e.createElementVNode("span",C,e.toDisplayString(r.warning),1)]),_:2},1032,["id","type"])):e.createCommentVNode("",!0)]))),128))],14,w),a.error||o.$slots.helper?(e.openBlock(),e.createElementBlock("div",B,[a.error?(e.openBlock(),e.createBlock(e.unref(p._sfc_main),{key:0,message:a.error},null,8,["message"])):o.$slots.helper?e.renderSlot(o.$slots,"helper",{},void 0,void 0,1):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,h))}}),N={class:"sv-empty-state__body flex flex-col items-center justify-center py-2"},S={class:"sv-empty-state__action mt-3 empty:hidden"},$=e.defineComponent({__name:"EmptyStatePlaceholder",props:{icon:{type:null}},setup:a=>(o,i)=>(e.openBlock(),e.createBlock(e.unref(m._sfc_main),{class:"sv-empty-state"},{default:e.withCtx(()=>[e.createElementVNode("div",N,[e.createVNode(e.unref(s._sfc_main),{icon:a.icon,size:"md",class:"sv-empty-state__icon text-gray-500"},null,8,["icon"]),e.createVNode(e.unref(t._sfc_main),{center:"",tag:"span",variant:"body-xs",weight:"semibold",color:"subtle",class:"sv-empty-state__title mt-1"},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"title")]),_:3}),e.createVNode(e.unref(t._sfc_main),{center:"",tag:"span",variant:"body-xs",color:"subtle",class:"sv-empty-state__message mt-1"},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"message")]),_:3}),e.createElementVNode("div",S,[e.renderSlot(o.$slots,"action")])])]),_:3}))});exports._sfc_main=$,exports._sfc_main$1=V,exports._sfc_main$2=y,exports._sfc_main$3=f,exports._sfc_main$4=g;
@@ -0,0 +1,38 @@
1
+ import { defineComponent, computed, openBlock, createBlock, mergeProps, withCtx, createElementVNode, toDisplayString, createElementBlock, createCommentVNode } from "vue";
2
+ import { _ as _sfc_main$1 } from "./IconButton.vue.es-KywqWWvr.mjs";
3
+ import { u as useIntl } from "./customElements-B-89a5oH.mjs";
4
+ const _hoisted_1 = { class: "grid gap-1" };
5
+ const _hoisted_2 = { class: "font-medium" };
6
+ const _hoisted_3 = { key: 0 };
7
+ const _sfc_main = /* @__PURE__ */ defineComponent({
8
+ __name: "ErrorNotification",
9
+ props: {
10
+ title: {},
11
+ description: {}
12
+ },
13
+ setup(__props) {
14
+ const { formatMessage } = useIntl();
15
+ const props = __props;
16
+ const title = computed(
17
+ () => props.title ?? formatMessage({
18
+ defaultMessage: "Something went wrong",
19
+ id: "error_notification.default_error_message",
20
+ description: "The default message to display"
21
+ })
22
+ );
23
+ return (_ctx, _cache) => {
24
+ return openBlock(), createBlock(_sfc_main$1, mergeProps({ type: "danger" }, _ctx.$attrs), {
25
+ default: withCtx(() => [
26
+ createElementVNode("div", _hoisted_1, [
27
+ createElementVNode("span", _hoisted_2, toDisplayString(title.value), 1),
28
+ __props.description ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(__props.description), 1)) : createCommentVNode("", true)
29
+ ])
30
+ ]),
31
+ _: 1
32
+ }, 16);
33
+ };
34
+ }
35
+ });
36
+ export {
37
+ _sfc_main as _
38
+ };
@@ -0,0 +1 @@
1
+ const e=require("vue"),t=require("./IconButton.vue.es-BHdQskx0.js"),o=require("./customElements-DD7bpqkx.js"),r={class:"grid gap-1"},s={class:"font-medium"},n={key:0},i=e.defineComponent({__name:"ErrorNotification",props:{title:{},description:{}},setup(i){const{formatMessage:a}=o.useIntl(),c=i,l=e.computed(()=>c.title??a({defaultMessage:"Something went wrong",id:"error_notification.default_error_message",description:"The default message to display"}));return(o,a)=>(e.openBlock(),e.createBlock(t._sfc_main,e.mergeProps({type:"danger"},o.$attrs),{default:e.withCtx(()=>[e.createElementVNode("div",r,[e.createElementVNode("span",s,e.toDisplayString(l.value),1),i.description?(e.openBlock(),e.createElementBlock("span",n,e.toDisplayString(i.description),1)):e.createCommentVNode("",!0)])]),_:1},16))}});exports._sfc_main=i;
@@ -0,0 +1 @@
1
+ const e=require("vue"),t=e.defineComponent({__name:"FormMessage",props:{message:{},variant:{default:"error"},capitalizeFirstLetter:{type:Boolean,default:!0}},setup(t){const a=t,r=e.computed(()=>{let e="text-xs";return"default"===a.variant&&(e+=" text-secondary"),"error"===a.variant&&(e+=" text-feedback-danger"),"warning"===a.variant&&(e+=" text-feedback-warning"),a.capitalizeFirstLetter&&(e+=" first-letter:capitalize"),e});return(a,s)=>"object"!=typeof t.message||"value"in t.message?t.message||a.$slots.default?(e.openBlock(),e.createElementBlock("p",{key:1,class:e.normalizeClass(r.value)},[e.renderSlot(a.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.message),1)])],2)):e.createCommentVNode("",!0):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.message,({$uid:t,$message:a})=>(e.openBlock(),e.createElementBlock("p",{key:t,class:e.normalizeClass(r.value)},e.toDisplayString(a),3))),128))}});exports._sfc_main=t;
@@ -11,13 +11,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
11
11
  const classNames = computed(() => {
12
12
  let result = "text-xs";
13
13
  if (props.variant === "default") {
14
- result += " text-slate-400";
14
+ result += " text-secondary";
15
15
  }
16
16
  if (props.variant === "error") {
17
- result += " text-red-600";
17
+ result += " text-feedback-danger";
18
18
  }
19
19
  if (props.variant === "warning") {
20
- result += " text-yellow-600";
20
+ result += " text-feedback-warning";
21
21
  }
22
22
  if (props.capitalizeFirstLetter) {
23
23
  result += " first-letter:capitalize";
@@ -0,0 +1 @@
1
+ const e=require("vue"),l=require("./object.es-DFXiU9p3.js"),t=require("./TooltipParagraph.vue.es-H9fI7zzt.js"),o=require("./Button.vue.es-O8mNivLL.js"),n="py-2 px-4 text-sm",r={danger:"text-feedback-danger",neutral:"text-secondary",info:"text-feedback-info",success:"text-feedback-success",warning:"text-feedback-warning"},a={danger:"bg-feedback-danger",neutral:"bg-feedback-neutral",info:"bg-feedback-info",success:"bg-feedback-success",warning:"bg-feedback-warning"},s={danger:"rounded-sm border border-red-200",neutral:"rounded-sm border border-gray-200",info:"rounded-sm border border-blue-200",success:"rounded-sm border border-green-200",warning:"rounded-sm border border-yellow-200"},i="ml-auto -mx-1.5 -my-1.5 rounded focus:ring-2 p-1.5 inline-flex h-8 w-8",c={danger:"hover:bg-red-200 focus:ring-red-400 bg-red-100 text-red-500",neutral:"hover:bg-gray-200 focus:ring-gray-400 bg-feedback-neutral text-gray-500",info:"hover:bg-blue-200 focus:ring-blue-400 bg-blue-100 text-blue-500",success:"bg-green-100 text-green-500 focus:ring-green-400 hover:bg-green-200",warning:"focus:ring-yellow-400 hover:bg-yellow-200 bg-yellow-100 text-yellow-500"};const u={key:0,class:"ml-auto inline-flex items-center"},d=e.defineComponent({__name:"Alert",props:{type:{default:"info"},title:{default:""},closable:{type:Boolean,default:!1},icon:{type:Boolean,default:!0},inline:{type:Boolean,default:!0}},setup(l){const t=l,{alertClasses:o,textClasses:d,closeClasses:m,contentClasses:f,titleClasses:p}=function(l){const t=e.computed(()=>[n,a[l.type.value],o.value,s[l.type.value],l.inline.value?"flex items-center":""].filter(e=>!!e).join(" ")),o=e.computed(()=>r[l.type.value]??""),u=e.computed(()=>[i,c[l.type.value]??""].filter(e=>!!e).join(" ")),d=e.computed(()=>l.inline.value?l.icon.value||l.title.value?l.title.value?"grow ml-1":"grow ml-2":"":"my-2"),m=e.computed(()=>l.icon.value&&l.inline.value?["font-medium ml-2",l.inline.value?"":"text-lg"].filter(e=>!!e).join(" "):["font-medium",l.inline.value?"":"text-lg ml-2"].filter(e=>!!e).join(" "));return{alertClasses:t,textClasses:o,closeClasses:u,contentClasses:d,titleClasses:m}}(e.toRefs(t)),g=e.ref(!0),b=()=>{g.value=!1};return(t,n)=>g.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(o)),role:"alert"},[e.createElementVNode("div",{class:e.normalizeClass(l.inline?"flex":"flex items-center")},[l.icon?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(["flex-shrink-0","w-5","h-5",e.unref(d)]),fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[...n[0]||(n[0]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z","clip-rule":"evenodd"},null,-1)])],2)):e.createCommentVNode("",!0),l.title?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(p))},e.toDisplayString(l.title),3)):e.createCommentVNode("",!0),!l.inline&&l.closable?(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:e.normalizeClass(e.unref(m)),"aria-label":"Close",onClick:b},[...n[1]||(n[1]=[e.createElementVNode("span",{class:"sr-only"},"Dismiss",-1),e.createElementVNode("svg",{class:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)])],2)):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(f))},[e.renderSlot(t.$slots,"default")],2),t.$slots.actions?(e.openBlock(),e.createElementBlock("div",u,[e.renderSlot(t.$slots,"actions")])):e.createCommentVNode("",!0),l.inline&&l.closable?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:e.normalizeClass(e.unref(m)),"aria-label":"Close",onClick:b},[...n[2]||(n[2]=[e.createElementVNode("span",{class:"sr-only"},"Dismiss",-1),e.createElementVNode("svg",{class:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)])],2)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)}}),m=e.defineComponent({inheritAttrs:!1,__name:"IconButton",props:{tooltip:{},icon:{},type:{},intent:{},size:{},pill:{type:Boolean},square:{type:Boolean},loading:{type:Boolean},disabled:{type:Boolean},iconPrefix:{},iconSuffix:{},tag:{},preventDoubleClick:{type:Boolean}},setup(n){const r=n,a=e.useAttrs(),s=e.computed(()=>l.omit({...r,...a},"icon","tooltip"));return(l,r)=>n.tooltip?(e.openBlock(),e.createBlock(t._sfc_main,{key:0},{tooltip:e.withCtx(()=>[e.createVNode(t.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(t._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.tooltip),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(o._sfc_main$1,e.mergeProps(s.value,{"icon-prefix":n.icon,square:""}),null,16,["icon-prefix"])]),_:1})):(e.openBlock(),e.createBlock(o._sfc_main$1,e.mergeProps({key:1},s.value,{square:"","icon-prefix":n.icon}),null,16,["icon-prefix"]))}});exports._sfc_main=d,exports._sfc_main$1=m;
@@ -1,33 +1,33 @@
1
1
  import { computed, defineComponent, toRefs, ref, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, createCommentVNode, toDisplayString, renderSlot, useAttrs, createBlock, withCtx, createVNode, mergeProps, createTextVNode } from "vue";
2
2
  import { o as omit } from "./object.es-jvvnR8Kr.mjs";
3
- import { _ as _sfc_main$2, T as TooltipContent, a as _sfc_main$4 } from "./TooltipParagraph.vue.es-B5aHQv9O.mjs";
4
- import { a as _sfc_main$3 } from "./Button.vue.es-BrWHdiEA.mjs";
3
+ import { _ as _sfc_main$2, T as TooltipContent, a as _sfc_main$4 } from "./TooltipParagraph.vue.es-C5RTcrid.mjs";
4
+ import { a as _sfc_main$3 } from "./Button.vue.es-Cm9pLU9i.mjs";
5
5
  const defaultAlertClasses = "py-2 px-4 text-sm";
6
6
  const alertTextClasses = {
7
- danger: "text-red-700",
8
- dark: "text-gray-700",
9
- info: "text-blue-700",
10
- success: "text-green-700",
11
- warning: "text-yellow-700"
7
+ danger: "text-feedback-danger",
8
+ neutral: "text-secondary",
9
+ info: "text-feedback-info",
10
+ success: "text-feedback-success",
11
+ warning: "text-feedback-warning"
12
12
  };
13
13
  const alertTypeClasses = {
14
- danger: "bg-red-100",
15
- dark: "bg-gray-100",
16
- info: "bg-blue-100",
17
- success: "bg-green-100",
18
- warning: "bg-yellow-100"
14
+ danger: "bg-feedback-danger",
15
+ neutral: "bg-feedback-neutral",
16
+ info: "bg-feedback-info",
17
+ success: "bg-feedback-success",
18
+ warning: "bg-feedback-warning"
19
19
  };
20
20
  const alertBorderClasses = {
21
- danger: "border-t-4 border-red-500",
22
- dark: "border-t-4 border-gray-500",
23
- info: "border-t-4 border-blue-500",
24
- success: "border-t-4 border-green-500",
25
- warning: "border-t-4 border-yellow-500"
21
+ danger: "rounded-sm border border-red-200",
22
+ neutral: "rounded-sm border border-gray-200",
23
+ info: "rounded-sm border border-blue-200",
24
+ success: "rounded-sm border border-green-200",
25
+ warning: "rounded-sm border border-yellow-200"
26
26
  };
27
27
  const defaultCloseButtonClasses = "ml-auto -mx-1.5 -my-1.5 rounded focus:ring-2 p-1.5 inline-flex h-8 w-8";
28
28
  const closeButtonClasses = {
29
29
  danger: "hover:bg-red-200 focus:ring-red-400 bg-red-100 text-red-500",
30
- dark: "hover:bg-gray-200 focus:ring-gray-400 bg-gray-100 text-gray-500",
30
+ neutral: "hover:bg-gray-200 focus:ring-gray-400 bg-feedback-neutral text-gray-500",
31
31
  info: "hover:bg-blue-200 focus:ring-blue-400 bg-blue-100 text-blue-500",
32
32
  success: "bg-green-100 text-green-500 focus:ring-green-400 hover:bg-green-200",
33
33
  warning: "focus:ring-yellow-400 hover:bg-yellow-200 bg-yellow-100 text-yellow-500"
@@ -38,8 +38,7 @@ function useAlertClasses(props) {
38
38
  defaultAlertClasses,
39
39
  alertTypeClasses[props.type.value],
40
40
  textClasses.value,
41
- props.border.value ? alertBorderClasses[props.type.value] : "rounded",
42
- // rounded only if no border
41
+ alertBorderClasses[props.type.value],
43
42
  props.inline.value ? "flex items-center" : ""
44
43
  ].filter((value) => !!value).join(" ")
45
44
  );
@@ -77,7 +76,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
77
76
  title: { default: "" },
78
77
  closable: { type: Boolean, default: false },
79
78
  icon: { type: Boolean, default: true },
80
- border: { type: Boolean, default: false },
81
79
  inline: { type: Boolean, default: true }
82
80
  },
83
81
  setup(__props) {
@@ -180,8 +178,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
180
178
  tooltip: {},
181
179
  icon: {},
182
180
  type: {},
183
- variant: {},
184
- color: {},
181
+ intent: {},
185
182
  size: {},
186
183
  pill: { type: Boolean },
187
184
  square: { type: Boolean },
@@ -1,8 +1,8 @@
1
1
  import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, createBlock, unref, createCommentVNode, createElementVNode, renderSlot, createTextVNode, toDisplayString, withCtx } from "vue";
2
2
  import { i as isVnodeEmpty } from "./slots.es-BpwYO3A3.mjs";
3
- import { _ as _sfc_main$1 } from "./Button.vue.es-BrWHdiEA.mjs";
4
- import { _ as _sfc_main$2 } from "./Avatar.vue.es-DJp6NEU_.mjs";
5
- import { _ as _sfc_main$3 } from "./customElements-DdFA__me.mjs";
3
+ import { _ as _sfc_main$1 } from "./Button.vue.es-Cm9pLU9i.mjs";
4
+ import { _ as _sfc_main$2 } from "./Avatar.vue.es-DJzJiYtv.mjs";
5
+ import { _ as _sfc_main$3 } from "./customElements-B-89a5oH.mjs";
6
6
  const _hoisted_1 = { class: "min-w-0 grow" };
7
7
  const _sfc_main = /* @__PURE__ */ defineComponent({
8
8
  __name: "IconTitle",
@@ -15,7 +15,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
15
15
  size: { default: "md" },
16
16
  avatar: { type: Boolean, default: false },
17
17
  uppercase: { type: Boolean, default: true },
18
- resourceId: {}
18
+ resourceId: {},
19
+ iconClass: {},
20
+ titleClass: {}
19
21
  },
20
22
  setup(__props) {
21
23
  const props = __props;
@@ -43,12 +45,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
43
45
  }, [
44
46
  __props.icon ? (openBlock(), createElementBlock("div", {
45
47
  key: 0,
46
- class: normalizeClass([{
48
+ class: normalizeClass([[__props.iconClass, {
47
49
  [gradientClasses.value]: true,
48
50
  "h-9 w-9": ["md", "lg"].includes(__props.size),
49
51
  "h-8 w-8": __props.size === "sm",
50
52
  "h-6 w-6": __props.size === "xs"
51
- }, "flex shrink-0 items-center justify-center rounded-md"])
53
+ }], "flex shrink-0 items-center justify-center rounded-md"])
52
54
  }, [
53
55
  __props.icon ? (openBlock(), createBlock(unref(_sfc_main$1), {
54
56
  key: 0,
@@ -65,15 +67,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
65
67
  createElementVNode("div", _hoisted_1, [
66
68
  __props.title || _ctx.$slots.default ? (openBlock(), createElementBlock("div", {
67
69
  key: 0,
68
- class: normalizeClass([{
70
+ class: normalizeClass([[__props.titleClass, {
69
71
  "text-3xl": __props.size === "lg",
70
72
  "text-2xl": __props.size === "md",
71
73
  "text-base": __props.size === "sm",
72
- "text-xs text-gray-600": __props.size === "xs",
73
- "text-gray-900": __props.size !== "xs",
74
+ "text-xs text-subtle": __props.size === "xs",
75
+ "text-default": __props.size !== "xs",
74
76
  uppercase: __props.size === "xs" && __props.uppercase,
75
77
  "font-general-sans": ["md", "lg"].includes(__props.size)
76
- }, "flex flex-wrap items-center break-words font-semibold"])
78
+ }], "flex flex-wrap items-center break-words font-semibold"])
77
79
  }, [
78
80
  renderSlot(_ctx.$slots, "prefix"),
79
81
  renderSlot(_ctx.$slots, "default", {}, () => [
@@ -86,7 +88,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
86
88
  __props.subTitle || _ctx.$slots.subTitle && !unref(isVnodeEmpty)(_ctx.$slots.subTitle({})) ? (openBlock(), createBlock(unref(_sfc_main$3), {
87
89
  key: 1,
88
90
  variant: "body-sm",
89
- shade: "lighter"
91
+ color: "secondary"
90
92
  }, {
91
93
  default: withCtx(() => [
92
94
  renderSlot(_ctx.$slots, "subTitle", {}, () => [