@flowengage/react-chatbot 1.6.3 → 1.6.5

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.
@@ -1948,7 +1948,11 @@ function Tn(e, t) {
1948
1948
  t ||= e.replace(/[-_]+/g, " ").trim();
1949
1949
  }
1950
1950
  if (!t) return null;
1951
- let n = t.toLowerCase().trim(), r = n.split(/\s+/).filter((e) => e.length > 2), i = Array.from(document.querySelectorAll("h1, h2, h3, h4, h5, h6, [data-section]")).filter((e) => !hn(e));
1951
+ let n = t.toLowerCase().trim(), r = n.split(/\s+/).filter((e) => e.length > 2), i = Array.from(document.querySelectorAll((/* @__PURE__ */ "h1.h2.h3.h4.h5.h6.[data-section].section[id].[id].main li.article li.[role='main'] li.[class*='card'].[class*='Card'].[class*='feature'].[class*='Feature'].[class*='tier'].[class*='Tier'].[class*='plan'].[class*='Plan'].[class*='pricing'].[class*='Pricing'].[class*='testimonial'].[class*='Testimonial'].[class*='team'].[class*='Team'].[class*='service'].[class*='Service'].[class*='block'].[role='listitem'].[role='article'].[role='region'].dt.dd".split(".")).join(", "))).filter((e) => {
1952
+ if (hn(e)) return !1;
1953
+ let t = e.textContent.trim();
1954
+ return !(t.length < 3 || t.length > 5e3 || e.closest("nav, footer, header, aside, .nav, .footer, .header"));
1955
+ });
1952
1956
  for (let e of i) if (e.textContent.replace(/\s+/g, " ").toLowerCase().trim() === n) return e;
1953
1957
  for (let e of i) {
1954
1958
  let t = e.textContent.replace(/\s+/g, " ").toLowerCase().trim();
@@ -2119,34 +2123,64 @@ async function Mn(e) {
2119
2123
  if (e === o) return;
2120
2124
  let t = e.tagName?.toUpperCase();
2121
2125
  t === "AUDIO" || t === "VIDEO" || e.remove();
2122
- }), Array.from(a.body.children).forEach((e) => {
2126
+ });
2127
+ let s = new Set(Array.from(document.querySelectorAll("link[rel='stylesheet']")).map((e) => {
2128
+ try {
2129
+ return new URL(e.getAttribute("href") || "", window.location.href).href;
2130
+ } catch {
2131
+ return "";
2132
+ }
2133
+ }));
2134
+ for (let t of Array.from(a.head.querySelectorAll("link[rel='stylesheet']"))) {
2135
+ let n = t.getAttribute("href");
2136
+ if (!n) continue;
2137
+ let r;
2138
+ try {
2139
+ r = new URL(n, e).href;
2140
+ } catch {
2141
+ continue;
2142
+ }
2143
+ if (s.has(r)) continue;
2144
+ let i = document.createElement("link");
2145
+ i.rel = "stylesheet", i.href = r, t.media && (i.media = t.media), document.head.appendChild(i);
2146
+ }
2147
+ for (let e of Array.from(a.head.querySelectorAll("style"))) {
2148
+ if (!e.textContent.trim()) continue;
2149
+ let t = e.textContent.trim().slice(0, 120);
2150
+ if (Array.from(document.head.querySelectorAll("style")).some((e) => e.textContent.trim().slice(0, 120) === t)) continue;
2151
+ let n = document.createElement("style");
2152
+ n.textContent = e.textContent, document.head.appendChild(n);
2153
+ }
2154
+ Array.from(a.body.children).forEach((e) => {
2123
2155
  e.tagName?.toUpperCase() !== "SCRIPT" && document.body.insertBefore(document.importNode(e, !0), o);
2124
2156
  });
