@rqmii_immersive/agent-react-sdk 5.4.0 → 5.4.2

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.
Files changed (76) hide show
  1. package/dist/agent-react-sdk.css +1 -1
  2. package/dist/embed.js +218 -218
  3. package/dist/embed.js.map +1 -1
  4. package/dist/ui/chat/footer.test.d.ts +2 -0
  5. package/dist/ui/chat/footer.test.d.ts.map +1 -0
  6. package/dist/ui/chat/primitives.d.ts.map +1 -1
  7. package/dist/ui/languages/text.d.ts.map +1 -1
  8. package/dist/ui/languages/translations/af.d.ts.map +1 -1
  9. package/dist/ui/languages/translations/ar-eg.d.ts.map +1 -1
  10. package/dist/ui/languages/translations/ar-sa.d.ts.map +1 -1
  11. package/dist/ui/languages/translations/az.d.ts.map +1 -1
  12. package/dist/ui/languages/translations/be.d.ts.map +1 -1
  13. package/dist/ui/languages/translations/bg.d.ts.map +1 -1
  14. package/dist/ui/languages/translations/bn.d.ts.map +1 -1
  15. package/dist/ui/languages/translations/bs.d.ts.map +1 -1
  16. package/dist/ui/languages/translations/ca.d.ts.map +1 -1
  17. package/dist/ui/languages/translations/cs.d.ts.map +1 -1
  18. package/dist/ui/languages/translations/cy.d.ts.map +1 -1
  19. package/dist/ui/languages/translations/da.d.ts.map +1 -1
  20. package/dist/ui/languages/translations/de.d.ts.map +1 -1
  21. package/dist/ui/languages/translations/el.d.ts.map +1 -1
  22. package/dist/ui/languages/translations/en.d.ts.map +1 -1
  23. package/dist/ui/languages/translations/es.d.ts.map +1 -1
  24. package/dist/ui/languages/translations/et.d.ts.map +1 -1
  25. package/dist/ui/languages/translations/eu.d.ts.map +1 -1
  26. package/dist/ui/languages/translations/fa.d.ts.map +1 -1
  27. package/dist/ui/languages/translations/fi.d.ts.map +1 -1
  28. package/dist/ui/languages/translations/fr.d.ts.map +1 -1
  29. package/dist/ui/languages/translations/gl.d.ts.map +1 -1
  30. package/dist/ui/languages/translations/gu.d.ts.map +1 -1
  31. package/dist/ui/languages/translations/hi.d.ts.map +1 -1
  32. package/dist/ui/languages/translations/hr.d.ts.map +1 -1
  33. package/dist/ui/languages/translations/hu.d.ts.map +1 -1
  34. package/dist/ui/languages/translations/id.d.ts.map +1 -1
  35. package/dist/ui/languages/translations/it.d.ts.map +1 -1
  36. package/dist/ui/languages/translations/ja.d.ts.map +1 -1
  37. package/dist/ui/languages/translations/kk.d.ts.map +1 -1
  38. package/dist/ui/languages/translations/kn.d.ts.map +1 -1
  39. package/dist/ui/languages/translations/ko.d.ts.map +1 -1
  40. package/dist/ui/languages/translations/lt.d.ts.map +1 -1
  41. package/dist/ui/languages/translations/lv.d.ts.map +1 -1
  42. package/dist/ui/languages/translations/mk.d.ts.map +1 -1
  43. package/dist/ui/languages/translations/ml.d.ts.map +1 -1
  44. package/dist/ui/languages/translations/mr.d.ts.map +1 -1
  45. package/dist/ui/languages/translations/ms.d.ts.map +1 -1
  46. package/dist/ui/languages/translations/nl.d.ts.map +1 -1
  47. package/dist/ui/languages/translations/no.d.ts.map +1 -1
  48. package/dist/ui/languages/translations/pa.d.ts.map +1 -1
  49. package/dist/ui/languages/translations/pl.d.ts.map +1 -1
  50. package/dist/ui/languages/translations/pt.d.ts.map +1 -1
  51. package/dist/ui/languages/translations/ro.d.ts.map +1 -1
  52. package/dist/ui/languages/translations/ru.d.ts.map +1 -1
  53. package/dist/ui/languages/translations/sk.d.ts.map +1 -1
  54. package/dist/ui/languages/translations/sl.d.ts.map +1 -1
  55. package/dist/ui/languages/translations/sq.d.ts.map +1 -1
  56. package/dist/ui/languages/translations/sr.d.ts.map +1 -1
  57. package/dist/ui/languages/translations/sv.d.ts.map +1 -1
  58. package/dist/ui/languages/translations/sw.d.ts.map +1 -1
  59. package/dist/ui/languages/translations/ta.d.ts.map +1 -1
  60. package/dist/ui/languages/translations/te.d.ts.map +1 -1
  61. package/dist/ui/languages/translations/th.d.ts.map +1 -1
  62. package/dist/ui/languages/translations/tl.d.ts.map +1 -1
  63. package/dist/ui/languages/translations/tr.d.ts.map +1 -1
  64. package/dist/ui/languages/translations/uk.d.ts.map +1 -1
  65. package/dist/ui/languages/translations/ur.d.ts.map +1 -1
  66. package/dist/ui/languages/translations/vi.d.ts.map +1 -1
  67. package/dist/ui/languages/translations/zh.d.ts.map +1 -1
  68. package/dist/ui/languages/types.d.ts +1 -0
  69. package/dist/ui/languages/types.d.ts.map +1 -1
  70. package/dist/ui.cjs +27 -27
  71. package/dist/ui.cjs.map +1 -1
  72. package/dist/ui.js +1035 -1006
  73. package/dist/ui.js.map +1 -1
  74. package/package.json +1 -1
  75. package/dist/ui/languages/translations/ar.d.ts +0 -4
  76. package/dist/ui/languages/translations/ar.d.ts.map +0 -1
