@solvimon/solvimon-web 0.1.0-alpha.7 → 0.1.0-alpha.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. package/README.md +124 -0
  2. package/dist/ApiStatus-CyNDp_op.mjs +9 -0
  3. package/dist/ApiStatus-oqvUEWJx.js +1 -0
  4. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-CupcH8TZ.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-CX8vlY2Z.mjs} +6 -6
  5. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-DGisvmez.js +1 -0
  6. package/dist/ContentWithAsideLayout-B5B8Kwaw.js +1 -0
  7. package/dist/{ContentWithAsideLayout-Ct24RV-2.mjs → ContentWithAsideLayout-DhfUkZZg.mjs} +10 -16
  8. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DZJ0xukI.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Bus-5gC3.mjs} +21 -13
  9. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CkRsyMlJ.js +1 -0
  10. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DsrBsrtk.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Bc2hkpTb.mjs} +19 -9
  11. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-D0vVUHuY.js +1 -0
  12. package/dist/PaymentHistoryBlock-BiiFJkpT.js +1 -0
  13. package/dist/PaymentHistoryBlock-D_B099M7.mjs +4 -0
  14. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BnKwmJ2s.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CaMDtHrL.mjs} +16 -13
  15. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DWTEfLrE.js +1 -0
  16. package/dist/PaymentIntegrationForm-D1oJA9mC.js +1 -0
  17. package/dist/PaymentIntegrationForm-DNkjhqMF.mjs +4 -0
  18. package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BE1lWOk9.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-D37gDtY7.mjs} +95 -199
  19. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-D5bxFJ-p.js +1 -0
  20. package/dist/{PricingGroupContent.vue_vue_type_script_setup_true_lang-BbvDXvIS.mjs → PricingGroupContent.vue_vue_type_script_setup_true_lang-BChVMzCj.mjs} +5 -31
  21. package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-Br3bEUlP.js +1 -0
  22. package/dist/{Skeleton.vue_vue_type_script_setup_true_lang-DXJcL7x6.mjs → Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs} +9 -6
  23. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js +1 -0
  24. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-AHw3iTfi.js +1 -0
  25. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DVhJy0t8.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BkzLj8n2.mjs} +28 -22
  26. package/dist/adyen-B_QrYdaC.mjs +4 -0
  27. package/dist/adyen-Bwewy3HC.mjs +172 -0
  28. package/dist/adyen-R6aSZ0Yf.js +1 -0
  29. package/dist/adyen-mQEEOjgl.js +1 -0
  30. package/dist/adyen.css +1 -0
  31. package/dist/component-BOqPDAVk.js +1 -0
  32. package/dist/component-Djrf1L-Z.mjs +889 -0
  33. package/dist/components/BillingInformation/BillingInformation.cjs.js +1 -1
  34. package/dist/components/BillingInformation/BillingInformation.es.js +8 -9
  35. package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +1 -1
  36. package/dist/components/BillingInformationForm/BillingInformationForm.es.js +14 -18
  37. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +1 -1
  38. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +10 -10
  39. package/dist/components/Invoice/Invoice.cjs.js +1 -1
  40. package/dist/components/Invoice/Invoice.es.js +70 -2673
  41. package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -1
  42. package/dist/components/InvoiceDetails/InvoiceDetails.es.js +10 -10
  43. package/dist/components/InvoicesList/InvoicesList.cjs.js +1 -1
  44. package/dist/components/InvoicesList/InvoicesList.es.js +7 -8
  45. package/dist/components/PaymentHistory/PaymentHistory.cjs.js +1 -1
  46. package/dist/components/PaymentHistory/PaymentHistory.es.js +10 -10
  47. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +1 -1
  48. package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +16 -38
  49. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +1 -1
  50. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +17 -4826
  51. package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +1 -1
  52. package/dist/components/SubscriptionsList/SubscriptionsList.es.js +11 -11
  53. package/dist/components/WalletBalances/WalletBalances.cjs.js +1 -1
  54. package/dist/components/WalletBalances/WalletBalances.es.js +9 -9
  55. package/dist/core/index.cjs.js +1 -1
  56. package/dist/core/index.d.ts +1 -0
  57. package/dist/core/index.es.js +1 -1
  58. package/dist/core/types.d.ts +6 -2
  59. package/dist/{customer-CJrpbGX4.mjs → customer-B31QzznT.mjs} +1 -1
  60. package/dist/{customer-CcQR-JIm.js → customer-hDxW1Dbp.js} +1 -1
  61. package/dist/en-US-CgPY97Vq.js +1 -0
  62. package/dist/en-US-N3CUCsVy.mjs +179 -0
  63. package/dist/index-CzL1ZcGi.mjs +85 -0
  64. package/dist/index-DIFK3mcJ.js +6 -0
  65. package/dist/index-DRdBmZ2-.js +1 -0
  66. package/dist/index-DyvRdSR7.mjs +9673 -0
  67. package/dist/index.cjs.js +1 -1
  68. package/dist/index.d.ts +1 -0
  69. package/dist/index.es.js +4 -1
  70. package/dist/{invoices-CNK1Ushv.mjs → invoices-DIYPN2j_.mjs} +2 -15
  71. package/dist/invoices-DzkA1jDc.js +1 -0
  72. package/dist/nl-NL-B8U9b85I.mjs +197 -0
  73. package/dist/nl-NL-qMRaTRrM.js +1 -0
  74. package/dist/{paymentMethods-C-ApE-G4.mjs → paymentMethods-67b3UlTZ.mjs} +2 -2
  75. package/dist/paymentMethods-C_sdTkSF.js +1 -0
  76. package/dist/{payments-CLt0SExf.js → payments-DkHhTHto.js} +1 -1
  77. package/dist/{payments-CE9U7aKK.mjs → payments-Dq6R37Fz.mjs} +1 -1
  78. package/dist/registry-BkViv4tv.js +1 -0
  79. package/dist/{registry-B99ZnfEn.mjs → registry-Df_26rJy.mjs} +6 -4
  80. package/dist/screens/Checkout/Checkout.cjs.js +1 -1
  81. package/dist/screens/Checkout/Checkout.es.js +632 -2538
  82. package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
  83. package/dist/screens/CustomerOverview/CustomerOverview.es.js +23 -17
  84. package/dist/screens/PayInvoice/PayInvoice.ce.d.ts +3 -0
  85. package/dist/screens/PayInvoice/PayInvoice.cjs.js +1 -0
  86. package/dist/screens/PayInvoice/PayInvoice.es.js +458 -0
  87. package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +1 -1
  88. package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +147 -99
  89. package/dist/solvimon-web.css +1 -1
  90. package/dist/{subscriptions-CoeCrY1I.mjs → subscriptions-ClGIr_aS.mjs} +2 -2
  91. package/dist/subscriptions-jelITJcX.js +1 -0
  92. package/dist/{useActionDispatchProvider-eO2qFPGv.mjs → useActionDispatchProvider-BC57-Ufn.mjs} +1 -1
  93. package/dist/{useActionDispatchProvider-CWVV_xsi.js → useActionDispatchProvider-rw9kWeE0.js} +1 -1
  94. package/dist/{useCustomer--jycAz--.mjs → useCustomer-Ba9WRtuT.mjs} +2 -2
  95. package/dist/{useCustomer-PthyTFLl.js → useCustomer-CUcaeQn_.js} +1 -1
  96. package/dist/{useIncrementalLoading-CcnL3flF.mjs → useIncrementalLoading-Cnzh2mAz.mjs} +3 -8
  97. package/dist/useIncrementalLoading-DoTTXM2Y.js +1 -0
  98. package/dist/{useInvoiceData-BiMMoVoW.mjs → useInvoiceData-BJwwDur7.mjs} +6 -12
  99. package/dist/useInvoiceData-D2jkdmlA.js +1 -0
  100. package/dist/{useInvoicesList-DFhF_gp7.mjs → useInvoicesList-CFzAxyae.mjs} +34 -267
  101. package/dist/useInvoicesList-CaBCGs4h.js +1 -0
  102. package/dist/{useLoadInitialData-Dm48tlSO.mjs → useLoadInitialData-5sgImpzc.mjs} +5 -0
  103. package/dist/useLoadInitialData-DjwRHcAH.js +1 -0
  104. package/dist/usePaymentMethodOptions-C2k4npCQ.mjs +26 -0
  105. package/dist/usePaymentMethodOptions-DYO6xr3-.js +1 -0
  106. package/dist/{usePaymentMethods-BX2RnHZN.mjs → usePaymentMethods-CRWbH48K.mjs} +2 -2
  107. package/dist/{usePaymentMethods-BRQ7-dUr.js → usePaymentMethods-ryN_YohI.js} +1 -1
  108. package/dist/usePayments-Cw5PPEJa.mjs +36 -0
  109. package/dist/usePayments-DWXPGFvp.js +1 -0
  110. package/dist/usePortal-CxX4nrE4.js +1 -0
  111. package/dist/usePortal-cmE08vYs.mjs +12 -0
  112. package/dist/useService-Bb9r_sOQ.js +1 -0
  113. package/dist/useService-BsSEI8DZ.mjs +53 -0
  114. package/dist/useViewport-Bu0cyeSi.mjs +38 -0
  115. package/dist/useViewport-CKRY1CKR.js +1 -0
  116. package/dist/useWalletBalanceItems-CkDqmk36.mjs +109 -0
  117. package/dist/useWalletBalanceItems-CpZ1NWPr.js +1 -0
  118. package/dist/useWatchDebounced-2ZLnfgvG.js +1 -0
  119. package/dist/useWatchDebounced-D1xuIX6_.mjs +12 -0
  120. package/dist/vendor-ui-5pJF5KBP.js +1 -0
  121. package/dist/vendor-ui-C0K3osvz.mjs +27645 -0
  122. package/package.json +20 -12
  123. package/dist/Alert.vue.es-DMPvSykx.js +0 -1
  124. package/dist/Alert.vue.es-DsJ1ckRU.mjs +0 -172
  125. package/dist/Amount.vue.es-C6JE5rL8.mjs +0 -23
  126. package/dist/Amount.vue.es-h8wulbBG.js +0 -1
  127. package/dist/Avatar.vue.es-Ba8ZGfm4.mjs +0 -93
  128. package/dist/Avatar.vue.es-BbyE0AjW.js +0 -1
  129. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-C4Ndo83E.js +0 -1
  130. package/dist/Button.vue.es-6sBk5tBL.mjs +0 -408
  131. package/dist/Button.vue.es-BC4_TItq.js +0 -1
  132. package/dist/CardContent.vue.es-ChEMrFCc.mjs +0 -115
  133. package/dist/CardContent.vue.es-i9ivuGKG.js +0 -1
  134. package/dist/Chip.vue.es-D0fkSe8a.js +0 -1
  135. package/dist/Chip.vue.es-DcW2CjUA.mjs +0 -1576
  136. package/dist/Comparators.vue.es-BdxDqU8o.js +0 -1
  137. package/dist/Comparators.vue.es-DdTKGB80.mjs +0 -406
  138. package/dist/ContentWithAsideLayout-UHovpjZu.js +0 -1
  139. package/dist/CustomerBillingInformation.vue.es-9rP7-RzN.js +0 -1
  140. package/dist/CustomerBillingInformation.vue.es-DBMl01Es.mjs +0 -175
  141. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CYTCcMgP.js +0 -1
  142. package/dist/Divider.vue.es-ClFG8QtG.js +0 -1
  143. package/dist/Divider.vue.es-wKkIVBgb.mjs +0 -24
  144. package/dist/DividerText.vue.es-B7oa5Xpn.mjs +0 -72
  145. package/dist/DividerText.vue.es-yiFdPQvo.js +0 -1
  146. package/dist/ErrorNotification.vue.es-Bgw0MIl8.mjs +0 -30
  147. package/dist/ErrorNotification.vue.es-FpRyg0De.js +0 -1
  148. package/dist/FormMessage.vue.es-DFQXxiSC.mjs +0 -46
  149. package/dist/FormMessage.vue.es-LeWoj774.js +0 -1
  150. package/dist/IconButton.vue.es-DNCwwH_j.mjs +0 -825
  151. package/dist/IconButton.vue.es-DiSiGPWO.js +0 -1
  152. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BDitcx8B.js +0 -1
  153. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-6yi47YWd.js +0 -1
  154. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CC3hm3nx.js +0 -1
  155. package/dist/PaymentMethod.vue.es-DYlnmZh7.js +0 -1
  156. package/dist/PaymentMethod.vue.es-nXZoQjG3.mjs +0 -1255
  157. package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-CmQILA3q.js +0 -1
  158. package/dist/Section.vue.es-3-H1pUTB.mjs +0 -79
  159. package/dist/Section.vue.es-BuzTXRLP.js +0 -1
  160. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-D1Xzfc70.js +0 -1
  161. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-Pq3d7DTb.js +0 -1
  162. package/dist/TooltipParagraph.vue.es-DVJLF9Kv.mjs +0 -136
  163. package/dist/TooltipParagraph.vue.es-kTbRGoPF.js +0 -1
  164. package/dist/TrialChip.vue.es-BHYbW8b6.mjs +0 -759
  165. package/dist/TrialChip.vue.es-C6Xg_5rR.js +0 -1
  166. package/dist/_Uint8Array-DHE03FZr.mjs +0 -507
  167. package/dist/_Uint8Array-DxISR7XF.js +0 -1
  168. package/dist/_flatRest.es-BHFPCqZh.mjs +0 -642
  169. package/dist/_flatRest.es-dFffnTpX.js +0 -1
  170. package/dist/adyen-51SvcyqV.mjs +0 -4
  171. package/dist/adyen-DZsyEXkw.js +0 -1
  172. package/dist/api.es-B4qAAJKr.js +0 -1
  173. package/dist/api.es-UkfpLiLL.mjs +0 -83
  174. package/dist/auto-DzZuCneB.mjs +0 -14387
  175. package/dist/auto-PpnAChnH.js +0 -6
  176. package/dist/cloneDeep-Hs8Pp07F.js +0 -1
  177. package/dist/cloneDeep-sm9cY-u2.mjs +0 -212
  178. package/dist/cn.es-C7xoIs3C.js +0 -1
  179. package/dist/cn.es-tfxVlz02.mjs +0 -3191
  180. package/dist/component-ZRZIt3ZW.js +0 -1
  181. package/dist/component-dpA83LIN.mjs +0 -6569
  182. package/dist/countryData.es--zJAd6LA.mjs +0 -252
  183. package/dist/countryData.es-D3MFzU92.js +0 -1
  184. package/dist/customer.es-D42Md24r.js +0 -1
  185. package/dist/customer.es-LIW2YmLL.mjs +0 -30
  186. package/dist/formatting.es-9hM8aHSg.js +0 -1
  187. package/dist/formatting.es-D5H_ySFv.mjs +0 -68
  188. package/dist/getCountryNameByCode.es-fP52nO_7.js +0 -1
  189. package/dist/getCountryNameByCode.es-ymC9R46j.mjs +0 -8
  190. package/dist/index-2jo9BSPM.js +0 -1
  191. package/dist/index-BFZ0dPh9.mjs +0 -179
  192. package/dist/index-CI71bVGE.mjs +0 -2521
  193. package/dist/index-CWSXne1Q.js +0 -1
  194. package/dist/index-D3v7hAtc.mjs +0 -253
  195. package/dist/index-WLSPwi90.js +0 -1
  196. package/dist/index.es-BBJF2O2l.js +0 -1
  197. package/dist/index.es-LCAKs4tH.mjs +0 -438
  198. package/dist/invoices-3kVHsAXr.js +0 -1
  199. package/dist/isEmpty.es-Bp1SbWFu.mjs +0 -131
  200. package/dist/isEmpty.es-Dycf-CD_.js +0 -1
  201. package/dist/paymentMethods-DZRf0WRl.js +0 -1
  202. package/dist/pick.es-BgDAfhAl.js +0 -1
  203. package/dist/pick.es-DdVOyp0Q.mjs +0 -45
  204. package/dist/registry-ClZ43bQn.js +0 -1
  205. package/dist/sprite.svg.es-CCc3Mz1x.js +0 -1
  206. package/dist/sprite.svg.es-DZD704h3.mjs +0 -4
  207. package/dist/subscriptions-CS8HTxzC.js +0 -1
  208. package/dist/typeGuards.es-C4nR5FkL.js +0 -1
  209. package/dist/typeGuards.es-fwUoeMCe.mjs +0 -12
  210. package/dist/useIncrementalLoading-CAdNW-Bf.js +0 -1
  211. package/dist/useInvoiceData-DvQO_nKz.js +0 -1
  212. package/dist/useInvoicesList-CHkwSNO9.js +0 -1
  213. package/dist/useLoadInitialData-BRg7IWqW.js +0 -1
  214. package/dist/useService-B67YWAcN.js +0 -1
  215. package/dist/useService-DG_zedHV.mjs +0 -282
  216. package/dist/useWalletBalanceItems-B5FMmoU2.mjs +0 -308
  217. package/dist/useWalletBalanceItems-BY3gq0fc.js +0 -1
