@levo-so/studio 0.1.109 → 0.1.111

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.
Files changed (47) hide show
  1. package/{BillingStep-DZeqbtfs.js → BillingStep-CY2MHQ-L.js} +1 -1
  2. package/{Button-BMUB23Y7.js → Button-DjphTnCg.js} +160 -148
  3. package/CollectionField-DrJuHNsg.js +318 -0
  4. package/{DateTimeWidget-DWbn_kXp.js → DateTimeWidget-BVHZh4EV.js} +13 -14
  5. package/{EntryCard-BNZ-0_Kv.js → EntryCard-BYONyIm5.js} +3 -3
  6. package/{LoginCard-B1XlZfEU.js → LoginCard-CrtSHdaR.js} +3 -3
  7. package/{LoginForm-NmDPe72V.js → LoginForm-DeYsk4kd.js} +2 -2
  8. package/{LoginModal-CVd08mNx.js → LoginModal-BbDfB4S9.js} +3 -3
  9. package/{MessageCard-C2fU_Bo_.js → MessageCard-x6jPClGi.js} +2 -2
  10. package/{MessageFooter-4qIEK91O.js → MessageFooter-CHuPnL_D.js} +1 -1
  11. package/{ModalManager-Dqq7D60M.js → ModalManager-DQVNPEuG.js} +1 -1
  12. package/{PendingApprovalCard-CXOEpAbg.js → PendingApprovalCard-CsnyrSsa.js} +3 -3
  13. package/{PhoneWidget-CtNIit2w.js → PhoneWidget-BaDSMSW5.js} +5 -6
  14. package/{PopupRenderer-SSn97BLs-DQfvcymq.js → PopupRenderer-Dd9zoNIY-Cx663DmW.js} +258 -223
  15. package/{ProfileCard-CzL5uB2z.js → ProfileCard-Dg5TY1Mw.js} +3 -3
  16. package/{RichTextWidget-DkRrKQqN.js → RichTextWidget-yaDCZwIo.js} +10 -11
  17. package/{RteThemeProvider-Cfepkyer.js → RteThemeProvider-LFGzAYi1.js} +2 -2
  18. package/{Toolbar-C3WDkSnO.js → Toolbar-D3PnF7Ud.js} +3 -3
  19. package/{VerifyButton-TNkt-SDu.js → VerifyButton-6BIXAEGp.js} +1 -1
  20. package/{bookingCard-61Yx6JO-.js → bookingCard-D40dbgvH.js} +3 -3
  21. package/collection.js +6 -8
  22. package/dist-bHoi1bCB.js +3795 -0
  23. package/index.d.ts +77 -2
  24. package/index.js +2391 -2197
  25. package/{inlineCollectionTheme-WpCvMKrW.js → inlineCollectionTheme-D2w17LHX.js} +1 -1
  26. package/{inlineRteTheme-Ajq9PNpQ.js → inlineRteTheme-abXxag3B.js} +1 -1
  27. package/package.json +5 -5
  28. package/studio.css +1 -1
  29. package/{utils-BJLmuC5w.js → utils-C_tr8kXV.js} +1 -1
  30. package/CollectionField-xa-jed3_.js +0 -232
  31. package/dist-Cfv-YjpI.js +0 -3469
  32. package/getFieldValidations-CSkSV2hW.js +0 -90
  33. package/widgets-K6ECnoJJ.js +0 -335
  34. /package/{Beams-WJN38XSv.js → Beams-DboMUgCv.js} +0 -0
  35. /package/{CollectionInput-CpNGIXJx.js → CollectionInput-CG-Pu_51.js} +0 -0
  36. /package/{Dots-DggLz5I7.js → Dots-a8xSboDv.js} +0 -0
  37. /package/{Gradient-BSWJAu0a.js → Gradient-NacpoDCM.js} +0 -0
  38. /package/{Grid-BFKl0MUt.js → Grid-BJQvxnks.js} +0 -0
  39. /package/{Popover-O1poOHk2.js → Popover-DnZY1k6o.js} +0 -0
  40. /package/{StripePaymentModal-Do1xHctU.js → StripePaymentModal-BsYNQ4MB.js} +0 -0
  41. /package/{Tooltip-NEMQqPyr.js → Tooltip-DreKXbTO.js} +0 -0
  42. /package/{Waves-BPEgTYoO.js → Waves-DUuT_IFr.js} +0 -0
  43. /package/{authentication-hnV1BI8s.js → authentication-TdyaDNTn.js} +0 -0
  44. /package/{card-5ooLmYSr.js → card-D5fPArfa.js} +0 -0
  45. /package/{dialog-DoxC50i0.js → dialog-LRLdr3kq.js} +0 -0
  46. /package/{theme.cssm-BXDp-ojp.js → theme.cssm-2YTdd8Yh.js} +0 -0
  47. /package/{useLogin-D4A5iRey.js → useLogin-B2HHZxTi.js} +0 -0
