@cuekit-ai/react 1.3.4 → 1.5.0
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.
- package/dist/{chunk-ZGHSIEXZ.mjs → chunk-MHLYAXXW.mjs} +1301 -784
- package/dist/index.d.mts +91 -71
- package/dist/index.d.ts +91 -71
- package/dist/index.js +1522 -850
- package/dist/index.mjs +366 -203
- package/dist/{webrtc-service-SDVOO4LS.mjs → webrtc-service-AUWJ6AHB.mjs} +3 -1
- package/package.json +4 -3
package/dist/index.mjs
CHANGED
|
@@ -12,16 +12,18 @@ import {
|
|
|
12
12
|
_apiKey,
|
|
13
13
|
_appId,
|
|
14
14
|
authenticate,
|
|
15
|
-
|
|
15
|
+
captureAllInteractiveElements,
|
|
16
|
+
clearElementCache,
|
|
16
17
|
connectToRoom,
|
|
17
18
|
createAudioAnalyser,
|
|
18
19
|
disconnectFromRoom,
|
|
19
20
|
executeAction,
|
|
20
|
-
|
|
21
|
+
getCurrentPathParams,
|
|
21
22
|
getParticipants,
|
|
22
23
|
getRoom,
|
|
23
24
|
getRoomName,
|
|
24
25
|
onStateChange,
|
|
26
|
+
resolveRoutePath,
|
|
25
27
|
sendData,
|
|
26
28
|
sendRuntimeData,
|
|
27
29
|
sendScreenStatus,
|
|
@@ -33,8 +35,9 @@ import {
|
|
|
33
35
|
setNavigationHandler,
|
|
34
36
|
setServerUrl,
|
|
35
37
|
setWebRTCCallbacks,
|
|
36
|
-
setWebRTCConfig
|
|
37
|
-
|
|
38
|
+
setWebRTCConfig,
|
|
39
|
+
validateDynamicElements
|
|
40
|
+
} from "./chunk-MHLYAXXW.mjs";
|
|
38
41
|
|
|
39
42
|
// node_modules/inline-style-parser/index.js
|
|
40
43
|
var require_inline_style_parser = __commonJS({
|
|
@@ -386,7 +389,7 @@ var require_core = __commonJS({
|
|
|
386
389
|
root4.CryptoJS = factory();
|
|
387
390
|
}
|
|
388
391
|
})(exports, function() {
|
|
389
|
-
var CryptoJS = CryptoJS || function(Math2, undefined2) {
|
|
392
|
+
var CryptoJS = CryptoJS || (function(Math2, undefined2) {
|
|
390
393
|
var crypto;
|
|
391
394
|
if (typeof window !== "undefined" && window.crypto) {
|
|
392
395
|
crypto = window.crypto;
|
|
@@ -426,7 +429,7 @@ var require_core = __commonJS({
|
|
|
426
429
|
}
|
|
427
430
|
throw new Error("Native crypto module could not be used to get secure random number.");
|
|
428
431
|
};
|
|
429
|
-
var create2 = Object.create || /* @__PURE__ */ function() {
|
|
432
|
+
var create2 = Object.create || /* @__PURE__ */ (function() {
|
|
430
433
|
function F2() {
|
|
431
434
|
}
|
|
432
435
|
return function(obj) {
|
|
@@ -436,10 +439,10 @@ var require_core = __commonJS({
|
|
|
436
439
|
F2.prototype = null;
|
|
437
440
|
return subtype;
|
|
438
441
|
};
|
|
439
|
-
}();
|
|
442
|
+
})();
|
|
440
443
|
var C = {};
|
|
441
444
|
var C_lib = C.lib = {};
|
|
442
|
-
var Base = C_lib.Base = /* @__PURE__ */ function() {
|
|
445
|
+
var Base = C_lib.Base = /* @__PURE__ */ (function() {
|
|
443
446
|
return {
|
|
444
447
|
/**
|
|
445
448
|
* Creates a new object that inherits from this object.
|
|
@@ -538,7 +541,7 @@ var require_core = __commonJS({
|
|
|
538
541
|
return this.init.prototype.extend(this);
|
|
539
542
|
}
|
|
540
543
|
};
|
|
541
|
-
}();
|
|
544
|
+
})();
|
|
542
545
|
var WordArray = C_lib.WordArray = Base.extend({
|
|
543
546
|
/**
|
|
544
547
|
* Initializes a newly created word array.
|
|
@@ -976,7 +979,7 @@ var require_core = __commonJS({
|
|
|
976
979
|
});
|
|
977
980
|
var C_algo = C.algo = {};
|
|
978
981
|
return C;
|
|
979
|
-
}(Math);
|
|
982
|
+
})(Math);
|
|
980
983
|
return CryptoJS;
|
|
981
984
|
});
|
|
982
985
|
}
|
|
@@ -1282,28 +1285,15 @@ var CuekitProvider = ({
|
|
|
1282
1285
|
};
|
|
1283
1286
|
}, [navigationHandler]);
|
|
1284
1287
|
useEffect(() => {
|
|
1285
|
-
import("./webrtc-service-
|
|
1288
|
+
import("./webrtc-service-AUWJ6AHB.mjs").then(({ setWebRTCCallbacks: setWebRTCCallbacks2 }) => {
|
|
1286
1289
|
setWebRTCCallbacks2({
|
|
1287
1290
|
onNavigationCommand: (command) => {
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
navigationHandler(command.current_page, {
|
|
1295
|
-
intent: command.intent,
|
|
1296
|
-
text: command.text,
|
|
1297
|
-
confidence: command.confidence
|
|
1298
|
-
});
|
|
1299
|
-
}
|
|
1300
|
-
}
|
|
1301
|
-
break;
|
|
1302
|
-
case "user_speech_text":
|
|
1303
|
-
break;
|
|
1304
|
-
case "ai_speech_text":
|
|
1305
|
-
break;
|
|
1306
|
-
default:
|
|
1291
|
+
if (command.data.actionType === "navigate" && command.data.routeName) {
|
|
1292
|
+
if (navigationHandler) {
|
|
1293
|
+
navigationHandler(command.data.routeName);
|
|
1294
|
+
}
|
|
1295
|
+
} else if (command.data.actionType === "click" && command.data.elementId) {
|
|
1296
|
+
console.log("AI intent: Click element", command.data.elementId);
|
|
1307
1297
|
}
|
|
1308
1298
|
},
|
|
1309
1299
|
onConnectionStateChange: (state) => {
|
|
@@ -1384,7 +1374,7 @@ var CuekitProvider = ({
|
|
|
1384
1374
|
};
|
|
1385
1375
|
|
|
1386
1376
|
// src/components/mic-button.tsx
|
|
1387
|
-
import React11, { useState as useState10, useEffect as
|
|
1377
|
+
import React11, { useState as useState10, useEffect as useEffect9, useCallback as useCallback5, useRef as useRef7 } from "react";
|
|
1388
1378
|
|
|
1389
1379
|
// src/hooks/use-cuekit.ts
|
|
1390
1380
|
import { useState as useState3, useCallback as useCallback2, useRef as useRef2 } from "react";
|
|
@@ -1523,9 +1513,18 @@ var useCuekit = (options) => {
|
|
|
1523
1513
|
}, []);
|
|
1524
1514
|
const [micState, setMicState] = useState3("idle");
|
|
1525
1515
|
const [status, setStatus] = useState3("");
|
|
1516
|
+
const [muteState, setMuteState] = useState3({ isMuted: false, canMute: false });
|
|
1526
1517
|
const handleNavigationCommand = (event) => {
|
|
1527
1518
|
console.log(`\u2B07\uFE0F Received event from backend: ${event.type}`, event);
|
|
1528
1519
|
switch (event.type) {
|
|
1520
|
+
case "speech_text": {
|
|
1521
|
+
console.log("\u{1F5E3}\uFE0F AI Speech text:", event.data);
|
|
1522
|
+
break;
|
|
1523
|
+
}
|
|
1524
|
+
case "raw_text": {
|
|
1525
|
+
console.log("\u{1F4DD} Raw text message:", event.data);
|
|
1526
|
+
break;
|
|
1527
|
+
}
|
|
1529
1528
|
case "user_speech_chunk":
|
|
1530
1529
|
case "ai_speech_chunk": {
|
|
1531
1530
|
const role = event.type === "user_speech_chunk" ? "user" : "ai";
|
|
@@ -1561,16 +1560,37 @@ var useCuekit = (options) => {
|
|
|
1561
1560
|
}
|
|
1562
1561
|
case "ai_intent": {
|
|
1563
1562
|
const intent = event.data;
|
|
1564
|
-
|
|
1563
|
+
console.log("\u{1F3AF} AI Intent received:", intent);
|
|
1564
|
+
if (intent.actionType === "click" && intent.elementId) {
|
|
1565
|
+
console.log("\u{1F3AF} Executing click action:", intent.elementId);
|
|
1565
1566
|
executeAction({
|
|
1566
1567
|
action_type: "click",
|
|
1567
|
-
target_element: intent.
|
|
1568
|
+
target_element: intent.elementId
|
|
1568
1569
|
});
|
|
1569
|
-
} else if (intent.actionType === "navigate" && intent.
|
|
1570
|
+
} else if (intent.actionType === "navigate" && intent.routeName) {
|
|
1571
|
+
console.log("\u{1F3AF} Executing navigate action:", intent.routeName);
|
|
1570
1572
|
executeAction({
|
|
1571
1573
|
action_type: "navigate",
|
|
1572
|
-
target_element: intent.
|
|
1574
|
+
target_element: intent.routeName
|
|
1573
1575
|
});
|
|
1576
|
+
} else {
|
|
1577
|
+
console.log("\u{1F3AF} AI Intent not handled:", intent);
|
|
1578
|
+
}
|
|
1579
|
+
break;
|
|
1580
|
+
}
|
|
1581
|
+
case "chat": {
|
|
1582
|
+
const chatData = event.data;
|
|
1583
|
+
console.log("\u{1F4AC} Chat message received:", chatData);
|
|
1584
|
+
if (chatData.message && chatData.sender === "ai") {
|
|
1585
|
+
const newMessage = {
|
|
1586
|
+
id: `ai-${Date.now()}`,
|
|
1587
|
+
role: "ai",
|
|
1588
|
+
text: chatData.message,
|
|
1589
|
+
isFinal: true,
|
|
1590
|
+
timestamp: new Date(chatData.timestamp || Date.now()).toISOString()
|
|
1591
|
+
};
|
|
1592
|
+
setMessages((prev) => [...prev, newMessage]);
|
|
1593
|
+
setMicState("listening");
|
|
1574
1594
|
}
|
|
1575
1595
|
break;
|
|
1576
1596
|
}
|
|
@@ -1606,17 +1626,21 @@ var useCuekit = (options) => {
|
|
|
1606
1626
|
switch (state) {
|
|
1607
1627
|
case "connecting":
|
|
1608
1628
|
setStatus("Connecting...");
|
|
1629
|
+
setMuteState((prev) => ({ ...prev, canMute: false }));
|
|
1609
1630
|
break;
|
|
1610
1631
|
case "connected":
|
|
1611
1632
|
setStatus("");
|
|
1612
1633
|
setMicState("listening");
|
|
1634
|
+
setMuteState((prev) => ({ ...prev, canMute: true }));
|
|
1613
1635
|
break;
|
|
1614
1636
|
case "disconnected":
|
|
1615
1637
|
setStatus("Disconnected");
|
|
1616
1638
|
setMicState("idle");
|
|
1639
|
+
setMuteState({ isMuted: false, canMute: false });
|
|
1617
1640
|
break;
|
|
1618
1641
|
case "reconnecting":
|
|
1619
1642
|
setStatus("Reconnecting...");
|
|
1643
|
+
setMuteState((prev) => ({ ...prev, canMute: false }));
|
|
1620
1644
|
break;
|
|
1621
1645
|
default:
|
|
1622
1646
|
break;
|
|
@@ -1638,7 +1662,88 @@ var useCuekit = (options) => {
|
|
|
1638
1662
|
await webrtc.disconnect();
|
|
1639
1663
|
clearMessages();
|
|
1640
1664
|
setMicState("idle");
|
|
1665
|
+
setMuteState({ isMuted: false, canMute: false });
|
|
1641
1666
|
}, [webrtc, clearMessages]);
|
|
1667
|
+
const toggleMute = useCallback2(async () => {
|
|
1668
|
+
if (!webrtc.isConnected) return;
|
|
1669
|
+
try {
|
|
1670
|
+
const room = webrtc.room;
|
|
1671
|
+
if (!room) return;
|
|
1672
|
+
const localParticipant = room.localParticipant;
|
|
1673
|
+
const audioTrack = localParticipant.getTrackPublication(Track.Source.Microphone)?.track;
|
|
1674
|
+
if (audioTrack) {
|
|
1675
|
+
if (muteState.isMuted) {
|
|
1676
|
+
await audioTrack.unmute();
|
|
1677
|
+
setMuteState((prev) => ({ ...prev, isMuted: false }));
|
|
1678
|
+
} else {
|
|
1679
|
+
await audioTrack.mute();
|
|
1680
|
+
setMuteState((prev) => ({ ...prev, isMuted: true }));
|
|
1681
|
+
}
|
|
1682
|
+
}
|
|
1683
|
+
} catch (error) {
|
|
1684
|
+
console.error("Failed to toggle mute:", error);
|
|
1685
|
+
}
|
|
1686
|
+
}, [webrtc, muteState.isMuted]);
|
|
1687
|
+
const setMute = useCallback2(
|
|
1688
|
+
async (muted) => {
|
|
1689
|
+
if (!webrtc.isConnected) return;
|
|
1690
|
+
try {
|
|
1691
|
+
const room = webrtc.room;
|
|
1692
|
+
if (!room) return;
|
|
1693
|
+
const localParticipant = room.localParticipant;
|
|
1694
|
+
const audioTrack = localParticipant.getTrackPublication(Track.Source.Microphone)?.track;
|
|
1695
|
+
if (audioTrack) {
|
|
1696
|
+
if (muted && !muteState.isMuted) {
|
|
1697
|
+
await audioTrack.mute();
|
|
1698
|
+
setMuteState((prev) => ({ ...prev, isMuted: true }));
|
|
1699
|
+
} else if (!muted && muteState.isMuted) {
|
|
1700
|
+
await audioTrack.unmute();
|
|
1701
|
+
setMuteState((prev) => ({ ...prev, isMuted: false }));
|
|
1702
|
+
}
|
|
1703
|
+
}
|
|
1704
|
+
} catch (error) {
|
|
1705
|
+
console.error("Failed to set mute:", error);
|
|
1706
|
+
}
|
|
1707
|
+
},
|
|
1708
|
+
[webrtc, muteState.isMuted]
|
|
1709
|
+
);
|
|
1710
|
+
const sendChatMessage = useCallback2(
|
|
1711
|
+
async (message) => {
|
|
1712
|
+
if (!webrtc.isConnected) {
|
|
1713
|
+
console.warn("Cannot send chat message: not connected to LiveKit");
|
|
1714
|
+
return;
|
|
1715
|
+
}
|
|
1716
|
+
try {
|
|
1717
|
+
const room = webrtc.room;
|
|
1718
|
+
if (!room) return;
|
|
1719
|
+
const payload = {
|
|
1720
|
+
type: "chat",
|
|
1721
|
+
message,
|
|
1722
|
+
timestamp: Date.now(),
|
|
1723
|
+
sender: "user"
|
|
1724
|
+
};
|
|
1725
|
+
console.log("\u{1F4E4} Sending chat message via LiveKit:", payload);
|
|
1726
|
+
const encoder = new TextEncoder();
|
|
1727
|
+
const encodedData = encoder.encode(JSON.stringify(payload));
|
|
1728
|
+
await room.localParticipant.publishData(encodedData, {
|
|
1729
|
+
reliable: true
|
|
1730
|
+
});
|
|
1731
|
+
const newMessage = {
|
|
1732
|
+
id: `user-${Date.now()}`,
|
|
1733
|
+
role: "user",
|
|
1734
|
+
text: message,
|
|
1735
|
+
isFinal: true,
|
|
1736
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
1737
|
+
};
|
|
1738
|
+
setMessages((prev) => [...prev, newMessage]);
|
|
1739
|
+
setMicState("thinking");
|
|
1740
|
+
} catch (error) {
|
|
1741
|
+
console.error("Failed to send chat message:", error);
|
|
1742
|
+
throw error;
|
|
1743
|
+
}
|
|
1744
|
+
},
|
|
1745
|
+
[webrtc]
|
|
1746
|
+
);
|
|
1642
1747
|
return {
|
|
1643
1748
|
...webrtc,
|
|
1644
1749
|
messages,
|
|
@@ -1647,12 +1752,16 @@ var useCuekit = (options) => {
|
|
|
1647
1752
|
status,
|
|
1648
1753
|
setStatus,
|
|
1649
1754
|
connect,
|
|
1650
|
-
disconnect
|
|
1755
|
+
disconnect,
|
|
1756
|
+
muteState,
|
|
1757
|
+
toggleMute,
|
|
1758
|
+
setMute,
|
|
1759
|
+
sendChatMessage
|
|
1651
1760
|
};
|
|
1652
1761
|
};
|
|
1653
1762
|
|
|
1654
1763
|
// src/components/chat-popup.tsx
|
|
1655
|
-
import
|
|
1764
|
+
import React8, { useState as useState5, useEffect as useEffect4, useRef as useRef3 } from "react";
|
|
1656
1765
|
|
|
1657
1766
|
// node_modules/devlop/lib/default.js
|
|
1658
1767
|
function ok() {
|
|
@@ -3527,7 +3636,7 @@ var urlAttributes = {
|
|
|
3527
3636
|
|
|
3528
3637
|
// node_modules/react-markdown/lib/index.js
|
|
3529
3638
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3530
|
-
import { useEffect as
|
|
3639
|
+
import { useEffect as useEffect3, useState as useState4 } from "react";
|
|
3531
3640
|
|
|
3532
3641
|
// node_modules/mdast-util-to-string/lib/index.js
|
|
3533
3642
|
var emptyOptions2 = {};
|
|
@@ -9249,7 +9358,7 @@ var convert = (
|
|
|
9249
9358
|
* @param {Test} [test]
|
|
9250
9359
|
* @returns {Check}
|
|
9251
9360
|
*/
|
|
9252
|
-
function(test) {
|
|
9361
|
+
(function(test) {
|
|
9253
9362
|
if (test === null || test === void 0) {
|
|
9254
9363
|
return ok2;
|
|
9255
9364
|
}
|
|
@@ -9263,7 +9372,7 @@ var convert = (
|
|
|
9263
9372
|
return typeFactory(test);
|
|
9264
9373
|
}
|
|
9265
9374
|
throw new Error("Expected function, string, or object as test");
|
|
9266
|
-
}
|
|
9375
|
+
})
|
|
9267
9376
|
);
|
|
9268
9377
|
function anyFactory(tests) {
|
|
9269
9378
|
const checks2 = [];
|
|
@@ -10443,7 +10552,7 @@ var CallableInstance = (
|
|
|
10443
10552
|
* @param {string | symbol} property
|
|
10444
10553
|
* @returns {(...parameters: Array<unknown>) => unknown}
|
|
10445
10554
|
*/
|
|
10446
|
-
function(property) {
|
|
10555
|
+
(function(property) {
|
|
10447
10556
|
const self2 = this;
|
|
10448
10557
|
const constr = self2.constructor;
|
|
10449
10558
|
const proto = (
|
|
@@ -10458,7 +10567,7 @@ var CallableInstance = (
|
|
|
10458
10567
|
};
|
|
10459
10568
|
Object.setPrototypeOf(apply, proto);
|
|
10460
10569
|
return apply;
|
|
10461
|
-
}
|
|
10570
|
+
})
|
|
10462
10571
|
);
|
|
10463
10572
|
|
|
10464
10573
|
// node_modules/unified/lib/index.js
|
|
@@ -14396,6 +14505,59 @@ var PhoneOffIcon = ({ width = 24, height = 24, className, ...props }) => {
|
|
|
14396
14505
|
};
|
|
14397
14506
|
var phone_off_default = PhoneOffIcon;
|
|
14398
14507
|
|
|
14508
|
+
// src/components/svgs/mic-off.tsx
|
|
14509
|
+
import React6 from "react";
|
|
14510
|
+
var MicOffIcon = ({ style, className }) => {
|
|
14511
|
+
return /* @__PURE__ */ React6.createElement(
|
|
14512
|
+
"svg",
|
|
14513
|
+
{
|
|
14514
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14515
|
+
width: "24",
|
|
14516
|
+
height: "24",
|
|
14517
|
+
viewBox: "0 0 24 24",
|
|
14518
|
+
fill: "none",
|
|
14519
|
+
stroke: "currentColor",
|
|
14520
|
+
strokeWidth: "2",
|
|
14521
|
+
strokeLinecap: "round",
|
|
14522
|
+
strokeLinejoin: "round",
|
|
14523
|
+
className: `lucide lucide-mic-off-icon lucide-mic-off ${className || ""}`,
|
|
14524
|
+
style
|
|
14525
|
+
},
|
|
14526
|
+
/* @__PURE__ */ React6.createElement("path", { d: "M12 19v3" }),
|
|
14527
|
+
/* @__PURE__ */ React6.createElement("path", { d: "M15 9.34V5a3 3 0 0 0-5.68-1.33" }),
|
|
14528
|
+
/* @__PURE__ */ React6.createElement("path", { d: "M16.95 16.95A7 7 0 0 1 5 12v-2" }),
|
|
14529
|
+
/* @__PURE__ */ React6.createElement("path", { d: "M18.89 13.23A7 7 0 0 0 19 12v-2" }),
|
|
14530
|
+
/* @__PURE__ */ React6.createElement("path", { d: "m2 2 20 20" }),
|
|
14531
|
+
/* @__PURE__ */ React6.createElement("path", { d: "M9 9v3a3 3 0 0 0 5.12 2.12" })
|
|
14532
|
+
);
|
|
14533
|
+
};
|
|
14534
|
+
var mic_off_default = MicOffIcon;
|
|
14535
|
+
|
|
14536
|
+
// src/components/svgs/mic.tsx
|
|
14537
|
+
import React7 from "react";
|
|
14538
|
+
var MicIcon = ({ width = 24, height = 24, className, ...props }) => {
|
|
14539
|
+
return /* @__PURE__ */ React7.createElement(
|
|
14540
|
+
"svg",
|
|
14541
|
+
{
|
|
14542
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14543
|
+
width,
|
|
14544
|
+
height,
|
|
14545
|
+
viewBox: "0 0 24 24",
|
|
14546
|
+
fill: "none",
|
|
14547
|
+
stroke: "currentColor",
|
|
14548
|
+
strokeWidth: "2",
|
|
14549
|
+
strokeLinecap: "round",
|
|
14550
|
+
strokeLinejoin: "round",
|
|
14551
|
+
className,
|
|
14552
|
+
...props
|
|
14553
|
+
},
|
|
14554
|
+
/* @__PURE__ */ React7.createElement("path", { d: "M12 19v3" }),
|
|
14555
|
+
/* @__PURE__ */ React7.createElement("path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }),
|
|
14556
|
+
/* @__PURE__ */ React7.createElement("rect", { x: "9", y: "2", width: "6", height: "13", rx: "3" })
|
|
14557
|
+
);
|
|
14558
|
+
};
|
|
14559
|
+
var mic_default = MicIcon;
|
|
14560
|
+
|
|
14399
14561
|
// src/components/chat-popup.tsx
|
|
14400
14562
|
var ChatPopup = ({
|
|
14401
14563
|
isOpen,
|
|
@@ -14412,7 +14574,9 @@ var ChatPopup = ({
|
|
|
14412
14574
|
currentTheme = "dark",
|
|
14413
14575
|
onThemeToggle,
|
|
14414
14576
|
status,
|
|
14415
|
-
anchor
|
|
14577
|
+
anchor,
|
|
14578
|
+
muteState,
|
|
14579
|
+
onToggleMute
|
|
14416
14580
|
}) => {
|
|
14417
14581
|
const [inputText, setInputText] = useState5("");
|
|
14418
14582
|
const [isSending, setIsSending] = useState5(false);
|
|
@@ -14420,7 +14584,7 @@ var ChatPopup = ({
|
|
|
14420
14584
|
const scrollToBottom = () => {
|
|
14421
14585
|
messagesEndRef.current?.scrollIntoView({ behavior: "smooth" });
|
|
14422
14586
|
};
|
|
14423
|
-
|
|
14587
|
+
useEffect4(() => {
|
|
14424
14588
|
console.log("\u{1F4EC} ChatPopup received messages:", JSON.stringify(messages, null, 2));
|
|
14425
14589
|
scrollToBottom();
|
|
14426
14590
|
}, [messages]);
|
|
@@ -14482,7 +14646,7 @@ var ChatPopup = ({
|
|
|
14482
14646
|
}
|
|
14483
14647
|
};
|
|
14484
14648
|
const positionStyle = getPositionStyle();
|
|
14485
|
-
return /* @__PURE__ */
|
|
14649
|
+
return /* @__PURE__ */ React8.createElement(
|
|
14486
14650
|
"div",
|
|
14487
14651
|
{
|
|
14488
14652
|
"data-cuekit-ignore": true,
|
|
@@ -14505,7 +14669,7 @@ var ChatPopup = ({
|
|
|
14505
14669
|
...positionStyle
|
|
14506
14670
|
}
|
|
14507
14671
|
},
|
|
14508
|
-
/* @__PURE__ */
|
|
14672
|
+
/* @__PURE__ */ React8.createElement(
|
|
14509
14673
|
"div",
|
|
14510
14674
|
{
|
|
14511
14675
|
style: {
|
|
@@ -14516,14 +14680,14 @@ var ChatPopup = ({
|
|
|
14516
14680
|
justifyContent: "space-between"
|
|
14517
14681
|
}
|
|
14518
14682
|
},
|
|
14519
|
-
/* @__PURE__ */
|
|
14683
|
+
/* @__PURE__ */ React8.createElement("div", { style: { display: "flex", alignItems: "center", gap: 0 } }, /* @__PURE__ */ React8.createElement(
|
|
14520
14684
|
"img",
|
|
14521
14685
|
{
|
|
14522
14686
|
src: "https://dashboard.cuekit.ai/_next/image?url=%2Fimages%2Fcuekit-logo-2.png&w=256&q=100",
|
|
14523
14687
|
alt: "Cuekit AI",
|
|
14524
14688
|
style: { width: 58, objectFit: "cover" }
|
|
14525
14689
|
}
|
|
14526
|
-
), /* @__PURE__ */
|
|
14690
|
+
), /* @__PURE__ */ React8.createElement(
|
|
14527
14691
|
"div",
|
|
14528
14692
|
{
|
|
14529
14693
|
style: {
|
|
@@ -14534,7 +14698,7 @@ var ChatPopup = ({
|
|
|
14534
14698
|
justifyContent: "center"
|
|
14535
14699
|
}
|
|
14536
14700
|
},
|
|
14537
|
-
/* @__PURE__ */
|
|
14701
|
+
/* @__PURE__ */ React8.createElement(
|
|
14538
14702
|
"span",
|
|
14539
14703
|
{
|
|
14540
14704
|
style: {
|
|
@@ -14549,9 +14713,9 @@ var ChatPopup = ({
|
|
|
14549
14713
|
WebkitTextFillColor: "transparent"
|
|
14550
14714
|
}
|
|
14551
14715
|
},
|
|
14552
|
-
"
|
|
14716
|
+
"ansyr.ai"
|
|
14553
14717
|
),
|
|
14554
|
-
/* @__PURE__ */
|
|
14718
|
+
/* @__PURE__ */ React8.createElement("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", gap: 4 } }, /* @__PURE__ */ React8.createElement(
|
|
14555
14719
|
"div",
|
|
14556
14720
|
{
|
|
14557
14721
|
style: {
|
|
@@ -14567,7 +14731,7 @@ var ChatPopup = ({
|
|
|
14567
14731
|
fontWeight: "500"
|
|
14568
14732
|
}
|
|
14569
14733
|
},
|
|
14570
|
-
/* @__PURE__ */
|
|
14734
|
+
/* @__PURE__ */ React8.createElement(
|
|
14571
14735
|
"span",
|
|
14572
14736
|
{
|
|
14573
14737
|
style: {
|
|
@@ -14578,8 +14742,8 @@ var ChatPopup = ({
|
|
|
14578
14742
|
)
|
|
14579
14743
|
))
|
|
14580
14744
|
)),
|
|
14581
|
-
/* @__PURE__ */
|
|
14582
|
-
/* @__PURE__ */
|
|
14745
|
+
/* @__PURE__ */ React8.createElement("div", { style: { minWidth: 100, textAlign: "center" } }),
|
|
14746
|
+
/* @__PURE__ */ React8.createElement(
|
|
14583
14747
|
"div",
|
|
14584
14748
|
{
|
|
14585
14749
|
style: {
|
|
@@ -14591,7 +14755,7 @@ var ChatPopup = ({
|
|
|
14591
14755
|
top: 16
|
|
14592
14756
|
}
|
|
14593
14757
|
},
|
|
14594
|
-
onThemeToggle && /* @__PURE__ */
|
|
14758
|
+
onThemeToggle && /* @__PURE__ */ React8.createElement(
|
|
14595
14759
|
"button",
|
|
14596
14760
|
{
|
|
14597
14761
|
onClick: () => {
|
|
@@ -14621,7 +14785,7 @@ var ChatPopup = ({
|
|
|
14621
14785
|
"aria-label": "Toggle theme",
|
|
14622
14786
|
title: `Switch to ${currentTheme === "dark" ? "light" : "dark"} mode`
|
|
14623
14787
|
},
|
|
14624
|
-
currentTheme === "dark" ? /* @__PURE__ */
|
|
14788
|
+
currentTheme === "dark" ? /* @__PURE__ */ React8.createElement(
|
|
14625
14789
|
sun_default,
|
|
14626
14790
|
{
|
|
14627
14791
|
style: {
|
|
@@ -14631,7 +14795,7 @@ var ChatPopup = ({
|
|
|
14631
14795
|
animation: "themeToggleEnter 0.3s ease-in-out"
|
|
14632
14796
|
}
|
|
14633
14797
|
}
|
|
14634
|
-
) : /* @__PURE__ */
|
|
14798
|
+
) : /* @__PURE__ */ React8.createElement(
|
|
14635
14799
|
moon_default,
|
|
14636
14800
|
{
|
|
14637
14801
|
style: {
|
|
@@ -14643,7 +14807,7 @@ var ChatPopup = ({
|
|
|
14643
14807
|
}
|
|
14644
14808
|
)
|
|
14645
14809
|
),
|
|
14646
|
-
/* @__PURE__ */
|
|
14810
|
+
/* @__PURE__ */ React8.createElement(
|
|
14647
14811
|
"button",
|
|
14648
14812
|
{
|
|
14649
14813
|
onClick: onMinimize,
|
|
@@ -14670,11 +14834,11 @@ var ChatPopup = ({
|
|
|
14670
14834
|
"aria-label": "Minimize",
|
|
14671
14835
|
title: "Minimize chat"
|
|
14672
14836
|
},
|
|
14673
|
-
/* @__PURE__ */
|
|
14837
|
+
/* @__PURE__ */ React8.createElement(close_default, { style: { width: 16, height: 16, color: "hsl(var(--voice-text-muted))" } })
|
|
14674
14838
|
)
|
|
14675
14839
|
)
|
|
14676
14840
|
),
|
|
14677
|
-
/* @__PURE__ */
|
|
14841
|
+
/* @__PURE__ */ React8.createElement(
|
|
14678
14842
|
"div",
|
|
14679
14843
|
{
|
|
14680
14844
|
style: {
|
|
@@ -14687,7 +14851,7 @@ var ChatPopup = ({
|
|
|
14687
14851
|
color: "hsl(var(--voice-text))"
|
|
14688
14852
|
}
|
|
14689
14853
|
},
|
|
14690
|
-
messages.length === 0 ? /* @__PURE__ */
|
|
14854
|
+
messages.length === 0 ? /* @__PURE__ */ React8.createElement(
|
|
14691
14855
|
"div",
|
|
14692
14856
|
{
|
|
14693
14857
|
style: {
|
|
@@ -14697,7 +14861,7 @@ var ChatPopup = ({
|
|
|
14697
14861
|
}
|
|
14698
14862
|
},
|
|
14699
14863
|
"Start a conversation with CueKit AI"
|
|
14700
|
-
) : messages.map((message, index2) => /* @__PURE__ */
|
|
14864
|
+
) : messages.map((message, index2) => /* @__PURE__ */ React8.createElement(
|
|
14701
14865
|
"div",
|
|
14702
14866
|
{
|
|
14703
14867
|
key: index2,
|
|
@@ -14711,7 +14875,7 @@ var ChatPopup = ({
|
|
|
14711
14875
|
justifyContent: message.sender === "user" ? "flex-end" : "flex-start"
|
|
14712
14876
|
}
|
|
14713
14877
|
},
|
|
14714
|
-
message.sender === "assistant" && /* @__PURE__ */
|
|
14878
|
+
message.sender === "assistant" && /* @__PURE__ */ React8.createElement(
|
|
14715
14879
|
"div",
|
|
14716
14880
|
{
|
|
14717
14881
|
style: {
|
|
@@ -14726,7 +14890,7 @@ var ChatPopup = ({
|
|
|
14726
14890
|
overflow: "hidden"
|
|
14727
14891
|
}
|
|
14728
14892
|
},
|
|
14729
|
-
/* @__PURE__ */
|
|
14893
|
+
/* @__PURE__ */ React8.createElement(
|
|
14730
14894
|
"img",
|
|
14731
14895
|
{
|
|
14732
14896
|
src: "https://dashboard.cuekit.ai/_next/image?url=%2Fimages%2Fcuekit-logo-2.png&w=256&q=100",
|
|
@@ -14740,7 +14904,7 @@ var ChatPopup = ({
|
|
|
14740
14904
|
}
|
|
14741
14905
|
)
|
|
14742
14906
|
),
|
|
14743
|
-
/* @__PURE__ */
|
|
14907
|
+
/* @__PURE__ */ React8.createElement(
|
|
14744
14908
|
"div",
|
|
14745
14909
|
{
|
|
14746
14910
|
style: {
|
|
@@ -14751,7 +14915,7 @@ var ChatPopup = ({
|
|
|
14751
14915
|
flex: 1
|
|
14752
14916
|
}
|
|
14753
14917
|
},
|
|
14754
|
-
/* @__PURE__ */
|
|
14918
|
+
/* @__PURE__ */ React8.createElement(
|
|
14755
14919
|
"div",
|
|
14756
14920
|
{
|
|
14757
14921
|
style: {
|
|
@@ -14769,12 +14933,12 @@ var ChatPopup = ({
|
|
|
14769
14933
|
marginLeft: message.sender === "user" ? "auto" : 0
|
|
14770
14934
|
}
|
|
14771
14935
|
},
|
|
14772
|
-
/* @__PURE__ */
|
|
14936
|
+
/* @__PURE__ */ React8.createElement("div", null, /* @__PURE__ */ React8.createElement(
|
|
14773
14937
|
Markdown,
|
|
14774
14938
|
{
|
|
14775
14939
|
remarkPlugins: [remarkGfm],
|
|
14776
14940
|
components: {
|
|
14777
|
-
p: ({ children }) => /* @__PURE__ */
|
|
14941
|
+
p: ({ children }) => /* @__PURE__ */ React8.createElement(
|
|
14778
14942
|
"p",
|
|
14779
14943
|
{
|
|
14780
14944
|
style: {
|
|
@@ -14785,7 +14949,7 @@ var ChatPopup = ({
|
|
|
14785
14949
|
},
|
|
14786
14950
|
children
|
|
14787
14951
|
),
|
|
14788
|
-
h1: ({ children }) => /* @__PURE__ */
|
|
14952
|
+
h1: ({ children }) => /* @__PURE__ */ React8.createElement(
|
|
14789
14953
|
"h1",
|
|
14790
14954
|
{
|
|
14791
14955
|
style: {
|
|
@@ -14797,7 +14961,7 @@ var ChatPopup = ({
|
|
|
14797
14961
|
},
|
|
14798
14962
|
children
|
|
14799
14963
|
),
|
|
14800
|
-
h2: ({ children }) => /* @__PURE__ */
|
|
14964
|
+
h2: ({ children }) => /* @__PURE__ */ React8.createElement(
|
|
14801
14965
|
"h2",
|
|
14802
14966
|
{
|
|
14803
14967
|
style: {
|
|
@@ -14809,7 +14973,7 @@ var ChatPopup = ({
|
|
|
14809
14973
|
},
|
|
14810
14974
|
children
|
|
14811
14975
|
),
|
|
14812
|
-
h3: ({ children }) => /* @__PURE__ */
|
|
14976
|
+
h3: ({ children }) => /* @__PURE__ */ React8.createElement(
|
|
14813
14977
|
"h3",
|
|
14814
14978
|
{
|
|
14815
14979
|
style: {
|
|
@@ -14821,7 +14985,7 @@ var ChatPopup = ({
|
|
|
14821
14985
|
},
|
|
14822
14986
|
children
|
|
14823
14987
|
),
|
|
14824
|
-
ul: ({ children }) => /* @__PURE__ */
|
|
14988
|
+
ul: ({ children }) => /* @__PURE__ */ React8.createElement(
|
|
14825
14989
|
"ul",
|
|
14826
14990
|
{
|
|
14827
14991
|
style: {
|
|
@@ -14833,7 +14997,7 @@ var ChatPopup = ({
|
|
|
14833
14997
|
},
|
|
14834
14998
|
children
|
|
14835
14999
|
),
|
|
14836
|
-
ol: ({ children }) => /* @__PURE__ */
|
|
15000
|
+
ol: ({ children }) => /* @__PURE__ */ React8.createElement(
|
|
14837
15001
|
"ol",
|
|
14838
15002
|
{
|
|
14839
15003
|
style: {
|
|
@@ -14845,7 +15009,7 @@ var ChatPopup = ({
|
|
|
14845
15009
|
},
|
|
14846
15010
|
children
|
|
14847
15011
|
),
|
|
14848
|
-
li: ({ children }) => /* @__PURE__ */
|
|
15012
|
+
li: ({ children }) => /* @__PURE__ */ React8.createElement(
|
|
14849
15013
|
"li",
|
|
14850
15014
|
{
|
|
14851
15015
|
style: {
|
|
@@ -14856,7 +15020,7 @@ var ChatPopup = ({
|
|
|
14856
15020
|
},
|
|
14857
15021
|
children
|
|
14858
15022
|
),
|
|
14859
|
-
strong: ({ children }) => /* @__PURE__ */
|
|
15023
|
+
strong: ({ children }) => /* @__PURE__ */ React8.createElement(
|
|
14860
15024
|
"strong",
|
|
14861
15025
|
{
|
|
14862
15026
|
style: {
|
|
@@ -14867,7 +15031,7 @@ var ChatPopup = ({
|
|
|
14867
15031
|
},
|
|
14868
15032
|
children
|
|
14869
15033
|
),
|
|
14870
|
-
em: ({ children }) => /* @__PURE__ */
|
|
15034
|
+
em: ({ children }) => /* @__PURE__ */ React8.createElement(
|
|
14871
15035
|
"em",
|
|
14872
15036
|
{
|
|
14873
15037
|
style: {
|
|
@@ -14878,7 +15042,7 @@ var ChatPopup = ({
|
|
|
14878
15042
|
},
|
|
14879
15043
|
children
|
|
14880
15044
|
),
|
|
14881
|
-
code: ({ children }) => /* @__PURE__ */
|
|
15045
|
+
code: ({ children }) => /* @__PURE__ */ React8.createElement(
|
|
14882
15046
|
"code",
|
|
14883
15047
|
{
|
|
14884
15048
|
style: {
|
|
@@ -14891,7 +15055,7 @@ var ChatPopup = ({
|
|
|
14891
15055
|
},
|
|
14892
15056
|
children
|
|
14893
15057
|
),
|
|
14894
|
-
pre: ({ children }) => /* @__PURE__ */
|
|
15058
|
+
pre: ({ children }) => /* @__PURE__ */ React8.createElement(
|
|
14895
15059
|
"pre",
|
|
14896
15060
|
{
|
|
14897
15061
|
style: {
|
|
@@ -14906,7 +15070,7 @@ var ChatPopup = ({
|
|
|
14906
15070
|
},
|
|
14907
15071
|
children
|
|
14908
15072
|
),
|
|
14909
|
-
blockquote: ({ children }) => /* @__PURE__ */
|
|
15073
|
+
blockquote: ({ children }) => /* @__PURE__ */ React8.createElement(
|
|
14910
15074
|
"blockquote",
|
|
14911
15075
|
{
|
|
14912
15076
|
style: {
|
|
@@ -14925,7 +15089,7 @@ var ChatPopup = ({
|
|
|
14925
15089
|
message.text
|
|
14926
15090
|
))
|
|
14927
15091
|
),
|
|
14928
|
-
message.sender === "user" && /* @__PURE__ */
|
|
15092
|
+
message.sender === "user" && /* @__PURE__ */ React8.createElement(
|
|
14929
15093
|
"div",
|
|
14930
15094
|
{
|
|
14931
15095
|
style: {
|
|
@@ -14946,9 +15110,9 @@ var ChatPopup = ({
|
|
|
14946
15110
|
)
|
|
14947
15111
|
)
|
|
14948
15112
|
)),
|
|
14949
|
-
/* @__PURE__ */
|
|
15113
|
+
/* @__PURE__ */ React8.createElement("div", { ref: messagesEndRef })
|
|
14950
15114
|
),
|
|
14951
|
-
/* @__PURE__ */
|
|
15115
|
+
/* @__PURE__ */ React8.createElement(
|
|
14952
15116
|
"div",
|
|
14953
15117
|
{
|
|
14954
15118
|
style: {
|
|
@@ -14957,7 +15121,7 @@ var ChatPopup = ({
|
|
|
14957
15121
|
background: "hsl(var(--voice-bg))"
|
|
14958
15122
|
}
|
|
14959
15123
|
},
|
|
14960
|
-
/* @__PURE__ */
|
|
15124
|
+
/* @__PURE__ */ React8.createElement(
|
|
14961
15125
|
"form",
|
|
14962
15126
|
{
|
|
14963
15127
|
onSubmit: (e2) => {
|
|
@@ -14966,7 +15130,7 @@ var ChatPopup = ({
|
|
|
14966
15130
|
},
|
|
14967
15131
|
style: { display: "flex", alignItems: "center", gap: 8, margin: 0 }
|
|
14968
15132
|
},
|
|
14969
|
-
/* @__PURE__ */
|
|
15133
|
+
/* @__PURE__ */ React8.createElement(
|
|
14970
15134
|
"input",
|
|
14971
15135
|
{
|
|
14972
15136
|
type: "text",
|
|
@@ -14993,7 +15157,47 @@ var ChatPopup = ({
|
|
|
14993
15157
|
}
|
|
14994
15158
|
}
|
|
14995
15159
|
),
|
|
14996
|
-
|
|
15160
|
+
muteState?.canMute && onToggleMute && /* @__PURE__ */ React8.createElement(
|
|
15161
|
+
"button",
|
|
15162
|
+
{
|
|
15163
|
+
onClick: onToggleMute,
|
|
15164
|
+
style: {
|
|
15165
|
+
padding: "10px 12px",
|
|
15166
|
+
borderRadius: 8,
|
|
15167
|
+
border: "1px solid hsl(var(--voice-accent))",
|
|
15168
|
+
background: "hsl(var(--voice-accent))",
|
|
15169
|
+
fontSize: 12,
|
|
15170
|
+
fontWeight: 700,
|
|
15171
|
+
display: "flex",
|
|
15172
|
+
alignItems: "center",
|
|
15173
|
+
justifyContent: "center",
|
|
15174
|
+
cursor: "pointer",
|
|
15175
|
+
transition: "all 0.3s ease"
|
|
15176
|
+
},
|
|
15177
|
+
"aria-label": muteState.isMuted ? "Unmute microphone" : "Mute microphone",
|
|
15178
|
+
title: muteState.isMuted ? "Unmute microphone" : "Mute microphone"
|
|
15179
|
+
},
|
|
15180
|
+
muteState.isMuted ? /* @__PURE__ */ React8.createElement(
|
|
15181
|
+
mic_default,
|
|
15182
|
+
{
|
|
15183
|
+
style: {
|
|
15184
|
+
width: 16,
|
|
15185
|
+
height: 16,
|
|
15186
|
+
color: "hsl(var(--voice-user-text))"
|
|
15187
|
+
}
|
|
15188
|
+
}
|
|
15189
|
+
) : /* @__PURE__ */ React8.createElement(
|
|
15190
|
+
mic_off_default,
|
|
15191
|
+
{
|
|
15192
|
+
style: {
|
|
15193
|
+
width: 16,
|
|
15194
|
+
height: 16,
|
|
15195
|
+
color: "hsl(var(--voice-user-text))"
|
|
15196
|
+
}
|
|
15197
|
+
}
|
|
15198
|
+
)
|
|
15199
|
+
),
|
|
15200
|
+
isConnected && onEndCall && /* @__PURE__ */ React8.createElement(
|
|
14997
15201
|
"button",
|
|
14998
15202
|
{
|
|
14999
15203
|
type: "submit",
|
|
@@ -15012,7 +15216,7 @@ var ChatPopup = ({
|
|
|
15012
15216
|
cursor: "pointer"
|
|
15013
15217
|
}
|
|
15014
15218
|
},
|
|
15015
|
-
/* @__PURE__ */
|
|
15219
|
+
/* @__PURE__ */ React8.createElement(phone_off_default, { style: { width: 16, height: 16 } })
|
|
15016
15220
|
)
|
|
15017
15221
|
)
|
|
15018
15222
|
)
|
|
@@ -15020,7 +15224,7 @@ var ChatPopup = ({
|
|
|
15020
15224
|
};
|
|
15021
15225
|
|
|
15022
15226
|
// src/components/border-glow.tsx
|
|
15023
|
-
import
|
|
15227
|
+
import React9 from "react";
|
|
15024
15228
|
var BorderGlow = ({ isActive }) => {
|
|
15025
15229
|
if (!isActive) return null;
|
|
15026
15230
|
const styles = {
|
|
@@ -15147,7 +15351,7 @@ var BorderGlow = ({ isActive }) => {
|
|
|
15147
15351
|
opacity: 0.6
|
|
15148
15352
|
}
|
|
15149
15353
|
};
|
|
15150
|
-
return /* @__PURE__ */
|
|
15354
|
+
return /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement("style", null, `
|
|
15151
15355
|
@keyframes borderPulse {
|
|
15152
15356
|
0%, 100% {
|
|
15153
15357
|
opacity: 1;
|
|
@@ -15156,12 +15360,12 @@ var BorderGlow = ({ isActive }) => {
|
|
|
15156
15360
|
opacity: 0.5;
|
|
15157
15361
|
}
|
|
15158
15362
|
}
|
|
15159
|
-
`), /* @__PURE__ */
|
|
15363
|
+
`), /* @__PURE__ */ React9.createElement("div", { style: styles.container }, /* @__PURE__ */ React9.createElement("div", { style: styles.rightBorder1 }), /* @__PURE__ */ React9.createElement("div", { style: styles.rightBorder2 }), /* @__PURE__ */ React9.createElement("div", { style: styles.rightBorder3 }), /* @__PURE__ */ React9.createElement("div", { style: styles.leftBorder1 }), /* @__PURE__ */ React9.createElement("div", { style: styles.leftBorder2 }), /* @__PURE__ */ React9.createElement("div", { style: styles.leftBorder3 }), /* @__PURE__ */ React9.createElement("div", { style: styles.cornerTopLeft }), /* @__PURE__ */ React9.createElement("div", { style: styles.cornerTopRight }), /* @__PURE__ */ React9.createElement("div", { style: styles.cornerBottomRight }), /* @__PURE__ */ React9.createElement("div", { style: styles.cornerBottomLeft })));
|
|
15160
15364
|
};
|
|
15161
15365
|
var border_glow_default = BorderGlow;
|
|
15162
15366
|
|
|
15163
15367
|
// src/components/voice-intensity-visualizer.tsx
|
|
15164
|
-
import
|
|
15368
|
+
import React10, { useEffect as useEffect8, useState as useState9 } from "react";
|
|
15165
15369
|
|
|
15166
15370
|
// node_modules/@livekit/components-react/dist/hooks-C2Bp5v2q.mjs
|
|
15167
15371
|
import * as r from "react";
|
|
@@ -15176,7 +15380,7 @@ var Me = { exports: {} };
|
|
|
15176
15380
|
var Or = Me.exports;
|
|
15177
15381
|
var kt;
|
|
15178
15382
|
function kr() {
|
|
15179
|
-
return kt || (kt = 1, function(e2) {
|
|
15383
|
+
return kt || (kt = 1, (function(e2) {
|
|
15180
15384
|
(function(t, n) {
|
|
15181
15385
|
e2.exports ? e2.exports = n() : t.log = n();
|
|
15182
15386
|
})(Or, function() {
|
|
@@ -15320,7 +15524,7 @@ function kr() {
|
|
|
15320
15524
|
return o;
|
|
15321
15525
|
}, s.default = s, s;
|
|
15322
15526
|
});
|
|
15323
|
-
}(Me)), Me.exports;
|
|
15527
|
+
})(Me)), Me.exports;
|
|
15324
15528
|
}
|
|
15325
15529
|
var _r = kr();
|
|
15326
15530
|
var Lr = /* @__PURE__ */ Ar(_r);
|
|
@@ -15543,7 +15747,7 @@ function Ue(e2, t) {
|
|
|
15543
15747
|
0 <= n && e2.splice(n, 1);
|
|
15544
15748
|
}
|
|
15545
15749
|
}
|
|
15546
|
-
var Oe = function() {
|
|
15750
|
+
var Oe = (function() {
|
|
15547
15751
|
function e2(t) {
|
|
15548
15752
|
this.initialTeardown = t, this.closed = false, this._parentage = null, this._finalizers = null;
|
|
15549
15753
|
}
|
|
@@ -15627,11 +15831,11 @@ var Oe = function() {
|
|
|
15627
15831
|
}, e2.prototype.remove = function(t) {
|
|
15628
15832
|
var n = this._finalizers;
|
|
15629
15833
|
n && Ue(n, t), t instanceof e2 && t._removeParent(this);
|
|
15630
|
-
}, e2.EMPTY = function() {
|
|
15834
|
+
}, e2.EMPTY = (function() {
|
|
15631
15835
|
var t = new e2();
|
|
15632
15836
|
return t.closed = true, t;
|
|
15633
|
-
}(), e2;
|
|
15634
|
-
}();
|
|
15837
|
+
})(), e2;
|
|
15838
|
+
})();
|
|
15635
15839
|
var an = Oe.EMPTY;
|
|
15636
15840
|
function cn(e2) {
|
|
15637
15841
|
return e2 instanceof Oe || e2 && "closed" in e2 && P(e2.remove) && P(e2.add) && P(e2.unsubscribe);
|
|
@@ -15663,7 +15867,7 @@ function je() {
|
|
|
15663
15867
|
function Re(e2) {
|
|
15664
15868
|
e2();
|
|
15665
15869
|
}
|
|
15666
|
-
var gt = function(e2) {
|
|
15870
|
+
var gt = (function(e2) {
|
|
15667
15871
|
te(t, e2);
|
|
15668
15872
|
function t(n) {
|
|
15669
15873
|
var r2 = e2.call(this) || this;
|
|
@@ -15694,8 +15898,8 @@ var gt = function(e2) {
|
|
|
15694
15898
|
this.unsubscribe();
|
|
15695
15899
|
}
|
|
15696
15900
|
}, t;
|
|
15697
|
-
}(Oe);
|
|
15698
|
-
var Nr = function() {
|
|
15901
|
+
})(Oe);
|
|
15902
|
+
var Nr = (function() {
|
|
15699
15903
|
function e2(t) {
|
|
15700
15904
|
this.partialObserver = t;
|
|
15701
15905
|
}
|
|
@@ -15726,8 +15930,8 @@ var Nr = function() {
|
|
|
15726
15930
|
Le(n);
|
|
15727
15931
|
}
|
|
15728
15932
|
}, e2;
|
|
15729
|
-
}();
|
|
15730
|
-
var Ce = function(e2) {
|
|
15933
|
+
})();
|
|
15934
|
+
var Ce = (function(e2) {
|
|
15731
15935
|
te(t, e2);
|
|
15732
15936
|
function t(n, r2, i2) {
|
|
15733
15937
|
var o = e2.call(this) || this, s;
|
|
@@ -15738,7 +15942,7 @@ var Ce = function(e2) {
|
|
|
15738
15942
|
} : s = n, o.destination = new Nr(s), o;
|
|
15739
15943
|
}
|
|
15740
15944
|
return t;
|
|
15741
|
-
}(gt);
|
|
15945
|
+
})(gt);
|
|
15742
15946
|
function Le(e2) {
|
|
15743
15947
|
un(e2);
|
|
15744
15948
|
}
|
|
@@ -15751,9 +15955,9 @@ var Ur = {
|
|
|
15751
15955
|
error: Fr,
|
|
15752
15956
|
complete: je
|
|
15753
15957
|
};
|
|
15754
|
-
var bt = function() {
|
|
15958
|
+
var bt = (function() {
|
|
15755
15959
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
15756
|
-
}();
|
|
15960
|
+
})();
|
|
15757
15961
|
function Ge(e2) {
|
|
15758
15962
|
return e2;
|
|
15759
15963
|
}
|
|
@@ -15764,7 +15968,7 @@ function jr(e2) {
|
|
|
15764
15968
|
}, n);
|
|
15765
15969
|
};
|
|
15766
15970
|
}
|
|
15767
|
-
var k = function() {
|
|
15971
|
+
var k = (function() {
|
|
15768
15972
|
function e2(t) {
|
|
15769
15973
|
t && (this._subscribe = t);
|
|
15770
15974
|
}
|
|
@@ -15823,7 +16027,7 @@ var k = function() {
|
|
|
15823
16027
|
}, e2.create = function(t) {
|
|
15824
16028
|
return new e2(t);
|
|
15825
16029
|
}, e2;
|
|
15826
|
-
}();
|
|
16030
|
+
})();
|
|
15827
16031
|
function Lt(e2) {
|
|
15828
16032
|
var t;
|
|
15829
16033
|
return (t = e2 ?? Dr.Promise) !== null && t !== void 0 ? t : Promise;
|
|
@@ -15853,7 +16057,7 @@ function j(e2) {
|
|
|
15853
16057
|
function F(e2, t, n, r2, i2) {
|
|
15854
16058
|
return new Hr(e2, t, n, r2, i2);
|
|
15855
16059
|
}
|
|
15856
|
-
var Hr = function(e2) {
|
|
16060
|
+
var Hr = (function(e2) {
|
|
15857
16061
|
te(t, e2);
|
|
15858
16062
|
function t(n, r2, i2, o, s, a) {
|
|
15859
16063
|
var c = e2.call(this, n) || this;
|
|
@@ -15888,13 +16092,13 @@ var Hr = function(e2) {
|
|
|
15888
16092
|
e2.prototype.unsubscribe.call(this), !r2 && ((n = this.onFinalize) === null || n === void 0 || n.call(this));
|
|
15889
16093
|
}
|
|
15890
16094
|
}, t;
|
|
15891
|
-
}(gt);
|
|
16095
|
+
})(gt);
|
|
15892
16096
|
var zr = mt(function(e2) {
|
|
15893
16097
|
return function() {
|
|
15894
16098
|
e2(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
|
15895
16099
|
};
|
|
15896
16100
|
});
|
|
15897
|
-
var ee = function(e2) {
|
|
16101
|
+
var ee = (function(e2) {
|
|
15898
16102
|
te(t, e2);
|
|
15899
16103
|
function t() {
|
|
15900
16104
|
var n = e2.call(this) || this;
|
|
@@ -15973,8 +16177,8 @@ var ee = function(e2) {
|
|
|
15973
16177
|
}, t.create = function(n, r2) {
|
|
15974
16178
|
return new It(n, r2);
|
|
15975
16179
|
}, t;
|
|
15976
|
-
}(k);
|
|
15977
|
-
var It = function(e2) {
|
|
16180
|
+
})(k);
|
|
16181
|
+
var It = (function(e2) {
|
|
15978
16182
|
te(t, e2);
|
|
15979
16183
|
function t(n, r2) {
|
|
15980
16184
|
var i2 = e2.call(this) || this;
|
|
@@ -15993,8 +16197,8 @@ var It = function(e2) {
|
|
|
15993
16197
|
var r2, i2;
|
|
15994
16198
|
return (i2 = (r2 = this.source) === null || r2 === void 0 ? void 0 : r2.subscribe(n)) !== null && i2 !== void 0 ? i2 : an;
|
|
15995
16199
|
}, t;
|
|
15996
|
-
}(ee);
|
|
15997
|
-
var ln = function(e2) {
|
|
16200
|
+
})(ee);
|
|
16201
|
+
var ln = (function(e2) {
|
|
15998
16202
|
te(t, e2);
|
|
15999
16203
|
function t(n) {
|
|
16000
16204
|
var r2 = e2.call(this) || this;
|
|
@@ -16017,13 +16221,13 @@ var ln = function(e2) {
|
|
|
16017
16221
|
}, t.prototype.next = function(n) {
|
|
16018
16222
|
e2.prototype.next.call(this, this._value = n);
|
|
16019
16223
|
}, t;
|
|
16020
|
-
}(ee);
|
|
16224
|
+
})(ee);
|
|
16021
16225
|
var Yr = {
|
|
16022
16226
|
now: function() {
|
|
16023
16227
|
return Date.now();
|
|
16024
16228
|
}
|
|
16025
16229
|
};
|
|
16026
|
-
var qr = function(e2) {
|
|
16230
|
+
var qr = (function(e2) {
|
|
16027
16231
|
te(t, e2);
|
|
16028
16232
|
function t(n, r2) {
|
|
16029
16233
|
return e2.call(this) || this;
|
|
@@ -16031,7 +16235,7 @@ var qr = function(e2) {
|
|
|
16031
16235
|
return t.prototype.schedule = function(n, r2) {
|
|
16032
16236
|
return this;
|
|
16033
16237
|
}, t;
|
|
16034
|
-
}(Oe);
|
|
16238
|
+
})(Oe);
|
|
16035
16239
|
var Mt = {
|
|
16036
16240
|
setInterval: function(e2, t) {
|
|
16037
16241
|
for (var n = [], r2 = 2; r2 < arguments.length; r2++)
|
|
@@ -16043,7 +16247,7 @@ var Mt = {
|
|
|
16043
16247
|
},
|
|
16044
16248
|
delegate: void 0
|
|
16045
16249
|
};
|
|
16046
|
-
var Kr = function(e2) {
|
|
16250
|
+
var Kr = (function(e2) {
|
|
16047
16251
|
te(t, e2);
|
|
16048
16252
|
function t(n, r2) {
|
|
16049
16253
|
var i2 = e2.call(this, n, r2) || this;
|
|
@@ -16085,16 +16289,16 @@ var Kr = function(e2) {
|
|
|
16085
16289
|
this.work = this.state = this.scheduler = null, this.pending = false, Ue(o, this), r2 != null && (this.id = this.recycleAsyncId(i2, r2, null)), this.delay = null, e2.prototype.unsubscribe.call(this);
|
|
16086
16290
|
}
|
|
16087
16291
|
}, t;
|
|
16088
|
-
}(qr);
|
|
16089
|
-
var Rt = function() {
|
|
16292
|
+
})(qr);
|
|
16293
|
+
var Rt = (function() {
|
|
16090
16294
|
function e2(t, n) {
|
|
16091
16295
|
n === void 0 && (n = e2.now), this.schedulerActionCtor = t, this.now = n;
|
|
16092
16296
|
}
|
|
16093
16297
|
return e2.prototype.schedule = function(t, n, r2) {
|
|
16094
16298
|
return n === void 0 && (n = 0), new this.schedulerActionCtor(this, t).schedule(r2, n);
|
|
16095
16299
|
}, e2.now = Yr.now, e2;
|
|
16096
|
-
}();
|
|
16097
|
-
var Gr = function(e2) {
|
|
16300
|
+
})();
|
|
16301
|
+
var Gr = (function(e2) {
|
|
16098
16302
|
te(t, e2);
|
|
16099
16303
|
function t(n, r2) {
|
|
16100
16304
|
r2 === void 0 && (r2 = Rt.now);
|
|
@@ -16119,7 +16323,7 @@ var Gr = function(e2) {
|
|
|
16119
16323
|
throw i2;
|
|
16120
16324
|
}
|
|
16121
16325
|
}, t;
|
|
16122
|
-
}(Rt);
|
|
16326
|
+
})(Rt);
|
|
16123
16327
|
var Qr = new Gr(Kr);
|
|
16124
16328
|
function Jr(e2) {
|
|
16125
16329
|
return e2 && P(e2.schedule);
|
|
@@ -16978,7 +17182,7 @@ var Xt = /* @__PURE__ */ e.forwardRef(
|
|
|
16978
17182
|
// src/components/voice-intensity-visualizer.tsx
|
|
16979
17183
|
var VoiceIntensityWithRoom = (props) => {
|
|
16980
17184
|
const [room, setRoom] = useState9(null);
|
|
16981
|
-
|
|
17185
|
+
useEffect8(() => {
|
|
16982
17186
|
if (props.isActive) {
|
|
16983
17187
|
const currentRoom = getRoom();
|
|
16984
17188
|
if (currentRoom) {
|
|
@@ -16991,7 +17195,7 @@ var VoiceIntensityWithRoom = (props) => {
|
|
|
16991
17195
|
if (!room) {
|
|
16992
17196
|
return null;
|
|
16993
17197
|
}
|
|
16994
|
-
return /* @__PURE__ */
|
|
17198
|
+
return /* @__PURE__ */ React10.createElement(Wn.Provider, { value: room }, /* @__PURE__ */ React10.createElement(VoiceIntensityBars, { ...props }));
|
|
16995
17199
|
};
|
|
16996
17200
|
var VoiceIntensityBars = ({
|
|
16997
17201
|
isActive,
|
|
@@ -17034,7 +17238,7 @@ var VoiceIntensityBars = ({
|
|
|
17034
17238
|
if (!trackRef) {
|
|
17035
17239
|
return null;
|
|
17036
17240
|
}
|
|
17037
|
-
return /* @__PURE__ */
|
|
17241
|
+
return /* @__PURE__ */ React10.createElement(
|
|
17038
17242
|
"div",
|
|
17039
17243
|
{
|
|
17040
17244
|
className: `voice-intensity-visualizer ${className}`,
|
|
@@ -17051,7 +17255,7 @@ var VoiceIntensityBars = ({
|
|
|
17051
17255
|
pointerEvents: "none"
|
|
17052
17256
|
}
|
|
17053
17257
|
},
|
|
17054
|
-
/* @__PURE__ */
|
|
17258
|
+
/* @__PURE__ */ React10.createElement(
|
|
17055
17259
|
Xt,
|
|
17056
17260
|
{
|
|
17057
17261
|
barCount,
|
|
@@ -17065,60 +17269,12 @@ var VoiceIntensityBars = ({
|
|
|
17065
17269
|
gap: "0.25rem"
|
|
17066
17270
|
}
|
|
17067
17271
|
},
|
|
17068
|
-
/* @__PURE__ */
|
|
17272
|
+
/* @__PURE__ */ React10.createElement("span", { className: "cuekit-voice-intensity-bar" })
|
|
17069
17273
|
)
|
|
17070
17274
|
);
|
|
17071
17275
|
};
|
|
17072
17276
|
var VoiceIntensityVisualizer = VoiceIntensityWithRoom;
|
|
17073
17277
|
|
|
17074
|
-
// src/components/svgs/mic.tsx
|
|
17075
|
-
import React9 from "react";
|
|
17076
|
-
var MicIcon = ({ width = 24, height = 24, className, ...props }) => {
|
|
17077
|
-
return /* @__PURE__ */ React9.createElement(
|
|
17078
|
-
"svg",
|
|
17079
|
-
{
|
|
17080
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
17081
|
-
width,
|
|
17082
|
-
height,
|
|
17083
|
-
viewBox: "0 0 24 24",
|
|
17084
|
-
fill: "none",
|
|
17085
|
-
stroke: "currentColor",
|
|
17086
|
-
strokeWidth: "2",
|
|
17087
|
-
strokeLinecap: "round",
|
|
17088
|
-
strokeLinejoin: "round",
|
|
17089
|
-
className,
|
|
17090
|
-
...props
|
|
17091
|
-
},
|
|
17092
|
-
/* @__PURE__ */ React9.createElement("path", { d: "M12 19v3" }),
|
|
17093
|
-
/* @__PURE__ */ React9.createElement("path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }),
|
|
17094
|
-
/* @__PURE__ */ React9.createElement("rect", { x: "9", y: "2", width: "6", height: "13", rx: "3" })
|
|
17095
|
-
);
|
|
17096
|
-
};
|
|
17097
|
-
var mic_default = MicIcon;
|
|
17098
|
-
|
|
17099
|
-
// src/components/svgs/loader.tsx
|
|
17100
|
-
import React10 from "react";
|
|
17101
|
-
var LoaderIcon = ({ width = 24, height = 24, className, ...props }) => {
|
|
17102
|
-
return /* @__PURE__ */ React10.createElement(
|
|
17103
|
-
"svg",
|
|
17104
|
-
{
|
|
17105
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
17106
|
-
width: "24",
|
|
17107
|
-
height: "24",
|
|
17108
|
-
viewBox: "0 0 24 24",
|
|
17109
|
-
fill: "none",
|
|
17110
|
-
stroke: "currentColor",
|
|
17111
|
-
strokeWidth: "2",
|
|
17112
|
-
strokeLinecap: "round",
|
|
17113
|
-
strokeLinejoin: "round",
|
|
17114
|
-
className,
|
|
17115
|
-
...props
|
|
17116
|
-
},
|
|
17117
|
-
/* @__PURE__ */ React10.createElement("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
|
|
17118
|
-
);
|
|
17119
|
-
};
|
|
17120
|
-
var loader_default = LoaderIcon;
|
|
17121
|
-
|
|
17122
17278
|
// src/components/mic-button.tsx
|
|
17123
17279
|
var chatState = {
|
|
17124
17280
|
isOpen: false,
|
|
@@ -17153,7 +17309,7 @@ var MicButton = ({
|
|
|
17153
17309
|
const [currentTheme, setCurrentTheme] = useState10("dark");
|
|
17154
17310
|
const [isChatOpen, setIsChatOpen] = useState10(chatState.isOpen);
|
|
17155
17311
|
const [isChatMinimized, setIsChatMinimized] = useState10(chatState.isMinimized);
|
|
17156
|
-
|
|
17312
|
+
useEffect9(() => {
|
|
17157
17313
|
chatState.isOpen = isChatOpen;
|
|
17158
17314
|
chatState.isMinimized = isChatMinimized;
|
|
17159
17315
|
}, [isChatOpen, isChatMinimized]);
|
|
@@ -17169,16 +17325,18 @@ var MicButton = ({
|
|
|
17169
17325
|
connect: voiceConnect,
|
|
17170
17326
|
disconnect: voiceDisconnect,
|
|
17171
17327
|
sendUserCommand: sendUserCommand2,
|
|
17328
|
+
sendChatMessage,
|
|
17172
17329
|
messages: messageManagerMessages,
|
|
17173
17330
|
micState,
|
|
17174
17331
|
setMicState,
|
|
17175
17332
|
status,
|
|
17176
17333
|
setStatus,
|
|
17177
|
-
participants
|
|
17334
|
+
participants,
|
|
17335
|
+
muteState,
|
|
17336
|
+
toggleMute,
|
|
17337
|
+
setMute
|
|
17178
17338
|
} = useCuekit({
|
|
17179
|
-
|
|
17180
|
-
console.log("\u{1F3A4} MicButton: Navigation command received:", command);
|
|
17181
|
-
},
|
|
17339
|
+
// Don't override navigation command - let the provider handle it
|
|
17182
17340
|
onConnectionStateChange: (state) => {
|
|
17183
17341
|
console.log("\u{1F3A4} MicButton: Connection state changed:", state);
|
|
17184
17342
|
},
|
|
@@ -17189,7 +17347,7 @@ var MicButton = ({
|
|
|
17189
17347
|
onAISpeechEnd: (trackId) => handleAISpeech(false, trackId),
|
|
17190
17348
|
appId
|
|
17191
17349
|
});
|
|
17192
|
-
|
|
17350
|
+
useEffect9(() => {
|
|
17193
17351
|
const checkTheme = () => {
|
|
17194
17352
|
if (typeof document !== "undefined") {
|
|
17195
17353
|
let newTheme;
|
|
@@ -17257,7 +17415,7 @@ var MicButton = ({
|
|
|
17257
17415
|
},
|
|
17258
17416
|
[status, micState, isConnected]
|
|
17259
17417
|
);
|
|
17260
|
-
|
|
17418
|
+
useEffect9(() => {
|
|
17261
17419
|
if (audioContainerRef.current) {
|
|
17262
17420
|
setAudioContainer(audioContainerRef);
|
|
17263
17421
|
}
|
|
@@ -17284,17 +17442,17 @@ var MicButton = ({
|
|
|
17284
17442
|
}
|
|
17285
17443
|
return isConnected2 ? "Ready" : "Connecting...";
|
|
17286
17444
|
};
|
|
17287
|
-
|
|
17445
|
+
useEffect9(() => {
|
|
17288
17446
|
if (isConnected) {
|
|
17289
17447
|
} else {
|
|
17290
17448
|
}
|
|
17291
17449
|
}, [isConnected]);
|
|
17292
|
-
|
|
17450
|
+
useEffect9(() => {
|
|
17293
17451
|
if (isConnected && !isChatOpen) {
|
|
17294
17452
|
openChat();
|
|
17295
17453
|
}
|
|
17296
17454
|
}, [isConnected, isChatOpen, openChat]);
|
|
17297
|
-
|
|
17455
|
+
useEffect9(() => {
|
|
17298
17456
|
if (messageManagerMessages.length > 0 && !isChatOpen) {
|
|
17299
17457
|
openChat();
|
|
17300
17458
|
}
|
|
@@ -17323,7 +17481,9 @@ var MicButton = ({
|
|
|
17323
17481
|
apiKey,
|
|
17324
17482
|
appId,
|
|
17325
17483
|
openChat,
|
|
17326
|
-
showBorderGlow
|
|
17484
|
+
showBorderGlow,
|
|
17485
|
+
sendChatMessage,
|
|
17486
|
+
isChatOpen
|
|
17327
17487
|
]);
|
|
17328
17488
|
const handleSendText = async (textToSend) => {
|
|
17329
17489
|
setMicState("thinking");
|
|
@@ -17333,13 +17493,14 @@ var MicButton = ({
|
|
|
17333
17493
|
}
|
|
17334
17494
|
if (isConnected) {
|
|
17335
17495
|
try {
|
|
17336
|
-
await
|
|
17496
|
+
await sendChatMessage(textToSend);
|
|
17337
17497
|
setMicState("replying");
|
|
17338
17498
|
setTimeout(() => {
|
|
17339
17499
|
setMicState("listening");
|
|
17340
17500
|
if (showBorderGlow) setShowBodyGlow(true);
|
|
17341
17501
|
}, 1e3);
|
|
17342
17502
|
} catch (error) {
|
|
17503
|
+
console.error("Failed to send chat message:", error);
|
|
17343
17504
|
} finally {
|
|
17344
17505
|
setMicState("listening");
|
|
17345
17506
|
if (showBorderGlow) setShowBodyGlow(true);
|
|
@@ -17366,8 +17527,11 @@ var MicButton = ({
|
|
|
17366
17527
|
filter: "drop-shadow(0 10px 8px rgba(0, 0, 0, 0.04)) drop-shadow(0 4px 3px rgba(0, 0, 0, 0.1))",
|
|
17367
17528
|
...imageStyle
|
|
17368
17529
|
};
|
|
17369
|
-
|
|
17370
|
-
|
|
17530
|
+
if (micState === "idle") {
|
|
17531
|
+
return /* @__PURE__ */ React11.createElement("img", { src: imageSource, alt: "Voice Assistant", style: baseImageStyle });
|
|
17532
|
+
} else {
|
|
17533
|
+
return /* @__PURE__ */ React11.createElement(VoiceIntensityWrapper, { active: true, buttonSize });
|
|
17534
|
+
}
|
|
17371
17535
|
}
|
|
17372
17536
|
const iconStyle = {
|
|
17373
17537
|
width: `100%`,
|
|
@@ -17375,15 +17539,10 @@ var MicButton = ({
|
|
|
17375
17539
|
color: "white",
|
|
17376
17540
|
filter: "drop-shadow(0 10px 8px rgba(0, 0, 0, 0.04)) drop-shadow(0 4px 3px rgba(0, 0, 0, 0.1))"
|
|
17377
17541
|
};
|
|
17378
|
-
|
|
17379
|
-
|
|
17380
|
-
|
|
17381
|
-
|
|
17382
|
-
return /* @__PURE__ */ React11.createElement(VoiceIntensityWrapper, { active: true, buttonSize });
|
|
17383
|
-
case "listening":
|
|
17384
|
-
return /* @__PURE__ */ React11.createElement(VoiceIntensityWrapper, { active: true, buttonSize });
|
|
17385
|
-
default:
|
|
17386
|
-
return /* @__PURE__ */ React11.createElement(mic_default, { style: iconStyle });
|
|
17542
|
+
if (micState === "idle") {
|
|
17543
|
+
return /* @__PURE__ */ React11.createElement(mic_default, { style: iconStyle });
|
|
17544
|
+
} else {
|
|
17545
|
+
return /* @__PURE__ */ React11.createElement(VoiceIntensityWrapper, { active: true, buttonSize });
|
|
17387
17546
|
}
|
|
17388
17547
|
};
|
|
17389
17548
|
const getPositionStyle = () => {
|
|
@@ -17451,7 +17610,6 @@ var MicButton = ({
|
|
|
17451
17610
|
case "thinking":
|
|
17452
17611
|
baseStyle.transform = "scale(1.05)";
|
|
17453
17612
|
baseStyle.boxShadow = "0 20px 25px -5px rgba(196, 132, 252, 0.4)";
|
|
17454
|
-
baseStyle.animation = "pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite";
|
|
17455
17613
|
break;
|
|
17456
17614
|
case "replying":
|
|
17457
17615
|
baseStyle.transform = "scale(1.05)";
|
|
@@ -17528,7 +17686,9 @@ var MicButton = ({
|
|
|
17528
17686
|
currentTheme,
|
|
17529
17687
|
onThemeToggle: setCurrentTheme,
|
|
17530
17688
|
status: getUserFriendlyStatus(micState, isConnected ?? false),
|
|
17531
|
-
anchor: { position: screenPosition, bottom: bottomSpace, size: buttonSize }
|
|
17689
|
+
anchor: { position: screenPosition, bottom: bottomSpace, size: buttonSize },
|
|
17690
|
+
muteState,
|
|
17691
|
+
onToggleMute: toggleMute
|
|
17532
17692
|
}
|
|
17533
17693
|
), isChatOpen && isChatMinimized && /* @__PURE__ */ React11.createElement(
|
|
17534
17694
|
"button",
|
|
@@ -17569,15 +17729,18 @@ export {
|
|
|
17569
17729
|
InitCuekit,
|
|
17570
17730
|
MicButton,
|
|
17571
17731
|
VoiceIntensityVisualizer,
|
|
17572
|
-
|
|
17732
|
+
captureAllInteractiveElements,
|
|
17733
|
+
clearElementCache,
|
|
17573
17734
|
configureWebRTCServer,
|
|
17574
17735
|
executeAction,
|
|
17575
17736
|
generateDynamicId,
|
|
17576
|
-
|
|
17737
|
+
getCurrentPathParams,
|
|
17577
17738
|
getWebRTCServerConfig,
|
|
17578
17739
|
initWebRTC,
|
|
17579
17740
|
initWebRTCWithDeployedBackend,
|
|
17741
|
+
resolveRoutePath,
|
|
17580
17742
|
useCuekit,
|
|
17581
17743
|
useQubeContext,
|
|
17582
|
-
useWebRTC
|
|
17744
|
+
useWebRTC,
|
|
17745
|
+
validateDynamicElements
|
|
17583
17746
|
};
|