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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. package/README.md +41 -0
  2. package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-B70SyWOB.mjs → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DW10rozs.mjs} +6 -6
  3. package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-jXClPW91.js → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-jWthTJk-.js} +1 -1
  4. package/dist/{Avatar.vue.es-2E3laNRb.mjs → Avatar.vue.es-DzjFvLuK.mjs} +1 -1
  5. package/dist/{Avatar.vue.es-DdJreyr_.js → Avatar.vue.es-nr8srGuK.js} +1 -1
  6. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-D5EoBLhj.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-BptcwJMr.mjs} +4 -4
  7. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-ConpyC8n.js → BillingInformation.vue_vue_type_script_setup_true_lang-C1prOJay.js} +1 -1
  8. package/dist/{Button.vue.es-BJEy-e9C.mjs → Button.vue.es-PbJFK8z7.mjs} +1 -1
  9. package/dist/{Button.vue.es-CJNxYacb.js → Button.vue.es-TCF-bvDF.js} +1 -1
  10. package/dist/Checkout.entry.ce-D8O4qJ24.js +2 -0
  11. package/dist/Checkout.entry.ce-DHFx5Vnb.mjs +3900 -0
  12. package/dist/{Chip.vue.es-DLQ4QEPo.js → Chip.vue.es-CAoisngJ.js} +1 -1
  13. package/dist/{Chip.vue.es-DGbc4L_D.mjs → Chip.vue.es-DpcOM3Ai.mjs} +2 -2
  14. package/dist/ContentWithAsideLayout-BCM8tmZN.mjs +38 -0
  15. package/dist/ContentWithAsideLayout-RSdKXqAf.js +1 -0
  16. package/dist/{ContextMenu.vue.es-Bd2kmeVq.js → ContextMenu.vue.es-kzZ3JJHG.js} +1 -1
  17. package/dist/{ContextMenu.vue.es-DL1M7pcr.mjs → ContextMenu.vue.es-tAuFp-6i.mjs} +4 -4
  18. package/dist/{CustomerBillingInformation.vue.es-CE94ASC3.mjs → CustomerBillingInformation.vue.es-BQSl9q6W.mjs} +2 -2
  19. package/dist/{CustomerBillingInformation.vue.es-hiFzB43w.js → CustomerBillingInformation.vue.es-Nac6HgLo.js} +1 -1
  20. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BE21tqgW.js → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BOLf-U0A.js} +1 -1
  21. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Bhih7rPR.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-R47ln7Wb.mjs} +5 -5
  22. package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-C5zc9n64.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-CaNXS48v.mjs} +14 -14
  23. package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-D018AmFA.js → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-D_jcV7VG.js} +1 -1
  24. package/dist/{DividerText.vue.es-CFZUQ62L.mjs → DividerText.vue.es-CSE7a-T0.mjs} +1 -1
  25. package/dist/{DividerText.vue.es-CvCgHHXN.js → DividerText.vue.es-LJ2kZakb.js} +1 -1
  26. package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-YcaBJDzx.mjs → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-DeotDsFP.mjs} +4 -4
  27. package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-jTJGN4jb.js → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-GNPyrcAQ.js} +1 -1
  28. package/dist/{ErrorNotification.vue.es-DI2B7WiR.js → ErrorNotification.vue.es-BF6swP7o.js} +1 -1
  29. package/dist/{ErrorNotification.vue.es-B3mvv79S.mjs → ErrorNotification.vue.es-CVUuIt8Z.mjs} +1 -1
  30. package/dist/{IconButton.vue.es-Dp8h4YOx.js → IconButton.vue.es-CB1lIPao.js} +1 -1
  31. package/dist/{IconButton.vue.es-GLcGhoHC.mjs → IconButton.vue.es-DGflbWFk.mjs} +2 -2
  32. package/dist/{IconTitle.vue.es-CzuPQtOX.mjs → IconTitle.vue.es-BsdjyGlQ.mjs} +3 -3
  33. package/dist/{IconTitle.vue.es-DN9r6nfK.js → IconTitle.vue.es-CMO8EyQl.js} +1 -1
  34. package/dist/{Input.vue.es-5Cq8a7oH.mjs → Input.vue.es-BFbiFXsU.mjs} +2 -2
  35. package/dist/{Input.vue.es-DM81HeVv.js → Input.vue.es-CREdT4nB.js} +1 -1
  36. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-w8w52LcV.js → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BZ4D_-7E.js} +1 -1
  37. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-D75LSIL8.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Btv0rRk4.mjs} +2 -2
  38. package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-dRLsZPNh.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-CrZq0d1M.mjs} +2 -2
  39. package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-DB5h39LA.js → InvoiceEntryView.vue_vue_type_script_setup_true_lang-j-cNIRD_.js} +1 -1
  40. package/dist/{InvoiceSummary.vue.es-Qy99kLZs.js → InvoiceSummary.vue.es-BOnvORpf.js} +1 -1
  41. package/dist/{InvoiceSummary.vue.es-DbtqsTuP.mjs → InvoiceSummary.vue.es-JtOIQ6SJ.mjs} +7 -7
  42. package/dist/{Modal.vue.es-DgLl6XBV.js → Modal.vue.es-BbdtdxsO.js} +1 -1
  43. package/dist/{Modal.vue.es-Z2DWAN2u.mjs → Modal.vue.es-jT61xK_A.mjs} +5 -5
  44. package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-DBm51C7c.js → PaymentErrorCard.vue_vue_type_script_setup_true_lang-BBoZVnsK.js} +1 -1
  45. package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-DYuFPIqs.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-Dan29qmH.mjs} +4 -4
  46. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-CcdhYTB1.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-BJZHkTqA.mjs} +3 -3
  47. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-BNZ9-GW1.js → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-D34fD3Io.js} +1 -1
  48. package/dist/{PaymentHistoryBlock-DS1j-8m-.js → PaymentHistoryBlock-Dw2wOiAI.js} +1 -1
  49. package/dist/{PaymentHistoryBlock-CjP_514k.mjs → PaymentHistoryBlock-quvnCSFV.mjs} +1 -1
  50. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-Dr2jtJhK.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-5ckQd9eQ.mjs} +4 -4
  51. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CSTfMB8U.js → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-C0XIdBbx.js} +1 -1
  52. package/dist/{PaymentIntegrationForm-CpOZUf-W.mjs → PaymentIntegrationForm-CQjUZi22.mjs} +1 -1
  53. package/dist/{PaymentIntegrationForm-80b19Lkq.js → PaymentIntegrationForm-D1oJREmH.js} +1 -1
  54. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-De7h9-fH.js +1 -0
  55. package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BgztoQH5.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DnBLj1wZ.mjs} +43 -40
  56. package/dist/PaymentIntegrationFormAdyen-BQXXwpUK.js +98 -0
  57. package/dist/{PaymentIntegrationFormAdyen-BQcgDcik.mjs → PaymentIntegrationFormAdyen-CyZk9ofV.mjs} +307 -207
  58. package/dist/{PaymentIntegrationFormStripe-CMwLqOe6.js → PaymentIntegrationFormStripe-Bs4F7oK_.js} +2 -2
  59. package/dist/{PaymentIntegrationFormStripe-Dx1H3fZ2.mjs → PaymentIntegrationFormStripe-D-GaLHwc.mjs} +22 -21
  60. package/dist/{PaymentMethod.vue.es-EhRCfeax.mjs → PaymentMethod.vue.es-C0j580g7.mjs} +3 -3
  61. package/dist/{PaymentMethod.vue.es-pLCCzVxN.js → PaymentMethod.vue.es-CXV_ThBY.js} +1 -1
  62. package/dist/{PaymentMethodForm-D3OY8zK5.mjs → PaymentMethodForm-Bf2Ps6eV.mjs} +1 -1
  63. package/dist/{PaymentMethodForm-Bw2e1tXo.js → PaymentMethodForm-CDV5LR8i.js} +1 -1
  64. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-vGprVPpn.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-BqPu7CYA.mjs} +6 -6
  65. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-DHXw6qD0.js → PaymentMethodForm.vue_vue_type_script_setup_true_lang-BwsRDlQJ.js} +1 -1
  66. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-D7b0HhDc.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-9MUPbgWM.mjs} +6 -6
  67. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-CdT1YyeU.js → PaymentMethodsList.vue_vue_type_script_setup_true_lang-BIX0k7-q.js} +1 -1
  68. package/dist/{PlanCustomizationEditor-RC8kj2rC.js → PlanCustomizationEditor-0kEXoOcM.js} +1 -1
  69. package/dist/{PlanCustomizationEditor-BQqkgmzL.mjs → PlanCustomizationEditor-Dv69xPbX.mjs} +9 -9
  70. package/dist/{PricingGroupRangeInput.vue.es-ClkE98ML.js → PricingGroupRangeInput.vue.es-BchXhunH.js} +1 -1
  71. package/dist/{PricingGroupRangeInput.vue.es-DNsiUZyT.mjs → PricingGroupRangeInput.vue.es-CP7-dmxS.mjs} +4 -4
  72. package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-CURXAgMT.mjs → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DmVJ2JQE.mjs} +5 -5
  73. package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-BJfQLRcS.js → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-YsI__d0V.js} +1 -1
  74. package/dist/{RadioGroupExtended.vue.es-Dk9xdj76.js → RadioGroupExtended.vue.es-Cf5R1P9a.js} +1 -1
  75. package/dist/{RadioGroupExtended.vue.es-vUqn2ZUP.mjs → RadioGroupExtended.vue.es-_QMReyZ8.mjs} +2 -2
  76. package/dist/{Section.vue.es-Cybk1Nb8.js → Section.vue.es-CBZx5x53.js} +1 -1
  77. package/dist/{Section.vue.es-C2_topx4.mjs → Section.vue.es-KRsHeFoT.mjs} +1 -1
  78. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-C9q_qwjt.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BVELHoUj.mjs} +6 -6
  79. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DIgVzXLg.js → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-UdGQMJGY.js} +1 -1
  80. package/dist/{SubscriptionSchedules-CNTg_oRy.js → SubscriptionSchedules-1ikoGncQ.js} +1 -1
  81. package/dist/{SubscriptionSchedules-BlCU_xc5.mjs → SubscriptionSchedules-B6b6xf-E.mjs} +1 -1
  82. package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-6LbR_Vni.js → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-Cd56tuZb.js} +1 -1
  83. package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-Cf3Dy8Yn.mjs → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-Dv2bP9vv.mjs} +11 -11
  84. package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-BijBAdqp.js → SubscriptionSummary.vue_vue_type_script_setup_true_lang-DZKl0Zxp.js} +1 -1
  85. package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-CjzjchsS.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-DvYZvTV9.mjs} +2 -2
  86. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-Dz4s3CH_.js → SubscriptionsList.vue_vue_type_script_setup_true_lang-DTjZcOhj.js} +1 -1
  87. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-CxdrAanb.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-DmeIKMYI.mjs} +6 -6
  88. package/dist/{TooltipParagraph.vue.es-OX6bAWP9.js → TooltipParagraph.vue.es-7IQdU3Tf.js} +1 -1
  89. package/dist/{TooltipParagraph.vue.es-Fu9Od3Vr.mjs → TooltipParagraph.vue.es-nGFfHF1A.mjs} +1 -1
  90. package/dist/{TrialChip.vue.es-CbjdkR4i.js → TrialChip.vue.es-DhC5Bpmy.js} +1 -1
  91. package/dist/{TrialChip.vue.es-c7tZOIW3.mjs → TrialChip.vue.es-eKgO6an3.mjs} +2 -2
  92. package/dist/{cn.es-C8Ogac5T.mjs → cn.es-BD7Afj5Q.mjs} +2 -2
  93. package/dist/{cn.es-lC4_Xd0R.js → cn.es-BLE3T5Rx.js} +1 -1
  94. package/dist/components/BillingInformation/BillingInformation.cjs +1 -1
  95. package/dist/components/BillingInformation/BillingInformation.mjs +4 -4
  96. package/dist/components/BillingInformationForm/BillingInformationForm.cjs +1 -1
  97. package/dist/components/BillingInformationForm/BillingInformationForm.mjs +6 -6
  98. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs +1 -1
  99. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +4 -4
  100. package/dist/components/Invoice/Invoice.cjs +1 -1
  101. package/dist/components/Invoice/Invoice.mjs +9 -9
  102. package/dist/components/InvoiceDetails/InvoiceDetails.cjs +1 -1
  103. package/dist/components/InvoiceDetails/InvoiceDetails.mjs +3 -3
  104. package/dist/components/InvoiceHeader/InvoiceHeader.cjs +1 -1
  105. package/dist/components/InvoiceHeader/InvoiceHeader.mjs +2 -2
  106. package/dist/components/InvoicesList/InvoicesList.cjs +1 -1
  107. package/dist/components/InvoicesList/InvoicesList.mjs +3 -3
  108. package/dist/components/PaymentHistory/PaymentHistory.cjs +1 -1
  109. package/dist/components/PaymentHistory/PaymentHistory.mjs +3 -3
  110. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs +1 -1
  111. package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +5 -5
  112. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs +1 -1
  113. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +4 -4
  114. package/dist/components/SubscriptionsList/SubscriptionsList.cjs +1 -1
  115. package/dist/components/SubscriptionsList/SubscriptionsList.mjs +5 -5
  116. package/dist/components/WalletBalances/WalletBalances.cjs +1 -1
  117. package/dist/components/WalletBalances/WalletBalances.mjs +3 -3
  118. package/dist/{customElements-BYIdPSzQ.js → customElements-CSzbVZIH.js} +14 -14
  119. package/dist/{customElements-Df6dGrN-.mjs → customElements-DT1YyL4O.mjs} +637 -601
  120. package/dist/{customer-DoLHZuMG.js → customer-CJonIvSm.js} +1 -1
  121. package/dist/{customer-DmsKYpVi.mjs → customer-Cq4fF__H.mjs} +1 -1
  122. package/dist/{de-DE-Bgm9bnmp.mjs → de-DE-CyvjSD9b.mjs} +7 -2
  123. package/dist/{de-DE-CAL9Mji2.js → de-DE-DXsDvO5y.js} +1 -1
  124. package/dist/{en-US-_xe5H4TQ.js → en-US-DHdI11k9.js} +1 -1
  125. package/dist/{en-US-E86eRIxh.mjs → en-US-xQrWj8qI.mjs} +5 -0
  126. package/dist/index.cjs +1 -1
  127. package/dist/index.mjs +1 -1
  128. package/dist/{invoices-CrO6p4Ms.mjs → invoices-CVZOfEOY.mjs} +1 -1
  129. package/dist/{invoices-mw87cNTS.js → invoices-EamWI_jz.js} +1 -1
  130. package/dist/{it-IT-co1BfV5s.mjs → it-IT-C09oObBM.mjs} +5 -0
  131. package/dist/{it-IT-QFQ1Ajbb.js → it-IT-CcRIzP1A.js} +1 -1
  132. package/dist/{nl-NL-CJXJC1bx.js → nl-NL-5PrgQl8q.js} +1 -1
  133. package/dist/{nl-NL-Drv2E66B.mjs → nl-NL-BhNND_yi.mjs} +5 -0
  134. package/dist/{paymentMethods-CQdhZwq4.js → paymentMethods-Bwym8l9a.js} +1 -1
  135. package/dist/{paymentMethods-BNQbW_f1.mjs → paymentMethods-By1SebnO.mjs} +1 -1
  136. package/dist/{payments-VS_N2xpJ.mjs → payments-BYZLQTJ-.mjs} +1 -1
  137. package/dist/{payments-KTjVHqOa.js → payments-Dnjg9Se4.js} +1 -1
  138. package/dist/screens/Checkout/Checkout.cjs +1 -1
  139. package/dist/screens/Checkout/Checkout.mjs +2 -2
  140. package/dist/screens/CustomerOverview/CustomerOverview.cjs +1 -1
  141. package/dist/screens/CustomerOverview/CustomerOverview.mjs +11 -11
  142. package/dist/screens/PayInvoice/PayInvoice.cjs +1 -1
  143. package/dist/screens/PayInvoice/PayInvoice.mjs +131 -127
  144. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs +1 -1
  145. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +10 -10
  146. package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs +1 -1
  147. package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +19 -19
  148. package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs +1 -1
  149. package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +19 -19
  150. package/dist/{subscriptions-Dugd-oZ1.js → subscriptions-BKER9RUc.js} +1 -1
  151. package/dist/{subscriptions-U4xg2CO1.mjs → subscriptions-Gj3KgCZz.mjs} +1 -1
  152. package/dist/types/components/payments/PaymentIntegrationForm/PaymentIntegrationForm.types.d.ts +8 -0
  153. package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +4 -2
  154. package/dist/types/services/portals.types.d.ts +2 -0
  155. package/dist/types/services/requests.types.d.ts +2 -0
  156. package/dist/{url-DwiuKYpu.mjs → url-TNRgVI8A.mjs} +3 -2
  157. package/dist/url-vloPOiXd.js +1 -0
  158. package/dist/{useActionDispatchProvider-CTyDGRX8.js → useActionDispatchProvider-DDHrhy3i.js} +1 -1
  159. package/dist/{useActionDispatchProvider-DyQbRCxR.mjs → useActionDispatchProvider-MjTckd4f.mjs} +1 -1
  160. package/dist/{useCustomer-BXI5Vmit.js → useCustomer-BW0DBEJh.js} +1 -1
  161. package/dist/{useCustomer-dcmU1539.mjs → useCustomer-CxnF7r8Z.mjs} +1 -1
  162. package/dist/{useCustomerFormLabels-Ct6vD_b8.js → useCustomerFormLabels-C773h3J0.js} +1 -1
  163. package/dist/{useCustomerFormLabels-BC1WfqWo.mjs → useCustomerFormLabels-zPc8QrwJ.mjs} +5 -5
  164. package/dist/{useExperimentalFeature-9-p9_nP6.js → useExperimentalFeature-9teNYGuP.js} +1 -1
  165. package/dist/{useExperimentalFeature-4Y-ppDr7.mjs → useExperimentalFeature-NsSDg-e3.mjs} +1 -1
  166. package/dist/{useInvoiceData-CGvtl7Ai.js → useInvoiceData-DvV2AsgC.js} +1 -1
  167. package/dist/{useInvoiceData-B2Z9aD2w.mjs → useInvoiceData-GQwk6fl4.mjs} +2 -2
  168. package/dist/{useInvoicesList-DJPznhig.mjs → useInvoicesList-CGmFSQSg.mjs} +7 -7
  169. package/dist/{useInvoicesList-Ba0GO8p-.js → useInvoicesList-Xnth6s6U.js} +1 -1
  170. package/dist/{useLoadInitialData-CWyI3_RR.mjs → useLoadInitialData-BvvaWeAe.mjs} +1 -1
  171. package/dist/{useLoadInitialData-BO9ZsSsF.js → useLoadInitialData-Cjkc70u-.js} +1 -1
  172. package/dist/{usePaymentMethodAvailability-DqIvkjLF.mjs → usePaymentMethodAvailability-BWaaj3N3.mjs} +4 -4
  173. package/dist/{usePaymentMethodAvailability-bkmDrPXY.js → usePaymentMethodAvailability-DKyscbom.js} +1 -1
  174. package/dist/{usePaymentMethodOptions-BPBVGNDg.js → usePaymentMethodOptions-DuXKS36F.js} +1 -1
  175. package/dist/{usePaymentMethodOptions-MSEp39xQ.mjs → usePaymentMethodOptions-l-wVAmIW.mjs} +1 -1
  176. package/dist/{usePaymentMethods-BAOtOJZD.js → usePaymentMethods-BDFVB-kK.js} +1 -1
  177. package/dist/{usePaymentMethods-U7gnZ0F5.mjs → usePaymentMethods-DvQVnsSV.mjs} +1 -1
  178. package/dist/{usePayments-G-HpKpK8.js → usePayments-CIJocDhR.js} +1 -1
  179. package/dist/{usePayments-Dq2V6bTV.mjs → usePayments-D_dyuf6S.mjs} +6 -6
  180. package/dist/{usePortal-BplmMkBG.js → usePortal-BU4ibdWq.js} +1 -1
  181. package/dist/{usePortal-CMHV-ShD.mjs → usePortal-Br5lYuPT.mjs} +1 -1
  182. package/dist/{useSubscription-V53WsZwQ.mjs → useSubscription-CqRae2I9.mjs} +1 -1
  183. package/dist/{useSubscription-CvB8ROBt.js → useSubscription-DRBUt9H5.js} +1 -1
  184. package/dist/{useTimePeriod.es-D31Zl1MJ.mjs → useTimePeriod.es-BxIGnCAP.mjs} +1 -1
  185. package/dist/{useTimePeriod.es-CtCTu9cz.js → useTimePeriod.es-DDos3-EH.js} +1 -1
  186. package/package.json +1 -1
  187. package/dist/Checkout.entry.ce-BfLlnQyb.js +0 -1
  188. package/dist/Checkout.entry.ce-CQkrWscC.mjs +0 -3769
  189. package/dist/ContentWithAsideLayout-Bnbsq8_5.mjs +0 -32
  190. package/dist/ContentWithAsideLayout-C6yMIVJF.js +0 -1
  191. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DKXhthkA.js +0 -1
  192. package/dist/PaymentIntegrationFormAdyen-DElXsJ96.js +0 -98
  193. package/dist/url-BNKStNY9.js +0 -1
