@levo-so/studio 0.1.63 → 0.1.64

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 (198) hide show
  1. package/dist/{Beams-sKsW_tr4.js → Beams-I4aWHPVY.js} +1 -1
  2. package/dist/{Dots-BEIutbKS.js → Dots-CUmk_uHm.js} +1 -1
  3. package/dist/{Gradient-DAR7R3Mz.js → Gradient-ClJiEr54.js} +1 -1
  4. package/dist/{Grid-BuKIXWMJ.js → Grid-BgVIobRt.js} +1 -1
  5. package/dist/{MessageCard-C8v6oHmf.js → MessageCard-CiE4ZR7i.js} +1 -1
  6. package/dist/{Waves-C8qlIS1W.js → Waves-B8-qCWtJ.js} +1 -1
  7. package/dist/blockSmith/ContentSchemaGenerator.d.ts.map +1 -0
  8. package/dist/blockSmith/DefaultContentGenerator.d.ts.map +1 -0
  9. package/dist/blockSmith/DefaultStylesGenerator.d.ts.map +1 -0
  10. package/dist/blockSmith/index.d.ts.map +1 -0
  11. package/dist/blockSmith/variablePropertMap.d.ts.map +1 -0
  12. package/dist/bridge/Highlighter.d.ts.map +1 -0
  13. package/dist/bridge/PreviewHighlighter.d.ts.map +1 -0
  14. package/dist/bridge/StudioBlockPreview.d.ts.map +1 -0
  15. package/dist/bridge/StudioPagePreview.d.ts.map +1 -0
  16. package/dist/bridge/StudioPreview.d.ts.map +1 -0
  17. package/dist/bridge/constants.d.ts.map +1 -0
  18. package/dist/bridge/hooks/useElementTracker.d.ts.map +1 -0
  19. package/dist/bridge/index.d.ts.map +1 -0
  20. package/dist/bridge/types.d.ts.map +1 -0
  21. package/dist/bridge/utils.d.ts.map +1 -0
  22. package/dist/components/ActionWrapper.d.ts.map +1 -0
  23. package/dist/components/AnimatedBlock.d.ts.map +1 -0
  24. package/dist/components/BackgroundVideo.d.ts.map +1 -0
  25. package/dist/components/LoginForm/AuthMethodRenderer.d.ts.map +1 -0
  26. package/dist/components/LoginForm/ErrorDisplay.d.ts.map +1 -0
  27. package/dist/components/LoginForm/GoogleOAuth.d.ts.map +1 -0
  28. package/dist/components/LoginForm/MagicLinkAuthForm.d.ts.map +1 -0
  29. package/dist/components/LoginForm/OAuthSection.d.ts.map +1 -0
  30. package/dist/components/LoginForm/OtpAuthForm.d.ts.map +1 -0
  31. package/dist/components/LoginForm/WhatsAppAuthForm.d.ts.map +1 -0
  32. package/dist/components/LoginForm/index.d.ts.map +1 -0
  33. package/dist/components/LoginModal/index.d.ts.map +1 -0
  34. package/dist/components/accessCard/EntryCard/index.d.ts.map +1 -0
  35. package/dist/components/accessCard/LoginCard/index.d.ts.map +1 -0
  36. package/dist/components/accessCard/MessageCard.d.ts.map +1 -0
  37. package/dist/components/accessCard/MessageFooter/index.d.ts.map +1 -0
  38. package/dist/components/accessCard/card/index.d.ts.map +1 -0
  39. package/dist/components/backgroundPresets/Beams.d.ts.map +1 -0
  40. package/dist/components/backgroundPresets/Dots.d.ts.map +1 -0
  41. package/dist/components/backgroundPresets/Gradient.d.ts.map +1 -0
  42. package/dist/components/backgroundPresets/Grid.d.ts.map +1 -0
  43. package/dist/components/backgroundPresets/Waves.d.ts.map +1 -0
  44. package/dist/components/backgroundPresets/exports.d.ts.map +1 -0
  45. package/dist/components/backgroundPresets/index.d.ts.map +1 -0
  46. package/dist/components/backgroundPresets/presetSystem.d.ts.map +1 -0
  47. package/dist/components/backgroundPresets/presetUtils.d.ts.map +1 -0
  48. package/dist/components/backgroundPresets/presets.d.ts.map +1 -0
  49. package/dist/components/bookingCard/BookingCard.d.ts +0 -4
  50. package/dist/components/bookingCard/BookingCard.d.ts.map +1 -0
  51. package/dist/components/bookingCard/index.d.ts.map +1 -0
  52. package/dist/components/bookingModal/BookingConfirmation.d.ts +0 -4
  53. package/dist/components/bookingModal/BookingConfirmation.d.ts.map +1 -0
  54. package/dist/components/bookingModal/BookingModal.d.ts.map +1 -0
  55. package/dist/components/bookingModal/BookingSummary.d.ts.map +1 -0
  56. package/dist/components/bookingModal/index.d.ts.map +1 -0
  57. package/dist/components/index.d.ts.map +1 -0
  58. package/dist/components/integrationFilters/FieldRenderer.d.ts.map +1 -0
  59. package/dist/components/integrationFilters/IntegrationFilters.d.ts.map +1 -0
  60. package/dist/components/integrationFilters/fields/DropdownField.d.ts.map +1 -0
  61. package/dist/components/integrationFilters/fields/TextField.d.ts.map +1 -0
  62. package/dist/components/registerModal/AttendeeForm.d.ts +1 -1
  63. package/dist/components/registerModal/AttendeeForm.d.ts.map +1 -0
  64. package/dist/components/registerModal/CouponView.d.ts.map +1 -0
  65. package/dist/components/registerModal/RegisterModal.d.ts.map +1 -0
  66. package/dist/components/registerModal/RegistrationConfirmationModal.d.ts.map +1 -0
  67. package/dist/components/registerModal/TicketSelectionStep.d.ts.map +1 -0
  68. package/dist/components/registerModal/useCustomDisclosure.d.ts.map +1 -0
  69. package/dist/components/registerModal/utils.d.ts.map +1 -0
  70. package/dist/components/shared/EmailInput/index.d.ts.map +1 -0
  71. package/dist/components/shared/MagicLinkSuccess/index.d.ts.map +1 -0
  72. package/dist/components/shared/OTPInput/index.d.ts.map +1 -0
  73. package/dist/components/shared/PhoneInput/index.d.ts.map +1 -0
  74. package/dist/components/stripePaymentModal/StripePaymentModal.d.ts.map +1 -0
  75. package/dist/components/stripePaymentModal/index.d.ts.map +1 -0
  76. package/dist/components/ui/Calendar.d.ts.map +1 -0
  77. package/dist/components/ui/FlippingText.d.ts.map +1 -0
  78. package/dist/components/ui/StatefulButton/index.d.ts.map +1 -0
  79. package/dist/components/ui/base/avatar.d.ts.map +1 -0
  80. package/dist/components/ui/base/index.d.ts.map +1 -0
  81. package/dist/components/ui/base/input.d.ts.map +1 -0
  82. package/dist/components/ui/base/skeleton.d.ts.map +1 -0
  83. package/dist/components/ui/base/textarea.d.ts.map +1 -0
  84. package/dist/components/ui/base/tooltip.d.ts.map +1 -0
  85. package/dist/components/ui/form/FormInput.d.ts.map +1 -0
  86. package/dist/components/ui/form/FormSelect.d.ts.map +1 -0
  87. package/dist/components/ui/form/FormTextarea.d.ts.map +1 -0
  88. package/dist/components/ui/form/utils/FieldError.d.ts.map +1 -0
  89. package/dist/components/ui/form/utils/FieldWrapper.d.ts.map +1 -0
  90. package/dist/components/ui/form/utils/FormHelperText.d.ts.map +1 -0
  91. package/dist/components/ui/form/utils/FormLabel.d.ts.map +1 -0
  92. package/dist/components/ui/index.d.ts.map +1 -0
  93. package/dist/components/withBlockProps.d.ts.map +1 -0
  94. package/dist/constants/animation.d.ts.map +1 -0
  95. package/dist/constants/authentication.d.ts.map +1 -0
  96. package/dist/contentEngine/cache.d.ts.map +1 -0
  97. package/dist/contentEngine/content.d.ts.map +1 -0
  98. package/dist/contentEngine/getPage.d.ts.map +1 -0
  99. package/dist/contentEngine/head_code.d.ts.map +1 -0
  100. package/dist/contentEngine/index.d.ts.map +1 -0
  101. package/dist/contentEngine/sourceFetcher.d.ts.map +1 -0
  102. package/dist/contentEngine/themeUtils.d.ts.map +1 -0
  103. package/dist/contentEngine/types.d.ts.map +1 -0
  104. package/dist/contentEngine/urlBuilder.d.ts.map +1 -0
  105. package/dist/contentEngine/useContentEngine.d.ts.map +1 -0
  106. package/dist/contentEngine/useContextEngine.d.ts.map +1 -0
  107. package/dist/context/ForumContext.d.ts.map +1 -0
  108. package/dist/context/ModalManager.d.ts.map +1 -0
  109. package/dist/core/AccessManager/index.d.ts.map +1 -0
  110. package/dist/core/BlockRegistry.d.ts.map +1 -0
  111. package/dist/core/LevoBlock.d.ts.map +1 -0
  112. package/dist/core/LevoPage.d.ts.map +1 -0
  113. package/dist/core/index.d.ts.map +1 -0
  114. package/dist/elements/AlertDialog/index.d.ts.map +1 -0
  115. package/dist/elements/Box.d.ts.map +1 -0
  116. package/dist/elements/Button.d.ts.map +1 -0
  117. package/dist/elements/Carousel.d.ts.map +1 -0
  118. package/dist/elements/Container.d.ts.map +1 -0
  119. package/dist/elements/EditForm.d.ts.map +1 -0
  120. package/dist/elements/Form.d.ts.map +1 -0
  121. package/dist/elements/Heading.d.ts.map +1 -0
  122. package/dist/elements/Icon.d.ts.map +1 -0
  123. package/dist/elements/Iframe.d.ts.map +1 -0
  124. package/dist/elements/Image.d.ts.map +1 -0
  125. package/dist/elements/Link.d.ts.map +1 -0
  126. package/dist/elements/Media.d.ts.map +1 -0
  127. package/dist/elements/Section.d.ts.map +1 -0
  128. package/dist/elements/Tabs.d.ts.map +1 -0
  129. package/dist/elements/Typography.d.ts.map +1 -0
  130. package/dist/elements/UserMenu.d.ts.map +1 -0
  131. package/dist/elements/accordion/index.d.ts.map +1 -0
  132. package/dist/elements/dialog/index.d.ts.map +1 -0
  133. package/dist/elements/forum/ForumPost.d.ts.map +1 -0
  134. package/dist/elements/forum/ForumPostContentRenderer.d.ts.map +1 -0
  135. package/dist/elements/forum/SearchInput.d.ts.map +1 -0
  136. package/dist/elements/forum/categoryFilter/CategoryFilter.d.ts.map +1 -0
  137. package/dist/elements/forum/categoryFilter/index.d.ts.map +1 -0
  138. package/dist/elements/forum/comments/Comment.d.ts.map +1 -0
  139. package/dist/elements/forum/comments/Comments.d.ts.map +1 -0
  140. package/dist/elements/forum/comments/ReplyBox.d.ts.map +1 -0
  141. package/dist/elements/forum/comments/commentUtility.d.ts.map +1 -0
  142. package/dist/elements/forum/comments/index.d.ts.map +1 -0
  143. package/dist/elements/forum/createForumPost/CreateForumPost.d.ts.map +1 -0
  144. package/dist/elements/forum/createForumPost/CreateForumPostModal.d.ts.map +1 -0
  145. package/dist/elements/forum/createForumPost/index.d.ts.map +1 -0
  146. package/dist/elements/forum/index.d.ts.map +1 -0
  147. package/dist/elements/forum/restrictionOverlays/CommentsRestrictionOverlay.d.ts.map +1 -0
  148. package/dist/elements/forum/restrictionOverlays/JoinRequestForm.d.ts.map +1 -0
  149. package/dist/elements/forum/restrictionOverlays/PendingRequestState.d.ts.map +1 -0
  150. package/dist/elements/forum/restrictionOverlays/PostsRestrictionOverlay.d.ts.map +1 -0
  151. package/dist/elements/forum/restrictionOverlays/index.d.ts.map +1 -0
  152. package/dist/elements/forum/utility/Video.d.ts.map +1 -0
  153. package/dist/elements/forum/utility/index.d.ts.map +1 -0
  154. package/dist/elements/index.d.ts.map +1 -0
  155. package/dist/elements/popover/index.d.ts.map +1 -0
  156. package/dist/{elements-BxhlsyhI.js → elements-C0sYbYML.js} +1 -1
  157. package/dist/hooks/index.d.ts.map +1 -0
  158. package/dist/hooks/useLogin.d.ts.map +1 -0
  159. package/dist/hooks/useStripePayment.d.ts.map +1 -0
  160. package/dist/{index-CXtfbmpx.js → index-BUgkYYcp.js} +1 -1
  161. package/dist/{index-CgUU2EbC.js → index-BqEvx8Yg.js} +167 -167
  162. package/dist/{index-DsAqikcl.js → index-Ccv1uVOU.js} +2 -2
  163. package/dist/{index-CV5mr-8e.js → index-Cf4jJOnE.js} +87 -106
  164. package/dist/{index-BYXw6aHi.js → index-DJS7RFvk.js} +1 -1
  165. package/dist/{index-BJrh8CwF.js → index-D_r8laYN.js} +2684 -2687
  166. package/dist/{index-DxsNKR4p.js → index-DtRAKt_V.js} +2 -2
  167. package/dist/index.js +1 -1
  168. package/dist/interfaces/block.d.ts.map +1 -0
  169. package/dist/interfaces/contentSchema.d.ts.map +1 -0
  170. package/dist/interfaces/form.d.ts.map +1 -0
  171. package/dist/interfaces/index.d.ts.map +1 -0
  172. package/dist/interfaces/levoBlock.d.ts.map +1 -0
  173. package/dist/interfaces/site.d.ts.map +1 -0
  174. package/dist/interfaces/sites.d.ts.map +1 -0
  175. package/dist/interfaces/theme.d.ts.map +1 -0
  176. package/dist/pixel/constants/borderRadius.d.ts.map +1 -0
  177. package/dist/pixel/constants/colorOptions.d.ts.map +1 -0
  178. package/dist/pixel/constants/fontSizeOptions.d.ts.map +1 -0
  179. package/dist/pixel/constants/marginOptions.d.ts.map +1 -0
  180. package/dist/pixel/constants/spaceOptions.d.ts.map +1 -0
  181. package/dist/pixel/index.d.ts.map +1 -0
  182. package/dist/pixel/optionsMap.d.ts.map +1 -0
  183. package/dist/pixel/parserUtil.d.ts.map +1 -0
  184. package/dist/pixel/propertyMap.d.ts.map +1 -0
  185. package/dist/providers/AuthProvider.d.ts.map +1 -0
  186. package/dist/providers/BlockContext.d.ts.map +1 -0
  187. package/dist/providers/LazyMotionProvider.d.ts.map +1 -0
  188. package/dist/providers/index.d.ts.map +1 -0
  189. package/dist/schemas/authSchemas.d.ts.map +1 -0
  190. package/dist/theme/defaultTheme.d.ts.map +1 -0
  191. package/dist/utils/blockHelpers.d.ts.map +1 -0
  192. package/dist/utils/colorUtils.d.ts.map +1 -0
  193. package/dist/utils/findFieldSchema.d.ts.map +1 -0
  194. package/dist/utils/getKeysWithValue.d.ts.map +1 -0
  195. package/dist/utils/index.d.ts.map +1 -0
  196. package/dist/utils/string.d.ts.map +1 -0
  197. package/dist/utils/withBlockPropsUtils.d.ts.map +1 -0
  198. package/package.json +16 -16
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { jsx as e, jsxs as t } from "react/jsx-runtime";
3
3
  import { useEffect as n } from "react";