@@ -1,9 +1,9 @@
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-Ajq9PNpQ.js";
5
- import { i as h, r as g, t as _ } from "./inlineCollectionTheme-WpCvMKrW.js";
6
- import { n as v, t as y } from "./theme.cssm-BXDp-ojp.js";
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
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";
@@ -12,39 +12,72 @@ import { Suspense as te, createContext as O, lazy as k, useContext as A, useEffe
12
12
  import { persistentAtom as ie } from "@nanostores/persistent";
13
13
  import { atom as N, computed as ae } from "nanostores";
14
14
  import { Fragment as oe, jsx as P, jsxs as F } from "react/jsx-runtime";
15
- import se from "clsx";
16
- import { createRuntimeFn as ce } from "@vanilla-extract/recipes/createRuntimeFn";
17
- import { IconCheck as le, IconCopy as ue, IconX as de } from "@tabler/icons-react";
18
- import { generateJSON as fe } from "@tiptap/html";
19
- import { renderToReactElement as pe } from "@tiptap/static-renderer/pm/react";
20
- import { Bold as me } from "@tiptap/extension-bold";
21
- import { BulletList as he } from "@tiptap/extension-bullet-list";
22
- import { Code as ge } from "@tiptap/extension-code";
23
- import { Color as _e } from "@tiptap/extension-color";
24
- import { Document as ve } from "@tiptap/extension-document";
25
- import { HardBreak as ye } from "@tiptap/extension-hard-break";
26
- import { Heading as be } from "@tiptap/extension-heading";
27
- import { Highlight as xe } from "@tiptap/extension-highlight";
28
- import { Italic as Se } from "@tiptap/extension-italic";
29
- import { Link as Ce } from "@tiptap/extension-link";
30
- import { ListItem as we } from "@tiptap/extension-list-item";
31
- import { OrderedList as Te } from "@tiptap/extension-ordered-list";
32
- import { Paragraph as Ee } from "@tiptap/extension-paragraph";
33
- import { Strike as De } from "@tiptap/extension-strike";
34
- import { Subscript as Oe } from "@tiptap/extension-subscript";
35
- import { Superscript as ke } from "@tiptap/extension-superscript";
36
- import { Text as Ae } from "@tiptap/extension-text";
37
- import { TextStyle as je } from "@tiptap/extension-text-style";
38
- import { Typography as Me } from "@tiptap/extension-typography";
39
- import { Underline as Ne } from "@tiptap/extension-underline";
40
- import { UniqueID as Pe } from "@tiptap/extension-unique-id";
41
- import { Extension as Fe, Node as Ie, mergeAttributes as Le } from "@tiptap/core";
42
- import { useStore as Re } from "@nanostores/react";
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 ze = v(h), Be = (e) => e ? e.radius && !e.radiusScale ? ze({
77
+ var qe = v(h), Je = (e) => e ? e.radius && !e.radiusScale ? qe({
45
78
  ...e,
46
79
  radiusScale: g(e.radius)
47
- }) : ze(e) : {}, Ve = {
80
+ }) : qe(e) : {}, Ye = {
48
81
  100: "1f4af",
49
82
  1234: "1f522",
50
83
  regional_indicator_a: "🇦",
@@ -1978,7 +2011,7 @@ var ze = v(h), Be = (e) => e ? e.radius && !e.radiusScale ? ze({
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
- }, He = "https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64", Ue = (e) => /^[A-Fa-f0-9-]+$/.test(e), We = Ie.create({
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 ze = v(h), Be = (e) => e ? e.radius && !e.radiusScale ? ze({
1995
2028
  return [{ tag: "span[data-type=\"emoji\"]" }];
1996
2029
  },
1997
2030
  renderHTML({ HTMLAttributes: e, node: t }) {
1998
- let n = Le(e, { "data-type": "emoji" }), r = t.attrs.name, i = r ? Ve[r] : void 0;
1999
- return i ? Ue(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: `${He}/${i}.png`,
2036
+ src: `${Xe}/${i}.png`,
2004
2037
  draggable: "false",
2005
2038
  loading: "lazy",
2006
2039
  align: "absmiddle",
@@ -2016,7 +2049,7 @@ var ze = v(h), Be = (e) => e ? e.radius && !e.radiusScale ? ze({
2016
2049
  `:${r || "emoji"}:`
2017
2050
  ];
2018
2051
  }
2019
- }), Ge = Fe.create({
2052
+ }), $e = Pe.create({
2020
2053
  name: "fontSize",
2021
2054
  addOptions() {
2022
2055
  return { types: ["textStyle"] };
@@ -2037,124 +2070,124 @@ var ze = v(h), Be = (e) => e ? e.radius && !e.radiusScale ? ze({
2037
2070
  unsetFontSize: () => ({ chain: e }) => e().setMark("textStyle", { fontSize: null }).removeEmptyTextStyle().run()
2038
2071
  };
2039
2072
  }
2040
- }), Ke = /* @__PURE__ */ e({
2041
- _: () => H,
2042
- c: () => X,
2043
- d: () => dt,
2044
- f: () => ct,
2045
- g: () => B,
2046
- h: () => R,
2047
- i: () => jt,
2048
- l: () => lt,
2049
- m: () => V,
2050
- n: () => Yt,
2051
- o: () => Ot,
2052
- p: () => z,
2053
- r: () => $,
2054
- s: () => Z,
2055
- t: () => Zt,
2056
- u: () => Y,
2057
- v: () => ot,
2058
- y: () => q
2059
- }), qe = Object.defineProperty, Je = (e, t) => {
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) qe(n, r, {
2094
+ for (var r in e) tt(n, r, {
2062
2095
  get: e[r],
2063
2096
  enumerable: !0
2064
2097
  });
2065
- return t || qe(n, Symbol.toStringTag, { value: "Module" }), n;
2066
- }, Ye = 6e4, Xe = "lv_popups_session", I = {
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
- }, L = ie("lv_popups_state", {}, {
2103
+ }, R = ie("lv_popups_state", {}, {
2071
2104
  encode: JSON.stringify,
2072
2105
  decode: JSON.parse
2073
- }), Ze = (e) => {
2074
- if (!e) return I;
2106
+ }), at = (e) => {
2107
+ if (!e) return L;
2075
2108
  try {
2076
2109
  return JSON.parse(e);
2077
2110
  } catch {
2078
- return I;
2111
+ return L;
2079
2112
  }
2080
- }, R = N((() => {
2081
- if (typeof sessionStorage > "u") return I;
2113
+ }, z = N((() => {
2114
+ if (typeof sessionStorage > "u") return L;
2082
2115
  try {
2083
- return Ze(sessionStorage.getItem(Xe));
2116
+ return at(sessionStorage.getItem(it));
2084
2117
  } catch {
2085
- return I;
2118
+ return L;
2086
2119
  }
2087
- })()), Qe = R.set;
2088
- R.set = (e) => {
2089
- Qe(e);
2120
+ })()), ot = z.set;
2121
+ z.set = (e) => {
2122
+ ot(e);
2090
2123
  try {
2091
- sessionStorage.setItem(Xe, JSON.stringify(e));
2124
+ sessionStorage.setItem(it, JSON.stringify(e));
2092
2125
  } catch {}
2093
2126
  };
2094
- var $e = ae([R, L], (e, t) => ({
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
- })), z = N([]), B = (e) => {
2100
- z.set(e);
2101
- }, V = N(!0), H = (e) => {
2102
- V.set(e);
2103
- }, et = () => $e.get(), tt = (e, t) => e.includes(t) ? e : [...e, t], U = "manual", nt = () => U, W = [], G = null, rt = () => {
2104
- if (G) return;
2105
- let { last_closed_at: e } = R.get();
2132
+ })), B = N([]), V = (e) => {
2133
+ B.set(e);
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 = Ye - (Date.now() - e);
2140
+ let t = rt - (Date.now() - e);
2108
2141
  if (t <= 0) {
2109
- K();
2142
+ q();
2110
2143
  return;
2111
2144
  }
2112
- G = setTimeout(() => {
2113
- G = null, K();
2145
+ K = setTimeout(() => {
2146
+ K = null, q();
2114
2147
  }, t);
2115
- }, K = () => {
2116
- let e = R.get();
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
- rt();
2152
+ dt();
2120
2153
  return;
2121
2154
  }
2122
- for (; W.length > 0;) {
2123
- let e = W.shift();
2124
- if (q(e.popup, { trigger_type: e.trigger_type })) return;
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
- }, it = (e, t) => {
2128
- W.some((t) => t.popup.id === e.id) || (W.push({
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
- }), rt());
2132
- }, at = (e, t) => {
2133
- let n = et();
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
- }, q = (e, t = {}) => {
2138
- let { force: n = !1, trigger_type: r = "manual" } = t, i = e.id, a = e.settings?.display_frequency, o = R.get();
2139
- return o.active_popup_id === i ? !0 : !n && (o.active_popup_id || o.last_closed_at && Date.now() - o.last_closed_at < 6e4 || !at(i, a)) ? !1 : (G &&= (clearTimeout(G), null), U = r, R.set({
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: tt(o.shown_popup_ids, i),
2174
+ shown_popup_ids: lt(o.shown_popup_ids, i),
2142
2175
  last_closed_at: o.last_closed_at
2143
- }), !a || a.type === "always" || L.set({
2144
- ...L.get(),
2176
+ }), !a || a.type === "always" || R.set({
2177
+ ...R.get(),
2145
2178
  [i]: { triggered_at: Date.now() }
2146
2179
  }), !0);
2147
- }, J = (e, t = {}) => {
2180
+ }, Y = (e, t = {}) => {
2148
2181
  let { trigger_type: n = "manual" } = t;
2149
- return q(e, { trigger_type: n }) ? !0 : (at(e.id, e.settings?.display_frequency) && it(e, n), !1);
2150
- }, ot = (e) => {
2151
- let t = R.get();
2152
- t.active_popup_id === e && (U = "manual", R.set({
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(K, 0));
2157
- }, Y = ce({
2189
+ }), setTimeout(q, 0));
2190
+ }, X = se({
2158
2191
  defaultClassName: "_1gklknd4",
2159
2192
  variantClassNames: {
2160
2193
  placement: {
@@ -2170,7 +2203,7 @@ var $e = ae([R, L], (e, t) => ({
2170
2203
  },
2171
2204
  defaultVariants: { placement: "popup" },
2172
2205
  compoundVariants: []
2173
- }), st = "_1gklkndb", ct = "_1gklkndc", lt = "_1gklkndd", ut = ce({
2206
+ }), ht = "_1gklkndb", gt = "_1gklkndc", _t = "_1gklkndd", vt = se({
2174
2207
  defaultClassName: "_1gklknde",
2175
2208
  variantClassNames: { size: {
2176
2209
  small: "_1gklkndf",
@@ -2180,75 +2213,75 @@ var $e = ae([R, L], (e, t) => ({
2180
2213
  } },
2181
2214
  defaultVariants: { size: "medium" },
2182
2215
  compoundVariants: []
2183
- }), dt = "_1gklkndl", X = "_1gklkndm", ft = O(null), pt = (e) => {
2216
+ }), yt = "_1gklkndl", Z = "_1gklkndm", bt = O(null), xt = (e) => {
2184
2217
  let t = x(6), { popup: n, callbacks: r, children: i } = e, a;
2185
2218
  t[0] !== r || t[1] !== n ? (a = {
2186
2219
  popup: n,
2187
2220
  callbacks: r
2188
2221
  }, t[0] = r, t[1] = n, t[2] = a) : a = t[2];
2189
2222
  let o;
2190
- return t[3] !== i || t[4] !== a ? (o = /* @__PURE__ */ P(ft.Provider, {
2223
+ return t[3] !== i || t[4] !== a ? (o = /* @__PURE__ */ P(bt.Provider, {
2191
2224
  value: a,
2192
2225
  children: i
2193
2226
  }), t[3] = i, t[4] = a, t[5] = o) : o = t[5], o;
2194
- }, mt = () => {
2195
- let e = A(ft);
2227
+ }, St = () => {
2228
+ let e = A(bt);
2196
2229
  if (!e) throw Error("usePopupContext must be used within a PopupProvider");
2197
2230
  return e;
2198
- }, ht = () => A(ft), gt = () => {
2199
- let e = x(2), t = ht(), n;
2231
+ }, Ct = () => A(bt), wt = () => {
2232
+ let e = x(2), t = Ct(), n;
2200
2233
  return e[0] === t ? n = e[1] : (n = () => {
2201
- t && (t.callbacks?.onPopupClose?.(t.popup, { trigger_type: nt() }), ot(t.popup.id));
2234
+ t && (t.callbacks?.onPopupClose?.(t.popup, { trigger_type: ut() }), mt(t.popup.id));
2202
2235
  }, e[0] = t, e[1] = n), n;
2203
- }, _t = "zv6sjd4", vt = "zv6sjd5", yt = "zv6sjd6", bt = [
2204
- ve,
2236
+ }, Tt = "zv6sjd4", Et = "zv6sjd5", Dt = "zv6sjd6", Ot = [
2237
+ _e,
2238
+ Te,
2239
+ ke,
2240
+ ye,
2241
+ pe,
2242
+ xe,
2205
2243
  Ee,
2206
- Ae,
2207
- be,
2208
- me,
2209
- Se,
2210
- De,
2211
- ge,
2212
2244
  he,
2213
- Te,
2245
+ me,
2214
2246
  we,
2215
- ye,
2216
- Ne,
2217
- Ce.configure({ openOnClick: !1 }),
2218
- je,
2219
- Ge,
2247
+ Ce,
2248
+ ve,
2220
2249
  Me,
2221
- ke,
2250
+ Se.configure({ openOnClick: !1 }),
2251
+ Ae,
2252
+ $e,
2253
+ je,
2222
2254
  Oe,
2223
- _e,
2224
- xe.configure({ multicolor: !0 }),
2225
- We,
2255
+ De,
2256
+ ge,
2257
+ be.configure({ multicolor: !0 }),
2258
+ Qe,
2226
2259
  b,
2227
- Pe.configure({ types: [
2260
+ Ne.configure({ types: [
2228
2261
  "paragraph",
2229
2262
  "heading",
2230
2263
  "bulletList",
2231
2264
  "orderedList"
2232
2265
  ] })
2233
- ], xt = (e) => fe(e, bt), St = ({ content: e, className: t, ref: n, ...r }) => {
2234
- let i = M(() => e ? typeof e == "string" ? e ? xt(e) : null : e.json && Object.keys(e.json).length > 0 ? e.json : e.html ? xt(e.html) : null : null, [e]), a = M(() => i ? pe({
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({
2235
2268
  content: i,
2236
- extensions: bt
2269
+ extensions: Ot
2237
2270
  }) : null, [i]);
2238
2271
  return a ? /* @__PURE__ */ P("div", {
2239
2272
  ref: n,
2240
- className: se(p, t),
2273
+ className: I(p, t),
2241
2274
  ...r,
2242
2275
  children: a
2243
2276
  }) : null;
2244
- }, Ct = k(() => import("./dist-Cfv-YjpI.js").then((e) => e.t).then((e) => ({ default: e.CollectionFormBuilder }))), wt = {
2245
- left: _t,
2246
- center: vt,
2247
- right: yt
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
- }, Z = (e) => {
2251
- let t = x(45), { popup: n, disableInteraction: i } = e, a = ht(), s = a?.popup ?? n, l = a?.callbacks?.onAction, u = gt(), f = !a, { content: p } = s, { workspace: m } = ee(), [h, g] = re(!1), _;
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), _;
2252
2285
  t[0] !== p.action || t[1] !== l || t[2] !== s ? (_ = () => {
2253
2286
  if (p.action?.type !== "redirect" || !p.action.copyValue) return;
2254
2287
  let e = p.action.copyValue;
@@ -2260,21 +2293,21 @@ var $e = ae([R, L], (e, t) => ({
2260
2293
  });
2261
2294
  }, t[0] = p.action, t[1] = l, t[2] = s, t[3] = _) : _ = t[3];
2262
2295
  let v = _, y = p.align ?? "left", b;
2263
- t[4] === p.coverImageRatio ? b = t[5] : (b = Tt(p.coverImageRatio), t[4] = p.coverImageRatio, t[5] = b);
2296
+ t[4] === p.coverImageRatio ? b = t[5] : (b = Nt(p.coverImageRatio), t[4] = p.coverImageRatio, t[5] = b);
2264
2297
  let S = b, C;
2265
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
2300
  style: { aspectRatio: S },
2268
2301
  children: /* @__PURE__ */ P("img", {
2269
2302
  src: p.coverImage.location,
2270
- srcSet: Et(s),
2303
+ srcSet: Pt(s),
2271
2304
  alt: "",
2272
2305
  className: "_1gklkndk",
2273
2306
  style: p.coverImageFocus ? { objectPosition: p.coverImageFocus.replace("-", " ") } : void 0
2274
2307
  })
2275
2308
  }), t[6] = S, t[7] = p.coverImage, t[8] = p.coverImageFocus, t[9] = s, t[10] = C) : C = t[10];
2276
2309
  let w = p.size ?? "medium", T;
2277
- t[11] === w ? T = t[12] : (T = ut({ size: w }), t[11] = w, t[12] = T);
2310
+ t[11] === w ? T = t[12] : (T = vt({ size: w }), t[11] = w, t[12] = T);
2278
2311
  let E;
2279
2312
  t[13] === i ? E = t[14] : (E = i ? { pointerEvents: "none" } : void 0, t[13] = i, t[14] = E);
2280
2313
  let D;
@@ -2284,14 +2317,14 @@ var $e = ae([R, L], (e, t) => ({
2284
2317
  children: [p.heading && /* @__PURE__ */ P(r, { children: p.heading }), p.description && /* @__PURE__ */ P(o, { children: p.description })]
2285
2318
  }), t[15] = y, t[16] = p.description, t[17] = p.heading, t[18] = D) : D = t[18];
2286
2319
  let O;
2287
- t[19] === p.body ? O = t[20] : (O = (p.body?.html || p.body?.json) && /* @__PURE__ */ P(St, {
2320
+ t[19] === p.body ? O = t[20] : (O = (p.body?.html || p.body?.json) && /* @__PURE__ */ P(At, {
2288
2321
  className: "zv6sjd1",
2289
2322
  content: p.body
2290
2323
  }), t[19] = p.body, t[20] = O);
2291
2324
  let k;
2292
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", {
2293
2326
  className: "zv6sjd3",
2294
- children: /* @__PURE__ */ P(te, { children: /* @__PURE__ */ P(Ct, {
2327
+ children: /* @__PURE__ */ P(te, { children: /* @__PURE__ */ P(jt, {
2295
2328
  collection_id: p.action.collectionKey,
2296
2329
  uiConfig: {
2297
2330
  hideFormHeading: !0,
@@ -2300,7 +2333,7 @@ var $e = ae([R, L], (e, t) => ({
2300
2333
  submitButtonConfig: {
2301
2334
  show: !0,
2302
2335
  text: p.action.label || "Submit",
2303
- styles: p.action.fullWidth ? "zv6sjd7" : wt[y]
2336
+ styles: p.action.fullWidth ? "zv6sjd7" : Mt[y]
2304
2337
  },
2305
2338
  workspace_id: m,
2306
2339
  containerStyles: "zv6sjd2",
@@ -2321,7 +2354,7 @@ var $e = ae([R, L], (e, t) => ({
2321
2354
  children: [/* @__PURE__ */ P("span", {
2322
2355
  className: "zv6sjda",
2323
2356
  children: p.action.copyValue
2324
- }), P(h ? le : ue, {
2357
+ }), P(h ? ce : le, {
2325
2358
  size: 18,
2326
2359
  className: "zv6sjdb"
2327
2360
  })]
@@ -2349,10 +2382,10 @@ var $e = ae([R, L], (e, t) => ({
2349
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];
2350
2383
  let M;
2351
2384
  return t[42] !== j || t[43] !== C ? (M = /* @__PURE__ */ F("div", {
2352
- className: st,
2385
+ className: ht,
2353
2386
  children: [C, j]
2354
2387
  }), t[42] = j, t[43] = C, t[44] = M) : M = t[44], M;
2355
- }, Q = (e) => {
2388
+ }, $ = (e) => {
2356
2389
  if (e == null) return;
2357
2390
  if (typeof e == "string") return e;
2358
2391
  if (typeof e != "object") return;
@@ -2360,22 +2393,22 @@ var $e = ae([R, L], (e, t) => ({
2360
2393
  if (typeof t.l != "number" || typeof t.c != "number" || typeof t.h != "number") return;
2361
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;
2362
2395
  return o < 1 ? `oklch(${r} ${i} ${a} / ${o})` : `oklch(${r} ${i} ${a})`;
2363
- }, Dt = (e) => {
2396
+ }, Ft = (e) => {
2364
2397
  let t = e.colors;
2365
2398
  return !t || typeof t != "object" ? !1 : Object.values(t).some((e) => e != null);
2366
- }, Ot = (e) => {
2367
- if (!e || !Dt(e)) return null;
2399
+ }, It = (e) => {
2400
+ if (!e || !Ft(e)) return null;
2368
2401
  let t = e.colors, n = t?.brand ?? {}, r = e.fonts, i = e.sizes;
2369
2402
  return {
2370
2403
  colors: {
2371
2404
  brand: {
2372
- main: Q(n.main) ?? "",
2373
- foreground: Q(n.foreground) ?? ""
2405
+ main: $(n.main) ?? "",
2406
+ foreground: $(n.foreground) ?? ""
2374
2407
  },
2375
- text1: Q(t.text1) ?? "",
2376
- text2: Q(t.text2) ?? "",
2377
- page: Q(t.page) ?? "",
2378
- border: Q(t.border) ?? ""
2408
+ text1: $(t.text1) ?? "",
2409
+ text2: $(t.text2) ?? "",
2410
+ page: $(t.page) ?? "",
2411
+ border: $(t.border) ?? ""
2379
2412
  },
2380
2413
  fonts: {
2381
2414
  heading: r?.heading ?? "inherit",
@@ -2383,7 +2416,7 @@ var $e = ae([R, L], (e, t) => ({
2383
2416
  },
2384
2417
  sizes: { radius: i?.radius ?? "4px" }
2385
2418
  };
2386
- }, kt = (e) => {
2419
+ }, Lt = (e) => {
2387
2420
  if (e) return {
2388
2421
  colors: {
2389
2422
  primary: e.colors?.brand?.main,
@@ -2404,17 +2437,19 @@ var $e = ae([R, L], (e, t) => ({
2404
2437
  fonts: e.fonts,
2405
2438
  radius: e.sizes?.radius
2406
2439
  };
2407
- }, At = (e) => Be(kt(e)), jt = (e) => {
2440
+ }, Rt = (e) => Je(Lt(e)), zt = (e) => {
2408
2441
  let t = x(21), n, r, i, a, o;
2409
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);
2410
2443
  let s;
2411
- t[6] !== r || t[7] !== a ? (s = r ?? (a ? Ot(a) : null), t[6] = r, t[7] = a, t[8] = s) : s = t[8];
2412
- let c = s, l;
2413
- t[9] === Symbol.for("react.memo_cache_sentinel") ? (l = se(y, f), t[9] = l) : l = t[9];
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];
2414
2449
  let d, p;
2415
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]);
2416
2451
  let h;
2417
- t[12] === c ? h = t[13] : (h = At(c), t[12] = c, t[13] = h);
2452
+ t[12] === c ? h = t[13] : (h = Rt(c), t[12] = c, t[13] = h);
2418
2453
  let g;
2419
2454
  t[14] !== o || t[15] !== h ? (g = {
2420
2455
  ...d,
@@ -2430,42 +2465,42 @@ var $e = ae([R, L], (e, t) => ({
2430
2465
  ...i,
2431
2466
  children: n
2432
2467
  }), t[17] = n, t[18] = i, t[19] = g, t[20] = v) : v = t[20], v;
2433
- }, $ = (e) => e.content.position || "top-right", Mt = () => {
2434
- let e = x(32), { popup: r, callbacks: o } = mt(), { placement: c, id: u } = r, d = Re($e).active_popup_id === u, f = ne(!1), p, m;
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;
2435
2470
  e[0] !== o || e[1] !== d || e[2] !== r ? (p = () => {
2436
- d && !f.current && (f.current = !0, o?.onPopupOpen?.(r, { trigger_type: nt() })), d || (f.current = !1);
2471
+ d && !f.current && (f.current = !0, o?.onPopupOpen?.(r, { trigger_type: ut() })), d || (f.current = !1);
2437
2472
  }, m = [
2438
2473
  d,
2439
2474
  r,
2440
2475
  o
2441
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);
2442
- let h = gt(), g, _, v, y, b, S, C, w;
2477
+ let h = wt(), g, _, v, y, b, S, C, w;
2443
2478
  if (e[5] !== h || e[6] !== d || e[7] !== c || e[8] !== r) {
2444
- let o = $(r), u = c === "popup", f = c === "slide_in";
2479
+ let o = Bt(r), u = c === "popup", f = c === "slide_in";
2445
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, {
2446
- className: ct,
2481
+ className: gt,
2447
2482
  children: /* @__PURE__ */ F(s.Popup, {
2448
- className: Y({ placement: c }),
2483
+ className: X({ placement: c }),
2449
2484
  children: [/* @__PURE__ */ P(t, {
2450
2485
  variant: "ghost",
2451
2486
  size: "icon-xs",
2452
- className: X,
2487
+ className: Z,
2453
2488
  "aria-label": "Close popup",
2454
- children: /* @__PURE__ */ P(de, { size: 16 })
2455
- }), /* @__PURE__ */ P(Z, {})]
2489
+ children: /* @__PURE__ */ P(ue, { size: 16 })
2490
+ }), /* @__PURE__ */ P(Q, {})]
2456
2491
  })
2457
2492
  }) : /* @__PURE__ */ F(s.Popup, {
2458
- className: se(Y({
2493
+ className: I(X({
2459
2494
  placement: c,
2460
2495
  position: o
2461
2496
  }), f && "_1gklkndd"),
2462
2497
  children: [/* @__PURE__ */ P(t, {
2463
2498
  variant: "ghost",
2464
2499
  size: "icon-xs",
2465
- className: X,
2500
+ className: Z,
2466
2501
  "aria-label": "Close popup",
2467
- children: /* @__PURE__ */ P(de, { size: 16 })
2468
- }), /* @__PURE__ */ P(Z, {})]
2502
+ children: /* @__PURE__ */ P(ue, { size: 16 })
2503
+ }), /* @__PURE__ */ P(Q, {})]
2469
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;
2470
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];
2471
2506
  let T;
@@ -2478,9 +2513,9 @@ var $e = ae([R, L], (e, t) => ({
2478
2513
  disablePointerDismissal: w,
2479
2514
  children: T
2480
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;
2481
- }, Nt = 3e4, Pt = 5e3, Ft = 5e3, It = 100, Lt = .5, Rt = 5, zt = (e) => {
2516
+ }, Ht = 3e4, Ut = 5e3, Wt = 5e3, Gt = 100, Kt = .5, qt = 5, Jt = (e) => {
2482
2517
  if (typeof document > "u") return () => {};
2483
- let t = !1, n = Date.now(), r = [], i = 0, a = null, o = () => Date.now() - n >= Nt, s = () => {
2518
+ let t = !1, n = Date.now(), r = [], i = 0, a = null, o = () => Date.now() - n >= Ht, s = () => {
2484
2519
  t || (t = !0, c(), e());
2485
2520
  }, c = () => {
2486
2521
  a &&= (clearTimeout(a), null);
@@ -2492,9 +2527,9 @@ var $e = ae([R, L], (e, t) => ({
2492
2527
  r.push({
2493
2528
  y: e.clientY,
2494
2529
  t: Date.now()
2495
- }), r.length > Rt && r.shift();
2530
+ }), r.length > qt && r.shift();
2496
2531
  }, f = (e) => {
2497
- t || !o() || e.clientY > 0 || u() < It || Date.now() - i < Ft || l() < Lt || (c(), a = setTimeout(s, Pt));
2532
+ t || !o() || e.clientY > 0 || u() < Gt || Date.now() - i < Wt || l() < Kt || (c(), a = setTimeout(s, Ut));
2498
2533
  }, p = () => {
2499
2534
  c();
2500
2535
  }, m = () => {
@@ -2505,38 +2540,38 @@ var $e = ae([R, L], (e, t) => ({
2505
2540
  return document.addEventListener("mousemove", d, { passive: !0 }), document.addEventListener("mouseleave", f), document.addEventListener("mouseenter", p), window.addEventListener("scroll", m, { passive: !0 }), () => {
2506
2541
  c(), document.removeEventListener("mousemove", d), document.removeEventListener("mouseleave", f), document.removeEventListener("mouseenter", p), window.removeEventListener("scroll", m), h();
2507
2542
  };
2508
- }, Bt = (e, t) => {
2543
+ }, Yt = (e, t) => {
2509
2544
  if (!e) return null;
2510
- let n = setTimeout(() => J(t, { trigger_type: "time_on_page" }), e);
2545
+ let n = setTimeout(() => Y(t, { trigger_type: "time_on_page" }), e);
2511
2546
  return () => clearTimeout(n);
2512
- }, Vt = (e, t) => {
2547
+ }, Xt = (e, t) => {
2513
2548
  if (e === void 0) return null;
2514
2549
  let n = !1;
2515
2550
  return T.listen((r) => {
2516
- n || r.depth >= e && (n = !0, J(t, { trigger_type: "scroll_depth" }));
2551
+ n || r.depth >= e && (n = !0, Y(t, { trigger_type: "scroll_depth" }));
2517
2552
  });
2518
- }, Ht = (e) => {
2553
+ }, Zt = (e) => {
2519
2554
  let t = !1;
2520
2555
  return S.listen((n) => {
2521
- t || n.status === "idle" && (t = !0, J(e, { trigger_type: "inactivity" }));
2556
+ t || n.status === "idle" && (t = !0, Y(e, { trigger_type: "inactivity" }));
2522
2557
  });
2523
- }, Ut = (e, t) => {
2524
- let n = x(11), r = t === void 0 ? !0 : t, { triggers: i, id: a } = e, o = Re(C), s;
2558
+ }, Qt = (e, t) => {
2559
+ let n = x(11), r = t === void 0 ? !0 : t, { triggers: i, id: a } = e, o = Le(C), s;
2525
2560
  n[0] === Symbol.for("react.memo_cache_sentinel") ? (s = [], n[0] = s) : s = n[0];
2526
2561
  let c = ne(s), l;
2527
2562
  n[1] !== r || n[2] !== o || n[3] !== e || n[4] !== i ? (l = () => {
2528
2563
  if (!r || !o || !i) return;
2529
2564
  let t = [];
2530
2565
  if (i.time_on_page.enabled) {
2531
- let n = Bt(i.time_on_page.delay_ms, e);
2566
+ let n = Yt(i.time_on_page.delay_ms, e);
2532
2567
  n && t.push(n);
2533
2568
  }
2534
2569
  if (i.scroll_depth.enabled) {
2535
- let n = Vt(i.scroll_depth.percent, e);
2570
+ let n = Xt(i.scroll_depth.percent, e);
2536
2571
  n && t.push(n);
2537
2572
  }
2538
- return i.exit_intent.enabled && t.push(zt(() => J(e, { trigger_type: "exit_intent" }))), i.inactivity.enabled && t.push(Ht(e)), c.current = t, () => {
2539
- t.forEach(Wt), c.current = [];
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 = [];
2540
2575
  };
2541
2576
  }, n[1] = r, n[2] = o, n[3] = e, n[4] = i, n[5] = l) : l = n[5];
2542
2577
  let u;
@@ -2547,10 +2582,10 @@ var $e = ae([R, L], (e, t) => ({
2547
2582
  i
2548
2583
  ], n[6] = r, n[7] = o, n[8] = a, n[9] = i, n[10] = u) : u = n[10], j(l, u);
2549
2584
  };
2550
- function Wt(e) {
2585
+ function $t(e) {
2551
2586
  return e();
2552
2587
  }
2553
- var Gt = (e, t) => {
2588
+ var en = (e, t) => {
2554
2589
  switch (e.match_type) {
2555
2590
  case "is_all_pages": return !0;
2556
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;
@@ -2558,7 +2593,7 @@ var Gt = (e, t) => {
2558
2593
  case "begins_with": return e.value != null && t.path.startsWith(e.value);
2559
2594
  default: return !1;
2560
2595
  }
2561
- }, Kt = (e, t) => {
2596
+ }, tn = (e, t) => {
2562
2597
  switch (e.match_type) {
2563
2598
  case "exact": return t === e.value;
2564
2599
  case "contains": return t.includes(e.value);
@@ -2570,17 +2605,17 @@ var Gt = (e, t) => {
2570
2605
  }
2571
2606
  default: return !1;
2572
2607
  }
2573
- }, qt = (e, t, n) => {
2608
+ }, nn = (e, t, n) => {
2574
2609
  let r = e.pages?.exclude ?? [];
2575
- if (r.length > 0 && r.some((e) => Gt(e, t))) return !1;
2610
+ if (r.length > 0 && r.some((e) => en(e, t))) return !1;
2576
2611
  let i = e.pages?.include ?? [];
2577
- if (i.length > 0 && !i.some((e) => Gt(e, t))) return !1;
2612
+ if (i.length > 0 && !i.some((e) => en(e, t))) return !1;
2578
2613
  let a = e.referrer?.include ?? [];
2579
- if (a.length > 0 && (!n || !a.some((e) => Kt(e, n)))) return !1;
2614
+ if (a.length > 0 && (!n || !a.some((e) => tn(e, n)))) return !1;
2580
2615
  let o = e.referrer?.exclude ?? [];
2581
- return !(o.length > 0 && n && o.some((e) => Kt(e, n)));
2582
- }, Jt = (e) => {
2583
- let t = x(4), { pageId: n } = e, { popup: r } = mt(), i;
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;
2584
2619
  bb0: {
2585
2620
  if (!r.target) {
2586
2621
  i = !0;
@@ -2593,7 +2628,7 @@ var Gt = (e, t) => {
2593
2628
  let e;
2594
2629
  if (t[0] !== n || t[1] !== r.target) {
2595
2630
  let i = E.get().identity?.referrer?.raw || document.referrer || null, a = new URL(window.location.href, window.location.origin);
2596
- e = qt(r.target, {
2631
+ e = nn(r.target, {
2597
2632
  pageId: n,
2598
2633
  path: a.pathname
2599
2634
  }, i), t[0] = n, t[1] = r.target, t[2] = e;
@@ -2601,19 +2636,19 @@ var Gt = (e, t) => {
2601
2636
  i = e;
2602
2637
  }
2603
2638
  let a = i;
2604
- if (Ut(r, a), !a) return null;
2639
+ if (Qt(r, a), !a) return null;
2605
2640
  let o;
2606
- return t[3] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ P(Mt, {}), t[3] = o) : o = t[3], o;
2607
- }, Yt = (e) => {
2641
+ return t[3] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ P(Vt, {}), t[3] = o) : o = t[3], o;
2642
+ }, an = (e) => {
2608
2643
  let t = x(16), { popups: n, pageId: r } = e, i = D(), a, o;
2609
2644
  t[0] === n ? (a = t[1], o = t[2]) : (a = () => {
2610
- B(n), H(!1);
2645
+ V(n), U(!1);
2611
2646
  }, o = [n], t[0] = n, t[1] = a, t[2] = o), j(a, o);
2612
2647
  let s;
2613
2648
  t[3] === i ? s = t[4] : (s = (e, t) => {
2614
2649
  !i || typeof i.track != "function" || i?.track(e, t);
2615
2650
  }, t[3] = i, t[4] = s);
2616
- let c = s, l = Xt, u;
2651
+ let c = s, l = on, u;
2617
2652
  t[5] === c ? u = t[6] : (u = {
2618
2653
  onPopupOpen: (e, t) => {
2619
2654
  c("popup.view", {
@@ -2639,20 +2674,20 @@ var Gt = (e, t) => {
2639
2674
  let d = u, f;
2640
2675
  if (t[7] !== d || t[8] !== r || t[9] !== n) {
2641
2676
  let e;
2642
- t[11] !== d || t[12] !== r ? (e = (e) => /* @__PURE__ */ P(jt, {
2677
+ t[11] !== d || t[12] !== r ? (e = (e) => /* @__PURE__ */ P(zt, {
2643
2678
  popupTheme: e.theme,
2644
2679
  siteTheme: e.site?.theme,
2645
- children: /* @__PURE__ */ P(pt, {
2680
+ children: /* @__PURE__ */ P(xt, {
2646
2681
  popup: e,
2647
2682
  callbacks: d,
2648
- children: /* @__PURE__ */ P(Jt, { pageId: r })
2683
+ children: /* @__PURE__ */ P(rn, { pageId: r })
2649
2684
  })
2650
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;
2651
2686
  } else f = t[10];
2652
2687
  let p;
2653
2688
  return t[14] === f ? p = t[15] : (p = /* @__PURE__ */ P(oe, { children: f }), t[14] = f, t[15] = p), p;
2654
2689
  };
2655
- function Xt(e) {
2690
+ function on(e) {
2656
2691
  return {
2657
2692
  resource: "builder.popup",
2658
2693
  identifier: e.id,
@@ -2660,6 +2695,6 @@ function Xt(e) {
2660
2695
  placement: e.placement
2661
2696
  };
2662
2697
  }
2663
- var Zt = /* @__PURE__ */ Je({ PopupRenderer: () => Yt });
2698
+ var sn = /* @__PURE__ */ nt({ PopupRenderer: () => an });
2664
2699
  //#endregion
2665
- export { We as _, Y as a, V as c, Z as d, ct as f, Ge as g, z as h, H as i, X as l, dt as m, R as n, q as o, $ as p, B as r, Ke as s, jt as t, ot as u, Be as v };
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 };