@@ -1 +1 @@
1
- const e=require("vue"),d=require("./cn.es-lC4_Xd0R.js"),M=require("./FormMessage.vue.es-dqATjC2N.js"),g=require("./useService-H7BjLg8P.js"),w=require("./customElements-BYIdPSzQ.js"),T={xs:"h-[22px]",sm:"h-7",md:"h-10",lg:"h-12",xl:"h-16"};function R({size:l,disabled:s,labelScreenReaderOnly:u,hasError:f,ring:i,hasShadow:v,hasFocusStyles:m,type:p,prefixHasBorder:a,wrapperClass:y,inputClass:b,prefixClass:h,suffixClass:C,isMultiline:k}){const n=e.computed(()=>(s==null?void 0:s.value)??!1),c=e.computed(()=>(p==null?void 0:p.value)==="checkbox"),x=e.computed(()=>(m==null?void 0:m.value)!==!1),t=e.computed(()=>((f==null?void 0:f.value)??!1)&&!n.value),o=e.computed(()=>l.value==="xs"||l.value==="sm"),r=e.computed(()=>({"block text-sm font-medium text-default":!0,"sr-only":u==null?void 0:u.value})),B=e.computed(()=>({"rounded border border-gray-300 overflow-hidden":!0,"cursor-not-allowed bg-gray-50 border-transparent":n.value,"bg-white":!n.value,"focus-within:border-primary-500 focus-within:outline-1 focus-within:outline focus-within:outline-primary-500":x.value,"focus-within:ring-primary-500":i==null?void 0:i.value,"shadow-sm focus-within:shadow-sm":v==null?void 0:v.value,"border-red-500 focus-within:border-red-500 focus-within:outline-red-500 focus-within:ring-red-500":t.value})),$=e.computed(()=>({"text-default placeholder:text-placeholder disabled:text-disabled disabled:placeholder:text-disabled block w-full border-0 focus:border-transparent focus:outline-0 focus:ring-0 bg-transparent":!0,"text-xs":o.value,"text-sm":!o.value,"p-2":c.value,"px-1":!c.value&&l.value==="xs","px-2":!c.value&&l.value==="sm","px-4":!c.value&&!o.value,[T[l.value]]:!c.value&&!(k!=null&&k.value),"cursor-default":n.value})),S=e.computed(()=>({"z-10 flex shrink-0 items-center":!0,"px-3":a==null?void 0:a.value,"pl-3":!(a!=null&&a.value),"border-r":a==null?void 0:a.value,"border-none":!(a!=null&&a.value),"border-red-500":(a==null?void 0:a.value)&&t.value,"border-gray-300":(a==null?void 0:a.value)&&!t.value})),V=e.computed(()=>({"align-end z-10 flex shrink-0 items-center gap-2 border-l px-2":!0,"border-red-500":t.value,"border-gray-300":!t.value,"px-1":o.value,"px-2":l.value==="md","px-3":l.value==="lg"})),E=e.computed(()=>d.cn(B.value,y==null?void 0:y.value)),q=e.computed(()=>d.cn($.value,b==null?void 0:b.value)),N=e.computed(()=>d.cn(S.value,h==null?void 0:h.value)),I=e.computed(()=>d.cn(V.value,C==null?void 0:C.value));return{wrapperClasses:E,inputClasses:q,prefixClasses:N,suffixClasses:I,labelClasses:r}}const z=["data-testid"],D={class:"relative"},F={class:"relative grow"},P=["id","disabled","type","value","name","form","placeholder","autocomplete"],U=["id","value","disabled","type","name","form","placeholder","autocomplete"],W={key:1,class:"mt-2 text-sm text-secondary"},K=e.defineComponent({__name:"Input",props:e.mergeModels({label:{default:""},labelScreenReaderOnly:{type:Boolean},disabled:{type:Boolean,default:!1},type:{default:"text"},asTextType:{type:Boolean,default:!1},size:{default:"md"},prefixClass:{},suffixClass:{},wrapperClass:{default:""},inputClass:{},rootClass:{default:""},required:{type:Boolean,default:!1},id:{},checked:{type:Boolean},value:{},hasShadow:{type:Boolean,default:!1},hasFocusStyles:{type:Boolean,default:!0},form:{},ring:{type:Boolean,default:!0},error:{},invalid:{type:Boolean},name:{},prefixHasBorder:{type:Boolean,default:!0},placeholder:{},autocomplete:{}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["blur"],["update:modelValue"]),setup(l){const s=l,u=e.useModel(l,"modelValue"),f=s.type==="number"&&s.asTextType,i=s.name??d.uniqueId("name"),v=t=>{f&&(u.value=t.target.value)},m=s.id??d.uniqueId(`${i}-`),p=t=>{s.type==="number"&&t.target.blur()},a=e.computed(()=>!g.isEmpty(s.error)||!!s.invalid),{wrapperClasses:y,inputClasses:b,labelClasses:h,prefixClasses:C,suffixClasses:k}=R({...e.toRefs(s),hasError:a}),n=e.ref(),c=t=>{var o;const r=t.target;r!=null&&r.closest("button, a, input, select, textarea")||(o=n.value)==null||o.focus()},x=e.computed(()=>s.size==="xs"?"body-xs":"body-sm");return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(l.rootClass),"data-testid":e.unref(d.getRootTestId)(e.unref(i))},[l.label?(e.openBlock(),e.createBlock(d._sfc_main,{key:0,class:e.normalizeClass(e.unref(h)),for:e.unref(m),required:l.required},e.createSlots({suffix:e.withCtx(()=>[e.unref(g.isEmpty)(l.error)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(M._sfc_main,{key:0,message:l.error},null,8,["message"])),e.renderSlot(t.$slots,"label-suffix")]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.label)+" ",1)]),_:2},[t.$slots.tooltip?{name:"tooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip")]),key:"0"}:void 0]),1032,["class","for","required"])):e.createCommentVNode("",!0),e.createElementVNode("div",D,[e.createElementVNode("div",{class:e.normalizeClass(["flex",e.unref(y)])},[t.$slots.prefix?(e.openBlock(),e.createBlock(w._sfc_main,{key:0,tag:"div",variant:x.value,class:e.normalizeClass(e.unref(C))},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"prefix")]),_:3},8,["variant","class"])):e.createCommentVNode("",!0),e.createElementVNode("div",F,[e.unref(f)?(e.openBlock(),e.createElementBlock("input",e.mergeProps({key:0},t.$attrs,{id:e.unref(m),ref_key:"inputElRef",ref:n,disabled:l.disabled,type:l.type,class:e.unref(b),value:u.value,name:e.unref(i),form:l.form,placeholder:l.placeholder,autocomplete:l.autocomplete??"off",onKeyup:v,onChange:v,onBlur:o[0]||(o[0]=r=>t.$emit("blur")),onWheel:p}),null,16,P)):e.withDirectives((e.openBlock(),e.createElementBlock("input",e.mergeProps({key:1},t.$attrs,{id:e.unref(m),ref_key:"inputElRef",ref:n,"onUpdate:modelValue":o[1]||(o[1]=r=>u.value=r),value:l.type==="checkbox"?l.value:u.value,disabled:l.disabled,type:l.type,name:e.unref(i),form:l.form,class:e.unref(b),placeholder:l.placeholder,autocomplete:l.autocomplete??"off",onBlur:o[2]||(o[2]=r=>t.$emit("blur")),onWheel:p}),null,16,U)),[[e.vModelDynamic,u.value]]),e.renderSlot(t.$slots,"input")]),t.$slots.suffix?(e.openBlock(),e.createBlock(w._sfc_main,{key:1,tag:"div",variant:x.value,class:e.normalizeClass(e.unref(k)),onClick:c},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"suffix")]),_:3},8,["variant","class"])):e.createCommentVNode("",!0)],2),e.renderSlot(t.$slots,"adornment-end")]),t.$slots.helper?(e.openBlock(),e.createElementBlock("div",W,[e.renderSlot(t.$slots,"helper")])):e.createCommentVNode("",!0)],10,z))}});exports._sfc_main=K;
1
+ const e=require("vue"),d=require("./cn.es-BLE3T5Rx.js"),M=require("./FormMessage.vue.es-dqATjC2N.js"),g=require("./useService-H7BjLg8P.js"),w=require("./customElements-CSzbVZIH.js"),T={xs:"h-[22px]",sm:"h-7",md:"h-10",lg:"h-12",xl:"h-16"};function R({size:l,disabled:s,labelScreenReaderOnly:u,hasError:f,ring:i,hasShadow:v,hasFocusStyles:m,type:p,prefixHasBorder:a,wrapperClass:y,inputClass:b,prefixClass:h,suffixClass:C,isMultiline:k}){const n=e.computed(()=>(s==null?void 0:s.value)??!1),c=e.computed(()=>(p==null?void 0:p.value)==="checkbox"),x=e.computed(()=>(m==null?void 0:m.value)!==!1),t=e.computed(()=>((f==null?void 0:f.value)??!1)&&!n.value),o=e.computed(()=>l.value==="xs"||l.value==="sm"),r=e.computed(()=>({"block text-sm font-medium text-default":!0,"sr-only":u==null?void 0:u.value})),B=e.computed(()=>({"rounded border border-gray-300 overflow-hidden":!0,"cursor-not-allowed bg-gray-50 border-transparent":n.value,"bg-white":!n.value,"focus-within:border-primary-500 focus-within:outline-1 focus-within:outline focus-within:outline-primary-500":x.value,"focus-within:ring-primary-500":i==null?void 0:i.value,"shadow-sm focus-within:shadow-sm":v==null?void 0:v.value,"border-red-500 focus-within:border-red-500 focus-within:outline-red-500 focus-within:ring-red-500":t.value})),$=e.computed(()=>({"text-default placeholder:text-placeholder disabled:text-disabled disabled:placeholder:text-disabled block w-full border-0 focus:border-transparent focus:outline-0 focus:ring-0 bg-transparent":!0,"text-xs":o.value,"text-sm":!o.value,"p-2":c.value,"px-1":!c.value&&l.value==="xs","px-2":!c.value&&l.value==="sm","px-4":!c.value&&!o.value,[T[l.value]]:!c.value&&!(k!=null&&k.value),"cursor-default":n.value})),S=e.computed(()=>({"z-10 flex shrink-0 items-center":!0,"px-3":a==null?void 0:a.value,"pl-3":!(a!=null&&a.value),"border-r":a==null?void 0:a.value,"border-none":!(a!=null&&a.value),"border-red-500":(a==null?void 0:a.value)&&t.value,"border-gray-300":(a==null?void 0:a.value)&&!t.value})),V=e.computed(()=>({"align-end z-10 flex shrink-0 items-center gap-2 border-l px-2":!0,"border-red-500":t.value,"border-gray-300":!t.value,"px-1":o.value,"px-2":l.value==="md","px-3":l.value==="lg"})),E=e.computed(()=>d.cn(B.value,y==null?void 0:y.value)),q=e.computed(()=>d.cn($.value,b==null?void 0:b.value)),N=e.computed(()=>d.cn(S.value,h==null?void 0:h.value)),I=e.computed(()=>d.cn(V.value,C==null?void 0:C.value));return{wrapperClasses:E,inputClasses:q,prefixClasses:N,suffixClasses:I,labelClasses:r}}const z=["data-testid"],D={class:"relative"},F={class:"relative grow"},P=["id","disabled","type","value","name","form","placeholder","autocomplete"],U=["id","value","disabled","type","name","form","placeholder","autocomplete"],W={key:1,class:"mt-2 text-sm text-secondary"},K=e.defineComponent({__name:"Input",props:e.mergeModels({label:{default:""},labelScreenReaderOnly:{type:Boolean},disabled:{type:Boolean,default:!1},type:{default:"text"},asTextType:{type:Boolean,default:!1},size:{default:"md"},prefixClass:{},suffixClass:{},wrapperClass:{default:""},inputClass:{},rootClass:{default:""},required:{type:Boolean,default:!1},id:{},checked:{type:Boolean},value:{},hasShadow:{type:Boolean,default:!1},hasFocusStyles:{type:Boolean,default:!0},form:{},ring:{type:Boolean,default:!0},error:{},invalid:{type:Boolean},name:{},prefixHasBorder:{type:Boolean,default:!0},placeholder:{},autocomplete:{}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["blur"],["update:modelValue"]),setup(l){const s=l,u=e.useModel(l,"modelValue"),f=s.type==="number"&&s.asTextType,i=s.name??d.uniqueId("name"),v=t=>{f&&(u.value=t.target.value)},m=s.id??d.uniqueId(`${i}-`),p=t=>{s.type==="number"&&t.target.blur()},a=e.computed(()=>!g.isEmpty(s.error)||!!s.invalid),{wrapperClasses:y,inputClasses:b,labelClasses:h,prefixClasses:C,suffixClasses:k}=R({...e.toRefs(s),hasError:a}),n=e.ref(),c=t=>{var o;const r=t.target;r!=null&&r.closest("button, a, input, select, textarea")||(o=n.value)==null||o.focus()},x=e.computed(()=>s.size==="xs"?"body-xs":"body-sm");return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(l.rootClass),"data-testid":e.unref(d.getRootTestId)(e.unref(i))},[l.label?(e.openBlock(),e.createBlock(d._sfc_main,{key:0,class:e.normalizeClass(e.unref(h)),for:e.unref(m),required:l.required},e.createSlots({suffix:e.withCtx(()=>[e.unref(g.isEmpty)(l.error)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(M._sfc_main,{key:0,message:l.error},null,8,["message"])),e.renderSlot(t.$slots,"label-suffix")]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.label)+" ",1)]),_:2},[t.$slots.tooltip?{name:"tooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip")]),key:"0"}:void 0]),1032,["class","for","required"])):e.createCommentVNode("",!0),e.createElementVNode("div",D,[e.createElementVNode("div",{class:e.normalizeClass(["flex",e.unref(y)])},[t.$slots.prefix?(e.openBlock(),e.createBlock(w._sfc_main,{key:0,tag:"div",variant:x.value,class:e.normalizeClass(e.unref(C))},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"prefix")]),_:3},8,["variant","class"])):e.createCommentVNode("",!0),e.createElementVNode("div",F,[e.unref(f)?(e.openBlock(),e.createElementBlock("input",e.mergeProps({key:0},t.$attrs,{id:e.unref(m),ref_key:"inputElRef",ref:n,disabled:l.disabled,type:l.type,class:e.unref(b),value:u.value,name:e.unref(i),form:l.form,placeholder:l.placeholder,autocomplete:l.autocomplete??"off",onKeyup:v,onChange:v,onBlur:o[0]||(o[0]=r=>t.$emit("blur")),onWheel:p}),null,16,P)):e.withDirectives((e.openBlock(),e.createElementBlock("input",e.mergeProps({key:1},t.$attrs,{id:e.unref(m),ref_key:"inputElRef",ref:n,"onUpdate:modelValue":o[1]||(o[1]=r=>u.value=r),value:l.type==="checkbox"?l.value:u.value,disabled:l.disabled,type:l.type,name:e.unref(i),form:l.form,class:e.unref(b),placeholder:l.placeholder,autocomplete:l.autocomplete??"off",onBlur:o[2]||(o[2]=r=>t.$emit("blur")),onWheel:p}),null,16,U)),[[e.vModelDynamic,u.value]]),e.renderSlot(t.$slots,"input")]),t.$slots.suffix?(e.openBlock(),e.createBlock(w._sfc_main,{key:1,tag:"div",variant:x.value,class:e.normalizeClass(e.unref(k)),onClick:c},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"suffix")]),_:3},8,["variant","class"])):e.createCommentVNode("",!0)],2),e.renderSlot(t.$slots,"adornment-end")]),t.$slots.helper?(e.openBlock(),e.createElementBlock("div",W,[e.renderSlot(t.$slots,"helper")])):e.createCommentVNode("",!0)],10,z))}});exports._sfc_main=K;
@@ -1 +1 @@
1
- const e=require("vue"),c=require("./Section.vue.es-Cybk1Nb8.js"),i=require("./customElements-BYIdPSzQ.js"),n={key:0,class:"sv-invoice-details__body flex flex-col gap-2"},s={class:"sv-invoice-details__row"},d={class:"sv-invoice-details__row"},l=e.defineComponent({__name:"InvoiceDetailsBlock",props:{invoice:{type:Object}},setup(t){const{$t:o,formatDate:a}=i.useIntl();return(v,r)=>(e.openBlock(),e.createBlock(e.unref(c._sfc_main),{class:"sv-invoice-details",title:e.unref(o)({defaultMessage:"Invoice details",description:"Title for the invoice details block on the invoice overview page",id:"sdk.invoice_details.invoice_details_block.title"})},{default:e.withCtx(()=>[t.invoice?(e.openBlock(),e.createElementBlock("div",n,[e.createElementVNode("div",s,[e.createVNode(e.unref(i._sfc_main),{variant:"caps-heading",class:"sv-invoice-details__label"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Invoice date",description:"Title for the invoice date in invoice details block on the invoice overview page",id:"sdk.invoice_details.invoice_details_block.invoice_date"})),1)]),_:1}),t.invoice.invoice_date?(e.openBlock(),e.createBlock(e.unref(i._sfc_main),{key:0,variant:"body-xs",class:"sv-invoice-details__value"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({date:t.invoice.invoice_date,format:"date",timezone:t.invoice.customer.timezone,offsetType:"offsetted"})),1)]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",d,[e.createVNode(e.unref(i._sfc_main),{variant:"caps-heading",class:"sv-invoice-details__label"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Due date",description:"Title for the due date in invoice details block on the invoice overview page",id:"sdk.invoice_details.invoice_details_block.due_date"})),1)]),_:1}),t.invoice.due_date?(e.openBlock(),e.createBlock(e.unref(i._sfc_main),{key:0,variant:"body-xs",class:"sv-invoice-details__value"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({date:t.invoice.due_date,format:"date",timezone:t.invoice.customer.timezone,offsetType:"offsetted"})),1)]),_:1})):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]),_:1},8,["title"]))}});exports._sfc_main=l;
1
+ const e=require("vue"),c=require("./Section.vue.es-CBZx5x53.js"),i=require("./customElements-CSzbVZIH.js"),n={key:0,class:"sv-invoice-details__body flex flex-col gap-2"},s={class:"sv-invoice-details__row"},d={class:"sv-invoice-details__row"},l=e.defineComponent({__name:"InvoiceDetailsBlock",props:{invoice:{type:Object}},setup(t){const{$t:o,formatDate:a}=i.useIntl();return(v,r)=>(e.openBlock(),e.createBlock(e.unref(c._sfc_main),{class:"sv-invoice-details",title:e.unref(o)({defaultMessage:"Invoice details",description:"Title for the invoice details block on the invoice overview page",id:"sdk.invoice_details.invoice_details_block.title"})},{default:e.withCtx(()=>[t.invoice?(e.openBlock(),e.createElementBlock("div",n,[e.createElementVNode("div",s,[e.createVNode(e.unref(i._sfc_main),{variant:"caps-heading",class:"sv-invoice-details__label"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Invoice date",description:"Title for the invoice date in invoice details block on the invoice overview page",id:"sdk.invoice_details.invoice_details_block.invoice_date"})),1)]),_:1}),t.invoice.invoice_date?(e.openBlock(),e.createBlock(e.unref(i._sfc_main),{key:0,variant:"body-xs",class:"sv-invoice-details__value"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({date:t.invoice.invoice_date,format:"date",timezone:t.invoice.customer.timezone,offsetType:"offsetted"})),1)]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",d,[e.createVNode(e.unref(i._sfc_main),{variant:"caps-heading",class:"sv-invoice-details__label"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Due date",description:"Title for the due date in invoice details block on the invoice overview page",id:"sdk.invoice_details.invoice_details_block.due_date"})),1)]),_:1}),t.invoice.due_date?(e.openBlock(),e.createBlock(e.unref(i._sfc_main),{key:0,variant:"body-xs",class:"sv-invoice-details__value"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({date:t.invoice.due_date,format:"date",timezone:t.invoice.customer.timezone,offsetType:"offsetted"})),1)]),_:1})):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]),_:1},8,["title"]))}});exports._sfc_main=l;
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as f, openBlock as o, createBlock as d, unref as e, withCtx as t, createElementBlock as u, createElementVNode as _, createVNode as r, createTextVNode as a, toDisplayString as c, createCommentVNode as l } from "vue";
2
- import { _ as m } from "./Section.vue.es-C2_topx4.mjs";
3
- import { u as k, _ as s } from "./customElements-Df6dGrN-.mjs";
2
+ import { _ as m } from "./Section.vue.es-KRsHeFoT.mjs";
3
+ import { u as k, _ as s } from "./customElements-DT1YyL4O.mjs";
4
4
  const h = {
5
5
  key: 0,
6
6
  class: "sv-invoice-details__body flex flex-col gap-2"
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as a, openBlock as r, createBlock as v, unref as n, renderSlot as d } from "vue";
2
- import { _ as l, u as m, a as p } from "./usePayments-Dq2V6bTV.mjs";
3
- import { u } from "./useLoadInitialData-CWyI3_RR.mjs";
2
+ import { _ as l, u as m, a as p } from "./usePayments-D_dyuf6S.mjs";
3
+ import { u } from "./useLoadInitialData-BvvaWeAe.mjs";
4
4
  const g = /* @__PURE__ */ a({
5
5
  __name: "InvoiceHeader",
6
6
  props: {
@@ -1 +1 @@
1
- const e=require("vue"),t=require("./usePayments-G-HpKpK8.js"),r=require("./useLoadInitialData-BO9ZsSsF.js"),v=e.defineComponent({__name:"InvoiceHeader",props:{isLoading:{type:Boolean},invoice:{type:Object},payments:{type:Array},invoiceDownloadService:{type:Function},configuration:{type:Object}},setup(n){return(i,o)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{class:"sv-invoice-header sv-root sv-component","payment-attempts":n.payments??[],invoice:n.invoice,"download-service":()=>n.invoiceDownloadService(n.invoice),"show-download-button":n.configuration.enableDownloadButton,variant:"external"},null,8,["payment-attempts","invoice","download-service","show-download-button"]))}}),d=e.defineComponent({__name:"InvoiceEntryView",props:{invoiceId:{type:String}},setup(n){const i=n,o=t.useInvoice({invoiceId:i.invoiceId}),c=t.usePayments(),{isLoading:a}=r.useLoadInitialData(o.get(),c.get(i.invoiceId));return(s,u)=>e.renderSlot(s.$slots,"default",{invoice:e.unref(o).invoice.value,invoiceDownloadService:e.unref(o).downloadInvoicePdf,payments:e.unref(c),isLoading:e.unref(a)})}});exports._sfc_main=d;exports._sfc_main$1=v;
1
+ const e=require("vue"),t=require("./usePayments-CIJocDhR.js"),r=require("./useLoadInitialData-Cjkc70u-.js"),v=e.defineComponent({__name:"InvoiceHeader",props:{isLoading:{type:Boolean},invoice:{type:Object},payments:{type:Array},invoiceDownloadService:{type:Function},configuration:{type:Object}},setup(n){return(i,o)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{class:"sv-invoice-header sv-root sv-component","payment-attempts":n.payments??[],invoice:n.invoice,"download-service":()=>n.invoiceDownloadService(n.invoice),"show-download-button":n.configuration.enableDownloadButton,variant:"external"},null,8,["payment-attempts","invoice","download-service","show-download-button"]))}}),d=e.defineComponent({__name:"InvoiceEntryView",props:{invoiceId:{type:String}},setup(n){const i=n,o=t.useInvoice({invoiceId:i.invoiceId}),c=t.usePayments(),{isLoading:a}=r.useLoadInitialData(o.get(),c.get(i.invoiceId));return(s,u)=>e.renderSlot(s.$slots,"default",{invoice:e.unref(o).invoice.value,invoiceDownloadService:e.unref(o).downloadInvoicePdf,payments:e.unref(c),isLoading:e.unref(a)})}});exports._sfc_main=d;exports._sfc_main$1=v;
@@ -1 +1 @@
1
- const e=require("vue"),C=require("./customElements-BYIdPSzQ.js"),v=require("./Amount.vue.es-DExaYBqm.js"),ce=require("./useService-H7BjLg8P.js"),O=require("./Button.vue.es-CJNxYacb.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-DLQ4QEPo.js"),Y=require("./getComposedString.es-haS4bAj7.js"),P=require("./TooltipParagraph.vue.es-OX6bAWP9.js"),ue=require("./index.es-BclokHQX.js"),K=require("./wallets.es-CNIMW5ay.js"),me=require("./DividerText.vue.es-CvCgHHXN.js"),fe=require("./IconTitle.vue.es-DN9r6nfK.js"),ge=require("./ContextMenu.vue.es-Bd2kmeVq.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-Df6dGrN-.mjs";
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-BJEy-e9C.mjs";
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-DGbc4L_D.mjs";
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-Fu9Od3Vr.mjs";
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-CFZUQ62L.mjs";
16
- import { _ as Ge } from "./IconTitle.vue.es-CzuPQtOX.mjs";
17
- import { a as Xe } from "./ContextMenu.vue.es-DL1M7pcr.mjs";
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) => {