2125
- let s = new Set(Array.from(document.querySelectorAll("script[src]")).map((e) => {
2157
+ let c = new Set(Array.from(document.querySelectorAll("script[src]")).map((e) => {
2126
2158
  try {
2127
2159
  return new URL(e.getAttribute("src") || "", window.location.href).href;
2128
2160
  } catch {
2129
2161
  return "";
2130
2162
  }
2131
2163
  }));
2132
- for (let t of Array.from(a.body.querySelectorAll("script"))) {
2133
- let n = t.getAttribute("src") || "";
2134
- if (n.includes("flowengage")) continue;
2135
- let r = document.createElement("script");
2136
- if (n) {
2137
- let i;
2164
+ function l(t, n) {
2165
+ let r = t.getAttribute("src") || "";
2166
+ if (r.includes("flowengage")) return;
2167
+ let i = document.createElement("script");
2168
+ if (r) {
2169
+ let n;
2138
2170
  try {
2139
- i = new URL(n, e).href;
2171
+ n = new URL(r, e).href;
2140
2172
  } catch {
2141
- continue;
2173
+ return;
2142
2174
  }
2143
- if (s.has(i)) continue;
2144
- r.src = i, r.async = t.async, r.defer = t.defer;
2145
- } else if (t.textContent.trim()) r.textContent = t.textContent;
2146
- else continue;
2147
- let i = t.getAttribute("type");
2148
- i && i !== "text/javascript" && i !== "" && (r.type = i), document.body.insertBefore(r, o);
2149
- }
2175
+ if (c.has(n)) return;
2176
+ c.add(n), i.src = n, i.async = t.async, i.defer = t.defer;
2177
+ } else if (t.textContent.trim()) i.textContent = t.textContent;
2178
+ else return;
2179
+ let a = t.getAttribute("type");
2180
+ a && a !== "text/javascript" && a !== "" && (i.type = a), n.parentNode.insertBefore(i, n);
2181
+ }
2182
+ for (let e of Array.from(a.head.querySelectorAll("script"))) l(e, o);
2183
+ for (let e of Array.from(a.body.querySelectorAll("script"))) l(e, o);
2150
2184
  try {
2151
2185
  typeof window.Drupal?.attachBehaviors == "function" && window.Drupal.attachBehaviors(document.body, window.drupalSettings);
2152
2186
  } catch {}
@@ -27360,92 +27394,59 @@ function rD({ size: e = 94, voiceState: t = "idle", isMuted: n = !1, colors: r,
27360
27394
  }
27361
27395
  //#endregion
27362
27396
  //#region src/utils/actionQueue.js
27363
- var iD = 375, aD = 6e3, oD = {
27397
+ var iD = {
27364
27398
  wordsSoFar: 0,
27365
27399
  speechStartTime: 0,
27366
27400
  isSpeaking: !1,
27367
27401
  items: [],
27368
27402
  timers: [],
27369
- textDraining: !1,
27370
27403
  lastHighlightId: null,
27371
27404
  isVoiceMode: !1
27372
27405
  };
27373
- function sD(e, t = 5e3) {
27374
- let n = {
27375
- execute: e,
27376
- wordOffset: oD.wordsSoFar,
27377
- holdMs: t
27378
- };
27379
- if (oD.isVoiceMode) if (oD.speechStartTime > 0) cD(n);
27380
- else {
27381
- oD.items.push(n);
27382
- let e = setTimeout(() => {
27383
- let e = oD.items.indexOf(n);
27384
- e !== -1 && (oD.items.splice(e, 1), n.execute());
27385
- }, aD);
27386
- oD.timers.push(e);
27387
- }
27388
- else oD.items.push(n), oD.textDraining || lD();
27389
- }
27390
- function cD(e) {
27391
- let t = e.wordOffset * iD, n = Date.now() - oD.speechStartTime, r = Math.max(0, t - n), i = setTimeout(e.execute, r);
27392
- oD.timers.push(i);
27393
- }
27394
- function lD() {
27395
- if (oD.items.length === 0) {
27396
- oD.textDraining = !1;
27397
- return;
27398
- }
27399
- oD.textDraining = !0;
27400
- let e = oD.items.shift();
27401
- setTimeout(() => e.execute(), 300);
27402
- let t = setTimeout(lD, e.holdMs);
27403
- oD.timers.push(t);
27404
- }
27405
- function uD() {
27406
- oD.timers.forEach(clearTimeout), oD.wordsSoFar = 0, oD.speechStartTime = 0, oD.isSpeaking = !1, oD.items = [], oD.timers = [], oD.textDraining = !1, oD.lastHighlightId = null;
27406
+ function aD() {
27407
+ iD.timers.forEach(clearTimeout), iD.wordsSoFar = 0, iD.speechStartTime = 0, iD.isSpeaking = !1, iD.items = [], iD.timers = [], iD.lastHighlightId = null;
27407
27408
  }
27408
27409
  //#endregion
27409
27410
  //#region src/utils/highlightEngine.js
27410
- var dD = 80, fD = null;
27411
- function pD(e) {
27411
+ var oD = 80, sD = null;
27412
+ function cD(e) {
27412
27413
  requestAnimationFrame(() => {
27413
- let t = e.getBoundingClientRect(), n = t.top + t.height / 2, r = dD, i = r + (window.innerHeight - r) / 2, a = window.pageYOffset + n - i;
27414
+ let t = e.getBoundingClientRect(), n = t.top + t.height / 2, r = oD, i = r + (window.innerHeight - r) / 2, a = window.pageYOffset + n - i;
27414
27415
  window.scrollTo({
27415
27416
  top: Math.max(0, a),
27416
27417
  behavior: "smooth"
27417
27418
  });
27418
27419
  });
27419
27420
  }
27420
- function mD(e) {
27421
- hD(), fD = document.createElement("div"), fD.id = "fe-spotlight-overlay", fD.style.cssText = "position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.35);z-index:9998;pointer-events:none;transition:opacity 0.4s ease;opacity:0;", document.body.appendChild(fD), fD.offsetHeight, fD.style.opacity = "1", e.style.position = "relative", e.style.zIndex = "9999";
27421
+ function lD(e) {
27422
+ uD(), sD = document.createElement("div"), sD.id = "fe-spotlight-overlay", sD.style.cssText = "position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.35);z-index:9998;pointer-events:none;transition:opacity 0.4s ease;opacity:0;", document.body.appendChild(sD), sD.offsetHeight, sD.style.opacity = "1", e.style.position = "relative", e.style.zIndex = "9999";
27422
27423
  }
27423
- function hD() {
27424
- if (fD) {
27425
- fD.style.opacity = "0";
27426
- let e = fD;
27424
+ function uD() {
27425
+ if (sD) {
27426
+ sD.style.opacity = "0";
27427
+ let e = sD;
27427
27428
  setTimeout(() => {
27428
27429
  e.parentNode && e.parentNode.removeChild(e);
27429
- }, 400), fD = null;
27430
+ }, 400), sD = null;
27430
27431
  }
27431
27432
  document.querySelectorAll("[data-fe-highlighted]").forEach((e) => {
27432
27433
  e.style.zIndex = "", e.style.position = "";
27433
27434
  });
27434
27435
  }
27435
- function gD(e) {
27436
+ function dD(e) {
27436
27437
  if (!e || e.hasAttribute("data-fe-highlighted")) return;
27437
- _D(), pD(e);
27438
+ fD(), cD(e);
27438
27439
  let t = e.style.cssText;
27439
- e.setAttribute("data-fe-highlighted", "true"), e.setAttribute("data-fe-orig-style", t), e.style.outline = "3px solid #2563eb", e.style.outlineOffset = "8px", e.style.background = "rgba(37, 99, 235, 0.08)", e.style.borderRadius = "8px", e.style.padding = "12px 16px", e.style.transition = "all 0.4s ease", mD(e), setTimeout(() => _D(), 6e4);
27440
+ e.setAttribute("data-fe-highlighted", "true"), e.setAttribute("data-fe-orig-style", t), e.style.outline = "3px solid #2563eb", e.style.outlineOffset = "8px", e.style.background = "rgba(37, 99, 235, 0.08)", e.style.borderRadius = "8px", e.style.padding = "12px 16px", e.style.transition = "all 0.4s ease", lD(e);
27440
27441
  }
27441
- function _D() {
27442
+ function fD() {
27442
27443
  let e = document.querySelector("[data-fe-highlighted]");
27443
- e && (e.style.cssText = e.getAttribute("data-fe-orig-style") || "", e.removeAttribute("data-fe-highlighted"), e.removeAttribute("data-fe-orig-style")), hD();
27444
+ e && (e.style.cssText = e.getAttribute("data-fe-orig-style") || "", e.removeAttribute("data-fe-highlighted"), e.removeAttribute("data-fe-orig-style")), uD();
27444
27445
  }
27445
27446
  //#endregion
27446
27447
  //#region src/utils/voiceActionVisuals.js
27447
27448
  var Q = "fe-vv";
27448
- function vD() {
27449
+ function pD() {
27449
27450
  if (typeof document > "u" || document.getElementById(`${Q}-styles`)) return;
27450
27451
  let e = `
27451
27452
  /* ── Action toast ───────────────────────────────────────────────────────────── */
@@ -27590,14 +27591,14 @@ function vD() {
27590
27591
  `, t = document.createElement("style");
27591
27592
  t.id = `${Q}-styles`, t.textContent = e, (document.head || document.documentElement).appendChild(t);
27592
27593
  }
27593
- var yD = null, bD = null;
27594
- function xD() {
27595
- return (!yD || !yD.isConnected) && (yD = document.createElement("div"), yD.id = `${Q}-toast`, document.body.appendChild(yD)), yD;
27594
+ var mD = null, hD = null;
27595
+ function gD() {
27596
+ return (!mD || !mD.isConnected) && (mD = document.createElement("div"), mD.id = `${Q}-toast`, document.body.appendChild(mD)), mD;
27596
27597
  }
27597
- function SD(e, { spinner: t = !0, icon: n = null, duration: r = 0 } = {}) {
27598
+ function _D(e, { spinner: t = !0, icon: n = null, duration: r = 0 } = {}) {
27598
27599
  if (typeof document > "u") return;
27599
- vD(), bD &&= (clearTimeout(bD), null);
27600
- let i = xD();
27600
+ pD(), hD &&= (clearTimeout(hD), null);
27601
+ let i = gD();
27601
27602
  if (i.innerHTML = "", n) {
27602
27603
  let e = document.createElement("span");
27603
27604
  e.className = `${Q}-icon`, e.textContent = n, i.appendChild(e);
@@ -27606,82 +27607,82 @@ function SD(e, { spinner: t = !0, icon: n = null, duration: r = 0 } = {}) {
27606
27607
  e.className = `${Q}-spin`, i.appendChild(e);
27607
27608
  }
27608
27609
  let a = document.createElement("span");
27609
- a.textContent = e, i.appendChild(a), i.classList.remove(`${Q}-show`), i.offsetHeight, i.classList.add(`${Q}-show`), r > 0 && (bD = setTimeout(() => CD(), r));
27610
+ a.textContent = e, i.appendChild(a), i.classList.remove(`${Q}-show`), i.offsetHeight, i.classList.add(`${Q}-show`), r > 0 && (hD = setTimeout(() => vD(), r));
27610
27611
  }
27611
- function CD(e = 0) {
27612
- yD && (e > 0 ? bD = setTimeout(() => {
27613
- yD && yD.classList.remove(`${Q}-show`);
27614
- }, e) : yD && yD.classList.remove(`${Q}-show`));
27612
+ function vD(e = 0) {
27613
+ mD && (e > 0 ? hD = setTimeout(() => {
27614
+ mD && mD.classList.remove(`${Q}-show`);
27615
+ }, e) : mD && mD.classList.remove(`${Q}-show`));
27615
27616
  }
27616
- var wD = null, TD = [];
27617
- function ED() {
27618
- return (!wD || !wD.isConnected) && (wD = document.createElement("div"), wD.id = `${Q}-bar`, document.body.appendChild(wD)), wD;
27617
+ var yD = null, bD = [];
27618
+ function xD() {
27619
+ return (!yD || !yD.isConnected) && (yD = document.createElement("div"), yD.id = `${Q}-bar`, document.body.appendChild(yD)), yD;
27619
27620
  }
27620
- function DD() {
27621
+ function SD() {
27621
27622
  if (typeof document > "u") return;
27622
- vD(), TD.forEach(clearTimeout), TD = [];
27623
- let e = ED();
27623
+ pD(), bD.forEach(clearTimeout), bD = [];
27624
+ let e = xD();
27624
27625
  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";
27625
27626
  let t = [[80, "width 0.6s ease"], [92, "width 1.2s ease"]], n = 50;
27626
27627
  for (let [e, r] of t) {
27627
27628
  let t = n, i = e, a = r;
27628
- TD.push(setTimeout(() => {
27629
- wD && (wD.style.transition = a, wD.style.width = `${i}%`);
27629
+ bD.push(setTimeout(() => {
27630
+ yD && (yD.style.transition = a, yD.style.width = `${i}%`);
27630
27631
  }, t)), n += 800;
27631
27632
  }
27632
27633
  }
27633
- function OD() {
27634
- wD && (TD.forEach(clearTimeout), TD = [], wD.style.transition = "width 0.2s ease", wD.style.width = "100%", TD.push(setTimeout(() => {
27635
- wD && (wD.style.transition = "opacity 0.35s ease", wD.style.opacity = "0", TD.push(setTimeout(() => {
27636
- wD && (wD.style.width = "0%", wD.classList.remove(`${Q}-bar-active`));
27634
+ function CD() {
27635
+ yD && (bD.forEach(clearTimeout), bD = [], yD.style.transition = "width 0.2s ease", yD.style.width = "100%", bD.push(setTimeout(() => {
27636
+ yD && (yD.style.transition = "opacity 0.35s ease", yD.style.opacity = "0", bD.push(setTimeout(() => {
27637
+ yD && (yD.style.width = "0%", yD.classList.remove(`${Q}-bar-active`));
27637
27638
  }, 380)));
27638
27639
  }, 220)));
27639
27640
  }
27640
- function kD() {
27641
+ function wD() {
27641
27642
  typeof document > "u" || document.querySelectorAll(`.${Q}-field-active, .${Q}-field-filled`).forEach((e) => e.classList.remove(`${Q}-field-active`, `${Q}-field-filled`));
27642
27643
  }
27643
- function AD(e) {
27644
- !e || typeof document > "u" || (vD(), kD(), e.classList.add(`${Q}-field-active`));
27644
+ function TD(e) {
27645
+ !e || typeof document > "u" || (pD(), wD(), e.classList.add(`${Q}-field-active`));
27645
27646
  }
27646
- function jD(e) {
27647
+ function ED(e) {
27647
27648
  e && (e.classList.remove(`${Q}-field-active`), e.classList.add(`${Q}-field-filled`), setTimeout(() => {
27648
27649
  e.isConnected && e.classList.remove(`${Q}-field-filled`);
27649
27650
  }, 1400));
27650
27651
  }
27651
- var MD = `<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 22 22" fill="none">
27652
+ var DD = `<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 22 22" fill="none">
27652
27653
  <filter id="${Q}-csh">
27653
27654
  <feDropShadow dx="1" dy="2" stdDeviation="1.5" flood-color="#00000060"/>
27654
27655
  </filter>
27655
27656
  <path d="M4 2L19 10.5L11 12.8L8 20L4 2Z"
27656
27657
  fill="white" stroke="#1e1b4b" stroke-width="1.6" stroke-linejoin="round"
27657
27658
  filter="url(#${Q}-csh)"/>
27658
- </svg>`, ND = null, PD = !1;
27659
- function FD() {
27660
- return (!ND || !ND.isConnected) && (ND = document.createElement("div"), ND.id = `${Q}-cursor`, ND.innerHTML = MD, document.body.appendChild(ND), PD = !1), ND;
27659
+ </svg>`, OD = null, kD = !1;
27660
+ function AD() {
27661
+ return (!OD || !OD.isConnected) && (OD = document.createElement("div"), OD.id = `${Q}-cursor`, OD.innerHTML = DD, document.body.appendChild(OD), kD = !1), OD;
27661
27662
  }
27662
- async function ID(e) {
27663
+ async function jD(e) {
27663
27664
  if (typeof document > "u" || !e) return;
27664
- vD();
27665
+ pD();
27665
27666
  let t;
27666
27667
  try {
27667
27668
  t = e.getBoundingClientRect();
27668
27669
  } catch {
27669
27670
  return;
27670
27671
  }
27671
- let n = t.left + Math.min(16, t.width * .2), r = t.top + Math.min(12, t.height * .25), i = FD();
27672
- PD ||= (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 BD(360);
27672
+ let n = t.left + Math.min(16, t.width * .2), r = t.top + Math.min(12, t.height * .25), i = AD();
27673
+ kD ||= (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 FD(360);
27673
27674
  }
27674
- function LD(e = !1) {
27675
- ND && (e ? (ND.classList.remove(`${Q}-cursor-visible`), PD = !1) : (ND.classList.remove(`${Q}-cursor-visible`), setTimeout(() => {
27676
- PD = !1;
27675
+ function MD(e = !1) {
27676
+ OD && (e ? (OD.classList.remove(`${Q}-cursor-visible`), kD = !1) : (OD.classList.remove(`${Q}-cursor-visible`), setTimeout(() => {
27677
+ kD = !1;
27677
27678
  }, 250)));
27678
27679
  }
27679
- async function RD(e) {
27680
- ND && (ND.classList.add(`${Q}-cursor-click`), await BD(280), ND.classList.remove(`${Q}-cursor-click`));
27680
+ async function ND(e) {
27681
+ OD && (OD.classList.add(`${Q}-cursor-click`), await FD(280), OD.classList.remove(`${Q}-cursor-click`));
27681
27682
  }
27682
- function zD(e) {
27683
+ function PD(e) {
27683
27684
  if (!e || typeof document > "u") return;
27684
- vD();
27685
+ pD();
27685
27686
  let t;
27686
27687
  try {
27687
27688
  t = e.getBoundingClientRect();
@@ -27707,7 +27708,7 @@ function zD(e) {
27707
27708
  a.remove(), e.style.position = n, e.style.overflow = r;
27708
27709
  }, 650);
27709
27710
  }
27710
- function BD(e) {
27711
+ function FD(e) {
27711
27712
  return new Promise((t) => setTimeout(t, e));
27712
27713
  }
27713
27714
  //#endregion
@@ -27715,42 +27716,42 @@ function BD(e) {
27715
27716
  function $(...e) {
27716
27717
  mn() && console.log("[FlowEngage:voice-tools]", ...e);
27717
27718
  }
27718
- function VD(e) {
27719
+ function ID(e) {
27719
27720
  return new Promise((t) => setTimeout(t, e));
27720
27721
  }
27721
- var HD = "#flowengage-root, .flowengage-shell, .flowengage-widget-root";
27722
- function UD(e) {
27722
+ var LD = "#flowengage-root, .flowengage-shell, .flowengage-widget-root";
27723
+ function RD(e) {
27723
27724
  if (!e || typeof e.closest != "function") return !1;
27724
27725
  try {
27725
- return !!e.closest(HD);
27726
+ return !!e.closest(LD);
27726
27727
  } catch {
27727
27728
  return !1;
27728
27729
  }
27729
27730
  }
27730
- function WD(e) {
27731
+ function zD(e) {
27731
27732
  try {
27732
27733
  let t = e.ownerDocument?.defaultView;
27733
27734
  if (t) return t.getComputedStyle(e);
27734
27735
  } catch {}
27735
27736
  return window.getComputedStyle(e);
27736
27737
  }
27737
- function GD(e) {
27738
+ function BD(e) {
27738
27739
  let t = /* @__PURE__ */ new Set();
27739
27740
  function n(r) {
27740
27741
  if (!r || t.has(r)) return;
27741
27742
  t.add(r), e(r);
27742
27743
  let i = r.querySelectorAll("iframe");
27743
- for (let e of i) if (!UD(e)) try {
27744
+ for (let e of i) if (!RD(e)) try {
27744
27745
  let t = e.contentDocument;
27745
27746
  t && n(t);
27746
27747
  } catch {}
27747
27748
  }
27748
27749
  typeof document < "u" && n(document);
27749
27750
  }
27750
- function KD(e) {
27751
+ function VD(e) {
27751
27752
  return e == null ? null : String(e).replace(/\u00a0/g, " ").replace(/\s*\*+\s*$/u, "").replace(/\s+/g, " ").trim();
27752
27753
  }
27753
- function qD(e) {
27754
+ function HD(e) {
27754
27755
  let t = e.ownerDocument || document, n = e.getAttribute("aria-labelledby");
27755
27756
  if (n) {
27756
27757
  let e = n.trim().split(/\s+/).filter(Boolean), r = [];
@@ -27758,42 +27759,42 @@ function qD(e) {
27758
27759
  let e = t.getElementById(n);
27759
27760
  e?.textContent && r.push(e.textContent.trim());
27760
27761
  } catch {}
27761
- if (r.length) return KD(r.join(" "));
27762
+ if (r.length) return VD(r.join(" "));
27762
27763
  }
27763
- if (e.labels && e.labels.length) return KD(e.labels[0].textContent);
27764
+ if (e.labels && e.labels.length) return VD(e.labels[0].textContent);
27764
27765
  let r = e.id;
27765
27766
  if (r) try {
27766
27767
  let e = t.querySelector(`label[for="${CSS.escape(r)}"]`);
27767
- if (e) return KD(e.textContent);
27768
+ if (e) return VD(e.textContent);
27768
27769
  } catch {
27769
27770
  let e = t.querySelector(`label[for="${r.replace(/"/g, "\\\"")}"]`);
27770
- if (e) return KD(e.textContent);
27771
+ if (e) return VD(e.textContent);
27771
27772
  }
27772
27773
  let i = e.previousElementSibling;
27773
27774
  for (let e = 0; e < 6 && i; e += 1) {
27774
- if (i.tagName === "LABEL") return KD(i.textContent);
27775
+ if (i.tagName === "LABEL") return VD(i.textContent);
27775
27776
  let e = (i.className || "").toString().toLowerCase();
27776
27777
  if (/chakra-form__label|formlabel|field-label|form-label|mui-form-label/.test(e)) {
27777
- let e = KD(i.textContent);
27778
+ let e = VD(i.textContent);
27778
27779
  if (e) return e;
27779
27780
  }
27780
27781
  i = i.previousElementSibling;
27781
27782
  }
27782
27783
  let a = e.parentElement;
27783
27784
  for (let e = 0; e < 5 && a; e += 1) {
27784
- if (a.tagName === "LABEL") return KD(a.textContent);
27785
+ if (a.tagName === "LABEL") return VD(a.textContent);
27785
27786
  let e = a.querySelector?.(":scope > label, :scope > [class*='FormLabel'], :scope > [class*='form__label']");
27786
- if (e?.textContent) return KD(e.textContent);
27787
+ if (e?.textContent) return VD(e.textContent);
27787
27788
  a = a.parentElement;
27788
27789
  }
27789
27790
  let o = e.getAttribute("aria-label");
27790
- return o ? KD(o) : null;
27791
+ return o ? VD(o) : null;
27791
27792
  }
27792
- function JD() {
27793
+ function UD() {
27793
27794
  let e = [];
27794
- return GD((t) => {
27795
+ return BD((t) => {
27795
27796
  e.push(...Array.from(t.querySelectorAll("input, select, textarea")).filter((e) => {
27796
- if (UD(e)) return !1;
27797
+ if (RD(e)) return !1;
27797
27798
  let t = (e.type || "").toLowerCase();
27798
27799
  if ([
27799
27800
  "hidden",
@@ -27802,32 +27803,32 @@ function JD() {
27802
27803
  "image"
27803
27804
  ].includes(t) || e.disabled || e.readOnly) return !1;
27804
27805
  try {
27805
- let t = WD(e);
27806
+ let t = zD(e);
27806
27807
  if (t.display === "none" || t.visibility === "hidden") return !1;
27807
27808
  } catch {}
27808
27809
  return !0;
27809
27810
  }));
27810
27811
  }), e;
27811
27812
  }
27812
- function YD() {
27813
- return JD().map((e, t) => ({
27813
+ function WD() {
27814
+ return UD().map((e, t) => ({
27814
27815
  formIndex: 0,
27815
27816
  fieldIndex: t,
27816
27817
  tag: e.tagName,
27817
27818
  type: e.type || "text",
27818
27819
  name: e.name || null,
27819
27820
  id: e.id || null,
27820
- label: qD(e),
27821
+ label: HD(e),
27821
27822
  placeholder: e.placeholder || null
27822
27823
  }));
27823
27824
  }
27824
- function XD() {
27825
+ function GD() {
27825
27826
  let e = [];
27826
- return GD((t) => {
27827
+ return BD((t) => {
27827
27828
  e.push(...Array.from(t.querySelectorAll("button, [role=\"button\"], input[type=\"submit\"], input[type=\"button\"]")).filter((e) => {
27828
- if (UD(e) || e.disabled) return !1;
27829
+ if (RD(e) || e.disabled) return !1;
27829
27830
  try {
27830
- let t = WD(e);
27831
+ let t = zD(e);
27831
27832
  if (t.display === "none" || t.visibility === "hidden") return !1;
27832
27833
  } catch {}
27833
27834
  return !0;
@@ -27839,15 +27840,15 @@ function XD() {
27839
27840
  type: e.type || e.tagName
27840
27841
  }));
27841
27842
  }
27842
- function ZD(e) {
27843
+ function KD(e) {
27843
27844
  return String(e || "").toLowerCase().replace(/\u00a0/g, " ").replace(/\*/g, "").replace(/\s+/g, " ").trim();
27844
27845
  }
27845
- function QD(e) {
27846
- let t = ZD(e);
27846
+ function qD(e) {
27847
+ let t = KD(e);
27847
27848
  return t = t.replace(/\s+field\s*$/i, "").trim(), t;
27848
27849
  }
27849
- function $D(e, t) {
27850
- let n = QD(t);
27850
+ function JD(e, t) {
27851
+ let n = qD(t);
27851
27852
  if (!n) return 0;
27852
27853
  let r = (e.name || "").toLowerCase(), i = (e.id || "").toLowerCase();
27853
27854
  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;
@@ -27855,12 +27856,12 @@ function $D(e, t) {
27855
27856
  e.name,
27856
27857
  e.id,
27857
27858
  e.placeholder,
27858
- qD(e),
27859
+ HD(e),
27859
27860
  e.getAttribute("aria-label"),
27860
27861
  e.getAttribute("title"),
27861
27862
  e.getAttribute("data-testid"),
27862
27863
  e.getAttribute("autocomplete")
27863
- ].filter(Boolean).map((e) => ZD(e)), o = 0;
27864
+ ].filter(Boolean).map((e) => KD(e)), o = 0;
27864
27865
  for (let e of a) {
27865
27866
  if (!e) continue;
27866
27867
  if (e.includes(n) || n.includes(e)) {
@@ -27875,16 +27876,16 @@ function $D(e, t) {
27875
27876
  }
27876
27877
  return o;
27877
27878
  }
27878
- var eO = 28;
27879
- function tO(e, t) {
27879
+ var YD = 28;
27880
+ function XD(e, t) {
27880
27881
  let n = null, r = 0;
27881
27882
  for (let i of e) {
27882
- let e = $D(i, t);
27883
+ let e = JD(i, t);
27883
27884
  e > r && (r = e, n = i);
27884
27885
  }
27885
- return !n || r < eO ? null : n;
27886
+ return !n || r < YD ? null : n;
27886
27887
  }
27887
- function nO(e, t, n) {
27888
+ function ZD(e, t, n) {
27888
27889
  let r = String(t || "").toLowerCase().trim(), i = String(n || "").trim();
27889
27890
  if (!(/^https?:\/\//i.test(i) || /\.\w{2,}(\/|\s|$)/.test(i) || r.includes("url") || r.includes("website") || r.includes("domain") || r.includes("site"))) return null;
27890
27891
  let a = null, o = 0;
@@ -27904,7 +27905,7 @@ function nO(e, t, n) {
27904
27905
  t.name,
27905
27906
  t.id,
27906
27907
  t.placeholder,
27907
- qD(t),
27908
+ HD(t),
27908
27909
  t.getAttribute("aria-label"),
27909
27910
  t.getAttribute("autocomplete")
27910
27911
  ].filter(Boolean).join(" ").toLowerCase();
@@ -27912,15 +27913,15 @@ function nO(e, t, n) {
27912
27913
  }
27913
27914
  return !a || o < 42 ? null : a;
27914
27915
  }
27915
- function rO(e) {
27916
+ function QD(e) {
27916
27917
  let t = String(e ?? "").trim();
27917
27918
  return t ? /^https?:\/\//i.test(t) ? !0 : /\.\w{2,}(\/|\s|$)/.test(t) : !1;
27918
27919
  }
27919
- function iO(e) {
27920
+ function $D(e) {
27920
27921
  let t = String(e ?? "").toLowerCase().trim();
27921
27922
  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;
27922
27923
  }
27923
- function aO(e) {
27924
+ function eO(e) {
27924
27925
  if (!e || e.tagName !== "INPUT" && e.tagName !== "TEXTAREA") return !1;
27925
27926
  let t = (e.type || "").toLowerCase();
27926
27927
  return ![
@@ -27932,22 +27933,22 @@ function aO(e) {
27932
27933
  "file"
27933
27934
  ].includes(t);
27934
27935
  }
27935
- function oO(e) {
27936
- if (!aO(e)) return !1;
27936
+ function tO(e) {
27937
+ if (!eO(e)) return !1;
27937
27938
  let t = (e.name || "").toLowerCase(), n = (e.id || "").toLowerCase(), r = [
27938
27939
  e.name,
27939
27940
  e.id,
27940
27941
  e.placeholder,
27941
- qD(e),
27942
+ HD(e),
27942
27943
  e.getAttribute("aria-label")
27943
27944
  ].filter(Boolean).join(" ").toLowerCase();
27944
27945
  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);
27945
27946
  }
27946
- function sO(e, t, n) {
27947
- let r = String(t ?? ""), i = String(n ?? ""), a = uO(e, r) || tO(e, r) || nO(e, r, i);
27947
+ function nO(e, t, n) {
27948
+ let r = String(t ?? ""), i = String(n ?? ""), a = aO(e, r) || XD(e, r) || ZD(e, r, i);
27948
27949
  if (!a) return [];
27949
27950
  let o = new Set([a]);
27950
- if (rO(i) && iO(r)) for (let t of e) t !== a && oO(t) && o.add(t);
27951
+ if (QD(i) && $D(r)) for (let t of e) t !== a && tO(t) && o.add(t);
27951
27952
  let s = Array.from(o);
27952
27953
  return s.sort((e, t) => {
27953
27954
  if (e === t) return 0;
@@ -27955,7 +27956,7 @@ function sO(e, t, n) {
27955
27956
  return n & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : n & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
27956
27957
  }), s;
27957
27958
  }
27958
- function cO(e, t) {
27959
+ function rO(e, t) {
27959
27960
  try {
27960
27961
  if (!e?.getBoundingClientRect || !t?.getBoundingClientRect) return Infinity;
27961
27962
  let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = {
@@ -27970,17 +27971,17 @@ function cO(e, t) {
27970
27971
  return Infinity;
27971
27972
  }
27972
27973
  }
27973
- function lO(e) {
27974
+ function iO(e) {
27974
27975
  if (!e || typeof e != "string") return null;
27975
27976
  let t = null;
27976
- return GD((n) => {
27977
+ return BD((n) => {
27977
27978
  try {
27978
27979
  let r = n.getElementById(e);
27979
- r && !UD(r) && r.matches?.("input, select, textarea") && (t = r);
27980
+ r && !RD(r) && r.matches?.("input, select, textarea") && (t = r);
27980
27981
  } catch {}
27981
27982
  }), t;
27982
27983
  }
27983
- function uO(e, t) {
27984
+ function aO(e, t) {
27984
27985
  let n = String(t ?? "").trim();
27985
27986
  if (!n) return null;
27986
27987
  let r = n.match(/^name:\s*([\w.-]+)$/i);
@@ -27990,12 +27991,12 @@ function uO(e, t) {
27990
27991
  }
27991
27992
  let i = n.match(/^id:\s*([\w.-]+)$/i);
27992
27993
  if (i) {
27993
- let e = lO(i[1]);
27994
+ let e = iO(i[1]);
27994
27995
  if (e) return e;
27995
27996
  }
27996
27997
  let a = n.startsWith("#") ? n.slice(1) : n;
27997
27998
  if (/^[\w-]+$/.test(a)) {
27998
- let e = lO(a);
27999
+ let e = iO(a);
27999
28000
  if (e) return e;
28000
28001
  }
28001
28002
  let o = n.toLowerCase().replace(/\s+/g, " ");
@@ -28005,7 +28006,7 @@ function uO(e, t) {
28005
28006
  }
28006
28007
  return null;
28007
28008
  }
28008
- function dO(e, t) {
28009
+ function oO(e, t) {
28009
28010
  let n = String(t || "").toLowerCase().trim();
28010
28011
  if (!n) return 0;
28011
28012
  let r = [
@@ -28021,13 +28022,13 @@ function dO(e, t) {
28021
28022
  for (let e of i) r.includes(e) && (a += 1);
28022
28023
  return a / i.length * 92;
28023
28024
  }
28024
- function fO(e, t) {
28025
+ function sO(e, t) {
28025
28026
  let n = [];
28026
- GD((e) => {
28027
+ BD((e) => {
28027
28028
  n.push(...Array.from(e.querySelectorAll("button, [role=\"button\"], input[type=\"submit\"], input[type=\"button\"]")).filter((e) => {
28028
- if (UD(e) || e.disabled) return !1;
28029
+ if (RD(e) || e.disabled) return !1;
28029
28030
  try {
28030
- let t = WD(e);
28031
+ let t = zD(e);
28031
28032
  if (t.display === "none" || t.visibility === "hidden") return !1;
28032
28033
  } catch {}
28033
28034
  return !0;
@@ -28035,7 +28036,7 @@ function fO(e, t) {
28035
28036
  });
28036
28037
  let r = 0, i = n.map((t) => ({
28037
28038
  el: t,
28038
- s: dO(t, e)
28039
+ s: oO(t, e)
28039
28040
  }));
28040
28041
  for (let { s: e } of i) e > r && (r = e);
28041
28042
  if (r < 36) return null;
@@ -28045,14 +28046,14 @@ function fO(e, t) {
28045
28046
  if (o.length) {
28046
28047
  let e = a[0], t = Infinity;
28047
28048
  for (let n of a) for (let r of o) {
28048
- let i = cO(n, r);
28049
+ let i = rO(n, r);
28049
28050
  i < t && (t = i, e = n);
28050
28051
  }
28051
28052
  return e;
28052
28053
  }
28053
28054
  return a[0];
28054
28055
  }
28055
- function pO(e) {
28056
+ function cO(e) {
28056
28057
  if (e == null) return {};
28057
28058
  if (typeof e == "string") {
28058
28059
  let t = e.trim();
@@ -28065,8 +28066,8 @@ function pO(e) {
28065
28066
  }
28066
28067
  return e;
28067
28068
  }
28068
- function mO(e) {
28069
- let t = pO(e);
28069
+ function lO(e) {
28070
+ let t = cO(e);
28070
28071
  if (Array.isArray(t) && t.length > 0) {
28071
28072
  let e = t[0];
28072
28073
  if (e?.field_key != null || e?.fieldKey != null) return t.map((e) => ({
@@ -28094,7 +28095,7 @@ function mO(e) {
28094
28095
  value: e?.value ?? e?.Value
28095
28096
  })) : [];
28096
28097
  }
28097
- function hO(e) {
28098
+ function uO(e) {
28098
28099
  if (!e || typeof e != "string") return [];
28099
28100
  let t = e.trim();
28100
28101
  if (!t || /\b[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}\b/i.test(t)) return [];
@@ -28113,7 +28114,7 @@ function hO(e) {
28113
28114
  }
28114
28115
  return [];
28115
28116
  }
28116
- function gO(e) {
28117
+ function dO(e) {
28117
28118
  if (!e || typeof e != "string") return [];
28118
28119
  let t = e.trim();
28119
28120
  if (!t) return [];
@@ -28149,17 +28150,17 @@ function gO(e) {
28149
28150
  }
28150
28151
  return n;
28151
28152
  }
28152
- function _O(e) {
28153
+ function fO(e) {
28153
28154
  if (!e || typeof e != "object") return null;
28154
28155
  let t = e.url ?? e.target_url ?? e.page_url ?? e.pageUrl ?? e.link ?? e.href ?? e.path;
28155
28156
  return t == null ? null : String(t).trim() || null;
28156
28157
  }
28157
- function vO(e) {
28158
+ function pO(e) {
28158
28159
  if (!e || typeof e != "object") return null;
28159
28160
  let t = e.query ?? e.q ?? e.search ?? e.text ?? e.keywords;
28160
28161
  return t == null ? null : String(t).trim() || null;
28161
28162
  }
28162
- function yO(e, t, n) {
28163
+ function mO(e, t, n) {
28163
28164
  if (!n?.skipScroll) try {
28164
28165
  e.scrollIntoView({
28165
28166
  block: "center",
@@ -28214,7 +28215,7 @@ function yO(e, t, n) {
28214
28215
  } catch {}
28215
28216
  return !0;
28216
28217
  }
28217
- function bO() {
28218
+ function hO() {
28218
28219
  let e = {};
28219
28220
  document.querySelectorAll("h1, h2, h3, h4, h5, h6").forEach((t) => {
28220
28221
  if (t.id) return;
@@ -28229,11 +28230,11 @@ function bO() {
28229
28230
  e[r] = !0, t.id = r;
28230
28231
  });
28231
28232
  }
28232
- function xO(e) {
28233
+ function gO(e) {
28233
28234
  let t = e.siteId || null, n = (e.apiBaseUrl || "").replace(/\/$/, ""), r = typeof e.getLastUserVoiceText == "function" ? e.getLastUserVoiceText : null, i = [], a = {
28234
28235
  flowengage_navigate: async (n) => {
28235
28236
  $("flowengage_navigate ▶ raw parameters:", n);
28236
- let r = pO(n), i = _O(r), a = r.section_text ?? r.sectionText ?? r.section;
28237
+ let r = cO(n), i = fO(r), a = r.section_text ?? r.sectionText ?? r.section;
28237
28238
  if ($("flowengage_navigate · coerced:", {
28238
28239
  url: i,
28239
28240
  sectionText: a
@@ -28249,41 +28250,41 @@ function xO(e) {
28249
28250
  return $("flowengage_navigate ✖ blocked", e), e;
28250
28251
  }
28251
28252
  try {
28252
- if (SD(`Navigating to ${i}...`, { spinner: !0 }), DD(), uD(), _D(), $("flowengage_navigate → shadowNavigate", i), await In(i, {
28253
+ if (_D(`Navigating to ${i}...`, { spinner: !0 }), SD(), aD(), fD(), $("flowengage_navigate → shadowNavigate", i), await In(i, {
28253
28254
  sectionText: typeof a == "string" ? a : void 0,
28254
28255
  voiceActive: !0
28255
- }), await VD(400), bO(), a && typeof a == "string") {
28256
+ }), await ID(400), hO(), a && typeof a == "string") {
28256
28257
  let e = Tn(null, a);
28257
- e && sD(() => gD(e)), $("flowengage_navigate · highlight", {
28258
+ e && dD(e), $("flowengage_navigate · highlight", {
28258
28259
  sectionText: a,
28259
28260
  found: !!e
28260
28261
  });
28261
28262
  }
28262
28263
  let e = `OK_NAVIGATION ${i}`;
28263
- return $("flowengage_navigate ✓", e), SD("Navigation complete", {
28264
+ return $("flowengage_navigate ✓", e), _D("Navigation complete", {
28264
28265
  spinner: !1,
28265
28266
  icon: "✅",
28266
28267
  duration: 1200
28267
28268
  }), e;
28268
28269
  } catch (e) {
28269
28270
  let t = `Navigation error: ${e?.message || String(e)}`;
28270
- return $("flowengage_navigate ✖", t), SD("Navigation failed", {
28271
+ return $("flowengage_navigate ✖", t), _D("Navigation failed", {
28271
28272
  spinner: !1,
28272
28273
  icon: "⚠️",
28273
28274
  duration: 1800
28274
28275
  }), t;
28275
28276
  } finally {
28276
- OD(), CD(900);
28277
+ CD(), vD(900);
28277
28278
  }
28278
28279
  },
28279
28280
  flowengage_highlight: async (e) => {
28280
28281
  $("flowengage_highlight ▶", e);
28281
- let t = pO(e), n = t?.section_id || t?.sectionId, r = t?.section_text || t?.sectionText, i = Tn(n || null, r || null);
28282
- return i ? (sD(() => gD(i)), $("flowengage_highlight ✓ (enqueued)"), "Highlighted the section.") : ($("flowengage_highlight ✖ no element"), "Could not find that section on the page.");
28282
+ let t = cO(e), n = t?.section_id || t?.sectionId, r = t?.section_text || t?.sectionText, i = Tn(n || null, r || null);
28283
+ return i ? (dD(i), $("flowengage_highlight ✓"), "Highlighted the section.") : ($("flowengage_highlight ✖ no element"), "Could not find that section on the page.");
28283
28284
  },
28284
28285
  flowengage_read_content: async (e) => {
28285
28286
  $("flowengage_read_content ▶", e);
28286
- let t = pO(e), n = t?.section_text || t?.sectionText || "";
28287
+ let t = cO(e), n = t?.section_text || t?.sectionText || "";
28287
28288
  try {
28288
28289
  let e = "";
28289
28290
  if (n) {
@@ -28306,7 +28307,7 @@ function xO(e) {
28306
28307
  },
28307
28308
  flowengage_search: async (e) => {
28308
28309
  $("flowengage_search ▶", e);
28309
- let r = vO(pO(e));
28310
+ let r = pO(cO(e));
28310
28311
  if ($("flowengage_search · query:", r, "siteId:", t, "apiBase:", n || "(empty)"), !r) return $("flowengage_search ✖ missing query"), "Missing query parameter.";
28311
28312
  if (!t) return $("flowengage_search ✖ no siteId"), "Site is not configured for search.";
28312
28313
  if (!n) return $("flowengage_search ✖ no api base"), "API base URL is missing; cannot search.";
@@ -28335,7 +28336,7 @@ function xO(e) {
28335
28336
  },
28336
28337
  flowengage_page_content: async (e) => {
28337
28338
  $("flowengage_page_content ▶", e);
28338
- let r = pO(e), i = r?.url || r?.page_url || "";
28339
+ let r = cO(e), i = r?.url || r?.page_url || "";
28339
28340
  if ($("flowengage_page_content · url:", i, "siteId:", t, "apiBase:", n || "(empty)"), !i) return $("flowengage_page_content ✖ missing url"), "Missing url parameter.";
28340
28341
  if (!t) return $("flowengage_page_content ✖ no siteId"), "Site is not configured.";
28341
28342
  if (!n) return $("flowengage_page_content ✖ no api base"), "API base URL is missing; cannot fetch page content.";
@@ -28367,7 +28368,7 @@ function xO(e) {
28367
28368
  },
28368
28369
  flowengage_end_session: async () => ($("flowengage_end_session ▶"), typeof e.requestEndSession == "function" && e.requestEndSession(), "Voice session is ending."),
28369
28370
  flowengage_list_forms: async () => {
28370
- let e = YD(), t = XD();
28371
+ let e = WD(), t = GD();
28371
28372
  return $("flowengage_list_forms ✓", `${e.length} field(s)`, `${t.length} button(s)`), JSON.stringify({
28372
28373
  fields: e,
28373
28374
  buttons: t,
@@ -28376,52 +28377,52 @@ function xO(e) {
28376
28377
  },
28377
28378
  flowengage_fill_form: async (e) => {
28378
28379
  try {
28379
- $("flowengage_fill_form ▶ raw:", e), kD();
28380
- let t = mO(e);
28380
+ $("flowengage_fill_form ▶ raw:", e), wD();
28381
+ let t = lO(e);
28381
28382
  if (!t.length && r) {
28382
- let e = r(), n = hO(e);
28383
- n.length ? $("flowengage_fill_form · inferred URL from last user utterance (model omitted usable fields):", n) : (n = gO(e), n.length && $("flowengage_fill_form · inferred contact fields from last user utterance (empty tool params):", n)), n.length && (t = n);
28383
+ let e = r(), n = uO(e);
28384
+ n.length ? $("flowengage_fill_form · inferred URL from last user utterance (model omitted usable fields):", n) : (n = dO(e), n.length && $("flowengage_fill_form · inferred contact fields from last user utterance (empty tool params):", n)), n.length && (t = n);
28384
28385
  }
28385
28386
  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.";
28386
28387
  let n = [];
28387
28388
  for (let e of t) {
28388
28389
  let t = e?.field_key ?? e?.fieldKey, r = e?.value;
28389
28390
  if (t == null || r == null) continue;
28390
- SD(`Filling ${String(t)}...`, { spinner: !0 });
28391
- let a = JD(), o = sO(a, String(t), r);
28391
+ _D(`Filling ${String(t)}...`, { spinner: !0 });
28392
+ let a = UD(), o = nO(a, String(t), r);
28392
28393
  if (o.length) {
28393
- for (let [e, t] of o.entries()) AD(t), await ID(t), yO(t, r, { skipScroll: e > 0 }), jD(t), await VD(120);
28394
+ for (let [e, t] of o.entries()) TD(t), await jD(t), mO(t, r, { skipScroll: e > 0 }), ED(t), await ID(120);
28394
28395
  i = o, n.push(String(t));
28395
28396
  continue;
28396
28397
  }
28397
- let s = uO(a, String(t));
28398
- s ||= tO(a, String(t)), s ||= nO(a, String(t), r), s && (AD(s), await ID(s), yO(s, r), jD(s), await VD(120), i = [s], n.push(String(t)));
28398
+ let s = aO(a, String(t));
28399
+ s ||= XD(a, String(t)), s ||= ZD(a, String(t), r), s && (TD(s), await jD(s), mO(s, r), ED(s), await ID(120), i = [s], n.push(String(t)));
28399
28400
  }
28400
28401
  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.";
28401
28402
  let a = `OK_FILLED: ${n.join(", ")}`;
28402
- return $("flowengage_fill_form ✓", a), SD("Form filled", {
28403
+ return $("flowengage_fill_form ✓", a), _D("Form filled", {
28403
28404
  spinner: !1,
28404
28405
  icon: "✅",
28405
28406
  duration: 1100
28406
28407
  }), a;
28407
28408
  } catch (e) {
28408
28409
  let t = `flowengage_fill_form error: ${e?.message || String(e)}`;
28409
- return $("flowengage_fill_form ✖", t), SD("Failed to fill form", {
28410
+ return $("flowengage_fill_form ✖", t), _D("Failed to fill form", {
28410
28411
  spinner: !1,
28411
28412
  icon: "⚠️",
28412
28413
  duration: 1800
28413
28414
  }), t;
28414
28415
  } finally {
28415
- LD(), kD(), CD(700);
28416
+ MD(), wD(), vD(700);
28416
28417
  }
28417
28418
  },
28418
28419
  flowengage_click_button: async (e) => {
28419
- let t = pO(e), n = (t.button_text ?? t.buttonText ?? t.text ?? "").trim();
28420
+ let t = cO(e), n = (t.button_text ?? t.buttonText ?? t.text ?? "").trim();
28420
28421
  if ($("flowengage_click_button ▶", n), !n) return "Missing button_text: pass the visible label, e.g. Conduct Audit.";
28421
- let r = fO(n, i);
28422
+ let r = sO(n, i);
28422
28423
  if (!r) return $("flowengage_click_button ✖ no match"), `Could not find a button matching "${n}". Call flowengage_list_forms to see button texts.`;
28423
28424
  try {
28424
- SD(`Clicking ${n}...`, { spinner: !0 });
28425
+ _D(`Clicking ${n}...`, { spinner: !0 });
28425
28426
  try {
28426
28427
  r.scrollIntoView({
28427
28428
  block: "center",
@@ -28430,22 +28431,22 @@ function xO(e) {
28430
28431
  } catch {
28431
28432
  r.scrollIntoView(!0);
28432
28433
  }
28433
- await ID(r), r.focus?.(), await RD(r), zD(r), r.click();
28434
+ await jD(r), r.focus?.(), await ND(r), PD(r), r.click();
28434
28435
  let e = (r.textContent || r.value || r.getAttribute("aria-label") || "").trim().slice(0, 80) || "button", t = `OK_CLICK ${e}`;
28435
- return $("flowengage_click_button ✓", t), SD(`Clicked ${e}`, {
28436
+ return $("flowengage_click_button ✓", t), _D(`Clicked ${e}`, {
28436
28437
  spinner: !1,
28437
28438
  icon: "✅",
28438
28439
  duration: 1200
28439
28440
  }), t;
28440
28441
  } catch (e) {
28441
28442
  let t = `Click failed: ${e?.message || String(e)}`;
28442
- return $("flowengage_click_button ✖", t), SD("Click failed", {
28443
+ return $("flowengage_click_button ✖", t), _D("Click failed", {
28443
28444
  spinner: !1,
28444
28445
  icon: "⚠️",
28445
28446
  duration: 1800
28446
28447
  }), t;
28447
28448
  } finally {
28448
- LD(), CD(700);
28449
+ MD(), vD(700);
28449
28450
  }
28450
28451
  }
28451
28452
  };
@@ -28463,7 +28464,7 @@ function xO(e) {
28463
28464
  }
28464
28465
  //#endregion
28465
28466
  //#region src/utils/wrapVoiceToolsForLogging.js
28466
- function SO(e) {
28467
+ function _O(e) {
28467
28468
  return !e || typeof e != "object" ? e : Object.fromEntries(Object.entries(e).map(([e, t]) => [e, async (n) => {
28468
28469
  let r = mn();
28469
28470
  r ? console.log("[FlowEngage:voice-tool] ▶", e, n) : console.info(`[FlowEngage] voice tool » ${e}`);
@@ -28480,7 +28481,7 @@ function SO(e) {
28480
28481
  }
28481
28482
  //#endregion
28482
28483
  //#region src/components/FlowEngageWidget.jsx
28483
- var CO = {
28484
+ var vO = {
28484
28485
  blue: "#135bd8",
28485
28486
  red: "#ef334b",
28486
28487
  yellow: "#ffbd2e",
@@ -28488,7 +28489,7 @@ var CO = {
28488
28489
  highlight: "rgba(255,255,255,0.9)",
28489
28490
  green: "#10b981"
28490
28491
  };
28491
- function wO(e) {
28492
+ function yO(e) {
28492
28493
  if (!Array.isArray(e) || e.length < 2) return "linear-gradient(145deg, #dce8f022 0%, #e8dff522 45%, #f5e0e022 100%), #f7f8fa";
28493
28494
  let [t, n, r] = e;
28494
28495
  return e.length >= 3 && r ? [
@@ -28502,12 +28503,12 @@ function wO(e) {
28502
28503
  "#f7f8fa"
28503
28504
  ].join(", ");
28504
28505
  }
28505
- function TO(e) {
28506
+ function bO(e) {
28506
28507
  if (!e || typeof e != "string") return "#1a1a1a";
28507
28508
  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;
28508
28509
  return .2126 * o(r) + .7152 * o(i) + .0722 * o(a) > .179 ? "#1a1a1a" : "#ffffff";
28509
28510
  }
28510
- function EO({ logo: t, style: n }) {
28511
+ function xO({ logo: t, style: n }) {
28511
28512
  if (!t) return null;
28512
28513
  if (typeof t == "string") return /* @__PURE__ */ g("img", {
28513
28514
  src: t,
@@ -28532,7 +28533,7 @@ function EO({ logo: t, style: n }) {
28532
28533
  children: r
28533
28534
  }) : null;
28534
28535
  }
28535
- function DO({ title: e }) {
28536
+ function SO({ title: e }) {
28536
28537
  return /* @__PURE__ */ g("div", {
28537
28538
  style: {
28538
28539
  width: "100%",
@@ -28550,18 +28551,18 @@ function DO({ title: e }) {
28550
28551
  children: String(e || "FE").split(/\s+/).filter(Boolean).slice(0, 2).map((e) => e[0]?.toUpperCase() || "").join("") || "FE"
28551
28552
  });
28552
28553
  }
28553
- function OO(e, t) {
28554
+ function CO(e, t) {
28554
28555
  let n = (t || "").trim();
28555
28556
  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;
28556
28557
  }
28557
- function kO({ orbColors: e, ...t }) {
28558
+ function wO({ orbColors: e, ...t }) {
28558
28559
  return /* @__PURE__ */ g(rD, {
28559
28560
  colors: e,
28560
28561
  ...t
28561
28562
  });
28562
28563
  }
28563
- function AO({ copy: e, orbColors: t, primaryColor: n, onYes: r, onLater: i, isMobile: a }) {
28564
- let o = n || CO.green, s = TO(o), c = a ? 72 : 94, l = /* @__PURE__ */ _("div", {
28564
+ function TO({ copy: e, orbColors: t, primaryColor: n, onYes: r, onLater: i, isMobile: a }) {
28565
+ let o = n || vO.green, s = bO(o), c = a ? 72 : 94, l = /* @__PURE__ */ _("div", {
28565
28566
  style: {
28566
28567
  display: "flex",
28567
28568
  alignItems: "center",
@@ -28678,7 +28679,7 @@ function AO({ copy: e, orbColors: t, primaryColor: n, onYes: r, onLater: i, isMo
28678
28679
  delay: 0
28679
28680
  },
28680
28681
  style: { flexShrink: 0 },
28681
- children: /* @__PURE__ */ g(kO, {
28682
+ children: /* @__PURE__ */ g(wO, {
28682
28683
  size: c,
28683
28684
  orbColors: t
28684
28685
  })
@@ -28706,8 +28707,8 @@ function AO({ copy: e, orbColors: t, primaryColor: n, onYes: r, onLater: i, isMo
28706
28707
  children: l
28707
28708
  }) : l] });
28708
28709
  }
28709
- function jO({ copy: e, orbColors: t, primaryColor: n, onVoice: r, onText: i, onClose: a }) {
28710
- let o = n || CO.green, s = TO(o);
28710
+ function EO({ copy: e, orbColors: t, primaryColor: n, onVoice: r, onText: i, onClose: a }) {
28711
+ let o = n || vO.green, s = bO(o);
28711
28712
  return /* @__PURE__ */ _(Np.div, {
28712
28713
  initial: {
28713
28714
  scale: 50 / 300,
@@ -28771,7 +28772,7 @@ function jO({ copy: e, orbColors: t, primaryColor: n, onVoice: r, onText: i, onC
28771
28772
  children: /* @__PURE__ */ g("polyline", { points: "6 9 12 15 18 9" })
28772
28773
  })
28773
28774
  }),
28774
- /* @__PURE__ */ g(kO, {
28775
+ /* @__PURE__ */ g(wO, {
28775
28776
  size: 82,
28776
28777
  orbColors: t
28777
28778
  }),
@@ -28840,7 +28841,7 @@ function jO({ copy: e, orbColors: t, primaryColor: n, onVoice: r, onText: i, onC
28840
28841
  ]
28841
28842
  });
28842
28843
  }
28843
- function MO({ orbColors: e, onEnterChat: t, onEndChat: n, agentId: r, siteId: i, apiBaseUrl: a, historyRef: s, onMessageSync: l }) {
28844
+ function DO({ orbColors: e, onEnterChat: t, onEndChat: n, agentId: r, siteId: i, apiBaseUrl: a, historyRef: s, onMessageSync: l }) {
28844
28845
  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") => {
28845
28846
  ne.current = e, te.current = !0, queueMicrotask(() => {
28846
28847
  w.current || (w.current = !0, C.current?.());
@@ -28864,7 +28865,7 @@ function MO({ orbColors: e, onEnterChat: t, onEndChat: n, agentId: r, siteId: i,
28864
28865
  try {
28865
28866
  if ((await navigator.mediaDevices.getUserMedia({ audio: !0 })).getTracks().forEach((e) => e.stop()), e) return;
28866
28867
  s.current = [], S.current = "", w.current = !1, ee.current = !1, te.current = !1, ne.current = "minimized";
28867
- let t = SO(xO({
28868
+ let t = _O(gO({
28868
28869
  siteId: i || null,
28869
28870
  apiBaseUrl: a || null,
28870
28871
  getLastUserVoiceText: () => S.current,
@@ -28885,7 +28886,7 @@ function MO({ orbColors: e, onEnterChat: t, onEndChat: n, agentId: r, siteId: i,
28885
28886
  sender: n,
28886
28887
  message: r,
28887
28888
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
28888
- }], OO(n, r) && E("minimized"));
28889
+ }], CO(n, r) && E("minimized"));
28889
28890
  },
28890
28891
  onError: (t) => {
28891
28892
  if (!e && !te.current && !ee.current) {
@@ -28972,7 +28973,7 @@ function MO({ orbColors: e, onEnterChat: t, onEndChat: n, agentId: r, siteId: i,
28972
28973
  whiteSpace: "nowrap"
28973
28974
  },
28974
28975
  children: "Listening..."
28975
- }), /* @__PURE__ */ g(kO, {
28976
+ }), /* @__PURE__ */ g(wO, {
28976
28977
  size: 94,
28977
28978
  voiceState: u,
28978
28979
  isMuted: f,
@@ -29214,7 +29215,7 @@ function MO({ orbColors: e, onEnterChat: t, onEndChat: n, agentId: r, siteId: i,
29214
29215
  ]
29215
29216
  }) });
29216
29217
  }
29217
- function NO({ orbColors: e }) {
29218
+ function OO({ orbColors: e }) {
29218
29219
  return /* @__PURE__ */ g("div", {
29219
29220
  style: {
29220
29221
  flexShrink: 0,
@@ -29224,13 +29225,13 @@ function NO({ orbColors: e }) {
29224
29225
  alignItems: "center",
29225
29226
  justifyContent: "center"
29226
29227
  },
29227
- children: /* @__PURE__ */ g(kO, {
29228
+ children: /* @__PURE__ */ g(wO, {
29228
29229
  size: 36,
29229
29230
  orbColors: e
29230
29231
  })
29231
29232
  });
29232
29233
  }
29233
- var PO = () => /* @__PURE__ */ g("div", {
29234
+ var kO = () => /* @__PURE__ */ g("div", {
29234
29235
  style: {
29235
29236
  display: "flex",
29236
29237
  marginBottom: "12px",
@@ -29260,7 +29261,7 @@ var PO = () => /* @__PURE__ */ g("div", {
29260
29261
  } }, e))
29261
29262
  })
29262
29263
  });
29263
- function FO({ 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 }) {
29264
+ function AO({ 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 }) {
29264
29265
  let Oe = l.length > 0, ke = w || T || C, Ae = !!(he || ve), [je, Me] = m(!1), Ne = p(null);
29265
29266
  return c(() => {
29266
29267
  if (!je) return;
@@ -29362,7 +29363,7 @@ function FO({ copy: e, orbColors: t, primaryColor: n, chatBgGradient: r, logo: i
29362
29363
  justifyContent: "center",
29363
29364
  height: "40px"
29364
29365
  },
29365
- children: i ? /* @__PURE__ */ g(EO, {
29366
+ children: i ? /* @__PURE__ */ g(xO, {
29366
29367
  logo: i,
29367
29368
  style: {
29368
29369
  height: "34px",
@@ -29375,7 +29376,7 @@ function FO({ copy: e, orbColors: t, primaryColor: n, chatBgGradient: r, logo: i
29375
29376
  height: "40px",
29376
29377
  flexShrink: 0
29377
29378
  },
29378
- children: /* @__PURE__ */ g(DO, { title: e.chatTitle })
29379
+ children: /* @__PURE__ */ g(SO, { title: e.chatTitle })
29379
29380
  })
29380
29381
  }), /* @__PURE__ */ g("div", {
29381
29382
  style: {
@@ -29594,11 +29595,11 @@ function FO({ copy: e, orbColors: t, primaryColor: n, chatBgGradient: r, logo: i
29594
29595
  isAiTyping: u,
29595
29596
  isAgentTyping: d,
29596
29597
  setReplyContext: ue,
29597
- TypingDots: PO,
29598
+ TypingDots: kO,
29598
29599
  primaryColor: n,
29599
29600
  agentHeadshot: v,
29600
29601
  agentDisplayName: h || y,
29601
- botAvatarNode: /* @__PURE__ */ g(NO, { orbColors: t })
29602
+ botAvatarNode: /* @__PURE__ */ g(OO, { orbColors: t })
29602
29603
  }) : /* @__PURE__ */ _("div", {
29603
29604
  style: {
29604
29605
  flex: 1,
@@ -29611,7 +29612,7 @@ function FO({ copy: e, orbColors: t, primaryColor: n, chatBgGradient: r, logo: i
29611
29612
  padding: "28px 24px"
29612
29613
  },
29613
29614
  children: [
29614
- /* @__PURE__ */ g(kO, {
29615
+ /* @__PURE__ */ g(wO, {
29615
29616
  size: 94,
29616
29617
  orbColors: t
29617
29618
  }),
@@ -29719,7 +29720,7 @@ function FO({ copy: e, orbColors: t, primaryColor: n, chatBgGradient: r, logo: i
29719
29720
  ]
29720
29721
  });
29721
29722
  }
29722
- function IO() {
29723
+ function jO() {
29723
29724
  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();
29724
29725
  c(() => {
29725
29726
  try {
@@ -29732,7 +29733,7 @@ function IO() {
29732
29733
  }, Ce = {
29733
29734
  ...be.theme || {},
29734
29735
  ...xe.theme || {}
29735
- }, 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 = wO(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) => ({
29736
+ }, 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 = yO(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) => ({
29736
29737
  id: e.key || `qr-${t}`,
29737
29738
  label: e.label,
29738
29739
  message: e.label,
@@ -29913,7 +29914,7 @@ function IO() {
29913
29914
  ...yt
29914
29915
  },
29915
29916
  children: [
29916
- Ke === "entry_prompt" && /* @__PURE__ */ g(AO, {
29917
+ Ke === "entry_prompt" && /* @__PURE__ */ g(TO, {
29917
29918
  copy: Le,
29918
29919
  orbColors: we,
29919
29920
  primaryColor: Te,
@@ -29934,13 +29935,13 @@ function IO() {
29934
29935
  transformOrigin: "bottom right",
29935
29936
  display: "inline-block"
29936
29937
  },
29937
- children: /* @__PURE__ */ g(kO, {
29938
+ children: /* @__PURE__ */ g(wO, {
29938
29939
  size: 50,
29939
29940
  orbColors: we,
29940
29941
  onClick: xt
29941
29942
  })
29942
29943
  }),
29943
- Ke === "connection_modal" && /* @__PURE__ */ g(jO, {
29944
+ Ke === "connection_modal" && /* @__PURE__ */ g(EO, {
29944
29945
  copy: Le,
29945
29946
  orbColors: we,
29946
29947
  primaryColor: Te,
@@ -29948,7 +29949,7 @@ function IO() {
29948
29949
  onText: Ct,
29949
29950
  onClose: bt
29950
29951
  }),
29951
- Ke === "voice_mode" && /* @__PURE__ */ g(MO, {
29952
+ Ke === "voice_mode" && /* @__PURE__ */ g(DO, {
29952
29953
  orbColors: we,
29953
29954
  onEnterChat: Ct,
29954
29955
  onEndChat: wt,
@@ -29958,7 +29959,7 @@ function IO() {
29958
29959
  historyRef: ie,
29959
29960
  onMessageSync: ae
29960
29961
  }, "voice"),
29961
- Ke === "text_chat" && /* @__PURE__ */ g(FO, {
29962
+ Ke === "text_chat" && /* @__PURE__ */ g(AO, {
29962
29963
  copy: Le,
29963
29964
  orbColors: we,
29964
29965
  primaryColor: Te,
@@ -30016,4 +30017,4 @@ function IO() {
30016
30017
  });
30017
30018
  }
30018
30019
  //#endregion
30019
- export { rD as AnimatedOrb, Wn as FlowEngageProvider, IO as FlowEngageWidget, pn as useFlowEngage };
30020
+ export { rD as AnimatedOrb, Wn as FlowEngageProvider, jO as FlowEngageWidget, pn as useFlowEngage };