@solvimon/solvimon-web 0.1.0-alpha.27 → 0.1.0-alpha.29

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 (500) hide show
  1. package/README.md +151 -17
  2. package/dist/{Alert.vue.es-lIiAWf2S.mjs → Alert.vue.es-CNrEaLvh.mjs} +58 -46
  3. package/dist/ApiStatus-CSFKl_ra.mjs +9 -0
  4. package/dist/AuthProvider.handle-DKfNs8rr.mjs +50 -0
  5. package/dist/{Avatar.vue.es-sfMZiX7A.mjs → Avatar.vue.es-r0NbcIib.mjs} +1 -1
  6. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-DmY3a-Wi.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-Cp4yGqaw.mjs} +18 -19
  7. package/dist/{Button.vue.es-Cmjfm4jw.mjs → Button.vue.es-Zw--kuaU.mjs} +4 -4
  8. package/dist/{ChargeOnDemandModal-CB4mrvkU.mjs → ChargeOnDemandModal-B8FDkS9U.mjs} +240 -251
  9. package/dist/Checkout.entry.ce-DsGl-5aR.mjs +4202 -0
  10. package/dist/CheckoutAddressFields.vue_vue_type_script_setup_true_lang-2D8VM_7W.mjs +828 -0
  11. package/dist/{Chip.vue.es-DksjbJO8.mjs → Chip.vue.es-D3UDSyXC.mjs} +35 -21
  12. package/dist/Comparators.vue.es-DQBI3f7m.mjs +103 -0
  13. package/dist/ContentWithAsideLayout-Bnbsq8_5.mjs +32 -0
  14. package/dist/{ContextMenu.vue.es-zRvoEJlV.mjs → ContextMenu.vue.es-B9mFpUQK.mjs} +87 -88
  15. package/dist/{CustomerBillingInformation.vue.es-DhFbpZPK.mjs → CustomerBillingInformation.vue.es-B8NiQaJs.mjs} +3 -3
  16. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-B41la-T7.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DBivC5Eb.mjs} +27 -30
  17. package/dist/CustomerShippingAddresses-Bj8Y17O8.mjs +397 -0
  18. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-BmPKfIjT.mjs +2927 -0
  19. package/dist/{DividerText.vue.es-nAo1eRMV.mjs → DividerText.vue.es-CNbgif-3.mjs} +1 -1
  20. package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CVP-7ne3.mjs +55 -0
  21. package/dist/{ErrorNotification.vue.es-h-D37rfG.mjs → ErrorNotification.vue.es-DNd65mQq.mjs} +2 -2
  22. package/dist/FormMessage.vue.es-Cjv358Ab.mjs +39 -0
  23. package/dist/{IconButton.vue.es-DvfErUOq.mjs → IconButton.vue.es-C8lYFx5_.mjs} +2 -2
  24. package/dist/{IconTitle.vue.es-B_8bS0tn.mjs → IconTitle.vue.es-O2kcqgKm.mjs} +3 -3
  25. package/dist/Input.vue.es-D8Oj8MWv.mjs +250 -0
  26. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-gpMtYNzn.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-rhqYVdfV.mjs} +14 -13
  27. package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-06R-M8Q3.mjs +56 -0
  28. package/dist/InvoicePreview.vue.es-4Q2hzaFS.mjs +286 -0
  29. package/dist/InvoicePricingClauseChip.vue.es-DKU0xu0t.mjs +124 -0
  30. package/dist/Label.vue.es-DtpLM1KH.mjs +113 -0
  31. package/dist/{Modal.vue.es-BeI5C9-9.mjs → Modal.vue.es-C8ZcO117.mjs} +109 -103
  32. package/dist/OrderSummaryInvoice.vue_vue_type_script_setup_true_lang-3DQLCR3U.mjs +441 -0
  33. package/dist/PaymentCompletedCard.vue_vue_type_script_setup_true_lang-DfTb9psX.mjs +48 -0
  34. package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-DqHcOnZp.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-BoGTtg5G.mjs} +70 -113
  35. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DlqoWKQq.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-BIAm22Kq.mjs} +3 -3
  36. package/dist/{PaymentHistoryBlock-mCqdFjnL.mjs → PaymentHistoryBlock-BvY2nXGV.mjs} +1 -1
  37. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DxaY3eFN.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-bQKhUonq.mjs} +24 -24
  38. package/dist/{PaymentIntegrationForm-DVx4DEtD.mjs → PaymentIntegrationForm-CcfQSzKM.mjs} +1 -1
  39. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CvzcLJVq.mjs +181 -0
  40. package/dist/{PaymentIntegrationFormAdyen-Yr8p5Fly.mjs → PaymentIntegrationFormAdyen-DqgDfO6K.mjs} +422 -311
  41. package/dist/PaymentIntegrationFormStripe-BYdAkvLt.mjs +757 -0
  42. package/dist/{PaymentMethod.vue.es-4YRmQZHX.mjs → PaymentMethod.vue.es-b0p3a0L-.mjs} +7 -7
  43. package/dist/{PaymentMethodForm-Dnj_7mJU.mjs → PaymentMethodForm-BsTrTwCg.mjs} +1 -1
  44. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-DsD3UjkC.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-sUOmLORl.mjs} +57 -65
  45. package/dist/PaymentMethodSelector.vue_vue_type_script_setup_true_lang-DsnAhR79.mjs +169 -0
  46. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-CjECKNi_.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-CSW4LfmH.mjs} +13 -8
  47. package/dist/PlanCustomizationEditor-D29N4HUM.mjs +711 -0
  48. package/dist/PortalLinkUnverified-B_EE2wTJ.mjs +52 -0
  49. package/dist/PortalNotAvailable-DPE9y37H.mjs +25 -0
  50. package/dist/{PricingGroupRangeInput.vue.es-BhNcjD7z.mjs → PricingGroupRangeInput.vue.es-tIMXIhpZ.mjs} +14 -13
  51. package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-CmJITenR.mjs → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DqxWxSQe.mjs} +48 -48
  52. package/dist/RadioGroupExtended.vue.es-3nDXqIGi.mjs +176 -0
  53. package/dist/{Section.vue.es-DVEpre9O.mjs → Section.vue.es-CvX9tg2f.mjs} +1 -1
  54. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Cl7I1Apo.mjs +60 -0
  55. package/dist/ShippingAddressesModal-C4p1IXXk.mjs +418 -0
  56. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-D7MFjvrP.mjs +32 -0
  57. package/dist/{StepInput.vue.es-o-3Lg4Ai.mjs → StepInput.vue.es-DweyzpkL.mjs} +5 -4
  58. package/dist/{SubscriptionDetails.entry.ce-CGl6Z5ql.mjs → SubscriptionDetails.entry.ce-D5SwM0YS.mjs} +448 -460
  59. package/dist/{SubscriptionSchedules-DuWZmnD2.mjs → SubscriptionSchedules-BZqlpAtk.mjs} +1 -1
  60. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-BH7DdOWK.mjs +5185 -0
  61. package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-DoJxiqVB.mjs +203 -0
  62. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-BsdevoeT.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BbjdBHSQ.mjs} +126 -90
  63. package/dist/TooltipParagraph.vue.es-Dw0ndjle.mjs +132 -0
  64. package/dist/TranslationOverride.vue_vue_type_script_setup_true_lang-BhjZVMSx.mjs +31 -0
  65. package/dist/{TrialChip.vue.es-Dmv3lPiQ.mjs → TrialChip.vue.es-DOopmaXA.mjs} +2 -2
  66. package/dist/addressFormats.data-dzBx49dw.mjs +278 -0
  67. package/dist/amount-CondixVt.mjs +36 -0
  68. package/dist/{api.es-QaC926Xu.mjs → api.es-qgvzNMU-.mjs} +2 -2
  69. package/dist/{cn.es-Cvt6TIwv.mjs → cn.es-B8acFrov.mjs} +385 -477
  70. package/dist/{comparators.es-D8WGL-c4.mjs → comparators.es-C8rHpb70.mjs} +17 -13
  71. package/dist/components/BillingInformation/BillingInformation.mjs +11 -10
  72. package/dist/components/BillingInformationForm/BillingInformationForm.mjs +397 -350
  73. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +20 -19
  74. package/dist/components/Invoice/Invoice.mjs +2691 -227
  75. package/dist/components/InvoiceDetails/InvoiceDetails.mjs +66 -62
  76. package/dist/components/InvoiceHeader/InvoiceHeader.mjs +40 -40
  77. package/dist/components/InvoicesList/InvoicesList.mjs +20 -18
  78. package/dist/components/PaymentHistory/PaymentHistory.mjs +72 -64
  79. package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +33 -31
  80. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +49 -45
  81. package/dist/components/SubscriptionsList/SubscriptionsList.mjs +47 -31
  82. package/dist/components/WalletBalances/WalletBalances.mjs +22 -21
  83. package/dist/core/index.mjs +61 -95
  84. package/dist/customElements-BTj4ii4f.mjs +5072 -0
  85. package/dist/customer-BIjC0CWJ.mjs +31 -0
  86. package/dist/customer.es-DQKl6wFt.mjs +24 -0
  87. package/dist/{de-DE-DKp5LCu0.mjs → de-DE-DBbERiFr.mjs} +110 -18
  88. package/dist/{de-DE-jkW2dJrX.mjs → de-DE-UJ6X6jXu.mjs} +16 -10
  89. package/dist/floating-ui.vue.es-BvAf8-si.mjs +1003 -0
  90. package/dist/formControl-BZQLHnOO.mjs +749 -0
  91. package/dist/fr-FR-Cvvbkwlj.mjs +307 -0
  92. package/dist/fr-FR-IWJE-urI.mjs +431 -0
  93. package/dist/icon-sprite.svg.es-BWBB8SGw.mjs +4 -0
  94. package/dist/{index.es-CXkP_k3u.mjs → index.es-C7J3WGGo.mjs} +4 -4
  95. package/dist/index.es-CpmQmvOg.mjs +633 -0
  96. package/dist/index.mjs +2 -2
  97. package/dist/invoiceState-BJVHaKs7.mjs +14 -0
  98. package/dist/{invoices-3520M5AN.mjs → invoices-e1sKLgxg.mjs} +40 -35
  99. package/dist/{it-IT-BgFVsO5S.mjs → it-IT-B7ui2oxO.mjs} +110 -18
  100. package/dist/{it-IT-CaaFToGB.mjs → it-IT-DnJP5URH.mjs} +9 -3
  101. package/dist/{nl-NL-UiRWbO9S.mjs → nl-NL-Bafh2xoT.mjs} +116 -24
  102. package/dist/{nl-NL-D0MQKaql.mjs → nl-NL-q9xfTZF0.mjs} +12 -6
  103. package/dist/paymentMethods-B_82JGk_.mjs +77 -0
  104. package/dist/paymentMethods-Nfv9HdkS.mjs +61 -0
  105. package/dist/paymentOutcome-BXEU5-84.mjs +67 -0
  106. package/dist/payments-BnxbzQUC.mjs +68 -0
  107. package/dist/{pricing-BIMpDI_p.mjs → pricing-BOhvWWMj.mjs} +3 -3
  108. package/dist/pricingItemConfigs.es-D3pX_9AJ.mjs +78 -0
  109. package/dist/pricingPlanScheduleOverrides-Dxv5FOBd.mjs +233 -0
  110. package/dist/pricingPlanSchedules-Dv7ZCgNp.mjs +38 -0
  111. package/dist/sanitization.es-C6dbuxUJ.mjs +4 -0
  112. package/dist/screens/Checkout/Checkout.mjs +2 -2
  113. package/dist/screens/CustomerOverview/CustomerOverview.mjs +146 -94
  114. package/dist/screens/PayInvoice/PayInvoice.mjs +603 -278
  115. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +102 -88
  116. package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +2 -2
  117. package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +371 -347
  118. package/dist/sessionReference-B8Dbmx5t.mjs +38 -0
  119. package/dist/sorting.es-CVyKw23D.mjs +77 -0
  120. package/dist/subscription-BhxoqwcT.mjs +83 -0
  121. package/dist/subscriptions-BWXZGK0E.mjs +66 -0
  122. package/dist/taxId.es-DkD3Ltr8.mjs +243 -0
  123. package/dist/types/components/InvoiceTable/InvoiceTable.types.d.ts +2 -0
  124. package/dist/types/components/checkout/PromotionCodeSection.types.d.ts +2 -0
  125. package/dist/types/components/customer/CheckoutForm/CheckoutAddressFields.types.d.ts +22 -0
  126. package/dist/types/components/customer/CheckoutForm/CheckoutForm.types.d.ts +15 -0
  127. package/dist/types/components/customer/CustomerPaymentMethodsBlock/CustomerPaymentMethodsBlock.types.d.ts +0 -2
  128. package/dist/types/components/customer/ShippingAddressForm/ShippingAddressForm.types.d.ts +9 -0
  129. package/dist/types/components/customer/ShippingAddresses/ShippingAddressCard.types.d.ts +11 -0
  130. package/dist/types/components/customer/ShippingAddresses/ShippingAddressList.types.d.ts +9 -0
  131. package/dist/types/components/customer/ShippingAddresses/ShippingAddressesModal.types.d.ts +26 -0
  132. package/dist/types/components/invoices/InvoiceOrderSummary/InvoiceOrderSummary.types.d.ts +5 -0
  133. package/dist/types/components/payments/OnDemandPaymentModalShell/OnDemandPaymentModalShell.types.d.ts +0 -1
  134. package/dist/types/components/payments/PayButton/PayButton.types.d.ts +2 -0
  135. package/dist/types/components/payments/PaymentCompletedCard/PaymentCompletedCard.types.d.ts +0 -2
  136. package/dist/types/components/payments/PaymentErrorCard/PaymentErrorCard.types.d.ts +9 -2
  137. package/dist/types/components/payments/PaymentIntegrationForm/PaymentIntegrationForm.types.d.ts +47 -4
  138. package/dist/types/components/payments/PaymentIntegrationFormStripe/PaymentIntegrationFormStripeFrame.types.d.ts +11 -1
  139. package/dist/types/components/payments/PaymentMethodSelector/PaymentMethodSelector.types.d.ts +0 -4
  140. package/dist/types/components/providers/AuthProvider/AuthProvider.handle.d.ts +17 -0
  141. package/dist/types/components/providers/AuthProvider/AuthProvider.lib.d.ts +30 -3
  142. package/dist/types/components/providers/AuthProvider/AuthProvider.types.d.ts +12 -0
  143. package/dist/types/components/providers/AuthProvider/AuthProvider.vue.d.ts +3 -1
  144. package/dist/types/components/providers/AuthProvider/composables/useAuth.d.ts +1 -3
  145. package/dist/types/components/providers/ConfigProvider/ConfigProvider.lib.d.ts +2 -4
  146. package/dist/types/components/providers/CssOverridesProvider/CssOverridesProvider.lib.d.ts +11 -0
  147. package/dist/types/components/providers/EntryProvider/EntryProvider.lib.d.ts +7 -0
  148. package/dist/types/components/providers/EntryProvider/EntryProvider.types.d.ts +2 -0
  149. package/dist/types/components/providers/EntryProvider/EntryProvider.vue.d.ts +3 -1
  150. package/dist/types/components/providers/ErrorBoundary/ErrorBoundary.vue.d.ts +5 -1
  151. package/dist/types/components/providers/ExperimentalFeatureProvider/ExperimentalFeatureProvider.lib.d.ts +2 -2
  152. package/dist/types/components/providers/HostElementProvider/HostElementProvider.lib.d.ts +6 -1
  153. package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +2 -2
  154. package/dist/types/components/providers/LoggerProvider/LoggerProvider.vue.d.ts +5 -1
  155. package/dist/types/components/providers/PortalProvider/PortalProvider.lib.d.ts +10 -7
  156. package/dist/types/components/providers/PortalProvider/PortalProvider.types.d.ts +1 -1
  157. package/dist/types/components/providers/PortalProvider/PortalProvider.vue.d.ts +3 -1
  158. package/dist/types/components/providers/PortalProvider/composables/usePortal.d.ts +2 -2
  159. package/dist/types/components/providers/Provider/Provider.types.d.ts +2 -2
  160. package/dist/types/components/providers/Provider/Provider.vue.d.ts +13 -4
  161. package/dist/types/components/providers/RequiredPropertiesGuard/RequiredPropertiesGuard.vue.d.ts +17 -0
  162. package/dist/types/components/providers/TranslationProvider/TranslationProvider.lib.d.ts +7 -2
  163. package/dist/types/components/providers/TranslationProvider/TranslationProvider.types.d.ts +1 -1
  164. package/dist/types/components/subscriptions/ChargeOnDemandModal/ChargeOnDemandModal.types.d.ts +1 -2
  165. package/dist/types/components/subscriptions/EnabledPricingsList/EnabledPricingsListItem.types.d.ts +2 -0
  166. package/dist/types/components/subscriptions/OrderSummary.types.d.ts +1 -10
  167. package/dist/types/components/subscriptions/OrderSummaryInvoice.types.d.ts +16 -0
  168. package/dist/types/components/subscriptions/SubscriptionCancellationModal/SubscriptionCancellationModal.types.d.ts +5 -1
  169. package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementForm.types.d.ts +10 -16
  170. package/dist/types/components/subscriptions/SubscriptionSummary.types.d.ts +1 -14
  171. package/dist/types/components/subscriptions/SubscriptionsList/SubscriptionsList.types.d.ts +4 -1
  172. package/dist/types/components/subscriptions/SubscriptionsList/SubscriptionsListItem.types.d.ts +1 -2
  173. package/dist/types/components/wallets/AutoTopUpConfig/AutoTopUpConfig.types.d.ts +0 -3
  174. package/dist/types/components/wallets/TopUpModal/TopUpModalForm.types.d.ts +3 -1
  175. package/dist/types/components/wallets/TopUpModal/TopUpModalSuccess.types.d.ts +1 -7
  176. package/dist/types/public/components/BillingInformation/BillingInformation.entry.ce.d.ts +1 -1
  177. package/dist/types/public/components/BillingInformation/BillingInformation.types.d.ts +0 -3
  178. package/dist/types/public/components/BillingInformationForm/BillingInformationForm.entry.ce.d.ts +1 -1
  179. package/dist/types/public/components/CustomerPaymentMethods/CustomerPaymentMethods.entry.ce.d.ts +1 -1
  180. package/dist/types/public/components/CustomerPaymentMethods/CustomerPaymentMethods.types.d.ts +0 -1
  181. package/dist/types/public/components/CustomerShippingAddresses/CustomerShippingAddresses.types.d.ts +12 -0
  182. package/dist/types/public/components/Invoice/Invoice.entry.ce.d.ts +1 -1
  183. package/dist/types/public/components/Invoice/Invoice.types.d.ts +0 -1
  184. package/dist/types/public/components/InvoiceDetails/InvoiceDetails.entry.ce.d.ts +1 -1
  185. package/dist/types/public/components/InvoiceDetails/InvoiceDetails.entry.types.d.ts +3 -2
  186. package/dist/types/public/components/InvoiceDetails/InvoiceDetails.types.d.ts +0 -2
  187. package/dist/types/public/components/InvoiceHeader/InvoiceHeader.entry.ce.d.ts +1 -1
  188. package/dist/types/public/components/InvoiceHeader/InvoiceHeader.types.d.ts +0 -1
  189. package/dist/types/public/components/InvoicesList/InvoicesList.entry.ce.d.ts +1 -1
  190. package/dist/types/public/components/InvoicesList/InvoicesList.types.d.ts +2 -0
  191. package/dist/types/public/components/PaymentHistory/PaymentHistory.entry.ce.d.ts +1 -1
  192. package/dist/types/public/components/PaymentHistory/PaymentHistory.entry.types.d.ts +3 -2
  193. package/dist/types/public/components/PaymentHistory/PaymentHistory.types.d.ts +0 -2
  194. package/dist/types/public/components/PaymentMethodForm/PaymentMethodForm.entry.ce.d.ts +1 -1
  195. package/dist/types/public/components/SubscriptionSchedules/SubscriptionSchedules.entry.ce.d.ts +1 -1
  196. package/dist/types/public/components/SubscriptionSchedules/SubscriptionSchedules.entry.types.d.ts +3 -2
  197. package/dist/types/public/components/SubscriptionSchedules/SubscriptionSchedules.types.d.ts +0 -2
  198. package/dist/types/public/components/SubscriptionsList/SubscriptionsList.entry.ce.d.ts +1 -1
  199. package/dist/types/public/components/SubscriptionsList/SubscriptionsList.types.d.ts +3 -0
  200. package/dist/types/public/components/WalletBalances/WalletBalances.entry.ce.d.ts +1 -1
  201. package/dist/types/public/components/WalletBalances/WalletBalances.entry.types.d.ts +1 -3
  202. package/dist/types/public/core/action-request.types.d.ts +5 -0
  203. package/dist/types/public/core/registry.ce.d.ts +3 -3
  204. package/dist/types/public/core/registry.d.ts +0 -3
  205. package/dist/types/public/core/types.d.ts +5 -0
  206. package/dist/types/public/screens/Checkout/Checkout.entry.ce.d.ts +1 -1
  207. package/dist/types/public/screens/Checkout/Checkout.entry.types.d.ts +0 -7
  208. package/dist/types/public/screens/Checkout/Checkout.types.d.ts +2 -2
  209. package/dist/types/public/screens/CustomerOverview/CustomerOverview.entry.ce.d.ts +1 -1
  210. package/dist/types/public/screens/PayInvoice/PayInvoice.entry.ce.d.ts +1 -1
  211. package/dist/types/public/screens/PayInvoice/PayInvoice.types.d.ts +5 -1
  212. package/dist/types/public/screens/PaymentMethodsManagement/PaymentMethodsManagement.entry.ce.d.ts +1 -1
  213. package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.entry.ce.d.ts +1 -1
  214. package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.types.d.ts +1 -2
  215. package/dist/types/public/screens/SubscriptionManagement/SubscriptionManagement.entry.ce.d.ts +1 -1
  216. package/dist/types/services/paymentMethods.types.d.ts +2 -10
  217. package/dist/types/services/requests.types.d.ts +16 -6
  218. package/dist/types/translations/supported.d.ts +1 -1
  219. package/dist/types/types/errors.d.ts +3 -2
  220. package/dist/types/types/portalAuthentication.d.ts +2 -0
  221. package/dist/types/types/portalToken.d.ts +9 -0
  222. package/dist/types/types/shippingAddress.d.ts +9 -0
  223. package/dist/types/vendor/@adyen/adyen-web/index.d.ts +2 -0
  224. package/dist/types/vendor/@solvimon/solvimon-types/index.d.ts +2 -0
  225. package/dist/types/vendor/@solvimon/solvimon-types/types/ApprovalPolicies.d.ts +1 -1
  226. package/dist/types/vendor/@solvimon/solvimon-types/types/ApprovalRequests.d.ts +27 -6
  227. package/dist/types/vendor/@solvimon/solvimon-types/types/ConfigMeterProperties.d.ts +3 -0
  228. package/dist/types/vendor/@solvimon/solvimon-types/types/Entitlement.d.ts +6 -0
  229. package/dist/types/vendor/@solvimon/solvimon-types/types/Integrations.d.ts +9 -1
  230. package/dist/types/vendor/@solvimon/solvimon-types/types/Invoice.d.ts +16 -1
  231. package/dist/types/vendor/@solvimon/solvimon-types/types/JWT.d.ts +10 -0
  232. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterPropertyVariable.d.ts +16 -0
  233. package/dist/types/vendor/@solvimon/solvimon-types/types/Payment.d.ts +1 -1
  234. package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentAcceptor.d.ts +6 -0
  235. package/dist/types/vendor/@solvimon/solvimon-types/types/Permission.d.ts +1 -1
  236. package/dist/types/vendor/@solvimon/solvimon-types/types/Platform.d.ts +12 -3
  237. package/dist/types/vendor/@solvimon/solvimon-types/types/Portal.d.ts +71 -0
  238. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSubscription.d.ts +14 -0
  239. package/dist/types/vendor/@solvimon/solvimon-types/types/QuoteTemplates.d.ts +1 -0
  240. package/dist/types/vendor/@solvimon/solvimon-types/types/QuoteVersions.d.ts +35 -0
  241. package/dist/types/vendor/@solvimon/solvimon-types/types/Quotes.d.ts +16 -0
  242. package/dist/types/vendor/@solvimon/solvimon-types/types/ShippingAddress.d.ts +54 -0
  243. package/dist/types/vendor/@solvimon/solvimon-types/utils.d.ts +1 -1
  244. package/dist/types/vendor/@solvimon/solvimon-ui/components/providers/BrandProvider/BrandProvider.types.d.ts +16 -0
  245. package/dist/types/vendor/@solvimon/solvimon-ui/components/providers/IntlProvider/IntlProvider.types.d.ts +66 -0
  246. package/dist/types/vendor/@solvimon/solvimon-ui/index.d.ts +2 -0
  247. package/dist/useActionDispatchProvider-3W2vEyIg.mjs +9 -0
  248. package/dist/{useCustomer-B-jyJIVy.mjs → useCustomer-cObBvDOu.mjs} +2 -2
  249. package/dist/useCustomerFormLabels-DJWf2O17.mjs +1173 -0
  250. package/dist/useIncrementalLoading-CATuO36d.mjs +60 -0
  251. package/dist/useInvoiceData-DD44HTl7.mjs +21 -0
  252. package/dist/useInvoicesList-CpB-41MQ.mjs +674 -0
  253. package/dist/useLazyFloating.es-CycqRyeb.mjs +68 -0
  254. package/dist/useLoadInitialData-qzdnBoui.mjs +15 -0
  255. package/dist/usePaymentFormHold-ByUZi3A-.mjs +181 -0
  256. package/dist/{usePaymentMethodAvailability-DAcsKGeh.mjs → usePaymentMethodAvailability-DUdrs0Ji.mjs} +8 -8
  257. package/dist/usePaymentMethods-ByaKF7mf.mjs +21 -0
  258. package/dist/{usePayments-Cr6NlGaW.mjs → usePayments-BXABv-lF.mjs} +9 -9
  259. package/dist/usePortal-CwR_FxTb.mjs +7 -0
  260. package/dist/useService-BZcbUZHI.mjs +56 -0
  261. package/dist/{useTimePeriod.es-DWLsLFqs.mjs → useTimePeriod.es-BpdiVwg8.mjs} +1 -1
  262. package/dist/useViewport-psZejz_H.mjs +19 -0
  263. package/package.json +33 -60
  264. package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-081H9T3X.js +0 -1
  265. package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DNepCMRp.mjs +0 -223
  266. package/dist/Alert.vue.es-RyK53a2P.js +0 -1
  267. package/dist/Amount.vue.es-DExaYBqm.js +0 -1
  268. package/dist/Avatar.vue.es-BJxSCU76.js +0 -1
  269. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-BV5iEOxn.js +0 -1
  270. package/dist/Button.vue.es-BzkuglKw.js +0 -1
  271. package/dist/ChargeOnDemandModal-b17YswWA.js +0 -1
  272. package/dist/Checkout.entry.ce-HlUrJ1kh.js +0 -2
  273. package/dist/Checkout.entry.ce-X2zGo6hG.mjs +0 -4381
  274. package/dist/Chip.vue.es-B2jjzIOc.js +0 -1
  275. package/dist/Comparators.vue.es-CwhX3rbx.mjs +0 -93
  276. package/dist/Comparators.vue.es-DmkxV0gb.js +0 -1
  277. package/dist/ContentWithAsideLayout-BCM8tmZN.mjs +0 -38
  278. package/dist/ContentWithAsideLayout-RSdKXqAf.js +0 -1
  279. package/dist/ContextMenu.vue.es-DUU43tCy.js +0 -1
  280. package/dist/CustomerBillingInformation.vue.es-BfPEB42w.js +0 -1
  281. package/dist/CustomerPaymentMethods.lib-BKgQTCtc.js +0 -1
  282. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BISD6n8X.js +0 -1
  283. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DssxYPSA.mjs +0 -2688
  284. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-XufY6bdV.js +0 -1
  285. package/dist/Divider.vue.es-UwnWvUTl.js +0 -1
  286. package/dist/DividerText.vue.es-CoyDk9eH.js +0 -1
  287. package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CQ0KrXHJ.js +0 -1
  288. package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-QW9NdxyZ.mjs +0 -335
  289. package/dist/ErrorNotification.vue.es-tS9vySUZ.js +0 -1
  290. package/dist/Expand.vue.es-BtM0EZEr.js +0 -1
  291. package/dist/FormMessage.vue.es-dqATjC2N.js +0 -1
  292. package/dist/FormMessage.vue.es-jG3fQZms.mjs +0 -29
  293. package/dist/IconButton.vue.es-DgQN18Am.js +0 -1
  294. package/dist/IconTitle.vue.es-Dn2xcPHj.js +0 -1
  295. package/dist/Input.vue.es-B60eK8Ds.js +0 -1
  296. package/dist/Input.vue.es-CU9u5yKH.mjs +0 -235
  297. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Dqdezse7.js +0 -1
  298. package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-Cl6HU243.js +0 -1
  299. package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-DNqawlYV.mjs +0 -41
  300. package/dist/InvoiceSummary.vue.es-CAmA8g0t.js +0 -1
  301. package/dist/InvoiceSummary.vue.es-CRiFJ5x-.mjs +0 -2596
  302. package/dist/Modal.vue.es-DvLB3uCG.js +0 -1
  303. package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-Dg4rn1cm.js +0 -1
  304. package/dist/PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-B9R5JRJv.js +0 -1
  305. package/dist/PaymentHistoryBlock-Uw8xeKUk.js +0 -1
  306. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-ALI5f0py.js +0 -1
  307. package/dist/PaymentIntegrationForm-Cx0zCf_C.js +0 -1
  308. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-B-viSd_i.js +0 -1
  309. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CCKCXXZX.mjs +0 -154
  310. package/dist/PaymentIntegrationFormAdyen-B-v-4nlj.js +0 -98
  311. package/dist/PaymentIntegrationFormStripe-CoLmAzas.js +0 -102
  312. package/dist/PaymentIntegrationFormStripe-Ds0BXt89.mjs +0 -587
  313. package/dist/PaymentMethod.vue.es-D0D9jW8s.js +0 -1
  314. package/dist/PaymentMethodForm-CMP5FLRO.js +0 -1
  315. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-nxnGyJmE.js +0 -1
  316. package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-CIrrQUS6.js +0 -1
  317. package/dist/PlanCustomizationEditor-DS1r2vBO.js +0 -1
  318. package/dist/PlanCustomizationEditor-DlVSCKGN.mjs +0 -722
  319. package/dist/PricingGroupRangeInput.vue.es-VoOTnHjk.js +0 -185
  320. package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-hS6A-KcP.js +0 -1
  321. package/dist/RadioGroupExtended.vue.es-9YzXzZF0.mjs +0 -163
  322. package/dist/RadioGroupExtended.vue.es-DlbURHQN.js +0 -1
  323. package/dist/Section.vue.es-Bbt0RITt.js +0 -1
  324. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Dl7MbMlk.js +0 -1
  325. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-xzjqB-v-.mjs +0 -687
  326. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-CJWE7wVi.mjs +0 -41
  327. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-otI7Hz2w.js +0 -1
  328. package/dist/StepInput.vue.es-H-3R4jJq.js +0 -1
  329. package/dist/SubscriptionDetails.entry.ce-CQUO_uXH.js +0 -1
  330. package/dist/SubscriptionSchedules-Dy0fUgx5.js +0 -1
  331. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-C1kTiW-H.mjs +0 -5234
  332. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-Dd_Rr6qn.js +0 -1
  333. package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-CYyP4ra9.js +0 -1
  334. package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-CsekphtV.mjs +0 -91
  335. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-B4j8Clbj.js +0 -1
  336. package/dist/TooltipParagraph.vue.es-B9A17aG7.mjs +0 -129
  337. package/dist/TooltipParagraph.vue.es-DvC5Wjaz.js +0 -1
  338. package/dist/TrialChip.vue.es-CLQZ5F0n.js +0 -1
  339. package/dist/accel.svg.es-DFJXdioD.js +0 -1
  340. package/dist/ach.svg.es-BYP873jU.js +0 -1
  341. package/dist/adyen-BJfC7N6f.js +0 -1
  342. package/dist/adyenSdk-BP2XXzeJ.js +0 -1
  343. package/dist/amazon-pay.svg.es-CQWgtowB.js +0 -1
  344. package/dist/amex.svg.es-DKhW4Txt.js +0 -1
  345. package/dist/api.es-duCDtZD9.js +0 -1
  346. package/dist/apple-pay.svg.es-Dyojd0F-.js +0 -1
  347. package/dist/bacs.svg.es-GJpZs1sD.js +0 -1
  348. package/dist/bancontact.svg.es-BQh7nAup.js +0 -1
  349. package/dist/carnet.svg.es-DY04-F2L.js +0 -1
  350. package/dist/cartes-bancaires.svg.es-BleHMlkN.js +0 -1
  351. package/dist/cashapp.svg.es-MwXGYom6.js +0 -1
  352. package/dist/cn.es-C9Yqq4tg.js +0 -1
  353. package/dist/comparators.es-OGt19O9U.js +0 -1
  354. package/dist/components/BillingInformation/BillingInformation.cjs +0 -1
  355. package/dist/components/BillingInformationForm/BillingInformationForm.cjs +0 -1
  356. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs +0 -1
  357. package/dist/components/Invoice/Invoice.cjs +0 -1
  358. package/dist/components/InvoiceDetails/InvoiceDetails.cjs +0 -1
  359. package/dist/components/InvoiceHeader/InvoiceHeader.cjs +0 -1
  360. package/dist/components/InvoicesList/InvoicesList.cjs +0 -1
  361. package/dist/components/PaymentHistory/PaymentHistory.cjs +0 -1
  362. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs +0 -1
  363. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs +0 -1
  364. package/dist/components/SubscriptionsList/SubscriptionsList.cjs +0 -1
  365. package/dist/components/WalletBalances/WalletBalances.cjs +0 -1
  366. package/dist/configuration-akTS7Wiw.js +0 -1
  367. package/dist/core/index.cjs +0 -1
  368. package/dist/countryData.es-C4jHBzfo.js +0 -1
  369. package/dist/customElements-B58FcXIN.mjs +0 -6633
  370. package/dist/customElements-DUMRMFQ5.js +0 -1215
  371. package/dist/customer-B3LPAhaD.mjs +0 -31
  372. package/dist/customer-CisTPaXj.js +0 -1
  373. package/dist/customer.es-B5ppZf0j.mjs +0 -20
  374. package/dist/customer.es-BButyYo0.js +0 -1
  375. package/dist/dana.svg.es-BDtZLpwd.js +0 -1
  376. package/dist/dankort.svg.es-CksaipXF.js +0 -1
  377. package/dist/de-DE-B4TUdnUf.js +0 -1
  378. package/dist/de-DE-DL74pMLb.js +0 -1
  379. package/dist/diners.svg.es-D6Mu1pqP.js +0 -1
  380. package/dist/discover.svg.es-DgqWCMUM.js +0 -1
  381. package/dist/eftpos.svg.es-Dk2DOT8W.js +0 -1
  382. package/dist/elo.svg.es-C-BzjuRP.js +0 -1
  383. package/dist/en-US-B2XFj-_p.js +0 -1
  384. package/dist/en-US-DQ5vlv9Z.mjs +0 -339
  385. package/dist/en-US-J85TQRI8.js +0 -1
  386. package/dist/en-US-SDhjlY_v.mjs +0 -301
  387. package/dist/eps.svg.es-B_85bP-W.js +0 -1
  388. package/dist/error-BHVZJGwD.mjs +0 -13
  389. package/dist/error-CmduqgVq.js +0 -1
  390. package/dist/floating-ui.vue.es-Bly3DGWm.js +0 -1
  391. package/dist/floating-ui.vue.es-CYt0fSY7.mjs +0 -1108
  392. package/dist/formControl-ODrpUvcA.js +0 -1
  393. package/dist/formControl-dX7l8o3c.mjs +0 -845
  394. package/dist/formatting.es-C72Nsrmh.js +0 -1
  395. package/dist/gcash.svg.es-BKAdhWzv.js +0 -1
  396. package/dist/getComposedString.es-haS4bAj7.js +0 -1
  397. package/dist/getCountryNameByCode.es-Xxc0nZsH.js +0 -1
  398. package/dist/girocard.svg.es-HSOEvDif.js +0 -1
  399. package/dist/go-pay.svg.es-DQjtunZ_.js +0 -1
  400. package/dist/google-pay.svg.es-hzc_EgiJ.js +0 -1
  401. package/dist/hipercard.svg.es-CbCsRY2q.js +0 -1
  402. package/dist/icon-sprite.svg.es-BZIz7-0d.mjs +0 -4
  403. package/dist/icon-sprite.svg.es-Ds6lDf5p.js +0 -1
  404. package/dist/ideal.svg.es-Booz1IML.js +0 -1
  405. package/dist/index-BPZPnOQQ.js +0 -7
  406. package/dist/index.cjs +0 -1
  407. package/dist/index.es-BclokHQX.js +0 -1
  408. package/dist/invoices-CKQBLar2.js +0 -1
  409. package/dist/it-IT-CSYvGmpT.js +0 -1
  410. package/dist/it-IT-CqNK62qe.js +0 -1
  411. package/dist/jcb.svg.es-B3WPB8c2.js +0 -1
  412. package/dist/kakao-pay.svg.es-Cs-lCW74.js +0 -1
  413. package/dist/klarna.svg.es-Cs6XaHD7.js +0 -1
  414. package/dist/maestro.svg.es-BvK4oPg4.js +0 -1
  415. package/dist/mastercard.svg.es-lp4AXyyV.js +0 -1
  416. package/dist/momo.svg.es-C5aLYf_R.js +0 -1
  417. package/dist/nl-NL-CpE4IgwO.js +0 -1
  418. package/dist/nl-NL-Dx-TNXQ1.js +0 -1
  419. package/dist/nyce.svg.es-ArAivAZW.js +0 -1
  420. package/dist/object.es-CdriXMPs.js +0 -1
  421. package/dist/open-banking.svg.es-Q3rRkCvP.js +0 -1
  422. package/dist/paymentFailure-Bh60UhxA.mjs +0 -47
  423. package/dist/paymentFailure-Cki8c5BX.js +0 -1
  424. package/dist/paymentMethods-CWlvwK5V.mjs +0 -77
  425. package/dist/paymentMethods-Cw-i95mM.js +0 -1
  426. package/dist/payments-2qeQdpiW.mjs +0 -45
  427. package/dist/payments-CS7_YcOW.js +0 -1
  428. package/dist/paypal.svg.es-Cjp5sNI3.js +0 -1
  429. package/dist/pricing-BOqG21f9.js +0 -1
  430. package/dist/pricing.es-C07bgEZx.js +0 -1
  431. package/dist/pricingItemConfigs.es-D4aYkYcf.js +0 -1
  432. package/dist/pricingItemConfigs.es-ORxsk_YS.mjs +0 -77
  433. package/dist/pricingPlanSchedule-BM8vsKkV.js +0 -1
  434. package/dist/pricingPlanSchedules-B_sTAIgU.js +0 -1
  435. package/dist/pricingPlanSchedules-ChQCbMfe.mjs +0 -32
  436. package/dist/pulse.svg.es-Dit33E8S.js +0 -1
  437. package/dist/screens/Checkout/Checkout.cjs +0 -1
  438. package/dist/screens/CustomerOverview/CustomerOverview.cjs +0 -1
  439. package/dist/screens/PayInvoice/PayInvoice.cjs +0 -1
  440. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs +0 -1
  441. package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs +0 -1
  442. package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs +0 -1
  443. package/dist/sepa.svg.es-0t4DKeA1.js +0 -1
  444. package/dist/sessionReference-3h-6FdrC.mjs +0 -43
  445. package/dist/sessionReference-m_6Rp4X1.js +0 -1
  446. package/dist/slots.es-T9ZJRGtG.js +0 -1
  447. package/dist/sorting.es-DCihKqD2.mjs +0 -77
  448. package/dist/sorting.es-DQsjKr8A.js +0 -1
  449. package/dist/star.svg.es-D2JncY7b.js +0 -1
  450. package/dist/subscription-D1yHKUNc.mjs +0 -69
  451. package/dist/subscription-ZA62t4E9.js +0 -1
  452. package/dist/subscriptions-DcfcBYAq.mjs +0 -55
  453. package/dist/subscriptions-DwVsf4Ev.js +0 -1
  454. package/dist/trustly.svg.es-GJByiFAs.js +0 -1
  455. package/dist/twint.svg.es-BJ2f48og.js +0 -1
  456. package/dist/typeGuards.es-DS3vZaJn.js +0 -1
  457. package/dist/types/components/payments/AddPaymentMethodModal/AddPaymentMethodModal.types.d.ts +0 -14
  458. package/dist/types/components/payments/SubscriptionPaymentCompletedCard/SubscriptionPaymentCompletedCard.types.d.ts +0 -3
  459. package/dist/types/components/subscriptions/PlanCustomizationForm/AddonSingleEditor.types.d.ts +0 -5
  460. package/dist/types/services/portals.types.d.ts +0 -70
  461. package/dist/types/types/subscription.d.ts +0 -4
  462. package/dist/unionpay.svg.es-DjFZ5EMQ.js +0 -1
  463. package/dist/url-TNRgVI8A.mjs +0 -21
  464. package/dist/url-vloPOiXd.js +0 -1
  465. package/dist/useActionDispatchProvider-B3AvkLL2.mjs +0 -11
  466. package/dist/useActionDispatchProvider-DFhppdve.js +0 -1
  467. package/dist/useCustomer-BwZKd9i5.js +0 -1
  468. package/dist/useCustomerFormLabels-BQk3d9PZ.mjs +0 -968
  469. package/dist/useCustomerFormLabels-DV9QiMYh.js +0 -1
  470. package/dist/useExperimentalFeature-BciA3Ok9.mjs +0 -135
  471. package/dist/useExperimentalFeature-CGIkgFR4.js +0 -1
  472. package/dist/useIncrementalLoading-CaWOE8Xl.js +0 -1
  473. package/dist/useIncrementalLoading-Cgxw2GD7.mjs +0 -48
  474. package/dist/useInvoiceData-BocKdeg7.mjs +0 -38
  475. package/dist/useInvoiceData-CNV_FMV8.js +0 -1
  476. package/dist/useInvoicesList-C8nsXMJ6.mjs +0 -500
  477. package/dist/useInvoicesList-S0IbQcrD.js +0 -1
  478. package/dist/useLoadInitialData-D9GkzY8t.mjs +0 -15
  479. package/dist/useLoadInitialData-D_R6Jy1s.js +0 -1
  480. package/dist/usePaymentMethodAvailability-BO_guwAw.js +0 -1
  481. package/dist/usePaymentMethodOptions-1vRAo6Ib.mjs +0 -39
  482. package/dist/usePaymentMethodOptions-CuzOoi2k.js +0 -1
  483. package/dist/usePaymentMethods-CbwnGONc.mjs +0 -15
  484. package/dist/usePaymentMethods-DDaTZQZp.js +0 -1
  485. package/dist/usePayments-DDSjo0rH.js +0 -1
  486. package/dist/usePortal-C27omjhz.js +0 -1
  487. package/dist/usePortal-C5AsegpS.mjs +0 -11
  488. package/dist/useService-Bh47bllz.mjs +0 -50
  489. package/dist/useService-H7BjLg8P.js +0 -1
  490. package/dist/useSubscription-BZJL0VOA.mjs +0 -210
  491. package/dist/useSubscription-D787IXY-.js +0 -1
  492. package/dist/useTimePeriod.es-rzxqUCTu.js +0 -1
  493. package/dist/useViewport-BgdA2PPt.mjs +0 -29
  494. package/dist/useViewport-hPRVDWCm.js +0 -1
  495. package/dist/useWatchDebounced-B8iX7ykx.js +0 -1
  496. package/dist/useWatchDebounced-BHlBPcXB.mjs +0 -20
  497. package/dist/visa.svg.es-NY3BHhda.js +0 -1
  498. package/dist/vpay.svg.es-VViQi42w.js +0 -1
  499. package/dist/wallets.es-CNIMW5ay.js +0 -1
  500. package/dist/zip.svg.es-C9S_F31W.js +0 -1
