@solvimon/solvimon-web 0.1.0-alpha.21 → 0.1.0-alpha.22

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 (216) hide show
  1. package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-B9WTpz0k.js → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Co3XAxaY.js} +1 -1
  2. package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DJCMa2Lz.mjs → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DFv-awxb.mjs} +6 -6
  3. package/dist/{Avatar.vue.es-CJw5z7Uu.js → Avatar.vue.es-D42J_izE.js} +1 -1
  4. package/dist/{Avatar.vue.es-ChcLSNaN.mjs → Avatar.vue.es-DNJ-jexx.mjs} +1 -1
  5. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-CTQ5RMtx.js → BillingInformation.vue_vue_type_script_setup_true_lang-BEVkWJXT.js} +1 -1
  6. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-DApMAncl.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-D1uVidXk.mjs} +4 -4
  7. package/dist/{Button.vue.es-VQCd3V3C.mjs → Button.vue.es-Dz-2L8dJ.mjs} +1 -1
  8. package/dist/{Button.vue.es-BWl37nzm.js → Button.vue.es-M_jXZda4.js} +1 -1
  9. package/dist/{Checkout.entry.ce-DRHqEFd7.mjs → Checkout.entry.ce-B5-0AM67.mjs} +1298 -1225
  10. package/dist/Checkout.entry.ce-C52gkrNZ.js +1 -0
  11. package/dist/{Chip.vue.es-CXG8o1Qf.mjs → Chip.vue.es-DMK9C78d.mjs} +2 -2
  12. package/dist/{Chip.vue.es-DUgjuRWm.js → Chip.vue.es-G8doKsZb.js} +1 -1
  13. package/dist/{ContextMenu.vue.es-BllxeDTt.js → ContextMenu.vue.es-B3Rz6Ojk.js} +1 -1
  14. package/dist/{ContextMenu.vue.es-C6TKlSXs.mjs → ContextMenu.vue.es-CzkkNoJG.mjs} +4 -4
  15. package/dist/{CustomerBillingInformation.vue.es-CMCZ-lIM.js → CustomerBillingInformation.vue.es-BmtU9Pk0.js} +1 -1
  16. package/dist/{CustomerBillingInformation.vue.es-CKQH_ds0.mjs → CustomerBillingInformation.vue.es-Db6bN2RZ.mjs} +2 -2
  17. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-n097Xf1H.js → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BGHaTx1A.js} +1 -1
  18. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BxwllXwU.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-fESZVyPe.mjs} +5 -5
  19. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-Cnlbp0om.js +1 -0
  20. package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-CtaoLbrM.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DdMHG1_Y.mjs} +485 -501
  21. package/dist/{DividerText.vue.es-BBdydUy_.js → DividerText.vue.es-D-QxT2OD.js} +1 -1
  22. package/dist/{DividerText.vue.es-Bomiy4if.mjs → DividerText.vue.es-IK2fns6f.mjs} +1 -1
  23. package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-DXO9xpFT.js → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CM_8Asmw.js} +1 -1
  24. package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-C9elbdbF.mjs → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-lhJnqrrh.mjs} +4 -4
  25. package/dist/{ErrorNotification.vue.es-C6ngWAVU.mjs → ErrorNotification.vue.es-BGckEwHf.mjs} +2 -2
  26. package/dist/{ErrorNotification.vue.es-0ZC_DozN.js → ErrorNotification.vue.es-Cd2UKPAz.js} +1 -1
  27. package/dist/{IconButton.vue.es-DGLIdHkR.js → IconButton.vue.es-BTAkuFsm.js} +1 -1
  28. package/dist/{IconButton.vue.es-DAR7e8NA.mjs → IconButton.vue.es-C4dQEQAc.mjs} +2 -2
  29. package/dist/{IconTitle.vue.es-Bbusc4wK.mjs → IconTitle.vue.es-BmX68uJx.mjs} +3 -3
  30. package/dist/{IconTitle.vue.es-D-q6w2E-.js → IconTitle.vue.es-CmR2xoeu.js} +1 -1
  31. package/dist/{Input.vue.es-AY1c0Rui.mjs → Input.vue.es-BGPELaZU.mjs} +2 -2
  32. package/dist/{Input.vue.es-BN95nPBw.js → Input.vue.es-CTOrmrcB.js} +1 -1
  33. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-1WjSbPEP.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-CMEOOuSU.mjs} +2 -2
  34. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-qiBCPY8l.js → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-bheNAKzK.js} +1 -1
  35. package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-Xo9BR6AD.js +1 -0
  36. package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-D99nuBRE.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-avhwysNq.mjs} +3 -3
  37. package/dist/{InvoiceSummary.vue.es-Bs5c2Ovx.mjs → InvoiceSummary.vue.es-BWLiwlNs.mjs} +692 -705
  38. package/dist/InvoiceSummary.vue.es-hpG8Tq1D.js +1 -0
  39. package/dist/{Modal.vue.es-Chi6_MH_.js → Modal.vue.es-BD4vUaOQ.js} +1 -1
  40. package/dist/{Modal.vue.es-DSkC4eMv.mjs → Modal.vue.es-B_G8NQS2.mjs} +5 -5
  41. package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-vD88j_U7.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-BnilyGBO.mjs} +3 -3
  42. package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-Draz_8Ts.js → PaymentErrorCard.vue_vue_type_script_setup_true_lang-CSv-Luvz.js} +1 -1
  43. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-Db6jAkqD.js → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DIJbzWMV.js} +1 -1
  44. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DVif_ME8.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DuorCFo9.mjs} +3 -3
  45. package/dist/{PaymentHistoryBlock-budeR7ep.mjs → PaymentHistoryBlock-ComJzB3H.mjs} +1 -1
  46. package/dist/{PaymentHistoryBlock-DGJ_PiVq.js → PaymentHistoryBlock-DSHW_eW1.js} +1 -1
  47. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-Dv-3suBX.js → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DUN0Hf2v.js} +1 -1
  48. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-C28ofG7N.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-hjtksV2D.mjs} +4 -4
  49. package/dist/{PaymentIntegrationForm-Crrhar96.mjs → PaymentIntegrationForm-CH5B6BY5.mjs} +1 -1
  50. package/dist/{PaymentIntegrationForm-DqqGcEP1.js → PaymentIntegrationForm-CwfCLnKt.js} +1 -1
  51. package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-C4bk0m8g.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BqYk4_T9.mjs} +3 -3
  52. package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CcEEdHQJ.js → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DzSQC951.js} +1 -1
  53. package/dist/{PaymentIntegrationFormAdyen-DM-xMcm0.mjs → PaymentIntegrationFormAdyen-DfN7cPYZ.mjs} +5 -5
  54. package/dist/{PaymentIntegrationFormAdyen-DronjwO3.js → PaymentIntegrationFormAdyen-Q48aDXR7.js} +1 -1
  55. package/dist/{PaymentIntegrationFormStripe-ybM6wirp.js → PaymentIntegrationFormStripe-BSEqarl7.js} +1 -1
  56. package/dist/{PaymentIntegrationFormStripe-yBm4KnpV.mjs → PaymentIntegrationFormStripe-CBsXDuhy.mjs} +4 -4
  57. package/dist/{PaymentMethod.vue.es-Ctw9Es1g.js → PaymentMethod.vue.es-D18g-QB4.js} +1 -1
  58. package/dist/{PaymentMethod.vue.es-BdMcKq8_.mjs → PaymentMethod.vue.es-DkQdPXfk.mjs} +3 -3
  59. package/dist/{PaymentMethodForm-C1bIGX10.mjs → PaymentMethodForm-CpIZKfPH.mjs} +1 -1
  60. package/dist/{PaymentMethodForm-BQ5TVHlS.js → PaymentMethodForm-DK8ntFA0.js} +1 -1
  61. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-5KKkuVt5.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-C1tGJsay.mjs} +5 -5
  62. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-V88bCeDt.js → PaymentMethodForm.vue_vue_type_script_setup_true_lang-D7fDguwa.js} +1 -1
  63. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-CnmZ9dvP.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-C6BcIkEV.mjs} +6 -6
  64. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-B_207kq5.js → PaymentMethodsList.vue_vue_type_script_setup_true_lang-H3vrPllf.js} +1 -1
  65. package/dist/PlanCustomizationEditor-0zCXN-cv.mjs +877 -0
  66. package/dist/PlanCustomizationEditor-XpofGULc.js +1 -0
  67. package/dist/{PricingGroupRangeInput.vue.es-Bnb-ARie.mjs → PricingGroupRangeInput.vue.es-8_5nfZDI.mjs} +4 -4
  68. package/dist/{PricingGroupRangeInput.vue.es-D82XvoC_.js → PricingGroupRangeInput.vue.es-QnpfHxaY.js} +1 -1
  69. package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-CxMkCmti.js → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-CGJhKKNL.js} +1 -1
  70. package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-skQMgHEL.mjs → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-t6h1j6WD.mjs} +5 -5
  71. package/dist/{RadioGroupExtended.vue.es-WDbo_yj1.mjs → RadioGroupExtended.vue.es-C92xlCFQ.mjs} +3 -3
  72. package/dist/{RadioGroupExtended.vue.es-B1YtLNKG.js → RadioGroupExtended.vue.es-Cb1iD73r.js} +1 -1
  73. package/dist/{Section.vue.es-DuK52y67.js → Section.vue.es-Btff-cLY.js} +1 -1
  74. package/dist/{Section.vue.es-By1JltGi.mjs → Section.vue.es-DQ5H7mqW.mjs} +1 -1
  75. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Ct3ZNq-j.js → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BfvX14E3.js} +1 -1
  76. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-CS3KIkPL.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DKsunuGT.mjs} +6 -6
  77. package/dist/{SubscriptionSchedules-DDCjVEbG.mjs → SubscriptionSchedules-Dc0rUnnf.mjs} +1 -1
  78. package/dist/{SubscriptionSchedules-DEjIERyF.js → SubscriptionSchedules-pzNsego6.js} +1 -1
  79. package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-JAedXFzq.mjs → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-Brs9qDs5.mjs} +1655 -1620
  80. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-nmVRb6hj.js +1 -0
  81. package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-DVMS4gJQ.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-C1mkIPMr.mjs} +3 -3
  82. package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-D-Fa54M6.js → SubscriptionSummary.vue_vue_type_script_setup_true_lang-s5_uhyuB.js} +1 -1
  83. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DiXmEjUD.js → SubscriptionsList.vue_vue_type_script_setup_true_lang-CFmCJK8M.js} +1 -1
  84. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-BckZJtOc.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-DSoNs7Xx.mjs} +7 -7
  85. package/dist/{TooltipParagraph.vue.es-sTgWAgcd.js → TooltipParagraph.vue.es-BaqCDjl8.js} +1 -1
  86. package/dist/{TooltipParagraph.vue.es-DYu2ReL7.mjs → TooltipParagraph.vue.es-CIedcXGT.mjs} +1 -1
  87. package/dist/{TrialChip.vue.es-Cl-9_pdr.js → TrialChip.vue.es-BzNI94k0.js} +1 -1
  88. package/dist/{TrialChip.vue.es-DX53r0ku.mjs → TrialChip.vue.es-DkBuMNr_.mjs} +2 -2
  89. package/dist/{cn.es-DjnGlmqV.mjs → cn.es-BGqYNPM3.mjs} +2 -2
  90. package/dist/{cn.es-CNvIP217.js → cn.es-CvmLj7KH.js} +1 -1
  91. package/dist/components/BillingInformation/BillingInformation.cjs +1 -1
  92. package/dist/components/BillingInformation/BillingInformation.mjs +4 -4
  93. package/dist/components/BillingInformationForm/BillingInformationForm.cjs +1 -1
  94. package/dist/components/BillingInformationForm/BillingInformationForm.mjs +6 -6
  95. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs +1 -1
  96. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +4 -4
  97. package/dist/components/Invoice/Invoice.cjs +1 -1
  98. package/dist/components/Invoice/Invoice.mjs +9 -9
  99. package/dist/components/InvoiceDetails/InvoiceDetails.cjs +1 -1
  100. package/dist/components/InvoiceDetails/InvoiceDetails.mjs +3 -3
  101. package/dist/components/InvoiceHeader/InvoiceHeader.cjs +1 -1
  102. package/dist/components/InvoiceHeader/InvoiceHeader.mjs +2 -2
  103. package/dist/components/InvoicesList/InvoicesList.cjs +1 -1
  104. package/dist/components/InvoicesList/InvoicesList.mjs +3 -3
  105. package/dist/components/PaymentHistory/PaymentHistory.cjs +1 -1
  106. package/dist/components/PaymentHistory/PaymentHistory.mjs +3 -3
  107. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs +1 -1
  108. package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +5 -5
  109. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs +1 -1
  110. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +4 -4
  111. package/dist/components/SubscriptionsList/SubscriptionsList.cjs +1 -1
  112. package/dist/components/SubscriptionsList/SubscriptionsList.mjs +5 -5
  113. package/dist/components/WalletBalances/WalletBalances.cjs +1 -1
  114. package/dist/components/WalletBalances/WalletBalances.mjs +3 -3
  115. package/dist/{customElements-Com2NiGU.mjs → customElements-CSE7dwUr.mjs} +312 -282
  116. package/dist/{customElements-Bt8PbjIn.js → customElements-Vox1PB6G.js} +42 -18
  117. package/dist/{customer-CKgMJEgv.mjs → customer-5krPxZ8i.mjs} +1 -1
  118. package/dist/{customer-Q4JGfVfq.js → customer-Dsq-Moea.js} +1 -1
  119. package/dist/{de-DE-DqLD4IX2.js → de-DE-BSlbAnPE.js} +1 -1
  120. package/dist/{de-DE-Ds_yJLS3.js → de-DE-C3DzP1nj.js} +1 -1
  121. package/dist/{de-DE-DBO5f-Eu.mjs → de-DE-DXsG-vXA.mjs} +13 -8
  122. package/dist/{de-DE-CVCmzlNH.mjs → de-DE-DsFtpLsx.mjs} +2 -0
  123. package/dist/{en-US-CvFmmI_O.js → en-US-9xdcz3T5.js} +1 -1
  124. package/dist/{en-US-3UmnS23B.mjs → en-US-C939IZ5i.mjs} +13 -8
  125. package/dist/{en-US-DVR9O7b_.mjs → en-US-DvkvbV0p.mjs} +2 -0
  126. package/dist/{en-US-C51ILrVv.js → en-US-X_pSFsNm.js} +1 -1
  127. package/dist/index.cjs +1 -1
  128. package/dist/index.mjs +1 -1
  129. package/dist/{invoices-CV9iAUHf.mjs → invoices-DRgfpkJ6.mjs} +8 -5
  130. package/dist/invoices-xOV2YaEV.js +1 -0
  131. package/dist/{it-IT-CxBRisRm.mjs → it-IT-BxpwB3oJ.mjs} +8 -3
  132. package/dist/it-IT-DT3rfjOY.js +1 -0
  133. package/dist/{it-IT-CDMnnFKZ.mjs → it-IT-TE7oqvXa.mjs} +2 -0
  134. package/dist/{it-IT-Dxw59eR_.js → it-IT-YBtHAao1.js} +1 -1
  135. package/dist/{nl-NL-Btbfd9p2.js → nl-NL-C8wnyKju.js} +1 -1
  136. package/dist/nl-NL-DfkhOJKc.js +1 -0
  137. package/dist/{nl-NL-o3UvtSNg.mjs → nl-NL-Di3-JArV.mjs} +2 -0
  138. package/dist/{nl-NL-BWGkVweu.mjs → nl-NL-na2I4aiP.mjs} +8 -3
  139. package/dist/{paymentMethods-ChWAwDSF.js → paymentMethods-CRDIw9lz.js} +1 -1
  140. package/dist/{paymentMethods-BuwoJ1y9.mjs → paymentMethods-PmkHYomw.mjs} +1 -1
  141. package/dist/{payments-C_cMXQzE.mjs → payments-Dvqh6CGW.mjs} +1 -1
  142. package/dist/{payments-DGckugN0.js → payments-jAgXhdp_.js} +1 -1
  143. package/dist/pricingItemConfigs.es-D4aYkYcf.js +1 -0
  144. package/dist/{pricingItemConfigs.es-DMf1e6y7.mjs → pricingItemConfigs.es-ORxsk_YS.mjs} +23 -22
  145. package/dist/pricingPlanSchedule-BM8vsKkV.js +1 -0
  146. package/dist/pricingPlanSchedule-BPrS2WRd.mjs +132 -0
  147. package/dist/screens/Checkout/Checkout.cjs +1 -1
  148. package/dist/screens/Checkout/Checkout.mjs +2 -2
  149. package/dist/screens/CustomerOverview/CustomerOverview.cjs +1 -1
  150. package/dist/screens/CustomerOverview/CustomerOverview.mjs +11 -11
  151. package/dist/screens/PayInvoice/PayInvoice.cjs +1 -1
  152. package/dist/screens/PayInvoice/PayInvoice.mjs +13 -13
  153. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs +1 -1
  154. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +9 -9
  155. package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs +1 -1
  156. package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +20 -20
  157. package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs +1 -1
  158. package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +19 -19
  159. package/dist/{subscription-CvfAEJeP.mjs → subscription-CrVOr5MF.mjs} +1 -1
  160. package/dist/{subscription-9GORG-Gt.js → subscription-ZA62t4E9.js} +1 -1
  161. package/dist/{subscriptions-B5VqRayX.mjs → subscriptions-XDyI2Cqm.mjs} +1 -1
  162. package/dist/{subscriptions-X0Ciw8z3.js → subscriptions-fJcj88X9.js} +1 -1
  163. package/dist/types/components/customer/CheckoutForm/CheckoutForm.types.d.ts +1 -0
  164. package/dist/types/components/subscriptions/PlanCustomizationForm/PlanCustomizationEditor.types.d.ts +1 -0
  165. package/dist/types/components/subscriptions/PlanCustomizationForm/UnitsEditor.types.d.ts +6 -0
  166. package/dist/types/components/subscriptions/PlanCustomizationForm/UnitsEditorItem.types.d.ts +6 -0
  167. package/dist/types/composables/useInvoicePreview.types.d.ts +1 -0
  168. package/dist/types/public/components/Invoice/Invoice.types.d.ts +1 -1
  169. package/dist/types/public/components/InvoiceHeader/InvoiceHeader.types.d.ts +1 -1
  170. package/dist/types/public/screens/PayInvoice/PayInvoice.types.d.ts +1 -1
  171. package/dist/{useActionDispatchProvider-e2lQXTid.mjs → useActionDispatchProvider-B8-oycQk.mjs} +1 -1
  172. package/dist/{useActionDispatchProvider-B54GYEY7.js → useActionDispatchProvider-CNAuaHdm.js} +1 -1
  173. package/dist/{useCustomer-CC9zxV6c.mjs → useCustomer-CP8eWUZV.mjs} +1 -1
  174. package/dist/{useCustomer-BJwJ9BkJ.js → useCustomer-DSx-wN-6.js} +1 -1
  175. package/dist/useCustomerFormLabels-DW6jnDYH.mjs +968 -0
  176. package/dist/useCustomerFormLabels-TVTgy0MT.js +1 -0
  177. package/dist/{useExperimentalFeature-B0IFn3Uw.mjs → useExperimentalFeature-BvE_EOX-.mjs} +1 -1
  178. package/dist/{useExperimentalFeature-8Mzpj5wc.js → useExperimentalFeature-CC-DrIcL.js} +1 -1
  179. package/dist/{useInvoiceData-Bblwdl0f.js → useInvoiceData-CRRPdXc6.js} +1 -1
  180. package/dist/{useInvoiceData-6mHUZC9a.mjs → useInvoiceData-D8ds05CX.mjs} +2 -2
  181. package/dist/{useInvoicesList-_U1-tn9_.js → useInvoicesList-DIfQcvER.js} +1 -1
  182. package/dist/{useInvoicesList-B5H5JfvY.mjs → useInvoicesList-SJU5YWBQ.mjs} +7 -7
  183. package/dist/{useLoadInitialData-CezlvhBV.js → useLoadInitialData-DsabgMLZ.js} +1 -1
  184. package/dist/{useLoadInitialData-ux_wpNiR.mjs → useLoadInitialData-MUljS38K.mjs} +1 -1
  185. package/dist/{usePaymentMethodAvailability-DRwrBdto.js → usePaymentMethodAvailability-Bt7P9InI.js} +1 -1
  186. package/dist/{usePaymentMethodAvailability-CkR4TwoV.mjs → usePaymentMethodAvailability-D0NUanyF.mjs} +4 -4
  187. package/dist/{usePaymentMethodOptions-BfnLBZOo.mjs → usePaymentMethodOptions-B7JYkGsw.mjs} +1 -1
  188. package/dist/{usePaymentMethodOptions-B6GIM9q4.js → usePaymentMethodOptions-cT1o-BA1.js} +1 -1
  189. package/dist/{usePaymentMethods-C3QfLSrP.mjs → usePaymentMethods-CpzqXQUT.mjs} +1 -1
  190. package/dist/{usePaymentMethods-GFmQRp0X.js → usePaymentMethods-DNVw2eVg.js} +1 -1
  191. package/dist/{usePayments-SQF_V7oL.js → usePayments-D9Eo-uBk.js} +1 -1
  192. package/dist/{usePayments-BkwGyZT0.mjs → usePayments-Gx9kBvNB.mjs} +6 -6
  193. package/dist/{usePortal-DDG9b6FI.mjs → usePortal-3VCZwSUE.mjs} +1 -1
  194. package/dist/{usePortal-BdM7hDge.js → usePortal-DsebXdhx.js} +1 -1
  195. package/dist/{useSubscription-BJJYHYgr.mjs → useSubscription-DnL1wVh1.mjs} +1 -1
  196. package/dist/{useSubscription-Q4C2DPhw.js → useSubscription-K_gP9TeX.js} +1 -1
  197. package/dist/{useTimePeriod.es-pepm2TpV.js → useTimePeriod.es-CmltiTE-.js} +1 -1
  198. package/dist/{useTimePeriod.es-9tZvAhyb.mjs → useTimePeriod.es-DMtKzcoB.mjs} +1 -1
  199. package/dist/wallets.es-CNIMW5ay.js +1 -0
  200. package/dist/wallets.es-eH2C2ygn.mjs +102 -0
  201. package/package.json +1 -1
  202. package/dist/Checkout.entry.ce-BTVuGyNq.js +0 -1
  203. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-C_yKvYtG.js +0 -1
  204. package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-BXTInmf9.js +0 -1
  205. package/dist/InvoiceSummary.vue.es-B0MPR0oI.js +0 -1
  206. package/dist/PlanCustomizationEditor-CCOTD6Qu.mjs +0 -769
  207. package/dist/PlanCustomizationEditor-CiZnVCM6.js +0 -1
  208. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-BlX0W6lw.js +0 -1
  209. package/dist/invoices-CvpL4rv5.js +0 -1
  210. package/dist/it-IT-CFEfSpPH.js +0 -1
  211. package/dist/nl-NL-jtVgF3jx.js +0 -1
  212. package/dist/pricingItemConfigs.es-DlybwIh1.js +0 -1
  213. package/dist/pricingPlanSchedule-COfmWv_o.js +0 -1
  214. package/dist/pricingPlanSchedule-J1nb9pCu.mjs +0 -129
  215. package/dist/useCustomerFormLabels-72Pxw8X5.js +0 -1
  216. package/dist/useCustomerFormLabels-V2YuYMLU.mjs +0 -930
