@levo-so/studio 0.1.112 → 0.1.113

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