@flowengage/react-chatbot 6.0.32 → 6.0.33
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.
|
@@ -31400,27 +31400,27 @@ function Rk() {
|
|
|
31400
31400
|
pr();
|
|
31401
31401
|
} catch {}
|
|
31402
31402
|
}, []), c(() => {
|
|
31403
|
-
Ee &&
|
|
31403
|
+
Ee && k !== "voice_mode" && k !== "text_chat" && k !== "call_screen" && (ue?.(!1), A("text_chat"));
|
|
31404
31404
|
}, [Ee]);
|
|
31405
31405
|
let Oe = t?.widgetSettings || {}, ke = n?.widgetSettings || {}, Ae = {
|
|
31406
31406
|
...Oe.branding || {},
|
|
31407
31407
|
...ke.branding || {}
|
|
31408
|
-
},
|
|
31408
|
+
}, je = {
|
|
31409
31409
|
...Oe.theme || {},
|
|
31410
31410
|
...ke.theme || {}
|
|
31411
|
-
},
|
|
31411
|
+
}, Ne = {
|
|
31412
31412
|
...Oe.features || {},
|
|
31413
31413
|
...ke.features || {}
|
|
31414
|
-
},
|
|
31414
|
+
}, Pe = Ne.voice !== !1, Ie = Array.isArray(je.orbColors) && je.orbColors.length > 0 ? je.orbColors : null, Le = je.buttonColor || je.primaryColor || Ie?.[0] || "#3B82F6", ze = {
|
|
31415
31415
|
small: 50,
|
|
31416
31416
|
medium: 64,
|
|
31417
31417
|
large: 80
|
|
31418
|
-
},
|
|
31418
|
+
}, Be = ze[je.orbSize] || ze.small, Ve = je.position || "bottom-right", He = Ae.fallbackAgentName || "Agent", O = Tk(Ie ?? je.chatBgColors), Ue = Ae.logo || Ae.logoUrl || null, We = E || "en", Ge = Oe.recommendations?.[We] || [], Ke = (ke.recommendations?.[We] ?? Ge).filter((e) => String(e?.label ?? "").trim()).map((e, t) => ({
|
|
31419
31419
|
id: e.key || `qr-${t}`,
|
|
31420
31420
|
label: e.label,
|
|
31421
31421
|
message: e.label,
|
|
31422
31422
|
text: e.label
|
|
31423
|
-
})),
|
|
31423
|
+
})), qe = Array.isArray(Ae.quickChatOptions) && Ae.quickChatOptions.length > 0 ? Ae.quickChatOptions : Ke, Je = Ae.hideWatermark === !0 ? !1 : Ae.showPoweredBy !== !1, Ye = Ae.chatbotEnabled !== !1 && je.chatbotEnabled !== !1, Xe = Oe.greetings?.[E] || ke.greetings?.[E] || Ae.introGreeting || "Hello, I'm here to help you know more about OpenSense Labs.", Ze = {
|
|
31424
31424
|
entryPrompt: Ae.entryPrompt || "Do you want to explore in a new way?",
|
|
31425
31425
|
yesLabel: Ae.yesLabel || "Yes",
|
|
31426
31426
|
laterLabel: Ae.laterLabel || "Later",
|
|
@@ -31428,189 +31428,189 @@ function Rk() {
|
|
|
31428
31428
|
voiceLabel: Ae.voiceLabel || "Voice",
|
|
31429
31429
|
textLabel: Ae.textLabel || "Text",
|
|
31430
31430
|
chatTitle: Ae.headerName || "Chat with FlowEngage",
|
|
31431
|
-
introGreeting:
|
|
31431
|
+
introGreeting: Xe,
|
|
31432
31432
|
inputPlaceholder: Ae.inputPlaceholder || "Type your message",
|
|
31433
31433
|
analysingLabel: Ae.analysingLabel || "analysing..."
|
|
31434
|
-
},
|
|
31434
|
+
}, Qe = ke.elevenLabsAgentId || t?.elevenLabsAgentId || null, $e = t?.siteId || n?.siteId || null, et = t?.apiBaseUrl || "", tt = f(() => l && String(l).trim() || t?.ownerName && String(t.ownerName).trim() || t?.websiteName && String(t.websiteName).trim() || "Agent", [
|
|
31435
31435
|
l,
|
|
31436
31436
|
t?.ownerName,
|
|
31437
31437
|
t?.websiteName
|
|
31438
|
-
]),
|
|
31438
|
+
]), nt = u && String(u).trim() || t?.ownerProfileImageUrl && String(t.ownerProfileImageUrl).trim() || null, rt = r.some((e) => e.sender === "user"), it = f(() => {
|
|
31439
31439
|
let e = r.findIndex((e) => e.sender === "user");
|
|
31440
31440
|
return e === -1 ? !1 : r.slice(e + 1).some((e) => e.sender === "bot" || e.sender === "ai" || e.sender === "agent");
|
|
31441
|
-
}, [r]),
|
|
31441
|
+
}, [r]), at = !!(ke._dashboardLivePreview || Oe._dashboardLivePreview), [k, A] = m(() => at ? "text_chat" : "entry_prompt"), [ot, st] = m(""), [ct, lt] = m(null), [ut, dt] = m(h || ""), [ft, pt] = m(""), [mt, ht] = m(!1), [gt, j] = m(0), [_t, vt] = m(null), [yt, bt] = m(null), [xt, St] = m(""), [Ct, wt] = m(!1), [Tt, Et] = m(!1), [Dt, Ot] = m(!1), kt = p(null), At = p(!1), jt = !h && rt && it && k !== "voice_mode";
|
|
31442
31442
|
d(() => {
|
|
31443
|
-
if (e !== "ready" ||
|
|
31444
|
-
if (
|
|
31445
|
-
|
|
31443
|
+
if (e !== "ready" || At.current) return;
|
|
31444
|
+
if (At.current = !0, !Pe) {
|
|
31445
|
+
A("minimized_orb");
|
|
31446
31446
|
return;
|
|
31447
31447
|
}
|
|
31448
31448
|
let t = !1;
|
|
31449
31449
|
try {
|
|
31450
31450
|
t = Tr().shouldResumeVoice;
|
|
31451
31451
|
} catch {}
|
|
31452
|
-
let n = Fe()
|
|
31452
|
+
let n = Fe();
|
|
31453
31453
|
if (t) {
|
|
31454
|
-
ce?.({ notifyChatInitiated: !0 }), ue?.(!0),
|
|
31454
|
+
ce?.({ notifyChatInitiated: !0 }), ue?.(!0), A("voice_mode");
|
|
31455
31455
|
return;
|
|
31456
31456
|
}
|
|
31457
31457
|
if (Re()) {
|
|
31458
|
-
ce?.({ notifyChatInitiated: !1 }),
|
|
31458
|
+
ce?.({ notifyChatInitiated: !1 }), A("text_chat");
|
|
31459
31459
|
return;
|
|
31460
31460
|
}
|
|
31461
|
-
if (
|
|
31462
|
-
ce?.({ notifyChatInitiated: !0 }), ue?.(!0),
|
|
31461
|
+
if (n) {
|
|
31462
|
+
ce?.({ notifyChatInitiated: !0 }), ue?.(!0), A("voice_mode");
|
|
31463
31463
|
return;
|
|
31464
31464
|
}
|
|
31465
|
-
if (
|
|
31466
|
-
Me(
|
|
31465
|
+
if ($e) try {
|
|
31466
|
+
Me($e);
|
|
31467
31467
|
} catch {}
|
|
31468
|
-
if (fe(
|
|
31469
|
-
|
|
31468
|
+
if (fe($e)) {
|
|
31469
|
+
A("minimized_orb");
|
|
31470
31470
|
return;
|
|
31471
31471
|
}
|
|
31472
31472
|
}, [e, r]);
|
|
31473
|
-
let [
|
|
31473
|
+
let [Mt, Nt] = m(() => typeof window < "u" && window.matchMedia("(max-width: 640px)").matches);
|
|
31474
31474
|
c(() => {
|
|
31475
|
-
let e = window.matchMedia("(max-width: 640px)"), t = (e) =>
|
|
31475
|
+
let e = window.matchMedia("(max-width: 640px)"), t = (e) => Nt(e.matches);
|
|
31476
31476
|
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
31477
31477
|
}, []), c(() => {
|
|
31478
|
-
|
|
31478
|
+
dt(h || ""), h && pt("");
|
|
31479
31479
|
}, [h]);
|
|
31480
|
-
let
|
|
31481
|
-
|
|
31482
|
-
}, []),
|
|
31480
|
+
let Pt = o(() => {
|
|
31481
|
+
bt(null), St("");
|
|
31482
|
+
}, []), Ft = o((e) => {
|
|
31483
31483
|
let t = qD(e);
|
|
31484
31484
|
if (t) {
|
|
31485
|
-
|
|
31485
|
+
bt(null), St(t);
|
|
31486
31486
|
return;
|
|
31487
31487
|
}
|
|
31488
|
-
|
|
31488
|
+
bt(e), St("");
|
|
31489
31489
|
}, []);
|
|
31490
31490
|
c(() => {
|
|
31491
31491
|
if (!te || ee !== "connected") {
|
|
31492
|
-
|
|
31492
|
+
j(0);
|
|
31493
31493
|
return;
|
|
31494
31494
|
}
|
|
31495
31495
|
let e = () => {
|
|
31496
31496
|
let e = new Date(te).getTime();
|
|
31497
|
-
isNaN(e) ||
|
|
31497
|
+
isNaN(e) || j(Math.max(0, Math.floor((Date.now() - e) / 1e3)));
|
|
31498
31498
|
};
|
|
31499
31499
|
e();
|
|
31500
31500
|
let t = window.setInterval(e, 1e3);
|
|
31501
31501
|
return () => window.clearInterval(t);
|
|
31502
31502
|
}, [te, ee]);
|
|
31503
|
-
let
|
|
31504
|
-
|
|
31505
|
-
}, []),
|
|
31506
|
-
|
|
31503
|
+
let It = o(() => {
|
|
31504
|
+
A("call_screen"), Et(!1);
|
|
31505
|
+
}, []), Lt = o(() => {
|
|
31506
|
+
A("text_chat"), Et(!0);
|
|
31507
31507
|
}, []);
|
|
31508
31508
|
c(() => {
|
|
31509
31509
|
let e = w?.callId || T || null;
|
|
31510
31510
|
if (!e) {
|
|
31511
|
-
|
|
31511
|
+
kt.current = null;
|
|
31512
31512
|
return;
|
|
31513
31513
|
}
|
|
31514
31514
|
if (w?.callId || ee === "connecting" || ee === "connected") {
|
|
31515
|
-
if (
|
|
31516
|
-
|
|
31515
|
+
if (k === "minimized_orb" && Tt && T && !w?.callId) {
|
|
31516
|
+
kt.current = e;
|
|
31517
31517
|
return;
|
|
31518
31518
|
}
|
|
31519
|
-
!(!i ||
|
|
31519
|
+
!(!i || k === "minimized_orb" || k === "voice_mode") && kt.current === e || (console.log("[FlowEngageWidget] forcing call UI to front", {
|
|
31520
31520
|
forcedKey: e,
|
|
31521
31521
|
isOpen: i,
|
|
31522
|
-
surface:
|
|
31522
|
+
surface: k,
|
|
31523
31523
|
hasIncomingCall: !!w?.callId,
|
|
31524
31524
|
activeCallId: T,
|
|
31525
31525
|
callConnectionState: ee
|
|
31526
|
-
}),
|
|
31526
|
+
}), kt.current = e, k === "voice_mode" && ue?.(!1), ce?.(), It());
|
|
31527
31527
|
}
|
|
31528
31528
|
}, [
|
|
31529
31529
|
T,
|
|
31530
31530
|
ee,
|
|
31531
|
-
|
|
31531
|
+
It,
|
|
31532
31532
|
w?.callId,
|
|
31533
31533
|
i,
|
|
31534
31534
|
ce,
|
|
31535
31535
|
ue,
|
|
31536
|
-
|
|
31536
|
+
k
|
|
31537
31537
|
]), c(() => {
|
|
31538
|
-
!w && !T &&
|
|
31538
|
+
!w && !T && k === "call_screen" && A("text_chat");
|
|
31539
31539
|
}, [
|
|
31540
31540
|
w,
|
|
31541
31541
|
T,
|
|
31542
|
-
|
|
31542
|
+
k
|
|
31543
31543
|
]), c(() => {
|
|
31544
|
-
!T &&
|
|
31545
|
-
}, [T,
|
|
31544
|
+
!T && Tt && Et(!1);
|
|
31545
|
+
}, [T, Tt]), c(() => {
|
|
31546
31546
|
if (!s || C) {
|
|
31547
31547
|
Se?.(""), xe?.();
|
|
31548
31548
|
return;
|
|
31549
31549
|
}
|
|
31550
|
-
if (!
|
|
31550
|
+
if (!ot.trim() || yt) {
|
|
31551
31551
|
Se?.("");
|
|
31552
31552
|
let e = window.setTimeout(() => xe?.(), 100);
|
|
31553
31553
|
return () => window.clearTimeout(e);
|
|
31554
31554
|
}
|
|
31555
31555
|
be?.();
|
|
31556
|
-
let e = window.setTimeout(() => Se?.(
|
|
31556
|
+
let e = window.setTimeout(() => Se?.(ot), 120), t = window.setTimeout(() => xe?.(), 1200);
|
|
31557
31557
|
return () => {
|
|
31558
31558
|
window.clearTimeout(e), window.clearTimeout(t);
|
|
31559
31559
|
};
|
|
31560
31560
|
}, [
|
|
31561
|
-
|
|
31562
|
-
|
|
31561
|
+
ot,
|
|
31562
|
+
yt,
|
|
31563
31563
|
s,
|
|
31564
31564
|
C,
|
|
31565
31565
|
be,
|
|
31566
31566
|
xe,
|
|
31567
31567
|
Se
|
|
31568
31568
|
]);
|
|
31569
|
-
let
|
|
31569
|
+
let Rt = (e) => e ? {
|
|
31570
31570
|
replyTo: e.messageId || e.id || null,
|
|
31571
31571
|
replyToContent: (e.replyToContent || e.message || "").replace(/<[^>]+>/g, "").trim().slice(0, 200),
|
|
31572
31572
|
replyToSender: e.sender || null
|
|
31573
|
-
} : null,
|
|
31573
|
+
} : null, zt = async (e) => {
|
|
31574
31574
|
if (e.preventDefault(), C) return;
|
|
31575
|
-
if (
|
|
31576
|
-
let e =
|
|
31575
|
+
if (jt) {
|
|
31576
|
+
let e = ut.trim().toLowerCase();
|
|
31577
31577
|
if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)) {
|
|
31578
|
-
|
|
31578
|
+
pt("Please enter a valid email so we can continue helping you.");
|
|
31579
31579
|
return;
|
|
31580
31580
|
}
|
|
31581
|
-
await le(e),
|
|
31581
|
+
await le(e), pt(""), ht(!0), setTimeout(() => ht(!1), 3e3);
|
|
31582
31582
|
return;
|
|
31583
31583
|
}
|
|
31584
|
-
let t =
|
|
31585
|
-
if (!
|
|
31586
|
-
if (
|
|
31584
|
+
let t = Rt(ct);
|
|
31585
|
+
if (!ot.trim() && !yt) return;
|
|
31586
|
+
if (yt) {
|
|
31587
31587
|
try {
|
|
31588
|
-
|
|
31589
|
-
let e = await se(
|
|
31590
|
-
|
|
31588
|
+
wt(!0), St("");
|
|
31589
|
+
let e = await se(yt), n = e?.data || e, r = ot.trim() || `Shared file: ${YD(yt)}`;
|
|
31590
|
+
st(""), lt(null), Pt(), await D(r, "", t, {
|
|
31591
31591
|
type: "file",
|
|
31592
31592
|
metadata: {
|
|
31593
31593
|
fileUrl: n?.fileUrl,
|
|
31594
|
-
fileName: n?.fileName ||
|
|
31595
|
-
fileType: n?.fileType ||
|
|
31596
|
-
fileSize: n?.fileSize ||
|
|
31594
|
+
fileName: n?.fileName || yt.name,
|
|
31595
|
+
fileType: n?.fileType || yt.type,
|
|
31596
|
+
fileSize: n?.fileSize || yt.size
|
|
31597
31597
|
}
|
|
31598
31598
|
});
|
|
31599
31599
|
} catch (e) {
|
|
31600
|
-
|
|
31600
|
+
St(e?.message || "Failed to upload the selected file.");
|
|
31601
31601
|
} finally {
|
|
31602
|
-
|
|
31602
|
+
wt(!1);
|
|
31603
31603
|
}
|
|
31604
31604
|
return;
|
|
31605
31605
|
}
|
|
31606
|
-
let n =
|
|
31607
|
-
|
|
31608
|
-
},
|
|
31606
|
+
let n = ot.trim();
|
|
31607
|
+
st(""), lt(null), await D(n, "", t);
|
|
31608
|
+
}, Bt = o(() => {
|
|
31609
31609
|
r.length !== 0 && me?.();
|
|
31610
|
-
}, [r.length, me]),
|
|
31610
|
+
}, [r.length, me]), Vt = (e) => {
|
|
31611
31611
|
let t = Math.floor(e / 60);
|
|
31612
31612
|
return `${String(t).padStart(2, "0")}:${String(e % 60).padStart(2, "0")}`;
|
|
31613
|
-
},
|
|
31613
|
+
}, Ht = o(async (e) => {
|
|
31614
31614
|
if (C || b) return;
|
|
31615
31615
|
let t = e.message || e.label || e.text || "";
|
|
31616
31616
|
t.trim() && await D(t.trim(), "");
|
|
@@ -31618,44 +31618,44 @@ function Rk() {
|
|
|
31618
31618
|
C,
|
|
31619
31619
|
b,
|
|
31620
31620
|
D
|
|
31621
|
-
]),
|
|
31621
|
+
]), Ut = Mt && k === "entry_prompt" ? { inset: 0 } : Mt && k === "text_chat" ? {
|
|
31622
31622
|
left: 0,
|
|
31623
31623
|
right: 0,
|
|
31624
31624
|
bottom: 0
|
|
31625
|
-
} :
|
|
31625
|
+
} : Mt && k === "call_screen" ? {
|
|
31626
31626
|
left: 0,
|
|
31627
31627
|
right: 0,
|
|
31628
31628
|
bottom: 0,
|
|
31629
31629
|
height: "90dvh",
|
|
31630
31630
|
overflow: "hidden",
|
|
31631
31631
|
borderRadius: "16px 16px 0 0"
|
|
31632
|
-
} :
|
|
31632
|
+
} : Mt && k === "connection_modal" ? {
|
|
31633
31633
|
left: "12px",
|
|
31634
31634
|
right: "12px",
|
|
31635
31635
|
bottom: "12px"
|
|
31636
|
-
} :
|
|
31636
|
+
} : k === "call_screen" ? {
|
|
31637
31637
|
width: "min(350px, calc(100vw - 40px))",
|
|
31638
31638
|
height: "min(640px, calc(100vh - 120px))",
|
|
31639
31639
|
borderRadius: "22px",
|
|
31640
31640
|
overflow: "hidden",
|
|
31641
|
-
...
|
|
31641
|
+
...Ve === "bottom-left" ? {
|
|
31642
31642
|
left: "1.5rem",
|
|
31643
31643
|
bottom: "1.5rem"
|
|
31644
31644
|
} : {
|
|
31645
31645
|
right: "1.5rem",
|
|
31646
31646
|
bottom: "1.5rem"
|
|
31647
31647
|
}
|
|
31648
|
-
} :
|
|
31648
|
+
} : Ve === "bottom-left" ? {
|
|
31649
31649
|
left: "1.5rem",
|
|
31650
31650
|
bottom: "1.5rem"
|
|
31651
31651
|
} : {
|
|
31652
31652
|
right: "1.5rem",
|
|
31653
31653
|
bottom: "1.5rem"
|
|
31654
|
-
},
|
|
31655
|
-
|
|
31656
|
-
|
|
31654
|
+
}, Wt = o(() => {
|
|
31655
|
+
k !== "minimized_orb" && (Ot(!0), setTimeout(() => {
|
|
31656
|
+
A("minimized_orb"), Ot(!1), T && Et(!0);
|
|
31657
31657
|
}, 280));
|
|
31658
|
-
}, [T,
|
|
31658
|
+
}, [T, k]), Gt = () => A("connection_modal"), Kt = () => {
|
|
31659
31659
|
try {
|
|
31660
31660
|
let e = window.AudioContext || window.webkitAudioContext;
|
|
31661
31661
|
if (e) {
|
|
@@ -31663,36 +31663,36 @@ function Rk() {
|
|
|
31663
31663
|
t.resume().catch(() => {}), setTimeout(() => t.close().catch(() => {}), 3e3);
|
|
31664
31664
|
}
|
|
31665
31665
|
} catch {}
|
|
31666
|
-
ce({ notifyChatInitiated: !0 }), ue?.(!0),
|
|
31666
|
+
ce({ notifyChatInitiated: !0 }), ue?.(!0), A("voice_mode");
|
|
31667
|
+
}, qt = () => {
|
|
31668
|
+
ce({ notifyChatInitiated: !0 }), ue?.(!1), A("text_chat");
|
|
31667
31669
|
}, Jt = () => {
|
|
31668
|
-
|
|
31669
|
-
}, Yt = () => {
|
|
31670
|
-
ue?.(!1), Gt();
|
|
31670
|
+
ue?.(!1), Wt();
|
|
31671
31671
|
};
|
|
31672
|
-
return e !== "ready" || !
|
|
31672
|
+
return e !== "ready" || !Ye || Ne.chat === !1 ? null : /* @__PURE__ */ _("div", {
|
|
31673
31673
|
className: "flowengage-widget-root",
|
|
31674
31674
|
style: {
|
|
31675
31675
|
position: "fixed",
|
|
31676
31676
|
zIndex: 999999,
|
|
31677
|
-
...
|
|
31677
|
+
...Ut
|
|
31678
31678
|
},
|
|
31679
31679
|
onWheel: (e) => e.stopPropagation(),
|
|
31680
31680
|
onTouchMove: (e) => e.stopPropagation(),
|
|
31681
31681
|
children: [
|
|
31682
|
-
|
|
31683
|
-
copy:
|
|
31684
|
-
orbColors:
|
|
31685
|
-
primaryColor:
|
|
31682
|
+
k === "entry_prompt" && /* @__PURE__ */ g(Mk, {
|
|
31683
|
+
copy: Ze,
|
|
31684
|
+
orbColors: Ie,
|
|
31685
|
+
primaryColor: Le,
|
|
31686
31686
|
onYes: () => {
|
|
31687
|
-
pe(
|
|
31687
|
+
pe($e), Kt();
|
|
31688
31688
|
},
|
|
31689
31689
|
onLater: () => {
|
|
31690
|
-
pe(
|
|
31690
|
+
pe($e), Wt();
|
|
31691
31691
|
},
|
|
31692
|
-
isMobile:
|
|
31693
|
-
isClosing:
|
|
31692
|
+
isMobile: Mt,
|
|
31693
|
+
isClosing: Dt
|
|
31694
31694
|
}),
|
|
31695
|
-
|
|
31695
|
+
k === "minimized_orb" && /* @__PURE__ */ _(Dm.div, {
|
|
31696
31696
|
layoutId: "fe-main-orb",
|
|
31697
31697
|
initial: {
|
|
31698
31698
|
scale: .4,
|
|
@@ -31711,14 +31711,14 @@ function Rk() {
|
|
|
31711
31711
|
transformOrigin: "bottom right",
|
|
31712
31712
|
display: "inline-flex",
|
|
31713
31713
|
flexDirection: "column",
|
|
31714
|
-
alignItems:
|
|
31714
|
+
alignItems: Ve === "bottom-left" ? "flex-start" : "flex-end",
|
|
31715
31715
|
gap: "10px"
|
|
31716
31716
|
},
|
|
31717
31717
|
children: [T && /* @__PURE__ */ _("button", {
|
|
31718
31718
|
type: "button",
|
|
31719
|
-
onClick:
|
|
31719
|
+
onClick: It,
|
|
31720
31720
|
style: {
|
|
31721
|
-
maxWidth:
|
|
31721
|
+
maxWidth: Mt ? "220px" : "240px",
|
|
31722
31722
|
padding: "10px 14px",
|
|
31723
31723
|
borderRadius: "18px",
|
|
31724
31724
|
border: "1px solid rgba(255,255,255,0.7)",
|
|
@@ -31759,109 +31759,109 @@ function Rk() {
|
|
|
31759
31759
|
marginTop: "2px",
|
|
31760
31760
|
whiteSpace: "nowrap"
|
|
31761
31761
|
},
|
|
31762
|
-
children: ee === "connected" ? `${
|
|
31762
|
+
children: ee === "connected" ? `${Vt(gt)} with ${tt}` : `Tap to return to ${tt}`
|
|
31763
31763
|
})]
|
|
31764
31764
|
})]
|
|
31765
31765
|
}), /* @__PURE__ */ g(jk, {
|
|
31766
|
-
size:
|
|
31767
|
-
orbColors:
|
|
31768
|
-
onClick: T ?
|
|
31766
|
+
size: Be,
|
|
31767
|
+
orbColors: Ie,
|
|
31768
|
+
onClick: T ? It : Pe ? Gt : qt
|
|
31769
31769
|
})]
|
|
31770
31770
|
}),
|
|
31771
|
-
|
|
31772
|
-
copy:
|
|
31773
|
-
orbColors:
|
|
31774
|
-
primaryColor:
|
|
31775
|
-
onVoice:
|
|
31776
|
-
onText:
|
|
31777
|
-
onClose:
|
|
31778
|
-
isMobile:
|
|
31779
|
-
isClosing:
|
|
31771
|
+
k === "connection_modal" && /* @__PURE__ */ g(Nk, {
|
|
31772
|
+
copy: Ze,
|
|
31773
|
+
orbColors: Ie,
|
|
31774
|
+
primaryColor: Le,
|
|
31775
|
+
onVoice: Kt,
|
|
31776
|
+
onText: qt,
|
|
31777
|
+
onClose: Wt,
|
|
31778
|
+
isMobile: Mt,
|
|
31779
|
+
isClosing: Dt
|
|
31780
31780
|
}),
|
|
31781
|
-
|
|
31782
|
-
orbColors:
|
|
31783
|
-
onEnterChat:
|
|
31784
|
-
onEndChat:
|
|
31785
|
-
agentId:
|
|
31786
|
-
siteId:
|
|
31787
|
-
apiBaseUrl:
|
|
31781
|
+
k === "voice_mode" && /* @__PURE__ */ g(Pk, {
|
|
31782
|
+
orbColors: Ie,
|
|
31783
|
+
onEnterChat: qt,
|
|
31784
|
+
onEndChat: Jt,
|
|
31785
|
+
agentId: Qe,
|
|
31786
|
+
siteId: $e,
|
|
31787
|
+
apiBaseUrl: et,
|
|
31788
31788
|
chatId: ie,
|
|
31789
31789
|
historyRef: ae,
|
|
31790
31790
|
onMessageSync: oe,
|
|
31791
31791
|
voiceEndCounter: De
|
|
31792
31792
|
}, "voice"),
|
|
31793
|
-
|
|
31793
|
+
k === "call_screen" && /* @__PURE__ */ g(gO, {
|
|
31794
31794
|
incomingCall: w,
|
|
31795
31795
|
activeCallId: T,
|
|
31796
31796
|
callConnectionState: ee,
|
|
31797
|
-
callDurationSeconds:
|
|
31797
|
+
callDurationSeconds: gt,
|
|
31798
31798
|
isCallMuted: ne,
|
|
31799
|
-
agentName:
|
|
31800
|
-
agentHeadshot:
|
|
31801
|
-
fallbackAgentName:
|
|
31799
|
+
agentName: tt,
|
|
31800
|
+
agentHeadshot: nt,
|
|
31801
|
+
fallbackAgentName: He,
|
|
31802
31802
|
acceptCall: he,
|
|
31803
31803
|
rejectCall: ge,
|
|
31804
31804
|
endWebRTCCall: _e,
|
|
31805
31805
|
toggleCallMute: ve,
|
|
31806
|
-
formatCallDuration:
|
|
31807
|
-
onMinimize:
|
|
31808
|
-
primaryColor:
|
|
31809
|
-
orbColors:
|
|
31806
|
+
formatCallDuration: Vt,
|
|
31807
|
+
onMinimize: Lt,
|
|
31808
|
+
primaryColor: Le,
|
|
31809
|
+
orbColors: Ie,
|
|
31810
31810
|
chatHistory: r
|
|
31811
31811
|
}),
|
|
31812
|
-
|
|
31813
|
-
isClosing:
|
|
31814
|
-
copy:
|
|
31815
|
-
orbColors:
|
|
31816
|
-
primaryColor:
|
|
31817
|
-
chatBgGradient:
|
|
31818
|
-
logo:
|
|
31819
|
-
quickChatOptions:
|
|
31820
|
-
onQuickChatSelect:
|
|
31821
|
-
isMobile:
|
|
31812
|
+
k === "text_chat" && /* @__PURE__ */ g(Lk, {
|
|
31813
|
+
isClosing: Dt,
|
|
31814
|
+
copy: Ze,
|
|
31815
|
+
orbColors: Ie,
|
|
31816
|
+
primaryColor: Le,
|
|
31817
|
+
chatBgGradient: O,
|
|
31818
|
+
logo: Ue,
|
|
31819
|
+
quickChatOptions: qe,
|
|
31820
|
+
onQuickChatSelect: Ht,
|
|
31821
|
+
isMobile: Mt,
|
|
31822
31822
|
chatHistory: r,
|
|
31823
31823
|
isAiTyping: y,
|
|
31824
31824
|
isAgentTyping: v,
|
|
31825
31825
|
activeScreen: a,
|
|
31826
|
-
agentName:
|
|
31827
|
-
agentHeadshot:
|
|
31828
|
-
fallbackAgentName:
|
|
31829
|
-
input:
|
|
31830
|
-
setInput:
|
|
31831
|
-
onSubmit:
|
|
31826
|
+
agentName: tt,
|
|
31827
|
+
agentHeadshot: nt,
|
|
31828
|
+
fallbackAgentName: He,
|
|
31829
|
+
input: ot,
|
|
31830
|
+
setInput: st,
|
|
31831
|
+
onSubmit: zt,
|
|
31832
31832
|
isConversationEnded: C,
|
|
31833
31833
|
isLoading: b,
|
|
31834
31834
|
isRateLimited: x,
|
|
31835
31835
|
rateLimitMessage: S,
|
|
31836
|
-
selectedFile:
|
|
31837
|
-
onFileSelect:
|
|
31838
|
-
onRemoveSelectedFile:
|
|
31839
|
-
attachmentError:
|
|
31840
|
-
isUploadingAttachment:
|
|
31841
|
-
requiresEmail:
|
|
31842
|
-
emailInput:
|
|
31843
|
-
setEmailInput:
|
|
31844
|
-
emailError:
|
|
31845
|
-
emailCaptureSuccess:
|
|
31846
|
-
replyContext:
|
|
31847
|
-
setReplyContext:
|
|
31836
|
+
selectedFile: yt,
|
|
31837
|
+
onFileSelect: Ft,
|
|
31838
|
+
onRemoveSelectedFile: Pt,
|
|
31839
|
+
attachmentError: xt,
|
|
31840
|
+
isUploadingAttachment: Ct,
|
|
31841
|
+
requiresEmail: jt,
|
|
31842
|
+
emailInput: ut,
|
|
31843
|
+
setEmailInput: dt,
|
|
31844
|
+
emailError: ft,
|
|
31845
|
+
emailCaptureSuccess: mt,
|
|
31846
|
+
replyContext: ct,
|
|
31847
|
+
setReplyContext: lt,
|
|
31848
31848
|
webRTCError: re,
|
|
31849
|
-
micError:
|
|
31850
|
-
setMicError:
|
|
31849
|
+
micError: _t,
|
|
31850
|
+
setMicError: vt,
|
|
31851
31851
|
dismissCallError: ye,
|
|
31852
31852
|
activeCallId: T,
|
|
31853
31853
|
isCallMuted: ne,
|
|
31854
31854
|
toggleCallMute: ve,
|
|
31855
31855
|
endWebRTCCall: _e,
|
|
31856
|
-
formatCallDuration:
|
|
31857
|
-
callDurationSeconds:
|
|
31858
|
-
onCollapse:
|
|
31859
|
-
onStartVoice:
|
|
31860
|
-
onNewChat:
|
|
31861
|
-
onMinimize:
|
|
31862
|
-
onExpand:
|
|
31856
|
+
formatCallDuration: Vt,
|
|
31857
|
+
callDurationSeconds: gt,
|
|
31858
|
+
onCollapse: Wt,
|
|
31859
|
+
onStartVoice: Kt,
|
|
31860
|
+
onNewChat: Bt,
|
|
31861
|
+
onMinimize: Lt,
|
|
31862
|
+
onExpand: It,
|
|
31863
31863
|
isCallMinimized: !!T,
|
|
31864
|
-
showPoweredBy:
|
|
31864
|
+
showPoweredBy: Je,
|
|
31865
31865
|
getVisitorChatHistory: Ce,
|
|
31866
31866
|
resumeChat: we,
|
|
31867
31867
|
isSessionRestoring: Te
|