@opencx/widget-core 4.0.52 → 4.0.53

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 (45) hide show
  1. package/dist/index.cjs +2 -2
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +282 -168
  4. package/dist/index.js.map +1 -1
  5. package/dist/src/translation/ar.d.ts.map +1 -1
  6. package/dist/src/translation/bg.d.ts.map +1 -1
  7. package/dist/src/translation/bn.d.ts.map +1 -1
  8. package/dist/src/translation/cs.d.ts.map +1 -1
  9. package/dist/src/translation/da.d.ts.map +1 -1
  10. package/dist/src/translation/de.d.ts.map +1 -1
  11. package/dist/src/translation/el.d.ts.map +1 -1
  12. package/dist/src/translation/en.d.ts.map +1 -1
  13. package/dist/src/translation/es.d.ts.map +1 -1
  14. package/dist/src/translation/et.d.ts.map +1 -1
  15. package/dist/src/translation/fi.d.ts.map +1 -1
  16. package/dist/src/translation/fil.d.ts.map +1 -1
  17. package/dist/src/translation/fr.d.ts.map +1 -1
  18. package/dist/src/translation/hi.d.ts.map +1 -1
  19. package/dist/src/translation/hr.d.ts.map +1 -1
  20. package/dist/src/translation/hu.d.ts.map +1 -1
  21. package/dist/src/translation/index.d.ts +3 -0
  22. package/dist/src/translation/index.d.ts.map +1 -1
  23. package/dist/src/translation/is.d.ts.map +1 -1
  24. package/dist/src/translation/it.d.ts.map +1 -1
  25. package/dist/src/translation/ja.d.ts.map +1 -1
  26. package/dist/src/translation/ko.d.ts.map +1 -1
  27. package/dist/src/translation/lb.d.ts.map +1 -1
  28. package/dist/src/translation/lt.d.ts.map +1 -1
  29. package/dist/src/translation/lv.d.ts.map +1 -1
  30. package/dist/src/translation/mt.d.ts.map +1 -1
  31. package/dist/src/translation/nb.d.ts.map +1 -1
  32. package/dist/src/translation/nl.d.ts.map +1 -1
  33. package/dist/src/translation/no.d.ts.map +1 -1
  34. package/dist/src/translation/pl.d.ts.map +1 -1
  35. package/dist/src/translation/pt.d.ts.map +1 -1
  36. package/dist/src/translation/ro.d.ts.map +1 -1
  37. package/dist/src/translation/ru.d.ts.map +1 -1
  38. package/dist/src/translation/sk.d.ts.map +1 -1
  39. package/dist/src/translation/sv.d.ts.map +1 -1
  40. package/dist/src/translation/th.d.ts.map +1 -1
  41. package/dist/src/translation/tr.d.ts.map +1 -1
  42. package/dist/src/translation/ur.d.ts.map +1 -1
  43. package/dist/src/translation/vi.d.ts.map +1 -1
  44. package/dist/src/translation/zh-cn.d.ts.map +1 -1
  45. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -1,15 +1,15 @@
1
- import D from "openapi-fetch";
1
+ import N from "openapi-fetch";
2
2
  import V from "lodash.isequal";
3
3
  import { v4 as L } from "uuid";
