@flowengage/react-chatbot 8.0.105 → 8.0.106

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.
@@ -18,7 +18,7 @@ var v = Object.defineProperty, y = Object.getOwnPropertyDescriptor, b = Object.g
18
18
  }, T = (e) => x.call(e, "module.exports") ? e["module.exports"] : w(v({}, "__esModule", { value: !0 }), e), E = (e) => {
19
19
  if (!e || typeof e != "object") throw Error("FlowEngage config is required");
20
20
  if (!e.siteId || typeof e.siteId != "string") throw Error("[FlowEngage] config.siteId is required. Pass it as <FlowEngageProvider siteId=\"your-site-id\" /> or config={{ siteId: 'your-site-id' }}.");
21
- let t = (e.apiBaseUrl || "http://localhost:5008").replace(/\/+$/, "");
21
+ let t = (e.apiBaseUrl || "https://be-flowengage-dev.oslabs.app").replace(/\/+$/, "");
22
22
  return {
23
23
  siteId: e.siteId.trim(),
24
24
  apiBaseUrl: t
@@ -12938,7 +12938,11 @@ function o_(e) {
12938
12938
  }
12939
12939
  //#endregion
12940
12940
  //#region src/components/FlowEngageWidget.jsx
12941
- var s_ = {
12941
+ var s_ = "[PAGE_CONTEXT]";
12942
+ function c_(e, t, n) {
12943
+ return `${s_} SESSION_CONTEXT (NOT a tool result — do NOT treat as CURRENT_PAGE): Visitor is on: ${e} | Approx headings for awareness only: ${t || ""}. ${n ? `Forms: ${n}. ` : ""}The visitor is ALREADY on this page — do NOT offer to navigate there.`;
12944
+ }
12945
+ var l_ = {
12942
12946
  blue: "#135bd8",
12943
12947
  red: "#ef334b",
12944
12948
  yellow: "#ffbd2e",
@@ -12946,7 +12950,7 @@ var s_ = {
12946
12950
  highlight: "rgba(255,255,255,0.9)",
12947
12951
  green: "#10b981"
12948
12952
  };
12949
- function c_(e) {
12953
+ function u_(e) {
12950
12954
  if (!Array.isArray(e) || e.length < 2) return "linear-gradient(145deg, #dce8f022 0%, #e8dff522 45%, #f5e0e022 100%), #f7f8fa";
12951
12955
  let [t, n, r] = e;
12952
12956
  return e.length >= 3 && r ? [
@@ -12960,12 +12964,12 @@ function c_(e) {
12960
12964
  "#f7f8fa"
12961
12965
  ].join(", ");
12962
12966
  }
12963
- function l_(e) {
12967
+ function d_(e) {
12964
12968
  if (!e || typeof e != "string") return "#1a1a1a";
12965
12969
  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;
12966
12970
  return .2126 * o(r) + .7152 * o(i) + .0722 * o(a) > .179 ? "#1a1a1a" : "#ffffff";
12967
12971
  }
12968
- function u_(t) {
12972
+ function f_(t) {
12969
12973
  let [n, r] = e.useState(null), i = typeof t == "string" ? t.trim() : "";
12970
12974
  return e.useEffect(() => {
12971
12975
  if (!i) {
@@ -12983,8 +12987,8 @@ function u_(t) {
12983
12987
  };
12984
12988
  }, [i]), n;
12985
12989
  }
12986
- function d_({ logo: t, style: n }) {
12987
- let r = u_(typeof t == "string" ? t : null);
12990
+ function p_({ logo: t, style: n }) {
12991
+ let r = f_(typeof t == "string" ? t : null);
12988
12992
  if (!t) return null;
12989
12993
  if (typeof t == "string") return r ? /* @__PURE__ */ g("img", {
12990
12994
  src: r,
@@ -13009,7 +13013,7 @@ function d_({ logo: t, style: n }) {
13009
13013
  children: i
13010
13014
  }) : null;
13011
13015
  }
13012
- function f_({ title: e }) {
13016
+ function m_({ title: e }) {
13013
13017
  return /* @__PURE__ */ g("div", {
13014
13018
  style: {
13015
13019
  width: "100%",
@@ -13027,18 +13031,18 @@ function f_({ title: e }) {
13027
13031
  children: String(e || "FE").split(/\s+/).filter(Boolean).slice(0, 2).map((e) => e[0]?.toUpperCase() || "").join("") || "FE"
13028
13032
  });
13029
13033
  }
13030
- function p_(e, t) {
13034
+ function h_(e, t) {
13031
13035
  let n = (t || "").trim();
13032
13036
  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) || e === "bot" && (/\b(that'?s all|we'?re done)\b/i.test(n) || /\b(goodbye|bye)\b/i.test(n) || /\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))) : !1;
13033
13037
  }
13034
- function m_({ orbColors: e, ...t }) {
13038
+ function g_({ orbColors: e, ...t }) {
13035
13039
  return /* @__PURE__ */ g(cg, {
13036
13040
  colors: e,
13037
13041
  ...t
13038
13042
  });
13039
13043
  }
13040
- function h_({ copy: e, orbColors: t, primaryColor: n, onYes: r, onLater: i, isMobile: a, isClosing: o }) {
13041
- let s = n || s_.green, c = l_(s), l = a ? 72 : 94, u = /* @__PURE__ */ _("div", {
13044
+ function __({ copy: e, orbColors: t, primaryColor: n, onYes: r, onLater: i, isMobile: a, isClosing: o }) {
13045
+ let s = n || l_.green, c = d_(s), l = a ? 72 : 94, u = /* @__PURE__ */ _("div", {
13042
13046
  style: {
13043
13047
  display: "flex",
13044
13048
  alignItems: a ? "flex-end" : "center",
@@ -13164,7 +13168,7 @@ function h_({ copy: e, orbColors: t, primaryColor: n, onYes: r, onLater: i, isMo
13164
13168
  delay: 0
13165
13169
  },
13166
13170
  style: { flexShrink: 0 },
13167
- children: /* @__PURE__ */ g(m_, {
13171
+ children: /* @__PURE__ */ g(g_, {
13168
13172
  size: l,
13169
13173
  orbColors: t
13170
13174
  })
@@ -13196,8 +13200,8 @@ function h_({ copy: e, orbColors: t, primaryColor: n, onYes: r, onLater: i, isMo
13196
13200
  children: u
13197
13201
  })] });
13198
13202
  }
13199
- function g_({ copy: e, orbColors: t, primaryColor: n, onVoice: r, onText: i, onClose: a, isMobile: o, isClosing: s }) {
13200
- let c = n || s_.green, l = l_(c);
13203
+ function v_({ copy: e, orbColors: t, primaryColor: n, onVoice: r, onText: i, onClose: a, isMobile: o, isClosing: s }) {
13204
+ let c = n || l_.green, l = d_(c);
13201
13205
  return /* @__PURE__ */ _(eh.div, {
13202
13206
  initial: {
13203
13207
  scale: 50 / 350,
@@ -13268,7 +13272,7 @@ function g_({ copy: e, orbColors: t, primaryColor: n, onVoice: r, onText: i, onC
13268
13272
  children: /* @__PURE__ */ g("polyline", { points: "6 9 12 15 18 9" })
13269
13273
  })
13270
13274
  }),
13271
- /* @__PURE__ */ g(m_, {
13275
+ /* @__PURE__ */ g(g_, {
13272
13276
  size: 72,
13273
13277
  orbColors: t
13274
13278
  }),
@@ -13348,7 +13352,7 @@ function g_({ copy: e, orbColors: t, primaryColor: n, onVoice: r, onText: i, onC
13348
13352
  ]
13349
13353
  });
13350
13354
  }
13351
- function __({ orbColors: e, onEnterChat: t, onEndChat: n, agentId: r, siteId: i, apiBaseUrl: a, chatId: s, historyRef: l, onMessageSync: u, voiceEndCounter: d, websiteName: f, voiceFirstMessage: h, captureVisitorEmail: v, emailRequired: y, emailCaptureEnabled: b = !0, listeningLabel: x = "Listening...", thinkingLabel: S = "Thinking...", enterChatModeLabel: C = "Enter Chat Mode", endConversationLabel: w = "End Conversation" }) {
13355
+ function y_({ orbColors: e, onEnterChat: t, onEndChat: n, agentId: r, siteId: i, apiBaseUrl: a, chatId: s, historyRef: l, onMessageSync: u, voiceEndCounter: d, websiteName: f, voiceFirstMessage: h, captureVisitorEmail: v, emailRequired: y, emailCaptureEnabled: b = !0, listeningLabel: x = "Listening...", thinkingLabel: S = "Thinking...", enterChatModeLabel: C = "Enter Chat Mode", endConversationLabel: w = "End Conversation" }) {
13352
13356
  c(() => (console.log("[FlowEngage:VoiceDebug] 🔵 VoiceMode MOUNTED"), () => console.log("[FlowEngage:VoiceDebug] 🔴 VoiceMode UNMOUNTED")), []);
13353
13357
  let [T, E] = m("idle"), [D, O] = m(!1), [k, A] = m(!1), [ee, te] = m(!1), [ne, j] = m(""), [M, re] = m(""), ie = p(!1), ae = p(!1), N = p(null), oe = p(0), se = p(""), ce = p(!1), le = p(0), ue = p(!1), de = p(!1), fe = p(!1), pe = p([]), me = p(null), he = (e) => {
13354
13358
  ue.current = e, e || (de.current = !1), P.current?.setWalkthroughActive?.(e);
@@ -13631,7 +13635,7 @@ function __({ orbColors: e, onEnterChat: t, onEndChat: n, agentId: r, siteId: i,
13631
13635
  let e = _g(l.current);
13632
13636
  e && I(i, e);
13633
13637
  } catch {}
13634
- if (p_(a, o)) {
13638
+ if (h_(a, o)) {
13635
13639
  je.current = !0;
13636
13640
  return;
13637
13641
  }
@@ -13691,7 +13695,7 @@ function __({ orbColors: e, onEnterChat: t, onEndChat: n, agentId: r, siteId: i,
13691
13695
  n.length || (n = Array.from(document.body.querySelectorAll("h1, h2, h3")).filter((t) => !t.closest(e)).map((e) => e.textContent.replace(/\s+/g, " ").trim()).filter((e) => e.length > 2 && e.length < 200)), n.length && (o = [...new Set(n)].slice(0, 15).join(" | "));
13692
13696
  } catch {}
13693
13697
  let s = r && !p ? `RESUMING PRIOR SESSION — DO NOT GREET. The visitor is continuing the same conversation after a page reload. Do not introduce yourself or re-state your capabilities. Wait silently until the visitor speaks; if you must speak first, briefly acknowledge where you left off in one short sentence.\nPrior transcript:\n${n?.transcript || ""}\n\n` : "";
13694
- ze.sendContextualUpdate(`${s}SESSION_CONTEXT (NOT a tool result — do NOT treat as CURRENT_PAGE): Visitor is on: ${e} | Approx headings for awareness only: ${o}. SiteId: ${i || "unknown"}. Forms: ${a}. ${y ? "" : "Visitor's email is already on file from a prior session — do NOT ask for it again. "}The visitor is ALREADY on this page — do NOT offer to navigate there. WALKTHROUGH RULE: When the visitor asks for a walkthrough or overview of this page, you MUST IMMEDIATELY call fwh-get-current-page-mvp (zero speech — call it silently with NO words before it) to get the exact highlightable headings. The approximate headings above are for routing awareness ONLY — they are NOT precise enough for fwh-highlight-mvp. Do NOT skip fwh-get-current-page-mvp. Voice: call end_voice_session or say you are ending the session to stop.`);
13698
+ ze.sendContextualUpdate(`${s}SiteId: ${i || "unknown"}. ${y ? "" : "Visitor's email is already on file from a prior session — do NOT ask for it again. "}WALKTHROUGH RULE: When the visitor asks for a walkthrough or overview of this page, you MUST IMMEDIATELY call fwh-get-current-page-mvp (zero speech — call it silently with NO words before it) to get the exact highlightable headings. Do NOT skip fwh-get-current-page-mvp. Voice: call end_voice_session or say you are ending the session to stop.`), ze.sendContextualUpdate(c_(e, o, a));
13695
13699
  } catch {}
13696
13700
  if (typeof window < "u") {
13697
13701
  let t = window.location.pathname, n = Date.now(), r = (e) => {
@@ -13720,23 +13724,29 @@ function __({ orbColors: e, onEnterChat: t, onEndChat: n, agentId: r, siteId: i,
13720
13724
  try {
13721
13725
  On();
13722
13726
  } catch {}
13723
- let d = (e) => (e.split("/").filter(Boolean).pop() || "").replace(/[-_]/g, " ").replace(/\b\w/g, (e) => e.toUpperCase()) || "Home", f = d(s), p = d(i);
13727
+ let d = u.map((e) => e.text).join(" | "), f = (e) => (e.split("/").filter(Boolean).pop() || "").replace(/[-_]/g, " ").replace(/\b\w/g, (e) => e.toUpperCase()) || "Home", p = f(s), m = f(i);
13724
13728
  if (o) {
13725
13729
  typeof window < "u" && (window.__fe_agent_nav = null), console.log(`[FlowEngage] agent-driven navigation settled: "${s}" → "${i}"`);
13726
13730
  try {
13727
- P.current?.sendUserMessage?.(`[SYSTEM: YOU just navigated the visitor to the "${p}" page (${c}) at their request — this was YOUR action, not theirs. Page title: "${l}". Sections: ${JSON.stringify(u)}. Say: "Here we are on the ${p} page." Then introduce this page in 2-3 sentences, and finish by asking: "Would you like me to walk you through it section by section?" NEVER say "I see you've navigated" — the visitor did not navigate, you did. Do NOT call fwh-navigate-mvp again. Wait for their answer before describing sections.]`, { suppressQuestion: !0 });
13731
+ P.current?.sendUserMessage?.(`[SYSTEM: YOU just navigated the visitor to the "${m}" page (${c}) at their request — this was YOUR action, not theirs. Page title: "${l}". Sections: ${JSON.stringify(u)}. Say: "Here we are on the ${m} page." Then introduce this page in 2-3 sentences, and finish by asking: "Would you like me to walk you through it section by section?" NEVER say "I see you've navigated" — the visitor did not navigate, you did. Do NOT call fwh-navigate-mvp again. Wait for their answer before describing sections.]`, { suppressQuestion: !0 });
13732
+ } catch {}
13733
+ try {
13734
+ P.current?.sendContextualUpdate?.(c_(c, d));
13728
13735
  } catch {}
13729
13736
  return;
13730
13737
  }
13731
13738
  typeof window < "u" && (window.__fe_user_nav_during_speech = {
13732
13739
  fromPath: s,
13733
13740
  toPath: i,
13734
- fromPageName: f,
13735
- toPageName: p,
13741
+ fromPageName: p,
13742
+ toPageName: m,
13736
13743
  ts: Date.now()
13737
13744
  }), console.log(`[FlowEngage] visitor navigation detected: "${s}" → "${i}" (agent target: ${k || "none"})`);
13738
13745
  try {
13739
- P.current?.sendUserMessage?.(`[SYSTEM: I navigated away mid-walkthrough — I am now on the "${p}" page (${c}). Page title: "${l}". Sections: ${JSON.stringify(u)}. STOP everything. Do NOT describe the new page. Say EXACTLY: "I see you've navigated to the ${p} page — would you like me to continue what I was explaining, or shall I walk you through this page?" Then wait for my answer. IF I say continue/yes/carry on: resume speaking verbally from where you left off — do NOT call fwh-navigate-mvp, do NOT call fwh-highlight-mvp, the visitor will navigate themselves if needed. IF I want to hear about this page: call fwh-highlight-mvp for sections of "${p}" only.]`);
13746
+ P.current?.sendUserMessage?.(`[SYSTEM: I navigated away mid-walkthrough — I am now on the "${m}" page (${c}). Page title: "${l}". Sections: ${JSON.stringify(u)}. STOP everything. Do NOT describe the new page. Say EXACTLY: "I see you've navigated to the ${m} page — would you like me to continue what I was explaining, or shall I walk you through this page?" Then wait for my answer. IF I say continue/yes/carry on: resume speaking verbally from where you left off — do NOT call fwh-navigate-mvp, do NOT call fwh-highlight-mvp, the visitor will navigate themselves if needed. IF I want to hear about this page: call fwh-highlight-mvp for sections of "${m}" only.]`);
13747
+ } catch {}
13748
+ try {
13749
+ P.current?.sendContextualUpdate?.(c_(c, d));
13740
13750
  } catch {}
13741
13751
  };
13742
13752
  c = window.history.pushState.bind(window.history), window.history.pushState = (...e) => {
@@ -13948,7 +13958,7 @@ function __({ orbColors: e, onEnterChat: t, onEndChat: n, agentId: r, siteId: i,
13948
13958
  },
13949
13959
  children: "Muted"
13950
13960
  }),
13951
- /* @__PURE__ */ g(m_, {
13961
+ /* @__PURE__ */ g(g_, {
13952
13962
  size: 72,
13953
13963
  voiceState: T,
13954
13964
  isMuted: D,
@@ -14172,7 +14182,7 @@ function __({ orbColors: e, onEnterChat: t, onEndChat: n, agentId: r, siteId: i,
14172
14182
  ]
14173
14183
  });
14174
14184
  }
14175
- function v_({ orbColors: e }) {
14185
+ function b_({ orbColors: e }) {
14176
14186
  let t = Array.isArray(e) && e.length > 0 ? e : [
14177
14187
  "#135bd8",
14178
14188
  "#ef334b",
@@ -14191,7 +14201,7 @@ function v_({ orbColors: e }) {
14191
14201
  `.replace(/\s+/g, " ").trim()
14192
14202
  } });
14193
14203
  }
14194
- var y_ = () => /* @__PURE__ */ g("div", {
14204
+ var x_ = () => /* @__PURE__ */ g("div", {
14195
14205
  style: {
14196
14206
  display: "flex",
14197
14207
  marginBottom: "12px",
@@ -14221,7 +14231,7 @@ var y_ = () => /* @__PURE__ */ g("div", {
14221
14231
  } }, e))
14222
14232
  })
14223
14233
  });
14224
- function b_({ 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: v, agentHeadshot: y, fallbackAgentName: b, input: x, setInput: S, onSubmit: C, isConversationEnded: w, isLoading: T, isRateLimited: E, rateLimitMessage: D, selectedFile: O, onFileSelect: k, onRemoveSelectedFile: A, attachmentError: ee, isUploadingAttachment: te, requiresEmail: ne, emailInput: j, setEmailInput: M, emailError: re, emailCaptureSuccess: ie, replyContext: ae, setReplyContext: N, webRTCError: oe, micError: se, setMicError: ce, dismissCallError: le, activeCallId: ue, isCallMuted: de, toggleCallMute: fe, endWebRTCCall: pe, formatCallDuration: me, callDurationSeconds: he, isCallMinimized: ge, onExpand: P, onCollapse: _e, onStartVoice: ve, voiceEnabled: ye, headerBgColor: be, onNewChat: F, showPoweredBy: xe, privacyPolicyUrl: I, getVisitorChatHistory: Se, resumeChat: Ce, isSessionRestoring: L, isClosing: we }) {
14234
+ function S_({ 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: v, agentHeadshot: y, fallbackAgentName: b, input: x, setInput: S, onSubmit: C, isConversationEnded: w, isLoading: T, isRateLimited: E, rateLimitMessage: D, selectedFile: O, onFileSelect: k, onRemoveSelectedFile: A, attachmentError: ee, isUploadingAttachment: te, requiresEmail: ne, emailInput: j, setEmailInput: M, emailError: re, emailCaptureSuccess: ie, replyContext: ae, setReplyContext: N, webRTCError: oe, micError: se, setMicError: ce, dismissCallError: le, activeCallId: ue, isCallMuted: de, toggleCallMute: fe, endWebRTCCall: pe, formatCallDuration: me, callDurationSeconds: he, isCallMinimized: ge, onExpand: P, onCollapse: _e, onStartVoice: ve, voiceEnabled: ye, headerBgColor: be, onNewChat: F, showPoweredBy: xe, privacyPolicyUrl: I, getVisitorChatHistory: Se, resumeChat: Ce, isSessionRestoring: L, isClosing: we }) {
14225
14235
  let Te = l.length > 0, Ee = T || E || w, De = !!ue, [Oe, ke] = m(!1), [Ae, je] = m(!1), [Me, R] = m([]), [z, Ne] = m(!1), Pe = p(null), [Fe, B] = m(() => typeof window < "u" ? window.visualViewport?.height ?? window.innerHeight : 600), [V, Ie] = m(0);
14226
14236
  c(() => {
14227
14237
  if (!s) return;
@@ -14361,7 +14371,7 @@ function b_({ copy: e, orbColors: t, primaryColor: n, chatBgGradient: r, logo: i
14361
14371
  justifyContent: "center",
14362
14372
  height: "40px"
14363
14373
  },
14364
- children: i ? /* @__PURE__ */ g(d_, {
14374
+ children: i ? /* @__PURE__ */ g(p_, {
14365
14375
  logo: i,
14366
14376
  style: {
14367
14377
  height: "34px",
@@ -14374,7 +14384,7 @@ function b_({ copy: e, orbColors: t, primaryColor: n, chatBgGradient: r, logo: i
14374
14384
  height: "40px",
14375
14385
  flexShrink: 0
14376
14386
  },
14377
- children: /* @__PURE__ */ g(f_, { title: e.chatTitle })
14387
+ children: /* @__PURE__ */ g(m_, { title: e.chatTitle })
14378
14388
  })
14379
14389
  }), o && /* @__PURE__ */ g("div", {
14380
14390
  style: {
@@ -14805,11 +14815,11 @@ function b_({ copy: e, orbColors: t, primaryColor: n, chatBgGradient: r, logo: i
14805
14815
  isLoading: T,
14806
14816
  isAgentTyping: d,
14807
14817
  setReplyContext: N,
14808
- TypingDots: y_,
14818
+ TypingDots: x_,
14809
14819
  primaryColor: n,
14810
14820
  agentHeadshot: y,
14811
14821
  agentDisplayName: v || b,
14812
- botAvatarNode: /* @__PURE__ */ g(v_, { orbColors: t })
14822
+ botAvatarNode: /* @__PURE__ */ g(b_, { orbColors: t })
14813
14823
  }) : L ? /* @__PURE__ */ _("div", {
14814
14824
  style: {
14815
14825
  flex: 1,
@@ -14850,7 +14860,7 @@ function b_({ copy: e, orbColors: t, primaryColor: n, chatBgGradient: r, logo: i
14850
14860
  padding: "28px 24px"
14851
14861
  },
14852
14862
  children: [
14853
- /* @__PURE__ */ g(m_, {
14863
+ /* @__PURE__ */ g(g_, {
14854
14864
  size: 94,
14855
14865
  orbColors: t
14856
14866
  }),
@@ -15015,7 +15025,7 @@ function b_({ copy: e, orbColors: t, primaryColor: n, chatBgGradient: r, logo: i
15015
15025
  ]
15016
15026
  });
15017
15027
  }
15018
- function x_() {
15028
+ function C_() {
15019
15029
  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: E, callConnectedAt: D, isCallMuted: O, webRTCError: k, language: A, chatId: ee, historyRef: te, onMessageSync: ne, sendMessage: j, uploadChatFile: M, openWidget: re, captureVisitorEmail: ie, setVoiceMode: ae, endConversation: N, startNewChat: ce, acceptCall: le, rejectCall: ue, endWebRTCCall: de, toggleCallMute: fe, dismissCallError: pe, startTyping: me, stopTyping: he, updateTypingDraft: ge, getVisitorChatHistory: P, resumeChat: _e, isSessionRestoring: ve, openToChatCounter: ye, voiceEndCounter: be } = Cn();
15020
15030
  c(() => {
15021
15031
  try {
@@ -15037,7 +15047,7 @@ function x_() {
15037
15047
  small: 50,
15038
15048
  medium: 64,
15039
15049
  large: 80
15040
- }, je = Ae[L.orbSize] || Ae.small, Me = L.position || "bottom-right", R = I.fallbackAgentName || "Agent", z = c_(De ?? L.chatBgColors), Ne = I.logo || I.logoUrl || null, Pe = A || "en", Fe = F.recommendations?.[Pe] || [], B = (xe.recommendations?.[Pe] ?? Fe).filter((e) => String(e?.label ?? "").trim()).map((e, t) => ({
15050
+ }, je = Ae[L.orbSize] || Ae.small, Me = L.position || "bottom-right", R = I.fallbackAgentName || "Agent", z = u_(De ?? L.chatBgColors), Ne = I.logo || I.logoUrl || null, Pe = A || "en", Fe = F.recommendations?.[Pe] || [], B = (xe.recommendations?.[Pe] ?? Fe).filter((e) => String(e?.label ?? "").trim()).map((e, t) => ({
15041
15051
  id: e.key || `qr-${t}`,
15042
15052
  label: e.label,
15043
15053
  message: e.label,
@@ -15327,7 +15337,7 @@ function x_() {
15327
15337
  onWheel: (e) => e.stopPropagation(),
15328
15338
  onTouchMove: (e) => e.stopPropagation(),
15329
15339
  children: [
15330
- W === "entry_prompt" && /* @__PURE__ */ g(h_, {
15340
+ W === "entry_prompt" && /* @__PURE__ */ g(__, {
15331
15341
  copy: Ke,
15332
15342
  orbColors: De,
15333
15343
  primaryColor: ke,
@@ -15410,13 +15420,13 @@ function x_() {
15410
15420
  children: E === "connected" ? `${Ft(lt)} with ${U}` : `Tap to return to ${U}`
15411
15421
  })]
15412
15422
  })]
15413
- }), /* @__PURE__ */ g(m_, {
15423
+ }), /* @__PURE__ */ g(g_, {
15414
15424
  size: je,
15415
15425
  orbColors: De,
15416
15426
  onClick: T ? At : Ee ? zt : Vt
15417
15427
  })]
15418
15428
  }),
15419
- W === "connection_modal" && /* @__PURE__ */ g(g_, {
15429
+ W === "connection_modal" && /* @__PURE__ */ g(v_, {
15420
15430
  copy: Ke,
15421
15431
  orbColors: De,
15422
15432
  primaryColor: ke,
@@ -15426,7 +15436,7 @@ function x_() {
15426
15436
  isMobile: Et,
15427
15437
  isClosing: xt
15428
15438
  }),
15429
- W === "voice_mode" && /* @__PURE__ */ g(__, {
15439
+ W === "voice_mode" && /* @__PURE__ */ g(y_, {
15430
15440
  orbColors: De,
15431
15441
  onEnterChat: Vt,
15432
15442
  onEndChat: Ht,
@@ -15466,7 +15476,7 @@ function x_() {
15466
15476
  orbColors: De,
15467
15477
  chatHistory: r
15468
15478
  }),
15469
- W === "text_chat" && /* @__PURE__ */ g(b_, {
15479
+ W === "text_chat" && /* @__PURE__ */ g(S_, {
15470
15480
  isClosing: xt,
15471
15481
  copy: Ke,
15472
15482
  orbColors: De,
@@ -15532,7 +15542,7 @@ function x_() {
15532
15542
  }
15533
15543
  //#endregion
15534
15544
  //#region src/components/ErrorBoundary.jsx
15535
- var S_ = class extends e.Component {
15545
+ var w_ = class extends e.Component {
15536
15546
  constructor(e) {
15537
15547
  super(e), this.state = { hasError: !1 };
15538
15548
  }
@@ -15547,4 +15557,4 @@ var S_ = class extends e.Component {
15547
15557
  }
15548
15558
  };
15549
15559
  //#endregion
15550
- export { cg as AnimatedOrb, S_ as ErrorBoundary, pi as FlowEngageProvider, x_ as FlowEngageWidget, Cn as useFlowEngage };
15560
+ export { cg as AnimatedOrb, w_ as ErrorBoundary, pi as FlowEngageProvider, C_ as FlowEngageWidget, Cn as useFlowEngage };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowengage/react-chatbot",
3
- "version": "8.0.105",
3
+ "version": "8.0.106",
4
4
  "description": "Embeddable AI chat widget for React — powered by FlowEngage. Drop it in with a single siteId.",
5
5
  "keywords": [
6
6
  "chatbot",