@solvimon/solvimon-web 0.1.0-alpha.16 → 0.1.0-alpha.17

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 (151) hide show
  1. package/README.md +5 -5
  2. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BYBAO4Au.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-BrPsTuoW.mjs} +2 -2
  3. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BI3Lg7nO.js → BillingInformation.vue_vue_type_script_setup_true_lang-BuQ8bzar.js} +1 -1
  4. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-C_uHr21N.js → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-1Op9GjGZ.js} +1 -1
  5. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CTnn1gkW.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CuWrBcoK.mjs} +3 -3
  6. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-C66beqgf.js +1 -0
  7. package/dist/{useWalletBalanceItems-COQDLfoZ.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-D2BhuXsh.mjs} +24 -56
  8. package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-BbuEBiY3.js +1 -0
  9. package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-C3cqlbGY.mjs +147 -0
  10. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DU6X3zxr.js → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-dwIv_xxf.js} +1 -1
  11. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-ryvFEQMV.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-wxP5IaGt.mjs} +1 -1
  12. package/dist/{InvoiceHeader.vue_vue_type_script_setup_true_lang-DdpPrYxi.js → InvoiceHeader.vue_vue_type_script_setup_true_lang-05NKI2A0.js} +1 -1
  13. package/dist/{InvoiceHeader.vue_vue_type_script_setup_true_lang-bAiAbtMi.mjs → InvoiceHeader.vue_vue_type_script_setup_true_lang-17v07F58.mjs} +1 -1
  14. package/dist/{PaymentHistoryBlock-BKMttUyk.mjs → PaymentHistoryBlock-BitwS9Re.mjs} +1 -1
  15. package/dist/{PaymentHistoryBlock-BGbTy4Se.js → PaymentHistoryBlock-ZtmPXXwI.js} +1 -1
  16. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-tM7f_fQS.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-C3ZUDUdw.mjs} +1 -1
  17. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CixdxEGm.js → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CMGK71zZ.js} +1 -1
  18. package/dist/{PaymentIntegrationForm-CypW6fZY.mjs → PaymentIntegrationForm-BK2aLPCo.mjs} +1 -1
  19. package/dist/{PaymentIntegrationForm-D4QupHWl.js → PaymentIntegrationForm-BZTzCUiu.js} +1 -1
  20. package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CrGSfZZs.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-B_yDNGK8.mjs} +5 -5
  21. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-GN3WAr10.js +1 -0
  22. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-B8eNptZp.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-CIQ0vsko.mjs} +25 -14
  23. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-zRr8iihy.js +1 -0
  24. package/dist/PaymentMethodSelector.vue_vue_type_script_setup_true_lang-BQIN3zuf.mjs +156 -0
  25. package/dist/PaymentMethodSelector.vue_vue_type_script_setup_true_lang-DyL2-vV0.js +1 -0
  26. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-BUTqn4Ey.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-DVeB_mqK.mjs} +5 -5
  27. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-Be_fF-R_.js → PaymentMethodsList.vue_vue_type_script_setup_true_lang-OvGGejpX.js} +1 -1
  28. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BxqIfmkK.js +1 -0
  29. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Cqk-vonA.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-D1TcP9PR.mjs} +115 -68
  30. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-BKz2QQn9.js +1 -0
  31. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-BMXr26gF.mjs +37 -0
  32. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DB1p61kZ.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BDqX6OaE.mjs} +22 -119
  33. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-CyAFjCh7.js +1 -0
  34. package/dist/component-CUJ_G2Nw.mjs +962 -0
  35. package/dist/component-CiKxWtdx.js +1 -0
  36. package/dist/components/BillingInformation/BillingInformation.cjs.js +1 -1
  37. package/dist/components/BillingInformation/BillingInformation.es.js +4 -4
  38. package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +1 -1
  39. package/dist/components/BillingInformationForm/BillingInformationForm.es.js +3 -3
  40. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +1 -1
  41. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +4 -4
  42. package/dist/components/Invoice/Invoice.cjs.js +1 -1
  43. package/dist/components/Invoice/Invoice.es.js +7 -7
  44. package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -1
  45. package/dist/components/InvoiceDetails/InvoiceDetails.es.js +3 -3
  46. package/dist/components/InvoiceHeader/InvoiceHeader.cjs.js +1 -1
  47. package/dist/components/InvoiceHeader/InvoiceHeader.es.js +4 -4
  48. package/dist/components/InvoicesList/InvoicesList.cjs.js +1 -1
  49. package/dist/components/InvoicesList/InvoicesList.es.js +3 -3
  50. package/dist/components/PaymentHistory/PaymentHistory.cjs.js +1 -1
  51. package/dist/components/PaymentHistory/PaymentHistory.es.js +3 -3
  52. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +1 -1
  53. package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +6 -6
  54. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +1 -1
  55. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +7 -58
  56. package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +1 -1
  57. package/dist/components/SubscriptionsList/SubscriptionsList.es.js +5 -5
  58. package/dist/components/WalletBalances/WalletBalances.cjs.js +1 -1
  59. package/dist/components/WalletBalances/WalletBalances.es.js +8 -6
  60. package/dist/core/action-request.types.d.ts +3 -3
  61. package/dist/core/index.cjs.js +1 -1
  62. package/dist/core/index.es.js +1 -1
  63. package/dist/core/types.d.ts +4 -2
  64. package/dist/{customer-_W8gIX5m.js → customer-AfRcAZ5P.js} +1 -1
  65. package/dist/{customer-Bv_fqXzO.mjs → customer-DAgdegIW.mjs} +1 -1
  66. package/dist/{en-US-DAgOSlgv.mjs → en-US-DSzSbgL5.mjs} +68 -36
  67. package/dist/en-US-QzQnGXP1.js +1 -0
  68. package/dist/index.cjs.js +1 -1
  69. package/dist/index.d.ts +2 -1
  70. package/dist/index.es.js +7 -4
  71. package/dist/invoices-BHgajZHq.js +1 -0
  72. package/dist/{invoices-BGb0AwVF.mjs → invoices-BXDgW8ch.mjs} +32 -16
  73. package/dist/nl-NL-C4rr-1tr.js +1 -0
  74. package/dist/{nl-NL-DCsmrA8A.mjs → nl-NL-Li7RW89R.mjs} +72 -40
  75. package/dist/{paymentMethods-DIbB759g.js → paymentMethods-BMcc-eTl.js} +1 -1
  76. package/dist/{paymentMethods-DvqlWe96.mjs → paymentMethods-xzFD2L30.mjs} +2 -2
  77. package/dist/{payments-DMDDI3MK.js → payments-DMvmB5vg.js} +1 -1
  78. package/dist/{payments-CpzTVrQM.mjs → payments-DV6csRej.mjs} +1 -1
  79. package/dist/pricing-B1uImUm4.mjs +19 -0
  80. package/dist/pricing-BEjY_5wb.js +1 -0
  81. package/dist/pricingPlanSchedule-B9HFiXy-.js +1 -0
  82. package/dist/pricingPlanSchedule-C_cqUyTk.mjs +144 -0
  83. package/dist/registry-CeMxLjwU.js +1 -0
  84. package/dist/{registry-B-If1W_u.mjs → registry-CyENvS6l.mjs} +7 -4
  85. package/dist/screens/Checkout/Checkout.cjs.js +1 -1
  86. package/dist/screens/Checkout/Checkout.es.js +414 -675
  87. package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
  88. package/dist/screens/CustomerOverview/CustomerOverview.es.js +65 -19
  89. package/dist/screens/PayInvoice/PayInvoice.cjs.js +1 -1
  90. package/dist/screens/PayInvoice/PayInvoice.es.js +10 -9
  91. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs.js +1 -1
  92. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.es.js +8 -8
  93. package/dist/screens/SubscriptionDetails/SubscriptionDetails.ce.d.ts +3 -0
  94. package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs.js +1 -0
  95. package/dist/screens/SubscriptionDetails/SubscriptionDetails.es.js +542 -0
  96. package/dist/screens/SubscriptionManagement/SubscriptionManagement.ce.d.ts +3 -0
  97. package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs.js +1 -0
  98. package/dist/screens/SubscriptionManagement/SubscriptionManagement.es.js +725 -0
  99. package/dist/solvimon-web.css +1 -1
  100. package/dist/subscription-B4dBAY9C.mjs +89 -0
  101. package/dist/subscription-b0OPx8Du.js +1 -0
  102. package/dist/{subscriptions-BPYyv09M.mjs → subscriptions-CrNDM9qa.mjs} +6 -2
  103. package/dist/{subscriptions-CC61I6Nj.js → subscriptions-DC-mxa17.js} +1 -1
  104. package/dist/{url-1Lbg5Yni.mjs → url-BjZ1Pg0l.mjs} +1 -1
  105. package/dist/url-D8GJi5rF.js +1 -0
  106. package/dist/{useActionDispatchProvider-BHTknMoH.js → useActionDispatchProvider-bqR_FeM4.js} +1 -1
  107. package/dist/{useActionDispatchProvider-Dz8-e4gZ.mjs → useActionDispatchProvider-zB_GKeUR.mjs} +1 -1
  108. package/dist/{useCustomer-VVJi8z2w.mjs → useCustomer-VfeQ6rG2.mjs} +2 -2
  109. package/dist/{useCustomer-Z24KchWC.js → useCustomer-bO4D6e4Z.js} +1 -1
  110. package/dist/{useIncrementalLoading-CuSndpP2.js → useIncrementalLoading-BgWuwoMo.js} +1 -1
  111. package/dist/{useIncrementalLoading-DmOT2MXH.mjs → useIncrementalLoading-C59FXHzp.mjs} +1 -1
  112. package/dist/{useInvoiceData-Bl87gzIS.js → useInvoiceData-CxxkBTGY.js} +1 -1
  113. package/dist/{useInvoiceData-Di5pLPM0.mjs → useInvoiceData-Dhg-hx8C.mjs} +2 -2
  114. package/dist/useInvoicesList-BXZ9uV9i.js +1 -0
  115. package/dist/{useInvoicesList-z19cteaD.mjs → useInvoicesList-DBz7T7sM.mjs} +4 -4
  116. package/dist/{useLoadInitialData-CkpryfjF.mjs → useLoadInitialData-BhpIg7OF.mjs} +1 -1
  117. package/dist/{useLoadInitialData-CTqfiMTN.js → useLoadInitialData-BqiAFNFi.js} +1 -1
  118. package/dist/{usePaymentMethodOptions-BsCZnCQW.js → usePaymentMethodOptions-DszFvgKX.js} +1 -1
  119. package/dist/{usePaymentMethodOptions-BoGHJjng.mjs → usePaymentMethodOptions-PcMjtMSF.mjs} +2 -2
  120. package/dist/{usePaymentMethods-ocHmNoP7.mjs → usePaymentMethods-B5AbGWsn.mjs} +2 -2
  121. package/dist/{usePaymentMethods-AC-4rrR9.js → usePaymentMethods-Bb1Xbads.js} +1 -1
  122. package/dist/{usePayments-D85eB5l4.mjs → usePayments-DgoZoBZh.mjs} +3 -3
  123. package/dist/{usePayments-CgXZeWrU.js → usePayments-is5c66Z6.js} +1 -1
  124. package/dist/{usePortal-DVD7PcWI.js → usePortal-C4qWsJeq.js} +1 -1
  125. package/dist/{usePortal-B1O1zgdV.mjs → usePortal-DWLtNqBB.mjs} +1 -1
  126. package/dist/{useService-DF57xuDd.mjs → useService-BZqFkz7p.mjs} +1 -1
  127. package/dist/{useService-CHrkefKd.js → useService-DKm3QtT4.js} +1 -1
  128. package/dist/useSubscription-CEZJw6wZ.mjs +23 -0
  129. package/dist/useSubscription-DuUNc1_l.js +1 -0
  130. package/dist/useTopUpModal-DNyWrHDv.mjs +1012 -0
  131. package/dist/useTopUpModal-DeF-cfCK.js +1 -0
  132. package/dist/{vendor-ui-B8IlviSs.mjs → vendor-ui-BoGKOJ36.mjs} +8642 -7077
  133. package/dist/vendor-ui-BuRqLx74.js +1 -0
  134. package/package.json +14 -7
  135. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BBEM-YPz.js +0 -1
  136. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-eWmC5GOT.js +0 -1
  137. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BVoS3ZXS.js +0 -1
  138. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-56vu59V4.js +0 -1
  139. package/dist/component-Bg2JVC_O.mjs +0 -933
  140. package/dist/component-Bs8oszfD.js +0 -1
  141. package/dist/en-US-C0gIE4Q1.js +0 -1
  142. package/dist/invoices-D-OKipCg.js +0 -1
  143. package/dist/nl-NL-Br7muSHK.js +0 -1
  144. package/dist/registry-uG2isab0.js +0 -1
  145. package/dist/screens/UpgradeSubscription/UpgradeSubscription.ce.d.ts +0 -3
  146. package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +0 -1
  147. package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +0 -1102
  148. package/dist/url-B6-3PkW2.js +0 -1
  149. package/dist/useInvoicesList-CFk-_oVK.js +0 -1
  150. package/dist/useWalletBalanceItems-BL-R5foK.js +0 -1
  151. package/dist/vendor-ui-C3Tq-qY_.js +0 -1