4
- const F = (_) => {
4
+ const H = (_) => {
5
5
  console.log(_.error);
6
- }, H = (_) => {
7
- const o = D({
6
+ }, F = (_) => {
7
+ const o = N({
8
8
  baseUrl: _.baseUrl
9
9
  }), i = {
10
10
  onRequest: _.onRequest,
11
11
  onResponse: _.onResponse,
12
- onError: _.onError || F
12
+ onError: _.onError || H
13
13
  };
14
14
  return o.use(i), o;
15
15
  };
@@ -27,7 +27,7 @@ class M {
27
27
  }, this.createOpenAPIClient = ({
28
28
  baseUrl: e,
29
29
  headers: t
30
- }) => H({
30
+ }) => F({
31
31
  baseUrl: e,
32
32
  onRequest: ({ request: a }) => {
33
33
  Object.entries(t).forEach(([n, r]) => {
@@ -73,9 +73,9 @@ class M {
73
73
  abortSignal: t,
74
74
  onProgress: a
75
75
  }) => new Promise((n, r) => {
76
- var k;
77
- const u = new FormData();
78
- u.append("file", e);
76
+ var y;
77
+ const d = new FormData();
78
+ d.append("file", e);
79
79
  const c = new XMLHttpRequest();
80
80
  if (t && (t.addEventListener("abort", () => {
81
81
  c.abort(), r(new DOMException("Aborted", "AbortError"));
@@ -83,18 +83,18 @@ class M {
83
83
  r(new DOMException("Aborted", "AbortError"));
84
84
  return;
85
85
  }
86
- c.upload.addEventListener("progress", (m) => {
87
- if (m.lengthComputable && a) {
88
- const w = Math.round(m.loaded / m.total * 100);
89
- a(w);
86
+ c.upload.addEventListener("progress", (g) => {
87
+ if (g.lengthComputable && a) {
88
+ const k = Math.round(g.loaded / g.total * 100);
89
+ a(k);
90
90
  }
91
91
  }), c.addEventListener("load", () => {
92
92
  if (c.status >= 200 && c.status < 300)
93
93
  try {
94
- const m = JSON.parse(c.responseText);
95
- n(m);
96
- } catch (m) {
97
- r(new Error(`Failed to parse response: ${m}`));
94
+ const g = JSON.parse(c.responseText);
95
+ n(g);
96
+ } catch (g) {
97
+ r(new Error(`Failed to parse response: ${g}`));
98
98
  }
99
99
  else
100
100
  r(new Error(`Upload failed with status: ${c.status}`));
@@ -104,7 +104,7 @@ class M {
104
104
  r(new Error("Upload timed out"));
105
105
  });
106
106
  const { baseUrl: v } = this.constructClientOptions(this.userToken), b = `${v}/backend/widget/v2/upload`;
107
- c.open("POST", b), c.setRequestHeader("X-Bot-Token", this.config.token), this.userToken ?? ((k = this.config.user) == null ? void 0 : k.token) ? c.setRequestHeader("Authorization", `Bearer ${this.userToken}`) : console.error("User token not set"), c.send(u);
107
+ c.open("POST", b), c.setRequestHeader("X-Bot-Token", this.config.token), this.userToken ?? ((y = this.config.user) == null ? void 0 : y.token) ? c.setRequestHeader("Authorization", `Bearer ${this.userToken}`) : console.error("User token not set"), c.send(d);
108
108
  }), this.vote = async (e) => await this.client.POST("/backend/widget/v2/chat/vote", { body: e }), this.resolveSession = async (e, t) => await this.client.POST("/backend/widget/v2/session/resolve", {
109
109
  body: e,
110
110
  signal: t
@@ -117,7 +117,7 @@ class M {
117
117
  this.client = this.createOpenAPIClient({ baseUrl: i, headers: l });
118
118
  }
119
119
  }
120
- function B(_, o) {
120
+ function K(_, o) {
121
121
  console.error(`Missing case for ${_} in ${o}`);
122
122
  }
123
123
  class S {
@@ -172,7 +172,7 @@ class O {
172
172
  };
173
173
  }
174
174
  }
175
- function U(_) {
175
+ function R(_) {
176
176
  try {
177
177
  const o = _();
178
178
  return o instanceof Promise ? o.then((i) => ({ data: i })).catch((i) => ({ error: i })) : { data: o };
@@ -180,7 +180,7 @@ function U(_) {
180
180
  return { error: o };
181
181
  }
182
182
  }
183
- class K {
183
+ class B {
184
184
  constructor({
185
185
  api: o,
186
186
  config: i,
@@ -215,24 +215,24 @@ class K {
215
215
  var v;
216
216
  const n = this.messageCtx.state.get().messages.length === 0;
217
217
  n && this.messageCtx.state.setPartial({ isInitialFetchLoading: !0 });
218
- const r = this.messageCtx.state.get().messages, u = r.length > 0 ? ((v = r[r.length - 1]) == null ? void 0 : v.timestamp) ?? void 0 : void 0, { data: c } = await this.api.pollSessionAndHistory({
218
+ const r = this.messageCtx.state.get().messages, d = r.length > 0 ? ((v = r[r.length - 1]) == null ? void 0 : v.timestamp) ?? void 0 : void 0, { data: c } = await this.api.pollSessionAndHistory({
219
219
  sessionId: e,
220
220
  abortSignal: t,
221
- lastMessageTimestamp: a ? void 0 : u
221
+ lastMessageTimestamp: a ? void 0 : d
222
222
  });
223
223
  if (c != null && c.session && (this.sessionCtx.sessionState.setPartial({ session: c.session }), this.sessionCtx.setSessions([c.session])), c != null && c.history && c.history.length > 0) {
224
- const f = this.messageCtx.state.get().messages, b = c.history.map(this.mapHistoryToMessage).filter((d) => d !== null).filter(
225
- (d) => !f.some((k) => k.id === d.id)
224
+ const f = this.messageCtx.state.get().messages, b = c.history.map(this.mapHistoryToMessage).filter((u) => u !== null).filter(
225
+ (u) => !f.some((y) => y.id === u.id)
226
226
  );
227
227
  if (this.messageCtx.state.setPartial({
228
228
  messages: [...f, ...b]
229
229
  }), n)
230
230
  this.messageCtx.markAsDispatchedToOnMessageReceivedHook(
231
- b.map((d) => d.id)
231
+ b.map((u) => u.id)
232
232
  );
233
233
  else
234
- for (const d of b)
235
- this.messageCtx.dispatchToOnMessageReceivedHook(d);
234
+ for (const u of b)
235
+ this.messageCtx.dispatchToOnMessageReceivedHook(u);
236
236
  }
237
237
  this.messageCtx.state.get().isInitialFetchLoading && this.messageCtx.state.setPartial({ isInitialFetchLoading: !1 });
238
238
  }, this.mapHistoryToMessage = (e) => {
@@ -333,7 +333,7 @@ class K {
333
333
  case "none":
334
334
  return null;
335
335
  default:
336
- return B(
336
+ return K(
337
337
  e.systemMessagePayload,
338
338
  this.constructSystemMessage.name
339
339
  ), null;
@@ -342,7 +342,7 @@ class K {
342
342
  const t = e.result;
343
343
  if (t === null || typeof t != "object") return t;
344
344
  if ("responseBodyText" in t && typeof t.responseBodyText == "string") {
345
- const a = t.responseBodyText, n = U(() => JSON.parse(a)).data;
345
+ const a = t.responseBodyText, n = R(() => JSON.parse(a)).data;
346
346
  if (n) return n;
347
347
  }
348
348
  return e.result;
@@ -360,26 +360,26 @@ class J {
360
360
  var s;
361
361
  return !!(!((s = this.state.get().contact) != null && s.token) && this.config.collectUserData);
362
362
  }, this.autoCreateUnverifiedUserIfNotExists = async () => {
363
- var s, e, t, a, n, r, u, c, v, f, b, d, k, m;
363
+ var s, e, t, a, n, r, d, c, v, f, b, u, y, g;
364
364
  if (!((s = this.config.user) != null && s.token)) {
365
365
  if (this.config.collectUserData && !((t = (e = this.config.user) == null ? void 0 : e.data) != null && t.email)) {
366
366
  if ((a = this.config.extraDataCollectionFields) != null && a.length)
367
367
  return;
368
- const w = await ((n = this.storageCtx) == null ? void 0 : n.getContactToken());
369
- w && await this.setUnverifiedContact(w);
368
+ const k = await ((n = this.storageCtx) == null ? void 0 : n.getContactToken());
369
+ k && await this.setUnverifiedContact(k);
370
370
  return;
371
371
  }
372
- if (!((u = (r = this.config.user) == null ? void 0 : r.data) != null && u.email)) {
373
- const w = await ((c = this.storageCtx) == null ? void 0 : c.getContactToken());
374
- if (w) {
375
- await this.setUnverifiedContact(w);
372
+ if (!((d = (r = this.config.user) == null ? void 0 : r.data) != null && d.email)) {
373
+ const k = await ((c = this.storageCtx) == null ? void 0 : c.getContactToken());
374
+ if (k) {
375
+ await this.setUnverifiedContact(k);
376
376
  return;
377
377
  }
378
378
  }
379
379
  await this.createUnverifiedContact({
380
380
  email: (f = (v = this.config.user) == null ? void 0 : v.data) == null ? void 0 : f.email,
381
- non_verified_name: (d = (b = this.config.user) == null ? void 0 : b.data) == null ? void 0 : d.name,
382
- non_verified_custom_data: (m = (k = this.config.user) == null ? void 0 : k.data) == null ? void 0 : m.customData
381
+ non_verified_name: (u = (b = this.config.user) == null ? void 0 : b.data) == null ? void 0 : u.name,
382
+ non_verified_custom_data: (g = (y = this.config.user) == null ? void 0 : y.data) == null ? void 0 : g.customData
383
383
  });
384
384
  }
385
385
  }, this.createUnverifiedContact = async (s, e) => {
@@ -395,9 +395,9 @@ class J {
395
395
  this.state.setPartial({ isCreatingUnverifiedContact: !1 });
396
396
  }
397
397
  }, this.setUnverifiedContact = async (s) => {
398
- var a, n, r, u;
398
+ var a, n, r, d;
399
399
  const e = await ((a = this.storageCtx) == null ? void 0 : a.getExternalContactId()), t = ((n = this.config.user) == null ? void 0 : n.externalId) || e || L();
400
- this.api.setAuthToken(s), await ((r = this.storageCtx) == null ? void 0 : r.setContactToken(s)), await ((u = this.storageCtx) == null ? void 0 : u.setExternalContactId(t)), this.state.setPartial({ contact: { token: s, externalId: t } });
400
+ this.api.setAuthToken(s), await ((r = this.storageCtx) == null ? void 0 : r.setContactToken(s)), await ((d = this.storageCtx) == null ? void 0 : d.setExternalContactId(t)), this.state.setPartial({ contact: { token: s, externalId: t } });
401
401
  }, this.config = o, this.storageCtx = l, this.api = i, this.state = new S({
402
402
  contact: (h = o.user) != null && h.token ? {
403
403
  token: o.user.token,
@@ -452,7 +452,7 @@ class q {
452
452
  }, this.config = o, this.api = i, this.sessionCtx = l, this.messageCtx = h;
453
453
  }
454
454
  }
455
- class W {
455
+ class G {
456
456
  constructor({
457
457
  config: o,
458
458
  api: i,
@@ -488,11 +488,11 @@ class W {
488
488
  Object.entries(this.config.sessionCustomData || {}).map(
489
489
  ([s, e]) => {
490
490
  var t;
491
- return typeof e == "string" ? [s, e] : typeof e == "boolean" ? [s, e] : typeof e == "number" ? [s, e] : [s, ((t = U(() => JSON.stringify(e))) == null ? void 0 : t.data) || ""];
491
+ return typeof e == "string" ? [s, e] : typeof e == "boolean" ? [s, e] : typeof e == "number" ? [s, e] : [s, ((t = R(() => JSON.stringify(e))) == null ? void 0 : t.data) || ""];
492
492
  }
493
493
  )
494
494
  ), this.createSession = async () => {
495
- var n, r, u;
495
+ var n, r, d;
496
496
  this.sessionState.setPartial({ session: null, isCreatingSession: !0 });
497
497
  const s = (n = this.contactCtx.state.get().contact) == null ? void 0 : n.externalId, e = {
498
498
  ...this.getParsedCustomData(),
@@ -500,7 +500,7 @@ class W {
500
500
  }, { data: t, error: a } = await this.api.createSession({
501
501
  customData: Object.keys(e).length > 0 ? e : void 0
502
502
  });
503
- return t ? (this.sessionState.setPartial({ session: t, isCreatingSession: !1 }), (u = (r = this.config.hooks) == null ? void 0 : r.onSessionCreated) == null || u.call(r, { session: t }), t) : (this.sessionState.setPartial({ isCreatingSession: !1 }), console.error("Failed to create session:", a), null);
503
+ return t ? (this.sessionState.setPartial({ session: t, isCreatingSession: !1 }), (d = (r = this.config.hooks) == null ? void 0 : r.onSessionCreated) == null || d.call(r, { session: t }), t) : (this.sessionState.setPartial({ isCreatingSession: !1 }), console.error("Failed to create session:", a), null);
504
504
  }, this.loadMoreSessions = async () => {
505
505
  if (this.sessionsState.get().isLastPage) return;
506
506
  const { data: s } = await this.getSessions({
@@ -508,7 +508,7 @@ class W {
508
508
  });
509
509
  if (s) {
510
510
  const t = [...this.sessionsState.get().data, ...s.items].filter(
511
- (a, n, r) => n === r.findIndex((u) => a.id === u.id)
511
+ (a, n, r) => n === r.findIndex((d) => a.id === d.id)
512
512
  );
513
513
  this.sessionsState.setPartial({
514
514
  data: t,
@@ -555,7 +555,7 @@ class W {
555
555
  }, this.config = o, this.api = i, this.contactCtx = l, this.sessionsPollingIntervalSeconds = h, this.registerSessionsRefresherWrapper();
556
556
  }
557
557
  }
558
- class Y {
558
+ class W {
559
559
  constructor({
560
560
  config: o,
561
561
  api: i,
@@ -580,7 +580,7 @@ class Y {
580
580
  (e) => this.messageIdsDispatchedToOnMessageReceivedHook.add(e)
581
581
  );
582
582
  }, this.sendMessage = async (s) => {
583
- var t, a, n, r, u, c, v, f, b;
583
+ var t, a, n, r, d, c, v, f, b;
584
584
  let e;
585
585
  try {
586
586
  if (!s.content.trim() && (!s.attachments || s.attachments.length === 0)) {
@@ -589,37 +589,37 @@ class Y {
589
589
  );
590
590
  return;
591
591
  }
592
- const d = this.sessionCtx.sessionState.get().session, m = (d == null ? void 0 : d.assignee.kind) === "ai", w = this.state.get().isSendingMessageToAI, I = this.state.get().messages.at(-1);
593
- if (this.config.disableSendingWhenAwaitingAIReply !== !1 && (w || // If last message is from user, then bot response did not arrive yet
594
- m && (I == null ? void 0 : I.type) === "USER")) {
592
+ const u = this.sessionCtx.sessionState.get().session, g = (u == null ? void 0 : u.assignee.kind) === "ai", k = this.state.get().isSendingMessageToAI, x = this.state.get().messages.at(-1);
593
+ if (this.config.disableSendingWhenAwaitingAIReply !== !1 && (k || // If last message is from user, then bot response did not arrive yet
594
+ g && (x == null ? void 0 : x.type) === "USER")) {
595
595
  console.warn("Cannot send messages while awaiting AI response");
596
596
  return;
597
597
  }
598
598
  this.sendMessageAbortController.abort("Superseded by a newer message"), this.sendMessageAbortController = new AbortController(), e = this.sendMessageAbortController, this.state.setPartial({
599
599
  lastAIResMightSolveUserIssue: !1,
600
600
  isSendingMessage: !0,
601
- isSendingMessageToAI: !!m || !d
601
+ isSendingMessageToAI: !!g || !u
602
602
  });
603
- const P = this.state.get().messages, T = !((t = this.sessionCtx.sessionState.get().session) != null && t.id) && P.length === 0 && ((a = this.config.advancedInitialMessages) == null ? void 0 : a.some((g) => g.persistent)), j = T ? (this.config.advancedInitialMessages || []).filter((g) => g.persistent).map(
604
- (g) => ({
603
+ const j = this.state.get().messages, P = !((t = this.sessionCtx.sessionState.get().session) != null && t.id) && j.length === 0 && ((a = this.config.advancedInitialMessages) == null ? void 0 : a.some((m) => m.persistent)), T = P ? (this.config.advancedInitialMessages || []).filter((m) => m.persistent).map(
604
+ (m) => ({
605
605
  id: C(),
606
606
  component: "bot_message",
607
607
  type: "AI",
608
608
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
609
609
  data: {
610
- message: g.message
610
+ message: m.message
611
611
  },
612
612
  agent: this.config.bot ? { ...this.config.bot, isAi: !0, id: null } : void 0
613
613
  })
614
- ) : [], z = this.toUserMessage(
614
+ ) : [], I = this.toUserMessage(
615
615
  s.content.trim(),
616
616
  s.attachments || void 0
617
617
  );
618
618
  if (this.state.setPartial({
619
619
  messages: [
620
+ ...T,
620
621
  ...j,
621
- ...P,
622
- z
622
+ I
623
623
  ]
624
624
  }), !((n = this.sessionCtx.sessionState.get().session) != null && n.id)) {
625
625
  if (!await this.sessionCtx.createSession()) {
@@ -632,13 +632,13 @@ class Y {
632
632
  if (!A) return;
633
633
  const { data: p } = await this.api.sendMessage(
634
634
  {
635
- uuid: z.id,
635
+ uuid: I.id,
636
636
  bot_token: this.config.token,
637
637
  headers: this.config.headers,
638
638
  query_params: this.config.queryParams,
639
639
  body_properties: this.config.bodyProperties,
640
640
  session_id: A,
641
- content: z.content,
641
+ content: I.content,
642
642
  attachments: s.attachments,
643
643
  clientContext: this.config.context,
644
644
  custom_data: {
@@ -647,41 +647,41 @@ class Y {
647
647
  },
648
648
  language: this.config.language,
649
649
  exit_mode_prompt: s.exitModePrompt,
650
- initial_messages: T ? j.map((g) => ({
651
- uuid: g.id,
652
- content: g.data.message
650
+ initial_messages: P ? T.map((m) => ({
651
+ uuid: m.id,
652
+ content: m.data.message
653
653
  })) : void 0
654
654
  },
655
655
  e.signal
656
656
  );
657
657
  if (p != null && p.success) {
658
- const g = this.toBotMessage(p);
659
- if (g) {
660
- const x = this.state.get().messages;
661
- if (!!x.some(
662
- (N) => N.id === g.id
658
+ const m = this.toBotMessage(p);
659
+ if (m) {
660
+ const z = this.state.get().messages;
661
+ if (!!z.some(
662
+ (D) => D.id === m.id
663
663
  )) {
664
664
  this.state.setPartial({
665
- lastAIResMightSolveUserIssue: ((u = p.autopilotResponse) == null ? void 0 : u.mightSolveUserIssue) || ((c = p.uiResponse) == null ? void 0 : c.mightSolveUserIssue)
665
+ lastAIResMightSolveUserIssue: ((d = p.autopilotResponse) == null ? void 0 : d.mightSolveUserIssue) || ((c = p.uiResponse) == null ? void 0 : c.mightSolveUserIssue)
666
666
  });
667
667
  return;
668
668
  }
669
669
  this.state.setPartial({
670
- messages: [...x, g],
670
+ messages: [...z, m],
671
671
  lastAIResMightSolveUserIssue: ((v = p.autopilotResponse) == null ? void 0 : v.mightSolveUserIssue) || ((f = p.uiResponse) == null ? void 0 : f.mightSolveUserIssue)
672
- }), this.dispatchToOnMessageReceivedHook(g);
672
+ }), this.dispatchToOnMessageReceivedHook(m);
673
673
  }
674
674
  p.session && this.sessionCtx.sessionState.setPartial({ session: p.session });
675
675
  } else {
676
- const g = this.toBotErrorMessage(
676
+ const m = this.toBotErrorMessage(
677
677
  ((b = p == null ? void 0 : p.error) == null ? void 0 : b.message) || "Something went wrong. Please refresh the page or try again."
678
- ), x = this.state.get().messages;
678
+ ), z = this.state.get().messages;
679
679
  this.state.setPartial({
680
- messages: [...x, g]
680
+ messages: [...z, m]
681
681
  });
682
682
  }
683
- } catch (d) {
684
- e != null && e.signal.aborted || console.error("Failed to send message:", d);
683
+ } catch (u) {
684
+ e != null && e.signal.aborted || console.error("Failed to send message:", u);
685
685
  } finally {
686
686
  e != null && e.signal.aborted || this.state.setPartial({
687
687
  isSendingMessage: !1,
@@ -691,7 +691,7 @@ class Y {
691
691
  }, this.toUserMessage = (s, e) => {
692
692
  const t = (() => {
693
693
  const a = this.contactCtx.state.get().extraCollectedData;
694
- return this.state.get().messages.length === 0 && a && Object.keys(a).length > 0 ? `${Object.entries(a).filter(([r, u]) => !!u).map(([r, u]) => `${r}: ${u}`).join(`
694
+ return this.state.get().messages.length === 0 && a && Object.keys(a).length > 0 ? `${Object.entries(a).filter(([r, d]) => !!d).map(([r, d]) => `${r}: ${d}`).join(`
695
695
  `)}
696
696
 
697
697
  ${s}` : s;
@@ -740,7 +740,7 @@ ${s}` : s;
740
740
  }), this.config = o, this.api = i, this.sessionCtx = l, this.contactCtx = h;
741
741
  }
742
742
  }
743
- class G {
743
+ class Y {
744
744
  constructor({
745
745
  config: o,
746
746
  contactCtx: i,
@@ -756,14 +756,14 @@ class G {
756
756
  });
757
757
  }), this.sessionCtx.sessionsState.subscribe(
758
758
  ({ isInitialFetchLoading: e, data: t }) => {
759
- var a, n, r, u;
759
+ var a, n, r, d;
760
760
  if ((a = this.config.router) != null && a.chatScreenOnly && // Do not route to a chat if we are currently inside one already
761
761
  // This also applies to newly created sessions; the new session will be in `sessionState` before it is refreshed and included in `sessionsState`
762
762
  !((n = this.sessionCtx.sessionState.get().session) != null && n.id)) {
763
763
  const c = (r = t.find((v) => v.isOpened)) == null ? void 0 : r.id;
764
764
  return c ? this.toChatScreen(c) : void 0;
765
765
  }
766
- t.length || ((u = this.config.router) == null ? void 0 : u.goToChatIfNoSessions) !== !1 && !e && this.state.get().screen !== "chat" && this.toChatScreen();
766
+ t.length || ((d = this.config.router) == null ? void 0 : d.goToChatIfNoSessions) !== !1 && !e && this.state.get().screen !== "chat" && this.toChatScreen();
767
767
  }
768
768
  );
769
769
  }, this.toSessionsScreen = () => {
@@ -799,7 +799,7 @@ class $ {
799
799
  }, this.getExternalContactId = async () => this.storage.get(this.KEYS.externalContactId(this.config.token)), this.storage = o, this.config = i;
800
800
  }
801
801
  }
802
- const y = class y {
802
+ const w = class w {
803
803
  constructor({
804
804
  config: o,
805
805
  storage: i,
@@ -808,7 +808,7 @@ const y = class y {
808
808
  }) {
809
809
  if (this.modes = [], this.resetChat = () => {
810
810
  this.sessionCtx.reset(), this.messageCtx.reset();
811
- }, !y.pollingIntervalsSeconds)
811
+ }, !w.pollingIntervalsSeconds)
812
812
  throw Error(
813
813
  "Widget polling values are not defined, did you call WidgetCtx.initialize()"
814
814
  );
@@ -816,12 +816,12 @@ const y = class y {
816
816
  api: this.api,
817
817
  config: this.config,
818
818
  storageCtx: this.storageCtx
819
- }), this.sessionCtx = new W({
819
+ }), this.sessionCtx = new G({
820
820
  config: this.config,
821
821
  api: this.api,
822
822
  contactCtx: this.contactCtx,
823
- sessionsPollingIntervalSeconds: y.pollingIntervalsSeconds.sessions
824
- }), this.messageCtx = new Y({
823
+ sessionsPollingIntervalSeconds: w.pollingIntervalsSeconds.sessions
824
+ }), this.messageCtx = new W({
825
825
  config: this.config,
826
826
  api: this.api,
827
827
  sessionCtx: this.sessionCtx,
@@ -831,13 +831,13 @@ const y = class y {
831
831
  api: this.api,
832
832
  sessionCtx: this.sessionCtx,
833
833
  messageCtx: this.messageCtx
834
- }), this.activeSessionPollingCtx = new K({
834
+ }), this.activeSessionPollingCtx = new B({
835
835
  api: this.api,
836
836
  config: this.config,
837
837
  sessionCtx: this.sessionCtx,
838
838
  messageCtx: this.messageCtx,
839
- sessionPollingIntervalSeconds: y.pollingIntervalsSeconds.session
840
- }), this.routerCtx = new G({
839
+ sessionPollingIntervalSeconds: w.pollingIntervalsSeconds.session
840
+ }), this.routerCtx = new Y({
841
841
  config: this.config,
842
842
  contactCtx: this.contactCtx,
843
843
  sessionCtx: this.sessionCtx,
@@ -845,7 +845,7 @@ const y = class y {
845
845
  });
846
846
  }
847
847
  };
848
- y.pollingIntervalsSeconds = null, y.initialize = async ({
848
+ w.pollingIntervalsSeconds = null, w.initialize = async ({
849
849
  config: o,
850
850
  storage: i
851
851
  }) => {
@@ -855,10 +855,10 @@ y.pollingIntervalsSeconds = null, y.initialize = async ({
855
855
  }).getExternalWidgetConfig();
856
856
  if (!l.data)
857
857
  throw new Error("Failed to fetch widget config");
858
- return y.pollingIntervalsSeconds = {
858
+ return w.pollingIntervalsSeconds = {
859
859
  session: ((h = l.data) == null ? void 0 : h.sessionPollingIntervalSeconds) || 10,
860
860
  sessions: ((s = l.data) == null ? void 0 : s.sessionsPollingIntervalSeconds) || 60
861
- }, new y({
861
+ }, new w({
862
862
  config: o,
863
863
  storage: i,
864
864
  modes: ((e = l.data) == null ? void 0 : e.modes) || [],
@@ -868,7 +868,7 @@ y.pollingIntervalsSeconds = null, y.initialize = async ({
868
868
  }
869
869
  });
870
870
  };
871
- let E = y;
871
+ let E = w;
872
872
  const Z = {
873
873
  write_a_message_placeholder: "اكتب رسالة...",
874
874
  your_issue_has_been_resolved: "تم حل مشكلتك!",
@@ -884,8 +884,11 @@ const Z = {
884
884
  optional: "اختياري",
885
885
  no_conversations_yet: "لا يوجد محادثات",
886
886
  back_to_conversations: "العودة إلى المحادثات",
887
- closed_conversations: "المحادثات المغلقة"
888
- }, X = {
887
+ closed_conversations: "المحادثات المغلقة",
888
+ csat_title: "كيف كانت محادثتك؟",
889
+ csat_submitted_title: "لقد قيّمت المحادثة بـ",
890
+ csat_feedback_placeholder: "أخبرنا المزيد... (اختياري)"
891
+ }, Q = {
889
892
  write_a_message_placeholder: "একটি বার্তা লিখুন...",
890
893
  your_issue_has_been_resolved: "আপনার সমস্যা সমাধান হয়েছে!",
891
894
  new_conversation: "নতুন কথোপকথন",
@@ -900,8 +903,11 @@ const Z = {
900
903
  optional: "ঐচ্ছিক",
901
904
  no_conversations_yet: "এখনো কোনো কথোপকথন নেই",
902
905
  back_to_conversations: "কথোপকথনে ফিরে যান",
903
- closed_conversations: "বন্ধ কথোপকথন"
904
- }, Q = {
906
+ closed_conversations: "বন্ধ কথোপকথন",
907
+ csat_title: "আপনার কথোপকথন কেমন ছিল?",
908
+ csat_submitted_title: "আপনি কথোপকথনটি মূল্যায়ন করেছেন",
909
+ csat_feedback_placeholder: "আমাদের আরও বলুন... (ঐচ্ছিক)"
910
+ }, X = {
905
911
  write_a_message_placeholder: "Напишете съобщение...",
906
912
  your_issue_has_been_resolved: "Вашият проблем е разрешен!",
907
913
  new_conversation: "Нов разговор",
@@ -916,7 +922,10 @@ const Z = {
916
922
  optional: "По избор",
917
923
  no_conversations_yet: "Все още няма разговори",
918
924
  back_to_conversations: "Назад към разговорите",
919
- closed_conversations: "Затворени разговори"
925
+ closed_conversations: "Затворени разговори",
926
+ csat_title: "Как мина разговорът ви?",
927
+ csat_submitted_title: "Оценихте разговора като",
928
+ csat_feedback_placeholder: "Кажете ни повече... (по желание)"
920
929
  }, ee = {
921
930
  write_a_message_placeholder: "Napište zprávu...",
922
931
  your_issue_has_been_resolved: "Váš problém byl vyřešen!",
@@ -932,7 +941,10 @@ const Z = {
932
941
  optional: "Volitelné",
933
942
  no_conversations_yet: "Zatím žádné konverzace",
934
943
  back_to_conversations: "Zpět na konverzace",
935
- closed_conversations: "Uzavřené konverzace"
944
+ closed_conversations: "Uzavřené konverzace",
945
+ csat_title: "Jaká byla vaše konverzace?",
946
+ csat_submitted_title: "Konverzaci jste ohodnotili jako",
947
+ csat_feedback_placeholder: "Řekněte nám více... (nepovinné)"
936
948
  }, te = {
937
949
  write_a_message_placeholder: "Skriv en besked...",
938
950
  your_issue_has_been_resolved: "Dit problem er løst!",
@@ -948,7 +960,10 @@ const Z = {
948
960
  optional: "Valgfrit",
949
961
  no_conversations_yet: "Ingen samtaler endnu",
950
962
  back_to_conversations: "Tilbage til samtaler",
951
- closed_conversations: "Lukkede samtaler"
963
+ closed_conversations: "Lukkede samtaler",
964
+ csat_title: "Hvordan var din samtale?",
965
+ csat_submitted_title: "Du vurderede samtalen som",
966
+ csat_feedback_placeholder: "Fortæl os mere... (valgfrit)"
952
967
  }, se = {
953
968
  write_a_message_placeholder: "Γράψτε ένα μήνυμα...",
954
969
  your_issue_has_been_resolved: "Το πρόβλημά σας επιλύθηκε!",
@@ -964,7 +979,10 @@ const Z = {
964
979
  optional: "Προαιρετικό",
965
980
  no_conversations_yet: "Δεν υπάρχουν συνομιλίες ακόμα",
966
981
  back_to_conversations: "Πίσω στις συνομιλίες",
967
- closed_conversations: "Κλειστές συνομιλίες"
982
+ closed_conversations: "Κλειστές συνομιλίες",
983
+ csat_title: "Πώς ήταν η συνομιλία σας;",
984
+ csat_submitted_title: "Βαθμολογήσατε τη συνομιλία ως",
985
+ csat_feedback_placeholder: "Πείτε μας περισσότερα... (προαιρετικό)"
968
986
  }, ae = {
969
987
  write_a_message_placeholder: "Nachricht schreiben...",
970
988
  your_issue_has_been_resolved: "Ihr Problem wurde gelöst!",
@@ -980,7 +998,10 @@ const Z = {
980
998
  optional: "Optional",
981
999
  no_conversations_yet: "noch keine Gespräche",
982
1000
  back_to_conversations: "Zurück zur Konversationen",
983
- closed_conversations: "Geschlossene Konversationen"
1001
+ closed_conversations: "Geschlossene Konversationen",
1002
+ csat_title: "Wie war Ihr Gespräch?",
1003
+ csat_submitted_title: "Sie haben das Gespräch bewertet als",
1004
+ csat_feedback_placeholder: "Erzählen Sie uns mehr... (optional)"
984
1005
  }, oe = {
985
1006
  write_a_message_placeholder: "Write a message...",
986
1007
  your_issue_has_been_resolved: "Your issue has been resolved!",
@@ -996,7 +1017,10 @@ const Z = {
996
1017
  optional: "Optional",
997
1018
  no_conversations_yet: "No conversations yet",
998
1019
  back_to_conversations: "Back to conversations",
999
- closed_conversations: "Closed conversations"
1020
+ closed_conversations: "Closed conversations",
1021
+ csat_title: "How was your conversation?",
1022
+ csat_submitted_title: "You rated the conversation as",
1023
+ csat_feedback_placeholder: "Tell us more... (optional)"
1000
1024
  }, ne = {
1001
1025
  write_a_message_placeholder: "Escribe un mensaje...",
1002
1026
  your_issue_has_been_resolved: "¡Tu problema fue resuelto!",
@@ -1012,7 +1036,10 @@ const Z = {
1012
1036
  optional: "Opcional",
1013
1037
  no_conversations_yet: "Sin conversaciones aún",
1014
1038
  back_to_conversations: "Volver a conversaciones",
1015
- closed_conversations: "Conversaciones cerradas"
1039
+ closed_conversations: "Conversaciones cerradas",
1040
+ csat_title: "¿Qué tal fue tu conversación?",
1041
+ csat_submitted_title: "Valoraste la conversación como",
1042
+ csat_feedback_placeholder: "Cuéntanos más... (opcional)"
1016
1043
  }, ie = {
1017
1044
  write_a_message_placeholder: "Magsulat ng mensahe...",
1018
1045
  your_issue_has_been_resolved: "Nalutas na ang iyong isyu!",
@@ -1028,7 +1055,10 @@ const Z = {
1028
1055
  optional: "Opsyonal",
1029
1056
  no_conversations_yet: "Wala pang mga usapan",
1030
1057
  back_to_conversations: "Bumalik sa mga usapan",
1031
- closed_conversations: "Mga saradong usapan"
1058
+ closed_conversations: "Mga saradong usapan",
1059
+ csat_title: "Kumusta ang iyong usapan?",
1060
+ csat_submitted_title: "Ni-rate mo ang usapan bilang",
1061
+ csat_feedback_placeholder: "Sabihin pa sa amin... (opsyonal)"
1032
1062
  }, re = {
1033
1063
  write_a_message_placeholder: "Kirjoita viesti...",
1034
1064
  your_issue_has_been_resolved: "Ongelmasi on ratkaistu!",
@@ -1044,7 +1074,10 @@ const Z = {
1044
1074
  optional: "Valinnainen",
1045
1075
  no_conversations_yet: "Ei vielä keskusteluja",
1046
1076
  back_to_conversations: "Takaisin keskusteluihin",
1047
- closed_conversations: "Suljetut keskustelut"
1077
+ closed_conversations: "Suljetut keskustelut",
1078
+ csat_title: "Millainen keskustelusi oli?",
1079
+ csat_submitted_title: "Arvioit keskustelun",
1080
+ csat_feedback_placeholder: "Kerro lisää... (valinnainen)"
1048
1081
  }, le = {
1049
1082
  write_a_message_placeholder: "Écrivez un message...",
1050
1083
  your_issue_has_been_resolved: "Votre problème a été résolu !",
@@ -1060,7 +1093,10 @@ const Z = {
1060
1093
  optional: "Optionnel",
1061
1094
  no_conversations_yet: "Aucune conversation pour le moment",
1062
1095
  back_to_conversations: "Retour aux conversations",
1063
- closed_conversations: "Conversations fermées"
1096
+ closed_conversations: "Conversations fermées",
1097
+ csat_title: "Comment s’est passée votre conversation ?",
1098
+ csat_submitted_title: "Vous avez évalué la conversation comme",
1099
+ csat_feedback_placeholder: "Dites-nous en plus... (facultatif)"
1064
1100
  }, ce = {
1065
1101
  write_a_message_placeholder: "एक संदेश लिखें...",
1066
1102
  your_issue_has_been_resolved: "आपकी समस्या हल हो गई है!",
@@ -1076,7 +1112,10 @@ const Z = {
1076
1112
  optional: "वैकल्पिक",
1077
1113
  no_conversations_yet: "अभी तक कोई बातचीत नहीं",
1078
1114
  back_to_conversations: "बातचीत पर वापस जाएं",
1079
- closed_conversations: "बंद बातचीत"
1115
+ closed_conversations: "बंद बातचीत",
1116
+ csat_title: "आपकी बातचीत कैसी रही?",
1117
+ csat_submitted_title: "आपने बातचीत को आंका",
1118
+ csat_feedback_placeholder: "हमें और बताएं... (वैकल्पिक)"
1080
1119
  }, _e = {
1081
1120
  write_a_message_placeholder: "Scrivi un messaggio...",
1082
1121
  your_issue_has_been_resolved: "Il tuo problema è stato risolto!",
@@ -1092,7 +1131,10 @@ const Z = {
1092
1131
  optional: "Opzionale",
1093
1132
  no_conversations_yet: "Nessuna conversazione ancora",
1094
1133
  back_to_conversations: "Torna alle conversazioni",
1095
- closed_conversations: "Conversazioni chiuse"
1134
+ closed_conversations: "Conversazioni chiuse",
1135
+ csat_title: "Com’è andata la tua conversazione?",
1136
+ csat_submitted_title: "Hai valutato la conversazione come",
1137
+ csat_feedback_placeholder: "Dicci di più... (facoltativo)"
1096
1138
  }, he = {
1097
1139
  write_a_message_placeholder: "メッセージを入力...",
1098
1140
  your_issue_has_been_resolved: "問題が解決しました!",
@@ -1108,8 +1150,11 @@ const Z = {
1108
1150
  optional: "任意",
1109
1151
  no_conversations_yet: "まだ会話がありません",
1110
1152
  back_to_conversations: "会話一覧に戻る",
1111
- closed_conversations: "終了した会話"
1112
- }, ue = {
1153
+ closed_conversations: "終了した会話",
1154
+ csat_title: "会話はいかがでしたか?",
1155
+ csat_submitted_title: "会話を次のように評価しました",
1156
+ csat_feedback_placeholder: "詳しく教えてください...(任意)"
1157
+ }, de = {
1113
1158
  write_a_message_placeholder: "메시지를 입력하세요...",
1114
1159
  your_issue_has_been_resolved: "문제가 해결되었습니다!",
1115
1160
  new_conversation: "새 대화",
@@ -1124,8 +1169,11 @@ const Z = {
1124
1169
  optional: "선택 사항",
1125
1170
  no_conversations_yet: "아직 대화가 없습니다",
1126
1171
  back_to_conversations: "대화 목록으로 돌아가기",
1127
- closed_conversations: "종료된 대화"
1128
- }, de = {
1172
+ closed_conversations: "종료된 대화",
1173
+ csat_title: "대화는 어떠셨나요?",
1174
+ csat_submitted_title: "대화를 다음과 같이 평가했습니다",
1175
+ csat_feedback_placeholder: "더 알려주세요... (선택 사항)"
1176
+ }, ue = {
1129
1177
  write_a_message_placeholder: "Schrijf een bericht...",
1130
1178
  your_issue_has_been_resolved: "Uw probleem is opgelost!",
1131
1179
  new_conversation: "Nieuw gesprek",
@@ -1140,8 +1188,11 @@ const Z = {
1140
1188
  optional: "Optioneel",
1141
1189
  no_conversations_yet: "Nog geen gesprekken",
1142
1190
  back_to_conversations: "Terug naar gesprekken",
1143
- closed_conversations: "Afgesloten gesprekken"
1144
- }, ge = {
1191
+ closed_conversations: "Afgesloten gesprekken",
1192
+ csat_title: "Hoe was je gesprek?",
1193
+ csat_submitted_title: "Je hebt het gesprek beoordeeld als",
1194
+ csat_feedback_placeholder: "Vertel ons meer... (optioneel)"
1195
+ }, me = {
1145
1196
  write_a_message_placeholder: "Skriv en melding...",
1146
1197
  your_issue_has_been_resolved: "Problemet ditt er løst!",
1147
1198
  new_conversation: "Ny samtale",
@@ -1156,8 +1207,11 @@ const Z = {
1156
1207
  optional: "Valgfritt",
1157
1208
  no_conversations_yet: "Ingen samtaler ennå",
1158
1209
  back_to_conversations: "Tilbake til samtaler",
1159
- closed_conversations: "Lukkede samtaler"
1160
- }, me = {
1210
+ closed_conversations: "Lukkede samtaler",
1211
+ csat_title: "Hvordan var samtalen din?",
1212
+ csat_submitted_title: "Du vurderte samtalen som",
1213
+ csat_feedback_placeholder: "Fortell oss mer... (valgfritt)"
1214
+ }, ge = {
1161
1215
  write_a_message_placeholder: "Napisz wiadomość...",
1162
1216
  your_issue_has_been_resolved: "Twój problem został rozwiązany!",
1163
1217
  new_conversation: "Nowa rozmowa",
@@ -1172,7 +1226,10 @@ const Z = {
1172
1226
  optional: "Opcjonalne",
1173
1227
  no_conversations_yet: "Jeszcze brak rozmów",
1174
1228
  back_to_conversations: "Powrót do rozmów",
1175
- closed_conversations: "Zamknięte rozmowy"
1229
+ closed_conversations: "Zamknięte rozmowy",
1230
+ csat_title: "Jak przebiegła Twoja rozmowa?",
1231
+ csat_submitted_title: "Oceniłeś rozmowę jako",
1232
+ csat_feedback_placeholder: "Powiedz nam więcej... (opcjonalnie)"
1176
1233
  }, pe = {
1177
1234
  write_a_message_placeholder: "Escreva uma mensagem...",
1178
1235
  your_issue_has_been_resolved: "Seu problema foi resolvido!",
@@ -1188,7 +1245,10 @@ const Z = {
1188
1245
  optional: "Opcional",
1189
1246
  no_conversations_yet: "Nenhuma conversa ainda",
1190
1247
  back_to_conversations: "Voltar para conversas",
1191
- closed_conversations: "Conversas fechadas"
1248
+ closed_conversations: "Conversas fechadas",
1249
+ csat_title: "Como foi a sua conversa?",
1250
+ csat_submitted_title: "Você avaliou a conversa como",
1251
+ csat_feedback_placeholder: "Conte-nos mais... (opcional)"
1192
1252
  }, ve = {
1193
1253
  write_a_message_placeholder: "Scrie un mesaj...",
1194
1254
  your_issue_has_been_resolved: "Problema ta a fost rezolvată!",
@@ -1204,7 +1264,10 @@ const Z = {
1204
1264
  optional: "Opțional",
1205
1265
  no_conversations_yet: "Încă nu există conversații",
1206
1266
  back_to_conversations: "Înapoi la conversații",
1207
- closed_conversations: "Conversații închise"
1267
+ closed_conversations: "Conversații închise",
1268
+ csat_title: "Cum a fost conversația ta?",
1269
+ csat_submitted_title: "Ai evaluat conversația ca",
1270
+ csat_feedback_placeholder: "Spune-ne mai multe... (opțional)"
1208
1271
  }, be = {
1209
1272
  write_a_message_placeholder: "Skriv ett meddelande...",
1210
1273
  your_issue_has_been_resolved: "Ditt problem har lösts!",
@@ -1220,7 +1283,10 @@ const Z = {
1220
1283
  optional: "Frivilligt",
1221
1284
  no_conversations_yet: "Inga konversationer ännu",
1222
1285
  back_to_conversations: "Tillbaka till konversationer",
1223
- closed_conversations: "Stängda konversationer"
1286
+ closed_conversations: "Stängda konversationer",
1287
+ csat_title: "Hur var din konversation?",
1288
+ csat_submitted_title: "Du betygsatte konversationen som",
1289
+ csat_feedback_placeholder: "Berätta mer... (valfritt)"
1224
1290
  }, fe = {
1225
1291
  write_a_message_placeholder: "Напишите сообщение...",
1226
1292
  your_issue_has_been_resolved: "Ваша проблема решена!",
@@ -1236,8 +1302,11 @@ const Z = {
1236
1302
  optional: "Необязательно",
1237
1303
  no_conversations_yet: "Пока нет разговоров",
1238
1304
  back_to_conversations: "Назад к разговорам",
1239
- closed_conversations: "Закрытые разговоры"
1240
- }, we = {
1305
+ closed_conversations: "Закрытые разговоры",
1306
+ csat_title: "Как прошёл ваш разговор?",
1307
+ csat_submitted_title: "Вы оценили разговор как",
1308
+ csat_feedback_placeholder: "Расскажите подробнее... (необязательно)"
1309
+ }, ke = {
1241
1310
  write_a_message_placeholder: "เขียนข้อความ...",
1242
1311
  your_issue_has_been_resolved: "ปัญหาของคุณได้รับการแก้ไขแล้ว!",
1243
1312
  new_conversation: "การสนทนาใหม่",
@@ -1252,8 +1321,11 @@ const Z = {
1252
1321
  optional: "ไม่บังคับ",
1253
1322
  no_conversations_yet: "ยังไม่มีการสนทนา",
1254
1323
  back_to_conversations: "กลับไปที่การสนทนา",
1255
- closed_conversations: "การสนทนาที่ปิดแล้ว"
1256
- }, ye = {
1324
+ closed_conversations: "การสนทนาที่ปิดแล้ว",
1325
+ csat_title: "การสนทนาของคุณเป็นอย่างไรบ้าง?",
1326
+ csat_submitted_title: "คุณให้คะแนนการสนทนาว่า",
1327
+ csat_feedback_placeholder: "บอกเราเพิ่มเติม... (ไม่บังคับ)"
1328
+ }, we = {
1257
1329
  write_a_message_placeholder: "Bir mesaj yazın...",
1258
1330
  your_issue_has_been_resolved: "Sorununuz çözüldü!",
1259
1331
  new_conversation: "Yeni konuşma",
@@ -1268,8 +1340,11 @@ const Z = {
1268
1340
  optional: "İsteğe bağlı",
1269
1341
  no_conversations_yet: "Henüz konuşma yok",
1270
1342
  back_to_conversations: "Konuşmalara geri dön",
1271
- closed_conversations: "Kapatılan konuşmalar"
1272
- }, ke = {
1343
+ closed_conversations: "Kapatılan konuşmalar",
1344
+ csat_title: "Görüşmeniz nasıldı?",
1345
+ csat_submitted_title: "Görüşmeyi şöyle değerlendirdiniz",
1346
+ csat_feedback_placeholder: "Bize daha fazlasını anlatın... (isteğe bağlı)"
1347
+ }, ye = {
1273
1348
  write_a_message_placeholder: "پیغام لکھیں...",
1274
1349
  your_issue_has_been_resolved: "آپ کا مسئلہ حل ہو گیا ہے!",
1275
1350
  new_conversation: "نئی گفتگو",
@@ -1284,7 +1359,10 @@ const Z = {
1284
1359
  optional: "اختیاری",
1285
1360
  no_conversations_yet: "ابھی تک کوئی گفتگو نہیں",
1286
1361
  back_to_conversations: "گفتگو پر واپس جائیں",
1287
- closed_conversations: "بند گفتگو"
1362
+ closed_conversations: "بند گفتگو",
1363
+ csat_title: "آپ کی گفتگو کیسی رہی؟",
1364
+ csat_submitted_title: "آپ نے گفتگو کو درجہ دیا",
1365
+ csat_feedback_placeholder: "ہمیں مزید بتائیں... (اختیاری)"
1288
1366
  }, Se = {
1289
1367
  write_a_message_placeholder: "Viết tin nhắn...",
1290
1368
  your_issue_has_been_resolved: "Vấn đề của bạn đã được giải quyết!",
@@ -1300,7 +1378,10 @@ const Z = {
1300
1378
  optional: "Tùy chọn",
1301
1379
  no_conversations_yet: "Chưa có cuộc trò chuyện nào",
1302
1380
  back_to_conversations: "Quay lại cuộc trò chuyện",
1303
- closed_conversations: "Cuộc trò chuyện đã đóng"
1381
+ closed_conversations: "Cuộc trò chuyện đã đóng",
1382
+ csat_title: "Cuộc trò chuyện của bạn thế nào?",
1383
+ csat_submitted_title: "Bạn đã đánh giá cuộc trò chuyện là",
1384
+ csat_feedback_placeholder: "Cho chúng tôi biết thêm... (tùy chọn)"
1304
1385
  }, Ce = {
1305
1386
  write_a_message_placeholder: "写一条消息...",
1306
1387
  your_issue_has_been_resolved: "您的问题已解决!",
@@ -1316,8 +1397,11 @@ const Z = {
1316
1397
  optional: "可选",
1317
1398
  no_conversations_yet: "暂无对话",
1318
1399
  back_to_conversations: "返回对话",
1319
- closed_conversations: "已关闭的对话"
1320
- }, xe = {
1400
+ closed_conversations: "已关闭的对话",
1401
+ csat_title: "您的对话感觉如何?",
1402
+ csat_submitted_title: "您将此对话评价为",
1403
+ csat_feedback_placeholder: "告诉我们更多...(可选)"
1404
+ }, ze = {
1321
1405
  write_a_message_placeholder: "Napišite poruku...",
1322
1406
  your_issue_has_been_resolved: "Vaš problem je riješen!",
1323
1407
  new_conversation: "Novi razgovor",
@@ -1332,8 +1416,11 @@ const Z = {
1332
1416
  optional: "Neobavezno",
1333
1417
  no_conversations_yet: "Još nema razgovora",
1334
1418
  back_to_conversations: "Natrag na razgovore",
1335
- closed_conversations: "Zatvoreni razgovori"
1336
- }, Ie = {
1419
+ closed_conversations: "Zatvoreni razgovori",
1420
+ csat_title: "Kakav je bio vaš razgovor?",
1421
+ csat_submitted_title: "Ocijenili ste razgovor kao",
1422
+ csat_feedback_placeholder: "Recite nam više... (neobavezno)"
1423
+ }, xe = {
1337
1424
  write_a_message_placeholder: "Kirjuta sõnum...",
1338
1425
  your_issue_has_been_resolved: "Teie probleem on lahendatud!",
1339
1426
  new_conversation: "Uus vestlus",
@@ -1348,8 +1435,11 @@ const Z = {
1348
1435
  optional: "Valikuline",
1349
1436
  no_conversations_yet: "Vestlusi pole veel",
1350
1437
  back_to_conversations: "Tagasi vestluste juurde",
1351
- closed_conversations: "Suletud vestlused"
1352
- }, ze = {
1438
+ closed_conversations: "Suletud vestlused",
1439
+ csat_title: "Milline oli teie vestlus?",
1440
+ csat_submitted_title: "Hindasite vestlust kui",
1441
+ csat_feedback_placeholder: "Rääkige meile rohkem... (valikuline)"
1442
+ }, Ie = {
1353
1443
  write_a_message_placeholder: "Írjon üzenetet...",
1354
1444
  your_issue_has_been_resolved: "A problémája megoldódott!",
1355
1445
  new_conversation: "Új beszélgetés",
@@ -1364,8 +1454,11 @@ const Z = {
1364
1454
  optional: "Opcionális",
1365
1455
  no_conversations_yet: "Még nincsenek beszélgetések",
1366
1456
  back_to_conversations: "Vissza a beszélgetésekhez",
1367
- closed_conversations: "Lezárt beszélgetések"
1368
- }, Pe = {
1457
+ closed_conversations: "Lezárt beszélgetések",
1458
+ csat_title: "Milyen volt a beszélgetése?",
1459
+ csat_submitted_title: "A beszélgetést így értékelte",
1460
+ csat_feedback_placeholder: "Mondjon többet... (opcionális)"
1461
+ }, je = {
1369
1462
  write_a_message_placeholder: "Skrifaðu skilaboð...",
1370
1463
  your_issue_has_been_resolved: "Málið þitt hefur verið leyst!",
1371
1464
  new_conversation: "Nýtt samtal",
@@ -1380,8 +1473,11 @@ const Z = {
1380
1473
  optional: "Valfrjálst",
1381
1474
  no_conversations_yet: "Engin samtöl ennþá",
1382
1475
  back_to_conversations: "Til baka í samtöl",
1383
- closed_conversations: "Lokuð samtöl"
1384
- }, Te = {
1476
+ closed_conversations: "Lokuð samtöl",
1477
+ csat_title: "Hvernig var samtalið þitt?",
1478
+ csat_submitted_title: "Þú gafst samtalinu einkunnina",
1479
+ csat_feedback_placeholder: "Segðu okkur meira... (valfrjálst)"
1480
+ }, Pe = {
1385
1481
  write_a_message_placeholder: "Rakstiet ziņojumu...",
1386
1482
  your_issue_has_been_resolved: "Jūsu problēma ir atrisināta!",
1387
1483
  new_conversation: "Jauna saruna",
@@ -1396,8 +1492,11 @@ const Z = {
1396
1492
  optional: "Neobligāts",
1397
1493
  no_conversations_yet: "Pagaidām nav sarunu",
1398
1494
  back_to_conversations: "Atpakaļ pie sarunām",
1399
- closed_conversations: "Slēgtās sarunas"
1400
- }, je = {
1495
+ closed_conversations: "Slēgtās sarunas",
1496
+ csat_title: "Kāda bija jūsu saruna?",
1497
+ csat_submitted_title: "Jūs novērtējāt sarunu kā",
1498
+ csat_feedback_placeholder: "Pastāstiet mums vairāk... (neobligāti)"
1499
+ }, Te = {
1401
1500
  write_a_message_placeholder: "Parašykite žinutę...",
1402
1501
  your_issue_has_been_resolved: "Jūsų problema išspręsta!",
1403
1502
  new_conversation: "Naujas pokalbis",
@@ -1412,7 +1511,10 @@ const Z = {
1412
1511
  optional: "Neprivaloma",
1413
1512
  no_conversations_yet: "Pokalbių dar nėra",
1414
1513
  back_to_conversations: "Grįžti į pokalbius",
1415
- closed_conversations: "Uždaryti pokalbiai"
1514
+ closed_conversations: "Uždaryti pokalbiai",
1515
+ csat_title: "Koks buvo jūsų pokalbis?",
1516
+ csat_submitted_title: "Pokalbį įvertinote kaip",
1517
+ csat_feedback_placeholder: "Papasakokite daugiau... (neprivaloma)"
1416
1518
  }, Ae = {
1417
1519
  write_a_message_placeholder: "Schreift eng Noriicht...",
1418
1520
  your_issue_has_been_resolved: "Äert Problem gouf geléist!",
@@ -1428,7 +1530,10 @@ const Z = {
1428
1530
  optional: "Fakultativ",
1429
1531
  no_conversations_yet: "Nach keng Konversatiounen",
1430
1532
  back_to_conversations: "Zréck zu de Konversatiounen",
1431
- closed_conversations: "Zougemaachte Konversatiounen"
1533
+ closed_conversations: "Zougemaachte Konversatiounen",
1534
+ csat_title: "Wéi war Är Konversatioun?",
1535
+ csat_submitted_title: "Dir hutt d’Konversatioun bewäert als",
1536
+ csat_feedback_placeholder: "Sot eis méi... (fakultativ)"
1432
1537
  }, Me = {
1433
1538
  write_a_message_placeholder: "Ikteb messaġġ...",
1434
1539
  your_issue_has_been_resolved: "Il-problema tiegħek ġiet riżolta!",
@@ -1444,7 +1549,10 @@ const Z = {
1444
1549
  optional: "Mhux obbligatorju",
1445
1550
  no_conversations_yet: "Għad m'hemmx konversazzjonijiet",
1446
1551
  back_to_conversations: "Lura għall-konversazzjonijiet",
1447
- closed_conversations: "Konversazzjonijiet magħluqa"
1552
+ closed_conversations: "Konversazzjonijiet magħluqa",
1553
+ csat_title: "Kif kienet il-konversazzjoni tiegħek?",
1554
+ csat_submitted_title: "Int ivvalutajt il-konversazzjoni bħala",
1555
+ csat_feedback_placeholder: "Għidilna aktar... (mhux obbligatorju)"
1448
1556
  }, Ee = {
1449
1557
  write_a_message_placeholder: "Skriv en melding...",
1450
1558
  your_issue_has_been_resolved: "Saken din er løst!",
@@ -1460,7 +1568,10 @@ const Z = {
1460
1568
  optional: "Valgfritt",
1461
1569
  no_conversations_yet: "Ingen samtaler ennå",
1462
1570
  back_to_conversations: "Tilbake til samtaler",
1463
- closed_conversations: "Lukkede samtaler"
1571
+ closed_conversations: "Lukkede samtaler",
1572
+ csat_title: "Hvordan var samtalen din?",
1573
+ csat_submitted_title: "Du vurderte samtalen som",
1574
+ csat_feedback_placeholder: "Fortell oss mer... (valgfritt)"
1464
1575
  }, Le = {
1465
1576
  write_a_message_placeholder: "Napíšte správu...",
1466
1577
  your_issue_has_been_resolved: "Váš problém bol vyriešený!",
@@ -1476,59 +1587,62 @@ const Z = {
1476
1587
  optional: "Voliteľné",
1477
1588
  no_conversations_yet: "Zatiaľ žiadne konverzácie",
1478
1589
  back_to_conversations: "Späť na konverzácie",
1479
- closed_conversations: "Uzavreté konverzácie"
1480
- }, R = {
1590
+ closed_conversations: "Uzavreté konverzácie",
1591
+ csat_title: "Aká bola vaša konverzácia?",
1592
+ csat_submitted_title: "Konverzáciu ste ohodnotili ako",
1593
+ csat_feedback_placeholder: "Povedzte nám viac... (nepovinné)"
1594
+ }, U = {
1481
1595
  ar: Z,
1482
- bn: X,
1483
- bg: Q,
1596
+ bn: Q,
1597
+ bg: X,
1484
1598
  cs: ee,
1485
1599
  da: te,
1486
1600
  de: ae,
1487
1601
  el: se,
1488
1602
  en: oe,
1489
1603
  es: ne,
1490
- et: Ie,
1604
+ et: xe,
1491
1605
  fi: re,
1492
1606
  fil: ie,
1493
1607
  fr: le,
1494
1608
  hi: ce,
1495
- hr: xe,
1496
- hu: ze,
1497
- is: Pe,
1609
+ hr: ze,
1610
+ hu: Ie,
1611
+ is: je,
1498
1612
  it: _e,
1499
1613
  ja: he,
1500
- ko: ue,
1614
+ ko: de,
1501
1615
  lb: Ae,
1502
- lt: je,
1503
- lv: Te,
1616
+ lt: Te,
1617
+ lv: Pe,
1504
1618
  mt: Me,
1505
1619
  nb: Ee,
1506
- nl: de,
1507
- no: ge,
1508
- pl: me,
1620
+ nl: ue,
1621
+ no: me,
1622
+ pl: ge,
1509
1623
  pt: pe,
1510
1624
  ro: ve,
1511
1625
  ru: fe,
1512
1626
  sk: Le,
1513
1627
  sv: be,
1514
- th: we,
1515
- tr: ye,
1516
- ur: ke,
1628
+ th: ke,
1629
+ tr: we,
1630
+ ur: ye,
1517
1631
  vi: Se,
1518
1632
  "zh-cn": Ce
1519
- }, Oe = Object.keys(R);
1520
- function Fe(_) {
1633
+ }, Oe = Object.keys(U);
1634
+ function He(_) {
1521
1635
  return Oe.includes(_);
1522
1636
  }
1523
- function He(_, o, i) {
1637
+ function Fe(_, o, i) {
1524
1638
  var l;
1525
- return ((l = i == null ? void 0 : i[o]) == null ? void 0 : l[_]) || R[o][_] || "";
1639
+ return ((l = i == null ? void 0 : i[o]) == null ? void 0 : l[_]) || U[o][_] || "";
1526
1640
  }
1527
1641
  export {
1528
1642
  S as PrimitiveState,
1529
1643
  E as WidgetCtx,
1530
- He as getTranslation,
1531
- B as isExhaustive,
1532
- Fe as isSupportedLanguage
1644
+ Fe as getTranslation,
1645
+ K as isExhaustive,
1646
+ He as isSupportedLanguage
1533
1647
  };
1534
1648
  //# sourceMappingURL=index.js.map