@yoast/ai-insights-client 1.4.64 → 1.4.65

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.
@@ -14,9 +14,9 @@ var _l = (e, t, n, r) => ({
14
14
  }
15
15
  });
16
16
  import { jsx as p, jsxs as M, Fragment as st } from "react/jsx-runtime";
17
- import { SidebarNavigation as $s, Title as kt, SkeletonLoader as vt, Link as vr, Modal as Ce, Button as Fe, Spinner as Vc, Toast as Td, ValidationIcon as t3, Paper as pi, Stepper as n3, Tooltip as r3, Card as yt, ProgressBar as i3, Alert as Fn, Badge as yr, Select as hc, Table as ke, Pagination as Zf, TextInput as Wc, DropdownMenu as kl, Label as Fu, Root as s3, TagField as ov, Checkbox as Md, TextField as Ds, Toggle as o3, TextareaField as a3, Autocomplete as C0 } from "@yoast/ui-library";
17
+ import { SidebarNavigation as $s, Title as kt, SkeletonLoader as vt, Link as vr, Modal as Ce, Button as Be, Spinner as Vc, Toast as Td, ValidationIcon as t3, Paper as pi, Stepper as n3, Tooltip as r3, Card as yt, ProgressBar as i3, Alert as Fn, Badge as yr, Select as hc, Table as ke, Pagination as Zf, TextInput as Wc, DropdownMenu as kl, Label as Fu, Root as s3, TagField as ov, Checkbox as Md, TextField as Ds, Toggle as o3, TextareaField as a3, Autocomplete as C0 } from "@yoast/ui-library";
18
18
  import * as L from "react";
19
- import Qc, { createContext as Jf, useMemo as Ht, useCallback as jt, useState as Ee, useContext as Yc, useEffect as Ye, useRef as br, forwardRef as eh, lazy as xo, Suspense as _r } from "react";
19
+ import Qc, { createContext as Jf, useMemo as Ht, useCallback as jt, useState as Ee, useContext as Yc, useEffect as Qe, useRef as br, forwardRef as eh, lazy as xo, Suspense as _r } from "react";
20
20
  import av from "react-dom";
21
21
  function lv(e) {
22
22
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
@@ -8980,7 +8980,7 @@ var S_ = function(t) {
8980
8980
  return ((k = w.settings) === null || k === void 0 ? void 0 : k.showAutomaticAnalysisDisabledNotification) === !0;
8981
8981
  })) !== null && C !== void 0 ? C : [];
8982
8982
  }, [d]);
8983
- Ye(function() {
8983
+ Qe(function() {
8984
8984
  c(g.length !== 0);
8985
8985
  }, [g]);
8986
8986
  var m = /* @__PURE__ */ function() {
@@ -9053,8 +9053,8 @@ var S_ = function(t) {
9053
9053
  /* @__PURE__ */ p(Ce.Container.Content, { className: "yst-mb-4 yst-space-y-3", children: S })
9054
9054
  ] }) }),
9055
9055
  /* @__PURE__ */ M(Ce.Container.Footer, { className: "yst-mt-3 yst-flex yst-justify-end yst-gap-2", children: [
9056
- /* @__PURE__ */ p(Fe, { variant: "secondary", onClick: v, children: "Close" }),
9057
- /* @__PURE__ */ p(Fe, { variant: "primary", onClick: v, isLoading: y, disabled: y, children: "Go to settings" })
9056
+ /* @__PURE__ */ p(Be, { variant: "secondary", onClick: v, children: "Close" }),
9057
+ /* @__PURE__ */ p(Be, { variant: "primary", onClick: v, isLoading: y, disabled: y, children: "Go to settings" })
9058
9058
  ] })
9059
9059
  ] }) }) : null;
9060
9060
  }, mu = function() {
@@ -9082,13 +9082,13 @@ var S_ = function(t) {
9082
9082
  return k.id === d;
9083
9083
  });
9084
9084
  }, [g, d]);
9085
- Ye(function() {
9085
+ Qe(function() {
9086
9086
  var k;
9087
9087
  if (!(g === void 0 || d)) {
9088
9088
  var x = (k = g[0]) === null || k === void 0 ? void 0 : k.id;
9089
9089
  x && h(x);
9090
9090
  }
9091
- }, [g, d, h, l, a.pathname]), Ye(function() {
9091
+ }, [g, d, h, l, a.pathname]), Qe(function() {
9092
9092
  !d || S.current || (S.current = !0);
9093
9093
  }, [C, d, l, a.pathname, g]);
9094
9094
  var w = jt(function() {
@@ -9098,14 +9098,14 @@ var S_ = function(t) {
9098
9098
  /* @__PURE__ */ p("div", { className: "yst-mb-4 yst-text-6xl yst-text-red-600", children: "⚠️" }),
9099
9099
  /* @__PURE__ */ p("h2", { className: "yst-text-xl yst-font-semibold yst-text-slate-900", children: "Something went wrong" }),
9100
9100
  /* @__PURE__ */ p("p", { className: "yst-text-slate-600", children: "We couldn't load your Brand Analysis. Please try again shortly." }),
9101
- /* @__PURE__ */ p(Fe, { variant: "primary", onClick: w, children: "Retry" })
9101
+ /* @__PURE__ */ p(Be, { variant: "primary", onClick: w, children: "Retry" })
9102
9102
  ] }) }) }) : /* @__PURE__ */ M(Zu, { DebugInfo: o, ...c, children: [
9103
9103
  /* @__PURE__ */ p(ho, {}),
9104
9104
  /* @__PURE__ */ p(S_, {})
9105
9105
  ] });
9106
9106
  }, kr = function(t) {
9107
9107
  var n = t.title, r = Xt();
9108
- return Ye(function() {
9108
+ return Qe(function() {
9109
9109
  document.title = n;
9110
9110
  }, [r, n]), null;
9111
9111
  }, k_ = function() {
@@ -9564,7 +9564,7 @@ var s8 = function() {
9564
9564
  ] }, n.title);
9565
9565
  }) })
9566
9566
  ] }),