@@ -0,0 +1 @@
1
+ const e=require("vue"),T=require("./customElements-Vox1PB6G.js"),it=require("./useTimePeriod.es-CmltiTE-.js"),ee=require("./formatting.es-C72Nsrmh.js"),te=require("./Button.vue.es-M_jXZda4.js"),xt=require("./ErrorNotification.vue.es-Cd2UKPAz.js"),kt=require("./countryData.es-C4jHBzfo.js"),wt=require("./subscriptions-fJcj88X9.js"),de=require("./error-CmduqgVq.js"),at=require("./TrialChip.vue.es-BzNI94k0.js"),St=require("./useService-H7BjLg8P.js"),Tt=require("./invoices-xOV2YaEV.js"),le=require("./pricingPlanSchedule-BM8vsKkV.js"),ae=require("./index-DwueOtPi.js"),Ie=require("./useCustomerFormLabels-TVTgy0MT.js"),Lt=require("./useWatchDebounced-CAU1WI1P.js"),Bt=require("./usePaymentMethodOptions-cT1o-BA1.js"),he=require("./subscription-ZA62t4E9.js"),Le=require("./pricing-BVAld27Y.js"),pe=require("./url-BNKStNY9.js"),_e=require("./adyen-Druit6gz.js"),Vt=require("./usePortal-DsebXdhx.js"),Ot=require("./getCountryNameByCode.es-Xxc0nZsH.js"),Ze=require("./Expand.vue.es-BtM0EZEr.js"),re=require("./Input.vue.es-CTOrmrcB.js"),ie=require("./Section.vue.es-Btff-cLY.js"),zt=require("./IconButton.vue.es-BTAkuFsm.js"),jt=require("./customer-Dsq-Moea.js"),me=require("./EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CM_8Asmw.js"),we=require("./TooltipParagraph.vue.es-BaqCDjl8.js"),Rt=require("./PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DIJbzWMV.js"),Xe=require("./Chip.vue.es-G8doKsZb.js"),rt=require("./SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BfvX14E3.js"),Ut=require("./SubscriptionSummary.vue_vue_type_script_setup_true_lang-s5_uhyuB.js"),lt=require("./useViewport-hPRVDWCm.js"),se=require("./Skeleton.vue_vue_type_script_setup_true_lang-DypW8aNJ.js"),$t=require("./DividerText.vue.es-D-QxT2OD.js"),Ae=require("./adyenSdk-BP2XXzeJ.js"),Ft=require("./payments-jAgXhdp_.js"),Gt=require("./ContentWithAsideLayout-C6yMIVJF.js"),Yt=require("./cn.es-CvmLj7KH.js"),Kt=require("./component-B7ZDyqBp.js"),qt={AT:"Austria",BE:"Belgium",BG:"Bulgaria",CY:"Cyprus",CZ:"Czech Republic",DE:"Germany",DK:"Denmark",EE:"Estonia",ES:"Spain",FI:"Finland",FR:"France",GR:"Greece",HR:"Croatia",HU:"Hungary",IE:"Ireland",IT:"Italy",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",MT:"Malta",NL:"Netherlands",PL:"Poland",PT:"Portugal",RO:"Romania",SE:"Sweden",SI:"Slovenia",SK:"Slovakia"};function st(t){return Object.keys(qt).includes(t)}function We(t,n){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);n&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),o.push.apply(o,i)}return o}function Me(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?arguments[n]:{};n%2?We(Object(o),!0).forEach(function(i){Qt(t,i,o[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):We(Object(o)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(o,i))})}return t}function Qt(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}function Ce(t){return typeof t=="function"}function Te(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function Ee(t){return Ce(t.$validator)?Me({},t):{$validator:t}}function ct(t){return typeof t=="object"?t.$valid:t}function ut(t){return t.$validator||t}function Ht(t,n){if(!Te(t))throw new Error(`[@vuelidate/validators]: First parameter to "withParams" should be an object, provided ${typeof t}`);if(!Te(n)&&!Ce(n))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const o=Ee(n);return o.$params=Me(Me({},o.$params||{}),t),o}function Zt(t,n){if(!Ce(t)&&typeof e.unref(t)!="string")throw new Error(`[@vuelidate/validators]: First parameter to "withMessage" should be string or a function returning a string, provided ${typeof t}`);if(!Te(n)&&!Ce(n))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const o=Ee(n);return o.$message=t,o}function Xt(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const o=Ee(t);return Me(Me({},o),{},{$async:!0,$watchTargets:n})}function Wt(t){return{$validator(n){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return e.unref(n).reduce((r,s,g)=>{const d=Object.entries(s).reduce((N,f)=>{let[_,M]=f;const c=t[_]||{},A=Object.entries(c).reduce((y,E)=>{let[b,P]=E;const w=ut(P).call(this,M,s,g,...i),p=ct(w);if(y.$data[b]=w,y.$data.$invalid=!p||!!y.$data.$invalid,y.$data.$error=y.$data.$invalid,!p){let C=P.$message||"";const F=P.$params||{};typeof C=="function"&&(C=C({$pending:!1,$invalid:!p,$params:F,$model:M,$response:w})),y.$errors.push({$property:_,$message:C,$params:F,$response:w,$model:M,$pending:!1,$validator:b})}return{$valid:y.$valid&&p,$data:y.$data,$errors:y.$errors}},{$valid:!0,$data:{},$errors:[]});return N.$data[_]=A.$data,N.$errors[_]=A.$errors,{$valid:N.$valid&&A.$valid,$data:N.$data,$errors:N.$errors}},{$valid:!0,$data:{},$errors:{}});return{$valid:r.$valid&&d.$valid,$data:r.$data.concat(d.$data),$errors:r.$errors.concat(d.$errors)}},{$valid:!0,$data:[],$errors:[]})},$message:n=>{let{$response:o}=n;return o?o.$errors.map(i=>Object.values(i).map(a=>a.map(r=>r.$message)).reduce((a,r)=>a.concat(r),[])):[]}}}const dt=t=>{if(t=e.unref(t),Array.isArray(t))return!!t.length;if(t==null)return!1;if(t===!1)return!0;if(t instanceof Date)return!isNaN(t.getTime());if(typeof t=="object"){for(let n in t)return!0;return!1}return!!String(t).length},Jt=t=>(t=e.unref(t),Array.isArray(t)?t.length:typeof t=="object"?Object.keys(t).length:String(t).length);function ce(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return i=>(i=e.unref(i),!dt(i)||n.every(a=>(a.lastIndex=0,a.test(i))))}var en=Object.freeze({__proto__:null,forEach:Wt,len:Jt,normalizeValidatorObject:Ee,regex:ce,req:dt,unwrap:e.unref,unwrapNormalizedValidator:ut,unwrapValidatorResponse:ct,withAsync:Xt,withMessage:Zt,withParams:Ht});ce(/^[a-zA-Z]*$/);ce(/^[a-zA-Z0-9]*$/);ce(/^\d*(\.\d+)?$/);const tn=/^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i;ce(tn);const nn=/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i;ce(nn);ce(/(^[0-9]*$)|(^-[0-9]+$)/);ce(/^[-]?\d*(\.\d+)?$/);function Pe(t){return!!kt.countryData.find(n=>n.key===t)}const pt={AT:{regex:/^ATU\d{8}$/,prefix:"AT",example:"ATU12345678"},BE:{regex:/^BE0?\d{9}$/,prefix:"BE",example:"BE0123456789"},BG:{regex:/^BG\d{9,10}$/,prefix:"BG",example:"BG123456789"},HR:{regex:/^HR\d{11}$/,prefix:"HR",example:"HR12345678901"},CY:{regex:/^CY\d{8}[A-Z]$/,prefix:"CY",example:"CY12345678X"},CZ:{regex:/^CZ\d{8,10}$/,prefix:"CZ",example:"CZ12345678"},DE:{regex:/^DE\d{9}$/,prefix:"DE",example:"DE123456789"},DK:{regex:/^DK\d{8}$/,prefix:"DK",example:"DK12345678"},EE:{regex:/^EE\d{9}$/,prefix:"EE",example:"EE123456789"},GR:{regex:/^(EL|GR)\d{9}$/,prefix:"GR",example:"GR123456789"},ES:{regex:/^ES[A-Z0-9]\d{7}[A-Z0-9]$/,prefix:"ES",example:"ESX1234567X"},FI:{regex:/^FI\d{8}$/,prefix:"FI",example:"FI12345678"},FR:{regex:/^FR[0-9A-Z]{2}\d{9}$/,prefix:"FR",example:"FRXX123456789"},HU:{regex:/^HU\d{8}$/,prefix:"HU",example:"HU12345678"},IE:{regex:/^IE[0-9A-Z]{8,9}$/,prefix:"IE",example:"IE1234567A"},IS:{regex:/^IS\d{5}$/,prefix:"IS",example:"IS12345"},IT:{regex:/^IT\d{11}$/,prefix:"IT",example:"IT12345678901"},LT:{regex:/^LT(\d{9}|\d{12})$/,prefix:"LT",example:"LT123456789 or LT123456789012"},LU:{regex:/^LU\d{8}$/,prefix:"LU",example:"LU12345678"},LV:{regex:/^LV\d{11}$/,prefix:"LV",example:"LV12345678901"},ME:{regex:/^ME\d{9}$/,prefix:"ME",example:"ME123456789"},MT:{regex:/^MT\d{8}$/,prefix:"MT",example:"MT12345678"},NL:{regex:/^NL\d{9}B\d{2}$/,prefix:"NL",example:"NL123456789B01"},PL:{regex:/^PL\d{10}$/,prefix:"PL",example:"PL1234567890"},PT:{regex:/^PT\d{9}$/,prefix:"PT",example:"PT123456789"},RO:{regex:/^RO\d{2,10}$/,prefix:"RO",example:"RO1234567890"},RU:{regex:/^RU(\d{9}|\d{10}|\d{12})$/,prefix:"RU",example:"RU123456789 or RU1234567890 or RU123456789012"},SE:{regex:/^SE\d{10}01$/,prefix:"SE",example:"SE123456789001"},SI:{regex:/^SI\d{8}$/,prefix:"SI",example:"SI12345678"},SK:{regex:/^SK\d{10}$/,prefix:"SK",example:"SK1234567890"},CH:{regex:/^CHE\d{9}(MWST|TVA|IVA)?$/,prefix:"CHE",example:"CHE123456789MWST"},NO:{regex:/^NO\d{9}MVA$/,prefix:"NO",example:"NO123456789MVA"},GB:{regex:/^GB(\d{9}|\d{12}|GD\d{3}|HA\d{3})$/,prefix:"GB",example:"GB123456789"},XI:{regex:/^XI(\d{9}|\d{12})$/,prefix:"XI",example:"XI123456789"}},on=t=>!t||typeof t!="string"||t.trim()===""?!0:Object.values(pt).some(n=>n.regex.test(t)),an=({$model:t})=>{if(!t||typeof t!="string"||t.trim()==="")return"";const n=e.inject(T.I18N_INJECTION_KEY,null);if(!n)return"Invalid tax ID";const{formatMessage:o}=n,i=Object.values(pt).find(a=>t.toUpperCase().startsWith(a.prefix.toUpperCase()));return i?o({defaultMessage:"Invalid tax ID format. Example: {example}",id:"form_validation.tax_id.invalid_format",description:"Error message when tax ID format is invalid but prefix matches"},{example:i.example}):o({defaultMessage:"Invalid tax ID",id:"taxId.invalid",description:"Error message when tax ID is invalid"})},Be=en.withMessage(an,on),rn="preview",ln="NL",mt=t=>{var n,o;if("organization"in t)return(n=t.organization)==null?void 0:n.registered_address;if("individual"in t)return(o=t.individual)==null?void 0:o.residential_address},sn=t=>{const n=mt(t);return{...(n==null?void 0:n.line1)&&{line1:n.line1},...(n==null?void 0:n.line2)&&{line2:n.line2},...(n==null?void 0:n.city)&&{city:n.city},...(n==null?void 0:n.state)&&{state:n.state},country:(n==null?void 0:n.country)||ln,...(n==null?void 0:n.postal_code)&&{postal_code:n.postal_code}}},cn=t=>{var i,a;const n=sn(t),o=t.type??"INDIVIDUAL";if(o==="ORGANIZATION"){const r="organization"in t?t.organization:void 0,s=(a=(i=r==null?void 0:r.tax_ids)==null?void 0:i[0])==null?void 0:a.id;return{type:o,organization:{legal_name:(r==null?void 0:r.legal_name)||rn,registered_address:n,...s&&{tax_id:Be.$validator(s,{},{})?s:void 0}}}}return{type:o,individual:{residential_address:n}}},un={AD:"EUR",AE:"AED",AF:"AFN",AG:"XCD",AI:"XCD",AL:"ALL",AM:"AMD",AO:"AOA",AR:"ARS",AS:"USD",AT:"EUR",AU:"AUD",AW:"AWG",AX:"EUR",AZ:"AZN",BA:"BAM",BB:"BBD",BD:"BDT",BE:"EUR",BF:"XOF",BG:"BGN",BH:"BHD",BI:"BIF",BJ:"XOF",BL:"EUR",BM:"BMD",BN:"BND",BO:"BOB",BQ:"USD",BR:"BRL",BS:"BSD",BT:"BTN",BV:"NOK",BW:"BWP",BY:"BYN",BZ:"BZD",CA:"CAD",CC:"AUD",CD:"CDF",CF:"XAF",CG:"XAF",CH:"CHF",CI:"XOF",CK:"NZD",CL:"CLP",CM:"XAF",CN:"CNY",CO:"COP",CR:"CRC",CU:"CUP",CV:"CVE",CW:"ANG",CX:"AUD",CY:"EUR",CZ:"CZK",DE:"EUR",DJ:"DJF",DK:"DKK",DM:"XCD",DO:"DOP",DZ:"DZD",EC:"USD",EE:"EUR",EG:"EGP",EH:"MAD",ER:"ERN",ES:"EUR",ET:"ETB",FI:"EUR",FJ:"FJD",FK:"FKP",FM:"USD",FO:"DKK",FR:"EUR",GA:"XAF",GB:"GBP",GD:"XCD",GE:"GEL",GF:"EUR",GG:"GBP",GH:"GHS",GI:"GIP",GL:"DKK",GM:"GMD",GN:"GNF",GP:"EUR",GQ:"XAF",GR:"EUR",GS:"GBP",GT:"GTQ",GU:"USD",GW:"XOF",GY:"GYD",HK:"HKD",HM:"AUD",HN:"HNL",HR:"EUR",HT:"HTG",HU:"HUF",ID:"IDR",IE:"EUR",IL:"ILS",IM:"GBP",IN:"INR",IO:"USD",IQ:"IQD",IR:"IRR",IS:"ISK",IT:"EUR",JE:"GBP",JM:"JMD",JO:"JOD",JP:"JPY",KE:"KES",KG:"KGS",KH:"KHR",KI:"AUD",KM:"KMF",KN:"XCD",KP:"KPW",KR:"KRW",KW:"KWD",KY:"KYD",KZ:"KZT",LA:"LAK",LB:"LBP",LC:"XCD",LI:"CHF",LK:"LKR",LR:"LRD",LS:"LSL",LT:"EUR",LU:"EUR",LV:"EUR",LY:"LYD",MA:"MAD",MC:"EUR",MD:"MDL",ME:"EUR",MF:"EUR",MG:"MGA",MH:"USD",MK:"MKD",ML:"XOF",MM:"MMK",MN:"MNT",MO:"MOP",MP:"USD",MQ:"EUR",MR:"MRU",MS:"XCD",MT:"EUR",MU:"MUR",MV:"MVR",MW:"MWK",MX:"MXN",MY:"MYR",MZ:"MZN",NA:"NAD",NC:"XPF",NE:"XOF",NF:"AUD",NG:"NGN",NI:"NIO",NL:"EUR",NO:"NOK",NP:"NPR",NR:"AUD",NU:"NZD",NZ:"NZD",OM:"OMR",PA:"PAB",PE:"PEN",PF:"XPF",PG:"PGK",PH:"PHP",PK:"PKR",PL:"PLN",PM:"EUR",PN:"NZD",PR:"USD",PS:"ILS",PT:"EUR",PW:"USD",PY:"PYG",QA:"QAR",RE:"EUR",RO:"RON",RS:"RSD",RU:"RUB",RW:"RWF",SA:"SAR",SB:"SBD",SC:"SCR",SD:"SDG",SE:"SEK",SG:"SGD",SH:"SHP",SI:"EUR",SJ:"NOK",SK:"EUR",SL:"SLE",SM:"EUR",SN:"XOF",SO:"SOS",SR:"SRD",SS:"SSP",ST:"STN",SV:"USD",SX:"ANG",SY:"SYP",SZ:"SZL",TC:"USD",TD:"XAF",TF:"EUR",TG:"XOF",TH:"THB",TJ:"TJS",TK:"NZD",TL:"USD",TM:"TMT",TN:"TND",TO:"TOP",TR:"TRY",TT:"TTD",TV:"AUD",TW:"TWD",TZ:"TZS",UA:"UAH",UG:"UGX",US:"USD",UY:"UYU",UZ:"UZS",VA:"EUR",VC:"XCD",VE:"VES",VG:"USD",VI:"USD",VN:"VND",VU:"VUV",WF:"XPF",WS:"WST",YE:"YER",YT:"EUR",ZA:"ZAR",ZM:"ZMW",ZW:"ZWL"},dn=t=>{if(t)return un[t]},gt=({country:t,pricingCurrencySettings:n,fallbackCurrency:o})=>{const i=dn(t),a=(n==null?void 0:n.pricing_currencies)??[];return i&&a.includes(i)?i:(n==null?void 0:n.default_pricing_currency)??o??i},pn=()=>{const{getInvoicePreview:t}=Tt.createInvoicesService(),n=T.useLogger(),o=e.ref(),i=e.ref(),a=e.ref(),r=e.ref({}),s=e.ref(de.ApiStatus.Initial),g=e.ref({}),d=e.ref(),N=_=>`${_.type}:${_.value}`;return{loadInvoicePreview:async({subscription:_,subscriptionStartAt:M,customer:c={},seatsValues:A,unitsValues:y,enabledPricingIds:E,promotionCode:b})=>{var m,h,D,S,j,O;const P=cn(c);s.value=de.ApiStatus.Loading;const L=le.getFirstPricingPlanScheduleOfType({pricingPlanScheduleInfos:_.pricing_plan_schedule_infos,type:"DEFAULT"}),w=(m=L==null?void 0:L.pricing_plan_version)==null?void 0:m.pricing_currency_settings,p=(((h=w==null?void 0:w.pricing_currencies)==null?void 0:h.length)??0)>1,C=((S=(D=L==null?void 0:L.pricing_plan_version)==null?void 0:D.billing_period_settings)==null?void 0:S.billing_periods)??[],F=C.length>1,Y=C.length>0?C.map(({period:V})=>V):_.billing_period?[_.billing_period]:[],u=gt({country:(j=mt(c))==null?void 0:j.country,pricingCurrencySettings:w,fallbackCurrency:_.billing_currency});if(!Y.length){n.warn("INVOICE_PREVIEW_SKIPPED","No billing period to preview an invoice for",{subscriptionId:_.id}),s.value=de.ApiStatus.Done;return}const v=_.billing_period?N(_.billing_period):N(Y[0]),l=Y.map(async V=>{var K;const H=N(V),R=le.getScheduleCustomizations({enabledPricings:E==null?void 0:E.map($=>({pricing_id:$})),seatsValues:A,unitsValues:y,pricingPlanScheduleInfos:_.pricing_plan_schedule_infos,pricingCurrency:p?u:void 0,billingPeriod:F?V:void 0})??[];if(b){const $=(K=_.pricing_plan_schedule_infos.find(({pricing_plan_schedule:G})=>G.type==="DEFAULT"))==null?void 0:K.id;if($){const G=R.find(({pricing_plan_schedule_id:q})=>q===$);G?G.promotion_codes=[b]:R.push({pricing_plan_schedule_id:$,promotion_codes:[b]})}}const Z={pricingPlanSubscriptionId:_.id,startAt:M,customizations:R,customer:P},Q=g.value[H];if(Q&&St.isEqual(Z,Q))return{periodKey:H,response:void 0};g.value={...g.value,[H]:Z};const B=await t(Z);return{periodKey:H,response:B}});try{const V={...r.value},H=await Promise.all(l),R=_.pricing_plan_schedule_infos.find(({pricing_plan_schedule:Q})=>Q.type==="TRIAL"),Z=(O=_.pricing_plan_schedule_infos.find(({pricing_plan_schedule:Q})=>Q.type==="DEFAULT"))==null?void 0:O.id;H.forEach(({periodKey:Q,response:B})=>{var G;if(!B)return;d.value=(G=B.invoice_infos.at(-1))==null?void 0:G.pricing_plan_schedule_id,R&&(i.value=B.first_invoice,R.start_at&&R.end_at&&(o.value=at.convertDateRangeToTimePeriod(new Date(R.start_at),new Date(R.end_at))));const K=B.invoice_infos.find(({pricing_plan_schedule_id:q})=>q===Z),$=K==null?void 0:K.invoices[0];$&&(V[Q]=$)}),r.value=V,a.value=V[v]}catch(V){throw s.value=de.ApiStatus.Failed,n.error("INVOICE_PREVIEW_FAILED","Failed to load invoice preview",{},V),V}finally{s.value=de.ApiStatus.Done}},invoicePreview:a,invoicePreviewByBillingPeriod:r,trialInvoicePreview:i,trialPeriod:o,lastPreviewScheduleId:d,isPending:e.computed(()=>s.value===de.ApiStatus.Loading)}},Je=["email","country"],ft="GENERIC_TAX_ID",et={US:["addressLine1","postalCode"],CA:["state"]},mn=t=>!t||!et[t]?Je:[...et[t],...Je],tt=t=>{const n={...t.addressLine1&&{line1:t.addressLine1},...t.addressLine2&&{line2:t.addressLine2},...t.city&&{city:t.city},...t.state&&{state:t.state},...t.postalCode&&{postal_code:t.postalCode},country:t.country??""};return t.type==="ORGANIZATION"?{type:"ORGANIZATION",organization:{legal_name:t.companyLegalName??"",registered_address:n,...t.companyVatNumber&&{tax_ids:[{id:t.companyVatNumber,type:ft}]}}}:{type:"INDIVIDUAL",individual:{residential_address:n}}};function gn(){return{getGeoLocation(){return fetch("https://api.country.is/").then(t=>t.json())}}}function fn({initialState:t,onRequiredFieldChange:n}){const o=e.ref(Ne(t)),i=e.ref(Ne(t)),a=f=>{const _=Ne({...e.toRaw(o.value),...f});o.value=_,i.value=structuredClone(_)},r=e.computed(()=>mn(o.value.country)),s=f=>r.value.includes(f),g=ae.useValidation({email:{required:ae.required,email:ae.email},country:{required:ae.required},state:{required:ae.requiredIf(()=>s("state"))},addressLine1:{required:ae.requiredIf(()=>s("addressLine1"))},postalCode:{required:ae.requiredIf(()=>s("postalCode"))},companyLegalName:ae.requiredIf(o.value.type==="ORGANIZATION"),companyVatNumber:{taxId:Be}},o),d=f=>{f||gn().getGeoLocation().then(({country:_})=>{o.value.country=_})},N=(f,_)=>{const M=Ie.objectDiff({from:_,to:f}),c=Object.keys(M).find(yn);if(c){if(["type","companyVatNumber"].includes(c)){n(f);return}if(c==="seatsValues"){n(f);return}if(c==="unitsValues"){n(f);return}if(c==="enabledPricingIds"){n(f);return}if(c!=="email"&&s(c)){n(f);return}}};return e.onMounted(async()=>{await d(t==null?void 0:t.country)}),Lt.useWatchDebounced(()=>JSON.parse(JSON.stringify(o.value)),N,{debounce:200}),{form:o,validation:g,getIsFieldRequired:s,updateInitialState:a,initialState:i}}const Ne=(t={})=>({email:void 0,country:void 0,type:"INDIVIDUAL",companyLegalName:void 0,firstName:void 0,infix:void 0,lastName:void 0,addressLine1:void 0,addressLine2:void 0,postalCode:void 0,city:void 0,state:void 0,companyVatNumber:void 0,seatsValues:void 0,unitsValues:void 0,enabledPricingIds:void 0,...t});function yn(t){return t in Ne()}function vn(t,n=void 0){const o=n??[],i=he.getPricingGroupsFromExtendedPricingPlanSubscription(t);for(const a of i)if(["EXACTLY_ONE","AT_LEAST_ONE"].includes(a.selection_constraint)){const r=a.pricings.map(s=>s.id);if(n!=null&&n.some(s=>r.includes(s)))continue;o.push(a.pricings[0].id)}return o}function _n(t){return he.getPricingGroupsFromExtendedPricingPlanSubscription(t).some(o=>o.selection_constraint==="EXACTLY_ONE"||o.selection_constraint==="AT_LEAST_ONE")}function hn(t){const n=Le.getAllPricingsFromScheduleInfos(t.pricing_plan_schedule_infos),o=he.getPricingGroupsFromExtendedPricingPlanSubscription(t);return n.some(i=>i.product_type==="ADDON")||o.some(i=>i.object_type==="ADDON")}const nt=t=>(t??[]).flatMap(n=>n.configs??[]),yt=t=>[...t.configs??[],...nt(t.billing_period_configs),...(t.pricing_currency_configs??[]).flatMap(n=>[...n.configs??[],...nt(n.billing_period_configs)])];function Mn({pricings:t,pricingItemConfigId:n}){var r,s;const o=t.flatMap(g=>g.items??[]).find(g=>{var d;return(d=g.configs)==null?void 0:d.some(N=>N.id===n)}),i=(r=o==null?void 0:o.configs)==null?void 0:r.find(g=>g.id===n),a=(s=o==null?void 0:o.product_items)==null?void 0:s[0];return{config:i,productItem:a}}const vt="1";function bn(t){const n=Le.getPricingsFromScheduleInfo(t).flatMap(o=>o.items??[]).flatMap(yt);return new Map(n.flatMap(o=>{var i;return(i=o.default_seats_value)!=null&&i.number?[[o.id,o.default_seats_value.number]]:[]}))}function In(t){var i;const n=(i=t==null?void 0:t.pricing_plan_schedule)==null?void 0:i.seats_values;if(!t||!(n!=null&&n.length))return;const o=t.pricing_plan_version?bn(t):new Map;return n.map(({pricing_item_config_id:a,number:r})=>({pricing_item_config_id:a,number:r||o.get(a)||vt}))}const _t="1";function Nn(t){const n=Le.getPricingsFromScheduleInfo(t).flatMap(o=>o.items??[]).flatMap(yt);return new Map(n.flatMap(o=>{var i;return(i=o.default_units)!=null&&i.number?[[o.id,o.default_units.number]]:[]}))}function Cn(t){var i;const n=(i=t==null?void 0:t.pricing_plan_schedule)==null?void 0:i.units;if(!t||!(n!=null&&n.length))return;const o=t.pricing_plan_version?Nn(t):new Map;return n.map(({pricing_item_config_id:a,number:r})=>({pricing_item_config_id:a,number:r||o.get(a)||_t}))}const Se="solvimon_checkout_redirect_state";function An({initialCountry:t,initialEmail:n,subscriptionId:o,enabledPricingIds:i}){const a=T.useLogger(),r=(()=>{if(t){if(Pe(t))return t;a.error("INVALID_COUNTRY_CODE",`invalid country code provided: "${t}"`)}})(),s=(()=>{if(n){if(/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n))return n;a.error("INVALID_EMAIL",`invalid email provided: "${n}"`)}})(),g=e.ref(!1),d=e.ref(),{getSubscription:N}=wt.createSubscriptionsService(),f=pn(),_=e.computed(()=>d.value&&p.form.value.country&&Y.value),{paymentMethodOptions:M,get:c,isPending:A,error:y}=Bt.usePaymentMethodOptions(),E=async(v,l)=>{try{await c({subscriptionId:d.value.id,country:v,amount:l})}catch{a.error("PAYMENT_METHOD_OPTIONS_LOAD_FAILED","Failed to load the payment methods the checkout can offer",{},y.value)}},b=e.computed(()=>y.value!==null),P=()=>{const{country:v}=p.form.value;!d.value||!v||!Y.value||E(v,Y.value)},L=()=>{const v=p.form.value;return f.loadInvoicePreview({subscription:d.value,customer:tt(v),seatsValues:v.seatsValues,unitsValues:v.unitsValues,enabledPricingIds:v.enabledPricingIds??i,promotionCode:v.promotionCode})},w=async v=>{const l=v.promotionCode??p.form.value.promotionCode,m=v.enabledPricingIds??p.form.value.enabledPricingIds,h={...p.form.value,...v};return await f.loadInvoicePreview({subscription:d.value,customer:tt(h),seatsValues:h.seatsValues,unitsValues:h.unitsValues,enabledPricingIds:m,promotionCode:l}),{trialInvoicePreview:f.trialInvoicePreview.value,invoicePreview:f.invoicePreview.value}},p=fn({initialState:{country:r,email:s},onRequiredFieldChange:()=>{d.value&&L().catch(()=>{})}}),C=async()=>{var S,j,O,V;const v=await N({id:o,expanded:!0}),l=le.getFirstPricingPlanScheduleOfType({pricingPlanScheduleInfos:v.pricing_plan_schedule_infos,type:"DEFAULT"}),m=(V=(O=(j=(S=l==null?void 0:l.pricing_plan_version)==null?void 0:S.billing_period_settings)==null?void 0:j.billing_periods)==null?void 0:O[0])==null?void 0:V.period;d.value={...v,billing_period:m??v.billing_period};const h=In(l),D=Cn(l);p.updateInitialState({...p.form.value,enabledPricingIds:vn(v,i),...h?{seatsValues:h}:{},...D?{unitsValues:D}:{}})},F=e.computed(()=>{var R,Z,Q,B,K,$,G,q,W;const v=p.form.value.firstName||p.form.value.infix||p.form.value.lastName?{...p.form.value.firstName?{first_name:p.form.value.firstName}:{},...p.form.value.infix?{infix:p.form.value.infix}:{},...p.form.value.lastName?{last_name:p.form.value.lastName}:{}}:{},l={...p.form.value.addressLine1&&{line1:p.form.value.addressLine1},...p.form.value.addressLine2&&{line2:p.form.value.addressLine2},...p.form.value.city&&{city:p.form.value.city},...p.form.value.postalCode&&{postal_code:p.form.value.postalCode},...p.form.value.state&&{state:p.form.value.state},country:p.form.value.country??""},m=le.getFirstPricingPlanScheduleOfType({pricingPlanScheduleInfos:((R=d.value)==null?void 0:R.pricing_plan_schedule_infos)??[],type:"DEFAULT"}),h=(Z=m==null?void 0:m.pricing_plan_version)==null?void 0:Z.pricing_currency_settings,D=(((Q=h==null?void 0:h.pricing_currencies)==null?void 0:Q.length)??0)>1,j=(((K=(B=m==null?void 0:m.pricing_plan_version)==null?void 0:B.billing_period_settings)==null?void 0:K.billing_periods)??[]).length>1,O=le.getScheduleCustomizations({enabledPricings:($=p.form.value.enabledPricingIds)==null?void 0:$.map(J=>({pricing_id:J})),seatsValues:p.form.value.seatsValues,unitsValues:p.form.value.unitsValues,pricingPlanScheduleInfos:((G=d.value)==null?void 0:G.pricing_plan_schedule_infos)??[],pricingCurrency:D?(q=d.value)==null?void 0:q.billing_currency:void 0,billingPeriod:j?(W=d.value)==null?void 0:W.billing_period:void 0}),V=p.form.value.promotionCode,H=V&&d.value?(()=>{var fe,be,ye;const J=O?[...O]:[],ne=((fe=J[0])==null?void 0:fe.pricing_plan_schedule_id)??((ye=le.getFirstPricingPlanScheduleOfType({pricingPlanScheduleInfos:((be=d.value)==null?void 0:be.pricing_plan_schedule_infos)??[],type:"DEFAULT"}))==null?void 0:ye.id);if(!ne)return O;const ge=J.find(({pricing_plan_schedule_id:X})=>X===ne);if(ge)ge.promotion_codes=[V];else{const X=O==null?void 0:O[0];J.push({pricing_plan_schedule_id:ne,...(X==null?void 0:X.enabled_pricings)&&{enabled_pricings:X.enabled_pricings},...(X==null?void 0:X.seats_values)&&{seats_values:X.seats_values},...(X==null?void 0:X.units)&&{units:X.units},promotion_codes:[V]})}return J})():O;return{type:"INIT_PRICING_PLAN_SUBSCRIPTION",init_pricing_plan_subscription:{template_pricing_plan_subscription_id:o,...H&&{pricing_plan_schedule_customizations:H},customer_details:{email:p.form.value.email??"",type:p.form.value.type,...p.form.value.type==="INDIVIDUAL"?{individual:{residential_address:l,...v?{name:v}:{}}}:{organization:{registered_address:l,legal_name:p.form.value.companyLegalName??"",...p.form.value.companyVatNumber&&Be.$validator(p.form.value.companyVatNumber,{},{})?{tax_ids:[{id:p.form.value.companyVatNumber,type:ft}]}:{}}}}}}}),Y=e.computed(()=>{var v,l;return((v=f.trialInvoicePreview.value)==null?void 0:v.invoice_amount_including_tax)??((l=f.invoicePreview.value)==null?void 0:l.invoice_amount_including_tax)});e.watch([()=>p.form.value.country,Y],([v,l])=>{!d.value||!v||!l||E(v,l)});function u(){sessionStorage.setItem(Se,JSON.stringify(p.form.value))}return e.onMounted(async()=>{const v=pe.getQueryParam("redirect_status"),l=!!pe.getQueryParam(_e.PAYMENT_ACCEPTOR_ID_QUERY_STRING),m=!!pe.getQueryParam("payment_intent_client_secret")||!!pe.getQueryParam("setup_intent_client_secret");v==="succeeded"&&l&&m&&(g.value=!0);const D=sessionStorage.getItem(Se);let S=null;if(D)try{S=JSON.parse(D)}catch{}S&&p.updateInitialState(S);try{await C()}catch(j){throw a.error("SUBSCRIPTION_LOAD_FAILED","Failed to load the subscription the checkout prices",{},j),j}try{await L()}catch{}S&&(p.updateInitialState(S),sessionStorage.removeItem(Se))}),e.watch(_,v=>{v&&P()},{once:!0}),{validatedEmail:s,validatedCountry:r,invoicePreview:f.invoicePreview,invoicePreviewByBillingPeriod:f.invoicePreviewByBillingPeriod,trialInvoicePreview:f.trialInvoicePreview,trialPeriod:f.trialPeriod,loadInvoicePreview:L,updateInvoicePreviewOnBillingInformationChange:w,lastPreviewScheduleId:f.lastPreviewScheduleId,paymentMethodOptions:M,hasPaymentMethodOptionsError:b,retryPaymentMethodOptions:P,isPaymentMethodsPending:A,isInvoicePreviewPending:f.isPending,subscription:d,checkoutForm:p,authorizationContext:F,isPaid:g,amount:Y,saveFormStateForRedirect:u}}function En({checkoutForm:t,updateInvoicePreviewOnBillingInformationChange:n,formatErrorMessage:o,onInvalidPromotionCode:i,onApplyError:a}){const r=T.useLogger(),s=e.ref(!1),g=e.ref(null),d=(M,c)=>{g.value=o?o({action:M,error:c}):M==="apply"?"Promotion code could not be applied. Please try again.":"Promotion code could not be removed. Please try again."},N=M=>Pn(M)&&M.field==="promotion_codes",f=async M=>{const c=M==null?void 0:M.trim();if(c){g.value=null,t.form.value.promotionCode=c,s.value=!0;try{await n({promotionCode:c})}catch(A){r.capture(A,{code:"PROMOTION_CODE_APPLY_FAILED",message:"Failed to apply promotion code"}),d("apply",A),a==null||a(),N(A)&&(i==null||i()),await _({suppressError:!0,preserveErrorMessage:!0})}finally{s.value=!1}}},_=async({suppressError:M=!1,preserveErrorMessage:c=!1}={})=>{c||(g.value=null),delete t.form.value.promotionCode,s.value=!0;try{await n({})}catch(A){r.capture(A,{code:"PROMOTION_CODE_REMOVE_FAILED",message:"Failed to remove promotion code"}),M||d("remove",A)}finally{s.value=!1}};return{applyPromotionCode:f,removePromotionCode:_,isPromotionCodePending:s,promotionCodeErrorMessage:g}}function Pn(t){return typeof t=="object"&&t!==null&&"field"in t}function Dn({subscription:t,promotionCode:n,appliedPromotionCode:o,applyPromotionCode:i}){e.watch(t,a=>{a&&n&&(o.value=n,i(n))},{once:!0})}const xn={class:"flex items-center gap-2"},kn=e.defineComponent({__name:"TaxIDCheckNotice",props:{taxIdValidationResult:{type:Object}},setup(t){const n=t,{formatMessage:o}=T.useIntl(),i=e.computed(()=>n.taxIdValidationResult.valid==="VALID"),a=e.computed(()=>i.value?o({defaultMessage:"VAT number is valid.",id:"tax_check.valid_vat_number",description:"The message shown when the VAT number is valid"}):o({defaultMessage:"VAT number is invalid.",id:"tax_check.invalid_vat_number",description:"The message shown when the VAT number is invalid"}));return(r,s)=>(e.openBlock(),e.createBlock(e.unref(zt._sfc_main),{type:i.value?"success":"danger",icon:!1},{default:e.withCtx(()=>[e.createElementVNode("div",xn,[e.createVNode(e.unref(T._sfc_main),{variant:"body-xs"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value),1)]),_:1})])]),_:1},8,["type"]))}});function wn(t){const{checkTaxID:n}=jt.createCustomerService(),o=e.ref(void 0),i=e.computed(()=>{var _;return((_=t.value.companyVatNumber)==null?void 0:_.trim())??""}),a=e.computed(()=>t.value.companyLegalName??""),r=e.computed(()=>t.value.country),s=e.ref(!1),g=e.computed(()=>st(r.value??"")),d=e.computed(()=>!!(i.value&&a.value&&r.value)),N=e.computed(()=>g.value&&i.value);async function f(){var _;if(!(!d.value||!g.value||!r.value)){s.value=!0;try{const M=await n({type:"ORGANIZATION",organization:{legal_name:a.value,tax_ids:[{id:i.value,type:"GENERIC_TAX_ID"}],registered_address:{country:r.value}}});(_=M==null?void 0:M.data)!=null&&_.length?o.value=M.data[0]:o.value=void 0}finally{s.value=!1}}}return{runTaxIDCheck:f,taxIdValidationData:o,isTaxIDCheckPending:s,isTaxIDCheckEnabled:d,showViesCheckNotice:N,isSelectedCountryEU:g}}const Sn={class:"grid grid-cols-1 gap-1"},Tn={class:"grid grid-cols-1 gap-2"},Ln={key:0},Bn={class:"mt-2 flex flex-col gap-3"},Vn={class:"grid grid-cols-3 gap-2"},On={key:0},zn={class:"mt-4 grid grid-cols-1 gap-3"},jn="checkout-form",Rn=e.defineComponent({__name:"CheckoutForm",props:e.mergeModels({validation:{type:null},initialState:{type:Object},readOnlyEmail:{type:String},showCustomerInfoOnTop:{type:Boolean},isBillingInformationMandatory:{type:Boolean},getIsFieldRequired:{type:Function},readOnly:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:e.mergeModels(["submit"],["update:modelValue"]),setup(t){const n=t,o=e.ref(!1),i=e.useModel(t,"modelValue"),a=e.computed({get:()=>i.value.type==="ORGANIZATION",set:E=>{i.value.type=E?"ORGANIZATION":"INDIVIDUAL"}}),r=e.computed(()=>i.value.type==="ORGANIZATION"),s=e.computed({get:()=>i.value.country,set:E=>{i.value.country=E&&Pe(E)?E:void 0}}),g=e.computed(()=>i.value.country!=="US"),{isTaxIDCheckEnabled:d,isTaxIDCheckPending:N,taxIdValidationData:f,runTaxIDCheck:_}=wn(i),{$t:M}=T.useIntl(),c=Ie.useCustomerFormLabels(),A=E=>n.getIsFieldRequired(E)?"":" "+M({defaultMessage:"(optional)",id:"checkout.optional_suffix.label",description:"The suffix for optional fields in the checkout form"}),y=e.computed(()=>i.value.country?Ot.getCountryNameByCode(i.value.country):void 0);return(E,b)=>(e.openBlock(),e.createElementBlock("form",{id:jn,onSubmit:b[12]||(b[12]=e.withModifiers(P=>E.$emit("submit",i.value),["prevent"]))},[e.createElementVNode("div",Sn,[e.createVNode(e.unref(ie._sfc_main),{title:e.unref(c).contactInformationTitle},{default:e.withCtx(()=>[e.createElementVNode("div",Tn,[t.readOnly?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(e.unref(T._sfc_main),{variant:"body",tag:"span",weight:"semibold","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.email),1)]),_:1}),e.createVNode(e.unref(T._sfc_main),{variant:"body-sm",tag:"span",color:"subtle","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.value),1)]),_:1})],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(e.unref(re._sfc_main),{modelValue:i.value.email,"onUpdate:modelValue":b[0]||(b[0]=P=>i.value.email=P),required:"",type:"email",name:"email",disabled:!!t.readOnlyEmail,label:e.unref(c).emailLabel,placeholder:e.unref(c).emailPlaceholder+A("email"),error:t.validation.value.email.$errors},null,8,["modelValue","disabled","label","placeholder","error"]),e.createVNode(e.unref(Ie._sfc_main),{"single-model-value":s.value,"onUpdate:singleModelValue":b[3]||(b[3]=P=>s.value=P),required:"",name:"country",label:e.unref(c).countryLabel+A("country"),error:t.validation.value.country.$errors},{"label-suffix":e.withCtx(()=>[!o.value&&!t.isBillingInformationMandatory?(e.openBlock(),e.createBlock(e.unref(te._sfc_main),{key:0,size:"xs",intent:"subtle","icon-prefix":"add",class:"py-0.5",onClick:b[1]||(b[1]=P=>o.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(M)({defaultMessage:"More billing details",description:"Label of the button in the checkout that lets you fill out all billing details",id:"checkout.billing_details.add_billing_details_button.label"})),1)]),_:1})):e.createCommentVNode("",!0),o.value&&!t.isBillingInformationMandatory?(e.openBlock(),e.createBlock(e.unref(te._sfc_main),{key:1,size:"sm",intent:"subtle","icon-prefix":"close",class:"py-0.5",onClick:b[2]||(b[2]=P=>o.value=!1)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(M)({defaultMessage:"Remove billing details",id:"checkout.billing_details.remove_billing_details_button.label",description:"Label of the button in the checkout that lets you remove the billing details"})),1)]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["single-model-value","label","error"])],64))]),e.createVNode(e.unref(Ze._sfc_main),{"is-open":o.value||!!t.isBillingInformationMandatory},{default:e.withCtx(()=>[o.value||t.isBillingInformationMandatory?(e.openBlock(),e.createElementBlock("div",Ln,[e.createElementVNode("div",Bn,[e.createVNode(e.unref(re._sfc_main),{modelValue:i.value.addressLine1,"onUpdate:modelValue":b[4]||(b[4]=P=>i.value.addressLine1=P),name:"address_line_1",label:e.unref(M)({defaultMessage:"Billing address",id:"checkout.address.title",description:"Address line 1 of the customer address in the checkout form"}),placeholder:e.unref(M)({defaultMessage:"Address line 1...",id:"checkout.address.line1.placeholder",description:"Address line 1 of the customer address in the checkout form"})+A("addressLine1"),required:"",error:t.validation.value.addressLine1.$errors},null,8,["modelValue","label","placeholder","error"]),e.createVNode(e.unref(re._sfc_main),{modelValue:i.value.addressLine2,"onUpdate:modelValue":b[5]||(b[5]=P=>i.value.addressLine2=P),name:"address_line_2",placeholder:e.unref(M)({defaultMessage:"Address line 2...",id:"checkout.address.line2.placeholder",description:"Address line 2 of the customer address in the checkout form"})+A("addressLine2")},null,8,["modelValue","placeholder"]),e.createElementVNode("div",Vn,[e.createVNode(e.unref(re._sfc_main),{modelValue:i.value.postalCode,"onUpdate:modelValue":b[6]||(b[6]=P=>i.value.postalCode=P),name:"postal_code",placeholder:e.unref(c).postalCodePlaceholder+A("postalCode"),error:t.validation.value.addressLine1.$errors},null,8,["modelValue","placeholder","error"]),e.createVNode(e.unref(re._sfc_main),{modelValue:i.value.city,"onUpdate:modelValue":b[7]||(b[7]=P=>i.value.city=P),name:"city",placeholder:e.unref(c).cityPlaceholder+A("city")},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(re._sfc_main),{modelValue:i.value.state,"onUpdate:modelValue":b[8]||(b[8]=P=>i.value.state=P),name:"state",placeholder:e.unref(c).statePlaceholder+A("state"),error:t.validation.value.state.$errors},null,8,["modelValue","placeholder","error"])])])])):e.createCommentVNode("",!0)]),_:1},8,["is-open"])]),_:1},8,["title"]),t.readOnly?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(ie._sfc_main),{key:0},{default:e.withCtx(()=>[e.createVNode(Ie._sfc_main$1,{modelValue:a.value,"onUpdate:modelValue":b[9]||(b[9]=P=>a.value=P),"no-spacing":"",class:"!flex"},null,8,["modelValue"]),e.createVNode(e.unref(Ze._sfc_main),{"is-open":r.value},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock("div",On,[e.createElementVNode("div",zn,[e.createVNode(e.unref(re._sfc_main),{modelValue:i.value.companyLegalName,"onUpdate:modelValue":b[10]||(b[10]=P=>i.value.companyLegalName=P),required:"",name:"legal_name",label:e.unref(c).legalNameLabel,placeholder:e.unref(c).legalNamePlaceholder},null,8,["modelValue","label","placeholder"]),g.value?(e.openBlock(),e.createBlock(e.unref(re._sfc_main),{key:0,modelValue:i.value.companyVatNumber,"onUpdate:modelValue":b[11]||(b[11]=P=>i.value.companyVatNumber=P),name:"vat_number","input-class":"focus:outline-none focus:ring-0",label:e.unref(c).vatNumberLabel,placeholder:e.unref(c).vatNumberPlaceholder,error:t.validation.value.companyVatNumber.$errors,"suffix-class":"px-2 border-l-0"},e.createSlots({_:2},[e.unref(st)(i.value.country??"")?{name:"suffix",fn:e.withCtx(()=>[e.createVNode(e.unref(te._sfc_main),{type:"button",size:"sm",intent:"secondary",disabled:!e.unref(d)||e.unref(N)||t.validation.value.companyVatNumber.$invalid,onClick:e.unref(_)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(M)({defaultMessage:"Check",id:"checkout.vat_number.check_button.label",description:"The label for the check button in the checkout form"})),1)]),_:1},8,["disabled","onClick"])]),key:"0"}:void 0]),1032,["modelValue","label","placeholder","error"])):e.createCommentVNode("",!0),e.unref(f)?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass({"opacity-75":e.unref(N)})},[e.createVNode(kn,{"tax-id-validation-result":e.unref(f)},null,8,["tax-id-validation-result"])],2)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]),_:1},8,["is-open"])]),_:1}))])],32))}}),Un={key:0,class:"flex items-center"},$n=["innerHTML"],Fn=["innerHTML"],Gn=e.defineComponent({__name:"CheckoutTitle",props:{trialPeriod:{type:Object},subscriptionName:{type:String},amount:{type:Object},billingPeriod:{type:Object},countryCode:{type:null},trialStartDate:{type:Date},subscriptionStartDate:{type:Date}},setup(t){const{$t:n}=T.useIntl();return(o,i)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",null,[e.createVNode(e.unref(T._sfc_main),{variant:"heading-1",class:"inline-block"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.trialStartDate?t.subscriptionName:e.unref(n)({defaultMessage:"Pay and subscribe",id:"checkout.page_title",description:"The title of the checkout page"}))+e.toDisplayString(" "),1),t.trialPeriod?(e.openBlock(),e.createBlock(e.unref(at._sfc_main),{key:0,"trial-period":t.trialPeriod,size:"lg",class:"-translate-y-0.5"},null,8,["trial-period"])):e.createCommentVNode("",!0)]),_:1})]),e.createVNode(e.unref(T._sfc_main),{variant:"body-sm",color:"subtle","no-spacing":""},{default:e.withCtx(()=>[t.countryCode?(e.openBlock(),e.createElementBlock("span",{key:1,innerHTML:t.trialStartDate?e.unref(n)({defaultMessage:"You will be billed <strong>{price}</strong> per {period_name}, starting {startDate, date, long}.",id:"checkout.trial_period_description",description:"The description of the trial period"},{price:e.unref(ee.formatAmount)(t.amount),startDate:t.subscriptionStartDate,period_name:e.unref(ee.formatBillingPeriod)(t.billingPeriod,{short:!0,hideValueForExactPeriods:!0}),strong:a=>`<strong>${a}</strong>`}):e.unref(n)({defaultMessage:"You will be billed <strong>{price}</strong> per {period_name}, starting today.",id:"checkout.subscription_description",description:"The description of the subscription"},{price:e.unref(ee.formatAmount)(t.amount),period_name:e.unref(ee.formatBillingPeriod)(t.billingPeriod,{short:!0,hideValueForExactPeriods:!0}),strong:a=>`<strong>${a}</strong>`})},null,8,Fn)):(e.openBlock(),e.createElementBlock("span",Un,[e.createVNode(e.unref(we._sfc_main),{"is-dark-mode":""},{tooltip:e.withCtx(()=>[e.createVNode(e.unref(we.TooltipContent),null,{default:e.withCtx(()=>[e.createVNode(e.unref(we._sfc_main$1),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({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(e.unref(me._sfc_main$2),{"width-class":"w-10","height-class":"h-4",shade:"darker",class:"mr-1.5 inline-block"})]),_:1}),e.createElementVNode("span",{innerHTML:t.trialStartDate?e.unref(n)({defaultMessage:"per {period_name} starting, {startDate, date, long}",id:"checkout.trial_period_description_without_price",description:"The description of the trial period, while the price is still being determined"},{startDate:t.subscriptionStartDate,period_name:e.unref(ee.formatBillingPeriod)(t.billingPeriod,{short:!0,hideValueForExactPeriods:!0})}):e.unref(n)({defaultMessage:"per {period_name}, starting today",id:"checkout.subscription_description_without_price",description:"The description of the subscription, while the price is still being determined"},{period_name:e.unref(ee.formatBillingPeriod)(t.billingPeriod,{short:!0,hideValueForExactPeriods:!0})})},null,8,$n)]))]),_:1})]))}}),Yn=t=>{var n;return((n=t.periods)==null?void 0:n.some(o=>o.groups.some(i=>{var a;return(a=i.lines)==null?void 0:a.some(r=>r.product_items.some(s=>s.model_type==="USAGE_BASED"))})))??!1},Kn={class:"flex min-h-96 w-full items-center justify-center"},qn={class:"max-w-sm"},Qn=e.defineComponent({__name:"CheckoutNotAvailable",setup(t){const{$t:n}=T.useIntl(),o=()=>{window.location.reload()};return(i,a)=>(e.openBlock(),e.createElementBlock("div",Kn,[e.createElementVNode("div",qn,[e.createVNode(e.unref(T._sfc_main),{variant:"heading-1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"Checkout not available",id:"checkout.not_available.title",description:"The title of the checkout not available page"})),1)]),_:1}),e.createVNode(e.unref(T._sfc_main),{variant:"body-sm",color:"subtle"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"The checkout is currently not available.",id:"checkout.not_available.description",description:"The description of the checkout not available page"}))+" ",1),e.createElementVNode("a",{href:"#",class:"text-primary-900 hover:underline",onClick:e.withModifiers(o,["prevent"])},e.toDisplayString(e.unref(n)({defaultMessage:"Reload",id:"checkout.not_available.reload_button",description:"The label of the reload button"})),1),e.createTextVNode(" "+e.toDisplayString(e.unref(n)({defaultMessage:"this page to try again, or contact customer support.",id:"checkout.not_available.contact_support_message",description:"The message shown when the user wants to contact customer support"})),1)]),_:1})])]))}}),Hn=e.defineComponent({__name:"SubscriptionPaymentCompletedCard",emits:["continue-to-merchant"],setup(t){const{$t:n}=T.useIntl();return(o,i)=>(e.openBlock(),e.createBlock(Rt._sfc_main,{status:"success",title:e.unref(n)({defaultMessage:"Payment successful",id:"subscription_payment_completed_card.title",description:"The title for when a payment has been successful"})},{default:e.withCtx(()=>[e.createVNode(e.unref(T._sfc_main),{variant:"body-xs",color:"subtle",tag:"span"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"Thank you for subscribing.",id:"subscription_payment_completed_card.thank_you_for_subscribing",description:"The text shown after a successful message before a redirect"})),1)]),_:1})]),_:1},8,["title"]))}}),Zn={class:"flex items-start"},Xn={class:"flex grow flex-col"},Wn={class:"flex items-center gap-1"},Jn={class:"ml-4 flex items-center self-center"},ht=e.defineComponent({__name:"PricingGroupContent",props:{name:{type:String},description:{type:String}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",Zn,[e.createElementVNode("div",Xn,[e.createElementVNode("div",Wn,[e.createVNode(e.unref(T._sfc_main),{tag:"span",variant:"body-sm",weight:"semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.name),1)]),_:1}),e.renderSlot(n.$slots,"badge")]),e.createVNode(e.unref(T._sfc_main),{tag:"span",variant:"body-xs",color:"subtle"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.description),1)]),_:1})]),e.createElementVNode("div",Jn,[e.renderSlot(n.$slots,"default")])]))}}),eo={class:"sv-order-summary__body grid grid-cols-1 gap-1"},to={class:"px-3 py-2"},no={class:"sv-order-summary__billing-period flex flex-col gap-3"},oo={class:"px-3 py-2"},io={key:3,class:"sv-order-summary__items"},ot=e.defineComponent({__name:"OrderSummary",props:{subscription:{type:Object},invoice:{type:Object},invoicePreviewByBillingPeriod:{type:Object},trialInvoice:{type:Object},enabledPricingIds:{type:Array},trialPeriod:{type:Object},avatar:{type:String},isPaid:{type:Boolean},isUsageBased:{type:Boolean},isPreviewAndPaymentMethodsPending:{type:Boolean},collapsible:{type:String},noTitle:{type:Boolean},countryCode:{type:null},variant:{type:String}},emits:["billing-period-change"],setup(t,{emit:n}){const o=t,i=n,{$t:a}=T.useIntl(),{map:r,formatTimePeriod:s}=it.useTimePeriod(),{isMobileViewport:g}=lt.useViewport(),d=e.computed(()=>g.value?"sm":"xs"),N=l=>`${l.type}:${l.value}`,f=["DAY","WEEK","MONTH","YEAR"],_=l=>f.includes(l),M=l=>{if(!l)return;const[m,h]=l.split(":"),D=Number(h);if(!(!D||!_(m)))return{type:m,value:D}},c=e.computed({get:()=>{const l=o.subscription.billing_period;return l?`${l.type}:${l.value}`:void 0},set:l=>{if(!l)return;const[m,h]=l.split(":"),D=Number(h);D&&_(m)&&i("billing-period-change",{type:m,value:D})}}),A=l=>{var D,S,j,O;const m=(O=(j=(S=(D=o.invoicePreviewByBillingPeriod)==null?void 0:D[N(l)])==null?void 0:S.periods)==null?void 0:j[0])==null?void 0:O.amount_including_tax;if(!m)return;const h=l.type==="MONTH"&&l.value===3?a({defaultMessage:"/quarter",id:"checkout.order_summary_block.billing_period.per_quarter",description:"Period label for quarterly billing"}):a({defaultMessage:"/{period}",id:"checkout.order_summary_block.billing_period.per_label",description:"Period label for billing cycles"},{period:s(l,{prefix:!1,hideValueForExactPeriods:!0})});return a({defaultMessage:"{amount}{period}",id:"checkout.order_summary_block.billing_period.sub_label",description:"Billing period option sublabel showing price per period"},{amount:ee.formatAmount(m),period:h})},y=l=>{var m,h,D,S;return(S=(D=(h=(m=o.invoicePreviewByBillingPeriod)==null?void 0:m[N(l)])==null?void 0:h.periods)==null?void 0:D[0])==null?void 0:S.amount_including_tax},E=l=>Number(l.quantity),b=(l,m)=>{if(!m)return;const D={DAY:365,WEEK:52,MONTH:12,YEAR:1}[l.type]/Math.max(l.value??1,1),S=E(m)*D;if(Number.isFinite(S))return{quantity:S.toFixed(2),currency:m.currency}},P=(l,m)=>{if(!l||!m)return;const h=E(l)-E(m);if(!(!Number.isFinite(h)||h<=0))return{quantity:h.toFixed(2),currency:l.currency}},L=l=>{if(!l)return;const m=a({defaultMessage:"Save {amount}",id:"checkout.order_summary_block.billing_period.save_badge.prefix",description:"First line for the savings badge label"},{amount:ee.formatAmount(l)}),h=a({defaultMessage:"/year",id:"checkout.order_summary_block.billing_period.save_badge.suffix",description:"Second line for the savings badge label"});return`${m}${h}`},w=e.computed(()=>{var R,Z,Q;const l=le.getFirstPricingPlanScheduleOfType({pricingPlanScheduleInfos:o.subscription.pricing_plan_schedule_infos??[],type:"DEFAULT"}),m=((Z=(R=l==null?void 0:l.pricing_plan_version)==null?void 0:R.billing_period_settings)==null?void 0:Z.billing_periods)??[],h=new Map,D=B=>{B&&h.set(N(B),B)},S=B=>{var K;(K=B==null?void 0:B.items)==null||K.forEach($=>{var G,q;(G=$.billing_period_configs)==null||G.forEach(W=>D(W.billing_period)),(q=$.pricing_currency_configs)==null||q.forEach(W=>{var J;(J=W.billing_period_configs)==null||J.forEach(ne=>D(ne.billing_period))})})};if((((Q=l==null?void 0:l.pricing_plan_version)==null?void 0:Q.pricing_categories)??[]).forEach(B=>{var K,$;(K=B.pricings)==null||K.forEach(G=>S(G)),($=B.pricing_groups)==null||$.forEach(G=>{var q;return(q=G.pricings)==null?void 0:q.forEach(W=>S(W))})}),!h.size)return[];const O=m.map(B=>h.get(N(B.period))).filter(B=>!!B),V=new Set(O.map(N)),H=[...h.values()].filter(B=>!V.has(N(B)));return[...O,...H]}),p=e.computed(()=>{const l=w.value[w.value.length-1],m=l?b(l,y(l)):void 0;return w.value.map(D=>{const S=D.type==="MONTH"&&D.value===3?a({defaultMessage:"Billed quarterly",id:"checkout.order_summary_block.billing_period.quarterly",description:"Billing period option label for quarterly billing"}):a({defaultMessage:"Billed {period}",id:"checkout.order_summary_block.billing_period.label",description:"Billing period option label for the selected period"},{period:r.value[D.type].full}),j=y(D),O=b(D,j),V=l&&D.type===l.type&&D.value===l.value?void 0:P(O,m),H=L(V);return{label:S,subLabel:A(D),labelSuffixComponent:H?{component:Xe._sfc_main,props:{color:"primary",content:H,size:d.value,class:"whitespace-nowrap text-left leading-tight"}}:void 0,hidden:c.value===`${D.type}:${D.value}`,value:`${D.type}:${D.value}`}})}),C=e.computed(()=>{const l=p.value,m=l[0],h=l[l.length-1];return{smallestPeriod:m==null?void 0:m.value,biggestPeriod:h==null?void 0:h.value}}),F=e.computed(()=>p.value.find(l=>l.value===C.value.biggestPeriod)),Y=e.computed(()=>p.value.find(l=>l.value===c.value)),u=e.computed(()=>{var R,Z,Q,B,K,$,G,q;const l=p.value,m=l[l.length-1],h=c.value;if(!m||!h||h===m.value)return"";const D=M(m.value);if(!D)return"";const S=(B=(Q=(Z=(R=o.invoicePreviewByBillingPeriod)==null?void 0:R[m.value])==null?void 0:Z.periods)==null?void 0:Q[0])==null?void 0:B.amount_including_tax,j=M(h),O=(q=(G=($=(K=o.invoicePreviewByBillingPeriod)==null?void 0:K[h])==null?void 0:$.periods)==null?void 0:G[0])==null?void 0:q.amount_including_tax;if(!j||!O)return"";const V=b(j,O),H=b(D,S);return L(P(V,H))??""}),v=l=>{const{smallestPeriod:m,biggestPeriod:h}=C.value;c.value=l?h:m};return(l,m)=>(e.openBlock(),e.createBlock(e.unref(ie._sfc_main),{class:"sv-order-summary","no-border":"","no-spacing":"","content-background":"none",title:t.noTitle?void 0:e.unref(a)({defaultMessage:"Order summary",id:"checkout.order_summary_block.title",description:"The title of the order summary block that lists the subscription cost in the checkout"})},{default:e.withCtx(()=>[e.createElementVNode("div",eo,[e.createVNode(e.unref(ie._sfc_main),{"no-spacing":"",class:"sv-order-summary__subscription"},{default:e.withCtx(()=>[t.subscription?(e.openBlock(),e.createBlock(Ut._sfc_main,{key:0,avatar:t.avatar,invoice:t.invoice,subscription:t.subscription,"enabled-pricing-ids":t.enabledPricingIds,loading:t.isPreviewAndPaymentMethodsPending,"trial-period":t.trialPeriod},null,8,["avatar","invoice","subscription","enabled-pricing-ids","loading","trial-period"])):e.createCommentVNode("",!0)]),_:1}),p.value.length===2?(e.openBlock(),e.createBlock(e.unref(ie._sfc_main),{key:0,"no-spacing":"","content-classes":c.value===C.value.biggestPeriod?"border-primary-500":void 0},{default:e.withCtx(()=>{var h;return[e.createElementVNode("div",to,[e.createElementVNode("div",no,[F.value?(e.openBlock(),e.createBlock(ht,{key:0,name:F.value.label,description:((h=Y.value)==null?void 0:h.subLabel)??""},e.createSlots({default:e.withCtx(()=>[e.createVNode(e.unref(ae._sfc_main),{"model-value":c.value===C.value.biggestPeriod,"onUpdate:modelValue":v},null,8,["model-value"])]),_:2},[u.value?{name:"badge",fn:e.withCtx(()=>[e.createVNode(e.unref(Xe._sfc_main),{intent:"brand",content:u.value,size:d.value,class:"whitespace-nowrap text-left leading-tight"},null,8,["content","size"])]),key:"0"}:void 0]),1032,["name","description"])):e.createCommentVNode("",!0)])])]}),_:1},8,["content-classes"])):p.value.length>2?(e.openBlock(),e.createBlock(e.unref(rt._sfc_main),{key:1,"single-model-value":c.value,"onUpdate:singleModelValue":m[0]||(m[0]=h=>c.value=h),class:"sv-order-summary__billing-period",options:p.value,size:"xl","has-large-dropdown":"","show-sub-label-in-input":"","show-suffix-in-closed-input":""},null,8,["single-model-value","options"])):e.createCommentVNode("",!0),t.isUsageBased?(e.openBlock(),e.createBlock(e.unref(ie._sfc_main),{key:2,"no-spacing":"",class:"sv-order-summary__usage"},{default:e.withCtx(()=>[e.createElementVNode("div",oo,[e.createVNode(e.unref(T._sfc_main),{"no-spacing":"",variant:"body-sm",color:"subtle"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"+ Usage",id:"checkout.invoice_preview.usage_based_message",description:"The message shown for the usage based invoice preview"})),1)]),_:1})])]),_:1})):e.createCommentVNode("",!0),t.invoice&&t.variant!=="products-inline"?(e.openBlock(),e.createElementBlock("div",io,[e.createVNode(e.unref(me._sfc_main$3),{invoice:t.invoice,"wrapper-component":e.unref(ie._sfc_main)},null,8,["invoice","wrapper-component"])])):e.createCommentVNode("",!0),e.createVNode(e.unref(ie._sfc_main),{class:"sv-order-summary__totals"},{default:e.withCtx(()=>[t.invoice?(e.openBlock(),e.createBlock(e.unref(me._sfc_main$1),{key:0,class:"sv-order-summary__invoice-preview",variant:t.variant==="products-inline"?"default":"without-products",invoice:t.invoice,"trial-invoice":t.trialInvoice,"is-paid":t.isPaid,collapsible:t.collapsible,"is-preview-without-taxes":!t.countryCode,"is-customer-facing":""},null,8,["variant","invoice","trial-invoice","is-paid","collapsible","is-preview-without-taxes"])):(e.openBlock(),e.createBlock(e.unref(T._sfc_main),{key:1,variant:"body-sm",color:"subtle",class:"sv-order-summary__empty"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Please select a country first",description:"The message shown for the invoice preview when no country is set",id:"checkout.invoice_preview.no_country_selected_message"})),1)]),_:1}))]),_:1})])]),_:1},8,["title"]))}});async function Mt(t,n){const{AdyenCheckout:o}=await Ae.loadAdyenSdk();return o(_e.getAdyenExpressCheckoutConfiguration({locale:t.locale,amount:t.amount,countryCode:t.countryCode,paymentMethodOptionResponse:t.paymentMethodOptionsResponse,logger:n}))}function bt({props:t,create:n,onMissingButton:o,onMountFailed:i,afterMount:a}){const r=e.ref(),s=T.useLogger(),g=async()=>{const d=await Mt(t,s),N=await n(d);if(!r.value){o();return}try{await N.isAvailable(),N.mount(r.value),a==null||a()}catch(f){i(f)}};return e.onMounted(()=>{g()}),{buttonRef:r}}const ao={key:0,id:"svg-logo",viewBox:"0 0 35 15",class:"h-[44px]"},ro={key:1,src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAxcHgiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAxMDEgMzIiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaW5ZTWluIG1lZXQiIHhtbG5zPSJodHRwOiYjeDJGOyYjeDJGO3d3dy53My5vcmcmI3gyRjsyMDAwJiN4MkY7c3ZnIj48cGF0aCBmaWxsPSIjMDAzMDg3IiBkPSJNIDEyLjIzNyAyLjggTCA0LjQzNyAyLjggQyAzLjkzNyAyLjggMy40MzcgMy4yIDMuMzM3IDMuNyBMIDAuMjM3IDIzLjcgQyAwLjEzNyAyNC4xIDAuNDM3IDI0LjQgMC44MzcgMjQuNCBMIDQuNTM3IDI0LjQgQyA1LjAzNyAyNC40IDUuNTM3IDI0IDUuNjM3IDIzLjUgTCA2LjQzNyAxOC4xIEMgNi41MzcgMTcuNiA2LjkzNyAxNy4yIDcuNTM3IDE3LjIgTCAxMC4wMzcgMTcuMiBDIDE1LjEzNyAxNy4yIDE4LjEzNyAxNC43IDE4LjkzNyA5LjggQyAxOS4yMzcgNy43IDE4LjkzNyA2IDE3LjkzNyA0LjggQyAxNi44MzcgMy41IDE0LjgzNyAyLjggMTIuMjM3IDIuOCBaIE0gMTMuMTM3IDEwLjEgQyAxMi43MzcgMTIuOSAxMC41MzcgMTIuOSA4LjUzNyAxMi45IEwgNy4zMzcgMTIuOSBMIDguMTM3IDcuNyBDIDguMTM3IDcuNCA4LjQzNyA3LjIgOC43MzcgNy4yIEwgOS4yMzcgNy4yIEMgMTAuNjM3IDcuMiAxMS45MzcgNy4yIDEyLjYzNyA4IEMgMTMuMTM3IDguNCAxMy4zMzcgOS4xIDEzLjEzNyAxMC4xIFoiPjwvcGF0aD48cGF0aCBmaWxsPSIjMDAzMDg3IiBkPSJNIDM1LjQzNyAxMCBMIDMxLjczNyAxMCBDIDMxLjQzNyAxMCAzMS4xMzcgMTAuMiAzMS4xMzcgMTAuNSBMIDMwLjkzNyAxMS41IEwgMzAuNjM3IDExLjEgQyAyOS44MzcgOS45IDI4LjAzNyA5LjUgMjYuMjM3IDkuNSBDIDIyLjEzNyA5LjUgMTguNjM3IDEyLjYgMTcuOTM3IDE3IEMgMTcuNTM3IDE5LjIgMTguMDM3IDIxLjMgMTkuMzM3IDIyLjcgQyAyMC40MzcgMjQgMjIuMTM3IDI0LjYgMjQuMDM3IDI0LjYgQyAyNy4zMzcgMjQuNiAyOS4yMzcgMjIuNSAyOS4yMzcgMjIuNSBMIDI5LjAzNyAyMy41IEMgMjguOTM3IDIzLjkgMjkuMjM3IDI0LjMgMjkuNjM3IDI0LjMgTCAzMy4wMzcgMjQuMyBDIDMzLjUzNyAyNC4zIDM0LjAzNyAyMy45IDM0LjEzNyAyMy40IEwgMzYuMTM3IDEwLjYgQyAzNi4yMzcgMTAuNCAzNS44MzcgMTAgMzUuNDM3IDEwIFogTSAzMC4zMzcgMTcuMiBDIDI5LjkzNyAxOS4zIDI4LjMzNyAyMC44IDI2LjEzNyAyMC44IEMgMjUuMDM3IDIwLjggMjQuMjM3IDIwLjUgMjMuNjM3IDE5LjggQyAyMy4wMzcgMTkuMSAyMi44MzcgMTguMiAyMy4wMzcgMTcuMiBDIDIzLjMzNyAxNS4xIDI1LjEzNyAxMy42IDI3LjIzNyAxMy42IEMgMjguMzM3IDEzLjYgMjkuMTM3IDE0IDI5LjczNyAxNC42IEMgMzAuMjM3IDE1LjMgMzAuNDM3IDE2LjIgMzAuMzM3IDE3LjIgWiI+PC9wYXRoPjxwYXRoIGZpbGw9IiMwMDMwODciIGQ9Ik0gNTUuMzM3IDEwIEwgNTEuNjM3IDEwIEMgNTEuMjM3IDEwIDUwLjkzNyAxMC4yIDUwLjczNyAxMC41IEwgNDUuNTM3IDE4LjEgTCA0My4zMzcgMTAuOCBDIDQzLjIzNyAxMC4zIDQyLjczNyAxMCA0Mi4zMzcgMTAgTCAzOC42MzcgMTAgQyAzOC4yMzcgMTAgMzcuODM3IDEwLjQgMzguMDM3IDEwLjkgTCA0Mi4xMzcgMjMgTCAzOC4yMzcgMjguNCBDIDM3LjkzNyAyOC44IDM4LjIzNyAyOS40IDM4LjczNyAyOS40IEwgNDIuNDM3IDI5LjQgQyA0Mi44MzcgMjkuNCA0My4xMzcgMjkuMiA0My4zMzcgMjguOSBMIDU1LjgzNyAxMC45IEMgNTYuMTM3IDEwLjYgNTUuODM3IDEwIDU1LjMzNyAxMCBaIj48L3BhdGg+PHBhdGggZmlsbD0iIzAwOWNkZSIgZD0iTSA2Ny43MzcgMi44IEwgNTkuOTM3IDIuOCBDIDU5LjQzNyAyLjggNTguOTM3IDMuMiA1OC44MzcgMy43IEwgNTUuNzM3IDIzLjYgQyA1NS42MzcgMjQgNTUuOTM3IDI0LjMgNTYuMzM3IDI0LjMgTCA2MC4zMzcgMjQuMyBDIDYwLjczNyAyNC4zIDYxLjAzNyAyNCA2MS4wMzcgMjMuNyBMIDYxLjkzNyAxOCBDIDYyLjAzNyAxNy41IDYyLjQzNyAxNy4xIDYzLjAzNyAxNy4xIEwgNjUuNTM3IDE3LjEgQyA3MC42MzcgMTcuMSA3My42MzcgMTQuNiA3NC40MzcgOS43IEMgNzQuNzM3IDcuNiA3NC40MzcgNS45IDczLjQzNyA0LjcgQyA3Mi4yMzcgMy41IDcwLjMzNyAyLjggNjcuNzM3IDIuOCBaIE0gNjguNjM3IDEwLjEgQyA2OC4yMzcgMTIuOSA2Ni4wMzcgMTIuOSA2NC4wMzcgMTIuOSBMIDYyLjgzNyAxMi45IEwgNjMuNjM3IDcuNyBDIDYzLjYzNyA3LjQgNjMuOTM3IDcuMiA2NC4yMzcgNy4yIEwgNjQuNzM3IDcuMiBDIDY2LjEzNyA3LjIgNjcuNDM3IDcuMiA2OC4xMzcgOCBDIDY4LjYzNyA4LjQgNjguNzM3IDkuMSA2OC42MzcgMTAuMSBaIj48L3BhdGg+PHBhdGggZmlsbD0iIzAwOWNkZSIgZD0iTSA5MC45MzcgMTAgTCA4Ny4yMzcgMTAgQyA4Ni45MzcgMTAgODYuNjM3IDEwLjIgODYuNjM3IDEwLjUgTCA4Ni40MzcgMTEuNSBMIDg2LjEzNyAxMS4xIEMgODUuMzM3IDkuOSA4My41MzcgOS41IDgxLjczNyA5LjUgQyA3Ny42MzcgOS41IDc0LjEzNyAxMi42IDczLjQzNyAxNyBDIDczLjAzNyAxOS4yIDczLjUzNyAyMS4zIDc0LjgzNyAyMi43IEMgNzUuOTM3IDI0IDc3LjYzNyAyNC42IDc5LjUzNyAyNC42IEMgODIuODM3IDI0LjYgODQuNzM3IDIyLjUgODQuNzM3IDIyLjUgTCA4NC41MzcgMjMuNSBDIDg0LjQzNyAyMy45IDg0LjczNyAyNC4zIDg1LjEzNyAyNC4zIEwgODguNTM3IDI0LjMgQyA4OS4wMzcgMjQuMyA4OS41MzcgMjMuOSA4OS42MzcgMjMuNCBMIDkxLjYzNyAxMC42IEMgOTEuNjM3IDEwLjQgOTEuMzM3IDEwIDkwLjkzNyAxMCBaIE0gODUuNzM3IDE3LjIgQyA4NS4zMzcgMTkuMyA4My43MzcgMjAuOCA4MS41MzcgMjAuOCBDIDgwLjQzNyAyMC44IDc5LjYzNyAyMC41IDc5LjAzNyAxOS44IEMgNzguNDM3IDE5LjEgNzguMjM3IDE4LjIgNzguNDM3IDE3LjIgQyA3OC43MzcgMTUuMSA4MC41MzcgMTMuNiA4Mi42MzcgMTMuNiBDIDgzLjczNyAxMy42IDg0LjUzNyAxNCA4NS4xMzcgMTQuNiBDIDg1LjczNyAxNS4zIDg1LjkzNyAxNi4yIDg1LjczNyAxNy4yIFoiPjwvcGF0aD48cGF0aCBmaWxsPSIjMDA5Y2RlIiBkPSJNIDk1LjMzNyAzLjMgTCA5Mi4xMzcgMjMuNiBDIDkyLjAzNyAyNCA5Mi4zMzcgMjQuMyA5Mi43MzcgMjQuMyBMIDk1LjkzNyAyNC4zIEMgOTYuNDM3IDI0LjMgOTYuOTM3IDIzLjkgOTcuMDM3IDIzLjQgTCAxMDAuMjM3IDMuNSBDIDEwMC4zMzcgMy4xIDEwMC4wMzcgMi44IDk5LjYzNyAyLjggTCA5Ni4wMzcgMi44IEMgOTUuNjM3IDIuOCA5NS40MzcgMyA5NS4zMzcgMy4zIFoiPjwvcGF0aD48L3N2Zz4",role:"presentation",class:"h-[22px]"},Ve=e.defineComponent({__name:"ExpressPaymentMethodButton",props:{type:{type:String}},emits:["click"],setup(t,{emit:n}){const o=t,i=n,a=e.computed(()=>{switch(o.type){case"applepay":return"Apple Pay";case"googlepay":return"Google Pay";case"paypal":return"PayPal";default:return}}),r=e.computed(()=>{switch(o.type){case"applepay":return"!bg-black !py-0";case"googlepay":return"!bg-black bg-[url(https://www.gstatic.com/instantbuy/svg/dark_gpay.svg)] bg-[length:auto_42.5%]";case"paypal":return"!bg-[#ffc439]";default:return}});function s(){i("click")}return(g,d)=>(e.openBlock(),e.createBlock(e.unref(te._sfc_main),{size:"lg","aria-label":a.value,class:e.normalizeClass([r.value,"!block h-11 w-full bg-center bg-no-repeat"]),onClick:s},{default:e.withCtx(()=>[o.type==="applepay"?(e.openBlock(),e.createElementBlock("svg",ao,[...d[0]||(d[0]=[e.createElementVNode("svg",{id:"svg-logo",x:"0",y:"3.85",height:"7.3",width:"35",class:"logo",viewBox:"0 0 105 43",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("title",null,"Apple Logo"),e.createElementVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createElementVNode("g",{fill:"#FFF"},[e.createElementVNode("path",{d:"M19.4028,5.5674 C20.6008,4.0684 21.4138,2.0564 21.1998,0.0004 C19.4458,0.0874 17.3058,1.1574 16.0668,2.6564 C14.9538,3.9414 13.9688,6.0374 14.2258,8.0074 C16.1948,8.1784 18.1618,7.0244 19.4028,5.5674"}),e.createElementVNode("path",{d:"M21.1772,8.3926 C18.3182,8.2226 15.8872,10.0156 14.5212,10.0156 C13.1552,10.0156 11.0642,8.4786 8.8022,8.5196 C5.8592,8.5626 3.1282,10.2276 1.6342,12.8746 C-1.4378,18.1696 0.8232,26.0246 3.8112,30.3376 C5.2622,32.4716 7.0102,34.8206 9.3142,34.7366 C11.4912,34.6506 12.3442,33.3266 14.9902,33.3266 C17.6352,33.3266 18.4042,34.7366 20.7082,34.6936 C23.0972,34.6506 24.5922,32.5586 26.0422,30.4226 C27.7072,27.9906 28.3882,25.6426 28.4312,25.5126 C28.3882,25.4706 23.8232,23.7186 23.7812,18.4676 C23.7382,14.0706 27.3652,11.9786 27.5362,11.8496 C25.4882,8.8196 22.2872,8.4786 21.1772,8.3926"}),e.createElementVNode("path",{d:"M85.5508,43.0381 L85.5508,39.1991 C85.8628,39.2421 86.6158,39.2871 87.0158,39.2871 C89.2138,39.2871 90.4558,38.3551 91.2108,35.9581 L91.6548,34.5371 L83.2428,11.2321 L88.4368,11.2321 L94.2958,30.1421 L94.4068,30.1421 L100.2668,11.2321 L105.3278,11.2321 L96.6048,35.7141 C94.6078,41.3291 92.3208,43.1721 87.4828,43.1721 C87.1048,43.1721 85.8838,43.1271 85.5508,43.0381"}),e.createElementVNode("path",{d:"M42.6499,19.3555 L48.3549,19.3555 C52.6829,19.3555 55.1469,17.0255 55.1469,12.9855 C55.1469,8.9455 52.6829,6.6375 48.3769,6.6375 L42.6499,6.6375 L42.6499,19.3555 Z M49.6869,2.4425 C55.9009,2.4425 60.2289,6.7265 60.2289,12.9625 C60.2289,19.2225 55.8129,23.5285 49.5309,23.5285 L42.6499,23.5285 L42.6499,34.4705 L37.6779,34.4705 L37.6779,2.4425 L49.6869,2.4425 Z"}),e.createElementVNode("path",{d:"M76.5547,25.7705 L76.5547,23.9715 L71.0287,24.3275 C67.9207,24.5275 66.3007,25.6815 66.3007,27.7015 C66.3007,29.6545 67.9887,30.9195 70.6287,30.9195 C74.0027,30.9195 76.5547,28.7665 76.5547,25.7705 M61.4617,27.8345 C61.4617,23.7285 64.5917,21.3755 70.3627,21.0205 L76.5547,20.6425 L76.5547,18.8675 C76.5547,16.2705 74.8457,14.8495 71.8057,14.8495 C69.2967,14.8495 67.4777,16.1375 67.0997,18.1125 L62.6167,18.1125 C62.7497,13.9615 66.6567,10.9435 71.9387,10.9435 C77.6207,10.9435 81.3267,13.9175 81.3267,18.5345 L81.3267,34.4705 L76.7327,34.4705 L76.7327,30.6305 L76.6217,30.6305 C75.3127,33.1395 72.4267,34.7145 69.2967,34.7145 C64.6807,34.7145 61.4617,31.9625 61.4617,27.8345"})])])],-1)])])):o.type==="paypal"?(e.openBlock(),e.createElementBlock("img",ro)):e.createCommentVNode("",!0)]),_:1},8,["aria-label","class"]))}}),lo={class:"absolute h-[1px] w-[1px] overflow-hidden opacity-0"},so="ADYEN",co=e.defineComponent({__name:"ExpressPaymentMethodApplePay",props:{onBillingInformationChange:{type:Function},amount:{type:Object},countryCode:{type:String},locale:{type:String},isVisible:{type:Boolean},paymentMethodOptionsResponse:{type:Object},billingInformation:{type:Object}},emits:["ready","update-billing-information"],setup(t,{emit:n}){const o=t,i=n,a=e.ref(),r=T.useLogger(),{authorizePayment:s}=Ft.createPaymentsService(),g=o.paymentMethodOptionsResponse.payment_acceptor.id,d=async()=>{const{ApplePay:y}=await Ae.loadAdyenSdk(),E=await Mt(o,r),b=new y(E,{isExpress:!0,recurringPaymentRequest:{paymentDescription:o.billingInformation.description,billingAgreement:o.billingInformation.agreement,managementURL:"https://www.google.com",...o.billingInformation.trial&&{trialBilling:{label:o.billingInformation.trial.label,amount:o.billingInformation.trial.amount.quantity.toString(),type:"final",paymentTiming:"recurring",recurringPaymentStartDate:o.billingInformation.trial.startDate,recurringPaymentEndDate:o.billingInformation.trial.endDate}},...o.billingInformation.regular&&{regularBilling:{label:o.billingInformation.regular.label,amount:o.billingInformation.regular.amount.quantity.toString(),type:"final",paymentTiming:"recurring",recurringPaymentStartDate:o.billingInformation.regular.startDate,...N(o.billingInformation.regular.interval??{type:"MONTH",value:1})}}},requiredBillingContactFields:["postalAddress"],requiredShippingContactFields:["email"],onPaymentMethodSelected:async(P,L,w)=>{var Y,u,v,l,m,h,D;const{invoicePreview:p,trialInvoicePreview:C}=await o.onBillingInformationChange({...((Y=w.paymentMethod.billingContact)==null?void 0:Y.postalCode)&&{postal_code:w.paymentMethod.billingContact.postalCode},...((u=w.paymentMethod.billingContact)==null?void 0:u.locality)&&{city:w.paymentMethod.billingContact.locality},...M((v=w.paymentMethod.billingContact)==null?void 0:v.countryCode)&&{country:M((l=w.paymentMethod.billingContact)==null?void 0:l.countryCode)}}),F=C?C.invoice_amount_including_tax.quantity.toString():p.invoice_amount_including_tax.quantity.toString();i("update-billing-information",{postal_code:(m=w.paymentMethod.billingContact)==null?void 0:m.postalCode,city:(h=w.paymentMethod.billingContact)==null?void 0:h.locality,country:(D=w.paymentMethod.billingContact)==null?void 0:D.countryCode}),P({newTotal:{label:o.billingInformation.regular.label,amount:F,type:"final"}})},onError:P=>{r.error("APPLE_PAY_ERROR","Apple Pay error",{error:P})},onAuthorized:async(P,L)=>{try{r.info("APPLE_PAY_AUTHORIZED","Apple Pay authorized",{data:P});const w=P.authorizedEvent;r.info("APPLE_PAY_EVENT_DATA","Apple Pay event data structure",{eventData:w,hasPaymentMethod:!!w.payment.token.paymentMethod,hasBrowserInfo:!!w.payment.token.paymentData,billingAddress:P.billingAddress});const p=w.payment.billingContact,C=P.billingAddress;p?i("update-billing-information",f(p)):C&&i("update-billing-information",_(C));const F={payment_method:_e.transformObjectToAdyenObject(w.payment.token.paymentMethod),browser_info:_e.transformObjectToAdyenObject(w.payment.token.paymentData)};r.info("APPLE_PAY_ADYEN_PAYLOAD","Adyen payload prepared",{adyen:F});const Y=_e.createReturnUrl({paymentAcceptorId:g,redirectUrl:window.location.href});r.info("APPLE_PAY_CALLING_API","Calling authorizePayment API",{paymentAcceptorId:g,amount:o.amount});const u=await s({payment_acceptor_id:g,payment_gateway_variant:so,adyen:{...F,store_payment_method:!0},amount:o.amount,return_url:Y});if(r.info("APPLE_PAY_API_RESPONSE","Payment API response received",{status:u.status,paymentResult:u}),u.status==="FAILURE"){r.error("APPLE_PAY_AUTHORIZATION_FAILED","Payment authorization failed",{error:u}),L.reject();return}if(u.status==="ACTION_REQUIRED"){r.warn("APPLE_PAY_ACTION_REQUIRED","Payment requires additional action",{action:u.action}),L.reject();return}r.info("APPLE_PAY_SUCCESS","Apple Pay payment successful, resolving"),L.resolve()}catch(w){r.error("APPLE_PAY_AUTHORIZATION_FAILED","Apple Pay authorization failed",{error:w}),L.reject()}}});if(!a.value){r.error("APPLE_PAY_ERROR","Apple Pay button ref not found");return}try{await b.isAvailable(),b.mount(a.value),i("ready")}catch(P){r.error("APPLE_PAY_ERROR","Apple Pay not available on this device",{},P)}},N=y=>{if(!y.value)return;let E=y.value??1,b=y.type.toLowerCase();if(y.type==="WEEK"&&(b="day",E=y.value*7),b==="day"||b==="month"||b==="year"||b==="hour"||b==="minute")return{recurringPaymentIntervalUnit:b,recurringPaymentIntervalCount:E}},f=y=>({postal_code:y.postalCode,city:y.locality,country:y.countryCode}),_=y=>({postal_code:y.postalCode,city:y.city,country:y.country}),M=y=>y&&c(y)?y:void 0,c=y=>Pe(y),A=()=>{var E;const y=(E=a.value)==null?void 0:E.querySelector("apple-pay-button");if(y){const b=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});y.dispatchEvent(b)}};return e.onMounted(()=>{d()}),(y,E)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.isVisible?(e.openBlock(),e.createBlock(Ve,{key:0,type:"applepay",onClick:A})):e.createCommentVNode("",!0),e.createElementVNode("div",lo,[e.createElementVNode("div",{ref_key:"applePayButtonRef",ref:a},null,512)])],64))}}),uo={class:"relative overflow-hidden"},po=e.defineComponent({__name:"ExpressPaymentMethodPaypal",props:{amount:{type:Object},countryCode:{type:String},locale:{type:String},isVisible:{type:Boolean},paymentMethodOptionsResponse:{type:Object},billingInformation:{type:Object}},emits:["ready","update-billing-information"],setup(t,{emit:n}){const o=t,i=n,a=T.useLogger(),{buttonRef:r}=bt({props:o,onMissingButton:()=>a.error("EXPRESS_CHECKOUT_PAYPAL_ERROR","The PayPal button reference is not found and cannot be mounted"),onMountFailed:s=>a.error("EXPRESS_CHECKOUT_PAYPAL_ERROR","Failed mounting PayPal express button",{error:s}),create:async s=>{const{PayPal:g}=await Ae.loadAdyenSdk();return new g(s,{isExpress:!0,blockPayPalPayLaterButton:!0,blockPayPalCreditButton:!0,blockPayPalVenmoButton:!0,style:{height:55},onInit:()=>{i("ready")}})}});return(s,g)=>(e.openBlock(),e.createElementBlock("div",uo,[t.isVisible?(e.openBlock(),e.createBlock(Ve,{key:0,type:"paypal",class:"w-full"})):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"paypalButtonRef",ref:r,class:"absolute inset-0 opacity-[0.0001]"},null,512)]))}}),mo={class:"absolute h-[1px] w-[1px] overflow-hidden opacity-0"},go=e.defineComponent({__name:"ExpressPaymentMethodGooglePay",props:{amount:{type:Object},countryCode:{type:String},locale:{type:String},isVisible:{type:Boolean},paymentMethodOptionsResponse:{type:Object},billingInformation:{type:Object}},emits:["ready","update-billing-information"],setup(t,{emit:n}){const o=t,i=n,a=T.useLogger(),{buttonRef:r}=bt({props:o,onMissingButton:()=>a.error("EXPRESS_CHECKOUT_GOOGLE_PAY_ERROR","The Google Pay button reference is not found and cannot be mounted"),onMountFailed:g=>a.error("EXPRESS_CHECKOUT_GOOGLE_PAY_ERROR","Failed mounting Google Pay express button",{error:g}),create:async g=>{const{GooglePay:d}=await Ae.loadAdyenSdk();return new d(g,{isExpress:!0})},afterMount:()=>i("ready")}),s=()=>{var d;const g=(d=r.value)==null?void 0:d.querySelector("#gpay-button-online-api-id");if(g){const N=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});g.dispatchEvent(N)}};return(g,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.isVisible?(e.openBlock(),e.createBlock(Ve,{key:0,type:"googlepay",onClick:s})):e.createCommentVNode("",!0),e.createElementVNode("div",mo,[e.createElementVNode("div",{ref_key:"googlePayButtonRef",ref:r},null,512)])],64))}}),fo={key:0,class:"mt-4n"},yo={class:"mb-2"},vo={class:"grid grid-cols-6 gap-1 md:gap-2"},_o={class:"mt-4 h-4"},ho=2,Mo=e.defineComponent({__name:"ExpressPaymentMethods",props:{amount:{type:Object},countryCode:{type:String},locale:{type:String},paymentMethodsOptionsResponse:{type:null},billingInformation:{type:Object},onBillingInformationChange:{type:Function}},emits:["update-billing-information"],setup(t){const n=["applepay"],o=t,{$t:i}=T.useIntl(),a=e.ref(!1),r=e.ref(!1),s=e.ref(!1),g=e.computed(()=>{var c;if(n.includes("applepay"))return(c=o.paymentMethodsOptionsResponse)==null?void 0:c.find(A=>{var y;return(y=A.options)==null?void 0:y.some(E=>E.name.toLowerCase()==="apple pay"&&E.payment_gateway_variant==="ADYEN")})}),d=e.computed(()=>{var c;if(n.includes("paypal"))return(c=o.paymentMethodsOptionsResponse)==null?void 0:c.find(A=>{var y;return(y=A.options)==null?void 0:y.some(E=>E.name.toLowerCase()==="paypal"&&E.payment_gateway_variant==="ADYEN")})}),N=e.computed(()=>{var c;if(n.includes("googlepay"))return(c=o.paymentMethodsOptionsResponse)==null?void 0:c.find(A=>{var y;return(y=A.options)==null?void 0:y.some(E=>E.name.toLowerCase()==="google pay"&&E.payment_gateway_variant==="ADYEN")})}),f=e.computed(()=>!!(g.value||N.value||d.value)),_=e.computed(()=>{var E;if(((E=o.paymentMethodsOptionsResponse)==null?void 0:E.length)===0)return!1;const c=!g.value||a.value,A=!N.value||r.value,y=!d.value||s.value;return c&&A&&y}),M=e.computed(()=>_.value?(g.value?1:0)+(N.value?1:0)+(d.value?1:0):ho);return(c,A)=>f.value?(e.openBlock(),e.createElementBlock("div",fo,[e.createElementVNode("div",yo,[_.value?(e.openBlock(),e.createBlock(e.unref(T._sfc_main),{key:1,variant:"heading-3",tag:"h2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Subscribe instantly with",id:"checkout.express_payment_methods.title",description:"The title of the express payment methods block in the checkout form"})),1)]),_:1})):(e.openBlock(),e.createBlock(se._sfc_main,{key:0,variant:"title"}))]),e.createElementVNode("div",vo,[_.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(se._sfc_main,{class:"col-span-3 h-11"}),e.createVNode(se._sfc_main,{class:"col-span-3 h-11"})],64)),e.createElementVNode("div",{class:e.normalizeClass(["col-span-3 md:col-span-2",{hidden:!g.value,"!col-span-6":M.value===1,"md:!col-span-3":M.value===2,"!col-span-6 md:!col-span-2":M.value===3}])},[g.value?(e.openBlock(),e.createBlock(co,{key:0,amount:t.amount,"billing-information":t.billingInformation,"country-code":t.countryCode,locale:t.locale,"is-visible":_.value,"payment-method-options-response":g.value,"on-billing-information-change":t.onBillingInformationChange,onReady:A[0]||(A[0]=y=>a.value=!0),onUpdateBillingInformation:A[1]||(A[1]=y=>c.$emit("update-billing-information",y))},null,8,["amount","billing-information","country-code","locale","is-visible","payment-method-options-response","on-billing-information-change"])):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:e.normalizeClass(["col-span-3 md:col-span-2",{hidden:!N.value,"col-span-6 md:col-span-6":M.value===1,"md:!col-span-3":M.value===2}])},[N.value?(e.openBlock(),e.createBlock(go,{key:0,amount:t.amount,"billing-information":t.billingInformation,"country-code":t.countryCode,locale:t.locale,"is-visible":_.value,"payment-method-options-response":N.value,onReady:A[2]||(A[2]=y=>r.value=!0)},null,8,["amount","billing-information","country-code","locale","is-visible","payment-method-options-response"])):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:e.normalizeClass(["col-span-3 md:col-span-2",{hidden:!d.value,"col-span-6 md:col-span-6":M.value===1,"md:!col-span-3":M.value===2}])},[d.value?(e.openBlock(),e.createBlock(po,{key:0,amount:t.amount,"billing-information":t.billingInformation,"country-code":t.countryCode,locale:t.locale,"is-visible":_.value,"payment-method-options-response":d.value,onReady:A[3]||(A[3]=y=>s.value=!0)},null,8,["amount","billing-information","country-code","locale","is-visible","payment-method-options-response"])):e.createCommentVNode("",!0)],2)]),e.createElementVNode("div",_o,[_.value?(e.openBlock(),e.createBlock(e.unref($t._sfc_main),{key:1,text:e.unref(i)({defaultMessage:"Or",id:"checkout.express_payment_methods.divider_text",description:"The text of the divider text in the express payment methods block in the checkout form"}),"text-position":"center"},null,8,["text"])):(e.openBlock(),e.createBlock(se._sfc_main,{key:0,variant:"divider-text"}))])])):e.createCommentVNode("",!0)}}),bo=["aria-expanded","aria-label"],Io={class:"flex w-full cursor-pointer flex-row items-center justify-between gap-3 px-3 py-2"},No={class:"flex flex-row items-center gap-2"},Co=["onKeydown"],Ao=["aria-label"],Eo={class:"flex w-full cursor-pointer flex-row items-center justify-between gap-3 px-3 py-2"},Po={class:"flex flex-row items-center gap-2"},Do={class:"sr-only","aria-live":"polite"},xo=e.defineComponent({inheritAttrs:!1,__name:"PromotionCodeSection",props:{promotionCode:{default:null,type:[String,null]}},emits:["update:appliedCode","apply","remove"],setup(t,{emit:n}){const{$t:o}=T.useIntl(),i=t,a=n,r=e.ref(!1),s=e.ref(""),g=e.ref(""),d=e.ref(null),N=e.ref(null),f=Yt.uniqueId("promotion-code-"),_=`${f}-label`,M=`${f}-panel`,c=e.computed(()=>i.promotionCode!==null&&i.promotionCode!==""),A=e.computed(()=>s.value.trim().length>0),y=e.computed(()=>i.promotionCode??o({defaultMessage:"Promotion applied",id:"checkout.promotion_code.applied_label",description:"Fallback label for an applied promotion code in checkout"})),E=e.computed(()=>r.value?o({defaultMessage:"Collapse promotion code input",id:"checkout.promotion_code.collapse_aria_label",description:"Aria label for the promotion code toggle button in checkout, while the input is open"}):o({defaultMessage:"Expand promotion code input",id:"checkout.promotion_code.expand_aria_label",description:"Aria label for the promotion code toggle button in checkout, while the input is closed"})),b=e.computed(()=>o({defaultMessage:"Apply promotion code",id:"checkout.promotion_code.apply_aria_label",description:"Aria label for the promotion code apply button in checkout"})),P=e.computed(()=>o({defaultMessage:"Remove promotion code",id:"checkout.promotion_code.remove_aria_label",description:"Aria label for the promotion code remove button in checkout"})),L=()=>{s.value=""},w=()=>{var v;const u=(v=N.value)==null?void 0:v.querySelector("input");u instanceof HTMLInputElement&&u.focus()},p=()=>{r.value&&(r.value=!1)},C=()=>{c.value||(r.value=!r.value)},F=()=>{if(!A.value)return;const u=s.value.trim();a("update:appliedCode",u),a("apply",u),g.value=o({defaultMessage:"Promotion code applied",id:"checkout.promotion_code.applied_status",description:"Aria live message when a promotion code is applied in checkout"}),r.value=!1},Y=()=>{a("update:appliedCode",null),a("remove"),g.value=o({defaultMessage:"Promotion code removed",id:"checkout.promotion_code.removed_status",description:"Aria live message when a promotion code is removed in checkout"}),L(),e.nextTick(()=>{var u;(u=d.value)==null||u.focus()})};return e.watch(r,u=>{if(!u){L(),e.nextTick(()=>{var v;(v=d.value)==null||v.focus()});return}e.nextTick(()=>{w()})}),e.watch(()=>i.promotionCode,u=>{u||L()}),(u,v)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[c.value?(e.openBlock(),e.createBlock(e.unref(ie._sfc_main),e.mergeProps({key:1},u.$attrs,{"no-border":"","no-spacing":"","content-background":"none",class:"relative w-full"}),{default:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:"w-full rounded border border-primary-900 bg-white","aria-label":P.value,onClick:Y},[e.createElementVNode("div",Eo,[e.createElementVNode("div",Po,[e.createVNode(e.unref(te._sfc_main$1),{icon:"local_activity"}),e.createVNode(e.unref(T._sfc_main),{variant:"body-sm",class:"font-semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.value),1)]),_:1})]),e.createVNode(e.unref(te._sfc_main$1),{icon:"close"})])],8,Ao)]),_:1},16)):(e.openBlock(),e.createBlock(e.unref(ie._sfc_main),e.mergeProps({key:0},u.$attrs,{"no-spacing":"",class:"relative w-full"}),{default:e.withCtx(()=>[e.createElementVNode("button",{ref_key:"toggleRef",ref:d,type:"button",class:"w-full","aria-expanded":r.value,"aria-controls":M,"aria-label":E.value,onClick:C},[e.createElementVNode("div",Io,[e.createElementVNode("div",No,[e.createVNode(e.unref(te._sfc_main$1),{icon:"local_activity"}),e.createVNode(e.unref(T._sfc_main),{id:_,variant:"body-sm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Add promotion code",id:"checkout.promotion_code.add_label",description:"Label for adding a promotion code in checkout"})),1)]),_:1})]),e.createVNode(e.unref(te._sfc_main$1),{icon:r.value?"remove":"add"},null,8,["icon"])])],8,bo),e.withDirectives(e.createElementVNode("div",{id:M,ref_key:"panelRef",ref:N,role:"region","aria-labelledby":_,class:"flex w-full flex-row items-center gap-2 overflow-hidden border-t px-3 py-2",onKeydown:e.withKeys(e.withModifiers(p,["prevent"]),["esc"])},[e.createVNode(e.unref(re._sfc_main),{modelValue:s.value,"onUpdate:modelValue":v[0]||(v[0]=l=>s.value=l),placeholder:e.unref(o)({defaultMessage:"Promotion code",id:"checkout.promotion_code.placeholder",description:"Placeholder for promotion code input in checkout"}),"aria-label":e.unref(o)({defaultMessage:"Promotion code",id:"checkout.promotion_code.input_aria_label",description:"Aria label for promotion code input in checkout"}),class:"w-full",onKeydown:e.withKeys(e.withModifiers(F,["prevent"]),["enter"])},null,8,["modelValue","placeholder","aria-label","onKeydown"]),e.createVNode(e.unref(te._sfc_main),{type:"button",disabled:!A.value,"aria-label":b.value,"aria-disabled":!A.value,onClick:F},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Apply",id:"checkout.promotion_code.apply_button",description:"Button label for applying a promotion code in checkout"})),1)]),_:1},8,["disabled","aria-label","aria-disabled"])],40,Co),[[e.vShow,r.value]])]),_:1},16)),e.createElementVNode("span",Do,e.toDisplayString(g.value),1)],64))}}),ko={class:"sv-checkout__header"},wo={class:"sv-checkout__payment-methods"},So={key:0,class:"sv-checkout__payment-methods-body"},To={key:3,class:"sv-checkout__payment-form"},Lo={class:"sv-checkout__order-summary"},Bo={class:"flex flex-col gap-2"},Vo=e.defineComponent({__name:"Checkout",props:{configuration:{type:Object}},emits:["error","ready"],setup(t,{emit:n}){var Ue,$e,Fe,Ge,Ye,Ke,qe,Qe,He;const o=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./PaymentIntegrationForm-CwfCLnKt.js"))),i=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./PlanCustomizationEditor-XpofGULc.js"))),a=t,r=n,s=e.computed(()=>a.configuration),g=e.ref(),d=e.ref(),N=T.useLogger(),{$t:f,locale:_}=T.useIntl(),{formatTimePeriod:M}=it.useTimePeriod(),c=Vt.usePortal(),{isMobileViewport:A}=lt.useViewport();if(N.info("COMPONENT_INITIALIZED","Checkout component initialized"),((Ue=c.value)==null?void 0:Ue.type)!=="INIT_PRICING_PLAN_SUBSCRIPTION")throw N.error("INVALID_TOKEN","Invalid token"),Error("Invalid token");c.value.status==="REVOKED"&&(g.value={code:"RESOURCE_REVOKED",message:`Portal url with resource id "${c.value.id}" is revoked`},N.error("RESOURCE_REVOKED",`Portal url with resource id "${c.value.id}" is revoked`));const y=(Fe=($e=c.value)==null?void 0:$e.init_pricing_plan_subscription)==null?void 0:Fe.pricing_plan_subscription_id,E=(Ye=(Ge=c.value)==null?void 0:Ge.init_pricing_plan_subscription)==null?void 0:Ye.success_url,{validatedEmail:b,validatedCountry:P,paymentMethodOptions:L,hasPaymentMethodOptionsError:w,retryPaymentMethodOptions:p,subscription:C,isPaymentMethodsPending:F,isInvoicePreviewPending:Y,checkoutForm:u,invoicePreview:v,invoicePreviewByBillingPeriod:l,trialInvoicePreview:m,trialPeriod:h,authorizationContext:D,isPaid:S,amount:j,loadInvoicePreview:O,updateInvoicePreviewOnBillingInformationChange:V,saveFormStateForRedirect:H}=An({initialCountry:(Ke=a.configuration)==null?void 0:Ke.countryCode,initialEmail:(qe=a.configuration)==null?void 0:qe.email,subscriptionId:y,enabledPricingIds:(Qe=a.configuration)==null?void 0:Qe.enabledPricingIds}),R=e.ref(!1),Z=async()=>{var I;await u.validation.value.$validate(),!u.validation.value.$invalid&&(R.value=!0,H(),(I=d.value)==null||I.submit())},Q=()=>{R.value=!1},B=async()=>(await u.validation.value.$validate(),!u.validation.value.$invalid),K=e.computed(()=>!!m.value),$=e.computed(()=>v.value?Yn(v.value):!1),G=e.computed(()=>u.form.value.country&&["US","CA"].includes(u.form.value.country)||!1),q=e.computed({get:()=>u.form.value.enabledPricingIds??[],set:I=>{u.form.value.enabledPricingIds=I}}),W=e.computed(()=>C.value?le.getFirstPricingPlanScheduleOfType({pricingPlanScheduleInfos:C.value.pricing_plan_schedule_infos,type:"DEFAULT"}):void 0),J=e.computed(()=>{var x,k;if(!C.value)return;const I=(k=(x=W.value)==null?void 0:x.pricing_plan_version)==null?void 0:k.pricing_currency_settings;return gt({country:u.form.value.country,pricingCurrencySettings:I,fallbackCurrency:C.value.billing_currency})}),ne=e.computed(()=>{if(!W.value||!C.value)return new Set;const I=le.getPricingItemConfigMetaById({pricingPlanScheduleInfo:W.value}),x=J.value,k=C.value.billing_period,U=new Set;return I.forEach((z,oe)=>{x&&z.currency!==x||k&&z.billingPeriod&&(z.billingPeriod.type!==k.type||z.billingPeriod.value!==k.value)||U.add(oe)}),U}),ge=e.computed({get:()=>{const I=u.form.value.seatsValues??[],x=ne.value;return x.size?I.filter(({pricing_item_config_id:k})=>x.has(k)):I},set:I=>{const x=u.form.value.seatsValues??[],k=ne.value;if(!k.size){u.form.value.seatsValues=I;return}const U=x.filter(({pricing_item_config_id:z})=>!k.has(z));u.form.value.seatsValues=U.concat(I)}}),fe=e.computed({get:()=>{const I=u.form.value.unitsValues??[],x=ne.value;return x.size?I.filter(({pricing_item_config_id:k})=>x.has(k)):I},set:I=>{const x=u.form.value.unitsValues??[],k=ne.value;if(!k.size){u.form.value.unitsValues=I;return}const U=x.filter(({pricing_item_config_id:z})=>!k.has(z));u.form.value.unitsValues=U.concat(I)}}),be=e.computed(()=>{var I,x,k,U,z;return m.value?f({defaultMessage:"{discounted_amount} for {trial_period}, then {subscription_amount}/{billing_period} until canceled, starting {start_date, date, ::MMMMd}.",id:"checkout.agreement.trial",description:"The agreement for the trial period"},{discounted_amount:m.value.tax_summary.total_amount.quantity==="0.00"?f({defaultMessage:"Free",id:"checkout.agreement.trial.free",description:"The free amount for the trial period"}):ee.formatAmount(m.value.tax_summary.total_amount),trial_period:M(h.value,{short:!0}),subscription_amount:ee.formatAmount(((I=v.value)==null?void 0:I.tax_summary.total_amount)??{quantity:"0.00",currency:"EUR"}),billing_period:M(((x=v.value)==null?void 0:x.billing_period)??{type:"MONTH",value:1},{short:!0,singular:!0,hideValueForExactPeriods:!0}),start_date:new Date(ue.value)}):f({defaultMessage:"{subscription_amount}/{billing_period} until canceled, starting {start_date, date, long}.",id:"checkout.agreement.subscription",description:"The agreement for the subscription"},{subscription_amount:(k=v.value)!=null&&k.tax_summary.total_amount?ee.formatAmount((U=v.value)==null?void 0:U.tax_summary.total_amount):"",billing_period:M(((z=v.value)==null?void 0:z.billing_period)??{type:"MONTH",value:1},{short:!0,singular:!0,hideValueForExactPeriods:!0}),start_date:new Date(ue.value)})}),ye=e.computed(()=>{var x;if(!v.value)return;const I=he.getSubscriptionName({subscription:C.value,fallback:f({defaultMessage:"Subscription",description:"The fallback name for when no subscription name can be determined",id:"customer_overview.subscriptions_block.fallback_subscription_name"})});return{description:I,managementURL:"https://www.solvimon.com/account/billing",agreement:be.value,...m.value&&h.value&&{trial:{label:f({defaultMessage:"Trial",id:"checkout.trial.label",description:"The label of the trial"}),amount:m.value.tax_summary.total_amount,startDate:De.value?new Date(De.value):void 0,endDate:Oe.value?new Date(Oe.value):void 0}},regular:{label:I,amount:v.value.tax_summary.total_amount,startDate:ue.value?new Date(ue.value):void 0,interval:((x=C.value)==null?void 0:x.billing_period)??{type:"MONTH",value:1}}}}),X=I=>Pe(I),It=I=>{const{country:x,...k}=I;u.updateInitialState({...k,...x&&X(x)?{country:x}:{}})},Nt=e.computed(()=>!(b&&P)),De=e.computed(()=>{var k,U,z;const I=(U=(k=m.value)==null?void 0:k.periods)==null?void 0:U[0],x=(z=xe.value)==null?void 0:z.trialStartDate;return I!=null&&I.start_at?new Date(I.start_at):x}),xe=e.computed(()=>he.getFallbackTrialAndSubscriptionStartAndEndDates(C.value)),Oe=e.computed(()=>{var k,U,z;const I=(U=(k=m.value)==null?void 0:k.periods)==null?void 0:U[0],x=(z=xe.value)==null?void 0:z.trialEndDate;return I!=null&&I.end_at?new Date(I.end_at):x}),ue=e.computed(()=>{var k,U,z;const I=(U=(k=v.value)==null?void 0:k.periods)==null?void 0:U[0],x=(z=xe.value)==null?void 0:z.subscriptionStartDate;return I!=null&&I.start_at?new Date(I.start_at):x}),Ct=e.computed(()=>!!(u.form.value.seatsValues&&u.form.value.seatsValues.length>0||u.form.value.unitsValues&&u.form.value.unitsValues.length>0||C.value&&_n(C.value)||C.value&&hn(C.value))),ve=e.ref(null),{applyPromotionCode:ze,removePromotionCode:At,isPromotionCodePending:Et,promotionCodeErrorMessage:ke}=En({checkoutForm:u,updateInvoicePreviewOnBillingInformationChange:V,formatErrorMessage:({action:I})=>f(I==="apply"?{defaultMessage:"Promotion code could not be applied. Please try again.",id:"checkout.promotion_code.apply_failed",description:"Error message when applying a promotion code in checkout failed"}:{defaultMessage:"Promotion code could not be removed. Please try again.",id:"checkout.promotion_code.remove_failed",description:"Error message when removing a promotion code in checkout failed"}),onInvalidPromotionCode:()=>{ve.value=null},onApplyError:()=>{ve.value=null}});Dn({subscription:C,promotionCode:(He=a.configuration)==null?void 0:He.couponCode,appliedPromotionCode:ve,applyPromotionCode:ze});const je=()=>{E&&pe.safeUrlRedirect(E)},Pt=e.computed(()=>{var I;return!((I=a.configuration)!=null&&I.onPaymentSuccess)&&!!E}),Dt=()=>{var I;if(S.value=!0,ke.value=null,(I=a.configuration)!=null&&I.onPaymentSuccess){a.configuration.onPaymentSuccess();return}if(E){je();return}},Re=I=>{C.value&&(C.value={...C.value,billing_period:I},O())};return e.onMounted(()=>{r("ready")}),(I,x)=>g.value?(e.openBlock(),e.createBlock(Qn,{key:0,class:"sv-checkout sv-root sv-screen sv-checkout--error"})):(e.openBlock(),e.createBlock(e.unref(Gt.ContentWithAsideLayout),{key:1,class:e.normalizeClass(["sv-checkout sv-root sv-screen",{"sv-checkout--paid":e.unref(S)}])},{header:e.withCtx(()=>[e.createElementVNode("div",ko,[e.createVNode(se._sfc_main,{class:"min-h-[52px] w-96"},{default:e.withCtx(()=>{var k,U,z;return[e.unref(v)&&e.unref(C)&&ue.value?(e.openBlock(),e.createBlock(Gn,{key:0,class:"sv-checkout__title","trial-start-date":De.value,"trial-period":e.unref(h),"subscription-start-date":ue.value,"subscription-name":((k=e.unref(C))==null?void 0:k.name)??"",amount:(U=e.unref(v))==null?void 0:U.invoice_amount_including_tax,"billing-period":(z=e.unref(C))==null?void 0:z.billing_period,"country-code":e.unref(u).form.value.country},null,8,["trial-start-date","trial-period","subscription-start-date","subscription-name","amount","billing-period","country-code"])):e.createCommentVNode("",!0)]}),_:1})])]),content:e.withCtx(()=>{var k,U,z;return[e.unref(S)?(e.openBlock(),e.createBlock(Hn,{key:0,class:"sv-checkout__completed-payment",onContinueToMerchant:je})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.unref(C)&&e.unref(A)?(e.openBlock(),e.createBlock(ot,{key:0,class:"sv-checkout__mobile-order-summary",subscription:e.unref(C),invoice:e.unref(v),"invoice-preview-by-billing-period":e.unref(l),"trial-invoice":e.unref(m),"enabled-pricing-ids":q.value,"trial-period":e.unref(h),avatar:(k=s.value)==null?void 0:k.avatar,"is-paid":e.unref(S),"is-usage-based":$.value,"is-preview-and-payment-methods-pending":e.unref(F)||e.unref(Y),"country-code":e.unref(u).form.value.country,collapsible:"collapsed",variant:"products-inline",onBillingPeriodChange:Re},null,8,["subscription","invoice","invoice-preview-by-billing-period","trial-invoice","enabled-pricing-ids","trial-period","avatar","is-paid","is-usage-based","is-preview-and-payment-methods-pending","country-code"])):e.createCommentVNode("",!0),Ct.value&&e.unref(C)?(e.openBlock(),e.createBlock(e.unref(i),{key:1,"seats-values":ge.value,"onUpdate:seatsValues":x[0]||(x[0]=oe=>ge.value=oe),"units-values":fe.value,"onUpdate:unitsValues":x[1]||(x[1]=oe=>fe.value=oe),"enabled-pricing-ids":q.value,"onUpdate:enabledPricingIds":x[2]||(x[2]=oe=>q.value=oe),class:"sv-checkout__plan-customization",subscription:e.unref(C),"initial-seats-values":(U=e.unref(u).initialState)==null?void 0:U.value.seatsValues,"initial-units-values":(z=e.unref(u).initialState)==null?void 0:z.value.unitsValues,"billing-period":e.unref(C).billing_period,currency:J.value},null,8,["seats-values","units-values","enabled-pricing-ids","subscription","initial-seats-values","initial-units-values","billing-period","currency"])):e.createCommentVNode("",!0),e.unref(u).form.value.country&&e.unref(j)&&ye.value?(e.openBlock(),e.createBlock(Mo,{key:2,class:"sv-checkout__express-payment-methods",amount:e.unref(j),"country-code":e.unref(u).form.value.country,locale:e.unref(_),"payment-methods-options-response":e.unref(L)??[],"billing-information":ye.value,"on-billing-information-change":e.unref(V),onUpdateBillingInformation:It},null,8,["amount","country-code","locale","payment-methods-options-response","billing-information","on-billing-information-change"])):e.createCommentVNode("",!0),e.createVNode(Rn,{modelValue:e.unref(u).form.value,"onUpdate:modelValue":x[3]||(x[3]=oe=>e.unref(u).form.value=oe),class:"sv-checkout__customer-form",validation:e.unref(u).validation,"read-only-email":e.unref(b),"show-customer-info-on-top":Nt.value||e.unref(S),"is-billing-information-mandatory":G.value,"get-is-field-required":e.unref(u).getIsFieldRequired,"read-only":e.unref(S)},null,8,["modelValue","validation","read-only-email","show-customer-info-on-top","is-billing-information-mandatory","get-is-field-required","read-only"]),e.createElementVNode("div",wo,[e.createVNode(se._sfc_main,{variant:"section",class:"min-h-[130px]"},{default:e.withCtx(()=>[!e.unref(F)||e.unref(F)&&e.unref(L).length>0?(e.openBlock(),e.createElementBlock("div",So,[e.createVNode(e.unref(T._sfc_main),{variant:"heading-3",tag:"h2",class:"sv-checkout__payment-methods-title mb-2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)({defaultMessage:"Payment method",id:"checkout.payment_method_block.title",description:"The title of the payment method block in the checkout form"})),1)]),_:1}),e.unref(u).form.value.country?e.unref(w)?(e.openBlock(),e.createBlock(me._sfc_main,{key:1,class:"sv-checkout__payment-methods-error",icon:"error"},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)({defaultMessage:"Could not load payment methods",id:"checkout.payment_method_block.load_failed_title",description:"The title shown when the payment methods failed to load"})),1)]),message:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)({defaultMessage:"Check your connection and try again.",id:"checkout.payment_method_block.load_failed_message",description:"The message shown when the payment methods failed to load"})),1)]),action:e.withCtx(()=>[e.createVNode(e.unref(te._sfc_main),{type:"button",intent:"secondary",size:"sm",class:"sv-action sv-action--secondary sv-checkout__payment-methods-retry",onClick:e.unref(p)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)({defaultMessage:"Try again",id:"checkout.payment_method_block.load_failed_retry_button.label",description:"The label of the button that loads the payment methods again"})),1)]),_:1},8,["onClick"])]),_:1})):e.unref(L).length===0?(e.openBlock(),e.createBlock(me._sfc_main,{key:2,class:"sv-checkout__payment-methods-empty",icon:"credit_card_off"},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)({defaultMessage:"No payment methods available",id:"checkout.payment_method_block.no_payment_methods_available_title",description:"The title shown when there are no available payment methods"})),1)]),_:1})):e.unref(j)&&e.unref(u).form.value.country?(e.openBlock(),e.createElementBlock("div",To,[e.createElementVNode("div",{class:e.normalizeClass({"pointer-events-none opacity-60":R.value})},[e.createVNode(e.unref(o),{ref_key:"paymentIntegrationFormRef",ref:d,"country-code":e.unref(u).form.value.country,context:e.unref(D),amount:e.unref(j),email:e.unref(u).form.value.email,variant:"AUTHORIZE","payment-method-options":e.unref(L)??[],"validate-on-submit":B,"redirects-on-success":Pt.value,"force-store-payment-method":"",onPaymentSuccess:Dt,onPaymentFailed:Q,onReady:x[4]||(x[4]=oe=>r("ready"))},null,8,["country-code","context","amount","email","payment-method-options","redirects-on-success"])],2)])):e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(me._sfc_main,{key:0,class:"sv-checkout__payment-methods-empty",icon:"captive_portal"},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)({defaultMessage:"Select your billing country",id:"checkout.payment_method_block.no_country_selected_title",description:"The title shown when no country is selected"})),1)]),message:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)({defaultMessage:"Payment methods will be shown after you select the billing country.",id:"checkout.payment_method_block.no_country_selected_message",description:"The message shown when no country is selected"})),1)]),_:1}))])):e.createCommentVNode("",!0)]),_:1})])],64))]}),aside:e.withCtx(()=>[e.createElementVNode("div",Lo,[e.createVNode(se._sfc_main,{variant:"section",class:"min-h-[220px]"},{default:e.withCtx(()=>{var k;return[e.unref(C)&&e.unref(v)?(e.openBlock(),e.createBlock(ot,{key:0,subscription:e.unref(C),invoice:e.unref(v),"invoice-preview-by-billing-period":e.unref(l),"trial-invoice":e.unref(m),"enabled-pricing-ids":q.value,"trial-period":e.unref(h),"country-code":e.unref(u).form.value.country,avatar:(k=s.value)==null?void 0:k.avatar,"is-paid":e.unref(S),"is-usage-based":$.value,"is-preview-and-payment-methods-pending":e.unref(F)||e.unref(Y),onBillingPeriodChange:Re},null,8,["subscription","invoice","invoice-preview-by-billing-period","trial-invoice","enabled-pricing-ids","trial-period","country-code","avatar","is-paid","is-usage-based","is-preview-and-payment-methods-pending"])):e.createCommentVNode("",!0)]}),_:1})]),e.unref(S)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(xo,{class:"sv-checkout__promotion-code","promotion-code":ve.value,"onUpdate:appliedCode":x[5]||(x[5]=k=>ve.value=k),onRemove:e.unref(At),onApply:e.unref(ze)},null,8,["promotion-code","onRemove","onApply"]),e.unref(ke)?(e.openBlock(),e.createBlock(e.unref(xt._sfc_main),{key:0,class:"sv-checkout__promotion-error mt-2",title:e.unref(ke)},null,8,["title"])):e.createCommentVNode("",!0),e.createElementVNode("div",Bo,[e.createVNode(se._sfc_main,{class:"sv-checkout__submit-skeleton min-h-[44px]"},{default:e.withCtx(()=>[e.unref(v)?(e.openBlock(),e.createBlock(e.unref(te._sfc_main),{key:0,type:"button",size:"lg",class:"sv-action sv-action--primary sv-action--full-width sv-checkout__submit w-full",disabled:e.unref(Et)||e.unref(L).length===0||R.value,loading:R.value,onClick:Z},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(K.value?e.unref(f)({defaultMessage:"Start trial",id:"checkout.pay_and_subscribe_button_trial.label",description:"The label of the start trial button in the checkout form"}):e.unref(f)({defaultMessage:"Pay and subscribe",id:"checkout.pay_and_subscribe_button.label",description:"The label of the pay and subscribe button in the checkout form"})),1)]),_:1},8,["disabled","loading"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(rt._sfc_main$1,{"payment-method-options":e.unref(L)},null,8,["payment-method-options"])])],64))]),_:1},8,["class"]))}}),Oo=e.defineComponent({__name:"Checkout.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},emits:["error","ready"],setup(t,{emit:n}){var s;const o=Kt.getComponentName("checkout"),i=t,a=n,r=((s=i.configuration)==null?void 0:s.couponCode)??pe.getQueryParam("coupon_code")??void 0;return(g,d)=>(e.openBlock(),e.createBlock(e.unref(T._sfc_main$1),{entry:g.$props,"component-name":e.unref(o),"allowed-portal-types":["INIT_PRICING_PLAN_SUBSCRIPTION"],onError:d[1]||(d[1]=N=>g.$emit("error",N))},{default:e.withCtx(()=>{var N,f,_,M,c;return[e.createVNode(Vo,{configuration:{avatar:(f=(N=t.branding)==null?void 0:N.emblem)==null?void 0:f.public_url,email:(_=t.configuration)==null?void 0:_.email,countryCode:(M=t.configuration)==null?void 0:M.countryCode,enabledPricingIds:(c=t.configuration)==null?void 0:c.enabledPricingIds,couponCode:e.unref(r)},onReady:d[0]||(d[0]=A=>a("ready"))},e.createSlots({_:2},[g.$slots["terms-and-conditions"]?{name:"terms-and-conditions",fn:e.withCtx(()=>[e.renderSlot(g.$slots,"terms-and-conditions")]),key:"0"}:void 0]),1032,["configuration"])]}),_:3},8,["entry","component-name"]))}}),{define:zo}=T.createSolvimonElement(Oo,"checkout");exports.FALLBACK_SEATS_NUMBER=vt;exports.FALLBACK_UNITS_NUMBER=_t;exports._sfc_main=ht;exports.defineSolvimonCheckout=zo;exports.getPricingItemByPricingConfigId=Mn;
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as f, computed as o, openBlock as u, createBlock as g, resolveDynamicComponent as x, mergeProps as h, withCtx as m, createVNode as b, unref as c, normalizeClass as l, renderSlot as v, createTextVNode as y, toDisplayString as C, createElementBlock as w, createCommentVNode as p } from "vue";
2
- import { _ as z } from "./customElements-Com2NiGU.mjs";
3
- import { a as B } from "./Button.vue.es-VQCd3V3C.mjs";
2
+ import { _ as z } from "./customElements-CSE7dwUr.mjs";
3
+ import { a as B } from "./Button.vue.es-Dz-2L8dJ.mjs";
4
4
  const s = {
5
5
  neutral: {
6
6
  base: "bg-gray-50",
@@ -1 +1 @@
1
- const e=require("vue"),d=require("./customElements-Bt8PbjIn.js"),u=require("./Button.vue.es-BWl37nzm.js"),o={neutral:{base:"bg-gray-50",text:"text-gray-700",border:"border-gray-100"},brand:{base:"bg-primary-50",text:"text-primary-700",border:"border-primary-100"},info:{base:"bg-blue-50",text:"text-blue-700",border:"border-blue-100"},success:{base:"bg-green-50",text:"text-green-700",border:"border-green-100"},warning:{base:"bg-yellow-50",text:"text-yellow-700",border:"border-yellow-100"},danger:{base:"bg-red-50",text:"text-red-700",border:"border-red-100"},emphasis:{base:"bg-teal-50",text:"text-teal-700",border:"border-teal-100"}},c=e.defineComponent({__name:"Chip",props:{intent:{default:"neutral"},content:{},removable:{type:Boolean,default:!1},size:{default:"md"},variant:{default:"default"},textClass:{},tag:{default:"span"},hasChipBefore:{type:Boolean},hasChipAfter:{type:Boolean}},emits:["removed"],setup(t){const a=t,r=e.computed(()=>o[a.intent].base),n=e.computed(()=>o[a.intent].text),s=e.computed(()=>o[a.intent].border);return(l,i)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),e.mergeProps(l.$attrs,{class:["box-content inline-flex items-center gap-1 whitespace-nowrap rounded-sm border pl-1.5",{"pr-1.5":!t.removable,"h-4 px-1.5":t.size==="xs","h-4":t.size==="sm","h-5":t.size==="md","h-6":t.size==="lg","rounded-r-none":t.hasChipAfter,"rounded-l-none":t.hasChipBefore,[n.value]:!!n.value,[r.value]:!!r.value&&t.variant!=="outline","bg-transparent":t.variant==="outline",[s.value]:!!s.value}]}),{default:e.withCtx(()=>[e.createVNode(e.unref(d._sfc_main),{tag:"span",variant:"body-xs",weight:"normal",color:"inherit",center:"",class:e.normalizeClass([t.textClass,"inline-flex h-full flex-grow items-center justify-center gap-1 leading-none"])},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.content),1)])]),_:3},8,["class"]),t.removable?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass([{"h-5 w-4":t.size==="sm","h-5 w-5":t.size==="md","h-5 w-6":t.size==="lg",[r.value]:!!r.value},"flex aspect-square h-full items-center justify-center rounded"]),type:"button",title:"Remove",onClick:i[0]||(i[0]=m=>l.$emit("removed"))},[e.createVNode(e.unref(u._sfc_main$1),{class:e.normalizeClass(n.value),icon:"close",size:"xs"},null,8,["class"])],2)):e.createCommentVNode("",!0)]),_:3},16,["class"]))}});exports._sfc_main=c;
1
+ const e=require("vue"),d=require("./customElements-Vox1PB6G.js"),u=require("./Button.vue.es-M_jXZda4.js"),o={neutral:{base:"bg-gray-50",text:"text-gray-700",border:"border-gray-100"},brand:{base:"bg-primary-50",text:"text-primary-700",border:"border-primary-100"},info:{base:"bg-blue-50",text:"text-blue-700",border:"border-blue-100"},success:{base:"bg-green-50",text:"text-green-700",border:"border-green-100"},warning:{base:"bg-yellow-50",text:"text-yellow-700",border:"border-yellow-100"},danger:{base:"bg-red-50",text:"text-red-700",border:"border-red-100"},emphasis:{base:"bg-teal-50",text:"text-teal-700",border:"border-teal-100"}},c=e.defineComponent({__name:"Chip",props:{intent:{default:"neutral"},content:{},removable:{type:Boolean,default:!1},size:{default:"md"},variant:{default:"default"},textClass:{},tag:{default:"span"},hasChipBefore:{type:Boolean},hasChipAfter:{type:Boolean}},emits:["removed"],setup(t){const a=t,r=e.computed(()=>o[a.intent].base),n=e.computed(()=>o[a.intent].text),s=e.computed(()=>o[a.intent].border);return(l,i)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),e.mergeProps(l.$attrs,{class:["box-content inline-flex items-center gap-1 whitespace-nowrap rounded-sm border pl-1.5",{"pr-1.5":!t.removable,"h-4 px-1.5":t.size==="xs","h-4":t.size==="sm","h-5":t.size==="md","h-6":t.size==="lg","rounded-r-none":t.hasChipAfter,"rounded-l-none":t.hasChipBefore,[n.value]:!!n.value,[r.value]:!!r.value&&t.variant!=="outline","bg-transparent":t.variant==="outline",[s.value]:!!s.value}]}),{default:e.withCtx(()=>[e.createVNode(e.unref(d._sfc_main),{tag:"span",variant:"body-xs",weight:"normal",color:"inherit",center:"",class:e.normalizeClass([t.textClass,"inline-flex h-full flex-grow items-center justify-center gap-1 leading-none"])},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.content),1)])]),_:3},8,["class"]),t.removable?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass([{"h-5 w-4":t.size==="sm","h-5 w-5":t.size==="md","h-5 w-6":t.size==="lg",[r.value]:!!r.value},"flex aspect-square h-full items-center justify-center rounded"]),type:"button",title:"Remove",onClick:i[0]||(i[0]=m=>l.$emit("removed"))},[e.createVNode(e.unref(u._sfc_main$1),{class:e.normalizeClass(n.value),icon:"close",size:"xs"},null,8,["class"])],2)):e.createCommentVNode("",!0)]),_:3},16,["class"]))}});exports._sfc_main=c;
@@ -1 +1 @@
1
- const e=require("vue"),u=require("./floating-ui.vue.es-Bly3DGWm.js"),f=require("./customElements-Bt8PbjIn.js"),k=require("./Button.vue.es-BWl37nzm.js"),w=require("./DividerText.vue.es-BBdydUy_.js"),g=require("./Divider.vue.es-UwnWvUTl.js"),h=require("./index.es-BclokHQX.js"),$=require("./object.es-CdriXMPs.js"),S=require("./Chip.vue.es-DUgjuRWm.js"),V=e.defineComponent({__name:"FullClickableBlock",props:{tag:{default:"div"}},setup(t){return(o,l)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),{class:"relative"},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3}))}}),E={},M={class:"appearance-none after:absolute after:inset-0"};function F(t,o){return e.openBlock(),e.createElementBlock("button",M,[e.renderSlot(t.$slots,"default")])}const D=u._export_sfc(E,[["render",F]]),N={key:0},T={key:1},P=e.defineComponent({__name:"ListGroupItem",props:{disabled:{type:Boolean,default:!1},onClick:{},dataTestid:{},variant:{}},setup(t){return(o,l)=>(e.openBlock(),e.createBlock(e.unref(V),{tag:"li",class:e.normalizeClass(["w-full border-b border-gray-200 px-4 py-2 transition-colors",{block:!t.disabled&&t.onClick,"focus-within:bg-gray-50 focus-within:text-default hover:bg-gray-50 hover:text-default":!t.disabled&&t.onClick&&t.variant!=="danger","text-red-700 focus-within:bg-red-50 focus-within:text-red-700 hover:bg-red-50":!t.disabled&&t.onClick&&t.variant==="danger","cursor-not-allowed bg-gray-50 text-disabled":t.disabled}]),onClick:l[1]||(l[1]=e.withModifiers(()=>{},["stop"]))},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.onClick?e.unref(D):"span"),{class:"flex w-full items-start gap-2 text-left focus:outline-none active:outline-none",disabled:t.onClick?t.disabled:void 0,type:t.onClick?"button":void 0,"data-testid":t.dataTestid,onClick:l[0]||(l[0]=n=>{var s;return(s=t.onClick)==null?void 0:s.call(t)})},{default:e.withCtx(()=>[o.$slots.prefix?(e.openBlock(),e.createElementBlock("div",N,[e.renderSlot(o.$slots,"prefix")])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"default"),o.$slots.suffix?(e.openBlock(),e.createElementBlock("div",T,[e.renderSlot(o.$slots,"suffix")])):e.createCommentVNode("",!0)]),_:3},8,["disabled","type","data-testid"])),o.$slots.description?(e.openBlock(),e.createBlock(e.unref(f._sfc_main),{key:0,tag:"span",variant:"body-xs",class:"mt-0.5 font-normal",color:t.disabled?"inherit":"secondary"},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"description")]),_:3},8,["color"])):e.createCommentVNode("",!0)]),_:3},8,["class"]))}}),y=e.defineComponent({__name:"ContextMenuItem",props:{icon:{},label:{},description:{},labelSuffixComponent:{},labelPrefixComponent:{},onClick:{type:Function},classes:{},variant:{},testId:{},disabled:{type:Boolean},active:{type:Boolean}},setup(t){return(o,l)=>(e.openBlock(),e.createBlock(e.unref(P),{class:e.normalizeClass(["border-none",{[`${t.classes}`]:!!t.classes,"bg-primary-50 text-primary-700":t.active}]),"data-testid":t.testId,disabled:t.disabled,variant:t.variant,onClick:t.onClick},e.createSlots({default:e.withCtx(()=>[t.labelPrefixComponent?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.labelPrefixComponent.component),e.normalizeProps(e.mergeProps({key:0},t.labelPrefixComponent.props)),null,16)):e.createCommentVNode("",!0),e.createVNode(e.unref(f._sfc_main),{tag:"span",variant:"body-sm",color:"inherit"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:1}),t.labelSuffixComponent?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.labelSuffixComponent.component),e.mergeProps({key:1},t.labelSuffixComponent.props,{class:"ml-2"}),null,16)):e.createCommentVNode("",!0)]),_:2},[t.icon?{name:"prefix",fn:e.withCtx(()=>[e.createVNode(e.unref(k._sfc_main$1),{icon:t.icon},null,8,["icon"])]),key:"0"}:void 0,t.description?{name:"description",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.description),1)]),key:"1"}:void 0]),1032,["class","data-testid","disabled","variant","onClick"]))}}),z=e.defineComponent({__name:"ContextMenuGroup",props:{label:{},items:{}},setup(t){return(o,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(w._sfc_main),{"has-outer-divider":""},{default:e.withCtx(()=>[e.createVNode(e.unref(f._sfc_main),{class:"py-2",variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:1})]),_:1}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(n,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:s},[n==="divider"?(e.openBlock(),e.createBlock(e.unref(g._sfc_main),{key:0})):n.label?(e.openBlock(),e.createBlock(y,{key:1,label:n.label,"on-click":n.onClick,icon:n.icon,variant:n.variant,classes:n.classes,"label-suffix-component":n.labelSuffixComponent,"label-prefix-component":n.labelPrefixComponent,disabled:n.disabled,active:n.active},null,8,["label","on-click","icon","variant","classes","label-suffix-component","label-prefix-component","disabled","active"])):e.createCommentVNode("",!0)],64))),128))],64))}}),q={};function A(t,o){return e.openBlock(),e.createBlock(e.TransitionGroup,{"enter-active-class":"duration-100 ease-out transform-gpu","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"duration-100 ease-in transform-gpu","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3})}const B=u._export_sfc(q,[["render",A]]),p=(t,o=!0,l=[])=>(t.forEach(n=>{if(n!==null){if(typeof n!="object"){(typeof n=="string"||typeof n=="number")&&l.push(e.createTextVNode(String(n)));return}if(Array.isArray(n)){p(n,o,l);return}if(n.type===e.Fragment){if(n.children===null)return;Array.isArray(n.children)&&p(n.children,o,l)}else n.type!==e.Comment&&l.push(n)}}),l),j=(t,o="default",l=void 0)=>{const n=t[o];if(!n)return null;const s=p(n(l));return s.length===1?s[0]:null},I={focus:["onFocus","onBlur"],click:["onClick"],hover:["onMouseenter","onMouseleave"]};function L(t,o){Object.entries(I).forEach(([,l])=>{l.forEach(n=>{t.props?t.props=Object.assign({},t.props):t.props={};const s=t.props[n],d=o[n];s?t.props[n]=(...a)=>{s(...a),d(...a)}:t.props[n]=d})})}const C=e.defineComponent({name:"SlotListener",props:{trigger:{type:String,default:"click"}},emits:["click","focus","blur","mouseenter","mouseleave"],setup(t,{emit:o}){return{handleClick:r=>{o("click",r)},handleBlur:r=>{o("blur",r)},handleFocus:r=>{o("focus",r)},handleMouseLeave:r=>{o("mouseleave",r)},handleMouseEnter:r=>{o("mouseenter",r)}}},render(){const{$slots:t}=this,o={onClick:this.handleClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur},l=j(t,"default"),n=[o];return l!=null&&l.props&&n.push($.pick(l.props,"onClick","onMouseenter","onMouseleave","onFocus","onBlur")),l&&L(l,{onBlur:d=>{n.forEach(a=>{var r;(r=a==null?void 0:a.onBlur)==null||r.call(a,d)})},onFocus:d=>{n.forEach(a=>{var r;(r=a==null?void 0:a.onFocus)==null||r.call(a,d)})},onClick:d=>{n.forEach(a=>{var r;(r=a==null?void 0:a.onClick)==null||r.call(a,d)})},onMouseenter:d=>{n.forEach(a=>{var r;(r=a==null?void 0:a.onMouseenter)==null||r.call(a,d)})},onMouseleave:d=>{n.forEach(a=>{var r;(r=a==null?void 0:a.onMouseleave)==null||r.call(a,d)})}}),l}}),O=["id"],x=e.defineComponent({__name:"Portal",props:{to:{},name:{},disabled:{type:Boolean}},setup(t){const o=t,l=o.to?e.inject(f.getPortalInjectKey(o.to),null):null,n=l!==null;return e.onMounted(()=>{if(!(o.name||o.to))throw new Error("Define either the `to` or the `name` prop.")}),(s,d)=>t.name?(e.openBlock(),e.createElementBlock("div",{key:0,id:`portal-${t.name}`},null,8,O)):t.to&&n&&e.unref(l)?(e.openBlock(),e.createBlock(e.Teleport,{key:1,to:e.unref(l),disabled:t.disabled},[e.renderSlot(s.$slots,"default")],8,["to","disabled"])):t.to&&!n?(e.openBlock(),e.createBlock(e.Teleport,{key:2,to:`#portal-${t.to}`,disabled:t.disabled},[e.renderSlot(s.$slots,"default")],8,["to","disabled"])):e.createCommentVNode("",!0)}}),H={class:"inline-flex items-center"},G=e.defineComponent({__name:"Dropdown",props:{placement:{default:"bottom-end"},text:{default:""},transition:{default:""},offset:{default:8},disabled:{type:Boolean},isPortalDisabled:{type:Boolean},dropdownClass:{}},setup(t){const o=t,l=e.ref(!1),n=()=>l.value=!1,s=()=>{o.disabled||(l.value=!l.value)},d={bottom:"to-bottom","bottom-start":"to-bottom","bottom-end":"to-bottom",left:"to-left","left-start":"to-left","left-end":"to-left",right:"to-right","right-start":"to-right","right-end":"to-right",top:"to-top","top-start":"to-top","top-end":"to-top"},a=e.ref(),r=e.ref(),c=e.ref(),i=e.computed(()=>o.transition===null?d[o.placement]:o.transition),{floatingStyles:m}=u.useFloating(c,r,{whileElementsMounted:u.autoUpdate,placement:o.placement,middleware:[u.offset(o.offset),u.flip()]});return h.onClickOutside(c,()=>{l.value&&(l.value=!1)}),h.onKeyStroke("Escape",()=>{l.value=!1}),(b,v)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:c,class:"relative inline-flex"},[e.createElementVNode("div",H,[e.createVNode(e.unref(C),{onClick:s},{default:e.withCtx(()=>[e.renderSlot(b.$slots,"trigger",{visible:l.value},()=>[e.createVNode(e.unref(k._sfc_main),{ref_key:"trigger",ref:a},{suffix:e.withCtx(()=>[...v[0]||(v[0]=[e.createElementVNode("svg",{class:"ml-2 h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"})],-1)])]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.text)+" ",1)]),_:1},512)],!0)]),_:3})]),e.createVNode(e.unref(x),{to:e.unref(f.DROPDOWN_PORTAL_NAME),disabled:t.isPortalDisabled},{default:e.withCtx(()=>[e.createVNode(e.Transition,{name:i.value},{default:e.withCtx(()=>[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"content",ref:r,style:e.normalizeStyle(e.unref(m)),class:e.normalizeClass(["z-60 divide-y divide-gray-100 rounded bg-white shadow",t.dropdownClass])},[e.createVNode(e.unref(C),{onClick:n},{default:e.withCtx(()=>[e.renderSlot(b.$slots,"default",{},void 0,!0)]),_:3})],6)):e.createCommentVNode("",!0)]),_:3},8,["name"])]),_:3},8,["to","disabled"])],512))}}),R=u._export_sfc(G,[["__scopeId","data-v-c0f85806"]]),K=e.defineComponent({__name:"ListGroup",props:{width:{default:"default"}},setup(t){return(o,l)=>(e.openBlock(),e.createElementBlock("ul",{class:e.normalizeClass(["overflow-hidden rounded border border-gray-200 bg-white text-sm font-medium",{"w-48":t.width==="default","w-64":t.width==="wide"}])},[e.renderSlot(o.$slots,"default")],2))}}),U={class:"relative inline-flex"},W=e.defineComponent({inheritAttrs:!1,__name:"ContextMenu",props:{items:{},icon:{default:"more_vert"},square:{type:Boolean,default:!1},outlined:{type:Boolean},width:{},disabled:{type:Boolean,default:void 0},isPortalDisabled:{type:Boolean},triggerSize:{default:"sm"},dropdownClass:{},showActiveCount:{type:Boolean,default:!0}},setup(t){const o=t,l=e.useSlots(),n=e.computed(()=>{var a,r;return o.disabled??(((r=((a=o.items)==null?void 0:a.flatMap(c=>c!=="divider"&&"items"in c?c.items:c))??[])==null?void 0:r.filter(c=>c!=="divider").every(c=>c.disabled))&&!l.default)}),s=a=>(a??[]).reduce((r,c)=>c==="divider"?r:"items"in c?r+s(c.items):r+(c.active?1:0),0),d=e.computed(()=>s(o.items));return(a,r)=>(e.openBlock(),e.createElementBlock("div",U,[e.createVNode(e.unref(B),null,{default:e.withCtx(()=>{var c;return[(c=t.items)!=null&&c.length||a.$slots.default||t.disabled?(e.openBlock(),e.createBlock(e.unref(R),e.mergeProps({key:0,"is-portal-disabled":n.value},a.$attrs,{"dropdown-class":t.dropdownClass}),{trigger:e.withCtx(({visible:i})=>[e.renderSlot(a.$slots,"trigger",{visible:i},()=>[e.createVNode(e.unref(k._sfc_main),{type:"button",pill:!t.square,square:"",intent:t.outlined?"secondary":"subtle",size:t.triggerSize,"data-testid":"context-menu",disabled:n.value,"icon-prefix":t.icon,onClick:r[0]||(r[0]=e.withModifiers(()=>{},["stop"]))},null,8,["pill","intent","size","disabled","icon-prefix"])])]),default:e.withCtx(()=>[t.items||a.$slots.default?(e.openBlock(),e.createBlock(e.unref(K),{key:0,width:t.width,class:"z-60 p-0.5"},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"header"),t.items?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.items,(i,m)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:m},[i==="divider"&&m<t.items.length-1?(e.openBlock(),e.createBlock(e.unref(g._sfc_main),{key:0,spacing:"none"})):i!=="divider"&&!("items"in i)?(e.openBlock(),e.createBlock(y,{key:1,label:i.label,variant:i.variant,icon:i.icon,"label-suffix-component":i.labelSuffixComponent,"label-prefix-component":i.labelPrefixComponent,description:i.description,classes:i.classes,"test-id":i.testId,disabled:i.disabled,active:i.active,onClick:i.onClick},null,8,["label","variant","icon","label-suffix-component","label-prefix-component","description","classes","test-id","disabled","active","onClick"])):i!=="divider"?(e.openBlock(),e.createBlock(z,{key:2,class:"rounded-sm",label:i.label,items:i.items},null,8,["label","items"])):e.createCommentVNode("",!0)],64))),128)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"default")]),_:3},8,["width"])):e.createCommentVNode("",!0)]),_:3},16,["is-portal-disabled","dropdown-class"])):e.createCommentVNode("",!0)]}),_:3}),t.showActiveCount&&d.value>0?(e.openBlock(),e.createBlock(e.unref(S._sfc_main),{key:0,size:"xs",intent:"brand",class:"pointer-events-none absolute -right-1.5 -top-1.5","data-testid":"context-menu-active-count"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.value),1)]),_:1})):e.createCommentVNode("",!0)]))}});exports.Fade=B;exports._sfc_main=x;exports._sfc_main$1=W;
1
+ const e=require("vue"),u=require("./floating-ui.vue.es-Bly3DGWm.js"),f=require("./customElements-Vox1PB6G.js"),k=require("./Button.vue.es-M_jXZda4.js"),w=require("./DividerText.vue.es-D-QxT2OD.js"),g=require("./Divider.vue.es-UwnWvUTl.js"),h=require("./index.es-BclokHQX.js"),$=require("./object.es-CdriXMPs.js"),S=require("./Chip.vue.es-G8doKsZb.js"),V=e.defineComponent({__name:"FullClickableBlock",props:{tag:{default:"div"}},setup(t){return(o,l)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),{class:"relative"},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3}))}}),E={},M={class:"appearance-none after:absolute after:inset-0"};function F(t,o){return e.openBlock(),e.createElementBlock("button",M,[e.renderSlot(t.$slots,"default")])}const D=u._export_sfc(E,[["render",F]]),N={key:0},T={key:1},P=e.defineComponent({__name:"ListGroupItem",props:{disabled:{type:Boolean,default:!1},onClick:{},dataTestid:{},variant:{}},setup(t){return(o,l)=>(e.openBlock(),e.createBlock(e.unref(V),{tag:"li",class:e.normalizeClass(["w-full border-b border-gray-200 px-4 py-2 transition-colors",{block:!t.disabled&&t.onClick,"focus-within:bg-gray-50 focus-within:text-default hover:bg-gray-50 hover:text-default":!t.disabled&&t.onClick&&t.variant!=="danger","text-red-700 focus-within:bg-red-50 focus-within:text-red-700 hover:bg-red-50":!t.disabled&&t.onClick&&t.variant==="danger","cursor-not-allowed bg-gray-50 text-disabled":t.disabled}]),onClick:l[1]||(l[1]=e.withModifiers(()=>{},["stop"]))},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.onClick?e.unref(D):"span"),{class:"flex w-full items-start gap-2 text-left focus:outline-none active:outline-none",disabled:t.onClick?t.disabled:void 0,type:t.onClick?"button":void 0,"data-testid":t.dataTestid,onClick:l[0]||(l[0]=n=>{var s;return(s=t.onClick)==null?void 0:s.call(t)})},{default:e.withCtx(()=>[o.$slots.prefix?(e.openBlock(),e.createElementBlock("div",N,[e.renderSlot(o.$slots,"prefix")])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"default"),o.$slots.suffix?(e.openBlock(),e.createElementBlock("div",T,[e.renderSlot(o.$slots,"suffix")])):e.createCommentVNode("",!0)]),_:3},8,["disabled","type","data-testid"])),o.$slots.description?(e.openBlock(),e.createBlock(e.unref(f._sfc_main),{key:0,tag:"span",variant:"body-xs",class:"mt-0.5 font-normal",color:t.disabled?"inherit":"secondary"},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"description")]),_:3},8,["color"])):e.createCommentVNode("",!0)]),_:3},8,["class"]))}}),y=e.defineComponent({__name:"ContextMenuItem",props:{icon:{},label:{},description:{},labelSuffixComponent:{},labelPrefixComponent:{},onClick:{type:Function},classes:{},variant:{},testId:{},disabled:{type:Boolean},active:{type:Boolean}},setup(t){return(o,l)=>(e.openBlock(),e.createBlock(e.unref(P),{class:e.normalizeClass(["border-none",{[`${t.classes}`]:!!t.classes,"bg-primary-50 text-primary-700":t.active}]),"data-testid":t.testId,disabled:t.disabled,variant:t.variant,onClick:t.onClick},e.createSlots({default:e.withCtx(()=>[t.labelPrefixComponent?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.labelPrefixComponent.component),e.normalizeProps(e.mergeProps({key:0},t.labelPrefixComponent.props)),null,16)):e.createCommentVNode("",!0),e.createVNode(e.unref(f._sfc_main),{tag:"span",variant:"body-sm",color:"inherit"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:1}),t.labelSuffixComponent?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.labelSuffixComponent.component),e.mergeProps({key:1},t.labelSuffixComponent.props,{class:"ml-2"}),null,16)):e.createCommentVNode("",!0)]),_:2},[t.icon?{name:"prefix",fn:e.withCtx(()=>[e.createVNode(e.unref(k._sfc_main$1),{icon:t.icon},null,8,["icon"])]),key:"0"}:void 0,t.description?{name:"description",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.description),1)]),key:"1"}:void 0]),1032,["class","data-testid","disabled","variant","onClick"]))}}),z=e.defineComponent({__name:"ContextMenuGroup",props:{label:{},items:{}},setup(t){return(o,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(w._sfc_main),{"has-outer-divider":""},{default:e.withCtx(()=>[e.createVNode(e.unref(f._sfc_main),{class:"py-2",variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:1})]),_:1}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(n,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:s},[n==="divider"?(e.openBlock(),e.createBlock(e.unref(g._sfc_main),{key:0})):n.label?(e.openBlock(),e.createBlock(y,{key:1,label:n.label,"on-click":n.onClick,icon:n.icon,variant:n.variant,classes:n.classes,"label-suffix-component":n.labelSuffixComponent,"label-prefix-component":n.labelPrefixComponent,disabled:n.disabled,active:n.active},null,8,["label","on-click","icon","variant","classes","label-suffix-component","label-prefix-component","disabled","active"])):e.createCommentVNode("",!0)],64))),128))],64))}}),q={};function A(t,o){return e.openBlock(),e.createBlock(e.TransitionGroup,{"enter-active-class":"duration-100 ease-out transform-gpu","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"duration-100 ease-in transform-gpu","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3})}const B=u._export_sfc(q,[["render",A]]),p=(t,o=!0,l=[])=>(t.forEach(n=>{if(n!==null){if(typeof n!="object"){(typeof n=="string"||typeof n=="number")&&l.push(e.createTextVNode(String(n)));return}if(Array.isArray(n)){p(n,o,l);return}if(n.type===e.Fragment){if(n.children===null)return;Array.isArray(n.children)&&p(n.children,o,l)}else n.type!==e.Comment&&l.push(n)}}),l),j=(t,o="default",l=void 0)=>{const n=t[o];if(!n)return null;const s=p(n(l));return s.length===1?s[0]:null},I={focus:["onFocus","onBlur"],click:["onClick"],hover:["onMouseenter","onMouseleave"]};function L(t,o){Object.entries(I).forEach(([,l])=>{l.forEach(n=>{t.props?t.props=Object.assign({},t.props):t.props={};const s=t.props[n],d=o[n];s?t.props[n]=(...a)=>{s(...a),d(...a)}:t.props[n]=d})})}const C=e.defineComponent({name:"SlotListener",props:{trigger:{type:String,default:"click"}},emits:["click","focus","blur","mouseenter","mouseleave"],setup(t,{emit:o}){return{handleClick:r=>{o("click",r)},handleBlur:r=>{o("blur",r)},handleFocus:r=>{o("focus",r)},handleMouseLeave:r=>{o("mouseleave",r)},handleMouseEnter:r=>{o("mouseenter",r)}}},render(){const{$slots:t}=this,o={onClick:this.handleClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur},l=j(t,"default"),n=[o];return l!=null&&l.props&&n.push($.pick(l.props,"onClick","onMouseenter","onMouseleave","onFocus","onBlur")),l&&L(l,{onBlur:d=>{n.forEach(a=>{var r;(r=a==null?void 0:a.onBlur)==null||r.call(a,d)})},onFocus:d=>{n.forEach(a=>{var r;(r=a==null?void 0:a.onFocus)==null||r.call(a,d)})},onClick:d=>{n.forEach(a=>{var r;(r=a==null?void 0:a.onClick)==null||r.call(a,d)})},onMouseenter:d=>{n.forEach(a=>{var r;(r=a==null?void 0:a.onMouseenter)==null||r.call(a,d)})},onMouseleave:d=>{n.forEach(a=>{var r;(r=a==null?void 0:a.onMouseleave)==null||r.call(a,d)})}}),l}}),O=["id"],x=e.defineComponent({__name:"Portal",props:{to:{},name:{},disabled:{type:Boolean}},setup(t){const o=t,l=o.to?e.inject(f.getPortalInjectKey(o.to),null):null,n=l!==null;return e.onMounted(()=>{if(!(o.name||o.to))throw new Error("Define either the `to` or the `name` prop.")}),(s,d)=>t.name?(e.openBlock(),e.createElementBlock("div",{key:0,id:`portal-${t.name}`},null,8,O)):t.to&&n&&e.unref(l)?(e.openBlock(),e.createBlock(e.Teleport,{key:1,to:e.unref(l),disabled:t.disabled},[e.renderSlot(s.$slots,"default")],8,["to","disabled"])):t.to&&!n?(e.openBlock(),e.createBlock(e.Teleport,{key:2,to:`#portal-${t.to}`,disabled:t.disabled},[e.renderSlot(s.$slots,"default")],8,["to","disabled"])):e.createCommentVNode("",!0)}}),H={class:"inline-flex items-center"},G=e.defineComponent({__name:"Dropdown",props:{placement:{default:"bottom-end"},text:{default:""},transition:{default:""},offset:{default:8},disabled:{type:Boolean},isPortalDisabled:{type:Boolean},dropdownClass:{}},setup(t){const o=t,l=e.ref(!1),n=()=>l.value=!1,s=()=>{o.disabled||(l.value=!l.value)},d={bottom:"to-bottom","bottom-start":"to-bottom","bottom-end":"to-bottom",left:"to-left","left-start":"to-left","left-end":"to-left",right:"to-right","right-start":"to-right","right-end":"to-right",top:"to-top","top-start":"to-top","top-end":"to-top"},a=e.ref(),r=e.ref(),c=e.ref(),i=e.computed(()=>o.transition===null?d[o.placement]:o.transition),{floatingStyles:m}=u.useFloating(c,r,{whileElementsMounted:u.autoUpdate,placement:o.placement,middleware:[u.offset(o.offset),u.flip()]});return h.onClickOutside(c,()=>{l.value&&(l.value=!1)}),h.onKeyStroke("Escape",()=>{l.value=!1}),(b,v)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:c,class:"relative inline-flex"},[e.createElementVNode("div",H,[e.createVNode(e.unref(C),{onClick:s},{default:e.withCtx(()=>[e.renderSlot(b.$slots,"trigger",{visible:l.value},()=>[e.createVNode(e.unref(k._sfc_main),{ref_key:"trigger",ref:a},{suffix:e.withCtx(()=>[...v[0]||(v[0]=[e.createElementVNode("svg",{class:"ml-2 h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"})],-1)])]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.text)+" ",1)]),_:1},512)],!0)]),_:3})]),e.createVNode(e.unref(x),{to:e.unref(f.DROPDOWN_PORTAL_NAME),disabled:t.isPortalDisabled},{default:e.withCtx(()=>[e.createVNode(e.Transition,{name:i.value},{default:e.withCtx(()=>[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"content",ref:r,style:e.normalizeStyle(e.unref(m)),class:e.normalizeClass(["z-60 divide-y divide-gray-100 rounded bg-white shadow",t.dropdownClass])},[e.createVNode(e.unref(C),{onClick:n},{default:e.withCtx(()=>[e.renderSlot(b.$slots,"default",{},void 0,!0)]),_:3})],6)):e.createCommentVNode("",!0)]),_:3},8,["name"])]),_:3},8,["to","disabled"])],512))}}),R=u._export_sfc(G,[["__scopeId","data-v-c0f85806"]]),K=e.defineComponent({__name:"ListGroup",props:{width:{default:"default"}},setup(t){return(o,l)=>(e.openBlock(),e.createElementBlock("ul",{class:e.normalizeClass(["overflow-hidden rounded border border-gray-200 bg-white text-sm font-medium",{"w-48":t.width==="default","w-64":t.width==="wide"}])},[e.renderSlot(o.$slots,"default")],2))}}),U={class:"relative inline-flex"},W=e.defineComponent({inheritAttrs:!1,__name:"ContextMenu",props:{items:{},icon:{default:"more_vert"},square:{type:Boolean,default:!1},outlined:{type:Boolean},width:{},disabled:{type:Boolean,default:void 0},isPortalDisabled:{type:Boolean},triggerSize:{default:"sm"},dropdownClass:{},showActiveCount:{type:Boolean,default:!0}},setup(t){const o=t,l=e.useSlots(),n=e.computed(()=>{var a,r;return o.disabled??(((r=((a=o.items)==null?void 0:a.flatMap(c=>c!=="divider"&&"items"in c?c.items:c))??[])==null?void 0:r.filter(c=>c!=="divider").every(c=>c.disabled))&&!l.default)}),s=a=>(a??[]).reduce((r,c)=>c==="divider"?r:"items"in c?r+s(c.items):r+(c.active?1:0),0),d=e.computed(()=>s(o.items));return(a,r)=>(e.openBlock(),e.createElementBlock("div",U,[e.createVNode(e.unref(B),null,{default:e.withCtx(()=>{var c;return[(c=t.items)!=null&&c.length||a.$slots.default||t.disabled?(e.openBlock(),e.createBlock(e.unref(R),e.mergeProps({key:0,"is-portal-disabled":n.value},a.$attrs,{"dropdown-class":t.dropdownClass}),{trigger:e.withCtx(({visible:i})=>[e.renderSlot(a.$slots,"trigger",{visible:i},()=>[e.createVNode(e.unref(k._sfc_main),{type:"button",pill:!t.square,square:"",intent:t.outlined?"secondary":"subtle",size:t.triggerSize,"data-testid":"context-menu",disabled:n.value,"icon-prefix":t.icon,onClick:r[0]||(r[0]=e.withModifiers(()=>{},["stop"]))},null,8,["pill","intent","size","disabled","icon-prefix"])])]),default:e.withCtx(()=>[t.items||a.$slots.default?(e.openBlock(),e.createBlock(e.unref(K),{key:0,width:t.width,class:"z-60 p-0.5"},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"header"),t.items?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.items,(i,m)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:m},[i==="divider"&&m<t.items.length-1?(e.openBlock(),e.createBlock(e.unref(g._sfc_main),{key:0,spacing:"none"})):i!=="divider"&&!("items"in i)?(e.openBlock(),e.createBlock(y,{key:1,label:i.label,variant:i.variant,icon:i.icon,"label-suffix-component":i.labelSuffixComponent,"label-prefix-component":i.labelPrefixComponent,description:i.description,classes:i.classes,"test-id":i.testId,disabled:i.disabled,active:i.active,onClick:i.onClick},null,8,["label","variant","icon","label-suffix-component","label-prefix-component","description","classes","test-id","disabled","active","onClick"])):i!=="divider"?(e.openBlock(),e.createBlock(z,{key:2,class:"rounded-sm",label:i.label,items:i.items},null,8,["label","items"])):e.createCommentVNode("",!0)],64))),128)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"default")]),_:3},8,["width"])):e.createCommentVNode("",!0)]),_:3},16,["is-portal-disabled","dropdown-class"])):e.createCommentVNode("",!0)]}),_:3}),t.showActiveCount&&d.value>0?(e.openBlock(),e.createBlock(e.unref(S._sfc_main),{key:0,size:"xs",intent:"brand",class:"pointer-events-none absolute -right-1.5 -top-1.5","data-testid":"context-menu-active-count"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.value),1)]),_:1})):e.createCommentVNode("",!0)]))}});exports.Fade=B;exports._sfc_main=x;exports._sfc_main$1=W;
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as g, openBlock as s, createBlock as b, resolveDynamicComponent as x, withCtx as r, renderSlot as m, createElementBlock as p, unref as i, withModifiers as I, normalizeClass as M, createCommentVNode as v, createSlots as G, normalizeProps as q, mergeProps as S, createVNode as h, createTextVNode as k, toDisplayString as C, Fragment as y, renderList as L, TransitionGroup as R, Comment as K, inject as U, onMounted as W, Teleport as z, ref as w, computed as E, createElementVNode as B, Transition as J, normalizeStyle as Q, useSlots as X } from "vue";
2
2
  import { _ as P, u as Y, a as Z, o as N, f as _ } from "./floating-ui.vue.es-CYt0fSY7.mjs";
