@solvimon/solvimon-web 0.1.0-alpha.30 → 0.1.0-alpha.32

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 (268) hide show
  1. package/README.md +152 -91
  2. package/dist/AddPaymentMethodModal-Cx203VXo.mjs +97 -0
  3. package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-BMHhLZnu.mjs +89 -0
  4. package/dist/{Alert.vue.es-ZPG49yR_.mjs → Alert.vue.es-DHJpiSdR.mjs} +1 -1
  5. package/dist/{Amount.vue.es-DPqHB8Xd.mjs → Amount.vue.es-CofcgmXt.mjs} +1 -1
  6. package/dist/AuthProvider.handle-BpFblzFx.mjs +46 -0
  7. package/dist/{Avatar.vue.es-geDQsZwu.mjs → Avatar.vue.es-CJdXXOiG.mjs} +1 -1
  8. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-BD84aBiU.mjs +64 -0
  9. package/dist/BillingInformationForm.lib-ad8B2Y1O.mjs +32 -0
  10. package/dist/BillingInformationForm.vue_vue_type_script_setup_true_lang-F5OVG0kO.mjs +340 -0
  11. package/dist/BillingInformationModal-Do3Fuu8A.mjs +85 -0
  12. package/dist/{Button.vue.es-j7iYlqtJ.mjs → Button.vue.es-CW7XfMBF.mjs} +1 -1
  13. package/dist/{ChargeOnDemandModal-CR01PkP_.mjs → ChargeOnDemandModal-B4ShPKLS.mjs} +46 -45
  14. package/dist/{Chip.vue.es-Dxx_0dte.mjs → Chip.vue.es-CYwWHyAT.mjs} +2 -2
  15. package/dist/CompanyPurchaseToggle.vue_vue_type_script_setup_true_lang-CVXHCSPb.mjs +510 -0
  16. package/dist/{Comparators.vue.es-DQBI3f7m.mjs → Comparators.vue.es-DYrKlE8t.mjs} +1 -1
  17. package/dist/{ContentWithAsideLayout-Bnbsq8_5.mjs → ContentWithAsideLayout-C2kFcft1.mjs} +1 -1
  18. package/dist/{ContextMenu.vue.es-BJO4U47Q.mjs → ContextMenu.vue.es-EXTx0NEt.mjs} +10 -10
  19. package/dist/{CustomerBillingInformation.vue.es-CmNpqcBw.mjs → CustomerBillingInformation.vue.es-CSKG6V3T.mjs} +3 -3
  20. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DZZuAHIE.mjs +217 -0
  21. package/dist/CustomerShippingAddresses-Bdy4XWjE.mjs +282 -0
  22. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-BEKwWob_.mjs +3124 -0
  23. package/dist/{DividerText.vue.es-BusbyeAI.mjs → DividerText.vue.es-Dq0JzI8C.mjs} +1 -1
  24. package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-wPma8Os-.mjs → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-3gf8pvR7.mjs} +3 -3
  25. package/dist/{ErrorNotification.vue.es-F068p7PY.mjs → ErrorNotification.vue.es-Cw7fqCg1.mjs} +2 -2
  26. package/dist/{FormMessage.vue.es-CwMQpIAW.mjs → FormMessage.vue.es-MrzQoSae.mjs} +1 -1
  27. package/dist/{IconButton.vue.es-D8DtBW9i.mjs → IconButton.vue.es-CpQbFw0x.mjs} +2 -2
  28. package/dist/{IconTitle.vue.es-6VJtjJX2.mjs → IconTitle.vue.es-CcOIFjbE.mjs} +3 -3
  29. package/dist/{Input.vue.es-BLyHcmu4.mjs → Input.vue.es-Cd55vQri.mjs} +4 -4
  30. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Dl1vTzQD.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-CqkGCbvg.mjs} +2 -2
  31. package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-DYskT3r7.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-BUu5M_gx.mjs} +7 -7
  32. package/dist/{InvoicePreview.vue.es-Cpf66_xV.mjs → InvoicePreview.vue.es-DHh5wruk.mjs} +7 -7
  33. package/dist/{InvoicePricingClauseChip.vue.es-CDrAE901.mjs → InvoicePricingClauseChip.vue.es-ZSOBp1se.mjs} +4 -4
  34. package/dist/{Label.vue.es-es7ZUBSP.mjs → Label.vue.es-CB6G8Krh.mjs} +3 -3
  35. package/dist/LoadFailedNotice.vue_vue_type_script_setup_true_lang-BZCtO2Er.mjs +20 -0
  36. package/dist/{Modal.vue.es-eeR9FmvQ.mjs → Modal.vue.es-CJFTVFSZ.mjs} +138 -127
  37. package/dist/OrderSummaryInvoice.vue_vue_type_script_setup_true_lang-D0pwpqIC.mjs +789 -0
  38. package/dist/{PaymentCompletedCard.vue_vue_type_script_setup_true_lang-CrjVPks0.mjs → PaymentCompletedCard.vue_vue_type_script_setup_true_lang-D08Qpgb0.mjs} +2 -2
  39. package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-DyjzaTK1.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-dl52PYcq.mjs} +4 -4
  40. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-BHQrWy6r.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-D0priVnA.mjs} +3 -3
  41. package/dist/{PaymentHistoryBlock-CN42ewCn.mjs → PaymentHistoryBlock-BSXlneqM.mjs} +1 -1
  42. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-C3Y5fHvA.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CXy0XGpn.mjs} +5 -5
  43. package/dist/{PaymentIntegrationForm-D3Ye7LZ5.mjs → PaymentIntegrationForm-Diua0GGJ.mjs} +1 -1
  44. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CLlm_Q2j.mjs +161 -0
  45. package/dist/{PaymentIntegrationFormAdyen-Fm-diCCO.mjs → PaymentIntegrationFormAdyen-D4FP0Vj5.mjs} +302 -282
  46. package/dist/{PaymentIntegrationFormStripe-BANBL6za.mjs → PaymentIntegrationFormStripe-vFzF_sCJ.mjs} +126 -117
  47. package/dist/{PaymentMethod.vue.es-t3-VyoE8.mjs → PaymentMethod.vue.es-vs6SaZOh.mjs} +200 -150
  48. package/dist/{PaymentMethodForm-CqP3GoNj.mjs → PaymentMethodForm-Buhe0aRQ.mjs} +1 -1
  49. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-RPPdBw_e.mjs +165 -0
  50. package/dist/{PaymentMethodSelector.vue_vue_type_script_setup_true_lang-D5wmRuCf.mjs → PaymentMethodSelector.vue_vue_type_script_setup_true_lang-DprL5TR8.mjs} +7 -7
  51. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-DhkkiJaQ.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-BXbevI3r.mjs} +28 -26
  52. package/dist/PaymentMethodsModal-CnJP9UKp.mjs +192 -0
  53. package/dist/PlanCustomizationEditor-KHLSEUbb.mjs +864 -0
  54. package/dist/{PortalLinkUnverified-Cp60_kRJ.mjs → PortalLinkUnverified-DlZAkE93.mjs} +3 -3
  55. package/dist/{PortalNotAvailable-DzSQnfzw.mjs → PortalNotAvailable-CKIomNrm.mjs} +2 -2
  56. package/dist/{PricingGroupRangeInput.vue.es-Srq_3cga.mjs → PricingGroupRangeInput.vue.es-oHD-IT12.mjs} +8 -8
  57. package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-oRijnVnZ.mjs → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-wCW8YZHM.mjs} +16 -15
  58. package/dist/{RadioGroupExtended.vue.es-BbBMDf6l.mjs → RadioGroupExtended.vue.es-DsShmkKZ.mjs} +5 -5
  59. package/dist/Section.vue.es-DYmEtgBj.mjs +88 -0
  60. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-OM19NPBh.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-CANXYTzu.mjs} +2 -2
  61. package/dist/ShippingAddressForm.vue_vue_type_script_setup_true_lang-CJp6ddhZ.mjs +144 -0
  62. package/dist/ShippingAddressesModal-Gxv2KxaW.mjs +283 -0
  63. package/dist/{StepInput.vue.es-ieh4EuJ7.mjs → StepInput.vue.es-sqA-VSsn.mjs} +4 -4
  64. package/dist/SubscriptionCancellationModal-DfAZ_uW6.mjs +4 -0
  65. package/dist/SubscriptionCancellationModal.vue_vue_type_script_setup_true_lang-BlbiDNIu.mjs +240 -0
  66. package/dist/SubscriptionCancellationSuccess.vue_vue_type_script_setup_true_lang-C1ko2xvR.mjs +64 -0
  67. package/dist/SubscriptionDetails.entry.ce-CdWV-8WN.mjs +764 -0
  68. package/dist/{SubscriptionSchedules-DMxX3GpK.mjs → SubscriptionSchedules-BfdVn1XA.mjs} +1 -1
  69. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-C8q8Q6h5.mjs +5413 -0
  70. package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-qQ9gJOIs.mjs +90 -0
  71. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-CHlXP_2x.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-DYWjTzPV.mjs} +133 -108
  72. package/dist/Toggle.vue.es-S2g8WGY_.mjs +99 -0
  73. package/dist/{TooltipParagraph.vue.es-BES3zsYN.mjs → TooltipParagraph.vue.es-Bt-7LHr3.mjs} +18 -18
  74. package/dist/{TranslationOverride.vue_vue_type_script_setup_true_lang-BJmlNrXT.mjs → TranslationOverride.vue_vue_type_script_setup_true_lang-Cp_sFa52.mjs} +1 -1
  75. package/dist/TrialChip.vue.es-VZwQX079.mjs +47 -0
  76. package/dist/addonQuantity-D3bGVqjL.mjs +128 -0
  77. package/dist/adyen-CHgq2l6n.mjs +99 -0
  78. package/dist/adyenSdk-DUTO7xkT.mjs +63 -0
  79. package/dist/{api.es-qgvzNMU-.mjs → api.es-QaC926Xu.mjs} +2 -2
  80. package/dist/components/BillingInformation/BillingInformation.mjs +37 -41
  81. package/dist/components/BillingInformationForm/BillingInformationForm.mjs +45 -462
  82. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +33 -42
  83. package/dist/components/Invoice/Invoice.mjs +1087 -1019
  84. package/dist/components/InvoiceDetails/InvoiceDetails.mjs +38 -47
  85. package/dist/components/InvoiceHeader/InvoiceHeader.mjs +29 -34
  86. package/dist/components/InvoicesList/InvoicesList.mjs +33 -42
  87. package/dist/components/PaymentHistory/PaymentHistory.mjs +39 -48
  88. package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +56 -64
  89. package/dist/components/ShippingAddressForm/ShippingAddressForm.ce.d.ts +1 -0
  90. package/dist/components/ShippingAddressForm/ShippingAddressForm.mjs +212 -0
  91. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +34 -42
  92. package/dist/components/SubscriptionsList/SubscriptionsList.mjs +41 -50
  93. package/dist/components/WalletBalances/WalletBalances.mjs +46 -55
  94. package/dist/core/events.types.d.ts +1 -0
  95. package/dist/core/index.mjs +51 -34
  96. package/dist/{customElements-DK4GKNJG.mjs → customElements-B8c354Nu.mjs} +802 -768
  97. package/dist/{customer-lf6S5DBR.mjs → customer-CP-Wz7JO.mjs} +1 -1
  98. package/dist/{de-DE-Cyj_NtiI.mjs → de-DE-C9HrzHpE.mjs} +71 -5
  99. package/dist/{de-DE-UJ6X6jXu.mjs → de-DE-DAQmgEy5.mjs} +82 -19
  100. package/dist/{formControl-BZQLHnOO.mjs → formControl-C18sw44K.mjs} +275 -275
  101. package/dist/{formatting.es-RclXHhKo.mjs → formatting.es-DlJEzreG.mjs} +16 -13
  102. package/dist/{fr-FR-CRFoWQ7J.mjs → fr-FR-CHR3VWvd.mjs} +71 -5
  103. package/dist/{fr-FR-Cvvbkwlj.mjs → fr-FR-fz51-Ubw.mjs} +79 -16
  104. package/dist/{countryData.es-BegoD-cZ.mjs → getCountryNameByCode.es-OGxn_zT0.mjs} +7 -2
  105. package/dist/icon-sprite.svg.es-2S3rv8NW.mjs +4 -0
  106. package/dist/index.es-Bv55VtdE.mjs +633 -0
  107. package/dist/{index.es-BrVTOW5D.mjs → index.es-C7J3WGGo.mjs} +4 -4
  108. package/dist/index.mjs +37 -33
  109. package/dist/invoices-I7PghcPV.mjs +143 -0
  110. package/dist/{it-IT-DnJP5URH.mjs → it-IT-BpCkTMZL.mjs} +73 -10
  111. package/dist/{it-IT-DObZEc-U.mjs → it-IT-Dzc7DmmL.mjs} +71 -5
  112. package/dist/{nl-NL-q9xfTZF0.mjs → nl-NL-22C8OcIM.mjs} +79 -16
  113. package/dist/{nl-NL-C02xHilF.mjs → nl-NL-Dut_QwsY.mjs} +71 -5
  114. package/dist/paymentIntegrationFormLoaders-BFMAMpcA.mjs +31 -0
  115. package/dist/{paymentMethods-8w-ccfY_.mjs → paymentMethods-aGKIi7DS.mjs} +22 -21
  116. package/dist/{paymentOutcome-B6sW1eCV.mjs → paymentOutcome-Cv7hTFVu.mjs} +1 -1
  117. package/dist/paymentRedirect-DaS8Kccc.mjs +66 -0
  118. package/dist/payments-BKoKpoLN.mjs +71 -0
  119. package/dist/preloadPaymentIntegrationForms-Buwal_JR.mjs +9 -0
  120. package/dist/pricing-Y-7ELzN-.mjs +42 -0
  121. package/dist/{pricingItem.es-bCPArbTa.mjs → pricingItem.es-BafitMMY.mjs} +1 -1
  122. package/dist/pricingPlanScheduleOverrides-CGm_-jJq.mjs +291 -0
  123. package/dist/randomUuid-BE_IQ-aq.mjs +10 -0
  124. package/dist/screens/Checkout/Checkout.mjs +1098 -3
  125. package/dist/screens/CheckoutSession/CheckoutSession.ce.d.ts +1 -0
  126. package/dist/screens/CheckoutSession/CheckoutSession.mjs +1322 -0
  127. package/dist/screens/CustomerOverview/CustomerOverview.mjs +209 -133
  128. package/dist/screens/PayInvoice/PayInvoice.mjs +283 -275
  129. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +92 -97
  130. package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +2 -2
  131. package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +915 -404
  132. package/dist/{subscription-BwzkagDI.mjs → subscription-DQ5mRp_e.mjs} +10 -10
  133. package/dist/subscriptions-B7dNqi1C.mjs +99 -0
  134. package/dist/timePeriod.es-R9U0wLlB.mjs +13 -0
  135. package/dist/types/components/customer/BillingInformationForm/BillingInformationForm.types.d.ts +11 -14
  136. package/dist/types/components/customer/CheckoutForm/CheckoutAddressFields.types.d.ts +2 -9
  137. package/dist/types/components/customer/CheckoutForm/CheckoutForm.types.d.ts +10 -0
  138. package/dist/types/components/customer/CustomerPaymentMethodsBlock/CustomerPaymentMethodsBlock.types.d.ts +6 -0
  139. package/dist/types/components/payments/AddPaymentMethodModal/AddPaymentMethodModal.types.d.ts +17 -0
  140. package/dist/types/components/payments/ExpressPaymentMethod/ExpressPaymentMethodApplePay.types.d.ts +3 -2
  141. package/dist/types/components/payments/ExpressPaymentMethods/ExpressPaymentMethods.types.d.ts +3 -2
  142. package/dist/types/components/payments/OnDemandPaymentModalShell/OnDemandPaymentModalShell.types.d.ts +2 -0
  143. package/dist/types/components/payments/PaymentIntegrationForm/PaymentIntegrationForm.types.d.ts +12 -1
  144. package/dist/types/components/payments/PaymentMethodsList/PaymentMethodsList.types.d.ts +2 -0
  145. package/dist/types/components/payments/PaymentMethodsModal/PaymentMethodsModal.types.d.ts +22 -0
  146. package/dist/types/components/providers/ActionDispatchProvider/ActionDispatchProvider.lib.types.d.ts +1 -1
  147. package/dist/types/components/providers/AuthProvider/AuthProvider.vue.d.ts +7 -1
  148. package/dist/types/components/providers/EntryProvider/EntryProvider.types.d.ts +2 -2
  149. package/dist/types/components/providers/EntryProvider/EntryProvider.vue.d.ts +3 -11
  150. package/dist/types/components/providers/ErrorBoundary/ErrorBoundary.vue.d.ts +1 -5
  151. package/dist/types/components/providers/HostElementProvider/HostElementProvider.lib.d.ts +11 -0
  152. package/dist/types/components/providers/HostElementProvider/composables/useHostEvent.d.ts +12 -0
  153. package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +5 -4
  154. package/dist/types/components/providers/PortalProvider/PortalProvider.lib.d.ts +3 -3
  155. package/dist/types/components/providers/PortalProvider/PortalProvider.types.d.ts +3 -3
  156. package/dist/types/components/providers/PortalProvider/PortalProvider.vue.d.ts +6 -1
  157. package/dist/types/components/providers/PortalProvider/composables/usePortal.d.ts +1 -0
  158. package/dist/types/components/providers/Provider/Provider.types.d.ts +10 -3
  159. package/dist/types/components/providers/Provider/Provider.vue.d.ts +3 -14
  160. package/dist/types/components/subscriptions/ChargeOnDemandModal/ChargeOnDemandModal.types.d.ts +1 -1
  161. package/dist/types/components/subscriptions/OrderSummary.types.d.ts +14 -0
  162. package/dist/types/components/subscriptions/OrderSummaryInvoice.types.d.ts +14 -1
  163. package/dist/types/components/subscriptions/PlanCustomizationForm/PlanCustomizationEditor.types.d.ts +9 -0
  164. package/dist/types/components/subscriptions/PlanCustomizationForm/SeatsEditor.types.d.ts +4 -0
  165. package/dist/types/components/subscriptions/PlanCustomizationForm/SeatsEditorItem.types.d.ts +2 -0
  166. package/dist/types/components/subscriptions/PlanCustomizationForm/UnitsEditor.types.d.ts +4 -0
  167. package/dist/types/components/subscriptions/PlanCustomizationForm/UnitsEditorItem.types.d.ts +2 -0
  168. package/dist/types/components/subscriptions/SubscriptionCancellationSuccess/SubscriptionCancellationSuccess.types.d.ts +4 -0
  169. package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementForm.types.d.ts +10 -9
  170. package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementSuccess.types.d.ts +5 -0
  171. package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementSummary.types.d.ts +3 -0
  172. package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionPlanChangeSummary.types.d.ts +4 -0
  173. package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionPlanSelector.types.d.ts +7 -0
  174. package/dist/types/components/subscriptions/SubscriptionsList/SubscriptionsList.types.d.ts +1 -0
  175. package/dist/types/components/subscriptions/SubscriptionsList/SubscriptionsListItem.types.d.ts +1 -0
  176. package/dist/types/components/wallets/AutoTopUpModal/AutoTopUpModal.types.d.ts +3 -1
  177. package/dist/types/index.d.ts +5 -1
  178. package/dist/types/public/components/BillingInformation/BillingInformation.types.d.ts +5 -0
  179. package/dist/types/public/components/BillingInformationForm/BillingInformationForm.entry.types.d.ts +1 -2
  180. package/dist/types/public/components/CustomerPaymentMethods/CustomerPaymentMethods.types.d.ts +6 -2
  181. package/dist/types/public/components/Invoice/Invoice.types.d.ts +7 -7
  182. package/dist/types/public/components/InvoiceHeader/InvoiceHeader.types.d.ts +2 -2
  183. package/dist/types/public/components/InvoicesList/InvoicesList.types.d.ts +6 -7
  184. package/dist/types/public/components/PaymentMethodForm/PaymentMethodForm.entry.types.d.ts +1 -1
  185. package/dist/types/public/components/PaymentMethodForm/PaymentMethodForm.types.d.ts +19 -14
  186. package/dist/types/public/components/ShippingAddressForm/ShippingAddressForm.entry.ce.d.ts +1 -0
  187. package/dist/types/public/components/ShippingAddressForm/ShippingAddressForm.entry.types.d.ts +6 -0
  188. package/dist/types/public/components/ShippingAddressForm/ShippingAddressForm.types.d.ts +5 -0
  189. package/dist/types/public/components/SubscriptionsList/SubscriptionsList.types.d.ts +10 -1
  190. package/dist/types/public/core/action-request.types.d.ts +18 -24
  191. package/dist/types/public/core/events.types.d.ts +99 -0
  192. package/dist/types/public/core/index.d.ts +3 -1
  193. package/dist/types/public/core/types.d.ts +11 -2
  194. package/dist/types/public/screens/Checkout/Checkout.entry.types.d.ts +1 -7
  195. package/dist/types/public/screens/Checkout/Checkout.source.types.d.ts +151 -0
  196. package/dist/types/public/screens/Checkout/Checkout.types.d.ts +7 -30
  197. package/dist/types/public/screens/CheckoutSession/CheckoutSession.entry.ce.d.ts +1 -0
  198. package/dist/types/public/screens/CheckoutSession/CheckoutSession.entry.types.d.ts +3 -0
  199. package/dist/types/public/screens/CustomerOverview/CustomerOverview.types.d.ts +8 -2
  200. package/dist/types/public/screens/PayInvoice/PayInvoice.types.d.ts +0 -6
  201. package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.configuration.types.d.ts +2 -19
  202. package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.types.d.ts +2 -3
  203. package/dist/types/public/screens/SubscriptionManagement/SubscriptionManagement.types.d.ts +2 -1
  204. package/dist/types/services/paymentMethods.types.d.ts +12 -1
  205. package/dist/types/types/EntryBaseProps.d.ts +10 -6
  206. package/dist/types/types/branding.d.ts +15 -0
  207. package/dist/types/types/checkoutSession.d.ts +199 -0
  208. package/dist/types/types/errors.d.ts +2 -0
  209. package/dist/types/types/pricingPlanGroup.d.ts +25 -0
  210. package/dist/{useActionDispatchProvider-ChAHdwR8.mjs → useActionDispatchProvider-BCtk-FGU.mjs} +1 -1
  211. package/dist/useAddressFormats-CtE4QaVU.mjs +1998 -0
  212. package/dist/useCheckoutForm-BhXcmnUi.mjs +3355 -0
  213. package/dist/{useCustomer-CTMhg1nd.mjs → useCustomer-mQysxUwp.mjs} +2 -2
  214. package/dist/useDefaultPaymentMethod-Dliq6_Yw.mjs +39 -0
  215. package/dist/useExperimentalFeature-Bw6bBtay.mjs +6 -0
  216. package/dist/useHostEvent-MtRG6W2B.mjs +12 -0
  217. package/dist/{useIncrementalLoading-CBVutPH8.mjs → useIncrementalLoading-CJSj1945.mjs} +2 -2
  218. package/dist/{useInvoiceData-qUGbBAQK.mjs → useInvoiceData-BEZIvw32.mjs} +2 -2
  219. package/dist/{useInvoicesList-wJvZAJpW.mjs → useInvoicesList-CrXjsmei.mjs} +140 -138
  220. package/dist/{sorting.es-C0pdMgX0.mjs → useIsMounted.es-BNPhTTHE.mjs} +11 -10
  221. package/dist/{useLoadInitialData-UvfYXgbi.mjs → useLoadInitialData-Bomj_1mo.mjs} +1 -1
  222. package/dist/usePaymentFormHold-CYZ4BdOw.mjs +19 -0
  223. package/dist/{usePaymentMethodAvailability-35l4pWdH.mjs → usePaymentMethodAvailability-DR_neLeZ.mjs} +4 -4
  224. package/dist/usePaymentMethodOptions-CuHoQx3K.mjs +67 -0
  225. package/dist/{usePaymentMethods-De7hlLHo.mjs → usePaymentMethods-BDdetXts.mjs} +2 -2
  226. package/dist/{usePayments-hWS7fnOx.mjs → usePayments-B5Z9Kfbv.mjs} +20 -18
  227. package/dist/usePortal-DuLR5Mid.mjs +14 -0
  228. package/dist/{useService-BwzIBIRp.mjs → useService-2aOFBTxU.mjs} +1 -1
  229. package/dist/useShippingAddresses-BvThNpez.mjs +122 -0
  230. package/dist/useSubscription-Dzo-kBpQ.mjs +35 -0
  231. package/dist/useSubscriptionActions-CWaNRoZ7.mjs +44 -0
  232. package/dist/useWatchDebounced-DkXgKe0E.mjs +20 -0
  233. package/dist/{wallets.es-eH2C2ygn.mjs → wallets.es-DRlUVd2R.mjs} +1 -1
  234. package/package.json +41 -11
  235. package/dist/AuthProvider.handle-SRR_04XS.mjs +0 -50
  236. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-nqKbgY7G.mjs +0 -58
  237. package/dist/Checkout.entry.ce-CopWuLJC.mjs +0 -4169
  238. package/dist/CheckoutAddressFields.vue_vue_type_script_setup_true_lang-CEnM1uxK.mjs +0 -828
  239. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Jyb5ZN3s.mjs +0 -136
  240. package/dist/CustomerShippingAddresses-BRPukhRI.mjs +0 -397
  241. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DJnr5D56.mjs +0 -2936
  242. package/dist/OrderSummaryInvoice.vue_vue_type_script_setup_true_lang-B_FpibLA.mjs +0 -441
  243. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-D07SEP8a.mjs +0 -181
  244. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-CMRMbL3d.mjs +0 -161
  245. package/dist/PlanCustomizationEditor-B76UNEMm.mjs +0 -791
  246. package/dist/Section.vue.es-Oqn1wGPZ.mjs +0 -72
  247. package/dist/ShippingAddressesModal-c7nqf4Ny.mjs +0 -418
  248. package/dist/SubscriptionDetails.entry.ce-uYv45FGH.mjs +0 -1044
  249. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DXro_64f.mjs +0 -5200
  250. package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-BZNsqN4G.mjs +0 -203
  251. package/dist/TrialChip.vue.es-C51z1ZiA.mjs +0 -35
  252. package/dist/addonQuantity-CCVaA3e-.mjs +0 -758
  253. package/dist/adyenSdk-B01MB9Ia.mjs +0 -58
  254. package/dist/getCountryNameByCode.es-BDHua7VM.mjs +0 -8
  255. package/dist/icon-sprite.svg.es-BWBB8SGw.mjs +0 -4
  256. package/dist/invoices-DdREPDXV.mjs +0 -123
  257. package/dist/paymentMethods-Goa25rTs.mjs +0 -61
  258. package/dist/payments-CKpU1K3t.mjs +0 -68
  259. package/dist/pricing-CEaZGgKe.mjs +0 -29
  260. package/dist/pricingPlanScheduleOverrides-BBp-DmpV.mjs +0 -233
  261. package/dist/pricingPlanSchedules-DSMptcAh.mjs +0 -38
  262. package/dist/subscriptions-B5bH8hsI.mjs +0 -66
  263. package/dist/taxId.es-e6NEvprh.mjs +0 -243
  264. package/dist/types/components/payments/ExpressPaymentMethodButton/ExpressPaymentMethodButton.types.d.ts +0 -3
  265. package/dist/useCustomerFormLabels-D4oDnfxA.mjs +0 -1173
  266. package/dist/usePaymentFormHold-Cwdr-vyc.mjs +0 -181
  267. package/dist/usePortal-DUfD6hrA.mjs +0 -7
  268. package/dist/useTimePeriod.es-BUorDLVK.mjs +0 -93
