@levo-so/studio 0.1.114 → 0.2.1
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/{BillingStep-DjNmSVkY.js → BillingStep-D4P_J_PJ.js} +1 -1
- package/Button-CmwbMGFV.js +505 -0
- package/{CollectionField-DrJuHNsg.js → CollectionField-D25BVweU.js} +29 -77
- package/{DateTimeWidget-CzBq92zC.js → DateTimeWidget-CG9ylSgA.js} +8 -8
- package/{EntryCard-C2KA5HMX.js → EntryCard-FxB1uCis.js} +4 -4
- package/{KBChatWidget-CPrg_etS.js → KBChatWidget-_kcueoxi.js} +388 -360
- package/{LoginCard-S_2jls6v.js → LoginCard-D8ZVZjbR.js} +3 -3
- package/{LoginForm-DeYsk4kd.js → LoginForm-Cg5F4guy.js} +2 -2
- package/{LoginModal-BbDfB4S9.js → LoginModal-Cn6Nsuz3.js} +4 -4
- package/{MessageCard-x6jPClGi.js → MessageCard-Bx6pC8wW.js} +2 -2
- package/{MessageFooter-CHuPnL_D.js → MessageFooter-CsY4uBIJ.js} +2 -2
- package/{ModalManager-DQVNPEuG.js → ModalManager-BIKunQ8D.js} +1 -1
- package/{PendingApprovalCard-C06B_Tg-.js → PendingApprovalCard-0ORO4y9v.js} +3 -3
- package/{PhoneWidget-DdX8_-2v.js → PhoneWidget-CZr1PZ4G.js} +3 -3
- package/{PopupRenderer-Bncp54gB-DysCmUdR.js → PopupRenderer-Bncp54gB-BOJj-taW.js} +15 -16
- package/{ProfileCard-DGanb4BY.js → ProfileCard-C2lXYYkC.js} +9 -8
- package/RichTextWidget-Dcq-NsEi.js +748 -0
- package/{RteThemeProvider-LFGzAYi1.js → RteThemeProvider-DxYOzcck.js} +1 -1
- package/Spinner-wdUA5kVe.js +7 -0
- package/{StripePaymentModal-BsYNQ4MB.js → StripePaymentModal-DfFlmYsp.js} +17 -17
- package/{bookingCard-CUv7WgqT.js → bookingCard-CZ3Jj9sL.js} +218 -217
- package/{dialog-LRLdr3kq.js → dialog-CznAfWcE.js} +32 -32
- package/{dist-D-y51gmU.js → dist-B91ZHPA-.js} +1103 -1261
- package/index.d.ts +0 -2
- package/index.js +2719 -2269
- package/kbChat-BpJkUcpv.js +163 -0
- package/{nodeAlignment-BC_Uferw.js → nodeAlignment-DS9_DLGB.js} +31 -23
- package/package.json +10 -10
- package/pillChrome-B4uuWJhY.js +16 -0
- package/studio.css +1 -1
- package/{useLogin-B2HHZxTi.js → useLogin-mEuzGlb2.js} +1 -1
- package/Button-Uwxgkriw.js +0 -1657
- package/RichTextWidget-BfZ3sCcx.js +0 -113
- package/Toolbar-6IXR9qAh.js +0 -645
- package/collection.d.ts +0 -500
- package/collection.js +0 -30
- package/inlineRteTheme-abXxag3B.js +0 -9
- package/kbChat-DCrdcXir.js +0 -166
- package/pillChrome-CQoJfFk3.js +0 -16
- package/utils-NDllPDUz.js +0 -5
- /package/{AuthProvider-C6bvedwF.js → AuthProvider-CFQqiIf1.js} +0 -0
- /package/{Beams-DboMUgCv.js → Beams-CDt4Mt3M.js} +0 -0
- /package/{Dots-a8xSboDv.js → Dots-DadBreAs.js} +0 -0
- /package/{Gradient-NacpoDCM.js → Gradient-CPoU73FR.js} +0 -0
- /package/{Grid-BJQvxnks.js → Grid-CAXyHMvM.js} +0 -0
- /package/{Popover-C_IQMM8H.js → Popover-Dt4--ulK.js} +0 -0
- /package/{Waves-DUuT_IFr.js → Waves-DPbfUhRX.js} +0 -0
- /package/{authentication-TdyaDNTn.js → authentication-BSNkm1-l.js} +0 -0
- /package/{card-D5fPArfa.js → card-DFSlAwCq.js} +0 -0
|
@@ -1,52 +1,53 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as e } from "./Button-
|
|
3
|
-
import { n as t } from "./AuthProvider-
|
|
4
|
-
import { n, t as r } from "./StripePaymentModal-
|
|
5
|
-
import { BillingStep as i } from "./BillingStep-
|
|
6
|
-
import {
|
|
7
|
-
import { useEffect as
|
|
8
|
-
import { Fragment as
|
|
9
|
-
import
|
|
10
|
-
import { Calendar as
|
|
11
|
-
import
|
|
2
|
+
import { t as e } from "./Button-CmwbMGFV.js";
|
|
3
|
+
import { n as t } from "./AuthProvider-CFQqiIf1.js";
|
|
4
|
+
import { n, t as r } from "./StripePaymentModal-DfFlmYsp.js";
|
|
5
|
+
import { BillingStep as i } from "./BillingStep-D4P_J_PJ.js";
|
|
6
|
+
import { errorHandler as a, useLevo as o } from "@levo-so/react";
|
|
7
|
+
import { useEffect as s, useRef as c, useState as l } from "react";
|
|
8
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
9
|
+
import { cn as p } from "@levo/utils/cn";
|
|
10
|
+
import { Calendar as m, CheckCircle2 as h, Clock as g, CreditCard as ee, Download as te, Loader2 as ne, Pencil as re, RefreshCw as ie, ShieldCheck as _, Ticket as ae, XCircle as oe } from "lucide-react";
|
|
11
|
+
import v from "dayjs";
|
|
12
|
+
import { useRazorpay as se } from "react-razorpay";
|
|
12
13
|
//#region src/components/bookingCard/BookingCard.tsx
|
|
13
|
-
var
|
|
14
|
-
let [n, r] =
|
|
15
|
-
if (
|
|
14
|
+
var y = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
15
|
+
let [n, r] = l(!1), i = c(null);
|
|
16
|
+
if (s(() => {
|
|
16
17
|
if (!n) return;
|
|
17
18
|
let e = (e) => {
|
|
18
19
|
i.current && !i.current.contains(e.target) && r(!1);
|
|
19
20
|
};
|
|
20
21
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
21
|
-
}, [n]), e.length === 0) return /* @__PURE__ */
|
|
22
|
-
className:
|
|
22
|
+
}, [n]), e.length === 0) return /* @__PURE__ */ d("span", {
|
|
23
|
+
className: p("text-gray-900", t),
|
|
23
24
|
children: "-"
|
|
24
25
|
});
|
|
25
|
-
let
|
|
26
|
-
return /* @__PURE__ */
|
|
26
|
+
let a = String(e[0] ?? "-"), o = e.length - 1;
|
|
27
|
+
return /* @__PURE__ */ f("div", {
|
|
27
28
|
ref: i,
|
|
28
29
|
className: "relative inline-block",
|
|
29
30
|
onMouseEnter: () => r(!0),
|
|
30
31
|
onMouseLeave: () => r(!1),
|
|
31
|
-
children: [/* @__PURE__ */
|
|
32
|
+
children: [/* @__PURE__ */ f("button", {
|
|
32
33
|
type: "button",
|
|
33
34
|
onClick: () => r((e) => !e),
|
|
34
|
-
className:
|
|
35
|
-
children: [
|
|
35
|
+
className: p("cursor-pointer text-right font-medium text-gray-900 underline decoration-dotted decoration-gray-300 underline-offset-2 hover:decoration-gray-500", t),
|
|
36
|
+
children: [a, o > 0 && /* @__PURE__ */ f("span", {
|
|
36
37
|
className: "ml-1 font-normal text-gray-500",
|
|
37
38
|
children: [
|
|
38
39
|
"+",
|
|
39
|
-
|
|
40
|
+
o,
|
|
40
41
|
" more"
|
|
41
42
|
]
|
|
42
43
|
})]
|
|
43
|
-
}), n && /* @__PURE__ */
|
|
44
|
+
}), n && /* @__PURE__ */ d("div", {
|
|
44
45
|
className: "absolute right-0 z-20 mt-1.5 min-w-[200px] max-w-[280px] rounded-md border border-gray-200 bg-white p-2.5 shadow-lg",
|
|
45
|
-
children: /* @__PURE__ */
|
|
46
|
+
children: /* @__PURE__ */ d("ul", {
|
|
46
47
|
className: "space-y-1.5 text-left",
|
|
47
|
-
children: e.map((e, t) => /* @__PURE__ */
|
|
48
|
+
children: e.map((e, t) => /* @__PURE__ */ f("li", {
|
|
48
49
|
className: "flex items-start gap-2 text-gray-700 text-xs leading-snug",
|
|
49
|
-
children: [/* @__PURE__ */
|
|
50
|
+
children: [/* @__PURE__ */ d("span", { className: "mt-1.5 size-1 shrink-0 rounded-full bg-orange-400" }), /* @__PURE__ */ d("span", {
|
|
50
51
|
className: "break-words",
|
|
51
52
|
children: String(e ?? "-")
|
|
52
53
|
})]
|
|
@@ -54,37 +55,37 @@ var b = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
54
55
|
})
|
|
55
56
|
})]
|
|
56
57
|
});
|
|
57
|
-
},
|
|
58
|
-
let
|
|
58
|
+
}, b = ({ summary: s, billingDetails: b, onBillingEdit: x, onComplete: S, className: ce }) => {
|
|
59
|
+
let C = o(), { workspace: w } = t(), { Razorpay: le } = se(), { stripePromise: ue, config: T, isOpen: E, openStripeCheckout: de, closeStripeCheckout: D, setOnComplete: fe } = n(), [O, k] = l("summary"), [A, j] = l(null), [pe, M] = l(!1), [me, N] = l(null), [he, ge] = l("razorpay"), P = c(!1), F = c(null), I = c(null), L = (e, t) => {
|
|
59
60
|
let n = t && t.trim() ? t : "INR", r = e / 100;
|
|
60
61
|
return new Intl.NumberFormat("en-IN", {
|
|
61
62
|
style: "currency",
|
|
62
63
|
currency: n,
|
|
63
64
|
minimumFractionDigits: 0
|
|
64
65
|
}).format(r);
|
|
65
|
-
}, R = (e) => e ?
|
|
66
|
+
}, R = (e) => e ? v(e).format("D MMM YYYY") : null, z = (e) => e ? v(e).format("h:mm A") : null, B = (e) => e.replace(/_/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (e) => e.toUpperCase()), V = (e) => e == null ? "-" : typeof e == "boolean" ? e ? "Yes" : "No" : Array.isArray(e) ? e.join(", ") : typeof e == "object" ? JSON.stringify(e) : String(e), H = () => {
|
|
66
67
|
try {
|
|
67
68
|
Object.keys(localStorage).forEach((e) => {
|
|
68
69
|
e.startsWith("levo_collection_cart_") && localStorage.removeItem(e);
|
|
69
70
|
}), window.dispatchEvent(new Event("levo_cart_updated"));
|
|
70
71
|
} catch (e) {
|
|
71
|
-
|
|
72
|
+
a(e);
|
|
72
73
|
}
|
|
73
|
-
}, U = Object.entries(
|
|
74
|
+
}, U = Object.entries(s.form_data || {}).filter(([e, t]) => t != null && t !== ""), W = () => {
|
|
74
75
|
if (!I.current) return;
|
|
75
76
|
let e = I.current;
|
|
76
|
-
|
|
77
|
-
e?.content?.data ? (N(e.content.data),
|
|
77
|
+
C?.fetch?.url(`/v1/payment/booking/${s._id}/confirm`)?.options({ headers: { Origin: w?.id || "" } })?.post({ session_id: e })?.json().then((e) => {
|
|
78
|
+
e?.content?.data ? (N(e.content.data), k("confirmed"), H()) : (j("Payment received but confirmation failed. Please contact support."), k("failed")), D(), I.current = null;
|
|
78
79
|
}).catch((e) => {
|
|
79
|
-
console.error("Failed to confirm booking after Stripe payment:", e),
|
|
80
|
+
console.error("Failed to confirm booking after Stripe payment:", e), a(e), j("Payment received but confirmation failed. Please contact support."), D(), I.current = null, k("failed");
|
|
80
81
|
});
|
|
81
82
|
}, G = async () => {
|
|
82
|
-
|
|
83
|
+
k("processing"), j(null);
|
|
83
84
|
try {
|
|
84
|
-
let e =
|
|
85
|
+
let e = b || s.billing_details, t = e ? { billing_details: e } : {}, n = await C?.fetch?.url(`/v1/payment/booking/${s._id}/pay`)?.options({ headers: { Origin: w?.id || "" } })?.post(t).json();
|
|
85
86
|
if (n?.status && n?.content?.meta?.key) {
|
|
86
87
|
let e = n.content.meta;
|
|
87
|
-
ge(e.provider || "razorpay"), e.provider === "stripe" && e.client_secret ? (I.current = e.session_id || null,
|
|
88
|
+
ge(e.provider || "razorpay"), e.provider === "stripe" && e.client_secret ? (I.current = e.session_id || null, fe(W), await de({
|
|
88
89
|
key: e.key,
|
|
89
90
|
client_secret: e.client_secret,
|
|
90
91
|
amount: e.amount,
|
|
@@ -92,9 +93,9 @@ var b = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
92
93
|
provider: "stripe",
|
|
93
94
|
reference_id: e.reference_id
|
|
94
95
|
})) : _e(e);
|
|
95
|
-
} else j("Unable to initiate payment. Please try again."),
|
|
96
|
+
} else j("Unable to initiate payment. Please try again."), k("failed");
|
|
96
97
|
} catch (e) {
|
|
97
|
-
console.error("Initiate payment error:", e),
|
|
98
|
+
console.error("Initiate payment error:", e), a(e), j("Unable to initiate payment. Please check your connection and try again."), k("failed");
|
|
98
99
|
}
|
|
99
100
|
}, _e = (e) => {
|
|
100
101
|
P.current = !1, F.current = null;
|
|
@@ -103,7 +104,7 @@ var b = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
103
104
|
amount: e.amount,
|
|
104
105
|
currency: e.currency,
|
|
105
106
|
order_id: e.order_id,
|
|
106
|
-
name:
|
|
107
|
+
name: w?.name ?? "",
|
|
107
108
|
description: X || "Booking Payment",
|
|
108
109
|
handler: (e) => {
|
|
109
110
|
ve({
|
|
@@ -115,74 +116,74 @@ var b = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
115
116
|
theme: { color: "#FC751A" }
|
|
116
117
|
};
|
|
117
118
|
t.modal = { ondismiss: () => {
|
|
118
|
-
P.current ? (j(F.current || "Payment failed. Please try again."),
|
|
119
|
+
P.current ? (j(F.current || "Payment failed. Please try again."), k("failed")) : k("summary");
|
|
119
120
|
} };
|
|
120
|
-
let n = new
|
|
121
|
+
let n = new le(t);
|
|
121
122
|
n.on("payment.failed", () => {
|
|
122
123
|
P.current = !0, F.current = "Payment was declined. Please try a different payment method.";
|
|
123
124
|
}), n.open();
|
|
124
125
|
}, ve = async (e) => {
|
|
125
126
|
try {
|
|
126
|
-
let t = await
|
|
127
|
-
t?.status && t?.content?.data ? (N(t.content.data),
|
|
127
|
+
let t = await C?.fetch?.url(`/v1/payment/booking/${s._id}/confirm`)?.options({ headers: { Origin: w?.id || "" } })?.post(e).json();
|
|
128
|
+
t?.status && t?.content?.data ? (N(t.content.data), k("confirmed"), H()) : (j("Payment received but confirmation failed. Please contact support."), k("failed"));
|
|
128
129
|
} catch (e) {
|
|
129
|
-
console.error("Confirm payment error:", e),
|
|
130
|
+
console.error("Confirm payment error:", e), a(e), j("Payment received but confirmation failed. Please contact support."), k("failed");
|
|
130
131
|
}
|
|
131
|
-
}, K = !
|
|
132
|
-
return /* @__PURE__ */
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
className:
|
|
132
|
+
}, K = !s.total_amount || s.total_amount === 0, q = s.line_items || [], J = q[0], Y = q.length > 1, X = Y ? s.context_label || "Booking" : J?.instance_label || s.context_label || "Booking", Z = J?.cover_image?.location || null, Q = J?.starts_at || null, $ = J?.ends_at || null;
|
|
133
|
+
return /* @__PURE__ */ f(u, { children: [
|
|
134
|
+
/* @__PURE__ */ f("div", {
|
|
135
|
+
className: p("overflow-hidden rounded-xl border border-gray-200 bg-white shadow-sm", ce),
|
|
135
136
|
children: [
|
|
136
|
-
|
|
137
|
+
O === "summary" && /* @__PURE__ */ f("div", {
|
|
137
138
|
className: "flex flex-col",
|
|
138
|
-
children: [Z && /* @__PURE__ */
|
|
139
|
+
children: [Z && /* @__PURE__ */ f("div", {
|
|
139
140
|
className: "relative h-44 w-full overflow-hidden bg-gray-100",
|
|
140
|
-
children: [/* @__PURE__ */
|
|
141
|
+
children: [/* @__PURE__ */ d("img", {
|
|
141
142
|
src: Z,
|
|
142
143
|
alt: X,
|
|
143
144
|
className: "h-full w-full object-cover"
|
|
144
|
-
}), /* @__PURE__ */
|
|
145
|
-
}), /* @__PURE__ */
|
|
145
|
+
}), /* @__PURE__ */ d("div", { className: "absolute inset-0 bg-gradient-to-t from-black/30 to-transparent" })]
|
|
146
|
+
}), /* @__PURE__ */ f("div", {
|
|
146
147
|
className: "flex flex-col px-6 py-5 sm:px-8",
|
|
147
148
|
children: [
|
|
148
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ f("div", {
|
|
149
150
|
className: "mx-auto mb-5 w-full max-w-lg text-center",
|
|
150
|
-
children: [/* @__PURE__ */
|
|
151
|
+
children: [/* @__PURE__ */ d("p", {
|
|
151
152
|
className: "mb-1 font-medium text-gray-500 text-xs uppercase tracking-wider",
|
|
152
153
|
children: "Booking Summary"
|
|
153
|
-
}), /* @__PURE__ */
|
|
154
|
+
}), /* @__PURE__ */ d("h3", {
|
|
154
155
|
className: "font-semibold text-gray-900 text-xl leading-tight",
|
|
155
156
|
children: X
|
|
156
157
|
})]
|
|
157
158
|
}),
|
|
158
|
-
!Y && (Q || $) && /* @__PURE__ */
|
|
159
|
+
!Y && (Q || $) && /* @__PURE__ */ f("div", {
|
|
159
160
|
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",
|
|
160
|
-
children: [Q && /* @__PURE__ */
|
|
161
|
+
children: [Q && /* @__PURE__ */ f("div", {
|
|
161
162
|
className: "flex items-center gap-2 text-gray-700 text-sm",
|
|
162
|
-
children: [/* @__PURE__ */
|
|
163
|
-
}), Q && /* @__PURE__ */
|
|
163
|
+
children: [/* @__PURE__ */ d(m, { className: "size-4 text-orange-500" }), /* @__PURE__ */ d("span", { children: R(Q) })]
|
|
164
|
+
}), Q && /* @__PURE__ */ f("div", {
|
|
164
165
|
className: "flex items-center gap-2 text-gray-700 text-sm",
|
|
165
|
-
children: [/* @__PURE__ */
|
|
166
|
+
children: [/* @__PURE__ */ d(g, { className: "size-4 text-orange-500" }), /* @__PURE__ */ d("span", { children: z(Q) })]
|
|
166
167
|
})]
|
|
167
168
|
}),
|
|
168
|
-
U.length > 0 && /* @__PURE__ */
|
|
169
|
+
U.length > 0 && /* @__PURE__ */ f("div", {
|
|
169
170
|
className: "mx-auto mb-5 w-full max-w-lg",
|
|
170
|
-
children: [/* @__PURE__ */
|
|
171
|
+
children: [/* @__PURE__ */ d("h4", {
|
|
171
172
|
className: "mb-3 text-center font-medium text-gray-500 text-xs uppercase tracking-wider",
|
|
172
173
|
children: "Your Details"
|
|
173
|
-
}), /* @__PURE__ */
|
|
174
|
+
}), /* @__PURE__ */ d("div", {
|
|
174
175
|
className: "rounded-lg border border-gray-100 bg-gray-50/50 p-4",
|
|
175
|
-
children: /* @__PURE__ */
|
|
176
|
+
children: /* @__PURE__ */ d("div", {
|
|
176
177
|
className: "space-y-2.5",
|
|
177
|
-
children: U.map(([e, t]) => /* @__PURE__ */
|
|
178
|
+
children: U.map(([e, t]) => /* @__PURE__ */ f("div", {
|
|
178
179
|
className: "flex items-start justify-between gap-3",
|
|
179
|
-
children: [/* @__PURE__ */
|
|
180
|
+
children: [/* @__PURE__ */ d("span", {
|
|
180
181
|
className: "text-gray-500 text-sm",
|
|
181
182
|
children: B(e)
|
|
182
|
-
}), Array.isArray(t) ? /* @__PURE__ */
|
|
183
|
+
}), Array.isArray(t) ? /* @__PURE__ */ d(y, {
|
|
183
184
|
items: t,
|
|
184
185
|
textSizeClass: "text-sm"
|
|
185
|
-
}) : /* @__PURE__ */
|
|
186
|
+
}) : /* @__PURE__ */ d("span", {
|
|
186
187
|
className: "text-right font-medium text-gray-900 text-sm",
|
|
187
188
|
children: V(t)
|
|
188
189
|
})]
|
|
@@ -191,51 +192,51 @@ var b = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
191
192
|
})]
|
|
192
193
|
}),
|
|
193
194
|
(() => {
|
|
194
|
-
let e =
|
|
195
|
-
return e ? /* @__PURE__ */
|
|
195
|
+
let e = b || s.billing_details;
|
|
196
|
+
return e ? /* @__PURE__ */ f("div", {
|
|
196
197
|
className: "mx-auto mb-5 w-full max-w-lg",
|
|
197
|
-
children: [/* @__PURE__ */
|
|
198
|
+
children: [/* @__PURE__ */ f("div", {
|
|
198
199
|
className: "mb-3 flex items-center justify-center gap-2",
|
|
199
|
-
children: [/* @__PURE__ */
|
|
200
|
+
children: [/* @__PURE__ */ d("h4", {
|
|
200
201
|
className: "text-center font-medium text-gray-500 text-xs uppercase tracking-wider",
|
|
201
202
|
children: "Billing Details"
|
|
202
|
-
}),
|
|
203
|
+
}), x && /* @__PURE__ */ d("button", {
|
|
203
204
|
type: "button",
|
|
204
205
|
onClick: () => M(!0),
|
|
205
206
|
className: "text-orange-500 hover:text-orange-600",
|
|
206
|
-
children: /* @__PURE__ */
|
|
207
|
+
children: /* @__PURE__ */ d(re, { className: "size-3.5" })
|
|
207
208
|
})]
|
|
208
|
-
}), /* @__PURE__ */
|
|
209
|
+
}), /* @__PURE__ */ d("div", {
|
|
209
210
|
className: "rounded-lg border border-gray-100 bg-gray-50/50 p-4",
|
|
210
|
-
children: /* @__PURE__ */
|
|
211
|
+
children: /* @__PURE__ */ f("div", {
|
|
211
212
|
className: "space-y-2.5",
|
|
212
213
|
children: [
|
|
213
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ f("div", {
|
|
214
215
|
className: "flex items-start justify-between gap-3",
|
|
215
|
-
children: [/* @__PURE__ */
|
|
216
|
+
children: [/* @__PURE__ */ d("span", {
|
|
216
217
|
className: "text-gray-500 text-sm",
|
|
217
218
|
children: "Name"
|
|
218
|
-
}), /* @__PURE__ */
|
|
219
|
+
}), /* @__PURE__ */ d("span", {
|
|
219
220
|
className: "text-right font-medium text-gray-900 text-sm",
|
|
220
221
|
children: e.name
|
|
221
222
|
})]
|
|
222
223
|
}),
|
|
223
|
-
e.tax_id && /* @__PURE__ */
|
|
224
|
+
e.tax_id && /* @__PURE__ */ f("div", {
|
|
224
225
|
className: "flex items-start justify-between gap-3",
|
|
225
|
-
children: [/* @__PURE__ */
|
|
226
|
+
children: [/* @__PURE__ */ d("span", {
|
|
226
227
|
className: "text-gray-500 text-sm",
|
|
227
228
|
children: "Tax ID"
|
|
228
|
-
}), /* @__PURE__ */
|
|
229
|
+
}), /* @__PURE__ */ d("span", {
|
|
229
230
|
className: "text-right font-medium text-gray-900 text-sm",
|
|
230
231
|
children: e.tax_id
|
|
231
232
|
})]
|
|
232
233
|
}),
|
|
233
|
-
/* @__PURE__ */
|
|
234
|
+
/* @__PURE__ */ f("div", {
|
|
234
235
|
className: "flex items-start justify-between gap-3",
|
|
235
|
-
children: [/* @__PURE__ */
|
|
236
|
+
children: [/* @__PURE__ */ d("span", {
|
|
236
237
|
className: "text-gray-500 text-sm",
|
|
237
238
|
children: "Address"
|
|
238
|
-
}), /* @__PURE__ */
|
|
239
|
+
}), /* @__PURE__ */ d("span", {
|
|
239
240
|
className: "text-right font-medium text-gray-900 text-sm",
|
|
240
241
|
children: [
|
|
241
242
|
e.address.line1,
|
|
@@ -252,175 +253,175 @@ var b = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
252
253
|
})]
|
|
253
254
|
}) : null;
|
|
254
255
|
})(),
|
|
255
|
-
/* @__PURE__ */
|
|
256
|
+
/* @__PURE__ */ f("div", {
|
|
256
257
|
className: "mx-auto mb-5 w-full max-w-lg",
|
|
257
|
-
children: [/* @__PURE__ */
|
|
258
|
+
children: [/* @__PURE__ */ d("h4", {
|
|
258
259
|
className: "mb-3 text-center font-medium text-gray-500 text-xs uppercase tracking-wider",
|
|
259
260
|
children: "Payment"
|
|
260
|
-
}), /* @__PURE__ */
|
|
261
|
+
}), /* @__PURE__ */ f("div", {
|
|
261
262
|
className: "rounded-lg border border-gray-200 bg-white p-4",
|
|
262
|
-
children: [/* @__PURE__ */
|
|
263
|
+
children: [/* @__PURE__ */ f("div", {
|
|
263
264
|
className: "space-y-2",
|
|
264
265
|
children: [
|
|
265
|
-
q.map((e) => /* @__PURE__ */
|
|
266
|
+
q.map((e) => /* @__PURE__ */ f("div", {
|
|
266
267
|
className: "flex items-start justify-between gap-3 text-sm",
|
|
267
|
-
children: [/* @__PURE__ */
|
|
268
|
+
children: [/* @__PURE__ */ f("span", {
|
|
268
269
|
className: "min-w-0 flex-1 text-gray-600",
|
|
269
|
-
children: [/* @__PURE__ */
|
|
270
|
+
children: [/* @__PURE__ */ d("span", {
|
|
270
271
|
className: "break-words",
|
|
271
272
|
children: e.instance_label
|
|
272
|
-
}), e.quantity > 1 && /* @__PURE__ */
|
|
273
|
+
}), e.quantity > 1 && /* @__PURE__ */ f("span", {
|
|
273
274
|
className: "ml-1 text-gray-400",
|
|
274
275
|
children: ["×", e.quantity]
|
|
275
276
|
})]
|
|
276
|
-
}), /* @__PURE__ */
|
|
277
|
+
}), /* @__PURE__ */ d("span", {
|
|
277
278
|
className: "shrink-0 text-gray-900",
|
|
278
|
-
children: L(e.line_subtotal,
|
|
279
|
+
children: L(e.line_subtotal, s.currency)
|
|
279
280
|
})]
|
|
280
281
|
}, e.resource_instance)),
|
|
281
|
-
typeof
|
|
282
|
+
typeof s.discount == "number" && s.discount > 0 && /* @__PURE__ */ f("div", {
|
|
282
283
|
className: "flex items-center justify-between text-sm",
|
|
283
|
-
children: [/* @__PURE__ */
|
|
284
|
+
children: [/* @__PURE__ */ d("span", {
|
|
284
285
|
className: "text-gray-600",
|
|
285
286
|
children: "Discount"
|
|
286
|
-
}), /* @__PURE__ */
|
|
287
|
+
}), /* @__PURE__ */ f("span", {
|
|
287
288
|
className: "text-green-600",
|
|
288
|
-
children: ["-", L(
|
|
289
|
+
children: ["-", L(s.discount, s.currency)]
|
|
289
290
|
})]
|
|
290
291
|
}),
|
|
291
|
-
|
|
292
|
+
s.taxes && s.taxes.length > 0 && s.taxes.map((e) => /* @__PURE__ */ f("div", {
|
|
292
293
|
className: "flex items-center justify-between text-sm",
|
|
293
|
-
children: [/* @__PURE__ */
|
|
294
|
+
children: [/* @__PURE__ */ d("span", {
|
|
294
295
|
className: "text-gray-600",
|
|
295
296
|
children: e.label
|
|
296
|
-
}), /* @__PURE__ */
|
|
297
|
+
}), /* @__PURE__ */ d("span", {
|
|
297
298
|
className: "text-gray-900",
|
|
298
|
-
children: L(e.amount,
|
|
299
|
+
children: L(e.amount, s.currency)
|
|
299
300
|
})]
|
|
300
301
|
}, e.id))
|
|
301
302
|
]
|
|
302
|
-
}), /* @__PURE__ */
|
|
303
|
+
}), /* @__PURE__ */ f("div", {
|
|
303
304
|
className: "mt-3 flex items-center justify-between border-gray-100 border-t pt-3",
|
|
304
|
-
children: [/* @__PURE__ */
|
|
305
|
+
children: [/* @__PURE__ */ d("span", {
|
|
305
306
|
className: "font-medium text-gray-900",
|
|
306
307
|
children: "Total"
|
|
307
|
-
}), /* @__PURE__ */
|
|
308
|
+
}), /* @__PURE__ */ d("span", {
|
|
308
309
|
className: "font-bold text-gray-900 text-xl",
|
|
309
|
-
children: K ? "Free" : L(
|
|
310
|
+
children: K ? "Free" : L(s.total_amount, s.currency)
|
|
310
311
|
})]
|
|
311
312
|
})]
|
|
312
313
|
})]
|
|
313
314
|
}),
|
|
314
|
-
/* @__PURE__ */
|
|
315
|
+
/* @__PURE__ */ d(e, {
|
|
315
316
|
elementKey: "booking-pay-btn",
|
|
316
317
|
onClick: K ? () => {
|
|
317
|
-
|
|
318
|
+
k("confirmed"), H();
|
|
318
319
|
} : G,
|
|
319
320
|
className: "mx-auto w-full max-w-lg rounded-lg px-4 py-3.5 font-semibold",
|
|
320
|
-
children: /* @__PURE__ */
|
|
321
|
+
children: /* @__PURE__ */ d("span", {
|
|
321
322
|
className: "flex items-center justify-center gap-2",
|
|
322
|
-
children: K ? /* @__PURE__ */
|
|
323
|
+
children: K ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(h, { className: "size-5" }), /* @__PURE__ */ d("span", { children: "Confirm Booking" })] }) : /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(ee, { className: "size-5" }), /* @__PURE__ */ f("span", { children: ["Pay ", L(s.total_amount, s.currency)] })] })
|
|
323
324
|
})
|
|
324
325
|
}),
|
|
325
|
-
!K && /* @__PURE__ */
|
|
326
|
+
!K && /* @__PURE__ */ f("div", {
|
|
326
327
|
className: "mx-auto mt-4 flex w-full max-w-lg items-center justify-center gap-1.5 text-gray-400 text-xs",
|
|
327
|
-
children: [/* @__PURE__ */
|
|
328
|
+
children: [/* @__PURE__ */ d(_, { className: "size-3.5" }), /* @__PURE__ */ d("span", { children: "Secure payment" })]
|
|
328
329
|
})
|
|
329
330
|
]
|
|
330
331
|
})]
|
|
331
332
|
}),
|
|
332
|
-
|
|
333
|
+
O === "processing" && /* @__PURE__ */ f("div", {
|
|
333
334
|
className: "flex flex-col items-center justify-center px-6 py-16",
|
|
334
335
|
children: [
|
|
335
|
-
/* @__PURE__ */
|
|
336
|
+
/* @__PURE__ */ f("div", {
|
|
336
337
|
className: "relative mb-6",
|
|
337
|
-
children: [/* @__PURE__ */
|
|
338
|
+
children: [/* @__PURE__ */ d("div", { className: "absolute inset-0 animate-ping rounded-full bg-orange-200 opacity-75" }), /* @__PURE__ */ d("div", {
|
|
338
339
|
className: "relative flex size-16 items-center justify-center rounded-full bg-orange-100",
|
|
339
|
-
children: /* @__PURE__ */
|
|
340
|
+
children: /* @__PURE__ */ d(ne, { className: "size-8 animate-spin text-orange-500" })
|
|
340
341
|
})]
|
|
341
342
|
}),
|
|
342
|
-
/* @__PURE__ */
|
|
343
|
+
/* @__PURE__ */ d("h3", {
|
|
343
344
|
className: "mb-1 font-semibold text-gray-900 text-lg",
|
|
344
345
|
children: "Processing Payment"
|
|
345
346
|
}),
|
|
346
|
-
/* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ d("p", {
|
|
347
348
|
className: "text-center text-gray-500 text-sm",
|
|
348
349
|
children: "Please wait while we confirm your payment..."
|
|
349
350
|
}),
|
|
350
|
-
/* @__PURE__ */
|
|
351
|
+
/* @__PURE__ */ d("div", {
|
|
351
352
|
className: "mt-6 rounded-lg bg-gray-50 px-6 py-3",
|
|
352
|
-
children: /* @__PURE__ */
|
|
353
|
+
children: /* @__PURE__ */ f("p", {
|
|
353
354
|
className: "text-center text-gray-600 text-sm",
|
|
354
355
|
children: [
|
|
355
356
|
"Amount:",
|
|
356
357
|
" ",
|
|
357
|
-
/* @__PURE__ */
|
|
358
|
+
/* @__PURE__ */ d("span", {
|
|
358
359
|
className: "font-semibold text-gray-900",
|
|
359
|
-
children: L(
|
|
360
|
+
children: L(s.total_amount, s.currency)
|
|
360
361
|
})
|
|
361
362
|
]
|
|
362
363
|
})
|
|
363
364
|
})
|
|
364
365
|
]
|
|
365
366
|
}),
|
|
366
|
-
|
|
367
|
+
O === "failed" && /* @__PURE__ */ f("div", {
|
|
367
368
|
className: "flex flex-col",
|
|
368
|
-
children: [/* @__PURE__ */
|
|
369
|
+
children: [/* @__PURE__ */ d("div", {
|
|
369
370
|
className: "bg-gradient-to-br from-red-50 to-orange-50 px-6 py-6",
|
|
370
|
-
children: /* @__PURE__ */
|
|
371
|
+
children: /* @__PURE__ */ f("div", {
|
|
371
372
|
className: "flex flex-col items-center",
|
|
372
373
|
children: [
|
|
373
|
-
/* @__PURE__ */
|
|
374
|
+
/* @__PURE__ */ d("div", {
|
|
374
375
|
className: "mb-3 flex size-14 items-center justify-center rounded-full bg-red-100",
|
|
375
|
-
children: /* @__PURE__ */
|
|
376
|
+
children: /* @__PURE__ */ d(oe, { className: "size-8 text-red-500" })
|
|
376
377
|
}),
|
|
377
|
-
/* @__PURE__ */
|
|
378
|
+
/* @__PURE__ */ d("h3", {
|
|
378
379
|
className: "mb-1 font-semibold text-gray-900 text-lg",
|
|
379
380
|
children: "Payment Failed"
|
|
380
381
|
}),
|
|
381
|
-
/* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ d("p", {
|
|
382
383
|
className: "text-center text-gray-600 text-sm",
|
|
383
|
-
children:
|
|
384
|
+
children: A || "Something went wrong. Please try again."
|
|
384
385
|
})
|
|
385
386
|
]
|
|
386
387
|
})
|
|
387
|
-
}), /* @__PURE__ */
|
|
388
|
+
}), /* @__PURE__ */ f("div", {
|
|
388
389
|
className: "flex flex-col px-6 py-5 sm:px-8",
|
|
389
390
|
children: [
|
|
390
|
-
/* @__PURE__ */
|
|
391
|
+
/* @__PURE__ */ d("div", {
|
|
391
392
|
className: "mx-auto mb-4 w-full max-w-lg text-center",
|
|
392
|
-
children: /* @__PURE__ */
|
|
393
|
+
children: /* @__PURE__ */ d("h4", {
|
|
393
394
|
className: "font-semibold text-base text-gray-900",
|
|
394
395
|
children: X
|
|
395
396
|
})
|
|
396
397
|
}),
|
|
397
|
-
!Y && (Q || $) && /* @__PURE__ */
|
|
398
|
+
!Y && (Q || $) && /* @__PURE__ */ f("div", {
|
|
398
399
|
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",
|
|
399
|
-
children: [Q && /* @__PURE__ */
|
|
400
|
+
children: [Q && /* @__PURE__ */ f("div", {
|
|
400
401
|
className: "flex items-center gap-2 text-gray-600 text-sm",
|
|
401
|
-
children: [/* @__PURE__ */
|
|
402
|
-
}), Q && /* @__PURE__ */
|
|
402
|
+
children: [/* @__PURE__ */ d(m, { className: "size-4 text-gray-400" }), /* @__PURE__ */ d("span", { children: R(Q) })]
|
|
403
|
+
}), Q && /* @__PURE__ */ f("div", {
|
|
403
404
|
className: "flex items-center gap-2 text-gray-600 text-sm",
|
|
404
|
-
children: [/* @__PURE__ */
|
|
405
|
+
children: [/* @__PURE__ */ d(g, { className: "size-4 text-gray-400" }), /* @__PURE__ */ d("span", { children: z(Q) })]
|
|
405
406
|
})]
|
|
406
407
|
}),
|
|
407
|
-
U.length > 0 && /* @__PURE__ */
|
|
408
|
+
U.length > 0 && /* @__PURE__ */ d("div", {
|
|
408
409
|
className: "mx-auto mb-4 w-full max-w-lg rounded-lg border border-gray-100 bg-gray-50/50 p-3",
|
|
409
|
-
children: /* @__PURE__ */
|
|
410
|
+
children: /* @__PURE__ */ f("div", {
|
|
410
411
|
className: "space-y-1.5",
|
|
411
|
-
children: [U.slice(0, 3).map(([e, t]) => /* @__PURE__ */
|
|
412
|
+
children: [U.slice(0, 3).map(([e, t]) => /* @__PURE__ */ f("div", {
|
|
412
413
|
className: "flex items-center justify-between gap-3 text-sm",
|
|
413
|
-
children: [/* @__PURE__ */
|
|
414
|
+
children: [/* @__PURE__ */ d("span", {
|
|
414
415
|
className: "text-gray-500",
|
|
415
416
|
children: B(e)
|
|
416
|
-
}), Array.isArray(t) ? /* @__PURE__ */
|
|
417
|
+
}), Array.isArray(t) ? /* @__PURE__ */ d(y, {
|
|
417
418
|
items: t,
|
|
418
419
|
textSizeClass: "text-sm"
|
|
419
|
-
}) : /* @__PURE__ */
|
|
420
|
+
}) : /* @__PURE__ */ d("span", {
|
|
420
421
|
className: "max-w-[50%] truncate font-medium text-gray-900",
|
|
421
422
|
children: V(t)
|
|
422
423
|
})]
|
|
423
|
-
}, e)), U.length > 3 && /* @__PURE__ */
|
|
424
|
+
}, e)), U.length > 3 && /* @__PURE__ */ f("p", {
|
|
424
425
|
className: "pt-1 text-center text-gray-400 text-xs",
|
|
425
426
|
children: [
|
|
426
427
|
"+",
|
|
@@ -430,119 +431,119 @@ var b = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
430
431
|
})]
|
|
431
432
|
})
|
|
432
433
|
}),
|
|
433
|
-
/* @__PURE__ */
|
|
434
|
+
/* @__PURE__ */ d("div", {
|
|
434
435
|
className: "mx-auto mb-5 w-full max-w-lg rounded-lg border border-gray-200 bg-white p-4",
|
|
435
|
-
children: /* @__PURE__ */
|
|
436
|
+
children: /* @__PURE__ */ f("div", {
|
|
436
437
|
className: "flex items-center justify-between",
|
|
437
|
-
children: [/* @__PURE__ */
|
|
438
|
+
children: [/* @__PURE__ */ d("span", {
|
|
438
439
|
className: "font-medium text-gray-700",
|
|
439
440
|
children: "Amount to Pay"
|
|
440
|
-
}), /* @__PURE__ */
|
|
441
|
+
}), /* @__PURE__ */ d("span", {
|
|
441
442
|
className: "font-bold text-gray-900 text-xl",
|
|
442
|
-
children: L(
|
|
443
|
+
children: L(s.total_amount, s.currency)
|
|
443
444
|
})]
|
|
444
445
|
})
|
|
445
446
|
}),
|
|
446
|
-
/* @__PURE__ */
|
|
447
|
+
/* @__PURE__ */ d(e, {
|
|
447
448
|
elementKey: "booking-retry-btn",
|
|
448
449
|
onClick: () => {
|
|
449
450
|
j(null), G();
|
|
450
451
|
},
|
|
451
452
|
className: "mx-auto w-full max-w-lg rounded-lg px-4 py-3.5 font-semibold",
|
|
452
|
-
children: /* @__PURE__ */
|
|
453
|
+
children: /* @__PURE__ */ f("span", {
|
|
453
454
|
className: "flex items-center justify-center gap-2",
|
|
454
|
-
children: [/* @__PURE__ */
|
|
455
|
+
children: [/* @__PURE__ */ d(ie, { className: "size-5" }), /* @__PURE__ */ d("span", { children: "Try Again" })]
|
|
455
456
|
})
|
|
456
457
|
}),
|
|
457
|
-
/* @__PURE__ */
|
|
458
|
+
/* @__PURE__ */ f("div", {
|
|
458
459
|
className: "mx-auto mt-4 flex w-full max-w-lg items-center justify-center gap-1.5 text-gray-400 text-xs",
|
|
459
|
-
children: [/* @__PURE__ */
|
|
460
|
+
children: [/* @__PURE__ */ d(_, { className: "size-3.5" }), /* @__PURE__ */ f("span", { children: ["Secured by ", he === "stripe" ? "Stripe" : "Razorpay"] })]
|
|
460
461
|
}),
|
|
461
|
-
/* @__PURE__ */
|
|
462
|
+
/* @__PURE__ */ d("p", {
|
|
462
463
|
className: "mx-auto mt-3 w-full max-w-lg text-center text-gray-400 text-xs",
|
|
463
464
|
children: "If the problem persists, please contact support"
|
|
464
465
|
})
|
|
465
466
|
]
|
|
466
467
|
})]
|
|
467
468
|
}),
|
|
468
|
-
|
|
469
|
+
O === "confirmed" && /* @__PURE__ */ f("div", {
|
|
469
470
|
className: "flex flex-col",
|
|
470
|
-
children: [/* @__PURE__ */
|
|
471
|
+
children: [/* @__PURE__ */ d("div", {
|
|
471
472
|
className: "bg-gradient-to-br from-green-50 to-emerald-50 px-6 py-8",
|
|
472
|
-
children: /* @__PURE__ */
|
|
473
|
+
children: /* @__PURE__ */ f("div", {
|
|
473
474
|
className: "flex flex-col items-center",
|
|
474
475
|
children: [
|
|
475
|
-
/* @__PURE__ */
|
|
476
|
+
/* @__PURE__ */ f("div", {
|
|
476
477
|
className: "relative mb-4",
|
|
477
|
-
children: [/* @__PURE__ */
|
|
478
|
+
children: [/* @__PURE__ */ d("div", { className: "absolute -inset-2 animate-pulse rounded-full bg-green-200/50" }), /* @__PURE__ */ d("div", {
|
|
478
479
|
className: "relative flex size-16 items-center justify-center rounded-full bg-green-100 ring-4 ring-green-50",
|
|
479
|
-
children: /* @__PURE__ */
|
|
480
|
+
children: /* @__PURE__ */ d(h, { className: "size-9 text-green-600" })
|
|
480
481
|
})]
|
|
481
482
|
}),
|
|
482
|
-
/* @__PURE__ */
|
|
483
|
+
/* @__PURE__ */ d("h3", {
|
|
483
484
|
className: "mb-1 font-bold text-gray-900 text-xl",
|
|
484
485
|
children: K ? "Booking Confirmed!" : "Payment Successful!"
|
|
485
486
|
}),
|
|
486
|
-
/* @__PURE__ */
|
|
487
|
+
/* @__PURE__ */ d("p", {
|
|
487
488
|
className: "text-center text-gray-600 text-sm",
|
|
488
489
|
children: K ? "Your booking has been confirmed" : "Your payment has been processed successfully"
|
|
489
490
|
})
|
|
490
491
|
]
|
|
491
492
|
})
|
|
492
|
-
}), /* @__PURE__ */
|
|
493
|
+
}), /* @__PURE__ */ f("div", {
|
|
493
494
|
className: "px-6 py-5 sm:px-8",
|
|
494
495
|
children: [
|
|
495
|
-
/* @__PURE__ */
|
|
496
|
+
/* @__PURE__ */ f("div", {
|
|
496
497
|
className: "relative mx-auto max-w-lg overflow-hidden rounded-xl border border-gray-200 bg-white",
|
|
497
498
|
children: [
|
|
498
|
-
/* @__PURE__ */
|
|
499
|
-
/* @__PURE__ */
|
|
500
|
-
/* @__PURE__ */
|
|
499
|
+
/* @__PURE__ */ d("div", { className: "absolute top-1/2 -left-3 size-6 -translate-y-1/2 rounded-full bg-gray-100" }),
|
|
500
|
+
/* @__PURE__ */ d("div", { className: "absolute top-1/2 -right-3 size-6 -translate-y-1/2 rounded-full bg-gray-100" }),
|
|
501
|
+
/* @__PURE__ */ f("div", {
|
|
501
502
|
className: "px-5 py-4",
|
|
502
503
|
children: [
|
|
503
|
-
/* @__PURE__ */
|
|
504
|
+
/* @__PURE__ */ f("div", {
|
|
504
505
|
className: "mb-4 flex items-start gap-3",
|
|
505
|
-
children: [/* @__PURE__ */
|
|
506
|
+
children: [/* @__PURE__ */ d("div", {
|
|
506
507
|
className: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-orange-100",
|
|
507
|
-
children: /* @__PURE__ */
|
|
508
|
-
}), /* @__PURE__ */
|
|
508
|
+
children: /* @__PURE__ */ d(ae, { className: "size-5 text-orange-600" })
|
|
509
|
+
}), /* @__PURE__ */ d("div", {
|
|
509
510
|
className: "min-w-0 flex-1",
|
|
510
|
-
children: /* @__PURE__ */
|
|
511
|
+
children: /* @__PURE__ */ d("p", {
|
|
511
512
|
className: "font-semibold text-gray-900 leading-tight",
|
|
512
513
|
children: X
|
|
513
514
|
})
|
|
514
515
|
})]
|
|
515
516
|
}),
|
|
516
|
-
|
|
517
|
+
s.qr_image?.location && /* @__PURE__ */ d("div", {
|
|
517
518
|
className: "mb-4 flex flex-col items-center",
|
|
518
|
-
children: /* @__PURE__ */
|
|
519
|
+
children: /* @__PURE__ */ d("div", {
|
|
519
520
|
className: "rounded-lg border border-gray-200 bg-white p-2",
|
|
520
|
-
children: /* @__PURE__ */
|
|
521
|
-
src:
|
|
521
|
+
children: /* @__PURE__ */ d("img", {
|
|
522
|
+
src: s.qr_image.location,
|
|
522
523
|
alt: "Booking QR Code",
|
|
523
524
|
className: "size-24"
|
|
524
525
|
})
|
|
525
526
|
})
|
|
526
527
|
}),
|
|
527
|
-
/* @__PURE__ */
|
|
528
|
+
/* @__PURE__ */ f("div", {
|
|
528
529
|
className: "mb-4 flex items-center justify-between rounded-lg bg-gray-50 px-3 py-2.5",
|
|
529
|
-
children: [/* @__PURE__ */
|
|
530
|
+
children: [/* @__PURE__ */ d("span", {
|
|
530
531
|
className: "font-medium text-gray-500 text-xs uppercase tracking-wide",
|
|
531
532
|
children: "Booking ID"
|
|
532
|
-
}), /* @__PURE__ */
|
|
533
|
+
}), /* @__PURE__ */ d("span", {
|
|
533
534
|
className: "font-mono font-semibold text-gray-900 text-sm",
|
|
534
|
-
children:
|
|
535
|
+
children: s._id
|
|
535
536
|
})]
|
|
536
537
|
}),
|
|
537
|
-
/* @__PURE__ */
|
|
538
|
-
/* @__PURE__ */
|
|
538
|
+
/* @__PURE__ */ d("div", { className: "my-4 border-gray-200 border-t border-dashed" }),
|
|
539
|
+
/* @__PURE__ */ f("div", {
|
|
539
540
|
className: "space-y-2.5",
|
|
540
|
-
children: [!Y && Q && /* @__PURE__ */
|
|
541
|
+
children: [!Y && Q && /* @__PURE__ */ f("div", {
|
|
541
542
|
className: "flex items-center justify-between",
|
|
542
|
-
children: [/* @__PURE__ */
|
|
543
|
+
children: [/* @__PURE__ */ f("div", {
|
|
543
544
|
className: "flex items-center gap-2 text-gray-500 text-sm",
|
|
544
|
-
children: [/* @__PURE__ */
|
|
545
|
-
}), /* @__PURE__ */
|
|
545
|
+
children: [/* @__PURE__ */ d(m, { className: "size-4" }), /* @__PURE__ */ d("span", { children: "Date & Time" })]
|
|
546
|
+
}), /* @__PURE__ */ f("p", {
|
|
546
547
|
className: "font-medium text-gray-900 text-sm",
|
|
547
548
|
children: [
|
|
548
549
|
R(Q),
|
|
@@ -550,55 +551,55 @@ var b = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
550
551
|
z(Q)
|
|
551
552
|
]
|
|
552
553
|
})]
|
|
553
|
-
}), U.slice(0, 3).map(([e, t]) => /* @__PURE__ */
|
|
554
|
+
}), U.slice(0, 3).map(([e, t]) => /* @__PURE__ */ f("div", {
|
|
554
555
|
className: "flex items-center justify-between",
|
|
555
|
-
children: [/* @__PURE__ */
|
|
556
|
+
children: [/* @__PURE__ */ d("span", {
|
|
556
557
|
className: "text-gray-500 text-sm",
|
|
557
558
|
children: B(e)
|
|
558
|
-
}), Array.isArray(t) ? /* @__PURE__ */
|
|
559
|
+
}), Array.isArray(t) ? /* @__PURE__ */ d(y, {
|
|
559
560
|
items: t,
|
|
560
561
|
textSizeClass: "text-sm"
|
|
561
|
-
}) : /* @__PURE__ */
|
|
562
|
+
}) : /* @__PURE__ */ d("span", {
|
|
562
563
|
className: "max-w-[50%] truncate font-medium text-gray-900 text-sm",
|
|
563
564
|
children: V(t)
|
|
564
565
|
})]
|
|
565
566
|
}, e))]
|
|
566
567
|
}),
|
|
567
|
-
/* @__PURE__ */
|
|
568
|
-
/* @__PURE__ */
|
|
568
|
+
/* @__PURE__ */ d("div", { className: "my-4 border-gray-200 border-t border-dashed" }),
|
|
569
|
+
/* @__PURE__ */ f("div", {
|
|
569
570
|
className: "flex items-center justify-between",
|
|
570
|
-
children: [/* @__PURE__ */
|
|
571
|
+
children: [/* @__PURE__ */ d("span", {
|
|
571
572
|
className: "font-medium text-gray-700",
|
|
572
573
|
children: K ? "Total" : "Amount Paid"
|
|
573
|
-
}), /* @__PURE__ */
|
|
574
|
+
}), /* @__PURE__ */ d("span", {
|
|
574
575
|
className: "font-bold text-gray-900 text-lg",
|
|
575
|
-
children: K ? "Free" : L(
|
|
576
|
+
children: K ? "Free" : L(s.total_amount, s.currency)
|
|
576
577
|
})]
|
|
577
578
|
}),
|
|
578
579
|
(() => {
|
|
579
|
-
let e = me?.invoice?.location ||
|
|
580
|
-
return e ? /* @__PURE__ */
|
|
580
|
+
let e = me?.invoice?.location || s.invoice?.location;
|
|
581
|
+
return e ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { className: "my-4 border-gray-200 border-t border-dashed" }), /* @__PURE__ */ f("a", {
|
|
581
582
|
href: e,
|
|
582
583
|
target: "_blank",
|
|
583
584
|
rel: "noopener noreferrer",
|
|
584
585
|
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",
|
|
585
|
-
children: [/* @__PURE__ */
|
|
586
|
+
children: [/* @__PURE__ */ d(te, { className: "size-4" }), "Download Invoice"]
|
|
586
587
|
})] }) : null;
|
|
587
588
|
})()
|
|
588
589
|
]
|
|
589
590
|
})
|
|
590
591
|
]
|
|
591
592
|
}),
|
|
592
|
-
|
|
593
|
+
S && /* @__PURE__ */ d("div", {
|
|
593
594
|
className: "mx-auto mt-5 max-w-lg",
|
|
594
|
-
children: /* @__PURE__ */
|
|
595
|
+
children: /* @__PURE__ */ d(e, {
|
|
595
596
|
elementKey: "booking-done-btn",
|
|
596
|
-
onClick:
|
|
597
|
+
onClick: S,
|
|
597
598
|
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",
|
|
598
599
|
children: "Done"
|
|
599
600
|
})
|
|
600
601
|
}),
|
|
601
|
-
/* @__PURE__ */
|
|
602
|
+
/* @__PURE__ */ d("p", {
|
|
602
603
|
className: "mt-4 text-center text-gray-400 text-xs",
|
|
603
604
|
children: "A confirmation has been sent to your email"
|
|
604
605
|
})
|
|
@@ -607,30 +608,30 @@ var b = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
607
608
|
})
|
|
608
609
|
]
|
|
609
610
|
}),
|
|
610
|
-
pe &&
|
|
611
|
+
pe && x && /* @__PURE__ */ d("div", {
|
|
611
612
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
|
|
612
|
-
children: /* @__PURE__ */
|
|
613
|
+
children: /* @__PURE__ */ d("div", {
|
|
613
614
|
className: "max-h-[90vh] w-full max-w-lg overflow-auto rounded-xl bg-white shadow-xl",
|
|
614
|
-
children: /* @__PURE__ */
|
|
615
|
+
children: /* @__PURE__ */ d(i, {
|
|
615
616
|
isEdit: !0,
|
|
616
|
-
prefillData:
|
|
617
|
+
prefillData: b || s.billing_details,
|
|
617
618
|
onSubmit: (e) => {
|
|
618
|
-
|
|
619
|
+
x(e), M(!1);
|
|
619
620
|
},
|
|
620
621
|
onClose: () => M(!1)
|
|
621
622
|
})
|
|
622
623
|
})
|
|
623
624
|
}),
|
|
624
|
-
|
|
625
|
-
isOpen:
|
|
625
|
+
E && T && /* @__PURE__ */ d(r, {
|
|
626
|
+
isOpen: E,
|
|
626
627
|
onClose: () => {
|
|
627
|
-
|
|
628
|
+
D(), k("summary");
|
|
628
629
|
},
|
|
629
|
-
stripePromise:
|
|
630
|
-
clientSecret:
|
|
630
|
+
stripePromise: ue,
|
|
631
|
+
clientSecret: T.clientSecret,
|
|
631
632
|
onComplete: W
|
|
632
633
|
})
|
|
633
634
|
] });
|
|
634
635
|
};
|
|
635
636
|
//#endregion
|
|
636
|
-
export {
|
|
637
|
+
export { b as BookingCard };
|