3
- import { _ as D, j as ee, D as te } from "./customElements-Com2NiGU.mjs";
4
- import { a as ne, _ as V } from "./Button.vue.es-VQCd3V3C.mjs";
5
- import { _ as le } from "./DividerText.vue.es-Bomiy4if.mjs";
3
+ import { _ as D, j as ee, D as te } from "./customElements-CSE7dwUr.mjs";
4
+ import { a as ne, _ as V } from "./Button.vue.es-Dz-2L8dJ.mjs";
5
+ import { _ as le } from "./DividerText.vue.es-IK2fns6f.mjs";
6
6
  import { _ as O } from "./Divider.vue.es-DnP_HqLz.mjs";
7
7
  import { e as oe, o as ae } from "./index.es-CXkP_k3u.mjs";
8
8
  import { p as se } from "./object.es-8aLDIncs.mjs";
9
- import { _ as ie } from "./Chip.vue.es-CXG8o1Qf.mjs";
9
+ import { _ as ie } from "./Chip.vue.es-DMK9C78d.mjs";
10
10
  const re = /* @__PURE__ */ g({
11
11
  __name: "FullClickableBlock",
12
12
  props: {
@@ -1 +1 @@
1
- const e=require("vue"),n=require("./customElements-Bt8PbjIn.js"),g=require("./Section.vue.es-DuK52y67.js"),_=require("./getCountryNameByCode.es-Xxc0nZsH.js"),h=require("./customer.es-BButyYo0.js"),b=require("./typeGuards.es-DS3vZaJn.js"),y=["US","CA"];function v(t){if(y.includes(t.country)){const c=a([t.line1,t.line2],", "),r=a([t.state,t.postal_code]," "),u=_.getCountryNameByCode(t.country);return a([c,t.city,r,u],", ")}const i=a([t.line1,t.line2]," "),l=a([t.postal_code,t.city]," "),s=_.getCountryNameByCode(t.country);return a([i,l,t.state,s],", ")}function a(t,o){return t.filter(Boolean).join(o)}const p={key:0,class:"flex flex-col gap-2"},N={key:0},x={key:1},C={key:2},k={key:3},V={key:1},T=e.defineComponent({__name:"CustomerBillingInformation",props:{customer:{},title:{},fallbackToReference:{type:Boolean,default:!0}},setup(t){const{$t:o}=n.useIntl(),i=t,l=e.computed(()=>{if(!i.customer)return;const r=h.getCustomerName(i.customer);if(i.fallbackToReference&&r==="")return i.customer.reference;if(!(!i.fallbackToReference&&r===""))return r}),s=e.computed(()=>i.title||o({defaultMessage:"Billing information",description:"Title for the billing information",id:"customer_billing_information.title"})),c=e.computed(()=>{if(i.customer){if("individual"in i.customer)return i.customer.individual.residential_address;if("organization"in i.customer)return i.customer.organization.registered_address}});return(r,u)=>(e.openBlock(),e.createBlock(g._sfc_main,{title:s.value},{right:e.withCtx(()=>[e.renderSlot(r.$slots,"settings")]),default:e.withCtx(()=>{var d;return[t.customer?(e.openBlock(),e.createElementBlock("div",p,[l.value?(e.openBlock(),e.createElementBlock("div",N,[e.createVNode(n._sfc_main,{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Name",description:"The label for the customer name in the billing information",id:"customer_billing_information.name_label"})),1)]),_:1}),e.createVNode(n._sfc_main,{variant:"body-xs"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value),1)]),_:1})])):e.createCommentVNode("",!0),(d=c.value)!=null&&d.line1?(e.openBlock(),e.createElementBlock("div",x,[e.createVNode(n._sfc_main,{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Billing address",description:"The label for the customer billing address in the billing information",id:"customer_billing_information.billing_address_label"})),1)]),_:1}),e.createVNode(n._sfc_main,{variant:"body-xs"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(v)(c.value)),1)]),_:1})])):e.createCommentVNode("",!0),t.customer.email?(e.openBlock(),e.createElementBlock("div",C,[e.createVNode(n._sfc_main,{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Email address",description:"The label for the customer email address in the billing information",id:"customer_billing_information.email_address_label"})),1)]),_:1}),e.createVNode(n._sfc_main,{variant:"body-xs"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.customer.email),1)]),_:1})])):e.createCommentVNode("",!0),e.unref(b.isOrganization)(t.customer)?(e.openBlock(),e.createElementBlock("div",k,[e.createVNode(n._sfc_main,{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"VAT number",description:"The label for the customer Vat number in the billing information",id:"customer_billing_information.vat_number_label"})),1)]),_:1}),e.createVNode(n._sfc_main,{variant:"body-xs"},{default:e.withCtx(()=>{var m,f;return[e.createTextVNode(e.toDisplayString((f=(m=t.customer.organization.tax_ids)==null?void 0:m[0])==null?void 0:f.id),1)]}),_:1})])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",V,[e.createVNode(n._sfc_main,{variant:"body-xs",color:"secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"No billing information to display.",description:"Text that is being displayed when there is no active subscription in the subscriptions block",id:"customer_overview.billing_information.no_billing_information_available"})),1)]),_:1})]))]}),_:3},8,["title"]))}});exports._sfc_main=T;
1
+ const e=require("vue"),n=require("./customElements-Vox1PB6G.js"),g=require("./Section.vue.es-Btff-cLY.js"),_=require("./getCountryNameByCode.es-Xxc0nZsH.js"),h=require("./customer.es-BButyYo0.js"),b=require("./typeGuards.es-DS3vZaJn.js"),y=["US","CA"];function v(t){if(y.includes(t.country)){const c=a([t.line1,t.line2],", "),r=a([t.state,t.postal_code]," "),u=_.getCountryNameByCode(t.country);return a([c,t.city,r,u],", ")}const i=a([t.line1,t.line2]," "),l=a([t.postal_code,t.city]," "),s=_.getCountryNameByCode(t.country);return a([i,l,t.state,s],", ")}function a(t,o){return t.filter(Boolean).join(o)}const p={key:0,class:"flex flex-col gap-2"},N={key:0},x={key:1},C={key:2},k={key:3},V={key:1},T=e.defineComponent({__name:"CustomerBillingInformation",props:{customer:{},title:{},fallbackToReference:{type:Boolean,default:!0}},setup(t){const{$t:o}=n.useIntl(),i=t,l=e.computed(()=>{if(!i.customer)return;const r=h.getCustomerName(i.customer);if(i.fallbackToReference&&r==="")return i.customer.reference;if(!(!i.fallbackToReference&&r===""))return r}),s=e.computed(()=>i.title||o({defaultMessage:"Billing information",description:"Title for the billing information",id:"customer_billing_information.title"})),c=e.computed(()=>{if(i.customer){if("individual"in i.customer)return i.customer.individual.residential_address;if("organization"in i.customer)return i.customer.organization.registered_address}});return(r,u)=>(e.openBlock(),e.createBlock(g._sfc_main,{title:s.value},{right:e.withCtx(()=>[e.renderSlot(r.$slots,"settings")]),default:e.withCtx(()=>{var d;return[t.customer?(e.openBlock(),e.createElementBlock("div",p,[l.value?(e.openBlock(),e.createElementBlock("div",N,[e.createVNode(n._sfc_main,{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Name",description:"The label for the customer name in the billing information",id:"customer_billing_information.name_label"})),1)]),_:1}),e.createVNode(n._sfc_main,{variant:"body-xs"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value),1)]),_:1})])):e.createCommentVNode("",!0),(d=c.value)!=null&&d.line1?(e.openBlock(),e.createElementBlock("div",x,[e.createVNode(n._sfc_main,{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Billing address",description:"The label for the customer billing address in the billing information",id:"customer_billing_information.billing_address_label"})),1)]),_:1}),e.createVNode(n._sfc_main,{variant:"body-xs"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(v)(c.value)),1)]),_:1})])):e.createCommentVNode("",!0),t.customer.email?(e.openBlock(),e.createElementBlock("div",C,[e.createVNode(n._sfc_main,{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Email address",description:"The label for the customer email address in the billing information",id:"customer_billing_information.email_address_label"})),1)]),_:1}),e.createVNode(n._sfc_main,{variant:"body-xs"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.customer.email),1)]),_:1})])):e.createCommentVNode("",!0),e.unref(b.isOrganization)(t.customer)?(e.openBlock(),e.createElementBlock("div",k,[e.createVNode(n._sfc_main,{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"VAT number",description:"The label for the customer Vat number in the billing information",id:"customer_billing_information.vat_number_label"})),1)]),_:1}),e.createVNode(n._sfc_main,{variant:"body-xs"},{default:e.withCtx(()=>{var m,f;return[e.createTextVNode(e.toDisplayString((f=(m=t.customer.organization.tax_ids)==null?void 0:m[0])==null?void 0:f.id),1)]}),_:1})])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",V,[e.createVNode(n._sfc_main,{variant:"body-xs",color:"secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"No billing information to display.",description:"Text that is being displayed when there is no active subscription in the subscriptions block",id:"customer_overview.billing_information.no_billing_information_available"})),1)]),_:1})]))]}),_:3},8,["title"]))}});exports._sfc_main=T;
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as x, computed as v, openBlock as c, createBlock as C, withCtx as i, createElementBlock as d, createVNode as o, createTextVNode as a, toDisplayString as r, unref as u, createCommentVNode as b, renderSlot as B } from "vue";
2
- import { u as N, _ as l } from "./customElements-Com2NiGU.mjs";
3
- import { _ as S } from "./Section.vue.es-By1JltGi.mjs";
2
+ import { u as N, _ as l } from "./customElements-CSE7dwUr.mjs";
3
+ import { _ as S } from "./Section.vue.es-DQ5H7mqW.mjs";
4
4
  import { g as k } from "./getCountryNameByCode.es-BDHua7VM.mjs";
5
5
  import { a as A } from "./customer.es-B5ppZf0j.mjs";
6
6
  import { a as M } from "./typeGuards.es-B4XMtlkM.mjs";
@@ -1 +1 @@
1
- const e=require("vue"),m=require("./Button.vue.es-BWl37nzm.js"),r=require("./Section.vue.es-DuK52y67.js"),l=require("./customElements-Bt8PbjIn.js"),u=require("./PaymentMethodsList.vue_vue_type_script_setup_true_lang-B_207kq5.js"),p=require("./Skeleton.vue_vue_type_script_setup_true_lang-DypW8aNJ.js"),h=require("./useActionDispatchProvider-B54GYEY7.js"),y=require("./configuration-akTS7Wiw.js"),_=e.defineComponent({__name:"CustomerPaymentMethodsBlock",props:{paymentMethods:{type:Array},limit:{default:2,type:Number},isLoading:{type:Boolean},showViewAllButton:{type:Boolean},showAddButton:{type:Boolean}},emits:["view-all-payment-methods","add-payment-method"],setup(t){const d=t,{$t:o}=l.useIntl(),i=e.computed(()=>d.paymentMethods.length>0);return(s,a)=>(e.openBlock(),e.createBlock(e.unref(r._sfc_main),{class:"sv-payment-methods","no-spacing":"","no-border":"",title:e.unref(o)({defaultMessage:"{count, plural, one {Payment method} other {Payment methods}}",description:"Title for the payment methods block on the customer overview page",id:"customer_overview.payment_methods.title"},{count:String(t.paymentMethods.length)})},e.createSlots({default:e.withCtx(()=>[i.value?(e.openBlock(),e.createBlock(u._sfc_main,{key:0,"payment-methods":t.paymentMethods},null,8,["payment-methods"])):(e.openBlock(),e.createBlock(e.unref(r._sfc_main),{key:1,class:"sv-empty-state sv-payment-methods__empty"},{default:e.withCtx(()=>[e.createVNode(e.unref(l._sfc_main),{variant:"body-sm",color:"subtle","no-spacing":"",class:"sv-payment-methods__empty-message"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Add a payment method for recurring invoice payments.",description:"Helper text for adding a payment method when no payment methods are configured",id:"customer_overview.payment_methods_block.add_payment_method_helper_text"})),1)]),_:1}),t.showAddButton?(e.openBlock(),e.createBlock(e.unref(m._sfc_main),{key:0,class:"sv-action sv-action--secondary sv-action--full-width sv-payment-methods__add mt-4 w-full",intent:"secondary","icon-prefix":"add",type:"button",onClick:a[1]||(a[1]=n=>s.$emit("add-payment-method"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Add payment method",description:"Text for the add payment method button that is shown when no payment methods have been configured",id:"customer_overview.payment_methods_block.add_payment_method_button_label"})),1)]),_:1})):e.createCommentVNode("",!0)]),_:1}))]),_:2},[t.showViewAllButton?{name:"right",fn:e.withCtx(()=>[e.createVNode(e.unref(m._sfc_main),{size:"sm",intent:"subtle","icon-suffix":"arrow_right_alt",class:"sv-action sv-action--ghost sv-payment-methods__view-all",type:"button",onClick:a[0]||(a[0]=n=>s.$emit("view-all-payment-methods"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"View all",id:"customer_overview.payment_methods_block.view_all_payment_methods_link_label",description:"The link text that links to the overview page of the customer invoices"})),1)]),_:1})]),key:"0"}:void 0]),1032,["title"]))}}),v=e.defineComponent({__name:"CustomerPaymentMethods",props:{isLoading:{type:Boolean},paymentMethods:{type:Array},maxPaymentMethods:{type:Number},configuration:{type:Object}},setup(t){const d={showViewAllButton:!0,showAddButton:!0},o=t,i=e.computed(()=>y.resolveConfiguration(d,o.configuration)),{dispatchAction:s}=h.useActionDispatchProvider();return(a,n)=>t.isLoading?(e.openBlock(),e.createBlock(p._sfc_main,{key:0,variant:"section",class:"sv-payment-methods sv-root sv-component sv-loading h-72","data-testid":"customer-payment-methods-skeleton"})):(e.openBlock(),e.createBlock(_,{key:1,class:"sv-payment-methods sv-root sv-component","is-loading":t.isLoading,"payment-methods":t.paymentMethods,"show-view-all-button":i.value.showViewAllButton,"show-add-button":i.value.showAddButton,onViewAllPaymentMethods:n[0]||(n[0]=c=>e.unref(s)({action:"view-all-payment-methods"})),onAddPaymentMethod:n[1]||(n[1]=c=>e.unref(s)({action:"add-payment-method"}))},null,8,["is-loading","payment-methods","show-view-all-button","show-add-button"]))}});exports._sfc_main=v;
1
+ const e=require("vue"),m=require("./Button.vue.es-M_jXZda4.js"),r=require("./Section.vue.es-Btff-cLY.js"),l=require("./customElements-Vox1PB6G.js"),u=require("./PaymentMethodsList.vue_vue_type_script_setup_true_lang-H3vrPllf.js"),p=require("./Skeleton.vue_vue_type_script_setup_true_lang-DypW8aNJ.js"),h=require("./useActionDispatchProvider-CNAuaHdm.js"),y=require("./configuration-akTS7Wiw.js"),_=e.defineComponent({__name:"CustomerPaymentMethodsBlock",props:{paymentMethods:{type:Array},limit:{default:2,type:Number},isLoading:{type:Boolean},showViewAllButton:{type:Boolean},showAddButton:{type:Boolean}},emits:["view-all-payment-methods","add-payment-method"],setup(t){const d=t,{$t:o}=l.useIntl(),i=e.computed(()=>d.paymentMethods.length>0);return(s,a)=>(e.openBlock(),e.createBlock(e.unref(r._sfc_main),{class:"sv-payment-methods","no-spacing":"","no-border":"",title:e.unref(o)({defaultMessage:"{count, plural, one {Payment method} other {Payment methods}}",description:"Title for the payment methods block on the customer overview page",id:"customer_overview.payment_methods.title"},{count:String(t.paymentMethods.length)})},e.createSlots({default:e.withCtx(()=>[i.value?(e.openBlock(),e.createBlock(u._sfc_main,{key:0,"payment-methods":t.paymentMethods},null,8,["payment-methods"])):(e.openBlock(),e.createBlock(e.unref(r._sfc_main),{key:1,class:"sv-empty-state sv-payment-methods__empty"},{default:e.withCtx(()=>[e.createVNode(e.unref(l._sfc_main),{variant:"body-sm",color:"subtle","no-spacing":"",class:"sv-payment-methods__empty-message"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Add a payment method for recurring invoice payments.",description:"Helper text for adding a payment method when no payment methods are configured",id:"customer_overview.payment_methods_block.add_payment_method_helper_text"})),1)]),_:1}),t.showAddButton?(e.openBlock(),e.createBlock(e.unref(m._sfc_main),{key:0,class:"sv-action sv-action--secondary sv-action--full-width sv-payment-methods__add mt-4 w-full",intent:"secondary","icon-prefix":"add",type:"button",onClick:a[1]||(a[1]=n=>s.$emit("add-payment-method"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Add payment method",description:"Text for the add payment method button that is shown when no payment methods have been configured",id:"customer_overview.payment_methods_block.add_payment_method_button_label"})),1)]),_:1})):e.createCommentVNode("",!0)]),_:1}))]),_:2},[t.showViewAllButton?{name:"right",fn:e.withCtx(()=>[e.createVNode(e.unref(m._sfc_main),{size:"sm",intent:"subtle","icon-suffix":"arrow_right_alt",class:"sv-action sv-action--ghost sv-payment-methods__view-all",type:"button",onClick:a[0]||(a[0]=n=>s.$emit("view-all-payment-methods"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"View all",id:"customer_overview.payment_methods_block.view_all_payment_methods_link_label",description:"The link text that links to the overview page of the customer invoices"})),1)]),_:1})]),key:"0"}:void 0]),1032,["title"]))}}),v=e.defineComponent({__name:"CustomerPaymentMethods",props:{isLoading:{type:Boolean},paymentMethods:{type:Array},maxPaymentMethods:{type:Number},configuration:{type:Object}},setup(t){const d={showViewAllButton:!0,showAddButton:!0},o=t,i=e.computed(()=>y.resolveConfiguration(d,o.configuration)),{dispatchAction:s}=h.useActionDispatchProvider();return(a,n)=>t.isLoading?(e.openBlock(),e.createBlock(p._sfc_main,{key:0,variant:"section",class:"sv-payment-methods sv-root sv-component sv-loading h-72","data-testid":"customer-payment-methods-skeleton"})):(e.openBlock(),e.createBlock(_,{key:1,class:"sv-payment-methods sv-root sv-component","is-loading":t.isLoading,"payment-methods":t.paymentMethods,"show-view-all-button":i.value.showViewAllButton,"show-add-button":i.value.showAddButton,onViewAllPaymentMethods:n[0]||(n[0]=c=>e.unref(s)({action:"view-all-payment-methods"})),onAddPaymentMethod:n[1]||(n[1]=c=>e.unref(s)({action:"add-payment-method"}))},null,8,["is-loading","payment-methods","show-view-all-button","show-add-button"]))}});exports._sfc_main=v;
@@ -1,10 +1,10 @@
1
1
  import { defineComponent as v, computed as f, openBlock as s, createBlock as m, unref as t, createSlots as w, withCtx as a, createVNode as y, createTextVNode as p, toDisplayString as h, createCommentVNode as g } from "vue";
