@rqmii_immersive/agent-react-sdk 5.2.0 → 5.3.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/{RqmiiCloudAvatarPlayer-BL7GVcr_.js → RqmiiCloudAvatarPlayer-Bi44g7bl.js} +1117 -1115
- package/dist/RqmiiCloudAvatarPlayer-Bi44g7bl.js.map +1 -0
- package/dist/{RqmiiCloudAvatarPlayer-Dc1h266_.cjs → RqmiiCloudAvatarPlayer-DDtkCYFJ.cjs} +99 -99
- package/dist/RqmiiCloudAvatarPlayer-DDtkCYFJ.cjs.map +1 -0
- package/dist/components/RqmiiAgentRoom.d.ts.map +1 -1
- package/dist/core/managers/session.d.ts +3 -1
- package/dist/core/managers/session.d.ts.map +1 -1
- package/dist/embed.js +286 -286
- package/dist/embed.js.map +1 -1
- package/dist/hooks/use-rqmii-connection.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/provider/use-manager-lifecycle.d.ts +2 -1
- package/dist/provider/use-manager-lifecycle.d.ts.map +1 -1
- package/dist/types/index.d.ts +18 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/ui/RqmiiAgentChat.d.ts +1 -1
- package/dist/ui/RqmiiAgentChat.d.ts.map +1 -1
- package/dist/ui.cjs +21 -21
- package/dist/ui.cjs.map +1 -1
- package/dist/ui.js +637 -635
- package/dist/ui.js.map +1 -1
- package/package.json +1 -1
- package/dist/RqmiiCloudAvatarPlayer-BL7GVcr_.js.map +0 -1
- package/dist/RqmiiCloudAvatarPlayer-Dc1h266_.cjs.map +0 -1
package/dist/ui.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as oe, u as
|
|
2
|
-
import { E as
|
|
3
|
-
import { jsx as n, jsxs as f, Fragment as
|
|
4
|
-
import
|
|
5
|
-
const
|
|
1
|
+
import { A as oe, u as ka, g as Ke, j as de, h as ue, i as aa, l as ta, k as na, R as fa, c as va } from "./RqmiiCloudAvatarPlayer-Bi44g7bl.js";
|
|
2
|
+
import { E as ri, d as si } from "./RqmiiCloudAvatarPlayer-Bi44g7bl.js";
|
|
3
|
+
import { jsx as n, jsxs as f, Fragment as Ae } from "react/jsx-runtime";
|
|
4
|
+
import D, { useContext as ya, createContext as Fa, forwardRef as ia, createElement as Me, useState as y, useEffect as I, useRef as _, useLayoutEffect as Oe, useCallback as re, useMemo as te } from "react";
|
|
5
|
+
const Ta = {
|
|
6
6
|
sendMessage: "Stuur 'n boodskap",
|
|
7
7
|
send: "Stuur",
|
|
8
8
|
close: "Sluit",
|
|
@@ -45,7 +45,7 @@ const Fa = {
|
|
|
45
45
|
leadFormEmail: "E-pos",
|
|
46
46
|
leadFormPhone: "Foon",
|
|
47
47
|
leadFormMessage: "Jou boodskap"
|
|
48
|
-
},
|
|
48
|
+
}, Ea = {
|
|
49
49
|
sendMessage: "Dërgo një mesazh",
|
|
50
50
|
send: "Dërgo",
|
|
51
51
|
close: "Mbyll",
|
|
@@ -88,7 +88,7 @@ const Fa = {
|
|
|
88
88
|
leadFormEmail: "Email",
|
|
89
89
|
leadFormPhone: "Telefoni",
|
|
90
90
|
leadFormMessage: "Mesazhi juaj"
|
|
91
|
-
},
|
|
91
|
+
}, za = {
|
|
92
92
|
sendMessage: "اكتب رسالة",
|
|
93
93
|
send: "إرسال",
|
|
94
94
|
close: "إغلاق",
|
|
@@ -131,7 +131,7 @@ const Fa = {
|
|
|
131
131
|
leadFormEmail: "البريد الإلكتروني",
|
|
132
132
|
leadFormPhone: "رقم الهاتف",
|
|
133
133
|
leadFormMessage: "رسالتك"
|
|
134
|
-
},
|
|
134
|
+
}, Sa = {
|
|
135
135
|
sendMessage: "اكتب رسالة",
|
|
136
136
|
send: "إرسال",
|
|
137
137
|
close: "إغلاق",
|
|
@@ -174,7 +174,7 @@ const Fa = {
|
|
|
174
174
|
leadFormEmail: "البريد الإلكتروني",
|
|
175
175
|
leadFormPhone: "رقم الهاتف",
|
|
176
176
|
leadFormMessage: "رسالتك"
|
|
177
|
-
},
|
|
177
|
+
}, xa = {
|
|
178
178
|
sendMessage: "اكتب رسالة",
|
|
179
179
|
send: "إرسال",
|
|
180
180
|
close: "إغلاق",
|
|
@@ -217,7 +217,7 @@ const Fa = {
|
|
|
217
217
|
leadFormEmail: "البريد الإلكتروني",
|
|
218
218
|
leadFormPhone: "رقم الهاتف",
|
|
219
219
|
leadFormMessage: "رسالتك"
|
|
220
|
-
},
|
|
220
|
+
}, Pa = {
|
|
221
221
|
sendMessage: "Mesaj göndər",
|
|
222
222
|
send: "Göndər",
|
|
223
223
|
close: "Bağla",
|
|
@@ -260,7 +260,7 @@ const Fa = {
|
|
|
260
260
|
leadFormEmail: "E-poçt",
|
|
261
261
|
leadFormPhone: "Telefon",
|
|
262
262
|
leadFormMessage: "Mesajınız"
|
|
263
|
-
},
|
|
263
|
+
}, Ma = {
|
|
264
264
|
sendMessage: "Bidali mezua",
|
|
265
265
|
send: "Bidali",
|
|
266
266
|
close: "Itxi",
|
|
@@ -303,7 +303,7 @@ const Fa = {
|
|
|
303
303
|
leadFormEmail: "Helbide elektronikoa",
|
|
304
304
|
leadFormPhone: "Telefonoa",
|
|
305
305
|
leadFormMessage: "Zure mezua"
|
|
306
|
-
},
|
|
306
|
+
}, Ca = {
|
|
307
307
|
sendMessage: "Адправіць паведамленне",
|
|
308
308
|
send: "Адправіць",
|
|
309
309
|
close: "Зачыніць",
|
|
@@ -346,7 +346,7 @@ const Fa = {
|
|
|
346
346
|
leadFormEmail: "Электронная пошта",
|
|
347
347
|
leadFormPhone: "Тэлефон",
|
|
348
348
|
leadFormMessage: "Ваша паведамленне"
|
|
349
|
-
},
|
|
349
|
+
}, wa = {
|
|
350
350
|
sendMessage: "একটি বার্তা পাঠান",
|
|
351
351
|
send: "পাঠান",
|
|
352
352
|
close: "বন্ধ করুন",
|
|
@@ -389,7 +389,7 @@ const Fa = {
|
|
|
389
389
|
leadFormEmail: "ইমেইল",
|
|
390
390
|
leadFormPhone: "ফোন",
|
|
391
391
|
leadFormMessage: "আপনার বার্তা"
|
|
392
|
-
},
|
|
392
|
+
}, La = {
|
|
393
393
|
sendMessage: "Pošalji poruku",
|
|
394
394
|
send: "Pošalji",
|
|
395
395
|
close: "Zatvori",
|
|
@@ -432,7 +432,7 @@ const Fa = {
|
|
|
432
432
|
leadFormEmail: "E-mail",
|
|
433
433
|
leadFormPhone: "Telefon",
|
|
434
434
|
leadFormMessage: "Vaša poruka"
|
|
435
|
-
},
|
|
435
|
+
}, Aa = {
|
|
436
436
|
sendMessage: "Изпрати съобщение",
|
|
437
437
|
send: "Изпрати",
|
|
438
438
|
close: "Затвори",
|
|
@@ -475,7 +475,7 @@ const Fa = {
|
|
|
475
475
|
leadFormEmail: "Имейл",
|
|
476
476
|
leadFormPhone: "Телефон",
|
|
477
477
|
leadFormMessage: "Вашето съобщение"
|
|
478
|
-
},
|
|
478
|
+
}, Va = {
|
|
479
479
|
sendMessage: "Enviar un missatge",
|
|
480
480
|
send: "Enviar",
|
|
481
481
|
close: "Tancar",
|
|
@@ -518,7 +518,7 @@ const Fa = {
|
|
|
518
518
|
leadFormEmail: "Correu electrònic",
|
|
519
519
|
leadFormPhone: "Telèfon",
|
|
520
520
|
leadFormMessage: "El teu missatge"
|
|
521
|
-
},
|
|
521
|
+
}, ja = {
|
|
522
522
|
sendMessage: "发送消息",
|
|
523
523
|
send: "发送",
|
|
524
524
|
close: "关闭",
|
|
@@ -561,7 +561,7 @@ const Fa = {
|
|
|
561
561
|
leadFormEmail: "电子邮箱",
|
|
562
562
|
leadFormPhone: "电话",
|
|
563
563
|
leadFormMessage: "您的留言"
|
|
564
|
-
},
|
|
564
|
+
}, Ia = {
|
|
565
565
|
sendMessage: "Pošalji poruku",
|
|
566
566
|
send: "Pošalji",
|
|
567
567
|
close: "Zatvori",
|
|
@@ -604,7 +604,7 @@ const Fa = {
|
|
|
604
604
|
leadFormEmail: "E-mail",
|
|
605
605
|
leadFormPhone: "Telefon",
|
|
606
606
|
leadFormMessage: "Vaša poruka"
|
|
607
|
-
},
|
|
607
|
+
}, Da = {
|
|
608
608
|
sendMessage: "Poslat zprávu",
|
|
609
609
|
send: "Odeslat",
|
|
610
610
|
close: "Zavřít",
|
|
@@ -647,7 +647,7 @@ const Fa = {
|
|
|
647
647
|
leadFormEmail: "E-mail",
|
|
648
648
|
leadFormPhone: "Telefon",
|
|
649
649
|
leadFormMessage: "Vaše zpráva"
|
|
650
|
-
},
|
|
650
|
+
}, qa = {
|
|
651
651
|
sendMessage: "Send en besked",
|
|
652
652
|
send: "Send",
|
|
653
653
|
close: "Luk",
|
|
@@ -690,7 +690,7 @@ const Fa = {
|
|
|
690
690
|
leadFormEmail: "E-mail",
|
|
691
691
|
leadFormPhone: "Telefon",
|
|
692
692
|
leadFormMessage: "Din besked"
|
|
693
|
-
},
|
|
693
|
+
}, Na = {
|
|
694
694
|
sendMessage: "Stuur een bericht",
|
|
695
695
|
send: "Verzenden",
|
|
696
696
|
close: "Sluiten",
|
|
@@ -733,7 +733,7 @@ const Fa = {
|
|
|
733
733
|
leadFormEmail: "E-mail",
|
|
734
734
|
leadFormPhone: "Telefoon",
|
|
735
735
|
leadFormMessage: "Uw bericht"
|
|
736
|
-
},
|
|
736
|
+
}, _a = {
|
|
737
737
|
sendMessage: "Send a message",
|
|
738
738
|
send: "Send",
|
|
739
739
|
close: "Close",
|
|
@@ -776,7 +776,7 @@ const Fa = {
|
|
|
776
776
|
leadFormEmail: "Email",
|
|
777
777
|
leadFormPhone: "Phone",
|
|
778
778
|
leadFormMessage: "Your message"
|
|
779
|
-
},
|
|
779
|
+
}, Ra = {
|
|
780
780
|
sendMessage: "Saada sõnum",
|
|
781
781
|
send: "Saada",
|
|
782
782
|
close: "Sulge",
|
|
@@ -819,7 +819,7 @@ const Fa = {
|
|
|
819
819
|
leadFormEmail: "E-post",
|
|
820
820
|
leadFormPhone: "Telefon",
|
|
821
821
|
leadFormMessage: "Teie sõnum"
|
|
822
|
-
},
|
|
822
|
+
}, Ba = {
|
|
823
823
|
sendMessage: "Lähetä viesti",
|
|
824
824
|
send: "Lähetä",
|
|
825
825
|
close: "Sulje",
|
|
@@ -862,7 +862,7 @@ const Fa = {
|
|
|
862
862
|
leadFormEmail: "Sähköposti",
|
|
863
863
|
leadFormPhone: "Puhelin",
|
|
864
864
|
leadFormMessage: "Viestisi"
|
|
865
|
-
},
|
|
865
|
+
}, Ga = {
|
|
866
866
|
sendMessage: "Envoyer un message",
|
|
867
867
|
send: "Envoyer",
|
|
868
868
|
close: "Fermer",
|
|
@@ -905,7 +905,7 @@ const Fa = {
|
|
|
905
905
|
leadFormEmail: "E-mail",
|
|
906
906
|
leadFormPhone: "Téléphone",
|
|
907
907
|
leadFormMessage: "Votre message"
|
|
908
|
-
},
|
|
908
|
+
}, Ua = {
|
|
909
909
|
sendMessage: "Enviar unha mensaxe",
|
|
910
910
|
send: "Enviar",
|
|
911
911
|
close: "Pechar",
|
|
@@ -948,7 +948,7 @@ const Fa = {
|
|
|
948
948
|
leadFormEmail: "Correo electrónico",
|
|
949
949
|
leadFormPhone: "Teléfono",
|
|
950
950
|
leadFormMessage: "A túa mensaxe"
|
|
951
|
-
},
|
|
951
|
+
}, Ka = {
|
|
952
952
|
sendMessage: "Nachricht senden",
|
|
953
953
|
send: "Senden",
|
|
954
954
|
close: "Schließen",
|
|
@@ -991,7 +991,7 @@ const Fa = {
|
|
|
991
991
|
leadFormEmail: "E-Mail",
|
|
992
992
|
leadFormPhone: "Telefon",
|
|
993
993
|
leadFormMessage: "Ihre Nachricht"
|
|
994
|
-
},
|
|
994
|
+
}, Oa = {
|
|
995
995
|
sendMessage: "Αποστολή μηνύματος",
|
|
996
996
|
send: "Αποστολή",
|
|
997
997
|
close: "Κλείσιμο",
|
|
@@ -1034,7 +1034,7 @@ const Fa = {
|
|
|
1034
1034
|
leadFormEmail: "E-mail",
|
|
1035
1035
|
leadFormPhone: "Τηλέφωνο",
|
|
1036
1036
|
leadFormMessage: "Το μήνυμά σας"
|
|
1037
|
-
},
|
|
1037
|
+
}, Ya = {
|
|
1038
1038
|
sendMessage: "સંદેશ મોકલો",
|
|
1039
1039
|
send: "મોકલો",
|
|
1040
1040
|
close: "બંધ કરો",
|
|
@@ -1077,7 +1077,7 @@ const Fa = {
|
|
|
1077
1077
|
leadFormEmail: "ઇમેઇલ",
|
|
1078
1078
|
leadFormPhone: "ફોન",
|
|
1079
1079
|
leadFormMessage: "તમારો સંદેશ"
|
|
1080
|
-
},
|
|
1080
|
+
}, Qa = {
|
|
1081
1081
|
sendMessage: "संदेश भेजें",
|
|
1082
1082
|
send: "भेजें",
|
|
1083
1083
|
close: "बंद करें",
|
|
@@ -1120,7 +1120,7 @@ const Fa = {
|
|
|
1120
1120
|
leadFormEmail: "ईमेल",
|
|
1121
1121
|
leadFormPhone: "फ़ोन",
|
|
1122
1122
|
leadFormMessage: "आपका संदेश"
|
|
1123
|
-
},
|
|
1123
|
+
}, Ha = {
|
|
1124
1124
|
sendMessage: "Üzenet küldése",
|
|
1125
1125
|
send: "Küldés",
|
|
1126
1126
|
close: "Bezárás",
|
|
@@ -1163,7 +1163,7 @@ const Fa = {
|
|
|
1163
1163
|
leadFormEmail: "E-mail",
|
|
1164
1164
|
leadFormPhone: "Telefon",
|
|
1165
1165
|
leadFormMessage: "Üzenete"
|
|
1166
|
-
},
|
|
1166
|
+
}, Wa = {
|
|
1167
1167
|
sendMessage: "Kirim pesan",
|
|
1168
1168
|
send: "Kirim",
|
|
1169
1169
|
close: "Tutup",
|
|
@@ -1206,7 +1206,7 @@ const Fa = {
|
|
|
1206
1206
|
leadFormEmail: "Email",
|
|
1207
1207
|
leadFormPhone: "Telepon",
|
|
1208
1208
|
leadFormMessage: "Pesan Anda"
|
|
1209
|
-
},
|
|
1209
|
+
}, $a = {
|
|
1210
1210
|
sendMessage: "Invia un messaggio",
|
|
1211
1211
|
send: "Invia",
|
|
1212
1212
|
close: "Chiudi",
|
|
@@ -1249,7 +1249,7 @@ const Fa = {
|
|
|
1249
1249
|
leadFormEmail: "E-mail",
|
|
1250
1250
|
leadFormPhone: "Telefono",
|
|
1251
1251
|
leadFormMessage: "Il tuo messaggio"
|
|
1252
|
-
},
|
|
1252
|
+
}, Za = {
|
|
1253
1253
|
sendMessage: "メッセージを送信",
|
|
1254
1254
|
send: "送信",
|
|
1255
1255
|
close: "閉じる",
|
|
@@ -1292,7 +1292,7 @@ const Fa = {
|
|
|
1292
1292
|
leadFormEmail: "メールアドレス",
|
|
1293
1293
|
leadFormPhone: "電話番号",
|
|
1294
1294
|
leadFormMessage: "メッセージ"
|
|
1295
|
-
},
|
|
1295
|
+
}, Ja = {
|
|
1296
1296
|
sendMessage: "ಸಂದೇಶ ಕಳುಹಿಸಿ",
|
|
1297
1297
|
send: "ಕಳುಹಿಸಿ",
|
|
1298
1298
|
close: "ಮುಚ್ಚಿ",
|
|
@@ -1335,7 +1335,7 @@ const Fa = {
|
|
|
1335
1335
|
leadFormEmail: "ಇಮೇಲ್",
|
|
1336
1336
|
leadFormPhone: "ಫೋನ್",
|
|
1337
1337
|
leadFormMessage: "ನಿಮ್ಮ ಸಂದೇಶ"
|
|
1338
|
-
},
|
|
1338
|
+
}, Xa = {
|
|
1339
1339
|
sendMessage: "Хабарлама жіберу",
|
|
1340
1340
|
send: "Жіберу",
|
|
1341
1341
|
close: "Жабу",
|
|
@@ -1378,7 +1378,7 @@ const Fa = {
|
|
|
1378
1378
|
leadFormEmail: "Электрондық пошта",
|
|
1379
1379
|
leadFormPhone: "Телефон",
|
|
1380
1380
|
leadFormMessage: "Сіздің хабарламаңыз"
|
|
1381
|
-
},
|
|
1381
|
+
}, et = {
|
|
1382
1382
|
sendMessage: "메시지 보내기",
|
|
1383
1383
|
send: "보내기",
|
|
1384
1384
|
close: "닫기",
|
|
@@ -1421,7 +1421,7 @@ const Fa = {
|
|
|
1421
1421
|
leadFormEmail: "이메일",
|
|
1422
1422
|
leadFormPhone: "전화번호",
|
|
1423
1423
|
leadFormMessage: "메시지"
|
|
1424
|
-
},
|
|
1424
|
+
}, at = {
|
|
1425
1425
|
sendMessage: "Sūtīt ziņojumu",
|
|
1426
1426
|
send: "Sūtīt",
|
|
1427
1427
|
close: "Aizvērt",
|
|
@@ -1464,7 +1464,7 @@ const Fa = {
|
|
|
1464
1464
|
leadFormEmail: "E-pasts",
|
|
1465
1465
|
leadFormPhone: "Tālrunis",
|
|
1466
1466
|
leadFormMessage: "Jūsu ziņojums"
|
|
1467
|
-
},
|
|
1467
|
+
}, tt = {
|
|
1468
1468
|
sendMessage: "Siųsti žinutę",
|
|
1469
1469
|
send: "Siųsti",
|
|
1470
1470
|
close: "Uždaryti",
|
|
@@ -1507,7 +1507,7 @@ const Fa = {
|
|
|
1507
1507
|
leadFormEmail: "El. paštas",
|
|
1508
1508
|
leadFormPhone: "Telefonas",
|
|
1509
1509
|
leadFormMessage: "Jūsų žinutė"
|
|
1510
|
-
},
|
|
1510
|
+
}, nt = {
|
|
1511
1511
|
sendMessage: "Испрати порака",
|
|
1512
1512
|
send: "Испрати",
|
|
1513
1513
|
close: "Затвори",
|
|
@@ -1550,7 +1550,7 @@ const Fa = {
|
|
|
1550
1550
|
leadFormEmail: "Е-пошта",
|
|
1551
1551
|
leadFormPhone: "Телефон",
|
|
1552
1552
|
leadFormMessage: "Вашата порака"
|
|
1553
|
-
},
|
|
1553
|
+
}, it = {
|
|
1554
1554
|
sendMessage: "Hantar mesej",
|
|
1555
1555
|
send: "Hantar",
|
|
1556
1556
|
close: "Tutup",
|
|
@@ -1593,7 +1593,7 @@ const Fa = {
|
|
|
1593
1593
|
leadFormEmail: "E-mel",
|
|
1594
1594
|
leadFormPhone: "Telefon",
|
|
1595
1595
|
leadFormMessage: "Mesej anda"
|
|
1596
|
-
},
|
|
1596
|
+
}, ot = {
|
|
1597
1597
|
sendMessage: "ഒരു സന്ദേശം അയയ്ക്കുക",
|
|
1598
1598
|
send: "അയയ്ക്കുക",
|
|
1599
1599
|
close: "അടയ്ക്കുക",
|
|
@@ -1636,7 +1636,7 @@ const Fa = {
|
|
|
1636
1636
|
leadFormEmail: "ഇമെയിൽ",
|
|
1637
1637
|
leadFormPhone: "ഫോൺ",
|
|
1638
1638
|
leadFormMessage: "നിങ്ങളുടെ സന്ദേശം"
|
|
1639
|
-
},
|
|
1639
|
+
}, rt = {
|
|
1640
1640
|
sendMessage: "संदेश पाठवा",
|
|
1641
1641
|
send: "पाठवा",
|
|
1642
1642
|
close: "बंद करा",
|
|
@@ -1679,7 +1679,7 @@ const Fa = {
|
|
|
1679
1679
|
leadFormEmail: "ईमेल",
|
|
1680
1680
|
leadFormPhone: "फोन",
|
|
1681
1681
|
leadFormMessage: "तुमचा संदेश"
|
|
1682
|
-
},
|
|
1682
|
+
}, st = {
|
|
1683
1683
|
sendMessage: "Send en melding",
|
|
1684
1684
|
send: "Send",
|
|
1685
1685
|
close: "Lukk",
|
|
@@ -1722,7 +1722,7 @@ const Fa = {
|
|
|
1722
1722
|
leadFormEmail: "E-post",
|
|
1723
1723
|
leadFormPhone: "Telefon",
|
|
1724
1724
|
leadFormMessage: "Din melding"
|
|
1725
|
-
},
|
|
1725
|
+
}, lt = {
|
|
1726
1726
|
sendMessage: "پیامی بنویسید",
|
|
1727
1727
|
send: "ارسال",
|
|
1728
1728
|
close: "بستن",
|
|
@@ -1765,7 +1765,7 @@ const Fa = {
|
|
|
1765
1765
|
leadFormEmail: "ایمیل",
|
|
1766
1766
|
leadFormPhone: "تلفن",
|
|
1767
1767
|
leadFormMessage: "پیام شما"
|
|
1768
|
-
},
|
|
1768
|
+
}, ct = {
|
|
1769
1769
|
sendMessage: "Wyślij wiadomość",
|
|
1770
1770
|
send: "Wyślij",
|
|
1771
1771
|
close: "Zamknij",
|
|
@@ -1808,7 +1808,7 @@ const Fa = {
|
|
|
1808
1808
|
leadFormEmail: "E-mail",
|
|
1809
1809
|
leadFormPhone: "Telefon",
|
|
1810
1810
|
leadFormMessage: "Twoja wiadomość"
|
|
1811
|
-
},
|
|
1811
|
+
}, dt = {
|
|
1812
1812
|
sendMessage: "Enviar mensagem",
|
|
1813
1813
|
send: "Enviar",
|
|
1814
1814
|
close: "Fechar",
|
|
@@ -1851,7 +1851,7 @@ const Fa = {
|
|
|
1851
1851
|
leadFormEmail: "E-mail",
|
|
1852
1852
|
leadFormPhone: "Telefone",
|
|
1853
1853
|
leadFormMessage: "Sua mensagem"
|
|
1854
|
-
},
|
|
1854
|
+
}, ut = {
|
|
1855
1855
|
sendMessage: "ਇੱਕ ਸੁਨੇਹਾ ਭੇਜੋ",
|
|
1856
1856
|
send: "ਭੇਜੋ",
|
|
1857
1857
|
close: "ਬੰਦ ਕਰੋ",
|
|
@@ -1894,7 +1894,7 @@ const Fa = {
|
|
|
1894
1894
|
leadFormEmail: "ਈਮੇਲ",
|
|
1895
1895
|
leadFormPhone: "ਫ਼ੋਨ",
|
|
1896
1896
|
leadFormMessage: "ਤੁਹਾਡਾ ਸੁਨੇਹਾ"
|
|
1897
|
-
},
|
|
1897
|
+
}, mt = {
|
|
1898
1898
|
sendMessage: "Trimite un mesaj",
|
|
1899
1899
|
send: "Trimite",
|
|
1900
1900
|
close: "Închide",
|
|
@@ -1937,7 +1937,7 @@ const Fa = {
|
|
|
1937
1937
|
leadFormEmail: "E-mail",
|
|
1938
1938
|
leadFormPhone: "Telefon",
|
|
1939
1939
|
leadFormMessage: "Mesajul dumneavoastră"
|
|
1940
|
-
},
|
|
1940
|
+
}, ht = {
|
|
1941
1941
|
sendMessage: "Отправить сообщение",
|
|
1942
1942
|
send: "Отправить",
|
|
1943
1943
|
close: "Закрыть",
|
|
@@ -1980,7 +1980,7 @@ const Fa = {
|
|
|
1980
1980
|
leadFormEmail: "Электронная почта",
|
|
1981
1981
|
leadFormPhone: "Телефон",
|
|
1982
1982
|
leadFormMessage: "Ваше сообщение"
|
|
1983
|
-
},
|
|
1983
|
+
}, gt = {
|
|
1984
1984
|
sendMessage: "Пошаљи поруку",
|
|
1985
1985
|
send: "Пошаљи",
|
|
1986
1986
|
close: "Затвори",
|
|
@@ -2023,7 +2023,7 @@ const Fa = {
|
|
|
2023
2023
|
leadFormEmail: "Имејл",
|
|
2024
2024
|
leadFormPhone: "Телефон",
|
|
2025
2025
|
leadFormMessage: "Ваша порука"
|
|
2026
|
-
},
|
|
2026
|
+
}, pt = {
|
|
2027
2027
|
sendMessage: "Poslať správu",
|
|
2028
2028
|
send: "Odoslať",
|
|
2029
2029
|
close: "Zavrieť",
|
|
@@ -2066,7 +2066,7 @@ const Fa = {
|
|
|
2066
2066
|
leadFormEmail: "E-mail",
|
|
2067
2067
|
leadFormPhone: "Telefón",
|
|
2068
2068
|
leadFormMessage: "Vaša správa"
|
|
2069
|
-
},
|
|
2069
|
+
}, bt = {
|
|
2070
2070
|
sendMessage: "Pošlji sporočilo",
|
|
2071
2071
|
send: "Pošlji",
|
|
2072
2072
|
close: "Zapri",
|
|
@@ -2109,7 +2109,7 @@ const Fa = {
|
|
|
2109
2109
|
leadFormEmail: "E-pošta",
|
|
2110
2110
|
leadFormPhone: "Telefon",
|
|
2111
2111
|
leadFormMessage: "Vaše sporočilo"
|
|
2112
|
-
},
|
|
2112
|
+
}, kt = {
|
|
2113
2113
|
sendMessage: "Enviar un mensaje",
|
|
2114
2114
|
send: "Enviar",
|
|
2115
2115
|
close: "Cerrar",
|
|
@@ -2152,7 +2152,7 @@ const Fa = {
|
|
|
2152
2152
|
leadFormEmail: "Correo electrónico",
|
|
2153
2153
|
leadFormPhone: "Teléfono",
|
|
2154
2154
|
leadFormMessage: "Tu mensaje"
|
|
2155
|
-
},
|
|
2155
|
+
}, ft = {
|
|
2156
2156
|
sendMessage: "Tuma ujumbe",
|
|
2157
2157
|
send: "Tuma",
|
|
2158
2158
|
close: "Funga",
|
|
@@ -2195,7 +2195,7 @@ const Fa = {
|
|
|
2195
2195
|
leadFormEmail: "Barua pepe",
|
|
2196
2196
|
leadFormPhone: "Simu",
|
|
2197
2197
|
leadFormMessage: "Ujumbe wako"
|
|
2198
|
-
},
|
|
2198
|
+
}, vt = {
|
|
2199
2199
|
sendMessage: "Skicka ett meddelande",
|
|
2200
2200
|
send: "Skicka",
|
|
2201
2201
|
close: "Stäng",
|
|
@@ -2238,7 +2238,7 @@ const Fa = {
|
|
|
2238
2238
|
leadFormEmail: "E-post",
|
|
2239
2239
|
leadFormPhone: "Telefon",
|
|
2240
2240
|
leadFormMessage: "Ditt meddelande"
|
|
2241
|
-
},
|
|
2241
|
+
}, yt = {
|
|
2242
2242
|
sendMessage: "Magpadala ng mensahe",
|
|
2243
2243
|
send: "Ipadala",
|
|
2244
2244
|
close: "Isara",
|
|
@@ -2281,7 +2281,7 @@ const Fa = {
|
|
|
2281
2281
|
leadFormEmail: "Email",
|
|
2282
2282
|
leadFormPhone: "Telepono",
|
|
2283
2283
|
leadFormMessage: "Ang iyong mensahe"
|
|
2284
|
-
},
|
|
2284
|
+
}, Ft = {
|
|
2285
2285
|
sendMessage: "ஒரு செய்தி அனுப்பவும்",
|
|
2286
2286
|
send: "அனுப்பு",
|
|
2287
2287
|
close: "மூடு",
|
|
@@ -2324,7 +2324,7 @@ const Fa = {
|
|
|
2324
2324
|
leadFormEmail: "மின்னஞ்சல்",
|
|
2325
2325
|
leadFormPhone: "தொலைபேசி",
|
|
2326
2326
|
leadFormMessage: "உங்கள் செய்தி"
|
|
2327
|
-
},
|
|
2327
|
+
}, Tt = {
|
|
2328
2328
|
sendMessage: "సందేశం పంపండి",
|
|
2329
2329
|
send: "పంపు",
|
|
2330
2330
|
close: "మూసివేయండి",
|
|
@@ -2367,7 +2367,7 @@ const Fa = {
|
|
|
2367
2367
|
leadFormEmail: "ఇమెయిల్",
|
|
2368
2368
|
leadFormPhone: "ఫోన్",
|
|
2369
2369
|
leadFormMessage: "మీ సందేశం"
|
|
2370
|
-
},
|
|
2370
|
+
}, Et = {
|
|
2371
2371
|
sendMessage: "ส่งข้อความ",
|
|
2372
2372
|
send: "ส่ง",
|
|
2373
2373
|
close: "ปิด",
|
|
@@ -2410,7 +2410,7 @@ const Fa = {
|
|
|
2410
2410
|
leadFormEmail: "อีเมล",
|
|
2411
2411
|
leadFormPhone: "โทรศัพท์",
|
|
2412
2412
|
leadFormMessage: "ข้อความของคุณ"
|
|
2413
|
-
},
|
|
2413
|
+
}, zt = {
|
|
2414
2414
|
sendMessage: "Mesaj gönder",
|
|
2415
2415
|
send: "Gönder",
|
|
2416
2416
|
close: "Kapat",
|
|
@@ -2453,7 +2453,7 @@ const Fa = {
|
|
|
2453
2453
|
leadFormEmail: "E-posta",
|
|
2454
2454
|
leadFormPhone: "Telefon",
|
|
2455
2455
|
leadFormMessage: "Mesajınız"
|
|
2456
|
-
},
|
|
2456
|
+
}, St = {
|
|
2457
2457
|
sendMessage: "Надіслати повідомлення",
|
|
2458
2458
|
send: "Надіслати",
|
|
2459
2459
|
close: "Закрити",
|
|
@@ -2496,7 +2496,7 @@ const Fa = {
|
|
|
2496
2496
|
leadFormEmail: "Електронна пошта",
|
|
2497
2497
|
leadFormPhone: "Телефон",
|
|
2498
2498
|
leadFormMessage: "Ваше повідомлення"
|
|
2499
|
-
},
|
|
2499
|
+
}, xt = {
|
|
2500
2500
|
sendMessage: "پیغام بھیجیں",
|
|
2501
2501
|
send: "بھیجیں",
|
|
2502
2502
|
close: "بند کریں",
|
|
@@ -2539,7 +2539,7 @@ const Fa = {
|
|
|
2539
2539
|
leadFormEmail: "ای میل",
|
|
2540
2540
|
leadFormPhone: "فون",
|
|
2541
2541
|
leadFormMessage: "آپ کا پیغام"
|
|
2542
|
-
},
|
|
2542
|
+
}, Pt = {
|
|
2543
2543
|
sendMessage: "Gửi tin nhắn",
|
|
2544
2544
|
send: "Gửi",
|
|
2545
2545
|
close: "Đóng",
|
|
@@ -2582,7 +2582,7 @@ const Fa = {
|
|
|
2582
2582
|
leadFormEmail: "Email",
|
|
2583
2583
|
leadFormPhone: "Điện thoại",
|
|
2584
2584
|
leadFormMessage: "Tin nhắn của bạn"
|
|
2585
|
-
},
|
|
2585
|
+
}, Mt = {
|
|
2586
2586
|
sendMessage: "Anfon neges",
|
|
2587
2587
|
send: "Anfon",
|
|
2588
2588
|
close: "Cau",
|
|
@@ -2626,68 +2626,68 @@ const Fa = {
|
|
|
2626
2626
|
leadFormPhone: "Ffôn",
|
|
2627
2627
|
leadFormMessage: "Eich neges"
|
|
2628
2628
|
}, Ye = {
|
|
2629
|
-
af:
|
|
2630
|
-
sq:
|
|
2631
|
-
ar:
|
|
2632
|
-
"ar-eg":
|
|
2633
|
-
"ar-sa":
|
|
2634
|
-
az:
|
|
2635
|
-
eu:
|
|
2636
|
-
be:
|
|
2637
|
-
bn:
|
|
2638
|
-
bs:
|
|
2639
|
-
bg:
|
|
2640
|
-
ca:
|
|
2641
|
-
zh:
|
|
2642
|
-
hr:
|
|
2643
|
-
cs:
|
|
2644
|
-
da:
|
|
2645
|
-
nl:
|
|
2646
|
-
en:
|
|
2647
|
-
et:
|
|
2648
|
-
fi:
|
|
2649
|
-
fr:
|
|
2650
|
-
gl:
|
|
2651
|
-
de:
|
|
2652
|
-
el:
|
|
2653
|
-
gu:
|
|
2654
|
-
hi:
|
|
2655
|
-
hu:
|
|
2656
|
-
id:
|
|
2657
|
-
it:
|
|
2658
|
-
ja:
|
|
2659
|
-
kn:
|
|
2660
|
-
kk:
|
|
2661
|
-
ko:
|
|
2662
|
-
lv:
|
|
2663
|
-
lt:
|
|
2664
|
-
mk:
|
|
2665
|
-
ms:
|
|
2666
|
-
ml:
|
|
2667
|
-
mr:
|
|
2668
|
-
no:
|
|
2669
|
-
fa:
|
|
2670
|
-
pl:
|
|
2671
|
-
pt:
|
|
2672
|
-
pa:
|
|
2673
|
-
ro:
|
|
2674
|
-
ru:
|
|
2675
|
-
sr:
|
|
2676
|
-
sk:
|
|
2677
|
-
sl:
|
|
2678
|
-
es:
|
|
2679
|
-
sw:
|
|
2680
|
-
sv:
|
|
2681
|
-
tl:
|
|
2682
|
-
ta:
|
|
2683
|
-
te:
|
|
2684
|
-
th:
|
|
2685
|
-
tr:
|
|
2686
|
-
uk:
|
|
2687
|
-
ur:
|
|
2688
|
-
vi:
|
|
2689
|
-
cy:
|
|
2690
|
-
},
|
|
2629
|
+
af: Ta,
|
|
2630
|
+
sq: Ea,
|
|
2631
|
+
ar: za,
|
|
2632
|
+
"ar-eg": Sa,
|
|
2633
|
+
"ar-sa": xa,
|
|
2634
|
+
az: Pa,
|
|
2635
|
+
eu: Ma,
|
|
2636
|
+
be: Ca,
|
|
2637
|
+
bn: wa,
|
|
2638
|
+
bs: La,
|
|
2639
|
+
bg: Aa,
|
|
2640
|
+
ca: Va,
|
|
2641
|
+
zh: ja,
|
|
2642
|
+
hr: Ia,
|
|
2643
|
+
cs: Da,
|
|
2644
|
+
da: qa,
|
|
2645
|
+
nl: Na,
|
|
2646
|
+
en: _a,
|
|
2647
|
+
et: Ra,
|
|
2648
|
+
fi: Ba,
|
|
2649
|
+
fr: Ga,
|
|
2650
|
+
gl: Ua,
|
|
2651
|
+
de: Ka,
|
|
2652
|
+
el: Oa,
|
|
2653
|
+
gu: Ya,
|
|
2654
|
+
hi: Qa,
|
|
2655
|
+
hu: Ha,
|
|
2656
|
+
id: Wa,
|
|
2657
|
+
it: $a,
|
|
2658
|
+
ja: Za,
|
|
2659
|
+
kn: Ja,
|
|
2660
|
+
kk: Xa,
|
|
2661
|
+
ko: et,
|
|
2662
|
+
lv: at,
|
|
2663
|
+
lt: tt,
|
|
2664
|
+
mk: nt,
|
|
2665
|
+
ms: it,
|
|
2666
|
+
ml: ot,
|
|
2667
|
+
mr: rt,
|
|
2668
|
+
no: st,
|
|
2669
|
+
fa: lt,
|
|
2670
|
+
pl: ct,
|
|
2671
|
+
pt: dt,
|
|
2672
|
+
pa: ut,
|
|
2673
|
+
ro: mt,
|
|
2674
|
+
ru: ht,
|
|
2675
|
+
sr: gt,
|
|
2676
|
+
sk: pt,
|
|
2677
|
+
sl: bt,
|
|
2678
|
+
es: kt,
|
|
2679
|
+
sw: ft,
|
|
2680
|
+
sv: vt,
|
|
2681
|
+
tl: yt,
|
|
2682
|
+
ta: Ft,
|
|
2683
|
+
te: Tt,
|
|
2684
|
+
th: Et,
|
|
2685
|
+
tr: zt,
|
|
2686
|
+
uk: St,
|
|
2687
|
+
ur: xt,
|
|
2688
|
+
vi: Pt,
|
|
2689
|
+
cy: Mt
|
|
2690
|
+
}, Ce = [
|
|
2691
2691
|
{ value: "af", label: "Afrikaans", dir: "ltr" },
|
|
2692
2692
|
{ value: "sq", label: "Shqip", dir: "ltr" },
|
|
2693
2693
|
{ value: "ar-eg", label: "العربية (مصر)", dir: "rtl" },
|
|
@@ -2748,11 +2748,11 @@ const Fa = {
|
|
|
2748
2748
|
{ value: "ur", label: "اردو", dir: "rtl" },
|
|
2749
2749
|
{ value: "vi", label: "Tiếng Việt", dir: "ltr" },
|
|
2750
2750
|
{ value: "cy", label: "Cymraeg", dir: "ltr" }
|
|
2751
|
-
], Qe =
|
|
2751
|
+
], Qe = Ce.map(
|
|
2752
2752
|
(e) => e.value
|
|
2753
2753
|
);
|
|
2754
2754
|
function He(e) {
|
|
2755
|
-
return
|
|
2755
|
+
return Ce.find((a) => a.value === e) || Ce.find((a) => a.value === "en");
|
|
2756
2756
|
}
|
|
2757
2757
|
function F(e, a) {
|
|
2758
2758
|
return Ye[e]?.[a] || Ye.en[a] || a;
|
|
@@ -2796,8 +2796,8 @@ function pe(e) {
|
|
|
2796
2796
|
welcome_bubble_sound_enabled: typeof u?.welcome_bubble_sound_enabled == "boolean" ? u.welcome_bubble_sound_enabled : !1,
|
|
2797
2797
|
typing_indicator_enabled: typeof u?.typing_indicator_enabled == "boolean" ? u.typing_indicator_enabled : !0
|
|
2798
2798
|
}
|
|
2799
|
-
} : void 0,
|
|
2800
|
-
Object.entries(z).filter(([, p]) => typeof p == "string").map(([p,
|
|
2799
|
+
} : void 0, v = a.consent || a.consent_config || null, z = o.welcome_message || o.welcomeMessage || a.welcome_message || a.welcomeMessage || {}, T = Object.fromEntries(
|
|
2800
|
+
Object.entries(z).filter(([, p]) => typeof p == "string").map(([p, x]) => [p, x.slice(0, 1e3)])
|
|
2801
2801
|
), g = typeof a.allow_interrupt == "boolean" ? a.allow_interrupt : typeof s.allow_interrupt == "boolean" ? s.allow_interrupt : !0, b = typeof a.allow_welcome_message_interrupt == "boolean" ? a.allow_welcome_message_interrupt : typeof s.allow_welcome_message_interrupt == "boolean" ? s.allow_welcome_message_interrupt : !1;
|
|
2802
2802
|
return {
|
|
2803
2803
|
id: a.id || null,
|
|
@@ -2818,18 +2818,18 @@ function pe(e) {
|
|
|
2818
2818
|
suggested_messages: o.suggested_messages || o.suggestedMessages || {}
|
|
2819
2819
|
},
|
|
2820
2820
|
widget: k || void 0,
|
|
2821
|
-
consent:
|
|
2822
|
-
enabled:
|
|
2823
|
-
title:
|
|
2824
|
-
body:
|
|
2825
|
-
acceptLabel:
|
|
2826
|
-
declineLabel:
|
|
2827
|
-
termsUrl:
|
|
2828
|
-
privacyUrl:
|
|
2821
|
+
consent: v ? {
|
|
2822
|
+
enabled: v.enabled ?? !1,
|
|
2823
|
+
title: v.title || void 0,
|
|
2824
|
+
body: v.body || void 0,
|
|
2825
|
+
acceptLabel: v.accept_label || v.acceptLabel || void 0,
|
|
2826
|
+
declineLabel: v.decline_label || v.declineLabel || void 0,
|
|
2827
|
+
termsUrl: v.terms_url || v.termsUrl || void 0,
|
|
2828
|
+
privacyUrl: v.privacy_url || v.privacyUrl || void 0
|
|
2829
2829
|
} : void 0
|
|
2830
2830
|
};
|
|
2831
2831
|
}
|
|
2832
|
-
async function
|
|
2832
|
+
async function Ct({
|
|
2833
2833
|
restUrl: e,
|
|
2834
2834
|
identifier: a,
|
|
2835
2835
|
withCredentials: t = !1,
|
|
@@ -2870,7 +2870,7 @@ async function Mt({
|
|
|
2870
2870
|
welcome_message: o.welcome_message
|
|
2871
2871
|
});
|
|
2872
2872
|
}
|
|
2873
|
-
async function
|
|
2873
|
+
async function ei({ restUrl: e, apiKey: a, agentId: t, signal: i }) {
|
|
2874
2874
|
if (!e) throw new Error("Missing restUrl");
|
|
2875
2875
|
const r = a || t;
|
|
2876
2876
|
if (!r) throw new Error("Provide one of apiKey or agentId");
|
|
@@ -2894,7 +2894,7 @@ async function Xn({ restUrl: e, apiKey: a, agentId: t, signal: i }) {
|
|
|
2894
2894
|
}
|
|
2895
2895
|
return pe(await o.json());
|
|
2896
2896
|
}
|
|
2897
|
-
function
|
|
2897
|
+
function wt(e, a) {
|
|
2898
2898
|
if (!a) return e;
|
|
2899
2899
|
let { useVoice: t, useText: i } = e;
|
|
2900
2900
|
return typeof a.use_voice == "boolean" && (t = a.use_voice), typeof a.use_text == "boolean" && (i = a.use_text), t === e.useVoice && i === e.useText ? e : { ...e, useVoice: t, useText: i };
|
|
@@ -2915,14 +2915,14 @@ const oa = (...e) => e.filter((a, t, i) => !!a && a.trim() !== "" && i.indexOf(a
|
|
|
2915
2915
|
* This source code is licensed under the ISC license.
|
|
2916
2916
|
* See the LICENSE file in the root directory of this source tree.
|
|
2917
2917
|
*/
|
|
2918
|
-
const
|
|
2918
|
+
const Lt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
2919
2919
|
/**
|
|
2920
2920
|
* @license lucide-react v1.24.0 - ISC
|
|
2921
2921
|
*
|
|
2922
2922
|
* This source code is licensed under the ISC license.
|
|
2923
2923
|
* See the LICENSE file in the root directory of this source tree.
|
|
2924
2924
|
*/
|
|
2925
|
-
const
|
|
2925
|
+
const At = (e) => e.replace(
|
|
2926
2926
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
2927
2927
|
(a, t, i) => i ? i.toUpperCase() : t.toLowerCase()
|
|
2928
2928
|
);
|
|
@@ -2933,7 +2933,7 @@ const Lt = (e) => e.replace(
|
|
|
2933
2933
|
* See the LICENSE file in the root directory of this source tree.
|
|
2934
2934
|
*/
|
|
2935
2935
|
const $e = (e) => {
|
|
2936
|
-
const a =
|
|
2936
|
+
const a = At(e);
|
|
2937
2937
|
return a.charAt(0).toUpperCase() + a.slice(1);
|
|
2938
2938
|
};
|
|
2939
2939
|
/**
|
|
@@ -2942,7 +2942,7 @@ const $e = (e) => {
|
|
|
2942
2942
|
* This source code is licensed under the ISC license.
|
|
2943
2943
|
* See the LICENSE file in the root directory of this source tree.
|
|
2944
2944
|
*/
|
|
2945
|
-
var
|
|
2945
|
+
var Pe = {
|
|
2946
2946
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2947
2947
|
width: 24,
|
|
2948
2948
|
height: 24,
|
|
@@ -2959,12 +2959,12 @@ var xe = {
|
|
|
2959
2959
|
* This source code is licensed under the ISC license.
|
|
2960
2960
|
* See the LICENSE file in the root directory of this source tree.
|
|
2961
2961
|
*/
|
|
2962
|
-
const
|
|
2962
|
+
const Vt = (e) => {
|
|
2963
2963
|
for (const a in e)
|
|
2964
2964
|
if (a.startsWith("aria-") || a === "role" || a === "title")
|
|
2965
2965
|
return !0;
|
|
2966
2966
|
return !1;
|
|
2967
|
-
},
|
|
2967
|
+
}, jt = Fa({}), It = () => ya(jt), Dt = ia(
|
|
2968
2968
|
({ color: e, size: a, strokeWidth: t, absoluteStrokeWidth: i, className: r = "", children: o, iconNode: s, ...c }, d) => {
|
|
2969
2969
|
const {
|
|
2970
2970
|
size: l = 24,
|
|
@@ -2972,22 +2972,22 @@ const At = (e) => {
|
|
|
2972
2972
|
absoluteStrokeWidth: u = !1,
|
|
2973
2973
|
color: h = "currentColor",
|
|
2974
2974
|
className: E = ""
|
|
2975
|
-
} =
|
|
2976
|
-
return
|
|
2975
|
+
} = It() ?? {}, k = i ?? u ? Number(t ?? m) * 24 / Number(a ?? l) : t ?? m;
|
|
2976
|
+
return Me(
|
|
2977
2977
|
"svg",
|
|
2978
2978
|
{
|
|
2979
2979
|
ref: d,
|
|
2980
|
-
...
|
|
2981
|
-
width: a ?? l ??
|
|
2982
|
-
height: a ?? l ??
|
|
2980
|
+
...Pe,
|
|
2981
|
+
width: a ?? l ?? Pe.width,
|
|
2982
|
+
height: a ?? l ?? Pe.height,
|
|
2983
2983
|
stroke: e ?? h,
|
|
2984
2984
|
strokeWidth: k,
|
|
2985
2985
|
className: oa("lucide", E, r),
|
|
2986
|
-
...!o && !
|
|
2986
|
+
...!o && !Vt(c) && { "aria-hidden": "true" },
|
|
2987
2987
|
...c
|
|
2988
2988
|
},
|
|
2989
2989
|
[
|
|
2990
|
-
...s.map(([
|
|
2990
|
+
...s.map(([v, z]) => Me(v, z)),
|
|
2991
2991
|
...Array.isArray(o) ? o : [o]
|
|
2992
2992
|
]
|
|
2993
2993
|
);
|
|
@@ -3001,11 +3001,11 @@ const At = (e) => {
|
|
|
3001
3001
|
*/
|
|
3002
3002
|
const Y = (e, a) => {
|
|
3003
3003
|
const t = ia(
|
|
3004
|
-
({ className: i, ...r }, o) =>
|
|
3004
|
+
({ className: i, ...r }, o) => Me(Dt, {
|
|
3005
3005
|
ref: o,
|
|
3006
3006
|
iconNode: a,
|
|
3007
3007
|
className: oa(
|
|
3008
|
-
`lucide-${
|
|
3008
|
+
`lucide-${Lt($e(e))}`,
|
|
3009
3009
|
`lucide-${e}`,
|
|
3010
3010
|
i
|
|
3011
3011
|
),
|
|
@@ -3020,94 +3020,94 @@ const Y = (e, a) => {
|
|
|
3020
3020
|
* This source code is licensed under the ISC license.
|
|
3021
3021
|
* See the LICENSE file in the root directory of this source tree.
|
|
3022
3022
|
*/
|
|
3023
|
-
const
|
|
3023
|
+
const qt = [
|
|
3024
3024
|
["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
|
|
3025
3025
|
["path", { d: "M12 19V5", key: "x0mq9r" }]
|
|
3026
|
-
],
|
|
3026
|
+
], Nt = Y("arrow-up", qt);
|
|
3027
3027
|
/**
|
|
3028
3028
|
* @license lucide-react v1.24.0 - ISC
|
|
3029
3029
|
*
|
|
3030
3030
|
* This source code is licensed under the ISC license.
|
|
3031
3031
|
* See the LICENSE file in the root directory of this source tree.
|
|
3032
3032
|
*/
|
|
3033
|
-
const
|
|
3033
|
+
const _t = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], Rt = Y("chevron-left", _t);
|
|
3034
3034
|
/**
|
|
3035
3035
|
* @license lucide-react v1.24.0 - ISC
|
|
3036
3036
|
*
|
|
3037
3037
|
* This source code is licensed under the ISC license.
|
|
3038
3038
|
* See the LICENSE file in the root directory of this source tree.
|
|
3039
3039
|
*/
|
|
3040
|
-
const
|
|
3040
|
+
const Bt = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], ra = Y("chevron-down", Bt);
|
|
3041
3041
|
/**
|
|
3042
3042
|
* @license lucide-react v1.24.0 - ISC
|
|
3043
3043
|
*
|
|
3044
3044
|
* This source code is licensed under the ISC license.
|
|
3045
3045
|
* See the LICENSE file in the root directory of this source tree.
|
|
3046
3046
|
*/
|
|
3047
|
-
const
|
|
3047
|
+
const Gt = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]], Ut = Y("chevron-up", Gt);
|
|
3048
3048
|
/**
|
|
3049
3049
|
* @license lucide-react v1.24.0 - ISC
|
|
3050
3050
|
*
|
|
3051
3051
|
* This source code is licensed under the ISC license.
|
|
3052
3052
|
* See the LICENSE file in the root directory of this source tree.
|
|
3053
3053
|
*/
|
|
3054
|
-
const
|
|
3054
|
+
const Kt = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], ye = Y("loader-circle", Kt);
|
|
3055
3055
|
/**
|
|
3056
3056
|
* @license lucide-react v1.24.0 - ISC
|
|
3057
3057
|
*
|
|
3058
3058
|
* This source code is licensed under the ISC license.
|
|
3059
3059
|
* See the LICENSE file in the root directory of this source tree.
|
|
3060
3060
|
*/
|
|
3061
|
-
const
|
|
3061
|
+
const Ot = [
|
|
3062
3062
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
3063
3063
|
["path", { d: "m21 3-7 7", key: "1l2asr" }],
|
|
3064
3064
|
["path", { d: "m3 21 7-7", key: "tjx5ai" }],
|
|
3065
3065
|
["path", { d: "M9 21H3v-6", key: "wtvkvv" }]
|
|
3066
|
-
],
|
|
3066
|
+
], Yt = Y("maximize-2", Ot);
|
|
3067
3067
|
/**
|
|
3068
3068
|
* @license lucide-react v1.24.0 - ISC
|
|
3069
3069
|
*
|
|
3070
3070
|
* This source code is licensed under the ISC license.
|
|
3071
3071
|
* See the LICENSE file in the root directory of this source tree.
|
|
3072
3072
|
*/
|
|
3073
|
-
const
|
|
3073
|
+
const Qt = [
|
|
3074
3074
|
["path", { d: "M12 19v3", key: "npa21l" }],
|
|
3075
3075
|
["path", { d: "M15 9.34V5a3 3 0 0 0-5.68-1.33", key: "1gzdoj" }],
|
|
3076
3076
|
["path", { d: "M16.95 16.95A7 7 0 0 1 5 12v-2", key: "cqa7eg" }],
|
|
3077
3077
|
["path", { d: "M18.89 13.23A7 7 0 0 0 19 12v-2", key: "16hl24" }],
|
|
3078
3078
|
["path", { d: "m2 2 20 20", key: "1ooewy" }],
|
|
3079
3079
|
["path", { d: "M9 9v3a3 3 0 0 0 5.12 2.12", key: "r2i35w" }]
|
|
3080
|
-
],
|
|
3080
|
+
], Ve = Y("mic-off", Qt);
|
|
3081
3081
|
/**
|
|
3082
3082
|
* @license lucide-react v1.24.0 - ISC
|
|
3083
3083
|
*
|
|
3084
3084
|
* This source code is licensed under the ISC license.
|
|
3085
3085
|
* See the LICENSE file in the root directory of this source tree.
|
|
3086
3086
|
*/
|
|
3087
|
-
const
|
|
3087
|
+
const Ht = [
|
|
3088
3088
|
["path", { d: "M12 19v3", key: "npa21l" }],
|
|
3089
3089
|
["path", { d: "M19 10v2a7 7 0 0 1-14 0v-2", key: "1vc78b" }],
|
|
3090
3090
|
["rect", { x: "9", y: "2", width: "6", height: "13", rx: "3", key: "s6n7sd" }]
|
|
3091
|
-
], Fe = Y("mic",
|
|
3091
|
+
], Fe = Y("mic", Ht);
|
|
3092
3092
|
/**
|
|
3093
3093
|
* @license lucide-react v1.24.0 - ISC
|
|
3094
3094
|
*
|
|
3095
3095
|
* This source code is licensed under the ISC license.
|
|
3096
3096
|
* See the LICENSE file in the root directory of this source tree.
|
|
3097
3097
|
*/
|
|
3098
|
-
const
|
|
3098
|
+
const Wt = [
|
|
3099
3099
|
["path", { d: "m14 10 7-7", key: "oa77jy" }],
|
|
3100
3100
|
["path", { d: "M20 10h-6V4", key: "mjg0md" }],
|
|
3101
3101
|
["path", { d: "m3 21 7-7", key: "tjx5ai" }],
|
|
3102
3102
|
["path", { d: "M4 14h6v6", key: "rmj7iw" }]
|
|
3103
|
-
], Te = Y("minimize-2",
|
|
3103
|
+
], Te = Y("minimize-2", Wt);
|
|
3104
3104
|
/**
|
|
3105
3105
|
* @license lucide-react v1.24.0 - ISC
|
|
3106
3106
|
*
|
|
3107
3107
|
* This source code is licensed under the ISC license.
|
|
3108
3108
|
* See the LICENSE file in the root directory of this source tree.
|
|
3109
3109
|
*/
|
|
3110
|
-
const
|
|
3110
|
+
const $t = [
|
|
3111
3111
|
[
|
|
3112
3112
|
"path",
|
|
3113
3113
|
{
|
|
@@ -3123,14 +3123,14 @@ const Wt = [
|
|
|
3123
3123
|
key: "10hv5p"
|
|
3124
3124
|
}
|
|
3125
3125
|
]
|
|
3126
|
-
],
|
|
3126
|
+
], je = Y("phone-off", $t);
|
|
3127
3127
|
/**
|
|
3128
3128
|
* @license lucide-react v1.24.0 - ISC
|
|
3129
3129
|
*
|
|
3130
3130
|
* This source code is licensed under the ISC license.
|
|
3131
3131
|
* See the LICENSE file in the root directory of this source tree.
|
|
3132
3132
|
*/
|
|
3133
|
-
const
|
|
3133
|
+
const Zt = [
|
|
3134
3134
|
[
|
|
3135
3135
|
"path",
|
|
3136
3136
|
{
|
|
@@ -3138,24 +3138,24 @@ const $t = [
|
|
|
3138
3138
|
key: "9njp5v"
|
|
3139
3139
|
}
|
|
3140
3140
|
]
|
|
3141
|
-
],
|
|
3141
|
+
], Ie = Y("phone", Zt);
|
|
3142
3142
|
/**
|
|
3143
3143
|
* @license lucide-react v1.24.0 - ISC
|
|
3144
3144
|
*
|
|
3145
3145
|
* This source code is licensed under the ISC license.
|
|
3146
3146
|
* See the LICENSE file in the root directory of this source tree.
|
|
3147
3147
|
*/
|
|
3148
|
-
const
|
|
3148
|
+
const Jt = [
|
|
3149
3149
|
["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
|
|
3150
3150
|
["path", { d: "M3 3v5h5", key: "1xhq8a" }]
|
|
3151
|
-
],
|
|
3151
|
+
], Xt = Y("rotate-ccw", Jt);
|
|
3152
3152
|
/**
|
|
3153
3153
|
* @license lucide-react v1.24.0 - ISC
|
|
3154
3154
|
*
|
|
3155
3155
|
* This source code is licensed under the ISC license.
|
|
3156
3156
|
* See the LICENSE file in the root directory of this source tree.
|
|
3157
3157
|
*/
|
|
3158
|
-
const
|
|
3158
|
+
const en = [
|
|
3159
3159
|
[
|
|
3160
3160
|
"path",
|
|
3161
3161
|
{
|
|
@@ -3163,17 +3163,17 @@ const Xt = [
|
|
|
3163
3163
|
key: "r04s7s"
|
|
3164
3164
|
}
|
|
3165
3165
|
]
|
|
3166
|
-
],
|
|
3166
|
+
], an = Y("star", en);
|
|
3167
3167
|
/**
|
|
3168
3168
|
* @license lucide-react v1.24.0 - ISC
|
|
3169
3169
|
*
|
|
3170
3170
|
* This source code is licensed under the ISC license.
|
|
3171
3171
|
* See the LICENSE file in the root directory of this source tree.
|
|
3172
3172
|
*/
|
|
3173
|
-
const
|
|
3173
|
+
const tn = [
|
|
3174
3174
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
3175
3175
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
3176
|
-
],
|
|
3176
|
+
], De = Y("x", tn), Ze = [
|
|
3177
3177
|
() => import("./charachter1-D0qJg166.js").then((e) => e.default),
|
|
3178
3178
|
() => import("./charachter2-B5ArG_dI.js").then((e) => e.default),
|
|
3179
3179
|
() => import("./charachter3-DX1Okqyw.js").then((e) => e.default),
|
|
@@ -3183,19 +3183,19 @@ const an = [
|
|
|
3183
3183
|
() => import("./charachter7-DWEpJWjS.js").then((e) => e.default),
|
|
3184
3184
|
() => import("./charachter8-C3UF8oSz.js").then((e) => e.default)
|
|
3185
3185
|
];
|
|
3186
|
-
function
|
|
3186
|
+
function nn(e = 1) {
|
|
3187
3187
|
const a = Math.max(0, Number(e || 1) - 1);
|
|
3188
3188
|
return (Ze[a] || Ze[0])();
|
|
3189
3189
|
}
|
|
3190
|
-
const
|
|
3191
|
-
},
|
|
3192
|
-
function
|
|
3193
|
-
return typeof window < "u" && window.innerWidth <=
|
|
3190
|
+
const ie = () => {
|
|
3191
|
+
}, on = 767;
|
|
3192
|
+
function rn() {
|
|
3193
|
+
return typeof window < "u" && window.innerWidth <= on;
|
|
3194
3194
|
}
|
|
3195
3195
|
function V(...e) {
|
|
3196
3196
|
return e.filter(Boolean).join(" ");
|
|
3197
3197
|
}
|
|
3198
|
-
function
|
|
3198
|
+
function H(e) {
|
|
3199
3199
|
return e.startsWith("ar") || ["fa", "ur", "he"].includes(e) ? "rqmii-chat-font-ar" : "rqmii-chat-font-latin";
|
|
3200
3200
|
}
|
|
3201
3201
|
function Je(e) {
|
|
@@ -3204,21 +3204,21 @@ function Je(e) {
|
|
|
3204
3204
|
function se(e) {
|
|
3205
3205
|
return e.startsWith("ar") || ["fa", "ur", "he"].includes(e) ? "rtl" : "ltr";
|
|
3206
3206
|
}
|
|
3207
|
-
function
|
|
3207
|
+
function qe(e) {
|
|
3208
3208
|
const a = Math.floor(e / 60).toString().padStart(2, "0"), t = (e % 60).toString().padStart(2, "0");
|
|
3209
3209
|
return `${a}:${t}`;
|
|
3210
3210
|
}
|
|
3211
|
-
function
|
|
3212
|
-
const [a, t] =
|
|
3213
|
-
return
|
|
3211
|
+
function sn(e = !0) {
|
|
3212
|
+
const [a, t] = y(0);
|
|
3213
|
+
return I(() => {
|
|
3214
3214
|
if (!e) return;
|
|
3215
3215
|
const i = setInterval(() => t((r) => r + 1), 1e3);
|
|
3216
3216
|
return () => clearInterval(i);
|
|
3217
3217
|
}, [e]), a;
|
|
3218
3218
|
}
|
|
3219
|
-
function
|
|
3220
|
-
const [e, a] =
|
|
3221
|
-
return
|
|
3219
|
+
function ln() {
|
|
3220
|
+
const [e, a] = y(null);
|
|
3221
|
+
return I(() => {
|
|
3222
3222
|
const t = window.visualViewport;
|
|
3223
3223
|
if (!t) return;
|
|
3224
3224
|
const i = () => a(t.height);
|
|
@@ -3227,13 +3227,13 @@ function sn() {
|
|
|
3227
3227
|
};
|
|
3228
3228
|
}, []), e;
|
|
3229
3229
|
}
|
|
3230
|
-
function
|
|
3230
|
+
function cn(e, a) {
|
|
3231
3231
|
const t = _([]);
|
|
3232
3232
|
t.current = e.match(/\S+\s*/g) || [e];
|
|
3233
|
-
const [i, r] =
|
|
3233
|
+
const [i, r] = y(
|
|
3234
3234
|
() => a ? Math.min(1, t.current.length) : t.current.length
|
|
3235
3235
|
);
|
|
3236
|
-
return
|
|
3236
|
+
return I(() => {
|
|
3237
3237
|
if (!a || !e) {
|
|
3238
3238
|
r(t.current.length);
|
|
3239
3239
|
return;
|
|
@@ -3245,13 +3245,13 @@ function ln(e, a) {
|
|
|
3245
3245
|
return () => clearInterval(o);
|
|
3246
3246
|
}, [e, a]), t.current.slice(0, i).join("");
|
|
3247
3247
|
}
|
|
3248
|
-
const
|
|
3249
|
-
function
|
|
3250
|
-
return e?.faceIndex === 0 && e.faceImageUrl ? e.faceImageUrl : e?.faceIndex === 9 ? null :
|
|
3248
|
+
const dn = D.lazy(() => import("./Orb-BLYExpBk.js").then((e) => ({ default: e.RqmiiOrb })));
|
|
3249
|
+
function un(e) {
|
|
3250
|
+
return e?.faceIndex === 0 && e.faceImageUrl ? e.faceImageUrl : e?.faceIndex === 9 ? null : nn(e?.faceIndex || 1);
|
|
3251
3251
|
}
|
|
3252
|
-
const
|
|
3253
|
-
const [r, o] =
|
|
3254
|
-
return
|
|
3252
|
+
const Ne = D.memo(function({ language: a, languages: t, onChange: i }) {
|
|
3253
|
+
const [r, o] = y(!1), s = _(null), c = He(a), d = be(t, a).map((l) => He(l)).filter(Boolean);
|
|
3254
|
+
return I(() => {
|
|
3255
3255
|
if (!r) return;
|
|
3256
3256
|
const l = (m) => {
|
|
3257
3257
|
s.current?.contains(m.target) || o(!1);
|
|
@@ -3275,7 +3275,7 @@ const qe = I.memo(function({ language: a, languages: t, onChange: i }) {
|
|
|
3275
3275
|
l.value
|
|
3276
3276
|
)) })
|
|
3277
3277
|
] });
|
|
3278
|
-
}), le =
|
|
3278
|
+
}), le = D.memo(function({ language: a = "en", brand: t = "rqmii", agent: i }) {
|
|
3279
3279
|
const r = i?.widget?.appearance, o = r?.show_branding !== !1, s = r?.footer_content?.[a], c = !!s?.trim();
|
|
3280
3280
|
return !o && !c ? /* @__PURE__ */ n("div", { style: { padding: 11 } }) : /* @__PURE__ */ f("div", { className: "rqmii-chat-footer", children: [
|
|
3281
3281
|
o && /* @__PURE__ */ f("p", { children: [
|
|
@@ -3284,17 +3284,17 @@ const qe = I.memo(function({ language: a, languages: t, onChange: i }) {
|
|
|
3284
3284
|
] }),
|
|
3285
3285
|
c && /* @__PURE__ */ n("p", { children: s })
|
|
3286
3286
|
] });
|
|
3287
|
-
}), J =
|
|
3288
|
-
const o = a?.faceIndex === 9, [s, c] =
|
|
3289
|
-
return
|
|
3287
|
+
}), J = D.memo(function({ agent: a, size: t = "large", active: i = !1, className: r = "" }) {
|
|
3288
|
+
const o = a?.faceIndex === 9, [s, c] = y(null), [d, l] = y(!s);
|
|
3289
|
+
return I(() => {
|
|
3290
3290
|
let m = !1;
|
|
3291
|
-
const u =
|
|
3291
|
+
const u = un(a);
|
|
3292
3292
|
return typeof u == "string" ? (c(u), l(!1)) : u instanceof Promise ? u.then((h) => {
|
|
3293
3293
|
m || (c(h), l(!1));
|
|
3294
3294
|
}) : c(null), () => {
|
|
3295
3295
|
m = !0;
|
|
3296
3296
|
};
|
|
3297
|
-
}, [a?.faceIndex, a?.faceImageUrl]), /* @__PURE__ */ n("div", { className: V("rqmii-agent-avatar", `rqmii-agent-avatar--${t}`, i && "is-active", o && "is-orb", r), children: o ? /* @__PURE__ */ n(
|
|
3297
|
+
}, [a?.faceIndex, a?.faceImageUrl]), /* @__PURE__ */ n("div", { className: V("rqmii-agent-avatar", `rqmii-agent-avatar--${t}`, i && "is-active", o && "is-orb", r), children: o ? /* @__PURE__ */ n(D.Suspense, { fallback: null, children: /* @__PURE__ */ n(dn, { className: "rqmii-agent-avatar-orb" }) }) : s ? /* @__PURE__ */ n(
|
|
3298
3298
|
"img",
|
|
3299
3299
|
{
|
|
3300
3300
|
src: s,
|
|
@@ -3303,10 +3303,10 @@ const qe = I.memo(function({ language: a, languages: t, onChange: i }) {
|
|
|
3303
3303
|
onLoad: () => l(!0)
|
|
3304
3304
|
}
|
|
3305
3305
|
) : null });
|
|
3306
|
-
}), sa =
|
|
3306
|
+
}), sa = D.memo(function({ agent: a, onClick: t, className: i = "", position: r = "fixed", active: o = !1 }) {
|
|
3307
3307
|
return /* @__PURE__ */ n("button", { type: "button", className: V("rqmii-chat-open-button", r === "fixed" && "is-fixed", i), onClick: t, "aria-label": "Open chat", children: /* @__PURE__ */ n(J, { agent: a, size: "button", active: o }) });
|
|
3308
3308
|
});
|
|
3309
|
-
function
|
|
3309
|
+
function mn() {
|
|
3310
3310
|
try {
|
|
3311
3311
|
const e = window.AudioContext || window.webkitAudioContext;
|
|
3312
3312
|
if (!e) return;
|
|
@@ -3317,31 +3317,31 @@ function un() {
|
|
|
3317
3317
|
} catch {
|
|
3318
3318
|
}
|
|
3319
3319
|
}
|
|
3320
|
-
const
|
|
3321
|
-
const [c, d] =
|
|
3322
|
-
return
|
|
3320
|
+
const hn = D.memo(function({ message: a, delaySeconds: t, soundEnabled: i, language: r, buttonPosition: o = "right", onClick: s }) {
|
|
3321
|
+
const [c, d] = y(!1), l = a.trim();
|
|
3322
|
+
return I(() => {
|
|
3323
3323
|
if (!l) return;
|
|
3324
3324
|
const u = setTimeout(() => {
|
|
3325
|
-
d(!0), i &&
|
|
3325
|
+
d(!0), i && mn();
|
|
3326
3326
|
}, Math.max(0, t) * 1e3);
|
|
3327
3327
|
return () => clearTimeout(u);
|
|
3328
3328
|
}, [l, t, i]), !c || !l ? null : /* @__PURE__ */ n(
|
|
3329
3329
|
"button",
|
|
3330
3330
|
{
|
|
3331
3331
|
type: "button",
|
|
3332
|
-
className: V("rqmii-chat-welcome-bubble", o === "right" ? "is-right" : "is-left",
|
|
3332
|
+
className: V("rqmii-chat-welcome-bubble", o === "right" ? "is-right" : "is-left", H(r)),
|
|
3333
3333
|
dir: se(r),
|
|
3334
3334
|
onClick: s,
|
|
3335
3335
|
"aria-label": l,
|
|
3336
3336
|
children: l
|
|
3337
3337
|
}
|
|
3338
3338
|
);
|
|
3339
|
-
}), Ee =
|
|
3340
|
-
const [s, c] =
|
|
3339
|
+
}), Ee = D.memo(function({ language: a, placeholder: t, onSend: i, disabled: r = !1, variant: o = "text" }) {
|
|
3340
|
+
const [s, c] = y(""), d = _(null), l = 168, m = () => {
|
|
3341
3341
|
const u = s.trim();
|
|
3342
3342
|
!u || r || (i(u), c(""), d.current && (d.current.style.height = "auto"));
|
|
3343
3343
|
};
|
|
3344
|
-
return /* @__PURE__ */ f("div", { className: V("rqmii-chat-input",
|
|
3344
|
+
return /* @__PURE__ */ f("div", { className: V("rqmii-chat-input", H(a), o === "voice" && "is-voice"), children: [
|
|
3345
3345
|
/* @__PURE__ */ n(
|
|
3346
3346
|
"textarea",
|
|
3347
3347
|
{
|
|
@@ -3361,32 +3361,32 @@ const mn = I.memo(function({ message: a, delaySeconds: t, soundEnabled: i, langu
|
|
|
3361
3361
|
}
|
|
3362
3362
|
}
|
|
3363
3363
|
),
|
|
3364
|
-
/* @__PURE__ */ n("button", { type: "button", onClick: m, disabled: !s.trim() || r, "aria-label": F(a, "send"), children: /* @__PURE__ */ n(
|
|
3364
|
+
/* @__PURE__ */ n("button", { type: "button", onClick: m, disabled: !s.trim() || r, "aria-label": F(a, "send"), children: /* @__PURE__ */ n(Nt, { size: 20 }) })
|
|
3365
3365
|
] });
|
|
3366
|
-
}),
|
|
3367
|
-
const i =
|
|
3368
|
-
return /* @__PURE__ */ n(
|
|
3369
|
-
}),
|
|
3370
|
-
function
|
|
3371
|
-
return typeof window > "u" ?
|
|
3366
|
+
}), gn = D.memo(function({ text: a, streaming: t }) {
|
|
3367
|
+
const i = cn(a, t);
|
|
3368
|
+
return /* @__PURE__ */ n(Ae, { children: i });
|
|
3369
|
+
}), we = 133, pn = we + 44, bn = 767, ge = 36, kn = 8, Xe = ge + kn;
|
|
3370
|
+
function fn() {
|
|
3371
|
+
return typeof window > "u" ? we : window.innerWidth <= bn ? pn : we;
|
|
3372
3372
|
}
|
|
3373
|
-
function
|
|
3373
|
+
function vn(e) {
|
|
3374
3374
|
return e === "rtl" ? "right" : "left";
|
|
3375
3375
|
}
|
|
3376
|
-
function
|
|
3376
|
+
function yn(e, a, t, i) {
|
|
3377
3377
|
if (!e.length) return null;
|
|
3378
3378
|
const r = Math.max(...e.map((s) => s.offsetTop)), o = e.filter((s) => s.offsetTop >= r - 0.5);
|
|
3379
3379
|
return t === "right" ? o.find((s) => s.offsetLeft + s.offsetWidth > a - i) || null : o.find((s) => s.offsetLeft < i) || null;
|
|
3380
3380
|
}
|
|
3381
3381
|
function ea(e, a, t, i) {
|
|
3382
3382
|
for (let r = 0; r < 2; r++) {
|
|
3383
|
-
const o =
|
|
3383
|
+
const o = yn(e, a, t, i);
|
|
3384
3384
|
if (!o) break;
|
|
3385
3385
|
t === "right" ? o.style.marginRight = `${i}px` : o.style.marginLeft = `${i}px`, o.style.maxWidth = `calc(100% - ${i}px)`;
|
|
3386
3386
|
}
|
|
3387
3387
|
}
|
|
3388
|
-
const
|
|
3389
|
-
const [r, o] =
|
|
3388
|
+
const Fn = D.memo(function({ suggestions: a, language: t, onClick: i }) {
|
|
3389
|
+
const [r, o] = y(!1), [s, c] = y(!1), [d, l] = y(null), [m, u] = y(null), h = _(null), E = _([]), k = se(t || "en"), v = vn(k), z = (T) => {
|
|
3390
3390
|
T.forEach((g) => {
|
|
3391
3391
|
g && (g.style.maxWidth = "", g.style.marginRight = "", g.style.marginLeft = "");
|
|
3392
3392
|
});
|
|
@@ -3397,27 +3397,27 @@ const yn = I.memo(function({ suggestions: a, language: t, onClick: i }) {
|
|
|
3397
3397
|
const g = () => {
|
|
3398
3398
|
const p = E.current;
|
|
3399
3399
|
z(p);
|
|
3400
|
-
const
|
|
3400
|
+
const x = T.clientWidth, S = fn(), M = () => {
|
|
3401
3401
|
for (let L = 0; L < p.length; L++) {
|
|
3402
|
-
const
|
|
3403
|
-
if (
|
|
3402
|
+
const A = p[L];
|
|
3403
|
+
if (A && A.offsetTop + A.offsetHeight > S + 0.5)
|
|
3404
3404
|
return L;
|
|
3405
3405
|
}
|
|
3406
3406
|
return null;
|
|
3407
3407
|
};
|
|
3408
|
-
let
|
|
3409
|
-
if (
|
|
3408
|
+
let P = M();
|
|
3409
|
+
if (P !== null)
|
|
3410
3410
|
for (let L = 0; L <= p.length; L++) {
|
|
3411
3411
|
z(p);
|
|
3412
|
-
const
|
|
3413
|
-
ea(
|
|
3414
|
-
const
|
|
3415
|
-
if (
|
|
3416
|
-
|
|
3412
|
+
const A = p.slice(0, P).filter((j) => !!j);
|
|
3413
|
+
ea(A, x, v, Xe);
|
|
3414
|
+
const C = M();
|
|
3415
|
+
if (C === null || C >= P) break;
|
|
3416
|
+
P = C;
|
|
3417
3417
|
}
|
|
3418
|
-
if (l(
|
|
3419
|
-
const L = p.slice(0,
|
|
3420
|
-
u(
|
|
3418
|
+
if (l(P), c(P !== null), P !== null) {
|
|
3419
|
+
const L = p.slice(0, P).filter((C) => !!C), A = L.length ? Math.max(...L.map((C) => C.offsetTop + C.offsetHeight)) : ge;
|
|
3420
|
+
u(A - ge);
|
|
3421
3421
|
} else
|
|
3422
3422
|
u(null);
|
|
3423
3423
|
};
|
|
@@ -3426,16 +3426,16 @@ const yn = I.memo(function({ suggestions: a, language: t, onClick: i }) {
|
|
|
3426
3426
|
return b?.observe(T), () => {
|
|
3427
3427
|
b?.disconnect(), z(E.current);
|
|
3428
3428
|
};
|
|
3429
|
-
}, [a, r,
|
|
3429
|
+
}, [a, r, v]), Oe(() => {
|
|
3430
3430
|
const T = h.current;
|
|
3431
3431
|
if (!T || !r) return;
|
|
3432
3432
|
const g = E.current.filter((p) => !!p);
|
|
3433
|
-
z(E.current), ea(g, T.clientWidth,
|
|
3433
|
+
z(E.current), ea(g, T.clientWidth, v, Xe);
|
|
3434
3434
|
const b = g.length ? Math.max(...g.map((p) => p.offsetTop + p.offsetHeight)) : ge;
|
|
3435
3435
|
return u(b - ge), () => {
|
|
3436
3436
|
z(E.current);
|
|
3437
3437
|
};
|
|
3438
|
-
}, [r, a,
|
|
3438
|
+
}, [r, a, v]), a.length ? /* @__PURE__ */ n("div", { className: V("rqmii-suggested-messages", r && "is-expanded", s && "has-overflow"), dir: k, children: /* @__PURE__ */ f("div", { ref: h, className: V("rqmii-suggested-messages-inner", r ? "is-expanded" : "is-collapsed"), children: [
|
|
3439
3439
|
a.map((T, g) => {
|
|
3440
3440
|
const b = !r && d !== null && g >= d;
|
|
3441
3441
|
return /* @__PURE__ */ n(
|
|
@@ -3459,16 +3459,16 @@ const yn = I.memo(function({ suggestions: a, language: t, onClick: i }) {
|
|
|
3459
3459
|
"button",
|
|
3460
3460
|
{
|
|
3461
3461
|
type: "button",
|
|
3462
|
-
className: V("rqmii-suggested-messages-toggle",
|
|
3462
|
+
className: V("rqmii-suggested-messages-toggle", v === "left" && "is-start-left"),
|
|
3463
3463
|
style: m != null ? { top: m, bottom: "auto" } : void 0,
|
|
3464
3464
|
onClick: () => o((T) => (T && h.current && (h.current.scrollTop = 0), !T)),
|
|
3465
3465
|
"aria-label": r ? "Show less" : "Show more",
|
|
3466
3466
|
"aria-expanded": r,
|
|
3467
|
-
children: r ? /* @__PURE__ */ n(
|
|
3467
|
+
children: r ? /* @__PURE__ */ n(Ut, { size: 14 }) : /* @__PURE__ */ n(ra, { size: 14 })
|
|
3468
3468
|
}
|
|
3469
3469
|
)
|
|
3470
3470
|
] }) }) : null;
|
|
3471
|
-
}),
|
|
3471
|
+
}), Tn = D.memo(function({ language: a }) {
|
|
3472
3472
|
const t = se(a || "en");
|
|
3473
3473
|
return /* @__PURE__ */ n("div", { className: "rqmii-chat-message-row", children: /* @__PURE__ */ f("div", { className: "rqmii-chat-message rqmii-chat-typing-indicator", dir: t, children: [
|
|
3474
3474
|
/* @__PURE__ */ n("span", { className: "rqmii-chat-typing-dot" }),
|
|
@@ -3476,55 +3476,55 @@ const yn = I.memo(function({ suggestions: a, language: t, onClick: i }) {
|
|
|
3476
3476
|
/* @__PURE__ */ n("span", { className: "rqmii-chat-typing-dot" })
|
|
3477
3477
|
] }) });
|
|
3478
3478
|
});
|
|
3479
|
-
function
|
|
3479
|
+
function En(e) {
|
|
3480
3480
|
return e === "message";
|
|
3481
3481
|
}
|
|
3482
|
-
const
|
|
3482
|
+
const zn = {
|
|
3483
3483
|
name: "leadFormName",
|
|
3484
3484
|
email: "leadFormEmail",
|
|
3485
3485
|
phone: "leadFormPhone",
|
|
3486
3486
|
message: "leadFormMessage"
|
|
3487
|
-
},
|
|
3488
|
-
const s =
|
|
3489
|
-
const p =
|
|
3487
|
+
}, Sn = D.memo(function({ messageId: a, form: t, language: i, textDirection: r, formSubmitted: o }) {
|
|
3488
|
+
const s = ka(), [c, d] = y({}), [l, m] = y(!1), [u, h] = y(!!o), [E, k] = y(null), v = t.title || F(i, "leadFormTitle"), z = (b) => {
|
|
3489
|
+
const p = zn[b.key];
|
|
3490
3490
|
return `${p ? F(i, p) : b.label}${b.required ? "*" : ""}`;
|
|
3491
3491
|
}, T = (b, p) => {
|
|
3492
|
-
d((
|
|
3492
|
+
d((x) => ({ ...x, [b]: p })), E && k(null);
|
|
3493
3493
|
}, g = async (b) => {
|
|
3494
3494
|
if (b.preventDefault(), l || u) return;
|
|
3495
|
-
if (t.fields.some((
|
|
3495
|
+
if (t.fields.some((S) => S.required && !c[S.key]?.trim())) {
|
|
3496
3496
|
k(F(i, "leadFormRequiredError"));
|
|
3497
3497
|
return;
|
|
3498
3498
|
}
|
|
3499
|
-
const
|
|
3500
|
-
for (const
|
|
3501
|
-
const
|
|
3502
|
-
|
|
3499
|
+
const x = {};
|
|
3500
|
+
for (const S of t.fields) {
|
|
3501
|
+
const M = c[S.key]?.trim();
|
|
3502
|
+
M && (x[S.key] = M);
|
|
3503
3503
|
}
|
|
3504
3504
|
m(!0), k(null);
|
|
3505
3505
|
try {
|
|
3506
|
-
await s.submitLead({ agentId: t.agentId, collectedData:
|
|
3506
|
+
await s.submitLead({ agentId: t.agentId, collectedData: x }), h(!0), s.setMessages(
|
|
3507
3507
|
s.messages.map(
|
|
3508
|
-
(
|
|
3508
|
+
(S) => S.id === a ? { ...S, formSubmitted: !0 } : S
|
|
3509
3509
|
)
|
|
3510
3510
|
);
|
|
3511
|
-
} catch (
|
|
3512
|
-
k(
|
|
3511
|
+
} catch (S) {
|
|
3512
|
+
k(S?.message || F(i, "leadFormGenericError"));
|
|
3513
3513
|
} finally {
|
|
3514
3514
|
m(!1);
|
|
3515
3515
|
}
|
|
3516
3516
|
};
|
|
3517
3517
|
return u ? /* @__PURE__ */ n("div", { className: "rqmii-chat-message-row rqmii-chat-lead-form-row", children: /* @__PURE__ */ n("div", { className: "rqmii-chat-lead-form rqmii-chat-lead-form--done", dir: r, children: /* @__PURE__ */ n("div", { className: "rqmii-chat-lead-form-success", children: F(i, "leadFormSuccess") }) }) }) : /* @__PURE__ */ n("div", { className: "rqmii-chat-message-row rqmii-chat-lead-form-row", children: /* @__PURE__ */ f("form", { className: "rqmii-chat-lead-form", dir: r, onSubmit: g, children: [
|
|
3518
|
-
/* @__PURE__ */ n("div", { className: "rqmii-chat-lead-form-title", children:
|
|
3518
|
+
/* @__PURE__ */ n("div", { className: "rqmii-chat-lead-form-title", children: v }),
|
|
3519
3519
|
t.fields.map((b) => {
|
|
3520
|
-
const p = z(b),
|
|
3521
|
-
return
|
|
3520
|
+
const p = z(b), x = b.type === "email" ? "email" : b.type === "date" ? "date" : "text";
|
|
3521
|
+
return En(b.key) ? /* @__PURE__ */ n(
|
|
3522
3522
|
"textarea",
|
|
3523
3523
|
{
|
|
3524
3524
|
className: "rqmii-chat-lead-form-input rqmii-chat-lead-form-textarea",
|
|
3525
3525
|
placeholder: p,
|
|
3526
3526
|
value: c[b.key] || "",
|
|
3527
|
-
onChange: (
|
|
3527
|
+
onChange: (S) => T(b.key, S.target.value),
|
|
3528
3528
|
disabled: l,
|
|
3529
3529
|
rows: 4
|
|
3530
3530
|
},
|
|
@@ -3533,10 +3533,10 @@ const En = {
|
|
|
3533
3533
|
"input",
|
|
3534
3534
|
{
|
|
3535
3535
|
className: "rqmii-chat-lead-form-input",
|
|
3536
|
-
type:
|
|
3536
|
+
type: x,
|
|
3537
3537
|
placeholder: p,
|
|
3538
3538
|
value: c[b.key] || "",
|
|
3539
|
-
onChange: (
|
|
3539
|
+
onChange: (S) => T(b.key, S.target.value),
|
|
3540
3540
|
disabled: l
|
|
3541
3541
|
},
|
|
3542
3542
|
b.key
|
|
@@ -3545,36 +3545,36 @@ const En = {
|
|
|
3545
3545
|
E && /* @__PURE__ */ n("div", { className: "rqmii-chat-lead-form-error", children: E }),
|
|
3546
3546
|
/* @__PURE__ */ n("button", { type: "submit", className: "rqmii-chat-lead-form-submit", disabled: l, children: l ? F(i, "loading") : F(i, "submit") })
|
|
3547
3547
|
] }) });
|
|
3548
|
-
}),
|
|
3548
|
+
}), xn = D.memo(function({ message: a, textDirection: t, language: i }) {
|
|
3549
3549
|
if (a.role === "lead_form" && a.form)
|
|
3550
|
-
return /* @__PURE__ */ n(
|
|
3550
|
+
return /* @__PURE__ */ n(Sn, { messageId: a.id, form: a.form, language: i, textDirection: t, formSubmitted: a.formSubmitted });
|
|
3551
3551
|
const r = a.role === "user" || a.sender === "user";
|
|
3552
|
-
return /* @__PURE__ */ n("div", { className: V("rqmii-chat-message-row", r && "is-user"), children: /* @__PURE__ */ n("div", { className: "rqmii-chat-message", dir: t, children: /* @__PURE__ */ n(
|
|
3553
|
-
}),
|
|
3552
|
+
return /* @__PURE__ */ n("div", { className: V("rqmii-chat-message-row", r && "is-user"), children: /* @__PURE__ */ n("div", { className: "rqmii-chat-message", dir: t, children: /* @__PURE__ */ n(gn, { text: a.text, streaming: a.streaming }) }) });
|
|
3553
|
+
}), _e = D.memo(function({ messages: a, partialTranscript: t, language: i, showTypingIndicator: r }) {
|
|
3554
3554
|
const o = _(null), s = se(i || "en"), c = _(a.length);
|
|
3555
|
-
return
|
|
3555
|
+
return I(() => {
|
|
3556
3556
|
if (!o.current) return;
|
|
3557
3557
|
const d = a.length !== c.current;
|
|
3558
3558
|
c.current = a.length, o.current.scrollIntoView({ behavior: d ? "smooth" : "instant", block: "end" });
|
|
3559
3559
|
}, [a, t]), /* @__PURE__ */ f("div", { className: "rqmii-chat-messages", children: [
|
|
3560
|
-
a.map((d) => /* @__PURE__ */ n(
|
|
3561
|
-
r && /* @__PURE__ */ n(
|
|
3560
|
+
a.map((d) => /* @__PURE__ */ n(xn, { message: d, textDirection: s, language: i || "en" }, d.id || `${d.role}-${d.text}`)),
|
|
3561
|
+
r && /* @__PURE__ */ n(Tn, { language: i }),
|
|
3562
3562
|
t && /* @__PURE__ */ n("div", { className: "rqmii-chat-message-row is-user is-partial", children: /* @__PURE__ */ n("div", { className: "rqmii-chat-message", dir: s, children: t }) }),
|
|
3563
3563
|
/* @__PURE__ */ n("div", { ref: o })
|
|
3564
3564
|
] });
|
|
3565
|
-
}), la =
|
|
3565
|
+
}), la = D.memo(function({ message: a, onRetry: t, onClose: i, language: r = "en" }) {
|
|
3566
3566
|
return /* @__PURE__ */ f("div", { className: "rqmii-chat-panel rqmii-chat-panel--error", children: [
|
|
3567
3567
|
i && /* @__PURE__ */ n("button", { type: "button", className: "rqmii-error-close", onClick: i, children: "×" }),
|
|
3568
3568
|
/* @__PURE__ */ n("p", { children: a || F(r, "connectionFailed") }),
|
|
3569
3569
|
t && /* @__PURE__ */ f("button", { type: "button", className: "rqmii-chat-retry", onClick: t, children: [
|
|
3570
|
-
/* @__PURE__ */ n(
|
|
3570
|
+
/* @__PURE__ */ n(Xt, { size: 16 }),
|
|
3571
3571
|
/* @__PURE__ */ n("span", { children: F(r, "retry") })
|
|
3572
3572
|
] })
|
|
3573
3573
|
] });
|
|
3574
|
-
}),
|
|
3574
|
+
}), Pn = 5;
|
|
3575
3575
|
function ca({ rating: e, onRate: a, readonly: t, size: i = 28 }) {
|
|
3576
|
-
const [r, o] =
|
|
3577
|
-
return /* @__PURE__ */ n("div", { className: "rqmii-chat-rating-stars", role: "radiogroup", children: Array.from({ length:
|
|
3576
|
+
const [r, o] = y(0), s = r || e;
|
|
3577
|
+
return /* @__PURE__ */ n("div", { className: "rqmii-chat-rating-stars", role: "radiogroup", children: Array.from({ length: Pn }, (c, d) => {
|
|
3578
3578
|
const l = d + 1, m = l <= s;
|
|
3579
3579
|
return /* @__PURE__ */ n(
|
|
3580
3580
|
"button",
|
|
@@ -3588,13 +3588,13 @@ function ca({ rating: e, onRate: a, readonly: t, size: i = 28 }) {
|
|
|
3588
3588
|
onMouseEnter: () => !t && o(l),
|
|
3589
3589
|
onMouseLeave: () => !t && o(0),
|
|
3590
3590
|
onClick: () => !t && a?.(l),
|
|
3591
|
-
children: /* @__PURE__ */ n(
|
|
3591
|
+
children: /* @__PURE__ */ n(an, { size: i, fill: m ? "currentColor" : "none" })
|
|
3592
3592
|
},
|
|
3593
3593
|
l
|
|
3594
3594
|
);
|
|
3595
3595
|
}) });
|
|
3596
3596
|
}
|
|
3597
|
-
function
|
|
3597
|
+
function Mn({
|
|
3598
3598
|
language: e,
|
|
3599
3599
|
rating: a,
|
|
3600
3600
|
endedBy: t,
|
|
@@ -3605,7 +3605,7 @@ function Pn({
|
|
|
3605
3605
|
onTellUsMore: c
|
|
3606
3606
|
}) {
|
|
3607
3607
|
const d = a > 0 ? F(e, "ratingThankYou") : F(e, "ratingQuestion"), l = t === "user" ? F(e, "youEnded") : F(e, "agentEnded");
|
|
3608
|
-
return /* @__PURE__ */ f("div", { className: V("rqmii-chat-rating",
|
|
3608
|
+
return /* @__PURE__ */ f("div", { className: V("rqmii-chat-rating", H(e)), dir: se(e), children: [
|
|
3609
3609
|
/* @__PURE__ */ n("div", { className: "rqmii-chat-rating-header", children: d }),
|
|
3610
3610
|
/* @__PURE__ */ n(ca, { rating: a, onRate: s, readonly: !r }),
|
|
3611
3611
|
o && /* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-rating-more", onClick: c, children: F(e, "tellUsMore") }),
|
|
@@ -3619,7 +3619,7 @@ function Pn({
|
|
|
3619
3619
|
] })
|
|
3620
3620
|
] });
|
|
3621
3621
|
}
|
|
3622
|
-
function
|
|
3622
|
+
function Cn({
|
|
3623
3623
|
agent: e,
|
|
3624
3624
|
language: a,
|
|
3625
3625
|
rating: t,
|
|
@@ -3627,7 +3627,7 @@ function Mn({
|
|
|
3627
3627
|
onMinimize: r,
|
|
3628
3628
|
onSubmit: o
|
|
3629
3629
|
}) {
|
|
3630
|
-
const [s, c] =
|
|
3630
|
+
const [s, c] = y(""), [d, l] = y(!1), m = s.trim().length > 0 && !d, u = async () => {
|
|
3631
3631
|
if (m) {
|
|
3632
3632
|
l(!0);
|
|
3633
3633
|
try {
|
|
@@ -3637,9 +3637,9 @@ function Mn({
|
|
|
3637
3637
|
}
|
|
3638
3638
|
}
|
|
3639
3639
|
};
|
|
3640
|
-
return /* @__PURE__ */ f("div", { className: V("rqmii-chat-panel rqmii-chat-panel--feedback",
|
|
3640
|
+
return /* @__PURE__ */ f("div", { className: V("rqmii-chat-panel rqmii-chat-panel--feedback", H(a)), dir: se(a), children: [
|
|
3641
3641
|
/* @__PURE__ */ f("div", { className: "rqmii-chat-topbar", children: [
|
|
3642
|
-
/* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button", onClick: i, "aria-label": "Back", children: /* @__PURE__ */ n(
|
|
3642
|
+
/* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button", onClick: i, "aria-label": "Back", children: /* @__PURE__ */ n(Rt, { size: 20 }) }),
|
|
3643
3643
|
/* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button", onClick: r, "aria-label": F(a, "minimize"), children: /* @__PURE__ */ n(Te, { size: 20 }) })
|
|
3644
3644
|
] }),
|
|
3645
3645
|
/* @__PURE__ */ f("div", { className: "rqmii-chat-feedback-body", children: [
|
|
@@ -3662,7 +3662,7 @@ function Mn({
|
|
|
3662
3662
|
/* @__PURE__ */ n(le, { language: a, agent: e })
|
|
3663
3663
|
] });
|
|
3664
3664
|
}
|
|
3665
|
-
const
|
|
3665
|
+
const wn = D.lazy(() => import("./RqmiiCloudAvatarPlayer-Bi44g7bl.js").then((e) => e.e).then((e) => ({ default: e.RqmiiCloudAvatarPlayer })));
|
|
3666
3666
|
function me(e) {
|
|
3667
3667
|
if (!(e == null || typeof window > "u" || window.innerWidth >= 768))
|
|
3668
3668
|
return {
|
|
@@ -3670,42 +3670,42 @@ function me(e) {
|
|
|
3670
3670
|
bottom: 0
|
|
3671
3671
|
};
|
|
3672
3672
|
}
|
|
3673
|
-
const
|
|
3673
|
+
const Ln = D.memo(function({ agent: a, language: t, languages: i, onLanguageChange: r, onClose: o, onSend: s, isVoiceEnabled: c = !1, isAudioPlaying: d = !1, isVoiceSetupLoading: l = !1, onStartVoice: m, visualViewportHeight: u, disabled: h = !1, error: E, suggestions: k, onSuggestionClick: v, compact: z = !1 }) {
|
|
3674
3674
|
const T = me(u), g = z ? "start" : "hero", b = k && k.length > 0;
|
|
3675
|
-
return /* @__PURE__ */ f("div", { className: V("rqmii-chat-panel rqmii-chat-panel--start", z && "rqmii-chat-panel--start-compact",
|
|
3675
|
+
return /* @__PURE__ */ f("div", { className: V("rqmii-chat-panel rqmii-chat-panel--start", z && "rqmii-chat-panel--start-compact", H(t)), style: T, children: [
|
|
3676
3676
|
/* @__PURE__ */ f("div", { className: "rqmii-chat-topbar", children: [
|
|
3677
3677
|
/* @__PURE__ */ n("span", {}),
|
|
3678
3678
|
/* @__PURE__ */ f("div", { className: "rqmii-chat-topbar-actions", children: [
|
|
3679
|
-
/* @__PURE__ */ n(
|
|
3680
|
-
/* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button", onClick: o, children: /* @__PURE__ */ n(
|
|
3679
|
+
/* @__PURE__ */ n(Ne, { language: t, languages: i, onChange: r }),
|
|
3680
|
+
/* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button", onClick: o, children: /* @__PURE__ */ n(De, { size: 20 }) })
|
|
3681
3681
|
] })
|
|
3682
3682
|
] }),
|
|
3683
3683
|
/* @__PURE__ */ f("div", { className: "rqmii-chat-start-body", children: [
|
|
3684
3684
|
c ? /* @__PURE__ */ f("div", { className: V("rqmii-chat-call-avatar-wrap", z && "is-compact"), children: [
|
|
3685
3685
|
/* @__PURE__ */ n(J, { agent: a, size: g, active: d }),
|
|
3686
|
-
/* @__PURE__ */ n("button", { type: "button", className: V("rqmii-chat-call-button", z && "is-compact"), onClick: m, disabled: l, "aria-label": F(t, "startVoice"), children: l ? /* @__PURE__ */ n(ye, { className: "rqmii-chat-spin", size: z ? 18 : 24 }) : /* @__PURE__ */ n(
|
|
3686
|
+
/* @__PURE__ */ n("button", { type: "button", className: V("rqmii-chat-call-button", z && "is-compact"), onClick: m, disabled: l, "aria-label": F(t, "startVoice"), children: l ? /* @__PURE__ */ n(ye, { className: "rqmii-chat-spin", size: z ? 18 : 24 }) : /* @__PURE__ */ n(Ie, { size: z ? 18 : 24 }) })
|
|
3687
3687
|
] }) : /* @__PURE__ */ n(J, { agent: a, size: g }),
|
|
3688
3688
|
/* @__PURE__ */ n("div", { className: "rqmii-chat-agent-name", children: a.name }),
|
|
3689
3689
|
E && /* @__PURE__ */ n("div", { className: "rqmii-chat-error-text", children: E })
|
|
3690
3690
|
] }),
|
|
3691
|
-
b && /* @__PURE__ */ n("div", { className: "rqmii-chat-start-suggestions", children: /* @__PURE__ */ n(
|
|
3691
|
+
b && /* @__PURE__ */ n("div", { className: "rqmii-chat-start-suggestions", children: /* @__PURE__ */ n(Fn, { suggestions: k, language: t, onClick: (p) => v?.(p) }) }),
|
|
3692
3692
|
/* @__PURE__ */ n(Ee, { language: t, onSend: s, disabled: h }),
|
|
3693
3693
|
/* @__PURE__ */ n(le, { language: t, agent: a })
|
|
3694
3694
|
] });
|
|
3695
|
-
}),
|
|
3695
|
+
}), An = D.memo(function({ agent: a, language: t, languages: i, onLanguageChange: r, onClose: o, onStartVoice: s, isVoiceSetupLoading: c = !1, isAudioPlaying: d, visualViewportHeight: l }) {
|
|
3696
3696
|
const m = me(l);
|
|
3697
|
-
return /* @__PURE__ */ f("div", { className: V("rqmii-chat-panel rqmii-chat-panel--voice-start",
|
|
3697
|
+
return /* @__PURE__ */ f("div", { className: V("rqmii-chat-panel rqmii-chat-panel--voice-start", H(t)), style: m, children: [
|
|
3698
3698
|
/* @__PURE__ */ f("div", { className: "rqmii-chat-topbar", children: [
|
|
3699
3699
|
/* @__PURE__ */ n("span", {}),
|
|
3700
3700
|
/* @__PURE__ */ f("div", { className: "rqmii-chat-topbar-actions", children: [
|
|
3701
|
-
/* @__PURE__ */ n(
|
|
3702
|
-
/* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button", onClick: o, children: /* @__PURE__ */ n(
|
|
3701
|
+
/* @__PURE__ */ n(Ne, { language: t, languages: i, onChange: r }),
|
|
3702
|
+
/* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button", onClick: o, children: /* @__PURE__ */ n(De, { size: 20 }) })
|
|
3703
3703
|
] })
|
|
3704
3704
|
] }),
|
|
3705
3705
|
/* @__PURE__ */ f("div", { className: "rqmii-chat-call-body", children: [
|
|
3706
3706
|
/* @__PURE__ */ f("div", { className: "rqmii-chat-call-avatar-wrap", children: [
|
|
3707
3707
|
/* @__PURE__ */ n(J, { agent: a, size: "hero", active: d }),
|
|
3708
|
-
/* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-call-button", onClick: s, disabled: c, "aria-label": F(t, "startVoice"), children: c ? /* @__PURE__ */ n(ye, { className: "rqmii-chat-spin", size: 24 }) : /* @__PURE__ */ n(
|
|
3708
|
+
/* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-call-button", onClick: s, disabled: c, "aria-label": F(t, "startVoice"), children: c ? /* @__PURE__ */ n(ye, { className: "rqmii-chat-spin", size: 24 }) : /* @__PURE__ */ n(Ie, { size: 24 }) })
|
|
3709
3709
|
] }),
|
|
3710
3710
|
/* @__PURE__ */ f("div", { className: "rqmii-chat-agent-name", children: [
|
|
3711
3711
|
F(t, "call"),
|
|
@@ -3715,30 +3715,30 @@ const wn = I.memo(function({ agent: a, language: t, languages: i, onLanguageChan
|
|
|
3715
3715
|
] }),
|
|
3716
3716
|
/* @__PURE__ */ n(le, { language: t, agent: a })
|
|
3717
3717
|
] });
|
|
3718
|
-
}),
|
|
3719
|
-
const p = da({ language: t, isListening: u, isLoading: E, isSpeaking: h, isAudioPlaying: d, isAgentThinking: k, isAgentSpeaking:
|
|
3720
|
-
return /* @__PURE__ */ f("div", { className: V("rqmii-chat-panel rqmii-chat-panel--conversation",
|
|
3718
|
+
}), Vn = D.memo(function({ agent: a, language: t, onEndSession: i, onMinimize: r, messages: o, partialTranscript: s, onSend: c, isAudioPlaying: d, isVoiceEnabled: l, onToggleVoice: m, isListening: u, isSpeaking: h, isLoading: E, isAgentThinking: k, isAgentSpeaking: v, onStartVoice: z, elapsed: T, visualViewportHeight: g, waitingForResponse: b }) {
|
|
3719
|
+
const p = da({ language: t, isListening: u, isLoading: E, isSpeaking: h, isAudioPlaying: d, isAgentThinking: k, isAgentSpeaking: v, persistentListening: !1 }), x = me(g);
|
|
3720
|
+
return /* @__PURE__ */ f("div", { className: V("rqmii-chat-panel rqmii-chat-panel--conversation", H(t)), style: x, children: [
|
|
3721
3721
|
/* @__PURE__ */ f("div", { className: "rqmii-chat-header", children: [
|
|
3722
3722
|
/* @__PURE__ */ n(J, { agent: a, size: "header", active: d }),
|
|
3723
3723
|
l && p && /* @__PURE__ */ n("div", { className: "rqmii-chat-header-status", children: /* @__PURE__ */ n("span", { children: p }) }),
|
|
3724
3724
|
/* @__PURE__ */ n("div", { className: "rqmii-chat-header-spacer" }),
|
|
3725
3725
|
/* @__PURE__ */ f("div", { className: "rqmii-chat-header-actions", children: [
|
|
3726
3726
|
r && /* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button", onClick: r, "aria-label": F(t, "minimize"), children: /* @__PURE__ */ n(Te, { size: 20 }) }),
|
|
3727
|
-
l && /* @__PURE__ */ n("button", { type: "button", className: V("rqmii-chat-circle-button", h && "is-active"), onClick: m, "aria-label": u ? F(t, "stopVoice") : F(t, "startVoice"), children: u ? /* @__PURE__ */ n(Fe, { size: 20 }) : /* @__PURE__ */ n(
|
|
3728
|
-
/* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button is-danger", onClick: i, "aria-label": F(t, "endCall"), children: /* @__PURE__ */ n(
|
|
3727
|
+
l && /* @__PURE__ */ n("button", { type: "button", className: V("rqmii-chat-circle-button", h && "is-active"), onClick: m, "aria-label": u ? F(t, "stopVoice") : F(t, "startVoice"), children: u ? /* @__PURE__ */ n(Fe, { size: 20 }) : /* @__PURE__ */ n(Ve, { size: 20 }) }),
|
|
3728
|
+
/* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button is-danger", onClick: i, "aria-label": F(t, "endCall"), children: /* @__PURE__ */ n(je, { size: 20 }) })
|
|
3729
3729
|
] })
|
|
3730
3730
|
] }),
|
|
3731
|
-
/* @__PURE__ */ n(
|
|
3732
|
-
l && /* @__PURE__ */ n("div", { className: "rqmii-chat-session-counter", children:
|
|
3731
|
+
/* @__PURE__ */ n(_e, { messages: o, partialTranscript: s, language: t, showTypingIndicator: b }),
|
|
3732
|
+
l && /* @__PURE__ */ n("div", { className: "rqmii-chat-session-counter", children: qe(T) }),
|
|
3733
3733
|
/* @__PURE__ */ n(Ee, { language: t, onSend: c }),
|
|
3734
3734
|
/* @__PURE__ */ n(le, { language: t, agent: a })
|
|
3735
3735
|
] });
|
|
3736
|
-
}),
|
|
3737
|
-
const k = da({ language: t, isListening: o, isLoading: s, isSpeaking: c, isAudioPlaying: d, isAgentThinking: l, isAgentSpeaking: m, persistentListening: !0 }),
|
|
3738
|
-
return /* @__PURE__ */ f("div", { className: V("rqmii-chat-panel rqmii-chat-panel--voice-call",
|
|
3736
|
+
}), jn = D.memo(function({ agent: a, language: t, onEndSession: i, onMinimize: r, isListening: o, isLoading: s, isSpeaking: c, isAudioPlaying: d, isAgentThinking: l, isAgentSpeaking: m, onToggleVoice: u, elapsed: h, visualViewportHeight: E }) {
|
|
3737
|
+
const k = da({ language: t, isListening: o, isLoading: s, isSpeaking: c, isAudioPlaying: d, isAgentThinking: l, isAgentSpeaking: m, persistentListening: !0 }), v = me(E);
|
|
3738
|
+
return /* @__PURE__ */ f("div", { className: V("rqmii-chat-panel rqmii-chat-panel--voice-call", H(t)), style: v, children: [
|
|
3739
3739
|
/* @__PURE__ */ f("div", { className: "rqmii-chat-call-status", children: [
|
|
3740
3740
|
/* @__PURE__ */ n("span", { className: V("rqmii-chat-live-dot", o && "is-live") }),
|
|
3741
|
-
/* @__PURE__ */ n("span", { children:
|
|
3741
|
+
/* @__PURE__ */ n("span", { children: qe(h) }),
|
|
3742
3742
|
/* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button", onClick: r, children: /* @__PURE__ */ n(Te, { size: 20 }) })
|
|
3743
3743
|
] }),
|
|
3744
3744
|
/* @__PURE__ */ f("div", { className: "rqmii-chat-voice-frame", children: [
|
|
@@ -3746,8 +3746,8 @@ const wn = I.memo(function({ agent: a, language: t, languages: i, onLanguageChan
|
|
|
3746
3746
|
/* @__PURE__ */ n("div", { className: "rqmii-chat-agent-name", children: a.name }),
|
|
3747
3747
|
/* @__PURE__ */ n("div", { className: V("rqmii-chat-status-pill", !k && "is-empty"), children: k || F(t, "listening") }),
|
|
3748
3748
|
/* @__PURE__ */ f("div", { className: "rqmii-chat-voice-actions", children: [
|
|
3749
|
-
/* @__PURE__ */ n("button", { type: "button", className: V("rqmii-chat-circle-button", c && "is-active"), onClick: u, children: o ? /* @__PURE__ */ n(Fe, { size: 20 }) : /* @__PURE__ */ n(
|
|
3750
|
-
/* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button is-danger", onClick: i, "aria-label": F(t, "endCall"), children: /* @__PURE__ */ n(
|
|
3749
|
+
/* @__PURE__ */ n("button", { type: "button", className: V("rqmii-chat-circle-button", c && "is-active"), onClick: u, children: o ? /* @__PURE__ */ n(Fe, { size: 20 }) : /* @__PURE__ */ n(Ve, { size: 20 }) }),
|
|
3750
|
+
/* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button is-danger", onClick: i, "aria-label": F(t, "endCall"), children: /* @__PURE__ */ n(je, { size: 20 }) })
|
|
3751
3751
|
] })
|
|
3752
3752
|
] }),
|
|
3753
3753
|
/* @__PURE__ */ n(le, { language: t, agent: a })
|
|
@@ -3756,18 +3756,18 @@ const wn = I.memo(function({ agent: a, language: t, languages: i, onLanguageChan
|
|
|
3756
3756
|
function da({ language: e, isListening: a, isLoading: t, isSpeaking: i, isAudioPlaying: r, isAgentThinking: o, isAgentSpeaking: s, persistentListening: c = !1 }) {
|
|
3757
3757
|
return t ? F(e, "loading") : i ? F(e, "listening") : r || s ? F(e, "talkToInterrupt") : o ? F(e, "processing") : a && c ? F(e, "listening") : null;
|
|
3758
3758
|
}
|
|
3759
|
-
const
|
|
3759
|
+
const In = D.memo(function({ agent: a, language: t, onRestore: i, onClose: r, isListening: o, isAudioPlaying: s, isSpeaking: c, onToggleVoice: d, elapsed: l, visualViewportHeight: m, variant: u = "voice" }) {
|
|
3760
3760
|
const h = me(m), E = u === "text";
|
|
3761
|
-
return /* @__PURE__ */ f("div", { className: V("rqmii-chat-minimized",
|
|
3761
|
+
return /* @__PURE__ */ f("div", { className: V("rqmii-chat-minimized", H(t)), style: h, children: [
|
|
3762
3762
|
/* @__PURE__ */ n(J, { agent: a, size: "minimized", active: s }),
|
|
3763
|
-
!E && /* @__PURE__ */ n("span", { className: "rqmii-chat-minimized-time", children:
|
|
3763
|
+
!E && /* @__PURE__ */ n("span", { className: "rqmii-chat-minimized-time", children: qe(l) }),
|
|
3764
3764
|
/* @__PURE__ */ f("div", { className: "rqmii-chat-minimized-actions", children: [
|
|
3765
|
-
/* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button", onClick: i, "aria-label": F(t, "maximize"), children: /* @__PURE__ */ n(
|
|
3766
|
-
!E && /* @__PURE__ */ n("button", { type: "button", className: V("rqmii-chat-circle-button", c && "is-active"), onClick: d, "aria-label": o ? F(t, "stopVoice") : F(t, "startVoice"), children: o ? /* @__PURE__ */ n(Fe, { size: 20 }) : /* @__PURE__ */ n(
|
|
3767
|
-
/* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button is-danger", onClick: r, "aria-label": F(t, "endCall"), children: /* @__PURE__ */ n(
|
|
3765
|
+
/* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button", onClick: i, "aria-label": F(t, "maximize"), children: /* @__PURE__ */ n(Yt, { size: 20 }) }),
|
|
3766
|
+
!E && /* @__PURE__ */ n("button", { type: "button", className: V("rqmii-chat-circle-button", c && "is-active"), onClick: d, "aria-label": o ? F(t, "stopVoice") : F(t, "startVoice"), children: o ? /* @__PURE__ */ n(Fe, { size: 20 }) : /* @__PURE__ */ n(Ve, { size: 20 }) }),
|
|
3767
|
+
/* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button is-danger", onClick: r, "aria-label": F(t, "endCall"), children: /* @__PURE__ */ n(je, { size: 20 }) })
|
|
3768
3768
|
] })
|
|
3769
3769
|
] });
|
|
3770
|
-
}),
|
|
3770
|
+
}), Dn = D.memo(function({
|
|
3771
3771
|
agent: a,
|
|
3772
3772
|
language: t,
|
|
3773
3773
|
languages: i,
|
|
@@ -3782,25 +3782,25 @@ const jn = I.memo(function({ agent: a, language: t, onRestore: i, onClose: r, is
|
|
|
3782
3782
|
rating: h,
|
|
3783
3783
|
endedBy: E,
|
|
3784
3784
|
sessionId: k,
|
|
3785
|
-
ratingInteractive:
|
|
3785
|
+
ratingInteractive: v,
|
|
3786
3786
|
showTellUsMore: z,
|
|
3787
3787
|
onRate: T,
|
|
3788
3788
|
onTellUsMore: g
|
|
3789
3789
|
}) {
|
|
3790
3790
|
const b = me(u), p = k && a.widget?.behavior?.post_chat_rating_enabled ? /* @__PURE__ */ n(
|
|
3791
|
-
|
|
3791
|
+
Mn,
|
|
3792
3792
|
{
|
|
3793
3793
|
language: t,
|
|
3794
3794
|
rating: h,
|
|
3795
3795
|
endedBy: E,
|
|
3796
3796
|
sessionId: k,
|
|
3797
|
-
interactive:
|
|
3797
|
+
interactive: v,
|
|
3798
3798
|
showTellUsMore: z,
|
|
3799
3799
|
onRate: T,
|
|
3800
3800
|
onTellUsMore: g
|
|
3801
3801
|
}
|
|
3802
|
-
) : null,
|
|
3803
|
-
/* @__PURE__ */ n(
|
|
3802
|
+
) : null, x = r === "voice" || r === "text_and_voice", S = r === "text" || r === "text_and_voice", M = /* @__PURE__ */ f("div", { className: "rqmii-chat-topbar-actions rqmii-chat-topbar-actions--ended", children: [
|
|
3803
|
+
/* @__PURE__ */ n(Ne, { language: t, languages: i, onChange: s }),
|
|
3804
3804
|
/* @__PURE__ */ n(
|
|
3805
3805
|
"button",
|
|
3806
3806
|
{
|
|
@@ -3811,7 +3811,7 @@ const jn = I.memo(function({ agent: a, language: t, onRestore: i, onClose: r, is
|
|
|
3811
3811
|
children: /* @__PURE__ */ n(Te, { size: 20 })
|
|
3812
3812
|
}
|
|
3813
3813
|
),
|
|
3814
|
-
|
|
3814
|
+
x && /* @__PURE__ */ n(
|
|
3815
3815
|
"button",
|
|
3816
3816
|
{
|
|
3817
3817
|
type: "button",
|
|
@@ -3819,14 +3819,14 @@ const jn = I.memo(function({ agent: a, language: t, onRestore: i, onClose: r, is
|
|
|
3819
3819
|
onClick: d,
|
|
3820
3820
|
disabled: m,
|
|
3821
3821
|
"aria-label": F(t, "startVoice"),
|
|
3822
|
-
children: m ? /* @__PURE__ */ n(ye, { className: "rqmii-chat-spin", size: 20 }) : /* @__PURE__ */ n(
|
|
3822
|
+
children: m ? /* @__PURE__ */ n(ye, { className: "rqmii-chat-spin", size: 20 }) : /* @__PURE__ */ n(Ie, { size: 20 })
|
|
3823
3823
|
}
|
|
3824
3824
|
)
|
|
3825
3825
|
] });
|
|
3826
|
-
return r === "voice" ? /* @__PURE__ */ f("div", { className: V("rqmii-chat-panel rqmii-chat-panel--voice-call",
|
|
3826
|
+
return r === "voice" ? /* @__PURE__ */ f("div", { className: V("rqmii-chat-panel rqmii-chat-panel--voice-call", H(t)), style: b, children: [
|
|
3827
3827
|
/* @__PURE__ */ f("div", { className: "rqmii-chat-topbar", children: [
|
|
3828
3828
|
/* @__PURE__ */ n("span", {}),
|
|
3829
|
-
|
|
3829
|
+
M
|
|
3830
3830
|
] }),
|
|
3831
3831
|
/* @__PURE__ */ f("div", { className: "rqmii-chat-voice-frame", children: [
|
|
3832
3832
|
/* @__PURE__ */ n(J, { agent: a, size: "hero" }),
|
|
@@ -3834,38 +3834,38 @@ const jn = I.memo(function({ agent: a, language: t, onRestore: i, onClose: r, is
|
|
|
3834
3834
|
p
|
|
3835
3835
|
] }),
|
|
3836
3836
|
/* @__PURE__ */ n(le, { language: t, agent: a })
|
|
3837
|
-
] }) : /* @__PURE__ */ f("div", { className: V("rqmii-chat-panel rqmii-chat-panel--conversation",
|
|
3837
|
+
] }) : /* @__PURE__ */ f("div", { className: V("rqmii-chat-panel rqmii-chat-panel--conversation", H(t)), style: b, children: [
|
|
3838
3838
|
/* @__PURE__ */ f("div", { className: "rqmii-chat-topbar", children: [
|
|
3839
3839
|
/* @__PURE__ */ n(J, { agent: a, size: "header" }),
|
|
3840
|
-
|
|
3840
|
+
M
|
|
3841
3841
|
] }),
|
|
3842
|
-
/* @__PURE__ */ n(
|
|
3842
|
+
/* @__PURE__ */ n(_e, { messages: o, language: t }),
|
|
3843
3843
|
p,
|
|
3844
|
-
|
|
3844
|
+
S && /* @__PURE__ */ n(Ee, { language: t, onSend: l }),
|
|
3845
3845
|
/* @__PURE__ */ n(le, { language: t, agent: a })
|
|
3846
3846
|
] });
|
|
3847
|
-
}), ua =
|
|
3847
|
+
}), ua = D.memo(function({ agent: a, language: t, onClose: i }) {
|
|
3848
3848
|
const { streamingUrl: r, isCloudStreamConnected: o, cloudStreamError: s } = Ke(), { isAvatarSpeaking: c } = Ke(), { messages: d, sendTextMessage: l } = de();
|
|
3849
|
-
return /* @__PURE__ */ f("div", { className: V("rqmii-avatar-panel",
|
|
3849
|
+
return /* @__PURE__ */ f("div", { className: V("rqmii-avatar-panel", H(t)), children: [
|
|
3850
3850
|
/* @__PURE__ */ f("div", { className: "rqmii-avatar-stream", children: [
|
|
3851
|
-
/* @__PURE__ */ n(
|
|
3851
|
+
/* @__PURE__ */ n(D.Suspense, { fallback: /* @__PURE__ */ n("div", { className: "rqmii-avatar-overlay", children: F(t, "loading") }), children: /* @__PURE__ */ n(wn, { autoConnect: !0, muted: !1 }) }),
|
|
3852
3852
|
!r && /* @__PURE__ */ n("div", { className: "rqmii-avatar-overlay", children: F(t, "loading") }),
|
|
3853
3853
|
s && /* @__PURE__ */ n("div", { className: "rqmii-avatar-overlay", children: F(t, "connectionFailed") }),
|
|
3854
3854
|
/* @__PURE__ */ f("div", { className: "rqmii-avatar-controls", children: [
|
|
3855
3855
|
/* @__PURE__ */ n(J, { agent: a, size: "header", active: c }),
|
|
3856
3856
|
/* @__PURE__ */ n("div", { className: "rqmii-chat-header-spacer" }),
|
|
3857
3857
|
/* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button", disabled: !o, children: /* @__PURE__ */ n(Fe, { size: 20 }) }),
|
|
3858
|
-
/* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button is-danger", onClick: i, children: /* @__PURE__ */ n(
|
|
3858
|
+
/* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button is-danger", onClick: i, children: /* @__PURE__ */ n(De, { size: 20 }) })
|
|
3859
3859
|
] })
|
|
3860
3860
|
] }),
|
|
3861
3861
|
a.useText && /* @__PURE__ */ f("div", { className: "rqmii-avatar-sidebar", children: [
|
|
3862
|
-
/* @__PURE__ */ n(
|
|
3862
|
+
/* @__PURE__ */ n(_e, { messages: d, language: t }),
|
|
3863
3863
|
/* @__PURE__ */ n(Ee, { language: t, onSend: l, variant: "compact" }),
|
|
3864
3864
|
/* @__PURE__ */ n(le, { language: t, agent: a })
|
|
3865
3865
|
] })
|
|
3866
3866
|
] });
|
|
3867
3867
|
});
|
|
3868
|
-
function
|
|
3868
|
+
function qn({ language: e, config: a, onAccept: t, onDecline: i }) {
|
|
3869
3869
|
const r = a?.title?.[e] || F(e, "consentTitle"), o = a?.body?.[e] || F(e, "consentBody"), s = a?.acceptLabel?.[e] || F(e, "consentAccept"), c = a?.declineLabel?.[e] || F(e, "consentDecline"), d = a?.termsUrl?.[e], l = a?.privacyUrl?.[e];
|
|
3870
3870
|
return /* @__PURE__ */ f("div", { className: "rqmii-chat-panel rqmii-chat-panel--start", style: { justifyContent: "space-between" }, children: [
|
|
3871
3871
|
/* @__PURE__ */ f("div", { style: { flex: 1, display: "flex", flexDirection: "column", justifyContent: "center", padding: "24px", gap: "16px" }, children: [
|
|
@@ -3909,18 +3909,18 @@ function Dn({ language: e, config: a, onAccept: t, onDecline: i }) {
|
|
|
3909
3909
|
] })
|
|
3910
3910
|
] });
|
|
3911
3911
|
}
|
|
3912
|
-
function
|
|
3912
|
+
function Nn(e) {
|
|
3913
3913
|
return e ? typeof e == "string" ? e : typeof e == "object" && typeof e.text == "string" ? e.text : "" : "";
|
|
3914
3914
|
}
|
|
3915
|
-
function
|
|
3915
|
+
function _n(e) {
|
|
3916
3916
|
return e === "text" || e === "voice" || e === "text_and_voice";
|
|
3917
3917
|
}
|
|
3918
|
-
const
|
|
3918
|
+
const Re = D.memo(function({
|
|
3919
3919
|
agent: a,
|
|
3920
3920
|
language: t,
|
|
3921
3921
|
languages: i,
|
|
3922
|
-
onLanguageChange: r =
|
|
3923
|
-
onEndSession: o =
|
|
3922
|
+
onLanguageChange: r = ie,
|
|
3923
|
+
onEndSession: o = ie,
|
|
3924
3924
|
onMinimize: s,
|
|
3925
3925
|
messages: c,
|
|
3926
3926
|
onSendMessage: d,
|
|
@@ -3930,48 +3930,48 @@ const _e = I.memo(function({
|
|
|
3930
3930
|
renderPanel: h,
|
|
3931
3931
|
messagesRef: E,
|
|
3932
3932
|
initialText: k,
|
|
3933
|
-
autoStartVoice:
|
|
3933
|
+
autoStartVoice: v
|
|
3934
3934
|
}) {
|
|
3935
|
-
const [z, T] =
|
|
3936
|
-
|
|
3935
|
+
const [z, T] = y(!1), g = m || ve(a), [b, p] = y(() => g === "voice" && u.isSessionReady || g === "voice" && !!v), [x, S] = y(() => (g === "text" || g === "text_and_voice") && u.isSessionReady || !!k || g === "text_and_voice" && !!v), [M, P] = y(!1), [L, A] = y(!1), [C, j] = y(null), W = sn(g === "voice" && b || g === "text_and_voice" && x), q = ln(), B = a.consent?.enabled && !z && !l, N = _n(g), { events: U } = ue();
|
|
3936
|
+
I(() => {
|
|
3937
3937
|
if (!U) return;
|
|
3938
|
-
const
|
|
3939
|
-
N &&
|
|
3940
|
-
},
|
|
3941
|
-
N &&
|
|
3938
|
+
const K = () => {
|
|
3939
|
+
N && rn() && P(!0);
|
|
3940
|
+
}, Z = () => {
|
|
3941
|
+
N && P(!1);
|
|
3942
3942
|
};
|
|
3943
|
-
return U.on("minimize_chat",
|
|
3944
|
-
U.off("minimize_chat",
|
|
3943
|
+
return U.on("minimize_chat", K), U.on("maximize_chat", Z), () => {
|
|
3944
|
+
U.off("minimize_chat", K), U.off("maximize_chat", Z);
|
|
3945
3945
|
};
|
|
3946
3946
|
}, [U, N]);
|
|
3947
|
-
const
|
|
3947
|
+
const O = () => T(!0), Q = () => {
|
|
3948
3948
|
s ? s() : o();
|
|
3949
|
-
},
|
|
3950
|
-
r(
|
|
3951
|
-
},
|
|
3952
|
-
if (
|
|
3953
|
-
d(
|
|
3949
|
+
}, X = (K) => {
|
|
3950
|
+
r(K), l || u.changeSessionLanguage(K);
|
|
3951
|
+
}, ne = re((K) => {
|
|
3952
|
+
if (j(null), A(!0), d) {
|
|
3953
|
+
d(K);
|
|
3954
3954
|
return;
|
|
3955
3955
|
}
|
|
3956
|
-
u.sendTextMessage(
|
|
3956
|
+
u.sendTextMessage(K);
|
|
3957
3957
|
}, [d, u]);
|
|
3958
|
-
|
|
3958
|
+
I(() => {
|
|
3959
3959
|
E && (E.current = u.messages);
|
|
3960
3960
|
});
|
|
3961
|
-
const
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
}, []),
|
|
3965
|
-
L && u.isSessionReady && (
|
|
3966
|
-
}, [L, u.isSessionReady, g]),
|
|
3967
|
-
L && u.error && (
|
|
3961
|
+
const ee = _(!1);
|
|
3962
|
+
I(() => {
|
|
3963
|
+
ee.current || (k ? (ee.current = !0, ne(k)) : v && (ee.current = !0, j(null), A(!0), u.isVoiceActive || u.startVoice()));
|
|
3964
|
+
}, []), I(() => {
|
|
3965
|
+
L && u.isSessionReady && (A(!1), g === "voice" ? p(!0) : S(!0));
|
|
3966
|
+
}, [L, u.isSessionReady, g]), I(() => {
|
|
3967
|
+
L && u.error && (A(!1), j(u.error));
|
|
3968
3968
|
}, [L, u.error]);
|
|
3969
|
-
const
|
|
3970
|
-
|
|
3969
|
+
const $ = re(() => {
|
|
3970
|
+
j(null), A(!0), u.isVoiceActive || u.startVoice();
|
|
3971
3971
|
}, [u]);
|
|
3972
|
-
if (u.error && !l && (
|
|
3972
|
+
if (u.error && !l && (x || b)) return /* @__PURE__ */ n(la, { message: u.error, language: t, onClose: o });
|
|
3973
3973
|
if (B)
|
|
3974
|
-
return /* @__PURE__ */ n(
|
|
3974
|
+
return /* @__PURE__ */ n(qn, { language: t, config: a.consent, onAccept: O, onDecline: Q });
|
|
3975
3975
|
const R = {
|
|
3976
3976
|
agent: a,
|
|
3977
3977
|
language: t,
|
|
@@ -3979,105 +3979,105 @@ const _e = I.memo(function({
|
|
|
3979
3979
|
chatKind: g,
|
|
3980
3980
|
sdk: u,
|
|
3981
3981
|
isPreview: l,
|
|
3982
|
-
onLanguageChange:
|
|
3982
|
+
onLanguageChange: X,
|
|
3983
3983
|
onClose: o,
|
|
3984
|
-
onMinimize: N ? () =>
|
|
3985
|
-
onRestore: N ? () =>
|
|
3986
|
-
onSend:
|
|
3984
|
+
onMinimize: N ? () => P(!0) : void 0,
|
|
3985
|
+
onRestore: N ? () => P(!1) : void 0,
|
|
3986
|
+
onSend: ne,
|
|
3987
3987
|
voiceStarted: b,
|
|
3988
|
-
conversationStarted:
|
|
3989
|
-
isMinimized:
|
|
3990
|
-
elapsed:
|
|
3988
|
+
conversationStarted: x,
|
|
3989
|
+
isMinimized: M,
|
|
3990
|
+
elapsed: W,
|
|
3991
3991
|
setVoiceStarted: p,
|
|
3992
|
-
setConversationStarted:
|
|
3992
|
+
setConversationStarted: S
|
|
3993
3993
|
};
|
|
3994
|
-
return h ? /* @__PURE__ */ n(
|
|
3995
|
-
|
|
3994
|
+
return h ? /* @__PURE__ */ n(Ae, { children: h(R) }) : /* @__PURE__ */ n(Rn, { ...R, connecting: L, connectError: C, visualViewportHeight: q, onCloseWidget: s ?? o, initiateVoice: $, onSendSuggestion: (K) => {
|
|
3995
|
+
j(null), A(!0), u.sendSuggestion?.(K);
|
|
3996
3996
|
} });
|
|
3997
|
-
}),
|
|
3998
|
-
const
|
|
3997
|
+
}), Rn = D.memo(function({ agent: a, language: t, languages: i, chatKind: r, sdk: o, onLanguageChange: s, onClose: c, onMinimize: d, onRestore: l, onSend: m, voiceStarted: u, conversationStarted: h, isMinimized: E, elapsed: k, setVoiceStarted: v, setConversationStarted: z, visualViewportHeight: T, connecting: g = !1, connectError: b = null, onCloseWidget: p, initiateVoice: x, onSendSuggestion: S }) {
|
|
3998
|
+
const M = a.widget?.behavior?.typing_indicator_enabled ?? !0, P = r === "text" ? o.waitingForResponse && M : !1, L = o.messages;
|
|
3999
3999
|
if (r === "avatar") return /* @__PURE__ */ n(ua, { agent: a, language: t, onClose: c });
|
|
4000
4000
|
if (E)
|
|
4001
|
-
return /* @__PURE__ */ n(
|
|
4001
|
+
return /* @__PURE__ */ n(In, { agent: a, language: t, onRestore: l, onClose: c, isListening: o.isVoiceActive, isAudioPlaying: o.isAudioPlaying, isSpeaking: o.vad.isSpeaking, onToggleVoice: o.toggleVoice, elapsed: k, visualViewportHeight: T, variant: r === "text" ? "text" : "voice" });
|
|
4002
4002
|
if (r === "voice" && u)
|
|
4003
|
-
return /* @__PURE__ */ n(
|
|
4003
|
+
return /* @__PURE__ */ n(jn, { agent: a, language: t, onEndSession: c, onMinimize: d, isListening: o.isVoiceActive, isLoading: o.vad.isLoading, isSpeaking: o.vad.isSpeaking, isAudioPlaying: o.isAudioPlaying, isAgentThinking: o.isAgentThinking, isAgentSpeaking: o.isAgentSpeaking, onToggleVoice: o.toggleVoice, elapsed: k, visualViewportHeight: T });
|
|
4004
4004
|
if (r === "voice")
|
|
4005
|
-
return /* @__PURE__ */ n(
|
|
4005
|
+
return /* @__PURE__ */ n(An, { agent: a, language: t, languages: i, onLanguageChange: s, onClose: p, isAudioPlaying: o.isAudioPlaying, isVoiceSetupLoading: o.isVoiceSetupLoading || g, onStartVoice: x, visualViewportHeight: T });
|
|
4006
4006
|
if (!h && (o.messages.length === 0 || g)) {
|
|
4007
|
-
const
|
|
4008
|
-
o.sendSuggestion ?
|
|
4009
|
-
},
|
|
4010
|
-
return /* @__PURE__ */ n(
|
|
4007
|
+
const A = a.conversation?.suggested_messages?.[t]?.filter((G) => G.trim()) || void 0, C = (G) => {
|
|
4008
|
+
o.sendSuggestion ? S(G) : m?.(G);
|
|
4009
|
+
}, j = r === "text_and_voice" || ve(a) === "text_and_voice";
|
|
4010
|
+
return /* @__PURE__ */ n(Ln, { agent: a, language: t, languages: i, onLanguageChange: s, onClose: p, onSend: m, isVoiceEnabled: j, isAudioPlaying: o.isAudioPlaying, isVoiceSetupLoading: o.isVoiceSetupLoading || g, onStartVoice: x, visualViewportHeight: T, disabled: g, error: b || void 0, suggestions: A, onSuggestionClick: C, compact: !!A });
|
|
4011
4011
|
}
|
|
4012
|
-
return /* @__PURE__ */ n(
|
|
4013
|
-
}),
|
|
4012
|
+
return /* @__PURE__ */ n(Vn, { agent: a, language: t, onEndSession: c, messages: L, partialTranscript: Nn(o.partialTranscript), onSend: m, isAudioPlaying: o.isAudioPlaying, isVoiceEnabled: r === "text_and_voice", isListening: o.isVoiceActive, isSpeaking: o.vad.isSpeaking, isLoading: o.vad.isLoading, isAgentThinking: o.isAgentThinking, isAgentSpeaking: o.isAgentSpeaking, onToggleVoice: o.toggleVoice, onStartVoice: o.startVoice, onMinimize: d, elapsed: k, visualViewportHeight: T, waitingForResponse: P });
|
|
4013
|
+
}), Bn = { isListening: !1, isLoading: !1, isSpeaking: !1, toggle: async () => !1 };
|
|
4014
4014
|
function ma({ isSessionReady: e, sendTextMessage: a, messages: t }) {
|
|
4015
|
-
const [i, r] =
|
|
4015
|
+
const [i, r] = y(null), [o, s] = y(null), c = re(() => {
|
|
4016
4016
|
r((d) => (d && (e ? a(d) : s(d)), null));
|
|
4017
4017
|
}, [e, a]);
|
|
4018
|
-
return
|
|
4018
|
+
return I(() => {
|
|
4019
4019
|
i && t.length !== 0 && c();
|
|
4020
|
-
}, [t, i, c]),
|
|
4020
|
+
}, [t, i, c]), I(() => {
|
|
4021
4021
|
if (!i) return;
|
|
4022
4022
|
const d = setTimeout(c, 5e3);
|
|
4023
4023
|
return () => clearTimeout(d);
|
|
4024
|
-
}, [i, c]),
|
|
4024
|
+
}, [i, c]), I(() => {
|
|
4025
4025
|
!o || !e || (a(o), s(null));
|
|
4026
4026
|
}, [e, o, a]), { pendingWelcomeText: i, pendingMessage: o, setPendingWelcomeText: r, setPendingMessage: s, sendPendingWelcomeText: c };
|
|
4027
4027
|
}
|
|
4028
|
-
function
|
|
4029
|
-
const [t, i] =
|
|
4030
|
-
return
|
|
4028
|
+
function Be({ isSessionReady: e, signalClientReady: a }) {
|
|
4029
|
+
const [t, i] = y(!1), [r, o] = y(void 0), s = _(!1);
|
|
4030
|
+
return I(() => {
|
|
4031
4031
|
!e || s.current || !t || (s.current = !0, a(r), i(!1));
|
|
4032
4032
|
}, [e, t, r, a]), { emitClientReady: re((d) => {
|
|
4033
4033
|
e ? (s.current = !0, a(d)) : (o(d), i(!0));
|
|
4034
4034
|
}, [e, a]) };
|
|
4035
4035
|
}
|
|
4036
|
-
const
|
|
4037
|
-
function
|
|
4038
|
-
const { isPreview: a = !1, ...t } = e, { messages: i, sendTextMessage: r, emitUserMessage: o, addLocalMessage: s, clearMessages: c } = de(), { changeSessionLanguage: d, clearSessionHistory: l, signalClientReady: m, error: u, isSessionReady: h, isAgentThinking: E, isAgentSpeaking: k } = ue(),
|
|
4039
|
-
|
|
4040
|
-
if (i.length >
|
|
4036
|
+
const Gn = 300;
|
|
4037
|
+
function Un(e) {
|
|
4038
|
+
const { isPreview: a = !1, ...t } = e, { messages: i, sendTextMessage: r, emitUserMessage: o, addLocalMessage: s, clearMessages: c } = de(), { changeSessionLanguage: d, clearSessionHistory: l, signalClientReady: m, error: u, isSessionReady: h, isAgentThinking: E, isAgentSpeaking: k } = ue(), v = _(!1), z = _(null), T = _(!1), [g, b] = y(!1), [p, x] = y(null), [S, M] = y(!1), P = _(i.length);
|
|
4039
|
+
I(() => {
|
|
4040
|
+
if (i.length > P.current) {
|
|
4041
4041
|
const q = i[i.length - 1];
|
|
4042
|
-
q.role === "assistant" && q.streaming &&
|
|
4042
|
+
q.role === "assistant" && q.streaming && M(!1);
|
|
4043
4043
|
}
|
|
4044
|
-
|
|
4044
|
+
P.current = i.length;
|
|
4045
4045
|
}, [i]), aa("message_rate_limited", re(() => {
|
|
4046
|
-
|
|
4047
|
-
}, [])),
|
|
4046
|
+
M(!1);
|
|
4047
|
+
}, [])), I(() => {
|
|
4048
4048
|
if (!h || !g || T.current) return;
|
|
4049
4049
|
const q = z.current;
|
|
4050
4050
|
if (q === null) return;
|
|
4051
|
-
T.current = !0, z.current = null, s("user", q),
|
|
4051
|
+
T.current = !0, z.current = null, s("user", q), x(null);
|
|
4052
4052
|
const B = e.agent.welcomeMessages?.[e.language];
|
|
4053
4053
|
m(B ? { welcomeMessage: B } : void 0);
|
|
4054
4054
|
const N = setTimeout(() => {
|
|
4055
|
-
o(q),
|
|
4056
|
-
},
|
|
4055
|
+
o(q), M(!0);
|
|
4056
|
+
}, Gn);
|
|
4057
4057
|
return () => clearTimeout(N);
|
|
4058
4058
|
}, [h, g, m, o, s]);
|
|
4059
|
-
const L =
|
|
4060
|
-
|
|
4061
|
-
}, [c]),
|
|
4059
|
+
const L = te(() => p ? [{ id: "first-user", role: "user", text: p }, ...i] : i, [p, i]), A = re(() => {
|
|
4060
|
+
x(null), c();
|
|
4061
|
+
}, [c]), C = {
|
|
4062
4062
|
emitClientReady: m,
|
|
4063
4063
|
sendMessage: (q) => {
|
|
4064
4064
|
r(q);
|
|
4065
4065
|
},
|
|
4066
|
-
queueForWelcome:
|
|
4067
|
-
enableVoice:
|
|
4068
|
-
disableVoice:
|
|
4066
|
+
queueForWelcome: ie,
|
|
4067
|
+
enableVoice: ie,
|
|
4068
|
+
disableVoice: ie,
|
|
4069
4069
|
language: e.language,
|
|
4070
4070
|
isSessionReady: h,
|
|
4071
4071
|
supportsVoice: !1,
|
|
4072
4072
|
isVoiceActive: !1,
|
|
4073
4073
|
chatKind: "text"
|
|
4074
|
-
},
|
|
4075
|
-
e.onSessionStart?.(),
|
|
4074
|
+
}, j = (q, B) => {
|
|
4075
|
+
e.onSessionStart?.(), v.current ? (M(!0), B.sendMessage(q)) : (v.current = !0, x(q), z.current = q, b(!0), M(!0));
|
|
4076
4076
|
}, G = (q) => {
|
|
4077
|
-
e.onTextSend ? e.onTextSend(q,
|
|
4077
|
+
e.onTextSend ? e.onTextSend(q, C) : j(q, C);
|
|
4078
4078
|
};
|
|
4079
4079
|
return /* @__PURE__ */ n(
|
|
4080
|
-
|
|
4080
|
+
Re,
|
|
4081
4081
|
{
|
|
4082
4082
|
...t,
|
|
4083
4083
|
isPreview: a,
|
|
@@ -4085,7 +4085,7 @@ function Gn(e) {
|
|
|
4085
4085
|
sdk: {
|
|
4086
4086
|
messages: L,
|
|
4087
4087
|
sendTextMessage: G,
|
|
4088
|
-
clearMessages:
|
|
4088
|
+
clearMessages: A,
|
|
4089
4089
|
clearSessionHistory: l,
|
|
4090
4090
|
isAudioPlaying: !1,
|
|
4091
4091
|
partialTranscript: null,
|
|
@@ -4096,51 +4096,51 @@ function Gn(e) {
|
|
|
4096
4096
|
isVoiceSetupLoading: !1,
|
|
4097
4097
|
isVoiceActive: !1,
|
|
4098
4098
|
isSessionReady: h,
|
|
4099
|
-
vad:
|
|
4100
|
-
startVoice:
|
|
4101
|
-
prepareVoice:
|
|
4102
|
-
toggleVoice:
|
|
4099
|
+
vad: Bn,
|
|
4100
|
+
startVoice: ie,
|
|
4101
|
+
prepareVoice: ie,
|
|
4102
|
+
toggleVoice: ie,
|
|
4103
4103
|
signalClientReady: m,
|
|
4104
|
-
waitingForResponse:
|
|
4104
|
+
waitingForResponse: S,
|
|
4105
4105
|
sendSuggestion: G
|
|
4106
4106
|
}
|
|
4107
4107
|
}
|
|
4108
4108
|
);
|
|
4109
4109
|
}
|
|
4110
|
-
function
|
|
4111
|
-
const { isPreview: a = !1, ...t } = e, { messages: i, sendTextMessage: r, clearMessages: o } = de(), { isAudioPlaying: s, partialTranscript: c } = ta(), { changeSessionLanguage: d, clearSessionHistory: l, signalClientReady: m, error: u, isSessionReady: h, isAgentThinking: E, isAgentSpeaking: k } = ue(), { setPendingWelcomeText:
|
|
4110
|
+
function Kn(e) {
|
|
4111
|
+
const { isPreview: a = !1, ...t } = e, { messages: i, sendTextMessage: r, clearMessages: o } = de(), { isAudioPlaying: s, partialTranscript: c } = ta(), { changeSessionLanguage: d, clearSessionHistory: l, signalClientReady: m, error: u, isSessionReady: h, isAgentThinking: E, isAgentSpeaking: k } = ue(), { setPendingWelcomeText: v, setPendingMessage: z } = ma({ isSessionReady: h, sendTextMessage: r, messages: i }), { emitClientReady: T } = Be({ isSessionReady: h, signalClientReady: m }), [g, b] = y(!1), p = na({
|
|
4112
4112
|
enabled: !0,
|
|
4113
4113
|
preloadStream: !1
|
|
4114
|
-
}), { isLoading:
|
|
4115
|
-
|
|
4116
|
-
!g || !h ||
|
|
4117
|
-
}, [g, h,
|
|
4118
|
-
const
|
|
4114
|
+
}), { isLoading: x, isListening: S, toggle: M } = p, P = x, L = S || g;
|
|
4115
|
+
I(() => {
|
|
4116
|
+
!g || !h || x || S || M();
|
|
4117
|
+
}, [g, h, x, S, M]);
|
|
4118
|
+
const A = () => {
|
|
4119
4119
|
e.onSessionStart?.();
|
|
4120
|
-
},
|
|
4120
|
+
}, C = {
|
|
4121
4121
|
emitClientReady: T,
|
|
4122
4122
|
sendMessage: (N) => {
|
|
4123
4123
|
h ? r(N) : z(N);
|
|
4124
4124
|
},
|
|
4125
|
-
queueForWelcome: (N) =>
|
|
4125
|
+
queueForWelcome: (N) => v(N),
|
|
4126
4126
|
enableVoice: () => b(!0),
|
|
4127
4127
|
disableVoice: () => {
|
|
4128
|
-
b(!1),
|
|
4128
|
+
b(!1), S && M();
|
|
4129
4129
|
},
|
|
4130
4130
|
language: e.language,
|
|
4131
4131
|
isSessionReady: h,
|
|
4132
4132
|
supportsVoice: !0,
|
|
4133
4133
|
isVoiceActive: L,
|
|
4134
4134
|
chatKind: "voice"
|
|
4135
|
-
},
|
|
4136
|
-
|
|
4135
|
+
}, j = (N) => {
|
|
4136
|
+
A(), N.enableVoice();
|
|
4137
4137
|
const U = e.agent.welcomeMessages?.[e.language];
|
|
4138
4138
|
N.emitClientReady(U ? { welcomeMessage: U } : void 0);
|
|
4139
4139
|
}, G = (N) => {
|
|
4140
4140
|
N.isVoiceActive ? N.disableVoice() : N.enableVoice();
|
|
4141
4141
|
};
|
|
4142
4142
|
return /* @__PURE__ */ n(
|
|
4143
|
-
|
|
4143
|
+
Re,
|
|
4144
4144
|
{
|
|
4145
4145
|
...t,
|
|
4146
4146
|
isPreview: a,
|
|
@@ -4157,30 +4157,30 @@ function Un(e) {
|
|
|
4157
4157
|
error: u,
|
|
4158
4158
|
isAgentThinking: E,
|
|
4159
4159
|
isAgentSpeaking: k,
|
|
4160
|
-
isVoiceSetupLoading:
|
|
4160
|
+
isVoiceSetupLoading: P,
|
|
4161
4161
|
isVoiceActive: L,
|
|
4162
4162
|
isSessionReady: h,
|
|
4163
4163
|
vad: p,
|
|
4164
4164
|
startVoice: () => {
|
|
4165
|
-
e.onVoiceStart ? e.onVoiceStart(
|
|
4165
|
+
e.onVoiceStart ? e.onVoiceStart(C) : j(C);
|
|
4166
4166
|
},
|
|
4167
4167
|
prepareVoice: () => {
|
|
4168
4168
|
},
|
|
4169
4169
|
toggleVoice: () => {
|
|
4170
|
-
e.onVoiceToggle ? e.onVoiceToggle(
|
|
4170
|
+
e.onVoiceToggle ? e.onVoiceToggle(C) : G(C);
|
|
4171
4171
|
},
|
|
4172
4172
|
signalClientReady: m
|
|
4173
4173
|
}
|
|
4174
4174
|
}
|
|
4175
4175
|
);
|
|
4176
4176
|
}
|
|
4177
|
-
const
|
|
4178
|
-
function
|
|
4179
|
-
const { isPreview: a = !1, ...t } = e, { messages: i, sendTextMessage: r, emitUserMessage: o, addLocalMessage: s, clearMessages: c } = de(), { isAudioPlaying: d, partialTranscript: l } = ta(), { changeSessionLanguage: m, clearSessionHistory: u, signalClientReady: h, error: E, isSessionReady: k, isAgentThinking:
|
|
4180
|
-
|
|
4177
|
+
const On = 300;
|
|
4178
|
+
function Yn(e) {
|
|
4179
|
+
const { isPreview: a = !1, ...t } = e, { messages: i, sendTextMessage: r, emitUserMessage: o, addLocalMessage: s, clearMessages: c } = de(), { isAudioPlaying: d, partialTranscript: l } = ta(), { changeSessionLanguage: m, clearSessionHistory: u, signalClientReady: h, error: E, isSessionReady: k, isAgentThinking: v, isAgentSpeaking: z } = ue(), { emitClientReady: T } = Be({ isSessionReady: k, signalClientReady: h }), [g, b] = y(!1), p = _(null), [x, S] = y(!1), M = _(null), [P, L] = y(!1), A = _(!1), C = _(!1), j = _(!1), [G, W] = y(null), [q, B] = y(!1), N = _(i.length);
|
|
4180
|
+
I(() => {
|
|
4181
4181
|
if (i.length > N.current) {
|
|
4182
|
-
const
|
|
4183
|
-
|
|
4182
|
+
const w = i[i.length - 1];
|
|
4183
|
+
w.role === "assistant" && w.streaming && B(!1);
|
|
4184
4184
|
}
|
|
4185
4185
|
N.current = i.length;
|
|
4186
4186
|
}, [i]), aa("message_rate_limited", re(() => {
|
|
@@ -4189,59 +4189,59 @@ function On(e) {
|
|
|
4189
4189
|
const U = na({
|
|
4190
4190
|
enabled: !0,
|
|
4191
4191
|
preloadStream: !1
|
|
4192
|
-
}), { isLoading:
|
|
4193
|
-
|
|
4194
|
-
!g || !k ||
|
|
4195
|
-
}, [g, k,
|
|
4196
|
-
if (!k || !
|
|
4197
|
-
const
|
|
4198
|
-
if (
|
|
4199
|
-
|
|
4200
|
-
const
|
|
4201
|
-
h(
|
|
4202
|
-
const
|
|
4203
|
-
o(
|
|
4204
|
-
},
|
|
4205
|
-
return () => clearTimeout(
|
|
4206
|
-
}, [k,
|
|
4207
|
-
if (!k || !
|
|
4208
|
-
const
|
|
4209
|
-
|
|
4210
|
-
}, [k,
|
|
4211
|
-
const
|
|
4212
|
-
|
|
4213
|
-
}, [c]),
|
|
4192
|
+
}), { isLoading: O, isListening: Q, toggle: X } = U, ne = O, ee = Q || g;
|
|
4193
|
+
I(() => {
|
|
4194
|
+
!g || !k || O || Q || X();
|
|
4195
|
+
}, [g, k, O, Q, X]), I(() => {
|
|
4196
|
+
if (!k || !x || j.current) return;
|
|
4197
|
+
const w = p.current;
|
|
4198
|
+
if (w === null) return;
|
|
4199
|
+
j.current = !0, p.current = null, s("user", w), W(null);
|
|
4200
|
+
const ae = e.agent.welcomeMessages?.[e.language];
|
|
4201
|
+
h(ae ? { welcomeMessage: ae } : void 0);
|
|
4202
|
+
const xe = setTimeout(() => {
|
|
4203
|
+
o(w), B(!0);
|
|
4204
|
+
}, On);
|
|
4205
|
+
return () => clearTimeout(xe);
|
|
4206
|
+
}, [k, x, h, o, s]), I(() => {
|
|
4207
|
+
if (!k || !P || A.current) return;
|
|
4208
|
+
const w = M.current;
|
|
4209
|
+
w !== null && (A.current = !0, M.current = null, s("user", w), o(w), B(!0), L(!1));
|
|
4210
|
+
}, [k, P, o, s]);
|
|
4211
|
+
const $ = te(() => G ? [{ id: "first-user", role: "user", text: G }, ...i] : i, [G, i]), R = re(() => {
|
|
4212
|
+
W(null), C.current = !1, j.current = !1, c();
|
|
4213
|
+
}, [c]), K = () => {
|
|
4214
4214
|
e.onSessionStart?.();
|
|
4215
|
-
},
|
|
4216
|
-
emitClientReady: (
|
|
4217
|
-
|
|
4215
|
+
}, Z = {
|
|
4216
|
+
emitClientReady: (w) => {
|
|
4217
|
+
j.current = !0, C.current = !0, T(w);
|
|
4218
4218
|
},
|
|
4219
|
-
sendMessage: (
|
|
4220
|
-
r(
|
|
4219
|
+
sendMessage: (w) => {
|
|
4220
|
+
r(w);
|
|
4221
4221
|
},
|
|
4222
4222
|
queueForWelcome: () => {
|
|
4223
4223
|
},
|
|
4224
4224
|
enableVoice: () => b(!0),
|
|
4225
4225
|
disableVoice: () => {
|
|
4226
|
-
b(!1),
|
|
4226
|
+
b(!1), Q && X();
|
|
4227
4227
|
},
|
|
4228
4228
|
language: e.language,
|
|
4229
4229
|
isSessionReady: k,
|
|
4230
4230
|
supportsVoice: !0,
|
|
4231
|
-
isVoiceActive:
|
|
4231
|
+
isVoiceActive: ee,
|
|
4232
4232
|
chatKind: "text_and_voice"
|
|
4233
|
-
},
|
|
4234
|
-
|
|
4235
|
-
},
|
|
4236
|
-
|
|
4237
|
-
const
|
|
4238
|
-
|
|
4239
|
-
}, fe = (
|
|
4240
|
-
|
|
4241
|
-
},
|
|
4242
|
-
messages:
|
|
4243
|
-
sendTextMessage: (
|
|
4244
|
-
e.onTextSend ? e.onTextSend(
|
|
4233
|
+
}, ke = (w, ae) => {
|
|
4234
|
+
K(), !C.current && !j.current ? (C.current = !0, e.onStartText?.(), W(w), p.current = w, S(!0), B(!0)) : (C.current = !0, B(!0), ae.sendMessage(w));
|
|
4235
|
+
}, ce = (w) => {
|
|
4236
|
+
K(), C.current = !0, j.current = !0, e.onStartVoice?.(), w.enableVoice();
|
|
4237
|
+
const ae = e.agent.welcomeMessages?.[e.language];
|
|
4238
|
+
w.emitClientReady(ae ? { welcomeMessage: ae } : void 0);
|
|
4239
|
+
}, fe = (w) => {
|
|
4240
|
+
w.isVoiceActive ? w.disableVoice() : w.enableVoice();
|
|
4241
|
+
}, Se = {
|
|
4242
|
+
messages: $,
|
|
4243
|
+
sendTextMessage: (w) => {
|
|
4244
|
+
e.onTextSend ? e.onTextSend(w, Z) : ke(w, Z);
|
|
4245
4245
|
},
|
|
4246
4246
|
clearMessages: R,
|
|
4247
4247
|
clearSessionHistory: u,
|
|
@@ -4249,76 +4249,76 @@ function On(e) {
|
|
|
4249
4249
|
partialTranscript: l,
|
|
4250
4250
|
changeSessionLanguage: m,
|
|
4251
4251
|
error: E,
|
|
4252
|
-
isAgentThinking:
|
|
4252
|
+
isAgentThinking: v,
|
|
4253
4253
|
isAgentSpeaking: z,
|
|
4254
|
-
isVoiceSetupLoading:
|
|
4255
|
-
isVoiceActive:
|
|
4254
|
+
isVoiceSetupLoading: ne,
|
|
4255
|
+
isVoiceActive: ee,
|
|
4256
4256
|
isSessionReady: k,
|
|
4257
4257
|
vad: U,
|
|
4258
4258
|
startVoice: () => {
|
|
4259
|
-
e.onVoiceStart ? e.onVoiceStart(
|
|
4259
|
+
e.onVoiceStart ? e.onVoiceStart(Z) : ce(Z);
|
|
4260
4260
|
},
|
|
4261
4261
|
prepareVoice: () => {
|
|
4262
4262
|
},
|
|
4263
4263
|
toggleVoice: () => {
|
|
4264
|
-
e.onVoiceToggle ? e.onVoiceToggle(
|
|
4264
|
+
e.onVoiceToggle ? e.onVoiceToggle(Z) : fe(Z);
|
|
4265
4265
|
},
|
|
4266
4266
|
signalClientReady: h,
|
|
4267
4267
|
waitingForResponse: q,
|
|
4268
|
-
sendSuggestion: (
|
|
4269
|
-
|
|
4268
|
+
sendSuggestion: (w) => {
|
|
4269
|
+
K(), C.current = !0, j.current = !0, e.onStartVoice?.(), b(!0), M.current = w, L(!0);
|
|
4270
4270
|
}
|
|
4271
4271
|
};
|
|
4272
4272
|
return /* @__PURE__ */ n(
|
|
4273
|
-
|
|
4273
|
+
Re,
|
|
4274
4274
|
{
|
|
4275
4275
|
...t,
|
|
4276
4276
|
isPreview: a,
|
|
4277
4277
|
chatKind: e.textOnly ? "text" : "text_and_voice",
|
|
4278
|
-
sdk:
|
|
4278
|
+
sdk: Se
|
|
4279
4279
|
}
|
|
4280
4280
|
);
|
|
4281
4281
|
}
|
|
4282
|
-
function
|
|
4283
|
-
const { isPreview: a = !1, agent: t, language: i, languages: r, onLanguageChange: o, onEndSession: s, onMinimize: c, messages: d, onSendMessage: l } = e, m = s || c ||
|
|
4284
|
-
return ma({ isSessionReady: g, sendTextMessage: h, messages: u }),
|
|
4282
|
+
function Qn(e) {
|
|
4283
|
+
const { isPreview: a = !1, agent: t, language: i, languages: r, onLanguageChange: o, onEndSession: s, onMinimize: c, messages: d, onSendMessage: l } = e, m = s || c || ie, { messages: u, sendTextMessage: h, clearMessages: E } = de(), { changeSessionLanguage: k, clearSessionHistory: v, signalClientReady: z, error: T, isSessionReady: g, isAgentThinking: b, isAgentSpeaking: p } = ue();
|
|
4284
|
+
return ma({ isSessionReady: g, sendTextMessage: h, messages: u }), Be({ isSessionReady: g, signalClientReady: z }), T && !a ? /* @__PURE__ */ n(la, { message: T, language: i, onClose: m }) : /* @__PURE__ */ n(ua, { agent: t, language: i, onClose: m });
|
|
4285
4285
|
}
|
|
4286
|
-
function
|
|
4287
|
-
const [o, s] =
|
|
4288
|
-
return
|
|
4286
|
+
function ai({ agent: e, defaultOpen: a = !1, className: t = "", preview: i = !1, ChatBoxComponent: r }) {
|
|
4287
|
+
const [o, s] = D.useState(a), [c, d] = D.useState(e.defaultLanguage), l = te(() => be(e.languages, e.defaultLanguage), [e.defaultLanguage, e.languages]);
|
|
4288
|
+
return D.useEffect(() => {
|
|
4289
4289
|
d(e.defaultLanguage);
|
|
4290
4290
|
}, [e.defaultLanguage]), /* @__PURE__ */ f("div", { className: V("rqmii-chat-surface", i && "is-preview", t), children: [
|
|
4291
4291
|
!o && /* @__PURE__ */ n(sa, { agent: e, onClick: () => s(!0), position: i ? "static" : "fixed" }),
|
|
4292
4292
|
o && /* @__PURE__ */ n(r, { agent: e, language: c, languages: l, onLanguageChange: d, onClose: () => s(!1), isPreview: i })
|
|
4293
4293
|
] });
|
|
4294
4294
|
}
|
|
4295
|
-
function
|
|
4296
|
-
const [s, c] =
|
|
4297
|
-
return
|
|
4295
|
+
function Hn({ restUrl: e, identifier: a, fallbackAgent: t, withCredentials: i = !1, children: r, onError: o }) {
|
|
4296
|
+
const [s, c] = y(() => t ? pe(t) : null), [d, l] = y(null);
|
|
4297
|
+
return I(() => {
|
|
4298
4298
|
t && (c(pe(t)), l(null));
|
|
4299
|
-
}, [t]),
|
|
4299
|
+
}, [t]), I(() => {
|
|
4300
4300
|
if (!a || t) return;
|
|
4301
4301
|
const m = new AbortController();
|
|
4302
|
-
return l(null),
|
|
4302
|
+
return l(null), Ct({ restUrl: e, identifier: a, withCredentials: i, signal: m.signal }).then(c).catch((u) => {
|
|
4303
4303
|
m.signal.aborted || (l(u), o?.(u));
|
|
4304
4304
|
}), () => m.abort();
|
|
4305
|
-
}, [t, a, o, e, i]), d ? /* @__PURE__ */ n("div", { className: "rqmii-chat-panel rqmii-chat-panel--error", children: d.message || "Could not load agent" }) : s ? /* @__PURE__ */ n(
|
|
4305
|
+
}, [t, a, o, e, i]), d ? /* @__PURE__ */ n("div", { className: "rqmii-chat-panel rqmii-chat-panel--error", children: d.message || "Could not load agent" }) : s ? /* @__PURE__ */ n(Ae, { children: r(s) }) : /* @__PURE__ */ n("div", { className: "rqmii-chat-panel rqmii-chat-panel--error", children: "Loading" });
|
|
4306
4306
|
}
|
|
4307
|
-
function
|
|
4308
|
-
const
|
|
4309
|
-
switch (
|
|
4307
|
+
function Le({ agent: e, language: a, languages: t, onLanguageChange: i, onEndSession: r, onMinimize: o, onStartText: s, onStartVoice: c, textOnly: d, messages: l, onSendMessage: m, isPreview: u, onSessionStart: h, initialText: E, autoStartVoice: k }) {
|
|
4308
|
+
const v = ve(e), z = { agent: e, language: a, languages: t, onLanguageChange: i, onEndSession: r, onMinimize: o, messages: l, onSendMessage: m, isPreview: u, onSessionStart: h, initialText: E, autoStartVoice: k };
|
|
4309
|
+
switch (v) {
|
|
4310
4310
|
case "avatar":
|
|
4311
|
-
return /* @__PURE__ */ n(
|
|
4311
|
+
return /* @__PURE__ */ n(Qn, { ...z });
|
|
4312
4312
|
case "voice":
|
|
4313
|
-
return /* @__PURE__ */ n(
|
|
4313
|
+
return /* @__PURE__ */ n(Kn, { ...z });
|
|
4314
4314
|
case "text_and_voice":
|
|
4315
|
-
return /* @__PURE__ */ n(
|
|
4315
|
+
return /* @__PURE__ */ n(Yn, { ...z, onStartText: s, onStartVoice: c, textOnly: d });
|
|
4316
4316
|
case "text":
|
|
4317
4317
|
default:
|
|
4318
|
-
return /* @__PURE__ */ n(
|
|
4318
|
+
return /* @__PURE__ */ n(Un, { ...z });
|
|
4319
4319
|
}
|
|
4320
4320
|
}
|
|
4321
|
-
function
|
|
4321
|
+
function Wn({
|
|
4322
4322
|
agent: e,
|
|
4323
4323
|
language: a,
|
|
4324
4324
|
languages: t,
|
|
@@ -4333,36 +4333,36 @@ function Hn({
|
|
|
4333
4333
|
onStartText: u,
|
|
4334
4334
|
onStartVoice: h
|
|
4335
4335
|
}) {
|
|
4336
|
-
const { connectionState: E, isConnected: k, isSessionTerminated:
|
|
4337
|
-
|
|
4338
|
-
k && (
|
|
4339
|
-
}, [k]),
|
|
4340
|
-
if (
|
|
4336
|
+
const { connectionState: E, isConnected: k, isSessionTerminated: v, creditExhausted: z, session: T, endSession: g, submitFeedback: b, interrupt: p } = ue(), { messages: x } = de(), S = _(!1), M = _(null), [P, L] = y(null), [A, C] = y(0), [j, G] = y(!1), [W, q] = y(!1), [B, N] = y(!1);
|
|
4337
|
+
I(() => {
|
|
4338
|
+
k && (S.current = !0);
|
|
4339
|
+
}, [k]), I(() => {
|
|
4340
|
+
if (P) return;
|
|
4341
4341
|
let R = null;
|
|
4342
|
-
|
|
4342
|
+
v || E === "ended" ? R = M.current === "user" ? "user_ended" : "terminated" : E === "failed" ? z ? R = "credits_exhausted" : S.current ? R = "connection_lost" : R = "failed" : z && (R = "credits_exhausted"), R && L({
|
|
4343
4343
|
sessionId: T.sessionId,
|
|
4344
|
-
endedBy:
|
|
4344
|
+
endedBy: M.current ?? "agent",
|
|
4345
4345
|
reason: R
|
|
4346
4346
|
});
|
|
4347
|
-
}, [
|
|
4347
|
+
}, [v, E, z, T.sessionId, P]);
|
|
4348
4348
|
const U = () => {
|
|
4349
|
-
|
|
4350
|
-
},
|
|
4351
|
-
|
|
4349
|
+
M.current = "user", p(), g();
|
|
4350
|
+
}, O = P?.sessionId ?? null, Q = (R) => {
|
|
4351
|
+
j || (C(R), O && b({ sessionId: O, rating: R, endedBy: P?.endedBy }).catch(() => {
|
|
4352
4352
|
}), B || (N(!0), q(!0)));
|
|
4353
|
-
},
|
|
4354
|
-
if (
|
|
4353
|
+
}, X = async (R) => {
|
|
4354
|
+
if (O)
|
|
4355
4355
|
try {
|
|
4356
|
-
await b({ sessionId:
|
|
4356
|
+
await b({ sessionId: O, feedback: R, endedBy: P?.endedBy });
|
|
4357
4357
|
} catch {
|
|
4358
4358
|
}
|
|
4359
4359
|
G(!0), q(!1);
|
|
4360
4360
|
};
|
|
4361
4361
|
if (!o)
|
|
4362
4362
|
return /* @__PURE__ */ n(sa, { agent: e, onClick: s, active: E === "connected" });
|
|
4363
|
-
const
|
|
4364
|
-
return
|
|
4365
|
-
|
|
4363
|
+
const ne = ve(e), ee = e.agentType === "cloud_avatar" || e.agentType === "desktop_avatar", $ = i === "text";
|
|
4364
|
+
return ee ? /* @__PURE__ */ n(
|
|
4365
|
+
Le,
|
|
4366
4366
|
{
|
|
4367
4367
|
agent: e,
|
|
4368
4368
|
language: a,
|
|
@@ -4373,40 +4373,40 @@ function Hn({
|
|
|
4373
4373
|
onSessionStart: m,
|
|
4374
4374
|
onStartText: u,
|
|
4375
4375
|
onStartVoice: h,
|
|
4376
|
-
textOnly:
|
|
4376
|
+
textOnly: $
|
|
4377
4377
|
}
|
|
4378
|
-
) :
|
|
4379
|
-
|
|
4378
|
+
) : P ? W && O ? /* @__PURE__ */ n(
|
|
4379
|
+
Cn,
|
|
4380
4380
|
{
|
|
4381
4381
|
agent: e,
|
|
4382
4382
|
language: a,
|
|
4383
|
-
rating:
|
|
4383
|
+
rating: A,
|
|
4384
4384
|
onBack: () => q(!1),
|
|
4385
4385
|
onMinimize: d,
|
|
4386
|
-
onSubmit:
|
|
4386
|
+
onSubmit: X
|
|
4387
4387
|
}
|
|
4388
4388
|
) : /* @__PURE__ */ n(
|
|
4389
|
-
|
|
4389
|
+
Dn,
|
|
4390
4390
|
{
|
|
4391
4391
|
agent: e,
|
|
4392
4392
|
language: a,
|
|
4393
4393
|
languages: t,
|
|
4394
|
-
chatKind:
|
|
4395
|
-
messages:
|
|
4394
|
+
chatKind: ne === "avatar" ? "text" : ne,
|
|
4395
|
+
messages: x,
|
|
4396
4396
|
onLanguageChange: c,
|
|
4397
4397
|
onMinimize: d,
|
|
4398
4398
|
onStartNewVoice: () => l("voice"),
|
|
4399
4399
|
onStartNewText: (R) => l("text", R),
|
|
4400
|
-
rating:
|
|
4401
|
-
endedBy:
|
|
4402
|
-
sessionId:
|
|
4403
|
-
ratingInteractive: !
|
|
4404
|
-
showTellUsMore: B && !
|
|
4405
|
-
onRate:
|
|
4400
|
+
rating: A,
|
|
4401
|
+
endedBy: P.endedBy,
|
|
4402
|
+
sessionId: O,
|
|
4403
|
+
ratingInteractive: !j,
|
|
4404
|
+
showTellUsMore: B && !j,
|
|
4405
|
+
onRate: Q,
|
|
4406
4406
|
onTellUsMore: () => q(!0)
|
|
4407
4407
|
}
|
|
4408
4408
|
) : /* @__PURE__ */ n(
|
|
4409
|
-
|
|
4409
|
+
Le,
|
|
4410
4410
|
{
|
|
4411
4411
|
agent: e,
|
|
4412
4412
|
language: a,
|
|
@@ -4417,23 +4417,23 @@ function Hn({
|
|
|
4417
4417
|
onSessionStart: m,
|
|
4418
4418
|
onStartText: u,
|
|
4419
4419
|
onStartVoice: h,
|
|
4420
|
-
textOnly:
|
|
4420
|
+
textOnly: $,
|
|
4421
4421
|
initialText: r?.mode === "text" ? r.text : void 0,
|
|
4422
4422
|
autoStartVoice: r?.mode === "voice"
|
|
4423
4423
|
}
|
|
4424
4424
|
);
|
|
4425
4425
|
}
|
|
4426
|
-
function
|
|
4426
|
+
function ti({ wsUrl: e, restUrl: a, apiKey: t, agentId: i, agent: r, language: o, defaultOpen: s = !1, open: c, className: d = "", pcmOptions: l, debug: m = !1, withCredentials: u = !1, onError: h, onInitialized: E, config: k, promptOverrides: v, clientTools: z, onMinimize: T, onOpen: g }) {
|
|
4427
4427
|
if ([!!t, !!i].filter(Boolean).length > 1)
|
|
4428
4428
|
throw new Error("RqmiiAgentChat: only one of apiKey, or agentId may be provided");
|
|
4429
|
-
return /* @__PURE__ */ n(
|
|
4430
|
-
|
|
4429
|
+
return /* @__PURE__ */ n(Hn, { restUrl: a, identifier: t || i, fallbackAgent: r, withCredentials: u, onError: h, children: (x) => /* @__PURE__ */ n(
|
|
4430
|
+
$n,
|
|
4431
4431
|
{
|
|
4432
4432
|
wsUrl: e,
|
|
4433
4433
|
restUrl: a,
|
|
4434
4434
|
apiKey: t,
|
|
4435
4435
|
agentId: i,
|
|
4436
|
-
agent:
|
|
4436
|
+
agent: x,
|
|
4437
4437
|
language: o,
|
|
4438
4438
|
defaultOpen: s,
|
|
4439
4439
|
open: c,
|
|
@@ -4444,99 +4444,101 @@ function ai({ wsUrl: e, restUrl: a, apiKey: t, agentId: i, agent: r, language: o
|
|
|
4444
4444
|
onError: h,
|
|
4445
4445
|
onInitialized: E,
|
|
4446
4446
|
config: k,
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4447
|
+
promptOverrides: v,
|
|
4448
|
+
clientTools: z,
|
|
4449
|
+
onMinimize: T,
|
|
4450
|
+
onOpen: g
|
|
4450
4451
|
}
|
|
4451
4452
|
) });
|
|
4452
4453
|
}
|
|
4453
|
-
function
|
|
4454
|
-
const [
|
|
4455
|
-
() =>
|
|
4456
|
-
[r,
|
|
4457
|
-
),
|
|
4454
|
+
function $n({ wsUrl: e, restUrl: a, apiKey: t, agentId: i, agent: r, language: o, defaultOpen: s, open: c, className: d, pcmOptions: l, debug: m, withCredentials: u, onError: h, onInitialized: E, config: k, promptOverrides: v, clientTools: z, onMinimize: T, onOpen: g }) {
|
|
4455
|
+
const [b, p] = y(s), x = c !== void 0 ? c : b, [S, M] = y(!1), [P, L] = y(o || r.defaultLanguage), [A, C] = y("idle"), [j, G] = y(0), [W, q] = y(null), [B, N] = y(!1), U = r.agentType === "cloud_avatar" || r.agentType === "desktop_avatar", O = U, Q = r.widget?.behavior, X = r.welcomeMessages?.[P] || "", ne = !x && !B && !O && !!Q?.welcome_bubble_enabled && !!X.trim(), ee = te(() => be(r.languages, r.defaultLanguage), [r.defaultLanguage, r.languages]), $ = te(() => A === "text" ? { ...k ?? {}, use_voice: !1, use_text: !0 } : k, [k, A]), R = te(
|
|
4456
|
+
() => wt(r, $),
|
|
4457
|
+
[r, $]
|
|
4458
|
+
), K = !O && R.useVoice, Z = U ? x : S, ke = te(() => ({
|
|
4458
4459
|
...t ? { apiKey: t } : {},
|
|
4459
4460
|
...i ? { agentId: i } : {},
|
|
4460
4461
|
language: P,
|
|
4461
|
-
config:
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4462
|
+
config: $,
|
|
4463
|
+
...v ? { promptOverrides: v } : {}
|
|
4464
|
+
}), [i, t, P, $, v]), ce = _(null), fe = _(!1), ze = _(j), Ge = ze.current !== j;
|
|
4465
|
+
ze.current = j, S && (!fe.current || Ge) && (ce.current = ke), fe.current = S, S || (ce.current = null);
|
|
4466
|
+
const Ue = S && ce.current ? ce.current : ke;
|
|
4467
|
+
I(() => {
|
|
4468
|
+
L(o || r.defaultLanguage);
|
|
4467
4469
|
}, [r.defaultLanguage, o]);
|
|
4468
|
-
const
|
|
4469
|
-
|
|
4470
|
+
const Se = te(() => h ? (he) => {
|
|
4471
|
+
C("idle"), h(he);
|
|
4470
4472
|
} : (he) => {
|
|
4471
|
-
|
|
4472
|
-
}, [h]),
|
|
4473
|
-
|
|
4474
|
-
},
|
|
4475
|
-
|
|
4476
|
-
},
|
|
4477
|
-
c === void 0 &&
|
|
4478
|
-
},
|
|
4479
|
-
c === void 0 &&
|
|
4480
|
-
},
|
|
4481
|
-
|
|
4473
|
+
C("idle");
|
|
4474
|
+
}, [h]), w = () => {
|
|
4475
|
+
C("text"), M(!0);
|
|
4476
|
+
}, ae = () => {
|
|
4477
|
+
C("voice"), M(!0);
|
|
4478
|
+
}, xe = () => {
|
|
4479
|
+
c === void 0 && p(!1), T?.();
|
|
4480
|
+
}, ha = () => {
|
|
4481
|
+
c === void 0 && p(!0), N(!0), g?.();
|
|
4482
|
+
}, ga = (he, pa) => {
|
|
4483
|
+
q(he === "text" ? { mode: "text", text: pa ?? "" } : { mode: "voice" }), C(he), M(!0), G((ba) => ba + 1);
|
|
4482
4484
|
};
|
|
4483
4485
|
return /* @__PURE__ */ n(
|
|
4484
|
-
|
|
4486
|
+
va,
|
|
4485
4487
|
{
|
|
4486
4488
|
wsUrl: e,
|
|
4487
4489
|
restUrl: a,
|
|
4488
|
-
session:
|
|
4489
|
-
connect:
|
|
4490
|
-
enableAudio:
|
|
4490
|
+
session: Ue,
|
|
4491
|
+
connect: Z,
|
|
4492
|
+
enableAudio: K,
|
|
4491
4493
|
pcmOptions: l,
|
|
4492
4494
|
debug: m,
|
|
4493
4495
|
withCredentials: u,
|
|
4494
|
-
onError:
|
|
4496
|
+
onError: Se,
|
|
4495
4497
|
onInitialized: E,
|
|
4496
|
-
clientTools:
|
|
4498
|
+
clientTools: z,
|
|
4497
4499
|
children: /* @__PURE__ */ f("div", { className: V("rqmii-chat-surface", r.widget?.appearance?.position === "left" && "rqmii-position-left", d), dir: "ltr", children: [
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
+
ne && /* @__PURE__ */ n(
|
|
4501
|
+
hn,
|
|
4500
4502
|
{
|
|
4501
|
-
message:
|
|
4502
|
-
delaySeconds:
|
|
4503
|
-
soundEnabled: !!
|
|
4503
|
+
message: X,
|
|
4504
|
+
delaySeconds: Q?.welcome_bubble_delay_seconds ?? 3,
|
|
4505
|
+
soundEnabled: !!Q?.welcome_bubble_sound_enabled,
|
|
4504
4506
|
language: P,
|
|
4505
4507
|
buttonPosition: r.widget?.appearance?.position === "left" ? "left" : "right",
|
|
4506
|
-
onClick: () =>
|
|
4508
|
+
onClick: () => N(!0)
|
|
4507
4509
|
}
|
|
4508
4510
|
),
|
|
4509
4511
|
/* @__PURE__ */ n(
|
|
4510
|
-
|
|
4512
|
+
Wn,
|
|
4511
4513
|
{
|
|
4512
4514
|
agent: r,
|
|
4513
4515
|
language: P,
|
|
4514
|
-
languages:
|
|
4515
|
-
startMode:
|
|
4516
|
-
directive:
|
|
4517
|
-
open:
|
|
4518
|
-
onOpen:
|
|
4519
|
-
onLanguageChange:
|
|
4520
|
-
onMinimize:
|
|
4521
|
-
onStartNewSession:
|
|
4522
|
-
onSessionStart: () =>
|
|
4523
|
-
onStartText:
|
|
4524
|
-
onStartVoice:
|
|
4516
|
+
languages: ee,
|
|
4517
|
+
startMode: A,
|
|
4518
|
+
directive: W,
|
|
4519
|
+
open: x,
|
|
4520
|
+
onOpen: ha,
|
|
4521
|
+
onLanguageChange: L,
|
|
4522
|
+
onMinimize: xe,
|
|
4523
|
+
onStartNewSession: ga,
|
|
4524
|
+
onSessionStart: () => M(!0),
|
|
4525
|
+
onStartText: w,
|
|
4526
|
+
onStartVoice: ae
|
|
4525
4527
|
}
|
|
4526
4528
|
)
|
|
4527
4529
|
] })
|
|
4528
4530
|
},
|
|
4529
|
-
|
|
4531
|
+
j
|
|
4530
4532
|
);
|
|
4531
4533
|
}
|
|
4532
|
-
function
|
|
4533
|
-
const c =
|
|
4534
|
-
return
|
|
4534
|
+
function ni({ agent: e, language: a, open: t = !0, className: i = "", messages: r, onSendMessage: o, onClose: s }) {
|
|
4535
|
+
const c = te(() => pe(e), [e]), [d, l] = y(t), [m, u] = y(a || c.defaultLanguage), h = te(() => be(c.languages, c.defaultLanguage), [c.defaultLanguage, c.languages]);
|
|
4536
|
+
return I(() => {
|
|
4535
4537
|
a && u(a);
|
|
4536
|
-
}, [a]),
|
|
4538
|
+
}, [a]), I(() => {
|
|
4537
4539
|
l(t);
|
|
4538
|
-
}, [t]), /* @__PURE__ */ n(
|
|
4539
|
-
|
|
4540
|
+
}, [t]), /* @__PURE__ */ n(fa, { wsUrl: "", restUrl: "", enableAudio: !1, children: /* @__PURE__ */ n("div", { className: V("rqmii-chat-surface is-preview", i), dir: "ltr", children: d ? /* @__PURE__ */ n(
|
|
4541
|
+
Le,
|
|
4540
4542
|
{
|
|
4541
4543
|
agent: c,
|
|
4542
4544
|
language: m,
|
|
@@ -4555,29 +4557,29 @@ function ti({ agent: e, language: a, open: t = !0, className: i = "", messages:
|
|
|
4555
4557
|
) : null }) });
|
|
4556
4558
|
}
|
|
4557
4559
|
export {
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4560
|
+
qn as ConsentDialog,
|
|
4561
|
+
Dn as EndedChatPanel,
|
|
4562
|
+
ri as EpicPixelStreamingPlayer,
|
|
4563
|
+
Cn as FeedbackPanel,
|
|
4562
4564
|
Ze as RQMII_BUILTIN_FACES,
|
|
4563
|
-
|
|
4565
|
+
Ce as RQMII_CHAT_LANGUAGES,
|
|
4564
4566
|
Qe as RQMII_CHAT_LANGUAGE_VALUES,
|
|
4565
|
-
|
|
4567
|
+
Mn as RatingBar,
|
|
4566
4568
|
J as RqmiiAgentAvatar,
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4569
|
+
ti as RqmiiAgentChat,
|
|
4570
|
+
ni as RqmiiAgentChatPreview,
|
|
4571
|
+
va as RqmiiAgentRoom,
|
|
4572
|
+
Qn as RqmiiAvatarChatBox,
|
|
4571
4573
|
le as RqmiiChatFooter,
|
|
4572
4574
|
sa as RqmiiChatOpenButton,
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4575
|
+
ai as RqmiiChatSurface,
|
|
4576
|
+
si as RqmiiCloudAvatarPlayer,
|
|
4577
|
+
Yn as RqmiiTextAndVoiceChatBox,
|
|
4578
|
+
Un as RqmiiTextChatBox,
|
|
4579
|
+
Kn as RqmiiVoiceChatBox,
|
|
4580
|
+
ei as fetchAgentConfig,
|
|
4581
|
+
Ct as fetchAgentCustomization,
|
|
4582
|
+
nn as getBuiltinFace,
|
|
4581
4583
|
He as getChatLanguage,
|
|
4582
4584
|
F as getChatText,
|
|
4583
4585
|
be as normalizeChatLanguages,
|