package/README.md CHANGED
@@ -100,11 +100,11 @@ For more details, see [`@solvimon/solvimon-web/core`](./src/public/core/README.m
100
100
 
101
101
  Full-page experiences.
102
102
 
103
- | Export path | Custom element |
104
- | ----------------------------------------------------- | --------------------------------- |
105
- | `@solvimon/solvimon-web/screens/checkout` | `<solvimon-checkout>` |
106
- | `@solvimon/solvimon-web/screens/customer-overview` | `<solvimon-customer-overview>` |
107
- | `@solvimon/solvimon-web/screens/upgrade-subscription` | `<solvimon-upgrade-subscription>` |
103
+ | Export path | Custom element |
104
+ | -------------------------------------------------------- | ------------------------------------ |
105
+ | `@solvimon/solvimon-web/screens/checkout` | `<solvimon-checkout>` |
106
+ | `@solvimon/solvimon-web/screens/customer-overview` | `<solvimon-customer-overview>` |
107
+ | `@solvimon/solvimon-web/screens/subscription-management` | `<solvimon-subscription-management>` |
108
108
 
109
109
  ### Components
110
110
 
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, openBlock, createBlock, unref, createSlots, withCtx, createVNode, createTextVNode, toDisplayString } from "vue";
2
- import { u as useIntl, j as _sfc_main$2, c as _sfc_main$3 } from "./vendor-ui-B8IlviSs.mjs";
2
+ import { u as useIntl, k as _sfc_main$2, c as _sfc_main$3 } from "./vendor-ui-BoGKOJ36.mjs";
3
3
  import { _ as _sfc_main$1 } from "./Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs";
4
- import { u as useActionDispatchProvider } from "./useActionDispatchProvider-Dz8-e4gZ.mjs";
4
+ import { u as useActionDispatchProvider } from "./useActionDispatchProvider-zB_GKeUR.mjs";
5
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
6
6
  __name: "BillingInformation",
7
7
  props: {
@@ -1 +1 @@
1
- const e=require("vue"),i=require("./vendor-ui-C3Tq-qY_.js"),t=require("./Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),o=require("./useActionDispatchProvider-BHTknMoH.js"),n=e.defineComponent({__name:"BillingInformation",props:{customer:{type:Object},isLoading:{type:Boolean},configuration:{default:()=>({showEditButton:!0}),type:Object}},emits:["edit-billing-information"],setup(n){const{$t:s}=i.useIntl(),{dispatchAction:r}=o.useActionDispatchProvider();return(o,a)=>n.isLoading?(e.openBlock(),e.createBlock(t._sfc_main,{key:0,variant:"section",class:"sv-billing-information sv-root sv-component sv-loading min-h-[100px]","data-testid":"billing-information-skeleton"})):(e.openBlock(),e.createBlock(e.unref(i._sfc_main$4),{key:1,class:"sv-billing-information sv-root sv-component",customer:n.customer,"fallback-to-reference":!1},e.createSlots({_:2},[n.configuration.showEditButton?{name:"settings",fn:e.withCtx(()=>[e.createVNode(e.unref(i._sfc_main$1),{size:"sm",variant:"ghost",color:"gray","icon-prefix":"edit",class:"sv-action sv-action--ghost sv-billing-information__edit",onClick:a[0]||(a[0]=i=>e.unref(r)({action:"edit-billing-information"}))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Edit",id:"customer_overview.billing_information_block.view_all_payment_methods_link_label",description:"The link text that links to the overview page of the customer billing information"})),1)]),_:1})]),key:"0"}:void 0]),1032,["customer"]))}});exports._sfc_main=n;
1
+ const e=require("vue"),i=require("./vendor-ui-BuRqLx74.js"),t=require("./Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),o=require("./useActionDispatchProvider-bqR_FeM4.js"),n=e.defineComponent({__name:"BillingInformation",props:{customer:{type:Object},isLoading:{type:Boolean},configuration:{default:()=>({showEditButton:!0}),type:Object}},emits:["edit-billing-information"],setup(n){const{$t:s}=i.useIntl(),{dispatchAction:r}=o.useActionDispatchProvider();return(o,a)=>n.isLoading?(e.openBlock(),e.createBlock(t._sfc_main,{key:0,variant:"section",class:"sv-billing-information sv-root sv-component sv-loading min-h-[100px]","data-testid":"billing-information-skeleton"})):(e.openBlock(),e.createBlock(e.unref(i._sfc_main$4),{key:1,class:"sv-billing-information sv-root sv-component",customer:n.customer,"fallback-to-reference":!1},e.createSlots({_:2},[n.configuration.showEditButton?{name:"settings",fn:e.withCtx(()=>[e.createVNode(e.unref(i._sfc_main$1),{size:"sm",variant:"ghost",color:"gray","icon-prefix":"edit",class:"sv-action sv-action--ghost sv-billing-information__edit",onClick:a[0]||(a[0]=i=>e.unref(r)({action:"edit-billing-information"}))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Edit",id:"customer_overview.billing_information_block.view_all_payment_methods_link_label",description:"The link text that links to the overview page of the customer billing information"})),1)]),_:1})]),key:"0"}:void 0]),1032,["customer"]))}});exports._sfc_main=n;
@@ -1 +1 @@
1
- const e=require("vue"),t=require("./vendor-ui-C3Tq-qY_.js"),o=require("./PaymentMethodsList.vue_vue_type_script_setup_true_lang-Be_fF-R_.js"),n=require("./Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),a=require("./useActionDispatchProvider-BHTknMoH.js"),s=e.defineComponent({__name:"CustomerPaymentMethodsBlock",props:{paymentMethods:{type:Array},limit:{default:2,type:Number},isLoading:{type:Boolean},showViewAllButton:{type:Boolean},showAddButton:{type:Boolean}},emits:["view-all-payment-methods","add-payment-method"],setup(n){const a=n,{$t:s}=t.useIntl(),i=e.computed(()=>a.paymentMethods.length>0);return(a,d)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{class:"sv-payment-methods","no-spacing":"","no-border":"",title:e.unref(s)({defaultMessage:"{count, plural, one {Payment method} other {Payment methods}}",description:"Title for the payment methods block on the customer overview page",id:"customer_overview.payment_methods.title"},{count:String(n.paymentMethods.length)})},e.createSlots({default:e.withCtx(()=>[i.value?(e.openBlock(),e.createBlock(o._sfc_main,{key:0,"payment-methods":n.paymentMethods},null,8,["payment-methods"])):(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:1,class:"sv-empty-state sv-payment-methods__empty"},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$3),{variant:"body-sm",shade:"lighter","no-spacing":"",class:"sv-payment-methods__empty-message"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Add a payment method for recurring invoice payments.",description:"Helper text for adding a payment method when no payment methods are configured",id:"customer_overview.payment_methods_block.add_payment_method_helper_text"})),1)]),_:1}),n.showAddButton?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:0,class:"sv-action sv-action--secondary sv-action--full-width sv-payment-methods__add mt-4 w-full",variant:"outline",color:"gray","icon-prefix":"add",type:"button",onClick:d[1]||(d[1]=e=>a.$emit("add-payment-method"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Add payment method",description:"Text for the add payment method button that is shown when no payment methods have been configured",id:"customer_overview.payment_methods_block.add_payment_method_button_label"})),1)]),_:1})):e.createCommentVNode("",!0)]),_:1}))]),_:2},[n.showViewAllButton?{name:"right",fn:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$1),{size:"sm",variant:"ghost",color:"gray","icon-suffix":"arrow_right_alt",class:"sv-action sv-action--ghost sv-payment-methods__view-all",type:"button",onClick:d[0]||(d[0]=e=>a.$emit("view-all-payment-methods"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"View all",id:"customer_overview.payment_methods_block.view_all_payment_methods_link_label",description:"The link text that links to the overview page of the customer invoices"})),1)]),_:1})]),key:"0"}:void 0]),1032,["title"]))}}),i=e.defineComponent({__name:"CustomerPaymentMethods",props:{isLoading:{type:Boolean},paymentMethods:{type:Array},maxPaymentMethods:{type:Number},configuration:{default:()=>({showViewAllButton:!0,showAddButton:!0}),type:Object}},setup(t){const{dispatchAction:o}=a.useActionDispatchProvider();return(a,i)=>{var d,m;return t.isLoading?(e.openBlock(),e.createBlock(n._sfc_main,{key:0,variant:"section",class:"sv-payment-methods sv-root sv-component sv-loading h-72","data-testid":"customer-payment-methods-skeleton"})):(e.openBlock(),e.createBlock(s,{key:1,class:"sv-payment-methods sv-root sv-component","is-loading":t.isLoading,"payment-methods":t.paymentMethods,"show-view-all-button":null==(d=t.configuration)?void 0:d.showViewAllButton,"show-add-button":null==(m=t.configuration)?void 0:m.showAddButton,onViewAllPaymentMethods:i[0]||(i[0]=t=>e.unref(o)({action:"view-all-payment-methods"})),onAddPaymentMethod:i[1]||(i[1]=t=>e.unref(o)({action:"add-payment-method"}))},null,8,["is-loading","payment-methods","show-view-all-button","show-add-button"]))}}});exports._sfc_main=i;
1
+ const e=require("vue"),t=require("./vendor-ui-BuRqLx74.js"),o=require("./PaymentMethodsList.vue_vue_type_script_setup_true_lang-OvGGejpX.js"),n=require("./Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),a=require("./useActionDispatchProvider-bqR_FeM4.js"),s=e.defineComponent({__name:"CustomerPaymentMethodsBlock",props:{paymentMethods:{type:Array},limit:{default:2,type:Number},isLoading:{type:Boolean},showViewAllButton:{type:Boolean},showAddButton:{type:Boolean}},emits:["view-all-payment-methods","add-payment-method"],setup(n){const a=n,{$t:s}=t.useIntl(),i=e.computed(()=>a.paymentMethods.length>0);return(a,d)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{class:"sv-payment-methods","no-spacing":"","no-border":"",title:e.unref(s)({defaultMessage:"{count, plural, one {Payment method} other {Payment methods}}",description:"Title for the payment methods block on the customer overview page",id:"customer_overview.payment_methods.title"},{count:String(n.paymentMethods.length)})},e.createSlots({default:e.withCtx(()=>[i.value?(e.openBlock(),e.createBlock(o._sfc_main,{key:0,"payment-methods":n.paymentMethods},null,8,["payment-methods"])):(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:1,class:"sv-empty-state sv-payment-methods__empty"},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$3),{variant:"body-sm",shade:"lighter","no-spacing":"",class:"sv-payment-methods__empty-message"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Add a payment method for recurring invoice payments.",description:"Helper text for adding a payment method when no payment methods are configured",id:"customer_overview.payment_methods_block.add_payment_method_helper_text"})),1)]),_:1}),n.showAddButton?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:0,class:"sv-action sv-action--secondary sv-action--full-width sv-payment-methods__add mt-4 w-full",variant:"outline",color:"gray","icon-prefix":"add",type:"button",onClick:d[1]||(d[1]=e=>a.$emit("add-payment-method"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Add payment method",description:"Text for the add payment method button that is shown when no payment methods have been configured",id:"customer_overview.payment_methods_block.add_payment_method_button_label"})),1)]),_:1})):e.createCommentVNode("",!0)]),_:1}))]),_:2},[n.showViewAllButton?{name:"right",fn:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$1),{size:"sm",variant:"ghost",color:"gray","icon-suffix":"arrow_right_alt",class:"sv-action sv-action--ghost sv-payment-methods__view-all",type:"button",onClick:d[0]||(d[0]=e=>a.$emit("view-all-payment-methods"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"View all",id:"customer_overview.payment_methods_block.view_all_payment_methods_link_label",description:"The link text that links to the overview page of the customer invoices"})),1)]),_:1})]),key:"0"}:void 0]),1032,["title"]))}}),i=e.defineComponent({__name:"CustomerPaymentMethods",props:{isLoading:{type:Boolean},paymentMethods:{type:Array},maxPaymentMethods:{type:Number},configuration:{default:()=>({showViewAllButton:!0,showAddButton:!0}),type:Object}},setup(t){const{dispatchAction:o}=a.useActionDispatchProvider();return(a,i)=>{var d,m;return t.isLoading?(e.openBlock(),e.createBlock(n._sfc_main,{key:0,variant:"section",class:"sv-payment-methods sv-root sv-component sv-loading h-72","data-testid":"customer-payment-methods-skeleton"})):(e.openBlock(),e.createBlock(s,{key:1,class:"sv-payment-methods sv-root sv-component","is-loading":t.isLoading,"payment-methods":t.paymentMethods,"show-view-all-button":null==(d=t.configuration)?void 0:d.showViewAllButton,"show-add-button":null==(m=t.configuration)?void 0:m.showAddButton,onViewAllPaymentMethods:i[0]||(i[0]=t=>e.unref(o)({action:"view-all-payment-methods"})),onAddPaymentMethod:i[1]||(i[1]=t=>e.unref(o)({action:"add-payment-method"}))},null,8,["is-loading","payment-methods","show-view-all-button","show-add-button"]))}}});exports._sfc_main=i;
@@ -1,8 +1,8 @@
1
1
  import { defineComponent, computed, openBlock, createBlock, unref, createSlots, withCtx, createVNode, createTextVNode, toDisplayString, createCommentVNode } from "vue";
2
- import { u as useIntl, _ as _sfc_main$2, e as _sfc_main$4, c as _sfc_main$5 } from "./vendor-ui-B8IlviSs.mjs";
3
- import { _ as _sfc_main$3 } from "./PaymentMethodsList.vue_vue_type_script_setup_true_lang-BUTqn4Ey.mjs";
2
+ import { u as useIntl, _ as _sfc_main$2, e as _sfc_main$4, c as _sfc_main$5 } from "./vendor-ui-BoGKOJ36.mjs";
3
+ import { _ as _sfc_main$3 } from "./PaymentMethodsList.vue_vue_type_script_setup_true_lang-DVeB_mqK.mjs";
4
4
  import { _ as _sfc_main$6 } from "./Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs";
5
- import { u as useActionDispatchProvider } from "./useActionDispatchProvider-Dz8-e4gZ.mjs";
5
+ import { u as useActionDispatchProvider } from "./useActionDispatchProvider-zB_GKeUR.mjs";
6
6
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
7
7
  __name: "CustomerPaymentMethodsBlock",
8
8
  props: {
@@ -0,0 +1 @@
1
+ const e=require("vue"),t=require("./vendor-ui-BuRqLx74.js"),a=require("./component-CiKxWtdx.js"),l=require("./useService-DKm3QtT4.js"),o=require("./Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js");const s=e.defineComponent({__name:"CustomerWalletBalances",props:{hasError:{type:Boolean},isLoading:{type:Boolean},walletBalances:{type:Array},showTopUpButton:{type:Boolean}},emits:["top-up"],setup(a){const{$t:l}=t.useIntl();return(s,n)=>a.isLoading?(e.openBlock(),e.createBlock(o._sfc_main,{key:0,variant:"section",class:"sv-wallet-balances sv-root sv-component sv-loading min-h-48","data-testid":"customer-wallet-balances-skeleton"})):a.hasError?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$10),{key:1,class:"sv-wallet-balances sv-root sv-component sv-error",title:e.unref(l)({defaultMessage:"Could not load wallet balances",description:"Error shown when wallet balances fail to load",id:"wallet_balance.load_failed"})},null,8,["title"])):a.walletBalances.length>0?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$11),{key:2,class:"sv-wallet-balances sv-root sv-component","customer-wallet-balances":a.walletBalances,"show-top-up-button":a.showTopUpButton,title:e.unref(l)({defaultMessage:"{count, plural, one {Wallet} other {Wallets}}",description:"Title for the wallets block on the customer overview page",id:"customer_overview.wallet_balances_block.title"},{count:String(a.walletBalances.length)}),onTopUp:n[0]||(n[0]=e=>s.$emit("top-up",e))},null,8,["customer-wallet-balances","show-top-up-button","title"])):e.createCommentVNode("",!0)}});exports._sfc_main=s,exports.useCustomerWalletBalances=function({customerId:o}){const{getCustomerWalletBalances:s}=function(){const e=a.createRequestService(),l=a.useConfig();return{getCustomerWalletBalances:function(a){const o=t.withExpand({expandParams:["ALL"]});return e({url:`${l.apiUrls.config}/portal/customers/${a}/wallets/balance${t.serializeQueryParams(o)}`,options:{method:"POST"},data:{}})}}}(),{data:n,execute:r,apiStatus:c,error:u,isPending:i}=l.useService({service:()=>s(o)});return{walletBalances:e.computed(()=>n.value??null),apiStatus:c,error:u,fetch:r,isPending:i}};
@@ -1,14 +1,15 @@
1
1
  import { computed, defineComponent, openBlock, createBlock, unref, createCommentVNode } from "vue";