9567
- /* @__PURE__ */ p(bh, { className: "yst-justify-end", children: /* @__PURE__ */ M(Fe, { variant: "primary", onClick: function() {
9567
+ /* @__PURE__ */ p(bh, { className: "yst-justify-end", children: /* @__PURE__ */ M(Be, { variant: "primary", onClick: function() {
9568
9568
  return t("/setup");
9569
9569
  }, className: "yst-gap-1.5", children: [
9570
9570
  "Start your first analysis ",
@@ -10094,7 +10094,7 @@ var jo = gl(Ay || (Ay = L8(["md:yst-hidden yst-mr-2 yst-font-medium yst-text-sla
10094
10094
  var n, r, i, s, o, a = t.enableCategories, l = a === void 0 ? !1 : a, c = Ee("all"), u = Ty(c, 2), d = u[0], f = u[1], h = Ee(1), y = Ty(h, 2), g = y[0], m = y[1], v = Pi(), b = v.data, S = v.isLoading, C = v.isRefetching, w = b == null ? void 0 : b.citations, k = (b == null || (n = b.scores) === null || n === void 0 || (n = n.standardized) === null || n === void 0 ? void 0 : n.citations) || {}, x = Object.hasOwn(k, "previous"), _ = w == null || (r = w.list) === null || r === void 0 ? void 0 : r.filter(function(P) {
10095
10095
  return d === "all" ? !0 : P.category === d;
10096
10096
  }), O = 10, A = (_ == null ? void 0 : _.length) || 0, E = Math.ceil(A / O), T = (g - 1) * O, B = T + O, N = _ == null ? void 0 : _.slice(T, B);
10097
- return Ye(function() {
10097
+ return Qe(function() {
10098
10098
  g > E && E > 0 && m(1);
10099
10099
  }, [E, g, m, d]), /* @__PURE__ */ p(yt, { className: "yst-overflow-visible md:yst-col-span-2", children: /* @__PURE__ */ M(yt.Content, { className: "yst-flex yst-flex-col yst-gap-6", children: [
10100
10100
  /* @__PURE__ */ M("div", { className: "yst-space-y-4", children: [
@@ -10247,7 +10247,7 @@ var Dy = function(t) {
10247
10247
  ] }, c || d == null ? void 0 : d.value);
10248
10248
  }, z8 = function(t) {
10249
10249
  var n, r, i = t.className, s = br(null), o = Ee(1), a = N8(o, 2), l = a[0], c = a[1], u = Pi(), d = u.data, f = u.isLoading, h = u.isRefetching, y = d == null || (n = d.rankings) === null || n === void 0 ? void 0 : n.list, g = (d == null || (r = d.scores) === null || r === void 0 || (r = r.standardized) === null || r === void 0 ? void 0 : r.ranking) || {}, m = Object.hasOwn(g, "previous"), v = 5, b = (y == null ? void 0 : y.length) || 0, S = Math.ceil(b / v), C = (l - 1) * v, w = C + v, k = y == null ? void 0 : y.slice(C, w);
10250
- return Ye(function() {
10250
+ return Qe(function() {
10251
10251
  l > S && S > 0 && c(1);
10252
10252
  }, [S, l, c]), /* @__PURE__ */ p(yt, { ref: s, className: Oe("yst-overflow-visible", i), children: /* @__PURE__ */ M(yt.Content, { className: "yst-mt-0 yst-space-y-6", children: [
10253
10253
  /* @__PURE__ */ M("div", { className: "yst-space-y-2", children: [
@@ -10315,8 +10315,8 @@ var Dy = function(t) {
10315
10315
  ] })
10316
10316
  ] }),
10317
10317
  /* @__PURE__ */ M(Ce.Container.Footer, { className: "yst-mt-3 yst-flex yst-justify-end yst-gap-2", children: [
10318
- /* @__PURE__ */ p(Fe, { variant: "secondary", onClick: r, children: y }),
10319
- /* @__PURE__ */ p(Fe, { variant: "error", onClick: i, isLoading: o, disabled: u, children: f })
10318
+ /* @__PURE__ */ p(Be, { variant: "secondary", onClick: r, children: y }),
10319
+ /* @__PURE__ */ p(Be, { variant: "error", onClick: i, isLoading: o, disabled: u, children: f })
10320
10320
  ] })
10321
10321
  ] }) });
10322
10322
  }, $l = { exports: {} }, Dl = { exports: {} }, Je = {};
@@ -10416,17 +10416,17 @@ function K8() {
10416
10416
  var at = ie.$$typeof;
10417
10417
  switch (at) {
10418
10418
  case t:
10419
- var Be = ie.type;
10420
- switch (Be) {
10419
+ var Fe = ie.type;
10420
+ switch (Fe) {
10421
10421
  case l:
10422
10422
  case c:
10423
10423
  case r:
10424
10424
  case s:
10425
10425
  case i:
10426
10426
  case d:
10427
- return Be;
10427
+ return Fe;
10428
10428
  default:
10429
- var ut = Be && Be.$$typeof;
10429
+ var ut = Fe && Fe.$$typeof;
10430
10430
  switch (ut) {
10431
10431
  case a:
10432
10432
  case u:
@@ -12425,7 +12425,7 @@ var sr = {
12425
12425
  A && (x.has(A) || x.set(A, []), x.get(A).push(_));
12426
12426
  }), x;
12427
12427
  }, [n]);
12428
- Ye(function() {
12428
+ Qe(function() {
12429
12429
  if (l && r) {
12430
12430
  var x = n.find(function(E) {
12431
12431
  return E.id === r;
@@ -12561,7 +12561,7 @@ var sr = {
12561
12561
  /* @__PURE__ */ p("span", { children: "Today" })
12562
12562
  ] })
12563
12563
  ] }),
12564
- m && /* @__PURE__ */ p("div", { className: "yst-mt-6", children: /* @__PURE__ */ p(Fe, { onClick: v, className: "yst-w-full", disabled: b, children: "Show latest analysis" }) })
12564
+ m && /* @__PURE__ */ p("div", { className: "yst-mt-6", children: /* @__PURE__ */ p(Be, { onClick: v, className: "yst-w-full", disabled: b, children: "Show latest analysis" }) })
12565
12565
  ] }) : null;
12566
12566
  };
12567
12567
  function ld(e, t) {
@@ -12616,7 +12616,7 @@ var C9 = function(t) {
12616
12616
  var $ = C(P.createdAt);
12617
12617
  return $ ? $.getTime() : -1 / 0;
12618
12618
  };
12619
- Ye(function() {
12619
+ Qe(function() {
12620
12620
  if ((r === "latest" || !r) && n.length > 0 && !o) {
12621
12621
  var N = n.reduce(function(P, $) {
12622
12622
  return w($) > w(P) ? $ : P;
@@ -12636,7 +12636,7 @@ var C9 = function(t) {
12636
12636
  }
12637
12637
  return r;
12638
12638
  }, [r, n, w]);
12639
- Ye(function() {
12639
+ Qe(function() {
12640
12640
  b(k);
12641
12641
  }, [k]);
12642
12642
  var x = n.find(function(N) {
@@ -12653,7 +12653,7 @@ var C9 = function(t) {
12653
12653
  }
12654
12654
  return n.length > 0 ? "Select date..." : "No analyses available";
12655
12655
  }();
12656
- Ye(function() {
12656
+ Qe(function() {
12657
12657
  var N = function($) {
12658
12658
  S.current && !S.current.contains($.target) && y(!1);
12659
12659
  };
@@ -12921,39 +12921,39 @@ function D9(e, t) {
12921
12921
  var cd = gl(eg || (eg = D9(["yst-flex-1 yst-space-y-2"]))), I9 = function(t) {
12922
12922
  var n, r, i, s, o, a = t.className, l = nr(), c = l.brandId, u = l.analysisId, d = l.model, f = fl(), h = f.setModel, y = f.setAnalysisId, g = an(), m = Tn(), v = Pi(), b = v.data, S = gu({
12923
12923
  query: {
12924
- select: function(Qe) {
12925
- var se = Qe.data;
12924
+ select: function(Xe) {
12925
+ var se = Xe.data;
12926
12926
  return se == null ? void 0 : se.data;
12927
12927
  }
12928
12928
  }
12929
12929
  }), C = S.data, w = S.isLoading, k = C == null ? void 0 : C.displayName, x = ms({
12930
12930
  query: {
12931
- select: function(Qe) {
12932
- var se = Qe.data;
12931
+ select: function(Xe) {
12932
+ var se = Xe.data;
12933
12933
  return se == null ? void 0 : se.brands;
12934
12934
  }
12935
12935
  }
12936
12936
  }), _ = x.data, O = x.isLoading, A = K2(c, {
12937
12937
  query: {
12938
12938
  enabled: !!c,
12939
- select: function(Qe) {
12940
- var se = Qe.data;
12939
+ select: function(Xe) {
12940
+ var se = Xe.data;
12941
12941
  return se == null ? void 0 : se.analyses;
12942
12942
  }
12943
12943
  }
12944
12944
  }), E = A.data, T = A.isLoading, B = fu(c, u, {
12945
12945
  query: {
12946
12946
  enabled: !!c && !!u,
12947
- select: function(Qe) {
12948
- var se = Qe.data;
12947
+ select: function(Xe) {
12948
+ var se = Xe.data;
12949
12949
  return se;
12950
12950
  }
12951
12951
  }
12952
12952
  }), N = B.data, P = B.isLoading, $ = Ac(c, {
12953
12953
  query: {
12954
12954
  enabled: !!c,
12955
- select: function(Qe) {
12956
- var se = Qe.data;
12955
+ select: function(Xe) {
12956
+ var se = Xe.data;
12957
12957
  return se;
12958
12958
  }
12959
12959
  }
@@ -12984,18 +12984,18 @@ var cd = gl(eg || (eg = D9(["yst-flex-1 yst-space-y-2"]))), I9 = function(t) {
12984
12984
  }
12985
12985
  }, se);
12986
12986
  }));
12987
- function Qe() {
12987
+ function Xe() {
12988
12988
  return Te.apply(this, arguments);
12989
12989
  }
12990
- return Qe;
12990
+ return Xe;
12991
12991
  }()
12992
12992
  }
12993
12993
  }), Q = U.mutate, j = U.isPending, H = Ee(!1), q = tg(H, 2), K = q[0], F = q[1], te = function() {
12994
12994
  F(!1);
12995
12995
  }, Z = _ == null ? void 0 : _.find(function(Te) {
12996
12996
  return String(Te.id) === String(c);
12997
- }), fe = function(Qe) {
12998
- switch (Qe) {
12997
+ }), fe = function(Xe) {
12998
+ switch (Xe) {
12999
12999
  case "openai":
13000
13000
  return "OpenAI";
13001
13001
  case "perplexity":
@@ -13003,7 +13003,7 @@ var cd = gl(eg || (eg = D9(["yst-flex-1 yst-space-y-2"]))), I9 = function(t) {
13003
13003
  case "anthropic":
13004
13004
  return "Anthropic";
13005
13005
  default:
13006
- return Qe || "Unknown";
13006
+ return Xe || "Unknown";
13007
13007
  }
13008
13008
  }, Y = (N == null || (n = N.analysis) === null || n === void 0 || (n = n.scans) === null || n === void 0 ? void 0 : n.map(function(Te) {
13009
13009
  return {
@@ -13018,22 +13018,22 @@ var cd = gl(eg || (eg = D9(["yst-flex-1 yst-space-y-2"]))), I9 = function(t) {
13018
13018
  }) ? u : E && E.length > 0 ? E[0].id : "latest", ye = Ac(c, {
13019
13019
  query: {
13020
13020
  enabled: !!c,
13021
- select: function(Qe) {
13022
- var se = Qe.data;
13021
+ select: function(Xe) {
13022
+ var se = Xe.data;
13023
13023
  return se;
13024
13024
  }
13025
13025
  }
13026
- }), De = ye.data, ie = (De == null ? void 0 : De.name) || "your brand", at = vf(De == null ? void 0 : De.nextScheduledAnalysis), Be = N == null || (r = N.analysis) === null || r === void 0 ? void 0 : r.status, ut = N == null || (i = N.analysis) === null || i === void 0 ? void 0 : i.id, Ge = c != null && typeof ut == "number" && !isNaN(ut), Xe = Ee(!1), J = tg(Xe, 2), Le = J[0], dt = J[1];
13026
+ }), De = ye.data, ie = (De == null ? void 0 : De.name) || "your brand", at = vf(De == null ? void 0 : De.nextScheduledAnalysis), Fe = N == null || (r = N.analysis) === null || r === void 0 ? void 0 : r.status, ut = N == null || (i = N.analysis) === null || i === void 0 ? void 0 : i.id, Ge = c != null && typeof ut == "number" && !isNaN(ut), Ye = Ee(!1), J = tg(Ye, 2), Le = J[0], dt = J[1];
13027
13027
  Qc.useEffect(function() {
13028
- if (!Ge || Be !== ni.completed) {
13028
+ if (!Ge || Fe !== ni.completed) {
13029
13029
  dt(!1);
13030
13030
  return;
13031
13031
  }
13032
13032
  var Te = "yst_legal_alert_dismissed_".concat(c, "_").concat(ut);
13033
13033
  dt(window.localStorage.getItem(Te) === null);
13034
- }, [c, ut, Ge, Be]);
13035
- var qe = function(Qe) {
13036
- if (Qe.preventDefault(), !!Ge) {
13034
+ }, [c, ut, Ge, Fe]);
13035
+ var qe = function(Xe) {
13036
+ if (Xe.preventDefault(), !!Ge) {
13037
13037
  var se = "yst_legal_alert_dismissed_".concat(c, "_").concat(ut);
13038
13038
  window.localStorage.setItem(se, "true"), dt(!1);
13039
13039
  }
@@ -13069,12 +13069,12 @@ var cd = gl(eg || (eg = D9(["yst-flex-1 yst-space-y-2"]))), I9 = function(t) {
13069
13069
  }), ni.cancelled, {
13070
13070
  alertContent: /* @__PURE__ */ p(st, { children: "Analysis was cancelled. You can restart the analysis when ready." }),
13071
13071
  alertVariant: "warning"
13072
- }), ge = !Be && (R == null ? void 0 : R.setupStatus) === "scheduledFirstAnalysis" ? "scheduledFirstAnalysis" : Be, de = (s = ue[ge]) !== null && s !== void 0 ? s : {
13072
+ }), ge = !Fe && (R == null ? void 0 : R.setupStatus) === "scheduledFirstAnalysis" ? "scheduledFirstAnalysis" : Fe, de = (s = ue[ge]) !== null && s !== void 0 ? s : {
13073
13073
  alertContent: null,
13074
13074
  alertVariant: "info"
13075
13075
  }, ze = de.alertContent, cn = de.alertVariant, Kt = !T && (R == null ? void 0 : R.setupStatus) !== "pendingQuerySelection" && (E == null ? void 0 : E.length) === 0 && (R == null ? void 0 : R.nextScheduledAnalysis) === null, un = (
13076
13076
  // analysis should be completed
13077
- Be === ni.completed && // data is available to show
13077
+ Fe === ni.completed && // data is available to show
13078
13078
  b && // scan data is either updating or completed
13079
13079
  ["updating", "completed"].includes(b.status) && // scan is not up to date with brand groups
13080
13080
  !b.isUpToDateWithBrandGroups
@@ -13107,7 +13107,7 @@ var cd = gl(eg || (eg = D9(["yst-flex-1 yst-space-y-2"]))), I9 = function(t) {
13107
13107
  /* @__PURE__ */ p("p", { className: "yst-text-sm yst-font-normal yst-text-slate-600", children: "welcome to your brand analysis!" })
13108
13108
  ] }) }),
13109
13109
  /* @__PURE__ */ M("div", { className: "yst-flex yst-flex-row yst-flex-wrap yst-items-center yst-justify-end yst-gap-4 yst-self-end md:yst-self-start", children: [
13110
- /* @__PURE__ */ M(Fe, { variant: "primary", className: "yst-gap-1.5", onClick: function() {
13110
+ /* @__PURE__ */ M(Be, { variant: "primary", className: "yst-gap-1.5", onClick: function() {
13111
13111
  return m("/setup");
13112
13112
  }, disabled: T || O, children: [
13113
13113
  /* @__PURE__ */ p(Z2, {}),
@@ -13166,7 +13166,7 @@ var cd = gl(eg || (eg = D9(["yst-flex-1 yst-space-y-2"]))), I9 = function(t) {
13166
13166
  /* @__PURE__ */ p("div", { className: "yst-max-w-xl yst-space-y-4", children: /* @__PURE__ */ p("p", { className: "yst-mb-0", children: "Note: This content was generated by an AI model (see dropdown above) and may contain errors. Please review before acting on it." }) }),
13167
13167
  /* @__PURE__ */ p("div", { className: "yst-ml-auto", children: /* @__PURE__ */ p(vr, { onClick: qe, variant: "default", children: /* @__PURE__ */ p(ib, {}) }) })
13168
13168
  ] }) }),
13169
- Be !== ni.completed && ze && /* @__PURE__ */ p(Fn, { className: "md:yst-col-span-2", variant: cn, children: ze }),
13169
+ Fe !== ni.completed && ze && /* @__PURE__ */ p(Fn, { className: "md:yst-col-span-2", variant: cn, children: ze }),
13170
13170
  un && /* @__PURE__ */ M(Fn, { variant: "warning", children: [
13171
13171
  "Note: This scan is not up to date with your current brand groups.",
13172
13172
  dn ? /* @__PURE__ */ M(st, { children: [
@@ -20948,22 +20948,22 @@ function hP(e, t) {
20948
20948
  }, m = () => {
20949
20949
  bm(t, null), y.current && (y.current.destroy(), y.current = null);
20950
20950
  };
20951
- return Ye(() => {
20951
+ return Qe(() => {
20952
20952
  !i && y.current && l && dP(y.current, l);
20953
20953
  }, [
20954
20954
  i,
20955
20955
  l
20956
- ]), Ye(() => {
20956
+ ]), Qe(() => {
20957
20957
  !i && y.current && s1(y.current.config.data, a.labels);
20958
20958
  }, [
20959
20959
  i,
20960
20960
  a.labels
20961
- ]), Ye(() => {
20961
+ ]), Qe(() => {
20962
20962
  !i && y.current && a.datasets && o1(y.current.config.data, a.datasets, s);
20963
20963
  }, [
20964
20964
  i,
20965
20965
  a.datasets
20966
- ]), Ye(() => {
20966
+ ]), Qe(() => {
20967
20967
  y.current && (i ? (m(), setTimeout(g)) : y.current.update(d));
20968
20968
  }, [
20969
20969
  i,
@@ -20971,11 +20971,11 @@ function hP(e, t) {
20971
20971
  a.labels,
20972
20972
  a.datasets,
20973
20973
  d
20974
- ]), Ye(() => {
20974
+ ]), Qe(() => {
20975
20975
  y.current && (m(), setTimeout(g));
20976
20976
  }, [
20977
20977
  o
20978
- ]), Ye(() => (g(), () => m()), []), /* @__PURE__ */ Qc.createElement("canvas", {
20978
+ ]), Qe(() => (g(), () => m()), []), /* @__PURE__ */ Qc.createElement("canvas", {
20979
20979
  ref: h,
20980
20980
  role: "img",
20981
20981
  height: n,
@@ -21284,22 +21284,22 @@ function DP(e, t) {
21284
21284
  function IP() {
21285
21285
  var e, t, n, r, i, s, o, a, l, c, u, d, f, h, y, g, m, v, b, S, C, w, k, x, _ = nr(), O = _.brandId, A = _.analysisId, E = fu(O, A, {
21286
21286
  query: {
21287
- select: function(Xe) {
21288
- var J = Xe.data;
21287
+ select: function(Ye) {
21288
+ var J = Ye.data;
21289
21289
  return J;
21290
21290
  },
21291
21291
  enabled: !!O && !!A
21292
21292
  }
21293
- }), T = E.data, B = E.isLoading, N = T == null || (e = T.analysis) === null || e === void 0 ? void 0 : e.scans, P = Array.isArray(N) && N.length > 0 ? N.reduce(function(Ge, Xe) {
21293
+ }), T = E.data, B = E.isLoading, N = T == null || (e = T.analysis) === null || e === void 0 ? void 0 : e.scans, P = Array.isArray(N) && N.length > 0 ? N.reduce(function(Ge, Ye) {
21294
21294
  if (!Ge)
21295
- return Xe;
21296
- if (!(Xe != null && Xe.finishedAt) || !(Ge != null && Ge.finishedAt))
21295
+ return Ye;
21296
+ if (!(Ye != null && Ye.finishedAt) || !(Ge != null && Ge.finishedAt))
21297
21297
  return Ge;
21298
- var J = new Date(Xe.finishedAt), Le = new Date(Ge.finishedAt);
21299
- return J > Le ? Xe : Ge;
21298
+ var J = new Date(Ye.finishedAt), Le = new Date(Ge.finishedAt);
21299
+ return J > Le ? Ye : Ge;
21300
21300
  }, N[0]) : void 0, $ = P == null || (t = P.scores) === null || t === void 0 ? void 0 : t.standardized, R = (n = P == null || (r = P.mentions) === null || r === void 0 || (r = r.mentionedInNumberOfQueries) === null || r === void 0 ? void 0 : r.value) !== null && n !== void 0 ? n : 0, U = P == null || (i = P.mentions) === null || i === void 0 || (i = i.mentionedInNumberOfQueries) === null || i === void 0 || (i = i.previous) === null || i === void 0 ? void 0 : i.difference, Q = (s = P == null || (o = P.scores) === null || o === void 0 || (o = o.standardized) === null || o === void 0 || (o = o.citations) === null || o === void 0 ? void 0 : o.value) !== null && s !== void 0 ? s : 0, j = (a = P == null || (l = P.citations) === null || l === void 0 || (l = l.total) === null || l === void 0 ? void 0 : l.value) !== null && a !== void 0 ? a : 0, H = P == null || (c = P.citations) === null || c === void 0 || (c = c.total) === null || c === void 0 || (c = c.previous) === null || c === void 0 ? void 0 : c.difference, q = P == null || (u = P.rankings) === null || u === void 0 || (u = u.list) === null || u === void 0 ? void 0 : u.find(function(Ge) {
21301
- var Xe;
21302
- return ((Xe = Ge.brand) === null || Xe === void 0 ? void 0 : Xe.isSelf) === !0;
21301
+ var Ye;
21302
+ return ((Ye = Ge.brand) === null || Ye === void 0 ? void 0 : Ye.isSelf) === !0;
21303
21303
  }), K = (d = q == null || (f = q.rank) === null || f === void 0 ? void 0 : f.value) !== null && d !== void 0 ? d : "—", F = q == null || (h = q.rank) === null || h === void 0 || (h = h.previous) === null || h === void 0 ? void 0 : h.difference;
21304
21304
  F && (F = F * -1);
21305
21305
  var te = (y = $ == null || (g = $.visibility) === null || g === void 0 ? void 0 : g.value) !== null && y !== void 0 ? y : 0, Z = $ == null || (m = $.visibility) === null || m === void 0 || (m = m.previous) === null || m === void 0 ? void 0 : m.value, fe = (v = $ == null || (b = $.ranking) === null || b === void 0 ? void 0 : b.value) !== null && v !== void 0 ? v : 0, Y = (S = $ == null || (C = $.sentiment) === null || C === void 0 ? void 0 : C.value) !== null && S !== void 0 ? S : 0, he = (w = $ == null || (k = $.mentions) === null || k === void 0 ? void 0 : k.value) !== null && w !== void 0 ? w : 0, ye = {
@@ -21315,8 +21315,8 @@ function IP() {
21315
21315
  mode: "point",
21316
21316
  intersect: !0,
21317
21317
  callbacks: {
21318
- label: function(Xe) {
21319
- var J = Xe.label || "", Le = Xe.parsed.r || 0;
21318
+ label: function(Ye) {
21319
+ var J = Ye.label || "", Le = Ye.parsed.r || 0;
21320
21320
  return "".concat(J, ": ").concat(Le, "%");
21321
21321
  }
21322
21322
  }
@@ -21338,8 +21338,8 @@ function IP() {
21338
21338
  }
21339
21339
  }
21340
21340
  }
21341
- }), ie = Ee(typeof window != "undefined" && window.innerWidth < 800 ? "top" : "left"), at = OP(ie, 2), Be = at[0], ut = at[1];
21342
- return Ye(function() {
21341
+ }), ie = Ee(typeof window != "undefined" && window.innerWidth < 800 ? "top" : "left"), at = OP(ie, 2), Fe = at[0], ut = at[1];
21342
+ return Qe(function() {
21343
21343
  function Ge() {
21344
21344
  ut(window.innerWidth < 800 ? "top" : "left");
21345
21345
  }
@@ -21365,7 +21365,7 @@ function IP() {
21365
21365
  borderBottom: !0,
21366
21366
  borderRight: !0,
21367
21367
  delta: U,
21368
- tooltipPosition: Be
21368
+ tooltipPosition: Fe
21369
21369
  }
21370
21370
  ),
21371
21371
  /* @__PURE__ */ p(
@@ -21390,7 +21390,7 @@ function IP() {
21390
21390
  tooltip: "Citations are the source links found in AI-generated answers. They form the basis for mentions, sentiment, and ranking insights.",
21391
21391
  borderRight: !0,
21392
21392
  delta: H,
21393
- tooltipPosition: Be
21393
+ tooltipPosition: Fe
21394
21394
  }
21395
21395
  ),
21396
21396
  /* @__PURE__ */ p(
@@ -21499,7 +21499,7 @@ var xd = function() {
21499
21499
  }
21500
21500
  }
21501
21501
  }), l = a.data, c = a.isLoading, u = l == null ? void 0 : l.status, d = o || c, f = s && (s == null ? void 0 : s.length) > 0, h = !d && l && u === ni.completed, y = Ee(!1), g = NP(y, 2), m = g[0], v = g[1], b = br(null), S = br(void 0), C = localStorage.getItem("yst_congratulations_toast_seen") === "true";
21502
- Ye(function() {
21502
+ Qe(function() {
21503
21503
  return h && !S.current && !C && (b.current = setTimeout(function() {
21504
21504
  v(!0), localStorage.setItem("yst_congratulations_toast_seen", "true");
21505
21505
  }, 1e4)), !h && S.current && (v(!1), b.current && (clearTimeout(b.current), b.current = null)), S.current = h, function() {
@@ -21526,11 +21526,11 @@ var xd = function() {
21526
21526
  /* @__PURE__ */ p(kt, { size: "3", className: "yst-mb-1", children: "Congratulations on your first analysis!" }),
21527
21527
  "You’ve completed your brand analysis. We’d love to hear what you think."
21528
21528
  ] }),
21529
- /* @__PURE__ */ p(Fe, { variant: "tertiary", onClick: E, children: /* @__PURE__ */ p(ib, {}) })
21529
+ /* @__PURE__ */ p(Be, { variant: "tertiary", onClick: E, children: /* @__PURE__ */ p(ib, {}) })
21530
21530
  ] }),
21531
21531
  /* @__PURE__ */ M("div", { className: "yst-flex yst-justify-end yst-gap-4", children: [
21532
- /* @__PURE__ */ p(Fe, { variant: "tertiary", onClick: E, children: "Dismiss" }),
21533
- /* @__PURE__ */ M(Fe, { as: "a", href: "https://www.surveymonkey.com/r/HGSB8DL", target: "_blank", children: [
21532
+ /* @__PURE__ */ p(Be, { variant: "tertiary", onClick: E, children: "Dismiss" }),
21533
+ /* @__PURE__ */ M(Be, { as: "a", href: "https://www.surveymonkey.com/r/HGSB8DL", target: "_blank", children: [
21534
21534
  "Give feedback",
21535
21535
  /* @__PURE__ */ p(rb, { className: "yst-ml-2" })
21536
21536
  ] })
@@ -21542,7 +21542,7 @@ var xd = function() {
21542
21542
  h && /* @__PURE__ */ M("div", { className: "yst-space-y-4", children: [
21543
21543
  /* @__PURE__ */ M("div", { className: "yst-flex yst-items-center yst-justify-between", children: [
21544
21544
  /* @__PURE__ */ p(kt, { size: "2", children: "Your brand analysis" }),
21545
- /* @__PURE__ */ M(Fe, { as: Ai, variant: "secondary", to: "/brands/".concat(n, "/brand-list"), className: Oe("yst-gap-1.5"), disabled: !n, children: [
21545
+ /* @__PURE__ */ M(Be, { as: Ai, variant: "secondary", to: "/brands/".concat(n, "/brand-list"), className: Oe("yst-gap-1.5"), disabled: !n, children: [
21546
21546
  /* @__PURE__ */ p(X2, {}),
21547
21547
  " Edit brand list"
21548
21548
  ] })
@@ -21711,7 +21711,7 @@ var zP = function() {
21711
21711
  };
21712
21712
  function JP(e) {
21713
21713
  var t = e.subpath, n = t === void 0 ? "/" : t, r = e.onNavigate, i = Tn(), s = Xt(), o = br(n), a = br(null), l = br(!1), c = "".concat(s.pathname).concat(s.search).concat(s.hash), u = jt(r, [r]);
21714
- return Ye(function() {
21714
+ return Qe(function() {
21715
21715
  if (n === c) {
21716
21716
  o.current = n;
21717
21717
  return;
@@ -21721,7 +21721,7 @@ function JP(e) {
21721
21721
  }), setTimeout(function() {
21722
21722
  l.current = !1;
21723
21723
  }, 10));
21724
- }, [n, c, i]), Ye(function() {
21724
+ }, [n, c, i]), Qe(function() {
21725
21725
  l.current || c !== n && c !== a.current && (a.current = c, u(c));
21726
21726
  }, [c, n, u]), null;
21727
21727
  }
@@ -21780,7 +21780,7 @@ var zN = function(t) {
21780
21780
  basename: d,
21781
21781
  subpath: h
21782
21782
  };
21783
- return Ye(function() {
21783
+ return Qe(function() {
21784
21784
  l && S4(l), C4(typeof a != "function" ? function() {
21785
21785
  return a;
21786
21786
  } : a), _(!1);
@@ -27976,8 +27976,8 @@ function bI() {
27976
27976
  function hp() {
27977
27977
  const e = Gn();
27978
27978
  return (() => {
27979
- var t = JD(), n = t.firstChild, r = n.nextSibling, i = r.nextSibling, s = i.firstChild, o = i.nextSibling, a = o.firstChild, l = o.nextSibling, c = l.nextSibling, u = c.firstChild, d = c.nextSibling, f = d.firstChild, h = d.nextSibling, y = h.nextSibling, g = y.firstChild, m = y.nextSibling, v = m.firstChild, b = m.nextSibling, S = b.nextSibling, C = S.firstChild, w = S.nextSibling, k = w.firstChild, x = w.nextSibling, _ = x.nextSibling, O = _.firstChild, A = _.nextSibling, E = A.firstChild, T = A.nextSibling, B = T.nextSibling, N = B.firstChild, P = B.nextSibling, $ = P.firstChild, R = P.nextSibling, U = R.nextSibling, Q = U.firstChild, j = U.nextSibling, H = j.firstChild, q = j.nextSibling, K = q.firstChild, F = K.nextSibling, te = F.nextSibling, Z = te.nextSibling, fe = Z.nextSibling, Y = q.nextSibling, he = Y.firstChild, ye = Y.nextSibling, De = ye.firstChild, ie = ye.nextSibling, at = ie.firstChild, Be = at.nextSibling, ut = Be.nextSibling, Ge = ut.firstChild, Xe = Ge.nextSibling, J = Xe.nextSibling, Le = J.nextSibling, dt = Le.nextSibling, qe = dt.nextSibling, Re = qe.nextSibling, ue = Re.nextSibling, ge = ue.nextSibling, de = ge.nextSibling, ze = de.nextSibling, cn = ze.nextSibling, Kt = ie.nextSibling, un = Kt.firstChild, dn = Kt.nextSibling, Te = dn.firstChild, Qe = dn.nextSibling, se = Qe.firstChild, me = se.nextSibling, Ae = Qe.nextSibling, Pe = Ae.firstChild, Ke = Ae.nextSibling, Lt = Ke.firstChild, fn = Ke.nextSibling, $i = fn.firstChild, Io = $i.nextSibling, bs = Io.nextSibling, l0 = bs.nextSibling, c0 = l0.nextSibling, u0 = c0.nextSibling, d0 = u0.nextSibling, f0 = d0.nextSibling, h0 = f0.nextSibling, y0 = h0.nextSibling, g0 = y0.nextSibling, m0 = g0.nextSibling, p0 = m0.nextSibling, v0 = p0.nextSibling, b0 = v0.nextSibling, w0 = b0.nextSibling, x0 = w0.nextSibling, Zw = x0.nextSibling;
27980
- return ne(n, "id", `a-${e}`), ne(r, "fill", `url(#a-${e})`), ne(s, "id", `am-${e}`), ne(o, "id", `b-${e}`), ne(a, "filter", `url(#am-${e})`), ne(l, "mask", `url(#b-${e})`), ne(u, "id", `ah-${e}`), ne(d, "id", `k-${e}`), ne(f, "filter", `url(#ah-${e})`), ne(h, "mask", `url(#k-${e})`), ne(g, "id", `ae-${e}`), ne(m, "id", `j-${e}`), ne(v, "filter", `url(#ae-${e})`), ne(b, "mask", `url(#j-${e})`), ne(C, "id", `ai-${e}`), ne(w, "id", `i-${e}`), ne(k, "filter", `url(#ai-${e})`), ne(x, "mask", `url(#i-${e})`), ne(O, "id", `aj-${e}`), ne(A, "id", `h-${e}`), ne(E, "filter", `url(#aj-${e})`), ne(T, "mask", `url(#h-${e})`), ne(N, "id", `ag-${e}`), ne(P, "id", `g-${e}`), ne($, "filter", `url(#ag-${e})`), ne(R, "mask", `url(#g-${e})`), ne(Q, "id", `af-${e}`), ne(j, "id", `f-${e}`), ne(H, "filter", `url(#af-${e})`), ne(q, "mask", `url(#f-${e})`), ne(Z, "id", `m-${e}`), ne(fe, "fill", `url(#m-${e})`), ne(he, "id", `ak-${e}`), ne(ye, "id", `e-${e}`), ne(De, "filter", `url(#ak-${e})`), ne(ie, "mask", `url(#e-${e})`), ne(at, "id", `n-${e}`), ne(Be, "fill", `url(#n-${e})`), ne(Ge, "id", `r-${e}`), ne(Xe, "fill", `url(#r-${e})`), ne(J, "id", `s-${e}`), ne(Le, "fill", `url(#s-${e})`), ne(dt, "id", `q-${e}`), ne(qe, "fill", `url(#q-${e})`), ne(Re, "id", `p-${e}`), ne(ue, "fill", `url(#p-${e})`), ne(ge, "id", `o-${e}`), ne(de, "fill", `url(#o-${e})`), ne(ze, "id", `l-${e}`), ne(cn, "fill", `url(#l-${e})`), ne(un, "id", `al-${e}`), ne(dn, "id", `d-${e}`), ne(Te, "filter", `url(#al-${e})`), ne(Qe, "mask", `url(#d-${e})`), ne(se, "id", `u-${e}`), ne(me, "fill", `url(#u-${e})`), ne(Pe, "id", `ad-${e}`), ne(Ke, "id", `c-${e}`), ne(Lt, "filter", `url(#ad-${e})`), ne(fn, "mask", `url(#c-${e})`), ne($i, "id", `t-${e}`), ne(Io, "fill", `url(#t-${e})`), ne(bs, "id", `v-${e}`), ne(l0, "stroke", `url(#v-${e})`), ne(c0, "id", `aa-${e}`), ne(u0, "stroke", `url(#aa-${e})`), ne(d0, "id", `w-${e}`), ne(f0, "stroke", `url(#w-${e})`), ne(h0, "id", `ac-${e}`), ne(y0, "stroke", `url(#ac-${e})`), ne(g0, "id", `ab-${e}`), ne(m0, "stroke", `url(#ab-${e})`), ne(p0, "id", `y-${e}`), ne(v0, "stroke", `url(#y-${e})`), ne(b0, "id", `x-${e}`), ne(w0, "stroke", `url(#x-${e})`), ne(x0, "id", `z-${e}`), ne(Zw, "stroke", `url(#z-${e})`), t;
27979
+ var t = JD(), n = t.firstChild, r = n.nextSibling, i = r.nextSibling, s = i.firstChild, o = i.nextSibling, a = o.firstChild, l = o.nextSibling, c = l.nextSibling, u = c.firstChild, d = c.nextSibling, f = d.firstChild, h = d.nextSibling, y = h.nextSibling, g = y.firstChild, m = y.nextSibling, v = m.firstChild, b = m.nextSibling, S = b.nextSibling, C = S.firstChild, w = S.nextSibling, k = w.firstChild, x = w.nextSibling, _ = x.nextSibling, O = _.firstChild, A = _.nextSibling, E = A.firstChild, T = A.nextSibling, B = T.nextSibling, N = B.firstChild, P = B.nextSibling, $ = P.firstChild, R = P.nextSibling, U = R.nextSibling, Q = U.firstChild, j = U.nextSibling, H = j.firstChild, q = j.nextSibling, K = q.firstChild, F = K.nextSibling, te = F.nextSibling, Z = te.nextSibling, fe = Z.nextSibling, Y = q.nextSibling, he = Y.firstChild, ye = Y.nextSibling, De = ye.firstChild, ie = ye.nextSibling, at = ie.firstChild, Fe = at.nextSibling, ut = Fe.nextSibling, Ge = ut.firstChild, Ye = Ge.nextSibling, J = Ye.nextSibling, Le = J.nextSibling, dt = Le.nextSibling, qe = dt.nextSibling, Re = qe.nextSibling, ue = Re.nextSibling, ge = ue.nextSibling, de = ge.nextSibling, ze = de.nextSibling, cn = ze.nextSibling, Kt = ie.nextSibling, un = Kt.firstChild, dn = Kt.nextSibling, Te = dn.firstChild, Xe = dn.nextSibling, se = Xe.firstChild, me = se.nextSibling, Ae = Xe.nextSibling, Pe = Ae.firstChild, Ke = Ae.nextSibling, Lt = Ke.firstChild, fn = Ke.nextSibling, $i = fn.firstChild, Io = $i.nextSibling, bs = Io.nextSibling, l0 = bs.nextSibling, c0 = l0.nextSibling, u0 = c0.nextSibling, d0 = u0.nextSibling, f0 = d0.nextSibling, h0 = f0.nextSibling, y0 = h0.nextSibling, g0 = y0.nextSibling, m0 = g0.nextSibling, p0 = m0.nextSibling, v0 = p0.nextSibling, b0 = v0.nextSibling, w0 = b0.nextSibling, x0 = w0.nextSibling, Zw = x0.nextSibling;
27980
+ return ne(n, "id", `a-${e}`), ne(r, "fill", `url(#a-${e})`), ne(s, "id", `am-${e}`), ne(o, "id", `b-${e}`), ne(a, "filter", `url(#am-${e})`), ne(l, "mask", `url(#b-${e})`), ne(u, "id", `ah-${e}`), ne(d, "id", `k-${e}`), ne(f, "filter", `url(#ah-${e})`), ne(h, "mask", `url(#k-${e})`), ne(g, "id", `ae-${e}`), ne(m, "id", `j-${e}`), ne(v, "filter", `url(#ae-${e})`), ne(b, "mask", `url(#j-${e})`), ne(C, "id", `ai-${e}`), ne(w, "id", `i-${e}`), ne(k, "filter", `url(#ai-${e})`), ne(x, "mask", `url(#i-${e})`), ne(O, "id", `aj-${e}`), ne(A, "id", `h-${e}`), ne(E, "filter", `url(#aj-${e})`), ne(T, "mask", `url(#h-${e})`), ne(N, "id", `ag-${e}`), ne(P, "id", `g-${e}`), ne($, "filter", `url(#ag-${e})`), ne(R, "mask", `url(#g-${e})`), ne(Q, "id", `af-${e}`), ne(j, "id", `f-${e}`), ne(H, "filter", `url(#af-${e})`), ne(q, "mask", `url(#f-${e})`), ne(Z, "id", `m-${e}`), ne(fe, "fill", `url(#m-${e})`), ne(he, "id", `ak-${e}`), ne(ye, "id", `e-${e}`), ne(De, "filter", `url(#ak-${e})`), ne(ie, "mask", `url(#e-${e})`), ne(at, "id", `n-${e}`), ne(Fe, "fill", `url(#n-${e})`), ne(Ge, "id", `r-${e}`), ne(Ye, "fill", `url(#r-${e})`), ne(J, "id", `s-${e}`), ne(Le, "fill", `url(#s-${e})`), ne(dt, "id", `q-${e}`), ne(qe, "fill", `url(#q-${e})`), ne(Re, "id", `p-${e}`), ne(ue, "fill", `url(#p-${e})`), ne(ge, "id", `o-${e}`), ne(de, "fill", `url(#o-${e})`), ne(ze, "id", `l-${e}`), ne(cn, "fill", `url(#l-${e})`), ne(un, "id", `al-${e}`), ne(dn, "id", `d-${e}`), ne(Te, "filter", `url(#al-${e})`), ne(Xe, "mask", `url(#d-${e})`), ne(se, "id", `u-${e}`), ne(me, "fill", `url(#u-${e})`), ne(Pe, "id", `ad-${e}`), ne(Ke, "id", `c-${e}`), ne(Lt, "filter", `url(#ad-${e})`), ne(fn, "mask", `url(#c-${e})`), ne($i, "id", `t-${e}`), ne(Io, "fill", `url(#t-${e})`), ne(bs, "id", `v-${e}`), ne(l0, "stroke", `url(#v-${e})`), ne(c0, "id", `aa-${e}`), ne(u0, "stroke", `url(#aa-${e})`), ne(d0, "id", `w-${e}`), ne(f0, "stroke", `url(#w-${e})`), ne(h0, "id", `ac-${e}`), ne(y0, "stroke", `url(#ac-${e})`), ne(g0, "id", `ab-${e}`), ne(m0, "stroke", `url(#ab-${e})`), ne(p0, "id", `y-${e}`), ne(v0, "stroke", `url(#y-${e})`), ne(b0, "id", `x-${e}`), ne(w0, "stroke", `url(#x-${e})`), ne(x0, "id", `z-${e}`), ne(Zw, "stroke", `url(#z-${e})`), t;
27981
27981
  })();
27982
27982
  }
27983
27983
  var wI = /* @__PURE__ */ ce('<span><svg width=16 height=16 viewBox="0 0 16 16"fill=none xmlns=http://www.w3.org/2000/svg><path d="M6 12L10 8L6 4"stroke-width=2 stroke-linecap=round stroke-linejoin=round>'), xI = /* @__PURE__ */ ce('<button title="Copy object to clipboard">'), SI = /* @__PURE__ */ ce('<button title="Remove all items"aria-label="Remove all items">'), CI = /* @__PURE__ */ ce('<button title="Delete item"aria-label="Delete item">'), _I = /* @__PURE__ */ ce('<button title="Toggle value"aria-label="Toggle value">'), kI = /* @__PURE__ */ ce('<button title="Bulk Edit Data"aria-label="Bulk Edit Data">'), Yo = /* @__PURE__ */ ce("<div>"), OI = /* @__PURE__ */ ce("<div><button> <span></span> <span> "), AI = /* @__PURE__ */ ce("<input>"), yp = /* @__PURE__ */ ce("<span>"), EI = /* @__PURE__ */ ce("<div><span>:"), PI = /* @__PURE__ */ ce("<div><div><button> [<!>...<!>]");
@@ -29122,8 +29122,8 @@ var II = /* @__PURE__ */ ce('<div><div aria-hidden=true></div><button type=butto
29122
29122
  `, Xn() < us && !(_n() || wi()) && r`
29123
29123
  height: 100%;
29124
29124
  max-height: 100%;
29125
- `, "tsqd-queries-container"), Z = le(i().row, "tsqd-header"), fe = i().logoAndToggleContainer, Y = le(i().logo, "tsqd-text-logo-container"), he = le(i().tanstackLogo, "tsqd-text-logo-tanstack"), ye = le(i().queryFlavorLogo, "tsqd-text-logo-query-flavor"), De = le(i().row, "tsqd-filters-actions-container"), ie = le(i().filtersContainer, "tsqd-filters-container"), at = le(i().filterInput, "tsqd-query-filter-textfield-container"), Be = le("tsqd-query-filter-textfield"), ut = le(i().filterSelect, "tsqd-query-filter-sort-container"), Ge = `Sort order ${(o() === "queries" ? c() : d()) === -1 ? "descending" : "ascending"}`, Xe = (o() === "queries" ? c() : d()) === -1, J = le(i().actionsContainer, "tsqd-actions-container"), Le = le(i().actionsBtn, "tsqd-actions-btn", "tsqd-action-clear-cache"), dt = `Clear ${o()} cache`, qe = le(i().actionsBtn, Xo() && i().actionsBtnOffline, "tsqd-actions-btn", "tsqd-action-mock-offline-behavior"), Re = `${Xo() ? "Unset offline mocking behavior" : "Mock offline behavior"}`, ue = Xo(), ge = `${Xo() ? "Unset offline mocking behavior" : "Mock offline behavior"}`;
29126
- return te !== F.e && re(x, F.e = te), Z !== F.t && re(_, F.t = Z), fe !== F.a && re(O, F.a = fe), Y !== F.o && re(A, F.o = Y), he !== F.i && re(E, F.i = he), ye !== F.n && re(T, F.n = ye), De !== F.s && re(N, F.s = De), ie !== F.h && re(P, F.h = ie), at !== F.r && re($, F.r = at), Be !== F.d && re(R, F.d = Be), ut !== F.l && re(U, F.l = ut), Ge !== F.u && ne(Q, "aria-label", F.u = Ge), Xe !== F.c && ne(Q, "aria-pressed", F.c = Xe), J !== F.w && re(j, F.w = J), Le !== F.m && re(H, F.m = Le), dt !== F.f && ne(H, "title", F.f = dt), qe !== F.y && re(q, F.y = qe), Re !== F.g && ne(q, "aria-label", F.g = Re), ue !== F.p && ne(q, "aria-pressed", F.p = ue), ge !== F.b && ne(q, "title", F.b = ge), F;
29125
+ `, "tsqd-queries-container"), Z = le(i().row, "tsqd-header"), fe = i().logoAndToggleContainer, Y = le(i().logo, "tsqd-text-logo-container"), he = le(i().tanstackLogo, "tsqd-text-logo-tanstack"), ye = le(i().queryFlavorLogo, "tsqd-text-logo-query-flavor"), De = le(i().row, "tsqd-filters-actions-container"), ie = le(i().filtersContainer, "tsqd-filters-container"), at = le(i().filterInput, "tsqd-query-filter-textfield-container"), Fe = le("tsqd-query-filter-textfield"), ut = le(i().filterSelect, "tsqd-query-filter-sort-container"), Ge = `Sort order ${(o() === "queries" ? c() : d()) === -1 ? "descending" : "ascending"}`, Ye = (o() === "queries" ? c() : d()) === -1, J = le(i().actionsContainer, "tsqd-actions-container"), Le = le(i().actionsBtn, "tsqd-actions-btn", "tsqd-action-clear-cache"), dt = `Clear ${o()} cache`, qe = le(i().actionsBtn, Xo() && i().actionsBtnOffline, "tsqd-actions-btn", "tsqd-action-mock-offline-behavior"), Re = `${Xo() ? "Unset offline mocking behavior" : "Mock offline behavior"}`, ue = Xo(), ge = `${Xo() ? "Unset offline mocking behavior" : "Mock offline behavior"}`;
29126
+ return te !== F.e && re(x, F.e = te), Z !== F.t && re(_, F.t = Z), fe !== F.a && re(O, F.a = fe), Y !== F.o && re(A, F.o = Y), he !== F.i && re(E, F.i = he), ye !== F.n && re(T, F.n = ye), De !== F.s && re(N, F.s = De), ie !== F.h && re(P, F.h = ie), at !== F.r && re($, F.r = at), Fe !== F.d && re(R, F.d = Fe), ut !== F.l && re(U, F.l = ut), Ge !== F.u && ne(Q, "aria-label", F.u = Ge), Ye !== F.c && ne(Q, "aria-pressed", F.c = Ye), J !== F.w && re(j, F.w = J), Le !== F.m && re(H, F.m = Le), dt !== F.f && ne(H, "title", F.f = dt), qe !== F.y && re(q, F.y = qe), Re !== F.g && ne(q, "aria-label", F.g = Re), ue !== F.p && ne(q, "aria-pressed", F.p = ue), ge !== F.b && ne(q, "title", F.b = ge), F;
29127
29127
  }, {
29128
29128
  e: void 0,
29129
29129
  t: void 0,
@@ -29534,9 +29534,9 @@ var II = /* @__PURE__ */ ce('<div><div aria-hidden=true></div><button type=butto
29534
29534
  return G(() => !!h())() && g();
29535
29535
  },
29536
29536
  get children() {
29537
- var O = cL(), A = O.firstChild, E = A.nextSibling, T = E.firstChild, B = T.firstChild, N = B.firstChild, P = B.nextSibling, $ = T.nextSibling, R = $.firstChild, U = R.nextSibling, Q = $.nextSibling, j = Q.firstChild, H = j.nextSibling, q = E.nextSibling, K = q.nextSibling, F = K.firstChild, te = F.firstChild, Z = F.nextSibling, fe = Z.firstChild, Y = Z.nextSibling, he = Y.firstChild, ye = Y.nextSibling, De = ye.firstChild, ie = ye.nextSibling, at = ie.firstChild, Be = at.nextSibling, ut = K.nextSibling;
29537
+ var O = cL(), A = O.firstChild, E = A.nextSibling, T = E.firstChild, B = T.firstChild, N = B.firstChild, P = B.nextSibling, $ = T.nextSibling, R = $.firstChild, U = R.nextSibling, Q = $.nextSibling, j = Q.firstChild, H = j.nextSibling, q = E.nextSibling, K = q.nextSibling, F = K.firstChild, te = F.firstChild, Z = F.nextSibling, fe = Z.firstChild, Y = Z.nextSibling, he = Y.firstChild, ye = Y.nextSibling, De = ye.firstChild, ie = ye.nextSibling, at = ie.firstChild, Fe = at.nextSibling, ut = K.nextSibling;
29538
29538
  ut.firstChild;
29539
- var Ge = ut.nextSibling, Xe = Ge.nextSibling;
29539
+ var Ge = ut.nextSibling, Ye = Ge.nextSibling;
29540
29540
  return W(N, () => Cc(h().queryKey, !0)), W(P, v), W(U, S), W(H, () => new Date(g().dataUpdatedAt).toLocaleTimeString()), F.$$click = w, Z.$$click = () => {
29541
29541
  var J;
29542
29542
  ur({
@@ -29581,7 +29581,7 @@ var II = /* @__PURE__ */ ce('<div><div aria-hidden=true></div><button type=butto
29581
29581
  }
29582
29582
  });
29583
29583
  }
29584
- }, W(ie, () => b() === "pending" ? "Restore" : "Trigger", Be), W(K, I(be, {
29584
+ }, W(ie, () => b() === "pending" ? "Restore" : "Trigger", Fe), W(K, I(be, {
29585
29585
  get when() {
29586
29586
  return f().length === 0 || b() === "error";
29587
29587
  },
@@ -29672,12 +29672,12 @@ var II = /* @__PURE__ */ ce('<div><div aria-hidden=true></div><button type=butto
29672
29672
  d(!0);
29673
29673
  }
29674
29674
  }), Le.addEventListener("focus", () => d(!1)), W(qe, () => u() ? "Invalid Value" : ""), ue.$$click = () => c("view"), we((de) => {
29675
- var ze = le(n().devtoolsEditForm, "tsqd-query-details-data-editor"), cn = n().devtoolsEditTextarea, Kt = u(), un = n().devtoolsEditFormActions, dn = n().devtoolsEditFormError, Te = n().devtoolsEditFormActionContainer, Qe = le(n().devtoolsEditFormAction, t`
29675
+ var ze = le(n().devtoolsEditForm, "tsqd-query-details-data-editor"), cn = n().devtoolsEditTextarea, Kt = u(), un = n().devtoolsEditFormActions, dn = n().devtoolsEditFormError, Te = n().devtoolsEditFormActionContainer, Xe = le(n().devtoolsEditFormAction, t`
29676
29676
  color: ${i(r.gray[600], r.gray[300])};
29677
29677
  `), se = le(n().devtoolsEditFormAction, t`
29678
29678
  color: ${i(r.blue[600], r.blue[400])};
29679
29679
  `);
29680
- return ze !== de.e && re(J, de.e = ze), cn !== de.t && re(Le, de.t = cn), Kt !== de.a && ne(Le, "data-error", de.a = Kt), un !== de.o && re(dt, de.o = un), dn !== de.i && re(qe, de.i = dn), Te !== de.n && re(Re, de.n = Te), Qe !== de.s && re(ue, de.s = Qe), se !== de.h && re(ge, de.h = se), de;
29680
+ return ze !== de.e && re(J, de.e = ze), cn !== de.t && re(Le, de.t = cn), Kt !== de.a && ne(Le, "data-error", de.a = Kt), un !== de.o && re(dt, de.o = un), dn !== de.i && re(qe, de.i = dn), Te !== de.n && re(Re, de.n = Te), Xe !== de.s && re(ue, de.s = Xe), se !== de.h && re(ge, de.h = se), de;
29681
29681
  }, {
29682
29682
  e: void 0,
29683
29683
  t: void 0,
@@ -29689,7 +29689,7 @@ var II = /* @__PURE__ */ ce('<div><div aria-hidden=true></div><button type=butto
29689
29689
  h: void 0
29690
29690
  }), we(() => Le.value = JSON.stringify(m(), null, 2)), J;
29691
29691
  }
29692
- }), Ge), W(Xe, I(mi, {
29692
+ }), Ge), W(Ye, I(mi, {
29693
29693
  label: "Query",
29694
29694
  defaultExpanded: ["Query", "queryKey"],
29695
29695
  get value() {
@@ -29706,7 +29706,7 @@ var II = /* @__PURE__ */ ce('<div><div aria-hidden=true></div><button type=butto
29706
29706
  background-color: ${i(r.yellow[600], r.yellow[400])};
29707
29707
  `, Te = le(t`
29708
29708
  color: ${i(r.gray[600], r.gray[300])};
29709
- `, "tsqd-query-details-actions-btn", "tsqd-query-details-action-reset"), Qe = b() === "pending", se = t`
29709
+ `, "tsqd-query-details-actions-btn", "tsqd-query-details-action-reset"), Xe = b() === "pending", se = t`
29710
29710
  background-color: ${i(r.gray[600], r.gray[400])};
29711
29711
  `, me = le(t`
29712
29712
  color: ${i(r.pink[500], r.pink[400])};
@@ -29717,7 +29717,7 @@ var II = /* @__PURE__ */ ce('<div><div aria-hidden=true></div><button type=butto
29717
29717
  `, "tsqd-query-details-actions-btn", "tsqd-query-details-action-loading"), Lt = o(), fn = t`
29718
29718
  background-color: ${i(r.cyan[500], r.cyan[400])};
29719
29719
  `, $i = le(n().detailsHeader, "tsqd-query-details-header"), Io = le(n().detailsHeader, "tsqd-query-details-header"), bs = V.size[2];
29720
- return Le !== J.e && re(O, J.e = Le), dt !== J.t && re(A, J.t = dt), qe !== J.a && re(E, J.a = qe), Re !== J.o && re(P, J.o = Re), ue !== J.i && re(q, J.i = ue), ge !== J.n && re(K, J.n = ge), de !== J.s && re(F, J.s = de), ze !== J.h && (F.disabled = J.h = ze), cn !== J.r && re(te, J.r = cn), Kt !== J.d && re(Z, J.d = Kt), un !== J.l && (Z.disabled = J.l = un), dn !== J.u && re(fe, J.u = dn), Te !== J.c && re(Y, J.c = Te), Qe !== J.w && (Y.disabled = J.w = Qe), se !== J.m && re(he, J.m = se), me !== J.f && re(ye, J.f = me), Ae !== J.y && (ye.disabled = J.y = Ae), Pe !== J.g && re(De, J.g = Pe), Ke !== J.p && re(ie, J.p = Ke), Lt !== J.b && (ie.disabled = J.b = Lt), fn !== J.T && re(at, J.T = fn), $i !== J.A && re(ut, J.A = $i), Io !== J.O && re(Ge, J.O = Io), bs !== J.I && ((J.I = bs) != null ? Xe.style.setProperty("padding", bs) : Xe.style.removeProperty("padding")), J;
29720
+ return Le !== J.e && re(O, J.e = Le), dt !== J.t && re(A, J.t = dt), qe !== J.a && re(E, J.a = qe), Re !== J.o && re(P, J.o = Re), ue !== J.i && re(q, J.i = ue), ge !== J.n && re(K, J.n = ge), de !== J.s && re(F, J.s = de), ze !== J.h && (F.disabled = J.h = ze), cn !== J.r && re(te, J.r = cn), Kt !== J.d && re(Z, J.d = Kt), un !== J.l && (Z.disabled = J.l = un), dn !== J.u && re(fe, J.u = dn), Te !== J.c && re(Y, J.c = Te), Xe !== J.w && (Y.disabled = J.w = Xe), se !== J.m && re(he, J.m = se), me !== J.f && re(ye, J.f = me), Ae !== J.y && (ye.disabled = J.y = Ae), Pe !== J.g && re(De, J.g = Pe), Ke !== J.p && re(ie, J.p = Ke), Lt !== J.b && (ie.disabled = J.b = Lt), fn !== J.T && re(at, J.T = fn), $i !== J.A && re(ut, J.A = $i), Io !== J.O && re(Ge, J.O = Io), bs !== J.I && ((J.I = bs) != null ? Ye.style.setProperty("padding", bs) : Ye.style.removeProperty("padding")), J;
29721
29721
  }, {
29722
29722
  e: void 0,
29723
29723
  t: void 0,
@@ -31161,7 +31161,7 @@ function LL(e) {
31161
31161
  }
31162
31162
  var RL = function(t) {
31163
31163
  var n = t.isOpen, r = t.onClose, i = t.groupToEdit, s = t.allBrands, o = nr(), a = o.brandId, l = o.analysisId, c = Ee(""), u = Ad(c, 2), d = u[0], f = u[1], h = Ee([]), y = Ad(h, 2), g = y[0], m = y[1], v = Ee(!1), b = Ad(v, 2), S = b[0], C = b[1], w = an();
31164
- Ye(function() {
31164
+ Qe(function() {
31165
31165
  if (n && i && i.type === "group") {
31166
31166
  var U;
31167
31167
  f(String(i.name || ""));
@@ -31322,10 +31322,10 @@ var RL = function(t) {
31322
31322
  ] })
31323
31323
  ] }),
31324
31324
  /* @__PURE__ */ p(Ce.Container.Footer, { children: /* @__PURE__ */ M("div", { className: "yst-flex yst-w-full yst-items-center yst-justify-between", children: [
31325
- /* @__PURE__ */ p("div", { className: "yst-flex yst-justify-start", children: /* @__PURE__ */ p(Fe, { variant: "tertiary", onClick: P, disabled: _, className: "yst-text-red-600", children: "Ungroup brands" }) }),
31325
+ /* @__PURE__ */ p("div", { className: "yst-flex yst-justify-start", children: /* @__PURE__ */ p(Be, { variant: "tertiary", onClick: P, disabled: _, className: "yst-text-red-600", children: "Ungroup brands" }) }),
31326
31326
  /* @__PURE__ */ M("div", { className: "yst-flex yst-justify-end yst-gap-2", children: [
31327
- /* @__PURE__ */ p(Fe, { variant: "secondary", onClick: B, children: "Cancel" }),
31328
- /* @__PURE__ */ p(Fe, { variant: "primary", onClick: T, disabled: !d.trim() || _, isLoading: _, children: _ ? "Saving..." : "Save changes" })
31327
+ /* @__PURE__ */ p(Be, { variant: "secondary", onClick: B, children: "Cancel" }),
31328
+ /* @__PURE__ */ p(Be, { variant: "primary", onClick: T, disabled: !d.trim() || _, isLoading: _, children: _ ? "Saving..." : "Save changes" })
31329
31329
  ] })
31330
31330
  ] }) })
31331
31331
  ] }) }) }),
@@ -31481,7 +31481,7 @@ function qL(e) {
31481
31481
  }
31482
31482
  var zL = function(t) {
31483
31483
  var n = t.isOpen, r = t.onClose, i = t.brandId, s = t.brandsToGroup, o = t.onGroupCreated, a = an(), l = nr(), c = l.analysisId, u = Ee(""), d = Cp(u, 2), f = d[0], h = d[1], y = Ee([]), g = Cp(y, 2), m = g[0], v = g[1];
31484
- Ye(function() {
31484
+ Qe(function() {
31485
31485
  if (n && s.length > 0) {
31486
31486
  var _, O = (_ = s[0]) === null || _ === void 0 ? void 0 : _.name;
31487
31487
  h(String(O || "New Group")), v(s.map(function(A) {
@@ -31598,8 +31598,8 @@ var zL = function(t) {
31598
31598
  /* @__PURE__ */ p("p", { children: "Note: To add brands to this group, save this group, then use the checkboxes to select this group as well as any additional brands to be grouped." })
31599
31599
  ] }),
31600
31600
  /* @__PURE__ */ p(Ce.Container.Footer, { className: "yst-pt-4", children: /* @__PURE__ */ M("div", { className: "yst-flex yst-justify-end yst-gap-2", children: [
31601
- /* @__PURE__ */ p(Fe, { variant: "secondary", onClick: w, disabled: C, children: "Cancel" }),
31602
- /* @__PURE__ */ p(Fe, { variant: "primary", onClick: k, disabled: !f.trim() || m.length === 0 || C, children: C ? "Saving..." : "Save group" })
31601
+ /* @__PURE__ */ p(Be, { variant: "secondary", onClick: w, disabled: C, children: "Cancel" }),
31602
+ /* @__PURE__ */ p(Be, { variant: "primary", onClick: k, disabled: !f.trim() || m.length === 0 || C, children: C ? "Saving..." : "Save group" })
31603
31603
  ] }) })
31604
31604
  ] }) }) });
31605
31605
  };
@@ -31732,7 +31732,7 @@ var ZL = function() {
31732
31732
  return de;
31733
31733
  }), at = function() {
31734
31734
  A(!0);
31735
- }, Be = function(ge) {
31735
+ }, Fe = function(ge) {
31736
31736
  y(ge.target.value), b(1);
31737
31737
  }, ut = function(ge) {
31738
31738
  k(function(de) {
@@ -31740,7 +31740,7 @@ var ZL = function() {
31740
31740
  });
31741
31741
  }, Ge = function() {
31742
31742
  n("/");
31743
- }, Xe = function() {
31743
+ }, Ye = function() {
31744
31744
  k({}), u({}), o(!1);
31745
31745
  }, J = function() {
31746
31746
  A(!1);
@@ -31816,7 +31816,7 @@ var ZL = function() {
31816
31816
  Cell: function(ge) {
31817
31817
  var de = ge.value, ze = ge.row;
31818
31818
  return /* @__PURE__ */ p(st, { children: ze.type === "group" ? /* @__PURE__ */ M(
31819
- Fe,
31819
+ Be,
31820
31820
  {
31821
31821
  variant: "tertiary",
31822
31822
  size: "small",
@@ -31863,7 +31863,7 @@ var ZL = function() {
31863
31863
  return /* @__PURE__ */ M(pi, { className: "yst-mx-auto yst-max-w-2xl", children: [
31864
31864
  /* @__PURE__ */ p(Hw, { title: "Brand list ".concat(""), children: /* @__PURE__ */ p("p", { children: "These are the brands found in responses to your example prompts. Group related brands to improve your analysis. You can rename or exclude irrelevant brands, and new brands will be added automatically if they appear in future analysis runs." }) }),
31865
31865
  /* @__PURE__ */ M(pi.Content, { children: [
31866
- /* @__PURE__ */ p("div", { className: "yst-mb-6", children: /* @__PURE__ */ p(Wc, { id: "brand-search", label: "Search brands", placeholder: "Search brands", value: h, onChange: Be }) }),
31866
+ /* @__PURE__ */ p("div", { className: "yst-mb-6", children: /* @__PURE__ */ p(Wc, { id: "brand-search", label: "Search brands", placeholder: "Search brands", value: h, onChange: Fe }) }),
31867
31867
  /* @__PURE__ */ p("div", { className: "yst-mb-6", children: /* @__PURE__ */ M(ke, { columns: Re, className: "yst-w-full", variant: "minimal", children: [
31868
31868
  /* @__PURE__ */ p(ke.Head, { children: /* @__PURE__ */ p(ke.Row, { children: Re.map(function(ue) {
31869
31869
  return /* @__PURE__ */ p(ke.Header, { children: ue.Header }, ue.accessor);
@@ -31877,7 +31877,7 @@ var ZL = function() {
31877
31877
  /* @__PURE__ */ p(ke.Row, { children: /* @__PURE__ */ p(ke.Cell, { colSpan: Re.length, children: /* @__PURE__ */ M("div", { className: "yst-py-12 yst-text-center", children: [
31878
31878
  /* @__PURE__ */ p("h3", { className: "yst-mt-4 yst-text-lg yst-font-medium yst-text-slate-900", children: "No brands found" }),
31879
31879
  /* @__PURE__ */ p("p", { className: "yst-mt-2 yst-text-sm yst-text-slate-500", children: h ? 'No brands match "'.concat(h, '". Try a different search term.') : "No brands have been found yet. Run an analysis to discover brands." }),
31880
- h && /* @__PURE__ */ p(Fe, { variant: "secondary", size: "small", onClick: function() {
31880
+ h && /* @__PURE__ */ p(Be, { variant: "secondary", size: "small", onClick: function() {
31881
31881
  y(""), b(1);
31882
31882
  }, className: "yst-mt-4", children: "Clear search" })
31883
31883
  ] }) }) })
@@ -31895,7 +31895,7 @@ var ZL = function() {
31895
31895
  ) })
31896
31896
  ] }) }),
31897
31897
  /* @__PURE__ */ M("div", { className: "yst-flex yst-items-center yst-justify-between", children: [
31898
- /* @__PURE__ */ M(Fe, { variant: "secondary", onClick: at, className: "yst-mb-0 yst-gap-2", disabled: ie.length < 2, children: [
31898
+ /* @__PURE__ */ M(Be, { variant: "secondary", onClick: at, className: "yst-mb-0 yst-gap-2", disabled: ie.length < 2, children: [
31899
31899
  /* @__PURE__ */ p(Z6, {}),
31900
31900
  " Group brands"
31901
31901
  ] }),
@@ -31903,15 +31903,15 @@ var ZL = function() {
31903
31903
  ] })
31904
31904
  ] }),
31905
31905
  /* @__PURE__ */ p(bh, { children: /* @__PURE__ */ p("div", { className: "yst-flex yst-items-center yst-justify-end yst-gap-4", children: s ? /* @__PURE__ */ M(st, { children: [
31906
- /* @__PURE__ */ p(Fe, { variant: "secondary", className: "yst-mb-0", onClick: Xe, children: "Discard changes" }),
31907
- /* @__PURE__ */ p(Fe, { variant: "primary", className: "yst-mb-0", onClick: Ge, children: "Save changes" })
31906
+ /* @__PURE__ */ p(Be, { variant: "secondary", className: "yst-mb-0", onClick: Ye, children: "Discard changes" }),
31907
+ /* @__PURE__ */ p(Be, { variant: "primary", className: "yst-mb-0", onClick: Ge, children: "Save changes" })
31908
31908
  ] }) : (
31909
31909
  // This was originally intended to be "Discard Changes" and
31910
31910
  // "Save changes" but the current implementation saves changes
31911
31911
  // immediately when brands are grouped or excluded, so this
31912
31912
  // provides a way back to the analysis and does not perform
31913
31913
  // any action
31914
- /* @__PURE__ */ p(Fe, { as: Ai, to: "/brands/".concat(j), variant: "tertiary", className: "yst-mb-0", children: "Return to analysis" })
31914
+ /* @__PURE__ */ p(Be, { as: Ai, to: "/brands/".concat(j), variant: "tertiary", className: "yst-mb-0", children: "Return to analysis" })
31915
31915
  ) }) }),
31916
31916
  /* @__PURE__ */ p(zL, { isOpen: O, onClose: J, brandId: j, brandsToGroup: Z.filter(function(ue) {
31917
31917
  return ie.includes(H(ue));
@@ -31981,7 +31981,7 @@ var sR = function(t) {
31981
31981
  }
31982
31982
  }
31983
31983
  }), d = u.mutate, f = u.isPending;
31984
- return Ye(function() {
31984
+ return Qe(function() {
31985
31985
  n && c("");
31986
31986
  }, [n]), /* @__PURE__ */ p(vu, { isOpen: n, onClose: r, onConfirm: function() {
31987
31987
  d();
@@ -32173,7 +32173,7 @@ var fR = function(t) {
32173
32173
  }
32174
32174
  }
32175
32175
  }), h = f.mutate, y = f.isPending;
32176
- return Ye(function() {
32176
+ return Qe(function() {
32177
32177
  n && d("");
32178
32178
  }, [n]), /* @__PURE__ */ p(vu, { isOpen: n, onClose: i, onConfirm: function() {
32179
32179
  if (!s) {
@@ -32506,7 +32506,7 @@ var xR = function(t) {
32506
32506
  vf(i.nextScheduledAnalysis)
32507
32507
  ] })
32508
32508
  ] }),
32509
- /* @__PURE__ */ p("div", { className: "yst-ml-auto yst-flex yst-flex-row yst-items-center yst-justify-end yst-gap-2 yst-text-slate-800", children: (i == null ? void 0 : i.id) === "loading" ? /* @__PURE__ */ p(vt, { className: "yst-h-6 yst-w-24" }) : /* @__PURE__ */ M(Fe, { size: "small", variant: "tertiary", className: "yst-gap-1 yst-text-red-600 *:hover:yst-text-red-700", onClick: function() {
32509
+ /* @__PURE__ */ p("div", { className: "yst-ml-auto yst-flex yst-flex-row yst-items-center yst-justify-end yst-gap-2 yst-text-slate-800", children: (i == null ? void 0 : i.id) === "loading" ? /* @__PURE__ */ p(vt, { className: "yst-h-6 yst-w-24" }) : /* @__PURE__ */ M(Be, { size: "small", variant: "tertiary", className: "yst-gap-1 yst-text-red-600 *:hover:yst-text-red-700", onClick: function() {
32510
32510
  i != null && i.id && o(i.id);
32511
32511
  }, disabled: (i == null ? void 0 : i.id) === "loading", children: [
32512
32512
  /* @__PURE__ */ p(mh, {}),
@@ -32526,10 +32526,10 @@ var xR = function(t) {
32526
32526
  /* @__PURE__ */ p("p", { children: "This will use one of your weekly analyses included in your subscription." })
32527
32527
  ] }),
32528
32528
  /* @__PURE__ */ M(Ce.Container.Footer, { className: "yst-mt-3 yst-flex yst-justify-end yst-gap-2", children: [
32529
- /* @__PURE__ */ p(Fe, { variant: "secondary", onClick: function() {
32529
+ /* @__PURE__ */ p(Be, { variant: "secondary", onClick: function() {
32530
32530
  return b(!1);
32531
32531
  }, children: "Cancel" }),
32532
- /* @__PURE__ */ p(Fe, { variant: "primary", onClick: function() {
32532
+ /* @__PURE__ */ p(Be, { variant: "primary", onClick: function() {
32533
32533
  O(!0);
32534
32534
  }, isLoading: _, children: "Yes, start analysis" })
32535
32535
  ] })
@@ -32548,7 +32548,7 @@ var xR = function(t) {
32548
32548
  "."
32549
32549
  ] })
32550
32550
  ] }),
32551
- /* @__PURE__ */ p(Ce.Container.Footer, { className: "yst-mt-3 yst-flex yst-justify-end yst-gap-2", children: /* @__PURE__ */ p(Fe, { variant: "primary", onClick: function() {
32551
+ /* @__PURE__ */ p(Ce.Container.Footer, { className: "yst-mt-3 yst-flex yst-justify-end yst-gap-2", children: /* @__PURE__ */ p(Be, { variant: "primary", onClick: function() {
32552
32552
  return b(!1);
32553
32553
  }, children: "Got it" }) })
32554
32554
  ] })
@@ -32558,11 +32558,11 @@ var xR = function(t) {
32558
32558
  /* @__PURE__ */ p(Ce.Container.Content, { children: /* @__PURE__ */ p("p", { className: "yst-text-center", children: "Each subscription lets you activate 1 brand. Add another subscription or deactivate an existing brand to activate this brand." }) })
32559
32559
  ] }) }),
32560
32560
  /* @__PURE__ */ p(Ce.Container.Footer, { children: /* @__PURE__ */ M("div", { className: "yst-flex yst-flex-col yst-justify-stretch yst-gap-2", children: [
32561
- d && /* @__PURE__ */ M(Fe, { variant: "upsell", className: "yst-flex yst-gap-1", onClick: d, children: [
32561
+ d && /* @__PURE__ */ M(Be, { variant: "upsell", className: "yst-flex yst-gap-1", onClick: d, children: [
32562
32562
  /* @__PURE__ */ p(Z2, {}),
32563
32563
  "Add a subscription"
32564
32564
  ] }),
32565
- /* @__PURE__ */ p(Fe, { variant: "tertiary", className: "", onClick: function() {
32565
+ /* @__PURE__ */ p(Be, { variant: "tertiary", className: "", onClick: function() {
32566
32566
  return b(!1);
32567
32567
  }, children: "Manage active brands" })
32568
32568
  ] }) })
@@ -32694,7 +32694,7 @@ var Fp = gl(Ip || (Ip = a0(["xl:yst-w-1/3"]))), Bp = gl(Lp || (Lp = a0(["xl:yst-
32694
32694
  /* @__PURE__ */ p("p", { children: "Permanently delete all brands, analysis results, and query history from your account." })
32695
32695
  ] }),
32696
32696
  /* @__PURE__ */ M(Bp, { className: "yst-space-y-4", children: [
32697
- /* @__PURE__ */ M(Fe, { variant: "error", onClick: function() {
32697
+ /* @__PURE__ */ M(Be, { variant: "error", onClick: function() {
32698
32698
  f(!0);
32699
32699
  }, disabled: (C == null ? void 0 : C.length) === 0, children: [
32700
32700
  /* @__PURE__ */ p(mh, {}),
@@ -32779,8 +32779,8 @@ var Vw = function(t) {
32779
32779
  "yst-flex yst-flex-1 yst-flex-col yst-items-start yst-justify-between yst-gap-4 md:yst-flex-row md:yst-items-center md:yst-justify-between": n
32780
32780
  }
32781
32781
  ), children: [
32782
- n && /* @__PURE__ */ p(Fe, { variant: "tertiary", onClick: n, className: "yst-no-underline", children: "← Back" }),
32783
- /* @__PURE__ */ p("div", { className: Oe("yst-flex yst-flex-col yst-items-stretch yst-gap-4 md:yst-flex-row md:yst-items-center md:yst-justify-end"), children: /* @__PURE__ */ M(Fe, { onClick: o, variant: i === "ai" ? "primary" : i, className: "yst-gap-1.5", style: i === "ai" ? {
32782
+ n && /* @__PURE__ */ p(Be, { variant: "tertiary", onClick: n, className: "yst-no-underline", children: "← Back" }),
32783
+ /* @__PURE__ */ p("div", { className: Oe("yst-flex yst-flex-col yst-items-stretch yst-gap-4 md:yst-flex-row md:yst-items-center md:yst-justify-end"), children: /* @__PURE__ */ M(Be, { onClick: o, variant: i === "ai" ? "primary" : i, className: "yst-gap-1.5", style: i === "ai" ? {
32784
32784
  background: "linear-gradient(102deg, #A61E69 0%, #6366F1 100%)",
32785
32785
  color: "#fff"
32786
32786
  } : {}, disabled: l, type: "submit", isLoading: u, children: [
@@ -33996,7 +33996,7 @@ var HR = function() {
33996
33996
  // 2s
33997
33997
  }
33998
33998
  }), P = N.data;
33999
- Ye(function() {
33999
+ Qe(function() {
34000
34000
  o && P !== null && P !== void 0 && P.find(function(q) {
34001
34001
  return q.id === o;
34002
34002
  }) && t("/setup/".concat(o, "/queries"), {
@@ -34347,16 +34347,16 @@ var Es = 5, da = "Generating...", nN = "Re-generating...", rN = 100, iN = 800, s
34347
34347
  query: {
34348
34348
  enabled: !!s
34349
34349
  }
34350
- }), Be = at.data, ut = jt(function(se) {
34350
+ }), Fe = at.data, ut = jt(function(se) {
34351
34351
  var me;
34352
- if (!(Be != null && (me = Be.data) !== null && me !== void 0 && me.name)) return !1;
34353
- var Ae = Be.data.name.toLowerCase().trim();
34352
+ if (!(Fe != null && (me = Fe.data) !== null && me !== void 0 && me.name)) return !1;
34353
+ var Ae = Fe.data.name.toLowerCase().trim();
34354
34354
  return Ae ? se.toLowerCase().includes(Ae) : !1;
34355
- }, [Be == null || (t = Be.data) === null || t === void 0 ? void 0 : t.name]), Ge = jt(function() {
34355
+ }, [Fe == null || (t = Fe.data) === null || t === void 0 ? void 0 : t.name]), Ge = jt(function() {
34356
34356
  return h.some(function(se) {
34357
34357
  return ut(se.text);
34358
34358
  });
34359
- }, [h, ut]), Xe = function() {
34359
+ }, [h, ut]), Ye = function() {
34360
34360
  q(!1);
34361
34361
  }, J = function() {
34362
34362
  q(!1), s && qe({
@@ -34418,18 +34418,18 @@ var Es = 5, da = "Generating...", nN = "Re-generating...", rN = 100, iN = 800, s
34418
34418
  }
34419
34419
  }
34420
34420
  }), qe = dt.mutate, Re = dt.isPending;
34421
- Ye(function() {
34421
+ Qe(function() {
34422
34422
  s || a("/setup", {
34423
34423
  replace: !0
34424
34424
  });
34425
- }, [s, a, c]), Ye(function() {
34425
+ }, [s, a, c]), Qe(function() {
34426
34426
  var se;
34427
- !(Be != null && (se = Be.data) !== null && se !== void 0 && se.setupStatus) || u.current || (u.current = !0, Be.data.setupStatus !== "pendingQuerySelection" && (c("Queries cannot be changed for a brand with a pending analysis.", {
34427
+ !(Fe != null && (se = Fe.data) !== null && se !== void 0 && se.setupStatus) || u.current || (u.current = !0, Fe.data.setupStatus !== "pendingQuerySelection" && (c("Queries cannot be changed for a brand with a pending analysis.", {
34428
34428
  variant: "warning"
34429
34429
  }), a(o, {
34430
34430
  replace: !0
34431
34431
  })));
34432
- }, [Be == null || (n = Be.data) === null || n === void 0 ? void 0 : n.setupStatus, s, a, o, c]), Ye(function() {
34432
+ }, [Fe == null || (n = Fe.data) === null || n === void 0 ? void 0 : n.setupStatus, s, a, o, c]), Qe(function() {
34433
34433
  var se;
34434
34434
  if (Y != null && (se = Y.data) !== null && se !== void 0 && se.queries && Array.isArray(Y.data.queries)) {
34435
34435
  var me = Y.data.queries.slice(0, Es);
@@ -34471,7 +34471,7 @@ var Es = 5, da = "Generating...", nN = "Re-generating...", rN = 100, iN = 800, s
34471
34471
  });
34472
34472
  }, iN);
34473
34473
  }, [w]);
34474
- Ye(function() {
34474
+ Qe(function() {
34475
34475
  if (B && !he) {
34476
34476
  var se;
34477
34477
  if (Y != null && (se = Y.data) !== null && se !== void 0 && se.queries && Array.isArray(Y.data.queries)) {
@@ -34551,7 +34551,7 @@ var Es = 5, da = "Generating...", nN = "Re-generating...", rN = 100, iN = 800, s
34551
34551
  }
34552
34552
  });
34553
34553
  }
34554
- }, [s, h, qe, Ge]), Qe = function() {
34554
+ }, [s, h, qe, Ge]), Xe = function() {
34555
34555
  Z(!0);
34556
34556
  };
34557
34557
  return /* @__PURE__ */ M("div", { children: [
@@ -34562,12 +34562,12 @@ var Es = 5, da = "Generating...", nN = "Re-generating...", rN = 100, iN = 800, s
34562
34562
  /* @__PURE__ */ M("div", { className: "yst-space-y-4", children: [
34563
34563
  /* @__PURE__ */ p("p", { children: "You can edit your queries or regenerate new ones with AI." }),
34564
34564
  /* @__PURE__ */ p("div", { className: Oe("yst-flex yst-gap-2", v ? "yst-justify-end" : "yst-justify-start"), children: v ? /* @__PURE__ */ M(st, { children: [
34565
- /* @__PURE__ */ p(Fe, { size: "small", variant: "secondary", onClick: un, children: "Done" }),
34566
- /* @__PURE__ */ M(Fe, { variant: "secondary", size: "small", onClick: dn, className: "yst-gap-1", isLoading: he || B, disabled: B || he || w.length === 0, children: [
34565
+ /* @__PURE__ */ p(Be, { size: "small", variant: "secondary", onClick: un, children: "Done" }),
34566
+ /* @__PURE__ */ M(Be, { variant: "secondary", size: "small", onClick: dn, className: "yst-gap-1", isLoading: he || B, disabled: B || he || w.length === 0, children: [
34567
34567
  /* @__PURE__ */ p(Gp, { "aria-hidden": "true" }),
34568
34568
  "Regenerate selected queries"
34569
34569
  ] })
34570
- ] }) : /* @__PURE__ */ M(Fe, { size: "small", variant: "secondary", onClick: un, className: "yst-gap-1.5", disabled: ze || De, children: [
34570
+ ] }) : /* @__PURE__ */ M(Be, { size: "small", variant: "secondary", onClick: un, className: "yst-gap-1.5", disabled: ze || De, children: [
34571
34571
  /* @__PURE__ */ p(q6, {}),
34572
34572
  "Select queries to regenerate"
34573
34573
  ] }) })
@@ -34607,18 +34607,15 @@ var Es = 5, da = "Generating...", nN = "Re-generating...", rN = 100, iN = 800, s
34607
34607
  m4(ye) && // error is rate limit
34608
34608
  (ye == null || (r = ye.response) === null || r === void 0 ? void 0 : r.status) === 429 && // ensure has not been acknowledged before
34609
34609
  !te
34610
- ), onClose: Qe, position: "center", as: "div", children: /* @__PURE__ */ p(Ce.Panel, { children: /* @__PURE__ */ M("div", { className: "yst-flex yst-items-start yst-justify-stretch yst-gap-4", children: [
34610
+ ), onClose: Xe, position: "center", as: "div", children: /* @__PURE__ */ p(Ce.Panel, { children: /* @__PURE__ */ M("div", { className: "yst-flex yst-items-start yst-justify-stretch yst-gap-4", children: [
34611
34611
  /* @__PURE__ */ p("div", { children: /* @__PURE__ */ p("span", { className: "yst-inline-flex yst-h-10 yst-w-10 yst-items-center yst-justify-center yst-rounded-full yst-bg-red-100", children: /* @__PURE__ */ p(yf, { className: "yst-h-6 yst-w-6 yst-text-red-600" }) }) }),
34612
34612
  /* @__PURE__ */ M("div", { className: "yst-flex-1", children: [
34613
34613
  /* @__PURE__ */ p(Ce.Container.Header, { className: "yst-mb-3 yst-w-full", children: /* @__PURE__ */ p(Ce.Title, { as: "h3", className: "yst-text-lg yst-font-medium", children: "Query regeneration limit reached" }) }),
34614
34614
  /* @__PURE__ */ p(Ce.Container.Content, { className: "yst-mb-6 yst-space-y-3", children: /* @__PURE__ */ p("p", { className: "yst-text-sm yst-text-slate-600", children: "You’ve used all your query regenerations for this brand analysis, but you can still edit your queries manually." }) }),
34615
- /* @__PURE__ */ M(Ce.Container.Footer, { className: "yst-flex yst-justify-end yst-gap-3", children: [
34616
- /* @__PURE__ */ p(Fe, { variant: "secondary", onClick: Qe, children: "Cancel" }),
34617
- /* @__PURE__ */ p(Fe, { variant: "primary", onClick: Qe, children: "Edit queries manually" })
34618
- ] })
34615
+ /* @__PURE__ */ p(Ce.Container.Footer, { className: "yst-flex yst-justify-end yst-gap-3", children: /* @__PURE__ */ p(Be, { variant: "primary", onClick: Xe, children: "Edit queries manually" }) })
34619
34616
  ] })
34620
34617
  ] }) }) }),
34621
- /* @__PURE__ */ p(Ce, { isOpen: H, onClose: Xe, position: "center", as: "div", children: /* @__PURE__ */ p(Ce.Panel, { children: /* @__PURE__ */ M("div", { className: "yst-flex yst-items-start yst-justify-stretch yst-gap-4", children: [
34618
+ /* @__PURE__ */ p(Ce, { isOpen: H, onClose: Ye, position: "center", as: "div", children: /* @__PURE__ */ p(Ce.Panel, { children: /* @__PURE__ */ M("div", { className: "yst-flex yst-items-start yst-justify-stretch yst-gap-4", children: [
34622
34619
  /* @__PURE__ */ p("div", { children: /* @__PURE__ */ p("span", { className: "yst-inline-flex yst-h-10 yst-w-10 yst-items-center yst-justify-center yst-rounded-full yst-bg-amber-100", children: /* @__PURE__ */ p(yf, { className: "yst-h-6 yst-w-6 yst-text-amber-600" }) }) }),
34623
34620
  /* @__PURE__ */ M("div", { className: "yst-flex-1", children: [
34624
34621
  /* @__PURE__ */ p(Ce.Container.Header, { className: "yst-mb-3 yst-w-full", children: /* @__PURE__ */ p(Ce.Title, { as: "h3", className: "yst-text-lg yst-font-medium", children: "Brand name detected in your queries" }) }),
@@ -34627,11 +34624,11 @@ var Es = 5, da = "Generating...", nN = "Re-generating...", rN = 100, iN = 800, s
34627
34624
  /* @__PURE__ */ p("p", { className: "yst-text-sm yst-text-slate-600", children: "For more balanced results, remove your brand name or make the queries more general." })
34628
34625
  ] }),
34629
34626
  /* @__PURE__ */ M(Ce.Container.Footer, { className: "yst-flex yst-justify-end yst-gap-3", children: [
34630
- /* @__PURE__ */ M(Fe, { onClick: J, variant: "secondary", className: "yst-gap-1.5", disabled: Re, isLoading: Re, children: [
34627
+ /* @__PURE__ */ M(Be, { onClick: J, variant: "secondary", className: "yst-gap-1.5", disabled: Re, isLoading: Re, children: [
34631
34628
  /* @__PURE__ */ p(Gp, {}),
34632
34629
  "Run analysis anyway"
34633
34630
  ] }),
34634
- /* @__PURE__ */ p(Fe, { variant: "primary", onClick: Le, children: "Review and edit queries" })
34631
+ /* @__PURE__ */ p(Be, { variant: "primary", onClick: Le, children: "Review and edit queries" })
34635
34632
  ] })
34636
34633
  ] })
34637
34634
  ] }) }) })
@@ -34741,13 +34738,13 @@ var fN = function(t) {
34741
34738
  }
34742
34739
  }
34743
34740
  ), h = f.data, y = h == null ? void 0 : h.id, g = y ? "/brands/".concat(c, "/analysis/").concat(y) : "/brands/".concat(c);
34744
- Ye(function() {
34741
+ Qe(function() {
34745
34742
  var S = (h == null ? void 0 : h.status) === "pending" || (h == null ? void 0 : h.status) === "processing" || (h == null ? void 0 : h.status) === "completed";
34746
34743
  d != null && d.nextScheduledAnalysis && h !== null && h !== void 0 && h.status && _9(d.nextScheduledAnalysis, 5) && !S && i("/brands/".concat(c), {
34747
34744
  // replace history to avoid going "back" to the analysis page
34748
34745
  replace: !0
34749
34746
  });
34750
- }, [d == null ? void 0 : d.nextScheduledAnalysis, c, i, h == null ? void 0 : h.status]), Ye(function() {
34747
+ }, [d == null ? void 0 : d.nextScheduledAnalysis, c, i, h == null ? void 0 : h.status]), Qe(function() {
34751
34748
  ((d == null ? void 0 : d.setupStatus) === "completed" || (d == null ? void 0 : d.setupStatus) === "scheduledFirstAnalysis" && d !== null && d !== void 0 && d.firstNextAnalysisOpportunity && !gb(d.firstNextAnalysisOpportunity, 2)) && i(g, {
34752
34749
  replace: !0
34753
34750
  });
@@ -34777,7 +34774,7 @@ var fN = function(t) {
34777
34774
  ] }, "result-item-".concat(k));
34778
34775
  }) })
34779
34776
  ] }),
34780
- /* @__PURE__ */ p("div", { className: "yst-mb-[-2rem] yst-ml-[-2rem] yst-mr-[-2rem] yst-mt-8 yst-flex yst-justify-end yst-gap-4 yst-rounded-bl-lg yst-rounded-br-lg yst-border-t yst-border-slate-200 yst-bg-slate-50 yst-px-8 yst-py-6", children: /* @__PURE__ */ p(Fe, { as: Ai, to: g, onClick: function(S) {
34777
+ /* @__PURE__ */ p("div", { className: "yst-mb-[-2rem] yst-ml-[-2rem] yst-mr-[-2rem] yst-mt-8 yst-flex yst-justify-end yst-gap-4 yst-rounded-bl-lg yst-rounded-br-lg yst-border-t yst-border-slate-200 yst-bg-slate-50 yst-px-8 yst-py-6", children: /* @__PURE__ */ p(Be, { as: Ai, to: g, onClick: function(S) {
34781
34778
  if (b !== 100) {
34782
34779
  S.preventDefault();
34783
34780
  return;