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

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 (218) hide show
  1. package/README.md +44 -0
  2. package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DFv-awxb.mjs → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DW10rozs.mjs} +6 -6
  3. package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Co3XAxaY.js → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-jWthTJk-.js} +1 -1
  4. package/dist/Alert.vue.es-RyK53a2P.js +1 -0
  5. package/dist/Alert.vue.es-lIiAWf2S.mjs +146 -0
  6. package/dist/{Avatar.vue.es-DNJ-jexx.mjs → Avatar.vue.es-DzjFvLuK.mjs} +1 -1
  7. package/dist/{Avatar.vue.es-D42J_izE.js → Avatar.vue.es-nr8srGuK.js} +1 -1
  8. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-D1uVidXk.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-BptcwJMr.mjs} +4 -4
  9. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BEVkWJXT.js → BillingInformation.vue_vue_type_script_setup_true_lang-C1prOJay.js} +1 -1
  10. package/dist/{Button.vue.es-Dz-2L8dJ.mjs → Button.vue.es-PbJFK8z7.mjs} +1 -1
  11. package/dist/{Button.vue.es-M_jXZda4.js → Button.vue.es-TCF-bvDF.js} +1 -1
  12. package/dist/Checkout.entry.ce-D8O4qJ24.js +2 -0
  13. package/dist/Checkout.entry.ce-DHFx5Vnb.mjs +3900 -0
  14. package/dist/{Chip.vue.es-G8doKsZb.js → Chip.vue.es-CAoisngJ.js} +1 -1
  15. package/dist/{Chip.vue.es-DMK9C78d.mjs → Chip.vue.es-DpcOM3Ai.mjs} +2 -2
  16. package/dist/ContentWithAsideLayout-BCM8tmZN.mjs +38 -0
  17. package/dist/ContentWithAsideLayout-RSdKXqAf.js +1 -0
  18. package/dist/{ContextMenu.vue.es-B3Rz6Ojk.js → ContextMenu.vue.es-kzZ3JJHG.js} +1 -1
  19. package/dist/{ContextMenu.vue.es-CzkkNoJG.mjs → ContextMenu.vue.es-tAuFp-6i.mjs} +4 -4
  20. package/dist/{CustomerBillingInformation.vue.es-Db6bN2RZ.mjs → CustomerBillingInformation.vue.es-BQSl9q6W.mjs} +2 -2
  21. package/dist/{CustomerBillingInformation.vue.es-BmtU9Pk0.js → CustomerBillingInformation.vue.es-Nac6HgLo.js} +1 -1
  22. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BGHaTx1A.js → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BOLf-U0A.js} +1 -1
  23. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-fESZVyPe.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-R47ln7Wb.mjs} +5 -5
  24. package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DdMHG1_Y.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-CaNXS48v.mjs} +15 -15
  25. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-D_jcV7VG.js +1 -0
  26. package/dist/{DividerText.vue.es-IK2fns6f.mjs → DividerText.vue.es-CSE7a-T0.mjs} +1 -1
  27. package/dist/{DividerText.vue.es-D-QxT2OD.js → DividerText.vue.es-LJ2kZakb.js} +1 -1
  28. package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-lhJnqrrh.mjs → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-DeotDsFP.mjs} +4 -4
  29. package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CM_8Asmw.js → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-GNPyrcAQ.js} +1 -1
  30. package/dist/ErrorNotification.vue.es-BF6swP7o.js +1 -0
  31. package/dist/{ErrorNotification.vue.es-BGckEwHf.mjs → ErrorNotification.vue.es-CVUuIt8Z.mjs} +2 -2
  32. package/dist/IconButton.vue.es-CB1lIPao.js +1 -0
  33. package/dist/IconButton.vue.es-DGflbWFk.mjs +56 -0
  34. package/dist/{IconTitle.vue.es-BmX68uJx.mjs → IconTitle.vue.es-BsdjyGlQ.mjs} +3 -3
  35. package/dist/{IconTitle.vue.es-CmR2xoeu.js → IconTitle.vue.es-CMO8EyQl.js} +1 -1
  36. package/dist/{Input.vue.es-BGPELaZU.mjs → Input.vue.es-BFbiFXsU.mjs} +2 -2
  37. package/dist/{Input.vue.es-CTOrmrcB.js → Input.vue.es-CREdT4nB.js} +1 -1
  38. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-bheNAKzK.js → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BZ4D_-7E.js} +1 -1
  39. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-CMEOOuSU.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Btv0rRk4.mjs} +2 -2
  40. package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-avhwysNq.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-CrZq0d1M.mjs} +2 -2
  41. package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-Xo9BR6AD.js → InvoiceEntryView.vue_vue_type_script_setup_true_lang-j-cNIRD_.js} +1 -1
  42. package/dist/{InvoiceSummary.vue.es-hpG8Tq1D.js → InvoiceSummary.vue.es-BOnvORpf.js} +1 -1
  43. package/dist/{InvoiceSummary.vue.es-BWLiwlNs.mjs → InvoiceSummary.vue.es-JtOIQ6SJ.mjs} +7 -7
  44. package/dist/{Modal.vue.es-BD4vUaOQ.js → Modal.vue.es-BbdtdxsO.js} +1 -1
  45. package/dist/{Modal.vue.es-B_G8NQS2.mjs → Modal.vue.es-jT61xK_A.mjs} +5 -5
  46. package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-BBoZVnsK.js +1 -0
  47. package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-Dan29qmH.mjs +294 -0
  48. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DuorCFo9.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-BJZHkTqA.mjs} +3 -3
  49. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DIJbzWMV.js → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-D34fD3Io.js} +1 -1
  50. package/dist/{PaymentHistoryBlock-DSHW_eW1.js → PaymentHistoryBlock-Dw2wOiAI.js} +1 -1
  51. package/dist/{PaymentHistoryBlock-ComJzB3H.mjs → PaymentHistoryBlock-quvnCSFV.mjs} +1 -1
  52. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-hjtksV2D.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-5ckQd9eQ.mjs} +4 -4
  53. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DUN0Hf2v.js → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-C0XIdBbx.js} +1 -1
  54. package/dist/{PaymentIntegrationForm-CH5B6BY5.mjs → PaymentIntegrationForm-CQjUZi22.mjs} +1 -1
  55. package/dist/{PaymentIntegrationForm-CwfCLnKt.js → PaymentIntegrationForm-D1oJREmH.js} +1 -1
  56. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-De7h9-fH.js +1 -0
  57. package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BqYk4_T9.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DnBLj1wZ.mjs} +43 -40
  58. package/dist/PaymentIntegrationFormAdyen-BQXXwpUK.js +98 -0
  59. package/dist/PaymentIntegrationFormAdyen-CyZk9ofV.mjs +798 -0
  60. package/dist/PaymentIntegrationFormStripe-Bs4F7oK_.js +102 -0
  61. package/dist/{PaymentIntegrationFormStripe-CBsXDuhy.mjs → PaymentIntegrationFormStripe-D-GaLHwc.mjs} +251 -179
  62. package/dist/{PaymentMethod.vue.es-DkQdPXfk.mjs → PaymentMethod.vue.es-C0j580g7.mjs} +3 -3
  63. package/dist/{PaymentMethod.vue.es-D18g-QB4.js → PaymentMethod.vue.es-CXV_ThBY.js} +1 -1
  64. package/dist/{PaymentMethodForm-CpIZKfPH.mjs → PaymentMethodForm-Bf2Ps6eV.mjs} +1 -1
  65. package/dist/{PaymentMethodForm-DK8ntFA0.js → PaymentMethodForm-CDV5LR8i.js} +1 -1
  66. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-C1tGJsay.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-BqPu7CYA.mjs} +6 -6
  67. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-D7fDguwa.js → PaymentMethodForm.vue_vue_type_script_setup_true_lang-BwsRDlQJ.js} +1 -1
  68. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-C6BcIkEV.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-9MUPbgWM.mjs} +6 -6
  69. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-H3vrPllf.js → PaymentMethodsList.vue_vue_type_script_setup_true_lang-BIX0k7-q.js} +1 -1
  70. package/dist/PlanCustomizationEditor-0kEXoOcM.js +1 -0
  71. package/dist/{PlanCustomizationEditor-0zCXN-cv.mjs → PlanCustomizationEditor-Dv69xPbX.mjs} +9 -9
  72. package/dist/{PricingGroupRangeInput.vue.es-QnpfHxaY.js → PricingGroupRangeInput.vue.es-BchXhunH.js} +2 -2
  73. package/dist/{PricingGroupRangeInput.vue.es-8_5nfZDI.mjs → PricingGroupRangeInput.vue.es-CP7-dmxS.mjs} +4 -4
  74. package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-t6h1j6WD.mjs → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DmVJ2JQE.mjs} +5 -5
  75. package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-CGJhKKNL.js → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-YsI__d0V.js} +1 -1
  76. package/dist/RadioGroupExtended.vue.es-Cf5R1P9a.js +1 -0
  77. package/dist/{RadioGroupExtended.vue.es-C92xlCFQ.mjs → RadioGroupExtended.vue.es-_QMReyZ8.mjs} +3 -3
  78. package/dist/{Section.vue.es-Btff-cLY.js → Section.vue.es-CBZx5x53.js} +1 -1
  79. package/dist/{Section.vue.es-DQ5H7mqW.mjs → Section.vue.es-KRsHeFoT.mjs} +1 -1
  80. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DKsunuGT.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BVELHoUj.mjs} +6 -6
  81. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BfvX14E3.js → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-UdGQMJGY.js} +1 -1
  82. package/dist/{SubscriptionSchedules-pzNsego6.js → SubscriptionSchedules-1ikoGncQ.js} +1 -1
  83. package/dist/{SubscriptionSchedules-Dc0rUnnf.mjs → SubscriptionSchedules-B6b6xf-E.mjs} +1 -1
  84. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-Cd56tuZb.js +1 -0
  85. package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-Brs9qDs5.mjs → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-Dv2bP9vv.mjs} +12 -12
  86. package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-s5_uhyuB.js → SubscriptionSummary.vue_vue_type_script_setup_true_lang-DZKl0Zxp.js} +1 -1
  87. package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-C1mkIPMr.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-DvYZvTV9.mjs} +2 -2
  88. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-CFmCJK8M.js → SubscriptionsList.vue_vue_type_script_setup_true_lang-DTjZcOhj.js} +1 -1
  89. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DSoNs7Xx.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-DmeIKMYI.mjs} +6 -6
  90. package/dist/{TooltipParagraph.vue.es-BaqCDjl8.js → TooltipParagraph.vue.es-7IQdU3Tf.js} +1 -1
  91. package/dist/{TooltipParagraph.vue.es-CIedcXGT.mjs → TooltipParagraph.vue.es-nGFfHF1A.mjs} +1 -1
  92. package/dist/{TrialChip.vue.es-BzNI94k0.js → TrialChip.vue.es-DhC5Bpmy.js} +1 -1
  93. package/dist/{TrialChip.vue.es-DkBuMNr_.mjs → TrialChip.vue.es-eKgO6an3.mjs} +2 -2
  94. package/dist/{cn.es-BGqYNPM3.mjs → cn.es-BD7Afj5Q.mjs} +2 -2
  95. package/dist/{cn.es-CvmLj7KH.js → cn.es-BLE3T5Rx.js} +1 -1
  96. package/dist/components/BillingInformation/BillingInformation.cjs +1 -1
  97. package/dist/components/BillingInformation/BillingInformation.mjs +5 -5
  98. package/dist/components/BillingInformationForm/BillingInformationForm.cjs +1 -1
  99. package/dist/components/BillingInformationForm/BillingInformationForm.mjs +7 -7
  100. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs +1 -1
  101. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +5 -5
  102. package/dist/components/Invoice/Invoice.cjs +1 -1
  103. package/dist/components/Invoice/Invoice.mjs +10 -10
  104. package/dist/components/InvoiceDetails/InvoiceDetails.cjs +1 -1
  105. package/dist/components/InvoiceDetails/InvoiceDetails.mjs +4 -4
  106. package/dist/components/InvoiceHeader/InvoiceHeader.cjs +1 -1
  107. package/dist/components/InvoiceHeader/InvoiceHeader.mjs +8 -8
  108. package/dist/components/InvoicesList/InvoicesList.cjs +1 -1
  109. package/dist/components/InvoicesList/InvoicesList.mjs +4 -4
  110. package/dist/components/PaymentHistory/PaymentHistory.cjs +1 -1
  111. package/dist/components/PaymentHistory/PaymentHistory.mjs +9 -9
  112. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs +1 -1
  113. package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +6 -6
  114. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs +1 -1
  115. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +5 -5
  116. package/dist/components/SubscriptionsList/SubscriptionsList.cjs +1 -1
  117. package/dist/components/SubscriptionsList/SubscriptionsList.mjs +6 -6
  118. package/dist/components/WalletBalances/WalletBalances.cjs +1 -1
  119. package/dist/components/WalletBalances/WalletBalances.mjs +4 -4
  120. package/dist/core/index.cjs +1 -1
  121. package/dist/core/index.mjs +26 -23
  122. package/dist/customElements-CSzbVZIH.js +1211 -0
  123. package/dist/{customElements-CSE7dwUr.mjs → customElements-DT1YyL4O.mjs} +663 -626
  124. package/dist/{customer-Dsq-Moea.js → customer-CJonIvSm.js} +1 -1
  125. package/dist/{customer-5krPxZ8i.mjs → customer-Cq4fF__H.mjs} +1 -1
  126. package/dist/{de-DE-DsFtpLsx.mjs → de-DE-CyvjSD9b.mjs} +26 -2
  127. package/dist/{de-DE-C3DzP1nj.js → de-DE-DXsDvO5y.js} +1 -1
  128. package/dist/{en-US-X_pSFsNm.js → en-US-DHdI11k9.js} +1 -1
  129. package/dist/{en-US-DvkvbV0p.mjs → en-US-xQrWj8qI.mjs} +24 -0
  130. package/dist/index.cjs +1 -1
  131. package/dist/index.mjs +1 -1
  132. package/dist/{invoices-DRgfpkJ6.mjs → invoices-CVZOfEOY.mjs} +1 -1
  133. package/dist/{invoices-xOV2YaEV.js → invoices-EamWI_jz.js} +1 -1
  134. package/dist/{it-IT-TE7oqvXa.mjs → it-IT-C09oObBM.mjs} +26 -2
  135. package/dist/{it-IT-YBtHAao1.js → it-IT-CcRIzP1A.js} +1 -1
  136. package/dist/{nl-NL-C8wnyKju.js → nl-NL-5PrgQl8q.js} +1 -1
  137. package/dist/{nl-NL-Di3-JArV.mjs → nl-NL-BhNND_yi.mjs} +24 -0
  138. package/dist/paymentFailure-Bh60UhxA.mjs +47 -0
  139. package/dist/paymentFailure-Cki8c5BX.js +1 -0
  140. package/dist/{paymentMethods-CRDIw9lz.js → paymentMethods-Bwym8l9a.js} +1 -1
  141. package/dist/{paymentMethods-PmkHYomw.mjs → paymentMethods-By1SebnO.mjs} +1 -1
  142. package/dist/{payments-Dvqh6CGW.mjs → payments-BYZLQTJ-.mjs} +1 -1
  143. package/dist/{payments-jAgXhdp_.js → payments-Dnjg9Se4.js} +1 -1
  144. package/dist/screens/Checkout/Checkout.cjs +1 -1
  145. package/dist/screens/Checkout/Checkout.mjs +2 -2
  146. package/dist/screens/CustomerOverview/CustomerOverview.cjs +1 -1
  147. package/dist/screens/CustomerOverview/CustomerOverview.mjs +21 -21
  148. package/dist/screens/PayInvoice/PayInvoice.cjs +1 -1
  149. package/dist/screens/PayInvoice/PayInvoice.mjs +131 -127
  150. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs +1 -1
  151. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +11 -11
  152. package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs +1 -1
  153. package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +21 -21
  154. package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs +1 -1
  155. package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +20 -20
  156. package/dist/sessionReference-3h-6FdrC.mjs +43 -0
  157. package/dist/sessionReference-m_6Rp4X1.js +1 -0
  158. package/dist/subscriptions-BKER9RUc.js +1 -0
  159. package/dist/{subscriptions-XDyI2Cqm.mjs → subscriptions-Gj3KgCZz.mjs} +2 -2
  160. package/dist/types/components/payments/PaymentIntegrationForm/PaymentIntegrationForm.types.d.ts +8 -0
  161. package/dist/types/components/providers/LoggerProvider/LoggerProvider.lib.d.ts +2 -0
  162. package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +13 -2
  163. package/dist/types/services/portals.types.d.ts +2 -0
  164. package/dist/types/services/requests.types.d.ts +2 -0
  165. package/dist/types/types/errors.d.ts +5 -0
  166. package/dist/{url-DwiuKYpu.mjs → url-TNRgVI8A.mjs} +3 -2
  167. package/dist/url-vloPOiXd.js +1 -0
  168. package/dist/{useActionDispatchProvider-CNAuaHdm.js → useActionDispatchProvider-DDHrhy3i.js} +1 -1
  169. package/dist/{useActionDispatchProvider-B8-oycQk.mjs → useActionDispatchProvider-MjTckd4f.mjs} +1 -1
  170. package/dist/{useCustomer-DSx-wN-6.js → useCustomer-BW0DBEJh.js} +1 -1
  171. package/dist/{useCustomer-CP8eWUZV.mjs → useCustomer-CxnF7r8Z.mjs} +1 -1
  172. package/dist/{useCustomerFormLabels-TVTgy0MT.js → useCustomerFormLabels-C773h3J0.js} +1 -1
  173. package/dist/{useCustomerFormLabels-DW6jnDYH.mjs → useCustomerFormLabels-zPc8QrwJ.mjs} +5 -5
  174. package/dist/{useExperimentalFeature-CC-DrIcL.js → useExperimentalFeature-9teNYGuP.js} +1 -1
  175. package/dist/{useExperimentalFeature-BvE_EOX-.mjs → useExperimentalFeature-NsSDg-e3.mjs} +1 -1
  176. package/dist/{useInvoiceData-CRRPdXc6.js → useInvoiceData-DvV2AsgC.js} +1 -1
  177. package/dist/{useInvoiceData-D8ds05CX.mjs → useInvoiceData-GQwk6fl4.mjs} +2 -2
  178. package/dist/{useInvoicesList-SJU5YWBQ.mjs → useInvoicesList-CGmFSQSg.mjs} +7 -7
  179. package/dist/{useInvoicesList-DIfQcvER.js → useInvoicesList-Xnth6s6U.js} +1 -1
  180. package/dist/{useLoadInitialData-MUljS38K.mjs → useLoadInitialData-BvvaWeAe.mjs} +1 -1
  181. package/dist/{useLoadInitialData-DsabgMLZ.js → useLoadInitialData-Cjkc70u-.js} +1 -1
  182. package/dist/{usePaymentMethodAvailability-D0NUanyF.mjs → usePaymentMethodAvailability-BWaaj3N3.mjs} +4 -4
  183. package/dist/{usePaymentMethodAvailability-Bt7P9InI.js → usePaymentMethodAvailability-DKyscbom.js} +1 -1
  184. package/dist/{usePaymentMethodOptions-cT1o-BA1.js → usePaymentMethodOptions-DuXKS36F.js} +1 -1
  185. package/dist/{usePaymentMethodOptions-B7JYkGsw.mjs → usePaymentMethodOptions-l-wVAmIW.mjs} +1 -1
  186. package/dist/{usePaymentMethods-DNVw2eVg.js → usePaymentMethods-BDFVB-kK.js} +1 -1
  187. package/dist/{usePaymentMethods-CpzqXQUT.mjs → usePaymentMethods-DvQVnsSV.mjs} +1 -1
  188. package/dist/{usePayments-D9Eo-uBk.js → usePayments-CIJocDhR.js} +1 -1
  189. package/dist/{usePayments-Gx9kBvNB.mjs → usePayments-D_dyuf6S.mjs} +6 -6
  190. package/dist/{usePortal-DsebXdhx.js → usePortal-BU4ibdWq.js} +1 -1
  191. package/dist/{usePortal-3VCZwSUE.mjs → usePortal-Br5lYuPT.mjs} +1 -1
  192. package/dist/{useSubscription-DnL1wVh1.mjs → useSubscription-CqRae2I9.mjs} +1 -1
  193. package/dist/{useSubscription-K_gP9TeX.js → useSubscription-DRBUt9H5.js} +1 -1
  194. package/dist/{useTimePeriod.es-DMtKzcoB.mjs → useTimePeriod.es-BxIGnCAP.mjs} +1 -1
  195. package/dist/{useTimePeriod.es-CmltiTE-.js → useTimePeriod.es-DDos3-EH.js} +1 -1
  196. package/package.json +2 -1
  197. package/dist/Checkout.entry.ce-B5-0AM67.mjs +0 -3747
  198. package/dist/Checkout.entry.ce-C52gkrNZ.js +0 -1
  199. package/dist/ContentWithAsideLayout-Bnbsq8_5.mjs +0 -32
  200. package/dist/ContentWithAsideLayout-C6yMIVJF.js +0 -1
  201. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-Cnlbp0om.js +0 -1
  202. package/dist/ErrorNotification.vue.es-Cd2UKPAz.js +0 -1
  203. package/dist/IconButton.vue.es-BTAkuFsm.js +0 -1
  204. package/dist/IconButton.vue.es-C4dQEQAc.mjs +0 -198
  205. package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-BnilyGBO.mjs +0 -144
  206. package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-CSv-Luvz.js +0 -1
  207. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DzSQC951.js +0 -1
  208. package/dist/PaymentIntegrationFormAdyen-DfN7cPYZ.mjs +0 -621
  209. package/dist/PaymentIntegrationFormAdyen-Q48aDXR7.js +0 -98
  210. package/dist/PaymentIntegrationFormStripe-BSEqarl7.js +0 -102
  211. package/dist/PlanCustomizationEditor-XpofGULc.js +0 -1
  212. package/dist/RadioGroupExtended.vue.es-Cb1iD73r.js +0 -1
  213. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-nmVRb6hj.js +0 -1
  214. package/dist/component-5wqcK7yz.mjs +0 -8
  215. package/dist/component-B7ZDyqBp.js +0 -1
  216. package/dist/customElements-Vox1PB6G.js +0 -1211
  217. package/dist/subscriptions-fJcj88X9.js +0 -1
  218. package/dist/url-BNKStNY9.js +0 -1