2
- import { _ as u } from "./Button.vue.es-VQCd3V3C.mjs";
3
- import { _ as c } from "./Section.vue.es-By1JltGi.mjs";
4
- import { u as b, _ as k } from "./customElements-Com2NiGU.mjs";
5
- import { _ as A } from "./PaymentMethodsList.vue_vue_type_script_setup_true_lang-CnmZ9dvP.mjs";
2
+ import { _ as u } from "./Button.vue.es-Dz-2L8dJ.mjs";
3
+ import { _ as c } from "./Section.vue.es-DQ5H7mqW.mjs";
4
+ import { u as b, _ as k } from "./customElements-CSE7dwUr.mjs";
5
+ import { _ as A } from "./PaymentMethodsList.vue_vue_type_script_setup_true_lang-C6BcIkEV.mjs";
6
6
  import { _ as M } from "./Skeleton.vue_vue_type_script_setup_true_lang-DRLoYWGY.mjs";
7
- import { u as B } from "./useActionDispatchProvider-e2lQXTid.mjs";
7
+ import { u as B } from "./useActionDispatchProvider-B8-oycQk.mjs";
8
8
  import { r as $ } from "./configuration-BytDBAWs.mjs";
9
9
  const x = /* @__PURE__ */ v({
10
10
  __name: "CustomerPaymentMethodsBlock",