4
- import { b as l, u as c, D as d, d as m, e as u, f as g, g as h } from "./index-BJrh8CwF.js";
5
- import { L as f } from "./index-CgUU2EbC.js";
4
+ import { b as l, u as c, D as d, d as m, e as u, f as g, g as h } from "./index-D_r8laYN.js";
5
+ import { L as f } from "./index-BqEvx8Yg.js";
6
6
  const p = "_container_301k2_1", a = {
7
7
  container: p
8
8
  }, x = ({ config: o }) => {
@@ -1,66 +1,66 @@
1
1
  "use client";
2
- import { jsxs as a, Fragment as p, jsx as e } from "react/jsx-runtime";
3
- import { useLevo as X, cn as Z, errorHandler as j } from "@levo-so/react";
4
- import I from "dayjs";
5
- import { Calendar as P, Clock as R, CheckCircle2 as Y, CreditCard as G, ShieldCheck as T, Loader2 as W, XCircle as ee, RefreshCw as te, Ticket as ae, Download as ne } from "lucide-react";
6
- import { useState as h, useRef as z } from "react";
7
- import { useRazorpay as re } from "react-razorpay";
8
- import { u as se, a as ie, B as C, S as le } from "./index-BJrh8CwF.js";
9
- const pe = ({ summary: t, onComplete: S, className: U }) => {
10
- const u = X(), { workspace: g } = se(), { Razorpay: $ } = re(), {
2
+ import { jsxs as a, Fragment as _, jsx as e } from "react/jsx-runtime";
3
+ import { useLevo as J, cn as V, errorHandler as k } from "@levo-so/react";
4
+ import D from "dayjs";
5
+ import { Calendar as j, Clock as R, CheckCircle2 as I, CreditCard as X, ShieldCheck as Y, Loader2 as Z, XCircle as G, RefreshCw as W, Ticket as ee } from "lucide-react";
6
+ import { useState as P, useRef as z } from "react";
7
+ import { useRazorpay as te } from "react-razorpay";
8
+ import { u as ae, a as ne, B as C, S as re } from "./index-D_r8laYN.js";
9
+ const xe = ({ summary: t, onComplete: S, className: T }) => {
10
+ const { client: p } = J(), { workspace: x } = ae(), { Razorpay: $ } = te(), {
11
11
  stripePromise: q,
12
- config: B,
13
- isOpen: D,
12
+ config: F,
13
+ isOpen: B,
14
14
  openStripeCheckout: K,
15
- closeStripeCheckout: y,
16
- setOnComplete: E
17
- } = ie(), [x, s] = h("summary"), [L, i] = h(null), [M, A] = h(null), [Q, H] = h("razorpay"), b = z(!1), N = z(null), d = z(null), l = (n, r) => {
15
+ closeStripeCheckout: h,
16
+ setOnComplete: U
17
+ } = ne(), [g, s] = P("summary"), [E, l] = P(null), [L, M] = P("razorpay"), u = z(!1), y = z(null), d = z(null), i = (n, r) => {
18
18
  const f = r && r.trim() ? r : "INR", m = n / 100;
19
19
  return new Intl.NumberFormat("en-IN", {
20
20
  style: "currency",
21
21
  currency: f,
22
22
  minimumFractionDigits: 0
23
23
  }).format(m);
24
- }, v = (n) => n ? I(n).format("D MMM YYYY") : null, w = (n) => n ? I(n).format("h:mm A") : null, _ = (n) => n.replace(/_/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (r) => r.toUpperCase()), k = (n) => n == null ? "-" : typeof n == "boolean" ? n ? "Yes" : "No" : Array.isArray(n) ? n.join(", ") : typeof n == "object" ? JSON.stringify(n) : String(n), o = Object.entries(t.form_data || {}).filter(
24
+ }, b = (n) => n ? D(n).format("D MMM YYYY") : null, N = (n) => n ? D(n).format("h:mm A") : null, v = (n) => n.replace(/_/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (r) => r.toUpperCase()), w = (n) => n == null ? "-" : typeof n == "boolean" ? n ? "Yes" : "No" : Array.isArray(n) ? n.join(", ") : typeof n == "object" ? JSON.stringify(n) : String(n), o = Object.entries(t.form_data || {}).filter(
25
25
  ([n, r]) => r != null && r !== ""
26
- ), F = () => {
26
+ ), A = () => {
27
27
  if (!d.current) return;
28
28
  const n = d.current;
29
- u?.fetch?.url(`/v1/payment/booking/${t._id}/confirm`)?.options({ headers: { Origin: g?.id || "" } })?.post({ session_id: n })?.json().then((r) => {
30
- r?.content?.data ? (A(r.content.data), s("confirmed")) : (i("Payment received but confirmation failed. Please contact support."), s("failed")), y(), d.current = null;
29
+ p?.levoFetch?.url(`/v1/payment/booking/${t._id}/confirm`)?.options({ headers: { Origin: x?.id || "" } })?.post({ session_id: n })?.json().then((r) => {
30
+ r?.content?.data ? s("confirmed") : (l("Payment received but confirmation failed. Please contact support."), s("failed")), h(), d.current = null;
31
31
  }).catch((r) => {
32
- console.error("Failed to confirm booking after Stripe payment:", r), j(r), i("Payment received but confirmation failed. Please contact support."), y(), d.current = null, s("failed");
32
+ console.error("Failed to confirm booking after Stripe payment:", r), k(r), l("Payment received but confirmation failed. Please contact support."), h(), d.current = null, s("failed");
33
33
  });
34
34
  }, O = async () => {
35
- s("processing"), i(null);
35
+ s("processing"), l(null);
36
36
  try {
37
- const n = await u?.fetch?.url(`/v1/payment/booking/${t._id}/pay`)?.options({ headers: { Origin: g?.id || "" } })?.post({}).json();
37
+ const n = await p?.levoFetch?.url(`/v1/payment/booking/${t._id}/pay`)?.options({ headers: { Origin: x?.id || "" } })?.post({}).json();
38
38
  if (n?.status && n?.content?.meta?.key) {
39
39
  const r = n.content.meta;
40
- H(r.provider || "razorpay"), r.provider === "stripe" && r.client_secret ? (d.current = r.session_id || null, E(F), await K({
40
+ M(r.provider || "razorpay"), r.provider === "stripe" && r.client_secret ? (d.current = r.session_id || null, U(A), await K({
41
41
  key: r.key,
42
42
  client_secret: r.client_secret,
43
43
  amount: r.amount,
44
44
  currency: r.currency,
45
45
  provider: "stripe",
46
46
  reference_id: r.reference_id
47
- })) : J(r);
47
+ })) : Q(r);
48
48
  } else
49
- i("Unable to initiate payment. Please try again."), s("failed");
49
+ l("Unable to initiate payment. Please try again."), s("failed");
50
50
  } catch (n) {
51
- console.error("Initiate payment error:", n), j(n), i("Unable to initiate payment. Please check your connection and try again."), s("failed");
51
+ console.error("Initiate payment error:", n), k(n), l("Unable to initiate payment. Please check your connection and try again."), s("failed");
52
52
  }
53
- }, J = (n) => {
54
- b.current = !1, N.current = null;
53
+ }, Q = (n) => {
54
+ u.current = !1, y.current = null;
55
55
  const r = {
56
56
  key: n.key,
57
57
  amount: n.amount,
58
58
  currency: n.currency,
59
59
  order_id: n.order_id,
60
- name: g?.name ?? "",
60
+ name: x?.name ?? "",
61
61
  description: t.instance_label || "Booking Payment",
62
62
  handler: (m) => {
63
- V({
63
+ H({
64
64
  order_id: m.razorpay_order_id,
65
65
  payment_id: m.razorpay_payment_id,
66
66
  signature: m.razorpay_signature
@@ -72,31 +72,31 @@ const pe = ({ summary: t, onComplete: S, className: U }) => {
72
72
  };
73
73
  r.modal = {
74
74
  ondismiss: () => {
75
- b.current ? (i(N.current || "Payment failed. Please try again."), s("failed")) : s("summary");
75
+ u.current ? (l(y.current || "Payment failed. Please try again."), s("failed")) : s("summary");
76
76
  }
77
77
  };
78
78
  const f = new $(r);
79
79
  f.on("payment.failed", () => {
80
- b.current = !0, N.current = "Payment was declined. Please try a different payment method.";
80
+ u.current = !0, y.current = "Payment was declined. Please try a different payment method.";
81
81
  }), f.open();
82
- }, V = async (n) => {
82
+ }, H = async (n) => {
83
83
  try {
84
- const r = await u?.fetch?.url(`/v1/payment/booking/${t._id}/confirm`)?.options({ headers: { Origin: g?.id || "" } })?.post(n).json();
85
- r?.status && r?.content?.data ? (A(r.content.data), s("confirmed")) : (i("Payment received but confirmation failed. Please contact support."), s("failed"));
84
+ const r = await p?.levoFetch?.url(`/v1/payment/booking/${t._id}/confirm`)?.options({ headers: { Origin: x?.id || "" } })?.post(n).json();
85
+ r?.status && r?.content?.data ? s("confirmed") : (l("Payment received but confirmation failed. Please contact support."), s("failed"));
86
86
  } catch (r) {
87
- console.error("Confirm payment error:", r), j(r), i("Payment received but confirmation failed. Please contact support."), s("failed");
87
+ console.error("Confirm payment error:", r), k(r), l("Payment received but confirmation failed. Please contact support."), s("failed");
88
88
  }
89
89
  }, c = !t.unit_amount || t.unit_amount === 0;
90
- return /* @__PURE__ */ a(p, { children: [
90
+ return /* @__PURE__ */ a(_, { children: [
91
91
  /* @__PURE__ */ a(
92
92
  "div",
93
93
  {
94
- className: Z(
94
+ className: V(
95
95
  "overflow-hidden rounded-xl border border-gray-200 bg-white shadow-sm",
96
- U
96
+ T
97
97
  ),
98
98
  children: [
99
- x === "summary" && /* @__PURE__ */ a("div", { className: "flex flex-col", children: [
99
+ g === "summary" && /* @__PURE__ */ a("div", { className: "flex flex-col", children: [
100
100
  t.cover_image?.location && /* @__PURE__ */ a("div", { className: "relative h-44 w-full overflow-hidden bg-gray-100", children: [
101
101
  /* @__PURE__ */ e(
102
102
  "img",
@@ -115,19 +115,19 @@ const pe = ({ summary: t, onComplete: S, className: U }) => {
115
115
  ] }),
116
116
  (t.starts_at || t.ends_at) && /* @__PURE__ */ a("div", { className: "mx-auto mb-5 flex w-full max-w-lg flex-wrap justify-center gap-4 rounded-lg bg-orange-50 px-4 py-3", children: [
117
117
  t.starts_at && /* @__PURE__ */ a("div", { className: "flex items-center gap-2 text-gray-700 text-sm", children: [
118
- /* @__PURE__ */ e(P, { className: "size-4 text-orange-500" }),
119
- /* @__PURE__ */ e("span", { children: v(t.starts_at) })
118
+ /* @__PURE__ */ e(j, { className: "size-4 text-orange-500" }),
119
+ /* @__PURE__ */ e("span", { children: b(t.starts_at) })
120
120
  ] }),
121
121
  t.starts_at && /* @__PURE__ */ a("div", { className: "flex items-center gap-2 text-gray-700 text-sm", children: [
122
122
  /* @__PURE__ */ e(R, { className: "size-4 text-orange-500" }),
123
- /* @__PURE__ */ e("span", { children: w(t.starts_at) })
123
+ /* @__PURE__ */ e("span", { children: N(t.starts_at) })
124
124
  ] })
125
125
  ] }),
126
126
  o.length > 0 && /* @__PURE__ */ a("div", { className: "mx-auto mb-5 w-full max-w-lg", children: [
127
127
  /* @__PURE__ */ e("h4", { className: "mb-3 text-center font-medium text-gray-500 text-xs uppercase tracking-wider", children: "Your Details" }),
128
128
  /* @__PURE__ */ e("div", { className: "rounded-lg border border-gray-100 bg-gray-50/50 p-4", children: /* @__PURE__ */ e("div", { className: "space-y-2.5", children: o.map(([n, r]) => /* @__PURE__ */ a("div", { className: "flex items-start justify-between gap-3", children: [
129
- /* @__PURE__ */ e("span", { className: "text-gray-500 text-sm", children: _(n) }),
130
- /* @__PURE__ */ e("span", { className: "text-right font-medium text-gray-900 text-sm", children: k(r) })
129
+ /* @__PURE__ */ e("span", { className: "text-gray-500 text-sm", children: v(n) }),
130
+ /* @__PURE__ */ e("span", { className: "text-right font-medium text-gray-900 text-sm", children: w(r) })
131
131
  ] }, n)) }) })
132
132
  ] }),
133
133
  /* @__PURE__ */ a("div", { className: "mx-auto mb-5 w-full max-w-lg", children: [
@@ -136,7 +136,7 @@ const pe = ({ summary: t, onComplete: S, className: U }) => {
136
136
  /* @__PURE__ */ a("div", { className: "space-y-2", children: [
137
137
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between text-sm", children: [
138
138
  /* @__PURE__ */ e("span", { className: "text-gray-600", children: "Unit Price" }),
139
- /* @__PURE__ */ e("span", { className: "text-gray-900", children: l(t.unit_amount, t.currency) })
139
+ /* @__PURE__ */ e("span", { className: "text-gray-900", children: i(t.unit_amount, t.currency) })
140
140
  ] }),
141
141
  t.quantity > 1 && /* @__PURE__ */ a("div", { className: "flex items-center justify-between text-sm", children: [
142
142
  /* @__PURE__ */ e("span", { className: "text-gray-600", children: "Quantity" }),
@@ -149,17 +149,17 @@ const pe = ({ summary: t, onComplete: S, className: U }) => {
149
149
  /* @__PURE__ */ e("span", { className: "text-gray-600", children: "Discount" }),
150
150
  /* @__PURE__ */ a("span", { className: "text-green-600", children: [
151
151
  "-",
152
- l(t.discount, t.currency)
152
+ i(t.discount, t.currency)
153
153
  ] })
154
154
  ] }),
155
155
  t.taxes && t.taxes.length > 0 && t.taxes.map((n) => /* @__PURE__ */ a("div", { className: "flex items-center justify-between text-sm", children: [
156
156
  /* @__PURE__ */ e("span", { className: "text-gray-600", children: n.label }),
157
- /* @__PURE__ */ e("span", { className: "text-gray-900", children: l(n.amount, t.currency) })
157
+ /* @__PURE__ */ e("span", { className: "text-gray-900", children: i(n.amount, t.currency) })
158
158
  ] }, n.id))
159
159
  ] }),
160
160
  /* @__PURE__ */ a("div", { className: "mt-3 flex items-center justify-between border-gray-100 border-t pt-3", children: [
161
161
  /* @__PURE__ */ e("span", { className: "font-medium text-gray-900", children: "Total" }),
162
- /* @__PURE__ */ e("span", { className: "font-bold text-gray-900 text-xl", children: c ? "Free" : l(t.total_amount, t.currency) })
162
+ /* @__PURE__ */ e("span", { className: "font-bold text-gray-900 text-xl", children: c ? "Free" : i(t.total_amount, t.currency) })
163
163
  ] })
164
164
  ] })
165
165
  ] }),
@@ -169,59 +169,59 @@ const pe = ({ summary: t, onComplete: S, className: U }) => {
169
169
  elementKey: "booking-pay-btn",
170
170
  onClick: c ? () => s("confirmed") : O,
171
171
  className: "mx-auto w-full max-w-lg rounded-lg px-4 py-3.5 font-semibold",
172
- children: /* @__PURE__ */ e("span", { className: "flex items-center justify-center gap-2", children: c ? /* @__PURE__ */ a(p, { children: [
173
- /* @__PURE__ */ e(Y, { className: "size-5" }),
172
+ children: /* @__PURE__ */ e("span", { className: "flex items-center justify-center gap-2", children: c ? /* @__PURE__ */ a(_, { children: [
173
+ /* @__PURE__ */ e(I, { className: "size-5" }),
174
174
  /* @__PURE__ */ e("span", { children: "Confirm Booking" })
175
- ] }) : /* @__PURE__ */ a(p, { children: [
176
- /* @__PURE__ */ e(G, { className: "size-5" }),
175
+ ] }) : /* @__PURE__ */ a(_, { children: [
176
+ /* @__PURE__ */ e(X, { className: "size-5" }),
177
177
  /* @__PURE__ */ a("span", { children: [
178
178
  "Pay ",
179
- l(t.total_amount, t.currency)
179
+ i(t.total_amount, t.currency)
180
180
  ] })
181
181
  ] }) })
182
182
  }
183
183
  ),
184
184
  !c && /* @__PURE__ */ a("div", { className: "mx-auto mt-4 flex w-full max-w-lg items-center justify-center gap-1.5 text-gray-400 text-xs", children: [
185
- /* @__PURE__ */ e(T, { className: "size-3.5" }),
185
+ /* @__PURE__ */ e(Y, { className: "size-3.5" }),
186
186
  /* @__PURE__ */ e("span", { children: "Secure payment" })
187
187
  ] })
188
188
  ] })
189
189
  ] }),
190
- x === "processing" && /* @__PURE__ */ a("div", { className: "flex flex-col items-center justify-center px-6 py-16", children: [
190
+ g === "processing" && /* @__PURE__ */ a("div", { className: "flex flex-col items-center justify-center px-6 py-16", children: [
191
191
  /* @__PURE__ */ a("div", { className: "relative mb-6", children: [
192
192
  /* @__PURE__ */ e("div", { className: "absolute inset-0 animate-ping rounded-full bg-orange-200 opacity-75" }),
193
- /* @__PURE__ */ e("div", { className: "relative flex size-16 items-center justify-center rounded-full bg-orange-100", children: /* @__PURE__ */ e(W, { className: "size-8 animate-spin text-orange-500" }) })
193
+ /* @__PURE__ */ e("div", { className: "relative flex size-16 items-center justify-center rounded-full bg-orange-100", children: /* @__PURE__ */ e(Z, { className: "size-8 animate-spin text-orange-500" }) })
194
194
  ] }),
195
195
  /* @__PURE__ */ e("h3", { className: "mb-1 font-semibold text-gray-900 text-lg", children: "Processing Payment" }),
196
196
  /* @__PURE__ */ e("p", { className: "text-center text-gray-500 text-sm", children: "Please wait while we confirm your payment..." }),
197
197
  /* @__PURE__ */ e("div", { className: "mt-6 rounded-lg bg-gray-50 px-6 py-3", children: /* @__PURE__ */ a("p", { className: "text-center text-gray-600 text-sm", children: [
198
198
  "Amount:",
199
199
  " ",
200
- /* @__PURE__ */ e("span", { className: "font-semibold text-gray-900", children: l(t.total_amount, t.currency) })
200
+ /* @__PURE__ */ e("span", { className: "font-semibold text-gray-900", children: i(t.total_amount, t.currency) })
201
201
  ] }) })
202
202
  ] }),
203
- x === "failed" && /* @__PURE__ */ a("div", { className: "flex flex-col", children: [
203
+ g === "failed" && /* @__PURE__ */ a("div", { className: "flex flex-col", children: [
204
204
  /* @__PURE__ */ e("div", { className: "bg-gradient-to-br from-red-50 to-orange-50 px-6 py-6", children: /* @__PURE__ */ a("div", { className: "flex flex-col items-center", children: [
205
- /* @__PURE__ */ e("div", { className: "mb-3 flex size-14 items-center justify-center rounded-full bg-red-100", children: /* @__PURE__ */ e(ee, { className: "size-8 text-red-500" }) }),
205
+ /* @__PURE__ */ e("div", { className: "mb-3 flex size-14 items-center justify-center rounded-full bg-red-100", children: /* @__PURE__ */ e(G, { className: "size-8 text-red-500" }) }),
206
206
  /* @__PURE__ */ e("h3", { className: "mb-1 font-semibold text-gray-900 text-lg", children: "Payment Failed" }),
207
- /* @__PURE__ */ e("p", { className: "text-center text-gray-600 text-sm", children: L || "Something went wrong. Please try again." })
207
+ /* @__PURE__ */ e("p", { className: "text-center text-gray-600 text-sm", children: E || "Something went wrong. Please try again." })
208
208
  ] }) }),
209
209
  /* @__PURE__ */ a("div", { className: "flex flex-col px-6 py-5 sm:px-8", children: [
210
210
  /* @__PURE__ */ e("div", { className: "mx-auto mb-4 w-full max-w-lg text-center", children: /* @__PURE__ */ e("h4", { className: "font-semibold text-base text-gray-900", children: t.instance_label || t.context_label || "Booking" }) }),
211
211
  (t.starts_at || t.ends_at) && /* @__PURE__ */ a("div", { className: "mx-auto mb-4 flex w-full max-w-lg flex-wrap justify-center gap-4 rounded-lg bg-gray-50 px-4 py-2.5", children: [
212
212
  t.starts_at && /* @__PURE__ */ a("div", { className: "flex items-center gap-2 text-gray-600 text-sm", children: [
213
- /* @__PURE__ */ e(P, { className: "size-4 text-gray-400" }),
214
- /* @__PURE__ */ e("span", { children: v(t.starts_at) })
213
+ /* @__PURE__ */ e(j, { className: "size-4 text-gray-400" }),
214
+ /* @__PURE__ */ e("span", { children: b(t.starts_at) })
215
215
  ] }),
216
216
  t.starts_at && /* @__PURE__ */ a("div", { className: "flex items-center gap-2 text-gray-600 text-sm", children: [
217
217
  /* @__PURE__ */ e(R, { className: "size-4 text-gray-400" }),
218
- /* @__PURE__ */ e("span", { children: w(t.starts_at) })
218
+ /* @__PURE__ */ e("span", { children: N(t.starts_at) })
219
219
  ] })
220
220
  ] }),
221
221
  o.length > 0 && /* @__PURE__ */ e("div", { className: "mx-auto mb-4 w-full max-w-lg rounded-lg border border-gray-100 bg-gray-50/50 p-3", children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: [
222
222
  o.slice(0, 3).map(([n, r]) => /* @__PURE__ */ a("div", { className: "flex items-center justify-between gap-3 text-sm", children: [
223
- /* @__PURE__ */ e("span", { className: "text-gray-500", children: _(n) }),
224
- /* @__PURE__ */ e("span", { className: "max-w-[50%] truncate font-medium text-gray-900", children: k(r) })
223
+ /* @__PURE__ */ e("span", { className: "text-gray-500", children: v(n) }),
224
+ /* @__PURE__ */ e("span", { className: "max-w-[50%] truncate font-medium text-gray-900", children: w(r) })
225
225
  ] }, n)),
226
226
  o.length > 3 && /* @__PURE__ */ a("p", { className: "pt-1 text-center text-gray-400 text-xs", children: [
227
227
  "+",
@@ -231,37 +231,37 @@ const pe = ({ summary: t, onComplete: S, className: U }) => {
231
231
  ] }) }),
232
232
  /* @__PURE__ */ e("div", { className: "mx-auto mb-5 w-full max-w-lg rounded-lg border border-gray-200 bg-white p-4", children: /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
233
233
  /* @__PURE__ */ e("span", { className: "font-medium text-gray-700", children: "Amount to Pay" }),
234
- /* @__PURE__ */ e("span", { className: "font-bold text-gray-900 text-xl", children: l(t.total_amount, t.currency) })
234
+ /* @__PURE__ */ e("span", { className: "font-bold text-gray-900 text-xl", children: i(t.total_amount, t.currency) })
235
235
  ] }) }),
236
236
  /* @__PURE__ */ e(
237
237
  C,
238
238
  {
239
239
  elementKey: "booking-retry-btn",
240
240
  onClick: () => {
241
- i(null), O();
241
+ l(null), O();
242
242
  },
243
243
  className: "mx-auto w-full max-w-lg rounded-lg px-4 py-3.5 font-semibold",
244
244
  children: /* @__PURE__ */ a("span", { className: "flex items-center justify-center gap-2", children: [
245
- /* @__PURE__ */ e(te, { className: "size-5" }),
245
+ /* @__PURE__ */ e(W, { className: "size-5" }),
246
246
  /* @__PURE__ */ e("span", { children: "Try Again" })
247
247
  ] })
248
248
  }
249
249
  ),
250
250
  /* @__PURE__ */ a("div", { className: "mx-auto mt-4 flex w-full max-w-lg items-center justify-center gap-1.5 text-gray-400 text-xs", children: [
251
- /* @__PURE__ */ e(T, { className: "size-3.5" }),
251
+ /* @__PURE__ */ e(Y, { className: "size-3.5" }),
252
252
  /* @__PURE__ */ a("span", { children: [
253
253
  "Secured by ",
254
- Q === "stripe" ? "Stripe" : "Razorpay"
254
+ L === "stripe" ? "Stripe" : "Razorpay"
255
255
  ] })
256
256
  ] }),
257
257
  /* @__PURE__ */ e("p", { className: "mx-auto mt-3 w-full max-w-lg text-center text-gray-400 text-xs", children: "If the problem persists, please contact support" })
258
258
  ] })
259
259
  ] }),
260
- x === "confirmed" && /* @__PURE__ */ a("div", { className: "flex flex-col", children: [
260
+ g === "confirmed" && /* @__PURE__ */ a("div", { className: "flex flex-col", children: [
261
261
  /* @__PURE__ */ e("div", { className: "bg-gradient-to-br from-green-50 to-emerald-50 px-6 py-8", children: /* @__PURE__ */ a("div", { className: "flex flex-col items-center", children: [
262
262
  /* @__PURE__ */ a("div", { className: "relative mb-4", children: [
263
263
  /* @__PURE__ */ e("div", { className: "absolute -inset-2 animate-pulse rounded-full bg-green-200/50" }),
264
- /* @__PURE__ */ e("div", { className: "relative flex size-16 items-center justify-center rounded-full bg-green-100 ring-4 ring-green-50", children: /* @__PURE__ */ e(Y, { className: "size-9 text-green-600" }) })
264
+ /* @__PURE__ */ e("div", { className: "relative flex size-16 items-center justify-center rounded-full bg-green-100 ring-4 ring-green-50", children: /* @__PURE__ */ e(I, { className: "size-9 text-green-600" }) })
265
265
  ] }),
266
266
  /* @__PURE__ */ e("h3", { className: "mb-1 font-bold text-gray-900 text-xl", children: c ? "Booking Confirmed!" : "Payment Successful!" }),
267
267
  /* @__PURE__ */ e("p", { className: "text-center text-gray-600 text-sm", children: c ? "Your booking has been confirmed" : "Your payment has been processed successfully" })
@@ -272,7 +272,7 @@ const pe = ({ summary: t, onComplete: S, className: U }) => {
272
272
  /* @__PURE__ */ e("div", { className: "absolute top-1/2 -right-3 size-6 -translate-y-1/2 rounded-full bg-gray-100" }),
273
273
  /* @__PURE__ */ a("div", { className: "px-5 py-4", children: [
274
274
  /* @__PURE__ */ a("div", { className: "mb-4 flex items-start gap-3", children: [
275
- /* @__PURE__ */ e("div", { className: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-orange-100", children: /* @__PURE__ */ e(ae, { className: "size-5 text-orange-600" }) }),
275
+ /* @__PURE__ */ e("div", { className: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-orange-100", children: /* @__PURE__ */ e(ee, { className: "size-5 text-orange-600" }) }),
276
276
  /* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ e("p", { className: "font-semibold text-gray-900 leading-tight", children: t.instance_label || t.context_label || "Booking" }) })
277
277
  ] }),
278
278
  t.qr_image?.location && /* @__PURE__ */ e("div", { className: "mb-4 flex flex-col items-center", children: /* @__PURE__ */ e("div", { className: "rounded-lg border border-gray-200 bg-white p-2", children: /* @__PURE__ */ e(
@@ -291,44 +291,25 @@ const pe = ({ summary: t, onComplete: S, className: U }) => {
291
291
  /* @__PURE__ */ a("div", { className: "space-y-2.5", children: [
292
292
  t.starts_at && /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
293
293
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2 text-gray-500 text-sm", children: [
294
- /* @__PURE__ */ e(P, { className: "size-4" }),
294
+ /* @__PURE__ */ e(j, { className: "size-4" }),
295
295
  /* @__PURE__ */ e("span", { children: "Date & Time" })
296
296
  ] }),
297
297
  /* @__PURE__ */ a("p", { className: "font-medium text-gray-900 text-sm", children: [
298
- v(t.starts_at),
298
+ b(t.starts_at),
299
299
  ", ",
300
- w(t.starts_at)
300
+ N(t.starts_at)
301
301
  ] })
302
302
  ] }),
303
303
  o.slice(0, 3).map(([n, r]) => /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
304
- /* @__PURE__ */ e("span", { className: "text-gray-500 text-sm", children: _(n) }),
305
- /* @__PURE__ */ e("span", { className: "max-w-[50%] truncate font-medium text-gray-900 text-sm", children: k(r) })
304
+ /* @__PURE__ */ e("span", { className: "text-gray-500 text-sm", children: v(n) }),
305
+ /* @__PURE__ */ e("span", { className: "max-w-[50%] truncate font-medium text-gray-900 text-sm", children: w(r) })
306
306
  ] }, n))
307
307
  ] }),
308
308
  /* @__PURE__ */ e("div", { className: "my-4 border-gray-200 border-t border-dashed" }),
309
309
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
310
310
  /* @__PURE__ */ e("span", { className: "font-medium text-gray-700", children: c ? "Total" : "Amount Paid" }),
311
- /* @__PURE__ */ e("span", { className: "font-bold text-gray-900 text-lg", children: c ? "Free" : l(t.total_amount, t.currency) })
312
- ] }),
313
- (() => {
314
- const n = M?.invoice?.location || t.invoice?.location;
315
- return n ? /* @__PURE__ */ a(p, { children: [
316
- /* @__PURE__ */ e("div", { className: "my-4 border-gray-200 border-t border-dashed" }),
317
- /* @__PURE__ */ a(
318
- "a",
319
- {
320
- href: n,
321
- target: "_blank",
322
- rel: "noopener noreferrer",
323
- className: "flex w-full items-center justify-center gap-2 rounded-lg border border-gray-200 bg-gray-50 px-4 py-2.5 font-medium text-gray-700 text-sm transition-colors hover:bg-gray-100",
324
- children: [
325
- /* @__PURE__ */ e(ne, { className: "size-4" }),
326
- "Download Invoice"
327
- ]
328
- }
329
- )
330
- ] }) : null;
331
- })()
311
+ /* @__PURE__ */ e("span", { className: "font-bold text-gray-900 text-lg", children: c ? "Free" : i(t.total_amount, t.currency) })
312
+ ] })
332
313
  ] })
333
314
  ] }),
334
315
  S && /* @__PURE__ */ e("div", { className: "mx-auto mt-5 max-w-lg", children: /* @__PURE__ */ e(
@@ -346,20 +327,20 @@ const pe = ({ summary: t, onComplete: S, className: U }) => {
346
327
  ]
347
328
  }
348
329
  ),
349
- D && B && /* @__PURE__ */ e(
350
- le,
330
+ B && F && /* @__PURE__ */ e(
331
+ re,
351
332
  {
352
- isOpen: D,
333
+ isOpen: B,
353
334
  onClose: () => {
354
- y(), s("summary");
335
+ h(), s("summary");
355
336
  },
356
337
  stripePromise: q,
357
- clientSecret: B.clientSecret,
358
- onComplete: F
338
+ clientSecret: F.clientSecret,
339
+ onComplete: A
359
340
  }
360
341
  )
361
342
  ] });
362
343
  };
363
344
  export {
364
- pe as BookingCard
345
+ xe as BookingCard
365
346
  };
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsxs as r, jsx as s } from "react/jsx-runtime";
3
3
  import { useState as c } from "react";
4
- import { L as l } from "./index-CgUU2EbC.js";
4
+ import { L as l } from "./index-BqEvx8Yg.js";
5
5
  import { A as m } from "./index-IcG2wuuE.js";
6
6
  const d = "_header_s7k8g_1", p = "_title_s7k8g_7", h = "_subtitle_s7k8g_14", g = "_formWrapper_s7k8g_20", e = {
7
7
  header: d,