@levo-so/studio 0.1.108 → 0.1.110
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-CJqmdIz2.js → BillingStep-CY2MHQ-L.js} +1 -1
- package/{Button-DujHjtOV.js → Button-DjphTnCg.js} +545 -97
- package/{CollectionField-BPl8E9MW.js → CollectionField-DrJuHNsg.js} +38 -38
- package/{DateTimeWidget-CbpvxQ9s.js → DateTimeWidget-BVHZh4EV.js} +13 -13
- package/{EntryCard-Drnobf4s.js → EntryCard-BYONyIm5.js} +7 -4
- package/{LoginCard-B9HKjZEk.js → LoginCard-CrtSHdaR.js} +3 -3
- package/{LoginForm-DpgxFh89.js → LoginForm-DeYsk4kd.js} +18 -18
- package/{LoginModal-CaqsScly.js → LoginModal-BbDfB4S9.js} +3 -3
- package/{MessageCard-DojQRKnf.js → MessageCard-x6jPClGi.js} +2 -2
- package/{MessageFooter-C4qC8cem.js → MessageFooter-CHuPnL_D.js} +1 -1
- package/{ModalManager-CaBZKQR2.js → ModalManager-DQVNPEuG.js} +1 -1
- package/{PendingApprovalCard-CrdOrMRu.js → PendingApprovalCard-CsnyrSsa.js} +3 -3
- package/{PhoneWidget-BxW2gL28.js → PhoneWidget-BaDSMSW5.js} +5 -5
- package/{PopupRenderer-CV5HY1dP-hICGc5AG.js → PopupRenderer-Dd9zoNIY-Cx663DmW.js} +346 -315
- package/ProfileCard-Dg5TY1Mw.js +102 -0
- package/{RichTextWidget-DCzgJ9EA.js → RichTextWidget-yaDCZwIo.js} +10 -10
- package/{RteThemeProvider-Cfepkyer.js → RteThemeProvider-LFGzAYi1.js} +2 -2
- package/{Toolbar-B5UZer_x.js → Toolbar-D3PnF7Ud.js} +4 -4
- package/{VerifyButton-DFAg6STD.js → VerifyButton-6BIXAEGp.js} +1 -1
- package/{bookingCard-BgApvrcj.js → bookingCard-D40dbgvH.js} +3 -3
- package/collection.d.ts +14 -6
- package/collection.js +6 -7
- package/dist-bHoi1bCB.js +3795 -0
- package/index.d.ts +312 -18
- package/index.js +2709 -2177
- package/{inlineCollectionTheme-WpCvMKrW.js → inlineCollectionTheme-D2w17LHX.js} +1 -1
- package/{inlineRteTheme-Ajq9PNpQ.js → inlineRteTheme-abXxag3B.js} +1 -1
- package/{nodeAlignment-DKCIjzlR.js → nodeAlignment-BC_Uferw.js} +5 -5
- package/package.json +5 -5
- package/studio.css +1 -1
- package/{utils-CUqS5dMC.js → utils-C_tr8kXV.js} +1 -1
- package/CollectionFormBuilder-BvFtiZeH.js +0 -3668
- package/dist-DZbXWctg.js +0 -97
- /package/{CollectionInput-DcNJT5Pg.js → CollectionInput-CG-Pu_51.js} +0 -0
- /package/{Popover-DOvRAGzc.js → Popover-DnZY1k6o.js} +0 -0
- /package/{StripePaymentModal-Do1xHctU.js → StripePaymentModal-BsYNQ4MB.js} +0 -0
- /package/{Tooltip-CJINDx93.js → Tooltip-DreKXbTO.js} +0 -0
- /package/{authentication-ClOFcry8.js → authentication-TdyaDNTn.js} +0 -0
- /package/{card-E2LKF9nT.js → card-D5fPArfa.js} +0 -0
- /package/{dialog-DoxC50i0.js → dialog-LRLdr3kq.js} +0 -0
- /package/{theme.cssm-BXDp-ojp.js → theme.cssm-2YTdd8Yh.js} +0 -0
- /package/{useLogin-D4A5iRey.js → useLogin-B2HHZxTi.js} +0 -0
|
@@ -1,50 +1,83 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-CAFD8bLK.js";
|
|
2
2
|
import { a as t, c as n, i as r, l as i, o as a, r as o, s, t as c, u as l } from "./Dialog-IrII0ugb.js";
|
|
3
3
|
import { i as u, t as d } from "./Button-lUfKisu8.js";
|
|
4
|
-
import { n as f, r as p, t as m } from "./inlineRteTheme-
|
|
5
|
-
import { i as h, r as g, t as _ } from "./inlineCollectionTheme-
|
|
6
|
-
import { n as v, t as y } from "./theme.cssm-
|
|
7
|
-
import { t as b } from "./nodeAlignment-
|
|
4
|
+
import { n as f, r as p, t as m } from "./inlineRteTheme-abXxag3B.js";
|
|
5
|
+
import { i as h, r as g, t as _ } from "./inlineCollectionTheme-D2w17LHX.js";
|
|
6
|
+
import { n as v, t as y } from "./theme.cssm-2YTdd8Yh.js";
|
|
7
|
+
import { t as b } from "./nodeAlignment-BC_Uferw.js";
|
|
8
8
|
import { c as x } from "react/compiler-runtime";
|
|
9
9
|
import { $activity as S, $isIdentityContextReady as C, $pageLifecycle as w, $scrollBehavior as T, $session as E } from "@levo-so/insights/stores";
|
|
10
10
|
import { useLevo as ee, useLevoInsights as D } from "@levo-so/react";
|
|
11
|
-
import { Suspense as te, createContext as O, lazy as k, useContext as A, useEffect as j, useMemo as
|
|
12
|
-
import { persistentAtom as
|
|
13
|
-
import { atom as
|
|
14
|
-
import { Fragment as
|
|
15
|
-
import
|
|
16
|
-
import { createRuntimeFn as
|
|
17
|
-
import { IconCheck as
|
|
18
|
-
import { generateJSON as
|
|
19
|
-
import { renderToReactElement as
|
|
20
|
-
import { Bold as
|
|
21
|
-
import { BulletList as
|
|
22
|
-
import { Code as
|
|
23
|
-
import { Color as
|
|
24
|
-
import { Document as
|
|
25
|
-
import { HardBreak as
|
|
26
|
-
import { Heading as
|
|
27
|
-
import { Highlight as
|
|
28
|
-
import { Italic as
|
|
29
|
-
import { Link as
|
|
30
|
-
import { ListItem as
|
|
31
|
-
import { OrderedList as
|
|
32
|
-
import { Paragraph as
|
|
33
|
-
import { Strike as
|
|
34
|
-
import { Subscript as
|
|
35
|
-
import { Superscript as
|
|
36
|
-
import { Text as
|
|
37
|
-
import { TextStyle as
|
|
38
|
-
import { Typography as
|
|
39
|
-
import { Underline as
|
|
40
|
-
import { UniqueID as
|
|
41
|
-
import { Extension as
|
|
42
|
-
import { useStore as
|
|
11
|
+
import { Suspense as te, createContext as O, lazy as k, useContext as A, useEffect as j, useMemo as M, useRef as ne, useState as re } from "react";
|
|
12
|
+
import { persistentAtom as ie } from "@nanostores/persistent";
|
|
13
|
+
import { atom as N, computed as ae } from "nanostores";
|
|
14
|
+
import { Fragment as oe, jsx as P, jsxs as F } from "react/jsx-runtime";
|
|
15
|
+
import I from "clsx";
|
|
16
|
+
import { createRuntimeFn as se } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
17
|
+
import { IconCheck as ce, IconCopy as le, IconX as ue } from "@tabler/icons-react";
|
|
18
|
+
import { generateJSON as de } from "@tiptap/html";
|
|
19
|
+
import { renderToReactElement as fe } from "@tiptap/static-renderer/pm/react";
|
|
20
|
+
import { Bold as pe } from "@tiptap/extension-bold";
|
|
21
|
+
import { BulletList as me } from "@tiptap/extension-bullet-list";
|
|
22
|
+
import { Code as he } from "@tiptap/extension-code";
|
|
23
|
+
import { Color as ge } from "@tiptap/extension-color";
|
|
24
|
+
import { Document as _e } from "@tiptap/extension-document";
|
|
25
|
+
import { HardBreak as ve } from "@tiptap/extension-hard-break";
|
|
26
|
+
import { Heading as ye } from "@tiptap/extension-heading";
|
|
27
|
+
import { Highlight as be } from "@tiptap/extension-highlight";
|
|
28
|
+
import { Italic as xe } from "@tiptap/extension-italic";
|
|
29
|
+
import { Link as Se } from "@tiptap/extension-link";
|
|
30
|
+
import { ListItem as Ce } from "@tiptap/extension-list-item";
|
|
31
|
+
import { OrderedList as we } from "@tiptap/extension-ordered-list";
|
|
32
|
+
import { Paragraph as Te } from "@tiptap/extension-paragraph";
|
|
33
|
+
import { Strike as Ee } from "@tiptap/extension-strike";
|
|
34
|
+
import { Subscript as De } from "@tiptap/extension-subscript";
|
|
35
|
+
import { Superscript as Oe } from "@tiptap/extension-superscript";
|
|
36
|
+
import { Text as ke } from "@tiptap/extension-text";
|
|
37
|
+
import { TextStyle as Ae } from "@tiptap/extension-text-style";
|
|
38
|
+
import { Typography as je } from "@tiptap/extension-typography";
|
|
39
|
+
import { Underline as Me } from "@tiptap/extension-underline";
|
|
40
|
+
import { UniqueID as Ne } from "@tiptap/extension-unique-id";
|
|
41
|
+
import { Extension as Pe, Node as Fe, mergeAttributes as Ie } from "@tiptap/core";
|
|
42
|
+
import { useStore as Le } from "@nanostores/react";
|
|
43
|
+
//#region ../../libraries/levocn/dist/theme/utils/googleFonts.js
|
|
44
|
+
var Re = "wght@300;400;500;600;700;900", ze = (e) => !!e && e !== "inherit" && !e.includes(",") && !e.includes("var("), Be = (...e) => {
|
|
45
|
+
let t = Array.from(new Set(e.filter((e) => typeof e == "string").map((e) => e.trim()).filter(ze)));
|
|
46
|
+
return t.length === 0 ? null : `https://fonts.googleapis.com/css2?${t.map((e) => `family=${e.replace(/ /g, "+")}:${Re}`).join("&")}&display=swap`;
|
|
47
|
+
}, Ve = (e) => {
|
|
48
|
+
if (document.querySelector(`link[rel="preconnect"][href="${e}"]`)) return;
|
|
49
|
+
let t = document.createElement("link");
|
|
50
|
+
t.rel = "preconnect", t.href = e, t.crossOrigin = "anonymous", document.head.appendChild(t);
|
|
51
|
+
}, He = (e) => {
|
|
52
|
+
let t = `family=${e.replace(/ /g, "+")}:`;
|
|
53
|
+
return Array.from(document.querySelectorAll("link[rel=\"stylesheet\"][href*=\"fonts.googleapis.com\"]")).some((e) => e.href.includes(t));
|
|
54
|
+
}, Ue = (...e) => {
|
|
55
|
+
let t = x(5), n = e, r;
|
|
56
|
+
t[0] === n ? r = t[1] : (r = n.filter(We).map(Ge).join("|"), t[0] = n, t[1] = r);
|
|
57
|
+
let i = r, a, o;
|
|
58
|
+
t[2] === i ? (a = t[3], o = t[4]) : (a = () => {
|
|
59
|
+
let e = Be(...(i ? i.split("|") : []).filter(Ke));
|
|
60
|
+
if (!e) return;
|
|
61
|
+
Ve("https://fonts.googleapis.com"), Ve("https://fonts.gstatic.com");
|
|
62
|
+
let t = document.createElement("link");
|
|
63
|
+
t.rel = "stylesheet", t.href = e, t.crossOrigin = "anonymous", t.setAttribute("data-levo-fonts", e), document.head.appendChild(t);
|
|
64
|
+
}, o = [i], t[2] = i, t[3] = a, t[4] = o), j(a, o);
|
|
65
|
+
};
|
|
66
|
+
function We(e) {
|
|
67
|
+
return typeof e == "string" && e.trim() !== "";
|
|
68
|
+
}
|
|
69
|
+
function Ge(e) {
|
|
70
|
+
return e.trim();
|
|
71
|
+
}
|
|
72
|
+
function Ke(e) {
|
|
73
|
+
return !He(e);
|
|
74
|
+
}
|
|
75
|
+
//#endregion
|
|
43
76
|
//#region ../../libraries/levocn/dist/styles/inlineBaseTheme.js
|
|
44
|
-
var
|
|
77
|
+
var qe = v(h), Je = (e) => e ? e.radius && !e.radiusScale ? qe({
|
|
45
78
|
...e,
|
|
46
79
|
radiusScale: g(e.radius)
|
|
47
|
-
}) :
|
|
80
|
+
}) : qe(e) : {}, Ye = {
|
|
48
81
|
100: "1f4af",
|
|
49
82
|
1234: "1f522",
|
|
50
83
|
regional_indicator_a: "🇦",
|
|
@@ -1978,7 +2011,7 @@ var Be = v(h), Ve = (e) => e ? e.radius && !e.radiusScale ? Be({
|
|
|
1978
2011
|
england: "1f3f4-e0067-e0062-e0065-e006e-e0067-e007f",
|
|
1979
2012
|
scotland: "1f3f4-e0067-e0062-e0073-e0063-e0074-e007f",
|
|
1980
2013
|
wales: "1f3f4-e0067-e0062-e0077-e006c-e0073-e007f"
|
|
1981
|
-
},
|
|
2014
|
+
}, Xe = "https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64", Ze = (e) => /^[A-Fa-f0-9-]+$/.test(e), Qe = Fe.create({
|
|
1982
2015
|
name: "emoji",
|
|
1983
2016
|
inline: !0,
|
|
1984
2017
|
group: "inline",
|
|
@@ -1995,12 +2028,12 @@ var Be = v(h), Ve = (e) => e ? e.radius && !e.radiusScale ? Be({
|
|
|
1995
2028
|
return [{ tag: "span[data-type=\"emoji\"]" }];
|
|
1996
2029
|
},
|
|
1997
2030
|
renderHTML({ HTMLAttributes: e, node: t }) {
|
|
1998
|
-
let n =
|
|
1999
|
-
return i ?
|
|
2031
|
+
let n = Ie(e, { "data-type": "emoji" }), r = t.attrs.name, i = r ? Ye[r] : void 0;
|
|
2032
|
+
return i ? Ze(i) ? [
|
|
2000
2033
|
"span",
|
|
2001
2034
|
n,
|
|
2002
2035
|
["img", {
|
|
2003
|
-
src: `${
|
|
2036
|
+
src: `${Xe}/${i}.png`,
|
|
2004
2037
|
draggable: "false",
|
|
2005
2038
|
loading: "lazy",
|
|
2006
2039
|
align: "absmiddle",
|
|
@@ -2016,7 +2049,7 @@ var Be = v(h), Ve = (e) => e ? e.radius && !e.radiusScale ? Be({
|
|
|
2016
2049
|
`:${r || "emoji"}:`
|
|
2017
2050
|
];
|
|
2018
2051
|
}
|
|
2019
|
-
}),
|
|
2052
|
+
}), $e = Pe.create({
|
|
2020
2053
|
name: "fontSize",
|
|
2021
2054
|
addOptions() {
|
|
2022
2055
|
return { types: ["textStyle"] };
|
|
@@ -2037,124 +2070,124 @@ var Be = v(h), Ve = (e) => e ? e.radius && !e.radiusScale ? Be({
|
|
|
2037
2070
|
unsetFontSize: () => ({ chain: e }) => e().setMark("textStyle", { fontSize: null }).removeEmptyTextStyle().run()
|
|
2038
2071
|
};
|
|
2039
2072
|
}
|
|
2040
|
-
}),
|
|
2041
|
-
_: () =>
|
|
2042
|
-
c: () =>
|
|
2043
|
-
d: () =>
|
|
2044
|
-
f: () =>
|
|
2045
|
-
g: () =>
|
|
2046
|
-
h: () =>
|
|
2047
|
-
i: () =>
|
|
2048
|
-
l: () =>
|
|
2049
|
-
m: () =>
|
|
2050
|
-
n: () =>
|
|
2051
|
-
o: () =>
|
|
2052
|
-
p: () =>
|
|
2053
|
-
r: () =>
|
|
2054
|
-
s: () =>
|
|
2055
|
-
t: () =>
|
|
2056
|
-
u: () =>
|
|
2057
|
-
v: () =>
|
|
2058
|
-
y: () =>
|
|
2059
|
-
}),
|
|
2073
|
+
}), et = /* @__PURE__ */ e({
|
|
2074
|
+
_: () => U,
|
|
2075
|
+
c: () => Z,
|
|
2076
|
+
d: () => yt,
|
|
2077
|
+
f: () => gt,
|
|
2078
|
+
g: () => V,
|
|
2079
|
+
h: () => z,
|
|
2080
|
+
i: () => zt,
|
|
2081
|
+
l: () => _t,
|
|
2082
|
+
m: () => H,
|
|
2083
|
+
n: () => an,
|
|
2084
|
+
o: () => It,
|
|
2085
|
+
p: () => B,
|
|
2086
|
+
r: () => Bt,
|
|
2087
|
+
s: () => Q,
|
|
2088
|
+
t: () => sn,
|
|
2089
|
+
u: () => X,
|
|
2090
|
+
v: () => mt,
|
|
2091
|
+
y: () => J
|
|
2092
|
+
}), tt = Object.defineProperty, nt = (e, t) => {
|
|
2060
2093
|
let n = {};
|
|
2061
|
-
for (var r in e)
|
|
2094
|
+
for (var r in e) tt(n, r, {
|
|
2062
2095
|
get: e[r],
|
|
2063
2096
|
enumerable: !0
|
|
2064
2097
|
});
|
|
2065
|
-
return t ||
|
|
2066
|
-
},
|
|
2098
|
+
return t || tt(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
2099
|
+
}, rt = 6e4, it = "lv_popups_session", L = {
|
|
2067
2100
|
active_popup_id: null,
|
|
2068
2101
|
shown_popup_ids: [],
|
|
2069
2102
|
last_closed_at: null
|
|
2070
|
-
},
|
|
2103
|
+
}, R = ie("lv_popups_state", {}, {
|
|
2071
2104
|
encode: JSON.stringify,
|
|
2072
2105
|
decode: JSON.parse
|
|
2073
|
-
}),
|
|
2074
|
-
if (!e) return
|
|
2106
|
+
}), at = (e) => {
|
|
2107
|
+
if (!e) return L;
|
|
2075
2108
|
try {
|
|
2076
2109
|
return JSON.parse(e);
|
|
2077
2110
|
} catch {
|
|
2078
|
-
return
|
|
2111
|
+
return L;
|
|
2079
2112
|
}
|
|
2080
|
-
},
|
|
2081
|
-
if (typeof sessionStorage > "u") return
|
|
2113
|
+
}, z = N((() => {
|
|
2114
|
+
if (typeof sessionStorage > "u") return L;
|
|
2082
2115
|
try {
|
|
2083
|
-
return
|
|
2116
|
+
return at(sessionStorage.getItem(it));
|
|
2084
2117
|
} catch {
|
|
2085
|
-
return
|
|
2118
|
+
return L;
|
|
2086
2119
|
}
|
|
2087
|
-
})()),
|
|
2088
|
-
|
|
2089
|
-
|
|
2120
|
+
})()), ot = z.set;
|
|
2121
|
+
z.set = (e) => {
|
|
2122
|
+
ot(e);
|
|
2090
2123
|
try {
|
|
2091
|
-
sessionStorage.setItem(
|
|
2124
|
+
sessionStorage.setItem(it, JSON.stringify(e));
|
|
2092
2125
|
} catch {}
|
|
2093
2126
|
};
|
|
2094
|
-
var
|
|
2127
|
+
var st = ae([z, R], (e, t) => ({
|
|
2095
2128
|
active_popup_id: e.active_popup_id,
|
|
2096
2129
|
shown_popup_ids: e.shown_popup_ids,
|
|
2097
2130
|
last_closed_at: e.last_closed_at,
|
|
2098
2131
|
previous_popups: t
|
|
2099
|
-
})),
|
|
2100
|
-
R.set(e);
|
|
2101
|
-
}, B = M(!0), V = (e) => {
|
|
2132
|
+
})), B = N([]), V = (e) => {
|
|
2102
2133
|
B.set(e);
|
|
2103
|
-
},
|
|
2104
|
-
|
|
2105
|
-
|
|
2134
|
+
}, H = N(!0), U = (e) => {
|
|
2135
|
+
H.set(e);
|
|
2136
|
+
}, ct = () => st.get(), lt = (e, t) => e.includes(t) ? e : [...e, t], W = "manual", ut = () => W, G = [], K = null, dt = () => {
|
|
2137
|
+
if (K) return;
|
|
2138
|
+
let { last_closed_at: e } = z.get();
|
|
2106
2139
|
if (!e) return;
|
|
2107
|
-
let t =
|
|
2140
|
+
let t = rt - (Date.now() - e);
|
|
2108
2141
|
if (t <= 0) {
|
|
2109
|
-
|
|
2142
|
+
q();
|
|
2110
2143
|
return;
|
|
2111
2144
|
}
|
|
2112
|
-
|
|
2113
|
-
|
|
2145
|
+
K = setTimeout(() => {
|
|
2146
|
+
K = null, q();
|
|
2114
2147
|
}, t);
|
|
2115
|
-
},
|
|
2116
|
-
let e =
|
|
2148
|
+
}, q = () => {
|
|
2149
|
+
let e = z.get();
|
|
2117
2150
|
if (!e.active_popup_id) {
|
|
2118
2151
|
if (e.last_closed_at && Date.now() - e.last_closed_at < 6e4) {
|
|
2119
|
-
|
|
2152
|
+
dt();
|
|
2120
2153
|
return;
|
|
2121
2154
|
}
|
|
2122
|
-
for (;
|
|
2123
|
-
let e =
|
|
2124
|
-
if (
|
|
2155
|
+
for (; G.length > 0;) {
|
|
2156
|
+
let e = G.shift();
|
|
2157
|
+
if (J(e.popup, { trigger_type: e.trigger_type })) return;
|
|
2125
2158
|
}
|
|
2126
2159
|
}
|
|
2127
|
-
},
|
|
2128
|
-
|
|
2160
|
+
}, ft = (e, t) => {
|
|
2161
|
+
G.some((t) => t.popup.id === e.id) || (G.push({
|
|
2129
2162
|
popup: e,
|
|
2130
2163
|
trigger_type: t
|
|
2131
|
-
}),
|
|
2132
|
-
},
|
|
2133
|
-
let n =
|
|
2164
|
+
}), dt());
|
|
2165
|
+
}, pt = (e, t) => {
|
|
2166
|
+
let n = ct();
|
|
2134
2167
|
if (!t || t.type === "always") return !n.shown_popup_ids.includes(e);
|
|
2135
2168
|
let r = n.previous_popups[e];
|
|
2136
2169
|
return r ? t.type === "once" ? !1 : t.type === "interval" && t.interval_ms ? Date.now() - r.triggered_at >= t.interval_ms : !0 : !0;
|
|
2137
|
-
},
|
|
2138
|
-
let { force: n = !1, trigger_type: r = "manual" } = t, i = e.id, a = e.settings?.display_frequency, o =
|
|
2139
|
-
return o.active_popup_id === i ? !0 : !n && (o.active_popup_id || o.last_closed_at && Date.now() - o.last_closed_at < 6e4 || !
|
|
2170
|
+
}, J = (e, t = {}) => {
|
|
2171
|
+
let { force: n = !1, trigger_type: r = "manual" } = t, i = e.id, a = e.settings?.display_frequency, o = z.get();
|
|
2172
|
+
return o.active_popup_id === i ? !0 : !n && (o.active_popup_id || o.last_closed_at && Date.now() - o.last_closed_at < 6e4 || !pt(i, a)) ? !1 : (K &&= (clearTimeout(K), null), W = r, z.set({
|
|
2140
2173
|
active_popup_id: i,
|
|
2141
|
-
shown_popup_ids:
|
|
2174
|
+
shown_popup_ids: lt(o.shown_popup_ids, i),
|
|
2142
2175
|
last_closed_at: o.last_closed_at
|
|
2143
|
-
}), !a || a.type === "always" ||
|
|
2144
|
-
...
|
|
2176
|
+
}), !a || a.type === "always" || R.set({
|
|
2177
|
+
...R.get(),
|
|
2145
2178
|
[i]: { triggered_at: Date.now() }
|
|
2146
2179
|
}), !0);
|
|
2147
|
-
},
|
|
2180
|
+
}, Y = (e, t = {}) => {
|
|
2148
2181
|
let { trigger_type: n = "manual" } = t;
|
|
2149
|
-
return
|
|
2150
|
-
},
|
|
2151
|
-
let t =
|
|
2152
|
-
t.active_popup_id === e && (
|
|
2182
|
+
return J(e, { trigger_type: n }) ? !0 : (pt(e.id, e.settings?.display_frequency) && ft(e, n), !1);
|
|
2183
|
+
}, mt = (e) => {
|
|
2184
|
+
let t = z.get();
|
|
2185
|
+
t.active_popup_id === e && (W = "manual", z.set({
|
|
2153
2186
|
...t,
|
|
2154
2187
|
active_popup_id: null,
|
|
2155
2188
|
last_closed_at: Date.now()
|
|
2156
|
-
}), setTimeout(
|
|
2157
|
-
},
|
|
2189
|
+
}), setTimeout(q, 0));
|
|
2190
|
+
}, X = se({
|
|
2158
2191
|
defaultClassName: "_1gklknd4",
|
|
2159
2192
|
variantClassNames: {
|
|
2160
2193
|
placement: {
|
|
@@ -2170,7 +2203,7 @@ var et = oe([L, I], (e, t) => ({
|
|
|
2170
2203
|
},
|
|
2171
2204
|
defaultVariants: { placement: "popup" },
|
|
2172
2205
|
compoundVariants: []
|
|
2173
|
-
}),
|
|
2206
|
+
}), ht = "_1gklkndb", gt = "_1gklkndc", _t = "_1gklkndd", vt = se({
|
|
2174
2207
|
defaultClassName: "_1gklknde",
|
|
2175
2208
|
variantClassNames: { size: {
|
|
2176
2209
|
small: "_1gklkndf",
|
|
@@ -2180,183 +2213,179 @@ var et = oe([L, I], (e, t) => ({
|
|
|
2180
2213
|
} },
|
|
2181
2214
|
defaultVariants: { size: "medium" },
|
|
2182
2215
|
compoundVariants: []
|
|
2183
|
-
}),
|
|
2216
|
+
}), yt = "_1gklkndl", Z = "_1gklkndm", bt = O(null), xt = (e) => {
|
|
2217
|
+
let t = x(6), { popup: n, callbacks: r, children: i } = e, a;
|
|
2218
|
+
t[0] !== r || t[1] !== n ? (a = {
|
|
2219
|
+
popup: n,
|
|
2220
|
+
callbacks: r
|
|
2221
|
+
}, t[0] = r, t[1] = n, t[2] = a) : a = t[2];
|
|
2222
|
+
let o;
|
|
2223
|
+
return t[3] !== i || t[4] !== a ? (o = /* @__PURE__ */ P(bt.Provider, {
|
|
2224
|
+
value: a,
|
|
2225
|
+
children: i
|
|
2226
|
+
}), t[3] = i, t[4] = a, t[5] = o) : o = t[5], o;
|
|
2227
|
+
}, St = () => {
|
|
2228
|
+
let e = A(bt);
|
|
2229
|
+
if (!e) throw Error("usePopupContext must be used within a PopupProvider");
|
|
2230
|
+
return e;
|
|
2231
|
+
}, Ct = () => A(bt), wt = () => {
|
|
2232
|
+
let e = x(2), t = Ct(), n;
|
|
2233
|
+
return e[0] === t ? n = e[1] : (n = () => {
|
|
2234
|
+
t && (t.callbacks?.onPopupClose?.(t.popup, { trigger_type: ut() }), mt(t.popup.id));
|
|
2235
|
+
}, e[0] = t, e[1] = n), n;
|
|
2236
|
+
}, Tt = "zv6sjd4", Et = "zv6sjd5", Dt = "zv6sjd6", Ot = [
|
|
2237
|
+
_e,
|
|
2238
|
+
Te,
|
|
2239
|
+
ke,
|
|
2184
2240
|
ye,
|
|
2185
|
-
|
|
2186
|
-
je,
|
|
2241
|
+
pe,
|
|
2187
2242
|
xe,
|
|
2243
|
+
Ee,
|
|
2188
2244
|
he,
|
|
2245
|
+
me,
|
|
2246
|
+
we,
|
|
2189
2247
|
Ce,
|
|
2190
|
-
|
|
2191
|
-
_e,
|
|
2192
|
-
ge,
|
|
2193
|
-
Ee,
|
|
2194
|
-
Te,
|
|
2195
|
-
be,
|
|
2196
|
-
Pe,
|
|
2197
|
-
we.configure({ openOnClick: !1 }),
|
|
2248
|
+
ve,
|
|
2198
2249
|
Me,
|
|
2199
|
-
|
|
2200
|
-
Ne,
|
|
2250
|
+
Se.configure({ openOnClick: !1 }),
|
|
2201
2251
|
Ae,
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2252
|
+
$e,
|
|
2253
|
+
je,
|
|
2254
|
+
Oe,
|
|
2255
|
+
De,
|
|
2256
|
+
ge,
|
|
2257
|
+
be.configure({ multicolor: !0 }),
|
|
2258
|
+
Qe,
|
|
2206
2259
|
b,
|
|
2207
|
-
|
|
2260
|
+
Ne.configure({ types: [
|
|
2208
2261
|
"paragraph",
|
|
2209
2262
|
"heading",
|
|
2210
2263
|
"bulletList",
|
|
2211
2264
|
"orderedList"
|
|
2212
2265
|
] })
|
|
2213
|
-
],
|
|
2214
|
-
let i =
|
|
2266
|
+
], kt = (e) => de(e, Ot), At = ({ content: e, className: t, ref: n, ...r }) => {
|
|
2267
|
+
let i = M(() => e ? typeof e == "string" ? e ? kt(e) : null : e.json && Object.keys(e.json).length > 0 ? e.json : e.html ? kt(e.html) : null : null, [e]), a = M(() => i ? fe({
|
|
2215
2268
|
content: i,
|
|
2216
|
-
extensions:
|
|
2269
|
+
extensions: Ot
|
|
2217
2270
|
}) : null, [i]);
|
|
2218
|
-
return a ? /* @__PURE__ */
|
|
2271
|
+
return a ? /* @__PURE__ */ P("div", {
|
|
2219
2272
|
ref: n,
|
|
2220
|
-
className:
|
|
2273
|
+
className: I(p, t),
|
|
2221
2274
|
...r,
|
|
2222
2275
|
children: a
|
|
2223
2276
|
}) : null;
|
|
2224
|
-
},
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
}, t[0] = r, t[1] = n, t[2] = a) : a = t[2];
|
|
2230
|
-
let o;
|
|
2231
|
-
return t[3] !== i || t[4] !== a ? (o = /* @__PURE__ */ N(ht.Provider, {
|
|
2232
|
-
value: a,
|
|
2233
|
-
children: i
|
|
2234
|
-
}), t[3] = i, t[4] = a, t[5] = o) : o = t[5], o;
|
|
2235
|
-
}, _t = () => {
|
|
2236
|
-
let e = A(ht);
|
|
2237
|
-
if (!e) throw Error("usePopupContext must be used within a PopupProvider");
|
|
2238
|
-
return e;
|
|
2239
|
-
}, vt = () => A(ht), yt = () => {
|
|
2240
|
-
let e = x(2), t = vt(), n;
|
|
2241
|
-
return e[0] === t ? n = e[1] : (n = () => {
|
|
2242
|
-
t && (t.callbacks?.onPopupClose?.(t.popup, { trigger_type: rt() }), q(t.popup.id));
|
|
2243
|
-
}, e[0] = t, e[1] = n), n;
|
|
2244
|
-
}, bt = "zv6sjd4", xt = "zv6sjd5", St = "zv6sjd6", Ct = k(() => import("./dist-DZbXWctg.js").then((e) => e.t).then((e) => ({ default: e.CollectionFormBuilder }))), wt = {
|
|
2245
|
-
left: bt,
|
|
2246
|
-
center: xt,
|
|
2247
|
-
right: St
|
|
2248
|
-
}, Tt = (e) => (e ?? "16:9").replace(":", " / "), Et = (e) => {
|
|
2277
|
+
}, jt = k(() => import("./dist-bHoi1bCB.js").then((e) => e.t).then((e) => ({ default: e.CollectionFormBuilder }))), Mt = {
|
|
2278
|
+
left: Tt,
|
|
2279
|
+
center: Et,
|
|
2280
|
+
right: Dt
|
|
2281
|
+
}, Nt = (e) => (e ?? "16:9").replace(":", " / "), Pt = (e) => {
|
|
2249
2282
|
if (e.content.coverImage?.srcset) return Object.entries(e.content.coverImage.srcset).filter(([e]) => e !== "path").map(([e, t]) => `${t} ${e}`).join(", ");
|
|
2250
|
-
},
|
|
2251
|
-
let t = x(
|
|
2252
|
-
t[0] !==
|
|
2253
|
-
if (
|
|
2254
|
-
let e =
|
|
2283
|
+
}, Q = (e) => {
|
|
2284
|
+
let t = x(45), { popup: n, disableInteraction: i } = e, a = Ct(), s = a?.popup ?? n, l = a?.callbacks?.onAction, u = wt(), f = !a, { content: p } = s, { workspace: m } = ee(), [h, g] = re(!1), _;
|
|
2285
|
+
t[0] !== p.action || t[1] !== l || t[2] !== s ? (_ = () => {
|
|
2286
|
+
if (p.action?.type !== "redirect" || !p.action.copyValue) return;
|
|
2287
|
+
let e = p.action.copyValue;
|
|
2255
2288
|
navigator.clipboard.writeText(e).then(() => {
|
|
2256
|
-
|
|
2289
|
+
g(!0), setTimeout(() => g(!1), 2e3), l?.(s, {
|
|
2257
2290
|
action_type: "copy",
|
|
2258
2291
|
copy_value: e
|
|
2259
2292
|
});
|
|
2260
2293
|
});
|
|
2261
|
-
}, t[0] =
|
|
2262
|
-
let
|
|
2263
|
-
t[4] ===
|
|
2264
|
-
let
|
|
2265
|
-
t[6] !==
|
|
2294
|
+
}, t[0] = p.action, t[1] = l, t[2] = s, t[3] = _) : _ = t[3];
|
|
2295
|
+
let v = _, y = p.align ?? "left", b;
|
|
2296
|
+
t[4] === p.coverImageRatio ? b = t[5] : (b = Nt(p.coverImageRatio), t[4] = p.coverImageRatio, t[5] = b);
|
|
2297
|
+
let S = b, C;
|
|
2298
|
+
t[6] !== S || t[7] !== p.coverImage || t[8] !== p.coverImageFocus || t[9] !== s ? (C = p.coverImage && /* @__PURE__ */ P("div", {
|
|
2266
2299
|
className: "_1gklkndj",
|
|
2267
|
-
style: { aspectRatio:
|
|
2268
|
-
children: /* @__PURE__ */
|
|
2269
|
-
src:
|
|
2270
|
-
srcSet:
|
|
2300
|
+
style: { aspectRatio: S },
|
|
2301
|
+
children: /* @__PURE__ */ P("img", {
|
|
2302
|
+
src: p.coverImage.location,
|
|
2303
|
+
srcSet: Pt(s),
|
|
2271
2304
|
alt: "",
|
|
2272
2305
|
className: "_1gklkndk",
|
|
2273
|
-
style:
|
|
2306
|
+
style: p.coverImageFocus ? { objectPosition: p.coverImageFocus.replace("-", " ") } : void 0
|
|
2274
2307
|
})
|
|
2275
|
-
}), t[6] =
|
|
2276
|
-
let
|
|
2277
|
-
t[11] ===
|
|
2278
|
-
let T;
|
|
2279
|
-
t[13] !== v || t[14] !== f.description || t[15] !== f.heading ? (T = (f.heading || f.description) && /* @__PURE__ */ P(c, {
|
|
2280
|
-
className: "zv6sjd0",
|
|
2281
|
-
style: { textAlign: v },
|
|
2282
|
-
children: [f.heading && /* @__PURE__ */ N(r, { children: f.heading }), f.description && /* @__PURE__ */ N(o, { children: f.description })]
|
|
2283
|
-
}), t[13] = v, t[14] = f.description, t[15] = f.heading, t[16] = T) : T = t[16];
|
|
2308
|
+
}), t[6] = S, t[7] = p.coverImage, t[8] = p.coverImageFocus, t[9] = s, t[10] = C) : C = t[10];
|
|
2309
|
+
let w = p.size ?? "medium", T;
|
|
2310
|
+
t[11] === w ? T = t[12] : (T = vt({ size: w }), t[11] = w, t[12] = T);
|
|
2284
2311
|
let E;
|
|
2285
|
-
t[
|
|
2286
|
-
className: "zv6sjd1",
|
|
2287
|
-
content: f.body
|
|
2288
|
-
}), t[17] = f.body, t[18] = E);
|
|
2312
|
+
t[13] === i ? E = t[14] : (E = i ? { pointerEvents: "none" } : void 0, t[13] = i, t[14] = E);
|
|
2289
2313
|
let D;
|
|
2290
|
-
t[
|
|
2314
|
+
t[15] !== y || t[16] !== p.description || t[17] !== p.heading ? (D = (p.heading || p.description) && /* @__PURE__ */ F(c, {
|
|
2315
|
+
className: "zv6sjd0",
|
|
2316
|
+
style: { textAlign: y },
|
|
2317
|
+
children: [p.heading && /* @__PURE__ */ P(r, { children: p.heading }), p.description && /* @__PURE__ */ P(o, { children: p.description })]
|
|
2318
|
+
}), t[15] = y, t[16] = p.description, t[17] = p.heading, t[18] = D) : D = t[18];
|
|
2319
|
+
let O;
|
|
2320
|
+
t[19] === p.body ? O = t[20] : (O = (p.body?.html || p.body?.json) && /* @__PURE__ */ P(At, {
|
|
2321
|
+
className: "zv6sjd1",
|
|
2322
|
+
content: p.body
|
|
2323
|
+
}), t[19] = p.body, t[20] = O);
|
|
2324
|
+
let k;
|
|
2325
|
+
t[21] !== y || t[22] !== p.action || t[23] !== f || t[24] !== l || t[25] !== s || t[26] !== m ? (k = p.action?.type === "form" && /* @__PURE__ */ P("div", {
|
|
2291
2326
|
className: "zv6sjd3",
|
|
2292
|
-
children: /* @__PURE__ */
|
|
2293
|
-
collection_id:
|
|
2327
|
+
children: /* @__PURE__ */ P(te, { children: /* @__PURE__ */ P(jt, {
|
|
2328
|
+
collection_id: p.action.collectionKey,
|
|
2294
2329
|
uiConfig: {
|
|
2295
2330
|
hideFormHeading: !0,
|
|
2296
2331
|
hideSectionHeadings: !0
|
|
2297
2332
|
},
|
|
2298
2333
|
submitButtonConfig: {
|
|
2299
2334
|
show: !0,
|
|
2300
|
-
text:
|
|
2301
|
-
styles:
|
|
2335
|
+
text: p.action.label || "Submit",
|
|
2336
|
+
styles: p.action.fullWidth ? "zv6sjd7" : Mt[y]
|
|
2302
2337
|
},
|
|
2303
|
-
workspace_id:
|
|
2338
|
+
workspace_id: m,
|
|
2304
2339
|
containerStyles: "zv6sjd2",
|
|
2305
|
-
preview:
|
|
2340
|
+
preview: f,
|
|
2306
2341
|
onSuccess: () => {
|
|
2307
|
-
|
|
2342
|
+
p.action?.type === "form" && l?.(s, {
|
|
2308
2343
|
action_type: "form_submit",
|
|
2309
|
-
collection_key:
|
|
2344
|
+
collection_key: p.action.collectionKey
|
|
2310
2345
|
});
|
|
2311
2346
|
}
|
|
2312
2347
|
}) })
|
|
2313
|
-
}), t[
|
|
2314
|
-
let
|
|
2315
|
-
t[
|
|
2348
|
+
}), t[21] = y, t[22] = p.action, t[23] = f, t[24] = l, t[25] = s, t[26] = m, t[27] = k) : k = t[27];
|
|
2349
|
+
let A;
|
|
2350
|
+
t[28] !== u || t[29] !== p.action || t[30] !== h || t[31] !== v || t[32] !== l || t[33] !== s ? (A = p.action?.type === "redirect" && /* @__PURE__ */ F(oe, { children: [p.action.copyValue && /* @__PURE__ */ F("button", {
|
|
2316
2351
|
type: "button",
|
|
2317
2352
|
className: "zv6sjd9",
|
|
2318
|
-
onClick:
|
|
2319
|
-
children: [
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
}),
|
|
2328
|
-
/* @__PURE__ */ N("span", {
|
|
2329
|
-
className: "zv6sjdc",
|
|
2330
|
-
children: m ? "Copied!" : "Click to copy"
|
|
2331
|
-
})
|
|
2332
|
-
]
|
|
2333
|
-
}), /* @__PURE__ */ N(d, {
|
|
2353
|
+
onClick: v,
|
|
2354
|
+
children: [/* @__PURE__ */ P("span", {
|
|
2355
|
+
className: "zv6sjda",
|
|
2356
|
+
children: p.action.copyValue
|
|
2357
|
+
}), P(h ? ce : le, {
|
|
2358
|
+
size: 18,
|
|
2359
|
+
className: "zv6sjdb"
|
|
2360
|
+
})]
|
|
2361
|
+
}), /* @__PURE__ */ P(d, {
|
|
2334
2362
|
className: "zv6sjd8",
|
|
2335
2363
|
onClick: () => {
|
|
2336
|
-
|
|
2364
|
+
p.action?.type === "redirect" && (l?.(s, {
|
|
2337
2365
|
action_type: "redirect",
|
|
2338
|
-
redirect_url:
|
|
2339
|
-
open_in_new_tab: !!
|
|
2340
|
-
}),
|
|
2366
|
+
redirect_url: p.action.url,
|
|
2367
|
+
open_in_new_tab: !!p.action.openInNewTab
|
|
2368
|
+
}), u(), p.action.openInNewTab ? window.open(p.action.url, "_blank", "noopener,noreferrer") : window.location.href = p.action.url);
|
|
2341
2369
|
},
|
|
2342
|
-
children:
|
|
2343
|
-
})] }), t[
|
|
2344
|
-
let
|
|
2345
|
-
t[
|
|
2346
|
-
className:
|
|
2370
|
+
children: p.action.label || "Button"
|
|
2371
|
+
})] }), t[28] = u, t[29] = p.action, t[30] = h, t[31] = v, t[32] = l, t[33] = s, t[34] = A) : A = t[34];
|
|
2372
|
+
let j;
|
|
2373
|
+
t[35] !== A || t[36] !== T || t[37] !== E || t[38] !== D || t[39] !== O || t[40] !== k ? (j = /* @__PURE__ */ F("div", {
|
|
2374
|
+
className: T,
|
|
2375
|
+
style: E,
|
|
2347
2376
|
children: [
|
|
2348
|
-
T,
|
|
2349
|
-
E,
|
|
2350
2377
|
D,
|
|
2351
|
-
O
|
|
2378
|
+
O,
|
|
2379
|
+
k,
|
|
2380
|
+
A
|
|
2352
2381
|
]
|
|
2353
|
-
}), t[
|
|
2354
|
-
let
|
|
2355
|
-
return t[
|
|
2356
|
-
className:
|
|
2357
|
-
children: [
|
|
2358
|
-
}), t[
|
|
2359
|
-
},
|
|
2382
|
+
}), t[35] = A, t[36] = T, t[37] = E, t[38] = D, t[39] = O, t[40] = k, t[41] = j) : j = t[41];
|
|
2383
|
+
let M;
|
|
2384
|
+
return t[42] !== j || t[43] !== C ? (M = /* @__PURE__ */ F("div", {
|
|
2385
|
+
className: ht,
|
|
2386
|
+
children: [C, j]
|
|
2387
|
+
}), t[42] = j, t[43] = C, t[44] = M) : M = t[44], M;
|
|
2388
|
+
}, $ = (e) => {
|
|
2360
2389
|
if (e == null) return;
|
|
2361
2390
|
if (typeof e == "string") return e;
|
|
2362
2391
|
if (typeof e != "object") return;
|
|
@@ -2364,22 +2393,22 @@ var et = oe([L, I], (e, t) => ({
|
|
|
2364
2393
|
if (typeof t.l != "number" || typeof t.c != "number" || typeof t.h != "number") return;
|
|
2365
2394
|
let n = (e) => Math.round(e * 1e4) / 1e4, r = n(t.l), i = n(t.c), a = n(t.h), o = typeof t.alpha == "number" ? n(t.alpha) : 1;
|
|
2366
2395
|
return o < 1 ? `oklch(${r} ${i} ${a} / ${o})` : `oklch(${r} ${i} ${a})`;
|
|
2367
|
-
},
|
|
2396
|
+
}, Ft = (e) => {
|
|
2368
2397
|
let t = e.colors;
|
|
2369
2398
|
return !t || typeof t != "object" ? !1 : Object.values(t).some((e) => e != null);
|
|
2370
|
-
},
|
|
2371
|
-
if (!e || !
|
|
2399
|
+
}, It = (e) => {
|
|
2400
|
+
if (!e || !Ft(e)) return null;
|
|
2372
2401
|
let t = e.colors, n = t?.brand ?? {}, r = e.fonts, i = e.sizes;
|
|
2373
2402
|
return {
|
|
2374
2403
|
colors: {
|
|
2375
2404
|
brand: {
|
|
2376
|
-
main:
|
|
2377
|
-
foreground:
|
|
2405
|
+
main: $(n.main) ?? "",
|
|
2406
|
+
foreground: $(n.foreground) ?? ""
|
|
2378
2407
|
},
|
|
2379
|
-
text1:
|
|
2380
|
-
text2:
|
|
2381
|
-
page:
|
|
2382
|
-
border:
|
|
2408
|
+
text1: $(t.text1) ?? "",
|
|
2409
|
+
text2: $(t.text2) ?? "",
|
|
2410
|
+
page: $(t.page) ?? "",
|
|
2411
|
+
border: $(t.border) ?? ""
|
|
2383
2412
|
},
|
|
2384
2413
|
fonts: {
|
|
2385
2414
|
heading: r?.heading ?? "inherit",
|
|
@@ -2387,7 +2416,7 @@ var et = oe([L, I], (e, t) => ({
|
|
|
2387
2416
|
},
|
|
2388
2417
|
sizes: { radius: i?.radius ?? "4px" }
|
|
2389
2418
|
};
|
|
2390
|
-
},
|
|
2419
|
+
}, Lt = (e) => {
|
|
2391
2420
|
if (e) return {
|
|
2392
2421
|
colors: {
|
|
2393
2422
|
primary: e.colors?.brand?.main,
|
|
@@ -2408,17 +2437,19 @@ var et = oe([L, I], (e, t) => ({
|
|
|
2408
2437
|
fonts: e.fonts,
|
|
2409
2438
|
radius: e.sizes?.radius
|
|
2410
2439
|
};
|
|
2411
|
-
},
|
|
2440
|
+
}, Rt = (e) => Je(Lt(e)), zt = (e) => {
|
|
2412
2441
|
let t = x(21), n, r, i, a, o;
|
|
2413
2442
|
t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4], o = t[5]) : ({children: n, popupTheme: r, siteTheme: a, style: o, ...i} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a, t[5] = o);
|
|
2414
2443
|
let s;
|
|
2415
|
-
t[6] !== r || t[7] !== a ? (s = r ?? (a ?
|
|
2416
|
-
let c = s
|
|
2417
|
-
|
|
2444
|
+
t[6] !== r || t[7] !== a ? (s = r ?? (a ? It(a) : null), t[6] = r, t[7] = a, t[8] = s) : s = t[8];
|
|
2445
|
+
let c = s;
|
|
2446
|
+
Ue(c?.fonts?.heading, c?.fonts?.body);
|
|
2447
|
+
let l;
|
|
2448
|
+
t[9] === Symbol.for("react.memo_cache_sentinel") ? (l = I(y, f), t[9] = l) : l = t[9];
|
|
2418
2449
|
let d, p;
|
|
2419
2450
|
t[10] === Symbol.for("react.memo_cache_sentinel") ? (d = m({ baseSpacing: ".625rem" }), p = _({ form: { gap: "1rem" } }), t[10] = d, t[11] = p) : (d = t[10], p = t[11]);
|
|
2420
2451
|
let h;
|
|
2421
|
-
t[12] === c ? h = t[13] : (h =
|
|
2452
|
+
t[12] === c ? h = t[13] : (h = Rt(c), t[12] = c, t[13] = h);
|
|
2422
2453
|
let g;
|
|
2423
2454
|
t[14] !== o || t[15] !== h ? (g = {
|
|
2424
2455
|
...d,
|
|
@@ -2427,64 +2458,64 @@ var et = oe([L, I], (e, t) => ({
|
|
|
2427
2458
|
...o
|
|
2428
2459
|
}, t[14] = o, t[15] = h, t[16] = g) : g = t[16];
|
|
2429
2460
|
let v;
|
|
2430
|
-
return t[17] !== n || t[18] !== i || t[19] !== g ? (v = /* @__PURE__ */
|
|
2461
|
+
return t[17] !== n || t[18] !== i || t[19] !== g ? (v = /* @__PURE__ */ P(u, {
|
|
2431
2462
|
className: l,
|
|
2432
2463
|
cssReset: !0,
|
|
2433
2464
|
style: g,
|
|
2434
2465
|
...i,
|
|
2435
2466
|
children: n
|
|
2436
2467
|
}), t[17] = n, t[18] = i, t[19] = g, t[20] = v) : v = t[20], v;
|
|
2437
|
-
},
|
|
2438
|
-
let e = x(32), { popup: r, callbacks: o } =
|
|
2468
|
+
}, Bt = (e) => e.content.position || "top-right", Vt = () => {
|
|
2469
|
+
let e = x(32), { popup: r, callbacks: o } = St(), { placement: c, id: u } = r, d = Le(st).active_popup_id === u, f = ne(!1), p, m;
|
|
2439
2470
|
e[0] !== o || e[1] !== d || e[2] !== r ? (p = () => {
|
|
2440
|
-
d && !f.current && (f.current = !0, o?.onPopupOpen?.(r, { trigger_type:
|
|
2471
|
+
d && !f.current && (f.current = !0, o?.onPopupOpen?.(r, { trigger_type: ut() })), d || (f.current = !1);
|
|
2441
2472
|
}, m = [
|
|
2442
2473
|
d,
|
|
2443
2474
|
r,
|
|
2444
2475
|
o
|
|
2445
2476
|
], e[0] = o, e[1] = d, e[2] = r, e[3] = p, e[4] = m) : (p = e[3], m = e[4]), j(p, m);
|
|
2446
|
-
let h =
|
|
2477
|
+
let h = wt(), g, _, v, y, b, S, C, w;
|
|
2447
2478
|
if (e[5] !== h || e[6] !== d || e[7] !== c || e[8] !== r) {
|
|
2448
|
-
let o =
|
|
2449
|
-
_ = a, b = d, e[17] === h ? S = e[18] : (S = (e) => !e && h(), e[17] = h, e[18] = S), C = u, w = !u, g = n, e[19] === u ? v = e[20] : (v = u && /* @__PURE__ */
|
|
2450
|
-
className:
|
|
2451
|
-
children: /* @__PURE__ */
|
|
2452
|
-
className:
|
|
2453
|
-
children: [/* @__PURE__ */
|
|
2479
|
+
let o = Bt(r), u = c === "popup", f = c === "slide_in";
|
|
2480
|
+
_ = a, b = d, e[17] === h ? S = e[18] : (S = (e) => !e && h(), e[17] = h, e[18] = S), C = u, w = !u, g = n, e[19] === u ? v = e[20] : (v = u && /* @__PURE__ */ P(i, {}), e[19] = u, e[20] = v), y = u ? /* @__PURE__ */ P(l, {
|
|
2481
|
+
className: gt,
|
|
2482
|
+
children: /* @__PURE__ */ F(s.Popup, {
|
|
2483
|
+
className: X({ placement: c }),
|
|
2484
|
+
children: [/* @__PURE__ */ P(t, {
|
|
2454
2485
|
variant: "ghost",
|
|
2455
2486
|
size: "icon-xs",
|
|
2456
|
-
className:
|
|
2487
|
+
className: Z,
|
|
2457
2488
|
"aria-label": "Close popup",
|
|
2458
|
-
children: /* @__PURE__ */
|
|
2459
|
-
}), /* @__PURE__ */
|
|
2489
|
+
children: /* @__PURE__ */ P(ue, { size: 16 })
|
|
2490
|
+
}), /* @__PURE__ */ P(Q, {})]
|
|
2460
2491
|
})
|
|
2461
|
-
}) : /* @__PURE__ */
|
|
2462
|
-
className:
|
|
2492
|
+
}) : /* @__PURE__ */ F(s.Popup, {
|
|
2493
|
+
className: I(X({
|
|
2463
2494
|
placement: c,
|
|
2464
2495
|
position: o
|
|
2465
2496
|
}), f && "_1gklkndd"),
|
|
2466
|
-
children: [/* @__PURE__ */
|
|
2497
|
+
children: [/* @__PURE__ */ P(t, {
|
|
2467
2498
|
variant: "ghost",
|
|
2468
2499
|
size: "icon-xs",
|
|
2469
|
-
className:
|
|
2500
|
+
className: Z,
|
|
2470
2501
|
"aria-label": "Close popup",
|
|
2471
|
-
children: /* @__PURE__ */
|
|
2472
|
-
}), /* @__PURE__ */
|
|
2502
|
+
children: /* @__PURE__ */ P(ue, { size: 16 })
|
|
2503
|
+
}), /* @__PURE__ */ P(Q, {})]
|
|
2473
2504
|
}), e[5] = h, e[6] = d, e[7] = c, e[8] = r, e[9] = g, e[10] = _, e[11] = v, e[12] = y, e[13] = b, e[14] = S, e[15] = C, e[16] = w;
|
|
2474
2505
|
} else g = e[9], _ = e[10], v = e[11], y = e[12], b = e[13], S = e[14], C = e[15], w = e[16];
|
|
2475
2506
|
let T;
|
|
2476
|
-
e[21] !== g || e[22] !== v || e[23] !== y ? (T = /* @__PURE__ */
|
|
2507
|
+
e[21] !== g || e[22] !== v || e[23] !== y ? (T = /* @__PURE__ */ F(g, { children: [v, y] }), e[21] = g, e[22] = v, e[23] = y, e[24] = T) : T = e[24];
|
|
2477
2508
|
let E;
|
|
2478
|
-
return e[25] !== _ || e[26] !== b || e[27] !== S || e[28] !== C || e[29] !== w || e[30] !== T ? (E = /* @__PURE__ */
|
|
2509
|
+
return e[25] !== _ || e[26] !== b || e[27] !== S || e[28] !== C || e[29] !== w || e[30] !== T ? (E = /* @__PURE__ */ P(_, {
|
|
2479
2510
|
open: b,
|
|
2480
2511
|
onOpenChange: S,
|
|
2481
2512
|
modal: C,
|
|
2482
2513
|
disablePointerDismissal: w,
|
|
2483
2514
|
children: T
|
|
2484
2515
|
}), e[25] = _, e[26] = b, e[27] = S, e[28] = C, e[29] = w, e[30] = T, e[31] = E) : E = e[31], E;
|
|
2485
|
-
},
|
|
2516
|
+
}, Ht = 3e4, Ut = 5e3, Wt = 5e3, Gt = 100, Kt = .5, qt = 5, Jt = (e) => {
|
|
2486
2517
|
if (typeof document > "u") return () => {};
|
|
2487
|
-
let t = !1, n = Date.now(), r = [], i = 0, a = null, o = () => Date.now() - n >=
|
|
2518
|
+
let t = !1, n = Date.now(), r = [], i = 0, a = null, o = () => Date.now() - n >= Ht, s = () => {
|
|
2488
2519
|
t || (t = !0, c(), e());
|
|
2489
2520
|
}, c = () => {
|
|
2490
2521
|
a &&= (clearTimeout(a), null);
|
|
@@ -2496,9 +2527,9 @@ var et = oe([L, I], (e, t) => ({
|
|
|
2496
2527
|
r.push({
|
|
2497
2528
|
y: e.clientY,
|
|
2498
2529
|
t: Date.now()
|
|
2499
|
-
}), r.length >
|
|
2530
|
+
}), r.length > qt && r.shift();
|
|
2500
2531
|
}, f = (e) => {
|
|
2501
|
-
t || !o() || e.clientY > 0 || u() <
|
|
2532
|
+
t || !o() || e.clientY > 0 || u() < Gt || Date.now() - i < Wt || l() < Kt || (c(), a = setTimeout(s, Ut));
|
|
2502
2533
|
}, p = () => {
|
|
2503
2534
|
c();
|
|
2504
2535
|
}, m = () => {
|
|
@@ -2509,38 +2540,38 @@ var et = oe([L, I], (e, t) => ({
|
|
|
2509
2540
|
return document.addEventListener("mousemove", d, { passive: !0 }), document.addEventListener("mouseleave", f), document.addEventListener("mouseenter", p), window.addEventListener("scroll", m, { passive: !0 }), () => {
|
|
2510
2541
|
c(), document.removeEventListener("mousemove", d), document.removeEventListener("mouseleave", f), document.removeEventListener("mouseenter", p), window.removeEventListener("scroll", m), h();
|
|
2511
2542
|
};
|
|
2512
|
-
},
|
|
2543
|
+
}, Yt = (e, t) => {
|
|
2513
2544
|
if (!e) return null;
|
|
2514
|
-
let n = setTimeout(() =>
|
|
2545
|
+
let n = setTimeout(() => Y(t, { trigger_type: "time_on_page" }), e);
|
|
2515
2546
|
return () => clearTimeout(n);
|
|
2516
|
-
},
|
|
2547
|
+
}, Xt = (e, t) => {
|
|
2517
2548
|
if (e === void 0) return null;
|
|
2518
2549
|
let n = !1;
|
|
2519
2550
|
return T.listen((r) => {
|
|
2520
|
-
n || r.depth >= e && (n = !0,
|
|
2551
|
+
n || r.depth >= e && (n = !0, Y(t, { trigger_type: "scroll_depth" }));
|
|
2521
2552
|
});
|
|
2522
|
-
},
|
|
2553
|
+
}, Zt = (e) => {
|
|
2523
2554
|
let t = !1;
|
|
2524
2555
|
return S.listen((n) => {
|
|
2525
|
-
t || n.status === "idle" && (t = !0,
|
|
2556
|
+
t || n.status === "idle" && (t = !0, Y(e, { trigger_type: "inactivity" }));
|
|
2526
2557
|
});
|
|
2527
|
-
},
|
|
2528
|
-
let n = x(11), r = t === void 0 ? !0 : t, { triggers: i, id: a } = e, o =
|
|
2558
|
+
}, Qt = (e, t) => {
|
|
2559
|
+
let n = x(11), r = t === void 0 ? !0 : t, { triggers: i, id: a } = e, o = Le(C), s;
|
|
2529
2560
|
n[0] === Symbol.for("react.memo_cache_sentinel") ? (s = [], n[0] = s) : s = n[0];
|
|
2530
|
-
let c =
|
|
2561
|
+
let c = ne(s), l;
|
|
2531
2562
|
n[1] !== r || n[2] !== o || n[3] !== e || n[4] !== i ? (l = () => {
|
|
2532
2563
|
if (!r || !o || !i) return;
|
|
2533
2564
|
let t = [];
|
|
2534
2565
|
if (i.time_on_page.enabled) {
|
|
2535
|
-
let n =
|
|
2566
|
+
let n = Yt(i.time_on_page.delay_ms, e);
|
|
2536
2567
|
n && t.push(n);
|
|
2537
2568
|
}
|
|
2538
2569
|
if (i.scroll_depth.enabled) {
|
|
2539
|
-
let n =
|
|
2570
|
+
let n = Xt(i.scroll_depth.percent, e);
|
|
2540
2571
|
n && t.push(n);
|
|
2541
2572
|
}
|
|
2542
|
-
return i.exit_intent.enabled && t.push(
|
|
2543
|
-
t.forEach(
|
|
2573
|
+
return i.exit_intent.enabled && t.push(Jt(() => Y(e, { trigger_type: "exit_intent" }))), i.inactivity.enabled && t.push(Zt(e)), c.current = t, () => {
|
|
2574
|
+
t.forEach($t), c.current = [];
|
|
2544
2575
|
};
|
|
2545
2576
|
}, n[1] = r, n[2] = o, n[3] = e, n[4] = i, n[5] = l) : l = n[5];
|
|
2546
2577
|
let u;
|
|
@@ -2551,10 +2582,10 @@ var et = oe([L, I], (e, t) => ({
|
|
|
2551
2582
|
i
|
|
2552
2583
|
], n[6] = r, n[7] = o, n[8] = a, n[9] = i, n[10] = u) : u = n[10], j(l, u);
|
|
2553
2584
|
};
|
|
2554
|
-
function
|
|
2585
|
+
function $t(e) {
|
|
2555
2586
|
return e();
|
|
2556
2587
|
}
|
|
2557
|
-
var
|
|
2588
|
+
var en = (e, t) => {
|
|
2558
2589
|
switch (e.match_type) {
|
|
2559
2590
|
case "is_all_pages": return !0;
|
|
2560
2591
|
case "is": return e.page_id ? t.pageId === e.page_id ? e.value == null || e.value === t.path : !1 : e.value != null && e.value === t.path;
|
|
@@ -2562,7 +2593,7 @@ var Gt = (e, t) => {
|
|
|
2562
2593
|
case "begins_with": return e.value != null && t.path.startsWith(e.value);
|
|
2563
2594
|
default: return !1;
|
|
2564
2595
|
}
|
|
2565
|
-
},
|
|
2596
|
+
}, tn = (e, t) => {
|
|
2566
2597
|
switch (e.match_type) {
|
|
2567
2598
|
case "exact": return t === e.value;
|
|
2568
2599
|
case "contains": return t.includes(e.value);
|
|
@@ -2574,17 +2605,17 @@ var Gt = (e, t) => {
|
|
|
2574
2605
|
}
|
|
2575
2606
|
default: return !1;
|
|
2576
2607
|
}
|
|
2577
|
-
},
|
|
2608
|
+
}, nn = (e, t, n) => {
|
|
2578
2609
|
let r = e.pages?.exclude ?? [];
|
|
2579
|
-
if (r.length > 0 && r.some((e) =>
|
|
2610
|
+
if (r.length > 0 && r.some((e) => en(e, t))) return !1;
|
|
2580
2611
|
let i = e.pages?.include ?? [];
|
|
2581
|
-
if (i.length > 0 && !i.some((e) =>
|
|
2612
|
+
if (i.length > 0 && !i.some((e) => en(e, t))) return !1;
|
|
2582
2613
|
let a = e.referrer?.include ?? [];
|
|
2583
|
-
if (a.length > 0 && (!n || !a.some((e) =>
|
|
2614
|
+
if (a.length > 0 && (!n || !a.some((e) => tn(e, n)))) return !1;
|
|
2584
2615
|
let o = e.referrer?.exclude ?? [];
|
|
2585
|
-
return !(o.length > 0 && n && o.some((e) =>
|
|
2586
|
-
},
|
|
2587
|
-
let t = x(4), { pageId: n } = e, { popup: r } =
|
|
2616
|
+
return !(o.length > 0 && n && o.some((e) => tn(e, n)));
|
|
2617
|
+
}, rn = (e) => {
|
|
2618
|
+
let t = x(4), { pageId: n } = e, { popup: r } = St(), i;
|
|
2588
2619
|
bb0: {
|
|
2589
2620
|
if (!r.target) {
|
|
2590
2621
|
i = !0;
|
|
@@ -2597,7 +2628,7 @@ var Gt = (e, t) => {
|
|
|
2597
2628
|
let e;
|
|
2598
2629
|
if (t[0] !== n || t[1] !== r.target) {
|
|
2599
2630
|
let i = E.get().identity?.referrer?.raw || document.referrer || null, a = new URL(window.location.href, window.location.origin);
|
|
2600
|
-
e =
|
|
2631
|
+
e = nn(r.target, {
|
|
2601
2632
|
pageId: n,
|
|
2602
2633
|
path: a.pathname
|
|
2603
2634
|
}, i), t[0] = n, t[1] = r.target, t[2] = e;
|
|
@@ -2605,19 +2636,19 @@ var Gt = (e, t) => {
|
|
|
2605
2636
|
i = e;
|
|
2606
2637
|
}
|
|
2607
2638
|
let a = i;
|
|
2608
|
-
if (
|
|
2639
|
+
if (Qt(r, a), !a) return null;
|
|
2609
2640
|
let o;
|
|
2610
|
-
return t[3] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */
|
|
2611
|
-
},
|
|
2641
|
+
return t[3] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ P(Vt, {}), t[3] = o) : o = t[3], o;
|
|
2642
|
+
}, an = (e) => {
|
|
2612
2643
|
let t = x(16), { popups: n, pageId: r } = e, i = D(), a, o;
|
|
2613
2644
|
t[0] === n ? (a = t[1], o = t[2]) : (a = () => {
|
|
2614
|
-
|
|
2645
|
+
V(n), U(!1);
|
|
2615
2646
|
}, o = [n], t[0] = n, t[1] = a, t[2] = o), j(a, o);
|
|
2616
2647
|
let s;
|
|
2617
2648
|
t[3] === i ? s = t[4] : (s = (e, t) => {
|
|
2618
2649
|
!i || typeof i.track != "function" || i?.track(e, t);
|
|
2619
2650
|
}, t[3] = i, t[4] = s);
|
|
2620
|
-
let c = s, l =
|
|
2651
|
+
let c = s, l = on, u;
|
|
2621
2652
|
t[5] === c ? u = t[6] : (u = {
|
|
2622
2653
|
onPopupOpen: (e, t) => {
|
|
2623
2654
|
c("popup.view", {
|
|
@@ -2643,20 +2674,20 @@ var Gt = (e, t) => {
|
|
|
2643
2674
|
let d = u, f;
|
|
2644
2675
|
if (t[7] !== d || t[8] !== r || t[9] !== n) {
|
|
2645
2676
|
let e;
|
|
2646
|
-
t[11] !== d || t[12] !== r ? (e = (e) => /* @__PURE__ */
|
|
2677
|
+
t[11] !== d || t[12] !== r ? (e = (e) => /* @__PURE__ */ P(zt, {
|
|
2647
2678
|
popupTheme: e.theme,
|
|
2648
2679
|
siteTheme: e.site?.theme,
|
|
2649
|
-
children: /* @__PURE__ */
|
|
2680
|
+
children: /* @__PURE__ */ P(xt, {
|
|
2650
2681
|
popup: e,
|
|
2651
2682
|
callbacks: d,
|
|
2652
|
-
children: /* @__PURE__ */
|
|
2683
|
+
children: /* @__PURE__ */ P(rn, { pageId: r })
|
|
2653
2684
|
})
|
|
2654
2685
|
}, e.id), t[11] = d, t[12] = r, t[13] = e) : e = t[13], f = n.map(e), t[7] = d, t[8] = r, t[9] = n, t[10] = f;
|
|
2655
2686
|
} else f = t[10];
|
|
2656
2687
|
let p;
|
|
2657
|
-
return t[14] === f ? p = t[15] : (p = /* @__PURE__ */
|
|
2688
|
+
return t[14] === f ? p = t[15] : (p = /* @__PURE__ */ P(oe, { children: f }), t[14] = f, t[15] = p), p;
|
|
2658
2689
|
};
|
|
2659
|
-
function
|
|
2690
|
+
function on(e) {
|
|
2660
2691
|
return {
|
|
2661
2692
|
resource: "builder.popup",
|
|
2662
2693
|
identifier: e.id,
|
|
@@ -2664,6 +2695,6 @@ function Xt(e) {
|
|
|
2664
2695
|
placement: e.placement
|
|
2665
2696
|
};
|
|
2666
2697
|
}
|
|
2667
|
-
var
|
|
2698
|
+
var sn = /* @__PURE__ */ nt({ PopupRenderer: () => an });
|
|
2668
2699
|
//#endregion
|
|
2669
|
-
export {
|
|
2700
|
+
export { Qe as _, X as a, gt as c, mt as d, Z as f, $e as g, Bt as h, H as i, U as l, yt as m, z as n, J as o, Q as p, B as r, et as s, zt as t, V as u, Je as v };
|