2
- import { c as createRequestService, u as useConfig } from "./component-Bg2JVC_O.mjs";
3
- import { u as useService } from "./useService-DF57xuDd.mjs";
4
- import { u as useIntl, D as _sfc_main$2, E as _sfc_main$4 } from "./vendor-ui-B8IlviSs.mjs";
5
- import { _ as _sfc_main$3 } from "./Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs";
2
+ import { w as withExpand, s as serializeQueryParams, u as useIntl, t as _sfc_main$2, v as _sfc_main$3 } from "./vendor-ui-BoGKOJ36.mjs";
3
+ import { c as createRequestService, u as useConfig } from "./component-CUJ_G2Nw.mjs";
4
+ import { u as useService } from "./useService-BZqFkz7p.mjs";
5
+ import { _ as _sfc_main$1 } from "./Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs";
6
6
  function createWalletsService() {
7
7
  const request = createRequestService();
8
8
  const config = useConfig();
9
9
  function getCustomerWalletBalances(customerId) {
10
+ const queryParams = withExpand({ expandParams: ["ALL"] });
10
11
  return request({
11
- url: `${config.apiUrls.config}/portal/customers/${customerId}/wallets/balance`,
12
+ url: `${config.apiUrls.config}/portal/customers/${customerId}/wallets/balance${serializeQueryParams(queryParams)}`,
12
13
  options: { method: "POST" },
13
14
  data: {}
14
15
  });
@@ -27,45 +28,24 @@ function useCustomerWalletBalances({ customerId }) {
27
28
  );
28
29
  return { walletBalances, apiStatus, error, fetch: execute, isPending };
29
30
  }
30
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
31
- __name: "CustomerWalletBalancesBlock",
32
- props: {
33
- walletBalances: { type: Array }
34
- },
35
- setup(__props) {
36
- const { $t } = useIntl();
37
- return (_ctx, _cache) => {
38
- return openBlock(), createBlock(unref(_sfc_main$2), {
39
- class: "sv-wallet-balances",
40
- items: __props.walletBalances,
41
- title: unref($t)(
42
- {
43
- defaultMessage: "{count, plural, one {Wallet} other {Wallets}}",
44
- description: "Title for the wallets block on the customer overview page",
45
- id: "customer_overview.wallet_balances_block.title"
46
- },
47
- { count: String(__props.walletBalances.length) }
48
- )
49
- }, null, 8, ["items", "title"]);
50
- };
51
- }
52
- });
53
31
  const _sfc_main = /* @__PURE__ */ defineComponent({
54
32
  __name: "CustomerWalletBalances",
55
33
  props: {
56
34
  hasError: { type: Boolean },
57
35
  isLoading: { type: Boolean },
58
- walletBalances: { type: Array }
36
+ walletBalances: { type: Array },
37
+ showTopUpButton: { type: Boolean }
59
38
  },
39
+ emits: ["top-up"],
60
40
  setup(__props) {
61
41
  const { $t } = useIntl();
62
42
  return (_ctx, _cache) => {
63
- return __props.isLoading ? (openBlock(), createBlock(_sfc_main$3, {
43
+ return __props.isLoading ? (openBlock(), createBlock(_sfc_main$1, {
64
44
  key: 0,
65
45
  variant: "section",
66
46
  class: "sv-wallet-balances sv-root sv-component sv-loading min-h-48",
67
47
  "data-testid": "customer-wallet-balances-skeleton"
68
- })) : __props.hasError ? (openBlock(), createBlock(unref(_sfc_main$4), {
48
+ })) : __props.hasError ? (openBlock(), createBlock(unref(_sfc_main$2), {
69
49
  key: 1,
70
50
  class: "sv-wallet-balances sv-root sv-component sv-error",
71
51
  title: unref($t)({
@@ -73,37 +53,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
73
53
  description: "Error shown when wallet balances fail to load",
74
54
  id: "wallet_balance.load_failed"
75
55
  })
76
- }, null, 8, ["title"])) : __props.walletBalances.length > 0 ? (openBlock(), createBlock(_sfc_main$1, {
56
+ }, null, 8, ["title"])) : __props.walletBalances.length > 0 ? (openBlock(), createBlock(unref(_sfc_main$3), {
77
57
  key: 2,
78
58
  class: "sv-wallet-balances sv-root sv-component",
79
- "wallet-balances": __props.walletBalances
80
- }, null, 8, ["wallet-balances"])) : createCommentVNode("", true);
59
+ "customer-wallet-balances": __props.walletBalances,
60
+ "show-top-up-button": __props.showTopUpButton,
61
+ title: unref($t)(
62
+ {
63
+ defaultMessage: "{count, plural, one {Wallet} other {Wallets}}",
64
+ description: "Title for the wallets block on the customer overview page",
65
+ id: "customer_overview.wallet_balances_block.title"
66
+ },
67
+ { count: String(__props.walletBalances.length) }
68
+ ),
69
+ onTopUp: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("top-up", $event))
70
+ }, null, 8, ["customer-wallet-balances", "show-top-up-button", "title"])) : createCommentVNode("", true);
81
71
  };
82
72
  }
83
73
  });
84
- function useWalletBalanceItems(walletBalances) {
85
- const { $t } = useIntl();
86
- return computed(
87
- () => {
88
- var _a;
89
- return (((_a = walletBalances.value) == null ? void 0 : _a.wallet_balances) ?? []).map((walletBalance) => {
90
- var _a2;
91
- return {
92
- walletId: walletBalance.wallet_id,
93
- title: $t({
94
- defaultMessage: "Balance",
95
- description: "Fallback wallet title in wallet balance components",
96
- id: "wallet_balance.wallet_ballance_title"
97
- }),
98
- balance: walletBalance.wallet_balance.open_balance,
99
- balanceAt: walletBalance.wallet_balance.balance_at ?? ((_a2 = walletBalances.value) == null ? void 0 : _a2.balance_at) ?? null
100
- };
101
- });
102
- }
103
- );
104
- }
105
74
  export {
106
75
  _sfc_main as _,
107
- useWalletBalanceItems as a,
108
76
  useCustomerWalletBalances as u
109
77
  };