package/dist/ui.js CHANGED
@@ -1,8 +1,8 @@
1
- import { A as de, u as Ea, g as He, j as ge, h as pe, i as oa, l as sa, k as ra, R as za, c as Sa } from "./RqmiiCloudAvatarPlayer-Cit_rrpj.js";
2
- import { E as gi, d as pi } from "./RqmiiCloudAvatarPlayer-Cit_rrpj.js";
3
- import { jsx as n, jsxs as v, Fragment as Te } from "react/jsx-runtime";
4
- import A, { useContext as xa, createContext as Ma, forwardRef as la, createElement as Le, useState as y, useEffect as I, useRef as B, useLayoutEffect as We, useCallback as ie, useMemo as $ } from "react";
5
- const wa = {
1
+ import { A as de, u as Ea, g as He, j as ge, h as pe, i as oa, l as ra, k as sa, R as za, c as wa } from "./RqmiiCloudAvatarPlayer-Cit_rrpj.js";
2
+ import { E as hi, d as gi } from "./RqmiiCloudAvatarPlayer-Cit_rrpj.js";
3
+ import { jsx as t, jsxs as v, Fragment as Te } from "react/jsx-runtime";
4
+ import L, { useContext as Sa, createContext as xa, forwardRef as la, createElement as Ae, useState as y, useEffect as I, useRef as R, useLayoutEffect as We, useCallback as ie, useMemo as $ } from "react";
5
+ const Ma = {
6
6
  sendMessage: "Stuur 'n boodskap",
7
7
  send: "Stuur",
8
8
  close: "Sluit",
@@ -44,7 +44,8 @@ const wa = {
44
44
  leadFormName: "Naam",
45
45
  leadFormEmail: "E-pos",
46
46
  leadFormPhone: "Foon",
47
- leadFormMessage: "Jou boodskap"
47
+ leadFormMessage: "Jou boodskap",
48
+ poweredBy: "Aangedryf deur {brand}"
48
49
  }, Pa = {
49
50
  sendMessage: "Dërgo një mesazh",
50
51
  send: "Dërgo",
@@ -87,7 +88,8 @@ const wa = {
87
88
  leadFormName: "Emri",
88
89
  leadFormEmail: "Email",
89
90
  leadFormPhone: "Telefoni",
90
- leadFormMessage: "Mesazhi juaj"
91
+ leadFormMessage: "Mesazhi juaj",
92
+ poweredBy: "Mundësuar nga {brand}"
91
93
  }, Ca = {
92
94
  sendMessage: "اكتب رسالة",
93
95
  send: "إرسال",
@@ -130,50 +132,8 @@ const wa = {
130
132
  leadFormName: "الاسم",
131
133
  leadFormEmail: "البريد الإلكتروني",
132
134
  leadFormPhone: "رقم الهاتف",
133
- leadFormMessage: "رسالتك"
134
- }, La = {
135
- sendMessage: "اكتب رسالة",
136
- send: "إرسال",
137
- close: "إغلاق",
138
- minimize: "تصغير",
139
- maximize: "تكبير",
140
- call: "اتصل",
141
- listening: "يستمع",
142
- processing: "يعالج",
143
- talkToInterrupt: "تحدث للمقاطعة",
144
- startVoice: "بدء الصوت",
145
- stopVoice: "إيقاف الصوت",
146
- endCall: "إنهاء المكالمة",
147
- openChat: "فتح المحادثة",
148
- connectionFailed: "فشل الاتصال",
149
- retry: "إعادة المحاولة",
150
- loading: "جار التحميل",
151
- creditsExhausted: "نفذ الرصيد",
152
- creditsExhaustedDetail: "نفذ رصيد هذه الجلسة.",
153
- consentTitle: "الموافقة على الخصوصية",
154
- consentBody: "بالمتابعة، أنت توافق على جمع ومعالجة بياناتك كما هو موضح في",
155
- consentAccept: "قبول",
156
- consentDecline: "رفض",
157
- consentTermsLink: "شروط الخدمة",
158
- consentPrivacyLink: "سياسة الخصوصية",
159
- refresh: "تحديث",
160
- ratingQuestion: "كيف كانت هذه المحادثة؟",
161
- ratingThankYou: "شكرًا على ملاحظاتك!",
162
- youEnded: "لقد أنهيت المحادثة",
163
- agentEnded: "أنهى الوكيل المحادثة",
164
- sessionIdLabel: "المعرّف:",
165
- tellUsMore: "أخبرنا المزيد",
166
- feedbackSubtitle: "تساعدنا ملاحظاتك في تحسين خدمتنا ودعمك بشكل أفضل في المستقبل.",
167
- feedbackPlaceholder: "أخبرنا المزيد عن تجربتك…",
168
- submit: "إرسال",
169
- leadFormTitle: "معلومات التواصل",
170
- leadFormSuccess: "شكرًا لك! تم إرسال بياناتك.",
171
- leadFormRequiredError: "يرجى تعبئة جميع الحقول المطلوبة.",
172
- leadFormGenericError: "حدث خطأ ما. حاول مرة أخرى.",
173
- leadFormName: "الاسم",
174
- leadFormEmail: "البريد الإلكتروني",
175
- leadFormPhone: "رقم الهاتف",
176
- leadFormMessage: "رسالتك"
135
+ leadFormMessage: "رسالتك",
136
+ poweredBy: "بواسطة {brand}"
177
137
  }, Aa = {
178
138
  sendMessage: "اكتب رسالة",
179
139
  send: "إرسال",
@@ -216,8 +176,9 @@ const wa = {
216
176
  leadFormName: "الاسم",
217
177
  leadFormEmail: "البريد الإلكتروني",
218
178
  leadFormPhone: "رقم الهاتف",
219
- leadFormMessage: "رسالتك"
220
- }, _a = {
179
+ leadFormMessage: "رسالتك",
180
+ poweredBy: "بواسطة {brand}"
181
+ }, La = {
221
182
  sendMessage: "Mesaj göndər",
222
183
  send: "Göndər",
223
184
  close: "Bağla",
@@ -259,8 +220,9 @@ const wa = {
259
220
  leadFormName: "Ad",
260
221
  leadFormEmail: "E-poçt",
261
222
  leadFormPhone: "Telefon",
262
- leadFormMessage: "Mesajınız"
263
- }, qa = {
223
+ leadFormMessage: "Mesajınız",
224
+ poweredBy: "Dəstəkləyən {brand}"
225
+ }, _a = {
264
226
  sendMessage: "Bidali mezua",
265
227
  send: "Bidali",
266
228
  close: "Itxi",
@@ -302,8 +264,9 @@ const wa = {
302
264
  leadFormName: "Izena",
303
265
  leadFormEmail: "Helbide elektronikoa",
304
266
  leadFormPhone: "Telefonoa",
305
- leadFormMessage: "Zure mezua"
306
- }, Ia = {
267
+ leadFormMessage: "Zure mezua",
268
+ poweredBy: "Garapena: {brand}"
269
+ }, qa = {
307
270
  sendMessage: "Адправіць паведамленне",
308
271
  send: "Адправіць",
309
272
  close: "Зачыніць",
@@ -345,8 +308,9 @@ const wa = {
345
308
  leadFormName: "Імя",
346
309
  leadFormEmail: "Электронная пошта",
347
310
  leadFormPhone: "Тэлефон",
348
- leadFormMessage: "Ваша паведамленне"
349
- }, Va = {
311
+ leadFormMessage: "Ваша паведамленне",
312
+ poweredBy: "Працуе на {brand}"
313
+ }, Ia = {
350
314
  sendMessage: "একটি বার্তা পাঠান",
351
315
  send: "পাঠান",
352
316
  close: "বন্ধ করুন",
@@ -388,8 +352,9 @@ const wa = {
388
352
  leadFormName: "নাম",
389
353
  leadFormEmail: "ইমেইল",
390
354
  leadFormPhone: "ফোন",
391
- leadFormMessage: "আপনার বার্তা"
392
- }, Na = {
355
+ leadFormMessage: "আপনার বার্তা",
356
+ poweredBy: "পরিচালিত {brand}"
357
+ }, Va = {
393
358
  sendMessage: "Pošalji poruku",
394
359
  send: "Pošalji",
395
360
  close: "Zatvori",
@@ -431,8 +396,9 @@ const wa = {
431
396
  leadFormName: "Ime",
432
397
  leadFormEmail: "E-mail",
433
398
  leadFormPhone: "Telefon",
434
- leadFormMessage: "Vaša poruka"
435
- }, ja = {
399
+ leadFormMessage: "Vaša poruka",
400
+ poweredBy: "Pokreće {brand}"
401
+ }, Na = {
436
402
  sendMessage: "Изпрати съобщение",
437
403
  send: "Изпрати",
438
404
  close: "Затвори",
@@ -474,8 +440,9 @@ const wa = {
474
440
  leadFormName: "Име",
475
441
  leadFormEmail: "Имейл",
476
442
  leadFormPhone: "Телефон",
477
- leadFormMessage: "Вашето съобщение"
478
- }, Da = {
443
+ leadFormMessage: "Вашето съобщение",
444
+ poweredBy: "Предоставено от {brand}"
445
+ }, ja = {
479
446
  sendMessage: "Enviar un missatge",
480
447
  send: "Enviar",
481
448
  close: "Tancar",
@@ -517,8 +484,9 @@ const wa = {
517
484
  leadFormName: "Nom",
518
485
  leadFormEmail: "Correu electrònic",
519
486
  leadFormPhone: "Telèfon",
520
- leadFormMessage: "El teu missatge"
521
- }, Ra = {
487
+ leadFormMessage: "El teu missatge",
488
+ poweredBy: "Desenvolupat per {brand}"
489
+ }, Da = {
522
490
  sendMessage: "发送消息",
523
491
  send: "发送",
524
492
  close: "关闭",
@@ -560,7 +528,8 @@ const wa = {
560
528
  leadFormName: "姓名",
561
529
  leadFormEmail: "电子邮箱",
562
530
  leadFormPhone: "电话",
563
- leadFormMessage: "您的留言"
531
+ leadFormMessage: "您的留言",
532
+ poweredBy: "技术支持:{brand}"
564
533
  }, Ba = {
565
534
  sendMessage: "Pošalji poruku",
566
535
  send: "Pošalji",
@@ -603,8 +572,9 @@ const wa = {
603
572
  leadFormName: "Ime",
604
573
  leadFormEmail: "E-mail",
605
574
  leadFormPhone: "Telefon",
606
- leadFormMessage: "Vaša poruka"
607
- }, Ga = {
575
+ leadFormMessage: "Vaša poruka",
576
+ poweredBy: "Pokreće {brand}"
577
+ }, Ra = {
608
578
  sendMessage: "Poslat zprávu",
609
579
  send: "Odeslat",
610
580
  close: "Zavřít",
@@ -646,8 +616,9 @@ const wa = {
646
616
  leadFormName: "Jméno",
647
617
  leadFormEmail: "E-mail",
648
618
  leadFormPhone: "Telefon",
649
- leadFormMessage: "Vaše zpráva"
650
- }, Ua = {
619
+ leadFormMessage: "Vaše zpráva",
620
+ poweredBy: "Běží na {brand}"
621
+ }, Ga = {
651
622
  sendMessage: "Send en besked",
652
623
  send: "Send",
653
624
  close: "Luk",
@@ -689,8 +660,9 @@ const wa = {
689
660
  leadFormName: "Navn",
690
661
  leadFormEmail: "E-mail",
691
662
  leadFormPhone: "Telefon",
692
- leadFormMessage: "Din besked"
693
- }, Ka = {
663
+ leadFormMessage: "Din besked",
664
+ poweredBy: "Drevet af {brand}"
665
+ }, Ua = {
694
666
  sendMessage: "Stuur een bericht",
695
667
  send: "Verzenden",
696
668
  close: "Sluiten",
@@ -732,8 +704,9 @@ const wa = {
732
704
  leadFormName: "Naam",
733
705
  leadFormEmail: "E-mail",
734
706
  leadFormPhone: "Telefoon",
735
- leadFormMessage: "Uw bericht"
736
- }, Oa = {
707
+ leadFormMessage: "Uw bericht",
708
+ poweredBy: "Mogelijk gemaakt door {brand}"
709
+ }, Ka = {
737
710
  sendMessage: "Send a message",
738
711
  send: "Send",
739
712
  close: "Close",
@@ -775,8 +748,9 @@ const wa = {
775
748
  leadFormName: "Name",
776
749
  leadFormEmail: "Email",
777
750
  leadFormPhone: "Phone",
778
- leadFormMessage: "Your message"
779
- }, Ya = {
751
+ leadFormMessage: "Your message",
752
+ poweredBy: "Powered by {brand}"
753
+ }, Oa = {
780
754
  sendMessage: "Saada sõnum",
781
755
  send: "Saada",
782
756
  close: "Sulge",
@@ -818,8 +792,9 @@ const wa = {
818
792
  leadFormName: "Nimi",
819
793
  leadFormEmail: "E-post",
820
794
  leadFormPhone: "Telefon",
821
- leadFormMessage: "Teie sõnum"
822
- }, Qa = {
795
+ leadFormMessage: "Teie sõnum",
796
+ poweredBy: "Toetab {brand}"
797
+ }, Ya = {
823
798
  sendMessage: "Lähetä viesti",
824
799
  send: "Lähetä",
825
800
  close: "Sulje",
@@ -861,8 +836,9 @@ const wa = {
861
836
  leadFormName: "Nimi",
862
837
  leadFormEmail: "Sähköposti",
863
838
  leadFormPhone: "Puhelin",
864
- leadFormMessage: "Viestisi"
865
- }, Ha = {
839
+ leadFormMessage: "Viestisi",
840
+ poweredBy: "Palvelun tarjoaa {brand}"
841
+ }, Qa = {
866
842
  sendMessage: "Envoyer un message",
867
843
  send: "Envoyer",
868
844
  close: "Fermer",
@@ -904,8 +880,9 @@ const wa = {
904
880
  leadFormName: "Nom",
905
881
  leadFormEmail: "E-mail",
906
882
  leadFormPhone: "Téléphone",
907
- leadFormMessage: "Votre message"
908
- }, Wa = {
883
+ leadFormMessage: "Votre message",
884
+ poweredBy: "Propulsé par {brand}"
885
+ }, Ha = {
909
886
  sendMessage: "Enviar unha mensaxe",
910
887
  send: "Enviar",
911
888
  close: "Pechar",
@@ -947,8 +924,9 @@ const wa = {
947
924
  leadFormName: "Nome",
948
925
  leadFormEmail: "Correo electrónico",
949
926
  leadFormPhone: "Teléfono",
950
- leadFormMessage: "A túa mensaxe"
951
- }, $a = {
927
+ leadFormMessage: "A túa mensaxe",
928
+ poweredBy: "Desenvolvido por {brand}"
929
+ }, Wa = {
952
930
  sendMessage: "Nachricht senden",
953
931
  send: "Senden",
954
932
  close: "Schließen",
@@ -990,8 +968,9 @@ const wa = {
990
968
  leadFormName: "Name",
991
969
  leadFormEmail: "E-Mail",
992
970
  leadFormPhone: "Telefon",
993
- leadFormMessage: "Ihre Nachricht"
994
- }, Za = {
971
+ leadFormMessage: "Ihre Nachricht",
972
+ poweredBy: "Bereitgestellt von {brand}"
973
+ }, $a = {
995
974
  sendMessage: "Αποστολή μηνύματος",
996
975
  send: "Αποστολή",
997
976
  close: "Κλείσιμο",
@@ -1033,8 +1012,9 @@ const wa = {
1033
1012
  leadFormName: "Όνομα",
1034
1013
  leadFormEmail: "E-mail",
1035
1014
  leadFormPhone: "Τηλέφωνο",
1036
- leadFormMessage: "Το μήνυμά σας"
1037
- }, Ja = {
1015
+ leadFormMessage: "Το μήνυμά σας",
1016
+ poweredBy: "Με την υποστήриξη του {brand}"
1017
+ }, Za = {
1038
1018
  sendMessage: "સંદેશ મોકલો",
1039
1019
  send: "મોકલો",
1040
1020
  close: "બંધ કરો",
@@ -1076,8 +1056,9 @@ const wa = {
1076
1056
  leadFormName: "નામ",
1077
1057
  leadFormEmail: "ઇમેઇલ",
1078
1058
  leadFormPhone: "ફોન",
1079
- leadFormMessage: "તમારો સંદેશ"
1080
- }, Xa = {
1059
+ leadFormMessage: "તમારો સંદેશ",
1060
+ poweredBy: "સંચાલિત {brand}"
1061
+ }, Ja = {
1081
1062
  sendMessage: "संदेश भेजें",
1082
1063
  send: "भेजें",
1083
1064
  close: "बंद करें",
@@ -1119,8 +1100,9 @@ const wa = {
1119
1100
  leadFormName: "नाम",
1120
1101
  leadFormEmail: "ईमेल",
1121
1102
  leadFormPhone: "फ़ोन",
1122
- leadFormMessage: "आपका संदेश"
1123
- }, et = {
1103
+ leadFormMessage: "आपका संदेश",
1104
+ poweredBy: "द्वारा संचालित {brand}"
1105
+ }, Xa = {
1124
1106
  sendMessage: "Üzenet küldése",
1125
1107
  send: "Küldés",
1126
1108
  close: "Bezárás",
@@ -1162,8 +1144,9 @@ const wa = {
1162
1144
  leadFormName: "Név",
1163
1145
  leadFormEmail: "E-mail",
1164
1146
  leadFormPhone: "Telefon",
1165
- leadFormMessage: "Üzenete"
1166
- }, at = {
1147
+ leadFormMessage: "Üzenete",
1148
+ poweredBy: "Működteti a(z) {brand}"
1149
+ }, en = {
1167
1150
  sendMessage: "Kirim pesan",
1168
1151
  send: "Kirim",
1169
1152
  close: "Tutup",
@@ -1205,8 +1188,9 @@ const wa = {
1205
1188
  leadFormName: "Nama",
1206
1189
  leadFormEmail: "Email",
1207
1190
  leadFormPhone: "Telepon",
1208
- leadFormMessage: "Pesan Anda"
1209
- }, tt = {
1191
+ leadFormMessage: "Pesan Anda",
1192
+ poweredBy: "Didukung oleh {brand}"
1193
+ }, an = {
1210
1194
  sendMessage: "Invia un messaggio",
1211
1195
  send: "Invia",
1212
1196
  close: "Chiudi",
@@ -1248,8 +1232,9 @@ const wa = {
1248
1232
  leadFormName: "Nome",
1249
1233
  leadFormEmail: "E-mail",
1250
1234
  leadFormPhone: "Telefono",
1251
- leadFormMessage: "Il tuo messaggio"
1252
- }, nt = {
1235
+ leadFormMessage: "Il tuo messaggio",
1236
+ poweredBy: "Offerto da {brand}"
1237
+ }, nn = {
1253
1238
  sendMessage: "メッセージを送信",
1254
1239
  send: "送信",
1255
1240
  close: "閉じる",
@@ -1291,8 +1276,9 @@ const wa = {
1291
1276
  leadFormName: "お名前",
1292
1277
  leadFormEmail: "メールアドレス",
1293
1278
  leadFormPhone: "電話番号",
1294
- leadFormMessage: "メッセージ"
1295
- }, it = {
1279
+ leadFormMessage: "メッセージ",
1280
+ poweredBy: "提供: {brand}"
1281
+ }, tn = {
1296
1282
  sendMessage: "ಸಂದೇಶ ಕಳುಹಿಸಿ",
1297
1283
  send: "ಕಳುಹಿಸಿ",
1298
1284
  close: "ಮುಚ್ಚಿ",
@@ -1334,8 +1320,9 @@ const wa = {
1334
1320
  leadFormName: "ಹೆಸರು",
1335
1321
  leadFormEmail: "ಇಮೇಲ್",
1336
1322
  leadFormPhone: "ಫೋನ್",
1337
- leadFormMessage: "ನಿಮ್ಮ ಸಂದೇಶ"
1338
- }, ot = {
1323
+ leadFormMessage: "ನಿಮ್ಮ ಸಂದೇಶ",
1324
+ poweredBy: "ನಡೆಸುವವರು {brand}"
1325
+ }, on = {
1339
1326
  sendMessage: "Хабарлама жіберу",
1340
1327
  send: "Жіберу",
1341
1328
  close: "Жабу",
@@ -1377,8 +1364,9 @@ const wa = {
1377
1364
  leadFormName: "Аты",
1378
1365
  leadFormEmail: "Электрондық пошта",
1379
1366
  leadFormPhone: "Телефон",
1380
- leadFormMessage: "Сіздің хабарламаңыз"
1381
- }, st = {
1367
+ leadFormMessage: "Сіздің хабарламаңыз",
1368
+ poweredBy: "Қолдаушы {brand}"
1369
+ }, rn = {
1382
1370
  sendMessage: "메시지 보내기",
1383
1371
  send: "보내기",
1384
1372
  close: "닫기",
@@ -1420,8 +1408,9 @@ const wa = {
1420
1408
  leadFormName: "이름",
1421
1409
  leadFormEmail: "이메일",
1422
1410
  leadFormPhone: "전화번호",
1423
- leadFormMessage: "메시지"
1424
- }, rt = {
1411
+ leadFormMessage: "메시지",
1412
+ poweredBy: "제공: {brand}"
1413
+ }, sn = {
1425
1414
  sendMessage: "Sūtīt ziņojumu",
1426
1415
  send: "Sūtīt",
1427
1416
  close: "Aizvērt",
@@ -1463,8 +1452,9 @@ const wa = {
1463
1452
  leadFormName: "Vārds",
1464
1453
  leadFormEmail: "E-pasts",
1465
1454
  leadFormPhone: "Tālrunis",
1466
- leadFormMessage: "Jūsu ziņojums"
1467
- }, lt = {
1455
+ leadFormMessage: "Jūsu ziņojums",
1456
+ poweredBy: "Nodrošina {brand}"
1457
+ }, ln = {
1468
1458
  sendMessage: "Siųsti žinutę",
1469
1459
  send: "Siųsti",
1470
1460
  close: "Uždaryti",
@@ -1506,8 +1496,9 @@ const wa = {
1506
1496
  leadFormName: "Vardas",
1507
1497
  leadFormEmail: "El. paštas",
1508
1498
  leadFormPhone: "Telefonas",
1509
- leadFormMessage: "Jūsų žinutė"
1510
- }, ct = {
1499
+ leadFormMessage: "Jūsų žinutė",
1500
+ poweredBy: "Palaiko {brand}"
1501
+ }, cn = {
1511
1502
  sendMessage: "Испрати порака",
1512
1503
  send: "Испрати",
1513
1504
  close: "Затвори",
@@ -1549,8 +1540,9 @@ const wa = {
1549
1540
  leadFormName: "Име",
1550
1541
  leadFormEmail: "Е-пошта",
1551
1542
  leadFormPhone: "Телефон",
1552
- leadFormMessage: "Вашата порака"
1553
- }, dt = {
1543
+ leadFormMessage: "Вашата порака",
1544
+ poweredBy: "Овозможено од {brand}"
1545
+ }, dn = {
1554
1546
  sendMessage: "Hantar mesej",
1555
1547
  send: "Hantar",
1556
1548
  close: "Tutup",
@@ -1592,8 +1584,9 @@ const wa = {
1592
1584
  leadFormName: "Nama",
1593
1585
  leadFormEmail: "E-mel",
1594
1586
  leadFormPhone: "Telefon",
1595
- leadFormMessage: "Mesej anda"
1596
- }, ut = {
1587
+ leadFormMessage: "Mesej anda",
1588
+ poweredBy: "Dikuasakan oleh {brand}"
1589
+ }, un = {
1597
1590
  sendMessage: "ഒരു സന്ദേശം അയയ്‌ക്കുക",
1598
1591
  send: "അയയ്‌ക്കുക",
1599
1592
  close: "അടയ്‌ക്കുക",
@@ -1635,8 +1628,9 @@ const wa = {
1635
1628
  leadFormName: "പേര്",
1636
1629
  leadFormEmail: "ഇമെയിൽ",
1637
1630
  leadFormPhone: "ഫോൺ",
1638
- leadFormMessage: "നിങ്ങളുടെ സന്ദേശം"
1639
- }, mt = {
1631
+ leadFormMessage: "നിങ്ങളുടെ സന്ദേശം",
1632
+ poweredBy: "നൽകുന്നത് {brand}"
1633
+ }, mn = {
1640
1634
  sendMessage: "संदेश पाठवा",
1641
1635
  send: "पाठवा",
1642
1636
  close: "बंद करा",
@@ -1678,8 +1672,9 @@ const wa = {
1678
1672
  leadFormName: "नाव",
1679
1673
  leadFormEmail: "ईमेल",
1680
1674
  leadFormPhone: "फोन",
1681
- leadFormMessage: "तुमचा संदेश"
1682
- }, ht = {
1675
+ leadFormMessage: "तुमचा संदेश",
1676
+ poweredBy: "समर्थित {brand}"
1677
+ }, hn = {
1683
1678
  sendMessage: "Send en melding",
1684
1679
  send: "Send",
1685
1680
  close: "Lukk",
@@ -1721,8 +1716,9 @@ const wa = {
1721
1716
  leadFormName: "Navn",
1722
1717
  leadFormEmail: "E-post",
1723
1718
  leadFormPhone: "Telefon",
1724
- leadFormMessage: "Din melding"
1725
- }, gt = {
1719
+ leadFormMessage: "Din melding",
1720
+ poweredBy: "Drevet av {brand}"
1721
+ }, gn = {
1726
1722
  sendMessage: "پیامی بنویسید",
1727
1723
  send: "ارسال",
1728
1724
  close: "بستن",
@@ -1764,8 +1760,9 @@ const wa = {
1764
1760
  leadFormName: "نام",
1765
1761
  leadFormEmail: "ایمیل",
1766
1762
  leadFormPhone: "تلفن",
1767
- leadFormMessage: "پیام شما"
1768
- }, pt = {
1763
+ leadFormMessage: "پیام شما",
1764
+ poweredBy: "با پشتیبانی {brand}"
1765
+ }, pn = {
1769
1766
  sendMessage: "Wyślij wiadomość",
1770
1767
  send: "Wyślij",
1771
1768
  close: "Zamknij",
@@ -1807,8 +1804,9 @@ const wa = {
1807
1804
  leadFormName: "Imię",
1808
1805
  leadFormEmail: "E-mail",
1809
1806
  leadFormPhone: "Telefon",
1810
- leadFormMessage: "Twoja wiadomość"
1811
- }, bt = {
1807
+ leadFormMessage: "Twoja wiadomość",
1808
+ poweredBy: "Obsługiwane przez {brand}"
1809
+ }, bn = {
1812
1810
  sendMessage: "Enviar mensagem",
1813
1811
  send: "Enviar",
1814
1812
  close: "Fechar",
@@ -1850,8 +1848,9 @@ const wa = {
1850
1848
  leadFormName: "Nome",
1851
1849
  leadFormEmail: "E-mail",
1852
1850
  leadFormPhone: "Telefone",
1853
- leadFormMessage: "Sua mensagem"
1854
- }, ft = {
1851
+ leadFormMessage: "Sua mensagem",
1852
+ poweredBy: "Desenvolvido por {brand}"
1853
+ }, fn = {
1855
1854
  sendMessage: "ਇੱਕ ਸੁਨੇਹਾ ਭੇਜੋ",
1856
1855
  send: "ਭੇਜੋ",
1857
1856
  close: "ਬੰਦ ਕਰੋ",
@@ -1893,8 +1892,9 @@ const wa = {
1893
1892
  leadFormName: "ਨਾਮ",
1894
1893
  leadFormEmail: "ਈਮੇਲ",
1895
1894
  leadFormPhone: "ਫ਼ੋਨ",
1896
- leadFormMessage: "ਤੁਹਾਡਾ ਸੁਨੇਹਾ"
1897
- }, kt = {
1895
+ leadFormMessage: "ਤੁਹਾਡਾ ਸੁਨੇਹਾ",
1896
+ poweredBy: "ਦੁਆਰਾ ਸੰਚਾਲਿਤ {brand}"
1897
+ }, kn = {
1898
1898
  sendMessage: "Trimite un mesaj",
1899
1899
  send: "Trimite",
1900
1900
  close: "Închide",
@@ -1936,8 +1936,9 @@ const wa = {
1936
1936
  leadFormName: "Nume",
1937
1937
  leadFormEmail: "E-mail",
1938
1938
  leadFormPhone: "Telefon",
1939
- leadFormMessage: "Mesajul dumneavoastră"
1940
- }, vt = {
1939
+ leadFormMessage: "Mesajul dumneavoastră",
1940
+ poweredBy: "Dezvoltat de {brand}"
1941
+ }, vn = {
1941
1942
  sendMessage: "Отправить сообщение",
1942
1943
  send: "Отправить",
1943
1944
  close: "Закрыть",
@@ -1979,8 +1980,9 @@ const wa = {
1979
1980
  leadFormName: "Имя",
1980
1981
  leadFormEmail: "Электронная почта",
1981
1982
  leadFormPhone: "Телефон",
1982
- leadFormMessage: "Ваше сообщение"
1983
- }, yt = {
1983
+ leadFormMessage: "Ваше сообщение",
1984
+ poweredBy: "Работает на {brand}"
1985
+ }, yn = {
1984
1986
  sendMessage: "Пошаљи поруку",
1985
1987
  send: "Пошаљи",
1986
1988
  close: "Затвори",
@@ -2022,8 +2024,9 @@ const wa = {
2022
2024
  leadFormName: "Име",
2023
2025
  leadFormEmail: "Имејл",
2024
2026
  leadFormPhone: "Телефон",
2025
- leadFormMessage: "Ваша порука"
2026
- }, Ft = {
2027
+ leadFormMessage: "Ваша порука",
2028
+ poweredBy: "Омогућио {brand}"
2029
+ }, Fn = {
2027
2030
  sendMessage: "Poslať správu",
2028
2031
  send: "Odoslať",
2029
2032
  close: "Zavrieť",
@@ -2065,8 +2068,9 @@ const wa = {
2065
2068
  leadFormName: "Meno",
2066
2069
  leadFormEmail: "E-mail",
2067
2070
  leadFormPhone: "Telefón",
2068
- leadFormMessage: "Vaša správa"
2069
- }, Tt = {
2071
+ leadFormMessage: "Vaša správa",
2072
+ poweredBy: "Poháňané systémom {brand}"
2073
+ }, Tn = {
2070
2074
  sendMessage: "Pošlji sporočilo",
2071
2075
  send: "Pošlji",
2072
2076
  close: "Zapri",
@@ -2108,8 +2112,9 @@ const wa = {
2108
2112
  leadFormName: "Ime",
2109
2113
  leadFormEmail: "E-pošta",
2110
2114
  leadFormPhone: "Telefon",
2111
- leadFormMessage: "Vaše sporočilo"
2112
- }, Et = {
2115
+ leadFormMessage: "Vaše sporočilo",
2116
+ poweredBy: "Poganja {brand}"
2117
+ }, En = {
2113
2118
  sendMessage: "Enviar un mensaje",
2114
2119
  send: "Enviar",
2115
2120
  close: "Cerrar",
@@ -2151,8 +2156,9 @@ const wa = {
2151
2156
  leadFormName: "Nombre",
2152
2157
  leadFormEmail: "Correo electrónico",
2153
2158
  leadFormPhone: "Teléfono",
2154
- leadFormMessage: "Tu mensaje"
2155
- }, zt = {
2159
+ leadFormMessage: "Tu mensaje",
2160
+ poweredBy: "Desarrollado por {brand}"
2161
+ }, zn = {
2156
2162
  sendMessage: "Tuma ujumbe",
2157
2163
  send: "Tuma",
2158
2164
  close: "Funga",
@@ -2194,8 +2200,9 @@ const wa = {
2194
2200
  leadFormName: "Jina",
2195
2201
  leadFormEmail: "Barua pepe",
2196
2202
  leadFormPhone: "Simu",
2197
- leadFormMessage: "Ujumbe wako"
2198
- }, St = {
2203
+ leadFormMessage: "Ujumbe wako",
2204
+ poweredBy: "Inaendeshwa na {brand}"
2205
+ }, wn = {
2199
2206
  sendMessage: "Skicka ett meddelande",
2200
2207
  send: "Skicka",
2201
2208
  close: "Stäng",
@@ -2237,8 +2244,9 @@ const wa = {
2237
2244
  leadFormName: "Namn",
2238
2245
  leadFormEmail: "E-post",
2239
2246
  leadFormPhone: "Telefon",
2240
- leadFormMessage: "Ditt meddelande"
2241
- }, xt = {
2247
+ leadFormMessage: "Ditt meddelande",
2248
+ poweredBy: "Drivs av {brand}"
2249
+ }, Sn = {
2242
2250
  sendMessage: "Magpadala ng mensahe",
2243
2251
  send: "Ipadala",
2244
2252
  close: "Isara",
@@ -2280,8 +2288,9 @@ const wa = {
2280
2288
  leadFormName: "Pangalan",
2281
2289
  leadFormEmail: "Email",
2282
2290
  leadFormPhone: "Telepono",
2283
- leadFormMessage: "Ang iyong mensahe"
2284
- }, Mt = {
2291
+ leadFormMessage: "Ang iyong mensahe",
2292
+ poweredBy: "Pinapagana ng {brand}"
2293
+ }, xn = {
2285
2294
  sendMessage: "ஒரு செய்தி அனுப்பவும்",
2286
2295
  send: "அனுப்பு",
2287
2296
  close: "மூடு",
@@ -2323,8 +2332,9 @@ const wa = {
2323
2332
  leadFormName: "பெயர்",
2324
2333
  leadFormEmail: "மின்னஞ்சல்",
2325
2334
  leadFormPhone: "தொலைபேசி",
2326
- leadFormMessage: "உங்கள் செய்தி"
2327
- }, wt = {
2335
+ leadFormMessage: "உங்கள் செய்தி",
2336
+ poweredBy: "இயக்குபவர் {brand}"
2337
+ }, Mn = {
2328
2338
  sendMessage: "సందేశం పంపండి",
2329
2339
  send: "పంపు",
2330
2340
  close: "మూసివేయండి",
@@ -2366,8 +2376,9 @@ const wa = {
2366
2376
  leadFormName: "పేరు",
2367
2377
  leadFormEmail: "ఇమెయిల్",
2368
2378
  leadFormPhone: "ఫోన్",
2369
- leadFormMessage: "మీ సందేశం"
2370
- }, Pt = {
2379
+ leadFormMessage: "మీ సందేశం",
2380
+ poweredBy: "అందించేవారు {brand}"
2381
+ }, Pn = {
2371
2382
  sendMessage: "ส่งข้อความ",
2372
2383
  send: "ส่ง",
2373
2384
  close: "ปิด",
@@ -2409,8 +2420,9 @@ const wa = {
2409
2420
  leadFormName: "ชื่อ",
2410
2421
  leadFormEmail: "อีเมล",
2411
2422
  leadFormPhone: "โทรศัพท์",
2412
- leadFormMessage: "ข้อความของคุณ"
2413
- }, Ct = {
2423
+ leadFormMessage: "ข้อความของคุณ",
2424
+ poweredBy: "ขับเคลื่อนโดย {brand}"
2425
+ }, Cn = {
2414
2426
  sendMessage: "Mesaj gönder",
2415
2427
  send: "Gönder",
2416
2428
  close: "Kapat",
@@ -2452,8 +2464,9 @@ const wa = {
2452
2464
  leadFormName: "Ad",
2453
2465
  leadFormEmail: "E-posta",
2454
2466
  leadFormPhone: "Telefon",
2455
- leadFormMessage: "Mesajınız"
2456
- }, Lt = {
2467
+ leadFormMessage: "Mesajınız",
2468
+ poweredBy: "Destekleyen: {brand}"
2469
+ }, An = {
2457
2470
  sendMessage: "Надіслати повідомлення",
2458
2471
  send: "Надіслати",
2459
2472
  close: "Закрити",
@@ -2495,8 +2508,9 @@ const wa = {
2495
2508
  leadFormName: "Ім’я",
2496
2509
  leadFormEmail: "Електронна пошта",
2497
2510
  leadFormPhone: "Телефон",
2498
- leadFormMessage: "Ваше повідомлення"
2499
- }, At = {
2511
+ leadFormMessage: "Ваше повідомлення",
2512
+ poweredBy: "Працює на базі {brand}"
2513
+ }, Ln = {
2500
2514
  sendMessage: "پیغام بھیجیں",
2501
2515
  send: "بھیجیں",
2502
2516
  close: "بند کریں",
@@ -2538,8 +2552,9 @@ const wa = {
2538
2552
  leadFormName: "نام",
2539
2553
  leadFormEmail: "ای میل",
2540
2554
  leadFormPhone: "فون",
2541
- leadFormMessage: "آپ کا پیغام"
2542
- }, _t = {
2555
+ leadFormMessage: "آپ کا پیغام",
2556
+ poweredBy: "بذریعہ {brand}"
2557
+ }, _n = {
2543
2558
  sendMessage: "Gửi tin nhắn",
2544
2559
  send: "Gửi",
2545
2560
  close: "Đóng",
@@ -2581,8 +2596,9 @@ const wa = {
2581
2596
  leadFormName: "Tên",
2582
2597
  leadFormEmail: "Email",
2583
2598
  leadFormPhone: "Điện thoại",
2584
- leadFormMessage: "Tin nhắn của bạn"
2585
- }, qt = {
2599
+ leadFormMessage: "Tin nhắn của bạn",
2600
+ poweredBy: "Được cung cấp bởi {brand}"
2601
+ }, qn = {
2586
2602
  sendMessage: "Anfon neges",
2587
2603
  send: "Anfon",
2588
2604
  close: "Cau",
@@ -2624,70 +2640,70 @@ const wa = {
2624
2640
  leadFormName: "Enw",
2625
2641
  leadFormEmail: "E-bost",
2626
2642
  leadFormPhone: "Ffôn",
2627
- leadFormMessage: "Eich neges"
2643
+ leadFormMessage: "Eich neges",
2644
+ poweredBy: "Wedi'i bweru gan {brand}"
2628
2645
  }, $e = {
2629
- af: wa,
2646
+ af: Ma,
2630
2647
  sq: Pa,
2631
- ar: Ca,
2632
- "ar-eg": La,
2648
+ "ar-eg": Ca,
2633
2649
  "ar-sa": Aa,
2634
- az: _a,
2635
- eu: qa,
2636
- be: Ia,
2637
- bn: Va,
2638
- bs: Na,
2639
- bg: ja,
2640
- ca: Da,
2641
- zh: Ra,
2650
+ az: La,
2651
+ eu: _a,
2652
+ be: qa,
2653
+ bn: Ia,
2654
+ bs: Va,
2655
+ bg: Na,
2656
+ ca: ja,
2657
+ zh: Da,
2642
2658
  hr: Ba,
2643
- cs: Ga,
2644
- da: Ua,
2645
- nl: Ka,
2646
- en: Oa,
2647
- et: Ya,
2648
- fi: Qa,
2649
- fr: Ha,
2650
- gl: Wa,
2651
- de: $a,
2652
- el: Za,
2653
- gu: Ja,
2654
- hi: Xa,
2655
- hu: et,
2656
- id: at,
2657
- it: tt,
2658
- ja: nt,
2659
- kn: it,
2660
- kk: ot,
2661
- ko: st,
2662
- lv: rt,
2663
- lt,
2664
- mk: ct,
2665
- ms: dt,
2666
- ml: ut,
2667
- mr: mt,
2668
- no: ht,
2669
- fa: gt,
2670
- pl: pt,
2671
- pt: bt,
2672
- pa: ft,
2673
- ro: kt,
2674
- ru: vt,
2675
- sr: yt,
2676
- sk: Ft,
2677
- sl: Tt,
2678
- es: Et,
2679
- sw: zt,
2680
- sv: St,
2681
- tl: xt,
2682
- ta: Mt,
2683
- te: wt,
2684
- th: Pt,
2685
- tr: Ct,
2686
- uk: Lt,
2687
- ur: At,
2688
- vi: _t,
2689
- cy: qt
2690
- }, Ae = [
2659
+ cs: Ra,
2660
+ da: Ga,
2661
+ nl: Ua,
2662
+ en: Ka,
2663
+ et: Oa,
2664
+ fi: Ya,
2665
+ fr: Qa,
2666
+ gl: Ha,
2667
+ de: Wa,
2668
+ el: $a,
2669
+ gu: Za,
2670
+ hi: Ja,
2671
+ hu: Xa,
2672
+ id: en,
2673
+ it: an,
2674
+ ja: nn,
2675
+ kn: tn,
2676
+ kk: on,
2677
+ ko: rn,
2678
+ lv: sn,
2679
+ lt: ln,
2680
+ mk: cn,
2681
+ ms: dn,
2682
+ ml: un,
2683
+ mr: mn,
2684
+ no: hn,
2685
+ fa: gn,
2686
+ pl: pn,
2687
+ pt: bn,
2688
+ pa: fn,
2689
+ ro: kn,
2690
+ ru: vn,
2691
+ sr: yn,
2692
+ sk: Fn,
2693
+ sl: Tn,
2694
+ es: En,
2695
+ sw: zn,
2696
+ sv: wn,
2697
+ tl: Sn,
2698
+ ta: xn,
2699
+ te: Mn,
2700
+ th: Pn,
2701
+ tr: Cn,
2702
+ uk: An,
2703
+ ur: Ln,
2704
+ vi: _n,
2705
+ cy: qn
2706
+ }, Le = [
2691
2707
  { value: "af", label: "Afrikaans", dir: "ltr" },
2692
2708
  { value: "sq", label: "Shqip", dir: "ltr" },
2693
2709
  { value: "ar-eg", label: "العربية (مصر)", dir: "rtl" },
@@ -2748,18 +2764,18 @@ const wa = {
2748
2764
  { value: "ur", label: "اردو", dir: "rtl" },
2749
2765
  { value: "vi", label: "Tiếng Việt", dir: "ltr" },
2750
2766
  { value: "cy", label: "Cymraeg", dir: "ltr" }
2751
- ], Ze = Ae.map(
2767
+ ], Ze = Le.map(
2752
2768
  (a) => a.value
2753
2769
  );
2754
2770
  function Je(a) {
2755
- return Ae.find((e) => e.value === a) || Ae.find((e) => e.value === "en");
2771
+ return Le.find((e) => e.value === a) || Le.find((e) => e.value === "en");
2756
2772
  }
2757
- function z(a, e) {
2773
+ function E(a, e) {
2758
2774
  return $e[a]?.[e] || $e.en[e] || e;
2759
2775
  }
2760
2776
  function ye(a, e = "en") {
2761
- const t = Array.isArray(a) ? a.filter((i) => Ze.includes(i)) : [];
2762
- return !t.includes(e) && Ze.includes(e) && t.unshift(e), t.length ? [...new Set(t)] : ["ar-sa"];
2777
+ const n = Array.isArray(a) ? a.filter((i) => Ze.includes(i)) : [];
2778
+ return !n.includes(e) && Ze.includes(e) && n.unshift(e), n.length ? [...new Set(n)] : ["ar-sa"];
2763
2779
  }
2764
2780
  const Xe = {
2765
2781
  id: null,
@@ -2806,21 +2822,21 @@ const Xe = {
2806
2822
  };
2807
2823
  function ve(a) {
2808
2824
  if (!a) return Xe;
2809
- const e = a, t = e.agent_type || e.agentType || de.TEXT, i = typeof e.use_text == "boolean" ? e.use_text : typeof e.useText == "boolean" ? e.useText : t !== de.VOICE, o = typeof e.use_voice == "boolean" ? e.use_voice : typeof e.useVoice == "boolean" ? e.useVoice : t === de.TEXT_AND_VOICE || t === de.CLOUD_AVATAR || t === de.DESKTOP_AVATAR, s = e.conversation || e.agent_customization?.conversation || {}, r = e.speech || e.agent_customization?.speech || {}, c = s.default_language || "ar-sa", l = ye(s.languages, c), d = e.widget || e.agent_customization?.widget || e.widget_customization || null, m = d?.appearance, u = d?.behavior, h = d, F = typeof m?.hide_branding == "boolean" ? !m.hide_branding : typeof m?.show_branding == "boolean" ? m.show_branding : !0, b = typeof m?.show_topbar_avatar_image == "boolean" ? m.show_topbar_avatar_image : typeof m?.showTopbarAvatarImage == "boolean" ? m.showTopbarAvatarImage : typeof d?.show_topbar_avatar_image == "boolean" ? d.show_topbar_avatar_image : typeof d?.showTopbarAvatarImage == "boolean" ? d.showTopbarAvatarImage : typeof e.show_topbar_avatar_image == "boolean" ? e.show_topbar_avatar_image : typeof e.showTopbarAvatarImage == "boolean" ? e.showTopbarAvatarImage : !0, M = u?.suggested_messages || d?.suggested_messages || s.suggested_messages || s.suggestedMessages || {}, S = typeof u?.default_open == "boolean" ? u.default_open : typeof u?.defaultOpen == "boolean" ? u.defaultOpen : typeof d?.default_open == "boolean" ? d.default_open : typeof d?.defaultOpen == "boolean" ? d.defaultOpen : typeof e.default_open == "boolean" ? e.default_open : typeof e.defaultOpen == "boolean" ? e.defaultOpen : !1, T = typeof m?.font == "string" ? m.font : typeof d?.font == "string" ? d.font : typeof e.font == "string" ? e.font : "Cairo", k = (() => {
2825
+ const e = a, n = e.agent_type || e.agentType || de.TEXT, i = typeof e.use_text == "boolean" ? e.use_text : typeof e.useText == "boolean" ? e.useText : n !== de.VOICE, o = typeof e.use_voice == "boolean" ? e.use_voice : typeof e.useVoice == "boolean" ? e.useVoice : n === de.TEXT_AND_VOICE || n === de.CLOUD_AVATAR || n === de.DESKTOP_AVATAR, r = e.conversation || e.agent_customization?.conversation || {}, s = e.speech || e.agent_customization?.speech || {}, d = r.default_language || "ar-sa", l = ye(r.languages, d), c = e.widget || e.agent_customization?.widget || e.widget_customization || null, m = c?.appearance, u = c?.behavior, h = c, F = typeof m?.hide_branding == "boolean" ? !m.hide_branding : typeof m?.show_branding == "boolean" ? m.show_branding : !0, b = typeof m?.show_topbar_avatar_image == "boolean" ? m.show_topbar_avatar_image : typeof m?.showTopbarAvatarImage == "boolean" ? m.showTopbarAvatarImage : typeof c?.show_topbar_avatar_image == "boolean" ? c.show_topbar_avatar_image : typeof c?.showTopbarAvatarImage == "boolean" ? c.showTopbarAvatarImage : typeof e.show_topbar_avatar_image == "boolean" ? e.show_topbar_avatar_image : typeof e.showTopbarAvatarImage == "boolean" ? e.showTopbarAvatarImage : !0, x = u?.suggested_messages || c?.suggested_messages || r.suggested_messages || r.suggestedMessages || {}, w = typeof u?.default_open == "boolean" ? u.default_open : typeof u?.defaultOpen == "boolean" ? u.defaultOpen : typeof c?.default_open == "boolean" ? c.default_open : typeof c?.defaultOpen == "boolean" ? c.defaultOpen : typeof e.default_open == "boolean" ? e.default_open : typeof e.defaultOpen == "boolean" ? e.defaultOpen : !1, T = typeof m?.font == "string" ? m.font : typeof c?.font == "string" ? c.font : typeof e.font == "string" ? e.font : "Cairo", k = (() => {
2810
2826
  const U = (T || "").trim().toLowerCase().replace(/[-_]/g, " ");
2811
2827
  return U === "readex pro" || U === "readex" ? "Readex Pro" : U === "noto sans" || U === "noto" || U === "noto sans arabic" ? "Noto Sans" : "Cairo";
2812
- })(), p = d?.consent || e.consent || e.consent_config || null, g = typeof p?.enabled == "boolean" ? p.enabled : !1, w = typeof p?.one_time == "boolean" ? p.one_time : typeof p?.oneTime == "boolean" ? p.oneTime : !0, E = p?.content || p?.body || {}, f = u?.conversation_ended_screen, P = {
2828
+ })(), p = c?.consent || e.consent || e.consent_config || null, g = typeof p?.enabled == "boolean" ? p.enabled : !1, M = typeof p?.one_time == "boolean" ? p.one_time : typeof p?.oneTime == "boolean" ? p.oneTime : !0, z = p?.content || p?.body || {}, f = u?.conversation_ended_screen, P = {
2813
2829
  post_chat_rating_enabled: typeof f?.post_chat_rating_enabled == "boolean" ? f.post_chat_rating_enabled : typeof u?.post_chat_rating_enabled == "boolean" ? u.post_chat_rating_enabled : !1,
2814
2830
  show_conversation_id: typeof f?.show_conversation_id == "boolean" ? f.show_conversation_id : typeof f?.showConversationId == "boolean" ? f.showConversationId : !0
2815
2831
  }, C = u?.welcome_bubble, _ = {
2816
2832
  enabled: typeof C?.enabled == "boolean" ? C.enabled : !1,
2817
2833
  delay_seconds: typeof C?.delay_seconds == "number" ? C.delay_seconds : 3,
2818
2834
  sound_enabled: typeof C?.sound_enabled == "boolean" ? C.sound_enabled : !1
2819
- }, x = m?.theme, j = {
2820
- mode: x?.mode === "light" ? "light" : "dark",
2821
- accent_color: typeof x?.accent_color == "string" ? x.accent_color : null,
2822
- end_call_button_color: typeof x?.end_call_button_color == "string" ? x.end_call_button_color : null
2823
- }, R = h ? {
2835
+ }, S = m?.theme, j = {
2836
+ mode: S?.mode === "light" ? "light" : "dark",
2837
+ accent_color: typeof S?.accent_color == "string" ? S.accent_color : null,
2838
+ end_call_button_color: typeof S?.end_call_button_color == "string" ? S.end_call_button_color : null
2839
+ }, B = h ? {
2824
2840
  appearance: {
2825
2841
  position: m?.position || "right",
2826
2842
  show_branding: F,
@@ -2830,24 +2846,24 @@ function ve(a) {
2830
2846
  theme: j
2831
2847
  },
2832
2848
  behavior: {
2833
- default_open: S,
2849
+ default_open: w,
2834
2850
  conversation_ended_screen: P,
2835
2851
  welcome_bubble: _,
2836
2852
  typing_indicator_enabled: typeof u?.typing_indicator_enabled == "boolean" ? u.typing_indicator_enabled : !0,
2837
- suggested_messages: M
2853
+ suggested_messages: x
2838
2854
  },
2839
2855
  consent: {
2840
2856
  enabled: g,
2841
- one_time: w,
2842
- content: E
2857
+ one_time: M,
2858
+ content: z
2843
2859
  }
2844
- } : void 0, D = e.consent || e.consent_config || null, L = s.welcome_message || s.welcomeMessage || e.welcome_message || e.welcomeMessage || {}, G = Object.fromEntries(
2845
- Object.entries(L).filter(([, U]) => typeof U == "string").map(([U, J]) => [U, J.slice(0, 1e3)])
2846
- ), N = typeof e.allow_interrupt == "boolean" ? e.allow_interrupt : typeof r.allow_interrupt == "boolean" ? r.allow_interrupt : !0, Y = typeof e.allow_welcome_message_interrupt == "boolean" ? e.allow_welcome_message_interrupt : typeof r.allow_welcome_message_interrupt == "boolean" ? r.allow_welcome_message_interrupt : !1, O = (typeof e.face_image == "string" ? e.face_image : null) || (typeof e.faceImage == "string" ? e.faceImage : null) || null;
2860
+ } : void 0, D = e.consent || e.consent_config || null, A = r.welcome_message || r.welcomeMessage || e.welcome_message || e.welcomeMessage || {}, G = Object.fromEntries(
2861
+ Object.entries(A).filter(([, U]) => typeof U == "string").map(([U, J]) => [U, J.slice(0, 1e3)])
2862
+ ), N = typeof e.allow_interrupt == "boolean" ? e.allow_interrupt : typeof s.allow_interrupt == "boolean" ? s.allow_interrupt : !0, Y = typeof e.allow_welcome_message_interrupt == "boolean" ? e.allow_welcome_message_interrupt : typeof s.allow_welcome_message_interrupt == "boolean" ? s.allow_welcome_message_interrupt : !1, O = (typeof e.face_image == "string" ? e.face_image : null) || (typeof e.faceImage == "string" ? e.faceImage : null) || null;
2847
2863
  return {
2848
2864
  id: e.id || null,
2849
2865
  name: e.name || Xe.name,
2850
- agentType: t,
2866
+ agentType: n,
2851
2867
  useText: i,
2852
2868
  useVoice: o,
2853
2869
  faceImage: O,
@@ -2855,13 +2871,13 @@ function ve(a) {
2855
2871
  allowWelcomeMessageInterrupt: Y,
2856
2872
  welcomeMessages: G,
2857
2873
  languages: l,
2858
- defaultLanguage: l.includes(c) ? c : l[0],
2874
+ defaultLanguage: l.includes(d) ? d : l[0],
2859
2875
  conversation: {
2860
- default_language: c,
2876
+ default_language: d,
2861
2877
  languages: l,
2862
- suggested_messages: M
2878
+ suggested_messages: x
2863
2879
  },
2864
- widget: R || void 0,
2880
+ widget: B || void 0,
2865
2881
  consent: D ? {
2866
2882
  enabled: D.enabled ?? !1,
2867
2883
  title: D.title || void 0,
@@ -2873,10 +2889,10 @@ function ve(a) {
2873
2889
  } : void 0
2874
2890
  };
2875
2891
  }
2876
- async function It({
2892
+ async function In({
2877
2893
  restUrl: a,
2878
2894
  identifier: e,
2879
- withCredentials: t = !1,
2895
+ withCredentials: n = !1,
2880
2896
  signal: i
2881
2897
  }) {
2882
2898
  if (!a) throw new Error("Missing restUrl");
@@ -2884,7 +2900,7 @@ async function It({
2884
2900
  const o = await fetch(`${a}/agent/${e}/customization`, {
2885
2901
  method: "GET",
2886
2902
  mode: "cors",
2887
- credentials: t ? "include" : "omit",
2903
+ credentials: n ? "include" : "omit",
2888
2904
  headers: {
2889
2905
  Accept: "application/json"
2890
2906
  },
@@ -2892,27 +2908,27 @@ async function It({
2892
2908
  });
2893
2909
  if (!o.ok)
2894
2910
  throw new Error(`Failed to load agent customization: ${o.status}`);
2895
- const s = await o.json();
2911
+ const r = await o.json();
2896
2912
  return ve({
2897
- id: s.id,
2898
- name: s.name,
2899
- company_name: s.company_name,
2900
- agent_type: s.agent_type,
2901
- use_voice: s.use_voice,
2902
- use_text: s.use_text,
2903
- face_image: s.face_image,
2904
- conversation: s.conversation,
2905
- widget: s.widget,
2906
- allow_interrupt: s.allow_interrupt,
2907
- allow_welcome_message_interrupt: s.allow_welcome_message_interrupt,
2908
- welcome_message: s.welcome_message
2913
+ id: r.id,
2914
+ name: r.name,
2915
+ company_name: r.company_name,
2916
+ agent_type: r.agent_type,
2917
+ use_voice: r.use_voice,
2918
+ use_text: r.use_text,
2919
+ face_image: r.face_image,
2920
+ conversation: r.conversation,
2921
+ widget: r.widget,
2922
+ allow_interrupt: r.allow_interrupt,
2923
+ allow_welcome_message_interrupt: r.allow_welcome_message_interrupt,
2924
+ welcome_message: r.welcome_message
2909
2925
  });
2910
2926
  }
2911
- async function li({ restUrl: a, apiKey: e, agentId: t, signal: i }) {
2927
+ async function si({ restUrl: a, apiKey: e, agentId: n, signal: i }) {
2912
2928
  if (!a) throw new Error("Missing restUrl");
2913
- const o = e || t;
2929
+ const o = e || n;
2914
2930
  if (!o) throw new Error("Provide one of apiKey or agentId");
2915
- const s = await fetch(`${a}/agent/${o}`, {
2931
+ const r = await fetch(`${a}/agent/${o}`, {
2916
2932
  method: "GET",
2917
2933
  mode: "cors",
2918
2934
  credentials: "omit",
@@ -2921,21 +2937,21 @@ async function li({ restUrl: a, apiKey: e, agentId: t, signal: i }) {
2921
2937
  },
2922
2938
  signal: i
2923
2939
  });
2924
- if (!s.ok) {
2925
- let r = `HTTP ${s.status}`;
2940
+ if (!r.ok) {
2941
+ let s = `HTTP ${r.status}`;
2926
2942
  try {
2927
- const l = await s.json();
2928
- r = l?.detail || l?.message || r;
2943
+ const l = await r.json();
2944
+ s = l?.detail || l?.message || s;
2929
2945
  } catch {
2930
2946
  }
2931
- throw new Error(r);
2947
+ throw new Error(s);
2932
2948
  }
2933
- return ve(await s.json());
2949
+ return ve(await r.json());
2934
2950
  }
2935
- function Vt(a, e) {
2951
+ function Vn(a, e) {
2936
2952
  if (!e) return a;
2937
- let { useVoice: t, useText: i } = a;
2938
- return typeof e.use_voice == "boolean" && (t = e.use_voice), typeof e.use_text == "boolean" && (i = e.use_text), t === a.useVoice && i === a.useText ? a : { ...a, useVoice: t, useText: i };
2953
+ let { useVoice: n, useText: i } = a;
2954
+ return typeof e.use_voice == "boolean" && (n = e.use_voice), typeof e.use_text == "boolean" && (i = e.use_text), n === a.useVoice && i === a.useText ? a : { ...a, useVoice: n, useText: i };
2939
2955
  }
2940
2956
  function Ee(a) {
2941
2957
  return a.agentType === de.CLOUD_AVATAR || a.agentType === de.DESKTOP_AVATAR ? "avatar" : a.useText && a.useVoice ? "text_and_voice" : a.useVoice ? "voice" : "text";
@@ -2946,23 +2962,23 @@ function Ee(a) {
2946
2962
  * This source code is licensed under the ISC license.
2947
2963
  * See the LICENSE file in the root directory of this source tree.
2948
2964
  */
2949
- const ca = (...a) => a.filter((e, t, i) => !!e && e.trim() !== "" && i.indexOf(e) === t).join(" ").trim();
2965
+ const ca = (...a) => a.filter((e, n, i) => !!e && e.trim() !== "" && i.indexOf(e) === n).join(" ").trim();
2950
2966
  /**
2951
2967
  * @license lucide-react v1.24.0 - ISC
2952
2968
  *
2953
2969
  * This source code is licensed under the ISC license.
2954
2970
  * See the LICENSE file in the root directory of this source tree.
2955
2971
  */
2956
- const Nt = (a) => a.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
2972
+ const Nn = (a) => a.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
2957
2973
  /**
2958
2974
  * @license lucide-react v1.24.0 - ISC
2959
2975
  *
2960
2976
  * This source code is licensed under the ISC license.
2961
2977
  * See the LICENSE file in the root directory of this source tree.
2962
2978
  */
2963
- const jt = (a) => a.replace(
2979
+ const jn = (a) => a.replace(
2964
2980
  /^([A-Z])|[\s-_]+(\w)/g,
2965
- (e, t, i) => i ? i.toUpperCase() : t.toLowerCase()
2981
+ (e, n, i) => i ? i.toUpperCase() : n.toLowerCase()
2966
2982
  );
2967
2983
  /**
2968
2984
  * @license lucide-react v1.24.0 - ISC
@@ -2971,7 +2987,7 @@ const jt = (a) => a.replace(
2971
2987
  * See the LICENSE file in the root directory of this source tree.
2972
2988
  */
2973
2989
  const ea = (a) => {
2974
- const e = jt(a);
2990
+ const e = jn(a);
2975
2991
  return e.charAt(0).toUpperCase() + e.slice(1);
2976
2992
  };
2977
2993
  /**
@@ -2997,36 +3013,36 @@ var Ce = {
2997
3013
  * This source code is licensed under the ISC license.
2998
3014
  * See the LICENSE file in the root directory of this source tree.
2999
3015
  */
3000
- const Dt = (a) => {
3016
+ const Dn = (a) => {
3001
3017
  for (const e in a)
3002
3018
  if (e.startsWith("aria-") || e === "role" || e === "title")
3003
3019
  return !0;
3004
3020
  return !1;
3005
- }, Rt = Ma({}), Bt = () => xa(Rt), Gt = la(
3006
- ({ color: a, size: e, strokeWidth: t, absoluteStrokeWidth: i, className: o = "", children: s, iconNode: r, ...c }, l) => {
3021
+ }, Bn = xa({}), Rn = () => Sa(Bn), Gn = la(
3022
+ ({ color: a, size: e, strokeWidth: n, absoluteStrokeWidth: i, className: o = "", children: r, iconNode: s, ...d }, l) => {
3007
3023
  const {
3008
- size: d = 24,
3024
+ size: c = 24,
3009
3025
  strokeWidth: m = 2,
3010
3026
  absoluteStrokeWidth: u = !1,
3011
3027
  color: h = "currentColor",
3012
3028
  className: F = ""
3013
- } = Bt() ?? {}, b = i ?? u ? Number(t ?? m) * 24 / Number(e ?? d) : t ?? m;
3014
- return Le(
3029
+ } = Rn() ?? {}, b = i ?? u ? Number(n ?? m) * 24 / Number(e ?? c) : n ?? m;
3030
+ return Ae(
3015
3031
  "svg",
3016
3032
  {
3017
3033
  ref: l,
3018
3034
  ...Ce,
3019
- width: e ?? d ?? Ce.width,
3020
- height: e ?? d ?? Ce.height,
3035
+ width: e ?? c ?? Ce.width,
3036
+ height: e ?? c ?? Ce.height,
3021
3037
  stroke: a ?? h,
3022
3038
  strokeWidth: b,
3023
3039
  className: ca("lucide", F, o),
3024
- ...!s && !Dt(c) && { "aria-hidden": "true" },
3025
- ...c
3040
+ ...!r && !Dn(d) && { "aria-hidden": "true" },
3041
+ ...d
3026
3042
  },
3027
3043
  [
3028
- ...r.map(([M, S]) => Le(M, S)),
3029
- ...Array.isArray(s) ? s : [s]
3044
+ ...s.map(([x, w]) => Ae(x, w)),
3045
+ ...Array.isArray(r) ? r : [r]
3030
3046
  ]
3031
3047
  );
3032
3048
  }
@@ -3038,19 +3054,19 @@ const Dt = (a) => {
3038
3054
  * See the LICENSE file in the root directory of this source tree.
3039
3055
  */
3040
3056
  const H = (a, e) => {
3041
- const t = la(
3042
- ({ className: i, ...o }, s) => Le(Gt, {
3043
- ref: s,
3057
+ const n = la(
3058
+ ({ className: i, ...o }, r) => Ae(Gn, {
3059
+ ref: r,
3044
3060
  iconNode: e,
3045
3061
  className: ca(
3046
- `lucide-${Nt(ea(a))}`,
3062
+ `lucide-${Nn(ea(a))}`,
3047
3063
  `lucide-${a}`,
3048
3064
  i
3049
3065
  ),
3050
3066
  ...o
3051
3067
  })
3052
3068
  );
3053
- return t.displayName = ea(a), t;
3069
+ return n.displayName = ea(a), n;
3054
3070
  };
3055
3071
  /**
3056
3072
  * @license lucide-react v1.24.0 - ISC
@@ -3058,94 +3074,94 @@ const H = (a, e) => {
3058
3074
  * This source code is licensed under the ISC license.
3059
3075
  * See the LICENSE file in the root directory of this source tree.
3060
3076
  */
3061
- const Ut = [
3077
+ const Un = [
3062
3078
  ["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
3063
3079
  ["path", { d: "M12 19V5", key: "x0mq9r" }]
3064
- ], Kt = H("arrow-up", Ut);
3080
+ ], Kn = H("arrow-up", Un);
3065
3081
  /**
3066
3082
  * @license lucide-react v1.24.0 - ISC
3067
3083
  *
3068
3084
  * This source code is licensed under the ISC license.
3069
3085
  * See the LICENSE file in the root directory of this source tree.
3070
3086
  */
3071
- const Ot = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], Yt = H("chevron-left", Ot);
3087
+ const On = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], Yn = H("chevron-left", On);
3072
3088
  /**
3073
3089
  * @license lucide-react v1.24.0 - ISC
3074
3090
  *
3075
3091
  * This source code is licensed under the ISC license.
3076
3092
  * See the LICENSE file in the root directory of this source tree.
3077
3093
  */
3078
- const Qt = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], da = H("chevron-down", Qt);
3094
+ const Qn = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], da = H("chevron-down", Qn);
3079
3095
  /**
3080
3096
  * @license lucide-react v1.24.0 - ISC
3081
3097
  *
3082
3098
  * This source code is licensed under the ISC license.
3083
3099
  * See the LICENSE file in the root directory of this source tree.
3084
3100
  */
3085
- const Ht = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]], Wt = H("chevron-up", Ht);
3101
+ const Hn = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]], Wn = H("chevron-up", Hn);
3086
3102
  /**
3087
3103
  * @license lucide-react v1.24.0 - ISC
3088
3104
  *
3089
3105
  * This source code is licensed under the ISC license.
3090
3106
  * See the LICENSE file in the root directory of this source tree.
3091
3107
  */
3092
- const $t = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], ze = H("loader-circle", $t);
3108
+ const $n = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], ze = H("loader-circle", $n);
3093
3109
  /**
3094
3110
  * @license lucide-react v1.24.0 - ISC
3095
3111
  *
3096
3112
  * This source code is licensed under the ISC license.
3097
3113
  * See the LICENSE file in the root directory of this source tree.
3098
3114
  */
3099
- const Zt = [
3115
+ const Zn = [
3100
3116
  ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
3101
3117
  ["path", { d: "m21 3-7 7", key: "1l2asr" }],
3102
3118
  ["path", { d: "m3 21 7-7", key: "tjx5ai" }],
3103
3119
  ["path", { d: "M9 21H3v-6", key: "wtvkvv" }]
3104
- ], Jt = H("maximize-2", Zt);
3120
+ ], Jn = H("maximize-2", Zn);
3105
3121
  /**
3106
3122
  * @license lucide-react v1.24.0 - ISC
3107
3123
  *
3108
3124
  * This source code is licensed under the ISC license.
3109
3125
  * See the LICENSE file in the root directory of this source tree.
3110
3126
  */
3111
- const Xt = [
3127
+ const Xn = [
3112
3128
  ["path", { d: "M12 19v3", key: "npa21l" }],
3113
3129
  ["path", { d: "M15 9.34V5a3 3 0 0 0-5.68-1.33", key: "1gzdoj" }],
3114
3130
  ["path", { d: "M16.95 16.95A7 7 0 0 1 5 12v-2", key: "cqa7eg" }],
3115
3131
  ["path", { d: "M18.89 13.23A7 7 0 0 0 19 12v-2", key: "16hl24" }],
3116
3132
  ["path", { d: "m2 2 20 20", key: "1ooewy" }],
3117
3133
  ["path", { d: "M9 9v3a3 3 0 0 0 5.12 2.12", key: "r2i35w" }]
3118
- ], Ve = H("mic-off", Xt);
3134
+ ], Ve = H("mic-off", Xn);
3119
3135
  /**
3120
3136
  * @license lucide-react v1.24.0 - ISC
3121
3137
  *
3122
3138
  * This source code is licensed under the ISC license.
3123
3139
  * See the LICENSE file in the root directory of this source tree.
3124
3140
  */
3125
- const en = [
3141
+ const et = [
3126
3142
  ["path", { d: "M12 19v3", key: "npa21l" }],
3127
3143
  ["path", { d: "M19 10v2a7 7 0 0 1-14 0v-2", key: "1vc78b" }],
3128
3144
  ["rect", { x: "9", y: "2", width: "6", height: "13", rx: "3", key: "s6n7sd" }]
3129
- ], Se = H("mic", en);
3145
+ ], we = H("mic", et);
3130
3146
  /**
3131
3147
  * @license lucide-react v1.24.0 - ISC
3132
3148
  *
3133
3149
  * This source code is licensed under the ISC license.
3134
3150
  * See the LICENSE file in the root directory of this source tree.
3135
3151
  */
3136
- const an = [
3152
+ const at = [
3137
3153
  ["path", { d: "m14 10 7-7", key: "oa77jy" }],
3138
3154
  ["path", { d: "M20 10h-6V4", key: "mjg0md" }],
3139
3155
  ["path", { d: "m3 21 7-7", key: "tjx5ai" }],
3140
3156
  ["path", { d: "M4 14h6v6", key: "rmj7iw" }]
3141
- ], xe = H("minimize-2", an);
3157
+ ], Se = H("minimize-2", at);
3142
3158
  /**
3143
3159
  * @license lucide-react v1.24.0 - ISC
3144
3160
  *
3145
3161
  * This source code is licensed under the ISC license.
3146
3162
  * See the LICENSE file in the root directory of this source tree.
3147
3163
  */
3148
- const tn = [
3164
+ const nt = [
3149
3165
  [
3150
3166
  "path",
3151
3167
  {
@@ -3161,14 +3177,14 @@ const tn = [
3161
3177
  key: "10hv5p"
3162
3178
  }
3163
3179
  ]
3164
- ], Ne = H("phone-off", tn);
3180
+ ], Ne = H("phone-off", nt);
3165
3181
  /**
3166
3182
  * @license lucide-react v1.24.0 - ISC
3167
3183
  *
3168
3184
  * This source code is licensed under the ISC license.
3169
3185
  * See the LICENSE file in the root directory of this source tree.
3170
3186
  */
3171
- const nn = [
3187
+ const tt = [
3172
3188
  [
3173
3189
  "path",
3174
3190
  {
@@ -3176,24 +3192,24 @@ const nn = [
3176
3192
  key: "9njp5v"
3177
3193
  }
3178
3194
  ]
3179
- ], je = H("phone", nn);
3195
+ ], je = H("phone", tt);
3180
3196
  /**
3181
3197
  * @license lucide-react v1.24.0 - ISC
3182
3198
  *
3183
3199
  * This source code is licensed under the ISC license.
3184
3200
  * See the LICENSE file in the root directory of this source tree.
3185
3201
  */
3186
- const on = [
3202
+ const it = [
3187
3203
  ["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
3188
3204
  ["path", { d: "M3 3v5h5", key: "1xhq8a" }]
3189
- ], sn = H("rotate-ccw", on);
3205
+ ], ot = H("rotate-ccw", it);
3190
3206
  /**
3191
3207
  * @license lucide-react v1.24.0 - ISC
3192
3208
  *
3193
3209
  * This source code is licensed under the ISC license.
3194
3210
  * See the LICENSE file in the root directory of this source tree.
3195
3211
  */
3196
- const rn = [
3212
+ const rt = [
3197
3213
  [
3198
3214
  "path",
3199
3215
  {
@@ -3201,43 +3217,43 @@ const rn = [
3201
3217
  key: "r04s7s"
3202
3218
  }
3203
3219
  ]
3204
- ], ln = H("star", rn);
3220
+ ], st = H("star", rt);
3205
3221
  /**
3206
3222
  * @license lucide-react v1.24.0 - ISC
3207
3223
  *
3208
3224
  * This source code is licensed under the ISC license.
3209
3225
  * See the LICENSE file in the root directory of this source tree.
3210
3226
  */
3211
- const cn = [
3227
+ const lt = [
3212
3228
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
3213
3229
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
3214
- ], De = H("x", cn), oe = () => {
3215
- }, dn = 767;
3230
+ ], De = H("x", lt), re = () => {
3231
+ }, ct = 767;
3216
3232
  function _e() {
3217
- return typeof window < "u" && window.innerWidth <= dn;
3233
+ return typeof window < "u" && window.innerWidth <= ct;
3218
3234
  }
3219
3235
  function V(...a) {
3220
3236
  return a.filter(Boolean).join(" ");
3221
3237
  }
3222
- function un(a) {
3238
+ function dt(a) {
3223
3239
  const e = (a || "").trim().toLowerCase().replace(/[-_]/g, " ");
3224
3240
  return e === "readex pro" || e === "readex" ? "'Readex Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif" : e === "noto sans" || e === "noto" || e === "noto sans arabic" ? "'Noto Sans', 'Noto Sans Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif" : "'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif";
3225
3241
  }
3226
3242
  function aa(a) {
3227
3243
  if (!a) return "#ffffff";
3228
3244
  const e = a.replace("#", "").trim();
3229
- let t = e;
3230
- if (e.length === 3 && (t = e.split("").map((c) => c + c).join("")), t.length < 6) return "#ffffff";
3231
- const i = parseInt(t.substring(0, 2), 16), o = parseInt(t.substring(2, 4), 16), s = parseInt(t.substring(4, 6), 16);
3232
- return Number.isNaN(i) || Number.isNaN(o) || Number.isNaN(s) ? "#ffffff" : (i * 299 + o * 587 + s * 114) / 1e3 >= 128 ? "#000000" : "#ffffff";
3245
+ let n = e;
3246
+ if (e.length === 3 && (n = e.split("").map((d) => d + d).join("")), n.length < 6) return "#ffffff";
3247
+ const i = parseInt(n.substring(0, 2), 16), o = parseInt(n.substring(2, 4), 16), r = parseInt(n.substring(4, 6), 16);
3248
+ return Number.isNaN(i) || Number.isNaN(o) || Number.isNaN(r) ? "#ffffff" : (i * 299 + o * 587 + r * 114) / 1e3 >= 128 ? "#000000" : "#ffffff";
3233
3249
  }
3234
- function Re(a) {
3250
+ function Be(a) {
3235
3251
  const e = {
3236
- "--rqmii-font-family": un(a?.font)
3237
- }, t = a?.theme?.accent_color?.trim();
3238
- if (t) {
3239
- const o = aa(t);
3240
- e["--rqmii-accent"] = t, e["--rqmii-accent-text"] = o, e["--rqmii-message-user"] = t, e["--rqmii-message-user-text"] = o;
3252
+ "--rqmii-font-family": dt(a?.font)
3253
+ }, n = a?.theme?.accent_color?.trim();
3254
+ if (n) {
3255
+ const o = aa(n);
3256
+ e["--rqmii-accent"] = n, e["--rqmii-accent-text"] = o, e["--rqmii-message-user"] = n, e["--rqmii-message-user-text"] = o;
3241
3257
  }
3242
3258
  const i = a?.theme?.end_call_button_color?.trim();
3243
3259
  if (i) {
@@ -3246,13 +3262,13 @@ function Re(a) {
3246
3262
  }
3247
3263
  return e;
3248
3264
  }
3249
- function mn(a) {
3265
+ function ut(a) {
3250
3266
  const e = (a || "").trim().toLowerCase().replace(/[-_]/g, " ");
3251
3267
  return e === "readex pro" || e === "readex" ? "https://fonts.googleapis.com/css2?family=Readex+Pro:wght@400;500;600;700&display=swap" : e === "noto sans" || e === "noto" || e === "noto sans arabic" ? "https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;500;600;700&family=Noto+Sans+Arabic:wght@400;500;600;700&display=swap" : "https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700&display=swap";
3252
3268
  }
3253
3269
  function ua(a) {
3254
3270
  if (typeof document > "u") return;
3255
- const e = mn(a);
3271
+ const e = ut(a);
3256
3272
  if (document.querySelector(`link[data-rqmii-font="${e}"]`)) return;
3257
3273
  const i = document.createElement("link");
3258
3274
  i.rel = "stylesheet", i.href = e, i.setAttribute("data-rqmii-font", e), document.head.appendChild(i);
@@ -3260,195 +3276,208 @@ function ua(a) {
3260
3276
  function Z(a) {
3261
3277
  return "";
3262
3278
  }
3263
- function re(a) {
3279
+ function oe(a) {
3264
3280
  return a.startsWith("ar") || ["fa", "ur", "he"].includes(a) ? "rtl" : "ltr";
3265
3281
  }
3266
- function Be(a) {
3267
- const e = Math.floor(a / 60).toString().padStart(2, "0"), t = (a % 60).toString().padStart(2, "0");
3268
- return `${e}:${t}`;
3282
+ function Re(a) {
3283
+ const e = Math.floor(a / 60).toString().padStart(2, "0"), n = (a % 60).toString().padStart(2, "0");
3284
+ return `${e}:${n}`;
3269
3285
  }
3270
- function hn(a = !0) {
3271
- const [e, t] = y(0);
3286
+ function mt(a = !0) {
3287
+ const [e, n] = y(0);
3272
3288
  return I(() => {
3273
3289
  if (!a) return;
3274
- const i = setInterval(() => t((o) => o + 1), 1e3);
3290
+ const i = setInterval(() => n((o) => o + 1), 1e3);
3275
3291
  return () => clearInterval(i);
3276
3292
  }, [a]), e;
3277
3293
  }
3278
- function gn() {
3294
+ function ht() {
3279
3295
  const [a, e] = y(null);
3280
3296
  return I(() => {
3281
- const t = window.visualViewport;
3282
- if (!t) return;
3283
- const i = () => e(t.height);
3284
- return i(), t.addEventListener("resize", i), t.addEventListener("scroll", i), () => {
3285
- t.removeEventListener("resize", i), t.removeEventListener("scroll", i);
3297
+ const n = window.visualViewport;
3298
+ if (!n) return;
3299
+ const i = () => e(n.height);
3300
+ return i(), n.addEventListener("resize", i), n.addEventListener("scroll", i), () => {
3301
+ n.removeEventListener("resize", i), n.removeEventListener("scroll", i);
3286
3302
  };
3287
3303
  }, []), a;
3288
3304
  }
3289
- function pn(a, e) {
3290
- const t = B([]);
3291
- t.current = a.match(/\S+\s*/g) || [a];
3305
+ function gt(a, e) {
3306
+ const n = R([]);
3307
+ n.current = a.match(/\S+\s*/g) || [a];
3292
3308
  const [i, o] = y(
3293
- () => e ? Math.min(1, t.current.length) : t.current.length
3309
+ () => e ? Math.min(1, n.current.length) : n.current.length
3294
3310
  );
3295
3311
  return I(() => {
3296
3312
  if (!e || !a) {
3297
- o(t.current.length);
3313
+ o(n.current.length);
3298
3314
  return;
3299
3315
  }
3300
- if (o((r) => Math.max(1, r)), t.current.length <= 1) return;
3301
- const s = setInterval(() => {
3302
- o((r) => r >= t.current.length ? (clearInterval(s), r) : r + 1);
3316
+ if (o((s) => Math.max(1, s)), n.current.length <= 1) return;
3317
+ const r = setInterval(() => {
3318
+ o((s) => s >= n.current.length ? (clearInterval(r), s) : s + 1);
3303
3319
  }, 50);
3304
- return () => clearInterval(s);
3305
- }, [a, e]), t.current.slice(0, i).join("");
3320
+ return () => clearInterval(r);
3321
+ }, [a, e]), n.current.slice(0, i).join("");
3306
3322
  }
3307
- const bn = A.lazy(() => import("./Orb-BLYExpBk.js").then((a) => ({ default: a.RqmiiOrb }))), Ge = A.memo(function({ language: e, languages: t, onChange: i }) {
3308
- const [o, s] = y(!1), r = B(null), c = Je(e), l = ye(t, e).map((d) => Je(d)).filter(Boolean);
3323
+ const pt = L.lazy(() => import("./Orb-BLYExpBk.js").then((a) => ({ default: a.RqmiiOrb }))), Ge = L.memo(function({ language: e, languages: n, onChange: i }) {
3324
+ const [o, r] = y(!1), s = R(null), d = Je(e), l = ye(n, e).map((c) => Je(c)).filter(Boolean);
3309
3325
  return I(() => {
3310
3326
  if (!o) return;
3311
- const d = (m) => {
3312
- r.current?.contains(m.target) || s(!1);
3327
+ const c = (m) => {
3328
+ s.current?.contains(m.target) || r(!1);
3313
3329
  };
3314
- return document.addEventListener("mousedown", d), () => document.removeEventListener("mousedown", d);
3315
- }, [o]), /* @__PURE__ */ v("div", { className: "rqmii-chat-language", ref: r, children: [
3316
- /* @__PURE__ */ v("button", { type: "button", className: "rqmii-chat-pill", onClick: () => s((d) => !d), children: [
3317
- /* @__PURE__ */ n("span", { children: c?.label || e }),
3318
- /* @__PURE__ */ n(da, { size: 16 })
3330
+ return document.addEventListener("mousedown", c), () => document.removeEventListener("mousedown", c);
3331
+ }, [o]), /* @__PURE__ */ v("div", { className: "rqmii-chat-language", ref: s, children: [
3332
+ /* @__PURE__ */ v("button", { type: "button", className: "rqmii-chat-pill", onClick: () => r((c) => !c), children: [
3333
+ /* @__PURE__ */ t("span", { children: d?.label || e }),
3334
+ /* @__PURE__ */ t(da, { size: 16 })
3319
3335
  ] }),
3320
- o && l.length > 1 && /* @__PURE__ */ n("div", { className: "rqmii-chat-language-menu", children: l.map((d) => /* @__PURE__ */ n(
3336
+ o && l.length > 1 && /* @__PURE__ */ t("div", { className: "rqmii-chat-language-menu", children: l.map((c) => /* @__PURE__ */ t(
3321
3337
  "button",
3322
3338
  {
3323
3339
  type: "button",
3324
- className: V("rqmii-chat-language-item", d.value === e && "is-selected"),
3340
+ className: V("rqmii-chat-language-item", c.value === e && "is-selected"),
3325
3341
  onClick: () => {
3326
- i(d.value), s(!1);
3342
+ i(c.value), r(!1);
3327
3343
  },
3328
- children: d.label
3344
+ children: c.label
3329
3345
  },
3330
- d.value
3346
+ c.value
3331
3347
  )) })
3332
3348
  ] });
3333
- }), ue = A.memo(function({ language: e = "en", brand: t = "rqmii", agent: i }) {
3334
- const o = i?.widget?.appearance, s = o?.show_branding !== !1, r = o?.footer_content?.[e], c = !!r?.trim();
3335
- return !s && !c ? /* @__PURE__ */ n("div", { style: { padding: 11 } }) : /* @__PURE__ */ v("div", { className: "rqmii-chat-footer", children: [
3336
- s && /* @__PURE__ */ v("p", { children: [
3337
- "Powered by ",
3338
- /* @__PURE__ */ n("strong", { children: t })
3339
- ] }),
3340
- c && /* @__PURE__ */ n("p", { children: r })
3349
+ }), ue = L.memo(function({ language: e = "en", brand: n = "rqmii", agent: i }) {
3350
+ const o = i?.widget?.appearance, r = o?.show_branding !== !1, s = o?.footer_content?.[e], d = !!s?.trim();
3351
+ if (!r && !d) return /* @__PURE__ */ t("div", { style: { padding: 11 } });
3352
+ const l = E(e, "poweredBy"), c = oe(e);
3353
+ return /* @__PURE__ */ v("div", { className: "rqmii-chat-footer", dir: c, children: [
3354
+ r && (() => {
3355
+ if (l.includes("{brand}")) {
3356
+ const u = l.split("{brand}");
3357
+ return /* @__PURE__ */ v("p", { dir: c, children: [
3358
+ u[0],
3359
+ /* @__PURE__ */ t("strong", { children: n }),
3360
+ u[1]
3361
+ ] });
3362
+ }
3363
+ return /* @__PURE__ */ v("p", { dir: c, children: [
3364
+ l,
3365
+ " ",
3366
+ /* @__PURE__ */ t("strong", { children: n })
3367
+ ] });
3368
+ })(),
3369
+ d && /* @__PURE__ */ t("p", { dir: c, children: s })
3341
3370
  ] });
3342
- }), te = A.memo(function({
3371
+ }), ne = L.memo(function({
3343
3372
  agent: e,
3344
- size: t = "large",
3373
+ size: n = "large",
3345
3374
  active: i = !1,
3346
3375
  className: o = ""
3347
3376
  }) {
3348
- const s = e?.faceImage, r = !s || s === "orb";
3349
- return /* @__PURE__ */ n(
3377
+ const r = e?.faceImage, s = !r || r === "orb";
3378
+ return /* @__PURE__ */ t(
3350
3379
  "div",
3351
3380
  {
3352
3381
  className: V(
3353
3382
  "rqmii-agent-avatar",
3354
- `rqmii-agent-avatar--${t}`,
3383
+ `rqmii-agent-avatar--${n}`,
3355
3384
  i && "is-active",
3356
- r && "is-orb",
3385
+ s && "is-orb",
3357
3386
  o
3358
3387
  ),
3359
- children: r ? /* @__PURE__ */ n(A.Suspense, { fallback: null, children: /* @__PURE__ */ n(bn, { className: "rqmii-agent-avatar-orb" }) }) : /* @__PURE__ */ n(
3388
+ children: s ? /* @__PURE__ */ t(L.Suspense, { fallback: null, children: /* @__PURE__ */ t(pt, { className: "rqmii-agent-avatar-orb" }) }) : /* @__PURE__ */ t(
3360
3389
  "img",
3361
3390
  {
3362
- src: s,
3391
+ src: r,
3363
3392
  alt: e?.name || "Agent"
3364
3393
  }
3365
3394
  )
3366
3395
  }
3367
3396
  );
3368
- }), ma = A.memo(function({ agent: e, onClick: t, className: i = "", position: o = "fixed", active: s = !1 }) {
3369
- return /* @__PURE__ */ n("button", { type: "button", className: V("rqmii-chat-open-button", o === "fixed" && "is-fixed", i), onClick: t, "aria-label": "Open chat", children: /* @__PURE__ */ n(te, { agent: e, size: "button", active: s }) });
3397
+ }), ma = L.memo(function({ agent: e, onClick: n, className: i = "", position: o = "fixed", active: r = !1 }) {
3398
+ return /* @__PURE__ */ t("button", { type: "button", className: V("rqmii-chat-open-button", o === "fixed" && "is-fixed", i), onClick: n, "aria-label": "Open chat", children: /* @__PURE__ */ t(ne, { agent: e, size: "button", active: r }) });
3370
3399
  });
3371
- function fn() {
3400
+ function bt() {
3372
3401
  try {
3373
3402
  const a = window.AudioContext || window.webkitAudioContext;
3374
3403
  if (!a) return;
3375
- const e = new a(), t = e.currentTime, i = e.createOscillator(), o = e.createGain();
3376
- i.type = "sine", i.frequency.setValueAtTime(880, t), i.frequency.setValueAtTime(1180, t + 0.12), o.gain.setValueAtTime(1e-4, t), o.gain.exponentialRampToValueAtTime(0.18, t + 0.02), o.gain.exponentialRampToValueAtTime(1e-4, t + 0.32), i.connect(o), o.connect(e.destination), i.start(t), i.stop(t + 0.34), i.onended = () => {
3404
+ const e = new a(), n = e.currentTime, i = e.createOscillator(), o = e.createGain();
3405
+ i.type = "sine", i.frequency.setValueAtTime(880, n), i.frequency.setValueAtTime(1180, n + 0.12), o.gain.setValueAtTime(1e-4, n), o.gain.exponentialRampToValueAtTime(0.18, n + 0.02), o.gain.exponentialRampToValueAtTime(1e-4, n + 0.32), i.connect(o), o.connect(e.destination), i.start(n), i.stop(n + 0.34), i.onended = () => {
3377
3406
  e.close();
3378
3407
  };
3379
3408
  } catch {
3380
3409
  }
3381
3410
  }
3382
- const kn = A.memo(function({ message: e, delaySeconds: t, soundEnabled: i, language: o, buttonPosition: s = "right", onClick: r }) {
3383
- const [c, l] = y(!1), d = e.trim();
3411
+ const ft = L.memo(function({ message: e, delaySeconds: n, soundEnabled: i, language: o, buttonPosition: r = "right", onClick: s }) {
3412
+ const [d, l] = y(!1), c = e.trim();
3384
3413
  return I(() => {
3385
- if (!d) return;
3414
+ if (!c) return;
3386
3415
  const u = setTimeout(() => {
3387
- l(!0), i && fn();
3388
- }, Math.max(0, t) * 1e3);
3416
+ l(!0), i && bt();
3417
+ }, Math.max(0, n) * 1e3);
3389
3418
  return () => clearTimeout(u);
3390
- }, [d, t, i]), !c || !d ? null : /* @__PURE__ */ n(
3419
+ }, [c, n, i]), !d || !c ? null : /* @__PURE__ */ t(
3391
3420
  "button",
3392
3421
  {
3393
3422
  type: "button",
3394
- className: V("rqmii-chat-welcome-bubble", s === "right" ? "is-right" : "is-left", Z()),
3395
- dir: re(o),
3396
- onClick: r,
3397
- "aria-label": d,
3398
- children: d
3423
+ className: V("rqmii-chat-welcome-bubble", r === "right" ? "is-right" : "is-left", Z()),
3424
+ dir: oe(o),
3425
+ onClick: s,
3426
+ "aria-label": c,
3427
+ children: c
3399
3428
  }
3400
3429
  );
3401
- }), Me = A.memo(function({ language: e, placeholder: t, onSend: i, disabled: o = !1, variant: s = "text" }) {
3402
- const [r, c] = y(""), l = B(null), d = 168, m = () => {
3403
- const u = r.trim();
3404
- !u || o || (i(u), c(""), l.current && (l.current.style.height = "auto"));
3430
+ }), xe = L.memo(function({ language: e, placeholder: n, onSend: i, disabled: o = !1, variant: r = "text" }) {
3431
+ const [s, d] = y(""), l = R(null), c = 168, m = () => {
3432
+ const u = s.trim();
3433
+ !u || o || (i(u), d(""), l.current && (l.current.style.height = "auto"));
3405
3434
  };
3406
- return /* @__PURE__ */ v("div", { className: V("rqmii-chat-input", Z(), s === "voice" && "is-voice"), children: [
3407
- /* @__PURE__ */ n(
3435
+ return /* @__PURE__ */ v("div", { className: V("rqmii-chat-input", Z(), r === "voice" && "is-voice"), children: [
3436
+ /* @__PURE__ */ t(
3408
3437
  "textarea",
3409
3438
  {
3410
3439
  ref: l,
3411
- value: r,
3440
+ value: s,
3412
3441
  disabled: o,
3413
- rows: s === "compact" ? 2 : 3,
3414
- dir: re(e),
3415
- placeholder: t || z(e, "sendMessage"),
3442
+ rows: r === "compact" ? 2 : 3,
3443
+ dir: oe(e),
3444
+ placeholder: n || E(e, "sendMessage"),
3416
3445
  onChange: (u) => {
3417
- c(u.target.value);
3446
+ d(u.target.value);
3418
3447
  const h = l.current;
3419
- h && (h.style.height = "auto", h.style.height = `${Math.min(h.scrollHeight, d)}px`);
3448
+ h && (h.style.height = "auto", h.style.height = `${Math.min(h.scrollHeight, c)}px`);
3420
3449
  },
3421
3450
  onKeyDown: (u) => {
3422
3451
  u.key === "Enter" && !u.shiftKey && (u.preventDefault(), m());
3423
3452
  }
3424
3453
  }
3425
3454
  ),
3426
- /* @__PURE__ */ n("button", { type: "button", onClick: m, disabled: !r.trim() || o, "aria-label": z(e, "send"), children: /* @__PURE__ */ n(Kt, { size: 20 }) })
3455
+ /* @__PURE__ */ t("button", { type: "button", onClick: m, disabled: !s.trim() || o, "aria-label": E(e, "send"), children: /* @__PURE__ */ t(Kn, { size: 20 }) })
3427
3456
  ] });
3428
- }), vn = A.memo(function({ text: e, streaming: t }) {
3429
- const i = pn(e, t);
3430
- return /* @__PURE__ */ n(Te, { children: i });
3431
- }), qe = 133, yn = qe + 44, Fn = 767, ke = 36, Tn = 8, ta = ke + Tn;
3432
- function En() {
3433
- return typeof window > "u" ? qe : window.innerWidth <= Fn ? yn : qe;
3457
+ }), kt = L.memo(function({ text: e, streaming: n }) {
3458
+ const i = gt(e, n);
3459
+ return /* @__PURE__ */ t(Te, { children: i });
3460
+ }), qe = 133, vt = qe + 44, yt = 767, ke = 36, Ft = 8, na = ke + Ft;
3461
+ function Tt() {
3462
+ return typeof window > "u" ? qe : window.innerWidth <= yt ? vt : qe;
3434
3463
  }
3435
- function zn(a) {
3464
+ function Et(a) {
3436
3465
  return a === "rtl" ? "right" : "left";
3437
3466
  }
3438
- function Sn(a, e, t, i) {
3467
+ function zt(a, e, n, i) {
3439
3468
  if (!a.length) return null;
3440
- const o = Math.max(...a.map((r) => r.offsetTop)), s = a.filter((r) => r.offsetTop >= o - 0.5);
3441
- return t === "right" ? s.find((r) => r.offsetLeft + r.offsetWidth > e - i) || null : s.find((r) => r.offsetLeft < i) || null;
3469
+ const o = Math.max(...a.map((s) => s.offsetTop)), r = a.filter((s) => s.offsetTop >= o - 0.5);
3470
+ return n === "right" ? r.find((s) => s.offsetLeft + s.offsetWidth > e - i) || null : r.find((s) => s.offsetLeft < i) || null;
3442
3471
  }
3443
- function na(a, e, t, i) {
3472
+ function ta(a, e, n, i) {
3444
3473
  for (let o = 0; o < 2; o++) {
3445
- const s = Sn(a, e, t, i);
3446
- if (!s) break;
3447
- t === "right" ? s.style.marginRight = `${i}px` : s.style.marginLeft = `${i}px`, s.style.maxWidth = `calc(100% - ${i}px)`;
3474
+ const r = zt(a, e, n, i);
3475
+ if (!r) break;
3476
+ n === "right" ? r.style.marginRight = `${i}px` : r.style.marginLeft = `${i}px`, r.style.maxWidth = `calc(100% - ${i}px)`;
3448
3477
  }
3449
3478
  }
3450
- const xn = A.memo(function({ suggestions: e, language: t, onClick: i }) {
3451
- const [o, s] = y(!1), [r, c] = y(!1), [l, d] = y(null), [m, u] = y(null), h = B(null), F = B([]), b = re(t || "en"), M = zn(b), S = (T) => {
3479
+ const wt = L.memo(function({ suggestions: e, language: n, onClick: i }) {
3480
+ const [o, r] = y(!1), [s, d] = y(!1), [l, c] = y(null), [m, u] = y(null), h = R(null), F = R([]), b = oe(n || "en"), x = Et(b), w = (T) => {
3452
3481
  T.forEach((k) => {
3453
3482
  k && (k.style.maxWidth = "", k.style.marginRight = "", k.style.marginLeft = "");
3454
3483
  });
@@ -3458,11 +3487,11 @@ const xn = A.memo(function({ suggestions: e, language: t, onClick: i }) {
3458
3487
  if (!T || o) return;
3459
3488
  const k = () => {
3460
3489
  const g = F.current;
3461
- S(g);
3462
- const w = T.clientWidth, E = En(), f = () => {
3490
+ w(g);
3491
+ const M = T.clientWidth, z = Tt(), f = () => {
3463
3492
  for (let C = 0; C < g.length; C++) {
3464
3493
  const _ = g[C];
3465
- if (_ && _.offsetTop + _.offsetHeight > E + 0.5)
3494
+ if (_ && _.offsetTop + _.offsetHeight > z + 0.5)
3466
3495
  return C;
3467
3496
  }
3468
3497
  return null;
@@ -3470,15 +3499,15 @@ const xn = A.memo(function({ suggestions: e, language: t, onClick: i }) {
3470
3499
  let P = f();
3471
3500
  if (P !== null)
3472
3501
  for (let C = 0; C <= g.length; C++) {
3473
- S(g);
3502
+ w(g);
3474
3503
  const _ = g.slice(0, P).filter((j) => !!j);
3475
- na(_, w, M, ta);
3476
- const x = f();
3477
- if (x === null || x >= P) break;
3478
- P = x;
3504
+ ta(_, M, x, na);
3505
+ const S = f();
3506
+ if (S === null || S >= P) break;
3507
+ P = S;
3479
3508
  }
3480
- if (d(P), c(P !== null), P !== null) {
3481
- const C = g.slice(0, P).filter((x) => !!x), _ = C.length ? Math.max(...C.map((x) => x.offsetTop + x.offsetHeight)) : ke;
3509
+ if (c(P), d(P !== null), P !== null) {
3510
+ const C = g.slice(0, P).filter((S) => !!S), _ = C.length ? Math.max(...C.map((S) => S.offsetTop + S.offsetHeight)) : ke;
3482
3511
  u(_ - ke);
3483
3512
  } else
3484
3513
  u(null);
@@ -3486,21 +3515,21 @@ const xn = A.memo(function({ suggestions: e, language: t, onClick: i }) {
3486
3515
  k();
3487
3516
  const p = typeof ResizeObserver < "u" ? new ResizeObserver(k) : null;
3488
3517
  return p?.observe(T), () => {
3489
- p?.disconnect(), S(F.current);
3518
+ p?.disconnect(), w(F.current);
3490
3519
  };
3491
- }, [e, o, M]), We(() => {
3520
+ }, [e, o, x]), We(() => {
3492
3521
  const T = h.current;
3493
3522
  if (!T || !o) return;
3494
3523
  const k = F.current.filter((g) => !!g);
3495
- S(F.current), na(k, T.clientWidth, M, ta);
3524
+ w(F.current), ta(k, T.clientWidth, x, na);
3496
3525
  const p = k.length ? Math.max(...k.map((g) => g.offsetTop + g.offsetHeight)) : ke;
3497
3526
  return u(p - ke), () => {
3498
- S(F.current);
3527
+ w(F.current);
3499
3528
  };
3500
- }, [o, e, M]), e.length ? /* @__PURE__ */ n("div", { className: V("rqmii-suggested-messages", o && "is-expanded", r && "has-overflow"), dir: b, children: /* @__PURE__ */ v("div", { ref: h, className: V("rqmii-suggested-messages-inner", o ? "is-expanded" : "is-collapsed"), children: [
3529
+ }, [o, e, x]), e.length ? /* @__PURE__ */ t("div", { className: V("rqmii-suggested-messages", o && "is-expanded", s && "has-overflow"), dir: b, children: /* @__PURE__ */ v("div", { ref: h, className: V("rqmii-suggested-messages-inner", o ? "is-expanded" : "is-collapsed"), children: [
3501
3530
  e.map((T, k) => {
3502
3531
  const p = !o && l !== null && k >= l;
3503
- return /* @__PURE__ */ n(
3532
+ return /* @__PURE__ */ t(
3504
3533
  "button",
3505
3534
  {
3506
3535
  ref: (g) => {
@@ -3517,225 +3546,225 @@ const xn = A.memo(function({ suggestions: e, language: t, onClick: i }) {
3517
3546
  k
3518
3547
  );
3519
3548
  }),
3520
- r && /* @__PURE__ */ n(
3549
+ s && /* @__PURE__ */ t(
3521
3550
  "button",
3522
3551
  {
3523
3552
  type: "button",
3524
- className: V("rqmii-suggested-messages-toggle", M === "left" && "is-start-left"),
3553
+ className: V("rqmii-suggested-messages-toggle", x === "left" && "is-start-left"),
3525
3554
  style: m != null ? { top: m, bottom: "auto" } : void 0,
3526
- onClick: () => s((T) => (T && h.current && (h.current.scrollTop = 0), !T)),
3555
+ onClick: () => r((T) => (T && h.current && (h.current.scrollTop = 0), !T)),
3527
3556
  "aria-label": o ? "Show less" : "Show more",
3528
3557
  "aria-expanded": o,
3529
- children: o ? /* @__PURE__ */ n(Wt, { size: 14 }) : /* @__PURE__ */ n(da, { size: 14 })
3558
+ children: o ? /* @__PURE__ */ t(Wn, { size: 14 }) : /* @__PURE__ */ t(da, { size: 14 })
3530
3559
  }
3531
3560
  )
3532
3561
  ] }) }) : null;
3533
- }), Mn = A.memo(function({ language: e }) {
3534
- const t = re(e || "en");
3535
- return /* @__PURE__ */ n("div", { className: "rqmii-chat-message-row", children: /* @__PURE__ */ v("div", { className: "rqmii-chat-message rqmii-chat-typing-indicator", dir: t, children: [
3536
- /* @__PURE__ */ n("span", { className: "rqmii-chat-typing-dot" }),
3537
- /* @__PURE__ */ n("span", { className: "rqmii-chat-typing-dot" }),
3538
- /* @__PURE__ */ n("span", { className: "rqmii-chat-typing-dot" })
3562
+ }), St = L.memo(function({ language: e }) {
3563
+ const n = oe(e || "en");
3564
+ return /* @__PURE__ */ t("div", { className: "rqmii-chat-message-row", children: /* @__PURE__ */ v("div", { className: "rqmii-chat-message rqmii-chat-typing-indicator", dir: n, children: [
3565
+ /* @__PURE__ */ t("span", { className: "rqmii-chat-typing-dot" }),
3566
+ /* @__PURE__ */ t("span", { className: "rqmii-chat-typing-dot" }),
3567
+ /* @__PURE__ */ t("span", { className: "rqmii-chat-typing-dot" })
3539
3568
  ] }) });
3540
3569
  });
3541
- function wn(a) {
3570
+ function xt(a) {
3542
3571
  return a === "message";
3543
3572
  }
3544
- const Pn = {
3573
+ const Mt = {
3545
3574
  name: "leadFormName",
3546
3575
  email: "leadFormEmail",
3547
3576
  phone: "leadFormPhone",
3548
3577
  message: "leadFormMessage"
3549
- }, Cn = A.memo(function({ messageId: e, form: t, language: i, textDirection: o, formSubmitted: s }) {
3550
- const r = Ea(), [c, l] = y({}), [d, m] = y(!1), [u, h] = y(!!s), [F, b] = y(null), M = t.title || z(i, "leadFormTitle"), S = (p) => {
3551
- const g = Pn[p.key];
3552
- return `${g ? z(i, g) : p.label}${p.required ? "*" : ""}`;
3578
+ }, Pt = L.memo(function({ messageId: e, form: n, language: i, textDirection: o, formSubmitted: r }) {
3579
+ const s = Ea(), [d, l] = y({}), [c, m] = y(!1), [u, h] = y(!!r), [F, b] = y(null), x = n.title || E(i, "leadFormTitle"), w = (p) => {
3580
+ const g = Mt[p.key];
3581
+ return `${g ? E(i, g) : p.label}${p.required ? "*" : ""}`;
3553
3582
  }, T = (p, g) => {
3554
- l((w) => ({ ...w, [p]: g })), F && b(null);
3583
+ l((M) => ({ ...M, [p]: g })), F && b(null);
3555
3584
  }, k = async (p) => {
3556
- if (p.preventDefault(), d || u) return;
3557
- if (t.fields.some((E) => E.required && !c[E.key]?.trim())) {
3558
- b(z(i, "leadFormRequiredError"));
3585
+ if (p.preventDefault(), c || u) return;
3586
+ if (n.fields.some((z) => z.required && !d[z.key]?.trim())) {
3587
+ b(E(i, "leadFormRequiredError"));
3559
3588
  return;
3560
3589
  }
3561
- const w = {};
3562
- for (const E of t.fields) {
3563
- const f = c[E.key]?.trim();
3564
- f && (w[E.key] = f);
3590
+ const M = {};
3591
+ for (const z of n.fields) {
3592
+ const f = d[z.key]?.trim();
3593
+ f && (M[z.key] = f);
3565
3594
  }
3566
3595
  m(!0), b(null);
3567
3596
  try {
3568
- await r.submitLead({ agentId: t.agentId, collectedData: w }), h(!0), r.setMessages(
3569
- r.messages.map(
3570
- (E) => E.id === e ? { ...E, formSubmitted: !0 } : E
3597
+ await s.submitLead({ agentId: n.agentId, collectedData: M }), h(!0), s.setMessages(
3598
+ s.messages.map(
3599
+ (z) => z.id === e ? { ...z, formSubmitted: !0 } : z
3571
3600
  )
3572
3601
  );
3573
- } catch (E) {
3574
- b(E?.message || z(i, "leadFormGenericError"));
3602
+ } catch (z) {
3603
+ b(z?.message || E(i, "leadFormGenericError"));
3575
3604
  } finally {
3576
3605
  m(!1);
3577
3606
  }
3578
3607
  };
3579
- 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: o, children: /* @__PURE__ */ n("div", { className: "rqmii-chat-lead-form-success", children: z(i, "leadFormSuccess") }) }) }) : /* @__PURE__ */ n("div", { className: "rqmii-chat-message-row rqmii-chat-lead-form-row", children: /* @__PURE__ */ v("form", { className: "rqmii-chat-lead-form", dir: o, onSubmit: k, children: [
3580
- /* @__PURE__ */ n("div", { className: "rqmii-chat-lead-form-title", children: M }),
3581
- t.fields.map((p) => {
3582
- const g = S(p), w = p.type === "email" ? "email" : p.type === "date" ? "date" : "text";
3583
- return wn(p.key) ? /* @__PURE__ */ n(
3608
+ return u ? /* @__PURE__ */ t("div", { className: "rqmii-chat-message-row rqmii-chat-lead-form-row", children: /* @__PURE__ */ t("div", { className: "rqmii-chat-lead-form rqmii-chat-lead-form--done", dir: o, children: /* @__PURE__ */ t("div", { className: "rqmii-chat-lead-form-success", children: E(i, "leadFormSuccess") }) }) }) : /* @__PURE__ */ t("div", { className: "rqmii-chat-message-row rqmii-chat-lead-form-row", children: /* @__PURE__ */ v("form", { className: "rqmii-chat-lead-form", dir: o, onSubmit: k, children: [
3609
+ /* @__PURE__ */ t("div", { className: "rqmii-chat-lead-form-title", children: x }),
3610
+ n.fields.map((p) => {
3611
+ const g = w(p), M = p.type === "email" ? "email" : p.type === "date" ? "date" : "text";
3612
+ return xt(p.key) ? /* @__PURE__ */ t(
3584
3613
  "textarea",
3585
3614
  {
3586
3615
  className: "rqmii-chat-lead-form-input rqmii-chat-lead-form-textarea",
3587
3616
  placeholder: g,
3588
- value: c[p.key] || "",
3589
- onChange: (E) => T(p.key, E.target.value),
3590
- disabled: d,
3617
+ value: d[p.key] || "",
3618
+ onChange: (z) => T(p.key, z.target.value),
3619
+ disabled: c,
3591
3620
  rows: 4
3592
3621
  },
3593
3622
  p.key
3594
- ) : /* @__PURE__ */ n(
3623
+ ) : /* @__PURE__ */ t(
3595
3624
  "input",
3596
3625
  {
3597
3626
  className: "rqmii-chat-lead-form-input",
3598
- type: w,
3627
+ type: M,
3599
3628
  placeholder: g,
3600
- value: c[p.key] || "",
3601
- onChange: (E) => T(p.key, E.target.value),
3602
- disabled: d
3629
+ value: d[p.key] || "",
3630
+ onChange: (z) => T(p.key, z.target.value),
3631
+ disabled: c
3603
3632
  },
3604
3633
  p.key
3605
3634
  );
3606
3635
  }),
3607
- F && /* @__PURE__ */ n("div", { className: "rqmii-chat-lead-form-error", children: F }),
3608
- /* @__PURE__ */ n("button", { type: "submit", className: "rqmii-chat-lead-form-submit", disabled: d, children: d ? z(i, "loading") : z(i, "submit") })
3636
+ F && /* @__PURE__ */ t("div", { className: "rqmii-chat-lead-form-error", children: F }),
3637
+ /* @__PURE__ */ t("button", { type: "submit", className: "rqmii-chat-lead-form-submit", disabled: c, children: c ? E(i, "loading") : E(i, "submit") })
3609
3638
  ] }) });
3610
- }), Ln = A.memo(function({ message: e, textDirection: t, language: i }) {
3639
+ }), Ct = L.memo(function({ message: e, textDirection: n, language: i }) {
3611
3640
  if (e.role === "lead_form" && e.form)
3612
- return /* @__PURE__ */ n(Cn, { messageId: e.id, form: e.form, language: i, textDirection: t, formSubmitted: e.formSubmitted });
3641
+ return /* @__PURE__ */ t(Pt, { messageId: e.id, form: e.form, language: i, textDirection: n, formSubmitted: e.formSubmitted });
3613
3642
  const o = e.role === "user" || e.sender === "user";
3614
- return /* @__PURE__ */ n("div", { className: V("rqmii-chat-message-row", o && "is-user"), children: /* @__PURE__ */ n("div", { className: "rqmii-chat-message", dir: t, children: /* @__PURE__ */ n(vn, { text: e.text, streaming: e.streaming }) }) });
3615
- }), Ue = A.memo(function({ messages: e, partialTranscript: t, language: i, showTypingIndicator: o }) {
3616
- const s = B(null), r = re(i || "en"), c = B(e.length);
3643
+ return /* @__PURE__ */ t("div", { className: V("rqmii-chat-message-row", o && "is-user"), children: /* @__PURE__ */ t("div", { className: "rqmii-chat-message", dir: n, children: /* @__PURE__ */ t(kt, { text: e.text, streaming: e.streaming }) }) });
3644
+ }), Ue = L.memo(function({ messages: e, partialTranscript: n, language: i, showTypingIndicator: o }) {
3645
+ const r = R(null), s = oe(i || "en"), d = R(e.length);
3617
3646
  return I(() => {
3618
- if (!s.current) return;
3619
- const l = e.length !== c.current;
3620
- c.current = e.length, s.current.scrollIntoView({ behavior: l ? "smooth" : "instant", block: "end" });
3621
- }, [e, t]), /* @__PURE__ */ v("div", { className: "rqmii-chat-messages", children: [
3622
- e.map((l) => /* @__PURE__ */ n(Ln, { message: l, textDirection: r, language: i || "en" }, l.id || `${l.role}-${l.text}`)),
3623
- o && /* @__PURE__ */ n(Mn, { language: i }),
3624
- t && /* @__PURE__ */ n("div", { className: "rqmii-chat-message-row is-user is-partial", children: /* @__PURE__ */ n("div", { className: "rqmii-chat-message", dir: r, children: t }) }),
3625
- /* @__PURE__ */ n("div", { ref: s })
3647
+ if (!r.current) return;
3648
+ const l = e.length !== d.current;
3649
+ d.current = e.length, r.current.scrollIntoView({ behavior: l ? "smooth" : "instant", block: "end" });
3650
+ }, [e, n]), /* @__PURE__ */ v("div", { className: "rqmii-chat-messages", children: [
3651
+ e.map((l) => /* @__PURE__ */ t(Ct, { message: l, textDirection: s, language: i || "en" }, l.id || `${l.role}-${l.text}`)),
3652
+ o && /* @__PURE__ */ t(St, { language: i }),
3653
+ n && /* @__PURE__ */ t("div", { className: "rqmii-chat-message-row is-user is-partial", children: /* @__PURE__ */ t("div", { className: "rqmii-chat-message", dir: s, children: n }) }),
3654
+ /* @__PURE__ */ t("div", { ref: r })
3626
3655
  ] });
3627
- }), ha = A.memo(function({ message: e, onRetry: t, onClose: i, language: o = "en" }) {
3656
+ }), ha = L.memo(function({ message: e, onRetry: n, onClose: i, language: o = "en" }) {
3628
3657
  return /* @__PURE__ */ v("div", { className: "rqmii-chat-panel rqmii-chat-panel--error", children: [
3629
- i && /* @__PURE__ */ n("button", { type: "button", className: "rqmii-error-close", onClick: i, children: "×" }),
3630
- /* @__PURE__ */ n("p", { children: e || z(o, "connectionFailed") }),
3631
- t && /* @__PURE__ */ v("button", { type: "button", className: "rqmii-chat-retry", onClick: t, children: [
3632
- /* @__PURE__ */ n(sn, { size: 16 }),
3633
- /* @__PURE__ */ n("span", { children: z(o, "retry") })
3658
+ i && /* @__PURE__ */ t("button", { type: "button", className: "rqmii-error-close", onClick: i, children: "×" }),
3659
+ /* @__PURE__ */ t("p", { children: e || E(o, "connectionFailed") }),
3660
+ n && /* @__PURE__ */ v("button", { type: "button", className: "rqmii-chat-retry", onClick: n, children: [
3661
+ /* @__PURE__ */ t(ot, { size: 16 }),
3662
+ /* @__PURE__ */ t("span", { children: E(o, "retry") })
3634
3663
  ] })
3635
3664
  ] });
3636
- }), An = 5;
3637
- function ga({ rating: a, onRate: e, readonly: t, size: i = 28 }) {
3638
- const [o, s] = y(0), r = o || a;
3639
- return /* @__PURE__ */ n("div", { className: "rqmii-chat-rating-stars", role: "radiogroup", children: Array.from({ length: An }, (c, l) => {
3640
- const d = l + 1, m = d <= r;
3641
- return /* @__PURE__ */ n(
3665
+ }), At = 5;
3666
+ function ga({ rating: a, onRate: e, readonly: n, size: i = 28 }) {
3667
+ const [o, r] = y(0), s = o || a;
3668
+ return /* @__PURE__ */ t("div", { className: "rqmii-chat-rating-stars", role: "radiogroup", children: Array.from({ length: At }, (d, l) => {
3669
+ const c = l + 1, m = c <= s;
3670
+ return /* @__PURE__ */ t(
3642
3671
  "button",
3643
3672
  {
3644
3673
  type: "button",
3645
- className: V("rqmii-chat-star", m && "is-filled", t && "is-readonly"),
3646
- disabled: t,
3647
- "aria-label": `${d}`,
3648
- "aria-checked": d === a,
3674
+ className: V("rqmii-chat-star", m && "is-filled", n && "is-readonly"),
3675
+ disabled: n,
3676
+ "aria-label": `${c}`,
3677
+ "aria-checked": c === a,
3649
3678
  role: "radio",
3650
- onMouseEnter: () => !t && s(d),
3651
- onMouseLeave: () => !t && s(0),
3652
- onClick: () => !t && e?.(d),
3653
- children: /* @__PURE__ */ n(ln, { size: i, fill: m ? "currentColor" : "none" })
3679
+ onMouseEnter: () => !n && r(c),
3680
+ onMouseLeave: () => !n && r(0),
3681
+ onClick: () => !n && e?.(c),
3682
+ children: /* @__PURE__ */ t(st, { size: i, fill: m ? "currentColor" : "none" })
3654
3683
  },
3655
- d
3684
+ c
3656
3685
  );
3657
3686
  }) });
3658
3687
  }
3659
- function _n({
3688
+ function Lt({
3660
3689
  language: a,
3661
3690
  rating: e,
3662
- endedBy: t,
3691
+ endedBy: n,
3663
3692
  sessionId: i,
3664
3693
  interactive: o,
3665
- showTellUsMore: s,
3666
- showRating: r = !0,
3667
- showConversationId: c = !0,
3694
+ showTellUsMore: r,
3695
+ showRating: s = !0,
3696
+ showConversationId: d = !0,
3668
3697
  onRate: l,
3669
- onTellUsMore: d
3698
+ onTellUsMore: c
3670
3699
  }) {
3671
- const m = e > 0 ? z(a, "ratingThankYou") : z(a, "ratingQuestion"), u = t === "user" ? z(a, "youEnded") : z(a, "agentEnded");
3700
+ const m = e > 0 ? E(a, "ratingThankYou") : E(a, "ratingQuestion"), u = n === "user" ? E(a, "youEnded") : E(a, "agentEnded");
3672
3701
  return /* @__PURE__ */ v(
3673
3702
  "div",
3674
3703
  {
3675
- className: V("rqmii-chat-rating", !r && "rqmii-chat-rating--unrated", Z()),
3676
- dir: re(a),
3704
+ className: V("rqmii-chat-rating", !s && "rqmii-chat-rating--unrated", Z()),
3705
+ dir: oe(a),
3677
3706
  children: [
3678
- r && /* @__PURE__ */ v(Te, { children: [
3679
- /* @__PURE__ */ n("div", { className: "rqmii-chat-rating-header", children: m }),
3680
- /* @__PURE__ */ n(ga, { rating: e, onRate: l, readonly: !o }),
3681
- s && /* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-rating-more", onClick: d, children: z(a, "tellUsMore") })
3707
+ s && /* @__PURE__ */ v(Te, { children: [
3708
+ /* @__PURE__ */ t("div", { className: "rqmii-chat-rating-header", children: m }),
3709
+ /* @__PURE__ */ t(ga, { rating: e, onRate: l, readonly: !o }),
3710
+ r && /* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-rating-more", onClick: c, children: E(a, "tellUsMore") })
3682
3711
  ] }),
3683
3712
  /* @__PURE__ */ v("div", { className: "rqmii-chat-rating-meta", children: [
3684
- /* @__PURE__ */ n("div", { children: u }),
3685
- c && i && /* @__PURE__ */ v("div", { children: [
3686
- z(a, "sessionIdLabel"),
3713
+ /* @__PURE__ */ t("div", { children: u }),
3714
+ d && i && /* @__PURE__ */ v("div", { children: [
3715
+ E(a, "sessionIdLabel"),
3687
3716
  " ",
3688
- /* @__PURE__ */ n("span", { children: i })
3717
+ /* @__PURE__ */ t("span", { children: i })
3689
3718
  ] })
3690
3719
  ] })
3691
3720
  ]
3692
3721
  }
3693
3722
  );
3694
3723
  }
3695
- function qn({
3724
+ function _t({
3696
3725
  agent: a,
3697
3726
  language: e,
3698
- rating: t,
3727
+ rating: n,
3699
3728
  onBack: i,
3700
3729
  onMinimize: o,
3701
- onSubmit: s
3730
+ onSubmit: r
3702
3731
  }) {
3703
- const [r, c] = y(""), [l, d] = y(!1), m = r.trim().length > 0 && !l, u = async () => {
3732
+ const [s, d] = y(""), [l, c] = y(!1), m = s.trim().length > 0 && !l, u = async () => {
3704
3733
  if (m) {
3705
- d(!0);
3734
+ c(!0);
3706
3735
  try {
3707
- await s(r.trim());
3736
+ await r(s.trim());
3708
3737
  } finally {
3709
- d(!1);
3738
+ c(!1);
3710
3739
  }
3711
3740
  }
3712
3741
  };
3713
- return /* @__PURE__ */ v("div", { className: V("rqmii-chat-panel rqmii-chat-panel--feedback", Z()), dir: re(e), children: [
3742
+ return /* @__PURE__ */ v("div", { className: V("rqmii-chat-panel rqmii-chat-panel--feedback", Z()), dir: oe(e), children: [
3714
3743
  /* @__PURE__ */ v("div", { className: "rqmii-chat-topbar", children: [
3715
- /* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button", onClick: i, "aria-label": "Back", children: /* @__PURE__ */ n(Yt, { size: 20 }) }),
3716
- /* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button", onClick: o, "aria-label": z(e, "minimize"), children: /* @__PURE__ */ n(xe, { size: 20 }) })
3744
+ /* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-circle-button", onClick: i, "aria-label": "Back", children: /* @__PURE__ */ t(Yn, { size: 20 }) }),
3745
+ /* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-circle-button", onClick: o, "aria-label": E(e, "minimize"), children: /* @__PURE__ */ t(Se, { size: 20 }) })
3717
3746
  ] }),
3718
3747
  /* @__PURE__ */ v("div", { className: "rqmii-chat-feedback-body", children: [
3719
- /* @__PURE__ */ n(te, { agent: a, size: "hero" }),
3720
- /* @__PURE__ */ n(ga, { rating: t, readonly: !0 }),
3721
- /* @__PURE__ */ n("div", { className: "rqmii-chat-feedback-title", children: z(e, "ratingThankYou") }),
3722
- /* @__PURE__ */ n("div", { className: "rqmii-chat-feedback-subtitle", children: z(e, "feedbackSubtitle") }),
3723
- /* @__PURE__ */ n(
3748
+ /* @__PURE__ */ t(ne, { agent: a, size: "hero" }),
3749
+ /* @__PURE__ */ t(ga, { rating: n, readonly: !0 }),
3750
+ /* @__PURE__ */ t("div", { className: "rqmii-chat-feedback-title", children: E(e, "ratingThankYou") }),
3751
+ /* @__PURE__ */ t("div", { className: "rqmii-chat-feedback-subtitle", children: E(e, "feedbackSubtitle") }),
3752
+ /* @__PURE__ */ t(
3724
3753
  "textarea",
3725
3754
  {
3726
3755
  className: "rqmii-chat-feedback-input",
3727
- value: r,
3728
- dir: re(e),
3729
- placeholder: z(e, "feedbackPlaceholder"),
3730
- onChange: (h) => c(h.target.value)
3756
+ value: s,
3757
+ dir: oe(e),
3758
+ placeholder: E(e, "feedbackPlaceholder"),
3759
+ onChange: (h) => d(h.target.value)
3731
3760
  }
3732
3761
  ),
3733
- /* @__PURE__ */ n("div", { className: "rqmii-chat-feedback-actions", children: /* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-feedback-submit", onClick: u, disabled: !m, children: l ? /* @__PURE__ */ n(ze, { className: "rqmii-chat-spin", size: 18 }) : z(e, "submit") }) })
3762
+ /* @__PURE__ */ t("div", { className: "rqmii-chat-feedback-actions", children: /* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-feedback-submit", onClick: u, disabled: !m, children: l ? /* @__PURE__ */ t(ze, { className: "rqmii-chat-spin", size: 18 }) : E(e, "submit") }) })
3734
3763
  ] }),
3735
- /* @__PURE__ */ n(ue, { language: e, agent: a })
3764
+ /* @__PURE__ */ t(ue, { language: e, agent: a })
3736
3765
  ] });
3737
3766
  }
3738
- const In = A.lazy(() => import("./RqmiiCloudAvatarPlayer-Cit_rrpj.js").then((a) => a.e).then((a) => ({ default: a.RqmiiCloudAvatarPlayer })));
3767
+ const qt = L.lazy(() => import("./RqmiiCloudAvatarPlayer-Cit_rrpj.js").then((a) => a.e).then((a) => ({ default: a.RqmiiCloudAvatarPlayer })));
3739
3768
  function Fe(a) {
3740
3769
  if (!(a == null || typeof window > "u" || window.innerWidth >= 768))
3741
3770
  return {
@@ -3743,334 +3772,334 @@ function Fe(a) {
3743
3772
  bottom: 0
3744
3773
  };
3745
3774
  }
3746
- const Vn = A.memo(function({ agent: e, language: t, languages: i, onLanguageChange: o, onClose: s, onSend: r, isVoiceEnabled: c = !1, isAudioPlaying: l = !1, isVoiceSetupLoading: d = !1, onStartVoice: m, visualViewportHeight: u, disabled: h = !1, error: F, suggestions: b, onSuggestionClick: M, compact: S = !1 }) {
3747
- const T = Fe(u), [k, p] = A.useState(_e);
3748
- A.useEffect(() => {
3775
+ const It = L.memo(function({ agent: e, language: n, languages: i, onLanguageChange: o, onClose: r, onSend: s, isVoiceEnabled: d = !1, isAudioPlaying: l = !1, isVoiceSetupLoading: c = !1, onStartVoice: m, visualViewportHeight: u, disabled: h = !1, error: F, suggestions: b, onSuggestionClick: x, compact: w = !1 }) {
3776
+ const T = Fe(u), [k, p] = L.useState(_e);
3777
+ L.useEffect(() => {
3749
3778
  const f = () => p(_e());
3750
3779
  return window.addEventListener("resize", f), () => window.removeEventListener("resize", f);
3751
3780
  }, []);
3752
- const g = S && !k, w = g ? "start" : "hero", E = b && b.length > 0;
3781
+ const g = w && !k, M = g ? "start" : "hero", z = b && b.length > 0;
3753
3782
  return /* @__PURE__ */ v("div", { className: V("rqmii-chat-panel rqmii-chat-panel--start", g && "rqmii-chat-panel--start-compact", Z()), style: T, children: [
3754
3783
  /* @__PURE__ */ v("div", { className: "rqmii-chat-topbar", children: [
3755
- /* @__PURE__ */ n("span", {}),
3784
+ /* @__PURE__ */ t("span", {}),
3756
3785
  /* @__PURE__ */ v("div", { className: "rqmii-chat-topbar-actions", children: [
3757
- /* @__PURE__ */ n(Ge, { language: t, languages: i, onChange: o }),
3758
- /* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button", onClick: s, children: /* @__PURE__ */ n(De, { size: 20 }) })
3786
+ /* @__PURE__ */ t(Ge, { language: n, languages: i, onChange: o }),
3787
+ /* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-circle-button", onClick: r, children: /* @__PURE__ */ t(De, { size: 20 }) })
3759
3788
  ] })
3760
3789
  ] }),
3761
3790
  /* @__PURE__ */ v("div", { className: "rqmii-chat-start-body", children: [
3762
- c ? /* @__PURE__ */ v("div", { className: V("rqmii-chat-call-avatar-wrap", g && "is-compact"), children: [
3763
- /* @__PURE__ */ n(te, { agent: e, size: w, active: l }),
3764
- /* @__PURE__ */ n("button", { type: "button", className: V("rqmii-chat-call-button", g && "is-compact"), onClick: m, disabled: d, "aria-label": z(t, "startVoice"), children: d ? /* @__PURE__ */ n(ze, { className: "rqmii-chat-spin", size: g ? 18 : 24 }) : /* @__PURE__ */ n(je, { size: g ? 18 : 24 }) })
3765
- ] }) : /* @__PURE__ */ n(te, { agent: e, size: w }),
3766
- /* @__PURE__ */ n("div", { className: "rqmii-chat-agent-name", children: e.name }),
3767
- F && /* @__PURE__ */ n("div", { className: "rqmii-chat-error-text", children: F })
3791
+ d ? /* @__PURE__ */ v("div", { className: V("rqmii-chat-call-avatar-wrap", g && "is-compact"), children: [
3792
+ /* @__PURE__ */ t(ne, { agent: e, size: M, active: l }),
3793
+ /* @__PURE__ */ t("button", { type: "button", className: V("rqmii-chat-call-button", g && "is-compact"), onClick: m, disabled: c, "aria-label": E(n, "startVoice"), children: c ? /* @__PURE__ */ t(ze, { className: "rqmii-chat-spin", size: g ? 18 : 24 }) : /* @__PURE__ */ t(je, { size: g ? 18 : 24 }) })
3794
+ ] }) : /* @__PURE__ */ t(ne, { agent: e, size: M }),
3795
+ /* @__PURE__ */ t("div", { className: "rqmii-chat-agent-name", children: e.name }),
3796
+ F && /* @__PURE__ */ t("div", { className: "rqmii-chat-error-text", children: F })
3768
3797
  ] }),
3769
- E && /* @__PURE__ */ n("div", { className: "rqmii-chat-start-suggestions", children: /* @__PURE__ */ n(xn, { suggestions: b, language: t, onClick: (f) => M?.(f) }) }),
3770
- /* @__PURE__ */ n(Me, { language: t, onSend: r, disabled: h }),
3771
- /* @__PURE__ */ n(ue, { language: t, agent: e })
3798
+ z && /* @__PURE__ */ t("div", { className: "rqmii-chat-start-suggestions", children: /* @__PURE__ */ t(wt, { suggestions: b, language: n, onClick: (f) => x?.(f) }) }),
3799
+ /* @__PURE__ */ t(xe, { language: n, onSend: s, disabled: h }),
3800
+ /* @__PURE__ */ t(ue, { language: n, agent: e })
3772
3801
  ] });
3773
- }), Nn = A.memo(function({ agent: e, language: t, languages: i, onLanguageChange: o, onClose: s, onStartVoice: r, isVoiceSetupLoading: c = !1, isAudioPlaying: l, visualViewportHeight: d }) {
3774
- const m = Fe(d);
3802
+ }), Vt = L.memo(function({ agent: e, language: n, languages: i, onLanguageChange: o, onClose: r, onStartVoice: s, isVoiceSetupLoading: d = !1, isAudioPlaying: l, visualViewportHeight: c }) {
3803
+ const m = Fe(c);
3775
3804
  return /* @__PURE__ */ v("div", { className: V("rqmii-chat-panel rqmii-chat-panel--voice-start", Z()), style: m, children: [
3776
3805
  /* @__PURE__ */ v("div", { className: "rqmii-chat-topbar", children: [
3777
- /* @__PURE__ */ n("span", {}),
3806
+ /* @__PURE__ */ t("span", {}),
3778
3807
  /* @__PURE__ */ v("div", { className: "rqmii-chat-topbar-actions", children: [
3779
- /* @__PURE__ */ n(Ge, { language: t, languages: i, onChange: o }),
3780
- /* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button", onClick: s, children: /* @__PURE__ */ n(De, { size: 20 }) })
3808
+ /* @__PURE__ */ t(Ge, { language: n, languages: i, onChange: o }),
3809
+ /* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-circle-button", onClick: r, children: /* @__PURE__ */ t(De, { size: 20 }) })
3781
3810
  ] })
3782
3811
  ] }),
3783
3812
  /* @__PURE__ */ v("div", { className: "rqmii-chat-call-body", children: [
3784
3813
  /* @__PURE__ */ v("div", { className: "rqmii-chat-call-avatar-wrap", children: [
3785
- /* @__PURE__ */ n(te, { agent: e, size: "hero", active: l }),
3786
- /* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-call-button", onClick: r, disabled: c, "aria-label": z(t, "startVoice"), children: c ? /* @__PURE__ */ n(ze, { className: "rqmii-chat-spin", size: 24 }) : /* @__PURE__ */ n(je, { size: 24 }) })
3814
+ /* @__PURE__ */ t(ne, { agent: e, size: "hero", active: l }),
3815
+ /* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-call-button", onClick: s, disabled: d, "aria-label": E(n, "startVoice"), children: d ? /* @__PURE__ */ t(ze, { className: "rqmii-chat-spin", size: 24 }) : /* @__PURE__ */ t(je, { size: 24 }) })
3787
3816
  ] }),
3788
3817
  /* @__PURE__ */ v("div", { className: "rqmii-chat-agent-name", children: [
3789
- z(t, "call"),
3818
+ E(n, "call"),
3790
3819
  " ",
3791
3820
  e.name
3792
3821
  ] })
3793
3822
  ] }),
3794
- /* @__PURE__ */ n(ue, { language: t, agent: e })
3823
+ /* @__PURE__ */ t(ue, { language: n, agent: e })
3795
3824
  ] });
3796
- }), jn = A.memo(function({ agent: e, language: t, onEndSession: i, onMinimize: o, messages: s, partialTranscript: r, onSend: c, isAudioPlaying: l, isVoiceEnabled: d, onToggleVoice: m, isListening: u, isSpeaking: h, isLoading: F, isAgentThinking: b, isAgentSpeaking: M, onStartVoice: S, elapsed: T, visualViewportHeight: k, waitingForResponse: p }) {
3797
- const g = pa({ language: t, isListening: u, isLoading: F, isSpeaking: h, isAudioPlaying: l, isAgentThinking: b, isAgentSpeaking: M, persistentListening: !1 }), w = Fe(k), E = e.widget?.appearance?.show_topbar_avatar_image !== !1;
3798
- return /* @__PURE__ */ v("div", { className: V("rqmii-chat-panel rqmii-chat-panel--conversation", Z()), style: w, children: [
3825
+ }), Nt = L.memo(function({ agent: e, language: n, onEndSession: i, onMinimize: o, messages: r, partialTranscript: s, onSend: d, isAudioPlaying: l, isVoiceEnabled: c, onToggleVoice: m, isListening: u, isSpeaking: h, isLoading: F, isAgentThinking: b, isAgentSpeaking: x, onStartVoice: w, elapsed: T, visualViewportHeight: k, waitingForResponse: p }) {
3826
+ const g = pa({ language: n, isListening: u, isLoading: F, isSpeaking: h, isAudioPlaying: l, isAgentThinking: b, isAgentSpeaking: x, persistentListening: !1 }), M = Fe(k), z = e.widget?.appearance?.show_topbar_avatar_image !== !1;
3827
+ return /* @__PURE__ */ v("div", { className: V("rqmii-chat-panel rqmii-chat-panel--conversation", Z()), style: M, children: [
3799
3828
  /* @__PURE__ */ v("div", { className: "rqmii-chat-header", children: [
3800
- E && /* @__PURE__ */ n(te, { agent: e, size: "header", active: l }),
3801
- d && g && /* @__PURE__ */ n("div", { className: V("rqmii-chat-header-status", !E && "is-expanded"), children: /* @__PURE__ */ n("span", { children: g }) }),
3802
- /* @__PURE__ */ n("div", { className: "rqmii-chat-header-spacer" }),
3829
+ z && /* @__PURE__ */ t(ne, { agent: e, size: "header", active: l }),
3830
+ c && g && /* @__PURE__ */ t("div", { className: V("rqmii-chat-header-status", !z && "is-expanded"), children: /* @__PURE__ */ t("span", { children: g }) }),
3831
+ /* @__PURE__ */ t("div", { className: "rqmii-chat-header-spacer" }),
3803
3832
  /* @__PURE__ */ v("div", { className: "rqmii-chat-header-actions", children: [
3804
- o && /* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button", onClick: o, "aria-label": z(t, "minimize"), children: /* @__PURE__ */ n(xe, { size: 20 }) }),
3805
- d && /* @__PURE__ */ n("button", { type: "button", className: V("rqmii-chat-circle-button", h && "is-active"), onClick: m, "aria-label": u ? z(t, "stopVoice") : z(t, "startVoice"), children: u ? /* @__PURE__ */ n(Se, { size: 20 }) : /* @__PURE__ */ n(Ve, { size: 20 }) }),
3806
- /* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button is-danger", onClick: i, "aria-label": z(t, "endCall"), children: /* @__PURE__ */ n(Ne, { size: 20 }) })
3833
+ o && /* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-circle-button", onClick: o, "aria-label": E(n, "minimize"), children: /* @__PURE__ */ t(Se, { size: 20 }) }),
3834
+ c && /* @__PURE__ */ t("button", { type: "button", className: V("rqmii-chat-circle-button", h && "is-active"), onClick: m, "aria-label": u ? E(n, "stopVoice") : E(n, "startVoice"), children: u ? /* @__PURE__ */ t(we, { size: 20 }) : /* @__PURE__ */ t(Ve, { size: 20 }) }),
3835
+ /* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-circle-button is-danger", onClick: i, "aria-label": E(n, "endCall"), children: /* @__PURE__ */ t(Ne, { size: 20 }) })
3807
3836
  ] })
3808
3837
  ] }),
3809
- /* @__PURE__ */ n(Ue, { messages: s, partialTranscript: r, language: t, showTypingIndicator: p }),
3810
- d && /* @__PURE__ */ n("div", { className: "rqmii-chat-session-counter", children: Be(T) }),
3811
- /* @__PURE__ */ n(Me, { language: t, onSend: c }),
3812
- /* @__PURE__ */ n(ue, { language: t, agent: e })
3838
+ /* @__PURE__ */ t(Ue, { messages: r, partialTranscript: s, language: n, showTypingIndicator: p }),
3839
+ c && /* @__PURE__ */ t("div", { className: "rqmii-chat-session-counter", children: Re(T) }),
3840
+ /* @__PURE__ */ t(xe, { language: n, onSend: d }),
3841
+ /* @__PURE__ */ t(ue, { language: n, agent: e })
3813
3842
  ] });
3814
- }), Dn = A.memo(function({ agent: e, language: t, onEndSession: i, onMinimize: o, isListening: s, isLoading: r, isSpeaking: c, isAudioPlaying: l, isAgentThinking: d, isAgentSpeaking: m, onToggleVoice: u, elapsed: h, visualViewportHeight: F }) {
3815
- const b = pa({ language: t, isListening: s, isLoading: r, isSpeaking: c, isAudioPlaying: l, isAgentThinking: d, isAgentSpeaking: m, persistentListening: !0 }), M = Fe(F);
3816
- return /* @__PURE__ */ v("div", { className: V("rqmii-chat-panel rqmii-chat-panel--voice-call", Z()), style: M, children: [
3843
+ }), jt = L.memo(function({ agent: e, language: n, onEndSession: i, onMinimize: o, isListening: r, isLoading: s, isSpeaking: d, isAudioPlaying: l, isAgentThinking: c, isAgentSpeaking: m, onToggleVoice: u, elapsed: h, visualViewportHeight: F }) {
3844
+ const b = pa({ language: n, isListening: r, isLoading: s, isSpeaking: d, isAudioPlaying: l, isAgentThinking: c, isAgentSpeaking: m, persistentListening: !0 }), x = Fe(F);
3845
+ return /* @__PURE__ */ v("div", { className: V("rqmii-chat-panel rqmii-chat-panel--voice-call", Z()), style: x, children: [
3817
3846
  /* @__PURE__ */ v("div", { className: "rqmii-chat-call-status", children: [
3818
- /* @__PURE__ */ n("span", { className: V("rqmii-chat-live-dot", s && "is-live") }),
3819
- /* @__PURE__ */ n("span", { children: Be(h) }),
3820
- /* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button", onClick: o, children: /* @__PURE__ */ n(xe, { size: 20 }) })
3847
+ /* @__PURE__ */ t("span", { className: V("rqmii-chat-live-dot", r && "is-live") }),
3848
+ /* @__PURE__ */ t("span", { children: Re(h) }),
3849
+ /* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-circle-button", onClick: o, children: /* @__PURE__ */ t(Se, { size: 20 }) })
3821
3850
  ] }),
3822
3851
  /* @__PURE__ */ v("div", { className: "rqmii-chat-voice-frame", children: [
3823
- /* @__PURE__ */ n(te, { agent: e, size: "hero", active: l }),
3824
- /* @__PURE__ */ n("div", { className: "rqmii-chat-agent-name", children: e.name }),
3825
- /* @__PURE__ */ n("div", { className: V("rqmii-chat-status-pill", !b && "is-empty"), children: b || z(t, "listening") }),
3852
+ /* @__PURE__ */ t(ne, { agent: e, size: "hero", active: l }),
3853
+ /* @__PURE__ */ t("div", { className: "rqmii-chat-agent-name", children: e.name }),
3854
+ /* @__PURE__ */ t("div", { className: V("rqmii-chat-status-pill", !b && "is-empty"), children: b || E(n, "listening") }),
3826
3855
  /* @__PURE__ */ v("div", { className: "rqmii-chat-voice-actions", children: [
3827
- /* @__PURE__ */ n("button", { type: "button", className: V("rqmii-chat-circle-button", c && "is-active"), onClick: u, children: s ? /* @__PURE__ */ n(Se, { size: 20 }) : /* @__PURE__ */ n(Ve, { size: 20 }) }),
3828
- /* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button is-danger", onClick: i, "aria-label": z(t, "endCall"), children: /* @__PURE__ */ n(Ne, { size: 20 }) })
3856
+ /* @__PURE__ */ t("button", { type: "button", className: V("rqmii-chat-circle-button", d && "is-active"), onClick: u, children: r ? /* @__PURE__ */ t(we, { size: 20 }) : /* @__PURE__ */ t(Ve, { size: 20 }) }),
3857
+ /* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-circle-button is-danger", onClick: i, "aria-label": E(n, "endCall"), children: /* @__PURE__ */ t(Ne, { size: 20 }) })
3829
3858
  ] })
3830
3859
  ] }),
3831
- /* @__PURE__ */ n(ue, { language: t, agent: e })
3860
+ /* @__PURE__ */ t(ue, { language: n, agent: e })
3832
3861
  ] });
3833
3862
  });
3834
- function pa({ language: a, isListening: e, isLoading: t, isSpeaking: i, isAudioPlaying: o, isAgentThinking: s, isAgentSpeaking: r, persistentListening: c = !1 }) {
3835
- return t ? z(a, "loading") : i ? z(a, "listening") : o || r ? z(a, "talkToInterrupt") : s ? z(a, "processing") : e && c ? z(a, "listening") : null;
3863
+ function pa({ language: a, isListening: e, isLoading: n, isSpeaking: i, isAudioPlaying: o, isAgentThinking: r, isAgentSpeaking: s, persistentListening: d = !1 }) {
3864
+ return n ? E(a, "loading") : i ? E(a, "listening") : o || s ? E(a, "talkToInterrupt") : r ? E(a, "processing") : e && d ? E(a, "listening") : null;
3836
3865
  }
3837
- const Rn = A.memo(function({ agent: e, language: t, onRestore: i, onClose: o, isListening: s, isAudioPlaying: r, isSpeaking: c, onToggleVoice: l, elapsed: d, variant: m = "voice" }) {
3866
+ const Dt = L.memo(function({ agent: e, language: n, onRestore: i, onClose: o, isListening: r, isAudioPlaying: s, isSpeaking: d, onToggleVoice: l, elapsed: c, variant: m = "voice" }) {
3838
3867
  const u = m === "text";
3839
3868
  return /* @__PURE__ */ v("div", { className: V("rqmii-chat-minimized", Z()), children: [
3840
- /* @__PURE__ */ n(te, { agent: e, size: "minimized", active: r }),
3841
- !u && /* @__PURE__ */ n("span", { className: "rqmii-chat-minimized-time", children: Be(d) }),
3869
+ /* @__PURE__ */ t(ne, { agent: e, size: "minimized", active: s }),
3870
+ !u && /* @__PURE__ */ t("span", { className: "rqmii-chat-minimized-time", children: Re(c) }),
3842
3871
  /* @__PURE__ */ v("div", { className: "rqmii-chat-minimized-actions", children: [
3843
- /* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button", onClick: i, "aria-label": z(t, "maximize"), children: /* @__PURE__ */ n(Jt, { size: 20 }) }),
3844
- !u && /* @__PURE__ */ n("button", { type: "button", className: V("rqmii-chat-circle-button", c && "is-active"), onClick: l, "aria-label": s ? z(t, "stopVoice") : z(t, "startVoice"), children: s ? /* @__PURE__ */ n(Se, { size: 20 }) : /* @__PURE__ */ n(Ve, { size: 20 }) }),
3845
- /* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button is-danger", onClick: o, "aria-label": z(t, "endCall"), children: /* @__PURE__ */ n(Ne, { size: 20 }) })
3872
+ /* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-circle-button", onClick: i, "aria-label": E(n, "maximize"), children: /* @__PURE__ */ t(Jn, { size: 20 }) }),
3873
+ !u && /* @__PURE__ */ t("button", { type: "button", className: V("rqmii-chat-circle-button", d && "is-active"), onClick: l, "aria-label": r ? E(n, "stopVoice") : E(n, "startVoice"), children: r ? /* @__PURE__ */ t(we, { size: 20 }) : /* @__PURE__ */ t(Ve, { size: 20 }) }),
3874
+ /* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-circle-button is-danger", onClick: o, "aria-label": E(n, "endCall"), children: /* @__PURE__ */ t(Ne, { size: 20 }) })
3846
3875
  ] })
3847
3876
  ] });
3848
- }), Bn = A.memo(function({
3877
+ }), Bt = L.memo(function({
3849
3878
  agent: e,
3850
- language: t,
3879
+ language: n,
3851
3880
  languages: i,
3852
3881
  chatKind: o,
3853
- messages: s,
3854
- onLanguageChange: r,
3855
- onMinimize: c,
3882
+ messages: r,
3883
+ onLanguageChange: s,
3884
+ onMinimize: d,
3856
3885
  onStartNewVoice: l,
3857
- onStartNewText: d,
3886
+ onStartNewText: c,
3858
3887
  isVoiceSetupLoading: m = !1,
3859
3888
  visualViewportHeight: u,
3860
3889
  rating: h,
3861
3890
  endedBy: F,
3862
3891
  sessionId: b,
3863
- ratingInteractive: M,
3864
- showTellUsMore: S,
3892
+ ratingInteractive: x,
3893
+ showTellUsMore: w,
3865
3894
  onRate: T,
3866
3895
  onTellUsMore: k
3867
3896
  }) {
3868
- const p = Fe(u), g = e.widget?.behavior?.conversation_ended_screen, w = !!g?.post_chat_rating_enabled, E = g?.show_conversation_id ?? !0, f = /* @__PURE__ */ n(
3869
- _n,
3897
+ const p = Fe(u), g = e.widget?.behavior?.conversation_ended_screen, M = !!g?.post_chat_rating_enabled, z = g?.show_conversation_id ?? !0, f = /* @__PURE__ */ t(
3898
+ Lt,
3870
3899
  {
3871
- language: t,
3900
+ language: n,
3872
3901
  rating: h,
3873
3902
  endedBy: F,
3874
3903
  sessionId: b,
3875
- interactive: M,
3876
- showTellUsMore: S,
3877
- showRating: w,
3878
- showConversationId: E,
3904
+ interactive: x,
3905
+ showTellUsMore: w,
3906
+ showRating: M,
3907
+ showConversationId: z,
3879
3908
  onRate: T,
3880
3909
  onTellUsMore: k
3881
3910
  }
3882
3911
  ), P = o === "voice" || o === "text_and_voice", C = o === "text" || o === "text_and_voice", _ = /* @__PURE__ */ v("div", { className: "rqmii-chat-topbar-actions rqmii-chat-topbar-actions--ended", children: [
3883
- /* @__PURE__ */ n(Ge, { language: t, languages: i, onChange: r }),
3884
- /* @__PURE__ */ n(
3912
+ /* @__PURE__ */ t(Ge, { language: n, languages: i, onChange: s }),
3913
+ /* @__PURE__ */ t(
3885
3914
  "button",
3886
3915
  {
3887
3916
  type: "button",
3888
3917
  className: "rqmii-chat-circle-button",
3889
- onClick: c,
3890
- "aria-label": z(t, "minimize"),
3891
- children: /* @__PURE__ */ n(xe, { size: 20 })
3918
+ onClick: d,
3919
+ "aria-label": E(n, "minimize"),
3920
+ children: /* @__PURE__ */ t(Se, { size: 20 })
3892
3921
  }
3893
3922
  ),
3894
- P && /* @__PURE__ */ n(
3923
+ P && /* @__PURE__ */ t(
3895
3924
  "button",
3896
3925
  {
3897
3926
  type: "button",
3898
3927
  className: "rqmii-chat-circle-button rqmii-chat-circle-button--call-start",
3899
3928
  onClick: l,
3900
3929
  disabled: m,
3901
- "aria-label": z(t, "startVoice"),
3902
- children: m ? /* @__PURE__ */ n(ze, { className: "rqmii-chat-spin", size: 20 }) : /* @__PURE__ */ n(je, { size: 20 })
3930
+ "aria-label": E(n, "startVoice"),
3931
+ children: m ? /* @__PURE__ */ t(ze, { className: "rqmii-chat-spin", size: 20 }) : /* @__PURE__ */ t(je, { size: 20 })
3903
3932
  }
3904
3933
  )
3905
3934
  ] });
3906
3935
  if (o === "voice")
3907
3936
  return /* @__PURE__ */ v("div", { className: V("rqmii-chat-panel rqmii-chat-panel--voice-call", Z()), style: p, children: [
3908
3937
  /* @__PURE__ */ v("div", { className: "rqmii-chat-topbar", children: [
3909
- /* @__PURE__ */ n("span", {}),
3938
+ /* @__PURE__ */ t("span", {}),
3910
3939
  _
3911
3940
  ] }),
3912
3941
  /* @__PURE__ */ v("div", { className: "rqmii-chat-voice-frame", children: [
3913
- /* @__PURE__ */ n(te, { agent: e, size: "hero" }),
3914
- /* @__PURE__ */ n("div", { className: "rqmii-chat-agent-name", children: e.name }),
3942
+ /* @__PURE__ */ t(ne, { agent: e, size: "hero" }),
3943
+ /* @__PURE__ */ t("div", { className: "rqmii-chat-agent-name", children: e.name }),
3915
3944
  f
3916
3945
  ] }),
3917
- /* @__PURE__ */ n(ue, { language: t, agent: e })
3946
+ /* @__PURE__ */ t(ue, { language: n, agent: e })
3918
3947
  ] });
3919
- const x = e.widget?.appearance?.show_topbar_avatar_image !== !1;
3948
+ const S = e.widget?.appearance?.show_topbar_avatar_image !== !1;
3920
3949
  return /* @__PURE__ */ v("div", { className: V("rqmii-chat-panel rqmii-chat-panel--conversation", Z()), style: p, children: [
3921
3950
  /* @__PURE__ */ v("div", { className: "rqmii-chat-topbar", children: [
3922
- x ? /* @__PURE__ */ n(te, { agent: e, size: "header" }) : /* @__PURE__ */ n("span", {}),
3951
+ S ? /* @__PURE__ */ t(ne, { agent: e, size: "header" }) : /* @__PURE__ */ t("span", {}),
3923
3952
  _
3924
3953
  ] }),
3925
- /* @__PURE__ */ n(Ue, { messages: s, language: t }),
3954
+ /* @__PURE__ */ t(Ue, { messages: r, language: n }),
3926
3955
  f,
3927
- C && /* @__PURE__ */ n(Me, { language: t, onSend: d }),
3928
- /* @__PURE__ */ n(ue, { language: t, agent: e })
3956
+ C && /* @__PURE__ */ t(xe, { language: n, onSend: c }),
3957
+ /* @__PURE__ */ t(ue, { language: n, agent: e })
3929
3958
  ] });
3930
- }), ba = A.memo(function({ agent: e, language: t, onClose: i }) {
3931
- const { streamingUrl: o, isCloudStreamConnected: s, cloudStreamError: r } = He(), { isAvatarSpeaking: c } = He(), { messages: l, sendTextMessage: d } = ge();
3959
+ }), ba = L.memo(function({ agent: e, language: n, onClose: i }) {
3960
+ const { streamingUrl: o, isCloudStreamConnected: r, cloudStreamError: s } = He(), { isAvatarSpeaking: d } = He(), { messages: l, sendTextMessage: c } = ge();
3932
3961
  return /* @__PURE__ */ v("div", { className: V("rqmii-avatar-panel", Z()), children: [
3933
3962
  /* @__PURE__ */ v("div", { className: "rqmii-avatar-stream", children: [
3934
- /* @__PURE__ */ n(A.Suspense, { fallback: /* @__PURE__ */ n("div", { className: "rqmii-avatar-overlay", children: z(t, "loading") }), children: /* @__PURE__ */ n(In, { autoConnect: !0, muted: !1 }) }),
3935
- !o && /* @__PURE__ */ n("div", { className: "rqmii-avatar-overlay", children: z(t, "loading") }),
3936
- r && /* @__PURE__ */ n("div", { className: "rqmii-avatar-overlay", children: z(t, "connectionFailed") }),
3963
+ /* @__PURE__ */ t(L.Suspense, { fallback: /* @__PURE__ */ t("div", { className: "rqmii-avatar-overlay", children: E(n, "loading") }), children: /* @__PURE__ */ t(qt, { autoConnect: !0, muted: !1 }) }),
3964
+ !o && /* @__PURE__ */ t("div", { className: "rqmii-avatar-overlay", children: E(n, "loading") }),
3965
+ s && /* @__PURE__ */ t("div", { className: "rqmii-avatar-overlay", children: E(n, "connectionFailed") }),
3937
3966
  /* @__PURE__ */ v("div", { className: "rqmii-avatar-controls", children: [
3938
- /* @__PURE__ */ n(te, { agent: e, size: "header", active: c }),
3939
- /* @__PURE__ */ n("div", { className: "rqmii-chat-header-spacer" }),
3940
- /* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button", disabled: !s, children: /* @__PURE__ */ n(Se, { size: 20 }) }),
3941
- /* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button is-danger", onClick: i, children: /* @__PURE__ */ n(De, { size: 20 }) })
3967
+ /* @__PURE__ */ t(ne, { agent: e, size: "header", active: d }),
3968
+ /* @__PURE__ */ t("div", { className: "rqmii-chat-header-spacer" }),
3969
+ /* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-circle-button", disabled: !r, children: /* @__PURE__ */ t(we, { size: 20 }) }),
3970
+ /* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-circle-button is-danger", onClick: i, children: /* @__PURE__ */ t(De, { size: 20 }) })
3942
3971
  ] })
3943
3972
  ] }),
3944
3973
  e.useText && /* @__PURE__ */ v("div", { className: "rqmii-avatar-sidebar", children: [
3945
- /* @__PURE__ */ n(Ue, { messages: l, language: t }),
3946
- /* @__PURE__ */ n(Me, { language: t, onSend: d, variant: "compact" }),
3947
- /* @__PURE__ */ n(ue, { language: t, agent: e })
3974
+ /* @__PURE__ */ t(Ue, { messages: l, language: n }),
3975
+ /* @__PURE__ */ t(xe, { language: n, onSend: c, variant: "compact" }),
3976
+ /* @__PURE__ */ t(ue, { language: n, agent: e })
3948
3977
  ] })
3949
3978
  ] });
3950
3979
  });
3951
- function Gn(a) {
3952
- const e = a.trim(), t = e.toLowerCase();
3953
- return t.startsWith("javascript:") || t.startsWith("data:") || t.startsWith("vbscript:") ? "#" : e;
3980
+ function Rt(a) {
3981
+ const e = a.trim(), n = e.toLowerCase();
3982
+ return n.startsWith("javascript:") || n.startsWith("data:") || n.startsWith("vbscript:") ? "#" : e;
3954
3983
  }
3955
3984
  function se(a) {
3956
- const e = [], t = /(\[([^\]]+)\]\(([^)]+)\))|(\*\*([^*]+)\*\*|__([^_]+)__)|(\*([^*]+)\*|_([^_]+)_)|(~~([^~]+)~~)|(`([^`]+)`)/g;
3985
+ const e = [], n = /(\[([^\]]+)\]\(([^)]+)\))|(\*\*([^*]+)\*\*|__([^_]+)__)|(\*([^*]+)\*|_([^_]+)_)|(~~([^~]+)~~)|(`([^`]+)`)/g;
3957
3986
  let i = 0, o;
3958
- for (; (o = t.exec(a)) !== null; ) {
3987
+ for (; (o = n.exec(a)) !== null; ) {
3959
3988
  o.index > i && e.push(a.slice(i, o.index));
3960
- const s = `inline-${o.index}-${o[0]}`;
3989
+ const r = `inline-${o.index}-${o[0]}`;
3961
3990
  if (o[1]) {
3962
- const r = o[2], c = o[3];
3991
+ const s = o[2], d = o[3];
3963
3992
  e.push(
3964
- /* @__PURE__ */ n(
3993
+ /* @__PURE__ */ t(
3965
3994
  "a",
3966
3995
  {
3967
- href: Gn(c),
3996
+ href: Rt(d),
3968
3997
  target: "_blank",
3969
3998
  rel: "noopener noreferrer",
3970
3999
  className: "rqmii-markdown-link",
3971
- children: se(r)
4000
+ children: se(s)
3972
4001
  },
3973
- s
4002
+ r
3974
4003
  )
3975
4004
  );
3976
4005
  } else if (o[4]) {
3977
- const r = o[5] || o[6];
4006
+ const s = o[5] || o[6];
3978
4007
  e.push(
3979
- /* @__PURE__ */ n("strong", { className: "rqmii-markdown-strong", children: se(r) }, s)
4008
+ /* @__PURE__ */ t("strong", { className: "rqmii-markdown-strong", children: se(s) }, r)
3980
4009
  );
3981
4010
  } else if (o[7]) {
3982
- const r = o[8] || o[9];
4011
+ const s = o[8] || o[9];
3983
4012
  e.push(
3984
- /* @__PURE__ */ n("em", { className: "rqmii-markdown-em", children: se(r) }, s)
4013
+ /* @__PURE__ */ t("em", { className: "rqmii-markdown-em", children: se(s) }, r)
3985
4014
  );
3986
4015
  } else if (o[10]) {
3987
- const r = o[11];
4016
+ const s = o[11];
3988
4017
  e.push(
3989
- /* @__PURE__ */ n("del", { className: "rqmii-markdown-del", children: se(r) }, s)
4018
+ /* @__PURE__ */ t("del", { className: "rqmii-markdown-del", children: se(s) }, r)
3990
4019
  );
3991
4020
  } else if (o[12]) {
3992
- const r = o[13];
4021
+ const s = o[13];
3993
4022
  e.push(
3994
- /* @__PURE__ */ n("code", { className: "rqmii-markdown-code", children: r }, s)
4023
+ /* @__PURE__ */ t("code", { className: "rqmii-markdown-code", children: s }, r)
3995
4024
  );
3996
4025
  }
3997
- i = t.lastIndex;
4026
+ i = n.lastIndex;
3998
4027
  }
3999
4028
  return i < a.length && e.push(a.slice(i)), e;
4000
4029
  }
4001
4030
  function ia(a, e) {
4002
- const t = a.split(`
4031
+ const n = a.split(`
4003
4032
  `);
4004
- return t.length === 1 ? se(t[0]) : t.map((i, o) => /* @__PURE__ */ v(A.Fragment, { children: [
4005
- o > 0 && /* @__PURE__ */ n("br", {}),
4033
+ return n.length === 1 ? se(n[0]) : n.map((i, o) => /* @__PURE__ */ v(L.Fragment, { children: [
4034
+ o > 0 && /* @__PURE__ */ t("br", {}),
4006
4035
  se(i)
4007
4036
  ] }, `${e}-ln-${o}`));
4008
4037
  }
4009
- function Un({
4038
+ function Gt({
4010
4039
  content: a,
4011
4040
  className: e = ""
4012
4041
  }) {
4013
4042
  if (!a || !a.trim()) return null;
4014
- const t = a.replace(/\r\n/g, `
4043
+ const n = a.replace(/\r\n/g, `
4015
4044
  `).split(/\n{2,}/), i = [];
4016
- return t.forEach((o, s) => {
4017
- const r = o.trim();
4018
- if (!r) return;
4019
- const c = `block-${s}`;
4020
- if (r.startsWith("#")) {
4021
- const l = r.match(/^(#{1,6})\s+(.+)$/s);
4045
+ return n.forEach((o, r) => {
4046
+ const s = o.trim();
4047
+ if (!s) return;
4048
+ const d = `block-${r}`;
4049
+ if (s.startsWith("#")) {
4050
+ const l = s.match(/^(#{1,6})\s+(.+)$/s);
4022
4051
  if (l) {
4023
- const d = l[1].length, m = l[2].trim(), u = se(m);
4024
- d === 1 ? i.push(/* @__PURE__ */ n("h3", { className: "rqmii-markdown-h1", children: u }, c)) : d === 2 ? i.push(/* @__PURE__ */ n("h4", { className: "rqmii-markdown-h2", children: u }, c)) : i.push(/* @__PURE__ */ n("h5", { className: "rqmii-markdown-h3", children: u }, c));
4052
+ const c = l[1].length, m = l[2].trim(), u = se(m);
4053
+ c === 1 ? i.push(/* @__PURE__ */ t("h3", { className: "rqmii-markdown-h1", children: u }, d)) : c === 2 ? i.push(/* @__PURE__ */ t("h4", { className: "rqmii-markdown-h2", children: u }, d)) : i.push(/* @__PURE__ */ t("h5", { className: "rqmii-markdown-h3", children: u }, d));
4025
4054
  return;
4026
4055
  }
4027
4056
  }
4028
- if (r.startsWith(">")) {
4029
- const l = r.split(`
4030
- `).map((d) => d.replace(/^>\s?/, "")).join(`
4057
+ if (s.startsWith(">")) {
4058
+ const l = s.split(`
4059
+ `).map((c) => c.replace(/^>\s?/, "")).join(`
4031
4060
  `);
4032
4061
  i.push(
4033
- /* @__PURE__ */ n("blockquote", { className: "rqmii-markdown-blockquote", children: ia(l, c) }, c)
4062
+ /* @__PURE__ */ t("blockquote", { className: "rqmii-markdown-blockquote", children: ia(l, d) }, d)
4034
4063
  );
4035
4064
  return;
4036
4065
  }
4037
- if (/^[-*]\s+/m.test(r)) {
4038
- const l = r.split(`
4066
+ if (/^[-*]\s+/m.test(s)) {
4067
+ const l = s.split(`
4039
4068
  `);
4040
4069
  if (l.every((m) => /^[-*]\s+/.test(m.trim()) || m.trim() === "")) {
4041
4070
  const m = l.map((u) => u.trim().replace(/^[-*]\s+/, "")).filter(Boolean);
4042
4071
  i.push(
4043
- /* @__PURE__ */ n("ul", { className: "rqmii-markdown-ul", children: m.map((u, h) => /* @__PURE__ */ n("li", { children: se(u) }, `${c}-li-${h}`)) }, c)
4072
+ /* @__PURE__ */ t("ul", { className: "rqmii-markdown-ul", children: m.map((u, h) => /* @__PURE__ */ t("li", { children: se(u) }, `${d}-li-${h}`)) }, d)
4044
4073
  );
4045
4074
  return;
4046
4075
  }
4047
4076
  }
4048
- if (/^\d+\.\s+/m.test(r)) {
4049
- const l = r.split(`
4077
+ if (/^\d+\.\s+/m.test(s)) {
4078
+ const l = s.split(`
4050
4079
  `);
4051
4080
  if (l.every((m) => /^\d+\.\s+/.test(m.trim()) || m.trim() === "")) {
4052
4081
  const m = l.map((u) => u.trim().replace(/^\d+\.\s+/, "")).filter(Boolean);
4053
4082
  i.push(
4054
- /* @__PURE__ */ n("ol", { className: "rqmii-markdown-ol", children: m.map((u, h) => /* @__PURE__ */ n("li", { children: se(u) }, `${c}-li-${h}`)) }, c)
4083
+ /* @__PURE__ */ t("ol", { className: "rqmii-markdown-ol", children: m.map((u, h) => /* @__PURE__ */ t("li", { children: se(u) }, `${d}-li-${h}`)) }, d)
4055
4084
  );
4056
4085
  return;
4057
4086
  }
4058
4087
  }
4059
4088
  i.push(
4060
- /* @__PURE__ */ n("p", { className: "rqmii-markdown-p", children: ia(r, c) }, c)
4089
+ /* @__PURE__ */ t("p", { className: "rqmii-markdown-p", children: ia(s, d) }, d)
4061
4090
  );
4062
- }), /* @__PURE__ */ n("div", { className: `rqmii-markdown ${e}`.trim(), children: i });
4091
+ }), /* @__PURE__ */ t("div", { className: `rqmii-markdown ${e}`.trim(), children: i });
4063
4092
  }
4064
- const Kn = A.memo(Un);
4065
- function On({
4093
+ const Ut = L.memo(Gt);
4094
+ function Kt({
4066
4095
  language: a,
4067
4096
  content: e,
4068
- config: t,
4097
+ config: n,
4069
4098
  agent: i,
4070
4099
  onAccept: o,
4071
- onDecline: s
4100
+ onDecline: r
4072
4101
  }) {
4073
- const r = e || t?.body?.[a] || z(a, "consentBody") || "", c = t?.acceptLabel?.[a] || z(a, "consentAccept"), l = t?.declineLabel?.[a] || z(a, "consentDecline");
4102
+ const s = e || n?.body?.[a] || E(a, "consentBody") || "", d = n?.acceptLabel?.[a] || E(a, "consentAccept"), l = n?.declineLabel?.[a] || E(a, "consentDecline");
4074
4103
  return /* @__PURE__ */ v(
4075
4104
  "div",
4076
4105
  {
@@ -4078,26 +4107,26 @@ function On({
4078
4107
  "rqmii-chat-panel rqmii-chat-panel--start rqmii-chat-panel--consent",
4079
4108
  Z()
4080
4109
  ),
4081
- dir: re(a),
4110
+ dir: oe(a),
4082
4111
  children: [
4083
- /* @__PURE__ */ n("div", { className: "rqmii-chat-consent-body", children: /* @__PURE__ */ n(Kn, { content: r }) }),
4112
+ /* @__PURE__ */ t("div", { className: "rqmii-chat-consent-body", children: /* @__PURE__ */ t(Ut, { content: s }) }),
4084
4113
  /* @__PURE__ */ v("div", { className: "rqmii-chat-consent-actions", children: [
4085
- /* @__PURE__ */ n(
4114
+ /* @__PURE__ */ t(
4086
4115
  "button",
4087
4116
  {
4088
4117
  type: "button",
4089
4118
  className: "rqmii-chat-consent-button rqmii-chat-consent-button--decline",
4090
- onClick: s,
4119
+ onClick: r,
4091
4120
  children: l
4092
4121
  }
4093
4122
  ),
4094
- /* @__PURE__ */ n(
4123
+ /* @__PURE__ */ t(
4095
4124
  "button",
4096
4125
  {
4097
4126
  type: "button",
4098
4127
  className: "rqmii-chat-consent-button rqmii-chat-consent-button--accept",
4099
4128
  onClick: o,
4100
- children: c
4129
+ children: d
4101
4130
  }
4102
4131
  )
4103
4132
  ] })
@@ -4105,30 +4134,30 @@ function On({
4105
4134
  }
4106
4135
  );
4107
4136
  }
4108
- function Yn(a) {
4137
+ function Ot(a) {
4109
4138
  return a ? typeof a == "string" ? a : typeof a == "object" && typeof a.text == "string" ? a.text : "" : "";
4110
4139
  }
4111
- function Qn(a) {
4140
+ function Yt(a) {
4112
4141
  return a === "text" || a === "voice" || a === "text_and_voice";
4113
4142
  }
4114
- const Ke = A.memo(function({
4143
+ const Ke = L.memo(function({
4115
4144
  agent: e,
4116
- language: t,
4145
+ language: n,
4117
4146
  languages: i,
4118
- onLanguageChange: o = oe,
4119
- onEndSession: s = oe,
4120
- onMinimize: r,
4121
- messages: c,
4147
+ onLanguageChange: o = re,
4148
+ onEndSession: r = re,
4149
+ onMinimize: s,
4150
+ messages: d,
4122
4151
  onSendMessage: l,
4123
- isPreview: d = !1,
4152
+ isPreview: c = !1,
4124
4153
  chatKind: m,
4125
4154
  sdk: u,
4126
4155
  renderPanel: h,
4127
4156
  messagesRef: F,
4128
4157
  initialText: b,
4129
- autoStartVoice: M
4158
+ autoStartVoice: x
4130
4159
  }) {
4131
- const S = e.widget?.consent || e.consent, T = !!S?.enabled, k = S?.content?.[t] || S?.body?.[t] || "", p = S?.one_time !== !1, g = e.id ? `rqmii_consent_${e.id}` : null, [w, E] = y(() => {
4160
+ const w = e.widget?.consent || e.consent, T = !!w?.enabled, k = w?.content?.[n] || w?.body?.[n] || "", p = w?.one_time !== !1, g = e.id ? `rqmii_consent_${e.id}` : null, [M, z] = y(() => {
4132
4161
  if (!T || !k) return !0;
4133
4162
  if (p && g && typeof window < "u")
4134
4163
  try {
@@ -4137,13 +4166,13 @@ const Ke = A.memo(function({
4137
4166
  return !1;
4138
4167
  }
4139
4168
  return !1;
4140
- }), f = m || Ee(e), [P, C] = y(() => f === "voice" && u.isSessionReady || f === "voice" && !!M), [_, x] = y(() => (f === "text" || f === "text_and_voice") && u.isSessionReady || !!b || f === "text_and_voice" && !!M), [j, R] = y(!1), [D, L] = y(!1), [G, N] = y(null), O = hn(f === "voice" && P || f === "text_and_voice" && _), U = gn(), J = T && !!k && !w && !d, X = Qn(f), { events: W } = pe();
4169
+ }), f = m || Ee(e), [P, C] = y(() => f === "voice" && u.isSessionReady || f === "voice" && !!x), [_, S] = y(() => (f === "text" || f === "text_and_voice") && u.isSessionReady || !!b || f === "text_and_voice" && !!x), [j, B] = y(!1), [D, A] = y(!1), [G, N] = y(null), O = mt(f === "voice" && P || f === "text_and_voice" && _), U = ht(), J = T && !!k && !M && !c, X = Yt(f), { events: W } = pe();
4141
4170
  I(() => {
4142
4171
  if (!W) return;
4143
4172
  const Q = () => {
4144
- X && _e() && R(!0);
4173
+ X && _e() && B(!0);
4145
4174
  }, be = () => {
4146
- X && R(!1);
4175
+ X && B(!1);
4147
4176
  };
4148
4177
  return W.on("minimize_chat", Q), W.on("maximize_chat", be), () => {
4149
4178
  W.off("minimize_chat", Q), W.off("maximize_chat", be);
@@ -4155,13 +4184,13 @@ const Ke = A.memo(function({
4155
4184
  window.localStorage.setItem(g, "true");
4156
4185
  } catch {
4157
4186
  }
4158
- E(!0);
4187
+ z(!0);
4159
4188
  }, [p, g]), K = ie(() => {
4160
- r ? r() : s();
4161
- }, [r, s]), me = (Q) => {
4162
- o(Q), d || u.changeSessionLanguage(Q);
4189
+ s ? s() : r();
4190
+ }, [s, r]), me = (Q) => {
4191
+ o(Q), c || u.changeSessionLanguage(Q);
4163
4192
  }, ae = ie((Q) => {
4164
- if (N(null), L(!0), l) {
4193
+ if (N(null), A(!0), l) {
4165
4194
  l(Q);
4166
4195
  return;
4167
4196
  }
@@ -4170,23 +4199,23 @@ const Ke = A.memo(function({
4170
4199
  I(() => {
4171
4200
  F && (F.current = u.messages);
4172
4201
  });
4173
- const le = B(!1);
4202
+ const le = R(!1);
4174
4203
  I(() => {
4175
- le.current || (b ? (le.current = !0, ae(b)) : M && (le.current = !0, N(null), L(!0), u.isVoiceActive || u.startVoice()));
4204
+ le.current || (b ? (le.current = !0, ae(b)) : x && (le.current = !0, N(null), A(!0), u.isVoiceActive || u.startVoice()));
4176
4205
  }, []), I(() => {
4177
- D && u.isSessionReady && (L(!1), f === "voice" ? C(!0) : x(!0));
4206
+ D && u.isSessionReady && (A(!1), f === "voice" ? C(!0) : S(!0));
4178
4207
  }, [D, u.isSessionReady, f]), I(() => {
4179
- D && u.error && (L(!1), N(u.error));
4208
+ D && u.error && (A(!1), N(u.error));
4180
4209
  }, [D, u.error]);
4181
4210
  const ce = ie(() => {
4182
- N(null), L(!0), u.isVoiceActive || u.startVoice();
4211
+ N(null), A(!0), u.isVoiceActive || u.startVoice();
4183
4212
  }, [u]);
4184
- if (u.error && !d && (_ || P)) return /* @__PURE__ */ n(ha, { message: u.error, language: t, onClose: s });
4213
+ if (u.error && !c && (_ || P)) return /* @__PURE__ */ t(ha, { message: u.error, language: n, onClose: r });
4185
4214
  if (J)
4186
- return /* @__PURE__ */ n(
4187
- On,
4215
+ return /* @__PURE__ */ t(
4216
+ Kt,
4188
4217
  {
4189
- language: t,
4218
+ language: n,
4190
4219
  content: k,
4191
4220
  config: e.consent,
4192
4221
  agent: e,
@@ -4196,119 +4225,119 @@ const Ke = A.memo(function({
4196
4225
  );
4197
4226
  const he = {
4198
4227
  agent: e,
4199
- language: t,
4228
+ language: n,
4200
4229
  languages: i,
4201
4230
  chatKind: f,
4202
4231
  sdk: u,
4203
- isPreview: d,
4232
+ isPreview: c,
4204
4233
  onLanguageChange: me,
4205
- onClose: s,
4206
- onMinimize: X ? () => R(!0) : void 0,
4207
- onRestore: X ? () => R(!1) : void 0,
4234
+ onClose: r,
4235
+ onMinimize: X ? () => B(!0) : void 0,
4236
+ onRestore: X ? () => B(!1) : void 0,
4208
4237
  onSend: ae,
4209
4238
  voiceStarted: P,
4210
4239
  conversationStarted: _,
4211
4240
  isMinimized: j,
4212
4241
  elapsed: O,
4213
4242
  setVoiceStarted: C,
4214
- setConversationStarted: x
4243
+ setConversationStarted: S
4215
4244
  };
4216
- return h ? /* @__PURE__ */ n(Te, { children: h(he) }) : /* @__PURE__ */ n(Hn, { ...he, connecting: D, connectError: G, visualViewportHeight: U, onCloseWidget: r ?? s, initiateVoice: ce, onSendSuggestion: (Q) => {
4217
- N(null), L(!0), u.sendSuggestion?.(Q);
4245
+ return h ? /* @__PURE__ */ t(Te, { children: h(he) }) : /* @__PURE__ */ t(Qt, { ...he, connecting: D, connectError: G, visualViewportHeight: U, onCloseWidget: s ?? r, initiateVoice: ce, onSendSuggestion: (Q) => {
4246
+ N(null), A(!0), u.sendSuggestion?.(Q);
4218
4247
  } });
4219
- }), Hn = A.memo(function({ agent: e, language: t, languages: i, chatKind: o, sdk: s, onLanguageChange: r, onClose: c, onMinimize: l, onRestore: d, onSend: m, voiceStarted: u, conversationStarted: h, isMinimized: F, elapsed: b, setVoiceStarted: M, setConversationStarted: S, visualViewportHeight: T, connecting: k = !1, connectError: p = null, onCloseWidget: g, initiateVoice: w, onSendSuggestion: E }) {
4220
- const f = e.widget?.behavior?.typing_indicator_enabled ?? !0, P = o === "text" ? s.waitingForResponse && f : !1, C = s.messages;
4221
- if (o === "avatar") return /* @__PURE__ */ n(ba, { agent: e, language: t, onClose: c });
4248
+ }), Qt = L.memo(function({ agent: e, language: n, languages: i, chatKind: o, sdk: r, onLanguageChange: s, onClose: d, onMinimize: l, onRestore: c, onSend: m, voiceStarted: u, conversationStarted: h, isMinimized: F, elapsed: b, setVoiceStarted: x, setConversationStarted: w, visualViewportHeight: T, connecting: k = !1, connectError: p = null, onCloseWidget: g, initiateVoice: M, onSendSuggestion: z }) {
4249
+ const f = e.widget?.behavior?.typing_indicator_enabled ?? !0, P = o === "text" ? r.waitingForResponse && f : !1, C = r.messages;
4250
+ if (o === "avatar") return /* @__PURE__ */ t(ba, { agent: e, language: n, onClose: d });
4222
4251
  if (F)
4223
- return /* @__PURE__ */ n(Rn, { agent: e, language: t, onRestore: d, onClose: c, isListening: s.isVoiceActive, isAudioPlaying: s.isAudioPlaying, isSpeaking: s.vad.isSpeaking, onToggleVoice: s.toggleVoice, elapsed: b, variant: o === "text" ? "text" : "voice" });
4252
+ return /* @__PURE__ */ t(Dt, { agent: e, language: n, onRestore: c, onClose: d, isListening: r.isVoiceActive, isAudioPlaying: r.isAudioPlaying, isSpeaking: r.vad.isSpeaking, onToggleVoice: r.toggleVoice, elapsed: b, variant: o === "text" ? "text" : "voice" });
4224
4253
  if (o === "voice" && u)
4225
- return /* @__PURE__ */ n(Dn, { agent: e, language: t, onEndSession: c, onMinimize: l, isListening: s.isVoiceActive, isLoading: s.vad.isLoading, isSpeaking: s.vad.isSpeaking, isAudioPlaying: s.isAudioPlaying, isAgentThinking: s.isAgentThinking, isAgentSpeaking: s.isAgentSpeaking, onToggleVoice: s.toggleVoice, elapsed: b, visualViewportHeight: T });
4254
+ return /* @__PURE__ */ t(jt, { agent: e, language: n, onEndSession: d, onMinimize: l, isListening: r.isVoiceActive, isLoading: r.vad.isLoading, isSpeaking: r.vad.isSpeaking, isAudioPlaying: r.isAudioPlaying, isAgentThinking: r.isAgentThinking, isAgentSpeaking: r.isAgentSpeaking, onToggleVoice: r.toggleVoice, elapsed: b, visualViewportHeight: T });
4226
4255
  if (o === "voice")
4227
- return /* @__PURE__ */ n(Nn, { agent: e, language: t, languages: i, onLanguageChange: r, onClose: g, isAudioPlaying: s.isAudioPlaying, isVoiceSetupLoading: s.isVoiceSetupLoading || k, onStartVoice: w, visualViewportHeight: T });
4228
- if (!h && (s.messages.length === 0 || k)) {
4229
- const _ = (e.widget?.behavior?.suggested_messages?.[t] || e.conversation?.suggested_messages?.[t])?.filter((R) => R.trim()) || void 0, x = (R) => {
4230
- s.sendSuggestion ? E(R) : m?.(R);
4256
+ return /* @__PURE__ */ t(Vt, { agent: e, language: n, languages: i, onLanguageChange: s, onClose: g, isAudioPlaying: r.isAudioPlaying, isVoiceSetupLoading: r.isVoiceSetupLoading || k, onStartVoice: M, visualViewportHeight: T });
4257
+ if (!h && (r.messages.length === 0 || k)) {
4258
+ const _ = (e.widget?.behavior?.suggested_messages?.[n] || e.conversation?.suggested_messages?.[n])?.filter((B) => B.trim()) || void 0, S = (B) => {
4259
+ r.sendSuggestion ? z(B) : m?.(B);
4231
4260
  }, j = o === "text_and_voice" || Ee(e) === "text_and_voice";
4232
- return /* @__PURE__ */ n(Vn, { agent: e, language: t, languages: i, onLanguageChange: r, onClose: g, onSend: m, isVoiceEnabled: j, isAudioPlaying: s.isAudioPlaying, isVoiceSetupLoading: s.isVoiceSetupLoading || k, onStartVoice: w, visualViewportHeight: T, disabled: k, error: p || void 0, suggestions: _, onSuggestionClick: x, compact: !!_ });
4261
+ return /* @__PURE__ */ t(It, { agent: e, language: n, languages: i, onLanguageChange: s, onClose: g, onSend: m, isVoiceEnabled: j, isAudioPlaying: r.isAudioPlaying, isVoiceSetupLoading: r.isVoiceSetupLoading || k, onStartVoice: M, visualViewportHeight: T, disabled: k, error: p || void 0, suggestions: _, onSuggestionClick: S, compact: !!_ });
4233
4262
  }
4234
- return /* @__PURE__ */ n(jn, { agent: e, language: t, onEndSession: c, messages: C, partialTranscript: Yn(s.partialTranscript), onSend: m, isAudioPlaying: s.isAudioPlaying, isVoiceEnabled: o === "text_and_voice", isListening: s.isVoiceActive, isSpeaking: s.vad.isSpeaking, isLoading: s.vad.isLoading, isAgentThinking: s.isAgentThinking, isAgentSpeaking: s.isAgentSpeaking, onToggleVoice: s.toggleVoice, onStartVoice: s.startVoice, onMinimize: l, elapsed: b, visualViewportHeight: T, waitingForResponse: P });
4235
- }), Wn = { isListening: !1, isLoading: !1, isSpeaking: !1, toggle: async () => !1 };
4236
- function fa({ isSessionReady: a, sendTextMessage: e, messages: t }) {
4237
- const [i, o] = y(null), [s, r] = y(null), c = ie(() => {
4238
- o((l) => (l && (a ? e(l) : r(l)), null));
4263
+ return /* @__PURE__ */ t(Nt, { agent: e, language: n, onEndSession: d, messages: C, partialTranscript: Ot(r.partialTranscript), onSend: m, isAudioPlaying: r.isAudioPlaying, isVoiceEnabled: o === "text_and_voice", isListening: r.isVoiceActive, isSpeaking: r.vad.isSpeaking, isLoading: r.vad.isLoading, isAgentThinking: r.isAgentThinking, isAgentSpeaking: r.isAgentSpeaking, onToggleVoice: r.toggleVoice, onStartVoice: r.startVoice, onMinimize: l, elapsed: b, visualViewportHeight: T, waitingForResponse: P });
4264
+ }), Ht = { isListening: !1, isLoading: !1, isSpeaking: !1, toggle: async () => !1 };
4265
+ function fa({ isSessionReady: a, sendTextMessage: e, messages: n }) {
4266
+ const [i, o] = y(null), [r, s] = y(null), d = ie(() => {
4267
+ o((l) => (l && (a ? e(l) : s(l)), null));
4239
4268
  }, [a, e]);
4240
4269
  return I(() => {
4241
- i && t.length !== 0 && c();
4242
- }, [t, i, c]), I(() => {
4270
+ i && n.length !== 0 && d();
4271
+ }, [n, i, d]), I(() => {
4243
4272
  if (!i) return;
4244
- const l = setTimeout(c, 5e3);
4273
+ const l = setTimeout(d, 5e3);
4245
4274
  return () => clearTimeout(l);
4246
- }, [i, c]), I(() => {
4247
- !s || !a || (e(s), r(null));
4248
- }, [a, s, e]), { pendingWelcomeText: i, pendingMessage: s, setPendingWelcomeText: o, setPendingMessage: r, sendPendingWelcomeText: c };
4275
+ }, [i, d]), I(() => {
4276
+ !r || !a || (e(r), s(null));
4277
+ }, [a, r, e]), { pendingWelcomeText: i, pendingMessage: r, setPendingWelcomeText: o, setPendingMessage: s, sendPendingWelcomeText: d };
4249
4278
  }
4250
4279
  function Oe({ isSessionReady: a, signalClientReady: e }) {
4251
- const [t, i] = y(!1), [o, s] = y(void 0), r = B(!1);
4280
+ const [n, i] = y(!1), [o, r] = y(void 0), s = R(!1);
4252
4281
  return I(() => {
4253
- !a || r.current || !t || (r.current = !0, e(o), i(!1));
4254
- }, [a, t, o, e]), { emitClientReady: ie((l) => {
4255
- a ? (r.current = !0, e(l)) : (s(l), i(!0));
4282
+ !a || s.current || !n || (s.current = !0, e(o), i(!1));
4283
+ }, [a, n, o, e]), { emitClientReady: ie((l) => {
4284
+ a ? (s.current = !0, e(l)) : (r(l), i(!0));
4256
4285
  }, [a, e]) };
4257
4286
  }
4258
- const $n = 300;
4259
- function Zn(a) {
4260
- const { isPreview: e = !1, ...t } = a, { messages: i, sendTextMessage: o, emitUserMessage: s, addLocalMessage: r, clearMessages: c } = ge(), { changeSessionLanguage: l, clearSessionHistory: d, signalClientReady: m, error: u, isSessionReady: h, isAgentThinking: F, isAgentSpeaking: b } = pe(), M = B(!1), S = B(null), T = B(!1), [k, p] = y(!1), [g, w] = y(null), [E, f] = y(!1), P = B(i.length);
4287
+ const Wt = 300;
4288
+ function $t(a) {
4289
+ const { isPreview: e = !1, ...n } = a, { messages: i, sendTextMessage: o, emitUserMessage: r, addLocalMessage: s, clearMessages: d } = ge(), { changeSessionLanguage: l, clearSessionHistory: c, signalClientReady: m, error: u, isSessionReady: h, isAgentThinking: F, isAgentSpeaking: b } = pe(), x = R(!1), w = R(null), T = R(!1), [k, p] = y(!1), [g, M] = y(null), [z, f] = y(!1), P = R(i.length);
4261
4290
  I(() => {
4262
4291
  if (i.length > P.current) {
4263
- const L = i[i.length - 1];
4264
- L.role === "assistant" && L.streaming && f(!1);
4292
+ const A = i[i.length - 1];
4293
+ A.role === "assistant" && A.streaming && f(!1);
4265
4294
  }
4266
4295
  P.current = i.length;
4267
4296
  }, [i]), oa("message_rate_limited", ie(() => {
4268
4297
  f(!1);
4269
4298
  }, [])), I(() => {
4270
4299
  if (!h || !k || T.current) return;
4271
- const L = S.current;
4272
- if (L === null) return;
4273
- T.current = !0, S.current = null, r("user", L), w(null);
4300
+ const A = w.current;
4301
+ if (A === null) return;
4302
+ T.current = !0, w.current = null, s("user", A), M(null);
4274
4303
  const G = a.agent.welcomeMessages?.[a.language];
4275
4304
  m(G ? { welcomeMessage: G } : void 0);
4276
4305
  const N = setTimeout(() => {
4277
- s(L), f(!0);
4278
- }, $n);
4306
+ r(A), f(!0);
4307
+ }, Wt);
4279
4308
  return () => clearTimeout(N);
4280
- }, [h, k, m, s, r]);
4309
+ }, [h, k, m, r, s]);
4281
4310
  const C = $(() => g ? [{ id: "first-user", role: "user", text: g }, ...i] : i, [g, i]), _ = ie(() => {
4282
- w(null), c();
4283
- }, [c]), x = {
4311
+ M(null), d();
4312
+ }, [d]), S = {
4284
4313
  emitClientReady: m,
4285
- sendMessage: (L) => {
4286
- o(L);
4314
+ sendMessage: (A) => {
4315
+ o(A);
4287
4316
  },
4288
- queueForWelcome: oe,
4289
- enableVoice: oe,
4290
- disableVoice: oe,
4317
+ queueForWelcome: re,
4318
+ enableVoice: re,
4319
+ disableVoice: re,
4291
4320
  language: a.language,
4292
4321
  isSessionReady: h,
4293
4322
  supportsVoice: !1,
4294
4323
  isVoiceActive: !1,
4295
4324
  chatKind: "text"
4296
- }, j = (L, G) => {
4297
- a.onSessionStart?.(), M.current ? (f(!0), G.sendMessage(L)) : (M.current = !0, w(L), S.current = L, p(!0), f(!0));
4298
- }, R = (L) => {
4299
- a.onTextSend ? a.onTextSend(L, x) : j(L, x);
4325
+ }, j = (A, G) => {
4326
+ a.onSessionStart?.(), x.current ? (f(!0), G.sendMessage(A)) : (x.current = !0, M(A), w.current = A, p(!0), f(!0));
4327
+ }, B = (A) => {
4328
+ a.onTextSend ? a.onTextSend(A, S) : j(A, S);
4300
4329
  };
4301
- return /* @__PURE__ */ n(
4330
+ return /* @__PURE__ */ t(
4302
4331
  Ke,
4303
4332
  {
4304
- ...t,
4333
+ ...n,
4305
4334
  isPreview: e,
4306
4335
  chatKind: "text",
4307
4336
  sdk: {
4308
4337
  messages: C,
4309
- sendTextMessage: R,
4338
+ sendTextMessage: B,
4310
4339
  clearMessages: _,
4311
- clearSessionHistory: d,
4340
+ clearSessionHistory: c,
4312
4341
  isAudioPlaying: !1,
4313
4342
  partialTranscript: null,
4314
4343
  changeSessionLanguage: l,
@@ -4318,36 +4347,36 @@ function Zn(a) {
4318
4347
  isVoiceSetupLoading: !1,
4319
4348
  isVoiceActive: !1,
4320
4349
  isSessionReady: h,
4321
- vad: Wn,
4322
- startVoice: oe,
4323
- prepareVoice: oe,
4324
- toggleVoice: oe,
4350
+ vad: Ht,
4351
+ startVoice: re,
4352
+ prepareVoice: re,
4353
+ toggleVoice: re,
4325
4354
  signalClientReady: m,
4326
- waitingForResponse: E,
4327
- sendSuggestion: R
4355
+ waitingForResponse: z,
4356
+ sendSuggestion: B
4328
4357
  }
4329
4358
  }
4330
4359
  );
4331
4360
  }
4332
- function Jn(a) {
4333
- const { isPreview: e = !1, ...t } = a, { messages: i, sendTextMessage: o, clearMessages: s } = ge(), { isAudioPlaying: r, partialTranscript: c } = sa(), { changeSessionLanguage: l, clearSessionHistory: d, signalClientReady: m, error: u, isSessionReady: h, isAgentThinking: F, isAgentSpeaking: b } = pe(), { setPendingWelcomeText: M, setPendingMessage: S } = fa({ isSessionReady: h, sendTextMessage: o, messages: i }), { emitClientReady: T } = Oe({ isSessionReady: h, signalClientReady: m }), [k, p] = y(!1), g = ra({
4361
+ function Zt(a) {
4362
+ const { isPreview: e = !1, ...n } = a, { messages: i, sendTextMessage: o, clearMessages: r } = ge(), { isAudioPlaying: s, partialTranscript: d } = ra(), { changeSessionLanguage: l, clearSessionHistory: c, signalClientReady: m, error: u, isSessionReady: h, isAgentThinking: F, isAgentSpeaking: b } = pe(), { setPendingWelcomeText: x, setPendingMessage: w } = fa({ isSessionReady: h, sendTextMessage: o, messages: i }), { emitClientReady: T } = Oe({ isSessionReady: h, signalClientReady: m }), [k, p] = y(!1), g = sa({
4334
4363
  enabled: !0,
4335
4364
  preloadStream: !1
4336
- }), { isLoading: w, isListening: E, toggle: f } = g, P = w, C = E || k;
4365
+ }), { isLoading: M, isListening: z, toggle: f } = g, P = M, C = z || k;
4337
4366
  I(() => {
4338
- !k || !h || w || E || f();
4339
- }, [k, h, w, E, f]);
4367
+ !k || !h || M || z || f();
4368
+ }, [k, h, M, z, f]);
4340
4369
  const _ = () => {
4341
4370
  a.onSessionStart?.();
4342
- }, x = {
4371
+ }, S = {
4343
4372
  emitClientReady: T,
4344
4373
  sendMessage: (N) => {
4345
- h ? o(N) : S(N);
4374
+ h ? o(N) : w(N);
4346
4375
  },
4347
- queueForWelcome: (N) => M(N),
4376
+ queueForWelcome: (N) => x(N),
4348
4377
  enableVoice: () => p(!0),
4349
4378
  disableVoice: () => {
4350
- p(!1), E && f();
4379
+ p(!1), z && f();
4351
4380
  },
4352
4381
  language: a.language,
4353
4382
  isSessionReady: h,
@@ -4358,23 +4387,23 @@ function Jn(a) {
4358
4387
  _(), N.enableVoice();
4359
4388
  const Y = a.agent.welcomeMessages?.[a.language];
4360
4389
  N.emitClientReady(Y ? { welcomeMessage: Y } : void 0);
4361
- }, R = (N) => {
4390
+ }, B = (N) => {
4362
4391
  N.isVoiceActive ? N.disableVoice() : N.enableVoice();
4363
4392
  };
4364
- return /* @__PURE__ */ n(
4393
+ return /* @__PURE__ */ t(
4365
4394
  Ke,
4366
4395
  {
4367
- ...t,
4396
+ ...n,
4368
4397
  isPreview: e,
4369
4398
  chatKind: "voice",
4370
4399
  sdk: {
4371
4400
  messages: i,
4372
4401
  sendTextMessage: () => {
4373
4402
  },
4374
- clearMessages: s,
4375
- clearSessionHistory: d,
4376
- isAudioPlaying: r,
4377
- partialTranscript: c,
4403
+ clearMessages: r,
4404
+ clearSessionHistory: c,
4405
+ isAudioPlaying: s,
4406
+ partialTranscript: d,
4378
4407
  changeSessionLanguage: l,
4379
4408
  error: u,
4380
4409
  isAgentThinking: F,
@@ -4384,21 +4413,21 @@ function Jn(a) {
4384
4413
  isSessionReady: h,
4385
4414
  vad: g,
4386
4415
  startVoice: () => {
4387
- a.onVoiceStart ? a.onVoiceStart(x) : j(x);
4416
+ a.onVoiceStart ? a.onVoiceStart(S) : j(S);
4388
4417
  },
4389
4418
  prepareVoice: () => {
4390
4419
  },
4391
4420
  toggleVoice: () => {
4392
- a.onVoiceToggle ? a.onVoiceToggle(x) : R(x);
4421
+ a.onVoiceToggle ? a.onVoiceToggle(S) : B(S);
4393
4422
  },
4394
4423
  signalClientReady: m
4395
4424
  }
4396
4425
  }
4397
4426
  );
4398
4427
  }
4399
- const Xn = 300;
4400
- function ei(a) {
4401
- const { isPreview: e = !1, ...t } = a, { messages: i, sendTextMessage: o, emitUserMessage: s, addLocalMessage: r, clearMessages: c } = ge(), { isAudioPlaying: l, partialTranscript: d } = sa(), { changeSessionLanguage: m, clearSessionHistory: u, signalClientReady: h, error: F, isSessionReady: b, isAgentThinking: M, isAgentSpeaking: S } = pe(), { emitClientReady: T } = Oe({ isSessionReady: b, signalClientReady: h }), [k, p] = y(!1), g = B(null), [w, E] = y(!1), f = B(null), [P, C] = y(!1), _ = B(!1), x = B(!1), j = B(!1), [R, D] = y(null), [L, G] = y(!1), N = B(i.length);
4428
+ const Jt = 300;
4429
+ function Xt(a) {
4430
+ const { isPreview: e = !1, ...n } = a, { messages: i, sendTextMessage: o, emitUserMessage: r, addLocalMessage: s, clearMessages: d } = ge(), { isAudioPlaying: l, partialTranscript: c } = ra(), { changeSessionLanguage: m, clearSessionHistory: u, signalClientReady: h, error: F, isSessionReady: b, isAgentThinking: x, isAgentSpeaking: w } = pe(), { emitClientReady: T } = Oe({ isSessionReady: b, signalClientReady: h }), [k, p] = y(!1), g = R(null), [M, z] = y(!1), f = R(null), [P, C] = y(!1), _ = R(!1), S = R(!1), j = R(!1), [B, D] = y(null), [A, G] = y(!1), N = R(i.length);
4402
4431
  I(() => {
4403
4432
  if (i.length > N.current) {
4404
4433
  const q = i[i.length - 1];
@@ -4408,35 +4437,35 @@ function ei(a) {
4408
4437
  }, [i]), oa("message_rate_limited", ie(() => {
4409
4438
  G(!1);
4410
4439
  }, []));
4411
- const Y = ra({
4440
+ const Y = sa({
4412
4441
  enabled: !0,
4413
4442
  preloadStream: !1
4414
4443
  }), { isLoading: O, isListening: U, toggle: J } = Y, X = O, W = U || k;
4415
4444
  I(() => {
4416
4445
  !k || !b || O || U || J();
4417
4446
  }, [k, b, O, U, J]), I(() => {
4418
- if (!b || !w || j.current) return;
4447
+ if (!b || !M || j.current) return;
4419
4448
  const q = g.current;
4420
4449
  if (q === null) return;
4421
- j.current = !0, g.current = null, r("user", q), D(null);
4422
- const ne = a.agent.welcomeMessages?.[a.language];
4423
- h(ne ? { welcomeMessage: ne } : void 0);
4450
+ j.current = !0, g.current = null, s("user", q), D(null);
4451
+ const te = a.agent.welcomeMessages?.[a.language];
4452
+ h(te ? { welcomeMessage: te } : void 0);
4424
4453
  const Pe = setTimeout(() => {
4425
- s(q), G(!0);
4426
- }, Xn);
4454
+ r(q), G(!0);
4455
+ }, Jt);
4427
4456
  return () => clearTimeout(Pe);
4428
- }, [b, w, h, s, r]), I(() => {
4457
+ }, [b, M, h, r, s]), I(() => {
4429
4458
  if (!b || !P || _.current) return;
4430
4459
  const q = f.current;
4431
- q !== null && (_.current = !0, f.current = null, r("user", q), s(q), G(!0), C(!1));
4432
- }, [b, P, s, r]);
4433
- const ee = $(() => R ? [{ id: "first-user", role: "user", text: R }, ...i] : i, [R, i]), K = ie(() => {
4434
- D(null), x.current = !1, j.current = !1, c();
4435
- }, [c]), me = () => {
4460
+ q !== null && (_.current = !0, f.current = null, s("user", q), r(q), G(!0), C(!1));
4461
+ }, [b, P, r, s]);
4462
+ const ee = $(() => B ? [{ id: "first-user", role: "user", text: B }, ...i] : i, [B, i]), K = ie(() => {
4463
+ D(null), S.current = !1, j.current = !1, d();
4464
+ }, [d]), me = () => {
4436
4465
  a.onSessionStart?.();
4437
4466
  }, ae = {
4438
4467
  emitClientReady: (q) => {
4439
- j.current = !0, x.current = !0, T(q);
4468
+ j.current = !0, S.current = !0, T(q);
4440
4469
  },
4441
4470
  sendMessage: (q) => {
4442
4471
  o(q);
@@ -4452,15 +4481,15 @@ function ei(a) {
4452
4481
  supportsVoice: !0,
4453
4482
  isVoiceActive: W,
4454
4483
  chatKind: "text_and_voice"
4455
- }, le = (q, ne) => {
4456
- me(), !x.current && !j.current ? (x.current = !0, a.onStartText?.(), D(q), g.current = q, E(!0), G(!0)) : (x.current = !0, G(!0), ne.sendMessage(q));
4484
+ }, le = (q, te) => {
4485
+ me(), !S.current && !j.current ? (S.current = !0, a.onStartText?.(), D(q), g.current = q, z(!0), G(!0)) : (S.current = !0, G(!0), te.sendMessage(q));
4457
4486
  }, ce = (q) => {
4458
- me(), x.current = !0, j.current = !0, a.onStartVoice?.(), q.enableVoice();
4459
- const ne = a.agent.welcomeMessages?.[a.language];
4460
- q.emitClientReady(ne ? { welcomeMessage: ne } : void 0);
4487
+ me(), S.current = !0, j.current = !0, a.onStartVoice?.(), q.enableVoice();
4488
+ const te = a.agent.welcomeMessages?.[a.language];
4489
+ q.emitClientReady(te ? { welcomeMessage: te } : void 0);
4461
4490
  }, he = (q) => {
4462
4491
  q.isVoiceActive ? q.disableVoice() : q.enableVoice();
4463
- }, we = {
4492
+ }, Me = {
4464
4493
  messages: ee,
4465
4494
  sendTextMessage: (q) => {
4466
4495
  a.onTextSend ? a.onTextSend(q, ae) : le(q, ae);
@@ -4468,11 +4497,11 @@ function ei(a) {
4468
4497
  clearMessages: K,
4469
4498
  clearSessionHistory: u,
4470
4499
  isAudioPlaying: l,
4471
- partialTranscript: d,
4500
+ partialTranscript: c,
4472
4501
  changeSessionLanguage: m,
4473
4502
  error: F,
4474
- isAgentThinking: M,
4475
- isAgentSpeaking: S,
4503
+ isAgentThinking: x,
4504
+ isAgentSpeaking: w,
4476
4505
  isVoiceSetupLoading: X,
4477
4506
  isVoiceActive: W,
4478
4507
  isSessionReady: b,
@@ -4486,122 +4515,122 @@ function ei(a) {
4486
4515
  a.onVoiceToggle ? a.onVoiceToggle(ae) : he(ae);
4487
4516
  },
4488
4517
  signalClientReady: h,
4489
- waitingForResponse: L,
4518
+ waitingForResponse: A,
4490
4519
  sendSuggestion: (q) => {
4491
- me(), x.current = !0, j.current = !0, a.onStartVoice?.(), p(!0), f.current = q, C(!0);
4520
+ me(), S.current = !0, j.current = !0, a.onStartVoice?.(), p(!0), f.current = q, C(!0);
4492
4521
  }
4493
4522
  };
4494
- return /* @__PURE__ */ n(
4523
+ return /* @__PURE__ */ t(
4495
4524
  Ke,
4496
4525
  {
4497
- ...t,
4526
+ ...n,
4498
4527
  isPreview: e,
4499
4528
  chatKind: a.textOnly ? "text" : "text_and_voice",
4500
- sdk: we
4529
+ sdk: Me
4501
4530
  }
4502
4531
  );
4503
4532
  }
4504
- function ai(a) {
4505
- const { isPreview: e = !1, agent: t, language: i, languages: o, onLanguageChange: s, onEndSession: r, onMinimize: c, messages: l, onSendMessage: d } = a, m = r || c || oe, { messages: u, sendTextMessage: h, clearMessages: F } = ge(), { changeSessionLanguage: b, clearSessionHistory: M, signalClientReady: S, error: T, isSessionReady: k, isAgentThinking: p, isAgentSpeaking: g } = pe();
4506
- return fa({ isSessionReady: k, sendTextMessage: h, messages: u }), Oe({ isSessionReady: k, signalClientReady: S }), T && !e ? /* @__PURE__ */ n(ha, { message: T, language: i, onClose: m }) : /* @__PURE__ */ n(ba, { agent: t, language: i, onClose: m });
4533
+ function ei(a) {
4534
+ const { isPreview: e = !1, agent: n, language: i, languages: o, onLanguageChange: r, onEndSession: s, onMinimize: d, messages: l, onSendMessage: c } = a, m = s || d || re, { messages: u, sendTextMessage: h, clearMessages: F } = ge(), { changeSessionLanguage: b, clearSessionHistory: x, signalClientReady: w, error: T, isSessionReady: k, isAgentThinking: p, isAgentSpeaking: g } = pe();
4535
+ return fa({ isSessionReady: k, sendTextMessage: h, messages: u }), Oe({ isSessionReady: k, signalClientReady: w }), T && !e ? /* @__PURE__ */ t(ha, { message: T, language: i, onClose: m }) : /* @__PURE__ */ t(ba, { agent: n, language: i, onClose: m });
4507
4536
  }
4508
- function ci({ agent: a, defaultOpen: e, className: t = "", preview: i = !1, ChatBoxComponent: o }) {
4509
- const s = e !== void 0 ? e : a.widget?.behavior?.default_open ?? !1, [r, c] = A.useState(s), [l, d] = A.useState(a.defaultLanguage), m = $(() => ye(a.languages, a.defaultLanguage), [a.defaultLanguage, a.languages]);
4510
- A.useEffect(() => {
4511
- d(a.defaultLanguage);
4512
- }, [a.defaultLanguage]), A.useEffect(() => {
4513
- c(s);
4514
- }, [s]);
4515
- const u = a.widget?.appearance?.theme?.mode === "light" ? "light" : "dark", h = $(() => Re(a.widget?.appearance), [a.widget?.appearance]);
4537
+ function li({ agent: a, defaultOpen: e, className: n = "", preview: i = !1, ChatBoxComponent: o }) {
4538
+ const r = e !== void 0 ? e : a.widget?.behavior?.default_open ?? !1, [s, d] = L.useState(r), [l, c] = L.useState(a.defaultLanguage), m = $(() => ye(a.languages, a.defaultLanguage), [a.defaultLanguage, a.languages]);
4539
+ L.useEffect(() => {
4540
+ c(a.defaultLanguage);
4541
+ }, [a.defaultLanguage]), L.useEffect(() => {
4542
+ d(r);
4543
+ }, [r]);
4544
+ const u = a.widget?.appearance?.theme?.mode === "light" ? "light" : "dark", h = $(() => Be(a.widget?.appearance), [a.widget?.appearance]);
4516
4545
  return /* @__PURE__ */ v(
4517
4546
  "div",
4518
4547
  {
4519
- className: V("rqmii-chat-surface", `rqmii-theme-${u}`, i && "is-preview", t),
4548
+ className: V("rqmii-chat-surface", `rqmii-theme-${u}`, i && "is-preview", n),
4520
4549
  "data-theme": u,
4521
4550
  style: h,
4522
4551
  children: [
4523
- !r && /* @__PURE__ */ n(ma, { agent: a, onClick: () => c(!0), position: i ? "static" : "fixed" }),
4524
- r && /* @__PURE__ */ n(o, { agent: a, language: l, languages: m, onLanguageChange: d, onClose: () => c(!1), isPreview: i })
4552
+ !s && /* @__PURE__ */ t(ma, { agent: a, onClick: () => d(!0), position: i ? "static" : "fixed" }),
4553
+ s && /* @__PURE__ */ t(o, { agent: a, language: l, languages: m, onLanguageChange: c, onClose: () => d(!1), isPreview: i })
4525
4554
  ]
4526
4555
  }
4527
4556
  );
4528
4557
  }
4529
- function ti({ restUrl: a, identifier: e, fallbackAgent: t, withCredentials: i = !1, children: o, onError: s }) {
4530
- const [r, c] = y(() => t ? ve(t) : null), [l, d] = y(null);
4558
+ function ai({ restUrl: a, identifier: e, fallbackAgent: n, withCredentials: i = !1, children: o, onError: r }) {
4559
+ const [s, d] = y(() => n ? ve(n) : null), [l, c] = y(null);
4531
4560
  return I(() => {
4532
- t && (c(ve(t)), d(null));
4533
- }, [t]), I(() => {
4534
- if (!e || t) return;
4561
+ n && (d(ve(n)), c(null));
4562
+ }, [n]), I(() => {
4563
+ if (!e || n) return;
4535
4564
  const m = new AbortController();
4536
- return d(null), It({ restUrl: a, identifier: e, withCredentials: i, signal: m.signal }).then(c).catch((u) => {
4537
- m.signal.aborted || (t || d(u), s?.(u));
4565
+ return c(null), In({ restUrl: a, identifier: e, withCredentials: i, signal: m.signal }).then(d).catch((u) => {
4566
+ m.signal.aborted || (n || c(u), r?.(u));
4538
4567
  }), () => m.abort();
4539
- }, [t, e, s, a, i]), l ? /* @__PURE__ */ n("div", { className: "rqmii-chat-panel rqmii-chat-panel--error", children: l.message || "Could not load agent" }) : r ? /* @__PURE__ */ n(Te, { children: o(r) }) : /* @__PURE__ */ n("div", { className: "rqmii-chat-panel rqmii-chat-panel--error", children: "Loading" });
4568
+ }, [n, e, r, a, i]), l ? /* @__PURE__ */ t("div", { className: "rqmii-chat-panel rqmii-chat-panel--error", children: l.message || "Could not load agent" }) : s ? /* @__PURE__ */ t(Te, { children: o(s) }) : /* @__PURE__ */ t("div", { className: "rqmii-chat-panel rqmii-chat-panel--error", children: "Loading" });
4540
4569
  }
4541
- function Ie({ agent: a, language: e, languages: t, onLanguageChange: i, onEndSession: o, onMinimize: s, onStartText: r, onStartVoice: c, textOnly: l, messages: d, onSendMessage: m, isPreview: u, onSessionStart: h, initialText: F, autoStartVoice: b }) {
4542
- const M = Ee(a), S = { agent: a, language: e, languages: t, onLanguageChange: i, onEndSession: o, onMinimize: s, messages: d, onSendMessage: m, isPreview: u, onSessionStart: h, initialText: F, autoStartVoice: b };
4543
- switch (M) {
4570
+ function Ie({ agent: a, language: e, languages: n, onLanguageChange: i, onEndSession: o, onMinimize: r, onStartText: s, onStartVoice: d, textOnly: l, messages: c, onSendMessage: m, isPreview: u, onSessionStart: h, initialText: F, autoStartVoice: b }) {
4571
+ const x = Ee(a), w = { agent: a, language: e, languages: n, onLanguageChange: i, onEndSession: o, onMinimize: r, messages: c, onSendMessage: m, isPreview: u, onSessionStart: h, initialText: F, autoStartVoice: b };
4572
+ switch (x) {
4544
4573
  case "avatar":
4545
- return /* @__PURE__ */ n(ai, { ...S });
4574
+ return /* @__PURE__ */ t(ei, { ...w });
4546
4575
  case "voice":
4547
- return /* @__PURE__ */ n(Jn, { ...S });
4576
+ return /* @__PURE__ */ t(Zt, { ...w });
4548
4577
  case "text_and_voice":
4549
- return /* @__PURE__ */ n(ei, { ...S, onStartText: r, onStartVoice: c, textOnly: l });
4578
+ return /* @__PURE__ */ t(Xt, { ...w, onStartText: s, onStartVoice: d, textOnly: l });
4550
4579
  case "text":
4551
4580
  default:
4552
- return /* @__PURE__ */ n(Zn, { ...S });
4581
+ return /* @__PURE__ */ t($t, { ...w });
4553
4582
  }
4554
4583
  }
4555
4584
  function ni({
4556
4585
  agent: a,
4557
4586
  language: e,
4558
- languages: t,
4587
+ languages: n,
4559
4588
  startMode: i,
4560
4589
  directive: o,
4561
- open: s,
4562
- onOpen: r,
4563
- onLanguageChange: c,
4590
+ open: r,
4591
+ onOpen: s,
4592
+ onLanguageChange: d,
4564
4593
  onMinimize: l,
4565
- onStartNewSession: d,
4594
+ onStartNewSession: c,
4566
4595
  onSessionStart: m,
4567
4596
  onStartText: u,
4568
4597
  onStartVoice: h
4569
4598
  }) {
4570
- const { connectionState: F, isConnected: b, isSessionTerminated: M, creditExhausted: S, session: T, endSession: k, submitFeedback: p, interrupt: g } = pe(), { messages: w } = ge(), E = B(!1), f = B(null), [P, C] = y(null), [_, x] = y(0), [j, R] = y(!1), [D, L] = y(!1), [G, N] = y(!1);
4599
+ const { connectionState: F, isConnected: b, isSessionTerminated: x, creditExhausted: w, session: T, endSession: k, submitFeedback: p, interrupt: g } = pe(), { messages: M } = ge(), z = R(!1), f = R(null), [P, C] = y(null), [_, S] = y(0), [j, B] = y(!1), [D, A] = y(!1), [G, N] = y(!1);
4571
4600
  I(() => {
4572
- b && (E.current = !0);
4601
+ b && (z.current = !0);
4573
4602
  }, [b]), I(() => {
4574
4603
  if (P) return;
4575
4604
  let K = null;
4576
- M || F === "ended" ? K = f.current === "user" ? "user_ended" : "terminated" : F === "failed" ? S ? K = "credits_exhausted" : E.current ? K = "connection_lost" : K = "failed" : S && (K = "credits_exhausted"), K && C({
4605
+ x || F === "ended" ? K = f.current === "user" ? "user_ended" : "terminated" : F === "failed" ? w ? K = "credits_exhausted" : z.current ? K = "connection_lost" : K = "failed" : w && (K = "credits_exhausted"), K && C({
4577
4606
  sessionId: T.sessionId,
4578
4607
  endedBy: f.current ?? "agent",
4579
4608
  reason: K
4580
4609
  });
4581
- }, [M, F, S, T.sessionId, P]);
4610
+ }, [x, F, w, T.sessionId, P]);
4582
4611
  const Y = () => {
4583
4612
  f.current = "user", g(), k();
4584
4613
  }, O = P?.sessionId ?? null, U = (K) => {
4585
- j || (x(K), O && p({ sessionId: O, rating: K, endedBy: P?.endedBy }).catch(() => {
4586
- }), G || (N(!0), L(!0)));
4614
+ j || (S(K), O && p({ sessionId: O, rating: K, endedBy: P?.endedBy }).catch(() => {
4615
+ }), G || (N(!0), A(!0)));
4587
4616
  }, J = async (K) => {
4588
4617
  if (O)
4589
4618
  try {
4590
4619
  await p({ sessionId: O, feedback: K, endedBy: P?.endedBy });
4591
4620
  } catch {
4592
4621
  }
4593
- R(!0), L(!1);
4622
+ B(!0), A(!1);
4594
4623
  };
4595
- if (!s)
4596
- return /* @__PURE__ */ n(ma, { agent: a, onClick: r, active: F === "connected" });
4624
+ if (!r)
4625
+ return /* @__PURE__ */ t(ma, { agent: a, onClick: s, active: F === "connected" });
4597
4626
  const X = Ee(a), W = a.agentType === "cloud_avatar" || a.agentType === "desktop_avatar", ee = i === "text";
4598
- return W ? /* @__PURE__ */ n(
4627
+ return W ? /* @__PURE__ */ t(
4599
4628
  Ie,
4600
4629
  {
4601
4630
  agent: a,
4602
4631
  language: e,
4603
- languages: t,
4604
- onLanguageChange: c,
4632
+ languages: n,
4633
+ onLanguageChange: d,
4605
4634
  onEndSession: Y,
4606
4635
  onMinimize: l,
4607
4636
  onSessionStart: m,
@@ -4609,43 +4638,43 @@ function ni({
4609
4638
  onStartVoice: h,
4610
4639
  textOnly: ee
4611
4640
  }
4612
- ) : P ? D && O ? /* @__PURE__ */ n(
4613
- qn,
4641
+ ) : P ? D && O ? /* @__PURE__ */ t(
4642
+ _t,
4614
4643
  {
4615
4644
  agent: a,
4616
4645
  language: e,
4617
4646
  rating: _,
4618
- onBack: () => L(!1),
4647
+ onBack: () => A(!1),
4619
4648
  onMinimize: l,
4620
4649
  onSubmit: J
4621
4650
  }
4622
- ) : /* @__PURE__ */ n(
4623
- Bn,
4651
+ ) : /* @__PURE__ */ t(
4652
+ Bt,
4624
4653
  {
4625
4654
  agent: a,
4626
4655
  language: e,
4627
- languages: t,
4656
+ languages: n,
4628
4657
  chatKind: X === "avatar" ? "text" : X,
4629
- messages: w,
4630
- onLanguageChange: c,
4658
+ messages: M,
4659
+ onLanguageChange: d,
4631
4660
  onMinimize: l,
4632
- onStartNewVoice: () => d("voice"),
4633
- onStartNewText: (K) => d("text", K),
4661
+ onStartNewVoice: () => c("voice"),
4662
+ onStartNewText: (K) => c("text", K),
4634
4663
  rating: _,
4635
4664
  endedBy: P.endedBy,
4636
4665
  sessionId: O,
4637
4666
  ratingInteractive: !j,
4638
4667
  showTellUsMore: G && !j,
4639
4668
  onRate: U,
4640
- onTellUsMore: () => L(!0)
4669
+ onTellUsMore: () => A(!0)
4641
4670
  }
4642
- ) : /* @__PURE__ */ n(
4671
+ ) : /* @__PURE__ */ t(
4643
4672
  Ie,
4644
4673
  {
4645
4674
  agent: a,
4646
4675
  language: e,
4647
- languages: t,
4648
- onLanguageChange: c,
4676
+ languages: n,
4677
+ onLanguageChange: d,
4649
4678
  onEndSession: Y,
4650
4679
  onMinimize: l,
4651
4680
  onSessionStart: m,
@@ -4657,105 +4686,105 @@ function ni({
4657
4686
  }
4658
4687
  );
4659
4688
  }
4660
- function di(a) {
4689
+ function ci(a) {
4661
4690
  const {
4662
4691
  wsUrl: e,
4663
- restUrl: t,
4692
+ restUrl: n,
4664
4693
  apiKey: i,
4665
4694
  agentId: o,
4666
- agent: s,
4667
- language: r,
4668
- defaultOpen: c,
4695
+ agent: r,
4696
+ language: s,
4697
+ defaultOpen: d,
4669
4698
  open: l,
4670
- className: d = "",
4699
+ className: c = "",
4671
4700
  debug: m = !1,
4672
4701
  withCredentials: u = !1,
4673
4702
  onError: h,
4674
4703
  onInitialized: F,
4675
4704
  config: b,
4676
- promptOverrides: M,
4677
- clientTools: S,
4705
+ promptOverrides: x,
4706
+ clientTools: w,
4678
4707
  onMinimize: T,
4679
4708
  onOpen: k
4680
4709
  } = a;
4681
4710
  if ([!!i, !!o].filter(Boolean).length > 1)
4682
4711
  throw new Error("RqmiiAgentChat: only one of apiKey, or agentId may be provided");
4683
- return /* @__PURE__ */ n(ti, { restUrl: t, identifier: i || o, fallbackAgent: s, withCredentials: u, onError: h, children: (w) => /* @__PURE__ */ n(
4684
- ii,
4712
+ return /* @__PURE__ */ t(ai, { restUrl: n, identifier: i || o, fallbackAgent: r, withCredentials: u, onError: h, children: (M) => /* @__PURE__ */ t(
4713
+ ti,
4685
4714
  {
4686
4715
  wsUrl: e,
4687
- restUrl: t,
4716
+ restUrl: n,
4688
4717
  apiKey: i,
4689
4718
  agentId: o,
4690
- agent: w,
4691
- language: r,
4692
- defaultOpen: c,
4719
+ agent: M,
4720
+ language: s,
4721
+ defaultOpen: d,
4693
4722
  open: l,
4694
- className: d,
4723
+ className: c,
4695
4724
  debug: m,
4696
4725
  withCredentials: u,
4697
4726
  onError: h,
4698
4727
  onInitialized: F,
4699
4728
  config: b,
4700
- promptOverrides: M,
4701
- clientTools: S,
4729
+ promptOverrides: x,
4730
+ clientTools: w,
4702
4731
  onMinimize: T,
4703
4732
  onOpen: k
4704
4733
  }
4705
4734
  ) });
4706
4735
  }
4707
- function ii({ wsUrl: a, restUrl: e, apiKey: t, agentId: i, agent: o, language: s, defaultOpen: r, open: c, className: l, debug: d, withCredentials: m, onError: u, onInitialized: h, config: F, promptOverrides: b, clientTools: M, onMinimize: S, onOpen: T }) {
4708
- const k = r !== void 0 ? r : o.widget?.behavior?.default_open ?? !1, [p, g] = y(k), w = c !== void 0 ? c : p;
4736
+ function ti({ wsUrl: a, restUrl: e, apiKey: n, agentId: i, agent: o, language: r, defaultOpen: s, open: d, className: l, debug: c, withCredentials: m, onError: u, onInitialized: h, config: F, promptOverrides: b, clientTools: x, onMinimize: w, onOpen: T }) {
4737
+ const k = s !== void 0 ? s : o.widget?.behavior?.default_open ?? !1, [p, g] = y(k), M = d !== void 0 ? d : p;
4709
4738
  I(() => {
4710
- c === void 0 && g(k);
4711
- }, [k, c]);
4712
- const [E, f] = y(!1), [P, C] = y(s || o.defaultLanguage), [_, x] = y("idle"), [j, R] = y(0), [D, L] = y(null), [G, N] = y(!1), Y = o.agentType === "cloud_avatar" || o.agentType === "desktop_avatar", O = Y, U = o.widget?.behavior?.welcome_bubble, J = o.welcomeMessages?.[P] || "", X = !w && !G && !O && !!U?.enabled && !!J.trim(), W = $(() => ye(o.languages, o.defaultLanguage), [o.defaultLanguage, o.languages]);
4739
+ d === void 0 && g(k);
4740
+ }, [k, d]);
4741
+ const [z, f] = y(!1), [P, C] = y(r || o.defaultLanguage), [_, S] = y("idle"), [j, B] = y(0), [D, A] = y(null), [G, N] = y(!1), Y = o.agentType === "cloud_avatar" || o.agentType === "desktop_avatar", O = Y, U = o.widget?.behavior?.welcome_bubble, J = o.welcomeMessages?.[P] || "", X = !M && !G && !O && !!U?.enabled && !!J.trim(), W = $(() => ye(o.languages, o.defaultLanguage), [o.defaultLanguage, o.languages]);
4713
4742
  I(() => {
4714
4743
  ua(o.widget?.appearance?.font);
4715
4744
  }, [o.widget?.appearance?.font]);
4716
4745
  const ee = $(() => _ === "text" ? { ...F ?? {}, use_voice: !1, use_text: !0 } : F, [F, _]), K = $(
4717
- () => Vt(o, ee),
4746
+ () => Vn(o, ee),
4718
4747
  [o, ee]
4719
- ), me = !O && K.useVoice, ae = Y ? w : E, le = $(() => ({
4720
- ...t ? { apiKey: t } : {},
4748
+ ), me = !O && K.useVoice, ae = Y ? M : z, le = $(() => ({
4749
+ ...n ? { apiKey: n } : {},
4721
4750
  ...i ? { agentId: i } : {},
4722
4751
  language: P,
4723
4752
  config: ee,
4724
4753
  ...b ? { promptOverrides: b } : {}
4725
- }), [i, t, P, ee, b]), ce = B(null), he = B(!1), Q = B(j), be = Q.current !== j;
4726
- Q.current = j, E && (!he.current || be) && (ce.current = le), he.current = E, E || (ce.current = null);
4727
- const Ye = E && ce.current ? ce.current : le;
4754
+ }), [i, n, P, ee, b]), ce = R(null), he = R(!1), Q = R(j), be = Q.current !== j;
4755
+ Q.current = j, z && (!he.current || be) && (ce.current = le), he.current = z, z || (ce.current = null);
4756
+ const Ye = z && ce.current ? ce.current : le;
4728
4757
  I(() => {
4729
- C(s || o.defaultLanguage);
4730
- }, [o.defaultLanguage, s]);
4731
- const we = $(() => u ? (fe) => {
4732
- x("idle"), u(fe);
4758
+ C(r || o.defaultLanguage);
4759
+ }, [o.defaultLanguage, r]);
4760
+ const Me = $(() => u ? (fe) => {
4761
+ S("idle"), u(fe);
4733
4762
  } : (fe) => {
4734
- x("idle");
4763
+ S("idle");
4735
4764
  }, [u]), q = () => {
4736
- x("text"), f(!0);
4737
- }, ne = () => {
4738
- x("voice"), f(!0);
4765
+ S("text"), f(!0);
4766
+ }, te = () => {
4767
+ S("voice"), f(!0);
4739
4768
  }, Pe = () => {
4740
- c === void 0 && g(!1), S?.();
4769
+ d === void 0 && g(!1), w?.();
4741
4770
  }, ka = () => {
4742
- c === void 0 && g(!0), N(!0), T?.();
4771
+ d === void 0 && g(!0), N(!0), T?.();
4743
4772
  }, va = (fe, Fa) => {
4744
- L(fe === "text" ? { mode: "text", text: Fa ?? "" } : { mode: "voice" }), x(fe), f(!0), R((Ta) => Ta + 1);
4745
- }, Qe = o.widget?.appearance?.theme?.mode === "light" ? "light" : "dark", ya = $(() => Re(o.widget?.appearance), [o.widget?.appearance]);
4746
- return /* @__PURE__ */ n(
4747
- Sa,
4773
+ A(fe === "text" ? { mode: "text", text: Fa ?? "" } : { mode: "voice" }), S(fe), f(!0), B((Ta) => Ta + 1);
4774
+ }, Qe = o.widget?.appearance?.theme?.mode === "light" ? "light" : "dark", ya = $(() => Be(o.widget?.appearance), [o.widget?.appearance]);
4775
+ return /* @__PURE__ */ t(
4776
+ wa,
4748
4777
  {
4749
4778
  wsUrl: a,
4750
4779
  restUrl: e,
4751
4780
  session: Ye,
4752
4781
  connect: ae,
4753
4782
  enableAudio: me,
4754
- debug: d,
4783
+ debug: c,
4755
4784
  withCredentials: m,
4756
- onError: we,
4785
+ onError: Me,
4757
4786
  onInitialized: h,
4758
- clientTools: M,
4787
+ clientTools: x,
4759
4788
  children: /* @__PURE__ */ v(
4760
4789
  "div",
4761
4790
  {
@@ -4769,8 +4798,8 @@ function ii({ wsUrl: a, restUrl: e, apiKey: t, agentId: i, agent: o, language: s
4769
4798
  style: ya,
4770
4799
  dir: "ltr",
4771
4800
  children: [
4772
- X && /* @__PURE__ */ n(
4773
- kn,
4801
+ X && /* @__PURE__ */ t(
4802
+ ft,
4774
4803
  {
4775
4804
  message: J,
4776
4805
  delaySeconds: U?.delay_seconds ?? 3,
@@ -4780,7 +4809,7 @@ function ii({ wsUrl: a, restUrl: e, apiKey: t, agentId: i, agent: o, language: s
4780
4809
  onClick: () => N(!0)
4781
4810
  }
4782
4811
  ),
4783
- /* @__PURE__ */ n(
4812
+ /* @__PURE__ */ t(
4784
4813
  ni,
4785
4814
  {
4786
4815
  agent: o,
@@ -4788,14 +4817,14 @@ function ii({ wsUrl: a, restUrl: e, apiKey: t, agentId: i, agent: o, language: s
4788
4817
  languages: W,
4789
4818
  startMode: _,
4790
4819
  directive: D,
4791
- open: w,
4820
+ open: M,
4792
4821
  onOpen: ka,
4793
4822
  onLanguageChange: C,
4794
4823
  onMinimize: Pe,
4795
4824
  onStartNewSession: va,
4796
4825
  onSessionStart: () => f(!0),
4797
4826
  onStartText: q,
4798
- onStartVoice: ne
4827
+ onStartVoice: te
4799
4828
  }
4800
4829
  )
4801
4830
  ]
@@ -4805,22 +4834,22 @@ function ii({ wsUrl: a, restUrl: e, apiKey: t, agentId: i, agent: o, language: s
4805
4834
  j
4806
4835
  );
4807
4836
  }
4808
- function ui(a) {
4809
- const { agent: e, language: t, open: i = !0, className: o = "", messages: s, onSendMessage: r, onClose: c } = a, l = $(() => ve(e), [e]), [d, m] = y(i), [u, h] = y(t || l.defaultLanguage), F = $(() => ye(l.languages, l.defaultLanguage), [l.defaultLanguage, l.languages]), b = l.widget?.appearance?.theme?.mode === "light" ? "light" : "dark", M = $(() => Re(l.widget?.appearance), [l.widget?.appearance]);
4837
+ function di(a) {
4838
+ const { agent: e, language: n, open: i = !0, className: o = "", messages: r, onSendMessage: s, onClose: d } = a, l = $(() => ve(e), [e]), [c, m] = y(i), [u, h] = y(n || l.defaultLanguage), F = $(() => ye(l.languages, l.defaultLanguage), [l.defaultLanguage, l.languages]), b = l.widget?.appearance?.theme?.mode === "light" ? "light" : "dark", x = $(() => Be(l.widget?.appearance), [l.widget?.appearance]);
4810
4839
  return I(() => {
4811
- t && h(t);
4812
- }, [t]), I(() => {
4840
+ n && h(n);
4841
+ }, [n]), I(() => {
4813
4842
  m(i);
4814
4843
  }, [i]), I(() => {
4815
4844
  ua(l.widget?.appearance?.font);
4816
- }, [l.widget?.appearance?.font]), /* @__PURE__ */ n(za, { wsUrl: "", restUrl: "", enableAudio: !1, children: /* @__PURE__ */ n(
4845
+ }, [l.widget?.appearance?.font]), /* @__PURE__ */ t(za, { wsUrl: "", restUrl: "", enableAudio: !1, children: /* @__PURE__ */ t(
4817
4846
  "div",
4818
4847
  {
4819
4848
  className: V("rqmii-chat-surface is-preview", `rqmii-theme-${b}`, o),
4820
4849
  "data-theme": b,
4821
- style: M,
4850
+ style: x,
4822
4851
  dir: "ltr",
4823
- children: d ? /* @__PURE__ */ n(
4852
+ children: c ? /* @__PURE__ */ t(
4824
4853
  Ie,
4825
4854
  {
4826
4855
  agent: l,
@@ -4828,13 +4857,13 @@ function ui(a) {
4828
4857
  languages: F,
4829
4858
  onLanguageChange: h,
4830
4859
  onEndSession: () => {
4831
- m(!1), c?.();
4860
+ m(!1), d?.();
4832
4861
  },
4833
4862
  onMinimize: () => {
4834
- m(!1), c?.();
4863
+ m(!1), d?.();
4835
4864
  },
4836
- messages: s,
4837
- onSendMessage: r,
4865
+ messages: r,
4866
+ onSendMessage: s,
4838
4867
  isPreview: !0
4839
4868
  }
4840
4869
  ) : null
@@ -4842,29 +4871,29 @@ function ui(a) {
4842
4871
  ) });
4843
4872
  }
4844
4873
  export {
4845
- On as ConsentDialog,
4846
- Bn as EndedChatPanel,
4847
- gi as EpicPixelStreamingPlayer,
4848
- qn as FeedbackPanel,
4849
- Ae as RQMII_CHAT_LANGUAGES,
4874
+ Kt as ConsentDialog,
4875
+ Bt as EndedChatPanel,
4876
+ hi as EpicPixelStreamingPlayer,
4877
+ _t as FeedbackPanel,
4878
+ Le as RQMII_CHAT_LANGUAGES,
4850
4879
  Ze as RQMII_CHAT_LANGUAGE_VALUES,
4851
- _n as RatingBar,
4852
- te as RqmiiAgentAvatar,
4853
- di as RqmiiAgentChat,
4854
- ui as RqmiiAgentChatPreview,
4855
- Sa as RqmiiAgentRoom,
4856
- ai as RqmiiAvatarChatBox,
4880
+ Lt as RatingBar,
4881
+ ne as RqmiiAgentAvatar,
4882
+ ci as RqmiiAgentChat,
4883
+ di as RqmiiAgentChatPreview,
4884
+ wa as RqmiiAgentRoom,
4885
+ ei as RqmiiAvatarChatBox,
4857
4886
  ue as RqmiiChatFooter,
4858
4887
  ma as RqmiiChatOpenButton,
4859
- ci as RqmiiChatSurface,
4860
- pi as RqmiiCloudAvatarPlayer,
4861
- ei as RqmiiTextAndVoiceChatBox,
4862
- Zn as RqmiiTextChatBox,
4863
- Jn as RqmiiVoiceChatBox,
4864
- li as fetchAgentConfig,
4865
- It as fetchAgentCustomization,
4888
+ li as RqmiiChatSurface,
4889
+ gi as RqmiiCloudAvatarPlayer,
4890
+ Xt as RqmiiTextAndVoiceChatBox,
4891
+ $t as RqmiiTextChatBox,
4892
+ Zt as RqmiiVoiceChatBox,
4893
+ si as fetchAgentConfig,
4894
+ In as fetchAgentCustomization,
4866
4895
  Je as getChatLanguage,
4867
- z as getChatText,
4896
+ E as getChatText,
4868
4897
  ye as normalizeChatLanguages,
4869
4898
  ve as normalizePublicAgent,
4870
4899
  Ee as resolveChatKind