@levo-so/studio 0.1.101 → 0.1.103
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/{AuthProvider-56TywIOB.js → AuthProvider-C6bvedwF.js} +16 -16
- package/Beams-DboMUgCv.js +102 -0
- package/{BillingStep-Brc1Mzo3.js → BillingStep-BA3H9BVu.js} +1 -1
- package/{Button-XTKnNIl9.js → Button-CZycqusY.js} +249 -138
- package/Button-lUfKisu8.js +116 -0
- package/CollectionField-xa-jed3_.js +232 -0
- package/CollectionInput-CpNGIXJx.js +147 -0
- package/DateTimeWidget-DP_nMhqe.js +256 -0
- package/Dialog-IrII0ugb.js +130 -0
- package/Dots-a8xSboDv.js +100 -0
- package/{EntryCard-DTcx6wfA.js → EntryCard-CQpKNX7G.js} +4 -4
- package/Grid-BJQvxnks.js +99 -0
- package/{LoginCard-CnHmCKUF.js → LoginCard-Cyvm-y_q.js} +3 -3
- package/{LoginForm-Ck-xFaDg.js → LoginForm-_44FtvWg.js} +207 -206
- package/{LoginModal-BdYM8INu.js → LoginModal-Cyw_XKvz.js} +4 -4
- package/{MessageCard-ChDBqLVG.js → MessageCard-C2lNTxFx.js} +2 -2
- package/{MessageFooter-AzAtJWMo.js → MessageFooter-59Pziq3i.js} +2 -2
- package/{ModalManager-SggxCIno.js → ModalManager-DHkd0Zdb.js} +1 -1
- package/{PendingApprovalCard-C6ORDqrY.js → PendingApprovalCard-C8iZjo06.js} +3 -3
- package/PhoneWidget-CxxxDXkz.js +100 -0
- package/{Popover-BdKCElnb.js → Popover-DOvRAGzc.js} +19 -20
- package/PopupRenderer-C7OHYphU-Ct5T6tWM.js +2668 -0
- package/RichTextWidget-BqlcssWt.js +113 -0
- package/RteThemeProvider-Cfepkyer.js +20 -0
- package/{StripePaymentModal-BHIBBvRj.js → StripePaymentModal-DrLMN18M.js} +17 -17
- package/Toolbar-BwxoYWO_.js +738 -0
- package/Tooltip-NEMQqPyr.js +67 -0
- package/VerifyButton-TNkt-SDu.js +177 -0
- package/authentication-hnV1BI8s.js +36 -0
- package/bookingCard-BDyuBC6X.js +636 -0
- package/collection.d.ts +83 -0
- package/collection.js +9 -8
- package/{dialog-Dw6n_36P.js → dialog-C8-iHixJ.js} +32 -32
- package/dist-CG-pwDW0.js +3188 -0
- package/generateRadiusScale-BpcgkGtN.js +71 -0
- package/getFieldValidations-CSkSV2hW.js +90 -0
- package/index.d.ts +96 -9
- package/index.js +6021 -7731
- package/inlineRteTheme-Ajq9PNpQ.js +9 -0
- package/{nodeAlignment-BZbdafVA.js → nodeAlignment-DKCIjzlR.js} +41 -62
- package/package.json +38 -40
- package/studio.css +1 -1
- package/useLogin-B2qE8710.js +127 -0
- package/{utils-kDaDLLGt.js → utils-CZLafTgN.js} +1 -1
- package/{widgets-CWDiqXm9.js → widgets-eu5zXTf-.js} +58 -125
- package/Beams-B0O3uyYF.js +0 -118
- package/CollectionInput-cmJ0RXzG.js +0 -132
- package/DateTimeWidget-B5lBr0_R.js +0 -255
- package/Dots-DjezbpLp.js +0 -137
- package/Grid-C9aUfXM-.js +0 -145
- package/Input-Btdc1Dee.js +0 -293
- package/PhoneWidget-BRIAve47.js +0 -100
- package/RichTextWidget-CjEoGecM.js +0 -1136
- package/Tooltip-BOq5vSOW.js +0 -68
- package/VerifyButton-Bl2QqMpB.js +0 -273
- package/bookingCard-D3ZSjq-P.js +0 -577
- package/dist-DuTd566a.js +0 -3112
- package/getFieldValidations-DZnDgNI0.js +0 -159
- /package/{Gradient-B1K9Yi04.js → Gradient-NacpoDCM.js} +0 -0
- /package/{Waves-BkaAfGqA.js → Waves-DUuT_IFr.js} +0 -0
- /package/{card-BQr9258p.js → card-E2LKF9nT.js} +0 -0
- /package/{theme.cssm-2YTdd8Yh.js → theme.cssm-BXDp-ojp.js} +0 -0
|
@@ -1,29 +1,104 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { cn as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
2
|
+
import "./Dialog-IrII0ugb.js";
|
|
3
|
+
import { a as e, c as t, h as n, l as r, n as i, o as a, r as o } from "./PopupRenderer-C7OHYphU-Ct5T6tWM.js";
|
|
4
|
+
import { n as s } from "./AuthProvider-C6bvedwF.js";
|
|
5
|
+
import { n as c } from "./ModalManager-DHkd0Zdb.js";
|
|
6
|
+
import { c as l } from "react/compiler-runtime";
|
|
7
|
+
import { $isIdentityContextReady as u } from "@levo-so/insights/stores";
|
|
8
|
+
import { cn as d, useLevo as f } from "@levo-so/react";
|
|
9
|
+
import * as p from "react";
|
|
10
|
+
import { Suspense as m, createContext as h, forwardRef as g, lazy as _, memo as v, useContext as ee, useEffect as y, useMemo as b, useRef as x, useState as S } from "react";
|
|
11
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
12
|
+
import "clsx";
|
|
13
|
+
import "@tabler/icons-react";
|
|
14
|
+
import { useStore as E } from "@nanostores/react";
|
|
15
|
+
import { animate as te, scroll as ne } from "motion/react";
|
|
16
|
+
import { LoaderCircle as D } from "lucide-react";
|
|
17
|
+
import * as O from "motion/react-m";
|
|
18
|
+
import re from "next/link";
|
|
19
|
+
//#region ../../libraries/popups/dist/index.js
|
|
20
|
+
var ie = async (e, t) => {
|
|
21
|
+
let n = {};
|
|
22
|
+
return t?.site_id && (n.site_id = t.site_id), t?.locale && (n.locale = t.locale), t?.country && (n.country = t.country), (await e.url("/v1/studio/popup/list-active").query(n).get().json())?.content?.data ?? [];
|
|
23
|
+
}, ae = _(() => import("./PopupRenderer-C7OHYphU-Ct5T6tWM.js").then((e) => e.s).then((e) => e.t).then((e) => ({ default: e.PopupRenderer }))), k = (e) => {
|
|
24
|
+
let t = l(9), { siteId: r, pageId: i } = e, { fetch: a, logger: o } = f(), [s, c] = S(null), d = x(!1), p, h;
|
|
25
|
+
if (t[0] !== a || t[1] !== o || t[2] !== r ? (p = () => {
|
|
26
|
+
if (d.current) return;
|
|
27
|
+
let e = () => {
|
|
28
|
+
d.current || (d.current = !0, ie(a, r ? { site_id: r } : void 0).then((e) => {
|
|
29
|
+
n(e), c(e);
|
|
30
|
+
}).catch((e) => {
|
|
31
|
+
o?.error("Failed to fetch popups", { exception: e }), n([]), c([]);
|
|
32
|
+
}).finally(A));
|
|
33
|
+
};
|
|
34
|
+
if (u.get()) {
|
|
35
|
+
e();
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
let t = u.listen((n) => {
|
|
39
|
+
n && (t(), e());
|
|
40
|
+
});
|
|
41
|
+
return () => t();
|
|
42
|
+
}, h = [
|
|
43
|
+
a,
|
|
44
|
+
o,
|
|
45
|
+
r
|
|
46
|
+
], t[0] = a, t[1] = o, t[2] = r, t[3] = p, t[4] = h) : (p = t[3], h = t[4]), y(p, h), !s || s.length === 0) return null;
|
|
47
|
+
let g;
|
|
48
|
+
t[5] === Symbol.for("react.memo_cache_sentinel") ? (g = {
|
|
49
|
+
position: "relative",
|
|
50
|
+
zIndex: 99999
|
|
51
|
+
}, t[5] = g) : g = t[5];
|
|
52
|
+
let _;
|
|
53
|
+
return t[6] !== i || t[7] !== s ? (_ = /* @__PURE__ */ w("div", {
|
|
54
|
+
style: g,
|
|
55
|
+
children: /* @__PURE__ */ w(m, { children: /* @__PURE__ */ w(ae, {
|
|
56
|
+
popups: s,
|
|
57
|
+
pageId: i
|
|
58
|
+
}) })
|
|
59
|
+
}), t[6] = i, t[7] = s, t[8] = _) : _ = t[8], _;
|
|
60
|
+
};
|
|
61
|
+
function A() {
|
|
62
|
+
return r(!1);
|
|
63
|
+
}
|
|
64
|
+
var j = () => {
|
|
65
|
+
let e = l(3), n = E(t), r = E(o), i = M, a = N, s;
|
|
66
|
+
return e[0] !== r || e[1] !== n ? (s = {
|
|
67
|
+
popups: n,
|
|
68
|
+
isLoading: r,
|
|
69
|
+
openPopup: i,
|
|
70
|
+
closePopup: a
|
|
71
|
+
}, e[0] = r, e[1] = n, e[2] = s) : s = e[2], s;
|
|
72
|
+
};
|
|
73
|
+
function M(e) {
|
|
74
|
+
let n = t.get().find((t) => t.id === e);
|
|
75
|
+
n && a(n, {
|
|
76
|
+
force: !0,
|
|
77
|
+
trigger_type: "manual"
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
function N() {
|
|
81
|
+
let t = i.get().active_popup_id;
|
|
82
|
+
t && e(t);
|
|
83
|
+
}
|
|
84
|
+
//#endregion
|
|
11
85
|
//#region src/providers/BlockContext.tsx
|
|
12
|
-
var
|
|
86
|
+
var P = h({
|
|
13
87
|
isStudio: !1,
|
|
14
88
|
renderMode: "live",
|
|
15
89
|
workspace_id: "",
|
|
16
90
|
pageSource: []
|
|
17
|
-
}),
|
|
18
|
-
let [n, r] =
|
|
19
|
-
|
|
91
|
+
}), oe = ({ children: e, value: t }) => {
|
|
92
|
+
let [n, r] = S(t.parsedBlockData);
|
|
93
|
+
y(() => {
|
|
20
94
|
r((e) => t.parsedBlockData === e ? e : t.parsedBlockData);
|
|
21
95
|
}, [t.parsedBlockData]);
|
|
22
|
-
let i =
|
|
96
|
+
let i = b(() => ({
|
|
23
97
|
parsedBlockData: n,
|
|
24
98
|
setParsedBlockData: r,
|
|
25
99
|
blockData: t.blockData,
|
|
26
100
|
pageContext: t.pageContext,
|
|
101
|
+
pageMeta: t.pageMeta,
|
|
27
102
|
blockContext: t.blockContext,
|
|
28
103
|
isStudio: t.renderMode?.startsWith("studio.") ?? !1,
|
|
29
104
|
renderMode: t.renderMode,
|
|
@@ -34,16 +109,17 @@ var y = r({
|
|
|
34
109
|
r,
|
|
35
110
|
t.blockData,
|
|
36
111
|
t.pageContext,
|
|
112
|
+
t.pageMeta,
|
|
37
113
|
t.blockContext,
|
|
38
114
|
t.renderMode,
|
|
39
115
|
t.workspace_id,
|
|
40
116
|
t.pageSource
|
|
41
117
|
]);
|
|
42
|
-
return /* @__PURE__ */
|
|
118
|
+
return /* @__PURE__ */ w(P.Provider, {
|
|
43
119
|
value: i,
|
|
44
120
|
children: e
|
|
45
121
|
});
|
|
46
|
-
},
|
|
122
|
+
}, F = () => ee(P), I = {
|
|
47
123
|
opacity: 1,
|
|
48
124
|
scale: 1,
|
|
49
125
|
rotate: 0,
|
|
@@ -53,7 +129,7 @@ var y = r({
|
|
|
53
129
|
y: 0,
|
|
54
130
|
skewX: 0,
|
|
55
131
|
skewY: 0
|
|
56
|
-
},
|
|
132
|
+
}, L = {
|
|
57
133
|
opacity: 0,
|
|
58
134
|
scale: 1,
|
|
59
135
|
rotate: 0,
|
|
@@ -63,25 +139,25 @@ var y = r({
|
|
|
63
139
|
y: 0,
|
|
64
140
|
skewX: 0,
|
|
65
141
|
skewY: 0
|
|
66
|
-
},
|
|
142
|
+
}, R = {
|
|
67
143
|
type: "spring",
|
|
68
144
|
duration: .5,
|
|
69
145
|
delay: 0,
|
|
70
146
|
bounce: .25,
|
|
71
147
|
ease: "easeOut"
|
|
72
|
-
},
|
|
148
|
+
}, se = {
|
|
73
149
|
once: !0,
|
|
74
150
|
amount: "some",
|
|
75
151
|
margin: "0px 0px -150px 0px"
|
|
76
|
-
},
|
|
152
|
+
}, z = (e, t) => {
|
|
77
153
|
if (!(!e || !t)) for (let n of e) {
|
|
78
154
|
if (n.key === t) return n;
|
|
79
155
|
if (n.fields?.length) {
|
|
80
|
-
let e =
|
|
156
|
+
let e = z(n.fields, t);
|
|
81
157
|
if (e) return e;
|
|
82
158
|
}
|
|
83
159
|
}
|
|
84
|
-
},
|
|
160
|
+
}, B = (e, t) => {
|
|
85
161
|
if (!(!e || !t)) return t.split(".").reduce((e, t) => {
|
|
86
162
|
if (e == null) return;
|
|
87
163
|
let n = /^\d+$/.test(t), r = e;
|
|
@@ -91,7 +167,7 @@ var y = r({
|
|
|
91
167
|
}
|
|
92
168
|
return r?.[t];
|
|
93
169
|
}, e);
|
|
94
|
-
},
|
|
170
|
+
}, V = (e) => !!e && typeof e == "object" && "selectedVariants" in e, H = (e) => e?.replaceAll(".", "-").replace(/[^a-zA-Z0-9_-]/g, ""), U = (e) => {
|
|
95
171
|
let t = e.split(".");
|
|
96
172
|
for (let e = t.length - 2; e >= 1; e--) if (t[e] && /^\d+$/.test(t[e])) {
|
|
97
173
|
let n = t[e - 1], r = parseInt(t[e], 10), i = t.slice(e + 1).join("."), a = [];
|
|
@@ -113,15 +189,15 @@ var y = r({
|
|
|
113
189
|
};
|
|
114
190
|
}
|
|
115
191
|
return { isGroupItem: !1 };
|
|
116
|
-
},
|
|
192
|
+
}, W = (e) => {
|
|
117
193
|
let t = [];
|
|
118
|
-
return
|
|
194
|
+
return V(e) && Object.entries(e.selectedVariants).forEach(([e, n]) => {
|
|
119
195
|
typeof n == "string" && t.push(`levo-variant-${e}-${n}`);
|
|
120
196
|
}), t;
|
|
121
|
-
},
|
|
122
|
-
let r =
|
|
197
|
+
}, G = (e, t, n) => b(() => {
|
|
198
|
+
let r = W(n), i = `levo-${t}-${H(e)}`, a = U(e);
|
|
123
199
|
return a.isGroupItem && a.sharedPath ? [
|
|
124
|
-
`levo-${t}-${
|
|
200
|
+
`levo-${t}-${H(a.sharedPath)}`,
|
|
125
201
|
i,
|
|
126
202
|
...r
|
|
127
203
|
].filter(Boolean).join(" ") : [i, ...r].join(" ");
|
|
@@ -129,7 +205,7 @@ var y = r({
|
|
|
129
205
|
n?.selectedVariants,
|
|
130
206
|
e,
|
|
131
207
|
t
|
|
132
|
-
]),
|
|
208
|
+
]), K = (e, t, n, r, i, a) => b(() => {
|
|
133
209
|
let { className: o, style: s, config: c, styles: l, content: u, ...d } = e;
|
|
134
210
|
return {
|
|
135
211
|
...d,
|
|
@@ -154,7 +230,7 @@ var y = r({
|
|
|
154
230
|
r,
|
|
155
231
|
i,
|
|
156
232
|
a
|
|
157
|
-
]),
|
|
233
|
+
]), ce = {
|
|
158
234
|
id: "7074716021398640563",
|
|
159
235
|
workspace_id: "WZZKMUBH",
|
|
160
236
|
name: "Booster Applications",
|
|
@@ -863,7 +939,13 @@ var y = r({
|
|
|
863
939
|
}
|
|
864
940
|
]
|
|
865
941
|
}]
|
|
866
|
-
},
|
|
942
|
+
}, q = ({ children: e, ...t }) => {
|
|
943
|
+
let { isStudio: n } = F();
|
|
944
|
+
return n ? e : /* @__PURE__ */ w(re, {
|
|
945
|
+
...t,
|
|
946
|
+
children: e
|
|
947
|
+
});
|
|
948
|
+
}, le = (e) => {
|
|
867
949
|
if (e?.action) switch (e.action.type) {
|
|
868
950
|
case "external_link": {
|
|
869
951
|
let t = e.action.value;
|
|
@@ -874,46 +956,65 @@ var y = r({
|
|
|
874
956
|
case "phone": return `tel:${e.action.value}`;
|
|
875
957
|
default: return;
|
|
876
958
|
}
|
|
877
|
-
},
|
|
878
|
-
let { openModal:
|
|
879
|
-
if (
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
children: n
|
|
883
|
-
}) : /* @__PURE__ */ m("div", {
|
|
884
|
-
style: { display: "contents" },
|
|
885
|
-
onClick: () => {
|
|
886
|
-
i("login", { redirect_uri: r?.action?.value });
|
|
887
|
-
},
|
|
888
|
-
children: n
|
|
889
|
-
});
|
|
890
|
-
let o = F(r), s = r?.action?.options?.openInNewTab ? "_blank" : void 0;
|
|
891
|
-
if (o) {
|
|
892
|
-
let e = {
|
|
893
|
-
href: o,
|
|
894
|
-
...s && {
|
|
895
|
-
target: s,
|
|
896
|
-
rel: "noopener noreferrer"
|
|
897
|
-
}
|
|
959
|
+
}, J = ({ children: e, config: t }) => {
|
|
960
|
+
let { openModal: n } = c(), { isLoggedIn: r } = s(), { openPopup: i } = j(), a = t?.action?.alt;
|
|
961
|
+
if (t?.action?.type === "popup") {
|
|
962
|
+
let n = t.action.value, r = () => {
|
|
963
|
+
n && i(n);
|
|
898
964
|
};
|
|
899
|
-
return /* @__PURE__ */
|
|
900
|
-
style: {
|
|
901
|
-
|
|
902
|
-
|
|
965
|
+
return /* @__PURE__ */ w("div", {
|
|
966
|
+
style: { display: "contents" },
|
|
967
|
+
role: "button",
|
|
968
|
+
tabIndex: 0,
|
|
969
|
+
"aria-label": a || void 0,
|
|
970
|
+
onClick: r,
|
|
971
|
+
onKeyDown: (e) => {
|
|
972
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), r());
|
|
903
973
|
},
|
|
904
|
-
|
|
905
|
-
children: n
|
|
974
|
+
children: e
|
|
906
975
|
});
|
|
907
976
|
}
|
|
908
|
-
|
|
909
|
-
|
|
977
|
+
if (t?.action?.type === "login") {
|
|
978
|
+
if (r) return /* @__PURE__ */ w(q, {
|
|
979
|
+
href: t?.action?.value || "",
|
|
980
|
+
style: { display: "contents" },
|
|
981
|
+
"aria-label": a || void 0,
|
|
982
|
+
children: e
|
|
983
|
+
});
|
|
984
|
+
let i = () => {
|
|
985
|
+
n("login", { redirect_uri: t?.action?.value });
|
|
986
|
+
};
|
|
987
|
+
return /* @__PURE__ */ w("div", {
|
|
988
|
+
style: { display: "contents" },
|
|
989
|
+
role: "button",
|
|
990
|
+
tabIndex: 0,
|
|
991
|
+
"aria-label": a || void 0,
|
|
992
|
+
onClick: i,
|
|
993
|
+
onKeyDown: (e) => {
|
|
994
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), i());
|
|
995
|
+
},
|
|
996
|
+
children: e
|
|
997
|
+
});
|
|
998
|
+
}
|
|
999
|
+
let o = le(t), l = t?.action?.options?.openInNewTab ? "_blank" : void 0;
|
|
1000
|
+
return o ? /* @__PURE__ */ w(q, {
|
|
1001
|
+
href: o,
|
|
1002
|
+
style: { display: "contents" },
|
|
1003
|
+
...l && {
|
|
1004
|
+
target: l,
|
|
1005
|
+
rel: "noopener noreferrer"
|
|
1006
|
+
},
|
|
1007
|
+
...a && { "aria-label": a },
|
|
1008
|
+
children: e
|
|
1009
|
+
}) : e;
|
|
1010
|
+
}, Y = {
|
|
910
1011
|
once: !0,
|
|
911
1012
|
margin: "0px 0px -150px 0px"
|
|
912
|
-
},
|
|
913
|
-
let
|
|
914
|
-
if (
|
|
1013
|
+
}, ue = ({ children: e, MotionComponent: t, motionProps: n, scroll: r, entry: i, whileHover: a, exit: o }) => {
|
|
1014
|
+
let s = x(null);
|
|
1015
|
+
if (y(() => {
|
|
915
1016
|
if (!r) return;
|
|
916
|
-
let e =
|
|
1017
|
+
let e = s.current;
|
|
917
1018
|
if (!e || !(e instanceof Element)) return;
|
|
918
1019
|
let { from: t, to: n, offset: i } = r, a = {}, o = Array.from(new Set([...Object.keys(t), ...Object.keys(n)]));
|
|
919
1020
|
for (let e of o) {
|
|
@@ -921,9 +1022,9 @@ var y = r({
|
|
|
921
1022
|
r !== i && typeof r == "number" && typeof i == "number" && (a[e] = [r, i]);
|
|
922
1023
|
}
|
|
923
1024
|
if (Object.keys(a).length === 0) return;
|
|
924
|
-
let
|
|
1025
|
+
let c = te(e, a, { ease: "linear" });
|
|
925
1026
|
try {
|
|
926
|
-
return
|
|
1027
|
+
return ne(c, {
|
|
927
1028
|
target: e,
|
|
928
1029
|
offset: [i.start, i.end]
|
|
929
1030
|
});
|
|
@@ -937,8 +1038,8 @@ var y = r({
|
|
|
937
1038
|
}, [r]), r) {
|
|
938
1039
|
let i = {};
|
|
939
1040
|
for (let [e, t] of Object.entries(r.from)) t !== void 0 && (i[e] = t);
|
|
940
|
-
return /* @__PURE__ */
|
|
941
|
-
ref:
|
|
1041
|
+
return /* @__PURE__ */ w(t, {
|
|
1042
|
+
ref: s,
|
|
942
1043
|
...n,
|
|
943
1044
|
style: {
|
|
944
1045
|
...n.style || {},
|
|
@@ -949,154 +1050,164 @@ var y = r({
|
|
|
949
1050
|
children: e
|
|
950
1051
|
});
|
|
951
1052
|
}
|
|
952
|
-
let
|
|
953
|
-
...
|
|
1053
|
+
let c = i ? {
|
|
1054
|
+
...I,
|
|
954
1055
|
...i.to,
|
|
955
1056
|
transition: i.transition
|
|
956
|
-
} : void 0,
|
|
957
|
-
once: i.viewport?.once ??
|
|
1057
|
+
} : void 0, l = i ? {
|
|
1058
|
+
once: i.viewport?.once ?? Y.once,
|
|
958
1059
|
amount: i.viewport?.amount,
|
|
959
|
-
margin: i.viewport?.margin ??
|
|
1060
|
+
margin: i.viewport?.margin ?? Y.margin
|
|
960
1061
|
} : void 0;
|
|
961
|
-
return /* @__PURE__ */
|
|
1062
|
+
return /* @__PURE__ */ w(t, {
|
|
962
1063
|
...n,
|
|
963
1064
|
initial: i?.from,
|
|
964
|
-
whileInView:
|
|
965
|
-
viewport:
|
|
1065
|
+
whileInView: c,
|
|
1066
|
+
viewport: l,
|
|
966
1067
|
whileHover: a,
|
|
967
1068
|
exit: o,
|
|
968
1069
|
children: e
|
|
969
1070
|
});
|
|
970
|
-
},
|
|
971
|
-
let t =
|
|
972
|
-
let { parsedBlockData: a, renderMode: o } =
|
|
1071
|
+
}, X = (e) => {
|
|
1072
|
+
let t = O.create(e), n = ({ elementKey: n, children: r, ...i }) => {
|
|
1073
|
+
let { parsedBlockData: a, renderMode: o } = F(), { config: s, styles: c, content: l, id: u } = a || {}, d = s ? B(s, n) : void 0, f = c ? B(c, n) : void 0, p = l ? B(l, n) : void 0, m = b(() => {
|
|
1074
|
+
let e = d || {}, t = i.config || {}, n = e.selectedVariants || {}, r = t.selectedVariants || {};
|
|
1075
|
+
return {
|
|
1076
|
+
...e,
|
|
1077
|
+
...t,
|
|
1078
|
+
selectedVariants: {
|
|
1079
|
+
...n,
|
|
1080
|
+
...r
|
|
1081
|
+
}
|
|
1082
|
+
};
|
|
1083
|
+
}, [d, i.config]), h = K(i, n, m, f, p, G(n, u || "", m)), g = h.config?.animation, _ = b(() => g?.scroll ? {
|
|
973
1084
|
from: {
|
|
974
|
-
...
|
|
975
|
-
...
|
|
1085
|
+
...L,
|
|
1086
|
+
...g.scroll.from
|
|
976
1087
|
},
|
|
977
1088
|
to: {
|
|
978
|
-
...
|
|
979
|
-
...
|
|
1089
|
+
...I,
|
|
1090
|
+
...g.scroll.to
|
|
980
1091
|
},
|
|
981
|
-
offset:
|
|
1092
|
+
offset: g.scroll.offset ?? {
|
|
982
1093
|
start: "start end",
|
|
983
1094
|
end: "end center"
|
|
984
1095
|
}
|
|
985
|
-
} : void 0, [
|
|
1096
|
+
} : void 0, [g?.scroll]), v = b(() => g?.entry ? {
|
|
986
1097
|
from: {
|
|
987
|
-
...
|
|
988
|
-
...
|
|
1098
|
+
...L,
|
|
1099
|
+
...g.entry.from
|
|
989
1100
|
},
|
|
990
1101
|
to: {
|
|
991
|
-
...
|
|
992
|
-
...
|
|
1102
|
+
...I,
|
|
1103
|
+
...g.entry.to
|
|
993
1104
|
},
|
|
994
|
-
transition:
|
|
995
|
-
viewport:
|
|
996
|
-
} : void 0, [
|
|
997
|
-
return !a ||
|
|
998
|
-
config:
|
|
999
|
-
children: /* @__PURE__ */
|
|
1105
|
+
transition: g.entry.transition,
|
|
1106
|
+
viewport: g.entry.viewport
|
|
1107
|
+
} : void 0, [g?.entry]);
|
|
1108
|
+
return !a || h.config?.enabled === !1 ? null : g && Object.keys(g).length > 0 && o !== "studio.block" ? /* @__PURE__ */ w(J, {
|
|
1109
|
+
config: h?.config || {},
|
|
1110
|
+
children: /* @__PURE__ */ w(ue, {
|
|
1000
1111
|
MotionComponent: t,
|
|
1001
|
-
motionProps:
|
|
1002
|
-
scroll:
|
|
1003
|
-
entry:
|
|
1004
|
-
whileHover:
|
|
1005
|
-
exit:
|
|
1112
|
+
motionProps: h,
|
|
1113
|
+
scroll: _,
|
|
1114
|
+
entry: v,
|
|
1115
|
+
whileHover: g.whileHover,
|
|
1116
|
+
exit: g.exit,
|
|
1006
1117
|
children: r
|
|
1007
1118
|
})
|
|
1008
|
-
}) : /* @__PURE__ */
|
|
1009
|
-
config:
|
|
1010
|
-
children: /* @__PURE__ */
|
|
1011
|
-
...
|
|
1119
|
+
}) : /* @__PURE__ */ w(J, {
|
|
1120
|
+
config: h?.config || {},
|
|
1121
|
+
children: /* @__PURE__ */ w(e, {
|
|
1122
|
+
...h,
|
|
1012
1123
|
children: r
|
|
1013
1124
|
})
|
|
1014
1125
|
});
|
|
1015
1126
|
};
|
|
1016
|
-
return n.displayName = `withBlockProps(${e.displayName || e.name || "Component"})`,
|
|
1017
|
-
},
|
|
1018
|
-
if (!n) return /* @__PURE__ */
|
|
1127
|
+
return n.displayName = `withBlockProps(${e.displayName || e.name || "Component"})`, v(n);
|
|
1128
|
+
}, Z = g(({ className: e, config: t, content: n, elementKey: r, generatedClassName: i, styles: a, noElementKey: o, ...s }, c) => {
|
|
1129
|
+
if (!n) return /* @__PURE__ */ w("span", {
|
|
1019
1130
|
ref: c,
|
|
1020
1131
|
style: { display: "none" }
|
|
1021
1132
|
});
|
|
1022
|
-
let { kind: l, data: u } = n,
|
|
1133
|
+
let { kind: l, data: u } = n, f = t?.icon?.alt, p = d(e, i), m = {
|
|
1023
1134
|
"data-levo_element_key": o ? void 0 : r,
|
|
1024
1135
|
"data-levo_element_type": "Icon",
|
|
1025
|
-
className:
|
|
1136
|
+
className: p,
|
|
1026
1137
|
...s
|
|
1027
|
-
}, h =
|
|
1028
|
-
"aria-label":
|
|
1138
|
+
}, h = f ? {
|
|
1139
|
+
"aria-label": f,
|
|
1029
1140
|
role: "img"
|
|
1030
1141
|
} : {};
|
|
1031
1142
|
switch (l) {
|
|
1032
|
-
case "emoji": return /* @__PURE__ */
|
|
1143
|
+
case "emoji": return /* @__PURE__ */ w("p", {
|
|
1033
1144
|
style: {
|
|
1034
1145
|
width: "auto",
|
|
1035
1146
|
height: "auto",
|
|
1036
|
-
...
|
|
1147
|
+
...m.style
|
|
1037
1148
|
},
|
|
1038
1149
|
ref: c,
|
|
1039
|
-
...
|
|
1150
|
+
...m,
|
|
1040
1151
|
...h,
|
|
1041
1152
|
children: u?.unicode
|
|
1042
1153
|
});
|
|
1043
1154
|
case "icon": {
|
|
1044
1155
|
let e = u;
|
|
1045
|
-
return e?.svgCode ? /* @__PURE__ */
|
|
1156
|
+
return e?.svgCode ? /* @__PURE__ */ w("div", {
|
|
1046
1157
|
ref: c,
|
|
1047
|
-
...
|
|
1158
|
+
...m,
|
|
1048
1159
|
...h,
|
|
1049
1160
|
style: {
|
|
1050
1161
|
display: a?.display ? void 0 : "inline-block",
|
|
1051
|
-
...
|
|
1162
|
+
...m.style
|
|
1052
1163
|
},
|
|
1053
1164
|
dangerouslySetInnerHTML: { __html: e.svgCode }
|
|
1054
|
-
}) : /* @__PURE__ */
|
|
1165
|
+
}) : /* @__PURE__ */ w("span", {
|
|
1055
1166
|
ref: c,
|
|
1056
|
-
...
|
|
1167
|
+
...m
|
|
1057
1168
|
});
|
|
1058
1169
|
}
|
|
1059
|
-
case "custom": return /* @__PURE__ */
|
|
1170
|
+
case "custom": return /* @__PURE__ */ w("img", {
|
|
1060
1171
|
ref: c,
|
|
1061
1172
|
src: u?.location,
|
|
1062
1173
|
srcSet: u?.srcset?.path,
|
|
1063
1174
|
decoding: "async",
|
|
1064
|
-
alt:
|
|
1065
|
-
...
|
|
1175
|
+
alt: f ?? "icon",
|
|
1176
|
+
...m
|
|
1066
1177
|
});
|
|
1067
|
-
default: return /* @__PURE__ */
|
|
1178
|
+
default: return /* @__PURE__ */ w("span", {
|
|
1068
1179
|
ref: c,
|
|
1069
|
-
...
|
|
1180
|
+
...m
|
|
1070
1181
|
});
|
|
1071
1182
|
}
|
|
1072
1183
|
});
|
|
1073
|
-
|
|
1074
|
-
var
|
|
1075
|
-
let
|
|
1184
|
+
Z.displayName = "BaseIcon";
|
|
1185
|
+
var Q = X(Z), $ = p.forwardRef(({ className: e, isLoading: t, loadingText: n, children: r, config: i = {}, styles: a, content: o, elementKey: s, generatedClassName: c, ...l }, u) => {
|
|
1186
|
+
let f = r ?? o, p = i, m = (e, t) => e?.enabled ? /* @__PURE__ */ w(Q, {
|
|
1076
1187
|
noElementKey: !0,
|
|
1077
1188
|
elementKey: `${s}_${t}Icon`
|
|
1078
1189
|
}) : null;
|
|
1079
|
-
return
|
|
1190
|
+
return f ? /* @__PURE__ */ w("button", {
|
|
1080
1191
|
"data-levo_element_key": s,
|
|
1081
1192
|
"data-levo_element_type": "Button",
|
|
1082
1193
|
type: "button",
|
|
1083
|
-
className:
|
|
1194
|
+
className: d("inline-flex items-center justify-center", e, c),
|
|
1084
1195
|
ref: u,
|
|
1085
1196
|
...l,
|
|
1086
|
-
children: t ? /* @__PURE__ */
|
|
1087
|
-
|
|
1088
|
-
/* @__PURE__ */
|
|
1197
|
+
children: t ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(D, { className: d("h-4 w-4 animate-spin", n ? "mr-2" : "") }), n] }) : /* @__PURE__ */ T(C, { children: [
|
|
1198
|
+
m(p?.button_icons?.left, "left"),
|
|
1199
|
+
/* @__PURE__ */ w("span", {
|
|
1089
1200
|
className: "button-content",
|
|
1090
|
-
children:
|
|
1201
|
+
children: f
|
|
1091
1202
|
}),
|
|
1092
|
-
|
|
1203
|
+
m(p?.button_icons?.right, "right")
|
|
1093
1204
|
] })
|
|
1094
|
-
}) : /* @__PURE__ */
|
|
1205
|
+
}) : /* @__PURE__ */ w("span", {
|
|
1095
1206
|
ref: u,
|
|
1096
1207
|
style: { display: "none" }
|
|
1097
1208
|
});
|
|
1098
1209
|
});
|
|
1099
|
-
|
|
1100
|
-
var
|
|
1210
|
+
$.displayName = "BaseButton";
|
|
1211
|
+
var de = X($);
|
|
1101
1212
|
//#endregion
|
|
1102
|
-
export {
|
|
1213
|
+
export { I as _, ce as a, k as b, V as c, K as d, G as f, se as g, R as h, X as i, U as l, L as m, de as n, W as o, z as p, Q as r, B as s, $ as t, H as u, oe as v, F as y };
|