@flowengage/react-chatbot 1.5.7 → 1.5.9

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.
@@ -25787,59 +25787,59 @@ var gE = class extends VT {
25787
25787
  timers: [],
25788
25788
  textDraining: !1,
25789
25789
  lastHighlightId: null
25790
- };
25791
- function yE(e) {
25792
- let t = Math.max(0, e.wordOffset * _E - (Date.now() - Z.speechStartTime));
25793
- Z.timers.push(setTimeout(e.execute, t));
25790
+ }, yE = 3e3;
25791
+ function bE(e) {
25792
+ let t = e.wordOffset * _E - (Date.now() - Z.speechStartTime);
25793
+ t < -yE || Z.timers.push(setTimeout(e.execute, Math.max(0, t)));
25794
25794
  }
25795
- function bE() {
25795
+ function xE() {
25796
25796
  if (!Z.items.length) {
25797
25797
  Z.textDraining = !1;
25798
25798
  return;
25799
25799
  }
25800
25800
  Z.textDraining = !0;
25801
25801
  let e = Z.items.shift();
25802
- setTimeout(e.execute, 300), Z.timers.push(setTimeout(bE, e.holdMs));
25802
+ setTimeout(e.execute, 300), Z.timers.push(setTimeout(xE, e.holdMs));
25803
25803
  }
25804
- function xE(e) {
25805
- Z.isVoice ? Z.speechStartTime > 0 ? yE(e) : (Z.items.push(e), Z.timers.push(setTimeout(() => {
25804
+ function SE(e) {
25805
+ Z.isVoice ? Z.speechStartTime > 0 ? bE(e) : (Z.items.push(e), Z.timers.push(setTimeout(() => {
25806
25806
  let t = Z.items.indexOf(e);
25807
25807
  t !== -1 && (Z.items.splice(t, 1), e.execute());
25808
- }, vE))) : (Z.items.push(e), Z.textDraining || bE());
25808
+ }, vE))) : (Z.items.push(e), Z.textDraining || xE());
25809
25809
  }
25810
- function SE(e, t = 5e3) {
25811
- xE({
25810
+ function CE(e, t = 5e3) {
25811
+ SE({
25812
25812
  execute: e,
25813
25813
  wordOffset: Z.wordsSoFar,
25814
25814
  holdMs: t
25815
25815
  });
25816
25816
  }
25817
- function CE(e, t, n = 5e3) {
25818
- xE({
25817
+ function wE(e, t, n = 5e3) {
25818
+ SE({
25819
25819
  execute: e,
25820
25820
  wordOffset: t,
25821
25821
  holdMs: n
25822
25822
  });
25823
25823
  }
25824
- function wE() {
25825
- Z.speechStartTime = Date.now(), Z.items.forEach(yE), Z.items = [];
25826
- }
25827
25824
  function TE() {
25825
+ Z.speechStartTime = Date.now(), Z.items.forEach(bE), Z.items = [];
25826
+ }
25827
+ function EE() {
25828
25828
  Z.items.forEach((e) => e.execute()), Z.items = [];
25829
25829
  }
25830
- function EE(e) {
25830
+ function DE(e) {
25831
25831
  Z.wordsSoFar += e;
25832
25832
  }
25833
- function DE() {
25833
+ function OE() {
25834
25834
  return Z.wordsSoFar;
25835
25835
  }
25836
- function OE(e) {
25836
+ function kE(e) {
25837
25837
  Z.isVoice = e;
25838
25838
  }
25839
- function kE(e) {
25839
+ function AE(e) {
25840
25840
  Z.lastHighlightId = e;
25841
25841
  }
25842
- function AE() {
25842
+ function jE() {
25843
25843
  Z.timers.forEach(clearTimeout), Object.assign(Z, {
25844
25844
  wordsSoFar: 0,
25845
25845
  speechStartTime: 0,
@@ -25851,8 +25851,8 @@ function AE() {
25851
25851
  }
25852
25852
  //#endregion
25853
25853
  //#region src/utils/highlightEngine.js
25854
- var jE = null;
25855
- function ME(e) {
25854
+ var ME = null;
25855
+ function NE(e) {
25856
25856
  try {
25857
25857
  e.scrollIntoView({
25858
25858
  behavior: "smooth",
@@ -25860,34 +25860,34 @@ function ME(e) {
25860
25860
  });
25861
25861
  } catch {}
25862
25862
  }
25863
- function NE(e) {
25864
- PE(), jE = Object.assign(document.createElement("div"), { id: "fe-spotlight-overlay" }), jE.style.cssText = "position:fixed;inset:0;background:rgba(0,0,0,0.35);z-index:9998;pointer-events:none;transition:opacity 0.4s ease;opacity:0;", document.body.appendChild(jE), jE.offsetHeight, jE.style.opacity = "1", e.style.position = "relative", e.style.zIndex = "9999";
25863
+ function PE(e) {
25864
+ FE(), ME = Object.assign(document.createElement("div"), { id: "fe-spotlight-overlay" }), ME.style.cssText = "position:fixed;inset:0;background:rgba(0,0,0,0.35);z-index:9998;pointer-events:none;transition:opacity 0.4s ease;opacity:0;", document.body.appendChild(ME), ME.offsetHeight, ME.style.opacity = "1", e.style.position = "relative", e.style.zIndex = "9999";
25865
25865
  }
25866
- function PE() {
25867
- if (jE) {
25868
- jE.style.opacity = "0";
25869
- let e = jE;
25870
- setTimeout(() => e.parentNode?.removeChild(e), 400), jE = null;
25866
+ function FE() {
25867
+ if (ME) {
25868
+ ME.style.opacity = "0";
25869
+ let e = ME;
25870
+ setTimeout(() => e.parentNode?.removeChild(e), 400), ME = null;
25871
25871
  }
25872
25872
  document.querySelectorAll("[data-fe-highlighted]").forEach((e) => {
25873
25873
  e.style.zIndex = "", e.style.position = "";
25874
25874
  });
25875
25875
  }
25876
- function FE(e) {
25877
- !e || e.hasAttribute("data-fe-highlighted") || (IE(), ME(e), e.setAttribute("data-fe-orig-style", e.style.cssText), e.setAttribute("data-fe-highlighted", "true"), Object.assign(e.style, {
25876
+ function IE(e) {
25877
+ !e || e.hasAttribute("data-fe-highlighted") || (LE(), NE(e), e.setAttribute("data-fe-orig-style", e.style.cssText), e.setAttribute("data-fe-highlighted", "true"), Object.assign(e.style, {
25878
25878
  outline: "3px solid #2563eb",
25879
25879
  outlineOffset: "8px",
25880
25880
  background: "rgba(37,99,235,0.08)",
25881
25881
  borderRadius: "8px",
25882
25882
  padding: "12px 16px",
25883
25883
  transition: "all 0.4s ease"
25884
- }), NE(e), setTimeout(IE, 6e4));
25884
+ }), PE(e), setTimeout(LE, 6e4));
25885
25885
  }
25886
- function IE() {
25886
+ function LE() {
25887
25887
  let e = document.querySelector("[data-fe-highlighted]");
25888
- e && (e.style.cssText = e.getAttribute("data-fe-orig-style") || "", e.removeAttribute("data-fe-highlighted"), e.removeAttribute("data-fe-orig-style")), PE();
25888
+ e && (e.style.cssText = e.getAttribute("data-fe-orig-style") || "", e.removeAttribute("data-fe-highlighted"), e.removeAttribute("data-fe-orig-style")), FE();
25889
25889
  }
25890
- function LE() {
25890
+ function RE() {
25891
25891
  return Array.from(document.querySelectorAll("h2, h3")).map((e) => {
25892
25892
  let t = e.textContent.trim().replace(/[\u2013\u2014:]/g, " ").replace(/\([^)]*\)/g, "").replace(/\s+/g, " ").trim().toLowerCase(), n = t.split(" ").filter((e) => e.length > 2), r = [t];
25893
25893
  for (let e = 0; e <= n.length - 2; e++) r.push(n.slice(e, e + 2).join(" ")), e <= n.length - 3 && r.push(n.slice(e, e + 3).join(" "));
@@ -25898,10 +25898,10 @@ function LE() {
25898
25898
  };
25899
25899
  });
25900
25900
  }
25901
- function RE(e, t = !1) {
25902
- let n = LE();
25901
+ function zE(e, t = !1) {
25902
+ let n = RE();
25903
25903
  if (!n.length) return;
25904
- let r = e.toLowerCase(), i = DE(), a = t ? 400 : 240, o = e.trim().split(/\s+/).length, s = n.map((t) => {
25904
+ let r = e.toLowerCase(), i = OE(), a = t ? 400 : 240, o = e.trim().split(/\s+/).length, s = n.map((t) => {
25905
25905
  let n = t.keywords.filter((e) => e.length >= 10).reduce((e, t) => {
25906
25906
  let n = r.indexOf(t);
25907
25907
  return n !== -1 && n < e ? n : e;
@@ -25917,14 +25917,14 @@ function RE(e, t = !1) {
25917
25917
  if (c.has(e.id)) return;
25918
25918
  c.add(e.id);
25919
25919
  let r = s[n + 1]?.wordOffset ?? o, l = Math.max(3e3, Math.min((r - t) * a, 2e4)), { element: u, id: d } = e;
25920
- CE(() => {
25921
- kE(d), FE(u);
25920
+ wE(() => {
25921
+ AE(d), IE(u);
25922
25922
  }, i + t, l);
25923
25923
  });
25924
25924
  }
25925
25925
  //#endregion
25926
25926
  //#region src/lib/svgIcons.jsx
25927
- var zE = ({ size: e = 20 }) => /* @__PURE__ */ _("svg", {
25927
+ var BE = ({ size: e = 20 }) => /* @__PURE__ */ _("svg", {
25928
25928
  width: e,
25929
25929
  height: e,
25930
25930
  viewBox: "0 0 24 24",
@@ -25939,7 +25939,7 @@ var zE = ({ size: e = 20 }) => /* @__PURE__ */ _("svg", {
25939
25939
  x2: "1",
25940
25940
  y2: "23"
25941
25941
  })]
25942
- }), BE = () => /* @__PURE__ */ _("svg", {
25942
+ }), VE = () => /* @__PURE__ */ _("svg", {
25943
25943
  width: "18",
25944
25944
  height: "18",
25945
25945
  viewBox: "0 0 24 24",
@@ -25954,7 +25954,7 @@ var zE = ({ size: e = 20 }) => /* @__PURE__ */ _("svg", {
25954
25954
  x2: "12",
25955
25955
  y2: "5"
25956
25956
  }), /* @__PURE__ */ g("polyline", { points: "5 12 12 5 19 12" })]
25957
- }), VE = () => /* @__PURE__ */ _("svg", {
25957
+ }), HE = () => /* @__PURE__ */ _("svg", {
25958
25958
  width: "14",
25959
25959
  height: "14",
25960
25960
  viewBox: "0 0 24 24",
@@ -25964,7 +25964,7 @@ var zE = ({ size: e = 20 }) => /* @__PURE__ */ _("svg", {
25964
25964
  strokeLinecap: "round",
25965
25965
  strokeLinejoin: "round",
25966
25966
  children: [/* @__PURE__ */ g("polyline", { points: "9 17 4 12 9 7" }), /* @__PURE__ */ g("path", { d: "M20 18v-2a4 4 0 00-4-4H4" })]
25967
- }), HE = () => /* @__PURE__ */ g("svg", {
25967
+ }), UE = () => /* @__PURE__ */ g("svg", {
25968
25968
  width: "18",
25969
25969
  height: "18",
25970
25970
  viewBox: "0 0 24 24",
@@ -25974,7 +25974,7 @@ var zE = ({ size: e = 20 }) => /* @__PURE__ */ _("svg", {
25974
25974
  strokeLinecap: "round",
25975
25975
  strokeLinejoin: "round",
25976
25976
  children: /* @__PURE__ */ g("path", { d: "M22 16.92v3a2 2 0 01-2.18 2 19.79 19.79 0 01-8.63-3.07 19.42 19.42 0 01-6.12-6.11A19.79 19.79 0 012 4.11 2 2 0 014.11 2h3a2 2 0 012 1.72c.13.96.37 1.91.71 2.81a2 2 0 01-.45 2.11L8.09 9.91a16 16 0 006 6l1.27-1.27a2 2 0 012.11-.45c.9.34 1.85.58 2.81.71A2 2 0 0122 16.92z" })
25977
- }), UE = ({ className: e = "" }) => /* @__PURE__ */ _("svg", {
25977
+ }), WE = ({ className: e = "" }) => /* @__PURE__ */ _("svg", {
25978
25978
  className: e,
25979
25979
  width: "14",
25980
25980
  height: "14",
@@ -26003,7 +26003,7 @@ var zE = ({ size: e = 20 }) => /* @__PURE__ */ _("svg", {
26003
26003
  y2: "16"
26004
26004
  })
26005
26005
  ]
26006
- }), WE = ({ size: e = 14 }) => /* @__PURE__ */ _("svg", {
26006
+ }), GE = ({ size: e = 14 }) => /* @__PURE__ */ _("svg", {
26007
26007
  width: e,
26008
26008
  height: e,
26009
26009
  viewBox: "0 0 24 24",
@@ -26026,7 +26026,7 @@ var zE = ({ size: e = 20 }) => /* @__PURE__ */ _("svg", {
26026
26026
  /* @__PURE__ */ g("path", { d: "M15 13v2" }),
26027
26027
  /* @__PURE__ */ g("path", { d: "M9 13v2" })
26028
26028
  ]
26029
- }), GE = ({ size: e = 20, strokeWidth: t = 2, color: n = "currentColor" }) => /* @__PURE__ */ _("svg", {
26029
+ }), KE = ({ size: e = 20, strokeWidth: t = 2, color: n = "currentColor" }) => /* @__PURE__ */ _("svg", {
26030
26030
  width: e,
26031
26031
  height: e,
26032
26032
  viewBox: "0 0 24 24",
@@ -26046,8 +26046,8 @@ var zE = ({ size: e = 20 }) => /* @__PURE__ */ _("svg", {
26046
26046
  x2: "19",
26047
26047
  y2: "12"
26048
26048
  })]
26049
- }), KE = (e = "") => String(e).replace(/<[^>]+>/g, "").replace(/\s+/g, " ").trim(), qE = (e = "") => String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
26050
- function JE(e) {
26049
+ }), qE = (e = "") => String(e).replace(/<[^>]+>/g, "").replace(/\s+/g, " ").trim(), JE = (e = "") => String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
26050
+ function YE(e) {
26051
26051
  let t = String(e || "").trim();
26052
26052
  if (!t) return t;
26053
26053
  let n = /^<p>\s*<strong>([\s\S]*?)<\/strong>\s*<\/p>$/i.exec(t);
@@ -26059,33 +26059,33 @@ function JE(e) {
26059
26059
  }
26060
26060
  return e;
26061
26061
  }
26062
- var YE = (e = "") => {
26062
+ var XE = (e = "") => {
26063
26063
  let t = String(e || "").trim();
26064
26064
  if (!t) return "";
26065
- if (/<(p|br|ul|ol|li|strong|em|a)\b/i.test(t)) return JE(t);
26066
- let n = t.replace(/\r\n/g, "\n").replace(/\n{3,}/g, "\n\n").split(/\n\s*\n/).map((e) => e.trim()).filter(Boolean), r = (e) => qE(e).replace(/\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)/g, "<a href=\"$2\" target=\"_blank\" rel=\"noopener noreferrer\">$1</a>").replace(/\*\*([^*]+)\*\*/g, "<strong>$1</strong>").replace(/\*([^*\n]+)\*/g, "<em>$1</em>");
26067
- return JE(n.map((e) => {
26065
+ if (/<(p|br|ul|ol|li|strong|em|a)\b/i.test(t)) return YE(t);
26066
+ let n = t.replace(/\r\n/g, "\n").replace(/\n{3,}/g, "\n\n").split(/\n\s*\n/).map((e) => e.trim()).filter(Boolean), r = (e) => JE(e).replace(/\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)/g, "<a href=\"$2\" target=\"_blank\" rel=\"noopener noreferrer\">$1</a>").replace(/\*\*([^*]+)\*\*/g, "<strong>$1</strong>").replace(/\*([^*\n]+)\*/g, "<em>$1</em>");
26067
+ return YE(n.map((e) => {
26068
26068
  let t = e.split("\n").map((e) => e.trim()).filter(Boolean), n = t.filter((e) => /^[-*]\s+/.test(e));
26069
26069
  if (n.length >= 2 && n.length === t.length) return `<ul>${n.map((e) => `<li>${r(e.replace(/^[-*]\s+/, ""))}</li>`).join("")}</ul>`;
26070
26070
  let i = e.split(/\s+(?=[-*]\s+\*\*?)/).map((e) => e.trim()).filter(Boolean);
26071
26071
  return i.length >= 2 && i.every((e) => /^[-*]\s+/.test(e)) ? `<ul>${i.map((e) => `<li>${r(e.replace(/^[-*]\s+/, ""))}</li>`).join("")}</ul>` : `<p>${r(e).replace(/\n/g, "<br />")}</p>`;
26072
26072
  }).join(""));
26073
- }, XE = new Set(["application/pdf", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"]), ZE = new Set([
26073
+ }, ZE = new Set(["application/pdf", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"]), QE = new Set([
26074
26074
  ".pdf",
26075
26075
  ".docx",
26076
26076
  ".png",
26077
26077
  ".jpg",
26078
26078
  ".jpeg"
26079
- ]), QE = "image/png,image/jpeg,.pdf,.docx";
26080
- function $E(e) {
26079
+ ]), $E = "image/png,image/jpeg,.pdf,.docx";
26080
+ function eD(e) {
26081
26081
  if (!e) return !1;
26082
26082
  let t = typeof e.name == "string" ? e.name.toLowerCase() : "", n = t.includes(".") ? `.${t.split(".").pop()}` : "", r = typeof e.type == "string" ? e.type.toLowerCase() : "";
26083
- return r === "image/png" || r === "image/jpeg" || XE.has(r) || ZE.has(n);
26083
+ return r === "image/png" || r === "image/jpeg" || ZE.has(r) || QE.has(n);
26084
26084
  }
26085
- function eD(e) {
26086
- return e ? $E(e) ? e.size > 2097152 ? "File must be 2 MB or smaller." : "" : "Only PNG, JPEG, PDF, and DOCX files are allowed." : "No file selected.";
26085
+ function tD(e) {
26086
+ return e ? eD(e) ? e.size > 2097152 ? "File must be 2 MB or smaller." : "" : "Only PNG, JPEG, PDF, and DOCX files are allowed." : "No file selected.";
26087
26087
  }
26088
- function tD(e = 0) {
26088
+ function nD(e = 0) {
26089
26089
  if (!Number.isFinite(e) || e <= 0) return "";
26090
26090
  let t = [
26091
26091
  "B",
@@ -26097,12 +26097,12 @@ function tD(e = 0) {
26097
26097
  let i = n >= 10 || r === 0 ? 0 : 1;
26098
26098
  return `${n.toFixed(i)} ${t[r]}`;
26099
26099
  }
26100
- function nD(e) {
26100
+ function rD(e) {
26101
26101
  return e ? e.name || "Attachment" : "";
26102
26102
  }
26103
26103
  //#endregion
26104
26104
  //#region src/utils/avatarHelpers.js
26105
- function rD(e) {
26105
+ function iD(e) {
26106
26106
  if (!e || typeof e != "string") return "?";
26107
26107
  let t = e.trim();
26108
26108
  if (!t) return "?";
@@ -26111,7 +26111,7 @@ function rD(e) {
26111
26111
  }
26112
26112
  //#endregion
26113
26113
  //#region src/components/AvatarImageOrInitials.jsx
26114
- function iD({ src: e, name: t, imgStyle: n, initialsSpanStyle: r }) {
26114
+ function aD({ src: e, name: t, imgStyle: n, initialsSpanStyle: r }) {
26115
26115
  let [i, a] = m(!1), o = typeof e == "string" ? e.trim() : "";
26116
26116
  return c(() => {
26117
26117
  a(!1);
@@ -26122,12 +26122,12 @@ function iD({ src: e, name: t, imgStyle: n, initialsSpanStyle: r }) {
26122
26122
  style: n
26123
26123
  }) : /* @__PURE__ */ g("span", {
26124
26124
  style: r,
26125
- children: rD(t)
26125
+ children: iD(t)
26126
26126
  });
26127
26127
  }
26128
26128
  //#endregion
26129
26129
  //#region src/components/MessageList.jsx
26130
- function aD({ chatHistory: e, isAiTyping: t, isAgentTyping: n, setReplyContext: r, TypingDots: i, primaryColor: a = "#3B82F6", agentHeadshot: o = null, agentDisplayName: s = "Agent", botAvatarNode: l = null }) {
26130
+ function oD({ chatHistory: e, isAiTyping: t, isAgentTyping: n, setReplyContext: r, TypingDots: i, primaryColor: a = "#3B82F6", agentHeadshot: o = null, agentDisplayName: s = "Agent", botAvatarNode: l = null }) {
26131
26131
  let u = p(null), d = (e) => {
26132
26132
  if (!e) return "just now";
26133
26133
  let t = /* @__PURE__ */ new Date(), n = new Date(e), r = Math.max(0, Math.floor((t - n) / 1e3));
@@ -26156,7 +26156,7 @@ function aD({ chatHistory: e, isAiTyping: t, isAgentTyping: n, setReplyContext:
26156
26156
  },
26157
26157
  children: [
26158
26158
  e.map((e) => {
26159
- let t = e.sender === "system", n = e.sender === "user", i = e.sender === "ai" || e.sender === "bot", c = e.sender === "agent", u = e.isPending, f = e.type === "file" && e.metadata?.fileUrl, p = e.agent_name || e.agentName || e.metadata?.agentName || s, m = typeof e.sender_headshot == "string" && e.sender_headshot.trim() || typeof o == "string" && o.trim() || null, h = KE(e.replyToContent || e.replyContext?.message || ""), v = e.replyToSender === "user" ? "You" : e.replyToSender === "agent" ? "Agent" : e.replyToSender === "ai" || e.replyToSender === "bot" ? "AI Assistant" : "Message";
26159
+ let t = e.sender === "system", n = e.sender === "user", i = e.sender === "ai" || e.sender === "bot", c = e.sender === "agent", u = e.isPending, f = e.type === "file" && e.metadata?.fileUrl, p = e.agent_name || e.agentName || e.metadata?.agentName || s, m = typeof e.sender_headshot == "string" && e.sender_headshot.trim() || typeof o == "string" && o.trim() || null, h = qE(e.replyToContent || e.replyContext?.message || ""), v = e.replyToSender === "user" ? "You" : e.replyToSender === "agent" ? "Agent" : e.replyToSender === "ai" || e.replyToSender === "bot" ? "AI Assistant" : "Message";
26160
26160
  return t ? /* @__PURE__ */ g("div", {
26161
26161
  style: {
26162
26162
  display: "flex",
@@ -26201,7 +26201,7 @@ function aD({ chatHistory: e, isAiTyping: t, isAgentTyping: n, setReplyContext:
26201
26201
  fontWeight: 800,
26202
26202
  marginTop: !u && (i || c) ? "22px" : "0px"
26203
26203
  },
26204
- children: i ? l || /* @__PURE__ */ g(WE, { size: 16 }) : /* @__PURE__ */ g(iD, {
26204
+ children: i ? l || /* @__PURE__ */ g(GE, { size: 16 }) : /* @__PURE__ */ g(aD, {
26205
26205
  src: m || "",
26206
26206
  name: p,
26207
26207
  imgStyle: {
@@ -26243,7 +26243,7 @@ function aD({ chatHistory: e, isAiTyping: t, isAgentTyping: n, setReplyContext:
26243
26243
  onMouseLeave: (e) => {
26244
26244
  e.currentTarget.style.color = "#9ca3af";
26245
26245
  },
26246
- children: [/* @__PURE__ */ g(VE, {}), "Reply"]
26246
+ children: [/* @__PURE__ */ g(HE, {}), "Reply"]
26247
26247
  }),
26248
26248
  /* @__PURE__ */ _("div", {
26249
26249
  style: {
@@ -26287,7 +26287,7 @@ function aD({ chatHistory: e, isAiTyping: t, isAgentTyping: n, setReplyContext:
26287
26287
  })]
26288
26288
  }),
26289
26289
  f ? (() => {
26290
- let t = e.metadata.fileType || "", r = e.metadata.fileName || e.message || "File", i = tD(e.metadata.fileSize), a = t.startsWith("image/"), o = t === "application/pdf" ? {
26290
+ let t = e.metadata.fileType || "", r = e.metadata.fileName || e.message || "File", i = nD(e.metadata.fileSize), a = t.startsWith("image/"), o = t === "application/pdf" ? {
26291
26291
  color: "#ef4444",
26292
26292
  label: "PDF"
26293
26293
  } : t.includes("word") || t.includes("docx") ? {
@@ -26445,7 +26445,7 @@ function aD({ chatHistory: e, isAiTyping: t, isAgentTyping: n, setReplyContext:
26445
26445
  });
26446
26446
  })() : i ? /* @__PURE__ */ g("div", {
26447
26447
  className: "flowengage-message-content fe-bot-message",
26448
- dangerouslySetInnerHTML: { __html: YE(e.message) }
26448
+ dangerouslySetInnerHTML: { __html: XE(e.message) }
26449
26449
  }) : /* @__PURE__ */ g("div", {
26450
26450
  style: { whiteSpace: n || c ? "normal" : "pre-wrap" },
26451
26451
  children: e.message
@@ -26510,7 +26510,7 @@ function aD({ chatHistory: e, isAiTyping: t, isAgentTyping: n, setReplyContext:
26510
26510
  boxShadow: l ? "none" : "0 8px 20px rgba(59,130,246,0.24)",
26511
26511
  overflow: "hidden"
26512
26512
  },
26513
- children: l || /* @__PURE__ */ g(WE, { size: 16 })
26513
+ children: l || /* @__PURE__ */ g(GE, { size: 16 })
26514
26514
  }), /* @__PURE__ */ _("div", {
26515
26515
  style: {
26516
26516
  display: "flex",
@@ -26552,7 +26552,7 @@ function aD({ chatHistory: e, isAiTyping: t, isAgentTyping: n, setReplyContext:
26552
26552
  borderRadius: "50%",
26553
26553
  overflow: "hidden"
26554
26554
  },
26555
- children: /* @__PURE__ */ g(iD, {
26555
+ children: /* @__PURE__ */ g(aD, {
26556
26556
  src: o || "",
26557
26557
  name: s,
26558
26558
  imgStyle: {
@@ -26592,7 +26592,7 @@ function aD({ chatHistory: e, isAiTyping: t, isAgentTyping: n, setReplyContext:
26592
26592
  }
26593
26593
  //#endregion
26594
26594
  //#region src/components/ChatInput.jsx
26595
- function oD({ input: e, setInput: t, onSubmit: n, isConversationEnded: r, callUiActive: i, handleToggleVoice: a, activeScreen: o, inputDisabled: s, replyContext: c, clearReplyContext: l, requiresEmail: u, emailInput: d, setEmailInput: f, emailError: m, showVoiceToggle: v = !1, voiceEnabled: y = !0, onFileSelect: b, selectedFile: x = null, onRemoveSelectedFile: S, attachmentError: C = "", isUploadingAttachment: w = !1, inputPlaceholder: T = "Type your message" }) {
26595
+ function sD({ input: e, setInput: t, onSubmit: n, isConversationEnded: r, callUiActive: i, handleToggleVoice: a, activeScreen: o, inputDisabled: s, replyContext: c, clearReplyContext: l, requiresEmail: u, emailInput: d, setEmailInput: f, emailError: m, showVoiceToggle: v = !1, voiceEnabled: y = !0, onFileSelect: b, selectedFile: x = null, onRemoveSelectedFile: S, attachmentError: C = "", isUploadingAttachment: w = !1, inputPlaceholder: T = "Type your message" }) {
26596
26596
  let ee = p(null), te = c?.sender === "user" ? "You" : c?.sender === "agent" ? "Agent" : "AI Assistant", ne = u ? !!d?.trim() : !!e?.trim() || !!x, re = s || w || !ne, E = !u && y && v;
26597
26597
  return /* @__PURE__ */ _("div", {
26598
26598
  style: {
@@ -26700,7 +26700,7 @@ function oD({ input: e, setInput: t, onSubmit: n, isConversationEnded: r, callUi
26700
26700
  background: "rgba(59,130,246,0.08)",
26701
26701
  color: "var(--flowengage-primary)"
26702
26702
  },
26703
- children: /* @__PURE__ */ g(WE, { size: 13 })
26703
+ children: /* @__PURE__ */ g(GE, { size: 13 })
26704
26704
  }), /* @__PURE__ */ g("span", { children: "Please provide your email address so we can help you." })]
26705
26705
  })
26706
26706
  }),
@@ -26740,7 +26740,7 @@ function oD({ input: e, setInput: t, onSubmit: n, isConversationEnded: r, callUi
26740
26740
  overflow: "hidden",
26741
26741
  textOverflow: "ellipsis"
26742
26742
  },
26743
- children: nD(x)
26743
+ children: rD(x)
26744
26744
  }),
26745
26745
  /* @__PURE__ */ g("div", {
26746
26746
  style: {
@@ -26748,7 +26748,7 @@ function oD({ input: e, setInput: t, onSubmit: n, isConversationEnded: r, callUi
26748
26748
  color: "#6b7280",
26749
26749
  marginTop: "2px"
26750
26750
  },
26751
- children: tD(x.size)
26751
+ children: nD(x.size)
26752
26752
  })
26753
26753
  ]
26754
26754
  }), /* @__PURE__ */ g("button", {
@@ -26792,7 +26792,7 @@ function oD({ input: e, setInput: t, onSubmit: n, isConversationEnded: r, callUi
26792
26792
  E ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g("input", {
26793
26793
  ref: ee,
26794
26794
  type: "file",
26795
- accept: QE,
26795
+ accept: $E,
26796
26796
  style: { display: "none" },
26797
26797
  onChange: (e) => {
26798
26798
  let t = e.target.files?.[0];
@@ -26824,7 +26824,7 @@ function oD({ input: e, setInput: t, onSubmit: n, isConversationEnded: r, callUi
26824
26824
  onMouseLeave: (e) => {
26825
26825
  e.currentTarget.style.opacity = "1";
26826
26826
  },
26827
- children: /* @__PURE__ */ g(GE, {
26827
+ children: /* @__PURE__ */ g(KE, {
26828
26828
  size: 18,
26829
26829
  color: "currentColor"
26830
26830
  })
@@ -26879,7 +26879,7 @@ function oD({ input: e, setInput: t, onSubmit: n, isConversationEnded: r, callUi
26879
26879
  onMouseLeave: (e) => {
26880
26880
  e.currentTarget.style.opacity = "1";
26881
26881
  },
26882
- children: /* @__PURE__ */ g(BE, {})
26882
+ children: /* @__PURE__ */ g(VE, {})
26883
26883
  })
26884
26884
  ]
26885
26885
  }),
@@ -26942,7 +26942,7 @@ function oD({ input: e, setInput: t, onSubmit: n, isConversationEnded: r, callUi
26942
26942
  }
26943
26943
  //#endregion
26944
26944
  //#region src/components/StatusBanners.jsx
26945
- var sD = ({ muted: e = !1 }) => /* @__PURE__ */ _("svg", {
26945
+ var cD = ({ muted: e = !1 }) => /* @__PURE__ */ _("svg", {
26946
26946
  width: "16",
26947
26947
  height: "16",
26948
26948
  viewBox: "0 0 24 24",
@@ -26962,7 +26962,7 @@ var sD = ({ muted: e = !1 }) => /* @__PURE__ */ _("svg", {
26962
26962
  y2: "22"
26963
26963
  })
26964
26964
  ]
26965
- }), cD = ({ variant: e, onClick: t, children: n, icon: r, compact: i = !1, iconOnly: a = !1, active: o = !1, ariaLabel: s }) => /* @__PURE__ */ _("button", {
26965
+ }), lD = ({ variant: e, onClick: t, children: n, icon: r, compact: i = !1, iconOnly: a = !1, active: o = !1, ariaLabel: s }) => /* @__PURE__ */ _("button", {
26966
26966
  type: "button",
26967
26967
  className: [
26968
26968
  "flowengage-call-btn",
@@ -26976,7 +26976,7 @@ var sD = ({ muted: e = !1 }) => /* @__PURE__ */ _("svg", {
26976
26976
  title: s || n,
26977
26977
  children: [r, !a && /* @__PURE__ */ g("span", { children: n })]
26978
26978
  });
26979
- function lD({ webRTCError: e, micError: t, setMicError: n, dismissCallError: r, incomingCall: i, rejectCall: a, acceptCall: s, activeCallId: l, callConnectionState: u, formatCallDuration: d, callDurationSeconds: m, endWebRTCCall: v, isCallMuted: y, toggleCallMute: b, isAIVoiceActive: x, currentCallAgentName: S, isRateLimited: C, rateLimitMessage: w }) {
26979
+ function uD({ webRTCError: e, micError: t, setMicError: n, dismissCallError: r, incomingCall: i, rejectCall: a, acceptCall: s, activeCallId: l, callConnectionState: u, formatCallDuration: d, callDurationSeconds: m, endWebRTCCall: v, isCallMuted: y, toggleCallMute: b, isAIVoiceActive: x, currentCallAgentName: S, isRateLimited: C, rateLimitMessage: w }) {
26980
26980
  let T = p(null), ee = o(() => {
26981
26981
  if (!T.current) return;
26982
26982
  let { audioContext: e, oscillator: t, interval: n, toneTimeout: r } = T.current;
@@ -27036,7 +27036,7 @@ function lD({ webRTCError: e, micError: t, setMicError: n, dismissCallError: r,
27036
27036
  gap: "10px"
27037
27037
  },
27038
27038
  children: [
27039
- /* @__PURE__ */ g(UE, { className: "" }),
27039
+ /* @__PURE__ */ g(WE, { className: "" }),
27040
27040
  /* @__PURE__ */ g("span", {
27041
27041
  style: {
27042
27042
  fontSize: "12px",
@@ -27079,7 +27079,7 @@ function lD({ webRTCError: e, micError: t, setMicError: n, dismissCallError: r,
27079
27079
  className: "call-connected-identity",
27080
27080
  children: [/* @__PURE__ */ g("div", {
27081
27081
  className: `call-icon-wrapper ${E}`,
27082
- children: /* @__PURE__ */ g(zE, { size: 20 })
27082
+ children: /* @__PURE__ */ g(BE, { size: 20 })
27083
27083
  }), /* @__PURE__ */ _("div", {
27084
27084
  className: "call-info-group",
27085
27085
  children: [/* @__PURE__ */ g("h3", {
@@ -27096,25 +27096,25 @@ function lD({ webRTCError: e, micError: t, setMicError: n, dismissCallError: r,
27096
27096
  })]
27097
27097
  }), /* @__PURE__ */ _("div", {
27098
27098
  className: "call-actions connected",
27099
- children: [/* @__PURE__ */ g(cD, {
27099
+ children: [/* @__PURE__ */ g(lD, {
27100
27100
  variant: "mute",
27101
27101
  onClick: b,
27102
27102
  compact: x,
27103
27103
  active: y,
27104
- icon: /* @__PURE__ */ g(sD, { muted: y }),
27104
+ icon: /* @__PURE__ */ g(cD, { muted: y }),
27105
27105
  children: y ? "Unmute" : "Mute"
27106
- }), /* @__PURE__ */ g(cD, {
27106
+ }), /* @__PURE__ */ g(lD, {
27107
27107
  variant: "end",
27108
27108
  onClick: v,
27109
27109
  compact: x,
27110
- icon: /* @__PURE__ */ g(zE, { size: 14 }),
27110
+ icon: /* @__PURE__ */ g(BE, { size: 14 }),
27111
27111
  children: "End"
27112
27112
  })]
27113
27113
  })] }) : /* @__PURE__ */ _(h, { children: [
27114
27114
  /* @__PURE__ */ _("div", {
27115
27115
  className: `call-icon-wrapper ${E}`,
27116
27116
  children: [
27117
- /* @__PURE__ */ g(HE, {}),
27117
+ /* @__PURE__ */ g(UE, {}),
27118
27118
  E === "incoming" && /* @__PURE__ */ g("div", { className: "call-pulse-animation" }),
27119
27119
  E === "connecting" && /* @__PURE__ */ g("div", { className: "call-connecting-animation" })
27120
27120
  ]
@@ -27131,22 +27131,22 @@ function lD({ webRTCError: e, micError: t, setMicError: n, dismissCallError: r,
27131
27131
  }),
27132
27132
  /* @__PURE__ */ g("div", {
27133
27133
  className: "call-actions",
27134
- children: E === "incoming" && /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(cD, {
27134
+ children: E === "incoming" && /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(lD, {
27135
27135
  variant: "reject",
27136
27136
  onClick: async () => {
27137
27137
  ee(), await a();
27138
27138
  },
27139
27139
  iconOnly: !0,
27140
- icon: /* @__PURE__ */ g(zE, { size: 14 }),
27140
+ icon: /* @__PURE__ */ g(BE, { size: 14 }),
27141
27141
  ariaLabel: "Decline call",
27142
27142
  children: "Decline"
27143
- }), /* @__PURE__ */ g(cD, {
27143
+ }), /* @__PURE__ */ g(lD, {
27144
27144
  variant: "accept",
27145
27145
  onClick: async () => {
27146
27146
  ee(), await s();
27147
27147
  },
27148
27148
  iconOnly: !0,
27149
- icon: /* @__PURE__ */ g(HE, {}),
27149
+ icon: /* @__PURE__ */ g(UE, {}),
27150
27150
  ariaLabel: "Accept call",
27151
27151
  children: "Accept"
27152
27152
  })] })
@@ -27169,13 +27169,13 @@ function lD({ webRTCError: e, micError: t, setMicError: n, dismissCallError: r,
27169
27169
  }
27170
27170
  //#endregion
27171
27171
  //#region src/components/AnimatedOrb.jsx
27172
- var uD = [
27172
+ var dD = [
27173
27173
  "#135bd8",
27174
27174
  "#ef334b",
27175
27175
  "#ffbd2e"
27176
27176
  ];
27177
- function dD(e) {
27178
- return !Array.isArray(e) || e.length === 0 ? uD : e.length === 1 ? [
27177
+ function fD(e) {
27178
+ return !Array.isArray(e) || e.length === 0 ? dD : e.length === 1 ? [
27179
27179
  e[0],
27180
27180
  e[0],
27181
27181
  e[0]
@@ -27189,14 +27189,14 @@ function dD(e) {
27189
27189
  e[2]
27190
27190
  ];
27191
27191
  }
27192
- var fD = {
27192
+ var pD = {
27193
27193
  idle: 3,
27194
27194
  listening: .75,
27195
27195
  speaking: 1.4,
27196
27196
  muted: .75,
27197
27197
  error: .08
27198
27198
  };
27199
- function pD(e) {
27199
+ function mD(e) {
27200
27200
  if (!e || typeof e != "string") return [
27201
27201
  0,
27202
27202
  0,
@@ -27209,14 +27209,14 @@ function pD(e) {
27209
27209
  parseInt(n.slice(4, 6), 16) / 255
27210
27210
  ];
27211
27211
  }
27212
- function mD(e, t) {
27212
+ function hD(e, t) {
27213
27213
  if (!e || typeof e != "string") return `rgba(0,0,0,${t})`;
27214
27214
  if (e.startsWith("rgb")) return e.replace(/[\d.]+\)$/, `${t})`);
27215
27215
  let n = e.replace("#", ""), r = n.length === 3 ? n.split("").map((e) => e + e).join("") : n;
27216
27216
  return `rgba(${parseInt(r.slice(0, 2), 16)},${parseInt(r.slice(2, 4), 16)},${parseInt(r.slice(4, 6), 16)},${t})`;
27217
27217
  }
27218
- var hD = "\n attribute vec2 a_pos;\n varying vec2 v_uv;\n void main() {\n v_uv = a_pos * 0.5 + 0.5;\n gl_Position = vec4(a_pos, 0.0, 1.0);\n }\n", gD = "\n precision highp float;\n\n varying vec2 v_uv;\n uniform float u_time;\n uniform float u_speed;\n uniform vec3 u_c1;\n uniform vec3 u_c2;\n uniform vec3 u_c3;\n\n // ── Gradient noise ─────────────────────────────────────────────────────────\n vec2 hash2(vec2 p) {\n p = vec2(dot(p, vec2(127.1, 311.7)), dot(p, vec2(269.5, 183.3)));\n return -1.0 + 2.0 * fract(sin(p) * 43758.5453123);\n }\n float gnoise(vec2 p) {\n vec2 i = floor(p), f = fract(p);\n vec2 u = f*f*f*(f*(f*6.0-15.0)+10.0);\n return mix(\n mix(dot(hash2(i), f),\n dot(hash2(i+vec2(1,0)), f-vec2(1,0)), u.x),\n mix(dot(hash2(i+vec2(0,1)), f-vec2(0,1)),\n dot(hash2(i+vec2(1,1)), f-vec2(1,1)), u.x),\n u.y\n ) * 0.5 + 0.5;\n }\n\n // ── 3-octave FBM normalised to [0,1] — fewer octaves → larger, softer blobs\n float fbm(vec2 p) {\n float v = 0.0, a = 0.5;\n for (int i = 0; i < 3; i++) {\n v += a * gnoise(p);\n p = p * 2.1 + vec2(100.0);\n a *= 0.5;\n }\n return v / 0.875;\n }\n\n // ── Scalar hash for grain ──────────────────────────────────────────────────\n float hash1(vec2 p) {\n return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453);\n }\n\n void main() {\n vec2 uv = v_uv;\n float t = u_time * u_speed + 47.3;\n\n // ── ① Two-level domain warp — deep organic folding and swirling ───────────\n // First pass: large-scale sweep\n vec2 q = vec2(\n fbm(uv * 1.8 + vec2( t * 0.13, t * 0.11)) * 2.0 - 1.0,\n fbm(uv * 1.8 + vec2( t * 0.11 + 3.7, -t * 0.14 + 1.1)) * 2.0 - 1.0\n );\n // Second pass: warp the warp — creates curling, folding sub-currents\n vec2 r = vec2(\n fbm(uv * 1.8 + q * 0.55 + vec2( t * 0.09, t * 0.07)) * 2.0 - 1.0,\n fbm(uv * 1.8 + q * 0.55 + vec2(-t * 0.07 + 5.1, t * 0.10 + 2.3)) * 2.0 - 1.0\n );\n vec2 wp = uv + r * 0.38;\n\n // ── ② Three independent fields — each drifts inward from its source edge ──\n // Asymmetric velocities: dominant axis matches the inflow direction so the\n // noise texture visually streams inward (left→right, right→left, bottom→top).\n float f1 = fbm(wp * 0.85 + vec2(-t * 0.18, t * 0.04)); // LEFT → right\n float f2 = fbm(wp * 0.85 + vec2( t * 0.18 + 5.3, t * 0.04 + 1.7)); // RIGHT → left\n float f3 = fbm(wp * 0.85 + vec2( t * 0.04 - 3.2, -t * 0.18 + 6.4)); // BOTTOM → up\n\n // ── ③ Breathing blobs — sin pulse makes each field expand and contract ────\n float p1 = 0.88 + 0.12 * sin(t * 0.61);\n float p2 = 0.88 + 0.12 * sin(t * 0.47 + 2.09);\n float p3 = 0.88 + 0.12 * sin(t * 0.53 + 4.19);\n\n // Wide smoothstep (0.26 → 0.70) → soft, diffused blob edges that dissolve\n // gradually into each other, like dye spreading through water.\n float b1 = smoothstep(0.26, 0.70, f1 * p1);\n float b2 = smoothstep(0.26, 0.70, f2 * p2);\n float b3 = smoothstep(0.26, 0.70, f3 * p3);\n\n // ── ④ Directional origin masks.\n // Left/right use exponent 1.4 (they span the full axis so they need some\n // tightening). Bottom uses 0.8 — a lower exponent spreads the third colour\n // further toward the centre, compensating for the circular clip making the\n // bottom band visually narrower than left/right. All three end up with\n // roughly equal visual weight in the finished orb.\n float d1 = pow(1.0 - uv.x, 1.4); // Color 1: from LEFT (uv.x = 0)\n float d2 = pow(uv.x, 1.4); // Color 2: from RIGHT (uv.x = 1)\n float d3 = pow(1.0 - uv.y, 0.8); // Color 3: from BOTTOM — wider spread for balance\n\n float w1 = b1 * d1;\n float w2 = b2 * d2;\n float w3 = b3 * d3;\n\n // ── ⑤ Dye-mixing colour blend ──────────────────────────────────────────────\n // dyeColor is the weighted average of all active colours — exactly how dyes\n // mix in water: overlapping streams blend smoothly, no hard edges.\n float total = w1 + w2 + w3;\n vec3 dyeColor = (u_c1 * w1 + u_c2 * w2 + u_c3 * w3) / max(total, 0.001);\n\n // Boost brightness of the dye to make colors pop and seem less dull\n dyeColor *= 1.65;\n\n // Exponential coverage: cores are rich and opaque; edges dissolve into the\n // near-white base. White only shows through where dye concentration is thin.\n float coverage = 1.0 - exp(-total * 5.0);\n vec3 col = mix(vec3(1.0, 1.0, 1.0), dyeColor, coverage);\n col = clamp(col, 0.0, 1.0);\n\n // ── ⑥ Sphere shading — subtle edge vignette only, no specular ─────────────\n vec2 uvc = v_uv * 2.0 - 1.0;\n\n // ── ⑦ Subtle grain — breaks gradient banding, adds filmic texture ──────────\n float grain = hash1(v_uv * 437.3 + fract(t)) * 2.0 - 1.0;\n col += grain * 0.018;\n\n gl_FragColor = vec4(clamp(col, 0.0, 1.0), 1.0);\n }\n";
27219
- function _D(e, t, n) {
27218
+ var gD = "\n attribute vec2 a_pos;\n varying vec2 v_uv;\n void main() {\n v_uv = a_pos * 0.5 + 0.5;\n gl_Position = vec4(a_pos, 0.0, 1.0);\n }\n", _D = "\n precision highp float;\n\n varying vec2 v_uv;\n uniform float u_time;\n uniform float u_speed;\n uniform vec3 u_c1;\n uniform vec3 u_c2;\n uniform vec3 u_c3;\n\n // ── Gradient noise ─────────────────────────────────────────────────────────\n vec2 hash2(vec2 p) {\n p = vec2(dot(p, vec2(127.1, 311.7)), dot(p, vec2(269.5, 183.3)));\n return -1.0 + 2.0 * fract(sin(p) * 43758.5453123);\n }\n float gnoise(vec2 p) {\n vec2 i = floor(p), f = fract(p);\n vec2 u = f*f*f*(f*(f*6.0-15.0)+10.0);\n return mix(\n mix(dot(hash2(i), f),\n dot(hash2(i+vec2(1,0)), f-vec2(1,0)), u.x),\n mix(dot(hash2(i+vec2(0,1)), f-vec2(0,1)),\n dot(hash2(i+vec2(1,1)), f-vec2(1,1)), u.x),\n u.y\n ) * 0.5 + 0.5;\n }\n\n // ── 3-octave FBM normalised to [0,1] — fewer octaves → larger, softer blobs\n float fbm(vec2 p) {\n float v = 0.0, a = 0.5;\n for (int i = 0; i < 3; i++) {\n v += a * gnoise(p);\n p = p * 2.1 + vec2(100.0);\n a *= 0.5;\n }\n return v / 0.875;\n }\n\n // ── Scalar hash for grain ──────────────────────────────────────────────────\n float hash1(vec2 p) {\n return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453);\n }\n\n void main() {\n vec2 uv = v_uv;\n float t = u_time * u_speed + 47.3;\n\n // ── ① Two-level domain warp — deep organic folding and swirling ───────────\n // First pass: large-scale sweep\n vec2 q = vec2(\n fbm(uv * 1.8 + vec2( t * 0.13, t * 0.11)) * 2.0 - 1.0,\n fbm(uv * 1.8 + vec2( t * 0.11 + 3.7, -t * 0.14 + 1.1)) * 2.0 - 1.0\n );\n // Second pass: warp the warp — creates curling, folding sub-currents\n vec2 r = vec2(\n fbm(uv * 1.8 + q * 0.55 + vec2( t * 0.09, t * 0.07)) * 2.0 - 1.0,\n fbm(uv * 1.8 + q * 0.55 + vec2(-t * 0.07 + 5.1, t * 0.10 + 2.3)) * 2.0 - 1.0\n );\n vec2 wp = uv + r * 0.38;\n\n // ── ② Three independent fields — each drifts inward from its source edge ──\n // Asymmetric velocities: dominant axis matches the inflow direction so the\n // noise texture visually streams inward (left→right, right→left, bottom→top).\n float f1 = fbm(wp * 0.85 + vec2(-t * 0.18, t * 0.04)); // LEFT → right\n float f2 = fbm(wp * 0.85 + vec2( t * 0.18 + 5.3, t * 0.04 + 1.7)); // RIGHT → left\n float f3 = fbm(wp * 0.85 + vec2( t * 0.04 - 3.2, -t * 0.18 + 6.4)); // BOTTOM → up\n\n // ── ③ Breathing blobs — sin pulse makes each field expand and contract ────\n float p1 = 0.88 + 0.12 * sin(t * 0.61);\n float p2 = 0.88 + 0.12 * sin(t * 0.47 + 2.09);\n float p3 = 0.88 + 0.12 * sin(t * 0.53 + 4.19);\n\n // Wide smoothstep (0.26 → 0.70) → soft, diffused blob edges that dissolve\n // gradually into each other, like dye spreading through water.\n float b1 = smoothstep(0.26, 0.70, f1 * p1);\n float b2 = smoothstep(0.26, 0.70, f2 * p2);\n float b3 = smoothstep(0.26, 0.70, f3 * p3);\n\n // ── ④ Directional origin masks.\n // Left/right use exponent 1.4 (they span the full axis so they need some\n // tightening). Bottom uses 0.8 — a lower exponent spreads the third colour\n // further toward the centre, compensating for the circular clip making the\n // bottom band visually narrower than left/right. All three end up with\n // roughly equal visual weight in the finished orb.\n float d1 = pow(1.0 - uv.x, 1.4); // Color 1: from LEFT (uv.x = 0)\n float d2 = pow(uv.x, 1.4); // Color 2: from RIGHT (uv.x = 1)\n float d3 = pow(1.0 - uv.y, 0.8); // Color 3: from BOTTOM — wider spread for balance\n\n float w1 = b1 * d1;\n float w2 = b2 * d2;\n float w3 = b3 * d3;\n\n // ── ⑤ Dye-mixing colour blend ──────────────────────────────────────────────\n // dyeColor is the weighted average of all active colours — exactly how dyes\n // mix in water: overlapping streams blend smoothly, no hard edges.\n float total = w1 + w2 + w3;\n vec3 dyeColor = (u_c1 * w1 + u_c2 * w2 + u_c3 * w3) / max(total, 0.001);\n\n // Boost brightness of the dye to make colors pop and seem less dull\n dyeColor *= 1.65;\n\n // Exponential coverage: cores are rich and opaque; edges dissolve into the\n // near-white base. White only shows through where dye concentration is thin.\n float coverage = 1.0 - exp(-total * 5.0);\n vec3 col = mix(vec3(1.0, 1.0, 1.0), dyeColor, coverage);\n col = clamp(col, 0.0, 1.0);\n\n // ── ⑥ Sphere shading — subtle edge vignette only, no specular ─────────────\n vec2 uvc = v_uv * 2.0 - 1.0;\n\n // ── ⑦ Subtle grain — breaks gradient banding, adds filmic texture ──────────\n float grain = hash1(v_uv * 437.3 + fract(t)) * 2.0 - 1.0;\n col += grain * 0.018;\n\n gl_FragColor = vec4(clamp(col, 0.0, 1.0), 1.0);\n }\n";
27219
+ function vD(e, t, n) {
27220
27220
  let r = (t, n) => {
27221
27221
  let r = e.createShader(t);
27222
27222
  return e.shaderSource(r, n), e.compileShader(r), e.getShaderParameter(r, e.COMPILE_STATUS) ? r : (console.error("[AnimatedOrb shader]", e.getShaderInfoLog(r)), null);
@@ -27225,10 +27225,10 @@ function _D(e, t, n) {
27225
27225
  let o = e.createProgram();
27226
27226
  return e.attachShader(o, i), e.attachShader(o, a), e.linkProgram(o), e.getProgramParameter(o, e.LINK_STATUS) ? o : (console.error("[AnimatedOrb link]", e.getProgramInfoLog(o)), null);
27227
27227
  }
27228
- function vD({ size: e = 94, voiceState: t = "idle", isMuted: n = !1, colors: r, onClick: i, style: a, className: o }) {
27229
- let [s, l, u] = dD(r), d = t === "speaking", f = e <= 50, m = p(null), h = p(fD[t] ?? .35);
27228
+ function yD({ size: e = 94, voiceState: t = "idle", isMuted: n = !1, colors: r, onClick: i, style: a, className: o }) {
27229
+ let [s, l, u] = fD(r), d = t === "speaking", f = e <= 50, m = p(null), h = p(pD[t] ?? .35);
27230
27230
  c(() => {
27231
- h.current = fD[t] ?? .35;
27231
+ h.current = pD[t] ?? .35;
27232
27232
  }, [t]), c(() => {
27233
27233
  let t = m.current;
27234
27234
  if (!t) return;
@@ -27245,7 +27245,7 @@ function vD({ size: e = 94, voiceState: t = "idle", isMuted: n = !1, colors: r,
27245
27245
  console.warn("[AnimatedOrb] WebGL unavailable.");
27246
27246
  return;
27247
27247
  }
27248
- let i = _D(r, hD, gD);
27248
+ let i = vD(r, gD, _D);
27249
27249
  if (!i) {
27250
27250
  console.error("[AnimatedOrb] WebGL program failed to compile/link");
27251
27251
  return;
@@ -27275,7 +27275,7 @@ function vD({ size: e = 94, voiceState: t = "idle", isMuted: n = !1, colors: r,
27275
27275
  c2: r.getUniformLocation(i, "u_c2"),
27276
27276
  c3: r.getUniformLocation(i, "u_c3")
27277
27277
  };
27278
- r.uniform3fv(c.c1, pD(s)), r.uniform3fv(c.c2, pD(l)), r.uniform3fv(c.c3, pD(u)), r.viewport(0, 0, t.width, t.height);
27278
+ r.uniform3fv(c.c1, mD(s)), r.uniform3fv(c.c2, mD(l)), r.uniform3fv(c.c3, mD(u)), r.viewport(0, 0, t.width, t.height);
27279
27279
  let d = performance.now(), f, p = (e) => {
27280
27280
  r.uniform1f(c.time, (e - d) / 1e3), r.uniform1f(c.speed, h.current), r.drawArrays(r.TRIANGLES, 0, 6), f = requestAnimationFrame(p);
27281
27281
  };
@@ -27306,7 +27306,7 @@ function vD({ size: e = 94, voiceState: t = "idle", isMuted: n = !1, colors: r,
27306
27306
  position: "absolute",
27307
27307
  inset: -10,
27308
27308
  borderRadius: "50%",
27309
- background: `radial-gradient(circle, ${mD(s, .18)} 0%, transparent 70%)`,
27309
+ background: `radial-gradient(circle, ${hD(s, .18)} 0%, transparent 70%)`,
27310
27310
  pointerEvents: "none"
27311
27311
  },
27312
27312
  animate: { opacity: [.3, .75] },
@@ -27385,7 +27385,7 @@ function vD({ size: e = 94, voiceState: t = "idle", isMuted: n = !1, colors: r,
27385
27385
  //#endregion
27386
27386
  //#region src/utils/voiceActionVisuals.js
27387
27387
  var Q = "fe-vv";
27388
- function yD() {
27388
+ function bD() {
27389
27389
  if (typeof document > "u" || document.getElementById(`${Q}-styles`)) return;
27390
27390
  let e = `
27391
27391
  /* ── Action toast ───────────────────────────────────────────────────────────── */
@@ -27530,14 +27530,14 @@ function yD() {
27530
27530
  `, t = document.createElement("style");
27531
27531
  t.id = `${Q}-styles`, t.textContent = e, (document.head || document.documentElement).appendChild(t);
27532
27532
  }
27533
- var bD = null, xD = null;
27534
- function SD() {
27535
- return (!bD || !bD.isConnected) && (bD = document.createElement("div"), bD.id = `${Q}-toast`, document.body.appendChild(bD)), bD;
27533
+ var xD = null, SD = null;
27534
+ function CD() {
27535
+ return (!xD || !xD.isConnected) && (xD = document.createElement("div"), xD.id = `${Q}-toast`, document.body.appendChild(xD)), xD;
27536
27536
  }
27537
- function CD(e, { spinner: t = !0, icon: n = null, duration: r = 0 } = {}) {
27537
+ function wD(e, { spinner: t = !0, icon: n = null, duration: r = 0 } = {}) {
27538
27538
  if (typeof document > "u") return;
27539
- yD(), xD &&= (clearTimeout(xD), null);
27540
- let i = SD();
27539
+ bD(), SD &&= (clearTimeout(SD), null);
27540
+ let i = CD();
27541
27541
  if (i.innerHTML = "", n) {
27542
27542
  let e = document.createElement("span");
27543
27543
  e.className = `${Q}-icon`, e.textContent = n, i.appendChild(e);
@@ -27546,82 +27546,82 @@ function CD(e, { spinner: t = !0, icon: n = null, duration: r = 0 } = {}) {
27546
27546
  e.className = `${Q}-spin`, i.appendChild(e);
27547
27547
  }
27548
27548
  let a = document.createElement("span");
27549
- a.textContent = e, i.appendChild(a), i.classList.remove(`${Q}-show`), i.offsetHeight, i.classList.add(`${Q}-show`), r > 0 && (xD = setTimeout(() => wD(), r));
27549
+ a.textContent = e, i.appendChild(a), i.classList.remove(`${Q}-show`), i.offsetHeight, i.classList.add(`${Q}-show`), r > 0 && (SD = setTimeout(() => TD(), r));
27550
27550
  }
27551
- function wD(e = 0) {
27552
- bD && (e > 0 ? xD = setTimeout(() => {
27553
- bD && bD.classList.remove(`${Q}-show`);
27554
- }, e) : bD && bD.classList.remove(`${Q}-show`));
27555
- }
27556
- var TD = null, ED = [];
27557
- function DD() {
27558
- return (!TD || !TD.isConnected) && (TD = document.createElement("div"), TD.id = `${Q}-bar`, document.body.appendChild(TD)), TD;
27551
+ function TD(e = 0) {
27552
+ xD && (e > 0 ? SD = setTimeout(() => {
27553
+ xD && xD.classList.remove(`${Q}-show`);
27554
+ }, e) : xD && xD.classList.remove(`${Q}-show`));
27559
27555
  }
27556
+ var ED = null, DD = [];
27560
27557
  function OD() {
27558
+ return (!ED || !ED.isConnected) && (ED = document.createElement("div"), ED.id = `${Q}-bar`, document.body.appendChild(ED)), ED;
27559
+ }
27560
+ function kD() {
27561
27561
  if (typeof document > "u") return;
27562
- yD(), ED.forEach(clearTimeout), ED = [];
27563
- let e = DD();
27562
+ bD(), DD.forEach(clearTimeout), DD = [];
27563
+ let e = OD();
27564
27564
  e.style.transition = "none", e.style.width = "0%", e.classList.add(`${Q}-bar-active`), e.offsetHeight, e.style.transition = "width 0.35s ease, opacity 0.25s ease";
27565
27565
  let t = [[80, "width 0.6s ease"], [92, "width 1.2s ease"]], n = 50;
27566
27566
  for (let [e, r] of t) {
27567
27567
  let t = n, i = e, a = r;
27568
- ED.push(setTimeout(() => {
27569
- TD && (TD.style.transition = a, TD.style.width = `${i}%`);
27568
+ DD.push(setTimeout(() => {
27569
+ ED && (ED.style.transition = a, ED.style.width = `${i}%`);
27570
27570
  }, t)), n += 800;
27571
27571
  }
27572
27572
  }
27573
- function kD() {
27574
- TD && (ED.forEach(clearTimeout), ED = [], TD.style.transition = "width 0.2s ease", TD.style.width = "100%", ED.push(setTimeout(() => {
27575
- TD && (TD.style.transition = "opacity 0.35s ease", TD.style.opacity = "0", ED.push(setTimeout(() => {
27576
- TD && (TD.style.width = "0%", TD.classList.remove(`${Q}-bar-active`));
27573
+ function AD() {
27574
+ ED && (DD.forEach(clearTimeout), DD = [], ED.style.transition = "width 0.2s ease", ED.style.width = "100%", DD.push(setTimeout(() => {
27575
+ ED && (ED.style.transition = "opacity 0.35s ease", ED.style.opacity = "0", DD.push(setTimeout(() => {
27576
+ ED && (ED.style.width = "0%", ED.classList.remove(`${Q}-bar-active`));
27577
27577
  }, 380)));
27578
27578
  }, 220)));
27579
27579
  }
27580
- function AD() {
27580
+ function jD() {
27581
27581
  typeof document > "u" || document.querySelectorAll(`.${Q}-field-active, .${Q}-field-filled`).forEach((e) => e.classList.remove(`${Q}-field-active`, `${Q}-field-filled`));
27582
27582
  }
27583
- function jD(e) {
27584
- !e || typeof document > "u" || (yD(), AD(), e.classList.add(`${Q}-field-active`));
27585
- }
27586
27583
  function MD(e) {
27584
+ !e || typeof document > "u" || (bD(), jD(), e.classList.add(`${Q}-field-active`));
27585
+ }
27586
+ function ND(e) {
27587
27587
  e && (e.classList.remove(`${Q}-field-active`), e.classList.add(`${Q}-field-filled`), setTimeout(() => {
27588
27588
  e.isConnected && e.classList.remove(`${Q}-field-filled`);
27589
27589
  }, 1400));
27590
27590
  }
27591
- var ND = `<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 22 22" fill="none">
27591
+ var PD = `<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 22 22" fill="none">
27592
27592
  <filter id="${Q}-csh">
27593
27593
  <feDropShadow dx="1" dy="2" stdDeviation="1.5" flood-color="#00000060"/>
27594
27594
  </filter>
27595
27595
  <path d="M4 2L19 10.5L11 12.8L8 20L4 2Z"
27596
27596
  fill="white" stroke="#1e1b4b" stroke-width="1.6" stroke-linejoin="round"
27597
27597
  filter="url(#${Q}-csh)"/>
27598
- </svg>`, PD = null, FD = !1;
27599
- function ID() {
27600
- return (!PD || !PD.isConnected) && (PD = document.createElement("div"), PD.id = `${Q}-cursor`, PD.innerHTML = ND, document.body.appendChild(PD), FD = !1), PD;
27598
+ </svg>`, FD = null, ID = !1;
27599
+ function LD() {
27600
+ return (!FD || !FD.isConnected) && (FD = document.createElement("div"), FD.id = `${Q}-cursor`, FD.innerHTML = PD, document.body.appendChild(FD), ID = !1), FD;
27601
27601
  }
27602
- async function LD(e) {
27602
+ async function RD(e) {
27603
27603
  if (typeof document > "u" || !e) return;
27604
- yD();
27604
+ bD();
27605
27605
  let t;
27606
27606
  try {
27607
27607
  t = e.getBoundingClientRect();
27608
27608
  } catch {
27609
27609
  return;
27610
27610
  }
27611
- let n = t.left + Math.min(16, t.width * .2), r = t.top + Math.min(12, t.height * .25), i = ID();
27612
- FD ||= (i.style.transition = "none", i.style.left = `${window.innerWidth / 2}px`, i.style.top = `${window.innerHeight * .4}px`, i.classList.add(`${Q}-cursor-visible`), i.offsetHeight, i.style.transition = "left 0.32s cubic-bezier(0.25,0.46,0.45,0.94), top 0.32s cubic-bezier(0.25,0.46,0.45,0.94), opacity 0.2s ease", !0), i.style.left = `${n}px`, i.style.top = `${r}px`, await VD(360);
27611
+ let n = t.left + Math.min(16, t.width * .2), r = t.top + Math.min(12, t.height * .25), i = LD();
27612
+ ID ||= (i.style.transition = "none", i.style.left = `${window.innerWidth / 2}px`, i.style.top = `${window.innerHeight * .4}px`, i.classList.add(`${Q}-cursor-visible`), i.offsetHeight, i.style.transition = "left 0.32s cubic-bezier(0.25,0.46,0.45,0.94), top 0.32s cubic-bezier(0.25,0.46,0.45,0.94), opacity 0.2s ease", !0), i.style.left = `${n}px`, i.style.top = `${r}px`, await HD(360);
27613
27613
  }
27614
- function RD(e = !1) {
27615
- PD && (e ? (PD.classList.remove(`${Q}-cursor-visible`), FD = !1) : (PD.classList.remove(`${Q}-cursor-visible`), setTimeout(() => {
27616
- FD = !1;
27614
+ function zD(e = !1) {
27615
+ FD && (e ? (FD.classList.remove(`${Q}-cursor-visible`), ID = !1) : (FD.classList.remove(`${Q}-cursor-visible`), setTimeout(() => {
27616
+ ID = !1;
27617
27617
  }, 250)));
27618
27618
  }
27619
- async function zD(e) {
27620
- PD && (PD.classList.add(`${Q}-cursor-click`), await VD(280), PD.classList.remove(`${Q}-cursor-click`));
27619
+ async function BD(e) {
27620
+ FD && (FD.classList.add(`${Q}-cursor-click`), await HD(280), FD.classList.remove(`${Q}-cursor-click`));
27621
27621
  }
27622
- function BD(e) {
27622
+ function VD(e) {
27623
27623
  if (!e || typeof document > "u") return;
27624
- yD();
27624
+ bD();
27625
27625
  let t;
27626
27626
  try {
27627
27627
  t = e.getBoundingClientRect();
@@ -27647,7 +27647,7 @@ function BD(e) {
27647
27647
  a.remove(), e.style.position = n, e.style.overflow = r;
27648
27648
  }, 650);
27649
27649
  }
27650
- function VD(e) {
27650
+ function HD(e) {
27651
27651
  return new Promise((t) => setTimeout(t, e));
27652
27652
  }
27653
27653
  //#endregion
@@ -27655,42 +27655,42 @@ function VD(e) {
27655
27655
  function $(...e) {
27656
27656
  mn() && console.log("[FlowEngage:voice-tools]", ...e);
27657
27657
  }
27658
- function HD(e) {
27658
+ function UD(e) {
27659
27659
  return new Promise((t) => setTimeout(t, e));
27660
27660
  }
27661
- var UD = "#flowengage-root, .flowengage-shell, .flowengage-widget-root";
27662
- function WD(e) {
27661
+ var WD = "#flowengage-root, .flowengage-shell, .flowengage-widget-root";
27662
+ function GD(e) {
27663
27663
  if (!e || typeof e.closest != "function") return !1;
27664
27664
  try {
27665
- return !!e.closest(UD);
27665
+ return !!e.closest(WD);
27666
27666
  } catch {
27667
27667
  return !1;
27668
27668
  }
27669
27669
  }
27670
- function GD(e) {
27670
+ function KD(e) {
27671
27671
  try {
27672
27672
  let t = e.ownerDocument?.defaultView;
27673
27673
  if (t) return t.getComputedStyle(e);
27674
27674
  } catch {}
27675
27675
  return window.getComputedStyle(e);
27676
27676
  }
27677
- function KD(e) {
27677
+ function qD(e) {
27678
27678
  let t = /* @__PURE__ */ new Set();
27679
27679
  function n(r) {
27680
27680
  if (!r || t.has(r)) return;
27681
27681
  t.add(r), e(r);
27682
27682
  let i = r.querySelectorAll("iframe");
27683
- for (let e of i) if (!WD(e)) try {
27683
+ for (let e of i) if (!GD(e)) try {
27684
27684
  let t = e.contentDocument;
27685
27685
  t && n(t);
27686
27686
  } catch {}
27687
27687
  }
27688
27688
  typeof document < "u" && n(document);
27689
27689
  }
27690
- function qD(e) {
27690
+ function JD(e) {
27691
27691
  return e == null ? null : String(e).replace(/\u00a0/g, " ").replace(/\s*\*+\s*$/u, "").replace(/\s+/g, " ").trim();
27692
27692
  }
27693
- function JD(e) {
27693
+ function YD(e) {
27694
27694
  let t = e.ownerDocument || document, n = e.getAttribute("aria-labelledby");
27695
27695
  if (n) {
27696
27696
  let e = n.trim().split(/\s+/).filter(Boolean), r = [];
@@ -27698,42 +27698,42 @@ function JD(e) {
27698
27698
  let e = t.getElementById(n);
27699
27699
  e?.textContent && r.push(e.textContent.trim());
27700
27700
  } catch {}
27701
- if (r.length) return qD(r.join(" "));
27701
+ if (r.length) return JD(r.join(" "));
27702
27702
  }
27703
- if (e.labels && e.labels.length) return qD(e.labels[0].textContent);
27703
+ if (e.labels && e.labels.length) return JD(e.labels[0].textContent);
27704
27704
  let r = e.id;
27705
27705
  if (r) try {
27706
27706
  let e = t.querySelector(`label[for="${CSS.escape(r)}"]`);
27707
- if (e) return qD(e.textContent);
27707
+ if (e) return JD(e.textContent);
27708
27708
  } catch {
27709
27709
  let e = t.querySelector(`label[for="${r.replace(/"/g, "\\\"")}"]`);
27710
- if (e) return qD(e.textContent);
27710
+ if (e) return JD(e.textContent);
27711
27711
  }
27712
27712
  let i = e.previousElementSibling;
27713
27713
  for (let e = 0; e < 6 && i; e += 1) {
27714
- if (i.tagName === "LABEL") return qD(i.textContent);
27714
+ if (i.tagName === "LABEL") return JD(i.textContent);
27715
27715
  let e = (i.className || "").toString().toLowerCase();
27716
27716
  if (/chakra-form__label|formlabel|field-label|form-label|mui-form-label/.test(e)) {
27717
- let e = qD(i.textContent);
27717
+ let e = JD(i.textContent);
27718
27718
  if (e) return e;
27719
27719
  }
27720
27720
  i = i.previousElementSibling;
27721
27721
  }
27722
27722
  let a = e.parentElement;
27723
27723
  for (let e = 0; e < 5 && a; e += 1) {
27724
- if (a.tagName === "LABEL") return qD(a.textContent);
27724
+ if (a.tagName === "LABEL") return JD(a.textContent);
27725
27725
  let e = a.querySelector?.(":scope > label, :scope > [class*='FormLabel'], :scope > [class*='form__label']");
27726
- if (e?.textContent) return qD(e.textContent);
27726
+ if (e?.textContent) return JD(e.textContent);
27727
27727
  a = a.parentElement;
27728
27728
  }
27729
27729
  let o = e.getAttribute("aria-label");
27730
- return o ? qD(o) : null;
27730
+ return o ? JD(o) : null;
27731
27731
  }
27732
- function YD() {
27732
+ function XD() {
27733
27733
  let e = [];
27734
- return KD((t) => {
27734
+ return qD((t) => {
27735
27735
  e.push(...Array.from(t.querySelectorAll("input, select, textarea")).filter((e) => {
27736
- if (WD(e)) return !1;
27736
+ if (GD(e)) return !1;
27737
27737
  let t = (e.type || "").toLowerCase();
27738
27738
  if ([
27739
27739
  "hidden",
@@ -27742,32 +27742,32 @@ function YD() {
27742
27742
  "image"
27743
27743
  ].includes(t) || e.disabled || e.readOnly) return !1;
27744
27744
  try {
27745
- let t = GD(e);
27745
+ let t = KD(e);
27746
27746
  if (t.display === "none" || t.visibility === "hidden") return !1;
27747
27747
  } catch {}
27748
27748
  return !0;
27749
27749
  }));
27750
27750
  }), e;
27751
27751
  }
27752
- function XD() {
27753
- return YD().map((e, t) => ({
27752
+ function ZD() {
27753
+ return XD().map((e, t) => ({
27754
27754
  formIndex: 0,
27755
27755
  fieldIndex: t,
27756
27756
  tag: e.tagName,
27757
27757
  type: e.type || "text",
27758
27758
  name: e.name || null,
27759
27759
  id: e.id || null,
27760
- label: JD(e),
27760
+ label: YD(e),
27761
27761
  placeholder: e.placeholder || null
27762
27762
  }));
27763
27763
  }
27764
- function ZD() {
27764
+ function QD() {
27765
27765
  let e = [];
27766
- return KD((t) => {
27766
+ return qD((t) => {
27767
27767
  e.push(...Array.from(t.querySelectorAll("button, [role=\"button\"], input[type=\"submit\"], input[type=\"button\"]")).filter((e) => {
27768
- if (WD(e) || e.disabled) return !1;
27768
+ if (GD(e) || e.disabled) return !1;
27769
27769
  try {
27770
- let t = GD(e);
27770
+ let t = KD(e);
27771
27771
  if (t.display === "none" || t.visibility === "hidden") return !1;
27772
27772
  } catch {}
27773
27773
  return !0;
@@ -27779,15 +27779,15 @@ function ZD() {
27779
27779
  type: e.type || e.tagName
27780
27780
  }));
27781
27781
  }
27782
- function QD(e) {
27782
+ function $D(e) {
27783
27783
  return String(e || "").toLowerCase().replace(/\u00a0/g, " ").replace(/\*/g, "").replace(/\s+/g, " ").trim();
27784
27784
  }
27785
- function $D(e) {
27786
- let t = QD(e);
27785
+ function eO(e) {
27786
+ let t = $D(e);
27787
27787
  return t = t.replace(/\s+field\s*$/i, "").trim(), t;
27788
27788
  }
27789
- function eO(e, t) {
27790
- let n = $D(t);
27789
+ function tO(e, t) {
27790
+ let n = eO(t);
27791
27791
  if (!n) return 0;
27792
27792
  let r = (e.name || "").toLowerCase(), i = (e.id || "").toLowerCase();
27793
27793
  if (r === "url" && /url|website|domain|site|audit/.test(n) || (i === "url-input" || i.endsWith("-url-input")) && /url|website|domain|site|audit/.test(n)) return 100;
@@ -27795,12 +27795,12 @@ function eO(e, t) {
27795
27795
  e.name,
27796
27796
  e.id,
27797
27797
  e.placeholder,
27798
- JD(e),
27798
+ YD(e),
27799
27799
  e.getAttribute("aria-label"),
27800
27800
  e.getAttribute("title"),
27801
27801
  e.getAttribute("data-testid"),
27802
27802
  e.getAttribute("autocomplete")
27803
- ].filter(Boolean).map((e) => QD(e)), o = 0;
27803
+ ].filter(Boolean).map((e) => $D(e)), o = 0;
27804
27804
  for (let e of a) {
27805
27805
  if (!e) continue;
27806
27806
  if (e.includes(n) || n.includes(e)) {
@@ -27815,16 +27815,16 @@ function eO(e, t) {
27815
27815
  }
27816
27816
  return o;
27817
27817
  }
27818
- var tO = 28;
27819
- function nO(e, t) {
27818
+ var nO = 28;
27819
+ function rO(e, t) {
27820
27820
  let n = null, r = 0;
27821
27821
  for (let i of e) {
27822
- let e = eO(i, t);
27822
+ let e = tO(i, t);
27823
27823
  e > r && (r = e, n = i);
27824
27824
  }
27825
- return !n || r < tO ? null : n;
27825
+ return !n || r < nO ? null : n;
27826
27826
  }
27827
- function rO(e, t, n) {
27827
+ function iO(e, t, n) {
27828
27828
  let r = String(t || "").toLowerCase().trim(), i = String(n || "").trim();
27829
27829
  if (!(/^https?:\/\//i.test(i) || /\.\w{2,}(\/|\s|$)/.test(i) || r.includes("url") || r.includes("website") || r.includes("domain") || r.includes("site"))) return null;
27830
27830
  let a = null, o = 0;
@@ -27844,7 +27844,7 @@ function rO(e, t, n) {
27844
27844
  t.name,
27845
27845
  t.id,
27846
27846
  t.placeholder,
27847
- JD(t),
27847
+ YD(t),
27848
27848
  t.getAttribute("aria-label"),
27849
27849
  t.getAttribute("autocomplete")
27850
27850
  ].filter(Boolean).join(" ").toLowerCase();
@@ -27852,15 +27852,15 @@ function rO(e, t, n) {
27852
27852
  }
27853
27853
  return !a || o < 42 ? null : a;
27854
27854
  }
27855
- function iO(e) {
27855
+ function aO(e) {
27856
27856
  let t = String(e ?? "").trim();
27857
27857
  return t ? /^https?:\/\//i.test(t) ? !0 : /\.\w{2,}(\/|\s|$)/.test(t) : !1;
27858
27858
  }
27859
- function aO(e) {
27859
+ function oO(e) {
27860
27860
  let t = String(e ?? "").toLowerCase().trim();
27861
27861
  return t ? !!(t === "url" || t === "website" || t === "website url" || t === "website_url" || t === "enter website url" || t.includes("website") || t.includes("domain") || /(enter\s+website|site\s*url|page\s*url)/.test(t)) : !1;
27862
27862
  }
27863
- function oO(e) {
27863
+ function sO(e) {
27864
27864
  if (!e || e.tagName !== "INPUT" && e.tagName !== "TEXTAREA") return !1;
27865
27865
  let t = (e.type || "").toLowerCase();
27866
27866
  return ![
@@ -27872,22 +27872,22 @@ function oO(e) {
27872
27872
  "file"
27873
27873
  ].includes(t);
27874
27874
  }
27875
- function sO(e) {
27876
- if (!oO(e)) return !1;
27875
+ function cO(e) {
27876
+ if (!sO(e)) return !1;
27877
27877
  let t = (e.name || "").toLowerCase(), n = (e.id || "").toLowerCase(), r = [
27878
27878
  e.name,
27879
27879
  e.id,
27880
27880
  e.placeholder,
27881
- JD(e),
27881
+ YD(e),
27882
27882
  e.getAttribute("aria-label")
27883
27883
  ].filter(Boolean).join(" ").toLowerCase();
27884
27884
  return t === "url" || n === "url-input" || n.endsWith("-url-input") || /(website\s*url|enter\s+website|site\s*url)/.test(r) || /(website|domain)/.test(r) && /(url|site)/.test(r);
27885
27885
  }
27886
- function cO(e, t, n) {
27887
- let r = String(t ?? ""), i = String(n ?? ""), a = dO(e, r) || nO(e, r) || rO(e, r, i);
27886
+ function lO(e, t, n) {
27887
+ let r = String(t ?? ""), i = String(n ?? ""), a = fO(e, r) || rO(e, r) || iO(e, r, i);
27888
27888
  if (!a) return [];
27889
27889
  let o = new Set([a]);
27890
- if (iO(i) && aO(r)) for (let t of e) t !== a && sO(t) && o.add(t);
27890
+ if (aO(i) && oO(r)) for (let t of e) t !== a && cO(t) && o.add(t);
27891
27891
  let s = Array.from(o);
27892
27892
  return s.sort((e, t) => {
27893
27893
  if (e === t) return 0;
@@ -27895,7 +27895,7 @@ function cO(e, t, n) {
27895
27895
  return n & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : n & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
27896
27896
  }), s;
27897
27897
  }
27898
- function lO(e, t) {
27898
+ function uO(e, t) {
27899
27899
  try {
27900
27900
  if (!e?.getBoundingClientRect || !t?.getBoundingClientRect) return Infinity;
27901
27901
  let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = {
@@ -27910,17 +27910,17 @@ function lO(e, t) {
27910
27910
  return Infinity;
27911
27911
  }
27912
27912
  }
27913
- function uO(e) {
27913
+ function dO(e) {
27914
27914
  if (!e || typeof e != "string") return null;
27915
27915
  let t = null;
27916
- return KD((n) => {
27916
+ return qD((n) => {
27917
27917
  try {
27918
27918
  let r = n.getElementById(e);
27919
- r && !WD(r) && r.matches?.("input, select, textarea") && (t = r);
27919
+ r && !GD(r) && r.matches?.("input, select, textarea") && (t = r);
27920
27920
  } catch {}
27921
27921
  }), t;
27922
27922
  }
27923
- function dO(e, t) {
27923
+ function fO(e, t) {
27924
27924
  let n = String(t ?? "").trim();
27925
27925
  if (!n) return null;
27926
27926
  let r = n.match(/^name:\s*([\w.-]+)$/i);
@@ -27930,12 +27930,12 @@ function dO(e, t) {
27930
27930
  }
27931
27931
  let i = n.match(/^id:\s*([\w.-]+)$/i);
27932
27932
  if (i) {
27933
- let e = uO(i[1]);
27933
+ let e = dO(i[1]);
27934
27934
  if (e) return e;
27935
27935
  }
27936
27936
  let a = n.startsWith("#") ? n.slice(1) : n;
27937
27937
  if (/^[\w-]+$/.test(a)) {
27938
- let e = uO(a);
27938
+ let e = dO(a);
27939
27939
  if (e) return e;
27940
27940
  }
27941
27941
  let o = n.toLowerCase().replace(/\s+/g, " ");
@@ -27945,7 +27945,7 @@ function dO(e, t) {
27945
27945
  }
27946
27946
  return null;
27947
27947
  }
27948
- function fO(e, t) {
27948
+ function pO(e, t) {
27949
27949
  let n = String(t || "").toLowerCase().trim();
27950
27950
  if (!n) return 0;
27951
27951
  let r = [
@@ -27961,13 +27961,13 @@ function fO(e, t) {
27961
27961
  for (let e of i) r.includes(e) && (a += 1);
27962
27962
  return a / i.length * 92;
27963
27963
  }
27964
- function pO(e, t) {
27964
+ function mO(e, t) {
27965
27965
  let n = [];
27966
- KD((e) => {
27966
+ qD((e) => {
27967
27967
  n.push(...Array.from(e.querySelectorAll("button, [role=\"button\"], input[type=\"submit\"], input[type=\"button\"]")).filter((e) => {
27968
- if (WD(e) || e.disabled) return !1;
27968
+ if (GD(e) || e.disabled) return !1;
27969
27969
  try {
27970
- let t = GD(e);
27970
+ let t = KD(e);
27971
27971
  if (t.display === "none" || t.visibility === "hidden") return !1;
27972
27972
  } catch {}
27973
27973
  return !0;
@@ -27975,7 +27975,7 @@ function pO(e, t) {
27975
27975
  });
27976
27976
  let r = 0, i = n.map((t) => ({
27977
27977
  el: t,
27978
- s: fO(t, e)
27978
+ s: pO(t, e)
27979
27979
  }));
27980
27980
  for (let { s: e } of i) e > r && (r = e);
27981
27981
  if (r < 36) return null;
@@ -27985,14 +27985,14 @@ function pO(e, t) {
27985
27985
  if (o.length) {
27986
27986
  let e = a[0], t = Infinity;
27987
27987
  for (let n of a) for (let r of o) {
27988
- let i = lO(n, r);
27988
+ let i = uO(n, r);
27989
27989
  i < t && (t = i, e = n);
27990
27990
  }
27991
27991
  return e;
27992
27992
  }
27993
27993
  return a[0];
27994
27994
  }
27995
- function mO(e) {
27995
+ function hO(e) {
27996
27996
  if (e == null) return {};
27997
27997
  if (typeof e == "string") {
27998
27998
  let t = e.trim();
@@ -28005,8 +28005,8 @@ function mO(e) {
28005
28005
  }
28006
28006
  return e;
28007
28007
  }
28008
- function hO(e) {
28009
- let t = mO(e);
28008
+ function gO(e) {
28009
+ let t = hO(e);
28010
28010
  if (Array.isArray(t) && t.length > 0) {
28011
28011
  let e = t[0];
28012
28012
  if (e?.field_key != null || e?.fieldKey != null) return t.map((e) => ({
@@ -28034,7 +28034,7 @@ function hO(e) {
28034
28034
  value: e?.value ?? e?.Value
28035
28035
  })) : [];
28036
28036
  }
28037
- function gO(e) {
28037
+ function _O(e) {
28038
28038
  if (!e || typeof e != "string") return [];
28039
28039
  let t = e.trim();
28040
28040
  if (!t || /\b[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}\b/i.test(t)) return [];
@@ -28053,7 +28053,7 @@ function gO(e) {
28053
28053
  }
28054
28054
  return [];
28055
28055
  }
28056
- function _O(e) {
28056
+ function vO(e) {
28057
28057
  if (!e || typeof e != "string") return [];
28058
28058
  let t = e.trim();
28059
28059
  if (!t) return [];
@@ -28089,17 +28089,17 @@ function _O(e) {
28089
28089
  }
28090
28090
  return n;
28091
28091
  }
28092
- function vO(e) {
28092
+ function yO(e) {
28093
28093
  if (!e || typeof e != "object") return null;
28094
28094
  let t = e.url ?? e.target_url ?? e.page_url ?? e.pageUrl ?? e.link ?? e.href ?? e.path;
28095
28095
  return t == null ? null : String(t).trim() || null;
28096
28096
  }
28097
- function yO(e) {
28097
+ function bO(e) {
28098
28098
  if (!e || typeof e != "object") return null;
28099
28099
  let t = e.query ?? e.q ?? e.search ?? e.text ?? e.keywords;
28100
28100
  return t == null ? null : String(t).trim() || null;
28101
28101
  }
28102
- function bO(e, t, n) {
28102
+ function xO(e, t, n) {
28103
28103
  if (!n?.skipScroll) try {
28104
28104
  e.scrollIntoView({
28105
28105
  block: "center",
@@ -28154,7 +28154,7 @@ function bO(e, t, n) {
28154
28154
  } catch {}
28155
28155
  return !0;
28156
28156
  }
28157
- function xO() {
28157
+ function SO() {
28158
28158
  let e = {};
28159
28159
  document.querySelectorAll("h1, h2, h3, h4, h5, h6").forEach((t) => {
28160
28160
  if (t.id) return;
@@ -28169,11 +28169,11 @@ function xO() {
28169
28169
  e[r] = !0, t.id = r;
28170
28170
  });
28171
28171
  }
28172
- function SO(e) {
28172
+ function CO(e) {
28173
28173
  let t = e.siteId || null, n = (e.apiBaseUrl || "").replace(/\/$/, ""), r = typeof e.getLastUserVoiceText == "function" ? e.getLastUserVoiceText : null, i = [], a = {
28174
28174
  flowengage_navigate: async (n) => {
28175
28175
  $("flowengage_navigate ▶ raw parameters:", n);
28176
- let r = mO(n), i = vO(r), a = r.section_text ?? r.sectionText ?? r.section;
28176
+ let r = hO(n), i = yO(r), a = r.section_text ?? r.sectionText ?? r.section;
28177
28177
  if ($("flowengage_navigate · coerced:", {
28178
28178
  url: i,
28179
28179
  sectionText: a
@@ -28189,38 +28189,38 @@ function SO(e) {
28189
28189
  return $("flowengage_navigate ✖ blocked", e), e;
28190
28190
  }
28191
28191
  try {
28192
- if (CD(`Navigating to ${i}...`, { spinner: !0 }), OD(), AE(), IE(), $("flowengage_navigate → shadowNavigate", i), await On(i), await HD(400), xO(), a && typeof a == "string") {
28192
+ if (wD(`Navigating to ${i}...`, { spinner: !0 }), kD(), jE(), LE(), $("flowengage_navigate → shadowNavigate", i), await On(i), await UD(400), SO(), a && typeof a == "string") {
28193
28193
  let e = xn(null, a);
28194
- e && SE(() => FE(e)), $("flowengage_navigate · highlight", {
28194
+ e && CE(() => IE(e)), $("flowengage_navigate · highlight", {
28195
28195
  sectionText: a,
28196
28196
  found: !!e
28197
28197
  });
28198
28198
  }
28199
28199
  let e = `OK_NAVIGATION ${i}`;
28200
- return $("flowengage_navigate ✓", e), CD("Navigation complete", {
28200
+ return $("flowengage_navigate ✓", e), wD("Navigation complete", {
28201
28201
  spinner: !1,
28202
28202
  icon: "✅",
28203
28203
  duration: 1200
28204
28204
  }), e;
28205
28205
  } catch (e) {
28206
28206
  let t = `Navigation error: ${e?.message || String(e)}`;
28207
- return $("flowengage_navigate ✖", t), CD("Navigation failed", {
28207
+ return $("flowengage_navigate ✖", t), wD("Navigation failed", {
28208
28208
  spinner: !1,
28209
28209
  icon: "⚠️",
28210
28210
  duration: 1800
28211
28211
  }), t;
28212
28212
  } finally {
28213
- kD(), wD(900);
28213
+ AD(), TD(900);
28214
28214
  }
28215
28215
  },
28216
28216
  flowengage_highlight: async (e) => {
28217
28217
  $("flowengage_highlight ▶", e);
28218
- let t = mO(e), n = t?.section_id || t?.sectionId, r = t?.section_text || t?.sectionText, i = xn(n || null, r || null);
28219
- return i ? (SE(() => FE(i)), $("flowengage_highlight ✓ (enqueued)"), "Highlighted the section.") : ($("flowengage_highlight ✖ no element"), "Could not find that section on the page.");
28218
+ let t = hO(e), n = t?.section_id || t?.sectionId, r = t?.section_text || t?.sectionText, i = xn(n || null, r || null);
28219
+ return i ? (IE(i), $("flowengage_highlight ✓"), "Highlighted the section.") : ($("flowengage_highlight ✖ no element"), "Could not find that section on the page.");
28220
28220
  },
28221
28221
  flowengage_read_content: async (e) => {
28222
28222
  $("flowengage_read_content ▶", e);
28223
- let t = mO(e), n = t?.section_text || t?.sectionText || "";
28223
+ let t = hO(e), n = t?.section_text || t?.sectionText || "";
28224
28224
  try {
28225
28225
  let e = "";
28226
28226
  if (n) {
@@ -28243,7 +28243,7 @@ function SO(e) {
28243
28243
  },
28244
28244
  flowengage_search: async (e) => {
28245
28245
  $("flowengage_search ▶", e);
28246
- let r = yO(mO(e));
28246
+ let r = bO(hO(e));
28247
28247
  if ($("flowengage_search · query:", r, "siteId:", t, "apiBase:", n || "(empty)"), !r) return $("flowengage_search ✖ missing query"), "Missing query parameter.";
28248
28248
  if (!t) return $("flowengage_search ✖ no siteId"), "Site is not configured for search.";
28249
28249
  if (!n) return $("flowengage_search ✖ no api base"), "API base URL is missing; cannot search.";
@@ -28272,7 +28272,7 @@ function SO(e) {
28272
28272
  },
28273
28273
  flowengage_page_content: async (e) => {
28274
28274
  $("flowengage_page_content ▶", e);
28275
- let r = mO(e), i = r?.url || r?.page_url || "";
28275
+ let r = hO(e), i = r?.url || r?.page_url || "";
28276
28276
  if ($("flowengage_page_content · url:", i, "siteId:", t, "apiBase:", n || "(empty)"), !i) return $("flowengage_page_content ✖ missing url"), "Missing url parameter.";
28277
28277
  if (!t) return $("flowengage_page_content ✖ no siteId"), "Site is not configured.";
28278
28278
  if (!n) return $("flowengage_page_content ✖ no api base"), "API base URL is missing; cannot fetch page content.";
@@ -28304,7 +28304,7 @@ function SO(e) {
28304
28304
  },
28305
28305
  flowengage_end_session: async () => ($("flowengage_end_session ▶"), typeof e.requestEndSession == "function" && e.requestEndSession(), "Voice session is ending."),
28306
28306
  flowengage_list_forms: async () => {
28307
- let e = XD(), t = ZD();
28307
+ let e = ZD(), t = QD();
28308
28308
  return $("flowengage_list_forms ✓", `${e.length} field(s)`, `${t.length} button(s)`), JSON.stringify({
28309
28309
  fields: e,
28310
28310
  buttons: t,
@@ -28313,52 +28313,52 @@ function SO(e) {
28313
28313
  },
28314
28314
  flowengage_fill_form: async (e) => {
28315
28315
  try {
28316
- $("flowengage_fill_form ▶ raw:", e), AD();
28317
- let t = hO(e);
28316
+ $("flowengage_fill_form ▶ raw:", e), jD();
28317
+ let t = gO(e);
28318
28318
  if (!t.length && r) {
28319
- let e = r(), n = gO(e);
28320
- n.length ? $("flowengage_fill_form · inferred URL from last user utterance (model omitted usable fields):", n) : (n = _O(e), n.length && $("flowengage_fill_form · inferred contact fields from last user utterance (empty tool params):", n)), n.length && (t = n);
28319
+ let e = r(), n = _O(e);
28320
+ n.length ? $("flowengage_fill_form · inferred URL from last user utterance (model omitted usable fields):", n) : (n = vO(e), n.length && $("flowengage_fill_form · inferred contact fields from last user utterance (empty tool params):", n)), n.length && (t = n);
28321
28321
  }
28322
28322
  if ($("flowengage_fill_form · normalized fields:", t), !t.length) return "No fields provided. Call flowengage_list_forms for field_key strings, then flowengage_fill_form with { \"fields\": [ { \"field_key\": \"<label or placeholder from list>\", \"value\": \"<user value>\" } ] }. Never use empty {}. Pass the value the user just said (email, message, name, URL) in fields.";
28323
28323
  let n = [];
28324
28324
  for (let e of t) {
28325
28325
  let t = e?.field_key ?? e?.fieldKey, r = e?.value;
28326
28326
  if (t == null || r == null) continue;
28327
- CD(`Filling ${String(t)}...`, { spinner: !0 });
28328
- let a = YD(), o = cO(a, String(t), r);
28327
+ wD(`Filling ${String(t)}...`, { spinner: !0 });
28328
+ let a = XD(), o = lO(a, String(t), r);
28329
28329
  if (o.length) {
28330
- for (let [e, t] of o.entries()) jD(t), await LD(t), bO(t, r, { skipScroll: e > 0 }), MD(t), await HD(120);
28330
+ for (let [e, t] of o.entries()) MD(t), await RD(t), xO(t, r, { skipScroll: e > 0 }), ND(t), await UD(120);
28331
28331
  i = o, n.push(String(t));
28332
28332
  continue;
28333
28333
  }
28334
- let s = dO(a, String(t));
28335
- s ||= nO(a, String(t)), s ||= rO(a, String(t), r), s && (jD(s), await LD(s), bO(s, r), MD(s), await HD(120), i = [s], n.push(String(t)));
28334
+ let s = fO(a, String(t));
28335
+ s ||= rO(a, String(t)), s ||= iO(a, String(t), r), s && (MD(s), await RD(s), xO(s, r), ND(s), await UD(120), i = [s], n.push(String(t)));
28336
28336
  }
28337
28337
  if (!n.length) return $("flowengage_fill_form ✖ no matches"), "Could not match any fields. Call flowengage_list_forms and use field_key values that match placeholder, label, name, or id (e.g. Enter Website URL). Ensure the form is on the page, not the chat panel.";
28338
28338
  let a = `OK_FILLED: ${n.join(", ")}`;
28339
- return $("flowengage_fill_form ✓", a), CD("Form filled", {
28339
+ return $("flowengage_fill_form ✓", a), wD("Form filled", {
28340
28340
  spinner: !1,
28341
28341
  icon: "✅",
28342
28342
  duration: 1100
28343
28343
  }), a;
28344
28344
  } catch (e) {
28345
28345
  let t = `flowengage_fill_form error: ${e?.message || String(e)}`;
28346
- return $("flowengage_fill_form ✖", t), CD("Failed to fill form", {
28346
+ return $("flowengage_fill_form ✖", t), wD("Failed to fill form", {
28347
28347
  spinner: !1,
28348
28348
  icon: "⚠️",
28349
28349
  duration: 1800
28350
28350
  }), t;
28351
28351
  } finally {
28352
- RD(), AD(), wD(700);
28352
+ zD(), jD(), TD(700);
28353
28353
  }
28354
28354
  },
28355
28355
  flowengage_click_button: async (e) => {
28356
- let t = mO(e), n = (t.button_text ?? t.buttonText ?? t.text ?? "").trim();
28356
+ let t = hO(e), n = (t.button_text ?? t.buttonText ?? t.text ?? "").trim();
28357
28357
  if ($("flowengage_click_button ▶", n), !n) return "Missing button_text: pass the visible label, e.g. Conduct Audit.";
28358
- let r = pO(n, i);
28358
+ let r = mO(n, i);
28359
28359
  if (!r) return $("flowengage_click_button ✖ no match"), `Could not find a button matching "${n}". Call flowengage_list_forms to see button texts.`;
28360
28360
  try {
28361
- CD(`Clicking ${n}...`, { spinner: !0 });
28361
+ wD(`Clicking ${n}...`, { spinner: !0 });
28362
28362
  try {
28363
28363
  r.scrollIntoView({
28364
28364
  block: "center",
@@ -28367,22 +28367,22 @@ function SO(e) {
28367
28367
  } catch {
28368
28368
  r.scrollIntoView(!0);
28369
28369
  }
28370
- await LD(r), r.focus?.(), await zD(r), BD(r), r.click();
28370
+ await RD(r), r.focus?.(), await BD(r), VD(r), r.click();
28371
28371
  let e = (r.textContent || r.value || r.getAttribute("aria-label") || "").trim().slice(0, 80) || "button", t = `OK_CLICK ${e}`;
28372
- return $("flowengage_click_button ✓", t), CD(`Clicked ${e}`, {
28372
+ return $("flowengage_click_button ✓", t), wD(`Clicked ${e}`, {
28373
28373
  spinner: !1,
28374
28374
  icon: "✅",
28375
28375
  duration: 1200
28376
28376
  }), t;
28377
28377
  } catch (e) {
28378
28378
  let t = `Click failed: ${e?.message || String(e)}`;
28379
- return $("flowengage_click_button ✖", t), CD("Click failed", {
28379
+ return $("flowengage_click_button ✖", t), wD("Click failed", {
28380
28380
  spinner: !1,
28381
28381
  icon: "⚠️",
28382
28382
  duration: 1800
28383
28383
  }), t;
28384
28384
  } finally {
28385
- RD(), wD(700);
28385
+ zD(), TD(700);
28386
28386
  }
28387
28387
  }
28388
28388
  };
@@ -28400,7 +28400,7 @@ function SO(e) {
28400
28400
  }
28401
28401
  //#endregion
28402
28402
  //#region src/utils/wrapVoiceToolsForLogging.js
28403
- function CO(e) {
28403
+ function wO(e) {
28404
28404
  return !e || typeof e != "object" ? e : Object.fromEntries(Object.entries(e).map(([e, t]) => [e, async (n) => {
28405
28405
  let r = mn();
28406
28406
  r ? console.log("[FlowEngage:voice-tool] ▶", e, n) : console.info(`[FlowEngage] voice tool » ${e}`);
@@ -28417,7 +28417,7 @@ function CO(e) {
28417
28417
  }
28418
28418
  //#endregion
28419
28419
  //#region src/components/FlowEngageWidget.jsx
28420
- var wO = {
28420
+ var TO = {
28421
28421
  blue: "#135bd8",
28422
28422
  red: "#ef334b",
28423
28423
  yellow: "#ffbd2e",
@@ -28425,7 +28425,7 @@ var wO = {
28425
28425
  highlight: "rgba(255,255,255,0.9)",
28426
28426
  green: "#10b981"
28427
28427
  };
28428
- function TO(e) {
28428
+ function EO(e) {
28429
28429
  if (!Array.isArray(e) || e.length < 2) return "linear-gradient(145deg, #dce8f022 0%, #e8dff522 45%, #f5e0e022 100%), #f7f8fa";
28430
28430
  let [t, n, r] = e;
28431
28431
  return e.length >= 3 && r ? [
@@ -28439,12 +28439,12 @@ function TO(e) {
28439
28439
  "#f7f8fa"
28440
28440
  ].join(", ");
28441
28441
  }
28442
- function EO(e) {
28442
+ function DO(e) {
28443
28443
  if (!e || typeof e != "string") return "#1a1a1a";
28444
28444
  let t = e.replace("#", ""), n = t.length === 3 ? t.split("").map((e) => e + e).join("") : t, r = parseInt(n.slice(0, 2), 16) / 255, i = parseInt(n.slice(2, 4), 16) / 255, a = parseInt(n.slice(4, 6), 16) / 255, o = (e) => e <= .04045 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4;
28445
28445
  return .2126 * o(r) + .7152 * o(i) + .0722 * o(a) > .179 ? "#1a1a1a" : "#ffffff";
28446
28446
  }
28447
- function DO({ logo: t, style: n }) {
28447
+ function OO({ logo: t, style: n }) {
28448
28448
  if (!t) return null;
28449
28449
  if (typeof t == "string") return /* @__PURE__ */ g("img", {
28450
28450
  src: t,
@@ -28469,7 +28469,7 @@ function DO({ logo: t, style: n }) {
28469
28469
  children: r
28470
28470
  }) : null;
28471
28471
  }
28472
- function OO({ title: e }) {
28472
+ function kO({ title: e }) {
28473
28473
  return /* @__PURE__ */ g("div", {
28474
28474
  style: {
28475
28475
  width: "100%",
@@ -28487,18 +28487,18 @@ function OO({ title: e }) {
28487
28487
  children: String(e || "FE").split(/\s+/).filter(Boolean).slice(0, 2).map((e) => e[0]?.toUpperCase() || "").join("") || "FE"
28488
28488
  });
28489
28489
  }
28490
- function kO(e, t) {
28490
+ function AO(e, t) {
28491
28491
  let n = (t || "").trim();
28492
28492
  return n ? !!(/\b(let'?s|let us)\s+(end|stop|finish|wrap up|close)\s+(the\s+)?(voice\s+)?(session|call|chat)\b/i.test(n) || /\bend\s+(this\s+)?(the\s+)?(voice\s+)?(session|call|chat)\b/i.test(n) || /\b(hang\s+up|disconnect)\b/i.test(n) || /\b(that'?s all|we'?re done)\b/i.test(n) || e === "bot" && (/\b(I'?ll|I will|Let me|I can|I'?m going to)\s+(end|close)\s+(the\s+)?(voice\s+)?(session|call)\b/i.test(n) || /\b(ending|closing)\s+(the\s+)?(voice\s+)?session\b|\bvoice\s+session\s+(is\s+)?(now\s+)?(ended|over|closing)\b/i.test(n) || /\b(session|call)\s+(is\s+)?(now\s+)?(ended|over)\b/i.test(n) || /\bwe\s+can\s+end\s+(the\s+)?(session|call)?\s*(here|now)\b/i.test(n) || /\b(wrapping\s+up|signing\s+off)\b/i.test(n)) || /^(goodbye|bye|that'?s all|we'?re done|hang up|disconnect)\b/i.test(n)) : !1;
28493
28493
  }
28494
- function AO({ orbColors: e, ...t }) {
28495
- return /* @__PURE__ */ g(vD, {
28494
+ function jO({ orbColors: e, ...t }) {
28495
+ return /* @__PURE__ */ g(yD, {
28496
28496
  colors: e,
28497
28497
  ...t
28498
28498
  });
28499
28499
  }
28500
- function jO({ copy: e, orbColors: t, primaryColor: n, onYes: r, onLater: i, isMobile: a }) {
28501
- let o = n || wO.green, s = EO(o), c = a ? 72 : 94, l = /* @__PURE__ */ _("div", {
28500
+ function MO({ copy: e, orbColors: t, primaryColor: n, onYes: r, onLater: i, isMobile: a }) {
28501
+ let o = n || TO.green, s = DO(o), c = a ? 72 : 94, l = /* @__PURE__ */ _("div", {
28502
28502
  style: {
28503
28503
  display: "flex",
28504
28504
  alignItems: "center",
@@ -28615,7 +28615,7 @@ function jO({ copy: e, orbColors: t, primaryColor: n, onYes: r, onLater: i, isMo
28615
28615
  delay: 0
28616
28616
  },
28617
28617
  style: { flexShrink: 0 },
28618
- children: /* @__PURE__ */ g(AO, {
28618
+ children: /* @__PURE__ */ g(jO, {
28619
28619
  size: c,
28620
28620
  orbColors: t
28621
28621
  })
@@ -28643,8 +28643,8 @@ function jO({ copy: e, orbColors: t, primaryColor: n, onYes: r, onLater: i, isMo
28643
28643
  children: l
28644
28644
  }) : l] });
28645
28645
  }
28646
- function MO({ copy: e, orbColors: t, primaryColor: n, onVoice: r, onText: i, onClose: a }) {
28647
- let o = n || wO.green, s = EO(o);
28646
+ function NO({ copy: e, orbColors: t, primaryColor: n, onVoice: r, onText: i, onClose: a }) {
28647
+ let o = n || TO.green, s = DO(o);
28648
28648
  return /* @__PURE__ */ _(Tp.div, {
28649
28649
  initial: {
28650
28650
  scale: 50 / 300,
@@ -28708,7 +28708,7 @@ function MO({ copy: e, orbColors: t, primaryColor: n, onVoice: r, onText: i, onC
28708
28708
  children: /* @__PURE__ */ g("polyline", { points: "6 9 12 15 18 9" })
28709
28709
  })
28710
28710
  }),
28711
- /* @__PURE__ */ g(AO, {
28711
+ /* @__PURE__ */ g(jO, {
28712
28712
  size: 82,
28713
28713
  orbColors: t
28714
28714
  }),
@@ -28777,7 +28777,7 @@ function MO({ copy: e, orbColors: t, primaryColor: n, onVoice: r, onText: i, onC
28777
28777
  ]
28778
28778
  });
28779
28779
  }
28780
- function NO({ orbColors: e, onEnterChat: t, onEndChat: n, agentId: r, siteId: i, apiBaseUrl: a, historyRef: s, onMessageSync: l }) {
28780
+ function PO({ orbColors: e, onEnterChat: t, onEndChat: n, agentId: r, siteId: i, apiBaseUrl: a, historyRef: s, onMessageSync: l }) {
28781
28781
  let [u, d] = m("idle"), [f, v] = m(!1), [y, b] = m(!1), x = p(null), S = p(""), C = p(async () => {}), w = p(!1), T = p(!1), ee = p(!1), te = p(!1), ne = p("minimized"), re = p(null), E = o((e = "minimized") => {
28782
28782
  ne.current = e, te.current = !0, queueMicrotask(() => {
28783
28783
  w.current || (w.current = !0, C.current?.());
@@ -28800,8 +28800,8 @@ function NO({ orbColors: e, onEnterChat: t, onEndChat: n, agentId: r, siteId: i,
28800
28800
  }
28801
28801
  try {
28802
28802
  if ((await navigator.mediaDevices.getUserMedia({ audio: !0 })).getTracks().forEach((e) => e.stop()), e) return;
28803
- s.current = [], S.current = "", w.current = !1, ee.current = !1, te.current = !1, ne.current = "minimized", OE(!0), AE();
28804
- let t = CO(SO({
28803
+ s.current = [], S.current = "", w.current = !1, ee.current = !1, te.current = !1, ne.current = "minimized", kE(!0), jE();
28804
+ let t = wO(CO({
28805
28805
  siteId: i || null,
28806
28806
  apiBaseUrl: a || null,
28807
28807
  getLastUserVoiceText: () => S.current,
@@ -28813,16 +28813,16 @@ function NO({ orbColors: e, onEnterChat: t, onEndChat: n, agentId: r, siteId: i,
28813
28813
  clientTools: t,
28814
28814
  onUnhandledClientToolCall: (e) => console.error("[FlowEngage] Unhandled tool:", e?.tool_name),
28815
28815
  onModeChange: ({ mode: t }) => {
28816
- e || (d(t === "speaking" ? "speaking" : "listening"), t === "speaking" ? wE() : TE());
28816
+ e || (d(t === "speaking" ? "speaking" : "listening"), t === "speaking" ? TE() : EE());
28817
28817
  },
28818
28818
  onMessage: (t) => {
28819
28819
  if (e) return;
28820
28820
  let n = t.role === "user" ? "user" : "bot", r = t.message || t.text || t.content || "";
28821
- r && (n === "user" && (S.current = r, AE(), IE()), n === "bot" && (RE(r, !0), EE(r.trim().split(/\s+/).length)), s.current = [...s.current, {
28821
+ r && (n === "user" && (S.current = r, jE(), LE()), n === "bot" && (zE(r, !0), DE(r.trim().split(/\s+/).length)), s.current = [...s.current, {
28822
28822
  sender: n,
28823
28823
  message: r,
28824
28824
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
28825
- }], kO(n, r) && E("minimized"));
28825
+ }], AO(n, r) && E("minimized"));
28826
28826
  },
28827
28827
  onError: (t) => {
28828
28828
  if (!e && !te.current && !ee.current) {
@@ -28847,7 +28847,7 @@ function NO({ orbColors: e, onEnterChat: t, onEndChat: n, agentId: r, siteId: i,
28847
28847
  try {
28848
28848
  x.current?.setMicMuted?.(!0);
28849
28849
  } catch {}
28850
- v(!0), AE(), IE(), OE(!1), E("chat");
28850
+ v(!0), jE(), LE(), kE(!1), E("chat");
28851
28851
  }
28852
28852
  }
28853
28853
  });
@@ -28909,7 +28909,7 @@ function NO({ orbColors: e, onEnterChat: t, onEndChat: n, agentId: r, siteId: i,
28909
28909
  whiteSpace: "nowrap"
28910
28910
  },
28911
28911
  children: "Listening..."
28912
- }), /* @__PURE__ */ g(AO, {
28912
+ }), /* @__PURE__ */ g(jO, {
28913
28913
  size: 94,
28914
28914
  voiceState: u,
28915
28915
  isMuted: f,
@@ -29151,7 +29151,7 @@ function NO({ orbColors: e, onEnterChat: t, onEndChat: n, agentId: r, siteId: i,
29151
29151
  ]
29152
29152
  }) });
29153
29153
  }
29154
- function PO({ orbColors: e }) {
29154
+ function FO({ orbColors: e }) {
29155
29155
  return /* @__PURE__ */ g("div", {
29156
29156
  style: {
29157
29157
  flexShrink: 0,
@@ -29161,13 +29161,13 @@ function PO({ orbColors: e }) {
29161
29161
  alignItems: "center",
29162
29162
  justifyContent: "center"
29163
29163
  },
29164
- children: /* @__PURE__ */ g(AO, {
29164
+ children: /* @__PURE__ */ g(jO, {
29165
29165
  size: 36,
29166
29166
  orbColors: e
29167
29167
  })
29168
29168
  });
29169
29169
  }
29170
- var FO = () => /* @__PURE__ */ g("div", {
29170
+ var IO = () => /* @__PURE__ */ g("div", {
29171
29171
  style: {
29172
29172
  display: "flex",
29173
29173
  marginBottom: "12px",
@@ -29197,7 +29197,7 @@ var FO = () => /* @__PURE__ */ g("div", {
29197
29197
  } }, e))
29198
29198
  })
29199
29199
  });
29200
- function IO({ copy: e, orbColors: t, primaryColor: n, chatBgGradient: r, logo: i, quickChatOptions: a, onQuickChatSelect: o, isMobile: s, chatHistory: l, isAiTyping: u, isAgentTyping: d, activeScreen: f, agentName: h, agentHeadshot: v, fallbackAgentName: y, input: b, setInput: x, onSubmit: S, isConversationEnded: C, isLoading: w, isRateLimited: T, rateLimitMessage: ee, selectedFile: te, onFileSelect: ne, onRemoveSelectedFile: re, attachmentError: E, isUploadingAttachment: ie, requiresEmail: ae, emailInput: oe, setEmailInput: se, emailError: ce, replyContext: le, setReplyContext: ue, webRTCError: de, micError: fe, setMicError: pe, dismissCallError: me, incomingCall: he, rejectCall: ge, acceptCall: _e, activeCallId: ve, callConnectionState: ye, isCallMuted: be, toggleCallMute: xe, endWebRTCCall: Se, formatCallDuration: Ce, callDurationSeconds: we, onCollapse: Te, onStartVoice: Ee, showPoweredBy: De }) {
29200
+ function LO({ copy: e, orbColors: t, primaryColor: n, chatBgGradient: r, logo: i, quickChatOptions: a, onQuickChatSelect: o, isMobile: s, chatHistory: l, isAiTyping: u, isAgentTyping: d, activeScreen: f, agentName: h, agentHeadshot: v, fallbackAgentName: y, input: b, setInput: x, onSubmit: S, isConversationEnded: C, isLoading: w, isRateLimited: T, rateLimitMessage: ee, selectedFile: te, onFileSelect: ne, onRemoveSelectedFile: re, attachmentError: E, isUploadingAttachment: ie, requiresEmail: ae, emailInput: oe, setEmailInput: se, emailError: ce, replyContext: le, setReplyContext: ue, webRTCError: de, micError: fe, setMicError: pe, dismissCallError: me, incomingCall: he, rejectCall: ge, acceptCall: _e, activeCallId: ve, callConnectionState: ye, isCallMuted: be, toggleCallMute: xe, endWebRTCCall: Se, formatCallDuration: Ce, callDurationSeconds: we, onCollapse: Te, onStartVoice: Ee, showPoweredBy: De }) {
29201
29201
  let Oe = l.length > 0, ke = w || T || C, Ae = !!(he || ve), [je, Me] = m(!1), Ne = p(null);
29202
29202
  return c(() => {
29203
29203
  if (!je) return;
@@ -29299,7 +29299,7 @@ function IO({ copy: e, orbColors: t, primaryColor: n, chatBgGradient: r, logo: i
29299
29299
  justifyContent: "center",
29300
29300
  height: "40px"
29301
29301
  },
29302
- children: i ? /* @__PURE__ */ g(DO, {
29302
+ children: i ? /* @__PURE__ */ g(OO, {
29303
29303
  logo: i,
29304
29304
  style: {
29305
29305
  height: "34px",
@@ -29312,7 +29312,7 @@ function IO({ copy: e, orbColors: t, primaryColor: n, chatBgGradient: r, logo: i
29312
29312
  height: "40px",
29313
29313
  flexShrink: 0
29314
29314
  },
29315
- children: /* @__PURE__ */ g(OO, { title: e.chatTitle })
29315
+ children: /* @__PURE__ */ g(kO, { title: e.chatTitle })
29316
29316
  })
29317
29317
  }), /* @__PURE__ */ g("div", {
29318
29318
  style: {
@@ -29498,7 +29498,7 @@ function IO({ copy: e, orbColors: t, primaryColor: n, chatBgGradient: r, logo: i
29498
29498
  })
29499
29499
  ]
29500
29500
  }),
29501
- /* @__PURE__ */ g(lD, {
29501
+ /* @__PURE__ */ g(uD, {
29502
29502
  webRTCError: de,
29503
29503
  micError: fe,
29504
29504
  setMicError: pe,
@@ -29526,16 +29526,16 @@ function IO({ copy: e, orbColors: t, primaryColor: n, chatBgGradient: r, logo: i
29526
29526
  minHeight: 0,
29527
29527
  background: "transparent"
29528
29528
  },
29529
- children: Oe ? /* @__PURE__ */ g(aD, {
29529
+ children: Oe ? /* @__PURE__ */ g(oD, {
29530
29530
  chatHistory: l,
29531
29531
  isAiTyping: u,
29532
29532
  isAgentTyping: d,
29533
29533
  setReplyContext: ue,
29534
- TypingDots: FO,
29534
+ TypingDots: IO,
29535
29535
  primaryColor: n,
29536
29536
  agentHeadshot: v,
29537
29537
  agentDisplayName: h || y,
29538
- botAvatarNode: /* @__PURE__ */ g(PO, { orbColors: t })
29538
+ botAvatarNode: /* @__PURE__ */ g(FO, { orbColors: t })
29539
29539
  }) : /* @__PURE__ */ _("div", {
29540
29540
  style: {
29541
29541
  flex: 1,
@@ -29548,7 +29548,7 @@ function IO({ copy: e, orbColors: t, primaryColor: n, chatBgGradient: r, logo: i
29548
29548
  padding: "28px 24px"
29549
29549
  },
29550
29550
  children: [
29551
- /* @__PURE__ */ g(AO, {
29551
+ /* @__PURE__ */ g(jO, {
29552
29552
  size: 94,
29553
29553
  orbColors: t
29554
29554
  }),
@@ -29606,7 +29606,7 @@ function IO({ copy: e, orbColors: t, primaryColor: n, chatBgGradient: r, logo: i
29606
29606
  zIndex: 1,
29607
29607
  padding: ae ? "6px 0 0" : "12px 0 0"
29608
29608
  },
29609
- children: /* @__PURE__ */ g(oD, {
29609
+ children: /* @__PURE__ */ g(sD, {
29610
29610
  input: b,
29611
29611
  setInput: x,
29612
29612
  onSubmit: S,
@@ -29656,7 +29656,7 @@ function IO({ copy: e, orbColors: t, primaryColor: n, chatBgGradient: r, logo: i
29656
29656
  ]
29657
29657
  });
29658
29658
  }
29659
- function LO() {
29659
+ function RO() {
29660
29660
  let { status: e, runtimeConfig: t, resolvedConfig: n, chatHistory: r, isOpen: i, activeScreen: a, isHumanHandled: s, agentName: l, agentHeadshot: u, visitorEmail: h, isAgentTyping: v, isAiTyping: y, isLoading: b, isRateLimited: x, rateLimitMessage: S, isConversationEnded: C, incomingCall: w, activeCallId: T, callConnectionState: ee, callConnectedAt: te, isCallMuted: ne, webRTCError: re, language: E, historyRef: ie, onMessageSync: ae, sendMessage: oe, uploadChatFile: se, openWidget: ce, captureVisitorEmail: le, setVoiceMode: ue, endConversation: de, acceptCall: fe, rejectCall: pe, endWebRTCCall: me, toggleCallMute: he, dismissCallError: ge, startTyping: _e, stopTyping: ve, updateTypingDraft: ye } = pn();
29661
29661
  c(() => {
29662
29662
  try {
@@ -29669,7 +29669,7 @@ function LO() {
29669
29669
  }, Ce = {
29670
29670
  ...be.theme || {},
29671
29671
  ...xe.theme || {}
29672
- }, we = Array.isArray(Ce.orbColors) && Ce.orbColors.length > 0 ? Ce.orbColors : null, Te = we?.[0] || Ce.primaryColor || "#3B82F6", Ee = Ce.position || "bottom-right", De = Se.fallbackAgentName || "Agent", Oe = TO(we ?? Ce.chatBgColors), ke = Se.logo || Se.logoUrl || null, Ae = E || "en", je = be.recommendations?.[Ae] || [], Me = (xe.recommendations?.[Ae] ?? je).filter((e) => String(e?.label ?? "").trim()).map((e, t) => ({
29672
+ }, we = Array.isArray(Ce.orbColors) && Ce.orbColors.length > 0 ? Ce.orbColors : null, Te = we?.[0] || Ce.primaryColor || "#3B82F6", Ee = Ce.position || "bottom-right", De = Se.fallbackAgentName || "Agent", Oe = EO(we ?? Ce.chatBgColors), ke = Se.logo || Se.logoUrl || null, Ae = E || "en", je = be.recommendations?.[Ae] || [], Me = (xe.recommendations?.[Ae] ?? je).filter((e) => String(e?.label ?? "").trim()).map((e, t) => ({
29673
29673
  id: e.key || `qr-${t}`,
29674
29674
  label: e.label,
29675
29675
  message: e.label,
@@ -29706,7 +29706,7 @@ function LO() {
29706
29706
  let pt = o(() => {
29707
29707
  it(null), ot("");
29708
29708
  }, []), mt = o((e) => {
29709
- let t = eD(e);
29709
+ let t = tD(e);
29710
29710
  if (t) {
29711
29711
  it(null), ot(t);
29712
29712
  return;
@@ -29790,7 +29790,7 @@ function LO() {
29790
29790
  if (rt) {
29791
29791
  try {
29792
29792
  ct(!0), ot("");
29793
- let e = await se(rt), n = e?.data || e, r = Je.trim() || `Shared file: ${nD(rt)}`;
29793
+ let e = await se(rt), n = e?.data || e, r = Je.trim() || `Shared file: ${rD(rt)}`;
29794
29794
  O(""), A(null), pt(), await oe(r, "", t, {
29795
29795
  type: "file",
29796
29796
  metadata: {
@@ -29841,7 +29841,7 @@ function LO() {
29841
29841
  ...yt
29842
29842
  },
29843
29843
  children: [
29844
- Ke === "entry_prompt" && /* @__PURE__ */ g(jO, {
29844
+ Ke === "entry_prompt" && /* @__PURE__ */ g(MO, {
29845
29845
  copy: Le,
29846
29846
  orbColors: we,
29847
29847
  primaryColor: Te,
@@ -29862,13 +29862,13 @@ function LO() {
29862
29862
  transformOrigin: "bottom right",
29863
29863
  display: "inline-block"
29864
29864
  },
29865
- children: /* @__PURE__ */ g(AO, {
29865
+ children: /* @__PURE__ */ g(jO, {
29866
29866
  size: 50,
29867
29867
  orbColors: we,
29868
29868
  onClick: xt
29869
29869
  })
29870
29870
  }),
29871
- Ke === "connection_modal" && /* @__PURE__ */ g(MO, {
29871
+ Ke === "connection_modal" && /* @__PURE__ */ g(NO, {
29872
29872
  copy: Le,
29873
29873
  orbColors: we,
29874
29874
  primaryColor: Te,
@@ -29876,7 +29876,7 @@ function LO() {
29876
29876
  onText: Ct,
29877
29877
  onClose: bt
29878
29878
  }),
29879
- Ke === "voice_mode" && /* @__PURE__ */ g(NO, {
29879
+ Ke === "voice_mode" && /* @__PURE__ */ g(PO, {
29880
29880
  orbColors: we,
29881
29881
  onEnterChat: Ct,
29882
29882
  onEndChat: wt,
@@ -29886,7 +29886,7 @@ function LO() {
29886
29886
  historyRef: ie,
29887
29887
  onMessageSync: ae
29888
29888
  }, "voice"),
29889
- Ke === "text_chat" && /* @__PURE__ */ g(IO, {
29889
+ Ke === "text_chat" && /* @__PURE__ */ g(LO, {
29890
29890
  copy: Le,
29891
29891
  orbColors: we,
29892
29892
  primaryColor: Te,
@@ -29944,4 +29944,4 @@ function LO() {
29944
29944
  });
29945
29945
  }
29946
29946
  //#endregion
29947
- export { vD as AnimatedOrb, In as FlowEngageProvider, LO as FlowEngageWidget, pn as useFlowEngage };
29947
+ export { yD as AnimatedOrb, In as FlowEngageProvider, RO as FlowEngageWidget, pn as useFlowEngage };