@@ -0,0 +1 @@
1
+ const e=require("vue"),t=require("./vendor-ui-BuRqLx74.js"),a=require("./subscription-b0OPx8Du.js"),n={class:"flex flex-row gap-3 px-3 py-2"},i={class:"grow"},s=e.defineComponent({__name:"SubscriptionSummary",props:{subscription:{type:Object},invoice:{type:Object},loading:{type:Boolean},enabledPricingIds:{type:Array},avatar:{type:String},trialPeriod:{type:Object}},setup(s){const o=s,{$t:r}=t.useIntl(),c=e.computed(()=>a.getMostRecentPricingPlan(o.subscription)),l=e.computed(()=>a.getSubscriptionName({subscription:o.subscription,fallback:r({defaultMessage:"Subscription",description:"The fallback name for when no subscription name can be determined",id:"customer_overview.subscriptions_block.fallback_subscription_name"})})),d=e.computed(()=>{var e;return o.subscription.description||(null==(e=c.value)?void 0:e.description)}),p=e.computed(()=>{if(!o.subscription||!o.enabledPricingIds)return;const e=a.findPricingsByIds(o.subscription,o.enabledPricingIds);return null==e?void 0:e.map(e=>{var t,a;return e.name??(null==(a=null==(t=e.products)?void 0:t[0])?void 0:a.name)}).join(" - ")});return(a,o)=>(e.openBlock(),e.createElementBlock("div",n,[s.avatar?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$8),{key:0,"image-src":s.avatar,size:"lg",class:"my-1"},null,8,["image-src"])):e.createCommentVNode("",!0),e.createElementVNode("div",i,[e.createVNode(e.unref(t._sfc_main$3),{variant:"body",weight:"semibold","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value),1)]),_:1}),p.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$3),{key:0,variant:"body-xs",shade:"lighter","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.value),1)]),_:1})):e.createCommentVNode("",!0),d.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$3),{key:1,variant:"body-xs",shade:"lighter","no-spacing":""},{default:e.withCtx(()=>[p.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(" • ")],64)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(d.value),1)]),_:1})):e.createCommentVNode("",!0)])]))}}),o={class:"sv-empty-state__body flex flex-col items-center justify-center py-4"},r=e.defineComponent({__name:"EmptyStatePlaceholder",props:{icon:{type:null}},setup:a=>(n,i)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{class:"sv-empty-state"},{default:e.withCtx(()=>[e.createElementVNode("div",o,[e.createVNode(e.unref(t._sfc_main$9),{icon:a.icon,size:"lg",class:"sv-empty-state__icon text-gray-500"},null,8,["icon"]),e.createVNode(e.unref(t._sfc_main$3),{center:"",tag:"span",variant:"body-sm",weight:"semibold",shade:"lighter",class:"sv-empty-state__title mt-2"},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"title")]),_:3}),e.createVNode(e.unref(t._sfc_main$3),{center:"",tag:"span",variant:"body-xs",shade:"lightest",class:"sv-empty-state__message mt-1"},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"message")]),_:3})])]),_:3}))});exports._sfc_main=s,exports._sfc_main$1=r;
@@ -0,0 +1,147 @@
1
+ import { defineComponent, computed, openBlock, createElementBlock, createBlock, unref, createCommentVNode, createElementVNode, createVNode, withCtx, createTextVNode, toDisplayString, Fragment, renderSlot } from "vue";
2
+ import { u as useIntl, p as _sfc_main$2, e as _sfc_main$3, _ as _sfc_main$4, q as _sfc_main$5 } from "./vendor-ui-BoGKOJ36.mjs";
3
+ import { g as getMostRecentPricingPlan, a as getSubscriptionName, f as findPricingsByIds } from "./subscription-B4dBAY9C.mjs";
4
+ const _hoisted_1$1 = { class: "flex flex-row gap-3 px-3 py-2" };
5
+ const _hoisted_2 = { class: "grow" };
6
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
7
+ __name: "SubscriptionSummary",
8
+ props: {
9
+ subscription: { type: Object },
10
+ invoice: { type: Object },
11
+ loading: { type: Boolean },
12
+ enabledPricingIds: { type: Array },
13
+ avatar: { type: String },
14
+ trialPeriod: { type: Object }
15
+ },
16
+ setup(__props) {
17
+ const props = __props;
18
+ const { $t } = useIntl();
19
+ const mostRecentPricingPlan = computed(() => getMostRecentPricingPlan(props.subscription));
20
+ const name = computed(
21
+ () => getSubscriptionName({
22
+ subscription: props.subscription,
23
+ fallback: $t({
24
+ defaultMessage: "Subscription",
25
+ description: "The fallback name for when no subscription name can be determined",
26
+ id: "customer_overview.subscriptions_block.fallback_subscription_name"
27
+ })
28
+ })
29
+ );
30
+ const description = computed(
31
+ () => {
32
+ var _a;
33
+ return props.subscription.description || ((_a = mostRecentPricingPlan.value) == null ? void 0 : _a.description);
34
+ }
35
+ );
36
+ const selectedPricings = computed(() => {
37
+ if (!props.subscription || !props.enabledPricingIds) {
38
+ return void 0;
39
+ }
40
+ const pricings = findPricingsByIds(props.subscription, props.enabledPricingIds);
41
+ const names = pricings == null ? void 0 : pricings.map((pricing) => {
42
+ var _a, _b;
43
+ return pricing.name ?? ((_b = (_a = pricing.products) == null ? void 0 : _a[0]) == null ? void 0 : _b.name);
44
+ }).join(" - ");
45
+ return names;
46
+ });
47
+ return (_ctx, _cache) => {
48
+ return openBlock(), createElementBlock("div", _hoisted_1$1, [
49
+ __props.avatar ? (openBlock(), createBlock(unref(_sfc_main$2), {
50
+ key: 0,
51
+ "image-src": __props.avatar,
52
+ size: "lg",
53
+ class: "my-1"
54
+ }, null, 8, ["image-src"])) : createCommentVNode("", true),
55
+ createElementVNode("div", _hoisted_2, [
56
+ createVNode(unref(_sfc_main$3), {
57
+ variant: "body",
58
+ weight: "semibold",
59
+ "no-spacing": ""
60
+ }, {
61
+ default: withCtx(() => [
62
+ createTextVNode(toDisplayString(name.value), 1)
63
+ ]),
64
+ _: 1
65
+ }),
66
+ selectedPricings.value ? (openBlock(), createBlock(unref(_sfc_main$3), {
67
+ key: 0,
68
+ variant: "body-xs",
69
+ shade: "lighter",
70
+ "no-spacing": ""
71
+ }, {
72
+ default: withCtx(() => [
73
+ createTextVNode(toDisplayString(selectedPricings.value), 1)
74
+ ]),
75
+ _: 1
76
+ })) : createCommentVNode("", true),
77
+ description.value ? (openBlock(), createBlock(unref(_sfc_main$3), {
78
+ key: 1,
79
+ variant: "body-xs",
80
+ shade: "lighter",
81
+ "no-spacing": ""
82
+ }, {
83
+ default: withCtx(() => [
84
+ selectedPricings.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
85
+ createTextVNode(" • ")
86
+ ], 64)) : createCommentVNode("", true),
87
+ createTextVNode(" " + toDisplayString(description.value), 1)
88
+ ]),
89
+ _: 1
90
+ })) : createCommentVNode("", true)
91
+ ])
92
+ ]);
93
+ };
94
+ }
95
+ });
96
+ const _hoisted_1 = { class: "sv-empty-state__body flex flex-col items-center justify-center py-4" };
97
+ const _sfc_main = /* @__PURE__ */ defineComponent({
98
+ __name: "EmptyStatePlaceholder",
99
+ props: {
100
+ icon: { type: null }
101
+ },
102
+ setup(__props) {
103
+ return (_ctx, _cache) => {
104
+ return openBlock(), createBlock(unref(_sfc_main$4), { class: "sv-empty-state" }, {
105
+ default: withCtx(() => [
106
+ createElementVNode("div", _hoisted_1, [
107
+ createVNode(unref(_sfc_main$5), {
108
+ icon: __props.icon,
109
+ size: "lg",
110
+ class: "sv-empty-state__icon text-gray-500"
111
+ }, null, 8, ["icon"]),
112
+ createVNode(unref(_sfc_main$3), {
113
+ center: "",
114
+ tag: "span",
115
+ variant: "body-sm",
116
+ weight: "semibold",
117
+ shade: "lighter",
118
+ class: "sv-empty-state__title mt-2"
119
+ }, {
120
+ default: withCtx(() => [
121
+ renderSlot(_ctx.$slots, "title")
122
+ ]),
123
+ _: 3
124
+ }),
125
+ createVNode(unref(_sfc_main$3), {
126
+ center: "",
127
+ tag: "span",
128
+ variant: "body-xs",
129
+ shade: "lightest",
130
+ class: "sv-empty-state__message mt-1"
131
+ }, {
132
+ default: withCtx(() => [
133
+ renderSlot(_ctx.$slots, "message")
134
+ ]),
135
+ _: 3
136
+ })
137
+ ])
138
+ ]),
139
+ _: 3
140
+ });
141
+ };
142
+ }
143
+ });
144
+ export {
145
+ _sfc_main$1 as _,
146
+ _sfc_main as a
147
+ };
@@ -1 +1 @@
1
- const e=require("vue"),i=require("./vendor-ui-C3Tq-qY_.js"),t={key:0,class:"sv-invoice-details__body flex flex-col gap-2"},o={class:"sv-invoice-details__row"},a={class:"sv-invoice-details__row"},n=e.defineComponent({__name:"InvoiceDetailsBlock",props:{invoice:{type:Object}},setup(n){const{$t:c,formatDate:s}=i.useIntl();return(d,l)=>(e.openBlock(),e.createBlock(e.unref(i._sfc_main),{class:"sv-invoice-details",title:e.unref(c)({defaultMessage:"Invoice details",description:"Title for the invoice details block on the invoice overview page",id:"sdk.invoice_details.invoice_details_block.title"})},{default:e.withCtx(()=>[n.invoice?(e.openBlock(),e.createElementBlock("div",t,[e.createElementVNode("div",o,[e.createVNode(e.unref(i._sfc_main$3),{variant:"caps-heading",class:"sv-invoice-details__label"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)({defaultMessage:"Invoice date",description:"Title for the invoice date in invoice details block on the invoice overview page",id:"sdk.invoice_details.invoice_details_block.invoice_date"})),1)]),_:1}),n.invoice.invoice_date?(e.openBlock(),e.createBlock(e.unref(i._sfc_main$3),{key:0,variant:"body-xs",class:"sv-invoice-details__value"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({date:n.invoice.invoice_date,format:"date",timezone:n.invoice.customer.timezone,offsetType:"offsetted"})),1)]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",a,[e.createVNode(e.unref(i._sfc_main$3),{variant:"caps-heading",class:"sv-invoice-details__label"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)({defaultMessage:"Due date",description:"Title for the due date in invoice details block on the invoice overview page",id:"sdk.invoice_details.invoice_details_block.due_date"})),1)]),_:1}),n.invoice.due_date?(e.openBlock(),e.createBlock(e.unref(i._sfc_main$3),{key:0,variant:"body-xs",class:"sv-invoice-details__value"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({date:n.invoice.due_date,format:"date",timezone:n.invoice.customer.timezone,offsetType:"offsetted"})),1)]),_:1})):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]),_:1},8,["title"]))}});exports._sfc_main=n;
1
+ const e=require("vue"),i=require("./vendor-ui-BuRqLx74.js"),t={key:0,class:"sv-invoice-details__body flex flex-col gap-2"},o={class:"sv-invoice-details__row"},a={class:"sv-invoice-details__row"},n=e.defineComponent({__name:"InvoiceDetailsBlock",props:{invoice:{type:Object}},setup(n){const{$t:c,formatDate:s}=i.useIntl();return(d,l)=>(e.openBlock(),e.createBlock(e.unref(i._sfc_main),{class:"sv-invoice-details",title:e.unref(c)({defaultMessage:"Invoice details",description:"Title for the invoice details block on the invoice overview page",id:"sdk.invoice_details.invoice_details_block.title"})},{default:e.withCtx(()=>[n.invoice?(e.openBlock(),e.createElementBlock("div",t,[e.createElementVNode("div",o,[e.createVNode(e.unref(i._sfc_main$3),{variant:"caps-heading",class:"sv-invoice-details__label"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)({defaultMessage:"Invoice date",description:"Title for the invoice date in invoice details block on the invoice overview page",id:"sdk.invoice_details.invoice_details_block.invoice_date"})),1)]),_:1}),n.invoice.invoice_date?(e.openBlock(),e.createBlock(e.unref(i._sfc_main$3),{key:0,variant:"body-xs",class:"sv-invoice-details__value"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({date:n.invoice.invoice_date,format:"date",timezone:n.invoice.customer.timezone,offsetType:"offsetted"})),1)]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",a,[e.createVNode(e.unref(i._sfc_main$3),{variant:"caps-heading",class:"sv-invoice-details__label"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)({defaultMessage:"Due date",description:"Title for the due date in invoice details block on the invoice overview page",id:"sdk.invoice_details.invoice_details_block.due_date"})),1)]),_:1}),n.invoice.due_date?(e.openBlock(),e.createBlock(e.unref(i._sfc_main$3),{key:0,variant:"body-xs",class:"sv-invoice-details__value"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({date:n.invoice.due_date,format:"date",timezone:n.invoice.customer.timezone,offsetType:"offsetted"})),1)]),_:1})):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]),_:1},8,["title"]))}});exports._sfc_main=n;
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, openBlock, createBlock, unref, withCtx, createElementBlock, createElementVNode, createVNode, createTextVNode, toDisplayString, createCommentVNode } from "vue";
2
- import { u as useIntl, _ as _sfc_main$1, e as _sfc_main$2 } from "./vendor-ui-B8IlviSs.mjs";
2
+ import { u as useIntl, _ as _sfc_main$1, e as _sfc_main$2 } from "./vendor-ui-BoGKOJ36.mjs";
3
3
  const _hoisted_1 = {
4
4
  key: 0,
5
5
  class: "sv-invoice-details__body flex flex-col gap-2"
@@ -1 +1 @@
1
- const e=require("vue"),o=require("./vendor-ui-C3Tq-qY_.js"),n=e.defineComponent({__name:"InvoiceHeader",props:{isLoading:{type:Boolean},invoice:{type:Object},payments:{type:Array},invoiceDownloadService:{type:Function},configuration:{type:Object}},setup:n=>(i,t)=>(e.openBlock(),e.createBlock(e.unref(o._sfc_main$2),{class:"sv-invoice-header sv-root sv-component","payment-attempts":n.payments??[],invoice:n.invoice,"download-service":()=>n.invoiceDownloadService(n.invoice.id),"show-download-button":n.configuration.enableDownloadButton,variant:"external"},null,8,["payment-attempts","invoice","download-service","show-download-button"]))});exports._sfc_main=n;
1
+ const e=require("vue"),o=require("./vendor-ui-BuRqLx74.js"),n=e.defineComponent({__name:"InvoiceHeader",props:{isLoading:{type:Boolean},invoice:{type:Object},payments:{type:Array},invoiceDownloadService:{type:Function},configuration:{type:Object}},setup:n=>(i,t)=>(e.openBlock(),e.createBlock(e.unref(o._sfc_main$2),{class:"sv-invoice-header sv-root sv-component","payment-attempts":n.payments??[],invoice:n.invoice,"download-service":()=>n.invoiceDownloadService(n.invoice.id),"show-download-button":n.configuration.enableDownloadButton,variant:"external"},null,8,["payment-attempts","invoice","download-service","show-download-button"]))});exports._sfc_main=n;
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, openBlock, createBlock, unref } from "vue";
2
- import { d as _sfc_main$1 } from "./vendor-ui-B8IlviSs.mjs";
2
+ import { d as _sfc_main$1 } from "./vendor-ui-BoGKOJ36.mjs";
3
3
  const _sfc_main = /* @__PURE__ */ defineComponent({
4
4
  __name: "InvoiceHeader",
5
5
  props: {
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "./PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-tM7f_fQS.mjs";
1
+ import { _ as _sfc_main } from "./PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-C3ZUDUdw.mjs";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CixdxEGm.js");exports.default=e._sfc_main;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CMGK71zZ.js");exports.default=e._sfc_main;
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, openBlock, createElementBlock, createVNode, unref, withCtx, createTextVNode, toDisplayString, createElementVNode, Fragment, renderList, createBlock, createCommentVNode } from "vue";
2
- import { u as useIntl, e as _sfc_main$1, _ as _sfc_main$2, k as _sfc_main$3, l as formatEnum, m as _sfc_main$4 } from "./vendor-ui-B8IlviSs.mjs";
2
+ import { u as useIntl, e as _sfc_main$1, _ as _sfc_main$2, l as _sfc_main$3, m as formatEnum, n as _sfc_main$4 } from "./vendor-ui-BoGKOJ36.mjs";
3
3
  const _hoisted_1 = { class: "sv-payment-history" };
4
4
  const _hoisted_2 = { class: "sv-payment-history__items flex flex-col-reverse gap-1" };
5
5
  const _hoisted_3 = { class: "sv-payment-history__item-header mb-2 flex items-center justify-between" };
@@ -1 +1 @@
1
- const e=require("vue"),t=require("./vendor-ui-C3Tq-qY_.js"),a={class:"sv-payment-history"},n={class:"sv-payment-history__items flex flex-col-reverse gap-1"},s={class:"sv-payment-history__item-header mb-2 flex items-center justify-between"},r=e.defineComponent({__name:"PaymentHistoryBlock",props:{paymentAttempts:{type:Array},customer:{type:Object}},setup(r){const{$t:o,formatDate:i}=t.useIntl(),m={AUTHORIZED:"green",CANCELLED:"red",ERROR:"red",PENDING:"orange",PENDING_REFUND:"orange",REFUNDED:"orange",CHARGED_BACK:"orange",REFUSED:"red"};return(c,l)=>(e.openBlock(),e.createElementBlock("div",a,[e.createVNode(e.unref(t._sfc_main$3),{tag:"h2",variant:"heading-3",class:"sv-payment-history__title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Payment history",description:"Title for the payment history block on the invoice details page",id:"sdk.invoice_details.payment_history.title"})),1)]),_:1}),e.createElementVNode("div",n,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.paymentAttempts,a=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:a.id,class:"sv-payment-history__item mt-1 md:mt-2"},{default:e.withCtx(()=>[e.createElementVNode("div",s,[e.createVNode(e.unref(t._sfc_main$3),{variant:"caps-heading",class:"sv-payment-history__item-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Payment attempt",description:"Title for the payment attempt block",id:"sdk.invoice_details.payment_history.payment_attempt"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$5),{class:"sv-payment-history__item-status",color:m[a.result]},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t.formatEnum)(a.result)),1)]),_:2},1032,["color"])]),a.payment_method_details?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$6),{key:0,class:"sv-payment-history__payment-method","payment-method":a.payment_method_details},{description:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({date:a.created_at,format:"dateTime",offsetType:"offsetted",timezone:r.customer.timezone})),1)]),_:2},1032,["payment-method"])):e.createCommentVNode("",!0)]),_:2},1024))),128))])]))}});exports._sfc_main=r;
1
+ const e=require("vue"),t=require("./vendor-ui-BuRqLx74.js"),a={class:"sv-payment-history"},n={class:"sv-payment-history__items flex flex-col-reverse gap-1"},s={class:"sv-payment-history__item-header mb-2 flex items-center justify-between"},r=e.defineComponent({__name:"PaymentHistoryBlock",props:{paymentAttempts:{type:Array},customer:{type:Object}},setup(r){const{$t:o,formatDate:i}=t.useIntl(),m={AUTHORIZED:"green",CANCELLED:"red",ERROR:"red",PENDING:"orange",PENDING_REFUND:"orange",REFUNDED:"orange",CHARGED_BACK:"orange",REFUSED:"red"};return(c,l)=>(e.openBlock(),e.createElementBlock("div",a,[e.createVNode(e.unref(t._sfc_main$3),{tag:"h2",variant:"heading-3",class:"sv-payment-history__title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Payment history",description:"Title for the payment history block on the invoice details page",id:"sdk.invoice_details.payment_history.title"})),1)]),_:1}),e.createElementVNode("div",n,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.paymentAttempts,a=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:a.id,class:"sv-payment-history__item mt-1 md:mt-2"},{default:e.withCtx(()=>[e.createElementVNode("div",s,[e.createVNode(e.unref(t._sfc_main$3),{variant:"caps-heading",class:"sv-payment-history__item-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Payment attempt",description:"Title for the payment attempt block",id:"sdk.invoice_details.payment_history.payment_attempt"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$5),{class:"sv-payment-history__item-status",color:m[a.result]},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t.formatEnum)(a.result)),1)]),_:2},1032,["color"])]),a.payment_method_details?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$6),{key:0,class:"sv-payment-history__payment-method","payment-method":a.payment_method_details},{description:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({date:a.created_at,format:"dateTime",offsetType:"offsetted",timezone:r.customer.timezone})),1)]),_:2},1032,["payment-method"])):e.createCommentVNode("",!0)]),_:2},1024))),128))])]))}});exports._sfc_main=r;
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "./PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CrGSfZZs.mjs";
1
+ import { _ as _sfc_main } from "./PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-B_yDNGK8.mjs";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BBEM-YPz.js");exports.default=e._sfc_main;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-GN3WAr10.js");exports.default=e._sfc_main;
@@ -1,9 +1,9 @@
1
1
  import { defineComponent, ref, onMounted, onBeforeUnmount, watch, openBlock, createElementBlock, computed, createBlock, withCtx, unref, createVNode, createTextVNode, toDisplayString, createCommentVNode, createElementVNode, inject, Fragment, renderList } from "vue";