@@ -1,3747 +0,0 @@
1
- import { unref as t, inject as qt, ref as F, computed as b, onMounted as ke, toRaw as Jt, watch as Te, defineComponent as ce, openBlock as v, createBlock as O, withCtx as I, createElementVNode as w, createVNode as E, createTextVNode as G, toDisplayString as V, useModel as ei, createElementBlock as W, withModifiers as $e, Fragment as _e, createCommentVNode as B, createSlots as Je, normalizeClass as be, mergeModels as vt, renderSlot as We, nextTick as He, mergeProps as ft, withDirectives as ti, withKeys as _t, vShow as ii, defineAsyncComponent as Mt } from "vue";
2
- import { I as oi, b as Me, u as ve, _ as se, d as ni, e as ai } from "./customElements-CSE7dwUr.mjs";
3
- import { u as Lt } from "./useTimePeriod.es-DMtKzcoB.mjs";
4
- import { b as ze, f as Ie } from "./formatting.es-RclXHhKo.mjs";
5
- import { _ as Ae, a as je } from "./Button.vue.es-Dz-2L8dJ.mjs";
6
- import { _ as ri } from "./ErrorNotification.vue.es-BGckEwHf.mjs";
7
- import { c as li } from "./countryData.es-BegoD-cZ.mjs";
8
- import { c as si } from "./subscriptions-XDyI2Cqm.mjs";
9
- import { A as De } from "./error-BHVZJGwD.mjs";
10
- import { c as ci, _ as ui } from "./TrialChip.vue.es-DkBuMNr_.mjs";
11
- import { a as di } from "./useService-Bh47bllz.mjs";
12
- import { c as pi } from "./invoices-DRgfpkJ6.mjs";
13
- import { g as Ne, b as wt, e as mi } from "./pricingPlanSchedule-BPrS2WRd.mjs";
14
- import { u as gi, r as ht, e as yi, a as Re, _ as vi } from "./index-BPU8tIml.mjs";
15
- import { o as fi, u as _i, _ as Mi, a as hi } from "./useCustomerFormLabels-DW6jnDYH.mjs";
16
- import { u as bi } from "./useWatchDebounced-DT5IicPp.mjs";
17
- import { u as Ii } from "./usePaymentMethodOptions-B7JYkGsw.mjs";
18
- import { c as et, a as Ai, d as Pi } from "./subscription-CrVOr5MF.mjs";
19
- import { a as Di, b as Tt } from "./pricing-DLOeiAIB.mjs";
20
- import { g as we, s as Ni } from "./url-DwiuKYpu.mjs";
21
- import { P as Ei, e as Ci, c as bt, d as xi } from "./adyen-CvsH5fok.mjs";
22
- import { u as Li } from "./usePortal-3VCZwSUE.mjs";
23
- import { g as wi } from "./getCountryNameByCode.es-BDHua7VM.mjs";
24
- import { _ as It } from "./Expand.vue.es-BleuAfDz.mjs";
25
- import { _ as ye } from "./Input.vue.es-BGPELaZU.mjs";
26
- import { _ as ge } from "./Section.vue.es-DQ5H7mqW.mjs";
27
- import { _ as Ti } from "./IconButton.vue.es-C4dQEQAc.mjs";
28
- import { c as Si } from "./customer-5krPxZ8i.mjs";
29
- import { b as ki, c as Oi, a as zi, _ as Ze } from "./EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-lhJnqrrh.mjs";
30
- import { _ as ji, T as Ri, a as Bi } from "./TooltipParagraph.vue.es-CIedcXGT.mjs";
31
- import { _ as $i } from "./PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DuorCFo9.mjs";
32
- import { _ as At } from "./Chip.vue.es-DMK9C78d.mjs";
33
- import { _ as Ui, a as Vi } from "./SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DKsunuGT.mjs";
34
- import { _ as Fi } from "./SubscriptionSummary.vue_vue_type_script_setup_true_lang-C1mkIPMr.mjs";
35
- import { u as St } from "./useViewport-BgdA2PPt.mjs";
36
- import { _ as fe } from "./Skeleton.vue_vue_type_script_setup_true_lang-DRLoYWGY.mjs";
37
- import { _ as Gi } from "./DividerText.vue.es-IK2fns6f.mjs";
38
- import { l as Ve } from "./adyenSdk-B01MB9Ia.mjs";
39
- import { c as Yi } from "./payments-Dvqh6CGW.mjs";
40
- import { C as Ki } from "./ContentWithAsideLayout-Bnbsq8_5.mjs";
41
- import { u as Qi } from "./cn.es-BGqYNPM3.mjs";
42
- import { g as Hi } from "./component-5wqcK7yz.mjs";
43
- const Zi = {
44
- AT: "Austria",
45
- BE: "Belgium",
46
- BG: "Bulgaria",
47
- CY: "Cyprus",
48
- CZ: "Czech Republic",
49
- DE: "Germany",
50
- DK: "Denmark",
51
- EE: "Estonia",
52
- ES: "Spain",
53
- FI: "Finland",
54
- FR: "France",
55
- GR: "Greece",
56
- HR: "Croatia",
57
- HU: "Hungary",
58
- IE: "Ireland",
59
- IT: "Italy",
60
- LT: "Lithuania",
61
- LU: "Luxembourg",
62
- LV: "Latvia",
63
- MT: "Malta",
64
- NL: "Netherlands",
65
- PL: "Poland",
66
- PT: "Portugal",
67
- RO: "Romania",
68
- SE: "Sweden",
69
- SI: "Slovenia",
70
- SK: "Slovakia"
71
- };
72
- function kt(e) {
73
- return Object.keys(Zi).includes(e);
74
- }
75
- function Pt(e, i) {
76
- var o = Object.keys(e);
77
- if (Object.getOwnPropertySymbols) {
78
- var n = Object.getOwnPropertySymbols(e);
79
- i && (n = n.filter(function(a) {
80
- return Object.getOwnPropertyDescriptor(e, a).enumerable;
81
- })), o.push.apply(o, n);
82
- }
83
- return o;
84
- }
85
- function Se(e) {
86
- for (var i = 1; i < arguments.length; i++) {
87
- var o = arguments[i] != null ? arguments[i] : {};
88
- i % 2 ? Pt(Object(o), !0).forEach(function(n) {
89
- Xi(e, n, o[n]);
90
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(o)) : Pt(Object(o)).forEach(function(n) {
91
- Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(o, n));
92
- });
93
- }
94
- return e;
95
- }
96
- function Xi(e, i, o) {
97
- return i in e ? Object.defineProperty(e, i, {
98
- value: o,
99
- enumerable: !0,
100
- configurable: !0,
101
- writable: !0
102
- }) : e[i] = o, e;
103
- }
104
- function Ue(e) {
105
- return typeof e == "function";
106
- }
107
- function qe(e) {
108
- return e !== null && typeof e == "object" && !Array.isArray(e);
109
- }
110
- function Fe(e) {
111
- return Ue(e.$validator) ? Se({}, e) : {
112
- $validator: e
113
- };
114
- }
115
- function Ot(e) {
116
- return typeof e == "object" ? e.$valid : e;
117
- }
118
- function zt(e) {
119
- return e.$validator || e;
120
- }
121
- function Wi(e, i) {
122
- if (!qe(e)) throw new Error(`[@vuelidate/validators]: First parameter to "withParams" should be an object, provided ${typeof e}`);
123
- if (!qe(i) && !Ue(i)) throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");
124
- const o = Fe(i);
125
- return o.$params = Se(Se({}, o.$params || {}), e), o;
126
- }
127
- function qi(e, i) {
128
- if (!Ue(e) && typeof t(e) != "string") throw new Error(`[@vuelidate/validators]: First parameter to "withMessage" should be string or a function returning a string, provided ${typeof e}`);
129
- if (!qe(i) && !Ue(i)) throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");
130
- const o = Fe(i);
131
- return o.$message = e, o;
132
- }
133
- function Ji(e) {
134
- let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
135
- const o = Fe(e);
136
- return Se(Se({}, o), {}, {
137
- $async: !0,
138
- $watchTargets: i
139
- });
140
- }
141
- function eo(e) {
142
- return {
143
- $validator(i) {
144
- for (var o = arguments.length, n = new Array(o > 1 ? o - 1 : 0), a = 1; a < o; a++)
145
- n[a - 1] = arguments[a];
146
- return t(i).reduce((r, s, g) => {
147
- const d = Object.entries(s).reduce((N, y) => {
148
- let [M, A] = y;
149
- const c = e[M] || {}, x = Object.entries(c).reduce((f, L) => {
150
- let [P, T] = L;
151
- const j = zt(T).call(this, A, s, g, ...n), p = Ot(j);
152
- if (f.$data[P] = j, f.$data.$invalid = !p || !!f.$data.$invalid, f.$data.$error = f.$data.$invalid, !p) {
153
- let C = T.$message || "";
154
- const J = T.$params || {};
155
- typeof C == "function" && (C = C({
156
- $pending: !1,
157
- $invalid: !p,
158
- $params: J,
159
- $model: A,
160
- $response: j
161
- })), f.$errors.push({
162
- $property: M,
163
- $message: C,
164
- $params: J,
165
- $response: j,
166
- $model: A,
167
- $pending: !1,
168
- $validator: P
169
- });
170
- }
171
- return {
172
- $valid: f.$valid && p,
173
- $data: f.$data,
174
- $errors: f.$errors
175
- };
176
- }, {
177
- $valid: !0,
178
- $data: {},
179
- $errors: []
180
- });
181
- return N.$data[M] = x.$data, N.$errors[M] = x.$errors, {
182
- $valid: N.$valid && x.$valid,
183
- $data: N.$data,
184
- $errors: N.$errors
185
- };
186
- }, {
187
- $valid: !0,
188
- $data: {},
189
- $errors: {}
190
- });
191
- return {
192
- $valid: r.$valid && d.$valid,
193
- $data: r.$data.concat(d.$data),
194
- $errors: r.$errors.concat(d.$errors)
195
- };
196
- }, {
197
- $valid: !0,
198
- $data: [],
199
- $errors: []
200
- });
201
- },
202
- $message: (i) => {
203
- let {
204
- $response: o
205
- } = i;
206
- return o ? o.$errors.map((n) => Object.values(n).map((a) => a.map((r) => r.$message)).reduce((a, r) => a.concat(r), [])) : [];
207
- }
208
- };
209
- }
210
- const jt = (e) => {
211
- if (e = t(e), Array.isArray(e)) return !!e.length;
212
- if (e == null)
213
- return !1;
214
- if (e === !1)
215
- return !0;
216
- if (e instanceof Date)
217
- return !isNaN(e.getTime());
218
- if (typeof e == "object") {
219
- for (let i in e) return !0;
220
- return !1;
221
- }
222
- return !!String(e).length;
223
- }, to = (e) => (e = t(e), Array.isArray(e) ? e.length : typeof e == "object" ? Object.keys(e).length : String(e).length);
224
- function he() {
225
- for (var e = arguments.length, i = new Array(e), o = 0; o < e; o++)
226
- i[o] = arguments[o];
227
- return (n) => (n = t(n), !jt(n) || i.every((a) => (a.lastIndex = 0, a.test(n))));
228
- }
229
- var io = /* @__PURE__ */ Object.freeze({
230
- __proto__: null,
231
- forEach: eo,
232
- len: to,
233
- normalizeValidatorObject: Fe,
234
- regex: he,
235
- req: jt,
236
- unwrap: t,
237
- unwrapNormalizedValidator: zt,
238
- unwrapValidatorResponse: Ot,
239
- withAsync: Ji,
240
- withMessage: qi,
241
- withParams: Wi
242
- });
243
- he(/^[a-zA-Z]*$/);
244
- he(/^[a-zA-Z0-9]*$/);
245
- he(/^\d*(\.\d+)?$/);
246
- const oo = /^(?:[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;
247
- he(oo);
248
- const no = /^(?:(?:(?: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;
249
- he(no);
250
- he(/(^[0-9]*$)|(^-[0-9]+$)/);
251
- he(/^[-]?\d*(\.\d+)?$/);
252
- function Ge(e) {
253
- return !!li.find((i) => i.key === e);
254
- }
255
- const Rt = {
256
- AT: {
257
- regex: /^ATU\d{8}$/,
258
- prefix: "AT",
259
- example: "ATU12345678"
260
- },
261
- BE: {
262
- regex: /^BE0?\d{9}$/,
263
- prefix: "BE",
264
- example: "BE0123456789"
265
- },
266
- BG: {
267
- regex: /^BG\d{9,10}$/,
268
- prefix: "BG",
269
- example: "BG123456789"
270
- },
271
- HR: {
272
- regex: /^HR\d{11}$/,
273
- prefix: "HR",
274
- example: "HR12345678901"
275
- },
276
- CY: {
277
- regex: /^CY\d{8}[A-Z]$/,
278
- prefix: "CY",
279
- example: "CY12345678X"
280
- },
281
- CZ: {
282
- regex: /^CZ\d{8,10}$/,
283
- prefix: "CZ",
284
- example: "CZ12345678"
285
- },
286
- DE: {
287
- regex: /^DE\d{9}$/,
288
- prefix: "DE",
289
- example: "DE123456789"
290
- },
291
- DK: {
292
- regex: /^DK\d{8}$/,
293
- prefix: "DK",
294
- example: "DK12345678"
295
- },
296
- EE: {
297
- regex: /^EE\d{9}$/,
298
- prefix: "EE",
299
- example: "EE123456789"
300
- },
301
- GR: {
302
- regex: /^(EL|GR)\d{9}$/,
303
- prefix: "GR",
304
- example: "GR123456789"
305
- },
306
- ES: {
307
- regex: /^ES[A-Z0-9]\d{7}[A-Z0-9]$/,
308
- prefix: "ES",
309
- example: "ESX1234567X"
310
- },
311
- FI: {
312
- regex: /^FI\d{8}$/,
313
- prefix: "FI",
314
- example: "FI12345678"
315
- },
316
- FR: {
317
- regex: /^FR[0-9A-Z]{2}\d{9}$/,
318
- prefix: "FR",
319
- example: "FRXX123456789"
320
- },
321
- HU: {
322
- regex: /^HU\d{8}$/,
323
- prefix: "HU",
324
- example: "HU12345678"
325
- },
326
- IE: {
327
- regex: /^IE[0-9A-Z]{8,9}$/,
328
- prefix: "IE",
329
- example: "IE1234567A"
330
- },
331
- IS: {
332
- regex: /^IS\d{5}$/,
333
- prefix: "IS",
334
- example: "IS12345"
335
- },
336
- IT: {
337
- regex: /^IT\d{11}$/,
338
- prefix: "IT",
339
- example: "IT12345678901"
340
- },
341
- LT: {
342
- regex: /^LT(\d{9}|\d{12})$/,
343
- prefix: "LT",
344
- example: "LT123456789 or LT123456789012"
345
- },
346
- LU: {
347
- regex: /^LU\d{8}$/,
348
- prefix: "LU",
349
- example: "LU12345678"
350
- },
351
- LV: {
352
- regex: /^LV\d{11}$/,
353
- prefix: "LV",
354
- example: "LV12345678901"
355
- },
356
- ME: {
357
- regex: /^ME\d{9}$/,
358
- prefix: "ME",
359
- example: "ME123456789"
360
- },
361
- MT: {
362
- regex: /^MT\d{8}$/,
363
- prefix: "MT",
364
- example: "MT12345678"
365
- },
366
- NL: {
367
- regex: /^NL\d{9}B\d{2}$/,
368
- prefix: "NL",
369
- example: "NL123456789B01"
370
- },
371
- PL: {
372
- regex: /^PL\d{10}$/,
373
- prefix: "PL",
374
- example: "PL1234567890"
375
- },
376
- PT: {
377
- regex: /^PT\d{9}$/,
378
- prefix: "PT",
379
- example: "PT123456789"
380
- },
381
- RO: {
382
- regex: /^RO\d{2,10}$/,
383
- prefix: "RO",
384
- example: "RO1234567890"
385
- },
386
- RU: {
387
- regex: /^RU(\d{9}|\d{10}|\d{12})$/,
388
- prefix: "RU",
389
- example: "RU123456789 or RU1234567890 or RU123456789012"
390
- },
391
- SE: {
392
- regex: /^SE\d{10}01$/,
393
- prefix: "SE",
394
- example: "SE123456789001"
395
- },
396
- SI: {
397
- regex: /^SI\d{8}$/,
398
- prefix: "SI",
399
- example: "SI12345678"
400
- },
401
- SK: {
402
- regex: /^SK\d{10}$/,
403
- prefix: "SK",
404
- example: "SK1234567890"
405
- },
406
- CH: {
407
- regex: /^CHE\d{9}(MWST|TVA|IVA)?$/,
408
- prefix: "CHE",
409
- example: "CHE123456789MWST"
410
- },
411
- NO: {
412
- regex: /^NO\d{9}MVA$/,
413
- prefix: "NO",
414
- example: "NO123456789MVA"
415
- },
416
- GB: {
417
- regex: /^GB(\d{9}|\d{12}|GD\d{3}|HA\d{3})$/,
418
- prefix: "GB",
419
- example: "GB123456789"
420
- },
421
- XI: {
422
- regex: /^XI(\d{9}|\d{12})$/,
423
- prefix: "XI",
424
- example: "XI123456789"
425
- }
426
- }, ao = (e) => !e || typeof e != "string" || e.trim() === "" ? !0 : Object.values(Rt).some((i) => i.regex.test(e)), ro = ({ $model: e }) => {
427
- if (!e || typeof e != "string" || e.trim() === "")
428
- return "";
429
- const i = qt(oi, null);
430
- if (!i)
431
- return "Invalid tax ID";
432
- const { formatMessage: o } = i, n = Object.values(Rt).find(
433
- (a) => e.toUpperCase().startsWith(a.prefix.toUpperCase())
434
- );
435
- return n ? o(
436
- {
437
- defaultMessage: "Invalid tax ID format. Example: {example}",
438
- id: "form_validation.tax_id.invalid_format",
439
- description: "Error message when tax ID format is invalid but prefix matches"
440
- },
441
- { example: n.example }
442
- ) : o({
443
- defaultMessage: "Invalid tax ID",
444
- id: "taxId.invalid",
445
- description: "Error message when tax ID is invalid"
446
- });
447
- }, tt = io.withMessage(ro, ao), lo = "preview", so = "NL", Bt = (e) => {
448
- var i, o;
449
- if ("organization" in e)
450
- return (i = e.organization) == null ? void 0 : i.registered_address;
451
- if ("individual" in e)
452
- return (o = e.individual) == null ? void 0 : o.residential_address;
453
- }, co = (e) => {
454
- const i = Bt(e);
455
- return {
456
- ...(i == null ? void 0 : i.line1) && { line1: i.line1 },
457
- ...(i == null ? void 0 : i.line2) && { line2: i.line2 },
458
- ...(i == null ? void 0 : i.city) && { city: i.city },
459
- ...(i == null ? void 0 : i.state) && { state: i.state },
460
- country: (i == null ? void 0 : i.country) || so,
461
- ...(i == null ? void 0 : i.postal_code) && { postal_code: i.postal_code }
462
- };
463
- }, uo = (e) => {
464
- var n, a;
465
- const i = co(e), o = e.type ?? "INDIVIDUAL";
466
- if (o === "ORGANIZATION") {
467
- const r = "organization" in e ? e.organization : void 0, s = (a = (n = r == null ? void 0 : r.tax_ids) == null ? void 0 : n[0]) == null ? void 0 : a.id;
468
- return {
469
- type: o,
470
- organization: {
471
- legal_name: (r == null ? void 0 : r.legal_name) || lo,
472
- registered_address: i,
473
- ...s && {
474
- tax_id: tt.$validator(s, {}, {}) ? s : void 0
475
- }
476
- }
477
- };
478
- }
479
- return {
480
- type: o,
481
- individual: {
482
- residential_address: i
483
- }
484
- };
485
- }, po = {
486
- AD: "EUR",
487
- AE: "AED",
488
- AF: "AFN",
489
- AG: "XCD",
490
- AI: "XCD",
491
- AL: "ALL",
492
- AM: "AMD",
493
- AO: "AOA",
494
- AR: "ARS",
495
- AS: "USD",
496
- AT: "EUR",
497
- AU: "AUD",
498
- AW: "AWG",
499
- AX: "EUR",
500
- AZ: "AZN",
501
- BA: "BAM",
502
- BB: "BBD",
503
- BD: "BDT",
504
- BE: "EUR",
505
- BF: "XOF",
506
- BG: "BGN",
507
- BH: "BHD",
508
- BI: "BIF",
509
- BJ: "XOF",
510
- BL: "EUR",
511
- BM: "BMD",
512
- BN: "BND",
513
- BO: "BOB",
514
- BQ: "USD",
515
- BR: "BRL",
516
- BS: "BSD",
517
- BT: "BTN",
518
- BV: "NOK",
519
- BW: "BWP",
520
- BY: "BYN",
521
- BZ: "BZD",
522
- CA: "CAD",
523
- CC: "AUD",
524
- CD: "CDF",
525
- CF: "XAF",
526
- CG: "XAF",
527
- CH: "CHF",
528
- CI: "XOF",
529
- CK: "NZD",
530
- CL: "CLP",
531
- CM: "XAF",
532
- CN: "CNY",
533
- CO: "COP",
534
- CR: "CRC",
535
- CU: "CUP",
536
- CV: "CVE",
537
- CW: "ANG",
538
- CX: "AUD",
539
- CY: "EUR",
540
- CZ: "CZK",
541
- DE: "EUR",
542
- DJ: "DJF",
543
- DK: "DKK",
544
- DM: "XCD",
545
- DO: "DOP",
546
- DZ: "DZD",
547
- EC: "USD",
548
- EE: "EUR",
549
- EG: "EGP",
550
- EH: "MAD",
551
- ER: "ERN",
552
- ES: "EUR",
553
- ET: "ETB",
554
- FI: "EUR",
555
- FJ: "FJD",
556
- FK: "FKP",
557
- FM: "USD",
558
- FO: "DKK",
559
- FR: "EUR",
560
- GA: "XAF",
561
- GB: "GBP",
562
- GD: "XCD",
563
- GE: "GEL",
564
- GF: "EUR",
565
- GG: "GBP",
566
- GH: "GHS",
567
- GI: "GIP",
568
- GL: "DKK",
569
- GM: "GMD",
570
- GN: "GNF",
571
- GP: "EUR",
572
- GQ: "XAF",
573
- GR: "EUR",
574
- GS: "GBP",
575
- GT: "GTQ",
576
- GU: "USD",
577
- GW: "XOF",
578
- GY: "GYD",
579
- HK: "HKD",
580
- HM: "AUD",
581
- HN: "HNL",
582
- HR: "EUR",
583
- HT: "HTG",
584
- HU: "HUF",
585
- ID: "IDR",
586
- IE: "EUR",
587
- IL: "ILS",
588
- IM: "GBP",
589
- IN: "INR",
590
- IO: "USD",
591
- IQ: "IQD",
592
- IR: "IRR",
593
- IS: "ISK",
594
- IT: "EUR",
595
- JE: "GBP",
596
- JM: "JMD",
597
- JO: "JOD",
598
- JP: "JPY",
599
- KE: "KES",
600
- KG: "KGS",
601
- KH: "KHR",
602
- KI: "AUD",
603
- KM: "KMF",
604
- KN: "XCD",
605
- KP: "KPW",
606
- KR: "KRW",
607
- KW: "KWD",
608
- KY: "KYD",
609
- KZ: "KZT",
610
- LA: "LAK",
611
- LB: "LBP",
612
- LC: "XCD",
613
- LI: "CHF",
614
- LK: "LKR",
615
- LR: "LRD",
616
- LS: "LSL",
617
- LT: "EUR",
618
- LU: "EUR",
619
- LV: "EUR",
620
- LY: "LYD",
621
- MA: "MAD",
622
- MC: "EUR",
623
- MD: "MDL",
624
- ME: "EUR",
625
- MF: "EUR",
626
- MG: "MGA",
627
- MH: "USD",
628
- MK: "MKD",
629
- ML: "XOF",
630
- MM: "MMK",
631
- MN: "MNT",
632
- MO: "MOP",
633
- MP: "USD",
634
- MQ: "EUR",
635
- MR: "MRU",
636
- MS: "XCD",
637
- MT: "EUR",
638
- MU: "MUR",
639
- MV: "MVR",
640
- MW: "MWK",
641
- MX: "MXN",
642
- MY: "MYR",
643
- MZ: "MZN",
644
- NA: "NAD",
645
- NC: "XPF",
646
- NE: "XOF",
647
- NF: "AUD",
648
- NG: "NGN",
649
- NI: "NIO",
650
- NL: "EUR",
651
- NO: "NOK",
652
- NP: "NPR",
653
- NR: "AUD",
654
- NU: "NZD",
655
- NZ: "NZD",
656
- OM: "OMR",
657
- PA: "PAB",
658
- PE: "PEN",
659
- PF: "XPF",
660
- PG: "PGK",
661
- PH: "PHP",
662
- PK: "PKR",
663
- PL: "PLN",
664
- PM: "EUR",
665
- PN: "NZD",
666
- PR: "USD",
667
- PS: "ILS",
668
- PT: "EUR",
669
- PW: "USD",
670
- PY: "PYG",
671
- QA: "QAR",
672
- RE: "EUR",
673
- RO: "RON",
674
- RS: "RSD",
675
- RU: "RUB",
676
- RW: "RWF",
677
- SA: "SAR",
678
- SB: "SBD",
679
- SC: "SCR",
680
- SD: "SDG",
681
- SE: "SEK",
682
- SG: "SGD",
683
- SH: "SHP",
684
- SI: "EUR",
685
- SJ: "NOK",
686
- SK: "EUR",
687
- SL: "SLE",
688
- SM: "EUR",
689
- SN: "XOF",
690
- SO: "SOS",
691
- SR: "SRD",
692
- SS: "SSP",
693
- ST: "STN",
694
- SV: "USD",
695
- SX: "ANG",
696
- SY: "SYP",
697
- SZ: "SZL",
698
- TC: "USD",
699
- TD: "XAF",
700
- TF: "EUR",
701
- TG: "XOF",
702
- TH: "THB",
703
- TJ: "TJS",
704
- TK: "NZD",
705
- TL: "USD",
706
- TM: "TMT",
707
- TN: "TND",
708
- TO: "TOP",
709
- TR: "TRY",
710
- TT: "TTD",
711
- TV: "AUD",
712
- TW: "TWD",
713
- TZ: "TZS",
714
- UA: "UAH",
715
- UG: "UGX",
716
- US: "USD",
717
- UY: "UYU",
718
- UZ: "UZS",
719
- VA: "EUR",
720
- VC: "XCD",
721
- VE: "VES",
722
- VG: "USD",
723
- VI: "USD",
724
- VN: "VND",
725
- VU: "VUV",
726
- WF: "XPF",
727
- WS: "WST",
728
- YE: "YER",
729
- YT: "EUR",
730
- ZA: "ZAR",
731
- ZM: "ZMW",
732
- ZW: "ZWL"
733
- }, mo = (e) => {
734
- if (e)
735
- return po[e];
736
- }, $t = ({
737
- country: e,
738
- pricingCurrencySettings: i,
739
- fallbackCurrency: o
740
- }) => {
741
- const n = mo(e), a = (i == null ? void 0 : i.pricing_currencies) ?? [];
742
- return n && a.includes(n) ? n : (i == null ? void 0 : i.default_pricing_currency) ?? o ?? n;
743
- }, go = () => {
744
- const { getInvoicePreview: e } = pi(), i = Me(), o = F(), n = F(), a = F(), r = F({}), s = F(De.Initial), g = F({}), d = F(), N = (M) => `${M.type}:${M.value}`;
745
- return {
746
- loadInvoicePreview: async ({
747
- subscription: M,
748
- subscriptionStartAt: A,
749
- customer: c = {},
750
- seatsValues: x,
751
- unitsValues: f,
752
- enabledPricingIds: L,
753
- promotionCode: P
754
- }) => {
755
- var m, h, S, R, H, K;
756
- const T = uo(c);
757
- s.value = De.Loading;
758
- const $ = Ne({
759
- pricingPlanScheduleInfos: M.pricing_plan_schedule_infos,
760
- type: "DEFAULT"
761
- }), j = (m = $ == null ? void 0 : $.pricing_plan_version) == null ? void 0 : m.pricing_currency_settings, p = (((h = j == null ? void 0 : j.pricing_currencies) == null ? void 0 : h.length) ?? 0) > 1, C = ((R = (S = $ == null ? void 0 : $.pricing_plan_version) == null ? void 0 : S.billing_period_settings) == null ? void 0 : R.billing_periods) ?? [], J = C.length > 1, te = C.length > 0 ? C.map(({ period: Y }) => Y) : M.billing_period ? [M.billing_period] : [], u = $t({
762
- country: (H = Bt(c)) == null ? void 0 : H.country,
763
- pricingCurrencySettings: j,
764
- fallbackCurrency: M.billing_currency
765
- });
766
- if (!te.length) {
767
- i.warn("INVOICE_PREVIEW_SKIPPED", "No billing period to preview an invoice for", {
768
- subscriptionId: M.id
769
- }), s.value = De.Done;
770
- return;
771
- }
772
- const _ = M.billing_period ? N(M.billing_period) : N(te[0]), l = te.map(async (Y) => {
773
- var ie;
774
- const ae = N(Y), Z = wt({
775
- enabledPricings: L == null ? void 0 : L.map((q) => ({
776
- pricing_id: q
777
- })),
778
- seatsValues: x,
779
- unitsValues: f,
780
- pricingPlanScheduleInfos: M.pricing_plan_schedule_infos,
781
- pricingCurrency: p ? u : void 0,
782
- billingPeriod: J ? Y : void 0
783
- }) ?? [];
784
- if (P) {
785
- const q = (ie = M.pricing_plan_schedule_infos.find(
786
- ({ pricing_plan_schedule: ee }) => ee.type === "DEFAULT"
787
- )) == null ? void 0 : ie.id;
788
- if (q) {
789
- const ee = Z.find(
790
- ({ pricing_plan_schedule_id: oe }) => oe === q
791
- );
792
- ee ? ee.promotion_codes = [P] : Z.push({
793
- pricing_plan_schedule_id: q,
794
- promotion_codes: [P]
795
- });
796
- }
797
- }
798
- const re = {
799
- pricingPlanSubscriptionId: M.id,
800
- startAt: A,
801
- customizations: Z,
802
- customer: T
803
- }, ne = g.value[ae];
804
- if (ne && di(re, ne))
805
- return { periodKey: ae, response: void 0 };
806
- g.value = {
807
- ...g.value,
808
- [ae]: re
809
- };
810
- const U = await e(re);
811
- return { periodKey: ae, response: U };
812
- });
813
- try {
814
- const Y = {
815
- ...r.value
816
- }, ae = await Promise.all(l), Z = M.pricing_plan_schedule_infos.find(
817
- ({ pricing_plan_schedule: ne }) => ne.type === "TRIAL"
818
- ), re = (K = M.pricing_plan_schedule_infos.find(
819
- ({ pricing_plan_schedule: ne }) => ne.type === "DEFAULT"
820
- )) == null ? void 0 : K.id;
821
- ae.forEach(({ periodKey: ne, response: U }) => {
822
- var ee;
823
- if (!U) return;
824
- d.value = (ee = U.invoice_infos.at(-1)) == null ? void 0 : ee.pricing_plan_schedule_id, Z && (n.value = U.first_invoice, Z.start_at && Z.end_at && (o.value = ci(
825
- new Date(Z.start_at),
826
- new Date(Z.end_at)
827
- )));
828
- const ie = U.invoice_infos.find(
829
- ({ pricing_plan_schedule_id: oe }) => oe === re
830
- ), q = ie == null ? void 0 : ie.invoices[0];
831
- q && (Y[ne] = q);
832
- }), r.value = Y, a.value = Y[_];
833
- } catch (Y) {
834
- throw s.value = De.Failed, i.error("INVOICE_PREVIEW_FAILED", "Failed to load invoice preview", {}, Y), Y;
835
- } finally {
836
- s.value = De.Done;
837
- }
838
- },
839
- invoicePreview: a,
840
- invoicePreviewByBillingPeriod: r,
841
- trialInvoicePreview: n,
842
- trialPeriod: o,
843
- lastPreviewScheduleId: d,
844
- isPending: b(() => s.value === De.Loading)
845
- };
846
- }, Dt = ["email", "country"], Ut = "GENERIC_TAX_ID", Nt = {
847
- US: ["addressLine1", "postalCode"],
848
- CA: ["state"]
849
- }, yo = (e) => !e || !Nt[e] ? Dt : [...Nt[e], ...Dt], Et = (e) => {
850
- const i = {
851
- ...e.addressLine1 && { line1: e.addressLine1 },
852
- ...e.addressLine2 && { line2: e.addressLine2 },
853
- ...e.city && { city: e.city },
854
- ...e.state && { state: e.state },
855
- ...e.postalCode && { postal_code: e.postalCode },
856
- country: e.country ?? ""
857
- };
858
- return e.type === "ORGANIZATION" ? {
859
- type: "ORGANIZATION",
860
- organization: {
861
- legal_name: e.companyLegalName ?? "",
862
- registered_address: i,
863
- ...e.companyVatNumber && {
864
- tax_ids: [{ id: e.companyVatNumber, type: Ut }]
865
- }
866
- }
867
- } : {
868
- type: "INDIVIDUAL",
869
- individual: {
870
- residential_address: i
871
- }
872
- };
873
- };
874
- function vo() {
875
- return {
876
- /**
877
- * Get geolocation information from the user
878
- */
879
- getGeoLocation() {
880
- return fetch("https://api.country.is/").then((e) => e.json());
881
- }
882
- };
883
- }
884
- function fo({
885
- initialState: e,
886
- onRequiredFieldChange: i
887
- }) {
888
- const o = F(Be(e)), n = F(Be(e)), a = (y) => {
889
- const M = Be({ ...Jt(o.value), ...y });
890
- o.value = M, n.value = structuredClone(M);
891
- }, r = b(
892
- () => yo(o.value.country)
893
- ), s = (y) => r.value.includes(y), g = gi(
894
- {
895
- email: { required: ht, email: yi },
896
- country: { required: ht },
897
- state: { required: Re(() => s("state")) },
898
- addressLine1: { required: Re(() => s("addressLine1")) },
899
- postalCode: { required: Re(() => s("postalCode")) },
900
- companyLegalName: Re(o.value.type === "ORGANIZATION"),
901
- companyVatNumber: { taxId: tt }
902
- },
903
- o
904
- ), d = (y) => {
905
- y || vo().getGeoLocation().then(({ country: M }) => {
906
- o.value.country = M;
907
- });
908
- }, N = (y, M) => {
909
- const A = fi({ from: M, to: y }), c = Object.keys(A).find(_o);
910
- if (c) {
911
- if (["type", "companyVatNumber"].includes(c)) {
912
- i(y);
913
- return;
914
- }
915
- if (c === "seatsValues") {
916
- i(y);
917
- return;
918
- }
919
- if (c === "unitsValues") {
920
- i(y);
921
- return;
922
- }
923
- if (c === "enabledPricingIds") {
924
- i(y);
925
- return;
926
- }
927
- if (c !== "email" && s(c)) {
928
- i(y);
929
- return;
930
- }
931
- }
932
- };
933
- return ke(async () => {
934
- await d(e == null ? void 0 : e.country);
935
- }), bi(
936
- () => JSON.parse(JSON.stringify(o.value)),
937
- N,
938
- { debounce: 200 }
939
- ), {
940
- form: o,
941
- validation: g,
942
- getIsFieldRequired: s,
943
- updateInitialState: a,
944
- initialState: n
945
- };
946
- }
947
- const Be = (e = {}) => ({
948
- email: void 0,
949
- country: void 0,
950
- type: "INDIVIDUAL",
951
- companyLegalName: void 0,
952
- firstName: void 0,
953
- infix: void 0,
954
- lastName: void 0,
955
- addressLine1: void 0,
956
- addressLine2: void 0,
957
- postalCode: void 0,
958
- city: void 0,
959
- state: void 0,
960
- companyVatNumber: void 0,
961
- seatsValues: void 0,
962
- unitsValues: void 0,
963
- enabledPricingIds: void 0,
964
- ...e
965
- });
966
- function _o(e) {
967
- return e in Be();
968
- }
969
- function Mo(e, i = void 0) {
970
- const o = i ?? [], n = et(e);
971
- for (const a of n)
972
- if (["EXACTLY_ONE", "AT_LEAST_ONE"].includes(a.selection_constraint)) {
973
- const r = a.pricings.map((s) => s.id);
974
- if (i != null && i.some((s) => r.includes(s)))
975
- continue;
976
- o.push(a.pricings[0].id);
977
- }
978
- return o;
979
- }
980
- function ho(e) {
981
- return et(e).some(
982
- (o) => o.selection_constraint === "EXACTLY_ONE" || o.selection_constraint === "AT_LEAST_ONE"
983
- );
984
- }
985
- function bo(e) {
986
- const i = Di(e.pricing_plan_schedule_infos), o = et(e);
987
- return i.some((n) => n.product_type === "ADDON") || o.some((n) => n.object_type === "ADDON");
988
- }
989
- const Ct = (e) => (e ?? []).flatMap(
990
- (i) => i.configs ?? []
991
- ), Vt = (e) => [
992
- ...e.configs ?? [],
993
- ...Ct(e.billing_period_configs),
994
- ...(e.pricing_currency_configs ?? []).flatMap((i) => [
995
- ...i.configs ?? [],
996
- ...Ct(i.billing_period_configs)
997
- ])
998
- ];
999
- function La({
1000
- pricings: e,
1001
- pricingItemConfigId: i
1002
- }) {
1003
- var r, s;
1004
- const o = e.flatMap((g) => g.items ?? []).find((g) => {
1005
- var d;
1006
- return (d = g.configs) == null ? void 0 : d.some((N) => N.id === i);
1007
- }), n = (r = o == null ? void 0 : o.configs) == null ? void 0 : r.find((g) => g.id === i), a = (s = o == null ? void 0 : o.product_items) == null ? void 0 : s[0];
1008
- return {
1009
- config: n,
1010
- productItem: a
1011
- };
1012
- }
1013
- const Io = "1";
1014
- function Ao(e) {
1015
- const i = Tt(e).flatMap((o) => o.items ?? []).flatMap(Vt);
1016
- return new Map(
1017
- i.flatMap(
1018
- (o) => {
1019
- var n;
1020
- return (n = o.default_seats_value) != null && n.number ? [[o.id, o.default_seats_value.number]] : [];
1021
- }
1022
- )
1023
- );
1024
- }
1025
- function Po(e) {
1026
- var n;
1027
- const i = (n = e == null ? void 0 : e.pricing_plan_schedule) == null ? void 0 : n.seats_values;
1028
- if (!e || !(i != null && i.length))
1029
- return;
1030
- const o = e.pricing_plan_version ? Ao(e) : /* @__PURE__ */ new Map();
1031
- return i.map(({ pricing_item_config_id: a, number: r }) => ({
1032
- pricing_item_config_id: a,
1033
- number: r || o.get(a) || Io
1034
- }));
1035
- }
1036
- const Do = "1";
1037
- function No(e) {
1038
- const i = Tt(e).flatMap((o) => o.items ?? []).flatMap(Vt);
1039
- return new Map(
1040
- i.flatMap(
1041
- (o) => {
1042
- var n;
1043
- return (n = o.default_units) != null && n.number ? [[o.id, o.default_units.number]] : [];
1044
- }
1045
- )
1046
- );
1047
- }
1048
- function Eo(e) {
1049
- var n;
1050
- const i = (n = e == null ? void 0 : e.pricing_plan_schedule) == null ? void 0 : n.units;
1051
- if (!e || !(i != null && i.length))
1052
- return;
1053
- const o = e.pricing_plan_version ? No(e) : /* @__PURE__ */ new Map();
1054
- return i.map(({ pricing_item_config_id: a, number: r }) => ({
1055
- pricing_item_config_id: a,
1056
- number: r || o.get(a) || Do
1057
- }));
1058
- }
1059
- const Xe = "solvimon_checkout_redirect_state";
1060
- function Co({
1061
- initialCountry: e,
1062
- initialEmail: i,
1063
- subscriptionId: o,
1064
- enabledPricingIds: n
1065
- }) {
1066
- const a = Me(), r = (() => {
1067
- if (e) {
1068
- if (Ge(e)) return e;
1069
- a.error("INVALID_COUNTRY_CODE", `invalid country code provided: "${e}"`);
1070
- }
1071
- })(), s = (() => {
1072
- if (i) {
1073
- if (/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(i)) return i;
1074
- a.error("INVALID_EMAIL", `invalid email provided: "${i}"`);
1075
- }
1076
- })(), g = F(!1), d = F(), { getSubscription: N } = si(), y = go(), M = b(() => d.value && p.form.value.country && te.value), {
1077
- paymentMethodOptions: A,
1078
- get: c,
1079
- isPending: x,
1080
- error: f
1081
- } = Ii(), L = async (_, l) => {
1082
- try {
1083
- await c({
1084
- subscriptionId: d.value.id,
1085
- country: _,
1086
- amount: l
1087
- });
1088
- } catch {
1089
- a.error(
1090
- "PAYMENT_METHOD_OPTIONS_LOAD_FAILED",
1091
- "Failed to load the payment methods the checkout can offer",
1092
- {},
1093
- f.value
1094
- );
1095
- }
1096
- }, P = b(() => f.value !== null), T = () => {
1097
- const { country: _ } = p.form.value;
1098
- !d.value || !_ || !te.value || L(_, te.value);
1099
- }, $ = () => {
1100
- const _ = p.form.value;
1101
- return y.loadInvoicePreview({
1102
- subscription: d.value,
1103
- customer: Et(_),
1104
- seatsValues: _.seatsValues,
1105
- unitsValues: _.unitsValues,
1106
- enabledPricingIds: _.enabledPricingIds ?? n,
1107
- promotionCode: _.promotionCode
1108
- });
1109
- }, j = async (_) => {
1110
- const l = _.promotionCode ?? p.form.value.promotionCode, m = _.enabledPricingIds ?? p.form.value.enabledPricingIds, h = { ...p.form.value, ..._ };
1111
- return await y.loadInvoicePreview({
1112
- subscription: d.value,
1113
- customer: Et(h),
1114
- seatsValues: h.seatsValues,
1115
- unitsValues: h.unitsValues,
1116
- enabledPricingIds: m,
1117
- promotionCode: l
1118
- }), {
1119
- trialInvoicePreview: y.trialInvoicePreview.value,
1120
- invoicePreview: y.invoicePreview.value
1121
- };
1122
- }, p = fo({
1123
- initialState: {
1124
- country: r,
1125
- email: s
1126
- },
1127
- onRequiredFieldChange: () => {
1128
- d.value && $().catch(() => {
1129
- });
1130
- }
1131
- }), C = async () => {
1132
- var R, H, K, Y;
1133
- const _ = await N({
1134
- id: o,
1135
- expanded: !0
1136
- }), l = Ne({
1137
- pricingPlanScheduleInfos: _.pricing_plan_schedule_infos,
1138
- type: "DEFAULT"
1139
- }), m = (Y = (K = (H = (R = l == null ? void 0 : l.pricing_plan_version) == null ? void 0 : R.billing_period_settings) == null ? void 0 : H.billing_periods) == null ? void 0 : K[0]) == null ? void 0 : Y.period;
1140
- d.value = {
1141
- ..._,
1142
- billing_period: m ?? _.billing_period
1143
- };
1144
- const h = Po(l), S = Eo(l);
1145
- p.updateInitialState({
1146
- ...p.form.value,
1147
- enabledPricingIds: Mo(_, n),
1148
- ...h ? { seatsValues: h } : {},
1149
- ...S ? { unitsValues: S } : {}
1150
- });
1151
- }, J = b(() => {
1152
- var Z, re, ne, U, ie, q, ee, oe, ue;
1153
- const _ = p.form.value.firstName || p.form.value.infix || p.form.value.lastName ? {
1154
- ...p.form.value.firstName ? { first_name: p.form.value.firstName } : {},
1155
- ...p.form.value.infix ? { infix: p.form.value.infix } : {},
1156
- ...p.form.value.lastName ? { last_name: p.form.value.lastName } : {}
1157
- } : {}, l = {
1158
- ...p.form.value.addressLine1 && {
1159
- line1: p.form.value.addressLine1
1160
- },
1161
- ...p.form.value.addressLine2 && {
1162
- line2: p.form.value.addressLine2
1163
- },
1164
- ...p.form.value.city && { city: p.form.value.city },
1165
- ...p.form.value.postalCode && {
1166
- postal_code: p.form.value.postalCode
1167
- },
1168
- ...p.form.value.state && { state: p.form.value.state },
1169
- country: p.form.value.country ?? ""
1170
- }, m = Ne({
1171
- pricingPlanScheduleInfos: ((Z = d.value) == null ? void 0 : Z.pricing_plan_schedule_infos) ?? [],
1172
- type: "DEFAULT"
1173
- }), h = (re = m == null ? void 0 : m.pricing_plan_version) == null ? void 0 : re.pricing_currency_settings, S = (((ne = h == null ? void 0 : h.pricing_currencies) == null ? void 0 : ne.length) ?? 0) > 1, H = (((ie = (U = m == null ? void 0 : m.pricing_plan_version) == null ? void 0 : U.billing_period_settings) == null ? void 0 : ie.billing_periods) ?? []).length > 1, K = wt({
1174
- enabledPricings: (q = p.form.value.enabledPricingIds) == null ? void 0 : q.map((de) => ({
1175
- pricing_id: de
1176
- })),
1177
- seatsValues: p.form.value.seatsValues,
1178
- unitsValues: p.form.value.unitsValues,
1179
- pricingPlanScheduleInfos: ((ee = d.value) == null ? void 0 : ee.pricing_plan_schedule_infos) ?? [],
1180
- pricingCurrency: S ? (oe = d.value) == null ? void 0 : oe.billing_currency : void 0,
1181
- billingPeriod: H ? (ue = d.value) == null ? void 0 : ue.billing_period : void 0
1182
- }), Y = p.form.value.promotionCode, ae = Y && d.value ? (() => {
1183
- var Ce, Oe, xe;
1184
- const de = K ? [...K] : [], pe = ((Ce = de[0]) == null ? void 0 : Ce.pricing_plan_schedule_id) ?? ((xe = Ne({
1185
- pricingPlanScheduleInfos: ((Oe = d.value) == null ? void 0 : Oe.pricing_plan_schedule_infos) ?? [],
1186
- type: "DEFAULT"
1187
- })) == null ? void 0 : xe.id);
1188
- if (!pe)
1189
- return K;
1190
- const Ee = de.find(
1191
- ({ pricing_plan_schedule_id: le }) => le === pe
1192
- );
1193
- if (Ee)
1194
- Ee.promotion_codes = [Y];
1195
- else {
1196
- const le = K == null ? void 0 : K[0];
1197
- de.push({
1198
- pricing_plan_schedule_id: pe,
1199
- ...(le == null ? void 0 : le.enabled_pricings) && {
1200
- enabled_pricings: le.enabled_pricings
1201
- },
1202
- ...(le == null ? void 0 : le.seats_values) && {
1203
- seats_values: le.seats_values
1204
- },
1205
- ...(le == null ? void 0 : le.units) && {
1206
- units: le.units
1207
- },
1208
- promotion_codes: [Y]
1209
- });
1210
- }
1211
- return de;
1212
- })() : K;
1213
- return {
1214
- type: "INIT_PRICING_PLAN_SUBSCRIPTION",
1215
- init_pricing_plan_subscription: {
1216
- template_pricing_plan_subscription_id: o,
1217
- ...ae && {
1218
- pricing_plan_schedule_customizations: ae
1219
- },
1220
- customer_details: {
1221
- email: p.form.value.email ?? "",
1222
- type: p.form.value.type,
1223
- ...p.form.value.type === "INDIVIDUAL" ? {
1224
- individual: {
1225
- residential_address: l,
1226
- ..._ ? { name: _ } : {}
1227
- }
1228
- } : {
1229
- organization: {
1230
- registered_address: l,
1231
- legal_name: p.form.value.companyLegalName ?? "",
1232
- ...p.form.value.companyVatNumber && tt.$validator(p.form.value.companyVatNumber, {}, {}) ? {
1233
- tax_ids: [
1234
- {
1235
- id: p.form.value.companyVatNumber,
1236
- type: Ut
1237
- }
1238
- ]
1239
- } : {}
1240
- }
1241
- }
1242
- }
1243
- }
1244
- };
1245
- }), te = b(() => {
1246
- var _, l;
1247
- return ((_ = y.trialInvoicePreview.value) == null ? void 0 : _.invoice_amount_including_tax) ?? ((l = y.invoicePreview.value) == null ? void 0 : l.invoice_amount_including_tax);
1248
- });
1249
- Te(
1250
- [() => p.form.value.country, te],
1251
- ([_, l]) => {
1252
- !d.value || !_ || !l || L(_, l);
1253
- }
1254
- );
1255
- function u() {
1256
- sessionStorage.setItem(Xe, JSON.stringify(p.form.value));
1257
- }
1258
- return ke(async () => {
1259
- const _ = we("redirect_status"), l = !!we(Ei), m = !!we("payment_intent_client_secret") || !!we("setup_intent_client_secret");
1260
- _ === "succeeded" && l && m && (g.value = !0);
1261
- const S = sessionStorage.getItem(Xe);
1262
- let R = null;
1263
- if (S)
1264
- try {
1265
- R = JSON.parse(S);
1266
- } catch {
1267
- }
1268
- R && p.updateInitialState(R);
1269
- try {
1270
- await C();
1271
- } catch (H) {
1272
- throw a.error(
1273
- "SUBSCRIPTION_LOAD_FAILED",
1274
- "Failed to load the subscription the checkout prices",
1275
- {},
1276
- H
1277
- ), H;
1278
- }
1279
- try {
1280
- await $();
1281
- } catch {
1282
- }
1283
- R && (p.updateInitialState(R), sessionStorage.removeItem(Xe));
1284
- }), Te(
1285
- M,
1286
- (_) => {
1287
- _ && T();
1288
- },
1289
- { once: !0 }
1290
- ), {
1291
- /** What the host configured, once anything unusable has been dropped and reported. */
1292
- validatedEmail: s,
1293
- validatedCountry: r,
1294
- invoicePreview: y.invoicePreview,
1295
- invoicePreviewByBillingPeriod: y.invoicePreviewByBillingPeriod,
1296
- trialInvoicePreview: y.trialInvoicePreview,
1297
- trialPeriod: y.trialPeriod,
1298
- loadInvoicePreview: $,
1299
- updateInvoicePreviewOnBillingInformationChange: j,
1300
- lastPreviewScheduleId: y.lastPreviewScheduleId,
1301
- paymentMethodOptions: A,
1302
- hasPaymentMethodOptionsError: P,
1303
- retryPaymentMethodOptions: T,
1304
- isPaymentMethodsPending: x,
1305
- isInvoicePreviewPending: y.isPending,
1306
- subscription: d,
1307
- checkoutForm: p,
1308
- authorizationContext: J,
1309
- isPaid: g,
1310
- amount: te,
1311
- saveFormStateForRedirect: u
1312
- };
1313
- }
1314
- function xo({
1315
- checkoutForm: e,
1316
- updateInvoicePreviewOnBillingInformationChange: i,
1317
- formatErrorMessage: o,
1318
- onInvalidPromotionCode: n,
1319
- onApplyError: a
1320
- }) {
1321
- const r = Me(), s = F(!1), g = F(null), d = (A, c) => {
1322
- g.value = o ? o({ action: A, error: c }) : A === "apply" ? "Promotion code could not be applied. Please try again." : "Promotion code could not be removed. Please try again.";
1323
- }, N = (A) => Lo(A) && A.field === "promotion_codes", y = async (A) => {
1324
- const c = A == null ? void 0 : A.trim();
1325
- if (c) {
1326
- g.value = null, e.form.value.promotionCode = c, s.value = !0;
1327
- try {
1328
- await i({
1329
- promotionCode: c
1330
- });
1331
- } catch (x) {
1332
- r.capture(x, {
1333
- code: "PROMOTION_CODE_APPLY_FAILED",
1334
- message: "Failed to apply promotion code"
1335
- }), d("apply", x), a == null || a(), N(x) && (n == null || n()), await M({ suppressError: !0, preserveErrorMessage: !0 });
1336
- } finally {
1337
- s.value = !1;
1338
- }
1339
- }
1340
- }, M = async ({
1341
- suppressError: A = !1,
1342
- preserveErrorMessage: c = !1
1343
- } = {}) => {
1344
- c || (g.value = null), delete e.form.value.promotionCode, s.value = !0;
1345
- try {
1346
- await i({});
1347
- } catch (x) {
1348
- r.capture(x, {
1349
- code: "PROMOTION_CODE_REMOVE_FAILED",
1350
- message: "Failed to remove promotion code"
1351
- }), A || d("remove", x);
1352
- } finally {
1353
- s.value = !1;
1354
- }
1355
- };
1356
- return {
1357
- applyPromotionCode: y,
1358
- removePromotionCode: M,
1359
- isPromotionCodePending: s,
1360
- promotionCodeErrorMessage: g
1361
- };
1362
- }
1363
- function Lo(e) {
1364
- return typeof e == "object" && e !== null && "field" in e;
1365
- }
1366
- function wo({
1367
- subscription: e,
1368
- promotionCode: i,
1369
- appliedPromotionCode: o,
1370
- applyPromotionCode: n
1371
- }) {
1372
- Te(
1373
- e,
1374
- (a) => {
1375
- a && i && (o.value = i, n(i));
1376
- },
1377
- { once: !0 }
1378
- );
1379
- }
1380
- const To = { class: "flex items-center gap-2" }, So = /* @__PURE__ */ ce({
1381
- __name: "TaxIDCheckNotice",
1382
- props: {
1383
- taxIdValidationResult: { type: Object }
1384
- },
1385
- setup(e) {
1386
- const i = e, { formatMessage: o } = ve(), n = b(() => i.taxIdValidationResult.valid === "VALID"), a = b(() => n.value ? o({
1387
- defaultMessage: "VAT number is valid.",
1388
- id: "tax_check.valid_vat_number",
1389
- description: "The message shown when the VAT number is valid"
1390
- }) : o({
1391
- defaultMessage: "VAT number is invalid.",
1392
- id: "tax_check.invalid_vat_number",
1393
- description: "The message shown when the VAT number is invalid"
1394
- }));
1395
- return (r, s) => (v(), O(t(Ti), {
1396
- type: n.value ? "success" : "danger",
1397
- icon: !1
1398
- }, {
1399
- default: I(() => [
1400
- w("div", To, [
1401
- E(t(se), { variant: "body-xs" }, {
1402
- default: I(() => [
1403
- G(V(a.value), 1)
1404
- ]),
1405
- _: 1
1406
- })
1407
- ])
1408
- ]),
1409
- _: 1
1410
- }, 8, ["type"]));
1411
- }
1412
- });
1413
- function ko(e) {
1414
- const { checkTaxID: i } = Si(), o = F(void 0), n = b(() => {
1415
- var M;
1416
- return ((M = e.value.companyVatNumber) == null ? void 0 : M.trim()) ?? "";
1417
- }), a = b(() => e.value.companyLegalName ?? ""), r = b(() => e.value.country), s = F(!1), g = b(() => kt(r.value ?? "")), d = b(
1418
- () => !!(n.value && a.value && r.value)
1419
- ), N = b(() => g.value && n.value);
1420
- async function y() {
1421
- var M;
1422
- if (!(!d.value || !g.value || !r.value)) {
1423
- s.value = !0;
1424
- try {
1425
- const A = await i({
1426
- type: "ORGANIZATION",
1427
- organization: {
1428
- legal_name: a.value,
1429
- tax_ids: [{ id: n.value, type: "GENERIC_TAX_ID" }],
1430
- registered_address: {
1431
- country: r.value
1432
- }
1433
- }
1434
- });
1435
- (M = A == null ? void 0 : A.data) != null && M.length ? o.value = A.data[0] : o.value = void 0;
1436
- } finally {
1437
- s.value = !1;
1438
- }
1439
- }
1440
- }
1441
- return {
1442
- runTaxIDCheck: y,
1443
- taxIdValidationData: o,
1444
- isTaxIDCheckPending: s,
1445
- isTaxIDCheckEnabled: d,
1446
- showViesCheckNotice: N,
1447
- isSelectedCountryEU: g
1448
- };
1449
- }
1450
- const Oo = { class: "grid grid-cols-1 gap-1" }, zo = { class: "grid grid-cols-1 gap-2" }, jo = { key: 0 }, Ro = { class: "mt-2 flex flex-col gap-3" }, Bo = { class: "grid grid-cols-3 gap-2" }, $o = { key: 0 }, Uo = { class: "mt-4 grid grid-cols-1 gap-3" }, Vo = "checkout-form", Fo = /* @__PURE__ */ ce({
1451
- __name: "CheckoutForm",
1452
- props: /* @__PURE__ */ vt({
1453
- validation: { type: null },
1454
- initialState: { type: Object },
1455
- readOnlyEmail: { type: String },
1456
- showCustomerInfoOnTop: { type: Boolean },
1457
- isBillingInformationMandatory: { type: Boolean },
1458
- getIsFieldRequired: { type: Function },
1459
- readOnly: { type: Boolean }
1460
- }, {
1461
- modelValue: { required: !0 },
1462
- modelModifiers: {}
1463
- }),
1464
- emits: /* @__PURE__ */ vt(["submit"], ["update:modelValue"]),
1465
- setup(e) {
1466
- const i = e, o = F(!1), n = ei(e, "modelValue"), a = b({
1467
- get: () => n.value.type === "ORGANIZATION",
1468
- set: (L) => {
1469
- n.value.type = L ? "ORGANIZATION" : "INDIVIDUAL";
1470
- }
1471
- }), r = b(() => n.value.type === "ORGANIZATION"), s = b({
1472
- get: () => n.value.country,
1473
- set: (L) => {
1474
- n.value.country = L && Ge(L) ? L : void 0;
1475
- }
1476
- }), g = b(() => n.value.country !== "US"), { isTaxIDCheckEnabled: d, isTaxIDCheckPending: N, taxIdValidationData: y, runTaxIDCheck: M } = ko(n), { $t: A } = ve(), c = _i(), x = (L) => i.getIsFieldRequired(L) ? "" : " " + A({
1477
- defaultMessage: "(optional)",
1478
- id: "checkout.optional_suffix.label",
1479
- description: "The suffix for optional fields in the checkout form"
1480
- }), f = b(
1481
- () => n.value.country ? wi(n.value.country) : void 0
1482
- );
1483
- return (L, P) => (v(), W("form", {
1484
- id: Vo,
1485
- onSubmit: P[12] || (P[12] = $e((T) => L.$emit("submit", n.value), ["prevent"]))
1486
- }, [
1487
- w("div", Oo, [
1488
- E(t(ge), {
1489
- title: t(c).contactInformationTitle
1490
- }, {
1491
- default: I(() => [
1492
- w("div", zo, [
1493
- e.readOnly ? (v(), W(_e, { key: 0 }, [
1494
- E(t(se), {
1495
- variant: "body",
1496
- tag: "span",
1497
- weight: "semibold",
1498
- "no-spacing": ""
1499
- }, {
1500
- default: I(() => [
1501
- G(V(n.value.email), 1)
1502
- ]),
1503
- _: 1
1504
- }),
1505
- E(t(se), {
1506
- variant: "body-sm",
1507
- tag: "span",
1508
- color: "subtle",
1509
- "no-spacing": ""
1510
- }, {
1511
- default: I(() => [
1512
- G(V(f.value), 1)
1513
- ]),
1514
- _: 1
1515
- })
1516
- ], 64)) : (v(), W(_e, { key: 1 }, [
1517
- E(t(ye), {
1518
- modelValue: n.value.email,
1519
- "onUpdate:modelValue": P[0] || (P[0] = (T) => n.value.email = T),
1520
- required: "",
1521
- type: "email",
1522
- name: "email",
1523
- disabled: !!e.readOnlyEmail,
1524
- label: t(c).emailLabel,
1525
- placeholder: t(c).emailPlaceholder + x("email"),
1526
- error: e.validation.value.email.$errors
1527
- }, null, 8, ["modelValue", "disabled", "label", "placeholder", "error"]),
1528
- E(t(Mi), {
1529
- "single-model-value": s.value,
1530
- "onUpdate:singleModelValue": P[3] || (P[3] = (T) => s.value = T),
1531
- required: "",
1532
- name: "country",
1533
- label: t(c).countryLabel + x("country"),
1534
- error: e.validation.value.country.$errors
1535
- }, {
1536
- "label-suffix": I(() => [
1537
- !o.value && !e.isBillingInformationMandatory ? (v(), O(t(Ae), {
1538
- key: 0,
1539
- size: "xs",
1540
- intent: "subtle",
1541
- "icon-prefix": "add",
1542
- class: "py-0.5",
1543
- onClick: P[1] || (P[1] = (T) => o.value = !0)
1544
- }, {
1545
- default: I(() => [
1546
- G(V(t(A)({
1547
- defaultMessage: "More billing details",
1548
- description: "Label of the button in the checkout that lets you fill out all billing details",
1549
- id: "checkout.billing_details.add_billing_details_button.label"
1550
- })), 1)
1551
- ]),
1552
- _: 1
1553
- })) : B("", !0),
1554
- o.value && !e.isBillingInformationMandatory ? (v(), O(t(Ae), {
1555
- key: 1,
1556
- size: "sm",
1557
- intent: "subtle",
1558
- "icon-prefix": "close",
1559
- class: "py-0.5",
1560
- onClick: P[2] || (P[2] = (T) => o.value = !1)
1561
- }, {
1562
- default: I(() => [
1563
- G(V(t(A)({
1564
- defaultMessage: "Remove billing details",
1565
- id: "checkout.billing_details.remove_billing_details_button.label",
1566
- description: "Label of the button in the checkout that lets you remove the billing details"
1567
- })), 1)
1568
- ]),
1569
- _: 1
1570
- })) : B("", !0)
1571
- ]),
1572
- _: 1
1573
- }, 8, ["single-model-value", "label", "error"])
1574
- ], 64))
1575
- ]),
1576
- E(t(It), {
1577
- "is-open": o.value || !!e.isBillingInformationMandatory
1578
- }, {
1579
- default: I(() => [
1580
- o.value || e.isBillingInformationMandatory ? (v(), W("div", jo, [
1581
- w("div", Ro, [
1582
- E(t(ye), {
1583
- modelValue: n.value.addressLine1,
1584
- "onUpdate:modelValue": P[4] || (P[4] = (T) => n.value.addressLine1 = T),
1585
- name: "address_line_1",
1586
- label: t(A)({
1587
- defaultMessage: "Billing address",
1588
- id: "checkout.address.title",
1589
- description: "Address line 1 of the customer address in the checkout form"
1590
- }),
1591
- placeholder: t(A)({
1592
- defaultMessage: "Address line 1...",
1593
- id: "checkout.address.line1.placeholder",
1594
- description: "Address line 1 of the customer address in the checkout form"
1595
- }) + x("addressLine1"),
1596
- required: "",
1597
- error: e.validation.value.addressLine1.$errors
1598
- }, null, 8, ["modelValue", "label", "placeholder", "error"]),
1599
- E(t(ye), {
1600
- modelValue: n.value.addressLine2,
1601
- "onUpdate:modelValue": P[5] || (P[5] = (T) => n.value.addressLine2 = T),
1602
- name: "address_line_2",
1603
- placeholder: t(A)({
1604
- defaultMessage: "Address line 2...",
1605
- id: "checkout.address.line2.placeholder",
1606
- description: "Address line 2 of the customer address in the checkout form"
1607
- }) + x("addressLine2")
1608
- }, null, 8, ["modelValue", "placeholder"]),
1609
- w("div", Bo, [
1610
- E(t(ye), {
1611
- modelValue: n.value.postalCode,
1612
- "onUpdate:modelValue": P[6] || (P[6] = (T) => n.value.postalCode = T),
1613
- name: "postal_code",
1614
- placeholder: t(c).postalCodePlaceholder + x("postalCode"),
1615
- error: e.validation.value.addressLine1.$errors
1616
- }, null, 8, ["modelValue", "placeholder", "error"]),
1617
- E(t(ye), {
1618
- modelValue: n.value.city,
1619
- "onUpdate:modelValue": P[7] || (P[7] = (T) => n.value.city = T),
1620
- name: "city",
1621
- placeholder: t(c).cityPlaceholder + x("city")
1622
- }, null, 8, ["modelValue", "placeholder"]),
1623
- E(t(ye), {
1624
- modelValue: n.value.state,
1625
- "onUpdate:modelValue": P[8] || (P[8] = (T) => n.value.state = T),
1626
- name: "state",
1627
- placeholder: t(c).statePlaceholder + x("state"),
1628
- error: e.validation.value.state.$errors
1629
- }, null, 8, ["modelValue", "placeholder", "error"])
1630
- ])
1631
- ])
1632
- ])) : B("", !0)
1633
- ]),
1634
- _: 1
1635
- }, 8, ["is-open"])
1636
- ]),
1637
- _: 1
1638
- }, 8, ["title"]),
1639
- e.readOnly ? B("", !0) : (v(), O(t(ge), { key: 0 }, {
1640
- default: I(() => [
1641
- E(hi, {
1642
- modelValue: a.value,
1643
- "onUpdate:modelValue": P[9] || (P[9] = (T) => a.value = T),
1644
- "no-spacing": "",
1645
- class: "!flex"
1646
- }, null, 8, ["modelValue"]),
1647
- E(t(It), { "is-open": r.value }, {
1648
- default: I(() => [
1649
- r.value ? (v(), W("div", $o, [
1650
- w("div", Uo, [
1651
- E(t(ye), {
1652
- modelValue: n.value.companyLegalName,
1653
- "onUpdate:modelValue": P[10] || (P[10] = (T) => n.value.companyLegalName = T),
1654
- required: "",
1655
- name: "legal_name",
1656
- label: t(c).legalNameLabel,
1657
- placeholder: t(c).legalNamePlaceholder
1658
- }, null, 8, ["modelValue", "label", "placeholder"]),
1659
- g.value ? (v(), O(t(ye), {
1660
- key: 0,
1661
- modelValue: n.value.companyVatNumber,
1662
- "onUpdate:modelValue": P[11] || (P[11] = (T) => n.value.companyVatNumber = T),
1663
- name: "vat_number",
1664
- "input-class": "focus:outline-none focus:ring-0",
1665
- label: t(c).vatNumberLabel,
1666
- placeholder: t(c).vatNumberPlaceholder,
1667
- error: e.validation.value.companyVatNumber.$errors,
1668
- "suffix-class": "px-2 border-l-0"
1669
- }, Je({ _: 2 }, [
1670
- t(kt)(n.value.country ?? "") ? {
1671
- name: "suffix",
1672
- fn: I(() => [
1673
- E(t(Ae), {
1674
- type: "button",
1675
- size: "sm",
1676
- intent: "secondary",
1677
- disabled: !t(d) || t(N) || e.validation.value.companyVatNumber.$invalid,
1678
- onClick: t(M)
1679
- }, {
1680
- default: I(() => [
1681
- G(V(t(A)({
1682
- defaultMessage: "Check",
1683
- id: "checkout.vat_number.check_button.label",
1684
- description: "The label for the check button in the checkout form"
1685
- })), 1)
1686
- ]),
1687
- _: 1
1688
- }, 8, ["disabled", "onClick"])
1689
- ]),
1690
- key: "0"
1691
- } : void 0
1692
- ]), 1032, ["modelValue", "label", "placeholder", "error"])) : B("", !0),
1693
- t(y) ? (v(), W("div", {
1694
- key: 1,
1695
- class: be({ "opacity-75": t(N) })
1696
- }, [
1697
- E(So, { "tax-id-validation-result": t(y) }, null, 8, ["tax-id-validation-result"])
1698
- ], 2)) : B("", !0)
1699
- ])
1700
- ])) : B("", !0)
1701
- ]),
1702
- _: 1
1703
- }, 8, ["is-open"])
1704
- ]),
1705
- _: 1
1706
- }))
1707
- ])
1708
- ], 32));
1709
- }
1710
- }), Go = {
1711
- key: 0,
1712
- class: "flex items-center"
1713
- }, Yo = ["innerHTML"], Ko = ["innerHTML"], Qo = /* @__PURE__ */ ce({
1714
- __name: "CheckoutTitle",
1715
- props: {
1716
- trialPeriod: { type: Object },
1717
- subscriptionName: { type: String },
1718
- amount: { type: Object },
1719
- billingPeriod: { type: Object },
1720
- countryCode: { type: null },
1721
- trialStartDate: { type: Date },
1722
- subscriptionStartDate: { type: Date }
1723
- },
1724
- setup(e) {
1725
- const { $t: i } = ve();
1726
- return (o, n) => (v(), W("div", null, [
1727
- w("div", null, [
1728
- E(t(se), {
1729
- variant: "heading-1",
1730
- class: "inline-block"
1731
- }, {
1732
- default: I(() => [
1733
- G(V(e.trialStartDate ? e.subscriptionName : t(i)({
1734
- defaultMessage: "Pay and subscribe",
1735
- id: "checkout.page_title",
1736
- description: "The title of the checkout page"
1737
- })) + V(" "), 1),
1738
- e.trialPeriod ? (v(), O(t(ui), {
1739
- key: 0,
1740
- "trial-period": e.trialPeriod,
1741
- size: "lg",
1742
- class: "-translate-y-0.5"
1743
- }, null, 8, ["trial-period"])) : B("", !0)
1744
- ]),
1745
- _: 1
1746
- })
1747
- ]),
1748
- E(t(se), {
1749
- variant: "body-sm",
1750
- color: "subtle",
1751
- "no-spacing": ""
1752
- }, {
1753
- default: I(() => [
1754
- e.countryCode ? (v(), W("span", {
1755
- key: 1,
1756
- innerHTML: e.trialStartDate ? t(i)(
1757
- {
1758
- defaultMessage: "You will be billed <strong>{price}</strong> per {period_name}, starting {startDate, date, long}.",
1759
- id: "checkout.trial_period_description",
1760
- description: "The description of the trial period"
1761
- },
1762
- {
1763
- price: t(Ie)(e.amount),
1764
- // @ts-expect-error formatjs does not support this type yet
1765
- startDate: e.subscriptionStartDate,
1766
- period_name: t(ze)(e.billingPeriod, {
1767
- short: !0,
1768
- hideValueForExactPeriods: !0
1769
- }),
1770
- // @ts-ignore
1771
- strong: (a) => `<strong>${a}</strong>`
1772
- }
1773
- ) : t(i)(
1774
- {
1775
- defaultMessage: "You will be billed <strong>{price}</strong> per {period_name}, starting today.",
1776
- id: "checkout.subscription_description",
1777
- description: "The description of the subscription"
1778
- },
1779
- {
1780
- price: t(Ie)(e.amount),
1781
- period_name: t(ze)(e.billingPeriod, {
1782
- short: !0,
1783
- hideValueForExactPeriods: !0
1784
- }),
1785
- // @ts-ignore
1786
- strong: (a) => `<strong>${a}</strong>`
1787
- }
1788
- )
1789
- }, null, 8, Ko)) : (v(), W("span", Go, [
1790
- E(t(ji), { "is-dark-mode": "" }, {
1791
- tooltip: I(() => [
1792
- E(t(Ri), null, {
1793
- default: I(() => [
1794
- E(t(Bi), null, {
1795
- default: I(() => [
1796
- G(V(t(i)({
1797
- defaultMessage: "Will be determined by billing information",
1798
- description: "Tooltip content for the invoice preview when taxes are not determined by billing information",
1799
- id: "invoice_preview.taxes_not_determined_by_billing_information_tooltip"
1800
- })), 1)
1801
- ]),
1802
- _: 1
1803
- })
1804
- ]),
1805
- _: 1
1806
- })
1807
- ]),
1808
- default: I(() => [
1809
- E(t(ki), {
1810
- "width-class": "w-10",
1811
- "height-class": "h-4",
1812
- shade: "darker",
1813
- class: "mr-1.5 inline-block"
1814
- })
1815
- ]),
1816
- _: 1
1817
- }),
1818
- w("span", {
1819
- innerHTML: e.trialStartDate ? t(i)(
1820
- {
1821
- defaultMessage: "per {period_name} starting, {startDate, date, long}",
1822
- id: "checkout.trial_period_description_without_price",
1823
- description: "The description of the trial period, while the price is still being determined"
1824
- },
1825
- {
1826
- // @ts-expect-error formatjs does not support this type yet
1827
- startDate: e.subscriptionStartDate,
1828
- period_name: t(ze)(e.billingPeriod, {
1829
- short: !0,
1830
- hideValueForExactPeriods: !0
1831
- })
1832
- }
1833
- ) : t(i)(
1834
- {
1835
- defaultMessage: "per {period_name}, starting today",
1836
- id: "checkout.subscription_description_without_price",
1837
- description: "The description of the subscription, while the price is still being determined"
1838
- },
1839
- {
1840
- period_name: t(ze)(e.billingPeriod, {
1841
- short: !0,
1842
- hideValueForExactPeriods: !0
1843
- })
1844
- }
1845
- )
1846
- }, null, 8, Yo)
1847
- ]))
1848
- ]),
1849
- _: 1
1850
- })
1851
- ]));
1852
- }
1853
- }), Ho = (e) => {
1854
- var i;
1855
- return ((i = e.periods) == null ? void 0 : i.some(
1856
- (o) => o.groups.some(
1857
- (n) => {
1858
- var a;
1859
- return (a = n.lines) == null ? void 0 : a.some(
1860
- (r) => r.product_items.some(
1861
- (s) => s.model_type === "USAGE_BASED"
1862
- )
1863
- );
1864
- }
1865
- )
1866
- )) ?? !1;
1867
- }, Zo = { class: "flex min-h-96 w-full items-center justify-center" }, Xo = { class: "max-w-sm" }, Wo = /* @__PURE__ */ ce({
1868
- __name: "CheckoutNotAvailable",
1869
- setup(e) {
1870
- const { $t: i } = ve(), o = () => {
1871
- window.location.reload();
1872
- };
1873
- return (n, a) => (v(), W("div", Zo, [
1874
- w("div", Xo, [
1875
- E(t(se), { variant: "heading-1" }, {
1876
- default: I(() => [
1877
- G(V(t(i)({
1878
- defaultMessage: "Checkout not available",
1879
- id: "checkout.not_available.title",
1880
- description: "The title of the checkout not available page"
1881
- })), 1)
1882
- ]),
1883
- _: 1
1884
- }),
1885
- E(t(se), {
1886
- variant: "body-sm",
1887
- color: "subtle"
1888
- }, {
1889
- default: I(() => [
1890
- G(V(t(i)({
1891
- defaultMessage: "The checkout is currently not available.",
1892
- id: "checkout.not_available.description",
1893
- description: "The description of the checkout not available page"
1894
- })) + " ", 1),
1895
- w("a", {
1896
- href: "#",
1897
- class: "text-primary-900 hover:underline",
1898
- onClick: $e(o, ["prevent"])
1899
- }, V(t(i)({
1900
- defaultMessage: "Reload",
1901
- id: "checkout.not_available.reload_button",
1902
- description: "The label of the reload button"
1903
- })), 1),
1904
- G(" " + V(t(i)({
1905
- defaultMessage: "this page to try again, or contact customer support.",
1906
- id: "checkout.not_available.contact_support_message",
1907
- description: "The message shown when the user wants to contact customer support"
1908
- })), 1)
1909
- ]),
1910
- _: 1
1911
- })
1912
- ])
1913
- ]));
1914
- }
1915
- }), qo = /* @__PURE__ */ ce({
1916
- __name: "SubscriptionPaymentCompletedCard",
1917
- emits: ["continue-to-merchant"],
1918
- setup(e) {
1919
- const { $t: i } = ve();
1920
- return (o, n) => (v(), O($i, {
1921
- status: "success",
1922
- title: t(i)({
1923
- defaultMessage: "Payment successful",
1924
- id: "subscription_payment_completed_card.title",
1925
- description: "The title for when a payment has been successful"
1926
- })
1927
- }, {
1928
- default: I(() => [
1929
- E(t(se), {
1930
- variant: "body-xs",
1931
- color: "subtle",
1932
- tag: "span"
1933
- }, {
1934
- default: I(() => [
1935
- G(V(t(i)({
1936
- defaultMessage: "Thank you for subscribing.",
1937
- id: "subscription_payment_completed_card.thank_you_for_subscribing",
1938
- description: "The text shown after a successful message before a redirect"
1939
- })), 1)
1940
- ]),
1941
- _: 1
1942
- })
1943
- ]),
1944
- _: 1
1945
- }, 8, ["title"]));
1946
- }
1947
- }), Jo = { class: "flex items-start" }, en = { class: "flex grow flex-col" }, tn = { class: "flex items-center gap-1" }, on = { class: "ml-4 flex items-center self-center" }, nn = /* @__PURE__ */ ce({
1948
- __name: "PricingGroupContent",
1949
- props: {
1950
- name: { type: String },
1951
- description: { type: String }
1952
- },
1953
- setup(e) {
1954
- return (i, o) => (v(), W("div", Jo, [
1955
- w("div", en, [
1956
- w("div", tn, [
1957
- E(t(se), {
1958
- tag: "span",
1959
- variant: "body-sm",
1960
- weight: "semibold"
1961
- }, {
1962
- default: I(() => [
1963
- G(V(e.name), 1)
1964
- ]),
1965
- _: 1
1966
- }),
1967
- We(i.$slots, "badge")
1968
- ]),
1969
- E(t(se), {
1970
- tag: "span",
1971
- variant: "body-xs",
1972
- color: "subtle"
1973
- }, {
1974
- default: I(() => [
1975
- G(V(e.description), 1)
1976
- ]),
1977
- _: 1
1978
- })
1979
- ]),
1980
- w("div", on, [
1981
- We(i.$slots, "default")
1982
- ])
1983
- ]));
1984
- }
1985
- }), an = { class: "sv-order-summary__body grid grid-cols-1 gap-1" }, rn = { class: "px-3 py-2" }, ln = { class: "sv-order-summary__billing-period flex flex-col gap-3" }, sn = { class: "px-3 py-2" }, cn = {
1986
- key: 3,
1987
- class: "sv-order-summary__items"
1988
- }, xt = /* @__PURE__ */ ce({
1989
- __name: "OrderSummary",
1990
- props: {
1991
- subscription: { type: Object },
1992
- invoice: { type: Object },
1993
- invoicePreviewByBillingPeriod: { type: Object },
1994
- trialInvoice: { type: Object },
1995
- enabledPricingIds: { type: Array },
1996
- trialPeriod: { type: Object },
1997
- avatar: { type: String },
1998
- isPaid: { type: Boolean },
1999
- isUsageBased: { type: Boolean },
2000
- isPreviewAndPaymentMethodsPending: { type: Boolean },
2001
- collapsible: { type: String },
2002
- noTitle: { type: Boolean },
2003
- countryCode: { type: null },
2004
- variant: { type: String }
2005
- },
2006
- emits: ["billing-period-change"],
2007
- setup(e, { emit: i }) {
2008
- const o = e, n = i, { $t: a } = ve(), { map: r, formatTimePeriod: s } = Lt(), { isMobileViewport: g } = St(), d = b(() => g.value ? "sm" : "xs"), N = (l) => `${l.type}:${l.value}`, y = ["DAY", "WEEK", "MONTH", "YEAR"], M = (l) => y.includes(l), A = (l) => {
2009
- if (!l)
2010
- return;
2011
- const [m, h] = l.split(":"), S = Number(h);
2012
- if (!(!S || !M(m)))
2013
- return { type: m, value: S };
2014
- }, c = b({
2015
- get: () => {
2016
- const l = o.subscription.billing_period;
2017
- return l ? `${l.type}:${l.value}` : void 0;
2018
- },
2019
- set: (l) => {
2020
- if (!l) return;
2021
- const [m, h] = l.split(":"), S = Number(h);
2022
- S && M(m) && n("billing-period-change", { type: m, value: S });
2023
- }
2024
- }), x = (l) => {
2025
- var S, R, H, K;
2026
- const m = (K = (H = (R = (S = o.invoicePreviewByBillingPeriod) == null ? void 0 : S[N(l)]) == null ? void 0 : R.periods) == null ? void 0 : H[0]) == null ? void 0 : K.amount_including_tax;
2027
- if (!m)
2028
- return;
2029
- const h = l.type === "MONTH" && l.value === 3 ? a({
2030
- defaultMessage: "/quarter",
2031
- id: "checkout.order_summary_block.billing_period.per_quarter",
2032
- description: "Period label for quarterly billing"
2033
- }) : a(
2034
- {
2035
- defaultMessage: "/{period}",
2036
- id: "checkout.order_summary_block.billing_period.per_label",
2037
- description: "Period label for billing cycles"
2038
- },
2039
- {
2040
- period: s(l, {
2041
- prefix: !1,
2042
- hideValueForExactPeriods: !0
2043
- })
2044
- }
2045
- );
2046
- return a(
2047
- {
2048
- defaultMessage: "{amount}{period}",
2049
- id: "checkout.order_summary_block.billing_period.sub_label",
2050
- description: "Billing period option sublabel showing price per period"
2051
- },
2052
- {
2053
- amount: Ie(m),
2054
- period: h
2055
- }
2056
- );
2057
- }, f = (l) => {
2058
- var m, h, S, R;
2059
- return (R = (S = (h = (m = o.invoicePreviewByBillingPeriod) == null ? void 0 : m[N(l)]) == null ? void 0 : h.periods) == null ? void 0 : S[0]) == null ? void 0 : R.amount_including_tax;
2060
- }, L = (l) => Number(l.quantity), P = (l, m) => {
2061
- if (!m)
2062
- return;
2063
- const S = {
2064
- DAY: 365,
2065
- WEEK: 52,
2066
- MONTH: 12,
2067
- YEAR: 1
2068
- }[l.type] / Math.max(l.value ?? 1, 1), R = L(m) * S;
2069
- if (Number.isFinite(R))
2070
- return {
2071
- quantity: R.toFixed(2),
2072
- currency: m.currency
2073
- };
2074
- }, T = (l, m) => {
2075
- if (!l || !m)
2076
- return;
2077
- const h = L(l) - L(m);
2078
- if (!(!Number.isFinite(h) || h <= 0))
2079
- return {
2080
- quantity: h.toFixed(2),
2081
- currency: l.currency
2082
- };
2083
- }, $ = (l) => {
2084
- if (!l)
2085
- return;
2086
- const m = a(
2087
- {
2088
- defaultMessage: "Save {amount}",
2089
- id: "checkout.order_summary_block.billing_period.save_badge.prefix",
2090
- description: "First line for the savings badge label"
2091
- },
2092
- { amount: Ie(l) }
2093
- ), h = a({
2094
- defaultMessage: "/year",
2095
- id: "checkout.order_summary_block.billing_period.save_badge.suffix",
2096
- description: "Second line for the savings badge label"
2097
- });
2098
- return `${m}${h}`;
2099
- }, j = b(() => {
2100
- var Z, re, ne;
2101
- const l = Ne({
2102
- pricingPlanScheduleInfos: o.subscription.pricing_plan_schedule_infos ?? [],
2103
- type: "DEFAULT"
2104
- }), m = ((re = (Z = l == null ? void 0 : l.pricing_plan_version) == null ? void 0 : Z.billing_period_settings) == null ? void 0 : re.billing_periods) ?? [], h = /* @__PURE__ */ new Map(), S = (U) => {
2105
- U && h.set(N(U), U);
2106
- }, R = (U) => {
2107
- var ie;
2108
- (ie = U == null ? void 0 : U.items) == null || ie.forEach((q) => {
2109
- var ee, oe;
2110
- (ee = q.billing_period_configs) == null || ee.forEach(
2111
- (ue) => S(ue.billing_period)
2112
- ), (oe = q.pricing_currency_configs) == null || oe.forEach((ue) => {
2113
- var de;
2114
- (de = ue.billing_period_configs) == null || de.forEach(
2115
- (pe) => S(pe.billing_period)
2116
- );
2117
- });
2118
- });
2119
- };
2120
- if ((((ne = l == null ? void 0 : l.pricing_plan_version) == null ? void 0 : ne.pricing_categories) ?? []).forEach((U) => {
2121
- var ie, q;
2122
- (ie = U.pricings) == null || ie.forEach((ee) => R(ee)), (q = U.pricing_groups) == null || q.forEach(
2123
- (ee) => {
2124
- var oe;
2125
- return (oe = ee.pricings) == null ? void 0 : oe.forEach((ue) => R(ue));
2126
- }
2127
- );
2128
- }), !h.size)
2129
- return [];
2130
- const K = m.map((U) => h.get(N(U.period))).filter((U) => !!U), Y = new Set(K.map(N)), ae = [...h.values()].filter(
2131
- (U) => !Y.has(N(U))
2132
- );
2133
- return [...K, ...ae];
2134
- }), p = b(() => {
2135
- const l = j.value[j.value.length - 1], m = l ? P(l, f(l)) : void 0;
2136
- return j.value.map((S) => {
2137
- const R = S.type === "MONTH" && S.value === 3 ? a({
2138
- defaultMessage: "Billed quarterly",
2139
- id: "checkout.order_summary_block.billing_period.quarterly",
2140
- description: "Billing period option label for quarterly billing"
2141
- }) : a(
2142
- {
2143
- defaultMessage: "Billed {period}",
2144
- id: "checkout.order_summary_block.billing_period.label",
2145
- description: "Billing period option label for the selected period"
2146
- },
2147
- { period: r.value[S.type].full }
2148
- ), H = f(S), K = P(S, H), Y = l && S.type === l.type && S.value === l.value ? void 0 : T(K, m), ae = $(Y);
2149
- return {
2150
- label: R,
2151
- subLabel: x(S),
2152
- labelSuffixComponent: ae ? {
2153
- component: At,
2154
- props: {
2155
- color: "primary",
2156
- content: ae,
2157
- size: d.value,
2158
- class: "whitespace-nowrap text-left leading-tight"
2159
- }
2160
- } : void 0,
2161
- hidden: c.value === `${S.type}:${S.value}`,
2162
- value: `${S.type}:${S.value}`
2163
- };
2164
- });
2165
- }), C = b(() => {
2166
- const l = p.value, m = l[0], h = l[l.length - 1];
2167
- return {
2168
- smallestPeriod: m == null ? void 0 : m.value,
2169
- biggestPeriod: h == null ? void 0 : h.value
2170
- };
2171
- }), J = b(
2172
- () => p.value.find((l) => l.value === C.value.biggestPeriod)
2173
- ), te = b(
2174
- () => p.value.find((l) => l.value === c.value)
2175
- ), u = b(() => {
2176
- var Z, re, ne, U, ie, q, ee, oe;
2177
- const l = p.value, m = l[l.length - 1], h = c.value;
2178
- if (!m || !h || h === m.value)
2179
- return "";
2180
- const S = A(m.value);
2181
- if (!S)
2182
- return "";
2183
- const R = (U = (ne = (re = (Z = o.invoicePreviewByBillingPeriod) == null ? void 0 : Z[m.value]) == null ? void 0 : re.periods) == null ? void 0 : ne[0]) == null ? void 0 : U.amount_including_tax, H = A(h), K = (oe = (ee = (q = (ie = o.invoicePreviewByBillingPeriod) == null ? void 0 : ie[h]) == null ? void 0 : q.periods) == null ? void 0 : ee[0]) == null ? void 0 : oe.amount_including_tax;
2184
- if (!H || !K)
2185
- return "";
2186
- const Y = P(H, K), ae = P(S, R);
2187
- return $(T(Y, ae)) ?? "";
2188
- }), _ = (l) => {
2189
- const { smallestPeriod: m, biggestPeriod: h } = C.value;
2190
- c.value = l ? h : m;
2191
- };
2192
- return (l, m) => (v(), O(t(ge), {
2193
- class: "sv-order-summary",
2194
- "no-border": "",
2195
- "no-spacing": "",
2196
- "content-background": "none",
2197
- title: e.noTitle ? void 0 : t(a)({
2198
- defaultMessage: "Order summary",
2199
- id: "checkout.order_summary_block.title",
2200
- description: "The title of the order summary block that lists the subscription cost in the checkout"
2201
- })
2202
- }, {
2203
- default: I(() => [
2204
- w("div", an, [
2205
- E(t(ge), {
2206
- "no-spacing": "",
2207
- class: "sv-order-summary__subscription"
2208
- }, {
2209
- default: I(() => [
2210
- e.subscription ? (v(), O(Fi, {
2211
- key: 0,
2212
- avatar: e.avatar,
2213
- invoice: e.invoice,
2214
- subscription: e.subscription,
2215
- "enabled-pricing-ids": e.enabledPricingIds,
2216
- loading: e.isPreviewAndPaymentMethodsPending,
2217
- "trial-period": e.trialPeriod
2218
- }, null, 8, ["avatar", "invoice", "subscription", "enabled-pricing-ids", "loading", "trial-period"])) : B("", !0)
2219
- ]),
2220
- _: 1
2221
- }),
2222
- p.value.length === 2 ? (v(), O(t(ge), {
2223
- key: 0,
2224
- "no-spacing": "",
2225
- "content-classes": c.value === C.value.biggestPeriod ? "border-primary-500" : void 0
2226
- }, {
2227
- default: I(() => {
2228
- var h;
2229
- return [
2230
- w("div", rn, [
2231
- w("div", ln, [
2232
- J.value ? (v(), O(nn, {
2233
- key: 0,
2234
- name: J.value.label,
2235
- description: ((h = te.value) == null ? void 0 : h.subLabel) ?? ""
2236
- }, Je({
2237
- default: I(() => [
2238
- E(t(vi), {
2239
- "model-value": c.value === C.value.biggestPeriod,
2240
- "onUpdate:modelValue": _
2241
- }, null, 8, ["model-value"])
2242
- ]),
2243
- _: 2
2244
- }, [
2245
- u.value ? {
2246
- name: "badge",
2247
- fn: I(() => [
2248
- E(t(At), {
2249
- intent: "brand",
2250
- content: u.value,
2251
- size: d.value,
2252
- class: "whitespace-nowrap text-left leading-tight"
2253
- }, null, 8, ["content", "size"])
2254
- ]),
2255
- key: "0"
2256
- } : void 0
2257
- ]), 1032, ["name", "description"])) : B("", !0)
2258
- ])
2259
- ])
2260
- ];
2261
- }),
2262
- _: 1
2263
- }, 8, ["content-classes"])) : p.value.length > 2 ? (v(), O(t(Ui), {
2264
- key: 1,
2265
- "single-model-value": c.value,
2266
- "onUpdate:singleModelValue": m[0] || (m[0] = (h) => c.value = h),
2267
- class: "sv-order-summary__billing-period",
2268
- options: p.value,
2269
- size: "xl",
2270
- "has-large-dropdown": "",
2271
- "show-sub-label-in-input": "",
2272
- "show-suffix-in-closed-input": ""
2273
- }, null, 8, ["single-model-value", "options"])) : B("", !0),
2274
- e.isUsageBased ? (v(), O(t(ge), {
2275
- key: 2,
2276
- "no-spacing": "",
2277
- class: "sv-order-summary__usage"
2278
- }, {
2279
- default: I(() => [
2280
- w("div", sn, [
2281
- E(t(se), {
2282
- "no-spacing": "",
2283
- variant: "body-sm",
2284
- color: "subtle"
2285
- }, {
2286
- default: I(() => [
2287
- G(V(t(a)({
2288
- defaultMessage: "+ Usage",
2289
- id: "checkout.invoice_preview.usage_based_message",
2290
- description: "The message shown for the usage based invoice preview"
2291
- })), 1)
2292
- ]),
2293
- _: 1
2294
- })
2295
- ])
2296
- ]),
2297
- _: 1
2298
- })) : B("", !0),
2299
- e.invoice && e.variant !== "products-inline" ? (v(), W("div", cn, [
2300
- E(t(Oi), {
2301
- invoice: e.invoice,
2302
- "wrapper-component": t(ge)
2303
- }, null, 8, ["invoice", "wrapper-component"])
2304
- ])) : B("", !0),
2305
- E(t(ge), { class: "sv-order-summary__totals" }, {
2306
- default: I(() => [
2307
- e.invoice ? (v(), O(t(zi), {
2308
- key: 0,
2309
- class: "sv-order-summary__invoice-preview",
2310
- variant: e.variant === "products-inline" ? "default" : "without-products",
2311
- invoice: e.invoice,
2312
- "trial-invoice": e.trialInvoice,
2313
- "is-paid": e.isPaid,
2314
- collapsible: e.collapsible,
2315
- "is-preview-without-taxes": !e.countryCode,
2316
- "is-customer-facing": ""
2317
- }, null, 8, ["variant", "invoice", "trial-invoice", "is-paid", "collapsible", "is-preview-without-taxes"])) : (v(), O(t(se), {
2318
- key: 1,
2319
- variant: "body-sm",
2320
- color: "subtle",
2321
- class: "sv-order-summary__empty"
2322
- }, {
2323
- default: I(() => [
2324
- G(V(t(a)({
2325
- defaultMessage: "Please select a country first",
2326
- description: "The message shown for the invoice preview when no country is set",
2327
- id: "checkout.invoice_preview.no_country_selected_message"
2328
- })), 1)
2329
- ]),
2330
- _: 1
2331
- }))
2332
- ]),
2333
- _: 1
2334
- })
2335
- ])
2336
- ]),
2337
- _: 1
2338
- }, 8, ["title"]));
2339
- }
2340
- });
2341
- async function Ft(e, i) {
2342
- const { AdyenCheckout: o } = await Ve();
2343
- return o(
2344
- Ci({
2345
- locale: e.locale,
2346
- amount: e.amount,
2347
- countryCode: e.countryCode,
2348
- paymentMethodOptionResponse: e.paymentMethodOptionsResponse,
2349
- logger: i
2350
- })
2351
- );
2352
- }
2353
- function Gt({
2354
- props: e,
2355
- create: i,
2356
- onMissingButton: o,
2357
- onMountFailed: n,
2358
- afterMount: a
2359
- }) {
2360
- const r = F(), s = Me(), g = async () => {
2361
- const d = await Ft(e, s), N = await i(d);
2362
- if (!r.value) {
2363
- o();
2364
- return;
2365
- }
2366
- try {
2367
- await N.isAvailable(), N.mount(r.value), a == null || a();
2368
- } catch (y) {
2369
- n(y);
2370
- }
2371
- };
2372
- return ke(() => {
2373
- g();
2374
- }), { buttonRef: r };
2375
- }
2376
- const un = {
2377
- key: 0,
2378
- id: "svg-logo",
2379
- viewBox: "0 0 35 15",
2380
- class: "h-[44px]"
2381
- }, dn = {
2382
- key: 1,
2383
- src: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAxcHgiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAxMDEgMzIiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaW5ZTWluIG1lZXQiIHhtbG5zPSJodHRwOiYjeDJGOyYjeDJGO3d3dy53My5vcmcmI3gyRjsyMDAwJiN4MkY7c3ZnIj48cGF0aCBmaWxsPSIjMDAzMDg3IiBkPSJNIDEyLjIzNyAyLjggTCA0LjQzNyAyLjggQyAzLjkzNyAyLjggMy40MzcgMy4yIDMuMzM3IDMuNyBMIDAuMjM3IDIzLjcgQyAwLjEzNyAyNC4xIDAuNDM3IDI0LjQgMC44MzcgMjQuNCBMIDQuNTM3IDI0LjQgQyA1LjAzNyAyNC40IDUuNTM3IDI0IDUuNjM3IDIzLjUgTCA2LjQzNyAxOC4xIEMgNi41MzcgMTcuNiA2LjkzNyAxNy4yIDcuNTM3IDE3LjIgTCAxMC4wMzcgMTcuMiBDIDE1LjEzNyAxNy4yIDE4LjEzNyAxNC43IDE4LjkzNyA5LjggQyAxOS4yMzcgNy43IDE4LjkzNyA2IDE3LjkzNyA0LjggQyAxNi44MzcgMy41IDE0LjgzNyAyLjggMTIuMjM3IDIuOCBaIE0gMTMuMTM3IDEwLjEgQyAxMi43MzcgMTIuOSAxMC41MzcgMTIuOSA4LjUzNyAxMi45IEwgNy4zMzcgMTIuOSBMIDguMTM3IDcuNyBDIDguMTM3IDcuNCA4LjQzNyA3LjIgOC43MzcgNy4yIEwgOS4yMzcgNy4yIEMgMTAuNjM3IDcuMiAxMS45MzcgNy4yIDEyLjYzNyA4IEMgMTMuMTM3IDguNCAxMy4zMzcgOS4xIDEzLjEzNyAxMC4xIFoiPjwvcGF0aD48cGF0aCBmaWxsPSIjMDAzMDg3IiBkPSJNIDM1LjQzNyAxMCBMIDMxLjczNyAxMCBDIDMxLjQzNyAxMCAzMS4xMzcgMTAuMiAzMS4xMzcgMTAuNSBMIDMwLjkzNyAxMS41IEwgMzAuNjM3IDExLjEgQyAyOS44MzcgOS45IDI4LjAzNyA5LjUgMjYuMjM3IDkuNSBDIDIyLjEzNyA5LjUgMTguNjM3IDEyLjYgMTcuOTM3IDE3IEMgMTcuNTM3IDE5LjIgMTguMDM3IDIxLjMgMTkuMzM3IDIyLjcgQyAyMC40MzcgMjQgMjIuMTM3IDI0LjYgMjQuMDM3IDI0LjYgQyAyNy4zMzcgMjQuNiAyOS4yMzcgMjIuNSAyOS4yMzcgMjIuNSBMIDI5LjAzNyAyMy41IEMgMjguOTM3IDIzLjkgMjkuMjM3IDI0LjMgMjkuNjM3IDI0LjMgTCAzMy4wMzcgMjQuMyBDIDMzLjUzNyAyNC4zIDM0LjAzNyAyMy45IDM0LjEzNyAyMy40IEwgMzYuMTM3IDEwLjYgQyAzNi4yMzcgMTAuNCAzNS44MzcgMTAgMzUuNDM3IDEwIFogTSAzMC4zMzcgMTcuMiBDIDI5LjkzNyAxOS4zIDI4LjMzNyAyMC44IDI2LjEzNyAyMC44IEMgMjUuMDM3IDIwLjggMjQuMjM3IDIwLjUgMjMuNjM3IDE5LjggQyAyMy4wMzcgMTkuMSAyMi44MzcgMTguMiAyMy4wMzcgMTcuMiBDIDIzLjMzNyAxNS4xIDI1LjEzNyAxMy42IDI3LjIzNyAxMy42IEMgMjguMzM3IDEzLjYgMjkuMTM3IDE0IDI5LjczNyAxNC42IEMgMzAuMjM3IDE1LjMgMzAuNDM3IDE2LjIgMzAuMzM3IDE3LjIgWiI+PC9wYXRoPjxwYXRoIGZpbGw9IiMwMDMwODciIGQ9Ik0gNTUuMzM3IDEwIEwgNTEuNjM3IDEwIEMgNTEuMjM3IDEwIDUwLjkzNyAxMC4yIDUwLjczNyAxMC41IEwgNDUuNTM3IDE4LjEgTCA0My4zMzcgMTAuOCBDIDQzLjIzNyAxMC4zIDQyLjczNyAxMCA0Mi4zMzcgMTAgTCAzOC42MzcgMTAgQyAzOC4yMzcgMTAgMzcuODM3IDEwLjQgMzguMDM3IDEwLjkgTCA0Mi4xMzcgMjMgTCAzOC4yMzcgMjguNCBDIDM3LjkzNyAyOC44IDM4LjIzNyAyOS40IDM4LjczNyAyOS40IEwgNDIuNDM3IDI5LjQgQyA0Mi44MzcgMjkuNCA0My4xMzcgMjkuMiA0My4zMzcgMjguOSBMIDU1LjgzNyAxMC45IEMgNTYuMTM3IDEwLjYgNTUuODM3IDEwIDU1LjMzNyAxMCBaIj48L3BhdGg+PHBhdGggZmlsbD0iIzAwOWNkZSIgZD0iTSA2Ny43MzcgMi44IEwgNTkuOTM3IDIuOCBDIDU5LjQzNyAyLjggNTguOTM3IDMuMiA1OC44MzcgMy43IEwgNTUuNzM3IDIzLjYgQyA1NS42MzcgMjQgNTUuOTM3IDI0LjMgNTYuMzM3IDI0LjMgTCA2MC4zMzcgMjQuMyBDIDYwLjczNyAyNC4zIDYxLjAzNyAyNCA2MS4wMzcgMjMuNyBMIDYxLjkzNyAxOCBDIDYyLjAzNyAxNy41IDYyLjQzNyAxNy4xIDYzLjAzNyAxNy4xIEwgNjUuNTM3IDE3LjEgQyA3MC42MzcgMTcuMSA3My42MzcgMTQuNiA3NC40MzcgOS43IEMgNzQuNzM3IDcuNiA3NC40MzcgNS45IDczLjQzNyA0LjcgQyA3Mi4yMzcgMy41IDcwLjMzNyAyLjggNjcuNzM3IDIuOCBaIE0gNjguNjM3IDEwLjEgQyA2OC4yMzcgMTIuOSA2Ni4wMzcgMTIuOSA2NC4wMzcgMTIuOSBMIDYyLjgzNyAxMi45IEwgNjMuNjM3IDcuNyBDIDYzLjYzNyA3LjQgNjMuOTM3IDcuMiA2NC4yMzcgNy4yIEwgNjQuNzM3IDcuMiBDIDY2LjEzNyA3LjIgNjcuNDM3IDcuMiA2OC4xMzcgOCBDIDY4LjYzNyA4LjQgNjguNzM3IDkuMSA2OC42MzcgMTAuMSBaIj48L3BhdGg+PHBhdGggZmlsbD0iIzAwOWNkZSIgZD0iTSA5MC45MzcgMTAgTCA4Ny4yMzcgMTAgQyA4Ni45MzcgMTAgODYuNjM3IDEwLjIgODYuNjM3IDEwLjUgTCA4Ni40MzcgMTEuNSBMIDg2LjEzNyAxMS4xIEMgODUuMzM3IDkuOSA4My41MzcgOS41IDgxLjczNyA5LjUgQyA3Ny42MzcgOS41IDc0LjEzNyAxMi42IDczLjQzNyAxNyBDIDczLjAzNyAxOS4yIDczLjUzNyAyMS4zIDc0LjgzNyAyMi43IEMgNzUuOTM3IDI0IDc3LjYzNyAyNC42IDc5LjUzNyAyNC42IEMgODIuODM3IDI0LjYgODQuNzM3IDIyLjUgODQuNzM3IDIyLjUgTCA4NC41MzcgMjMuNSBDIDg0LjQzNyAyMy45IDg0LjczNyAyNC4zIDg1LjEzNyAyNC4zIEwgODguNTM3IDI0LjMgQyA4OS4wMzcgMjQuMyA4OS41MzcgMjMuOSA4OS42MzcgMjMuNCBMIDkxLjYzNyAxMC42IEMgOTEuNjM3IDEwLjQgOTEuMzM3IDEwIDkwLjkzNyAxMCBaIE0gODUuNzM3IDE3LjIgQyA4NS4zMzcgMTkuMyA4My43MzcgMjAuOCA4MS41MzcgMjAuOCBDIDgwLjQzNyAyMC44IDc5LjYzNyAyMC41IDc5LjAzNyAxOS44IEMgNzguNDM3IDE5LjEgNzguMjM3IDE4LjIgNzguNDM3IDE3LjIgQyA3OC43MzcgMTUuMSA4MC41MzcgMTMuNiA4Mi42MzcgMTMuNiBDIDgzLjczNyAxMy42IDg0LjUzNyAxNCA4NS4xMzcgMTQuNiBDIDg1LjczNyAxNS4zIDg1LjkzNyAxNi4yIDg1LjczNyAxNy4yIFoiPjwvcGF0aD48cGF0aCBmaWxsPSIjMDA5Y2RlIiBkPSJNIDk1LjMzNyAzLjMgTCA5Mi4xMzcgMjMuNiBDIDkyLjAzNyAyNCA5Mi4zMzcgMjQuMyA5Mi43MzcgMjQuMyBMIDk1LjkzNyAyNC4zIEMgOTYuNDM3IDI0LjMgOTYuOTM3IDIzLjkgOTcuMDM3IDIzLjQgTCAxMDAuMjM3IDMuNSBDIDEwMC4zMzcgMy4xIDEwMC4wMzcgMi44IDk5LjYzNyAyLjggTCA5Ni4wMzcgMi44IEMgOTUuNjM3IDIuOCA5NS40MzcgMyA5NS4zMzcgMy4zIFoiPjwvcGF0aD48L3N2Zz4",
2384
- role: "presentation",
2385
- class: "h-[22px]"
2386
- }, it = /* @__PURE__ */ ce({
2387
- __name: "ExpressPaymentMethodButton",
2388
- props: {
2389
- type: { type: String }
2390
- },
2391
- emits: ["click"],
2392
- setup(e, { emit: i }) {
2393
- const o = e, n = i, a = b(() => {
2394
- switch (o.type) {
2395
- case "applepay":
2396
- return "Apple Pay";
2397
- case "googlepay":
2398
- return "Google Pay";
2399
- case "paypal":
2400
- return "PayPal";
2401
- default:
2402
- return;
2403
- }
2404
- }), r = b(() => {
2405
- switch (o.type) {
2406
- case "applepay":
2407
- return "!bg-black !py-0";
2408
- case "googlepay":
2409
- return "!bg-black bg-[url(https://www.gstatic.com/instantbuy/svg/dark_gpay.svg)] bg-[length:auto_42.5%]";
2410
- case "paypal":
2411
- return "!bg-[#ffc439]";
2412
- default:
2413
- return;
2414
- }
2415
- });
2416
- function s() {
2417
- n("click");
2418
- }
2419
- return (g, d) => (v(), O(t(Ae), {
2420
- size: "lg",
2421
- "aria-label": a.value,
2422
- class: be([r.value, "!block h-11 w-full bg-center bg-no-repeat"]),
2423
- onClick: s
2424
- }, {
2425
- default: I(() => [
2426
- o.type === "applepay" ? (v(), W("svg", un, [...d[0] || (d[0] = [
2427
- w("svg", {
2428
- id: "svg-logo",
2429
- x: "0",
2430
- y: "3.85",
2431
- height: "7.3",
2432
- width: "35",
2433
- class: "logo",
2434
- viewBox: "0 0 105 43",
2435
- version: "1.1",
2436
- xmlns: "http://www.w3.org/2000/svg"
2437
- }, [
2438
- w("title", null, "Apple Logo"),
2439
- w("g", {
2440
- stroke: "none",
2441
- "stroke-width": "1",
2442
- fill: "none",
2443
- "fill-rule": "evenodd"
2444
- }, [
2445
- w("g", { fill: "#FFF" }, [
2446
- w("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" }),
2447
- w("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" }),
2448
- w("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" }),
2449
- w("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" }),
2450
- w("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" })
2451
- ])
2452
- ])
2453
- ], -1)
2454
- ])])) : o.type === "paypal" ? (v(), W("img", dn)) : B("", !0)
2455
- ]),
2456
- _: 1
2457
- }, 8, ["aria-label", "class"]));
2458
- }
2459
- }), pn = { class: "absolute h-[1px] w-[1px] overflow-hidden opacity-0" }, mn = "ADYEN", gn = /* @__PURE__ */ ce({
2460
- __name: "ExpressPaymentMethodApplePay",
2461
- props: {
2462
- onBillingInformationChange: { type: Function },
2463
- amount: { type: Object },
2464
- countryCode: { type: String },
2465
- locale: { type: String },
2466
- isVisible: { type: Boolean },
2467
- paymentMethodOptionsResponse: { type: Object },
2468
- billingInformation: { type: Object }
2469
- },
2470
- emits: ["ready", "update-billing-information"],
2471
- setup(e, { emit: i }) {
2472
- const o = e, n = i, a = F(), r = Me(), { authorizePayment: s } = Yi(), g = o.paymentMethodOptionsResponse.payment_acceptor.id, d = async () => {
2473
- const { ApplePay: f } = await Ve(), L = await Ft(o, r), P = new f(L, {
2474
- isExpress: !0,
2475
- recurringPaymentRequest: {
2476
- paymentDescription: o.billingInformation.description,
2477
- billingAgreement: o.billingInformation.agreement,
2478
- managementURL: "https://www.google.com",
2479
- // Trial
2480
- ...o.billingInformation.trial && {
2481
- trialBilling: {
2482
- label: o.billingInformation.trial.label,
2483
- amount: o.billingInformation.trial.amount.quantity.toString(),
2484
- type: "final",
2485
- paymentTiming: "recurring",
2486
- recurringPaymentStartDate: o.billingInformation.trial.startDate,
2487
- recurringPaymentEndDate: o.billingInformation.trial.endDate
2488
- }
2489
- },
2490
- // Regular
2491
- ...o.billingInformation.regular && {
2492
- regularBilling: {
2493
- label: o.billingInformation.regular.label,
2494
- amount: o.billingInformation.regular.amount.quantity.toString(),
2495
- type: "final",
2496
- paymentTiming: "recurring",
2497
- recurringPaymentStartDate: o.billingInformation.regular.startDate,
2498
- ...N(
2499
- o.billingInformation.regular.interval ?? { type: "MONTH", value: 1 }
2500
- )
2501
- }
2502
- }
2503
- },
2504
- requiredBillingContactFields: ["postalAddress"],
2505
- requiredShippingContactFields: ["email"],
2506
- onPaymentMethodSelected: async (T, $, j) => {
2507
- var te, u, _, l, m, h, S;
2508
- const { invoicePreview: p, trialInvoicePreview: C } = await o.onBillingInformationChange({
2509
- ...((te = j.paymentMethod.billingContact) == null ? void 0 : te.postalCode) && {
2510
- postal_code: j.paymentMethod.billingContact.postalCode
2511
- },
2512
- ...((u = j.paymentMethod.billingContact) == null ? void 0 : u.locality) && {
2513
- city: j.paymentMethod.billingContact.locality
2514
- },
2515
- ...A((_ = j.paymentMethod.billingContact) == null ? void 0 : _.countryCode) && {
2516
- country: A((l = j.paymentMethod.billingContact) == null ? void 0 : l.countryCode)
2517
- }
2518
- }), J = C ? C.invoice_amount_including_tax.quantity.toString() : p.invoice_amount_including_tax.quantity.toString();
2519
- n("update-billing-information", {
2520
- postal_code: (m = j.paymentMethod.billingContact) == null ? void 0 : m.postalCode,
2521
- city: (h = j.paymentMethod.billingContact) == null ? void 0 : h.locality,
2522
- country: (S = j.paymentMethod.billingContact) == null ? void 0 : S.countryCode
2523
- }), T({
2524
- newTotal: {
2525
- label: o.billingInformation.regular.label,
2526
- amount: J,
2527
- type: "final"
2528
- }
2529
- });
2530
- },
2531
- onError: (T) => {
2532
- r.error("APPLE_PAY_ERROR", "Apple Pay error", { error: T });
2533
- },
2534
- onAuthorized: async (T, $) => {
2535
- try {
2536
- r.info("APPLE_PAY_AUTHORIZED", "Apple Pay authorized", { data: T });
2537
- const j = T.authorizedEvent;
2538
- r.info("APPLE_PAY_EVENT_DATA", "Apple Pay event data structure", {
2539
- eventData: j,
2540
- hasPaymentMethod: !!j.payment.token.paymentMethod,
2541
- hasBrowserInfo: !!j.payment.token.paymentData,
2542
- billingAddress: T.billingAddress
2543
- });
2544
- const p = j.payment.billingContact, C = T.billingAddress;
2545
- p ? n(
2546
- "update-billing-information",
2547
- y(p)
2548
- ) : C && n(
2549
- "update-billing-information",
2550
- M(C)
2551
- );
2552
- const J = {
2553
- payment_method: bt(
2554
- j.payment.token.paymentMethod
2555
- ),
2556
- browser_info: bt(
2557
- j.payment.token.paymentData
2558
- )
2559
- };
2560
- r.info("APPLE_PAY_ADYEN_PAYLOAD", "Adyen payload prepared", { adyen: J });
2561
- const te = xi({
2562
- paymentAcceptorId: g,
2563
- redirectUrl: window.location.href
2564
- });
2565
- r.info("APPLE_PAY_CALLING_API", "Calling authorizePayment API", {
2566
- paymentAcceptorId: g,
2567
- amount: o.amount
2568
- });
2569
- const u = await s({
2570
- payment_acceptor_id: g,
2571
- payment_gateway_variant: mn,
2572
- adyen: {
2573
- ...J,
2574
- store_payment_method: !0
2575
- // Required for recurring payments
2576
- },
2577
- amount: o.amount,
2578
- return_url: te
2579
- });
2580
- if (r.info("APPLE_PAY_API_RESPONSE", "Payment API response received", {
2581
- status: u.status,
2582
- paymentResult: u
2583
- }), u.status === "FAILURE") {
2584
- r.error("APPLE_PAY_AUTHORIZATION_FAILED", "Payment authorization failed", {
2585
- error: u
2586
- }), $.reject();
2587
- return;
2588
- }
2589
- if (u.status === "ACTION_REQUIRED") {
2590
- r.warn("APPLE_PAY_ACTION_REQUIRED", "Payment requires additional action", {
2591
- action: u.action
2592
- }), $.reject();
2593
- return;
2594
- }
2595
- r.info("APPLE_PAY_SUCCESS", "Apple Pay payment successful, resolving"), $.resolve();
2596
- } catch (j) {
2597
- r.error("APPLE_PAY_AUTHORIZATION_FAILED", "Apple Pay authorization failed", {
2598
- error: j
2599
- }), $.reject();
2600
- }
2601
- }
2602
- });
2603
- if (!a.value) {
2604
- r.error("APPLE_PAY_ERROR", "Apple Pay button ref not found");
2605
- return;
2606
- }
2607
- try {
2608
- await P.isAvailable(), P.mount(a.value), n("ready");
2609
- } catch (T) {
2610
- r.error("APPLE_PAY_ERROR", "Apple Pay not available on this device", {}, T);
2611
- }
2612
- }, N = (f) => {
2613
- if (!f.value)
2614
- return;
2615
- let L = f.value ?? 1, P = f.type.toLowerCase();
2616
- if (f.type === "WEEK" && (P = "day", L = f.value * 7), P === "day" || P === "month" || P === "year" || P === "hour" || P === "minute")
2617
- return {
2618
- recurringPaymentIntervalUnit: P,
2619
- recurringPaymentIntervalCount: L
2620
- };
2621
- }, y = (f) => ({
2622
- postal_code: f.postalCode,
2623
- city: f.locality,
2624
- country: f.countryCode
2625
- }), M = (f) => ({
2626
- postal_code: f.postalCode,
2627
- city: f.city,
2628
- country: f.country
2629
- }), A = (f) => f && c(f) ? f : void 0, c = (f) => Ge(f), x = () => {
2630
- var L;
2631
- const f = (L = a.value) == null ? void 0 : L.querySelector("apple-pay-button");
2632
- if (f) {
2633
- const P = new MouseEvent("click", {
2634
- bubbles: !0,
2635
- cancelable: !0,
2636
- view: window
2637
- });
2638
- f.dispatchEvent(P);
2639
- }
2640
- };
2641
- return ke(() => {
2642
- d();
2643
- }), (f, L) => (v(), W(_e, null, [
2644
- e.isVisible ? (v(), O(it, {
2645
- key: 0,
2646
- type: "applepay",
2647
- onClick: x
2648
- })) : B("", !0),
2649
- w("div", pn, [
2650
- w("div", {
2651
- ref_key: "applePayButtonRef",
2652
- ref: a
2653
- }, null, 512)
2654
- ])
2655
- ], 64));
2656
- }
2657
- }), yn = { class: "relative overflow-hidden" }, vn = /* @__PURE__ */ ce({
2658
- __name: "ExpressPaymentMethodPaypal",
2659
- props: {
2660
- amount: { type: Object },
2661
- countryCode: { type: String },
2662
- locale: { type: String },
2663
- isVisible: { type: Boolean },
2664
- paymentMethodOptionsResponse: { type: Object },
2665
- billingInformation: { type: Object }
2666
- },
2667
- emits: ["ready", "update-billing-information"],
2668
- setup(e, { emit: i }) {
2669
- const o = e, n = i, a = Me(), { buttonRef: r } = Gt({
2670
- props: o,
2671
- onMissingButton: () => a.error(
2672
- "EXPRESS_CHECKOUT_PAYPAL_ERROR",
2673
- "The PayPal button reference is not found and cannot be mounted"
2674
- ),
2675
- onMountFailed: (s) => a.error("EXPRESS_CHECKOUT_PAYPAL_ERROR", "Failed mounting PayPal express button", {
2676
- error: s
2677
- }),
2678
- create: async (s) => {
2679
- const { PayPal: g } = await Ve();
2680
- return new g(s, {
2681
- isExpress: !0,
2682
- blockPayPalPayLaterButton: !0,
2683
- blockPayPalCreditButton: !0,
2684
- blockPayPalVenmoButton: !0,
2685
- style: {
2686
- height: 55
2687
- },
2688
- onInit: () => {
2689
- n("ready");
2690
- }
2691
- });
2692
- }
2693
- });
2694
- return (s, g) => (v(), W("div", yn, [
2695
- e.isVisible ? (v(), O(it, {
2696
- key: 0,
2697
- type: "paypal",
2698
- class: "w-full"
2699
- })) : B("", !0),
2700
- w("div", {
2701
- ref_key: "paypalButtonRef",
2702
- ref: r,
2703
- class: "absolute inset-0 opacity-[0.0001]"
2704
- }, null, 512)
2705
- ]));
2706
- }
2707
- }), fn = { class: "absolute h-[1px] w-[1px] overflow-hidden opacity-0" }, _n = /* @__PURE__ */ ce({
2708
- __name: "ExpressPaymentMethodGooglePay",
2709
- props: {
2710
- amount: { type: Object },
2711
- countryCode: { type: String },
2712
- locale: { type: String },
2713
- isVisible: { type: Boolean },
2714
- paymentMethodOptionsResponse: { type: Object },
2715
- billingInformation: { type: Object }
2716
- },
2717
- emits: ["ready", "update-billing-information"],
2718
- setup(e, { emit: i }) {
2719
- const o = e, n = i, a = Me(), { buttonRef: r } = Gt({
2720
- props: o,
2721
- onMissingButton: () => a.error(
2722
- "EXPRESS_CHECKOUT_GOOGLE_PAY_ERROR",
2723
- "The Google Pay button reference is not found and cannot be mounted"
2724
- ),
2725
- onMountFailed: (g) => a.error(
2726
- "EXPRESS_CHECKOUT_GOOGLE_PAY_ERROR",
2727
- "Failed mounting Google Pay express button",
2728
- { error: g }
2729
- ),
2730
- create: async (g) => {
2731
- const { GooglePay: d } = await Ve();
2732
- return new d(g, { isExpress: !0 });
2733
- },
2734
- afterMount: () => n("ready")
2735
- }), s = () => {
2736
- var d;
2737
- const g = (d = r.value) == null ? void 0 : d.querySelector("#gpay-button-online-api-id");
2738
- if (g) {
2739
- const N = new MouseEvent("click", {
2740
- bubbles: !0,
2741
- cancelable: !0,
2742
- view: window
2743
- });
2744
- g.dispatchEvent(N);
2745
- }
2746
- };
2747
- return (g, d) => (v(), W(_e, null, [
2748
- e.isVisible ? (v(), O(it, {
2749
- key: 0,
2750
- type: "googlepay",
2751
- onClick: s
2752
- })) : B("", !0),
2753
- w("div", fn, [
2754
- w("div", {
2755
- ref_key: "googlePayButtonRef",
2756
- ref: r
2757
- }, null, 512)
2758
- ])
2759
- ], 64));
2760
- }
2761
- }), Mn = {
2762
- key: 0,
2763
- class: "mt-4n"
2764
- }, hn = { class: "mb-2" }, bn = { class: "grid grid-cols-6 gap-1 md:gap-2" }, In = { class: "mt-4 h-4" }, An = 2, Pn = /* @__PURE__ */ ce({
2765
- __name: "ExpressPaymentMethods",
2766
- props: {
2767
- amount: { type: Object },
2768
- countryCode: { type: String },
2769
- locale: { type: String },
2770
- paymentMethodsOptionsResponse: { type: null },
2771
- billingInformation: { type: Object },
2772
- onBillingInformationChange: { type: Function }
2773
- },
2774
- emits: ["update-billing-information"],
2775
- setup(e) {
2776
- const i = ["applepay"], o = e, { $t: n } = ve(), a = F(!1), r = F(!1), s = F(!1), g = b(() => {
2777
- var c;
2778
- if (i.includes("applepay"))
2779
- return (c = o.paymentMethodsOptionsResponse) == null ? void 0 : c.find(
2780
- (x) => {
2781
- var f;
2782
- return (f = x.options) == null ? void 0 : f.some(
2783
- (L) => L.name.toLowerCase() === "apple pay" && L.payment_gateway_variant === "ADYEN"
2784
- );
2785
- }
2786
- );
2787
- }), d = b(() => {
2788
- var c;
2789
- if (i.includes("paypal"))
2790
- return (c = o.paymentMethodsOptionsResponse) == null ? void 0 : c.find(
2791
- (x) => {
2792
- var f;
2793
- return (f = x.options) == null ? void 0 : f.some(
2794
- (L) => L.name.toLowerCase() === "paypal" && L.payment_gateway_variant === "ADYEN"
2795
- );
2796
- }
2797
- );
2798
- }), N = b(() => {
2799
- var c;
2800
- if (i.includes("googlepay"))
2801
- return (c = o.paymentMethodsOptionsResponse) == null ? void 0 : c.find(
2802
- (x) => {
2803
- var f;
2804
- return (f = x.options) == null ? void 0 : f.some(
2805
- (L) => L.name.toLowerCase() === "google pay" && L.payment_gateway_variant === "ADYEN"
2806
- );
2807
- }
2808
- );
2809
- }), y = b(() => !!(g.value || N.value || d.value)), M = b(() => {
2810
- var L;
2811
- if (((L = o.paymentMethodsOptionsResponse) == null ? void 0 : L.length) === 0)
2812
- return !1;
2813
- const c = !g.value || a.value, x = !N.value || r.value, f = !d.value || s.value;
2814
- return c && x && f;
2815
- }), A = b(() => M.value ? (g.value ? 1 : 0) + (N.value ? 1 : 0) + (d.value ? 1 : 0) : An);
2816
- return (c, x) => y.value ? (v(), W("div", Mn, [
2817
- w("div", hn, [
2818
- M.value ? (v(), O(t(se), {
2819
- key: 1,
2820
- variant: "heading-3",
2821
- tag: "h2"
2822
- }, {
2823
- default: I(() => [
2824
- G(V(t(n)({
2825
- defaultMessage: "Subscribe instantly with",
2826
- id: "checkout.express_payment_methods.title",
2827
- description: "The title of the express payment methods block in the checkout form"
2828
- })), 1)
2829
- ]),
2830
- _: 1
2831
- })) : (v(), O(fe, {
2832
- key: 0,
2833
- variant: "title"
2834
- }))
2835
- ]),
2836
- w("div", bn, [
2837
- M.value ? B("", !0) : (v(), W(_e, { key: 0 }, [
2838
- E(fe, { class: "col-span-3 h-11" }),
2839
- E(fe, { class: "col-span-3 h-11" })
2840
- ], 64)),
2841
- w("div", {
2842
- class: be(["col-span-3 md:col-span-2", {
2843
- hidden: !g.value,
2844
- "!col-span-6": A.value === 1,
2845
- "md:!col-span-3": A.value === 2,
2846
- "!col-span-6 md:!col-span-2": A.value === 3
2847
- }])
2848
- }, [
2849
- g.value ? (v(), O(gn, {
2850
- key: 0,
2851
- amount: e.amount,
2852
- "billing-information": e.billingInformation,
2853
- "country-code": e.countryCode,
2854
- locale: e.locale,
2855
- "is-visible": M.value,
2856
- "payment-method-options-response": g.value,
2857
- "on-billing-information-change": e.onBillingInformationChange,
2858
- onReady: x[0] || (x[0] = (f) => a.value = !0),
2859
- onUpdateBillingInformation: x[1] || (x[1] = (f) => c.$emit("update-billing-information", f))
2860
- }, null, 8, ["amount", "billing-information", "country-code", "locale", "is-visible", "payment-method-options-response", "on-billing-information-change"])) : B("", !0)
2861
- ], 2),
2862
- w("div", {
2863
- class: be(["col-span-3 md:col-span-2", {
2864
- hidden: !N.value,
2865
- "col-span-6 md:col-span-6": A.value === 1,
2866
- "md:!col-span-3": A.value === 2
2867
- }])
2868
- }, [
2869
- N.value ? (v(), O(_n, {
2870
- key: 0,
2871
- amount: e.amount,
2872
- "billing-information": e.billingInformation,
2873
- "country-code": e.countryCode,
2874
- locale: e.locale,
2875
- "is-visible": M.value,
2876
- "payment-method-options-response": N.value,
2877
- onReady: x[2] || (x[2] = (f) => r.value = !0)
2878
- }, null, 8, ["amount", "billing-information", "country-code", "locale", "is-visible", "payment-method-options-response"])) : B("", !0)
2879
- ], 2),
2880
- w("div", {
2881
- class: be(["col-span-3 md:col-span-2", {
2882
- hidden: !d.value,
2883
- "col-span-6 md:col-span-6": A.value === 1,
2884
- "md:!col-span-3": A.value === 2
2885
- }])
2886
- }, [
2887
- d.value ? (v(), O(vn, {
2888
- key: 0,
2889
- amount: e.amount,
2890
- "billing-information": e.billingInformation,
2891
- "country-code": e.countryCode,
2892
- locale: e.locale,
2893
- "is-visible": M.value,
2894
- "payment-method-options-response": d.value,
2895
- onReady: x[3] || (x[3] = (f) => s.value = !0)
2896
- }, null, 8, ["amount", "billing-information", "country-code", "locale", "is-visible", "payment-method-options-response"])) : B("", !0)
2897
- ], 2)
2898
- ]),
2899
- w("div", In, [
2900
- M.value ? (v(), O(t(Gi), {
2901
- key: 1,
2902
- text: t(n)({
2903
- defaultMessage: "Or",
2904
- id: "checkout.express_payment_methods.divider_text",
2905
- description: "The text of the divider text in the express payment methods block in the checkout form"
2906
- }),
2907
- "text-position": "center"
2908
- }, null, 8, ["text"])) : (v(), O(fe, {
2909
- key: 0,
2910
- variant: "divider-text"
2911
- }))
2912
- ])
2913
- ])) : B("", !0);
2914
- }
2915
- }), Dn = ["aria-expanded", "aria-label"], Nn = { class: "flex w-full cursor-pointer flex-row items-center justify-between gap-3 px-3 py-2" }, En = { class: "flex flex-row items-center gap-2" }, Cn = ["onKeydown"], xn = ["aria-label"], Ln = { class: "flex w-full cursor-pointer flex-row items-center justify-between gap-3 px-3 py-2" }, wn = { class: "flex flex-row items-center gap-2" }, Tn = {
2916
- class: "sr-only",
2917
- "aria-live": "polite"
2918
- }, Sn = /* @__PURE__ */ ce({
2919
- inheritAttrs: !1,
2920
- __name: "PromotionCodeSection",
2921
- props: {
2922
- promotionCode: { default: null, type: [String, null] }
2923
- },
2924
- emits: ["update:appliedCode", "apply", "remove"],
2925
- setup(e, { emit: i }) {
2926
- const { $t: o } = ve(), n = e, a = i, r = F(!1), s = F(""), g = F(""), d = F(null), N = F(null), y = Qi("promotion-code-"), M = `${y}-label`, A = `${y}-panel`, c = b(() => n.promotionCode !== null && n.promotionCode !== ""), x = b(() => s.value.trim().length > 0), f = b(
2927
- () => n.promotionCode ?? o({
2928
- defaultMessage: "Promotion applied",
2929
- id: "checkout.promotion_code.applied_label",
2930
- description: "Fallback label for an applied promotion code in checkout"
2931
- })
2932
- ), L = b(
2933
- () => r.value ? o({
2934
- defaultMessage: "Collapse promotion code input",
2935
- id: "checkout.promotion_code.collapse_aria_label",
2936
- description: "Aria label for the promotion code toggle button in checkout, while the input is open"
2937
- }) : o({
2938
- defaultMessage: "Expand promotion code input",
2939
- id: "checkout.promotion_code.expand_aria_label",
2940
- description: "Aria label for the promotion code toggle button in checkout, while the input is closed"
2941
- })
2942
- ), P = b(
2943
- () => o({
2944
- defaultMessage: "Apply promotion code",
2945
- id: "checkout.promotion_code.apply_aria_label",
2946
- description: "Aria label for the promotion code apply button in checkout"
2947
- })
2948
- ), T = b(
2949
- () => o({
2950
- defaultMessage: "Remove promotion code",
2951
- id: "checkout.promotion_code.remove_aria_label",
2952
- description: "Aria label for the promotion code remove button in checkout"
2953
- })
2954
- ), $ = () => {
2955
- s.value = "";
2956
- }, j = () => {
2957
- var _;
2958
- const u = (_ = N.value) == null ? void 0 : _.querySelector("input");
2959
- u instanceof HTMLInputElement && u.focus();
2960
- }, p = () => {
2961
- r.value && (r.value = !1);
2962
- }, C = () => {
2963
- c.value || (r.value = !r.value);
2964
- }, J = () => {
2965
- if (!x.value)
2966
- return;
2967
- const u = s.value.trim();
2968
- a("update:appliedCode", u), a("apply", u), g.value = o({
2969
- defaultMessage: "Promotion code applied",
2970
- id: "checkout.promotion_code.applied_status",
2971
- description: "Aria live message when a promotion code is applied in checkout"
2972
- }), r.value = !1;
2973
- }, te = () => {
2974
- a("update:appliedCode", null), a("remove"), g.value = o({
2975
- defaultMessage: "Promotion code removed",
2976
- id: "checkout.promotion_code.removed_status",
2977
- description: "Aria live message when a promotion code is removed in checkout"
2978
- }), $(), He(() => {
2979
- var u;
2980
- (u = d.value) == null || u.focus();
2981
- });
2982
- };
2983
- return Te(r, (u) => {
2984
- if (!u) {
2985
- $(), He(() => {
2986
- var _;
2987
- (_ = d.value) == null || _.focus();
2988
- });
2989
- return;
2990
- }
2991
- He(() => {
2992
- j();
2993
- });
2994
- }), Te(
2995
- () => n.promotionCode,
2996
- (u) => {
2997
- u || $();
2998
- }
2999
- ), (u, _) => (v(), W(_e, null, [
3000
- c.value ? (v(), O(t(ge), ft({ key: 1 }, u.$attrs, {
3001
- "no-border": "",
3002
- "no-spacing": "",
3003
- "content-background": "none",
3004
- class: "relative w-full"
3005
- }), {
3006
- default: I(() => [
3007
- w("button", {
3008
- type: "button",
3009
- class: "w-full rounded border border-primary-900 bg-white",
3010
- "aria-label": T.value,
3011
- onClick: te
3012
- }, [
3013
- w("div", Ln, [
3014
- w("div", wn, [
3015
- E(t(je), { icon: "local_activity" }),
3016
- E(t(se), {
3017
- variant: "body-sm",
3018
- class: "font-semibold"
3019
- }, {
3020
- default: I(() => [
3021
- G(V(f.value), 1)
3022
- ]),
3023
- _: 1
3024
- })
3025
- ]),
3026
- E(t(je), { icon: "close" })
3027
- ])
3028
- ], 8, xn)
3029
- ]),
3030
- _: 1
3031
- }, 16)) : (v(), O(t(ge), ft({ key: 0 }, u.$attrs, {
3032
- "no-spacing": "",
3033
- class: "relative w-full"
3034
- }), {
3035
- default: I(() => [
3036
- w("button", {
3037
- ref_key: "toggleRef",
3038
- ref: d,
3039
- type: "button",
3040
- class: "w-full",
3041
- "aria-expanded": r.value,
3042
- "aria-controls": A,
3043
- "aria-label": L.value,
3044
- onClick: C
3045
- }, [
3046
- w("div", Nn, [
3047
- w("div", En, [
3048
- E(t(je), { icon: "local_activity" }),
3049
- E(t(se), {
3050
- id: M,
3051
- variant: "body-sm"
3052
- }, {
3053
- default: I(() => [
3054
- G(V(t(o)({
3055
- defaultMessage: "Add promotion code",
3056
- id: "checkout.promotion_code.add_label",
3057
- description: "Label for adding a promotion code in checkout"
3058
- })), 1)
3059
- ]),
3060
- _: 1
3061
- })
3062
- ]),
3063
- E(t(je), {
3064
- icon: r.value ? "remove" : "add"
3065
- }, null, 8, ["icon"])
3066
- ])
3067
- ], 8, Dn),
3068
- ti(w("div", {
3069
- id: A,
3070
- ref_key: "panelRef",
3071
- ref: N,
3072
- role: "region",
3073
- "aria-labelledby": M,
3074
- class: "flex w-full flex-row items-center gap-2 overflow-hidden border-t px-3 py-2",
3075
- onKeydown: _t($e(p, ["prevent"]), ["esc"])
3076
- }, [
3077
- E(t(ye), {
3078
- modelValue: s.value,
3079
- "onUpdate:modelValue": _[0] || (_[0] = (l) => s.value = l),
3080
- placeholder: t(o)({
3081
- defaultMessage: "Promotion code",
3082
- id: "checkout.promotion_code.placeholder",
3083
- description: "Placeholder for promotion code input in checkout"
3084
- }),
3085
- "aria-label": t(o)({
3086
- defaultMessage: "Promotion code",
3087
- id: "checkout.promotion_code.input_aria_label",
3088
- description: "Aria label for promotion code input in checkout"
3089
- }),
3090
- class: "w-full",
3091
- onKeydown: _t($e(J, ["prevent"]), ["enter"])
3092
- }, null, 8, ["modelValue", "placeholder", "aria-label", "onKeydown"]),
3093
- E(t(Ae), {
3094
- type: "button",
3095
- disabled: !x.value,
3096
- "aria-label": P.value,
3097
- "aria-disabled": !x.value,
3098
- onClick: J
3099
- }, {
3100
- default: I(() => [
3101
- G(V(t(o)({
3102
- defaultMessage: "Apply",
3103
- id: "checkout.promotion_code.apply_button",
3104
- description: "Button label for applying a promotion code in checkout"
3105
- })), 1)
3106
- ]),
3107
- _: 1
3108
- }, 8, ["disabled", "aria-label", "aria-disabled"])
3109
- ], 40, Cn), [
3110
- [ii, r.value]
3111
- ])
3112
- ]),
3113
- _: 1
3114
- }, 16)),
3115
- w("span", Tn, V(g.value), 1)
3116
- ], 64));
3117
- }
3118
- }), kn = { class: "sv-checkout__header" }, On = { class: "sv-checkout__payment-methods" }, zn = {
3119
- key: 0,
3120
- class: "sv-checkout__payment-methods-body"
3121
- }, jn = {
3122
- key: 3,
3123
- class: "sv-checkout__payment-form"
3124
- }, Rn = { class: "sv-checkout__order-summary" }, Bn = { class: "flex flex-col gap-2" }, $n = /* @__PURE__ */ ce({
3125
- __name: "Checkout",
3126
- props: {
3127
- configuration: { type: Object }
3128
- },
3129
- emits: ["error", "ready"],
3130
- setup(e, { emit: i }) {
3131
- var lt, st, ct, ut, dt, pt, mt, gt, yt;
3132
- const o = Mt(
3133
- () => import("./PaymentIntegrationForm-CH5B6BY5.mjs")
3134
- ), n = Mt(
3135
- () => import("./PlanCustomizationEditor-0zCXN-cv.mjs")
3136
- ), a = e, r = i, s = b(() => a.configuration), g = F(), d = F(), N = Me(), { $t: y, locale: M } = ve(), { formatTimePeriod: A } = Lt(), c = Li(), { isMobileViewport: x } = St();
3137
- if (N.info("COMPONENT_INITIALIZED", "Checkout component initialized"), ((lt = c.value) == null ? void 0 : lt.type) !== "INIT_PRICING_PLAN_SUBSCRIPTION")
3138
- throw N.error("INVALID_TOKEN", "Invalid token"), Error("Invalid token");
3139
- c.value.status === "REVOKED" && (g.value = {
3140
- code: "RESOURCE_REVOKED",
3141
- message: `Portal url with resource id "${c.value.id}" is revoked`
3142
- }, N.error("RESOURCE_REVOKED", `Portal url with resource id "${c.value.id}" is revoked`));
3143
- const f = (ct = (st = c.value) == null ? void 0 : st.init_pricing_plan_subscription) == null ? void 0 : ct.pricing_plan_subscription_id, L = (dt = (ut = c.value) == null ? void 0 : ut.init_pricing_plan_subscription) == null ? void 0 : dt.success_url, {
3144
- validatedEmail: P,
3145
- validatedCountry: T,
3146
- paymentMethodOptions: $,
3147
- hasPaymentMethodOptionsError: j,
3148
- retryPaymentMethodOptions: p,
3149
- subscription: C,
3150
- isPaymentMethodsPending: J,
3151
- isInvoicePreviewPending: te,
3152
- checkoutForm: u,
3153
- invoicePreview: _,
3154
- invoicePreviewByBillingPeriod: l,
3155
- trialInvoicePreview: m,
3156
- trialPeriod: h,
3157
- authorizationContext: S,
3158
- isPaid: R,
3159
- amount: H,
3160
- loadInvoicePreview: K,
3161
- updateInvoicePreviewOnBillingInformationChange: Y,
3162
- saveFormStateForRedirect: ae
3163
- } = Co({
3164
- initialCountry: (pt = a.configuration) == null ? void 0 : pt.countryCode,
3165
- initialEmail: (mt = a.configuration) == null ? void 0 : mt.email,
3166
- subscriptionId: f,
3167
- enabledPricingIds: (gt = a.configuration) == null ? void 0 : gt.enabledPricingIds
3168
- }), Z = F(!1), re = async () => {
3169
- var D;
3170
- await u.validation.value.$validate(), !u.validation.value.$invalid && (Z.value = !0, ae(), (D = d.value) == null || D.submit());
3171
- }, ne = () => {
3172
- Z.value = !1;
3173
- }, U = async () => (await u.validation.value.$validate(), !u.validation.value.$invalid), ie = b(() => !!m.value), q = b(
3174
- () => _.value ? Ho(_.value) : !1
3175
- ), ee = b(
3176
- () => u.form.value.country && ["US", "CA"].includes(u.form.value.country) || !1
3177
- ), oe = b({
3178
- get: () => u.form.value.enabledPricingIds ?? [],
3179
- set: (D) => {
3180
- u.form.value.enabledPricingIds = D;
3181
- }
3182
- }), ue = b(
3183
- () => C.value ? Ne({
3184
- pricingPlanScheduleInfos: C.value.pricing_plan_schedule_infos,
3185
- type: "DEFAULT"
3186
- }) : void 0
3187
- ), de = b(() => {
3188
- var k, z;
3189
- if (!C.value)
3190
- return;
3191
- const D = (z = (k = ue.value) == null ? void 0 : k.pricing_plan_version) == null ? void 0 : z.pricing_currency_settings;
3192
- return $t({
3193
- country: u.form.value.country,
3194
- pricingCurrencySettings: D,
3195
- fallbackCurrency: C.value.billing_currency
3196
- });
3197
- }), pe = b(() => {
3198
- if (!ue.value || !C.value)
3199
- return /* @__PURE__ */ new Set();
3200
- const D = mi({
3201
- pricingPlanScheduleInfo: ue.value
3202
- }), k = de.value, z = C.value.billing_period, X = /* @__PURE__ */ new Set();
3203
- return D.forEach((Q, me) => {
3204
- k && Q.currency !== k || z && Q.billingPeriod && (Q.billingPeriod.type !== z.type || Q.billingPeriod.value !== z.value) || X.add(me);
3205
- }), X;
3206
- }), Ee = b({
3207
- get: () => {
3208
- const D = u.form.value.seatsValues ?? [], k = pe.value;
3209
- return k.size ? D.filter(({ pricing_item_config_id: z }) => k.has(z)) : D;
3210
- },
3211
- set: (D) => {
3212
- const k = u.form.value.seatsValues ?? [], z = pe.value;
3213
- if (!z.size) {
3214
- u.form.value.seatsValues = D;
3215
- return;
3216
- }
3217
- const X = k.filter(
3218
- ({ pricing_item_config_id: Q }) => !z.has(Q)
3219
- );
3220
- u.form.value.seatsValues = X.concat(D);
3221
- }
3222
- }), Ce = b({
3223
- get: () => {
3224
- const D = u.form.value.unitsValues ?? [], k = pe.value;
3225
- return k.size ? D.filter(({ pricing_item_config_id: z }) => k.has(z)) : D;
3226
- },
3227
- set: (D) => {
3228
- const k = u.form.value.unitsValues ?? [], z = pe.value;
3229
- if (!z.size) {
3230
- u.form.value.unitsValues = D;
3231
- return;
3232
- }
3233
- const X = k.filter(
3234
- ({ pricing_item_config_id: Q }) => !z.has(Q)
3235
- );
3236
- u.form.value.unitsValues = X.concat(D);
3237
- }
3238
- }), Oe = b(() => {
3239
- var D, k, z, X, Q;
3240
- return m.value ? y(
3241
- {
3242
- defaultMessage: "{discounted_amount} for {trial_period}, then {subscription_amount}/{billing_period} until canceled, starting {start_date, date, ::MMMMd}.",
3243
- id: "checkout.agreement.trial",
3244
- description: "The agreement for the trial period"
3245
- },
3246
- {
3247
- discounted_amount: m.value.tax_summary.total_amount.quantity === "0.00" ? y({
3248
- defaultMessage: "Free",
3249
- id: "checkout.agreement.trial.free",
3250
- description: "The free amount for the trial period"
3251
- }) : Ie(m.value.tax_summary.total_amount),
3252
- trial_period: A(h.value, { short: !0 }),
3253
- subscription_amount: Ie(
3254
- ((D = _.value) == null ? void 0 : D.tax_summary.total_amount) ?? {
3255
- quantity: "0.00",
3256
- currency: "EUR"
3257
- }
3258
- ),
3259
- billing_period: A(
3260
- ((k = _.value) == null ? void 0 : k.billing_period) ?? { type: "MONTH", value: 1 },
3261
- { short: !0, singular: !0, hideValueForExactPeriods: !0 }
3262
- ),
3263
- // @ts-expect-error formatjs does not support this type yet
3264
- start_date: new Date(Pe.value)
3265
- }
3266
- ) : y(
3267
- {
3268
- defaultMessage: "{subscription_amount}/{billing_period} until canceled, starting {start_date, date, long}.",
3269
- id: "checkout.agreement.subscription",
3270
- description: "The agreement for the subscription"
3271
- },
3272
- {
3273
- subscription_amount: (z = _.value) != null && z.tax_summary.total_amount ? Ie((X = _.value) == null ? void 0 : X.tax_summary.total_amount) : "",
3274
- billing_period: A(
3275
- ((Q = _.value) == null ? void 0 : Q.billing_period) ?? { type: "MONTH", value: 1 },
3276
- { short: !0, singular: !0, hideValueForExactPeriods: !0 }
3277
- ),
3278
- // @ts-expect-error formatjs does not support this type yet
3279
- start_date: new Date(Pe.value)
3280
- }
3281
- );
3282
- }), xe = b(() => {
3283
- var k;
3284
- if (!_.value)
3285
- return;
3286
- const D = Ai({
3287
- subscription: C.value,
3288
- fallback: y({
3289
- defaultMessage: "Subscription",
3290
- description: "The fallback name for when no subscription name can be determined",
3291
- id: "customer_overview.subscriptions_block.fallback_subscription_name"
3292
- })
3293
- });
3294
- return {
3295
- description: D,
3296
- managementURL: "https://www.solvimon.com/account/billing",
3297
- agreement: Oe.value,
3298
- ...m.value && h.value && {
3299
- trial: {
3300
- label: y({
3301
- defaultMessage: "Trial",
3302
- id: "checkout.trial.label",
3303
- description: "The label of the trial"
3304
- }),
3305
- amount: m.value.tax_summary.total_amount,
3306
- startDate: Ye.value ? new Date(Ye.value) : void 0,
3307
- endDate: ot.value ? new Date(ot.value) : void 0
3308
- }
3309
- },
3310
- regular: {
3311
- label: D,
3312
- amount: _.value.tax_summary.total_amount,
3313
- startDate: Pe.value ? new Date(Pe.value) : void 0,
3314
- interval: ((k = C.value) == null ? void 0 : k.billing_period) ?? { type: "MONTH", value: 1 }
3315
- }
3316
- };
3317
- }), le = (D) => Ge(D), Yt = (D) => {
3318
- const { country: k, ...z } = D;
3319
- u.updateInitialState({
3320
- ...z,
3321
- ...k && le(k) ? { country: k } : {}
3322
- });
3323
- }, Kt = b(() => !(P && T)), Ye = b(() => {
3324
- var z, X, Q;
3325
- const D = (X = (z = m.value) == null ? void 0 : z.periods) == null ? void 0 : X[0], k = (Q = Ke.value) == null ? void 0 : Q.trialStartDate;
3326
- return D != null && D.start_at ? new Date(D.start_at) : k;
3327
- }), Ke = b(() => Pi(C.value)), ot = b(() => {
3328
- var z, X, Q;
3329
- const D = (X = (z = m.value) == null ? void 0 : z.periods) == null ? void 0 : X[0], k = (Q = Ke.value) == null ? void 0 : Q.trialEndDate;
3330
- return D != null && D.end_at ? new Date(D.end_at) : k;
3331
- }), Pe = b(() => {
3332
- var z, X, Q;
3333
- const D = (X = (z = _.value) == null ? void 0 : z.periods) == null ? void 0 : X[0], k = (Q = Ke.value) == null ? void 0 : Q.subscriptionStartDate;
3334
- return D != null && D.start_at ? new Date(D.start_at) : k;
3335
- }), Qt = b(() => !!(u.form.value.seatsValues && u.form.value.seatsValues.length > 0 || u.form.value.unitsValues && u.form.value.unitsValues.length > 0 || C.value && ho(C.value) || C.value && bo(C.value))), Le = F(null), {
3336
- applyPromotionCode: nt,
3337
- removePromotionCode: Ht,
3338
- isPromotionCodePending: Zt,
3339
- promotionCodeErrorMessage: Qe
3340
- } = xo({
3341
- checkoutForm: u,
3342
- updateInvoicePreviewOnBillingInformationChange: Y,
3343
- formatErrorMessage: ({ action: D }) => y(D === "apply" ? {
3344
- defaultMessage: "Promotion code could not be applied. Please try again.",
3345
- id: "checkout.promotion_code.apply_failed",
3346
- description: "Error message when applying a promotion code in checkout failed"
3347
- } : {
3348
- defaultMessage: "Promotion code could not be removed. Please try again.",
3349
- id: "checkout.promotion_code.remove_failed",
3350
- description: "Error message when removing a promotion code in checkout failed"
3351
- }),
3352
- onInvalidPromotionCode: () => {
3353
- Le.value = null;
3354
- },
3355
- onApplyError: () => {
3356
- Le.value = null;
3357
- }
3358
- });
3359
- wo({
3360
- subscription: C,
3361
- promotionCode: (yt = a.configuration) == null ? void 0 : yt.couponCode,
3362
- appliedPromotionCode: Le,
3363
- applyPromotionCode: nt
3364
- });
3365
- const at = () => {
3366
- L && Ni(L);
3367
- }, Xt = b(
3368
- () => {
3369
- var D;
3370
- return !((D = a.configuration) != null && D.onPaymentSuccess) && !!L;
3371
- }
3372
- ), Wt = () => {
3373
- var D;
3374
- if (R.value = !0, Qe.value = null, (D = a.configuration) != null && D.onPaymentSuccess) {
3375
- a.configuration.onPaymentSuccess();
3376
- return;
3377
- }
3378
- if (L) {
3379
- at();
3380
- return;
3381
- }
3382
- }, rt = (D) => {
3383
- C.value && (C.value = {
3384
- ...C.value,
3385
- billing_period: D
3386
- }, K());
3387
- };
3388
- return ke(() => {
3389
- r("ready");
3390
- }), (D, k) => g.value ? (v(), O(Wo, {
3391
- key: 0,
3392
- class: "sv-checkout sv-root sv-screen sv-checkout--error"
3393
- })) : (v(), O(t(Ki), {
3394
- key: 1,
3395
- class: be(["sv-checkout sv-root sv-screen", { "sv-checkout--paid": t(R) }])
3396
- }, {
3397
- header: I(() => [
3398
- w("div", kn, [
3399
- E(fe, { class: "min-h-[52px] w-96" }, {
3400
- default: I(() => {
3401
- var z, X, Q;
3402
- return [
3403
- t(_) && t(C) && Pe.value ? (v(), O(Qo, {
3404
- key: 0,
3405
- class: "sv-checkout__title",
3406
- "trial-start-date": Ye.value,
3407
- "trial-period": t(h),
3408
- "subscription-start-date": Pe.value,
3409
- "subscription-name": ((z = t(C)) == null ? void 0 : z.name) ?? "",
3410
- amount: (X = t(_)) == null ? void 0 : X.invoice_amount_including_tax,
3411
- "billing-period": (Q = t(C)) == null ? void 0 : Q.billing_period,
3412
- "country-code": t(u).form.value.country
3413
- }, null, 8, ["trial-start-date", "trial-period", "subscription-start-date", "subscription-name", "amount", "billing-period", "country-code"])) : B("", !0)
3414
- ];
3415
- }),
3416
- _: 1
3417
- })
3418
- ])
3419
- ]),
3420
- content: I(() => {
3421
- var z, X, Q;
3422
- return [
3423
- t(R) ? (v(), O(qo, {
3424
- key: 0,
3425
- class: "sv-checkout__completed-payment",
3426
- onContinueToMerchant: at
3427
- })) : (v(), W(_e, { key: 1 }, [
3428
- t(C) && t(x) ? (v(), O(xt, {
3429
- key: 0,
3430
- class: "sv-checkout__mobile-order-summary",
3431
- subscription: t(C),
3432
- invoice: t(_),
3433
- "invoice-preview-by-billing-period": t(l),
3434
- "trial-invoice": t(m),
3435
- "enabled-pricing-ids": oe.value,
3436
- "trial-period": t(h),
3437
- avatar: (z = s.value) == null ? void 0 : z.avatar,
3438
- "is-paid": t(R),
3439
- "is-usage-based": q.value,
3440
- "is-preview-and-payment-methods-pending": t(J) || t(te),
3441
- "country-code": t(u).form.value.country,
3442
- collapsible: "collapsed",
3443
- variant: "products-inline",
3444
- onBillingPeriodChange: rt
3445
- }, 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"])) : B("", !0),
3446
- Qt.value && t(C) ? (v(), O(t(n), {
3447
- key: 1,
3448
- "seats-values": Ee.value,
3449
- "onUpdate:seatsValues": k[0] || (k[0] = (me) => Ee.value = me),
3450
- "units-values": Ce.value,
3451
- "onUpdate:unitsValues": k[1] || (k[1] = (me) => Ce.value = me),
3452
- "enabled-pricing-ids": oe.value,
3453
- "onUpdate:enabledPricingIds": k[2] || (k[2] = (me) => oe.value = me),
3454
- class: "sv-checkout__plan-customization",
3455
- subscription: t(C),
3456
- "initial-seats-values": (X = t(u).initialState) == null ? void 0 : X.value.seatsValues,
3457
- "initial-units-values": (Q = t(u).initialState) == null ? void 0 : Q.value.unitsValues,
3458
- "billing-period": t(C).billing_period,
3459
- currency: de.value
3460
- }, null, 8, ["seats-values", "units-values", "enabled-pricing-ids", "subscription", "initial-seats-values", "initial-units-values", "billing-period", "currency"])) : B("", !0),
3461
- t(u).form.value.country && t(H) && xe.value ? (v(), O(Pn, {
3462
- key: 2,
3463
- class: "sv-checkout__express-payment-methods",
3464
- amount: t(H),
3465
- "country-code": t(u).form.value.country,
3466
- locale: t(M),
3467
- "payment-methods-options-response": t($) ?? [],
3468
- "billing-information": xe.value,
3469
- "on-billing-information-change": t(Y),
3470
- onUpdateBillingInformation: Yt
3471
- }, null, 8, ["amount", "country-code", "locale", "payment-methods-options-response", "billing-information", "on-billing-information-change"])) : B("", !0),
3472
- E(Fo, {
3473
- modelValue: t(u).form.value,
3474
- "onUpdate:modelValue": k[3] || (k[3] = (me) => t(u).form.value = me),
3475
- class: "sv-checkout__customer-form",
3476
- validation: t(u).validation,
3477
- "read-only-email": t(P),
3478
- "show-customer-info-on-top": Kt.value || t(R),
3479
- "is-billing-information-mandatory": ee.value,
3480
- "get-is-field-required": t(u).getIsFieldRequired,
3481
- "read-only": t(R)
3482
- }, null, 8, ["modelValue", "validation", "read-only-email", "show-customer-info-on-top", "is-billing-information-mandatory", "get-is-field-required", "read-only"]),
3483
- w("div", On, [
3484
- E(fe, {
3485
- variant: "section",
3486
- class: "min-h-[130px]"
3487
- }, {
3488
- default: I(() => [
3489
- !t(J) || t(J) && t($).length > 0 ? (v(), W("div", zn, [
3490
- E(t(se), {
3491
- variant: "heading-3",
3492
- tag: "h2",
3493
- class: "sv-checkout__payment-methods-title mb-2"
3494
- }, {
3495
- default: I(() => [
3496
- G(V(t(y)({
3497
- defaultMessage: "Payment method",
3498
- id: "checkout.payment_method_block.title",
3499
- description: "The title of the payment method block in the checkout form"
3500
- })), 1)
3501
- ]),
3502
- _: 1
3503
- }),
3504
- t(u).form.value.country ? t(j) ? (v(), O(Ze, {
3505
- key: 1,
3506
- class: "sv-checkout__payment-methods-error",
3507
- icon: "error"
3508
- }, {
3509
- title: I(() => [
3510
- G(V(t(y)({
3511
- defaultMessage: "Could not load payment methods",
3512
- id: "checkout.payment_method_block.load_failed_title",
3513
- description: "The title shown when the payment methods failed to load"
3514
- })), 1)
3515
- ]),
3516
- message: I(() => [
3517
- G(V(t(y)({
3518
- defaultMessage: "Check your connection and try again.",
3519
- id: "checkout.payment_method_block.load_failed_message",
3520
- description: "The message shown when the payment methods failed to load"
3521
- })), 1)
3522
- ]),
3523
- action: I(() => [
3524
- E(t(Ae), {
3525
- type: "button",
3526
- intent: "secondary",
3527
- size: "sm",
3528
- class: "sv-action sv-action--secondary sv-checkout__payment-methods-retry",
3529
- onClick: t(p)
3530
- }, {
3531
- default: I(() => [
3532
- G(V(t(y)({
3533
- defaultMessage: "Try again",
3534
- id: "checkout.payment_method_block.load_failed_retry_button.label",
3535
- description: "The label of the button that loads the payment methods again"
3536
- })), 1)
3537
- ]),
3538
- _: 1
3539
- }, 8, ["onClick"])
3540
- ]),
3541
- _: 1
3542
- })) : t($).length === 0 ? (v(), O(Ze, {
3543
- key: 2,
3544
- class: "sv-checkout__payment-methods-empty",
3545
- icon: "credit_card_off"
3546
- }, {
3547
- title: I(() => [
3548
- G(V(t(y)({
3549
- defaultMessage: "No payment methods available",
3550
- id: "checkout.payment_method_block.no_payment_methods_available_title",
3551
- description: "The title shown when there are no available payment methods"
3552
- })), 1)
3553
- ]),
3554
- _: 1
3555
- })) : t(H) && t(u).form.value.country ? (v(), W("div", jn, [
3556
- w("div", {
3557
- class: be({ "pointer-events-none opacity-60": Z.value })
3558
- }, [
3559
- E(t(o), {
3560
- ref_key: "paymentIntegrationFormRef",
3561
- ref: d,
3562
- "country-code": t(u).form.value.country,
3563
- context: t(S),
3564
- amount: t(H),
3565
- email: t(u).form.value.email,
3566
- variant: "AUTHORIZE",
3567
- "payment-method-options": t($) ?? [],
3568
- "validate-on-submit": U,
3569
- "redirects-on-success": Xt.value,
3570
- "force-store-payment-method": "",
3571
- onPaymentSuccess: Wt,
3572
- onPaymentFailed: ne,
3573
- onReady: k[4] || (k[4] = (me) => r("ready"))
3574
- }, null, 8, ["country-code", "context", "amount", "email", "payment-method-options", "redirects-on-success"])
3575
- ], 2)
3576
- ])) : B("", !0) : (v(), O(Ze, {
3577
- key: 0,
3578
- class: "sv-checkout__payment-methods-empty",
3579
- icon: "captive_portal"
3580
- }, {
3581
- title: I(() => [
3582
- G(V(t(y)({
3583
- defaultMessage: "Select your billing country",
3584
- id: "checkout.payment_method_block.no_country_selected_title",
3585
- description: "The title shown when no country is selected"
3586
- })), 1)
3587
- ]),
3588
- message: I(() => [
3589
- G(V(t(y)({
3590
- defaultMessage: "Payment methods will be shown after you select the billing country.",
3591
- id: "checkout.payment_method_block.no_country_selected_message",
3592
- description: "The message shown when no country is selected"
3593
- })), 1)
3594
- ]),
3595
- _: 1
3596
- }))
3597
- ])) : B("", !0)
3598
- ]),
3599
- _: 1
3600
- })
3601
- ])
3602
- ], 64))
3603
- ];
3604
- }),
3605
- aside: I(() => [
3606
- w("div", Rn, [
3607
- E(fe, {
3608
- variant: "section",
3609
- class: "min-h-[220px]"
3610
- }, {
3611
- default: I(() => {
3612
- var z;
3613
- return [
3614
- t(C) && t(_) ? (v(), O(xt, {
3615
- key: 0,
3616
- subscription: t(C),
3617
- invoice: t(_),
3618
- "invoice-preview-by-billing-period": t(l),
3619
- "trial-invoice": t(m),
3620
- "enabled-pricing-ids": oe.value,
3621
- "trial-period": t(h),
3622
- "country-code": t(u).form.value.country,
3623
- avatar: (z = s.value) == null ? void 0 : z.avatar,
3624
- "is-paid": t(R),
3625
- "is-usage-based": q.value,
3626
- "is-preview-and-payment-methods-pending": t(J) || t(te),
3627
- onBillingPeriodChange: rt
3628
- }, 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"])) : B("", !0)
3629
- ];
3630
- }),
3631
- _: 1
3632
- })
3633
- ]),
3634
- t(R) ? B("", !0) : (v(), W(_e, { key: 0 }, [
3635
- E(Sn, {
3636
- class: "sv-checkout__promotion-code",
3637
- "promotion-code": Le.value,
3638
- "onUpdate:appliedCode": k[5] || (k[5] = (z) => Le.value = z),
3639
- onRemove: t(Ht),
3640
- onApply: t(nt)
3641
- }, null, 8, ["promotion-code", "onRemove", "onApply"]),
3642
- t(Qe) ? (v(), O(t(ri), {
3643
- key: 0,
3644
- class: "sv-checkout__promotion-error mt-2",
3645
- title: t(Qe)
3646
- }, null, 8, ["title"])) : B("", !0),
3647
- w("div", Bn, [
3648
- E(fe, { class: "sv-checkout__submit-skeleton min-h-[44px]" }, {
3649
- default: I(() => [
3650
- t(_) ? (v(), O(t(Ae), {
3651
- key: 0,
3652
- type: "button",
3653
- size: "lg",
3654
- class: "sv-action sv-action--primary sv-action--full-width sv-checkout__submit w-full",
3655
- disabled: t(Zt) || t($).length === 0 || Z.value,
3656
- loading: Z.value,
3657
- onClick: re
3658
- }, {
3659
- default: I(() => [
3660
- G(V(ie.value ? t(y)({
3661
- defaultMessage: "Start trial",
3662
- id: "checkout.pay_and_subscribe_button_trial.label",
3663
- description: "The label of the start trial button in the checkout form"
3664
- }) : t(y)({
3665
- defaultMessage: "Pay and subscribe",
3666
- id: "checkout.pay_and_subscribe_button.label",
3667
- description: "The label of the pay and subscribe button in the checkout form"
3668
- })), 1)
3669
- ]),
3670
- _: 1
3671
- }, 8, ["disabled", "loading"])) : B("", !0)
3672
- ]),
3673
- _: 1
3674
- }),
3675
- E(Vi, { "payment-method-options": t($) }, null, 8, ["payment-method-options"])
3676
- ])
3677
- ], 64))
3678
- ]),
3679
- _: 1
3680
- }, 8, ["class"]));
3681
- }
3682
- }), Un = /* @__PURE__ */ ce({
3683
- __name: "Checkout.entry",
3684
- props: {
3685
- environment: { type: String },
3686
- locale: { type: String },
3687
- dateLocale: { type: String },
3688
- messages: { type: Object },
3689
- primaryColor: { type: String },
3690
- secondaryColor: { type: String },
3691
- isShadowRoot: { type: Boolean },
3692
- experimentalFeatures: { type: Array },
3693
- logLevel: { type: String },
3694
- onLog: { type: Function },
3695
- allowedPortalTypes: { type: Array },
3696
- portalObject: { type: Object },
3697
- cssOverrides: { type: [String, Array] },
3698
- branding: { type: Object },
3699
- configuration: { type: Object }
3700
- },
3701
- emits: ["error", "ready"],
3702
- setup(e, { emit: i }) {
3703
- var s;
3704
- const o = Hi("checkout"), n = e, a = i, r = ((s = n.configuration) == null ? void 0 : s.couponCode) ?? we("coupon_code") ?? void 0;
3705
- return (g, d) => (v(), O(t(ni), {
3706
- entry: g.$props,
3707
- "component-name": t(o),
3708
- "allowed-portal-types": ["INIT_PRICING_PLAN_SUBSCRIPTION"],
3709
- onError: d[1] || (d[1] = (N) => g.$emit("error", N))
3710
- }, {
3711
- default: I(() => {
3712
- var N, y, M, A, c;
3713
- return [
3714
- E($n, {
3715
- configuration: {
3716
- avatar: (y = (N = e.branding) == null ? void 0 : N.emblem) == null ? void 0 : y.public_url,
3717
- email: (M = e.configuration) == null ? void 0 : M.email,
3718
- countryCode: (A = e.configuration) == null ? void 0 : A.countryCode,
3719
- enabledPricingIds: (c = e.configuration) == null ? void 0 : c.enabledPricingIds,
3720
- couponCode: t(r)
3721
- },
3722
- onReady: d[0] || (d[0] = (x) => a("ready"))
3723
- }, Je({ _: 2 }, [
3724
- g.$slots["terms-and-conditions"] ? {
3725
- name: "terms-and-conditions",
3726
- fn: I(() => [
3727
- We(g.$slots, "terms-and-conditions")
3728
- ]),
3729
- key: "0"
3730
- } : void 0
3731
- ]), 1032, ["configuration"])
3732
- ];
3733
- }),
3734
- _: 3
3735
- }, 8, ["entry", "component-name"]));
3736
- }
3737
- }), { define: wa } = ai(
3738
- Un,
3739
- "checkout"
3740
- );
3741
- export {
3742
- Io as F,
3743
- nn as _,
3744
- Do as a,
3745
- wa as d,
3746
- La as g
3747
- };