@@ -0,0 +1,1998 @@
1
+ import { defineComponent as ee, openBlock as i, createElementBlock as w, createVNode as B, unref as s, withCtx as P, renderSlot as X, toDisplayString as J, createCommentVNode as p, createElementVNode as $, computed as f, withKeys as El, withModifiers as il, normalizeClass as q, Fragment as ve, mergeProps as Y, createBlock as y, resolveDynamicComponent as Z, normalizeProps as W, createTextVNode as _, renderList as rl, inject as Ol, getCurrentInstance as Rl, ref as H, watch as he, useModel as Ue, useSlots as Bl, createSlots as Ve, guardReactiveProps as Qe, Teleport as Tl, normalizeStyle as Xe, mergeModels as Ne, isRef as _e, markRaw as Dl, toRefs as Fl, useId as Ul, reactive as Gl, shallowRef as zl } from "vue";
2
+ import { u as Ae, b as ul, a as ql } from "./index.es-C7J3WGGo.mjs";
3
+ import { c as Ge, g as el } from "./getCountryNameByCode.es-OGxn_zT0.mjs";
4
+ import { d as Se, S as Kl, a as ze } from "./customElements-B8c354Nu.mjs";
5
+ import { e as Te } from "./sanitization.es-C6dbuxUJ.mjs";
6
+ import { _ as pe, s as ll, u as Hl } from "./useIsMounted.es-BNPhTTHE.mjs";
7
+ import { u as Zl } from "./useLazyFloating.es-CycqRyeb.mjs";
8
+ import { _ as tl } from "./IconButton.vue.es-CpQbFw0x.mjs";
9
+ import { a as al, _ as Ee } from "./Button.vue.es-CW7XfMBF.mjs";
10
+ import { _ as Wl } from "./Chip.vue.es-CYwWHyAT.mjs";
11
+ import { i as De, a as Yl } from "./useService-2aOFBTxU.mjs";
12
+ import { c as Jl } from "./cn.es-B8acFrov.mjs";
13
+ import { _ as qe, u as jl } from "./Input.vue.es-Cd55vQri.mjs";
14
+ import { u as Oe, _ as Ql } from "./Label.vue.es-CB6G8Krh.mjs";
15
+ import { _ as Fe } from "./FormMessage.vue.es-MrzQoSae.mjs";
16
+ import { f as ne, a as Q, r as Xl } from "./formControl-C18sw44K.mjs";
17
+ const _l = { class: "flex items-center pt-1" }, et = {
18
+ key: 0,
19
+ class: "ml-1 normal-case"
20
+ }, lt = /* @__PURE__ */ ee({
21
+ __name: "SearchSelectInputOptionsDivider",
22
+ props: {
23
+ suffix: {}
24
+ },
25
+ setup(e) {
26
+ return (o, a) => (i(), w("div", _l, [
27
+ B(s(Se), {
28
+ tag: "span",
29
+ variant: "caps-heading",
30
+ "no-spacing": "",
31
+ class: "pl-4 pr-1.5"
32
+ }, {
33
+ default: P(() => [
34
+ X(o.$slots, "default"),
35
+ e.suffix ? (i(), w("span", et, J(e.suffix), 1)) : p("", !0)
36
+ ]),
37
+ _: 3
38
+ }),
39
+ a[0] || (a[0] = $("div", { class: "grow border-t" }, null, -1))
40
+ ]));
41
+ }
42
+ }), tt = (e) => `checkbox-item-${e}`, at = "select-search-done-button", nt = ["aria-selected", "aria-disabled", "data-testid", "onKeydown"], ot = ["id", "value", "checked", "disabled"], st = ["for"], it = { class: "flex min-w-0 items-center gap-1" }, rt = { class: "flex min-w-0 flex-grow flex-col" }, ut = { class: "flex min-w-0 flex-grow gap-2" }, dt = { class: "mr-8 flex min-w-0 flex-grow flex-col" }, ct = { class: "flex min-w-0 flex-grow items-center gap-2" }, mt = /* @__PURE__ */ ee({
43
+ __name: "SearchSelectInputOption",
44
+ props: {
45
+ multiple: { type: Boolean },
46
+ search: {},
47
+ condensed: { type: Boolean },
48
+ label: {},
49
+ checked: { type: Boolean },
50
+ disabled: { type: Boolean },
51
+ subLabel: {},
52
+ labelPrefixComponent: {},
53
+ labelSuffixComponent: {},
54
+ labelInlineComponent: {},
55
+ labelBeforeSuffixComponent: {},
56
+ value: {},
57
+ labelSrOnly: { type: Boolean }
58
+ },
59
+ emits: ["value-changed"],
60
+ setup(e, { emit: o }) {
61
+ const a = o, t = e, n = (r) => {
62
+ const S = r.target, h = {
63
+ value: S.value,
64
+ checked: S.checked
65
+ };
66
+ a("value-changed", h);
67
+ }, u = () => {
68
+ t.multiple || t.disabled || a("value-changed", {
69
+ value: t.value
70
+ });
71
+ }, m = f(() => tt(t.value)), v = f(() => Te(t.search ?? ""));
72
+ return (r, S) => (i(), w("li", {
73
+ role: "option",
74
+ "aria-selected": e.checked,
75
+ "aria-disabled": e.disabled,
76
+ class: q([{ "hover:bg-gray-100": !e.disabled }, "relative flex"]),
77
+ "data-testid": m.value,
78
+ tabindex: "0",
79
+ onClick: u,
80
+ onKeydown: El(il(u, ["prevent"]), ["enter"])
81
+ }, [
82
+ e.multiple ? (i(), w(ve, { key: 0 }, [
83
+ $("input", Y(r.$attrs, {
84
+ id: m.value,
85
+ ref: "inputRef",
86
+ value: e.value,
87
+ checked: e.checked,
88
+ disabled: e.disabled,
89
+ type: "checkbox",
90
+ class: ["absolute left-3.5 top-1/2 h-4 w-4 -translate-y-2 rounded border-gray-300 bg-gray-100 focus:ring-2 focus:ring-primary-500", e.disabled ? "text-disabled" : "text-primary-600"],
91
+ tabindex: "-1",
92
+ onChange: n
93
+ }), null, 16, ot),
94
+ $("label", {
95
+ for: m.value,
96
+ class: q([e.disabled ? "text-disabled" : "rounded text-default", "w-full px-4 py-3 pl-10 text-sm font-medium"])
97
+ }, [
98
+ $("div", it, [
99
+ e.labelPrefixComponent ? (i(), y(Z(e.labelPrefixComponent.component), W(Y({ key: 0 }, e.labelPrefixComponent.props)), null, 16)) : p("", !0),
100
+ $("div", rt, [
101
+ $("div", ut, [
102
+ B(pe, {
103
+ text: e.label,
104
+ search: v.value,
105
+ title: e.label,
106
+ class: q(["truncate font-semibold", { "sr-only": e.labelSrOnly }])
107
+ }, null, 8, ["text", "search", "title", "class"]),
108
+ e.labelInlineComponent ? (i(), y(Z(e.labelInlineComponent.component), W(Y({ key: 0 }, e.labelInlineComponent.props)), null, 16)) : p("", !0),
109
+ e.subLabel && e.condensed ? (i(), y(pe, {
110
+ key: 1,
111
+ class: "truncate text-xs text-subtle",
112
+ text: e.subLabel,
113
+ title: e.subLabel,
114
+ search: v.value
115
+ }, null, 8, ["text", "title", "search"])) : p("", !0)
116
+ ]),
117
+ e.subLabel && !e.condensed ? (i(), y(pe, {
118
+ key: 0,
119
+ class: "truncate text-xs text-subtle",
120
+ text: e.subLabel,
121
+ title: e.subLabel,
122
+ search: v.value
123
+ }, null, 8, ["text", "title", "search"])) : p("", !0)
124
+ ]),
125
+ e.labelBeforeSuffixComponent ? (i(), y(Z(e.labelBeforeSuffixComponent.component), W(Y({ key: 1 }, e.labelBeforeSuffixComponent.props)), null, 16)) : p("", !0),
126
+ e.labelSuffixComponent ? (i(), y(Z(e.labelSuffixComponent.component), W(Y({ key: 2 }, e.labelSuffixComponent.props)), null, 16)) : p("", !0)
127
+ ])
128
+ ], 10, st)
129
+ ], 64)) : (i(), w("div", {
130
+ key: 1,
131
+ class: q(["flex w-full min-w-0 items-center gap-3 px-4 text-sm font-medium", [
132
+ e.condensed ? "p-2" : "py-2",
133
+ e.disabled ?? "cursor-not-allowed",
134
+ !e.disabled && "cursor-pointer"
135
+ ]])
136
+ }, [
137
+ e.labelPrefixComponent ? (i(), y(Z(e.labelPrefixComponent.component), W(Y({ key: 0 }, e.labelPrefixComponent.props)), null, 16)) : p("", !0),
138
+ $("div", dt, [
139
+ $("div", ct, [
140
+ B(pe, {
141
+ text: e.label,
142
+ search: s(Te)(e.search ?? ""),
143
+ title: e.label,
144
+ class: q(["truncate font-semibold", { "text-disabled": e.disabled }])
145
+ }, null, 8, ["text", "search", "title", "class"]),
146
+ e.labelInlineComponent ? (i(), y(Z(e.labelInlineComponent.component), W(Y({ key: 0 }, e.labelInlineComponent.props)), null, 16)) : p("", !0),
147
+ e.subLabel && e.condensed ? (i(), y(pe, {
148
+ key: 1,
149
+ class: "truncate text-xs text-subtle",
150
+ text: e.subLabel,
151
+ title: e.subLabel,
152
+ search: v.value
153
+ }, null, 8, ["text", "title", "search"])) : p("", !0)
154
+ ]),
155
+ e.subLabel && !e.condensed ? (i(), y(pe, {
156
+ key: 0,
157
+ class: "truncate text-xs text-subtle",
158
+ text: e.subLabel,
159
+ title: e.subLabel,
160
+ search: v.value
161
+ }, null, 8, ["text", "title", "search"])) : p("", !0)
162
+ ]),
163
+ e.labelBeforeSuffixComponent ? (i(), y(Z(e.labelBeforeSuffixComponent.component), W(Y({ key: 1 }, e.labelBeforeSuffixComponent.props)), null, 16)) : p("", !0),
164
+ e.labelSuffixComponent ? (i(), y(Z(e.labelSuffixComponent.component), W(Y({ key: 2 }, e.labelSuffixComponent.props)), null, 16)) : p("", !0)
165
+ ], 2))
166
+ ], 42, nt));
167
+ }
168
+ }), ft = { class: "flex flex-col rounded-bl rounded-br" }, pt = {
169
+ key: 0,
170
+ class: "px-5 py-5 text-sm text-secondary"
171
+ }, ht = { key: 0 }, vt = ["innerHTML"], bt = { key: 0 }, yt = /* @__PURE__ */ ee({
172
+ __name: "SearchSelectInputOptions",
173
+ props: {
174
+ i18n: {},
175
+ model: {},
176
+ search: {},
177
+ multiple: { type: Boolean },
178
+ condensed: { type: Boolean },
179
+ hasLargeDropdown: { type: Boolean },
180
+ addOnly: { type: Boolean },
181
+ options: {}
182
+ },
183
+ emits: ["value-changed"],
184
+ setup(e, { emit: o }) {
185
+ const a = o, t = e, n = (M) => a("value-changed", M), u = f(() => {
186
+ var M, C;
187
+ const g = t.search ? `<span class="font-bold">"${Te(t.search)}"</span>` : "";
188
+ return ((C = (M = t.i18n) == null ? void 0 : M.noResults) == null ? void 0 : C.call(M, g)) ?? `No matches found for ${g}.`;
189
+ }), m = f(() => t.search === ""), v = f(() => t.options.filter((M) => !M.hidden)), r = f(() => v.value.length > 0), S = f(() => r.value ? !1 : m.value ? !0 : !!u.value), h = f(
190
+ () => ll(t.options, "group").reduce(
191
+ (M, C) => C.value === "" ? M : {
192
+ ...M,
193
+ [C.value]: C.group
194
+ },
195
+ {}
196
+ )
197
+ ), E = f(
198
+ () => ll(t.options, "group").reduce(
199
+ (M, C) => C.value === "" ? M : {
200
+ ...M,
201
+ [C.value]: C.groupSuffix
202
+ },
203
+ {}
204
+ )
205
+ );
206
+ return (M, C) => {
207
+ var g;
208
+ return i(), w("div", ft, [
209
+ S.value ? (i(), w("div", pt, [
210
+ m.value ? (i(), w("span", ht, J(((g = t.i18n) == null ? void 0 : g.noOptionsAvailable) ?? "No available options."), 1)) : (i(), w("span", {
211
+ key: 1,
212
+ innerHTML: u.value
213
+ }, null, 8, vt))
214
+ ])) : r.value ? (i(), w("ul", {
215
+ key: 1,
216
+ class: q(["list-none overflow-y-auto", [e.hasLargeDropdown ? "max-h-[19rem]" : "max-h-48"]])
217
+ }, [
218
+ e.addOnly ? (i(), w("div", bt, [
219
+ B(Se, {
220
+ variant: "body-sm",
221
+ color: "secondary",
222
+ "no-spacing": "",
223
+ class: "mt-1 px-3 py-2"
224
+ }, {
225
+ default: P(() => {
226
+ var N;
227
+ return [
228
+ _(J(((N = e.i18n) == null ? void 0 : N.addOnly) ?? "You can only select currently unselected options."), 1)
229
+ ];
230
+ }),
231
+ _: 1
232
+ })
233
+ ])) : p("", !0),
234
+ (i(!0), w(ve, null, rl(v.value, ({
235
+ label: N,
236
+ subLabel: G,
237
+ value: T,
238
+ checked: V,
239
+ disabled: b,
240
+ labelInlineComponent: O,
241
+ labelSuffixComponent: le,
242
+ labelSrOnly: te,
243
+ labelPrefixComponent: ae,
244
+ labelBeforeSuffixComponent: x,
245
+ searchValues: D
246
+ }) => (i(), w(ve, { key: T }, [
247
+ h.value[T] ? (i(), y(lt, {
248
+ key: 0,
249
+ suffix: E.value[T]
250
+ }, {
251
+ default: P(() => [
252
+ _(J(h.value[T]), 1)
253
+ ]),
254
+ _: 2
255
+ }, 1032, ["suffix"])) : p("", !0),
256
+ B(mt, {
257
+ label: N,
258
+ "sub-label": G,
259
+ value: T,
260
+ checked: V,
261
+ disabled: b,
262
+ search: D ? "" : e.search,
263
+ multiple: e.multiple,
264
+ condensed: e.condensed,
265
+ "label-suffix-component": le,
266
+ "label-prefix-component": ae,
267
+ "label-before-suffix-component": x,
268
+ "label-inline-component": O,
269
+ "label-sr-only": te,
270
+ onValueChanged: n
271
+ }, null, 8, ["label", "sub-label", "value", "checked", "disabled", "search", "multiple", "condensed", "label-suffix-component", "label-prefix-component", "label-before-suffix-component", "label-inline-component", "label-sr-only"])
272
+ ], 64))), 128))
273
+ ], 2)) : p("", !0),
274
+ M.$slots["list-footer-content"] ? (i(), w("div", {
275
+ key: 2,
276
+ class: q({ "border-t border-gray-200": r.value })
277
+ }, [
278
+ X(M.$slots, "list-footer-content")
279
+ ], 2)) : p("", !0)
280
+ ]);
281
+ };
282
+ }
283
+ });
284
+ function gt(e, o, a = []) {
285
+ return [...e].sort((t, n) => {
286
+ for (let u = 0; u < o.length; u++) {
287
+ const m = o[u], v = typeof m == "function" ? m : (E) => E[m], r = a[u] === "desc" ? -1 : 1, S = v(t), h = v(n);
288
+ if (!(S == null && h == null)) {
289
+ if (S == null) return r;
290
+ if (h == null || S < h) return -r;
291
+ if (S > h) return r;
292
+ }
293
+ }
294
+ return 0;
295
+ });
296
+ }
297
+ const Ct = { class: "flex flex-col gap-2" }, xt = ["aria-expanded"], St = { class: "flex items-center gap-2" }, kt = { key: 2 }, Lt = { class: "flex items-center gap-2 self-stretch" }, It = { class: "flex items-center" }, wt = {
298
+ key: 0,
299
+ class: "flex flex-wrap gap-2"
300
+ }, Mt = ["innerHTML"], dl = /* @__PURE__ */ ee({
301
+ __name: "SearchSelectInput",
302
+ props: /* @__PURE__ */ Ne({
303
+ addOnly: { type: Boolean, default: !1 },
304
+ disabled: { type: Boolean },
305
+ i18n: {},
306
+ label: {},
307
+ labelScreenReaderOnly: { type: Boolean },
308
+ singleModelValue: {},
309
+ multiModelValue: {},
310
+ options: { default: () => [] },
311
+ optionsOrder: { default: () => ["asc", "asc"] },
312
+ optionsOrderProperties: { default: () => ["group", "label"] },
313
+ required: { type: Boolean, default: !1 },
314
+ rootClass: {},
315
+ wrapperClass: {},
316
+ inputClass: {},
317
+ dropdownWidth: {},
318
+ invalid: { type: Boolean },
319
+ size: { default: "md" },
320
+ withChips: { type: Boolean, default: !1 },
321
+ error: {},
322
+ hasReset: { type: Boolean },
323
+ name: {},
324
+ hasLargeDropdown: { type: Boolean, default: !1 },
325
+ showSuffixInClosedInput: { type: Boolean },
326
+ showSuffixLabelInInput: { type: Boolean },
327
+ showSelectionInClosedInput: { type: Boolean },
328
+ condensed: { type: Boolean },
329
+ form: {},
330
+ prefix: {}
331
+ }, {
332
+ search: { default: "" },
333
+ searchModifiers: {}
334
+ }),
335
+ emits: /* @__PURE__ */ Ne(["update:singleModelValue", "update:multiModelValue", "blur", "change", "focus", "add-option"], ["update:search"]),
336
+ setup(e, { expose: o, emit: a }) {
337
+ var t;
338
+ const n = e, u = Ol(Kl), m = (t = Rl()) == null ? void 0 : t.vnode.props, v = !(m != null && m["onUpdate:search"]), r = f(() => Array.isArray(n.multiModelValue)), S = H(n.singleModelValue), h = a, E = Ae(n, "singleModelValue", h), M = Ae(n, "multiModelValue", h), C = H(M.value ?? []);
339
+ he(
340
+ () => n.multiModelValue,
341
+ (l) => {
342
+ l && (C.value = l);
343
+ }
344
+ );
345
+ const g = Ue(e, "search"), N = Bl(), G = f(() => !!N.prefix), T = f(() => !!n.prefix), V = f(() => G.value || T.value), b = f(() => V.value || !$e.value), O = f({
346
+ get: () => r.value ? C.value ?? [] : typeof E.value == "string" ? [E.value] : [],
347
+ set(l) {
348
+ r.value ? C.value = l : E.value = (l == null ? void 0 : l[0]) ?? "";
349
+ }
350
+ }), le = f(
351
+ () => ie.value.filter((l) => {
352
+ var d;
353
+ return (d = O.value) == null ? void 0 : d.includes(l.value);
354
+ })
355
+ ), te = f(() => le.value[0]), ae = Hl(), x = H(!1), D = H(), U = H(), de = H(), I = () => D.value ? Array.from(
356
+ D.value.querySelectorAll('li[tabindex="0"], button:not([disabled])')
357
+ ) : [], ke = () => {
358
+ var l;
359
+ let d = document.activeElement;
360
+ for (; (l = d == null ? void 0 : d.shadowRoot) != null && l.activeElement; )
361
+ d = d.shadowRoot.activeElement;
362
+ return d;
363
+ }, ye = () => {
364
+ if (!U.value) return null;
365
+ let l = U.value.querySelector("input");
366
+ if (l) return l;
367
+ const d = U.value.querySelectorAll("*");
368
+ for (const k of d)
369
+ if (k.shadowRoot && (l = k.shadowRoot.querySelector("input"), l))
370
+ return l;
371
+ return null;
372
+ };
373
+ let se = !1;
374
+ const ge = () => {
375
+ var l;
376
+ se = !0, (l = ye()) == null || l.focus(), se = !1;
377
+ }, Ce = (l) => (l == null ? void 0 : l.selectedLabel) ?? (l == null ? void 0 : l.label) ?? "", c = H(""), A = H(!1), ce = () => {
378
+ se || (x.value = !0);
379
+ }, yl = (l) => {
380
+ var d;
381
+ n.disabled || (d = l.target) != null && d.closest("button") || (x.value = !0);
382
+ }, gl = () => {
383
+ n.disabled || (A.value = !0, x.value = !0);
384
+ }, Cl = (l) => {
385
+ var d;
386
+ if (!x.value) return;
387
+ const k = I(), R = ye();
388
+ if (ke() === R)
389
+ switch (l.key) {
390
+ case "ArrowDown":
391
+ k.length > 0 && (l.preventDefault(), (d = k[0]) == null || d.focus());
392
+ break;
393
+ case "Tab":
394
+ j();
395
+ break;
396
+ case "Escape":
397
+ l.preventDefault(), j();
398
+ break;
399
+ }
400
+ }, xl = (l) => {
401
+ var d, k, R;
402
+ const z = I(), L = ke(), K = z.indexOf(L), fe = ye();
403
+ switch (l.key) {
404
+ case "ArrowDown":
405
+ K < z.length - 1 && (l.preventDefault(), (d = z[K + 1]) == null || d.focus());
406
+ break;
407
+ case "ArrowUp":
408
+ l.preventDefault(), K <= 0 ? fe == null || fe.focus() : (k = z[K - 1]) == null || k.focus();
409
+ break;
410
+ case "Tab":
411
+ if (l.preventDefault(), l.shiftKey && K > 0) {
412
+ (R = z[K - 1]) == null || R.focus();
413
+ break;
414
+ }
415
+ j(), ge();
416
+ break;
417
+ case "Escape":
418
+ l.preventDefault(), j(), ge();
419
+ break;
420
+ }
421
+ }, { floatingStyles: Sl } = Zl(U, D, {
422
+ // Matches `bottom` while the dropdown is as wide as the input, and keeps a wider
423
+ // `dropdownWidth` dropdown aligned to the input's left edge.
424
+ placement: "bottom-start",
425
+ middleware: ({ offset: l, flip: d, shift: k, size: R }) => [
426
+ l(4),
427
+ d({
428
+ mainAxis: !0
429
+ }),
430
+ k({ padding: 8 }),
431
+ R({
432
+ padding: 8,
433
+ apply({ availableHeight: z, elements: L }) {
434
+ Object.assign(L.floating.style, {
435
+ maxHeight: `${z}px`
436
+ });
437
+ }
438
+ })
439
+ ]
440
+ }), { width: kl } = ul(U), He = (l) => {
441
+ var d;
442
+ return n.disabled || !n.disabled && n.addOnly && !!((d = S.value) != null && d.includes(l));
443
+ }, ie = f(() => {
444
+ const l = n.options.map((k) => ({
445
+ ...k,
446
+ checked: O.value.includes(k.value),
447
+ disabled: k.disabled ?? He(k.value)
448
+ })), d = [
449
+ ...l,
450
+ ...g.value.length === 0 && Le.value ? Le.value.filter(
451
+ (k) => !l.some((R) => R.value === k.value)
452
+ ) : []
453
+ ];
454
+ return n.optionsOrderProperties && !De(n.optionsOrderProperties) ? gt(d, n.optionsOrderProperties, n.optionsOrder) : d;
455
+ }), Ze = (l) => ie.value.filter((d) => l.some((k) => d.value === k)), re = f(() => Ze(O.value)), F = f(() => re.value[0]), Pe = f(() => {
456
+ var l;
457
+ if (!(x.value || !n.showSuffixInClosedInput) && !(r.value && re.value.length !== 1))
458
+ return (l = F.value) == null ? void 0 : l.labelSuffixComponent;
459
+ }), me = f(() => {
460
+ var l;
461
+ if (!n.showSelectionInClosedInput || x.value || !r.value)
462
+ return;
463
+ const d = (l = F.value) == null ? void 0 : l.labelPrefixComponent;
464
+ if (d)
465
+ return { component: d, extraCount: re.value.length - 1 };
466
+ }), Ll = f(() => n.size === "xs" ? "px-1" : n.size === "sm" ? "px-2" : "px-4"), Le = H([]);
467
+ he(
468
+ () => {
469
+ if (r.value) return null;
470
+ const l = E.value ?? "";
471
+ return {
472
+ selectedValue: l,
473
+ label: Ce(n.options.find((d) => d.value === l))
474
+ };
475
+ },
476
+ (l) => {
477
+ if (l) {
478
+ if (!l.selectedValue) {
479
+ c.value = "", x.value || (g.value = "");
480
+ return;
481
+ }
482
+ l.label && (c.value = l.label, x.value || (g.value = l.label));
483
+ }
484
+ },
485
+ { immediate: !0 }
486
+ );
487
+ const We = ({
488
+ value: l,
489
+ checked: d
490
+ }) => {
491
+ let k;
492
+ r.value ? k = d ? [...O.value, l] : O.value.filter((R) => R !== l) : (k = [l], c.value = Ce(
493
+ ie.value.find((R) => R.value === l)
494
+ ), g.value = c.value, A.value = !1, x.value = !1, ge()), Le.value = Ze(k), O.value = k, h("change");
495
+ }, Ye = f(
496
+ () => O.value.length > 0 && !n.disabled && !(O.value.length === 1 && O.value[0] === "")
497
+ ), Ie = () => {
498
+ O.value = [], C.value = [], r.value || (c.value = "", g.value = "", A.value = !1);
499
+ }, Il = () => {
500
+ if (!r.value && c.value && g.value === c.value) {
501
+ Ie();
502
+ return;
503
+ }
504
+ g.value = "";
505
+ }, wl = f(() => {
506
+ if (!v || !r.value && !A.value)
507
+ return ie.value;
508
+ const l = g.value.toLowerCase();
509
+ return ie.value.filter((d) => d.searchValues ? d.searchValues.some(
510
+ (k) => k.toLowerCase().includes(l)
511
+ ) : (d.label ?? "").toLowerCase().includes(l));
512
+ }), j = () => {
513
+ r.value ? (M.value = C.value, g.value = "") : g.value === "" && n.hasReset ? Ie() : (g.value = c.value, A.value = !1), x.value = !1;
514
+ };
515
+ he(C, () => {
516
+ !x.value && !Yl(M.value, C.value) && r.value && (M.value = C.value);
517
+ }), ql("mousedown", (l) => {
518
+ const d = l.composedPath();
519
+ D.value && d.includes(D.value) || U.value && d.includes(U.value) || x.value && j();
520
+ });
521
+ const Ml = f(() => {
522
+ var l, d, k, R, z, L;
523
+ return r.value && x.value ? ((l = n.i18n) == null ? void 0 : l.placeholderSearch) ?? "Search" : me.value ? "" : r.value && re.value.length === 1 ? (d = F.value) == null ? void 0 : d.label : r.value && re.value.length >= 2 ? `${(k = F.value) == null ? void 0 : k.label} +${re.value.length - 1}` : !E.value && !F.value ? x.value ? ((R = n.i18n) == null ? void 0 : R.placeholderSearch) ?? "Search" : ((z = n.i18n) == null ? void 0 : z.placeholderDefault) ?? "Select an option" : x.value ? ((L = n.i18n) == null ? void 0 : L.placeholderSearch) ?? "Search" : !n.singleModelValue && !F.value ? "" : Ce(
524
+ ie.value.find((K) => {
525
+ var fe;
526
+ return K.value === ((fe = te.value) == null ? void 0 : fe.value);
527
+ })
528
+ );
529
+ }), Nl = f(() => {
530
+ const l = !x.value && (!r.value && !!E.value || r.value && !De(n.multiModelValue));
531
+ return Jl(n.inputClass, {
532
+ "text-ellipsis placeholder:text-default": l
533
+ });
534
+ }), Je = f(() => g.value === ""), Al = f(() => !(n.disabled || Je.value || !r.value && c.value !== "" && g.value === c.value && !n.hasReset)), Vl = f(
535
+ () => Ye.value && !!n.hasReset && Je.value && (r.value || !x.value)
536
+ ), Pl = !!(m != null && m.onAddOption), $l = () => {
537
+ h("add-option"), j();
538
+ }, $e = f(
539
+ () => {
540
+ var l;
541
+ return !x.value && !r.value && ((l = F.value) == null ? void 0 : l.labelPrefixComponent);
542
+ }
543
+ ), je = `search-select-options-${Math.random().toString(36).substring(2, 9)}`;
544
+ return o({
545
+ flushMemoryCachedSelectedOptions: () => Le.value = [],
546
+ close: j
547
+ }), (l, d) => {
548
+ var k, R, z;
549
+ return i(), w(ve, null, [
550
+ $("div", Ct, [
551
+ $("div", {
552
+ ref_key: "wrapperRef",
553
+ ref: U,
554
+ class: q(["relative flex items-end", {
555
+ [`${e.rootClass}`]: e.rootClass,
556
+ "z-30": x.value
557
+ }]),
558
+ role: "combobox",
559
+ "aria-expanded": x.value,
560
+ "aria-haspopup": !0,
561
+ "aria-controls": je,
562
+ onKeydown: Cl
563
+ }, [
564
+ B(s(qe), {
565
+ ref_key: "inputRef",
566
+ ref: de,
567
+ modelValue: g.value,
568
+ "onUpdate:modelValue": d[1] || (d[1] = (L) => g.value = L),
569
+ required: e.required,
570
+ label: e.label,
571
+ name: e.name,
572
+ form: e.form,
573
+ "label-screen-reader-only": e.labelScreenReaderOnly,
574
+ placeholder: Ml.value,
575
+ class: "grow",
576
+ "wrapper-class": [
577
+ {
578
+ "border-transparent border border-b-gray-200 focus-within:border-b relative z-10 rounded-b-none": x.value
579
+ },
580
+ e.wrapperClass
581
+ ],
582
+ "input-class": Nl.value,
583
+ "suffix-class": "border-l-0",
584
+ disabled: e.disabled,
585
+ size: e.size,
586
+ error: e.error,
587
+ invalid: e.invalid,
588
+ "prefix-has-border": b.value,
589
+ "aria-autocomplete": "list",
590
+ onFocus: ce,
591
+ onClick: yl,
592
+ onInput: gl,
593
+ onBlur: d[2] || (d[2] = (L) => l.$emit("blur"))
594
+ }, Ve({
595
+ suffix: P(() => {
596
+ var L, K;
597
+ return [
598
+ $("div", Lt, [
599
+ !x.value && !r.value && ((L = F.value) != null && L.labelInlineComponent) && (!e.showSuffixInClosedInput || e.showSuffixLabelInInput) ? (i(), y(Z(F.value.labelInlineComponent.component), W(Y({ key: 0 }, F.value.labelInlineComponent.props)), null, 16)) : p("", !0),
600
+ !x.value && !r.value && ((K = F.value) != null && K.labelBeforeSuffixComponent) && (!e.showSuffixInClosedInput || e.showSuffixLabelInInput) ? (i(), y(Z(F.value.labelBeforeSuffixComponent.component), W(Y({ key: 1 }, F.value.labelBeforeSuffixComponent.props)), null, 16)) : p("", !0),
601
+ Pe.value ? (i(), y(Z(Pe.value.component), W(Y({ key: 2 }, Pe.value.props)), null, 16)) : p("", !0),
602
+ $("div", It, [
603
+ Vl.value ? (i(), y(tl, {
604
+ key: 0,
605
+ icon: "close",
606
+ size: "sm",
607
+ intent: "subtle",
608
+ type: "button",
609
+ onMousedown: d[0] || (d[0] = il(() => {
610
+ }, ["prevent"])),
611
+ onClick: Ie
612
+ })) : p("", !0),
613
+ Al.value ? (i(), y(tl, {
614
+ key: 1,
615
+ icon: "close",
616
+ size: "sm",
617
+ intent: "subtle",
618
+ type: "button",
619
+ onClick: Il
620
+ })) : p("", !0),
621
+ B(al, {
622
+ icon: x.value ? "keyboard_arrow_up" : "keyboard_arrow_down",
623
+ size: e.size === "xs" || e.size === "sm" ? "xs" : "sm",
624
+ class: q(e.disabled ? "text-disabled" : "text-secondary"),
625
+ "aria-hidden": "true",
626
+ "data-testid": "search-select-chevron"
627
+ }, null, 8, ["icon", "size", "class"])
628
+ ])
629
+ ])
630
+ ];
631
+ }),
632
+ _: 2
633
+ }, [
634
+ l.$slots["label-suffix"] ? {
635
+ name: "label-suffix",
636
+ fn: P(() => [
637
+ X(l.$slots, "label-suffix")
638
+ ]),
639
+ key: "0"
640
+ } : void 0,
641
+ l.$slots.tooltip ? {
642
+ name: "tooltip",
643
+ fn: P(() => [
644
+ X(l.$slots, "tooltip")
645
+ ]),
646
+ key: "1"
647
+ } : void 0,
648
+ me.value ? {
649
+ name: "input",
650
+ fn: P(() => [
651
+ $("div", {
652
+ class: q(["pointer-events-none absolute inset-0 flex items-center gap-1", Ll.value])
653
+ }, [
654
+ (i(), y(Z(me.value.component.component), W(Qe(me.value.component.props)), null, 16)),
655
+ me.value.extraCount > 0 ? (i(), y(s(Se), {
656
+ key: 0,
657
+ variant: e.size === "xs" || e.size === "sm" ? "body-xs" : "body-sm",
658
+ tag: "span",
659
+ weight: "semibold",
660
+ "no-spacing": ""
661
+ }, {
662
+ default: P(() => [
663
+ _(" +" + J(me.value.extraCount), 1)
664
+ ]),
665
+ _: 1
666
+ }, 8, ["variant"])) : p("", !0)
667
+ ], 2)
668
+ ]),
669
+ key: "2"
670
+ } : void 0,
671
+ V.value || $e.value || !v ? {
672
+ name: "prefix",
673
+ fn: P(() => {
674
+ var L;
675
+ return [
676
+ $("div", St, [
677
+ G.value ? X(l.$slots, "prefix", {}, void 0, void 0, 0) : T.value ? (i(), y(s(Se), {
678
+ key: 1,
679
+ variant: e.size === "xs" ? "body-xs" : "body-sm",
680
+ tag: "span",
681
+ weight: "semibold"
682
+ }, {
683
+ default: P(() => [
684
+ _(J(e.prefix), 1)
685
+ ]),
686
+ _: 1
687
+ }, 8, ["variant"])) : $e.value && ((L = F.value) != null && L.labelPrefixComponent) ? (i(), w("div", kt, [
688
+ (i(), y(Z(F.value.labelPrefixComponent.component), W(Qe(F.value.labelPrefixComponent.props)), null, 16))
689
+ ])) : v ? p("", !0) : (i(), y(al, {
690
+ key: 3,
691
+ icon: "search",
692
+ size: "sm"
693
+ }))
694
+ ])
695
+ ];
696
+ }),
697
+ key: "3"
698
+ } : void 0,
699
+ l.$slots.helper ? {
700
+ name: "helper",
701
+ fn: P(() => [
702
+ X(l.$slots, "helper")
703
+ ]),
704
+ key: "4"
705
+ } : void 0
706
+ ]), 1032, ["modelValue", "required", "label", "name", "form", "label-screen-reader-only", "placeholder", "wrapper-class", "input-class", "disabled", "size", "error", "invalid", "prefix-has-border"])
707
+ ], 42, xt),
708
+ e.withChips ? (i(), w("div", wt, [
709
+ (i(!0), w(ve, null, rl(re.value, ({ value: L, label: K }) => (i(), y(Wl, {
710
+ key: L,
711
+ removable: !He(L),
712
+ onRemoved: (fe) => We({ value: L, checked: !1 })
713
+ }, {
714
+ default: P(() => [
715
+ $("span", { innerHTML: K }, null, 8, Mt)
716
+ ]),
717
+ _: 2
718
+ }, 1032, ["removable", "onRemoved"]))), 128))
719
+ ])) : p("", !0)
720
+ ]),
721
+ s(ae) && s(u) ? (i(), y(Tl, {
722
+ key: 0,
723
+ to: s(u)
724
+ }, [
725
+ x.value && !e.disabled ? (i(), w("div", {
726
+ key: 0,
727
+ id: je,
728
+ ref_key: "optionsRef",
729
+ ref: D,
730
+ role: "listbox",
731
+ style: Xe(s(Sl)),
732
+ class: "z-70 overflow-y-auto rounded border border-gray-200 bg-white drop-shadow-md",
733
+ onMouseenter: d[3] || (d[3] = (L) => x.value = !0),
734
+ onKeydown: xl
735
+ }, [
736
+ $("div", {
737
+ class: "rounded pt-0",
738
+ style: Xe({ width: `${e.dropdownWidth ?? s(kl)}px` })
739
+ }, [
740
+ B(yt, {
741
+ i18n: {
742
+ addOnly: (k = e.i18n) == null ? void 0 : k.addOnly,
743
+ noResults: (R = e.i18n) == null ? void 0 : R.noResults,
744
+ noOptionsAvailable: (z = e.i18n) == null ? void 0 : z.noOptionsAvailable
745
+ },
746
+ options: wl.value,
747
+ multiple: r.value,
748
+ search: g.value,
749
+ model: O.value,
750
+ "add-only": e.addOnly,
751
+ "allows-multiple-values": !!r.value,
752
+ condensed: e.condensed,
753
+ "has-large-dropdown": e.hasLargeDropdown,
754
+ onValueChanged: We
755
+ }, {
756
+ "list-footer-content": P(() => [
757
+ Pl ? (i(), y(Ee, {
758
+ key: 0,
759
+ intent: "subtle",
760
+ class: "w-full rounded-t-none",
761
+ type: "button",
762
+ "icon-prefix": "add",
763
+ onClick: $l
764
+ }, {
765
+ default: P(() => {
766
+ var L;
767
+ return [
768
+ _(J((L = e.i18n) == null ? void 0 : L.addOption), 1)
769
+ ];
770
+ }),
771
+ _: 1
772
+ })) : p("", !0),
773
+ r.value ? (i(), w("div", {
774
+ key: 1,
775
+ class: q(["flex items-center justify-between", { "py-2": !l.$slots["list-footer-content"] }])
776
+ }, [
777
+ Ye.value ? (i(), y(Ee, {
778
+ key: 0,
779
+ type: "button",
780
+ intent: "subtle",
781
+ size: "xs",
782
+ class: "ml-2",
783
+ onClick: Ie
784
+ }, {
785
+ default: P(() => {
786
+ var L;
787
+ return [
788
+ _(J(((L = e.i18n) == null ? void 0 : L.multipleValuesClearButtonText) ?? "Clear"), 1)
789
+ ];
790
+ }),
791
+ _: 1
792
+ })) : p("", !0),
793
+ $("div", null, [
794
+ X(l.$slots, "list-footer-content", { close: j })
795
+ ]),
796
+ B(Ee, {
797
+ type: "button",
798
+ intent: "secondary",
799
+ size: "xs",
800
+ class: "mr-2",
801
+ "data-testid": s(at),
802
+ onClick: j
803
+ }, {
804
+ default: P(() => {
805
+ var L;
806
+ return [
807
+ _(J(((L = e.i18n) == null ? void 0 : L.multipleValuesDoneButtonText) ?? "Done"), 1)
808
+ ];
809
+ }),
810
+ _: 1
811
+ }, 8, ["data-testid"])
812
+ ], 2)) : X(l.$slots, "list-footer-content", { close: j }, void 0, void 0, 2)
813
+ ]),
814
+ _: 3
815
+ }, 8, ["i18n", "options", "multiple", "search", "model", "add-only", "allows-multiple-values", "condensed", "has-large-dropdown"])
816
+ ], 4)
817
+ ], 36)) : p("", !0)
818
+ ], 8, ["to"])) : p("", !0)
819
+ ], 64);
820
+ };
821
+ }
822
+ }), nl = /* @__PURE__ */ ee({
823
+ __name: "CountrySelect",
824
+ props: {
825
+ label: {},
826
+ singleModelValue: {},
827
+ multiModelValue: {},
828
+ error: {},
829
+ required: { type: Boolean, default: !0 },
830
+ hasReset: { type: Boolean },
831
+ disabled: { type: Boolean },
832
+ size: {},
833
+ labelScreenReaderOnly: { type: Boolean },
834
+ i18n: {},
835
+ name: {},
836
+ form: {}
837
+ },
838
+ emits: ["update:modelValue", "update:singleModelValue"],
839
+ setup(e, { emit: o }) {
840
+ const a = e, t = Ae(a, "singleModelValue"), n = Ae(a, "multiModelValue"), u = o;
841
+ return (m, v) => (i(), y(dl, {
842
+ "multi-model-value": s(n),
843
+ "onUpdate:multiModelValue": v[0] || (v[0] = (r) => _e(n) ? n.value = r : null),
844
+ "single-model-value": s(t),
845
+ "onUpdate:singleModelValue": [
846
+ v[1] || (v[1] = (r) => _e(t) ? t.value = r : null),
847
+ v[2] || (v[2] = (r) => {
848
+ u("update:modelValue", r);
849
+ })
850
+ ],
851
+ "root-class": m.$attrs.class,
852
+ label: e.label,
853
+ options: s(Ge).map(({ key: r, value: S }) => ({ label: S, value: r })),
854
+ error: e.error,
855
+ "has-reset": e.hasReset,
856
+ disabled: e.disabled,
857
+ required: e.required,
858
+ "with-chips": !!e.multiModelValue,
859
+ name: e.name,
860
+ form: e.form,
861
+ size: e.size,
862
+ "label-screen-reader-only": e.labelScreenReaderOnly,
863
+ i18n: e.i18n
864
+ }, Ve({ _: 2 }, [
865
+ m.$slots["label-suffix"] ? {
866
+ name: "label-suffix",
867
+ fn: P(() => [
868
+ X(m.$slots, "label-suffix")
869
+ ]),
870
+ key: "0"
871
+ } : void 0
872
+ ]), 1032, ["multi-model-value", "single-model-value", "root-class", "label", "options", "error", "has-reset", "disabled", "required", "with-chips", "name", "form", "size", "label-screen-reader-only", "i18n"]));
873
+ }
874
+ }), cl = {
875
+ AF: "93",
876
+ AX: "358",
877
+ AL: "355",
878
+ DZ: "213",
879
+ AS: "1684",
880
+ AD: "376",
881
+ AO: "244",
882
+ AI: "1264",
883
+ AQ: "672",
884
+ AG: "1268",
885
+ AR: "54",
886
+ AM: "374",
887
+ AW: "297",
888
+ AU: "61",
889
+ AT: "43",
890
+ AZ: "994",
891
+ BS: "1242",
892
+ BH: "973",
893
+ BD: "880",
894
+ BB: "1246",
895
+ BY: "375",
896
+ BE: "32",
897
+ BZ: "501",
898
+ BJ: "229",
899
+ BM: "1441",
900
+ BT: "975",
901
+ BO: "591",
902
+ BA: "387",
903
+ BW: "267",
904
+ BR: "55",
905
+ IO: "246",
906
+ BN: "673",
907
+ BG: "359",
908
+ BF: "226",
909
+ BI: "257",
910
+ KH: "855",
911
+ CM: "237",
912
+ CA: "1",
913
+ CV: "238",
914
+ KY: "1345",
915
+ CF: "236",
916
+ TD: "235",
917
+ CL: "56",
918
+ CN: "86",
919
+ CX: "61",
920
+ CC: "61",
921
+ CO: "57",
922
+ KM: "269",
923
+ CG: "242",
924
+ CD: "243",
925
+ CK: "682",
926
+ CR: "506",
927
+ CI: "225",
928
+ HR: "385",
929
+ CU: "53",
930
+ CW: "599",
931
+ CY: "357",
932
+ CZ: "420",
933
+ DK: "45",
934
+ DJ: "253",
935
+ DM: "1767",
936
+ DO: "1809",
937
+ EC: "593",
938
+ EG: "20",
939
+ SV: "503",
940
+ GQ: "240",
941
+ ER: "291",
942
+ EE: "372",
943
+ ET: "251",
944
+ FK: "500",
945
+ FO: "298",
946
+ FJ: "679",
947
+ FI: "358",
948
+ FR: "33",
949
+ GF: "594",
950
+ PF: "689",
951
+ TF: "262",
952
+ GA: "241",
953
+ GM: "220",
954
+ GE: "995",
955
+ DE: "49",
956
+ GH: "233",
957
+ GI: "350",
958
+ GR: "30",
959
+ GL: "299",
960
+ GD: "1473",
961
+ GP: "590",
962
+ GU: "1671",
963
+ GT: "502",
964
+ GG: "44",
965
+ GN: "224",
966
+ GW: "245",
967
+ GY: "592",
968
+ HT: "509",
969
+ VA: "39",
970
+ HN: "504",
971
+ HK: "852",
972
+ HU: "36",
973
+ IS: "354",
974
+ IN: "91",
975
+ ID: "62",
976
+ IR: "98",
977
+ IQ: "964",
978
+ IE: "353",
979
+ IM: "44",
980
+ IL: "972",
981
+ IT: "39",
982
+ JM: "1876",
983
+ JP: "81",
984
+ JE: "44",
985
+ JO: "962",
986
+ KZ: "7",
987
+ KE: "254",
988
+ KI: "686",
989
+ KR: "82",
990
+ KP: "850",
991
+ KW: "965",
992
+ KG: "996",
993
+ LA: "856",
994
+ LV: "371",
995
+ LB: "961",
996
+ LS: "266",
997
+ LR: "231",
998
+ LY: "218",
999
+ LI: "423",
1000
+ LT: "370",
1001
+ LU: "352",
1002
+ MO: "853",
1003
+ MK: "389",
1004
+ MG: "261",
1005
+ MW: "265",
1006
+ MY: "60",
1007
+ MV: "960",
1008
+ ML: "223",
1009
+ MT: "356",
1010
+ MH: "692",
1011
+ MQ: "596",
1012
+ MR: "222",
1013
+ MU: "230",
1014
+ YT: "262",
1015
+ MX: "52",
1016
+ FM: "691",
1017
+ MD: "373",
1018
+ MC: "377",
1019
+ MN: "976",
1020
+ ME: "382",
1021
+ MS: "1664",
1022
+ MA: "212",
1023
+ MZ: "258",
1024
+ MM: "95",
1025
+ NA: "264",
1026
+ NR: "674",
1027
+ NP: "977",
1028
+ NL: "31",
1029
+ NC: "687",
1030
+ NZ: "64",
1031
+ NI: "505",
1032
+ NE: "227",
1033
+ NG: "234",
1034
+ NU: "683",
1035
+ NF: "672",
1036
+ MP: "1670",
1037
+ NO: "47",
1038
+ OM: "968",
1039
+ PK: "92",
1040
+ PW: "680",
1041
+ PS: "970",
1042
+ PA: "507",
1043
+ PG: "675",
1044
+ PY: "595",
1045
+ PE: "51",
1046
+ PH: "63",
1047
+ PN: "64",
1048
+ PL: "48",
1049
+ PT: "351",
1050
+ PR: "1787",
1051
+ QA: "974",
1052
+ RE: "262",
1053
+ RO: "40",
1054
+ RU: "7",
1055
+ RW: "250",
1056
+ BL: "590",
1057
+ SH: "290",
1058
+ KN: "1869",
1059
+ LC: "1758",
1060
+ MF: "590",
1061
+ PM: "508",
1062
+ VC: "1784",
1063
+ WS: "685",
1064
+ SM: "378",
1065
+ ST: "239",
1066
+ SA: "966",
1067
+ SN: "221",
1068
+ RS: "381",
1069
+ SC: "248",
1070
+ SL: "232",
1071
+ SG: "65",
1072
+ SK: "421",
1073
+ SI: "386",
1074
+ SB: "677",
1075
+ SO: "252",
1076
+ ZA: "27",
1077
+ GS: "500",
1078
+ ES: "34",
1079
+ LK: "94",
1080
+ SD: "249",
1081
+ SR: "597",
1082
+ SJ: "47",
1083
+ SZ: "268",
1084
+ SE: "46",
1085
+ CH: "41",
1086
+ SY: "963",
1087
+ TW: "886",
1088
+ TJ: "992",
1089
+ TZ: "255",
1090
+ TH: "66",
1091
+ TL: "670",
1092
+ TG: "228",
1093
+ TK: "690",
1094
+ TO: "676",
1095
+ TT: "1868",
1096
+ TN: "216",
1097
+ TR: "90",
1098
+ TM: "993",
1099
+ TC: "1649",
1100
+ TV: "688",
1101
+ UG: "256",
1102
+ UA: "380",
1103
+ AE: "971",
1104
+ GB: "44",
1105
+ US: "1",
1106
+ UM: "1",
1107
+ UY: "598",
1108
+ UZ: "998",
1109
+ VU: "678",
1110
+ VE: "58",
1111
+ VN: "84",
1112
+ VG: "1284",
1113
+ VI: "1340",
1114
+ WF: "681",
1115
+ EH: "212",
1116
+ YE: "967",
1117
+ ZM: "260",
1118
+ ZW: "263"
1119
+ }, Nt = {
1120
+ 1: "US",
1121
+ 7: "RU",
1122
+ 39: "IT",
1123
+ 44: "GB",
1124
+ 47: "NO",
1125
+ 61: "AU",
1126
+ 64: "NZ",
1127
+ 212: "MA",
1128
+ 262: "RE",
1129
+ 358: "FI",
1130
+ 500: "FK",
1131
+ 590: "GP",
1132
+ 672: "NF"
1133
+ }, At = /* @__PURE__ */ new Set(["IT", "VA", "SM", "CI", "CG", "GA"]), ml = Ge.flatMap(({ key: e }) => {
1134
+ const o = cl[e];
1135
+ return o ? [{ countryCode: e, dialCode: o }] : [];
1136
+ }), Vt = (e) => cl[e], Pt = (e) => String.fromCodePoint(
1137
+ ...[...e.toUpperCase()].map((o) => 127462 + o.charCodeAt(0) - 65)
1138
+ ), xe = (e) => /^\s*(\+|00)/.test(e), Ke = (e) => e.replace(/\D/g, ""), fl = (e) => Ke(e.trim().replace(/^00/, "")), we = (e, o) => {
1139
+ var a;
1140
+ if (!xe(e))
1141
+ return { nationalNumber: Ke(e) };
1142
+ const t = fl(e), n = ml.filter(({ dialCode: S }) => t.startsWith(S)), u = Math.max(0, ...n.map(({ dialCode: S }) => S.length)), m = n.filter(({ dialCode: S }) => S.length === u);
1143
+ if (m.length === 0)
1144
+ return { nationalNumber: t };
1145
+ const v = m[0].dialCode;
1146
+ return { countryCode: ((a = m.find(({ countryCode: S }) => S === o)) == null ? void 0 : a.countryCode) ?? Nt[v] ?? m[0].countryCode, nationalNumber: t.slice(v.length) };
1147
+ }, $t = (e, o) => {
1148
+ if (xe(o)) {
1149
+ const u = fl(o);
1150
+ return u ? `+${u}` : null;
1151
+ }
1152
+ const a = e ? Vt(e) : void 0, t = Ke(o);
1153
+ if (!a || !e || !t)
1154
+ return null;
1155
+ const n = At.has(e) ? t : t.replace(/^0/, "");
1156
+ return `+${a}${n}`;
1157
+ }, Et = /* @__PURE__ */ ee({
1158
+ __name: "PhoneInputFlag",
1159
+ props: {
1160
+ countryCode: {}
1161
+ },
1162
+ setup(e) {
1163
+ const o = e, a = f(() => Pt(o.countryCode));
1164
+ return (t, n) => (i(), y(Se, {
1165
+ tag: "span",
1166
+ "aria-hidden": "true",
1167
+ color: "inherit",
1168
+ class: "leading-none"
1169
+ }, {
1170
+ default: P(() => [
1171
+ _(J(a.value), 1)
1172
+ ]),
1173
+ _: 1
1174
+ }));
1175
+ }
1176
+ }), Ot = ["id"], Rt = ["aria-labelledby"], Bt = ["id"], Re = "rounded-none border-0 bg-transparent focus-within:border-0 focus-within:ring-0", Tt = /* @__PURE__ */ ee({
1177
+ __name: "PhoneInput",
1178
+ props: {
1179
+ modelValue: { default: null },
1180
+ label: {},
1181
+ labelScreenReaderOnly: { type: Boolean },
1182
+ placeholder: {},
1183
+ defaultCountry: {},
1184
+ required: { type: Boolean, default: !1 },
1185
+ disabled: { type: Boolean, default: !1 },
1186
+ size: { default: "md" },
1187
+ error: {},
1188
+ name: { default: "phone" },
1189
+ form: {}
1190
+ },
1191
+ emits: ["update:modelValue"],
1192
+ setup(e, { emit: o }) {
1193
+ const a = e, t = o, n = ze(), { formatMessage: u, formatDisplayName: m } = n, v = Oe("phone-input-label-"), r = Oe("phone-input-number-"), S = Oe("phone-input-error-"), h = f(() => !De(a.error)), E = (c) => m(c, { type: "region" }) ?? el(c), M = f(
1194
+ () => ml.map(({ countryCode: c, dialCode: A }) => {
1195
+ const ce = E(c);
1196
+ return {
1197
+ value: c,
1198
+ label: ce,
1199
+ subLabel: `+${A}`,
1200
+ selectedLabel: `+${A}`,
1201
+ searchValues: [ce, el(c), `+${A}`],
1202
+ labelPrefixComponent: Dl({
1203
+ component: Et,
1204
+ props: { countryCode: c }
1205
+ })
1206
+ };
1207
+ }).sort((c, A) => c.label.localeCompare(A.label, n.locale))
1208
+ ), C = H(), g = f(() => C.value ?? a.defaultCountry), N = H("");
1209
+ let G;
1210
+ he(
1211
+ () => a.modelValue,
1212
+ (c) => {
1213
+ if (c === G)
1214
+ return;
1215
+ if (G = c, !c) {
1216
+ N.value = "", C.value = void 0;
1217
+ return;
1218
+ }
1219
+ const { countryCode: A, nationalNumber: ce } = we(c, g.value);
1220
+ A ? (C.value = A, N.value = ce) : N.value = c;
1221
+ },
1222
+ { immediate: !0 }
1223
+ );
1224
+ const T = () => {
1225
+ const c = $t(g.value, N.value);
1226
+ G = c, c !== a.modelValue && t("update:modelValue", c);
1227
+ };
1228
+ he(
1229
+ () => a.defaultCountry,
1230
+ () => {
1231
+ C.value || T();
1232
+ }
1233
+ );
1234
+ const V = (c) => {
1235
+ xe(N.value) && (N.value = we(N.value, g.value).nationalNumber), C.value = c || void 0, T(), c && Ce();
1236
+ }, b = (c) => {
1237
+ if (N.value = typeof c == "string" ? c : "", xe(N.value)) {
1238
+ const { countryCode: A } = we(N.value, g.value);
1239
+ A && (C.value = A);
1240
+ }
1241
+ T();
1242
+ }, O = () => {
1243
+ if (!xe(N.value))
1244
+ return;
1245
+ const { countryCode: c, nationalNumber: A } = we(
1246
+ N.value,
1247
+ g.value
1248
+ );
1249
+ c && (N.value = A, T());
1250
+ }, le = (c) => {
1251
+ c.target instanceof HTMLInputElement && c.target.select();
1252
+ }, te = f(
1253
+ () => g.value ? u(
1254
+ {
1255
+ id: "phone_input.country_select.label_with_country",
1256
+ defaultMessage: "Country code: {country}",
1257
+ description: "Screen reader label of the phone number country code select, with the selected country"
1258
+ },
1259
+ { country: E(g.value) }
1260
+ ) : u({
1261
+ id: "phone_input.country_select.label",
1262
+ defaultMessage: "Country code",
1263
+ description: "Screen reader label of the phone number country code select"
1264
+ })
1265
+ ), ae = f(() => ({
1266
+ placeholderDefault: u({
1267
+ id: "phone_input.country_select.placeholder",
1268
+ defaultMessage: "Code",
1269
+ description: "Placeholder of the phone number country code select when no country is selected"
1270
+ }),
1271
+ placeholderSearch: u({
1272
+ id: "phone_input.country_select.search_placeholder",
1273
+ defaultMessage: "Search",
1274
+ description: "Placeholder of the phone number country code select while searching"
1275
+ }),
1276
+ noResults: (c) => u(
1277
+ {
1278
+ id: "phone_input.country_select.no_results",
1279
+ defaultMessage: "No countries match {search}.",
1280
+ description: "Shown when no country name or calling code matches the search in the phone number country code select"
1281
+ },
1282
+ { search: c }
1283
+ )
1284
+ })), x = {
1285
+ xs: "w-28",
1286
+ sm: "w-28",
1287
+ md: "w-32",
1288
+ lg: "w-36",
1289
+ xl: "w-36"
1290
+ }, { size: D, disabled: U } = Fl(a), { wrapperClasses: de } = jl({
1291
+ size: D,
1292
+ disabled: U,
1293
+ hasError: h,
1294
+ ring: H(!0)
1295
+ }), I = {
1296
+ xs: "pl-1",
1297
+ sm: "pl-2",
1298
+ md: "pl-4",
1299
+ lg: "pl-4",
1300
+ xl: "pl-4"
1301
+ }, ke = f(
1302
+ () => g.value ? "pl-2 pr-0" : `${I[a.size]} pr-0`
1303
+ ), ye = f(
1304
+ () => g.value && I[a.size] === "pl-4" ? `${Re} pl-1` : Re
1305
+ ), se = H(), { width: ge } = ul(se), Ce = () => {
1306
+ var c, A;
1307
+ (A = (c = se.value) == null ? void 0 : c.querySelector(`#${r}`)) == null || A.focus();
1308
+ };
1309
+ return (c, A) => (i(), w("div", null, [
1310
+ B(Ql, {
1311
+ id: s(v),
1312
+ for: s(r),
1313
+ required: e.required,
1314
+ "screen-reader-only": e.labelScreenReaderOnly
1315
+ }, Ve({
1316
+ default: P(() => [
1317
+ _(J(e.label) + " ", 1)
1318
+ ]),
1319
+ _: 2
1320
+ }, [
1321
+ h.value && !e.labelScreenReaderOnly ? {
1322
+ name: "suffix",
1323
+ fn: P(() => [
1324
+ $("div", { id: s(S) }, [
1325
+ B(Fe, { message: e.error }, null, 8, ["message"])
1326
+ ], 8, Ot)
1327
+ ]),
1328
+ key: "0"
1329
+ } : void 0
1330
+ ]), 1032, ["id", "for", "required", "screen-reader-only"]),
1331
+ $("div", {
1332
+ ref_key: "fieldRef",
1333
+ ref: se,
1334
+ role: "group",
1335
+ "aria-labelledby": s(v),
1336
+ class: q(["flex flex-row items-end", s(de)])
1337
+ }, [
1338
+ $("div", {
1339
+ class: q(["shrink-0", x[s(D)]]),
1340
+ onFocusin: le
1341
+ }, [
1342
+ B(dl, {
1343
+ "single-model-value": g.value ?? null,
1344
+ options: M.value,
1345
+ "options-order-properties": null,
1346
+ label: te.value,
1347
+ "label-screen-reader-only": "",
1348
+ i18n: ae.value,
1349
+ size: s(D),
1350
+ disabled: s(U),
1351
+ required: "",
1352
+ invalid: h.value,
1353
+ name: `${e.name}-country`,
1354
+ form: e.form,
1355
+ "dropdown-width": s(ge) || void 0,
1356
+ "wrapper-class": ye.value,
1357
+ "input-class": ke.value,
1358
+ condensed: "",
1359
+ "onUpdate:singleModelValue": V
1360
+ }, null, 8, ["single-model-value", "options", "label", "i18n", "size", "disabled", "invalid", "name", "form", "dropdown-width", "wrapper-class", "input-class"])
1361
+ ], 34),
1362
+ B(qe, {
1363
+ id: s(r),
1364
+ "model-value": N.value,
1365
+ type: "tel",
1366
+ autocomplete: "tel",
1367
+ class: "grow",
1368
+ "wrapper-class": Re,
1369
+ "has-focus-styles": !1,
1370
+ size: s(D),
1371
+ name: e.name,
1372
+ form: e.form,
1373
+ required: e.required,
1374
+ disabled: s(U),
1375
+ invalid: h.value,
1376
+ "aria-required": e.required || void 0,
1377
+ "aria-invalid": h.value || void 0,
1378
+ "aria-describedby": h.value ? s(S) : void 0,
1379
+ placeholder: e.placeholder,
1380
+ "onUpdate:modelValue": b,
1381
+ onBlur: O
1382
+ }, null, 8, ["id", "model-value", "size", "name", "form", "required", "disabled", "invalid", "aria-required", "aria-invalid", "aria-describedby", "placeholder"])
1383
+ ], 10, Rt),
1384
+ h.value && e.labelScreenReaderOnly ? (i(), w("div", {
1385
+ key: 0,
1386
+ id: s(S),
1387
+ class: "mt-1"
1388
+ }, [
1389
+ B(Fe, { message: e.error }, null, 8, ["message"])
1390
+ ], 8, Bt)) : p("", !0)
1391
+ ]));
1392
+ }
1393
+ });
1394
+ function Dt(e) {
1395
+ return !!Ge.find((o) => o.key === e);
1396
+ }
1397
+ const ol = ["email", "country"], Ft = "GENERIC_TAX_ID", sl = {
1398
+ US: ["addressLine1", "postalCode"],
1399
+ CA: ["state"]
1400
+ }, Ut = (e) => !e || !sl[e] ? ol : [...sl[e], ...ol], Gt = [
1401
+ [
1402
+ "customer_details",
1403
+ ["companyLegalName", "companyRegistrationNumber", "firstName", "infix", "lastName"]
1404
+ ],
1405
+ ["address", ["addressLine1", "addressLine2", "postalCode", "city", "state", "country"]],
1406
+ ["tax_ids", ["companyVatNumber", "taxExempt", "taxExemptNote"]],
1407
+ ["email", ["email"]]
1408
+ ], Sa = (e, o) => {
1409
+ var t;
1410
+ const a = (t = Gt.find(([, n]) => n.includes(o))) == null ? void 0 : t[0];
1411
+ return a && (e == null ? void 0 : e[a]) || "EDITABLE";
1412
+ }, pl = (e) => e.type === "ORGANIZATION" && e.country !== "US", be = {
1413
+ BILLING: {
1414
+ line1: "addressLine1",
1415
+ line2: "addressLine2",
1416
+ postalCode: "postalCode",
1417
+ city: "city",
1418
+ state: "state",
1419
+ country: "country"
1420
+ },
1421
+ SHIPPING: {
1422
+ line1: "shippingAddressLine1",
1423
+ line2: "shippingAddressLine2",
1424
+ postalCode: "shippingPostalCode",
1425
+ city: "shippingCity",
1426
+ state: "shippingState",
1427
+ country: "shippingCountry"
1428
+ }
1429
+ }, zt = ["line1", "line2", "postalCode", "city", "state", "country"], qt = ["A", "C", "S", "Z"], Kt = {
1430
+ A: ["line1", "line2"],
1431
+ C: ["city"],
1432
+ S: ["state"],
1433
+ Z: ["postalCode"]
1434
+ }, hl = (e) => qt.filter((o) => e.includes(o)).flatMap(
1435
+ (o) => Kt[o]
1436
+ ), vl = (e) => hl((e == null ? void 0 : e.fields) ?? "ACSZ"), Ht = (e, o) => {
1437
+ const a = Ut(o);
1438
+ return zt.filter((t) => a.includes(be.BILLING[t])).map(
1439
+ (t) => be[e][t]
1440
+ );
1441
+ }, ka = (e, o, a) => {
1442
+ const t = a ? hl(a.required).filter((n) => n !== "line2") : ["line1", "postalCode", "city"];
1443
+ return [
1444
+ .../* @__PURE__ */ new Set([
1445
+ ...t.map((n) => be[e][n]),
1446
+ ...Ht(e, o)
1447
+ ])
1448
+ ];
1449
+ }, Me = (e) => (e == null ? void 0 : e.trim()) || void 0, bl = (e, o, a) => {
1450
+ var v;
1451
+ const t = be[o], n = new Set(vl(a)), u = (r) => n.has(r) ? Me(e[t[r]]) : void 0, m = (v = u("postalCode")) == null ? void 0 : v.toUpperCase();
1452
+ return {
1453
+ ...u("line1") && { line1: u("line1") },
1454
+ ...u("line2") && { line2: u("line2") },
1455
+ ...u("city") && { city: u("city") },
1456
+ ...u("state") && { state: u("state") },
1457
+ ...m && { postal_code: m },
1458
+ country: e[t.country] ?? ""
1459
+ };
1460
+ }, Zt = (e, o) => {
1461
+ const a = bl(e, "SHIPPING", o);
1462
+ return {
1463
+ addressLine1: a.line1,
1464
+ addressLine2: a.line2,
1465
+ postalCode: a.postal_code,
1466
+ city: a.city,
1467
+ state: a.state,
1468
+ country: e.shippingCountry
1469
+ };
1470
+ }, La = (e, o, a) => {
1471
+ var m;
1472
+ const t = Me(e.shippingAttentionName), n = Me(e.shippingFirstName), u = Me(e.shippingLastName);
1473
+ return {
1474
+ reference: o,
1475
+ recipient: {
1476
+ type: e.type,
1477
+ ...e.type === "ORGANIZATION" ? {
1478
+ organization: {
1479
+ company_name: e.companyLegalName ?? "",
1480
+ ...t && { attention_name: t }
1481
+ }
1482
+ } : {
1483
+ individual: {
1484
+ name: {
1485
+ ...n && { first_name: n },
1486
+ ...u && { last_name: u }
1487
+ }
1488
+ }
1489
+ },
1490
+ phone_number: ((m = e.shippingPhoneNumber) == null ? void 0 : m.trim()) ?? "",
1491
+ email: e.email ?? ""
1492
+ },
1493
+ address: bl(e, "SHIPPING", a)
1494
+ };
1495
+ }, Ia = (e, { isShipped: o, format: a }) => Wt(o ? { ...e, ...Zt(e, a) } : e, {
1496
+ withVatNumber: pl(e)
1497
+ }), Wt = (e, { withVatNumber: o = pl(e) } = {}) => {
1498
+ const a = {
1499
+ ...e.addressLine1 && { line1: e.addressLine1 },
1500
+ ...e.addressLine2 && { line2: e.addressLine2 },
1501
+ ...e.city && { city: e.city },
1502
+ ...e.state && { state: e.state },
1503
+ ...e.postalCode && { postal_code: e.postalCode },
1504
+ country: e.country ?? ""
1505
+ };
1506
+ return e.type === "ORGANIZATION" ? {
1507
+ type: "ORGANIZATION",
1508
+ organization: {
1509
+ legal_name: e.companyLegalName ?? "",
1510
+ registered_address: a,
1511
+ ...e.companyVatNumber && o && {
1512
+ tax_ids: [
1513
+ { id: e.companyVatNumber, type: Ft }
1514
+ ]
1515
+ }
1516
+ }
1517
+ } : {
1518
+ type: "INDIVIDUAL",
1519
+ individual: {
1520
+ residential_address: a
1521
+ }
1522
+ };
1523
+ }, wa = (e = {}) => ({
1524
+ email: void 0,
1525
+ country: void 0,
1526
+ type: "INDIVIDUAL",
1527
+ companyLegalName: void 0,
1528
+ firstName: void 0,
1529
+ infix: void 0,
1530
+ lastName: void 0,
1531
+ addressLine1: void 0,
1532
+ addressLine2: void 0,
1533
+ postalCode: void 0,
1534
+ city: void 0,
1535
+ state: void 0,
1536
+ companyVatNumber: void 0,
1537
+ companyRegistrationNumber: void 0,
1538
+ taxExempt: void 0,
1539
+ taxExemptNote: void 0,
1540
+ shippingAddressLine1: void 0,
1541
+ shippingAddressLine2: void 0,
1542
+ shippingPostalCode: void 0,
1543
+ shippingCity: void 0,
1544
+ shippingState: void 0,
1545
+ shippingCountry: void 0,
1546
+ shippingPhoneNumber: void 0,
1547
+ shippingFirstName: void 0,
1548
+ shippingLastName: void 0,
1549
+ shippingAttentionName: void 0,
1550
+ billingAddressSameAsShipping: !0,
1551
+ seatsValues: void 0,
1552
+ unitsValues: void 0,
1553
+ enabledPricingIds: void 0,
1554
+ ...e
1555
+ }), Yt = ["for"], oe = /* @__PURE__ */ ee({
1556
+ __name: "HiddenLabelInput",
1557
+ props: /* @__PURE__ */ Ne({
1558
+ label: { type: String },
1559
+ name: { type: String },
1560
+ placeholder: { type: String },
1561
+ error: { type: [String, Array] },
1562
+ autocomplete: { type: String }
1563
+ }, {
1564
+ modelValue: {},
1565
+ modelModifiers: {}
1566
+ }),
1567
+ emits: ["update:modelValue"],
1568
+ setup(e) {
1569
+ const o = e, a = Ue(e, "modelValue"), t = Ul(), n = f(
1570
+ () => Array.isArray(o.error) ? !!o.error.length : !!o.error
1571
+ );
1572
+ return (u, m) => (i(), w("div", null, [
1573
+ $("label", {
1574
+ for: s(t),
1575
+ class: "sr-only"
1576
+ }, J(e.label), 9, Yt),
1577
+ B(s(qe), {
1578
+ id: s(t),
1579
+ modelValue: a.value,
1580
+ "onUpdate:modelValue": m[0] || (m[0] = (v) => a.value = v),
1581
+ name: e.name,
1582
+ placeholder: e.placeholder,
1583
+ error: e.error,
1584
+ autocomplete: e.autocomplete
1585
+ }, Ve({ _: 2 }, [
1586
+ n.value ? {
1587
+ name: "helper",
1588
+ fn: P(() => [
1589
+ B(s(Fe), { message: e.error }, null, 8, ["message"])
1590
+ ]),
1591
+ key: "0"
1592
+ } : void 0
1593
+ ]), 1032, ["id", "modelValue", "name", "placeholder", "error", "autocomplete"])
1594
+ ]));
1595
+ }
1596
+ });
1597
+ function Jt() {
1598
+ const { $t: e } = ze();
1599
+ return {
1600
+ contactInformationTitle: e({
1601
+ defaultMessage: "Customer information",
1602
+ id: "checkout.contact_information_block.title",
1603
+ description: "The title of the contact information block in the checkout form"
1604
+ }),
1605
+ emailLabel: e({
1606
+ defaultMessage: "Email address",
1607
+ id: "checkout.email_address.label",
1608
+ description: "The email address of the customer in the checkout form"
1609
+ }),
1610
+ emailPlaceholder: e({
1611
+ defaultMessage: "Email address",
1612
+ id: "checkout.email_address.placeholder",
1613
+ description: "The email address of the customer in the checkout form"
1614
+ }),
1615
+ countryLabel: e({
1616
+ defaultMessage: "Billing country",
1617
+ id: "checkout.country.label",
1618
+ description: "The country of the customer in the checkout form"
1619
+ }),
1620
+ countryPlaceholder: e({
1621
+ defaultMessage: "Billing country",
1622
+ id: "checkout.country.placeholder",
1623
+ description: "Placeholder of the billing country select while no country is chosen"
1624
+ }),
1625
+ vatNumberLabel: e({
1626
+ defaultMessage: "VAT number",
1627
+ id: "checkout.vat_number.label",
1628
+ description: "The label for the vat number in the checkout form"
1629
+ }),
1630
+ vatNumberPlaceholder: e({
1631
+ defaultMessage: "VAT number",
1632
+ id: "checkout.vat_number.placeholder",
1633
+ description: "The label for the vat number in the checkout form"
1634
+ }),
1635
+ legalNameLabel: e({
1636
+ defaultMessage: "Legal entity name",
1637
+ id: "checkout.legal_name.label",
1638
+ description: "The legal name of the organization customer in the checkout form"
1639
+ }),
1640
+ legalNamePlaceholder: e({
1641
+ defaultMessage: "Legal entity name",
1642
+ id: "checkout.legal_name.placeholder",
1643
+ description: "The legal name of the organization customer in the checkout form"
1644
+ }),
1645
+ addressTitle: e({
1646
+ defaultMessage: "Billing address",
1647
+ id: "checkout.address.title",
1648
+ description: "Label of the billing address, above its first line, in the checkout and billing information forms"
1649
+ }),
1650
+ addressLine1Label: e({
1651
+ defaultMessage: "Address line 1",
1652
+ id: "checkout.address.line1.label",
1653
+ description: "Address line 1 of the customer address in the checkout form"
1654
+ }),
1655
+ addressLine2Label: e({
1656
+ defaultMessage: "Address line 2",
1657
+ id: "checkout.address.line2.label",
1658
+ description: "Address line 2 of the customer address in the checkout form"
1659
+ }),
1660
+ postalCodeLabel: e({
1661
+ defaultMessage: "Postal code",
1662
+ id: "checkout.address.postal_code.label",
1663
+ description: "Postal code of the customer address in the checkout form"
1664
+ }),
1665
+ cityLabel: e({
1666
+ defaultMessage: "City",
1667
+ id: "checkout.address.city.label",
1668
+ description: "City of the customer address in the checkout form"
1669
+ }),
1670
+ stateLabel: e({
1671
+ defaultMessage: "State",
1672
+ id: "checkout.address.state.label",
1673
+ description: "State of the customer address in the checkout form"
1674
+ }),
1675
+ postalCodePlaceholder: e({
1676
+ defaultMessage: "Postal code",
1677
+ id: "checkout.address.portal_code.placeholder",
1678
+ description: "Postal code of the customer address in the checkout form"
1679
+ }),
1680
+ cityPlaceholder: e({
1681
+ defaultMessage: "City",
1682
+ id: "checkout.address.city.placeholder",
1683
+ description: "City of the customer address in the checkout form"
1684
+ }),
1685
+ statePlaceholder: e({
1686
+ defaultMessage: "State",
1687
+ id: "checkout.address.state.placeholder",
1688
+ description: "State of the customer address in the checkout form"
1689
+ })
1690
+ };
1691
+ }
1692
+ const jt = (e) => Dt(e), Qt = { class: "sv-checkout-address-fields flex flex-col gap-2 [container-type:inline-size]" }, Xt = {
1693
+ key: 1,
1694
+ class: "sv-checkout__shipping-recipient grid grid-cols-2 gap-2"
1695
+ }, Ma = /* @__PURE__ */ ee({
1696
+ __name: "CheckoutAddressFields",
1697
+ props: /* @__PURE__ */ Ne({
1698
+ variant: { type: String },
1699
+ withCountry: { type: Boolean },
1700
+ countryBeforeAddress: { type: Boolean },
1701
+ countryLabel: { type: String },
1702
+ format: { type: Object },
1703
+ getOptionalSuffix: { type: Function },
1704
+ errors: { type: Object }
1705
+ }, {
1706
+ modelValue: { required: !0 },
1707
+ modelModifiers: {}
1708
+ }),
1709
+ emits: ["update:modelValue"],
1710
+ setup(e) {
1711
+ const o = {
1712
+ 1: "grid-cols-1",
1713
+ 2: "grid-cols-1 [@container(min-width:24rem)]:grid-cols-2",
1714
+ 3: "grid-cols-1 [@container(min-width:24rem)]:grid-cols-3"
1715
+ }, a = e, t = Ue(e, "modelValue"), { $t: n } = ze(), u = Jt(), m = be[a.variant], v = a.variant === "SHIPPING", r = v ? "shipping_" : "", S = a.variant.toLowerCase(), h = Gl({
1716
+ addressLine1: ne(t, m.line1, Q),
1717
+ addressLine2: ne(t, m.line2, Q),
1718
+ postalCode: ne(t, m.postalCode, Q),
1719
+ city: ne(t, m.city, Q),
1720
+ state: ne(t, m.state, Q),
1721
+ firstName: ne(t, "shippingFirstName", Q),
1722
+ lastName: ne(t, "shippingLastName", Q),
1723
+ attentionName: ne(t, "shippingAttentionName", Q)
1724
+ }), E = f({
1725
+ get: () => t.value[m.country],
1726
+ set: (V) => {
1727
+ const b = Q(V);
1728
+ t.value[m.country] = b !== void 0 && jt(b) ? b : void 0;
1729
+ }
1730
+ }), M = f({
1731
+ get: () => t.value.shippingPhoneNumber ?? null,
1732
+ set: (V) => {
1733
+ t.value.shippingPhoneNumber = V ?? void 0;
1734
+ }
1735
+ }), C = f(() => new Set(vl(v ? a.format : void 0))), g = f(
1736
+ () => o[["postalCode", "city", "state"].filter((V) => C.value.has(V)).length]
1737
+ ), N = f(() => t.value.type === "ORGANIZATION"), G = (V) => a.getOptionalSuffix(m[V]), T = (V) => typeof V == "string" ? V : V == null ? void 0 : V.map((b) => b.$validator === "postalCodeFormat" ? {
1738
+ ...b,
1739
+ $message: n({
1740
+ defaultMessage: "Enter a postal code in the format of this country",
1741
+ id: "checkout.postal_code.invalid",
1742
+ description: "Error under a shipping or billing postal code that does not match its country's format"
1743
+ })
1744
+ } : b.$validator === "phoneNumberFormat" ? {
1745
+ ...b,
1746
+ $message: n({
1747
+ defaultMessage: "Enter a phone number of 7 to 15 digits",
1748
+ id: "checkout.shipping_phone_number.invalid",
1749
+ description: "Error under a shipping phone number with characters other than digits and separators, or too few or many digits"
1750
+ })
1751
+ } : b);
1752
+ return (V, b) => {
1753
+ var O, le, te, ae, x, D, U, de;
1754
+ return i(), w("div", Qt, [
1755
+ e.withCountry && !e.countryBeforeAddress ? (i(), y(s(nl), {
1756
+ key: 0,
1757
+ "single-model-value": E.value,
1758
+ "onUpdate:singleModelValue": b[0] || (b[0] = (I) => E.value = I),
1759
+ "label-screen-reader-only": "",
1760
+ i18n: { placeholderDefault: s(u).countryPlaceholder },
1761
+ required: "",
1762
+ label: e.countryLabel ?? s(u).countryLabel,
1763
+ name: `${s(r)}country`,
1764
+ error: (O = e.errors) == null ? void 0 : O.country
1765
+ }, null, 8, ["single-model-value", "i18n", "label", "name", "error"])) : p("", !0),
1766
+ v ? (i(), w(ve, { key: 1 }, [
1767
+ N.value ? (i(), y(oe, {
1768
+ key: 0,
1769
+ modelValue: h.attentionName,
1770
+ "onUpdate:modelValue": b[1] || (b[1] = (I) => h.attentionName = I),
1771
+ name: "shipping_attention_name",
1772
+ class: "sv-checkout__shipping-attention-name",
1773
+ autocomplete: "shipping name",
1774
+ label: s(n)({
1775
+ defaultMessage: "Contact person",
1776
+ id: "checkout.shipping_attention_name.label",
1777
+ description: "Label of the person at the company a shipped order is for the attention of"
1778
+ }),
1779
+ placeholder: s(n)({
1780
+ defaultMessage: "Contact person",
1781
+ id: "checkout.shipping_attention_name.placeholder",
1782
+ description: "Placeholder of the person at the company a shipped order is for the attention of"
1783
+ }) + e.getOptionalSuffix("shippingAttentionName")
1784
+ }, null, 8, ["modelValue", "label", "placeholder"])) : (i(), w("div", Xt, [
1785
+ B(oe, {
1786
+ modelValue: h.firstName,
1787
+ "onUpdate:modelValue": b[2] || (b[2] = (I) => h.firstName = I),
1788
+ name: "shipping_first_name",
1789
+ autocomplete: "shipping given-name",
1790
+ label: s(n)({
1791
+ defaultMessage: "First name",
1792
+ id: "checkout.shipping_first_name.label",
1793
+ description: "Label of the first name of the recipient of a shipped order"
1794
+ }),
1795
+ placeholder: s(n)({
1796
+ defaultMessage: "First name",
1797
+ id: "checkout.shipping_first_name.placeholder",
1798
+ description: "Placeholder of the first name of the recipient of a shipped order"
1799
+ }) + e.getOptionalSuffix("shippingFirstName")
1800
+ }, null, 8, ["modelValue", "label", "placeholder"]),
1801
+ B(oe, {
1802
+ modelValue: h.lastName,
1803
+ "onUpdate:modelValue": b[3] || (b[3] = (I) => h.lastName = I),
1804
+ name: "shipping_last_name",
1805
+ autocomplete: "shipping family-name",
1806
+ label: s(n)({
1807
+ defaultMessage: "Last name",
1808
+ id: "checkout.shipping_last_name.label",
1809
+ description: "Label of the last name of the recipient of a shipped order"
1810
+ }),
1811
+ placeholder: s(n)({
1812
+ defaultMessage: "Last name",
1813
+ id: "checkout.shipping_last_name.placeholder",
1814
+ description: "Placeholder of the last name of the recipient of a shipped order"
1815
+ }) + e.getOptionalSuffix("shippingLastName"),
1816
+ error: (le = e.errors) == null ? void 0 : le.lastName
1817
+ }, null, 8, ["modelValue", "label", "placeholder", "error"])
1818
+ ]))
1819
+ ], 64)) : p("", !0),
1820
+ e.withCountry && e.countryBeforeAddress ? (i(), y(s(nl), {
1821
+ key: 2,
1822
+ "single-model-value": E.value,
1823
+ "onUpdate:singleModelValue": b[4] || (b[4] = (I) => E.value = I),
1824
+ "label-screen-reader-only": "",
1825
+ i18n: { placeholderDefault: s(u).countryPlaceholder },
1826
+ required: "",
1827
+ label: e.countryLabel ?? s(u).countryLabel,
1828
+ name: `${s(r)}country`,
1829
+ error: (te = e.errors) == null ? void 0 : te.country
1830
+ }, null, 8, ["single-model-value", "i18n", "label", "name", "error"])) : p("", !0),
1831
+ C.value.has("line1") ? (i(), y(oe, {
1832
+ key: 3,
1833
+ modelValue: h.addressLine1,
1834
+ "onUpdate:modelValue": b[5] || (b[5] = (I) => h.addressLine1 = I),
1835
+ name: `${s(r)}address_line_1`,
1836
+ autocomplete: `${s(S)} address-line1`,
1837
+ label: s(u).addressLine1Label,
1838
+ placeholder: s(n)({
1839
+ defaultMessage: "Address line 1",
1840
+ id: "checkout.address.line1.placeholder",
1841
+ description: "Address line 1 of the customer address in the checkout form"
1842
+ }) + G("line1"),
1843
+ error: (ae = e.errors) == null ? void 0 : ae.addressLine1
1844
+ }, null, 8, ["modelValue", "name", "autocomplete", "label", "placeholder", "error"])) : p("", !0),
1845
+ C.value.has("line2") ? (i(), y(oe, {
1846
+ key: 4,
1847
+ modelValue: h.addressLine2,
1848
+ "onUpdate:modelValue": b[6] || (b[6] = (I) => h.addressLine2 = I),
1849
+ name: `${s(r)}address_line_2`,
1850
+ autocomplete: `${s(S)} address-line2`,
1851
+ label: s(u).addressLine2Label,
1852
+ placeholder: s(n)({
1853
+ defaultMessage: "Address line 2",
1854
+ id: "checkout.address.line2.placeholder",
1855
+ description: "Address line 2 of the customer address in the checkout form"
1856
+ }) + G("line2")
1857
+ }, null, 8, ["modelValue", "name", "autocomplete", "label", "placeholder"])) : p("", !0),
1858
+ g.value ? (i(), w("div", {
1859
+ key: 5,
1860
+ class: q(["grid gap-2", g.value])
1861
+ }, [
1862
+ C.value.has("postalCode") ? (i(), y(oe, {
1863
+ key: 0,
1864
+ modelValue: h.postalCode,
1865
+ "onUpdate:modelValue": b[7] || (b[7] = (I) => h.postalCode = I),
1866
+ name: `${s(r)}postal_code`,
1867
+ autocomplete: `${s(S)} postal-code`,
1868
+ label: s(u).postalCodeLabel,
1869
+ placeholder: s(u).postalCodePlaceholder + G("postalCode"),
1870
+ error: T((x = e.errors) == null ? void 0 : x.postalCode)
1871
+ }, null, 8, ["modelValue", "name", "autocomplete", "label", "placeholder", "error"])) : p("", !0),
1872
+ C.value.has("city") ? (i(), y(oe, {
1873
+ key: 1,
1874
+ modelValue: h.city,
1875
+ "onUpdate:modelValue": b[8] || (b[8] = (I) => h.city = I),
1876
+ name: `${s(r)}city`,
1877
+ autocomplete: `${s(S)} address-level2`,
1878
+ label: s(u).cityLabel,
1879
+ placeholder: s(u).cityPlaceholder + G("city"),
1880
+ error: (D = e.errors) == null ? void 0 : D.city
1881
+ }, null, 8, ["modelValue", "name", "autocomplete", "label", "placeholder", "error"])) : p("", !0),
1882
+ C.value.has("state") ? (i(), y(oe, {
1883
+ key: 2,
1884
+ modelValue: h.state,
1885
+ "onUpdate:modelValue": b[9] || (b[9] = (I) => h.state = I),
1886
+ name: `${s(r)}state`,
1887
+ autocomplete: `${s(S)} address-level1`,
1888
+ label: s(u).stateLabel,
1889
+ placeholder: s(u).statePlaceholder + G("state"),
1890
+ error: (U = e.errors) == null ? void 0 : U.state
1891
+ }, null, 8, ["modelValue", "name", "autocomplete", "label", "placeholder", "error"])) : p("", !0)
1892
+ ], 2)) : p("", !0),
1893
+ v ? (i(), y(s(Tt), {
1894
+ key: 6,
1895
+ modelValue: M.value,
1896
+ "onUpdate:modelValue": b[10] || (b[10] = (I) => M.value = I),
1897
+ "label-screen-reader-only": "",
1898
+ required: "",
1899
+ name: "shipping_phone_number",
1900
+ class: "sv-checkout__shipping-phone-number",
1901
+ "default-country": t.value[s(m).country],
1902
+ label: s(n)({
1903
+ defaultMessage: "Phone number",
1904
+ id: "checkout.shipping_phone_number.label",
1905
+ description: "Label of the phone number the carrier can reach the recipient of a shipped order on"
1906
+ }),
1907
+ placeholder: s(n)({
1908
+ defaultMessage: "Phone number",
1909
+ id: "checkout.shipping_phone_number.placeholder",
1910
+ description: "Placeholder of the phone number the carrier can reach the recipient of a shipped order on"
1911
+ }),
1912
+ error: T((de = e.errors) == null ? void 0 : de.phoneNumber)
1913
+ }, null, 8, ["modelValue", "default-country", "label", "placeholder", "error"])) : p("", !0)
1914
+ ]);
1915
+ };
1916
+ }
1917
+ });
1918
+ let Be;
1919
+ const _t = () => (Be ?? (Be = import("./addressFormats.data-dzBx49dw.mjs").catch((e) => {
1920
+ throw Be = void 0, e;
1921
+ })), Be), ea = (e, o) => o && e.ADDRESS_FORMATS[o] || e.DEFAULT_ADDRESS_FORMAT, la = (e, o) => !e.postalCode || new RegExp(`^(?:${e.postalCode})$`, "i").test(o.trim()), ta = (e) => {
1922
+ const o = e.trim();
1923
+ if (!/^\+?[\d\s\-().]+$/.test(o)) return !1;
1924
+ const a = o.replace(/\D/g, "").length;
1925
+ return a >= 7 && a <= 15;
1926
+ }, ue = (e, o) => ({
1927
+ required: Xl(() => e(o))
1928
+ }), aa = (e) => (o) => {
1929
+ const a = e();
1930
+ return typeof o != "string" || !o.trim() || !a || la(a, o);
1931
+ }, na = (e) => ({
1932
+ $validator: aa(e),
1933
+ $message: "The postal code does not match the country"
1934
+ }), Na = (e, o, a) => {
1935
+ const t = be[e];
1936
+ return {
1937
+ [t.line1]: ue(a, t.line1),
1938
+ [t.city]: ue(a, t.city),
1939
+ [t.state]: ue(a, t.state),
1940
+ [t.country]: ue(a, t.country),
1941
+ [t.postalCode]: {
1942
+ ...ue(a, t.postalCode),
1943
+ postalCodeFormat: na(o)
1944
+ }
1945
+ };
1946
+ }, Aa = (e) => ({
1947
+ shippingPhoneNumber: {
1948
+ ...ue(e, "shippingPhoneNumber"),
1949
+ phoneNumberFormat: {
1950
+ $validator: (o) => typeof o != "string" || !o.trim() || ta(o),
1951
+ $message: "The phone number is not valid"
1952
+ }
1953
+ },
1954
+ shippingLastName: ue(e, "shippingLastName")
1955
+ });
1956
+ function Va({
1957
+ isNeeded: e,
1958
+ countries: o
1959
+ }) {
1960
+ const a = zl();
1961
+ let t = !1;
1962
+ return he(
1963
+ [e, ...o],
1964
+ () => {
1965
+ !e() || a.value || t || (t = !0, _t().then((u) => {
1966
+ a.value = u;
1967
+ }).catch(() => {
1968
+ }).finally(() => {
1969
+ t = !1;
1970
+ }));
1971
+ },
1972
+ { immediate: !0 }
1973
+ ), { formatOf: (u) => a.value ? ea(a.value, u) : void 0 };
1974
+ }
1975
+ export {
1976
+ Ft as D,
1977
+ oe as _,
1978
+ ka as a,
1979
+ Na as b,
1980
+ Ma as c,
1981
+ Ut as d,
1982
+ pl as e,
1983
+ Jt as f,
1984
+ wa as g,
1985
+ Dt as h,
1986
+ jt as i,
1987
+ Ia as j,
1988
+ bl as k,
1989
+ nl as l,
1990
+ Sa as m,
1991
+ Zt as n,
1992
+ Ht as o,
1993
+ na as p,
1994
+ ue as r,
1995
+ Aa as s,
1996
+ La as t,
1997
+ Va as u
1998
+ };