@rqmii_immersive/agent-react-sdk 5.0.4 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/dist/{RqmiiCloudAvatarPlayer-CS7A0FHP.js → RqmiiCloudAvatarPlayer-BVTRjoXz.js} +4009 -3920
  2. package/dist/RqmiiCloudAvatarPlayer-BVTRjoXz.js.map +1 -0
  3. package/dist/{RqmiiCloudAvatarPlayer-_YWFwrMm.cjs → RqmiiCloudAvatarPlayer-DnDpxEag.cjs} +475 -475
  4. package/dist/RqmiiCloudAvatarPlayer-DnDpxEag.cjs.map +1 -0
  5. package/dist/agent-react-sdk.css +1 -1
  6. package/dist/core/constants.d.ts +2 -0
  7. package/dist/core/constants.d.ts.map +1 -1
  8. package/dist/core/managers/session.d.ts +5 -0
  9. package/dist/core/managers/session.d.ts.map +1 -1
  10. package/dist/core/utils/suppress-logs.d.ts +2 -0
  11. package/dist/core/utils/suppress-logs.d.ts.map +1 -0
  12. package/dist/embed.d.ts +9 -0
  13. package/dist/embed.d.ts.map +1 -0
  14. package/dist/embed.js +7342 -0
  15. package/dist/embed.js.map +1 -0
  16. package/dist/hooks/use-rqmii-connection.d.ts.map +1 -1
  17. package/dist/hooks/use-rqmii-vad.d.ts.map +1 -1
  18. package/dist/index.cjs +2 -2
  19. package/dist/index.cjs.map +1 -1
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +45 -48
  22. package/dist/index.js.map +1 -1
  23. package/dist/provider/RqmiiAgentProvider.d.ts.map +1 -1
  24. package/dist/provider/socket-handlers.d.ts.map +1 -1
  25. package/dist/provider/use-manager-lifecycle.d.ts +5 -0
  26. package/dist/provider/use-manager-lifecycle.d.ts.map +1 -1
  27. package/dist/types/index.d.ts +30 -2
  28. package/dist/types/index.d.ts.map +1 -1
  29. package/dist/ui/chat/chat-box-content.d.ts.map +1 -1
  30. package/dist/ui/chat/chat-box-text-and-voice.d.ts.map +1 -1
  31. package/dist/ui/chat/chat-box-text.d.ts.map +1 -1
  32. package/dist/ui/chat/primitives.d.ts +9 -1
  33. package/dist/ui/chat/primitives.d.ts.map +1 -1
  34. package/dist/ui/chat/utils.d.ts +3 -0
  35. package/dist/ui/chat/utils.d.ts.map +1 -1
  36. package/dist/ui/languages/translations/af.d.ts.map +1 -1
  37. package/dist/ui/languages/translations/ar.d.ts.map +1 -1
  38. package/dist/ui/languages/translations/az.d.ts.map +1 -1
  39. package/dist/ui/languages/translations/be.d.ts.map +1 -1
  40. package/dist/ui/languages/translations/bg.d.ts.map +1 -1
  41. package/dist/ui/languages/translations/bn.d.ts.map +1 -1
  42. package/dist/ui/languages/translations/bs.d.ts.map +1 -1
  43. package/dist/ui/languages/translations/ca.d.ts.map +1 -1
  44. package/dist/ui/languages/translations/cs.d.ts.map +1 -1
  45. package/dist/ui/languages/translations/cy.d.ts.map +1 -1
  46. package/dist/ui/languages/translations/da.d.ts.map +1 -1
  47. package/dist/ui/languages/translations/de.d.ts.map +1 -1
  48. package/dist/ui/languages/translations/el.d.ts.map +1 -1
  49. package/dist/ui/languages/translations/en.d.ts.map +1 -1
  50. package/dist/ui/languages/translations/es.d.ts.map +1 -1
  51. package/dist/ui/languages/translations/et.d.ts.map +1 -1
  52. package/dist/ui/languages/translations/eu.d.ts.map +1 -1
  53. package/dist/ui/languages/translations/fa.d.ts.map +1 -1
  54. package/dist/ui/languages/translations/fi.d.ts.map +1 -1
  55. package/dist/ui/languages/translations/fr.d.ts.map +1 -1
  56. package/dist/ui/languages/translations/gl.d.ts.map +1 -1
  57. package/dist/ui/languages/translations/gu.d.ts.map +1 -1
  58. package/dist/ui/languages/translations/hi.d.ts.map +1 -1
  59. package/dist/ui/languages/translations/hr.d.ts.map +1 -1
  60. package/dist/ui/languages/translations/hu.d.ts.map +1 -1
  61. package/dist/ui/languages/translations/id.d.ts.map +1 -1
  62. package/dist/ui/languages/translations/it.d.ts.map +1 -1
  63. package/dist/ui/languages/translations/ja.d.ts.map +1 -1
  64. package/dist/ui/languages/translations/kk.d.ts.map +1 -1
  65. package/dist/ui/languages/translations/kn.d.ts.map +1 -1
  66. package/dist/ui/languages/translations/ko.d.ts.map +1 -1
  67. package/dist/ui/languages/translations/lt.d.ts.map +1 -1
  68. package/dist/ui/languages/translations/lv.d.ts.map +1 -1
  69. package/dist/ui/languages/translations/mk.d.ts.map +1 -1
  70. package/dist/ui/languages/translations/ml.d.ts.map +1 -1
  71. package/dist/ui/languages/translations/mr.d.ts.map +1 -1
  72. package/dist/ui/languages/translations/ms.d.ts.map +1 -1
  73. package/dist/ui/languages/translations/nl.d.ts.map +1 -1
  74. package/dist/ui/languages/translations/no.d.ts.map +1 -1
  75. package/dist/ui/languages/translations/pa.d.ts.map +1 -1
  76. package/dist/ui/languages/translations/pl.d.ts.map +1 -1
  77. package/dist/ui/languages/translations/pt.d.ts.map +1 -1
  78. package/dist/ui/languages/translations/ro.d.ts.map +1 -1
  79. package/dist/ui/languages/translations/ru.d.ts.map +1 -1
  80. package/dist/ui/languages/translations/sk.d.ts.map +1 -1
  81. package/dist/ui/languages/translations/sl.d.ts.map +1 -1
  82. package/dist/ui/languages/translations/sq.d.ts.map +1 -1
  83. package/dist/ui/languages/translations/sr.d.ts.map +1 -1
  84. package/dist/ui/languages/translations/sv.d.ts.map +1 -1
  85. package/dist/ui/languages/translations/sw.d.ts.map +1 -1
  86. package/dist/ui/languages/translations/ta.d.ts.map +1 -1
  87. package/dist/ui/languages/translations/te.d.ts.map +1 -1
  88. package/dist/ui/languages/translations/th.d.ts.map +1 -1
  89. package/dist/ui/languages/translations/tl.d.ts.map +1 -1
  90. package/dist/ui/languages/translations/tr.d.ts.map +1 -1
  91. package/dist/ui/languages/translations/uk.d.ts.map +1 -1
  92. package/dist/ui/languages/translations/ur.d.ts.map +1 -1
  93. package/dist/ui/languages/translations/vi.d.ts.map +1 -1
  94. package/dist/ui/languages/translations/zh.d.ts.map +1 -1
  95. package/dist/ui/languages/types.d.ts +8 -0
  96. package/dist/ui/languages/types.d.ts.map +1 -1
  97. package/dist/ui.cjs +21 -21
  98. package/dist/ui.cjs.map +1 -1
  99. package/dist/ui.js +1655 -1104
  100. package/dist/ui.js.map +1 -1
  101. package/package.json +5 -2
  102. package/dist/RqmiiCloudAvatarPlayer-CS7A0FHP.js.map +0 -1
  103. package/dist/RqmiiCloudAvatarPlayer-_YWFwrMm.cjs.map +0 -1
