@levo-so/studio 0.1.60 → 0.1.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Beams-BMno1Tvc.js → Beams-sKsW_tr4.js} +22 -28
- package/dist/{Dots-DTupNond.js → Dots-BEIutbKS.js} +44 -40
- package/dist/{Gradient-BzroE-hh.js → Gradient-DAR7R3Mz.js} +2 -2
- package/dist/Grid-BuKIXWMJ.js +174 -0
- package/dist/{MessageCard-D9UDjWQS.js → MessageCard-C8v6oHmf.js} +7 -12
- package/dist/{Waves-E46HcLxm.js → Waves-C8qlIS1W.js} +29 -80
- package/dist/bridge/Highlighter.d.ts +3 -5
- package/dist/bridge/StudioPagePreview.d.ts +2 -2
- package/dist/bridge/StudioPreview.d.ts +1 -1
- package/dist/bridge/hooks/useElementTracker.d.ts +9 -0
- package/dist/bridge/index.d.ts +3 -3
- package/dist/bridge/utils.d.ts +1 -4
- package/dist/components/AnimatedBlock.d.ts +50 -0
- package/dist/components/backgroundPresets/exports.d.ts +1 -1
- package/dist/components/backgroundPresets/presetSystem.d.ts +2 -2
- package/dist/components/bookingCard/BookingCard.d.ts +65 -0
- package/dist/components/bookingCard/index.d.ts +2 -0
- package/dist/components/bookingModal/BookingConfirmation.d.ts +48 -0
- package/dist/components/bookingModal/BookingModal.d.ts +19 -0
- package/dist/components/bookingModal/BookingSummary.d.ts +34 -0
- package/dist/components/bookingModal/index.d.ts +4 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/integrationFilters/FieldRenderer.d.ts +3 -0
- package/dist/components/integrationFilters/IntegrationFilters.d.ts +1 -1
- package/dist/components/integrationFilters/fields/DropdownField.d.ts +1 -1
- package/dist/components/integrationFilters/fields/TextField.d.ts +1 -1
- package/dist/components/registerModal/AttendeeForm.d.ts +27 -0
- package/dist/components/registerModal/CouponView.d.ts +14 -0
- package/dist/components/registerModal/TicketSelectionStep.d.ts +15 -0
- package/dist/components/registerModal/utils.d.ts +85 -1
- package/dist/components/stripePaymentModal/StripePaymentModal.d.ts +22 -0
- package/dist/components/stripePaymentModal/index.d.ts +3 -0
- package/dist/components/ui/Calendar.d.ts +1 -1
- package/dist/components/ui/base/avatar.d.ts +1 -1
- package/dist/components/ui/base/index.d.ts +2 -1
- package/dist/components/ui/base/input.d.ts +1 -1
- package/dist/components/ui/base/textarea.d.ts +1 -1
- package/dist/components/ui/base/tooltip.d.ts +17 -0
- package/dist/components/ui/index.d.ts +2 -1
- package/dist/components/withBlockProps.d.ts +6 -14
- package/dist/constants/animation.d.ts +10 -0
- package/dist/contentEngine/content.d.ts +8 -4
- package/dist/contentEngine/index.d.ts +3 -3
- package/dist/contentEngine/themeUtils.d.ts +13 -0
- package/dist/context/ForumContext.d.ts +48 -0
- package/dist/core/AccessManager/index.d.ts +1 -1
- package/dist/core/LevoBlock.d.ts +1 -1
- package/dist/core/LevoPage.d.ts +2 -2
- package/dist/core/index.d.ts +1 -1
- package/dist/elements/AlertDialog/index.d.ts +23 -0
- package/dist/elements/Carousel.d.ts +1 -1
- package/dist/elements/Tabs.d.ts +1 -1
- package/dist/elements/UserMenu.d.ts +1 -1
- package/dist/elements/accordion/index.d.ts +1 -1
- package/dist/elements/dialog/index.d.ts +1 -1
- package/dist/elements/forum/ForumPost.d.ts +2 -0
- package/dist/elements/forum/SearchInput.d.ts +5 -0
- package/dist/elements/forum/categoryFilter/CategoryFilter.d.ts +16 -0
- package/dist/elements/forum/categoryFilter/index.d.ts +2 -0
- package/dist/elements/forum/comments/Comment.d.ts +4 -1
- package/dist/elements/forum/comments/Comments.d.ts +1 -0
- package/dist/elements/forum/comments/ReplyBox.d.ts +1 -0
- package/dist/elements/forum/comments/commentUtility.d.ts +4 -1
- package/dist/elements/forum/createForumPost/CreateForumPost.d.ts +9 -0
- package/dist/elements/forum/createForumPost/CreateForumPostModal.d.ts +87 -0
- package/dist/elements/forum/createForumPost/index.d.ts +2 -0
- package/dist/elements/forum/index.d.ts +6 -1
- package/dist/elements/forum/restrictionOverlays/CommentsRestrictionOverlay.d.ts +16 -0
- package/dist/elements/forum/restrictionOverlays/JoinRequestForm.d.ts +14 -0
- package/dist/elements/forum/restrictionOverlays/PendingRequestState.d.ts +11 -0
- package/dist/elements/forum/restrictionOverlays/PostsRestrictionOverlay.d.ts +16 -0
- package/dist/elements/forum/restrictionOverlays/index.d.ts +5 -0
- package/dist/elements/forum/utility/index.d.ts +15 -1
- package/dist/elements/index.d.ts +10 -10
- package/dist/elements-BxhlsyhI.js +9 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/useLogin.d.ts +1 -1
- package/dist/hooks/useStripePayment.d.ts +49 -0
- package/dist/index-BJrh8CwF.js +16197 -0
- package/dist/{index-BkICuRR-.js → index-BYXw6aHi.js} +3 -4
- package/dist/index-CV5mr-8e.js +365 -0
- package/dist/{index-a__5b49U.js → index-CXtfbmpx.js} +5 -15
- package/dist/index-CgUU2EbC.js +765 -0
- package/dist/index-DsAqikcl.js +29 -0
- package/dist/{index-BNwqk7Nf.js → index-DxsNKR4p.js} +3 -3
- package/dist/{index-DHHPZcEh.js → index-IcG2wuuE.js} +1 -8
- package/dist/index.d.ts +16 -13
- package/dist/index.js +159 -121
- package/dist/interfaces/block.d.ts +1 -1
- package/dist/interfaces/levoBlock.d.ts +61 -3
- package/dist/interfaces/sites.d.ts +5 -3
- package/dist/interfaces/theme.d.ts +2 -0
- package/dist/pixel/parserUtil.d.ts +1 -0
- package/dist/providers/AuthProvider.d.ts +1 -0
- package/dist/providers/BlockContext.d.ts +1 -1
- package/dist/providers/LazyMotionProvider.d.ts +15 -0
- package/dist/providers/index.d.ts +1 -0
- package/dist/studio.css +1 -1
- package/dist/utils/colorUtils.d.ts +7 -0
- package/dist/utils/getKeysWithValue.d.ts +1 -1
- package/dist/utils/string.d.ts +7 -0
- package/dist/utils/withBlockPropsUtils.d.ts +6 -55
- package/package.json +19 -19
- package/dist/Grid-t3zbAQxh.js +0 -184
- package/dist/blockSmith/ContentSchemaGenerator.d.ts.map +0 -1
- package/dist/blockSmith/DefaultContentGenerator.d.ts.map +0 -1
- package/dist/blockSmith/DefaultStylesGenerator.d.ts.map +0 -1
- package/dist/blockSmith/index.d.ts.map +0 -1
- package/dist/blockSmith/variablePropertMap.d.ts.map +0 -1
- package/dist/bridge/Highlighter.d.ts.map +0 -1
- package/dist/bridge/PreviewHighlighter.d.ts.map +0 -1
- package/dist/bridge/StudioBlockPreview.d.ts.map +0 -1
- package/dist/bridge/StudioPagePreview.d.ts.map +0 -1
- package/dist/bridge/StudioPreview.d.ts.map +0 -1
- package/dist/bridge/constants.d.ts.map +0 -1
- package/dist/bridge/index.d.ts.map +0 -1
- package/dist/bridge/types.d.ts.map +0 -1
- package/dist/bridge/utils.d.ts.map +0 -1
- package/dist/components/ActionWrapper.d.ts.map +0 -1
- package/dist/components/BackgroundVideo.d.ts.map +0 -1
- package/dist/components/LoginForm/AuthMethodRenderer.d.ts.map +0 -1
- package/dist/components/LoginForm/ErrorDisplay.d.ts.map +0 -1
- package/dist/components/LoginForm/GoogleOAuth.d.ts.map +0 -1
- package/dist/components/LoginForm/MagicLinkAuthForm.d.ts.map +0 -1
- package/dist/components/LoginForm/OAuthSection.d.ts.map +0 -1
- package/dist/components/LoginForm/OtpAuthForm.d.ts.map +0 -1
- package/dist/components/LoginForm/WhatsAppAuthForm.d.ts.map +0 -1
- package/dist/components/LoginForm/index.d.ts.map +0 -1
- package/dist/components/LoginModal/index.d.ts.map +0 -1
- package/dist/components/accessCard/EntryCard/index.d.ts.map +0 -1
- package/dist/components/accessCard/LoginCard/index.d.ts.map +0 -1
- package/dist/components/accessCard/MessageCard.d.ts.map +0 -1
- package/dist/components/accessCard/MessageFooter/index.d.ts.map +0 -1
- package/dist/components/accessCard/card/index.d.ts.map +0 -1
- package/dist/components/backgroundPresets/Beams.d.ts.map +0 -1
- package/dist/components/backgroundPresets/Dots.d.ts.map +0 -1
- package/dist/components/backgroundPresets/Gradient.d.ts.map +0 -1
- package/dist/components/backgroundPresets/Grid.d.ts.map +0 -1
- package/dist/components/backgroundPresets/Waves.d.ts.map +0 -1
- package/dist/components/backgroundPresets/exports.d.ts.map +0 -1
- package/dist/components/backgroundPresets/index.d.ts.map +0 -1
- package/dist/components/backgroundPresets/presetSystem.d.ts.map +0 -1
- package/dist/components/backgroundPresets/presetUtils.d.ts.map +0 -1
- package/dist/components/backgroundPresets/presets.d.ts.map +0 -1
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/integrationFilters/FieldRenderer.d.ts.map +0 -1
- package/dist/components/integrationFilters/IntegrationFilters.d.ts.map +0 -1
- package/dist/components/integrationFilters/fields/DropdownField.d.ts.map +0 -1
- package/dist/components/integrationFilters/fields/TextField.d.ts.map +0 -1
- package/dist/components/registerModal/RegisterModal.d.ts.map +0 -1
- package/dist/components/registerModal/RegistrationConfirmationModal.d.ts.map +0 -1
- package/dist/components/registerModal/useCustomDisclosure.d.ts.map +0 -1
- package/dist/components/registerModal/utils.d.ts.map +0 -1
- package/dist/components/shared/EmailInput/index.d.ts.map +0 -1
- package/dist/components/shared/MagicLinkSuccess/index.d.ts.map +0 -1
- package/dist/components/shared/OTPInput/index.d.ts.map +0 -1
- package/dist/components/shared/PhoneInput/index.d.ts.map +0 -1
- package/dist/components/ui/Calendar.d.ts.map +0 -1
- package/dist/components/ui/FlippingText.d.ts.map +0 -1
- package/dist/components/ui/StatefulButton/index.d.ts.map +0 -1
- package/dist/components/ui/base/avatar.d.ts.map +0 -1
- package/dist/components/ui/base/index.d.ts.map +0 -1
- package/dist/components/ui/base/input.d.ts.map +0 -1
- package/dist/components/ui/base/skeleton.d.ts.map +0 -1
- package/dist/components/ui/base/textarea.d.ts.map +0 -1
- package/dist/components/ui/form/FormInput.d.ts.map +0 -1
- package/dist/components/ui/form/FormSelect.d.ts.map +0 -1
- package/dist/components/ui/form/FormTextarea.d.ts.map +0 -1
- package/dist/components/ui/form/utils/FieldError.d.ts.map +0 -1
- package/dist/components/ui/form/utils/FieldWrapper.d.ts.map +0 -1
- package/dist/components/ui/form/utils/FormHelperText.d.ts.map +0 -1
- package/dist/components/ui/form/utils/FormLabel.d.ts.map +0 -1
- package/dist/components/ui/index.d.ts.map +0 -1
- package/dist/components/withBlockProps copy.d.ts +0 -61
- package/dist/components/withBlockProps copy.d.ts.map +0 -1
- package/dist/components/withBlockProps.d.ts.map +0 -1
- package/dist/constants/authentication.d.ts.map +0 -1
- package/dist/contentEngine/cache.d.ts.map +0 -1
- package/dist/contentEngine/content.d.ts.map +0 -1
- package/dist/contentEngine/getPage.d.ts.map +0 -1
- package/dist/contentEngine/head_code.d.ts.map +0 -1
- package/dist/contentEngine/index.d.ts.map +0 -1
- package/dist/contentEngine/sourceFetcher.d.ts.map +0 -1
- package/dist/contentEngine/themeUtils.d.ts.map +0 -1
- package/dist/contentEngine/types.d.ts.map +0 -1
- package/dist/contentEngine/urlBuilder.d.ts.map +0 -1
- package/dist/contentEngine/useContentEngine.d.ts.map +0 -1
- package/dist/contentEngine/useContextEngine.d.ts.map +0 -1
- package/dist/context/ModalManager.d.ts.map +0 -1
- package/dist/core/AccessManager/index.d.ts.map +0 -1
- package/dist/core/BlockRegistry.d.ts.map +0 -1
- package/dist/core/LevoBlock.d.ts.map +0 -1
- package/dist/core/LevoPage.d.ts.map +0 -1
- package/dist/core/index.d.ts.map +0 -1
- package/dist/elements/Box.d.ts.map +0 -1
- package/dist/elements/Button.d.ts.map +0 -1
- package/dist/elements/Carousel.d.ts.map +0 -1
- package/dist/elements/Container.d.ts.map +0 -1
- package/dist/elements/EditForm.d.ts.map +0 -1
- package/dist/elements/Form.d.ts.map +0 -1
- package/dist/elements/Heading.d.ts.map +0 -1
- package/dist/elements/Icon.d.ts.map +0 -1
- package/dist/elements/Iframe.d.ts.map +0 -1
- package/dist/elements/Image.d.ts.map +0 -1
- package/dist/elements/Link.d.ts.map +0 -1
- package/dist/elements/Media.d.ts.map +0 -1
- package/dist/elements/Section.d.ts.map +0 -1
- package/dist/elements/Tabs.d.ts.map +0 -1
- package/dist/elements/Typography.d.ts.map +0 -1
- package/dist/elements/UserMenu.d.ts.map +0 -1
- package/dist/elements/accordion/index.d.ts.map +0 -1
- package/dist/elements/dialog/index.d.ts.map +0 -1
- package/dist/elements/forum/ForumPost.d.ts.map +0 -1
- package/dist/elements/forum/ForumPostContentRenderer.d.ts.map +0 -1
- package/dist/elements/forum/comments/Comment.d.ts.map +0 -1
- package/dist/elements/forum/comments/Comments.d.ts.map +0 -1
- package/dist/elements/forum/comments/ReplyBox.d.ts.map +0 -1
- package/dist/elements/forum/comments/commentUtility.d.ts.map +0 -1
- package/dist/elements/forum/comments/index.d.ts.map +0 -1
- package/dist/elements/forum/index.d.ts.map +0 -1
- package/dist/elements/forum/utility/Video.d.ts.map +0 -1
- package/dist/elements/forum/utility/index.d.ts.map +0 -1
- package/dist/elements/index.d.ts.map +0 -1
- package/dist/elements/popover/index.d.ts.map +0 -1
- package/dist/hooks/useLogin.d.ts.map +0 -1
- package/dist/index-D-C30ZH_.js +0 -14748
- package/dist/interfaces/block.d.ts.map +0 -1
- package/dist/interfaces/contentSchema.d.ts.map +0 -1
- package/dist/interfaces/form.d.ts.map +0 -1
- package/dist/interfaces/index.d.ts.map +0 -1
- package/dist/interfaces/levoBlock.d.ts.map +0 -1
- package/dist/interfaces/site.d.ts.map +0 -1
- package/dist/interfaces/sites.d.ts.map +0 -1
- package/dist/interfaces/theme.d.ts.map +0 -1
- package/dist/pixel/constants/borderRadius.d.ts.map +0 -1
- package/dist/pixel/constants/colorOptions.d.ts.map +0 -1
- package/dist/pixel/constants/fontSizeOptions.d.ts.map +0 -1
- package/dist/pixel/constants/marginOptions.d.ts.map +0 -1
- package/dist/pixel/constants/spaceOptions.d.ts.map +0 -1
- package/dist/pixel/index.d.ts.map +0 -1
- package/dist/pixel/optionsMap.d.ts.map +0 -1
- package/dist/pixel/parserUtil.d.ts.map +0 -1
- package/dist/pixel/propertyMap.d.ts.map +0 -1
- package/dist/providers/AuthProvider.d.ts.map +0 -1
- package/dist/providers/BlockContext.d.ts.map +0 -1
- package/dist/providers/index.d.ts.map +0 -1
- package/dist/schemas/authSchemas.d.ts.map +0 -1
- package/dist/theme/defaultTheme.d.ts.map +0 -1
- package/dist/utils/blockHelpers.d.ts.map +0 -1
- package/dist/utils/colorUtils.d.ts.map +0 -1
- package/dist/utils/findFieldSchema.d.ts.map +0 -1
- package/dist/utils/getKeysWithValue.d.ts.map +0 -1
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/withBlockPropsUtils.d.ts.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
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-
|
|
5
|
-
import { A as m } from "./index-
|
|
4
|
+
import { L as l } from "./index-CgUU2EbC.js";
|
|
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,
|
|
8
8
|
title: p,
|
|
@@ -14,8 +14,7 @@ const d = "_header_s7k8g_1", p = "_title_s7k8g_7", h = "_subtitle_s7k8g_14", g =
|
|
|
14
14
|
!i && /* @__PURE__ */ r("div", { className: e.header, children: [
|
|
15
15
|
/* @__PURE__ */ s("h1", { className: e.title, children: "Sign in to continue" }),
|
|
16
16
|
t && /* @__PURE__ */ r("p", { className: e.subtitle, children: [
|
|
17
|
-
"You need to sign in to access this page on",
|
|
18
|
-
" ",
|
|
17
|
+
"You need to sign in to access this page on ",
|
|
19
18
|
/* @__PURE__ */ s("strong", { children: t })
|
|
20
19
|
] })
|
|
21
20
|
] }),
|
|
@@ -0,0 +1,365 @@
|
|
|
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(), {
|
|
11
|
+
stripePromise: q,
|
|
12
|
+
config: B,
|
|
13
|
+
isOpen: D,
|
|
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) => {
|
|
18
|
+
const f = r && r.trim() ? r : "INR", m = n / 100;
|
|
19
|
+
return new Intl.NumberFormat("en-IN", {
|
|
20
|
+
style: "currency",
|
|
21
|
+
currency: f,
|
|
22
|
+
minimumFractionDigits: 0
|
|
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(
|
|
25
|
+
([n, r]) => r != null && r !== ""
|
|
26
|
+
), F = () => {
|
|
27
|
+
if (!d.current) return;
|
|
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;
|
|
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");
|
|
33
|
+
});
|
|
34
|
+
}, O = async () => {
|
|
35
|
+
s("processing"), i(null);
|
|
36
|
+
try {
|
|
37
|
+
const n = await u?.fetch?.url(`/v1/payment/booking/${t._id}/pay`)?.options({ headers: { Origin: g?.id || "" } })?.post({}).json();
|
|
38
|
+
if (n?.status && n?.content?.meta?.key) {
|
|
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({
|
|
41
|
+
key: r.key,
|
|
42
|
+
client_secret: r.client_secret,
|
|
43
|
+
amount: r.amount,
|
|
44
|
+
currency: r.currency,
|
|
45
|
+
provider: "stripe",
|
|
46
|
+
reference_id: r.reference_id
|
|
47
|
+
})) : J(r);
|
|
48
|
+
} else
|
|
49
|
+
i("Unable to initiate payment. Please try again."), s("failed");
|
|
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");
|
|
52
|
+
}
|
|
53
|
+
}, J = (n) => {
|
|
54
|
+
b.current = !1, N.current = null;
|
|
55
|
+
const r = {
|
|
56
|
+
key: n.key,
|
|
57
|
+
amount: n.amount,
|
|
58
|
+
currency: n.currency,
|
|
59
|
+
order_id: n.order_id,
|
|
60
|
+
name: g?.name ?? "",
|
|
61
|
+
description: t.instance_label || "Booking Payment",
|
|
62
|
+
handler: (m) => {
|
|
63
|
+
V({
|
|
64
|
+
order_id: m.razorpay_order_id,
|
|
65
|
+
payment_id: m.razorpay_payment_id,
|
|
66
|
+
signature: m.razorpay_signature
|
|
67
|
+
});
|
|
68
|
+
},
|
|
69
|
+
theme: {
|
|
70
|
+
color: "#FC751A"
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
r.modal = {
|
|
74
|
+
ondismiss: () => {
|
|
75
|
+
b.current ? (i(N.current || "Payment failed. Please try again."), s("failed")) : s("summary");
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
const f = new $(r);
|
|
79
|
+
f.on("payment.failed", () => {
|
|
80
|
+
b.current = !0, N.current = "Payment was declined. Please try a different payment method.";
|
|
81
|
+
}), f.open();
|
|
82
|
+
}, V = async (n) => {
|
|
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"));
|
|
86
|
+
} catch (r) {
|
|
87
|
+
console.error("Confirm payment error:", r), j(r), i("Payment received but confirmation failed. Please contact support."), s("failed");
|
|
88
|
+
}
|
|
89
|
+
}, c = !t.unit_amount || t.unit_amount === 0;
|
|
90
|
+
return /* @__PURE__ */ a(p, { children: [
|
|
91
|
+
/* @__PURE__ */ a(
|
|
92
|
+
"div",
|
|
93
|
+
{
|
|
94
|
+
className: Z(
|
|
95
|
+
"overflow-hidden rounded-xl border border-gray-200 bg-white shadow-sm",
|
|
96
|
+
U
|
|
97
|
+
),
|
|
98
|
+
children: [
|
|
99
|
+
x === "summary" && /* @__PURE__ */ a("div", { className: "flex flex-col", children: [
|
|
100
|
+
t.cover_image?.location && /* @__PURE__ */ a("div", { className: "relative h-44 w-full overflow-hidden bg-gray-100", children: [
|
|
101
|
+
/* @__PURE__ */ e(
|
|
102
|
+
"img",
|
|
103
|
+
{
|
|
104
|
+
src: t.cover_image.location,
|
|
105
|
+
alt: t.instance_label,
|
|
106
|
+
className: "h-full w-full object-cover"
|
|
107
|
+
}
|
|
108
|
+
),
|
|
109
|
+
/* @__PURE__ */ e("div", { className: "absolute inset-0 bg-gradient-to-t from-black/30 to-transparent" })
|
|
110
|
+
] }),
|
|
111
|
+
/* @__PURE__ */ a("div", { className: "flex flex-col px-6 py-5 sm:px-8", children: [
|
|
112
|
+
/* @__PURE__ */ a("div", { className: "mx-auto mb-5 w-full max-w-lg text-center", children: [
|
|
113
|
+
/* @__PURE__ */ e("p", { className: "mb-1 font-medium text-gray-500 text-xs uppercase tracking-wider", children: "Booking Summary" }),
|
|
114
|
+
/* @__PURE__ */ e("h3", { className: "font-semibold text-gray-900 text-xl leading-tight", children: t.instance_label || t.context_label || "Booking" })
|
|
115
|
+
] }),
|
|
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
|
+
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) })
|
|
120
|
+
] }),
|
|
121
|
+
t.starts_at && /* @__PURE__ */ a("div", { className: "flex items-center gap-2 text-gray-700 text-sm", children: [
|
|
122
|
+
/* @__PURE__ */ e(R, { className: "size-4 text-orange-500" }),
|
|
123
|
+
/* @__PURE__ */ e("span", { children: w(t.starts_at) })
|
|
124
|
+
] })
|
|
125
|
+
] }),
|
|
126
|
+
o.length > 0 && /* @__PURE__ */ a("div", { className: "mx-auto mb-5 w-full max-w-lg", children: [
|
|
127
|
+
/* @__PURE__ */ e("h4", { className: "mb-3 text-center font-medium text-gray-500 text-xs uppercase tracking-wider", children: "Your Details" }),
|
|
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) })
|
|
131
|
+
] }, n)) }) })
|
|
132
|
+
] }),
|
|
133
|
+
/* @__PURE__ */ a("div", { className: "mx-auto mb-5 w-full max-w-lg", children: [
|
|
134
|
+
/* @__PURE__ */ e("h4", { className: "mb-3 text-center font-medium text-gray-500 text-xs uppercase tracking-wider", children: "Payment" }),
|
|
135
|
+
/* @__PURE__ */ a("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [
|
|
136
|
+
/* @__PURE__ */ a("div", { className: "space-y-2", children: [
|
|
137
|
+
/* @__PURE__ */ a("div", { className: "flex items-center justify-between text-sm", children: [
|
|
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) })
|
|
140
|
+
] }),
|
|
141
|
+
t.quantity > 1 && /* @__PURE__ */ a("div", { className: "flex items-center justify-between text-sm", children: [
|
|
142
|
+
/* @__PURE__ */ e("span", { className: "text-gray-600", children: "Quantity" }),
|
|
143
|
+
/* @__PURE__ */ a("span", { className: "text-gray-900", children: [
|
|
144
|
+
"×",
|
|
145
|
+
t.quantity
|
|
146
|
+
] })
|
|
147
|
+
] }),
|
|
148
|
+
typeof t.discount == "number" && t.discount > 0 && /* @__PURE__ */ a("div", { className: "flex items-center justify-between text-sm", children: [
|
|
149
|
+
/* @__PURE__ */ e("span", { className: "text-gray-600", children: "Discount" }),
|
|
150
|
+
/* @__PURE__ */ a("span", { className: "text-green-600", children: [
|
|
151
|
+
"-",
|
|
152
|
+
l(t.discount, t.currency)
|
|
153
|
+
] })
|
|
154
|
+
] }),
|
|
155
|
+
t.taxes && t.taxes.length > 0 && t.taxes.map((n) => /* @__PURE__ */ a("div", { className: "flex items-center justify-between text-sm", children: [
|
|
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) })
|
|
158
|
+
] }, n.id))
|
|
159
|
+
] }),
|
|
160
|
+
/* @__PURE__ */ a("div", { className: "mt-3 flex items-center justify-between border-gray-100 border-t pt-3", children: [
|
|
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) })
|
|
163
|
+
] })
|
|
164
|
+
] })
|
|
165
|
+
] }),
|
|
166
|
+
/* @__PURE__ */ e(
|
|
167
|
+
C,
|
|
168
|
+
{
|
|
169
|
+
elementKey: "booking-pay-btn",
|
|
170
|
+
onClick: c ? () => s("confirmed") : O,
|
|
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" }),
|
|
174
|
+
/* @__PURE__ */ e("span", { children: "Confirm Booking" })
|
|
175
|
+
] }) : /* @__PURE__ */ a(p, { children: [
|
|
176
|
+
/* @__PURE__ */ e(G, { className: "size-5" }),
|
|
177
|
+
/* @__PURE__ */ a("span", { children: [
|
|
178
|
+
"Pay ",
|
|
179
|
+
l(t.total_amount, t.currency)
|
|
180
|
+
] })
|
|
181
|
+
] }) })
|
|
182
|
+
}
|
|
183
|
+
),
|
|
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" }),
|
|
186
|
+
/* @__PURE__ */ e("span", { children: "Secure payment" })
|
|
187
|
+
] })
|
|
188
|
+
] })
|
|
189
|
+
] }),
|
|
190
|
+
x === "processing" && /* @__PURE__ */ a("div", { className: "flex flex-col items-center justify-center px-6 py-16", children: [
|
|
191
|
+
/* @__PURE__ */ a("div", { className: "relative mb-6", children: [
|
|
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" }) })
|
|
194
|
+
] }),
|
|
195
|
+
/* @__PURE__ */ e("h3", { className: "mb-1 font-semibold text-gray-900 text-lg", children: "Processing Payment" }),
|
|
196
|
+
/* @__PURE__ */ e("p", { className: "text-center text-gray-500 text-sm", children: "Please wait while we confirm your payment..." }),
|
|
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
|
+
"Amount:",
|
|
199
|
+
" ",
|
|
200
|
+
/* @__PURE__ */ e("span", { className: "font-semibold text-gray-900", children: l(t.total_amount, t.currency) })
|
|
201
|
+
] }) })
|
|
202
|
+
] }),
|
|
203
|
+
x === "failed" && /* @__PURE__ */ a("div", { className: "flex flex-col", children: [
|
|
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" }) }),
|
|
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." })
|
|
208
|
+
] }) }),
|
|
209
|
+
/* @__PURE__ */ a("div", { className: "flex flex-col px-6 py-5 sm:px-8", children: [
|
|
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
|
+
(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
|
+
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) })
|
|
215
|
+
] }),
|
|
216
|
+
t.starts_at && /* @__PURE__ */ a("div", { className: "flex items-center gap-2 text-gray-600 text-sm", children: [
|
|
217
|
+
/* @__PURE__ */ e(R, { className: "size-4 text-gray-400" }),
|
|
218
|
+
/* @__PURE__ */ e("span", { children: w(t.starts_at) })
|
|
219
|
+
] })
|
|
220
|
+
] }),
|
|
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
|
+
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) })
|
|
225
|
+
] }, n)),
|
|
226
|
+
o.length > 3 && /* @__PURE__ */ a("p", { className: "pt-1 text-center text-gray-400 text-xs", children: [
|
|
227
|
+
"+",
|
|
228
|
+
o.length - 3,
|
|
229
|
+
" more"
|
|
230
|
+
] })
|
|
231
|
+
] }) }),
|
|
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
|
+
/* @__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) })
|
|
235
|
+
] }) }),
|
|
236
|
+
/* @__PURE__ */ e(
|
|
237
|
+
C,
|
|
238
|
+
{
|
|
239
|
+
elementKey: "booking-retry-btn",
|
|
240
|
+
onClick: () => {
|
|
241
|
+
i(null), O();
|
|
242
|
+
},
|
|
243
|
+
className: "mx-auto w-full max-w-lg rounded-lg px-4 py-3.5 font-semibold",
|
|
244
|
+
children: /* @__PURE__ */ a("span", { className: "flex items-center justify-center gap-2", children: [
|
|
245
|
+
/* @__PURE__ */ e(te, { className: "size-5" }),
|
|
246
|
+
/* @__PURE__ */ e("span", { children: "Try Again" })
|
|
247
|
+
] })
|
|
248
|
+
}
|
|
249
|
+
),
|
|
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" }),
|
|
252
|
+
/* @__PURE__ */ a("span", { children: [
|
|
253
|
+
"Secured by ",
|
|
254
|
+
Q === "stripe" ? "Stripe" : "Razorpay"
|
|
255
|
+
] })
|
|
256
|
+
] }),
|
|
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
|
+
] })
|
|
259
|
+
] }),
|
|
260
|
+
x === "confirmed" && /* @__PURE__ */ a("div", { className: "flex flex-col", children: [
|
|
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
|
+
/* @__PURE__ */ a("div", { className: "relative mb-4", children: [
|
|
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" }) })
|
|
265
|
+
] }),
|
|
266
|
+
/* @__PURE__ */ e("h3", { className: "mb-1 font-bold text-gray-900 text-xl", children: c ? "Booking Confirmed!" : "Payment Successful!" }),
|
|
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" })
|
|
268
|
+
] }) }),
|
|
269
|
+
/* @__PURE__ */ a("div", { className: "px-6 py-5 sm:px-8", children: [
|
|
270
|
+
/* @__PURE__ */ a("div", { className: "relative mx-auto max-w-lg overflow-hidden rounded-xl border border-gray-200 bg-white", children: [
|
|
271
|
+
/* @__PURE__ */ e("div", { className: "absolute top-1/2 -left-3 size-6 -translate-y-1/2 rounded-full bg-gray-100" }),
|
|
272
|
+
/* @__PURE__ */ e("div", { className: "absolute top-1/2 -right-3 size-6 -translate-y-1/2 rounded-full bg-gray-100" }),
|
|
273
|
+
/* @__PURE__ */ a("div", { className: "px-5 py-4", children: [
|
|
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" }) }),
|
|
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
|
+
] }),
|
|
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(
|
|
279
|
+
"img",
|
|
280
|
+
{
|
|
281
|
+
src: t.qr_image.location,
|
|
282
|
+
alt: "Booking QR Code",
|
|
283
|
+
className: "size-24"
|
|
284
|
+
}
|
|
285
|
+
) }) }),
|
|
286
|
+
/* @__PURE__ */ a("div", { className: "mb-4 flex items-center justify-between rounded-lg bg-gray-50 px-3 py-2.5", children: [
|
|
287
|
+
/* @__PURE__ */ e("span", { className: "font-medium text-gray-500 text-xs uppercase tracking-wide", children: "Booking ID" }),
|
|
288
|
+
/* @__PURE__ */ e("span", { className: "font-mono font-semibold text-gray-900 text-sm", children: t._id })
|
|
289
|
+
] }),
|
|
290
|
+
/* @__PURE__ */ e("div", { className: "my-4 border-gray-200 border-t border-dashed" }),
|
|
291
|
+
/* @__PURE__ */ a("div", { className: "space-y-2.5", children: [
|
|
292
|
+
t.starts_at && /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
|
|
293
|
+
/* @__PURE__ */ a("div", { className: "flex items-center gap-2 text-gray-500 text-sm", children: [
|
|
294
|
+
/* @__PURE__ */ e(P, { className: "size-4" }),
|
|
295
|
+
/* @__PURE__ */ e("span", { children: "Date & Time" })
|
|
296
|
+
] }),
|
|
297
|
+
/* @__PURE__ */ a("p", { className: "font-medium text-gray-900 text-sm", children: [
|
|
298
|
+
v(t.starts_at),
|
|
299
|
+
", ",
|
|
300
|
+
w(t.starts_at)
|
|
301
|
+
] })
|
|
302
|
+
] }),
|
|
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) })
|
|
306
|
+
] }, n))
|
|
307
|
+
] }),
|
|
308
|
+
/* @__PURE__ */ e("div", { className: "my-4 border-gray-200 border-t border-dashed" }),
|
|
309
|
+
/* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
|
|
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
|
+
})()
|
|
332
|
+
] })
|
|
333
|
+
] }),
|
|
334
|
+
S && /* @__PURE__ */ e("div", { className: "mx-auto mt-5 max-w-lg", children: /* @__PURE__ */ e(
|
|
335
|
+
C,
|
|
336
|
+
{
|
|
337
|
+
elementKey: "booking-done-btn",
|
|
338
|
+
onClick: S,
|
|
339
|
+
className: "flex w-full items-center justify-center gap-2 rounded-lg bg-gray-900 px-4 py-3.5 font-semibold text-white transition-colors hover:bg-gray-800",
|
|
340
|
+
children: "Done"
|
|
341
|
+
}
|
|
342
|
+
) }),
|
|
343
|
+
/* @__PURE__ */ e("p", { className: "mt-4 text-center text-gray-400 text-xs", children: "A confirmation has been sent to your email" })
|
|
344
|
+
] })
|
|
345
|
+
] })
|
|
346
|
+
]
|
|
347
|
+
}
|
|
348
|
+
),
|
|
349
|
+
D && B && /* @__PURE__ */ e(
|
|
350
|
+
le,
|
|
351
|
+
{
|
|
352
|
+
isOpen: D,
|
|
353
|
+
onClose: () => {
|
|
354
|
+
y(), s("summary");
|
|
355
|
+
},
|
|
356
|
+
stripePromise: q,
|
|
357
|
+
clientSecret: B.clientSecret,
|
|
358
|
+
onComplete: F
|
|
359
|
+
}
|
|
360
|
+
)
|
|
361
|
+
] });
|
|
362
|
+
};
|
|
363
|
+
export {
|
|
364
|
+
pe as BookingCard
|
|
365
|
+
};
|
|
@@ -1,31 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as s, jsx as i } from "react/jsx-runtime";
|
|
3
3
|
import l from "libphonenumber-js";
|
|
4
|
-
import { u as r,
|
|
5
|
-
const g = "_footnote_v8hnh_1", f = "_footnoteText_v8hnh_11",
|
|
4
|
+
import { u as r, h as c } from "./index-BJrh8CwF.js";
|
|
5
|
+
const g = "_footnote_v8hnh_1", f = "_footnoteText_v8hnh_11", h = "_logoutButton_v8hnh_17", t = {
|
|
6
6
|
footnote: g,
|
|
7
7
|
footnoteText: f,
|
|
8
|
-
logoutButton:
|
|
8
|
+
logoutButton: h
|
|
9
9
|
}, p = () => {
|
|
10
10
|
const { account: o, isSignOutLoading: n } = r(), { signOut: u } = c(), a = () => {
|
|
11
11
|
u();
|
|
12
|
-
}, e = o?.email || l(
|
|
13
|
-
o?.mobile ? `+${o?.mobile}` : ""
|
|
14
|
-
)?.formatInternational();
|
|
12
|
+
}, e = o?.email || l(o?.mobile ? `+${o?.mobile}` : "")?.formatInternational();
|
|
15
13
|
return e ? /* @__PURE__ */ s("div", { className: t.footnote, children: [
|
|
16
14
|
/* @__PURE__ */ s("span", { className: t.footnoteText, children: [
|
|
17
15
|
"You are signed in as ",
|
|
18
16
|
/* @__PURE__ */ i("strong", { children: e })
|
|
19
17
|
] }),
|
|
20
|
-
/* @__PURE__ */ i(
|
|
21
|
-
"button",
|
|
22
|
-
{
|
|
23
|
-
className: t.logoutButton,
|
|
24
|
-
onClick: a,
|
|
25
|
-
disabled: n,
|
|
26
|
-
children: n ? "Signing out..." : "Sign out"
|
|
27
|
-
}
|
|
28
|
-
)
|
|
18
|
+
/* @__PURE__ */ i("button", { className: t.logoutButton, onClick: a, disabled: n, children: n ? "Signing out..." : "Sign out" })
|
|
29
19
|
] }) : null;
|
|
30
20
|
};
|
|
31
21
|
export {
|