@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.
- package/README.md +44 -0
- 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
- package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Co3XAxaY.js → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-jWthTJk-.js} +1 -1
- package/dist/Alert.vue.es-RyK53a2P.js +1 -0
- package/dist/Alert.vue.es-lIiAWf2S.mjs +146 -0
- package/dist/{Avatar.vue.es-DNJ-jexx.mjs → Avatar.vue.es-DzjFvLuK.mjs} +1 -1
- package/dist/{Avatar.vue.es-D42J_izE.js → Avatar.vue.es-nr8srGuK.js} +1 -1
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-D1uVidXk.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-BptcwJMr.mjs} +4 -4
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BEVkWJXT.js → BillingInformation.vue_vue_type_script_setup_true_lang-C1prOJay.js} +1 -1
- package/dist/{Button.vue.es-Dz-2L8dJ.mjs → Button.vue.es-PbJFK8z7.mjs} +1 -1
- package/dist/{Button.vue.es-M_jXZda4.js → Button.vue.es-TCF-bvDF.js} +1 -1
- package/dist/Checkout.entry.ce-D8O4qJ24.js +2 -0
- package/dist/Checkout.entry.ce-DHFx5Vnb.mjs +3900 -0
- package/dist/{Chip.vue.es-G8doKsZb.js → Chip.vue.es-CAoisngJ.js} +1 -1
- package/dist/{Chip.vue.es-DMK9C78d.mjs → Chip.vue.es-DpcOM3Ai.mjs} +2 -2
- package/dist/ContentWithAsideLayout-BCM8tmZN.mjs +38 -0
- package/dist/ContentWithAsideLayout-RSdKXqAf.js +1 -0
- package/dist/{ContextMenu.vue.es-B3Rz6Ojk.js → ContextMenu.vue.es-kzZ3JJHG.js} +1 -1
- package/dist/{ContextMenu.vue.es-CzkkNoJG.mjs → ContextMenu.vue.es-tAuFp-6i.mjs} +4 -4
- package/dist/{CustomerBillingInformation.vue.es-Db6bN2RZ.mjs → CustomerBillingInformation.vue.es-BQSl9q6W.mjs} +2 -2
- package/dist/{CustomerBillingInformation.vue.es-BmtU9Pk0.js → CustomerBillingInformation.vue.es-Nac6HgLo.js} +1 -1
- 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
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-fESZVyPe.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-R47ln7Wb.mjs} +5 -5
- 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
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-D_jcV7VG.js +1 -0
- package/dist/{DividerText.vue.es-IK2fns6f.mjs → DividerText.vue.es-CSE7a-T0.mjs} +1 -1
- package/dist/{DividerText.vue.es-D-QxT2OD.js → DividerText.vue.es-LJ2kZakb.js} +1 -1
- package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-lhJnqrrh.mjs → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-DeotDsFP.mjs} +4 -4
- 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
- package/dist/ErrorNotification.vue.es-BF6swP7o.js +1 -0
- package/dist/{ErrorNotification.vue.es-BGckEwHf.mjs → ErrorNotification.vue.es-CVUuIt8Z.mjs} +2 -2
- package/dist/IconButton.vue.es-CB1lIPao.js +1 -0
- package/dist/IconButton.vue.es-DGflbWFk.mjs +56 -0
- package/dist/{IconTitle.vue.es-BmX68uJx.mjs → IconTitle.vue.es-BsdjyGlQ.mjs} +3 -3
- package/dist/{IconTitle.vue.es-CmR2xoeu.js → IconTitle.vue.es-CMO8EyQl.js} +1 -1
- package/dist/{Input.vue.es-BGPELaZU.mjs → Input.vue.es-BFbiFXsU.mjs} +2 -2
- package/dist/{Input.vue.es-CTOrmrcB.js → Input.vue.es-CREdT4nB.js} +1 -1
- 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
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-CMEOOuSU.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Btv0rRk4.mjs} +2 -2
- package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-avhwysNq.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-CrZq0d1M.mjs} +2 -2
- 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
- package/dist/{InvoiceSummary.vue.es-hpG8Tq1D.js → InvoiceSummary.vue.es-BOnvORpf.js} +1 -1
- package/dist/{InvoiceSummary.vue.es-BWLiwlNs.mjs → InvoiceSummary.vue.es-JtOIQ6SJ.mjs} +7 -7
- package/dist/{Modal.vue.es-BD4vUaOQ.js → Modal.vue.es-BbdtdxsO.js} +1 -1
- package/dist/{Modal.vue.es-B_G8NQS2.mjs → Modal.vue.es-jT61xK_A.mjs} +5 -5
- package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-BBoZVnsK.js +1 -0
- package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-Dan29qmH.mjs +294 -0
- package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DuorCFo9.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-BJZHkTqA.mjs} +3 -3
- package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DIJbzWMV.js → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-D34fD3Io.js} +1 -1
- package/dist/{PaymentHistoryBlock-DSHW_eW1.js → PaymentHistoryBlock-Dw2wOiAI.js} +1 -1
- package/dist/{PaymentHistoryBlock-ComJzB3H.mjs → PaymentHistoryBlock-quvnCSFV.mjs} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-hjtksV2D.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-5ckQd9eQ.mjs} +4 -4
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DUN0Hf2v.js → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-C0XIdBbx.js} +1 -1
- package/dist/{PaymentIntegrationForm-CH5B6BY5.mjs → PaymentIntegrationForm-CQjUZi22.mjs} +1 -1
- package/dist/{PaymentIntegrationForm-CwfCLnKt.js → PaymentIntegrationForm-D1oJREmH.js} +1 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-De7h9-fH.js +1 -0
- 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
- package/dist/PaymentIntegrationFormAdyen-BQXXwpUK.js +98 -0
- package/dist/PaymentIntegrationFormAdyen-CyZk9ofV.mjs +798 -0
- package/dist/PaymentIntegrationFormStripe-Bs4F7oK_.js +102 -0
- package/dist/{PaymentIntegrationFormStripe-CBsXDuhy.mjs → PaymentIntegrationFormStripe-D-GaLHwc.mjs} +251 -179
- package/dist/{PaymentMethod.vue.es-DkQdPXfk.mjs → PaymentMethod.vue.es-C0j580g7.mjs} +3 -3
- package/dist/{PaymentMethod.vue.es-D18g-QB4.js → PaymentMethod.vue.es-CXV_ThBY.js} +1 -1
- package/dist/{PaymentMethodForm-CpIZKfPH.mjs → PaymentMethodForm-Bf2Ps6eV.mjs} +1 -1
- package/dist/{PaymentMethodForm-DK8ntFA0.js → PaymentMethodForm-CDV5LR8i.js} +1 -1
- package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-C1tGJsay.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-BqPu7CYA.mjs} +6 -6
- package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-D7fDguwa.js → PaymentMethodForm.vue_vue_type_script_setup_true_lang-BwsRDlQJ.js} +1 -1
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-C6BcIkEV.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-9MUPbgWM.mjs} +6 -6
- 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
- package/dist/PlanCustomizationEditor-0kEXoOcM.js +1 -0
- package/dist/{PlanCustomizationEditor-0zCXN-cv.mjs → PlanCustomizationEditor-Dv69xPbX.mjs} +9 -9
- package/dist/{PricingGroupRangeInput.vue.es-QnpfHxaY.js → PricingGroupRangeInput.vue.es-BchXhunH.js} +2 -2
- package/dist/{PricingGroupRangeInput.vue.es-8_5nfZDI.mjs → PricingGroupRangeInput.vue.es-CP7-dmxS.mjs} +4 -4
- package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-t6h1j6WD.mjs → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DmVJ2JQE.mjs} +5 -5
- 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
- package/dist/RadioGroupExtended.vue.es-Cf5R1P9a.js +1 -0
- package/dist/{RadioGroupExtended.vue.es-C92xlCFQ.mjs → RadioGroupExtended.vue.es-_QMReyZ8.mjs} +3 -3
- package/dist/{Section.vue.es-Btff-cLY.js → Section.vue.es-CBZx5x53.js} +1 -1
- package/dist/{Section.vue.es-DQ5H7mqW.mjs → Section.vue.es-KRsHeFoT.mjs} +1 -1
- package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DKsunuGT.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BVELHoUj.mjs} +6 -6
- package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BfvX14E3.js → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-UdGQMJGY.js} +1 -1
- package/dist/{SubscriptionSchedules-pzNsego6.js → SubscriptionSchedules-1ikoGncQ.js} +1 -1
- package/dist/{SubscriptionSchedules-Dc0rUnnf.mjs → SubscriptionSchedules-B6b6xf-E.mjs} +1 -1
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-Cd56tuZb.js +1 -0
- package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-Brs9qDs5.mjs → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-Dv2bP9vv.mjs} +12 -12
- 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
- package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-C1mkIPMr.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-DvYZvTV9.mjs} +2 -2
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-CFmCJK8M.js → SubscriptionsList.vue_vue_type_script_setup_true_lang-DTjZcOhj.js} +1 -1
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DSoNs7Xx.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-DmeIKMYI.mjs} +6 -6
- package/dist/{TooltipParagraph.vue.es-BaqCDjl8.js → TooltipParagraph.vue.es-7IQdU3Tf.js} +1 -1
- package/dist/{TooltipParagraph.vue.es-CIedcXGT.mjs → TooltipParagraph.vue.es-nGFfHF1A.mjs} +1 -1
- package/dist/{TrialChip.vue.es-BzNI94k0.js → TrialChip.vue.es-DhC5Bpmy.js} +1 -1
- package/dist/{TrialChip.vue.es-DkBuMNr_.mjs → TrialChip.vue.es-eKgO6an3.mjs} +2 -2
- package/dist/{cn.es-BGqYNPM3.mjs → cn.es-BD7Afj5Q.mjs} +2 -2
- package/dist/{cn.es-CvmLj7KH.js → cn.es-BLE3T5Rx.js} +1 -1
- package/dist/components/BillingInformation/BillingInformation.cjs +1 -1
- package/dist/components/BillingInformation/BillingInformation.mjs +5 -5
- package/dist/components/BillingInformationForm/BillingInformationForm.cjs +1 -1
- package/dist/components/BillingInformationForm/BillingInformationForm.mjs +7 -7
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs +1 -1
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +5 -5
- package/dist/components/Invoice/Invoice.cjs +1 -1
- package/dist/components/Invoice/Invoice.mjs +10 -10
- package/dist/components/InvoiceDetails/InvoiceDetails.cjs +1 -1
- package/dist/components/InvoiceDetails/InvoiceDetails.mjs +4 -4
- package/dist/components/InvoiceHeader/InvoiceHeader.cjs +1 -1
- package/dist/components/InvoiceHeader/InvoiceHeader.mjs +8 -8
- package/dist/components/InvoicesList/InvoicesList.cjs +1 -1
- package/dist/components/InvoicesList/InvoicesList.mjs +4 -4
- package/dist/components/PaymentHistory/PaymentHistory.cjs +1 -1
- package/dist/components/PaymentHistory/PaymentHistory.mjs +9 -9
- package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs +1 -1
- package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +6 -6
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs +1 -1
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +5 -5
- package/dist/components/SubscriptionsList/SubscriptionsList.cjs +1 -1
- package/dist/components/SubscriptionsList/SubscriptionsList.mjs +6 -6
- package/dist/components/WalletBalances/WalletBalances.cjs +1 -1
- package/dist/components/WalletBalances/WalletBalances.mjs +4 -4
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.mjs +26 -23
- package/dist/customElements-CSzbVZIH.js +1211 -0
- package/dist/{customElements-CSE7dwUr.mjs → customElements-DT1YyL4O.mjs} +663 -626
- package/dist/{customer-Dsq-Moea.js → customer-CJonIvSm.js} +1 -1
- package/dist/{customer-5krPxZ8i.mjs → customer-Cq4fF__H.mjs} +1 -1
- package/dist/{de-DE-DsFtpLsx.mjs → de-DE-CyvjSD9b.mjs} +26 -2
- package/dist/{de-DE-C3DzP1nj.js → de-DE-DXsDvO5y.js} +1 -1
- package/dist/{en-US-X_pSFsNm.js → en-US-DHdI11k9.js} +1 -1
- package/dist/{en-US-DvkvbV0p.mjs → en-US-xQrWj8qI.mjs} +24 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{invoices-DRgfpkJ6.mjs → invoices-CVZOfEOY.mjs} +1 -1
- package/dist/{invoices-xOV2YaEV.js → invoices-EamWI_jz.js} +1 -1
- package/dist/{it-IT-TE7oqvXa.mjs → it-IT-C09oObBM.mjs} +26 -2
- package/dist/{it-IT-YBtHAao1.js → it-IT-CcRIzP1A.js} +1 -1
- package/dist/{nl-NL-C8wnyKju.js → nl-NL-5PrgQl8q.js} +1 -1
- package/dist/{nl-NL-Di3-JArV.mjs → nl-NL-BhNND_yi.mjs} +24 -0
- package/dist/paymentFailure-Bh60UhxA.mjs +47 -0
- package/dist/paymentFailure-Cki8c5BX.js +1 -0
- package/dist/{paymentMethods-CRDIw9lz.js → paymentMethods-Bwym8l9a.js} +1 -1
- package/dist/{paymentMethods-PmkHYomw.mjs → paymentMethods-By1SebnO.mjs} +1 -1
- package/dist/{payments-Dvqh6CGW.mjs → payments-BYZLQTJ-.mjs} +1 -1
- package/dist/{payments-jAgXhdp_.js → payments-Dnjg9Se4.js} +1 -1
- package/dist/screens/Checkout/Checkout.cjs +1 -1
- package/dist/screens/Checkout/Checkout.mjs +2 -2
- package/dist/screens/CustomerOverview/CustomerOverview.cjs +1 -1
- package/dist/screens/CustomerOverview/CustomerOverview.mjs +21 -21
- package/dist/screens/PayInvoice/PayInvoice.cjs +1 -1
- package/dist/screens/PayInvoice/PayInvoice.mjs +131 -127
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs +1 -1
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +11 -11
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs +1 -1
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +21 -21
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs +1 -1
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +20 -20
- package/dist/sessionReference-3h-6FdrC.mjs +43 -0
- package/dist/sessionReference-m_6Rp4X1.js +1 -0
- package/dist/subscriptions-BKER9RUc.js +1 -0
- package/dist/{subscriptions-XDyI2Cqm.mjs → subscriptions-Gj3KgCZz.mjs} +2 -2
- package/dist/types/components/payments/PaymentIntegrationForm/PaymentIntegrationForm.types.d.ts +8 -0
- package/dist/types/components/providers/LoggerProvider/LoggerProvider.lib.d.ts +2 -0
- package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +13 -2
- package/dist/types/services/portals.types.d.ts +2 -0
- package/dist/types/services/requests.types.d.ts +2 -0
- package/dist/types/types/errors.d.ts +5 -0
- package/dist/{url-DwiuKYpu.mjs → url-TNRgVI8A.mjs} +3 -2
- package/dist/url-vloPOiXd.js +1 -0
- package/dist/{useActionDispatchProvider-CNAuaHdm.js → useActionDispatchProvider-DDHrhy3i.js} +1 -1
- package/dist/{useActionDispatchProvider-B8-oycQk.mjs → useActionDispatchProvider-MjTckd4f.mjs} +1 -1
- package/dist/{useCustomer-DSx-wN-6.js → useCustomer-BW0DBEJh.js} +1 -1
- package/dist/{useCustomer-CP8eWUZV.mjs → useCustomer-CxnF7r8Z.mjs} +1 -1
- package/dist/{useCustomerFormLabels-TVTgy0MT.js → useCustomerFormLabels-C773h3J0.js} +1 -1
- package/dist/{useCustomerFormLabels-DW6jnDYH.mjs → useCustomerFormLabels-zPc8QrwJ.mjs} +5 -5
- package/dist/{useExperimentalFeature-CC-DrIcL.js → useExperimentalFeature-9teNYGuP.js} +1 -1
- package/dist/{useExperimentalFeature-BvE_EOX-.mjs → useExperimentalFeature-NsSDg-e3.mjs} +1 -1
- package/dist/{useInvoiceData-CRRPdXc6.js → useInvoiceData-DvV2AsgC.js} +1 -1
- package/dist/{useInvoiceData-D8ds05CX.mjs → useInvoiceData-GQwk6fl4.mjs} +2 -2
- package/dist/{useInvoicesList-SJU5YWBQ.mjs → useInvoicesList-CGmFSQSg.mjs} +7 -7
- package/dist/{useInvoicesList-DIfQcvER.js → useInvoicesList-Xnth6s6U.js} +1 -1
- package/dist/{useLoadInitialData-MUljS38K.mjs → useLoadInitialData-BvvaWeAe.mjs} +1 -1
- package/dist/{useLoadInitialData-DsabgMLZ.js → useLoadInitialData-Cjkc70u-.js} +1 -1
- package/dist/{usePaymentMethodAvailability-D0NUanyF.mjs → usePaymentMethodAvailability-BWaaj3N3.mjs} +4 -4
- package/dist/{usePaymentMethodAvailability-Bt7P9InI.js → usePaymentMethodAvailability-DKyscbom.js} +1 -1
- package/dist/{usePaymentMethodOptions-cT1o-BA1.js → usePaymentMethodOptions-DuXKS36F.js} +1 -1
- package/dist/{usePaymentMethodOptions-B7JYkGsw.mjs → usePaymentMethodOptions-l-wVAmIW.mjs} +1 -1
- package/dist/{usePaymentMethods-DNVw2eVg.js → usePaymentMethods-BDFVB-kK.js} +1 -1
- package/dist/{usePaymentMethods-CpzqXQUT.mjs → usePaymentMethods-DvQVnsSV.mjs} +1 -1
- package/dist/{usePayments-D9Eo-uBk.js → usePayments-CIJocDhR.js} +1 -1
- package/dist/{usePayments-Gx9kBvNB.mjs → usePayments-D_dyuf6S.mjs} +6 -6
- package/dist/{usePortal-DsebXdhx.js → usePortal-BU4ibdWq.js} +1 -1
- package/dist/{usePortal-3VCZwSUE.mjs → usePortal-Br5lYuPT.mjs} +1 -1
- package/dist/{useSubscription-DnL1wVh1.mjs → useSubscription-CqRae2I9.mjs} +1 -1
- package/dist/{useSubscription-K_gP9TeX.js → useSubscription-DRBUt9H5.js} +1 -1
- package/dist/{useTimePeriod.es-DMtKzcoB.mjs → useTimePeriod.es-BxIGnCAP.mjs} +1 -1
- package/dist/{useTimePeriod.es-CmltiTE-.js → useTimePeriod.es-DDos3-EH.js} +1 -1
- package/package.json +2 -1
- package/dist/Checkout.entry.ce-B5-0AM67.mjs +0 -3747
- package/dist/Checkout.entry.ce-C52gkrNZ.js +0 -1
- package/dist/ContentWithAsideLayout-Bnbsq8_5.mjs +0 -32
- package/dist/ContentWithAsideLayout-C6yMIVJF.js +0 -1
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-Cnlbp0om.js +0 -1
- package/dist/ErrorNotification.vue.es-Cd2UKPAz.js +0 -1
- package/dist/IconButton.vue.es-BTAkuFsm.js +0 -1
- package/dist/IconButton.vue.es-C4dQEQAc.mjs +0 -198
- package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-BnilyGBO.mjs +0 -144
- package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-CSv-Luvz.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DzSQC951.js +0 -1
- package/dist/PaymentIntegrationFormAdyen-DfN7cPYZ.mjs +0 -621
- package/dist/PaymentIntegrationFormAdyen-Q48aDXR7.js +0 -98
- package/dist/PaymentIntegrationFormStripe-BSEqarl7.js +0 -102
- package/dist/PlanCustomizationEditor-XpofGULc.js +0 -1
- package/dist/RadioGroupExtended.vue.es-Cb1iD73r.js +0 -1
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-nmVRb6hj.js +0 -1
- package/dist/component-5wqcK7yz.mjs +0 -8
- package/dist/component-B7ZDyqBp.js +0 -1
- package/dist/customElements-Vox1PB6G.js +0 -1211
- package/dist/subscriptions-fJcj88X9.js +0 -1
- package/dist/url-BNKStNY9.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("vue"),C=require("./customElements-Vox1PB6G.js"),v=require("./Amount.vue.es-DExaYBqm.js"),ce=require("./useService-H7BjLg8P.js"),O=require("./Button.vue.es-M_jXZda4.js"),de=require("./floating-ui.vue.es-Bly3DGWm.js"),ae=require("./customer.es-BButyYo0.js"),q=require("./formatting.es-C72Nsrmh.js"),W=require("./Comparators.vue.es-DmkxV0gb.js"),se=require("./Chip.vue.es-G8doKsZb.js"),Y=require("./getComposedString.es-haS4bAj7.js"),P=require("./TooltipParagraph.vue.es-BaqCDjl8.js"),ue=require("./index.es-BclokHQX.js"),K=require("./wallets.es-CNIMW5ay.js"),me=require("./DividerText.vue.es-D-QxT2OD.js"),fe=require("./IconTitle.vue.es-CmR2xoeu.js"),ge=require("./ContextMenu.vue.es-B3Rz6Ojk.js"),J=(t=[])=>{const n=e.ref(t);return[n,i=>{typeof n.value.find(o=>o===i)=="number"?n.value=n.value.filter(o=>o!==i):n.value=[...n.value,i]}]},pe={},ve={class:"w-full table-fixed"};function xe(t,n){return e.openBlock(),e.createElementBlock("table",ve,[e.renderSlot(t.$slots,"default")])}const $=de._export_sfc(pe,[["render",xe]]),m=e.defineComponent({__name:"InvoiceTableData",props:{number:{type:Boolean,default:!1},hasPadding:{type:Boolean,default:!0}},setup(t){return(n,a)=>(e.openBlock(),e.createElementBlock("td",{class:e.normalizeClass({"text-right tabular-nums":t.number,"py-2":t.hasPadding})},[e.renderSlot(n.$slots,"default")],2))}}),x=e.defineComponent({__name:"InvoiceTableHeader",props:{left:{type:Boolean,default:!1},right:{type:Boolean,default:!1}},setup(t){return(n,a)=>(e.openBlock(),e.createElementBlock("th",{class:e.normalizeClass(["border-b py-1.5 text-xs font-bold uppercase text-subtle",{"text-left":t.left,"text-right":t.right}])},[e.renderSlot(n.$slots,"default")],2))}}),ye="INVOICE_PERIOD",ke="INVOICE_PERIOD_SUBTOTAL",R="INVOICE_PERIOD_TOTAL",X="SUMMARY_LINE_AMOUNT",he="SUMMARY_TOTAL_TAX",be="SUMMARY_TOTAL_INCLUDING_TAX",Be="SUMMARY_TOTAL_EXCLUDING_TAX",_e="SUMMARY_TOTAL_DISCOUNT",Ne="SUMMARY_AMOUNT_DUE",Ce="DEDUCTION",Te="HAS_SUBLINES",Ve={class:"flex items-center"},Ee={key:0,class:"text-xs text-secondary"},we={class:"flex items-center"},Q=e.defineComponent({__name:"InvoiceSubLineRow",props:{subLines:{},isOpen:{type:Boolean},lineOrder:{},periodOrder:{},groupOrder:{},processingOnlyCustomers:{},displayInvoiceSubLinesPerProcessingOnlyCustomer:{type:Boolean},showTaxPerLineItem:{type:Boolean,default:!0}},setup(t){const{formatMessage:n,formatNumber:a}=C.useIntl(),i=t,r=l=>{var s;const c=(s=i.processingOnlyCustomers)==null?void 0:s.find(u=>u.id===l);return c?ae.getCustomerName(c):n({id:"generic.not_available",defaultMessage:"N/A",description:"Used in scenarios where no data is available to be displayed"})},o=l=>{var s;return((s=l.usage_based_conversion)==null?void 0:s.conditions)??l.conditions},d=l=>{var s,c;const u=(c=(s=l.details.conversion)==null?void 0:s.credits)==null?void 0:c.quantity;return u===void 0?n({id:"generic.not_available",defaultMessage:"N/A",description:"Used in scenarios where no data is available to be displayed"}):a(+u,{maximumFractionDigits:q.MAX_FRACTION_DIGITS})};return(l,s)=>t.subLines&&t.isOpen?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.subLines,(c,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:u},[c.processing_only_customer_resource_id?t.displayInvoiceSubLinesPerProcessingOnlyCustomer&&t.processingOnlyCustomers?(e.openBlock(),e.createElementBlock("tr",{key:1,class:e.normalizeClass(["group",{"border-t":u>0}])},[e.createVNode(m,{class:"pl-4"},{default:e.withCtx(()=>[e.createElementVNode("div",we,[e.createElementVNode("div",null,e.toDisplayString(r(c.processing_only_customer_resource_id)),1)])]),_:2},1024),e.renderSlot(l.$slots,"subline-content",{details:c.details,hideTaxDetails:!0})],2)):e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("tr",{key:0,class:e.normalizeClass(u>0?"border-t":"")},[e.createVNode(m,null,{default:e.withCtx(()=>{var g,p,b,B,_,y;return[e.createElementVNode("div",Ve,[e.renderSlot(l.$slots,"invoice-line-prefix",{lineOrder:t.lineOrder,periodOrder:t.periodOrder,groupOrder:t.groupOrder}),e.createElementVNode("div",null,[e.createElementVNode("div",null,[c.description?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(c.description),1)],64)):c.details.description?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(c.details.description),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(" N/A ")],64))]),(g=o(c))!=null&&g.name||(p=o(c))!=null&&p.meter_properties?(e.openBlock(),e.createElementBlock("div",Ee,[(b=o(c))!=null&&b.name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString((B=o(c))==null?void 0:B.name),1)],64)):(_=o(c))!=null&&_.meter_properties?(e.openBlock(),e.createBlock(e.unref(W._sfc_main),{key:1,comparators:(y=o(c))==null?void 0:y.meter_properties},null,8,["comparators"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])])]}),_:2},1024),e.createVNode(m,{number:"",class:"text-right tabular-nums"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d(c)),1)]),_:2},1024),e.createVNode(m,{class:"text-right tabular-nums"},{default:e.withCtx(()=>{var g,p;return[(g=c.details.band)!=null&&g.amount?(e.openBlock(),e.createBlock(v._sfc_main,{key:0,value:c.details.band.amount},null,8,["value"])):(p=c.details.band)!=null&&p.percentage?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(c.details.band.percentage)+"% ",1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(" N/A ")],64))]}),_:2},1024),t.showTaxPerLineItem?(e.openBlock(),e.createBlock(m,{key:0},{default:e.withCtx(()=>[...s[0]||(s[0]=[e.createTextVNode(" ",-1)])]),_:1})):e.createCommentVNode("",!0),c.details.amount?(e.openBlock(),e.createBlock(m,{key:1,class:"text-right tabular-nums"},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:c.details.amount,"data-testid":e.unref(ke)},null,8,["value","data-testid"])]),_:2},1024)):e.createCommentVNode("",!0)],2))],64))),128)):e.createCommentVNode("",!0)}}),Oe={class:"flex gap-4"},Ie={class:"flex items-center gap-2"},G=e.defineComponent({__name:"PricingClauseChip",props:{iconName:{}},setup(t){return(n,a)=>(e.openBlock(),e.createElementBlock("div",Oe,[e.createVNode(se._sfc_main,null,{default:e.withCtx(()=>[e.createElementVNode("div",Ie,[e.createVNode(O._sfc_main$1,{icon:t.iconName,size:"xs"},null,8,["icon"]),e.createElementVNode("span",null,[e.renderSlot(n.$slots,"chip-content")])])]),_:3}),e.renderSlot(n.$slots,"chip-postfix")]))}}),Se={class:"flex flex-col gap-2"},ie=e.defineComponent({__name:"InvoicePricingClauseChip",props:{clauseType:{},priceDetailsBand:{},invoiceLineDescription:{}},setup(t){const n=C.useIntl();return(a,i)=>(e.openBlock(),e.createElementBlock("div",Se,[e.createElementVNode("span",null,e.toDisplayString(t.invoiceLineDescription),1),t.clauseType==="DISCOUNT"&&t.priceDetailsBand?(e.openBlock(),e.createBlock(e.unref(G),{key:0,"icon-name":"south_east"},e.createSlots({_:2},[t.priceDetailsBand.amount?{name:"chip-content",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.amount_discount",defaultMessage:"{amount} discount",description:"Represents a certain amount of discount, where {amount} is replaced with the amount"},{amount:e.unref(q.formatAmount)(t.priceDetailsBand.amount)}).toUpperCase()),1)]),key:"0"}:t.priceDetailsBand.percentage?{name:"chip-content",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.percentage_discount",defaultMessage:"{percentage}% discount",description:"Represents a certain percentage of discount, where {percentage} is replaced with the percentage (number only)"},{percentage:t.priceDetailsBand.percentage??"0"}).toUpperCase()),1)]),key:"1"}:void 0]),1024)):t.clauseType==="ADJUSTMENT"?(e.openBlock(),e.createBlock(e.unref(G),{key:1,"icon-name":"info"},{"chip-content":e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.adjustment_chip_body",defaultMessage:"Adjustment",description:"Used on invoice lines to mark as adjusted"}).toUpperCase()),1)]),_:1})):t.clauseType==="MARKUP"?(e.openBlock(),e.createBlock(e.unref(G),{key:2,"icon-name":"north_east"},{"chip-content":e.withCtx(()=>{var r;return[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.markup_percentage",defaultMessage:"{percentage}% markup",description:"Markup percentage, where {percentage} is replaced with the percentage (number only)"},{percentage:((r=t.priceDetailsBand)==null?void 0:r.percentage)??"0"}).toUpperCase()),1)]}),_:1})):t.clauseType==="COMMITMENT"?(e.openBlock(),e.createBlock(e.unref(G),{key:3,"icon-name":"sell"},{"chip-content":e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.commitment",defaultMessage:"commitment",description:"Used on invoice lines to mark as commitment"}).toUpperCase()),1)]),_:1})):e.createCommentVNode("",!0)]))}}),$e=["tabindex","onClick"],Me={class:"flex items-center"},De=e.defineComponent({__name:"InvoiceCommitment",props:{commitments:{},groupOrder:{},invoicePeriodOrder:{},processingOnlyCustomers:{},displayInvoiceSubLinesPerProcessingOnlyCustomer:{type:Boolean}},setup(t){const n=C.useIntl(),{getIsOpen:a,toggle:i}=W.useToggleList(),r=(l,s)=>{i(o(l,s))},o=(l,s)=>`${l}-line-${s}`,d=l=>{var s;return l.description??((s=l.details)==null?void 0:s.description)??n.$t({id:"generic.not_available",defaultMessage:"N/A",description:"Used in scenarios where no data is available to be displayed"})};return(l,s)=>(e.openBlock(),e.createBlock($,null,{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(x,{left:"",colspan:"5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.unit",defaultMessage:"Unit",description:"Table header for the column containing the number of units of invoice groups"})),1)]),_:1}),e.createVNode(x,{right:"",class:"w-60"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.sub_total",defaultMessage:"Subtotal",description:"Table header for the column containing the subtotal for invoices"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.commitments,(c,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:u},[e.createElementVNode("tr",{class:e.normalizeClass(["border-t",{"cursor-pointer":c.sub_lines}]),tabindex:c.sub_lines?0:void 0,onClick:g=>r(t.groupOrder,c.line_order)},[e.createVNode(m,{colspan:"2"},{default:e.withCtx(()=>{var g;return[c.sub_lines?(e.openBlock(),e.createBlock(O._sfc_main$1,{key:0,icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 text-slate-400",{"-rotate-90":!e.unref(a)(o(t.groupOrder,c.line_order))}])},null,8,["class"])):e.createCommentVNode("",!0),e.createElementVNode("div",Me,[e.renderSlot(l.$slots,"invoice-line-prefix",{lineOrder:c.line_order,periodOrder:t.invoicePeriodOrder,groupOrder:t.groupOrder}),e.createVNode(ie,{"clause-type":"COMMITMENT","invoice-line-description":d(c),"price-details-band":(g=c.details)==null?void 0:g.band},null,8,["invoice-line-description","price-details-band"])])]}),_:2},1024),e.createVNode(m,{colspan:"3"},{default:e.withCtx(()=>[...s[0]||(s[0]=[e.createTextVNode(" ",-1)])]),_:1}),e.createVNode(m,{number:""},{default:e.withCtx(()=>{var g,p;return[(g=c.details)!=null&&g.amount?(e.openBlock(),e.createBlock(v._sfc_main,{key:0,value:(p=c.details)==null?void 0:p.amount,"data-testid":e.unref(X)},null,8,["value","data-testid"])):e.createCommentVNode("",!0)]}),_:2},1024)],10,$e),e.createVNode(Q,{ref_for:!0,ref:o(t.groupOrder,c.line_order),"sub-lines":c.sub_lines??[],"line-order":c.line_order,"period-order":t.invoicePeriodOrder,"group-order":t.groupOrder,"is-open":e.unref(a)(o(t.groupOrder,c.line_order)),"processing-only-customers":t.processingOnlyCustomers,"display-invoice-sub-lines-per-processing-only-customer":t.displayInvoiceSubLinesPerProcessingOnlyCustomer},null,8,["sub-lines","line-order","period-order","group-order","is-open","processing-only-customers","display-invoice-sub-lines-per-processing-only-customer"])],64))),128))]),_:3}))}}),Pe=["tabindex","onClick"],Ae={class:"flex items-center"},Le=e.defineComponent({__name:"InvoiceDiscountMarkup",props:{lines:{},type:{},handleToggleItems:{type:Function},formatIndex:{type:Function},expandedItems:{},isExpandable:{type:Boolean},invoicePeriodOrder:{},groupOrder:{},processingOnlyCustomers:{},displayInvoiceSubLinesPerProcessingOnlyCustomer:{type:Boolean}},setup(t){const n=C.useIntl(),{getIsOpen:a,toggle:i}=W.useToggleList(),r=(d,l)=>{i(o(d,l))},o=(d,l)=>`${d}-line-${l}`;return(d,l)=>(e.openBlock(),e.createBlock($,null,{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(x,{left:"",class:"w-3/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.quantity",defaultMessage:"Quantity",description:"Table header for quantity column"})),1)]),_:1}),e.createVNode(x,{colspan:"2"},{default:e.withCtx(()=>[...l[0]||(l[0]=[e.createTextVNode(" ",-1)])]),_:1}),e.createVNode(x,{left:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.type==="DISCOUNT"?e.unref(n).$t({id:"invoice.table_header.discount",defaultMessage:"Discount",description:"Table header for discount column"}):e.unref(n).$t({id:"invoice.table_header.markup",defaultMessage:"Markup",description:"Table header for markup column"})),1)]),_:1}),e.createVNode(x,{left:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.type==="DISCOUNT"?e.unref(n).$t({id:"invoice.table_header.total",defaultMessage:"Total",description:"Table header for total column"}):" "),1)]),_:1}),e.createVNode(x,{right:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.sub_total",defaultMessage:"Subtotal",description:"Table header for the column containing the subtotal for invoices"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.lines,(s,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c},[e.createElementVNode("tr",{class:e.normalizeClass(["border-t",{"cursor-pointer":t.isExpandable}]),tabindex:t.isExpandable?0:void 0,onClick:u=>r(t.groupOrder,s.line_order)},[e.createVNode(m,{class:"w-3/5"},{default:e.withCtx(()=>{var u,g;return[s.sub_lines?(e.openBlock(),e.createBlock(O._sfc_main$1,{key:0,icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 text-slate-400",{"-rotate-90":!e.unref(a)(o(t.groupOrder,s.line_order))}])},null,8,["class"])):e.createCommentVNode("",!0),e.createElementVNode("div",Ae,[e.renderSlot(d.$slots,"invoice-line-prefix",{lineOrder:s.line_order,periodOrder:t.invoicePeriodOrder,groupOrder:t.groupOrder}),s.description?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(s.description),1)],64)):(u=s.details)!=null&&u.description?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString((g=s.details)==null?void 0:g.description),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode("N/A")],64))])]}),_:2},1024),e.createVNode(m,{colspan:"2"},{default:e.withCtx(()=>[...l[1]||(l[1]=[e.createTextVNode(" ",-1)])]),_:1}),e.createVNode(m,{class:"w-1/5 tabular-nums"},{default:e.withCtx(()=>{var u,g,p;return[e.createTextVNode(e.toDisplayString((g=(u=s.details)==null?void 0:u.band)!=null&&g.percentage?`${(p=s.details)==null?void 0:p.band.percentage}%`:" "),1)]}),_:2},1024),e.createVNode(m,{class:"w-1/5"},{default:e.withCtx(()=>[...l[2]||(l[2]=[e.createTextVNode(" ",-1)])]),_:1}),e.createVNode(m,{number:"",class:"w-1/5"},{default:e.withCtx(()=>{var u;return[(u=s.details)!=null&&u.amount?(e.openBlock(),e.createBlock(v._sfc_main,{key:0,value:s.details.amount,"data-testid":e.unref(X)},null,8,["value","data-testid"])):e.createCommentVNode("",!0)]}),_:2},1024)],10,Pe),e.createVNode(Q,{ref_for:!0,ref:o(t.groupOrder,s.line_order),"sub-lines":s.sub_lines??[],"line-order":s.line_order,"is-open":e.unref(a)(o(t.groupOrder,s.line_order)),"period-order":t.invoicePeriodOrder,"group-order":t.groupOrder,"processing-only-customers":t.processingOnlyCustomers,"display-invoice-sub-lines-per-processing-only-customer":t.displayInvoiceSubLinesPerProcessingOnlyCustomer},null,8,["sub-lines","line-order","is-open","period-order","group-order","processing-only-customers","display-invoice-sub-lines-per-processing-only-customer"])],64))),128))]),_:3}))}}),z=t=>{var n;return(n=t.lines)!=null&&n.some(a=>!!a.sub_lines)?Te:void 0},Fe=["tabindex"],Ue={key:0},Re={colspan:"2",class:"p-0"},ze={class:"-mx-9 bg-gray-50 px-9 py-3 text-xs"},qe=e.defineComponent({__name:"InvoiceGroupCommitment",props:{group:{},expandedItems:{},handleToggleItems:{type:Function},formatIndex:{type:Function},invoicePeriodOrder:{},groupOrder:{},isExpandable:{type:Boolean},forceExpanded:{type:Boolean},amountType:{},processingOnlyCustomers:{},displayInvoiceSubLinesPerProcessingOnlyCustomer:{type:Boolean},showTaxPerLineItem:{type:Boolean}},setup(t){const n=C.useIntl();return(a,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("tr",{class:e.normalizeClass(["border-t break-inside-avoid",{"cursor-pointer":t.isExpandable}]),tabindex:t.isExpandable?0:void 0,onClick:i[0]||(i[0]=r=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))),onKeyup:[i[1]||(i[1]=e.withKeys(r=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)),["enter"])),i[2]||(i[2]=e.withKeys(r=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)),["space"]))]},[e.createVNode(m,{class:"p-0"},{default:e.withCtx(()=>[t.isExpandable?(e.openBlock(),e.createBlock(O._sfc_main$1,{key:0,icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 text-slate-400",{"-rotate-90":!t.expandedItems.includes(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))}])},null,8,["class"])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(e.unref(n).$t({id:"invoice.commitment_heading",defaultMessage:"Commitment",description:"Heading used for commitment in invoice tables"})),1)]),_:1}),e.createVNode(m,{number:""},{default:e.withCtx(()=>[t.amountType==="INCLUDING_TAX"?(e.openBlock(),e.createBlock(v._sfc_main,{key:0,value:t.group.amount_including_tax,"data-testid":e.unref(R),"data-type":e.unref(z)(t.group)},null,8,["value","data-testid","data-type"])):(e.openBlock(),e.createBlock(v._sfc_main,{key:1,value:t.group.amount_excluding_tax,"data-testid":e.unref(R),"data-type":e.unref(z)(t.group)},null,8,["value","data-testid","data-type"]))]),_:1})],42,Fe),(t.forceExpanded||t.expandedItems.includes(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)))&&t.group.lines?(e.openBlock(),e.createElementBlock("tr",Ue,[e.createElementVNode("td",Re,[e.createElementVNode("div",ze,[e.createVNode(De,{commitments:t.group.lines,"format-index":t.formatIndex,"handle-toggle-items":t.handleToggleItems,"expanded-items":t.expandedItems,"is-expandable":t.isExpandable,"invoice-period-order":t.invoicePeriodOrder,"group-order":t.groupOrder,"processing-only-customers":t.processingOnlyCustomers,"display-invoice-sub-lines-per-processing-only-customer":t.displayInvoiceSubLinesPerProcessingOnlyCustomer},{"invoice-line-prefix":e.withCtx(r=>[e.renderSlot(a.$slots,"invoice-line-prefix",e.normalizeProps(e.guardReactiveProps(r)))]),_:3},8,["commitments","format-index","handle-toggle-items","expanded-items","is-expandable","invoice-period-order","group-order","processing-only-customers","display-invoice-sub-lines-per-processing-only-customer"])])])])):e.createCommentVNode("",!0)],64))}}),We=["tabindex"],He={key:0},Ge={colspan:"2",class:"p-0"},Xe={class:"-mx-9 bg-gray-50 px-9 py-3 text-xs"},Ke=e.defineComponent({__name:"InvoiceGroupDiscountMarkup",props:{heading:{},group:{},expandedItems:{},handleToggleItems:{type:Function},formatIndex:{type:Function},invoicePeriodOrder:{},groupOrder:{},isExpandable:{type:Boolean},forceExpanded:{type:Boolean},amountType:{},processingOnlyCustomers:{},displayInvoiceSubLinesPerProcessingOnlyCustomer:{type:Boolean},showTaxPerLineItem:{type:Boolean}},setup(t){return(n,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("tr",{class:e.normalizeClass(["border-t break-inside-avoid",{"cursor-pointer":t.isExpandable}]),tabindex:t.isExpandable?0:void 0,onClick:a[0]||(a[0]=i=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))),onKeyup:[a[1]||(a[1]=e.withKeys(i=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)),["enter"])),a[2]||(a[2]=e.withKeys(i=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)),["space"]))]},[e.createVNode(m,{class:"p-0"},{default:e.withCtx(()=>[t.isExpandable?(e.openBlock(),e.createBlock(O._sfc_main$1,{key:0,icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 text-slate-400",{"-rotate-90":!t.expandedItems.includes(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))}])},null,8,["class"])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(t.heading),1)]),_:1}),e.createVNode(m,{number:""},{default:e.withCtx(()=>[t.amountType==="INCLUDING_TAX"?(e.openBlock(),e.createBlock(v._sfc_main,{key:0,value:t.group.amount_including_tax,"data-testid":e.unref(R),"data-type":e.unref(z)(t.group)},null,8,["value","data-testid","data-type"])):(e.openBlock(),e.createBlock(v._sfc_main,{key:1,value:t.group.amount_excluding_tax,"data-testid":e.unref(R),"data-type":e.unref(z)(t.group)},null,8,["value","data-testid","data-type"]))]),_:1})],42,We),(t.forceExpanded||t.expandedItems.includes(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)))&&t.group.lines?(e.openBlock(),e.createElementBlock("tr",He,[e.createElementVNode("td",Ge,[e.createElementVNode("div",Xe,[e.createVNode(Le,{type:t.group.type,lines:t.group.lines,"format-index":t.formatIndex,"handle-toggle-items":t.handleToggleItems,"expanded-items":t.expandedItems,"is-expandable":t.isExpandable,"invoice-period-order":t.invoicePeriodOrder,"group-order":t.groupOrder,"processing-only-customers":t.processingOnlyCustomers,"display-invoice-sub-lines-per-processing-only-customer":t.displayInvoiceSubLinesPerProcessingOnlyCustomer},{"invoice-line-prefix":e.withCtx(i=>[e.renderSlot(n.$slots,"invoice-line-prefix",e.normalizeProps(e.guardReactiveProps(i)))]),_:3},8,["type","lines","format-index","handle-toggle-items","expanded-items","is-expandable","invoice-period-order","group-order","processing-only-customers","display-invoice-sub-lines-per-processing-only-customer"])])])])):e.createCommentVNode("",!0)],64))}}),je=(t,n)=>{if(n)return t.forwarded_from_customer_id},Ye=t=>{let n={kind:"default"},a={kind:"default"};if(t.tier_lower_bound&&"number"in t.tier_lower_bound)n={kind:"number",value:+t.tier_lower_bound.number};else if(t.tier_lower_bound&&"amount"in t.tier_lower_bound){const{quantity:i,currency:r}=t.tier_lower_bound.amount;n={kind:"amount",currency:r,quantity:i??0}}if(t.tier_top_bound&&"number"in t.tier_top_bound)a={kind:"number",value:+t.tier_top_bound.number};else if(t.tier_top_bound&&"amount"in t.tier_top_bound){const{quantity:i,currency:r}=t.tier_top_bound.amount;a={kind:"amount",currency:r,quantity:i}}return{lowerBound:n,topBound:a}},Qe=t=>{var n,a,i,r;switch(t==null?void 0:t.price_bound){case"BELOW_MINIMUM_AMOUNT":return{kind:"band_minimum_amount",amount:(n=t.band)==null?void 0:n.minimum_amount};case"NOT_HIT":return{kind:"price_bound_within_bounds"};case"ABOVE_MAXIMUM_AMOUNT":return{kind:"price_bound_maximum_amount",amount:(a=t.band)==null?void 0:a.maximum_amount};case"BELOW_MINIMUM_NUMBER":return{kind:"band_minimum_number",value:(i=t.band)==null?void 0:i.minimum_number};case"ABOVE_MAXIMUM_NUMBER":return{kind:"band_maximum_number",value:(r=t.band)==null?void 0:r.maximum_number};default:return{kind:"none"}}},Je={class:"items-left flex flex-col gap-1 leading-none"},Ze={class:"flex items-center"},et={key:0,class:"ml-1 text-xs text-secondary"},tt={key:0},nt={key:1,class:"text-xs text-secondary"},ot={key:2,class:"text-xs text-secondary"},at={class:"text-[9pt] text-secondary"},it=e.defineComponent({__name:"InvoiceLineRow",props:{data:{},isLast:{type:Boolean},periodOrder:{},groupOrder:{},groupType:{},isExpanded:{type:Boolean}},setup(t){const{$t:n,formatNumber:a}=C.useIntl(),i=t,r=c=>{if(c.kind!=="default")return c.kind==="number"?a(c.value):`${c.currency} ${c.quantity}`},o=c=>{if(!c)return"";const{lowerBound:u,topBound:g}=Ye(c),p=r(g);return(r(u)??"0")+(p?` - ${p}`:"+")},d=e.computed(()=>{var c;return(c=i.data.details)==null?void 0:c.included_volume_details}),l=e.computed(()=>Qe(i.data.details)),s=e.computed(()=>{var c,u;return(c=i.data)!=null&&c.product_items?Y.getComposedString(i.data.product_items.map(g=>g.name)):((u=i.data)==null?void 0:u.description)??"N/A"});return(c,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(m,{class:"align-top"},{default:e.withCtx(()=>{var g,p,b,B,_,y,E,k,w;return[e.createElementVNode("div",Je,[e.createElementVNode("div",null,[t.data.sub_lines?(e.openBlock(),e.createBlock(O._sfc_main$1,{key:0,icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 -translate-y-2 text-slate-400",{"-rotate-90":!t.isExpanded}])},null,8,["class"])):e.createCommentVNode("",!0),e.createElementVNode("div",Ze,[e.renderSlot(c.$slots,"invoice-line-prefix",{lineOrder:t.data.line_order,periodOrder:t.periodOrder,groupOrder:t.groupOrder}),["PRICING","REVENUE","ONE_OFF"].includes(t.data.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(s.value)+" ",1),t.data.type==="ONE_OFF"&&t.groupType!=="ONE_OFF"?(e.openBlock(),e.createElementBlock("div",et,e.toDisplayString(e.unref(q.formatEnum)(t.data.type)),1)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(ie,{key:1,"invoice-line-description":s.value,"clause-type":t.data.type,"price-details-band":(g=t.data.details)==null?void 0:g.band},null,8,["invoice-line-description","clause-type","price-details-band"]))])]),["TIERED","STAIR_STEP","TOP_TIERED"].includes(t.data.pricing_type)&&!d.value&&((p=t.data.details)!=null&&p.band)?(e.openBlock(),e.createElementBlock("div",tt,e.toDisplayString(o((b=t.data.details)==null?void 0:b.band)),1)):e.createCommentVNode("",!0),(_=(B=t.data.details)==null?void 0:B.split_pricing)!=null&&_.meter_properties?(e.openBlock(),e.createElementBlock("span",nt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((E=(y=t.data.details)==null?void 0:y.split_pricing)==null?void 0:E.meter_properties,(I,S)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createTextVNode(e.toDisplayString(I.meter_property.name)+": "+e.toDisplayString(I.value),1),S<t.data.details.split_pricing.meter_properties.length-1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(", "))],64)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),(k=t.data.conditions)!=null&&k.name||(w=t.data.conditions)!=null&&w.meter_properties?(e.openBlock(),e.createElementBlock("div",ot,[t.data.conditions.name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(t.data.conditions.name),1)],64)):t.data.conditions.meter_properties?(e.openBlock(),e.createBlock(e.unref(W._sfc_main),{key:1,comparators:t.data.conditions.meter_properties},null,8,["comparators"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),e.createElementVNode("span",at,[l.value.kind==="band_minimum_amount"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(e.unref(n)({id:"invoice.line.band_minimum_amount",defaultMessage:"Band minimum amount",description:"Minimum amount specified in a band"}))+" ",1),l.value.amount?(e.openBlock(),e.createBlock(v._sfc_main,{key:0,value:l.value.amount},null,8,["value"])):e.createCommentVNode("",!0)],64)):l.value.kind==="price_bound_within_bounds"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(e.unref(n)({id:"invoice.line.price_bound_within_bounds",defaultMessage:"Within bounds",description:"Label used when min and max bounds are specified but reached"})),1)],64)):l.value.kind==="price_bound_maximum_amount"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(e.unref(n)({id:"invoice.line.price_bound_maximum_amount",defaultMessage:"Maximum amount",description:"Maximum amount specified in a band"}))+" ",1),l.value.amount?(e.openBlock(),e.createBlock(v._sfc_main,{key:0,value:l.value.amount},null,8,["value"])):e.createCommentVNode("",!0)],64)):l.value.kind==="band_minimum_number"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createTextVNode(e.toDisplayString(e.unref(n)({id:"invoice.line.band_minimum_number",defaultMessage:"Minimum number",description:"Minimum number of units specified in a band"}))+" "+e.toDisplayString(l.value.value),1)],64)):l.value.kind==="band_maximum_number"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createTextVNode(e.toDisplayString(e.unref(n)({id:"invoice.line.band_maximum_number",defaultMessage:"Maximum number",description:"Maximum number of units specified in a band"}))+" "+e.toDisplayString(l.value.value),1)],64)):e.createCommentVNode("",!0)])]}),_:3}),e.renderSlot(c.$slots,"line-content",{details:t.data.details})],64))}}),rt=(t,n,a)=>{var i,r;if(t==="PASS_THROUGH")return{kind:"hidden"};if(a&&((r=(i=n==null?void 0:n.conversion)==null?void 0:i.credits)!=null&&r.quantity))return{kind:"conversion-credits",value:n.conversion.credits.quantity};if(n!=null&&n.price_bound){const{price_bound:o,meter_value:d,band:l}=n;return o==="BELOW_MINIMUM_AMOUNT"||o==="ABOVE_MAXIMUM_AMOUNT"?{kind:"raw",value:d.count}:o==="NOT_HIT"&&"amount"in d&&d.amount?{kind:"amount",amount:d.amount}:o==="NOT_HIT"&&"number"in d&&d.number?{kind:"raw",value:d.number}:o==="RATIO"&&d.number?{kind:"number",value:+d.number}:o==="BELOW_MINIMUM_NUMBER"&&(l!=null&&l.minimum_number)?{kind:"number",value:+l.minimum_number}:o==="ABOVE_MAXIMUM_NUMBER"&&(l!=null&&l.maximum_number)?{kind:"number",value:+l.maximum_number}:{kind:"hidden"}}return n!=null&&n.meter_value&&"number"in n.meter_value?{kind:"number",value:+n.meter_value.number}:n!=null&&n.meter_value&&"amount"in n.meter_value?{kind:"amount",amount:n.meter_value.amount}:{kind:"one"}},lt=["NOT_HIT","BELOW_MINIMUM_NUMBER","ABOVE_MAXIMUM_NUMBER"],ct=(t,n,a)=>{if(t==="PASS_THROUGH")return{kind:"pass-through"};if(n!=null&&n.price_bound){const{price_bound:o,band:d,amount:l}=n;if(o==="BELOW_MINIMUM_AMOUNT"&&(d!=null&&d.minimum_amount))return{kind:"amount",amount:d.minimum_amount};if(o==="ABOVE_MAXIMUM_AMOUNT"&&(d!=null&&d.maximum_amount))return{kind:"amount",amount:d.maximum_amount};if(o==="RATIO")return{kind:"amount",amount:(a==="PER_SEAT"?d==null?void 0:d.amount:void 0)??l,suffix:{kind:"tier-top-bound"}};if(lt.includes(o)){if(d&&d.amount)return{kind:"amount",amount:d.amount};if(d&&"percentage"in d)return{kind:"percentage",value:d.percentage};if(d&&l)return{kind:"amount",amount:l,suffix:{kind:"fixed-amount"}}}return{kind:"hidden"}}const i=n==null?void 0:n.band,r=n==null?void 0:n.amount;return i&&i.amount?{kind:"amount",amount:i.amount,suffix:{kind:"block-size-or-per-unit"}}:i&&"percentage"in i?{kind:"percentage",value:i.percentage}:i&&r?t==="STAIR_STEP"||t==="STAIR_STEP_TOP_UP"?{kind:"amount",amount:r,suffix:{kind:"fixed-amount"}}:t==="TOP_TIERED"?{kind:"amount",amount:r,suffix:{kind:"per-unit"}}:t==="FLAT"?{kind:"amount",amount:r,suffix:{kind:"flat-fee"}}:{kind:"amount",amount:r}:{kind:"hidden"}},dt={key:5,class:"text-xs text-secondary"},st={key:1,class:"tabular-nums"},ut={key:0,class:"text-2xs text-secondary"},mt={key:1,class:"text-2xs text-secondary"},ft={key:0,class:"text-2xs text-secondary"},gt={key:1,class:"text-2xs text-secondary"},pt={key:2,class:"text-2xs text-secondary"},vt={key:3,class:"text-2xs text-secondary"},xt={key:4,class:"text-2xs text-secondary"},yt={class:"text-2xs text-secondary"},kt={key:0,class:"flex justify-end"},ht={class:"flex items-center justify-end gap-1"},bt={key:0,class:"text-2xs tabular-nums text-secondary"},Bt={key:1,class:"inline-block"},_t={class:"flex items-center justify-end gap-1"},Z=e.defineComponent({__name:"InvoiceRowContent",props:{pricingType:{},details:{},taxCategories:{},amountType:{},hideTaxDetails:{type:Boolean},modelType:{},showTaxPerLineItem:{type:Boolean,default:!0},preferConversionCredits:{type:Boolean}},setup(t){const n=t,a=e.computed(()=>{var y;return(y=n.details)==null?void 0:y.included_volume_details}),i=e.computed(()=>{var y;return(y=a.value)==null?void 0:y.available_included_volume}),r=e.computed(()=>rt(n.pricingType,n.details,n.preferConversionCredits)),o=e.computed(()=>ct(n.pricingType,n.details,n.modelType)),{$t:d,formatNumber:l}=C.useIntl(),s=e.computed(()=>d({id:"invoice.line.fixed_amount",defaultMessage:"Fixed amount",description:"Label shown when a price band charges a fixed amount regardless of usage"})),c=e.computed(()=>d({id:"invoice.line.flat_fee",defaultMessage:"Flat fee",description:"Label shown for a flat, usage-independent fee"})),u=e.computed(()=>{var y,E;const k=(E=(y=n.details)==null?void 0:y.band)==null?void 0:E.tier_top_bound;return k&&"number"in k?k.number:void 0}),g=e.computed(()=>{if(u.value!==void 0)return d({id:"invoice.line.per_units_tier_top_bound",defaultMessage:"per {count, plural, one {unit} other {{formattedCount} units}}",description:"Number of units a tiered price band applies per. Singular form omits the count."},{count:+u.value,formattedCount:u.value})}),p=e.computed(()=>{var y,E;return n.modelType==="PER_SEAT"?(E=(y=n.details)==null?void 0:y.band)==null?void 0:E.amount:void 0}),b=e.computed(()=>n.modelType==="PER_SEAT"?d({id:"invoice.line.per_seat",defaultMessage:"Per seat",description:"Label shown when a price band applies per single seat"}):d({id:"invoice.line.per_unit",defaultMessage:"Per unit",description:"Label shown when a price band applies per single unit"})),B=e.computed(()=>{var y,E;const k=(E=(y=n.details)==null?void 0:y.band)==null?void 0:E.block_size;return k&&"number"in k?k.number:void 0}),_=e.computed(()=>{if(B.value!==void 0)return d({id:"invoice.line.per_units_block_size",defaultMessage:"Per {count, plural, one {unit} other {{formattedCount} units}}",description:"Number of units a price band block applies per. Singular form omits the count."},{count:+B.value,formattedCount:l(+B.value)})});return(y,E)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(m,{number:"",class:"align-top"},{default:e.withCtx(()=>{var k;return[r.value.kind==="raw"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(r.value.value),1)],64)):r.value.kind==="amount"?(e.openBlock(),e.createBlock(v._sfc_main,{key:1,value:r.value.amount},null,8,["value"])):r.value.kind==="number"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(e.unref(l)(r.value.value)),1)],64)):r.value.kind==="conversion-credits"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createTextVNode(e.toDisplayString(e.unref(l)(+r.value.value,{maximumFractionDigits:e.unref(q.MAX_FRACTION_DIGITS)})),1)],64)):r.value.kind==="one"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createTextVNode("1")],64)):e.createCommentVNode("",!0),r.value.kind!=="conversion-credits"&&r.value.kind!=="hidden"&&!((k=t.details)!=null&&k.price_bound)&&i.value?(e.openBlock(),e.createElementBlock("div",dt,[i.value.type==="AMOUNT"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(v._sfc_main,{value:i.value.amount},null,8,["value"]),e.createTextVNode(" "+e.toDisplayString(e.unref(d)({id:"invoice.line.included",defaultMessage:"included",description:"Used to specify an included amount. Should be lowercase."})),1)],64)):i.value.type==="NUMBER"?(e.openBlock(),e.createElementBlock("span",st,e.toDisplayString(i.value.number)+" "+e.toDisplayString(e.unref(d)({id:"invoice.line.units_included",defaultMessage:"units included",description:"Used to specify an included units. Should be lowercase."})),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]}),_:1}),o.value.kind==="pass-through"?(e.openBlock(),e.createBlock(m,{key:0,class:"text-right align-top"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)({id:"invoice.line.pass_through",defaultMessage:"Pass through",description:"Name of the pass through pricing type"})),1)]),_:1})):(e.openBlock(),e.createBlock(m,{key:1,number:"",class:"align-top"},{default:e.withCtx(()=>{var k,w,I,S,A;return[o.value.kind==="amount"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(v._sfc_main,{value:o.value.amount},null,8,["value"]),((k=o.value.suffix)==null?void 0:k.kind)==="tier-top-bound"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[g.value?(e.openBlock(),e.createElementBlock("div",ut,e.toDisplayString(g.value),1)):p.value?(e.openBlock(),e.createElementBlock("div",mt,e.toDisplayString(b.value),1)):e.createCommentVNode("",!0)],64)):((w=o.value.suffix)==null?void 0:w.kind)==="block-size-or-per-unit"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[_.value?(e.openBlock(),e.createElementBlock("div",ft,e.toDisplayString(_.value),1)):t.modelType!=="RECURRING"?(e.openBlock(),e.createElementBlock("div",gt,e.toDisplayString(b.value),1)):e.createCommentVNode("",!0)],64)):((I=o.value.suffix)==null?void 0:I.kind)==="per-unit"?(e.openBlock(),e.createElementBlock("div",pt,e.toDisplayString(b.value),1)):((S=o.value.suffix)==null?void 0:S.kind)==="fixed-amount"?(e.openBlock(),e.createElementBlock("div",vt,e.toDisplayString(s.value),1)):((A=o.value.suffix)==null?void 0:A.kind)==="flat-fee"?(e.openBlock(),e.createElementBlock("div",xt,e.toDisplayString(c.value),1)):e.createCommentVNode("",!0)],64)):o.value.kind==="percentage"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(o.value.value)+"% ",1)],64)):e.createCommentVNode("",!0)]}),_:1})),t.showTaxPerLineItem?(e.openBlock(),e.createBlock(m,{key:2,number:"",class:"align-top"},{default:e.withCtx(()=>[t.hideTaxDetails?e.createCommentVNode("",!0):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.taxCategories,(k,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:"tabular-nums"},[e.createElementVNode("div",null,e.toDisplayString(k.percentage)+"%",1),e.createElementVNode("div",yt,[e.createVNode(v._sfc_main,{value:k.tax_amount},null,8,["value"])])]))),128))]),_:1})):e.createCommentVNode("",!0),e.createVNode(m,{number:"",class:"align-top"},{default:e.withCtx(()=>{var k,w,I,S,A;return[(w=(k=t.details)==null?void 0:k.amount)!=null&&w.currency&&((S=(I=t.details)==null?void 0:I.amount)!=null&&S.quantity)?(e.openBlock(),e.createElementBlock("div",kt,[t.showTaxPerLineItem?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.taxCategories,(H,f)=>{var N;return e.openBlock(),e.createElementBlock("div",{key:f,class:"inline-block"},[e.createElementVNode("div",ht,[e.createVNode(v._sfc_main,{value:t.details.amount,"data-testid":e.unref(X)},null,8,["value","data-testid"]),((N=t.details)==null?void 0:N.pricing_amount.quantity)!==t.details.amount.quantity?(e.openBlock(),e.createBlock(P._sfc_main,{key:0,placement:"top-end"},{tooltip:e.withCtx(()=>[e.createVNode(P.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(P._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)({id:"invoice.line.original_currency",defaultMessage:"Original currency",description:"Original currency"}))+" ",1),e.createVNode(v._sfc_main,{value:t.details.pricing_amount,class:"font-semibold"},null,8,["value"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(O._sfc_main$1,{icon:"info",size:"2xs"})]),_:1})):e.createCommentVNode("",!0)]),t.hideTaxDetails?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",bt,[t.amountType==="INCLUDING_TAX"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(e.unref(d)({id:"invoice.line.excl.tax",defaultMessage:"Excl. tax",description:"Value excludes tax"}))+" ",1),e.createVNode(v._sfc_main,{value:H.base_amount},null,8,["value"])],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(e.unref(d)({id:"invoice.line.incl.tax",defaultMessage:"Incl. tax",description:"Value includes tax"}))+" ",1),e.createVNode(v._sfc_main,{value:H.total_amount},null,8,["value"])],64))]))])}),128)):(e.openBlock(),e.createElementBlock("div",Bt,[e.createElementVNode("div",_t,[e.createVNode(v._sfc_main,{value:t.details.amount,"data-testid":e.unref(X)},null,8,["value","data-testid"]),((A=t.details)==null?void 0:A.pricing_amount.quantity)!==t.details.amount.quantity?(e.openBlock(),e.createBlock(P._sfc_main,{key:0,placement:"top-end"},{tooltip:e.withCtx(()=>[e.createVNode(P.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(P._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)({id:"invoice.line.original_currency",defaultMessage:"Original currency",description:"Original currency"}))+" ",1),e.createVNode(v._sfc_main,{value:t.details.pricing_amount,class:"font-semibold"},null,8,["value"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(O._sfc_main$1,{icon:"info",size:"2xs"})]),_:1})):e.createCommentVNode("",!0)])])),e.renderSlot(y.$slots,"one-off-line-context-menu")])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode("-")],64))]}),_:3})],64))}}),Nt=["tabindex","onClick"],re=e.defineComponent({__name:"InvoiceLineGroup",props:{group:{},startDate:{},endDate:{},total:{},amountType:{},invoicePeriodOrder:{},processingOnlyCustomers:{},displayInvoiceSubLinesPerProcessingOnlyCustomer:{type:Boolean},showTaxPerLineItem:{type:Boolean,default:!0},isExpandable:{type:Boolean,default:!0}},setup(t){const n=t,a=e.computed(()=>{var s;return(s=[...n.group.lines??[]])==null?void 0:s.sort((c,u)=>c.line_order-u.line_order)}),i=C.useIntl(),{getIsOpen:r,toggle:o}=W.useToggleList(),d=(s,c)=>{o(l(s,c))},l=(s,c)=>`${s}-line-${c}`;return(s,c)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode($,null,{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(x,{left:"",class:"w-1/5 text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).$t({id:"invoice.table_header.unit",defaultMessage:"Unit",description:"Table header for the column containing the number of units of invoice groups"})),1)]),_:1}),e.createVNode(x,{right:"",class:"w-1/5 text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).$t({id:"invoice.table_header.quantity",defaultMessage:"Quantity",description:"Table header for quantity column"})),1)]),_:1}),e.createVNode(x,{right:"",class:"w-1/5 text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).$t({id:"invoice.table_header.price",defaultMessage:"Price",description:"Table header for the column containing the number of units of invoice groups"})),1)]),_:1}),t.showTaxPerLineItem?(e.openBlock(),e.createBlock(x,{key:0,right:"",class:"w-1/5 text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).$t({id:"invoice.table_header.tax_rate",defaultMessage:"Tax rate",description:"Table header for the column containing the tax percentage of invoice groups"})),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(x,{right:"",class:"w-1/5 text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).$t({id:"invoice.table_header.sub_total",defaultMessage:"Subtotal",description:"Table header for the column containing the subtotal for invoices"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(u,g)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:g},[e.createElementVNode("tr",{tabindex:t.isExpandable&&u.sub_lines?0:void 0,class:e.normalizeClass(["group",{"cursor-pointer":t.isExpandable&&u.sub_lines,"border-t":g!==0}]),onClick:p=>d(t.group.group_order,u.line_order)},[(e.openBlock(),e.createBlock(it,{key:g,data:u,"period-order":t.invoicePeriodOrder,"group-order":t.group.group_order,"is-last":g===a.value.length-1,"group-type":t.group.type,"is-expanded":e.unref(r)(l(t.group.group_order,u.line_order))},{"invoice-line-prefix":e.withCtx(p=>[e.renderSlot(s.$slots,"invoice-line-prefix",e.mergeProps({ref_for:!0},p))]),"line-content":e.withCtx(p=>{var b,B;return[e.createVNode(Z,{details:p.details,"pricing-type":u.pricing_type,"tax-categories":u.tax_categories,"amount-type":t.amountType,"model-type":(B=(b=u.product_items)==null?void 0:b[0])==null?void 0:B.model_type,"show-tax-per-line-item":t.showTaxPerLineItem},e.createSlots({_:2},[u.type==="ONE_OFF"?{name:"one-off-line-context-menu",fn:e.withCtx(_=>[e.renderSlot(s.$slots,"one-off-line-context-menu",e.mergeProps({ref_for:!0},_,{lineOrder:u.line_order}))]),key:"0"}:void 0]),1032,["details","pricing-type","tax-categories","amount-type","model-type","show-tax-per-line-item"])]}),_:2},1032,["data","period-order","group-order","is-last","group-type","is-expanded"]))],10,Nt),e.createVNode(Q,{ref_for:!0,ref:l(t.group.group_order,u.line_order),"sub-lines":u.sub_lines??[],"processing-only-customers":t.processingOnlyCustomers,"display-invoice-sub-lines-per-processing-only-customer":t.displayInvoiceSubLinesPerProcessingOnlyCustomer,"line-order":u.line_order,"is-open":e.unref(r)(l(t.group.group_order,u.line_order)),"period-order":t.invoicePeriodOrder,"group-order":t.group.group_order,"show-tax-per-line-item":t.showTaxPerLineItem},{"invoice-line-prefix":e.withCtx(p=>[e.renderSlot(s.$slots,"invoice-line-prefix",e.mergeProps({ref_for:!0},p))]),"subline-content":e.withCtx(p=>{var b,B;return[e.createVNode(Z,{details:p.details,"hide-tax-details":p.hideTaxDetails,"prefer-conversion-credits":"","pricing-type":u.pricing_type,"tax-categories":u.tax_categories,"amount-type":t.amountType,"model-type":(B=(b=u.product_items)==null?void 0:b[0])==null?void 0:B.model_type,"show-tax-per-line-item":t.showTaxPerLineItem},null,8,["details","hide-tax-details","pricing-type","tax-categories","amount-type","model-type","show-tax-per-line-item"])]}),_:2},1032,["sub-lines","processing-only-customers","display-invoice-sub-lines-per-processing-only-customer","line-order","is-open","period-order","group-order","show-tax-per-line-item"])],64))),128))]),_:3})]))}}),Ct={class:"flex items-center"},Tt={key:2,class:"ml-1 inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded-full bg-primary-100 text-2xs font-bold text-primary-600"},j=e.defineComponent({__name:"InvoiceTableRowLabel",props:{label:{},count:{}},setup(t){const n=e.ref(),a=e.ref(!1);return ue.useResizeObserver(n,([i])=>{a.value=i.target.clientWidth<i.target.scrollWidth}),(i,r)=>(e.openBlock(),e.createElementBlock("div",Ct,[a.value?(e.openBlock(),e.createBlock(P._sfc_main,{key:0,placement:"bottom-start",class:"min-w-0 leading-normal"},{tooltip:e.withCtx(()=>[e.createVNode(P.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(P._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("span",{ref_key:"labelElement",ref:n,class:"block truncate"},e.toDisplayString(t.label),513)]),_:1})):(e.openBlock(),e.createElementBlock("span",{key:1,ref_key:"labelElement",ref:n,class:e.normalizeClass(["block",{truncate:t.count!==void 0}])},e.toDisplayString(t.label),3)),t.count!==void 0?(e.openBlock(),e.createElementBlock("span",Tt,e.toDisplayString(t.count),1)):e.createCommentVNode("",!0)]))}}),Vt=["tabindex"],Et={key:0},wt={colspan:"2",class:"p-0"},Ot={class:"-mx-9 bg-gray-50 px-9 py-3 text-xs"},It=e.defineComponent({__name:"InvoiceGroupRevenue",props:{forwardedFromCustomers:{},showOriginalCustomerInvoiceLine:{},group:{},expandedItems:{},handleToggleItems:{},formatIndex:{},invoicePeriodOrder:{},groupOrder:{},isExpandable:{type:Boolean},forceExpanded:{type:Boolean},amountType:{},processingOnlyCustomers:{},displayInvoiceSubLinesPerProcessingOnlyCustomer:{type:Boolean},showTaxPerLineItem:{type:Boolean,default:!0}},setup(t){const n=t,a=e.computed(()=>{var i,r,o;const d=[(i=n.group.pricing)==null?void 0:i.name,Y.getComposedString(((r=n.group.products)==null?void 0:r.map(c=>c.name))??[])].filter(Boolean).join(" - "),l=je(n.group,!!n.showOriginalCustomerInvoiceLine);if(!l)return d;const s=(o=n.forwardedFromCustomers)==null?void 0:o.find(c=>c.id===l);return[s&&ae.getCustomerName(s),d].filter(Boolean).join(" - ")});return(i,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("tr",{class:e.normalizeClass(["border-t break-inside-avoid",{"cursor-pointer":t.isExpandable}]),tabindex:t.isExpandable?0:void 0,onClick:r[0]||(r[0]=o=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))),onKeyup:[r[1]||(r[1]=e.withKeys(o=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)),["enter"])),r[2]||(r[2]=e.withKeys(o=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)),["space"]))]},[e.createVNode(m,{class:"p-0"},{default:e.withCtx(()=>{var o;return[t.isExpandable?(e.openBlock(),e.createBlock(O._sfc_main$1,{key:0,icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 text-slate-400",{"-rotate-90":!t.expandedItems.includes(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))}])},null,8,["class"])):e.createCommentVNode("",!0),e.createVNode(j,{label:a.value,count:t.isExpandable?((o=t.group.lines)==null?void 0:o.length)??0:void 0},null,8,["label","count"])]}),_:1}),e.createVNode(m,{number:""},{default:e.withCtx(()=>[t.amountType==="INCLUDING_TAX"?(e.openBlock(),e.createBlock(v._sfc_main,{key:0,value:t.group.amount_including_tax,"data-testid":e.unref(R),"data-type":e.unref(z)(t.group)},null,8,["value","data-testid","data-type"])):(e.openBlock(),e.createBlock(v._sfc_main,{key:1,value:t.group.amount_excluding_tax,"data-testid":e.unref(R),"data-type":e.unref(z)(t.group)},null,8,["value","data-testid","data-type"]))]),_:1})],42,Vt),t.forceExpanded||t.expandedItems.includes(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))?(e.openBlock(),e.createElementBlock("tr",Et,[e.createElementVNode("td",wt,[e.createElementVNode("div",Ot,[e.createVNode(re,{"invoice-period-order":t.invoicePeriodOrder,"start-date":t.group.start_at,"end-date":t.group.end_at,total:t.group.amount_excluding_tax,group:t.group,"amount-type":t.amountType,"processing-only-customers":t.processingOnlyCustomers,"display-invoice-sub-lines-per-processing-only-customer":t.displayInvoiceSubLinesPerProcessingOnlyCustomer,"show-tax-per-line-item":t.showTaxPerLineItem,"is-expandable":t.isExpandable},{"invoice-line-prefix":e.withCtx(o=>[e.renderSlot(i.$slots,"invoice-line-prefix",e.normalizeProps(e.guardReactiveProps(o)))]),"one-off-line-context-menu":e.withCtx(o=>[e.renderSlot(i.$slots,"one-off-line-context-menu",e.mergeProps(o,{groupOrder:t.groupOrder}))]),_:3},8,["invoice-period-order","start-date","end-date","total","group","amount-type","processing-only-customers","display-invoice-sub-lines-per-processing-only-customer","show-tax-per-line-item","is-expandable"])])])])):e.createCommentVNode("",!0)],64))}}),ee=e.defineComponent({__name:"InvoiceGroupWalletBalance",props:{lines:{},creditTypes:{}},setup(t){const n=t,{$t:a}=C.useIntl(),i=e.computed(()=>K.getLabelledInvoiceWalletBalanceRows(K.getInvoiceWalletBalanceRows(n.lines),{creditTypes:n.creditTypes,creditsLabel:a({defaultMessage:"Credits",description:"Generic fallback label for a wallet balance row with no known credit type",id:"invoiceGroupWalletBalance.creditsLabel"}),walletLabel:a({defaultMessage:"Wallet balance",description:"Label for a wallet balance row of a wallet that pays in money",id:"invoiceGroupWalletBalance.walletBalanceLabel"})})),r=o=>K.formatInvoiceWalletBalanceValue(o,{formatMoney:q.formatAmount,formatQuantity:d=>d});return(o,d)=>i.value.length?(e.openBlock(),e.createBlock($,{key:0},{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(x,{left:"",class:"w-2/5 text-gray-400"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Wallet breakdown",description:"Table heading for the wallet column in the wallet balance table",id:"invoiceGroupWalletBalance.walletBreakdownHeading"})),1)]),_:1}),e.createVNode(x,{right:"",class:"w-1/5 text-gray-400"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Balance",description:"Table heading for the balance column in the wallet balance table",id:"invoiceGroupWalletBalance.balanceHeading"})),1)]),_:1}),e.createVNode(x,{right:"",class:"w-1/5 text-gray-400"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Used",description:"Table heading for the used-balance column in the wallet balance table",id:"invoiceGroupWalletBalance.usedHeading"})),1)]),_:1}),e.createVNode(x,{right:"",class:"w-1/5 text-gray-400"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Remaining",description:"Table heading for the remaining-balance column in the wallet balance table",id:"invoiceGroupWalletBalance.remainingHeading"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,l=>(e.openBlock(),e.createElementBlock("tr",{key:l.key},[e.createVNode(m,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.label),1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r(l.availableBalance)),1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r(l.usedBalance)),1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r(l.leftBalance)),1)]),_:2},1024)]))),128))]),_:1})):e.createCommentVNode("",!0)}});function te(t){return typeof t=="function"?t():e.unref(t)}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function St(t=!1,n={}){const{truthyValue:a=!0,falsyValue:i=!1}=n,r=e.isRef(t),o=e.ref(t);function d(l){if(arguments.length)return o.value=l,o.value;{const s=te(a);return o.value=o.value===s?te(i):s,o.value}}return r?d:[o,d]}const $t={key:0,totals:"",class:"border-t break-inside-avoid"},ne=e.defineComponent({__name:"InvoiceSummaryTotalExcludingTax",props:{baseAmount:{}},setup(t){const n=C.useIntl();return(a,i)=>t.baseAmount?(e.openBlock(),e.createElementBlock("tr",$t,[e.createVNode(m,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.total_excluding_taxes",defaultMessage:"Total excluding taxes",description:"Table row header for the total excluding taxes column in the invoice table"})),1)]),_:1}),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:t.baseAmount,"data-testid":e.unref(Be)},null,8,["value","data-testid"])]),_:1})])):e.createCommentVNode("",!0)}}),Mt={key:0,class:"border-t font-bold break-inside-avoid"},oe=e.defineComponent({__name:"InvoiceSummaryTotalIncludingTax",props:{totalAmount:{},isCustomerFacing:{type:Boolean}},setup(t){const n=C.useIntl();return(a,i)=>t.totalAmount?(e.openBlock(),e.createElementBlock("tr",Mt,[e.createVNode(m,{class:"font-bold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.isCustomerFacing?e.unref(n).$t({id:"invoice.table_header.total_including_taxes_customer_facing",defaultMessage:"Total due today",description:"Table row header for the total including taxes column in the invoice table for a customer facing component"}):e.unref(n).$t({id:"invoice.table_header.total_including_taxes",defaultMessage:"Total including taxes",description:"Table row header for the total including taxes column in the invoice table"})),1)]),_:1}),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:t.totalAmount,"data-testid":e.unref(be)},null,8,["value","data-testid"])]),_:1})])):e.createCommentVNode("",!0)}}),Dt={key:0,colspan:"4",class:"p-0"},Pt=e.defineComponent({__name:"InvoiceTaxes",props:{taxCategories:{}},setup(t){const n=C.useIntl();return(a,i)=>(e.openBlock(),e.createBlock($,{class:"table-fixed"},{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(x,{left:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.tax type",defaultMessage:"Tax type",description:"Table header for the column containing the tax type"})),1)]),_:1}),e.createVNode(x,{right:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.base amount",defaultMessage:"Base amount",description:"Table header for the column containing the base amount"})),1)]),_:1}),e.createVNode(x,{right:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.tax_percentage",defaultMessage:"Percentage",description:"Table header for the column containing the tax percentage"})),1)]),_:1}),e.createVNode(x,{right:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.tax amount",defaultMessage:"Tax amount",description:"Table header for the column containing the tax amount"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.taxCategories,(r,o)=>(e.openBlock(),e.createElementBlock("tr",{key:o},[r.rates?(e.openBlock(),e.createElementBlock("td",Dt,[e.createVNode($,{class:"table-fixed"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.rates,(d,l)=>(e.openBlock(),e.createElementBlock("tr",{key:l},[e.createVNode(m,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.name)+" ("+e.toDisplayString(r.category)+") ",1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:r.base_amount},null,8,["value"])]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.percentage)+"%",1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:d.tax_amount},null,8,["value"])]),_:2},1024)]))),128))]),_:2},1024)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(m,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.name)+" ("+e.toDisplayString(r.category)+") ",1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:r.base_amount},null,8,["value"])]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.percentage)+"%",1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:r.tax_amount},null,8,["value"])]),_:2},1024)],64))]))),128))]),_:1}))}}),At={class:"flex items-start justify-between"},Lt={key:0,class:"max-h-9"},Ft={class:"flex flex-col gap-2"},Ut={key:0},Rt={key:3},zt={colspan:"2",class:"p-0"},qt=["tabindex"],Wt={key:1},Ht={colspan:"2",class:"p-0"},Gt={class:"-mx-9 bg-gray-50 px-9 py-3 text-xs"},Xt=["tabindex","onClick","onKeyup"],Kt={key:0},jt={colspan:"2",class:"p-0"},Yt={class:"-mx-9 bg-gray-50 px-9 py-3 text-xs"},Qt={key:1},Jt={colspan:"2",class:"p-0"},Zt={key:0,class:"break-inside-avoid border-t font-bold"},en=e.defineComponent({__name:"InvoiceSummary",props:{invoice:{},isExpandable:{type:Boolean,default:!1},forceExpanded:{type:Boolean,default:!1},heading:{default:"details"},isInvoiceLineCreatable:{type:Boolean,default:!1},isNoteCreatable:{type:Boolean,default:!1},showRenderedServicesHeader:{type:Boolean,default:!0},isCustomerFacing:{type:Boolean},showTotals:{type:Boolean,default:!0},hideOneOffWalletBalance:{type:Boolean,default:!1},showWalletBalance:{type:Boolean,default:!0}},emits:["add-invoice-line","add-note"],setup(t,{emit:n}){const a=C.useIntl(),{formatMessage:i}=a,r=n,o=t,[d,l]=J(),[s,c]=J(),[u,g]=St(),p=(...f)=>{o.isExpandable&&l(...f)},b=f=>{o.isExpandable&&c(f)},B=()=>{!o.invoice.tax_categories||!o.isExpandable||g()},_=(f,N)=>+`${f}${N}`,y=f=>a.$t({id:"invoice.service_period_heading",defaultMessage:"Service period - {start_at} - {end_at}",description:"Heading for rendered services where {start_at} is replaced for the start date and {end_at} for the end date in invoice summary"},{start_at:a.formatDate({date:f.start_at,format:"date",timezone:C.formatTimezone(o.invoice.customer.timezone),offsetType:"offsetted"}),end_at:a.formatDate({date:f.end_at,format:"date",timezone:C.formatTimezone(o.invoice.customer.timezone),offsetType:"offsetted"})}),E=f=>{switch(f){case"PRICING":case"REVENUE":return a.$t({id:"invoice.table_heading.products",defaultMessage:"Products",description:"Table heading for the column containing the products of the invoice"});case"COMMITMENT":return a.$t({id:"invoice.table_heading.commitments",defaultMessage:"Commitments",description:"Table heading for the column containing the commitments of the invoice"});case"DISCOUNT":return a.$t({id:"invoice.table_heading.discounts",defaultMessage:"Discounts",description:"Table heading for the column containing the discounts of the invoice"});case"MARKUP":return a.$t({id:"invoice.table_heading.markups",defaultMessage:"Markups",description:"Table heading for the column containing the markups of the invoice"});case"ONE_OFF":return a.$t({id:"invoice.table_heading.one_offs",defaultMessage:"One-off's",description:"Table heading for the column containing the one-offs of the invoice"})}},k=f=>{var N,T;return(N=f.products)!=null&&N.length?[(T=f.pricing)==null?void 0:T.name,Y.getComposedString(f.products.map(V=>V.name))].filter(Boolean).join(" - "):f.description??""},w=f=>o.showWalletBalance&&!(o.hideOneOffWalletBalance&&f.type==="ONE_OFF")&&(f.lines??[]).some(N=>{var T,V;return!!((V=(T=N.details)==null?void 0:T.wallet_balances)!=null&&V.length)}),I=f=>f.groups.reduce((N,T)=>T.type in N?{...N,[T.type]:[...N[T.type],T]}:{...N,[T.type]:[T]},{}),S=e.computed(()=>{const f=[];return["ONE_OFF","STANDARD","ONE_OFF_CREDIT"].includes(o.invoice.type)&&["DRAFT","OPEN"].includes(o.invoice.status)&&o.isInvoiceLineCreatable&&f.push({label:i({defaultMessage:"Invoice line",id:"JlhdD2",description:"Label for adding an invoice line"}),onClick:()=>r("add-invoice-line")}),o.isNoteCreatable&&f.push({label:i({defaultMessage:"Note",id:"jB8+k/",description:"Label for adding a note to an invoice"}),onClick:()=>r("add-note")}),f}),A=e.computed(()=>o.invoice.show_tax_per_line_item!==!1),H=e.computed(()=>{if(o.heading==="summary")return a.$t({id:"invoice.summaryTitle",defaultMessage:"Invoice summary",description:"Title for the compact, always-shown invoice summary section"});switch(o.invoice.type){case"CREDIT":return a.$t({id:"invoice.creditDetailsTitle",defaultMessage:"Credit details",description:"Title for the invoice summary of a credit-note invoice"});case"ONE_OFF":return a.$t({id:"invoice.oneOffDetailsTitle",defaultMessage:"One-off details",description:"Title for the invoice summary of a one-off invoice"});case"ONE_OFF_CREDIT":return a.$t({id:"invoice.oneOffCreditDetailsTitle",defaultMessage:"One-off credit details",description:"Title for the invoice summary of a one-off credit-note invoice"});default:return a.$t({id:"invoice.title",defaultMessage:"Details",description:"Title for the invoice summary"})}});return(f,N)=>{var T;return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",At,[f.$slots.logo?(e.openBlock(),e.createElementBlock("div",Lt,[e.renderSlot(f.$slots,"logo")])):(e.openBlock(),e.createBlock(fe._sfc_main,{key:1,title:H.value,variant:"neutral",icon:"draft","icon-class":"print:hidden","title-class":"print:text-sm"},null,8,["title"])),f.$slots.intro?e.renderSlot(f.$slots,"intro",{},void 0,void 0,2):e.createCommentVNode("",!0),e.createElementVNode("div",Ft,[(T=S.value)!=null&&T.length?(e.openBlock(),e.createBlock(ge._sfc_main$1,{key:0,items:S.value,width:"auto"},{trigger:e.withCtx(()=>[e.createVNode(O._sfc_main,{"icon-prefix":"add",size:"sm",intent:"secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Add",id:"YnK/yF",description:"Label for adding an item to an invoice"})),1)]),_:1})]),_:1},8,["items"])):e.createCommentVNode("",!0),e.renderSlot(f.$slots,"child-customers-selector")])]),f.$slots.total?e.renderSlot(f.$slots,"total",{},void 0,void 0,0):e.createCommentVNode("",!0),e.renderSlot(f.$slots,"notes"),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.invoice.periods,(V,M)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:M},[t.showRenderedServicesHeader?(e.openBlock(),e.createBlock(me._sfc_main,{key:0,class:"mt-6"},{default:e.withCtx(()=>[e.createVNode(C._sfc_main,{tag:"h2",variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y(V)),1)]),_:2},1024)]),_:2},1024)):e.createCommentVNode("",!0),V.groups?(e.openBlock(),e.createBlock($,{key:1,class:e.normalizeClass(["text-sm",{"mt-3":t.showRenderedServicesHeader}]),"data-testid":e.unref(ye)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.entries(I(V)),([h,L],D)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:h},[D>0?(e.openBlock(),e.createElementBlock("tr",Ut,[...N[0]||(N[0]=[e.createElementVNode("td",null,[e.createElementVNode("div",{class:"h-4"})],-1)])])):e.createCommentVNode("",!0),e.createElementVNode("tr",null,[e.createVNode(x,{left:"",class:"text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(E(h)),1)]),_:2},1024),e.createVNode(x,{right:"",class:"w-28 text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a).$t({id:"invoice.amount_table_heading",defaultMessage:"Amount",description:"Table heading for the amount column in the invoice table"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L,(F,le)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:le},[h==="REVENUE"||h==="PRICING"||h==="ONE_OFF"?(e.openBlock(),e.createBlock(It,{key:0,group:F,"expanded-items":e.unref(d),"handle-toggle-items":p,"is-expandable":t.isExpandable,"force-expanded":t.forceExpanded,"format-index":_,"invoice-period-order":V.period_order,"group-order":F.group_order,"amount-type":t.invoice.pricing_amount_type,"processing-only-customers":t.invoice.processing_only_customers,"display-invoice-sub-lines-per-processing-only-customer":t.invoice.display_invoice_sub_lines_per_processing_only_customer,"show-tax-per-line-item":A.value,"forwarded-from-customers":t.invoice.forwarded_from_customers,"show-original-customer-invoice-line":t.invoice.show_original_customer_invoice_line},{"invoice-line-prefix":e.withCtx(U=>[e.renderSlot(f.$slots,"invoice-line-prefix",e.mergeProps({ref_for:!0},U))]),"one-off-line-context-menu":e.withCtx(U=>[e.renderSlot(f.$slots,"one-off-line-context-menu",e.mergeProps({ref_for:!0},U,{periodOrder:V.period_order}))]),_:2},1032,["group","expanded-items","is-expandable","force-expanded","invoice-period-order","group-order","amount-type","processing-only-customers","display-invoice-sub-lines-per-processing-only-customer","show-tax-per-line-item","forwarded-from-customers","show-original-customer-invoice-line"])):h==="DISCOUNT"||h==="MARKUP"?(e.openBlock(),e.createBlock(Ke,{key:1,group:F,"expanded-items":e.unref(d),"handle-toggle-items":p,"is-expandable":t.isExpandable,"force-expanded":t.forceExpanded,"format-index":_,"invoice-period-order":V.period_order,"group-order":F.group_order,"amount-type":t.invoice.pricing_amount_type,heading:h==="DISCOUNT"?e.unref(a).$t({id:"invoice.discounts_table_heading",defaultMessage:"Discounts",description:"Heading for discounts in the invoice table"}):e.unref(a).$t({id:"invoice.markups_table_heading",defaultMessage:"Markups",description:"Heading for markups in the invoice table"})},{"invoice-line-prefix":e.withCtx(U=>[e.renderSlot(f.$slots,"invoice-line-prefix",e.mergeProps({ref_for:!0},U))]),_:3},8,["group","expanded-items","is-expandable","force-expanded","invoice-period-order","group-order","amount-type","heading"])):h==="COMMITMENT"?(e.openBlock(),e.createBlock(qe,{key:2,group:F,"expanded-items":e.unref(d),"handle-toggle-items":p,"is-expandable":t.isExpandable,"force-expanded":t.forceExpanded,"format-index":_,"invoice-period-order":V.period_order,"group-order":F.group_order,"amount-type":t.invoice.pricing_amount_type},{"invoice-line-prefix":e.withCtx(U=>[e.renderSlot(f.$slots,"invoice-line-prefix",e.mergeProps({ref_for:!0},U))]),_:3},8,["group","expanded-items","is-expandable","force-expanded","invoice-period-order","group-order","amount-type"])):e.createCommentVNode("",!0),w(F)?(e.openBlock(),e.createElementBlock("tr",Rt,[e.createElementVNode("td",zt,[e.createVNode(ee,{lines:F.lines,"credit-types":t.invoice.credit_types},null,8,["lines","credit-types"])])])):e.createCommentVNode("",!0)],64))),128))],64))),128))]),_:2},1032,["class","data-testid"])):e.createCommentVNode("",!0)],64))),128)),t.invoice.tax_summary&&(t.showTotals||(t.forceExpanded||e.unref(u))&&t.invoice.tax_categories)?(e.openBlock(),e.createBlock($,{key:1,class:"mt-6 text-sm print:ml-auto print:w-2/3"},{default:e.withCtx(()=>[t.showTotals?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("tr",null,[e.createVNode(x,{left:"",class:"text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a).$t({id:"invoice.totals_table_heading",defaultMessage:"Totals",description:"Table heading for the totals column in the invoice table"})),1)]),_:1}),e.createVNode(x,{right:"",class:"w-28 text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a).$t({id:"invoice.amount_table_heading",defaultMessage:"Amount",description:"Table heading for the amount column in the invoice table"})),1)]),_:1})]),t.invoice.pricing_amount_type==="INCLUDING_TAX"?(e.openBlock(),e.createBlock(oe,{key:0,"total-amount":t.invoice.tax_summary.total_amount,"is-customer-facing":t.isCustomerFacing},null,8,["total-amount","is-customer-facing"])):(e.openBlock(),e.createBlock(ne,{key:1,"base-amount":t.invoice.tax_summary.base_amount},null,8,["base-amount"])),t.invoice.tax_summary.tax_amount?(e.openBlock(),e.createElementBlock("tr",{key:2,class:e.normalizeClass([{"cursor-pointer":t.invoice.tax_categories&&t.isExpandable},"break-inside-avoid border-t"]),tabindex:t.isExpandable?0:void 0,onClick:B,onKeyup:[e.withKeys(B,["enter"]),e.withKeys(B,["space"])]},[e.createVNode(m,null,{default:e.withCtx(()=>[t.isExpandable&&t.invoice.tax_categories&&t.invoice.tax_categories.length?(e.openBlock(),e.createBlock(O._sfc_main$1,{key:0,icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 text-slate-400",{"-rotate-90":!e.unref(u)}])},null,8,["class"])):e.createCommentVNode("",!0),e.createVNode(j,{label:e.unref(a).$t({id:"invoice.taxes_table_heading",defaultMessage:"Taxes",description:"Table heading for the taxes column in the invoice table"}),count:t.isExpandable&&t.invoice.tax_categories?t.invoice.tax_categories.length:void 0},null,8,["label","count"])]),_:1}),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:t.invoice.tax_summary.tax_amount,"data-testid":e.unref(he)},null,8,["value","data-testid"])]),_:1})],42,qt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),(t.forceExpanded||e.unref(u))&&t.invoice.tax_categories?(e.openBlock(),e.createElementBlock("tr",Wt,[e.createElementVNode("td",Ht,[e.createElementVNode("div",Gt,[e.createVNode(Pt,{"tax-categories":t.invoice.tax_categories},null,8,["tax-categories"])])])])):e.createCommentVNode("",!0),t.showTotals?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[t.invoice.pricing_amount_type==="INCLUDING_TAX"?(e.openBlock(),e.createBlock(ne,{key:0,"base-amount":t.invoice.tax_summary.base_amount},null,8,["base-amount"])):(e.openBlock(),e.createBlock(oe,{key:1,"total-amount":t.invoice.tax_summary.total_amount},null,8,["total-amount"]))],64)):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0),e.unref(ce.isEmpty)(t.invoice.closed_periods)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($,{key:2,class:"mt-6 text-sm"},{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(x,{left:"",class:"text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a).$t({id:"invoice.already_deducted_table_heading",defaultMessage:"Already deducted",description:"Table heading for the already deducted rows in the invoice table"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.invoice.closed_periods,(V,M)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:M},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.groups,(h,L)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:L},[e.createElementVNode("tr",{class:e.normalizeClass(["break-inside-avoid border-t",{"pt-6":M===0,"cursor-pointer":t.isExpandable}]),tabindex:t.isExpandable?0:void 0,onClick:D=>b(_(M,L)),onKeyup:[e.withKeys(D=>b(_(M,L)),["enter"]),e.withKeys(D=>b(_(M,L)),["space"])]},[e.createVNode(m,{class:"p-0"},{default:e.withCtx(()=>{var D;return[t.isExpandable?(e.openBlock(),e.createBlock(O._sfc_main$1,{key:0,icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 text-slate-400",{"-rotate-90":!e.unref(s).includes(_(M,L))}])},null,8,["class"])):e.createCommentVNode("",!0),e.createVNode(j,{label:k(h),count:t.isExpandable?((D=h.lines)==null?void 0:D.length)??0:void 0},null,8,["label","count"])]}),_:2},1024),e.createVNode(m,{number:"",class:"w-28"},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:h.amount_excluding_tax,"data-testid":e.unref(_e),"data-type":e.unref(Ce)},null,8,["value","data-testid","data-type"])]),_:2},1024)],42,Xt),t.forceExpanded||e.unref(s).includes(_(M,L))?(e.openBlock(),e.createElementBlock("tr",Kt,[e.createElementVNode("td",jt,[e.createElementVNode("div",Yt,[e.createVNode(re,{"start-date":h.start_at,"end-date":h.end_at,total:h.amount_excluding_tax,group:h,"amount-type":t.invoice.pricing_amount_type,"show-tax-per-line-item":A.value,"processing-only-customers":t.invoice.processing_only_customers,"display-invoice-sub-lines-per-processing-only-customer":t.invoice.display_invoice_sub_lines_per_processing_only_customer},{"one-off-line-context-menu":e.withCtx(D=>[e.renderSlot(f.$slots,"one-off-line-context-menu",e.mergeProps({ref_for:!0},D,{groupOrder:h.group_order,periodOrder:V.period_order}))]),_:2},1032,["start-date","end-date","total","group","amount-type","show-tax-per-line-item","processing-only-customers","display-invoice-sub-lines-per-processing-only-customer"])])])])):e.createCommentVNode("",!0),w(h)?(e.openBlock(),e.createElementBlock("tr",Qt,[e.createElementVNode("td",Jt,[e.createVNode(ee,{lines:h.lines,"credit-types":t.invoice.credit_types},null,8,["lines","credit-types"])])])):e.createCommentVNode("",!0)],64))),128))],64))),128)),t.invoice.open_invoice_amount&&!t.invoice.paid&&t.showTotals?(e.openBlock(),e.createElementBlock("tr",Zt,[e.createVNode(m,{class:"font-bold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a).$t({id:"invoice.amount_due_table_heading",defaultMessage:"Amount due",description:"Table heading for the amount due row in the invoice table"})),1)]),_:1}),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:t.invoice.open_invoice_amount,"data-testid":e.unref(Ne)},null,8,["value","data-testid"])]),_:1})])):e.createCommentVNode("",!0)]),_:3}))])}}});exports.InvoiceTable=$;exports._sfc_main=en;exports._sfc_main$1=x;exports._sfc_main$2=m;
|
|
1
|
+
const e=require("vue"),C=require("./customElements-CSzbVZIH.js"),v=require("./Amount.vue.es-DExaYBqm.js"),ce=require("./useService-H7BjLg8P.js"),O=require("./Button.vue.es-TCF-bvDF.js"),de=require("./floating-ui.vue.es-Bly3DGWm.js"),ae=require("./customer.es-BButyYo0.js"),q=require("./formatting.es-C72Nsrmh.js"),W=require("./Comparators.vue.es-DmkxV0gb.js"),se=require("./Chip.vue.es-CAoisngJ.js"),Y=require("./getComposedString.es-haS4bAj7.js"),P=require("./TooltipParagraph.vue.es-7IQdU3Tf.js"),ue=require("./index.es-BclokHQX.js"),K=require("./wallets.es-CNIMW5ay.js"),me=require("./DividerText.vue.es-LJ2kZakb.js"),fe=require("./IconTitle.vue.es-CMO8EyQl.js"),ge=require("./ContextMenu.vue.es-kzZ3JJHG.js"),J=(t=[])=>{const n=e.ref(t);return[n,i=>{typeof n.value.find(o=>o===i)=="number"?n.value=n.value.filter(o=>o!==i):n.value=[...n.value,i]}]},pe={},ve={class:"w-full table-fixed"};function xe(t,n){return e.openBlock(),e.createElementBlock("table",ve,[e.renderSlot(t.$slots,"default")])}const $=de._export_sfc(pe,[["render",xe]]),m=e.defineComponent({__name:"InvoiceTableData",props:{number:{type:Boolean,default:!1},hasPadding:{type:Boolean,default:!0}},setup(t){return(n,a)=>(e.openBlock(),e.createElementBlock("td",{class:e.normalizeClass({"text-right tabular-nums":t.number,"py-2":t.hasPadding})},[e.renderSlot(n.$slots,"default")],2))}}),x=e.defineComponent({__name:"InvoiceTableHeader",props:{left:{type:Boolean,default:!1},right:{type:Boolean,default:!1}},setup(t){return(n,a)=>(e.openBlock(),e.createElementBlock("th",{class:e.normalizeClass(["border-b py-1.5 text-xs font-bold uppercase text-subtle",{"text-left":t.left,"text-right":t.right}])},[e.renderSlot(n.$slots,"default")],2))}}),ye="INVOICE_PERIOD",ke="INVOICE_PERIOD_SUBTOTAL",R="INVOICE_PERIOD_TOTAL",X="SUMMARY_LINE_AMOUNT",he="SUMMARY_TOTAL_TAX",be="SUMMARY_TOTAL_INCLUDING_TAX",Be="SUMMARY_TOTAL_EXCLUDING_TAX",_e="SUMMARY_TOTAL_DISCOUNT",Ne="SUMMARY_AMOUNT_DUE",Ce="DEDUCTION",Te="HAS_SUBLINES",Ve={class:"flex items-center"},Ee={key:0,class:"text-xs text-secondary"},we={class:"flex items-center"},Q=e.defineComponent({__name:"InvoiceSubLineRow",props:{subLines:{},isOpen:{type:Boolean},lineOrder:{},periodOrder:{},groupOrder:{},processingOnlyCustomers:{},displayInvoiceSubLinesPerProcessingOnlyCustomer:{type:Boolean},showTaxPerLineItem:{type:Boolean,default:!0}},setup(t){const{formatMessage:n,formatNumber:a}=C.useIntl(),i=t,r=l=>{var s;const c=(s=i.processingOnlyCustomers)==null?void 0:s.find(u=>u.id===l);return c?ae.getCustomerName(c):n({id:"generic.not_available",defaultMessage:"N/A",description:"Used in scenarios where no data is available to be displayed"})},o=l=>{var s;return((s=l.usage_based_conversion)==null?void 0:s.conditions)??l.conditions},d=l=>{var s,c;const u=(c=(s=l.details.conversion)==null?void 0:s.credits)==null?void 0:c.quantity;return u===void 0?n({id:"generic.not_available",defaultMessage:"N/A",description:"Used in scenarios where no data is available to be displayed"}):a(+u,{maximumFractionDigits:q.MAX_FRACTION_DIGITS})};return(l,s)=>t.subLines&&t.isOpen?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.subLines,(c,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:u},[c.processing_only_customer_resource_id?t.displayInvoiceSubLinesPerProcessingOnlyCustomer&&t.processingOnlyCustomers?(e.openBlock(),e.createElementBlock("tr",{key:1,class:e.normalizeClass(["group",{"border-t":u>0}])},[e.createVNode(m,{class:"pl-4"},{default:e.withCtx(()=>[e.createElementVNode("div",we,[e.createElementVNode("div",null,e.toDisplayString(r(c.processing_only_customer_resource_id)),1)])]),_:2},1024),e.renderSlot(l.$slots,"subline-content",{details:c.details,hideTaxDetails:!0})],2)):e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("tr",{key:0,class:e.normalizeClass(u>0?"border-t":"")},[e.createVNode(m,null,{default:e.withCtx(()=>{var g,p,b,B,_,y;return[e.createElementVNode("div",Ve,[e.renderSlot(l.$slots,"invoice-line-prefix",{lineOrder:t.lineOrder,periodOrder:t.periodOrder,groupOrder:t.groupOrder}),e.createElementVNode("div",null,[e.createElementVNode("div",null,[c.description?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(c.description),1)],64)):c.details.description?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(c.details.description),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(" N/A ")],64))]),(g=o(c))!=null&&g.name||(p=o(c))!=null&&p.meter_properties?(e.openBlock(),e.createElementBlock("div",Ee,[(b=o(c))!=null&&b.name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString((B=o(c))==null?void 0:B.name),1)],64)):(_=o(c))!=null&&_.meter_properties?(e.openBlock(),e.createBlock(e.unref(W._sfc_main),{key:1,comparators:(y=o(c))==null?void 0:y.meter_properties},null,8,["comparators"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])])]}),_:2},1024),e.createVNode(m,{number:"",class:"text-right tabular-nums"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d(c)),1)]),_:2},1024),e.createVNode(m,{class:"text-right tabular-nums"},{default:e.withCtx(()=>{var g,p;return[(g=c.details.band)!=null&&g.amount?(e.openBlock(),e.createBlock(v._sfc_main,{key:0,value:c.details.band.amount},null,8,["value"])):(p=c.details.band)!=null&&p.percentage?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(c.details.band.percentage)+"% ",1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(" N/A ")],64))]}),_:2},1024),t.showTaxPerLineItem?(e.openBlock(),e.createBlock(m,{key:0},{default:e.withCtx(()=>[...s[0]||(s[0]=[e.createTextVNode(" ",-1)])]),_:1})):e.createCommentVNode("",!0),c.details.amount?(e.openBlock(),e.createBlock(m,{key:1,class:"text-right tabular-nums"},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:c.details.amount,"data-testid":e.unref(ke)},null,8,["value","data-testid"])]),_:2},1024)):e.createCommentVNode("",!0)],2))],64))),128)):e.createCommentVNode("",!0)}}),Oe={class:"flex gap-4"},Ie={class:"flex items-center gap-2"},G=e.defineComponent({__name:"PricingClauseChip",props:{iconName:{}},setup(t){return(n,a)=>(e.openBlock(),e.createElementBlock("div",Oe,[e.createVNode(se._sfc_main,null,{default:e.withCtx(()=>[e.createElementVNode("div",Ie,[e.createVNode(O._sfc_main$1,{icon:t.iconName,size:"xs"},null,8,["icon"]),e.createElementVNode("span",null,[e.renderSlot(n.$slots,"chip-content")])])]),_:3}),e.renderSlot(n.$slots,"chip-postfix")]))}}),Se={class:"flex flex-col gap-2"},ie=e.defineComponent({__name:"InvoicePricingClauseChip",props:{clauseType:{},priceDetailsBand:{},invoiceLineDescription:{}},setup(t){const n=C.useIntl();return(a,i)=>(e.openBlock(),e.createElementBlock("div",Se,[e.createElementVNode("span",null,e.toDisplayString(t.invoiceLineDescription),1),t.clauseType==="DISCOUNT"&&t.priceDetailsBand?(e.openBlock(),e.createBlock(e.unref(G),{key:0,"icon-name":"south_east"},e.createSlots({_:2},[t.priceDetailsBand.amount?{name:"chip-content",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.amount_discount",defaultMessage:"{amount} discount",description:"Represents a certain amount of discount, where {amount} is replaced with the amount"},{amount:e.unref(q.formatAmount)(t.priceDetailsBand.amount)}).toUpperCase()),1)]),key:"0"}:t.priceDetailsBand.percentage?{name:"chip-content",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.percentage_discount",defaultMessage:"{percentage}% discount",description:"Represents a certain percentage of discount, where {percentage} is replaced with the percentage (number only)"},{percentage:t.priceDetailsBand.percentage??"0"}).toUpperCase()),1)]),key:"1"}:void 0]),1024)):t.clauseType==="ADJUSTMENT"?(e.openBlock(),e.createBlock(e.unref(G),{key:1,"icon-name":"info"},{"chip-content":e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.adjustment_chip_body",defaultMessage:"Adjustment",description:"Used on invoice lines to mark as adjusted"}).toUpperCase()),1)]),_:1})):t.clauseType==="MARKUP"?(e.openBlock(),e.createBlock(e.unref(G),{key:2,"icon-name":"north_east"},{"chip-content":e.withCtx(()=>{var r;return[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.markup_percentage",defaultMessage:"{percentage}% markup",description:"Markup percentage, where {percentage} is replaced with the percentage (number only)"},{percentage:((r=t.priceDetailsBand)==null?void 0:r.percentage)??"0"}).toUpperCase()),1)]}),_:1})):t.clauseType==="COMMITMENT"?(e.openBlock(),e.createBlock(e.unref(G),{key:3,"icon-name":"sell"},{"chip-content":e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.commitment",defaultMessage:"commitment",description:"Used on invoice lines to mark as commitment"}).toUpperCase()),1)]),_:1})):e.createCommentVNode("",!0)]))}}),$e=["tabindex","onClick"],Me={class:"flex items-center"},De=e.defineComponent({__name:"InvoiceCommitment",props:{commitments:{},groupOrder:{},invoicePeriodOrder:{},processingOnlyCustomers:{},displayInvoiceSubLinesPerProcessingOnlyCustomer:{type:Boolean}},setup(t){const n=C.useIntl(),{getIsOpen:a,toggle:i}=W.useToggleList(),r=(l,s)=>{i(o(l,s))},o=(l,s)=>`${l}-line-${s}`,d=l=>{var s;return l.description??((s=l.details)==null?void 0:s.description)??n.$t({id:"generic.not_available",defaultMessage:"N/A",description:"Used in scenarios where no data is available to be displayed"})};return(l,s)=>(e.openBlock(),e.createBlock($,null,{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(x,{left:"",colspan:"5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.unit",defaultMessage:"Unit",description:"Table header for the column containing the number of units of invoice groups"})),1)]),_:1}),e.createVNode(x,{right:"",class:"w-60"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.sub_total",defaultMessage:"Subtotal",description:"Table header for the column containing the subtotal for invoices"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.commitments,(c,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:u},[e.createElementVNode("tr",{class:e.normalizeClass(["border-t",{"cursor-pointer":c.sub_lines}]),tabindex:c.sub_lines?0:void 0,onClick:g=>r(t.groupOrder,c.line_order)},[e.createVNode(m,{colspan:"2"},{default:e.withCtx(()=>{var g;return[c.sub_lines?(e.openBlock(),e.createBlock(O._sfc_main$1,{key:0,icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 text-slate-400",{"-rotate-90":!e.unref(a)(o(t.groupOrder,c.line_order))}])},null,8,["class"])):e.createCommentVNode("",!0),e.createElementVNode("div",Me,[e.renderSlot(l.$slots,"invoice-line-prefix",{lineOrder:c.line_order,periodOrder:t.invoicePeriodOrder,groupOrder:t.groupOrder}),e.createVNode(ie,{"clause-type":"COMMITMENT","invoice-line-description":d(c),"price-details-band":(g=c.details)==null?void 0:g.band},null,8,["invoice-line-description","price-details-band"])])]}),_:2},1024),e.createVNode(m,{colspan:"3"},{default:e.withCtx(()=>[...s[0]||(s[0]=[e.createTextVNode(" ",-1)])]),_:1}),e.createVNode(m,{number:""},{default:e.withCtx(()=>{var g,p;return[(g=c.details)!=null&&g.amount?(e.openBlock(),e.createBlock(v._sfc_main,{key:0,value:(p=c.details)==null?void 0:p.amount,"data-testid":e.unref(X)},null,8,["value","data-testid"])):e.createCommentVNode("",!0)]}),_:2},1024)],10,$e),e.createVNode(Q,{ref_for:!0,ref:o(t.groupOrder,c.line_order),"sub-lines":c.sub_lines??[],"line-order":c.line_order,"period-order":t.invoicePeriodOrder,"group-order":t.groupOrder,"is-open":e.unref(a)(o(t.groupOrder,c.line_order)),"processing-only-customers":t.processingOnlyCustomers,"display-invoice-sub-lines-per-processing-only-customer":t.displayInvoiceSubLinesPerProcessingOnlyCustomer},null,8,["sub-lines","line-order","period-order","group-order","is-open","processing-only-customers","display-invoice-sub-lines-per-processing-only-customer"])],64))),128))]),_:3}))}}),Pe=["tabindex","onClick"],Ae={class:"flex items-center"},Le=e.defineComponent({__name:"InvoiceDiscountMarkup",props:{lines:{},type:{},handleToggleItems:{type:Function},formatIndex:{type:Function},expandedItems:{},isExpandable:{type:Boolean},invoicePeriodOrder:{},groupOrder:{},processingOnlyCustomers:{},displayInvoiceSubLinesPerProcessingOnlyCustomer:{type:Boolean}},setup(t){const n=C.useIntl(),{getIsOpen:a,toggle:i}=W.useToggleList(),r=(d,l)=>{i(o(d,l))},o=(d,l)=>`${d}-line-${l}`;return(d,l)=>(e.openBlock(),e.createBlock($,null,{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(x,{left:"",class:"w-3/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.quantity",defaultMessage:"Quantity",description:"Table header for quantity column"})),1)]),_:1}),e.createVNode(x,{colspan:"2"},{default:e.withCtx(()=>[...l[0]||(l[0]=[e.createTextVNode(" ",-1)])]),_:1}),e.createVNode(x,{left:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.type==="DISCOUNT"?e.unref(n).$t({id:"invoice.table_header.discount",defaultMessage:"Discount",description:"Table header for discount column"}):e.unref(n).$t({id:"invoice.table_header.markup",defaultMessage:"Markup",description:"Table header for markup column"})),1)]),_:1}),e.createVNode(x,{left:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.type==="DISCOUNT"?e.unref(n).$t({id:"invoice.table_header.total",defaultMessage:"Total",description:"Table header for total column"}):" "),1)]),_:1}),e.createVNode(x,{right:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.sub_total",defaultMessage:"Subtotal",description:"Table header for the column containing the subtotal for invoices"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.lines,(s,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c},[e.createElementVNode("tr",{class:e.normalizeClass(["border-t",{"cursor-pointer":t.isExpandable}]),tabindex:t.isExpandable?0:void 0,onClick:u=>r(t.groupOrder,s.line_order)},[e.createVNode(m,{class:"w-3/5"},{default:e.withCtx(()=>{var u,g;return[s.sub_lines?(e.openBlock(),e.createBlock(O._sfc_main$1,{key:0,icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 text-slate-400",{"-rotate-90":!e.unref(a)(o(t.groupOrder,s.line_order))}])},null,8,["class"])):e.createCommentVNode("",!0),e.createElementVNode("div",Ae,[e.renderSlot(d.$slots,"invoice-line-prefix",{lineOrder:s.line_order,periodOrder:t.invoicePeriodOrder,groupOrder:t.groupOrder}),s.description?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(s.description),1)],64)):(u=s.details)!=null&&u.description?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString((g=s.details)==null?void 0:g.description),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode("N/A")],64))])]}),_:2},1024),e.createVNode(m,{colspan:"2"},{default:e.withCtx(()=>[...l[1]||(l[1]=[e.createTextVNode(" ",-1)])]),_:1}),e.createVNode(m,{class:"w-1/5 tabular-nums"},{default:e.withCtx(()=>{var u,g,p;return[e.createTextVNode(e.toDisplayString((g=(u=s.details)==null?void 0:u.band)!=null&&g.percentage?`${(p=s.details)==null?void 0:p.band.percentage}%`:" "),1)]}),_:2},1024),e.createVNode(m,{class:"w-1/5"},{default:e.withCtx(()=>[...l[2]||(l[2]=[e.createTextVNode(" ",-1)])]),_:1}),e.createVNode(m,{number:"",class:"w-1/5"},{default:e.withCtx(()=>{var u;return[(u=s.details)!=null&&u.amount?(e.openBlock(),e.createBlock(v._sfc_main,{key:0,value:s.details.amount,"data-testid":e.unref(X)},null,8,["value","data-testid"])):e.createCommentVNode("",!0)]}),_:2},1024)],10,Pe),e.createVNode(Q,{ref_for:!0,ref:o(t.groupOrder,s.line_order),"sub-lines":s.sub_lines??[],"line-order":s.line_order,"is-open":e.unref(a)(o(t.groupOrder,s.line_order)),"period-order":t.invoicePeriodOrder,"group-order":t.groupOrder,"processing-only-customers":t.processingOnlyCustomers,"display-invoice-sub-lines-per-processing-only-customer":t.displayInvoiceSubLinesPerProcessingOnlyCustomer},null,8,["sub-lines","line-order","is-open","period-order","group-order","processing-only-customers","display-invoice-sub-lines-per-processing-only-customer"])],64))),128))]),_:3}))}}),z=t=>{var n;return(n=t.lines)!=null&&n.some(a=>!!a.sub_lines)?Te:void 0},Fe=["tabindex"],Ue={key:0},Re={colspan:"2",class:"p-0"},ze={class:"-mx-9 bg-gray-50 px-9 py-3 text-xs"},qe=e.defineComponent({__name:"InvoiceGroupCommitment",props:{group:{},expandedItems:{},handleToggleItems:{type:Function},formatIndex:{type:Function},invoicePeriodOrder:{},groupOrder:{},isExpandable:{type:Boolean},forceExpanded:{type:Boolean},amountType:{},processingOnlyCustomers:{},displayInvoiceSubLinesPerProcessingOnlyCustomer:{type:Boolean},showTaxPerLineItem:{type:Boolean}},setup(t){const n=C.useIntl();return(a,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("tr",{class:e.normalizeClass(["border-t break-inside-avoid",{"cursor-pointer":t.isExpandable}]),tabindex:t.isExpandable?0:void 0,onClick:i[0]||(i[0]=r=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))),onKeyup:[i[1]||(i[1]=e.withKeys(r=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)),["enter"])),i[2]||(i[2]=e.withKeys(r=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)),["space"]))]},[e.createVNode(m,{class:"p-0"},{default:e.withCtx(()=>[t.isExpandable?(e.openBlock(),e.createBlock(O._sfc_main$1,{key:0,icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 text-slate-400",{"-rotate-90":!t.expandedItems.includes(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))}])},null,8,["class"])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(e.unref(n).$t({id:"invoice.commitment_heading",defaultMessage:"Commitment",description:"Heading used for commitment in invoice tables"})),1)]),_:1}),e.createVNode(m,{number:""},{default:e.withCtx(()=>[t.amountType==="INCLUDING_TAX"?(e.openBlock(),e.createBlock(v._sfc_main,{key:0,value:t.group.amount_including_tax,"data-testid":e.unref(R),"data-type":e.unref(z)(t.group)},null,8,["value","data-testid","data-type"])):(e.openBlock(),e.createBlock(v._sfc_main,{key:1,value:t.group.amount_excluding_tax,"data-testid":e.unref(R),"data-type":e.unref(z)(t.group)},null,8,["value","data-testid","data-type"]))]),_:1})],42,Fe),(t.forceExpanded||t.expandedItems.includes(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)))&&t.group.lines?(e.openBlock(),e.createElementBlock("tr",Ue,[e.createElementVNode("td",Re,[e.createElementVNode("div",ze,[e.createVNode(De,{commitments:t.group.lines,"format-index":t.formatIndex,"handle-toggle-items":t.handleToggleItems,"expanded-items":t.expandedItems,"is-expandable":t.isExpandable,"invoice-period-order":t.invoicePeriodOrder,"group-order":t.groupOrder,"processing-only-customers":t.processingOnlyCustomers,"display-invoice-sub-lines-per-processing-only-customer":t.displayInvoiceSubLinesPerProcessingOnlyCustomer},{"invoice-line-prefix":e.withCtx(r=>[e.renderSlot(a.$slots,"invoice-line-prefix",e.normalizeProps(e.guardReactiveProps(r)))]),_:3},8,["commitments","format-index","handle-toggle-items","expanded-items","is-expandable","invoice-period-order","group-order","processing-only-customers","display-invoice-sub-lines-per-processing-only-customer"])])])])):e.createCommentVNode("",!0)],64))}}),We=["tabindex"],He={key:0},Ge={colspan:"2",class:"p-0"},Xe={class:"-mx-9 bg-gray-50 px-9 py-3 text-xs"},Ke=e.defineComponent({__name:"InvoiceGroupDiscountMarkup",props:{heading:{},group:{},expandedItems:{},handleToggleItems:{type:Function},formatIndex:{type:Function},invoicePeriodOrder:{},groupOrder:{},isExpandable:{type:Boolean},forceExpanded:{type:Boolean},amountType:{},processingOnlyCustomers:{},displayInvoiceSubLinesPerProcessingOnlyCustomer:{type:Boolean},showTaxPerLineItem:{type:Boolean}},setup(t){return(n,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("tr",{class:e.normalizeClass(["border-t break-inside-avoid",{"cursor-pointer":t.isExpandable}]),tabindex:t.isExpandable?0:void 0,onClick:a[0]||(a[0]=i=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))),onKeyup:[a[1]||(a[1]=e.withKeys(i=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)),["enter"])),a[2]||(a[2]=e.withKeys(i=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)),["space"]))]},[e.createVNode(m,{class:"p-0"},{default:e.withCtx(()=>[t.isExpandable?(e.openBlock(),e.createBlock(O._sfc_main$1,{key:0,icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 text-slate-400",{"-rotate-90":!t.expandedItems.includes(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))}])},null,8,["class"])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(t.heading),1)]),_:1}),e.createVNode(m,{number:""},{default:e.withCtx(()=>[t.amountType==="INCLUDING_TAX"?(e.openBlock(),e.createBlock(v._sfc_main,{key:0,value:t.group.amount_including_tax,"data-testid":e.unref(R),"data-type":e.unref(z)(t.group)},null,8,["value","data-testid","data-type"])):(e.openBlock(),e.createBlock(v._sfc_main,{key:1,value:t.group.amount_excluding_tax,"data-testid":e.unref(R),"data-type":e.unref(z)(t.group)},null,8,["value","data-testid","data-type"]))]),_:1})],42,We),(t.forceExpanded||t.expandedItems.includes(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)))&&t.group.lines?(e.openBlock(),e.createElementBlock("tr",He,[e.createElementVNode("td",Ge,[e.createElementVNode("div",Xe,[e.createVNode(Le,{type:t.group.type,lines:t.group.lines,"format-index":t.formatIndex,"handle-toggle-items":t.handleToggleItems,"expanded-items":t.expandedItems,"is-expandable":t.isExpandable,"invoice-period-order":t.invoicePeriodOrder,"group-order":t.groupOrder,"processing-only-customers":t.processingOnlyCustomers,"display-invoice-sub-lines-per-processing-only-customer":t.displayInvoiceSubLinesPerProcessingOnlyCustomer},{"invoice-line-prefix":e.withCtx(i=>[e.renderSlot(n.$slots,"invoice-line-prefix",e.normalizeProps(e.guardReactiveProps(i)))]),_:3},8,["type","lines","format-index","handle-toggle-items","expanded-items","is-expandable","invoice-period-order","group-order","processing-only-customers","display-invoice-sub-lines-per-processing-only-customer"])])])])):e.createCommentVNode("",!0)],64))}}),je=(t,n)=>{if(n)return t.forwarded_from_customer_id},Ye=t=>{let n={kind:"default"},a={kind:"default"};if(t.tier_lower_bound&&"number"in t.tier_lower_bound)n={kind:"number",value:+t.tier_lower_bound.number};else if(t.tier_lower_bound&&"amount"in t.tier_lower_bound){const{quantity:i,currency:r}=t.tier_lower_bound.amount;n={kind:"amount",currency:r,quantity:i??0}}if(t.tier_top_bound&&"number"in t.tier_top_bound)a={kind:"number",value:+t.tier_top_bound.number};else if(t.tier_top_bound&&"amount"in t.tier_top_bound){const{quantity:i,currency:r}=t.tier_top_bound.amount;a={kind:"amount",currency:r,quantity:i}}return{lowerBound:n,topBound:a}},Qe=t=>{var n,a,i,r;switch(t==null?void 0:t.price_bound){case"BELOW_MINIMUM_AMOUNT":return{kind:"band_minimum_amount",amount:(n=t.band)==null?void 0:n.minimum_amount};case"NOT_HIT":return{kind:"price_bound_within_bounds"};case"ABOVE_MAXIMUM_AMOUNT":return{kind:"price_bound_maximum_amount",amount:(a=t.band)==null?void 0:a.maximum_amount};case"BELOW_MINIMUM_NUMBER":return{kind:"band_minimum_number",value:(i=t.band)==null?void 0:i.minimum_number};case"ABOVE_MAXIMUM_NUMBER":return{kind:"band_maximum_number",value:(r=t.band)==null?void 0:r.maximum_number};default:return{kind:"none"}}},Je={class:"items-left flex flex-col gap-1 leading-none"},Ze={class:"flex items-center"},et={key:0,class:"ml-1 text-xs text-secondary"},tt={key:0},nt={key:1,class:"text-xs text-secondary"},ot={key:2,class:"text-xs text-secondary"},at={class:"text-[9pt] text-secondary"},it=e.defineComponent({__name:"InvoiceLineRow",props:{data:{},isLast:{type:Boolean},periodOrder:{},groupOrder:{},groupType:{},isExpanded:{type:Boolean}},setup(t){const{$t:n,formatNumber:a}=C.useIntl(),i=t,r=c=>{if(c.kind!=="default")return c.kind==="number"?a(c.value):`${c.currency} ${c.quantity}`},o=c=>{if(!c)return"";const{lowerBound:u,topBound:g}=Ye(c),p=r(g);return(r(u)??"0")+(p?` - ${p}`:"+")},d=e.computed(()=>{var c;return(c=i.data.details)==null?void 0:c.included_volume_details}),l=e.computed(()=>Qe(i.data.details)),s=e.computed(()=>{var c,u;return(c=i.data)!=null&&c.product_items?Y.getComposedString(i.data.product_items.map(g=>g.name)):((u=i.data)==null?void 0:u.description)??"N/A"});return(c,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(m,{class:"align-top"},{default:e.withCtx(()=>{var g,p,b,B,_,y,E,k,w;return[e.createElementVNode("div",Je,[e.createElementVNode("div",null,[t.data.sub_lines?(e.openBlock(),e.createBlock(O._sfc_main$1,{key:0,icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 -translate-y-2 text-slate-400",{"-rotate-90":!t.isExpanded}])},null,8,["class"])):e.createCommentVNode("",!0),e.createElementVNode("div",Ze,[e.renderSlot(c.$slots,"invoice-line-prefix",{lineOrder:t.data.line_order,periodOrder:t.periodOrder,groupOrder:t.groupOrder}),["PRICING","REVENUE","ONE_OFF"].includes(t.data.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(s.value)+" ",1),t.data.type==="ONE_OFF"&&t.groupType!=="ONE_OFF"?(e.openBlock(),e.createElementBlock("div",et,e.toDisplayString(e.unref(q.formatEnum)(t.data.type)),1)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(ie,{key:1,"invoice-line-description":s.value,"clause-type":t.data.type,"price-details-band":(g=t.data.details)==null?void 0:g.band},null,8,["invoice-line-description","clause-type","price-details-band"]))])]),["TIERED","STAIR_STEP","TOP_TIERED"].includes(t.data.pricing_type)&&!d.value&&((p=t.data.details)!=null&&p.band)?(e.openBlock(),e.createElementBlock("div",tt,e.toDisplayString(o((b=t.data.details)==null?void 0:b.band)),1)):e.createCommentVNode("",!0),(_=(B=t.data.details)==null?void 0:B.split_pricing)!=null&&_.meter_properties?(e.openBlock(),e.createElementBlock("span",nt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((E=(y=t.data.details)==null?void 0:y.split_pricing)==null?void 0:E.meter_properties,(I,S)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createTextVNode(e.toDisplayString(I.meter_property.name)+": "+e.toDisplayString(I.value),1),S<t.data.details.split_pricing.meter_properties.length-1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(", "))],64)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),(k=t.data.conditions)!=null&&k.name||(w=t.data.conditions)!=null&&w.meter_properties?(e.openBlock(),e.createElementBlock("div",ot,[t.data.conditions.name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(t.data.conditions.name),1)],64)):t.data.conditions.meter_properties?(e.openBlock(),e.createBlock(e.unref(W._sfc_main),{key:1,comparators:t.data.conditions.meter_properties},null,8,["comparators"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),e.createElementVNode("span",at,[l.value.kind==="band_minimum_amount"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(e.unref(n)({id:"invoice.line.band_minimum_amount",defaultMessage:"Band minimum amount",description:"Minimum amount specified in a band"}))+" ",1),l.value.amount?(e.openBlock(),e.createBlock(v._sfc_main,{key:0,value:l.value.amount},null,8,["value"])):e.createCommentVNode("",!0)],64)):l.value.kind==="price_bound_within_bounds"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(e.unref(n)({id:"invoice.line.price_bound_within_bounds",defaultMessage:"Within bounds",description:"Label used when min and max bounds are specified but reached"})),1)],64)):l.value.kind==="price_bound_maximum_amount"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(e.unref(n)({id:"invoice.line.price_bound_maximum_amount",defaultMessage:"Maximum amount",description:"Maximum amount specified in a band"}))+" ",1),l.value.amount?(e.openBlock(),e.createBlock(v._sfc_main,{key:0,value:l.value.amount},null,8,["value"])):e.createCommentVNode("",!0)],64)):l.value.kind==="band_minimum_number"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createTextVNode(e.toDisplayString(e.unref(n)({id:"invoice.line.band_minimum_number",defaultMessage:"Minimum number",description:"Minimum number of units specified in a band"}))+" "+e.toDisplayString(l.value.value),1)],64)):l.value.kind==="band_maximum_number"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createTextVNode(e.toDisplayString(e.unref(n)({id:"invoice.line.band_maximum_number",defaultMessage:"Maximum number",description:"Maximum number of units specified in a band"}))+" "+e.toDisplayString(l.value.value),1)],64)):e.createCommentVNode("",!0)])]}),_:3}),e.renderSlot(c.$slots,"line-content",{details:t.data.details})],64))}}),rt=(t,n,a)=>{var i,r;if(t==="PASS_THROUGH")return{kind:"hidden"};if(a&&((r=(i=n==null?void 0:n.conversion)==null?void 0:i.credits)!=null&&r.quantity))return{kind:"conversion-credits",value:n.conversion.credits.quantity};if(n!=null&&n.price_bound){const{price_bound:o,meter_value:d,band:l}=n;return o==="BELOW_MINIMUM_AMOUNT"||o==="ABOVE_MAXIMUM_AMOUNT"?{kind:"raw",value:d.count}:o==="NOT_HIT"&&"amount"in d&&d.amount?{kind:"amount",amount:d.amount}:o==="NOT_HIT"&&"number"in d&&d.number?{kind:"raw",value:d.number}:o==="RATIO"&&d.number?{kind:"number",value:+d.number}:o==="BELOW_MINIMUM_NUMBER"&&(l!=null&&l.minimum_number)?{kind:"number",value:+l.minimum_number}:o==="ABOVE_MAXIMUM_NUMBER"&&(l!=null&&l.maximum_number)?{kind:"number",value:+l.maximum_number}:{kind:"hidden"}}return n!=null&&n.meter_value&&"number"in n.meter_value?{kind:"number",value:+n.meter_value.number}:n!=null&&n.meter_value&&"amount"in n.meter_value?{kind:"amount",amount:n.meter_value.amount}:{kind:"one"}},lt=["NOT_HIT","BELOW_MINIMUM_NUMBER","ABOVE_MAXIMUM_NUMBER"],ct=(t,n,a)=>{if(t==="PASS_THROUGH")return{kind:"pass-through"};if(n!=null&&n.price_bound){const{price_bound:o,band:d,amount:l}=n;if(o==="BELOW_MINIMUM_AMOUNT"&&(d!=null&&d.minimum_amount))return{kind:"amount",amount:d.minimum_amount};if(o==="ABOVE_MAXIMUM_AMOUNT"&&(d!=null&&d.maximum_amount))return{kind:"amount",amount:d.maximum_amount};if(o==="RATIO")return{kind:"amount",amount:(a==="PER_SEAT"?d==null?void 0:d.amount:void 0)??l,suffix:{kind:"tier-top-bound"}};if(lt.includes(o)){if(d&&d.amount)return{kind:"amount",amount:d.amount};if(d&&"percentage"in d)return{kind:"percentage",value:d.percentage};if(d&&l)return{kind:"amount",amount:l,suffix:{kind:"fixed-amount"}}}return{kind:"hidden"}}const i=n==null?void 0:n.band,r=n==null?void 0:n.amount;return i&&i.amount?{kind:"amount",amount:i.amount,suffix:{kind:"block-size-or-per-unit"}}:i&&"percentage"in i?{kind:"percentage",value:i.percentage}:i&&r?t==="STAIR_STEP"||t==="STAIR_STEP_TOP_UP"?{kind:"amount",amount:r,suffix:{kind:"fixed-amount"}}:t==="TOP_TIERED"?{kind:"amount",amount:r,suffix:{kind:"per-unit"}}:t==="FLAT"?{kind:"amount",amount:r,suffix:{kind:"flat-fee"}}:{kind:"amount",amount:r}:{kind:"hidden"}},dt={key:5,class:"text-xs text-secondary"},st={key:1,class:"tabular-nums"},ut={key:0,class:"text-2xs text-secondary"},mt={key:1,class:"text-2xs text-secondary"},ft={key:0,class:"text-2xs text-secondary"},gt={key:1,class:"text-2xs text-secondary"},pt={key:2,class:"text-2xs text-secondary"},vt={key:3,class:"text-2xs text-secondary"},xt={key:4,class:"text-2xs text-secondary"},yt={class:"text-2xs text-secondary"},kt={key:0,class:"flex justify-end"},ht={class:"flex items-center justify-end gap-1"},bt={key:0,class:"text-2xs tabular-nums text-secondary"},Bt={key:1,class:"inline-block"},_t={class:"flex items-center justify-end gap-1"},Z=e.defineComponent({__name:"InvoiceRowContent",props:{pricingType:{},details:{},taxCategories:{},amountType:{},hideTaxDetails:{type:Boolean},modelType:{},showTaxPerLineItem:{type:Boolean,default:!0},preferConversionCredits:{type:Boolean}},setup(t){const n=t,a=e.computed(()=>{var y;return(y=n.details)==null?void 0:y.included_volume_details}),i=e.computed(()=>{var y;return(y=a.value)==null?void 0:y.available_included_volume}),r=e.computed(()=>rt(n.pricingType,n.details,n.preferConversionCredits)),o=e.computed(()=>ct(n.pricingType,n.details,n.modelType)),{$t:d,formatNumber:l}=C.useIntl(),s=e.computed(()=>d({id:"invoice.line.fixed_amount",defaultMessage:"Fixed amount",description:"Label shown when a price band charges a fixed amount regardless of usage"})),c=e.computed(()=>d({id:"invoice.line.flat_fee",defaultMessage:"Flat fee",description:"Label shown for a flat, usage-independent fee"})),u=e.computed(()=>{var y,E;const k=(E=(y=n.details)==null?void 0:y.band)==null?void 0:E.tier_top_bound;return k&&"number"in k?k.number:void 0}),g=e.computed(()=>{if(u.value!==void 0)return d({id:"invoice.line.per_units_tier_top_bound",defaultMessage:"per {count, plural, one {unit} other {{formattedCount} units}}",description:"Number of units a tiered price band applies per. Singular form omits the count."},{count:+u.value,formattedCount:u.value})}),p=e.computed(()=>{var y,E;return n.modelType==="PER_SEAT"?(E=(y=n.details)==null?void 0:y.band)==null?void 0:E.amount:void 0}),b=e.computed(()=>n.modelType==="PER_SEAT"?d({id:"invoice.line.per_seat",defaultMessage:"Per seat",description:"Label shown when a price band applies per single seat"}):d({id:"invoice.line.per_unit",defaultMessage:"Per unit",description:"Label shown when a price band applies per single unit"})),B=e.computed(()=>{var y,E;const k=(E=(y=n.details)==null?void 0:y.band)==null?void 0:E.block_size;return k&&"number"in k?k.number:void 0}),_=e.computed(()=>{if(B.value!==void 0)return d({id:"invoice.line.per_units_block_size",defaultMessage:"Per {count, plural, one {unit} other {{formattedCount} units}}",description:"Number of units a price band block applies per. Singular form omits the count."},{count:+B.value,formattedCount:l(+B.value)})});return(y,E)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(m,{number:"",class:"align-top"},{default:e.withCtx(()=>{var k;return[r.value.kind==="raw"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(r.value.value),1)],64)):r.value.kind==="amount"?(e.openBlock(),e.createBlock(v._sfc_main,{key:1,value:r.value.amount},null,8,["value"])):r.value.kind==="number"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(e.unref(l)(r.value.value)),1)],64)):r.value.kind==="conversion-credits"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createTextVNode(e.toDisplayString(e.unref(l)(+r.value.value,{maximumFractionDigits:e.unref(q.MAX_FRACTION_DIGITS)})),1)],64)):r.value.kind==="one"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createTextVNode("1")],64)):e.createCommentVNode("",!0),r.value.kind!=="conversion-credits"&&r.value.kind!=="hidden"&&!((k=t.details)!=null&&k.price_bound)&&i.value?(e.openBlock(),e.createElementBlock("div",dt,[i.value.type==="AMOUNT"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(v._sfc_main,{value:i.value.amount},null,8,["value"]),e.createTextVNode(" "+e.toDisplayString(e.unref(d)({id:"invoice.line.included",defaultMessage:"included",description:"Used to specify an included amount. Should be lowercase."})),1)],64)):i.value.type==="NUMBER"?(e.openBlock(),e.createElementBlock("span",st,e.toDisplayString(i.value.number)+" "+e.toDisplayString(e.unref(d)({id:"invoice.line.units_included",defaultMessage:"units included",description:"Used to specify an included units. Should be lowercase."})),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]}),_:1}),o.value.kind==="pass-through"?(e.openBlock(),e.createBlock(m,{key:0,class:"text-right align-top"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)({id:"invoice.line.pass_through",defaultMessage:"Pass through",description:"Name of the pass through pricing type"})),1)]),_:1})):(e.openBlock(),e.createBlock(m,{key:1,number:"",class:"align-top"},{default:e.withCtx(()=>{var k,w,I,S,A;return[o.value.kind==="amount"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(v._sfc_main,{value:o.value.amount},null,8,["value"]),((k=o.value.suffix)==null?void 0:k.kind)==="tier-top-bound"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[g.value?(e.openBlock(),e.createElementBlock("div",ut,e.toDisplayString(g.value),1)):p.value?(e.openBlock(),e.createElementBlock("div",mt,e.toDisplayString(b.value),1)):e.createCommentVNode("",!0)],64)):((w=o.value.suffix)==null?void 0:w.kind)==="block-size-or-per-unit"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[_.value?(e.openBlock(),e.createElementBlock("div",ft,e.toDisplayString(_.value),1)):t.modelType!=="RECURRING"?(e.openBlock(),e.createElementBlock("div",gt,e.toDisplayString(b.value),1)):e.createCommentVNode("",!0)],64)):((I=o.value.suffix)==null?void 0:I.kind)==="per-unit"?(e.openBlock(),e.createElementBlock("div",pt,e.toDisplayString(b.value),1)):((S=o.value.suffix)==null?void 0:S.kind)==="fixed-amount"?(e.openBlock(),e.createElementBlock("div",vt,e.toDisplayString(s.value),1)):((A=o.value.suffix)==null?void 0:A.kind)==="flat-fee"?(e.openBlock(),e.createElementBlock("div",xt,e.toDisplayString(c.value),1)):e.createCommentVNode("",!0)],64)):o.value.kind==="percentage"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(o.value.value)+"% ",1)],64)):e.createCommentVNode("",!0)]}),_:1})),t.showTaxPerLineItem?(e.openBlock(),e.createBlock(m,{key:2,number:"",class:"align-top"},{default:e.withCtx(()=>[t.hideTaxDetails?e.createCommentVNode("",!0):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.taxCategories,(k,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:"tabular-nums"},[e.createElementVNode("div",null,e.toDisplayString(k.percentage)+"%",1),e.createElementVNode("div",yt,[e.createVNode(v._sfc_main,{value:k.tax_amount},null,8,["value"])])]))),128))]),_:1})):e.createCommentVNode("",!0),e.createVNode(m,{number:"",class:"align-top"},{default:e.withCtx(()=>{var k,w,I,S,A;return[(w=(k=t.details)==null?void 0:k.amount)!=null&&w.currency&&((S=(I=t.details)==null?void 0:I.amount)!=null&&S.quantity)?(e.openBlock(),e.createElementBlock("div",kt,[t.showTaxPerLineItem?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.taxCategories,(H,f)=>{var N;return e.openBlock(),e.createElementBlock("div",{key:f,class:"inline-block"},[e.createElementVNode("div",ht,[e.createVNode(v._sfc_main,{value:t.details.amount,"data-testid":e.unref(X)},null,8,["value","data-testid"]),((N=t.details)==null?void 0:N.pricing_amount.quantity)!==t.details.amount.quantity?(e.openBlock(),e.createBlock(P._sfc_main,{key:0,placement:"top-end"},{tooltip:e.withCtx(()=>[e.createVNode(P.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(P._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)({id:"invoice.line.original_currency",defaultMessage:"Original currency",description:"Original currency"}))+" ",1),e.createVNode(v._sfc_main,{value:t.details.pricing_amount,class:"font-semibold"},null,8,["value"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(O._sfc_main$1,{icon:"info",size:"2xs"})]),_:1})):e.createCommentVNode("",!0)]),t.hideTaxDetails?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",bt,[t.amountType==="INCLUDING_TAX"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(e.unref(d)({id:"invoice.line.excl.tax",defaultMessage:"Excl. tax",description:"Value excludes tax"}))+" ",1),e.createVNode(v._sfc_main,{value:H.base_amount},null,8,["value"])],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(e.unref(d)({id:"invoice.line.incl.tax",defaultMessage:"Incl. tax",description:"Value includes tax"}))+" ",1),e.createVNode(v._sfc_main,{value:H.total_amount},null,8,["value"])],64))]))])}),128)):(e.openBlock(),e.createElementBlock("div",Bt,[e.createElementVNode("div",_t,[e.createVNode(v._sfc_main,{value:t.details.amount,"data-testid":e.unref(X)},null,8,["value","data-testid"]),((A=t.details)==null?void 0:A.pricing_amount.quantity)!==t.details.amount.quantity?(e.openBlock(),e.createBlock(P._sfc_main,{key:0,placement:"top-end"},{tooltip:e.withCtx(()=>[e.createVNode(P.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(P._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)({id:"invoice.line.original_currency",defaultMessage:"Original currency",description:"Original currency"}))+" ",1),e.createVNode(v._sfc_main,{value:t.details.pricing_amount,class:"font-semibold"},null,8,["value"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(O._sfc_main$1,{icon:"info",size:"2xs"})]),_:1})):e.createCommentVNode("",!0)])])),e.renderSlot(y.$slots,"one-off-line-context-menu")])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode("-")],64))]}),_:3})],64))}}),Nt=["tabindex","onClick"],re=e.defineComponent({__name:"InvoiceLineGroup",props:{group:{},startDate:{},endDate:{},total:{},amountType:{},invoicePeriodOrder:{},processingOnlyCustomers:{},displayInvoiceSubLinesPerProcessingOnlyCustomer:{type:Boolean},showTaxPerLineItem:{type:Boolean,default:!0},isExpandable:{type:Boolean,default:!0}},setup(t){const n=t,a=e.computed(()=>{var s;return(s=[...n.group.lines??[]])==null?void 0:s.sort((c,u)=>c.line_order-u.line_order)}),i=C.useIntl(),{getIsOpen:r,toggle:o}=W.useToggleList(),d=(s,c)=>{o(l(s,c))},l=(s,c)=>`${s}-line-${c}`;return(s,c)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode($,null,{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(x,{left:"",class:"w-1/5 text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).$t({id:"invoice.table_header.unit",defaultMessage:"Unit",description:"Table header for the column containing the number of units of invoice groups"})),1)]),_:1}),e.createVNode(x,{right:"",class:"w-1/5 text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).$t({id:"invoice.table_header.quantity",defaultMessage:"Quantity",description:"Table header for quantity column"})),1)]),_:1}),e.createVNode(x,{right:"",class:"w-1/5 text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).$t({id:"invoice.table_header.price",defaultMessage:"Price",description:"Table header for the column containing the number of units of invoice groups"})),1)]),_:1}),t.showTaxPerLineItem?(e.openBlock(),e.createBlock(x,{key:0,right:"",class:"w-1/5 text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).$t({id:"invoice.table_header.tax_rate",defaultMessage:"Tax rate",description:"Table header for the column containing the tax percentage of invoice groups"})),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(x,{right:"",class:"w-1/5 text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).$t({id:"invoice.table_header.sub_total",defaultMessage:"Subtotal",description:"Table header for the column containing the subtotal for invoices"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(u,g)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:g},[e.createElementVNode("tr",{tabindex:t.isExpandable&&u.sub_lines?0:void 0,class:e.normalizeClass(["group",{"cursor-pointer":t.isExpandable&&u.sub_lines,"border-t":g!==0}]),onClick:p=>d(t.group.group_order,u.line_order)},[(e.openBlock(),e.createBlock(it,{key:g,data:u,"period-order":t.invoicePeriodOrder,"group-order":t.group.group_order,"is-last":g===a.value.length-1,"group-type":t.group.type,"is-expanded":e.unref(r)(l(t.group.group_order,u.line_order))},{"invoice-line-prefix":e.withCtx(p=>[e.renderSlot(s.$slots,"invoice-line-prefix",e.mergeProps({ref_for:!0},p))]),"line-content":e.withCtx(p=>{var b,B;return[e.createVNode(Z,{details:p.details,"pricing-type":u.pricing_type,"tax-categories":u.tax_categories,"amount-type":t.amountType,"model-type":(B=(b=u.product_items)==null?void 0:b[0])==null?void 0:B.model_type,"show-tax-per-line-item":t.showTaxPerLineItem},e.createSlots({_:2},[u.type==="ONE_OFF"?{name:"one-off-line-context-menu",fn:e.withCtx(_=>[e.renderSlot(s.$slots,"one-off-line-context-menu",e.mergeProps({ref_for:!0},_,{lineOrder:u.line_order}))]),key:"0"}:void 0]),1032,["details","pricing-type","tax-categories","amount-type","model-type","show-tax-per-line-item"])]}),_:2},1032,["data","period-order","group-order","is-last","group-type","is-expanded"]))],10,Nt),e.createVNode(Q,{ref_for:!0,ref:l(t.group.group_order,u.line_order),"sub-lines":u.sub_lines??[],"processing-only-customers":t.processingOnlyCustomers,"display-invoice-sub-lines-per-processing-only-customer":t.displayInvoiceSubLinesPerProcessingOnlyCustomer,"line-order":u.line_order,"is-open":e.unref(r)(l(t.group.group_order,u.line_order)),"period-order":t.invoicePeriodOrder,"group-order":t.group.group_order,"show-tax-per-line-item":t.showTaxPerLineItem},{"invoice-line-prefix":e.withCtx(p=>[e.renderSlot(s.$slots,"invoice-line-prefix",e.mergeProps({ref_for:!0},p))]),"subline-content":e.withCtx(p=>{var b,B;return[e.createVNode(Z,{details:p.details,"hide-tax-details":p.hideTaxDetails,"prefer-conversion-credits":"","pricing-type":u.pricing_type,"tax-categories":u.tax_categories,"amount-type":t.amountType,"model-type":(B=(b=u.product_items)==null?void 0:b[0])==null?void 0:B.model_type,"show-tax-per-line-item":t.showTaxPerLineItem},null,8,["details","hide-tax-details","pricing-type","tax-categories","amount-type","model-type","show-tax-per-line-item"])]}),_:2},1032,["sub-lines","processing-only-customers","display-invoice-sub-lines-per-processing-only-customer","line-order","is-open","period-order","group-order","show-tax-per-line-item"])],64))),128))]),_:3})]))}}),Ct={class:"flex items-center"},Tt={key:2,class:"ml-1 inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded-full bg-primary-100 text-2xs font-bold text-primary-600"},j=e.defineComponent({__name:"InvoiceTableRowLabel",props:{label:{},count:{}},setup(t){const n=e.ref(),a=e.ref(!1);return ue.useResizeObserver(n,([i])=>{a.value=i.target.clientWidth<i.target.scrollWidth}),(i,r)=>(e.openBlock(),e.createElementBlock("div",Ct,[a.value?(e.openBlock(),e.createBlock(P._sfc_main,{key:0,placement:"bottom-start",class:"min-w-0 leading-normal"},{tooltip:e.withCtx(()=>[e.createVNode(P.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(P._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("span",{ref_key:"labelElement",ref:n,class:"block truncate"},e.toDisplayString(t.label),513)]),_:1})):(e.openBlock(),e.createElementBlock("span",{key:1,ref_key:"labelElement",ref:n,class:e.normalizeClass(["block",{truncate:t.count!==void 0}])},e.toDisplayString(t.label),3)),t.count!==void 0?(e.openBlock(),e.createElementBlock("span",Tt,e.toDisplayString(t.count),1)):e.createCommentVNode("",!0)]))}}),Vt=["tabindex"],Et={key:0},wt={colspan:"2",class:"p-0"},Ot={class:"-mx-9 bg-gray-50 px-9 py-3 text-xs"},It=e.defineComponent({__name:"InvoiceGroupRevenue",props:{forwardedFromCustomers:{},showOriginalCustomerInvoiceLine:{},group:{},expandedItems:{},handleToggleItems:{},formatIndex:{},invoicePeriodOrder:{},groupOrder:{},isExpandable:{type:Boolean},forceExpanded:{type:Boolean},amountType:{},processingOnlyCustomers:{},displayInvoiceSubLinesPerProcessingOnlyCustomer:{type:Boolean},showTaxPerLineItem:{type:Boolean,default:!0}},setup(t){const n=t,a=e.computed(()=>{var i,r,o;const d=[(i=n.group.pricing)==null?void 0:i.name,Y.getComposedString(((r=n.group.products)==null?void 0:r.map(c=>c.name))??[])].filter(Boolean).join(" - "),l=je(n.group,!!n.showOriginalCustomerInvoiceLine);if(!l)return d;const s=(o=n.forwardedFromCustomers)==null?void 0:o.find(c=>c.id===l);return[s&&ae.getCustomerName(s),d].filter(Boolean).join(" - ")});return(i,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("tr",{class:e.normalizeClass(["border-t break-inside-avoid",{"cursor-pointer":t.isExpandable}]),tabindex:t.isExpandable?0:void 0,onClick:r[0]||(r[0]=o=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))),onKeyup:[r[1]||(r[1]=e.withKeys(o=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)),["enter"])),r[2]||(r[2]=e.withKeys(o=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)),["space"]))]},[e.createVNode(m,{class:"p-0"},{default:e.withCtx(()=>{var o;return[t.isExpandable?(e.openBlock(),e.createBlock(O._sfc_main$1,{key:0,icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 text-slate-400",{"-rotate-90":!t.expandedItems.includes(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))}])},null,8,["class"])):e.createCommentVNode("",!0),e.createVNode(j,{label:a.value,count:t.isExpandable?((o=t.group.lines)==null?void 0:o.length)??0:void 0},null,8,["label","count"])]}),_:1}),e.createVNode(m,{number:""},{default:e.withCtx(()=>[t.amountType==="INCLUDING_TAX"?(e.openBlock(),e.createBlock(v._sfc_main,{key:0,value:t.group.amount_including_tax,"data-testid":e.unref(R),"data-type":e.unref(z)(t.group)},null,8,["value","data-testid","data-type"])):(e.openBlock(),e.createBlock(v._sfc_main,{key:1,value:t.group.amount_excluding_tax,"data-testid":e.unref(R),"data-type":e.unref(z)(t.group)},null,8,["value","data-testid","data-type"]))]),_:1})],42,Vt),t.forceExpanded||t.expandedItems.includes(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))?(e.openBlock(),e.createElementBlock("tr",Et,[e.createElementVNode("td",wt,[e.createElementVNode("div",Ot,[e.createVNode(re,{"invoice-period-order":t.invoicePeriodOrder,"start-date":t.group.start_at,"end-date":t.group.end_at,total:t.group.amount_excluding_tax,group:t.group,"amount-type":t.amountType,"processing-only-customers":t.processingOnlyCustomers,"display-invoice-sub-lines-per-processing-only-customer":t.displayInvoiceSubLinesPerProcessingOnlyCustomer,"show-tax-per-line-item":t.showTaxPerLineItem,"is-expandable":t.isExpandable},{"invoice-line-prefix":e.withCtx(o=>[e.renderSlot(i.$slots,"invoice-line-prefix",e.normalizeProps(e.guardReactiveProps(o)))]),"one-off-line-context-menu":e.withCtx(o=>[e.renderSlot(i.$slots,"one-off-line-context-menu",e.mergeProps(o,{groupOrder:t.groupOrder}))]),_:3},8,["invoice-period-order","start-date","end-date","total","group","amount-type","processing-only-customers","display-invoice-sub-lines-per-processing-only-customer","show-tax-per-line-item","is-expandable"])])])])):e.createCommentVNode("",!0)],64))}}),ee=e.defineComponent({__name:"InvoiceGroupWalletBalance",props:{lines:{},creditTypes:{}},setup(t){const n=t,{$t:a}=C.useIntl(),i=e.computed(()=>K.getLabelledInvoiceWalletBalanceRows(K.getInvoiceWalletBalanceRows(n.lines),{creditTypes:n.creditTypes,creditsLabel:a({defaultMessage:"Credits",description:"Generic fallback label for a wallet balance row with no known credit type",id:"invoiceGroupWalletBalance.creditsLabel"}),walletLabel:a({defaultMessage:"Wallet balance",description:"Label for a wallet balance row of a wallet that pays in money",id:"invoiceGroupWalletBalance.walletBalanceLabel"})})),r=o=>K.formatInvoiceWalletBalanceValue(o,{formatMoney:q.formatAmount,formatQuantity:d=>d});return(o,d)=>i.value.length?(e.openBlock(),e.createBlock($,{key:0},{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(x,{left:"",class:"w-2/5 text-gray-400"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Wallet breakdown",description:"Table heading for the wallet column in the wallet balance table",id:"invoiceGroupWalletBalance.walletBreakdownHeading"})),1)]),_:1}),e.createVNode(x,{right:"",class:"w-1/5 text-gray-400"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Balance",description:"Table heading for the balance column in the wallet balance table",id:"invoiceGroupWalletBalance.balanceHeading"})),1)]),_:1}),e.createVNode(x,{right:"",class:"w-1/5 text-gray-400"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Used",description:"Table heading for the used-balance column in the wallet balance table",id:"invoiceGroupWalletBalance.usedHeading"})),1)]),_:1}),e.createVNode(x,{right:"",class:"w-1/5 text-gray-400"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Remaining",description:"Table heading for the remaining-balance column in the wallet balance table",id:"invoiceGroupWalletBalance.remainingHeading"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,l=>(e.openBlock(),e.createElementBlock("tr",{key:l.key},[e.createVNode(m,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.label),1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r(l.availableBalance)),1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r(l.usedBalance)),1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r(l.leftBalance)),1)]),_:2},1024)]))),128))]),_:1})):e.createCommentVNode("",!0)}});function te(t){return typeof t=="function"?t():e.unref(t)}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function St(t=!1,n={}){const{truthyValue:a=!0,falsyValue:i=!1}=n,r=e.isRef(t),o=e.ref(t);function d(l){if(arguments.length)return o.value=l,o.value;{const s=te(a);return o.value=o.value===s?te(i):s,o.value}}return r?d:[o,d]}const $t={key:0,totals:"",class:"border-t break-inside-avoid"},ne=e.defineComponent({__name:"InvoiceSummaryTotalExcludingTax",props:{baseAmount:{}},setup(t){const n=C.useIntl();return(a,i)=>t.baseAmount?(e.openBlock(),e.createElementBlock("tr",$t,[e.createVNode(m,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.total_excluding_taxes",defaultMessage:"Total excluding taxes",description:"Table row header for the total excluding taxes column in the invoice table"})),1)]),_:1}),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:t.baseAmount,"data-testid":e.unref(Be)},null,8,["value","data-testid"])]),_:1})])):e.createCommentVNode("",!0)}}),Mt={key:0,class:"border-t font-bold break-inside-avoid"},oe=e.defineComponent({__name:"InvoiceSummaryTotalIncludingTax",props:{totalAmount:{},isCustomerFacing:{type:Boolean}},setup(t){const n=C.useIntl();return(a,i)=>t.totalAmount?(e.openBlock(),e.createElementBlock("tr",Mt,[e.createVNode(m,{class:"font-bold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.isCustomerFacing?e.unref(n).$t({id:"invoice.table_header.total_including_taxes_customer_facing",defaultMessage:"Total due today",description:"Table row header for the total including taxes column in the invoice table for a customer facing component"}):e.unref(n).$t({id:"invoice.table_header.total_including_taxes",defaultMessage:"Total including taxes",description:"Table row header for the total including taxes column in the invoice table"})),1)]),_:1}),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:t.totalAmount,"data-testid":e.unref(be)},null,8,["value","data-testid"])]),_:1})])):e.createCommentVNode("",!0)}}),Dt={key:0,colspan:"4",class:"p-0"},Pt=e.defineComponent({__name:"InvoiceTaxes",props:{taxCategories:{}},setup(t){const n=C.useIntl();return(a,i)=>(e.openBlock(),e.createBlock($,{class:"table-fixed"},{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(x,{left:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.tax type",defaultMessage:"Tax type",description:"Table header for the column containing the tax type"})),1)]),_:1}),e.createVNode(x,{right:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.base amount",defaultMessage:"Base amount",description:"Table header for the column containing the base amount"})),1)]),_:1}),e.createVNode(x,{right:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.tax_percentage",defaultMessage:"Percentage",description:"Table header for the column containing the tax percentage"})),1)]),_:1}),e.createVNode(x,{right:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.tax amount",defaultMessage:"Tax amount",description:"Table header for the column containing the tax amount"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.taxCategories,(r,o)=>(e.openBlock(),e.createElementBlock("tr",{key:o},[r.rates?(e.openBlock(),e.createElementBlock("td",Dt,[e.createVNode($,{class:"table-fixed"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.rates,(d,l)=>(e.openBlock(),e.createElementBlock("tr",{key:l},[e.createVNode(m,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.name)+" ("+e.toDisplayString(r.category)+") ",1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:r.base_amount},null,8,["value"])]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.percentage)+"%",1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:d.tax_amount},null,8,["value"])]),_:2},1024)]))),128))]),_:2},1024)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(m,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.name)+" ("+e.toDisplayString(r.category)+") ",1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:r.base_amount},null,8,["value"])]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.percentage)+"%",1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:r.tax_amount},null,8,["value"])]),_:2},1024)],64))]))),128))]),_:1}))}}),At={class:"flex items-start justify-between"},Lt={key:0,class:"max-h-9"},Ft={class:"flex flex-col gap-2"},Ut={key:0},Rt={key:3},zt={colspan:"2",class:"p-0"},qt=["tabindex"],Wt={key:1},Ht={colspan:"2",class:"p-0"},Gt={class:"-mx-9 bg-gray-50 px-9 py-3 text-xs"},Xt=["tabindex","onClick","onKeyup"],Kt={key:0},jt={colspan:"2",class:"p-0"},Yt={class:"-mx-9 bg-gray-50 px-9 py-3 text-xs"},Qt={key:1},Jt={colspan:"2",class:"p-0"},Zt={key:0,class:"break-inside-avoid border-t font-bold"},en=e.defineComponent({__name:"InvoiceSummary",props:{invoice:{},isExpandable:{type:Boolean,default:!1},forceExpanded:{type:Boolean,default:!1},heading:{default:"details"},isInvoiceLineCreatable:{type:Boolean,default:!1},isNoteCreatable:{type:Boolean,default:!1},showRenderedServicesHeader:{type:Boolean,default:!0},isCustomerFacing:{type:Boolean},showTotals:{type:Boolean,default:!0},hideOneOffWalletBalance:{type:Boolean,default:!1},showWalletBalance:{type:Boolean,default:!0}},emits:["add-invoice-line","add-note"],setup(t,{emit:n}){const a=C.useIntl(),{formatMessage:i}=a,r=n,o=t,[d,l]=J(),[s,c]=J(),[u,g]=St(),p=(...f)=>{o.isExpandable&&l(...f)},b=f=>{o.isExpandable&&c(f)},B=()=>{!o.invoice.tax_categories||!o.isExpandable||g()},_=(f,N)=>+`${f}${N}`,y=f=>a.$t({id:"invoice.service_period_heading",defaultMessage:"Service period - {start_at} - {end_at}",description:"Heading for rendered services where {start_at} is replaced for the start date and {end_at} for the end date in invoice summary"},{start_at:a.formatDate({date:f.start_at,format:"date",timezone:C.formatTimezone(o.invoice.customer.timezone),offsetType:"offsetted"}),end_at:a.formatDate({date:f.end_at,format:"date",timezone:C.formatTimezone(o.invoice.customer.timezone),offsetType:"offsetted"})}),E=f=>{switch(f){case"PRICING":case"REVENUE":return a.$t({id:"invoice.table_heading.products",defaultMessage:"Products",description:"Table heading for the column containing the products of the invoice"});case"COMMITMENT":return a.$t({id:"invoice.table_heading.commitments",defaultMessage:"Commitments",description:"Table heading for the column containing the commitments of the invoice"});case"DISCOUNT":return a.$t({id:"invoice.table_heading.discounts",defaultMessage:"Discounts",description:"Table heading for the column containing the discounts of the invoice"});case"MARKUP":return a.$t({id:"invoice.table_heading.markups",defaultMessage:"Markups",description:"Table heading for the column containing the markups of the invoice"});case"ONE_OFF":return a.$t({id:"invoice.table_heading.one_offs",defaultMessage:"One-off's",description:"Table heading for the column containing the one-offs of the invoice"})}},k=f=>{var N,T;return(N=f.products)!=null&&N.length?[(T=f.pricing)==null?void 0:T.name,Y.getComposedString(f.products.map(V=>V.name))].filter(Boolean).join(" - "):f.description??""},w=f=>o.showWalletBalance&&!(o.hideOneOffWalletBalance&&f.type==="ONE_OFF")&&(f.lines??[]).some(N=>{var T,V;return!!((V=(T=N.details)==null?void 0:T.wallet_balances)!=null&&V.length)}),I=f=>f.groups.reduce((N,T)=>T.type in N?{...N,[T.type]:[...N[T.type],T]}:{...N,[T.type]:[T]},{}),S=e.computed(()=>{const f=[];return["ONE_OFF","STANDARD","ONE_OFF_CREDIT"].includes(o.invoice.type)&&["DRAFT","OPEN"].includes(o.invoice.status)&&o.isInvoiceLineCreatable&&f.push({label:i({defaultMessage:"Invoice line",id:"JlhdD2",description:"Label for adding an invoice line"}),onClick:()=>r("add-invoice-line")}),o.isNoteCreatable&&f.push({label:i({defaultMessage:"Note",id:"jB8+k/",description:"Label for adding a note to an invoice"}),onClick:()=>r("add-note")}),f}),A=e.computed(()=>o.invoice.show_tax_per_line_item!==!1),H=e.computed(()=>{if(o.heading==="summary")return a.$t({id:"invoice.summaryTitle",defaultMessage:"Invoice summary",description:"Title for the compact, always-shown invoice summary section"});switch(o.invoice.type){case"CREDIT":return a.$t({id:"invoice.creditDetailsTitle",defaultMessage:"Credit details",description:"Title for the invoice summary of a credit-note invoice"});case"ONE_OFF":return a.$t({id:"invoice.oneOffDetailsTitle",defaultMessage:"One-off details",description:"Title for the invoice summary of a one-off invoice"});case"ONE_OFF_CREDIT":return a.$t({id:"invoice.oneOffCreditDetailsTitle",defaultMessage:"One-off credit details",description:"Title for the invoice summary of a one-off credit-note invoice"});default:return a.$t({id:"invoice.title",defaultMessage:"Details",description:"Title for the invoice summary"})}});return(f,N)=>{var T;return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",At,[f.$slots.logo?(e.openBlock(),e.createElementBlock("div",Lt,[e.renderSlot(f.$slots,"logo")])):(e.openBlock(),e.createBlock(fe._sfc_main,{key:1,title:H.value,variant:"neutral",icon:"draft","icon-class":"print:hidden","title-class":"print:text-sm"},null,8,["title"])),f.$slots.intro?e.renderSlot(f.$slots,"intro",{},void 0,void 0,2):e.createCommentVNode("",!0),e.createElementVNode("div",Ft,[(T=S.value)!=null&&T.length?(e.openBlock(),e.createBlock(ge._sfc_main$1,{key:0,items:S.value,width:"auto"},{trigger:e.withCtx(()=>[e.createVNode(O._sfc_main,{"icon-prefix":"add",size:"sm",intent:"secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Add",id:"YnK/yF",description:"Label for adding an item to an invoice"})),1)]),_:1})]),_:1},8,["items"])):e.createCommentVNode("",!0),e.renderSlot(f.$slots,"child-customers-selector")])]),f.$slots.total?e.renderSlot(f.$slots,"total",{},void 0,void 0,0):e.createCommentVNode("",!0),e.renderSlot(f.$slots,"notes"),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.invoice.periods,(V,M)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:M},[t.showRenderedServicesHeader?(e.openBlock(),e.createBlock(me._sfc_main,{key:0,class:"mt-6"},{default:e.withCtx(()=>[e.createVNode(C._sfc_main,{tag:"h2",variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y(V)),1)]),_:2},1024)]),_:2},1024)):e.createCommentVNode("",!0),V.groups?(e.openBlock(),e.createBlock($,{key:1,class:e.normalizeClass(["text-sm",{"mt-3":t.showRenderedServicesHeader}]),"data-testid":e.unref(ye)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.entries(I(V)),([h,L],D)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:h},[D>0?(e.openBlock(),e.createElementBlock("tr",Ut,[...N[0]||(N[0]=[e.createElementVNode("td",null,[e.createElementVNode("div",{class:"h-4"})],-1)])])):e.createCommentVNode("",!0),e.createElementVNode("tr",null,[e.createVNode(x,{left:"",class:"text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(E(h)),1)]),_:2},1024),e.createVNode(x,{right:"",class:"w-28 text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a).$t({id:"invoice.amount_table_heading",defaultMessage:"Amount",description:"Table heading for the amount column in the invoice table"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L,(F,le)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:le},[h==="REVENUE"||h==="PRICING"||h==="ONE_OFF"?(e.openBlock(),e.createBlock(It,{key:0,group:F,"expanded-items":e.unref(d),"handle-toggle-items":p,"is-expandable":t.isExpandable,"force-expanded":t.forceExpanded,"format-index":_,"invoice-period-order":V.period_order,"group-order":F.group_order,"amount-type":t.invoice.pricing_amount_type,"processing-only-customers":t.invoice.processing_only_customers,"display-invoice-sub-lines-per-processing-only-customer":t.invoice.display_invoice_sub_lines_per_processing_only_customer,"show-tax-per-line-item":A.value,"forwarded-from-customers":t.invoice.forwarded_from_customers,"show-original-customer-invoice-line":t.invoice.show_original_customer_invoice_line},{"invoice-line-prefix":e.withCtx(U=>[e.renderSlot(f.$slots,"invoice-line-prefix",e.mergeProps({ref_for:!0},U))]),"one-off-line-context-menu":e.withCtx(U=>[e.renderSlot(f.$slots,"one-off-line-context-menu",e.mergeProps({ref_for:!0},U,{periodOrder:V.period_order}))]),_:2},1032,["group","expanded-items","is-expandable","force-expanded","invoice-period-order","group-order","amount-type","processing-only-customers","display-invoice-sub-lines-per-processing-only-customer","show-tax-per-line-item","forwarded-from-customers","show-original-customer-invoice-line"])):h==="DISCOUNT"||h==="MARKUP"?(e.openBlock(),e.createBlock(Ke,{key:1,group:F,"expanded-items":e.unref(d),"handle-toggle-items":p,"is-expandable":t.isExpandable,"force-expanded":t.forceExpanded,"format-index":_,"invoice-period-order":V.period_order,"group-order":F.group_order,"amount-type":t.invoice.pricing_amount_type,heading:h==="DISCOUNT"?e.unref(a).$t({id:"invoice.discounts_table_heading",defaultMessage:"Discounts",description:"Heading for discounts in the invoice table"}):e.unref(a).$t({id:"invoice.markups_table_heading",defaultMessage:"Markups",description:"Heading for markups in the invoice table"})},{"invoice-line-prefix":e.withCtx(U=>[e.renderSlot(f.$slots,"invoice-line-prefix",e.mergeProps({ref_for:!0},U))]),_:3},8,["group","expanded-items","is-expandable","force-expanded","invoice-period-order","group-order","amount-type","heading"])):h==="COMMITMENT"?(e.openBlock(),e.createBlock(qe,{key:2,group:F,"expanded-items":e.unref(d),"handle-toggle-items":p,"is-expandable":t.isExpandable,"force-expanded":t.forceExpanded,"format-index":_,"invoice-period-order":V.period_order,"group-order":F.group_order,"amount-type":t.invoice.pricing_amount_type},{"invoice-line-prefix":e.withCtx(U=>[e.renderSlot(f.$slots,"invoice-line-prefix",e.mergeProps({ref_for:!0},U))]),_:3},8,["group","expanded-items","is-expandable","force-expanded","invoice-period-order","group-order","amount-type"])):e.createCommentVNode("",!0),w(F)?(e.openBlock(),e.createElementBlock("tr",Rt,[e.createElementVNode("td",zt,[e.createVNode(ee,{lines:F.lines,"credit-types":t.invoice.credit_types},null,8,["lines","credit-types"])])])):e.createCommentVNode("",!0)],64))),128))],64))),128))]),_:2},1032,["class","data-testid"])):e.createCommentVNode("",!0)],64))),128)),t.invoice.tax_summary&&(t.showTotals||(t.forceExpanded||e.unref(u))&&t.invoice.tax_categories)?(e.openBlock(),e.createBlock($,{key:1,class:"mt-6 text-sm print:ml-auto print:w-2/3"},{default:e.withCtx(()=>[t.showTotals?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("tr",null,[e.createVNode(x,{left:"",class:"text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a).$t({id:"invoice.totals_table_heading",defaultMessage:"Totals",description:"Table heading for the totals column in the invoice table"})),1)]),_:1}),e.createVNode(x,{right:"",class:"w-28 text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a).$t({id:"invoice.amount_table_heading",defaultMessage:"Amount",description:"Table heading for the amount column in the invoice table"})),1)]),_:1})]),t.invoice.pricing_amount_type==="INCLUDING_TAX"?(e.openBlock(),e.createBlock(oe,{key:0,"total-amount":t.invoice.tax_summary.total_amount,"is-customer-facing":t.isCustomerFacing},null,8,["total-amount","is-customer-facing"])):(e.openBlock(),e.createBlock(ne,{key:1,"base-amount":t.invoice.tax_summary.base_amount},null,8,["base-amount"])),t.invoice.tax_summary.tax_amount?(e.openBlock(),e.createElementBlock("tr",{key:2,class:e.normalizeClass([{"cursor-pointer":t.invoice.tax_categories&&t.isExpandable},"break-inside-avoid border-t"]),tabindex:t.isExpandable?0:void 0,onClick:B,onKeyup:[e.withKeys(B,["enter"]),e.withKeys(B,["space"])]},[e.createVNode(m,null,{default:e.withCtx(()=>[t.isExpandable&&t.invoice.tax_categories&&t.invoice.tax_categories.length?(e.openBlock(),e.createBlock(O._sfc_main$1,{key:0,icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 text-slate-400",{"-rotate-90":!e.unref(u)}])},null,8,["class"])):e.createCommentVNode("",!0),e.createVNode(j,{label:e.unref(a).$t({id:"invoice.taxes_table_heading",defaultMessage:"Taxes",description:"Table heading for the taxes column in the invoice table"}),count:t.isExpandable&&t.invoice.tax_categories?t.invoice.tax_categories.length:void 0},null,8,["label","count"])]),_:1}),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:t.invoice.tax_summary.tax_amount,"data-testid":e.unref(he)},null,8,["value","data-testid"])]),_:1})],42,qt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),(t.forceExpanded||e.unref(u))&&t.invoice.tax_categories?(e.openBlock(),e.createElementBlock("tr",Wt,[e.createElementVNode("td",Ht,[e.createElementVNode("div",Gt,[e.createVNode(Pt,{"tax-categories":t.invoice.tax_categories},null,8,["tax-categories"])])])])):e.createCommentVNode("",!0),t.showTotals?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[t.invoice.pricing_amount_type==="INCLUDING_TAX"?(e.openBlock(),e.createBlock(ne,{key:0,"base-amount":t.invoice.tax_summary.base_amount},null,8,["base-amount"])):(e.openBlock(),e.createBlock(oe,{key:1,"total-amount":t.invoice.tax_summary.total_amount},null,8,["total-amount"]))],64)):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0),e.unref(ce.isEmpty)(t.invoice.closed_periods)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($,{key:2,class:"mt-6 text-sm"},{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(x,{left:"",class:"text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a).$t({id:"invoice.already_deducted_table_heading",defaultMessage:"Already deducted",description:"Table heading for the already deducted rows in the invoice table"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.invoice.closed_periods,(V,M)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:M},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.groups,(h,L)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:L},[e.createElementVNode("tr",{class:e.normalizeClass(["break-inside-avoid border-t",{"pt-6":M===0,"cursor-pointer":t.isExpandable}]),tabindex:t.isExpandable?0:void 0,onClick:D=>b(_(M,L)),onKeyup:[e.withKeys(D=>b(_(M,L)),["enter"]),e.withKeys(D=>b(_(M,L)),["space"])]},[e.createVNode(m,{class:"p-0"},{default:e.withCtx(()=>{var D;return[t.isExpandable?(e.openBlock(),e.createBlock(O._sfc_main$1,{key:0,icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 text-slate-400",{"-rotate-90":!e.unref(s).includes(_(M,L))}])},null,8,["class"])):e.createCommentVNode("",!0),e.createVNode(j,{label:k(h),count:t.isExpandable?((D=h.lines)==null?void 0:D.length)??0:void 0},null,8,["label","count"])]}),_:2},1024),e.createVNode(m,{number:"",class:"w-28"},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:h.amount_excluding_tax,"data-testid":e.unref(_e),"data-type":e.unref(Ce)},null,8,["value","data-testid","data-type"])]),_:2},1024)],42,Xt),t.forceExpanded||e.unref(s).includes(_(M,L))?(e.openBlock(),e.createElementBlock("tr",Kt,[e.createElementVNode("td",jt,[e.createElementVNode("div",Yt,[e.createVNode(re,{"start-date":h.start_at,"end-date":h.end_at,total:h.amount_excluding_tax,group:h,"amount-type":t.invoice.pricing_amount_type,"show-tax-per-line-item":A.value,"processing-only-customers":t.invoice.processing_only_customers,"display-invoice-sub-lines-per-processing-only-customer":t.invoice.display_invoice_sub_lines_per_processing_only_customer},{"one-off-line-context-menu":e.withCtx(D=>[e.renderSlot(f.$slots,"one-off-line-context-menu",e.mergeProps({ref_for:!0},D,{groupOrder:h.group_order,periodOrder:V.period_order}))]),_:2},1032,["start-date","end-date","total","group","amount-type","show-tax-per-line-item","processing-only-customers","display-invoice-sub-lines-per-processing-only-customer"])])])])):e.createCommentVNode("",!0),w(h)?(e.openBlock(),e.createElementBlock("tr",Qt,[e.createElementVNode("td",Jt,[e.createVNode(ee,{lines:h.lines,"credit-types":t.invoice.credit_types},null,8,["lines","credit-types"])])])):e.createCommentVNode("",!0)],64))),128))],64))),128)),t.invoice.open_invoice_amount&&!t.invoice.paid&&t.showTotals?(e.openBlock(),e.createElementBlock("tr",Zt,[e.createVNode(m,{class:"font-bold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a).$t({id:"invoice.amount_due_table_heading",defaultMessage:"Amount due",description:"Table heading for the amount due row in the invoice table"})),1)]),_:1}),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:t.invoice.open_invoice_amount,"data-testid":e.unref(Ne)},null,8,["value","data-testid"])]),_:1})])):e.createCommentVNode("",!0)]),_:3}))])}}});exports.InvoiceTable=$;exports._sfc_main=en;exports._sfc_main$1=x;exports._sfc_main$2=m;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { ref as re, openBlock as t, createElementBlock as o, renderSlot as M, defineComponent as S, normalizeClass as N, Fragment as p, renderList as V, createVNode as a, withCtx as i, createElementVNode as _, createTextVNode as d, toDisplayString as r, createBlock as h, unref as l, createCommentVNode as y, createSlots as Ie, withKeys as j, normalizeProps as ve, guardReactiveProps as fe, computed as B, mergeProps as Q, isRef as Ae } from "vue";
|
|
2
|
-
import { u as H, _ as Pe, k as pe } from "./customElements-
|
|
2
|
+
import { u as H, _ as Pe, k as pe } from "./customElements-DT1YyL4O.mjs";
|
|
3
3
|
import { _ as $ } from "./Amount.vue.es-DPqHB8Xd.mjs";
|
|
4
4
|
import { i as Ue } from "./useService-Bh47bllz.mjs";
|
|
5
|
-
import { a as G, _ as Le } from "./Button.vue.es-
|
|
5
|
+
import { a as G, _ as Le } from "./Button.vue.es-PbJFK8z7.mjs";
|
|
6
6
|
import { _ as Se } from "./floating-ui.vue.es-CYt0fSY7.mjs";
|
|
7
7
|
import { a as $e } from "./customer.es-B5ppZf0j.mjs";
|
|
8
8
|
import { M as Me, f as we, a as De } from "./formatting.es-RclXHhKo.mjs";
|
|
9
9
|
import { _ as Ee, u as ge } from "./Comparators.vue.es-CwhX3rbx.mjs";
|
|
10
|
-
import { _ as Re } from "./Chip.vue.es-
|
|
10
|
+
import { _ as Re } from "./Chip.vue.es-DpcOM3Ai.mjs";
|
|
11
11
|
import { g as be } from "./getComposedString.es-C__uhJpd.mjs";
|
|
12
|
-
import { _ as de, T as ue, a as ce } from "./TooltipParagraph.vue.es-
|
|
12
|
+
import { _ as de, T as ue, a as ce } from "./TooltipParagraph.vue.es-nGFfHF1A.mjs";
|
|
13
13
|
import { f as Fe } from "./index.es-CXkP_k3u.mjs";
|
|
14
14
|
import { g as Ve, a as We, f as ze } from "./wallets.es-eH2C2ygn.mjs";
|
|
15
|
-
import { _ as He } from "./DividerText.vue.es-
|
|
16
|
-
import { _ as Ge } from "./IconTitle.vue.es-
|
|
17
|
-
import { a as Xe } from "./ContextMenu.vue.es-
|
|
15
|
+
import { _ as He } from "./DividerText.vue.es-CSE7a-T0.mjs";
|
|
16
|
+
import { _ as Ge } from "./IconTitle.vue.es-BsdjyGlQ.mjs";
|
|
17
|
+
import { a as Xe } from "./ContextMenu.vue.es-tAuFp-6i.mjs";
|
|
18
18
|
const xe = (e = []) => {
|
|
19
19
|
const n = re(e);
|
|
20
20
|
return [n, (c) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("vue"),M=require("./index.es-BclokHQX.js"),L=require("./ContextMenu.vue.es-B3Rz6Ojk.js"),k=require("./Button.vue.es-M_jXZda4.js"),C=require("./slots.es-T9ZJRGtG.js"),X=require("./Avatar.vue.es-D42J_izE.js"),q=require("./customElements-Vox1PB6G.js"),Y=require("./IconButton.vue.es-BTAkuFsm.js"),J=require("./floating-ui.vue.es-Bly3DGWm.js"),w=60,B="z-index-tracker",Q=()=>({defaultZIndex:w,getZIndex:()=>{const o=document.querySelectorAll(`.${B}`);let i=w;return(o??[]).forEach(s=>{const r=window.getComputedStyle(s).getPropertyValue("z-index");r&&+r>=i&&(i=+r+1)}),i},getTopZIndex:()=>{const o=document.querySelectorAll(`.${B}`);let i=w;return(o??[]).forEach(s=>{const r=window.getComputedStyle(s).getPropertyValue("z-index");r&&+r>i&&(i=+r)}),i},trackingClass:B}),W=e.defineComponent({__name:"Backdrop",props:{blurred:{type:Boolean,default:!1},color:{default:"gray"},zIndex:{}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["fixed inset-0",{"bg-white/90 backdrop-blur":t.blurred&&t.color==="white","bg-white/80":!t.blurred&&t.color==="white","bg-gray-200/90 backdrop-blur":t.blurred&&t.color==="gray","bg-gray-200/80":!t.blurred&&t.color==="gray"}]),style:e.normalizeStyle({zIndex:t.zIndex})},[e.renderSlot(n.$slots,"default")],6))}}),_={class:"grow overflow-hidden text-ellipsis"},ee=e.defineComponent({__name:"Title",props:{title:{},subTitle:{},variant:{default:"default"},suffix:{},size:{default:"md"},avatar:{type:Boolean,default:!1},uppercase:{type:Boolean,default:!0},resourceId:{}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex text-left",{"gap-4":["md","lg"].includes(t.size),"gap-3":t.size==="sm","gap-2":t.size==="xs"&&t.variant!=="transparent","gap-1":t.size==="xs"&&t.variant==="transparent"}])},[t.avatar&&t.title?(e.openBlock(),e.createBlock(e.unref(X._sfc_main),{key:0,initials:t.title.slice(0,1),"color-hash":t.title,size:["sm","xs"].includes(t.size)?"lg":"xl"},null,8,["initials","color-hash","size"])):e.createCommentVNode("",!0),e.createElementVNode("div",_,[t.title||n.$slots.default?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([{"text-3xl":t.size==="lg","text-2xl":t.size==="md","text-base":t.size==="sm","text-xs text-subtle":t.size==="xs","text-default":t.size!=="xs",uppercase:t.size==="xs"&&t.uppercase,"font-general-sans":["md","lg"].includes(t.size)},"flex items-center font-semibold"])},[e.renderSlot(n.$slots,"prefix"),e.renderSlot(n.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),e.renderSlot(n.$slots,"suffix",{},()=>[e.createTextVNode(e.toDisplayString(t.suffix),1)])],2)):e.createCommentVNode("",!0),t.subTitle||n.$slots.subTitle&&!e.unref(C.isVnodeEmpty)(n.$slots.subTitle({}))?(e.openBlock(),e.createBlock(e.unref(q._sfc_main),{key:1,variant:"body-sm",color:"secondary","no-spacing":"",class:"mt-1"},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"subTitle",{},()=>[e.createTextVNode(e.toDisplayString(t.subTitle),1)])]),_:3})):e.createCommentVNode("",!0)])],2))}}),te=["aria-label","aria-labelledby","aria-busy"],le={key:0,role:"status",class:"absolute bottom-0 left-0 right-0 top-0 z-10 flex items-center justify-center bg-white/80"},oe={class:"sr-only"},ae={key:1,"data-testid":"modal-top-bar",class:"flex justify-end border-b border-gray-200 py-2 pr-2"},ne={"aria-hidden":"true",class:"sticky top-0 z-10 -mx-6 h-0"},se={"data-testid":"modal-body-content",class:"py-6"},re=["id"],ie={"aria-hidden":"true",class:"sticky bottom-0 z-10 -mx-6 h-0"},de={key:0},ce={key:3,"data-testid":"modal-footer",class:"border-t border-gray-200 px-6 py-3 [&_button]:w-full"},ue={class:"flex flex-col gap-2"},fe=e.defineComponent({__name:"Modal",props:{children:{default:()=>[]},size:{default:"2xl"},noCloseButton:{type:Boolean,default:!1},noClickAway:{type:Boolean,default:!1},noBackdropClose:{type:Boolean,default:!1},showModal:{type:Boolean,default:!1},blurred:{type:Boolean,default:!1},title:{},subTitle:{},confirmButtonText:{},cancelButtonText:{},overflowVisible:{type:Boolean},isLoading:{type:Boolean,default:!1},isEmbedded:{type:Boolean,default:!1},ariaLabel:{},ariaLabelledby:{}},emits:["confirm","close"],setup(t,{emit:n}){const o=t,i=n,s=e.useSlots(),{$t:r}=q.useIntl(),z=e.computed(()=>{var l,a;return!!((l=s.body)!=null&&l.call(s))&&!C.isVnodeEmpty((a=s.body)==null?void 0:a.call(s,{}))}),u=e.computed(()=>{var l,a;return!!o.title||!!((l=s.header)!=null&&l.call(s))&&!C.isVnodeEmpty((a=s.header)==null?void 0:a.call(s,{}))}),D=e.computed(()=>z.value||u.value),{getZIndex:A,getTopZIndex:Z,trackingClass:R,defaultZIndex:E}=Q(),m=e.ref(),c=e.ref(),f=e.ref(E),p=e.useId(),V=e.computed(()=>{if(o.ariaLabelledby)return o.ariaLabelledby;if(!o.ariaLabel&&!o.title&&u.value)return p}),F=e.computed(()=>{if(!V.value)return o.ariaLabel||o.title||void 0}),S=e.ref(!1),N=e.ref(!1),K=e.computed(()=>o.blurred||o.isEmbedded),O={xs:"max-w-xs",sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl","3xl":"max-w-3xl","4xl":"max-w-4xl","5xl":"max-w-5xl","6xl":"max-w-6xl","7xl":"max-w-7xl"},U=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])",'[contenteditable="true"]','[tabindex]:not([tabindex^="-"])'].join(","),y=e.ref(null),T=()=>c.value?Array.from(c.value.querySelectorAll(U)).filter(l=>!l.closest('[aria-hidden="true"]')):[],j=()=>{const l=c.value;if(!l)return;(l.querySelector("[autofocus]")??T()[0]??l).focus()},$=()=>o.showModal&&f.value>=Z(),b=()=>i("close"),H=()=>{o.noBackdropClose||b()},G=()=>{if(!m.value)return;const{scrollTop:l,scrollHeight:a,clientHeight:d}=m.value;S.value=l>0,N.value=l+d<a-1};M.onKeyStroke("Escape",()=>{o.noClickAway||!$()||b()}),M.onKeyStroke("Tab",l=>{const a=c.value;if(!a||!$())return;const d=T();if(!d.length){l.preventDefault(),a.focus();return}const v=d[0],h=d[d.length-1],g=document.activeElement;if(!a.contains(g)){l.preventDefault(),(l.shiftKey?h:v).focus();return}l.shiftKey&&g===v?(l.preventDefault(),h.focus()):!l.shiftKey&&g===h&&(l.preventDefault(),v.focus())});const x=l=>{const a=document.querySelector("body");a&&(a.style.overflowY=l)},I=async()=>{f.value=A(),x("hidden"),y.value=document.activeElement,await e.nextTick(),j()},P=()=>{var l;f.value=E,x("unset"),(l=y.value)==null||l.focus(),y.value=null};return e.watch(()=>o.showModal,l=>l?I():P()),e.onMounted(()=>{o.showModal&&I()}),e.onBeforeUnmount(()=>{x("unset")}),(l,a)=>(e.openBlock(),e.createBlock(e.unref(L._sfc_main),{to:"modal"},{default:e.withCtx(()=>[e.createVNode(e.Transition,{name:"modal",appear:""},{default:e.withCtx(()=>[t.showModal?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["h-modal z-60 fixed left-0 right-0 top-0 flex w-full items-center justify-center overflow-y-auto overflow-x-hidden md:inset-0 md:h-full",e.unref(R)]),style:e.normalizeStyle({zIndex:f.value})},[e.createVNode(e.unref(W),{"aria-hidden":"true",blurred:K.value,color:o.isEmbedded?"white":void 0,onMousedown:e.withModifiers(H,["self"])},null,8,["blurred","color"]),e.createElementVNode("div",{class:e.normalizeClass(["modal-panel relative h-full w-full p-4 md:h-auto",`${O[t.size]}`])},[e.createElementVNode("div",{ref_key:"dialogElementRef",ref:c,role:"dialog","aria-modal":"true",tabindex:"-1","aria-label":F.value,"aria-labelledby":V.value,"aria-busy":t.isLoading,class:"relative flex max-h-[min(95vh,920px)] flex-col rounded-xl bg-white shadow-lg focus:outline-none"},[t.isLoading?(e.openBlock(),e.createElementBlock("div",le,[e.createVNode(k._sfc_main$2,{size:"6","aria-hidden":"true"}),e.createElementVNode("span",oe,e.toDisplayString(e.unref(r)({defaultMessage:"Loading",id:"h+GlcT",description:"Modal loading state"})),1)])):e.createCommentVNode("",!0),t.noCloseButton?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ae,[e.createVNode(e.unref(Y._sfc_main$1),{icon:"close",size:"xs",intent:"secondary","data-testid":"close-button","aria-label":e.unref(r)({defaultMessage:"Close",id:"U+ONwt",description:"Modal close button"}),onClick:b},null,8,["aria-label"])])),D.value?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"contentElementRef",ref:m,class:e.normalizeClass(["overflow-auto px-6",{"overflow-visible":t.overflowVisible}]),onScroll:G},[e.createElementVNode("div",ne,[e.createElementVNode("div",{class:e.normalizeClass(["transition-duration-700 pointer-events-none h-6 w-full bg-gradient-to-b from-black/[.06] to-transparent transition-opacity",S.value?"opacity-100":"opacity-0"])},null,2)]),e.createElementVNode("div",se,[u.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(p)},[e.renderSlot(l.$slots,"header",{},()=>[t.title?(e.openBlock(),e.createBlock(ee,{key:0,title:t.title,"sub-title":t.subTitle,size:"md"},null,8,["title","sub-title"])):e.createCommentVNode("",!0)],!0)],8,re)):e.createCommentVNode("",!0),z.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass({"mt-4":u.value})},[e.renderSlot(l.$slots,"body",{},void 0,!0)],2)):e.createCommentVNode("",!0)]),e.createElementVNode("div",ie,[e.createElementVNode("div",{class:e.normalizeClass(["transition-duration-700 pointer-events-none h-6 w-full -translate-y-6 bg-gradient-to-t from-black/[.06] to-transparent transition-opacity",N.value?"opacity-100":"opacity-0"])},null,2)])],34)):e.createCommentVNode("",!0),e.createVNode(L.Fade,null,{default:e.withCtx(()=>[l.$slots.error?(e.openBlock(),e.createElementBlock("div",de,[e.renderSlot(l.$slots,"error",{},void 0,!0)])):e.createCommentVNode("",!0)]),_:3}),l.$slots.footer||t.confirmButtonText||t.cancelButtonText?(e.openBlock(),e.createElementBlock("div",ce,[e.renderSlot(l.$slots,"footer",{},()=>[e.createElementVNode("div",ue,[e.createVNode(e.unref(k._sfc_main),{size:"md",autofocus:"",loading:t.isLoading,onClick:a[0]||(a[0]=d=>l.$emit("confirm"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.confirmButtonText||e.unref(r)({defaultMessage:"Confirm",id:"N2IrpM",description:"Modal comfirm button"})),1)]),_:1},8,["loading"]),e.createVNode(e.unref(k._sfc_main),{size:"md",intent:"secondary",onClick:a[1]||(a[1]=d=>l.$emit("close"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.cancelButtonText||e.unref(r)({defaultMessage:"Cancel",id:"47FYwb",description:"Modal cancel button"})),1)]),_:1})])],!0)])):e.createCommentVNode("",!0)],8,te)],2)],6)):e.createCommentVNode("",!0)]),_:3})]),_:3}))}}),me=J._export_sfc(fe,[["__scopeId","data-v-f0b441a8"]]);exports.Modal=me;
|
|
1
|
+
const e=require("vue"),M=require("./index.es-BclokHQX.js"),L=require("./ContextMenu.vue.es-kzZ3JJHG.js"),k=require("./Button.vue.es-TCF-bvDF.js"),C=require("./slots.es-T9ZJRGtG.js"),X=require("./Avatar.vue.es-nr8srGuK.js"),q=require("./customElements-CSzbVZIH.js"),Y=require("./IconButton.vue.es-CB1lIPao.js"),J=require("./floating-ui.vue.es-Bly3DGWm.js"),w=60,B="z-index-tracker",Q=()=>({defaultZIndex:w,getZIndex:()=>{const o=document.querySelectorAll(`.${B}`);let i=w;return(o??[]).forEach(s=>{const r=window.getComputedStyle(s).getPropertyValue("z-index");r&&+r>=i&&(i=+r+1)}),i},getTopZIndex:()=>{const o=document.querySelectorAll(`.${B}`);let i=w;return(o??[]).forEach(s=>{const r=window.getComputedStyle(s).getPropertyValue("z-index");r&&+r>i&&(i=+r)}),i},trackingClass:B}),W=e.defineComponent({__name:"Backdrop",props:{blurred:{type:Boolean,default:!1},color:{default:"gray"},zIndex:{}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["fixed inset-0",{"bg-white/90 backdrop-blur":t.blurred&&t.color==="white","bg-white/80":!t.blurred&&t.color==="white","bg-gray-200/90 backdrop-blur":t.blurred&&t.color==="gray","bg-gray-200/80":!t.blurred&&t.color==="gray"}]),style:e.normalizeStyle({zIndex:t.zIndex})},[e.renderSlot(n.$slots,"default")],6))}}),_={class:"grow overflow-hidden text-ellipsis"},ee=e.defineComponent({__name:"Title",props:{title:{},subTitle:{},variant:{default:"default"},suffix:{},size:{default:"md"},avatar:{type:Boolean,default:!1},uppercase:{type:Boolean,default:!0},resourceId:{}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex text-left",{"gap-4":["md","lg"].includes(t.size),"gap-3":t.size==="sm","gap-2":t.size==="xs"&&t.variant!=="transparent","gap-1":t.size==="xs"&&t.variant==="transparent"}])},[t.avatar&&t.title?(e.openBlock(),e.createBlock(e.unref(X._sfc_main),{key:0,initials:t.title.slice(0,1),"color-hash":t.title,size:["sm","xs"].includes(t.size)?"lg":"xl"},null,8,["initials","color-hash","size"])):e.createCommentVNode("",!0),e.createElementVNode("div",_,[t.title||n.$slots.default?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([{"text-3xl":t.size==="lg","text-2xl":t.size==="md","text-base":t.size==="sm","text-xs text-subtle":t.size==="xs","text-default":t.size!=="xs",uppercase:t.size==="xs"&&t.uppercase,"font-general-sans":["md","lg"].includes(t.size)},"flex items-center font-semibold"])},[e.renderSlot(n.$slots,"prefix"),e.renderSlot(n.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),e.renderSlot(n.$slots,"suffix",{},()=>[e.createTextVNode(e.toDisplayString(t.suffix),1)])],2)):e.createCommentVNode("",!0),t.subTitle||n.$slots.subTitle&&!e.unref(C.isVnodeEmpty)(n.$slots.subTitle({}))?(e.openBlock(),e.createBlock(e.unref(q._sfc_main),{key:1,variant:"body-sm",color:"secondary","no-spacing":"",class:"mt-1"},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"subTitle",{},()=>[e.createTextVNode(e.toDisplayString(t.subTitle),1)])]),_:3})):e.createCommentVNode("",!0)])],2))}}),te=["aria-label","aria-labelledby","aria-busy"],le={key:0,role:"status",class:"absolute bottom-0 left-0 right-0 top-0 z-10 flex items-center justify-center bg-white/80"},oe={class:"sr-only"},ae={key:1,"data-testid":"modal-top-bar",class:"flex justify-end border-b border-gray-200 py-2 pr-2"},ne={"aria-hidden":"true",class:"sticky top-0 z-10 -mx-6 h-0"},se={"data-testid":"modal-body-content",class:"py-6"},re=["id"],ie={"aria-hidden":"true",class:"sticky bottom-0 z-10 -mx-6 h-0"},de={key:0},ce={key:3,"data-testid":"modal-footer",class:"border-t border-gray-200 px-6 py-3 [&_button]:w-full"},ue={class:"flex flex-col gap-2"},fe=e.defineComponent({__name:"Modal",props:{children:{default:()=>[]},size:{default:"2xl"},noCloseButton:{type:Boolean,default:!1},noClickAway:{type:Boolean,default:!1},noBackdropClose:{type:Boolean,default:!1},showModal:{type:Boolean,default:!1},blurred:{type:Boolean,default:!1},title:{},subTitle:{},confirmButtonText:{},cancelButtonText:{},overflowVisible:{type:Boolean},isLoading:{type:Boolean,default:!1},isEmbedded:{type:Boolean,default:!1},ariaLabel:{},ariaLabelledby:{}},emits:["confirm","close"],setup(t,{emit:n}){const o=t,i=n,s=e.useSlots(),{$t:r}=q.useIntl(),z=e.computed(()=>{var l,a;return!!((l=s.body)!=null&&l.call(s))&&!C.isVnodeEmpty((a=s.body)==null?void 0:a.call(s,{}))}),u=e.computed(()=>{var l,a;return!!o.title||!!((l=s.header)!=null&&l.call(s))&&!C.isVnodeEmpty((a=s.header)==null?void 0:a.call(s,{}))}),D=e.computed(()=>z.value||u.value),{getZIndex:A,getTopZIndex:Z,trackingClass:R,defaultZIndex:E}=Q(),m=e.ref(),c=e.ref(),f=e.ref(E),p=e.useId(),V=e.computed(()=>{if(o.ariaLabelledby)return o.ariaLabelledby;if(!o.ariaLabel&&!o.title&&u.value)return p}),F=e.computed(()=>{if(!V.value)return o.ariaLabel||o.title||void 0}),S=e.ref(!1),N=e.ref(!1),K=e.computed(()=>o.blurred||o.isEmbedded),O={xs:"max-w-xs",sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl","3xl":"max-w-3xl","4xl":"max-w-4xl","5xl":"max-w-5xl","6xl":"max-w-6xl","7xl":"max-w-7xl"},U=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])",'[contenteditable="true"]','[tabindex]:not([tabindex^="-"])'].join(","),y=e.ref(null),T=()=>c.value?Array.from(c.value.querySelectorAll(U)).filter(l=>!l.closest('[aria-hidden="true"]')):[],j=()=>{const l=c.value;if(!l)return;(l.querySelector("[autofocus]")??T()[0]??l).focus()},I=()=>o.showModal&&f.value>=Z(),b=()=>i("close"),H=()=>{o.noBackdropClose||b()},G=()=>{if(!m.value)return;const{scrollTop:l,scrollHeight:a,clientHeight:d}=m.value;S.value=l>0,N.value=l+d<a-1};M.onKeyStroke("Escape",()=>{o.noClickAway||!I()||b()}),M.onKeyStroke("Tab",l=>{const a=c.value;if(!a||!I())return;const d=T();if(!d.length){l.preventDefault(),a.focus();return}const v=d[0],h=d[d.length-1],g=document.activeElement;if(!a.contains(g)){l.preventDefault(),(l.shiftKey?h:v).focus();return}l.shiftKey&&g===v?(l.preventDefault(),h.focus()):!l.shiftKey&&g===h&&(l.preventDefault(),v.focus())});const x=l=>{const a=document.querySelector("body");a&&(a.style.overflowY=l)},$=async()=>{f.value=A(),x("hidden"),y.value=document.activeElement,await e.nextTick(),j()},P=()=>{var l;f.value=E,x("unset"),(l=y.value)==null||l.focus(),y.value=null};return e.watch(()=>o.showModal,l=>l?$():P()),e.onMounted(()=>{o.showModal&&$()}),e.onBeforeUnmount(()=>{x("unset")}),(l,a)=>(e.openBlock(),e.createBlock(e.unref(L._sfc_main),{to:"modal"},{default:e.withCtx(()=>[e.createVNode(e.Transition,{name:"modal",appear:""},{default:e.withCtx(()=>[t.showModal?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["h-modal z-60 fixed left-0 right-0 top-0 flex w-full items-center justify-center overflow-y-auto overflow-x-hidden md:inset-0 md:h-full",e.unref(R)]),style:e.normalizeStyle({zIndex:f.value})},[e.createVNode(e.unref(W),{"aria-hidden":"true",blurred:K.value,color:o.isEmbedded?"white":void 0,onMousedown:e.withModifiers(H,["self"])},null,8,["blurred","color"]),e.createElementVNode("div",{class:e.normalizeClass(["modal-panel relative h-full w-full p-4 md:h-auto",`${O[t.size]}`])},[e.createElementVNode("div",{ref_key:"dialogElementRef",ref:c,role:"dialog","aria-modal":"true",tabindex:"-1","aria-label":F.value,"aria-labelledby":V.value,"aria-busy":t.isLoading,class:"relative flex max-h-[min(95vh,920px)] flex-col rounded-xl bg-white shadow-lg focus:outline-none"},[t.isLoading?(e.openBlock(),e.createElementBlock("div",le,[e.createVNode(k._sfc_main$2,{size:"6","aria-hidden":"true"}),e.createElementVNode("span",oe,e.toDisplayString(e.unref(r)({defaultMessage:"Loading",id:"h+GlcT",description:"Modal loading state"})),1)])):e.createCommentVNode("",!0),t.noCloseButton?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ae,[e.createVNode(e.unref(Y._sfc_main),{icon:"close",size:"xs",intent:"secondary","data-testid":"close-button","aria-label":e.unref(r)({defaultMessage:"Close",id:"U+ONwt",description:"Modal close button"}),onClick:b},null,8,["aria-label"])])),D.value?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"contentElementRef",ref:m,class:e.normalizeClass(["overflow-auto px-6",{"overflow-visible":t.overflowVisible}]),onScroll:G},[e.createElementVNode("div",ne,[e.createElementVNode("div",{class:e.normalizeClass(["transition-duration-700 pointer-events-none h-6 w-full bg-gradient-to-b from-black/[.06] to-transparent transition-opacity",S.value?"opacity-100":"opacity-0"])},null,2)]),e.createElementVNode("div",se,[u.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(p)},[e.renderSlot(l.$slots,"header",{},()=>[t.title?(e.openBlock(),e.createBlock(ee,{key:0,title:t.title,"sub-title":t.subTitle,size:"md"},null,8,["title","sub-title"])):e.createCommentVNode("",!0)],!0)],8,re)):e.createCommentVNode("",!0),z.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass({"mt-4":u.value})},[e.renderSlot(l.$slots,"body",{},void 0,!0)],2)):e.createCommentVNode("",!0)]),e.createElementVNode("div",ie,[e.createElementVNode("div",{class:e.normalizeClass(["transition-duration-700 pointer-events-none h-6 w-full -translate-y-6 bg-gradient-to-t from-black/[.06] to-transparent transition-opacity",N.value?"opacity-100":"opacity-0"])},null,2)])],34)):e.createCommentVNode("",!0),e.createVNode(L.Fade,null,{default:e.withCtx(()=>[l.$slots.error?(e.openBlock(),e.createElementBlock("div",de,[e.renderSlot(l.$slots,"error",{},void 0,!0)])):e.createCommentVNode("",!0)]),_:3}),l.$slots.footer||t.confirmButtonText||t.cancelButtonText?(e.openBlock(),e.createElementBlock("div",ce,[e.renderSlot(l.$slots,"footer",{},()=>[e.createElementVNode("div",ue,[e.createVNode(e.unref(k._sfc_main),{size:"md",autofocus:"",loading:t.isLoading,onClick:a[0]||(a[0]=d=>l.$emit("confirm"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.confirmButtonText||e.unref(r)({defaultMessage:"Confirm",id:"N2IrpM",description:"Modal comfirm button"})),1)]),_:1},8,["loading"]),e.createVNode(e.unref(k._sfc_main),{size:"md",intent:"secondary",onClick:a[1]||(a[1]=d=>l.$emit("close"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.cancelButtonText||e.unref(r)({defaultMessage:"Cancel",id:"47FYwb",description:"Modal cancel button"})),1)]),_:1})])],!0)])):e.createCommentVNode("",!0)],8,te)],2)],6)):e.createCommentVNode("",!0)]),_:3})]),_:3}))}}),me=J._export_sfc(fe,[["__scopeId","data-v-f0b441a8"]]);exports.Modal=me;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent as V, openBlock as a, createElementBlock as u, normalizeStyle as X, normalizeClass as m, renderSlot as b, createBlock as T, unref as s, createCommentVNode as r, createElementVNode as c, createTextVNode as k, toDisplayString as w, withCtx as g, useSlots as ie, computed as v, ref as h, useId as de, watch as re, onMounted as ue, onBeforeUnmount as ce, createVNode as x, Transition as fe, withModifiers as me, nextTick as be } from "vue";
|
|
2
2
|
import { o as G } from "./index.es-CXkP_k3u.mjs";
|
|
3
|
-
import { _ as ye, F as xe } from "./ContextMenu.vue.es-
|
|
4
|
-
import { b as ve, _ as P } from "./Button.vue.es-
|
|
3
|
+
import { _ as ye, F as xe } from "./ContextMenu.vue.es-tAuFp-6i.mjs";
|
|
4
|
+
import { b as ve, _ as P } from "./Button.vue.es-PbJFK8z7.mjs";
|
|
5
5
|
import { i as N } from "./slots.es-BA4MyEAa.mjs";
|
|
6
|
-
import { _ as he } from "./Avatar.vue.es-
|
|
7
|
-
import { _ as ge, u as we } from "./customElements-
|
|
8
|
-
import {
|
|
6
|
+
import { _ as he } from "./Avatar.vue.es-DzjFvLuK.mjs";
|
|
7
|
+
import { _ as ge, u as we } from "./customElements-DT1YyL4O.mjs";
|
|
8
|
+
import { _ as ze } from "./IconButton.vue.es-DGflbWFk.mjs";
|
|
9
9
|
import { _ as ke } from "./floating-ui.vue.es-CYt0fSY7.mjs";
|
|
10
10
|
const A = 60, Z = "z-index-tracker", Be = () => ({
|
|
11
11
|
defaultZIndex: A,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),f=require("./formatting.es-C72Nsrmh.js"),l=require("./Button.vue.es-TCF-bvDF.js"),n=require("./customElements-CSzbVZIH.js"),u=require("./PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-D34fD3Io.js"),_=require("./IconButton.vue.es-CB1lIPao.js"),h=()=>{const t=e.ref(null);return[async r=>{if(!(navigator!=null&&navigator.clipboard))return!1;try{return await navigator.clipboard.writeText(r),t.value=r,!0}catch{return t.value=null,!1}},t.value]},y=e.defineComponent({__name:"PaymentCompletedCard",props:{amount:{type:Object},variant:{type:String},redirecting:{type:Boolean}},setup(t){const a=t,{$t:r}=n.useIntl(),o=e.computed(()=>a.variant==="AUTHORIZE"?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(i,s)=>(e.openBlock(),e.createBlock(u._sfc_main,{status:"success",title:o.value},{default:e.withCtx(()=>[t.amount?(e.openBlock(),e.createBlock(e.unref(n._sfc_main),{key:0,variant:"body-sm",class:"mt-1"},{default:e.withCtx(()=>[e.createVNode(e.unref(l._sfc_main$1),{icon:"check"}),e.createTextVNode(e.toDisplayString(e.unref(f.formatAmount)(t.amount)),1)]),_:1})):e.createCommentVNode("",!0),t.redirecting?(e.openBlock(),e.createBlock(e.unref(n._sfc_main),{key:1,variant:"body-xs",color:"subtle"},{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})):e.createCommentVNode("",!0)]),_:1},8,["title"]))}});function g(t){return{UNKNOWN_ERROR:{title:t({defaultMessage:"Something went wrong",description:"Title of the error card shown when a payment failed for no known reason",id:"payments.error_card.unknown_error.title"}),message:t({defaultMessage:"An unknown error has occurred",description:"Message of the error card shown when a payment failed for no known reason",id:"payments.error_card.unknown_error.message"}),isReloadButtonVisible:!0},AUTHORIZATION_FAILED:{title:t({defaultMessage:"Payment failed",description:"Title of the error card shown when a payment was not authorized",id:"payments.error_card.authorization_failed.title"}),message:t({defaultMessage:"The payment could not be completed. Try again, or use a different payment method.",description:"Message of the error card shown when a payment was not authorized",id:"payments.error_card.authorization_failed.message"}),isReloadButtonVisible:!0},PAYMENT_DETAILS_CALL_FAILED:{title:t({defaultMessage:"Payment could not be confirmed",description:"Title of the error card shown when the payment details could not be retrieved",id:"payments.error_card.payment_details_call_failed.title"}),message:t({defaultMessage:"There was a problem confirming your payment.",description:"Message of the error card shown when the payment details could not be retrieved",id:"payments.error_card.payment_details_call_failed.message"}),isReloadButtonVisible:!0},PAYMENT_METHOD_STORAGE_FAILED:{title:t({defaultMessage:"Payment method could not be saved",description:"Title of the error card shown when storing a payment method failed",id:"payments.error_card.payment_method_storage_failed.title"}),message:t({defaultMessage:"Something went wrong while saving your payment method.",description:"Message of the error card shown when storing a payment method failed",id:"payments.error_card.payment_method_storage_failed.message"}),isReloadButtonVisible:!0},REDIRECT_RESULT_PAYMENT_ACCEPTOR_MISSING:{title:t({defaultMessage:"Payment could not be completed",description:"Title of the error card shown when a redirect returned without a payment acceptor",id:"payments.error_card.redirect_result_payment_acceptor_missing.title"}),message:t({defaultMessage:"Your payment could not be matched to this order.",description:"Message of the error card shown when a redirect returned without a payment acceptor",id:"payments.error_card.redirect_result_payment_acceptor_missing.message"})},TOKENIZE_FAILED:{title:t({defaultMessage:"Payment method could not be saved",description:"Title of the error card shown when tokenization failed",id:"payments.error_card.tokenize_failed.title"}),message:t({defaultMessage:"Your payment method could not be saved. Try again, or use a different one.",description:"Message of the error card shown when tokenization failed",id:"payments.error_card.tokenize_failed.message"}),isReloadButtonVisible:!0},PAYMENT_INTEGRATION_INITIALIZATION_FAILED:{title:t({defaultMessage:"Payment methods could not be loaded",description:"Title of the error card shown when the payment form failed to load",id:"payments.error_card.payment_integration_initialization_failed.title"}),message:t({defaultMessage:"The payment form could not be loaded.",description:"Message of the error card shown when the payment form failed to load",id:"payments.error_card.payment_integration_initialization_failed.message"}),isReloadButtonVisible:!0},RESOURCE_REVOKED:{title:t({defaultMessage:"This page is no longer available",description:"Title of the error card shown when the portal resource was revoked",id:"payments.error_card.resource_revoked.title"}),message:t({defaultMessage:"The link you followed has expired or was withdrawn.",description:"Message of the error card shown when the portal resource was revoked",id:"payments.error_card.resource_revoked.message"}),isReloadButtonVisible:!0}}}const w=2e3;function b({resetAfterMs:t=w}={}){const[a]=h(),r=e.ref(!1);let o;const i=async s=>{const d=await a(s);return r.value=d,d&&(clearTimeout(o),o=setTimeout(()=>{r.value=!1},t)),d};return e.onBeforeUnmount(()=>clearTimeout(o)),{copy:i,hasCopied:r}}const T={class:"flex flex-col items-center gap-6"},v={key:1,class:"flex flex-col items-center gap-1"},C={class:"flex items-center gap-1"},M=e.defineComponent({__name:"PaymentErrorCard",props:{error:{type:Object}},setup(t){const a=t,{$t:r}=n.useIntl(),{copy:o,hasCopied:i}=b(),s=e.computed(()=>g(r)[a.error.code]),d=()=>{window.location.reload()},c=e.computed(()=>r({defaultMessage:"Copy reference",description:"Label of the button that copies the payment error reference",id:"payments.error_card.reference.copy.label"})),m=e.computed(()=>r({defaultMessage:"Copied",description:"Confirmation shown after copying the payment error reference",id:"payments.error_card.reference.copied.label"})),p=()=>{a.error.reference&&o(a.error.reference)};return(k,E)=>(e.openBlock(),e.createBlock(u._sfc_main,{status:"error",title:s.value.title},{default:e.withCtx(()=>[e.createElementVNode("div",T,[e.createVNode(e.unref(n._sfc_main),{variant:"body-xs",color:"subtle",class:"mt-3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.message),1)]),_:1}),s.value.isReloadButtonVisible?(e.openBlock(),e.createBlock(e.unref(l._sfc_main),{key:0,type:"button",intent:"secondary",onClick:d},{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),t.error.reference?(e.openBlock(),e.createElementBlock("div",v,[e.createVNode(e.unref(n._sfc_main),{variant:"body-xs",color:"subtle"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Share this reference with support if the problem continues",description:"Explains what the reference below a failed payment is for",id:"payments.error_card.reference.description"})),1)]),_:1}),e.createElementVNode("div",C,[e.createVNode(e.unref(n._sfc_main),{variant:"body-xs",tag:"span",class:"select-all font-mono","data-testid":"payment-error-reference"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.error.reference),1)]),_:1}),e.createVNode(e.unref(_._sfc_main),{type:"button",intent:"subtle",size:"sm",icon:e.unref(i)?"check":"content_copy","aria-label":c.value,tooltip:e.unref(i)?m.value:c.value,onClick:p},null,8,["icon","aria-label","tooltip"])])])):e.createCommentVNode("",!0)])]),_:1},8,["title"]))}});exports._sfc_main=y;exports._sfc_main$1=M;
|