2
- import { n as isEqual, u as useIntl, e as _sfc_main$7, A as _sfc_main$8, B as formatAmount, c as _sfc_main$9, W as _sfc_main$a } from "./vendor-ui-B8IlviSs.mjs";
3
- import { t as toMinorUnitAmount, _ as _sfc_main$6, c as createReturnUrl, g as getQueryParam, P as PAYMENT_ACCEPTOR_ID_QUERY_STRING, m as mapAdyenPaymentMethods, a as getAdyenEnvironmentFromPaymentMethodOptionsResponse, b as getAdyenClientKeyFromPaymentMethodOptionsResponse, R as REDIRECT_RESULT_QUERY_STRING, d as transformObjectToAdyenObject } from "./url-1Lbg5Yni.mjs";
4
- import { c as createPaymentsService } from "./payments-CpzTVrQM.mjs";
5
- import { c as createPaymentMethodsService } from "./paymentMethods-DvqlWe96.mjs";
6
- import { a as useLogger, E as EXPERIMENTAL_FEATURE_INJECTION_KEY } from "./component-Bg2JVC_O.mjs";
2
+ import { r as isEqual, u as useIntl, e as _sfc_main$7, q as _sfc_main$8, E as formatAmount, c as _sfc_main$9, a8 as _sfc_main$a } from "./vendor-ui-BoGKOJ36.mjs";
3
+ import { t as toMinorUnitAmount, _ as _sfc_main$6, c as createReturnUrl, g as getQueryParam, P as PAYMENT_ACCEPTOR_ID_QUERY_STRING, m as mapAdyenPaymentMethods, a as getAdyenEnvironmentFromPaymentMethodOptionsResponse, b as getAdyenClientKeyFromPaymentMethodOptionsResponse, R as REDIRECT_RESULT_QUERY_STRING, d as transformObjectToAdyenObject } from "./url-BjZ1Pg0l.mjs";
4
+ import { c as createPaymentsService } from "./payments-DV6csRej.mjs";
5
+ import { c as createPaymentMethodsService } from "./paymentMethods-xzFD2L30.mjs";
6
+ import { a as useLogger, E as EXPERIMENTAL_FEATURE_INJECTION_KEY } from "./component-CUJ_G2Nw.mjs";
7
7
  const isAdyenPaymentIntegration = (paymentMethodOption) => {
8
8
  var _a;
9
9
  return ((_a = paymentMethodOption.integration.payment_gateway) == null ? void 0 : _a.variant) === "ADYEN";
@@ -0,0 +1 @@
1
+ const e=require("vue"),t=require("./vendor-ui-BuRqLx74.js"),n=require("./url-D8GJi5rF.js"),a=require("./payments-DMvmB5vg.js"),o=require("./paymentMethods-BMcc-eTl.js"),r=require("./component-CiKxWtdx.js"),i=e=>{var t;return"ADYEN"===(null==(t=e.integration.payment_gateway)?void 0:t.variant)},s=e=>{var t;return"STRIPE"===(null==(t=e.integration.payment_gateway)?void 0:t.variant)},c=({selectedIntegration:e,paymentMethodOption:t})=>{var n,a;return e===(null==(a=null==(n=t.integration)?void 0:n.payment_gateway)?void 0:a.variant)},d="https://js.stripe.com/dahlia/stripe.js",m=`<!DOCTYPE html>\n<html>\n<head>\n<meta charset="UTF-8">\n<meta name="viewport" content="width=device-width, initial-scale=1">\n<style>\n* { box-sizing: border-box; margin: 0; padding: 0; }\nbody { overflow: hidden; }\n</style>\n</head>\n<body>\n<div id="stripe-root"></div>\n<script src="${d}"><\/script>\n<script>\n(function () {\n let stripe, elements, countryCode, email, name, parentOrigin;\n\n window.addEventListener('message', function (event) {\n if (!event.data || typeof event.data !== 'object') return;\n if (event.source !== window.parent) return;\n\n if (event.data.type === 'stripe:init') {\n parentOrigin = event.origin;\n countryCode = event.data.countryCode;\n email = event.data.email;\n name = event.data.name;\n stripe = Stripe(event.data.publicKey);\n elements = stripe.elements(event.data.options);\n const paymentElement = elements.create('payment', { layout: { type: 'accordion', defaultCollapsed: false }, wallets: event.data.options.wallets, fields: event.data.options.fields });\n\n paymentElement.on('ready', function () {\n parent.postMessage({ type: 'stripe:ready' }, parentOrigin);\n });\n\n paymentElement.on('change', function (e) {\n parent.postMessage({ type: 'stripe:change', paymentMethodType: e.value.type }, parentOrigin);\n });\n\n paymentElement.on('loaderror', function (e) {\n parent.postMessage({\n type: 'stripe:loaderror',\n error: { message: e.error.message, type: e.error.type }\n }, parentOrigin);\n });\n\n paymentElement.mount('#stripe-root');\n\n new ResizeObserver(function () {\n parent.postMessage({\n type: 'stripe:resize',\n height: document.documentElement.scrollHeight\n }, parentOrigin);\n }).observe(document.documentElement);\n }\n\n if (event.data.type === 'stripe:submit') {\n if (!elements || !parentOrigin || event.origin !== parentOrigin) return;\n const submitEmail = 'email' in event.data ? event.data.email : email;\n const submitName = 'name' in event.data ? event.data.name : name;\n elements.submit().then(function (submitResult) {\n if (submitResult.error) {\n parent.postMessage({\n type: 'stripe:submit:error',\n error: {\n message: submitResult.error.message,\n type: submitResult.error.type,\n code: submitResult.error.code\n }\n }, parentOrigin);\n return;\n }\n const billingDetails = {};\n if (countryCode) billingDetails.address = { country: countryCode };\n if (submitEmail) billingDetails.email = submitEmail;\n if (submitName) billingDetails.name = submitName;\n const tokenParams = Object.keys(billingDetails).length\n ? { payment_method_data: { billing_details: billingDetails } }\n : {};\n stripe.createConfirmationToken({ elements: elements, params: tokenParams }).then(function (tokenResult) {\n if (tokenResult.error) {\n parent.postMessage({\n type: 'stripe:submit:error',\n error: {\n message: tokenResult.error.message,\n type: tokenResult.error.type,\n code: tokenResult.error.code\n }\n }, parentOrigin);\n return;\n }\n parent.postMessage({\n type: 'stripe:submit:success',\n confirmationTokenId: tokenResult.confirmationToken.id\n }, parentOrigin);\n });\n });\n }\n });\n})();\n<\/script>\n</body>\n</html>`,u=["src","height"],p=e.defineComponent({__name:"PaymentIntegrationFormStripeFrame",props:{publicKey:{type:String},options:{type:Object},countryCode:{type:String},email:{type:String},name:{type:String}},emits:["ready","change","loaderror","submit-success","submit-error"],setup(n,{expose:a,emit:o}){const r=n,i=o;a({triggerSubmit:function(){var e,t;null==(t=null==(e=s.value)?void 0:e.contentWindow)||t.postMessage({type:"stripe:submit",email:r.email,name:r.name},"*")}});const s=e.ref(),c=e.ref(0),d=e.ref();function p(){var e,t;null==(t=null==(e=s.value)?void 0:e.contentWindow)||t.postMessage({type:"stripe:init",publicKey:r.publicKey,options:r.options,countryCode:r.countryCode,email:r.email,name:r.name},"*")}function l(e){return"object"==typeof e&&null!==e}function y(e){if(!s.value||e.source!==s.value.contentWindow)return;if(!l(e.data))return;const t=e.data,n=t.type;if("string"==typeof n&&n.startsWith("stripe:"))switch(n){case"stripe:ready":i("ready");break;case"stripe:change":i("change","string"==typeof t.paymentMethodType?t.paymentMethodType:"card");break;case"stripe:loaderror":{const e=l(t.error)?t.error:{};i("loaderror",{message:"string"==typeof e.message?e.message:void 0,type:"string"==typeof e.type?e.type:void 0});break}case"stripe:resize":"number"==typeof t.height&&(c.value=t.height);break;case"stripe:submit:success":"string"==typeof t.confirmationTokenId&&i("submit-success",t.confirmationTokenId);break;case"stripe:submit:error":{const e=l(t.error)?t.error:{};i("submit-error",{message:"string"==typeof e.message?e.message:void 0,type:"string"==typeof e.type?e.type:void 0,code:"string"==typeof e.code?e.code:void 0});break}}}return e.onMounted(()=>{const e=new Blob([m],{type:"text/html"});d.value=URL.createObjectURL(e),window.addEventListener("message",y)}),e.onBeforeUnmount(()=>{window.removeEventListener("message",y),d.value&&URL.revokeObjectURL(d.value)}),e.watch(()=>r.options,(e,n)=>{t.isEqual(e,n)||p()},{deep:!0}),(t,n)=>(e.openBlock(),e.createElementBlock("iframe",{ref_key:"iframeRef",ref:s,src:d.value,height:c.value||void 0,frameborder:"0",style:{width:"100%",display:"block",border:"none"},title:"Payment form",onLoad:p},null,40,u))}}),l={link:"never"},y={variables:{borderRadius:"4px",colorBackground:"rgba(243, 244, 246, 0.5)"},rules:{".TermsText":{fontSize:"14px"},".Input":{backgroundColor:"rgba(243, 244, 246, 0.5)",fontSize:"14px",borderColor:"rgb(229, 231, 235)"}}};const h=e.defineComponent({__name:"PaymentCompletedCard",props:{amount:{type:Object},variant:{type:String}},setup(a){const o=a,{$t:r}=t.useIntl(),i=e.computed(()=>"AUTHORIZE"===o.variant?r({defaultMessage:"Payment successful",description:"The title for when a payment has been successful",id:"payment_completed_card.title.authorize"}):r({defaultMessage:"Your payment method is added",description:"The title for when a payment method was successfully added",id:"payment_completed_card.title.tokenize"}));return(o,s)=>(e.openBlock(),e.createBlock(n._sfc_main,{status:"success",title:i.value},{default:e.withCtx(()=>[a.amount?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$3),{key:0,variant:"body-sm",class:"mt-1"},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$9),{icon:"check"}),e.createTextVNode(e.toDisplayString(e.unref(t.formatAmount)(a.amount)),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(t._sfc_main$3),{variant:"body-xs",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"You are being redirected...",description:"The text shown after a successful message before a redirect",id:"payment_completed_card.redirect_message"})),1)]),_:1})]),_:1},8,["title"]))}}),f={UNKNOWN_ERROR:{title:"Something went wrong",message:"An unknown error has occurred",isReloadButtonVisible:!0},AUTHORIZATION_FAILED:{title:"Payment failed",message:"The payment failed"},PAYMENT_DETAILS_CALL_FAILED:{title:"Payment details call failed",message:"There was a problem getting the payment details"},PAYMENT_METHOD_STORAGE_FAILED:{title:"Failed storing payment method",message:"Something went wrong with storing the payment method"},REDIRECT_RESULT_PAYMENT_ACCEPTOR_MISSING:{title:"Missing payment acceptor",message:"A redirect result is set, but a payment acceptor is missing in the url"},TOKENIZE_FAILED:{title:"Tokenization failed",message:"The tokenization of the payment method has failed"},PAYMENT_INTEGRATION_INITIALIZATION_FAILED:{title:"Failed loading payment methods",message:"Failed loading payment integration",isReloadButtonVisible:!0},RESOURCE_REVOKED:{title:"Resource revoked",message:"The resource has been revoked",isReloadButtonVisible:!0}},_={class:"flex flex-col items-center gap-6"},g=e.defineComponent({__name:"PaymentErrorCard",props:{error:{type:Object}},setup(a){const o=a,{$t:r}=t.useIntl(),i=e.computed(()=>f[o.error.code]),s=()=>{window.location.reload()};return(a,o)=>(e.openBlock(),e.createBlock(n._sfc_main,{status:"error",title:i.value.title},{default:e.withCtx(()=>[e.createElementVNode("div",_,[e.createVNode(e.unref(t._sfc_main$3),{variant:"body-xs",shade:"lighter",class:"mt-3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.message),1)]),_:1}),i.value.isReloadButtonVisible?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:0,type:"button",color:"gray",variant:"outline",onClick:s},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Try again",description:"Retry button text when an error has happened during a payment",id:"payments.retry_button.label"})),1)]),_:1})):e.createCommentVNode("",!0)])]),_:1},8,["title"]))}}),v="STRIPE",E=e.defineComponent({__name:"PaymentIntegrationFormStripe",props:{countryCode:{type:String},customerId:{type:String},invoiceId:{type:String},paymentMethodOptionResponseEntry:{type:Object},variant:{type:String},selected:{type:Boolean},amount:{type:Object},validateOnSubmit:{type:Function,default:()=>Promise.resolve(!0)},context:{type:Object},email:{type:String},name:{type:String},forceStorePaymentMethod:{type:Boolean}},emits:["select","payment-failed","payment-success","ready"],setup(t,{expose:i,emit:s}){const c=t,m=s;i({submit:function(){(async function(){var e;if(!(await c.validateOnSubmit()))return;null==(e=_.value)||e.triggerSubmit()})().catch(e=>{R.error("STRIPE_SUBMIT_FAILED","Unexpected error during Stripe submission",{},e)})}});const u=e.ref(!1),f=e.ref(),_=e.ref(),E=e.computed(()=>function({amount:e,email:t,name:a,variant:o}){const r=e.currency.toLowerCase(),i=function(e,t){return{billingDetails:{address:{country:"never"},...e?{email:"never"}:{},...t?{name:"never"}:{}}}}(t,a);return"TOKENIZE"===o?{mode:"setup",currency:r,setup_future_usage:"off_session",wallets:l,fields:i,appearance:y}:{mode:"payment",currency:r,amount:n.toMinorUnitAmount(e).value,setup_future_usage:"off_session",wallets:l,fields:i,appearance:y}}({amount:c.amount,email:c.email,name:c.name,variant:c.variant})),b=e.ref(null),R=r.useLogger(),{authorizePayment:I}=a.createPaymentsService(),{tokenizePaymentMethod:k}=o.createPaymentMethodsService(),O=e.computed(()=>{var e,t;return null==(t=null==(e=c.paymentMethodOptionResponseEntry.integration.payment_gateway)?void 0:e.stripe)?void 0:t.public_key});async function T(){if(b.value)return b.value;const e=O.value;if(!e)throw new Error("Missing Stripe public key");const t=await function(e){return new Promise((t,n)=>{if(window.Stripe)return void t(window.Stripe(e));const a=document.createElement("script");a.src=d,a.onload=()=>{window.Stripe?t(window.Stripe(e)):n(new Error("Stripe not available after script load"))},a.onerror=()=>n(new Error("Failed to load Stripe.js")),document.head.appendChild(a)})}(e);return b.value=t,t}async function A(e){const t=c.paymentMethodOptionResponseEntry.payment_acceptor.id,a=n.createReturnUrl({paymentAcceptorId:t,redirectUrl:window.location.href});if("AUTHORIZE"!==c.variant){if("TOKENIZE"===c.variant){if(!c.customerId)return void R.error("TOKENIZATION_FAILED",`Missing customer id for payment acceptor with id ${t}`);try{const n=await k({customer_id:c.customerId,payment_acceptor_id:t,payment_gateway_variant:v,stripe:{confirmation_token_id:e},return_url:a});await N(n)}catch(o){R.error("TOKENIZATION_FAILED",`Tokenization failed for payment acceptor with id ${t}`,{error:o}),S({code:"UNKNOWN_ERROR",message:"Tokenization failed",error:o})}}}else try{const n=await I({payment_acceptor_id:t,...c.customerId?{customer_id:c.customerId}:{},payment_gateway_variant:v,stripe:{confirmation_token_id:e},amount:c.amount,...c.context&&"CHARGE_ON_DEMAND"!==c.context.type?{context:c.context}:{},return_url:a});await N(n)}catch(o){R.error("PAYMENT_AUTHORIZATION_FAILED",`Failed payment authorization for payment acceptor with id ${t}`,{error:o}),S({code:"UNKNOWN_ERROR",message:"Payment authorization failed",error:o})}}async function N(e){var t;if("ACTION_REQUIRED"===e.status&&e.action.payment_gateway_variant===v){const a=e.action.client_secret||(null==(t=e.action.data)?void 0:t.client_secret);if(!a)return R.error("STRIPE_ACTION_FAILED","Missing client_secret in Stripe ACTION_REQUIRED response"),void S({code:"UNKNOWN_ERROR",message:"Payment action failed",error:e});let o;try{o=await T()}catch(n){return R.error("STRIPE_ACTION_FAILED","Failed to load Stripe.js",{error:n}),void S({code:"UNKNOWN_ERROR",message:"Payment action failed",error:n})}const{error:r}=await o.handleNextAction({clientSecret:a});return r?(R.error("STRIPE_ACTION_FAILED","Stripe handleNextAction failed",{error:r}),void S({code:"UNKNOWN_ERROR",message:"Payment action failed",error:r})):(u.value=!0,void m("payment-success"))}if("SUCCESS"===e.status)return u.value=!0,void m("payment-success");R.error("STRIPE_ACTION_FAILED","Unexpected payment result status",{error:e}),S({code:"UNKNOWN_ERROR",message:"Payment failed",error:e})}function P(){m("select",{paymentMethodType:"card",paymentGatewayVariant:v}),m("ready")}function w(e){S({code:"UNKNOWN_ERROR",message:e.message??"Failed to load payment form",error:e})}function S(e){f.value=e,m("payment-failed",e)}return e.onMounted(()=>{(async function(){const e=c.paymentMethodOptionResponseEntry.payment_acceptor.id;if(n.getQueryParam(n.PAYMENT_ACCEPTOR_ID_QUERY_STRING)!==e)return;const t=n.getQueryParam("redirect_status"),a=n.getQueryParam("payment_intent_client_secret"),o=n.getQueryParam("setup_intent_client_secret");if(t&&(a||o)){if("succeeded"===t)return u.value=!0,void m("payment-success");R.error("STRIPE_REDIRECT_RETURN_FAILED","Stripe redirect returned non-succeeded status",{redirectStatus:t}),S({code:"UNKNOWN_ERROR",message:"Payment failed",error:new globalThis.Error(`Stripe redirect returned status: ${t}`)})}})().catch(e=>{R.error("STRIPE_REDIRECT_RETURN_FAILED","handleRedirectReturn threw unexpectedly",{error:e})})}),e.onBeforeUnmount(()=>{b.value=null}),(n,a)=>u.value?(e.openBlock(),e.createBlock(h,{key:0,variant:t.variant},null,8,["variant"])):f.value?(e.openBlock(),e.createBlock(g,{key:1,error:f.value},null,8,["error"])):O.value?(e.openBlock(),e.createBlock(p,{key:2,ref_key:"frameRef",ref:_,"public-key":O.value,options:E.value,"country-code":t.countryCode,email:t.email,name:t.name,onReady:P,onChange:a[0]||(a[0]=e=>m("select",{paymentMethodType:e,paymentGatewayVariant:v})),onLoaderror:w,onSubmitSuccess:A,onSubmitError:a[1]||(a[1]=t=>e.unref(R).error("STRIPE_CONFIRMATION_TOKEN_FAILED","Stripe submission failed",{error:t}))},null,8,["public-key","options","country-code","email","name"])):e.createCommentVNode("",!0)}}),b=e=>{let t={};return"TOKENIZE"===e&&(t={"en-US":{payButton:"Add payment method",confirmPurchase:"Add payment method"},"fr-FR":{payButton:"Ajouter un moyen de paiement",confirmPurchase:"Ajouter un moyen de paiement"},"de-DE":{payButton:"Zahlungsmethode hinzufügen",confirmPurchase:"Zahlungsmethode hinzufügen"},"it-IT":{payButton:"Aggiungi metodo di pagamento",confirmPurchase:"Aggiungi metodo di pagamento"},"es-ES":{payButton:"Añadir método de pago",confirmPurchase:"Añadir método de pago"},"nl-NL":{payButton:"Betaalmethode toevoegen",confirmPurchase:"Betaalmethode toevoegen"},"pt-BR":{payButton:"Adicionar método de pagamento",confirmPurchase:"Adicionar método de pagamento"},"pt-PT":{payButton:"Adicionar método de pagamento",confirmPurchase:"Adicionar método de pagamento"},"pl-PL":{payButton:"Dodaj metodę płatności",confirmPurchase:"Dodaj metodę płatności"},"ru-RU":{payButton:"Добавить способ оплаты",confirmPurchase:"Добавить способ оплаты"},"sv-SE":{payButton:"Lägg till betalningsmetod",confirmPurchase:"Lägg till betalningsmetod"},"da-DK":{payButton:"Tilføj betalingsmetode",confirmPurchase:"Tilføj betalingsmetode"},"fi-FI":{payButton:"Lisää maksutapa",confirmPurchase:"Lisää maksutapa"},"no-NO":{payButton:"Legg til betalingsmetode",confirmPurchase:"Legg til betalingsmetode"},"cs-CZ":{payButton:"Přidat platební metodu",confirmPurchase:"Přidat platební metodu"},"hu-HU":{payButton:"Fizetési mód hozzáadása",confirmPurchase:"Fizetési mód hozzáadása"},"ro-RO":{payButton:"Adăugați metodă de plată",confirmPurchase:"Adăugați metodă de plată"},"ja-JP":{payButton:"支払い方法を追加",confirmPurchase:"支払い方法を追加"},"ko-KR":{payButton:"결제 수단 추가",confirmPurchase:"결제 수단 추가"},"zh-CN":{payButton:"添加支付方式",confirmPurchase:"添加支付方式"},"zh-TW":{payButton:"新增付款方式",confirmPurchase:"新增付款方式"},ar:{payButton:"إضافة وسيلة دفع",confirmPurchase:"إضافة وسيلة دفع"},"hr-HR":{payButton:"Dodajte način plačanja",confirmPurchase:"Dodajte način plačanja"},"el-GR":{payButton:"Προσθήκη μεθόδου πληρωμής",confirmPurchase:"Προσθήκη μεθόδου πληρωμής"},"sk-SK":{payButton:"Pridať spôsob platby",confirmPurchase:"Pridať spôsob platby"},"sl-SI":{payButton:"Dodajte način plačanja",confirmPurchase:"Dodajte način plačanja"},"bg-BG":{payButton:"Добавяне на начин на плащане",confirmPurchase:"Добавяне на начин на плащане"},"ca-ES":{payButton:"Afegir mètode de pagament",confirmPurchase:"Afegir mètode de pagament"},"et-EE":{payButton:"Lisa makseviis",confirmPurchase:"Lisa makseviis"},"lv-LV":{payButton:"Pievienot maksājuma veidu",confirmPurchase:"Pievienot maksājuma veidu"},"lt-LT":{payButton:"Pridėti mokėjimo metodą",confirmPurchase:"Pridėti mokėjimo metodą"}}),t},R=["applepay"];const I="ADYEN",k=e.defineComponent({__name:"PaymentIntegrationFormAdyen",props:{countryCode:{type:String},customerId:{type:String},invoiceId:{type:String},paymentMethodOptionResponseEntry:{type:Object},variant:{type:String},selected:{type:Boolean},amount:{type:Object},validateOnSubmit:{type:Function,default:()=>Promise.resolve(!0)},context:{type:Object},forceStorePaymentMethod:{type:Boolean}},emits:["select","payment-failed","payment-success","ready"],setup(i,{expose:s,emit:c}){let d=null,m=null;const u=i,p=c;s({submit:function(){try{null==d||d.submit()}catch(e){_.error("ADYEN_SUBMIT_FAILED","Failed to submit Adyen drop-in",{},e)}}});const l=e.ref(),y=e.ref(!1),f=e.ref(),_=r.useLogger(),{locale:v}=t.useIntl(),{authorizePayment:E,getPaymentDetails:k}=a.createPaymentsService(),{tokenizePaymentMethod:O}=o.createPaymentMethodsService(),T=e.inject(r.EXPERIMENTAL_FEATURE_INJECTION_KEY);async function A(){var e;const t=n.toMinorUnitAmount(u.amount),a=(null==(e=null==T?void 0:T.value)?void 0:e["express-checkout"])?function(e){return e.filter(e=>!R.some(t=>{var n;return t===(null==(n=e.type)?void 0:n.toLowerCase())}))}(n.mapAdyenPaymentMethods(u.paymentMethodOptionResponseEntry)):n.mapAdyenPaymentMethods(u.paymentMethodOptionResponseEntry);return{checkoutConfig:{amount:t,clientKey:n.getAdyenClientKeyFromPaymentMethodOptionsResponse(u.paymentMethodOptionResponseEntry),environment:n.getAdyenEnvironmentFromPaymentMethodOptionsResponse(u.paymentMethodOptionResponseEntry,_),locale:v,translations:b(u.variant),countryCode:u.countryCode,analytics:{enabled:!1},paymentMethodsResponse:{paymentMethods:a},onSubmit:w,onAdditionalDetails:C,onPaymentCompleted:B,onPaymentFailed:M,onError:x,showPayButton:!1},dropInConfig:{disableFinalAnimation:!0,paymentMethodsConfiguration:{card:{hasHolderName:!0,holderNameRequired:!0,enableStoreDetails:!u.forceStorePaymentMethod&&"AUTHORIZE"===u.variant},paypal:{intent:t.value>0?"authorize":"tokenize",showPayButton:!0}},openFirstPaymentMethod:u.selected,onSelect:({props:{type:e}})=>{e&&p("select",{paymentMethodType:e,paymentGatewayVariant:"ADYEN"})},onReady:()=>p("ready")}}}async function N(){if(l.value)try{await P();const[e,{default:t}]=await Promise.all([Promise.resolve().then(()=>require("./index-DIFK3mcJ.js")),Promise.resolve().then(()=>require("./adyen-DZsyEXkw.js"))]),{AdyenCheckout:n,Dropin:a,Card:o,Bancontact:r,Ach:i,AmazonPay:s,ApplePay:c,BcmcMobile:p,BacsDirectDebit:y,CashAppPay:h,EPS:f,GooglePay:_,Klarna:g,PayByBank:v,PayPal:E,SepaDirectDebit:b,Trustly:R,Twint:I,PayByBankUS:k,Redirect:O}=e,{checkoutConfig:T,dropInConfig:N}=await A();m=await n(T),d=new a(m,{...N,paymentMethodComponents:[o,r,i,s,c,p,y,h,f,_,g,v,E,b,R,I,k,O]}).mount(l.value),function(e){var t;const n=null==(t=l.value)?void 0:t.getRootNode();if(n instanceof ShadowRoot){const t=document.createElement("style");t.textContent=e,n.appendChild(t);const a=document.createElement("style");a.textContent="\n :host {\n --adyen-sdk-color-background-secondary: transparent;\n --adyen-sdk-color-background-primary: rgb(243 244 246 / 0.5);\n --adyen-sdk-color-outline-secondary: #e5e7eb;\n --adyen-sdk-color-outline-primary: transparent;\n --adyen-sdk-color-background-always-dark: var(--color-primary-500);\n --adyen-sdk-color-background-inverse-primary-hover: var(--color-primary-600);\n }\n\n .adyen-checkout__payment-method__image__wrapper {\n width: 32px;\n height: 32px;\n }\n\n .adyen-checkout__payment-method__image {\n height: 32px;\n }\n\n .adyen-checkout__input-wrapper,\n .adyen-checkout__input {\n border-color: rgb(229, 231, 235);\n border-radius: var(--adyen-sdk-border-radius-s, 4px);\n }\n\n .adyen-checkout__button,\n .adyen-checkout__payment-method {\n border-radius: var(--adyen-sdk-border-radius-s, 4px);\n }\n\n .adyen-checkout__payment-method {\n border-color: rgb(229, 231, 235);\n box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);\n transition: box-shadow 0.2s ease-in-out;\n }\n\n .adyen-checkout__payment-method--selected {\n box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);\n }\n\n .adyen-checkout__payment-method:after {\n transform: scale(0%);\n }\n\n .adyen-checkout__paypal__button {\n display: block !important;\n }\n\n .adyen-checkout__payment-methods-list {\n gap: 4px;\n }\n\n .adyen-checkout__dropdown__list {\n background-color: white;\n border-radius: var(--adyen-sdk-border-radius-s, 4px);\n }\n\n .adyen-checkout__payment-method.adyen-checkout__payment-method--selected:after {\n content: '✓';\n width: 20px;\n height: 20px;\n border-radius: 10px;\n background-color: var(--color-primary-600);\n position: absolute;\n top: 14px;\n right: 14px;\n text-align: center;\n line-height: 20px;\n color: white;\n transform: scale(100%);\n font-size: 12px;\n }\n\n .adyen-checkout__payment-method__header {\n padding: 8px 16px !important;\n }\n\n .adyen-checkout__payment-method__brands {\n align-items: center;\n }\n .adyen-checkout__payment-method__brand-number {\n line-height: 1;\n }\n .adyen-checkout__button__text {\n font-size: 14px;\n }\n .adyen-checkout__store-details {\n background: transparent;\n padding: 0;\n }\n .adyen-checkout__checkbox__input + .adyen-checkout__checkbox__label:after {\n border-color: rgb(229, 231, 235);\n }\n ","AUTHORIZE"===u.variant&&(a.textContent+="\n .adyen-checkout__payment-method--cashapp .adyen-checkout-pm-details-wrapper {\n display: none;\n }\n "),n.appendChild(a)}}(t)}catch(e){_.error("PAYMENT_INTEGRATION_INITIALIZATION_FAILED","Failed to mount Adyen web drop-in",{error:e})}}async function P(){d&&(d.unmount(),d=null),l.value&&(l.value.innerHTML="")}function w(...e){const[t,a,o]=e;u.validateOnSubmit().then(e=>{if(!e)return;const a=u.paymentMethodOptionResponseEntry.payment_acceptor.id,r={risk_data:n.transformObjectToAdyenObject(t.data.riskData),payment_method:n.transformObjectToAdyenObject(t.data.paymentMethod),browser_info:n.transformObjectToAdyenObject(t.data.browserInfo)};if("AUTHORIZE"===u.variant){const e=n.createReturnUrl({paymentAcceptorId:u.paymentMethodOptionResponseEntry.payment_acceptor.id,redirectUrl:window.location.href});return void E({payment_acceptor_id:a,...u.customerId?{customer_id:u.customerId}:{},payment_gateway_variant:I,adyen:{...r,store_payment_method:u.forceStorePaymentMethod||t.data.storePaymentMethod},amount:u.amount,...u.context?{context:u.context}:{},return_url:e}).then(e=>{const n=t.data.paymentMethod.type;if("ACTION_REQUIRED"===e.status&&e.action.payment_gateway_variant===I){const t=S(e,n);return t?(d.handleAction(t),void o.resolve({resultCode:e.action.adyen.result_code,action:t})):void _.error("PAYMENT_AUTHORIZATION_FAILED",`Failed payment authorization for payment acceptor with id ${a}`,{error:e})}if("AUTHORIZED"===e.payment.result)return y.value=!0,void o.resolve({resultCode:"Authorised"});_.error("PAYMENT_AUTHORIZATION_FAILED",`Failed payment authorization for payment acceptor with id ${a}`,{error:e}),o.resolve({resultCode:"Error"})}).catch(e=>{_.error("PAYMENT_AUTHORIZATION_FAILED",`Failed payment authorization for payment acceptor with id ${a}`,{error:e}),o.resolve({resultCode:"Error"})})}if("TOKENIZE"===u.variant){const e=n.createReturnUrl({paymentAcceptorId:u.paymentMethodOptionResponseEntry.payment_acceptor.id,redirectUrl:window.location.href});if(!u.customerId)return void _.error("TOKENIZATION_FAILED",`Missing customer id for payment acceptor with id ${a}`);O({customer_id:u.customerId,payment_acceptor_id:a,payment_gateway_variant:I,adyen:r,return_url:e}).then(e=>{const n=t.data.paymentMethod.type;if("ACTION_REQUIRED"===e.status&&e.action.payment_gateway_variant===I){const t=S(e,n);return t?(d.handleAction(t),void o.resolve({resultCode:e.action.adyen.result_code,action:t})):void _.error("TOKENIZATION_FAILED",`Tokenization failed for payment acceptor with id ${a}`,{error:e})}if("AUTHORIZED"===e.payment.result)return y.value=!0,void o.resolve({resultCode:"Authorised"});_.error("TOKENIZATION_FAILED",`Tokenization failed for payment acceptor with id ${a}`,{error:e}),o.resolve({resultCode:"Error"})}).catch(e=>{_.error("TOKENIZATION_FAILED",`Tokenization failed for payment acceptor with id ${a}`,{error:e}),o.resolve({resultCode:"Error"})})}}).catch(e=>{_.error("INTEGRATION_ERROR","Unhandled error in payment submission flow",{},e)})}function S(e,t){if("ACTION_REQUIRED"!==e.status)return;const n=e.action;if("ADYEN"!=n.payment_gateway_variant)return;const a=n.adyen;return{paymentMethodType:(null==a?void 0:a.payment_method_type)??t,method:n.method,url:n.url,data:n.data,type:null==a?void 0:a.action_type,paymentData:null==a?void 0:a.payment_data,sdkData:null==a?void 0:a.sdk_data}}function C(...e){const[t]=e,n=t.data.details,a=t.data.paymentData;if(u.paymentMethodOptionResponseEntry.payment_acceptor.id)return void D({detailsResult:n?(o=n,Object.fromEntries(Object.entries(o).filter(([,e])=>null!=e))):void 0,paymentDataResult:a,paymentAcceptorId:u.paymentMethodOptionResponseEntry.payment_acceptor.id});var o;const r={code:"UNKNOWN_ERROR",message:"Payment failed",error:e};p("payment-failed",r),f.value=r}function M(...e){const[t]=e,n={code:"UNKNOWN_ERROR",message:"Payment failed",error:t};p("payment-failed",n),f.value=n}function B(...e){const[,t]=e;null==t||t.unmount(),p("payment-success")}function x(...e){const[t,n]=e;if("CANCEL"===t.name)return;const a={code:"UNKNOWN_ERROR",message:"Something went wrong",error:t};_.error("INTEGRATION_ERROR","Something went wrong",{error:t}),f.value=a,null==n||n.unmount()}function D({detailsResult:e,threeDSResult:t,redirectResult:n,paymentDataResult:a,paymentAcceptorId:o}){k({paymentAcceptorId:o,paymentGatewayVariant:I,adyen:{...e?{details:e}:{},...n?{redirect_result:n}:{},...t?{threeds_result:t}:{},...a?{payment_data:a}:{}}}).then(e=>{"FAILURE"!==e.payment_status?"SUCCESS"!==e.payment_status||p("payment-success"):p("payment-failed",{code:"UNKNOWN_ERROR",message:"Failed getting payment details",error:e})}).catch(e=>{_.error("PAYMENT_DETAILS_CALL_FAILED","Failed fetching payment details",{error:e})})}return e.onMounted(()=>{N(),function(){const e=n.getQueryParam(n.REDIRECT_RESULT_QUERY_STRING),t=n.getQueryParam(n.PAYMENT_ACCEPTOR_ID_QUERY_STRING);e&&(t?D({paymentAcceptorId:t,detailsResult:{redirectResult:decodeURI(e)}}):_.error("INVALID_REDIRECT_RESULT","Redirect result is set but payment acceptor id is missing",{context:{redirectResult:e}}))}()}),e.onBeforeUnmount(()=>{P()}),e.watch(()=>u.paymentMethodOptionResponseEntry,(e,n)=>{t.isEqual(e,n)||N()},{deep:!0}),(t,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[y.value?(e.openBlock(),e.createBlock(h,{key:0,variant:i.variant},null,8,["variant"])):f.value?(e.openBlock(),e.createBlock(g,{key:1,error:f.value},null,8,["error"])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"dropInContainerRef",ref:l},null,512)],64))}}),O=e.defineComponent({__name:"PaymentIntegrationForm",props:{customerId:{type:String},variant:{type:String},context:{type:Object},paymentMethodOptions:{type:Array},countryCode:{type:String},invoiceId:{type:String},amount:{type:Object},selectedOption:{type:String},email:{type:String},name:{type:String},validateOnSubmit:{type:Function},forceStorePaymentMethod:{type:Boolean}},emits:["select","payment-failed","payment-success","ready"],setup(n,{expose:a,emit:o}){const r=n,d=o;a({submit:function(){var e,t;p.value||(y.value=!0,null==(e=r.validateOnSubmit)||e.call(r));null==(t=l.value.get(p.value))||t.submit()}});const{$t:m}=t.useIntl(),u=e.ref(),p=e.computed(()=>{var e,t;return u.value??(null==(t=null==(e=r.paymentMethodOptions[0])?void 0:e.integration.payment_gateway)?void 0:t.variant)}),l=e.ref(new Map),y=e.ref(!1),h=({paymentGatewayVariant:e,paymentMethodType:t})=>{y.value=!1,u.value=e,d("select",{paymentGatewayVariant:e,paymentMethodType:t})},f=e=>t=>{var n;return l.value.set(null==(n=e.integration.payment_gateway)?void 0:n.variant,t)};return(a,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.paymentMethodOptions,t=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:t.integration.id},[e.unref(i)(t)?(e.openBlock(),e.createBlock(k,{key:0,ref_for:!0,ref:f(t),context:n.context,"payment-method-option-response-entry":t,"country-code":n.countryCode,"customer-id":n.customerId,variant:n.variant,amount:n.amount,"invoice-id":n.invoiceId,selected:e.unref(c)({selectedIntegration:p.value,paymentMethodOption:t}),"validate-on-submit":n.validateOnSubmit,"force-store-payment-method":n.forceStorePaymentMethod,onSelect:h,onPaymentFailed:o[0]||(o[0]=e=>a.$emit("payment-failed",e)),onPaymentSuccess:o[1]||(o[1]=e=>a.$emit("payment-success")),onReady:o[2]||(o[2]=e=>a.$emit("ready"))},null,8,["context","payment-method-option-response-entry","country-code","customer-id","variant","amount","invoice-id","selected","validate-on-submit","force-store-payment-method"])):e.unref(s)(t)?(e.openBlock(),e.createBlock(E,{key:1,ref_for:!0,ref:f(t),context:n.context,"payment-method-option-response-entry":t,"country-code":n.countryCode,"customer-id":n.customerId,variant:n.variant,amount:n.amount,"invoice-id":n.invoiceId,selected:e.unref(c)({selectedIntegration:p.value,paymentMethodOption:t}),email:n.email,name:n.name,"validate-on-submit":n.validateOnSubmit,"force-store-payment-method":n.forceStorePaymentMethod,onSelect:h,onPaymentFailed:o[3]||(o[3]=e=>a.$emit("payment-failed",e)),onPaymentSuccess:o[4]||(o[4]=e=>a.$emit("payment-success")),onReady:o[5]||(o[5]=e=>a.$emit("ready"))},null,8,["context","payment-method-option-response-entry","country-code","customer-id","variant","amount","invoice-id","selected","email","name","validate-on-submit","force-store-payment-method"])):e.createCommentVNode("",!0)],64))),128)),y.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$32),{key:0,variant:"error",class:"mt-2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(m)({defaultMessage:"Select a payment method",id:"payment_integration_form.select_payment_method_error",description:"Error shown when no payment method is selected"})),1)]),_:1})):e.createCommentVNode("",!0)],64))}});exports._sfc_main=O;