@kavchat/core 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +312 -145
- package/dist/index.d.ts +312 -145
- package/dist/index.js +487 -13
- package/dist/index.mjs +468 -13
- package/i18n/ar.json +30 -2
- package/i18n/de.json +30 -2
- package/i18n/en.json +30 -2
- package/i18n/es.json +30 -2
- package/i18n/fr.json +30 -2
- package/i18n/he.json +30 -2
- package/i18n/it.json +30 -2
- package/i18n/pt.json +30 -2
- package/i18n/ru.json +30 -2
- package/i18n/th.json +29 -1
- package/i18n/tr.json +30 -2
- package/package.json +1 -1
- package/test-vectors/live.json +1308 -0
package/dist/index.mjs
CHANGED
|
@@ -313,7 +313,35 @@ var en_default = {
|
|
|
313
313
|
"form.required": "Required",
|
|
314
314
|
"form.contactRequired": "Leave an email or a phone number so we can get back to you",
|
|
315
315
|
"form.emailInvalid": "Invalid email address",
|
|
316
|
-
"form.backToChat": "Back to chat"
|
|
316
|
+
"form.backToChat": "Back to chat",
|
|
317
|
+
"live.talk": "Talk to a representative",
|
|
318
|
+
"live.intro": "A representative will join shortly. Leave an email or a phone number in case we need to get back to you.",
|
|
319
|
+
"live.department": "Department",
|
|
320
|
+
"live.message": "Your message (optional)",
|
|
321
|
+
"live.start": "Start chat",
|
|
322
|
+
"live.connecting": "Connecting...",
|
|
323
|
+
"live.waiting": "Waiting for a representative",
|
|
324
|
+
"live.waitingLeft": "Waiting for a representative ({time})",
|
|
325
|
+
"live.leave": "Leave a message instead",
|
|
326
|
+
"live.end": "End chat",
|
|
327
|
+
"live.joined": "{name} joined the chat",
|
|
328
|
+
"live.with": "Chatting with {name}",
|
|
329
|
+
"live.agent": "Representative",
|
|
330
|
+
"live.typing": "Typing a reply...",
|
|
331
|
+
"live.ended": "The chat has ended",
|
|
332
|
+
"live.ticket": "We got your message and will get back to you soon.",
|
|
333
|
+
"live.timeout": "No representative was free in time, so we saved your chat as a request.",
|
|
334
|
+
"live.number": "Request #{number}",
|
|
335
|
+
"live.closed": "Our representatives are not available right now. Leave a message and we will get back to you.",
|
|
336
|
+
"live.closedUntil": "Our representatives are not available right now and will be back at {time}. Leave a message and we will get back to you.",
|
|
337
|
+
"live.busy": "All our representatives are busy right now. Leave a message and we will get back to you.",
|
|
338
|
+
"live.failed": "Message not sent. Tap to try again.",
|
|
339
|
+
"live.back": "Back to the bot",
|
|
340
|
+
"live.reconnecting": "Reconnecting...",
|
|
341
|
+
"live.tooLong": "Messages are limited to 2000 characters.",
|
|
342
|
+
"live.elsewhere": "You already have an open chat in another window.",
|
|
343
|
+
"live.replaced": "This chat continues in another window.",
|
|
344
|
+
"live.placeholder": "Type a message..."
|
|
317
345
|
};
|
|
318
346
|
|
|
319
347
|
// i18n/he.json
|
|
@@ -354,7 +382,35 @@ var he_default = {
|
|
|
354
382
|
"form.required": "\u05E9\u05D3\u05D4 \u05D7\u05D5\u05D1\u05D4",
|
|
355
383
|
"form.contactRequired": "\u05D4\u05E9\u05D0\u05D9\u05E8\u05D5 \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC \u05D0\u05D5 \u05D8\u05DC\u05E4\u05D5\u05DF \u05DB\u05D3\u05D9 \u05E9\u05E0\u05D5\u05DB\u05DC \u05DC\u05D7\u05D6\u05D5\u05E8 \u05D0\u05DC\u05D9\u05DB\u05DD",
|
|
356
384
|
"form.emailInvalid": "\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4",
|
|
357
|
-
"form.backToChat": "\u05D7\u05D6\u05E8\u05D4 \u05DC\u05E6'\u05D0\u05D8"
|
|
385
|
+
"form.backToChat": "\u05D7\u05D6\u05E8\u05D4 \u05DC\u05E6'\u05D0\u05D8",
|
|
386
|
+
"live.talk": "\u05E9\u05D9\u05D7\u05D4 \u05E2\u05DD \u05E0\u05E6\u05D9\u05D2",
|
|
387
|
+
"live.intro": "\u05E0\u05E6\u05D9\u05D2 \u05D9\u05E6\u05D8\u05E8\u05E3 \u05D1\u05E2\u05D5\u05D3 \u05E8\u05D2\u05E2. \u05D4\u05E9\u05D0\u05D9\u05E8\u05D5 \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC \u05D0\u05D5 \u05D8\u05DC\u05E4\u05D5\u05DF \u05DC\u05DE\u05E7\u05E8\u05D4 \u05E9\u05E0\u05E6\u05D8\u05E8\u05DA \u05DC\u05D7\u05D6\u05D5\u05E8 \u05D0\u05DC\u05D9\u05DB\u05DD.",
|
|
388
|
+
"live.department": "\u05DE\u05D7\u05DC\u05E7\u05D4",
|
|
389
|
+
"live.message": "\u05D4\u05D4\u05D5\u05D3\u05E2\u05D4 \u05E9\u05DC\u05DB\u05DD (\u05DC\u05D0 \u05D7\u05D5\u05D1\u05D4)",
|
|
390
|
+
"live.start": "\u05D4\u05EA\u05D7\u05DC\u05EA \u05E9\u05D9\u05D7\u05D4",
|
|
391
|
+
"live.connecting": "\u05DE\u05EA\u05D7\u05D1\u05E8\u05D9\u05DD...",
|
|
392
|
+
"live.waiting": "\u05DE\u05DE\u05EA\u05D9\u05E0\u05D9\u05DD \u05DC\u05E0\u05E6\u05D9\u05D2",
|
|
393
|
+
"live.waitingLeft": "\u05DE\u05DE\u05EA\u05D9\u05E0\u05D9\u05DD \u05DC\u05E0\u05E6\u05D9\u05D2 ({time})",
|
|
394
|
+
"live.leave": "\u05DC\u05D4\u05E9\u05D0\u05D9\u05E8 \u05D4\u05D5\u05D3\u05E2\u05D4 \u05D1\u05DE\u05E7\u05D5\u05DD",
|
|
395
|
+
"live.end": "\u05E1\u05D9\u05D5\u05DD \u05D4\u05E9\u05D9\u05D7\u05D4",
|
|
396
|
+
"live.joined": "\u05E2\u05DB\u05E9\u05D9\u05D5 \u05D1\u05E9\u05D9\u05D7\u05D4: {name}",
|
|
397
|
+
"live.with": "\u05D1\u05E9\u05D9\u05D7\u05D4 \u05E2\u05DD {name}",
|
|
398
|
+
"live.agent": "\u05E0\u05E6\u05D9\u05D2",
|
|
399
|
+
"live.typing": "\u05DE\u05E7\u05DC\u05D9\u05D3\u05D9\u05DD \u05EA\u05E9\u05D5\u05D1\u05D4...",
|
|
400
|
+
"live.ended": "\u05D4\u05E9\u05D9\u05D7\u05D4 \u05D4\u05E1\u05EA\u05D9\u05D9\u05DE\u05D4",
|
|
401
|
+
"live.ticket": "\u05E7\u05D9\u05D1\u05DC\u05E0\u05D5 \u05D0\u05EA \u05D4\u05D4\u05D5\u05D3\u05E2\u05D4 \u05D5\u05E0\u05D7\u05D6\u05D5\u05E8 \u05D0\u05DC\u05D9\u05DB\u05DD \u05D1\u05D4\u05E7\u05D3\u05DD.",
|
|
402
|
+
"live.timeout": "\u05D0\u05E3 \u05E0\u05E6\u05D9\u05D2 \u05DC\u05D0 \u05D4\u05EA\u05E4\u05E0\u05D4 \u05D1\u05D6\u05DE\u05DF, \u05D0\u05D6 \u05E9\u05DE\u05E8\u05E0\u05D5 \u05D0\u05EA \u05D4\u05E9\u05D9\u05D7\u05D4 \u05DB\u05E4\u05E0\u05D9\u05D9\u05D4.",
|
|
403
|
+
"live.number": "\u05E4\u05E0\u05D9\u05D9\u05D4 \u05DE\u05E1\u05E4\u05E8 {number}",
|
|
404
|
+
"live.closed": "\u05D4\u05E0\u05E6\u05D9\u05D2\u05D9\u05DD \u05DC\u05D0 \u05D6\u05DE\u05D9\u05E0\u05D9\u05DD \u05DB\u05E8\u05D2\u05E2. \u05D4\u05E9\u05D0\u05D9\u05E8\u05D5 \u05D4\u05D5\u05D3\u05E2\u05D4 \u05D5\u05E0\u05D7\u05D6\u05D5\u05E8 \u05D0\u05DC\u05D9\u05DB\u05DD.",
|
|
405
|
+
"live.closedUntil": "\u05D4\u05E0\u05E6\u05D9\u05D2\u05D9\u05DD \u05DC\u05D0 \u05D6\u05DE\u05D9\u05E0\u05D9\u05DD \u05DB\u05E8\u05D2\u05E2 \u05D5\u05D9\u05D7\u05D6\u05E8\u05D5 \u05D1-{time}. \u05D4\u05E9\u05D0\u05D9\u05E8\u05D5 \u05D4\u05D5\u05D3\u05E2\u05D4 \u05D5\u05E0\u05D7\u05D6\u05D5\u05E8 \u05D0\u05DC\u05D9\u05DB\u05DD.",
|
|
406
|
+
"live.busy": "\u05DB\u05DC \u05D4\u05E0\u05E6\u05D9\u05D2\u05D9\u05DD \u05E2\u05E1\u05D5\u05E7\u05D9\u05DD \u05DB\u05E8\u05D2\u05E2. \u05D4\u05E9\u05D0\u05D9\u05E8\u05D5 \u05D4\u05D5\u05D3\u05E2\u05D4 \u05D5\u05E0\u05D7\u05D6\u05D5\u05E8 \u05D0\u05DC\u05D9\u05DB\u05DD.",
|
|
407
|
+
"live.failed": "\u05D4\u05D4\u05D5\u05D3\u05E2\u05D4 \u05DC\u05D0 \u05E0\u05E9\u05DC\u05D7\u05D4. \u05D4\u05E7\u05D9\u05E9\u05D5 \u05DB\u05D3\u05D9 \u05DC\u05E0\u05E1\u05D5\u05EA \u05E9\u05D5\u05D1.",
|
|
408
|
+
"live.back": "\u05D7\u05D6\u05E8\u05D4 \u05DC\u05D1\u05D5\u05D8",
|
|
409
|
+
"live.reconnecting": "\u05DE\u05EA\u05D7\u05D1\u05E8\u05D9\u05DD \u05DE\u05D7\u05D3\u05E9...",
|
|
410
|
+
"live.tooLong": "\u05D0\u05E4\u05E9\u05E8 \u05DC\u05E9\u05DC\u05D5\u05D7 \u05E2\u05D3 2000 \u05EA\u05D5\u05D5\u05D9\u05DD \u05D1\u05D4\u05D5\u05D3\u05E2\u05D4.",
|
|
411
|
+
"live.elsewhere": "\u05DB\u05D1\u05E8 \u05D9\u05E9 \u05DC\u05DB\u05DD \u05E9\u05D9\u05D7\u05D4 \u05E4\u05EA\u05D5\u05D7\u05D4 \u05D1\u05D7\u05DC\u05D5\u05DF \u05D0\u05D7\u05E8.",
|
|
412
|
+
"live.replaced": "\u05D4\u05E9\u05D9\u05D7\u05D4 \u05DE\u05DE\u05E9\u05D9\u05DB\u05D4 \u05D1\u05D7\u05DC\u05D5\u05DF \u05D0\u05D7\u05E8.",
|
|
413
|
+
"live.placeholder": "\u05DB\u05EA\u05D1\u05D5 \u05D4\u05D5\u05D3\u05E2\u05D4..."
|
|
358
414
|
};
|
|
359
415
|
|
|
360
416
|
// i18n/ar.json
|
|
@@ -395,7 +451,35 @@ var ar_default = {
|
|
|
395
451
|
"form.required": "\u0645\u0637\u0644\u0648\u0628",
|
|
396
452
|
"form.contactRequired": "\u0627\u062A\u0631\u0643 \u0628\u0631\u064A\u062F\u064B\u0627 \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A\u064B\u0627 \u0623\u0648 \u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0644\u0646\u062A\u0645\u0643\u0646 \u0645\u0646 \u0627\u0644\u0631\u062F \u0639\u0644\u064A\u0643",
|
|
397
453
|
"form.emailInvalid": "\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0628\u0631\u064A\u062F \u0627\u0644\u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A \u063A\u064A\u0631 \u0635\u0627\u0644\u062D",
|
|
398
|
-
"form.backToChat": "\u0627\u0644\u0639\u0648\u062F\u0629 \u0625\u0644\u0649 \u0627\u0644\u0645\u062D\u0627\u062F\u062B\u0629"
|
|
454
|
+
"form.backToChat": "\u0627\u0644\u0639\u0648\u062F\u0629 \u0625\u0644\u0649 \u0627\u0644\u0645\u062D\u0627\u062F\u062B\u0629",
|
|
455
|
+
"live.talk": "\u0627\u0644\u062A\u062D\u062F\u062B \u0645\u0639 \u0645\u0645\u062B\u0644",
|
|
456
|
+
"live.intro": "\u0633\u064A\u0646\u0636\u0645 \u0645\u0645\u062B\u0644 \u0628\u0639\u062F \u0644\u062D\u0638\u0627\u062A. \u0627\u062A\u0631\u0643 \u0628\u0631\u064A\u062F\u064B\u0627 \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A\u064B\u0627 \u0623\u0648 \u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0641\u064A \u062D\u0627\u0644 \u0627\u062D\u062A\u062C\u0646\u0627 \u0625\u0644\u0649 \u0627\u0644\u0639\u0648\u062F\u0629 \u0625\u0644\u064A\u0643.",
|
|
457
|
+
"live.department": "\u0627\u0644\u0642\u0633\u0645",
|
|
458
|
+
"live.message": "\u0631\u0633\u0627\u0644\u062A\u0643 (\u0627\u062E\u062A\u064A\u0627\u0631\u064A)",
|
|
459
|
+
"live.start": "\u0628\u062F\u0621 \u0627\u0644\u0645\u062D\u0627\u062F\u062B\u0629",
|
|
460
|
+
"live.connecting": "\u062C\u0627\u0631\u064D \u0627\u0644\u0627\u062A\u0635\u0627\u0644...",
|
|
461
|
+
"live.waiting": "\u0641\u064A \u0627\u0646\u062A\u0638\u0627\u0631 \u0645\u0645\u062B\u0644",
|
|
462
|
+
"live.waitingLeft": "\u0641\u064A \u0627\u0646\u062A\u0638\u0627\u0631 \u0645\u0645\u062B\u0644 ({time})",
|
|
463
|
+
"live.leave": "\u0627\u062A\u0631\u0643 \u0631\u0633\u0627\u0644\u0629 \u0628\u062F\u0644\u064B\u0627 \u0645\u0646 \u0630\u0644\u0643",
|
|
464
|
+
"live.end": "\u0625\u0646\u0647\u0627\u0621 \u0627\u0644\u0645\u062D\u0627\u062F\u062B\u0629",
|
|
465
|
+
"live.joined": "\u0627\u0646\u0636\u0645 {name} \u0625\u0644\u0649 \u0627\u0644\u0645\u062D\u0627\u062F\u062B\u0629",
|
|
466
|
+
"live.with": "\u062A\u062A\u062D\u062F\u062B \u0645\u0639 {name}",
|
|
467
|
+
"live.agent": "\u0645\u0645\u062B\u0644",
|
|
468
|
+
"live.typing": "\u064A\u0643\u062A\u0628 \u0631\u062F\u064B\u0627...",
|
|
469
|
+
"live.ended": "\u0627\u0646\u062A\u0647\u062A \u0627\u0644\u0645\u062D\u0627\u062F\u062B\u0629",
|
|
470
|
+
"live.ticket": "\u0648\u0635\u0644\u062A\u0646\u0627 \u0631\u0633\u0627\u0644\u062A\u0643 \u0648\u0633\u0646\u0639\u0648\u062F \u0625\u0644\u064A\u0643 \u0642\u0631\u064A\u0628\u064B\u0627.",
|
|
471
|
+
"live.timeout": "\u0644\u0645 \u064A\u062A\u0641\u0631\u063A \u0623\u064A \u0645\u0645\u062B\u0644 \u0641\u064A \u0627\u0644\u0648\u0642\u062A \u0627\u0644\u0645\u0646\u0627\u0633\u0628\u060C \u0644\u0630\u0644\u0643 \u062D\u0641\u0638\u0646\u0627 \u0627\u0644\u0645\u062D\u0627\u062F\u062B\u0629 \u0643\u0637\u0644\u0628.",
|
|
472
|
+
"live.number": "\u0637\u0644\u0628 \u0631\u0642\u0645 {number}",
|
|
473
|
+
"live.closed": "\u0645\u0645\u062B\u0644\u0648\u0646\u0627 \u063A\u064A\u0631 \u0645\u062A\u0627\u062D\u064A\u0646 \u0627\u0644\u0622\u0646. \u0627\u062A\u0631\u0643 \u0631\u0633\u0627\u0644\u0629 \u0648\u0633\u0646\u0639\u0648\u062F \u0625\u0644\u064A\u0643.",
|
|
474
|
+
"live.closedUntil": "\u0645\u0645\u062B\u0644\u0648\u0646\u0627 \u063A\u064A\u0631 \u0645\u062A\u0627\u062D\u064A\u0646 \u0627\u0644\u0622\u0646 \u0648\u0633\u064A\u0639\u0648\u062F\u0648\u0646 \u0641\u064A {time}. \u0627\u062A\u0631\u0643 \u0631\u0633\u0627\u0644\u0629 \u0648\u0633\u0646\u0639\u0648\u062F \u0625\u0644\u064A\u0643.",
|
|
475
|
+
"live.busy": "\u062C\u0645\u064A\u0639 \u0645\u0645\u062B\u0644\u064A\u0646\u0627 \u0645\u0634\u063A\u0648\u0644\u0648\u0646 \u0627\u0644\u0622\u0646. \u0627\u062A\u0631\u0643 \u0631\u0633\u0627\u0644\u0629 \u0648\u0633\u0646\u0639\u0648\u062F \u0625\u0644\u064A\u0643.",
|
|
476
|
+
"live.failed": "\u0644\u0645 \u062A\u064F\u0631\u0633\u0644 \u0627\u0644\u0631\u0633\u0627\u0644\u0629. \u0627\u0636\u063A\u0637 \u0644\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u0645\u0631\u0629 \u0623\u062E\u0631\u0649.",
|
|
477
|
+
"live.back": "\u0627\u0644\u0639\u0648\u062F\u0629 \u0625\u0644\u0649 \u0627\u0644\u0628\u0648\u062A",
|
|
478
|
+
"live.reconnecting": "\u062C\u0627\u0631\u064D \u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u0627\u062A\u0635\u0627\u0644...",
|
|
479
|
+
"live.tooLong": "\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u0642\u0635\u0649 \u0644\u0644\u0631\u0633\u0627\u0644\u0629 2000 \u062D\u0631\u0641.",
|
|
480
|
+
"live.elsewhere": "\u0644\u062F\u064A\u0643 \u0645\u062D\u0627\u062F\u062B\u0629 \u0645\u0641\u062A\u0648\u062D\u0629 \u0628\u0627\u0644\u0641\u0639\u0644 \u0641\u064A \u0646\u0627\u0641\u0630\u0629 \u0623\u062E\u0631\u0649.",
|
|
481
|
+
"live.replaced": "\u062A\u0633\u062A\u0645\u0631 \u0647\u0630\u0647 \u0627\u0644\u0645\u062D\u0627\u062F\u062B\u0629 \u0641\u064A \u0646\u0627\u0641\u0630\u0629 \u0623\u062E\u0631\u0649.",
|
|
482
|
+
"live.placeholder": "\u0627\u0643\u062A\u0628 \u0631\u0633\u0627\u0644\u0629..."
|
|
399
483
|
};
|
|
400
484
|
|
|
401
485
|
// i18n/ru.json
|
|
@@ -436,7 +520,35 @@ var ru_default = {
|
|
|
436
520
|
"form.required": "\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E\u0435 \u043F\u043E\u043B\u0435",
|
|
437
521
|
"form.contactRequired": "\u0423\u043A\u0430\u0436\u0438\u0442\u0435 email \u0438\u043B\u0438 \u043D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430, \u0447\u0442\u043E\u0431\u044B \u043C\u044B \u043C\u043E\u0433\u043B\u0438 \u0441 \u0432\u0430\u043C\u0438 \u0441\u0432\u044F\u0437\u0430\u0442\u044C\u0441\u044F",
|
|
438
522
|
"form.emailInvalid": "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0430\u0434\u0440\u0435\u0441 email",
|
|
439
|
-
"form.backToChat": "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u0432 \u0447\u0430\u0442"
|
|
523
|
+
"form.backToChat": "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u0432 \u0447\u0430\u0442",
|
|
524
|
+
"live.talk": "\u0421\u0432\u044F\u0437\u0430\u0442\u044C\u0441\u044F \u0441 \u043E\u043F\u0435\u0440\u0430\u0442\u043E\u0440\u043E\u043C",
|
|
525
|
+
"live.intro": "\u041E\u043F\u0435\u0440\u0430\u0442\u043E\u0440 \u0441\u043A\u043E\u0440\u043E \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u0441\u044F. \u041E\u0441\u0442\u0430\u0432\u044C\u0442\u0435 email \u0438\u043B\u0438 \u0442\u0435\u043B\u0435\u0444\u043E\u043D \u043D\u0430 \u0441\u043B\u0443\u0447\u0430\u0439, \u0435\u0441\u043B\u0438 \u043D\u0430\u043C \u043D\u0443\u0436\u043D\u043E \u0431\u0443\u0434\u0435\u0442 \u0441 \u0432\u0430\u043C\u0438 \u0441\u0432\u044F\u0437\u0430\u0442\u044C\u0441\u044F.",
|
|
526
|
+
"live.department": "\u041E\u0442\u0434\u0435\u043B",
|
|
527
|
+
"live.message": "\u0412\u0430\u0448\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 (\u043D\u0435\u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E)",
|
|
528
|
+
"live.start": "\u041D\u0430\u0447\u0430\u0442\u044C \u0447\u0430\u0442",
|
|
529
|
+
"live.connecting": "\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435...",
|
|
530
|
+
"live.waiting": "\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u043E\u043F\u0435\u0440\u0430\u0442\u043E\u0440\u0430",
|
|
531
|
+
"live.waitingLeft": "\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u043E\u043F\u0435\u0440\u0430\u0442\u043E\u0440\u0430 ({time})",
|
|
532
|
+
"live.leave": "\u041E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435",
|
|
533
|
+
"live.end": "\u0417\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044C \u0447\u0430\u0442",
|
|
534
|
+
"live.joined": "{name} \u043F\u0440\u0438\u0441\u043E\u0435\u0434\u0438\u043D\u044F\u0435\u0442\u0441\u044F \u043A \u0447\u0430\u0442\u0443",
|
|
535
|
+
"live.with": "\u0427\u0430\u0442 \u0441: {name}",
|
|
536
|
+
"live.agent": "\u041E\u043F\u0435\u0440\u0430\u0442\u043E\u0440",
|
|
537
|
+
"live.typing": "\u041F\u0435\u0447\u0430\u0442\u0430\u0435\u0442 \u043E\u0442\u0432\u0435\u0442...",
|
|
538
|
+
"live.ended": "\u0427\u0430\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0451\u043D",
|
|
539
|
+
"live.ticket": "\u041C\u044B \u043F\u043E\u043B\u0443\u0447\u0438\u043B\u0438 \u0432\u0430\u0448\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u0438 \u0441\u043A\u043E\u0440\u043E \u0441 \u0432\u0430\u043C\u0438 \u0441\u0432\u044F\u0436\u0435\u043C\u0441\u044F.",
|
|
540
|
+
"live.timeout": "\u041D\u0438 \u043E\u0434\u0438\u043D \u043E\u043F\u0435\u0440\u0430\u0442\u043E\u0440 \u043D\u0435 \u043E\u0441\u0432\u043E\u0431\u043E\u0434\u0438\u043B\u0441\u044F \u0432\u043E\u0432\u0440\u0435\u043C\u044F, \u043F\u043E\u044D\u0442\u043E\u043C\u0443 \u043C\u044B \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u043B\u0438 \u0447\u0430\u0442 \u043A\u0430\u043A \u043E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u0435.",
|
|
541
|
+
"live.number": "\u041E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u0435 \u2116{number}",
|
|
542
|
+
"live.closed": "\u0421\u0435\u0439\u0447\u0430\u0441 \u043E\u043F\u0435\u0440\u0430\u0442\u043E\u0440\u044B \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B. \u041E\u0441\u0442\u0430\u0432\u044C\u0442\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435, \u0438 \u043C\u044B \u0441 \u0432\u0430\u043C\u0438 \u0441\u0432\u044F\u0436\u0435\u043C\u0441\u044F.",
|
|
543
|
+
"live.closedUntil": "\u0421\u0435\u0439\u0447\u0430\u0441 \u043E\u043F\u0435\u0440\u0430\u0442\u043E\u0440\u044B \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B \u0438 \u0432\u0435\u0440\u043D\u0443\u0442\u0441\u044F \u0432 {time}. \u041E\u0441\u0442\u0430\u0432\u044C\u0442\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435, \u0438 \u043C\u044B \u0441 \u0432\u0430\u043C\u0438 \u0441\u0432\u044F\u0436\u0435\u043C\u0441\u044F.",
|
|
544
|
+
"live.busy": "\u0412\u0441\u0435 \u043E\u043F\u0435\u0440\u0430\u0442\u043E\u0440\u044B \u0441\u0435\u0439\u0447\u0430\u0441 \u0437\u0430\u043D\u044F\u0442\u044B. \u041E\u0441\u0442\u0430\u0432\u044C\u0442\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435, \u0438 \u043C\u044B \u0441 \u0432\u0430\u043C\u0438 \u0441\u0432\u044F\u0436\u0435\u043C\u0441\u044F.",
|
|
545
|
+
"live.failed": "\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u043D\u0435 \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043E. \u041D\u0430\u0436\u043C\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C.",
|
|
546
|
+
"live.back": "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043A \u0431\u043E\u0442\u0443",
|
|
547
|
+
"live.reconnecting": "\u041F\u0435\u0440\u0435\u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435...",
|
|
548
|
+
"live.tooLong": "\u0414\u043B\u0438\u043D\u0430 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u043D\u0435 \u0431\u043E\u043B\u0435\u0435 2000 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432.",
|
|
549
|
+
"live.elsewhere": "\u0423 \u0432\u0430\u0441 \u0443\u0436\u0435 \u0435\u0441\u0442\u044C \u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0439 \u0447\u0430\u0442 \u0432 \u0434\u0440\u0443\u0433\u043E\u043C \u043E\u043A\u043D\u0435.",
|
|
550
|
+
"live.replaced": "\u042D\u0442\u043E\u0442 \u0447\u0430\u0442 \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0430\u0435\u0442\u0441\u044F \u0432 \u0434\u0440\u0443\u0433\u043E\u043C \u043E\u043A\u043D\u0435.",
|
|
551
|
+
"live.placeholder": "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435..."
|
|
440
552
|
};
|
|
441
553
|
|
|
442
554
|
// i18n/es.json
|
|
@@ -477,7 +589,35 @@ var es_default = {
|
|
|
477
589
|
"form.required": "Obligatorio",
|
|
478
590
|
"form.contactRequired": "Deja un correo o un tel\xE9fono para que podamos responderte",
|
|
479
591
|
"form.emailInvalid": "Correo electr\xF3nico no v\xE1lido",
|
|
480
|
-
"form.backToChat": "Volver al chat"
|
|
592
|
+
"form.backToChat": "Volver al chat",
|
|
593
|
+
"live.talk": "Hablar con un agente",
|
|
594
|
+
"live.intro": "Un agente se unir\xE1 en breve. Deja un email o un tel\xE9fono por si necesitamos contactarte.",
|
|
595
|
+
"live.department": "Departamento",
|
|
596
|
+
"live.message": "Tu mensaje (opcional)",
|
|
597
|
+
"live.start": "Iniciar chat",
|
|
598
|
+
"live.connecting": "Conectando...",
|
|
599
|
+
"live.waiting": "Esperando a un agente",
|
|
600
|
+
"live.waitingLeft": "Esperando a un agente ({time})",
|
|
601
|
+
"live.leave": "Dejar un mensaje",
|
|
602
|
+
"live.end": "Terminar chat",
|
|
603
|
+
"live.joined": "{name} se uni\xF3 al chat",
|
|
604
|
+
"live.with": "Hablando con {name}",
|
|
605
|
+
"live.agent": "Agente",
|
|
606
|
+
"live.typing": "Escribiendo una respuesta...",
|
|
607
|
+
"live.ended": "El chat ha terminado",
|
|
608
|
+
"live.ticket": "Recibimos tu mensaje y te responderemos pronto.",
|
|
609
|
+
"live.timeout": "Ning\xFAn agente qued\xF3 libre a tiempo, as\xED que guardamos tu chat como una solicitud.",
|
|
610
|
+
"live.number": "Solicitud n.\xBA {number}",
|
|
611
|
+
"live.closed": "Nuestros agentes no est\xE1n disponibles ahora. Deja un mensaje y te responderemos.",
|
|
612
|
+
"live.closedUntil": "Nuestros agentes no est\xE1n disponibles ahora y volver\xE1n a las {time}. Deja un mensaje y te responderemos.",
|
|
613
|
+
"live.busy": "Todos nuestros agentes est\xE1n ocupados ahora. Deja un mensaje y te responderemos.",
|
|
614
|
+
"live.failed": "Mensaje no enviado. Toca para intentarlo de nuevo.",
|
|
615
|
+
"live.back": "Volver al bot",
|
|
616
|
+
"live.reconnecting": "Reconectando...",
|
|
617
|
+
"live.tooLong": "Los mensajes tienen un m\xE1ximo de 2000 caracteres.",
|
|
618
|
+
"live.elsewhere": "Ya tienes un chat abierto en otra ventana.",
|
|
619
|
+
"live.replaced": "Este chat contin\xFAa en otra ventana.",
|
|
620
|
+
"live.placeholder": "Escribe un mensaje..."
|
|
481
621
|
};
|
|
482
622
|
|
|
483
623
|
// i18n/fr.json
|
|
@@ -518,7 +658,35 @@ var fr_default = {
|
|
|
518
658
|
"form.required": "Obligatoire",
|
|
519
659
|
"form.contactRequired": "Indiquez un e-mail ou un num\xE9ro de t\xE9l\xE9phone pour que nous puissions vous r\xE9pondre",
|
|
520
660
|
"form.emailInvalid": "Adresse e-mail invalide",
|
|
521
|
-
"form.backToChat": "Retour au chat"
|
|
661
|
+
"form.backToChat": "Retour au chat",
|
|
662
|
+
"live.talk": "Parler \xE0 un conseiller",
|
|
663
|
+
"live.intro": "Un conseiller va vous rejoindre. Laissez un email ou un num\xE9ro de t\xE9l\xE9phone au cas o\xF9 nous devrions vous recontacter.",
|
|
664
|
+
"live.department": "Service",
|
|
665
|
+
"live.message": "Votre message (facultatif)",
|
|
666
|
+
"live.start": "D\xE9marrer le chat",
|
|
667
|
+
"live.connecting": "Connexion...",
|
|
668
|
+
"live.waiting": "En attente d\u2019un conseiller",
|
|
669
|
+
"live.waitingLeft": "En attente d\u2019un conseiller ({time})",
|
|
670
|
+
"live.leave": "Laisser un message \xE0 la place",
|
|
671
|
+
"live.end": "Terminer le chat",
|
|
672
|
+
"live.joined": "{name} a rejoint le chat",
|
|
673
|
+
"live.with": "En conversation avec {name}",
|
|
674
|
+
"live.agent": "Conseiller",
|
|
675
|
+
"live.typing": "R\xE9dige une r\xE9ponse...",
|
|
676
|
+
"live.ended": "Le chat est termin\xE9",
|
|
677
|
+
"live.ticket": "Nous avons bien re\xE7u votre message et revenons vers vous rapidement.",
|
|
678
|
+
"live.timeout": "Aucun conseiller ne s\u2019est lib\xE9r\xE9 \xE0 temps, nous avons donc enregistr\xE9 votre chat comme demande.",
|
|
679
|
+
"live.number": "Demande n\xB0 {number}",
|
|
680
|
+
"live.closed": "Nos conseillers ne sont pas disponibles pour le moment. Laissez un message et nous reviendrons vers vous.",
|
|
681
|
+
"live.closedUntil": "Nos conseillers ne sont pas disponibles pour le moment et reviennent \xE0 {time}. Laissez un message et nous reviendrons vers vous.",
|
|
682
|
+
"live.busy": "Tous nos conseillers sont occup\xE9s. Laissez un message et nous reviendrons vers vous.",
|
|
683
|
+
"live.failed": "Message non envoy\xE9. Touchez pour r\xE9essayer.",
|
|
684
|
+
"live.back": "Retour au bot",
|
|
685
|
+
"live.reconnecting": "Reconnexion...",
|
|
686
|
+
"live.tooLong": "Les messages sont limit\xE9s \xE0 2000 caract\xE8res.",
|
|
687
|
+
"live.elsewhere": "Vous avez d\xE9j\xE0 un chat ouvert dans une autre fen\xEAtre.",
|
|
688
|
+
"live.replaced": "Ce chat continue dans une autre fen\xEAtre.",
|
|
689
|
+
"live.placeholder": "\xC9crivez un message..."
|
|
522
690
|
};
|
|
523
691
|
|
|
524
692
|
// i18n/de.json
|
|
@@ -559,7 +727,35 @@ var de_default = {
|
|
|
559
727
|
"form.required": "Pflichtfeld",
|
|
560
728
|
"form.contactRequired": "Bitte geben Sie eine E-Mail-Adresse oder Telefonnummer an, damit wir uns melden k\xF6nnen",
|
|
561
729
|
"form.emailInvalid": "Ung\xFCltige E-Mail-Adresse",
|
|
562
|
-
"form.backToChat": "Zur\xFCck zum Chat"
|
|
730
|
+
"form.backToChat": "Zur\xFCck zum Chat",
|
|
731
|
+
"live.talk": "Mit einem Mitarbeiter sprechen",
|
|
732
|
+
"live.intro": "Gleich ist jemand f\xFCr Sie da. Hinterlassen Sie eine E-Mail-Adresse oder Telefonnummer, falls wir uns bei Ihnen melden m\xFCssen.",
|
|
733
|
+
"live.department": "Abteilung",
|
|
734
|
+
"live.message": "Ihre Nachricht (optional)",
|
|
735
|
+
"live.start": "Chat starten",
|
|
736
|
+
"live.connecting": "Verbinden...",
|
|
737
|
+
"live.waiting": "Warten auf einen Mitarbeiter",
|
|
738
|
+
"live.waitingLeft": "Warten auf einen Mitarbeiter ({time})",
|
|
739
|
+
"live.leave": "Stattdessen eine Nachricht hinterlassen",
|
|
740
|
+
"live.end": "Chat beenden",
|
|
741
|
+
"live.joined": "{name} ist dem Chat beigetreten",
|
|
742
|
+
"live.with": "Im Chat mit {name}",
|
|
743
|
+
"live.agent": "Mitarbeiter",
|
|
744
|
+
"live.typing": "Schreibt eine Antwort...",
|
|
745
|
+
"live.ended": "Der Chat wurde beendet",
|
|
746
|
+
"live.ticket": "Wir haben Ihre Nachricht erhalten und melden uns bald bei Ihnen.",
|
|
747
|
+
"live.timeout": "Es wurde rechtzeitig niemand frei, deshalb haben wir Ihren Chat als Anfrage gespeichert.",
|
|
748
|
+
"live.number": "Anfrage Nr. {number}",
|
|
749
|
+
"live.closed": "Unsere Mitarbeiter sind gerade nicht erreichbar. Hinterlassen Sie eine Nachricht, wir melden uns bei Ihnen.",
|
|
750
|
+
"live.closedUntil": "Unsere Mitarbeiter sind gerade nicht erreichbar und ab {time} wieder da. Hinterlassen Sie eine Nachricht, wir melden uns bei Ihnen.",
|
|
751
|
+
"live.busy": "Alle Mitarbeiter sind gerade besch\xE4ftigt. Hinterlassen Sie eine Nachricht, wir melden uns bei Ihnen.",
|
|
752
|
+
"live.failed": "Nachricht nicht gesendet. Tippen Sie, um es erneut zu versuchen.",
|
|
753
|
+
"live.back": "Zur\xFCck zum Bot",
|
|
754
|
+
"live.reconnecting": "Neu verbinden...",
|
|
755
|
+
"live.tooLong": "Nachrichten sind auf 2000 Zeichen begrenzt.",
|
|
756
|
+
"live.elsewhere": "Sie haben bereits einen offenen Chat in einem anderen Fenster.",
|
|
757
|
+
"live.replaced": "Dieser Chat geht in einem anderen Fenster weiter.",
|
|
758
|
+
"live.placeholder": "Nachricht eingeben..."
|
|
563
759
|
};
|
|
564
760
|
|
|
565
761
|
// i18n/pt.json
|
|
@@ -600,7 +796,35 @@ var pt_default = {
|
|
|
600
796
|
"form.required": "Obrigat\xF3rio",
|
|
601
797
|
"form.contactRequired": "Informe um e-mail ou telefone para que possamos retornar",
|
|
602
798
|
"form.emailInvalid": "Endere\xE7o de e-mail inv\xE1lido",
|
|
603
|
-
"form.backToChat": "Voltar ao chat"
|
|
799
|
+
"form.backToChat": "Voltar ao chat",
|
|
800
|
+
"live.talk": "Falar com um atendente",
|
|
801
|
+
"live.intro": "Um atendente vai entrar em instantes. Deixe um email ou telefone caso precisemos retornar o contato.",
|
|
802
|
+
"live.department": "Departamento",
|
|
803
|
+
"live.message": "Sua mensagem (opcional)",
|
|
804
|
+
"live.start": "Iniciar chat",
|
|
805
|
+
"live.connecting": "Conectando...",
|
|
806
|
+
"live.waiting": "Aguardando um atendente",
|
|
807
|
+
"live.waitingLeft": "Aguardando um atendente ({time})",
|
|
808
|
+
"live.leave": "Deixar uma mensagem",
|
|
809
|
+
"live.end": "Encerrar chat",
|
|
810
|
+
"live.joined": "{name} entrou no chat",
|
|
811
|
+
"live.with": "Conversando com {name}",
|
|
812
|
+
"live.agent": "Atendente",
|
|
813
|
+
"live.typing": "Digitando uma resposta...",
|
|
814
|
+
"live.ended": "O chat foi encerrado",
|
|
815
|
+
"live.ticket": "Recebemos sua mensagem e retornaremos em breve.",
|
|
816
|
+
"live.timeout": "Nenhum atendente ficou livre a tempo, ent\xE3o salvamos seu chat como uma solicita\xE7\xE3o.",
|
|
817
|
+
"live.number": "Solicita\xE7\xE3o n\xBA {number}",
|
|
818
|
+
"live.closed": "Nossos atendentes n\xE3o est\xE3o dispon\xEDveis agora. Deixe uma mensagem e retornaremos.",
|
|
819
|
+
"live.closedUntil": "Nossos atendentes n\xE3o est\xE3o dispon\xEDveis agora e voltam \xE0s {time}. Deixe uma mensagem e retornaremos.",
|
|
820
|
+
"live.busy": "Todos os nossos atendentes est\xE3o ocupados agora. Deixe uma mensagem e retornaremos.",
|
|
821
|
+
"live.failed": "Mensagem n\xE3o enviada. Toque para tentar de novo.",
|
|
822
|
+
"live.back": "Voltar ao bot",
|
|
823
|
+
"live.reconnecting": "Reconectando...",
|
|
824
|
+
"live.tooLong": "As mensagens t\xEAm no m\xE1ximo 2000 caracteres.",
|
|
825
|
+
"live.elsewhere": "Voc\xEA j\xE1 tem um chat aberto em outra janela.",
|
|
826
|
+
"live.replaced": "Este chat continua em outra janela.",
|
|
827
|
+
"live.placeholder": "Digite uma mensagem..."
|
|
604
828
|
};
|
|
605
829
|
|
|
606
830
|
// i18n/it.json
|
|
@@ -641,7 +865,35 @@ var it_default = {
|
|
|
641
865
|
"form.required": "Obbligatorio",
|
|
642
866
|
"form.contactRequired": "Lascia un'email o un numero di telefono per poterti ricontattare",
|
|
643
867
|
"form.emailInvalid": "Indirizzo email non valido",
|
|
644
|
-
"form.backToChat": "Torna alla chat"
|
|
868
|
+
"form.backToChat": "Torna alla chat",
|
|
869
|
+
"live.talk": "Parla con un operatore",
|
|
870
|
+
"live.intro": "Un operatore arriver\xE0 a breve. Lascia un\u2019email o un numero di telefono nel caso dovessimo ricontattarti.",
|
|
871
|
+
"live.department": "Reparto",
|
|
872
|
+
"live.message": "Il tuo messaggio (facoltativo)",
|
|
873
|
+
"live.start": "Avvia la chat",
|
|
874
|
+
"live.connecting": "Connessione...",
|
|
875
|
+
"live.waiting": "In attesa di un operatore",
|
|
876
|
+
"live.waitingLeft": "In attesa di un operatore ({time})",
|
|
877
|
+
"live.leave": "Lascia invece un messaggio",
|
|
878
|
+
"live.end": "Termina la chat",
|
|
879
|
+
"live.joined": "{name} \xE8 entrato nella chat",
|
|
880
|
+
"live.with": "In chat con {name}",
|
|
881
|
+
"live.agent": "Operatore",
|
|
882
|
+
"live.typing": "Sta scrivendo una risposta...",
|
|
883
|
+
"live.ended": "La chat \xE8 terminata",
|
|
884
|
+
"live.ticket": "Abbiamo ricevuto il tuo messaggio e ti risponderemo presto.",
|
|
885
|
+
"live.timeout": "Nessun operatore si \xE8 liberato in tempo, quindi abbiamo salvato la chat come richiesta.",
|
|
886
|
+
"live.number": "Richiesta n. {number}",
|
|
887
|
+
"live.closed": "I nostri operatori non sono disponibili ora. Lascia un messaggio e ti ricontatteremo.",
|
|
888
|
+
"live.closedUntil": "I nostri operatori non sono disponibili ora e tornano alle {time}. Lascia un messaggio e ti ricontatteremo.",
|
|
889
|
+
"live.busy": "Tutti i nostri operatori sono occupati. Lascia un messaggio e ti ricontatteremo.",
|
|
890
|
+
"live.failed": "Messaggio non inviato. Tocca per riprovare.",
|
|
891
|
+
"live.back": "Torna al bot",
|
|
892
|
+
"live.reconnecting": "Riconnessione...",
|
|
893
|
+
"live.tooLong": "I messaggi possono avere al massimo 2000 caratteri.",
|
|
894
|
+
"live.elsewhere": "Hai gi\xE0 una chat aperta in un\u2019altra finestra.",
|
|
895
|
+
"live.replaced": "Questa chat continua in un\u2019altra finestra.",
|
|
896
|
+
"live.placeholder": "Scrivi un messaggio..."
|
|
645
897
|
};
|
|
646
898
|
|
|
647
899
|
// i18n/tr.json
|
|
@@ -682,7 +934,35 @@ var tr_default = {
|
|
|
682
934
|
"form.required": "Zorunlu",
|
|
683
935
|
"form.contactRequired": "Size d\xF6n\xFC\u015F yapabilmemiz i\xE7in bir e-posta veya telefon numaras\u0131 b\u0131rak\u0131n",
|
|
684
936
|
"form.emailInvalid": "Ge\xE7ersiz e-posta adresi",
|
|
685
|
-
"form.backToChat": "Sohbete d\xF6n"
|
|
937
|
+
"form.backToChat": "Sohbete d\xF6n",
|
|
938
|
+
"live.talk": "Bir temsilciyle konu\u015F",
|
|
939
|
+
"live.intro": "Birazdan bir temsilci kat\u0131lacak. Size d\xF6nmemiz gerekirse diye bir e-posta veya telefon numaras\u0131 b\u0131rak\u0131n.",
|
|
940
|
+
"live.department": "Departman",
|
|
941
|
+
"live.message": "Mesaj\u0131n\u0131z (iste\u011Fe ba\u011Fl\u0131)",
|
|
942
|
+
"live.start": "Sohbeti ba\u015Flat",
|
|
943
|
+
"live.connecting": "Ba\u011Flan\u0131yor...",
|
|
944
|
+
"live.waiting": "Temsilci bekleniyor",
|
|
945
|
+
"live.waitingLeft": "Temsilci bekleniyor ({time})",
|
|
946
|
+
"live.leave": "Bunun yerine mesaj b\u0131rak",
|
|
947
|
+
"live.end": "Sohbeti bitir",
|
|
948
|
+
"live.joined": "{name} sohbete kat\u0131ld\u0131",
|
|
949
|
+
"live.with": "G\xF6r\xFC\u015Ft\xFC\u011F\xFCn\xFCz ki\u015Fi: {name}",
|
|
950
|
+
"live.agent": "Temsilci",
|
|
951
|
+
"live.typing": "Yan\u0131t yaz\u0131yor...",
|
|
952
|
+
"live.ended": "Sohbet sona erdi",
|
|
953
|
+
"live.ticket": "Mesaj\u0131n\u0131z\u0131 ald\u0131k, en k\u0131sa s\xFCrede size d\xF6nece\u011Fiz.",
|
|
954
|
+
"live.timeout": "Zaman\u0131nda m\xFCsait temsilci olmad\u0131, bu y\xFCzden sohbetinizi talep olarak kaydettik.",
|
|
955
|
+
"live.number": "Talep no. {number}",
|
|
956
|
+
"live.closed": "Temsilcilerimiz \u015Fu anda m\xFCsait de\u011Fil. Mesaj b\u0131rak\u0131n, size d\xF6nelim.",
|
|
957
|
+
"live.closedUntil": "Temsilcilerimiz \u015Fu anda m\xFCsait de\u011Fil, {time} itibar\u0131yla d\xF6necekler. Mesaj b\u0131rak\u0131n, size d\xF6nelim.",
|
|
958
|
+
"live.busy": "T\xFCm temsilcilerimiz \u015Fu anda me\u015Fgul. Mesaj b\u0131rak\u0131n, size d\xF6nelim.",
|
|
959
|
+
"live.failed": "Mesaj g\xF6nderilemedi. Tekrar denemek i\xE7in dokunun.",
|
|
960
|
+
"live.back": "Bota d\xF6n",
|
|
961
|
+
"live.reconnecting": "Yeniden ba\u011Flan\u0131yor...",
|
|
962
|
+
"live.tooLong": "Mesajlar en fazla 2000 karakter olabilir.",
|
|
963
|
+
"live.elsewhere": "Ba\u015Fka bir pencerede zaten a\xE7\u0131k bir sohbetiniz var.",
|
|
964
|
+
"live.replaced": "Bu sohbet ba\u015Fka bir pencerede devam ediyor.",
|
|
965
|
+
"live.placeholder": "Bir mesaj yaz\u0131n..."
|
|
686
966
|
};
|
|
687
967
|
|
|
688
968
|
// i18n/th.json
|
|
@@ -723,7 +1003,35 @@ var th_default = {
|
|
|
723
1003
|
"form.required": "\u0E08\u0E33\u0E40\u0E1B\u0E47\u0E19\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E23\u0E2D\u0E01",
|
|
724
1004
|
"form.contactRequired": "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E23\u0E30\u0E1A\u0E38\u0E2D\u0E35\u0E40\u0E21\u0E25\u0E2B\u0E23\u0E37\u0E2D\u0E2B\u0E21\u0E32\u0E22\u0E40\u0E25\u0E02\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E43\u0E2B\u0E49\u0E40\u0E23\u0E32\u0E15\u0E34\u0E14\u0E15\u0E48\u0E2D\u0E01\u0E25\u0E31\u0E1A\u0E44\u0E14\u0E49",
|
|
725
1005
|
"form.emailInvalid": "\u0E2D\u0E35\u0E40\u0E21\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07",
|
|
726
|
-
"form.backToChat": "\u0E01\u0E25\u0E31\u0E1A\u0E44\u0E1B\u0E17\u0E35\u0E48\u0E41\u0E0A\u0E15"
|
|
1006
|
+
"form.backToChat": "\u0E01\u0E25\u0E31\u0E1A\u0E44\u0E1B\u0E17\u0E35\u0E48\u0E41\u0E0A\u0E15",
|
|
1007
|
+
"live.talk": "\u0E04\u0E38\u0E22\u0E01\u0E31\u0E1A\u0E40\u0E08\u0E49\u0E32\u0E2B\u0E19\u0E49\u0E32\u0E17\u0E35\u0E48",
|
|
1008
|
+
"live.intro": "\u0E40\u0E08\u0E49\u0E32\u0E2B\u0E19\u0E49\u0E32\u0E17\u0E35\u0E48\u0E08\u0E30\u0E40\u0E02\u0E49\u0E32\u0E21\u0E32\u0E43\u0E19\u0E2D\u0E35\u0E01\u0E2A\u0E31\u0E01\u0E04\u0E23\u0E39\u0E48 \u0E01\u0E23\u0E38\u0E13\u0E32\u0E1D\u0E32\u0E01\u0E2D\u0E35\u0E40\u0E21\u0E25\u0E2B\u0E23\u0E37\u0E2D\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E44\u0E27\u0E49 \u0E40\u0E1C\u0E37\u0E48\u0E2D\u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E15\u0E34\u0E14\u0E15\u0E48\u0E2D\u0E01\u0E25\u0E31\u0E1A",
|
|
1009
|
+
"live.department": "\u0E41\u0E1C\u0E19\u0E01",
|
|
1010
|
+
"live.message": "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13 (\u0E44\u0E21\u0E48\u0E1A\u0E31\u0E07\u0E04\u0E31\u0E1A)",
|
|
1011
|
+
"live.start": "\u0E40\u0E23\u0E34\u0E48\u0E21\u0E41\u0E0A\u0E17",
|
|
1012
|
+
"live.connecting": "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D...",
|
|
1013
|
+
"live.waiting": "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E23\u0E2D\u0E40\u0E08\u0E49\u0E32\u0E2B\u0E19\u0E49\u0E32\u0E17\u0E35\u0E48",
|
|
1014
|
+
"live.waitingLeft": "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E23\u0E2D\u0E40\u0E08\u0E49\u0E32\u0E2B\u0E19\u0E49\u0E32\u0E17\u0E35\u0E48 ({time})",
|
|
1015
|
+
"live.leave": "\u0E1D\u0E32\u0E01\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E17\u0E19",
|
|
1016
|
+
"live.end": "\u0E08\u0E1A\u0E01\u0E32\u0E23\u0E41\u0E0A\u0E17",
|
|
1017
|
+
"live.joined": "{name} \u0E40\u0E02\u0E49\u0E32\u0E23\u0E48\u0E27\u0E21\u0E41\u0E0A\u0E17\u0E41\u0E25\u0E49\u0E27",
|
|
1018
|
+
"live.with": "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E04\u0E38\u0E22\u0E01\u0E31\u0E1A {name}",
|
|
1019
|
+
"live.agent": "\u0E40\u0E08\u0E49\u0E32\u0E2B\u0E19\u0E49\u0E32\u0E17\u0E35\u0E48",
|
|
1020
|
+
"live.typing": "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E1E\u0E34\u0E21\u0E1E\u0E4C\u0E04\u0E33\u0E15\u0E2D\u0E1A...",
|
|
1021
|
+
"live.ended": "\u0E01\u0E32\u0E23\u0E41\u0E0A\u0E17\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14\u0E41\u0E25\u0E49\u0E27",
|
|
1022
|
+
"live.ticket": "\u0E40\u0E23\u0E32\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E41\u0E25\u0E49\u0E27 \u0E41\u0E25\u0E30\u0E08\u0E30\u0E15\u0E34\u0E14\u0E15\u0E48\u0E2D\u0E01\u0E25\u0E31\u0E1A\u0E42\u0E14\u0E22\u0E40\u0E23\u0E47\u0E27",
|
|
1023
|
+
"live.timeout": "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E40\u0E08\u0E49\u0E32\u0E2B\u0E19\u0E49\u0E32\u0E17\u0E35\u0E48\u0E27\u0E48\u0E32\u0E07\u0E17\u0E31\u0E19\u0E40\u0E27\u0E25\u0E32 \u0E40\u0E23\u0E32\u0E08\u0E36\u0E07\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E41\u0E0A\u0E17\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E40\u0E1B\u0E47\u0E19\u0E04\u0E33\u0E02\u0E2D",
|
|
1024
|
+
"live.number": "\u0E04\u0E33\u0E02\u0E2D\u0E2B\u0E21\u0E32\u0E22\u0E40\u0E25\u0E02 {number}",
|
|
1025
|
+
"live.closed": "\u0E02\u0E13\u0E30\u0E19\u0E35\u0E49\u0E40\u0E08\u0E49\u0E32\u0E2B\u0E19\u0E49\u0E32\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E1E\u0E23\u0E49\u0E2D\u0E21\u0E43\u0E2B\u0E49\u0E1A\u0E23\u0E34\u0E01\u0E32\u0E23 \u0E1D\u0E32\u0E01\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E44\u0E27\u0E49 \u0E41\u0E25\u0E49\u0E27\u0E40\u0E23\u0E32\u0E08\u0E30\u0E15\u0E34\u0E14\u0E15\u0E48\u0E2D\u0E01\u0E25\u0E31\u0E1A",
|
|
1026
|
+
"live.closedUntil": "\u0E02\u0E13\u0E30\u0E19\u0E35\u0E49\u0E40\u0E08\u0E49\u0E32\u0E2B\u0E19\u0E49\u0E32\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E1E\u0E23\u0E49\u0E2D\u0E21\u0E43\u0E2B\u0E49\u0E1A\u0E23\u0E34\u0E01\u0E32\u0E23 \u0E41\u0E25\u0E30\u0E08\u0E30\u0E01\u0E25\u0E31\u0E1A\u0E21\u0E32\u0E40\u0E27\u0E25\u0E32 {time} \u0E1D\u0E32\u0E01\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E44\u0E27\u0E49 \u0E41\u0E25\u0E49\u0E27\u0E40\u0E23\u0E32\u0E08\u0E30\u0E15\u0E34\u0E14\u0E15\u0E48\u0E2D\u0E01\u0E25\u0E31\u0E1A",
|
|
1027
|
+
"live.busy": "\u0E40\u0E08\u0E49\u0E32\u0E2B\u0E19\u0E49\u0E32\u0E17\u0E35\u0E48\u0E17\u0E38\u0E01\u0E04\u0E19\u0E44\u0E21\u0E48\u0E27\u0E48\u0E32\u0E07\u0E43\u0E19\u0E02\u0E13\u0E30\u0E19\u0E35\u0E49 \u0E1D\u0E32\u0E01\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E44\u0E27\u0E49 \u0E41\u0E25\u0E49\u0E27\u0E40\u0E23\u0E32\u0E08\u0E30\u0E15\u0E34\u0E14\u0E15\u0E48\u0E2D\u0E01\u0E25\u0E31\u0E1A",
|
|
1028
|
+
"live.failed": "\u0E2A\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08 \u0E41\u0E15\u0E30\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E25\u0E2D\u0E07\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07",
|
|
1029
|
+
"live.back": "\u0E01\u0E25\u0E31\u0E1A\u0E44\u0E1B\u0E17\u0E35\u0E48\u0E1A\u0E2D\u0E17",
|
|
1030
|
+
"live.reconnecting": "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D\u0E43\u0E2B\u0E21\u0E48...",
|
|
1031
|
+
"live.tooLong": "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E22\u0E32\u0E27\u0E44\u0E14\u0E49\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 2000 \u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",
|
|
1032
|
+
"live.elsewhere": "\u0E04\u0E38\u0E13\u0E21\u0E35\u0E41\u0E0A\u0E17\u0E17\u0E35\u0E48\u0E40\u0E1B\u0E34\u0E14\u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27\u0E43\u0E19\u0E2B\u0E19\u0E49\u0E32\u0E15\u0E48\u0E32\u0E07\u0E2D\u0E37\u0E48\u0E19",
|
|
1033
|
+
"live.replaced": "\u0E41\u0E0A\u0E17\u0E19\u0E35\u0E49\u0E14\u0E33\u0E40\u0E19\u0E34\u0E19\u0E15\u0E48\u0E2D\u0E43\u0E19\u0E2B\u0E19\u0E49\u0E32\u0E15\u0E48\u0E32\u0E07\u0E2D\u0E37\u0E48\u0E19",
|
|
1034
|
+
"live.placeholder": "\u0E1E\u0E34\u0E21\u0E1E\u0E4C\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21..."
|
|
727
1035
|
};
|
|
728
1036
|
|
|
729
1037
|
// src/i18n.ts
|
|
@@ -833,15 +1141,16 @@ function transcriptOf(state) {
|
|
|
833
1141
|
at: new Date(m.at).toISOString()
|
|
834
1142
|
}));
|
|
835
1143
|
}
|
|
836
|
-
function toContact(state, prefill) {
|
|
1144
|
+
function toContact(state, prefill, live) {
|
|
837
1145
|
const script = state.lastScriptId ? state.scripts[state.lastScriptId] : null;
|
|
838
1146
|
const effect = {
|
|
839
|
-
type: "contact",
|
|
1147
|
+
type: live ? "live" : "contact",
|
|
840
1148
|
contactTopicId: (script == null ? void 0 : script.content.contactTopicId) || null,
|
|
841
1149
|
scriptId: state.lastScriptId,
|
|
842
1150
|
prefill: prefill || "",
|
|
843
1151
|
transcript: transcriptOf(state)
|
|
844
1152
|
};
|
|
1153
|
+
if (live) return { state: { ...state, outcome: "contact", chips: [homeChip(state)] }, effect };
|
|
845
1154
|
const next = say({ ...state, outcome: "contact" }, "bot", T(state)["chat.openingContact"]);
|
|
846
1155
|
return { state: { ...next, chips: [homeChip(next)] }, effect };
|
|
847
1156
|
}
|
|
@@ -905,6 +1214,8 @@ function pressChip(state, chip) {
|
|
|
905
1214
|
case "no":
|
|
906
1215
|
case "contact":
|
|
907
1216
|
return toContact(next, chip.prefill);
|
|
1217
|
+
case "live":
|
|
1218
|
+
return toContact(next, chip.prefill, true);
|
|
908
1219
|
case "pick":
|
|
909
1220
|
return chip.target ? { state: goToStep(next, chip.target.scriptId, chip.target.stepId, "text") } : { state: showMenu(next, "home") };
|
|
910
1221
|
case "button":
|
|
@@ -997,9 +1308,138 @@ function eventsPayload(state, sessionId, releaseVersion, startedAt) {
|
|
|
997
1308
|
unmatched: state.unmatched.slice(-20)
|
|
998
1309
|
};
|
|
999
1310
|
}
|
|
1311
|
+
|
|
1312
|
+
// src/live.ts
|
|
1313
|
+
var LIVE_MESSAGE_MAX = 2e3;
|
|
1314
|
+
var LIVE_TYPING_INTERVAL_MS = 3e3;
|
|
1315
|
+
var LIVE_TYPING_HIDE_MS = 6e3;
|
|
1316
|
+
var LIVE_AVAILABILITY_TTL_MS = 3e4;
|
|
1317
|
+
var BACKOFF_S = [1, 2, 4, 8, 16, 30];
|
|
1318
|
+
var ID_RE = /^[A-Za-z0-9_-]{8,64}$/;
|
|
1319
|
+
var isLiveFinal = (state) => state === "closed" || state === "ticket";
|
|
1320
|
+
var isLiveClientId = (id) => typeof id === "string" && ID_RE.test(id);
|
|
1321
|
+
function liveBackoff(attempt, random = Math.random) {
|
|
1322
|
+
const base = BACKOFF_S[Math.min(Math.max(0, Math.floor(attempt) || 0), BACKOFF_S.length - 1)] * 1e3;
|
|
1323
|
+
return Math.round(base * (0.7 + 0.6 * random()));
|
|
1324
|
+
}
|
|
1325
|
+
function liveStart(conversation) {
|
|
1326
|
+
return { conversation, events: [], lastSeq: 0, pending: [] };
|
|
1327
|
+
}
|
|
1328
|
+
function liveApplyConversation(chat, conversation) {
|
|
1329
|
+
if (!conversation || conversation.id !== chat.conversation.id) return chat;
|
|
1330
|
+
const cur = chat.conversation;
|
|
1331
|
+
if (isLiveFinal(cur.state) && !isLiveFinal(conversation.state)) return chat;
|
|
1332
|
+
const ticket = conversation.ticket || cur.ticket;
|
|
1333
|
+
const merged = ticket && cur.ticket && cur.ticket.number != null && (!conversation.ticket || conversation.ticket.number == null) ? { ...ticket, number: cur.ticket.number } : ticket;
|
|
1334
|
+
return { ...chat, conversation: { ...conversation, ticket: merged != null ? merged : null } };
|
|
1335
|
+
}
|
|
1336
|
+
function liveApplyEvent(chat, event) {
|
|
1337
|
+
if (!event || typeof event.seq !== "number" || !(event.seq > 0) || Math.floor(event.seq) !== event.seq) return chat;
|
|
1338
|
+
const seq = event.seq;
|
|
1339
|
+
const events = chat.events;
|
|
1340
|
+
if (events.some((e) => e.seq === seq)) return chat;
|
|
1341
|
+
let i = events.length;
|
|
1342
|
+
while (i > 0 && events[i - 1].seq > seq) i--;
|
|
1343
|
+
const nextEvents = [...events.slice(0, i), event, ...events.slice(i)];
|
|
1344
|
+
const pending = event.clientId ? chat.pending.filter((p) => p.clientId !== event.clientId) : chat.pending;
|
|
1345
|
+
let conversation = chat.conversation;
|
|
1346
|
+
const data = event.data || {};
|
|
1347
|
+
if (!isLiveFinal(conversation.state)) {
|
|
1348
|
+
if (event.type === "agent.joined") {
|
|
1349
|
+
const agent = data.agent || {};
|
|
1350
|
+
conversation = { ...conversation, state: "active", agent: { name: agent.name } };
|
|
1351
|
+
} else if (event.type === "conversation.closed") {
|
|
1352
|
+
conversation = { ...conversation, state: "closed", closeReason: data.reason || null };
|
|
1353
|
+
} else if (event.type === "conversation.ticket") {
|
|
1354
|
+
const number = typeof data.ticketNumber === "number" ? data.ticketNumber : null;
|
|
1355
|
+
conversation = { ...conversation, state: "ticket", ticket: { number, reason: data.reason } };
|
|
1356
|
+
}
|
|
1357
|
+
} else if (event.type === "conversation.ticket" && conversation.ticket && conversation.ticket.number == null && typeof data.ticketNumber === "number") {
|
|
1358
|
+
conversation = { ...conversation, ticket: { ...conversation.ticket, number: data.ticketNumber } };
|
|
1359
|
+
}
|
|
1360
|
+
return { conversation, events: nextEvents, lastSeq: Math.max(chat.lastSeq, seq), pending };
|
|
1361
|
+
}
|
|
1362
|
+
function liveApplySync(chat, sync) {
|
|
1363
|
+
let next = liveApplyConversation(chat, sync.conversation);
|
|
1364
|
+
for (const e of sync.events || []) next = liveApplyEvent(next, e);
|
|
1365
|
+
return next;
|
|
1366
|
+
}
|
|
1367
|
+
function liveAddPending(chat, clientId, text, at) {
|
|
1368
|
+
if (chat.pending.some((p) => p.clientId === clientId) || chat.events.some((e) => e.clientId === clientId)) return chat;
|
|
1369
|
+
return { ...chat, pending: [...chat.pending, { clientId, text, at, status: "sending" }] };
|
|
1370
|
+
}
|
|
1371
|
+
function liveSetPending(chat, clientId, status) {
|
|
1372
|
+
if (!chat.pending.some((p) => p.clientId === clientId)) return chat;
|
|
1373
|
+
const pending = status ? chat.pending.map((p) => p.clientId === clientId ? { ...p, status } : p) : chat.pending.filter((p) => p.clientId !== clientId);
|
|
1374
|
+
return { ...chat, pending };
|
|
1375
|
+
}
|
|
1376
|
+
function liveLines(chat, t) {
|
|
1377
|
+
var _a;
|
|
1378
|
+
const lines = [];
|
|
1379
|
+
for (const e of chat.events) {
|
|
1380
|
+
const key = `e${e.seq}`;
|
|
1381
|
+
const data = e.data || {};
|
|
1382
|
+
if (e.type === "message") {
|
|
1383
|
+
const kind = e.author && (e.author.kind === "visitor" || e.author.kind === "agent") ? e.author.kind : "system";
|
|
1384
|
+
const line = { key, kind, text: String((_a = e.text) != null ? _a : "") };
|
|
1385
|
+
if (kind === "agent") line.name = e.author.name || t["live.agent"];
|
|
1386
|
+
lines.push(line);
|
|
1387
|
+
} else if (e.type === "agent.joined") {
|
|
1388
|
+
const agent = data.agent || {};
|
|
1389
|
+
lines.push({ key, kind: "system", text: format(t["live.joined"], { name: agent.name || t["live.agent"] }) });
|
|
1390
|
+
} else if (e.type === "conversation.closed") {
|
|
1391
|
+
lines.push({ key, kind: "system", text: t["live.ended"] });
|
|
1392
|
+
} else if (e.type === "conversation.ticket") {
|
|
1393
|
+
const n = data.ticketNumber;
|
|
1394
|
+
lines.push({ key, kind: "system", text: typeof n === "number" ? `${t["live.ticket"]} ${format(t["live.number"], { number: n })}` : t["live.ticket"] });
|
|
1395
|
+
}
|
|
1396
|
+
}
|
|
1397
|
+
for (const p of chat.pending) lines.push({ key: `p${p.clientId}`, kind: "visitor", text: p.text, status: p.status, clientId: p.clientId });
|
|
1398
|
+
return lines;
|
|
1399
|
+
}
|
|
1400
|
+
function liveWaitLeft(conversation, now) {
|
|
1401
|
+
if (conversation.state !== "queued" || !conversation.queueDeadline) return null;
|
|
1402
|
+
const end = Date.parse(conversation.queueDeadline);
|
|
1403
|
+
if (!isFinite(end)) return null;
|
|
1404
|
+
return Math.max(0, Math.ceil((end - now) / 1e3));
|
|
1405
|
+
}
|
|
1406
|
+
var liveClock = (seconds) => `${Math.floor(seconds / 60)}:${String(seconds % 60).padStart(2, "0")}`;
|
|
1407
|
+
function liveStatus(conversation, t, now) {
|
|
1408
|
+
switch (conversation.state) {
|
|
1409
|
+
case "queued": {
|
|
1410
|
+
const left = liveWaitLeft(conversation, now);
|
|
1411
|
+
return left === null ? t["live.waiting"] : format(t["live.waitingLeft"], { time: liveClock(left) });
|
|
1412
|
+
}
|
|
1413
|
+
case "active":
|
|
1414
|
+
return format(t["live.with"], { name: conversation.agent && conversation.agent.name || t["live.agent"] });
|
|
1415
|
+
case "ticket": {
|
|
1416
|
+
const n = conversation.ticket ? conversation.ticket.number : null;
|
|
1417
|
+
const parts = [conversation.ticket && conversation.ticket.reason === "timeout" ? t["live.timeout"] : "", t["live.ticket"], n != null ? format(t["live.number"], { number: n }) : ""];
|
|
1418
|
+
return parts.filter(Boolean).join(" ");
|
|
1419
|
+
}
|
|
1420
|
+
default:
|
|
1421
|
+
return t["live.ended"];
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
function liveUnavailableText(reason, t, time) {
|
|
1425
|
+
if (reason === "closed") return time ? format(t["live.closedUntil"], { time }) : t["live.closed"];
|
|
1426
|
+
if (reason === "no_agents") return t["live.busy"];
|
|
1427
|
+
return "";
|
|
1428
|
+
}
|
|
1429
|
+
function withLiveChip(chips, label) {
|
|
1430
|
+
const i = chips.findIndex((c) => c.kind === "contact");
|
|
1431
|
+
if (i < 0 || chips.some((c) => c.kind === "live")) return chips;
|
|
1432
|
+
const contact = chips[i];
|
|
1433
|
+
const chip = { id: "live", label, kind: "live", ...contact.prefill ? { prefill: contact.prefill } : {} };
|
|
1434
|
+
return [...chips.slice(0, i), chip, ...chips.slice(i)];
|
|
1435
|
+
}
|
|
1000
1436
|
export {
|
|
1001
1437
|
AI_ANSWER_MAX,
|
|
1002
1438
|
AI_QUESTION_MAX,
|
|
1439
|
+
LIVE_AVAILABILITY_TTL_MS,
|
|
1440
|
+
LIVE_MESSAGE_MAX,
|
|
1441
|
+
LIVE_TYPING_HIDE_MS,
|
|
1442
|
+
LIVE_TYPING_INTERVAL_MS,
|
|
1003
1443
|
RTL_LOCALES,
|
|
1004
1444
|
SUPPORTED_LOCALES,
|
|
1005
1445
|
UI_TEXTS,
|
|
@@ -1009,9 +1449,23 @@ export {
|
|
|
1009
1449
|
eventsPayload,
|
|
1010
1450
|
format,
|
|
1011
1451
|
groupKey,
|
|
1452
|
+
isLiveClientId,
|
|
1453
|
+
isLiveFinal,
|
|
1012
1454
|
isRtl,
|
|
1013
1455
|
isSpacelessScript,
|
|
1014
1456
|
keyTerms,
|
|
1457
|
+
liveAddPending,
|
|
1458
|
+
liveApplyConversation,
|
|
1459
|
+
liveApplyEvent,
|
|
1460
|
+
liveApplySync,
|
|
1461
|
+
liveBackoff,
|
|
1462
|
+
liveClock,
|
|
1463
|
+
liveLines,
|
|
1464
|
+
liveSetPending,
|
|
1465
|
+
liveStart,
|
|
1466
|
+
liveStatus,
|
|
1467
|
+
liveUnavailableText,
|
|
1468
|
+
liveWaitLeft,
|
|
1015
1469
|
matchQuestion,
|
|
1016
1470
|
normalizeWords,
|
|
1017
1471
|
pendingQuestion,
|
|
@@ -1022,5 +1476,6 @@ export {
|
|
|
1022
1476
|
toBubbles,
|
|
1023
1477
|
transcriptOf,
|
|
1024
1478
|
uiTexts,
|
|
1479
|
+
withLiveChip,
|
|
1025
1480
|
withinOneEdit
|
|
1026
1481
|
};
|