package/dist/ui.js CHANGED
@@ -1,8 +1,8 @@
1
- import { A as se, g as Ke, i as ue, h as me, k as tt, j as nt, R as bt, c as kt } from "./RqmiiCloudAvatarPlayer-CS7A0FHP.js";
2
- import { E as Ji, d as Xi } from "./RqmiiCloudAvatarPlayer-CS7A0FHP.js";
3
- import { jsx as i, jsxs as p, Fragment as Ve } from "react/jsx-runtime";
4
- import j, { useContext as ft, createContext as vt, forwardRef as it, createElement as Pe, useState as v, useEffect as I, useRef as R, useLayoutEffect as Ye, useCallback as le, useMemo as ne } from "react";
5
- const yt = {
1
+ import { A as oe, u as ka, g as Ke, j as ue, h as me, i as aa, l as ta, k as na, R as fa, c as va } from "./RqmiiCloudAvatarPlayer-BVTRjoXz.js";
2
+ import { E as oi, d as ri } from "./RqmiiCloudAvatarPlayer-BVTRjoXz.js";
3
+ import { jsx as n, jsxs as f, Fragment as Le } from "react/jsx-runtime";
4
+ import D, { useContext as ya, createContext as Fa, forwardRef as ia, createElement as Me, useState as y, useEffect as I, useRef as _, useLayoutEffect as Oe, useCallback as re, useMemo as te } from "react";
5
+ const Ta = {
6
6
  sendMessage: "Stuur 'n boodskap",
7
7
  send: "Stuur",
8
8
  close: "Sluit",
@@ -36,8 +36,16 @@ const yt = {
36
36
  tellUsMore: "Vertel ons meer",
37
37
  feedbackSubtitle: "Jou terugvoer help ons om ons diens te verbeter en jou in die toekoms beter te ondersteun.",
38
38
  feedbackPlaceholder: "Vertel ons meer oor jou ervaring…",
39
- submit: "Dien in"
40
- }, zt = {
39
+ submit: "Dien in",
40
+ leadFormTitle: "Kontakinligting",
41
+ leadFormSuccess: "Dankie! Jou besonderhede is ingedien.",
42
+ leadFormRequiredError: "Vul asseblief al die verpligte velde in.",
43
+ leadFormGenericError: "Iets het verkeerd geloop. Probeer asseblief weer.",
44
+ leadFormName: "Naam",
45
+ leadFormEmail: "E-pos",
46
+ leadFormPhone: "Foon",
47
+ leadFormMessage: "Jou boodskap"
48
+ }, Ea = {
41
49
  sendMessage: "Dërgo një mesazh",
42
50
  send: "Dërgo",
43
51
  close: "Mbyll",
@@ -71,8 +79,16 @@ const yt = {
71
79
  tellUsMore: "Na tregoni më shumë",
72
80
  feedbackSubtitle: "Komenti juaj na ndihmon të përmirësojmë shërbimin tonë dhe t’ju mbështesim më mirë në të ardhmen.",
73
81
  feedbackPlaceholder: "Na tregoni më shumë rreth përvojës suaj…",
74
- submit: "Dërgo"
75
- }, Tt = {
82
+ submit: "Dërgo",
83
+ leadFormTitle: "Informacioni i kontaktit",
84
+ leadFormSuccess: "Faleminderit! Të dhënat tuaja u dërguan.",
85
+ leadFormRequiredError: "Ju lutemi plotësoni të gjitha fushat e kërkuara.",
86
+ leadFormGenericError: "Ndodhi një gabim. Ju lutemi provoni përsëri.",
87
+ leadFormName: "Emri",
88
+ leadFormEmail: "Email",
89
+ leadFormPhone: "Telefoni",
90
+ leadFormMessage: "Mesazhi juaj"
91
+ }, za = {
76
92
  sendMessage: "اكتب رسالة",
77
93
  send: "إرسال",
78
94
  close: "إغلاق",
@@ -106,8 +122,16 @@ const yt = {
106
122
  tellUsMore: "أخبرنا المزيد",
107
123
  feedbackSubtitle: "تساعدنا ملاحظاتك في تحسين خدمتنا ودعمك بشكل أفضل في المستقبل.",
108
124
  feedbackPlaceholder: "أخبرنا المزيد عن تجربتك…",
109
- submit: "إرسال"
110
- }, xt = {
125
+ submit: "إرسال",
126
+ leadFormTitle: "معلومات التواصل",
127
+ leadFormSuccess: "شكرًا لك! تم إرسال بياناتك.",
128
+ leadFormRequiredError: "يرجى تعبئة جميع الحقول المطلوبة.",
129
+ leadFormGenericError: "حدث خطأ ما. حاول مرة أخرى.",
130
+ leadFormName: "الاسم",
131
+ leadFormEmail: "البريد الإلكتروني",
132
+ leadFormPhone: "رقم الهاتف",
133
+ leadFormMessage: "رسالتك"
134
+ }, Sa = {
111
135
  sendMessage: "Mesaj göndər",
112
136
  send: "Göndər",
113
137
  close: "Bağla",
@@ -141,8 +165,16 @@ const yt = {
141
165
  tellUsMore: "Bizə daha çox danışın",
142
166
  feedbackSubtitle: "Rəyiniz xidmətimizi təkmilləşdirməyə və gələcəkdə sizə daha yaxşı dəstək olmağa kömək edir.",
143
167
  feedbackPlaceholder: "Təcrübəniz haqqında bizə daha çox danışın…",
144
- submit: "Göndər"
145
- }, Ct = {
168
+ submit: "Göndər",
169
+ leadFormTitle: "Əlaqə məlumatları",
170
+ leadFormSuccess: "Təşəkkürlər! Məlumatlarınız göndərildi.",
171
+ leadFormRequiredError: "Zəhmət olmasa bütün tələb olunan sahələri doldurun.",
172
+ leadFormGenericError: "Xəta baş verdi. Zəhmət olmasa yenidən cəhd edin.",
173
+ leadFormName: "Ad",
174
+ leadFormEmail: "E-poçt",
175
+ leadFormPhone: "Telefon",
176
+ leadFormMessage: "Mesajınız"
177
+ }, xa = {
146
178
  sendMessage: "Bidali mezua",
147
179
  send: "Bidali",
148
180
  close: "Itxi",
@@ -176,8 +208,16 @@ const yt = {
176
208
  tellUsMore: "Esan iezaguzu gehiago",
177
209
  feedbackSubtitle: "Zure iritziak gure zerbitzua hobetzen eta etorkizunean hobeto laguntzen laguntzen digu.",
178
210
  feedbackPlaceholder: "Esan iezaguzu gehiago zure esperientziari buruz…",
179
- submit: "Bidali"
180
- }, Et = {
211
+ submit: "Bidali",
212
+ leadFormTitle: "Kontaktu informazioa",
213
+ leadFormSuccess: "Eskerrik asko! Zure datuak bidali dira.",
214
+ leadFormRequiredError: "Bete beharrezko eremu guztiak, mesedez.",
215
+ leadFormGenericError: "Zerbait okerra gertatu da. Saiatu berriro.",
216
+ leadFormName: "Izena",
217
+ leadFormEmail: "Helbide elektronikoa",
218
+ leadFormPhone: "Telefonoa",
219
+ leadFormMessage: "Zure mezua"
220
+ }, Pa = {
181
221
  sendMessage: "Адправіць паведамленне",
182
222
  send: "Адправіць",
183
223
  close: "Зачыніць",
@@ -211,8 +251,16 @@ const yt = {
211
251
  tellUsMore: "Раскажыце падрабязней",
212
252
  feedbackSubtitle: "Ваш водгук дапамагае нам паляпшаць сэрвіс і лепш падтрымліваць вас у будучыні.",
213
253
  feedbackPlaceholder: "Раскажыце падрабязней пра ваш вопыт…",
214
- submit: "Адправіць"
215
- }, St = {
254
+ submit: "Адправіць",
255
+ leadFormTitle: "Кантактная інфармацыя",
256
+ leadFormSuccess: "Дзякуй! Вашы дадзеныя адпраўлены.",
257
+ leadFormRequiredError: "Калі ласка, запаўніце ўсе абавязковыя палі.",
258
+ leadFormGenericError: "Нешта пайшло не так. Паспрабуйце зноў.",
259
+ leadFormName: "Імя",
260
+ leadFormEmail: "Электронная пошта",
261
+ leadFormPhone: "Тэлефон",
262
+ leadFormMessage: "Ваша паведамленне"
263
+ }, Ma = {
216
264
  sendMessage: "একটি বার্তা পাঠান",
217
265
  send: "পাঠান",
218
266
  close: "বন্ধ করুন",
@@ -246,8 +294,16 @@ const yt = {
246
294
  tellUsMore: "আরও বলুন",
247
295
  feedbackSubtitle: "আপনার মতামত আমাদের পরিষেবা উন্নত করতে এবং ভবিষ্যতে আপনাকে আরও ভালোভাবে সহায়তা করতে সাহায্য করে।",
248
296
  feedbackPlaceholder: "আপনার অভিজ্ঞতা সম্পর্কে আরও বলুন…",
249
- submit: "জমা দিন"
250
- }, Mt = {
297
+ submit: "জমা দিন",
298
+ leadFormTitle: "যোগাযোগের তথ্য",
299
+ leadFormSuccess: "ধন্যবাদ! আপনার তথ্য জমা দেওয়া হয়েছে।",
300
+ leadFormRequiredError: "সমস্ত প্রয়োজনীয় ক্ষেত্র পূরণ করুন।",
301
+ leadFormGenericError: "কিছু ভুল হয়েছে। আবার চেষ্টা করুন।",
302
+ leadFormName: "নাম",
303
+ leadFormEmail: "ইমেইল",
304
+ leadFormPhone: "ফোন",
305
+ leadFormMessage: "আপনার বার্তা"
306
+ }, Ca = {
251
307
  sendMessage: "Pošalji poruku",
252
308
  send: "Pošalji",
253
309
  close: "Zatvori",
@@ -281,8 +337,16 @@ const yt = {
281
337
  tellUsMore: "Recite nam više",
282
338
  feedbackSubtitle: "Vaša povratna informacija nam pomaže da poboljšamo uslugu i bolje vas podržimo u budućnosti.",
283
339
  feedbackPlaceholder: "Recite nam više o svom iskustvu…",
284
- submit: "Pošalji"
285
- }, Pt = {
340
+ submit: "Pošalji",
341
+ leadFormTitle: "Kontakt informacije",
342
+ leadFormSuccess: "Hvala! Vaši podaci su poslani.",
343
+ leadFormRequiredError: "Molimo popunite sva obavezna polja.",
344
+ leadFormGenericError: "Nešto je pošlo po zlu. Pokušajte ponovo.",
345
+ leadFormName: "Ime",
346
+ leadFormEmail: "E-mail",
347
+ leadFormPhone: "Telefon",
348
+ leadFormMessage: "Vaša poruka"
349
+ }, wa = {
286
350
  sendMessage: "Изпрати съобщение",
287
351
  send: "Изпрати",
288
352
  close: "Затвори",
@@ -316,8 +380,16 @@ const yt = {
316
380
  tellUsMore: "Кажете ни повече",
317
381
  feedbackSubtitle: "Вашата обратна връзка ни помага да подобрим услугата си и да ви подкрепяме по-добре в бъдеще.",
318
382
  feedbackPlaceholder: "Кажете ни повече за вашето преживяване…",
319
- submit: "Изпрати"
320
- }, Lt = {
383
+ submit: "Изпрати",
384
+ leadFormTitle: "Информация за контакт",
385
+ leadFormSuccess: "Благодарим! Вашите данни бяха изпратени.",
386
+ leadFormRequiredError: "Моля, попълнете всички задължителни полета.",
387
+ leadFormGenericError: "Нещо се обърка. Моля, опитайте отново.",
388
+ leadFormName: "Име",
389
+ leadFormEmail: "Имейл",
390
+ leadFormPhone: "Телефон",
391
+ leadFormMessage: "Вашето съобщение"
392
+ }, Aa = {
321
393
  sendMessage: "Enviar un missatge",
322
394
  send: "Enviar",
323
395
  close: "Tancar",
@@ -351,8 +423,16 @@ const yt = {
351
423
  tellUsMore: "Explica’ns més",
352
424
  feedbackSubtitle: "El teu comentari ens ajuda a millorar el servei i a donar-te un millor suport en el futur.",
353
425
  feedbackPlaceholder: "Explica’ns més sobre la teva experiència…",
354
- submit: "Envia"
355
- }, At = {
426
+ submit: "Envia",
427
+ leadFormTitle: "Informació de contacte",
428
+ leadFormSuccess: "Gràcies! Les teves dades s'han enviat.",
429
+ leadFormRequiredError: "Si us plau, ompliu tots els camps obligatoris.",
430
+ leadFormGenericError: "Alguna cosa ha anat malament. Torneu-ho a provar.",
431
+ leadFormName: "Nom",
432
+ leadFormEmail: "Correu electrònic",
433
+ leadFormPhone: "Telèfon",
434
+ leadFormMessage: "El teu missatge"
435
+ }, La = {
356
436
  sendMessage: "发送消息",
357
437
  send: "发送",
358
438
  close: "关闭",
@@ -386,8 +466,16 @@ const yt = {
386
466
  tellUsMore: "告诉我们更多",
387
467
  feedbackSubtitle: "您的反馈有助于我们改进服务,并在未来为您提供更好的支持。",
388
468
  feedbackPlaceholder: "告诉我们更多关于您的体验…",
389
- submit: "提交"
390
- }, wt = {
469
+ submit: "提交",
470
+ leadFormTitle: "联系信息",
471
+ leadFormSuccess: "谢谢!您的信息已提交。",
472
+ leadFormRequiredError: "请填写所有必填字段。",
473
+ leadFormGenericError: "出现错误,请重试。",
474
+ leadFormName: "姓名",
475
+ leadFormEmail: "电子邮箱",
476
+ leadFormPhone: "电话",
477
+ leadFormMessage: "您的留言"
478
+ }, ja = {
391
479
  sendMessage: "Pošalji poruku",
392
480
  send: "Pošalji",
393
481
  close: "Zatvori",
@@ -421,8 +509,16 @@ const yt = {
421
509
  tellUsMore: "Recite nam više",
422
510
  feedbackSubtitle: "Vaša povratna informacija pomaže nam poboljšati uslugu i bolje vas podržati u budućnosti.",
423
511
  feedbackPlaceholder: "Recite nam više o svom iskustvu…",
424
- submit: "Pošalji"
425
- }, Vt = {
512
+ submit: "Pošalji",
513
+ leadFormTitle: "Podaci za kontakt",
514
+ leadFormSuccess: "Hvala! Vaši podaci su poslani.",
515
+ leadFormRequiredError: "Ispunite sva obavezna polja.",
516
+ leadFormGenericError: "Nešto je pošlo po zlu. Pokušajte ponovo.",
517
+ leadFormName: "Ime",
518
+ leadFormEmail: "E-mail",
519
+ leadFormPhone: "Telefon",
520
+ leadFormMessage: "Vaša poruka"
521
+ }, Va = {
426
522
  sendMessage: "Poslat zprávu",
427
523
  send: "Odeslat",
428
524
  close: "Zavřít",
@@ -456,8 +552,16 @@ const yt = {
456
552
  tellUsMore: "Řekněte nám více",
457
553
  feedbackSubtitle: "Vaše zpětná vazba nám pomáhá zlepšovat naše služby a lépe vás v budoucnu podporovat.",
458
554
  feedbackPlaceholder: "Řekněte nám více o své zkušenosti…",
459
- submit: "Odeslat"
460
- }, Dt = {
555
+ submit: "Odeslat",
556
+ leadFormTitle: "Kontaktní údaje",
557
+ leadFormSuccess: "Děkujeme! Vaše údaje byly odeslány.",
558
+ leadFormRequiredError: "Vyplňte prosím všechna povinná pole.",
559
+ leadFormGenericError: "Něco se pokazilo. Zkuste to znovu.",
560
+ leadFormName: "Jméno",
561
+ leadFormEmail: "E-mail",
562
+ leadFormPhone: "Telefon",
563
+ leadFormMessage: "Vaše zpráva"
564
+ }, Ia = {
461
565
  sendMessage: "Send en besked",
462
566
  send: "Send",
463
567
  close: "Luk",
@@ -491,8 +595,16 @@ const yt = {
491
595
  tellUsMore: "Fortæl os mere",
492
596
  feedbackSubtitle: "Din feedback hjælper os med at forbedre vores service og støtte dig bedre i fremtiden.",
493
597
  feedbackPlaceholder: "Fortæl os mere om din oplevelse…",
494
- submit: "Send"
495
- }, It = {
598
+ submit: "Send",
599
+ leadFormTitle: "Kontaktinfo",
600
+ leadFormSuccess: "Tak! Dine oplysninger er indsendt.",
601
+ leadFormRequiredError: "Udfyld venligst alle obligatoriske felter.",
602
+ leadFormGenericError: "Noget gik galt. Prøv igen.",
603
+ leadFormName: "Navn",
604
+ leadFormEmail: "E-mail",
605
+ leadFormPhone: "Telefon",
606
+ leadFormMessage: "Din besked"
607
+ }, Da = {
496
608
  sendMessage: "Stuur een bericht",
497
609
  send: "Verzenden",
498
610
  close: "Sluiten",
@@ -526,8 +638,16 @@ const yt = {
526
638
  tellUsMore: "Vertel ons meer",
527
639
  feedbackSubtitle: "Je feedback helpt ons onze service te verbeteren en je in de toekomst beter te ondersteunen.",
528
640
  feedbackPlaceholder: "Vertel ons meer over je ervaring…",
529
- submit: "Verzenden"
530
- }, jt = {
641
+ submit: "Verzenden",
642
+ leadFormTitle: "Contactgegevens",
643
+ leadFormSuccess: "Bedankt! Je gegevens zijn verzonden.",
644
+ leadFormRequiredError: "Vul alle verplichte velden in.",
645
+ leadFormGenericError: "Er is iets misgegaan. Probeer het opnieuw.",
646
+ leadFormName: "Naam",
647
+ leadFormEmail: "E-mail",
648
+ leadFormPhone: "Telefoon",
649
+ leadFormMessage: "Uw bericht"
650
+ }, qa = {
531
651
  sendMessage: "Send a message",
532
652
  send: "Send",
533
653
  close: "Close",
@@ -561,8 +681,16 @@ const yt = {
561
681
  tellUsMore: "Tell us more",
562
682
  feedbackSubtitle: "Your feedback helps us improve our service and better support you in the future.",
563
683
  feedbackPlaceholder: "Tell us more about your experience…",
564
- submit: "Submit"
565
- }, _t = {
684
+ submit: "Submit",
685
+ leadFormTitle: "Contact info",
686
+ leadFormSuccess: "Thanks! Your details have been submitted.",
687
+ leadFormRequiredError: "Please fill in all required fields.",
688
+ leadFormGenericError: "Something went wrong. Please try again.",
689
+ leadFormName: "Name",
690
+ leadFormEmail: "Email",
691
+ leadFormPhone: "Phone",
692
+ leadFormMessage: "Your message"
693
+ }, Na = {
566
694
  sendMessage: "Saada sõnum",
567
695
  send: "Saada",
568
696
  close: "Sulge",
@@ -596,8 +724,16 @@ const yt = {
596
724
  tellUsMore: "Räägi meile rohkem",
597
725
  feedbackSubtitle: "Sinu tagasiside aitab meil teenust parandada ja sind tulevikus paremini toetada.",
598
726
  feedbackPlaceholder: "Räägi meile rohkem oma kogemusest…",
599
- submit: "Saada"
600
- }, qt = {
727
+ submit: "Saada",
728
+ leadFormTitle: "Kontaktandmed",
729
+ leadFormSuccess: "Aitäh! Teie andmed on esitatud.",
730
+ leadFormRequiredError: "Palun täitke kõik kohustuslikud väljad.",
731
+ leadFormGenericError: "Midagi läks valesti. Palun proovige uuesti.",
732
+ leadFormName: "Nimi",
733
+ leadFormEmail: "E-post",
734
+ leadFormPhone: "Telefon",
735
+ leadFormMessage: "Teie sõnum"
736
+ }, _a = {
601
737
  sendMessage: "Lähetä viesti",
602
738
  send: "Lähetä",
603
739
  close: "Sulje",
@@ -631,8 +767,16 @@ const yt = {
631
767
  tellUsMore: "Kerro lisää",
632
768
  feedbackSubtitle: "Palautteesi auttaa meitä parantamaan palveluamme ja tukemaan sinua paremmin tulevaisuudessa.",
633
769
  feedbackPlaceholder: "Kerro lisää kokemuksestasi…",
634
- submit: "Lähetä"
635
- }, Nt = {
770
+ submit: "Lähetä",
771
+ leadFormTitle: "Yhteystiedot",
772
+ leadFormSuccess: "Kiitos! Tietosi on lähetetty.",
773
+ leadFormRequiredError: "Täytä kaikki pakolliset kentät.",
774
+ leadFormGenericError: "Jokin menikin pieleen. Yritä uudelleen.",
775
+ leadFormName: "Nimi",
776
+ leadFormEmail: "Sähköposti",
777
+ leadFormPhone: "Puhelin",
778
+ leadFormMessage: "Viestisi"
779
+ }, Ra = {
636
780
  sendMessage: "Envoyer un message",
637
781
  send: "Envoyer",
638
782
  close: "Fermer",
@@ -666,8 +810,16 @@ const yt = {
666
810
  tellUsMore: "Dites-nous en plus",
667
811
  feedbackSubtitle: "Votre retour nous aide à améliorer notre service et à mieux vous accompagner à l’avenir.",
668
812
  feedbackPlaceholder: "Dites-nous en plus sur votre expérience…",
669
- submit: "Envoyer"
670
- }, Rt = {
813
+ submit: "Envoyer",
814
+ leadFormTitle: "Coordonnées",
815
+ leadFormSuccess: "Merci ! Vos informations ont été envoyées.",
816
+ leadFormRequiredError: "Veuillez remplir tous les champs obligatoires.",
817
+ leadFormGenericError: "Une erreur est survenue. Veuillez réessayer.",
818
+ leadFormName: "Nom",
819
+ leadFormEmail: "E-mail",
820
+ leadFormPhone: "Téléphone",
821
+ leadFormMessage: "Votre message"
822
+ }, Ba = {
671
823
  sendMessage: "Enviar unha mensaxe",
672
824
  send: "Enviar",
673
825
  close: "Pechar",
@@ -701,8 +853,16 @@ const yt = {
701
853
  tellUsMore: "Cóntanos máis",
702
854
  feedbackSubtitle: "Os teus comentarios axúdannos a mellorar o servizo e a apoiarte mellor no futuro.",
703
855
  feedbackPlaceholder: "Cóntanos máis sobre a túa experiencia…",
704
- submit: "Enviar"
705
- }, Bt = {
856
+ submit: "Enviar",
857
+ leadFormTitle: "Información de contacto",
858
+ leadFormSuccess: "Grazas! Os teus datos foron enviados.",
859
+ leadFormRequiredError: "Cubra todos os campos obrigatorios.",
860
+ leadFormGenericError: "Algo saíu mal. Téntao de novo.",
861
+ leadFormName: "Nome",
862
+ leadFormEmail: "Correo electrónico",
863
+ leadFormPhone: "Teléfono",
864
+ leadFormMessage: "A túa mensaxe"
865
+ }, Ga = {
706
866
  sendMessage: "Nachricht senden",
707
867
  send: "Senden",
708
868
  close: "Schließen",
@@ -736,8 +896,16 @@ const yt = {
736
896
  tellUsMore: "Erzähl uns mehr",
737
897
  feedbackSubtitle: "Dein Feedback hilft uns, unseren Service zu verbessern und dich in Zukunft besser zu unterstützen.",
738
898
  feedbackPlaceholder: "Erzähl uns mehr über deine Erfahrung…",
739
- submit: "Senden"
740
- }, Ft = {
899
+ submit: "Senden",
900
+ leadFormTitle: "Kontaktinformationen",
901
+ leadFormSuccess: "Danke! Ihre Angaben wurden übermittelt.",
902
+ leadFormRequiredError: "Bitte füllen Sie alle Pflichtfelder aus.",
903
+ leadFormGenericError: "Etwas ist schiefgelaufen. Bitte versuchen Sie es erneut.",
904
+ leadFormName: "Name",
905
+ leadFormEmail: "E-Mail",
906
+ leadFormPhone: "Telefon",
907
+ leadFormMessage: "Ihre Nachricht"
908
+ }, Ua = {
741
909
  sendMessage: "Αποστολή μηνύματος",
742
910
  send: "Αποστολή",
743
911
  close: "Κλείσιμο",
@@ -771,8 +939,16 @@ const yt = {
771
939
  tellUsMore: "Πείτε μας περισσότερα",
772
940
  feedbackSubtitle: "Τα σχόλιά σας μας βοηθούν να βελτιώσουμε την υπηρεσία μας και να σας υποστηρίξουμε καλύτερα στο μέλλον.",
773
941
  feedbackPlaceholder: "Πείτε μας περισσότερα για την εμπειρία σας…",
774
- submit: "Υποβολή"
775
- }, Ut = {
942
+ submit: "Υποβολή",
943
+ leadFormTitle: "Στοιχεία επικοινωνίας",
944
+ leadFormSuccess: "Ευχαριστούμε! Τα στοιχεία σας υποβλήθηκαν.",
945
+ leadFormRequiredError: "Συμπληρώστε όλα τα υποχρεωτικά πεδία.",
946
+ leadFormGenericError: "Κάτι πήγε στραβά. Δοκιμάστε ξανά.",
947
+ leadFormName: "Όνομα",
948
+ leadFormEmail: "E-mail",
949
+ leadFormPhone: "Τηλέφωνο",
950
+ leadFormMessage: "Το μήνυμά σας"
951
+ }, Ka = {
776
952
  sendMessage: "સંદેશ મોકલો",
777
953
  send: "મોકલો",
778
954
  close: "બંધ કરો",
@@ -806,8 +982,16 @@ const yt = {
806
982
  tellUsMore: "અમને વધુ જણાવો",
807
983
  feedbackSubtitle: "તમારો પ્રતિસાદ અમને અમારી સેવા સુધારવામાં અને ભવિષ્યમાં તમને વધુ સારી રીતે સહાય કરવામાં મદદ કરે છે.",
808
984
  feedbackPlaceholder: "તમારા અનુભવ વિશે અમને વધુ જણાવો…",
809
- submit: "સબમિટ કરો"
810
- }, Ot = {
985
+ submit: "સબમિટ કરો",
986
+ leadFormTitle: "સંપર્ક માહિતી",
987
+ leadFormSuccess: "આભાર! તમારી વિગતો સબમિટ થઈ ગઈ છે.",
988
+ leadFormRequiredError: "કૃપા કરીને બધા જરૂરી ફીલ્ડ ભરો.",
989
+ leadFormGenericError: "કંઈક ખોટું થયું. કૃપા કરી ફરી પ્રયાસ કરો.",
990
+ leadFormName: "નામ",
991
+ leadFormEmail: "ઇમેઇલ",
992
+ leadFormPhone: "ફોન",
993
+ leadFormMessage: "તમારો સંદેશ"
994
+ }, Oa = {
811
995
  sendMessage: "संदेश भेजें",
812
996
  send: "भेजें",
813
997
  close: "बंद करें",
@@ -841,8 +1025,16 @@ const yt = {
841
1025
  tellUsMore: "हमें और बताएं",
842
1026
  feedbackSubtitle: "आपकी प्रतिक्रिया हमें अपनी सेवा बेहतर बनाने और भविष्य में आपकी बेहतर सहायता करने में मदद करती है।",
843
1027
  feedbackPlaceholder: "अपने अनुभव के बारे में हमें और बताएं…",
844
- submit: "सबमिट करें"
845
- }, Kt = {
1028
+ submit: "सबमिट करें",
1029
+ leadFormTitle: "संपर्क जानकारी",
1030
+ leadFormSuccess: "धन्यवाद! आपकी जानकारी सबमिट कर दी गई है।",
1031
+ leadFormRequiredError: "कृपया सभी आवश्यक फ़ील्ड भरें।",
1032
+ leadFormGenericError: "कुछ गलत हो गया। कृपया पुनः प्रयास करें।",
1033
+ leadFormName: "नाम",
1034
+ leadFormEmail: "ईमेल",
1035
+ leadFormPhone: "फ़ोन",
1036
+ leadFormMessage: "आपका संदेश"
1037
+ }, Ya = {
846
1038
  sendMessage: "Üzenet küldése",
847
1039
  send: "Küldés",
848
1040
  close: "Bezárás",
@@ -876,8 +1068,16 @@ const yt = {
876
1068
  tellUsMore: "Mondjon többet",
877
1069
  feedbackSubtitle: "Visszajelzése segít nekünk fejleszteni szolgáltatásunkat, és a jövőben jobban támogatni Önt.",
878
1070
  feedbackPlaceholder: "Mondjon többet az élményéről…",
879
- submit: "Küldés"
880
- }, Yt = {
1071
+ submit: "Küldés",
1072
+ leadFormTitle: "Elérhetőségi adatok",
1073
+ leadFormSuccess: "Köszönjük! Az adatait elküldtük.",
1074
+ leadFormRequiredError: "Kérjük, töltse ki az összes kötelező mezőt.",
1075
+ leadFormGenericError: "Valami hiba történt. Kérjük, próbálja újra.",
1076
+ leadFormName: "Név",
1077
+ leadFormEmail: "E-mail",
1078
+ leadFormPhone: "Telefon",
1079
+ leadFormMessage: "Üzenete"
1080
+ }, Qa = {
881
1081
  sendMessage: "Kirim pesan",
882
1082
  send: "Kirim",
883
1083
  close: "Tutup",
@@ -911,8 +1111,16 @@ const yt = {
911
1111
  tellUsMore: "Ceritakan lebih banyak",
912
1112
  feedbackSubtitle: "Masukan Anda membantu kami meningkatkan layanan dan mendukung Anda lebih baik di masa depan.",
913
1113
  feedbackPlaceholder: "Ceritakan lebih banyak tentang pengalaman Anda…",
914
- submit: "Kirim"
915
- }, Qt = {
1114
+ submit: "Kirim",
1115
+ leadFormTitle: "Informasi kontak",
1116
+ leadFormSuccess: "Terima kasih! Detail Anda telah dikirim.",
1117
+ leadFormRequiredError: "Harap isi semua kolom yang wajib diisi.",
1118
+ leadFormGenericError: "Terjadi kesalahan. Silakan coba lagi.",
1119
+ leadFormName: "Nama",
1120
+ leadFormEmail: "Email",
1121
+ leadFormPhone: "Telepon",
1122
+ leadFormMessage: "Pesan Anda"
1123
+ }, Ha = {
916
1124
  sendMessage: "Invia un messaggio",
917
1125
  send: "Invia",
918
1126
  close: "Chiudi",
@@ -946,8 +1154,16 @@ const yt = {
946
1154
  tellUsMore: "Dicci di più",
947
1155
  feedbackSubtitle: "Il tuo feedback ci aiuta a migliorare il servizio e a supportarti meglio in futuro.",
948
1156
  feedbackPlaceholder: "Raccontaci di più sulla tua esperienza…",
949
- submit: "Invia"
950
- }, Gt = {
1157
+ submit: "Invia",
1158
+ leadFormTitle: "Informazioni di contatto",
1159
+ leadFormSuccess: "Grazie! I tuoi dati sono stati inviati.",
1160
+ leadFormRequiredError: "Compila tutti i campi obbligatori.",
1161
+ leadFormGenericError: "Qualcosa è andato storto. Riprova.",
1162
+ leadFormName: "Nome",
1163
+ leadFormEmail: "E-mail",
1164
+ leadFormPhone: "Telefono",
1165
+ leadFormMessage: "Il tuo messaggio"
1166
+ }, Wa = {
951
1167
  sendMessage: "メッセージを送信",
952
1168
  send: "送信",
953
1169
  close: "閉じる",
@@ -981,8 +1197,16 @@ const yt = {
981
1197
  tellUsMore: "詳しく教えてください",
982
1198
  feedbackSubtitle: "いただいたフィードバックは、サービスの改善と今後のより良いサポートに役立ちます。",
983
1199
  feedbackPlaceholder: "ご体験について詳しくお聞かせください…",
984
- submit: "送信"
985
- }, Ht = {
1200
+ submit: "送信",
1201
+ leadFormTitle: "連絡先情報",
1202
+ leadFormSuccess: "ありがとうございます!情報が送信されました。",
1203
+ leadFormRequiredError: "必須項目をすべて入力してください。",
1204
+ leadFormGenericError: "問題が発生しました。もう一度お試しください。",
1205
+ leadFormName: "お名前",
1206
+ leadFormEmail: "メールアドレス",
1207
+ leadFormPhone: "電話番号",
1208
+ leadFormMessage: "メッセージ"
1209
+ }, $a = {
986
1210
  sendMessage: "ಸಂದೇಶ ಕಳುಹಿಸಿ",
987
1211
  send: "ಕಳುಹಿಸಿ",
988
1212
  close: "ಮುಚ್ಚಿ",
@@ -1016,8 +1240,16 @@ const yt = {
1016
1240
  tellUsMore: "ನಮಗೆ ಇನ್ನಷ್ಟು ತಿಳಿಸಿ",
1017
1241
  feedbackSubtitle: "ನಿಮ್ಮ ಪ್ರತಿಕ್ರಿಯೆ ನಮ್ಮ ಸೇವೆಯನ್ನು ಸುಧಾರಿಸಲು ಮತ್ತು ಭವಿಷ್ಯದಲ್ಲಿ ನಿಮಗೆ ಉತ್ತಮ ಬೆಂಬಲ ನೀಡಲು ಸಹಾಯ ಮಾಡುತ್ತದೆ.",
1018
1242
  feedbackPlaceholder: "ನಿಮ್ಮ ಅನುಭವದ ಬಗ್ಗೆ ನಮಗೆ ಇನ್ನಷ್ಟು ತಿಳಿಸಿ…",
1019
- submit: "ಸಲ್ಲಿಸಿ"
1020
- }, Wt = {
1243
+ submit: "ಸಲ್ಲಿಸಿ",
1244
+ leadFormTitle: "ಸಂಪರ್ಕ ಮಾಹಿತಿ",
1245
+ leadFormSuccess: "ಧನ್ಯವಾದಗಳು! ನಿಮ್ಮ ವಿವರಗಳನ್ನು ಸಲ್ಲಿಸಲಾಗಿದೆ.",
1246
+ leadFormRequiredError: "ದಯವಿಟ್ಟು ಎಲ್ಲಾ ಅಗತ್ಯ ಕ್ಷೇತ್ರಗಳನ್ನು ಭರ್ತಿ ಮಾಡಿ.",
1247
+ leadFormGenericError: "ಏನೋ ತಪ್ಪಾಗಿದೆ. ದಯವಿಟ್ಟು ಮತ್ತೆ ಪ್ರಯತ್ನಿಸಿ.",
1248
+ leadFormName: "ಹೆಸರು",
1249
+ leadFormEmail: "ಇಮೇಲ್",
1250
+ leadFormPhone: "ಫೋನ್",
1251
+ leadFormMessage: "ನಿಮ್ಮ ಸಂದೇಶ"
1252
+ }, Za = {
1021
1253
  sendMessage: "Хабарлама жіберу",
1022
1254
  send: "Жіберу",
1023
1255
  close: "Жабу",
@@ -1051,8 +1283,16 @@ const yt = {
1051
1283
  tellUsMore: "Бізге көбірек айтыңыз",
1052
1284
  feedbackSubtitle: "Пікіріңіз бізге қызметімізді жақсартуға және болашақта сізге жақсырақ қолдау көрсетуге көмектеседі.",
1053
1285
  feedbackPlaceholder: "Тәжірибеңіз туралы бізге көбірек айтыңыз…",
1054
- submit: "Жіберу"
1055
- }, $t = {
1286
+ submit: "Жіберу",
1287
+ leadFormTitle: "Байланыс ақпараты",
1288
+ leadFormSuccess: "Рахмет! Сіздің деректеріңіз жіберілді.",
1289
+ leadFormRequiredError: "Барлық міндетті жолдарды толтырыңыз.",
1290
+ leadFormGenericError: "Бірдеңе қате кетті. Қайталап көріңіз.",
1291
+ leadFormName: "Аты",
1292
+ leadFormEmail: "Электрондық пошта",
1293
+ leadFormPhone: "Телефон",
1294
+ leadFormMessage: "Сіздің хабарламаңыз"
1295
+ }, Ja = {
1056
1296
  sendMessage: "메시지 보내기",
1057
1297
  send: "보내기",
1058
1298
  close: "닫기",
@@ -1086,8 +1326,16 @@ const yt = {
1086
1326
  tellUsMore: "더 알려주세요",
1087
1327
  feedbackSubtitle: "의견은 서비스를 개선하고 앞으로 더 나은 지원을 제공하는 데 도움이 됩니다.",
1088
1328
  feedbackPlaceholder: "경험에 대해 더 알려주세요…",
1089
- submit: "제출"
1090
- }, Zt = {
1329
+ submit: "제출",
1330
+ leadFormTitle: "연락처 정보",
1331
+ leadFormSuccess: "감사합니다! 정보가 제출되었습니다.",
1332
+ leadFormRequiredError: "필수 항목을 모두 입력해 주세요.",
1333
+ leadFormGenericError: "문제가 발생했습니다. 다시 시도해 주세요.",
1334
+ leadFormName: "이름",
1335
+ leadFormEmail: "이메일",
1336
+ leadFormPhone: "전화번호",
1337
+ leadFormMessage: "메시지"
1338
+ }, Xa = {
1091
1339
  sendMessage: "Sūtīt ziņojumu",
1092
1340
  send: "Sūtīt",
1093
1341
  close: "Aizvērt",
@@ -1121,8 +1369,16 @@ const yt = {
1121
1369
  tellUsMore: "Pastāstiet mums vairāk",
1122
1370
  feedbackSubtitle: "Jūsu atsauksme palīdz mums uzlabot pakalpojumu un nākotnē jūs labāk atbalstīt.",
1123
1371
  feedbackPlaceholder: "Pastāstiet mums vairāk par savu pieredzi…",
1124
- submit: "Iesniegt"
1125
- }, Jt = {
1372
+ submit: "Iesniegt",
1373
+ leadFormTitle: "Kontaktinformācija",
1374
+ leadFormSuccess: "Paldies! Jūsu dati ir iesniegti.",
1375
+ leadFormRequiredError: "Lūdzu, aizpildiet visus obligātos laukus.",
1376
+ leadFormGenericError: "Kaut kas noticis nepareizi. Lūdzu, mēģiniet vēlreiz.",
1377
+ leadFormName: "Vārds",
1378
+ leadFormEmail: "E-pasts",
1379
+ leadFormPhone: "Tālrunis",
1380
+ leadFormMessage: "Jūsu ziņojums"
1381
+ }, et = {
1126
1382
  sendMessage: "Siųsti žinutę",
1127
1383
  send: "Siųsti",
1128
1384
  close: "Uždaryti",
@@ -1156,8 +1412,16 @@ const yt = {
1156
1412
  tellUsMore: "Papasakokite daugiau",
1157
1413
  feedbackSubtitle: "Jūsų atsiliepimas padeda mums tobulinti paslaugą ir ateityje geriau jus aptarnauti.",
1158
1414
  feedbackPlaceholder: "Papasakokite daugiau apie savo patirtį…",
1159
- submit: "Pateikti"
1160
- }, Xt = {
1415
+ submit: "Pateikti",
1416
+ leadFormTitle: "Kontaktinė informacija",
1417
+ leadFormSuccess: "Dėkojame! Jūsų duomenys buvo pateikti.",
1418
+ leadFormRequiredError: "Užpildykite visus privalomus laukus.",
1419
+ leadFormGenericError: "Kažkas nutiko negerai. Bandykite dar kartą.",
1420
+ leadFormName: "Vardas",
1421
+ leadFormEmail: "El. paštas",
1422
+ leadFormPhone: "Telefonas",
1423
+ leadFormMessage: "Jūsų žinutė"
1424
+ }, at = {
1161
1425
  sendMessage: "Испрати порака",
1162
1426
  send: "Испрати",
1163
1427
  close: "Затвори",
@@ -1191,8 +1455,16 @@ const yt = {
1191
1455
  tellUsMore: "Кажете ни повеќе",
1192
1456
  feedbackSubtitle: "Вашата повратна информација ни помага да ја подобриме услугата и подобро да ве поддржиме во иднина.",
1193
1457
  feedbackPlaceholder: "Кажете ни повеќе за вашето искуство…",
1194
- submit: "Испрати"
1195
- }, en = {
1458
+ submit: "Испрати",
1459
+ leadFormTitle: "Информации за контакт",
1460
+ leadFormSuccess: "Ви благодариме! Вашите податоци се испратени.",
1461
+ leadFormRequiredError: "Пополнете ги сите задолжителни полиња.",
1462
+ leadFormGenericError: "Нешто тргна наопаку. Пробајте повторно.",
1463
+ leadFormName: "Име",
1464
+ leadFormEmail: "Е-пошта",
1465
+ leadFormPhone: "Телефон",
1466
+ leadFormMessage: "Вашата порака"
1467
+ }, tt = {
1196
1468
  sendMessage: "Hantar mesej",
1197
1469
  send: "Hantar",
1198
1470
  close: "Tutup",
@@ -1226,8 +1498,16 @@ const yt = {
1226
1498
  tellUsMore: "Beritahu kami lebih lanjut",
1227
1499
  feedbackSubtitle: "Maklum balas anda membantu kami menambah baik perkhidmatan dan menyokong anda dengan lebih baik pada masa depan.",
1228
1500
  feedbackPlaceholder: "Beritahu kami lebih lanjut tentang pengalaman anda…",
1229
- submit: "Hantar"
1230
- }, tn = {
1501
+ submit: "Hantar",
1502
+ leadFormTitle: "Maklumat hubungan",
1503
+ leadFormSuccess: "Terima kasih! Butiran anda telah dihantar.",
1504
+ leadFormRequiredError: "Sila isi semua ruangan yang diperlukan.",
1505
+ leadFormGenericError: "Sesuatu tidak kena. Sila cuba lagi.",
1506
+ leadFormName: "Nama",
1507
+ leadFormEmail: "E-mel",
1508
+ leadFormPhone: "Telefon",
1509
+ leadFormMessage: "Mesej anda"
1510
+ }, nt = {
1231
1511
  sendMessage: "ഒരു സന്ദേശം അയയ്‌ക്കുക",
1232
1512
  send: "അയയ്‌ക്കുക",
1233
1513
  close: "അടയ്‌ക്കുക",
@@ -1261,8 +1541,16 @@ const yt = {
1261
1541
  tellUsMore: "ഞങ്ങളോട് കൂടുതൽ പറയൂ",
1262
1542
  feedbackSubtitle: "നിങ്ങളുടെ പ്രതികരണം ഞങ്ങളുടെ സേവനം മെച്ചപ്പെടുത്താനും ഭാവിയിൽ നിങ്ങളെ മികച്ച രീതിയിൽ പിന്തുണയ്ക്കാനും സഹായിക്കുന്നു.",
1263
1543
  feedbackPlaceholder: "നിങ്ങളുടെ അനുഭവത്തെക്കുറിച്ച് കൂടുതൽ പറയൂ…",
1264
- submit: "സമർപ്പിക്കുക"
1265
- }, nn = {
1544
+ submit: "സമർപ്പിക്കുക",
1545
+ leadFormTitle: "ബന്ധപ്പെടാനുള്ള വിവരങ്ങൾ",
1546
+ leadFormSuccess: "നന്ദി! നിങ്ങളുടെ വിവരങ്ങൾ സമർപ്പിച്ചു.",
1547
+ leadFormRequiredError: "ദയവായി എല്ലാ ആവശ്യമായ ഫീൽഡുകളും പൂരിപ്പിക്കുക.",
1548
+ leadFormGenericError: "എന്തോ കുഴപ്പം സംഭവിച്ചു. വീണ്ടും ശ്രമിക്കുക.",
1549
+ leadFormName: "പേര്",
1550
+ leadFormEmail: "ഇമെയിൽ",
1551
+ leadFormPhone: "ഫോൺ",
1552
+ leadFormMessage: "നിങ്ങളുടെ സന്ദേശം"
1553
+ }, it = {
1266
1554
  sendMessage: "संदेश पाठवा",
1267
1555
  send: "पाठवा",
1268
1556
  close: "बंद करा",
@@ -1296,8 +1584,16 @@ const yt = {
1296
1584
  tellUsMore: "आम्हाला अधिक सांगा",
1297
1585
  feedbackSubtitle: "तुमचा अभिप्राय आम्हाला आमची सेवा सुधारण्यात आणि भविष्यात तुम्हाला अधिक चांगली मदत करण्यात मदत करतो.",
1298
1586
  feedbackPlaceholder: "तुमच्या अनुभवाबद्दल आम्हाला अधिक सांगा…",
1299
- submit: "सबमिट करा"
1300
- }, an = {
1587
+ submit: "सबमिट करा",
1588
+ leadFormTitle: "संपर्क माहिती",
1589
+ leadFormSuccess: "धन्यवाद! तुमची माहिती सबमिट केली आहे.",
1590
+ leadFormRequiredError: "कृपया सर्व आवश्यक फील्ड भरा.",
1591
+ leadFormGenericError: "काहीतरी चुकले. कृपया पुन्हा प्रयत्न करा.",
1592
+ leadFormName: "नाव",
1593
+ leadFormEmail: "ईमेल",
1594
+ leadFormPhone: "फोन",
1595
+ leadFormMessage: "तुमचा संदेश"
1596
+ }, ot = {
1301
1597
  sendMessage: "Send en melding",
1302
1598
  send: "Send",
1303
1599
  close: "Lukk",
@@ -1331,8 +1627,16 @@ const yt = {
1331
1627
  tellUsMore: "Fortell oss mer",
1332
1628
  feedbackSubtitle: "Tilbakemeldingen din hjelper oss med å forbedre tjenesten og støtte deg bedre i fremtiden.",
1333
1629
  feedbackPlaceholder: "Fortell oss mer om opplevelsen din…",
1334
- submit: "Send inn"
1335
- }, sn = {
1630
+ submit: "Send inn",
1631
+ leadFormTitle: "Kontaktinfo",
1632
+ leadFormSuccess: "Takk! Dine opplysninger er sendt.",
1633
+ leadFormRequiredError: "Fyll ut alle obligatoriske felt.",
1634
+ leadFormGenericError: "Noe gikk galt. Prøv igjen.",
1635
+ leadFormName: "Navn",
1636
+ leadFormEmail: "E-post",
1637
+ leadFormPhone: "Telefon",
1638
+ leadFormMessage: "Din melding"
1639
+ }, rt = {
1336
1640
  sendMessage: "پیامی بنویسید",
1337
1641
  send: "ارسال",
1338
1642
  close: "بستن",
@@ -1366,8 +1670,16 @@ const yt = {
1366
1670
  tellUsMore: "بیشتر بگویید",
1367
1671
  feedbackSubtitle: "بازخورد شما به ما کمک می‌کند خدماتمان را بهبود دهیم و در آینده بهتر از شما پشتیبانی کنیم.",
1368
1672
  feedbackPlaceholder: "درباره تجربه خود بیشتر بگویید…",
1369
- submit: "ارسال"
1370
- }, on = {
1673
+ submit: "ارسال",
1674
+ leadFormTitle: "اطلاعات تماس",
1675
+ leadFormSuccess: "متشکریم! اطلاعات شما ارسال شد.",
1676
+ leadFormRequiredError: "لطفاً همه فیلدهای ضروری را تکمیل کنید.",
1677
+ leadFormGenericError: "مشکلی پیش آمد. لطفاً دوباره تلاش کنید.",
1678
+ leadFormName: "نام",
1679
+ leadFormEmail: "ایمیل",
1680
+ leadFormPhone: "تلفن",
1681
+ leadFormMessage: "پیام شما"
1682
+ }, st = {
1371
1683
  sendMessage: "Wyślij wiadomość",
1372
1684
  send: "Wyślij",
1373
1685
  close: "Zamknij",
@@ -1401,8 +1713,16 @@ const yt = {
1401
1713
  tellUsMore: "Powiedz nam więcej",
1402
1714
  feedbackSubtitle: "Twoja opinia pomaga nam ulepszać usługę i lepiej wspierać Cię w przyszłości.",
1403
1715
  feedbackPlaceholder: "Powiedz nam więcej o swoim doświadczeniu…",
1404
- submit: "Wyślij"
1405
- }, rn = {
1716
+ submit: "Wyślij",
1717
+ leadFormTitle: "Dane kontaktowe",
1718
+ leadFormSuccess: "Dziękujemy! Twoje dane zostały wysłane.",
1719
+ leadFormRequiredError: "Wypełnij wszystkie wymagane pola.",
1720
+ leadFormGenericError: "Coś poszło nie tak. Spróbuj ponownie.",
1721
+ leadFormName: "Imię",
1722
+ leadFormEmail: "E-mail",
1723
+ leadFormPhone: "Telefon",
1724
+ leadFormMessage: "Twoja wiadomość"
1725
+ }, lt = {
1406
1726
  sendMessage: "Enviar mensagem",
1407
1727
  send: "Enviar",
1408
1728
  close: "Fechar",
@@ -1436,8 +1756,16 @@ const yt = {
1436
1756
  tellUsMore: "Conte-nos mais",
1437
1757
  feedbackSubtitle: "Seu feedback nos ajuda a melhorar nosso serviço e a apoiar você melhor no futuro.",
1438
1758
  feedbackPlaceholder: "Conte-nos mais sobre a sua experiência…",
1439
- submit: "Enviar"
1440
- }, cn = {
1759
+ submit: "Enviar",
1760
+ leadFormTitle: "Informações de contacto",
1761
+ leadFormSuccess: "Obrigado! Os seus dados foram enviados.",
1762
+ leadFormRequiredError: "Preencha todos os campos obrigatórios.",
1763
+ leadFormGenericError: "Algo correu mal. Tente novamente.",
1764
+ leadFormName: "Nome",
1765
+ leadFormEmail: "E-mail",
1766
+ leadFormPhone: "Telefone",
1767
+ leadFormMessage: "Sua mensagem"
1768
+ }, ct = {
1441
1769
  sendMessage: "ਇੱਕ ਸੁਨੇਹਾ ਭੇਜੋ",
1442
1770
  send: "ਭੇਜੋ",
1443
1771
  close: "ਬੰਦ ਕਰੋ",
@@ -1471,8 +1799,16 @@ const yt = {
1471
1799
  tellUsMore: "ਸਾਨੂੰ ਹੋਰ ਦੱਸੋ",
1472
1800
  feedbackSubtitle: "ਤੁਹਾਡਾ ਸੁਝਾਅ ਸਾਨੂੰ ਸਾਡੀ ਸੇਵਾ ਸੁਧਾਰਨ ਅਤੇ ਭਵਿੱਖ ਵਿੱਚ ਤੁਹਾਡੀ ਬਿਹਤਰ ਮਦਦ ਕਰਨ ਵਿੱਚ ਸਹਾਇਤਾ ਕਰਦਾ ਹੈ।",
1473
1801
  feedbackPlaceholder: "ਆਪਣੇ ਅਨੁਭਵ ਬਾਰੇ ਸਾਨੂੰ ਹੋਰ ਦੱਸੋ…",
1474
- submit: "ਜਮ੍ਹਾਂ ਕਰੋ"
1475
- }, ln = {
1802
+ submit: "ਜਮ੍ਹਾਂ ਕਰੋ",
1803
+ leadFormTitle: "ਸੰਪਰਕ ਜਾਣਕਾਰੀ",
1804
+ leadFormSuccess: "ਧੰਨਵਾਦ! ਤੁਹਾਡੀ ਜਾਣਕਾਰੀ ਭੇਜ ਦਿੱਤੀ ਗਈ ਹੈ।",
1805
+ leadFormRequiredError: "ਕਿਰਪਾ ਕਰਕੇ ਸਾਰੇ ਲੋੜੀਂਦੇ ਖੇਤਰ ਭਰੋ।",
1806
+ leadFormGenericError: "ਕੁਝ ਗਲਤ ਹੋ ਗਿਆ। ਕਿਰਪਾ ਕਰਕੇ ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ।",
1807
+ leadFormName: "ਨਾਮ",
1808
+ leadFormEmail: "ਈਮੇਲ",
1809
+ leadFormPhone: "ਫ਼ੋਨ",
1810
+ leadFormMessage: "ਤੁਹਾਡਾ ਸੁਨੇਹਾ"
1811
+ }, dt = {
1476
1812
  sendMessage: "Trimite un mesaj",
1477
1813
  send: "Trimite",
1478
1814
  close: "Închide",
@@ -1506,8 +1842,16 @@ const yt = {
1506
1842
  tellUsMore: "Spune-ne mai multe",
1507
1843
  feedbackSubtitle: "Feedbackul tău ne ajută să ne îmbunătățim serviciul și să te sprijinim mai bine în viitor.",
1508
1844
  feedbackPlaceholder: "Spune-ne mai multe despre experiența ta…",
1509
- submit: "Trimite"
1510
- }, dn = {
1845
+ submit: "Trimite",
1846
+ leadFormTitle: "Informații de contact",
1847
+ leadFormSuccess: "Mulțumim! Datele dumneavoastră au fost trimise.",
1848
+ leadFormRequiredError: "Completați toate câmpurile obligatorii.",
1849
+ leadFormGenericError: "Ceva nu a funcționat. Încercați din nou.",
1850
+ leadFormName: "Nume",
1851
+ leadFormEmail: "E-mail",
1852
+ leadFormPhone: "Telefon",
1853
+ leadFormMessage: "Mesajul dumneavoastră"
1854
+ }, ut = {
1511
1855
  sendMessage: "Отправить сообщение",
1512
1856
  send: "Отправить",
1513
1857
  close: "Закрыть",
@@ -1541,8 +1885,16 @@ const yt = {
1541
1885
  tellUsMore: "Расскажите подробнее",
1542
1886
  feedbackSubtitle: "Ваш отзыв помогает нам улучшать сервис и лучше поддерживать вас в будущем.",
1543
1887
  feedbackPlaceholder: "Расскажите подробнее о вашем опыте…",
1544
- submit: "Отправить"
1545
- }, un = {
1888
+ submit: "Отправить",
1889
+ leadFormTitle: "Контактная информация",
1890
+ leadFormSuccess: "Спасибо! Ваши данные отправлены.",
1891
+ leadFormRequiredError: "Заполните все обязательные поля.",
1892
+ leadFormGenericError: "Что-то пошло не так. Попробуйте снова.",
1893
+ leadFormName: "Имя",
1894
+ leadFormEmail: "Электронная почта",
1895
+ leadFormPhone: "Телефон",
1896
+ leadFormMessage: "Ваше сообщение"
1897
+ }, mt = {
1546
1898
  sendMessage: "Пошаљи поруку",
1547
1899
  send: "Пошаљи",
1548
1900
  close: "Затвори",
@@ -1576,8 +1928,16 @@ const yt = {
1576
1928
  tellUsMore: "Реците нам више",
1577
1929
  feedbackSubtitle: "Ваше повратне информације нам помажу да побољшамо услугу и боље вас подржимо у будућности.",
1578
1930
  feedbackPlaceholder: "Реците нам више о свом искуству…",
1579
- submit: "Пошаљи"
1580
- }, mn = {
1931
+ submit: "Пошаљи",
1932
+ leadFormTitle: "Контакт информације",
1933
+ leadFormSuccess: "Хвала! Ваши подаци су послати.",
1934
+ leadFormRequiredError: "Попуните сва обавезна поља.",
1935
+ leadFormGenericError: "Нешто је пошло по злу. Покушајте поново.",
1936
+ leadFormName: "Име",
1937
+ leadFormEmail: "Имејл",
1938
+ leadFormPhone: "Телефон",
1939
+ leadFormMessage: "Ваша порука"
1940
+ }, ht = {
1581
1941
  sendMessage: "Poslať správu",
1582
1942
  send: "Odoslať",
1583
1943
  close: "Zavrieť",
@@ -1611,8 +1971,16 @@ const yt = {
1611
1971
  tellUsMore: "Povedzte nám viac",
1612
1972
  feedbackSubtitle: "Vaša spätná väzba nám pomáha zlepšovať službu a lepšie vás v budúcnosti podporovať.",
1613
1973
  feedbackPlaceholder: "Povedzte nám viac o svojej skúsenosti…",
1614
- submit: "Odoslať"
1615
- }, hn = {
1974
+ submit: "Odoslať",
1975
+ leadFormTitle: "Kontaktné údaje",
1976
+ leadFormSuccess: "Ďakujeme! Vaše údaje boli odoslané.",
1977
+ leadFormRequiredError: "Vyplňte všetky povinné polia.",
1978
+ leadFormGenericError: "Niečo sa pokazilo. Skúste znova.",
1979
+ leadFormName: "Meno",
1980
+ leadFormEmail: "E-mail",
1981
+ leadFormPhone: "Telefón",
1982
+ leadFormMessage: "Vaša správa"
1983
+ }, gt = {
1616
1984
  sendMessage: "Pošlji sporočilo",
1617
1985
  send: "Pošlji",
1618
1986
  close: "Zapri",
@@ -1646,8 +2014,16 @@ const yt = {
1646
2014
  tellUsMore: "Povejte nam več",
1647
2015
  feedbackSubtitle: "Vaše mnenje nam pomaga izboljšati storitev in vas v prihodnje bolje podpirati.",
1648
2016
  feedbackPlaceholder: "Povejte nam več o svoji izkušnji…",
1649
- submit: "Pošlji"
1650
- }, gn = {
2017
+ submit: "Pošlji",
2018
+ leadFormTitle: "Kontaktni podatki",
2019
+ leadFormSuccess: "Hvala! Vaši podatki so bili posredovani.",
2020
+ leadFormRequiredError: "Izpolnite vsa obvezna polja.",
2021
+ leadFormGenericError: "Nekaj je šlo narobe. Poskusite znova.",
2022
+ leadFormName: "Ime",
2023
+ leadFormEmail: "E-pošta",
2024
+ leadFormPhone: "Telefon",
2025
+ leadFormMessage: "Vaše sporočilo"
2026
+ }, pt = {
1651
2027
  sendMessage: "Enviar un mensaje",
1652
2028
  send: "Enviar",
1653
2029
  close: "Cerrar",
@@ -1681,8 +2057,16 @@ const yt = {
1681
2057
  tellUsMore: "Cuéntanos más",
1682
2058
  feedbackSubtitle: "Tus comentarios nos ayudan a mejorar nuestro servicio y a apoyarte mejor en el futuro.",
1683
2059
  feedbackPlaceholder: "Cuéntanos más sobre tu experiencia…",
1684
- submit: "Enviar"
1685
- }, pn = {
2060
+ submit: "Enviar",
2061
+ leadFormTitle: "Información de contacto",
2062
+ leadFormSuccess: "¡Gracias! Tus datos han sido enviados.",
2063
+ leadFormRequiredError: "Por favor completa todos los campos obligatorios.",
2064
+ leadFormGenericError: "Algo salió mal. Inténtalo de nuevo.",
2065
+ leadFormName: "Nombre",
2066
+ leadFormEmail: "Correo electrónico",
2067
+ leadFormPhone: "Teléfono",
2068
+ leadFormMessage: "Tu mensaje"
2069
+ }, bt = {
1686
2070
  sendMessage: "Tuma ujumbe",
1687
2071
  send: "Tuma",
1688
2072
  close: "Funga",
@@ -1716,8 +2100,16 @@ const yt = {
1716
2100
  tellUsMore: "Tuambie zaidi",
1717
2101
  feedbackSubtitle: "Maoni yako yanatusaidia kuboresha huduma yetu na kukusaidia vizuri zaidi siku zijazo.",
1718
2102
  feedbackPlaceholder: "Tuambie zaidi kuhusu tajriba yako…",
1719
- submit: "Wasilisha"
1720
- }, bn = {
2103
+ submit: "Wasilisha",
2104
+ leadFormTitle: "Maelezo ya mawasiliano",
2105
+ leadFormSuccess: "Asante! Maelezo yako yamewasilishwa.",
2106
+ leadFormRequiredError: "Tafadhali jaza sehemu zote zinazohitajika.",
2107
+ leadFormGenericError: "Hitilafu imetokea. Tafadhali jaribu tena.",
2108
+ leadFormName: "Jina",
2109
+ leadFormEmail: "Barua pepe",
2110
+ leadFormPhone: "Simu",
2111
+ leadFormMessage: "Ujumbe wako"
2112
+ }, kt = {
1721
2113
  sendMessage: "Skicka ett meddelande",
1722
2114
  send: "Skicka",
1723
2115
  close: "Stäng",
@@ -1751,8 +2143,16 @@ const yt = {
1751
2143
  tellUsMore: "Berätta mer",
1752
2144
  feedbackSubtitle: "Din feedback hjälper oss att förbättra vår tjänst och stötta dig bättre i framtiden.",
1753
2145
  feedbackPlaceholder: "Berätta mer om din upplevelse…",
1754
- submit: "Skicka"
1755
- }, kn = {
2146
+ submit: "Skicka",
2147
+ leadFormTitle: "Kontaktinformation",
2148
+ leadFormSuccess: "Tack! Dina uppgifter har skickats.",
2149
+ leadFormRequiredError: "Fyll i alla obligatoriska fält.",
2150
+ leadFormGenericError: "Något gick fel. Försök igen.",
2151
+ leadFormName: "Namn",
2152
+ leadFormEmail: "E-post",
2153
+ leadFormPhone: "Telefon",
2154
+ leadFormMessage: "Ditt meddelande"
2155
+ }, ft = {
1756
2156
  sendMessage: "Magpadala ng mensahe",
1757
2157
  send: "Ipadala",
1758
2158
  close: "Isara",
@@ -1786,8 +2186,16 @@ const yt = {
1786
2186
  tellUsMore: "Magkuwento pa",
1787
2187
  feedbackSubtitle: "Nakakatulong ang iyong feedback para mapahusay ang aming serbisyo at masuportahan ka nang mas mabuti sa hinaharap.",
1788
2188
  feedbackPlaceholder: "Magkuwento pa tungkol sa iyong karanasan…",
1789
- submit: "Ipasa"
1790
- }, fn = {
2189
+ submit: "Ipasa",
2190
+ leadFormTitle: "Impormasyon ng contact",
2191
+ leadFormSuccess: "Salamat! Naisumite na ang iyong mga detalye.",
2192
+ leadFormRequiredError: "Pakipunan ang lahat ng kinakailangang field.",
2193
+ leadFormGenericError: "Nagkaroon ng problema. Pakisubukan ulit.",
2194
+ leadFormName: "Pangalan",
2195
+ leadFormEmail: "Email",
2196
+ leadFormPhone: "Telepono",
2197
+ leadFormMessage: "Ang iyong mensahe"
2198
+ }, vt = {
1791
2199
  sendMessage: "ஒரு செய்தி அனுப்பவும்",
1792
2200
  send: "அனுப்பு",
1793
2201
  close: "மூடு",
@@ -1821,8 +2229,16 @@ const yt = {
1821
2229
  tellUsMore: "மேலும் சொல்லுங்கள்",
1822
2230
  feedbackSubtitle: "உங்கள் கருத்து எங்கள் சேவையை மேம்படுத்தவும் எதிர்காலத்தில் உங்களை சிறப்பாக ஆதரிக்கவும் உதவுகிறது.",
1823
2231
  feedbackPlaceholder: "உங்கள் அனுபவம் குறித்து மேலும் சொல்லுங்கள்…",
1824
- submit: "சமர்ப்பிக்கவும்"
1825
- }, vn = {
2232
+ submit: "சமர்ப்பிக்கவும்",
2233
+ leadFormTitle: "தொடர்பு தகவல்",
2234
+ leadFormSuccess: "நன்றி! உங்கள் விவரங்கள் சமர்ப்பிக்கப்பட்டன.",
2235
+ leadFormRequiredError: "தேவையான அனைத்து புலங்களையும் நிரப்பவும்.",
2236
+ leadFormGenericError: "ஏதோ தவறு ஏற்பட்டது. மீண்டும் முயற்சிக்கவும்.",
2237
+ leadFormName: "பெயர்",
2238
+ leadFormEmail: "மின்னஞ்சல்",
2239
+ leadFormPhone: "தொலைபேசி",
2240
+ leadFormMessage: "உங்கள் செய்தி"
2241
+ }, yt = {
1826
2242
  sendMessage: "సందేశం పంపండి",
1827
2243
  send: "పంపు",
1828
2244
  close: "మూసివేయండి",
@@ -1856,8 +2272,16 @@ const yt = {
1856
2272
  tellUsMore: "మాకు మరింత చెప్పండి",
1857
2273
  feedbackSubtitle: "మీ అభిప్రాయం మా సేవను మెరుగుపరచడానికి మరియు భవిష్యత్తులో మిమ్మల్ని మెరుగ్గా మద్దతు ఇవ్వడానికి సహాయపడుతుంది.",
1858
2274
  feedbackPlaceholder: "మీ అనుభవం గురించి మాకు మరింత చెప్పండి…",
1859
- submit: "సమర్పించండి"
1860
- }, yn = {
2275
+ submit: "సమర్పించండి",
2276
+ leadFormTitle: "సంప్రదింపు సమాచారం",
2277
+ leadFormSuccess: "ధన్యవాదాలు! మీ వివరాలు సమర్పించబడ్డాయి.",
2278
+ leadFormRequiredError: "దయచేసి అన్ని అవసరమైన ఫీల్డ్‌లను నింపండి.",
2279
+ leadFormGenericError: "ఏదో తప్పు జరిగింది. దయచేసి మళ్లీ ప్రయత్నించండి.",
2280
+ leadFormName: "పేరు",
2281
+ leadFormEmail: "ఇమెయిల్",
2282
+ leadFormPhone: "ఫోన్",
2283
+ leadFormMessage: "మీ సందేశం"
2284
+ }, Ft = {
1861
2285
  sendMessage: "ส่งข้อความ",
1862
2286
  send: "ส่ง",
1863
2287
  close: "ปิด",
@@ -1891,8 +2315,16 @@ const yt = {
1891
2315
  tellUsMore: "บอกเราเพิ่มเติม",
1892
2316
  feedbackSubtitle: "ความคิดเห็นของคุณช่วยให้เราปรับปรุงบริการและสนับสนุนคุณได้ดียิ่งขึ้นในอนาคต",
1893
2317
  feedbackPlaceholder: "บอกเราเพิ่มเติมเกี่ยวกับประสบการณ์ของคุณ…",
1894
- submit: "ส่ง"
1895
- }, zn = {
2318
+ submit: "ส่ง",
2319
+ leadFormTitle: "ข้อมูลติดต่อ",
2320
+ leadFormSuccess: "ขอบคุณ! ข้อมูลของคุณถูกส่งแล้ว",
2321
+ leadFormRequiredError: "กรุณากรอกข้อมูลในช่องที่จำเป็นทั้งหมด",
2322
+ leadFormGenericError: "เกิดข้อผิดพลาด กรุณาลองใหม่อีกครั้ง",
2323
+ leadFormName: "ชื่อ",
2324
+ leadFormEmail: "อีเมล",
2325
+ leadFormPhone: "โทรศัพท์",
2326
+ leadFormMessage: "ข้อความของคุณ"
2327
+ }, Tt = {
1896
2328
  sendMessage: "Mesaj gönder",
1897
2329
  send: "Gönder",
1898
2330
  close: "Kapat",
@@ -1926,8 +2358,16 @@ const yt = {
1926
2358
  tellUsMore: "Bize daha fazla anlatın",
1927
2359
  feedbackSubtitle: "Geri bildiriminiz hizmetimizi geliştirmemize ve gelecekte size daha iyi destek olmamıza yardımcı olur.",
1928
2360
  feedbackPlaceholder: "Deneyiminiz hakkında bize daha fazla anlatın…",
1929
- submit: "Gönder"
1930
- }, Tn = {
2361
+ submit: "Gönder",
2362
+ leadFormTitle: "İletişim bilgileri",
2363
+ leadFormSuccess: "Teşekkürler! Bilgileriniz gönderildi.",
2364
+ leadFormRequiredError: "Lütfen tüm zorunlu alanları doldurun.",
2365
+ leadFormGenericError: "Bir sorun oluştu. Lütfen tekrar deneyin.",
2366
+ leadFormName: "Ad",
2367
+ leadFormEmail: "E-posta",
2368
+ leadFormPhone: "Telefon",
2369
+ leadFormMessage: "Mesajınız"
2370
+ }, Et = {
1931
2371
  sendMessage: "Надіслати повідомлення",
1932
2372
  send: "Надіслати",
1933
2373
  close: "Закрити",
@@ -1961,8 +2401,16 @@ const yt = {
1961
2401
  tellUsMore: "Розкажіть докладніше",
1962
2402
  feedbackSubtitle: "Ваш відгук допомагає нам покращувати сервіс і краще підтримувати вас у майбутньому.",
1963
2403
  feedbackPlaceholder: "Розкажіть докладніше про ваш досвід…",
1964
- submit: "Надіслати"
1965
- }, xn = {
2404
+ submit: "Надіслати",
2405
+ leadFormTitle: "Контактна інформація",
2406
+ leadFormSuccess: "Дякуємо! Ваші дані відправлено.",
2407
+ leadFormRequiredError: "Будь ласка, заповніть усі обов’язкові поля.",
2408
+ leadFormGenericError: "Щось пішло не так. Спробуйте ще раз.",
2409
+ leadFormName: "Ім’я",
2410
+ leadFormEmail: "Електронна пошта",
2411
+ leadFormPhone: "Телефон",
2412
+ leadFormMessage: "Ваше повідомлення"
2413
+ }, zt = {
1966
2414
  sendMessage: "پیغام بھیجیں",
1967
2415
  send: "بھیجیں",
1968
2416
  close: "بند کریں",
@@ -1996,8 +2444,16 @@ const yt = {
1996
2444
  tellUsMore: "مزید بتائیں",
1997
2445
  feedbackSubtitle: "آپ کی رائے ہمیں اپنی خدمات بہتر بنانے اور مستقبل میں آپ کی بہتر مدد کرنے میں مدد دیتی ہے۔",
1998
2446
  feedbackPlaceholder: "اپنے تجربے کے بارے میں مزید بتائیں…",
1999
- submit: "جمع کرائیں"
2000
- }, Cn = {
2447
+ submit: "جمع کرائیں",
2448
+ leadFormTitle: "رابطہ کی معلومات",
2449
+ leadFormSuccess: "شکریہ! آپ کی تفصیلات جمع کر دی گئی ہیں۔",
2450
+ leadFormRequiredError: "براہ کرم تمام ضروری خانے پُر کریں۔",
2451
+ leadFormGenericError: "کچھ غلط ہو گیا۔ براہ کرم دوبارہ کوشش کریں۔",
2452
+ leadFormName: "نام",
2453
+ leadFormEmail: "ای میل",
2454
+ leadFormPhone: "فون",
2455
+ leadFormMessage: "آپ کا پیغام"
2456
+ }, St = {
2001
2457
  sendMessage: "Gửi tin nhắn",
2002
2458
  send: "Gửi",
2003
2459
  close: "Đóng",
@@ -2031,8 +2487,16 @@ const yt = {
2031
2487
  tellUsMore: "Cho chúng tôi biết thêm",
2032
2488
  feedbackSubtitle: "Phản hồi của bạn giúp chúng tôi cải thiện dịch vụ và hỗ trợ bạn tốt hơn trong tương lai.",
2033
2489
  feedbackPlaceholder: "Cho chúng tôi biết thêm về trải nghiệm của bạn…",
2034
- submit: "Gửi"
2035
- }, En = {
2490
+ submit: "Gửi",
2491
+ leadFormTitle: "Thông tin liên hệ",
2492
+ leadFormSuccess: "Cảm ơn! Thông tin của bạn đã được gửi.",
2493
+ leadFormRequiredError: "Vui lòng điền vào tất cả các trường bắt buộc.",
2494
+ leadFormGenericError: "Đã xảy ra lỗi. Vui lòng thử lại.",
2495
+ leadFormName: "Tên",
2496
+ leadFormEmail: "Email",
2497
+ leadFormPhone: "Điện thoại",
2498
+ leadFormMessage: "Tin nhắn của bạn"
2499
+ }, xt = {
2036
2500
  sendMessage: "Anfon neges",
2037
2501
  send: "Anfon",
2038
2502
  close: "Cau",
@@ -2066,68 +2530,76 @@ const yt = {
2066
2530
  tellUsMore: "Dywedwch fwy wrthym",
2067
2531
  feedbackSubtitle: "Mae eich adborth yn ein helpu i wella ein gwasanaeth a’ch cefnogi’n well yn y dyfodol.",
2068
2532
  feedbackPlaceholder: "Dywedwch fwy wrthym am eich profiad…",
2069
- submit: "Cyflwyno"
2070
- }, Qe = {
2071
- af: yt,
2072
- sq: zt,
2073
- ar: Tt,
2074
- az: xt,
2075
- eu: Ct,
2076
- be: Et,
2077
- bn: St,
2078
- bs: Mt,
2079
- bg: Pt,
2080
- ca: Lt,
2081
- zh: At,
2082
- hr: wt,
2083
- cs: Vt,
2084
- da: Dt,
2085
- nl: It,
2086
- en: jt,
2087
- et: _t,
2088
- fi: qt,
2089
- fr: Nt,
2090
- gl: Rt,
2091
- de: Bt,
2092
- el: Ft,
2093
- gu: Ut,
2094
- hi: Ot,
2095
- hu: Kt,
2096
- id: Yt,
2097
- it: Qt,
2098
- ja: Gt,
2099
- kn: Ht,
2100
- kk: Wt,
2101
- ko: $t,
2102
- lv: Zt,
2103
- lt: Jt,
2104
- mk: Xt,
2105
- ms: en,
2106
- ml: tn,
2107
- mr: nn,
2108
- no: an,
2109
- fa: sn,
2110
- pl: on,
2111
- pt: rn,
2112
- pa: cn,
2113
- ro: ln,
2114
- ru: dn,
2115
- sr: un,
2116
- sk: mn,
2117
- sl: hn,
2118
- es: gn,
2119
- sw: pn,
2120
- sv: bn,
2121
- tl: kn,
2122
- ta: fn,
2123
- te: vn,
2124
- th: yn,
2125
- tr: zn,
2126
- uk: Tn,
2127
- ur: xn,
2128
- vi: Cn,
2129
- cy: En
2130
- }, Le = [
2533
+ submit: "Cyflwyno",
2534
+ leadFormTitle: "Manylion cyswllt",
2535
+ leadFormSuccess: "Diolch! Mae eich manylion wedi cael eu cyflwyno.",
2536
+ leadFormRequiredError: "Llenwch bob maes gofynnol.",
2537
+ leadFormGenericError: "Aeth rhywbeth o chwith. Rhowch gynnig arall arni.",
2538
+ leadFormName: "Enw",
2539
+ leadFormEmail: "E-bost",
2540
+ leadFormPhone: "Ffôn",
2541
+ leadFormMessage: "Eich neges"
2542
+ }, Ye = {
2543
+ af: Ta,
2544
+ sq: Ea,
2545
+ ar: za,
2546
+ az: Sa,
2547
+ eu: xa,
2548
+ be: Pa,
2549
+ bn: Ma,
2550
+ bs: Ca,
2551
+ bg: wa,
2552
+ ca: Aa,
2553
+ zh: La,
2554
+ hr: ja,
2555
+ cs: Va,
2556
+ da: Ia,
2557
+ nl: Da,
2558
+ en: qa,
2559
+ et: Na,
2560
+ fi: _a,
2561
+ fr: Ra,
2562
+ gl: Ba,
2563
+ de: Ga,
2564
+ el: Ua,
2565
+ gu: Ka,
2566
+ hi: Oa,
2567
+ hu: Ya,
2568
+ id: Qa,
2569
+ it: Ha,
2570
+ ja: Wa,
2571
+ kn: $a,
2572
+ kk: Za,
2573
+ ko: Ja,
2574
+ lv: Xa,
2575
+ lt: et,
2576
+ mk: at,
2577
+ ms: tt,
2578
+ ml: nt,
2579
+ mr: it,
2580
+ no: ot,
2581
+ fa: rt,
2582
+ pl: st,
2583
+ pt: lt,
2584
+ pa: ct,
2585
+ ro: dt,
2586
+ ru: ut,
2587
+ sr: mt,
2588
+ sk: ht,
2589
+ sl: gt,
2590
+ es: pt,
2591
+ sw: bt,
2592
+ sv: kt,
2593
+ tl: ft,
2594
+ ta: vt,
2595
+ te: yt,
2596
+ th: Ft,
2597
+ tr: Tt,
2598
+ uk: Et,
2599
+ ur: zt,
2600
+ vi: St,
2601
+ cy: xt
2602
+ }, Ce = [
2131
2603
  { value: "af", label: "Afrikaans", dir: "ltr" },
2132
2604
  { value: "sq", label: "Shqip", dir: "ltr" },
2133
2605
  { value: "ar", label: "العربية", dir: "rtl" },
@@ -2187,24 +2659,24 @@ const yt = {
2187
2659
  { value: "ur", label: "اردو", dir: "rtl" },
2188
2660
  { value: "vi", label: "Tiếng Việt", dir: "ltr" },
2189
2661
  { value: "cy", label: "Cymraeg", dir: "ltr" }
2190
- ], Ge = Le.map(
2662
+ ], Qe = Ce.map(
2191
2663
  (e) => e.value
2192
2664
  );
2193
2665
  function He(e) {
2194
- return Le.find((t) => t.value === e) || Le.find((t) => t.value === "en");
2666
+ return Ce.find((a) => a.value === e) || Ce.find((a) => a.value === "en");
2195
2667
  }
2196
- function x(e, t) {
2197
- return Qe[e]?.[t] || Qe.en[t] || t;
2668
+ function T(e, a) {
2669
+ return Ye[e]?.[a] || Ye.en[a] || a;
2198
2670
  }
2199
- function be(e, t = "en") {
2200
- const n = Array.isArray(e) ? e.filter((s) => Ge.includes(s)) : [];
2201
- return !n.includes(t) && Ge.includes(t) && n.unshift(t), n.length ? [...new Set(n)] : ["ar"];
2671
+ function be(e, a = "en") {
2672
+ const t = Array.isArray(e) ? e.filter((o) => Qe.includes(o)) : [];
2673
+ return !t.includes(a) && Qe.includes(a) && t.unshift(a), t.length ? [...new Set(t)] : ["ar"];
2202
2674
  }
2203
2675
  const We = {
2204
2676
  id: null,
2205
2677
  publicChatId: null,
2206
2678
  name: "Agent",
2207
- agentType: se.TEXT,
2679
+ agentType: oe.TEXT,
2208
2680
  useText: !0,
2209
2681
  useVoice: !1,
2210
2682
  faceIndex: 1,
@@ -2222,11 +2694,11 @@ const We = {
2222
2694
  };
2223
2695
  function de(e) {
2224
2696
  if (!e) return We;
2225
- const t = e, n = t.agent_type || t.agentType || se.TEXT, s = typeof t.use_text == "boolean" ? t.use_text : typeof t.useText == "boolean" ? t.useText : n !== se.VOICE, o = typeof t.use_voice == "boolean" ? t.use_voice : typeof t.useVoice == "boolean" ? t.useVoice : n === se.TEXT_AND_VOICE || n === se.CLOUD_AVATAR || n === se.DESKTOP_AVATAR, a = t.conversation || t.agent_customization?.conversation || {}, r = t.speech || t.agent_customization?.speech || {}, d = a.default_language || "en", c = be(a.languages, d), l = t.widget || t.agent_customization?.widget || null, m = l?.appearance, u = l?.behavior, h = l, y = typeof m?.hide_branding == "boolean" ? !m.hide_branding : typeof m?.show_branding == "boolean" ? m.show_branding : !0, k = h ? {
2697
+ const a = e, t = a.agent_type || a.agentType || oe.TEXT, o = typeof a.use_text == "boolean" ? a.use_text : typeof a.useText == "boolean" ? a.useText : t !== oe.VOICE, r = typeof a.use_voice == "boolean" ? a.use_voice : typeof a.useVoice == "boolean" ? a.useVoice : t === oe.TEXT_AND_VOICE || t === oe.CLOUD_AVATAR || t === oe.DESKTOP_AVATAR, i = a.conversation || a.agent_customization?.conversation || {}, s = a.speech || a.agent_customization?.speech || {}, d = i.default_language || "en", c = be(i.languages, d), l = a.widget || a.agent_customization?.widget || null, m = l?.appearance, u = l?.behavior, h = l, F = typeof m?.hide_branding == "boolean" ? !m.hide_branding : typeof m?.show_branding == "boolean" ? m.show_branding : !0, k = h ? {
2226
2698
  appearance: {
2227
2699
  brand_color: m?.brand_color,
2228
2700
  position: m?.position || "right",
2229
- show_branding: y,
2701
+ show_branding: F,
2230
2702
  footer_content: m?.footer_content || {}
2231
2703
  },
2232
2704
  behavior: {
@@ -2236,135 +2708,135 @@ function de(e) {
2236
2708
  welcome_bubble_sound_enabled: typeof u?.welcome_bubble_sound_enabled == "boolean" ? u.welcome_bubble_sound_enabled : !1,
2237
2709
  typing_indicator_enabled: typeof u?.typing_indicator_enabled == "boolean" ? u.typing_indicator_enabled : !0
2238
2710
  }
2239
- } : void 0, b = t.consent || t.consent_config || null, T = a.welcome_message || a.welcomeMessage || t.welcome_message || t.welcomeMessage || {}, z = Object.fromEntries(
2240
- Object.entries(T).filter(([, f]) => typeof f == "string").map(([f, M]) => [f, M.slice(0, 1e3)])
2241
- ), g = typeof t.allow_interrupt == "boolean" ? t.allow_interrupt : typeof r.allow_interrupt == "boolean" ? r.allow_interrupt : !0, C = typeof t.allow_welcome_message_interrupt == "boolean" ? t.allow_welcome_message_interrupt : typeof r.allow_welcome_message_interrupt == "boolean" ? r.allow_welcome_message_interrupt : !1;
2711
+ } : void 0, v = a.consent || a.consent_config || null, z = i.welcome_message || i.welcomeMessage || a.welcome_message || a.welcomeMessage || {}, E = Object.fromEntries(
2712
+ Object.entries(z).filter(([, p]) => typeof p == "string").map(([p, x]) => [p, x.slice(0, 1e3)])
2713
+ ), g = typeof a.allow_interrupt == "boolean" ? a.allow_interrupt : typeof s.allow_interrupt == "boolean" ? s.allow_interrupt : !0, b = typeof a.allow_welcome_message_interrupt == "boolean" ? a.allow_welcome_message_interrupt : typeof s.allow_welcome_message_interrupt == "boolean" ? s.allow_welcome_message_interrupt : !1;
2242
2714
  return {
2243
- id: t.id || null,
2244
- publicChatId: t.public_chat_id || t.publicChatId || null,
2245
- name: t.name || We.name,
2246
- agentType: n,
2247
- useText: s,
2248
- useVoice: o,
2249
- faceIndex: typeof t.face_index == "number" ? t.face_index : typeof t.faceIndex == "number" ? t.faceIndex : 1,
2250
- faceImageUrl: t.face_image_url || t.faceImageUrl || null,
2715
+ id: a.id || null,
2716
+ publicChatId: a.public_chat_id || a.publicChatId || null,
2717
+ name: a.name || We.name,
2718
+ agentType: t,
2719
+ useText: o,
2720
+ useVoice: r,
2721
+ faceIndex: typeof a.face_index == "number" ? a.face_index : typeof a.faceIndex == "number" ? a.faceIndex : 1,
2722
+ faceImageUrl: a.face_image_url || a.faceImageUrl || null,
2251
2723
  allowInterrupt: g,
2252
- allowWelcomeMessageInterrupt: C,
2253
- welcomeMessages: z,
2724
+ allowWelcomeMessageInterrupt: b,
2725
+ welcomeMessages: E,
2254
2726
  languages: c,
2255
2727
  defaultLanguage: c.includes(d) ? d : c[0],
2256
2728
  conversation: {
2257
2729
  default_language: d,
2258
2730
  languages: c,
2259
- suggested_messages: a.suggested_messages || a.suggestedMessages || {}
2731
+ suggested_messages: i.suggested_messages || i.suggestedMessages || {}
2260
2732
  },
2261
2733
  widget: k || void 0,
2262
- consent: b ? {
2263
- enabled: b.enabled ?? !1,
2264
- title: b.title || void 0,
2265
- body: b.body || void 0,
2266
- acceptLabel: b.accept_label || b.acceptLabel || void 0,
2267
- declineLabel: b.decline_label || b.declineLabel || void 0,
2268
- termsUrl: b.terms_url || b.termsUrl || void 0,
2269
- privacyUrl: b.privacy_url || b.privacyUrl || void 0
2734
+ consent: v ? {
2735
+ enabled: v.enabled ?? !1,
2736
+ title: v.title || void 0,
2737
+ body: v.body || void 0,
2738
+ acceptLabel: v.accept_label || v.acceptLabel || void 0,
2739
+ declineLabel: v.decline_label || v.declineLabel || void 0,
2740
+ termsUrl: v.terms_url || v.termsUrl || void 0,
2741
+ privacyUrl: v.privacy_url || v.privacyUrl || void 0
2270
2742
  } : void 0
2271
2743
  };
2272
2744
  }
2273
- async function Sn({
2745
+ async function Pt({
2274
2746
  restUrl: e,
2275
- identifier: t,
2276
- withCredentials: n = !1,
2277
- signal: s
2747
+ identifier: a,
2748
+ withCredentials: t = !1,
2749
+ signal: o
2278
2750
  }) {
2279
2751
  if (!e) throw new Error("Missing restUrl");
2280
- if (!t) throw new Error("Missing agent identifier");
2281
- const o = await fetch(`${e}/agent/${encodeURIComponent(t)}/customization`, {
2752
+ if (!a) throw new Error("Missing agent identifier");
2753
+ const r = await fetch(`${e}/agent/${encodeURIComponent(a)}/customization`, {
2282
2754
  method: "GET",
2283
2755
  mode: "cors",
2284
- credentials: n ? "include" : "omit",
2756
+ credentials: t ? "include" : "omit",
2285
2757
  headers: { Accept: "application/json" },
2286
- signal: s
2758
+ signal: o
2287
2759
  });
2288
- if (!o.ok) {
2289
- let r = `HTTP ${o.status}`;
2760
+ if (!r.ok) {
2761
+ let s = `HTTP ${r.status}`;
2290
2762
  try {
2291
- const c = await o.json();
2292
- r = c?.detail || c?.message || r;
2763
+ const c = await r.json();
2764
+ s = c?.detail || c?.message || s;
2293
2765
  } catch {
2294
2766
  }
2295
- throw new Error(r);
2767
+ throw new Error(s);
2296
2768
  }
2297
- const a = await o.json();
2769
+ const i = await r.json();
2298
2770
  return de({
2299
- id: a.id,
2300
- name: a.name,
2301
- company_name: a.company_name,
2302
- agent_type: a.agent_type,
2303
- use_voice: a.use_voice,
2304
- use_text: a.use_text,
2305
- face_index: a.face_index,
2306
- face_image_url: a.face_image_url,
2307
- conversation: a.conversation,
2308
- widget: a.widget,
2309
- allow_interrupt: a.allow_interrupt,
2310
- allow_welcome_message_interrupt: a.allow_welcome_message_interrupt,
2311
- welcome_message: a.welcome_message
2771
+ id: i.id,
2772
+ name: i.name,
2773
+ company_name: i.company_name,
2774
+ agent_type: i.agent_type,
2775
+ use_voice: i.use_voice,
2776
+ use_text: i.use_text,
2777
+ face_index: i.face_index,
2778
+ face_image_url: i.face_image_url,
2779
+ conversation: i.conversation,
2780
+ widget: i.widget,
2781
+ allow_interrupt: i.allow_interrupt,
2782
+ allow_welcome_message_interrupt: i.allow_welcome_message_interrupt,
2783
+ welcome_message: i.welcome_message
2312
2784
  });
2313
2785
  }
2314
- async function Yi({ restUrl: e, publicChatId: t, signal: n }) {
2786
+ async function Jn({ restUrl: e, publicChatId: a, signal: t }) {
2315
2787
  if (!e) throw new Error("Missing restUrl");
2316
- if (!t) throw new Error("Missing publicChatId");
2317
- const s = await fetch(`${e}/agent/${t}`, {
2788
+ if (!a) throw new Error("Missing publicChatId");
2789
+ const o = await fetch(`${e}/agent/${a}`, {
2318
2790
  method: "GET",
2319
2791
  mode: "cors",
2320
2792
  credentials: "omit",
2321
2793
  headers: {
2322
2794
  Accept: "application/json"
2323
2795
  },
2324
- signal: n
2796
+ signal: t
2325
2797
  });
2326
- if (!s.ok) {
2327
- let o = `HTTP ${s.status}`;
2798
+ if (!o.ok) {
2799
+ let r = `HTTP ${o.status}`;
2328
2800
  try {
2329
- const r = await s.json();
2330
- o = r?.detail || r?.message || o;
2801
+ const s = await o.json();
2802
+ r = s?.detail || s?.message || r;
2331
2803
  } catch {
2332
2804
  }
2333
- throw new Error(o);
2805
+ throw new Error(r);
2334
2806
  }
2335
- return de(await s.json());
2807
+ return de(await o.json());
2336
2808
  }
2337
- async function Qi({ restUrl: e, apiKey: t, publicChatId: n, agentId: s, signal: o }) {
2809
+ async function Xn({ restUrl: e, apiKey: a, publicChatId: t, agentId: o, signal: r }) {
2338
2810
  if (!e) throw new Error("Missing restUrl");
2339
- const a = t || n || s;
2340
- if (!a) throw new Error("Provide one of apiKey, publicChatId, or agentId");
2341
- const r = await fetch(`${e}/agent/${a}`, {
2811
+ const i = a || t || o;
2812
+ if (!i) throw new Error("Provide one of apiKey, publicChatId, or agentId");
2813
+ const s = await fetch(`${e}/agent/${i}`, {
2342
2814
  method: "GET",
2343
2815
  mode: "cors",
2344
2816
  credentials: "omit",
2345
2817
  headers: {
2346
2818
  Accept: "application/json"
2347
2819
  },
2348
- signal: o
2820
+ signal: r
2349
2821
  });
2350
- if (!r.ok) {
2351
- let d = `HTTP ${r.status}`;
2822
+ if (!s.ok) {
2823
+ let d = `HTTP ${s.status}`;
2352
2824
  try {
2353
- const l = await r.json();
2825
+ const l = await s.json();
2354
2826
  d = l?.detail || l?.message || d;
2355
2827
  } catch {
2356
2828
  }
2357
2829
  throw new Error(d);
2358
2830
  }
2359
- return de(await r.json());
2831
+ return de(await s.json());
2360
2832
  }
2361
- function Mn(e, t) {
2362
- if (!t) return e;
2363
- let { useVoice: n, useText: s } = e;
2364
- return typeof t.use_voice == "boolean" && (n = t.use_voice), typeof t.use_text == "boolean" && (s = t.use_text), n === e.useVoice && s === e.useText ? e : { ...e, useVoice: n, useText: s };
2833
+ function Mt(e, a) {
2834
+ if (!a) return e;
2835
+ let { useVoice: t, useText: o } = e;
2836
+ return typeof a.use_voice == "boolean" && (t = a.use_voice), typeof a.use_text == "boolean" && (o = a.use_text), t === e.useVoice && o === e.useText ? e : { ...e, useVoice: t, useText: o };
2365
2837
  }
2366
2838
  function ve(e) {
2367
- return e.agentType === se.CLOUD_AVATAR || e.agentType === se.DESKTOP_AVATAR ? "avatar" : e.useText && e.useVoice ? "text_and_voice" : e.useVoice ? "voice" : "text";
2839
+ return e.agentType === oe.CLOUD_AVATAR || e.agentType === oe.DESKTOP_AVATAR ? "avatar" : e.useText && e.useVoice ? "text_and_voice" : e.useVoice ? "voice" : "text";
2368
2840
  }
2369
2841
  /**
2370
2842
  * @license lucide-react v1.24.0 - ISC
@@ -2372,23 +2844,23 @@ function ve(e) {
2372
2844
  * This source code is licensed under the ISC license.
2373
2845
  * See the LICENSE file in the root directory of this source tree.
2374
2846
  */
2375
- const at = (...e) => e.filter((t, n, s) => !!t && t.trim() !== "" && s.indexOf(t) === n).join(" ").trim();
2847
+ const oa = (...e) => e.filter((a, t, o) => !!a && a.trim() !== "" && o.indexOf(a) === t).join(" ").trim();
2376
2848
  /**
2377
2849
  * @license lucide-react v1.24.0 - ISC
2378
2850
  *
2379
2851
  * This source code is licensed under the ISC license.
2380
2852
  * See the LICENSE file in the root directory of this source tree.
2381
2853
  */
2382
- const Pn = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
2854
+ const Ct = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
2383
2855
  /**
2384
2856
  * @license lucide-react v1.24.0 - ISC
2385
2857
  *
2386
2858
  * This source code is licensed under the ISC license.
2387
2859
  * See the LICENSE file in the root directory of this source tree.
2388
2860
  */
2389
- const Ln = (e) => e.replace(
2861
+ const wt = (e) => e.replace(
2390
2862
  /^([A-Z])|[\s-_]+(\w)/g,
2391
- (t, n, s) => s ? s.toUpperCase() : n.toLowerCase()
2863
+ (a, t, o) => o ? o.toUpperCase() : t.toLowerCase()
2392
2864
  );
2393
2865
  /**
2394
2866
  * @license lucide-react v1.24.0 - ISC
@@ -2397,8 +2869,8 @@ const Ln = (e) => e.replace(
2397
2869
  * See the LICENSE file in the root directory of this source tree.
2398
2870
  */
2399
2871
  const $e = (e) => {
2400
- const t = Ln(e);
2401
- return t.charAt(0).toUpperCase() + t.slice(1);
2872
+ const a = wt(e);
2873
+ return a.charAt(0).toUpperCase() + a.slice(1);
2402
2874
  };
2403
2875
  /**
2404
2876
  * @license lucide-react v1.24.0 - ISC
@@ -2406,7 +2878,7 @@ const $e = (e) => {
2406
2878
  * This source code is licensed under the ISC license.
2407
2879
  * See the LICENSE file in the root directory of this source tree.
2408
2880
  */
2409
- var Me = {
2881
+ var Pe = {
2410
2882
  xmlns: "http://www.w3.org/2000/svg",
2411
2883
  width: 24,
2412
2884
  height: 24,
@@ -2423,36 +2895,36 @@ var Me = {
2423
2895
  * This source code is licensed under the ISC license.
2424
2896
  * See the LICENSE file in the root directory of this source tree.
2425
2897
  */
2426
- const An = (e) => {
2427
- for (const t in e)
2428
- if (t.startsWith("aria-") || t === "role" || t === "title")
2898
+ const At = (e) => {
2899
+ for (const a in e)
2900
+ if (a.startsWith("aria-") || a === "role" || a === "title")
2429
2901
  return !0;
2430
2902
  return !1;
2431
- }, wn = vt({}), Vn = () => ft(wn), Dn = it(
2432
- ({ color: e, size: t, strokeWidth: n, absoluteStrokeWidth: s, className: o = "", children: a, iconNode: r, ...d }, c) => {
2903
+ }, Lt = Fa({}), jt = () => ya(Lt), Vt = ia(
2904
+ ({ color: e, size: a, strokeWidth: t, absoluteStrokeWidth: o, className: r = "", children: i, iconNode: s, ...d }, c) => {
2433
2905
  const {
2434
2906
  size: l = 24,
2435
2907
  strokeWidth: m = 2,
2436
2908
  absoluteStrokeWidth: u = !1,
2437
2909
  color: h = "currentColor",
2438
- className: y = ""
2439
- } = Vn() ?? {}, k = s ?? u ? Number(n ?? m) * 24 / Number(t ?? l) : n ?? m;
2440
- return Pe(
2910
+ className: F = ""
2911
+ } = jt() ?? {}, k = o ?? u ? Number(t ?? m) * 24 / Number(a ?? l) : t ?? m;
2912
+ return Me(
2441
2913
  "svg",
2442
2914
  {
2443
2915
  ref: c,
2444
- ...Me,
2445
- width: t ?? l ?? Me.width,
2446
- height: t ?? l ?? Me.height,
2916
+ ...Pe,
2917
+ width: a ?? l ?? Pe.width,
2918
+ height: a ?? l ?? Pe.height,
2447
2919
  stroke: e ?? h,
2448
2920
  strokeWidth: k,
2449
- className: at("lucide", y, o),
2450
- ...!a && !An(d) && { "aria-hidden": "true" },
2921
+ className: oa("lucide", F, r),
2922
+ ...!i && !At(d) && { "aria-hidden": "true" },
2451
2923
  ...d
2452
2924
  },
2453
2925
  [
2454
- ...r.map(([b, T]) => Pe(b, T)),
2455
- ...Array.isArray(a) ? a : [a]
2926
+ ...s.map(([v, z]) => Me(v, z)),
2927
+ ...Array.isArray(i) ? i : [i]
2456
2928
  ]
2457
2929
  );
2458
2930
  }
@@ -2463,20 +2935,20 @@ const An = (e) => {
2463
2935
  * This source code is licensed under the ISC license.
2464
2936
  * See the LICENSE file in the root directory of this source tree.
2465
2937
  */
2466
- const Q = (e, t) => {
2467
- const n = it(
2468
- ({ className: s, ...o }, a) => Pe(Dn, {
2469
- ref: a,
2470
- iconNode: t,
2471
- className: at(
2472
- `lucide-${Pn($e(e))}`,
2938
+ const Y = (e, a) => {
2939
+ const t = ia(
2940
+ ({ className: o, ...r }, i) => Me(Vt, {
2941
+ ref: i,
2942
+ iconNode: a,
2943
+ className: oa(
2944
+ `lucide-${Ct($e(e))}`,
2473
2945
  `lucide-${e}`,
2474
- s
2946
+ o
2475
2947
  ),
2476
- ...o
2948
+ ...r
2477
2949
  })
2478
2950
  );
2479
- return n.displayName = $e(e), n;
2951
+ return t.displayName = $e(e), t;
2480
2952
  };
2481
2953
  /**
2482
2954
  * @license lucide-react v1.24.0 - ISC
@@ -2484,94 +2956,94 @@ const Q = (e, t) => {
2484
2956
  * This source code is licensed under the ISC license.
2485
2957
  * See the LICENSE file in the root directory of this source tree.
2486
2958
  */
2487
- const In = [
2959
+ const It = [
2488
2960
  ["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
2489
2961
  ["path", { d: "M12 19V5", key: "x0mq9r" }]
2490
- ], jn = Q("arrow-up", In);
2962
+ ], Dt = Y("arrow-up", It);
2491
2963
  /**
2492
2964
  * @license lucide-react v1.24.0 - ISC
2493
2965
  *
2494
2966
  * This source code is licensed under the ISC license.
2495
2967
  * See the LICENSE file in the root directory of this source tree.
2496
2968
  */
2497
- const _n = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], qn = Q("chevron-left", _n);
2969
+ const qt = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], Nt = Y("chevron-left", qt);
2498
2970
  /**
2499
2971
  * @license lucide-react v1.24.0 - ISC
2500
2972
  *
2501
2973
  * This source code is licensed under the ISC license.
2502
2974
  * See the LICENSE file in the root directory of this source tree.
2503
2975
  */
2504
- const Nn = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], st = Q("chevron-down", Nn);
2976
+ const _t = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], ra = Y("chevron-down", _t);
2505
2977
  /**
2506
2978
  * @license lucide-react v1.24.0 - ISC
2507
2979
  *
2508
2980
  * This source code is licensed under the ISC license.
2509
2981
  * See the LICENSE file in the root directory of this source tree.
2510
2982
  */
2511
- const Rn = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]], Bn = Q("chevron-up", Rn);
2983
+ const Rt = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]], Bt = Y("chevron-up", Rt);
2512
2984
  /**
2513
2985
  * @license lucide-react v1.24.0 - ISC
2514
2986
  *
2515
2987
  * This source code is licensed under the ISC license.
2516
2988
  * See the LICENSE file in the root directory of this source tree.
2517
2989
  */
2518
- const Fn = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], ye = Q("loader-circle", Fn);
2990
+ const Gt = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], ye = Y("loader-circle", Gt);
2519
2991
  /**
2520
2992
  * @license lucide-react v1.24.0 - ISC
2521
2993
  *
2522
2994
  * This source code is licensed under the ISC license.
2523
2995
  * See the LICENSE file in the root directory of this source tree.
2524
2996
  */
2525
- const Un = [
2997
+ const Ut = [
2526
2998
  ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
2527
2999
  ["path", { d: "m21 3-7 7", key: "1l2asr" }],
2528
3000
  ["path", { d: "m3 21 7-7", key: "tjx5ai" }],
2529
3001
  ["path", { d: "M9 21H3v-6", key: "wtvkvv" }]
2530
- ], On = Q("maximize-2", Un);
3002
+ ], Kt = Y("maximize-2", Ut);
2531
3003
  /**
2532
3004
  * @license lucide-react v1.24.0 - ISC
2533
3005
  *
2534
3006
  * This source code is licensed under the ISC license.
2535
3007
  * See the LICENSE file in the root directory of this source tree.
2536
3008
  */
2537
- const Kn = [
3009
+ const Ot = [
2538
3010
  ["path", { d: "M12 19v3", key: "npa21l" }],
2539
3011
  ["path", { d: "M15 9.34V5a3 3 0 0 0-5.68-1.33", key: "1gzdoj" }],
2540
3012
  ["path", { d: "M16.95 16.95A7 7 0 0 1 5 12v-2", key: "cqa7eg" }],
2541
3013
  ["path", { d: "M18.89 13.23A7 7 0 0 0 19 12v-2", key: "16hl24" }],
2542
3014
  ["path", { d: "m2 2 20 20", key: "1ooewy" }],
2543
3015
  ["path", { d: "M9 9v3a3 3 0 0 0 5.12 2.12", key: "r2i35w" }]
2544
- ], De = Q("mic-off", Kn);
3016
+ ], je = Y("mic-off", Ot);
2545
3017
  /**
2546
3018
  * @license lucide-react v1.24.0 - ISC
2547
3019
  *
2548
3020
  * This source code is licensed under the ISC license.
2549
3021
  * See the LICENSE file in the root directory of this source tree.
2550
3022
  */
2551
- const Yn = [
3023
+ const Yt = [
2552
3024
  ["path", { d: "M12 19v3", key: "npa21l" }],
2553
3025
  ["path", { d: "M19 10v2a7 7 0 0 1-14 0v-2", key: "1vc78b" }],
2554
3026
  ["rect", { x: "9", y: "2", width: "6", height: "13", rx: "3", key: "s6n7sd" }]
2555
- ], ze = Q("mic", Yn);
3027
+ ], Fe = Y("mic", Yt);
2556
3028
  /**
2557
3029
  * @license lucide-react v1.24.0 - ISC
2558
3030
  *
2559
3031
  * This source code is licensed under the ISC license.
2560
3032
  * See the LICENSE file in the root directory of this source tree.
2561
3033
  */
2562
- const Qn = [
3034
+ const Qt = [
2563
3035
  ["path", { d: "m14 10 7-7", key: "oa77jy" }],
2564
3036
  ["path", { d: "M20 10h-6V4", key: "mjg0md" }],
2565
3037
  ["path", { d: "m3 21 7-7", key: "tjx5ai" }],
2566
3038
  ["path", { d: "M4 14h6v6", key: "rmj7iw" }]
2567
- ], Te = Q("minimize-2", Qn);
3039
+ ], Te = Y("minimize-2", Qt);
2568
3040
  /**
2569
3041
  * @license lucide-react v1.24.0 - ISC
2570
3042
  *
2571
3043
  * This source code is licensed under the ISC license.
2572
3044
  * See the LICENSE file in the root directory of this source tree.
2573
3045
  */
2574
- const Gn = [
3046
+ const Ht = [
2575
3047
  [
2576
3048
  "path",
2577
3049
  {
@@ -2587,14 +3059,14 @@ const Gn = [
2587
3059
  key: "10hv5p"
2588
3060
  }
2589
3061
  ]
2590
- ], Ie = Q("phone-off", Gn);
3062
+ ], Ve = Y("phone-off", Ht);
2591
3063
  /**
2592
3064
  * @license lucide-react v1.24.0 - ISC
2593
3065
  *
2594
3066
  * This source code is licensed under the ISC license.
2595
3067
  * See the LICENSE file in the root directory of this source tree.
2596
3068
  */
2597
- const Hn = [
3069
+ const Wt = [
2598
3070
  [
2599
3071
  "path",
2600
3072
  {
@@ -2602,24 +3074,24 @@ const Hn = [
2602
3074
  key: "9njp5v"
2603
3075
  }
2604
3076
  ]
2605
- ], je = Q("phone", Hn);
3077
+ ], Ie = Y("phone", Wt);
2606
3078
  /**
2607
3079
  * @license lucide-react v1.24.0 - ISC
2608
3080
  *
2609
3081
  * This source code is licensed under the ISC license.
2610
3082
  * See the LICENSE file in the root directory of this source tree.
2611
3083
  */
2612
- const Wn = [
3084
+ const $t = [
2613
3085
  ["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
2614
3086
  ["path", { d: "M3 3v5h5", key: "1xhq8a" }]
2615
- ], $n = Q("rotate-ccw", Wn);
3087
+ ], Zt = Y("rotate-ccw", $t);
2616
3088
  /**
2617
3089
  * @license lucide-react v1.24.0 - ISC
2618
3090
  *
2619
3091
  * This source code is licensed under the ISC license.
2620
3092
  * See the LICENSE file in the root directory of this source tree.
2621
3093
  */
2622
- const Zn = [
3094
+ const Jt = [
2623
3095
  [
2624
3096
  "path",
2625
3097
  {
@@ -2627,17 +3099,17 @@ const Zn = [
2627
3099
  key: "r04s7s"
2628
3100
  }
2629
3101
  ]
2630
- ], Jn = Q("star", Zn);
3102
+ ], Xt = Y("star", Jt);
2631
3103
  /**
2632
3104
  * @license lucide-react v1.24.0 - ISC
2633
3105
  *
2634
3106
  * This source code is licensed under the ISC license.
2635
3107
  * See the LICENSE file in the root directory of this source tree.
2636
3108
  */
2637
- const Xn = [
3109
+ const en = [
2638
3110
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
2639
3111
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
2640
- ], _e = Q("x", Xn), Ze = [
3112
+ ], De = Y("x", en), Ze = [
2641
3113
  () => import("./charachter1-D0qJg166.js").then((e) => e.default),
2642
3114
  () => import("./charachter2-B5ArG_dI.js").then((e) => e.default),
2643
3115
  () => import("./charachter3-DX1Okqyw.js").then((e) => e.default),
@@ -2647,13 +3119,16 @@ const Xn = [
2647
3119
  () => import("./charachter7-DWEpJWjS.js").then((e) => e.default),
2648
3120
  () => import("./charachter8-C3UF8oSz.js").then((e) => e.default)
2649
3121
  ];
2650
- function ei(e = 1) {
2651
- const t = Math.max(0, Number(e || 1) - 1);
2652
- return (Ze[t] || Ze[0])();
3122
+ function an(e = 1) {
3123
+ const a = Math.max(0, Number(e || 1) - 1);
3124
+ return (Ze[a] || Ze[0])();
2653
3125
  }
2654
- const ae = () => {
2655
- };
2656
- function V(...e) {
3126
+ const ie = () => {
3127
+ }, tn = 767;
3128
+ function nn() {
3129
+ return typeof window < "u" && window.innerWidth <= tn;
3130
+ }
3131
+ function j(...e) {
2657
3132
  return e.filter(Boolean).join(" ");
2658
3133
  }
2659
3134
  function H(e) {
@@ -2662,156 +3137,156 @@ function H(e) {
2662
3137
  function Je(e) {
2663
3138
  return e === "ar" ? "rqmii-chat-font-ar" : "rqmii-chat-font-latin";
2664
3139
  }
2665
- function oe(e) {
3140
+ function se(e) {
2666
3141
  return ["ar", "fa", "ur", "he"].includes(e) ? "rtl" : "ltr";
2667
3142
  }
2668
3143
  function qe(e) {
2669
- const t = Math.floor(e / 60).toString().padStart(2, "0"), n = (e % 60).toString().padStart(2, "0");
2670
- return `${t}:${n}`;
3144
+ const a = Math.floor(e / 60).toString().padStart(2, "0"), t = (e % 60).toString().padStart(2, "0");
3145
+ return `${a}:${t}`;
2671
3146
  }
2672
- function ti(e = !0) {
2673
- const [t, n] = v(0);
3147
+ function on(e = !0) {
3148
+ const [a, t] = y(0);
2674
3149
  return I(() => {
2675
3150
  if (!e) return;
2676
- const s = setInterval(() => n((o) => o + 1), 1e3);
2677
- return () => clearInterval(s);
2678
- }, [e]), t;
3151
+ const o = setInterval(() => t((r) => r + 1), 1e3);
3152
+ return () => clearInterval(o);
3153
+ }, [e]), a;
2679
3154
  }
2680
- function ni() {
2681
- const [e, t] = v(null);
3155
+ function rn() {
3156
+ const [e, a] = y(null);
2682
3157
  return I(() => {
2683
- const n = window.visualViewport;
2684
- if (!n) return;
2685
- const s = () => t(n.height);
2686
- return s(), n.addEventListener("resize", s), n.addEventListener("scroll", s), () => {
2687
- n.removeEventListener("resize", s), n.removeEventListener("scroll", s);
3158
+ const t = window.visualViewport;
3159
+ if (!t) return;
3160
+ const o = () => a(t.height);
3161
+ return o(), t.addEventListener("resize", o), t.addEventListener("scroll", o), () => {
3162
+ t.removeEventListener("resize", o), t.removeEventListener("scroll", o);
2688
3163
  };
2689
3164
  }, []), e;
2690
3165
  }
2691
- function ii(e, t) {
2692
- const n = R([]);
2693
- n.current = e.match(/\S+\s*/g) || [e];
2694
- const [s, o] = v(
2695
- () => t ? Math.min(1, n.current.length) : n.current.length
3166
+ function sn(e, a) {
3167
+ const t = _([]);
3168
+ t.current = e.match(/\S+\s*/g) || [e];
3169
+ const [o, r] = y(
3170
+ () => a ? Math.min(1, t.current.length) : t.current.length
2696
3171
  );
2697
3172
  return I(() => {
2698
- if (!t || !e) {
2699
- o(n.current.length);
3173
+ if (!a || !e) {
3174
+ r(t.current.length);
2700
3175
  return;
2701
3176
  }
2702
- if (o((r) => Math.max(1, r)), n.current.length <= 1) return;
2703
- const a = setInterval(() => {
2704
- o((r) => r >= n.current.length ? (clearInterval(a), r) : r + 1);
3177
+ if (r((s) => Math.max(1, s)), t.current.length <= 1) return;
3178
+ const i = setInterval(() => {
3179
+ r((s) => s >= t.current.length ? (clearInterval(i), s) : s + 1);
2705
3180
  }, 50);
2706
- return () => clearInterval(a);
2707
- }, [e, t]), n.current.slice(0, s).join("");
3181
+ return () => clearInterval(i);
3182
+ }, [e, a]), t.current.slice(0, o).join("");
2708
3183
  }
2709
- const ai = j.lazy(() => import("./Orb-BLYExpBk.js").then((e) => ({ default: e.RqmiiOrb })));
2710
- function si(e) {
2711
- return e?.faceIndex === 0 && e.faceImageUrl ? e.faceImageUrl : e?.faceIndex === 9 ? null : ei(e?.faceIndex || 1);
3184
+ const ln = D.lazy(() => import("./Orb-BLYExpBk.js").then((e) => ({ default: e.RqmiiOrb })));
3185
+ function cn(e) {
3186
+ return e?.faceIndex === 0 && e.faceImageUrl ? e.faceImageUrl : e?.faceIndex === 9 ? null : an(e?.faceIndex || 1);
2712
3187
  }
2713
- const Ne = j.memo(function({ language: t, languages: n, onChange: s }) {
2714
- const [o, a] = v(!1), r = R(null), d = He(t), c = be(n, t).map((l) => He(l)).filter(Boolean);
3188
+ const Ne = D.memo(function({ language: a, languages: t, onChange: o }) {
3189
+ const [r, i] = y(!1), s = _(null), d = He(a), c = be(t, a).map((l) => He(l)).filter(Boolean);
2715
3190
  return I(() => {
2716
- if (!o) return;
3191
+ if (!r) return;
2717
3192
  const l = (m) => {
2718
- r.current?.contains(m.target) || a(!1);
3193
+ s.current?.contains(m.target) || i(!1);
2719
3194
  };
2720
3195
  return document.addEventListener("mousedown", l), () => document.removeEventListener("mousedown", l);
2721
- }, [o]), /* @__PURE__ */ p("div", { className: "rqmii-chat-language", ref: r, children: [
2722
- /* @__PURE__ */ p("button", { type: "button", className: V("rqmii-chat-pill", Je(t)), onClick: () => a((l) => !l), children: [
2723
- /* @__PURE__ */ i("span", { children: d?.label || t }),
2724
- /* @__PURE__ */ i(st, { size: 16 })
3196
+ }, [r]), /* @__PURE__ */ f("div", { className: "rqmii-chat-language", ref: s, children: [
3197
+ /* @__PURE__ */ f("button", { type: "button", className: j("rqmii-chat-pill", Je(a)), onClick: () => i((l) => !l), children: [
3198
+ /* @__PURE__ */ n("span", { children: d?.label || a }),
3199
+ /* @__PURE__ */ n(ra, { size: 16 })
2725
3200
  ] }),
2726
- o && c.length > 1 && /* @__PURE__ */ i("div", { className: "rqmii-chat-language-menu", children: c.map((l) => /* @__PURE__ */ i(
3201
+ r && c.length > 1 && /* @__PURE__ */ n("div", { className: "rqmii-chat-language-menu", children: c.map((l) => /* @__PURE__ */ n(
2727
3202
  "button",
2728
3203
  {
2729
3204
  type: "button",
2730
- className: V("rqmii-chat-language-item", Je(l.value), l.value === t && "is-selected"),
3205
+ className: j("rqmii-chat-language-item", Je(l.value), l.value === a && "is-selected"),
2731
3206
  onClick: () => {
2732
- s(l.value), a(!1);
3207
+ o(l.value), i(!1);
2733
3208
  },
2734
3209
  children: l.label
2735
3210
  },
2736
3211
  l.value
2737
3212
  )) })
2738
3213
  ] });
2739
- }), re = j.memo(function({ language: t = "en", brand: n = "rqmii", agent: s }) {
2740
- const o = s?.widget?.appearance, a = o?.show_branding !== !1, r = o?.footer_content?.[t], d = !!r?.trim();
2741
- return !a && !d ? /* @__PURE__ */ i("div", { style: { padding: 11 } }) : /* @__PURE__ */ p("div", { className: "rqmii-chat-footer", children: [
2742
- a && /* @__PURE__ */ p("p", { children: [
3214
+ }), le = D.memo(function({ language: a = "en", brand: t = "rqmii", agent: o }) {
3215
+ const r = o?.widget?.appearance, i = r?.show_branding !== !1, s = r?.footer_content?.[a], d = !!s?.trim();
3216
+ return !i && !d ? /* @__PURE__ */ n("div", { style: { padding: 11 } }) : /* @__PURE__ */ f("div", { className: "rqmii-chat-footer", children: [
3217
+ i && /* @__PURE__ */ f("p", { children: [
2743
3218
  "Powered by ",
2744
- /* @__PURE__ */ i("strong", { children: n })
3219
+ /* @__PURE__ */ n("strong", { children: t })
2745
3220
  ] }),
2746
- d && /* @__PURE__ */ i("p", { children: r })
3221
+ d && /* @__PURE__ */ n("p", { children: s })
2747
3222
  ] });
2748
- }), J = j.memo(function({ agent: t, size: n = "large", active: s = !1, className: o = "" }) {
2749
- const a = t?.faceIndex === 9, [r, d] = v(null), [c, l] = v(!r);
3223
+ }), J = D.memo(function({ agent: a, size: t = "large", active: o = !1, className: r = "" }) {
3224
+ const i = a?.faceIndex === 9, [s, d] = y(null), [c, l] = y(!s);
2750
3225
  return I(() => {
2751
3226
  let m = !1;
2752
- const u = si(t);
3227
+ const u = cn(a);
2753
3228
  return typeof u == "string" ? (d(u), l(!1)) : u instanceof Promise ? u.then((h) => {
2754
3229
  m || (d(h), l(!1));
2755
3230
  }) : d(null), () => {
2756
3231
  m = !0;
2757
3232
  };
2758
- }, [t?.faceIndex, t?.faceImageUrl]), /* @__PURE__ */ i("div", { className: V("rqmii-agent-avatar", `rqmii-agent-avatar--${n}`, s && "is-active", a && "is-orb", o), children: a ? /* @__PURE__ */ i(j.Suspense, { fallback: null, children: /* @__PURE__ */ i(ai, { className: "rqmii-agent-avatar-orb" }) }) : r ? /* @__PURE__ */ i(
3233
+ }, [a?.faceIndex, a?.faceImageUrl]), /* @__PURE__ */ n("div", { className: j("rqmii-agent-avatar", `rqmii-agent-avatar--${t}`, o && "is-active", i && "is-orb", r), children: i ? /* @__PURE__ */ n(D.Suspense, { fallback: null, children: /* @__PURE__ */ n(ln, { className: "rqmii-agent-avatar-orb" }) }) : s ? /* @__PURE__ */ n(
2759
3234
  "img",
2760
3235
  {
2761
- src: r,
2762
- alt: t?.name || "Agent",
3236
+ src: s,
3237
+ alt: a?.name || "Agent",
2763
3238
  style: { opacity: c ? 1 : 0, transition: "opacity 200ms ease" },
2764
3239
  onLoad: () => l(!0)
2765
3240
  }
2766
3241
  ) : null });
2767
- }), ot = j.memo(function({ agent: t, onClick: n, className: s = "", position: o = "fixed", active: a = !1 }) {
2768
- return /* @__PURE__ */ i("button", { type: "button", className: V("rqmii-chat-open-button", o === "fixed" && "is-fixed", s), onClick: n, "aria-label": "Open chat", children: /* @__PURE__ */ i(J, { agent: t, size: "button", active: a }) });
3242
+ }), sa = D.memo(function({ agent: a, onClick: t, className: o = "", position: r = "fixed", active: i = !1 }) {
3243
+ return /* @__PURE__ */ n("button", { type: "button", className: j("rqmii-chat-open-button", r === "fixed" && "is-fixed", o), onClick: t, "aria-label": "Open chat", children: /* @__PURE__ */ n(J, { agent: a, size: "button", active: i }) });
2769
3244
  });
2770
- function oi() {
3245
+ function dn() {
2771
3246
  try {
2772
3247
  const e = window.AudioContext || window.webkitAudioContext;
2773
3248
  if (!e) return;
2774
- const t = new e(), n = t.currentTime, s = t.createOscillator(), o = t.createGain();
2775
- s.type = "sine", s.frequency.setValueAtTime(880, n), s.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), s.connect(o), o.connect(t.destination), s.start(n), s.stop(n + 0.34), s.onended = () => {
2776
- t.close();
3249
+ const a = new e(), t = a.currentTime, o = a.createOscillator(), r = a.createGain();
3250
+ o.type = "sine", o.frequency.setValueAtTime(880, t), o.frequency.setValueAtTime(1180, t + 0.12), r.gain.setValueAtTime(1e-4, t), r.gain.exponentialRampToValueAtTime(0.18, t + 0.02), r.gain.exponentialRampToValueAtTime(1e-4, t + 0.32), o.connect(r), r.connect(a.destination), o.start(t), o.stop(t + 0.34), o.onended = () => {
3251
+ a.close();
2777
3252
  };
2778
3253
  } catch {
2779
3254
  }
2780
3255
  }
2781
- const ri = j.memo(function({ message: t, delaySeconds: n, soundEnabled: s, language: o, buttonPosition: a = "right", onClick: r }) {
2782
- const [d, c] = v(!1), l = t.trim();
3256
+ const un = D.memo(function({ message: a, delaySeconds: t, soundEnabled: o, language: r, buttonPosition: i = "right", onClick: s }) {
3257
+ const [d, c] = y(!1), l = a.trim();
2783
3258
  return I(() => {
2784
3259
  if (!l) return;
2785
3260
  const u = setTimeout(() => {
2786
- c(!0), s && oi();
2787
- }, Math.max(0, n) * 1e3);
3261
+ c(!0), o && dn();
3262
+ }, Math.max(0, t) * 1e3);
2788
3263
  return () => clearTimeout(u);
2789
- }, [l, n, s]), !d || !l ? null : /* @__PURE__ */ i(
3264
+ }, [l, t, o]), !d || !l ? null : /* @__PURE__ */ n(
2790
3265
  "button",
2791
3266
  {
2792
3267
  type: "button",
2793
- className: V("rqmii-chat-welcome-bubble", a === "right" ? "is-right" : "is-left", H(o)),
2794
- dir: oe(o),
2795
- onClick: r,
3268
+ className: j("rqmii-chat-welcome-bubble", i === "right" ? "is-right" : "is-left", H(r)),
3269
+ dir: se(r),
3270
+ onClick: s,
2796
3271
  "aria-label": l,
2797
3272
  children: l
2798
3273
  }
2799
3274
  );
2800
- }), xe = j.memo(function({ language: t, placeholder: n, onSend: s, disabled: o = !1, variant: a = "text" }) {
2801
- const [r, d] = v(""), c = R(null), l = 168, m = () => {
2802
- const u = r.trim();
2803
- !u || o || (s(u), d(""), c.current && (c.current.style.height = "auto"));
3275
+ }), Ee = D.memo(function({ language: a, placeholder: t, onSend: o, disabled: r = !1, variant: i = "text" }) {
3276
+ const [s, d] = y(""), c = _(null), l = 168, m = () => {
3277
+ const u = s.trim();
3278
+ !u || r || (o(u), d(""), c.current && (c.current.style.height = "auto"));
2804
3279
  };
2805
- return /* @__PURE__ */ p("div", { className: V("rqmii-chat-input", H(t), a === "voice" && "is-voice"), children: [
2806
- /* @__PURE__ */ i(
3280
+ return /* @__PURE__ */ f("div", { className: j("rqmii-chat-input", H(a), i === "voice" && "is-voice"), children: [
3281
+ /* @__PURE__ */ n(
2807
3282
  "textarea",
2808
3283
  {
2809
3284
  ref: c,
2810
- value: r,
2811
- disabled: o,
2812
- rows: a === "compact" ? 2 : 3,
2813
- dir: oe(t),
2814
- placeholder: n || x(t, "sendMessage"),
3285
+ value: s,
3286
+ disabled: r,
3287
+ rows: i === "compact" ? 2 : 3,
3288
+ dir: se(a),
3289
+ placeholder: t || T(a, "sendMessage"),
2815
3290
  onChange: (u) => {
2816
3291
  d(u.target.value);
2817
3292
  const h = c.current;
@@ -2822,236 +3297,308 @@ const ri = j.memo(function({ message: t, delaySeconds: n, soundEnabled: s, langu
2822
3297
  }
2823
3298
  }
2824
3299
  ),
2825
- /* @__PURE__ */ i("button", { type: "button", onClick: m, disabled: !r.trim() || o, "aria-label": x(t, "send"), children: /* @__PURE__ */ i(jn, { size: 20 }) })
3300
+ /* @__PURE__ */ n("button", { type: "button", onClick: m, disabled: !s.trim() || r, "aria-label": T(a, "send"), children: /* @__PURE__ */ n(Dt, { size: 20 }) })
2826
3301
  ] });
2827
- }), ci = j.memo(function({ text: t, streaming: n }) {
2828
- const s = ii(t, n);
2829
- return /* @__PURE__ */ i(Ve, { children: s });
2830
- }), Ae = 133, li = Ae + 44, di = 767, pe = 36, ui = 8, Xe = pe + ui;
2831
- function mi() {
2832
- return typeof window > "u" ? Ae : window.innerWidth <= di ? li : Ae;
3302
+ }), mn = D.memo(function({ text: a, streaming: t }) {
3303
+ const o = sn(a, t);
3304
+ return /* @__PURE__ */ n(Le, { children: o });
3305
+ }), we = 133, hn = we + 44, gn = 767, pe = 36, pn = 8, Xe = pe + pn;
3306
+ function bn() {
3307
+ return typeof window > "u" ? we : window.innerWidth <= gn ? hn : we;
2833
3308
  }
2834
- function hi(e) {
3309
+ function kn(e) {
2835
3310
  return e === "rtl" ? "right" : "left";
2836
3311
  }
2837
- function gi(e, t, n, s) {
3312
+ function fn(e, a, t, o) {
2838
3313
  if (!e.length) return null;
2839
- const o = Math.max(...e.map((r) => r.offsetTop)), a = e.filter((r) => r.offsetTop >= o - 0.5);
2840
- return n === "right" ? a.find((r) => r.offsetLeft + r.offsetWidth > t - s) || null : a.find((r) => r.offsetLeft < s) || null;
3314
+ const r = Math.max(...e.map((s) => s.offsetTop)), i = e.filter((s) => s.offsetTop >= r - 0.5);
3315
+ return t === "right" ? i.find((s) => s.offsetLeft + s.offsetWidth > a - o) || null : i.find((s) => s.offsetLeft < o) || null;
2841
3316
  }
2842
- function et(e, t, n, s) {
2843
- for (let o = 0; o < 2; o++) {
2844
- const a = gi(e, t, n, s);
2845
- if (!a) break;
2846
- n === "right" ? a.style.marginRight = `${s}px` : a.style.marginLeft = `${s}px`, a.style.maxWidth = `calc(100% - ${s}px)`;
3317
+ function ea(e, a, t, o) {
3318
+ for (let r = 0; r < 2; r++) {
3319
+ const i = fn(e, a, t, o);
3320
+ if (!i) break;
3321
+ t === "right" ? i.style.marginRight = `${o}px` : i.style.marginLeft = `${o}px`, i.style.maxWidth = `calc(100% - ${o}px)`;
2847
3322
  }
2848
3323
  }
2849
- const pi = j.memo(function({ suggestions: t, language: n, onClick: s }) {
2850
- const [o, a] = v(!1), [r, d] = v(!1), [c, l] = v(null), [m, u] = v(null), h = R(null), y = R([]), k = oe(n || "en"), b = hi(k), T = (z) => {
2851
- z.forEach((g) => {
3324
+ const vn = D.memo(function({ suggestions: a, language: t, onClick: o }) {
3325
+ const [r, i] = y(!1), [s, d] = y(!1), [c, l] = y(null), [m, u] = y(null), h = _(null), F = _([]), k = se(t || "en"), v = kn(k), z = (E) => {
3326
+ E.forEach((g) => {
2852
3327
  g && (g.style.maxWidth = "", g.style.marginRight = "", g.style.marginLeft = "");
2853
3328
  });
2854
3329
  };
2855
- return Ye(() => {
2856
- const z = h.current;
2857
- if (!z || o) return;
3330
+ return Oe(() => {
3331
+ const E = h.current;
3332
+ if (!E || r) return;
2858
3333
  const g = () => {
2859
- const f = y.current;
2860
- T(f);
2861
- const M = z.clientWidth, N = mi(), P = () => {
2862
- for (let A = 0; A < f.length; A++) {
2863
- const w = f[A];
2864
- if (w && w.offsetTop + w.offsetHeight > N + 0.5)
3334
+ const p = F.current;
3335
+ z(p);
3336
+ const x = E.clientWidth, S = bn(), M = () => {
3337
+ for (let A = 0; A < p.length; A++) {
3338
+ const L = p[A];
3339
+ if (L && L.offsetTop + L.offsetHeight > S + 0.5)
2865
3340
  return A;
2866
3341
  }
2867
3342
  return null;
2868
3343
  };
2869
- let E = P();
2870
- if (E !== null)
2871
- for (let A = 0; A <= f.length; A++) {
2872
- T(f);
2873
- const w = f.slice(0, E).filter((D) => !!D);
2874
- et(w, M, b, Xe);
2875
- const S = P();
2876
- if (S === null || S >= E) break;
2877
- E = S;
3344
+ let P = M();
3345
+ if (P !== null)
3346
+ for (let A = 0; A <= p.length; A++) {
3347
+ z(p);
3348
+ const L = p.slice(0, P).filter((V) => !!V);
3349
+ ea(L, x, v, Xe);
3350
+ const C = M();
3351
+ if (C === null || C >= P) break;
3352
+ P = C;
2878
3353
  }
2879
- if (l(E), d(E !== null), E !== null) {
2880
- const A = f.slice(0, E).filter((S) => !!S), w = A.length ? Math.max(...A.map((S) => S.offsetTop + S.offsetHeight)) : pe;
2881
- u(w - pe);
3354
+ if (l(P), d(P !== null), P !== null) {
3355
+ const A = p.slice(0, P).filter((C) => !!C), L = A.length ? Math.max(...A.map((C) => C.offsetTop + C.offsetHeight)) : pe;
3356
+ u(L - pe);
2882
3357
  } else
2883
3358
  u(null);
2884
3359
  };
2885
3360
  g();
2886
- const C = typeof ResizeObserver < "u" ? new ResizeObserver(g) : null;
2887
- return C?.observe(z), () => {
2888
- C?.disconnect(), T(y.current);
3361
+ const b = typeof ResizeObserver < "u" ? new ResizeObserver(g) : null;
3362
+ return b?.observe(E), () => {
3363
+ b?.disconnect(), z(F.current);
2889
3364
  };
2890
- }, [t, o, b]), Ye(() => {
2891
- const z = h.current;
2892
- if (!z || !o) return;
2893
- const g = y.current.filter((f) => !!f);
2894
- T(y.current), et(g, z.clientWidth, b, Xe);
2895
- const C = g.length ? Math.max(...g.map((f) => f.offsetTop + f.offsetHeight)) : pe;
2896
- return u(C - pe), () => {
2897
- T(y.current);
3365
+ }, [a, r, v]), Oe(() => {
3366
+ const E = h.current;
3367
+ if (!E || !r) return;
3368
+ const g = F.current.filter((p) => !!p);
3369
+ z(F.current), ea(g, E.clientWidth, v, Xe);
3370
+ const b = g.length ? Math.max(...g.map((p) => p.offsetTop + p.offsetHeight)) : pe;
3371
+ return u(b - pe), () => {
3372
+ z(F.current);
2898
3373
  };
2899
- }, [o, t, b]), t.length ? /* @__PURE__ */ i("div", { className: V("rqmii-suggested-messages", o && "is-expanded", r && "has-overflow"), dir: k, children: /* @__PURE__ */ p("div", { ref: h, className: V("rqmii-suggested-messages-inner", o ? "is-expanded" : "is-collapsed"), children: [
2900
- t.map((z, g) => {
2901
- const C = !o && c !== null && g >= c;
2902
- return /* @__PURE__ */ i(
3374
+ }, [r, a, v]), a.length ? /* @__PURE__ */ n("div", { className: j("rqmii-suggested-messages", r && "is-expanded", s && "has-overflow"), dir: k, children: /* @__PURE__ */ f("div", { ref: h, className: j("rqmii-suggested-messages-inner", r ? "is-expanded" : "is-collapsed"), children: [
3375
+ a.map((E, g) => {
3376
+ const b = !r && c !== null && g >= c;
3377
+ return /* @__PURE__ */ n(
2903
3378
  "button",
2904
3379
  {
2905
- ref: (f) => {
2906
- y.current[g] = f;
3380
+ ref: (p) => {
3381
+ F.current[g] = p;
2907
3382
  },
2908
3383
  type: "button",
2909
3384
  className: "rqmii-suggested-message",
2910
- onClick: () => s(z),
2911
- style: C ? { visibility: "hidden" } : void 0,
2912
- "aria-hidden": C || void 0,
2913
- tabIndex: C ? -1 : void 0,
2914
- children: z
3385
+ onClick: () => o(E),
3386
+ style: b ? { visibility: "hidden" } : void 0,
3387
+ "aria-hidden": b || void 0,
3388
+ tabIndex: b ? -1 : void 0,
3389
+ children: E
2915
3390
  },
2916
3391
  g
2917
3392
  );
2918
3393
  }),
2919
- r && /* @__PURE__ */ i(
3394
+ s && /* @__PURE__ */ n(
2920
3395
  "button",
2921
3396
  {
2922
3397
  type: "button",
2923
- className: V("rqmii-suggested-messages-toggle", b === "left" && "is-start-left"),
3398
+ className: j("rqmii-suggested-messages-toggle", v === "left" && "is-start-left"),
2924
3399
  style: m != null ? { top: m, bottom: "auto" } : void 0,
2925
- onClick: () => a((z) => (z && h.current && (h.current.scrollTop = 0), !z)),
2926
- "aria-label": o ? "Show less" : "Show more",
2927
- "aria-expanded": o,
2928
- children: o ? /* @__PURE__ */ i(Bn, { size: 14 }) : /* @__PURE__ */ i(st, { size: 14 })
3400
+ onClick: () => i((E) => (E && h.current && (h.current.scrollTop = 0), !E)),
3401
+ "aria-label": r ? "Show less" : "Show more",
3402
+ "aria-expanded": r,
3403
+ children: r ? /* @__PURE__ */ n(Bt, { size: 14 }) : /* @__PURE__ */ n(ra, { size: 14 })
2929
3404
  }
2930
3405
  )
2931
3406
  ] }) }) : null;
2932
- }), bi = j.memo(function({ language: t }) {
2933
- const n = oe(t || "en");
2934
- return /* @__PURE__ */ i("div", { className: "rqmii-chat-message-row", children: /* @__PURE__ */ p("div", { className: "rqmii-chat-message rqmii-chat-typing-indicator", dir: n, children: [
2935
- /* @__PURE__ */ i("span", { className: "rqmii-chat-typing-dot" }),
2936
- /* @__PURE__ */ i("span", { className: "rqmii-chat-typing-dot" }),
2937
- /* @__PURE__ */ i("span", { className: "rqmii-chat-typing-dot" })
3407
+ }), yn = D.memo(function({ language: a }) {
3408
+ const t = se(a || "en");
3409
+ return /* @__PURE__ */ n("div", { className: "rqmii-chat-message-row", children: /* @__PURE__ */ f("div", { className: "rqmii-chat-message rqmii-chat-typing-indicator", dir: t, children: [
3410
+ /* @__PURE__ */ n("span", { className: "rqmii-chat-typing-dot" }),
3411
+ /* @__PURE__ */ n("span", { className: "rqmii-chat-typing-dot" }),
3412
+ /* @__PURE__ */ n("span", { className: "rqmii-chat-typing-dot" })
2938
3413
  ] }) });
2939
- }), ki = j.memo(function({ message: t, textDirection: n }) {
2940
- const s = t.role === "user" || t.sender === "user";
2941
- return /* @__PURE__ */ i("div", { className: V("rqmii-chat-message-row", s && "is-user"), children: /* @__PURE__ */ i("div", { className: "rqmii-chat-message", dir: n, children: /* @__PURE__ */ i(ci, { text: t.text, streaming: t.streaming }) }) });
2942
- }), Re = j.memo(function({ messages: t, partialTranscript: n, language: s, showTypingIndicator: o }) {
2943
- const a = R(null), r = oe(s || "en"), d = R(t.length);
3414
+ });
3415
+ function Fn(e) {
3416
+ return e === "message";
3417
+ }
3418
+ const Tn = {
3419
+ name: "leadFormName",
3420
+ email: "leadFormEmail",
3421
+ phone: "leadFormPhone",
3422
+ message: "leadFormMessage"
3423
+ }, En = D.memo(function({ messageId: a, form: t, language: o, textDirection: r, formSubmitted: i }) {
3424
+ const s = ka(), [d, c] = y({}), [l, m] = y(!1), [u, h] = y(!!i), [F, k] = y(null), v = t.title || T(o, "leadFormTitle"), z = (b) => {
3425
+ const p = Tn[b.key];
3426
+ return `${p ? T(o, p) : b.label}${b.required ? "*" : ""}`;
3427
+ }, E = (b, p) => {
3428
+ c((x) => ({ ...x, [b]: p })), F && k(null);
3429
+ }, g = async (b) => {
3430
+ if (b.preventDefault(), l || u) return;
3431
+ if (t.fields.some((S) => S.required && !d[S.key]?.trim())) {
3432
+ k(T(o, "leadFormRequiredError"));
3433
+ return;
3434
+ }
3435
+ const x = {};
3436
+ for (const S of t.fields) {
3437
+ const M = d[S.key]?.trim();
3438
+ M && (x[S.key] = M);
3439
+ }
3440
+ m(!0), k(null);
3441
+ try {
3442
+ await s.submitLead({ agentId: t.agentId, collectedData: x }), h(!0), s.setMessages(
3443
+ s.messages.map(
3444
+ (S) => S.id === a ? { ...S, formSubmitted: !0 } : S
3445
+ )
3446
+ );
3447
+ } catch (S) {
3448
+ k(S?.message || T(o, "leadFormGenericError"));
3449
+ } finally {
3450
+ m(!1);
3451
+ }
3452
+ };
3453
+ return u ? /* @__PURE__ */ n("div", { className: "rqmii-chat-message-row rqmii-chat-lead-form-row", children: /* @__PURE__ */ n("div", { className: "rqmii-chat-lead-form rqmii-chat-lead-form--done", dir: r, children: /* @__PURE__ */ n("div", { className: "rqmii-chat-lead-form-success", children: T(o, "leadFormSuccess") }) }) }) : /* @__PURE__ */ n("div", { className: "rqmii-chat-message-row rqmii-chat-lead-form-row", children: /* @__PURE__ */ f("form", { className: "rqmii-chat-lead-form", dir: r, onSubmit: g, children: [
3454
+ /* @__PURE__ */ n("div", { className: "rqmii-chat-lead-form-title", children: v }),
3455
+ t.fields.map((b) => {
3456
+ const p = z(b), x = b.type === "email" ? "email" : b.type === "date" ? "date" : "text";
3457
+ return Fn(b.key) ? /* @__PURE__ */ n(
3458
+ "textarea",
3459
+ {
3460
+ className: "rqmii-chat-lead-form-input rqmii-chat-lead-form-textarea",
3461
+ placeholder: p,
3462
+ value: d[b.key] || "",
3463
+ onChange: (S) => E(b.key, S.target.value),
3464
+ disabled: l,
3465
+ rows: 4
3466
+ },
3467
+ b.key
3468
+ ) : /* @__PURE__ */ n(
3469
+ "input",
3470
+ {
3471
+ className: "rqmii-chat-lead-form-input",
3472
+ type: x,
3473
+ placeholder: p,
3474
+ value: d[b.key] || "",
3475
+ onChange: (S) => E(b.key, S.target.value),
3476
+ disabled: l
3477
+ },
3478
+ b.key
3479
+ );
3480
+ }),
3481
+ F && /* @__PURE__ */ n("div", { className: "rqmii-chat-lead-form-error", children: F }),
3482
+ /* @__PURE__ */ n("button", { type: "submit", className: "rqmii-chat-lead-form-submit", disabled: l, children: l ? T(o, "loading") : T(o, "submit") })
3483
+ ] }) });
3484
+ }), zn = D.memo(function({ message: a, textDirection: t, language: o }) {
3485
+ if (a.role === "lead_form" && a.form)
3486
+ return /* @__PURE__ */ n(En, { messageId: a.id, form: a.form, language: o, textDirection: t, formSubmitted: a.formSubmitted });
3487
+ const r = a.role === "user" || a.sender === "user";
3488
+ return /* @__PURE__ */ n("div", { className: j("rqmii-chat-message-row", r && "is-user"), children: /* @__PURE__ */ n("div", { className: "rqmii-chat-message", dir: t, children: /* @__PURE__ */ n(mn, { text: a.text, streaming: a.streaming }) }) });
3489
+ }), _e = D.memo(function({ messages: a, partialTranscript: t, language: o, showTypingIndicator: r }) {
3490
+ const i = _(null), s = se(o || "en"), d = _(a.length);
2944
3491
  return I(() => {
2945
- if (!a.current) return;
2946
- const c = t.length !== d.current;
2947
- d.current = t.length, a.current.scrollIntoView({ behavior: c ? "smooth" : "instant", block: "end" });
2948
- }, [t, n]), /* @__PURE__ */ p("div", { className: "rqmii-chat-messages", children: [
2949
- t.map((c) => /* @__PURE__ */ i(ki, { message: c, textDirection: r }, c.id || `${c.role}-${c.text}`)),
2950
- o && /* @__PURE__ */ i(bi, { language: s }),
2951
- n && /* @__PURE__ */ i("div", { className: "rqmii-chat-message-row is-user is-partial", children: /* @__PURE__ */ i("div", { className: "rqmii-chat-message", dir: r, children: n }) }),
2952
- /* @__PURE__ */ i("div", { ref: a })
3492
+ if (!i.current) return;
3493
+ const c = a.length !== d.current;
3494
+ d.current = a.length, i.current.scrollIntoView({ behavior: c ? "smooth" : "instant", block: "end" });
3495
+ }, [a, t]), /* @__PURE__ */ f("div", { className: "rqmii-chat-messages", children: [
3496
+ a.map((c) => /* @__PURE__ */ n(zn, { message: c, textDirection: s, language: o || "en" }, c.id || `${c.role}-${c.text}`)),
3497
+ r && /* @__PURE__ */ n(yn, { language: o }),
3498
+ t && /* @__PURE__ */ n("div", { className: "rqmii-chat-message-row is-user is-partial", children: /* @__PURE__ */ n("div", { className: "rqmii-chat-message", dir: s, children: t }) }),
3499
+ /* @__PURE__ */ n("div", { ref: i })
2953
3500
  ] });
2954
- }), rt = j.memo(function({ message: t, onRetry: n, onClose: s, language: o = "en" }) {
2955
- return /* @__PURE__ */ p("div", { className: "rqmii-chat-panel rqmii-chat-panel--error", children: [
2956
- s && /* @__PURE__ */ i("button", { type: "button", className: "rqmii-error-close", onClick: s, children: "×" }),
2957
- /* @__PURE__ */ i("p", { children: t || x(o, "connectionFailed") }),
2958
- n && /* @__PURE__ */ p("button", { type: "button", className: "rqmii-chat-retry", onClick: n, children: [
2959
- /* @__PURE__ */ i($n, { size: 16 }),
2960
- /* @__PURE__ */ i("span", { children: x(o, "retry") })
3501
+ }), la = D.memo(function({ message: a, onRetry: t, onClose: o, language: r = "en" }) {
3502
+ return /* @__PURE__ */ f("div", { className: "rqmii-chat-panel rqmii-chat-panel--error", children: [
3503
+ o && /* @__PURE__ */ n("button", { type: "button", className: "rqmii-error-close", onClick: o, children: "×" }),
3504
+ /* @__PURE__ */ n("p", { children: a || T(r, "connectionFailed") }),
3505
+ t && /* @__PURE__ */ f("button", { type: "button", className: "rqmii-chat-retry", onClick: t, children: [
3506
+ /* @__PURE__ */ n(Zt, { size: 16 }),
3507
+ /* @__PURE__ */ n("span", { children: T(r, "retry") })
2961
3508
  ] })
2962
3509
  ] });
2963
- }), fi = 5;
2964
- function ct({ rating: e, onRate: t, readonly: n, size: s = 28 }) {
2965
- const [o, a] = v(0), r = o || e;
2966
- return /* @__PURE__ */ i("div", { className: "rqmii-chat-rating-stars", role: "radiogroup", children: Array.from({ length: fi }, (d, c) => {
2967
- const l = c + 1, m = l <= r;
2968
- return /* @__PURE__ */ i(
3510
+ }), Sn = 5;
3511
+ function ca({ rating: e, onRate: a, readonly: t, size: o = 28 }) {
3512
+ const [r, i] = y(0), s = r || e;
3513
+ return /* @__PURE__ */ n("div", { className: "rqmii-chat-rating-stars", role: "radiogroup", children: Array.from({ length: Sn }, (d, c) => {
3514
+ const l = c + 1, m = l <= s;
3515
+ return /* @__PURE__ */ n(
2969
3516
  "button",
2970
3517
  {
2971
3518
  type: "button",
2972
- className: V("rqmii-chat-star", m && "is-filled", n && "is-readonly"),
2973
- disabled: n,
3519
+ className: j("rqmii-chat-star", m && "is-filled", t && "is-readonly"),
3520
+ disabled: t,
2974
3521
  "aria-label": `${l}`,
2975
3522
  "aria-checked": l === e,
2976
3523
  role: "radio",
2977
- onMouseEnter: () => !n && a(l),
2978
- onMouseLeave: () => !n && a(0),
2979
- onClick: () => !n && t?.(l),
2980
- children: /* @__PURE__ */ i(Jn, { size: s, fill: m ? "currentColor" : "none" })
3524
+ onMouseEnter: () => !t && i(l),
3525
+ onMouseLeave: () => !t && i(0),
3526
+ onClick: () => !t && a?.(l),
3527
+ children: /* @__PURE__ */ n(Xt, { size: o, fill: m ? "currentColor" : "none" })
2981
3528
  },
2982
3529
  l
2983
3530
  );
2984
3531
  }) });
2985
3532
  }
2986
- function vi({
3533
+ function xn({
2987
3534
  language: e,
2988
- rating: t,
2989
- endedBy: n,
2990
- sessionId: s,
2991
- interactive: o,
2992
- showTellUsMore: a,
2993
- onRate: r,
3535
+ rating: a,
3536
+ endedBy: t,
3537
+ sessionId: o,
3538
+ interactive: r,
3539
+ showTellUsMore: i,
3540
+ onRate: s,
2994
3541
  onTellUsMore: d
2995
3542
  }) {
2996
- const c = t > 0 ? x(e, "ratingThankYou") : x(e, "ratingQuestion"), l = n === "user" ? x(e, "youEnded") : x(e, "agentEnded");
2997
- return /* @__PURE__ */ p("div", { className: V("rqmii-chat-rating", H(e)), dir: oe(e), children: [
2998
- /* @__PURE__ */ i("div", { className: "rqmii-chat-rating-header", children: c }),
2999
- /* @__PURE__ */ i(ct, { rating: t, onRate: r, readonly: !o }),
3000
- a && /* @__PURE__ */ i("button", { type: "button", className: "rqmii-chat-rating-more", onClick: d, children: x(e, "tellUsMore") }),
3001
- /* @__PURE__ */ p("div", { className: "rqmii-chat-rating-meta", children: [
3002
- /* @__PURE__ */ i("div", { children: l }),
3003
- s && /* @__PURE__ */ p("div", { children: [
3004
- x(e, "sessionIdLabel"),
3543
+ const c = a > 0 ? T(e, "ratingThankYou") : T(e, "ratingQuestion"), l = t === "user" ? T(e, "youEnded") : T(e, "agentEnded");
3544
+ return /* @__PURE__ */ f("div", { className: j("rqmii-chat-rating", H(e)), dir: se(e), children: [
3545
+ /* @__PURE__ */ n("div", { className: "rqmii-chat-rating-header", children: c }),
3546
+ /* @__PURE__ */ n(ca, { rating: a, onRate: s, readonly: !r }),
3547
+ i && /* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-rating-more", onClick: d, children: T(e, "tellUsMore") }),
3548
+ /* @__PURE__ */ f("div", { className: "rqmii-chat-rating-meta", children: [
3549
+ /* @__PURE__ */ n("div", { children: l }),
3550
+ o && /* @__PURE__ */ f("div", { children: [
3551
+ T(e, "sessionIdLabel"),
3005
3552
  " ",
3006
- /* @__PURE__ */ i("span", { className: "rqmii-chat-font-latin", children: s })
3553
+ /* @__PURE__ */ n("span", { className: "rqmii-chat-font-latin", children: o })
3007
3554
  ] })
3008
3555
  ] })
3009
3556
  ] });
3010
3557
  }
3011
- function yi({
3558
+ function Pn({
3012
3559
  agent: e,
3013
- language: t,
3014
- rating: n,
3015
- onBack: s,
3016
- onMinimize: o,
3017
- onSubmit: a
3560
+ language: a,
3561
+ rating: t,
3562
+ onBack: o,
3563
+ onMinimize: r,
3564
+ onSubmit: i
3018
3565
  }) {
3019
- const [r, d] = v(""), [c, l] = v(!1), m = r.trim().length > 0 && !c, u = async () => {
3566
+ const [s, d] = y(""), [c, l] = y(!1), m = s.trim().length > 0 && !c, u = async () => {
3020
3567
  if (m) {
3021
3568
  l(!0);
3022
3569
  try {
3023
- await a(r.trim());
3570
+ await i(s.trim());
3024
3571
  } finally {
3025
3572
  l(!1);
3026
3573
  }
3027
3574
  }
3028
3575
  };
3029
- return /* @__PURE__ */ p("div", { className: V("rqmii-chat-panel rqmii-chat-panel--feedback", H(t)), dir: oe(t), children: [
3030
- /* @__PURE__ */ p("div", { className: "rqmii-chat-topbar", children: [
3031
- /* @__PURE__ */ i("button", { type: "button", className: "rqmii-chat-circle-button", onClick: s, "aria-label": "Back", children: /* @__PURE__ */ i(qn, { size: 20 }) }),
3032
- /* @__PURE__ */ i("button", { type: "button", className: "rqmii-chat-circle-button", onClick: o, "aria-label": x(t, "minimize"), children: /* @__PURE__ */ i(Te, { size: 20 }) })
3576
+ return /* @__PURE__ */ f("div", { className: j("rqmii-chat-panel rqmii-chat-panel--feedback", H(a)), dir: se(a), children: [
3577
+ /* @__PURE__ */ f("div", { className: "rqmii-chat-topbar", children: [
3578
+ /* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button", onClick: o, "aria-label": "Back", children: /* @__PURE__ */ n(Nt, { size: 20 }) }),
3579
+ /* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button", onClick: r, "aria-label": T(a, "minimize"), children: /* @__PURE__ */ n(Te, { size: 20 }) })
3033
3580
  ] }),
3034
- /* @__PURE__ */ p("div", { className: "rqmii-chat-feedback-body", children: [
3035
- /* @__PURE__ */ i(J, { agent: e, size: "hero" }),
3036
- /* @__PURE__ */ i(ct, { rating: n, readonly: !0 }),
3037
- /* @__PURE__ */ i("div", { className: "rqmii-chat-feedback-title", children: x(t, "ratingThankYou") }),
3038
- /* @__PURE__ */ i("div", { className: "rqmii-chat-feedback-subtitle", children: x(t, "feedbackSubtitle") }),
3039
- /* @__PURE__ */ i(
3581
+ /* @__PURE__ */ f("div", { className: "rqmii-chat-feedback-body", children: [
3582
+ /* @__PURE__ */ n(J, { agent: e, size: "hero" }),
3583
+ /* @__PURE__ */ n(ca, { rating: t, readonly: !0 }),
3584
+ /* @__PURE__ */ n("div", { className: "rqmii-chat-feedback-title", children: T(a, "ratingThankYou") }),
3585
+ /* @__PURE__ */ n("div", { className: "rqmii-chat-feedback-subtitle", children: T(a, "feedbackSubtitle") }),
3586
+ /* @__PURE__ */ n(
3040
3587
  "textarea",
3041
3588
  {
3042
3589
  className: "rqmii-chat-feedback-input",
3043
- value: r,
3044
- dir: oe(t),
3045
- placeholder: x(t, "feedbackPlaceholder"),
3590
+ value: s,
3591
+ dir: se(a),
3592
+ placeholder: T(a, "feedbackPlaceholder"),
3046
3593
  onChange: (h) => d(h.target.value)
3047
3594
  }
3048
3595
  ),
3049
- /* @__PURE__ */ i("div", { className: "rqmii-chat-feedback-actions", children: /* @__PURE__ */ i("button", { type: "button", className: "rqmii-chat-feedback-submit", onClick: u, disabled: !m, children: c ? /* @__PURE__ */ i(ye, { className: "rqmii-chat-spin", size: 18 }) : x(t, "submit") }) })
3596
+ /* @__PURE__ */ n("div", { className: "rqmii-chat-feedback-actions", children: /* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-feedback-submit", onClick: u, disabled: !m, children: c ? /* @__PURE__ */ n(ye, { className: "rqmii-chat-spin", size: 18 }) : T(a, "submit") }) })
3050
3597
  ] }),
3051
- /* @__PURE__ */ i(re, { language: t, agent: e })
3598
+ /* @__PURE__ */ n(le, { language: a, agent: e })
3052
3599
  ] });
3053
3600
  }
3054
- const zi = j.lazy(() => import("./RqmiiCloudAvatarPlayer-CS7A0FHP.js").then((e) => e.e).then((e) => ({ default: e.RqmiiCloudAvatarPlayer })));
3601
+ const Mn = D.lazy(() => import("./RqmiiCloudAvatarPlayer-BVTRjoXz.js").then((e) => e.e).then((e) => ({ default: e.RqmiiCloudAvatarPlayer })));
3055
3602
  function he(e) {
3056
3603
  if (!(e == null || typeof window > "u" || window.innerWidth >= 768))
3057
3604
  return {
@@ -3059,587 +3606,591 @@ function he(e) {
3059
3606
  bottom: 0
3060
3607
  };
3061
3608
  }
3062
- const Ti = j.memo(function({ agent: t, language: n, languages: s, onLanguageChange: o, onClose: a, onSend: r, isVoiceEnabled: d = !1, isAudioPlaying: c = !1, isVoiceSetupLoading: l = !1, onStartVoice: m, visualViewportHeight: u, disabled: h = !1, error: y, suggestions: k, onSuggestionClick: b, compact: T = !1 }) {
3063
- const z = he(u), g = T ? "start" : "hero", C = k && k.length > 0;
3064
- return /* @__PURE__ */ p("div", { className: V("rqmii-chat-panel rqmii-chat-panel--start", T && "rqmii-chat-panel--start-compact", H(n)), style: z, children: [
3065
- /* @__PURE__ */ p("div", { className: "rqmii-chat-topbar", children: [
3066
- /* @__PURE__ */ i("span", {}),
3067
- /* @__PURE__ */ p("div", { className: "rqmii-chat-topbar-actions", children: [
3068
- /* @__PURE__ */ i(Ne, { language: n, languages: s, onChange: o }),
3069
- /* @__PURE__ */ i("button", { type: "button", className: "rqmii-chat-circle-button", onClick: a, children: /* @__PURE__ */ i(_e, { size: 20 }) })
3609
+ const Cn = D.memo(function({ agent: a, language: t, languages: o, onLanguageChange: r, onClose: i, onSend: s, isVoiceEnabled: d = !1, isAudioPlaying: c = !1, isVoiceSetupLoading: l = !1, onStartVoice: m, visualViewportHeight: u, disabled: h = !1, error: F, suggestions: k, onSuggestionClick: v, compact: z = !1 }) {
3610
+ const E = he(u), g = z ? "start" : "hero", b = k && k.length > 0;
3611
+ return /* @__PURE__ */ f("div", { className: j("rqmii-chat-panel rqmii-chat-panel--start", z && "rqmii-chat-panel--start-compact", H(t)), style: E, children: [
3612
+ /* @__PURE__ */ f("div", { className: "rqmii-chat-topbar", children: [
3613
+ /* @__PURE__ */ n("span", {}),
3614
+ /* @__PURE__ */ f("div", { className: "rqmii-chat-topbar-actions", children: [
3615
+ /* @__PURE__ */ n(Ne, { language: t, languages: o, onChange: r }),
3616
+ /* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button", onClick: i, children: /* @__PURE__ */ n(De, { size: 20 }) })
3070
3617
  ] })
3071
3618
  ] }),
3072
- /* @__PURE__ */ p("div", { className: "rqmii-chat-start-body", children: [
3073
- d ? /* @__PURE__ */ p("div", { className: V("rqmii-chat-call-avatar-wrap", T && "is-compact"), children: [
3074
- /* @__PURE__ */ i(J, { agent: t, size: g, active: c }),
3075
- /* @__PURE__ */ i("button", { type: "button", className: V("rqmii-chat-call-button", T && "is-compact"), onClick: m, disabled: l, "aria-label": x(n, "startVoice"), children: l ? /* @__PURE__ */ i(ye, { className: "rqmii-chat-spin", size: T ? 18 : 24 }) : /* @__PURE__ */ i(je, { size: T ? 18 : 24 }) })
3076
- ] }) : /* @__PURE__ */ i(J, { agent: t, size: g }),
3077
- /* @__PURE__ */ i("div", { className: "rqmii-chat-agent-name", children: t.name }),
3078
- y && /* @__PURE__ */ i("div", { className: "rqmii-chat-error-text", children: y })
3619
+ /* @__PURE__ */ f("div", { className: "rqmii-chat-start-body", children: [
3620
+ d ? /* @__PURE__ */ f("div", { className: j("rqmii-chat-call-avatar-wrap", z && "is-compact"), children: [
3621
+ /* @__PURE__ */ n(J, { agent: a, size: g, active: c }),
3622
+ /* @__PURE__ */ n("button", { type: "button", className: j("rqmii-chat-call-button", z && "is-compact"), onClick: m, disabled: l, "aria-label": T(t, "startVoice"), children: l ? /* @__PURE__ */ n(ye, { className: "rqmii-chat-spin", size: z ? 18 : 24 }) : /* @__PURE__ */ n(Ie, { size: z ? 18 : 24 }) })
3623
+ ] }) : /* @__PURE__ */ n(J, { agent: a, size: g }),
3624
+ /* @__PURE__ */ n("div", { className: "rqmii-chat-agent-name", children: a.name }),
3625
+ F && /* @__PURE__ */ n("div", { className: "rqmii-chat-error-text", children: F })
3079
3626
  ] }),
3080
- C && /* @__PURE__ */ i("div", { className: "rqmii-chat-start-suggestions", children: /* @__PURE__ */ i(pi, { suggestions: k, language: n, onClick: (f) => b?.(f) }) }),
3081
- /* @__PURE__ */ i(xe, { language: n, onSend: r, disabled: h }),
3082
- /* @__PURE__ */ i(re, { language: n, agent: t })
3627
+ b && /* @__PURE__ */ n("div", { className: "rqmii-chat-start-suggestions", children: /* @__PURE__ */ n(vn, { suggestions: k, language: t, onClick: (p) => v?.(p) }) }),
3628
+ /* @__PURE__ */ n(Ee, { language: t, onSend: s, disabled: h }),
3629
+ /* @__PURE__ */ n(le, { language: t, agent: a })
3083
3630
  ] });
3084
- }), xi = j.memo(function({ agent: t, language: n, languages: s, onLanguageChange: o, onClose: a, onStartVoice: r, isVoiceSetupLoading: d = !1, isAudioPlaying: c, visualViewportHeight: l }) {
3631
+ }), wn = D.memo(function({ agent: a, language: t, languages: o, onLanguageChange: r, onClose: i, onStartVoice: s, isVoiceSetupLoading: d = !1, isAudioPlaying: c, visualViewportHeight: l }) {
3085
3632
  const m = he(l);
3086
- return /* @__PURE__ */ p("div", { className: V("rqmii-chat-panel rqmii-chat-panel--voice-start", H(n)), style: m, children: [
3087
- /* @__PURE__ */ p("div", { className: "rqmii-chat-topbar", children: [
3088
- /* @__PURE__ */ i("span", {}),
3089
- /* @__PURE__ */ p("div", { className: "rqmii-chat-topbar-actions", children: [
3090
- /* @__PURE__ */ i(Ne, { language: n, languages: s, onChange: o }),
3091
- /* @__PURE__ */ i("button", { type: "button", className: "rqmii-chat-circle-button", onClick: a, children: /* @__PURE__ */ i(_e, { size: 20 }) })
3633
+ return /* @__PURE__ */ f("div", { className: j("rqmii-chat-panel rqmii-chat-panel--voice-start", H(t)), style: m, children: [
3634
+ /* @__PURE__ */ f("div", { className: "rqmii-chat-topbar", children: [
3635
+ /* @__PURE__ */ n("span", {}),
3636
+ /* @__PURE__ */ f("div", { className: "rqmii-chat-topbar-actions", children: [
3637
+ /* @__PURE__ */ n(Ne, { language: t, languages: o, onChange: r }),
3638
+ /* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button", onClick: i, children: /* @__PURE__ */ n(De, { size: 20 }) })
3092
3639
  ] })
3093
3640
  ] }),
3094
- /* @__PURE__ */ p("div", { className: "rqmii-chat-call-body", children: [
3095
- /* @__PURE__ */ p("div", { className: "rqmii-chat-call-avatar-wrap", children: [
3096
- /* @__PURE__ */ i(J, { agent: t, size: "hero", active: c }),
3097
- /* @__PURE__ */ i("button", { type: "button", className: "rqmii-chat-call-button", onClick: r, disabled: d, "aria-label": x(n, "startVoice"), children: d ? /* @__PURE__ */ i(ye, { className: "rqmii-chat-spin", size: 24 }) : /* @__PURE__ */ i(je, { size: 24 }) })
3641
+ /* @__PURE__ */ f("div", { className: "rqmii-chat-call-body", children: [
3642
+ /* @__PURE__ */ f("div", { className: "rqmii-chat-call-avatar-wrap", children: [
3643
+ /* @__PURE__ */ n(J, { agent: a, size: "hero", active: c }),
3644
+ /* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-call-button", onClick: s, disabled: d, "aria-label": T(t, "startVoice"), children: d ? /* @__PURE__ */ n(ye, { className: "rqmii-chat-spin", size: 24 }) : /* @__PURE__ */ n(Ie, { size: 24 }) })
3098
3645
  ] }),
3099
- /* @__PURE__ */ p("div", { className: "rqmii-chat-agent-name", children: [
3100
- x(n, "call"),
3646
+ /* @__PURE__ */ f("div", { className: "rqmii-chat-agent-name", children: [
3647
+ T(t, "call"),
3101
3648
  " ",
3102
- t.name
3649
+ a.name
3103
3650
  ] })
3104
3651
  ] }),
3105
- /* @__PURE__ */ i(re, { language: n, agent: t })
3652
+ /* @__PURE__ */ n(le, { language: t, agent: a })
3106
3653
  ] });
3107
- }), Ci = j.memo(function({ agent: t, language: n, onEndSession: s, onMinimize: o, messages: a, partialTranscript: r, onSend: d, isAudioPlaying: c, isVoiceEnabled: l, onToggleVoice: m, isListening: u, isSpeaking: h, isLoading: y, isAgentThinking: k, isAgentSpeaking: b, onStartVoice: T, elapsed: z, visualViewportHeight: g, waitingForResponse: C }) {
3108
- const f = lt({ language: n, isListening: u, isLoading: y, isSpeaking: h, isAudioPlaying: c, isAgentThinking: k, isAgentSpeaking: b, persistentListening: !1 }), M = he(g);
3109
- return /* @__PURE__ */ p("div", { className: V("rqmii-chat-panel rqmii-chat-panel--conversation", H(n)), style: M, children: [
3110
- /* @__PURE__ */ p("div", { className: "rqmii-chat-header", children: [
3111
- /* @__PURE__ */ i(J, { agent: t, size: "header", active: c }),
3112
- l && f && /* @__PURE__ */ i("div", { className: "rqmii-chat-header-status", children: /* @__PURE__ */ i("span", { children: f }) }),
3113
- /* @__PURE__ */ i("div", { className: "rqmii-chat-header-spacer" }),
3114
- /* @__PURE__ */ p("div", { className: "rqmii-chat-header-actions", children: [
3115
- o && /* @__PURE__ */ i("button", { type: "button", className: "rqmii-chat-circle-button", onClick: o, "aria-label": x(n, "minimize"), children: /* @__PURE__ */ i(Te, { size: 20 }) }),
3116
- l && /* @__PURE__ */ i("button", { type: "button", className: V("rqmii-chat-circle-button", h && "is-active"), onClick: m, "aria-label": u ? x(n, "stopVoice") : x(n, "startVoice"), children: u ? /* @__PURE__ */ i(ze, { size: 20 }) : /* @__PURE__ */ i(De, { size: 20 }) }),
3117
- /* @__PURE__ */ i("button", { type: "button", className: "rqmii-chat-circle-button is-danger", onClick: s, "aria-label": x(n, "endCall"), children: /* @__PURE__ */ i(Ie, { size: 20 }) })
3654
+ }), An = D.memo(function({ agent: a, language: t, onEndSession: o, onMinimize: r, messages: i, partialTranscript: s, onSend: d, isAudioPlaying: c, isVoiceEnabled: l, onToggleVoice: m, isListening: u, isSpeaking: h, isLoading: F, isAgentThinking: k, isAgentSpeaking: v, onStartVoice: z, elapsed: E, visualViewportHeight: g, waitingForResponse: b }) {
3655
+ const p = da({ language: t, isListening: u, isLoading: F, isSpeaking: h, isAudioPlaying: c, isAgentThinking: k, isAgentSpeaking: v, persistentListening: !1 }), x = he(g);
3656
+ return /* @__PURE__ */ f("div", { className: j("rqmii-chat-panel rqmii-chat-panel--conversation", H(t)), style: x, children: [
3657
+ /* @__PURE__ */ f("div", { className: "rqmii-chat-header", children: [
3658
+ /* @__PURE__ */ n(J, { agent: a, size: "header", active: c }),
3659
+ l && p && /* @__PURE__ */ n("div", { className: "rqmii-chat-header-status", children: /* @__PURE__ */ n("span", { children: p }) }),
3660
+ /* @__PURE__ */ n("div", { className: "rqmii-chat-header-spacer" }),
3661
+ /* @__PURE__ */ f("div", { className: "rqmii-chat-header-actions", children: [
3662
+ r && /* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button", onClick: r, "aria-label": T(t, "minimize"), children: /* @__PURE__ */ n(Te, { size: 20 }) }),
3663
+ l && /* @__PURE__ */ n("button", { type: "button", className: j("rqmii-chat-circle-button", h && "is-active"), onClick: m, "aria-label": u ? T(t, "stopVoice") : T(t, "startVoice"), children: u ? /* @__PURE__ */ n(Fe, { size: 20 }) : /* @__PURE__ */ n(je, { size: 20 }) }),
3664
+ /* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button is-danger", onClick: o, "aria-label": T(t, "endCall"), children: /* @__PURE__ */ n(Ve, { size: 20 }) })
3118
3665
  ] })
3119
3666
  ] }),
3120
- /* @__PURE__ */ i(Re, { messages: a, partialTranscript: r, language: n, showTypingIndicator: C }),
3121
- l && /* @__PURE__ */ i("div", { className: "rqmii-chat-session-counter", children: qe(z) }),
3122
- /* @__PURE__ */ i(xe, { language: n, onSend: d }),
3123
- /* @__PURE__ */ i(re, { language: n, agent: t })
3667
+ /* @__PURE__ */ n(_e, { messages: i, partialTranscript: s, language: t, showTypingIndicator: b }),
3668
+ l && /* @__PURE__ */ n("div", { className: "rqmii-chat-session-counter", children: qe(E) }),
3669
+ /* @__PURE__ */ n(Ee, { language: t, onSend: d }),
3670
+ /* @__PURE__ */ n(le, { language: t, agent: a })
3124
3671
  ] });
3125
- }), Ei = j.memo(function({ agent: t, language: n, onEndSession: s, onMinimize: o, isListening: a, isLoading: r, isSpeaking: d, isAudioPlaying: c, isAgentThinking: l, isAgentSpeaking: m, onToggleVoice: u, elapsed: h, visualViewportHeight: y }) {
3126
- const k = lt({ language: n, isListening: a, isLoading: r, isSpeaking: d, isAudioPlaying: c, isAgentThinking: l, isAgentSpeaking: m, persistentListening: !0 }), b = he(y);
3127
- return /* @__PURE__ */ p("div", { className: V("rqmii-chat-panel rqmii-chat-panel--voice-call", H(n)), style: b, children: [
3128
- /* @__PURE__ */ p("div", { className: "rqmii-chat-call-status", children: [
3129
- /* @__PURE__ */ i("span", { className: V("rqmii-chat-live-dot", a && "is-live") }),
3130
- /* @__PURE__ */ i("span", { children: qe(h) }),
3131
- /* @__PURE__ */ i("button", { type: "button", className: "rqmii-chat-circle-button", onClick: o, children: /* @__PURE__ */ i(Te, { size: 20 }) })
3672
+ }), Ln = D.memo(function({ agent: a, language: t, onEndSession: o, onMinimize: r, isListening: i, isLoading: s, isSpeaking: d, isAudioPlaying: c, isAgentThinking: l, isAgentSpeaking: m, onToggleVoice: u, elapsed: h, visualViewportHeight: F }) {
3673
+ const k = da({ language: t, isListening: i, isLoading: s, isSpeaking: d, isAudioPlaying: c, isAgentThinking: l, isAgentSpeaking: m, persistentListening: !0 }), v = he(F);
3674
+ return /* @__PURE__ */ f("div", { className: j("rqmii-chat-panel rqmii-chat-panel--voice-call", H(t)), style: v, children: [
3675
+ /* @__PURE__ */ f("div", { className: "rqmii-chat-call-status", children: [
3676
+ /* @__PURE__ */ n("span", { className: j("rqmii-chat-live-dot", i && "is-live") }),
3677
+ /* @__PURE__ */ n("span", { children: qe(h) }),
3678
+ /* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button", onClick: r, children: /* @__PURE__ */ n(Te, { size: 20 }) })
3132
3679
  ] }),
3133
- /* @__PURE__ */ p("div", { className: "rqmii-chat-voice-frame", children: [
3134
- /* @__PURE__ */ i(J, { agent: t, size: "hero", active: c }),
3135
- /* @__PURE__ */ i("div", { className: "rqmii-chat-agent-name", children: t.name }),
3136
- /* @__PURE__ */ i("div", { className: V("rqmii-chat-status-pill", !k && "is-empty"), children: k || x(n, "listening") }),
3137
- /* @__PURE__ */ p("div", { className: "rqmii-chat-voice-actions", children: [
3138
- /* @__PURE__ */ i("button", { type: "button", className: V("rqmii-chat-circle-button", d && "is-active"), onClick: u, children: a ? /* @__PURE__ */ i(ze, { size: 20 }) : /* @__PURE__ */ i(De, { size: 20 }) }),
3139
- /* @__PURE__ */ i("button", { type: "button", className: "rqmii-chat-circle-button is-danger", onClick: s, "aria-label": x(n, "endCall"), children: /* @__PURE__ */ i(Ie, { size: 20 }) })
3680
+ /* @__PURE__ */ f("div", { className: "rqmii-chat-voice-frame", children: [
3681
+ /* @__PURE__ */ n(J, { agent: a, size: "hero", active: c }),
3682
+ /* @__PURE__ */ n("div", { className: "rqmii-chat-agent-name", children: a.name }),
3683
+ /* @__PURE__ */ n("div", { className: j("rqmii-chat-status-pill", !k && "is-empty"), children: k || T(t, "listening") }),
3684
+ /* @__PURE__ */ f("div", { className: "rqmii-chat-voice-actions", children: [
3685
+ /* @__PURE__ */ n("button", { type: "button", className: j("rqmii-chat-circle-button", d && "is-active"), onClick: u, children: i ? /* @__PURE__ */ n(Fe, { size: 20 }) : /* @__PURE__ */ n(je, { size: 20 }) }),
3686
+ /* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button is-danger", onClick: o, "aria-label": T(t, "endCall"), children: /* @__PURE__ */ n(Ve, { size: 20 }) })
3140
3687
  ] })
3141
3688
  ] }),
3142
- /* @__PURE__ */ i(re, { language: n, agent: t })
3689
+ /* @__PURE__ */ n(le, { language: t, agent: a })
3143
3690
  ] });
3144
3691
  });
3145
- function lt({ language: e, isListening: t, isLoading: n, isSpeaking: s, isAudioPlaying: o, isAgentThinking: a, isAgentSpeaking: r, persistentListening: d = !1 }) {
3146
- return n ? x(e, "loading") : s ? x(e, "listening") : o || r ? x(e, "talkToInterrupt") : a ? x(e, "processing") : t && d ? x(e, "listening") : null;
3692
+ function da({ language: e, isListening: a, isLoading: t, isSpeaking: o, isAudioPlaying: r, isAgentThinking: i, isAgentSpeaking: s, persistentListening: d = !1 }) {
3693
+ return t ? T(e, "loading") : o ? T(e, "listening") : r || s ? T(e, "talkToInterrupt") : i ? T(e, "processing") : a && d ? T(e, "listening") : null;
3147
3694
  }
3148
- const Si = j.memo(function({ agent: t, language: n, onRestore: s, onClose: o, isListening: a, isAudioPlaying: r, isSpeaking: d, onToggleVoice: c, elapsed: l, visualViewportHeight: m, variant: u = "voice" }) {
3149
- const h = he(m), y = u === "text";
3150
- return /* @__PURE__ */ p("div", { className: V("rqmii-chat-minimized", H(n)), style: h, children: [
3151
- /* @__PURE__ */ i(J, { agent: t, size: "minimized", active: r }),
3152
- !y && /* @__PURE__ */ i("span", { className: "rqmii-chat-minimized-time", children: qe(l) }),
3153
- /* @__PURE__ */ p("div", { className: "rqmii-chat-minimized-actions", children: [
3154
- /* @__PURE__ */ i("button", { type: "button", className: "rqmii-chat-circle-button", onClick: s, "aria-label": x(n, "maximize"), children: /* @__PURE__ */ i(On, { size: 20 }) }),
3155
- !y && /* @__PURE__ */ i("button", { type: "button", className: V("rqmii-chat-circle-button", d && "is-active"), onClick: c, "aria-label": a ? x(n, "stopVoice") : x(n, "startVoice"), children: a ? /* @__PURE__ */ i(ze, { size: 20 }) : /* @__PURE__ */ i(De, { size: 20 }) }),
3156
- /* @__PURE__ */ i("button", { type: "button", className: "rqmii-chat-circle-button is-danger", onClick: o, "aria-label": x(n, "endCall"), children: /* @__PURE__ */ i(Ie, { size: 20 }) })
3695
+ const jn = D.memo(function({ agent: a, language: t, onRestore: o, onClose: r, isListening: i, isAudioPlaying: s, isSpeaking: d, onToggleVoice: c, elapsed: l, visualViewportHeight: m, variant: u = "voice" }) {
3696
+ const h = he(m), F = u === "text";
3697
+ return /* @__PURE__ */ f("div", { className: j("rqmii-chat-minimized", H(t)), style: h, children: [
3698
+ /* @__PURE__ */ n(J, { agent: a, size: "minimized", active: s }),
3699
+ !F && /* @__PURE__ */ n("span", { className: "rqmii-chat-minimized-time", children: qe(l) }),
3700
+ /* @__PURE__ */ f("div", { className: "rqmii-chat-minimized-actions", children: [
3701
+ /* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button", onClick: o, "aria-label": T(t, "maximize"), children: /* @__PURE__ */ n(Kt, { size: 20 }) }),
3702
+ !F && /* @__PURE__ */ n("button", { type: "button", className: j("rqmii-chat-circle-button", d && "is-active"), onClick: c, "aria-label": i ? T(t, "stopVoice") : T(t, "startVoice"), children: i ? /* @__PURE__ */ n(Fe, { size: 20 }) : /* @__PURE__ */ n(je, { size: 20 }) }),
3703
+ /* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button is-danger", onClick: r, "aria-label": T(t, "endCall"), children: /* @__PURE__ */ n(Ve, { size: 20 }) })
3157
3704
  ] })
3158
3705
  ] });
3159
- }), Mi = j.memo(function({
3160
- agent: t,
3161
- language: n,
3162
- languages: s,
3163
- chatKind: o,
3164
- messages: a,
3165
- onLanguageChange: r,
3706
+ }), Vn = D.memo(function({
3707
+ agent: a,
3708
+ language: t,
3709
+ languages: o,
3710
+ chatKind: r,
3711
+ messages: i,
3712
+ onLanguageChange: s,
3166
3713
  onMinimize: d,
3167
3714
  onStartNewVoice: c,
3168
3715
  onStartNewText: l,
3169
3716
  isVoiceSetupLoading: m = !1,
3170
3717
  visualViewportHeight: u,
3171
3718
  rating: h,
3172
- endedBy: y,
3719
+ endedBy: F,
3173
3720
  sessionId: k,
3174
- ratingInteractive: b,
3175
- showTellUsMore: T,
3176
- onRate: z,
3721
+ ratingInteractive: v,
3722
+ showTellUsMore: z,
3723
+ onRate: E,
3177
3724
  onTellUsMore: g
3178
3725
  }) {
3179
- const C = he(u), f = k && t.widget?.behavior?.post_chat_rating_enabled ? /* @__PURE__ */ i(
3180
- vi,
3726
+ const b = he(u), p = k && a.widget?.behavior?.post_chat_rating_enabled ? /* @__PURE__ */ n(
3727
+ xn,
3181
3728
  {
3182
- language: n,
3729
+ language: t,
3183
3730
  rating: h,
3184
- endedBy: y,
3731
+ endedBy: F,
3185
3732
  sessionId: k,
3186
- interactive: b,
3187
- showTellUsMore: T,
3188
- onRate: z,
3733
+ interactive: v,
3734
+ showTellUsMore: z,
3735
+ onRate: E,
3189
3736
  onTellUsMore: g
3190
3737
  }
3191
- ) : null, M = o === "voice" || o === "text_and_voice", N = o === "text" || o === "text_and_voice", P = /* @__PURE__ */ p("div", { className: "rqmii-chat-topbar-actions rqmii-chat-topbar-actions--ended", children: [
3192
- /* @__PURE__ */ i(Ne, { language: n, languages: s, onChange: r }),
3193
- /* @__PURE__ */ i(
3738
+ ) : null, x = r === "voice" || r === "text_and_voice", S = r === "text" || r === "text_and_voice", M = /* @__PURE__ */ f("div", { className: "rqmii-chat-topbar-actions rqmii-chat-topbar-actions--ended", children: [
3739
+ /* @__PURE__ */ n(Ne, { language: t, languages: o, onChange: s }),
3740
+ /* @__PURE__ */ n(
3194
3741
  "button",
3195
3742
  {
3196
3743
  type: "button",
3197
3744
  className: "rqmii-chat-circle-button",
3198
3745
  onClick: d,
3199
- "aria-label": x(n, "minimize"),
3200
- children: /* @__PURE__ */ i(Te, { size: 20 })
3746
+ "aria-label": T(t, "minimize"),
3747
+ children: /* @__PURE__ */ n(Te, { size: 20 })
3201
3748
  }
3202
3749
  ),
3203
- M && /* @__PURE__ */ i(
3750
+ x && /* @__PURE__ */ n(
3204
3751
  "button",
3205
3752
  {
3206
3753
  type: "button",
3207
3754
  className: "rqmii-chat-circle-button rqmii-chat-circle-button--call-start",
3208
3755
  onClick: c,
3209
3756
  disabled: m,
3210
- "aria-label": x(n, "startVoice"),
3211
- children: m ? /* @__PURE__ */ i(ye, { className: "rqmii-chat-spin", size: 20 }) : /* @__PURE__ */ i(je, { size: 20 })
3757
+ "aria-label": T(t, "startVoice"),
3758
+ children: m ? /* @__PURE__ */ n(ye, { className: "rqmii-chat-spin", size: 20 }) : /* @__PURE__ */ n(Ie, { size: 20 })
3212
3759
  }
3213
3760
  )
3214
3761
  ] });
3215
- return o === "voice" ? /* @__PURE__ */ p("div", { className: V("rqmii-chat-panel rqmii-chat-panel--voice-call", H(n)), style: C, children: [
3216
- /* @__PURE__ */ p("div", { className: "rqmii-chat-topbar", children: [
3217
- /* @__PURE__ */ i("span", {}),
3218
- P
3762
+ return r === "voice" ? /* @__PURE__ */ f("div", { className: j("rqmii-chat-panel rqmii-chat-panel--voice-call", H(t)), style: b, children: [
3763
+ /* @__PURE__ */ f("div", { className: "rqmii-chat-topbar", children: [
3764
+ /* @__PURE__ */ n("span", {}),
3765
+ M
3219
3766
  ] }),
3220
- /* @__PURE__ */ p("div", { className: "rqmii-chat-voice-frame", children: [
3221
- /* @__PURE__ */ i(J, { agent: t, size: "hero" }),
3222
- /* @__PURE__ */ i("div", { className: "rqmii-chat-agent-name", children: t.name }),
3223
- f
3767
+ /* @__PURE__ */ f("div", { className: "rqmii-chat-voice-frame", children: [
3768
+ /* @__PURE__ */ n(J, { agent: a, size: "hero" }),
3769
+ /* @__PURE__ */ n("div", { className: "rqmii-chat-agent-name", children: a.name }),
3770
+ p
3224
3771
  ] }),
3225
- /* @__PURE__ */ i(re, { language: n, agent: t })
3226
- ] }) : /* @__PURE__ */ p("div", { className: V("rqmii-chat-panel rqmii-chat-panel--conversation", H(n)), style: C, children: [
3227
- /* @__PURE__ */ p("div", { className: "rqmii-chat-topbar", children: [
3228
- /* @__PURE__ */ i(J, { agent: t, size: "header" }),
3229
- P
3772
+ /* @__PURE__ */ n(le, { language: t, agent: a })
3773
+ ] }) : /* @__PURE__ */ f("div", { className: j("rqmii-chat-panel rqmii-chat-panel--conversation", H(t)), style: b, children: [
3774
+ /* @__PURE__ */ f("div", { className: "rqmii-chat-topbar", children: [
3775
+ /* @__PURE__ */ n(J, { agent: a, size: "header" }),
3776
+ M
3230
3777
  ] }),
3231
- /* @__PURE__ */ i(Re, { messages: a, language: n }),
3232
- f,
3233
- N && /* @__PURE__ */ i(xe, { language: n, onSend: l }),
3234
- /* @__PURE__ */ i(re, { language: n, agent: t })
3778
+ /* @__PURE__ */ n(_e, { messages: i, language: t }),
3779
+ p,
3780
+ S && /* @__PURE__ */ n(Ee, { language: t, onSend: l }),
3781
+ /* @__PURE__ */ n(le, { language: t, agent: a })
3235
3782
  ] });
3236
- }), dt = j.memo(function({ agent: t, language: n, onClose: s }) {
3237
- const { streamingUrl: o, isCloudStreamConnected: a, cloudStreamError: r } = Ke(), { isAvatarSpeaking: d } = Ke(), { messages: c, sendTextMessage: l } = ue();
3238
- return /* @__PURE__ */ p("div", { className: V("rqmii-avatar-panel", H(n)), children: [
3239
- /* @__PURE__ */ p("div", { className: "rqmii-avatar-stream", children: [
3240
- /* @__PURE__ */ i(j.Suspense, { fallback: /* @__PURE__ */ i("div", { className: "rqmii-avatar-overlay", children: x(n, "loading") }), children: /* @__PURE__ */ i(zi, { autoConnect: !0, muted: !1 }) }),
3241
- !o && /* @__PURE__ */ i("div", { className: "rqmii-avatar-overlay", children: x(n, "loading") }),
3242
- r && /* @__PURE__ */ i("div", { className: "rqmii-avatar-overlay", children: x(n, "connectionFailed") }),
3243
- /* @__PURE__ */ p("div", { className: "rqmii-avatar-controls", children: [
3244
- /* @__PURE__ */ i(J, { agent: t, size: "header", active: d }),
3245
- /* @__PURE__ */ i("div", { className: "rqmii-chat-header-spacer" }),
3246
- /* @__PURE__ */ i("button", { type: "button", className: "rqmii-chat-circle-button", disabled: !a, children: /* @__PURE__ */ i(ze, { size: 20 }) }),
3247
- /* @__PURE__ */ i("button", { type: "button", className: "rqmii-chat-circle-button is-danger", onClick: s, children: /* @__PURE__ */ i(_e, { size: 20 }) })
3783
+ }), ua = D.memo(function({ agent: a, language: t, onClose: o }) {
3784
+ const { streamingUrl: r, isCloudStreamConnected: i, cloudStreamError: s } = Ke(), { isAvatarSpeaking: d } = Ke(), { messages: c, sendTextMessage: l } = ue();
3785
+ return /* @__PURE__ */ f("div", { className: j("rqmii-avatar-panel", H(t)), children: [
3786
+ /* @__PURE__ */ f("div", { className: "rqmii-avatar-stream", children: [
3787
+ /* @__PURE__ */ n(D.Suspense, { fallback: /* @__PURE__ */ n("div", { className: "rqmii-avatar-overlay", children: T(t, "loading") }), children: /* @__PURE__ */ n(Mn, { autoConnect: !0, muted: !1 }) }),
3788
+ !r && /* @__PURE__ */ n("div", { className: "rqmii-avatar-overlay", children: T(t, "loading") }),
3789
+ s && /* @__PURE__ */ n("div", { className: "rqmii-avatar-overlay", children: T(t, "connectionFailed") }),
3790
+ /* @__PURE__ */ f("div", { className: "rqmii-avatar-controls", children: [
3791
+ /* @__PURE__ */ n(J, { agent: a, size: "header", active: d }),
3792
+ /* @__PURE__ */ n("div", { className: "rqmii-chat-header-spacer" }),
3793
+ /* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button", disabled: !i, children: /* @__PURE__ */ n(Fe, { size: 20 }) }),
3794
+ /* @__PURE__ */ n("button", { type: "button", className: "rqmii-chat-circle-button is-danger", onClick: o, children: /* @__PURE__ */ n(De, { size: 20 }) })
3248
3795
  ] })
3249
3796
  ] }),
3250
- t.useText && /* @__PURE__ */ p("div", { className: "rqmii-avatar-sidebar", children: [
3251
- /* @__PURE__ */ i(Re, { messages: c, language: n }),
3252
- /* @__PURE__ */ i(xe, { language: n, onSend: l, variant: "compact" }),
3253
- /* @__PURE__ */ i(re, { language: n, agent: t })
3797
+ a.useText && /* @__PURE__ */ f("div", { className: "rqmii-avatar-sidebar", children: [
3798
+ /* @__PURE__ */ n(_e, { messages: c, language: t }),
3799
+ /* @__PURE__ */ n(Ee, { language: t, onSend: l, variant: "compact" }),
3800
+ /* @__PURE__ */ n(le, { language: t, agent: a })
3254
3801
  ] })
3255
3802
  ] });
3256
3803
  });
3257
- function Pi({ language: e, config: t, onAccept: n, onDecline: s }) {
3258
- const o = t?.title?.[e] || x(e, "consentTitle"), a = t?.body?.[e] || x(e, "consentBody"), r = t?.acceptLabel?.[e] || x(e, "consentAccept"), d = t?.declineLabel?.[e] || x(e, "consentDecline"), c = t?.termsUrl?.[e], l = t?.privacyUrl?.[e];
3259
- return /* @__PURE__ */ p("div", { className: "rqmii-chat-panel rqmii-chat-panel--start", style: { justifyContent: "space-between" }, children: [
3260
- /* @__PURE__ */ p("div", { style: { flex: 1, display: "flex", flexDirection: "column", justifyContent: "center", padding: "24px", gap: "16px" }, children: [
3261
- /* @__PURE__ */ i("div", { style: { fontSize: "16px", fontWeight: 600, color: "var(--rqmii-text)" }, children: o }),
3262
- /* @__PURE__ */ p("div", { style: { fontSize: "13px", lineHeight: 1.5, color: "var(--rqmii-muted)" }, children: [
3263
- a,
3264
- (c || l) && /* @__PURE__ */ p("span", { children: [
3804
+ function In({ language: e, config: a, onAccept: t, onDecline: o }) {
3805
+ const r = a?.title?.[e] || T(e, "consentTitle"), i = a?.body?.[e] || T(e, "consentBody"), s = a?.acceptLabel?.[e] || T(e, "consentAccept"), d = a?.declineLabel?.[e] || T(e, "consentDecline"), c = a?.termsUrl?.[e], l = a?.privacyUrl?.[e];
3806
+ return /* @__PURE__ */ f("div", { className: "rqmii-chat-panel rqmii-chat-panel--start", style: { justifyContent: "space-between" }, children: [
3807
+ /* @__PURE__ */ f("div", { style: { flex: 1, display: "flex", flexDirection: "column", justifyContent: "center", padding: "24px", gap: "16px" }, children: [
3808
+ /* @__PURE__ */ n("div", { style: { fontSize: "16px", fontWeight: 600, color: "var(--rqmii-text)" }, children: r }),
3809
+ /* @__PURE__ */ f("div", { style: { fontSize: "13px", lineHeight: 1.5, color: "var(--rqmii-muted)" }, children: [
3810
+ i,
3811
+ (c || l) && /* @__PURE__ */ f("span", { children: [
3265
3812
  " ",
3266
- c && /* @__PURE__ */ i("a", { href: c, target: "_blank", rel: "noopener noreferrer", style: { color: "var(--rqmii-action)", textDecoration: "underline" }, children: x(e, "consentTermsLink") }),
3267
- c && l && /* @__PURE__ */ p("span", { children: [
3813
+ c && /* @__PURE__ */ n("a", { href: c, target: "_blank", rel: "noopener noreferrer", style: { color: "var(--rqmii-action)", textDecoration: "underline" }, children: T(e, "consentTermsLink") }),
3814
+ c && l && /* @__PURE__ */ f("span", { children: [
3268
3815
  " ",
3269
- x(e, "close")?.toLowerCase() === "close" ? "and" : "و",
3816
+ T(e, "close")?.toLowerCase() === "close" ? "and" : "و",
3270
3817
  " "
3271
3818
  ] }),
3272
- l && /* @__PURE__ */ i("a", { href: l, target: "_blank", rel: "noopener noreferrer", style: { color: "var(--rqmii-action)", textDecoration: "underline" }, children: x(e, "consentPrivacyLink") }),
3819
+ l && /* @__PURE__ */ n("a", { href: l, target: "_blank", rel: "noopener noreferrer", style: { color: "var(--rqmii-action)", textDecoration: "underline" }, children: T(e, "consentPrivacyLink") }),
3273
3820
  "."
3274
3821
  ] })
3275
3822
  ] })
3276
3823
  ] }),
3277
- /* @__PURE__ */ p("div", { style: { display: "flex", justifyContent: "flex-end", gap: "12px", padding: "0 24px 24px" }, children: [
3278
- /* @__PURE__ */ i(
3824
+ /* @__PURE__ */ f("div", { style: { display: "flex", justifyContent: "flex-end", gap: "12px", padding: "0 24px 24px" }, children: [
3825
+ /* @__PURE__ */ n(
3279
3826
  "button",
3280
3827
  {
3281
3828
  type: "button",
3282
3829
  className: "rqmii-chat-pill",
3283
- onClick: s,
3830
+ onClick: o,
3284
3831
  style: { background: "transparent", border: "1px solid var(--rqmii-border)" },
3285
3832
  children: d
3286
3833
  }
3287
3834
  ),
3288
- /* @__PURE__ */ i(
3835
+ /* @__PURE__ */ n(
3289
3836
  "button",
3290
3837
  {
3291
3838
  type: "button",
3292
3839
  className: "rqmii-chat-pill",
3293
- onClick: n,
3840
+ onClick: t,
3294
3841
  style: { background: "#fff", color: "#000" },
3295
- children: r
3842
+ children: s
3296
3843
  }
3297
3844
  )
3298
3845
  ] })
3299
3846
  ] });
3300
3847
  }
3301
- function Li(e) {
3848
+ function Dn(e) {
3302
3849
  return e ? typeof e == "string" ? e : typeof e == "object" && typeof e.text == "string" ? e.text : "" : "";
3303
3850
  }
3304
- function Ai(e) {
3851
+ function qn(e) {
3305
3852
  return e === "text" || e === "voice" || e === "text_and_voice";
3306
3853
  }
3307
- const Be = j.memo(function({
3308
- agent: t,
3309
- language: n,
3310
- languages: s,
3311
- onLanguageChange: o = ae,
3312
- onEndSession: a = ae,
3313
- onMinimize: r,
3854
+ const Re = D.memo(function({
3855
+ agent: a,
3856
+ language: t,
3857
+ languages: o,
3858
+ onLanguageChange: r = ie,
3859
+ onEndSession: i = ie,
3860
+ onMinimize: s,
3314
3861
  messages: d,
3315
3862
  onSendMessage: c,
3316
3863
  isPreview: l = !1,
3317
3864
  chatKind: m,
3318
3865
  sdk: u,
3319
3866
  renderPanel: h,
3320
- messagesRef: y,
3867
+ messagesRef: F,
3321
3868
  initialText: k,
3322
- autoStartVoice: b
3869
+ autoStartVoice: v
3323
3870
  }) {
3324
- const [T, z] = v(!1), g = m || ve(t), [C, f] = v(() => g === "voice" && u.isSessionReady || g === "voice" && !!b), [M, N] = v(() => (g === "text" || g === "text_and_voice") && u.isSessionReady || !!k || g === "text_and_voice" && !!b), [P, E] = v(!1), [A, w] = v(!1), [S, D] = v(null), W = ti(g === "voice" && C || g === "text_and_voice" && M), _ = ni(), F = t.consent?.enabled && !T && !l, q = Ai(g), { events: O } = me();
3871
+ const [z, E] = y(!1), g = m || ve(a), [b, p] = y(() => g === "voice" && u.isSessionReady || g === "voice" && !!v), [x, S] = y(() => (g === "text" || g === "text_and_voice") && u.isSessionReady || !!k || g === "text_and_voice" && !!v), [M, P] = y(!1), [A, L] = y(!1), [C, V] = y(null), W = on(g === "voice" && b || g === "text_and_voice" && x), q = rn(), B = a.consent?.enabled && !z && !l, N = qn(g), { events: U } = me();
3325
3872
  I(() => {
3326
- if (!O) return;
3873
+ if (!U) return;
3327
3874
  const K = () => {
3328
- q && E(!0);
3875
+ N && nn() && P(!0);
3329
3876
  }, Z = () => {
3330
- q && E(!1);
3877
+ N && P(!1);
3331
3878
  };
3332
- return O.on("minimize_chat", K), O.on("maximize_chat", Z), () => {
3333
- O.off("minimize_chat", K), O.off("maximize_chat", Z);
3879
+ return U.on("minimize_chat", K), U.on("maximize_chat", Z), () => {
3880
+ U.off("minimize_chat", K), U.off("maximize_chat", Z);
3334
3881
  };
3335
- }, [O, q]);
3336
- const Y = () => z(!0), G = () => {
3337
- r ? r() : a();
3882
+ }, [U, N]);
3883
+ const O = () => E(!0), Q = () => {
3884
+ s ? s() : i();
3338
3885
  }, X = (K) => {
3339
- o(K), l || u.changeSessionLanguage(K);
3340
- }, ie = le((K) => {
3341
- if (D(null), w(!0), c) {
3886
+ r(K), l || u.changeSessionLanguage(K);
3887
+ }, ne = re((K) => {
3888
+ if (V(null), L(!0), c) {
3342
3889
  c(K);
3343
3890
  return;
3344
3891
  }
3345
3892
  u.sendTextMessage(K);
3346
3893
  }, [c, u]);
3347
3894
  I(() => {
3348
- y && (y.current = u.messages);
3895
+ F && (F.current = u.messages);
3349
3896
  });
3350
- const ee = R(!1);
3897
+ const ee = _(!1);
3351
3898
  I(() => {
3352
- ee.current || (k ? (ee.current = !0, ie(k)) : b && (ee.current = !0, D(null), w(!0), u.isVoiceActive || u.startVoice()));
3899
+ ee.current || (k ? (ee.current = !0, ne(k)) : v && (ee.current = !0, V(null), L(!0), u.isVoiceActive || u.startVoice()));
3353
3900
  }, []), I(() => {
3354
- A && u.isSessionReady && (w(!1), g === "voice" ? f(!0) : N(!0));
3901
+ A && u.isSessionReady && (L(!1), g === "voice" ? p(!0) : S(!0));
3355
3902
  }, [A, u.isSessionReady, g]), I(() => {
3356
- A && u.error && (w(!1), D(u.error));
3903
+ A && u.error && (L(!1), V(u.error));
3357
3904
  }, [A, u.error]);
3358
- const $ = le(() => {
3359
- D(null), w(!0), u.isVoiceActive || u.startVoice();
3905
+ const $ = re(() => {
3906
+ V(null), L(!0), u.isVoiceActive || u.startVoice();
3360
3907
  }, [u]);
3361
- if (u.error && !l && (M || C)) return /* @__PURE__ */ i(rt, { message: u.error, language: n, onClose: a });
3362
- if (F)
3363
- return /* @__PURE__ */ i(Pi, { language: n, config: t.consent, onAccept: Y, onDecline: G });
3364
- const B = {
3365
- agent: t,
3366
- language: n,
3367
- languages: s,
3908
+ if (u.error && !l && (x || b)) return /* @__PURE__ */ n(la, { message: u.error, language: t, onClose: i });
3909
+ if (B)
3910
+ return /* @__PURE__ */ n(In, { language: t, config: a.consent, onAccept: O, onDecline: Q });
3911
+ const R = {
3912
+ agent: a,
3913
+ language: t,
3914
+ languages: o,
3368
3915
  chatKind: g,
3369
3916
  sdk: u,
3370
3917
  isPreview: l,
3371
3918
  onLanguageChange: X,
3372
- onClose: a,
3373
- onMinimize: q ? () => E(!0) : void 0,
3374
- onRestore: q ? () => E(!1) : void 0,
3375
- onSend: ie,
3376
- voiceStarted: C,
3377
- conversationStarted: M,
3378
- isMinimized: P,
3919
+ onClose: i,
3920
+ onMinimize: N ? () => P(!0) : void 0,
3921
+ onRestore: N ? () => P(!1) : void 0,
3922
+ onSend: ne,
3923
+ voiceStarted: b,
3924
+ conversationStarted: x,
3925
+ isMinimized: M,
3379
3926
  elapsed: W,
3380
- setVoiceStarted: f,
3381
- setConversationStarted: N
3927
+ setVoiceStarted: p,
3928
+ setConversationStarted: S
3382
3929
  };
3383
- return h ? /* @__PURE__ */ i(Ve, { children: h(B) }) : /* @__PURE__ */ i(wi, { ...B, connecting: A, connectError: S, visualViewportHeight: _, onCloseWidget: r ?? a, initiateVoice: $, onSendSuggestion: (K) => {
3384
- D(null), w(!0), u.sendSuggestion?.(K);
3930
+ return h ? /* @__PURE__ */ n(Le, { children: h(R) }) : /* @__PURE__ */ n(Nn, { ...R, connecting: A, connectError: C, visualViewportHeight: q, onCloseWidget: s ?? i, initiateVoice: $, onSendSuggestion: (K) => {
3931
+ V(null), L(!0), u.sendSuggestion?.(K);
3385
3932
  } });
3386
- }), wi = j.memo(function({ agent: t, language: n, languages: s, chatKind: o, sdk: a, onLanguageChange: r, onClose: d, onMinimize: c, onRestore: l, onSend: m, voiceStarted: u, conversationStarted: h, isMinimized: y, elapsed: k, setVoiceStarted: b, setConversationStarted: T, visualViewportHeight: z, connecting: g = !1, connectError: C = null, onCloseWidget: f, initiateVoice: M, onSendSuggestion: N }) {
3387
- const P = t.widget?.behavior?.typing_indicator_enabled ?? !0, E = o === "text" ? a.waitingForResponse && P : !1, A = a.messages;
3388
- if (o === "avatar") return /* @__PURE__ */ i(dt, { agent: t, language: n, onClose: d });
3389
- if (y)
3390
- return /* @__PURE__ */ i(Si, { agent: t, language: n, onRestore: l, onClose: d, isListening: a.isVoiceActive, isAudioPlaying: a.isAudioPlaying, isSpeaking: a.vad.isSpeaking, onToggleVoice: a.toggleVoice, elapsed: k, visualViewportHeight: z, variant: o === "text" ? "text" : "voice" });
3391
- if (o === "voice" && u)
3392
- return /* @__PURE__ */ i(Ei, { agent: t, language: n, onEndSession: d, onMinimize: c, isListening: a.isVoiceActive, isLoading: a.vad.isLoading, isSpeaking: a.vad.isSpeaking, isAudioPlaying: a.isAudioPlaying, isAgentThinking: a.isAgentThinking, isAgentSpeaking: a.isAgentSpeaking, onToggleVoice: a.toggleVoice, elapsed: k, visualViewportHeight: z });
3393
- if (o === "voice")
3394
- return /* @__PURE__ */ i(xi, { agent: t, language: n, languages: s, onLanguageChange: r, onClose: f, isAudioPlaying: a.isAudioPlaying, isVoiceSetupLoading: a.isVoiceSetupLoading || g, onStartVoice: M, visualViewportHeight: z });
3395
- if (!h && (a.messages.length === 0 || g)) {
3396
- const w = t.conversation?.suggested_messages?.[n]?.filter((U) => U.trim()) || void 0, S = (U) => {
3397
- a.sendSuggestion ? N(U) : m?.(U);
3398
- }, D = o === "text_and_voice" || ve(t) === "text_and_voice";
3399
- return /* @__PURE__ */ i(Ti, { agent: t, language: n, languages: s, onLanguageChange: r, onClose: f, onSend: m, isVoiceEnabled: D, isAudioPlaying: a.isAudioPlaying, isVoiceSetupLoading: a.isVoiceSetupLoading || g, onStartVoice: M, visualViewportHeight: z, disabled: g, error: C || void 0, suggestions: w, onSuggestionClick: S, compact: !!w });
3933
+ }), Nn = D.memo(function({ agent: a, language: t, languages: o, chatKind: r, sdk: i, onLanguageChange: s, onClose: d, onMinimize: c, onRestore: l, onSend: m, voiceStarted: u, conversationStarted: h, isMinimized: F, elapsed: k, setVoiceStarted: v, setConversationStarted: z, visualViewportHeight: E, connecting: g = !1, connectError: b = null, onCloseWidget: p, initiateVoice: x, onSendSuggestion: S }) {
3934
+ const M = a.widget?.behavior?.typing_indicator_enabled ?? !0, P = r === "text" ? i.waitingForResponse && M : !1, A = i.messages;
3935
+ if (r === "avatar") return /* @__PURE__ */ n(ua, { agent: a, language: t, onClose: d });
3936
+ if (F)
3937
+ return /* @__PURE__ */ n(jn, { agent: a, language: t, onRestore: l, onClose: d, isListening: i.isVoiceActive, isAudioPlaying: i.isAudioPlaying, isSpeaking: i.vad.isSpeaking, onToggleVoice: i.toggleVoice, elapsed: k, visualViewportHeight: E, variant: r === "text" ? "text" : "voice" });
3938
+ if (r === "voice" && u)
3939
+ return /* @__PURE__ */ n(Ln, { agent: a, language: t, onEndSession: d, onMinimize: c, isListening: i.isVoiceActive, isLoading: i.vad.isLoading, isSpeaking: i.vad.isSpeaking, isAudioPlaying: i.isAudioPlaying, isAgentThinking: i.isAgentThinking, isAgentSpeaking: i.isAgentSpeaking, onToggleVoice: i.toggleVoice, elapsed: k, visualViewportHeight: E });
3940
+ if (r === "voice")
3941
+ return /* @__PURE__ */ n(wn, { agent: a, language: t, languages: o, onLanguageChange: s, onClose: p, isAudioPlaying: i.isAudioPlaying, isVoiceSetupLoading: i.isVoiceSetupLoading || g, onStartVoice: x, visualViewportHeight: E });
3942
+ if (!h && (i.messages.length === 0 || g)) {
3943
+ const L = a.conversation?.suggested_messages?.[t]?.filter((G) => G.trim()) || void 0, C = (G) => {
3944
+ i.sendSuggestion ? S(G) : m?.(G);
3945
+ }, V = r === "text_and_voice" || ve(a) === "text_and_voice";
3946
+ return /* @__PURE__ */ n(Cn, { agent: a, language: t, languages: o, onLanguageChange: s, onClose: p, onSend: m, isVoiceEnabled: V, isAudioPlaying: i.isAudioPlaying, isVoiceSetupLoading: i.isVoiceSetupLoading || g, onStartVoice: x, visualViewportHeight: E, disabled: g, error: b || void 0, suggestions: L, onSuggestionClick: C, compact: !!L });
3400
3947
  }
3401
- return /* @__PURE__ */ i(Ci, { agent: t, language: n, onEndSession: d, messages: A, partialTranscript: Li(a.partialTranscript), onSend: m, isAudioPlaying: a.isAudioPlaying, isVoiceEnabled: o === "text_and_voice", isListening: a.isVoiceActive, isSpeaking: a.vad.isSpeaking, isLoading: a.vad.isLoading, isAgentThinking: a.isAgentThinking, isAgentSpeaking: a.isAgentSpeaking, onToggleVoice: a.toggleVoice, onStartVoice: a.startVoice, onMinimize: c, elapsed: k, visualViewportHeight: z, waitingForResponse: E });
3402
- }), Vi = { isListening: !1, isLoading: !1, isSpeaking: !1, toggle: async () => !1 };
3403
- function ut({ isSessionReady: e, sendTextMessage: t, messages: n }) {
3404
- const [s, o] = v(null), [a, r] = v(null), d = le(() => {
3405
- o((c) => (c && (e ? t(c) : r(c)), null));
3406
- }, [e, t]);
3948
+ return /* @__PURE__ */ n(An, { agent: a, language: t, onEndSession: d, messages: A, partialTranscript: Dn(i.partialTranscript), onSend: m, isAudioPlaying: i.isAudioPlaying, isVoiceEnabled: r === "text_and_voice", isListening: i.isVoiceActive, isSpeaking: i.vad.isSpeaking, isLoading: i.vad.isLoading, isAgentThinking: i.isAgentThinking, isAgentSpeaking: i.isAgentSpeaking, onToggleVoice: i.toggleVoice, onStartVoice: i.startVoice, onMinimize: c, elapsed: k, visualViewportHeight: E, waitingForResponse: P });
3949
+ }), _n = { isListening: !1, isLoading: !1, isSpeaking: !1, toggle: async () => !1 };
3950
+ function ma({ isSessionReady: e, sendTextMessage: a, messages: t }) {
3951
+ const [o, r] = y(null), [i, s] = y(null), d = re(() => {
3952
+ r((c) => (c && (e ? a(c) : s(c)), null));
3953
+ }, [e, a]);
3407
3954
  return I(() => {
3408
- s && n.length !== 0 && d();
3409
- }, [n, s, d]), I(() => {
3410
- if (!s) return;
3955
+ o && t.length !== 0 && d();
3956
+ }, [t, o, d]), I(() => {
3957
+ if (!o) return;
3411
3958
  const c = setTimeout(d, 5e3);
3412
3959
  return () => clearTimeout(c);
3413
- }, [s, d]), I(() => {
3414
- !a || !e || (t(a), r(null));
3415
- }, [e, a, t]), { pendingWelcomeText: s, pendingMessage: a, setPendingWelcomeText: o, setPendingMessage: r, sendPendingWelcomeText: d };
3960
+ }, [o, d]), I(() => {
3961
+ !i || !e || (a(i), s(null));
3962
+ }, [e, i, a]), { pendingWelcomeText: o, pendingMessage: i, setPendingWelcomeText: r, setPendingMessage: s, sendPendingWelcomeText: d };
3416
3963
  }
3417
- function Fe({ isSessionReady: e, signalClientReady: t }) {
3418
- const [n, s] = v(!1), [o, a] = v(void 0), r = R(!1);
3964
+ function Be({ isSessionReady: e, signalClientReady: a }) {
3965
+ const [t, o] = y(!1), [r, i] = y(void 0), s = _(!1);
3419
3966
  return I(() => {
3420
- !e || r.current || !n || (r.current = !0, t(o), s(!1));
3421
- }, [e, n, o, t]), { emitClientReady: le((c) => {
3422
- e ? (r.current = !0, t(c)) : (a(c), s(!0));
3423
- }, [e, t]) };
3967
+ !e || s.current || !t || (s.current = !0, a(r), o(!1));
3968
+ }, [e, t, r, a]), { emitClientReady: re((c) => {
3969
+ e ? (s.current = !0, a(c)) : (i(c), o(!0));
3970
+ }, [e, a]) };
3424
3971
  }
3425
- const Di = 300;
3426
- function Ii(e) {
3427
- const { isPreview: t = !1, ...n } = e, { messages: s, sendTextMessage: o, emitUserMessage: a, addLocalMessage: r, clearMessages: d } = ue(), { changeSessionLanguage: c, clearSessionHistory: l, signalClientReady: m, error: u, isSessionReady: h, isAgentThinking: y, isAgentSpeaking: k } = me(), b = R(!1), T = R(null), z = R(!1), [g, C] = v(!1), [f, M] = v(null), [N, P] = v(!1), E = R(s.length);
3972
+ const Rn = 300;
3973
+ function Bn(e) {
3974
+ const { isPreview: a = !1, ...t } = e, { messages: o, sendTextMessage: r, emitUserMessage: i, addLocalMessage: s, clearMessages: d } = ue(), { changeSessionLanguage: c, clearSessionHistory: l, signalClientReady: m, error: u, isSessionReady: h, isAgentThinking: F, isAgentSpeaking: k } = me(), v = _(!1), z = _(null), E = _(!1), [g, b] = y(!1), [p, x] = y(null), [S, M] = y(!1), P = _(o.length);
3428
3975
  I(() => {
3429
- if (s.length > E.current) {
3430
- const _ = s[s.length - 1];
3431
- _.role === "assistant" && _.streaming && P(!1);
3976
+ if (o.length > P.current) {
3977
+ const q = o[o.length - 1];
3978
+ q.role === "assistant" && q.streaming && M(!1);
3432
3979
  }
3433
- E.current = s.length;
3434
- }, [s]), I(() => {
3435
- if (!h || !g || z.current) return;
3436
- const _ = T.current;
3437
- if (_ === null) return;
3438
- z.current = !0, T.current = null, r("user", _), M(null);
3439
- const F = e.agent.welcomeMessages?.[e.language];
3440
- m(F ? { welcomeMessage: F } : void 0);
3441
- const q = setTimeout(() => {
3442
- a(_), P(!0);
3443
- }, Di);
3444
- return () => clearTimeout(q);
3445
- }, [h, g, m, a, r]);
3446
- const A = ne(() => f ? [{ id: "first-user", role: "user", text: f }, ...s] : s, [f, s]), w = le(() => {
3447
- M(null), d();
3448
- }, [d]), S = {
3980
+ P.current = o.length;
3981
+ }, [o]), aa("message_rate_limited", re(() => {
3982
+ M(!1);
3983
+ }, [])), I(() => {
3984
+ if (!h || !g || E.current) return;
3985
+ const q = z.current;
3986
+ if (q === null) return;
3987
+ E.current = !0, z.current = null, s("user", q), x(null);
3988
+ const B = e.agent.welcomeMessages?.[e.language];
3989
+ m(B ? { welcomeMessage: B } : void 0);
3990
+ const N = setTimeout(() => {
3991
+ i(q), M(!0);
3992
+ }, Rn);
3993
+ return () => clearTimeout(N);
3994
+ }, [h, g, m, i, s]);
3995
+ const A = te(() => p ? [{ id: "first-user", role: "user", text: p }, ...o] : o, [p, o]), L = re(() => {
3996
+ x(null), d();
3997
+ }, [d]), C = {
3449
3998
  emitClientReady: m,
3450
- sendMessage: (_) => {
3451
- o(_);
3999
+ sendMessage: (q) => {
4000
+ r(q);
3452
4001
  },
3453
- queueForWelcome: ae,
3454
- enableVoice: ae,
3455
- disableVoice: ae,
4002
+ queueForWelcome: ie,
4003
+ enableVoice: ie,
4004
+ disableVoice: ie,
3456
4005
  language: e.language,
3457
4006
  isSessionReady: h,
3458
4007
  supportsVoice: !1,
3459
4008
  isVoiceActive: !1,
3460
4009
  chatKind: "text"
3461
- }, D = (_, F) => {
3462
- e.onSessionStart?.(), b.current ? (P(!0), F.sendMessage(_)) : (b.current = !0, M(_), T.current = _, C(!0), P(!0));
3463
- }, U = (_) => {
3464
- e.onTextSend ? e.onTextSend(_, S) : D(_, S);
4010
+ }, V = (q, B) => {
4011
+ e.onSessionStart?.(), v.current ? (M(!0), B.sendMessage(q)) : (v.current = !0, x(q), z.current = q, b(!0), M(!0));
4012
+ }, G = (q) => {
4013
+ e.onTextSend ? e.onTextSend(q, C) : V(q, C);
3465
4014
  };
3466
- return /* @__PURE__ */ i(
3467
- Be,
4015
+ return /* @__PURE__ */ n(
4016
+ Re,
3468
4017
  {
3469
- ...n,
3470
- isPreview: t,
4018
+ ...t,
4019
+ isPreview: a,
3471
4020
  chatKind: "text",
3472
4021
  sdk: {
3473
4022
  messages: A,
3474
- sendTextMessage: U,
3475
- clearMessages: w,
4023
+ sendTextMessage: G,
4024
+ clearMessages: L,
3476
4025
  clearSessionHistory: l,
3477
4026
  isAudioPlaying: !1,
3478
4027
  partialTranscript: null,
3479
4028
  changeSessionLanguage: c,
3480
4029
  error: u,
3481
- isAgentThinking: y,
4030
+ isAgentThinking: F,
3482
4031
  isAgentSpeaking: k,
3483
4032
  isVoiceSetupLoading: !1,
3484
4033
  isVoiceActive: !1,
3485
4034
  isSessionReady: h,
3486
- vad: Vi,
3487
- startVoice: ae,
3488
- prepareVoice: ae,
3489
- toggleVoice: ae,
4035
+ vad: _n,
4036
+ startVoice: ie,
4037
+ prepareVoice: ie,
4038
+ toggleVoice: ie,
3490
4039
  signalClientReady: m,
3491
- waitingForResponse: N,
3492
- sendSuggestion: U
4040
+ waitingForResponse: S,
4041
+ sendSuggestion: G
3493
4042
  }
3494
4043
  }
3495
4044
  );
3496
4045
  }
3497
- function ji(e) {
3498
- const { isPreview: t = !1, ...n } = e, { messages: s, sendTextMessage: o, clearMessages: a } = ue(), { isAudioPlaying: r, partialTranscript: d } = tt(), { changeSessionLanguage: c, clearSessionHistory: l, signalClientReady: m, error: u, isSessionReady: h, isAgentThinking: y, isAgentSpeaking: k } = me(), { setPendingWelcomeText: b, setPendingMessage: T } = ut({ isSessionReady: h, sendTextMessage: o, messages: s }), { emitClientReady: z } = Fe({ isSessionReady: h, signalClientReady: m }), [g, C] = v(!1), f = nt({
4046
+ function Gn(e) {
4047
+ const { isPreview: a = !1, ...t } = e, { messages: o, sendTextMessage: r, clearMessages: i } = ue(), { isAudioPlaying: s, partialTranscript: d } = ta(), { changeSessionLanguage: c, clearSessionHistory: l, signalClientReady: m, error: u, isSessionReady: h, isAgentThinking: F, isAgentSpeaking: k } = me(), { setPendingWelcomeText: v, setPendingMessage: z } = ma({ isSessionReady: h, sendTextMessage: r, messages: o }), { emitClientReady: E } = Be({ isSessionReady: h, signalClientReady: m }), [g, b] = y(!1), p = na({
3499
4048
  enabled: !0,
3500
4049
  preloadStream: !1
3501
- }), { isLoading: M, isListening: N, toggle: P } = f, E = M, A = N || g;
4050
+ }), { isLoading: x, isListening: S, toggle: M } = p, P = x, A = S || g;
3502
4051
  I(() => {
3503
- !g || !h || M || N || P();
3504
- }, [g, h, M, N, P]);
3505
- const w = () => {
4052
+ !g || !h || x || S || M();
4053
+ }, [g, h, x, S, M]);
4054
+ const L = () => {
3506
4055
  e.onSessionStart?.();
3507
- }, S = {
3508
- emitClientReady: z,
3509
- sendMessage: (q) => {
3510
- h ? o(q) : T(q);
4056
+ }, C = {
4057
+ emitClientReady: E,
4058
+ sendMessage: (N) => {
4059
+ h ? r(N) : z(N);
3511
4060
  },
3512
- queueForWelcome: (q) => b(q),
3513
- enableVoice: () => C(!0),
4061
+ queueForWelcome: (N) => v(N),
4062
+ enableVoice: () => b(!0),
3514
4063
  disableVoice: () => {
3515
- C(!1), N && P();
4064
+ b(!1), S && M();
3516
4065
  },
3517
4066
  language: e.language,
3518
4067
  isSessionReady: h,
3519
4068
  supportsVoice: !0,
3520
4069
  isVoiceActive: A,
3521
4070
  chatKind: "voice"
3522
- }, D = (q) => {
3523
- w(), q.enableVoice();
3524
- const O = e.agent.welcomeMessages?.[e.language];
3525
- q.emitClientReady(O ? { welcomeMessage: O } : void 0);
3526
- }, U = (q) => {
3527
- q.isVoiceActive ? q.disableVoice() : q.enableVoice();
4071
+ }, V = (N) => {
4072
+ L(), N.enableVoice();
4073
+ const U = e.agent.welcomeMessages?.[e.language];
4074
+ N.emitClientReady(U ? { welcomeMessage: U } : void 0);
4075
+ }, G = (N) => {
4076
+ N.isVoiceActive ? N.disableVoice() : N.enableVoice();
3528
4077
  };
3529
- return /* @__PURE__ */ i(
3530
- Be,
4078
+ return /* @__PURE__ */ n(
4079
+ Re,
3531
4080
  {
3532
- ...n,
3533
- isPreview: t,
4081
+ ...t,
4082
+ isPreview: a,
3534
4083
  chatKind: "voice",
3535
4084
  sdk: {
3536
- messages: s,
4085
+ messages: o,
3537
4086
  sendTextMessage: () => {
3538
4087
  },
3539
- clearMessages: a,
4088
+ clearMessages: i,
3540
4089
  clearSessionHistory: l,
3541
- isAudioPlaying: r,
4090
+ isAudioPlaying: s,
3542
4091
  partialTranscript: d,
3543
4092
  changeSessionLanguage: c,
3544
4093
  error: u,
3545
- isAgentThinking: y,
4094
+ isAgentThinking: F,
3546
4095
  isAgentSpeaking: k,
3547
- isVoiceSetupLoading: E,
4096
+ isVoiceSetupLoading: P,
3548
4097
  isVoiceActive: A,
3549
4098
  isSessionReady: h,
3550
- vad: f,
4099
+ vad: p,
3551
4100
  startVoice: () => {
3552
- e.onVoiceStart ? e.onVoiceStart(S) : D(S);
4101
+ e.onVoiceStart ? e.onVoiceStart(C) : V(C);
3553
4102
  },
3554
4103
  prepareVoice: () => {
3555
4104
  },
3556
4105
  toggleVoice: () => {
3557
- e.onVoiceToggle ? e.onVoiceToggle(S) : U(S);
4106
+ e.onVoiceToggle ? e.onVoiceToggle(C) : G(C);
3558
4107
  },
3559
4108
  signalClientReady: m
3560
4109
  }
3561
4110
  }
3562
4111
  );
3563
4112
  }
3564
- const _i = 300;
3565
- function qi(e) {
3566
- const { isPreview: t = !1, ...n } = e, { messages: s, sendTextMessage: o, emitUserMessage: a, addLocalMessage: r, clearMessages: d } = ue(), { isAudioPlaying: c, partialTranscript: l } = tt(), { changeSessionLanguage: m, clearSessionHistory: u, signalClientReady: h, error: y, isSessionReady: k, isAgentThinking: b, isAgentSpeaking: T } = me(), { emitClientReady: z } = Fe({ isSessionReady: k, signalClientReady: h }), [g, C] = v(!1), f = R(null), [M, N] = v(!1), P = R(null), [E, A] = v(!1), w = R(!1), S = R(!1), D = R(!1), [U, W] = v(null), [_, F] = v(!1), q = R(s.length);
4113
+ const Un = 300;
4114
+ function Kn(e) {
4115
+ const { isPreview: a = !1, ...t } = e, { messages: o, sendTextMessage: r, emitUserMessage: i, addLocalMessage: s, clearMessages: d } = ue(), { isAudioPlaying: c, partialTranscript: l } = ta(), { changeSessionLanguage: m, clearSessionHistory: u, signalClientReady: h, error: F, isSessionReady: k, isAgentThinking: v, isAgentSpeaking: z } = me(), { emitClientReady: E } = Be({ isSessionReady: k, signalClientReady: h }), [g, b] = y(!1), p = _(null), [x, S] = y(!1), M = _(null), [P, A] = y(!1), L = _(!1), C = _(!1), V = _(!1), [G, W] = y(null), [q, B] = y(!1), N = _(o.length);
3567
4116
  I(() => {
3568
- if (s.length > q.current) {
3569
- const L = s[s.length - 1];
3570
- L.role === "assistant" && L.streaming && F(!1);
4117
+ if (o.length > N.current) {
4118
+ const w = o[o.length - 1];
4119
+ w.role === "assistant" && w.streaming && B(!1);
3571
4120
  }
3572
- q.current = s.length;
3573
- }, [s]);
3574
- const O = nt({
4121
+ N.current = o.length;
4122
+ }, [o]), aa("message_rate_limited", re(() => {
4123
+ B(!1);
4124
+ }, []));
4125
+ const U = na({
3575
4126
  enabled: !0,
3576
4127
  preloadStream: !1
3577
- }), { isLoading: Y, isListening: G, toggle: X } = O, ie = Y, ee = G || g;
4128
+ }), { isLoading: O, isListening: Q, toggle: X } = U, ne = O, ee = Q || g;
3578
4129
  I(() => {
3579
- !g || !k || Y || G || X();
3580
- }, [g, k, Y, G, X]), I(() => {
3581
- if (!k || !M || D.current) return;
3582
- const L = f.current;
3583
- if (L === null) return;
3584
- D.current = !0, f.current = null, r("user", L), W(null);
3585
- const te = e.agent.welcomeMessages?.[e.language];
3586
- h(te ? { welcomeMessage: te } : void 0);
3587
- const Se = setTimeout(() => {
3588
- a(L), F(!0);
3589
- }, _i);
3590
- return () => clearTimeout(Se);
3591
- }, [k, M, h, a, r]), I(() => {
3592
- if (!k || !E || w.current) return;
3593
- const L = P.current;
3594
- L !== null && (w.current = !0, P.current = null, r("user", L), a(L), F(!0), A(!1));
3595
- }, [k, E, a, r]);
3596
- const $ = ne(() => U ? [{ id: "first-user", role: "user", text: U }, ...s] : s, [U, s]), B = le(() => {
3597
- W(null), S.current = !1, D.current = !1, d();
4130
+ !g || !k || O || Q || X();
4131
+ }, [g, k, O, Q, X]), I(() => {
4132
+ if (!k || !x || V.current) return;
4133
+ const w = p.current;
4134
+ if (w === null) return;
4135
+ V.current = !0, p.current = null, s("user", w), W(null);
4136
+ const ae = e.agent.welcomeMessages?.[e.language];
4137
+ h(ae ? { welcomeMessage: ae } : void 0);
4138
+ const xe = setTimeout(() => {
4139
+ i(w), B(!0);
4140
+ }, Un);
4141
+ return () => clearTimeout(xe);
4142
+ }, [k, x, h, i, s]), I(() => {
4143
+ if (!k || !P || L.current) return;
4144
+ const w = M.current;
4145
+ w !== null && (L.current = !0, M.current = null, s("user", w), i(w), B(!0), A(!1));
4146
+ }, [k, P, i, s]);
4147
+ const $ = te(() => G ? [{ id: "first-user", role: "user", text: G }, ...o] : o, [G, o]), R = re(() => {
4148
+ W(null), C.current = !1, V.current = !1, d();
3598
4149
  }, [d]), K = () => {
3599
4150
  e.onSessionStart?.();
3600
4151
  }, Z = {
3601
- emitClientReady: (L) => {
3602
- D.current = !0, S.current = !0, z(L);
4152
+ emitClientReady: (w) => {
4153
+ V.current = !0, C.current = !0, E(w);
3603
4154
  },
3604
- sendMessage: (L) => {
3605
- o(L);
4155
+ sendMessage: (w) => {
4156
+ r(w);
3606
4157
  },
3607
4158
  queueForWelcome: () => {
3608
4159
  },
3609
- enableVoice: () => C(!0),
4160
+ enableVoice: () => b(!0),
3610
4161
  disableVoice: () => {
3611
- C(!1), G && X();
4162
+ b(!1), Q && X();
3612
4163
  },
3613
4164
  language: e.language,
3614
4165
  isSessionReady: k,
3615
4166
  supportsVoice: !0,
3616
4167
  isVoiceActive: ee,
3617
4168
  chatKind: "text_and_voice"
3618
- }, ke = (L, te) => {
3619
- K(), !S.current && !D.current ? (S.current = !0, e.onStartText?.(), W(L), f.current = L, N(!0), F(!0)) : (S.current = !0, F(!0), te.sendMessage(L));
3620
- }, ce = (L) => {
3621
- K(), S.current = !0, D.current = !0, e.onStartVoice?.(), L.enableVoice();
3622
- const te = e.agent.welcomeMessages?.[e.language];
3623
- L.emitClientReady(te ? { welcomeMessage: te } : void 0);
3624
- }, fe = (L) => {
3625
- L.isVoiceActive ? L.disableVoice() : L.enableVoice();
3626
- }, Ee = {
4169
+ }, ke = (w, ae) => {
4170
+ K(), !C.current && !V.current ? (C.current = !0, e.onStartText?.(), W(w), p.current = w, S(!0), B(!0)) : (C.current = !0, B(!0), ae.sendMessage(w));
4171
+ }, ce = (w) => {
4172
+ K(), C.current = !0, V.current = !0, e.onStartVoice?.(), w.enableVoice();
4173
+ const ae = e.agent.welcomeMessages?.[e.language];
4174
+ w.emitClientReady(ae ? { welcomeMessage: ae } : void 0);
4175
+ }, fe = (w) => {
4176
+ w.isVoiceActive ? w.disableVoice() : w.enableVoice();
4177
+ }, Se = {
3627
4178
  messages: $,
3628
- sendTextMessage: (L) => {
3629
- e.onTextSend ? e.onTextSend(L, Z) : ke(L, Z);
4179
+ sendTextMessage: (w) => {
4180
+ e.onTextSend ? e.onTextSend(w, Z) : ke(w, Z);
3630
4181
  },
3631
- clearMessages: B,
4182
+ clearMessages: R,
3632
4183
  clearSessionHistory: u,
3633
4184
  isAudioPlaying: c,
3634
4185
  partialTranscript: l,
3635
4186
  changeSessionLanguage: m,
3636
- error: y,
3637
- isAgentThinking: b,
3638
- isAgentSpeaking: T,
3639
- isVoiceSetupLoading: ie,
4187
+ error: F,
4188
+ isAgentThinking: v,
4189
+ isAgentSpeaking: z,
4190
+ isVoiceSetupLoading: ne,
3640
4191
  isVoiceActive: ee,
3641
4192
  isSessionReady: k,
3642
- vad: O,
4193
+ vad: U,
3643
4194
  startVoice: () => {
3644
4195
  e.onVoiceStart ? e.onVoiceStart(Z) : ce(Z);
3645
4196
  },
@@ -3649,68 +4200,68 @@ function qi(e) {
3649
4200
  e.onVoiceToggle ? e.onVoiceToggle(Z) : fe(Z);
3650
4201
  },
3651
4202
  signalClientReady: h,
3652
- waitingForResponse: _,
3653
- sendSuggestion: (L) => {
3654
- K(), S.current = !0, D.current = !0, e.onStartVoice?.(), C(!0), P.current = L, A(!0);
4203
+ waitingForResponse: q,
4204
+ sendSuggestion: (w) => {
4205
+ K(), C.current = !0, V.current = !0, e.onStartVoice?.(), b(!0), M.current = w, A(!0);
3655
4206
  }
3656
4207
  };
3657
- return /* @__PURE__ */ i(
3658
- Be,
4208
+ return /* @__PURE__ */ n(
4209
+ Re,
3659
4210
  {
3660
- ...n,
3661
- isPreview: t,
4211
+ ...t,
4212
+ isPreview: a,
3662
4213
  chatKind: e.textOnly ? "text" : "text_and_voice",
3663
- sdk: Ee
4214
+ sdk: Se
3664
4215
  }
3665
4216
  );
3666
4217
  }
3667
- function Ni(e) {
3668
- const { isPreview: t = !1, agent: n, language: s, languages: o, onLanguageChange: a, onEndSession: r, onMinimize: d, messages: c, onSendMessage: l } = e, m = r || d || ae, { messages: u, sendTextMessage: h, clearMessages: y } = ue(), { changeSessionLanguage: k, clearSessionHistory: b, signalClientReady: T, error: z, isSessionReady: g, isAgentThinking: C, isAgentSpeaking: f } = me();
3669
- return ut({ isSessionReady: g, sendTextMessage: h, messages: u }), Fe({ isSessionReady: g, signalClientReady: T }), z && !t ? /* @__PURE__ */ i(rt, { message: z, language: s, onClose: m }) : /* @__PURE__ */ i(dt, { agent: n, language: s, onClose: m });
4218
+ function On(e) {
4219
+ const { isPreview: a = !1, agent: t, language: o, languages: r, onLanguageChange: i, onEndSession: s, onMinimize: d, messages: c, onSendMessage: l } = e, m = s || d || ie, { messages: u, sendTextMessage: h, clearMessages: F } = ue(), { changeSessionLanguage: k, clearSessionHistory: v, signalClientReady: z, error: E, isSessionReady: g, isAgentThinking: b, isAgentSpeaking: p } = me();
4220
+ return ma({ isSessionReady: g, sendTextMessage: h, messages: u }), Be({ isSessionReady: g, signalClientReady: z }), E && !a ? /* @__PURE__ */ n(la, { message: E, language: o, onClose: m }) : /* @__PURE__ */ n(ua, { agent: t, language: o, onClose: m });
3670
4221
  }
3671
- function Gi({ agent: e, defaultOpen: t = !1, className: n = "", preview: s = !1, ChatBoxComponent: o }) {
3672
- const [a, r] = j.useState(t), [d, c] = j.useState(e.defaultLanguage), l = ne(() => be(e.languages, e.defaultLanguage), [e.defaultLanguage, e.languages]);
3673
- return j.useEffect(() => {
4222
+ function ei({ agent: e, defaultOpen: a = !1, className: t = "", preview: o = !1, ChatBoxComponent: r }) {
4223
+ const [i, s] = D.useState(a), [d, c] = D.useState(e.defaultLanguage), l = te(() => be(e.languages, e.defaultLanguage), [e.defaultLanguage, e.languages]);
4224
+ return D.useEffect(() => {
3674
4225
  c(e.defaultLanguage);
3675
- }, [e.defaultLanguage]), /* @__PURE__ */ p("div", { className: V("rqmii-chat-surface", s && "is-preview", n), children: [
3676
- !a && /* @__PURE__ */ i(ot, { agent: e, onClick: () => r(!0), position: s ? "static" : "fixed" }),
3677
- a && /* @__PURE__ */ i(o, { agent: e, language: d, languages: l, onLanguageChange: c, onClose: () => r(!1), isPreview: s })
4226
+ }, [e.defaultLanguage]), /* @__PURE__ */ f("div", { className: j("rqmii-chat-surface", o && "is-preview", t), children: [
4227
+ !i && /* @__PURE__ */ n(sa, { agent: e, onClick: () => s(!0), position: o ? "static" : "fixed" }),
4228
+ i && /* @__PURE__ */ n(r, { agent: e, language: d, languages: l, onLanguageChange: c, onClose: () => s(!1), isPreview: o })
3678
4229
  ] });
3679
4230
  }
3680
- function Ri({ restUrl: e, identifier: t, fallbackAgent: n, withCredentials: s = !1, children: o, onError: a }) {
3681
- const [r, d] = v(() => n ? de(n) : null), [c, l] = v(null);
4231
+ function Yn({ restUrl: e, identifier: a, fallbackAgent: t, withCredentials: o = !1, children: r, onError: i }) {
4232
+ const [s, d] = y(() => t ? de(t) : null), [c, l] = y(null);
3682
4233
  return I(() => {
3683
- n && (d(de(n)), l(null));
3684
- }, [n]), I(() => {
3685
- if (!t || n) return;
4234
+ t && (d(de(t)), l(null));
4235
+ }, [t]), I(() => {
4236
+ if (!a || t) return;
3686
4237
  const m = new AbortController();
3687
- return l(null), Sn({ restUrl: e, identifier: t, withCredentials: s, signal: m.signal }).then(d).catch((u) => {
3688
- m.signal.aborted || (l(u), a?.(u));
4238
+ return l(null), Pt({ restUrl: e, identifier: a, withCredentials: o, signal: m.signal }).then(d).catch((u) => {
4239
+ m.signal.aborted || (l(u), i?.(u));
3689
4240
  }), () => m.abort();
3690
- }, [n, t, a, e, s]), c ? /* @__PURE__ */ i("div", { className: "rqmii-chat-panel rqmii-chat-panel--error", children: c.message || "Could not load agent" }) : r ? /* @__PURE__ */ i(Ve, { children: o(r) }) : /* @__PURE__ */ i("div", { className: "rqmii-chat-panel rqmii-chat-panel--error", children: "Loading" });
4241
+ }, [t, a, i, e, o]), c ? /* @__PURE__ */ n("div", { className: "rqmii-chat-panel rqmii-chat-panel--error", children: c.message || "Could not load agent" }) : s ? /* @__PURE__ */ n(Le, { children: r(s) }) : /* @__PURE__ */ n("div", { className: "rqmii-chat-panel rqmii-chat-panel--error", children: "Loading" });
3691
4242
  }
3692
- function we({ agent: e, language: t, languages: n, onLanguageChange: s, onEndSession: o, onMinimize: a, onStartText: r, onStartVoice: d, textOnly: c, messages: l, onSendMessage: m, isPreview: u, onSessionStart: h, initialText: y, autoStartVoice: k }) {
3693
- const b = ve(e), T = { agent: e, language: t, languages: n, onLanguageChange: s, onEndSession: o, onMinimize: a, messages: l, onSendMessage: m, isPreview: u, onSessionStart: h, initialText: y, autoStartVoice: k };
3694
- switch (b) {
4243
+ function Ae({ agent: e, language: a, languages: t, onLanguageChange: o, onEndSession: r, onMinimize: i, onStartText: s, onStartVoice: d, textOnly: c, messages: l, onSendMessage: m, isPreview: u, onSessionStart: h, initialText: F, autoStartVoice: k }) {
4244
+ const v = ve(e), z = { agent: e, language: a, languages: t, onLanguageChange: o, onEndSession: r, onMinimize: i, messages: l, onSendMessage: m, isPreview: u, onSessionStart: h, initialText: F, autoStartVoice: k };
4245
+ switch (v) {
3695
4246
  case "avatar":
3696
- return /* @__PURE__ */ i(Ni, { ...T });
4247
+ return /* @__PURE__ */ n(On, { ...z });
3697
4248
  case "voice":
3698
- return /* @__PURE__ */ i(ji, { ...T });
4249
+ return /* @__PURE__ */ n(Gn, { ...z });
3699
4250
  case "text_and_voice":
3700
- return /* @__PURE__ */ i(qi, { ...T, onStartText: r, onStartVoice: d, textOnly: c });
4251
+ return /* @__PURE__ */ n(Kn, { ...z, onStartText: s, onStartVoice: d, textOnly: c });
3701
4252
  case "text":
3702
4253
  default:
3703
- return /* @__PURE__ */ i(Ii, { ...T });
4254
+ return /* @__PURE__ */ n(Bn, { ...z });
3704
4255
  }
3705
4256
  }
3706
- function Bi({
4257
+ function Qn({
3707
4258
  agent: e,
3708
- language: t,
3709
- languages: n,
3710
- startMode: s,
3711
- directive: o,
3712
- open: a,
3713
- onOpen: r,
4259
+ language: a,
4260
+ languages: t,
4261
+ startMode: o,
4262
+ directive: r,
4263
+ open: i,
4264
+ onOpen: s,
3714
4265
  onLanguageChange: d,
3715
4266
  onMinimize: c,
3716
4267
  onStartNewSession: l,
@@ -3718,256 +4269,256 @@ function Bi({
3718
4269
  onStartText: u,
3719
4270
  onStartVoice: h
3720
4271
  }) {
3721
- const { connectionState: y, isConnected: k, isSessionTerminated: b, creditExhausted: T, session: z, endSession: g, submitFeedback: C, interrupt: f } = me(), { messages: M } = ue(), N = R(!1), P = R(null), [E, A] = v(null), [w, S] = v(0), [D, U] = v(!1), [W, _] = v(!1), [F, q] = v(!1);
4272
+ const { connectionState: F, isConnected: k, isSessionTerminated: v, creditExhausted: z, session: E, endSession: g, submitFeedback: b, interrupt: p } = me(), { messages: x } = ue(), S = _(!1), M = _(null), [P, A] = y(null), [L, C] = y(0), [V, G] = y(!1), [W, q] = y(!1), [B, N] = y(!1);
3722
4273
  I(() => {
3723
- k && (N.current = !0);
4274
+ k && (S.current = !0);
3724
4275
  }, [k]), I(() => {
3725
- if (E) return;
3726
- let B = null;
3727
- b || y === "ended" ? B = P.current === "user" ? "user_ended" : "terminated" : y === "failed" ? T ? B = "credits_exhausted" : N.current ? B = "connection_lost" : B = "failed" : T && (B = "credits_exhausted"), B && A({
3728
- sessionId: z.sessionId,
3729
- endedBy: P.current ?? "agent",
3730
- reason: B
4276
+ if (P) return;
4277
+ let R = null;
4278
+ v || F === "ended" ? R = M.current === "user" ? "user_ended" : "terminated" : F === "failed" ? z ? R = "credits_exhausted" : S.current ? R = "connection_lost" : R = "failed" : z && (R = "credits_exhausted"), R && A({
4279
+ sessionId: E.sessionId,
4280
+ endedBy: M.current ?? "agent",
4281
+ reason: R
3731
4282
  });
3732
- }, [b, y, T, z.sessionId, E]);
3733
- const O = () => {
3734
- P.current = "user", f(), g();
3735
- }, Y = E?.sessionId ?? null, G = (B) => {
3736
- D || (S(B), Y && C({ sessionId: Y, rating: B, endedBy: E?.endedBy }).catch(() => {
3737
- }), F || (q(!0), _(!0)));
3738
- }, X = async (B) => {
3739
- if (Y)
4283
+ }, [v, F, z, E.sessionId, P]);
4284
+ const U = () => {
4285
+ M.current = "user", p(), g();
4286
+ }, O = P?.sessionId ?? null, Q = (R) => {
4287
+ V || (C(R), O && b({ sessionId: O, rating: R, endedBy: P?.endedBy }).catch(() => {
4288
+ }), B || (N(!0), q(!0)));
4289
+ }, X = async (R) => {
4290
+ if (O)
3740
4291
  try {
3741
- await C({ sessionId: Y, feedback: B, endedBy: E?.endedBy });
4292
+ await b({ sessionId: O, feedback: R, endedBy: P?.endedBy });
3742
4293
  } catch {
3743
4294
  }
3744
- U(!0), _(!1);
4295
+ G(!0), q(!1);
3745
4296
  };
3746
- if (!a)
3747
- return /* @__PURE__ */ i(ot, { agent: e, onClick: r, active: y === "connected" });
3748
- const ie = ve(e), ee = e.agentType === "cloud_avatar" || e.agentType === "desktop_avatar", $ = s === "text";
3749
- return ee ? /* @__PURE__ */ i(
3750
- we,
4297
+ if (!i)
4298
+ return /* @__PURE__ */ n(sa, { agent: e, onClick: s, active: F === "connected" });
4299
+ const ne = ve(e), ee = e.agentType === "cloud_avatar" || e.agentType === "desktop_avatar", $ = o === "text";
4300
+ return ee ? /* @__PURE__ */ n(
4301
+ Ae,
3751
4302
  {
3752
4303
  agent: e,
3753
- language: t,
3754
- languages: n,
4304
+ language: a,
4305
+ languages: t,
3755
4306
  onLanguageChange: d,
3756
- onEndSession: O,
4307
+ onEndSession: U,
3757
4308
  onMinimize: c,
3758
4309
  onSessionStart: m,
3759
4310
  onStartText: u,
3760
4311
  onStartVoice: h,
3761
4312
  textOnly: $
3762
4313
  }
3763
- ) : E ? W && Y ? /* @__PURE__ */ i(
3764
- yi,
4314
+ ) : P ? W && O ? /* @__PURE__ */ n(
4315
+ Pn,
3765
4316
  {
3766
4317
  agent: e,
3767
- language: t,
3768
- rating: w,
3769
- onBack: () => _(!1),
4318
+ language: a,
4319
+ rating: L,
4320
+ onBack: () => q(!1),
3770
4321
  onMinimize: c,
3771
4322
  onSubmit: X
3772
4323
  }
3773
- ) : /* @__PURE__ */ i(
3774
- Mi,
4324
+ ) : /* @__PURE__ */ n(
4325
+ Vn,
3775
4326
  {
3776
4327
  agent: e,
3777
- language: t,
3778
- languages: n,
3779
- chatKind: ie === "avatar" ? "text" : ie,
3780
- messages: M,
4328
+ language: a,
4329
+ languages: t,
4330
+ chatKind: ne === "avatar" ? "text" : ne,
4331
+ messages: x,
3781
4332
  onLanguageChange: d,
3782
4333
  onMinimize: c,
3783
4334
  onStartNewVoice: () => l("voice"),
3784
- onStartNewText: (B) => l("text", B),
3785
- rating: w,
3786
- endedBy: E.endedBy,
3787
- sessionId: Y,
3788
- ratingInteractive: !D,
3789
- showTellUsMore: F && !D,
3790
- onRate: G,
3791
- onTellUsMore: () => _(!0)
4335
+ onStartNewText: (R) => l("text", R),
4336
+ rating: L,
4337
+ endedBy: P.endedBy,
4338
+ sessionId: O,
4339
+ ratingInteractive: !V,
4340
+ showTellUsMore: B && !V,
4341
+ onRate: Q,
4342
+ onTellUsMore: () => q(!0)
3792
4343
  }
3793
- ) : /* @__PURE__ */ i(
3794
- we,
4344
+ ) : /* @__PURE__ */ n(
4345
+ Ae,
3795
4346
  {
3796
4347
  agent: e,
3797
- language: t,
3798
- languages: n,
4348
+ language: a,
4349
+ languages: t,
3799
4350
  onLanguageChange: d,
3800
- onEndSession: O,
4351
+ onEndSession: U,
3801
4352
  onMinimize: c,
3802
4353
  onSessionStart: m,
3803
4354
  onStartText: u,
3804
4355
  onStartVoice: h,
3805
4356
  textOnly: $,
3806
- initialText: o?.mode === "text" ? o.text : void 0,
3807
- autoStartVoice: o?.mode === "voice"
4357
+ initialText: r?.mode === "text" ? r.text : void 0,
4358
+ autoStartVoice: r?.mode === "voice"
3808
4359
  }
3809
4360
  );
3810
4361
  }
3811
- function Hi({ wsUrl: e, restUrl: t, publicChatId: n, apiKey: s, agentId: o, agent: a, language: r, defaultOpen: d = !1, open: c, className: l = "", pcmOptions: m, debug: u = !1, withCredentials: h = !1, onError: y, onInitialized: k, config: b, clientTools: T, onMinimize: z, onOpen: g }) {
3812
- if ([!!n, !!s, !!o].filter(Boolean).length > 1)
4362
+ function ai({ wsUrl: e, restUrl: a, publicChatId: t, apiKey: o, agentId: r, agent: i, language: s, defaultOpen: d = !1, open: c, className: l = "", pcmOptions: m, debug: u = !1, withCredentials: h = !1, onError: F, onInitialized: k, config: v, clientTools: z, onMinimize: E, onOpen: g }) {
4363
+ if ([!!t, !!o, !!r].filter(Boolean).length > 1)
3813
4364
  throw new Error("RqmiiAgentChat: only one of publicChatId, apiKey, or agentId may be provided");
3814
- return /* @__PURE__ */ i(Ri, { restUrl: t, identifier: n || s || o, fallbackAgent: a, withCredentials: h, onError: y, children: (M) => /* @__PURE__ */ i(
3815
- Fi,
4365
+ return /* @__PURE__ */ n(Yn, { restUrl: a, identifier: t || o || r, fallbackAgent: i, withCredentials: h, onError: F, children: (x) => /* @__PURE__ */ n(
4366
+ Hn,
3816
4367
  {
3817
4368
  wsUrl: e,
3818
- restUrl: t,
3819
- publicChatId: n,
3820
- apiKey: s,
3821
- agentId: o,
3822
- agent: M,
3823
- language: r,
4369
+ restUrl: a,
4370
+ publicChatId: t,
4371
+ apiKey: o,
4372
+ agentId: r,
4373
+ agent: x,
4374
+ language: s,
3824
4375
  defaultOpen: d,
3825
4376
  open: c,
3826
4377
  className: l,
3827
4378
  pcmOptions: m,
3828
4379
  debug: u,
3829
4380
  withCredentials: h,
3830
- onError: y,
4381
+ onError: F,
3831
4382
  onInitialized: k,
3832
- config: b,
3833
- clientTools: T,
3834
- onMinimize: z,
4383
+ config: v,
4384
+ clientTools: z,
4385
+ onMinimize: E,
3835
4386
  onOpen: g
3836
4387
  }
3837
4388
  ) });
3838
4389
  }
3839
- function Fi({ wsUrl: e, restUrl: t, publicChatId: n, apiKey: s, agentId: o, agent: a, language: r, defaultOpen: d, open: c, className: l, pcmOptions: m, debug: u, withCredentials: h, onError: y, onInitialized: k, config: b, clientTools: T, onMinimize: z, onOpen: g }) {
3840
- const [C, f] = v(d), M = c !== void 0 ? c : C, [N, P] = v(!1), [E, A] = v(r || a.defaultLanguage), [w, S] = v("idle"), [D, U] = v(0), [W, _] = v(null), [F, q] = v(!1), O = a.agentType === "cloud_avatar" || a.agentType === "desktop_avatar", Y = O, G = a.widget?.behavior, X = a.welcomeMessages?.[E] || "", ie = !M && !F && !Y && !!G?.welcome_bubble_enabled && !!X.trim(), ee = ne(() => be(a.languages, a.defaultLanguage), [a.defaultLanguage, a.languages]), $ = ne(() => w === "text" ? { ...b ?? {}, use_voice: !1, use_text: !0 } : b, [b, w]), B = ne(
3841
- () => Mn(a, $),
3842
- [a, $]
3843
- ), K = !Y && B.useVoice, Z = O ? M : N, ke = ne(() => ({
3844
- ...n ? { publicChatId: n } : {},
3845
- ...s ? { apiKey: s } : {},
3846
- ...o ? { agentId: o } : {},
3847
- language: E,
4390
+ function Hn({ wsUrl: e, restUrl: a, publicChatId: t, apiKey: o, agentId: r, agent: i, language: s, defaultOpen: d, open: c, className: l, pcmOptions: m, debug: u, withCredentials: h, onError: F, onInitialized: k, config: v, clientTools: z, onMinimize: E, onOpen: g }) {
4391
+ const [b, p] = y(d), x = c !== void 0 ? c : b, [S, M] = y(!1), [P, A] = y(s || i.defaultLanguage), [L, C] = y("idle"), [V, G] = y(0), [W, q] = y(null), [B, N] = y(!1), U = i.agentType === "cloud_avatar" || i.agentType === "desktop_avatar", O = U, Q = i.widget?.behavior, X = i.welcomeMessages?.[P] || "", ne = !x && !B && !O && !!Q?.welcome_bubble_enabled && !!X.trim(), ee = te(() => be(i.languages, i.defaultLanguage), [i.defaultLanguage, i.languages]), $ = te(() => L === "text" ? { ...v ?? {}, use_voice: !1, use_text: !0 } : v, [v, L]), R = te(
4392
+ () => Mt(i, $),
4393
+ [i, $]
4394
+ ), K = !O && R.useVoice, Z = U ? x : S, ke = te(() => ({
4395
+ ...t ? { publicChatId: t } : {},
4396
+ ...o ? { apiKey: o } : {},
4397
+ ...r ? { agentId: r } : {},
4398
+ language: P,
3848
4399
  config: $
3849
- }), [o, s, n, E, $]), ce = R(null), fe = R(!1), Ce = R(D), Ue = Ce.current !== D;
3850
- Ce.current = D, N && (!fe.current || Ue) && (ce.current = ke), fe.current = N, N || (ce.current = null);
3851
- const Oe = N && ce.current ? ce.current : ke;
4400
+ }), [r, o, t, P, $]), ce = _(null), fe = _(!1), ze = _(V), Ge = ze.current !== V;
4401
+ ze.current = V, S && (!fe.current || Ge) && (ce.current = ke), fe.current = S, S || (ce.current = null);
4402
+ const Ue = S && ce.current ? ce.current : ke;
3852
4403
  I(() => {
3853
- A(r || a.defaultLanguage);
3854
- }, [a.defaultLanguage, r]);
3855
- const Ee = ne(() => y ? (ge) => {
3856
- S("idle"), y(ge);
4404
+ A(s || i.defaultLanguage);
4405
+ }, [i.defaultLanguage, s]);
4406
+ const Se = te(() => F ? (ge) => {
4407
+ C("idle"), F(ge);
3857
4408
  } : (ge) => {
3858
- S("idle");
3859
- }, [y]), L = () => {
3860
- S("text"), P(!0);
3861
- }, te = () => {
3862
- S("voice"), P(!0);
3863
- }, Se = () => {
3864
- c === void 0 && f(!1), z?.();
3865
- }, mt = () => {
3866
- c === void 0 && f(!0), q(!0), g?.();
3867
- }, ht = (ge, gt) => {
3868
- _(ge === "text" ? { mode: "text", text: gt ?? "" } : { mode: "voice" }), S(ge), P(!0), U((pt) => pt + 1);
4409
+ C("idle");
4410
+ }, [F]), w = () => {
4411
+ C("text"), M(!0);
4412
+ }, ae = () => {
4413
+ C("voice"), M(!0);
4414
+ }, xe = () => {
4415
+ c === void 0 && p(!1), E?.();
4416
+ }, ha = () => {
4417
+ c === void 0 && p(!0), N(!0), g?.();
4418
+ }, ga = (ge, pa) => {
4419
+ q(ge === "text" ? { mode: "text", text: pa ?? "" } : { mode: "voice" }), C(ge), M(!0), G((ba) => ba + 1);
3869
4420
  };
3870
- return /* @__PURE__ */ i(
3871
- kt,
4421
+ return /* @__PURE__ */ n(
4422
+ va,
3872
4423
  {
3873
4424
  wsUrl: e,
3874
- restUrl: t,
3875
- session: Oe,
4425
+ restUrl: a,
4426
+ session: Ue,
3876
4427
  connect: Z,
3877
4428
  enableAudio: K,
3878
4429
  pcmOptions: m,
3879
4430
  debug: u,
3880
4431
  withCredentials: h,
3881
- onError: Ee,
4432
+ onError: Se,
3882
4433
  onInitialized: k,
3883
- clientTools: T,
3884
- children: /* @__PURE__ */ p("div", { className: V("rqmii-chat-surface", a.widget?.appearance?.position === "left" && "rqmii-position-left", l), dir: "ltr", children: [
3885
- ie && /* @__PURE__ */ i(
3886
- ri,
4434
+ clientTools: z,
4435
+ children: /* @__PURE__ */ f("div", { className: j("rqmii-chat-surface", i.widget?.appearance?.position === "left" && "rqmii-position-left", l), dir: "ltr", children: [
4436
+ ne && /* @__PURE__ */ n(
4437
+ un,
3887
4438
  {
3888
4439
  message: X,
3889
- delaySeconds: G?.welcome_bubble_delay_seconds ?? 3,
3890
- soundEnabled: !!G?.welcome_bubble_sound_enabled,
3891
- language: E,
3892
- buttonPosition: a.widget?.appearance?.position === "left" ? "left" : "right",
3893
- onClick: () => q(!0)
4440
+ delaySeconds: Q?.welcome_bubble_delay_seconds ?? 3,
4441
+ soundEnabled: !!Q?.welcome_bubble_sound_enabled,
4442
+ language: P,
4443
+ buttonPosition: i.widget?.appearance?.position === "left" ? "left" : "right",
4444
+ onClick: () => N(!0)
3894
4445
  }
3895
4446
  ),
3896
- /* @__PURE__ */ i(
3897
- Bi,
4447
+ /* @__PURE__ */ n(
4448
+ Qn,
3898
4449
  {
3899
- agent: a,
3900
- language: E,
4450
+ agent: i,
4451
+ language: P,
3901
4452
  languages: ee,
3902
- startMode: w,
4453
+ startMode: L,
3903
4454
  directive: W,
3904
- open: M,
3905
- onOpen: mt,
4455
+ open: x,
4456
+ onOpen: ha,
3906
4457
  onLanguageChange: A,
3907
- onMinimize: Se,
3908
- onStartNewSession: ht,
3909
- onSessionStart: () => P(!0),
3910
- onStartText: L,
3911
- onStartVoice: te
4458
+ onMinimize: xe,
4459
+ onStartNewSession: ga,
4460
+ onSessionStart: () => M(!0),
4461
+ onStartText: w,
4462
+ onStartVoice: ae
3912
4463
  }
3913
4464
  )
3914
4465
  ] })
3915
4466
  },
3916
- D
4467
+ V
3917
4468
  );
3918
4469
  }
3919
- function Wi({ agent: e, language: t, open: n = !0, className: s = "", messages: o, onSendMessage: a, onClose: r }) {
3920
- const d = ne(() => de(e), [e]), [c, l] = v(n), [m, u] = v(t || d.defaultLanguage), h = ne(() => be(d.languages, d.defaultLanguage), [d.defaultLanguage, d.languages]);
4470
+ function ti({ agent: e, language: a, open: t = !0, className: o = "", messages: r, onSendMessage: i, onClose: s }) {
4471
+ const d = te(() => de(e), [e]), [c, l] = y(t), [m, u] = y(a || d.defaultLanguage), h = te(() => be(d.languages, d.defaultLanguage), [d.defaultLanguage, d.languages]);
3921
4472
  return I(() => {
3922
- t && u(t);
3923
- }, [t]), I(() => {
3924
- l(n);
3925
- }, [n]), /* @__PURE__ */ i(bt, { wsUrl: "", restUrl: "", enableAudio: !1, children: /* @__PURE__ */ i("div", { className: V("rqmii-chat-surface is-preview", s), dir: "ltr", children: c ? /* @__PURE__ */ i(
3926
- we,
4473
+ a && u(a);
4474
+ }, [a]), I(() => {
4475
+ l(t);
4476
+ }, [t]), /* @__PURE__ */ n(fa, { wsUrl: "", restUrl: "", enableAudio: !1, children: /* @__PURE__ */ n("div", { className: j("rqmii-chat-surface is-preview", o), dir: "ltr", children: c ? /* @__PURE__ */ n(
4477
+ Ae,
3927
4478
  {
3928
4479
  agent: d,
3929
4480
  language: m,
3930
4481
  languages: h,
3931
4482
  onLanguageChange: u,
3932
4483
  onEndSession: () => {
3933
- l(!1), r?.();
4484
+ l(!1), s?.();
3934
4485
  },
3935
4486
  onMinimize: () => {
3936
- l(!1), r?.();
4487
+ l(!1), s?.();
3937
4488
  },
3938
- messages: o,
3939
- onSendMessage: a,
4489
+ messages: r,
4490
+ onSendMessage: i,
3940
4491
  isPreview: !0
3941
4492
  }
3942
4493
  ) : null }) });
3943
4494
  }
3944
4495
  export {
3945
- Pi as ConsentDialog,
3946
- Mi as EndedChatPanel,
3947
- Ji as EpicPixelStreamingPlayer,
3948
- yi as FeedbackPanel,
4496
+ In as ConsentDialog,
4497
+ Vn as EndedChatPanel,
4498
+ oi as EpicPixelStreamingPlayer,
4499
+ Pn as FeedbackPanel,
3949
4500
  Ze as RQMII_BUILTIN_FACES,
3950
- Le as RQMII_CHAT_LANGUAGES,
3951
- Ge as RQMII_CHAT_LANGUAGE_VALUES,
3952
- vi as RatingBar,
4501
+ Ce as RQMII_CHAT_LANGUAGES,
4502
+ Qe as RQMII_CHAT_LANGUAGE_VALUES,
4503
+ xn as RatingBar,
3953
4504
  J as RqmiiAgentAvatar,
3954
- Hi as RqmiiAgentChat,
3955
- Wi as RqmiiAgentChatPreview,
3956
- kt as RqmiiAgentRoom,
3957
- Ni as RqmiiAvatarChatBox,
3958
- re as RqmiiChatFooter,
3959
- ot as RqmiiChatOpenButton,
3960
- Gi as RqmiiChatSurface,
3961
- Xi as RqmiiCloudAvatarPlayer,
3962
- qi as RqmiiTextAndVoiceChatBox,
3963
- Ii as RqmiiTextChatBox,
3964
- ji as RqmiiVoiceChatBox,
3965
- Qi as fetchAgentConfig,
3966
- Sn as fetchAgentCustomization,
3967
- Yi as fetchPublicAgent,
3968
- ei as getBuiltinFace,
4505
+ ai as RqmiiAgentChat,
4506
+ ti as RqmiiAgentChatPreview,
4507
+ va as RqmiiAgentRoom,
4508
+ On as RqmiiAvatarChatBox,
4509
+ le as RqmiiChatFooter,
4510
+ sa as RqmiiChatOpenButton,
4511
+ ei as RqmiiChatSurface,
4512
+ ri as RqmiiCloudAvatarPlayer,
4513
+ Kn as RqmiiTextAndVoiceChatBox,
4514
+ Bn as RqmiiTextChatBox,
4515
+ Gn as RqmiiVoiceChatBox,
4516
+ Xn as fetchAgentConfig,
4517
+ Pt as fetchAgentCustomization,
4518
+ Jn as fetchPublicAgent,
4519
+ an as getBuiltinFace,
3969
4520
  He as getChatLanguage,
3970
- x as getChatText,
4521
+ T as getChatText,
3971
4522
  be as normalizeChatLanguages,
3972
4523
  de as normalizePublicAgent,
3973
4524
  ve as resolveChatKind