@levo-so/site-runtime 0.3.19 → 0.3.21
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-ByiYjJ0S.js +251 -0
- package/BookingCard-DdwLHVGw.js +816 -0
- package/CollectionLabel-CmUFfc_7.js +35 -0
- package/DateTimeWidget-Bk2tk_CT.js +254 -0
- package/{KBChatWidget-GRi6sLpp.js → KBChatWidget-BXRRgelS.js} +223 -223
- package/PhoneWidget-FWE3jD_L.js +97 -0
- package/{Popover-C29yJ7rz.js → Popover-MSrVDAzg.js} +7 -7
- package/PopupBody-DWM55Zh5-B3ysApDM.js +158 -0
- package/PopupDialog-DwAAJ8JS-DkxjZaJL.js +260 -0
- package/PopupRenderer-BVtV4b9I-Dot4Syse.js +207 -0
- package/{RichTextWidget-DfakML79.js → RichTextWidget-KnIKESAD.js} +189 -190
- package/{RteThemeProvider-BQmfSXSl.js → RteThemeProvider-DtTXGcCT.js} +2 -3
- package/Sonner-BsE4Y_t4.js +21 -0
- package/blog-content.js +71 -72
- package/dist-BVFCdirT.js +4471 -0
- package/dist-DEXGyFeH.js +376 -0
- package/index.d.ts +21 -11
- package/index.js +1702 -1390
- package/{themeVars.cssm-ByhhC2Jm.js → inlineBaseTheme-DcNdMEYp.js} +35 -5
- package/{inlineCollectionTheme-CWcMCUti.js → inlineCollectionTheme-DjXuH3bK.js} +1 -1
- package/{inlineRteTheme-CRPtkNXy.js → inlineRteTheme-BYGIJM7P.js} +1 -1
- package/{kbChat-a2dXSeRc.js → kbChat-eFsau7hG.js} +27 -27
- package/package.json +23 -23
- package/{pillChrome-CEpWGNZB.js → pillChrome-Dy3ApFI5.js} +5 -5
- package/popups.js +1 -1
- package/{react-Cj_U6VZQ.js → react-CENbCy5d.js} +6 -5
- package/script.esm-D4nvz3-k.js +62 -0
- package/script.esm-uVCZU25S.js +62 -0
- package/start.js +1 -1
- package/styles.css +1 -1
- package/theme.cssm-iXnQwMCp.js +238 -0
- package/CollectionField-C-6a1ud4.js +0 -270
- package/CollectionInput-BJ__qcbk.js +0 -147
- package/DateTimeWidget-U3lD0q1q.js +0 -255
- package/Dialog-dT7y641z.js +0 -130
- package/LevoProvider-Bsjkcwc8.js +0 -20
- package/PhoneWidget-DQQa4bL6.js +0 -99
- package/PopupBody-BI-MJqmd-DgTQEzda.js +0 -159
- package/PopupRenderer-D66Gx63H-Cd9xJv33.js +0 -388
- package/ThemeProvider-DutrjSTF.js +0 -116
- package/Tooltip-CQB0LyxK.js +0 -67
- package/VerifyButton-BUT70lgz.js +0 -192
- package/createThemeExtension-4AUn51iJ.js +0 -15
- package/dist-6AIgW_iB.js +0 -79
- package/dist-CEdznbFW.js +0 -3668
- package/inlineBaseTheme-BB9e6h5f.js +0 -9
- package/popupState-JmpeKzgM-D_77LiAa.js +0 -229
- package/react-B9yvlbH0.js +0 -74
- package/theme.cssm-DUzmx76l.js +0 -4
- package/usePopupRedirect-CAAdcpaW-Ddjyf4KK.js +0 -82
- /package/{content.cssm-XdMsTGIB.js → content.cssm-D_LSloGW.js} +0 -0
- /package/{es-ByBbirnH.js → es-CK20DkgT.js} +0 -0
- /package/{rolldown-runtime-CAFD8bLK.js → rolldown-runtime-Dy4uBu1J.js} +0 -0
- /package/{routes-CyKmkoRM.js → routes-DO1BLfh9.js} +0 -0
- /package/{rteTheme.cssm-W4gTOijw.js → rteTheme.cssm-BRxusHY4.js} +0 -0
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { c as e, r as t, s as n, t as r, u as i } from "./PopupDialog-DwAAJ8JS-DkxjZaJL.js";
|
|
2
|
+
import { a, c as o } from "./inlineBaseTheme-DcNdMEYp.js";
|
|
3
|
+
import { d as s, l as c, r as l, u } from "./dist-DEXGyFeH.js";
|
|
4
|
+
import { c as d } from "react/compiler-runtime";
|
|
5
|
+
import { useEffect as f, useRef as p } from "react";
|
|
6
|
+
import { Fragment as m, jsx as h } from "react/jsx-runtime";
|
|
7
|
+
import { $activity as g, $isIdentityContextReady as _, $pageLifecycle as v, $scrollBehavior as y, $session as b, getTabCount as x } from "@levo-so/insights/stores";
|
|
8
|
+
//#region ../../libraries/popups/dist/PopupRenderer-BVtV4b9I.js
|
|
9
|
+
var S = 3e4, C = 5e3, w = 5e3, T = 100, E = .5, D = 5, O = (e) => {
|
|
10
|
+
if (typeof document > "u") return () => {};
|
|
11
|
+
let t = !1, n = Date.now(), r = [], i = 0, a = null, o = () => Date.now() - n >= S, s = () => {
|
|
12
|
+
t || (t = !0, c(), e());
|
|
13
|
+
}, c = () => {
|
|
14
|
+
a &&= (clearTimeout(a), null);
|
|
15
|
+
}, l = () => {
|
|
16
|
+
if (r.length < 2) return 0;
|
|
17
|
+
let e = r[0], t = r[r.length - 1], n = t.t - e.t;
|
|
18
|
+
return n === 0 ? 0 : (e.y - t.y) / n;
|
|
19
|
+
}, u = () => r.reduce((e, t) => t.y > e ? t.y : e, 0), d = (e) => {
|
|
20
|
+
r.push({
|
|
21
|
+
y: e.clientY,
|
|
22
|
+
t: Date.now()
|
|
23
|
+
}), r.length > D && r.shift();
|
|
24
|
+
}, f = (e) => {
|
|
25
|
+
t || !o() || e.clientY > 0 || u() < T || Date.now() - i < w || l() < E || (c(), a = setTimeout(s, C));
|
|
26
|
+
}, p = () => {
|
|
27
|
+
c();
|
|
28
|
+
}, m = () => {
|
|
29
|
+
i = Date.now();
|
|
30
|
+
}, h = v.listen((e) => {
|
|
31
|
+
o() && (e === "hidden" || e === "frozen") && s();
|
|
32
|
+
});
|
|
33
|
+
return document.addEventListener("mousemove", d, { passive: !0 }), document.addEventListener("mouseleave", f), document.addEventListener("mouseenter", p), window.addEventListener("scroll", m, { passive: !0 }), () => {
|
|
34
|
+
c(), document.removeEventListener("mousemove", d), document.removeEventListener("mouseleave", f), document.removeEventListener("mouseenter", p), window.removeEventListener("scroll", m), h();
|
|
35
|
+
};
|
|
36
|
+
}, k = (e, t) => {
|
|
37
|
+
if (!e) return null;
|
|
38
|
+
let n = setTimeout(() => u(t, { trigger_type: "time_on_page" }), e);
|
|
39
|
+
return () => clearTimeout(n);
|
|
40
|
+
}, A = (e, t) => {
|
|
41
|
+
if (e === void 0) return null;
|
|
42
|
+
let n = !1;
|
|
43
|
+
return y.listen((r) => {
|
|
44
|
+
n || r.depth >= e && (n = !0, u(t, { trigger_type: "scroll_depth" }));
|
|
45
|
+
});
|
|
46
|
+
}, j = (e) => {
|
|
47
|
+
let t = !1;
|
|
48
|
+
return g.listen((n) => {
|
|
49
|
+
t || n.status === "idle" && (t = !0, u(e, { trigger_type: "inactivity" }));
|
|
50
|
+
});
|
|
51
|
+
}, M = (e, t) => {
|
|
52
|
+
let n = d(11), r = t === void 0 ? !0 : t, { triggers: i, id: a } = e, o = l(_), s;
|
|
53
|
+
n[0] === Symbol.for("react.memo_cache_sentinel") ? (s = [], n[0] = s) : s = n[0];
|
|
54
|
+
let c = p(s), m;
|
|
55
|
+
n[1] !== r || n[2] !== o || n[3] !== e || n[4] !== i ? (m = () => {
|
|
56
|
+
if (!r || !o || !i) return;
|
|
57
|
+
let t = [];
|
|
58
|
+
if (i.time_on_page.enabled) {
|
|
59
|
+
let n = k(i.time_on_page.delay_ms, e);
|
|
60
|
+
n && t.push(n);
|
|
61
|
+
}
|
|
62
|
+
if (i.scroll_depth.enabled) {
|
|
63
|
+
let n = A(i.scroll_depth.percent, e);
|
|
64
|
+
n && t.push(n);
|
|
65
|
+
}
|
|
66
|
+
return i.exit_intent.enabled && t.push(O(() => u(e, { trigger_type: "exit_intent" }))), i.inactivity.enabled && t.push(j(e)), c.current = t, () => {
|
|
67
|
+
t.forEach(N), c.current = [];
|
|
68
|
+
};
|
|
69
|
+
}, n[1] = r, n[2] = o, n[3] = e, n[4] = i, n[5] = m) : m = n[5];
|
|
70
|
+
let h;
|
|
71
|
+
n[6] !== r || n[7] !== o || n[8] !== a || n[9] !== i ? (h = [
|
|
72
|
+
r,
|
|
73
|
+
o,
|
|
74
|
+
a,
|
|
75
|
+
i
|
|
76
|
+
], n[6] = r, n[7] = o, n[8] = a, n[9] = i, n[10] = h) : h = n[10], f(m, h);
|
|
77
|
+
};
|
|
78
|
+
function N(e) {
|
|
79
|
+
return e();
|
|
80
|
+
}
|
|
81
|
+
var P = (e, t) => {
|
|
82
|
+
switch (e.match_type) {
|
|
83
|
+
case "is_all_pages": return !0;
|
|
84
|
+
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;
|
|
85
|
+
case "contains": return e.value != null && t.path.includes(e.value);
|
|
86
|
+
case "begins_with": return e.value != null && t.path.startsWith(e.value);
|
|
87
|
+
default: return !1;
|
|
88
|
+
}
|
|
89
|
+
}, F = (e, t) => {
|
|
90
|
+
switch (e.match_type) {
|
|
91
|
+
case "exact": return t === e.value;
|
|
92
|
+
case "contains": return t.includes(e.value);
|
|
93
|
+
case "domain": try {
|
|
94
|
+
let n = new URL(t).hostname, r = e.value.toLowerCase();
|
|
95
|
+
return n === r || n.endsWith(`.${r}`);
|
|
96
|
+
} catch {
|
|
97
|
+
return !1;
|
|
98
|
+
}
|
|
99
|
+
default: return !1;
|
|
100
|
+
}
|
|
101
|
+
}, I = (e, t, n) => {
|
|
102
|
+
let r = e.pages?.exclude ?? [];
|
|
103
|
+
if (r.length > 0 && r.some((e) => P(e, t))) return !1;
|
|
104
|
+
let i = e.pages?.include ?? [];
|
|
105
|
+
if (i.length > 0 && !i.some((e) => P(e, t))) return !1;
|
|
106
|
+
let a = e.referrer?.include ?? [];
|
|
107
|
+
if (a.length > 0 && (!n || !a.some((e) => F(e, n)))) return !1;
|
|
108
|
+
let o = e.referrer?.exclude ?? [];
|
|
109
|
+
return !(o.length > 0 && n && o.some((e) => F(e, n)));
|
|
110
|
+
}, L = (n) => {
|
|
111
|
+
let r = d(4), { pageId: i } = n, { popup: a } = t(), o;
|
|
112
|
+
bb0: {
|
|
113
|
+
if (!a.target) {
|
|
114
|
+
o = !0;
|
|
115
|
+
break bb0;
|
|
116
|
+
}
|
|
117
|
+
if (typeof window > "u") {
|
|
118
|
+
o = !1;
|
|
119
|
+
break bb0;
|
|
120
|
+
}
|
|
121
|
+
let e;
|
|
122
|
+
if (r[0] !== i || r[1] !== a.target) {
|
|
123
|
+
let t = b.get().identity?.referrer?.raw || document.referrer || null, n = new URL(window.location.href, window.location.origin);
|
|
124
|
+
e = I(a.target, {
|
|
125
|
+
pageId: i,
|
|
126
|
+
path: n.pathname
|
|
127
|
+
}, t), r[0] = i, r[1] = a.target, r[2] = e;
|
|
128
|
+
} else e = r[2];
|
|
129
|
+
o = e;
|
|
130
|
+
}
|
|
131
|
+
let s = o;
|
|
132
|
+
if (M(a, s), !s) return null;
|
|
133
|
+
let c;
|
|
134
|
+
return r[3] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ h(e, {}), r[3] = c) : c = r[3], c;
|
|
135
|
+
}, R = () => {
|
|
136
|
+
let e = y.get(), t = g.get();
|
|
137
|
+
return {
|
|
138
|
+
trigger_scroll_depth: e.depth,
|
|
139
|
+
trigger_scroll_speed: e.speedCategory,
|
|
140
|
+
trigger_scroll_direction: e.direction,
|
|
141
|
+
trigger_activity_status: t.status,
|
|
142
|
+
trigger_activity_seconds: t.seconds,
|
|
143
|
+
trigger_tab_count: x()
|
|
144
|
+
};
|
|
145
|
+
}, z = (e) => {
|
|
146
|
+
let t = d(18), { popups: i, pageId: l } = e, u = o(), p = a(), g, _;
|
|
147
|
+
t[0] === i ? (g = t[1], _ = t[2]) : (g = () => {
|
|
148
|
+
s(i), c(!1);
|
|
149
|
+
}, _ = [i], t[0] = i, t[1] = g, t[2] = _), f(g, _);
|
|
150
|
+
let v;
|
|
151
|
+
t[3] === u ? v = t[4] : (v = (e, t) => {
|
|
152
|
+
!u || typeof u.track != "function" || u?.track(e, t);
|
|
153
|
+
}, t[3] = u, t[4] = v);
|
|
154
|
+
let y = v, b = B, x;
|
|
155
|
+
t[5] === y ? x = t[6] : (x = {
|
|
156
|
+
onPopupOpen: (e, t) => {
|
|
157
|
+
y("popup.view", {
|
|
158
|
+
...b(e),
|
|
159
|
+
trigger_type: t.trigger_type,
|
|
160
|
+
language: e.language,
|
|
161
|
+
...R()
|
|
162
|
+
});
|
|
163
|
+
},
|
|
164
|
+
onPopupClose: (e, t) => {
|
|
165
|
+
y("popup.close", {
|
|
166
|
+
...b(e),
|
|
167
|
+
trigger_type: t.trigger_type,
|
|
168
|
+
dismiss_reason: t.dismiss_reason,
|
|
169
|
+
time_shown_ms: t.time_shown_ms
|
|
170
|
+
});
|
|
171
|
+
},
|
|
172
|
+
onAction: (e, t) => {
|
|
173
|
+
y("popup.action", {
|
|
174
|
+
...b(e),
|
|
175
|
+
...t
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
}, t[5] = y, t[6] = x);
|
|
179
|
+
let S = x, C;
|
|
180
|
+
if (t[7] !== S || t[8] !== p || t[9] !== l || t[10] !== i) {
|
|
181
|
+
let e;
|
|
182
|
+
t[12] !== S || t[13] !== p || t[14] !== l ? (e = (e) => /* @__PURE__ */ h(n, {
|
|
183
|
+
popupTheme: e.theme,
|
|
184
|
+
siteTheme: e.site?.theme,
|
|
185
|
+
children: /* @__PURE__ */ h(r, {
|
|
186
|
+
popup: e,
|
|
187
|
+
callbacks: S,
|
|
188
|
+
client: p,
|
|
189
|
+
children: /* @__PURE__ */ h(L, { pageId: l })
|
|
190
|
+
})
|
|
191
|
+
}, e.id), t[12] = S, t[13] = p, t[14] = l, t[15] = e) : e = t[15], C = i.map(e), t[7] = S, t[8] = p, t[9] = l, t[10] = i, t[11] = C;
|
|
192
|
+
} else C = t[11];
|
|
193
|
+
let w;
|
|
194
|
+
return t[16] === C ? w = t[17] : (w = /* @__PURE__ */ h(m, { children: C }), t[16] = C, t[17] = w), w;
|
|
195
|
+
};
|
|
196
|
+
function B(e) {
|
|
197
|
+
return {
|
|
198
|
+
resource: "builder.popup",
|
|
199
|
+
identifier: e.id,
|
|
200
|
+
popup_title: e.title,
|
|
201
|
+
placement: e.placement,
|
|
202
|
+
popup_action_kind: e.content.action?.type || "none"
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
var V = /* @__PURE__ */ i({ PopupRenderer: () => z });
|
|
206
|
+
//#endregion
|
|
207
|
+
export { V as t };
|