@solvimon/solvimon-web 0.1.0-alpha.25 → 0.1.0-alpha.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -11
- package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Dh_a0NRB.mjs → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DcrLNA_x.mjs} +6 -6
- package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-BM1_31Tl.js → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DwbIiJBY.js} +1 -1
- package/dist/{Avatar.vue.es-CvxRdCes.js → Avatar.vue.es-Bm6MCMAL.js} +1 -1
- package/dist/{Avatar.vue.es-C9Jkfuvp.mjs → Avatar.vue.es-BqQHvLGA.mjs} +1 -1
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-7wQAw6Lv.js → BillingInformation.vue_vue_type_script_setup_true_lang-0JHnqIpC.js} +1 -1
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BRSUpMPU.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-BFza7Nf9.mjs} +8 -8
- package/dist/{Button.vue.es-BbSN0uOk.mjs → Button.vue.es-C32_baQN.mjs} +1 -1
- package/dist/{Button.vue.es-CeUTAc2n.js → Button.vue.es-qGvnOKnK.js} +1 -1
- package/dist/ChargeOnDemandModal-CIiI74ls.mjs +983 -0
- package/dist/ChargeOnDemandModal-DIQaGnRs.js +1 -0
- package/dist/Checkout.entry.ce-8EcavNgT.js +2 -0
- package/dist/{Checkout.entry.ce-BMzK8nQg.mjs → Checkout.entry.ce-BA5ljKj8.mjs} +1562 -1538
- package/dist/{Chip.vue.es-T22Q7AF9.mjs → Chip.vue.es-CKCOY5T6.mjs} +2 -2
- package/dist/{Chip.vue.es-BN83K3Tk.js → Chip.vue.es-D60gTbfe.js} +1 -1
- package/dist/{ContextMenu.vue.es-DXKR7WFg.js → ContextMenu.vue.es-C7KI8Gz6.js} +1 -1
- package/dist/{ContextMenu.vue.es-0PRmCAzL.mjs → ContextMenu.vue.es-Da-lAmTl.mjs} +10 -10
- package/dist/{CustomerBillingInformation.vue.es-C2j40TYP.mjs → CustomerBillingInformation.vue.es-BxBQt4Q0.mjs} +2 -2
- package/dist/{CustomerBillingInformation.vue.es-yrLGc7oL.js → CustomerBillingInformation.vue.es-bFUx81Ig.js} +1 -1
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BZwGWhaL.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BcTZgshS.mjs} +6 -6
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-C8diNL5x.js → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-C0lJ_ESU.js} +1 -1
- package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-xqMsbuU6.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DkbQ2MiR.mjs} +908 -891
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-hBo2Y2mJ.js +1 -0
- package/dist/{DividerText.vue.es-DsYRZzuE.js → DividerText.vue.es-BF3gnr4e.js} +1 -1
- package/dist/{DividerText.vue.es-CV1XK_Vz.mjs → DividerText.vue.es-DKl3FnDJ.mjs} +1 -1
- package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-kpjrC-4q.mjs → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-C3QYra1x.mjs} +4 -4
- package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-srXOpUb0.js → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-cSQeqr0A.js} +1 -1
- package/dist/{ErrorNotification.vue.es-QfRoDhkn.js → ErrorNotification.vue.es-BX9dHEc-.js} +1 -1
- package/dist/{ErrorNotification.vue.es-CiUJva6S.mjs → ErrorNotification.vue.es-rRKgmkzV.mjs} +1 -1
- package/dist/{IconButton.vue.es-CytBZUkZ.js → IconButton.vue.es-Bwdfu-jm.js} +1 -1
- package/dist/{IconButton.vue.es-ChvsCZQG.mjs → IconButton.vue.es-UlqwNPAX.mjs} +2 -2
- package/dist/{IconTitle.vue.es-DPruIJ6l.mjs → IconTitle.vue.es-CK9k69tV.mjs} +3 -3
- package/dist/{IconTitle.vue.es-DtnpBObk.js → IconTitle.vue.es-Cei98MBw.js} +1 -1
- package/dist/{Input.vue.es-BkzQDkrz.js → Input.vue.es-B47l_feL.js} +1 -1
- package/dist/{Input.vue.es-DJQqJrsb.mjs → Input.vue.es-D9IjIWc-.mjs} +2 -2
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Do0dDtkA.js → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DKlPrxQS.js} +1 -1
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BC-zyUqe.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DUfJl07Y.mjs} +2 -2
- package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-CFhhhwId.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-D9Rtgapa.mjs} +2 -2
- package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-DQFS7SfE.js → InvoiceEntryView.vue_vue_type_script_setup_true_lang-DlJ6lELc.js} +1 -1
- package/dist/InvoiceSummary.vue.es-DBnR9Hs7.js +1 -0
- package/dist/{InvoiceSummary.vue.es-6qpbyymg.mjs → InvoiceSummary.vue.es-DQ4KvTaw.mjs} +576 -565
- package/dist/{Modal.vue.es-JpE0eh_Q.js → Modal.vue.es-8LN4gBh0.js} +1 -1
- package/dist/{Modal.vue.es-BuRlbyZw.mjs → Modal.vue.es-B9xMiyn3.mjs} +5 -5
- package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-nAuhIopc.js → PaymentErrorCard.vue_vue_type_script_setup_true_lang-B1yGKkWN.js} +1 -1
- package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-UmKgVvdj.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-BVzL2PGe.mjs} +4 -4
- package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-YpcWHm24.js → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DSGf6uFP.js} +1 -1
- package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DggCusgC.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-nLTPnH4j.mjs} +3 -3
- package/dist/{PaymentHistoryBlock-DnmParhQ.mjs → PaymentHistoryBlock-DYa99P1M.mjs} +1 -1
- package/dist/{PaymentHistoryBlock-uWuWjr8I.js → PaymentHistoryBlock-Ds93gNvh.js} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BS8N4yt9.js → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CBZhXQfC.js} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BziIf86i.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-D0KnSy0y.mjs} +4 -4
- package/dist/{PaymentIntegrationForm-DTXm56QQ.js → PaymentIntegrationForm-B_Db4DG1.js} +1 -1
- package/dist/{PaymentIntegrationForm-DL55i0HD.mjs → PaymentIntegrationForm-UWoyZgsR.mjs} +1 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-C0J37ZVe.js +1 -0
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-J15IDbMc.mjs +154 -0
- package/dist/{PaymentIntegrationFormAdyen-Cqsy82To.mjs → PaymentIntegrationFormAdyen-D4qfNtZ_.mjs} +197 -183
- package/dist/PaymentIntegrationFormAdyen-HeA9XIj-.js +98 -0
- package/dist/{PaymentIntegrationFormStripe-DIU1rnwH.mjs → PaymentIntegrationFormStripe-BIiMCWlV.mjs} +247 -220
- package/dist/PaymentIntegrationFormStripe-DUCJTIAq.js +102 -0
- package/dist/PaymentMethod.vue.es-CJcSZ9lN.js +1 -0
- package/dist/{PaymentMethod.vue.es-m1NasGqw.mjs → PaymentMethod.vue.es-CKu5nApX.mjs} +168 -148
- package/dist/{PaymentMethodForm-BEVdWCrH.js → PaymentMethodForm-1d0YIGOu.js} +1 -1
- package/dist/{PaymentMethodForm-BYzt1PVP.mjs → PaymentMethodForm-B05sHWcW.mjs} +1 -1
- package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-BDm8l_6N.js +1 -0
- package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-fdRTp7sc.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-D1yIYsb_.mjs} +45 -41
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-FhMBZqtI.js → PaymentMethodsList.vue_vue_type_script_setup_true_lang-BE4S26JX.js} +1 -1
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-FChyZp2v.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-DGpXRtp4.mjs} +6 -6
- package/dist/PlanCustomizationEditor-CEMP_Dhz.js +1 -0
- package/dist/PlanCustomizationEditor-CpZeilm5.mjs +694 -0
- package/dist/{PricingGroupRangeInput.vue.es-B4ZbKxUw.mjs → PricingGroupRangeInput.vue.es-CJpvUP3-.mjs} +4 -4
- package/dist/{PricingGroupRangeInput.vue.es-Ba3v0J_R.js → PricingGroupRangeInput.vue.es-DZSJ5Mz0.js} +1 -1
- package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DJ81eUJX.mjs +141 -0
- package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-jrkraJMu.js +1 -0
- package/dist/{RadioGroupExtended.vue.es-CkhBp9kI.mjs → RadioGroupExtended.vue.es-BalV7gwp.mjs} +2 -2
- package/dist/{RadioGroupExtended.vue.es-CHrcqSRq.js → RadioGroupExtended.vue.es-Dt6LH9Yh.js} +1 -1
- package/dist/{Section.vue.es-D5svcVS_.mjs → Section.vue.es-D7eiXUbk.mjs} +1 -1
- package/dist/{Section.vue.es-CSrVPlUK.js → Section.vue.es-zVXBHAL6.js} +1 -1
- package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BqOSBdFQ.js → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BdjYFrVC.js} +1 -1
- package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BM9Y4Cy3.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DudMRVka.mjs} +6 -6
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-D4sbq9nA.js +1 -0
- package/dist/{Skeleton.vue_vue_type_script_setup_true_lang-DRLoYWGY.mjs → Skeleton.vue_vue_type_script_setup_true_lang-D60YtA9z.mjs} +5 -5
- package/dist/StepInput.vue.es-C3Zm6Wc9.mjs +199 -0
- package/dist/StepInput.vue.es-mAnuCuDQ.js +1 -0
- package/dist/SubscriptionDetails.entry.ce-D4CsSoR9.js +1 -0
- package/dist/SubscriptionDetails.entry.ce-WEimiOex.mjs +1057 -0
- package/dist/{SubscriptionSchedules-CMVoB2bw.js → SubscriptionSchedules-Cm5Dt-1H.js} +1 -1
- package/dist/{SubscriptionSchedules-yDcsD1hd.mjs → SubscriptionSchedules-DrrEAPlx.mjs} +1 -1
- package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DZHsQImd.mjs → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DHp_KtbF.mjs} +2284 -2341
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-t2Awijf5.js +1 -0
- package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-BmNl5u8R.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-3VYfm6Hm.mjs} +3 -3
- package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-BgXZMihr.js → SubscriptionSummary.vue_vue_type_script_setup_true_lang-B41qZmcL.js} +1 -1
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DOJ0t_fo.js → SubscriptionsList.vue_vue_type_script_setup_true_lang-Bu-_clEa.js} +1 -1
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-BUzdZHah.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-DFU0IULg.mjs} +8 -8
- package/dist/{TooltipParagraph.vue.es-CxdL8-B7.mjs → TooltipParagraph.vue.es-BXbOJmjr.mjs} +3 -3
- package/dist/TooltipParagraph.vue.es-Cph6zT31.js +1 -0
- package/dist/{TrialChip.vue.es-BCc8q5j0.js → TrialChip.vue.es-C_wgHGuN.js} +1 -1
- package/dist/{TrialChip.vue.es-BK7m7e7q.mjs → TrialChip.vue.es-C_yRujip.mjs} +2 -2
- package/dist/{cn.es-ZXNzpauQ.mjs → cn.es-CGa6b2Lt.mjs} +2 -2
- package/dist/{cn.es-71nFUose.js → cn.es-D9YMDvG2.js} +1 -1
- package/dist/components/BillingInformation/BillingInformation.cjs +1 -1
- package/dist/components/BillingInformation/BillingInformation.mjs +4 -4
- package/dist/components/BillingInformationForm/BillingInformationForm.cjs +1 -1
- package/dist/components/BillingInformationForm/BillingInformationForm.mjs +246 -230
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs +1 -1
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +4 -4
- package/dist/components/Invoice/Invoice.cjs +1 -1
- package/dist/components/Invoice/Invoice.mjs +201 -212
- package/dist/components/InvoiceDetails/InvoiceDetails.cjs +1 -1
- package/dist/components/InvoiceDetails/InvoiceDetails.mjs +4 -4
- package/dist/components/InvoiceHeader/InvoiceHeader.cjs +1 -1
- package/dist/components/InvoiceHeader/InvoiceHeader.mjs +2 -2
- package/dist/components/InvoicesList/InvoicesList.cjs +1 -1
- package/dist/components/InvoicesList/InvoicesList.mjs +3 -3
- package/dist/components/PaymentHistory/PaymentHistory.cjs +1 -1
- package/dist/components/PaymentHistory/PaymentHistory.mjs +4 -4
- package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs +1 -1
- package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +5 -5
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs +1 -1
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +4 -4
- package/dist/components/SubscriptionsList/SubscriptionsList.cjs +1 -1
- package/dist/components/SubscriptionsList/SubscriptionsList.mjs +5 -5
- package/dist/components/WalletBalances/WalletBalances.cjs +1 -1
- package/dist/components/WalletBalances/WalletBalances.mjs +3 -3
- package/dist/{customElements-hH6pju3X.js → customElements-C963-LtW.js} +36 -32
- package/dist/{customElements-q_i9y0Ph.mjs → customElements-D5DAoHRI.mjs} +231 -196
- package/dist/{customer-BDoOIAFr.mjs → customer-DKa1B2vp.mjs} +4 -4
- package/dist/{customer-C9q6ti8s.js → customer-TE1FnGT0.js} +1 -1
- package/dist/{de-DE-BSlbAnPE.js → de-DE-B4TUdnUf.js} +1 -1
- package/dist/{de-DE-B_ik9VNt.mjs → de-DE-CLfzTbbX.mjs} +38 -6
- package/dist/de-DE-DaBBl-Ak.js +1 -0
- package/dist/{de-DE-DXsG-vXA.mjs → de-DE-jkW2dJrX.mjs} +28 -14
- package/dist/en-US-BNevqm0M.js +1 -0
- package/dist/{en-US-DkCltadt.mjs → en-US-D6SGRAch.mjs} +38 -6
- package/dist/en-US-J85TQRI8.js +1 -0
- package/dist/{en-US-C939IZ5i.mjs → en-US-SDhjlY_v.mjs} +20 -5
- package/dist/formControl-ODrpUvcA.js +1 -0
- package/dist/{index-BPU8tIml.mjs → formControl-dX7l8o3c.mjs} +160 -143
- package/dist/icon-sprite.svg.es-BZIz7-0d.mjs +4 -0
- package/dist/icon-sprite.svg.es-Ds6lDf5p.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +4 -4
- package/dist/{invoices-CHp75zZI.js → invoices-ClqTWYF9.js} +1 -1
- package/dist/{invoices-DIzkXntV.mjs → invoices-DJTwftJv.mjs} +1 -1
- package/dist/it-IT-BkPbTueL.js +1 -0
- package/dist/{it-IT-DT3rfjOY.js → it-IT-CSYvGmpT.js} +1 -1
- package/dist/{it-IT-BxpwB3oJ.mjs → it-IT-CaaFToGB.mjs} +20 -6
- package/dist/{it-IT-CHj2McbF.mjs → it-IT-Cym1UvvK.mjs} +38 -6
- package/dist/{nl-NL-DfkhOJKc.js → nl-NL-CpE4IgwO.js} +1 -1
- package/dist/{nl-NL-na2I4aiP.mjs → nl-NL-D0MQKaql.mjs} +34 -20
- package/dist/{nl-NL-Cdvd_XMN.mjs → nl-NL-D0c4x5C0.mjs} +38 -6
- package/dist/nl-NL-jIfAVGv0.js +1 -0
- package/dist/paymentMethods-AL2U_byg.js +1 -0
- package/dist/{paymentMethods-DEKp_4QM.mjs → paymentMethods-CWzJhcWK.mjs} +16 -14
- package/dist/{payments-DBvregE8.js → payments-BmiHMlQt.js} +1 -1
- package/dist/{payments-C0-Hq2a4.mjs → payments-aXyfylwk.mjs} +6 -6
- package/dist/pricing.es-C07bgEZx.js +1 -0
- package/dist/pricing.es-QYWrKMUJ.mjs +30 -0
- package/dist/pricingPlanSchedules-BD4GIP_F.mjs +32 -0
- package/dist/pricingPlanSchedules-BfsMSvN0.js +1 -0
- package/dist/screens/Checkout/Checkout.cjs +1 -1
- package/dist/screens/Checkout/Checkout.mjs +2 -2
- package/dist/screens/CustomerOverview/CustomerOverview.cjs +1 -1
- package/dist/screens/CustomerOverview/CustomerOverview.mjs +10 -10
- package/dist/screens/PayInvoice/PayInvoice.cjs +1 -1
- package/dist/screens/PayInvoice/PayInvoice.mjs +57 -55
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs +1 -1
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +9 -9
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs +1 -1
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +3 -769
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs +1 -1
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +243 -270
- package/dist/{subscription-CrVOr5MF.mjs → subscription-D1yHKUNc.mjs} +2 -2
- package/dist/{subscriptions-BArXBCFr.js → subscriptions-Cm83ckfl.js} +1 -1
- package/dist/{subscriptions--9MaTXMb.mjs → subscriptions-cnR5fnf7.mjs} +1 -1
- package/dist/types/components/{wallets/WalletModalShell.types.d.ts → payments/OnDemandPaymentModalShell/OnDemandPaymentModalShell.types.d.ts} +3 -3
- package/dist/types/components/payments/PaymentIntegrationForm/PaymentIntegrationForm.types.d.ts +5 -0
- package/dist/types/components/payments/PaymentIntegrationFormStripe/PaymentIntegrationFormStripeFrame.types.d.ts +5 -9
- package/dist/types/components/providers/ActionDispatchProvider/ActionDispatchProvider.vue.d.ts +7 -11
- package/dist/types/components/providers/AuthProvider/AuthProvider.vue.d.ts +7 -11
- package/dist/types/components/providers/ConfigProvider/ConfigProvider.vue.d.ts +7 -11
- package/dist/types/components/providers/CssOverridesProvider/CssOverridesProvider.vue.d.ts +7 -11
- package/dist/types/components/providers/EntryProvider/EntryProvider.vue.d.ts +7 -11
- package/dist/types/components/providers/ErrorBoundary/ErrorBoundary.vue.d.ts +7 -11
- package/dist/types/components/providers/ExperimentalFeatureProvider/ExperimentalFeatureProvider.vue.d.ts +7 -11
- package/dist/types/components/providers/HostElementProvider/HostElementProvider.vue.d.ts +7 -11
- package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +2 -2
- package/dist/types/components/providers/LoggerProvider/LoggerProvider.vue.d.ts +7 -11
- package/dist/types/components/providers/PortalProvider/PortalProvider.vue.d.ts +7 -11
- package/dist/types/components/providers/Provider/Provider.vue.d.ts +7 -11
- package/dist/types/components/providers/TeleportProvider/TeleportProvider.vue.d.ts +7 -11
- package/dist/types/components/providers/TranslationProvider/TranslationOverride.vue.d.ts +7 -11
- package/dist/types/components/providers/TranslationProvider/TranslationProvider.vue.d.ts +7 -11
- package/dist/types/components/subscriptions/ChargeOnDemandModal/ChargeOnDemandModal.types.d.ts +21 -0
- package/dist/types/components/subscriptions/OnDemandItemsCard/OnDemandItemsCard.types.d.ts +7 -0
- package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.configuration.types.d.ts +27 -0
- package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.entry.types.d.ts +1 -1
- package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.types.d.ts +6 -5
- package/dist/types/services/paymentMethods.types.d.ts +4 -2
- package/dist/types/services/requests.types.d.ts +5 -0
- package/dist/types/vendor/@solvimon/solvimon-types/index.d.ts +5 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/AgentContext.d.ts +3 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ApprovalPolicies.d.ts +6 -1
- package/dist/types/vendor/@solvimon/solvimon-types/types/ChargeOnDemandPricingItems.d.ts +23 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/CustomFields.d.ts +16 -4
- package/dist/types/vendor/@solvimon/solvimon-types/types/Embeddable.d.ts +8 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Invoice.d.ts +21 -6
- package/dist/types/vendor/@solvimon/solvimon-types/types/OAuth.d.ts +28 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentAcceptor.d.ts +2 -1
- package/dist/types/vendor/@solvimon/solvimon-types/types/Permission.d.ts +1 -1
- package/dist/types/vendor/@solvimon/solvimon-types/types/Platform.d.ts +6 -1
- package/dist/types/vendor/@solvimon/solvimon-types/types/Portal.d.ts +5 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingItemConfig.d.ts +5 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanGroups.d.ts +31 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSchedule.d.ts +9 -1
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanScheduleInfo.d.ts +1 -1
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSubscription.d.ts +3 -3
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlans.d.ts +3 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Product.d.ts +2 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ProductItem.d.ts +2 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/QuoteTemplates.d.ts +2 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ResourceStatus.d.ts +1 -1
- package/dist/types/vendor/@solvimon/solvimon-types/types/SeatAssignment.d.ts +22 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Wallet.d.ts +6 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Workflows.d.ts +128 -1
- package/dist/{useActionDispatchProvider-CKzeqXzY.js → useActionDispatchProvider-CHkVQMaE.js} +1 -1
- package/dist/{useActionDispatchProvider-BdciAX8T.mjs → useActionDispatchProvider-DDYqIh3r.mjs} +1 -1
- package/dist/{useCustomer-DSYr0F58.js → useCustomer-DGYtowRy.js} +1 -1
- package/dist/{useCustomer-D8ixhuuj.mjs → useCustomer-XZKWsolE.mjs} +1 -1
- package/dist/{useCustomerFormLabels-htMZ0xqB.mjs → useCustomerFormLabels-CcnkJLcB.mjs} +6 -6
- package/dist/useCustomerFormLabels-DAZziqYt.js +1 -0
- package/dist/{useExperimentalFeature-D29-TO3R.js → useExperimentalFeature-COOU6IZd.js} +1 -1
- package/dist/{useExperimentalFeature-JK_kAUQQ.mjs → useExperimentalFeature-ierhOt9Q.mjs} +1 -1
- package/dist/{useInvoiceData-Bpbog3zW.mjs → useInvoiceData-BEK-7msA.mjs} +3 -3
- package/dist/{useInvoiceData-DhrItfv7.js → useInvoiceData-CQRn8l9C.js} +1 -1
- package/dist/{useInvoicesList-duu_b5GW.js → useInvoicesList-BQkKyyXa.js} +1 -1
- package/dist/{useInvoicesList-BGwcJn4I.mjs → useInvoicesList-C4I118KM.mjs} +7 -7
- package/dist/{useLoadInitialData-BDmmpcfb.mjs → useLoadInitialData-CR0kbYw8.mjs} +1 -1
- package/dist/{useLoadInitialData-U2WvBmXT.js → useLoadInitialData-CrKnBZs_.js} +1 -1
- package/dist/{usePaymentMethodAvailability-DwtT5Czz.js → usePaymentMethodAvailability-Ci6LeYKt.js} +1 -1
- package/dist/{usePaymentMethodAvailability-adqRujTA.mjs → usePaymentMethodAvailability-ZH-m3B-A.mjs} +12 -12
- package/dist/{usePaymentMethodOptions-DlZtTQNQ.mjs → usePaymentMethodOptions-Ciifjo6c.mjs} +15 -13
- package/dist/usePaymentMethodOptions-Cqe92ZBn.js +1 -0
- package/dist/{usePaymentMethods-BnmSo_rr.mjs → usePaymentMethods-B-OKRyKd.mjs} +1 -1
- package/dist/{usePaymentMethods-DZ1a0mnr.js → usePaymentMethods-BKwrl82-.js} +1 -1
- package/dist/usePayments-Bauj16B-.js +1 -0
- package/dist/{usePayments-s-Z1di8d.mjs → usePayments-CV85OV8V.mjs} +46 -41
- package/dist/{usePortal-Hm7wvtgQ.js → usePortal-DSLImEfr.js} +1 -1
- package/dist/{usePortal-C4rR5Rhu.mjs → usePortal-H8Tv2TnZ.mjs} +1 -1
- package/dist/{useSubscription-DMAEJves.js → useSubscription-BiYNJT2e.js} +1 -1
- package/dist/{useSubscription-DSsXVO0h.mjs → useSubscription-DqnxWNKg.mjs} +1 -1
- package/dist/{useTimePeriod.es-CW8ycmpT.mjs → useTimePeriod.es-B22-fno3.mjs} +1 -1
- package/dist/{useTimePeriod.es-anHB63am.js → useTimePeriod.es-D2aiyfd-.js} +1 -1
- package/dist/useWatchDebounced-B8iX7ykx.js +1 -0
- package/dist/useWatchDebounced-BHlBPcXB.mjs +20 -0
- package/package.json +11 -8
- package/dist/Checkout.entry.ce-DgA0ckyl.js +0 -2
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DzbPUvHN.js +0 -1
- package/dist/InvoiceSummary.vue.es-v1TkOUhA.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-4RmdLbzY.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CvpFnl9V.mjs +0 -141
- package/dist/PaymentIntegrationFormAdyen-C9KoiqMh.js +0 -98
- package/dist/PaymentIntegrationFormStripe-DTLgGutU.js +0 -102
- package/dist/PaymentMethod.vue.es-ZWda5GqF.js +0 -1
- package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-CzUwtVEI.js +0 -1
- package/dist/PlanCustomizationEditor-CunwwXTw.js +0 -1
- package/dist/PlanCustomizationEditor-NLVkEYFF.mjs +0 -877
- package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-Dvuj-fos.mjs +0 -131
- package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-iE4dLawA.js +0 -1
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-DypW8aNJ.js +0 -1
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DH7IZrNT.js +0 -1
- package/dist/TooltipParagraph.vue.es-DS_69pl1.js +0 -1
- package/dist/de-DE-npBTLtKL.js +0 -1
- package/dist/en-US-9xdcz3T5.js +0 -1
- package/dist/en-US-kGduGoka.js +0 -1
- package/dist/icon-sprite.svg.es-Bt21fMEt.mjs +0 -4
- package/dist/icon-sprite.svg.es-Dauis9LS.js +0 -1
- package/dist/index-DwueOtPi.js +0 -1
- package/dist/it-IT-BayNIAy7.js +0 -1
- package/dist/nl-NL-0rV4nFLw.js +0 -1
- package/dist/paymentMethods-CZGP6_4W.js +0 -1
- package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagement.types.d.ts +0 -47
- package/dist/useCustomerFormLabels-CRumh405.js +0 -1
- package/dist/usePaymentMethodOptions-CXdFKFqZ.js +0 -1
- package/dist/usePayments-DL4agK2i.js +0 -1
- package/dist/useWatchDebounced-CAU1WI1P.js +0 -1
- package/dist/useWatchDebounced-DT5IicPp.mjs +0 -14
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),Rt=require("./Section.vue.es-zVXBHAL6.js"),ee=require("./formatting.es-C72Nsrmh.js"),yt=require("./comparators.es-OGt19O9U.js"),U=require("./Chip.vue.es-D60gTbfe.js"),ne=require("./Expand.vue.es-BtM0EZEr.js"),oe=require("./cn.es-D9YMDvG2.js"),E=require("./customElements-C963-LtW.js"),j=require("./floating-ui.vue.es-Bly3DGWm.js"),bt=require("./IconTitle.vue.es-Cei98MBw.js"),R=require("./Button.vue.es-qGvnOKnK.js"),pe=require("./index.es-BclokHQX.js"),ge=require("./Alert.vue.es-RyK53a2P.js"),At=require("./getComposedString.es-haS4bAj7.js"),z=require("./pricing.es-C07bgEZx.js"),M=require("./useService-H7BjLg8P.js"),ue=require("./DividerText.vue.es-BF3gnr4e.js"),L=require("./Amount.vue.es-DExaYBqm.js"),ce=require("./Comparators.vue.es-DmkxV0gb.js"),I=require("./TooltipParagraph.vue.es-Cph6zT31.js"),T=require("./pricingItemConfigs.es-D4aYkYcf.js"),fe=require("./slots.es-T9ZJRGtG.js"),G=require("./typeGuards.es-DS3vZaJn.js"),at=require("./PricingGroupRangeInput.vue.es-DZSJ5Mz0.js"),Ft=require("./Avatar.vue.es-Bm6MCMAL.js"),rt=require("./TrialChip.vue.es-C_wgHGuN.js"),me=require("./object.es-CdriXMPs.js"),Mt=1122.515625;function Zt(t,n,i,o){const s=n.getBoundingClientRect().top+window.scrollY,u=Math.floor(s/o),m=[...t.querySelectorAll(i)];for(let l=m.length-1;l>=0;l--){const c=m[l],d=c.getBoundingClientRect().top+window.scrollY,a=Math.floor(d/o);if(d<s&&a===u)return c;if(d<s&&a<u)break}return null}function Ut(t,n){if(!(n!=null&&n.length))return 0;const i=new Set;return n.reduce((o,s)=>{const u=t.querySelector(s);return!u||i.has(u)?o:(i.add(u),o+u.getBoundingClientRect().height)},0)}function Ht(t,n,i={enabled:!1}){const o=i.pageHeight??Mt,s=i.pushThreshold??.6,u=i.smallOverflowRatio??.1,m=[],l=_=>{var g;if((g=i.expandSelectors)!=null&&g.length)for(const r of i.expandSelectors)_.querySelectorAll(r).forEach(v=>{getComputedStyle(v).display==="none"&&(v.style.display="block",m.push(v))})},c=()=>{m.forEach(_=>_.style.display="none"),m.length=0},d=()=>{const _=t.value;if(!_)return;l(_);const r=((_.getBoundingClientRect().top+window.scrollY)%o+o)%o;[..._.querySelectorAll(n)].forEach(x=>{x.style.marginTop="";const B=x.getBoundingClientRect().top+window.scrollY,V=x.getBoundingClientRect().height,y=((B-r)%o+o)%o,p=o-y,b=Ut(x,i.protectedTopSelectors);if(V<=p)return;const h=(k,S)=>{const w=i.companionSelector?Zt(_,k,i.companionSelector,o):null;if(w){const D=((w.getBoundingClientRect().top+window.scrollY-r)%o+o)%o,$=o-D;D>o*.5?w.style.marginTop=`${$}px`:k.style.marginTop=`${S}px`}else k.style.marginTop=`${S}px`};if(b>0&&p<b){h(x,p);return}if(V>o){y>o*.5&&h(x,p);return}const f=(V-p)/o<u,C=p/V<s;(f||C)&&h(x,p)})},a=()=>{const _=t.value;_&&(c(),_.querySelectorAll(n).forEach(g=>{g.style.marginTop=""}),i.companionSelector&&_.querySelectorAll(i.companionSelector).forEach(g=>{g.style.marginTop=""}))};return e.onMounted(()=>{i.enabled&&(window.addEventListener("beforeprint",d),window.addEventListener("afterprint",a))}),e.onUnmounted(()=>{i.enabled&&(window.removeEventListener("beforeprint",d),window.removeEventListener("afterprint",a))}),{adjust:d,reset:a}}const Gt=(t,n={})=>{const{estimatedHeight:i,mountMargin:o="200px 0px",unmountMargin:s="600px 0px",keepMountedOnce:u=!1}=n,m=()=>e.unref(n.disabled)??!1,l=e.ref(m()),c=e.ref(null),d=async()=>{l.value=!0,await e.nextTick();const r=e.unref(t);r&&r.offsetHeight>0&&(c.value=r.offsetHeight)},a=pe.useIntersectionObserver(t,([r])=>{m()||!(r!=null&&r.isIntersecting)||(d(),u&&(a.stop(),_.stop()))},{rootMargin:o,threshold:0}),_=pe.useIntersectionObserver(t,([r])=>{m()||u||r!=null&&r.isIntersecting||(l.value=!1)},{rootMargin:s,threshold:0});a.isSupported.value||(l.value=!0),e.watch(m,r=>{r&&d()}),e.onBeforeUnmount(()=>{a.stop(),_.stop()});const g=e.computed(()=>{if(l.value)return;const r=c.value??i;return r===void 0?void 0:{minHeight:`${r}px`}});return{shouldRender:l,placeholderStyle:g}},kt=Symbol("expandedConfigs"),jt=(t={})=>{const n=e.ref(!t.defaultCollapsed),i=e.reactive(new Set),o=m=>i.has(m)?!n.value:n.value,s=(m,l)=>{l===n.value?i.delete(m):i.add(m)},u=m=>Array.isArray(m)?m:[m];return{isExpanded:o,toggle:m=>s(m,!o(m)),expand:m=>u(m).forEach(l=>s(l,!0)),collapse:m=>u(m).forEach(l=>s(l,!1)),expandAll:()=>{n.value=!0,i.clear()},collapseAll:()=>{n.value=!1,i.clear()}}},_t=(t={})=>{const n=jt(t);return e.provide(kt,n),n},qt=(t={})=>{const n=e.inject(kt,null);return n||_t(t)},Wt=Symbol("viewportGating"),Yt=()=>e.inject(Wt,!1),Kt=(t,n=!0)=>{const i=At.getComposedString((t.products??[]).map(o=>o.name??""));return t.name?n?`${t.name} - ${i}`:t.name:i},Jt=(t,n)=>{var i,o;return!!((i=t.enabled_pricings)!=null&&i.some(({pricing_id:s})=>s===n.id)||(o=t.override_pricings)!=null&&o.some(s=>"id"in s&&s.id===n.id||s.original_pricing_id===n.id))},ct=t=>{var n,i;return[...((n=t.enabled_pricings)==null?void 0:n.map(({pricing_id:o})=>o))??[],...((i=t.override_pricings)==null?void 0:i.map(o=>"id"in o?o.id:o.original_pricing_id))??[]]},Xt=({schedule:t,pricingItemConfigIds:n})=>{var i;const o=new Set(n);return(i=t.units)==null?void 0:i.find(s=>o.has(s.pricing_item_config_id))},Ct=({schedule:t,pricingItemConfigIds:n})=>{var i,o;const s=new Date,u=new Set(n),m=(i=t.seats_values)==null?void 0:i.map((l,c)=>({seatsValue:l,index:c})).filter(({seatsValue:l})=>{if(!u.has(l.pricing_item_config_id))return!1;const c=l.set_start_at_to_now||!l.start_at||new Date(l.start_at)<=s,d=!l.end_at||new Date(l.end_at)>s;return c&&d});return(o=m==null?void 0:m.sort((l,c)=>{const d=l.seatsValue.set_start_at_to_now?s.getTime():l.seatsValue.start_at?new Date(l.seatsValue.start_at).getTime():0,a=c.seatsValue.set_start_at_to_now?s.getTime():c.seatsValue.start_at?new Date(c.seatsValue.start_at).getTime():0;return a!==d?a-d:c.index-l.index})[0])==null?void 0:o.seatsValue},st=(t,n)=>{var i;const o=l=>l==null?void 0:l.map(c=>{var d;return{...c,configs:(d=c.configs)==null?void 0:d.map(u)}}),s=l=>l==null?void 0:l.map(c=>{var d;return{...c,configs:(d=c.configs)==null?void 0:d.map(u),billing_period_configs:o(c.billing_period_configs)}}),u=l=>{var c,d,a;const _=(c=n.included_volumes)==null?void 0:c.find(v=>v.pricing_item_config_id===l.id),g=Ct({schedule:n,pricingItemConfigIds:[l.id]})??((d=n.seats_values)==null?void 0:d.find(v=>v.pricing_item_config_id===l.id)),r=Xt({schedule:n,pricingItemConfigIds:[l.id]});return{...l,...!M.isEmpty(_)&&{default_included_volume:me.pick(_,["amount","number","reset_type"])},...!M.isEmpty(g)&&{default_seats_value:me.pick(g,"number")},...!M.isEmpty(r)&&{default_units:me.pick(r,"number")},conditions:l.conditions?{...l.conditions,configs:(a=l.conditions.configs)==null?void 0:a.map(u)}:void 0}};return{...t,entitlements:(l=>{var c,d,a;const _=v=>{var x;return(x=l.products)==null?void 0:x.some(B=>{var V;return(V=B.features)==null?void 0:V.some(y=>y.id===v.feature_id)})},g=((d=(c=n.entitlements)==null?void 0:c.filter(v=>_(v)))==null?void 0:d.reduce((v,x)=>{var B,V;const y=(V=(B=l.entitlements)==null?void 0:B.find(p=>p.feature_id===x.feature_id))==null?void 0:V.feature;return y?[...v,{...x,feature:y}]:v},[]))??[];return M.isEmpty(g)?l.entitlements:[...((a=l.entitlements)==null?void 0:a.filter(v=>_(v)&&!(g!=null&&g.some(x=>x.feature_id===v.feature_id))))??[],...g]})(t),items:(i=t.items)==null?void 0:i.map(l=>({...l,...l.configs&&{configs:l.configs.map(u)},...l.billing_period_configs&&{billing_period_configs:o(l.billing_period_configs)},...l.pricing_currency_configs&&{pricing_currency_configs:s(l.pricing_currency_configs)}}))}},dt=(t,n,i={displayDisabledAddonPricings:!1})=>{var o,s;const u=m=>i.displayDisabledAddonPricings||m.product_type!=="ADDON"||Jt(n,m);return{...t,pricing_categories:(s=(o=t.pricing_categories)==null?void 0:o.map(m=>{var l,c,d,a;return{...m,pricing_groups:(c=(l=m.pricing_groups)==null?void 0:l.map(_=>{var g,r;return{..._,pricings:(r=(g=_.pricings)==null?void 0:g.filter(u))==null?void 0:r.map(v=>st(v,n))}}))==null?void 0:c.filter(_=>!M.isEmpty(_.pricings)),pricings:(a=(d=m.pricings)==null?void 0:d.filter(u))==null?void 0:a.map(_=>st(_,n))}}))==null?void 0:s.filter(m=>i.displayDisabledAddonPricings||!(M.isEmpty(m.pricing_groups)&&M.isEmpty(m.pricings)))}},Qt=t=>["AT_MOST_ONE","EXACTLY_ONE"].includes(t.selection_constraint),en=t=>n=>{if(!n)return 0;if(n.tier_top_bound&&G.isBandNumber(n.tier_top_bound))return t.formatNumber(+n.tier_top_bound.number);if(G.isBandCount(n.tier_top_bound))return t.formatNumber(+n.tier_top_bound.count);if(G.isBandAmount(n.tier_top_bound))return ee.formatAmount(n.tier_top_bound.amount)},tn=t=>(n,i,o)=>{if(o===i.length-1)return t.infinite;if(n.tier_top_bound&&"number"in n.tier_top_bound&&G.isBandNumber(n.tier_top_bound))return t.formatNumber(+n.tier_top_bound.number);if(n.tier_top_bound&&"count"in n.tier_top_bound&&G.isBandCount(n.tier_top_bound))return t.formatNumber(+n.tier_top_bound.count);if(n.tier_top_bound&&"amount"in n.tier_top_bound&&G.isBandAmount(n.tier_top_bound))return ee.formatAmount(n.tier_top_bound.amount)},nn=(t,n)=>{var i,o;return(o=(i=t.markup)==null?void 0:i.pricing_item_configs)==null?void 0:o.find(({ids:s})=>s==null?void 0:s.includes(n.id))},on=(t,n)=>t.type===n.type&&t.value===n.value,ut=(t,n)=>t!=null&&t.length?n?t.filter(({billing_period:i})=>on(i,n)):t:[],xt=(t,n)=>{var i;if(!((i=t.pricing_currency_configs)!=null&&i.length)||!n)return;const o=t.pricing_currency_configs.find(s=>s.currency===n)??t.pricing_currency_configs[0];if(o)return o.fallback_currency?{config:t.pricing_currency_configs.find(u=>u.currency===o.fallback_currency),additionalFields:{use_fallback_currency:!0,fallback_currency:o.fallback_currency}}:{config:o,additionalFields:void 0}},ln=(t,n)=>{var i,o,s,u;if(!((i=t.pricing_currency_configs)!=null&&i.length))return(((o=t.billing_period_configs)==null?void 0:o.length)??0)>0;const m=xt(t,n);return(((u=(s=m==null?void 0:m.config)==null?void 0:s.billing_period_configs)==null?void 0:u.length)??0)>0},an=(t,n,i)=>{var o,s,u,m;const{configs:l,billing_period_configs:c,...d}=t;if(!((o=t.pricing_currency_configs)!=null&&o.length)&&((s=t.billing_period_configs)!=null&&s.length)){const _=ut(t.billing_period_configs,i).flatMap(g=>(g.configs??[]).map(r=>{var v;return{...r,details:{...r.details,pricing_period:((v=r.details)==null?void 0:v.pricing_period)??g.billing_period}}}));return{...d,configs:_}}if(!((u=t.pricing_currency_configs)!=null&&u.length)||!n)return t;const a=xt(t,n);if(!(a!=null&&a.config))return t;if((m=a.config.billing_period_configs)!=null&&m.length){const _=ut(a.config.billing_period_configs,i).flatMap(g=>(g.configs??[]).map(r=>{var v;return{...r,...a.additionalFields,details:{...r.details,pricing_period:((v=r.details)==null?void 0:v.pricing_period)??g.billing_period}}}));return{...d,configs:_}}return{...d,configs:(a.config.configs??[]).map(_=>({..._,...a.additionalFields}))}},mt=(t,n,i)=>{var o;return(o=t.items)!=null&&o.length?t.items.map(s=>an(s,n,i)):t.items},rn=(t,n,i)=>{var o;return{...t,pricing_categories:(o=t.pricing_categories)==null?void 0:o.map(s=>{var u,m;return{...s,pricings:(u=s.pricings)==null?void 0:u.map(l=>({...l,items:mt(l,n,i)})),pricing_groups:(m=s.pricing_groups)==null?void 0:m.map(l=>{var c;return{...l,pricings:(c=l.pricings)==null?void 0:c.map(d=>({...d,items:mt(d,n,i)}))}})}})}},cn=(t,n)=>{const i=[],o=s=>{for(const u of s??[]){const m=(u.items??[]).filter(l=>ln(l,n)).map(l=>l.id);i.push([u.id,m])}};for(const s of t.pricing_categories??[]){o(s.pricings);for(const u of s.pricing_groups??[])o(u.pricings)}return Object.fromEntries(i)},sn=t=>{var n;for(const i of(t==null?void 0:t.pricing_categories)??[]){for(const o of i.pricing_groups??[])if(o.pricings[0])return o.pricings[0].id;if((n=i.pricings)!=null&&n[0])return i.pricings[0].id}},dn=(t,n)=>{if(t.length>0)return t;const i=sn(n);return i?[i]:[]},un=t=>"object_type"in t,ye=t=>(t.pricing_categories??[]).filter(un),mn=t=>ye(t).flatMap(n=>n.pricings??[]),pn=t=>ye(t).flatMap(n=>n.pricing_groups??[]),gn=t=>mn(t).length>0||pn(t).length>0,fn=t=>({object_type:"PRICING_PLAN",id:t.pricing_plan_id??`direct_${t.id}`,reference:`direct_${t.id}`,name:"",type:"CUSTOM",variant:"DEFAULT"}),pt=t=>{const{entitlements:n,...i}=t;return i},vn=t=>{const{pricings:n,pricing_groups:i,...o}=t;return{...o,pricings:n==null?void 0:n.map(pt),pricing_groups:i==null?void 0:i.map(s=>({...s,pricings:(s.pricings??[]).map(pt)}))}},hn=(t,n)=>{if(!gn(t))return;const i=(n==null?void 0:n.pricingPlan)??fn(t);return{object_type:"PRICING_PLAN_VERSION",id:`direct_${t.id}`,pricing_plan_id:i.id,pricing_plan:i,version:1,status:"ACTIVE",pricing_categories:ye(t).map(vn)}},be=e.defineComponent({__name:"CardContent",props:{spacing:{default:"md"}},setup(t){return(n,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"p-2":t.spacing==="xs","px-4 py-3":t.spacing==="sm","p-4":t.spacing==="md","px-8 py-6":t.spacing==="lg"})},[e.renderSlot(n.$slots,"default")],2))}}),ve="w-6",yn=e.defineComponent({__name:"CollapsibleList",props:{type:{default:"ordered"},hasAddButton:{type:Boolean},i18n:{}},emits:["add"],setup(t){const n=t,i=e.computed(()=>n.type==="ordered"?"ol":"ul");return(o,s)=>{var u;return e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value),null,{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3})),e.createElementVNode("div",{class:e.normalizeClass(["flex flex-col items-center justify-center",e.unref(ve)])},[t.hasAddButton?(e.openBlock(),e.createBlock(e.unref(R._sfc_main),{key:0,square:"","aria-label":((u=t.i18n)==null?void 0:u.addButtonLabel)??"Add item",intent:"secondary",size:"sm","icon-prefix":"add",onClick:s[0]||(s[0]=m=>o.$emit("add"))},null,8,["aria-label"])):e.createCommentVNode("",!0)],2)])}}}),bn=e.defineComponent({__name:"CombinedVolumeChip",props:{i18n:{},placement:{}},setup(t){return(n,i)=>(e.openBlock(),e.createBlock(I._sfc_main,{offset:4,placement:t.placement},{default:e.withCtx(()=>[e.createVNode(U._sfc_main,{intent:"neutral"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.i18n.combinedVolume),1)]),_:1})]),tooltip:e.withCtx(()=>[e.createVNode(I.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(I._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.i18n.description),1)]),_:1})]),_:1})]),_:1},8,["placement"]))}}),kn=["aria-label","aria-expanded","disabled"],Bt=e.defineComponent({__name:"ExpandController",props:{isCollapsible:{type:Boolean,default:!0},isExpanded:{type:Boolean,default:!1},iconPosition:{default:"before"},collapsedIcon:{default:"unfold_more"},expandedIcon:{default:"unfold_less"},iconSize:{default:"xs"},rootClass:{},ariaLabel:{},disabled:{type:Boolean,default:!1}},emits:["toggle"],setup(t,{emit:n}){const i=t,o=n,s=e.computed(()=>i.isExpanded?i.expandedIcon:i.collapsedIcon);return(u,m)=>t.isCollapsible?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["flex cursor-pointer items-center disabled:cursor-not-allowed",t.rootClass]),"aria-label":t.ariaLabel,"aria-expanded":t.isExpanded,disabled:t.disabled,onClick:m[0]||(m[0]=l=>o("toggle"))},[t.iconPosition==="before"?(e.openBlock(),e.createBlock(R._sfc_main$1,{key:0,icon:s.value,size:t.iconSize},null,8,["icon","size"])):e.createCommentVNode("",!0),e.renderSlot(u.$slots,"default"),t.iconPosition==="after"?(e.openBlock(),e.createBlock(R._sfc_main$1,{key:1,icon:s.value,size:t.iconSize},null,8,["icon","size"])):e.createCommentVNode("",!0)],10,kn)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(t.rootClass)},[e.renderSlot(u.$slots,"default")],2))}}),ke=e.defineComponent({__name:"ExpandWithHeader",props:{isCollapsible:{type:Boolean,default:!0},isExpanded:{type:Boolean,default:!1},headerClass:{},unmountOnClose:{type:Boolean}},emits:["toggle"],setup(t){const n=e.useSlots(),i=e.computed(()=>!!n.default&&!fe.isVnodeEmpty(n.default()));return(o,s)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(Bt,{"is-collapsible":t.isCollapsible,"is-expanded":t.isExpanded,"root-class":"w-full",onToggle:s[0]||(s[0]=u=>o.$emit("toggle"))},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["w-full",t.headerClass])},[e.renderSlot(o.$slots,"header")],2)]),_:3},8,["is-collapsible","is-expanded"]),i.value?(e.openBlock(),e.createBlock(ne._sfc_main,{key:0,"is-open":!t.isCollapsible||t.isExpanded,lazy:"","unmount-on-close":t.unmountOnClose},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},8,["is-open","unmount-on-close"])):e.createCommentVNode("",!0)]))}}),_n=e.defineComponent({__name:"Card",props:{borderStyle:{default:"solid"},spacing:{default:"md"},cappedWidth:{type:Boolean,default:!1},variant:{default:"default"},shadowSize:{default:"sm"},borderRadius:{default:"base"},title:{},rootClass:{},wrapperClass:{},printBehavior:{}},setup(t){return(n,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col",e.unref(oe.cn)(t.variant==="grouped"?"border border-dashed border-opacity-50":"gap-1",t.borderRadius==="md"?"rounded-md":"",t.borderRadius==="lg"?"rounded-lg":"",t.borderRadius==="base"?"rounded":"",t.variant==="grouped"?t.rootClass:"",t.wrapperClass,t.printBehavior==="avoid"?"card-print-avoid":"")])},[t.title||n.$slots.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(oe.cn)("flex items-center justify-between",t.spacing==="sm"?"p-1.5":"",t.spacing==="md"?"p-3":"",t.spacing==="lg"?"p-6":""))},[e.renderSlot(n.$slots,"title",{},()=>[e.createVNode(e.unref(E._sfc_main),{tag:"span",variant:t.variant==="grouped"?"caps-heading":"body-sm",weight:"semibold","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1},8,["variant"])],!0),e.renderSlot(n.$slots,"right",{},void 0,!0)],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([e.unref(oe.cn)(t.spacing==="sm"?"p-1.5":"",t.spacing==="md"?"p-3":"",t.spacing==="lg"?"p-6":"",t.borderStyle==="solid"&&t.shadowSize==="sm"?"shadow-sm":"",t.borderStyle==="solid"&&t.shadowSize==="md"?"shadow-md":"",t.borderStyle==="solid"&&t.shadowSize==="lg"?"shadow-lg":"",t.borderStyle==="dashed"?"border-dashed border-opacity-50":"",t.shadowSize==="none"&&t.variant==="default"?"border-gray-100":"",t.variant==="error"?"border-red-600":"",t.variant==="warning"?"border-yellow-400":"",t.variant==="primary"?"border-primary-400":"",t.cappedWidth?"max-w-220":"",t.borderRadius==="base"?"rounded":"",t.borderRadius==="md"?"rounded-md":"",t.borderRadius==="lg"?"rounded-lg":"",t.variant==="grouped"?"border-b-0 border-l-0 border-r-0":"",t.variant==="grouped"?"rounded-t-none":"",t.variant==="primary"?"bg-primary-50/50":"",t.variant==="default"?"bg-white":"",t.rootClass?`${t.rootClass}`:""),"card-surface border"]),"data-testid":"card"},[e.renderSlot(n.$slots,"default",{},void 0,!0)],2)],2))}}),se=j._export_sfc(_n,[["__scopeId","data-v-561cca98"]]),Cn={topUp:"Top up",defaultTooltip:"Top up allows moving unused volume over to the next billing cycle",tieredTooltip:{blockSize:"Includes prior volume to determine the tier and unused volume will move over",nonBlockSize:"Includes prior volume to determine the tier"},rollover:{title:"Rollover",tooltip:"Top up is applied to the next following schedule's billing cycles"}},xn={combinedVolume:"Combined volume",description:"Total volume sets the tier, applied proportionally to the selected rules."},_e={defaultPricing:"Pricing",combinedVolume:xn,topUpChip:Cn,splitBy:"Split by"},Bn={class:"inline-flex items-center"},Nn=e.defineComponent({__name:"TopUpChip",props:{i18n:{},placement:{},hasTooltip:{type:Boolean},pricingItemConfig:{}},setup(t){const n=t,i=e.computed(()=>{var l,c;return!!((c=(l=n.pricingItemConfig)==null?void 0:l.top_up)!=null&&c.rollover)}),o=e.computed(()=>({intent:"neutral",hasChipAfter:i.value})),s={intent:"neutral",hasChipBefore:!0},u=e.computed(()=>{var l,c,d;return(d=(c=(l=n.pricingItemConfig)==null?void 0:l.details)==null?void 0:c.bands)==null?void 0:d.some(a=>a.block_size)}),m=e.computed(()=>T.isTieredPricing(n.pricingItemConfig)&&u.value?n.i18n.tieredTooltip.blockSize:T.isTieredPricing(n.pricingItemConfig)&&!u.value?n.i18n.tieredTooltip.nonBlockSize:n.i18n.defaultTooltip);return(l,c)=>(e.openBlock(),e.createElementBlock("span",Bn,[t.hasTooltip?(e.openBlock(),e.createBlock(I._sfc_main,{key:0,offset:4,placement:t.placement},{default:e.withCtx(()=>[e.createVNode(U._sfc_main,e.normalizeProps(e.guardReactiveProps(o.value)),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.i18n.topUp),1)]),_:1},16)]),tooltip:e.withCtx(()=>[e.createVNode(I.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(I._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.value),1)]),_:1})]),_:1})]),_:1},8,["placement"])):(e.openBlock(),e.createBlock(U._sfc_main,e.normalizeProps(e.mergeProps({key:1},o.value)),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.i18n.topUp),1)]),_:1},16)),i.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[t.hasTooltip?(e.openBlock(),e.createBlock(I._sfc_main,{key:0,offset:4,placement:t.placement},{default:e.withCtx(()=>[e.createVNode(U._sfc_main,e.normalizeProps(e.guardReactiveProps(s)),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.i18n.rollover.title),1)]),_:1},16)]),tooltip:e.withCtx(()=>[e.createVNode(I.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(I._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.i18n.rollover.tooltip),1)]),_:1})]),_:1})]),_:1},8,["placement"])):(e.openBlock(),e.createBlock(U._sfc_main,e.normalizeProps(e.mergeProps({key:1},s)),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.i18n.rollover.title),1)]),_:1},16))],64)):e.createCommentVNode("",!0)]))}}),Vn={class:"flex items-center gap-2"},En={class:"flex items-center gap-2"},Sn={key:0},Ce=e.defineComponent({__name:"PricingItemConfigHeader",props:{config:{},i18n:{},hasTooltip:{type:Boolean,default:!0},isCombinedPricing:{type:Boolean},hideDefaultLabel:{type:Boolean}},setup(t){const n=t,i=e.computed(()=>n.i18n??_e),o=e.computed(()=>{var s,u;return!M.isEmpty((u=(s=n.config)==null?void 0:s.conditions)==null?void 0:u.meter_properties)});return(s,u)=>(e.openBlock(),e.createElementBlock("div",Vn,[e.createElementVNode("div",En,[e.createVNode(E._sfc_main,{class:"line-clamp-1","no-spacing":"",color:"secondary",variant:"body-sm",weight:"semibold"},{default:e.withCtx(()=>{var m,l,c,d,a,_;return[(m=t.config.conditions)!=null&&m.name||o.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(l=t.config.conditions)!=null&&l.name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString((c=t.config.conditions)==null?void 0:c.name),1)],64)):e.createCommentVNode("",!0),o.value&&((a=(d=t.config)==null?void 0:d.conditions)!=null&&a.meter_properties)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.hasTooltip&&((_=t.config.conditions)!=null&&_.name)?(e.openBlock(),e.createBlock(I._sfc_main,{key:0,variant:"outline",class:"ml-1"},{default:e.withCtx(()=>[e.createVNode(R._sfc_main$1,{icon:"help",size:"2xs",class:"rounded drop-shadow-sm hover:cursor-default hover:bg-gray-50"})]),tooltip:e.withCtx(()=>[e.createVNode(I.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(E._sfc_main,{variant:"body-sm","no-spacing":"",color:"secondary"},{default:e.withCtx(()=>{var g,r;return[e.createVNode(ce._sfc_main,{comparators:(r=(g=t.config)==null?void 0:g.conditions)==null?void 0:r.meter_properties},null,8,["comparators"])]}),_:1})]),_:1})]),_:1})):(e.openBlock(),e.createBlock(E._sfc_main,{key:1,variant:"body-sm",weight:"normal",color:"secondary",tag:"span"},{default:e.withCtx(()=>{var g,r,v;return[(g=t.config.conditions)!=null&&g.name?(e.openBlock(),e.createElementBlock("span",Sn," - ")):e.createCommentVNode("",!0),e.createVNode(ce._sfc_main,{comparators:(v=(r=t.config)==null?void 0:r.conditions)==null?void 0:v.meter_properties,display:"inline"},null,8,["comparators"])]}),_:1}))],64)):e.createCommentVNode("",!0)],64)):t.hideDefaultLabel?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(i.value.defaultPricing),1)],64))]}),_:1}),t.config.volume_group_reference?(e.openBlock(),e.createBlock(bn,{key:0,i18n:i.value.combinedVolume},null,8,["i18n"])):e.createCommentVNode("",!0),e.unref(T.isTopUpPricing)(t.config)?(e.openBlock(),e.createBlock(Nn,{key:1,i18n:i.value.topUpChip,"pricing-item-config":t.config},null,8,["i18n","pricing-item-config"])):e.createCommentVNode("",!0)]),e.renderSlot(s.$slots,"override-tooltip")]))}}),xe={...yt.comparatorI18nDefaults,and:"and"},de={...xe,or:"or",unsupported:"unsupported",product:"product",revenueItem:"revenue item",commitmentBody:(t,n,i)=>`Commitment on ${t} <strong>${n}</strong> ${i}`,startOfSchedule:"Start of schedule",endOfSchedule:"End of schedule",unknown:"unknown",products:t=>t===1?"product":"products",pluralRevenueItems:t=>t===1?"revenue item":"revenue items",pricingRule:"price rule",invoice:"invoice",units:t=>`${t} units`,commitmentOnInvoice:t=>`Commitment on <strong>Invoice</strong> ${t}`,basedOnMeterValue:"based on meter value"},wn=(t,n=de,i)=>{const{formatDate:o}=E.useIntl(),s=e.computed(()=>z.getAllPricings(t.value)),u=e.computed(()=>s.value.map(g=>{var r;return{pricing:g,product:(r=g.products)==null?void 0:r[0],pricingId:g.id}})),m=e.computed(()=>{var g;return((g=s.value)==null?void 0:g.flatMap(r=>{var v;return((v=r.items)==null?void 0:v.map(x=>{var B;return{productItem:(B=x.product_items)==null?void 0:B[0],pricingItemId:x.id}}))??[]}))??[]}),l=g=>n.commitmentBody(a(g),c(g)??"",_(g)),c=g=>{var r,v,x,B,V;switch(g.commitmentLevel){case"PRODUCTS":{const y=(r=g.ids)==null?void 0:r.map(p=>u.value.find(b=>b.pricingId===p));return d((y==null?void 0:y.map(p=>{var b;return(p==null?void 0:p.pricing.name)??(((b=p==null?void 0:p.product)==null?void 0:b.name)||"")}))??[])}case"REVENUE_ITEMS":{const y=(v=g.ids)==null?void 0:v.map(p=>{var b;return(b=m.value.find(h=>h.pricingItemId===p))==null?void 0:b.productItem});return d((y==null?void 0:y.map(p=>(p==null?void 0:p.name)||""))??[])}case"PRICING_RULE":{const y=S=>{var w;return S.id===((w=g.ids)==null?void 0:w[0])},p=S=>{var w,P;return y(S)||!!((P=(w=S.conditions)==null?void 0:w.configs)!=null&&P.some(p))},b=S=>{var w;return(w=S.configs)==null?void 0:w.some(p)},h=S=>{var w;return(w=S.items)==null?void 0:w.some(b)},N=(x=s.value)==null?void 0:x.find(h),f=(B=N==null?void 0:N.items)==null?void 0:B.find(b),C=(V=f==null?void 0:f.configs)==null?void 0:V.flatMap(T.getFlatConfigs),k=C==null?void 0:C.find(y);return`<strong>${T.getConfigName(n)({pricing:N,item:f,config:k})}</strong>`}}},d=g=>g.reduce((r,v,x)=>{const B=`<strong>${v}</strong>`;return x===0?B:x===g.length-1?[r,B].join(" and "):[r,B].join(", ")},""),a=g=>{var r,v;switch(g.commitmentLevel){case"PRODUCTS":return n.products(((r=g.ids)==null?void 0:r.length)??0);case"REVENUE_ITEMS":return n.pluralRevenueItems(((v=g.ids)==null?void 0:v.length)??0);case"PRICING_RULE":return n.pricingRule;case"INVOICE":return n.invoice}},_=g=>{if(!g.start_at&&!g.end_at)return"";let r,v;return g.start_at||(r=n.startOfSchedule),g.end_at||(v=n.endOfSchedule),g.start_at&&(r=o(i?{date:g.start_at,format:"date",offsetType:"offsetted",timezone:i}:{date:g.start_at,format:"date",offsetType:"local",showTimezone:!1})),g.end_at&&(v=o(i?{date:g.end_at,format:"date",offsetType:"offsetted",timezone:i}:{date:g.end_at,format:"date",offsetType:"local",showTimezone:!1})),`(${r} - ${v})`};return{getCommitmentBody:l,getFormattedDuration:_}},Pn=t=>{const n=Object.entries(t||{});if(n.length===0)return;const[i,o]=n[0],[s,u,m]=i.split(".");return{commitmentLevel:s,index:parseInt(u,10),fieldName:m,message:o}},$n={class:"flex items-center justify-between"},In={class:"flex items-center gap-2"},Tn={key:0,class:"ml-3 flex gap-3"},Be=e.defineComponent({__name:"CommitmentDiscountItem",props:{icon:{},iconColor:{},isEditable:{type:Boolean},isRemovable:{type:Boolean},error:{}},emits:["edit","delete"],setup(t){return(n,i)=>(e.openBlock(),e.createBlock(se,{spacing:"none","root-class":"p-2 pr-3"},{default:e.withCtx(()=>[e.createElementVNode("div",$n,[e.createElementVNode("div",In,[e.createVNode(R._sfc_main$1,{icon:t.icon,size:"sm",variant:"contained",class:e.normalizeClass(["p-1",{"bg-orange-50 text-orange-700":t.iconColor==="orange","bg-yellow-50 text-yellow-700":t.iconColor==="yellow"}])},null,8,["icon","class"]),e.createVNode(E._sfc_main,{variant:"body-sm","no-spacing":""},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"body")]),_:3})]),t.isEditable||t.isRemovable?(e.openBlock(),e.createElementBlock("div",Tn,[t.isEditable?(e.openBlock(),e.createBlock(R._sfc_main,{key:0,intent:"subtle",square:"","icon-prefix":"edit",onClick:i[0]||(i[0]=o=>n.$emit("edit"))})):e.createCommentVNode("",!0),t.isRemovable?(e.openBlock(),e.createBlock(R._sfc_main,{key:1,intent:"dangerSecondary",square:"","icon-prefix":"delete",onClick:i[1]||(i[1]=o=>n.$emit("delete"))})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),e.createVNode(ne._sfc_main,{"is-open":!!t.error},{default:e.withCtx(()=>[t.error?(e.openBlock(),e.createBlock(ge._sfc_main,{key:0,type:"danger",class:"-mb-2 -ml-2 -mr-3 mt-2 rounded-bl-md rounded-br-md rounded-tl-none rounded-tr-none"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(ee.capitalize)(t.error)),1)]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["is-open"])]),_:3}))}}),Dn={class:"font-semibold"},zn={key:2,class:"font-semibold text-primary-600"},On=["innerHTML"],Ln=["innerHTML"],Rn={key:2},An=e.defineComponent({__name:"SubscriptionCommitmentItem",props:{commitment:{},pricingPlanVersion:{},isEditable:{type:Boolean},isRemovable:{type:Boolean},error:{},i18n:{},timezone:{}},emits:["edit","delete"],setup(t){const n=t,i=e.computed(()=>n.i18n??de),{getCommitmentBody:o,getFormattedDuration:s}=wn(e.computed(()=>n.pricingPlanVersion),i.value,n.timezone);return(u,m)=>(e.openBlock(),e.createBlock(Be,{icon:"handshake","icon-color":"orange","is-editable":t.isEditable,"is-removable":t.isRemovable,error:t.error,onEdit:m[0]||(m[0]=l=>u.$emit("edit")),onDelete:m[1]||(m[1]=l=>u.$emit("delete"))},{body:e.withCtx(()=>{var l;return[e.createElementVNode("span",Dn,[t.commitment.amount?(e.openBlock(),e.createBlock(L._sfc_main,{key:0,value:t.commitment.amount,highlighted:""},null,8,["value"])):"meter_value_calculation"in t.commitment&&((l=t.commitment.meter_value_calculation)!=null&&l.amount)?(e.openBlock(),e.createBlock(L._sfc_main,{key:1,value:t.commitment.meter_value_calculation.amount,highlighted:""},null,8,["value"])):"meter_value_calculation"in t.commitment&&t.commitment.meter_value_calculation&&"number"in t.commitment.meter_value_calculation?(e.openBlock(),e.createElementBlock("span",zn,e.toDisplayString(t.commitment.meter_value_calculation.number&&i.value.units(t.commitment.meter_value_calculation.number)),1)):e.createCommentVNode("",!0)]),m[2]||(m[2]=e.createTextVNode(" ",-1)),t.commitment.commitmentLevel==="INVOICE"?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:i.value.commitmentOnInvoice(e.unref(s)(t.commitment))},null,8,On)):(e.openBlock(),e.createElementBlock("span",{key:1,innerHTML:e.unref(o)(t.commitment)},null,8,Ln)),"meter_value_calculation"in t.commitment&&t.commitment.meter_value_calculation&&"amount"in t.commitment.meter_value_calculation?(e.openBlock(),e.createElementBlock("span",Rn,e.toDisplayString(" ")+"("+e.toDisplayString(i.value.basedOnMeterValue)+")",1)):e.createCommentVNode("",!0)]}),_:1},8,["is-editable","is-removable","error"]))}}),te={...de,title:"Commitments",orderOfApplicationExplanation:"Commitments are applied after discounts on invoices",description:"Setup a minimum usage per an agreed-upon time period.",selectPricingPlanHint:"Please select a pricing plan to add commitments",addItemLabel:"Add commitment",notEditableExplanation:"Commitments can't be edited for active schedules"},Ne=({isEditable:t,isRemovable:n})=>({isEditableFlag:e.computed(()=>typeof t=="function"?!0:!!t),isItemEditable:u=>typeof t=="function"?t(u):!!t,isItemRemovable:u=>typeof n=="function"?n(u):typeof n=="boolean"?n:!0}),Fn={class:"flex items-center justify-between gap-4"},Mn={class:"flex items-center gap-4"},Zn={class:"flex items-center gap-1"},Un={class:"mt-1 text-xs text-secondary"},Hn={class:"flex items-center justify-between gap-4"},Gn={class:"flex items-center gap-1"},jn={class:"text-xs font-bold uppercase text-secondary"},qn={class:"mt-1 flex flex-col gap-2"},Ve=e.defineComponent({__name:"CommitmentDiscountsSection",props:{title:{},orderOfApplicationExplanation:{},description:{},selectPricingPlanHint:{},addItemLabel:{},notEditableExplanation:{},hasItems:{type:Boolean},pricingPlanVersionIsSelected:{type:Boolean},isEditable:{type:Boolean},isCreatable:{type:Boolean}},emits:["add"],setup(t){return(n,i)=>(e.openBlock(),e.createElementBlock("section",null,[t.hasItems?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("header",Hn,[e.createElementVNode("div",Gn,[e.createElementVNode("h2",jn,e.toDisplayString(t.title),1),e.createVNode(I._sfc_main,{variant:"outline",placement:"bottom-start"},{default:e.withCtx(()=>[e.createVNode(R._sfc_main$1,{icon:"help",class:"drop-shadow-sm hover:cursor-default hover:bg-gray-50",size:"xs"})]),tooltip:e.withCtx(()=>[e.createVNode(I.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(I._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.orderOfApplicationExplanation),1)]),_:1})]),_:1})]),_:1})])]),e.createElementVNode("ul",qn,[e.renderSlot(n.$slots,"list-items")])],64)):(e.openBlock(),e.createBlock(se,{key:0},{default:e.withCtx(()=>[e.createElementVNode("div",Fn,[e.createElementVNode("div",Mn,[e.renderSlot(n.$slots,"icon"),e.createElementVNode("div",null,[e.createElementVNode("div",Zn,[e.createVNode(E._sfc_main,{tag:"h2",variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1}),e.createVNode(I._sfc_main,{variant:"outline",placement:"bottom-start"},{default:e.withCtx(()=>[e.createVNode(R._sfc_main$1,{icon:"help",class:"drop-shadow-sm hover:cursor-default hover:bg-gray-50",size:"xs"})]),tooltip:e.withCtx(()=>[e.createVNode(I.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(I._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.orderOfApplicationExplanation),1)]),_:1})]),_:1})]),_:1})]),e.createElementVNode("p",Un,e.toDisplayString(t.description),1)])]),t.isEditable?(e.openBlock(),e.createBlock(I._sfc_main,{key:0,variant:"outline"},{tooltip:e.withCtx(()=>[e.createVNode(I.TooltipContent,null,{default:e.withCtx(()=>[t.pricingPlanVersionIsSelected?t.isEditable?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(E._sfc_main,{key:1,color:"secondary",variant:"body-sm","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.notEditableExplanation),1)]),_:1})):(e.openBlock(),e.createBlock(E._sfc_main,{key:0,color:"secondary",variant:"body-sm","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.selectPricingPlanHint),1)]),_:1}))]),_:1})]),_:1})):e.createCommentVNode("",!0)])]),_:3}))]))}}),Wn="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='44'%20height='44'%20fill='none'%3e%3cmask%20id='a'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='44'%20height='44'%3e%3cpath%20fill='%23D9D9D9'%20d='M0%200h44v44H0z'/%3e%3c/mask%3e%3cg%20mask='url(%23a)'%3e%3cmask%20id='e'%20fill='%23fff'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.922%2015.593A6%206%200%200%200%208.03%208.816c-.072-.516.251-1.035.767-1.108l21.957-3.086c.516-.072.97.338%201.043.854a6%206%200%200%200%206.776%205.106c.589-.082%201.19.281%201.273.87L42.06%2027.22c.083.589-.395%201.104-.984%201.186a6%206%200%200%200-5.106%206.777c.074.525-.255%201.055-.78%201.13l-21.925%203.08c-.526.074-.988-.344-1.062-.87a6%206%200%200%200-6.776-5.107c-.452.064-.901-.223-.965-.674L2.182%2016.507c-.064-.451.29-.85.74-.914Z'/%3e%3c/mask%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.922%2015.593A6%206%200%200%200%208.03%208.816c-.072-.516.251-1.035.767-1.108l21.957-3.086c.516-.072.97.338%201.043.854a6%206%200%200%200%206.776%205.106c.589-.082%201.19.281%201.273.87L42.06%2027.22c.083.589-.395%201.104-.984%201.186a6%206%200%200%200-5.106%206.777c.074.525-.255%201.055-.78%201.13l-21.925%203.08c-.526.074-.988-.344-1.062-.87a6%206%200%200%200-6.776-5.107c-.452.064-.901-.223-.965-.674L2.182%2016.507c-.064-.451.29-.85.74-.914Z'%20fill='%23D9D9D9'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.922%2015.593A6%206%200%200%200%208.03%208.816c-.072-.516.251-1.035.767-1.108l21.957-3.086c.516-.072.97.338%201.043.854a6%206%200%200%200%206.776%205.106c.589-.082%201.19.281%201.273.87L42.06%2027.22c.083.589-.395%201.104-.984%201.186a6%206%200%200%200-5.106%206.777c.074.525-.255%201.055-.78%201.13l-21.925%203.08c-.526.074-.988-.344-1.062-.87a6%206%200%200%200-6.776-5.107c-.452.064-.901-.223-.965-.674L2.182%2016.507c-.064-.451.29-.85.74-.914Z'%20fill='%23BFEAFB'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.922%2015.593A6%206%200%200%200%208.03%208.816c-.072-.516.251-1.035.767-1.108l21.957-3.086c.516-.072.97.338%201.043.854a6%206%200%200%200%206.776%205.106c.589-.082%201.19.281%201.273.87L42.06%2027.22c.083.589-.395%201.104-.984%201.186a6%206%200%200%200-5.106%206.777c.074.525-.255%201.055-.78%201.13l-21.925%203.08c-.526.074-.988-.344-1.062-.87a6%206%200%200%200-6.776-5.107c-.452.064-.901-.223-.965-.674L2.182%2016.507c-.064-.451.29-.85.74-.914Z'%20fill='url(%23b)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.922%2015.593A6%206%200%200%200%208.03%208.816c-.072-.516.251-1.035.767-1.108l21.957-3.086c.516-.072.97.338%201.043.854a6%206%200%200%200%206.776%205.106c.589-.082%201.19.281%201.273.87L42.06%2027.22c.083.589-.395%201.104-.984%201.186a6%206%200%200%200-5.106%206.777c.074.525-.255%201.055-.78%201.13l-21.925%203.08c-.526.074-.988-.344-1.062-.87a6%206%200%200%200-6.776-5.107c-.452.064-.901-.223-.965-.674L2.182%2016.507c-.064-.451.29-.85.74-.914Z'%20fill='url(%23c)'/%3e%3cpath%20d='m39.845%2011.452-1.09.153%201.09-.153Zm-9.092-6.83.153%201.09-.153-1.09Zm11.308%2022.599%201.09-.153-1.09.153ZM8.796%207.708%208.643%206.62l.153%201.09ZM6.94%208.97a4.9%204.9%200%200%201-4.17%205.534l.306%202.179a7.1%207.1%200%200%200%206.042-8.019l-2.178.306ZM30.6%203.533%208.643%206.62l.306%202.179%2021.957-3.086-.306-2.179Zm7.819%205.96a4.9%204.9%200%200%201-5.534-4.17l-2.179.306a7.1%207.1%200%200%200%208.02%206.043l-.307-2.179Zm4.731%2017.575-2.216-15.77-2.179.307%202.217%2015.769%202.178-.306Zm-6.09%207.963a4.9%204.9%200%200%201%204.17-5.534l-.306-2.179a7.1%207.1%200%200%200-6.043%208.019l2.179-.306Zm-23.641%205.453%2021.924-3.081-.306-2.179-21.924%203.081.306%202.179ZM5.58%2034.507a4.9%204.9%200%200%201%205.534%204.17l2.178-.306a7.1%207.1%200%200%200-8.018-6.043l.306%202.179ZM1.092%2016.66l2.282%2016.236%202.179-.306L3.27%2016.354l-2.179.306Zm2.179-.306a.333.333%200%200%201-.066.254.202.202%200%200%201-.13.074l-.306-2.179c-.95.134-1.838%201.008-1.677%202.157l2.179-.306Zm9.841%2021.951a.244.244%200%200%201%20.105.009c.031.01.05.023.06.03.014.013.016.02.017.027l-2.179.306c.142%201.008%201.064%201.981%202.304%201.807l-.306-2.179Zm21.77-2.968c-.002-.006-.002-.014.009-.03a.168.168%200%200%201%20.048-.046.244.244%200%200%201%20.098-.037l.306%202.179c1.24-.175%201.859-1.365%201.717-2.372l-2.179.306Zm3.843-23.665a.117.117%200%200%201%20.069.012c.003.002-.005-.002-.015-.017a.153.153%200%200%201-.024-.062l2.179-.306c-.185-1.317-1.46-1.954-2.515-1.806l.306%202.179ZM5.275%2032.328a.202.202%200%200%201%20.144.036.332.332%200%200%201%20.134.226l-2.179.306c.162%201.15%201.255%201.745%202.207%201.61l-.306-2.178ZM30.906%205.712a.258.258%200%200%201-.11-.01.186.186%200%200%201-.065-.033c-.019-.016-.023-.028-.025-.04l2.179-.306c-.14-1-1.057-1.963-2.285-1.79l.306%202.179Zm10.066%2021.662a.153.153%200%200%201%20.005-.066c.006-.018.012-.024.01-.02a.115.115%200%200%201-.062.03l.305%202.179c1.056-.149%202.105-1.112%201.92-2.43l-2.178.307ZM9.118%208.663c.002.012.001.025-.012.045a.186.186%200%200%201-.053.05.258.258%200%200%201-.104.04l-.306-2.179c-1.229.173-1.844%201.35-1.703%202.35l2.178-.306Z'%20fill='url(%23d)'%20fill-opacity='.1'%20mask='url(%23e)'/%3e%3cg%20opacity='.5'%3e%3cmask%20id='f'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='10'%20y='10'%20width='24'%20height='24'%3e%3cpath%20transform='rotate(-8%2010.706%2013.489)'%20fill='%23D9D9D9'%20d='M10.706%2013.489h20v20h-20z'/%3e%3c/mask%3e%3cg%20mask='url(%23f)'%3e%3cpath%20d='M22.825%2028.616a.486.486%200%200%200%20.271-.164l5.816-7.718a1.54%201.54%200%200%200%20.283-.608%201.804%201.804%200%200%200-.176-1.248%201.375%201.375%200%200%200-.435-.475l-4-3.014a1.376%201.376%200%200%200-.577-.288%201.775%201.775%200%200%200-1.248.176%201.54%201.54%200%200%200-.506.44l-.195.258%201.744%201.333c.233.163.416.362.547.596.13.234.215.489.254.764.081.577-.047%201.09-.383%201.537-.337.447-.795.711-1.372.792a2.245%202.245%200%200%201-.815-.033%201.895%201.895%200%200%201-.731-.339l-1.762-1.309-3.103%204.118a.393.393%200%200%200-.083.306c.015.11.07.204.166.282a.386.386%200%200%200%20.307.094.484.484%200%200%200%20.271-.164l2.412-3.201%201.318.993-2.391%203.197a.394.394%200%200%200-.083.306.4.4%200%200%200%20.164.272.4.4%200%200%200%20.306.083.486.486%200%200%200%20.271-.164l2.415-3.18%201.318.993-2.39%203.197a.25.25%200%200%200-.076.137.472.472%200%200%200-.008.17.4.4%200%200%200%20.164.27.4.4%200%200%200%20.578-.08l2.414-3.18%201.318.993-2.412%203.2a.394.394%200%200%200-.083.306c.016.11.074.2.175.27.101.07.207.098.317.082Zm.21%201.654a2.033%202.033%200%200%201-1.422-.316%201.99%201.99%200%200%201-.869-1.172%202.054%202.054%200%200%201-1.257-.412%202.054%202.054%200%200%201-.743-1.095%201.979%201.979%200%200%201-1.248-.424%202.12%202.12%200%200%201-.731-1.086%201.982%201.982%200%200%201-1.375-.5%202.046%202.046%200%200%201-.687-1.293%202.119%202.119%200%200%201%20.043-.816c.068-.269.184-.513.35-.733l4.116-5.438%203.083%202.323a.25.25%200%200%200%20.137.075.47.47%200%200%200%20.169.008.445.445%200%200%200%20.294-.157.39.39%200%200%200%20.081-.317.473.473%200%200%200-.054-.16.25.25%200%200%200-.11-.111l-3.365-2.536a1.377%201.377%200%200%200-.577-.287%201.778%201.778%200%200%200-1.248.176%201.538%201.538%200%200%200-.506.44l-2.497%203.337c-.107.142-.19.3-.249.477-.06.177-.091.35-.095.518a1.57%201.57%200%200%200%20.304.968l-1.029%201.364a3.313%203.313%200%200%201-.662-.969%203.273%203.273%200%200%201-.154-2.293c.114-.387.295-.746.543-1.075l2.5-3.318c.286-.363.62-.655%201.003-.877a3.316%203.316%200%200%201%203.68.219l.26.195.195-.259c.285-.363.62-.655%201.002-.877a3.316%203.316%200%200%201%203.68.219l3.977%202.996a3.393%203.393%200%200%201%201.3%202.216c.06.426.036.854-.072%201.283a3.282%203.282%200%200%201-.57%201.185l-5.818%207.697c-.166.22-.368.402-.607.548a2.002%202.002%200%200%201-.771.277Z'%20fill='%23222B35'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='b'%20x1='1.097'%20y1='10.89'%20x2='36.001'%20y2='44.744'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF6200'/%3e%3cstop%20offset='1'%20stop-color='%23FF6200'%20stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient%20id='c'%20x1='40.312'%20y1='5.379'%20x2='16.092'%20y2='47.542'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23fff'/%3e%3cstop%20offset='1'%20stop-color='%23fff'%20stop-opacity='.4'/%3e%3c/linearGradient%3e%3clinearGradient%20id='d'%20x1='24.991'%20y1='38.635'%20x2='20.304'%20y2='5.283'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%230C0E41'/%3e%3cstop%20offset='1'%20stop-color='%230C0E41'%20stop-opacity='.5'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",Yn=["src"],Kn=e.defineComponent({__name:"SubscriptionCommitments",props:{pricingPlanVersion:{},commitment:{},i18n:{},isCreatable:{type:Boolean},isEditable:{type:[Boolean,Function]},isRemovable:{type:[Boolean,Function]},error:{},timezone:{}},setup(t){const n=t,i=e.computed(()=>n.i18n??te),{isEditableFlag:o,isItemEditable:s,isItemRemovable:u}=Ne({isEditable:n.isEditable,isRemovable:n.isRemovable}),m=e.computed(()=>{if("error"in n)return Pn(n.error)}),l=e.computed(()=>{var c,d,a,_,g,r,v,x;return[...((d=(c=n.commitment)==null?void 0:c.pricing_item_configs)==null?void 0:d.map((B,V)=>{var y,p;return{item:{commitmentLevel:"PRICING_RULE",...B},error:V===((y=m.value)==null?void 0:y.index)&&((p=m.value)==null?void 0:p.commitmentLevel)==="pricing_item_configs"?m.value.message:void 0}}))||[],...((_=(a=n.commitment)==null?void 0:a.pricing_items)==null?void 0:_.map((B,V)=>{var y,p;return{item:{commitmentLevel:"REVENUE_ITEMS",...B},error:V===((y=m.value)==null?void 0:y.index)&&((p=m.value)==null?void 0:p.commitmentLevel)==="pricing_items"?m.value.message:void 0}}))||[],...((r=(g=n.commitment)==null?void 0:g.pricings)==null?void 0:r.map((B,V)=>{var y,p;return{item:{commitmentLevel:"PRODUCTS",...B},error:V===((y=m.value)==null?void 0:y.index)&&((p=m.value)==null?void 0:p.commitmentLevel)==="pricings"?m.value.message:void 0}}))||[],...((x=(v=n.commitment)==null?void 0:v.totals)==null?void 0:x.map((B,V)=>{var y,p;return{item:{commitmentLevel:"INVOICE",...B},error:V===((y=m.value)==null?void 0:y.index)&&((p=m.value)==null?void 0:p.commitmentLevel)==="totals"?m.value.message:void 0}}))||[]]});return(c,d)=>(e.openBlock(),e.createBlock(Ve,{title:i.value.title,"order-of-application-explanation":i.value.orderOfApplicationExplanation,description:i.value.description,"pricing-plan-version-is-selected":!!t.pricingPlanVersion,"select-pricing-plan-hint":i.value.selectPricingPlanHint,"add-item-label":i.value.addItemLabel,"not-editable-explanation":i.value.notEditableExplanation,"is-creatable":!!t.isCreatable,"is-editable":e.unref(o),"has-items":l.value.length>0,onAdd:d[0]||(d[0]=a=>c.$emit("add"))},{icon:e.withCtx(()=>[e.createElementVNode("img",{src:e.unref(Wn),alt:""},null,8,Yn)]),"list-items":e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,({item:a,error:_})=>(e.openBlock(),e.createElementBlock("li",{key:JSON.stringify(a)},[e.createVNode(An,{timezone:t.timezone,commitment:a,error:_,"is-editable":e.unref(s)(a),"is-removable":e.unref(u)(a),"pricing-plan-version":t.pricingPlanVersion,i18n:i.value,onEdit:g=>c.$emit("edit",a),onDelete:g=>c.$emit("delete",a)},null,8,["timezone","commitment","error","is-editable","is-removable","pricing-plan-version","i18n","onEdit","onDelete"])]))),128))]),_:1},8,["title","order-of-application-explanation","description","pricing-plan-version-is-selected","select-pricing-plan-hint","add-item-label","not-editable-explanation","is-creatable","is-editable","has-items"]))}}),Jn=(t,n)=>!t||!n?!t==!n:t.operator===n.operator&&t.operands.length===n.operands.length&&t.operands.every((i,o)=>{var s,u,m,l,c;const d=(s=n.operands[o])==null?void 0:s.meter_property;return((u=i.meter_property)==null?void 0:u.id)===(d==null?void 0:d.id)&&((m=i.meter_property)==null?void 0:m.comparator)===(d==null?void 0:d.comparator)&&((l=i.meter_property)==null?void 0:l.value)===(d==null?void 0:d.value)&&JSON.stringify((c=i.meter_property)==null?void 0:c.values)===JSON.stringify(d==null?void 0:d.values)}),Xn=(t,n,i)=>{const{formatDate:o}=E.useIntl(),s=e.computed(()=>z.getAllPricings(t.value)),u=d=>{var a,_,g,r,v,x,B,V,y,p;let b,h;switch(d.discountLevel){case"PRODUCT":{b=(a=s.value)==null?void 0:a.find(N=>{var f,C;return N.id===((f=d.ids)==null?void 0:f[0])||((C=N.products)==null?void 0:C.some(k=>{var S;return k.id===((S=d.ids)==null?void 0:S[0])}))});break}case"REVENUE_ITEM":{const N=f=>{var C,k;return f.id===((C=d.ids)==null?void 0:C[0])||"product_items"in f&&((k=f.product_items)==null?void 0:k.some(S=>{var w;return S.id===((w=d.ids)==null?void 0:w[0])}))};b=(_=s.value)==null?void 0:_.find(f=>{var C;return(C=f.items)==null?void 0:C.some(N)}),h=(g=b==null?void 0:b.items)==null?void 0:g.find(N);break}case"PRICING_RULE":{const N=$=>{var O;return d.meter_property_condition_expression?Jn(T.buildMeterConditionExpression($),d.meter_property_condition_expression):$.id===((O=d.ids)==null?void 0:O[0])},f=$=>{var O,H;return N($)||!!((H=(O=$.conditions)==null?void 0:O.configs)!=null&&H.some(f))},C=$=>{var O,H,F;return d.meter_property_condition_expression?((O=$.product_items)==null?void 0:O.some(Z=>{var A;return Z.id===((A=d.ids)==null?void 0:A[0])}))&&((H=$.configs)==null?void 0:H.some(f)):(F=$.configs)==null?void 0:F.some(f)},k=$=>{var O;return(O=$.items)==null?void 0:O.some(C)},S=(r=s.value)==null?void 0:r.find(k),w=(v=S==null?void 0:S.items)==null?void 0:v.find(C),P=(x=w==null?void 0:w.configs)==null?void 0:x.flatMap(T.getFlatConfigs),D=P==null?void 0:P.find(N);return`<strong>${T.getConfigName(n)({pricing:S,item:w,config:D})}</strong>`}}return[(b==null?void 0:b.name)??((V=(B=b==null?void 0:b.products)==null?void 0:B[0])==null?void 0:V.name),(p=(y=h==null?void 0:h.product_items)==null?void 0:y[0])==null?void 0:p.name].filter(Boolean).join(" - ")},m=d=>{let a;switch(d.discountLevel){case"PRODUCT":{a=n.product;break}case"REVENUE_ITEM":{a=n.revenueItem;break}case"PRICING_RULE":{a=n.pricingRule;break}}return n.discountBody(a??"",u(d)??"",c(d))},l=d=>{var a,_;const g=d.condition;if(!((_=(a=g==null?void 0:g.value)==null?void 0:a.amount)!=null&&_.quantity))return"";const r=yt.getFormattedComparator(n)({propertyName:n.conditionResource,comparator:g.comparator,value:ee.formatAmount(g.value.amount)},{hasFormatting:!0});return n.discountCondition(r)},c=d=>{if(!d.start_at&&!d.end_at)return"";let a,_;return d.start_at||(a=n.startOfSchedule),d.end_at||(_=n.endOfSchedule),d.start_at&&(a=o(i?{date:d.start_at,format:"date",offsetType:"offsetted",timezone:i}:{date:d.start_at,format:"date",offsetType:"local",showTimezone:!1})),d.end_at&&(_=o(i?{date:d.end_at,format:"date",offsetType:"offsetted",timezone:i}:{date:d.end_at,format:"date",offsetType:"local",showTimezone:!1})),`(${a} - ${_})`};return{getDiscountBody:m,getConditionBody:l,getFormattedDuration:c}},Qn=t=>{const n=Object.entries(t||{});if(n.length===0)return;const[i,o]=n[0],[s,u,m]=i.split(".");return{discountLevel:s,index:parseInt(u,10),fieldName:m,message:o}},Nt={...xe,product:"product",revenueItem:"revenue item",pricingRule:"price rule",discountBody:(t,n,i)=>`Discount on ${t} <strong>${n}</strong> ${i}`,conditionResource:"invoice amount",discountCondition:t=>`when ${t}`,startOfSchedule:"Start of schedule",endOfSchedule:"End of schedule",or:"or",unsupported:"unsupported",unknown:"unknown"},ei={class:"inline-block"},ti={key:0,class:"inline-flex flex-wrap items-center gap-1"},ni=["innerHTML"],ii=["innerHTML"],oi=e.defineComponent({__name:"SubscriptionDiscountItem",props:{discount:{},pricingPlanVersion:{},isEditable:{type:Boolean},isRemovable:{type:Boolean},i18n:{},error:{},timezone:{}},emits:["edit","delete"],setup(t,{emit:n}){const i=t,o=n,{$t:s}=E.useIntl(),u=e.computed(()=>i.i18n??Nt),{getDiscountBody:m,getConditionBody:l,getFormattedDuration:c}=Xn(e.toRef(()=>i.pricingPlanVersion),u.value,i.timezone);return(d,a)=>{var _,g;return e.openBlock(),e.createBlock(Be,{icon:"south_east","icon-color":"yellow","is-editable":t.discount.discountLevel==="INVOICE"&&((_=t.discount.ids)!=null&&_[0])?!1:t.isEditable,"is-removable":t.discount.discountLevel==="INVOICE"&&((g=t.discount.ids)!=null&&g[0])?!1:t.isRemovable,error:t.error,onEdit:a[0]||(a[0]=r=>o("edit")),onDelete:a[1]||(a[1]=r=>o("delete"))},{body:e.withCtx(()=>{var r;return[e.createElementVNode("div",ei,[e.createVNode(E._sfc_main,{tag:"span",weight:"semibold"},{default:e.withCtx(()=>{var v;return[(v=t.discount.amount)!=null&&v.quantity?(e.openBlock(),e.createBlock(L._sfc_main,{key:0,value:t.discount.amount,highlighted:""},null,8,["value"])):t.discount.percentage?(e.openBlock(),e.createBlock(E._sfc_main,{key:1,color:"inherit",tag:"span",class:"text-primary-600"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.discount.percentage)+"%",1)]),_:1})):e.createCommentVNode("",!0)]}),_:1}),a[3]||(a[3]=e.createTextVNode(" ",-1)),t.discount.discountLevel==="INVOICE"?(e.openBlock(),e.createElementBlock("span",ti,[e.createVNode(E._sfc_main,{tag:"span"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Discount on",description:"Discount on",id:"SubscriptionDiscountItem.discountOn"})),1)]),_:1}),e.createVNode(E._sfc_main,{tag:"span",weight:"semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Invoice",description:"invoice indicator",id:"SubscriptionDiscountItem.invoice"})),1)]),_:1}),(r=t.discount.ids)!=null&&r[0]?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(E._sfc_main,{tag:"span"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"applied by",description:"Subscription discount applied by",id:"SubscriptionDiscountItem.coupon.applied_by"})),1)]),_:1}),e.createVNode(E._sfc_main,{tag:"span",weight:"semibold"},{default:e.withCtx(()=>{var v;return[e.createTextVNode(e.toDisplayString(t.discount.coupon_name??((v=t.discount.ids)==null?void 0:v[0])),1)]}),_:1})],64)):e.createCommentVNode("",!0),e.unref(c)(t.discount)?(e.openBlock(),e.createBlock(E._sfc_main,{key:1,tag:"span"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)(t.discount)),1)]),_:1})):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("span",{key:1,innerHTML:e.unref(m)(t.discount)},null,8,ni)),t.discount.condition?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[a[2]||(a[2]=e.createTextVNode(" ",-1)),e.createElementVNode("span",{innerHTML:e.unref(l)(t.discount)},null,8,ii)],64)):e.createCommentVNode("",!0)])]}),_:1},8,["is-editable","is-removable","error"])}}}),ae={...Nt,title:"Discounts",orderOfApplicationExplanation:"Discounts are applied before commitments on invoices",description:"Add price reductions for a defined period or specific terms.",selectPricingPlanHint:"Please select a pricing plan to add discounts",addItemLabel:"Add",notEditableExplanation:"Discounts can't be edited for active schedules"},li="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='a'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='44'%20height='44'%3e%3cpath%20fill='%23D9D9D9'%20d='M0%200h44v44H0z'/%3e%3c/mask%3e%3cg%20mask='url(%23a)'%3e%3cmask%20id='e'%20fill='%23fff'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='m18.55%2039.32%203.45%203.4%203.46-3.41%204.48%201.85%201.86-4.5h4.87v-4.84l4.47-1.9-1.82-4.47%203.4-3.45-3.41-3.46%201.85-4.48-4.5-1.86V7.33h-4.84l-1.9-4.47-4.47%201.82L22%201.28%2018.54%204.7l-4.48-1.85-1.86%204.5H7.33v4.84l-4.47%201.9%201.82%204.47L1.28%2022l3.41%203.46-1.85%204.48%204.5%201.86v4.87h4.84l1.9%204.47%204.47-1.82Z'/%3e%3c/mask%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='m18.55%2039.32%203.45%203.4%203.46-3.41%204.48%201.85%201.86-4.5h4.87v-4.84l4.47-1.9-1.82-4.47%203.4-3.45-3.41-3.46%201.85-4.48-4.5-1.86V7.33h-4.84l-1.9-4.47-4.47%201.82L22%201.28%2018.54%204.7l-4.48-1.85-1.86%204.5H7.33v4.84l-4.47%201.9%201.82%204.47L1.28%2022l3.41%203.46-1.85%204.48%204.5%201.86v4.87h4.84l1.9%204.47%204.47-1.82Z'%20fill='%23BFEAFB'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='m18.55%2039.32%203.45%203.4%203.46-3.41%204.48%201.85%201.86-4.5h4.87v-4.84l4.47-1.9-1.82-4.47%203.4-3.45-3.41-3.46%201.85-4.48-4.5-1.86V7.33h-4.84l-1.9-4.47-4.47%201.82L22%201.28%2018.54%204.7l-4.48-1.85-1.86%204.5H7.33v4.84l-4.47%201.9%201.82%204.47L1.28%2022l3.41%203.46-1.85%204.48%204.5%201.86v4.87h4.84l1.9%204.47%204.47-1.82Z'%20fill='url(%23b)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='m18.55%2039.32%203.45%203.4%203.46-3.41%204.48%201.85%201.86-4.5h4.87v-4.84l4.47-1.9-1.82-4.47%203.4-3.45-3.41-3.46%201.85-4.48-4.5-1.86V7.33h-4.84l-1.9-4.47-4.47%201.82L22%201.28%2018.54%204.7l-4.48-1.85-1.86%204.5H7.33v4.84l-4.47%201.9%201.82%204.47L1.28%2022l3.41%203.46-1.85%204.48%204.5%201.86v4.87h4.84l1.9%204.47%204.47-1.82Z'%20fill='url(%23c)'/%3e%3cpath%20d='m22%2042.72-.7.7.7.7.7-.7-.7-.7Zm-3.45-3.4.7-.71-.46-.46-.61.25.37.92Zm6.91-.01.38-.93-.6-.25-.48.47.7.7Zm4.48%201.85-.38.93.92.38.38-.92-.92-.39Zm1.86-4.5v-1h-.67l-.25.62.92.39Zm4.87%200v1h1v-1h-1Zm0-4.84-.4-.92-.6.26v.66h1Zm4.47-1.9.39.93.9-.39-.36-.9-.93.37Zm-1.82-4.47-.7-.7-.47.46.25.61.92-.37Zm3.4-3.45.7.7.7-.7-.7-.7-.7.7Zm-3.41-3.46-.93-.38-.25.61.47.47.7-.7Zm1.85-4.48.93.39.38-.93-.92-.38-.39.92Zm-4.5-1.86h-1v.67l.62.25.39-.92Zm0-4.87h1v-1h-1v1Zm-4.84%200-.92.4.26.6h.66v-1Zm-1.9-4.47.93-.39-.38-.9-.92.36.38.93Zm-4.47%201.82-.7.71.46.46.61-.25-.37-.92ZM22%201.28l.7-.7-.7-.7-.7.7.7.7ZM18.54%204.7l-.38.93.61.25.47-.47-.7-.7Zm-4.48-1.85.39-.93-.93-.38-.38.92.92.39Zm-1.86%204.5v1h.67l.25-.62-.92-.39Zm-4.87%200v-1h-1v1h1Zm0%204.84.4.92.6-.26v-.66h-1Zm-4.47%201.9-.39-.93-.9.38.36.92.93-.38Zm1.82%204.47.71.7.46-.46-.25-.61-.92.37ZM1.28%2022l-.7-.7-.7.7.7.7.7-.7Zm3.41%203.46.93.38.25-.61-.47-.47-.7.7Zm-1.85%204.48-.93-.39-.38.93.92.38.39-.92Zm4.5%201.86h1v-.67l-.62-.25-.39.92Zm0%204.87h-1v1h1v-1Zm4.84%200%20.92-.4-.26-.6h-.66v1Zm1.9%204.47-.93.39.39.9.9-.36-.37-.93Zm8.62.86-3.44-3.39-1.4%201.42%203.44%203.4L22.7%2042Zm2.06-3.4L21.3%2042l1.4%201.43%203.46-3.41-1.4-1.42Zm5.56%201.64-4.48-1.86-.76%201.85%204.48%201.86.76-1.85Zm.56-3.96L29%2040.78l1.85.77%201.86-4.5-1.84-.77Zm5.79-.61H31.8v2h4.87v-2Zm-1-3.85v4.85h2v-4.85h-2Zm5.08-2.81-4.47%201.89.78%201.84%204.47-1.9-.78-1.83Zm-2.35-3.19%201.81%204.48%201.86-.75-1.82-4.48-1.85.75ZM42%2021.3l-3.39%203.44%201.43%201.4%203.39-3.44L42%2021.3Zm-3.4-2.06L42%2022.7l1.43-1.4-3.4-3.46-1.43%201.4Zm1.64-5.56-1.86%204.48%201.85.76%201.86-4.47-1.85-.77Zm-3.96-.56%204.5%201.87.77-1.85-4.5-1.86-.77%201.84Zm-.61-5.79v4.87h2V7.33h-2Zm-3.85%201h4.85v-2h-4.85v2Zm-2.81-5.08%201.89%204.47%201.84-.78-1.9-4.47-1.83.78ZM25.82%205.6%2030.3%203.8l-.75-1.86-4.48%201.82.75%201.85ZM21.3%202l3.44%203.39%201.4-1.42L22.7.57%2021.3%202Zm-2.06%203.4L22.7%202%2021.3.57l-3.46%203.4%201.4%201.43Zm-5.56-1.64%204.48%201.86.76-1.85-4.47-1.86-.77%201.85Zm-.56%203.96L15%203.22l-1.85-.77-1.86%204.5%201.84.77Zm-5.79.61h4.87v-2H7.33v2Zm1%203.85V7.33h-2v4.85h2Zm-5.08%202.81%204.47-1.89-.78-1.84-4.47%201.9.78%201.83Zm2.35%203.19L3.8%2013.7l-1.86.75%201.82%204.48%201.85-.75ZM2%2022.7l3.39-3.44-1.42-1.4-3.4%203.44L2%2022.7Zm3.4%202.06L2%2021.3.57%2022.7l3.41%203.46%201.42-1.4Zm-1.64%205.56%201.86-4.48-1.85-.76-1.86%204.47%201.85.77Zm3.96.56L3.22%2029l-.77%201.85%204.5%201.86.77-1.84Zm.61%205.79V31.8h-2v4.87h2Zm3.85-1H7.33v2h4.85v-2Zm2.81%205.08-1.89-4.47-1.84.78%201.9%204.47%201.83-.78Zm3.19-2.35L13.7%2040.2l.75%201.86%204.48-1.82-.75-1.85Z'%20fill='url(%23d)'%20fill-opacity='.1'%20mask='url(%23e)'/%3e%3cg%20opacity='.5'%3e%3cmask%20id='f'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='12'%20y='12'%20width='20'%20height='20'%3e%3cpath%20fill='%23D9D9D9'%20d='M12%2012h20v20H12z'/%3e%3c/mask%3e%3cg%20mask='url(%23f)'%3e%3cpath%20d='M19.5%2027.83v-1.66H25l-9.67-9.67%201.17-1.17L26.17%2025v-5.5h1.66v8.33H19.5Z'%20fill='%23222B35'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='b'%20x1='1.28'%20y1='1.28'%20x2='42.72'%20y2='42.72'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23F6D449'/%3e%3cstop%20offset='1'%20stop-color='%23F6D449'%20stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient%20id='c'%20x1='42.72'%20y1='1.28'%20x2='1.28'%20y2='42.72'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23fff'/%3e%3cstop%20offset='1'%20stop-color='%23fff'%20stop-opacity='.4'/%3e%3c/linearGradient%3e%3clinearGradient%20id='d'%20x1='22'%20y1='42.72'%20x2='22'%20y2='-2.59'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%230C0E41'/%3e%3cstop%20offset='1'%20stop-color='%230C0E41'%20stop-opacity='.5'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",ai=["src"],ri=e.defineComponent({__name:"SubscriptionDiscounts",props:{i18n:{},discount:{},pricingPlanVersion:{},isEditable:{type:[Boolean,Function]},isCreatable:{type:Boolean},isRemovable:{type:[Boolean,Function]},scheduleStart:{},billingPeriod:{},billingTime:{},isDraftSubscription:{type:Boolean,default:!1},error:{},timezone:{}},emits:["add","edit","delete"],setup(t){const n=t,i=e.computed(()=>n.i18n??ae),o=e.computed(()=>{if("error"in n)return Qn(n.error)}),{isEditableFlag:s,isItemEditable:u,isItemRemovable:m}=Ne({isEditable:n.isEditable,isRemovable:n.isRemovable}),l=e.computed(()=>{var c,d,a,_,g,r,v,x,B,V,y,p,b,h;return[...((d=(c=n.discount)==null?void 0:c.pricing_item_configs)==null?void 0:d.map((N,f)=>{var C,k;return{item:{...N,discountLevel:"PRICING_RULE"},error:f===((C=o.value)==null?void 0:C.index)&&((k=o.value)==null?void 0:k.discountLevel)==="pricing_item_configs"?o.value.message:void 0}}))||[],...((_=(a=n.discount)==null?void 0:a.product_items)==null?void 0:_.map((N,f)=>{var C,k;return{item:{...N,discountLevel:"REVENUE_ITEM"},error:f===((C=o.value)==null?void 0:C.index)&&((k=o.value)==null?void 0:k.discountLevel)==="product_items"?o.value.message:void 0}}))||[],...((r=(g=n.discount)==null?void 0:g.product_item_meter_property_conditions)==null?void 0:r.map((N,f)=>{var C,k;return{item:{...N,discountLevel:"PRICING_RULE"},error:f===((C=o.value)==null?void 0:C.index)&&((k=o.value)==null?void 0:k.discountLevel)==="product_item_meter_property_conditions"?o.value.message:void 0}}))||[],...((x=(v=n.discount)==null?void 0:v.pricing_items)==null?void 0:x.map((N,f)=>{var C,k;return{item:{...N,discountLevel:"REVENUE_ITEM"},error:f===((C=o.value)==null?void 0:C.index)&&((k=o.value)==null?void 0:k.discountLevel)==="pricing_items"?o.value.message:void 0}}))||[],...((V=(B=n.discount)==null?void 0:B.pricings)==null?void 0:V.map((N,f)=>{var C,k;return{item:{...N,discountLevel:"PRODUCT"},error:f===((C=o.value)==null?void 0:C.index)&&((k=o.value)==null?void 0:k.discountLevel)==="pricings"?o.value.message:void 0}}))||[],...((p=(y=n.discount)==null?void 0:y.products)==null?void 0:p.map((N,f)=>{var C,k;return{item:{...N,discountLevel:"PRODUCT"},error:f===((C=o.value)==null?void 0:C.index)&&((k=o.value)==null?void 0:k.discountLevel)==="products"?o.value.message:void 0}}))||[],...((h=(b=n.discount)==null?void 0:b.totals)==null?void 0:h.map((N,f)=>{var C,k;return{item:{...N,discountLevel:"INVOICE"},error:f===((C=o.value)==null?void 0:C.index)&&((k=o.value)==null?void 0:k.discountLevel)==="totals"?o.value.message:void 0}}))||[]]});return(c,d)=>(e.openBlock(),e.createBlock(Ve,e.mergeProps(c.$attrs,{title:i.value.title,"order-of-application-explanation":i.value.orderOfApplicationExplanation,description:i.value.description,"pricing-plan-version-is-selected":!!t.pricingPlanVersion,"select-pricing-plan-hint":i.value.selectPricingPlanHint,"add-item-label":i.value.addItemLabel,"is-editable":e.unref(s),"is-creatable":!!t.isCreatable,"not-editable-explanation":i.value.notEditableExplanation,"has-items":l.value.length>0,onAdd:d[0]||(d[0]=a=>c.$emit("add"))}),{icon:e.withCtx(()=>[e.createElementVNode("img",{src:e.unref(li),alt:""},null,8,ai)]),"list-items":e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,({item:a,error:_})=>(e.openBlock(),e.createElementBlock("li",{key:JSON.stringify(a)},[e.createVNode(oi,{discount:a,error:_,"is-editable":e.unref(u)(a),"is-removable":e.unref(m)(a),"pricing-plan-version":t.pricingPlanVersion,i18n:i.value,timezone:t.timezone,onEdit:g=>c.$emit("edit",a),onDelete:g=>c.$emit("delete",a)},null,8,["discount","error","is-editable","is-removable","pricing-plan-version","i18n","timezone","onEdit","onDelete"])]))),128))]),_:1},16,["title","order-of-application-explanation","description","pricing-plan-version-is-selected","select-pricing-plan-hint","add-item-label","is-editable","is-creatable","not-editable-explanation","has-items"]))}}),Ee={...de,...xe,markupBody:(t,n,i)=>`Markup on ${t} <strong>${n}</strong> ${i}`},ci=(t,n=Ee,i)=>{const{formatDate:o}=E.useIntl(),s=e.computed(()=>z.getAllPricings(t.value)),u=c=>n.markupBody(n.pricingRule,m(c)??"",l(c)),m=c=>{var d,a;const _=p=>{var b;return p.id===((b=c.ids)==null?void 0:b[0])},g=p=>{var b,h;return _(p)||!!((h=(b=p.conditions)==null?void 0:b.configs)!=null&&h.some(_))},r=p=>{var b;return(b=p.configs)==null?void 0:b.some(g)},v=p=>{var b;return(b=p.items)==null?void 0:b.some(r)},x=(d=s.value)==null?void 0:d.find(v),B=(a=x==null?void 0:x.items)==null?void 0:a.find(r),V=(B==null?void 0:B.configs)&&(B==null?void 0:B.configs.flatMap(T.getFlatConfigs)),y=V==null?void 0:V.find(_);return`<strong>${T.getConfigName(n)({pricing:x,item:B,config:y})}</strong>`},l=c=>{if(!c.start_at&&!c.end_at)return"";let d,a;return c.start_at||(d=n.startOfSchedule),c.end_at||(a=n.endOfSchedule),c.start_at&&(d=o(i?{date:c.start_at,format:"date",offsetType:"offsetted",timezone:i}:{date:c.start_at,format:"date",offsetType:"local",showTimezone:!1})),c.end_at&&(a=o(i?{date:c.end_at,format:"date",offsetType:"offsetted",timezone:i}:{date:c.end_at,format:"date",offsetType:"local",showTimezone:!1})),`(${d} - ${a})`};return{getMarkupBody:u,getFormattedDuration:l}},si=t=>{const n=Object.entries(t||{});if(n.length===0)return;const[i,o]=n[0],[s,u,m]=i.split(".");return{markupLevel:s,index:parseInt(u,10),fieldName:m,message:o}},di={class:"font-semibold text-primary-600"},ui=["innerHTML"],mi=e.defineComponent({__name:"SubscriptionMarkupItem",props:{markup:{},pricingPlanVersion:{},isEditable:{type:Boolean},isRemovable:{type:Boolean},i18n:{},error:{},timezone:{}},emits:["edit","delete"],setup(t,{emit:n}){const i=t,o=n,s=e.computed(()=>i.i18n??Ee),{getMarkupBody:u}=ci(e.toRef(()=>i.pricingPlanVersion),s.value,i.timezone);return(m,l)=>(e.openBlock(),e.createBlock(Be,{icon:"north_east","icon-color":"teal","is-editable":t.isEditable,"is-removable":t.isRemovable,error:t.error,onEdit:l[0]||(l[0]=c=>o("edit")),onDelete:l[1]||(l[1]=c=>o("delete"))},{body:e.withCtx(()=>[e.createElementVNode("span",di,e.toDisplayString(t.markup.percentage)+"%"+e.toDisplayString(" "),1),e.createElementVNode("span",{innerHTML:e.unref(u)(t.markup)},null,8,ui)]),_:1},8,["is-editable","is-removable","error"]))}}),re={...Ee,title:"Markups",orderOfApplicationExplanation:"Markups are applied before commitments on invoices",description:"Add price markups for a defined period or specific terms.",selectPricingPlanHint:"Please select a pricing plan to add markups",addItemLabel:"Add",notEditableExplanation:"Markups can't be edited for active schedules"},pi="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='a'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='44'%20height='44'%3e%3cpath%20fill='%23D9D9D9'%20d='M0%200h44v44H0z'/%3e%3c/mask%3e%3cg%20mask='url(%23a)'%3e%3cmask%20id='e'%20fill='%23fff'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M16.76%2040.05a2.94%202.94%200%200%201%203.17.63%202.96%202.96%200%200%200%204.15%200%202.93%202.93%200%200%201%203.17-.63c1.48.61%203.19-.1%203.8-1.58a2.92%202.92%200%200%201%202.7-1.8c1.61%200%202.92-1.3%202.92-2.92%200-1.17.7-2.23%201.78-2.69a2.96%202.96%200%200%200%201.6-3.82%202.94%202.94%200%200%201%20.63-3.17%202.96%202.96%200%200%200%200-4.15%202.93%202.93%200%200%201-.63-3.16c.61-1.5-.1-3.2-1.58-3.81a2.92%202.92%200%200%201-1.8-2.7c0-1.61-1.3-2.92-2.92-2.92a2.93%202.93%200%200%201-2.69-1.78%202.96%202.96%200%200%200-3.82-1.6c-1.09.44-2.34.2-3.17-.63a2.96%202.96%200%200%200-4.15%200%202.93%202.93%200%200%201-3.16.63c-1.5-.61-3.2.1-3.81%201.58a2.92%202.92%200%200%201-2.7%201.8%202.92%202.92%200%200%200-2.92%202.92c0%201.17-.7%202.23-1.78%202.69a2.96%202.96%200%200%200-1.6%203.82c.44%201.09.2%202.34-.63%203.17a2.96%202.96%200%200%200%20.01%204.15c.82.83%201.07%202.08.62%203.16-.61%201.5.1%203.2%201.58%203.81a2.92%202.92%200%200%201%201.8%202.7c0%201.61%201.3%202.92%202.92%202.92%201.17%200%202.23.7%202.69%201.78a2.96%202.96%200%200%200%203.82%201.6Z'/%3e%3c/mask%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M16.76%2040.05a2.94%202.94%200%200%201%203.17.63%202.96%202.96%200%200%200%204.15%200%202.93%202.93%200%200%201%203.17-.63c1.48.61%203.19-.1%203.8-1.58a2.92%202.92%200%200%201%202.7-1.8c1.61%200%202.92-1.3%202.92-2.92%200-1.17.7-2.23%201.78-2.69a2.96%202.96%200%200%200%201.6-3.82%202.94%202.94%200%200%201%20.63-3.17%202.96%202.96%200%200%200%200-4.15%202.93%202.93%200%200%201-.63-3.16c.61-1.5-.1-3.2-1.58-3.81a2.92%202.92%200%200%201-1.8-2.7c0-1.61-1.3-2.92-2.92-2.92a2.93%202.93%200%200%201-2.69-1.78%202.96%202.96%200%200%200-3.82-1.6c-1.09.44-2.34.2-3.17-.63a2.96%202.96%200%200%200-4.15%200%202.93%202.93%200%200%201-3.16.63c-1.5-.61-3.2.1-3.81%201.58a2.92%202.92%200%200%201-2.7%201.8%202.92%202.92%200%200%200-2.92%202.92c0%201.17-.7%202.23-1.78%202.69a2.96%202.96%200%200%200-1.6%203.82c.44%201.09.2%202.34-.63%203.17a2.96%202.96%200%200%200%20.01%204.15c.82.83%201.07%202.08.62%203.16-.61%201.5.1%203.2%201.58%203.81a2.92%202.92%200%200%201%201.8%202.7c0%201.61%201.3%202.92%202.92%202.92%201.17%200%202.23.7%202.69%201.78a2.96%202.96%200%200%200%203.82%201.6Z'%20fill='%23BFEAFB'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M16.76%2040.05a2.94%202.94%200%200%201%203.17.63%202.96%202.96%200%200%200%204.15%200%202.93%202.93%200%200%201%203.17-.63c1.48.61%203.19-.1%203.8-1.58a2.92%202.92%200%200%201%202.7-1.8c1.61%200%202.92-1.3%202.92-2.92%200-1.17.7-2.23%201.78-2.69a2.96%202.96%200%200%200%201.6-3.82%202.94%202.94%200%200%201%20.63-3.17%202.96%202.96%200%200%200%200-4.15%202.93%202.93%200%200%201-.63-3.16c.61-1.5-.1-3.2-1.58-3.81a2.92%202.92%200%200%201-1.8-2.7c0-1.61-1.3-2.92-2.92-2.92a2.93%202.93%200%200%201-2.69-1.78%202.96%202.96%200%200%200-3.82-1.6c-1.09.44-2.34.2-3.17-.63a2.96%202.96%200%200%200-4.15%200%202.93%202.93%200%200%201-3.16.63c-1.5-.61-3.2.1-3.81%201.58a2.92%202.92%200%200%201-2.7%201.8%202.92%202.92%200%200%200-2.92%202.92c0%201.17-.7%202.23-1.78%202.69a2.96%202.96%200%200%200-1.6%203.82c.44%201.09.2%202.34-.63%203.17a2.96%202.96%200%200%200%20.01%204.15c.82.83%201.07%202.08.62%203.16-.61%201.5.1%203.2%201.58%203.81a2.92%202.92%200%200%201%201.8%202.7c0%201.61%201.3%202.92%202.92%202.92%201.17%200%202.23.7%202.69%201.78a2.96%202.96%200%200%200%203.82%201.6Z'%20fill='url(%23b)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M16.76%2040.05a2.94%202.94%200%200%201%203.17.63%202.96%202.96%200%200%200%204.15%200%202.93%202.93%200%200%201%203.17-.63c1.48.61%203.19-.1%203.8-1.58a2.92%202.92%200%200%201%202.7-1.8c1.61%200%202.92-1.3%202.92-2.92%200-1.17.7-2.23%201.78-2.69a2.96%202.96%200%200%200%201.6-3.82%202.94%202.94%200%200%201%20.63-3.17%202.96%202.96%200%200%200%200-4.15%202.93%202.93%200%200%201-.63-3.16c.61-1.5-.1-3.2-1.58-3.81a2.92%202.92%200%200%201-1.8-2.7c0-1.61-1.3-2.92-2.92-2.92a2.93%202.93%200%200%201-2.69-1.78%202.96%202.96%200%200%200-3.82-1.6c-1.09.44-2.34.2-3.17-.63a2.96%202.96%200%200%200-4.15%200%202.93%202.93%200%200%201-3.16.63c-1.5-.61-3.2.1-3.81%201.58a2.92%202.92%200%200%201-2.7%201.8%202.92%202.92%200%200%200-2.92%202.92c0%201.17-.7%202.23-1.78%202.69a2.96%202.96%200%200%200-1.6%203.82c.44%201.09.2%202.34-.63%203.17a2.96%202.96%200%200%200%20.01%204.15c.82.83%201.07%202.08.62%203.16-.61%201.5.1%203.2%201.58%203.81a2.92%202.92%200%200%201%201.8%202.7c0%201.61%201.3%202.92%202.92%202.92%201.17%200%202.23.7%202.69%201.78a2.96%202.96%200%200%200%203.82%201.6Z'%20fill='url(%23c)'/%3e%3cpath%20d='M12.02%2038.84a3.96%203.96%200%200%200%205.12%202.14l-.75-1.86c-.98.4-2.12-.07-2.53-1.05l-1.84.77Zm-1.77-1.17c.76%200%201.46.46%201.77%201.17l1.84-.78a3.93%203.93%200%200%200-3.61-2.4v2Zm-3.92-3.92a3.92%203.92%200%200%200%203.92%203.92v-2a1.92%201.92%200%200%201-1.92-1.92h-2Zm-1.18-1.77c.72.3%201.18%201%201.18%201.77h2c0-1.58-.95-3.01-2.42-3.62l-.76%201.85Zm-2.12-5.12c-.83%202%20.12%204.29%202.12%205.12l.76-1.85a1.92%201.92%200%200%201-1.03-2.5l-1.85-.77Zm-.41-2.08c.54.55.7%201.37.4%202.08l1.86.77c.6-1.46.26-3.14-.84-4.25l-1.42%201.4Zm-.01-5.55a3.96%203.96%200%200%200%200%205.55l1.43-1.4a1.96%201.96%200%200%201%200-2.75l-1.43-1.4Zm.41-2.1c.3.73.13%201.55-.41%202.1l1.42%201.4a3.94%203.94%200%200%200%20.85-4.25l-1.86.76Zm2.14-5.11a3.96%203.96%200%200%200-2.14%205.12l1.86-.76c-.4-.97.07-2.1%201.06-2.52l-.78-1.84Zm1.17-1.77c0%20.76-.46%201.46-1.17%201.77l.78%201.84a3.93%203.93%200%200%200%202.4-3.61h-2Zm3.92-3.92a3.92%203.92%200%200%200-3.92%203.92h2c0-1.06.86-1.92%201.92-1.92v-2Zm1.77-1.18c-.3.72-1%201.18-1.77%201.18v2c1.58%200%203.01-.95%203.62-2.42l-1.85-.76Zm5.12-2.12c-2-.83-4.29.12-5.12%202.12l1.85.76a1.92%201.92%200%200%201%202.5-1.03l.77-1.85Zm2.08-.41c-.55.54-1.37.7-2.08.4l-.77%201.86c1.46.6%203.14.26%204.26-.84l-1.4-1.42Zm5.55-.01a3.96%203.96%200%200%200-5.55%200l1.4%201.43a1.96%201.96%200%200%201%202.75%200l1.4-1.43Zm2.1.41c-.72.3-1.55.13-2.1-.41l-1.4%201.42a3.94%203.94%200%200%200%204.25.85l-.76-1.86Zm5.12%202.14a3.96%203.96%200%200%200-5.13-2.14l.76%201.86c.97-.4%202.1.07%202.52%201.05L32%205.16Zm1.76%201.17c-.76%200-1.46-.46-1.76-1.17l-1.85.77a3.93%203.93%200%200%200%203.61%202.4v-2Zm3.92%203.92a3.92%203.92%200%200%200-3.92-3.92v2c1.06%200%201.92.86%201.92%201.92h2Zm1.18%201.77c-.71-.3-1.18-1-1.18-1.77h-2c0%201.58.95%203.01%202.42%203.62l.76-1.85Zm2.12%205.12c.83-2-.12-4.29-2.12-5.12l-.76%201.85c.97.4%201.44%201.53%201.03%202.5l1.85.77Zm.41%202.08a1.93%201.93%200%200%201-.4-2.08l-1.86-.77a3.93%203.93%200%200%200%20.84%204.25l1.42-1.4Zm.01%205.55a3.96%203.96%200%200%200%200-5.55l-1.43%201.4c.75.77.75%202%200%202.74l1.43%201.4Zm-.41%202.1c-.3-.73-.13-1.55.41-2.1l-1.42-1.4a3.94%203.94%200%200%200-.85%204.25l1.86-.76Zm-2.14%205.11a3.96%203.96%200%200%200%202.14-5.12l-1.86.76c.4.97-.07%202.1-1.05%202.52l.77%201.84Zm-1.17%201.77c0-.76.46-1.46%201.17-1.77l-.77-1.84a3.93%203.93%200%200%200-2.4%203.61h2Zm-3.92%203.92a3.92%203.92%200%200%200%203.92-3.92h-2c0%201.06-.86%201.92-1.92%201.92v2Zm-1.77%201.18c.3-.72%201-1.18%201.77-1.18v-2c-1.58%200-3.01.95-3.62%202.42l1.85.76Zm-5.12%202.12c2%20.83%204.3-.12%205.12-2.12l-1.85-.76a1.92%201.92%200%200%201-2.5%201.03l-.77%201.85Zm-2.08.41c.55-.54%201.38-.7%202.08-.4l.77-1.86a3.93%203.93%200%200%200-4.25.84l1.4%201.42Zm-4.14-1.41a3.94%203.94%200%200%200-4.25-.85l.75%201.86c.72-.3%201.54-.13%202.1.41l1.4-1.42Zm-1.4%201.42a3.96%203.96%200%200%200%205.54%200l-1.4-1.43c-.77.75-2%20.75-2.74%200l-1.4%201.43Z'%20fill='url(%23d)'%20fill-opacity='.1'%20mask='url(%23e)'/%3e%3cg%20opacity='.5'%3e%3cmask%20id='f'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='12'%20y='12'%20width='20'%20height='20'%3e%3cpath%20fill='%23D9D9D9'%20d='M12%2012h20v20H12z'/%3e%3c/mask%3e%3cg%20mask='url(%23f)'%3e%3cpath%20d='m16.5%2028.67-1.17-1.17L25%2017.83h-5.5v-1.66h8.33v8.33h-1.66V19l-9.67%209.67Z'%20fill='%23222B35'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='b'%20x1='1.28'%20y1='1.28'%20x2='42.72'%20y2='42.72'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23395E6D'/%3e%3cstop%20offset='1'%20stop-color='%23395E6D'%20stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient%20id='c'%20x1='42.72'%20y1='1.28'%20x2='1.28'%20y2='42.72'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23fff'/%3e%3cstop%20offset='1'%20stop-color='%23fff'%20stop-opacity='.4'/%3e%3c/linearGradient%3e%3clinearGradient%20id='d'%20x1='22'%20y1='42.72'%20x2='22'%20y2='-2.59'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%230C0E41'/%3e%3cstop%20offset='1'%20stop-color='%230C0E41'%20stop-opacity='.5'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",gi=["src"],fi=e.defineComponent({__name:"SubscriptionMarkups",props:{i18n:{},markup:{},pricingPlanVersion:{},isCreatable:{type:Boolean},isEditable:{type:[Boolean,Function]},isRemovable:{type:[Boolean,Function]},error:{},timezone:{}},emits:["add","edit","delete"],setup(t){const n=t,i=e.computed(()=>n.i18n??re),{isEditableFlag:o,isItemEditable:s,isItemRemovable:u}=Ne({isEditable:n.isEditable,isRemovable:n.isRemovable}),m=e.computed(()=>{if("error"in n)return si(n.error)}),l=e.computed(()=>{var c,d;return((d=(c=n.markup)==null?void 0:c.pricing_item_configs)==null?void 0:d.map((a,_)=>{var g,r;return{item:a,error:_===((g=m.value)==null?void 0:g.index)&&((r=m.value)==null?void 0:r.markupLevel)==="pricing_item_configs"?m.value.message:void 0}}))??[]});return(c,d)=>(e.openBlock(),e.createBlock(Ve,e.mergeProps(c.$attrs,{title:i.value.title,"order-of-application-explanation":i.value.orderOfApplicationExplanation,description:i.value.description,"pricing-plan-version-is-selected":!!t.pricingPlanVersion,"select-pricing-plan-hint":i.value.selectPricingPlanHint,"add-item-label":i.value.addItemLabel,"is-editable":e.unref(o),"is-creatable":!!t.isCreatable,"not-editable-explanation":i.value.notEditableExplanation,"has-items":l.value.length>0,onAdd:d[0]||(d[0]=a=>c.$emit("add"))}),{icon:e.withCtx(()=>[e.createElementVNode("img",{src:e.unref(pi),alt:""},null,8,gi)]),"list-items":e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,({item:a,error:_})=>(e.openBlock(),e.createElementBlock("li",{key:JSON.stringify(a)},[e.createVNode(mi,{markup:a,error:_,"is-editable":e.unref(s)(a),"is-removable":e.unref(u)(a),"pricing-plan-version":t.pricingPlanVersion,i18n:i.value,timezone:t.timezone,onEdit:g=>c.$emit("edit",a),onDelete:g=>c.$emit("delete",a)},null,8,["markup","error","is-editable","is-removable","pricing-plan-version","i18n","timezone","onEdit","onDelete"])]))),128))]),_:1},16,["title","order-of-application-explanation","description","pricing-plan-version-is-selected","select-pricing-plan-hint","add-item-label","is-editable","is-creatable","not-editable-explanation","has-items"]))}}),Vt={startOfSchedule:te.startOfSchedule,endOfSchedule:te.endOfSchedule,markupPercentage:t=>`${t}% markup`},vi={class:"flex items-center gap-2"},hi=e.defineComponent({__name:"SubscriptionScheduleConfigMarkup",props:{markup:{},i18n:{}},setup(t){const n=t,i=e.computed(()=>n.i18n??Vt),{formatDate:o}=E.useIntl();return(s,u)=>(e.openBlock(),e.createBlock(U._sfc_main,{intent:"neutral"},{default:e.withCtx(()=>[e.createElementVNode("div",vi,[e.createVNode(R._sfc_main$1,{icon:"north_east",size:"xs"}),e.createElementVNode("span",null,[t.markup.percentage?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(i.value.markupPercentage(t.markup.percentage)),1)],64)):e.createCommentVNode("",!0),t.markup.start_at||t.markup.end_at?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(" ")+"("+e.toDisplayString(t.markup.start_at?e.unref(o)({date:t.markup.start_at,format:"date",offsetType:"local",showTimezone:!1}):i.value.startOfSchedule)+" - "+e.toDisplayString(t.markup.end_at?e.unref(o)({date:t.markup.end_at,format:"date",offsetType:"local",showTimezone:!1}):i.value.endOfSchedule)+") ",1)],64)):e.createCommentVNode("",!0)])])]),_:1}))}}),Et=e.defineComponent({__name:"TopUpDescription",props:{i18n:{},pricingItemConfig:{}},setup(t){const n=t,i=e.computed(()=>{var u;return!!((u=n.pricingItemConfig.top_up)!=null&&u.rollover)}),o=e.computed(()=>{var u,m;return(m=(u=n.pricingItemConfig.details)==null?void 0:u.bands)==null?void 0:m.some(l=>!!l.block_size)}),s=e.computed(()=>T.isTieredPricing(n.pricingItemConfig)&&o.value?i.value?n.i18n.tiered.blockSize.rolloverDescription:n.i18n.tiered.blockSize.nonRolloverDescription:T.isTieredPricing(n.pricingItemConfig)&&!o.value?i.value?n.i18n.tiered.nonBlockSize.rolloverDescription:n.i18n.tiered.nonBlockSize.nonRolloverDescription:i.value?n.i18n.rolloverDescription:n.i18n.nonRolloverDescription);return(u,m)=>(e.openBlock(),e.createBlock(E._sfc_main,{variant:"body-xs",color:"secondary",class:"italic"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value),1)]),_:1}))}}),yi={class:"min-w-0 grow"},bi={class:"shrink-0"},ki=e.defineComponent({__name:"CardHeader",props:{icon:{},iconVariant:{default:"neutral"},title:{},subTitle:{},spacing:{default:"md"},size:{default:"sm"},variant:{default:"default"},uppercase:{type:Boolean,default:!0},cardVariant:{default:"default"}},setup(t){const n=t,i=e.computed(()=>{switch(n.cardVariant){case"error":return"border-red-100";case"dark":return"border-gray-600";default:return"border-gray-100"}});return(o,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["card-header-print-root flex items-center justify-between gap-3",{"px-2 pt-2":t.spacing==="xs","px-4 pt-2":t.spacing==="sm","pb-2":["xs","sm"].includes(t.spacing)&&t.variant==="bordered","px-4 pt-4":t.spacing==="md","pb-4":t.spacing==="md"&&t.variant==="bordered","px-8 pt-6":t.spacing==="lg","pb-6":t.spacing==="lg"&&t.variant==="bordered","border-b":t.variant==="bordered",[i.value]:t.variant==="bordered"}])},[e.createElementVNode("div",yi,[e.createVNode(e.unref(bt._sfc_main),{icon:t.icon,title:t.title,"sub-title":t.subTitle,variant:t.iconVariant,size:t.size,uppercase:t.uppercase},{prefix:e.withCtx(()=>[e.renderSlot(o.$slots,"prefix",{},void 0,!0)]),default:e.withCtx(()=>[e.renderSlot(o.$slots,"default",{},void 0,!0)]),subTitle:e.withCtx(()=>[e.renderSlot(o.$slots,"subTitle",{},void 0,!0)]),suffix:e.withCtx(()=>[e.renderSlot(o.$slots,"title-suffix",{},void 0,!0)]),_:3},8,["icon","title","sub-title","variant","size","uppercase"])]),e.createElementVNode("div",bi,[e.renderSlot(o.$slots,"right",{},void 0,!0)])],2))}}),St=j._export_sfc(ki,[["__scopeId","data-v-fd2a04c5"]]),_i={class:"min-w-0 grow"},Ci={class:"flex items-center justify-center gap-2"},xi={class:"collapsible-card-print-content"},Bi=e.defineComponent({__name:"CollapsibleCard",props:{isOpen:{type:Boolean,default:!1},isControlled:{type:Boolean},title:{},icon:{},iconVariant:{},spacing:{default:"md"},borderStyle:{},isExpandContentHidden:{type:Boolean,default:!1},printBehavior:{},withLeftAccent:{type:Boolean,default:!1},headerSize:{default:"sm"},uppercase:{type:Boolean,default:!0},cappedWidth:{type:Boolean},variant:{default:"default"},shadowSize:{},borderRadius:{},rootClass:{},wrapperClass:{}},emits:["toggle","toggled"],setup(t,{emit:n}){const i=t,o=n,[s,u]=pe.useToggle(!i.isOpen),m=()=>{i.isControlled?o("toggle"):u()};e.watch(()=>s.value,a=>{o("toggled",a)}),e.watch(()=>i.isOpen,a=>{i.isControlled&&u(!a)});const l=e.computed(()=>{switch(i.variant){case"error":return"border-red-50 bg-red-50";case"dark":return"bg-gray-800 text-gray-300";default:return""}}),c=e.computed(()=>{switch(i.variant){case"error":return"bg-red-200";default:return""}}),d=e.computed(()=>["ease-in-out duration-200 hover:shadow-md",l.value].join(" "));return(a,_)=>(e.openBlock(),e.createBlock(se,{spacing:"none","wrapper-class":"collapsible-card-print-wrapper","root-class":e.unref(oe.cn)("collapsible-card-print-root",d.value),"border-style":t.borderStyle,"print-behavior":t.printBehavior},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(e.unref(oe.cn)(t.withLeftAccent?"flex p-1":""))},[t.withLeftAccent?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["mr-2 w-1 rounded-md",c.value])},null,2)):e.createCommentVNode("",!0),e.createElementVNode("div",_i,[e.renderSlot(a.$slots,"pre-header",{},void 0,!0),e.createVNode(St,{"data-testid":"card-header",title:t.title,icon:t.icon,"icon-variant":t.iconVariant,spacing:t.spacing,size:t.headerSize,uppercase:t.uppercase,class:e.normalizeClass(["cursor-pointer",{"pb-4":t.spacing==="md","pb-6":t.spacing==="lg"}]),variant:"bordered",tabindex:"0","card-variant":t.variant,onClick:e.withModifiers(m,["stop"]),onKeyup:e.withKeys(m,["enter"])},e.createSlots({prefix:e.withCtx(()=>[e.renderSlot(a.$slots,"title-prefix",{},void 0,!0)]),default:e.withCtx(()=>[e.renderSlot(a.$slots,"title",{},void 0,!0)]),"title-suffix":e.withCtx(()=>[e.renderSlot(a.$slots,"title-suffix",{},void 0,!0)]),_:2},[t.isExpandContentHidden?void 0:{name:"right",fn:e.withCtx(()=>[e.createElementVNode("div",Ci,[a.$slots.right?(e.openBlock(),e.createElementBlock("div",{key:0,class:"flex justify-center",onClick:_[0]||(_[0]=e.withModifiers(()=>{},["stop"])),onKeyup:_[1]||(_[1]=e.withKeys(e.withModifiers(()=>{},["stop"]),["enter"]))},[e.renderSlot(a.$slots,"right",{},void 0,!0)],32)):e.createCommentVNode("",!0),e.createVNode(R._sfc_main$1,{icon:e.unref(s)?"unfold_more":"unfold_less",size:t.headerSize,class:e.normalizeClass({"text-white":t.variant==="dark","print:hidden":!0})},null,8,["icon","size","class"])])]),key:"0"}]),1032,["title","icon","icon-variant","spacing","size","uppercase","class","card-variant"]),t.isExpandContentHidden?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ne._sfc_main,{key:0,"is-open":!e.unref(s),lazy:""},{default:e.withCtx(()=>[e.createElementVNode("div",xi,[e.createVNode(be,{spacing:t.spacing},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{},void 0,!0)]),_:3},8,["spacing"])])]),_:3},8,["is-open"]))])],2)]),_:3},8,["root-class","border-style","print-behavior"]))}}),Ni=j._export_sfc(Bi,[["__scopeId","data-v-31d142b4"]]),Vi={tooltipCollapse:"Close",tooltipExpand:"Open"},Ei={class:"flex flex-col"},Si=["aria-label"],wi={class:"flex grow select-none items-center justify-between"},Pi={class:"text-left"},$i={class:"flex items-center gap-2"},Ii={key:0},Ti={class:"flex gap-6 print:block"},Di={class:"grow pt-5"},zi={class:"collapsible-list-item-content pb-6"},Oi=e.defineComponent({__name:"CollapsibleListItem",props:{hasContinuedPreline:{type:Boolean,default:!0},itemNumber:{default:1},i18n:{default:()=>Vi},isOpen:{type:Boolean,default:!1},hideCollapseIcon:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1}},emits:["toggle"],setup(t){const n=t,i=e.computed(()=>n.isOpen?"unfold_less":"unfold_more");return(o,s)=>(e.openBlock(),e.createElementBlock("li",Ei,[e.createElementVNode("button",{type:"button",class:"flex items-center gap-6","aria-label":t.isOpen?t.i18n.tooltipCollapse:t.i18n.tooltipExpand,onClick:s[0]||(s[0]=e.withModifiers(u=>o.$emit("toggle"),["stop"]))},[e.createElementVNode("div",{class:e.normalizeClass(["flex h-6 select-none items-center justify-center rounded border bg-white shadow-sm print:hidden",e.unref(ve)])},[e.renderSlot(o.$slots,"icon",{},()=>[e.createVNode(E._sfc_main,{tag:"span",variant:"body-xs",weight:"semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.itemNumber),1)]),_:1})],!0)],2),e.createElementVNode("div",wi,[e.createElementVNode("div",Pi,[e.renderSlot(o.$slots,"left",{},void 0,!0)]),e.createElementVNode("div",$i,[o.$slots.right?(e.openBlock(),e.createElementBlock("div",Ii,[e.renderSlot(o.$slots,"right",{},void 0,!0)])):e.createCommentVNode("",!0),t.hideCollapseIcon?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(R._sfc_main$1,{key:1,icon:i.value,size:"sm",class:"h-6 print:hidden"},null,8,["icon"]))])])],8,Si),e.createElementVNode("div",Ti,[e.createElementVNode("div",{class:e.normalizeClass(["relative flex shrink-0 justify-center",e.unref(ve)])},[e.createElementVNode("div",{class:e.normalizeClass(["pointer-events-none h-full w-0.5",[t.hasContinuedPreline?"bg-gray-100":"bg-gradient-to-b from-gray-100 to-transparent"]])},null,2)],2),e.createElementVNode("div",Di,[e.createVNode(ne._sfc_main,{"is-open":t.isOpen,lazy:t.lazy},{default:e.withCtx(()=>[e.createElementVNode("div",zi,[e.renderSlot(o.$slots,"default",{},void 0,!0)])]),_:3},8,["is-open","lazy"])])])]))}}),gt=j._export_sfc(Oi,[["__scopeId","data-v-333bc619"]]),Li={class:"flex flex-col gap-1"},Ri={class:"text-base"},Ai=e.defineComponent({__name:"PricingItemHeader",props:{item:{},creditTypesById:{}},setup(t){return(n,i)=>(e.openBlock(),e.createElementBlock("div",Li,[e.createElementVNode("h4",Ri,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.product_items,o=>(e.openBlock(),e.createBlock(E._sfc_main,{key:o.id,tag:"span",class:"flex flex-wrap items-center gap-3",variant:"body-sm",weight:"semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.name),1)]),_:2},1024))),128))])]))}}),wt={tiered:{nonBlockSize:{rolloverDescription:"Includes prior volume to determine the tier, including volume from prior schedule's billing cycles",nonRolloverDescription:"Prior volume is included to determine the tier"},blockSize:{rolloverDescription:"Includes prior volume to determine the tier and unused volume will move over, including volume from adjacent schedule's billing cycles",nonRolloverDescription:"Includes prior volume to determine the tier and unused volume will move over to the following billing cycles"}},nonRolloverDescription:"Unused volume will be moved over to the next billing cycle",rolloverDescription:"Unused volume will be moved over to the next billing cycle, including the next schedule's billing cycle"},Pt={..._e,formatBillingPeriod:ee.formatBillingPeriod,formatAmount:ee.formatAmount,formatNumber:t=>new Intl.NumberFormat("en-US").format(t),billedEvery:"Billed every",every:"every",from:"From",upTo:"Up to",feeFloor:"Fee floor",feeCap:"Fee cap",price:"Price",pricePerStep:()=>"Price / Step",pricePerUnit:()=>"Price / Unit",percentage:"Percentage",per:"Per",infinite:"infinite",topUpDescription:wt,fixedAmount:"Fixed amount",tieringConditions:"Tiering conditions"},$t={..._e,topUpDescription:wt,notBilled:"Not billed",passThrough:"Pass through",perNumberOfUnits:(t,n)=>`per ${Number(t)>1?`${t} ${(n==null?void 0:n.plural)??"units"}`:`${(n==null?void 0:n.singular)??"unit"}`}`,withDefault:"with default",ofAmount:()=>"of amount",with:"with",aMinimumOf:"a minimum of",and:"and",aMaximumOf:"a maximum of",perSeat:"per seat",billedInAdvance:"billed in advance",billedEvery:"billed every",oneOff:"one-off",formatBillingPeriod:ee.formatBillingPeriod,perUnit:"per unit"},It={...$t,...Pt,includedVolumeAmountPerSchedule:t=>`with <strong class="font-semibold text-primary-600">${new Intl.NumberFormat("en-US",{style:"currency",currencyDisplay:"symbol",currency:t.currency,maximumFractionDigits:10}).format(Number(t.quantity))}</strong> free amount per schedule included`,includedVolumeAmountPerBillingPeriod:t=>`with <strong class="font-semibold text-primary-600">${new Intl.NumberFormat("en-US",{style:"currency",currencyDisplay:"symbol",currency:t.currency,maximumFractionDigits:10}).format(Number(t.quantity))}</strong> free amount per billing period included`,includedVolumeUnitsPerSchedule:t=>`with <strong class="font-semibold text-primary-600">${t} unit${t==="1"?"":"s"}</strong> per schedule included`,includedVolumeUnitsPerBillingPeriod:t=>`with <strong class="font-semibold text-primary-600">${t} unit${t==="1"?"":"s"}</strong> per billing period included`,includedSeats:t=>`with default <strong class="font-semibold text-primary-600">${t}</strong> seat${t==="1"?"":"s"}`},Fi={key:0,class:"flex flex-col gap-1"},Mi={class:"flex items-center gap-2"},Zi={key:0,class:"flex justify-center gap-2"},Ui={key:0,class:"ml-auto text-secondary"},Hi={key:1,class:"ml-auto text-secondary"},Gi={key:0,class:"ml-4 flex shrink-0 flex-col empty:hidden"},ji={class:"flex items-center justify-end"},qi={"data-testid":"flat-fixed-none-amount"},Wi={"data-testid":"flat-fixed-none-per-units",class:"pl-1"},Yi={key:0,class:"pl-1"},Ki={"data-testid":"flat-fixed-none-amount"},Ji={key:0,class:"pl-1"},Xi={"data-testid":"flat-fixed-none-credits-label",class:"font-semibold text-primary-600"},Qi={"data-testid":"flat-fixed-none-per-units",class:"pl-1"},eo={key:0,class:"pl-1"},to={class:"font-semibold text-primary-600"},no={class:"pl-1"},io={key:0,class:"pl-1"},oo={key:1,class:"mr-1"},lo={key:3,class:"mr-1"},ao={key:0,class:"flex shrink-0 flex-col"},ro={key:2,class:"pl-1"},co={key:3,class:"pl-1"},so={key:4,class:"shrink-9 pl-1 italic"},uo={class:"font-semibold text-primary-600"},mo={key:1,class:"flex shrink-0 flex-col"},po={class:"pl-1"},go={key:0},fo={key:1,class:"italic"},vo={class:"font-semibold text-primary-600"},ho={key:2,class:"flex shrink-0 flex-col"},yo={class:"pl-1"},bo={key:1,class:"pl-1"},ko={key:2,class:"pl-1 italic"},_o={class:"font-semibold text-primary-600"},Co=e.defineComponent({__name:"FlatFixedNonePricingRule",props:{config:{},item:{},areNonBillableItemsVisible:{type:Boolean},i18n:{},isCombinedPricing:{type:Boolean},showConfigHeader:{type:Boolean,default:!0},showDefaultValues:{type:Boolean,default:!0},creditTypesById:{},isCollapsible:{type:Boolean},isExpanded:{type:Boolean}},emits:["expand-toggled"],setup(t){const n=t,{formatMessage:i}=E.useIntl(),o=e.computed(()=>n.i18n??$t),s=e.computed(()=>T.isTopUpPricing(n.config)),u=i({defaultMessage:"unit",id:"lWOCGz",description:"Fallback singular unit label for pricing rule display"}),m=i({defaultMessage:"units",id:"Vl9vDx",description:"Fallback plural unit label for pricing rule display"}),l=e.computed(()=>n.item.product_items&&n.item.product_items[0]),c=e.computed(()=>{var y,p,b,h,N,f,C,k;if(((y=l.value)==null?void 0:y.model_type)==="CREDITS"){const S=(p=l.value.credits)==null?void 0:p.credit_type_id,w=S?(h=(b=n.creditTypesById)==null?void 0:b[S])==null?void 0:h.unit_name:void 0;return{singular:(w==null?void 0:w.singular)||u,plural:(w==null?void 0:w.plural)||m}}return{singular:((f=(N=l.value)==null?void 0:N.unit_name)==null?void 0:f.singular)||u,plural:((k=(C=l.value)==null?void 0:C.unit_name)==null?void 0:k.plural)||m}}),d=e.computed(()=>{var y,p,b,h;return{singular:((p=(y=l.value)==null?void 0:y.unit_name)==null?void 0:p.singular)||u,plural:((h=(b=l.value)==null?void 0:b.unit_name)==null?void 0:h.plural)||m}}),a=e.computed(()=>{var y,p,b,h;return(h=(b=(p=(y=n.config.split_pricing)==null?void 0:y.meter_properties)==null?void 0:p.map(N=>{var f;return(f=N.meter_property)==null?void 0:f.name}))==null?void 0:b.filter(N=>!!N))==null?void 0:h.join(",")}),_=e.computed(()=>n.showConfigHeader||n.config.split_pricing),g=e.computed(()=>!!n.config.use_fallback_currency&&!!n.config.fallback_currency),r=e.computed(()=>`Based on fallback currency – ${n.config.fallback_currency}`),v=e.computed(()=>{var y,p,b;return(b=(p=(y=n.config.details)==null?void 0:y.bands)==null?void 0:p[0])==null?void 0:b.credits}),x=e.computed(()=>{var y,p,b,h,N,f;const C=(y=v.value)==null?void 0:y.credit_type_id,k=(p=v.value)==null?void 0:p.quantity;if(!k)return"";const S=C?(b=n.creditTypesById)==null?void 0:b[C]:void 0;if(!S)return k;const w=Number(k)===1?((h=S.unit_name)==null?void 0:h.singular)??S.name:((N=S.unit_name)==null?void 0:N.plural)??((f=S.unit_name)==null?void 0:f.singular)??S.name;return w?`${k} ${w}`:k}),B=e.computed(()=>{var y;return((y=n.config.details)==null?void 0:y.pricing_type)==="NONE"}),V=e.computed(()=>{var y,p,b;return((y=l.value)==null?void 0:y.model_type)==="ONE_OFF"&&((p=n.config.details)==null?void 0:p.pricing_type)==="FLAT"?T.resolveDefaultUnitsNumber((b=n.config.default_units)==null?void 0:b.number):null});return(y,p)=>(e.openBlock(),e.createBlock(ke,{class:e.normalizeClass({"print:hidden":B.value}),"is-collapsible":t.isCollapsible,"is-expanded":t.isExpanded,"header-class":"flex items-start justify-between",onToggle:p[0]||(p[0]=b=>y.$emit("expand-toggled"))},{header:e.withCtx(()=>{var b,h,N,f,C,k,S,w,P,D,$,O,H,F,Z,A,q,Se,we,Pe,$e,Ie,Te,De,ze,Oe,Le,Re,Ae,Fe,Me,Ze,Ue,He,Ge,je,qe,We,Ye,Ke,Je,Xe,Qe,et,tt,nt,it;return[_.value?(e.openBlock(),e.createElementBlock("div",Fi,[e.createElementVNode("div",Mi,[t.showConfigHeader?(e.openBlock(),e.createBlock(Ce,{key:0,config:t.config,i18n:o.value},{"override-tooltip":e.withCtx(()=>[e.renderSlot(y.$slots,"override-tooltip")]),_:3},8,["config","i18n"])):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createBlock(I._sfc_main,{key:1,variant:"outline",placement:"top"},{tooltip:e.withCtx(()=>[e.createVNode(I.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(I._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(R._sfc_main$1,{icon:"change_circle",class:"text-gray-500"})]),_:1})):e.createCommentVNode("",!0)]),t.config.split_pricing?(e.openBlock(),e.createElementBlock("div",Zi,[e.createVNode(E._sfc_main,{variant:"label",tag:"span"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.value.splitBy),1)]),_:1}),e.createVNode(E._sfc_main,{tag:"span",variant:"body-sm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value),1)]),_:1})])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),((b=t.config.details)==null?void 0:b.pricing_type)==="NONE"||((h=t.config.details)==null?void 0:h.pricing_type)==="PASS_THROUGH"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[((N=t.config.details)==null?void 0:N.pricing_type)==="NONE"?(e.openBlock(),e.createElementBlock("div",Ui,e.toDisplayString(o.value.notBilled),1)):e.createCommentVNode("",!0),((f=t.config.details)==null?void 0:f.pricing_type)==="PASS_THROUGH"?(e.openBlock(),e.createElementBlock("div",Hi,e.toDisplayString(o.value.passThrough),1)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[l.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[l.value.model_type==="USAGE_BASED"||l.value.model_type==="CREDITS"?(e.openBlock(),e.createElementBlock("div",Gi,[e.createElementVNode("div",null,[e.createElementVNode("div",ji,[(C=t.config.details)!=null&&C.bands&&((k=t.config.details)!=null&&k.bands[0].amount)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("span",qi,[e.createVNode(L._sfc_main,{value:(S=t.config.details)==null?void 0:S.bands[0].amount,highlighted:""},null,8,["value"])]),e.createElementVNode("span",Wi,e.toDisplayString(o.value.perNumberOfUnits((P=(w=t.config.details)==null?void 0:w.bands[0])!=null&&P.block_size&&e.unref(G.isBandNumber)((D=t.config.details)==null?void 0:D.bands[0].block_size)?($=t.config.details)==null?void 0:$.bands[0].block_size.number:"1",c.value)),1),(O=t.config.details)!=null&&O.pricing_period?(e.openBlock(),e.createElementBlock("span",Yi,e.toDisplayString(o.value.formatBillingPeriod((H=t.config.details)==null?void 0:H.pricing_period)),1)):e.createCommentVNode("",!0)],64)):(F=t.config.details)!=null&&F.bands&&((Z=t.config.details)!=null&&Z.bands[0].fixed_amount)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("span",Ki,[e.createVNode(L._sfc_main,{value:(A=t.config.details)==null?void 0:A.bands[0].fixed_amount,highlighted:""},null,8,["value"])]),(q=t.config.details)!=null&&q.pricing_period?(e.openBlock(),e.createElementBlock("span",Ji,e.toDisplayString(o.value.formatBillingPeriod((Se=t.config.details)==null?void 0:Se.pricing_period)),1)):e.createCommentVNode("",!0)],64)):(we=t.config.details)!=null&&we.bands&&(($e=(Pe=t.config.details)==null?void 0:Pe.bands[0].credits)!=null&&$e.quantity)&&((Te=(Ie=t.config.details)==null?void 0:Ie.bands[0].credits)!=null&&Te.credit_type_id)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createElementVNode("span",Xi,e.toDisplayString(x.value),1),e.createElementVNode("span",Qi,e.toDisplayString(o.value.perNumberOfUnits((ze=(De=t.config.details)==null?void 0:De.bands[0])!=null&&ze.block_size&&e.unref(G.isBandNumber)((Oe=t.config.details)==null?void 0:Oe.bands[0].block_size)?(Le=t.config.details)==null?void 0:Le.bands[0].block_size.number:"1",d.value)),1),(Re=t.config.details)!=null&&Re.pricing_period?(e.openBlock(),e.createElementBlock("span",eo,e.toDisplayString(o.value.formatBillingPeriod((Ae=t.config.details)==null?void 0:Ae.pricing_period)),1)):e.createCommentVNode("",!0)],64)):(Fe=t.config.details)!=null&&Fe.bands&&typeof((Me=t.config.details)==null?void 0:Me.bands[0].percentage)=="string"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createElementVNode("span",to,e.toDisplayString((Ze=t.config.details)==null?void 0:Ze.bands[0].percentage)+"% ",1),e.createElementVNode("span",no,e.toDisplayString(o.value.ofAmount((Ue=l.value.unit_name)==null?void 0:Ue.singular)),1),(He=t.config.details)!=null&&He.pricing_period?(e.openBlock(),e.createElementBlock("span",io,e.toDisplayString(o.value.formatBillingPeriod((Ge=t.config.details)==null?void 0:Ge.pricing_period)),1)):e.createCommentVNode("",!0),(je=t.config.details)!=null&&je.bands[0].minimum_amount||(qe=t.config.details)!=null&&qe.bands[0].maximum_amount?(e.openBlock(),e.createElementBlock("span",oo," , "+e.toDisplayString(o.value.with),1)):e.createCommentVNode("",!0),(We=t.config.details)!=null&&We.bands[0].minimum_amount?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(o.value.aMinimumOf)+" ",1),e.createVNode(L._sfc_main,{value:(Ye=t.config.details)==null?void 0:Ye.bands[0].minimum_amount,highlighted:"",class:"mx-1"},null,8,["value"])],64)):e.createCommentVNode("",!0),(Ke=t.config.details)!=null&&Ke.bands[0].minimum_amount&&((Je=t.config.details)!=null&&Je.bands[0].maximum_amount)?(e.openBlock(),e.createElementBlock("span",lo,e.toDisplayString(o.value.and),1)):e.createCommentVNode("",!0),(Xe=t.config.details)!=null&&Xe.bands[0].maximum_amount?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createTextVNode(e.toDisplayString(o.value.aMaximumOf)+" ",1),e.createVNode(L._sfc_main,{value:(Qe=t.config.details)==null?void 0:Qe.bands[0].maximum_amount,highlighted:"",class:"ml-1"},null,8,["value"])],64)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",null,[e.renderSlot(y.$slots,"included")])])):e.createCommentVNode("",!0),t.isCombinedPricing?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[l.value.model_type==="RECURRING"?(e.openBlock(),e.createElementBlock("div",ao,[e.createElementVNode("div",null,[e.createVNode(E._sfc_main,{tag:"div",variant:"body-sm",class:"flex items-center"},{default:e.withCtx(()=>{var W,Y,K,J,X,Q,ie,ot,lt;return[(W=t.config.details)!=null&&W.bands&&((Y=t.config.details)!=null&&Y.bands[0].amount)?(e.openBlock(),e.createBlock(L._sfc_main,{key:0,value:(K=t.config.details)==null?void 0:K.bands[0].amount,highlighted:""},null,8,["value"])):(J=t.config.details)!=null&&J.bands&&((X=t.config.details)!=null&&X.bands[0].fixed_amount)?(e.openBlock(),e.createBlock(L._sfc_main,{key:1,value:(Q=t.config.details)==null?void 0:Q.bands[0].fixed_amount,highlighted:""},null,8,["value"])):e.createCommentVNode("",!0),(ot=(ie=t.config.details)==null?void 0:ie.pricing_period)!=null&&ot.type?(e.openBlock(),e.createElementBlock("div",ro,e.toDisplayString(o.value.formatBillingPeriod((lt=t.config.details)==null?void 0:lt.pricing_period)),1)):(e.openBlock(),e.createElementBlock("div",co,"per billing period")),t.config.billing_in_advance?(e.openBlock(),e.createElementBlock("span",so," ("+e.toDisplayString(o.value.billedInAdvance)+") ",1)):e.createCommentVNode("",!0)]}),_:1}),(tt=(et=t.config.details)==null?void 0:et.billing_period)!=null&&tt.type?(e.openBlock(),e.createBlock(E._sfc_main,{key:0,tag:"div",variant:"body-sm",class:"text-right"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.value.billedEvery)+" ",1),e.createElementVNode("span",uo,e.toDisplayString(o.value.formatBillingPeriod(t.config.details.billing_period,{prefix:!1})),1)]),_:1})):e.createCommentVNode("",!0)]),e.renderSlot(y.$slots,"included")])):e.createCommentVNode("",!0),l.value.model_type==="ONE_OFF"?(e.openBlock(),e.createElementBlock("div",mo,[e.createElementVNode("div",null,[e.createVNode(E._sfc_main,{tag:"div",variant:"body-sm",class:"flex items-center"},{default:e.withCtx(()=>{var W,Y,K,J,X,Q,ie;return[(W=t.config.details)!=null&&W.bands&&((Y=t.config.details)!=null&&Y.bands[0].amount)?(e.openBlock(),e.createBlock(L._sfc_main,{key:0,value:(K=t.config.details)==null?void 0:K.bands[0].amount,highlighted:""},null,8,["value"])):(J=t.config.details)!=null&&J.bands&&((X=t.config.details)!=null&&X.bands[0].fixed_amount)?(e.openBlock(),e.createBlock(L._sfc_main,{key:1,value:(Q=t.config.details)==null?void 0:Q.bands[0].fixed_amount,highlighted:""},null,8,["value"])):e.createCommentVNode("",!0),e.createElementVNode("div",po,[e.createTextVNode(e.toDisplayString(o.value.oneOff)+" ",1),((ie=t.config.details)==null?void 0:ie.pricing_type)==="FLAT"?(e.openBlock(),e.createElementBlock("span",go,e.toDisplayString(o.value.perUnit),1)):e.createCommentVNode("",!0),t.config.billing_in_advance?(e.openBlock(),e.createElementBlock("span",fo," ("+e.toDisplayString(o.value.billedInAdvance)+") ",1)):e.createCommentVNode("",!0)])]}),_:1}),t.showDefaultValues&&V.value!==null?(e.openBlock(),e.createBlock(E._sfc_main,{key:0,tag:"div",variant:"body-sm",color:"subtle",class:"text-right"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.value.withDefault)+" ",1),e.createElementVNode("span",vo,e.toDisplayString(V.value),1),e.createTextVNode(" "+e.toDisplayString(V.value===1?c.value.singular:c.value.plural),1)]),_:1})):e.createCommentVNode("",!0)]),e.renderSlot(y.$slots,"included")])):e.createCommentVNode("",!0),l.value.model_type==="PER_SEAT"?(e.openBlock(),e.createElementBlock("div",ho,[e.createElementVNode("div",null,[e.createVNode(E._sfc_main,{tag:"div",variant:"body-sm",class:"flex items-center"},{default:e.withCtx(()=>{var W,Y,K,J,X,Q;return[(W=t.config.details)!=null&&W.bands&&((Y=t.config.details)!=null&&Y.bands[0].amount)?(e.openBlock(),e.createBlock(L._sfc_main,{key:0,value:(K=t.config.details)==null?void 0:K.bands[0].amount,highlighted:""},null,8,["value"])):e.createCommentVNode("",!0),e.createElementVNode("span",yo,e.toDisplayString(o.value.perSeat),1),(X=(J=t.config.details)==null?void 0:J.pricing_period)!=null&&X.type?(e.openBlock(),e.createElementBlock("div",bo,e.toDisplayString(o.value.formatBillingPeriod((Q=t.config.details)==null?void 0:Q.pricing_period)),1)):e.createCommentVNode("",!0),t.config.billing_in_advance?(e.openBlock(),e.createElementBlock("span",ko," ("+e.toDisplayString(o.value.billedInAdvance)+") ",1)):e.createCommentVNode("",!0)]}),_:1}),(it=(nt=t.config.details)==null?void 0:nt.billing_period)!=null&&it.type?(e.openBlock(),e.createBlock(E._sfc_main,{key:0,tag:"div",variant:"body-sm",class:"text-right"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.value.billedEvery)+" ",1),e.createElementVNode("span",_o,e.toDisplayString(o.value.formatBillingPeriod(t.config.details.billing_period,{prefix:!1})),1)]),_:1})):e.createCommentVNode("",!0)]),e.renderSlot(y.$slots,"included")])):e.createCommentVNode("",!0)],64))],64)):e.createCommentVNode("",!0)],64))]}),default:e.withCtx(()=>[s.value?(e.openBlock(),e.createBlock(Et,{key:0,i18n:o.value.topUpDescription,class:"mt-1","pricing-item-config":t.config},null,8,["i18n","pricing-item-config"])):e.createCommentVNode("",!0)]),_:3},8,["class","is-collapsible","is-expanded"]))}}),xo={key:0,class:"flex items-center gap-2"},Bo={key:1,class:"ml-4 flex shrink-0 flex-wrap items-center justify-end gap-1"},No=e.defineComponent({__name:"FlexiblePricingRule",props:{config:{},showConfigHeader:{type:Boolean,default:!0},isCollapsible:{type:Boolean},isExpanded:{type:Boolean}},emits:["expand-toggled"],setup(t){const n=t,{formatMessage:i}=E.useIntl(),o=e.computed(()=>{var l,c;return(c=(l=n.config.details)==null?void 0:l.bands)==null?void 0:c[0]}),s=i({defaultMessage:"Flexible pricing",id:"wYqODC",description:"Read-only label for a flexible (choose-your-amount) pricing rule"}),u=i({defaultMessage:"minimum amount",id:"Bbc4Nn",description:"Suffix after the minimum amount of a flexible pricing rule"}),m=i({defaultMessage:"maximum amount",id:"V6mQFd",description:"Suffix after the maximum amount of a flexible pricing rule"});return(l,c)=>(e.openBlock(),e.createBlock(ke,{"is-collapsible":t.isCollapsible,"is-expanded":t.isExpanded,"header-class":"flex items-start justify-between",onToggle:c[0]||(c[0]=d=>l.$emit("expand-toggled"))},{header:e.withCtx(()=>{var d,a,_,g,r;return[t.showConfigHeader?(e.openBlock(),e.createElementBlock("div",xo,[e.createVNode(E._sfc_main,{"no-spacing":"",color:"secondary",variant:"body",weight:"semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)),1)]),_:1}),e.renderSlot(l.$slots,"override-tooltip")])):e.createCommentVNode("",!0),(d=o.value)!=null&&d.minimum_amount||(a=o.value)!=null&&a.maximum_amount?(e.openBlock(),e.createElementBlock("div",Bo,[(_=o.value)!=null&&_.minimum_amount?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(L._sfc_main,{value:o.value.minimum_amount,highlighted:""},null,8,["value"]),e.createElementVNode("span",null,[e.createTextVNode(e.toDisplayString(e.unref(u)),1),(g=o.value)!=null&&g.maximum_amount?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(",")],64)):e.createCommentVNode("",!0)])],64)):e.createCommentVNode("",!0),(r=o.value)!=null&&r.maximum_amount?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(L._sfc_main,{value:o.value.maximum_amount,highlighted:""},null,8,["value"]),e.createElementVNode("span",null,e.toDisplayString(e.unref(m)),1)],64)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]}),_:3},8,["is-collapsible","is-expanded"]))}}),Vo={key:0,"data-testid":"tiering-conditions",class:"flex flex-col gap-1"},Eo={class:"text-xs"},So=e.defineComponent({__name:"TieringConditions",props:{expression:{},i18n:{}},setup(t){return(n,i)=>t.expression?(e.openBlock(),e.createElementBlock("div",Vo,[e.createVNode(E._sfc_main,{variant:"body-xs",weight:"semibold",color:"secondary","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.i18n.tieringConditions),1)]),_:1}),e.createElementVNode("div",Eo,[e.createVNode(ce._sfc_main,{"expression-comparators":t.expression,"root-class":"bg-teal-400/25"},null,8,["expression-comparators"])])])):e.createCommentVNode("",!0)}}),wo={key:0,class:"flex gap-2"},Po={key:1,class:"flex justify-center gap-2"},$o={class:"tiered-table-print-wrapper mt-3 overflow-clip rounded border"},Io={class:"tiered-table-print w-full table-auto"},To=["colspan"],Do={class:"border-t"},zo={class:"px-2 py-1 text-left"},Oo={class:"px-2 py-1 text-left"},Lo={key:0,class:"px-2 py-1 text-right"},Ro={key:1,class:"px-2 py-1 text-right"},Ao={key:2,class:"px-2 py-1 text-right"},Fo={class:"px-2 py-1 text-left"},Mo={class:"px-2 py-1 text-left"},Zo={key:4,class:"pr-2 text-right"},Uo={class:"px-2 py-1"},Ho={class:"px-2 py-1"},Go={key:0,class:"px-2 py-1 text-right"},jo={class:"font-semibold text-primary-600"},qo={key:1,class:"px-2 py-1 text-right"},Wo={class:"font-semibold text-primary-600"},Yo={key:2,class:"px-2 py-1 text-right"},Ko={class:"px-2 py-1"},Jo={class:"px-2 py-1"},Xo={key:4,class:"px-2 py-1 text-right"},Qo={key:2,class:"mt-2 flex items-center"},el={key:0},tl={class:"font-semibold text-primary-600"},nl=e.defineComponent({__name:"TieredSteppedPricingRule",props:{config:{},itemIndex:{},configIndex:{},item:{},i18n:{},isCombinedPricing:{type:Boolean},showConfigHeader:{type:Boolean,default:!0},creditTypesById:{},isCollapsible:{type:Boolean},isExpanded:{type:Boolean}},emits:["expand-toggled"],setup(t){const n=t,i=e.computed(()=>n.i18n??Pt),o=e.computed(()=>({tieringConditions:i.value.tieringConditions})),s=e.computed(()=>{var y,p,b,h,N,f,C;return((h=(b=(p=(y=n.config.details)==null?void 0:y.bands)==null?void 0:p.find(k=>{var S;return(S=k.credits)==null?void 0:S.credit_type_id}))==null?void 0:b.credits)==null?void 0:h.credit_type_id)??((C=(f=(N=n.item.product_items)==null?void 0:N[0])==null?void 0:f.credits)==null?void 0:C.credit_type_id)}),u=e.computed(()=>{var y,p,b,h,N;if(s.value){const f=(y=n.creditTypesById)==null?void 0:y[s.value];if(f)return((p=f.unit_name)==null?void 0:p.singular)||"unit"}return((N=(h=(b=n.item.product_items)==null?void 0:b[0])==null?void 0:h.unit_name)==null?void 0:N.singular)||"unit"}),m=e.computed(()=>{var y,p;const b=(y=n.config.details)==null?void 0:y.pricing_type;if(b&&["TIERED","TOP_TIERED"].includes(b)&&((p=n.config.details)!=null&&p.bands)){for(const h of n.config.details.bands)if(h.minimum_amount||h.maximum_amount)return!0}return!1}),l=e.computed(()=>{var y;return T.isTieredPricing(n.config)?"TIERED":T.isStairStepPricing(n.config)?"STAIR_STEP":(y=n.config.details)==null?void 0:y.pricing_type}),c=e.computed(()=>T.isTopUpPricing(n.config)),d=e.computed(()=>{var y,p;return(p=(y=n.config.details)==null?void 0:y.bands)==null?void 0:p.some(b=>b.block_size)}),a=e.computed(()=>{var y;return(y=n.config.details.bands)==null?void 0:y.some(p=>p.fixed_amount)}),_=e.computed(()=>{var y;return(y=n.config.details.bands)==null?void 0:y.some(p=>p.amount)}),g=e.computed(()=>{var y;return(y=n.config.details.bands)==null?void 0:y.some(p=>p.percentage)}),r=e.computed(()=>{var y,p,b,h;return(h=(b=(p=(y=n.config.split_pricing)==null?void 0:y.meter_properties)==null?void 0:p.map(N=>{var f;return(f=N.meter_property)==null?void 0:f.name}))==null?void 0:b.filter(N=>!!N))==null?void 0:h.join(", ")}),v=e.computed(()=>n.showConfigHeader||n.config.split_pricing),x=e.computed(()=>!!n.config.use_fallback_currency&&!!n.config.fallback_currency),B=e.computed(()=>`Based on fallback currency – ${n.config.fallback_currency}`),V=e.computed(()=>2+(a.value?1:0)+(_.value?1:0)+(g.value?1:0)+(m.value?2:0)+(d.value?1:0));return(y,p)=>(e.openBlock(),e.createBlock(ke,{"is-collapsible":t.isCollapsible,"is-expanded":t.isExpanded,"header-class":"tiered-rule-header flex items-start justify-between","unmount-on-close":"",onToggle:p[0]||(p[0]=b=>y.$emit("expand-toggled"))},{header:e.withCtx(()=>[v.value?(e.openBlock(),e.createElementBlock("div",wo,[e.createVNode(Ce,{config:t.config,i18n:i.value},{"override-tooltip":e.withCtx(()=>[e.renderSlot(y.$slots,"override-tooltip",{},void 0,!0)]),_:3},8,["config","i18n"]),x.value?(e.openBlock(),e.createBlock(I._sfc_main,{key:0,variant:"outline",placement:"top"},{tooltip:e.withCtx(()=>[e.createVNode(I.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(I._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.value),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(R._sfc_main$1,{icon:"change_circle",class:"text-gray-500"})]),_:1})):e.createCommentVNode("",!0),t.config.split_pricing?(e.openBlock(),e.createElementBlock("div",Po,[e.createVNode(E._sfc_main,{variant:"label",tag:"span"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.splitBy),1)]),_:1}),e.createVNode(E._sfc_main,{tag:"span",variant:"body-sm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>{var b,h,N,f;return[c.value?(e.openBlock(),e.createBlock(e.unref(Et),{key:0,class:"mb-3 mt-1",i18n:i.value.topUpDescription,"pricing-item-config":t.config},null,8,["i18n","pricing-item-config"])):e.createCommentVNode("",!0),e.createElementVNode("div",$o,[e.createElementVNode("table",Io,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",{colspan:V.value,class:"bg-gray-50 px-2 text-left"},[e.createVNode(E._sfc_main,{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(ee.formatEnum)(l.value)),1)]),_:1})],8,To)]),e.createElementVNode("tr",Do,[e.createElementVNode("th",zo,[e.createVNode(E._sfc_main,{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.from),1)]),_:1})]),e.createElementVNode("th",Oo,[e.createVNode(E._sfc_main,{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.upTo),1)]),_:1})]),a.value?(e.openBlock(),e.createElementBlock("th",Lo,[e.createVNode(E._sfc_main,{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.fixedAmount),1)]),_:1})])):e.createCommentVNode("",!0),_.value?(e.openBlock(),e.createElementBlock("th",Ro,[l.value==="STAIR_STEP"?(e.openBlock(),e.createBlock(E._sfc_main,{key:0,variant:"caps-heading"},{default:e.withCtx(()=>{var C,k,S;return[e.createTextVNode(e.toDisplayString(i.value.pricePerStep((S=(k=(C=t.item.product_items)==null?void 0:C[0])==null?void 0:k.unit_name)==null?void 0:S.plural)),1)]}),_:1})):d.value?(e.openBlock(),e.createBlock(E._sfc_main,{key:1,variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.price),1)]),_:1})):t.config.details.bands&&t.config.details.bands[0].amount||t.config.details.bands&&t.config.details.bands[0].fixed_amount?(e.openBlock(),e.createBlock(E._sfc_main,{key:2,variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.pricePerUnit(u.value)),1)]),_:1})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("th",Ao,[e.createVNode(E._sfc_main,{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.percentage),1)]),_:1})])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createElementVNode("th",Fo,[e.createVNode(E._sfc_main,{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.feeFloor),1)]),_:1})]),e.createElementVNode("th",Mo,[e.createVNode(E._sfc_main,{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.feeCap),1)]),_:1})])],64)):e.createCommentVNode("",!0),d.value?(e.openBlock(),e.createElementBlock("th",Zo,[e.createVNode(E._sfc_main,{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.per),1)]),_:1})])):e.createCommentVNode("",!0)])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.config.details.bands,(C,k)=>{var S,w,P,D,$,O;return e.openBlock(),e.createElementBlock("tr",{key:k,class:"border-t"},[e.createElementVNode("td",Uo,[(S=t.config.details)!=null&&S.bands?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(e.unref(en)(i.value)((w=t.config.details)==null?void 0:w.bands[k-1])),1)],64)):e.createCommentVNode("",!0)]),e.createElementVNode("td",Ho,[(P=t.config.details)!=null&&P.bands?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(e.unref(tn)(i.value)(C,(D=t.config.details)==null?void 0:D.bands,k)),1)],64)):e.createCommentVNode("",!0)]),a.value?(e.openBlock(),e.createElementBlock("td",Go,[C.fixed_amount?(e.openBlock(),e.createBlock(L._sfc_main,{key:0,value:C.fixed_amount,highlighted:""},null,8,["value"])):e.createCommentVNode("",!0),C.fixed_amount&&(($=t.config.details)!=null&&$.pricing_period)?(e.openBlock(),e.createBlock(E._sfc_main,{key:1,tag:"span",class:"pl-1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.every)+" ",1),e.createElementVNode("span",jo,e.toDisplayString(i.value.formatBillingPeriod(t.config.details.pricing_period,{prefix:!1})),1)]),_:1})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),_.value?(e.openBlock(),e.createElementBlock("td",qo,[C.amount?(e.openBlock(),e.createBlock(L._sfc_main,{key:0,value:C.amount,highlighted:""},null,8,["value"])):e.createCommentVNode("",!0),C.amount&&((O=t.config.details)!=null&&O.pricing_period)?(e.openBlock(),e.createBlock(E._sfc_main,{key:1,tag:"span",class:"pl-1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.every)+" ",1),e.createElementVNode("span",Wo,e.toDisplayString(i.value.formatBillingPeriod(t.config.details.pricing_period,{prefix:!1})),1)]),_:1})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("td",Yo,[C.percentage?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(C.percentage)+"% ",1)],64)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createElementVNode("td",Ko,[C.minimum_amount?(e.openBlock(),e.createBlock(L._sfc_main,{key:0,value:C.minimum_amount},null,8,["value"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(" ")],64))]),e.createElementVNode("td",Jo,[C.maximum_amount?(e.openBlock(),e.createBlock(L._sfc_main,{key:0,value:C.maximum_amount},null,8,["value"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(" ")],64))])],64)):e.createCommentVNode("",!0),d.value?(e.openBlock(),e.createElementBlock("td",Xo,[e.unref(G.isBandAmount)(C.block_size)?(e.openBlock(),e.createBlock(L._sfc_main,{key:0,value:C.block_size.amount},null,8,["value"])):e.unref(G.isBandNumber)(C.block_size)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(i.value.formatNumber(+C.block_size.number)),1)],64)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])}),128))])])]),t.config.tiering_conditions?(e.openBlock(),e.createBlock(So,{key:1,class:"mt-2",i18n:o.value,expression:t.config.tiering_conditions.expression},null,8,["i18n","expression"])):e.createCommentVNode("",!0),y.$slots.included||(h=(b=t.config.details)==null?void 0:b.billing_period)!=null&&h.type?(e.openBlock(),e.createElementBlock("div",Qo,[y.$slots.included?(e.openBlock(),e.createElementBlock("div",el,[e.renderSlot(y.$slots,"included",{},void 0,!0)])):e.createCommentVNode("",!0),(f=(N=t.config.details)==null?void 0:N.billing_period)!=null&&f.type?(e.openBlock(),e.createBlock(E._sfc_main,{key:1,tag:"div",variant:"body-sm",color:"secondary",class:"ml-auto"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.billedEvery)+" ",1),e.createElementVNode("span",tl,e.toDisplayString(i.value.formatBillingPeriod(t.config.details.billing_period,{prefix:!1})),1)]),_:1})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]}),_:3},8,["is-collapsible","is-expanded"]))}}),il=j._export_sfc(nl,[["__scopeId","data-v-04f973b1"]]),ol={key:0,class:"conditions-root"},ll=["innerHTML"],al=["innerHTML"],rl=["innerHTML"],cl=["innerHTML"],sl=["innerHTML"],dl=["innerHTML"],ul={key:3,class:"mt-3"},ml={key:0,class:"context-menu-wrapper absolute -top-2 right-2"},pl=e.defineComponent({__name:"PricingItemConfig",props:{areNonBillableItemsVisible:{type:Boolean},rootConfig:{},config:{},configIndex:{},item:{},itemIndex:{},pricing:{},i18n:{},rootClass:{},showConfigHeader:{type:Boolean,default:!0},showDefaultValues:{type:Boolean,default:!0},schedule:{},creditTypesById:{},canCollapseNestedConditions:{type:Boolean,default:!1},mountInViewOnly:{type:Boolean}},setup(t){const n=t,i=Yt(),o=e.computed(()=>n.mountInViewOnly??i),s=e.ref(null),{shouldRender:u,placeholderStyle:m}=Gt(s,{estimatedHeight:T.estimatePricingItemConfigBodyHeight(n.config),disabled:e.computed(()=>!o.value)}),l=qt({defaultCollapsed:n.canCollapseNestedConditions}),c=e.computed(()=>l.isExpanded(n.config.id)),d=e.computed(()=>{var k;return(k=n.config.conditions)==null?void 0:k.configs}),a=e.computed(()=>!!n.canCollapseNestedConditions&&!M.isEmpty(d.value)),_=()=>{c.value?l.collapse(n.config.id):l.expand(T.getConfigIds(n.config))},g=()=>{if(!a.value){l.expand(n.config.id);return}_()},r=e.computed(()=>n.i18n??It),v=e.useSlots(),x=k=>{var S,w,P;return T.isFlatPricing(k)||((S=k.details)==null?void 0:S.pricing_type)==="FIXED"||((w=k.details)==null?void 0:w.pricing_type)==="PASS_THROUGH"||((P=k.details)==null?void 0:P.pricing_type)==="NONE"&&n.areNonBillableItemsVisible},B=k=>T.hasOneOfPricingTypes(k,["TIERED","TIERED_TOP_UP","TOP_TIERED"])||T.isStairStepPricing(k),V=k=>T.isFlexiblePricing(k),y=k=>{var S,w,P,D,$;return(($=(D=(P=(w=(S=k.product_items)==null?void 0:S[0])==null?void 0:w.usage_based)==null?void 0:P.meter_value_calculation)==null?void 0:D.meter_value)==null?void 0:$.type)==="AMOUNT"},p=k=>{var S,w,P,D,$;return(($=(D=(P=(w=(S=k.product_items)==null?void 0:S[0])==null?void 0:w.usage_based)==null?void 0:P.meter_value_calculation)==null?void 0:D.meter_value)==null?void 0:$.type)==="NUMBER"},b=(k,S)=>{var w,P,D;return((P=(w=k.product_items)==null?void 0:w[0])==null?void 0:P.model_type)==="PER_SEAT"&&((D=S.details)==null?void 0:D.pricing_type)!=="NONE"},h=e.computed(()=>n.rootConfig??n.config),N=e.computed(()=>({pricing:n.pricing,item:n.item,config:n.config})),f=e.computed(()=>!!v["pricing-item-config-settings"]&&!fe.isVnodeEmpty(v["pricing-item-config-settings"](N.value))),C=e.computed(()=>{var k,S,w;const P=n.config.original_pricing_item_config_id;return n.schedule?((k=Ct({schedule:n.schedule,pricingItemConfigIds:[n.config.id,...P?[P]:[]]}))==null?void 0:k.number)??((S=n.config.default_seats_value)==null?void 0:S.number):(w=n.config.default_seats_value)==null?void 0:w.number});return(k,S)=>{var w,P,D,$,O;const H=e.resolveComponent("PricingItemConfig",!0);return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative",{[`${t.rootClass}`]:t.rootClass,"mb-4 last:mb-0":x(t.config)&&(((w=t.config.conditions)==null?void 0:w.meter_properties)||t.configIndex===0&&t.item.configs&&t.item.configs.length>0),"mb-6 last:mb-0":B(t.config)}])},[e.createElementVNode("div",{ref_key:"bodyEl",ref:s,style:e.normalizeStyle(e.unref(m))},[e.unref(u)?(e.openBlock(),e.createElementBlock("div",ol,[e.createElementVNode("div",{class:e.normalizeClass({"conditions-with-context-menu":f.value})},[(P=t.config.details)!=null&&P.bands||(D=t.config.details)!=null&&D.pricing_type?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[x(t.config)?(e.openBlock(),e.createBlock(e.unref(Co),{key:0,"is-combined-pricing":t.pricing.products&&t.pricing.products.length>1,"are-non-billable-items-visible":t.areNonBillableItemsVisible,config:t.config,item:t.item,class:e.normalizeClass({"mt-3":!t.rootClass}),i18n:r.value,"show-config-header":t.showConfigHeader,"show-default-values":t.showDefaultValues,"credit-types-by-id":t.creditTypesById,"is-collapsible":a.value,"is-expanded":c.value,onExpandToggled:_},{"override-tooltip":e.withCtx(()=>[e.renderSlot(k.$slots,"override-tooltip",e.normalizeProps(e.guardReactiveProps(n)),void 0,!0)]),included:e.withCtx(()=>{var F,Z,A,q;return[y(t.item)&&((F=t.config.default_included_volume)!=null&&F.amount)?(e.openBlock(),e.createElementBlock("span",{key:0,class:"mt-1 text-right text-subtle",innerHTML:t.config.default_included_volume.reset_type==="BILLING_PERIOD"?r.value.includedVolumeAmountPerBillingPeriod(t.config.default_included_volume.amount):r.value.includedVolumeAmountPerSchedule(t.config.default_included_volume.amount)},null,8,ll)):e.createCommentVNode("",!0),p(t.item)&&((Z=t.config.default_included_volume)!=null&&Z.number)?(e.openBlock(),e.createElementBlock("span",{key:1,class:"mt-1 text-right text-subtle",innerHTML:t.config.default_included_volume.reset_type==="BILLING_PERIOD"?r.value.includedVolumeUnitsPerBillingPeriod(t.config.default_included_volume.number,(A=t.item.product_items)==null?void 0:A[0].unit_name):r.value.includedVolumeUnitsPerSchedule(t.config.default_included_volume.number,(q=t.item.product_items)==null?void 0:q[0].unit_name)},null,8,al)):e.createCommentVNode("",!0),t.showDefaultValues&&b(t.item,t.config)&&C.value?(e.openBlock(),e.createElementBlock("span",{key:2,class:"mt-1 text-right text-subtle",innerHTML:r.value.includedSeats(C.value)},null,8,rl)):e.createCommentVNode("",!0)]}),_:3},8,["is-combined-pricing","are-non-billable-items-visible","config","item","class","i18n","show-config-header","show-default-values","credit-types-by-id","is-collapsible","is-expanded"])):B(t.config)?(e.openBlock(),e.createBlock(e.unref(il),{key:1,"is-combined-pricing":t.pricing.products&&t.pricing.products.length>1,config:t.config,"item-index":t.itemIndex,"config-index":t.configIndex,item:t.item,"credit-types-by-id":t.creditTypesById,class:"mt-3",i18n:r.value,"show-config-header":t.showConfigHeader,"is-collapsible":a.value,"is-expanded":c.value,onExpandToggled:_},{"override-tooltip":e.withCtx(()=>[e.renderSlot(k.$slots,"override-tooltip",e.normalizeProps(e.guardReactiveProps(n)),void 0,!0)]),included:e.withCtx(()=>{var F,Z,A,q;return[y(t.item)&&((F=t.config.default_included_volume)!=null&&F.amount)?(e.openBlock(),e.createElementBlock("span",{key:0,class:"mt-1 text-right text-subtle",innerHTML:t.config.default_included_volume.reset_type==="BILLING_PERIOD"?r.value.includedVolumeAmountPerBillingPeriod(t.config.default_included_volume.amount):r.value.includedVolumeAmountPerSchedule(t.config.default_included_volume.amount)},null,8,cl)):e.createCommentVNode("",!0),p(t.item)&&((Z=t.config.default_included_volume)!=null&&Z.number)?(e.openBlock(),e.createElementBlock("span",{key:1,class:"mt-1 text-right text-subtle",innerHTML:t.config.default_included_volume.reset_type==="BILLING_PERIOD"?r.value.includedVolumeUnitsPerBillingPeriod(t.config.default_included_volume.number,(A=t.item.product_items)==null?void 0:A[0].unit_name):r.value.includedVolumeUnitsPerSchedule(t.config.default_included_volume.number,(q=t.item.product_items)==null?void 0:q[0].unit_name)},null,8,sl)):e.createCommentVNode("",!0),t.showDefaultValues&&b(t.item,t.config)&&C.value?(e.openBlock(),e.createElementBlock("span",{key:2,class:"mt-1 text-right text-subtle",innerHTML:r.value.includedSeats(C.value)},null,8,dl)):e.createCommentVNode("",!0)]}),_:3},8,["is-combined-pricing","config","item-index","config-index","item","credit-types-by-id","i18n","show-config-header","is-collapsible","is-expanded"])):V(t.config)?(e.openBlock(),e.createBlock(e.unref(No),{key:2,config:t.config,class:"mt-3","show-config-header":t.showConfigHeader,"is-collapsible":a.value,"is-expanded":c.value,onExpandToggled:_},{"override-tooltip":e.withCtx(()=>[e.renderSlot(k.$slots,"override-tooltip",e.normalizeProps(e.guardReactiveProps(n)),void 0,!0)]),_:3},8,["config","show-config-header","is-collapsible","is-expanded"])):e.createCommentVNode("",!0),k.$slots["pricing-item-config-additions"]&&!e.unref(fe.isVnodeEmpty)((O=($=k.$slots)["pricing-item-config-additions"])==null?void 0:O.call($,N.value))?(e.openBlock(),e.createElementBlock("div",ul,[e.renderSlot(k.$slots,"pricing-item-config-additions",e.normalizeProps(e.guardReactiveProps(N.value)),void 0,!0)])):e.createCommentVNode("",!0)],64)):t.showConfigHeader?(e.openBlock(),e.createBlock(Bt,{key:1,"is-collapsible":a.value,"is-expanded":c.value,class:"mb-1 mt-2 print:hidden",onClick:g},{default:e.withCtx(()=>[e.createVNode(Ce,{"is-combined-pricing":t.pricing.products&&t.pricing.products.length>1,config:t.config,i18n:r.value},{"override-tooltip":e.withCtx(()=>[e.renderSlot(k.$slots,"override-tooltip",e.normalizeProps(e.guardReactiveProps(n)),void 0,!0)]),_:3},8,["is-combined-pricing","config","i18n"])]),_:3},8,["is-collapsible","is-expanded"])):e.createCommentVNode("",!0)],2),f.value?(e.openBlock(),e.createElementBlock("div",ml,[e.renderSlot(k.$slots,"pricing-item-config-settings",e.mergeProps(N.value,{rootConfig:h.value}),void 0,!0)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],4),d.value&&!e.unref(M.isEmpty)(d.value)?(e.openBlock(),e.createBlock(ne._sfc_main,{key:0,"is-open":c.value,lazy:"","unmount-on-close":"",class:"nesting-line relative mb-4 w-full pl-4 before:bottom-3 before:left-1.5"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList([...d.value].sort((F,Z)=>Z.order-F.order),(F,Z)=>(e.openBlock(),e.createElementBlock("div",{key:F.id,class:"print:mb-4 print:last:mb-0"},[e.createVNode(H,{pricing:t.pricing,item:t.item,"item-index":t.itemIndex,config:F,"config-index":Z,"are-non-billable-items-visible":t.areNonBillableItemsVisible,i18n:r.value,"root-class":t.rootClass,"root-config":h.value,"credit-types-by-id":t.creditTypesById,"can-collapse-nested-conditions":t.canCollapseNestedConditions,"mount-in-view-only":o.value},{"pricing-item-config-settings":e.withCtx(A=>[e.renderSlot(k.$slots,"pricing-item-config-settings",e.mergeProps({ref_for:!0},A),void 0,!0)]),"override-tooltip":e.withCtx(A=>[e.renderSlot(k.$slots,"pricing-item-config-override-tooltip",e.mergeProps({ref_for:!0},A),void 0,!0)]),"pricing-item-config-additions":e.withCtx(A=>[e.renderSlot(k.$slots,"pricing-item-config-additions",e.mergeProps({ref_for:!0},A),void 0,!0)]),_:3},8,["pricing","item","item-index","config","config-index","are-non-billable-items-visible","i18n","root-class","root-config","credit-types-by-id","can-collapse-nested-conditions","mount-in-view-only"])]))),128))]),_:3},8,["is-open"])):e.createCommentVNode("",!0)],2)}}}),ft=j._export_sfc(pl,[["__scopeId","data-v-eb141324"]]),gl=["onClick"],fl={class:"text-subtle"},vl={class:"px-4 pb-3"},hl=e.defineComponent({__name:"PricingDetail",props:{itemClass:{},rootClass:{},titleWithIcon:{type:Boolean},pricing:{},groupedPricingItemIds:{},areNonBillableItemsVisible:{type:Boolean},i18n:{},schedule:{},creditTypesById:{},canCollapseNestedConditions:{type:Boolean}},setup(t){const n=E.useIntl(),i=t,o=e.ref({}),s=r=>r?`${r.type}:${r.value}`:"none",u=r=>{o.value={...o.value,[r]:!o.value[r]}},m=r=>!o.value[r],l=(r,v)=>{if(!v)return null;const x=new Map;return r.forEach(B=>{var V,y,p;const b=((V=B.details)==null?void 0:V.billing_period)??((y=B.details)==null?void 0:y.pricing_period);if(!b)return;const h=s(b);x.has(h)||x.set(h,{billingPeriod:b,configs:[]}),(p=x.get(h))==null||p.configs.push(B)}),Array.from(x.entries()).map(([B,V])=>({key:B,...V}))},c=r=>[...r].sort((v,x)=>x.order-v.order),d=r=>{var v;return a(r)?(v=r.billing_period_configs)!=null&&v.length?r.billing_period_configs.map(x=>({key:s(x.billing_period),billingPeriod:x.billing_period,configs:x.configs??[]})):l(z.getPricingItemConfigs(r),!0):l(z.getPricingItemConfigs(r),!1)},a=r=>{var v,x;return(((v=r.billing_period_configs)==null?void 0:v.length)??0)>0||(((x=i.groupedPricingItemIds)==null?void 0:x.includes(r.id))??!1)},_=e.computed(()=>{var r;return((r=i.pricing.items)==null?void 0:r.map(v=>({id:v.id,groups:d(v)})))??[]}),g=r=>{const v=z.getPricingItemConfigs(r).some(x=>{var B;return((B=x.details)==null?void 0:B.pricing_type)==="NONE"});return z.isBilledPricingItem(r)||v&&!!i.areNonBillableItemsVisible};return(r,v)=>(e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.pricing.items,(x,B)=>{var V;return e.openBlock(),e.createElementBlock(e.Fragment,{key:B},[g(x)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["pricing-item-block pb-5 last:pb-3",{[`${t.itemClass}`]:t.itemClass,"print:hidden":!e.unref(z.isBilledPricingItem)(x)}])},[e.createVNode(bt._sfc_main,{icon:t.titleWithIcon?"inventory_2":void 0,variant:"neutral",size:"sm",class:"pricing-item-heading"},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"pricing-item-header",{item:x},()=>[e.createVNode(Ai,{item:x,"credit-types-by-id":t.creditTypesById},null,8,["item","credit-types-by-id"])],!0)]),_:2},1032,["icon"]),(V=_.value[B])!=null&&V.groups?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(_.value[B].groups,y=>{var p,b,h;return e.openBlock(),e.createElementBlock("div",{key:y.key,class:"mt-3 rounded border border-gray-100"},[e.createElementVNode("button",{type:"button",class:"flex w-full items-center justify-between px-4 py-2 text-left text-sm font-semibold text-secondary",onClick:N=>u(y.key)},[e.createElementVNode("span",null,[e.createTextVNode(e.toDisplayString((p=t.i18n)!=null&&p.formatBillingPeriod?e.unref(n).$t({defaultMessage:"Billing period",id:"pricing_detail.billing_period",description:"The billing period in the pricing detail card"}):"Billing period")+" ",1),e.createElementVNode("span",fl,e.toDisplayString((h=(b=t.i18n)==null?void 0:b.formatBillingPeriod)==null?void 0:h.call(b,y.billingPeriod)),1)]),e.createVNode(R._sfc_main$1,{icon:m(y.key)?"unfold_less":"unfold_more",size:"sm",class:"print:hidden"},null,8,["icon"])],8,gl),e.createVNode(ne._sfc_main,{"is-open":m(y.key),lazy:""},{default:e.withCtx(()=>[e.createElementVNode("div",vl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c(y.configs),(N,f)=>(e.openBlock(),e.createBlock(ft,{key:N.id,pricing:t.pricing,item:x,"item-index":B,config:N,"config-index":f,"are-non-billable-items-visible":t.areNonBillableItemsVisible,i18n:t.i18n,"root-class":t.rootClass,schedule:t.schedule,"credit-types-by-id":t.creditTypesById,"can-collapse-nested-conditions":t.canCollapseNestedConditions},{"pricing-item-config-settings":e.withCtx(C=>[e.renderSlot(r.$slots,"pricing-item-config-settings",e.mergeProps({ref_for:!0},C),void 0,!0)]),"override-tooltip":e.withCtx(C=>[e.renderSlot(r.$slots,"pricing-item-config-override-tooltip",e.mergeProps({ref_for:!0},C),void 0,!0)]),"pricing-item-config-additions":e.withCtx(C=>[e.renderSlot(r.$slots,"pricing-item-config-additions",e.mergeProps({ref_for:!0},C),void 0,!0)]),_:3},8,["pricing","item","item-index","config","config-index","are-non-billable-items-visible","i18n","root-class","schedule","credit-types-by-id","can-collapse-nested-conditions"]))),128))])]),_:2},1032,["is-open"])])}),128)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(c(e.unref(z.getPricingItemConfigs)(x)??[]),(y,p)=>(e.openBlock(),e.createBlock(ft,{key:y.id,pricing:t.pricing,item:x,"item-index":B,config:y,"config-index":p,"are-non-billable-items-visible":t.areNonBillableItemsVisible,i18n:t.i18n,"root-class":t.rootClass,schedule:t.schedule,"credit-types-by-id":t.creditTypesById,"can-collapse-nested-conditions":t.canCollapseNestedConditions},{"pricing-item-config-settings":e.withCtx(b=>[e.renderSlot(r.$slots,"pricing-item-config-settings",e.mergeProps({ref_for:!0},b),void 0,!0)]),"override-tooltip":e.withCtx(b=>[e.renderSlot(r.$slots,"pricing-item-config-override-tooltip",e.mergeProps({ref_for:!0},b),void 0,!0)]),"pricing-item-config-additions":e.withCtx(b=>[e.renderSlot(r.$slots,"pricing-item-config-additions",e.mergeProps({ref_for:!0},b),void 0,!0)]),_:3},8,["pricing","item","item-index","config","config-index","are-non-billable-items-visible","i18n","root-class","schedule","credit-types-by-id","can-collapse-nested-conditions"]))),128))],2)):e.createCommentVNode("",!0)],64)}),128))]))}}),vt=j._export_sfc(hl,[["__scopeId","data-v-d8536163"]]),yl={...It},Tt={...yl,revenueItems:"Revenue items",billedItems:"Billed Items",deductionItems:"Deduction items",features:"Features"},bl={class:"text-xs font-semibold uppercase text-subtle"},kl={class:"print:hidden"},_l={class:"hidden print:inline"},Cl={class:"text-xs font-semibold uppercase text-subtle"},xl={class:"text-xs font-semibold uppercase text-subtle"},Bl={key:0,class:"absolute right-0 top-1/2 z-10 -translate-y-1/2 bg-white"},Nl={class:"pl-4"},Vl={class:"mt-2"},El={class:"font-bold print:font-normal"},Sl={key:1,class:"font-bold text-primary-600"},wl={key:2,class:"font-bold text-primary-600"},Pl={key:4,class:"font-bold text-primary-600"},$l=e.defineComponent({__name:"PricingInfo",props:{pricing:{},groupedPricingItemIds:{},areNonBillableItemsVisible:{type:Boolean},i18n:{},schedule:{},creditTypesById:{},canCollapseNestedConditions:{type:Boolean}},setup(t){const n=t;e.provide("pricingId",n.pricing.id);const i=e.computed(()=>n.i18n??Tt),o=e.computed(()=>{var c;return(c=n.pricing.items)==null?void 0:c.filter(d=>z.isRevenuePricingItem(d.product_items))}),s=e.computed(()=>{var c;return!((c=o.value)!=null&&c.some(z.isBilledPricingItem))}),u=e.computed(()=>{var c;return((c=n.pricing.entitlements)==null?void 0:c.every(z.isDisabledEntitlement))??!1}),m=e.computed(()=>{var c;return(c=n.pricing.items)==null?void 0:c.filter(d=>z.isDeductionPricingItem(d.product_items))}),l=e.computed(()=>{var c;return!((c=m.value)!=null&&c.some(z.isBilledPricingItem))});return(c,d)=>(e.openBlock(),e.createElementBlock("div",null,[e.renderSlot(c.$slots,"pricing-item-warning",{},void 0,!0),e.unref(M.isEmpty)(o.value)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.unref(M.isEmpty)(t.pricing.items)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ue._sfc_main,{key:0,class:e.normalizeClass(["section-label my-3",{"print:hidden":s.value}])},{default:e.withCtx(()=>[e.createElementVNode("h3",bl,[e.createElementVNode("span",kl,e.toDisplayString(i.value.revenueItems),1),e.createElementVNode("span",_l,e.toDisplayString(i.value.billedItems),1)])]),_:1},8,["class"])),e.createVNode(vt,{pricing:{...t.pricing,items:o.value},"grouped-pricing-item-ids":t.groupedPricingItemIds,i18n:i.value,"are-non-billable-items-visible":t.areNonBillableItemsVisible,schedule:t.schedule,"credit-types-by-id":t.creditTypesById,"can-collapse-nested-conditions":t.canCollapseNestedConditions},{"pricing-item-header":e.withCtx(({item:a})=>[e.renderSlot(c.$slots,"pricing-item-header",{item:a},void 0,!0)]),"pricing-item-config-settings":e.withCtx(a=>[e.renderSlot(c.$slots,"pricing-item-config-settings",e.normalizeProps(e.guardReactiveProps(a)),void 0,!0)]),"pricing-item-config-override-tooltip":e.withCtx(a=>[e.renderSlot(c.$slots,"pricing-item-config-override-tooltip",e.normalizeProps(e.guardReactiveProps(a)),void 0,!0)]),"pricing-item-config-additions":e.withCtx(a=>[e.renderSlot(c.$slots,"pricing-item-config-additions",e.normalizeProps(e.guardReactiveProps(a)),void 0,!0)]),_:3},8,["pricing","grouped-pricing-item-ids","i18n","are-non-billable-items-visible","schedule","credit-types-by-id","can-collapse-nested-conditions"])],64)),e.unref(M.isEmpty)(m.value)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.pricing.items&&t.pricing.items.length>0?(e.openBlock(),e.createBlock(ue._sfc_main,{key:0,class:e.normalizeClass(["section-label mb-3 mt-6",{"print:hidden":l.value}])},{default:e.withCtx(()=>[e.createElementVNode("h3",Cl,e.toDisplayString(i.value.deductionItems),1)]),_:1},8,["class"])):e.createCommentVNode("",!0),e.createVNode(vt,{pricing:{...t.pricing,items:m.value},"grouped-pricing-item-ids":t.groupedPricingItemIds,i18n:i.value,"are-non-billable-items-visible":t.areNonBillableItemsVisible,"credit-types-by-id":t.creditTypesById,"can-collapse-nested-conditions":t.canCollapseNestedConditions},{"pricing-item-header":e.withCtx(({item:a})=>[e.renderSlot(c.$slots,"pricing-item-header",{item:a},void 0,!0)]),"pricing-item-config-settings":e.withCtx(a=>[e.renderSlot(c.$slots,"pricing-item-config-settings",e.normalizeProps(e.guardReactiveProps(a)),void 0,!0)]),"pricing-item-config-override-tooltip":e.withCtx(a=>[e.renderSlot(c.$slots,"pricing-item-config-override-tooltip",e.normalizeProps(e.guardReactiveProps(a)),void 0,!0)]),"pricing-item-config-additions":e.withCtx(a=>[e.renderSlot(c.$slots,"pricing-item-config-additions",e.normalizeProps(e.guardReactiveProps(a)),void 0,!0)]),_:3},8,["pricing","grouped-pricing-item-ids","i18n","are-non-billable-items-visible","credit-types-by-id","can-collapse-nested-conditions"])],64)),e.unref(M.isEmpty)(t.pricing.entitlements)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["mt-2",{"print:hidden":u.value}])},[e.createVNode(ue._sfc_main,{class:"section-label relative"},{default:e.withCtx(()=>[e.createElementVNode("h3",xl,e.toDisplayString(i.value.features),1),c.$slots["pricing-entitlements-settings"]?(e.openBlock(),e.createElementBlock("div",Bl,[e.createElementVNode("div",Nl,[e.renderSlot(c.$slots,"pricing-entitlements-settings",{pricing:t.pricing},void 0,!0)])])):e.createCommentVNode("",!0)]),_:3}),e.createElementVNode("ul",Vl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.pricing.entitlements,a=>(e.openBlock(),e.createElementBlock("li",{key:a.feature_id,class:e.normalizeClass(["flex items-center justify-between py-2",{"print:hidden":e.unref(z.isDisabledEntitlement)(a)}])},[e.createElementVNode("span",El,e.toDisplayString(a.feature.name),1),a.feature.type===e.unref(z.FeatureType).AMOUNT&&a.amount?(e.openBlock(),e.createBlock(L._sfc_main,{key:0,value:a.amount,highlighted:""},null,8,["value"])):e.createCommentVNode("",!0),a.feature.type===e.unref(z.FeatureType).NUMBER&&a.number?(e.openBlock(),e.createElementBlock("span",Sl,e.toDisplayString(a.number),1)):e.createCommentVNode("",!0),a.feature.type===e.unref(z.FeatureType).STRING&&a.string?(e.openBlock(),e.createElementBlock("span",wl,e.toDisplayString(a.string),1)):e.createCommentVNode("",!0),a.feature.type===e.unref(z.FeatureType).SWITCH&&"switch"in a?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["inline-block rounded-full leading-[0.5] text-white",a.switch?"bg-primary-600":"bg-red-500"])},[e.createVNode(R._sfc_main$1,{icon:a.switch?"check":"close",size:"xs"},null,8,["icon"])],2)):e.createCommentVNode("",!0),a.feature.type===e.unref(z.FeatureType).ENUM&&a.enum?(e.openBlock(),e.createElementBlock("span",Pl,e.toDisplayString(a.enum),1)):e.createCommentVNode("",!0)],2))),128))])],2))]))}}),Il=j._export_sfc($l,[["__scopeId","data-v-dcd02509"]]),Tl=t=>"cancellationDate"in t,le=t=>"schedule"in t,Dt={...Tt,volumePooling:"Volume pooling",addon:"Addon",someItemsDeprecatedWarning:"Some of the product items are deprecated. They cannot be used for pricing and needs to be deleted",allItemsDeprecatedWarning:"All product items are deprecated, this pricing needs to be deleted",expandAllConditions:"Expand all",collapseAllConditions:"Collapse all"},zt={addon:"Addon",singleSelect:"Single select",multiSelect:"Multi select"},Ot={...zt,...Dt,productsCount:t=>t===0?"no products":t===1?"1 product":`${t} products`},Dl={...ae,...te,...re,...Ot,...Vt,commitmentsTitle:te.title,discountsTitle:ae.title,markupsTitle:re.title,commitmentsOrderOfApplicationExplanation:te.orderOfApplicationExplanation,discountsOrderOfApplicationExplanation:ae.orderOfApplicationExplanation,markupsOrderOfApplicationExplanation:re.orderOfApplicationExplanation,scheduleNumber:t=>`Schedule ${t}`,versionNumber:t=>`Version ${t}`,subscriptionCancelled:t=>`Subscription cancelled from ${t}`,directPricingTitle:"Pricing defined on this schedule",startsAt:t=>`Starts at ${t}`,endsAt:t=>`Ends at ${t}`},zl={class:"ml-2 inline-block"},Ol={class:"flex items-center gap-2"},Ll={key:0,class:"mb-2"},he=e.defineComponent({__name:"PricingCard",props:{pricing:{},groupedPricingItemIds:{},pricingPlanId:{},pricingPlanVersionId:{},isCustomizedPlan:{type:Boolean},subscriptionId:{},showNonBillable:{type:Boolean},defaultExpanded:{type:Boolean},i18n:{},showAddonChip:{type:Boolean,default:!0},isEnabled:{type:Boolean,default:!0},schedule:{},creditTypesById:{},canCollapseNestedConditions:{type:Boolean}},emits:["pricing-toggled","pricing-toggle"],setup(t,{emit:n}){const i=t,o=n,s=e.computed(()=>i.i18n??Dt);e.provide("pricingId",i.pricing.id);const u=_t({defaultCollapsed:i.canCollapseNestedConditions}),m=p=>[...p.configs??[],...(p.billing_period_configs??[]).flatMap(b=>b.configs??[]),...(p.pricing_currency_configs??[]).flatMap(b=>[...b.configs??[],...(b.billing_period_configs??[]).flatMap(h=>h.configs??[])])],l=e.computed(()=>(i.pricing.items??[]).flatMap(m).flatMap(p=>T.getFlatConfigs(p)).filter(p=>{var b;return!M.isEmpty((b=p.conditions)==null?void 0:b.configs)}).map(p=>p.id)),c=e.computed(()=>l.value.length>0),d=e.computed(()=>l.value.every(p=>u.isExpanded(p))),a=e.ref(!!i.defaultExpanded);e.watch(()=>i.defaultExpanded,p=>{a.value=!!p});const _=p=>{a.value!==p&&(a.value=p,o("pricing-toggle",i.pricing.id))},g=e.computed(()=>!!i.canCollapseNestedConditions&&c.value),r=e.computed(()=>a.value&&d.value),v=e.computed(()=>r.value?s.value.collapseAllConditions??"Collapse all":s.value.expandAllConditions??"Expand all"),x=()=>{if(r.value){u.collapseAll(),_(!1);return}_(!0),u.expandAll()},B=p=>p.status==="DEPRECATED",V=e.computed(()=>(i.pricing.items||[]).flatMap(p=>p.product_items||[]).some(B)),y=e.computed(()=>(i.pricing.items||[]).flatMap(p=>p.product_items||[]).every(B));return(p,b)=>(e.openBlock(),e.createBlock(Ni,{class:e.normalizeClass(["flex flex-col justify-between",{"print:hidden":!e.unref(z.hasPrintablePricingContent)(t.pricing)}]),"capped-width":"","is-controlled":"","is-open":a.value,"data-testid":`pricing-${t.pricing.id}`,spacing:"sm",onToggle:b[0]||(b[0]=h=>_(!a.value)),onToggled:b[1]||(b[1]=h=>p.$emit("pricing-toggled",h))},{"pre-header":e.withCtx(()=>[e.renderSlot(p.$slots,"pre-header")]),"title-prefix":e.withCtx(()=>[e.renderSlot(p.$slots,"title-prefix")]),title:e.withCtx(()=>[e.createVNode(E._sfc_main,{weight:"semibold",tag:"span",variant:"body-sm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(Kt)(t.pricing,!(t.pricing.products&&t.pricing.products.length>1))),1)]),_:1})]),"title-suffix":e.withCtx(()=>[t.pricing.products&&t.pricing.products.length>1?(e.openBlock(),e.createBlock(U._sfc_main,{key:0,intent:"info",class:"ml-2 align-middle"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.volumePooling),1)]),_:1})):e.createCommentVNode("",!0),t.showAddonChip&&t.pricing.product_type&&t.pricing.product_type==="ADDON"?(e.openBlock(),e.createBlock(U._sfc_main,{key:1,intent:"info",class:"ml-2 align-middle"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.addon),1)]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("span",zl,[e.renderSlot(p.$slots,"id")])]),right:e.withCtx(()=>[e.createElementVNode("div",Ol,[e.renderSlot(p.$slots,"right"),g.value?(e.openBlock(),e.createBlock(e.unref(R._sfc_main),{key:0,intent:"secondary",size:"xs","aria-expanded":r.value,onClick:x},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(v.value),1)]),_:1},8,["aria-expanded"])):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createVNode(be,{spacing:"none"},{default:e.withCtx(()=>[p.$slots["pricing-note"]?(e.openBlock(),e.createElementBlock("div",Ll,[e.renderSlot(p.$slots,"pricing-note")])):e.createCommentVNode("",!0),e.createVNode(Il,{pricing:t.pricing,"grouped-pricing-item-ids":t.groupedPricingItemIds,i18n:s.value,"are-non-billable-items-visible":t.showNonBillable,schedule:t.schedule,"credit-types-by-id":t.creditTypesById,"can-collapse-nested-conditions":t.canCollapseNestedConditions},{"pricing-item-header":e.withCtx(({item:h})=>[e.renderSlot(p.$slots,"pricing-item-header",{item:h})]),"pricing-item-warning":e.withCtx(()=>[y.value?(e.openBlock(),e.createBlock(ge._sfc_main,{key:0,type:"warning"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.allItemsDeprecatedWarning),1)]),_:1})):V.value?(e.openBlock(),e.createBlock(ge._sfc_main,{key:1,type:"warning"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.someItemsDeprecatedWarning),1)]),_:1})):e.createCommentVNode("",!0)]),"pricing-item-config-settings":e.withCtx(h=>[e.renderSlot(p.$slots,"pricing-item-config-settings",e.normalizeProps(e.guardReactiveProps(h)))]),"pricing-entitlements-settings":e.withCtx(h=>[e.renderSlot(p.$slots,"pricing-entitlements-settings",e.normalizeProps(e.guardReactiveProps(h)))]),"pricing-item-config-override-tooltip":e.withCtx(h=>[e.renderSlot(p.$slots,"pricing-item-config-override-tooltip",e.normalizeProps(e.guardReactiveProps(h)))]),"pricing-item-config-additions":e.withCtx(h=>[e.renderSlot(p.$slots,"pricing-item-config-additions",e.normalizeProps(e.guardReactiveProps(h)))]),_:3},8,["pricing","grouped-pricing-item-ids","i18n","are-non-billable-items-visible","schedule","credit-types-by-id","can-collapse-nested-conditions"])]),_:3})]),_:3},8,["class","is-open","data-testid"]))}}),Rl={class:"inline-block"},Lt=e.defineComponent({__name:"PricingGroupCard",props:{pricingGroup:{},i18n:{default:()=>zt},isEnabled:{type:Boolean}},setup(t){return(n,i)=>(e.openBlock(),e.createBlock(se,{spacing:t.isEnabled?"sm":"none","border-style":t.isEnabled?"solid":"dashed"},{default:e.withCtx(()=>[e.createVNode(St,{spacing:"none",title:t.pricingGroup.name},{"title-suffix":e.withCtx(()=>[t.pricingGroup.product_type&&t.pricingGroup.product_type==="ADDON"?(e.openBlock(),e.createBlock(U._sfc_main,{key:0,intent:"info",class:"ml-2 align-middle print:hidden"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.i18n.addon),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(U._sfc_main,{intent:"neutral",class:"mx-2 align-middle print:hidden"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(Qt)(t.pricingGroup)?t.i18n.singleSelect:t.i18n.multiSelect),1)]),_:1}),e.createElementVNode("span",Rl,[e.renderSlot(n.$slots,"id")])]),right:e.withCtx(()=>[e.renderSlot(n.$slots,"settings")]),_:3},8,["title"]),e.createVNode(be,{spacing:"none",class:"mt-2"},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"pricings")]),_:3})]),_:3},8,["spacing","border-style"]))}}),Al=e.defineComponent({__name:"PricingGroupSingleSelectCard",props:{pricingGroup:{},pricingPlanVersion:{},schedule:{},showNonBillable:{type:Boolean},isEnabled:{type:Boolean}},emits:["update-enabled-pricing"],setup(t,{emit:n}){const i=t,o=n,s=e.computed(()=>{var g,r,v;return(v=(r=(g=i.schedule)==null?void 0:g.enabled_pricings)==null?void 0:r.find(x=>i.pricingGroup.pricings.some(B=>B.id===x.pricing_id)))==null?void 0:v.pricing_id}),u=g=>{o("update-enabled-pricing",s.value,g??"")},m=e.computed(()=>i.pricingGroup.pricings.map(g=>({value:g.id}))),{renderPricingForPricingItem:l}=at.usePricingItem(),c=e.computed(()=>i.pricingGroup.pricings.find(g=>g.id===s.value)),d=e.computed(()=>c.value??i.pricingGroup.pricings[0]),a=e.computed(()=>{var g,r,v,x;return(r=(g=c.value)==null?void 0:g.items)!=null&&r[0]?l({pricingItem:(x=(v=c.value)==null?void 0:v.items)==null?void 0:x[0]}):""}),_=e.computed(()=>Object.fromEntries((i.pricingPlanVersion.credit_types??[]).map(g=>[g.id,g])));return e.onMounted(()=>{s.value||u(d.value.id)}),(g,r)=>(e.openBlock(),e.createBlock(e.unref(Lt),{"pricing-group":t.pricingGroup,"is-enabled":t.isEnabled},{id:e.withCtx(()=>[e.renderSlot(g.$slots,"id",{id:t.pricingGroup.id})]),settings:e.withCtx(()=>[e.renderSlot(g.$slots,"pricing-group-settings",{pricingGroup:t.pricingGroup})]),pricings:e.withCtx(()=>[d.value?(e.openBlock(),e.createBlock(e.unref(he),{key:0,"default-expanded":!0,pricing:d.value,"pricing-plan-version-id":t.pricingPlanVersion.id,"pricing-plan-id":t.pricingPlanVersion.pricing_plan_id,"show-non-billable":t.showNonBillable,"is-customized-plan":!!t.pricingPlanVersion.copied_from_pricing_plan_version_id,class:"flex flex-col","show-addon-chip":!1,"is-enabled":t.isEnabled,schedule:t.schedule,"credit-types-by-id":_.value},{"pre-header":e.withCtx(()=>[e.createVNode(at._sfc_main,{"model-value":s.value,options:m.value,name:"pricing-group-single-select",variant:"stepped-ghost",size:"lg",class:"border-b","onUpdate:modelValue":u},null,8,["model-value","options"])]),"pricing-note":e.withCtx(()=>[e.renderSlot(g.$slots,"pricing-note",e.normalizeProps(e.guardReactiveProps({pricing:c.value})))]),"title-prefix":e.withCtx(()=>[e.renderSlot(g.$slots,"pricing-group-pricing-title-prefix",{pricingGroup:t.pricingGroup,pricing:c.value})]),id:e.withCtx(()=>[e.renderSlot(g.$slots,"pricing-title-suffix",{id:d.value.id})]),right:e.withCtx(()=>[a.value?(e.openBlock(),e.createBlock(E._sfc_main,{key:0,variant:"body-xs",color:"secondary",class:"mr-4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value),1)]),_:1})):e.createCommentVNode("",!0),e.renderSlot(g.$slots,"pricing-group-pricing-settings",{pricing:c.value,pricingGroup:t.pricingGroup})]),"pricing-item-header":e.withCtx(({item:v})=>[e.renderSlot(g.$slots,"pricing-item-header",{item:v})]),"pricing-entitlements-settings":e.withCtx(v=>[e.renderSlot(g.$slots,"pricing-entitlements-settings",e.normalizeProps(e.guardReactiveProps(v)))]),"pricing-item-config-settings":e.withCtx(v=>[e.renderSlot(g.$slots,"pricing-item-config-settings",e.mergeProps(v,{pricingGroup:t.pricingGroup}))]),"pricing-item-config-override-tooltip":e.withCtx(v=>[e.renderSlot(g.$slots,"pricing-item-config-override-tooltip",e.normalizeProps(e.guardReactiveProps(v)))]),"pricing-item-config-additions":e.withCtx(v=>[e.renderSlot(g.$slots,"pricing-item-config-additions",e.normalizeProps(e.guardReactiveProps(v)))]),_:3},8,["pricing","pricing-plan-version-id","pricing-plan-id","show-non-billable","is-customized-plan","is-enabled","schedule","credit-types-by-id"])):e.createCommentVNode("",!0)]),_:3},8,["pricing-group","is-enabled"]))}}),Fl={key:0,class:"category-heading mb-2 flex items-center gap-2 text-sm print:hidden"},Ml={class:"font-bold"},Zl={class:"flex flex-col gap-2"},Ul={class:"flex flex-col gap-1"},Hl=7,Gl=e.defineComponent({__name:"PricingPlanVersionContent",props:{pricingPlanVersion:{},groupedPricingItemIdsByPricing:{},defaultExpanded:{type:Boolean},showNonBillable:{type:Boolean},expandedPricings:{},enabledPricings:{},i18n:{},schedule:{},enablePricingGroupSelection:{type:Boolean,default:!1},canCollapseNestedConditions:{type:Boolean,default:!1}},emits:["pricing-toggle","pricing-toggled","delete-pricing","update-enabled-pricing"],setup(t){const n=t,i=e.computed(()=>n.i18n??Ot),o=e.computed(()=>n.enabledPricings??[]),s=e.computed(()=>{var l;return Object.fromEntries((((l=n.pricingPlanVersion)==null?void 0:l.credit_types)??[]).map(c=>[c.id,c]))}),u=l=>l.product_type==="DEFAULT"||l.pricings.some(c=>o.value.includes(c.id)),m=l=>l.product_type==="DEFAULT"||o.value.includes(l.id);return(l,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.renderSlot(l.$slots,"header",{},void 0,!0),t.pricingPlanVersion&&(!t.pricingPlanVersion.pricing_categories||t.pricingPlanVersion.pricing_categories.length===0)?e.renderSlot(l.$slots,"empty-state",{},void 0,!0,0):t.pricingPlanVersion?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.pricingPlanVersion.pricing_categories??[],(d,a)=>{var _,g;return e.openBlock(),e.createElementBlock("div",{key:d.product_category_id,class:e.normalizeClass({"mt-6":a>0})},[(_=d.product_category)!=null&&_.name?(e.openBlock(),e.createElementBlock("h2",Fl,[e.createElementVNode("span",Ml,e.toDisplayString((g=d.product_category)==null?void 0:g.name),1),e.createElementVNode("div",null,[e.createVNode(U._sfc_main,{size:"sm",intent:"neutral",class:"rounded-2xl font-semibold uppercase"},{default:e.withCtx(()=>{var r,v;return[e.createTextVNode(e.toDisplayString(i.value.productsCount((((r=d.pricing_groups)==null?void 0:r.length)??0)+(((v=d.pricings)==null?void 0:v.length)??0))),1)]}),_:2},1024)])])):e.createCommentVNode("",!0),e.createElementVNode("div",Zl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.pricing_groups,r=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:r.id},[t.enablePricingGroupSelection&&r.selection_constraint==="EXACTLY_ONE"&&r.pricings.length>=Hl?(e.openBlock(),e.createBlock(Al,{key:0,"pricing-group":r,"pricing-plan-version":t.pricingPlanVersion,"is-enabled":u(r),i18n:i.value,schedule:t.schedule,"show-non-billable":t.showNonBillable,onUpdateEnabledPricing:c[0]||(c[0]=(v,x)=>l.$emit("update-enabled-pricing",v,x))},{id:e.withCtx(()=>[e.renderSlot(l.$slots,"id",{id:r.id},void 0,!0)]),"pricing-group-settings":e.withCtx(()=>[e.renderSlot(l.$slots,"pricing-group-settings",{pricingGroup:r},void 0,!0)]),_:2},1032,["pricing-group","pricing-plan-version","is-enabled","i18n","schedule","show-non-billable"])):(e.openBlock(),e.createBlock(e.unref(Lt),{key:1,"pricing-group":r,"is-enabled":u(r),i18n:i.value},{id:e.withCtx(()=>[e.renderSlot(l.$slots,"id",{id:r.id},void 0,!0)]),settings:e.withCtx(()=>[e.renderSlot(l.$slots,"pricing-group-settings",{pricingGroup:r},void 0,!0)]),pricings:e.withCtx(()=>[e.createElementVNode("div",Ul,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.pricings,v=>{var x,B;return e.openBlock(),e.createBlock(e.unref(he),{key:v.id,"default-expanded":t.defaultExpanded===!0||((x=t.expandedPricings)==null?void 0:x.includes(v.id)),pricing:v,"pricing-plan-version-id":t.pricingPlanVersion.id,"pricing-plan-id":t.pricingPlanVersion.pricing_plan_id,"show-non-billable":t.showNonBillable,"is-customized-plan":!!t.pricingPlanVersion.copied_from_pricing_plan_version_id,"grouped-pricing-item-ids":(B=t.groupedPricingItemIdsByPricing)==null?void 0:B[v.id],class:"flex flex-col",i18n:i.value,"show-addon-chip":!1,"is-enabled":m(v),"credit-types-by-id":s.value,"can-collapse-nested-conditions":t.canCollapseNestedConditions,onPricingToggled:V=>l.$emit("pricing-toggled",v.id,V),onPricingToggle:c[1]||(c[1]=V=>l.$emit("pricing-toggle",V))},{"pricing-note":e.withCtx(()=>[e.renderSlot(l.$slots,"pricing-note",e.mergeProps({ref_for:!0},{pricing:v}),void 0,!0)]),"title-prefix":e.withCtx(()=>[e.renderSlot(l.$slots,"pricing-group-pricing-title-prefix",{pricingGroup:r,pricing:v},void 0,!0)]),id:e.withCtx(()=>[e.renderSlot(l.$slots,"pricing-title-suffix",{id:v.id},void 0,!0)]),right:e.withCtx(()=>[e.renderSlot(l.$slots,"pricing-group-pricing-settings",{pricing:v,pricingGroup:r},void 0,!0)]),"pricing-item-header":e.withCtx(({item:V})=>[e.renderSlot(l.$slots,"pricing-item-header",{item:V},void 0,!0)]),"pricing-entitlements-settings":e.withCtx(V=>[e.renderSlot(l.$slots,"pricing-entitlements-settings",e.mergeProps({ref_for:!0},V),void 0,!0)]),"pricing-item-config-settings":e.withCtx(V=>[e.renderSlot(l.$slots,"pricing-item-config-settings",e.mergeProps({ref_for:!0},V,{pricingGroup:r}),void 0,!0)]),"pricing-item-config-override-tooltip":e.withCtx(V=>[e.renderSlot(l.$slots,"pricing-item-config-override-tooltip",e.mergeProps({ref_for:!0},V),void 0,!0)]),"pricing-item-config-additions":e.withCtx(V=>[e.renderSlot(l.$slots,"pricing-item-config-additions",e.mergeProps({ref_for:!0},V),void 0,!0)]),_:2},1032,["default-expanded","pricing","pricing-plan-version-id","pricing-plan-id","show-non-billable","is-customized-plan","grouped-pricing-item-ids","i18n","is-enabled","credit-types-by-id","can-collapse-nested-conditions","onPricingToggled"])}),128))])]),_:2},1032,["pricing-group","is-enabled","i18n"]))],64))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.pricings,r=>{var v,x;return e.openBlock(),e.createBlock(e.unref(he),{key:r.id,"default-expanded":t.defaultExpanded===!0||((v=t.expandedPricings)==null?void 0:v.includes(r.id)),pricing:r,"pricing-plan-version-id":t.pricingPlanVersion.id,"pricing-plan-id":t.pricingPlanVersion.pricing_plan_id,"grouped-pricing-item-ids":(x=t.groupedPricingItemIdsByPricing)==null?void 0:x[r.id],"show-non-billable":t.showNonBillable,"is-customized-plan":!!t.pricingPlanVersion.copied_from_pricing_plan_version_id,class:"flex flex-col",i18n:i.value,"is-enabled":m(r),"credit-types-by-id":s.value,schedule:t.schedule,"can-collapse-nested-conditions":t.canCollapseNestedConditions,onPricingToggled:B=>l.$emit("pricing-toggled",r.id,B),onPricingToggle:c[2]||(c[2]=B=>l.$emit("pricing-toggle",B))},{id:e.withCtx(()=>[e.renderSlot(l.$slots,"pricing-title-suffix",{id:r.id},void 0,!0)]),right:e.withCtx(()=>[e.renderSlot(l.$slots,"pricing-settings",{pricing:r},void 0,!0)]),"pricing-note":e.withCtx(()=>[e.renderSlot(l.$slots,"pricing-note",e.mergeProps({ref_for:!0},{pricing:r}),void 0,!0)]),"pricing-item-header":e.withCtx(({item:B})=>[e.renderSlot(l.$slots,"pricing-item-header",{item:B},void 0,!0)]),"pricing-entitlements-settings":e.withCtx(B=>[e.renderSlot(l.$slots,"pricing-entitlements-settings",e.mergeProps({ref_for:!0},B),void 0,!0)]),"pricing-item-config-settings":e.withCtx(B=>[e.renderSlot(l.$slots,"pricing-item-config-settings",e.mergeProps({ref_for:!0},B,{pricingGroup:void 0}),void 0,!0)]),"pricing-item-config-override-tooltip":e.withCtx(B=>[e.renderSlot(l.$slots,"pricing-item-config-override-tooltip",e.mergeProps({ref_for:!0},B),void 0,!0)]),"pricing-item-config-additions":e.withCtx(B=>[e.renderSlot(l.$slots,"pricing-item-config-additions",e.mergeProps({ref_for:!0},B),void 0,!0)]),_:2},1032,["default-expanded","pricing","pricing-plan-version-id","pricing-plan-id","grouped-pricing-item-ids","show-non-billable","is-customized-plan","i18n","is-enabled","credit-types-by-id","schedule","can-collapse-nested-conditions","onPricingToggled"])}),128))])],2)}),128)):e.createCommentVNode("",!0)],64))}}),ht=j._export_sfc(Gl,[["__scopeId","data-v-a9312230"]]),jl={class:"flex items-center gap-2"},ql={key:0,class:"mb-8 flex items-center gap-2 print:hidden"},Wl={class:"text-base font-semibold"},Yl={key:1,class:"transition-opacity-300"},Kl={key:2,class:"transition-opacity-300"},Jl=e.defineComponent({__name:"PricingPlanSchedules",props:{schedules:{},isEditable:{type:Boolean},openScheduleId:{},i18n:{},displayDisabledAddonPricings:{type:Boolean,default:!1},isExpandedByDefault:{type:Boolean},timezone:{},cancellationDate:{},cancellationReason:{},enablePricingGroupSelection:{type:Boolean,default:!1},forPrint:{type:Boolean,default:!1}},emits:["add-schedule","toggle-schedule"],setup(t,{emit:n}){var i;const o=t,s=n,u=e.computed(()=>o.i18n??Dl),{formatDate:m}=E.useIntl(),l=h=>o.timezone?m({date:h,format:"date",offsetType:"offsetted",timezone:o.timezone}):m({date:h,format:"date",offsetType:"local"}),c=h=>`(${h.start_at?u.value.startsAt(l(h.start_at)):u.value.startOfSchedule} - ${h.end_at?u.value.endsAt(l(h.end_at)):u.value.endOfSchedule})`,{getIsOpen:d,toggle:a}=ce.useToggleList({closeOthers:!0,initialToggledItems:[(i=o.schedules[0])==null?void 0:i.schedule.id]}),_=e.ref(null);Ht(_,".collapsible-card-print-wrapper",{companionSelector:".category-heading",expandSelectors:[".collapsible-list-item-content",".collapsible-card-print-content"],protectedTopSelectors:[".card-header-print-root",".section-label",".pricing-item-block"],enabled:o.forPrint});const g=e.computed(()=>o.schedules.map((h,N)=>({...h,inferredPricingPlanVersion:h.selectedPricingPlanVersion&&dt(h.selectedPricingPlanVersion,h.schedule,{displayDisabledAddonPricings:o.displayDisabledAddonPricings}),scheduleNumber:N+1,cancelled:!1}))),r=e.computed(()=>{let h=[...g.value.map((N,f)=>({...N,inferredPricingPlanVersion:N.selectedPricingPlanVersion&&dt(N.selectedPricingPlanVersion,N.schedule,{displayDisabledAddonPricings:o.displayDisabledAddonPricings}),scheduleNumber:f+1}))];if(o.cancellationDate){let N=0;const f={cancellationDate:o.cancellationDate,cancellationReason:o.cancellationReason},C=h.findLastIndex(k=>le(k)&&(k.schedule.start_at??"")<(o.cancellationDate??""));if(C===-1)h=[f,...h];else{const k=h[C];N=le(k)&&(k.schedule.end_at??"")>=(o.cancellationDate??"")?C:C+1,N===o.schedules.length+1?h=[...h,f]:h.splice(N,0,f)}return h.map((k,S)=>le(k)?{...k,cancelled:S>N}:k)}return h}),v=h=>{if(h.inferredPricingPlanVersion)return rn(h.inferredPricingPlanVersion,h.schedule.pricing_currency,h.schedule.billing_period)},x=h=>h.inferredPricingPlanVersion?cn(h.inferredPricingPlanVersion,h.schedule.pricing_currency):{},B=h=>hn(h.schedule),V=h=>{if(o.isExpandedByDefault)return;const N=v(h)??h.inferredPricingPlanVersion;return dn([],N)},y=e.computed(()=>o.openScheduleId===void 0),p=h=>y.value?d(h.id):o.openScheduleId===h.id,b=h=>{y.value?a(h.id):s("toggle-schedule",h.id)};return(h,N)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:_},[e.createVNode(yn,e.mergeProps(h.$attrs,{"has-add-button":t.isEditable,onAdd:N[0]||(N[0]=f=>h.$emit("add-schedule"))}),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(f,C)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:C},[e.unref(Tl)(f)?(e.openBlock(),e.createBlock(gt,{key:0,"hide-collapse-icon":""},{icon:e.withCtx(()=>[e.createVNode(R._sfc_main$1,{icon:"cancel",class:"text-red-600"})]),left:e.withCtx(()=>[e.createVNode(E._sfc_main,{variant:"body-sm",weight:"semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.value.subscriptionCancelled(t.timezone?e.unref(m)({date:f.cancellationDate,format:"date",offsetType:"offsetted",timezone:t.timezone}):e.unref(m)({date:f.cancellationDate,format:"dateTime",offsetType:"local"}))),1)]),_:2},1024),f.cancellationReason?(e.openBlock(),e.createBlock(E._sfc_main,{key:0,variant:"body-xs",color:"secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.cancellationReason),1)]),_:2},1024)):e.createCommentVNode("",!0)]),_:2},1024)):e.createCommentVNode("",!0),e.unref(le)(f)?(e.openBlock(),e.createBlock(gt,{key:1,"item-number":f.scheduleNumber,"is-open":p(f.schedule),"has-continued-preline":t.isEditable?!0:f.scheduleNumber-1!==g.value.length-1,class:e.normalizeClass({"opacity-60":f.cancelled}),lazy:!t.forPrint,onToggle:k=>b(f.schedule)},{left:e.withCtx(()=>[e.createElementVNode("div",jl,[e.createVNode(E._sfc_main,{tag:"h3",weight:"semibold",class:"print:text-sm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.value.scheduleNumber(f.scheduleNumber)),1)]),_:2},1024),e.createVNode(E._sfc_main,{variant:"body-xs",class:"hidden print:block"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c(f.schedule)),1)]),_:2},1024),f.schedule.type==="TRIAL"&&f.schedule.start_at&&f.schedule.end_at?(e.openBlock(),e.createBlock(rt._sfc_main,{key:0,"trial-period":e.unref(rt.convertDateRangeToTimePeriod)(new Date(f.schedule.start_at),new Date(f.schedule.end_at))},null,8,["trial-period"])):e.createCommentVNode("",!0),e.renderSlot(h.$slots,"id",{id:f.schedule.id},void 0,!0)])]),right:e.withCtx(()=>[e.renderSlot(h.$slots,"schedule-right",{item:f,itemIndex:f.scheduleNumber-1},()=>[t.timezone?(e.openBlock(),e.createBlock(E._sfc_main,{key:0,variant:"body-xs",class:"print:hidden"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.schedule.start_at?e.unref(m)({date:f.schedule.start_at,format:"dateTime",offsetType:"offsetted",timezone:t.timezone}):u.value.startOfSchedule)+" - "+e.toDisplayString(f.schedule.end_at?e.unref(m)({date:f.schedule.end_at,format:"dateTime",offsetType:"offsetted",timezone:t.timezone}):u.value.endOfSchedule),1)]),_:2},1024)):(e.openBlock(),e.createBlock(E._sfc_main,{key:1,variant:"body-xs",class:"print:hidden"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.schedule.start_at?e.unref(m)({date:f.schedule.start_at,format:"dateTime",offsetType:"local"}):u.value.startOfSchedule)+" - "+e.toDisplayString(f.schedule.end_at?e.unref(m)({date:f.schedule.end_at,format:"dateTime",offsetType:"local"}):u.value.endOfSchedule),1)]),_:2},1024))],!0)]),default:e.withCtx(()=>[e.renderSlot(h.$slots,"schedule",{item:f,previousItem:g.value.find(k=>k.scheduleNumber===f.scheduleNumber-1),nextItem:g.value.find(k=>k.scheduleNumber===f.scheduleNumber+1),timezone:t.timezone},()=>[f.selectedPricingPlan?(e.openBlock(),e.createElementBlock("div",ql,[e.createVNode(Ft._sfc_main,{initials:f.selectedPricingPlan.name[0],"color-hash":f.selectedPricingPlan.id,size:"lg",class:"print:hidden"},null,8,["initials","color-hash"]),e.createElementVNode("h2",Wl,e.toDisplayString(f.selectedPricingPlan.name),1),e.createVNode(U._sfc_main,{intent:"neutral"},{default:e.withCtx(()=>{var k;return[e.createTextVNode(e.toDisplayString(u.value.versionNumber(((k=f.inferredPricingPlanVersion)==null?void 0:k.version)??1)),1)]}),_:2},1024)])):e.createCommentVNode("",!0),f.inferredPricingPlanVersion?(e.openBlock(),e.createElementBlock("div",Yl,[e.createVNode(ht,{"pricing-plan-version":v(f)??f.inferredPricingPlanVersion,"grouped-pricing-item-ids-by-pricing":x(f),"enabled-pricings":e.unref(ct)(f.schedule),"default-expanded":t.isExpandedByDefault,"expanded-pricings":V(f),i18n:u.value,"enable-pricing-group-selection":t.enablePricingGroupSelection,"show-non-billable":""},{"pricing-item-config-additions":e.withCtx(({config:k})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList([e.unref(nn)(f.schedule,k)],(S,w)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[S?(e.openBlock(),e.createBlock(hi,{key:w,markup:S,i18n:u.value},null,8,["markup","i18n"])):e.createCommentVNode("",!0)],64))),256)),e.renderSlot(h.$slots,"pricing-item-config-additions",{config:k,item:f,pricingPlanVersion:f.inferredPricingPlanVersion},void 0,!0)]),_:2},1032,["pricing-plan-version","grouped-pricing-item-ids-by-pricing","enabled-pricings","default-expanded","expanded-pricings","i18n","enable-pricing-group-selection"])])):e.createCommentVNode("",!0),B(f)?(e.openBlock(),e.createElementBlock("div",Kl,[e.createVNode(E._sfc_main,{variant:"label",tag:"h3",class:"mb-2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.value.directPricingTitle),1)]),_:1}),e.createVNode(ht,{"pricing-plan-version":B(f),"enabled-pricings":e.unref(ct)(f.schedule),"default-expanded":t.isExpandedByDefault,i18n:u.value,"show-non-billable":""},null,8,["pricing-plan-version","enabled-pricings","default-expanded","i18n"])])):e.createCommentVNode("",!0),f.schedule.discount?(e.openBlock(),e.createBlock(ri,{key:3,discount:f.schedule.discount,"read-only":"","pricing-plan-version":f.inferredPricingPlanVersion,timezone:t.timezone,i18n:{...u.value,title:u.value.discountsTitle,orderOfApplicationExplanation:u.value.discountsOrderOfApplicationExplanation}},null,8,["discount","pricing-plan-version","timezone","i18n"])):e.createCommentVNode("",!0),f.schedule.markup?(e.openBlock(),e.createBlock(fi,{key:4,markup:f.schedule.markup,"pricing-plan-version":f.inferredPricingPlanVersion,timezone:t.timezone,i18n:{...u.value,title:u.value.markupsTitle,orderOfApplicationExplanation:u.value.markupsOrderOfApplicationExplanation}},null,8,["markup","pricing-plan-version","timezone","i18n"])):e.createCommentVNode("",!0),f.schedule&&f.schedule.commitment?(e.openBlock(),e.createBlock(Kn,{key:5,class:"mt-2",commitment:f.schedule.commitment,"read-only":"","pricing-plan-version":f.inferredPricingPlanVersion,timezone:t.timezone,i18n:{...u.value,title:u.value.commitmentsTitle,orderOfApplicationExplanation:u.value.commitmentsOrderOfApplicationExplanation}},null,8,["commitment","pricing-plan-version","timezone","i18n"])):e.createCommentVNode("",!0)],!0)]),_:2},1032,["item-number","is-open","has-continued-preline","class","lazy","onToggle"])):e.createCommentVNode("",!0)],64))),128))]),_:3},16,["has-add-button"])],512))}}),Xl=j._export_sfc(Jl,[["__scopeId","data-v-74d6e45b"]]),Ql=e.defineComponent({__name:"SubscriptionSchedules",props:{schedulesData:{type:Array},configuration:{type:Object},isLoading:{type:Boolean}},setup(t){const{$t:n}=E.useIntl();return(i,o)=>(e.openBlock(),e.createBlock(e.unref(Rt._sfc_main),{class:"sv-subscription-schedules sv-root sv-component","no-border":"","no-spacing":"","content-background":"none",title:e.unref(n)({defaultMessage:"Schedules",description:"Subscription schedules list title",id:"subscription_schedules.title"})},{default:e.withCtx(()=>[e.createVNode(e.unref(Xl),{class:"sv-subscription-schedules__list",schedules:t.schedulesData},null,8,["schedules"])]),_:1},8,["title"]))}});exports._sfc_main=Ql;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as x, computed as i, openBlock as n, createElementBlock as v, normalizeClass as S, createBlock as l, unref as s, createCommentVNode as o, createElementVNode as h, createVNode as w, withCtx as u, createTextVNode as r, toDisplayString as p, Fragment as B } from "vue";
|
|
2
|
-
import { _ as I } from "./Avatar.vue.es-
|
|
3
|
-
import {
|
|
4
|
-
import { g as j, a as C, f as V } from "./subscription-
|
|
2
|
+
import { _ as I } from "./Avatar.vue.es-BqQHvLGA.mjs";
|
|
3
|
+
import { a as N, _ as m } from "./customElements-D5DAoHRI.mjs";
|
|
4
|
+
import { g as j, a as C, f as V } from "./subscription-D1yHKUNc.mjs";
|
|
5
5
|
const O = { class: "grow" }, R = /* @__PURE__ */ x({
|
|
6
6
|
__name: "SubscriptionSummary",
|
|
7
7
|
props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("vue"),g=require("./Avatar.vue.es-
|
|
1
|
+
const e=require("vue"),g=require("./Avatar.vue.es-Bm6MCMAL.js"),c=require("./customElements-C963-LtW.js"),i=require("./subscription-ZA62t4E9.js"),f={class:"grow"},v=e.defineComponent({__name:"SubscriptionSummary",props:{subscription:{type:Object},invoice:{type:Object},loading:{type:Boolean},enabledPricingIds:{type:Array},avatar:{type:String},noSpacing:{type:Boolean},trialPeriod:{type:Object}},setup(o){const t=o,{$t:d}=c.useIntl(),m=e.computed(()=>i.getMostRecentPricingPlan(t.subscription)),p=e.computed(()=>i.getSubscriptionName({subscription:t.subscription,fallback:d({defaultMessage:"Subscription",description:"The fallback name for when no subscription name can be determined",id:"customer_overview.subscriptions_block.fallback_subscription_name"})})),s=e.computed(()=>{var n;return t.subscription.description||((n=m.value)==null?void 0:n.description)}),a=e.computed(()=>{if(!t.subscription||!t.enabledPricingIds)return;const n=i.findPricingsByIds(t.subscription,t.enabledPricingIds);return n==null?void 0:n.map(r=>{var l,u;return r.name??((u=(l=r.products)==null?void 0:l[0])==null?void 0:u.name)}).join(" - ")});return(n,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-row gap-3",o.noSpacing?void 0:"px-3 py-2"])},[o.avatar?(e.openBlock(),e.createBlock(e.unref(g._sfc_main),{key:0,"image-src":o.avatar,size:"lg",class:"my-1"},null,8,["image-src"])):e.createCommentVNode("",!0),e.createElementVNode("div",f,[e.createVNode(e.unref(c._sfc_main),{variant:"body",weight:"semibold","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.value),1)]),_:1}),a.value?(e.openBlock(),e.createBlock(e.unref(c._sfc_main),{key:0,variant:"body-xs",color:"subtle","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value),1)]),_:1})):e.createCommentVNode("",!0),s.value?(e.openBlock(),e.createBlock(e.unref(c._sfc_main),{key:1,variant:"body-xs",color:"subtle","no-spacing":""},{default:e.withCtx(()=>[a.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(" • ")],64)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(s.value),1)]),_:1})):e.createCommentVNode("",!0)])],2))}});exports._sfc_main=v;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const v=require("./useIncrementalLoading-CaWOE8Xl.js"),f=require("./subscriptions-
|
|
1
|
+
const v=require("./useIncrementalLoading-CaWOE8Xl.js"),f=require("./subscriptions-Cm83ckfl.js"),e=require("vue"),b=require("./Button.vue.es-qGvnOKnK.js"),p=require("./Section.vue.es-zVXBHAL6.js"),r=require("./customElements-C963-LtW.js"),_=require("./PaymentMethod.vue.es-CJcSZ9lN.js"),m=require("./subscription-ZA62t4E9.js"),h=require("./Skeleton.vue_vue_type_script_setup_true_lang-D4sbq9nA.js"),y=require("./useActionDispatchProvider-CHkVQMaE.js");function w({customerId:t,batchSize:s=15}){const i=f.createSubscriptionsService(),o=async a=>i.getActiveSubscriptions({customerId:t,pagination:{page:a,pageSize:s}});return v.useIncrementalLoading({service:o})}const g={class:"sv-subscriptions-list__item-body flex flex-col gap-4 md:flex-row"},k={class:"sv-subscriptions-list__item-content grow"},x={class:"sv-subscriptions-list__item-meta mt-4 flex items-center gap-6"},B={key:1,class:"sv-subscriptions-list__item-next-invoice flex gap-1"},V={class:"sv-subscriptions-list__item-actions flex flex-col items-center gap-2 md:flex-row"},S=e.defineComponent({__name:"SubscriptionsListItem",props:{subscription:{type:Object},paymentMethod:{type:Object},customer:{type:Object},showViewSubscriptionDetailsButton:{type:Boolean,default:!0}},emits:["view-subscription-details"],setup(t){const s=t,{$t:i}=r.useIntl(),{formatDate:o}=r.useIntl(),a=e.computed(()=>m.getMostRecentPricingPlan(s.subscription)),l=e.computed(()=>m.getSubscriptionName({subscription:s.subscription,fallback:i({defaultMessage:"Subscription",description:"The fallback name for when no subscription name can be determined",id:"customer_overview.subscriptions_block.fallback_subscription_name"})})),n=e.computed(()=>{var c;return(c=a.value)==null?void 0:c.description}),u=e.computed(()=>s.showViewSubscriptionDetailsButton);return(c,d)=>(e.openBlock(),e.createBlock(e.unref(p._sfc_main),{class:"sv-subscriptions-list__item"},{default:e.withCtx(()=>[e.createElementVNode("div",g,[e.createElementVNode("div",k,[e.createVNode(e.unref(r._sfc_main),{tag:"h3",variant:"heading-2",class:"sv-subscriptions-list__item-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value),1)]),_:1}),n.value?(e.openBlock(),e.createBlock(e.unref(r._sfc_main),{key:0,variant:"body-sm",tag:"span",color:"subtle",class:"sv-subscriptions-list__item-description"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.value),1)]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("div",x,[t.paymentMethod?(e.openBlock(),e.createBlock(e.unref(_._sfc_main),{key:0,variant:"condensed",class:"sv-payment-methods__item","payment-method":t.paymentMethod},null,8,["payment-method"])):e.createCommentVNode("",!0),t.subscription.next_invoice?(e.openBlock(),e.createElementBlock("div",B,[e.createVNode(e.unref(r._sfc_main),{tag:"span",variant:"body-xs",color:"secondary",weight:"semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Next billing date",description:"The label for the next billing date",id:"customer.subscriptions_block.next_billing_date"})),1)]),_:1}),e.createVNode(e.unref(r._sfc_main),{tag:"span",variant:"body-xs",color:"secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({date:t.subscription.next_invoice.invoice_date,format:"date",offsetType:"offsetted",timezone:t.customer.timezone})),1)]),_:1})])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",V,[u.value?(e.openBlock(),e.createBlock(e.unref(b._sfc_main),{key:0,intent:"primary",class:"sv-action sv-action--primary sv-subscriptions-list__item-details w-full md:w-auto",type:"button",onClick:d[0]||(d[0]=M=>c.$emit("view-subscription-details",{subscriptionId:t.subscription.id}))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Subscription details",description:"The label for the subscription details button in the subscriptions block",id:"customer.subscriptions_block.show_details_button_label"})),1)]),_:1})):e.createCommentVNode("",!0)])])]),_:1}))}}),N={key:1,class:"sv-subscriptions-list__items grid grid-cols-1 gap-4"},C=e.defineComponent({__name:"SubscriptionsList",props:{customer:{type:Object},subscriptions:{type:Array},paymentMethods:{default:()=>[],type:Array},isLoading:{type:Boolean},showViewAllButton:{type:Boolean,default:!0},showViewDetailsButton:{type:Boolean,default:!0}},emits:["view-subscription-details","view-all-subscriptions","load-more"],setup(t){const s=t,{$t:i}=r.useIntl(),o=e.computed(()=>s.subscriptions.length>0),a=n=>{if(n)return s.paymentMethods.find(({id:u})=>u===n)},l=e.computed(()=>s.showViewAllButton);return(n,u)=>(e.openBlock(),e.createBlock(e.unref(p._sfc_main),{class:"sv-subscriptions-list","no-spacing":"","no-border":"",title:e.unref(i)({defaultMessage:"{count, plural, one {My subscription} other {My subscriptions}}",description:"Title for the subscriptions block on the customer overview page",id:"customer_overview.subscriptions_block.title"},{count:String(t.subscriptions.length)})},e.createSlots({default:e.withCtx(()=>[o.value?(e.openBlock(),e.createElementBlock("div",N,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.subscriptions,c=>(e.openBlock(),e.createBlock(S,{key:c.id,subscription:c,"payment-method":a(c.payment_method_id),customer:t.customer,"show-view-subscription-details-button":t.showViewDetailsButton,onViewSubscriptionDetails:u[1]||(u[1]=d=>n.$emit("view-subscription-details",d))},null,8,["subscription","payment-method","customer","show-view-subscription-details-button"]))),128))])):(e.openBlock(),e.createBlock(e.unref(p._sfc_main),{key:0,class:"sv-empty-state sv-subscriptions-list__empty"},{default:e.withCtx(()=>[e.createVNode(e.unref(r._sfc_main),{tag:"h3",variant:"heading-3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"No subscriptions",description:"Title for the my subscriptions block on the customer overview page",id:"customer_overview.subscriptions_block.no_active_subscription_title"})),1)]),_:1}),e.createVNode(e.unref(r._sfc_main),{variant:"body-xs",color:"subtle"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"There’s no active subscription to display.",description:"Text that is being displayed when there is no active subscription in the subscriptions block",id:"customer_overview.subscriptions_block.no_active_subscription_content"})),1)]),_:1})]),_:1}))]),_:2},[l.value?{name:"right",fn:e.withCtx(()=>[e.createVNode(e.unref(b._sfc_main),{size:"sm",intent:"subtle","icon-suffix":"arrow_right_alt",class:"sv-action sv-action--ghost sv-subscriptions-list__view-all",type:"button",onClick:u[0]||(u[0]=c=>n.$emit("view-all-subscriptions"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"View all",description:"The text for the view all subscriptions button",id:"customer_overview.subscriptions_block.view_all_button_label"})),1)]),_:1})]),key:"0"}:void 0]),1032,["title"]))}}),D=e.defineComponent({__name:"SubscriptionsList",props:{customer:{type:null},subscriptions:{type:Array},paymentMethods:{type:Array},isLoading:{type:Boolean},configuration:{type:Object}},emits:["load-more"],setup(t){const{dispatchAction:s}=y.useActionDispatchProvider();return(i,o)=>{var a,l;return t.isLoading?(e.openBlock(),e.createBlock(h._sfc_main,{key:0,variant:"section",class:"sv-subscriptions-list sv-root sv-component sv-loading min-h-[100px]","data-testid":"subscriptions-list-skeleton"})):t.customer?(e.openBlock(),e.createBlock(C,{key:1,class:"sv-subscriptions-list sv-root sv-component",customer:t.customer,subscriptions:t.subscriptions,"payment-methods":t.paymentMethods,"is-loading":t.isLoading,"show-view-all-button":(a=t.configuration)==null?void 0:a.showViewAllButton,"show-view-details-button":(l=t.configuration)==null?void 0:l.showViewDetailsButton,onViewSubscriptionDetails:o[0]||(o[0]=n=>e.unref(s)({action:"view-subscription-details",data:{subscriptionId:n.subscriptionId}})),onViewAllSubscriptions:o[1]||(o[1]=n=>e.unref(s)({action:"view-all-subscriptions"})),onLoadMore:o[2]||(o[2]=n=>i.$emit("load-more"))},null,8,["customer","subscriptions","payment-methods","is-loading","show-view-all-button","show-view-details-button"])):e.createCommentVNode("",!0)}}});exports._sfc_main=D;exports.useSubscriptionsList=w;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { u as B } from "./useIncrementalLoading-Cgxw2GD7.mjs";
|
|
2
|
-
import { c as M } from "./subscriptions
|
|
2
|
+
import { c as M } from "./subscriptions-cnR5fnf7.mjs";
|
|
3
3
|
import { defineComponent as S, computed as v, openBlock as a, createBlock as l, unref as s, withCtx as n, createElementVNode as w, createVNode as _, createTextVNode as d, toDisplayString as b, createCommentVNode as y, createElementBlock as g, createSlots as $, Fragment as A, renderList as D } from "vue";
|
|
4
|
-
import { _ as V } from "./Button.vue.es-
|
|
5
|
-
import { _ as k } from "./Section.vue.es-
|
|
6
|
-
import {
|
|
7
|
-
import { _ as L } from "./PaymentMethod.vue.es-
|
|
8
|
-
import { g as T, a as N } from "./subscription-
|
|
9
|
-
import { _ as P } from "./Skeleton.vue_vue_type_script_setup_true_lang-
|
|
10
|
-
import { u as j } from "./useActionDispatchProvider-
|
|
4
|
+
import { _ as V } from "./Button.vue.es-C32_baQN.mjs";
|
|
5
|
+
import { _ as k } from "./Section.vue.es-D7eiXUbk.mjs";
|
|
6
|
+
import { a as x, _ as f } from "./customElements-D5DAoHRI.mjs";
|
|
7
|
+
import { _ as L } from "./PaymentMethod.vue.es-CKu5nApX.mjs";
|
|
8
|
+
import { g as T, a as N } from "./subscription-D1yHKUNc.mjs";
|
|
9
|
+
import { _ as P } from "./Skeleton.vue_vue_type_script_setup_true_lang-D60YtA9z.mjs";
|
|
10
|
+
import { u as j } from "./useActionDispatchProvider-DDYqIh3r.mjs";
|
|
11
11
|
function st({
|
|
12
12
|
customerId: t,
|
|
13
13
|
batchSize: i = 15
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as k, ref as g, inject as M, computed as w, provide as E, openBlock as r, createElementBlock as n, Fragment as N, createElementVNode as v, mergeProps as O, normalizeStyle as b, createCommentVNode as u, renderSlot as f, unref as i, createBlock as T, Teleport as R, normalizeClass as s, createVNode as B, withCtx as $, createTextVNode as P, toDisplayString as S } from "vue";
|
|
2
2
|
import { u as V, o as z, f as A, a as I, _ as L } from "./floating-ui.vue.es-CYt0fSY7.mjs";
|
|
3
|
-
import { T as F, f as D, _ as x } from "./customElements-
|
|
3
|
+
import { T as F, f as D, _ as x } from "./customElements-D5DAoHRI.mjs";
|
|
4
4
|
const K = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "mb-1 px-3"
|
|
@@ -16,7 +16,7 @@ const K = {
|
|
|
16
16
|
isDarkMode: { type: Boolean }
|
|
17
17
|
},
|
|
18
18
|
setup(e) {
|
|
19
|
-
const o = e, d = g(), c = g(null), l = g(!1), y = M(F), { floatingStyles: h, placement: p } = V(d, c, {
|
|
19
|
+
const o = e, d = g(), c = g(null), l = g(!1), y = M(F, null), { floatingStyles: h, placement: p } = V(d, c, {
|
|
20
20
|
whileElementsMounted: I,
|
|
21
21
|
placement: o.placement,
|
|
22
22
|
middleware: [z(o.offset), A()]
|
|
@@ -108,7 +108,7 @@ function J(e, o) {
|
|
|
108
108
|
const H = /* @__PURE__ */ L(W, [["render", J]]), Q = /* @__PURE__ */ k({
|
|
109
109
|
__name: "TooltipParagraph",
|
|
110
110
|
setup(e) {
|
|
111
|
-
const o = M(D);
|
|
111
|
+
const o = M(D, !1);
|
|
112
112
|
return (d, c) => (r(), T(i(x), {
|
|
113
113
|
tag: "p",
|
|
114
114
|
variant: "body-xs",
|