import { p as D, o as A, au as te, b as P, ak as F, j as e, T as O, ai as g, V as ne, i as E, K as H, z as ae, x as V, W as oe, a5 as q, X as se, ah as re, Y as le, e as z, av as C, aw as J, ax as K, a3 as ie, r as M, B as X, t as Q, ao as ce, ab as pe, ay as ue, N as Z, u as de, a as ge, q as me, az as he, h as xe, E as be, C as ve } from "./index-c65ca4a4.mjs";
import { F as W } from "./Form-f4ced0f0.mjs";
import { M as fe } from "./ModalPage-b35056f0.mjs";
import { C as Y } from "./CheckboxGroup-61a40f23.mjs";
import { H as ke } from "./HtmlField-d23c9880.mjs";
import { P as we } from "./PreviewModal-1c377ea9.mjs";
import "./MobileChrome-2e9f6901.mjs";
const ye = ({ localSettings: t, updateSetting: s }) => {
  const [o] = D(t, ["members_support_address"]), { siteData: l } = A(), i = te(l), [m, p] = P(F((o == null ? void 0 : o.toString()) || "", l)), n = (d) => {
    let a = d.target.value, r = i && a === `noreply@${i}` ? "noreply" : a;
    s("members_support_address", r), p(F(r, l));
  };
  return /* @__PURE__ */ e.jsx(W, { marginTop: !0, children: /* @__PURE__ */ e.jsx(O, { title: "Support email address", value: m, onBlur: n, onChange: (d) => p(d.target.value) }) });
}, _e = (t) => /* @__PURE__ */ g("svg", { width: 21, height: 24, viewBox: "0 0 21 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ g("title", null, "portal-icon-1"), /* @__PURE__ */ g("path", { d: "M10.533 11.267a5.135 5.135 0 1 0-.001-10.27 5.135 5.135 0 0 0 .001 10.27zM1 23a9.531 9.531 0 0 1 16.274-6.741 9.532 9.532 0 0 1 2.793 6.74", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })), je = (t) => /* @__PURE__ */ g("svg", { width: 24, height: 24, viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ g("title", null, "portal-icon-2"), /* @__PURE__ */ g("path", { stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", d: "M12.5 2v20M2 12.5h20", fill: "none" })), Ce = (t) => /* @__PURE__ */ g("svg", { width: 25, height: 24, viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ g("title", null, "portal-icon-3"), /* @__PURE__ */ g("path", { d: "M23.5 6v14.25a2.25 2.25 0 1 1-4.5 0V3c0-.398-.158-.78-.44-1.06a1.494 1.494 0 0 0-1.06-.44h-15c-.398 0-.78.158-1.06.44C1.157 2.22 1 2.601 1 3v17.25a2.25 2.25 0 0 0 2.25 2.25h18M4.75 15h10.5m-10.5 3h6", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ g("path", { d: "M14.5 5.25h-9a.75.75 0 0 0-.75.75v4.5c0 .414.336.75.75.75h9a.75.75 0 0 0 .75-.75V6a.75.75 0 0 0-.75-.75z", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })), Se = (t) => /* @__PURE__ */ g("svg", { width: 24, height: 18, viewBox: "0 0 24 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ g("title", null, "portal-icon-4"), /* @__PURE__ */ g("path", { d: "M21.75 1.5H2.25A1.5 1.5 0 0 0 .75 3v12a1.5 1.5 0 0 0 1.5 1.5h19.5a1.5 1.5 0 0 0 1.5-1.5V3a1.5 1.5 0 0 0-1.5-1.5zm-6.063 5.475L19.5 10.5M8.313 6.975 4.5 10.5", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ g("path", { d: "m22.88 2.014-9.513 6.56a2.41 2.41 0 0 1-2.734 0L1.12 2.014", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })), Le = (t) => /* @__PURE__ */ g("svg", { width: 26, height: 26, viewBox: "0 0 26 26", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ g("title", null, "portal-icon-5"), /* @__PURE__ */ g("path", { d: "M17.903 12.016a5.007 5.007 0 0 0-3.031-3.654m-3.835.038a5.002 5.002 0 0 0-2.879 5.85m2.282 3.046A4.975 4.975 0 0 0 13 18a4.99 4.99 0 0 0 4.12-2.167m-1.949 5.387a8.504 8.504 0 0 0 5.756-11.295m-2.316-3.31A8.474 8.474 0 0 0 13 4.5a8.461 8.461 0 0 0-5.608 2.113m-2.28 3.213a8.503 8.503 0 0 0 5.914 11.444", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round" }), /* @__PURE__ */ g("path", { d: "M8.924 24.29c1.273.46 2.645.71 4.076.71 5.52 0 10.17-3.727 11.57-8.803M6.712 2.777A11.994 11.994 0 0 0 1 13c0 3.545 1.537 6.731 3.982 8.928m19.867-10.839C23.933 5.369 18.977 1 13 1c-.69 0-1.367.058-2.025.17", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round" })), $ = [
  {
    Component: _e,
    value: "icon-1"
  },
  {
    Component: je,
    value: "icon-2"
  },
  {
    Component: Ce,
    value: "icon-3"
  },
  {
    Component: Se,
    value: "icon-4"
  },
  {
    Component: Le,
    value: "icon-5"
  }
], Pe = ({ localSettings: t, updateSetting: s }) => {
  var _, f;
  const { mutateAsync: o } = ne(), [l, i, m, p] = D(t, ["portal_button", "portal_button_style", "portal_button_icon", "portal_button_signup_text"]), n = m || $[0].value, d = $.map(({ value: u }) => u).includes(n), [a, r] = P(d ? void 0 : n), b = async (u) => {
    const k = se(await o({ file: u }));
    s("portal_button_icon", k), r(k);
  }, h = () => {
    s("portal_button_icon", null), r(void 0);
  };
  return /* @__PURE__ */ e.jsxs(W, { marginTop: !0, children: [
    /* @__PURE__ */ e.jsx(
      E,
      {
        checked: !!l,
        label: "Show portal button",
        labelStyle: "heading",
        onChange: (u) => s("portal_button", u.target.checked)
      }
    ),
    /* @__PURE__ */ e.jsx(
      H,
      {
        options: [
          { value: "icon-and-text", label: "Icon and text" },
          { value: "icon-only", label: "Icon only" },
          { value: "text-only", label: "Text only" }
        ],
        selectedOption: i,
        title: "Portal button style",
        onSelect: (u) => s("portal_button_style", u)
      }
    ),
    ((_ = i == null ? void 0 : i.toString()) == null ? void 0 : _.includes("icon")) && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
      /* @__PURE__ */ e.jsx(ae, { level: 6, grey: !0, children: "Icon" }),
      /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between", children: [
        $.map((u) => /* @__PURE__ */ e.jsx("button", { className: V("border p-3", n === u.value ? "border-green" : "border-transparent"), type: "button", onClick: () => s("portal_button_icon", u.value), children: /* @__PURE__ */ e.jsx(u.Component, { className: `h-5 w-5 ${n === u.value ? "text-green" : "text-black opacity-70 transition-all hover:opacity-100"}` }) })),
        /* @__PURE__ */ e.jsx("div", { className: V("relative w-[46px] border", n === a ? "border-green" : "border-transparent"), children: /* @__PURE__ */ e.jsx(
          oe,
          {
            deleteButtonClassName: "invisible absolute -right-2 -top-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-full bg-[rgba(0,0,0,0.75)] text-white hover:bg-black group-hover:!visible",
            deleteButtonContent: /* @__PURE__ */ e.jsx(q, { colorClass: "text-white", name: "trash", size: "sm" }),
            height: "46px",
            id: "test",
            imageClassName: "cursor-pointer",
            imageURL: a,
            width: "46px",
            deleteButtonUnstyled: !0,
            onDelete: h,
            onImageClick: () => a && s("portal_button_icon", a),
            onUpload: b,
            children: /* @__PURE__ */ e.jsx(q, { name: "upload", size: "md" })
          }
        ) })
      ] })
    ] }),
    ((f = i == null ? void 0 : i.toString()) == null ? void 0 : f.includes("text")) && /* @__PURE__ */ e.jsx(
      O,
      {
        title: "Signup button text",
        value: p,
        onChange: (u) => s("portal_button_signup_text", u.target.value)
      }
    )
  ] });
};
function Ie({ settings: t, tiers: s, siteData: o, selectedTab: l }) {
  if (!(o != null && o.url))
    return null;
  let i = s.filter((x) => x.visibility === "public" && x.type === "paid").map((x) => x.id);
  const m = o.url.replace(/\/$/, ""), p = "/?v=modal-portal-settings#/portal/preview", n = new URLSearchParams(), d = C(t, "portal_button_signup_text") || "";
  let a = C(t, "portal_button_icon") || "icon-1";
  const r = JSON.parse(C(t, "portal_plans")), b = r.includes("free") ? "true" : "false", h = r.includes("monthly") ? "true" : "false", _ = r.includes("yearly") ? "true" : "false", f = C(t, "portal_button") === !0 ? "true" : "false", u = C(t, "portal_name"), k = C(t, "portal_signup_checkbox_required") ? "true" : "false", j = C(t, "portal_signup_terms_html") || "";
  let N = l === "account" ? "accountHome" : "signup";
  n.append("button", f), n.append("name", u ? "true" : "false"), n.append("isFree", b), n.append("isMonthly", h), n.append("isYearly", _), n.append("page", N), n.append("buttonIcon", encodeURIComponent(a)), n.append("signupButtonText", encodeURIComponent(d)), n.append("membersSignupAccess", "all"), n.append("allowSelfSignup", "true"), n.append("signupTermsHtml", j.toString()), n.append("signupCheckboxRequired", k), i && i.length && n.append("portalProducts", encodeURIComponent(i.join(","))), r && r.length && n.append("portalPrices", encodeURIComponent(r.join(",")));
  const S = C(t, "accent_color");
  S != null && n.append("accentColor", encodeURIComponent(S));
  const c = C(t, "portal_button_style");
  return c && n.append("buttonStyle", encodeURIComponent(c)), n.append("disableBackground", "false"), `${m}${p}?${n.toString()}`;
}
const G = ({ settings: t, tiers: s, selectedTab: o }) => {
  const {
    siteData: l
  } = re(), i = le(null), [m, p] = P(!1);
  let n = Ie({
    settings: t,
    tiers: s,
    siteData: l,
    selectedTab: o
  });
  return z(() => {
    const d = (a) => {
      if (!n)
        return;
      const r = new URL(n);
      new URL(a.origin).origin === r.origin && (a.data === "portal-ready" || a.data.type === "portal-ready") && p(!0);
    };
    return window.addEventListener("message", d, !0), () => window.removeEventListener("message", d, !0);
  }, [n]), n ? /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(
    "iframe",
    {
      ref: i,
      className: m ? "" : "hidden",
      "data-testid": "portal-preview",
      height: "100%",
      src: n,
      title: "Portal Preview",
      width: "100%"
    }
  ) }) : null;
}, y = ({ name: t, value: s }) => /* @__PURE__ */ e.jsx(
  Q,
  {
    action: /* @__PURE__ */ e.jsx(X, { color: "black", label: "Copy", link: !0, onClick: (o) => {
      navigator.clipboard.writeText(s);
      const l = o == null ? void 0 : o.target;
      l.innerText = "Copied", setTimeout(() => {
        l.innerText = "Copy";
      }, 1e3);
    } }),
    hideActions: !0,
    separator: !0,
    children: /* @__PURE__ */ e.jsxs("div", { className: "flex w-full grow items-center gap-5 py-3", children: [
      /* @__PURE__ */ e.jsx("span", { className: "inline-block w-[240px] whitespace-nowrap", children: t }),
      /* @__PURE__ */ e.jsx(O, { className: "border-b-500 grow bg-transparent p-1 text-grey-700", value: s, disabled: !0, unstyled: !0 })
    ] })
  }
), Te = () => {
  const [t, s] = P(!1), [o, l] = P(""), { siteData: i } = A(), { data: { tiers: m } = {} } = J(), p = K(m || []), n = () => {
    s(!t);
  };
  z(() => {
    p != null && p.length && !o && l(p[0].id);
  }, [p, o]);
  const d = p == null ? void 0 : p.map((r) => ({
    label: r.name,
    value: r.id
  })), a = ie(i);
  return /* @__PURE__ */ e.jsxs(fe, { className: "max-w-[920px] text-base text-black", heading: "Links", children: [
    /* @__PURE__ */ e.jsxs("p", { className: "-mt-6 mb-16", children: [
      "Use these ",
      t ? "data attributes" : "links",
      " in your theme to show pages of Portal."
    ] }),
    /* @__PURE__ */ e.jsxs(M, { actions: /* @__PURE__ */ e.jsx(X, { color: "green", label: t ? "Links" : "Data attributes", link: !0, onClick: n }), title: "Generic", titleSize: "lg", children: [
      /* @__PURE__ */ e.jsx(y, { name: "Default", value: t ? "data-portal" : `${a}#/portal` }),
      /* @__PURE__ */ e.jsx(y, { name: "Sign in", value: t ? 'data-portal="signin"' : `${a}#/portal/signin` }),
      /* @__PURE__ */ e.jsx(y, { name: "Sign up", value: t ? 'data-portal="signup"' : `${a}#/portal/signup` })
    ] }),
    /* @__PURE__ */ e.jsxs(M, { className: "mt-14", title: "Tiers", titleSize: "lg", children: [
      /* @__PURE__ */ e.jsx(
        Q,
        {
          hideActions: !0,
          separator: !0,
          children: /* @__PURE__ */ e.jsxs("div", { className: "flex w-full items-center gap-5 py-2 pr-6", children: [
            /* @__PURE__ */ e.jsx("span", { className: "inline-block w-[240px] shrink-0", children: "Tier" }),
            /* @__PURE__ */ e.jsx(
              H,
              {
                options: d,
                selectedOption: o,
                onSelect: (r) => {
                  l(r);
                }
              }
            )
          ] })
        }
      ),
      /* @__PURE__ */ e.jsx(y, { name: "Signup / Monthly", value: t ? `data-portal="signup/${o}/monthly"` : `${a}#/portal/signup/${o}/monthly` }),
      /* @__PURE__ */ e.jsx(y, { name: "Signup / Yearly", value: t ? `data-portal="signup/${o}/yearly"` : `${a}#/portal/signup/${o}/yearly` }),
      /* @__PURE__ */ e.jsx(y, { name: "Signup / Free", value: t ? 'data-portal="signup/free"' : `${a}#/portal/signup/free` })
    ] }),
    /* @__PURE__ */ e.jsxs(M, { className: "mt-14", title: "Account", titleSize: "lg", children: [
      /* @__PURE__ */ e.jsx(y, { name: "Account", value: t ? 'data-portal="account"' : `${a}#/portal/account` }),
      /* @__PURE__ */ e.jsx(y, { name: "Account / Plans", value: t ? 'data-portal="account/plans"' : `${a}#/portal/account/plans` }),
      /* @__PURE__ */ e.jsx(y, { name: "Account / Profile", value: t ? 'data-portal="account/profile"' : `${a}#/portal/account/profile` }),
      /* @__PURE__ */ e.jsx(y, { name: "Account / Newsletters", value: t ? 'data-portal="account/newsletters"' : `${a}#/portal/account/newsletters` })
    ] })
  ] });
}, Ne = ({
  selectedTab: t = "signup",
  localSettings: s,
  localTiers: o
}) => {
  let l = /* @__PURE__ */ e.jsx(e.Fragment, {});
  switch (t) {
    case "account":
      l = /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(G, { selectedTab: t, settings: s, tiers: o }) });
      break;
    case "links":
      l = /* @__PURE__ */ e.jsx(Te, {});
      break;
    default:
      l = /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(G, { selectedTab: t, settings: s, tiers: o }) });
      break;
  }
  return l;
}, Ue = ({ localSettings: t, updateSetting: s, localTiers: o, updateTier: l, errors: i, setError: m }) => {
  const { config: p } = A(), [n, d, a, r, b] = D(
    t,
    ["members_signup_access", "portal_name", "portal_signup_terms_html", "portal_signup_checkbox_required", "portal_plans"]
  ), h = JSON.parse((b == null ? void 0 : b.toString()) || "[]"), _ = 115, f = ce(() => {
    const c = document.createElement("div");
    return c.innerHTML = (a == null ? void 0 : a.toString()) || "", c.innerText.length;
  }, [a]), u = pe((c, x) => {
    m(c, x);
  }, []);
  z(() => {
    f > _ ? u("portal_signup_terms_html", "Signup notice is too long") : u("portal_signup_terms_html", void 0);
  }, [f, u]);
  const k = (c) => {
    const x = h.indexOf(c);
    x === -1 ? h.push(c) : h.splice(x, 1), s("portal_plans", JSON.stringify(h));
  }, j = n !== "all", N = ue(t, p);
  let S = [
    {
      checked: h.includes("free"),
      disabled: j,
      label: "Free",
      value: "free",
      onChange: () => {
        k("free");
      }
    }
  ];
  return N && o.forEach((c) => {
    S.push({
      checked: c.visibility === "public",
      label: c.name,
      value: c.id,
      onChange: (x) => l({ ...c, visibility: x ? "public" : "none" })
    });
  }), /* @__PURE__ */ e.jsxs(W, { marginTop: !0, children: [
    /* @__PURE__ */ e.jsx(
      E,
      {
        checked: !!d,
        disabled: j,
        label: "Display name in signup form",
        labelStyle: "heading",
        onChange: (c) => s("portal_name", c.target.checked)
      }
    ),
    /* @__PURE__ */ e.jsx(
      Y,
      {
        checkboxes: S,
        title: "Tiers available at startup"
      }
    ),
    N && o.some((c) => c.visibility === "public") && /* @__PURE__ */ e.jsx(
      Y,
      {
        checkboxes: [
          {
            checked: h.includes("monthly"),
            disabled: j,
            label: "Monthly",
            value: "monthly",
            onChange: () => {
              k("monthly");
            }
          },
          {
            checked: h.includes("yearly"),
            disabled: j,
            label: "Yearly",
            value: "yearly",
            onChange: () => {
              k("yearly");
            }
          }
        ],
        title: "Prices available at signup"
      }
    ),
    /* @__PURE__ */ e.jsx(
      ke,
      {
        config: p,
        error: !!i.portal_signup_terms_html,
        hint: i.portal_signup_terms_html || /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
          "Recommended: ",
          /* @__PURE__ */ e.jsx("strong", { children: "115" }),
          " characters. You've used ",
          /* @__PURE__ */ e.jsx("strong", { className: "text-green", children: f })
        ] }),
        nodes: "MINIMAL_NODES",
        placeholder: "By signing up, I agree to receive emails from ...",
        title: "Display notice at signup",
        value: a == null ? void 0 : a.toString(),
        onChange: (c) => s("portal_signup_terms_html", c)
      }
    ),
    (a == null ? void 0 : a.toString()) && /* @__PURE__ */ e.jsx(
      E,
      {
        checked: !!r,
        disabled: j,
        label: "Require agreement",
        labelStyle: "heading",
        onChange: (c) => s("portal_signup_checkbox_required", c.target.checked)
      }
    )
  ] });
}, Ae = ({ localSettings: t, updateSetting: s, localTiers: o, updateTier: l, errors: i, setError: m }) => {
  const [p, n] = P("signupOptions"), d = [
    {
      id: "signupOptions",
      title: "Signup options",
      contents: /* @__PURE__ */ e.jsx(
        Ue,
        {
          errors: i,
          localSettings: t,
          localTiers: o,
          setError: m,
          updateSetting: s,
          updateTier: l
        }
      )
    },
    {
      id: "lookAndFeel",
      title: "Look & feel",
      contents: /* @__PURE__ */ e.jsx(Pe, { localSettings: t, updateSetting: s })
    },
    {
      id: "accountPage",
      title: "Account page",
      contents: /* @__PURE__ */ e.jsx(ye, { localSettings: t, updateSetting: s })
    }
  ], a = (r) => {
    n(r);
  };
  return /* @__PURE__ */ e.jsx("div", { className: "pt-4", children: /* @__PURE__ */ e.jsx(be, { selectedTab: p, tabs: d, onTabChange: a }) });
}, Re = () => {
  const t = de(), { updateRoute: s } = ge(), [o, l] = P("signup"), { settings: i, siteData: m } = A(), { mutateAsync: p } = me(), { data: { tiers: n } = {} } = J(), d = K(n || []), { mutateAsync: a } = he(), { formState: r, saveState: b, handleSave: h, updateForm: _ } = xe({
    initialState: {
      settings: i,
      tiers: d
    },
    onSave: async () => {
      var w, U;
      await Promise.all(r.tiers.filter(({ dirty: I }) => I).map((I) => a(I)));
      const { meta: v, settings: L } = await p(r.settings.filter((I) => I.dirty));
      if (v != null && v.sent_email_verification) {
        const I = (w = r.settings.find((T) => T.key === "members_support_address")) == null ? void 0 : w.value, B = (U = L.find((T) => T.key === "members_support_address")) == null ? void 0 : U.value;
        Z.show(ve, {
          title: "Confirm email address",
          prompt: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
            "We've sent a confirmation email to ",
            /* @__PURE__ */ e.jsx("strong", { children: I }),
            ". Until verified, your support address will remain ",
            F((B == null ? void 0 : B.toString()) || "noreply", m),
            "."
          ] }),
          okLabel: "Close",
          cancelLabel: "",
          onOk: (T) => T == null ? void 0 : T.remove()
        });
      }
    }
  }), [f, u] = P({}), k = (v, L) => {
    _((w) => ({
      ...w,
      settings: w.settings.map((U) => U.key === v ? { ...U, value: L, dirty: !0 } : U)
    }));
  }, j = (v, L) => {
    u((w) => ({
      ...w,
      [v]: L
    }));
  }, N = (v) => {
    _((L) => ({
      ...L,
      tiers: L.tiers.map((w) => w.id === v.id ? { ...v, dirty: !0 } : w)
    }));
  }, S = (v) => {
    l(v);
  }, c = /* @__PURE__ */ e.jsx(
    Ae,
    {
      errors: f,
      localSettings: r.settings,
      localTiers: r.tiers,
      setError: j,
      updateSetting: k,
      updateTier: N
    }
  ), x = /* @__PURE__ */ e.jsx(
    Ne,
    {
      localSettings: r.settings,
      localTiers: r.tiers,
      selectedTab: o
    }
  );
  let ee = [
    { id: "signup", title: "Signup" },
    { id: "account", title: "Account page" },
    { id: "links", title: "Links" }
  ], R = "Save & close";
  return b === "saving" ? R = "Saving..." : b === "saved" && (R = "Saved"), /* @__PURE__ */ e.jsx(
    we,
    {
      afterClose: () => {
        s("portal");
      },
      deviceSelector: !1,
      dirty: b === "unsaved",
      okLabel: R,
      preview: x,
      previewBgColor: o === "links" ? "white" : "greygradient",
      previewToolbarTabs: ee,
      selectedURL: o,
      sidebar: c,
      testId: "portal-modal",
      title: "Portal",
      onOk: async () => {
        Object.values(f).filter(Boolean).length || (await h(), s("portal"), t.remove());
      },
      onSelectURL: S
    }
  );
}, ze = Z.create(Re);
export {
  ze as default
};
//# sourceMappingURL=PortalModal-b219334a.mjs.map