@@ -1,121 +1,2587 @@
1
- import { defineComponent as I, openBlock as i, createElementBlock as _, normalizeClass as L, createElementVNode as u, createBlock as h, unref as e, createCommentVNode as w, renderSlot as A, computed as N, Fragment as M, renderList as j, createVNode as a, withCtx as n, createTextVNode as f, toDisplayString as d, withKeys as T, defineAsyncComponent as z } from "vue";
2
- import { _ as F } from "../../CustomerBillingInformation.vue.es-DhFbpZPK.mjs";
3
- import { a as O, _ as V, d as W, e as E } from "../../customElements-B58FcXIN.mjs";
4
- import { a as R, _ as K } from "../../InvoiceEntryView.vue_vue_type_script_setup_true_lang-DNqawlYV.mjs";
5
- import { a as P } from "../../Button.vue.es-Cmjfm4jw.mjs";
6
- import { I as D, a as B, b as C, _ as H } from "../../InvoiceSummary.vue.es-CRiFJ5x-.mjs";
7
- import { _ as U } from "../../Section.vue.es-DVEpre9O.mjs";
8
- import { u as Q } from "../../Comparators.vue.es-CwhX3rbx.mjs";
9
- import { f as Y } from "../../formatting.es-RclXHhKo.mjs";
10
- import { g as q, a as G, f as J } from "../../wallets.es-eH2C2ygn.mjs";
11
- import { _ as X } from "../../DividerText.vue.es-nAo1eRMV.mjs";
12
- import { u as Z } from "../../useViewport-BgdA2PPt.mjs";
13
- import { _ as ee } from "../../InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-gpMtYNzn.mjs";
14
- import { a as te } from "../../sessionReference-3h-6FdrC.mjs";
15
- const ae = { class: "flex items-center gap-2" }, ne = /* @__PURE__ */ I({
1
+ import { ref as le, defineComponent as L, openBlock as t, createElementBlock as l, normalizeClass as N, createElementVNode as h, createBlock as _, unref as o, createCommentVNode as y, renderSlot as $, Fragment as x, renderList as R, createVNode as n, withCtx as i, createTextVNode as v, toDisplayString as d, withKeys as Y, normalizeProps as fe, guardReactiveProps as ve, computed as P, createSlots as Ue, mergeProps as J, isRef as De, defineAsyncComponent as Re } from "vue";
2
+ import { _ as Fe } from "../../CustomerBillingInformation.vue.es-B8NiQaJs.mjs";
3
+ import { a as W, d as Ie, q as ye, g as ze, h as We, j as Ve } from "../../customElements-BTj4ii4f.mjs";
4
+ import { a as He, _ as je } from "../../InvoiceEntryView.vue_vue_type_script_setup_true_lang-06R-M8Q3.mjs";
5
+ import { a as j, _ as Ge } from "../../Button.vue.es-Zw--kuaU.mjs";
6
+ import { _ as w } from "../../Amount.vue.es-DPqHB8Xd.mjs";
7
+ import { i as Xe } from "../../useService-BZcbUZHI.mjs";
8
+ import { _ as qe } from "../../useLazyFloating.es-CycqRyeb.mjs";
9
+ import { a as we } from "../../customer.es-DQKl6wFt.mjs";
10
+ import { M as $e, a as Ye, f as Me } from "../../formatting.es-RclXHhKo.mjs";
11
+ import { _ as Ee, u as se } from "../../Comparators.vue.es-DQBI3f7m.mjs";
12
+ import { _ as Ce } from "../../InvoicePricingClauseChip.vue.es-DKU0xu0t.mjs";
13
+ import { g as ge } from "../../getComposedString.es-C__uhJpd.mjs";
14
+ import { _ as de, T as ue, a as ce } from "../../TooltipParagraph.vue.es-Dw0ndjle.mjs";
15
+ import { f as Ke } from "../../index.es-C7J3WGGo.mjs";
16
+ import { g as Ne, a as Be, f as Ae } from "../../wallets.es-eH2C2ygn.mjs";
17
+ import { _ as Pe } from "../../DividerText.vue.es-CNbgif-3.mjs";
18
+ import { _ as Qe } from "../../IconTitle.vue.es-O2kcqgKm.mjs";
19
+ import { a as Je } from "../../ContextMenu.vue.es-B9mFpUQK.mjs";
20
+ import { _ as Ze } from "../../Section.vue.es-CvX9tg2f.mjs";
21
+ import { g as pe, w as et } from "../../invoiceState-BJVHaKs7.mjs";
22
+ import { u as tt } from "../../useViewport-psZejz_H.mjs";
23
+ import { _ as nt } from "../../InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-rhqYVdfV.mjs";
24
+ const xe = (e = []) => {
25
+ const a = le(e);
26
+ return [a, (c) => {
27
+ typeof a.value.find((s) => s === c) == "number" ? a.value = a.value.filter((s) => s !== c) : a.value = [...a.value, c];
28
+ }];
29
+ }, it = { class: "flex items-center gap-2" }, at = /* @__PURE__ */ L({
16
30
  __name: "InfoBlock",
17
31
  props: {
18
32
  variant: { default: "info" },
19
33
  hasIcon: { type: Boolean }
20
34
  },
21
- setup(t) {
22
- const r = {
35
+ setup(e) {
36
+ const a = {
23
37
  info: "info",
24
38
  warning: "error",
25
39
  danger: "error",
26
40
  success: "check_circle"
27
41
  };
28
- return (o, c) => (i(), _("div", {
29
- class: L(["flex items-center justify-between gap-2 rounded-sm border px-4 py-3 text-sm", {
30
- "border-blue-200 bg-feedback-info text-feedback-info": t.variant === "info",
31
- "border-red-200 bg-feedback-danger text-feedback-danger": t.variant === "danger",
32
- "border-yellow-200 bg-feedback-warning text-feedback-warning": t.variant === "warning",
33
- "border-green-200 bg-feedback-success text-feedback-success": t.variant === "success"
42
+ return (u, c) => (t(), l("div", {
43
+ class: N(["flex items-center justify-between gap-2 rounded-sm border px-4 py-3 text-sm", {
44
+ "border-blue-200 bg-feedback-info text-feedback-info": e.variant === "info",
45
+ "border-red-200 bg-feedback-danger text-feedback-danger": e.variant === "danger",
46
+ "border-yellow-200 bg-feedback-warning text-feedback-warning": e.variant === "warning",
47
+ "border-green-200 bg-feedback-success text-feedback-success": e.variant === "success"
34
48
  }])
35
49
  }, [
36
- u("div", ae, [
37
- t.hasIcon ? (i(), h(e(P), {
50
+ h("div", it, [
51
+ e.hasIcon ? (t(), _(o(j), {
38
52
  key: 0,
39
- icon: r[t.variant],
53
+ icon: a[e.variant],
40
54
  size: "xs",
41
55
  class: "shrink-0"
42
- }, null, 8, ["icon"])) : w("", !0),
43
- u("div", null, [
44
- A(o.$slots, "default")
56
+ }, null, 8, ["icon"])) : y("", !0),
57
+ h("div", null, [
58
+ $(u.$slots, "default")
45
59
  ])
46
60
  ]),
47
- u("div", null, [
48
- A(o.$slots, "cta")
61
+ h("div", null, [
62
+ $(u.$slots, "cta")
49
63
  ])
50
64
  ], 2));
51
65
  }
52
- }), ie = ({
53
- invoice: t,
54
- getPeriodTitle: r,
55
- creditsLabel: o,
66
+ }), ot = {}, lt = { class: "w-full table-fixed" };
67
+ function rt(e, a) {
68
+ return t(), l("table", lt, [
69
+ $(e.$slots, "default")
70
+ ]);
71
+ }
72
+ const G = /* @__PURE__ */ qe(ot, [["render", rt]]), k = /* @__PURE__ */ L({
73
+ __name: "InvoiceTableData",
74
+ props: {
75
+ number: { type: Boolean, default: !1 },
76
+ hasPadding: { type: Boolean, default: !0 }
77
+ },
78
+ setup(e) {
79
+ return (a, u) => (t(), l("td", {
80
+ class: N({
81
+ "text-right tabular-nums": e.number,
82
+ "py-2": e.hasPadding
83
+ })
84
+ }, [
85
+ $(a.$slots, "default")
86
+ ], 2));
87
+ }
88
+ }), M = /* @__PURE__ */ L({
89
+ __name: "InvoiceTableHeader",
90
+ props: {
91
+ left: { type: Boolean, default: !1 },
92
+ right: { type: Boolean, default: !1 }
93
+ },
94
+ setup(e) {
95
+ return (a, u) => (t(), l("th", {
96
+ class: N(["border-b py-1.5 text-xs font-bold uppercase text-subtle", { "text-left": e.left, "text-right": e.right }])
97
+ }, [
98
+ $(a.$slots, "default")
99
+ ], 2));
100
+ }
101
+ }), st = "INVOICE_PERIOD", dt = "INVOICE_PERIOD_SUBTOTAL", ie = "INVOICE_PERIOD_TOTAL", re = "SUMMARY_LINE_AMOUNT", ut = "SUMMARY_TOTAL_TAX", ct = "SUMMARY_TOTAL_INCLUDING_TAX", mt = "SUMMARY_TOTAL_EXCLUDING_TAX", ft = "SUMMARY_TOTAL_DISCOUNT", vt = "SUMMARY_AMOUNT_DUE", gt = "DEDUCTION", bt = "HAS_SUBLINES", yt = { class: "flex items-center" }, pt = {
102
+ key: 0,
103
+ class: "text-xs text-secondary"
104
+ }, xt = { class: "flex items-center" }, be = /* @__PURE__ */ L({
105
+ __name: "InvoiceSubLineRow",
106
+ props: {
107
+ subLines: {},
108
+ isOpen: { type: Boolean },
109
+ lineOrder: {},
110
+ periodOrder: {},
111
+ groupOrder: {},
112
+ processingOnlyCustomers: {},
113
+ displayInvoiceSubLinesPerProcessingOnlyCustomer: { type: Boolean },
114
+ showTaxPerLineItem: { type: Boolean, default: !0 }
115
+ },
116
+ setup(e) {
117
+ const { formatMessage: a, formatNumber: u } = W(), c = e, m = (f) => {
118
+ var b;
119
+ const g = (b = c.processingOnlyCustomers) == null ? void 0 : b.find(
120
+ (p) => p.id === f
121
+ );
122
+ return g ? we(g) : a({
123
+ id: "generic.not_available",
124
+ defaultMessage: "N/A",
125
+ description: "Used in scenarios where no data is available to be displayed"
126
+ });
127
+ }, s = (f) => {
128
+ var b;
129
+ return ((b = f.usage_based_conversion) == null ? void 0 : b.conditions) ?? f.conditions;
130
+ }, r = (f) => {
131
+ var b, g;
132
+ const p = (g = (b = f.details.conversion) == null ? void 0 : b.credits) == null ? void 0 : g.quantity;
133
+ return p === void 0 ? a({
134
+ id: "generic.not_available",
135
+ defaultMessage: "N/A",
136
+ description: "Used in scenarios where no data is available to be displayed"
137
+ }) : u(+p, { maximumFractionDigits: $e });
138
+ };
139
+ return (f, b) => e.subLines && e.isOpen ? (t(!0), l(x, { key: 0 }, R(e.subLines, (g, p) => (t(), l(x, { key: p }, [
140
+ g.processing_only_customer_resource_id ? e.displayInvoiceSubLinesPerProcessingOnlyCustomer && e.processingOnlyCustomers ? (t(), l("tr", {
141
+ key: 1,
142
+ class: N(["group", { "border-t": p > 0 }])
143
+ }, [
144
+ n(k, { class: "pl-4" }, {
145
+ default: i(() => [
146
+ h("div", xt, [
147
+ h("div", null, d(m(g.processing_only_customer_resource_id)), 1)
148
+ ])
149
+ ]),
150
+ _: 2
151
+ }, 1024),
152
+ $(f.$slots, "subline-content", {
153
+ details: g.details,
154
+ hideTaxDetails: !0
155
+ })
156
+ ], 2)) : y("", !0) : (t(), l("tr", {
157
+ key: 0,
158
+ class: N(p > 0 ? "border-t" : "")
159
+ }, [
160
+ n(k, null, {
161
+ default: i(() => {
162
+ var T, I, S, E, C, B;
163
+ return [
164
+ h("div", yt, [
165
+ $(f.$slots, "invoice-line-prefix", {
166
+ lineOrder: e.lineOrder,
167
+ periodOrder: e.periodOrder,
168
+ groupOrder: e.groupOrder
169
+ }),
170
+ h("div", null, [
171
+ h("div", null, [
172
+ g.description ? (t(), l(x, { key: 0 }, [
173
+ v(d(g.description), 1)
174
+ ], 64)) : g.details.description ? (t(), l(x, { key: 1 }, [
175
+ v(d(g.details.description), 1)
176
+ ], 64)) : (t(), l(x, { key: 2 }, [
177
+ v(" N/A ")
178
+ ], 64))
179
+ ]),
180
+ (T = s(g)) != null && T.name || (I = s(g)) != null && I.meter_properties ? (t(), l("div", pt, [
181
+ (S = s(g)) != null && S.name ? (t(), l(x, { key: 0 }, [
182
+ v(d((E = s(g)) == null ? void 0 : E.name), 1)
183
+ ], 64)) : (C = s(g)) != null && C.meter_properties ? (t(), _(o(Ee), {
184
+ key: 1,
185
+ comparators: (B = s(g)) == null ? void 0 : B.meter_properties
186
+ }, null, 8, ["comparators"])) : y("", !0)
187
+ ])) : y("", !0)
188
+ ])
189
+ ])
190
+ ];
191
+ }),
192
+ _: 2
193
+ }, 1024),
194
+ n(k, {
195
+ number: "",
196
+ class: "text-right tabular-nums"
197
+ }, {
198
+ default: i(() => [
199
+ v(d(r(g)), 1)
200
+ ]),
201
+ _: 2
202
+ }, 1024),
203
+ n(k, { class: "text-right tabular-nums" }, {
204
+ default: i(() => {
205
+ var T, I;
206
+ return [
207
+ (T = g.details.band) != null && T.amount ? (t(), _(w, {
208
+ key: 0,
209
+ value: g.details.band.amount
210
+ }, null, 8, ["value"])) : (I = g.details.band) != null && I.percentage ? (t(), l(x, { key: 1 }, [
211
+ v(d(g.details.band.percentage) + "% ", 1)
212
+ ], 64)) : (t(), l(x, { key: 2 }, [
213
+ v(" N/A ")
214
+ ], 64))
215
+ ];
216
+ }),
217
+ _: 2
218
+ }, 1024),
219
+ e.showTaxPerLineItem ? (t(), _(k, { key: 0 }, {
220
+ default: i(() => [...b[0] || (b[0] = [
221
+ v(" ", -1)
222
+ ])]),
223
+ _: 1
224
+ })) : y("", !0),
225
+ g.details.amount ? (t(), _(k, {
226
+ key: 1,
227
+ class: "text-right tabular-nums"
228
+ }, {
229
+ default: i(() => [
230
+ n(w, {
231
+ value: g.details.amount,
232
+ "data-testid": o(dt)
233
+ }, null, 8, ["value", "data-testid"])
234
+ ]),
235
+ _: 2
236
+ }, 1024)) : y("", !0)
237
+ ], 2))
238
+ ], 64))), 128)) : y("", !0);
239
+ }
240
+ }), ht = ["tabindex", "onClick"], _t = { class: "flex items-center" }, kt = /* @__PURE__ */ L({
241
+ __name: "InvoiceCommitment",
242
+ props: {
243
+ commitments: {},
244
+ groupOrder: {},
245
+ invoicePeriodOrder: {},
246
+ amountType: {},
247
+ processingOnlyCustomers: {},
248
+ displayInvoiceSubLinesPerProcessingOnlyCustomer: { type: Boolean }
249
+ },
250
+ setup(e) {
251
+ const a = W(), { getIsOpen: u, toggle: c } = se(), m = (f, b) => {
252
+ c(s(f, b));
253
+ }, s = (f, b) => `${f}-line-${b}`, r = (f) => {
254
+ var b;
255
+ return f.description ?? ((b = f.details) == null ? void 0 : b.description) ?? a.$t({
256
+ id: "generic.not_available",
257
+ defaultMessage: "N/A",
258
+ description: "Used in scenarios where no data is available to be displayed"
259
+ });
260
+ };
261
+ return (f, b) => (t(), _(G, null, {
262
+ default: i(() => [
263
+ h("tr", null, [
264
+ n(M, {
265
+ left: "",
266
+ colspan: "5"
267
+ }, {
268
+ default: i(() => [
269
+ v(d(o(a).$t({
270
+ id: "invoice.table_header.unit",
271
+ defaultMessage: "Unit",
272
+ description: "Table header for the column containing the number of units of invoice groups"
273
+ })), 1)
274
+ ]),
275
+ _: 1
276
+ }),
277
+ n(M, {
278
+ right: "",
279
+ class: "w-60"
280
+ }, {
281
+ default: i(() => [
282
+ v(d(o(a).$t({
283
+ id: "invoice.table_header.sub_total",
284
+ defaultMessage: "Subtotal",
285
+ description: "Table header for the column containing the subtotal for invoices"
286
+ })), 1)
287
+ ]),
288
+ _: 1
289
+ })
290
+ ]),
291
+ (t(!0), l(x, null, R(e.commitments, (g, p) => (t(), l(x, { key: p }, [
292
+ h("tr", {
293
+ class: N(["border-t", { "cursor-pointer": g.sub_lines }]),
294
+ tabindex: g.sub_lines ? 0 : void 0,
295
+ onClick: (T) => m(e.groupOrder, g.line_order)
296
+ }, [
297
+ n(k, { colspan: "2" }, {
298
+ default: i(() => {
299
+ var T;
300
+ return [
301
+ g.sub_lines ? (t(), _(j, {
302
+ key: 0,
303
+ icon: "keyboard_arrow_down",
304
+ size: "md",
305
+ class: N(["absolute -translate-x-7 text-slate-400", {
306
+ "-rotate-90": !o(u)(s(e.groupOrder, g.line_order))
307
+ }])
308
+ }, null, 8, ["class"])) : y("", !0),
309
+ h("div", _t, [
310
+ $(f.$slots, "invoice-line-prefix", {
311
+ lineOrder: g.line_order,
312
+ periodOrder: e.invoicePeriodOrder,
313
+ groupOrder: e.groupOrder
314
+ }),
315
+ n(Ce, {
316
+ "clause-type": "COMMITMENT",
317
+ "invoice-line-description": r(g),
318
+ "price-details-band": (T = g.details) == null ? void 0 : T.band
319
+ }, null, 8, ["invoice-line-description", "price-details-band"])
320
+ ])
321
+ ];
322
+ }),
323
+ _: 2
324
+ }, 1024),
325
+ n(k, { colspan: "3" }, {
326
+ default: i(() => [...b[0] || (b[0] = [
327
+ v(" ", -1)
328
+ ])]),
329
+ _: 1
330
+ }),
331
+ n(k, { number: "" }, {
332
+ default: i(() => {
333
+ var T;
334
+ return [
335
+ (T = g.details) != null && T.amount ? (t(), _(w, {
336
+ key: 0,
337
+ value: e.amountType === "INCLUDING_TAX" ? g.amount_including_tax : g.amount_excluding_tax,
338
+ "data-testid": o(re)
339
+ }, null, 8, ["value", "data-testid"])) : y("", !0)
340
+ ];
341
+ }),
342
+ _: 2
343
+ }, 1024)
344
+ ], 10, ht),
345
+ n(be, {
346
+ ref_for: !0,
347
+ ref: s(e.groupOrder, g.line_order),
348
+ "sub-lines": g.sub_lines ?? [],
349
+ "line-order": g.line_order,
350
+ "period-order": e.invoicePeriodOrder,
351
+ "group-order": e.groupOrder,
352
+ "is-open": o(u)(s(e.groupOrder, g.line_order)),
353
+ "processing-only-customers": e.processingOnlyCustomers,
354
+ "display-invoice-sub-lines-per-processing-only-customer": e.displayInvoiceSubLinesPerProcessingOnlyCustomer
355
+ }, null, 8, ["sub-lines", "line-order", "period-order", "group-order", "is-open", "processing-only-customers", "display-invoice-sub-lines-per-processing-only-customer"])
356
+ ], 64))), 128))
357
+ ]),
358
+ _: 3
359
+ }));
360
+ }
361
+ }), Tt = ["tabindex", "onClick"], Ot = { class: "flex items-center" }, It = /* @__PURE__ */ L({
362
+ __name: "InvoiceDiscountMarkup",
363
+ props: {
364
+ lines: {},
365
+ type: {},
366
+ handleToggleItems: { type: Function },
367
+ formatIndex: { type: Function },
368
+ expandedItems: {},
369
+ isExpandable: { type: Boolean },
370
+ invoicePeriodOrder: {},
371
+ groupOrder: {},
372
+ amountType: {},
373
+ processingOnlyCustomers: {},
374
+ displayInvoiceSubLinesPerProcessingOnlyCustomer: { type: Boolean }
375
+ },
376
+ setup(e) {
377
+ const a = W(), { getIsOpen: u, toggle: c } = se(), m = (r, f) => {
378
+ c(s(r, f));
379
+ }, s = (r, f) => `${r}-line-${f}`;
380
+ return (r, f) => (t(), _(G, null, {
381
+ default: i(() => [
382
+ h("tr", null, [
383
+ n(M, {
384
+ left: "",
385
+ class: "w-3/5"
386
+ }, {
387
+ default: i(() => [
388
+ v(d(o(a).$t({
389
+ id: "invoice.table_header.quantity",
390
+ defaultMessage: "Quantity",
391
+ description: "Table header for quantity column"
392
+ })), 1)
393
+ ]),
394
+ _: 1
395
+ }),
396
+ n(M, { colspan: "2" }, {
397
+ default: i(() => [...f[0] || (f[0] = [
398
+ v(" ", -1)
399
+ ])]),
400
+ _: 1
401
+ }),
402
+ n(M, {
403
+ left: "",
404
+ class: "w-1/5"
405
+ }, {
406
+ default: i(() => [
407
+ v(d(e.type === "DISCOUNT" ? o(a).$t({
408
+ id: "invoice.table_header.discount",
409
+ defaultMessage: "Discount",
410
+ description: "Table header for discount column"
411
+ }) : o(a).$t({
412
+ id: "invoice.table_header.markup",
413
+ defaultMessage: "Markup",
414
+ description: "Table header for markup column"
415
+ })), 1)
416
+ ]),
417
+ _: 1
418
+ }),
419
+ n(M, {
420
+ left: "",
421
+ class: "w-1/5"
422
+ }, {
423
+ default: i(() => [
424
+ v(d(e.type === "DISCOUNT" ? o(a).$t({
425
+ id: "invoice.table_header.total",
426
+ defaultMessage: "Total",
427
+ description: "Table header for total column"
428
+ }) : " "), 1)
429
+ ]),
430
+ _: 1
431
+ }),
432
+ n(M, {
433
+ right: "",
434
+ class: "w-1/5"
435
+ }, {
436
+ default: i(() => [
437
+ v(d(o(a).$t({
438
+ id: "invoice.table_header.sub_total",
439
+ defaultMessage: "Subtotal",
440
+ description: "Table header for the column containing the subtotal for invoices"
441
+ })), 1)
442
+ ]),
443
+ _: 1
444
+ })
445
+ ]),
446
+ (t(!0), l(x, null, R(e.lines, (b, g) => (t(), l(x, { key: g }, [
447
+ h("tr", {
448
+ class: N(["border-t", { "cursor-pointer": e.isExpandable }]),
449
+ tabindex: e.isExpandable ? 0 : void 0,
450
+ onClick: (p) => m(e.groupOrder, b.line_order)
451
+ }, [
452
+ n(k, { class: "w-3/5" }, {
453
+ default: i(() => {
454
+ var p, T;
455
+ return [
456
+ b.sub_lines ? (t(), _(j, {
457
+ key: 0,
458
+ icon: "keyboard_arrow_down",
459
+ size: "md",
460
+ class: N(["absolute -translate-x-7 text-slate-400", {
461
+ "-rotate-90": !o(u)(s(e.groupOrder, b.line_order))
462
+ }])
463
+ }, null, 8, ["class"])) : y("", !0),
464
+ h("div", Ot, [
465
+ $(r.$slots, "invoice-line-prefix", {
466
+ lineOrder: b.line_order,
467
+ periodOrder: e.invoicePeriodOrder,
468
+ groupOrder: e.groupOrder
469
+ }),
470
+ b.description ? (t(), l(x, { key: 0 }, [
471
+ v(d(b.description), 1)
472
+ ], 64)) : (p = b.details) != null && p.description ? (t(), l(x, { key: 1 }, [
473
+ v(d((T = b.details) == null ? void 0 : T.description), 1)
474
+ ], 64)) : (t(), l(x, { key: 2 }, [
475
+ v("N/A")
476
+ ], 64))
477
+ ])
478
+ ];
479
+ }),
480
+ _: 2
481
+ }, 1024),
482
+ n(k, { colspan: "2" }, {
483
+ default: i(() => [...f[1] || (f[1] = [
484
+ v(" ", -1)
485
+ ])]),
486
+ _: 1
487
+ }),
488
+ n(k, { class: "w-1/5 tabular-nums" }, {
489
+ default: i(() => {
490
+ var p, T, I;
491
+ return [
492
+ v(d((T = (p = b.details) == null ? void 0 : p.band) != null && T.percentage ? `${(I = b.details) == null ? void 0 : I.band.percentage}%` : " "), 1)
493
+ ];
494
+ }),
495
+ _: 2
496
+ }, 1024),
497
+ n(k, { class: "w-1/5" }, {
498
+ default: i(() => [...f[2] || (f[2] = [
499
+ v(" ", -1)
500
+ ])]),
501
+ _: 1
502
+ }),
503
+ n(k, {
504
+ number: "",
505
+ class: "w-1/5"
506
+ }, {
507
+ default: i(() => {
508
+ var p;
509
+ return [
510
+ (p = b.details) != null && p.amount ? (t(), _(w, {
511
+ key: 0,
512
+ value: e.amountType === "INCLUDING_TAX" ? b.amount_including_tax : b.amount_excluding_tax,
513
+ "data-testid": o(re)
514
+ }, null, 8, ["value", "data-testid"])) : y("", !0)
515
+ ];
516
+ }),
517
+ _: 2
518
+ }, 1024)
519
+ ], 10, Tt),
520
+ n(be, {
521
+ ref_for: !0,
522
+ ref: s(e.groupOrder, b.line_order),
523
+ "sub-lines": b.sub_lines ?? [],
524
+ "line-order": b.line_order,
525
+ "is-open": o(u)(s(e.groupOrder, b.line_order)),
526
+ "period-order": e.invoicePeriodOrder,
527
+ "group-order": e.groupOrder,
528
+ "processing-only-customers": e.processingOnlyCustomers,
529
+ "display-invoice-sub-lines-per-processing-only-customer": e.displayInvoiceSubLinesPerProcessingOnlyCustomer
530
+ }, null, 8, ["sub-lines", "line-order", "is-open", "period-order", "group-order", "processing-only-customers", "display-invoice-sub-lines-per-processing-only-customer"])
531
+ ], 64))), 128))
532
+ ]),
533
+ _: 3
534
+ }));
535
+ }
536
+ }), ae = (e) => {
537
+ var a;
538
+ return (a = e.lines) != null && a.some((u) => !!u.sub_lines) ? bt : void 0;
539
+ }, wt = ["tabindex"], $t = { key: 0 }, Mt = {
540
+ colspan: "2",
541
+ class: "p-0"
542
+ }, Et = { class: "-mx-9 bg-gray-50 px-9 py-3 text-xs" }, Ct = /* @__PURE__ */ L({
543
+ __name: "InvoiceGroupCommitment",
544
+ props: {
545
+ group: {},
546
+ expandedItems: {},
547
+ handleToggleItems: { type: Function },
548
+ formatIndex: { type: Function },
549
+ invoicePeriodOrder: {},
550
+ groupOrder: {},
551
+ isExpandable: { type: Boolean },
552
+ forceExpanded: { type: Boolean },
553
+ amountType: {},
554
+ processingOnlyCustomers: {},
555
+ displayInvoiceSubLinesPerProcessingOnlyCustomer: { type: Boolean },
556
+ showTaxPerLineItem: { type: Boolean }
557
+ },
558
+ setup(e) {
559
+ const a = W();
560
+ return (u, c) => (t(), l(x, null, [
561
+ h("tr", {
562
+ class: N(["break-inside-avoid border-t", { "cursor-pointer": e.isExpandable }]),
563
+ tabindex: e.isExpandable ? 0 : void 0,
564
+ onClick: c[0] || (c[0] = (m) => e.handleToggleItems(e.formatIndex(e.invoicePeriodOrder, e.groupOrder))),
565
+ onKeyup: [
566
+ c[1] || (c[1] = Y((m) => e.handleToggleItems(e.formatIndex(e.invoicePeriodOrder, e.groupOrder)), ["enter"])),
567
+ c[2] || (c[2] = Y((m) => e.handleToggleItems(e.formatIndex(e.invoicePeriodOrder, e.groupOrder)), ["space"]))
568
+ ]
569
+ }, [
570
+ n(k, { class: "p-0" }, {
571
+ default: i(() => [
572
+ e.isExpandable ? (t(), _(j, {
573
+ key: 0,
574
+ icon: "keyboard_arrow_down",
575
+ size: "md",
576
+ class: N(["absolute -translate-x-7 text-slate-400", {
577
+ "-rotate-90": !e.expandedItems.includes(
578
+ e.formatIndex(e.invoicePeriodOrder, e.groupOrder)
579
+ )
580
+ }])
581
+ }, null, 8, ["class"])) : y("", !0),
582
+ v(" " + d(o(a).$t({
583
+ id: "invoice.commitment_heading",
584
+ defaultMessage: "Commitment",
585
+ description: "Heading used for commitment in invoice tables"
586
+ })), 1)
587
+ ]),
588
+ _: 1
589
+ }),
590
+ n(k, { number: "" }, {
591
+ default: i(() => [
592
+ e.amountType === "INCLUDING_TAX" ? (t(), _(w, {
593
+ key: 0,
594
+ value: e.group.amount_including_tax,
595
+ "data-testid": o(ie),
596
+ "data-type": o(ae)(e.group)
597
+ }, null, 8, ["value", "data-testid", "data-type"])) : (t(), _(w, {
598
+ key: 1,
599
+ value: e.group.amount_excluding_tax,
600
+ "data-testid": o(ie),
601
+ "data-type": o(ae)(e.group)
602
+ }, null, 8, ["value", "data-testid", "data-type"]))
603
+ ]),
604
+ _: 1
605
+ })
606
+ ], 42, wt),
607
+ (e.forceExpanded || e.expandedItems.includes(e.formatIndex(e.invoicePeriodOrder, e.groupOrder))) && e.group.lines ? (t(), l("tr", $t, [
608
+ h("td", Mt, [
609
+ h("div", Et, [
610
+ n(kt, {
611
+ commitments: e.group.lines,
612
+ "format-index": e.formatIndex,
613
+ "handle-toggle-items": e.handleToggleItems,
614
+ "expanded-items": e.expandedItems,
615
+ "is-expandable": e.isExpandable,
616
+ "invoice-period-order": e.invoicePeriodOrder,
617
+ "group-order": e.groupOrder,
618
+ "amount-type": e.amountType,
619
+ "processing-only-customers": e.processingOnlyCustomers,
620
+ "display-invoice-sub-lines-per-processing-only-customer": e.displayInvoiceSubLinesPerProcessingOnlyCustomer
621
+ }, {
622
+ "invoice-line-prefix": i((m) => [
623
+ $(u.$slots, "invoice-line-prefix", fe(ve(m)))
624
+ ]),
625
+ _: 3
626
+ }, 8, ["commitments", "format-index", "handle-toggle-items", "expanded-items", "is-expandable", "invoice-period-order", "group-order", "amount-type", "processing-only-customers", "display-invoice-sub-lines-per-processing-only-customer"])
627
+ ])
628
+ ])
629
+ ])) : y("", !0)
630
+ ], 64));
631
+ }
632
+ }), Nt = ["tabindex"], Bt = { key: 0 }, At = {
633
+ colspan: "2",
634
+ class: "p-0"
635
+ }, Pt = { class: "-mx-9 bg-gray-50 px-9 py-3 text-xs" }, St = /* @__PURE__ */ L({
636
+ __name: "InvoiceGroupDiscountMarkup",
637
+ props: {
638
+ heading: {},
639
+ group: {},
640
+ expandedItems: {},
641
+ handleToggleItems: { type: Function },
642
+ formatIndex: { type: Function },
643
+ invoicePeriodOrder: {},
644
+ groupOrder: {},
645
+ isExpandable: { type: Boolean },
646
+ forceExpanded: { type: Boolean },
647
+ amountType: {},
648
+ processingOnlyCustomers: {},
649
+ displayInvoiceSubLinesPerProcessingOnlyCustomer: { type: Boolean },
650
+ showTaxPerLineItem: { type: Boolean }
651
+ },
652
+ setup(e) {
653
+ return (a, u) => (t(), l(x, null, [
654
+ h("tr", {
655
+ class: N(["break-inside-avoid border-t", { "cursor-pointer": e.isExpandable }]),
656
+ tabindex: e.isExpandable ? 0 : void 0,
657
+ onClick: u[0] || (u[0] = (c) => e.handleToggleItems(e.formatIndex(e.invoicePeriodOrder, e.groupOrder))),
658
+ onKeyup: [
659
+ u[1] || (u[1] = Y((c) => e.handleToggleItems(e.formatIndex(e.invoicePeriodOrder, e.groupOrder)), ["enter"])),
660
+ u[2] || (u[2] = Y((c) => e.handleToggleItems(e.formatIndex(e.invoicePeriodOrder, e.groupOrder)), ["space"]))
661
+ ]
662
+ }, [
663
+ n(k, { class: "p-0" }, {
664
+ default: i(() => [
665
+ e.isExpandable ? (t(), _(j, {
666
+ key: 0,
667
+ icon: "keyboard_arrow_down",
668
+ size: "md",
669
+ class: N(["absolute -translate-x-7 text-slate-400", {
670
+ "-rotate-90": !e.expandedItems.includes(
671
+ e.formatIndex(e.invoicePeriodOrder, e.groupOrder)
672
+ )
673
+ }])
674
+ }, null, 8, ["class"])) : y("", !0),
675
+ v(" " + d(e.heading), 1)
676
+ ]),
677
+ _: 1
678
+ }),
679
+ n(k, { number: "" }, {
680
+ default: i(() => [
681
+ e.amountType === "INCLUDING_TAX" ? (t(), _(w, {
682
+ key: 0,
683
+ value: e.group.amount_including_tax,
684
+ "data-testid": o(ie),
685
+ "data-type": o(ae)(e.group)
686
+ }, null, 8, ["value", "data-testid", "data-type"])) : (t(), _(w, {
687
+ key: 1,
688
+ value: e.group.amount_excluding_tax,
689
+ "data-testid": o(ie),
690
+ "data-type": o(ae)(e.group)
691
+ }, null, 8, ["value", "data-testid", "data-type"]))
692
+ ]),
693
+ _: 1
694
+ })
695
+ ], 42, Nt),
696
+ (e.forceExpanded || e.expandedItems.includes(e.formatIndex(e.invoicePeriodOrder, e.groupOrder))) && e.group.lines ? (t(), l("tr", Bt, [
697
+ h("td", At, [
698
+ h("div", Pt, [
699
+ n(It, {
700
+ type: e.group.type,
701
+ lines: e.group.lines,
702
+ "format-index": e.formatIndex,
703
+ "handle-toggle-items": e.handleToggleItems,
704
+ "expanded-items": e.expandedItems,
705
+ "is-expandable": e.isExpandable,
706
+ "invoice-period-order": e.invoicePeriodOrder,
707
+ "group-order": e.groupOrder,
708
+ "amount-type": e.amountType,
709
+ "processing-only-customers": e.processingOnlyCustomers,
710
+ "display-invoice-sub-lines-per-processing-only-customer": e.displayInvoiceSubLinesPerProcessingOnlyCustomer
711
+ }, {
712
+ "invoice-line-prefix": i((c) => [
713
+ $(a.$slots, "invoice-line-prefix", fe(ve(c)))
714
+ ]),
715
+ _: 3
716
+ }, 8, ["type", "lines", "format-index", "handle-toggle-items", "expanded-items", "is-expandable", "invoice-period-order", "group-order", "amount-type", "processing-only-customers", "display-invoice-sub-lines-per-processing-only-customer"])
717
+ ])
718
+ ])
719
+ ])) : y("", !0)
720
+ ], 64));
721
+ }
722
+ }), Lt = (e, a) => {
723
+ if (a)
724
+ return e.forwarded_from_customer_id;
725
+ }, Ut = (e) => {
726
+ let a = { kind: "default" }, u = { kind: "default" };
727
+ if (e.tier_lower_bound && "number" in e.tier_lower_bound)
728
+ a = { kind: "number", value: +e.tier_lower_bound.number };
729
+ else if (e.tier_lower_bound && "amount" in e.tier_lower_bound) {
730
+ const { quantity: c, currency: m } = e.tier_lower_bound.amount;
731
+ a = { kind: "amount", currency: m, quantity: c ?? 0 };
732
+ }
733
+ if (e.tier_top_bound && "number" in e.tier_top_bound)
734
+ u = { kind: "number", value: +e.tier_top_bound.number };
735
+ else if (e.tier_top_bound && "amount" in e.tier_top_bound) {
736
+ const { quantity: c, currency: m } = e.tier_top_bound.amount;
737
+ u = { kind: "amount", currency: m, quantity: c };
738
+ }
739
+ return { lowerBound: a, topBound: u };
740
+ }, Dt = (e) => {
741
+ var a, u, c, m;
742
+ switch (e == null ? void 0 : e.price_bound) {
743
+ case "BELOW_MINIMUM_AMOUNT":
744
+ return { kind: "band_minimum_amount", amount: (a = e.band) == null ? void 0 : a.minimum_amount };
745
+ case "NOT_HIT":
746
+ return { kind: "price_bound_within_bounds" };
747
+ case "ABOVE_MAXIMUM_AMOUNT":
748
+ return { kind: "price_bound_maximum_amount", amount: (u = e.band) == null ? void 0 : u.maximum_amount };
749
+ case "BELOW_MINIMUM_NUMBER":
750
+ return { kind: "band_minimum_number", value: (c = e.band) == null ? void 0 : c.minimum_number };
751
+ case "ABOVE_MAXIMUM_NUMBER":
752
+ return { kind: "band_maximum_number", value: (m = e.band) == null ? void 0 : m.maximum_number };
753
+ default:
754
+ return { kind: "none" };
755
+ }
756
+ }, Rt = { class: "items-left flex flex-col gap-1 leading-none" }, Ft = { class: "flex items-center" }, zt = {
757
+ key: 0,
758
+ class: "ml-1 text-xs text-secondary"
759
+ }, Wt = { key: 0 }, Vt = {
760
+ key: 1,
761
+ class: "text-xs text-secondary"
762
+ }, Ht = {
763
+ key: 2,
764
+ class: "text-xs text-secondary"
765
+ }, jt = { class: "text-[9pt] text-secondary" }, Gt = /* @__PURE__ */ L({
766
+ __name: "InvoiceLineRow",
767
+ props: {
768
+ data: {},
769
+ isLast: { type: Boolean },
770
+ periodOrder: {},
771
+ groupOrder: {},
772
+ groupType: {},
773
+ isExpanded: { type: Boolean }
774
+ },
775
+ setup(e) {
776
+ const { $t: a, formatNumber: u } = W(), c = e, m = (g) => {
777
+ if (g.kind !== "default")
778
+ return g.kind === "number" ? u(g.value) : `${g.currency} ${g.quantity}`;
779
+ }, s = (g) => {
780
+ if (!g) return "";
781
+ const { lowerBound: p, topBound: T } = Ut(g), I = m(T);
782
+ return (m(p) ?? "0") + (I ? ` - ${I}` : "+");
783
+ }, r = P(() => {
784
+ var g;
785
+ return (g = c.data.details) == null ? void 0 : g.included_volume_details;
786
+ }), f = P(() => Dt(c.data.details)), b = P(() => {
787
+ var g, p;
788
+ return (g = c.data) != null && g.product_items ? ge(c.data.product_items.map((T) => T.name)) : ((p = c.data) == null ? void 0 : p.description) ?? "N/A";
789
+ });
790
+ return (g, p) => (t(), l(x, null, [
791
+ n(k, { class: "align-top" }, {
792
+ default: i(() => {
793
+ var T, I, S, E, C, B, V, A, H;
794
+ return [
795
+ h("div", Rt, [
796
+ h("div", null, [
797
+ e.data.sub_lines ? (t(), _(j, {
798
+ key: 0,
799
+ icon: "keyboard_arrow_down",
800
+ size: "md",
801
+ class: N(["absolute -translate-x-7 -translate-y-2 text-slate-400", {
802
+ "-rotate-90": !e.isExpanded
803
+ }])
804
+ }, null, 8, ["class"])) : y("", !0),
805
+ h("div", Ft, [
806
+ $(g.$slots, "invoice-line-prefix", {
807
+ lineOrder: e.data.line_order,
808
+ periodOrder: e.periodOrder,
809
+ groupOrder: e.groupOrder
810
+ }),
811
+ ["PRICING", "REVENUE", "ONE_OFF"].includes(e.data.type) ? (t(), l(x, { key: 0 }, [
812
+ v(d(b.value) + " ", 1),
813
+ e.data.type === "ONE_OFF" && e.groupType !== "ONE_OFF" ? (t(), l("div", zt, d(o(Ye)(e.data.type)), 1)) : y("", !0)
814
+ ], 64)) : (t(), _(Ce, {
815
+ key: 1,
816
+ "invoice-line-description": b.value,
817
+ "clause-type": e.data.type,
818
+ "price-details-band": (T = e.data.details) == null ? void 0 : T.band
819
+ }, null, 8, ["invoice-line-description", "clause-type", "price-details-band"]))
820
+ ])
821
+ ]),
822
+ ["TIERED", "STAIR_STEP", "TOP_TIERED"].includes(e.data.pricing_type) && !r.value && ((I = e.data.details) != null && I.band) ? (t(), l("div", Wt, d(s((S = e.data.details) == null ? void 0 : S.band)), 1)) : y("", !0),
823
+ (C = (E = e.data.details) == null ? void 0 : E.split_pricing) != null && C.meter_properties ? (t(), l("span", Vt, [
824
+ (t(!0), l(x, null, R((V = (B = e.data.details) == null ? void 0 : B.split_pricing) == null ? void 0 : V.meter_properties, (X, q) => (t(), l(x, null, [
825
+ v(d(X.meter_property.name) + ": " + d(X.value), 1),
826
+ q < e.data.details.split_pricing.meter_properties.length - 1 ? (t(), l(x, { key: 0 }, [
827
+ v(d(", "))
828
+ ], 64)) : y("", !0)
829
+ ], 64))), 256))
830
+ ])) : y("", !0),
831
+ (A = e.data.conditions) != null && A.name || (H = e.data.conditions) != null && H.meter_properties ? (t(), l("div", Ht, [
832
+ e.data.conditions.name ? (t(), l(x, { key: 0 }, [
833
+ v(d(e.data.conditions.name), 1)
834
+ ], 64)) : e.data.conditions.meter_properties ? (t(), _(o(Ee), {
835
+ key: 1,
836
+ comparators: e.data.conditions.meter_properties
837
+ }, null, 8, ["comparators"])) : y("", !0)
838
+ ])) : y("", !0)
839
+ ]),
840
+ h("span", jt, [
841
+ f.value.kind === "band_minimum_amount" ? (t(), l(x, { key: 0 }, [
842
+ v(d(o(a)({
843
+ id: "invoice.line.band_minimum_amount",
844
+ defaultMessage: "Band minimum amount",
845
+ description: "Minimum amount specified in a band"
846
+ })) + " ", 1),
847
+ f.value.amount ? (t(), _(w, {
848
+ key: 0,
849
+ value: f.value.amount
850
+ }, null, 8, ["value"])) : y("", !0)
851
+ ], 64)) : f.value.kind === "price_bound_within_bounds" ? (t(), l(x, { key: 1 }, [
852
+ v(d(o(a)({
853
+ id: "invoice.line.price_bound_within_bounds",
854
+ defaultMessage: "Within bounds",
855
+ description: "Label used when min and max bounds are specified but reached"
856
+ })), 1)
857
+ ], 64)) : f.value.kind === "price_bound_maximum_amount" ? (t(), l(x, { key: 2 }, [
858
+ v(d(o(a)({
859
+ id: "invoice.line.price_bound_maximum_amount",
860
+ defaultMessage: "Maximum amount",
861
+ description: "Maximum amount specified in a band"
862
+ })) + " ", 1),
863
+ f.value.amount ? (t(), _(w, {
864
+ key: 0,
865
+ value: f.value.amount
866
+ }, null, 8, ["value"])) : y("", !0)
867
+ ], 64)) : f.value.kind === "band_minimum_number" ? (t(), l(x, { key: 3 }, [
868
+ v(d(o(a)({
869
+ id: "invoice.line.band_minimum_number",
870
+ defaultMessage: "Minimum number",
871
+ description: "Minimum number of units specified in a band"
872
+ })) + " " + d(f.value.value), 1)
873
+ ], 64)) : f.value.kind === "band_maximum_number" ? (t(), l(x, { key: 4 }, [
874
+ v(d(o(a)({
875
+ id: "invoice.line.band_maximum_number",
876
+ defaultMessage: "Maximum number",
877
+ description: "Maximum number of units specified in a band"
878
+ })) + " " + d(f.value.value), 1)
879
+ ], 64)) : y("", !0)
880
+ ])
881
+ ];
882
+ }),
883
+ _: 3
884
+ }),
885
+ $(g.$slots, "line-content", {
886
+ details: e.data.details
887
+ })
888
+ ], 64));
889
+ }
890
+ }), Xt = (e, a, u) => {
891
+ var c, m;
892
+ if (e === "PASS_THROUGH") return { kind: "hidden" };
893
+ if (u && ((m = (c = a == null ? void 0 : a.conversion) == null ? void 0 : c.credits) != null && m.quantity))
894
+ return { kind: "conversion-credits", value: a.conversion.credits.quantity };
895
+ if (a != null && a.price_bound) {
896
+ const { price_bound: s, meter_value: r, band: f } = a;
897
+ return s === "BELOW_MINIMUM_AMOUNT" || s === "ABOVE_MAXIMUM_AMOUNT" ? { kind: "raw", value: r.count } : s === "NOT_HIT" && "amount" in r && r.amount ? { kind: "amount", amount: r.amount } : s === "NOT_HIT" && "number" in r && r.number ? { kind: "raw", value: r.number } : s === "RATIO" && r.number ? { kind: "number", value: +r.number } : s === "BELOW_MINIMUM_NUMBER" && (f != null && f.minimum_number) ? { kind: "number", value: +f.minimum_number } : s === "ABOVE_MAXIMUM_NUMBER" && (f != null && f.maximum_number) ? { kind: "number", value: +f.maximum_number } : { kind: "hidden" };
898
+ }
899
+ return a != null && a.meter_value && "number" in a.meter_value ? { kind: "number", value: +a.meter_value.number } : a != null && a.meter_value && "amount" in a.meter_value ? { kind: "amount", amount: a.meter_value.amount } : { kind: "one" };
900
+ }, qt = ["NOT_HIT", "BELOW_MINIMUM_NUMBER", "ABOVE_MAXIMUM_NUMBER"], Yt = (e, a, u) => {
901
+ if (e === "PASS_THROUGH") return { kind: "pass-through" };
902
+ if (a != null && a.price_bound) {
903
+ const { price_bound: s, band: r, amount: f } = a;
904
+ if (s === "BELOW_MINIMUM_AMOUNT" && (r != null && r.minimum_amount))
905
+ return { kind: "amount", amount: r.minimum_amount };
906
+ if (s === "ABOVE_MAXIMUM_AMOUNT" && (r != null && r.maximum_amount))
907
+ return { kind: "amount", amount: r.maximum_amount };
908
+ if (s === "RATIO")
909
+ return { kind: "amount", amount: (u === "PER_SEAT" ? r == null ? void 0 : r.amount : void 0) ?? f, suffix: { kind: "tier-top-bound" } };
910
+ if (qt.includes(s)) {
911
+ if (r && r.amount)
912
+ return { kind: "amount", amount: r.amount };
913
+ if (r && "percentage" in r)
914
+ return { kind: "percentage", value: r.percentage };
915
+ if (r && f)
916
+ return { kind: "amount", amount: f, suffix: { kind: "fixed-amount" } };
917
+ }
918
+ return { kind: "hidden" };
919
+ }
920
+ const c = a == null ? void 0 : a.band, m = a == null ? void 0 : a.amount;
921
+ return c && c.amount ? { kind: "amount", amount: c.amount, suffix: { kind: "block-size-or-per-unit" } } : c && "percentage" in c ? { kind: "percentage", value: c.percentage } : c && m ? e === "STAIR_STEP" || e === "STAIR_STEP_TOP_UP" ? { kind: "amount", amount: m, suffix: { kind: "fixed-amount" } } : e === "TOP_TIERED" ? { kind: "amount", amount: m, suffix: { kind: "per-unit" } } : e === "FLAT" ? { kind: "amount", amount: m, suffix: { kind: "flat-fee" } } : { kind: "amount", amount: m } : { kind: "hidden" };
922
+ }, Kt = {
923
+ key: 5,
924
+ class: "text-xs text-secondary"
925
+ }, Qt = {
926
+ key: 1,
927
+ class: "tabular-nums"
928
+ }, Jt = {
929
+ key: 0,
930
+ class: "text-2xs text-secondary"
931
+ }, Zt = {
932
+ key: 1,
933
+ class: "text-2xs text-secondary"
934
+ }, en = {
935
+ key: 0,
936
+ class: "text-2xs text-secondary"
937
+ }, tn = {
938
+ key: 1,
939
+ class: "text-2xs text-secondary"
940
+ }, nn = {
941
+ key: 2,
942
+ class: "text-2xs text-secondary"
943
+ }, an = {
944
+ key: 3,
945
+ class: "text-2xs text-secondary"
946
+ }, on = {
947
+ key: 4,
948
+ class: "text-2xs text-secondary"
949
+ }, ln = { class: "text-2xs text-secondary" }, rn = {
950
+ key: 0,
951
+ class: "flex justify-end"
952
+ }, sn = { class: "flex items-center justify-end gap-1" }, dn = {
953
+ key: 0,
954
+ class: "text-2xs tabular-nums text-secondary"
955
+ }, un = {
956
+ key: 1,
957
+ class: "inline-block"
958
+ }, cn = { class: "flex items-center justify-end gap-1" }, he = /* @__PURE__ */ L({
959
+ __name: "InvoiceRowContent",
960
+ props: {
961
+ pricingType: {},
962
+ details: {},
963
+ amount: {},
964
+ taxCategories: {},
965
+ amountType: {},
966
+ hideTaxDetails: { type: Boolean },
967
+ modelType: {},
968
+ showTaxPerLineItem: { type: Boolean, default: !0 },
969
+ preferConversionCredits: { type: Boolean }
970
+ },
971
+ setup(e) {
972
+ const a = e, u = P(() => {
973
+ var B;
974
+ return (B = a.details) == null ? void 0 : B.included_volume_details;
975
+ }), c = P(
976
+ () => {
977
+ var B;
978
+ return (B = u.value) == null ? void 0 : B.available_included_volume;
979
+ }
980
+ ), m = P(
981
+ () => Xt(a.pricingType, a.details, a.preferConversionCredits)
982
+ ), s = P(
983
+ () => Yt(a.pricingType, a.details, a.modelType)
984
+ ), { $t: r, formatNumber: f } = W(), b = P(
985
+ () => r({
986
+ id: "invoice.line.fixed_amount",
987
+ defaultMessage: "Fixed amount",
988
+ description: "Label shown when a price band charges a fixed amount regardless of usage"
989
+ })
990
+ ), g = P(
991
+ () => r({
992
+ id: "invoice.line.flat_fee",
993
+ defaultMessage: "Flat fee",
994
+ description: "Label shown for a flat, usage-independent fee"
995
+ })
996
+ ), p = P(() => {
997
+ var B, V;
998
+ const A = (V = (B = a.details) == null ? void 0 : B.band) == null ? void 0 : V.tier_top_bound;
999
+ return A && "number" in A ? A.number : void 0;
1000
+ }), T = P(() => {
1001
+ if (p.value !== void 0)
1002
+ return r(
1003
+ {
1004
+ id: "invoice.line.per_units_tier_top_bound",
1005
+ defaultMessage: "per {count, plural, one {unit} other {{formattedCount} units}}",
1006
+ description: "Number of units a tiered price band applies per. Singular form omits the count."
1007
+ },
1008
+ { count: +p.value, formattedCount: p.value }
1009
+ );
1010
+ }), I = P(
1011
+ () => {
1012
+ var B, V;
1013
+ return a.modelType === "PER_SEAT" ? (V = (B = a.details) == null ? void 0 : B.band) == null ? void 0 : V.amount : void 0;
1014
+ }
1015
+ ), S = P(
1016
+ () => a.modelType === "PER_SEAT" ? r({
1017
+ id: "invoice.line.per_seat",
1018
+ defaultMessage: "Per seat",
1019
+ description: "Label shown when a price band applies per single seat"
1020
+ }) : r({
1021
+ id: "invoice.line.per_unit",
1022
+ defaultMessage: "Per unit",
1023
+ description: "Label shown when a price band applies per single unit"
1024
+ })
1025
+ ), E = P(() => {
1026
+ var B, V;
1027
+ const A = (V = (B = a.details) == null ? void 0 : B.band) == null ? void 0 : V.block_size;
1028
+ return A && "number" in A ? A.number : void 0;
1029
+ }), C = P(() => {
1030
+ if (E.value !== void 0)
1031
+ return r(
1032
+ {
1033
+ id: "invoice.line.per_units_block_size",
1034
+ defaultMessage: "Per {count, plural, one {unit} other {{formattedCount} units}}",
1035
+ description: "Number of units a price band block applies per. Singular form omits the count."
1036
+ },
1037
+ {
1038
+ count: +E.value,
1039
+ formattedCount: f(+E.value)
1040
+ }
1041
+ );
1042
+ });
1043
+ return (B, V) => (t(), l(x, null, [
1044
+ n(k, {
1045
+ number: "",
1046
+ class: "align-top"
1047
+ }, {
1048
+ default: i(() => {
1049
+ var A;
1050
+ return [
1051
+ m.value.kind === "raw" ? (t(), l(x, { key: 0 }, [
1052
+ v(d(m.value.value), 1)
1053
+ ], 64)) : m.value.kind === "amount" ? (t(), _(w, {
1054
+ key: 1,
1055
+ value: m.value.amount
1056
+ }, null, 8, ["value"])) : m.value.kind === "number" ? (t(), l(x, { key: 2 }, [
1057
+ v(d(o(f)(m.value.value)), 1)
1058
+ ], 64)) : m.value.kind === "conversion-credits" ? (t(), l(x, { key: 3 }, [
1059
+ v(d(o(f)(+m.value.value, {
1060
+ maximumFractionDigits: o($e)
1061
+ })), 1)
1062
+ ], 64)) : m.value.kind === "one" ? (t(), l(x, { key: 4 }, [
1063
+ v("1")
1064
+ ], 64)) : y("", !0),
1065
+ m.value.kind !== "conversion-credits" && m.value.kind !== "hidden" && !((A = e.details) != null && A.price_bound) && c.value ? (t(), l("div", Kt, [
1066
+ c.value.type === "AMOUNT" ? (t(), l(x, { key: 0 }, [
1067
+ n(w, {
1068
+ value: c.value.amount
1069
+ }, null, 8, ["value"]),
1070
+ v(" " + d(o(r)({
1071
+ id: "invoice.line.included",
1072
+ defaultMessage: "included",
1073
+ description: "Used to specify an included amount. Should be lowercase."
1074
+ })), 1)
1075
+ ], 64)) : c.value.type === "NUMBER" ? (t(), l("span", Qt, d(c.value.number) + " " + d(o(r)({
1076
+ id: "invoice.line.units_included",
1077
+ defaultMessage: "units included",
1078
+ description: "Used to specify an included units. Should be lowercase."
1079
+ })), 1)) : y("", !0)
1080
+ ])) : y("", !0)
1081
+ ];
1082
+ }),
1083
+ _: 1
1084
+ }),
1085
+ s.value.kind === "pass-through" ? (t(), _(k, {
1086
+ key: 0,
1087
+ class: "text-right align-top"
1088
+ }, {
1089
+ default: i(() => [
1090
+ v(d(o(r)({
1091
+ id: "invoice.line.pass_through",
1092
+ defaultMessage: "Pass through",
1093
+ description: "Name of the pass through pricing type"
1094
+ })), 1)
1095
+ ]),
1096
+ _: 1
1097
+ })) : (t(), _(k, {
1098
+ key: 1,
1099
+ number: "",
1100
+ class: "align-top"
1101
+ }, {
1102
+ default: i(() => {
1103
+ var A, H, X, q, Z;
1104
+ return [
1105
+ s.value.kind === "amount" ? (t(), l(x, { key: 0 }, [
1106
+ n(w, {
1107
+ value: s.value.amount
1108
+ }, null, 8, ["value"]),
1109
+ ((A = s.value.suffix) == null ? void 0 : A.kind) === "tier-top-bound" ? (t(), l(x, { key: 0 }, [
1110
+ T.value ? (t(), l("div", Jt, d(T.value), 1)) : I.value ? (t(), l("div", Zt, d(S.value), 1)) : y("", !0)
1111
+ ], 64)) : ((H = s.value.suffix) == null ? void 0 : H.kind) === "block-size-or-per-unit" ? (t(), l(x, { key: 1 }, [
1112
+ C.value ? (t(), l("div", en, d(C.value), 1)) : e.modelType !== "RECURRING" ? (t(), l("div", tn, d(S.value), 1)) : y("", !0)
1113
+ ], 64)) : ((X = s.value.suffix) == null ? void 0 : X.kind) === "per-unit" ? (t(), l("div", nn, d(S.value), 1)) : ((q = s.value.suffix) == null ? void 0 : q.kind) === "fixed-amount" ? (t(), l("div", an, d(b.value), 1)) : ((Z = s.value.suffix) == null ? void 0 : Z.kind) === "flat-fee" ? (t(), l("div", on, d(g.value), 1)) : y("", !0)
1114
+ ], 64)) : s.value.kind === "percentage" ? (t(), l(x, { key: 1 }, [
1115
+ v(d(s.value.value) + "% ", 1)
1116
+ ], 64)) : y("", !0)
1117
+ ];
1118
+ }),
1119
+ _: 1
1120
+ })),
1121
+ e.showTaxPerLineItem ? (t(), _(k, {
1122
+ key: 2,
1123
+ number: "",
1124
+ class: "align-top"
1125
+ }, {
1126
+ default: i(() => [
1127
+ e.hideTaxDetails ? y("", !0) : (t(!0), l(x, { key: 0 }, R(e.taxCategories, (A, H) => (t(), l("div", {
1128
+ key: H,
1129
+ class: "tabular-nums"
1130
+ }, [
1131
+ h("div", null, d(A.percentage) + "%", 1),
1132
+ h("div", ln, [
1133
+ n(w, {
1134
+ value: A.tax_amount
1135
+ }, null, 8, ["value"])
1136
+ ])
1137
+ ]))), 128))
1138
+ ]),
1139
+ _: 1
1140
+ })) : y("", !0),
1141
+ n(k, {
1142
+ number: "",
1143
+ class: "align-top"
1144
+ }, {
1145
+ default: i(() => {
1146
+ var A, H, X, q, Z;
1147
+ return [
1148
+ (H = (A = e.details) == null ? void 0 : A.amount) != null && H.currency && ((q = (X = e.details) == null ? void 0 : X.amount) != null && q.quantity) ? (t(), l("div", rn, [
1149
+ e.showTaxPerLineItem ? (t(!0), l(x, { key: 0 }, R(e.taxCategories, (oe, O) => {
1150
+ var D;
1151
+ return t(), l("div", {
1152
+ key: O,
1153
+ class: "inline-block"
1154
+ }, [
1155
+ h("div", sn, [
1156
+ n(w, {
1157
+ value: e.amount ?? e.details.amount,
1158
+ "data-testid": O === 0 ? o(re) : void 0
1159
+ }, null, 8, ["value", "data-testid"]),
1160
+ ((D = e.details) == null ? void 0 : D.pricing_amount.quantity) !== e.details.amount.quantity ? (t(), _(de, {
1161
+ key: 0,
1162
+ placement: "top-end"
1163
+ }, {
1164
+ tooltip: i(() => [
1165
+ n(ue, null, {
1166
+ default: i(() => [
1167
+ n(ce, null, {
1168
+ default: i(() => [
1169
+ v(d(o(r)({
1170
+ id: "invoice.line.original_currency",
1171
+ defaultMessage: "Original currency",
1172
+ description: "Original currency"
1173
+ })) + " ", 1),
1174
+ n(w, {
1175
+ value: e.details.pricing_amount,
1176
+ class: "font-semibold"
1177
+ }, null, 8, ["value"])
1178
+ ]),
1179
+ _: 1
1180
+ })
1181
+ ]),
1182
+ _: 1
1183
+ })
1184
+ ]),
1185
+ default: i(() => [
1186
+ n(j, {
1187
+ icon: "info",
1188
+ size: "2xs"
1189
+ })
1190
+ ]),
1191
+ _: 1
1192
+ })) : y("", !0)
1193
+ ]),
1194
+ e.hideTaxDetails ? y("", !0) : (t(), l("div", dn, [
1195
+ e.amountType === "INCLUDING_TAX" ? (t(), l(x, { key: 0 }, [
1196
+ v(d(o(r)({
1197
+ id: "invoice.line.excl.tax",
1198
+ defaultMessage: "Excl. tax",
1199
+ description: "Value excludes tax"
1200
+ })) + " ", 1),
1201
+ n(w, {
1202
+ value: oe.base_amount
1203
+ }, null, 8, ["value"])
1204
+ ], 64)) : (t(), l(x, { key: 1 }, [
1205
+ v(d(o(r)({
1206
+ id: "invoice.line.incl.tax",
1207
+ defaultMessage: "Incl. tax",
1208
+ description: "Value includes tax"
1209
+ })) + " ", 1),
1210
+ n(w, {
1211
+ value: oe.total_amount
1212
+ }, null, 8, ["value"])
1213
+ ], 64))
1214
+ ]))
1215
+ ]);
1216
+ }), 128)) : (t(), l("div", un, [
1217
+ h("div", cn, [
1218
+ n(w, {
1219
+ value: e.amount ?? e.details.amount,
1220
+ "data-testid": o(re)
1221
+ }, null, 8, ["value", "data-testid"]),
1222
+ ((Z = e.details) == null ? void 0 : Z.pricing_amount.quantity) !== e.details.amount.quantity ? (t(), _(de, {
1223
+ key: 0,
1224
+ placement: "top-end"
1225
+ }, {
1226
+ tooltip: i(() => [
1227
+ n(ue, null, {
1228
+ default: i(() => [
1229
+ n(ce, null, {
1230
+ default: i(() => [
1231
+ v(d(o(r)({
1232
+ id: "invoice.line.original_currency",
1233
+ defaultMessage: "Original currency",
1234
+ description: "Original currency"
1235
+ })) + " ", 1),
1236
+ n(w, {
1237
+ value: e.details.pricing_amount,
1238
+ class: "font-semibold"
1239
+ }, null, 8, ["value"])
1240
+ ]),
1241
+ _: 1
1242
+ })
1243
+ ]),
1244
+ _: 1
1245
+ })
1246
+ ]),
1247
+ default: i(() => [
1248
+ n(j, {
1249
+ icon: "info",
1250
+ size: "2xs"
1251
+ })
1252
+ ]),
1253
+ _: 1
1254
+ })) : y("", !0)
1255
+ ])
1256
+ ])),
1257
+ $(B.$slots, "one-off-line-context-menu")
1258
+ ])) : (t(), l(x, { key: 1 }, [
1259
+ v("-")
1260
+ ], 64))
1261
+ ];
1262
+ }),
1263
+ _: 3
1264
+ })
1265
+ ], 64));
1266
+ }
1267
+ }), mn = ["DISCOUNT", "MARKUP"], fn = (e) => {
1268
+ const a = [...e].sort((r, f) => r.line_order - f.line_order), u = (r) => mn.includes(r.type), c = (r) => !!r.pricing_item_config_id && a.some(
1269
+ (f) => !u(f) && f.pricing_item_config_id === r.pricing_item_config_id
1270
+ ), m = a.filter((r) => u(r) && c(r)), s = a.filter((r) => !m.includes(r));
1271
+ return m.forEach((r) => {
1272
+ const f = s.findLastIndex(
1273
+ (b) => b.pricing_item_config_id === r.pricing_item_config_id && (!u(b) || m.includes(b))
1274
+ );
1275
+ s.splice(f + 1, 0, r);
1276
+ }), s;
1277
+ }, vn = ["tabindex", "onClick"], Se = /* @__PURE__ */ L({
1278
+ __name: "InvoiceLineGroup",
1279
+ props: {
1280
+ group: {},
1281
+ startDate: {},
1282
+ endDate: {},
1283
+ total: {},
1284
+ amountType: {},
1285
+ invoicePeriodOrder: {},
1286
+ processingOnlyCustomers: {},
1287
+ displayInvoiceSubLinesPerProcessingOnlyCustomer: { type: Boolean },
1288
+ showTaxPerLineItem: { type: Boolean, default: !0 },
1289
+ isExpandable: { type: Boolean, default: !0 }
1290
+ },
1291
+ setup(e) {
1292
+ const a = e, u = P(() => fn(a.group.lines ?? [])), c = W(), { getIsOpen: m, toggle: s } = se(), r = (b, g) => {
1293
+ s(f(b, g));
1294
+ }, f = (b, g) => `${b}-line-${g}`;
1295
+ return (b, g) => (t(), l("div", null, [
1296
+ n(G, null, {
1297
+ default: i(() => [
1298
+ h("tr", null, [
1299
+ n(M, {
1300
+ left: "",
1301
+ class: "w-1/5 text-secondary"
1302
+ }, {
1303
+ default: i(() => [
1304
+ v(d(o(c).$t({
1305
+ id: "invoice.table_header.unit",
1306
+ defaultMessage: "Unit",
1307
+ description: "Table header for the column containing the number of units of invoice groups"
1308
+ })), 1)
1309
+ ]),
1310
+ _: 1
1311
+ }),
1312
+ n(M, {
1313
+ right: "",
1314
+ class: "w-1/5 text-secondary"
1315
+ }, {
1316
+ default: i(() => [
1317
+ v(d(o(c).$t({
1318
+ id: "invoice.table_header.quantity",
1319
+ defaultMessage: "Quantity",
1320
+ description: "Table header for quantity column"
1321
+ })), 1)
1322
+ ]),
1323
+ _: 1
1324
+ }),
1325
+ n(M, {
1326
+ right: "",
1327
+ class: "w-1/5 text-secondary"
1328
+ }, {
1329
+ default: i(() => [
1330
+ v(d(o(c).$t({
1331
+ id: "invoice.table_header.price",
1332
+ defaultMessage: "Price",
1333
+ description: "Table header for the column containing the number of units of invoice groups"
1334
+ })), 1)
1335
+ ]),
1336
+ _: 1
1337
+ }),
1338
+ e.showTaxPerLineItem ? (t(), _(M, {
1339
+ key: 0,
1340
+ right: "",
1341
+ class: "w-1/5 text-secondary"
1342
+ }, {
1343
+ default: i(() => [
1344
+ v(d(o(c).$t({
1345
+ id: "invoice.table_header.tax_rate",
1346
+ defaultMessage: "Tax rate",
1347
+ description: "Table header for the column containing the tax percentage of invoice groups"
1348
+ })), 1)
1349
+ ]),
1350
+ _: 1
1351
+ })) : y("", !0),
1352
+ n(M, {
1353
+ right: "",
1354
+ class: "w-1/5 text-secondary"
1355
+ }, {
1356
+ default: i(() => [
1357
+ v(d(o(c).$t({
1358
+ id: "invoice.table_header.sub_total",
1359
+ defaultMessage: "Subtotal",
1360
+ description: "Table header for the column containing the subtotal for invoices"
1361
+ })), 1)
1362
+ ]),
1363
+ _: 1
1364
+ })
1365
+ ]),
1366
+ (t(!0), l(x, null, R(u.value, (p, T) => (t(), l(x, { key: T }, [
1367
+ h("tr", {
1368
+ tabindex: e.isExpandable && p.sub_lines ? 0 : void 0,
1369
+ class: N(["group", {
1370
+ "cursor-pointer": e.isExpandable && p.sub_lines,
1371
+ "border-t": T !== 0
1372
+ }]),
1373
+ onClick: (I) => r(e.group.group_order, p.line_order)
1374
+ }, [
1375
+ (t(), _(Gt, {
1376
+ key: T,
1377
+ data: p,
1378
+ "period-order": e.invoicePeriodOrder,
1379
+ "group-order": e.group.group_order,
1380
+ "is-last": T === u.value.length - 1,
1381
+ "group-type": e.group.type,
1382
+ "is-expanded": o(m)(f(e.group.group_order, p.line_order))
1383
+ }, {
1384
+ "invoice-line-prefix": i((I) => [
1385
+ $(b.$slots, "invoice-line-prefix", J({ ref_for: !0 }, I))
1386
+ ]),
1387
+ "line-content": i((I) => {
1388
+ var S, E;
1389
+ return [
1390
+ n(he, {
1391
+ details: I.details,
1392
+ amount: e.amountType === "INCLUDING_TAX" ? p.amount_including_tax : p.amount_excluding_tax,
1393
+ "pricing-type": p.pricing_type,
1394
+ "tax-categories": p.tax_categories,
1395
+ "amount-type": e.amountType,
1396
+ "model-type": (E = (S = p.product_items) == null ? void 0 : S[0]) == null ? void 0 : E.model_type,
1397
+ "show-tax-per-line-item": e.showTaxPerLineItem
1398
+ }, Ue({ _: 2 }, [
1399
+ p.type === "ONE_OFF" ? {
1400
+ name: "one-off-line-context-menu",
1401
+ fn: i((C) => [
1402
+ $(b.$slots, "one-off-line-context-menu", J({ ref_for: !0 }, C, {
1403
+ lineOrder: p.line_order
1404
+ }))
1405
+ ]),
1406
+ key: "0"
1407
+ } : void 0
1408
+ ]), 1032, ["details", "amount", "pricing-type", "tax-categories", "amount-type", "model-type", "show-tax-per-line-item"])
1409
+ ];
1410
+ }),
1411
+ _: 2
1412
+ }, 1032, ["data", "period-order", "group-order", "is-last", "group-type", "is-expanded"]))
1413
+ ], 10, vn),
1414
+ n(be, {
1415
+ ref_for: !0,
1416
+ ref: f(e.group.group_order, p.line_order),
1417
+ "sub-lines": p.sub_lines ?? [],
1418
+ "processing-only-customers": e.processingOnlyCustomers,
1419
+ "display-invoice-sub-lines-per-processing-only-customer": e.displayInvoiceSubLinesPerProcessingOnlyCustomer,
1420
+ "line-order": p.line_order,
1421
+ "is-open": o(m)(f(e.group.group_order, p.line_order)),
1422
+ "period-order": e.invoicePeriodOrder,
1423
+ "group-order": e.group.group_order,
1424
+ "show-tax-per-line-item": e.showTaxPerLineItem
1425
+ }, {
1426
+ "invoice-line-prefix": i((I) => [
1427
+ $(b.$slots, "invoice-line-prefix", J({ ref_for: !0 }, I))
1428
+ ]),
1429
+ "subline-content": i((I) => {
1430
+ var S, E;
1431
+ return [
1432
+ n(he, {
1433
+ details: I.details,
1434
+ "hide-tax-details": I.hideTaxDetails,
1435
+ "prefer-conversion-credits": "",
1436
+ "pricing-type": p.pricing_type,
1437
+ "tax-categories": p.tax_categories,
1438
+ "amount-type": e.amountType,
1439
+ "model-type": (E = (S = p.product_items) == null ? void 0 : S[0]) == null ? void 0 : E.model_type,
1440
+ "show-tax-per-line-item": e.showTaxPerLineItem
1441
+ }, null, 8, ["details", "hide-tax-details", "pricing-type", "tax-categories", "amount-type", "model-type", "show-tax-per-line-item"])
1442
+ ];
1443
+ }),
1444
+ _: 2
1445
+ }, 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"])
1446
+ ], 64))), 128))
1447
+ ]),
1448
+ _: 3
1449
+ })
1450
+ ]));
1451
+ }
1452
+ }), gn = { class: "flex items-center" }, bn = {
1453
+ key: 2,
1454
+ 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"
1455
+ }, me = /* @__PURE__ */ L({
1456
+ __name: "InvoiceTableRowLabel",
1457
+ props: {
1458
+ label: {},
1459
+ count: {}
1460
+ },
1461
+ setup(e) {
1462
+ const a = le(), u = le(!1);
1463
+ return Ke(a, ([c]) => {
1464
+ u.value = c.target.clientWidth < c.target.scrollWidth;
1465
+ }), (c, m) => (t(), l("div", gn, [
1466
+ u.value ? (t(), _(de, {
1467
+ key: 0,
1468
+ placement: "bottom-start",
1469
+ class: "min-w-0 leading-normal"
1470
+ }, {
1471
+ tooltip: i(() => [
1472
+ n(ue, null, {
1473
+ default: i(() => [
1474
+ n(ce, null, {
1475
+ default: i(() => [
1476
+ v(d(e.label), 1)
1477
+ ]),
1478
+ _: 1
1479
+ })
1480
+ ]),
1481
+ _: 1
1482
+ })
1483
+ ]),
1484
+ default: i(() => [
1485
+ h("span", {
1486
+ ref_key: "labelElement",
1487
+ ref: a,
1488
+ class: "block truncate"
1489
+ }, d(e.label), 513)
1490
+ ]),
1491
+ _: 1
1492
+ })) : (t(), l("span", {
1493
+ key: 1,
1494
+ ref_key: "labelElement",
1495
+ ref: a,
1496
+ class: N(["block", { truncate: e.count !== void 0 }])
1497
+ }, d(e.label), 3)),
1498
+ e.count !== void 0 ? (t(), l("span", bn, d(e.count), 1)) : y("", !0)
1499
+ ]));
1500
+ }
1501
+ }), yn = ["tabindex"], pn = { key: 0 }, xn = {
1502
+ colspan: "2",
1503
+ class: "p-0"
1504
+ }, hn = { class: "-mx-9 bg-gray-50 px-9 py-3 text-xs" }, _n = /* @__PURE__ */ L({
1505
+ __name: "InvoiceGroupRevenue",
1506
+ props: {
1507
+ forwardedFromCustomers: {},
1508
+ showOriginalCustomerInvoiceLine: {},
1509
+ group: {},
1510
+ expandedItems: {},
1511
+ handleToggleItems: {},
1512
+ formatIndex: {},
1513
+ invoicePeriodOrder: {},
1514
+ groupOrder: {},
1515
+ isExpandable: { type: Boolean },
1516
+ forceExpanded: { type: Boolean },
1517
+ amountType: {},
1518
+ processingOnlyCustomers: {},
1519
+ displayInvoiceSubLinesPerProcessingOnlyCustomer: { type: Boolean },
1520
+ showTaxPerLineItem: { type: Boolean, default: !0 }
1521
+ },
1522
+ setup(e) {
1523
+ const a = e, u = P(() => {
1524
+ var c, m, s;
1525
+ const r = [
1526
+ (c = a.group.pricing) == null ? void 0 : c.name,
1527
+ ge(((m = a.group.products) == null ? void 0 : m.map((g) => g.name)) ?? [])
1528
+ ].filter(Boolean).join(" - "), f = Lt(
1529
+ a.group,
1530
+ !!a.showOriginalCustomerInvoiceLine
1531
+ );
1532
+ if (!f)
1533
+ return r;
1534
+ const b = (s = a.forwardedFromCustomers) == null ? void 0 : s.find(
1535
+ (g) => g.id === f
1536
+ );
1537
+ return [b && we(b), r].filter(Boolean).join(" - ");
1538
+ });
1539
+ return (c, m) => (t(), l(x, null, [
1540
+ h("tr", {
1541
+ class: N(["border-t break-inside-avoid", { "cursor-pointer": e.isExpandable }]),
1542
+ tabindex: e.isExpandable ? 0 : void 0,
1543
+ onClick: m[0] || (m[0] = (s) => e.handleToggleItems(e.formatIndex(e.invoicePeriodOrder, e.groupOrder))),
1544
+ onKeyup: [
1545
+ m[1] || (m[1] = Y((s) => e.handleToggleItems(e.formatIndex(e.invoicePeriodOrder, e.groupOrder)), ["enter"])),
1546
+ m[2] || (m[2] = Y((s) => e.handleToggleItems(e.formatIndex(e.invoicePeriodOrder, e.groupOrder)), ["space"]))
1547
+ ]
1548
+ }, [
1549
+ n(k, { class: "p-0" }, {
1550
+ default: i(() => {
1551
+ var s;
1552
+ return [
1553
+ e.isExpandable ? (t(), _(j, {
1554
+ key: 0,
1555
+ icon: "keyboard_arrow_down",
1556
+ size: "md",
1557
+ class: N(["absolute -translate-x-7 text-slate-400", {
1558
+ "-rotate-90": !e.expandedItems.includes(
1559
+ e.formatIndex(e.invoicePeriodOrder, e.groupOrder)
1560
+ )
1561
+ }])
1562
+ }, null, 8, ["class"])) : y("", !0),
1563
+ n(me, {
1564
+ label: u.value,
1565
+ count: e.isExpandable ? ((s = e.group.lines) == null ? void 0 : s.length) ?? 0 : void 0
1566
+ }, null, 8, ["label", "count"])
1567
+ ];
1568
+ }),
1569
+ _: 1
1570
+ }),
1571
+ n(k, { number: "" }, {
1572
+ default: i(() => [
1573
+ e.amountType === "INCLUDING_TAX" ? (t(), _(w, {
1574
+ key: 0,
1575
+ value: e.group.amount_including_tax,
1576
+ "data-testid": o(ie),
1577
+ "data-type": o(ae)(e.group)
1578
+ }, null, 8, ["value", "data-testid", "data-type"])) : (t(), _(w, {
1579
+ key: 1,
1580
+ value: e.group.amount_excluding_tax,
1581
+ "data-testid": o(ie),
1582
+ "data-type": o(ae)(e.group)
1583
+ }, null, 8, ["value", "data-testid", "data-type"]))
1584
+ ]),
1585
+ _: 1
1586
+ })
1587
+ ], 42, yn),
1588
+ e.forceExpanded || e.expandedItems.includes(e.formatIndex(e.invoicePeriodOrder, e.groupOrder)) ? (t(), l("tr", pn, [
1589
+ h("td", xn, [
1590
+ h("div", hn, [
1591
+ n(Se, {
1592
+ "invoice-period-order": e.invoicePeriodOrder,
1593
+ "start-date": e.group.start_at,
1594
+ "end-date": e.group.end_at,
1595
+ total: e.group.amount_excluding_tax,
1596
+ group: e.group,
1597
+ "amount-type": e.amountType,
1598
+ "processing-only-customers": e.processingOnlyCustomers,
1599
+ "display-invoice-sub-lines-per-processing-only-customer": e.displayInvoiceSubLinesPerProcessingOnlyCustomer,
1600
+ "show-tax-per-line-item": e.showTaxPerLineItem,
1601
+ "is-expandable": e.isExpandable
1602
+ }, {
1603
+ "invoice-line-prefix": i((s) => [
1604
+ $(c.$slots, "invoice-line-prefix", fe(ve(s)))
1605
+ ]),
1606
+ "one-off-line-context-menu": i((s) => [
1607
+ $(c.$slots, "one-off-line-context-menu", J(s, { groupOrder: e.groupOrder }))
1608
+ ]),
1609
+ _: 3
1610
+ }, 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"])
1611
+ ])
1612
+ ])
1613
+ ])) : y("", !0)
1614
+ ], 64));
1615
+ }
1616
+ }), _e = /* @__PURE__ */ L({
1617
+ __name: "InvoiceGroupWalletBalance",
1618
+ props: {
1619
+ lines: {},
1620
+ creditTypes: {}
1621
+ },
1622
+ setup(e) {
1623
+ const a = e, { $t: u } = W(), c = P(
1624
+ () => Ne(Be(a.lines), {
1625
+ creditTypes: a.creditTypes,
1626
+ creditsLabel: u({
1627
+ defaultMessage: "Credits",
1628
+ description: "Generic fallback label for a wallet balance row with no known credit type",
1629
+ id: "invoiceGroupWalletBalance.creditsLabel"
1630
+ }),
1631
+ walletLabel: u({
1632
+ defaultMessage: "Wallet balance",
1633
+ description: "Label for a wallet balance row of a wallet that pays in money",
1634
+ id: "invoiceGroupWalletBalance.walletBalanceLabel"
1635
+ })
1636
+ })
1637
+ ), m = (s) => Ae(s, {
1638
+ formatMoney: Me,
1639
+ formatQuantity: (r) => r
1640
+ });
1641
+ return (s, r) => c.value.length ? (t(), _(G, { key: 0 }, {
1642
+ default: i(() => [
1643
+ h("tr", null, [
1644
+ n(M, {
1645
+ left: "",
1646
+ class: "w-2/5 text-gray-400"
1647
+ }, {
1648
+ default: i(() => [
1649
+ v(d(o(u)({
1650
+ defaultMessage: "Wallet breakdown",
1651
+ description: "Table heading for the wallet column in the wallet balance table",
1652
+ id: "invoiceGroupWalletBalance.walletBreakdownHeading"
1653
+ })), 1)
1654
+ ]),
1655
+ _: 1
1656
+ }),
1657
+ n(M, {
1658
+ right: "",
1659
+ class: "w-1/5 text-gray-400"
1660
+ }, {
1661
+ default: i(() => [
1662
+ v(d(o(u)({
1663
+ defaultMessage: "Balance",
1664
+ description: "Table heading for the balance column in the wallet balance table",
1665
+ id: "invoiceGroupWalletBalance.balanceHeading"
1666
+ })), 1)
1667
+ ]),
1668
+ _: 1
1669
+ }),
1670
+ n(M, {
1671
+ right: "",
1672
+ class: "w-1/5 text-gray-400"
1673
+ }, {
1674
+ default: i(() => [
1675
+ v(d(o(u)({
1676
+ defaultMessage: "Used",
1677
+ description: "Table heading for the used-balance column in the wallet balance table",
1678
+ id: "invoiceGroupWalletBalance.usedHeading"
1679
+ })), 1)
1680
+ ]),
1681
+ _: 1
1682
+ }),
1683
+ n(M, {
1684
+ right: "",
1685
+ class: "w-1/5 text-gray-400"
1686
+ }, {
1687
+ default: i(() => [
1688
+ v(d(o(u)({
1689
+ defaultMessage: "Remaining",
1690
+ description: "Table heading for the remaining-balance column in the wallet balance table",
1691
+ id: "invoiceGroupWalletBalance.remainingHeading"
1692
+ })), 1)
1693
+ ]),
1694
+ _: 1
1695
+ })
1696
+ ]),
1697
+ (t(!0), l(x, null, R(c.value, (f) => (t(), l("tr", {
1698
+ key: f.key
1699
+ }, [
1700
+ n(k, null, {
1701
+ default: i(() => [
1702
+ v(d(f.label), 1)
1703
+ ]),
1704
+ _: 2
1705
+ }, 1024),
1706
+ n(k, { number: "" }, {
1707
+ default: i(() => [
1708
+ v(d(m(f.availableBalance)), 1)
1709
+ ]),
1710
+ _: 2
1711
+ }, 1024),
1712
+ n(k, { number: "" }, {
1713
+ default: i(() => [
1714
+ v(d(m(f.usedBalance)), 1)
1715
+ ]),
1716
+ _: 2
1717
+ }, 1024),
1718
+ n(k, { number: "" }, {
1719
+ default: i(() => [
1720
+ v(d(m(f.leftBalance)), 1)
1721
+ ]),
1722
+ _: 2
1723
+ }, 1024)
1724
+ ]))), 128))
1725
+ ]),
1726
+ _: 1
1727
+ })) : y("", !0);
1728
+ }
1729
+ });
1730
+ function ke(e) {
1731
+ return typeof e == "function" ? e() : o(e);
1732
+ }
1733
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
1734
+ function kn(e = !1, a = {}) {
1735
+ const {
1736
+ truthyValue: u = !0,
1737
+ falsyValue: c = !1
1738
+ } = a, m = De(e), s = le(e);
1739
+ function r(f) {
1740
+ if (arguments.length)
1741
+ return s.value = f, s.value;
1742
+ {
1743
+ const b = ke(u);
1744
+ return s.value = s.value === b ? ke(c) : b, s.value;
1745
+ }
1746
+ }
1747
+ return m ? r : [s, r];
1748
+ }
1749
+ const Tn = {
1750
+ key: 0,
1751
+ totals: "",
1752
+ class: "border-t break-inside-avoid"
1753
+ }, Te = /* @__PURE__ */ L({
1754
+ __name: "InvoiceSummaryTotalExcludingTax",
1755
+ props: {
1756
+ baseAmount: {}
1757
+ },
1758
+ setup(e) {
1759
+ const a = W();
1760
+ return (u, c) => e.baseAmount ? (t(), l("tr", Tn, [
1761
+ n(k, null, {
1762
+ default: i(() => [
1763
+ v(d(o(a).$t({
1764
+ id: "invoice.table_header.total_excluding_taxes",
1765
+ defaultMessage: "Total excluding taxes",
1766
+ description: "Table row header for the total excluding taxes column in the invoice table"
1767
+ })), 1)
1768
+ ]),
1769
+ _: 1
1770
+ }),
1771
+ n(k, { number: "" }, {
1772
+ default: i(() => [
1773
+ n(w, {
1774
+ value: e.baseAmount,
1775
+ "data-testid": o(mt)
1776
+ }, null, 8, ["value", "data-testid"])
1777
+ ]),
1778
+ _: 1
1779
+ })
1780
+ ])) : y("", !0);
1781
+ }
1782
+ }), On = {
1783
+ key: 0,
1784
+ class: "border-t font-bold break-inside-avoid"
1785
+ }, Oe = /* @__PURE__ */ L({
1786
+ __name: "InvoiceSummaryTotalIncludingTax",
1787
+ props: {
1788
+ totalAmount: {},
1789
+ isCustomerFacing: { type: Boolean }
1790
+ },
1791
+ setup(e) {
1792
+ const a = W();
1793
+ return (u, c) => e.totalAmount ? (t(), l("tr", On, [
1794
+ n(k, { class: "font-bold" }, {
1795
+ default: i(() => [
1796
+ v(d(e.isCustomerFacing ? o(a).$t({
1797
+ id: "invoice.table_header.total_including_taxes_customer_facing",
1798
+ defaultMessage: "Total due today",
1799
+ description: "Table row header for the total including taxes column in the invoice table for a customer facing component"
1800
+ }) : o(a).$t({
1801
+ id: "invoice.table_header.total_including_taxes",
1802
+ defaultMessage: "Total including taxes",
1803
+ description: "Table row header for the total including taxes column in the invoice table"
1804
+ })), 1)
1805
+ ]),
1806
+ _: 1
1807
+ }),
1808
+ n(k, { number: "" }, {
1809
+ default: i(() => [
1810
+ n(w, {
1811
+ value: e.totalAmount,
1812
+ "data-testid": o(ct)
1813
+ }, null, 8, ["value", "data-testid"])
1814
+ ]),
1815
+ _: 1
1816
+ })
1817
+ ])) : y("", !0);
1818
+ }
1819
+ }), In = {
1820
+ key: 0,
1821
+ colspan: "4",
1822
+ class: "p-0"
1823
+ }, wn = /* @__PURE__ */ L({
1824
+ __name: "InvoiceTaxes",
1825
+ props: {
1826
+ taxCategories: {}
1827
+ },
1828
+ setup(e) {
1829
+ const a = W();
1830
+ return (u, c) => (t(), _(G, { class: "table-fixed" }, {
1831
+ default: i(() => [
1832
+ h("tr", null, [
1833
+ n(M, { left: "" }, {
1834
+ default: i(() => [
1835
+ v(d(o(a).$t({
1836
+ id: "invoice.table_header.tax type",
1837
+ defaultMessage: "Tax type",
1838
+ description: "Table header for the column containing the tax type"
1839
+ })), 1)
1840
+ ]),
1841
+ _: 1
1842
+ }),
1843
+ n(M, { right: "" }, {
1844
+ default: i(() => [
1845
+ v(d(o(a).$t({
1846
+ id: "invoice.table_header.base amount",
1847
+ defaultMessage: "Base amount",
1848
+ description: "Table header for the column containing the base amount"
1849
+ })), 1)
1850
+ ]),
1851
+ _: 1
1852
+ }),
1853
+ n(M, { right: "" }, {
1854
+ default: i(() => [
1855
+ v(d(o(a).$t({
1856
+ id: "invoice.table_header.tax_percentage",
1857
+ defaultMessage: "Percentage",
1858
+ description: "Table header for the column containing the tax percentage"
1859
+ })), 1)
1860
+ ]),
1861
+ _: 1
1862
+ }),
1863
+ n(M, { right: "" }, {
1864
+ default: i(() => [
1865
+ v(d(o(a).$t({
1866
+ id: "invoice.table_header.tax amount",
1867
+ defaultMessage: "Tax amount",
1868
+ description: "Table header for the column containing the tax amount"
1869
+ })), 1)
1870
+ ]),
1871
+ _: 1
1872
+ })
1873
+ ]),
1874
+ (t(!0), l(x, null, R(e.taxCategories, (m, s) => (t(), l("tr", { key: s }, [
1875
+ m.rates ? (t(), l("td", In, [
1876
+ n(G, { class: "table-fixed" }, {
1877
+ default: i(() => [
1878
+ (t(!0), l(x, null, R(m.rates, (r, f) => (t(), l("tr", { key: f }, [
1879
+ n(k, null, {
1880
+ default: i(() => [
1881
+ v(d(r.name) + " (" + d(m.category) + ") ", 1)
1882
+ ]),
1883
+ _: 2
1884
+ }, 1024),
1885
+ n(k, { number: "" }, {
1886
+ default: i(() => [
1887
+ n(w, {
1888
+ value: m.base_amount
1889
+ }, null, 8, ["value"])
1890
+ ]),
1891
+ _: 2
1892
+ }, 1024),
1893
+ n(k, { number: "" }, {
1894
+ default: i(() => [
1895
+ v(d(r.percentage) + "%", 1)
1896
+ ]),
1897
+ _: 2
1898
+ }, 1024),
1899
+ n(k, { number: "" }, {
1900
+ default: i(() => [
1901
+ n(w, {
1902
+ value: r.tax_amount
1903
+ }, null, 8, ["value"])
1904
+ ]),
1905
+ _: 2
1906
+ }, 1024)
1907
+ ]))), 128))
1908
+ ]),
1909
+ _: 2
1910
+ }, 1024)
1911
+ ])) : (t(), l(x, { key: 1 }, [
1912
+ n(k, null, {
1913
+ default: i(() => [
1914
+ v(d(m.name) + " (" + d(m.category) + ") ", 1)
1915
+ ]),
1916
+ _: 2
1917
+ }, 1024),
1918
+ n(k, { number: "" }, {
1919
+ default: i(() => [
1920
+ n(w, {
1921
+ value: m.base_amount
1922
+ }, null, 8, ["value"])
1923
+ ]),
1924
+ _: 2
1925
+ }, 1024),
1926
+ n(k, { number: "" }, {
1927
+ default: i(() => [
1928
+ v(d(m.percentage) + "%", 1)
1929
+ ]),
1930
+ _: 2
1931
+ }, 1024),
1932
+ n(k, { number: "" }, {
1933
+ default: i(() => [
1934
+ n(w, {
1935
+ value: m.tax_amount
1936
+ }, null, 8, ["value"])
1937
+ ]),
1938
+ _: 2
1939
+ }, 1024)
1940
+ ], 64))
1941
+ ]))), 128))
1942
+ ]),
1943
+ _: 1
1944
+ }));
1945
+ }
1946
+ }), $n = { class: "flex items-start justify-between" }, Mn = {
1947
+ key: 0,
1948
+ class: "max-h-9"
1949
+ }, En = { class: "flex flex-col gap-2" }, Cn = { key: 0 }, Nn = { key: 3 }, Bn = {
1950
+ colspan: "2",
1951
+ class: "p-0"
1952
+ }, An = ["tabindex"], Pn = { key: 1 }, Sn = {
1953
+ colspan: "2",
1954
+ class: "p-0"
1955
+ }, Ln = { class: "-mx-9 bg-gray-50 px-9 py-3 text-xs" }, Un = ["tabindex", "onClick", "onKeyup"], Dn = { key: 0 }, Rn = {
1956
+ colspan: "2",
1957
+ class: "p-0"
1958
+ }, Fn = { class: "-mx-9 bg-gray-50 px-9 py-3 text-xs" }, zn = { key: 1 }, Wn = {
1959
+ colspan: "2",
1960
+ class: "p-0"
1961
+ }, Vn = {
1962
+ key: 0,
1963
+ class: "break-inside-avoid border-t font-bold"
1964
+ }, Hn = /* @__PURE__ */ L({
1965
+ __name: "InvoiceSummary",
1966
+ props: {
1967
+ invoice: {},
1968
+ isExpandable: { type: Boolean, default: !1 },
1969
+ forceExpanded: { type: Boolean, default: !1 },
1970
+ heading: { default: "details" },
1971
+ isInvoiceLineCreatable: { type: Boolean, default: !1 },
1972
+ isNoteCreatable: { type: Boolean, default: !1 },
1973
+ showRenderedServicesHeader: { type: Boolean, default: !0 },
1974
+ isCustomerFacing: { type: Boolean },
1975
+ showTotals: { type: Boolean, default: !0 },
1976
+ hideOneOffWalletBalance: { type: Boolean, default: !1 },
1977
+ showWalletBalance: { type: Boolean, default: !0 }
1978
+ },
1979
+ emits: ["add-invoice-line", "add-note"],
1980
+ setup(e, { emit: a }) {
1981
+ const u = W(), { formatMessage: c } = u, m = a, s = e, [r, f] = xe(), [b, g] = xe(), [p, T] = kn(), I = (...O) => {
1982
+ s.isExpandable && f(...O);
1983
+ }, S = (O) => {
1984
+ s.isExpandable && g(O);
1985
+ }, E = () => {
1986
+ !s.invoice.tax_categories || !s.isExpandable || T();
1987
+ }, C = (O, D) => +`${O}${D}`, B = (O) => u.$t(
1988
+ {
1989
+ id: "invoice.service_period_heading",
1990
+ defaultMessage: "Service period - {start_at} - {end_at}",
1991
+ description: "Heading for rendered services where {start_at} is replaced for the start date and {end_at} for the end date in invoice summary"
1992
+ },
1993
+ {
1994
+ start_at: u.formatDate({
1995
+ date: O.start_at,
1996
+ format: "date",
1997
+ timezone: ye(s.invoice.customer.timezone),
1998
+ offsetType: "offsetted"
1999
+ }),
2000
+ end_at: u.formatDate({
2001
+ date: O.end_at,
2002
+ format: "date",
2003
+ timezone: ye(s.invoice.customer.timezone),
2004
+ offsetType: "offsetted"
2005
+ })
2006
+ }
2007
+ ), V = (O) => {
2008
+ switch (O) {
2009
+ case "PRICING":
2010
+ case "REVENUE":
2011
+ return u.$t({
2012
+ id: "invoice.table_heading.products",
2013
+ defaultMessage: "Products",
2014
+ description: "Table heading for the column containing the products of the invoice"
2015
+ });
2016
+ case "COMMITMENT":
2017
+ return u.$t({
2018
+ id: "invoice.table_heading.commitments",
2019
+ defaultMessage: "Commitments",
2020
+ description: "Table heading for the column containing the commitments of the invoice"
2021
+ });
2022
+ case "DISCOUNT":
2023
+ return u.$t({
2024
+ id: "invoice.table_heading.discounts",
2025
+ defaultMessage: "Discounts",
2026
+ description: "Table heading for the column containing the discounts of the invoice"
2027
+ });
2028
+ case "MARKUP":
2029
+ return u.$t({
2030
+ id: "invoice.table_heading.markups",
2031
+ defaultMessage: "Markups",
2032
+ description: "Table heading for the column containing the markups of the invoice"
2033
+ });
2034
+ case "ONE_OFF":
2035
+ return u.$t({
2036
+ id: "invoice.table_heading.one_offs",
2037
+ defaultMessage: "One-off's",
2038
+ description: "Table heading for the column containing the one-offs of the invoice"
2039
+ });
2040
+ }
2041
+ }, A = (O) => {
2042
+ var D, F;
2043
+ return (D = O.products) != null && D.length ? [(F = O.pricing) == null ? void 0 : F.name, ge(O.products.map((z) => z.name))].filter(Boolean).join(" - ") : O.description ?? "";
2044
+ }, H = (O) => s.showWalletBalance && !(s.hideOneOffWalletBalance && O.type === "ONE_OFF") && (O.lines ?? []).some((D) => {
2045
+ var F, z;
2046
+ return !!((z = (F = D.details) == null ? void 0 : F.wallet_balances) != null && z.length);
2047
+ }), X = (O) => O.groups.reduce(
2048
+ (D, F) => F.type in D ? {
2049
+ ...D,
2050
+ [F.type]: [...D[F.type], F]
2051
+ } : { ...D, [F.type]: [F] },
2052
+ {}
2053
+ ), q = P(() => {
2054
+ const O = [];
2055
+ return ["ONE_OFF", "STANDARD", "ONE_OFF_CREDIT"].includes(s.invoice.type) && ["DRAFT", "OPEN"].includes(s.invoice.status) && s.isInvoiceLineCreatable && O.push({
2056
+ label: c({
2057
+ defaultMessage: "Invoice line",
2058
+ id: "JlhdD2",
2059
+ description: "Label for adding an invoice line"
2060
+ }),
2061
+ onClick: () => m("add-invoice-line")
2062
+ }), s.isNoteCreatable && O.push({
2063
+ label: c({
2064
+ defaultMessage: "Note",
2065
+ id: "jB8+k/",
2066
+ description: "Label for adding a note to an invoice"
2067
+ }),
2068
+ onClick: () => m("add-note")
2069
+ }), O;
2070
+ }), Z = P(() => s.invoice.show_tax_per_line_item !== !1), oe = P(() => {
2071
+ if (s.heading === "summary")
2072
+ return u.$t({
2073
+ id: "invoice.summaryTitle",
2074
+ defaultMessage: "Invoice summary",
2075
+ description: "Title for the compact, always-shown invoice summary section"
2076
+ });
2077
+ switch (s.invoice.type) {
2078
+ case "CREDIT":
2079
+ return u.$t({
2080
+ id: "invoice.creditDetailsTitle",
2081
+ defaultMessage: "Credit details",
2082
+ description: "Title for the invoice summary of a credit-note invoice"
2083
+ });
2084
+ case "ONE_OFF":
2085
+ return u.$t({
2086
+ id: "invoice.oneOffDetailsTitle",
2087
+ defaultMessage: "One-off details",
2088
+ description: "Title for the invoice summary of a one-off invoice"
2089
+ });
2090
+ case "ONE_OFF_CREDIT":
2091
+ return u.$t({
2092
+ id: "invoice.oneOffCreditDetailsTitle",
2093
+ defaultMessage: "One-off credit details",
2094
+ description: "Title for the invoice summary of a one-off credit-note invoice"
2095
+ });
2096
+ default:
2097
+ return u.$t({
2098
+ id: "invoice.title",
2099
+ defaultMessage: "Details",
2100
+ description: "Title for the invoice summary"
2101
+ });
2102
+ }
2103
+ });
2104
+ return (O, D) => {
2105
+ var F;
2106
+ return t(), l("div", null, [
2107
+ h("div", $n, [
2108
+ O.$slots.logo ? (t(), l("div", Mn, [
2109
+ $(O.$slots, "logo")
2110
+ ])) : (t(), _(Qe, {
2111
+ key: 1,
2112
+ title: oe.value,
2113
+ variant: "neutral",
2114
+ icon: "draft",
2115
+ "icon-class": "print:hidden",
2116
+ "title-class": "print:text-sm"
2117
+ }, null, 8, ["title"])),
2118
+ O.$slots.intro ? $(O.$slots, "intro", {}, void 0, void 0, 2) : y("", !0),
2119
+ h("div", En, [
2120
+ (F = q.value) != null && F.length ? (t(), _(Je, {
2121
+ key: 0,
2122
+ items: q.value,
2123
+ width: "auto"
2124
+ }, {
2125
+ trigger: i(() => [
2126
+ n(Ge, {
2127
+ "icon-prefix": "add",
2128
+ size: "sm",
2129
+ intent: "secondary"
2130
+ }, {
2131
+ default: i(() => [
2132
+ v(d(o(c)({
2133
+ defaultMessage: "Add",
2134
+ id: "YnK/yF",
2135
+ description: "Label for adding an item to an invoice"
2136
+ })), 1)
2137
+ ]),
2138
+ _: 1
2139
+ })
2140
+ ]),
2141
+ _: 1
2142
+ }, 8, ["items"])) : y("", !0),
2143
+ $(O.$slots, "child-customers-selector")
2144
+ ])
2145
+ ]),
2146
+ O.$slots.total ? $(O.$slots, "total", {}, void 0, void 0, 0) : y("", !0),
2147
+ $(O.$slots, "notes"),
2148
+ (t(!0), l(x, null, R(e.invoice.periods, (z, K) => (t(), l(x, { key: K }, [
2149
+ e.showRenderedServicesHeader ? (t(), _(Pe, {
2150
+ key: 0,
2151
+ class: "mt-6"
2152
+ }, {
2153
+ default: i(() => [
2154
+ n(Ie, {
2155
+ tag: "h2",
2156
+ variant: "caps-heading"
2157
+ }, {
2158
+ default: i(() => [
2159
+ v(d(B(z)), 1)
2160
+ ]),
2161
+ _: 2
2162
+ }, 1024)
2163
+ ]),
2164
+ _: 2
2165
+ }, 1024)) : y("", !0),
2166
+ z.groups ? (t(), _(G, {
2167
+ key: 1,
2168
+ class: N(["text-sm", { "mt-3": e.showRenderedServicesHeader }]),
2169
+ "data-testid": o(st)
2170
+ }, {
2171
+ default: i(() => [
2172
+ (t(!0), l(x, null, R(Object.entries(
2173
+ X(z)
2174
+ ), ([U, ee], Q) => (t(), l(x, { key: U }, [
2175
+ Q > 0 ? (t(), l("tr", Cn, [...D[0] || (D[0] = [
2176
+ h("td", null, [
2177
+ h("div", { class: "h-4" })
2178
+ ], -1)
2179
+ ])])) : y("", !0),
2180
+ h("tr", null, [
2181
+ n(M, {
2182
+ left: "",
2183
+ class: "text-secondary"
2184
+ }, {
2185
+ default: i(() => [
2186
+ v(d(V(U)), 1)
2187
+ ]),
2188
+ _: 2
2189
+ }, 1024),
2190
+ n(M, {
2191
+ right: "",
2192
+ class: "w-28 text-secondary"
2193
+ }, {
2194
+ default: i(() => [
2195
+ v(d(o(u).$t({
2196
+ id: "invoice.amount_table_heading",
2197
+ defaultMessage: "Amount",
2198
+ description: "Table heading for the amount column in the invoice table"
2199
+ })), 1)
2200
+ ]),
2201
+ _: 1
2202
+ })
2203
+ ]),
2204
+ (t(!0), l(x, null, R(ee, (te, Le) => (t(), l(x, { key: Le }, [
2205
+ U === "REVENUE" || U === "PRICING" || U === "ONE_OFF" ? (t(), _(_n, {
2206
+ key: 0,
2207
+ group: te,
2208
+ "expanded-items": o(r),
2209
+ "handle-toggle-items": I,
2210
+ "is-expandable": e.isExpandable,
2211
+ "force-expanded": e.forceExpanded,
2212
+ "format-index": C,
2213
+ "invoice-period-order": z.period_order,
2214
+ "group-order": te.group_order,
2215
+ "amount-type": e.invoice.pricing_amount_type,
2216
+ "processing-only-customers": e.invoice.processing_only_customers,
2217
+ "display-invoice-sub-lines-per-processing-only-customer": e.invoice.display_invoice_sub_lines_per_processing_only_customer,
2218
+ "show-tax-per-line-item": Z.value,
2219
+ "forwarded-from-customers": e.invoice.forwarded_from_customers,
2220
+ "show-original-customer-invoice-line": e.invoice.show_original_customer_invoice_line
2221
+ }, {
2222
+ "invoice-line-prefix": i((ne) => [
2223
+ $(O.$slots, "invoice-line-prefix", J({ ref_for: !0 }, ne))
2224
+ ]),
2225
+ "one-off-line-context-menu": i((ne) => [
2226
+ $(O.$slots, "one-off-line-context-menu", J({ ref_for: !0 }, ne, {
2227
+ periodOrder: z.period_order
2228
+ }))
2229
+ ]),
2230
+ _: 2
2231
+ }, 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"])) : U === "DISCOUNT" || U === "MARKUP" ? (t(), _(St, {
2232
+ key: 1,
2233
+ group: te,
2234
+ "expanded-items": o(r),
2235
+ "handle-toggle-items": I,
2236
+ "is-expandable": e.isExpandable,
2237
+ "force-expanded": e.forceExpanded,
2238
+ "format-index": C,
2239
+ "invoice-period-order": z.period_order,
2240
+ "group-order": te.group_order,
2241
+ "amount-type": e.invoice.pricing_amount_type,
2242
+ heading: U === "DISCOUNT" ? o(u).$t({
2243
+ id: "invoice.discounts_table_heading",
2244
+ defaultMessage: "Discounts",
2245
+ description: "Heading for discounts in the invoice table"
2246
+ }) : o(u).$t({
2247
+ id: "invoice.markups_table_heading",
2248
+ defaultMessage: "Markups",
2249
+ description: "Heading for markups in the invoice table"
2250
+ })
2251
+ }, {
2252
+ "invoice-line-prefix": i((ne) => [
2253
+ $(O.$slots, "invoice-line-prefix", J({ ref_for: !0 }, ne))
2254
+ ]),
2255
+ _: 3
2256
+ }, 8, ["group", "expanded-items", "is-expandable", "force-expanded", "invoice-period-order", "group-order", "amount-type", "heading"])) : U === "COMMITMENT" ? (t(), _(Ct, {
2257
+ key: 2,
2258
+ group: te,
2259
+ "expanded-items": o(r),
2260
+ "handle-toggle-items": I,
2261
+ "is-expandable": e.isExpandable,
2262
+ "force-expanded": e.forceExpanded,
2263
+ "format-index": C,
2264
+ "invoice-period-order": z.period_order,
2265
+ "group-order": te.group_order,
2266
+ "amount-type": e.invoice.pricing_amount_type
2267
+ }, {
2268
+ "invoice-line-prefix": i((ne) => [
2269
+ $(O.$slots, "invoice-line-prefix", J({ ref_for: !0 }, ne))
2270
+ ]),
2271
+ _: 3
2272
+ }, 8, ["group", "expanded-items", "is-expandable", "force-expanded", "invoice-period-order", "group-order", "amount-type"])) : y("", !0),
2273
+ H(te) ? (t(), l("tr", Nn, [
2274
+ h("td", Bn, [
2275
+ n(_e, {
2276
+ lines: te.lines,
2277
+ "credit-types": e.invoice.credit_types
2278
+ }, null, 8, ["lines", "credit-types"])
2279
+ ])
2280
+ ])) : y("", !0)
2281
+ ], 64))), 128))
2282
+ ], 64))), 128))
2283
+ ]),
2284
+ _: 2
2285
+ }, 1032, ["class", "data-testid"])) : y("", !0)
2286
+ ], 64))), 128)),
2287
+ e.invoice.tax_summary && (e.showTotals || (e.forceExpanded || o(p)) && e.invoice.tax_categories) ? (t(), _(G, {
2288
+ key: 1,
2289
+ class: "mt-6 text-sm print:ml-auto print:w-2/3"
2290
+ }, {
2291
+ default: i(() => [
2292
+ e.showTotals ? (t(), l(x, { key: 0 }, [
2293
+ h("tr", null, [
2294
+ n(M, {
2295
+ left: "",
2296
+ class: "text-secondary"
2297
+ }, {
2298
+ default: i(() => [
2299
+ v(d(o(u).$t({
2300
+ id: "invoice.totals_table_heading",
2301
+ defaultMessage: "Totals",
2302
+ description: "Table heading for the totals column in the invoice table"
2303
+ })), 1)
2304
+ ]),
2305
+ _: 1
2306
+ }),
2307
+ n(M, {
2308
+ right: "",
2309
+ class: "w-28 text-secondary"
2310
+ }, {
2311
+ default: i(() => [
2312
+ v(d(o(u).$t({
2313
+ id: "invoice.amount_table_heading",
2314
+ defaultMessage: "Amount",
2315
+ description: "Table heading for the amount column in the invoice table"
2316
+ })), 1)
2317
+ ]),
2318
+ _: 1
2319
+ })
2320
+ ]),
2321
+ e.invoice.pricing_amount_type === "INCLUDING_TAX" ? (t(), _(Oe, {
2322
+ key: 0,
2323
+ "total-amount": e.invoice.tax_summary.total_amount,
2324
+ "is-customer-facing": e.isCustomerFacing
2325
+ }, null, 8, ["total-amount", "is-customer-facing"])) : (t(), _(Te, {
2326
+ key: 1,
2327
+ "base-amount": e.invoice.tax_summary.base_amount
2328
+ }, null, 8, ["base-amount"])),
2329
+ e.invoice.tax_summary.tax_amount ? (t(), l("tr", {
2330
+ key: 2,
2331
+ class: N([{ "cursor-pointer": e.invoice.tax_categories && e.isExpandable }, "break-inside-avoid border-t"]),
2332
+ tabindex: e.isExpandable ? 0 : void 0,
2333
+ onClick: E,
2334
+ onKeyup: [
2335
+ Y(E, ["enter"]),
2336
+ Y(E, ["space"])
2337
+ ]
2338
+ }, [
2339
+ n(k, null, {
2340
+ default: i(() => [
2341
+ e.isExpandable && e.invoice.tax_categories && e.invoice.tax_categories.length ? (t(), _(j, {
2342
+ key: 0,
2343
+ icon: "keyboard_arrow_down",
2344
+ size: "md",
2345
+ class: N(["absolute -translate-x-7 text-slate-400", { "-rotate-90": !o(p) }])
2346
+ }, null, 8, ["class"])) : y("", !0),
2347
+ n(me, {
2348
+ label: o(u).$t({
2349
+ id: "invoice.taxes_table_heading",
2350
+ defaultMessage: "Taxes",
2351
+ description: "Table heading for the taxes column in the invoice table"
2352
+ }),
2353
+ count: e.isExpandable && e.invoice.tax_categories ? e.invoice.tax_categories.length : void 0
2354
+ }, null, 8, ["label", "count"])
2355
+ ]),
2356
+ _: 1
2357
+ }),
2358
+ n(k, { number: "" }, {
2359
+ default: i(() => [
2360
+ n(w, {
2361
+ value: e.invoice.tax_summary.tax_amount,
2362
+ "data-testid": o(ut)
2363
+ }, null, 8, ["value", "data-testid"])
2364
+ ]),
2365
+ _: 1
2366
+ })
2367
+ ], 42, An)) : y("", !0)
2368
+ ], 64)) : y("", !0),
2369
+ (e.forceExpanded || o(p)) && e.invoice.tax_categories ? (t(), l("tr", Pn, [
2370
+ h("td", Sn, [
2371
+ h("div", Ln, [
2372
+ n(wn, {
2373
+ "tax-categories": e.invoice.tax_categories
2374
+ }, null, 8, ["tax-categories"])
2375
+ ])
2376
+ ])
2377
+ ])) : y("", !0),
2378
+ e.showTotals ? (t(), l(x, { key: 2 }, [
2379
+ e.invoice.pricing_amount_type === "INCLUDING_TAX" ? (t(), _(Te, {
2380
+ key: 0,
2381
+ "base-amount": e.invoice.tax_summary.base_amount
2382
+ }, null, 8, ["base-amount"])) : (t(), _(Oe, {
2383
+ key: 1,
2384
+ "total-amount": e.invoice.tax_summary.total_amount
2385
+ }, null, 8, ["total-amount"]))
2386
+ ], 64)) : y("", !0)
2387
+ ]),
2388
+ _: 1
2389
+ })) : y("", !0),
2390
+ o(Xe)(e.invoice.closed_periods) ? y("", !0) : (t(), _(G, {
2391
+ key: 2,
2392
+ class: "mt-6 text-sm"
2393
+ }, {
2394
+ default: i(() => [
2395
+ h("tr", null, [
2396
+ n(M, {
2397
+ left: "",
2398
+ class: "text-secondary"
2399
+ }, {
2400
+ default: i(() => [
2401
+ v(d(o(u).$t({
2402
+ id: "invoice.already_deducted_table_heading",
2403
+ defaultMessage: "Already deducted",
2404
+ description: "Table heading for the already deducted rows in the invoice table"
2405
+ })), 1)
2406
+ ]),
2407
+ _: 1
2408
+ })
2409
+ ]),
2410
+ (t(!0), l(x, null, R(e.invoice.closed_periods, (z, K) => (t(), l(x, { key: K }, [
2411
+ (t(!0), l(x, null, R(z.groups, (U, ee) => (t(), l(x, { key: ee }, [
2412
+ h("tr", {
2413
+ class: N(["break-inside-avoid border-t", { "pt-6": K === 0, "cursor-pointer": e.isExpandable }]),
2414
+ tabindex: e.isExpandable ? 0 : void 0,
2415
+ onClick: (Q) => S(C(K, ee)),
2416
+ onKeyup: [
2417
+ Y((Q) => S(C(K, ee)), ["enter"]),
2418
+ Y((Q) => S(C(K, ee)), ["space"])
2419
+ ]
2420
+ }, [
2421
+ n(k, { class: "p-0" }, {
2422
+ default: i(() => {
2423
+ var Q;
2424
+ return [
2425
+ e.isExpandable ? (t(), _(j, {
2426
+ key: 0,
2427
+ icon: "keyboard_arrow_down",
2428
+ size: "md",
2429
+ class: N(["absolute -translate-x-7 text-slate-400", {
2430
+ "-rotate-90": !o(b).includes(
2431
+ C(K, ee)
2432
+ )
2433
+ }])
2434
+ }, null, 8, ["class"])) : y("", !0),
2435
+ n(me, {
2436
+ label: A(U),
2437
+ count: e.isExpandable ? ((Q = U.lines) == null ? void 0 : Q.length) ?? 0 : void 0
2438
+ }, null, 8, ["label", "count"])
2439
+ ];
2440
+ }),
2441
+ _: 2
2442
+ }, 1024),
2443
+ n(k, {
2444
+ number: "",
2445
+ class: "w-28"
2446
+ }, {
2447
+ default: i(() => [
2448
+ n(w, {
2449
+ value: U.amount_excluding_tax,
2450
+ "data-testid": o(ft),
2451
+ "data-type": o(gt)
2452
+ }, null, 8, ["value", "data-testid", "data-type"])
2453
+ ]),
2454
+ _: 2
2455
+ }, 1024)
2456
+ ], 42, Un),
2457
+ e.forceExpanded || o(b).includes(C(K, ee)) ? (t(), l("tr", Dn, [
2458
+ h("td", Rn, [
2459
+ h("div", Fn, [
2460
+ n(Se, {
2461
+ "start-date": U.start_at,
2462
+ "end-date": U.end_at,
2463
+ total: U.amount_excluding_tax,
2464
+ group: U,
2465
+ "amount-type": e.invoice.pricing_amount_type,
2466
+ "show-tax-per-line-item": Z.value,
2467
+ "processing-only-customers": e.invoice.processing_only_customers,
2468
+ "display-invoice-sub-lines-per-processing-only-customer": e.invoice.display_invoice_sub_lines_per_processing_only_customer
2469
+ }, {
2470
+ "one-off-line-context-menu": i((Q) => [
2471
+ $(O.$slots, "one-off-line-context-menu", J({ ref_for: !0 }, Q, {
2472
+ groupOrder: U.group_order,
2473
+ periodOrder: z.period_order
2474
+ }))
2475
+ ]),
2476
+ _: 2
2477
+ }, 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"])
2478
+ ])
2479
+ ])
2480
+ ])) : y("", !0),
2481
+ H(U) ? (t(), l("tr", zn, [
2482
+ h("td", Wn, [
2483
+ n(_e, {
2484
+ lines: U.lines,
2485
+ "credit-types": e.invoice.credit_types
2486
+ }, null, 8, ["lines", "credit-types"])
2487
+ ])
2488
+ ])) : y("", !0)
2489
+ ], 64))), 128))
2490
+ ], 64))), 128)),
2491
+ e.invoice.open_invoice_amount && !e.invoice.paid && e.showTotals ? (t(), l("tr", Vn, [
2492
+ n(k, { class: "font-bold" }, {
2493
+ default: i(() => [
2494
+ v(d(o(u).$t({
2495
+ id: "invoice.amount_due_table_heading",
2496
+ defaultMessage: "Amount due",
2497
+ description: "Table heading for the amount due row in the invoice table"
2498
+ })), 1)
2499
+ ]),
2500
+ _: 1
2501
+ }),
2502
+ n(k, { number: "" }, {
2503
+ default: i(() => [
2504
+ n(w, {
2505
+ value: e.invoice.open_invoice_amount,
2506
+ "data-testid": o(vt)
2507
+ }, null, 8, ["value", "data-testid"])
2508
+ ]),
2509
+ _: 1
2510
+ })
2511
+ ])) : y("", !0)
2512
+ ]),
2513
+ _: 3
2514
+ }))
2515
+ ]);
2516
+ };
2517
+ }
2518
+ }), jn = ({
2519
+ invoice: e,
2520
+ getPeriodTitle: a,
2521
+ creditsLabel: u,
56
2522
  walletLabel: c,
57
2523
  formatBalance: m
58
- }) => [...t.periods ?? [], ...t.closed_periods ?? []].map((l) => {
59
- const v = (l.groups ?? []).flatMap((s) => s.lines ?? []), $ = q(
60
- G(v),
61
- { creditTypes: t.credit_types, creditsLabel: o, walletLabel: c }
62
- ), k = /* @__PURE__ */ new Map();
63
- for (const s of $) {
64
- const b = m(s.availableBalance), x = k.get(s.label) ?? {
65
- id: `${l.period_order}-${s.label}`,
66
- label: s.label,
67
- amount: b,
2524
+ }) => [...e.periods ?? [], ...e.closed_periods ?? []].map((r) => {
2525
+ const f = (r.groups ?? []).flatMap((p) => p.lines ?? []), b = Ne(
2526
+ Be(f),
2527
+ { creditTypes: e.credit_types, creditsLabel: u, walletLabel: c }
2528
+ ), g = /* @__PURE__ */ new Map();
2529
+ for (const p of b) {
2530
+ const T = m(p.availableBalance), I = g.get(p.label) ?? {
2531
+ id: `${r.period_order}-${p.label}`,
2532
+ label: p.label,
2533
+ amount: T,
68
2534
  rows: []
69
2535
  };
70
- x.rows.push({
71
- id: `${l.period_order}-${s.key}`,
72
- label: s.label,
73
- used: m(s.usedBalance),
74
- left: m(s.leftBalance),
75
- available: b
76
- }), k.set(s.label, x);
2536
+ I.rows.push({
2537
+ id: `${r.period_order}-${p.key}`,
2538
+ label: p.label,
2539
+ used: m(p.usedBalance),
2540
+ left: m(p.leftBalance),
2541
+ available: T
2542
+ }), g.set(p.label, I);
77
2543
  }
78
2544
  return {
79
- id: `${l.period_order}-${l.start_at}`,
80
- title: r(l),
81
- rows: [...k.values()]
2545
+ id: `${r.period_order}-${r.start_at}`,
2546
+ title: a(r),
2547
+ rows: [...g.values()]
82
2548
  };
83
- }).filter((l) => l.rows.length > 0), oe = {
2549
+ }).filter((r) => r.rows.length > 0), Gn = {
84
2550
  key: 0,
85
2551
  class: "mt-8"
86
- }, le = { class: "flex flex-col gap-6" }, se = ["onClick", "onKeyup"], re = { class: "ml-1 inline-flex h-3.5 w-3.5 items-center justify-center rounded-full bg-blue-100 text-2xs font-bold text-blue-600" }, ce = { key: 0 }, de = { class: "p-0" }, ue = { class: "-mx-9 bg-gray-50 px-9 py-3 text-xs" }, me = /* @__PURE__ */ I({
2552
+ }, Xn = { class: "flex flex-col gap-6" }, qn = { class: "border-t" }, Yn = ["aria-expanded", "onClick"], Kn = { class: "ml-1 inline-flex h-3.5 w-3.5 items-center justify-center rounded-full bg-blue-100 text-2xs font-bold text-blue-600" }, Qn = { key: 0 }, Jn = { class: "p-0" }, Zn = { class: "-mx-9 bg-gray-50 px-9 py-3 text-xs" }, ei = /* @__PURE__ */ L({
87
2553
  __name: "InvoiceCreditsBreakdown",
88
2554
  props: {
89
2555
  invoice: { type: Object }
90
2556
  },
91
- setup(t) {
92
- const r = t, { formatDate: o, $t: c, formatMessage: m, formatNumber: p } = O(), { getIsOpen: l, toggle: v } = Q(), $ = (b) => m(
2557
+ setup(e) {
2558
+ const a = e, { formatDate: u, $t: c, formatMessage: m, formatNumber: s } = W(), { getIsOpen: r, toggle: f } = se(), b = (T) => m(
93
2559
  {
94
2560
  defaultMessage: "Service period - {startAt} - {endAt}",
95
2561
  id: "wallet_balance.service_period_heading",
96
2562
  description: "Heading shown above wallet balance details for an invoice period"
97
2563
  },
98
2564
  {
99
- startAt: o({
100
- date: b.start_at,
2565
+ startAt: u({
2566
+ date: T.start_at,
101
2567
  format: "date",
102
2568
  offsetType: "offsetted",
103
- timezone: r.invoice.customer.timezone
2569
+ timezone: pe(a.invoice)
104
2570
  }),
105
- endAt: o({
106
- date: b.end_at,
2571
+ endAt: u({
2572
+ date: T.end_at,
107
2573
  format: "date",
108
2574
  offsetType: "offsetted",
109
- timezone: r.invoice.customer.timezone
2575
+ timezone: pe(a.invoice)
110
2576
  })
111
2577
  }
112
- ), k = (b) => J(b, {
113
- formatMoney: Y,
114
- formatQuantity: (x) => p(Number(x))
115
- }), s = N(
116
- () => ie({
117
- invoice: r.invoice,
118
- getPeriodTitle: $,
2578
+ ), g = (T) => Ae(T, {
2579
+ formatMoney: Me,
2580
+ formatQuantity: (I) => s(Number(I))
2581
+ }), p = P(
2582
+ () => jn({
2583
+ invoice: a.invoice,
2584
+ getPeriodTitle: b,
119
2585
  creditsLabel: m({
120
2586
  defaultMessage: "Credits",
121
2587
  id: "wallet_balance.credit_type_fallback_label",
@@ -126,37 +2592,37 @@ const ae = { class: "flex items-center gap-2" }, ne = /* @__PURE__ */ I({
126
2592
  id: "wallet_balance.wallet_label",
127
2593
  description: "Label for a wallet that pays in money, which the invoice does not name; a currency is appended when there are several"
128
2594
  }),
129
- formatBalance: k
2595
+ formatBalance: g
130
2596
  })
131
2597
  );
132
- return (b, x) => s.value.length > 0 ? (i(), _("section", oe, [
133
- u("div", le, [
134
- (i(!0), _(M, null, j(s.value, (S) => (i(), _("section", {
2598
+ return (T, I) => p.value.length > 0 ? (t(), l("section", Gn, [
2599
+ h("div", Xn, [
2600
+ (t(!0), l(x, null, R(p.value, (S) => (t(), l("section", {
135
2601
  key: S.id
136
2602
  }, [
137
- a(e(X), { class: "mt-4" }, {
138
- default: n(() => [
139
- a(e(V), {
2603
+ n(o(Pe), { class: "mt-4" }, {
2604
+ default: i(() => [
2605
+ n(o(Ie), {
140
2606
  tag: "h3",
141
2607
  variant: "caps-heading"
142
2608
  }, {
143
- default: n(() => [
144
- f(d(S.title), 1)
2609
+ default: i(() => [
2610
+ v(d(S.title), 1)
145
2611
  ]),
146
2612
  _: 2
147
2613
  }, 1024)
148
2614
  ]),
149
2615
  _: 2
150
2616
  }, 1024),
151
- a(e(D), { class: "mt-3" }, {
152
- default: n(() => [
153
- u("tr", null, [
154
- a(e(B), {
2617
+ n(o(G), { class: "mt-3" }, {
2618
+ default: i(() => [
2619
+ h("tr", null, [
2620
+ n(o(M), {
155
2621
  left: "",
156
2622
  class: "text-gray-600"
157
2623
  }, {
158
- default: n(() => [
159
- f(d(e(c)({
2624
+ default: i(() => [
2625
+ v(d(o(c)({
160
2626
  defaultMessage: "Wallet balance",
161
2627
  id: "wallet_balance.details.header",
162
2628
  description: "Section header for invoice wallet balance details"
@@ -165,43 +2631,42 @@ const ae = { class: "flex items-center gap-2" }, ne = /* @__PURE__ */ I({
165
2631
  _: 1
166
2632
  })
167
2633
  ]),
168
- (i(!0), _(M, null, j(S.rows, (g) => (i(), _(M, {
169
- key: g.id
2634
+ (t(!0), l(x, null, R(S.rows, (E) => (t(), l(x, {
2635
+ key: E.id
170
2636
  }, [
171
- u("tr", {
172
- class: "cursor-pointer border-t",
173
- tabindex: "0",
174
- onClick: (y) => e(v)(g.id),
175
- onKeyup: [
176
- T((y) => e(v)(g.id), ["enter"]),
177
- T((y) => e(v)(g.id), ["space"])
178
- ]
179
- }, [
180
- a(e(C), { class: "p-0" }, {
181
- default: n(() => [
182
- a(e(P), {
183
- icon: "keyboard_arrow_down",
184
- size: "md",
185
- class: L(["absolute -translate-x-7 text-slate-400", { "-rotate-90": !e(l)(g.id) }])
186
- }, null, 8, ["class"]),
187
- f(" " + d(g.label) + " ", 1),
188
- u("span", re, d(g.rows.length), 1)
2637
+ h("tr", qn, [
2638
+ n(o(k), { class: "p-0" }, {
2639
+ default: i(() => [
2640
+ h("button", {
2641
+ type: "button",
2642
+ class: "w-full cursor-pointer text-left",
2643
+ "aria-expanded": o(r)(E.id),
2644
+ onClick: (C) => o(f)(E.id)
2645
+ }, [
2646
+ n(o(j), {
2647
+ icon: "keyboard_arrow_down",
2648
+ size: "md",
2649
+ class: N(["absolute -translate-x-7 text-slate-400", { "-rotate-90": !o(r)(E.id) }])
2650
+ }, null, 8, ["class"]),
2651
+ v(" " + d(E.label) + " ", 1),
2652
+ h("span", Kn, d(E.rows.length), 1)
2653
+ ], 8, Yn)
189
2654
  ]),
190
2655
  _: 2
191
2656
  }, 1024)
192
- ], 40, se),
193
- e(l)(g.id) ? (i(), _("tr", ce, [
194
- u("td", de, [
195
- u("div", ue, [
196
- a(e(D), null, {
197
- default: n(() => [
198
- u("tr", null, [
199
- a(e(B), {
2657
+ ]),
2658
+ o(r)(E.id) ? (t(), l("tr", Qn, [
2659
+ h("td", Jn, [
2660
+ h("div", Zn, [
2661
+ n(o(G), null, {
2662
+ default: i(() => [
2663
+ h("tr", null, [
2664
+ n(o(M), {
200
2665
  left: "",
201
2666
  class: "w-2/5"
202
2667
  }, {
203
- default: n(() => [
204
- f(d(e(c)({
2668
+ default: i(() => [
2669
+ v(d(o(c)({
205
2670
  defaultMessage: "Wallet breakdown",
206
2671
  id: "invoice_credits.wallet_breakdown.table_header",
207
2672
  description: "Column header for the wallets that paid the invoice, labelled by credit type or as a wallet balance"
@@ -209,12 +2674,12 @@ const ae = { class: "flex items-center gap-2" }, ne = /* @__PURE__ */ I({
209
2674
  ]),
210
2675
  _: 1
211
2676
  }),
212
- a(e(B), {
2677
+ n(o(M), {
213
2678
  right: "",
214
2679
  class: "w-1/5"
215
2680
  }, {
216
- default: n(() => [
217
- f(d(e(c)({
2681
+ default: i(() => [
2682
+ v(d(o(c)({
218
2683
  defaultMessage: "Balance",
219
2684
  id: "invoice_credits.balance.table_header",
220
2685
  description: "Column header for the available wallet balance amount"
@@ -222,12 +2687,12 @@ const ae = { class: "flex items-center gap-2" }, ne = /* @__PURE__ */ I({
222
2687
  ]),
223
2688
  _: 1
224
2689
  }),
225
- a(e(B), {
2690
+ n(o(M), {
226
2691
  right: "",
227
2692
  class: "w-1/5"
228
2693
  }, {
229
- default: n(() => [
230
- f(d(e(c)({
2694
+ default: i(() => [
2695
+ v(d(o(c)({
231
2696
  defaultMessage: "Used",
232
2697
  id: "invoice_credits.used.table_header",
233
2698
  description: "Column header for the used wallet credit amount"
@@ -235,12 +2700,12 @@ const ae = { class: "flex items-center gap-2" }, ne = /* @__PURE__ */ I({
235
2700
  ]),
236
2701
  _: 1
237
2702
  }),
238
- a(e(B), {
2703
+ n(o(M), {
239
2704
  right: "",
240
2705
  class: "w-1/5"
241
2706
  }, {
242
- default: n(() => [
243
- f(d(e(c)({
2707
+ default: i(() => [
2708
+ v(d(o(c)({
244
2709
  defaultMessage: "Remaining",
245
2710
  id: "invoice_credits.remaining.table_header",
246
2711
  description: "Column header for the remaining wallet credit amount"
@@ -249,31 +2714,31 @@ const ae = { class: "flex items-center gap-2" }, ne = /* @__PURE__ */ I({
249
2714
  _: 1
250
2715
  })
251
2716
  ]),
252
- (i(!0), _(M, null, j(g.rows, (y) => (i(), _("tr", {
253
- key: y.id,
2717
+ (t(!0), l(x, null, R(E.rows, (C) => (t(), l("tr", {
2718
+ key: C.id,
254
2719
  class: "border-t"
255
2720
  }, [
256
- a(e(C), null, {
257
- default: n(() => [
258
- f(d(y.label), 1)
2721
+ n(o(k), null, {
2722
+ default: i(() => [
2723
+ v(d(C.label), 1)
259
2724
  ]),
260
2725
  _: 2
261
2726
  }, 1024),
262
- a(e(C), { number: "" }, {
263
- default: n(() => [
264
- f(d(y.available), 1)
2727
+ n(o(k), { number: "" }, {
2728
+ default: i(() => [
2729
+ v(d(C.available), 1)
265
2730
  ]),
266
2731
  _: 2
267
2732
  }, 1024),
268
- a(e(C), { number: "" }, {
269
- default: n(() => [
270
- f(d(y.used), 1)
2733
+ n(o(k), { number: "" }, {
2734
+ default: i(() => [
2735
+ v(d(C.used), 1)
271
2736
  ]),
272
2737
  _: 2
273
2738
  }, 1024),
274
- a(e(C), { number: "" }, {
275
- default: n(() => [
276
- f(d(y.left), 1)
2739
+ n(o(k), { number: "" }, {
2740
+ default: i(() => [
2741
+ v(d(C.left), 1)
277
2742
  ]),
278
2743
  _: 2
279
2744
  }, 1024)
@@ -283,127 +2748,126 @@ const ae = { class: "flex items-center gap-2" }, ne = /* @__PURE__ */ I({
283
2748
  }, 1024)
284
2749
  ])
285
2750
  ])
286
- ])) : w("", !0)
2751
+ ])) : y("", !0)
287
2752
  ], 64))), 128))
288
2753
  ]),
289
2754
  _: 2
290
2755
  }, 1024)
291
2756
  ]))), 128))
292
2757
  ])
293
- ])) : w("", !0);
2758
+ ])) : y("", !0);
294
2759
  }
295
- }), fe = /* @__PURE__ */ I({
2760
+ }), ti = /* @__PURE__ */ L({
296
2761
  __name: "InvoiceBlock",
297
2762
  props: {
298
2763
  invoice: { type: Object }
299
2764
  },
300
- setup(t) {
301
- const { $t: r } = O(), { isMobileViewport: o } = Z();
302
- return (c, m) => (i(), h(e(U), {
2765
+ setup(e) {
2766
+ const a = e, u = P(() => et(a.invoice)), { $t: c } = W(), { isMobileViewport: m } = tt();
2767
+ return (s, r) => (t(), _(o(Ze), {
303
2768
  class: "sv-invoice__summary grow",
304
- title: e(r)({
2769
+ title: o(c)({
305
2770
  defaultMessage: "Invoice",
306
2771
  description: "Title for the invoice block on the invoice details page",
307
2772
  id: "sdk.invoice_details.invoice.title"
308
2773
  })
309
2774
  }, {
310
- default: n(() => [
311
- u("div", {
312
- class: L(["sv-invoice__summary-body", { "p-6 pt-2": !e(o) }])
2775
+ default: i(() => [
2776
+ h("div", {
2777
+ class: N(["sv-invoice__summary-body", { "p-6 pt-2": !o(m) }])
313
2778
  }, [
314
- e(o) ? (i(), h(e(ne), {
2779
+ o(m) ? (t(), _(o(at), {
315
2780
  key: 0,
316
2781
  variant: "info",
317
2782
  "has-icon": "",
318
2783
  class: "sv-invoice__download-hint justify-center border-gray-100 bg-gray-50 font-semibold text-gray-800"
319
2784
  }, {
320
- default: n(() => [
321
- f(d(e(r)({
2785
+ default: i(() => [
2786
+ v(d(o(c)({
322
2787
  defaultMessage: "Download the PDF for a full breakdown",
323
2788
  description: "Download the PDF for a full breakdown",
324
2789
  id: "sdk.invoice_details.invoice.download_pdf"
325
2790
  })), 1)
326
2791
  ]),
327
2792
  _: 1
328
- })) : w("", !0),
329
- a(e(H), {
2793
+ })) : y("", !0),
2794
+ n(o(Hn), {
330
2795
  class: "sv-invoice__summary-content",
331
- invoice: t.invoice,
332
- "is-expandable": !e(o)
2796
+ invoice: u.value,
2797
+ "is-expandable": !o(m)
333
2798
  }, {
334
- logo: n(() => [
335
- A(c.$slots, "logo")
2799
+ logo: i(() => [
2800
+ $(s.$slots, "logo")
336
2801
  ]),
337
2802
  _: 3
338
2803
  }, 8, ["invoice", "is-expandable"]),
339
- a(me, {
2804
+ n(ei, {
340
2805
  class: "sv-invoice__credits-breakdown",
341
- invoice: t.invoice
2806
+ invoice: e.invoice
342
2807
  }, null, 8, ["invoice"])
343
2808
  ], 2)
344
2809
  ]),
345
2810
  _: 3
346
2811
  }, 8, ["title"]));
347
2812
  }
348
- }), ve = { class: "sv-invoice sv-root sv-component" }, _e = { class: "sv-invoice__body flex flex-col gap-3 lg:flex-row lg:gap-6" }, ge = { class: "sv-invoice__aside flex shrink-0 flex-col gap-8 lg:w-72 lg:gap-6" }, pe = /* @__PURE__ */ I({
2813
+ }), ni = { class: "sv-invoice sv-root sv-component" }, ii = { class: "sv-invoice__body flex flex-col gap-3 lg:flex-row lg:gap-6" }, ai = { class: "sv-invoice__aside flex shrink-0 flex-col gap-8 lg:w-72 lg:gap-6" }, oi = /* @__PURE__ */ L({
349
2814
  __name: "Invoice",
350
2815
  props: {
351
- isLoading: { type: Boolean },
352
2816
  invoice: { type: Object },
353
2817
  payments: { type: Array },
354
2818
  invoiceDownloadService: { type: Function },
355
2819
  configuration: { type: Object }
356
2820
  },
357
- setup(t) {
358
- const r = z(
359
- () => import("../../PaymentHistoryBlock-mCqdFjnL.mjs")
360
- ), { $t: o } = O();
2821
+ setup(e) {
2822
+ const a = Re(
2823
+ () => import("../../PaymentHistoryBlock-BvY2nXGV.mjs")
2824
+ ), { $t: u } = W();
361
2825
  return (c, m) => {
362
- var p, l;
363
- return i(), _("div", ve, [
364
- a(R, {
2826
+ var s, r;
2827
+ return t(), l("div", ni, [
2828
+ n(He, {
365
2829
  class: "sv-invoice__header mb-6",
366
- invoice: t.invoice,
367
- payments: t.payments,
368
- "invoice-download-service": t.invoiceDownloadService,
369
- "is-loading": t.isLoading,
370
- configuration: t.configuration
371
- }, null, 8, ["invoice", "payments", "invoice-download-service", "is-loading", "configuration"]),
372
- u("div", _e, [
373
- t.invoice ? (i(), h(fe, {
2830
+ invoice: e.invoice,
2831
+ payments: e.payments,
2832
+ "invoice-download-service": e.invoiceDownloadService,
2833
+ configuration: e.configuration
2834
+ }, null, 8, ["invoice", "payments", "invoice-download-service", "configuration"]),
2835
+ h("div", ii, [
2836
+ e.invoice ? (t(), _(ti, {
374
2837
  key: 0,
375
2838
  class: "sv-invoice__main",
376
- invoice: t.invoice
377
- }, null, 8, ["invoice"])) : w("", !0),
378
- u("div", ge, [
379
- a(ee, {
2839
+ invoice: e.invoice
2840
+ }, null, 8, ["invoice"])) : y("", !0),
2841
+ h("div", ai, [
2842
+ n(nt, {
380
2843
  class: "sv-invoice__details",
381
- invoice: t.invoice
2844
+ invoice: e.invoice
382
2845
  }, null, 8, ["invoice"]),
383
- (p = t.configuration) != null && p.enablePaymentAttempts && ((l = t.payments) != null && l.length) ? (i(), h(e(r), {
2846
+ (s = e.configuration) != null && s.enablePaymentAttempts && ((r = e.payments) != null && r.length) ? (t(), _(o(a), {
384
2847
  key: 0,
385
2848
  class: "sv-invoice__payment-history",
386
- "payment-attempts": t.payments,
387
- customer: t.invoice.customer
388
- }, null, 8, ["payment-attempts", "customer"])) : w("", !0),
389
- t.configuration.enableCustomerBillingInformation ? (i(), h(e(F), {
2849
+ "payment-attempts": e.payments,
2850
+ customer: e.invoice.customer
2851
+ }, null, 8, ["payment-attempts", "customer"])) : y("", !0),
2852
+ e.configuration.enableCustomerBillingInformation ? (t(), _(o(Fe), {
390
2853
  key: 1,
391
2854
  class: "sv-invoice__billing-information",
392
- customer: t.invoice.customer,
393
- title: e(o)({
2855
+ customer: e.invoice.customer,
2856
+ title: o(u)({
394
2857
  defaultMessage: "Your billing information",
395
2858
  description: "Title for the billing information on the detailed invoice view",
396
2859
  id: "sdk.invoice_details.customer_billing_information.title"
397
2860
  })
398
- }, null, 8, ["customer", "title"])) : w("", !0)
2861
+ }, null, 8, ["customer", "title"])) : y("", !0)
399
2862
  ])
400
2863
  ])
401
2864
  ]);
402
2865
  };
403
2866
  }
404
- }), be = /* @__PURE__ */ I({
2867
+ }), li = /* @__PURE__ */ L({
405
2868
  __name: "Invoice.entry",
406
2869
  props: {
2870
+ portalToken: { type: Object },
407
2871
  environment: { type: String },
408
2872
  locale: { type: String },
409
2873
  dateLocale: { type: String },
@@ -420,47 +2884,47 @@ const ae = { class: "flex items-center gap-2" }, ne = /* @__PURE__ */ I({
420
2884
  branding: { type: Object },
421
2885
  configuration: { type: Object }
422
2886
  },
423
- setup(t) {
424
- var m;
425
- const r = te("invoice"), o = t;
426
- if (!((m = o.configuration) != null && m.invoiceId))
427
- throw new Error("Missing invoice id");
428
- const c = N(() => ({
429
- ...o,
2887
+ setup(e) {
2888
+ const a = We("invoice"), u = e, c = P(() => ({
2889
+ ...u,
430
2890
  configuration: {
431
2891
  enableCustomerBillingInformation: !0,
432
2892
  enableDownloadButton: !0,
433
2893
  enablePaymentAttempts: !0,
434
- ...o.configuration
2894
+ ...u.configuration
435
2895
  }
436
2896
  }));
437
- return (p, l) => (i(), h(e(W), {
438
- entry: p.$props,
439
- "component-name": e(r),
440
- "allowed-portal-types": ["CUSTOMER"],
441
- onError: l[0] || (l[0] = (v) => p.$emit("error", v))
442
- }, {
443
- default: n(() => [
444
- a(K, {
445
- "invoice-id": c.value.configuration.invoiceId
446
- }, {
447
- default: n(({ invoice: v, payments: $, isLoading: k, invoiceDownloadService: s }) => [
448
- v ? (i(), h(pe, {
449
- key: 0,
450
- "is-loading": k,
451
- invoice: v,
452
- "invoice-download-service": s,
453
- payments: $.payments.value,
454
- configuration: c.value.configuration
455
- }, null, 8, ["is-loading", "invoice", "invoice-download-service", "payments", "configuration"])) : w("", !0)
456
- ]),
457
- _: 1
458
- }, 8, ["invoice-id"])
459
- ]),
460
- _: 1
461
- }, 8, ["entry", "component-name"]));
2897
+ return (m, s) => {
2898
+ var r;
2899
+ return t(), _(o(ze), {
2900
+ entry: m.$props,
2901
+ "component-name": o(a),
2902
+ "allowed-portal-types": ["CUSTOMER"],
2903
+ "required-configuration": { invoiceId: (r = e.configuration) == null ? void 0 : r.invoiceId },
2904
+ onError: s[0] || (s[0] = (f) => m.$emit("error", f))
2905
+ }, {
2906
+ default: i(() => [
2907
+ (t(), _(je, {
2908
+ key: c.value.configuration.invoiceId,
2909
+ "invoice-id": c.value.configuration.invoiceId
2910
+ }, {
2911
+ default: i(({ invoice: f, payments: b, invoiceDownloadService: g }) => [
2912
+ f ? (t(), _(oi, {
2913
+ key: 0,
2914
+ invoice: f,
2915
+ "invoice-download-service": g,
2916
+ payments: b.payments.value,
2917
+ configuration: c.value.configuration
2918
+ }, null, 8, ["invoice", "invoice-download-service", "payments", "configuration"])) : y("", !0)
2919
+ ]),
2920
+ _: 1
2921
+ }, 8, ["invoice-id"]))
2922
+ ]),
2923
+ _: 1
2924
+ }, 8, ["entry", "component-name", "required-configuration"]);
2925
+ };
462
2926
  }
463
- }), { define: Oe } = E(be, "invoice");
2927
+ }), { define: Ci } = Ve(li, "invoice");
464
2928
  export {
465
- Oe as defineSolvimonInvoice
2929
+ Ci as defineSolvimonInvoice
466
2930
  };