@@ -1,2039 +1,21 @@
1
- import { defineComponent, createPropsRestProxy, computed, openBlock, createBlock, unref, mergeProps, withCtx, createTextVNode, toDisplayString, createElementBlock, normalizeClass, createVNode, renderSlot, Fragment, renderList, resolveDynamicComponent, ref, createCommentVNode, createElementVNode, withDirectives, isRef, vModelRadio, withKeys, normalizeProps, getCurrentInstance, inject, createSlots, guardReactiveProps, Teleport, normalizeStyle, nextTick, useModel, onMounted, watch, mergeModels, withModifiers, toRef, vShow } from "vue";
2
- import { _ as _sfc_main$C, a as useIntl, S as SEARCH_SELECT_TELEPORT_TARGET, I as I18N_INJECTION_KEY, b as _sfc_main$11, d as defineCustomElement, g as getComponentName } from "../../component-dpA83LIN.mjs";
3
- import { c as countryData } from "../../countryData.es--zJAd6LA.mjs";
4
- import { _ as _sfc_main$G, c as convertDateRangeToTimePeriod, a as _sfc_main$T, u as useTimePeriod, b as usePricingItem, d as _sfc_main$Z } from "../../TrialChip.vue.es-BHYbW8b6.mjs";
5
- import { b as formatBillingPeriod, a as formatAmount } from "../../formatting.es-D5H_ySFv.mjs";
6
- import { a as _sfc_main$I, _ as _sfc_main$P } from "../../Button.vue.es-6sBk5tBL.mjs";
7
- import { _ as _sfc_main$_ } from "../../ErrorNotification.vue.es-Bgw0MIl8.mjs";
8
- import { c as createSubscriptionsService } from "../../subscriptions-CoeCrY1I.mjs";
9
- import { S as Symbol$1, m as isArrayLike, d as isArray, i as isBuffer, c as isTypedArray, p as isArguments, a as getTag, k as isPrototype, q as baseKeys, A as ApiStatus } from "../../_Uint8Array-DHE03FZr.mjs";
10
- import { c as createInvoicesService } from "../../invoices-CNK1Ushv.mjs";
11
- import { i as isEqual$1, u as useService } from "../../useService-DG_zedHV.mjs";
12
- import { c as escapeUserInput, d as _sfc_main$M, s as sortedUniqBy, f as useIsMounted, _ as _sfc_main$N, u as useValidation, g as requiredIf, r as required, e as email, o as objectDiff, a as _sfc_main$R, b as _sfc_main$S } from "../../index-CI71bVGE.mjs";
13
- import { w as watchDebounced, f as watchOnce } from "../../index-BFZ0dPh9.mjs";
14
- import { c as cloneDeep } from "../../cloneDeep-sm9cY-u2.mjs";
15
- import { c as createPaymentMethodsService } from "../../paymentMethods-C-ApE-G4.mjs";
16
- import { u as usePortal, C as ContentWithAsideLayout } from "../../ContentWithAsideLayout-Ct24RV-2.mjs";
17
- import { a as _sfc_main$U, u as useLogger, g as getAdyenExpressCheckoutConfiguration, t as transformObjectToAdyenObject, c as createReturnUrl, _ as _sfc_main$10 } from "../../PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BE1lWOk9.mjs";
18
- import { _ as _sfc_main$W, a as _sfc_main$$ } from "../../PricingGroupContent.vue_vue_type_script_setup_true_lang-BbvDXvIS.mjs";
19
- import { _ as _sfc_main$Q } from "../../Section.vue.es-3-H1pUTB.mjs";
20
- import { g as getCountryNameByCode } from "../../getCountryNameByCode.es-ymC9R46j.mjs";
21
- import { _ as _sfc_main$K } from "../../Alert.vue.es-DsJ1ckRU.mjs";
22
- import { c as createCustomerService } from "../../customer-CJrpbGX4.mjs";
23
- import { _ as _sfc_main$D, T as TooltipContent, a as _sfc_main$E } from "../../TooltipParagraph.vue.es-DVJLF9Kv.mjs";
24
- import { _ as _sfc_main$B, b as _export_sfc, u as useFloating, a as autoUpdate, o as offset, f as flip } from "../../Chip.vue.es-DcW2CjUA.mjs";
25
- import { g as getComposedString, _ as _sfc_main$V } from "../../Avatar.vue.es-Ba8ZGfm4.mjs";
26
- import { _ as _sfc_main$F } from "../../Amount.vue.es-C6JE5rL8.mjs";
27
- import { i as isEmpty$1 } from "../../isEmpty.es-Bp1SbWFu.mjs";
28
- import { _ as _sfc_main$H } from "../../Divider.vue.es-wKkIVBgb.mjs";
29
- import { a as useVModel, d as useEventListener, c as useElementSize } from "../../index.es-LCAKs4tH.mjs";
30
- import { u as uniqueId$1, _ as _sfc_main$J, i as isEqual, a as _sfc_main$O } from "../../IconButton.vue.es-DNCwwH_j.mjs";
31
- import { a as useBreakpoints, b as breakpointsTailwind } from "../../index-D3v7hAtc.mjs";
32
- import { _ as _sfc_main$X } from "../../Skeleton.vue_vue_type_script_setup_true_lang-DXJcL7x6.mjs";
33
- import { _ as _sfc_main$Y } from "../../DividerText.vue.es-B7oa5Xpn.mjs";
34
- import { c as createPaymentsService } from "../../payments-CE9U7aKK.mjs";
35
- import { _ as _sfc_main$L } from "../../FormMessage.vue.es-DFQXxiSC.mjs";
36
- const EU_COUNTRIES = {
37
- AT: "Austria",
38
- BE: "Belgium",
39
- BG: "Bulgaria",
40
- CY: "Cyprus",
41
- CZ: "Czech Republic",
42
- DE: "Germany",
43
- DK: "Denmark",
44
- EE: "Estonia",
45
- ES: "Spain",
46
- FI: "Finland",
47
- FR: "France",
48
- GR: "Greece",
49
- HR: "Croatia",
50
- HU: "Hungary",
51
- IE: "Ireland",
52
- IT: "Italy",
53
- LT: "Lithuania",
54
- LU: "Luxembourg",
55
- LV: "Latvia",
56
- MT: "Malta",
57
- NL: "Netherlands",
58
- PL: "Poland",
59
- PT: "Portugal",
60
- RO: "Romania",
61
- SE: "Sweden",
62
- SI: "Slovenia",
63
- SK: "Slovakia"
64
- };
65
- function isEUCountry(countryCode) {
66
- return Object.keys(EU_COUNTRIES).includes(countryCode);
67
- }
68
- const _sfc_main$A = /* @__PURE__ */ defineComponent({
69
- __name: "DeltaChip",
70
- props: {
71
- oldValue: {},
72
- newValue: {},
73
- color: { default: "dark" },
74
- content: {},
75
- dark: { type: Boolean },
76
- removable: { type: Boolean },
77
- size: {},
78
- variant: {},
79
- textClass: {},
80
- tag: {},
81
- hasChipBefore: { type: Boolean },
82
- hasChipAfter: { type: Boolean }
83
- },
84
- setup(__props) {
85
- const chipProps = createPropsRestProxy(__props, ["oldValue", "newValue", "color"]);
86
- const delta = computed(() => {
87
- const calculatedDelta = __props.newValue - __props.oldValue;
88
- return `${calculatedDelta >= 0 ? "+" : ""}${calculatedDelta}`;
89
- });
90
- return (_ctx, _cache) => {
91
- return openBlock(), createBlock(unref(_sfc_main$B), mergeProps(chipProps, {
92
- color: __props.color,
93
- class: "pointer-events-none select-none"
94
- }), {
95
- default: withCtx(() => [
96
- createTextVNode(toDisplayString(delta.value), 1)
97
- ]),
98
- _: 1
99
- }, 16, ["color"]);
100
- };
101
- }
102
- });
103
- const _sfc_main$z = /* @__PURE__ */ defineComponent({
104
- __name: "invoicePreviewRow",
105
- props: {
106
- weight: { default: "normal" },
107
- variant: { default: "body-xs" },
108
- noSpacing: { type: Boolean, default: false }
109
- },
110
- setup(__props) {
111
- return (_ctx, _cache) => {
112
- return openBlock(), createElementBlock("div", {
113
- class: normalizeClass(["flex flex-row gap-2", { "py-1.5": !__props.noSpacing }])
114
- }, [
115
- createVNode(_sfc_main$C, {
116
- tag: "span",
117
- variant: __props.variant,
118
- class: "grow",
119
- weight: __props.weight
120
- }, {
121
- default: withCtx(() => [
122
- renderSlot(_ctx.$slots, "label")
123
- ]),
124
- _: 3
125
- }, 8, ["variant", "weight"]),
126
- createVNode(_sfc_main$C, {
127
- tag: "span",
128
- variant: __props.variant,
129
- weight: __props.weight
130
- }, {
131
- default: withCtx(() => [
132
- renderSlot(_ctx.$slots, "value")
133
- ]),
134
- _: 3
135
- }, 8, ["variant", "weight"])
136
- ], 2);
137
- };
138
- }
139
- });
140
- const _sfc_main$y = /* @__PURE__ */ defineComponent({
141
- __name: "Skeleton",
142
- props: {
143
- widthClass: { default: "w-10" },
144
- heightClass: { default: "h-3" },
145
- shade: { default: "default" }
146
- },
147
- setup(__props) {
148
- return (_ctx, _cache) => {
149
- return openBlock(), createElementBlock("div", {
150
- class: normalizeClass(["rounded", [
151
- __props.widthClass,
152
- __props.heightClass,
153
- {
154
- "bg-gray-50/50": __props.shade === "default",
155
- "bg-gray-100/50": __props.shade === "dark",
156
- "bg-gray-200/50": __props.shade === "darker",
157
- "bg-gray-400/50": __props.shade === "darkest"
158
- }
159
- ]])
160
- }, null, 2);
161
- };
162
- }
163
- });
164
- const _sfc_main$x = /* @__PURE__ */ defineComponent({
165
- __name: "InvoicePreviewNoTaxesSkeleton",
166
- props: {
167
- widthClass: { default: "w-12" },
168
- heightClass: { default: "h-5" }
169
- },
170
- setup(__props) {
171
- const { $t } = useIntl();
172
- return (_ctx, _cache) => {
173
- return openBlock(), createBlock(_sfc_main$D, { "is-dark-mode": "" }, {
174
- tooltip: withCtx(() => [
175
- createVNode(TooltipContent, null, {
176
- default: withCtx(() => [
177
- createVNode(_sfc_main$E, null, {
178
- default: withCtx(() => [
179
- createTextVNode(toDisplayString(unref($t)({
180
- defaultMessage: "Will be determined by billing information",
181
- description: "Tooltip content for the invoice preview when taxes are not determined by billing information",
182
- id: "invoice_preview.taxes_not_determined_by_billing_information_tooltip"
183
- })), 1)
184
- ]),
185
- _: 1
186
- })
187
- ]),
188
- _: 1
189
- })
190
- ]),
191
- default: withCtx(() => [
192
- createVNode(_sfc_main$y, {
193
- "width-class": __props.widthClass,
194
- "height-class": __props.heightClass,
195
- shade: "darker"
196
- }, null, 8, ["width-class", "height-class"])
197
- ]),
198
- _: 1
199
- });
200
- };
201
- }
202
- });
203
- const _sfc_main$w = /* @__PURE__ */ defineComponent({
204
- __name: "InvoicePreviewGroups",
205
- props: {
206
- invoice: {},
207
- wrapperComponent: {}
208
- },
209
- setup(__props) {
210
- const getInvoiceGroupsByType = (invoicePeriod) => {
211
- return invoicePeriod.groups.reduce(
212
- (acc, invoiceGroup) => {
213
- if (!(invoiceGroup.type in acc)) {
214
- return { ...acc, [invoiceGroup.type]: [invoiceGroup] };
215
- }
216
- return {
217
- ...acc,
218
- [invoiceGroup.type]: [...acc[invoiceGroup.type], invoiceGroup]
219
- };
220
- },
221
- {}
222
- );
223
- };
224
- const getPricingName = (group) => {
225
- var _a, _b, _c;
226
- if (((_a = group.pricing) == null ? void 0 : _a.name) && !isEmpty$1((_b = group.pricing) == null ? void 0 : _b.name)) {
227
- return group.pricing.name;
228
- }
229
- return getComposedString(((_c = group.products) == null ? void 0 : _c.map((item) => item.name)) ?? []);
230
- };
231
- return (_ctx, _cache) => {
232
- return openBlock(true), createElementBlock(Fragment, null, renderList(__props.invoice.periods, (invoicePeriod, invoicePeriodIndex) => {
233
- return openBlock(), createElementBlock(Fragment, { key: invoicePeriodIndex }, [
234
- (openBlock(true), createElementBlock(Fragment, null, renderList(Object.entries(getInvoiceGroupsByType(invoicePeriod)), ([groupType, groups]) => {
235
- return openBlock(), createElementBlock(Fragment, { key: groupType }, [
236
- (openBlock(true), createElementBlock(Fragment, null, renderList(groups, (group, groupIndex) => {
237
- return openBlock(), createBlock(resolveDynamicComponent(__props.wrapperComponent ?? "div"), { key: groupIndex }, {
238
- default: withCtx(() => [
239
- createVNode(_sfc_main$z, {
240
- "no-spacing": __props.wrapperComponent !== void 0
241
- }, {
242
- label: withCtx(() => [
243
- createTextVNode(toDisplayString(getPricingName(group)), 1)
244
- ]),
245
- value: withCtx(() => [
246
- createVNode(_sfc_main$F, {
247
- value: group.amount_excluding_tax
248
- }, null, 8, ["value"])
249
- ]),
250
- _: 2
251
- }, 1032, ["no-spacing"])
252
- ]),
253
- _: 2
254
- }, 1024);
255
- }), 128))
256
- ], 64);
257
- }), 128))
258
- ], 64);
259
- }), 128);
260
- };
261
- }
262
- });
263
- const _hoisted_1$s = { class: "flex flex-col" };
264
- const _hoisted_2$h = { key: 0 };
265
- const _sfc_main$v = /* @__PURE__ */ defineComponent({
266
- __name: "InvoicePreview",
267
- props: {
268
- invoice: {},
269
- trialInvoice: {},
270
- isCustomerFacing: { type: Boolean, default: false },
271
- variant: { default: "default" },
272
- isPaid: { type: Boolean, default: false },
273
- collapsible: { default: void 0 },
274
- isPreviewWithoutTaxes: { type: Boolean }
275
- },
276
- setup(__props) {
277
- const props = __props;
278
- const { $t } = useIntl();
279
- const collapsed = ref(props.collapsible !== void 0 ? props.collapsible !== "expanded" : false);
280
- const isCollapsible = computed(() => props.collapsible !== void 0);
281
- const hasTrialPeriod = computed(() => !!props.trialInvoice);
282
- const dueTodayAmount = computed(
283
- () => props.trialInvoice ? props.trialInvoice.tax_summary.total_amount : props.invoice.tax_summary.total_amount
284
- );
285
- const handleToggle = () => {
286
- if (isCollapsible.value) {
287
- collapsed.value = !collapsed.value;
288
- }
289
- };
290
- return (_ctx, _cache) => {
291
- return openBlock(), createElementBlock("div", _hoisted_1$s, [
292
- createVNode(_sfc_main$G, null, {
293
- default: withCtx(() => [
294
- !collapsed.value ? (openBlock(), createElementBlock("div", _hoisted_2$h, [
295
- hasTrialPeriod.value ? (openBlock(), createBlock(_sfc_main$C, {
296
- key: 0,
297
- variant: "caps-heading"
298
- }, {
299
- default: withCtx(() => [
300
- createTextVNode(toDisplayString(unref($t)({
301
- id: "invoice_preview.after_trial_heading",
302
- defaultMessage: "After trial",
303
- description: "After trial heading for the invoice preview"
304
- })), 1)
305
- ]),
306
- _: 1
307
- })) : createCommentVNode("", true),
308
- __props.variant !== "without-products" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
309
- createVNode(_sfc_main$w, { invoice: __props.invoice }, null, 8, ["invoice"]),
310
- createVNode(_sfc_main$H, { spacing: "xxs" })
311
- ], 64)) : createCommentVNode("", true),
312
- createVNode(_sfc_main$z, null, {
313
- label: withCtx(() => [
314
- createTextVNode(toDisplayString(unref($t)({
315
- id: "invoice_preview.total_excluding_taxes_heading",
316
- defaultMessage: "Total excluding taxes",
317
- description: "Total excluding taxes heading for the invoice preview"
318
- })), 1)
319
- ]),
320
- value: withCtx(() => [
321
- createVNode(_sfc_main$F, {
322
- value: __props.invoice.tax_summary.base_amount
323
- }, null, 8, ["value"])
324
- ]),
325
- _: 1
326
- }),
327
- createVNode(_sfc_main$z, null, {
328
- label: withCtx(() => [
329
- createTextVNode(toDisplayString(unref($t)({
330
- id: "invoice_preview.taxes_heading",
331
- defaultMessage: "Taxes",
332
- description: "Taxes heading for the invoice preview"
333
- })), 1)
334
- ]),
335
- value: withCtx(() => [
336
- __props.isPreviewWithoutTaxes ? (openBlock(), createBlock(_sfc_main$x, {
337
- key: 0,
338
- "width-class": "w-10",
339
- "height-class": "h-4"
340
- })) : (openBlock(), createBlock(_sfc_main$F, {
341
- key: 1,
342
- value: __props.invoice.tax_summary.tax_amount
343
- }, null, 8, ["value"]))
344
- ]),
345
- _: 1
346
- }),
347
- hasTrialPeriod.value ? (openBlock(), createBlock(_sfc_main$z, { key: 2 }, {
348
- label: withCtx(() => [
349
- createTextVNode(toDisplayString(unref($t)({
350
- id: "invoice_preview.total_including_taxes_heading",
351
- defaultMessage: "Total including taxes",
352
- description: "Total including taxes heading for the invoice preview"
353
- })), 1)
354
- ]),
355
- value: withCtx(() => [
356
- __props.isPreviewWithoutTaxes ? (openBlock(), createBlock(_sfc_main$x, {
357
- key: 0,
358
- "width-class": "w-10",
359
- "height-class": "h-4"
360
- })) : (openBlock(), createBlock(_sfc_main$F, {
361
- key: 1,
362
- value: __props.invoice.tax_summary.total_amount
363
- }, null, 8, ["value"]))
364
- ]),
365
- _: 1
366
- })) : createCommentVNode("", true),
367
- createVNode(_sfc_main$H, { spacing: "xxs" })
368
- ])) : createCommentVNode("", true)
369
- ]),
370
- _: 1
371
- }),
372
- (openBlock(), createBlock(resolveDynamicComponent(isCollapsible.value ? "button" : "div"), {
373
- class: normalizeClass({ "hover:cursor-pointer text-left": isCollapsible.value }),
374
- onClick: handleToggle
375
- }, {
376
- default: withCtx(() => [
377
- createVNode(_sfc_main$z, {
378
- weight: "semibold",
379
- variant: "body-sm"
380
- }, {
381
- label: withCtx(() => [
382
- createTextVNode(toDisplayString(__props.isPaid ? unref($t)({
383
- id: "invoice_preview.total_paid_heading",
384
- defaultMessage: "Total paid",
385
- description: "Total paid heading for the invoice preview"
386
- }) : unref($t)({
387
- id: "invoice_preview.total_due_today_heading",
388
- defaultMessage: "Total due today",
389
- description: "Total due today heading for the invoice preview"
390
- })) + " ", 1),
391
- isCollapsible.value ? (openBlock(), createBlock(_sfc_main$I, {
392
- key: 0,
393
- size: "xs",
394
- icon: "keyboard_arrow_down",
395
- class: normalizeClass(["transition ease-in-out text-gray-400", { "rotate-0": collapsed.value, "rotate-180": !collapsed.value }])
396
- }, null, 8, ["class"])) : createCommentVNode("", true)
397
- ]),
398
- value: withCtx(() => [
399
- __props.isPreviewWithoutTaxes && (!hasTrialPeriod.value || hasTrialPeriod.value && dueTodayAmount.value.quantity !== "0.00") ? (openBlock(), createBlock(_sfc_main$x, { key: 0 })) : (openBlock(), createBlock(_sfc_main$F, {
400
- key: 1,
401
- value: dueTodayAmount.value
402
- }, null, 8, ["value"]))
403
- ]),
404
- _: 1
405
- })
406
- ]),
407
- _: 1
408
- }, 8, ["class"]))
409
- ]);
410
- };
411
- }
412
- });
413
- const _hoisted_1$r = ["disabled"];
414
- const _hoisted_2$g = ["aria-label"];
415
- const _hoisted_3$9 = ["id", "disabled", "value", "aria-checked", "aria-describedby"];
416
- const _hoisted_4$7 = ["tabindex", "data-testid", "for", "aria-label", "onKeydown"];
417
- const _hoisted_5$5 = { class: "text-xs" };
418
- const _hoisted_6$4 = {
419
- key: 1,
420
- class: "mt-2 text-sm text-gray-500"
421
- };
422
- const _sfc_main$u = /* @__PURE__ */ defineComponent({
423
- __name: "RadioGroupExtended",
424
- props: {
425
- options: {},
426
- direction: { default: "row" },
427
- showRadio: { type: Boolean, default: true },
428
- disabled: { type: Boolean },
429
- label: {},
430
- modelValue: { type: [String, Boolean] },
431
- name: {},
432
- required: { type: Boolean },
433
- rootClass: {},
434
- error: {},
435
- variant: {}
436
- },
437
- emits: ["update:modelValue"],
438
- setup(__props, { emit: __emit }) {
439
- const props = __props;
440
- const emit = __emit;
441
- const model = useVModel(props, "modelValue", emit);
442
- const idPrefix = uniqueId$1(props.name ? `radio_${props.name}_` : "radio_");
443
- const handleKeyDown = (event, optionValue) => {
444
- if (props.disabled) {
445
- return;
446
- }
447
- if (event.key === "Enter" || event.key === " ") {
448
- event.preventDefault();
449
- event.stopPropagation();
450
- model.value = optionValue;
451
- }
452
- };
453
- return (_ctx, _cache) => {
454
- return openBlock(), createElementBlock("fieldset", {
455
- class: normalizeClass(__props.rootClass),
456
- disabled: __props.disabled
457
- }, [
458
- __props.label ? (openBlock(), createBlock(unref(_sfc_main$J), {
459
- key: 0,
460
- tag: "legend",
461
- required: __props.required
462
- }, {
463
- default: withCtx(() => [
464
- createTextVNode(toDisplayString(__props.label), 1)
465
- ]),
466
- _: 1
467
- }, 8, ["required"])) : createCommentVNode("", true),
468
- createElementVNode("div", {
469
- role: "group",
470
- "aria-label": __props.label,
471
- class: normalizeClass([[__props.direction === "column" ? "flex-col" : "flex-row"], "rounded flex gap-1"])
472
- }, [
473
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (option) => {
474
- return openBlock(), createElementBlock("div", {
475
- key: option.value.toString(),
476
- class: "flex-1"
477
- }, [
478
- withDirectives(createElementVNode("input", mergeProps({ ref_for: true }, _ctx.$attrs, {
479
- id: `${unref(idPrefix)}${option.value}`,
480
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(model) ? model.value = $event : null),
481
- disabled: __props.disabled,
482
- value: option.value,
483
- type: "radio",
484
- "aria-checked": unref(model) === option.value,
485
- "aria-describedby": option.warning ? `${unref(idPrefix)}${option.value}-warning` : void 0,
486
- tabindex: "-1",
487
- class: "sr-only"
488
- }), null, 16, _hoisted_3$9), [
489
- [vModelRadio, unref(model)]
490
- ]),
491
- createElementVNode("label", {
492
- tabindex: __props.disabled ? void 0 : 0,
493
- "data-testid": `radio-group-item-${option.value}`,
494
- for: `${unref(idPrefix)}${option.value}`,
495
- "aria-label": option.label + (option.description ? `: ${option.description}` : ""),
496
- class: normalizeClass(["relative label px-4 py-3 h-full flex gap-3 border bg-gray-50/50 border-gray-100 rounded outline-none hover:bg-primary-50/50 focus-visible:bg-primary-50 focus-visible:border-primary-600 focus-visible:ring-1 focus-visible:ring-primary-600 focus:bg-primary-50", {
497
- "cursor-pointer": !__props.disabled,
498
- "cursor-not-allowed": __props.disabled,
499
- "bg-white border border-primary-600 ring-1 ring-primary-600": unref(model) === option.value && !__props.disabled,
500
- "opacity-60": __props.disabled
501
- }]),
502
- onKeydown: ($event) => handleKeyDown($event, option.value)
503
- }, [
504
- __props.showRadio ? (openBlock(), createElementBlock("div", {
505
- key: 0,
506
- class: normalizeClass(["material-symbols-outlined leading-4 h-4 w-4 min-w-4 inline-block mt-px rounded-full", {
507
- "border-4 border-primary-800": unref(model) === option.value,
508
- "border border-gray-300": unref(model) !== option.value
509
- }])
510
- }, null, 2)) : createCommentVNode("", true),
511
- createElementVNode("div", {
512
- class: normalizeClass(["flex flex-col", { "opacity-50": __props.disabled }])
513
- }, [
514
- createVNode(unref(_sfc_main$C), {
515
- tag: "div",
516
- weight: "semibold",
517
- "no-spacing": "",
518
- variant: "body-sm",
519
- class: "flex justify-between align-center"
520
- }, {
521
- default: withCtx(() => [
522
- createTextVNode(toDisplayString(option.label), 1)
523
- ]),
524
- _: 2
525
- }, 1024),
526
- option.description ? (openBlock(), createBlock(unref(_sfc_main$C), {
527
- key: 0,
528
- tag: "div",
529
- variant: "body-xs",
530
- "no-spacing": "",
531
- shade: "lighter"
532
- }, {
533
- default: withCtx(() => [
534
- createTextVNode(toDisplayString(option.description), 1)
535
- ]),
536
- _: 2
537
- }, 1024)) : createCommentVNode("", true),
538
- !option.description ? renderSlot(_ctx.$slots, "description", {
539
- key: 1,
540
- optionValue: option.value
541
- }) : createCommentVNode("", true)
542
- ], 2)
543
- ], 42, _hoisted_4$7),
544
- option.warning ? (openBlock(), createBlock(unref(_sfc_main$K), {
545
- key: 0,
546
- id: `${unref(idPrefix)}${option.value}-warning`,
547
- class: "mt-1",
548
- type: unref(model) === option.value ? "danger" : "dark",
549
- role: "alert"
550
- }, {
551
- default: withCtx(() => [
552
- createElementVNode("span", _hoisted_5$5, toDisplayString(option.warning), 1)
553
- ]),
554
- _: 2
555
- }, 1032, ["id", "type"])) : createCommentVNode("", true)
556
- ]);
557
- }), 128))
558
- ], 10, _hoisted_2$g),
559
- __props.error || _ctx.$slots.helper ? (openBlock(), createElementBlock("div", _hoisted_6$4, [
560
- __props.error ? (openBlock(), createBlock(unref(_sfc_main$L), {
561
- key: 0,
562
- message: __props.error
563
- }, null, 8, ["message"])) : _ctx.$slots.helper ? renderSlot(_ctx.$slots, "helper", { key: 1 }) : createCommentVNode("", true)
564
- ])) : createCommentVNode("", true)
565
- ], 10, _hoisted_1$r);
566
- };
567
- }
568
- });
569
- const getOptionName = (value) => {
570
- return `checkbox-item-${value}`;
571
- };
572
- const DONE_BUTTON_TEST_ID = "select-search-done-button";
573
- const _sfc_main$t = {};
574
- const _hoisted_1$q = { class: "flex items-center pt-1" };
575
- const _hoisted_2$f = { class: "px-1.5 text-gray-500 text-xs font-semibold" };
576
- function _sfc_render(_ctx, _cache) {
577
- return openBlock(), createElementBlock("div", _hoisted_1$q, [
578
- _cache[0] || (_cache[0] = createElementVNode("div", { class: "border-t w-2" }, null, -1)),
579
- createElementVNode("span", _hoisted_2$f, [
580
- renderSlot(_ctx.$slots, "default")
581
- ]),
582
- _cache[1] || (_cache[1] = createElementVNode("div", { class: "border-t grow" }, null, -1))
583
- ]);
584
- }
585
- const SelectExtendedOptionsDivider = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render]]);
586
- const _hoisted_1$p = ["aria-selected", "aria-disabled", "data-testid"];
587
- const _hoisted_2$e = ["id", "value", "checked", "disabled"];
588
- const _hoisted_3$8 = ["for"];
589
- const _hoisted_4$6 = { class: "flex items-center gap-1" };
590
- const _hoisted_5$4 = { class: "flex flex-grow flex-col" };
591
- const _hoisted_6$3 = { class: "flex flex-grow gap-2" };
592
- const _hoisted_7$3 = { class: "flex flex-grow flex-col" };
593
- const _hoisted_8$2 = { class: "flex flex-grow items-start justify-between gap-2" };
594
- const _hoisted_9 = { class: "flex items-center gap-2" };
595
- const _sfc_main$s = /* @__PURE__ */ defineComponent({
596
- __name: "SelectExtendedOption",
597
- props: {
598
- multiple: { type: Boolean },
599
- inputValue: {},
600
- condensed: { type: Boolean },
601
- label: {},
602
- checked: { type: Boolean },
603
- disabled: { type: Boolean },
604
- subLabel: {},
605
- labelPrefixComponent: {},
606
- labelSuffixComponent: {},
607
- labelInlineComponent: {},
608
- value: {},
609
- labelSrOnly: { type: Boolean }
610
- },
611
- emits: ["value-changed"],
612
- setup(__props, { emit: __emit }) {
613
- const emit = __emit;
614
- const props = __props;
615
- const handleChange = (event) => {
616
- const target = event.target;
617
- emit("value-changed", {
618
- value: target.value,
619
- checked: target.checked
620
- });
621
- };
622
- const handleClick = () => {
623
- if (props.multiple || props.disabled) return;
624
- emit("value-changed", { value: props.value });
625
- };
626
- const name = computed(() => getOptionName(props.value));
627
- const escapedUserInput = computed(() => escapeUserInput(props.inputValue ?? ""));
628
- return (_ctx, _cache) => {
629
- return openBlock(), createElementBlock("li", {
630
- role: "option",
631
- "aria-selected": __props.checked,
632
- "aria-disabled": __props.disabled,
633
- class: normalizeClass([{ "hover:bg-gray-50": !__props.disabled }, "flex relative"]),
634
- "data-testid": name.value,
635
- tabindex: "0",
636
- onClick: handleClick,
637
- onKeydown: withKeys(handleClick, ["enter"])
638
- }, [
639
- __props.multiple ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
640
- createElementVNode("input", mergeProps(_ctx.$attrs, {
641
- id: name.value,
642
- ref: "inputRef",
643
- value: __props.value,
644
- checked: __props.checked,
645
- disabled: __props.disabled,
646
- type: "checkbox",
647
- class: ["absolute top-[50%] -translate-y-2 left-3.5 w-4 h-4 bg-gray-100 border-gray-300 rounded focus:ring-primary-500 focus:ring-2", __props.disabled ? "text-gray-400 placeholder-gray-500" : "text-primary-600"],
648
- tabindex: "-1",
649
- onChange: handleChange
650
- }), null, 16, _hoisted_2$e),
651
- createElementVNode("label", {
652
- for: name.value,
653
- class: normalizeClass([__props.disabled ? `text-gray-400` : "text-gray-900 rounded", "w-full px-4 py-3 pl-10 text-sm font-medium"])
654
- }, [
655
- createElementVNode("div", _hoisted_4$6, [
656
- __props.labelPrefixComponent ? (openBlock(), createBlock(resolveDynamicComponent(__props.labelPrefixComponent.component), { key: 0 })) : createCommentVNode("", true),
657
- createElementVNode("div", _hoisted_5$4, [
658
- createElementVNode("div", _hoisted_6$3, [
659
- createVNode(_sfc_main$M, {
660
- text: __props.label,
661
- search: escapedUserInput.value,
662
- class: normalizeClass(["font-semibold", { "sr-only": __props.labelSrOnly }])
663
- }, null, 8, ["text", "search", "class"]),
664
- __props.labelInlineComponent ? (openBlock(), createBlock(resolveDynamicComponent(__props.labelInlineComponent.component), normalizeProps(mergeProps({ key: 0 }, __props.labelInlineComponent.props)), null, 16)) : createCommentVNode("", true),
665
- __props.subLabel && __props.condensed ? (openBlock(), createBlock(_sfc_main$M, {
666
- key: 1,
667
- class: "text-xs text-slate-500",
668
- text: __props.subLabel,
669
- search: escapedUserInput.value
670
- }, null, 8, ["text", "search"])) : createCommentVNode("", true)
671
- ]),
672
- __props.subLabel && !__props.condensed ? (openBlock(), createBlock(_sfc_main$M, {
673
- key: 0,
674
- class: "text-xs text-slate-500",
675
- text: __props.subLabel,
676
- search: escapedUserInput.value
677
- }, null, 8, ["text", "search"])) : createCommentVNode("", true)
678
- ]),
679
- __props.labelSuffixComponent ? (openBlock(), createBlock(resolveDynamicComponent(__props.labelSuffixComponent.component), normalizeProps(mergeProps({ key: 1 }, __props.labelSuffixComponent.props)), null, 16)) : createCommentVNode("", true)
680
- ])
681
- ], 10, _hoisted_3$8)
682
- ], 64)) : (openBlock(), createElementBlock("div", {
683
- key: 1,
684
- class: normalizeClass(["w-full px-4 text-sm font-medium flex items-start gap-3", [
685
- __props.condensed ? "p-2" : "py-3",
686
- __props.disabled ?? "cursor-not-allowed",
687
- !__props.disabled && "cursor-pointer"
688
- ]])
689
- }, [
690
- __props.labelPrefixComponent ? (openBlock(), createBlock(resolveDynamicComponent(__props.labelPrefixComponent.component), normalizeProps(mergeProps({ key: 0 }, __props.labelPrefixComponent.props)), null, 16)) : createCommentVNode("", true),
691
- createElementVNode("div", _hoisted_7$3, [
692
- createElementVNode("div", _hoisted_8$2, [
693
- createVNode(_sfc_main$M, {
694
- text: __props.label,
695
- search: escapedUserInput.value,
696
- class: normalizeClass(["font-semibold", { "text-gray-400": __props.disabled }])
697
- }, null, 8, ["text", "search", "class"]),
698
- createElementVNode("div", _hoisted_9, [
699
- __props.labelInlineComponent ? (openBlock(), createBlock(resolveDynamicComponent(__props.labelInlineComponent.component), normalizeProps(mergeProps({ key: 0 }, __props.labelInlineComponent.props)), null, 16)) : createCommentVNode("", true),
700
- __props.labelSuffixComponent ? (openBlock(), createBlock(resolveDynamicComponent(__props.labelSuffixComponent.component), normalizeProps(mergeProps({ key: 1 }, __props.labelSuffixComponent.props)), null, 16)) : createCommentVNode("", true)
701
- ])
702
- ]),
703
- __props.subLabel && __props.condensed ? (openBlock(), createBlock(_sfc_main$M, {
704
- key: 0,
705
- class: "text-xs text-slate-500",
706
- text: __props.subLabel,
707
- search: escapedUserInput.value
708
- }, null, 8, ["text", "search"])) : createCommentVNode("", true),
709
- __props.subLabel && !__props.condensed ? (openBlock(), createBlock(_sfc_main$M, {
710
- key: 1,
711
- class: "text-xs text-slate-500",
712
- text: __props.subLabel,
713
- search: escapedUserInput.value
714
- }, null, 8, ["text", "search"])) : createCommentVNode("", true)
715
- ])
716
- ], 2))
717
- ], 42, _hoisted_1$p);
718
- };
719
- }
720
- });
721
- const _hoisted_1$o = { class: "flex flex-col rounded-bl rounded-br" };
722
- const _hoisted_2$d = { key: 0 };
723
- const _hoisted_3$7 = {
724
- key: 2,
725
- class: "border-t border-gray-200"
726
- };
727
- const _sfc_main$r = /* @__PURE__ */ defineComponent({
728
- __name: "SelectExtendedOptions",
729
- props: {
730
- model: {},
731
- multiple: { type: Boolean },
732
- condensed: { type: Boolean },
733
- hasLargeDropdown: { type: Boolean },
734
- inputValue: {},
735
- addOnly: { type: Boolean },
736
- options: {}
737
- },
738
- emits: ["value-changed"],
739
- setup(__props, { emit: __emit }) {
740
- const props = __props;
741
- const emit = __emit;
742
- const handleChange = (payload) => emit("value-changed", payload);
743
- const groups = computed(
744
- () => sortedUniqBy(props.options, "group").reduce((acc, option) => option.value === "" ? acc : { ...acc, [option.value]: option.group }, {})
745
- );
746
- const hasNoResults = computed(() => props.options.length === 0);
747
- return (_ctx, _cache) => {
748
- return openBlock(), createElementBlock("div", _hoisted_1$o, [
749
- hasNoResults.value ? (openBlock(), createBlock(_sfc_main$C, {
750
- key: 0,
751
- tag: "div",
752
- "no-spacing": "",
753
- variant: "body-sm",
754
- shade: "lighter",
755
- class: "px-5 py-5"
756
- }, {
757
- default: withCtx(() => [..._cache[0] || (_cache[0] = [
758
- createTextVNode("No results", -1)
759
- ])]),
760
- _: 1
761
- })) : (openBlock(), createElementBlock("ul", {
762
- key: 1,
763
- class: normalizeClass(["list-none overflow-y-auto text-gray-700", [__props.hasLargeDropdown ? "max-h-76" : "max-h-48"]])
764
- }, [
765
- __props.addOnly ? (openBlock(), createElementBlock("div", _hoisted_2$d, [
766
- createVNode(_sfc_main$C, {
767
- tag: "p",
768
- "no-spacing": "",
769
- variant: "body-sm",
770
- shade: "lighter",
771
- class: "px-3 py-2 mt-1"
772
- }, {
773
- default: withCtx(() => [..._cache[1] || (_cache[1] = [
774
- createTextVNode(toDisplayString("You can only select currently unselected options."), -1)
775
- ])]),
776
- _: 1
777
- })
778
- ])) : createCommentVNode("", true),
779
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, ({
780
- label,
781
- subLabel,
782
- value,
783
- checked,
784
- disabled,
785
- labelInlineComponent,
786
- labelSuffixComponent,
787
- labelSrOnly,
788
- labelPrefixComponent,
789
- hidden
790
- }) => {
791
- return openBlock(), createElementBlock(Fragment, { key: value }, [
792
- groups.value[value] ? (openBlock(), createBlock(SelectExtendedOptionsDivider, { key: 0 }, {
793
- default: withCtx(() => [
794
- createTextVNode(toDisplayString(groups.value[value]), 1)
795
- ]),
796
- _: 2
797
- }, 1024)) : createCommentVNode("", true),
798
- !hidden ? (openBlock(), createBlock(_sfc_main$s, {
799
- key: 1,
800
- label,
801
- "sub-label": subLabel,
802
- value,
803
- checked,
804
- disabled,
805
- multiple: __props.multiple,
806
- condensed: __props.condensed,
807
- "label-suffix-component": labelSuffixComponent,
808
- "label-prefix-component": labelPrefixComponent,
809
- "label-inline-component": labelInlineComponent,
810
- "label-sr-only": labelSrOnly,
811
- "input-value": __props.inputValue,
812
- onValueChanged: handleChange
813
- }, null, 8, ["label", "sub-label", "value", "checked", "disabled", "multiple", "condensed", "label-suffix-component", "label-prefix-component", "label-inline-component", "label-sr-only", "input-value"])) : createCommentVNode("", true)
814
- ], 64);
815
- }), 128))
816
- ], 2)),
817
- _ctx.$slots["list-footer-content"] ? (openBlock(), createElementBlock("div", _hoisted_3$7, [
818
- renderSlot(_ctx.$slots, "list-footer-content")
819
- ])) : createCommentVNode("", true)
820
- ]);
821
- };
822
- }
823
- });
824
- const _hoisted_1$n = ["aria-expanded", "aria-controls"];
825
- const _hoisted_2$c = { class: "flex gap-2 items-center" };
826
- const _hoisted_3$6 = { key: 1 };
827
- const _hoisted_4$5 = { class: "flex items-center gap-2" };
828
- const _hoisted_5$3 = {
829
- key: 0,
830
- class: "flex flex-wrap gap-2 mt-2"
831
- };
832
- const _hoisted_6$2 = ["innerHTML"];
833
- const _hoisted_7$2 = ["id"];
834
- const _sfc_main$q = /* @__PURE__ */ defineComponent({
835
- __name: "SelectExtended",
836
- props: {
837
- addOnly: { type: Boolean, default: false },
838
- disabled: { type: Boolean },
839
- label: {},
840
- labelScreenReaderOnly: { type: Boolean },
841
- inputModel: {},
842
- singleModelValue: {},
843
- multiModelValue: {},
844
- options: { default: () => [] },
845
- optionsOrder: { default: () => ["asc", "asc"] },
846
- optionsOrderProperties: { default: () => ["group", "label"] },
847
- required: { type: Boolean, default: false },
848
- rootClass: {},
849
- size: { default: "md" },
850
- withChips: { type: Boolean, default: false },
851
- chipColor: {},
852
- error: {},
853
- hasReset: { type: Boolean },
854
- name: {},
855
- hasLargeDropdown: { type: Boolean, default: false },
856
- showSuffixInClosedInput: { type: Boolean },
857
- showSuffixLabelInInput: { type: Boolean },
858
- showSubLabelInInput: { type: Boolean, default: false },
859
- condensed: { type: Boolean },
860
- form: {},
861
- isInputReadOnly: { type: Boolean, default: true },
862
- textContent: { default: () => ({
863
- placeholderSingleOpen: "Search",
864
- placeholderSingleEmpty: "Select an option",
865
- placeholderMultipleOpen: "Search",
866
- placeholderMultipleEmpty: "Select one or more options",
867
- buttonAddLabel: "Add",
868
- buttonClearLabel: "Reset",
869
- buttonDoneLabel: "Done"
870
- }) }
871
- },
872
- emits: ["update:inputModel", "update:singleModelValue", "update:multiModelValue", "blur", "change", "focus", "add-option"],
873
- setup(__props, { emit: __emit }) {
874
- var _a;
875
- const props = __props;
876
- const emit = __emit;
877
- const instanceProps = (_a = getCurrentInstance()) == null ? void 0 : _a.vnode.props;
878
- const inputModel = useVModel(props, "inputModel", emit);
879
- const singleModel = useVModel(props, "singleModelValue", emit);
880
- const multiModel = useVModel(props, "multiModelValue", emit);
881
- const initialValues = computed(() => {
882
- if (allowsMultipleValues.value) {
883
- return multiModel.value ?? [];
884
- }
885
- return singleModel.value ? [singleModel.value] : [];
886
- });
887
- const unappliedMultiModel = ref(props.multiModelValue ?? []);
888
- const allowsMultipleValues = computed(() => Array.isArray(props.multiModelValue));
889
- const derivedModel = computed({
890
- get: () => {
891
- if (allowsMultipleValues.value) {
892
- return unappliedMultiModel.value ?? [];
893
- }
894
- if (typeof singleModel.value === "string") {
895
- return [singleModel.value];
896
- }
897
- return [];
898
- },
899
- set(value) {
900
- if (allowsMultipleValues.value) {
901
- unappliedMultiModel.value = value;
902
- } else {
903
- singleModel.value = (value == null ? void 0 : value[0]) ?? "";
904
- }
905
- }
906
- });
907
- const isOpen = ref(false);
908
- const isMounted = useIsMounted();
909
- const optionsRef = ref();
910
- const wrapperRef = ref();
911
- const teleportTarget = inject(SEARCH_SELECT_TELEPORT_TARGET);
912
- const getSelectedItems = (selectedValue) => props.options.filter((option) => selectedValue.some((value) => option.value === value));
913
- const selectedItems = computed(() => getSelectedItems(derivedModel.value));
914
- const firstSelectedItem = computed(() => selectedItems.value[0]);
915
- const firstSelectedOption = computed(() => selectedOptions.value[0]);
916
- const hasPrefixComponent = computed(
917
- () => {
918
- var _a2;
919
- return !isOpen.value && !allowsMultipleValues.value && ((_a2 = firstSelectedItem.value) == null ? void 0 : _a2.labelPrefixComponent);
920
- }
921
- );
922
- const hasAddOptionListener = !!(instanceProps == null ? void 0 : instanceProps["onAddOption"]);
923
- const handleAddOption = () => {
924
- emit("add-option");
925
- handleClose();
926
- };
927
- const placeholder = computed(() => {
928
- var _a2, _b, _c, _d;
929
- if (!allowsMultipleValues.value) {
930
- if (firstSelectedItem.value) {
931
- return (_a2 = firstSelectedItem.value) == null ? void 0 : _a2.label;
932
- } else if (selectedItems.value.length === 0) {
933
- return props.textContent.placeholderSingleEmpty;
934
- }
935
- }
936
- if (allowsMultipleValues.value) {
937
- if (selectedItems.value.length === 1) {
938
- return (_b = firstSelectedItem.value) == null ? void 0 : _b.label;
939
- }
940
- if (selectedItems.value.length >= 2) {
941
- return `${(_c = firstSelectedItem.value) == null ? void 0 : _c.label} +${selectedItems.value.length - 1}`;
942
- }
943
- if (selectedItems.value.length === 0) {
944
- return props.textContent.placeholderMultipleEmpty;
945
- }
946
- }
947
- return (_d = firstSelectedOption.value) == null ? void 0 : _d.label;
948
- });
949
- const handleClose = () => {
950
- if (allowsMultipleValues.value) ;
951
- isOpen.value = false;
952
- };
953
- const handleChange = ({
954
- value,
955
- checked
956
- }) => {
957
- let updatedValue;
958
- if (allowsMultipleValues.value) {
959
- updatedValue = checked ? [...derivedModel.value, value] : derivedModel.value.filter((selectedValue) => selectedValue !== value);
960
- } else {
961
- updatedValue = [value];
962
- isOpen.value = false;
963
- }
964
- derivedModel.value = updatedValue;
965
- emit("change");
966
- };
967
- const canReset = computed(() => {
968
- if (props.addOnly && !isEqual(unappliedMultiModel.value, props.multiModelValue)) {
969
- return true;
970
- }
971
- if (!props.addOnly && derivedModel.value.length > 0 && !props.disabled && !(derivedModel.value.length === 1 && derivedModel.value[0] === "")) {
972
- return true;
973
- }
974
- return false;
975
- });
976
- const handleReset = () => {
977
- if (props.addOnly) {
978
- unappliedMultiModel.value = initialValues.value;
979
- inputModel.value = "";
980
- handleClose();
981
- return;
982
- }
983
- derivedModel.value = [];
984
- unappliedMultiModel.value = [];
985
- if (inputModel.value) {
986
- inputModel.value = "";
987
- }
988
- handleClose();
989
- };
990
- const getFocusableElements = () => {
991
- if (!optionsRef.value) return [];
992
- return Array.from(
993
- optionsRef.value.querySelectorAll('li[tabindex="0"], button:not([disabled])')
994
- );
995
- };
996
- const getDeepActiveElement = () => {
997
- var _a2;
998
- let active = document.activeElement;
999
- while ((_a2 = active == null ? void 0 : active.shadowRoot) == null ? void 0 : _a2.activeElement) {
1000
- active = active.shadowRoot.activeElement;
1001
- }
1002
- return active;
1003
- };
1004
- const getInputElement = () => {
1005
- if (!wrapperRef.value) return null;
1006
- let input = wrapperRef.value.querySelector("input");
1007
- if (input) return input;
1008
- const shadowRoots = wrapperRef.value.querySelectorAll("*");
1009
- for (const el of shadowRoots) {
1010
- if (el.shadowRoot) {
1011
- input = el.shadowRoot.querySelector("input");
1012
- if (input) return input;
1013
- }
1014
- }
1015
- return null;
1016
- };
1017
- const handleWrapperKeyDown = (event) => {
1018
- var _a2, _b;
1019
- if (!isOpen.value) return;
1020
- const focusableElements = getFocusableElements();
1021
- const input = getInputElement();
1022
- const activeElement = getDeepActiveElement();
1023
- const isInputFocused = activeElement === input;
1024
- if (!isInputFocused) return;
1025
- switch (event.key) {
1026
- case "ArrowDown":
1027
- if (focusableElements.length > 0) {
1028
- event.preventDefault();
1029
- (_a2 = focusableElements[0]) == null ? void 0 : _a2.focus();
1030
- }
1031
- break;
1032
- case "Tab":
1033
- if (!event.shiftKey && focusableElements.length > 0) {
1034
- event.preventDefault();
1035
- (_b = focusableElements[0]) == null ? void 0 : _b.focus();
1036
- }
1037
- break;
1038
- case "Escape":
1039
- event.preventDefault();
1040
- handleClose();
1041
- break;
1042
- }
1043
- };
1044
- const handleOptionsKeyDown = (event) => {
1045
- var _a2, _b, _c, _d;
1046
- const focusableElements = getFocusableElements();
1047
- const activeElement = getDeepActiveElement();
1048
- const currentIndex = focusableElements.indexOf(activeElement);
1049
- const input = getInputElement();
1050
- switch (event.key) {
1051
- case "ArrowDown":
1052
- if (currentIndex < focusableElements.length - 1) {
1053
- event.preventDefault();
1054
- (_a2 = focusableElements[currentIndex + 1]) == null ? void 0 : _a2.focus();
1055
- }
1056
- break;
1057
- case "ArrowUp":
1058
- event.preventDefault();
1059
- if (currentIndex <= 0) {
1060
- input == null ? void 0 : input.focus();
1061
- } else {
1062
- (_b = focusableElements[currentIndex - 1]) == null ? void 0 : _b.focus();
1063
- }
1064
- break;
1065
- case "Tab":
1066
- if (event.shiftKey) {
1067
- if (currentIndex <= 0) {
1068
- event.preventDefault();
1069
- input == null ? void 0 : input.focus();
1070
- } else {
1071
- event.preventDefault();
1072
- (_c = focusableElements[currentIndex - 1]) == null ? void 0 : _c.focus();
1073
- }
1074
- } else {
1075
- if (currentIndex >= focusableElements.length - 1) {
1076
- event.preventDefault();
1077
- handleClose();
1078
- input == null ? void 0 : input.focus();
1079
- } else {
1080
- event.preventDefault();
1081
- (_d = focusableElements[currentIndex + 1]) == null ? void 0 : _d.focus();
1082
- }
1083
- }
1084
- break;
1085
- case "Escape":
1086
- event.preventDefault();
1087
- handleClose();
1088
- nextTick(() => {
1089
- input == null ? void 0 : input.focus();
1090
- });
1091
- break;
1092
- }
1093
- };
1094
- const handleClickOutside = (event) => {
1095
- const path = event.composedPath();
1096
- if (optionsRef.value && path.includes(optionsRef.value) || wrapperRef.value && path.includes(wrapperRef.value)) {
1097
- return;
1098
- }
1099
- if (isOpen.value) {
1100
- handleClose();
1101
- }
1102
- };
1103
- useEventListener("mousedown", handleClickOutside);
1104
- const { floatingStyles } = useFloating(wrapperRef, optionsRef, {
1105
- whileElementsMounted: autoUpdate,
1106
- placement: "bottom",
1107
- middleware: [
1108
- offset(4),
1109
- flip({
1110
- mainAxis: true
1111
- })
1112
- ]
1113
- });
1114
- const optionsId = uniqueId$1(`search-select-options-`);
1115
- const { width } = useElementSize(wrapperRef);
1116
- const focusInput = () => {
1117
- const input = getInputElement();
1118
- if (input) {
1119
- input.focus();
1120
- }
1121
- };
1122
- const processedOptions = computed(() => {
1123
- return props.options.map((item) => {
1124
- return {
1125
- ...item,
1126
- checked: selectedItems.value.some((selectedItem) => selectedItem.value === item.value),
1127
- disabled: props.disabled || !props.disabled && props.addOnly && !!initialValues.value.includes(item.value)
1128
- };
1129
- });
1130
- });
1131
- const selectedOptions = computed(
1132
- () => processedOptions.value.filter((option) => {
1133
- var _a2;
1134
- return (_a2 = derivedModel.value) == null ? void 0 : _a2.includes(option.value);
1135
- })
1136
- );
1137
- return (_ctx, _cache) => {
1138
- var _a2;
1139
- return openBlock(), createElementBlock(Fragment, null, [
1140
- createElementVNode("div", {
1141
- ref_key: "wrapperRef",
1142
- ref: wrapperRef,
1143
- class: normalizeClass(["relative flex items-end", {
1144
- rootClass: __props.rootClass,
1145
- "z-30": isOpen.value,
1146
- "cursor-text": !__props.disabled
1147
- }]),
1148
- role: "combobox",
1149
- "aria-expanded": isOpen.value,
1150
- "aria-haspopup": true,
1151
- "aria-controls": unref(optionsId),
1152
- onKeydown: handleWrapperKeyDown,
1153
- onClick: focusInput
1154
- }, [
1155
- createVNode(unref(_sfc_main$N), {
1156
- modelValue: unref(inputModel),
1157
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(inputModel) ? inputModel.value = $event : null),
1158
- readonly: __props.isInputReadOnly,
1159
- required: __props.required,
1160
- label: __props.label,
1161
- name: __props.name,
1162
- form: __props.form,
1163
- "label-screen-reader-only": __props.labelScreenReaderOnly,
1164
- placeholder: placeholder.value,
1165
- class: normalizeClass(["grow !outline-none", {
1166
- "placeholder:text-gray-900": !isOpen.value && (!allowsMultipleValues.value && unref(singleModel) || allowsMultipleValues.value && !unref(isEmpty$1)(__props.multiModelValue)),
1167
- "cursor-default": __props.isInputReadOnly
1168
- }]),
1169
- "wrapper-class": {
1170
- "border-transparent border-b-gray-200 focus-within:border-b relative z-10": isOpen.value
1171
- },
1172
- "suffix-class": "border-l-0 pl-0",
1173
- disabled: __props.disabled,
1174
- size: __props.size,
1175
- error: __props.error,
1176
- "prefix-has-border": false,
1177
- "aria-autocomplete": "list",
1178
- onFocus: _cache[1] || (_cache[1] = () => isOpen.value = true),
1179
- onBlur: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("blur"))
1180
- }, createSlots({
1181
- "label-suffix": withCtx(() => [
1182
- renderSlot(_ctx.$slots, "label-suffix")
1183
- ]),
1184
- suffix: withCtx(() => {
1185
- var _a3, _b;
1186
- return [
1187
- createElementVNode("div", _hoisted_4$5, [
1188
- !isOpen.value && !allowsMultipleValues.value && ((_a3 = firstSelectedItem.value) == null ? void 0 : _a3.labelInlineComponent) && (!__props.showSuffixInClosedInput || __props.showSuffixLabelInInput) ? (openBlock(), createBlock(resolveDynamicComponent(firstSelectedItem.value.labelInlineComponent.component), normalizeProps(mergeProps({ key: 0 }, firstSelectedItem.value.labelInlineComponent.props)), null, 16)) : createCommentVNode("", true),
1189
- !isOpen.value && !allowsMultipleValues.value && ((_b = firstSelectedItem.value) == null ? void 0 : _b.labelSuffixComponent) && __props.showSuffixInClosedInput ? (openBlock(), createBlock(resolveDynamicComponent(firstSelectedItem.value.labelSuffixComponent.component), normalizeProps(mergeProps({ key: 1 }, firstSelectedItem.value.labelSuffixComponent.props)), null, 16)) : createCommentVNode("", true),
1190
- !!unref(inputModel) || canReset.value && __props.hasReset ? (openBlock(), createBlock(_sfc_main$O, {
1191
- key: 2,
1192
- icon: "close",
1193
- size: "xs",
1194
- variant: "ghost",
1195
- color: "gray",
1196
- type: "button",
1197
- onClick: handleReset
1198
- })) : createCommentVNode("", true),
1199
- createVNode(_sfc_main$I, {
1200
- icon: "keyboard_arrow_down",
1201
- size: "xs",
1202
- class: normalizeClass(["transition-transform", { "rotate-180": isOpen.value }])
1203
- }, null, 8, ["class"])
1204
- ])
1205
- ];
1206
- }),
1207
- _: 2
1208
- }, [
1209
- __props.showSubLabelInInput && ((_a2 = firstSelectedItem.value) == null ? void 0 : _a2.subLabel) ? {
1210
- name: "input",
1211
- fn: withCtx(() => [
1212
- createElementVNode("div", {
1213
- class: normalizeClass(["pointer-events-none absolute inset-0 bg-white", { "px-4 py-3": __props.size === "xl" }])
1214
- }, [
1215
- createVNode(_sfc_main$C, {
1216
- tag: "span",
1217
- class: "block",
1218
- variant: "body-sm",
1219
- weight: "semibold"
1220
- }, {
1221
- default: withCtx(() => {
1222
- var _a3;
1223
- return [
1224
- createTextVNode(toDisplayString((_a3 = firstSelectedItem.value) == null ? void 0 : _a3.label), 1)
1225
- ];
1226
- }),
1227
- _: 1
1228
- }),
1229
- createVNode(_sfc_main$C, {
1230
- tag: "span",
1231
- class: "block",
1232
- variant: "body-xs",
1233
- shade: "lighter"
1234
- }, {
1235
- default: withCtx(() => {
1236
- var _a3;
1237
- return [
1238
- createTextVNode(toDisplayString((_a3 = firstSelectedItem.value) == null ? void 0 : _a3.subLabel), 1)
1239
- ];
1240
- }),
1241
- _: 1
1242
- })
1243
- ], 2)
1244
- ]),
1245
- key: "0"
1246
- } : void 0,
1247
- _ctx.$slots.tooltip ? {
1248
- name: "tooltip",
1249
- fn: withCtx(() => [
1250
- renderSlot(_ctx.$slots, "tooltip")
1251
- ]),
1252
- key: "1"
1253
- } : void 0,
1254
- hasPrefixComponent.value || _ctx.$slots.prefix ? {
1255
- name: "prefix",
1256
- fn: withCtx(() => {
1257
- var _a3;
1258
- return [
1259
- createElementVNode("div", _hoisted_2$c, [
1260
- _ctx.$slots.prefix ? renderSlot(_ctx.$slots, "prefix", { key: 0 }) : hasPrefixComponent.value && ((_a3 = firstSelectedItem.value) == null ? void 0 : _a3.labelPrefixComponent) ? (openBlock(), createElementBlock("div", _hoisted_3$6, [
1261
- (openBlock(), createBlock(resolveDynamicComponent(firstSelectedItem.value.labelPrefixComponent.component), normalizeProps(guardReactiveProps(firstSelectedItem.value.labelPrefixComponent.props)), null, 16))
1262
- ])) : createCommentVNode("", true)
1263
- ])
1264
- ];
1265
- }),
1266
- key: "2"
1267
- } : void 0,
1268
- _ctx.$slots.helper ? {
1269
- name: "helper",
1270
- fn: withCtx(() => [
1271
- renderSlot(_ctx.$slots, "helper")
1272
- ]),
1273
- key: "3"
1274
- } : void 0
1275
- ]), 1032, ["modelValue", "readonly", "required", "label", "name", "form", "label-screen-reader-only", "placeholder", "wrapper-class", "class", "disabled", "size", "error"])
1276
- ], 42, _hoisted_1$n),
1277
- __props.withChips ? (openBlock(), createElementBlock("div", _hoisted_5$3, [
1278
- (openBlock(true), createElementBlock(Fragment, null, renderList(selectedOptions.value, ({ value, label, disabled }) => {
1279
- return openBlock(), createBlock(_sfc_main$B, {
1280
- key: value,
1281
- removable: !disabled,
1282
- color: disabled ? "dark" : __props.chipColor,
1283
- onRemoved: ($event) => handleChange({ value, checked: false })
1284
- }, {
1285
- default: withCtx(() => [
1286
- createElementVNode("span", { innerHTML: label }, null, 8, _hoisted_6$2)
1287
- ]),
1288
- _: 2
1289
- }, 1032, ["removable", "color", "onRemoved"]);
1290
- }), 128))
1291
- ])) : createCommentVNode("", true),
1292
- unref(isMounted) && unref(teleportTarget) ? (openBlock(), createBlock(Teleport, {
1293
- key: 1,
1294
- to: unref(teleportTarget)
1295
- }, [
1296
- isOpen.value && !__props.disabled ? (openBlock(), createElementBlock("div", {
1297
- key: 0,
1298
- id: unref(optionsId),
1299
- ref_key: "optionsRef",
1300
- ref: optionsRef,
1301
- role: "listbox",
1302
- style: normalizeStyle(unref(floatingStyles)),
1303
- class: "drop-shadow-md bg-white rounded z-70",
1304
- onMouseenter: _cache[3] || (_cache[3] = ($event) => isOpen.value = true),
1305
- onKeydown: handleOptionsKeyDown
1306
- }, [
1307
- createElementVNode("div", {
1308
- class: "rounded pt-0",
1309
- style: normalizeStyle({ width: `${unref(width)}px` })
1310
- }, [
1311
- createVNode(_sfc_main$r, {
1312
- options: processedOptions.value,
1313
- multiple: allowsMultipleValues.value,
1314
- model: derivedModel.value,
1315
- "add-only": __props.addOnly,
1316
- "allows-multiple-values": !!allowsMultipleValues.value,
1317
- condensed: __props.condensed,
1318
- "has-large-dropdown": __props.hasLargeDropdown,
1319
- "input-value": unref(inputModel),
1320
- onValueChanged: handleChange
1321
- }, {
1322
- "list-footer-content": withCtx(() => [
1323
- hasAddOptionListener ? (openBlock(), createBlock(_sfc_main$P, {
1324
- key: 0,
1325
- variant: "ghost",
1326
- class: "w-full",
1327
- type: "button",
1328
- "icon-prefix": "add",
1329
- onClick: handleAddOption
1330
- }, {
1331
- default: withCtx(() => [
1332
- createTextVNode(toDisplayString(__props.textContent.buttonAddLabel), 1)
1333
- ]),
1334
- _: 1
1335
- })) : createCommentVNode("", true),
1336
- allowsMultipleValues.value ? (openBlock(), createElementBlock("div", {
1337
- key: 1,
1338
- class: normalizeClass(["flex justify-between items-center", { "py-2": !_ctx.$slots["list-footer-content"] }])
1339
- }, [
1340
- canReset.value ? (openBlock(), createBlock(_sfc_main$P, {
1341
- key: 0,
1342
- type: "button",
1343
- color: "gray",
1344
- variant: "ghost",
1345
- size: "sm",
1346
- class: "ml-2",
1347
- onClick: handleReset
1348
- }, {
1349
- default: withCtx(() => [
1350
- createTextVNode(toDisplayString(__props.textContent.buttonClearLabel), 1)
1351
- ]),
1352
- _: 1
1353
- })) : createCommentVNode("", true),
1354
- createElementVNode("div", null, [
1355
- renderSlot(_ctx.$slots, "list-footer-content")
1356
- ]),
1357
- createVNode(_sfc_main$P, {
1358
- type: "button",
1359
- size: "sm",
1360
- class: "mr-2",
1361
- "data-testid": unref(DONE_BUTTON_TEST_ID),
1362
- onClick: handleClose
1363
- }, {
1364
- default: withCtx(() => [
1365
- createTextVNode(toDisplayString(__props.textContent.buttonDoneLabel), 1)
1366
- ]),
1367
- _: 1
1368
- }, 8, ["data-testid"])
1369
- ], 2)) : renderSlot(_ctx.$slots, "list-footer-content", { key: 2 })
1370
- ]),
1371
- _: 3
1372
- }, 8, ["options", "multiple", "model", "add-only", "allows-multiple-values", "condensed", "has-large-dropdown", "input-value"])
1373
- ], 4)
1374
- ], 44, _hoisted_7$2)) : createCommentVNode("", true)
1375
- ], 8, ["to"])) : createCommentVNode("", true)
1376
- ], 64);
1377
- };
1378
- }
1379
- });
1380
- const _hoisted_1$m = { class: "flex items-center gap-1.5 text-gray-800" };
1381
- const _sfc_main$p = /* @__PURE__ */ defineComponent({
1382
- __name: "StepInput",
1383
- props: /* @__PURE__ */ mergeModels({
1384
- step: { default: 1 },
1385
- min: { default: 0 },
1386
- max: {},
1387
- initialValue: { default: 1 },
1388
- unitName: {},
1389
- showDelta: { type: Boolean, default: false },
1390
- size: { default: "md" },
1391
- name: {},
1392
- required: { type: Boolean },
1393
- label: {},
1394
- error: {},
1395
- disabled: { type: Boolean, default: false }
1396
- }, {
1397
- "modelValue": { required: true },
1398
- "modelModifiers": {}
1399
- }),
1400
- emits: ["update:modelValue"],
1401
- setup(__props) {
1402
- const props = __props;
1403
- const model = useModel(__props, "modelValue");
1404
- const contentEditableRef = ref(null);
1405
- const computedUnitName = computed(() => {
1406
- if (!props.unitName) return void 0;
1407
- return props.unitName[model.value === 1 ? "singular" : "plural"];
1408
- });
1409
- const handleAdd = () => {
1410
- if (props.max && model.value + props.step > props.max) {
1411
- return;
1412
- }
1413
- model.value += props.step;
1414
- };
1415
- const handleSubstract = () => {
1416
- if (model.value - props.step < props.min) {
1417
- return;
1418
- }
1419
- model.value -= props.step;
1420
- };
1421
- function setContentAndMoveCaretToEnd(content) {
1422
- var _a;
1423
- const el = (_a = contentEditableRef.value) == null ? void 0 : _a.el;
1424
- if (!el) return;
1425
- const value = parseInt(`${content}`);
1426
- model.value = value;
1427
- el.innerText = `${value}`;
1428
- el.focus();
1429
- const range = document.createRange();
1430
- range.selectNodeContents(el);
1431
- range.collapse(false);
1432
- const selection = window.getSelection();
1433
- selection == null ? void 0 : selection.removeAllRanges();
1434
- selection == null ? void 0 : selection.addRange(range);
1435
- }
1436
- const handleInputUpdate = (event) => {
1437
- const target = event.target;
1438
- if (target instanceof HTMLElement) {
1439
- setContentAndMoveCaretToEnd(target.innerText);
1440
- }
1441
- };
1442
- const isIncreaseButtonEnabled = computed(() => {
1443
- if (props.disabled) {
1444
- return false;
1445
- }
1446
- if (props.max) {
1447
- return model.value + props.step < props.max;
1448
- }
1449
- return true;
1450
- });
1451
- const isDecreaseButtonEnabled = computed(() => {
1452
- return props.disabled ? false : model.value - props.step >= props.min;
1453
- });
1454
- function handleFocusContentEditable() {
1455
- var _a;
1456
- const el = (_a = contentEditableRef.value) == null ? void 0 : _a.el;
1457
- if (!el) return;
1458
- el.focus();
1459
- const range = document.createRange();
1460
- range.selectNodeContents(el);
1461
- const selection = window.getSelection();
1462
- selection == null ? void 0 : selection.removeAllRanges();
1463
- selection == null ? void 0 : selection.addRange(range);
1464
- }
1465
- onMounted(() => {
1466
- var _a;
1467
- const el = (_a = contentEditableRef.value) == null ? void 0 : _a.el;
1468
- if (!el) return;
1469
- el.innerText = `${model.value}`;
1470
- });
1471
- watch(
1472
- () => model.value,
1473
- (value) => {
1474
- setContentAndMoveCaretToEnd(value);
1475
- }
1476
- );
1477
- return (_ctx, _cache) => {
1478
- return openBlock(), createBlock(_sfc_main$N, {
1479
- modelValue: model.value,
1480
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
1481
- type: "number",
1482
- class: "[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none text-transparent",
1483
- "prefix-class": {
1484
- "!px-0 w-5": __props.size === "sm",
1485
- "!px-0 w-6": __props.size === "md",
1486
- "!px-0 w-7": __props.size === "lg"
1487
- },
1488
- "suffix-class": {
1489
- "!px-0 w-5": __props.size === "sm",
1490
- "!px-0 w-6": __props.size === "md",
1491
- "!px-0 w-7": __props.size === "lg"
1492
- },
1493
- size: __props.size,
1494
- label: __props.label,
1495
- disabled: __props.disabled,
1496
- name: __props.name,
1497
- required: __props.required
1498
- }, createSlots({
1499
- prefix: withCtx(() => [
1500
- createElementVNode("div", {
1501
- class: "absolute inset-0 flex items-center justify-center",
1502
- onMousedown: handleFocusContentEditable
1503
- }, [
1504
- createElementVNode("div", _hoisted_1$m, [
1505
- createVNode(_sfc_main$C, {
1506
- ref_key: "contentEditableRef",
1507
- ref: contentEditableRef,
1508
- tag: "span",
1509
- variant: __props.size === "sm" ? "body" : "body-lg",
1510
- contenteditable: !__props.disabled,
1511
- class: normalizeClass(["outline-none", { "pointer-events-none select-none": __props.disabled }]),
1512
- weight: "semibold",
1513
- onInput: handleInputUpdate
1514
- }, null, 8, ["variant", "contenteditable", "class"]),
1515
- computedUnitName.value ? (openBlock(), createBlock(_sfc_main$C, {
1516
- key: 0,
1517
- tag: "span",
1518
- shade: "lighter",
1519
- class: "pointer-events-none select-none"
1520
- }, {
1521
- default: withCtx(() => [
1522
- createTextVNode(toDisplayString(" ") + toDisplayString(computedUnitName.value), 1)
1523
- ]),
1524
- _: 1
1525
- })) : createCommentVNode("", true),
1526
- __props.showDelta ? (openBlock(), createBlock(_sfc_main$A, {
1527
- key: 1,
1528
- "old-value": props.initialValue,
1529
- "new-value": model.value,
1530
- class: "ml-0.5 pointer-events-none select-none"
1531
- }, null, 8, ["old-value", "new-value"])) : createCommentVNode("", true)
1532
- ])
1533
- ], 32),
1534
- createVNode(_sfc_main$O, {
1535
- disabled: !isDecreaseButtonEnabled.value,
1536
- type: "button",
1537
- color: "gray",
1538
- variant: "ghost",
1539
- size: "sm",
1540
- class: normalizeClass(["select-none rounded-tr-none rounded-br-none !h-full", { "!w-7": __props.size === "lg", "!w-5": __props.size === "sm", "!w-6": __props.size === "md" }]),
1541
- icon: "remove",
1542
- onMousedown: handleSubstract
1543
- }, null, 8, ["disabled", "class"])
1544
- ]),
1545
- suffix: withCtx(() => [
1546
- createVNode(_sfc_main$O, {
1547
- disabled: !isIncreaseButtonEnabled.value,
1548
- type: "button",
1549
- color: "gray",
1550
- variant: "ghost",
1551
- size: "sm",
1552
- class: normalizeClass(["select-none rounded-tl-none rounded-bl-none !h-full", { "!w-7": __props.size === "lg", "!w-5": __props.size === "sm", "!w-6": __props.size === "md" }]),
1553
- icon: "add",
1554
- onMousedown: handleAdd
1555
- }, null, 8, ["disabled", "class"])
1556
- ]),
1557
- _: 2
1558
- }, [
1559
- _ctx.$slots.helper ? {
1560
- name: "helper",
1561
- fn: withCtx(() => [
1562
- renderSlot(_ctx.$slots, "helper")
1563
- ]),
1564
- key: "0"
1565
- } : void 0
1566
- ]), 1032, ["modelValue", "prefix-class", "suffix-class", "size", "label", "disabled", "name", "required"]);
1567
- };
1568
- }
1569
- });
1570
- function isValidCountryCode(code) {
1571
- return !!countryData.find((item) => item.key === code);
1572
- }
1573
- var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0;
1574
- symbolProto ? symbolProto.toString : void 0;
1575
- function baseToString(value) {
1576
- {
1577
- return value;
1578
- }
1579
- }
1580
- function toString(value) {
1581
- return baseToString(value);
1582
- }
1583
- var mapTag = "[object Map]", setTag = "[object Set]";
1584
- var objectProto = Object.prototype;
1585
- var hasOwnProperty = objectProto.hasOwnProperty;
1586
- function isEmpty(value) {
1587
- if (value == null) {
1588
- return true;
1589
- }
1590
- if (isArrayLike(value) && (isArray(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isTypedArray(value) || isArguments(value))) {
1591
- return !value.length;
1592
- }
1593
- var tag = getTag(value);
1594
- if (tag == mapTag || tag == setTag) {
1595
- return !value.size;
1596
- }
1597
- if (isPrototype(value)) {
1598
- return !baseKeys(value).length;
1599
- }
1600
- for (var key in value) {
1601
- if (hasOwnProperty.call(value, key)) {
1602
- return false;
1603
- }
1604
- }
1605
- return true;
1606
- }
1607
- var idCounter = 0;
1608
- function uniqueId(prefix) {
1609
- var id = ++idCounter;
1610
- return toString(prefix) + id;
1611
- }
1612
- function ownKeys(object, enumerableOnly) {
1613
- var keys = Object.keys(object);
1614
- if (Object.getOwnPropertySymbols) {
1615
- var symbols = Object.getOwnPropertySymbols(object);
1616
- enumerableOnly && (symbols = symbols.filter(function(sym) {
1617
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
1618
- })), keys.push.apply(keys, symbols);
1619
- }
1620
- return keys;
1621
- }
1622
- function _objectSpread2(target) {
1623
- for (var i = 1; i < arguments.length; i++) {
1624
- var source = null != arguments[i] ? arguments[i] : {};
1625
- i % 2 ? ownKeys(Object(source), true).forEach(function(key) {
1626
- _defineProperty(target, key, source[key]);
1627
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
1628
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1629
- });
1630
- }
1631
- return target;
1632
- }
1633
- function _defineProperty(obj, key, value) {
1634
- if (key in obj) {
1635
- Object.defineProperty(obj, key, {
1636
- value,
1637
- enumerable: true,
1638
- configurable: true,
1639
- writable: true
1640
- });
1641
- } else {
1642
- obj[key] = value;
1643
- }
1644
- return obj;
1645
- }
1646
- function isFunction(val) {
1647
- return typeof val === "function";
1648
- }
1649
- function isObject(o) {
1650
- return o !== null && typeof o === "object" && !Array.isArray(o);
1651
- }
1652
- function normalizeValidatorObject(validator) {
1653
- return isFunction(validator.$validator) ? _objectSpread2({}, validator) : {
1654
- $validator: validator
1655
- };
1656
- }
1657
- function unwrapValidatorResponse(result) {
1658
- if (typeof result === "object") return result.$valid;
1659
- return result;
1660
- }
1661
- function unwrapNormalizedValidator(validator) {
1662
- return validator.$validator || validator;
1663
- }
1664
- function withParams($params, $validator) {
1665
- if (!isObject($params)) throw new Error(`[@vuelidate/validators]: First parameter to "withParams" should be an object, provided ${typeof $params}`);
1666
- if (!isObject($validator) && !isFunction($validator)) throw new Error(`[@vuelidate/validators]: Validator must be a function or object with $validator parameter`);
1667
- const validatorObj = normalizeValidatorObject($validator);
1668
- validatorObj.$params = _objectSpread2(_objectSpread2({}, validatorObj.$params || {}), $params);
1669
- return validatorObj;
1670
- }
1671
- function withMessage($message, $validator) {
1672
- if (!isFunction($message) && typeof unref($message) !== "string") throw new Error(`[@vuelidate/validators]: First parameter to "withMessage" should be string or a function returning a string, provided ${typeof $message}`);
1673
- if (!isObject($validator) && !isFunction($validator)) throw new Error(`[@vuelidate/validators]: Validator must be a function or object with $validator parameter`);
1674
- const validatorObj = normalizeValidatorObject($validator);
1675
- validatorObj.$message = $message;
1676
- return validatorObj;
1677
- }
1678
- function withAsync($validator) {
1679
- let $watchTargets = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
1680
- const validatorObj = normalizeValidatorObject($validator);
1681
- return _objectSpread2(_objectSpread2({}, validatorObj), {}, {
1682
- $async: true,
1683
- $watchTargets
1684
- });
1685
- }
1686
- function forEach(validators) {
1687
- return {
1688
- $validator(collection) {
1689
- for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
1690
- others[_key - 1] = arguments[_key];
1691
- }
1692
- return unref(collection).reduce((previous, collectionItem, index) => {
1693
- const collectionEntryResult = Object.entries(collectionItem).reduce((all, _ref) => {
1694
- let [property, $model] = _ref;
1695
- const innerValidators = validators[property] || {};
1696
- const propertyResult = Object.entries(innerValidators).reduce((all2, _ref2) => {
1697
- let [validatorName, currentValidator] = _ref2;
1698
- const validatorFunction = unwrapNormalizedValidator(currentValidator);
1699
- const $response = validatorFunction.call(this, $model, collectionItem, index, ...others);
1700
- const $valid = unwrapValidatorResponse($response);
1701
- all2.$data[validatorName] = $response;
1702
- all2.$data.$invalid = !$valid || !!all2.$data.$invalid;
1703
- all2.$data.$error = all2.$data.$invalid;
1704
- if (!$valid) {
1705
- let $message = currentValidator.$message || "";
1706
- const $params = currentValidator.$params || {};
1707
- if (typeof $message === "function") {
1708
- $message = $message({
1709
- $pending: false,
1710
- $invalid: !$valid,
1711
- $params,
1712
- $model,
1713
- $response
1714
- });
1715
- }
1716
- all2.$errors.push({
1717
- $property: property,
1718
- $message,
1719
- $params,
1720
- $response,
1721
- $model,
1722
- $pending: false,
1723
- $validator: validatorName
1724
- });
1725
- }
1726
- return {
1727
- $valid: all2.$valid && $valid,
1728
- $data: all2.$data,
1729
- $errors: all2.$errors
1730
- };
1731
- }, {
1732
- $valid: true,
1733
- $data: {},
1734
- $errors: []
1735
- });
1736
- all.$data[property] = propertyResult.$data;
1737
- all.$errors[property] = propertyResult.$errors;
1738
- return {
1739
- $valid: all.$valid && propertyResult.$valid,
1740
- $data: all.$data,
1741
- $errors: all.$errors
1742
- };
1743
- }, {
1744
- $valid: true,
1745
- $data: {},
1746
- $errors: {}
1747
- });
1748
- return {
1749
- $valid: previous.$valid && collectionEntryResult.$valid,
1750
- $data: previous.$data.concat(collectionEntryResult.$data),
1751
- $errors: previous.$errors.concat(collectionEntryResult.$errors)
1752
- };
1753
- }, {
1754
- $valid: true,
1755
- $data: [],
1756
- $errors: []
1757
- });
1758
- },
1759
- $message: (_ref3) => {
1760
- let {
1761
- $response
1762
- } = _ref3;
1763
- return $response ? $response.$errors.map((context) => {
1764
- return Object.values(context).map((errors) => errors.map((error) => error.$message)).reduce((a, b) => a.concat(b), []);
1765
- }) : [];
1766
- }
1767
- };
1768
- }
1769
- const req = (value) => {
1770
- value = unref(value);
1771
- if (Array.isArray(value)) return !!value.length;
1772
- if (value === void 0 || value === null) {
1773
- return false;
1774
- }
1775
- if (value === false) {
1776
- return true;
1777
- }
1778
- if (value instanceof Date) {
1779
- return !isNaN(value.getTime());
1780
- }
1781
- if (typeof value === "object") {
1782
- for (let _ in value) return true;
1783
- return false;
1784
- }
1785
- return !!String(value).length;
1786
- };
1787
- const len = (value) => {
1788
- value = unref(value);
1789
- if (Array.isArray(value)) return value.length;
1790
- if (typeof value === "object") {
1791
- return Object.keys(value).length;
1792
- }
1793
- return String(value).length;
1794
- };
1795
- function regex() {
1796
- for (var _len = arguments.length, expr = new Array(_len), _key = 0; _key < _len; _key++) {
1797
- expr[_key] = arguments[_key];
1798
- }
1799
- return (value) => {
1800
- value = unref(value);
1801
- return !req(value) || expr.every((reg) => {
1802
- reg.lastIndex = 0;
1803
- return reg.test(value);
1804
- });
1805
- };
1806
- }
1807
- var common = /* @__PURE__ */ Object.freeze({
1808
- __proto__: null,
1809
- forEach,
1810
- len,
1811
- normalizeValidatorObject,
1812
- regex,
1813
- req,
1814
- unwrap: unref,
1815
- unwrapNormalizedValidator,
1816
- unwrapValidatorResponse,
1817
- withAsync,
1818
- withMessage,
1819
- withParams
1820
- });
1821
- regex(/^[a-zA-Z]*$/);
1822
- regex(/^[a-zA-Z0-9]*$/);
1823
- regex(/^\d*(\.\d+)?$/);
1824
- const emailRegex = /^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i;
1825
- regex(emailRegex);
1826
- const urlRegex = /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i;
1827
- regex(urlRegex);
1828
- regex(/(^[0-9]*$)|(^-[0-9]+$)/);
1829
- regex(/^[-]?\d*(\.\d+)?$/);
1830
- const taxIdMap = {
1831
- AT: {
1832
- regex: /^ATU\d{8}$/,
1833
- prefix: "AT",
1834
- example: "ATU12345678"
1835
- },
1836
- BE: {
1837
- regex: /^BE0?\d{9}$/,
1838
- prefix: "BE",
1839
- example: "BE0123456789"
1840
- },
1841
- BG: {
1842
- regex: /^BG\d{9,10}$/,
1843
- prefix: "BG",
1844
- example: "BG123456789"
1845
- },
1846
- HR: {
1847
- regex: /^HR\d{11}$/,
1848
- prefix: "HR",
1849
- example: "HR12345678901"
1850
- },
1851
- CY: {
1852
- regex: /^CY\d{8}[A-Z]$/,
1853
- prefix: "CY",
1854
- example: "CY12345678X"
1855
- },
1856
- CZ: {
1857
- regex: /^CZ\d{8,10}$/,
1858
- prefix: "CZ",
1859
- example: "CZ12345678"
1860
- },
1861
- DE: {
1862
- regex: /^DE\d{9}$/,
1863
- prefix: "DE",
1864
- example: "DE123456789"
1865
- },
1866
- DK: {
1867
- regex: /^DK\d{8}$/,
1868
- prefix: "DK",
1869
- example: "DK12345678"
1870
- },
1871
- EE: {
1872
- regex: /^EE\d{9}$/,
1873
- prefix: "EE",
1874
- example: "EE123456789"
1875
- },
1876
- GR: {
1877
- regex: /^(EL|GR)\d{9}$/,
1878
- prefix: "GR",
1879
- example: "GR123456789"
1880
- },
1881
- ES: {
1882
- regex: /^ES[A-Z0-9]\d{7}[A-Z0-9]$/,
1883
- prefix: "ES",
1884
- example: "ESX1234567X"
1885
- },
1886
- FI: {
1887
- regex: /^FI\d{8}$/,
1888
- prefix: "FI",
1889
- example: "FI12345678"
1890
- },
1891
- FR: {
1892
- regex: /^FR[0-9A-Z]{2}\d{9}$/,
1893
- prefix: "FR",
1894
- example: "FRXX123456789"
1895
- },
1896
- HU: {
1897
- regex: /^HU\d{8}$/,
1898
- prefix: "HU",
1899
- example: "HU12345678"
1900
- },
1901
- IE: {
1902
- regex: /^IE[0-9A-Z]{8,9}$/,
1903
- prefix: "IE",
1904
- example: "IE1234567A"
1905
- },
1906
- IS: {
1907
- regex: /^IS\d{5}$/,
1908
- prefix: "IS",
1909
- example: "IS12345"
1910
- },
1911
- IT: {
1912
- regex: /^IT\d{11}$/,
1913
- prefix: "IT",
1914
- example: "IT12345678901"
1915
- },
1916
- LT: {
1917
- regex: /^LT(\d{9}|\d{12})$/,
1918
- prefix: "LT",
1919
- example: "LT123456789 or LT123456789012"
1920
- },
1921
- LU: {
1922
- regex: /^LU\d{8}$/,
1923
- prefix: "LU",
1924
- example: "LU12345678"
1925
- },
1926
- LV: {
1927
- regex: /^LV\d{11}$/,
1928
- prefix: "LV",
1929
- example: "LV12345678901"
1930
- },
1931
- ME: {
1932
- regex: /^ME\d{9}$/,
1933
- prefix: "ME",
1934
- example: "ME123456789"
1935
- },
1936
- MT: {
1937
- regex: /^MT\d{8}$/,
1938
- prefix: "MT",
1939
- example: "MT12345678"
1940
- },
1941
- NL: {
1942
- regex: /^NL\d{9}B\d{2}$/,
1943
- prefix: "NL",
1944
- example: "NL123456789B01"
1945
- },
1946
- PL: {
1947
- regex: /^PL\d{10}$/,
1948
- prefix: "PL",
1949
- example: "PL1234567890"
1950
- },
1951
- PT: {
1952
- regex: /^PT\d{9}$/,
1953
- prefix: "PT",
1954
- example: "PT123456789"
1955
- },
1956
- RO: {
1957
- regex: /^RO\d{2,10}$/,
1958
- prefix: "RO",
1959
- example: "RO1234567890"
1960
- },
1961
- RU: {
1962
- regex: /^RU(\d{9}|\d{10}|\d{12})$/,
1963
- prefix: "RU",
1964
- example: "RU123456789 or RU1234567890 or RU123456789012"
1965
- },
1966
- SE: {
1967
- regex: /^SE\d{10}01$/,
1968
- prefix: "SE",
1969
- example: "SE123456789001"
1970
- },
1971
- SI: {
1972
- regex: /^SI\d{8}$/,
1973
- prefix: "SI",
1974
- example: "SI12345678"
1975
- },
1976
- SK: {
1977
- regex: /^SK\d{10}$/,
1978
- prefix: "SK",
1979
- example: "SK1234567890"
1980
- },
1981
- CH: {
1982
- regex: /^CHE\d{9}(MWST|TVA|IVA)?$/,
1983
- prefix: "CHE",
1984
- example: "CHE123456789MWST"
1985
- },
1986
- NO: {
1987
- regex: /^NO\d{9}MVA$/,
1988
- prefix: "NO",
1989
- example: "NO123456789MVA"
1990
- },
1991
- GB: {
1992
- regex: /^GB(\d{9}|\d{12}|GD\d{3}|HA\d{3})$/,
1993
- prefix: "GB",
1994
- example: "GB123456789"
1995
- },
1996
- XI: {
1997
- regex: /^XI(\d{9}|\d{12})$/,
1998
- prefix: "XI",
1999
- example: "XI123456789"
2000
- }
2001
- };
2002
- const taxIdValidator = (value) => {
2003
- if (!value || typeof value !== "string" || value.trim() === "") {
2004
- return true;
2005
- }
2006
- return Object.values(taxIdMap).some((entry) => entry.regex.test(value));
2007
- };
2008
- const getTaxIdMessage = ({ $model }) => {
2009
- if (!$model || typeof $model !== "string" || $model.trim() === "") {
2010
- return "";
2011
- }
2012
- const intl = inject(I18N_INJECTION_KEY, null);
2013
- if (!intl) {
2014
- return "Invalid tax ID";
2015
- }
2016
- const { formatMessage } = intl;
2017
- const matchingEntry = Object.values(taxIdMap).find(
2018
- (entry) => $model.toUpperCase().startsWith(entry.prefix.toUpperCase())
2019
- );
2020
- if (matchingEntry) {
2021
- return formatMessage(
2022
- {
2023
- defaultMessage: "Invalid tax ID format. Example: {example}",
2024
- id: "form_validation.tax_id.invalid_format",
2025
- description: "Error message when tax ID format is invalid but prefix matches"
2026
- },
2027
- { example: matchingEntry.example }
2028
- );
2029
- }
2030
- return formatMessage({
2031
- defaultMessage: "Invalid tax ID",
2032
- id: "taxId.invalid",
2033
- description: "Error message when tax ID is invalid"
2034
- });
2035
- };
2036
- const taxId = common.withMessage(getTaxIdMessage, taxIdValidator);
1
+ import { ref, computed, onMounted, toRaw, watch, defineComponent, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, createTextVNode, toDisplayString, useModel, createElementBlock, withModifiers, Fragment, createCommentVNode, createSlots, normalizeClass, mergeModels, renderSlot, renderList, toRef, nextTick, withDirectives, withKeys, vShow, defineAsyncComponent } from "vue";
2
+ import { U as taxId, k as isEqual, V as convertDateRangeToTimePeriod, H as useValidation, J as objectDiff, W as isEmpty, u as useIntl, X as _sfc_main$q, _ as _sfc_main$r, Y as isEUCountry, Z as isValidCountryCode, $ as getCountryNameByCode, b as _sfc_main$s, M as _sfc_main$t, N as _sfc_main$u, e as _sfc_main$v, a0 as _sfc_main$w, O as _sfc_main$x, a1 as _sfc_main$y, a2 as _sfc_main$z, a3 as _sfc_main$A, a4 as TooltipContent, a5 as _sfc_main$B, a6 as formatBillingPeriod, x as formatAmount, a7 as _sfc_main$D, a8 as useTimePeriod, f as _sfc_main$E, a9 as _sfc_main$G, aa as _sfc_main$H, ab as _sfc_main$I, l as _sfc_main$J, D as _sfc_main$L, ac as _sfc_main$M, ad as usePricingItem, ae as _sfc_main$N, af as _sfc_main$O, ag as uniqueId, B as _sfc_main$P } from "../../vendor-ui-C0K3osvz.mjs";
3
+ import { a as useLogger, _ as _sfc_main$Q, d as defineCustomElement, g as getComponentName } from "../../component-Djrf1L-Z.mjs";
4
+ import { c as createSubscriptionsService } from "../../subscriptions-ClGIr_aS.mjs";
5
+ import { A as ApiStatus } from "../../ApiStatus-CyNDp_op.mjs";
6
+ import { c as createInvoicesService } from "../../invoices-DIYPN2j_.mjs";
7
+ import { a as requiredIf, r as required, e as email } from "../../index-CzL1ZcGi.mjs";
8
+ import { u as useWatchDebounced } from "../../useWatchDebounced-D1xuIX6_.mjs";
9
+ import { c as createPaymentMethodsService } from "../../paymentMethods-67b3UlTZ.mjs";
10
+ import { u as useService } from "../../useService-BsSEI8DZ.mjs";
11
+ import { u as usePortal } from "../../usePortal-cmE08vYs.mjs";
12
+ import { c as createCustomerService } from "../../customer-B31QzznT.mjs";
13
+ import { _ as _sfc_main$C, e as getAdyenExpressCheckoutConfiguration, c as transformObjectToAdyenObject, d as createReturnUrl, s as safeUrlRedirect } from "../../adyen-Bwewy3HC.mjs";
14
+ import { _ as _sfc_main$F } from "../../PricingGroupContent.vue_vue_type_script_setup_true_lang-BChVMzCj.mjs";
15
+ import { u as useViewport } from "../../useViewport-Bu0cyeSi.mjs";
16
+ import { _ as _sfc_main$K } from "../../Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs";
17
+ import { c as createPaymentsService } from "../../payments-Dq6R37Fz.mjs";
18
+ import { C as ContentWithAsideLayout } from "../../ContentWithAsideLayout-DhfUkZZg.mjs";
2037
19
  function getFirstPricingPlanScheduleOfType({
2038
20
  pricingPlanScheduleInfos,
2039
21
  type
@@ -2056,12 +38,12 @@ function getPricingItemConfigMetaById({
2056
38
  (_a3 = item.billing_period_configs) == null ? void 0 : _a3.forEach((billingConfig) => {
2057
39
  var _a4;
2058
40
  (_a4 = billingConfig.configs) == null ? void 0 : _a4.forEach((config) => {
2059
- var _a5, _b2, _c2;
41
+ var _a5, _b2, _c2, _d;
2060
42
  if (config.id) {
2061
- const currency = (_c2 = (_b2 = (_a5 = config.bands) == null ? void 0 : _a5.find((band) => {
43
+ const currency = (_d = (_c2 = (_b2 = (_a5 = config.details) == null ? void 0 : _a5.bands) == null ? void 0 : _b2.find((band) => {
2062
44
  var _a6;
2063
45
  return (_a6 = band.amount) == null ? void 0 : _a6.currency;
2064
- })) == null ? void 0 : _b2.amount) == null ? void 0 : _c2.currency;
46
+ })) == null ? void 0 : _c2.amount) == null ? void 0 : _d.currency;
2065
47
  metaById.set(config.id, {
2066
48
  ...currency && { currency },
2067
49
  billingPeriod: billingConfig.billing_period
@@ -2070,12 +52,12 @@ function getPricingItemConfigMetaById({
2070
52
  });
2071
53
  });
2072
54
  (_b = item.configs) == null ? void 0 : _b.forEach((config) => {
2073
- var _a4, _b2, _c2;
55
+ var _a4, _b2, _c2, _d;
2074
56
  if (config.id) {
2075
- const currency = (_c2 = (_b2 = (_a4 = config.bands) == null ? void 0 : _a4.find((band) => {
57
+ const currency = (_d = (_c2 = (_b2 = (_a4 = config.details) == null ? void 0 : _a4.bands) == null ? void 0 : _b2.find((band) => {
2076
58
  var _a5;
2077
59
  return (_a5 = band.amount) == null ? void 0 : _a5.currency;
2078
- })) == null ? void 0 : _b2.amount) == null ? void 0 : _c2.currency;
60
+ })) == null ? void 0 : _c2.amount) == null ? void 0 : _d.currency;
2079
61
  metaById.set(config.id, {
2080
62
  ...currency && { currency }
2081
63
  });
@@ -2404,6 +386,7 @@ const EMPTY_LEGAL_ENTITY_NAME = "preview";
2404
386
  const EMPTY_COUNTRY = "NL";
2405
387
  const useInvoicePreview = () => {
2406
388
  const { getInvoicePreview } = createInvoicesService();
389
+ const logger = useLogger();
2407
390
  const trialPeriod = ref();
2408
391
  const trialInvoicePreview = ref();
2409
392
  const invoicePreview = ref();
@@ -2501,7 +484,7 @@ const useInvoicePreview = () => {
2501
484
  }
2502
485
  };
2503
486
  const cachedPayload = cachedPreviewPayloads.value[periodKey];
2504
- if (cachedPayload && isEqual$1(payload, cachedPayload)) {
487
+ if (cachedPayload && isEqual(payload, cachedPayload)) {
2505
488
  return { periodKey, response: void 0 };
2506
489
  }
2507
490
  cachedPreviewPayloads.value = {
@@ -2547,6 +530,7 @@ const useInvoicePreview = () => {
2547
530
  invoicePreview.value = updatedPreviews[selectedPeriodKey];
2548
531
  } catch (error) {
2549
532
  status.value = ApiStatus.Failed;
533
+ logger.error("INVOICE_PREVIEW_FAILED", "Failed to load invoice preview", {}, error);
2550
534
  throw error;
2551
535
  } finally {
2552
536
  status.value = ApiStatus.Done;
@@ -2592,7 +576,7 @@ function useCheckoutForm({
2592
576
  const updateInitialState = (state) => {
2593
577
  const newState = getInitialState({ ...form.value, ...state });
2594
578
  form.value = newState;
2595
- initialFormState.value = cloneDeep(newState);
579
+ initialFormState.value = structuredClone(toRaw(newState));
2596
580
  };
2597
581
  const requiredFields = computed(
2598
582
  () => getRequiredFieldsForCountry(form.value.country)
@@ -2643,7 +627,7 @@ function useCheckoutForm({
2643
627
  onMounted(async () => {
2644
628
  await getCountryFromGeoLocationService(initialState == null ? void 0 : initialState.country);
2645
629
  });
2646
- watchDebounced(() => cloneDeep(form.value), handleFormChange, {
630
+ useWatchDebounced(() => structuredClone(toRaw(form.value)), handleFormChange, {
2647
631
  debounce: 200
2648
632
  });
2649
633
  return {
@@ -2681,7 +665,11 @@ const usePaymentMethodOptions = () => {
2681
665
  const cachedPayload = ref();
2682
666
  const { getPaymentMethodOptions } = createPaymentMethodsService();
2683
667
  const initialValue = [];
2684
- const { data: paymentMethodOptions, execute, isPending } = useService({
668
+ const {
669
+ data: paymentMethodOptions,
670
+ execute,
671
+ isPending
672
+ } = useService({
2685
673
  initialValue,
2686
674
  service: getPaymentMethodOptions
2687
675
  });
@@ -2695,7 +683,7 @@ const usePaymentMethodOptions = () => {
2695
683
  country,
2696
684
  amount
2697
685
  };
2698
- if (isEqual$1(payload, cachedPayload.value)) {
686
+ if (isEqual(payload, cachedPayload.value)) {
2699
687
  return;
2700
688
  }
2701
689
  cachedPayload.value = payload;
@@ -3023,7 +1011,7 @@ function useCheckoutView({
3023
1011
  } catch {
3024
1012
  }
3025
1013
  });
3026
- watchOnce(shouldLoadPaymentMethodOptions, (shouldLoad) => {
1014
+ watch(shouldLoadPaymentMethodOptions, (shouldLoad) => {
3027
1015
  if (shouldLoad) {
3028
1016
  void loadPaymentMethodOptions({
3029
1017
  subscriptionId: subscription.value.id,
@@ -3031,7 +1019,7 @@ function useCheckoutView({
3031
1019
  amount: amount.value
3032
1020
  });
3033
1021
  }
3034
- });
1022
+ }, { once: true });
3035
1023
  return {
3036
1024
  invoicePreview: invoicePreview.invoicePreview,
3037
1025
  invoicePreviewByBillingPeriod: invoicePreview.invoicePreviewByBillingPeriod,
@@ -3053,11 +1041,11 @@ function useCheckoutView({
3053
1041
  function usePromotionCode({
3054
1042
  checkoutForm,
3055
1043
  updateInvoicePreviewOnBillingInformationChange,
3056
- logger,
3057
1044
  formatErrorMessage,
3058
1045
  onInvalidPromotionCode,
3059
1046
  onApplyError
3060
1047
  }) {
1048
+ const logger = useLogger();
3061
1049
  const isPromotionCodePending = ref(false);
3062
1050
  const promotionCodeErrorMessage = ref(null);
3063
1051
  const setErrorMessage = (action, error) => {
@@ -3079,7 +1067,7 @@ function usePromotionCode({
3079
1067
  promotionCode: normalizedCode
3080
1068
  });
3081
1069
  } catch (error) {
3082
- logger == null ? void 0 : logger.capture(error, {
1070
+ logger.capture(error, {
3083
1071
  code: "PROMOTION_CODE_APPLY_FAILED",
3084
1072
  message: "Failed to apply promotion code"
3085
1073
  });
@@ -3105,7 +1093,7 @@ function usePromotionCode({
3105
1093
  try {
3106
1094
  await updateInvoicePreviewOnBillingInformationChange({});
3107
1095
  } catch (error) {
3108
- logger == null ? void 0 : logger.capture(error, {
1096
+ logger.capture(error, {
3109
1097
  code: "PROMOTION_CODE_REMOVE_FAILED",
3110
1098
  message: "Failed to remove promotion code"
3111
1099
  });
@@ -3126,8 +1114,8 @@ function usePromotionCode({
3126
1114
  function isFieldError(error) {
3127
1115
  return typeof error === "object" && error !== null && "field" in error;
3128
1116
  }
3129
- const _hoisted_1$l = { class: "flex items-center gap-2" };
3130
- const _sfc_main$o = /* @__PURE__ */ defineComponent({
1117
+ const _hoisted_1$m = { class: "flex items-center gap-2" };
1118
+ const _sfc_main$p = /* @__PURE__ */ defineComponent({
3131
1119
  __name: "TaxIDCheckNotice",
3132
1120
  props: {
3133
1121
  taxIdValidationResult: { type: Object }
@@ -3141,22 +1129,22 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
3141
1129
  const taxIdValidationMessage = computed(() => {
3142
1130
  return isTaxIdValid.value ? formatMessage({
3143
1131
  defaultMessage: "VAT number is valid.",
3144
- id: "damFt1",
1132
+ id: "tax_check.valid_vat_number",
3145
1133
  description: "The message shown when the VAT number is valid"
3146
1134
  }) : formatMessage({
3147
1135
  defaultMessage: "VAT number is invalid.",
3148
- id: "gR9xe+",
1136
+ id: "tax_check.invalid_vat_number",
3149
1137
  description: "The message shown when the VAT number is invalid"
3150
1138
  });
3151
1139
  });
3152
1140
  return (_ctx, _cache) => {
3153
- return openBlock(), createBlock(unref(_sfc_main$K), {
1141
+ return openBlock(), createBlock(unref(_sfc_main$q), {
3154
1142
  type: isTaxIdValid.value ? "success" : "danger",
3155
1143
  icon: false
3156
1144
  }, {
3157
1145
  default: withCtx(() => [
3158
- createElementVNode("div", _hoisted_1$l, [
3159
- createVNode(unref(_sfc_main$C), { variant: "body-xs" }, {
1146
+ createElementVNode("div", _hoisted_1$m, [
1147
+ createVNode(unref(_sfc_main$r), { variant: "body-xs" }, {
3160
1148
  default: withCtx(() => [
3161
1149
  createTextVNode(toDisplayString(taxIdValidationMessage.value), 1)
3162
1150
  ]),
@@ -3221,16 +1209,16 @@ function useTaxIDValidationCheck(form) {
3221
1209
  isSelectedCountryEU
3222
1210
  };
3223
1211
  }
3224
- const _hoisted_1$k = { class: "grid grid-cols-1 gap-1" };
3225
- const _hoisted_2$b = { class: "grid grid-cols-1 gap-2" };
3226
- const _hoisted_3$5 = { key: 0 };
3227
- const _hoisted_4$4 = { class: "mt-2 flex flex-col gap-3" };
3228
- const _hoisted_5$2 = { class: "grid grid-cols-3 gap-2" };
3229
- const _hoisted_6$1 = { class: "flex grow flex-col" };
1212
+ const _hoisted_1$l = { class: "grid grid-cols-1 gap-1" };
1213
+ const _hoisted_2$d = { class: "grid grid-cols-1 gap-2" };
1214
+ const _hoisted_3$7 = { key: 0 };
1215
+ const _hoisted_4$5 = { class: "mt-2 flex flex-col gap-3" };
1216
+ const _hoisted_5$4 = { class: "grid grid-cols-3 gap-2" };
1217
+ const _hoisted_6$2 = { class: "flex grow flex-col" };
3230
1218
  const _hoisted_7$1 = { key: 0 };
3231
1219
  const _hoisted_8$1 = { class: "mt-4 grid grid-cols-1 gap-3" };
3232
1220
  const FORM_ID = "checkout-form";
3233
- const _sfc_main$n = /* @__PURE__ */ defineComponent({
1221
+ const _sfc_main$o = /* @__PURE__ */ defineComponent({
3234
1222
  __name: "CheckoutForm",
3235
1223
  props: /* @__PURE__ */ mergeModels({
3236
1224
  validation: { type: null },
@@ -3283,8 +1271,8 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
3283
1271
  id: FORM_ID,
3284
1272
  onSubmit: _cache[12] || (_cache[12] = withModifiers(($event) => _ctx.$emit("submit", model.value), ["prevent"]))
3285
1273
  }, [
3286
- createElementVNode("div", _hoisted_1$k, [
3287
- createVNode(unref(_sfc_main$Q), {
1274
+ createElementVNode("div", _hoisted_1$l, [
1275
+ createVNode(unref(_sfc_main$s), {
3288
1276
  title: unref($t)({
3289
1277
  defaultMessage: "Customer information",
3290
1278
  id: "checkout.contact_information_block.title",
@@ -3292,9 +1280,9 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
3292
1280
  })
3293
1281
  }, {
3294
1282
  default: withCtx(() => [
3295
- createElementVNode("div", _hoisted_2$b, [
1283
+ createElementVNode("div", _hoisted_2$d, [
3296
1284
  __props.readOnly ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
3297
- createVNode(unref(_sfc_main$C), {
1285
+ createVNode(unref(_sfc_main$r), {
3298
1286
  variant: "body",
3299
1287
  tag: "span",
3300
1288
  weight: "semibold",
@@ -3305,7 +1293,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
3305
1293
  ]),
3306
1294
  _: 1
3307
1295
  }),
3308
- createVNode(unref(_sfc_main$C), {
1296
+ createVNode(unref(_sfc_main$r), {
3309
1297
  variant: "body-sm",
3310
1298
  tag: "span",
3311
1299
  shade: "lighter",
@@ -3317,7 +1305,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
3317
1305
  _: 1
3318
1306
  })
3319
1307
  ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
3320
- createVNode(unref(_sfc_main$N), {
1308
+ createVNode(unref(_sfc_main$t), {
3321
1309
  modelValue: model.value.email,
3322
1310
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value.email = $event),
3323
1311
  required: "",
@@ -3336,7 +1324,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
3336
1324
  }) + getOptionalSuffix("email"),
3337
1325
  error: __props.validation.value.email.$errors
3338
1326
  }, null, 8, ["modelValue", "disabled", "label", "placeholder", "error"]),
3339
- createVNode(unref(_sfc_main$R), {
1327
+ createVNode(unref(_sfc_main$u), {
3340
1328
  "single-model-value": country.value,
3341
1329
  "onUpdate:singleModelValue": _cache[3] || (_cache[3] = ($event) => country.value = $event),
3342
1330
  required: "",
@@ -3349,7 +1337,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
3349
1337
  error: __props.validation.value.country.$errors
3350
1338
  }, {
3351
1339
  "label-suffix": withCtx(() => [
3352
- !showBillingDetails.value && !__props.isBillingInformationMandatory ? (openBlock(), createBlock(unref(_sfc_main$P), {
1340
+ !showBillingDetails.value && !__props.isBillingInformationMandatory ? (openBlock(), createBlock(unref(_sfc_main$v), {
3353
1341
  key: 0,
3354
1342
  size: "xs",
3355
1343
  variant: "ghost",
@@ -3366,7 +1354,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
3366
1354
  ]),
3367
1355
  _: 1
3368
1356
  })) : createCommentVNode("", true),
3369
- showBillingDetails.value && !__props.isBillingInformationMandatory ? (openBlock(), createBlock(unref(_sfc_main$P), {
1357
+ showBillingDetails.value && !__props.isBillingInformationMandatory ? (openBlock(), createBlock(unref(_sfc_main$v), {
3370
1358
  key: 1,
3371
1359
  size: "sm",
3372
1360
  variant: "ghost",
@@ -3388,11 +1376,11 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
3388
1376
  }, 8, ["single-model-value", "label", "error"])
3389
1377
  ], 64))
3390
1378
  ]),
3391
- createVNode(unref(_sfc_main$G), null, {
1379
+ createVNode(unref(_sfc_main$w), null, {
3392
1380
  default: withCtx(() => [
3393
- showBillingDetails.value || __props.isBillingInformationMandatory ? (openBlock(), createElementBlock("div", _hoisted_3$5, [
3394
- createElementVNode("div", _hoisted_4$4, [
3395
- createVNode(unref(_sfc_main$N), {
1381
+ showBillingDetails.value || __props.isBillingInformationMandatory ? (openBlock(), createElementBlock("div", _hoisted_3$7, [
1382
+ createElementVNode("div", _hoisted_4$5, [
1383
+ createVNode(unref(_sfc_main$t), {
3396
1384
  modelValue: model.value.addressLine1,
3397
1385
  "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => model.value.addressLine1 = $event),
3398
1386
  name: "address_line_1",
@@ -3409,7 +1397,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
3409
1397
  required: "",
3410
1398
  error: __props.validation.value.addressLine1.$errors
3411
1399
  }, null, 8, ["modelValue", "label", "placeholder", "error"]),
3412
- createVNode(unref(_sfc_main$N), {
1400
+ createVNode(unref(_sfc_main$t), {
3413
1401
  modelValue: model.value.addressLine2,
3414
1402
  "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => model.value.addressLine2 = $event),
3415
1403
  name: "address_line_2",
@@ -3419,8 +1407,8 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
3419
1407
  description: "Address line 2 of the customer address in the checkout form"
3420
1408
  }) + getOptionalSuffix("addressLine2")
3421
1409
  }, null, 8, ["modelValue", "placeholder"]),
3422
- createElementVNode("div", _hoisted_5$2, [
3423
- createVNode(unref(_sfc_main$N), {
1410
+ createElementVNode("div", _hoisted_5$4, [
1411
+ createVNode(unref(_sfc_main$t), {
3424
1412
  modelValue: model.value.postalCode,
3425
1413
  "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => model.value.postalCode = $event),
3426
1414
  name: "postal_code",
@@ -3431,7 +1419,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
3431
1419
  }) + getOptionalSuffix("postalCode"),
3432
1420
  error: __props.validation.value.addressLine1.$errors
3433
1421
  }, null, 8, ["modelValue", "placeholder", "error"]),
3434
- createVNode(unref(_sfc_main$N), {
1422
+ createVNode(unref(_sfc_main$t), {
3435
1423
  modelValue: model.value.city,
3436
1424
  "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => model.value.city = $event),
3437
1425
  name: "city",
@@ -3441,7 +1429,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
3441
1429
  description: "City of the customer address in the checkout form"
3442
1430
  }) + getOptionalSuffix("city")
3443
1431
  }, null, 8, ["modelValue", "placeholder"]),
3444
- createVNode(unref(_sfc_main$N), {
1432
+ createVNode(unref(_sfc_main$t), {
3445
1433
  modelValue: model.value.state,
3446
1434
  "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => model.value.state = $event),
3447
1435
  name: "state",
@@ -3461,9 +1449,9 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
3461
1449
  ]),
3462
1450
  _: 1
3463
1451
  }, 8, ["title"]),
3464
- !__props.readOnly ? (openBlock(), createBlock(unref(_sfc_main$Q), { key: 0 }, {
1452
+ !__props.readOnly ? (openBlock(), createBlock(unref(_sfc_main$s), { key: 0 }, {
3465
1453
  default: withCtx(() => [
3466
- createVNode(unref(_sfc_main$S), {
1454
+ createVNode(unref(_sfc_main$x), {
3467
1455
  modelValue: companyPurchaseModel.value,
3468
1456
  "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => companyPurchaseModel.value = $event),
3469
1457
  "no-spacing": "",
@@ -3471,8 +1459,8 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
3471
1459
  class: "!flex"
3472
1460
  }, {
3473
1461
  "inline-label": withCtx(() => [
3474
- createElementVNode("div", _hoisted_6$1, [
3475
- createVNode(unref(_sfc_main$C), { tag: "span" }, {
1462
+ createElementVNode("div", _hoisted_6$2, [
1463
+ createVNode(unref(_sfc_main$r), { tag: "span" }, {
3476
1464
  default: withCtx(() => [
3477
1465
  createTextVNode(toDisplayString(unref($t)({
3478
1466
  defaultMessage: "Company purchase",
@@ -3482,7 +1470,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
3482
1470
  ]),
3483
1471
  _: 1
3484
1472
  }),
3485
- createVNode(unref(_sfc_main$C), {
1473
+ createVNode(unref(_sfc_main$r), {
3486
1474
  tag: "span",
3487
1475
  variant: "body-xs",
3488
1476
  shade: "lighter"
@@ -3500,11 +1488,11 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
3500
1488
  ]),
3501
1489
  _: 1
3502
1490
  }, 8, ["modelValue"]),
3503
- createVNode(unref(_sfc_main$G), null, {
1491
+ createVNode(unref(_sfc_main$w), null, {
3504
1492
  default: withCtx(() => [
3505
1493
  isCompanyPurchase.value ? (openBlock(), createElementBlock("div", _hoisted_7$1, [
3506
1494
  createElementVNode("div", _hoisted_8$1, [
3507
- createVNode(unref(_sfc_main$N), {
1495
+ createVNode(unref(_sfc_main$t), {
3508
1496
  modelValue: model.value.companyLegalName,
3509
1497
  "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => model.value.companyLegalName = $event),
3510
1498
  required: "",
@@ -3520,7 +1508,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
3520
1508
  description: "The legal name of the organization customer in the checkout form"
3521
1509
  })
3522
1510
  }, null, 8, ["modelValue", "label", "placeholder"]),
3523
- showVatIdInput.value ? (openBlock(), createBlock(unref(_sfc_main$N), {
1511
+ showVatIdInput.value ? (openBlock(), createBlock(unref(_sfc_main$t), {
3524
1512
  key: 0,
3525
1513
  modelValue: model.value.companyVatNumber,
3526
1514
  "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => model.value.companyVatNumber = $event),
@@ -3542,7 +1530,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
3542
1530
  unref(isEUCountry)(model.value.country ?? "") ? {
3543
1531
  name: "suffix",
3544
1532
  fn: withCtx(() => [
3545
- createVNode(unref(_sfc_main$P), {
1533
+ createVNode(unref(_sfc_main$v), {
3546
1534
  type: "button",
3547
1535
  size: "sm",
3548
1536
  color: "green",
@@ -3566,7 +1554,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
3566
1554
  key: 1,
3567
1555
  class: normalizeClass({ "opacity-75": unref(isTaxIDCheckPending) })
3568
1556
  }, [
3569
- createVNode(_sfc_main$o, { "tax-id-validation-result": unref(taxIdValidationData) }, null, 8, ["tax-id-validation-result"])
1557
+ createVNode(_sfc_main$p, { "tax-id-validation-result": unref(taxIdValidationData) }, null, 8, ["tax-id-validation-result"])
3570
1558
  ], 2)) : createCommentVNode("", true)
3571
1559
  ])
3572
1560
  ])) : createCommentVNode("", true)
@@ -3581,13 +1569,13 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
3581
1569
  };
3582
1570
  }
3583
1571
  });
3584
- const _hoisted_1$j = {
1572
+ const _hoisted_1$k = {
3585
1573
  key: 0,
3586
1574
  class: "flex items-center"
3587
1575
  };
3588
- const _hoisted_2$a = ["innerHTML"];
3589
- const _hoisted_3$4 = ["innerHTML"];
3590
- const _sfc_main$m = /* @__PURE__ */ defineComponent({
1576
+ const _hoisted_2$c = ["innerHTML"];
1577
+ const _hoisted_3$6 = ["innerHTML"];
1578
+ const _sfc_main$n = /* @__PURE__ */ defineComponent({
3591
1579
  __name: "CheckoutTitle",
3592
1580
  props: {
3593
1581
  trialPeriod: { type: Object },
@@ -3601,9 +1589,9 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
3601
1589
  setup(__props) {
3602
1590
  const { $t } = useIntl();
3603
1591
  return (_ctx, _cache) => {
3604
- return openBlock(), createElementBlock(Fragment, null, [
1592
+ return openBlock(), createElementBlock("div", null, [
3605
1593
  createElementVNode("div", null, [
3606
- createVNode(unref(_sfc_main$C), {
1594
+ createVNode(unref(_sfc_main$r), {
3607
1595
  variant: "heading-1",
3608
1596
  class: "inline-block"
3609
1597
  }, {
@@ -3613,7 +1601,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
3613
1601
  id: "checkout.page_title",
3614
1602
  description: "The title of the checkout page"
3615
1603
  })) + toDisplayString(" "), 1),
3616
- __props.trialPeriod ? (openBlock(), createBlock(unref(_sfc_main$T), {
1604
+ __props.trialPeriod ? (openBlock(), createBlock(unref(_sfc_main$y), {
3617
1605
  key: 0,
3618
1606
  "trial-period": __props.trialPeriod,
3619
1607
  size: "lg",
@@ -3623,18 +1611,18 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
3623
1611
  _: 1
3624
1612
  })
3625
1613
  ]),
3626
- createVNode(unref(_sfc_main$C), {
1614
+ createVNode(unref(_sfc_main$r), {
3627
1615
  variant: "body-sm",
3628
1616
  shade: "lighter",
3629
1617
  "no-spacing": ""
3630
1618
  }, {
3631
1619
  default: withCtx(() => [
3632
- !__props.countryCode ? (openBlock(), createElementBlock("span", _hoisted_1$j, [
3633
- createVNode(unref(_sfc_main$D), { "is-dark-mode": "" }, {
1620
+ !__props.countryCode ? (openBlock(), createElementBlock("span", _hoisted_1$k, [
1621
+ createVNode(unref(_sfc_main$z), { "is-dark-mode": "" }, {
3634
1622
  tooltip: withCtx(() => [
3635
1623
  createVNode(unref(TooltipContent), null, {
3636
1624
  default: withCtx(() => [
3637
- createVNode(unref(_sfc_main$E), null, {
1625
+ createVNode(unref(_sfc_main$B), null, {
3638
1626
  default: withCtx(() => [
3639
1627
  createTextVNode(toDisplayString(unref($t)({
3640
1628
  defaultMessage: "Will be determined by billing information",
@@ -3649,7 +1637,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
3649
1637
  })
3650
1638
  ]),
3651
1639
  default: withCtx(() => [
3652
- createVNode(unref(_sfc_main$y), {
1640
+ createVNode(unref(_sfc_main$A), {
3653
1641
  "width-class": "w-10",
3654
1642
  "height-class": "h-4",
3655
1643
  shade: "darker",
@@ -3686,7 +1674,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
3686
1674
  })
3687
1675
  }
3688
1676
  )
3689
- }, null, 8, _hoisted_2$a)
1677
+ }, null, 8, _hoisted_2$c)
3690
1678
  ])) : (openBlock(), createElementBlock("span", {
3691
1679
  key: 1,
3692
1680
  innerHTML: __props.trialStartDate ? unref($t)(
@@ -3722,11 +1710,11 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
3722
1710
  strong: (text) => `<strong>${text}</strong>`
3723
1711
  }
3724
1712
  )
3725
- }, null, 8, _hoisted_3$4))
1713
+ }, null, 8, _hoisted_3$6))
3726
1714
  ]),
3727
1715
  _: 1
3728
1716
  })
3729
- ], 64);
1717
+ ]);
3730
1718
  };
3731
1719
  }
3732
1720
  });
@@ -3745,9 +1733,9 @@ const isInvoiceUsageBased = (invoice) => {
3745
1733
  )
3746
1734
  )) ?? false;
3747
1735
  };
3748
- const _hoisted_1$i = { class: "flex w-full min-h-96 justify-center items-center" };
3749
- const _hoisted_2$9 = { class: "max-w-sm" };
3750
- const _sfc_main$l = /* @__PURE__ */ defineComponent({
1736
+ const _hoisted_1$j = { class: "flex w-full min-h-96 justify-center items-center" };
1737
+ const _hoisted_2$b = { class: "max-w-sm" };
1738
+ const _sfc_main$m = /* @__PURE__ */ defineComponent({
3751
1739
  __name: "CheckoutNotAvailable",
3752
1740
  setup(__props) {
3753
1741
  const { $t } = useIntl();
@@ -3755,9 +1743,9 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
3755
1743
  window.location.reload();
3756
1744
  };
3757
1745
  return (_ctx, _cache) => {
3758
- return openBlock(), createElementBlock("div", _hoisted_1$i, [
3759
- createElementVNode("div", _hoisted_2$9, [
3760
- createVNode(unref(_sfc_main$C), { variant: "heading-1" }, {
1746
+ return openBlock(), createElementBlock("div", _hoisted_1$j, [
1747
+ createElementVNode("div", _hoisted_2$b, [
1748
+ createVNode(unref(_sfc_main$r), { variant: "heading-1" }, {
3761
1749
  default: withCtx(() => [
3762
1750
  createTextVNode(toDisplayString(unref($t)({
3763
1751
  defaultMessage: "Checkout not available",
@@ -3767,7 +1755,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
3767
1755
  ]),
3768
1756
  _: 1
3769
1757
  }),
3770
- createVNode(unref(_sfc_main$C), {
1758
+ createVNode(unref(_sfc_main$r), {
3771
1759
  variant: "body-sm",
3772
1760
  shade: "lighter"
3773
1761
  }, {
@@ -3799,22 +1787,13 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
3799
1787
  };
3800
1788
  }
3801
1789
  });
3802
- const _sfc_main$k = /* @__PURE__ */ defineComponent({
1790
+ const _sfc_main$l = /* @__PURE__ */ defineComponent({
3803
1791
  __name: "SubscriptionPaymentCompletedCard",
3804
- props: {
3805
- redirectUrl: { type: String }
3806
- },
1792
+ emits: ["continue-to-merchant"],
3807
1793
  setup(__props) {
3808
- const props = __props;
3809
1794
  const { $t } = useIntl();
3810
- onMounted(() => {
3811
- if (!props.redirectUrl) {
3812
- return;
3813
- }
3814
- window.location.replace(props.redirectUrl);
3815
- });
3816
1795
  return (_ctx, _cache) => {
3817
- return openBlock(), createBlock(_sfc_main$U, {
1796
+ return openBlock(), createBlock(_sfc_main$C, {
3818
1797
  status: "success",
3819
1798
  title: unref($t)({
3820
1799
  defaultMessage: "Payment successful",
@@ -3823,7 +1802,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
3823
1802
  })
3824
1803
  }, {
3825
1804
  default: withCtx(() => [
3826
- createVNode(unref(_sfc_main$C), {
1805
+ createVNode(unref(_sfc_main$r), {
3827
1806
  variant: "body-xs",
3828
1807
  shade: "lighter",
3829
1808
  tag: "span"
@@ -3837,14 +1816,12 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
3837
1816
  ]),
3838
1817
  _: 1
3839
1818
  }),
3840
- __props.redirectUrl ? (openBlock(), createBlock(unref(_sfc_main$P), {
3841
- key: 0,
3842
- tag: "a",
3843
- href: __props.redirectUrl,
1819
+ createVNode(unref(_sfc_main$v), {
3844
1820
  color: "gray",
3845
1821
  variant: "outline",
3846
1822
  size: "xs",
3847
- class: "align-center"
1823
+ class: "align-center",
1824
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("continue-to-merchant"))
3848
1825
  }, {
3849
1826
  default: withCtx(() => [
3850
1827
  createTextVNode(toDisplayString(unref($t)({
@@ -3854,16 +1831,16 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
3854
1831
  })), 1)
3855
1832
  ]),
3856
1833
  _: 1
3857
- }, 8, ["href"])) : createCommentVNode("", true)
1834
+ })
3858
1835
  ]),
3859
1836
  _: 1
3860
1837
  }, 8, ["title"]);
3861
1838
  };
3862
1839
  }
3863
1840
  });
3864
- const _hoisted_1$h = { class: "flex flex-row gap-3 px-3 py-2" };
3865
- const _hoisted_2$8 = { class: "grow" };
3866
- const _sfc_main$j = /* @__PURE__ */ defineComponent({
1841
+ const _hoisted_1$i = { class: "flex flex-row gap-3 px-3 py-2" };
1842
+ const _hoisted_2$a = { class: "grow" };
1843
+ const _sfc_main$k = /* @__PURE__ */ defineComponent({
3867
1844
  __name: "SubscriptionSummary",
3868
1845
  props: {
3869
1846
  subscription: { type: Object },
@@ -3910,15 +1887,15 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
3910
1887
  return names;
3911
1888
  });
3912
1889
  return (_ctx, _cache) => {
3913
- return openBlock(), createElementBlock("div", _hoisted_1$h, [
3914
- __props.avatar ? (openBlock(), createBlock(unref(_sfc_main$V), {
1890
+ return openBlock(), createElementBlock("div", _hoisted_1$i, [
1891
+ __props.avatar ? (openBlock(), createBlock(unref(_sfc_main$D), {
3915
1892
  key: 0,
3916
1893
  "image-src": __props.avatar,
3917
1894
  size: "lg",
3918
1895
  class: "my-1"
3919
1896
  }, null, 8, ["image-src"])) : createCommentVNode("", true),
3920
- createElementVNode("div", _hoisted_2$8, [
3921
- createVNode(unref(_sfc_main$C), {
1897
+ createElementVNode("div", _hoisted_2$a, [
1898
+ createVNode(unref(_sfc_main$r), {
3922
1899
  variant: "body",
3923
1900
  weight: "semibold",
3924
1901
  "no-spacing": ""
@@ -3928,7 +1905,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
3928
1905
  ]),
3929
1906
  _: 1
3930
1907
  }),
3931
- selectedPricings.value ? (openBlock(), createBlock(unref(_sfc_main$C), {
1908
+ selectedPricings.value ? (openBlock(), createBlock(unref(_sfc_main$r), {
3932
1909
  key: 0,
3933
1910
  variant: "body-xs",
3934
1911
  shade: "lighter",
@@ -3939,7 +1916,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
3939
1916
  ]),
3940
1917
  _: 1
3941
1918
  })) : createCommentVNode("", true),
3942
- description.value ? (openBlock(), createBlock(unref(_sfc_main$C), {
1919
+ description.value ? (openBlock(), createBlock(unref(_sfc_main$r), {
3943
1920
  key: 1,
3944
1921
  variant: "body-xs",
3945
1922
  shade: "lighter",
@@ -3958,11 +1935,15 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
3958
1935
  };
3959
1936
  }
3960
1937
  });
3961
- const _hoisted_1$g = { class: "grid grid-cols-1 gap-1" };
3962
- const _hoisted_2$7 = { class: "px-3 py-2" };
3963
- const _hoisted_3$3 = { class: "flex flex-col gap-3" };
3964
- const _hoisted_4$3 = { class: "px-3 py-2" };
3965
- const _sfc_main$i = /* @__PURE__ */ defineComponent({
1938
+ const _hoisted_1$h = { class: "sv-order-summary__body grid grid-cols-1 gap-1" };
1939
+ const _hoisted_2$9 = { class: "px-3 py-2" };
1940
+ const _hoisted_3$5 = { class: "sv-order-summary__billing-period flex flex-col gap-3" };
1941
+ const _hoisted_4$4 = { class: "px-3 py-2" };
1942
+ const _hoisted_5$3 = {
1943
+ key: 3,
1944
+ class: "sv-order-summary__items"
1945
+ };
1946
+ const _sfc_main$j = /* @__PURE__ */ defineComponent({
3966
1947
  __name: "OrderSummary",
3967
1948
  props: {
3968
1949
  subscription: { type: Object },
@@ -3986,9 +1967,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
3986
1967
  const emit = __emit;
3987
1968
  const { $t } = useIntl();
3988
1969
  const { map, formatTimePeriod } = useTimePeriod();
3989
- const breakpoints = useBreakpoints(breakpointsTailwind);
3990
- const isMobile = breakpoints.smaller("md");
3991
- const saveBadgeSize = computed(() => isMobile.value ? "sm" : "xs");
1970
+ const { isMobileViewport } = useViewport();
1971
+ const saveBadgeSize = computed(() => isMobileViewport.value ? "sm" : "xs");
3992
1972
  const getBillingPeriodKey = (period) => `${period.type}:${period.value}`;
3993
1973
  const BILLING_PERIOD_TYPES = ["DAY", "WEEK", "MONTH", "YEAR"];
3994
1974
  const isBillingPeriodType = (value) => BILLING_PERIOD_TYPES.includes(value);
@@ -4185,7 +2165,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
4185
2165
  label,
4186
2166
  subLabel: getSelectedPeriodAmountLabel(period),
4187
2167
  labelSuffixComponent: saveText ? {
4188
- component: _sfc_main$B,
2168
+ component: _sfc_main$E,
4189
2169
  props: {
4190
2170
  color: "primary",
4191
2171
  content: saveText,
@@ -4244,7 +2224,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
4244
2224
  selectedBillingPeriodKey.value = checked ? biggestPeriod : smallestPeriod;
4245
2225
  };
4246
2226
  return (_ctx, _cache) => {
4247
- return openBlock(), createBlock(unref(_sfc_main$Q), {
2227
+ return openBlock(), createBlock(unref(_sfc_main$s), {
2228
+ class: "sv-order-summary",
4248
2229
  "no-border": "",
4249
2230
  "no-spacing": "",
4250
2231
  "content-background": "none",
@@ -4255,10 +2236,13 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
4255
2236
  })
4256
2237
  }, {
4257
2238
  default: withCtx(() => [
4258
- createElementVNode("div", _hoisted_1$g, [
4259
- createVNode(unref(_sfc_main$Q), { "no-spacing": "" }, {
2239
+ createElementVNode("div", _hoisted_1$h, [
2240
+ createVNode(unref(_sfc_main$s), {
2241
+ "no-spacing": "",
2242
+ class: "sv-order-summary__subscription"
2243
+ }, {
4260
2244
  default: withCtx(() => [
4261
- __props.subscription ? (openBlock(), createBlock(_sfc_main$j, {
2245
+ __props.subscription ? (openBlock(), createBlock(_sfc_main$k, {
4262
2246
  key: 0,
4263
2247
  avatar: __props.avatar,
4264
2248
  invoice: __props.invoice,
@@ -4270,7 +2254,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
4270
2254
  ]),
4271
2255
  _: 1
4272
2256
  }),
4273
- billingPeriodOptions.value.length === 2 ? (openBlock(), createBlock(unref(_sfc_main$Q), {
2257
+ billingPeriodOptions.value.length === 2 ? (openBlock(), createBlock(unref(_sfc_main$s), {
4274
2258
  key: 0,
4275
2259
  "no-spacing": "",
4276
2260
  "content-classes": selectedBillingPeriodKey.value === periodBounds.value.biggestPeriod ? "border-primary-500" : void 0
@@ -4278,15 +2262,15 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
4278
2262
  default: withCtx(() => {
4279
2263
  var _a;
4280
2264
  return [
4281
- createElementVNode("div", _hoisted_2$7, [
4282
- createElementVNode("div", _hoisted_3$3, [
4283
- highOption.value ? (openBlock(), createBlock(_sfc_main$W, {
2265
+ createElementVNode("div", _hoisted_2$9, [
2266
+ createElementVNode("div", _hoisted_3$5, [
2267
+ highOption.value ? (openBlock(), createBlock(_sfc_main$F, {
4284
2268
  key: 0,
4285
2269
  name: highOption.value.label,
4286
2270
  description: ((_a = selectedBillingPeriodOption.value) == null ? void 0 : _a.subLabel) ?? ""
4287
2271
  }, createSlots({
4288
2272
  default: withCtx(() => [
4289
- createVNode(unref(_sfc_main$S), {
2273
+ createVNode(unref(_sfc_main$x), {
4290
2274
  "model-value": selectedBillingPeriodKey.value === periodBounds.value.biggestPeriod,
4291
2275
  "onUpdate:modelValue": handleBinaryBillingToggle
4292
2276
  }, null, 8, ["model-value"])
@@ -4296,7 +2280,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
4296
2280
  toggleSaveText.value ? {
4297
2281
  name: "badge",
4298
2282
  fn: withCtx(() => [
4299
- createVNode(unref(_sfc_main$B), {
2283
+ createVNode(unref(_sfc_main$E), {
4300
2284
  color: "primary",
4301
2285
  content: toggleSaveText.value,
4302
2286
  size: saveBadgeSize.value,
@@ -4311,23 +2295,25 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
4311
2295
  ];
4312
2296
  }),
4313
2297
  _: 1
4314
- }, 8, ["content-classes"])) : billingPeriodOptions.value.length > 2 ? (openBlock(), createBlock(unref(_sfc_main$q), {
2298
+ }, 8, ["content-classes"])) : billingPeriodOptions.value.length > 2 ? (openBlock(), createBlock(unref(_sfc_main$G), {
4315
2299
  key: 1,
4316
2300
  "single-model-value": selectedBillingPeriodKey.value,
4317
2301
  "onUpdate:singleModelValue": _cache[0] || (_cache[0] = ($event) => selectedBillingPeriodKey.value = $event),
2302
+ class: "sv-order-summary__billing-period",
4318
2303
  options: billingPeriodOptions.value,
4319
2304
  size: "xl",
4320
2305
  "has-large-dropdown": "",
4321
2306
  "show-sub-label-in-input": "",
4322
2307
  "show-suffix-in-closed-input": ""
4323
2308
  }, null, 8, ["single-model-value", "options"])) : createCommentVNode("", true),
4324
- __props.isUsageBased ? (openBlock(), createBlock(unref(_sfc_main$Q), {
2309
+ __props.isUsageBased ? (openBlock(), createBlock(unref(_sfc_main$s), {
4325
2310
  key: 2,
4326
- "no-spacing": ""
2311
+ "no-spacing": "",
2312
+ class: "sv-order-summary__usage"
4327
2313
  }, {
4328
2314
  default: withCtx(() => [
4329
- createElementVNode("div", _hoisted_4$3, [
4330
- createVNode(unref(_sfc_main$C), {
2315
+ createElementVNode("div", _hoisted_4$4, [
2316
+ createVNode(unref(_sfc_main$r), {
4331
2317
  "no-spacing": "",
4332
2318
  variant: "body-sm",
4333
2319
  shade: "lighter"
@@ -4345,15 +2331,17 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
4345
2331
  ]),
4346
2332
  _: 1
4347
2333
  })) : createCommentVNode("", true),
4348
- __props.invoice && __props.variant !== "products-inline" ? (openBlock(), createBlock(unref(_sfc_main$w), {
4349
- key: 3,
4350
- invoice: __props.invoice,
4351
- "wrapper-component": unref(_sfc_main$Q)
4352
- }, null, 8, ["invoice", "wrapper-component"])) : createCommentVNode("", true),
4353
- createVNode(unref(_sfc_main$Q), null, {
2334
+ __props.invoice && __props.variant !== "products-inline" ? (openBlock(), createElementBlock("div", _hoisted_5$3, [
2335
+ createVNode(unref(_sfc_main$H), {
2336
+ invoice: __props.invoice,
2337
+ "wrapper-component": unref(_sfc_main$s)
2338
+ }, null, 8, ["invoice", "wrapper-component"])
2339
+ ])) : createCommentVNode("", true),
2340
+ createVNode(unref(_sfc_main$s), { class: "sv-order-summary__totals" }, {
4354
2341
  default: withCtx(() => [
4355
- __props.invoice ? (openBlock(), createBlock(unref(_sfc_main$v), {
2342
+ __props.invoice ? (openBlock(), createBlock(unref(_sfc_main$I), {
4356
2343
  key: 0,
2344
+ class: "sv-order-summary__invoice-preview",
4357
2345
  variant: __props.variant === "products-inline" ? "default" : "without-products",
4358
2346
  invoice: __props.invoice,
4359
2347
  "trial-invoice": __props.trialInvoice,
@@ -4361,10 +2349,11 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
4361
2349
  collapsible: __props.collapsible,
4362
2350
  "is-preview-without-taxes": !__props.countryCode,
4363
2351
  "is-customer-facing": ""
4364
- }, null, 8, ["variant", "invoice", "trial-invoice", "is-paid", "collapsible", "is-preview-without-taxes"])) : (openBlock(), createBlock(unref(_sfc_main$C), {
2352
+ }, null, 8, ["variant", "invoice", "trial-invoice", "is-paid", "collapsible", "is-preview-without-taxes"])) : (openBlock(), createBlock(unref(_sfc_main$r), {
4365
2353
  key: 1,
4366
2354
  variant: "body-sm",
4367
- shade: "lighter"
2355
+ shade: "lighter",
2356
+ class: "sv-order-summary__empty"
4368
2357
  }, {
4369
2358
  default: withCtx(() => [
4370
2359
  createTextVNode(toDisplayString(unref($t)({
@@ -4385,41 +2374,41 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
4385
2374
  };
4386
2375
  }
4387
2376
  });
4388
- const _hoisted_1$f = { class: "py-4 flex flex-col items-center justify-center" };
4389
- const _sfc_main$h = /* @__PURE__ */ defineComponent({
2377
+ const _hoisted_1$g = { class: "sv-empty-state__body flex flex-col items-center justify-center py-4" };
2378
+ const _sfc_main$i = /* @__PURE__ */ defineComponent({
4390
2379
  __name: "EmptyStatePlaceholder",
4391
2380
  props: {
4392
2381
  icon: { type: null }
4393
2382
  },
4394
2383
  setup(__props) {
4395
2384
  return (_ctx, _cache) => {
4396
- return openBlock(), createBlock(unref(_sfc_main$Q), null, {
2385
+ return openBlock(), createBlock(unref(_sfc_main$s), { class: "sv-empty-state" }, {
4397
2386
  default: withCtx(() => [
4398
- createElementVNode("div", _hoisted_1$f, [
4399
- createVNode(unref(_sfc_main$I), {
2387
+ createElementVNode("div", _hoisted_1$g, [
2388
+ createVNode(unref(_sfc_main$J), {
4400
2389
  icon: __props.icon,
4401
2390
  size: "lg",
4402
- class: "text-gray-500"
2391
+ class: "sv-empty-state__icon text-gray-500"
4403
2392
  }, null, 8, ["icon"]),
4404
- createVNode(unref(_sfc_main$C), {
2393
+ createVNode(unref(_sfc_main$r), {
4405
2394
  center: "",
4406
2395
  tag: "span",
4407
2396
  variant: "body-sm",
4408
2397
  weight: "semibold",
4409
2398
  shade: "lighter",
4410
- class: "mt-2"
2399
+ class: "sv-empty-state__title mt-2"
4411
2400
  }, {
4412
2401
  default: withCtx(() => [
4413
2402
  renderSlot(_ctx.$slots, "title")
4414
2403
  ]),
4415
2404
  _: 3
4416
2405
  }),
4417
- createVNode(unref(_sfc_main$C), {
2406
+ createVNode(unref(_sfc_main$r), {
4418
2407
  center: "",
4419
2408
  tag: "span",
4420
2409
  variant: "body-xs",
4421
2410
  shade: "lightest",
4422
- class: "mt-1"
2411
+ class: "sv-empty-state__message mt-1"
4423
2412
  }, {
4424
2413
  default: withCtx(() => [
4425
2414
  renderSlot(_ctx.$slots, "message")
@@ -4433,19 +2422,19 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
4433
2422
  };
4434
2423
  }
4435
2424
  });
4436
- const _hoisted_1$e = {
2425
+ const _hoisted_1$f = {
4437
2426
  key: 0,
4438
2427
  id: "svg-logo",
4439
2428
  viewBox: "0 0 35 15",
4440
2429
  class: "h-[44px]"
4441
2430
  };
4442
- const _hoisted_2$6 = {
2431
+ const _hoisted_2$8 = {
4443
2432
  key: 1,
4444
2433
  src: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAxcHgiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAxMDEgMzIiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaW5ZTWluIG1lZXQiIHhtbG5zPSJodHRwOiYjeDJGOyYjeDJGO3d3dy53My5vcmcmI3gyRjsyMDAwJiN4MkY7c3ZnIj48cGF0aCBmaWxsPSIjMDAzMDg3IiBkPSJNIDEyLjIzNyAyLjggTCA0LjQzNyAyLjggQyAzLjkzNyAyLjggMy40MzcgMy4yIDMuMzM3IDMuNyBMIDAuMjM3IDIzLjcgQyAwLjEzNyAyNC4xIDAuNDM3IDI0LjQgMC44MzcgMjQuNCBMIDQuNTM3IDI0LjQgQyA1LjAzNyAyNC40IDUuNTM3IDI0IDUuNjM3IDIzLjUgTCA2LjQzNyAxOC4xIEMgNi41MzcgMTcuNiA2LjkzNyAxNy4yIDcuNTM3IDE3LjIgTCAxMC4wMzcgMTcuMiBDIDE1LjEzNyAxNy4yIDE4LjEzNyAxNC43IDE4LjkzNyA5LjggQyAxOS4yMzcgNy43IDE4LjkzNyA2IDE3LjkzNyA0LjggQyAxNi44MzcgMy41IDE0LjgzNyAyLjggMTIuMjM3IDIuOCBaIE0gMTMuMTM3IDEwLjEgQyAxMi43MzcgMTIuOSAxMC41MzcgMTIuOSA4LjUzNyAxMi45IEwgNy4zMzcgMTIuOSBMIDguMTM3IDcuNyBDIDguMTM3IDcuNCA4LjQzNyA3LjIgOC43MzcgNy4yIEwgOS4yMzcgNy4yIEMgMTAuNjM3IDcuMiAxMS45MzcgNy4yIDEyLjYzNyA4IEMgMTMuMTM3IDguNCAxMy4zMzcgOS4xIDEzLjEzNyAxMC4xIFoiPjwvcGF0aD48cGF0aCBmaWxsPSIjMDAzMDg3IiBkPSJNIDM1LjQzNyAxMCBMIDMxLjczNyAxMCBDIDMxLjQzNyAxMCAzMS4xMzcgMTAuMiAzMS4xMzcgMTAuNSBMIDMwLjkzNyAxMS41IEwgMzAuNjM3IDExLjEgQyAyOS44MzcgOS45IDI4LjAzNyA5LjUgMjYuMjM3IDkuNSBDIDIyLjEzNyA5LjUgMTguNjM3IDEyLjYgMTcuOTM3IDE3IEMgMTcuNTM3IDE5LjIgMTguMDM3IDIxLjMgMTkuMzM3IDIyLjcgQyAyMC40MzcgMjQgMjIuMTM3IDI0LjYgMjQuMDM3IDI0LjYgQyAyNy4zMzcgMjQuNiAyOS4yMzcgMjIuNSAyOS4yMzcgMjIuNSBMIDI5LjAzNyAyMy41IEMgMjguOTM3IDIzLjkgMjkuMjM3IDI0LjMgMjkuNjM3IDI0LjMgTCAzMy4wMzcgMjQuMyBDIDMzLjUzNyAyNC4zIDM0LjAzNyAyMy45IDM0LjEzNyAyMy40IEwgMzYuMTM3IDEwLjYgQyAzNi4yMzcgMTAuNCAzNS44MzcgMTAgMzUuNDM3IDEwIFogTSAzMC4zMzcgMTcuMiBDIDI5LjkzNyAxOS4zIDI4LjMzNyAyMC44IDI2LjEzNyAyMC44IEMgMjUuMDM3IDIwLjggMjQuMjM3IDIwLjUgMjMuNjM3IDE5LjggQyAyMy4wMzcgMTkuMSAyMi44MzcgMTguMiAyMy4wMzcgMTcuMiBDIDIzLjMzNyAxNS4xIDI1LjEzNyAxMy42IDI3LjIzNyAxMy42IEMgMjguMzM3IDEzLjYgMjkuMTM3IDE0IDI5LjczNyAxNC42IEMgMzAuMjM3IDE1LjMgMzAuNDM3IDE2LjIgMzAuMzM3IDE3LjIgWiI+PC9wYXRoPjxwYXRoIGZpbGw9IiMwMDMwODciIGQ9Ik0gNTUuMzM3IDEwIEwgNTEuNjM3IDEwIEMgNTEuMjM3IDEwIDUwLjkzNyAxMC4yIDUwLjczNyAxMC41IEwgNDUuNTM3IDE4LjEgTCA0My4zMzcgMTAuOCBDIDQzLjIzNyAxMC4zIDQyLjczNyAxMCA0Mi4zMzcgMTAgTCAzOC42MzcgMTAgQyAzOC4yMzcgMTAgMzcuODM3IDEwLjQgMzguMDM3IDEwLjkgTCA0Mi4xMzcgMjMgTCAzOC4yMzcgMjguNCBDIDM3LjkzNyAyOC44IDM4LjIzNyAyOS40IDM4LjczNyAyOS40IEwgNDIuNDM3IDI5LjQgQyA0Mi44MzcgMjkuNCA0My4xMzcgMjkuMiA0My4zMzcgMjguOSBMIDU1LjgzNyAxMC45IEMgNTYuMTM3IDEwLjYgNTUuODM3IDEwIDU1LjMzNyAxMCBaIj48L3BhdGg+PHBhdGggZmlsbD0iIzAwOWNkZSIgZD0iTSA2Ny43MzcgMi44IEwgNTkuOTM3IDIuOCBDIDU5LjQzNyAyLjggNTguOTM3IDMuMiA1OC44MzcgMy43IEwgNTUuNzM3IDIzLjYgQyA1NS42MzcgMjQgNTUuOTM3IDI0LjMgNTYuMzM3IDI0LjMgTCA2MC4zMzcgMjQuMyBDIDYwLjczNyAyNC4zIDYxLjAzNyAyNCA2MS4wMzcgMjMuNyBMIDYxLjkzNyAxOCBDIDYyLjAzNyAxNy41IDYyLjQzNyAxNy4xIDYzLjAzNyAxNy4xIEwgNjUuNTM3IDE3LjEgQyA3MC42MzcgMTcuMSA3My42MzcgMTQuNiA3NC40MzcgOS43IEMgNzQuNzM3IDcuNiA3NC40MzcgNS45IDczLjQzNyA0LjcgQyA3Mi4yMzcgMy41IDcwLjMzNyAyLjggNjcuNzM3IDIuOCBaIE0gNjguNjM3IDEwLjEgQyA2OC4yMzcgMTIuOSA2Ni4wMzcgMTIuOSA2NC4wMzcgMTIuOSBMIDYyLjgzNyAxMi45IEwgNjMuNjM3IDcuNyBDIDYzLjYzNyA3LjQgNjMuOTM3IDcuMiA2NC4yMzcgNy4yIEwgNjQuNzM3IDcuMiBDIDY2LjEzNyA3LjIgNjcuNDM3IDcuMiA2OC4xMzcgOCBDIDY4LjYzNyA4LjQgNjguNzM3IDkuMSA2OC42MzcgMTAuMSBaIj48L3BhdGg+PHBhdGggZmlsbD0iIzAwOWNkZSIgZD0iTSA5MC45MzcgMTAgTCA4Ny4yMzcgMTAgQyA4Ni45MzcgMTAgODYuNjM3IDEwLjIgODYuNjM3IDEwLjUgTCA4Ni40MzcgMTEuNSBMIDg2LjEzNyAxMS4xIEMgODUuMzM3IDkuOSA4My41MzcgOS41IDgxLjczNyA5LjUgQyA3Ny42MzcgOS41IDc0LjEzNyAxMi42IDczLjQzNyAxNyBDIDczLjAzNyAxOS4yIDczLjUzNyAyMS4zIDc0LjgzNyAyMi43IEMgNzUuOTM3IDI0IDc3LjYzNyAyNC42IDc5LjUzNyAyNC42IEMgODIuODM3IDI0LjYgODQuNzM3IDIyLjUgODQuNzM3IDIyLjUgTCA4NC41MzcgMjMuNSBDIDg0LjQzNyAyMy45IDg0LjczNyAyNC4zIDg1LjEzNyAyNC4zIEwgODguNTM3IDI0LjMgQyA4OS4wMzcgMjQuMyA4OS41MzcgMjMuOSA4OS42MzcgMjMuNCBMIDkxLjYzNyAxMC42IEMgOTEuNjM3IDEwLjQgOTEuMzM3IDEwIDkwLjkzNyAxMCBaIE0gODUuNzM3IDE3LjIgQyA4NS4zMzcgMTkuMyA4My43MzcgMjAuOCA4MS41MzcgMjAuOCBDIDgwLjQzNyAyMC44IDc5LjYzNyAyMC41IDc5LjAzNyAxOS44IEMgNzguNDM3IDE5LjEgNzguMjM3IDE4LjIgNzguNDM3IDE3LjIgQyA3OC43MzcgMTUuMSA4MC41MzcgMTMuNiA4Mi42MzcgMTMuNiBDIDgzLjczNyAxMy42IDg0LjUzNyAxNCA4NS4xMzcgMTQuNiBDIDg1LjczNyAxNS4zIDg1LjkzNyAxNi4yIDg1LjczNyAxNy4yIFoiPjwvcGF0aD48cGF0aCBmaWxsPSIjMDA5Y2RlIiBkPSJNIDk1LjMzNyAzLjMgTCA5Mi4xMzcgMjMuNiBDIDkyLjAzNyAyNCA5Mi4zMzcgMjQuMyA5Mi43MzcgMjQuMyBMIDk1LjkzNyAyNC4zIEMgOTYuNDM3IDI0LjMgOTYuOTM3IDIzLjkgOTcuMDM3IDIzLjQgTCAxMDAuMjM3IDMuNSBDIDEwMC4zMzcgMy4xIDEwMC4wMzcgMi44IDk5LjYzNyAyLjggTCA5Ni4wMzcgMi44IEMgOTUuNjM3IDIuOCA5NS40MzcgMyA5NS4zMzcgMy4zIFoiPjwvcGF0aD48L3N2Zz4",
4445
2434
  role: "presentation",
4446
2435
  class: "h-[22px]"
4447
2436
  };
4448
- const _sfc_main$g = /* @__PURE__ */ defineComponent({
2437
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
4449
2438
  __name: "ExpressPaymentMethodButton",
4450
2439
  props: {
4451
2440
  type: { type: String }
@@ -4482,14 +2471,14 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
4482
2471
  emit("click");
4483
2472
  }
4484
2473
  return (_ctx, _cache) => {
4485
- return openBlock(), createBlock(unref(_sfc_main$P), {
2474
+ return openBlock(), createBlock(unref(_sfc_main$v), {
4486
2475
  size: "lg",
4487
2476
  "aria-label": ariaLabel.value,
4488
2477
  class: normalizeClass([buttonClasses.value, "!block w-full h-11 bg-center bg-no-repeat"]),
4489
2478
  onClick: handleClick
4490
2479
  }, {
4491
2480
  default: withCtx(() => [
4492
- props.type === "applepay" ? (openBlock(), createElementBlock("svg", _hoisted_1$e, [..._cache[0] || (_cache[0] = [
2481
+ props.type === "applepay" ? (openBlock(), createElementBlock("svg", _hoisted_1$f, [..._cache[0] || (_cache[0] = [
4493
2482
  createElementVNode("svg", {
4494
2483
  id: "svg-logo",
4495
2484
  x: "0",
@@ -4517,16 +2506,16 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
4517
2506
  ])
4518
2507
  ])
4519
2508
  ], -1)
4520
- ])])) : props.type === "paypal" ? (openBlock(), createElementBlock("img", _hoisted_2$6)) : createCommentVNode("", true)
2509
+ ])])) : props.type === "paypal" ? (openBlock(), createElementBlock("img", _hoisted_2$8)) : createCommentVNode("", true)
4521
2510
  ]),
4522
2511
  _: 1
4523
2512
  }, 8, ["aria-label", "class"]);
4524
2513
  };
4525
2514
  }
4526
2515
  });
4527
- const _hoisted_1$d = { class: "absolute h-[1px] w-[1px] overflow-hidden opacity-0" };
2516
+ const _hoisted_1$e = { class: "absolute h-[1px] w-[1px] overflow-hidden opacity-0" };
4528
2517
  const PAYMENT_GATEWAY_VARIANT_ADYEN = "ADYEN";
4529
- const _sfc_main$f = /* @__PURE__ */ defineComponent({
2518
+ const _sfc_main$g = /* @__PURE__ */ defineComponent({
4530
2519
  __name: "ExpressPaymentMethodApplePay",
4531
2520
  props: {
4532
2521
  onBillingInformationChange: { type: Function },
@@ -4546,13 +2535,14 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
4546
2535
  const { authorizePayment } = createPaymentsService();
4547
2536
  const paymentAcceptorId = props.paymentMethodOptionsResponse.payment_acceptor.id;
4548
2537
  const initApplePay = async () => {
4549
- const { AdyenCheckout, ApplePay } = await import("../../auto-DzZuCneB.mjs");
2538
+ const { AdyenCheckout, ApplePay } = await import("../../index-DyvRdSR7.mjs");
4550
2539
  const checkout = await AdyenCheckout(
4551
2540
  getAdyenExpressCheckoutConfiguration({
4552
2541
  amount: props.amount,
4553
2542
  locale: props.locale,
4554
2543
  countryCode: props.countryCode,
4555
- paymentMethodOptionResponse: props.paymentMethodOptionsResponse
2544
+ paymentMethodOptionResponse: props.paymentMethodOptionsResponse,
2545
+ logger
4556
2546
  })
4557
2547
  );
4558
2548
  const applePay = new ApplePay(checkout, {
@@ -4698,7 +2688,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
4698
2688
  }
4699
2689
  });
4700
2690
  if (!applePayButtonRef.value) {
4701
- console.warn("Apple Pay button not found");
2691
+ logger.error("APPLE_PAY_ERROR", "Apple Pay button ref not found");
4702
2692
  return;
4703
2693
  }
4704
2694
  try {
@@ -4706,7 +2696,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
4706
2696
  applePay.mount(applePayButtonRef.value);
4707
2697
  emit("ready");
4708
2698
  } catch (e) {
4709
- console.warn("Apple Pay not available", e);
2699
+ logger.error("APPLE_PAY_ERROR", "Apple Pay not available on this device", {}, e);
4710
2700
  }
4711
2701
  };
4712
2702
  const getAppleIntervalConfigFromTimePeriod = (timePeriod) => {
@@ -4760,12 +2750,12 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
4760
2750
  });
4761
2751
  return (_ctx, _cache) => {
4762
2752
  return openBlock(), createElementBlock(Fragment, null, [
4763
- __props.isVisible ? (openBlock(), createBlock(_sfc_main$g, {
2753
+ __props.isVisible ? (openBlock(), createBlock(_sfc_main$h, {
4764
2754
  key: 0,
4765
2755
  type: "applepay",
4766
2756
  onClick: handleClick
4767
2757
  })) : createCommentVNode("", true),
4768
- createElementVNode("div", _hoisted_1$d, [
2758
+ createElementVNode("div", _hoisted_1$e, [
4769
2759
  createElementVNode("div", {
4770
2760
  ref_key: "applePayButtonRef",
4771
2761
  ref: applePayButtonRef
@@ -4775,8 +2765,8 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
4775
2765
  };
4776
2766
  }
4777
2767
  });
4778
- const _hoisted_1$c = { class: "relative overflow-hidden" };
4779
- const _sfc_main$e = /* @__PURE__ */ defineComponent({
2768
+ const _hoisted_1$d = { class: "relative overflow-hidden" };
2769
+ const _sfc_main$f = /* @__PURE__ */ defineComponent({
4780
2770
  __name: "ExpressPaymentMethodPaypal",
4781
2771
  props: {
4782
2772
  amount: { type: Object },
@@ -4793,13 +2783,14 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
4793
2783
  const paypalButtonRef = ref();
4794
2784
  const logger = useLogger();
4795
2785
  const initPaypal = async () => {
4796
- const { AdyenCheckout, PayPal } = await import("../../auto-DzZuCneB.mjs");
2786
+ const { AdyenCheckout, PayPal } = await import("../../index-DyvRdSR7.mjs");
4797
2787
  const checkout = await AdyenCheckout(
4798
2788
  getAdyenExpressCheckoutConfiguration({
4799
2789
  locale: props.locale,
4800
2790
  amount: props.amount,
4801
2791
  countryCode: props.countryCode,
4802
- paymentMethodOptionResponse: props.paymentMethodOptionsResponse
2792
+ paymentMethodOptionResponse: props.paymentMethodOptionsResponse,
2793
+ logger
4803
2794
  })
4804
2795
  );
4805
2796
  const paypal = new PayPal(checkout, {
@@ -4834,8 +2825,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
4834
2825
  void initPaypal();
4835
2826
  });
4836
2827
  return (_ctx, _cache) => {
4837
- return openBlock(), createElementBlock("div", _hoisted_1$c, [
4838
- __props.isVisible ? (openBlock(), createBlock(_sfc_main$g, {
2828
+ return openBlock(), createElementBlock("div", _hoisted_1$d, [
2829
+ __props.isVisible ? (openBlock(), createBlock(_sfc_main$h, {
4839
2830
  key: 0,
4840
2831
  type: "paypal",
4841
2832
  class: "w-full"
@@ -4849,8 +2840,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
4849
2840
  };
4850
2841
  }
4851
2842
  });
4852
- const _hoisted_1$b = { class: "w-[1px] h-[1px] overflow-hidden opacity-0 absolute" };
4853
- const _sfc_main$d = /* @__PURE__ */ defineComponent({
2843
+ const _hoisted_1$c = { class: "absolute h-[1px] w-[1px] overflow-hidden opacity-0" };
2844
+ const _sfc_main$e = /* @__PURE__ */ defineComponent({
4854
2845
  __name: "ExpressPaymentMethodGooglePay",
4855
2846
  props: {
4856
2847
  amount: { type: Object },
@@ -4867,13 +2858,14 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
4867
2858
  const googlePayButtonRef = ref();
4868
2859
  const logger = useLogger();
4869
2860
  const initGooglePay = async () => {
4870
- const { AdyenCheckout, GooglePay } = await import("../../auto-DzZuCneB.mjs");
2861
+ const { AdyenCheckout, GooglePay } = await import("../../index-DyvRdSR7.mjs");
4871
2862
  const checkout = await AdyenCheckout(
4872
2863
  getAdyenExpressCheckoutConfiguration({
4873
2864
  locale: props.locale,
4874
2865
  amount: props.amount,
4875
2866
  countryCode: props.countryCode,
4876
- paymentMethodOptionResponse: props.paymentMethodOptionsResponse
2867
+ paymentMethodOptionResponse: props.paymentMethodOptionsResponse,
2868
+ logger
4877
2869
  })
4878
2870
  );
4879
2871
  const googlePay = new GooglePay(checkout, { isExpress: true });
@@ -4913,12 +2905,12 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
4913
2905
  });
4914
2906
  return (_ctx, _cache) => {
4915
2907
  return openBlock(), createElementBlock(Fragment, null, [
4916
- __props.isVisible ? (openBlock(), createBlock(_sfc_main$g, {
2908
+ __props.isVisible ? (openBlock(), createBlock(_sfc_main$h, {
4917
2909
  key: 0,
4918
2910
  type: "googlepay",
4919
2911
  onClick: handleClick
4920
2912
  })) : createCommentVNode("", true),
4921
- createElementVNode("div", _hoisted_1$b, [
2913
+ createElementVNode("div", _hoisted_1$c, [
4922
2914
  createElementVNode("div", {
4923
2915
  ref_key: "googlePayButtonRef",
4924
2916
  ref: googlePayButtonRef
@@ -4928,15 +2920,15 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
4928
2920
  };
4929
2921
  }
4930
2922
  });
4931
- const _hoisted_1$a = {
2923
+ const _hoisted_1$b = {
4932
2924
  key: 0,
4933
2925
  class: "mt-4n"
4934
2926
  };
4935
- const _hoisted_2$5 = { class: "mb-2" };
4936
- const _hoisted_3$2 = { class: "grid grid-cols-6 gap-1 md:gap-2" };
4937
- const _hoisted_4$2 = { class: "h-4 mt-4" };
2927
+ const _hoisted_2$7 = { class: "mb-2" };
2928
+ const _hoisted_3$4 = { class: "grid grid-cols-6 gap-1 md:gap-2" };
2929
+ const _hoisted_4$3 = { class: "h-4 mt-4" };
4938
2930
  const DEFAULT_EXPRESS_PAYMENT_BUTTON_COUNT = 2;
4939
- const _sfc_main$c = /* @__PURE__ */ defineComponent({
2931
+ const _sfc_main$d = /* @__PURE__ */ defineComponent({
4940
2932
  __name: "ExpressPaymentMethods",
4941
2933
  props: {
4942
2934
  amount: { type: Object },
@@ -5010,12 +3002,12 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
5010
3002
  return (paymentMethodOptionsResponseEntryIncludingApplePay.value ? 1 : 0) + (paymentMethodOptionsResponseEntryIncludingGooglePay.value ? 1 : 0) + (paymentMethodOptionsResponseEntryIncludingPayPal.value ? 1 : 0);
5011
3003
  });
5012
3004
  return (_ctx, _cache) => {
5013
- return hasPaymentMethodOptions.value ? (openBlock(), createElementBlock("div", _hoisted_1$a, [
5014
- createElementVNode("div", _hoisted_2$5, [
5015
- !isReady.value ? (openBlock(), createBlock(_sfc_main$X, {
3005
+ return hasPaymentMethodOptions.value ? (openBlock(), createElementBlock("div", _hoisted_1$b, [
3006
+ createElementVNode("div", _hoisted_2$7, [
3007
+ !isReady.value ? (openBlock(), createBlock(_sfc_main$K, {
5016
3008
  key: 0,
5017
3009
  variant: "title"
5018
- })) : (openBlock(), createBlock(unref(_sfc_main$C), {
3010
+ })) : (openBlock(), createBlock(unref(_sfc_main$r), {
5019
3011
  key: 1,
5020
3012
  variant: "heading-3",
5021
3013
  tag: "h2"
@@ -5030,10 +3022,10 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
5030
3022
  _: 1
5031
3023
  }))
5032
3024
  ]),
5033
- createElementVNode("div", _hoisted_3$2, [
3025
+ createElementVNode("div", _hoisted_3$4, [
5034
3026
  !isReady.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
5035
- createVNode(_sfc_main$X, { class: "h-11 col-span-3" }),
5036
- createVNode(_sfc_main$X, { class: "h-11 col-span-3" })
3027
+ createVNode(_sfc_main$K, { class: "h-11 col-span-3" }),
3028
+ createVNode(_sfc_main$K, { class: "h-11 col-span-3" })
5037
3029
  ], 64)) : createCommentVNode("", true),
5038
3030
  createElementVNode("div", {
5039
3031
  class: normalizeClass(["col-span-3 md:col-span-2", {
@@ -5043,7 +3035,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
5043
3035
  "!col-span-6 md:!col-span-2": expressPaymentButtonCount.value === 3
5044
3036
  }])
5045
3037
  }, [
5046
- paymentMethodOptionsResponseEntryIncludingApplePay.value ? (openBlock(), createBlock(_sfc_main$f, {
3038
+ paymentMethodOptionsResponseEntryIncludingApplePay.value ? (openBlock(), createBlock(_sfc_main$g, {
5047
3039
  key: 0,
5048
3040
  amount: __props.amount,
5049
3041
  "billing-information": __props.billingInformation,
@@ -5063,7 +3055,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
5063
3055
  "md:!col-span-3": expressPaymentButtonCount.value === 2
5064
3056
  }])
5065
3057
  }, [
5066
- paymentMethodOptionsResponseEntryIncludingGooglePay.value ? (openBlock(), createBlock(_sfc_main$d, {
3058
+ paymentMethodOptionsResponseEntryIncludingGooglePay.value ? (openBlock(), createBlock(_sfc_main$e, {
5067
3059
  key: 0,
5068
3060
  amount: __props.amount,
5069
3061
  "billing-information": __props.billingInformation,
@@ -5081,7 +3073,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
5081
3073
  "md:!col-span-3": expressPaymentButtonCount.value === 2
5082
3074
  }])
5083
3075
  }, [
5084
- paymentMethodOptionsResponseEntryIncludingPayPal.value ? (openBlock(), createBlock(_sfc_main$e, {
3076
+ paymentMethodOptionsResponseEntryIncludingPayPal.value ? (openBlock(), createBlock(_sfc_main$f, {
5085
3077
  key: 0,
5086
3078
  amount: __props.amount,
5087
3079
  "billing-information": __props.billingInformation,
@@ -5093,11 +3085,11 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
5093
3085
  }, null, 8, ["amount", "billing-information", "country-code", "locale", "is-visible", "payment-method-options-response"])) : createCommentVNode("", true)
5094
3086
  ], 2)
5095
3087
  ]),
5096
- createElementVNode("div", _hoisted_4$2, [
5097
- !isReady.value ? (openBlock(), createBlock(_sfc_main$X, {
3088
+ createElementVNode("div", _hoisted_4$3, [
3089
+ !isReady.value ? (openBlock(), createBlock(_sfc_main$K, {
5098
3090
  key: 0,
5099
3091
  variant: "divider-text"
5100
- })) : (openBlock(), createBlock(unref(_sfc_main$Y), {
3092
+ })) : (openBlock(), createBlock(unref(_sfc_main$L), {
5101
3093
  key: 1,
5102
3094
  text: unref($t)({
5103
3095
  defaultMessage: "Or",
@@ -5111,8 +3103,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
5111
3103
  };
5112
3104
  }
5113
3105
  });
5114
- const _hoisted_1$9 = { class: "grid grid-cols-2 gap-2" };
5115
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
3106
+ const _hoisted_1$a = { class: "grid grid-cols-2 gap-2" };
3107
+ const _sfc_main$c = /* @__PURE__ */ defineComponent({
5116
3108
  __name: "TieredTableRow",
5117
3109
  props: {
5118
3110
  band: { type: Object },
@@ -5141,8 +3133,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
5141
3133
  return props.band.tier_top_bound.number;
5142
3134
  });
5143
3135
  return (_ctx, _cache) => {
5144
- return openBlock(), createElementBlock("div", _hoisted_1$9, [
5145
- createVNode(unref(_sfc_main$C), {
3136
+ return openBlock(), createElementBlock("div", _hoisted_1$a, [
3137
+ createVNode(unref(_sfc_main$r), {
5146
3138
  variant: "body-xs",
5147
3139
  shade: "lighter",
5148
3140
  tag: "div"
@@ -5175,7 +3167,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
5175
3167
  ]),
5176
3168
  _: 1
5177
3169
  }),
5178
- createVNode(unref(_sfc_main$C), {
3170
+ createVNode(unref(_sfc_main$r), {
5179
3171
  variant: "body-xs",
5180
3172
  shade: "lighter",
5181
3173
  tag: "div",
@@ -5203,8 +3195,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
5203
3195
  };
5204
3196
  }
5205
3197
  });
5206
- const _hoisted_1$8 = { class: "grid grid-cols-1 gap-0.5 pt-1.5" };
5207
- const _sfc_main$a = /* @__PURE__ */ defineComponent({
3198
+ const _hoisted_1$9 = { class: "grid grid-cols-1 gap-0.5 pt-1.5" };
3199
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
5208
3200
  __name: "TieredTable",
5209
3201
  props: {
5210
3202
  bands: { type: Array },
@@ -5212,9 +3204,9 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
5212
3204
  },
5213
3205
  setup(__props) {
5214
3206
  return (_ctx, _cache) => {
5215
- return openBlock(), createElementBlock("div", _hoisted_1$8, [
3207
+ return openBlock(), createElementBlock("div", _hoisted_1$9, [
5216
3208
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.bands, (band, index) => {
5217
- return openBlock(), createBlock(_sfc_main$b, {
3209
+ return openBlock(), createBlock(_sfc_main$c, {
5218
3210
  key: index,
5219
3211
  band,
5220
3212
  "is-first": index === 0,
@@ -5247,7 +3239,7 @@ function useSeatBasedPricing({
5247
3239
  pricingItemConfigId
5248
3240
  }) {
5249
3241
  return computed(() => {
5250
- var _a, _b;
3242
+ var _a, _b, _c, _d, _e, _f;
5251
3243
  const { config, productItem } = getPricingItemByPricingConfigId({
5252
3244
  pricings,
5253
3245
  pricingItemConfigId
@@ -5262,18 +3254,18 @@ function useSeatBasedPricing({
5262
3254
  description: productItem == null ? void 0 : productItem.description
5263
3255
  },
5264
3256
  pricing: {
5265
- ...(config == null ? void 0 : config.type) === "FLAT" && { amount: (_b = (_a = config.bands) == null ? void 0 : _a[0]) == null ? void 0 : _b.amount },
5266
- ...(config == null ? void 0 : config.type) === "TIERED" && { tiered: { bands: config.bands } }
3257
+ ...((_a = config == null ? void 0 : config.details) == null ? void 0 : _a.pricing_type) === "FLAT" && { amount: (_d = (_c = (_b = config.details) == null ? void 0 : _b.bands) == null ? void 0 : _c[0]) == null ? void 0 : _d.amount },
3258
+ ...((_e = config == null ? void 0 : config.details) == null ? void 0 : _e.pricing_type) === "TIERED" && { tiered: { bands: (_f = config.details) == null ? void 0 : _f.bands } }
5267
3259
  }
5268
3260
  };
5269
3261
  });
5270
3262
  }
5271
- const _hoisted_1$7 = { class: "flex flex-row-reverse md:flex-row gap-4" };
5272
- const _hoisted_2$4 = { class: "w-24 md:w-32 shrink-0 justify-start" };
5273
- const _hoisted_3$1 = ["tabindex"];
5274
- const _hoisted_4$1 = { key: 0 };
5275
- const _hoisted_5$1 = { key: 0 };
5276
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3263
+ const _hoisted_1$8 = { class: "flex flex-row-reverse md:flex-row gap-4" };
3264
+ const _hoisted_2$6 = { class: "w-24 md:w-32 shrink-0 justify-start" };
3265
+ const _hoisted_3$3 = ["tabindex"];
3266
+ const _hoisted_4$2 = { key: 0 };
3267
+ const _hoisted_5$2 = { key: 0 };
3268
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
5277
3269
  __name: "SeatsEditorItem",
5278
3270
  props: /* @__PURE__ */ mergeModels({
5279
3271
  modelValue: { type: Object },
@@ -5310,9 +3302,9 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
5310
3302
  return (_ctx, _cache) => {
5311
3303
  var _a, _b, _c;
5312
3304
  return openBlock(), createElementBlock("div", null, [
5313
- createElementVNode("div", _hoisted_1$7, [
5314
- createElementVNode("div", _hoisted_2$4, [
5315
- createVNode(unref(_sfc_main$p), {
3305
+ createElementVNode("div", _hoisted_1$8, [
3306
+ createElementVNode("div", _hoisted_2$6, [
3307
+ createVNode(unref(_sfc_main$M), {
5316
3308
  modelValue: seatsNumber.value,
5317
3309
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => seatsNumber.value = $event),
5318
3310
  size: "sm",
@@ -5324,7 +3316,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
5324
3316
  tabindex: isCollapsible.value ? 0 : void 0,
5325
3317
  onClick: _cache[1] || (_cache[1] = ($event) => isCollapsible.value ? isExpanded.value = !isExpanded.value : void 0)
5326
3318
  }, [
5327
- createVNode(unref(_sfc_main$C), {
3319
+ createVNode(unref(_sfc_main$r), {
5328
3320
  tag: "span",
5329
3321
  variant: "body-sm",
5330
3322
  weight: "semibold"
@@ -5338,7 +3330,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
5338
3330
  ]),
5339
3331
  _: 1
5340
3332
  }),
5341
- unref(seats).pricing.amount ? (openBlock(), createBlock(unref(_sfc_main$C), {
3333
+ unref(seats).pricing.amount ? (openBlock(), createBlock(unref(_sfc_main$r), {
5342
3334
  key: 0,
5343
3335
  tag: "span",
5344
3336
  variant: "body-xs",
@@ -5361,7 +3353,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
5361
3353
  )), 1)
5362
3354
  ]),
5363
3355
  _: 1
5364
- })) : unref(seats).pricing.tiered ? (openBlock(), createBlock(unref(_sfc_main$C), {
3356
+ })) : unref(seats).pricing.tiered ? (openBlock(), createBlock(unref(_sfc_main$r), {
5365
3357
  key: 1,
5366
3358
  tag: "span",
5367
3359
  variant: "body-xs",
@@ -5373,7 +3365,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
5373
3365
  id: "seats.tiered_pricing_label",
5374
3366
  description: "The label indicating tiered pricing structure for seats"
5375
3367
  })) + " ", 1),
5376
- createVNode(unref(_sfc_main$I), {
3368
+ createVNode(unref(_sfc_main$J), {
5377
3369
  icon: "keyboard_arrow_down",
5378
3370
  size: "xs",
5379
3371
  class: normalizeClass(["absolute transition ease-in-out text-gray-400", { "rotate-0": !isExpanded.value, "rotate-180": isExpanded.value }])
@@ -5381,13 +3373,13 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
5381
3373
  ]),
5382
3374
  _: 1
5383
3375
  })) : createCommentVNode("", true)
5384
- ], 10, _hoisted_3$1)
3376
+ ], 10, _hoisted_3$3)
5385
3377
  ]),
5386
- ((_c = (_b = unref(seats).pricing) == null ? void 0 : _b.tiered) == null ? void 0 : _c.bands) ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
5387
- createVNode(unref(_sfc_main$G), null, {
3378
+ ((_c = (_b = unref(seats).pricing) == null ? void 0 : _b.tiered) == null ? void 0 : _c.bands) ? (openBlock(), createElementBlock("div", _hoisted_4$2, [
3379
+ createVNode(unref(_sfc_main$w), null, {
5388
3380
  default: withCtx(() => [
5389
- isExpanded.value ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
5390
- createVNode(_sfc_main$a, {
3381
+ isExpanded.value ? (openBlock(), createElementBlock("div", _hoisted_5$2, [
3382
+ createVNode(_sfc_main$b, {
5391
3383
  bands: unref(seats).pricing.tiered.bands,
5392
3384
  period: unref(seats).billing.period
5393
3385
  }, null, 8, ["bands", "period"])
@@ -5400,7 +3392,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
5400
3392
  };
5401
3393
  }
5402
3394
  });
5403
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
3395
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
5404
3396
  __name: "SeatsEditor",
5405
3397
  props: /* @__PURE__ */ mergeModels({
5406
3398
  modelValue: { type: Array },
@@ -5423,11 +3415,11 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
5423
3415
  });
5424
3416
  return (_ctx, _cache) => {
5425
3417
  return openBlock(true), createElementBlock(Fragment, null, renderList(__props.modelValue, (item, index) => {
5426
- return openBlock(), createBlock(unref(_sfc_main$Q), { key: index }, {
3418
+ return openBlock(), createBlock(unref(_sfc_main$s), { key: index }, {
5427
3419
  default: withCtx(() => {
5428
3420
  var _a;
5429
3421
  return [
5430
- item.pricing_item_config_id ? (openBlock(), createBlock(_sfc_main$9, {
3422
+ item.pricing_item_config_id ? (openBlock(), createBlock(_sfc_main$a, {
5431
3423
  key: item.pricing_item_config_id,
5432
3424
  modelValue: itemModel(index).value,
5433
3425
  "onUpdate:modelValue": ($event) => itemModel(index).value = $event,
@@ -5442,15 +3434,15 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
5442
3434
  };
5443
3435
  }
5444
3436
  });
5445
- const _hoisted_1$6 = { class: "flex gap-4 border-l-2 border-primary-600 px-2" };
5446
- const _hoisted_2$3 = { class: "grow" };
5447
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3437
+ const _hoisted_1$7 = { class: "flex gap-4 border-l-2 border-primary-600 px-2" };
3438
+ const _hoisted_2$5 = { class: "grow" };
3439
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
5448
3440
  __name: "PricingGroupTitle",
5449
3441
  setup(__props) {
5450
3442
  return (_ctx, _cache) => {
5451
- return openBlock(), createElementBlock("div", _hoisted_1$6, [
5452
- createElementVNode("div", _hoisted_2$3, [
5453
- createVNode(unref(_sfc_main$C), {
3443
+ return openBlock(), createElementBlock("div", _hoisted_1$7, [
3444
+ createElementVNode("div", _hoisted_2$5, [
3445
+ createVNode(unref(_sfc_main$r), {
5454
3446
  tag: "span",
5455
3447
  variant: "body-sm",
5456
3448
  weight: "semibold"
@@ -5462,7 +3454,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
5462
3454
  })
5463
3455
  ]),
5464
3456
  createElementVNode("div", null, [
5465
- createVNode(unref(_sfc_main$C), {
3457
+ createVNode(unref(_sfc_main$r), {
5466
3458
  tag: "span",
5467
3459
  variant: "body-xs",
5468
3460
  shade: "lighter"
@@ -5477,9 +3469,9 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
5477
3469
  };
5478
3470
  }
5479
3471
  });
5480
- const _hoisted_1$5 = { class: "p-1" };
5481
- const _hoisted_2$2 = { class: "grid grid-cols-1 gap-1 pt-1" };
5482
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3472
+ const _hoisted_1$6 = { class: "p-1" };
3473
+ const _hoisted_2$4 = { class: "grid grid-cols-1 gap-1 pt-1" };
3474
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
5483
3475
  __name: "AddonSingleEditor",
5484
3476
  props: /* @__PURE__ */ mergeModels({
5485
3477
  constraint: { type: String },
@@ -5538,10 +3530,10 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
5538
3530
  }
5539
3531
  };
5540
3532
  return (_ctx, _cache) => {
5541
- return openBlock(), createBlock(unref(_sfc_main$Q), { "no-spacing": "" }, {
3533
+ return openBlock(), createBlock(unref(_sfc_main$s), { "no-spacing": "" }, {
5542
3534
  default: withCtx(() => [
5543
- createElementVNode("div", _hoisted_1$5, [
5544
- createVNode(_sfc_main$7, null, {
3535
+ createElementVNode("div", _hoisted_1$6, [
3536
+ createVNode(_sfc_main$8, null, {
5545
3537
  title: withCtx(() => [
5546
3538
  createTextVNode(toDisplayString(__props.groupName), 1)
5547
3539
  ]),
@@ -5550,9 +3542,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
5550
3542
  ]),
5551
3543
  _: 1
5552
3544
  }),
5553
- createElementVNode("div", _hoisted_2$2, [
3545
+ createElementVNode("div", _hoisted_2$4, [
5554
3546
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.pricings, (pricing) => {
5555
- return openBlock(), createBlock(unref(_sfc_main$Q), {
3547
+ return openBlock(), createBlock(unref(_sfc_main$s), {
5556
3548
  key: pricing.id,
5557
3549
  "content-background": "none",
5558
3550
  class: normalizeClass({ "!bg-white": isSelected(pricing.id) })
@@ -5560,7 +3552,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
5560
3552
  default: withCtx(() => {
5561
3553
  var _a, _b;
5562
3554
  return [
5563
- createVNode(_sfc_main$W, {
3555
+ createVNode(_sfc_main$F, {
5564
3556
  name: unref(getNameFromPricing)(pricing) ?? "",
5565
3557
  description: ((_a = pricing.items) == null ? void 0 : _a[0]) ? unref(renderPricingForPricingItem)({
5566
3558
  pricingItem: (_b = pricing.items) == null ? void 0 : _b[0]
@@ -5571,7 +3563,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
5571
3563
  })
5572
3564
  }, {
5573
3565
  default: withCtx(() => [
5574
- createVNode(unref(_sfc_main$S), {
3566
+ createVNode(unref(_sfc_main$x), {
5575
3567
  "model-value": isSelected(pricing.id),
5576
3568
  "onUpdate:modelValue": ($event) => handleToggle(pricing.id)
5577
3569
  }, null, 8, ["model-value", "onUpdate:modelValue"])
@@ -5591,8 +3583,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
5591
3583
  };
5592
3584
  }
5593
3585
  });
5594
- const _hoisted_1$4 = { class: "grid grid-cols-1 gap-1" };
5595
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3586
+ const _hoisted_1$5 = { class: "grid grid-cols-1 gap-1" };
3587
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
5596
3588
  __name: "AddonMultipleEditor",
5597
3589
  props: /* @__PURE__ */ mergeModels({
5598
3590
  modelValue: { type: Array },
@@ -5624,7 +3616,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
5624
3616
  }
5625
3617
  };
5626
3618
  return (_ctx, _cache) => {
5627
- return openBlock(), createBlock(unref(_sfc_main$Q), {
3619
+ return openBlock(), createBlock(unref(_sfc_main$s), {
5628
3620
  "no-spacing": "",
5629
3621
  "no-border": !__props.groupName,
5630
3622
  "content-background": __props.groupName ? "gray" : "none"
@@ -5633,7 +3625,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
5633
3625
  createElementVNode("div", {
5634
3626
  class: normalizeClass(["grid grid-cols-1 gap-1", { "p-1": __props.groupName }])
5635
3627
  }, [
5636
- __props.groupName ? (openBlock(), createBlock(_sfc_main$7, { key: 0 }, {
3628
+ __props.groupName ? (openBlock(), createBlock(_sfc_main$8, { key: 0 }, {
5637
3629
  title: withCtx(() => [
5638
3630
  createTextVNode(toDisplayString(__props.groupName), 1)
5639
3631
  ]),
@@ -5646,9 +3638,9 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
5646
3638
  ]),
5647
3639
  _: 1
5648
3640
  })) : createCommentVNode("", true),
5649
- createElementVNode("div", _hoisted_1$4, [
3641
+ createElementVNode("div", _hoisted_1$5, [
5650
3642
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.pricings, (pricing) => {
5651
- return openBlock(), createBlock(unref(_sfc_main$Q), {
3643
+ return openBlock(), createBlock(unref(_sfc_main$s), {
5652
3644
  key: pricing.id,
5653
3645
  "content-background": __props.groupName || isSelected(pricing.id) ? "none" : "gray",
5654
3646
  class: normalizeClass({ "!bg-white": isSelected(pricing.id) })
@@ -5656,7 +3648,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
5656
3648
  default: withCtx(() => {
5657
3649
  var _a, _b;
5658
3650
  return [
5659
- createVNode(_sfc_main$W, {
3651
+ createVNode(_sfc_main$F, {
5660
3652
  name: unref(getNameFromPricing)(pricing) ?? "",
5661
3653
  description: ((_a = pricing.items) == null ? void 0 : _a[0]) ? unref(renderPricingForPricingItem)({
5662
3654
  pricingItem: (_b = pricing.items) == null ? void 0 : _b[0]
@@ -5667,7 +3659,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
5667
3659
  })
5668
3660
  }, {
5669
3661
  default: withCtx(() => [
5670
- isSelected(pricing.id) ? (openBlock(), createBlock(unref(_sfc_main$P), {
3662
+ isSelected(pricing.id) ? (openBlock(), createBlock(unref(_sfc_main$v), {
5671
3663
  key: 0,
5672
3664
  color: "gray",
5673
3665
  variant: "outline",
@@ -5675,7 +3667,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
5675
3667
  size: "sm",
5676
3668
  "icon-prefix": "remove_shopping_cart",
5677
3669
  onClick: ($event) => handleToggle(pricing.id)
5678
- }, null, 8, ["onClick"])) : (openBlock(), createBlock(unref(_sfc_main$P), {
3670
+ }, null, 8, ["onClick"])) : (openBlock(), createBlock(unref(_sfc_main$v), {
5679
3671
  key: 1,
5680
3672
  color: "primary",
5681
3673
  "icon-prefix": "add",
@@ -5707,16 +3699,11 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
5707
3699
  };
5708
3700
  }
5709
3701
  });
5710
- function useViewport() {
5711
- const breakpoints = useBreakpoints(breakpointsTailwind);
5712
- const isMobileViewport = breakpoints.smallerOrEqual("sm");
5713
- return { isMobileViewport };
5714
- }
5715
- const _hoisted_1$3 = { class: "p-1" };
5716
- const _hoisted_2$1 = { class: "pt-1" };
3702
+ const _hoisted_1$4 = { class: "p-1" };
3703
+ const _hoisted_2$3 = { class: "pt-1" };
5717
3704
  const SHOW_RADIO_GROUP_MAX_OPTIONS = 3;
5718
3705
  const SHOW_SELECT_MAX_OPTIONS = 6;
5719
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3706
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
5720
3707
  __name: "PricingGroupSingleEditor",
5721
3708
  props: /* @__PURE__ */ mergeModels({
5722
3709
  modelValue: { type: Array },
@@ -5776,31 +3763,31 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
5776
3763
  }));
5777
3764
  };
5778
3765
  return (_ctx, _cache) => {
5779
- return openBlock(), createBlock(unref(_sfc_main$Q), { "no-spacing": "" }, {
3766
+ return openBlock(), createBlock(unref(_sfc_main$s), { "no-spacing": "" }, {
5780
3767
  default: withCtx(() => [
5781
- createElementVNode("div", _hoisted_1$3, [
5782
- createVNode(_sfc_main$7, null, {
3768
+ createElementVNode("div", _hoisted_1$4, [
3769
+ createVNode(_sfc_main$8, null, {
5783
3770
  title: withCtx(() => [
5784
3771
  createTextVNode(toDisplayString(__props.groupName), 1)
5785
3772
  ]),
5786
3773
  _: 1
5787
3774
  }),
5788
- createElementVNode("div", _hoisted_2$1, [
5789
- options.value.length <= SHOW_RADIO_GROUP_MAX_OPTIONS ? (openBlock(), createBlock(unref(_sfc_main$u), {
3775
+ createElementVNode("div", _hoisted_2$3, [
3776
+ options.value.length <= SHOW_RADIO_GROUP_MAX_OPTIONS ? (openBlock(), createBlock(unref(_sfc_main$N), {
5790
3777
  key: 0,
5791
3778
  modelValue: singleModelValue.value,
5792
3779
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => singleModelValue.value = $event),
5793
3780
  options: getRadioGroupOptions(),
5794
3781
  direction: unref(isMobileViewport) ? "column" : "row",
5795
3782
  "show-radio": false
5796
- }, null, 8, ["modelValue", "options", "direction"])) : options.value.length <= SHOW_SELECT_MAX_OPTIONS ? (openBlock(), createBlock(unref(_sfc_main$q), {
3783
+ }, null, 8, ["modelValue", "options", "direction"])) : options.value.length <= SHOW_SELECT_MAX_OPTIONS ? (openBlock(), createBlock(unref(_sfc_main$G), {
5797
3784
  key: 1,
5798
3785
  "single-model-value": singleModelValue.value,
5799
3786
  "onUpdate:singleModelValue": _cache[1] || (_cache[1] = ($event) => singleModelValue.value = $event),
5800
3787
  options: getSelectOptions(),
5801
3788
  size: "xl",
5802
3789
  "show-sub-label-in-input": ""
5803
- }, null, 8, ["single-model-value", "options"])) : (openBlock(), createBlock(unref(_sfc_main$Z), {
3790
+ }, null, 8, ["single-model-value", "options"])) : (openBlock(), createBlock(unref(_sfc_main$O), {
5804
3791
  key: 2,
5805
3792
  modelValue: singleModelValue.value,
5806
3793
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => singleModelValue.value = $event),
@@ -5820,8 +3807,8 @@ function getAllPricingsFromPricingPlanVersion(pricingPlanVersion) {
5820
3807
  const pricings = ((_a = pricingPlanVersion.pricing_categories) == null ? void 0 : _a.flatMap((category) => category.pricings ?? [])) ?? [];
5821
3808
  return pricings.filter((pricing) => pricing !== null);
5822
3809
  }
5823
- const _hoisted_1$2 = { class: "grid grid-cols-1 gap-1" };
5824
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3810
+ const _hoisted_1$3 = { class: "sv-plan-customization__body grid grid-cols-1 gap-1" };
3811
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
5825
3812
  __name: "PlanCustomizationEditor",
5826
3813
  props: /* @__PURE__ */ mergeModels({
5827
3814
  subscription: { type: Object },
@@ -5861,7 +3848,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
5861
3848
  () => getPricingGroupsFromExtendedPricingPlanSubscription(props.subscription)
5862
3849
  );
5863
3850
  return (_ctx, _cache) => {
5864
- return openBlock(), createBlock(unref(_sfc_main$Q), {
3851
+ return openBlock(), createBlock(unref(_sfc_main$s), {
3852
+ class: "sv-plan-customization",
5865
3853
  title: unref($t)({
5866
3854
  defaultMessage: "Customize plan",
5867
3855
  id: "checkout.customize_plan_block.title",
@@ -5872,10 +3860,11 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
5872
3860
  "content-background": "none"
5873
3861
  }, {
5874
3862
  default: withCtx(() => [
5875
- createElementVNode("div", _hoisted_1$2, [
5876
- createVNode(_sfc_main$8, {
3863
+ createElementVNode("div", _hoisted_1$3, [
3864
+ createVNode(_sfc_main$9, {
5877
3865
  modelValue: seatsModel.value,
5878
3866
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => seatsModel.value = $event),
3867
+ class: "sv-plan-customization__seats",
5879
3868
  "initial-seats-values": __props.initialSeatsValues,
5880
3869
  pricings: pricings.value
5881
3870
  }, null, 8, ["modelValue", "initial-seats-values", "pricings"]),
@@ -5883,27 +3872,30 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
5883
3872
  return openBlock(), createElementBlock(Fragment, {
5884
3873
  key: pricingGroup.id
5885
3874
  }, [
5886
- pricingGroup.product_type === "DEFAULT" && pricingGroup.selection_constraint === "EXACTLY_ONE" ? (openBlock(), createBlock(_sfc_main$4, {
3875
+ pricingGroup.product_type === "DEFAULT" && pricingGroup.selection_constraint === "EXACTLY_ONE" ? (openBlock(), createBlock(_sfc_main$5, {
5887
3876
  key: 0,
5888
3877
  modelValue: enabledPricingIdsModel.value,
5889
3878
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => enabledPricingIdsModel.value = $event),
3879
+ class: "sv-plan-customization__group",
5890
3880
  "group-name": pricingGroup.name,
5891
3881
  pricings: pricingGroup.pricings,
5892
3882
  "billing-period": __props.billingPeriod,
5893
3883
  currency: __props.currency
5894
- }, null, 8, ["modelValue", "group-name", "pricings", "billing-period", "currency"])) : pricingGroup.product_type === "ADDON" && pricingGroup.selection_constraint === "AT_MOST_ONE" ? (openBlock(), createBlock(_sfc_main$6, {
3884
+ }, null, 8, ["modelValue", "group-name", "pricings", "billing-period", "currency"])) : pricingGroup.product_type === "ADDON" && pricingGroup.selection_constraint === "AT_MOST_ONE" ? (openBlock(), createBlock(_sfc_main$7, {
5895
3885
  key: 1,
5896
3886
  modelValue: enabledPricingIdsModel.value,
5897
3887
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => enabledPricingIdsModel.value = $event),
3888
+ class: "sv-plan-customization__group",
5898
3889
  "group-name": pricingGroup.name,
5899
3890
  pricings: pricingGroup.pricings,
5900
3891
  constraint: pricingGroup.selection_constraint,
5901
3892
  "billing-period": __props.billingPeriod,
5902
3893
  currency: __props.currency
5903
- }, null, 8, ["modelValue", "group-name", "pricings", "constraint", "billing-period", "currency"])) : pricingGroup.product_type === "ADDON" && pricingGroup.selection_constraint === "ANY" ? (openBlock(), createBlock(_sfc_main$5, {
3894
+ }, null, 8, ["modelValue", "group-name", "pricings", "constraint", "billing-period", "currency"])) : pricingGroup.product_type === "ADDON" && pricingGroup.selection_constraint === "ANY" ? (openBlock(), createBlock(_sfc_main$6, {
5904
3895
  key: 2,
5905
3896
  modelValue: enabledPricingIdsModel.value,
5906
3897
  "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => enabledPricingIdsModel.value = $event),
3898
+ class: "sv-plan-customization__group",
5907
3899
  pricings: pricingGroup.pricings,
5908
3900
  "group-name": pricingGroup.name,
5909
3901
  "billing-period": __props.billingPeriod,
@@ -5911,9 +3903,10 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
5911
3903
  }, null, 8, ["modelValue", "pricings", "group-name", "billing-period", "currency"])) : createCommentVNode("", true)
5912
3904
  ], 64);
5913
3905
  }), 128)),
5914
- createVNode(_sfc_main$5, {
3906
+ createVNode(_sfc_main$6, {
5915
3907
  modelValue: enabledPricingIdsModel.value,
5916
3908
  "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => enabledPricingIdsModel.value = $event),
3909
+ class: "sv-plan-customization__group",
5917
3910
  pricings: addonPricings.value,
5918
3911
  "billing-period": __props.billingPeriod,
5919
3912
  currency: __props.currency
@@ -5925,18 +3918,18 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
5925
3918
  };
5926
3919
  }
5927
3920
  });
5928
- const _hoisted_1$1 = ["aria-expanded", "aria-label"];
5929
- const _hoisted_2 = { class: "flex flex-row items-center justify-between w-full gap-3 px-3 py-2 cursor-pointer" };
5930
- const _hoisted_3 = { class: "flex flex-row gap-2 items-center" };
5931
- const _hoisted_4 = ["onKeydown"];
5932
- const _hoisted_5 = ["aria-label"];
5933
- const _hoisted_6 = { class: "flex flex-row items-center justify-between w-full gap-3 px-3 py-2 cursor-pointer" };
5934
- const _hoisted_7 = { class: "flex flex-row gap-2 items-center" };
3921
+ const _hoisted_1$2 = ["aria-expanded", "aria-label"];
3922
+ const _hoisted_2$2 = { class: "flex w-full cursor-pointer flex-row items-center justify-between gap-3 px-3 py-2" };
3923
+ const _hoisted_3$2 = { class: "flex flex-row items-center gap-2" };
3924
+ const _hoisted_4$1 = ["onKeydown"];
3925
+ const _hoisted_5$1 = ["aria-label"];
3926
+ const _hoisted_6$1 = { class: "flex w-full cursor-pointer flex-row items-center justify-between gap-3 px-3 py-2" };
3927
+ const _hoisted_7 = { class: "flex flex-row items-center gap-2" };
5935
3928
  const _hoisted_8 = {
5936
3929
  class: "sr-only",
5937
3930
  "aria-live": "polite"
5938
3931
  };
5939
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3932
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
5940
3933
  __name: "PromotionCodeSection",
5941
3934
  props: {
5942
3935
  promotionCode: { default: null, type: [String, null] }
@@ -6057,10 +4050,10 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
6057
4050
  );
6058
4051
  return (_ctx, _cache) => {
6059
4052
  return openBlock(), createElementBlock(Fragment, null, [
6060
- !isApplied.value ? (openBlock(), createBlock(unref(_sfc_main$Q), {
4053
+ !isApplied.value ? (openBlock(), createBlock(unref(_sfc_main$s), {
6061
4054
  key: 0,
6062
4055
  "no-spacing": "",
6063
- class: "w-full relative"
4056
+ class: "relative w-full"
6064
4057
  }, {
6065
4058
  default: withCtx(() => [
6066
4059
  createElementVNode("button", {
@@ -6073,10 +4066,10 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
6073
4066
  "aria-label": toggleAriaLabel.value,
6074
4067
  onClick: toggleExpanded
6075
4068
  }, [
6076
- createElementVNode("div", _hoisted_2, [
6077
- createElementVNode("div", _hoisted_3, [
6078
- createVNode(unref(_sfc_main$I), { icon: "local_activity" }),
6079
- createVNode(unref(_sfc_main$C), {
4069
+ createElementVNode("div", _hoisted_2$2, [
4070
+ createElementVNode("div", _hoisted_3$2, [
4071
+ createVNode(unref(_sfc_main$J), { icon: "local_activity" }),
4072
+ createVNode(unref(_sfc_main$r), {
6080
4073
  id: labelId,
6081
4074
  variant: "body-sm"
6082
4075
  }, {
@@ -6090,21 +4083,21 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
6090
4083
  _: 1
6091
4084
  })
6092
4085
  ]),
6093
- createVNode(unref(_sfc_main$I), {
4086
+ createVNode(unref(_sfc_main$J), {
6094
4087
  icon: isExpanded.value ? "remove" : "add"
6095
4088
  }, null, 8, ["icon"])
6096
4089
  ])
6097
- ], 8, _hoisted_1$1),
4090
+ ], 8, _hoisted_1$2),
6098
4091
  withDirectives(createElementVNode("div", {
6099
4092
  id: panelId,
6100
4093
  ref_key: "panelRef",
6101
4094
  ref: panelRef,
6102
4095
  role: "region",
6103
4096
  "aria-labelledby": labelId,
6104
- class: "w-full border-t px-3 py-2 flex flex-row gap-2 items-center overflow-hidden",
4097
+ class: "flex w-full flex-row items-center gap-2 overflow-hidden border-t px-3 py-2",
6105
4098
  onKeydown: withKeys(withModifiers(collapseExpanded, ["prevent"]), ["esc"])
6106
4099
  }, [
6107
- createVNode(unref(_sfc_main$N), {
4100
+ createVNode(unref(_sfc_main$t), {
6108
4101
  modelValue: inputValue.value,
6109
4102
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
6110
4103
  placeholder: unref($t)({
@@ -6120,7 +4113,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
6120
4113
  class: "w-full",
6121
4114
  onKeydown: withKeys(withModifiers(applyCode, ["prevent"]), ["enter"])
6122
4115
  }, null, 8, ["modelValue", "placeholder", "aria-label", "onKeydown"]),
6123
- createVNode(unref(_sfc_main$P), {
4116
+ createVNode(unref(_sfc_main$v), {
6124
4117
  type: "button",
6125
4118
  disabled: !canApply.value,
6126
4119
  "aria-label": applyAriaLabel.value,
@@ -6136,29 +4129,29 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
6136
4129
  ]),
6137
4130
  _: 1
6138
4131
  }, 8, ["disabled", "aria-label", "aria-disabled"])
6139
- ], 40, _hoisted_4), [
4132
+ ], 40, _hoisted_4$1), [
6140
4133
  [vShow, isExpanded.value]
6141
4134
  ])
6142
4135
  ]),
6143
4136
  _: 1
6144
- })) : (openBlock(), createBlock(unref(_sfc_main$Q), {
4137
+ })) : (openBlock(), createBlock(unref(_sfc_main$s), {
6145
4138
  key: 1,
6146
4139
  "no-border": "",
6147
4140
  "no-spacing": "",
6148
4141
  "content-background": "none",
6149
- class: "w-full relative"
4142
+ class: "relative w-full"
6150
4143
  }, {
6151
4144
  default: withCtx(() => [
6152
4145
  createElementVNode("button", {
6153
4146
  type: "button",
6154
- class: "w-full bg-white border border-primary-900 rounded",
4147
+ class: "w-full rounded border border-primary-900 bg-white",
6155
4148
  "aria-label": removeAriaLabel.value,
6156
4149
  onClick: removeCode
6157
4150
  }, [
6158
- createElementVNode("div", _hoisted_6, [
4151
+ createElementVNode("div", _hoisted_6$1, [
6159
4152
  createElementVNode("div", _hoisted_7, [
6160
- createVNode(unref(_sfc_main$I), { icon: "local_activity" }),
6161
- createVNode(unref(_sfc_main$C), {
4153
+ createVNode(unref(_sfc_main$J), { icon: "local_activity" }),
4154
+ createVNode(unref(_sfc_main$r), {
6162
4155
  variant: "body-sm",
6163
4156
  class: "font-semibold"
6164
4157
  }, {
@@ -6168,9 +4161,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
6168
4161
  _: 1
6169
4162
  })
6170
4163
  ]),
6171
- createVNode(unref(_sfc_main$I), { icon: "close" })
4164
+ createVNode(unref(_sfc_main$J), { icon: "close" })
6172
4165
  ])
6173
- ], 8, _hoisted_5)
4166
+ ], 8, _hoisted_5$1)
6174
4167
  ]),
6175
4168
  _: 1
6176
4169
  })),
@@ -6179,7 +4172,90 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
6179
4172
  };
6180
4173
  }
6181
4174
  });
6182
- const _hoisted_1 = { key: 0 };
4175
+ const _hoisted_1$1 = { class: "flex justify-around" };
4176
+ const _hoisted_2$1 = { class: "flex items-center gap-0.5" };
4177
+ const _hoisted_3$1 = {
4178
+ key: 0,
4179
+ xmlns: "http://www.w3.org/2000/svg",
4180
+ width: "40",
4181
+ height: "15",
4182
+ fill: "none",
4183
+ viewBox: "0 0 40 15",
4184
+ class: "inline-block translate-y-[1px]"
4185
+ };
4186
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
4187
+ __name: "SecurePaymentsKPI",
4188
+ props: {
4189
+ paymentMethodOptions: { type: Array }
4190
+ },
4191
+ setup(__props) {
4192
+ const props = __props;
4193
+ const { $t } = useIntl();
4194
+ const showAdyen = computed(
4195
+ () => props.paymentMethodOptions.find(
4196
+ ({ integration }) => {
4197
+ var _a;
4198
+ return ((_a = integration.payment_gateway) == null ? void 0 : _a.variant) === "ADYEN";
4199
+ }
4200
+ )
4201
+ );
4202
+ const securePaymentsText = computed(() => {
4203
+ if (showAdyen.value) {
4204
+ return $t({
4205
+ defaultMessage: "Secure and encrypted payments by",
4206
+ description: "Secure encrypted payments KPI for a specific vendor, followed by a vendor logo",
4207
+ id: "secure_payments_kpi.specific_vendor"
4208
+ });
4209
+ }
4210
+ return $t({
4211
+ defaultMessage: "Secure and encrypted payments",
4212
+ description: "Secure encrypted payments KPI",
4213
+ id: "secure_payments_kpi.generic"
4214
+ });
4215
+ });
4216
+ return (_ctx, _cache) => {
4217
+ return openBlock(), createElementBlock("div", _hoisted_1$1, [
4218
+ createElementVNode("div", _hoisted_2$1, [
4219
+ createVNode(unref(_sfc_main$J), {
4220
+ icon: "lock",
4221
+ size: "xs"
4222
+ }),
4223
+ createVNode(unref(_sfc_main$r), {
4224
+ tag: "span",
4225
+ variant: "body-xs",
4226
+ shade: "lighter"
4227
+ }, {
4228
+ default: withCtx(() => [
4229
+ createTextVNode(toDisplayString(securePaymentsText.value) + " ", 1),
4230
+ showAdyen.value ? (openBlock(), createElementBlock("svg", _hoisted_3$1, [..._cache[0] || (_cache[0] = [
4231
+ createElementVNode("path", {
4232
+ fill: "currentColor",
4233
+ d: "M.049 2.917h5.845c.646 0 1.17.522 1.17 1.166v5.834H1.217c-.646 0-1.17-.522-1.17-1.167V5.833h2.924v2.334H4.14v-3.5H.049zM32.784 2.917v7h2.922v-5.25h1.17v5.25h2.922V4.083c0-.644-.523-1.166-1.169-1.166zM16.417 12.833h5.845c.646 0 1.17-.522 1.17-1.166v-8.75h-2.924v5.25H19.34v-5.25h-2.922V8.75c0 .645.523 1.167 1.169 1.167h2.922v1.166h-4.091zM31.614 9.917H25.77c-.646 0-1.17-.522-1.17-1.167V2.917h5.846c.646 0 1.17.522 1.17 1.166V7h-2.923V4.667h-1.17v3.5h4.092zM15.248 0v9.917H9.402c-.646 0-1.17-.522-1.17-1.167V4.083c0-.644.524-1.166 1.17-1.166h1.754v5.25h1.169V0z"
4234
+ }, null, -1)
4235
+ ])])) : createCommentVNode("", true)
4236
+ ]),
4237
+ _: 1
4238
+ })
4239
+ ])
4240
+ ]);
4241
+ };
4242
+ }
4243
+ });
4244
+ const _hoisted_1 = { class: "sv-checkout__header" };
4245
+ const _hoisted_2 = {
4246
+ key: 5,
4247
+ class: "sv-checkout__payment-methods"
4248
+ };
4249
+ const _hoisted_3 = {
4250
+ key: 0,
4251
+ class: "sv-checkout__payment-methods-body"
4252
+ };
4253
+ const _hoisted_4 = {
4254
+ key: 2,
4255
+ class: "sv-checkout__payment-form"
4256
+ };
4257
+ const _hoisted_5 = { class: "sv-checkout__order-summary" };
4258
+ const _hoisted_6 = { class: "flex flex-col gap-2" };
6183
4259
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
6184
4260
  __name: "Checkout",
6185
4261
  props: {
@@ -6188,6 +4264,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
6188
4264
  emits: ["error", "ready"],
6189
4265
  setup(__props, { emit: __emit }) {
6190
4266
  var _a, _b, _c, _d, _e, _f, _g, _h;
4267
+ const PaymentIntegrationForm = defineAsyncComponent(
4268
+ () => import("../../PaymentIntegrationForm-DNkjhqMF.mjs")
4269
+ );
6191
4270
  const props = __props;
6192
4271
  const emit = __emit;
6193
4272
  const configuration = computed(() => props.configuration);
@@ -6453,18 +4532,15 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
6453
4532
  } = usePromotionCode({
6454
4533
  checkoutForm,
6455
4534
  updateInvoicePreviewOnBillingInformationChange,
6456
- logger,
6457
- formatErrorMessage: ({ action }) => $t(
6458
- action === "apply" ? {
6459
- defaultMessage: "Promotion code could not be applied. Please try again.",
6460
- id: "checkout.promotion_code.apply_failed",
6461
- description: "Error message when applying a promotion code in checkout failed"
6462
- } : {
6463
- defaultMessage: "Promotion code could not be removed. Please try again.",
6464
- id: "checkout.promotion_code.remove_failed",
6465
- description: "Error message when removing a promotion code in checkout failed"
6466
- }
6467
- ),
4535
+ formatErrorMessage: ({ action }) => action === "apply" ? $t({
4536
+ defaultMessage: "Promotion code could not be applied. Please try again.",
4537
+ id: "checkout.promotion_code.apply_failed",
4538
+ description: "Error message when applying a promotion code in checkout failed"
4539
+ }) : $t({
4540
+ defaultMessage: "Promotion code could not be removed. Please try again.",
4541
+ id: "checkout.promotion_code.remove_failed",
4542
+ description: "Error message when removing a promotion code in checkout failed"
4543
+ }),
6468
4544
  onInvalidPromotionCode: () => {
6469
4545
  promotionCode.value = null;
6470
4546
  },
@@ -6472,9 +4548,22 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
6472
4548
  promotionCode.value = null;
6473
4549
  }
6474
4550
  });
4551
+ const handleRedirect = () => {
4552
+ if (!successRedirectUrl) return;
4553
+ safeUrlRedirect(successRedirectUrl);
4554
+ };
6475
4555
  const handlePaymentSuccess = () => {
4556
+ var _a2;
6476
4557
  isPaid.value = true;
6477
4558
  promotionCodeErrorMessage.value = null;
4559
+ if ((_a2 = props.configuration) == null ? void 0 : _a2.onPaymentSuccess) {
4560
+ props.configuration.onPaymentSuccess();
4561
+ return;
4562
+ }
4563
+ if (successRedirectUrl) {
4564
+ handleRedirect();
4565
+ return;
4566
+ }
6478
4567
  };
6479
4568
  const handleBillingPeriodChange = (billingPeriod) => {
6480
4569
  if (!subscription.value) {
@@ -6490,32 +4579,42 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
6490
4579
  emit("ready");
6491
4580
  });
6492
4581
  return (_ctx, _cache) => {
6493
- return criticalError.value ? (openBlock(), createBlock(_sfc_main$l, { key: 0 })) : (openBlock(), createBlock(unref(ContentWithAsideLayout), { key: 1 }, {
4582
+ return criticalError.value ? (openBlock(), createBlock(_sfc_main$m, {
4583
+ key: 0,
4584
+ class: "sv-checkout sv-root sv-screen sv-checkout--error"
4585
+ })) : (openBlock(), createBlock(unref(ContentWithAsideLayout), {
4586
+ key: 1,
4587
+ class: normalizeClass(["sv-checkout sv-root sv-screen", { "sv-checkout--paid": unref(isPaid) }])
4588
+ }, {
6494
4589
  header: withCtx(() => [
6495
- createVNode(_sfc_main$X, { class: "min-h-[52px] w-96" }, {
6496
- default: withCtx(() => {
6497
- var _a2, _b2, _c2;
6498
- return [
6499
- unref(invoicePreview) && unref(subscription) && subscriptionStartDate.value ? (openBlock(), createBlock(_sfc_main$m, {
6500
- key: 0,
6501
- "trial-start-date": trialStartDate.value,
6502
- "trial-period": unref(trialPeriod),
6503
- "subscription-start-date": subscriptionStartDate.value,
6504
- "subscription-name": ((_a2 = unref(subscription)) == null ? void 0 : _a2.name) ?? "",
6505
- amount: (_b2 = unref(invoicePreview)) == null ? void 0 : _b2.invoice_amount_including_tax,
6506
- "billing-period": (_c2 = unref(subscription)) == null ? void 0 : _c2.billing_period,
6507
- "country-code": unref(checkoutForm).form.value.country
6508
- }, null, 8, ["trial-start-date", "trial-period", "subscription-start-date", "subscription-name", "amount", "billing-period", "country-code"])) : createCommentVNode("", true)
6509
- ];
6510
- }),
6511
- _: 1
6512
- })
4590
+ createElementVNode("div", _hoisted_1, [
4591
+ createVNode(_sfc_main$K, { class: "min-h-[52px] w-96" }, {
4592
+ default: withCtx(() => {
4593
+ var _a2, _b2, _c2;
4594
+ return [
4595
+ unref(invoicePreview) && unref(subscription) && subscriptionStartDate.value ? (openBlock(), createBlock(_sfc_main$n, {
4596
+ key: 0,
4597
+ class: "sv-checkout__title",
4598
+ "trial-start-date": trialStartDate.value,
4599
+ "trial-period": unref(trialPeriod),
4600
+ "subscription-start-date": subscriptionStartDate.value,
4601
+ "subscription-name": ((_a2 = unref(subscription)) == null ? void 0 : _a2.name) ?? "",
4602
+ amount: (_b2 = unref(invoicePreview)) == null ? void 0 : _b2.invoice_amount_including_tax,
4603
+ "billing-period": (_c2 = unref(subscription)) == null ? void 0 : _c2.billing_period,
4604
+ "country-code": unref(checkoutForm).form.value.country
4605
+ }, null, 8, ["trial-start-date", "trial-period", "subscription-start-date", "subscription-name", "amount", "billing-period", "country-code"])) : createCommentVNode("", true)
4606
+ ];
4607
+ }),
4608
+ _: 1
4609
+ })
4610
+ ])
6513
4611
  ]),
6514
4612
  content: withCtx(() => {
6515
4613
  var _a2, _b2, _c2;
6516
4614
  return [
6517
- unref(subscription) && unref(isMobileViewport) ? (openBlock(), createBlock(_sfc_main$i, {
4615
+ unref(subscription) && unref(isMobileViewport) ? (openBlock(), createBlock(_sfc_main$j, {
6518
4616
  key: 0,
4617
+ class: "sv-checkout__mobile-order-summary",
6519
4618
  subscription: unref(subscription),
6520
4619
  invoice: unref(invoicePreview),
6521
4620
  "invoice-preview-by-billing-period": unref(invoicePreviewByBillingPeriod),
@@ -6531,19 +4630,21 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
6531
4630
  variant: "products-inline",
6532
4631
  onBillingPeriodChange: handleBillingPeriodChange
6533
4632
  }, null, 8, ["subscription", "invoice", "invoice-preview-by-billing-period", "trial-invoice", "enabled-pricing-ids", "trial-period", "avatar", "is-paid", "is-usage-based", "is-preview-and-payment-methods-pending", "country-code"])) : createCommentVNode("", true),
6534
- showPlanCustomizationEditor.value && unref(subscription) ? (openBlock(), createBlock(_sfc_main$3, {
4633
+ showPlanCustomizationEditor.value && unref(subscription) ? (openBlock(), createBlock(_sfc_main$4, {
6535
4634
  key: 1,
6536
4635
  "seats-values": seatsValuesModel.value,
6537
4636
  "onUpdate:seatsValues": _cache[0] || (_cache[0] = ($event) => seatsValuesModel.value = $event),
6538
4637
  "enabled-pricing-ids": enabledPricingIdsModel.value,
6539
4638
  "onUpdate:enabledPricingIds": _cache[1] || (_cache[1] = ($event) => enabledPricingIdsModel.value = $event),
4639
+ class: "sv-checkout__plan-customization",
6540
4640
  subscription: unref(subscription),
6541
4641
  "initial-seats-values": (_b2 = unref(checkoutForm).initialState) == null ? void 0 : _b2.value.seatsValues,
6542
4642
  "billing-period": unref(subscription).billing_period,
6543
4643
  currency: activePricingCurrency.value
6544
4644
  }, null, 8, ["seats-values", "enabled-pricing-ids", "subscription", "initial-seats-values", "billing-period", "currency"])) : createCommentVNode("", true),
6545
- !unref(isPaid) && unref(checkoutForm).form.value.country && unref(amount) && expressPaymentMethodBillingInformation.value ? (openBlock(), createBlock(_sfc_main$c, {
4645
+ !unref(isPaid) && unref(checkoutForm).form.value.country && unref(amount) && expressPaymentMethodBillingInformation.value ? (openBlock(), createBlock(_sfc_main$d, {
6546
4646
  key: 2,
4647
+ class: "sv-checkout__express-payment-methods",
6547
4648
  amount: unref(amount),
6548
4649
  "country-code": unref(checkoutForm).form.value.country,
6549
4650
  locale: unref(locale),
@@ -6552,14 +4653,16 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
6552
4653
  "on-billing-information-change": unref(updateInvoicePreviewOnBillingInformationChange),
6553
4654
  onUpdateBillingInformation: handleUpdateBillingInformation
6554
4655
  }, null, 8, ["amount", "country-code", "locale", "payment-methods-options-response", "billing-information", "on-billing-information-change"])) : createCommentVNode("", true),
6555
- unref(isPaid) ? (openBlock(), createBlock(_sfc_main$k, {
4656
+ unref(isPaid) ? (openBlock(), createBlock(_sfc_main$l, {
6556
4657
  key: 3,
6557
- "redirect-url": unref(successRedirectUrl)
6558
- }, null, 8, ["redirect-url"])) : createCommentVNode("", true),
6559
- !unref(isPaid) ? (openBlock(), createBlock(_sfc_main$n, {
4658
+ class: "sv-checkout__completed-payment",
4659
+ onContinueToMerchant: handleRedirect
4660
+ })) : createCommentVNode("", true),
4661
+ !unref(isPaid) ? (openBlock(), createBlock(_sfc_main$o, {
6560
4662
  key: 4,
6561
4663
  modelValue: unref(checkoutForm).form.value,
6562
4664
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(checkoutForm).form.value = $event),
4665
+ class: "sv-checkout__customer-form",
6563
4666
  validation: unref(checkoutForm).validation,
6564
4667
  "read-only-email": (_c2 = props.configuration) == null ? void 0 : _c2.email,
6565
4668
  "show-customer-info-on-top": showCustomerInfoOnTop.value || unref(isPaid),
@@ -6567,175 +4670,166 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
6567
4670
  "get-is-field-required": unref(checkoutForm).getIsFieldRequired,
6568
4671
  "read-only": unref(isPaid)
6569
4672
  }, null, 8, ["modelValue", "validation", "read-only-email", "show-customer-info-on-top", "is-billing-information-mandatory", "get-is-field-required", "read-only"])) : createCommentVNode("", true),
6570
- !unref(isPaid) ? (openBlock(), createBlock(_sfc_main$X, {
6571
- key: 5,
4673
+ !unref(isPaid) ? (openBlock(), createElementBlock("div", _hoisted_2, [
4674
+ createVNode(_sfc_main$K, {
4675
+ variant: "section",
4676
+ class: "min-h-[130px]"
4677
+ }, {
4678
+ default: withCtx(() => [
4679
+ !unref(isPaymentMethodsPending) || unref(isPaymentMethodsPending) && unref(paymentMethodOptions).length > 0 ? (openBlock(), createElementBlock("div", _hoisted_3, [
4680
+ createVNode(unref(_sfc_main$r), {
4681
+ variant: "heading-3",
4682
+ tag: "h2",
4683
+ class: "sv-checkout__payment-methods-title mb-2"
4684
+ }, {
4685
+ default: withCtx(() => [
4686
+ createTextVNode(toDisplayString(unref($t)({
4687
+ defaultMessage: "Payment method",
4688
+ id: "checkout.payment_method_block.title",
4689
+ description: "The title of the payment method block in the checkout form"
4690
+ })), 1)
4691
+ ]),
4692
+ _: 1
4693
+ }),
4694
+ !unref(checkoutForm).form.value.country ? (openBlock(), createBlock(_sfc_main$i, {
4695
+ key: 0,
4696
+ class: "sv-checkout__payment-methods-empty",
4697
+ icon: "captive_portal"
4698
+ }, {
4699
+ title: withCtx(() => [
4700
+ createTextVNode(toDisplayString(unref($t)({
4701
+ defaultMessage: "Select your billing country",
4702
+ id: "checkout.payment_method_block.no_country_selected_title",
4703
+ description: "The title shown when no country is selected"
4704
+ })), 1)
4705
+ ]),
4706
+ message: withCtx(() => [
4707
+ createTextVNode(toDisplayString(unref($t)({
4708
+ defaultMessage: "Payment methods will be shown after you select the billing country.",
4709
+ id: "checkout.payment_method_block.no_country_selected_message",
4710
+ description: "The message shown when no country is selected"
4711
+ })), 1)
4712
+ ]),
4713
+ _: 1
4714
+ })) : unref(paymentMethodOptions).length === 0 ? (openBlock(), createBlock(_sfc_main$i, {
4715
+ key: 1,
4716
+ class: "sv-checkout__payment-methods-empty",
4717
+ icon: "credit_card_off"
4718
+ }, {
4719
+ title: withCtx(() => [
4720
+ createTextVNode(toDisplayString(unref($t)({
4721
+ defaultMessage: "No payment methods available",
4722
+ id: "checkout.payment_method_block.no_payment_methods_available_title",
4723
+ description: "The title shown when there are no available payment methods"
4724
+ })), 1)
4725
+ ]),
4726
+ message: withCtx(() => [
4727
+ createTextVNode(toDisplayString(unref($t)({
4728
+ defaultMessage: "There are no available payment methods. Please contact support for more information.",
4729
+ id: "checkout.payment_method_block.no_payment_methods_available_message",
4730
+ description: "The message shown when there are no available payment methods"
4731
+ })), 1)
4732
+ ]),
4733
+ _: 1
4734
+ })) : unref(amount) && unref(checkoutForm).form.value.country ? (openBlock(), createElementBlock("div", _hoisted_4, [
4735
+ createVNode(unref(PaymentIntegrationForm), {
4736
+ ref_key: "paymentIntegrationFormRef",
4737
+ ref: paymentIntegrationFormRef,
4738
+ "country-code": unref(checkoutForm).form.value.country,
4739
+ context: unref(authorizationContext),
4740
+ amount: unref(amount),
4741
+ variant: "AUTHORIZE",
4742
+ "payment-method-options": unref(paymentMethodOptions) ?? [],
4743
+ "validate-on-submit": handleValidateOnSubmit,
4744
+ "force-store-payment-method": "",
4745
+ onPaymentSuccess: handlePaymentSuccess,
4746
+ onReady: _cache[3] || (_cache[3] = ($event) => emit("ready"))
4747
+ }, null, 8, ["country-code", "context", "amount", "payment-method-options"])
4748
+ ])) : createCommentVNode("", true)
4749
+ ])) : createCommentVNode("", true)
4750
+ ]),
4751
+ _: 1
4752
+ })
4753
+ ])) : createCommentVNode("", true)
4754
+ ];
4755
+ }),
4756
+ aside: withCtx(() => [
4757
+ createElementVNode("div", _hoisted_5, [
4758
+ createVNode(_sfc_main$K, {
6572
4759
  variant: "section",
6573
- class: "min-h-[130px]"
4760
+ class: "min-h-[220px]"
6574
4761
  }, {
6575
- default: withCtx(() => [
6576
- !unref(isPaymentMethodsPending) || unref(isPaymentMethodsPending) && unref(paymentMethodOptions).length > 0 ? (openBlock(), createElementBlock("div", _hoisted_1, [
6577
- createVNode(unref(_sfc_main$C), {
6578
- variant: "heading-3",
6579
- tag: "h2",
6580
- class: "mb-2"
6581
- }, {
6582
- default: withCtx(() => [
6583
- createTextVNode(toDisplayString(unref($t)({
6584
- defaultMessage: "Payment method",
6585
- id: "checkout.payment_method_block.title",
6586
- description: "The title of the payment method block in the checkout form"
6587
- })), 1)
6588
- ]),
6589
- _: 1
6590
- }),
6591
- !unref(checkoutForm).form.value.country ? (openBlock(), createBlock(_sfc_main$h, {
4762
+ default: withCtx(() => {
4763
+ var _a2;
4764
+ return [
4765
+ unref(subscription) && unref(invoicePreview) ? (openBlock(), createBlock(_sfc_main$j, {
6592
4766
  key: 0,
6593
- icon: "captive_portal"
6594
- }, {
6595
- title: withCtx(() => [
6596
- createTextVNode(toDisplayString(unref($t)({
6597
- defaultMessage: "Select your billing country",
6598
- id: "checkout.payment_method_block.no_country_selected_title",
6599
- description: "The title shown when no country is selected"
6600
- })), 1)
6601
- ]),
6602
- message: withCtx(() => [
6603
- createTextVNode(toDisplayString(unref($t)({
6604
- defaultMessage: "Payment methods will be shown after you select the billing country.",
6605
- id: "checkout.payment_method_block.no_country_selected_message",
6606
- description: "The message shown when no country is selected"
6607
- })), 1)
6608
- ]),
6609
- _: 1
6610
- })) : unref(paymentMethodOptions).length === 0 ? (openBlock(), createBlock(_sfc_main$h, {
6611
- key: 1,
6612
- icon: "credit_card_off"
6613
- }, {
6614
- title: withCtx(() => [
6615
- createTextVNode(toDisplayString(unref($t)({
6616
- defaultMessage: "No payment methods available",
6617
- id: "checkout.payment_method_block.no_payment_methods_available_title",
6618
- description: "The title shown when there are no available payment methods"
6619
- })), 1)
6620
- ]),
6621
- message: withCtx(() => [
6622
- createTextVNode(toDisplayString(unref($t)({
6623
- defaultMessage: "There are no available payment methods. Please contact support for more information.",
6624
- id: "checkout.payment_method_block.no_payment_methods_available_message",
6625
- description: "The message shown when there are no available payment methods"
6626
- })), 1)
6627
- ]),
6628
- _: 1
6629
- })) : unref(amount) && unref(checkoutForm).form.value.country ? (openBlock(), createBlock(_sfc_main$10, {
6630
- key: 2,
6631
- ref_key: "paymentIntegrationFormRef",
6632
- ref: paymentIntegrationFormRef,
4767
+ subscription: unref(subscription),
4768
+ invoice: unref(invoicePreview),
4769
+ "invoice-preview-by-billing-period": unref(invoicePreviewByBillingPeriod),
4770
+ "trial-invoice": unref(trialInvoicePreview),
4771
+ "enabled-pricing-ids": enabledPricingIdsModel.value,
4772
+ "trial-period": unref(trialPeriod),
6633
4773
  "country-code": unref(checkoutForm).form.value.country,
6634
- context: unref(authorizationContext),
6635
- amount: unref(amount),
6636
- variant: "AUTHORIZE",
6637
- "payment-method-options": unref(paymentMethodOptions) ?? [],
6638
- "success-redirect-url": unref(successRedirectUrl),
6639
- "validate-on-submit": handleValidateOnSubmit,
6640
- "force-store-payment-method": "",
6641
- onPaymentSuccess: handlePaymentSuccess,
6642
- onReady: _cache[3] || (_cache[3] = ($event) => emit("ready"))
6643
- }, null, 8, ["country-code", "context", "amount", "payment-method-options", "success-redirect-url"])) : createCommentVNode("", true)
6644
- ])) : createCommentVNode("", true)
6645
- ]),
4774
+ avatar: (_a2 = configuration.value) == null ? void 0 : _a2.avatar,
4775
+ "is-paid": unref(isPaid),
4776
+ "is-usage-based": isUsageBased.value,
4777
+ "is-preview-and-payment-methods-pending": unref(isPaymentMethodsPending) || unref(isInvoicePreviewPending),
4778
+ onBillingPeriodChange: handleBillingPeriodChange
4779
+ }, null, 8, ["subscription", "invoice", "invoice-preview-by-billing-period", "trial-invoice", "enabled-pricing-ids", "trial-period", "country-code", "avatar", "is-paid", "is-usage-based", "is-preview-and-payment-methods-pending"])) : createCommentVNode("", true)
4780
+ ];
4781
+ }),
6646
4782
  _: 1
6647
- })) : createCommentVNode("", true)
6648
- ];
6649
- }),
6650
- aside: withCtx(() => [
6651
- createVNode(_sfc_main$X, {
6652
- variant: "section",
6653
- class: "min-h-[220px]"
6654
- }, {
6655
- default: withCtx(() => {
6656
- var _a2;
6657
- return [
6658
- unref(subscription) && unref(invoicePreview) ? (openBlock(), createBlock(_sfc_main$i, {
6659
- key: 0,
6660
- subscription: unref(subscription),
6661
- invoice: unref(invoicePreview),
6662
- "invoice-preview-by-billing-period": unref(invoicePreviewByBillingPeriod),
6663
- "trial-invoice": unref(trialInvoicePreview),
6664
- "enabled-pricing-ids": enabledPricingIdsModel.value,
6665
- "trial-period": unref(trialPeriod),
6666
- "country-code": unref(checkoutForm).form.value.country,
6667
- avatar: (_a2 = configuration.value) == null ? void 0 : _a2.avatar,
6668
- "is-paid": unref(isPaid),
6669
- "is-usage-based": isUsageBased.value,
6670
- "is-preview-and-payment-methods-pending": unref(isPaymentMethodsPending) || unref(isInvoicePreviewPending),
6671
- onBillingPeriodChange: handleBillingPeriodChange
6672
- }, null, 8, ["subscription", "invoice", "invoice-preview-by-billing-period", "trial-invoice", "enabled-pricing-ids", "trial-period", "country-code", "avatar", "is-paid", "is-usage-based", "is-preview-and-payment-methods-pending"])) : createCommentVNode("", true)
6673
- ];
6674
- }),
6675
- _: 1
6676
- }),
6677
- !unref(isPaid) ? (openBlock(), createBlock(_sfc_main$2, {
4783
+ })
4784
+ ]),
4785
+ !unref(isPaid) ? (openBlock(), createBlock(_sfc_main$3, {
6678
4786
  key: 0,
4787
+ class: "sv-checkout__promotion-code",
6679
4788
  "promotion-code": promotionCode.value,
6680
4789
  "onUpdate:appliedCode": _cache[4] || (_cache[4] = ($event) => promotionCode.value = $event),
6681
4790
  onRemove: unref(removePromotionCode),
6682
4791
  onApply: unref(applyPromotionCode)
6683
4792
  }, null, 8, ["promotion-code", "onRemove", "onApply"])) : createCommentVNode("", true),
6684
- unref(promotionCodeErrorMessage) ? (openBlock(), createBlock(unref(_sfc_main$_), {
4793
+ unref(promotionCodeErrorMessage) ? (openBlock(), createBlock(unref(_sfc_main$P), {
6685
4794
  key: 1,
6686
- class: "mt-2",
4795
+ class: "sv-checkout__promotion-error mt-2",
6687
4796
  title: unref(promotionCodeErrorMessage)
6688
4797
  }, null, 8, ["title"])) : createCommentVNode("", true),
6689
- !unref(isPaid) ? (openBlock(), createBlock(_sfc_main$X, {
6690
- key: 2,
6691
- class: "min-h-[44px]"
6692
- }, {
6693
- default: withCtx(() => [
6694
- unref(invoicePreview) ? (openBlock(), createBlock(unref(_sfc_main$P), {
6695
- key: 0,
6696
- type: "button",
6697
- size: "lg",
6698
- class: "full-width",
6699
- disabled: unref(isPromotionCodePending) || unref(paymentMethodOptions).length === 0,
6700
- onClick: handleSubmit
6701
- }, {
6702
- default: withCtx(() => [
6703
- createTextVNode(toDisplayString(hasTrialPeriod.value ? unref($t)({
6704
- defaultMessage: "Start trial",
6705
- id: "checkout.pay_and_subscribe_button_trial.label",
6706
- description: "The label of the start trial button in the checkout form"
6707
- }) : unref($t)({
6708
- defaultMessage: "Pay and subscribe",
6709
- id: "checkout.pay_and_subscribe_button.label",
6710
- description: "The label of the pay and subscribe button in the checkout form"
6711
- })), 1)
6712
- ]),
6713
- _: 1
6714
- }, 8, ["disabled"])) : createCommentVNode("", true)
6715
- ]),
6716
- _: 1
6717
- })) : createCommentVNode("", true),
6718
- createVNode(unref(_sfc_main$C), {
6719
- tag: "div",
6720
- variant: "body-sm",
6721
- shade: "lighter",
6722
- class: "flex grow justify-center"
6723
- }, {
6724
- default: withCtx(() => [
6725
- createVNode(_sfc_main$$, {
6726
- icon: "lock",
6727
- kpi: unref($t)({
6728
- defaultMessage: "Secure and encrypted payments",
6729
- id: "checkout.kpi.encrypted_payments.label",
6730
- description: "The encrypted payments KPI shown in the checkout"
6731
- })
6732
- }, null, 8, ["kpi"])
6733
- ]),
6734
- _: 1
6735
- })
4798
+ createElementVNode("div", _hoisted_6, [
4799
+ !unref(isPaid) ? (openBlock(), createBlock(_sfc_main$K, {
4800
+ key: 0,
4801
+ class: "sv-checkout__submit-skeleton min-h-[44px]"
4802
+ }, {
4803
+ default: withCtx(() => [
4804
+ unref(invoicePreview) ? (openBlock(), createBlock(unref(_sfc_main$v), {
4805
+ key: 0,
4806
+ type: "button",
4807
+ size: "lg",
4808
+ class: "sv-action sv-action--primary sv-action--full-width sv-checkout__submit w-full",
4809
+ disabled: unref(isPromotionCodePending) || unref(paymentMethodOptions).length === 0,
4810
+ onClick: handleSubmit
4811
+ }, {
4812
+ default: withCtx(() => [
4813
+ createTextVNode(toDisplayString(hasTrialPeriod.value ? unref($t)({
4814
+ defaultMessage: "Start trial",
4815
+ id: "checkout.pay_and_subscribe_button_trial.label",
4816
+ description: "The label of the start trial button in the checkout form"
4817
+ }) : unref($t)({
4818
+ defaultMessage: "Pay and subscribe",
4819
+ id: "checkout.pay_and_subscribe_button.label",
4820
+ description: "The label of the pay and subscribe button in the checkout form"
4821
+ })), 1)
4822
+ ]),
4823
+ _: 1
4824
+ }, 8, ["disabled"])) : createCommentVNode("", true)
4825
+ ]),
4826
+ _: 1
4827
+ })) : createCommentVNode("", true),
4828
+ createVNode(_sfc_main$2, { "payment-method-options": unref(paymentMethodOptions) }, null, 8, ["payment-method-options"])
4829
+ ])
6736
4830
  ]),
6737
4831
  _: 1
6738
- }));
4832
+ }, 8, ["class"]));
6739
4833
  };
6740
4834
  }
6741
4835
  });
@@ -6746,7 +4840,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
6746
4840
  locale: { type: String },
6747
4841
  dateLocale: { type: String },
6748
4842
  messages: { type: Object },
6749
- showTimezones: { type: Boolean },
6750
4843
  primaryColor: { type: String },
6751
4844
  secondaryColor: { type: String },
6752
4845
  isShadowRoot: { type: Boolean },
@@ -6755,7 +4848,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
6755
4848
  onLog: { type: Function },
6756
4849
  allowedPortalTypes: { type: Array },
6757
4850
  portalObject: { type: Object },
6758
- customElementName: { type: String },
4851
+ cssOverrides: { type: [String, Array] },
6759
4852
  branding: { type: Object },
6760
4853
  configuration: { type: Object }
6761
4854
  },
@@ -6789,7 +4882,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
6789
4882
  const validEmail = getValidEmail((_b = props.configuration) == null ? void 0 : _b.email);
6790
4883
  return (_ctx, _cache) => {
6791
4884
  var _a2, _b2, _c, _d;
6792
- return openBlock(), createBlock(_sfc_main$11, {
4885
+ return openBlock(), createBlock(_sfc_main$Q, {
6793
4886
  "custom-element-name": unref(COMPONENT_NAME),
6794
4887
  environment: __props.environment,
6795
4888
  locale: __props.locale,
@@ -6800,6 +4893,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
6800
4893
  "experimental-features": __props.experimentalFeatures,
6801
4894
  "log-level": __props.logLevel,
6802
4895
  "on-log": __props.onLog,
4896
+ "css-overrides": __props.cssOverrides,
6803
4897
  onError: _cache[1] || (_cache[1] = (error) => _ctx.$emit("error", error))
6804
4898
  }, {
6805
4899
  default: withCtx(() => {
@@ -6825,7 +4919,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
6825
4919
  ];
6826
4920
  }),
6827
4921
  _: 3
6828
- }, 8, ["custom-element-name", "environment", "locale", "portal-object", "primary-color", "secondary-color", "experimental-features", "log-level", "on-log"]);
4922
+ }, 8, ["custom-element-name", "environment", "locale", "portal-object", "primary-color", "secondary-color", "experimental-features", "log-level", "on-log", "css-overrides"]);
6829
4923
  };
6830
4924
  }
6831
4925
  });