@levo-so/site-runtime 0.3.16 → 0.3.18

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.
@@ -1,10 +1,10 @@
1
1
  import { t as e } from "./rolldown-runtime-CAFD8bLK.js";
2
- import { t } from "./LevoProvider-Bsjkcwc8.js";
2
+ import { t } from "./LevoProvider-BkbKrvrI.js";
3
3
  import { a as n, c as r, i, l as a, o, t as s, u as c } from "./popupState-JmpeKzgM-D_77LiAa.js";
4
4
  import { t as l } from "./react-B9yvlbH0.js";
5
5
  import { c as u } from "react/compiler-runtime";
6
- import { jsx as d } from "react/jsx-runtime";
7
- import { Suspense as f, lazy as p, useEffect as m, useRef as h, useState as g } from "react";
6
+ import { Suspense as d, lazy as f, useEffect as p, useRef as m, useState as h } from "react";
7
+ import { jsx as g } from "react/jsx-runtime";
8
8
  import { $isIdentityContextReady as _ } from "@levo-so/insights/stores";
9
9
  //#region ../../libraries/popups/dist/index.js
10
10
  var v = /* @__PURE__ */ e({
@@ -14,12 +14,12 @@ var v = /* @__PURE__ */ e({
14
14
  }), y = async (e, t) => {
15
15
  let n = {};
16
16
  return t?.site_id && (n.site_id = t.site_id), t?.locale && (n.locale = t.locale), t?.country && (n.country = t.country), (await e.url("/v1/studio/popup/list-active").query(n).get().json())?.content?.data ?? [];
17
- }, b = p(() => import("./PopupRenderer-D66Gx63H-IgqQ0Z7U.js").then((e) => e.t).then((e) => ({ default: e.PopupRenderer }))), x = (e) => {
18
- let n = u(9), { siteId: r, pageId: i } = e, { fetch: a, logger: s } = t(), [c, l] = g(null), p = h(!1), v, x;
17
+ }, b = f(() => import("./PopupRenderer-D66Gx63H-DpcNpbtU.js").then((e) => e.t).then((e) => ({ default: e.PopupRenderer }))), x = (e) => {
18
+ let n = u(9), { siteId: r, pageId: i } = e, { fetch: a, logger: s } = t(), [c, l] = h(null), f = m(!1), v, x;
19
19
  if (n[0] !== a || n[1] !== s || n[2] !== r ? (v = () => {
20
- if (p.current) return;
20
+ if (f.current) return;
21
21
  let e = () => {
22
- p.current || (p.current = !0, y(a, r ? { site_id: r } : void 0).then((e) => {
22
+ f.current || (f.current = !0, y(a, r ? { site_id: r } : void 0).then((e) => {
23
23
  o(e), l(e);
24
24
  }).catch((e) => {
25
25
  s?.error("Failed to fetch popups", { exception: e }), o([]), l([]);
@@ -37,16 +37,16 @@ var v = /* @__PURE__ */ e({
37
37
  a,
38
38
  s,
39
39
  r
40
- ], n[0] = a, n[1] = s, n[2] = r, n[3] = v, n[4] = x) : (v = n[3], x = n[4]), m(v, x), !c || c.length === 0) return null;
40
+ ], n[0] = a, n[1] = s, n[2] = r, n[3] = v, n[4] = x) : (v = n[3], x = n[4]), p(v, x), !c || c.length === 0) return null;
41
41
  let C;
42
42
  n[5] === Symbol.for("react.memo_cache_sentinel") ? (C = {
43
43
  position: "relative",
44
44
  zIndex: 99999
45
45
  }, n[5] = C) : C = n[5];
46
46
  let w;
47
- return n[6] !== i || n[7] !== c ? (w = /* @__PURE__ */ d("div", {
47
+ return n[6] !== i || n[7] !== c ? (w = /* @__PURE__ */ g("div", {
48
48
  style: C,
49
- children: /* @__PURE__ */ d(f, { children: /* @__PURE__ */ d(b, {
49
+ children: /* @__PURE__ */ g(d, { children: /* @__PURE__ */ g(b, {
50
50
  popups: c,
51
51
  pageId: i
52
52
  }) })