widget-chatbot 2.0.0-alpha.16 → 2.0.0-alpha.18

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.
@@ -1,44 +1,44 @@
1
- import mn, { version as Bt, createContext as Te, useContext as ye, useState as D, useRef as Y, useMemo as O, useEffect as X, memo as R, Children as Ut, isValidElement as Wt, cloneElement as Vt, Fragment as gn, createElement as bn, useCallback as Gt } from "react";
1
+ import bn, { version as Wt, createContext as Te, useContext as ye, useState as D, useRef as K, useMemo as O, useEffect as X, memo as R, Children as Vt, isValidElement as Gt, cloneElement as zt, Fragment as Cn, createElement as vn, useCallback as Yt } from "react";
2
2
  import Oe from "axios";
3
3
  import ae from "dayjs";
4
- import { version as zt, Modal as Bn, Typography as V, Button as z, Form as oe, notification as ie, Radio as Yt, Divider as Kt, Input as Be, Image as qt, Skeleton as ue, Avatar as Qn, Upload as Zn, Spin as Jt, Tooltip as Se, Tag as Qt, Badge as Zt, Grid as Ce, Empty as Xn, Popover as vn, Mentions as Un, Select as Wn, DatePicker as Xt, Result as Pt, Tabs as cn } from "antd";
5
- import { io as es } from "socket.io-client";
6
- import ns from "react-markdown";
7
- import ts from "remark-gfm";
8
- import { Prism as ss } from "react-syntax-highlighter";
9
- import rs from "@ant-design/icons";
10
- import { Pie as os } from "@ant-design/charts";
11
- import _e from "crypto-js";
12
- import { Picker as cs } from "emoji-mart";
13
- var Je = { exports: {} }, ke = {};
4
+ import { version as Kt, Modal as Un, Typography as V, Button as z, Form as oe, notification as ie, Radio as qt, Divider as Jt, Input as Be, Image as Qt, Skeleton as ue, Avatar as Xn, Upload as Pn, Spin as Zt, Tooltip as Se, Tag as Xt, Badge as Pt, Grid as Ce, Empty as et, Popover as hn, Mentions as Wn, Select as Vn, DatePicker as es, Result as ns, Tabs as cn } from "antd";
5
+ import { io as ts } from "socket.io-client";
6
+ import ss from "react-markdown";
7
+ import rs from "remark-gfm";
8
+ import { Prism as os } from "react-syntax-highlighter";
9
+ import cs from "@ant-design/icons";
10
+ import { Pie as is } from "@ant-design/charts";
11
+ import ke from "crypto-js";
12
+ import { Picker as ls } from "emoji-mart";
13
+ var Je = { exports: {} }, pe = {};
14
14
  /*
15
15
  object-assign
16
16
  (c) Sindre Sorhus
17
17
  @license MIT
18
18
  */
19
- var ln, Vn;
20
- function Pn() {
21
- if (Vn) return ln;
22
- Vn = 1;
19
+ var ln, Gn;
20
+ function nt() {
21
+ if (Gn) return ln;
22
+ Gn = 1;
23
23
  var e = Object.getOwnPropertySymbols, t = Object.prototype.hasOwnProperty, r = Object.prototype.propertyIsEnumerable;
24
24
  function s(c) {
25
25
  if (c == null)
26
26
  throw new TypeError("Object.assign cannot be called with null or undefined");
27
27
  return Object(c);
28
28
  }
29
- function d() {
29
+ function a() {
30
30
  try {
31
31
  if (!Object.assign)
32
32
  return !1;
33
33
  var c = new String("abc");
34
34
  if (c[5] = "de", Object.getOwnPropertyNames(c)[0] === "5")
35
35
  return !1;
36
- for (var o = {}, l = 0; l < 10; l++)
37
- o["_" + String.fromCharCode(l)] = l;
38
- var a = Object.getOwnPropertyNames(o).map(function(f) {
36
+ for (var o = {}, d = 0; d < 10; d++)
37
+ o["_" + String.fromCharCode(d)] = d;
38
+ var i = Object.getOwnPropertyNames(o).map(function(f) {
39
39
  return o[f];
40
40
  });
41
- if (a.join("") !== "0123456789")
41
+ if (i.join("") !== "0123456789")
42
42
  return !1;
43
43
  var u = {};
44
44
  return "abcdefghijklmnopqrst".split("").forEach(function(f) {
@@ -48,18 +48,18 @@ function Pn() {
48
48
  return !1;
49
49
  }
50
50
  }
51
- return ln = d() ? Object.assign : function(c, o) {
52
- for (var l, a = s(c), u, f = 1; f < arguments.length; f++) {
53
- l = Object(arguments[f]);
54
- for (var x in l)
55
- t.call(l, x) && (a[x] = l[x]);
51
+ return ln = a() ? Object.assign : function(c, o) {
52
+ for (var d, i = s(c), u, f = 1; f < arguments.length; f++) {
53
+ d = Object(arguments[f]);
54
+ for (var x in d)
55
+ t.call(d, x) && (i[x] = d[x]);
56
56
  if (e) {
57
- u = e(l);
57
+ u = e(d);
58
58
  for (var g = 0; g < u.length; g++)
59
- r.call(l, u[g]) && (a[u[g]] = l[u[g]]);
59
+ r.call(d, u[g]) && (i[u[g]] = d[u[g]]);
60
60
  }
61
61
  }
62
- return a;
62
+ return i;
63
63
  }, ln;
64
64
  }
65
65
  /** @license React v17.0.2
@@ -70,24 +70,24 @@ function Pn() {
70
70
  * This source code is licensed under the MIT license found in the
71
71
  * LICENSE file in the root directory of this source tree.
72
72
  */
73
- var Gn;
74
- function is() {
75
- if (Gn) return ke;
76
- Gn = 1, Pn();
77
- var e = mn, t = 60103;
78
- if (ke.Fragment = 60107, typeof Symbol == "function" && Symbol.for) {
73
+ var zn;
74
+ function as() {
75
+ if (zn) return pe;
76
+ zn = 1, nt();
77
+ var e = bn, t = 60103;
78
+ if (pe.Fragment = 60107, typeof Symbol == "function" && Symbol.for) {
79
79
  var r = Symbol.for;
80
- t = r("react.element"), ke.Fragment = r("react.fragment");
80
+ t = r("react.element"), pe.Fragment = r("react.fragment");
81
81
  }
82
- var s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, d = Object.prototype.hasOwnProperty, c = { key: !0, ref: !0, __self: !0, __source: !0 };
83
- function o(l, a, u) {
82
+ var s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = Object.prototype.hasOwnProperty, c = { key: !0, ref: !0, __self: !0, __source: !0 };
83
+ function o(d, i, u) {
84
84
  var f, x = {}, g = null, C = null;
85
- u !== void 0 && (g = "" + u), a.key !== void 0 && (g = "" + a.key), a.ref !== void 0 && (C = a.ref);
86
- for (f in a) d.call(a, f) && !c.hasOwnProperty(f) && (x[f] = a[f]);
87
- if (l && l.defaultProps) for (f in a = l.defaultProps, a) x[f] === void 0 && (x[f] = a[f]);
88
- return { $$typeof: t, type: l, key: g, ref: C, props: x, _owner: s.current };
85
+ u !== void 0 && (g = "" + u), i.key !== void 0 && (g = "" + i.key), i.ref !== void 0 && (C = i.ref);
86
+ for (f in i) a.call(i, f) && !c.hasOwnProperty(f) && (x[f] = i[f]);
87
+ if (d && d.defaultProps) for (f in i = d.defaultProps, i) x[f] === void 0 && (x[f] = i[f]);
88
+ return { $$typeof: t, type: d, key: g, ref: C, props: x, _owner: s.current };
89
89
  }
90
- return ke.jsx = o, ke.jsxs = o, ke;
90
+ return pe.jsx = o, pe.jsxs = o, pe;
91
91
  }
92
92
  var an = {};
93
93
  /** @license React v17.0.2
@@ -98,64 +98,64 @@ var an = {};
98
98
  * This source code is licensed under the MIT license found in the
99
99
  * LICENSE file in the root directory of this source tree.
100
100
  */
101
- var zn;
102
- function ls() {
103
- return zn || (zn = 1, function(e) {
101
+ var Yn;
102
+ function ds() {
103
+ return Yn || (Yn = 1, function(e) {
104
104
  process.env.NODE_ENV !== "production" && function() {
105
- var t = mn, r = Pn(), s = 60103, d = 60106;
105
+ var t = bn, r = nt(), s = 60103, a = 60106;
106
106
  e.Fragment = 60107;
107
- var c = 60108, o = 60114, l = 60109, a = 60110, u = 60112, f = 60113, x = 60120, g = 60115, C = 60116, y = 60121, w = 60122, k = 60117, _ = 60129, v = 60131;
107
+ var c = 60108, o = 60114, d = 60109, i = 60110, u = 60112, f = 60113, x = 60120, g = 60115, C = 60116, y = 60121, j = 60122, p = 60117, w = 60129, v = 60131;
108
108
  if (typeof Symbol == "function" && Symbol.for) {
109
- var E = Symbol.for;
110
- s = E("react.element"), d = E("react.portal"), e.Fragment = E("react.fragment"), c = E("react.strict_mode"), o = E("react.profiler"), l = E("react.provider"), a = E("react.context"), u = E("react.forward_ref"), f = E("react.suspense"), x = E("react.suspense_list"), g = E("react.memo"), C = E("react.lazy"), y = E("react.block"), w = E("react.server.block"), k = E("react.fundamental"), E("react.scope"), E("react.opaque.id"), _ = E("react.debug_trace_mode"), E("react.offscreen"), v = E("react.legacy_hidden");
109
+ var h = Symbol.for;
110
+ s = h("react.element"), a = h("react.portal"), e.Fragment = h("react.fragment"), c = h("react.strict_mode"), o = h("react.profiler"), d = h("react.provider"), i = h("react.context"), u = h("react.forward_ref"), f = h("react.suspense"), x = h("react.suspense_list"), g = h("react.memo"), C = h("react.lazy"), y = h("react.block"), j = h("react.server.block"), p = h("react.fundamental"), h("react.scope"), h("react.opaque.id"), w = h("react.debug_trace_mode"), h("react.offscreen"), v = h("react.legacy_hidden");
111
111
  }
112
- var b = typeof Symbol == "function" && Symbol.iterator, h = "@@iterator";
113
- function m(i) {
114
- if (i === null || typeof i != "object")
112
+ var b = typeof Symbol == "function" && Symbol.iterator, E = "@@iterator";
113
+ function m(l) {
114
+ if (l === null || typeof l != "object")
115
115
  return null;
116
- var T = b && i[b] || i[h];
116
+ var T = b && l[b] || l[E];
117
117
  return typeof T == "function" ? T : null;
118
118
  }
119
- var j = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
120
- function S(i) {
119
+ var k = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
120
+ function S(l) {
121
121
  {
122
122
  for (var T = arguments.length, A = new Array(T > 1 ? T - 1 : 0), N = 1; N < T; N++)
123
123
  A[N - 1] = arguments[N];
124
- I("error", i, A);
124
+ H("error", l, A);
125
125
  }
126
126
  }
127
- function I(i, T, A) {
127
+ function H(l, T, A) {
128
128
  {
129
- var N = j.ReactDebugCurrentFrame, Q = N.getStackAddendum();
130
- Q !== "" && (T += "%s", A = A.concat([Q]));
131
- var J = A.map(function(W) {
129
+ var N = k.ReactDebugCurrentFrame, Z = N.getStackAddendum();
130
+ Z !== "" && (T += "%s", A = A.concat([Z]));
131
+ var Q = A.map(function(W) {
132
132
  return "" + W;
133
133
  });
134
- J.unshift("Warning: " + T), Function.prototype.apply.call(console[i], console, J);
134
+ Q.unshift("Warning: " + T), Function.prototype.apply.call(console[l], console, Q);
135
135
  }
136
136
  }
137
137
  var B = !1;
138
- function M(i) {
139
- return !!(typeof i == "string" || typeof i == "function" || i === e.Fragment || i === o || i === _ || i === c || i === f || i === x || i === v || B || typeof i == "object" && i !== null && (i.$$typeof === C || i.$$typeof === g || i.$$typeof === l || i.$$typeof === a || i.$$typeof === u || i.$$typeof === k || i.$$typeof === y || i[0] === w));
138
+ function M(l) {
139
+ return !!(typeof l == "string" || typeof l == "function" || l === e.Fragment || l === o || l === w || l === c || l === f || l === x || l === v || B || typeof l == "object" && l !== null && (l.$$typeof === C || l.$$typeof === g || l.$$typeof === d || l.$$typeof === i || l.$$typeof === u || l.$$typeof === p || l.$$typeof === y || l[0] === j));
140
140
  }
141
- function L(i, T, A) {
141
+ function L(l, T, A) {
142
142
  var N = T.displayName || T.name || "";
143
- return i.displayName || (N !== "" ? A + "(" + N + ")" : A);
143
+ return l.displayName || (N !== "" ? A + "(" + N + ")" : A);
144
144
  }
145
- function F(i) {
146
- return i.displayName || "Context";
145
+ function I(l) {
146
+ return l.displayName || "Context";
147
147
  }
148
- function $(i) {
149
- if (i == null)
148
+ function $(l) {
149
+ if (l == null)
150
150
  return null;
151
- if (typeof i.tag == "number" && S("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."), typeof i == "function")
152
- return i.displayName || i.name || null;
153
- if (typeof i == "string")
154
- return i;
155
- switch (i) {
151
+ if (typeof l.tag == "number" && S("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."), typeof l == "function")
152
+ return l.displayName || l.name || null;
153
+ if (typeof l == "string")
154
+ return l;
155
+ switch (l) {
156
156
  case e.Fragment:
157
157
  return "Fragment";
158
- case d:
158
+ case a:
159
159
  return "Portal";
160
160
  case o:
161
161
  return "Profiler";
@@ -166,24 +166,24 @@ function ls() {
166
166
  case x:
167
167
  return "SuspenseList";
168
168
  }
169
- if (typeof i == "object")
170
- switch (i.$$typeof) {
171
- case a:
172
- var T = i;
173
- return F(T) + ".Consumer";
174
- case l:
175
- var A = i;
176
- return F(A._context) + ".Provider";
169
+ if (typeof l == "object")
170
+ switch (l.$$typeof) {
171
+ case i:
172
+ var T = l;
173
+ return I(T) + ".Consumer";
174
+ case d:
175
+ var A = l;
176
+ return I(A._context) + ".Provider";
177
177
  case u:
178
- return L(i, i.render, "ForwardRef");
178
+ return L(l, l.render, "ForwardRef");
179
179
  case g:
180
- return $(i.type);
180
+ return $(l.type);
181
181
  case y:
182
- return $(i._render);
182
+ return $(l._render);
183
183
  case C: {
184
- var N = i, Q = N._payload, J = N._init;
184
+ var N = l, Z = N._payload, Q = N._init;
185
185
  try {
186
- return $(J(Q));
186
+ return $(Q(Z));
187
187
  } catch {
188
188
  return null;
189
189
  }
@@ -191,101 +191,101 @@ function ls() {
191
191
  }
192
192
  return null;
193
193
  }
194
- var H = 0, G, Z, q, te, ee, de, ce;
194
+ var F = 0, G, J, Y, te, ee, de, ce;
195
195
  function Ne() {
196
196
  }
197
197
  Ne.__reactDisabledLog = !0;
198
198
  function Ve() {
199
199
  {
200
- if (H === 0) {
201
- G = console.log, Z = console.info, q = console.warn, te = console.error, ee = console.group, de = console.groupCollapsed, ce = console.groupEnd;
202
- var i = {
200
+ if (F === 0) {
201
+ G = console.log, J = console.info, Y = console.warn, te = console.error, ee = console.group, de = console.groupCollapsed, ce = console.groupEnd;
202
+ var l = {
203
203
  configurable: !0,
204
204
  enumerable: !0,
205
205
  value: Ne,
206
206
  writable: !0
207
207
  };
208
208
  Object.defineProperties(console, {
209
- info: i,
210
- log: i,
211
- warn: i,
212
- error: i,
213
- group: i,
214
- groupCollapsed: i,
215
- groupEnd: i
209
+ info: l,
210
+ log: l,
211
+ warn: l,
212
+ error: l,
213
+ group: l,
214
+ groupCollapsed: l,
215
+ groupEnd: l
216
216
  });
217
217
  }
218
- H++;
218
+ F++;
219
219
  }
220
220
  }
221
221
  function Ge() {
222
222
  {
223
- if (H--, H === 0) {
224
- var i = {
223
+ if (F--, F === 0) {
224
+ var l = {
225
225
  configurable: !0,
226
226
  enumerable: !0,
227
227
  writable: !0
228
228
  };
229
229
  Object.defineProperties(console, {
230
- log: r({}, i, {
230
+ log: r({}, l, {
231
231
  value: G
232
232
  }),
233
- info: r({}, i, {
234
- value: Z
233
+ info: r({}, l, {
234
+ value: J
235
235
  }),
236
- warn: r({}, i, {
237
- value: q
236
+ warn: r({}, l, {
237
+ value: Y
238
238
  }),
239
- error: r({}, i, {
239
+ error: r({}, l, {
240
240
  value: te
241
241
  }),
242
- group: r({}, i, {
242
+ group: r({}, l, {
243
243
  value: ee
244
244
  }),
245
- groupCollapsed: r({}, i, {
245
+ groupCollapsed: r({}, l, {
246
246
  value: de
247
247
  }),
248
- groupEnd: r({}, i, {
248
+ groupEnd: r({}, l, {
249
249
  value: ce
250
250
  })
251
251
  });
252
252
  }
253
- H < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
253
+ F < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
254
254
  }
255
255
  }
256
- var Me = j.ReactCurrentDispatcher, Fe;
257
- function ze(i, T, A) {
256
+ var Me = k.ReactCurrentDispatcher, Fe;
257
+ function ze(l, T, A) {
258
258
  {
259
259
  if (Fe === void 0)
260
260
  try {
261
261
  throw Error();
262
- } catch (Q) {
263
- var N = Q.stack.trim().match(/\n( *(at )?)/);
262
+ } catch (Z) {
263
+ var N = Z.stack.trim().match(/\n( *(at )?)/);
264
264
  Fe = N && N[1] || "";
265
265
  }
266
266
  return `
267
- ` + Fe + i;
267
+ ` + Fe + l;
268
268
  }
269
269
  }
270
270
  var nn = !1, Ye;
271
271
  {
272
- var Tt = typeof WeakMap == "function" ? WeakMap : Map;
273
- Ye = new Tt();
272
+ var jt = typeof WeakMap == "function" ? WeakMap : Map;
273
+ Ye = new jt();
274
274
  }
275
- function kn(i, T) {
276
- if (!i || nn)
275
+ function _n(l, T) {
276
+ if (!l || nn)
277
277
  return "";
278
278
  {
279
- var A = Ye.get(i);
279
+ var A = Ye.get(l);
280
280
  if (A !== void 0)
281
281
  return A;
282
282
  }
283
283
  var N;
284
284
  nn = !0;
285
- var Q = Error.prepareStackTrace;
285
+ var Z = Error.prepareStackTrace;
286
286
  Error.prepareStackTrace = void 0;
287
- var J;
288
- J = Me.current, Me.current = null, Ve();
287
+ var Q;
288
+ Q = Me.current, Me.current = null, Ve();
289
289
  try {
290
290
  if (T) {
291
291
  var W = function() {
@@ -301,14 +301,14 @@ function ls() {
301
301
  } catch (ge) {
302
302
  N = ge;
303
303
  }
304
- Reflect.construct(i, [], W);
304
+ Reflect.construct(l, [], W);
305
305
  } else {
306
306
  try {
307
307
  W.call();
308
308
  } catch (ge) {
309
309
  N = ge;
310
310
  }
311
- i.call(W.prototype);
311
+ l.call(W.prototype);
312
312
  }
313
313
  } else {
314
314
  try {
@@ -316,7 +316,7 @@ function ls() {
316
316
  } catch (ge) {
317
317
  N = ge;
318
318
  }
319
- i();
319
+ l();
320
320
  }
321
321
  } catch (ge) {
322
322
  if (ge && N && typeof ge.stack == "string") {
@@ -331,141 +331,141 @@ function ls() {
331
331
  if (ne--, se--, se < 0 || U[ne] !== re[se]) {
332
332
  var xe = `
333
333
  ` + U[ne].replace(" at new ", " at ");
334
- return typeof i == "function" && Ye.set(i, xe), xe;
334
+ return typeof l == "function" && Ye.set(l, xe), xe;
335
335
  }
336
336
  while (ne >= 1 && se >= 0);
337
337
  break;
338
338
  }
339
339
  }
340
340
  } finally {
341
- nn = !1, Me.current = J, Ge(), Error.prepareStackTrace = Q;
341
+ nn = !1, Me.current = Q, Ge(), Error.prepareStackTrace = Z;
342
342
  }
343
- var we = i ? i.displayName || i.name : "", $n = we ? ze(we) : "";
344
- return typeof i == "function" && Ye.set(i, $n), $n;
343
+ var we = l ? l.displayName || l.name : "", Bn = we ? ze(we) : "";
344
+ return typeof l == "function" && Ye.set(l, Bn), Bn;
345
345
  }
346
- function pn(i, T, A) {
347
- return kn(i, !1);
346
+ function An(l, T, A) {
347
+ return _n(l, !1);
348
348
  }
349
- function yt(i) {
350
- var T = i.prototype;
349
+ function wt(l) {
350
+ var T = l.prototype;
351
351
  return !!(T && T.isReactComponent);
352
352
  }
353
- function Ke(i, T, A) {
354
- if (i == null)
353
+ function Ke(l, T, A) {
354
+ if (l == null)
355
355
  return "";
356
- if (typeof i == "function")
357
- return kn(i, yt(i));
358
- if (typeof i == "string")
359
- return ze(i);
360
- switch (i) {
356
+ if (typeof l == "function")
357
+ return _n(l, wt(l));
358
+ if (typeof l == "string")
359
+ return ze(l);
360
+ switch (l) {
361
361
  case f:
362
362
  return ze("Suspense");
363
363
  case x:
364
364
  return ze("SuspenseList");
365
365
  }
366
- if (typeof i == "object")
367
- switch (i.$$typeof) {
366
+ if (typeof l == "object")
367
+ switch (l.$$typeof) {
368
368
  case u:
369
- return pn(i.render);
369
+ return An(l.render);
370
370
  case g:
371
- return Ke(i.type, T, A);
371
+ return Ke(l.type, T, A);
372
372
  case y:
373
- return pn(i._render);
373
+ return An(l._render);
374
374
  case C: {
375
- var N = i, Q = N._payload, J = N._init;
375
+ var N = l, Z = N._payload, Q = N._init;
376
376
  try {
377
- return Ke(J(Q), T, A);
377
+ return Ke(Q(Z), T, A);
378
378
  } catch {
379
379
  }
380
380
  }
381
381
  }
382
382
  return "";
383
383
  }
384
- var An = {}, Sn = j.ReactDebugCurrentFrame;
385
- function qe(i) {
386
- if (i) {
387
- var T = i._owner, A = Ke(i.type, i._source, T ? T.type : null);
388
- Sn.setExtraStackFrame(A);
384
+ var Sn = {}, Ln = k.ReactDebugCurrentFrame;
385
+ function qe(l) {
386
+ if (l) {
387
+ var T = l._owner, A = Ke(l.type, l._source, T ? T.type : null);
388
+ Ln.setExtraStackFrame(A);
389
389
  } else
390
- Sn.setExtraStackFrame(null);
390
+ Ln.setExtraStackFrame(null);
391
391
  }
392
- function jt(i, T, A, N, Q) {
392
+ function kt(l, T, A, N, Z) {
393
393
  {
394
- var J = Function.call.bind(Object.prototype.hasOwnProperty);
395
- for (var W in i)
396
- if (J(i, W)) {
394
+ var Q = Function.call.bind(Object.prototype.hasOwnProperty);
395
+ for (var W in l)
396
+ if (Q(l, W)) {
397
397
  var U = void 0;
398
398
  try {
399
- if (typeof i[W] != "function") {
400
- var re = Error((N || "React class") + ": " + A + " type `" + W + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[W] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
399
+ if (typeof l[W] != "function") {
400
+ var re = Error((N || "React class") + ": " + A + " type `" + W + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof l[W] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
401
401
  throw re.name = "Invariant Violation", re;
402
402
  }
403
- U = i[W](T, W, N, A, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
403
+ U = l[W](T, W, N, A, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
404
404
  } catch (ne) {
405
405
  U = ne;
406
406
  }
407
- U && !(U instanceof Error) && (qe(Q), S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", N || "React class", A, W, typeof U), qe(null)), U instanceof Error && !(U.message in An) && (An[U.message] = !0, qe(Q), S("Failed %s type: %s", A, U.message), qe(null));
407
+ U && !(U instanceof Error) && (qe(Z), S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", N || "React class", A, W, typeof U), qe(null)), U instanceof Error && !(U.message in Sn) && (Sn[U.message] = !0, qe(Z), S("Failed %s type: %s", A, U.message), qe(null));
408
408
  }
409
409
  }
410
410
  }
411
- var Ln = j.ReactCurrentOwner, tn = Object.prototype.hasOwnProperty, wt = {
411
+ var Rn = k.ReactCurrentOwner, tn = Object.prototype.hasOwnProperty, pt = {
412
412
  key: !0,
413
413
  ref: !0,
414
414
  __self: !0,
415
415
  __source: !0
416
- }, Rn, On;
417
- function _t(i) {
418
- if (tn.call(i, "ref")) {
419
- var T = Object.getOwnPropertyDescriptor(i, "ref").get;
416
+ }, On, Dn;
417
+ function _t(l) {
418
+ if (tn.call(l, "ref")) {
419
+ var T = Object.getOwnPropertyDescriptor(l, "ref").get;
420
420
  if (T && T.isReactWarning)
421
421
  return !1;
422
422
  }
423
- return i.ref !== void 0;
423
+ return l.ref !== void 0;
424
424
  }
425
- function kt(i) {
426
- if (tn.call(i, "key")) {
427
- var T = Object.getOwnPropertyDescriptor(i, "key").get;
425
+ function At(l) {
426
+ if (tn.call(l, "key")) {
427
+ var T = Object.getOwnPropertyDescriptor(l, "key").get;
428
428
  if (T && T.isReactWarning)
429
429
  return !1;
430
430
  }
431
- return i.key !== void 0;
431
+ return l.key !== void 0;
432
432
  }
433
- function pt(i, T) {
434
- typeof i.ref == "string" && Ln.current;
433
+ function St(l, T) {
434
+ typeof l.ref == "string" && Rn.current;
435
435
  }
436
- function At(i, T) {
436
+ function Lt(l, T) {
437
437
  {
438
438
  var A = function() {
439
- Rn || (Rn = !0, S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", T));
439
+ On || (On = !0, S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", T));
440
440
  };
441
- A.isReactWarning = !0, Object.defineProperty(i, "key", {
441
+ A.isReactWarning = !0, Object.defineProperty(l, "key", {
442
442
  get: A,
443
443
  configurable: !0
444
444
  });
445
445
  }
446
446
  }
447
- function St(i, T) {
447
+ function Rt(l, T) {
448
448
  {
449
449
  var A = function() {
450
- On || (On = !0, S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", T));
450
+ Dn || (Dn = !0, S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", T));
451
451
  };
452
- A.isReactWarning = !0, Object.defineProperty(i, "ref", {
452
+ A.isReactWarning = !0, Object.defineProperty(l, "ref", {
453
453
  get: A,
454
454
  configurable: !0
455
455
  });
456
456
  }
457
457
  }
458
- var Lt = function(i, T, A, N, Q, J, W) {
458
+ var Ot = function(l, T, A, N, Z, Q, W) {
459
459
  var U = {
460
460
  // This tag allows us to uniquely identify this as a React Element
461
461
  $$typeof: s,
462
462
  // Built-in properties that belong on the element
463
- type: i,
463
+ type: l,
464
464
  key: T,
465
465
  ref: A,
466
466
  props: W,
467
467
  // Record the component responsible for creating this element.
468
- _owner: J
468
+ _owner: Q
469
469
  };
470
470
  return U._store = {}, Object.defineProperty(U._store, "validated", {
471
471
  configurable: !1,
@@ -481,61 +481,61 @@ function ls() {
481
481
  configurable: !1,
482
482
  enumerable: !1,
483
483
  writable: !1,
484
- value: Q
484
+ value: Z
485
485
  }), Object.freeze && (Object.freeze(U.props), Object.freeze(U)), U;
486
486
  };
487
- function Rt(i, T, A, N, Q) {
487
+ function Dt(l, T, A, N, Z) {
488
488
  {
489
- var J, W = {}, U = null, re = null;
490
- A !== void 0 && (U = "" + A), kt(T) && (U = "" + T.key), _t(T) && (re = T.ref, pt(T, Q));
491
- for (J in T)
492
- tn.call(T, J) && !wt.hasOwnProperty(J) && (W[J] = T[J]);
493
- if (i && i.defaultProps) {
494
- var ne = i.defaultProps;
495
- for (J in ne)
496
- W[J] === void 0 && (W[J] = ne[J]);
489
+ var Q, W = {}, U = null, re = null;
490
+ A !== void 0 && (U = "" + A), At(T) && (U = "" + T.key), _t(T) && (re = T.ref, St(T, Z));
491
+ for (Q in T)
492
+ tn.call(T, Q) && !pt.hasOwnProperty(Q) && (W[Q] = T[Q]);
493
+ if (l && l.defaultProps) {
494
+ var ne = l.defaultProps;
495
+ for (Q in ne)
496
+ W[Q] === void 0 && (W[Q] = ne[Q]);
497
497
  }
498
498
  if (U || re) {
499
- var se = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
500
- U && At(W, se), re && St(W, se);
499
+ var se = typeof l == "function" ? l.displayName || l.name || "Unknown" : l;
500
+ U && Lt(W, se), re && Rt(W, se);
501
501
  }
502
- return Lt(i, U, re, Q, N, Ln.current, W);
502
+ return Ot(l, U, re, Z, N, Rn.current, W);
503
503
  }
504
504
  }
505
- var sn = j.ReactCurrentOwner, Dn = j.ReactDebugCurrentFrame;
506
- function je(i) {
507
- if (i) {
508
- var T = i._owner, A = Ke(i.type, i._source, T ? T.type : null);
509
- Dn.setExtraStackFrame(A);
505
+ var sn = k.ReactCurrentOwner, Nn = k.ReactDebugCurrentFrame;
506
+ function je(l) {
507
+ if (l) {
508
+ var T = l._owner, A = Ke(l.type, l._source, T ? T.type : null);
509
+ Nn.setExtraStackFrame(A);
510
510
  } else
511
- Dn.setExtraStackFrame(null);
511
+ Nn.setExtraStackFrame(null);
512
512
  }
513
513
  var rn;
514
514
  rn = !1;
515
- function on(i) {
516
- return typeof i == "object" && i !== null && i.$$typeof === s;
515
+ function on(l) {
516
+ return typeof l == "object" && l !== null && l.$$typeof === s;
517
517
  }
518
- function Nn() {
518
+ function Mn() {
519
519
  {
520
520
  if (sn.current) {
521
- var i = $(sn.current.type);
522
- if (i)
521
+ var l = $(sn.current.type);
522
+ if (l)
523
523
  return `
524
524
 
525
- Check the render method of \`` + i + "`.";
525
+ Check the render method of \`` + l + "`.";
526
526
  }
527
527
  return "";
528
528
  }
529
529
  }
530
- function Ot(i) {
530
+ function Nt(l) {
531
531
  return "";
532
532
  }
533
- var Mn = {};
534
- function Dt(i) {
533
+ var Fn = {};
534
+ function Mt(l) {
535
535
  {
536
- var T = Nn();
536
+ var T = Mn();
537
537
  if (!T) {
538
- var A = typeof i == "string" ? i : i.displayName || i.name;
538
+ var A = typeof l == "string" ? l : l.displayName || l.name;
539
539
  A && (T = `
540
540
 
541
541
  Check the top-level render call using <` + A + ">.");
@@ -543,41 +543,41 @@ Check the top-level render call using <` + A + ">.");
543
543
  return T;
544
544
  }
545
545
  }
546
- function Fn(i, T) {
546
+ function Hn(l, T) {
547
547
  {
548
- if (!i._store || i._store.validated || i.key != null)
548
+ if (!l._store || l._store.validated || l.key != null)
549
549
  return;
550
- i._store.validated = !0;
551
- var A = Dt(T);
552
- if (Mn[A])
550
+ l._store.validated = !0;
551
+ var A = Mt(T);
552
+ if (Fn[A])
553
553
  return;
554
- Mn[A] = !0;
554
+ Fn[A] = !0;
555
555
  var N = "";
556
- i && i._owner && i._owner !== sn.current && (N = " It was passed a child from " + $(i._owner.type) + "."), je(i), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', A, N), je(null);
556
+ l && l._owner && l._owner !== sn.current && (N = " It was passed a child from " + $(l._owner.type) + "."), je(l), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', A, N), je(null);
557
557
  }
558
558
  }
559
- function Hn(i, T) {
559
+ function In(l, T) {
560
560
  {
561
- if (typeof i != "object")
561
+ if (typeof l != "object")
562
562
  return;
563
- if (Array.isArray(i))
564
- for (var A = 0; A < i.length; A++) {
565
- var N = i[A];
566
- on(N) && Fn(N, T);
563
+ if (Array.isArray(l))
564
+ for (var A = 0; A < l.length; A++) {
565
+ var N = l[A];
566
+ on(N) && Hn(N, T);
567
567
  }
568
- else if (on(i))
569
- i._store && (i._store.validated = !0);
570
- else if (i) {
571
- var Q = m(i);
572
- if (typeof Q == "function" && Q !== i.entries)
573
- for (var J = Q.call(i), W; !(W = J.next()).done; )
574
- on(W.value) && Fn(W.value, T);
568
+ else if (on(l))
569
+ l._store && (l._store.validated = !0);
570
+ else if (l) {
571
+ var Z = m(l);
572
+ if (typeof Z == "function" && Z !== l.entries)
573
+ for (var Q = Z.call(l), W; !(W = Q.next()).done; )
574
+ on(W.value) && Hn(W.value, T);
575
575
  }
576
576
  }
577
577
  }
578
- function Nt(i) {
578
+ function Ft(l) {
579
579
  {
580
- var T = i.type;
580
+ var T = l.type;
581
581
  if (T == null || typeof T == "string")
582
582
  return;
583
583
  var A;
@@ -591,39 +591,39 @@ Check the top-level render call using <` + A + ">.");
591
591
  return;
592
592
  if (A) {
593
593
  var N = $(T);
594
- jt(A, i.props, "prop", N, i);
594
+ kt(A, l.props, "prop", N, l);
595
595
  } else if (T.PropTypes !== void 0 && !rn) {
596
596
  rn = !0;
597
- var Q = $(T);
598
- S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", Q || "Unknown");
597
+ var Z = $(T);
598
+ S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", Z || "Unknown");
599
599
  }
600
600
  typeof T.getDefaultProps == "function" && !T.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
601
601
  }
602
602
  }
603
- function Mt(i) {
603
+ function Ht(l) {
604
604
  {
605
- for (var T = Object.keys(i.props), A = 0; A < T.length; A++) {
605
+ for (var T = Object.keys(l.props), A = 0; A < T.length; A++) {
606
606
  var N = T[A];
607
607
  if (N !== "children" && N !== "key") {
608
- je(i), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", N), je(null);
608
+ je(l), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", N), je(null);
609
609
  break;
610
610
  }
611
611
  }
612
- i.ref !== null && (je(i), S("Invalid attribute `ref` supplied to `React.Fragment`."), je(null));
612
+ l.ref !== null && (je(l), S("Invalid attribute `ref` supplied to `React.Fragment`."), je(null));
613
613
  }
614
614
  }
615
- function In(i, T, A, N, Q, J) {
615
+ function $n(l, T, A, N, Z, Q) {
616
616
  {
617
- var W = M(i);
617
+ var W = M(l);
618
618
  if (!W) {
619
619
  var U = "";
620
- (i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (U += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
621
- var re = Ot();
622
- re ? U += re : U += Nn();
620
+ (l === void 0 || typeof l == "object" && l !== null && Object.keys(l).length === 0) && (U += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
621
+ var re = Nt();
622
+ re ? U += re : U += Mn();
623
623
  var ne;
624
- i === null ? ne = "null" : Array.isArray(i) ? ne = "array" : i !== void 0 && i.$$typeof === s ? (ne = "<" + ($(i.type) || "Unknown") + " />", U = " Did you accidentally export a JSX literal instead of a component?") : ne = typeof i, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ne, U);
624
+ l === null ? ne = "null" : Array.isArray(l) ? ne = "array" : l !== void 0 && l.$$typeof === s ? (ne = "<" + ($(l.type) || "Unknown") + " />", U = " Did you accidentally export a JSX literal instead of a component?") : ne = typeof l, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ne, U);
625
625
  }
626
- var se = Rt(i, T, A, Q, J);
626
+ var se = Dt(l, T, A, Z, Q);
627
627
  if (se == null)
628
628
  return se;
629
629
  if (W) {
@@ -632,33 +632,33 @@ Check the top-level render call using <` + A + ">.");
632
632
  if (N)
633
633
  if (Array.isArray(xe)) {
634
634
  for (var we = 0; we < xe.length; we++)
635
- Hn(xe[we], i);
635
+ In(xe[we], l);
636
636
  Object.freeze && Object.freeze(xe);
637
637
  } else
638
638
  S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
639
639
  else
640
- Hn(xe, i);
640
+ In(xe, l);
641
641
  }
642
- return i === e.Fragment ? Mt(se) : Nt(se), se;
642
+ return l === e.Fragment ? Ht(se) : Ft(se), se;
643
643
  }
644
644
  }
645
- function Ft(i, T, A) {
646
- return In(i, T, A, !0);
645
+ function It(l, T, A) {
646
+ return $n(l, T, A, !0);
647
647
  }
648
- function Ht(i, T, A) {
649
- return In(i, T, A, !1);
648
+ function $t(l, T, A) {
649
+ return $n(l, T, A, !1);
650
650
  }
651
- var It = Ht, $t = Ft;
652
- e.jsx = It, e.jsxs = $t;
651
+ var Bt = $t, Ut = It;
652
+ e.jsx = Bt, e.jsxs = Ut;
653
653
  }();
654
654
  }(an)), an;
655
655
  }
656
- var Yn;
657
- function as() {
658
- return Yn || (Yn = 1, process.env.NODE_ENV === "production" ? Je.exports = is() : Je.exports = ls()), Je.exports;
656
+ var Kn;
657
+ function us() {
658
+ return Kn || (Kn = 1, process.env.NODE_ENV === "production" ? Je.exports = as() : Je.exports = ds()), Je.exports;
659
659
  }
660
- var n = as();
661
- const ds = "2.0.0-alpha.13", et = "chat_session", us = "user_uttered", fs = "bot_uttered", xs = "ehelp_bot_uttered", gs = "https://sfchatbot.dataon.com", Cs = [
660
+ var n = us();
661
+ const fs = "2.0.0-alpha.16", tt = "chat_session", xs = "user_uttered", gs = "bot_uttered", Cs = "ehelp_bot_uttered", ms = "https://sfchatbot.dataon.com", bs = [
662
662
  {
663
663
  label: "Didn’t address my question",
664
664
  value: "Didn’t address my question"
@@ -679,7 +679,7 @@ const ds = "2.0.0-alpha.13", et = "chat_session", us = "user_uttered", fs = "bot
679
679
  label: "I’d like to explain further",
680
680
  value: "another"
681
681
  }
682
- ], Le = zt, Re = Bt, ms = ds, bs = "https://sfchatbot.dataon.com/openai-service-dev/", Ze = "https://res.cloudinary.com/dcvolkyfb/image/upload/v1740135794/svg/bot_profile_hlnyop.png", hn = "YYYY-MM-DD", Xe = "HH:mm", Kn = "N/A", dn = [
682
+ ], Le = Kt, Re = Wt, vs = fs, hs = "https://sfchatbot.dataon.com/openai-service-dev/", Ze = "https://res.cloudinary.com/dcvolkyfb/image/upload/v1740135794/svg/bot_profile_hlnyop.png", En = "YYYY-MM-DD", Xe = "HH:mm", qn = "N/A", dn = [
683
683
  // Raster (bitmap)
684
684
  ".jpg",
685
685
  ".jpeg",
@@ -701,18 +701,18 @@ const ds = "2.0.0-alpha.13", et = "chat_session", us = "user_uttered", fs = "bot
701
701
  ".orf",
702
702
  ".psd",
703
703
  ".xcf"
704
- ], un = "w-widget-content-container", fn = "w-ticket-detail-content-container", vs = "w-wrapper-body", hs = "w-wrapper-body-helpdesk", He = "w-header", xn = {
704
+ ], un = "w-widget-content-container", fn = "w-ticket-detail-content-container", Es = "w-wrapper-body", Ts = "w-wrapper-body-helpdesk", He = "w-header", xn = {
705
705
  FADE_IN: "w-fade-in-animate"
706
- }, Es = "https://placehold.co/600x400?text=No+Image", Ie = 3, Ts = "GoHRDev2025WorkPlazeDataOnDotCom", pe = "(Helpdesk Widget Chatbot)", ys = (e) => JSON.parse((e == null ? void 0 : e.replaceAll("/get_started", "")) || "{}"), nt = (e) => {
706
+ }, ys = "https://placehold.co/600x400?text=No+Image", Ie = 3, js = "GoHRDev2025WorkPlazeDataOnDotCom", _e = "(Helpdesk Widget Chatbot)", ws = (e) => JSON.parse((e == null ? void 0 : e.replaceAll("/get_started", "")) || "{}"), st = (e) => {
707
707
  var t;
708
708
  try {
709
709
  return (t = new URL(e)) == null ? void 0 : t.host;
710
710
  } catch {
711
- return nt(gs);
711
+ return st(ms);
712
712
  }
713
713
  }, le = (e, t) => {
714
- var r, s, d;
715
- return ((r = Object.keys(e || {})) == null ? void 0 : r.length) > 0 ? (d = (s = Object == null ? void 0 : Object.prototype) == null ? void 0 : s.hasOwnProperty) == null ? void 0 : d.call(e, t) : !1;
714
+ var r, s, a;
715
+ return ((r = Object.keys(e || {})) == null ? void 0 : r.length) > 0 ? (a = (s = Object == null ? void 0 : Object.prototype) == null ? void 0 : s.hasOwnProperty) == null ? void 0 : a.call(e, t) : !1;
716
716
  }, Ae = (e) => {
717
717
  var r;
718
718
  const t = e == null ? void 0 : e.attachment;
@@ -723,64 +723,64 @@ const ds = "2.0.0-alpha.13", et = "chat_session", us = "user_uttered", fs = "bot
723
723
  filedownload: le(t, "type") && (t == null ? void 0 : t.type) === "filedownloader",
724
724
  chart: (t == null ? void 0 : t.type) === "charts" && le(t, "chartType")
725
725
  };
726
- }, tt = (e) => {
727
- var t, r, s, d;
726
+ }, rt = (e) => {
727
+ var t, r, s, a;
728
728
  if (e) {
729
- const c = e == null ? void 0 : e.split(".")[1], o = (t = c == null ? void 0 : c.replace(/-/g, "+")) == null ? void 0 : t.replace(/_/g, "/"), l = decodeURIComponent(
730
- (d = (s = (r = window == null ? void 0 : window.atob(o)) == null ? void 0 : r.split("")) == null ? void 0 : s.map((a) => "%" + ("00" + a.charCodeAt(0).toString(16)).slice(-2))) == null ? void 0 : d.join("")
729
+ const c = e == null ? void 0 : e.split(".")[1], o = (t = c == null ? void 0 : c.replace(/-/g, "+")) == null ? void 0 : t.replace(/_/g, "/"), d = decodeURIComponent(
730
+ (a = (s = (r = window == null ? void 0 : window.atob(o)) == null ? void 0 : r.split("")) == null ? void 0 : s.map((i) => "%" + ("00" + i.charCodeAt(0).toString(16)).slice(-2))) == null ? void 0 : a.join("")
731
731
  );
732
- return JSON == null ? void 0 : JSON.parse(l || "{}");
732
+ return JSON == null ? void 0 : JSON.parse(d || "{}");
733
733
  }
734
734
  return {};
735
- }, En = ({
735
+ }, Tn = ({
736
736
  downloadURL: e = "",
737
737
  fileName: t = "",
738
738
  isOpenNewTab: r = !1
739
739
  }) => {
740
- var d;
740
+ var a;
741
741
  const s = document == null ? void 0 : document.createElement("a");
742
- s.href = e, s.download = t || e, r && (s.target = "_blank"), (d = document == null ? void 0 : document.body) == null || d.appendChild(s), s.click(), document.body.removeChild(s);
743
- }, js = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
742
+ s.href = e, s.download = t || e, r && (s.target = "_blank"), (a = document == null ? void 0 : document.body) == null || a.appendChild(s), s.click(), document.body.removeChild(s);
743
+ }, ks = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
744
744
  const t = crypto.getRandomValues(new Uint8Array(1))[0] % 16;
745
745
  return (e === "x" ? t : t & 3 | 8).toString(16);
746
- }), Tn = ({
746
+ }), yn = ({
747
747
  ArrObj: e,
748
748
  key: t,
749
749
  ignoreCaseSensitive: r = !1
750
750
  }) => (e == null ? void 0 : e.length) > 0 ? [
751
751
  ...new Map(
752
752
  e.map((s) => {
753
- var d;
753
+ var a;
754
754
  return [
755
- r ? (d = String(s[t])) == null ? void 0 : d.toLowerCase() : s[t],
755
+ r ? (a = String(s[t])) == null ? void 0 : a.toLowerCase() : s[t],
756
756
  s
757
757
  ];
758
758
  })
759
759
  ).values()
760
- ] : [], ws = (e = []) => {
760
+ ] : [], ps = (e = []) => {
761
761
  const t = {}, r = [], s = [];
762
762
  e == null || e.forEach((c) => {
763
763
  var o;
764
- le(c, "chats") ? (o = c == null ? void 0 : c.chats) == null || o.forEach((l) => {
765
- s == null || s.push(l);
764
+ le(c, "chats") ? (o = c == null ? void 0 : c.chats) == null || o.forEach((d) => {
765
+ s == null || s.push(d);
766
766
  }) : s == null || s.push(c);
767
767
  }), s == null || s.forEach((c, o) => {
768
- var a, u, f;
769
- const l = c == null ? void 0 : c.generated_id;
770
- l ? (t[l] || (t[l] = []), (u = t[l]) == null || u.push({
768
+ var i, u, f;
769
+ const d = c == null ? void 0 : c.generated_id;
770
+ d ? (t[d] || (t[d] = []), (u = t[d]) == null || u.push({
771
771
  ...c,
772
772
  indexChat: o,
773
773
  ...!(c != null && c.timestamp) && {
774
- timestamp: (a = ae()) == null ? void 0 : a.format("hh:mm A")
774
+ timestamp: (i = ae()) == null ? void 0 : i.format("hh:mm A")
775
775
  }
776
776
  }), r == null || r.push({
777
- keyItem: l ?? o,
777
+ keyItem: d ?? o,
778
778
  type: "text",
779
779
  sender: "response",
780
- ...l && {
781
- generated_id: l
780
+ ...d && {
781
+ generated_id: d
782
782
  },
783
- chats: t == null ? void 0 : t[l]
783
+ chats: t == null ? void 0 : t[d]
784
784
  })) : r == null || r.push({
785
785
  ...c,
786
786
  keyItem: o,
@@ -789,18 +789,18 @@ const ds = "2.0.0-alpha.13", et = "chat_session", us = "user_uttered", fs = "bot
789
789
  }
790
790
  });
791
791
  });
792
- const d = Tn({ ArrObj: r, key: "keyItem" });
793
- return d == null || d.forEach((c) => {
792
+ const a = yn({ ArrObj: r, key: "keyItem" });
793
+ return a == null || a.forEach((c) => {
794
794
  c == null || delete c.keyItem;
795
- }), d;
795
+ }), a;
796
796
  }, Pe = (e = {}) => {
797
797
  const r = {
798
- ...st(),
798
+ ...ot(),
799
799
  ...e
800
800
  };
801
- localStorage == null || localStorage.setItem(et, JSON.stringify(r || {}));
802
- }, st = () => {
803
- const e = localStorage == null ? void 0 : localStorage.getItem(et);
801
+ localStorage == null || localStorage.setItem(tt, JSON.stringify(r || {}));
802
+ }, ot = () => {
803
+ const e = localStorage == null ? void 0 : localStorage.getItem(tt);
804
804
  return JSON.parse(e || "{}");
805
805
  }, _s = (e = "") => {
806
806
  var t;
@@ -811,214 +811,224 @@ const ds = "2.0.0-alpha.13", et = "chat_session", us = "user_uttered", fs = "bot
811
811
  return "wss";
812
812
  }
813
813
  };
814
- let qn = null;
814
+ let Jn = null;
815
815
  const me = (e = ".w-wrapper-body") => {
816
816
  const t = document.querySelector(e);
817
- clearTimeout(qn), qn = setTimeout(() => {
817
+ clearTimeout(Jn), Jn = setTimeout(() => {
818
818
  t && t.scrollTo({
819
819
  top: t.scrollHeight,
820
820
  behavior: "smooth"
821
821
  });
822
822
  }, 0);
823
- }, ks = (e) => {
823
+ }, As = (e) => {
824
824
  const t = new Uint8Array(e);
825
825
  let r = "";
826
826
  for (let s = 0; s < t.byteLength; s++)
827
827
  r += String.fromCharCode(t[s]);
828
828
  return btoa(r);
829
- }, ps = async (e, t) => {
830
- var a;
831
- const r = typeof e == "object" ? JSON == null ? void 0 : JSON.stringify(e || {}) : e, s = new TextEncoder(), d = s == null ? void 0 : s.encode(r), c = s == null ? void 0 : s.encode(t);
829
+ }, Ss = async (e, t) => {
830
+ var i;
831
+ const r = typeof e == "object" ? JSON == null ? void 0 : JSON.stringify(e || {}) : e, s = new TextEncoder(), a = s == null ? void 0 : s.encode(r), c = s == null ? void 0 : s.encode(t);
832
832
  if (c.length !== 32)
833
833
  throw new Error("Key length must be 32 bytes for AES-256");
834
- const o = await ((a = crypto == null ? void 0 : crypto.subtle) == null ? void 0 : a.importKey(
834
+ const o = await ((i = crypto == null ? void 0 : crypto.subtle) == null ? void 0 : i.importKey(
835
835
  "raw",
836
836
  c,
837
837
  { name: "AES-CBC" },
838
838
  !1,
839
839
  ["encrypt"]
840
- )), l = await crypto.subtle.encrypt(
840
+ )), d = await crypto.subtle.encrypt(
841
841
  { name: "AES-CBC", iv: new Uint8Array(16) },
842
842
  o,
843
- d
843
+ a
844
844
  );
845
- return ks(l);
845
+ return As(d);
846
846
  }, Qe = (e) => {
847
- const t = {}, r = rt(e), s = r == null ? void 0 : r.map((d) => {
847
+ const t = {}, r = ct(e), s = r == null ? void 0 : r.map((a) => {
848
848
  var o;
849
- const c = d == null ? void 0 : d.CREATED_DATE;
849
+ const c = a == null ? void 0 : a.CREATED_DATE;
850
850
  return {
851
- ...d,
851
+ ...a,
852
852
  DATE_KEY: (o = ae(c)) == null ? void 0 : o.format("YYYY-MM-DD")
853
853
  };
854
854
  });
855
- return s == null || s.forEach((d) => {
855
+ return s == null || s.forEach((a) => {
856
856
  var c;
857
- t[d == null ? void 0 : d.DATE_KEY] || (t[d == null ? void 0 : d.DATE_KEY] = []), (c = t[d == null ? void 0 : d.DATE_KEY]) == null || c.push(d);
857
+ t[a == null ? void 0 : a.DATE_KEY] || (t[a == null ? void 0 : a.DATE_KEY] = []), (c = t[a == null ? void 0 : a.DATE_KEY]) == null || c.push(a);
858
858
  }), t;
859
- }, yn = (e) => {
859
+ }, jn = (e) => {
860
860
  var t;
861
861
  return (t = Object.values(e || {})) == null ? void 0 : t.flat();
862
- }, rt = (e) => e == null ? void 0 : e.sort((t, r) => ae(t == null ? void 0 : t.CREATED_DATE) - ae(r == null ? void 0 : r.CREATED_DATE)), ot = (e) => {
862
+ }, ct = (e) => e == null ? void 0 : e.sort((t, r) => ae(t == null ? void 0 : t.CREATED_DATE) - ae(r == null ? void 0 : r.CREATED_DATE)), it = (e) => {
863
863
  if (e && typeof e == "string") {
864
864
  const t = e == null ? void 0 : e.split("."), r = t[(t == null ? void 0 : t.length) - 1];
865
865
  return e == null ? void 0 : e.replaceAll(`.${r}`, `_avatar.${r}`);
866
866
  }
867
867
  return e;
868
- }, jn = (e) => `https://ui-avatars.com/api/?background=e5e5e5&color=000${e && typeof e == "string" ? `&name=${e.replaceAll(" ", "+")}` : ""}`, ct = Te({}), K = () => ye(ct), As = ({
868
+ }, wn = (e) => `https://ui-avatars.com/api/?background=e5e5e5&color=000${e && typeof e == "string" ? `&name=${e.replaceAll(" ", "+")}` : ""}`, Qn = (e) => URL.parse(e) && new URL(e), gn = (e) => {
869
+ try {
870
+ return new URL(e);
871
+ } catch {
872
+ return {};
873
+ }
874
+ }, lt = Te({}), q = () => ye(lt), Ls = ({
869
875
  children: e,
870
876
  getStartedPayload: t,
871
877
  socketURL: r,
872
878
  socketPath: s,
873
- onPayslipFn: d,
879
+ onPayslipFn: a,
874
880
  title: c,
875
881
  subTitle: o,
876
- keyEncrypt: l,
877
- history: a,
882
+ keyEncrypt: d,
883
+ history: i,
878
884
  isSF: u
879
885
  }) => {
880
- const [f, x] = D(!1), [g, C] = D("va"), [y, w] = D(!1), [k, _] = D({}), [v, E] = D(!1), [b, h] = D(!1), m = Y(!1), j = O(() => ({
886
+ const [f, x] = D(!1), [g, C] = D("va"), [y, j] = D(!1), [p, w] = D({}), [v, h] = D(!1), [b, E] = D(!1), m = K(!1), k = O(() => ({
881
887
  getStartedPayload: t,
882
888
  socketURL: r,
883
889
  socketPath: s,
884
- onPayslipFn: d,
890
+ onPayslipFn: a,
885
891
  title: c,
886
892
  subTitle: o,
887
- keyEncrypt: l,
888
- history: a,
893
+ keyEncrypt: d,
894
+ history: i,
889
895
  isSF: u
890
896
  }), [
891
897
  t,
892
898
  r,
893
899
  s,
894
- d,
900
+ a,
895
901
  c,
896
902
  o,
897
- l,
898
- a,
903
+ d,
904
+ i,
899
905
  u
900
- ]), S = O(() => tt(k == null ? void 0 : k.access_token), [k == null ? void 0 : k.access_token]);
906
+ ]), S = O(() => rt(p == null ? void 0 : p.access_token), [p == null ? void 0 : p.access_token]);
901
907
  return X(() => {
902
- _(ys(t));
908
+ w(ws(t));
903
909
  }, [t]), X(() => {
904
910
  Pe({
905
- chatbot_version: ms
911
+ chatbot_version: vs
906
912
  });
907
913
  }, []), /* @__PURE__ */ n.jsx(
908
- ct.Provider,
914
+ lt.Provider,
909
915
  {
910
916
  value: {
911
- objInitPayload: k,
917
+ objInitPayload: p,
912
918
  setOpenWidget: x,
913
919
  isOpenWidget: f,
914
920
  activeTab: g,
915
921
  setActiveTab: C,
916
922
  isExpand: y,
917
- setExpand: w,
918
- setObjInitPayload: _,
923
+ setExpand: j,
924
+ setObjInitPayload: w,
919
925
  parsedJWT: S,
920
- widgetProps: j,
926
+ widgetProps: k,
921
927
  isFirstOpenWidget: v,
922
- setFirstOpenWidget: E,
928
+ setFirstOpenWidget: h,
923
929
  isFirstRenderHelpdesk: m,
924
930
  showReadyWSHD: b,
925
- setShowReadyWSHD: h
931
+ setShowReadyWSHD: E
926
932
  },
927
933
  children: e
928
934
  }
929
935
  );
930
- }, it = Te({}), Ss = () => ye(it), Ls = ({ children: e }) => {
931
- const { objInitPayload: t } = K(), [r, s] = D({}), d = () => {
936
+ }, at = Te({}), Rs = () => ye(at), Os = ({ children: e }) => {
937
+ const { objInitPayload: t } = q(), [r, s] = D({}), a = () => {
932
938
  var o;
933
939
  (o = Oe(
934
- `${(t == null ? void 0 : t.uriService) || bs}optional/translations`
935
- )) == null || o.then(({ data: l }) => {
936
- var a;
937
- if (l) {
938
- const u = Object.keys((a = Object.values(l)) == null ? void 0 : a[0]), f = {};
940
+ `${(t == null ? void 0 : t.uriService) || hs}optional/translations`
941
+ )) == null || o.then(({ data: d }) => {
942
+ var i;
943
+ if (d) {
944
+ const u = Object.keys((i = Object.values(d)) == null ? void 0 : i[0]), f = {};
939
945
  u == null || u.forEach((x) => {
940
946
  var g;
941
- (g = Object.keys(l)) == null || g.forEach((C) => {
947
+ (g = Object.keys(d)) == null || g.forEach((C) => {
942
948
  var y;
943
- f[x == null ? void 0 : x.toLowerCase()] = (y = l == null ? void 0 : l[C]) == null ? void 0 : y[x];
949
+ f[x == null ? void 0 : x.toLowerCase()] = (y = d == null ? void 0 : d[C]) == null ? void 0 : y[x];
944
950
  });
945
951
  }), s(f);
946
952
  }
947
953
  });
948
954
  }, c = () => {
949
955
  const o = window.indexedDB.open("language");
950
- o.onsuccess = (l) => {
956
+ o.onsuccess = (d) => {
951
957
  var u;
952
- const a = l.target.result;
958
+ const i = d.target.result;
953
959
  try {
954
- const x = a.transaction("keyvaluepairs", "readonly").objectStore("keyvaluepairs"), g = x == null ? void 0 : x.get((u = t == null ? void 0 : t.lang) == null ? void 0 : u.toLowerCase());
960
+ const x = i.transaction("keyvaluepairs", "readonly").objectStore("keyvaluepairs"), g = x == null ? void 0 : x.get((u = t == null ? void 0 : t.lang) == null ? void 0 : u.toLowerCase());
955
961
  g.onsuccess = () => {
956
962
  s(g == null ? void 0 : g.result);
957
963
  }, g.onerror = () => {
958
- d();
964
+ a();
959
965
  };
960
966
  } catch {
961
- d();
967
+ a();
962
968
  }
963
969
  }, o.onerror = () => {
964
- d();
970
+ a();
965
971
  };
966
972
  };
967
973
  return X(() => {
968
974
  c();
969
- }, [t == null ? void 0 : t.uriService, t == null ? void 0 : t.lang]), /* @__PURE__ */ n.jsx(it.Provider, { value: { langDatas: r }, children: e });
970
- }, lt = Te({}), fe = () => ye(lt), Rs = ({ children: e }) => {
975
+ }, [t == null ? void 0 : t.uriService, t == null ? void 0 : t.lang]), /* @__PURE__ */ n.jsx(at.Provider, { value: { langDatas: r }, children: e });
976
+ }, dt = Te({}), fe = () => ye(dt), Ds = ({ children: e }) => {
971
977
  var M;
972
- const [t, r] = D([]), [s, d] = D(!1), [c, o] = D(!1), [l, a] = D({}), [u, f] = D(!1), [x, g] = D(!1), {
978
+ const [t, r] = D([]), [s, a] = D(!1), [c, o] = D(!1), [d, i] = D({}), [u, f] = D(!1), [x, g] = D(!1), {
973
979
  objInitPayload: C,
974
980
  widgetProps: y,
975
- setOpenWidget: w,
976
- setFirstOpenWidget: k,
977
- isFirstRenderHelpdesk: _
978
- } = K(), v = Y(null), E = Y(""), b = Y(""), h = (L) => {
979
- const F = le(L, "text_feedback_link") && le(L, "text");
980
- r(($) => {
981
- const H = [
982
- ...$,
983
- {
984
- ...L,
985
- ...F && {
986
- type: "text"
987
- },
988
- sender: "response"
989
- }
990
- ];
991
- return ws(H);
992
- }), d(!1), o(!1), me();
981
+ setOpenWidget: j,
982
+ setFirstOpenWidget: p,
983
+ isFirstRenderHelpdesk: w
984
+ } = q(), v = K(null), h = K(""), b = K(""), E = (L) => {
985
+ var $;
986
+ if (!(($ = L == null ? void 0 : L.metadata) == null ? void 0 : $.stopped)) {
987
+ const F = le(L, "text_feedback_link") && le(L, "text");
988
+ r((G) => {
989
+ const J = [
990
+ ...G,
991
+ {
992
+ ...L,
993
+ ...F && {
994
+ type: "text"
995
+ },
996
+ sender: "response"
997
+ }
998
+ ];
999
+ return ps(J);
1000
+ });
1001
+ }
1002
+ a(!1), o(!1), me();
993
1003
  }, m = () => {
994
- var L, F, $, H;
995
- (L = v == null ? void 0 : v.current) == null || L.emit("session_request", { session_id: null }), (F = v == null ? void 0 : v.current) == null || F.on("session_confirm", (G) => {
996
- E.current = G, Pe({
1004
+ var L, I, $, F;
1005
+ (L = v == null ? void 0 : v.current) == null || L.emit("session_request", { session_id: null }), (I = v == null ? void 0 : v.current) == null || I.on("session_confirm", (G) => {
1006
+ h.current = G, Pe({
997
1007
  session_id: G == null ? void 0 : G.session_id
998
1008
  });
999
- }), ($ = v == null ? void 0 : v.current) == null || $.on(fs, h), (H = v == null ? void 0 : v.current) == null || H.on(xs, (G) => {
1000
- const Z = JSON.parse(G || "{}");
1001
- le(Z, "iswidget") && g(Z == null ? void 0 : Z.iswidget);
1002
- }), u || f(!0), k(!1);
1003
- }, j = ({
1009
+ }), ($ = v == null ? void 0 : v.current) == null || $.on(gs, E), (F = v == null ? void 0 : v.current) == null || F.on(Cs, (G) => {
1010
+ const J = JSON.parse(G || "{}");
1011
+ le(J, "iswidget") && g(J == null ? void 0 : J.iswidget);
1012
+ }), u || f(!0), p(!1);
1013
+ }, k = ({
1004
1014
  msg: L,
1005
- additionalConfig: F = {},
1015
+ additionalConfig: I = {},
1006
1016
  isShowLoadingResponse: $ = !0
1007
1017
  }) => {
1008
- var H;
1009
- (H = v == null ? void 0 : v.current) == null || H.emit(us, {
1018
+ var F;
1019
+ (F = v == null ? void 0 : v.current) == null || F.emit(xs, {
1010
1020
  customData: {
1011
1021
  language: C == null ? void 0 : C.lang
1012
1022
  },
1013
1023
  message: L,
1014
- session_id: E == null ? void 0 : E.current,
1015
- ...F
1016
- }), $ ? d(!0) : o(!0);
1024
+ session_id: h == null ? void 0 : h.current,
1025
+ ...I
1026
+ }), $ ? a(!0) : o(!0);
1017
1027
  }, S = () => {
1018
- var F, $;
1019
- v.current && ((F = v == null ? void 0 : v.current) == null || F.off(), ($ = v == null ? void 0 : v.current) == null || $.disconnect(), v.current = null), _.current = !1;
1020
- const L = es(
1021
- `${_s(y == null ? void 0 : y.socketURL)}://${nt(
1028
+ var I, $;
1029
+ v.current && ((I = v == null ? void 0 : v.current) == null || I.off(), ($ = v == null ? void 0 : v.current) == null || $.disconnect(), v.current = null), w.current = !1;
1030
+ const L = ts(
1031
+ `${_s(y == null ? void 0 : y.socketURL)}://${st(
1022
1032
  y == null ? void 0 : y.socketURL
1023
1033
  )}`,
1024
1034
  {
@@ -1028,9 +1038,9 @@ const me = (e = ".w-wrapper-body") => {
1028
1038
  reconnectionAttempts: 1
1029
1039
  }
1030
1040
  );
1031
- L.on("connect", m), L.on("connect_error", (H) => {
1041
+ L.on("connect", m), L.on("connect_error", (F) => {
1032
1042
  console.error("connect_error widget-chatbot : ", {
1033
- err: H,
1043
+ err: F,
1034
1044
  socketURL: y == null ? void 0 : y.socketURL,
1035
1045
  socketPath: y == null ? void 0 : y.widgetProps
1036
1046
  }), f(!1);
@@ -1040,32 +1050,32 @@ const me = (e = ".w-wrapper-body") => {
1040
1050
  socketPath: y == null ? void 0 : y.widgetProps
1041
1051
  }), f(!1);
1042
1052
  }), v.current = L;
1043
- }, I = () => {
1053
+ }, H = () => {
1044
1054
  var L;
1045
- (!((L = v == null ? void 0 : v.current) != null && L.connected) || !u) && (S(), w(!1));
1055
+ (!((L = v == null ? void 0 : v.current) != null && L.connected) || !u) && (S(), j(!1));
1046
1056
  }, B = () => {
1047
1057
  f(!1);
1048
1058
  };
1049
- return X(() => (w(!1), S(), window.addEventListener("online", I), window.addEventListener("offline", B), () => {
1050
- var L, F;
1051
- v.current && ((L = v.current) == null || L.off("connect", m), (F = v.current) == null || F.disconnect(), v.current = null), window.removeEventListener("online", I), window.removeEventListener("offline", B);
1059
+ return X(() => (j(!1), S(), window.addEventListener("online", H), window.addEventListener("offline", B), () => {
1060
+ var L, I;
1061
+ v.current && ((L = v.current) == null || L.off("connect", m), (I = v.current) == null || I.disconnect(), v.current = null), window.removeEventListener("online", H), window.removeEventListener("offline", B);
1052
1062
  }), [
1053
1063
  JSON.stringify(C || {}),
1054
1064
  y == null ? void 0 : y.socketURL,
1055
1065
  y == null ? void 0 : y.socketPath
1056
1066
  ]), /* @__PURE__ */ n.jsx(
1057
- lt.Provider,
1067
+ dt.Provider,
1058
1068
  {
1059
1069
  value: {
1060
1070
  setChats: r,
1061
1071
  chats: t,
1062
- onSendMsg: j,
1072
+ onSendMsg: k,
1063
1073
  isWaitResponse: s,
1064
1074
  socket: v == null ? void 0 : v.current,
1065
- sessionId: (M = E == null ? void 0 : E.current) == null ? void 0 : M.session_id,
1075
+ sessionId: (M = h == null ? void 0 : h.current) == null ? void 0 : M.session_id,
1066
1076
  loadingRegenerate: c,
1067
- file: l,
1068
- setFile: a,
1077
+ file: d,
1078
+ setFile: i,
1069
1079
  connected: u,
1070
1080
  isHandshakeWidget: x,
1071
1081
  createSocket: S,
@@ -1074,7 +1084,7 @@ const me = (e = ".w-wrapper-body") => {
1074
1084
  children: e
1075
1085
  }
1076
1086
  );
1077
- }, Os = {
1087
+ }, Ns = {
1078
1088
  'pre[class*="language-"]': {
1079
1089
  color: "#d4d4d4",
1080
1090
  fontSize: "13px",
@@ -1355,15 +1365,15 @@ const me = (e = ".w-wrapper-body") => {
1355
1365
  boxShadow: "inset 5px 0 0 #f7d87c",
1356
1366
  zIndex: "0"
1357
1367
  }
1358
- }, Ds = (e) => e.replace(/[^a-zA-Z0-9_]/g, "").trim(), p = (e = "", t) => {
1368
+ }, Ms = (e) => e.replace(/[^a-zA-Z0-9_]/g, "").trim(), _ = (e = "", t) => {
1359
1369
  var o;
1360
- const { langDatas: r } = Ss(), s = localStorage == null ? void 0 : localStorage.getItem("show_text_id"), d = Ds(String(e)), c = (r == null ? void 0 : r[d == null ? void 0 : d.toUpperCase()]) || t;
1361
- return ((o = Object.keys(r || {})) == null ? void 0 : o.length) > 0 ? s ? `WPUI_${d}` : c : t;
1362
- }, Ns = ({ isFeedback: e = !1, open: t, ...r }) => {
1363
- var d;
1370
+ const { langDatas: r } = Rs(), s = localStorage == null ? void 0 : localStorage.getItem("show_text_id"), a = Ms(String(e)), c = (r == null ? void 0 : r[a == null ? void 0 : a.toUpperCase()]) || t;
1371
+ return ((o = Object.keys(r || {})) == null ? void 0 : o.length) > 0 ? s ? `WPUI_${a}` : c : t;
1372
+ }, Fs = ({ isFeedback: e = !1, open: t, ...r }) => {
1373
+ var a;
1364
1374
  const s = O(() => e ? "w-modal-container-feedback" : "", [e]);
1365
1375
  return Le != null && Le.startsWith("5") ? /* @__PURE__ */ n.jsx(
1366
- Bn,
1376
+ Un,
1367
1377
  {
1368
1378
  rootClassName: s,
1369
1379
  ...r,
@@ -1385,7 +1395,7 @@ const me = (e = ".w-wrapper-body") => {
1385
1395
  ) : (
1386
1396
  // <div className={rootClassName}>
1387
1397
  /* @__PURE__ */ n.jsx(
1388
- Bn,
1398
+ Un,
1389
1399
  {
1390
1400
  getContainer: "#w-widget-content",
1391
1401
  width: 300,
@@ -1395,7 +1405,7 @@ const me = (e = ".w-wrapper-body") => {
1395
1405
  } : { visible: t },
1396
1406
  maskStyle: {
1397
1407
  backdropFilter: "blur(4x)",
1398
- ...((d = Object.keys((r == null ? void 0 : r.maskStyle) || {})) == null ? void 0 : d.length) > 0 && {
1408
+ ...((a = Object.keys((r == null ? void 0 : r.maskStyle) || {})) == null ? void 0 : a.length) > 0 && {
1399
1409
  ...r == null ? void 0 : r.maskStyle
1400
1410
  }
1401
1411
  },
@@ -1408,12 +1418,12 @@ const me = (e = ".w-wrapper-body") => {
1408
1418
  }
1409
1419
  )
1410
1420
  );
1411
- }, at = R(Ns), Jn = ({ props: e, isModal: t = !1 }) => {
1412
- const r = (s, d) => {
1421
+ }, ut = R(Fs), Zn = ({ props: e, isModal: t = !1 }) => {
1422
+ const r = (s, a) => {
1413
1423
  var c;
1414
- return (c = Ut) == null ? void 0 : c.map(s, (o) => {
1415
- var l, a, u;
1416
- return !Wt(o) || ((l = Object.keys((o == null ? void 0 : o.props) || {})) == null ? void 0 : l.length) === 0 ? o : Vt(o, {
1424
+ return (c = Vt) == null ? void 0 : c.map(s, (o) => {
1425
+ var d, i, u;
1426
+ return !Gt(o) || ((d = Object.keys((o == null ? void 0 : o.props) || {})) == null ? void 0 : d.length) === 0 ? o : zt(o, {
1417
1427
  ...o == null ? void 0 : o.props,
1418
1428
  ...(o == null ? void 0 : o.type) === "thead" && {
1419
1429
  className: "ant-table-thead"
@@ -1428,13 +1438,13 @@ const me = (e = ".w-wrapper-body") => {
1428
1438
  }
1429
1439
  }
1430
1440
  },
1431
- ...o.type === "tr" && d === "tbody" && {
1441
+ ...o.type === "tr" && a === "tbody" && {
1432
1442
  className: "ant-table-row"
1433
1443
  },
1434
1444
  ...(o == null ? void 0 : o.type) === "tbody" && {
1435
1445
  className: "ant-table-tbody"
1436
1446
  },
1437
- children: (a = o == null ? void 0 : o.props) != null && a.children ? r((u = o == null ? void 0 : o.props) == null ? void 0 : u.children, o == null ? void 0 : o.type) : o == null ? void 0 : o.props
1447
+ children: (i = o == null ? void 0 : o.props) != null && i.children ? r((u = o == null ? void 0 : o.props) == null ? void 0 : u.children, o == null ? void 0 : o.type) : o == null ? void 0 : o.props
1438
1448
  });
1439
1449
  });
1440
1450
  };
@@ -1450,13 +1460,13 @@ const me = (e = ".w-wrapper-body") => {
1450
1460
  children: /* @__PURE__ */ n.jsx("table", { className: "wp-md-table", ...e, children: r(e == null ? void 0 : e.children, "") })
1451
1461
  }
1452
1462
  ) }) }) });
1453
- }, Ms = ({ children: e }) => {
1454
- const t = p(
1463
+ }, Hs = ({ children: e }) => {
1464
+ const t = _(
1455
1465
  "OpenDetailTable",
1456
1466
  "Open Detail Table"
1457
- ), r = p("TableDetail", "Tabel Detail"), { widgetProps: s } = K(), [d, c] = D(!1), o = {
1458
- table: ({ ...l }) => /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
1459
- /* @__PURE__ */ n.jsx(Jn, { props: l }),
1467
+ ), r = _("TableDetail", "Tabel Detail"), { widgetProps: s, objInitPayload: a } = q(), [c, o] = D(!1), d = {
1468
+ table: ({ ...i }) => /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
1469
+ /* @__PURE__ */ n.jsx(Zn, { props: i }),
1460
1470
  /* @__PURE__ */ n.jsx(
1461
1471
  "div",
1462
1472
  {
@@ -1469,7 +1479,7 @@ const me = (e = ".w-wrapper-body") => {
1469
1479
  z,
1470
1480
  {
1471
1481
  onClick: () => {
1472
- c(!0);
1482
+ o(!0);
1473
1483
  },
1474
1484
  children: t
1475
1485
  }
@@ -1477,52 +1487,59 @@ const me = (e = ".w-wrapper-body") => {
1477
1487
  }
1478
1488
  ),
1479
1489
  /* @__PURE__ */ n.jsx(
1480
- at,
1490
+ ut,
1481
1491
  {
1482
1492
  getContainer: () => document.body,
1483
1493
  footer: null,
1484
1494
  title: r,
1485
1495
  width: 800,
1486
- open: d,
1496
+ open: c,
1487
1497
  onCancel: () => {
1488
- c(!1);
1498
+ o(!1);
1489
1499
  },
1490
- children: /* @__PURE__ */ n.jsx(Jn, { props: l, isModal: !0 })
1500
+ children: /* @__PURE__ */ n.jsx(Zn, { props: i, isModal: !0 })
1491
1501
  }
1492
1502
  )
1493
1503
  ] }),
1494
- code: ({ ...l }) => {
1495
- const { children: a, className: u, ...f } = l, x = /language-(\w+)/.exec(u || "");
1496
- return x ? /* @__PURE__ */ n.jsx(
1497
- ss,
1504
+ code: ({ ...i }) => {
1505
+ const { children: u, className: f, ...x } = i, g = /language-(\w+)/.exec(f || "");
1506
+ return g ? /* @__PURE__ */ n.jsx(
1507
+ os,
1498
1508
  {
1499
- ...f,
1509
+ ...x,
1500
1510
  PreTag: "div",
1501
- language: x[1],
1502
- style: Os,
1503
- children: String(a).replace(/\n$/, "")
1511
+ language: g[1],
1512
+ style: Ns,
1513
+ children: String(u).replace(/\n$/, "")
1504
1514
  }
1505
- ) : /* @__PURE__ */ n.jsx(V.Text, { code: !0, children: l == null ? void 0 : l.children });
1515
+ ) : /* @__PURE__ */ n.jsx(V.Text, { code: !0, children: i == null ? void 0 : i.children });
1506
1516
  },
1507
- a: ({ ...l }) => {
1508
- var x;
1509
- const a = l == null ? void 0 : l.href, u = (x = l == null ? void 0 : l.children) == null ? void 0 : x[0];
1510
- return URL.parse(a) && new URL(a) ? /* @__PURE__ */ n.jsx("a", { ...l }) : /* @__PURE__ */ n.jsx(
1511
- "span",
1512
- {
1513
- ...l,
1514
- className: "w-link-path",
1515
- onClick: (g) => {
1516
- var C, y;
1517
- g == null || g.stopPropagation(), a && ((C = Object.keys((s == null ? void 0 : s.history) || {})) == null ? void 0 : C.length) > 0 && ((y = s == null ? void 0 : s.history) == null || y.push(a));
1518
- },
1519
- children: u
1517
+ a: ({ ...i }) => {
1518
+ var C, y, j, p;
1519
+ const u = i == null ? void 0 : i.href, f = (C = i == null ? void 0 : i.children) == null ? void 0 : C[0], x = Qn(u), g = Qn(a == null ? void 0 : a.uriBackend);
1520
+ if (x && g) {
1521
+ const w = (y = gn(u)) == null ? void 0 : y.origin, v = (j = gn(a == null ? void 0 : a.uriBackend)) == null ? void 0 : j.origin;
1522
+ if ((w == null ? void 0 : w.toLowerCase()) === (v == null ? void 0 : v.toLowerCase())) {
1523
+ const h = (p = gn(u)) == null ? void 0 : p.pathname;
1524
+ return /* @__PURE__ */ n.jsx(
1525
+ "span",
1526
+ {
1527
+ ...i,
1528
+ className: "w-link-path",
1529
+ onClick: (b) => {
1530
+ var E, m;
1531
+ b == null || b.stopPropagation(), h && ((E = Object.keys((s == null ? void 0 : s.history) || {})) == null ? void 0 : E.length) > 0 && ((m = s == null ? void 0 : s.history) == null || m.push(h));
1532
+ },
1533
+ children: f
1534
+ }
1535
+ );
1520
1536
  }
1521
- );
1537
+ }
1538
+ return /* @__PURE__ */ n.jsx("a", { ...i, target: "_blank" });
1522
1539
  }
1523
1540
  };
1524
- return /* @__PURE__ */ n.jsx(ns, { remarkPlugins: [ts], components: o, children: e });
1525
- }, dt = R(Ms), Fs = () => /* @__PURE__ */ n.jsx(
1541
+ return /* @__PURE__ */ n.jsx(ss, { remarkPlugins: [rs], components: d, children: e });
1542
+ }, ft = R(Hs), Is = () => /* @__PURE__ */ n.jsx(
1526
1543
  "svg",
1527
1544
  {
1528
1545
  width: "24",
@@ -1540,7 +1557,7 @@ const me = (e = ".w-wrapper-body") => {
1540
1557
  }
1541
1558
  )
1542
1559
  }
1543
- ), Hs = () => /* @__PURE__ */ n.jsx(
1560
+ ), $s = () => /* @__PURE__ */ n.jsx(
1544
1561
  "svg",
1545
1562
  {
1546
1563
  width: "24",
@@ -1557,7 +1574,7 @@ const me = (e = ".w-wrapper-body") => {
1557
1574
  }
1558
1575
  )
1559
1576
  }
1560
- ), Is = () => /* @__PURE__ */ n.jsxs(
1577
+ ), Bs = () => /* @__PURE__ */ n.jsxs(
1561
1578
  "svg",
1562
1579
  {
1563
1580
  viewBox: "64 64 896 896",
@@ -1571,7 +1588,7 @@ const me = (e = ".w-wrapper-body") => {
1571
1588
  /* @__PURE__ */ n.jsx("path", { d: "M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z" })
1572
1589
  ]
1573
1590
  }
1574
- ), $s = () => /* @__PURE__ */ n.jsxs(
1591
+ ), Us = () => /* @__PURE__ */ n.jsxs(
1575
1592
  "svg",
1576
1593
  {
1577
1594
  viewBox: "-2.4 -2.4 28.80 28.80",
@@ -1593,12 +1610,12 @@ const me = (e = ".w-wrapper-body") => {
1593
1610
  fillRule: "evenodd",
1594
1611
  clipRule: "evenodd",
1595
1612
  d: "M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM8.58579 8.58579C8 9.17157 8 10.1144 8 12C8 13.8856 8 14.8284 8.58579 15.4142C9.17157 16 10.1144 16 12 16C13.8856 16 14.8284 16 15.4142 15.4142C16 14.8284 16 13.8856 16 12C16 10.1144 16 9.17157 15.4142 8.58579C14.8284 8 13.8856 8 12 8C10.1144 8 9.17157 8 8.58579 8.58579Z",
1596
- fill: "rgb(57, 94, 188)"
1613
+ fill: "var(--primary-color, #395ebc)"
1597
1614
  }
1598
1615
  ) })
1599
1616
  ]
1600
1617
  }
1601
- ), Bs = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "sync", className: "anticon anticon-sync", children: /* @__PURE__ */ n.jsx(
1618
+ ), Ws = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "sync", className: "anticon anticon-sync", children: /* @__PURE__ */ n.jsx(
1602
1619
  "svg",
1603
1620
  {
1604
1621
  viewBox: "64 64 896 896",
@@ -1609,7 +1626,7 @@ const me = (e = ".w-wrapper-body") => {
1609
1626
  "aria-hidden": "true",
1610
1627
  children: /* @__PURE__ */ n.jsx("path", { d: "M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z" })
1611
1628
  }
1612
- ) }), Us = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "left", className: "anticon anticon-left", children: /* @__PURE__ */ n.jsx(
1629
+ ) }), Vs = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "left", className: "anticon anticon-left", children: /* @__PURE__ */ n.jsx(
1613
1630
  "svg",
1614
1631
  {
1615
1632
  viewBox: "64 64 896 896",
@@ -1620,7 +1637,7 @@ const me = (e = ".w-wrapper-body") => {
1620
1637
  "aria-hidden": "true",
1621
1638
  children: /* @__PURE__ */ n.jsx("path", { d: "M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z" })
1622
1639
  }
1623
- ) }), Ws = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "right", className: "anticon anticon-right", children: /* @__PURE__ */ n.jsx(
1640
+ ) }), Gs = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "right", className: "anticon anticon-right", children: /* @__PURE__ */ n.jsx(
1624
1641
  "svg",
1625
1642
  {
1626
1643
  viewBox: "64 64 896 896",
@@ -1631,7 +1648,7 @@ const me = (e = ".w-wrapper-body") => {
1631
1648
  "aria-hidden": "true",
1632
1649
  children: /* @__PURE__ */ n.jsx("path", { d: "M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z" })
1633
1650
  }
1634
- ) }), Vs = ({ ...e }) => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "like", className: "anticon anticon-like", children: /* @__PURE__ */ n.jsxs(
1651
+ ) }), zs = ({ ...e }) => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "like", className: "anticon anticon-like", children: /* @__PURE__ */ n.jsxs(
1635
1652
  "svg",
1636
1653
  {
1637
1654
  viewBox: "64 64 896 896",
@@ -1658,7 +1675,7 @@ const me = (e = ".w-wrapper-body") => {
1658
1675
  )
1659
1676
  ]
1660
1677
  }
1661
- ) }), Gs = ({ ...e }) => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "dislike", className: "anticon anticon-dislike", children: /* @__PURE__ */ n.jsxs(
1678
+ ) }), Ys = ({ ...e }) => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "dislike", className: "anticon anticon-dislike", children: /* @__PURE__ */ n.jsxs(
1662
1679
  "svg",
1663
1680
  {
1664
1681
  viewBox: "64 64 896 896",
@@ -1685,7 +1702,7 @@ const me = (e = ".w-wrapper-body") => {
1685
1702
  )
1686
1703
  ]
1687
1704
  }
1688
- ) }), zs = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "delete", className: "anticon anticon-delete", children: /* @__PURE__ */ n.jsx(
1705
+ ) }), Ks = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "delete", className: "anticon anticon-delete", children: /* @__PURE__ */ n.jsx(
1689
1706
  "svg",
1690
1707
  {
1691
1708
  viewBox: "64 64 896 896",
@@ -1696,7 +1713,7 @@ const me = (e = ".w-wrapper-body") => {
1696
1713
  "aria-hidden": "true",
1697
1714
  children: /* @__PURE__ */ n.jsx("path", { d: "M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z" })
1698
1715
  }
1699
- ) }), Ys = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "close", className: "anticon anticon-close", children: /* @__PURE__ */ n.jsx(
1716
+ ) }), qs = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "close", className: "anticon anticon-close", children: /* @__PURE__ */ n.jsx(
1700
1717
  "svg",
1701
1718
  {
1702
1719
  fillRule: "evenodd",
@@ -1709,7 +1726,7 @@ const me = (e = ".w-wrapper-body") => {
1709
1726
  "aria-hidden": "true",
1710
1727
  children: /* @__PURE__ */ n.jsx("path", { d: "M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z" })
1711
1728
  }
1712
- ) }), Ks = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "upload", className: "anticon anticon-upload", children: /* @__PURE__ */ n.jsx(
1729
+ ) }), Js = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "upload", className: "anticon anticon-upload", children: /* @__PURE__ */ n.jsx(
1713
1730
  "svg",
1714
1731
  {
1715
1732
  viewBox: "64 64 896 896",
@@ -1720,7 +1737,7 @@ const me = (e = ".w-wrapper-body") => {
1720
1737
  "aria-hidden": "true",
1721
1738
  children: /* @__PURE__ */ n.jsx("path", { d: "M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z" })
1722
1739
  }
1723
- ) }), qs = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "filter", className: "anticon anticon-filter", children: /* @__PURE__ */ n.jsx(
1740
+ ) }), Qs = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "filter", className: "anticon anticon-filter", children: /* @__PURE__ */ n.jsx(
1724
1741
  "svg",
1725
1742
  {
1726
1743
  viewBox: "64 64 896 896",
@@ -1731,7 +1748,7 @@ const me = (e = ".w-wrapper-body") => {
1731
1748
  "aria-hidden": "true",
1732
1749
  children: /* @__PURE__ */ n.jsx("path", { d: "M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z" })
1733
1750
  }
1734
- ) }), Js = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "down", className: "anticon anticon-down", children: /* @__PURE__ */ n.jsx(
1751
+ ) }), Zs = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "down", className: "anticon anticon-down", children: /* @__PURE__ */ n.jsx(
1735
1752
  "svg",
1736
1753
  {
1737
1754
  viewBox: "64 64 896 896",
@@ -1742,7 +1759,7 @@ const me = (e = ".w-wrapper-body") => {
1742
1759
  "aria-hidden": "true",
1743
1760
  children: /* @__PURE__ */ n.jsx("path", { d: "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" })
1744
1761
  }
1745
- ) }), Qs = ({ ...e }) => /* @__PURE__ */ n.jsx(
1762
+ ) }), Xs = ({ ...e }) => /* @__PURE__ */ n.jsx(
1746
1763
  "span",
1747
1764
  {
1748
1765
  role: "img",
@@ -1762,7 +1779,7 @@ const me = (e = ".w-wrapper-body") => {
1762
1779
  }
1763
1780
  )
1764
1781
  }
1765
- ), Zs = () => /* @__PURE__ */ n.jsx(
1782
+ ), Ps = () => /* @__PURE__ */ n.jsx(
1766
1783
  "svg",
1767
1784
  {
1768
1785
  xmlns: "http://www.w3.org/2000/svg",
@@ -1778,7 +1795,7 @@ const me = (e = ".w-wrapper-body") => {
1778
1795
  }
1779
1796
  )
1780
1797
  }
1781
- ), Xs = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "smile", className: "anticon anticon-smile", children: /* @__PURE__ */ n.jsx(
1798
+ ), er = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "smile", className: "anticon anticon-smile", children: /* @__PURE__ */ n.jsx(
1782
1799
  "svg",
1783
1800
  {
1784
1801
  viewBox: "64 64 896 896",
@@ -1789,7 +1806,7 @@ const me = (e = ".w-wrapper-body") => {
1789
1806
  "aria-hidden": "true",
1790
1807
  children: /* @__PURE__ */ n.jsx("path", { d: "M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z" })
1791
1808
  }
1792
- ) }), Ps = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "file", className: "anticon anticon-file", children: /* @__PURE__ */ n.jsx(
1809
+ ) }), nr = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "file", className: "anticon anticon-file", children: /* @__PURE__ */ n.jsx(
1793
1810
  "svg",
1794
1811
  {
1795
1812
  viewBox: "64 64 896 896",
@@ -1800,7 +1817,7 @@ const me = (e = ".w-wrapper-body") => {
1800
1817
  "aria-hidden": "true",
1801
1818
  children: /* @__PURE__ */ n.jsx("path", { d: "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z" })
1802
1819
  }
1803
- ) }), er = ({ ...e }) => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "loading", ...e, className: "w-spin-animate", children: /* @__PURE__ */ n.jsx(
1820
+ ) }), tr = ({ ...e }) => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "loading", ...e, className: "w-spin-animate", children: /* @__PURE__ */ n.jsx(
1804
1821
  "svg",
1805
1822
  {
1806
1823
  viewBox: "0 0 1024 1024",
@@ -1814,31 +1831,31 @@ const me = (e = ".w-wrapper-body") => {
1814
1831
  }
1815
1832
  ) }), P = ({ type: e = "", chatProps: t, ...r }) => {
1816
1833
  const s = O(() => ({
1817
- minimize: Fs,
1818
- expand: Hs,
1819
- send: Is,
1820
- stop: $s,
1821
- sync: Bs,
1822
- left: Us,
1823
- right: Ws,
1824
- like: () => /* @__PURE__ */ n.jsx(Vs, { ...t }),
1825
- dislike: () => /* @__PURE__ */ n.jsx(Gs, { ...t }),
1826
- delete: zs,
1827
- close: Ys,
1828
- upload: Ks,
1829
- filter: qs,
1830
- down: Js,
1831
- "paper-clip": () => /* @__PURE__ */ n.jsx(Qs, { ...r }),
1832
- "chat-bubble": Zs,
1833
- smile: Xs,
1834
- file: Ps,
1835
- loading: () => /* @__PURE__ */ n.jsx(er, { ...r })
1834
+ minimize: Is,
1835
+ expand: $s,
1836
+ send: Bs,
1837
+ stop: Us,
1838
+ sync: Ws,
1839
+ left: Vs,
1840
+ right: Gs,
1841
+ like: () => /* @__PURE__ */ n.jsx(zs, { ...t }),
1842
+ dislike: () => /* @__PURE__ */ n.jsx(Ys, { ...t }),
1843
+ delete: Ks,
1844
+ close: qs,
1845
+ upload: Js,
1846
+ filter: Qs,
1847
+ down: Zs,
1848
+ "paper-clip": () => /* @__PURE__ */ n.jsx(Xs, { ...r }),
1849
+ "chat-bubble": Ps,
1850
+ smile: er,
1851
+ file: nr,
1852
+ loading: () => /* @__PURE__ */ n.jsx(tr, { ...r })
1836
1853
  }), [e, t, r]);
1837
- return /* @__PURE__ */ n.jsx(rs, { component: s == null ? void 0 : s[e], ...r });
1838
- }, ut = Te({}), be = () => ye(ut), nr = ({ children: e }) => {
1854
+ return /* @__PURE__ */ n.jsx(cs, { component: s == null ? void 0 : s[e], ...r });
1855
+ }, xt = Te({}), be = () => ye(xt), sr = ({ children: e }) => {
1839
1856
  const [t, r] = D("va"), s = O(() => t === "va", [t]);
1840
1857
  return /* @__PURE__ */ n.jsx(
1841
- ut.Provider,
1858
+ xt.Provider,
1842
1859
  {
1843
1860
  value: {
1844
1861
  activeTab: t,
@@ -1848,28 +1865,28 @@ const me = (e = ".w-wrapper-body") => {
1848
1865
  children: e
1849
1866
  }
1850
1867
  );
1851
- }, tr = ({ ...e }) => {
1852
- const t = p(
1868
+ }, rr = ({ ...e }) => {
1869
+ const t = _(
1853
1870
  "WeLoveToHearAboutYourExperienceWithTheSunfishChatbot",
1854
1871
  "We'd love to hear about your experience with the Sunfish chatbot"
1855
- ), r = p(
1872
+ ), r = _(
1856
1873
  "ShareAnyCommentsOrSuggestionsToHelpUsImprove",
1857
1874
  "Share any comments or suggestions to help us improve"
1858
- ), s = p("Submit", "Submit"), d = p(
1875
+ ), s = _("Submit", "Submit"), a = _(
1859
1876
  "ThankFeedback",
1860
1877
  "Thank You for your feedback"
1861
- ), c = p(
1878
+ ), c = _(
1862
1879
  "AdditionalFeedback",
1863
1880
  "Additional Feedback"
1864
- ), [o] = oe.useForm(), [l, a] = D(!1), [u, f] = D(""), { setChats: x } = fe(), { objInitPayload: g } = K(), { activeTab: C } = be(), y = O(() => {
1865
- var E;
1881
+ ), [o] = oe.useForm(), [d, i] = D(!1), [u, f] = D(""), { setChats: x } = fe(), { objInitPayload: g } = q(), { activeTab: C } = be(), y = O(() => {
1882
+ var h;
1866
1883
  const v = le(e, "feedback") ? (e == null ? void 0 : e.feedback) === "like" || (e == null ? void 0 : e.feedback) === "" : !0;
1867
- return typeof (e == null ? void 0 : e.text_thumbsup_link) == "string" && ((E = e == null ? void 0 : e.text_thumbsup_link) == null ? void 0 : E.trim()) !== "" && v;
1868
- }, [e]), w = O(() => {
1869
- var E;
1884
+ return typeof (e == null ? void 0 : e.text_thumbsup_link) == "string" && ((h = e == null ? void 0 : e.text_thumbsup_link) == null ? void 0 : h.trim()) !== "" && v;
1885
+ }, [e]), j = O(() => {
1886
+ var h;
1870
1887
  const v = le(e, "feedback") ? (e == null ? void 0 : e.feedback) === "dislike" || (e == null ? void 0 : e.feedback) === "" : !0;
1871
- return typeof (e == null ? void 0 : e.text_thumbsdown_link) == "string" && ((E = e == null ? void 0 : e.text_thumbsdown_link) == null ? void 0 : E.trim()) !== "" && v;
1872
- }, [e]), k = O(() => {
1888
+ return typeof (e == null ? void 0 : e.text_thumbsdown_link) == "string" && ((h = e == null ? void 0 : e.text_thumbsdown_link) == null ? void 0 : h.trim()) !== "" && v;
1889
+ }, [e]), p = O(() => {
1873
1890
  if (g != null && g.uriBackend)
1874
1891
  try {
1875
1892
  return new URL(g.uriBackend).origin;
@@ -1877,19 +1894,19 @@ const me = (e = ".w-wrapper-body") => {
1877
1894
  return "";
1878
1895
  }
1879
1896
  return "";
1880
- }, [g == null ? void 0 : g.uriBackend]), _ = (v) => {
1897
+ }, [g == null ? void 0 : g.uriBackend]), w = (v) => {
1881
1898
  var M;
1882
- const E = v === "like" ? e == null ? void 0 : e.text_thumbsup_link : e == null ? void 0 : e.text_thumbsdown_link, {
1899
+ const h = v === "like" ? e == null ? void 0 : e.text_thumbsup_link : e == null ? void 0 : e.text_thumbsdown_link, {
1883
1900
  access_token: b = "",
1884
- companycode: h = "",
1901
+ companycode: E = "",
1885
1902
  companyid: m = "",
1886
- uriBackend: j = "",
1903
+ uriBackend: k = "",
1887
1904
  uriBackendEnt: S = "",
1888
- lang: I = ""
1905
+ lang: H = ""
1889
1906
  } = g || {}, B = u === "another" ? o == null ? void 0 : o.getFieldValue("ADDITIONAL_FEEDBACK") : u;
1890
1907
  (M = Oe({
1891
1908
  method: "POST",
1892
- url: E,
1909
+ url: h,
1893
1910
  data: {
1894
1911
  message_id: e == null ? void 0 : e.id,
1895
1912
  response_type: v === "like" ? "up" : "down",
@@ -1900,43 +1917,43 @@ const me = (e = ".w-wrapper-body") => {
1900
1917
  headers: {
1901
1918
  "Content-Type": "application/json",
1902
1919
  Authorization: `Bearer ${b}`,
1903
- "company-code": `${h}`,
1920
+ "company-code": `${E}`,
1904
1921
  "company-id": `${m}`,
1905
- uriBackend: `${j}`,
1922
+ uriBackend: `${k}`,
1906
1923
  uriBackendEnt: `${S}`,
1907
- "custom-origin": `${k}`,
1908
- "Acc-Name": `${h.toUpperCase()}`,
1909
- Language: `${I}`
1924
+ "custom-origin": `${p}`,
1925
+ "Acc-Name": `${E.toUpperCase()}`,
1926
+ Language: `${H}`
1910
1927
  }
1911
1928
  })) == null || M.then((L) => {
1912
- var F, $, H;
1913
- (L == null ? void 0 : L.status) === 200 && (l && a(!1), (F = ie) == null || F.destroy(), ($ = ie) == null || $.config({
1929
+ var I, $, F;
1930
+ (L == null ? void 0 : L.status) === 200 && (d && i(!1), (I = ie) == null || I.destroy(), ($ = ie) == null || $.config({
1914
1931
  getContainer: () => document.querySelector(".w-widget-content-container"),
1915
1932
  top: 28,
1916
1933
  placement: "top",
1917
1934
  duration: 3
1918
- }), (H = ie) == null || H.success({
1919
- message: d,
1935
+ }), (F = ie) == null || F.success({
1936
+ message: a,
1920
1937
  className: "w-notification-content"
1921
1938
  }), x((G) => {
1922
- var Z;
1923
- return (Z = G == null ? void 0 : G.map((q) => {
1939
+ var J;
1940
+ return (J = G == null ? void 0 : G.map((Y) => {
1924
1941
  var ee;
1925
- if (le(q, "chats")) {
1926
- const de = (ee = q == null ? void 0 : q.chats) == null ? void 0 : ee.map((ce) => (ce == null ? void 0 : ce.indexChat) === (e == null ? void 0 : e.indexChat) ? {
1942
+ if (le(Y, "chats")) {
1943
+ const de = (ee = Y == null ? void 0 : Y.chats) == null ? void 0 : ee.map((ce) => (ce == null ? void 0 : ce.indexChat) === (e == null ? void 0 : e.indexChat) ? {
1927
1944
  ...ce,
1928
1945
  feedback: v
1929
1946
  } : ce);
1930
1947
  return {
1931
- ...q,
1948
+ ...Y,
1932
1949
  chats: de
1933
1950
  };
1934
1951
  }
1935
- return (e == null ? void 0 : e.message_id) === (q == null ? void 0 : q.message_id) ? {
1936
- ...q,
1952
+ return (e == null ? void 0 : e.message_id) === (Y == null ? void 0 : Y.message_id) ? {
1953
+ ...Y,
1937
1954
  feedback: v
1938
- } : q;
1939
- })) == null ? void 0 : Z.flat();
1955
+ } : Y;
1956
+ })) == null ? void 0 : J.flat();
1940
1957
  }));
1941
1958
  });
1942
1959
  };
@@ -1949,30 +1966,30 @@ const me = (e = ".w-wrapper-body") => {
1949
1966
  {
1950
1967
  icon: /* @__PURE__ */ n.jsx(P, { type: "like", chatProps: e }),
1951
1968
  onClick: () => {
1952
- (e == null ? void 0 : e.feedback) !== "like" && _("like");
1969
+ (e == null ? void 0 : e.feedback) !== "like" && w("like");
1953
1970
  }
1954
1971
  }
1955
1972
  ),
1956
- w && /* @__PURE__ */ n.jsx(
1973
+ j && /* @__PURE__ */ n.jsx(
1957
1974
  z,
1958
1975
  {
1959
1976
  icon: /* @__PURE__ */ n.jsx(P, { type: "dislike", chatProps: e }),
1960
1977
  onClick: () => {
1961
- (e == null ? void 0 : e.feedback) !== "dislike" && a(!0);
1978
+ (e == null ? void 0 : e.feedback) !== "dislike" && i(!0);
1962
1979
  }
1963
1980
  }
1964
1981
  ),
1965
1982
  /* @__PURE__ */ n.jsxs(
1966
- at,
1983
+ ut,
1967
1984
  {
1968
- open: l,
1985
+ open: d,
1969
1986
  isFeedback: !0,
1970
1987
  okText: s,
1971
1988
  onCancel: () => {
1972
- a(!1);
1989
+ i(!1);
1973
1990
  },
1974
1991
  onOk: () => {
1975
- _("dislike");
1992
+ w("dislike");
1976
1993
  },
1977
1994
  children: [
1978
1995
  /* @__PURE__ */ n.jsx("p", { style: { textAlign: "center", fontWeight: 600, fontSize: 14 }, children: t }),
@@ -1981,33 +1998,33 @@ const me = (e = ".w-wrapper-body") => {
1981
1998
  "!"
1982
1999
  ] }),
1983
2000
  /* @__PURE__ */ n.jsx(
1984
- Yt.Group,
2001
+ qt.Group,
1985
2002
  {
1986
2003
  className: "w-list-feedback-suggestion",
1987
- options: Cs,
2004
+ options: bs,
1988
2005
  optionType: "button",
1989
2006
  buttonStyle: "solid",
1990
2007
  onChange: (v) => {
1991
- var E;
1992
- f((E = v == null ? void 0 : v.target) == null ? void 0 : E.value);
2008
+ var h;
2009
+ f((h = v == null ? void 0 : v.target) == null ? void 0 : h.value);
1993
2010
  }
1994
2011
  }
1995
2012
  ),
1996
2013
  u === "another" && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
1997
- /* @__PURE__ */ n.jsx(Kt, { children: c }),
2014
+ /* @__PURE__ */ n.jsx(Jt, { children: c }),
1998
2015
  /* @__PURE__ */ n.jsx(oe, { form: o, layout: "vertical", children: /* @__PURE__ */ n.jsx(oe.Item, { name: "ADDITIONAL_FEEDBACK", children: /* @__PURE__ */ n.jsx(Be.TextArea, { rows: 3 }) }) })
1999
2016
  ] })
2000
2017
  ]
2001
2018
  }
2002
2019
  )
2003
2020
  ] });
2004
- }, sr = R(tr), rr = ({
2021
+ }, or = R(rr), cr = ({
2005
2022
  showFeedback: e = !0,
2006
2023
  showRegenerate: t = !0,
2007
2024
  position: r = "left",
2008
2025
  ...s
2009
2026
  }) => {
2010
- const d = js(), { chats: c, onSendMsg: o, setChats: l, loadingRegenerate: a, currRegenerateId: u } = fe(), f = O(() => s == null ? void 0 : s.sender, [s]), x = O(() => c == null ? void 0 : c.filter((k) => (k == null ? void 0 : k.sender) === "client"), [c]), g = O(() => t && f === "response" && (x == null ? void 0 : x.length) > 0 && (s == null ? void 0 : s.indexChat) === (c == null ? void 0 : c.length) - 1, [f, x, c, s == null ? void 0 : s.indexChat, t]), C = O(() => {
2027
+ const a = ks(), { chats: c, onSendMsg: o, setChats: d, loadingRegenerate: i, currRegenerateId: u } = fe(), f = O(() => s == null ? void 0 : s.sender, [s]), x = O(() => c == null ? void 0 : c.filter((p) => (p == null ? void 0 : p.sender) === "client"), [c]), g = O(() => t && f === "response" && (x == null ? void 0 : x.length) > 0 && (s == null ? void 0 : s.indexChat) === (c == null ? void 0 : c.length) - 1, [f, x, c, s == null ? void 0 : s.indexChat, t]), C = O(() => {
2011
2028
  switch (r) {
2012
2029
  case "left":
2013
2030
  return "flex-start";
@@ -2016,20 +2033,20 @@ const me = (e = ".w-wrapper-body") => {
2016
2033
  case "right":
2017
2034
  return "flex-end";
2018
2035
  }
2019
- }, [r]), y = O(() => e && (s == null ? void 0 : s.text_FeedbackIcons) === "hidup", [s, e]), w = () => {
2020
- const k = x == null ? void 0 : x[(x == null ? void 0 : x.length) - 1], _ = c == null ? void 0 : c[(c == null ? void 0 : c.length) - 1];
2021
- l(
2022
- (v = []) => v == null ? void 0 : v.map((E, b) => b === (v == null ? void 0 : v.length) - 1 && (E == null ? void 0 : E.sender) === "response" ? {
2023
- ...E,
2024
- generated_id: (_ == null ? void 0 : _.generated_id) ?? d
2036
+ }, [r]), y = O(() => e && (s == null ? void 0 : s.text_FeedbackIcons) === "hidup", [s, e]), j = () => {
2037
+ const p = x == null ? void 0 : x[(x == null ? void 0 : x.length) - 1], w = c == null ? void 0 : c[(c == null ? void 0 : c.length) - 1];
2038
+ d(
2039
+ (v = []) => v == null ? void 0 : v.map((h, b) => b === (v == null ? void 0 : v.length) - 1 && (h == null ? void 0 : h.sender) === "response" ? {
2040
+ ...h,
2041
+ generated_id: (w == null ? void 0 : w.generated_id) ?? a
2025
2042
  // adjust with response
2026
- } : E)
2027
- ), u.current = (_ == null ? void 0 : _.generated_id) ?? d, o({
2028
- msg: k == null ? void 0 : k.text,
2043
+ } : h)
2044
+ ), u.current = (w == null ? void 0 : w.generated_id) ?? a, o({
2045
+ msg: p == null ? void 0 : p.text,
2029
2046
  additionalConfig: {
2030
- generate_id: (_ == null ? void 0 : _.generated_id) ?? d
2047
+ generate_id: (w == null ? void 0 : w.generated_id) ?? a
2031
2048
  },
2032
- isShowLoadingResponse: a
2049
+ isShowLoadingResponse: i
2033
2050
  }), me();
2034
2051
  };
2035
2052
  return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(
@@ -2044,80 +2061,80 @@ const me = (e = ".w-wrapper-body") => {
2044
2061
  g && /* @__PURE__ */ n.jsx(
2045
2062
  z,
2046
2063
  {
2047
- loading: a,
2064
+ loading: i,
2048
2065
  icon: /* @__PURE__ */ n.jsx(P, { type: "sync" }),
2049
2066
  onClick: () => {
2050
- w();
2067
+ j();
2051
2068
  }
2052
2069
  }
2053
2070
  ),
2054
- y && /* @__PURE__ */ n.jsx(sr, { ...s })
2071
+ y && /* @__PURE__ */ n.jsx(or, { ...s })
2055
2072
  ]
2056
2073
  }
2057
2074
  ) });
2058
- }, Cn = R(rr), or = ({ nameFallback: e = "", ...t }) => /* @__PURE__ */ n.jsx(
2059
- qt,
2075
+ }, mn = R(cr), ir = ({ nameFallback: e = "", ...t }) => /* @__PURE__ */ n.jsx(
2076
+ Qt,
2060
2077
  {
2061
2078
  ...typeof (t == null ? void 0 : t.onError) != "function" && {
2062
- fallback: jn(e)
2079
+ fallback: wn(e)
2063
2080
  },
2064
2081
  placeholder: /* @__PURE__ */ n.jsx(ue.Image, { style: { width: "100%", height: "100%" } }),
2065
2082
  loading: "lazy",
2066
2083
  ...t
2067
2084
  }
2068
- ), wn = R(or), cr = ({ nameFallback: e = "", ...t }) => {
2069
- const r = Y(0);
2085
+ ), kn = R(ir), lr = ({ nameFallback: e = "", ...t }) => {
2086
+ const r = K(0);
2070
2087
  return /* @__PURE__ */ n.jsx(
2071
- Qn,
2088
+ Xn,
2072
2089
  {
2073
2090
  ...t,
2074
2091
  src: /* @__PURE__ */ n.jsx(
2075
- wn,
2092
+ kn,
2076
2093
  {
2077
2094
  src: t == null ? void 0 : t.src,
2078
2095
  nameFallback: e,
2079
2096
  ...t,
2080
2097
  onError: (s) => {
2081
- r.current += 1, (r == null ? void 0 : r.current) < 3 ? s.target.src = ot(t == null ? void 0 : t.src) : s.target.src = jn(e);
2098
+ r.current += 1, (r == null ? void 0 : r.current) < 3 ? s.target.src = it(t == null ? void 0 : t.src) : s.target.src = wn(e);
2082
2099
  }
2083
2100
  }
2084
2101
  )
2085
2102
  }
2086
2103
  );
2087
- }, Ee = R(cr);
2088
- Ee.Group = Qn.Group;
2089
- const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", children: [
2104
+ }, Ee = R(lr);
2105
+ Ee.Group = Xn.Group;
2106
+ const ar = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", children: [
2090
2107
  /* @__PURE__ */ n.jsx("div", {}),
2091
2108
  /* @__PURE__ */ n.jsx("div", {}),
2092
2109
  /* @__PURE__ */ n.jsx("div", {}),
2093
2110
  /* @__PURE__ */ n.jsx("div", {})
2094
- ] }), ft = R(ir), lr = () => {
2095
- const { widgetProps: e } = K();
2111
+ ] }), gt = R(ar), dr = () => {
2112
+ const { widgetProps: e } = q();
2096
2113
  return /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
2097
2114
  /* @__PURE__ */ n.jsx(Ee, { src: Ze, nameFallback: e == null ? void 0 : e.title }),
2098
- /* @__PURE__ */ n.jsx(ft, {})
2115
+ /* @__PURE__ */ n.jsx(gt, {})
2099
2116
  ] });
2100
- }, _n = R(lr), ar = ({ src: e, name: t }) => /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
2117
+ }, pn = R(dr), ur = ({ src: e, name: t }) => /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
2101
2118
  /* @__PURE__ */ n.jsx(Ee, { src: e, preview: !1, nameFallback: t }),
2102
2119
  /* @__PURE__ */ n.jsx(V.Text, { children: t })
2103
- ] }), Ue = R(ar), dr = ({ ...e }) => {
2120
+ ] }), Ue = R(ur), fr = ({ ...e }) => {
2104
2121
  var f, x;
2105
- const [t, r] = D(1), { loadingRegenerate: s, currRegenerateId: d } = fe(), { isExpand: c, widgetProps: o } = K(), l = O(() => e == null ? void 0 : e.sender, [e]), a = O(() => e == null ? void 0 : e.chats, [e == null ? void 0 : e.chats]), u = O(() => {
2106
- const g = a == null ? void 0 : a[(a == null ? void 0 : a.length) - 1];
2107
- return (g == null ? void 0 : g.generated_id) === d.current;
2108
- }, [a, e, d.current]);
2122
+ const [t, r] = D(1), { loadingRegenerate: s, currRegenerateId: a } = fe(), { isExpand: c, widgetProps: o } = q(), d = O(() => e == null ? void 0 : e.sender, [e]), i = O(() => e == null ? void 0 : e.chats, [e == null ? void 0 : e.chats]), u = O(() => {
2123
+ const g = i == null ? void 0 : i[(i == null ? void 0 : i.length) - 1];
2124
+ return (g == null ? void 0 : g.generated_id) === a.current;
2125
+ }, [i, e, a.current]);
2109
2126
  return X(() => {
2110
- !s && (a == null ? void 0 : a.length) > 0 && (r(a == null ? void 0 : a.length), me());
2111
- }, [s]), s && u ? /* @__PURE__ */ n.jsx(_n, {}) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2112
- l === "response" && /* @__PURE__ */ n.jsx(Ue, { name: o == null ? void 0 : o.title, src: Ze }),
2113
- /* @__PURE__ */ n.jsx("div", { style: { display: "flex", gap: 8 }, children: a == null ? void 0 : a.map((g, C) => {
2114
- var k;
2115
- const y = C === ((k = e == null ? void 0 : e.chats) == null ? void 0 : k.length) - 1, w = t === C + 1;
2127
+ !s && (i == null ? void 0 : i.length) > 0 && (r(i == null ? void 0 : i.length), me());
2128
+ }, [s]), s && u ? /* @__PURE__ */ n.jsx(pn, {}) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2129
+ d === "response" && /* @__PURE__ */ n.jsx(Ue, { name: o == null ? void 0 : o.title, src: Ze }),
2130
+ /* @__PURE__ */ n.jsx("div", { style: { display: "flex", gap: 8 }, children: i == null ? void 0 : i.map((g, C) => {
2131
+ var p;
2132
+ const y = C === ((p = e == null ? void 0 : e.chats) == null ? void 0 : p.length) - 1, j = t === C + 1;
2116
2133
  return /* @__PURE__ */ n.jsxs(
2117
2134
  "div",
2118
2135
  {
2119
2136
  style: {
2120
- display: w ? "flex" : "none",
2137
+ display: j ? "flex" : "none",
2121
2138
  flexDirection: "column",
2122
2139
  gap: 8
2123
2140
  },
@@ -2132,17 +2149,17 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2132
2149
  children: /* @__PURE__ */ n.jsxs(
2133
2150
  "div",
2134
2151
  {
2135
- className: `w-bubble-chat w-bubble-chat-regenerate ${`w-${l}`} ${c ? "w-bubble-chat-regenerate-expand" : ""}`,
2152
+ className: `w-bubble-chat w-bubble-chat-regenerate ${`w-${d}`} ${c ? "w-bubble-chat-regenerate-expand" : ""}`,
2136
2153
  children: [
2137
- /* @__PURE__ */ n.jsx(dt, { children: g == null ? void 0 : g.text }),
2138
- l === "response" && /* @__PURE__ */ n.jsx("span", { style: { fontSize: 12, color: "rgba(0,0,0,0.4)" }, children: g == null ? void 0 : g.timestamp })
2154
+ /* @__PURE__ */ n.jsx(ft, { children: g == null ? void 0 : g.text }),
2155
+ d === "response" && /* @__PURE__ */ n.jsx("span", { style: { fontSize: 12, color: "rgba(0,0,0,0.4)" }, children: g == null ? void 0 : g.timestamp })
2139
2156
  ]
2140
2157
  }
2141
2158
  )
2142
2159
  }
2143
2160
  ),
2144
2161
  /* @__PURE__ */ n.jsx(
2145
- Cn,
2162
+ mn,
2146
2163
  {
2147
2164
  showFeedback: !0,
2148
2165
  showRegenerate: !1,
@@ -2156,7 +2173,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2156
2173
  }) }),
2157
2174
  /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, justifyContent: "center" }, children: [
2158
2175
  /* @__PURE__ */ n.jsx(
2159
- Cn,
2176
+ mn,
2160
2177
  {
2161
2178
  showRegenerate: !0,
2162
2179
  showFeedback: !1,
@@ -2197,8 +2214,8 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2197
2214
  ] })
2198
2215
  ] })
2199
2216
  ] });
2200
- }, ur = R(dr), fr = ({ date: e, format: t, sender: r, ...s }) => {
2201
- var d, c;
2217
+ }, xr = R(fr), gr = ({ date: e, format: t, sender: r, ...s }) => {
2218
+ var a, c;
2202
2219
  return /* @__PURE__ */ n.jsx(
2203
2220
  V.Text,
2204
2221
  {
@@ -2210,32 +2227,32 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2210
2227
  ...r === "client" && {
2211
2228
  textAlign: "right"
2212
2229
  },
2213
- ...((d = Object.keys((s == null ? void 0 : s.style) || {})) == null ? void 0 : d.length) > 0 && {
2230
+ ...((a = Object.keys((s == null ? void 0 : s.style) || {})) == null ? void 0 : a.length) > 0 && {
2214
2231
  ...s == null ? void 0 : s.style
2215
2232
  }
2216
2233
  },
2217
2234
  children: t ? (c = ae(e)) == null ? void 0 : c.format(t) : e
2218
2235
  }
2219
2236
  );
2220
- }, We = R(fr), xr = ({ showResponseInfo: e = !0, ...t }) => {
2221
- var l;
2222
- const { loadingRegenerate: r, chats: s } = fe(), { widgetProps: d } = K(), c = O(() => (s == null ? void 0 : s.length) - 1 === (t == null ? void 0 : t.indexChat), [s]), o = O(() => t == null ? void 0 : t.sender, [t]);
2223
- return ((l = t == null ? void 0 : t.chats) == null ? void 0 : l.length) > 0 ? /* @__PURE__ */ n.jsx(ur, { ...t }) : r && c ? /* @__PURE__ */ n.jsx(_n, {}) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2224
- o === "response" && e && /* @__PURE__ */ n.jsx(Ue, { name: d == null ? void 0 : d.title, src: Ze }),
2237
+ }, We = R(gr), Cr = ({ showResponseInfo: e = !0, ...t }) => {
2238
+ var d;
2239
+ const { loadingRegenerate: r, chats: s } = fe(), { widgetProps: a } = q(), c = O(() => (s == null ? void 0 : s.length) - 1 === (t == null ? void 0 : t.indexChat), [s]), o = O(() => t == null ? void 0 : t.sender, [t]);
2240
+ return ((d = t == null ? void 0 : t.chats) == null ? void 0 : d.length) > 0 ? /* @__PURE__ */ n.jsx(xr, { ...t }) : r && c ? /* @__PURE__ */ n.jsx(pn, {}) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2241
+ o === "response" && e && /* @__PURE__ */ n.jsx(Ue, { name: a == null ? void 0 : a.title, src: Ze }),
2225
2242
  /* @__PURE__ */ n.jsxs("div", { className: `w-bubble-chat ${`w-${o}`}`, children: [
2226
- /* @__PURE__ */ n.jsx(dt, { children: t == null ? void 0 : t.text }),
2243
+ /* @__PURE__ */ n.jsx(ft, { children: t == null ? void 0 : t.text }),
2227
2244
  /* @__PURE__ */ n.jsx(We, { date: t == null ? void 0 : t.timestamp, sender: o })
2228
2245
  ] }),
2229
- /* @__PURE__ */ n.jsx(Cn, { ...t })
2246
+ /* @__PURE__ */ n.jsx(mn, { ...t })
2230
2247
  ] });
2231
- }, $e = R(xr), gr = () => {
2232
- const e = p(
2248
+ }, $e = R(Cr), mr = () => {
2249
+ const e = _(
2233
2250
  "PleaseUploadFile",
2234
2251
  "Please upload specify file that needed to complete your request"
2235
- ), t = p("ClickToUpload", "Click to upload"), r = p(
2252
+ ), t = _("ClickToUpload", "Click to upload"), r = _(
2236
2253
  "ContinueWithoutUpload",
2237
2254
  "Continue without upload"
2238
- ), { onSendMsg: s, setFile: d } = fe(), c = () => {
2255
+ ), { onSendMsg: s, setFile: a } = fe(), c = () => {
2239
2256
  s({
2240
2257
  msg: "CANCEL UPLOAD"
2241
2258
  });
@@ -2260,14 +2277,14 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2260
2277
  ),
2261
2278
  /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8 }, children: [
2262
2279
  /* @__PURE__ */ n.jsx(
2263
- Zn,
2280
+ Pn,
2264
2281
  {
2265
2282
  className: "btn_upload",
2266
2283
  beforeUpload: () => !1,
2267
2284
  fileList: [],
2268
2285
  accept: ".doc, .jpg, .ods, .png, .txt, .docx, .pdf",
2269
2286
  onChange: (o) => {
2270
- d(o == null ? void 0 : o.file);
2287
+ a(o == null ? void 0 : o.file);
2271
2288
  },
2272
2289
  children: /* @__PURE__ */ n.jsx(z, { icon: /* @__PURE__ */ n.jsx(P, { type: "upload" }), children: t })
2273
2290
  }
@@ -2277,49 +2294,49 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2277
2294
  ]
2278
2295
  }
2279
2296
  );
2280
- }, Cr = R(gr), mr = () => {
2281
- const [e, t] = D(!1), [r, s] = D(!1), [d, c] = D(!1), [o, l] = D(3), [a, u] = D(!1), [f, x] = D(""), { widgetProps: g } = K(), { onSendMsg: C, chats: y } = fe(), { onSubmitPYPwd: w = () => {
2282
- }, onCheckPYAccess: k = () => {
2283
- } } = (g == null ? void 0 : g.onPayslipFn) || {}, _ = p(
2297
+ }, br = R(mr), vr = () => {
2298
+ const [e, t] = D(!1), [r, s] = D(!1), [a, c] = D(!1), [o, d] = D(3), [i, u] = D(!1), [f, x] = D(""), { widgetProps: g } = q(), { onSendMsg: C, chats: y } = fe(), { onSubmitPYPwd: j = () => {
2299
+ }, onCheckPYAccess: p = () => {
2300
+ } } = (g == null ? void 0 : g.onPayslipFn) || {}, w = _(
2284
2301
  "ProvidePasswordPayslip",
2285
2302
  "Please provide your password account to access the download"
2286
- ), v = p("Cancel", "Cancel"), E = p("Submit", "Submit"), b = p("Password", "Password"), h = p("IsRequired", "Is Required"), m = p(
2303
+ ), v = _("Cancel", "Cancel"), h = _("Submit", "Submit"), b = _("Password", "Password"), E = _("IsRequired", "Is Required"), m = _(
2287
2304
  "PrepareTheFiles",
2288
2305
  "Prepare the files"
2289
- ), j = p(
2306
+ ), k = _(
2290
2307
  "AttemptPasswordExceeded",
2291
2308
  "Your attempt to enter the password exceeded the limit"
2292
- ), S = p(
2309
+ ), S = _(
2293
2310
  "VerifyAccessPayslip",
2294
2311
  "Please wait, verifying access to your payslip"
2295
- ), I = p(
2312
+ ), H = _(
2296
2313
  "WrongPwdPayslip",
2297
2314
  "The password you entered is incorrect. Please try again or contact support if you need assistance"
2298
- ), B = p(
2315
+ ), B = _(
2299
2316
  "SessionExpired",
2300
2317
  "Session expired. Please log in again to continue"
2301
2318
  ), [M] = oe.useForm(), L = () => {
2302
- var H, G, Z;
2303
- c(!0), u(!0), (Z = (G = (H = k()) == null ? void 0 : H.then((q) => {
2319
+ var F, G, J;
2320
+ c(!0), u(!0), (J = (G = (F = p()) == null ? void 0 : F.then((Y) => {
2304
2321
  var ee, de;
2305
- const te = (de = (ee = q == null ? void 0 : q.data) == null ? void 0 : ee.DATA) == null ? void 0 : de.RESULT;
2322
+ const te = (de = (ee = Y == null ? void 0 : Y.data) == null ? void 0 : ee.DATA) == null ? void 0 : de.RESULT;
2306
2323
  te && C({ msg: "Valid" }), t(te), x("");
2307
- })) == null ? void 0 : G.catch((q) => {
2308
- console.log("err: ", q == null ? void 0 : q.toString()), x(q == null ? void 0 : q.toString());
2309
- })) == null || Z.finally(() => {
2324
+ })) == null ? void 0 : G.catch((Y) => {
2325
+ console.log("err: ", Y == null ? void 0 : Y.toString()), x(Y == null ? void 0 : Y.toString());
2326
+ })) == null || J.finally(() => {
2310
2327
  s(!1), u(!1);
2311
2328
  });
2312
- }, F = () => {
2329
+ }, I = () => {
2313
2330
  C({ msg: "cancel" }), c(!1);
2314
2331
  }, $ = () => {
2315
2332
  var G;
2316
- const H = M == null ? void 0 : M.getFieldValue("pwd");
2333
+ const F = M == null ? void 0 : M.getFieldValue("pwd");
2317
2334
  (G = M == null ? void 0 : M.validateFields()) == null || G.then(() => {
2318
- var Z, q;
2319
- s(!0), (q = (Z = w(H)) == null ? void 0 : Z.then(({ data: te }) => {
2335
+ var J, Y;
2336
+ s(!0), (Y = (J = j(F)) == null ? void 0 : J.then(({ data: te }) => {
2320
2337
  var ee;
2321
- (ee = te == null ? void 0 : te.DATA) != null && ee.ISVALID ? L() : (x(I), l(o - 1), s(!1));
2322
- })) == null || q.catch((te) => {
2338
+ (ee = te == null ? void 0 : te.DATA) != null && ee.ISVALID ? L() : (x(H), d(o - 1), s(!1));
2339
+ })) == null || Y.catch((te) => {
2323
2340
  var de, ce, Ne, Ve, Ge;
2324
2341
  const ee = te == null ? void 0 : te.response;
2325
2342
  if ((ee == null ? void 0 : ee.status) === 401) {
@@ -2328,7 +2345,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2328
2345
  ), Fe = (Ge = (Ve = (Ne = ee == null ? void 0 : ee.data) == null ? void 0 : Ne.MESSAGE) == null ? void 0 : Ve.toLowerCase()) == null ? void 0 : Ge.includes(
2329
2346
  "invalid password"
2330
2347
  );
2331
- Me && x(B), Fe && (x(I), l(o - 1), s(!1));
2348
+ Me && x(B), Fe && (x(H), d(o - 1), s(!1));
2332
2349
  } else
2333
2350
  console.log("err onSubmit: ", te == null ? void 0 : te.toString()), x(te == null ? void 0 : te.toString());
2334
2351
  s(!1);
@@ -2337,9 +2354,9 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2337
2354
  };
2338
2355
  return X(() => {
2339
2356
  var G;
2340
- const H = y == null ? void 0 : y[(y == null ? void 0 : y.length) - 1];
2341
- ((G = H == null ? void 0 : H.attachment) == null ? void 0 : G.type) === "show_password_wp" && L();
2342
- }, []), d ? a ? /* @__PURE__ */ n.jsx(
2357
+ const F = y == null ? void 0 : y[(y == null ? void 0 : y.length) - 1];
2358
+ ((G = F == null ? void 0 : F.attachment) == null ? void 0 : G.type) === "show_password_wp" && L();
2359
+ }, []), a ? i ? /* @__PURE__ */ n.jsx(
2343
2360
  $e,
2344
2361
  {
2345
2362
  sender: "response",
@@ -2350,7 +2367,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2350
2367
  $e,
2351
2368
  {
2352
2369
  sender: "response",
2353
- text: j,
2370
+ text: k,
2354
2371
  showResponseInfo: !1
2355
2372
  }
2356
2373
  ) : f ? /* @__PURE__ */ n.jsx($e, { sender: "response", text: f, showResponseInfo: !1 }) : /* @__PURE__ */ n.jsx(
@@ -2365,7 +2382,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2365
2382
  layout: "vertical",
2366
2383
  style: { display: "flex", flexDirection: "column", gap: 8 },
2367
2384
  children: [
2368
- /* @__PURE__ */ n.jsx(V.Text, { children: e ? `${m}...` : _ }),
2385
+ /* @__PURE__ */ n.jsx(V.Text, { children: e ? `${m}...` : w }),
2369
2386
  !e && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2370
2387
  /* @__PURE__ */ n.jsx(
2371
2388
  oe.Item,
@@ -2374,14 +2391,14 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2374
2391
  rules: [
2375
2392
  {
2376
2393
  required: !0,
2377
- message: `${b} ${h}`
2394
+ message: `${b} ${E}`
2378
2395
  }
2379
2396
  ],
2380
2397
  children: /* @__PURE__ */ n.jsx(Be.Password, {})
2381
2398
  }
2382
2399
  ),
2383
2400
  /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8 }, children: [
2384
- /* @__PURE__ */ n.jsx(z, { disabled: r, onClick: F, children: v }),
2401
+ /* @__PURE__ */ n.jsx(z, { disabled: r, onClick: I, children: v }),
2385
2402
  /* @__PURE__ */ n.jsx(
2386
2403
  z,
2387
2404
  {
@@ -2389,7 +2406,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2389
2406
  onClick: $,
2390
2407
  loading: r,
2391
2408
  htmlType: "submit",
2392
- children: E
2409
+ children: h
2393
2410
  }
2394
2411
  )
2395
2412
  ] })
@@ -2399,19 +2416,19 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2399
2416
  )
2400
2417
  }
2401
2418
  ) : null;
2402
- }, br = R(mr), vr = ({ ...e }) => {
2403
- var l;
2404
- const { objInitPayload: t } = K(), [r, s] = D(!1), d = p("Error", "Error"), c = O(() => tt(t == null ? void 0 : t.access_token), [t]), o = () => {
2419
+ }, hr = R(vr), Er = ({ ...e }) => {
2420
+ var d;
2421
+ const { objInitPayload: t } = q(), [r, s] = D(!1), a = _("Error", "Error"), c = O(() => rt(t == null ? void 0 : t.access_token), [t]), o = () => {
2405
2422
  var u, f, x, g;
2406
2423
  s(!0);
2407
- const a = e == null ? void 0 : e.attachment;
2424
+ const i = e == null ? void 0 : e.attachment;
2408
2425
  (g = (x = (f = Oe({
2409
2426
  method: "POST",
2410
- url: a == null ? void 0 : a.endpoint,
2411
- data: a == null ? void 0 : a.body,
2427
+ url: i == null ? void 0 : i.endpoint,
2428
+ data: i == null ? void 0 : i.body,
2412
2429
  headers: {
2413
2430
  Authorization: `Bearer ${t == null ? void 0 : t.access_token}`,
2414
- "Content-Type": a == null ? void 0 : a.headers["Content-Type"],
2431
+ "Content-Type": i == null ? void 0 : i.headers["Content-Type"],
2415
2432
  coid: t == null ? void 0 : t.companyid,
2416
2433
  "Company-Id": t == null ? void 0 : t.companyid,
2417
2434
  "Acc-Name": (u = c == null ? void 0 : c.INSTANCE) == null ? void 0 : u.toLowerCase()
@@ -2419,17 +2436,17 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2419
2436
  responseType: "blob"
2420
2437
  })) == null ? void 0 : f.then((C) => {
2421
2438
  var v;
2422
- const y = (v = a == null ? void 0 : a.body) == null ? void 0 : v.media, w = `${a == null ? void 0 : a.filename}.${y}`, k = new Blob([C == null ? void 0 : C.data]), _ = URL == null ? void 0 : URL.createObjectURL(k);
2423
- En({ downloadURL: _, fileName: w }), URL.revokeObjectURL(_);
2439
+ const y = (v = i == null ? void 0 : i.body) == null ? void 0 : v.media, j = `${i == null ? void 0 : i.filename}.${y}`, p = new Blob([C == null ? void 0 : C.data]), w = URL == null ? void 0 : URL.createObjectURL(p);
2440
+ Tn({ downloadURL: w, fileName: j }), URL.revokeObjectURL(w);
2424
2441
  })) == null ? void 0 : x.catch((C) => {
2425
- var w, k, _;
2442
+ var j, p, w;
2426
2443
  const y = C == null ? void 0 : C.message;
2427
- (w = ie) == null || w.destroy(), (k = ie) == null || k.config({
2444
+ (j = ie) == null || j.destroy(), (p = ie) == null || p.config({
2428
2445
  getContainer: () => document.querySelector(".w-widget-content-container"),
2429
2446
  top: 28,
2430
2447
  placement: "top"
2431
- }), (_ = ie) == null || _.error({
2432
- message: d,
2448
+ }), (w = ie) == null || w.error({
2449
+ message: a,
2433
2450
  description: y,
2434
2451
  className: "w-notification-content",
2435
2452
  duration: 3
@@ -2444,8 +2461,8 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2444
2461
  className: "w-bubble-chat w-response",
2445
2462
  onClick: o,
2446
2463
  style: { cursor: "pointer" },
2447
- children: /* @__PURE__ */ n.jsxs(Jt, { spinning: r, children: [
2448
- /* @__PURE__ */ n.jsx(V.Link, { children: (l = e == null ? void 0 : e.attachment) == null ? void 0 : l.filename }),
2464
+ children: /* @__PURE__ */ n.jsxs(Zt, { spinning: r, children: [
2465
+ /* @__PURE__ */ n.jsx(V.Link, { children: (d = e == null ? void 0 : e.attachment) == null ? void 0 : d.filename }),
2449
2466
  /* @__PURE__ */ n.jsx(
2450
2467
  z,
2451
2468
  {
@@ -2462,29 +2479,29 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2462
2479
  ] })
2463
2480
  }
2464
2481
  );
2465
- }, hr = R(vr), Er = ({ ...e }) => {
2466
- const t = Y(), r = p("DownloadChart", "Download Chart"), s = O(() => e == null ? void 0 : e.attachment, [e == null ? void 0 : e.attachment]), d = O(() => {
2482
+ }, Tr = R(Er), yr = ({ ...e }) => {
2483
+ const t = K(), r = _("DownloadChart", "Download Chart"), s = O(() => e == null ? void 0 : e.attachment, [e == null ? void 0 : e.attachment]), a = O(() => {
2467
2484
  var o;
2468
- return (o = s == null ? void 0 : s.data) == null ? void 0 : o.map((l, a) => {
2485
+ return (o = s == null ? void 0 : s.data) == null ? void 0 : o.map((d, i) => {
2469
2486
  var u, f;
2470
2487
  return {
2471
- label: (u = s == null ? void 0 : s.labels) == null ? void 0 : u[a],
2472
- value: l,
2473
- color: (f = s == null ? void 0 : s.colors) == null ? void 0 : f[a]
2488
+ label: (u = s == null ? void 0 : s.labels) == null ? void 0 : u[i],
2489
+ value: d,
2490
+ color: (f = s == null ? void 0 : s.colors) == null ? void 0 : f[i]
2474
2491
  };
2475
2492
  });
2476
2493
  }, [s]), c = () => {
2477
- var l;
2478
- const o = (l = document == null ? void 0 : document.querySelector(".chart_widget canvas")) == null ? void 0 : l.toDataURL();
2479
- En({ fileName: s == null ? void 0 : s.title, downloadURL: o });
2494
+ var d;
2495
+ const o = (d = document == null ? void 0 : document.querySelector(".chart_widget canvas")) == null ? void 0 : d.toDataURL();
2496
+ Tn({ fileName: s == null ? void 0 : s.title, downloadURL: o });
2480
2497
  };
2481
2498
  return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2482
2499
  /* @__PURE__ */ n.jsx(
2483
- os,
2500
+ is,
2484
2501
  {
2485
2502
  className: "chart_widget",
2486
2503
  ref: t,
2487
- data: d,
2504
+ data: a,
2488
2505
  angleField: "value",
2489
2506
  colorField: "label",
2490
2507
  label: {
@@ -2512,73 +2529,73 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2512
2529
  }
2513
2530
  ) })
2514
2531
  ] });
2515
- }, Tr = R(Er), yr = ({ ...e }) => {
2516
- var t, r, s, d, c;
2532
+ }, jr = R(yr), wr = ({ ...e }) => {
2533
+ var t, r, s, a, c;
2517
2534
  switch (!0) {
2518
2535
  case ((t = Ae(e)) == null ? void 0 : t.text):
2519
2536
  return /* @__PURE__ */ n.jsx($e, { ...e });
2520
2537
  case ((r = Ae(e)) == null ? void 0 : r.upload):
2521
- return /* @__PURE__ */ n.jsx(Cr, { ...e });
2522
- case ((s = Ae(e)) == null ? void 0 : s.password):
2523
2538
  return /* @__PURE__ */ n.jsx(br, { ...e });
2524
- case ((d = Ae(e)) == null ? void 0 : d.filedownload):
2539
+ case ((s = Ae(e)) == null ? void 0 : s.password):
2525
2540
  return /* @__PURE__ */ n.jsx(hr, { ...e });
2526
- case ((c = Ae(e)) == null ? void 0 : c.chart):
2541
+ case ((a = Ae(e)) == null ? void 0 : a.filedownload):
2527
2542
  return /* @__PURE__ */ n.jsx(Tr, { ...e });
2543
+ case ((c = Ae(e)) == null ? void 0 : c.chart):
2544
+ return /* @__PURE__ */ n.jsx(jr, { ...e });
2528
2545
  default:
2529
2546
  return null;
2530
2547
  }
2531
- }, jr = R(yr), wr = () => {
2532
- const { isOpenWidget: e, widgetProps: t } = K(), { chats: r, isWaitResponse: s } = fe(), { activeTab: d } = be();
2548
+ }, kr = R(wr), pr = () => {
2549
+ const { isOpenWidget: e, widgetProps: t } = q(), { chats: r, isWaitResponse: s } = fe(), { activeTab: a } = be();
2533
2550
  return X(() => {
2534
2551
  me();
2535
- }, [d]), e ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2552
+ }, [a]), e ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2536
2553
  /* @__PURE__ */ n.jsx("div", { className: "w-bubble-chat-container", children: r == null ? void 0 : r.map((c, o) => {
2537
- var a;
2538
- const l = (a = Ae(c)) == null ? void 0 : a.text;
2539
- return /* @__PURE__ */ n.jsxs(gn, { children: [
2540
- (c == null ? void 0 : c.sender) === "response" && !l && /* @__PURE__ */ n.jsx(
2554
+ var i;
2555
+ const d = (i = Ae(c)) == null ? void 0 : i.text;
2556
+ return /* @__PURE__ */ n.jsxs(Cn, { children: [
2557
+ (c == null ? void 0 : c.sender) === "response" && !d && /* @__PURE__ */ n.jsx(
2541
2558
  Ue,
2542
2559
  {
2543
2560
  name: t == null ? void 0 : t.title,
2544
2561
  src: Ze
2545
2562
  }
2546
2563
  ),
2547
- /* @__PURE__ */ n.jsx(jr, { indexChat: o, ...c })
2564
+ /* @__PURE__ */ n.jsx(kr, { indexChat: o, ...c })
2548
2565
  ] }, o);
2549
2566
  }) }),
2550
- s && /* @__PURE__ */ n.jsx(_n, {})
2567
+ s && /* @__PURE__ */ n.jsx(pn, {})
2551
2568
  ] }) : null;
2552
- }, _r = R(wr), kr = () => {
2553
- var E;
2554
- const e = p(
2569
+ }, _r = R(pr), Ar = () => {
2570
+ var h;
2571
+ const e = _(
2555
2572
  "ContinueWithoutUpload",
2556
2573
  "Continue without Upload"
2557
2574
  ), {
2558
2575
  onSendMsg: t,
2559
2576
  setChats: r,
2560
2577
  isWaitResponse: s,
2561
- loadingRegenerate: d,
2578
+ loadingRegenerate: a,
2562
2579
  file: c,
2563
2580
  setFile: o,
2564
- chats: l,
2565
- connected: a
2581
+ chats: d,
2582
+ connected: i
2566
2583
  } = fe(), { isActiveTabVA: u } = be(), f = O(() => {
2567
- var h;
2568
- const b = l == null ? void 0 : l[(l == null ? void 0 : l.length) - 1];
2569
- return (b == null ? void 0 : b.sender) === "response" && ((h = b == null ? void 0 : b.attachment) == null ? void 0 : h.type) === "fileuploader";
2570
- }, [l]), x = Y(), [g, C] = D(!1), [y, w] = D(!1), k = O(() => s || !y, [y, s]), _ = () => {
2571
- var m, j, S, I;
2572
- const b = (S = (j = (m = x == null ? void 0 : x.current) == null ? void 0 : m.resizableTextArea) == null ? void 0 : j.textArea) == null ? void 0 : S.value;
2584
+ var E;
2585
+ const b = d == null ? void 0 : d[(d == null ? void 0 : d.length) - 1];
2586
+ return (b == null ? void 0 : b.sender) === "response" && ((E = b == null ? void 0 : b.attachment) == null ? void 0 : E.type) === "fileuploader";
2587
+ }, [d]), x = K(), [g, C] = D(!1), [y, j] = D(!1), p = O(() => s || !y, [y, s]), w = () => {
2588
+ var m, k, S, H;
2589
+ const b = (S = (k = (m = x == null ? void 0 : x.current) == null ? void 0 : m.resizableTextArea) == null ? void 0 : k.textArea) == null ? void 0 : S.value;
2573
2590
  if (!(b != null && b.trim()) || s) return;
2574
- w(!1), t({ msg: b }), C(!g);
2575
- const h = {
2591
+ j(!1), t({ msg: b }), C(!g);
2592
+ const E = {
2576
2593
  text: b,
2577
2594
  sender: "client",
2578
2595
  type: "text",
2579
- timestamp: (I = ae()) == null ? void 0 : I.format("hh:mm A")
2596
+ timestamp: (H = ae()) == null ? void 0 : H.format("hh:mm A")
2580
2597
  };
2581
- r((B) => [...B, h]), me();
2598
+ r((B) => [...B, E]), me();
2582
2599
  }, v = () => {
2583
2600
  t({ msg: "SKIP_WAITING_RESPONSE" });
2584
2601
  };
@@ -2587,7 +2604,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2587
2604
  x != null && x.current && u && ((b = x == null ? void 0 : x.current) == null || b.focus());
2588
2605
  }, [u]), f ? /* @__PURE__ */ n.jsxs("div", { className: "w-input-container", style: { alignItems: "center" }, children: [
2589
2606
  /* @__PURE__ */ n.jsx(V.Text, { children: c == null ? void 0 : c.name }),
2590
- ((E = Object == null ? void 0 : Object.keys(c || {})) == null ? void 0 : E.length) > 0 ? /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
2607
+ ((h = Object == null ? void 0 : Object.keys(c || {})) == null ? void 0 : h.length) > 0 ? /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
2591
2608
  /* @__PURE__ */ n.jsx(
2592
2609
  z,
2593
2610
  {
@@ -2604,7 +2621,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2604
2621
  style: { backgroundColor: "var(--primary-color, #395ebc)" },
2605
2622
  icon: /* @__PURE__ */ n.jsx(P, { type: "send" }),
2606
2623
  shape: "circle",
2607
- onClick: _
2624
+ onClick: w
2608
2625
  }
2609
2626
  )
2610
2627
  ] }) : /* @__PURE__ */ n.jsx(Se, { title: e, children: /* @__PURE__ */ n.jsx(
@@ -2624,22 +2641,22 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2624
2641
  Be.TextArea,
2625
2642
  {
2626
2643
  className: "w-input-widget",
2627
- disabled: !a,
2644
+ disabled: !i,
2628
2645
  ref: x,
2629
2646
  placeholder: "Type a message...",
2630
2647
  onKeyDown: (b) => {
2631
- ((b == null ? void 0 : b.code) === "Enter" || (b == null ? void 0 : b.key) === "Enter") && !(b != null && b.shiftKey) && _();
2648
+ ((b == null ? void 0 : b.code) === "Enter" || (b == null ? void 0 : b.key) === "Enter") && !(b != null && b.shiftKey) && w();
2632
2649
  },
2633
2650
  onChange: ({ target: { value: b } }) => {
2634
- const h = /\S/;
2651
+ const E = /\S/;
2635
2652
  Pe({
2636
2653
  input_va_value: b
2637
- }), b && (h != null && h.test(b)) ? w(!0) : b != null && b.trim() || w(!1);
2654
+ }), b && (E != null && E.test(b)) ? j(!0) : b != null && b.trim() || j(!1);
2638
2655
  }
2639
2656
  },
2640
2657
  g
2641
2658
  ),
2642
- s || d ? /* @__PURE__ */ n.jsx(
2659
+ s || a ? /* @__PURE__ */ n.jsx(
2643
2660
  z,
2644
2661
  {
2645
2662
  style: { border: "none" },
@@ -2651,24 +2668,24 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2651
2668
  ) : /* @__PURE__ */ n.jsx(
2652
2669
  z,
2653
2670
  {
2654
- className: `w-send-btn ${k ? "w-send-btn-disabled" : ""}`,
2655
- disabled: k,
2671
+ className: `w-send-btn ${p ? "w-send-btn-disabled" : ""}`,
2672
+ disabled: p,
2656
2673
  style: { backgroundColor: "var(--primary-color, #395ebc)" },
2657
2674
  icon: /* @__PURE__ */ n.jsx(P, { type: "send" }),
2658
2675
  shape: "circle",
2659
- onClick: _
2676
+ onClick: w
2660
2677
  }
2661
2678
  )
2662
2679
  ] });
2663
- }, pr = R(kr), Ar = ({ taskStatus: e }) => {
2664
- const t = p("InProgress", "In Progress"), r = p("New", "New"), s = p("Closed", "Closed"), d = p("Done", "Done"), c = p("HDCancelled", "Cancelled"), o = {
2680
+ }, Sr = R(Ar), Lr = ({ taskStatus: e }) => {
2681
+ const t = _("InProgress", "In Progress"), r = _("New", "New"), s = _("Closed", "Closed"), a = _("Done", "Done"), c = _("HDCancelled", "Cancelled"), o = {
2665
2682
  "In Progress": t,
2666
2683
  Open: r,
2667
2684
  New: r,
2668
2685
  Closed: s,
2669
- Fixed: d,
2686
+ Fixed: a,
2670
2687
  Cancelled: c
2671
- }, l = {
2688
+ }, d = {
2672
2689
  "In Progress": "#FFF2D6",
2673
2690
  Responded: "#FFF2D6",
2674
2691
  Open: "#e9e2f8",
@@ -2677,8 +2694,8 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2677
2694
  Fixed: "#bbfab7",
2678
2695
  Done: "#bbfab7",
2679
2696
  Cancelled: "#FFF2D6"
2680
- }, a = O(() => l[e] || l.Closed, [e]), u = O(() => o[e] || e, [e]);
2681
- return /* @__PURE__ */ n.jsx(Qt, { color: a, children: /* @__PURE__ */ n.jsx(
2697
+ }, i = O(() => d[e] || d.Closed, [e]), u = O(() => o[e] || e, [e]);
2698
+ return /* @__PURE__ */ n.jsx(Xt, { color: i, children: /* @__PURE__ */ n.jsx(
2682
2699
  V.Text,
2683
2700
  {
2684
2701
  className: "primary-color-active",
@@ -2687,7 +2704,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2687
2704
  children: u
2688
2705
  }
2689
2706
  ) }, e);
2690
- }, xt = R(Ar), Sr = ({ onClick: e, ...t }) => /* @__PURE__ */ n.jsxs(
2707
+ }, Ct = R(Lr), Rr = ({ onClick: e, ...t }) => /* @__PURE__ */ n.jsxs(
2691
2708
  "div",
2692
2709
  {
2693
2710
  className: "w-ticket-card-container",
@@ -2710,8 +2727,8 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2710
2727
  ),
2711
2728
  /* @__PURE__ */ n.jsxs("div", { className: "w-ticket-card-content-container", children: [
2712
2729
  /* @__PURE__ */ n.jsxs("div", { className: "w-ticket-card-cat-code", children: [
2713
- /* @__PURE__ */ n.jsx(V.Text, { children: (t == null ? void 0 : t.TASK_CATEGORY) || Kn }),
2714
- /* @__PURE__ */ n.jsx(V.Text, { children: (t == null ? void 0 : t.TASK_CODE) || Kn })
2730
+ /* @__PURE__ */ n.jsx(V.Text, { children: (t == null ? void 0 : t.TASK_CATEGORY) || qn }),
2731
+ /* @__PURE__ */ n.jsx(V.Text, { children: (t == null ? void 0 : t.TASK_CODE) || qn })
2715
2732
  ] }),
2716
2733
  /* @__PURE__ */ n.jsxs(
2717
2734
  "div",
@@ -2721,7 +2738,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2721
2738
  alignItems: "flex-end"
2722
2739
  },
2723
2740
  children: [
2724
- /* @__PURE__ */ n.jsx(xt, { taskStatus: t == null ? void 0 : t.TASK_STATUS }),
2741
+ /* @__PURE__ */ n.jsx(Ct, { taskStatus: t == null ? void 0 : t.TASK_STATUS }),
2725
2742
  /* @__PURE__ */ n.jsx(V.Text, { children: t == null ? void 0 : t.CREATED_DATE })
2726
2743
  ]
2727
2744
  }
@@ -2729,8 +2746,8 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2729
2746
  ] })
2730
2747
  ]
2731
2748
  }
2732
- ), Lr = R(Sr), gt = () => {
2733
- const { objInitPayload: e, setObjInitPayload: t, parsedJWT: r } = K(), s = O(() => {
2749
+ ), Or = R(Rr), mt = () => {
2750
+ const { objInitPayload: e, setObjInitPayload: t, parsedJWT: r } = q(), s = O(() => {
2734
2751
  var c;
2735
2752
  return {
2736
2753
  Authorization: `Bearer ${e == null ? void 0 : e.access_token}`,
@@ -2742,7 +2759,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2742
2759
  }, [e]);
2743
2760
  return async (c) => {
2744
2761
  var u, f, x;
2745
- const { onSuccess: o, onError: l, onFinally: a } = c ?? {};
2762
+ const { onSuccess: o, onError: d, onFinally: i } = c ?? {};
2746
2763
  (x = (f = (u = Oe({
2747
2764
  url: e == null ? void 0 : e.uriBackend,
2748
2765
  params: {
@@ -2755,8 +2772,8 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2755
2772
  headers: s,
2756
2773
  method: "POST"
2757
2774
  })) == null ? void 0 : u.then((g) => {
2758
- var w;
2759
- const C = (w = g == null ? void 0 : g.data) == null ? void 0 : w.DATA, y = {
2775
+ var j;
2776
+ const C = (j = g == null ? void 0 : g.data) == null ? void 0 : j.DATA, y = {
2760
2777
  access_token: C == null ? void 0 : C.JWT_TOKEN,
2761
2778
  refresh_token: e == null ? void 0 : e.refresh_token,
2762
2779
  uagent: e == null ? void 0 : e.uagent,
@@ -2771,66 +2788,66 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2771
2788
  };
2772
2789
  t(y), typeof o == "function" && o(g);
2773
2790
  })) == null ? void 0 : f.catch((g) => {
2774
- typeof l == "function" && l(g);
2791
+ typeof d == "function" && d(g);
2775
2792
  })) == null || x.finally(() => {
2776
- typeof a == "function" && a();
2793
+ typeof i == "function" && i();
2777
2794
  });
2778
2795
  };
2779
2796
  }, en = () => {
2780
2797
  var o;
2781
- const e = Y(new AbortController()), { objInitPayload: t, parsedJWT: r } = K(), s = gt(), d = {
2798
+ const e = K(new AbortController()), { objInitPayload: t, parsedJWT: r } = q(), s = mt(), a = {
2782
2799
  Authorization: `Bearer ${t == null ? void 0 : t.access_token}`,
2783
2800
  coid: r == null ? void 0 : r.COID,
2784
2801
  "Acc-Name": (o = r == null ? void 0 : r.INSTANCE) == null ? void 0 : o.toLowerCase(),
2785
2802
  "Company-Id": t == null ? void 0 : t.companyid,
2786
2803
  Language: t == null ? void 0 : t.lang
2787
2804
  }, c = async ({
2788
- url: l,
2789
- endpoint: a,
2805
+ url: d,
2806
+ endpoint: i,
2790
2807
  method: u = "POST",
2791
2808
  headers: f,
2792
2809
  ...x
2793
2810
  }) => {
2794
- var w, k, _, v, E, b;
2811
+ var j, p, w, v, h, b;
2795
2812
  const g = {
2796
- url: l || `${t == null ? void 0 : t.uriBackendHRMGO}${a}`,
2813
+ url: d || `${t == null ? void 0 : t.uriBackendHRMGO}${i}`,
2797
2814
  ...e.current && {
2798
- signal: (w = e == null ? void 0 : e.current) == null ? void 0 : w.signal
2815
+ signal: (j = e == null ? void 0 : e.current) == null ? void 0 : j.signal
2799
2816
  },
2800
2817
  headers: {
2801
- ...d,
2818
+ ...a,
2802
2819
  ...f,
2803
2820
  "Company-Code": t == null ? void 0 : t.companycode
2804
2821
  },
2805
2822
  method: u,
2806
2823
  ...x
2807
- }, C = (k = Oe) == null ? void 0 : k.create(g);
2808
- return (v = (_ = C == null ? void 0 : C.interceptors) == null ? void 0 : _.request) == null || v.use(
2809
- (h) => (t != null && t.access_token && (h.headers.Authorization = `Bearer ${t == null ? void 0 : t.access_token}`), h),
2810
- (h) => {
2811
- Promise.reject(h);
2824
+ }, C = (p = Oe) == null ? void 0 : p.create(g);
2825
+ return (v = (w = C == null ? void 0 : C.interceptors) == null ? void 0 : w.request) == null || v.use(
2826
+ (E) => (t != null && t.access_token && (E.headers.Authorization = `Bearer ${t == null ? void 0 : t.access_token}`), E),
2827
+ (E) => {
2828
+ Promise.reject(E);
2812
2829
  }
2813
- ), (b = (E = C == null ? void 0 : C.interceptors) == null ? void 0 : E.response) == null || b.use(
2814
- (h) => h,
2815
- async (h) => {
2816
- var j;
2817
- const m = h == null ? void 0 : h.config;
2818
- if (((j = h == null ? void 0 : h.response) == null ? void 0 : j.status) === 401) {
2830
+ ), (b = (h = C == null ? void 0 : C.interceptors) == null ? void 0 : h.response) == null || b.use(
2831
+ (E) => E,
2832
+ async (E) => {
2833
+ var k;
2834
+ const m = E == null ? void 0 : E.config;
2835
+ if (((k = E == null ? void 0 : E.response) == null ? void 0 : k.status) === 401) {
2819
2836
  const S = await s();
2820
2837
  return m.headers.Authorization = `Bearer ${S}`, Oe(m);
2821
2838
  }
2822
- return Promise == null ? void 0 : Promise.reject(h);
2839
+ return Promise == null ? void 0 : Promise.reject(E);
2823
2840
  }
2824
2841
  ), await (C == null ? void 0 : C.request(g));
2825
2842
  };
2826
2843
  return c.abort = () => {
2827
- var l;
2828
- e != null && e.current && ((l = e == null ? void 0 : e.current) == null || l.abort(), e.current = new AbortController());
2844
+ var d;
2845
+ e != null && e.current && ((d = e == null ? void 0 : e.current) == null || d.abort(), e.current = new AbortController());
2829
2846
  }, X(() => () => c.abort(), []), c;
2830
- }, Ct = Te({}), ve = () => ye(Ct), Rr = ({ children: e }) => {
2831
- const t = en(), [r, s] = D([]), [d, c] = D(""), [o, l] = D(!1), [a, u] = D(!0), [f, x] = D(0), g = (C) => {
2832
- var y, w, k, _;
2833
- u(!0), (_ = (k = t({
2847
+ }, bt = Te({}), ve = () => ye(bt), Dr = ({ children: e }) => {
2848
+ const t = en(), [r, s] = D([]), [a, c] = D(""), [o, d] = D(!1), [i, u] = D(!0), [f, x] = D(0), g = (C) => {
2849
+ var y, j, p, w;
2850
+ u(!0), (w = (p = t({
2834
2851
  endpoint: "/helpdesk/myticket/ticket-list",
2835
2852
  method: "POST",
2836
2853
  data: {
@@ -2842,7 +2859,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2842
2859
  ...((y = Object.keys(C || {})) == null ? void 0 : y.length) > 0 && {
2843
2860
  ...C,
2844
2861
  ...(C == null ? void 0 : C.CREATED_DATE) && {
2845
- CREATED_DATE: (w = ae(C == null ? void 0 : C.CREATED_DATE)) == null ? void 0 : w.format(hn)
2862
+ CREATED_DATE: (j = ae(C == null ? void 0 : C.CREATED_DATE)) == null ? void 0 : j.format(En)
2846
2863
  }
2847
2864
  }
2848
2865
  },
@@ -2851,155 +2868,155 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2851
2868
  ORDER: "DESC"
2852
2869
  }
2853
2870
  }
2854
- })) == null ? void 0 : k.then((v) => {
2855
- var E, b, h;
2856
- (E = v == null ? void 0 : v.data) != null && E.DATA && s((h = (b = v == null ? void 0 : v.data) == null ? void 0 : b.DATA) == null ? void 0 : h.LIST);
2857
- })) == null || _.finally(() => {
2871
+ })) == null ? void 0 : p.then((v) => {
2872
+ var h, b, E;
2873
+ (h = v == null ? void 0 : v.data) != null && h.DATA && s((E = (b = v == null ? void 0 : v.data) == null ? void 0 : b.DATA) == null ? void 0 : E.LIST);
2874
+ })) == null || w.finally(() => {
2858
2875
  u(!1);
2859
2876
  });
2860
2877
  };
2861
2878
  return X(() => {
2862
2879
  g();
2863
2880
  }, []), /* @__PURE__ */ n.jsx(
2864
- Ct.Provider,
2881
+ bt.Provider,
2865
2882
  {
2866
2883
  value: {
2867
2884
  listTicket: r,
2868
- ticketId: d,
2885
+ ticketId: a,
2869
2886
  setTicketId: c,
2870
2887
  getListTicket: g,
2871
2888
  openFilter: o,
2872
- setOpenFilter: l,
2873
- loadingListTicket: a,
2889
+ setOpenFilter: d,
2890
+ loadingListTicket: i,
2874
2891
  countFilters: f,
2875
2892
  setCountFilters: x
2876
2893
  },
2877
2894
  children: e
2878
2895
  }
2879
2896
  );
2880
- }, Or = () => {
2881
- const e = p("SubjectSearch", "Subject Search"), t = p("AdvanceFilter", "Advance Filter"), r = Y(null), { getListTicket: s, setOpenFilter: d, loadingListTicket: c, countFilters: o } = ve();
2897
+ }, Nr = () => {
2898
+ const e = _("SubjectSearch", "Subject Search"), t = _("AdvanceFilter", "Advance Filter"), r = K(null), { getListTicket: s, setOpenFilter: a, loadingListTicket: c, countFilters: o } = ve();
2882
2899
  return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, marginBottom: 12 }, children: [
2883
2900
  /* @__PURE__ */ n.jsx(
2884
2901
  Be,
2885
2902
  {
2886
2903
  placeholder: e,
2887
- onChange: ({ target: { value: l } }) => {
2904
+ onChange: ({ target: { value: d } }) => {
2888
2905
  clearTimeout(r == null ? void 0 : r.current), r.current = setTimeout(() => {
2889
2906
  s({
2890
- TASK_NAME: l
2907
+ TASK_NAME: d
2891
2908
  });
2892
2909
  }, 250);
2893
2910
  },
2894
2911
  allowClear: !0
2895
2912
  }
2896
2913
  ),
2897
- /* @__PURE__ */ n.jsx(Se, { title: `${t} (${o})`, children: /* @__PURE__ */ n.jsx(Zt, { count: o, children: /* @__PURE__ */ n.jsx(
2914
+ /* @__PURE__ */ n.jsx(Se, { title: `${t} (${o})`, children: /* @__PURE__ */ n.jsx(Pt, { count: o, children: /* @__PURE__ */ n.jsx(
2898
2915
  z,
2899
2916
  {
2900
2917
  loading: c,
2901
2918
  icon: /* @__PURE__ */ n.jsx(P, { type: "filter" }),
2902
2919
  onClick: () => {
2903
- d(!0);
2920
+ a(!0);
2904
2921
  }
2905
2922
  }
2906
2923
  ) }) })
2907
2924
  ] }) });
2908
- }, Dr = R(Or), mt = Te({}), he = () => ye(mt), Nr = ({ children: e }) => {
2909
- const t = Y(null), r = Y(0), s = Y(!1), d = Y(null), [c, o] = D([]), [l, a] = D(0), [u, f] = D(!1), { objInitPayload: x, parsedJWT: g, isFirstRenderHelpdesk: C, setShowReadyWSHD: y } = K(), w = gt(), k = (b) => {
2910
- const h = new WebSocket(b);
2911
- h.onopen = () => {
2912
- s.current = !0, r.current = 0, a(0), y(!0);
2913
- }, h.onerror = (m) => {
2914
- y(!1), console.error(`${pe} - WebSocket error:`, m);
2915
- }, h.onclose = (m) => {
2925
+ }, Mr = R(Nr), vt = Te({}), he = () => ye(vt), Fr = ({ children: e }) => {
2926
+ const t = K(null), r = K(0), s = K(!1), a = K(null), [c, o] = D([]), [d, i] = D(0), [u, f] = D(!1), { objInitPayload: x, parsedJWT: g, isFirstRenderHelpdesk: C, setShowReadyWSHD: y } = q(), j = mt(), p = (b) => {
2927
+ const E = new WebSocket(b);
2928
+ E.onopen = () => {
2929
+ s.current = !0, r.current = 0, i(0), y(!0);
2930
+ }, E.onerror = (m) => {
2931
+ y(!1), console.error(`${_e} - WebSocket error:`, m);
2932
+ }, E.onclose = (m) => {
2916
2933
  console.warn(
2917
- `${pe} - WebSocket disconnected:`,
2934
+ `${_e} - WebSocket disconnected:`,
2918
2935
  m
2919
- ), s.current = !1, y(!1), !(m != null && m.wasClean) && (r == null ? void 0 : r.current) < Ie && (r.current += 1, a((j) => j + 1), clearTimeout(d.current), d.current = setTimeout(_, 2e3));
2920
- }, h.onmessage = v(h), t.current = h;
2921
- }, _ = async () => {
2922
- var L, F, $;
2936
+ ), s.current = !1, y(!1), !(m != null && m.wasClean) && (r == null ? void 0 : r.current) < Ie && (r.current += 1, i((k) => k + 1), clearTimeout(a.current), a.current = setTimeout(w, 2e3));
2937
+ }, E.onmessage = v(E), t.current = E;
2938
+ }, w = async () => {
2939
+ var L, I, $;
2923
2940
  if (((L = t.current) == null ? void 0 : L.readyState) === (WebSocket == null ? void 0 : WebSocket.CONNECTING)) return;
2924
2941
  const {
2925
2942
  access_token: b,
2926
- companyid: h = "",
2943
+ companyid: E = "",
2927
2944
  companycode: m = "",
2928
- lang: j = "",
2945
+ lang: k = "",
2929
2946
  uriBackendHRMGO: S = ""
2930
2947
  } = x ?? {};
2931
- if (!b || !h || !m) {
2948
+ if (!b || !E || !m) {
2932
2949
  console.warn(
2933
- `${pe} - Missing required WebSocket credentials.`
2950
+ `${_e} - Missing required WebSocket credentials.`
2934
2951
  );
2935
2952
  return;
2936
2953
  }
2937
- const I = `Bearer ${b}`, B = (F = `${S}/ws`) == null ? void 0 : F.replace("https://", "wss://"), M = {
2938
- COMPANY_ID: h.toString(),
2954
+ const H = `Bearer ${b}`, B = (I = `${S}/ws`) == null ? void 0 : I.replace("https://", "wss://"), M = {
2955
+ COMPANY_ID: E.toString(),
2939
2956
  COMPANY_CODE: m.toLowerCase(),
2940
- LANGUAGE: j,
2957
+ LANGUAGE: k,
2941
2958
  ACC_NAME: ($ = g == null ? void 0 : g.INSTANCE) == null ? void 0 : $.toLowerCase(),
2942
- TOKEN: I
2959
+ TOKEN: H
2943
2960
  };
2944
2961
  try {
2945
- const H = await ps(
2962
+ const F = await Ss(
2946
2963
  M,
2947
- Ts
2964
+ js
2948
2965
  );
2949
- if (!H || s.current || (r == null ? void 0 : r.current) >= Ie) {
2966
+ if (!F || s.current || (r == null ? void 0 : r.current) >= Ie) {
2950
2967
  console.warn(
2951
- `${pe} - Skipping WebSocket connection attempt.`
2968
+ `${_e} - Skipping WebSocket connection attempt.`
2952
2969
  );
2953
2970
  return;
2954
2971
  }
2955
- t.current && t.current.close(), k(`${B}?t=${H}`);
2956
- } catch (H) {
2972
+ t.current && t.current.close(), p(`${B}?t=${F}`);
2973
+ } catch (F) {
2957
2974
  console.error(
2958
- `${pe} - Failed to encrypt token:`,
2959
- H
2975
+ `${_e} - Failed to encrypt token:`,
2976
+ F
2960
2977
  );
2961
2978
  }
2962
- }, v = (b) => (h) => {
2979
+ }, v = (b) => (E) => {
2963
2980
  var m;
2964
2981
  try {
2965
- if ((h == null ? void 0 : h.data) === "PING")
2982
+ if ((E == null ? void 0 : E.data) === "PING")
2966
2983
  b.send("PONG");
2967
2984
  else {
2968
- const { DATA: j, EVENT: S } = JSON.parse(h.data || "{}");
2969
- !C.current && S === "USER_ONLINE_NOTIF" && Array.isArray(j == null ? void 0 : j.EMPLOYEES) && (o((m = j == null ? void 0 : j.EMPLOYEES) == null ? void 0 : m.filter(Boolean)), C.current = !0), S === "TOKEN_EXPIRED" && w({
2985
+ const { DATA: k, EVENT: S } = JSON.parse(E.data || "{}");
2986
+ !C.current && S === "USER_ONLINE_NOTIF" && Array.isArray(k == null ? void 0 : k.EMPLOYEES) && (o((m = k == null ? void 0 : k.EMPLOYEES) == null ? void 0 : m.filter(Boolean)), C.current = !0), S === "TOKEN_EXPIRED" && j({
2970
2987
  onSuccess: () => {
2971
- _();
2988
+ w();
2972
2989
  }
2973
2990
  });
2974
2991
  }
2975
2992
  } catch {
2976
2993
  console.error(
2977
- `${pe} - Invalid WebSocket message:`,
2978
- h.data
2994
+ `${_e} - Invalid WebSocket message:`,
2995
+ E.data
2979
2996
  );
2980
2997
  }
2981
- }, E = ({ event: b, data: h, module: m = "HELPDESK_CHAT" }) => {
2982
- var j;
2983
- (j = t == null ? void 0 : t.current) == null || j.send(
2998
+ }, h = ({ event: b, data: E, module: m = "HELPDESK_CHAT" }) => {
2999
+ var k;
3000
+ (k = t == null ? void 0 : t.current) == null || k.send(
2984
3001
  JSON.stringify({
2985
3002
  EVENT: b,
2986
- DATA: h,
3003
+ DATA: E,
2987
3004
  MODULE: m
2988
3005
  })
2989
3006
  );
2990
3007
  };
2991
3008
  return X(() => {
2992
- C.current || _();
3009
+ C.current || w();
2993
3010
  }, []), /* @__PURE__ */ n.jsx(
2994
- mt.Provider,
3011
+ vt.Provider,
2995
3012
  {
2996
3013
  value: {
2997
3014
  ws: t == null ? void 0 : t.current,
2998
- onSendMsg: E,
3015
+ onSendMsg: h,
2999
3016
  userOnline: c,
3000
- connectWebSocket: _,
3001
- retryCountState: l,
3002
- setRetryCountState: a,
3017
+ connectWebSocket: w,
3018
+ retryCountState: d,
3019
+ setRetryCountState: i,
3003
3020
  retryCountRef: r,
3004
3021
  isGetResponse: u,
3005
3022
  setGetResponse: f
@@ -3007,12 +3024,12 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3007
3024
  children: e
3008
3025
  }
3009
3026
  );
3010
- }, Mr = () => {
3011
- var l;
3012
- const { widgetProps: e } = K(), { listTicket: t, setTicketId: r, loadingListTicket: s } = ve(), { onSendMsg: d, setGetResponse: c } = he(), { xs: o } = Ce.useBreakpoint();
3027
+ }, Hr = () => {
3028
+ var d;
3029
+ const { widgetProps: e } = q(), { listTicket: t, setTicketId: r, loadingListTicket: s } = ve(), { onSendMsg: a, setGetResponse: c } = he(), { xs: o } = Ce.useBreakpoint();
3013
3030
  return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
3014
- /* @__PURE__ */ n.jsx(Dr, {}),
3015
- s ? /* @__PURE__ */ n.jsx("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: (l = Array.from({ length: 5 })) == null ? void 0 : l.map((a, u) => /* @__PURE__ */ n.jsx(
3031
+ /* @__PURE__ */ n.jsx(Mr, {}),
3032
+ s ? /* @__PURE__ */ n.jsx("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: (d = Array.from({ length: 5 })) == null ? void 0 : d.map((i, u) => /* @__PURE__ */ n.jsx(
3016
3033
  ue.Input,
3017
3034
  {
3018
3035
  style: { height: 80, width: "100%", borderRadius: 8 }
@@ -3025,18 +3042,18 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3025
3042
  ...(t == null ? void 0 : t.length) === 0 && {
3026
3043
  style: { justifyContent: "center" }
3027
3044
  },
3028
- children: (t == null ? void 0 : t.length) > 0 ? t == null ? void 0 : t.map((a, u) => /* @__PURE__ */ bn(
3029
- Lr,
3045
+ children: (t == null ? void 0 : t.length) > 0 ? t == null ? void 0 : t.map((i, u) => /* @__PURE__ */ vn(
3046
+ Or,
3030
3047
  {
3031
- ...a,
3048
+ ...i,
3032
3049
  key: u,
3033
3050
  onClick: () => {
3034
- c(!0), d({
3051
+ c(!0), a({
3035
3052
  event: "JOIN_ROOM",
3036
3053
  data: {
3037
- TASK_ID: a == null ? void 0 : a.TASK_ID
3054
+ TASK_ID: i == null ? void 0 : i.TASK_ID
3038
3055
  }
3039
- }), r(a == null ? void 0 : a.TASK_ID);
3056
+ }), r(i == null ? void 0 : i.TASK_ID);
3040
3057
  }
3041
3058
  }
3042
3059
  )) : /* @__PURE__ */ n.jsx(
@@ -3048,22 +3065,22 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3048
3065
  alignItems: "center",
3049
3066
  flex: 1
3050
3067
  },
3051
- children: /* @__PURE__ */ n.jsx(Xn, {})
3068
+ children: /* @__PURE__ */ n.jsx(et, {})
3052
3069
  }
3053
3070
  )
3054
3071
  }
3055
3072
  )
3056
3073
  ] });
3057
- }, Fr = R(Mr), Hr = ({ children: e, open: t, onClose: r, footer: s, styleContainer: d }) => {
3074
+ }, Ir = R(Hr), $r = ({ children: e, open: t, onClose: r, footer: s, styleContainer: a }) => {
3058
3075
  var g;
3059
- const [c, o] = D(!1), l = Y(), a = Y(null), u = Y(), f = O(() => t ? "w-fade-in-animate" : "w-fade-out-animate", [t]), x = (C) => {
3076
+ const [c, o] = D(!1), d = K(), i = K(null), u = K(), f = O(() => t ? "w-fade-in-animate" : "w-fade-out-animate", [t]), x = (C) => {
3060
3077
  C.code === "Escape" && !C.shiftKey && !C.altKey && !C.ctrlKey && C.key === "Escape" && (C.stopPropagation(), typeof r == "function" && r());
3061
3078
  };
3062
3079
  return X(() => {
3063
3080
  const C = u.current;
3064
- return C && (clearTimeout(a.current), a.current = setTimeout(() => {
3081
+ return C && (clearTimeout(i.current), i.current = setTimeout(() => {
3065
3082
  C == null || C.focus();
3066
- }, 250), C == null || C.addEventListener("keydown", x)), t && o(!1), clearTimeout(l == null ? void 0 : l.current), l.current = setTimeout(() => {
3083
+ }, 250), C == null || C.addEventListener("keydown", x)), t && o(!1), clearTimeout(d == null ? void 0 : d.current), d.current = setTimeout(() => {
3067
3084
  t || o(!0);
3068
3085
  }, 300), () => {
3069
3086
  C && (C == null || C.removeEventListener("keydown", x));
@@ -3077,8 +3094,8 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3077
3094
  style: {
3078
3095
  display: c ? "none" : "block",
3079
3096
  height: "100%",
3080
- ...((g = Object == null ? void 0 : Object.keys(d || {})) == null ? void 0 : g.length) > 0 && {
3081
- ...d
3097
+ ...((g = Object == null ? void 0 : Object.keys(a || {})) == null ? void 0 : g.length) > 0 && {
3098
+ ...a
3082
3099
  }
3083
3100
  },
3084
3101
  children: [
@@ -3087,19 +3104,19 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3087
3104
  ]
3088
3105
  }
3089
3106
  );
3090
- }, bt = R(Hr), vt = Te({}), De = () => ye(vt), Ir = ({ children: e }) => {
3091
- const [t, r] = D([]), [s, d] = D({}), [c, o] = D(!0), [l, a] = D({}), u = Y(!1), f = en(), { ticketId: x } = ve(), { ws: g, setGetResponse: C } = he(), { parsedJWT: y } = K(), w = O(() => {
3107
+ }, ht = R($r), Et = Te({}), De = () => ye(Et), Br = ({ children: e }) => {
3108
+ const [t, r] = D([]), [s, a] = D({}), [c, o] = D(!0), [d, i] = D({}), u = K(!1), f = en(), { ticketId: x } = ve(), { ws: g, setGetResponse: C } = he(), { parsedJWT: y } = q(), j = O(() => {
3092
3109
  var S;
3093
- const b = (s == null ? void 0 : s.CREATED_BY) ?? {}, h = (s == null ? void 0 : s.ASSIGNEE) ?? {}, m = (s == null ? void 0 : s.OTHER_ASSIGNEE) ?? [], j = (S = [b, h, ...m].map((I) => ({
3094
- ...I
3095
- }))) == null ? void 0 : S.filter((I) => {
3110
+ const b = (s == null ? void 0 : s.CREATED_BY) ?? {}, E = (s == null ? void 0 : s.ASSIGNEE) ?? {}, m = (s == null ? void 0 : s.OTHER_ASSIGNEE) ?? [], k = (S = [b, E, ...m].map((H) => ({
3111
+ ...H
3112
+ }))) == null ? void 0 : S.filter((H) => {
3096
3113
  var B;
3097
- return ((B = Object.keys(I || {})) == null ? void 0 : B.length) > 0;
3114
+ return ((B = Object.keys(H || {})) == null ? void 0 : B.length) > 0;
3098
3115
  });
3099
- return Tn({ ArrObj: j, key: "EMP_ID" });
3100
- }, [s]), k = () => {
3101
- var b, h;
3102
- o(!0), (h = (b = f({
3116
+ return yn({ ArrObj: k, key: "EMP_ID" });
3117
+ }, [s]), p = () => {
3118
+ var b, E;
3119
+ o(!0), (E = (b = f({
3103
3120
  endpoint: "/helpdesk/chat/list",
3104
3121
  method: "POST",
3105
3122
  data: {
@@ -3108,21 +3125,21 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3108
3125
  TASK_ID: x
3109
3126
  }
3110
3127
  })) == null ? void 0 : b.then((m) => {
3111
- var j, S, I, B, M, L;
3112
- if (((I = (S = (j = m == null ? void 0 : m.data) == null ? void 0 : j.DATA) == null ? void 0 : S.LIST) == null ? void 0 : I.length) > 0) {
3113
- const F = (L = (M = (B = m == null ? void 0 : m.data) == null ? void 0 : B.DATA) == null ? void 0 : M.LIST) == null ? void 0 : L.map(($) => ({
3128
+ var k, S, H, B, M, L;
3129
+ if (((H = (S = (k = m == null ? void 0 : m.data) == null ? void 0 : k.DATA) == null ? void 0 : S.LIST) == null ? void 0 : H.length) > 0) {
3130
+ const I = (L = (M = (B = m == null ? void 0 : m.data) == null ? void 0 : B.DATA) == null ? void 0 : M.LIST) == null ? void 0 : L.map(($) => ({
3114
3131
  ...$,
3115
3132
  ACTOR: {
3116
3133
  ...$ == null ? void 0 : $.ACTOR
3117
3134
  }
3118
3135
  }));
3119
- r(Qe(F));
3136
+ r(Qe(I));
3120
3137
  } else
3121
3138
  r({});
3122
- })) == null || h.finally(() => {
3139
+ })) == null || E.finally(() => {
3123
3140
  o(!1);
3124
3141
  });
3125
- }, _ = () => {
3142
+ }, w = () => {
3126
3143
  var b;
3127
3144
  (b = f({
3128
3145
  endpoint: "/helpdesk/myticket/get",
@@ -3130,54 +3147,54 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3130
3147
  data: {
3131
3148
  TASK_ID: x
3132
3149
  }
3133
- })) == null || b.then((h) => {
3134
- var m, j, S;
3135
- if ((m = h == null ? void 0 : h.data) != null && m.DATA) {
3136
- const I = (S = (j = h == null ? void 0 : h.data) == null ? void 0 : j.DATA) == null ? void 0 : S.LIST;
3137
- d(I);
3150
+ })) == null || b.then((E) => {
3151
+ var m, k, S;
3152
+ if ((m = E == null ? void 0 : E.data) != null && m.DATA) {
3153
+ const H = (S = (k = E == null ? void 0 : E.data) == null ? void 0 : k.DATA) == null ? void 0 : S.LIST;
3154
+ a(H);
3138
3155
  } else
3139
- d({});
3156
+ a({});
3140
3157
  });
3141
3158
  }, v = (b) => {
3142
- var j;
3143
- const h = (j = b == null ? void 0 : b.ACTOR) == null ? void 0 : j.EMP_ID, m = y == null ? void 0 : y.EMP_ID;
3144
- C(!0), a((S) => ({
3159
+ var k;
3160
+ const E = (k = b == null ? void 0 : b.ACTOR) == null ? void 0 : k.EMP_ID, m = y == null ? void 0 : y.EMP_ID;
3161
+ C(!0), i((S) => ({
3145
3162
  ...S,
3146
- [h]: !1
3163
+ [E]: !1
3147
3164
  })), u.current || r((S) => {
3148
- const I = yn(S), B = h == m ? "to" : "from", M = [...I, { ...b, CHAT_ALIGN: B }];
3165
+ const H = jn(S), B = E == m ? "to" : "from", M = [...H, { ...b, CHAT_ALIGN: B }];
3149
3166
  return Qe(M);
3150
3167
  }), u.current = !1;
3151
- }, E = (b) => {
3168
+ }, h = (b) => {
3152
3169
  if ((b == null ? void 0 : b.data) !== "PING") {
3153
- const h = JSON.parse((b == null ? void 0 : b.data) || "{}"), { DATA: m = {}, EVENT: j = "" } = h ?? {};
3154
- (j === "RECEIVE_MESSAGE" || j === "RECEIVE_ANOTHER_MESSAGE") && v(m);
3170
+ const E = JSON.parse((b == null ? void 0 : b.data) || "{}"), { DATA: m = {}, EVENT: k = "" } = E ?? {};
3171
+ (k === "RECEIVE_MESSAGE" || k === "RECEIVE_ANOTHER_MESSAGE") && v(m);
3155
3172
  }
3156
3173
  };
3157
- return X(() => (x && (k(), _()), g && x && (g == null || g.addEventListener("message", E)), () => {
3158
- g && x && (g == null || g.removeEventListener("message", E));
3174
+ return X(() => (x && (p(), w()), g && x && (g == null || g.addEventListener("message", h)), () => {
3175
+ g && x && (g == null || g.removeEventListener("message", h));
3159
3176
  }), [x]), /* @__PURE__ */ n.jsx(
3160
- vt.Provider,
3177
+ Et.Provider,
3161
3178
  {
3162
3179
  value: {
3163
3180
  chats: t,
3164
3181
  setChats: r,
3165
3182
  detailTicket: s,
3166
- employees: w,
3183
+ employees: j,
3167
3184
  isFromSelf: u,
3168
3185
  loadingChats: c,
3169
- objTypingOtherEmp: l,
3170
- setTypingOtherEmp: a
3186
+ objTypingOtherEmp: d,
3187
+ setTypingOtherEmp: i
3171
3188
  },
3172
3189
  children: e
3173
3190
  }
3174
3191
  );
3175
- }, $r = ({ onClose: e }) => {
3176
- const { xs: t } = Ce.useBreakpoint(), { employees: r, detailTicket: s, loadingChats: d } = De(), { userOnline: c } = he(), o = O(() => {
3177
- var a;
3178
- return (a = r == null ? void 0 : r.map((u) => u == null ? void 0 : u.FULL_NAME)) == null ? void 0 : a.join(", ");
3179
- }, [r]), l = O(() => t ? "click" : "hover", [t]);
3180
- return d ? /* @__PURE__ */ n.jsxs("div", { className: "w-ticket-detail-header-container", children: [
3192
+ }, Ur = ({ onClose: e }) => {
3193
+ const { xs: t } = Ce.useBreakpoint(), { employees: r, detailTicket: s, loadingChats: a } = De(), { userOnline: c } = he(), o = O(() => {
3194
+ var i;
3195
+ return (i = r == null ? void 0 : r.map((u) => u == null ? void 0 : u.FULL_NAME)) == null ? void 0 : i.join(", ");
3196
+ }, [r]), d = O(() => t ? "click" : "hover", [t]);
3197
+ return a ? /* @__PURE__ */ n.jsxs("div", { className: "w-ticket-detail-header-container", children: [
3181
3198
  /* @__PURE__ */ n.jsx(ue.Avatar, {}),
3182
3199
  /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
3183
3200
  /* @__PURE__ */ n.jsx(ue.Input, {}),
@@ -3200,15 +3217,15 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3200
3217
  Ee.Group,
3201
3218
  {
3202
3219
  maxCount: 2,
3203
- maxPopoverTrigger: l,
3220
+ maxPopoverTrigger: d,
3204
3221
  maxStyle: {
3205
3222
  color: "#f56a00",
3206
3223
  backgroundColor: "#fde3cf",
3207
3224
  cursor: "pointer"
3208
3225
  },
3209
- children: r == null ? void 0 : r.map((a, u) => {
3210
- const f = c == null ? void 0 : c.includes(a == null ? void 0 : a.EMP_ID);
3211
- return /* @__PURE__ */ n.jsx(Se, { title: a == null ? void 0 : a.FULL_NAME, trigger: l, children: /* @__PURE__ */ bn(
3226
+ children: r == null ? void 0 : r.map((i, u) => {
3227
+ const f = c == null ? void 0 : c.includes(i == null ? void 0 : i.EMP_ID);
3228
+ return /* @__PURE__ */ n.jsx(Se, { title: i == null ? void 0 : i.FULL_NAME, trigger: d, children: /* @__PURE__ */ vn(
3212
3229
  Ee,
3213
3230
  {
3214
3231
  ...f && {
@@ -3217,9 +3234,9 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3217
3234
  borderRadius: "50%"
3218
3235
  }
3219
3236
  },
3220
- src: a == null ? void 0 : a.PHOTO,
3237
+ src: i == null ? void 0 : i.PHOTO,
3221
3238
  key: u,
3222
- nameFallback: a == null ? void 0 : a.FULL_NAME
3239
+ nameFallback: i == null ? void 0 : i.FULL_NAME
3223
3240
  }
3224
3241
  ) }, u);
3225
3242
  })
@@ -3230,7 +3247,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3230
3247
  Se,
3231
3248
  {
3232
3249
  title: `${s == null ? void 0 : s.TASK_CODE} - ${s == null ? void 0 : s.SUBJECT}`,
3233
- trigger: l,
3250
+ trigger: d,
3234
3251
  children: /* @__PURE__ */ n.jsxs(V.Text, { className: "w-ticket-detail-header-text", children: [
3235
3252
  s == null ? void 0 : s.TASK_CODE,
3236
3253
  " - ",
@@ -3238,7 +3255,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3238
3255
  ] })
3239
3256
  }
3240
3257
  ),
3241
- /* @__PURE__ */ n.jsx(Se, { title: o, trigger: l, children: /* @__PURE__ */ n.jsx(
3258
+ /* @__PURE__ */ n.jsx(Se, { title: o, trigger: d, children: /* @__PURE__ */ n.jsx(
3242
3259
  V.Text,
3243
3260
  {
3244
3261
  type: "secondary",
@@ -3251,9 +3268,9 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3251
3268
  ) })
3252
3269
  ] })
3253
3270
  ] }),
3254
- /* @__PURE__ */ n.jsx(xt, { taskStatus: s == null ? void 0 : s.STATUS })
3271
+ /* @__PURE__ */ n.jsx(Ct, { taskStatus: s == null ? void 0 : s.STATUS })
3255
3272
  ] });
3256
- }, Br = R($r), Ur = ({ ...e }) => {
3273
+ }, Wr = R(Ur), Vr = ({ ...e }) => {
3257
3274
  const t = O(() => (e == null ? void 0 : e.CHAT_ALIGN) === "to" ? "client" : "response", [e]);
3258
3275
  return /* @__PURE__ */ n.jsxs("div", { className: `w-bubble-chat ${`w-${t}`}`, children: [
3259
3276
  /* @__PURE__ */ n.jsx(
@@ -3273,26 +3290,26 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3273
3290
  }
3274
3291
  )
3275
3292
  ] });
3276
- }, Wr = R(Ur), Vr = ({ ...e }) => {
3277
- const t = p("Download", "Download"), r = O(() => (e == null ? void 0 : e.CHAT_ALIGN) === "to" ? "client" : "response", [e]), s = O(() => {
3278
- var a;
3279
- const l = e == null ? void 0 : e.ATTACHMENT;
3280
- if (l)
3293
+ }, Gr = R(Vr), zr = ({ ...e }) => {
3294
+ const t = _("Download", "Download"), r = O(() => (e == null ? void 0 : e.CHAT_ALIGN) === "to" ? "client" : "response", [e]), s = O(() => {
3295
+ var i;
3296
+ const d = e == null ? void 0 : e.ATTACHMENT;
3297
+ if (d)
3281
3298
  try {
3282
- const u = new URL(l), f = (a = u == null ? void 0 : u.pathname) == null ? void 0 : a.split("/");
3299
+ const u = new URL(d), f = (i = u == null ? void 0 : u.pathname) == null ? void 0 : i.split("/");
3283
3300
  return f == null ? void 0 : f[(f == null ? void 0 : f.length) - 1];
3284
3301
  } catch {
3285
- return l;
3302
+ return d;
3286
3303
  }
3287
3304
  return "";
3288
- }, [e]), d = O(() => {
3305
+ }, [e]), a = O(() => {
3289
3306
  if (s != null && s.includes(".")) {
3290
- const l = s == null ? void 0 : s.split(".");
3291
- return `.${l == null ? void 0 : l[(l == null ? void 0 : l.length) - 1]}`;
3307
+ const d = s == null ? void 0 : s.split(".");
3308
+ return `.${d == null ? void 0 : d[(d == null ? void 0 : d.length) - 1]}`;
3292
3309
  }
3293
3310
  return "";
3294
- }, [e, s]), c = O(() => dn == null ? void 0 : dn.includes(d), [e, d]), o = () => {
3295
- En({
3311
+ }, [e, s]), c = O(() => dn == null ? void 0 : dn.includes(a), [e, a]), o = () => {
3312
+ Tn({
3296
3313
  downloadURL: e == null ? void 0 : e.ATTACHMENT,
3297
3314
  fileName: s,
3298
3315
  isOpenNewTab: !0
@@ -3304,7 +3321,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3304
3321
  className: `w-bubble-chat ${`w-${r}`}`,
3305
3322
  style: { display: "flex", flexDirection: "column" },
3306
3323
  children: [
3307
- c ? /* @__PURE__ */ n.jsx(wn, { src: e == null ? void 0 : e.ATTACHMENT, fallback: Es }) : /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
3324
+ c ? /* @__PURE__ */ n.jsx(kn, { src: e == null ? void 0 : e.ATTACHMENT, fallback: ys }) : /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
3308
3325
  /* @__PURE__ */ n.jsx(P, { type: "file" }),
3309
3326
  /* @__PURE__ */ n.jsx(
3310
3327
  V.Link,
@@ -3341,7 +3358,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3341
3358
  ]
3342
3359
  }
3343
3360
  ) });
3344
- }, Gr = R(Vr), zr = ({ ...e }) => {
3361
+ }, Yr = R(zr), Kr = ({ ...e }) => {
3345
3362
  const t = O(() => (e == null ? void 0 : e.CHAT_ALIGN) === "to" ? "client" : "response", [e]);
3346
3363
  return /* @__PURE__ */ n.jsxs("div", { className: "w-ticket-info-chat-container", children: [
3347
3364
  /* @__PURE__ */ n.jsx(
@@ -3354,42 +3371,42 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3354
3371
  ),
3355
3372
  /* @__PURE__ */ n.jsx(V.Text, { children: e == null ? void 0 : e.MESSAGE })
3356
3373
  ] });
3357
- }, Yr = R(zr), ht = () => {
3358
- const { widgetProps: e } = K(), t = _e.enc.Hex.parse(
3359
- _e.enc.Utf8.parse(e == null ? void 0 : e.keyEncrypt).toString()
3374
+ }, qr = R(Kr), Tt = () => {
3375
+ const { widgetProps: e } = q(), t = ke.enc.Hex.parse(
3376
+ ke.enc.Utf8.parse(e == null ? void 0 : e.keyEncrypt).toString()
3360
3377
  ), r = {
3361
- mode: _e.mode.ECB,
3362
- padding: _e.pad.Pkcs7
3378
+ mode: ke.mode.ECB,
3379
+ padding: ke.pad.Pkcs7
3363
3380
  }, s = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|GreatDayHR/i.test(
3364
3381
  navigator.userAgent
3365
- ), d = (o) => {
3382
+ ), a = (o) => {
3366
3383
  if (typeof o == "number" && (o = o.toString()), !o) return "";
3367
3384
  if (s) return window.encodeURIComponent(o);
3368
- const l = _e.enc.Utf8.parse(o), a = _e.AES.encrypt(
3369
- l,
3385
+ const d = ke.enc.Utf8.parse(o), i = ke.AES.encrypt(
3386
+ d,
3370
3387
  t,
3371
3388
  r
3372
3389
  ).toString();
3373
- return window.encodeURIComponent(`$${a}`);
3390
+ return window.encodeURIComponent(`$${i}`);
3374
3391
  };
3375
3392
  return {
3376
3393
  paramsEncrypt: (o) => {
3377
- const [l, a = null] = o.split("?"), u = l.split("/").map((f) => {
3394
+ const [d, i = null] = o.split("?"), u = d.split("/").map((f) => {
3378
3395
  const [, x = null] = f.split(":");
3379
- return x && (e != null && e.keyEncrypt) ? d(x) : f;
3396
+ return x && (e != null && e.keyEncrypt) ? a(x) : f;
3380
3397
  }).join("/");
3381
- return a ? `${u}?${a}` : u;
3398
+ return i ? `${u}?${i}` : u;
3382
3399
  },
3383
- encrypt: d
3400
+ encrypt: a
3384
3401
  };
3385
- }, Kr = ({ ...e }) => {
3386
- const t = p("ViewFAQ", "View FAQ"), r = p(
3402
+ }, Jr = ({ ...e }) => {
3403
+ const t = _("ViewFAQ", "View FAQ"), r = _(
3387
3404
  "FAQUnavailable",
3388
3405
  "FAQ unavailable"
3389
- ), s = p(
3406
+ ), s = _(
3390
3407
  "ThisFAQIsUnavailable",
3391
3408
  "This FAQ is unavailable"
3392
- ), { paramsEncrypt: d } = ht(), { widgetProps: c } = K(), o = O(() => (e == null ? void 0 : e.CHAT_ALIGN) === "to" ? "client" : "response", [e]), l = O(() => e == null ? void 0 : e.FAQ_ID, [e]);
3409
+ ), { paramsEncrypt: a } = Tt(), { widgetProps: c } = q(), o = O(() => (e == null ? void 0 : e.CHAT_ALIGN) === "to" ? "client" : "response", [e]), d = O(() => e == null ? void 0 : e.FAQ_ID, [e]);
3393
3410
  return /* @__PURE__ */ n.jsxs("div", { className: `w-bubble-chat ${`w-${o}`}`, children: [
3394
3411
  /* @__PURE__ */ n.jsx(
3395
3412
  V.Text,
@@ -3402,17 +3419,17 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3402
3419
  marginBottom: 8,
3403
3420
  display: "block"
3404
3421
  },
3405
- children: l ? e == null ? void 0 : e.MESSAGE : r
3422
+ children: d ? e == null ? void 0 : e.MESSAGE : r
3406
3423
  }
3407
3424
  ),
3408
- l ? /* @__PURE__ */ n.jsx(
3425
+ d ? /* @__PURE__ */ n.jsx(
3409
3426
  z,
3410
3427
  {
3411
3428
  block: !0,
3412
3429
  onClick: () => {
3413
- var a;
3414
- typeof (c == null ? void 0 : c.history) < "u" && ((a = c == null ? void 0 : c.history) == null || a.push(
3415
- d(`/standard/hrm.helpdesk.FAQ-detail/:${l}`)
3430
+ var i;
3431
+ typeof (c == null ? void 0 : c.history) < "u" && ((i = c == null ? void 0 : c.history) == null || i.push(
3432
+ a(`/standard/hrm.helpdesk.FAQ-detail/:${d}`)
3416
3433
  ));
3417
3434
  },
3418
3435
  children: t
@@ -3427,53 +3444,53 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3427
3444
  }
3428
3445
  )
3429
3446
  ] });
3430
- }, qr = R(Kr), Jr = ({ ...e }) => {
3447
+ }, Qr = R(Jr), Zr = ({ ...e }) => {
3431
3448
  switch (e == null ? void 0 : e.CHAT_TYPE) {
3432
3449
  case "info":
3433
- return /* @__PURE__ */ n.jsx(Yr, { ...e });
3434
- case "faq":
3435
3450
  return /* @__PURE__ */ n.jsx(qr, { ...e });
3451
+ case "faq":
3452
+ return /* @__PURE__ */ n.jsx(Qr, { ...e });
3436
3453
  case "chat":
3437
- return e != null && e.ATTACHMENT ? /* @__PURE__ */ n.jsx(Gr, { ...e }) : /* @__PURE__ */ n.jsx(Wr, { ...e });
3454
+ return e != null && e.ATTACHMENT ? /* @__PURE__ */ n.jsx(Yr, { ...e }) : /* @__PURE__ */ n.jsx(Gr, { ...e });
3438
3455
  default:
3439
3456
  return null;
3440
3457
  }
3441
- }, Qr = R(Jr), Zr = () => {
3458
+ }, Xr = R(Zr), Pr = () => {
3442
3459
  var y;
3443
- const [e, t] = D([]), r = p("And", "and"), s = p("IsTyping", "Is Typing"), d = p("People", "People"), { employees: c, setTypingOtherEmp: o, objTypingOtherEmp: l } = De(), { ws: a, setGetResponse: u } = he(), { parsedJWT: f } = K(), x = O(() => e == null ? void 0 : e.filter((w) => l == null ? void 0 : l[w == null ? void 0 : w.EMP_ID]), [l, e]), g = O(() => {
3444
- const w = x == null ? void 0 : x.map((k) => k == null ? void 0 : k.FULL_NAME);
3460
+ const [e, t] = D([]), r = _("And", "and"), s = _("IsTyping", "Is Typing"), a = _("People", "People"), { employees: c, setTypingOtherEmp: o, objTypingOtherEmp: d } = De(), { ws: i, setGetResponse: u } = he(), { parsedJWT: f } = q(), x = O(() => e == null ? void 0 : e.filter((j) => d == null ? void 0 : d[j == null ? void 0 : j.EMP_ID]), [d, e]), g = O(() => {
3461
+ const j = x == null ? void 0 : x.map((p) => p == null ? void 0 : p.FULL_NAME);
3445
3462
  if ((x == null ? void 0 : x.length) > 2) {
3446
- const k = w == null ? void 0 : w.filter((v, E) => E <= 1), _ = w == null ? void 0 : w.filter((v, E) => E > 1);
3447
- return `${k == null ? void 0 : k.join(", ")}, ${r} ${_ == null ? void 0 : _.length} ${d} ${s}`;
3463
+ const p = j == null ? void 0 : j.filter((v, h) => h <= 1), w = j == null ? void 0 : j.filter((v, h) => h > 1);
3464
+ return `${p == null ? void 0 : p.join(", ")}, ${r} ${w == null ? void 0 : w.length} ${a} ${s}`;
3448
3465
  }
3449
- return `${w == null ? void 0 : w.join(", ")} ${s}`;
3450
- }, [e, x]), C = (w) => {
3451
- if ((w == null ? void 0 : w.data) !== "PING") {
3452
- const k = JSON.parse((w == null ? void 0 : w.data) || "{}"), { DATA: _ = {}, EVENT: v = "" } = k ?? {}, E = _ == null ? void 0 : _.EMPLOYEE_ID, b = f == null ? void 0 : f.EMP_ID;
3466
+ return `${j == null ? void 0 : j.join(", ")} ${s}`;
3467
+ }, [e, x]), C = (j) => {
3468
+ if ((j == null ? void 0 : j.data) !== "PING") {
3469
+ const p = JSON.parse((j == null ? void 0 : j.data) || "{}"), { DATA: w = {}, EVENT: v = "" } = p ?? {}, h = w == null ? void 0 : w.EMPLOYEE_ID, b = f == null ? void 0 : f.EMP_ID;
3453
3470
  if (v === "TYPING") {
3454
- E === b ? u(!1) : o((j) => ({
3455
- ...j,
3456
- [E]: _ == null ? void 0 : _.IS_TYPING
3471
+ h === b ? u(!1) : o((k) => ({
3472
+ ...k,
3473
+ [h]: w == null ? void 0 : w.IS_TYPING
3457
3474
  }));
3458
- const h = c == null ? void 0 : c.find(
3459
- (j) => (j == null ? void 0 : j.EMP_ID) === (_ == null ? void 0 : _.EMPLOYEE_ID)
3475
+ const E = c == null ? void 0 : c.find(
3476
+ (k) => (k == null ? void 0 : k.EMP_ID) === (w == null ? void 0 : w.EMPLOYEE_ID)
3460
3477
  ), m = {
3461
- ..._,
3462
- ...h
3478
+ ...w,
3479
+ ...E
3463
3480
  };
3464
- t((j) => {
3465
- const S = [...j, m], I = Tn({
3481
+ t((k) => {
3482
+ const S = [...k, m], H = yn({
3466
3483
  ArrObj: S,
3467
3484
  key: "EMPLOYEE_ID"
3468
3485
  });
3469
- return I == null ? void 0 : I.filter((B) => B == null ? void 0 : B.IS_TYPING);
3486
+ return H == null ? void 0 : H.filter((B) => B == null ? void 0 : B.IS_TYPING);
3470
3487
  });
3471
3488
  }
3472
3489
  }
3473
3490
  };
3474
- return X(() => (a && (a == null || a.addEventListener("message", C)), () => {
3475
- a && (a == null || a.removeEventListener("message", C));
3476
- }), [c]), (y = Object.values(l || {})) != null && y.every((w) => w === !1) ? null : /* @__PURE__ */ n.jsxs(
3491
+ return X(() => (i && (i == null || i.addEventListener("message", C)), () => {
3492
+ i && (i == null || i.removeEventListener("message", C));
3493
+ }), [c]), (y = Object.values(d || {})) != null && y.every((j) => j === !1) ? null : /* @__PURE__ */ n.jsxs(
3477
3494
  "div",
3478
3495
  {
3479
3496
  style: {
@@ -3492,17 +3509,17 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3492
3509
  backgroundColor: "#fde3cf",
3493
3510
  cursor: "pointer"
3494
3511
  },
3495
- children: x == null ? void 0 : x.map((w, k) => /* @__PURE__ */ n.jsx(Se, { title: w == null ? void 0 : w.FULL_NAME, children: /* @__PURE__ */ n.jsx(Ee, { src: w == null ? void 0 : w.PHOTO, nameFallback: w == null ? void 0 : w.FULL_NAME }) }, k))
3512
+ children: x == null ? void 0 : x.map((j, p) => /* @__PURE__ */ n.jsx(Se, { title: j == null ? void 0 : j.FULL_NAME, children: /* @__PURE__ */ n.jsx(Ee, { src: j == null ? void 0 : j.PHOTO, nameFallback: j == null ? void 0 : j.FULL_NAME }) }, p))
3496
3513
  }
3497
3514
  ),
3498
3515
  /* @__PURE__ */ n.jsx(V.Text, { children: g }),
3499
- (x == null ? void 0 : x.length) > 0 ? /* @__PURE__ */ n.jsx(ft, {}) : null
3516
+ (x == null ? void 0 : x.length) > 0 ? /* @__PURE__ */ n.jsx(gt, {}) : null
3500
3517
  ]
3501
3518
  }
3502
3519
  );
3503
- }, Xr = R(Zr), Pr = () => {
3520
+ }, eo = R(Pr), no = () => {
3504
3521
  var c;
3505
- const { chats: e } = De(), { widgetProps: t } = K(), { activeTab: r } = be(), s = Y(), { xs: d } = Ce.useBreakpoint();
3522
+ const { chats: e } = De(), { widgetProps: t } = q(), { activeTab: r } = be(), s = K(), { xs: a } = Ce.useBreakpoint();
3506
3523
  return X(() => {
3507
3524
  clearTimeout(s.current), s.current = setTimeout(() => {
3508
3525
  me(".w-ticket-detail-content-container");
@@ -3510,48 +3527,48 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3510
3527
  }, [r]), /* @__PURE__ */ n.jsxs(
3511
3528
  "div",
3512
3529
  {
3513
- className: `w-ticket-detail-content-container ${d ? t != null && t.isSF ? "w-ticket-detail-content-container-sf-mobile" : "w-ticket-detail-content-container-mobile" : ""} `,
3530
+ className: `w-ticket-detail-content-container ${a ? t != null && t.isSF ? "w-ticket-detail-content-container-sf-mobile" : "w-ticket-detail-content-container-mobile" : ""} `,
3514
3531
  children: [
3515
3532
  (c = Object.keys(e || {})) == null ? void 0 : c.map((o) => {
3516
- var a, u;
3517
- const l = e == null ? void 0 : e[o];
3518
- return /* @__PURE__ */ n.jsxs(gn, { children: [
3519
- /* @__PURE__ */ n.jsx("div", { className: "w-datekey-chats", children: (a = ae(o)) == null ? void 0 : a.format("ddd, DD MMMM YYYY") }),
3520
- /* @__PURE__ */ n.jsx("div", { className: "w-bubble-chat-container", children: (u = rt(l)) == null ? void 0 : u.map((f, x) => {
3521
- var y, w;
3533
+ var i, u;
3534
+ const d = e == null ? void 0 : e[o];
3535
+ return /* @__PURE__ */ n.jsxs(Cn, { children: [
3536
+ /* @__PURE__ */ n.jsx("div", { className: "w-datekey-chats", children: (i = ae(o)) == null ? void 0 : i.format("ddd, DD MMMM YYYY") }),
3537
+ /* @__PURE__ */ n.jsx("div", { className: "w-bubble-chat-container", children: (u = ct(d)) == null ? void 0 : u.map((f, x) => {
3538
+ var y, j;
3522
3539
  const g = (f == null ? void 0 : f.CHAT_ALIGN) === "to" ? "client" : "response", C = f == null ? void 0 : f.CHAT_TYPE;
3523
- return /* @__PURE__ */ n.jsxs(gn, { children: [
3540
+ return /* @__PURE__ */ n.jsxs(Cn, { children: [
3524
3541
  g === "response" && C !== "info" && /* @__PURE__ */ n.jsx(
3525
3542
  Ue,
3526
3543
  {
3527
3544
  src: (y = f == null ? void 0 : f.ACTOR) == null ? void 0 : y.PHOTO,
3528
- name: (w = f == null ? void 0 : f.ACTOR) == null ? void 0 : w.FULL_NAME
3545
+ name: (j = f == null ? void 0 : f.ACTOR) == null ? void 0 : j.FULL_NAME
3529
3546
  }
3530
3547
  ),
3531
- /* @__PURE__ */ n.jsx(Qr, { ...f })
3548
+ /* @__PURE__ */ n.jsx(Xr, { ...f })
3532
3549
  ] }, x);
3533
3550
  }) })
3534
3551
  ] }, o);
3535
3552
  }),
3536
- /* @__PURE__ */ n.jsx(Xr, {})
3553
+ /* @__PURE__ */ n.jsx(eo, {})
3537
3554
  ]
3538
3555
  }
3539
3556
  );
3540
- }, eo = R(Pr), no = () => {
3557
+ }, to = R(no), so = () => {
3541
3558
  var c, o;
3542
- const { chats: e, loadingChats: t } = De(), { widgetProps: r } = K(), { xs: s } = Ce.useBreakpoint(), d = O(() => {
3543
- var a;
3544
- const l = [fn];
3545
- return s && (r != null && r.isSF ? l == null || l.push(
3559
+ const { chats: e, loadingChats: t } = De(), { widgetProps: r } = q(), { xs: s } = Ce.useBreakpoint(), a = O(() => {
3560
+ var i;
3561
+ const d = [fn];
3562
+ return s && (r != null && r.isSF ? d == null || d.push(
3546
3563
  `${fn}-sf-mobile`
3547
- ) : l == null || l.push(`${fn}-mobile`)), (a = l == null ? void 0 : l.filter(Boolean)) == null ? void 0 : a.join(" ");
3564
+ ) : d == null || d.push(`${fn}-mobile`)), (i = d == null ? void 0 : d.filter(Boolean)) == null ? void 0 : i.join(" ");
3548
3565
  }, [s, r == null ? void 0 : r.isSF]);
3549
3566
  return t ? /* @__PURE__ */ n.jsx(
3550
3567
  "div",
3551
3568
  {
3552
- className: `${d} w-ticket-detail-loading-chats`,
3553
- children: (c = Array.from({ length: 3 })) == null ? void 0 : c.map((l, a) => {
3554
- const u = a % 2 === 0;
3569
+ className: `${a} w-ticket-detail-loading-chats`,
3570
+ children: (c = Array.from({ length: 3 })) == null ? void 0 : c.map((d, i) => {
3571
+ const u = i % 2 === 0;
3555
3572
  return /* @__PURE__ */ n.jsxs(
3556
3573
  "div",
3557
3574
  {
@@ -3586,24 +3603,24 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3586
3603
  )
3587
3604
  ]
3588
3605
  },
3589
- a
3606
+ i
3590
3607
  );
3591
3608
  })
3592
3609
  }
3593
3610
  ) : ((o = Object.keys(e || {})) == null ? void 0 : o.length) === 0 ? /* @__PURE__ */ n.jsx(
3594
3611
  "div",
3595
3612
  {
3596
- className: d,
3613
+ className: a,
3597
3614
  style: {
3598
3615
  display: "flex",
3599
3616
  justifyContent: "center",
3600
3617
  alignItems: "center"
3601
3618
  },
3602
- children: /* @__PURE__ */ n.jsx(Xn, {})
3619
+ children: /* @__PURE__ */ n.jsx(et, {})
3603
3620
  }
3604
- ) : /* @__PURE__ */ n.jsx(eo, {});
3605
- }, to = R(no), so = ({ ...e }) => {
3606
- const t = Y(0);
3621
+ ) : /* @__PURE__ */ n.jsx(to, {});
3622
+ }, ro = R(so), oo = ({ ...e }) => {
3623
+ const t = K(0);
3607
3624
  return /* @__PURE__ */ n.jsxs(
3608
3625
  "div",
3609
3626
  {
@@ -3613,7 +3630,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3613
3630
  },
3614
3631
  children: [
3615
3632
  /* @__PURE__ */ n.jsx(
3616
- wn,
3633
+ kn,
3617
3634
  {
3618
3635
  nameFallback: e == null ? void 0 : e.FULL_NAME,
3619
3636
  src: e == null ? void 0 : e.PHOTO,
@@ -3623,7 +3640,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3623
3640
  preview: !1,
3624
3641
  loading: "lazy",
3625
3642
  onError: (r) => {
3626
- t.current += 1, (t == null ? void 0 : t.current) < 3 ? r.target.src = ot(e == null ? void 0 : e.PHOTO) : r.target.src = jn(e == null ? void 0 : e.FULL_NAME);
3643
+ t.current += 1, (t == null ? void 0 : t.current) < 3 ? r.target.src = it(e == null ? void 0 : e.PHOTO) : r.target.src = wn(e == null ? void 0 : e.FULL_NAME);
3627
3644
  }
3628
3645
  }
3629
3646
  ),
@@ -3636,17 +3653,17 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3636
3653
  ]
3637
3654
  }
3638
3655
  );
3639
- }, ro = R(so), oo = ({ setLoadingUpload: e, isLoadingUpload: t }) => {
3640
- var _, v;
3641
- const r = en(), [s, d] = D({}), c = Y(null), o = p(
3656
+ }, co = R(oo), io = ({ setLoadingUpload: e, isLoadingUpload: t }) => {
3657
+ var w, v;
3658
+ const r = en(), [s, a] = D({}), c = K(null), o = _(
3642
3659
  "ImageMustSmallerThan",
3643
3660
  "Image must smaller than"
3644
- ), l = p(
3661
+ ), d = _(
3645
3662
  "MaximumFileSizeExceeded",
3646
3663
  "Maximum file size exceeded"
3647
- ), { onSendMsg: a } = he(), { employees: u, setChats: f, isFromSelf: x } = De(), { ticketId: g } = ve(), { activeTab: C } = be(), y = () => {
3648
- var E;
3649
- (E = r({
3664
+ ), { onSendMsg: i } = he(), { employees: u, setChats: f, isFromSelf: x } = De(), { ticketId: g } = ve(), { activeTab: C } = be(), y = () => {
3665
+ var h;
3666
+ (h = r({
3650
3667
  endpoint: "/upload/get-upload-config",
3651
3668
  data: {
3652
3669
  LIMIT: 1,
@@ -3655,57 +3672,57 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3655
3672
  UPLOAD_CODE: "helpdesk"
3656
3673
  }
3657
3674
  }
3658
- })) == null || E.then((b) => {
3659
- var m, j;
3660
- const h = (j = (m = b == null ? void 0 : b.data) == null ? void 0 : m.DATA) == null ? void 0 : j.LIST;
3661
- (h == null ? void 0 : h.length) > 0 && d(h == null ? void 0 : h[0]);
3675
+ })) == null || h.then((b) => {
3676
+ var m, k;
3677
+ const E = (k = (m = b == null ? void 0 : b.data) == null ? void 0 : m.DATA) == null ? void 0 : k.LIST;
3678
+ (E == null ? void 0 : E.length) > 0 && a(E == null ? void 0 : E[0]);
3662
3679
  });
3663
- }, w = (E) => {
3664
- var m, j, S;
3665
- const b = E.size / 1024 / 1024, h = (s == null ? void 0 : s.MAXFILESIZE) / 1024;
3666
- return b > h && ((m = ie) == null || m.destroy(), (j = ie) == null || j.config({
3680
+ }, j = (h) => {
3681
+ var m, k, S;
3682
+ const b = h.size / 1024 / 1024, E = (s == null ? void 0 : s.MAXFILESIZE) / 1024;
3683
+ return b > E && ((m = ie) == null || m.destroy(), (k = ie) == null || k.config({
3667
3684
  getContainer: () => document.querySelector(".w-widget-content-container"),
3668
3685
  top: 28,
3669
3686
  placement: "top"
3670
3687
  }), (S = ie) == null || S.error({
3671
- message: l,
3672
- description: `${o} ${h == null ? void 0 : h.toFixed(
3688
+ message: d,
3689
+ description: `${o} ${E == null ? void 0 : E.toFixed(
3673
3690
  1
3674
3691
  )} MB!`,
3675
3692
  className: "w-notification-content",
3676
3693
  duration: 3
3677
3694
  })), !1;
3678
- }, k = (E) => {
3679
- var h, m;
3695
+ }, p = (h) => {
3696
+ var E, m;
3680
3697
  e(!0);
3681
3698
  const b = new FormData();
3682
- b.append("UPLOAD_CODE", s == null ? void 0 : s.UPLOAD_CODE), b.append("UPLOAD_TYPE", s == null ? void 0 : s.UPLOAD_TYPE), b.append("FILE", E), (m = (h = r({
3699
+ b.append("UPLOAD_CODE", s == null ? void 0 : s.UPLOAD_CODE), b.append("UPLOAD_TYPE", s == null ? void 0 : s.UPLOAD_TYPE), b.append("FILE", h), (m = (E = r({
3683
3700
  endpoint: "/upload/temp",
3684
3701
  data: b,
3685
3702
  headers: {
3686
3703
  "Content-Type": "multipart/form-data"
3687
3704
  }
3688
- })) == null ? void 0 : h.then((j) => {
3689
- var S, I, B, M, L;
3690
- if ((I = (S = j == null ? void 0 : j.data) == null ? void 0 : S.DATA) != null && I.LIST) {
3691
- const F = (M = (B = j == null ? void 0 : j.data) == null ? void 0 : B.DATA) == null ? void 0 : M.LIST, $ = {
3692
- ATTACHMENT: F == null ? void 0 : F.VIEW_PATH,
3705
+ })) == null ? void 0 : E.then((k) => {
3706
+ var S, H, B, M, L;
3707
+ if ((H = (S = k == null ? void 0 : k.data) == null ? void 0 : S.DATA) != null && H.LIST) {
3708
+ const I = (M = (B = k == null ? void 0 : k.data) == null ? void 0 : B.DATA) == null ? void 0 : M.LIST, $ = {
3709
+ ATTACHMENT: I == null ? void 0 : I.VIEW_PATH,
3693
3710
  FAQ_ID: null,
3694
3711
  MESSAGE: "",
3695
- CREATED_DATE: (L = ae()) == null ? void 0 : L.format(`${hn} HH:mm:ss`),
3712
+ CREATED_DATE: (L = ae()) == null ? void 0 : L.format(`${En} HH:mm:ss`),
3696
3713
  CHAT_ALIGN: "to",
3697
3714
  CHAT_TYPE: "chat"
3698
3715
  };
3699
- f((H) => {
3700
- const Z = [...yn(H), $];
3701
- return Qe(Z);
3702
- }), x.current = !0, a({
3716
+ f((F) => {
3717
+ const J = [...jn(F), $];
3718
+ return Qe(J);
3719
+ }), x.current = !0, i({
3703
3720
  event: "SEND_MESSAGE",
3704
3721
  data: {
3705
- ATTACHMENT: F == null ? void 0 : F.TEMP_PATH,
3722
+ ATTACHMENT: I == null ? void 0 : I.TEMP_PATH,
3706
3723
  FAQ_ID: null,
3707
3724
  MESSAGE: "",
3708
- EMPLOYEES: u == null ? void 0 : u.map((H) => H == null ? void 0 : H.EMP_ID),
3725
+ EMPLOYEES: u == null ? void 0 : u.map((F) => F == null ? void 0 : F.EMP_ID),
3709
3726
  TASK_ID: g
3710
3727
  }
3711
3728
  }), clearTimeout(c.current), c.current = setTimeout(() => {
@@ -3719,16 +3736,16 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3719
3736
  return X(() => {
3720
3737
  y();
3721
3738
  }, []), X(() => {
3722
- var E;
3723
- (E = ie) == null || E.destroy();
3739
+ var h;
3740
+ (h = ie) == null || h.destroy();
3724
3741
  }, [C]), /* @__PURE__ */ n.jsx(
3725
- Zn,
3742
+ Pn,
3726
3743
  {
3727
- beforeUpload: w,
3744
+ beforeUpload: j,
3728
3745
  fileList: [],
3729
- accept: (v = (_ = s == null ? void 0 : s.EXT_LIST) == null ? void 0 : _.split(",")) == null ? void 0 : v.map((E) => `.${E}`),
3730
- onChange: (E) => {
3731
- k(E == null ? void 0 : E.file);
3746
+ accept: (v = (w = s == null ? void 0 : s.EXT_LIST) == null ? void 0 : w.split(",")) == null ? void 0 : v.map((h) => `.${h}`),
3747
+ onChange: (h) => {
3748
+ p(h == null ? void 0 : h.file);
3732
3749
  },
3733
3750
  children: /* @__PURE__ */ n.jsx(
3734
3751
  z,
@@ -3741,48 +3758,48 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3741
3758
  )
3742
3759
  }
3743
3760
  );
3744
- }, co = R(oo), io = (e) => {
3761
+ }, lo = R(io), ao = (e) => {
3745
3762
  var s;
3746
- const t = Y(null), r = Y(null);
3763
+ const t = K(null), r = K(null);
3747
3764
  return r != null && r.current && ((s = r.current) == null || s.update(e)), X(() => {
3748
3765
  var c;
3749
- const d = (c = window == null ? void 0 : window.customElements) == null ? void 0 : c.get("em-emoji-picker");
3750
- return r.current = new (d || cs)({ ...e, ref: t }), () => {
3766
+ const a = (c = window == null ? void 0 : window.customElements) == null ? void 0 : c.get("em-emoji-picker");
3767
+ return r.current = new (a || ls)({ ...e, ref: t }), () => {
3751
3768
  r.current = null;
3752
3769
  };
3753
- }, []), mn.createElement("div", { ref: t });
3754
- }, lo = ({ refInput: e }) => {
3770
+ }, []), bn.createElement("div", { ref: t });
3771
+ }, uo = ({ refInput: e }) => {
3755
3772
  const { xs: t } = Ce.useBreakpoint(), r = O(() => t ? "click" : "hover", [t]), s = () => {
3756
3773
  var g;
3757
3774
  const c = (g = e == null ? void 0 : e.current) == null ? void 0 : g.textarea;
3758
3775
  if (!c)
3759
3776
  return !1;
3760
- const { selectionStart: o, selectionEnd: l, value: a } = c, u = a == null ? void 0 : a.substring(0, o), f = a == null ? void 0 : a.substring(o, l), x = a == null ? void 0 : a.substring(l);
3777
+ const { selectionStart: o, selectionEnd: d, value: i } = c, u = i == null ? void 0 : i.substring(0, o), f = i == null ? void 0 : i.substring(o, d), x = i == null ? void 0 : i.substring(d);
3761
3778
  return {
3762
3779
  before: u,
3763
3780
  selectedText: f,
3764
3781
  after: x,
3765
3782
  selectionStart: o,
3766
- selectionEnd: l,
3767
- text: a
3783
+ selectionEnd: d,
3784
+ text: i
3768
3785
  };
3769
- }, d = (c) => {
3786
+ }, a = (c) => {
3770
3787
  var x, g;
3771
3788
  (x = e == null ? void 0 : e.current) == null || x.focus();
3772
- const o = (g = e == null ? void 0 : e.current) == null ? void 0 : g.textarea, l = c == null ? void 0 : c.native;
3789
+ const o = (g = e == null ? void 0 : e.current) == null ? void 0 : g.textarea, d = c == null ? void 0 : c.native;
3773
3790
  if (!o) return;
3774
- const { before: a, after: u } = s(), f = `${a}${l}${u}`;
3775
- typeof document.execCommand == "function" ? document.execCommand("insertText", !1, l) : o.value = f;
3791
+ const { before: i, after: u } = s(), f = `${i}${d}${u}`;
3792
+ typeof document.execCommand == "function" ? document.execCommand("insertText", !1, d) : o.value = f;
3776
3793
  };
3777
3794
  return /* @__PURE__ */ n.jsx(
3778
- vn,
3795
+ hn,
3779
3796
  {
3780
3797
  trigger: r,
3781
3798
  content: /* @__PURE__ */ n.jsx(
3782
- io,
3799
+ ao,
3783
3800
  {
3784
3801
  onEmojiSelect: (c) => {
3785
- d(c);
3802
+ a(c);
3786
3803
  },
3787
3804
  theme: "auto"
3788
3805
  }
@@ -3790,26 +3807,26 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3790
3807
  children: /* @__PURE__ */ n.jsx(z, { icon: /* @__PURE__ */ n.jsx(P, { type: "smile" }), style: { border: "none" } })
3791
3808
  }
3792
3809
  );
3793
- }, ao = R(lo), uo = () => {
3794
- const [e, t] = D(0), [r, s] = D(!1), d = Y(null), c = Y(null), o = Y(!1), l = Y(null), { onSendMsg: a, setGetResponse: u, isGetResponse: f } = he(), { ticketId: x } = ve(), { isActiveTabVA: g } = be(), { employees: C, setChats: y, isFromSelf: w, detailTicket: k } = De(), _ = O(() => r || !f, [r, f]), v = O(() => {
3810
+ }, fo = R(uo), xo = () => {
3811
+ const [e, t] = D(0), [r, s] = D(!1), a = K(null), c = K(null), o = K(!1), d = K(null), { onSendMsg: i, setGetResponse: u, isGetResponse: f } = he(), { ticketId: x } = ve(), { isActiveTabVA: g } = be(), { employees: C, setChats: y, isFromSelf: j, detailTicket: p } = De(), w = O(() => r || !f, [r, f]), v = O(() => {
3795
3812
  var m;
3796
- return ((m = k == null ? void 0 : k.STATUS) == null ? void 0 : m.toString().toLowerCase()) === "closed";
3797
- }, [k == null ? void 0 : k.STATUS]), E = O(() => C == null ? void 0 : C.map((m) => ({
3813
+ return ((m = p == null ? void 0 : p.STATUS) == null ? void 0 : m.toString().toLowerCase()) === "closed";
3814
+ }, [p == null ? void 0 : p.STATUS]), h = O(() => C == null ? void 0 : C.map((m) => ({
3798
3815
  ...m,
3799
3816
  label: /* @__PURE__ */ n.jsx(
3800
- vn,
3817
+ hn,
3801
3818
  {
3802
3819
  placement: "left",
3803
- content: /* @__PURE__ */ n.jsx(ro, { ...m }),
3820
+ content: /* @__PURE__ */ n.jsx(co, { ...m }),
3804
3821
  children: /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(Ue, { src: m == null ? void 0 : m.PHOTO, name: m == null ? void 0 : m.FULL_NAME }) })
3805
3822
  }
3806
3823
  ),
3807
3824
  value: m == null ? void 0 : m.FULL_NAME
3808
3825
  })), [C]), b = () => {
3809
- var S, I, B;
3826
+ var S, H, B;
3810
3827
  u(!1);
3811
- const m = (I = (S = d == null ? void 0 : d.current) == null ? void 0 : S.textarea) == null ? void 0 : I.value;
3812
- a({
3828
+ const m = (H = (S = a == null ? void 0 : a.current) == null ? void 0 : S.textarea) == null ? void 0 : H.value;
3829
+ i({
3813
3830
  event: "SEND_MESSAGE",
3814
3831
  data: {
3815
3832
  ATTACHMENT: "",
@@ -3819,27 +3836,27 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3819
3836
  TASK_ID: x
3820
3837
  }
3821
3838
  });
3822
- const j = {
3839
+ const k = {
3823
3840
  ATTACHMENT: "",
3824
3841
  FAQ_ID: null,
3825
3842
  MESSAGE: m,
3826
- CREATED_DATE: (B = ae()) == null ? void 0 : B.format(`${hn} HH:mm:ss`),
3843
+ CREATED_DATE: (B = ae()) == null ? void 0 : B.format(`${En} HH:mm:ss`),
3827
3844
  CHAT_ALIGN: "to",
3828
3845
  CHAT_TYPE: "chat"
3829
3846
  };
3830
3847
  y((M) => {
3831
- const F = [...yn(M), j];
3832
- return Qe(F);
3833
- }), w.current = !0, me(".w-ticket-detail-content-container"), t((M) => M + 1);
3834
- }, h = () => {
3835
- window.clearTimeout(c.current), o.current || (o.current = !0, a({
3848
+ const I = [...jn(M), k];
3849
+ return Qe(I);
3850
+ }), j.current = !0, me(".w-ticket-detail-content-container"), t((M) => M + 1);
3851
+ }, E = () => {
3852
+ window.clearTimeout(c.current), o.current || (o.current = !0, i({
3836
3853
  event: "TYPING",
3837
3854
  data: {
3838
3855
  TASK_ID: x,
3839
3856
  IS_TYPING: !0
3840
3857
  }
3841
3858
  })), c.current = setTimeout(() => {
3842
- a({
3859
+ i({
3843
3860
  event: "TYPING",
3844
3861
  data: {
3845
3862
  TASK_ID: x,
@@ -3849,9 +3866,9 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3849
3866
  }, 250);
3850
3867
  };
3851
3868
  return X(() => {
3852
- d != null && d.current && !g && x && (clearTimeout(l.current), l.current = setTimeout(() => {
3869
+ a != null && a.current && !g && x && (clearTimeout(d.current), d.current = setTimeout(() => {
3853
3870
  var m;
3854
- (m = d == null ? void 0 : d.current) == null || m.focus();
3871
+ (m = a == null ? void 0 : a.current) == null || m.focus();
3855
3872
  }, 500));
3856
3873
  }, [g, x]), v ? null : /* @__PURE__ */ n.jsxs(
3857
3874
  "div",
@@ -3861,51 +3878,51 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3861
3878
  margin: 0
3862
3879
  },
3863
3880
  children: [
3864
- /* @__PURE__ */ n.jsx(ao, { refInput: d }),
3881
+ /* @__PURE__ */ n.jsx(fo, { refInput: a }),
3865
3882
  /* @__PURE__ */ n.jsx(
3866
- co,
3883
+ lo,
3867
3884
  {
3868
3885
  setLoadingUpload: s,
3869
3886
  isLoadingUpload: r
3870
3887
  }
3871
3888
  ),
3872
3889
  /* @__PURE__ */ n.jsx(
3873
- Un,
3890
+ Wn,
3874
3891
  {
3875
3892
  autoSize: {
3876
3893
  maxRows: 3
3877
3894
  },
3878
- ref: d,
3895
+ ref: a,
3879
3896
  className: "w-input-helpdesk",
3880
3897
  placeholder: "Type a message...",
3881
3898
  onChange: () => {
3882
- h();
3899
+ E();
3883
3900
  },
3884
3901
  onKeyDown: (m) => {
3885
3902
  ((m == null ? void 0 : m.code) === "Enter" || (m == null ? void 0 : m.key) === "Enter") && !(m != null && m.shiftKey) && b();
3886
3903
  },
3887
- filterOption: (m, j) => {
3904
+ filterOption: (m, k) => {
3888
3905
  var B, M, L;
3889
- const S = (B = m == null ? void 0 : m.toString()) == null ? void 0 : B.toLowerCase(), I = (L = (M = j == null ? void 0 : j.FULL_NAME) == null ? void 0 : M.toString()) == null ? void 0 : L.toLowerCase();
3890
- return I == null ? void 0 : I.includes(S);
3906
+ const S = (B = m == null ? void 0 : m.toString()) == null ? void 0 : B.toLowerCase(), H = (L = (M = k == null ? void 0 : k.FULL_NAME) == null ? void 0 : M.toString()) == null ? void 0 : L.toLowerCase();
3907
+ return H == null ? void 0 : H.includes(S);
3891
3908
  },
3892
- children: E == null ? void 0 : E.map((m, j) => /* @__PURE__ */ n.jsx(Un.Option, { ...m, children: m == null ? void 0 : m.label }, j))
3909
+ children: h == null ? void 0 : h.map((m, k) => /* @__PURE__ */ n.jsx(Wn.Option, { ...m, children: m == null ? void 0 : m.label }, k))
3893
3910
  },
3894
3911
  e
3895
3912
  ),
3896
3913
  /* @__PURE__ */ n.jsx(
3897
3914
  z,
3898
3915
  {
3899
- loading: _,
3900
- disabled: _,
3916
+ loading: w,
3917
+ disabled: w,
3901
3918
  className: "w-send-btn",
3902
3919
  style: {
3903
3920
  backgroundColor: "var(--primary-color, #395ebc)",
3904
- ..._ && {
3921
+ ...w && {
3905
3922
  color: "white"
3906
3923
  }
3907
3924
  },
3908
- icon: /* @__PURE__ */ n.jsx(P, { type: _ ? "loading" : "send" }),
3925
+ icon: /* @__PURE__ */ n.jsx(P, { type: w ? "loading" : "send" }),
3909
3926
  shape: "circle",
3910
3927
  onClick: b
3911
3928
  }
@@ -3913,14 +3930,14 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3913
3930
  ]
3914
3931
  }
3915
3932
  );
3916
- }, fo = R(uo), xo = ({ title: e, subTitle: t, onClose: r, open: s, styleWrapper: d }) => {
3933
+ }, go = R(xo), Co = ({ title: e, subTitle: t, onClose: r, open: s, styleWrapper: a }) => {
3917
3934
  var c;
3918
3935
  return s ? /* @__PURE__ */ n.jsx(
3919
3936
  "div",
3920
3937
  {
3921
3938
  className: "w-banner-container",
3922
- ...((c = Object.keys(d || {})) == null ? void 0 : c.length) > 0 && {
3923
- style: d
3939
+ ...((c = Object.keys(a || {})) == null ? void 0 : c.length) > 0 && {
3940
+ style: a
3924
3941
  },
3925
3942
  children: /* @__PURE__ */ n.jsxs("div", { className: "w-banner-content", children: [
3926
3943
  e && /* @__PURE__ */ n.jsx(V.Text, { style: { fontSize: 16, fontWeight: 600 }, children: e }),
@@ -3936,13 +3953,13 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3936
3953
  ] })
3937
3954
  }
3938
3955
  ) : null;
3939
- }, Et = R(xo), go = () => {
3940
- const e = p(
3956
+ }, yt = R(Co), mo = () => {
3957
+ const e = _(
3941
3958
  "ForMoreInformationOfThisTicket",
3942
3959
  "For more information of this ticket"
3943
- ), t = p("ClickHere", "Click here"), { ticketId: r } = ve(), { widgetProps: s } = K(), { encrypt: d } = ht();
3960
+ ), t = _("ClickHere", "Click here"), { ticketId: r } = ve(), { widgetProps: s } = q(), { encrypt: a } = Tt();
3944
3961
  return /* @__PURE__ */ n.jsx(
3945
- Et,
3962
+ yt,
3946
3963
  {
3947
3964
  subTitle: /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
3948
3965
  /* @__PURE__ */ n.jsx(V.Text, { children: e }),
@@ -3952,7 +3969,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3952
3969
  strong: !0,
3953
3970
  className: "w-reconnect-manual",
3954
3971
  onClick: () => {
3955
- const c = d(r);
3972
+ const c = a(r);
3956
3973
  s != null && s.history && (s == null || s.history.push(
3957
3974
  `/standard/hrm.helpdesk.my-ticket.ticket-details?id=${c}`
3958
3975
  ));
@@ -3967,27 +3984,27 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3967
3984
  }
3968
3985
  }
3969
3986
  );
3970
- }, Co = R(go), mo = ({ onClose: e, visible: t }) => /* @__PURE__ */ n.jsx(bt, { open: t, onClose: e, children: /* @__PURE__ */ n.jsxs(Ir, { children: [
3971
- /* @__PURE__ */ n.jsx(Br, { onClose: e }),
3972
- /* @__PURE__ */ n.jsx(Co, {}),
3973
- /* @__PURE__ */ n.jsx(to, {}),
3974
- /* @__PURE__ */ n.jsx(fo, {})
3975
- ] }) }), bo = R(mo), vo = () => {
3976
- const e = p("AdvanceFilter", "Advance Filter"), t = p("Subject", "Subject"), r = p(
3987
+ }, bo = R(mo), vo = ({ onClose: e, visible: t }) => /* @__PURE__ */ n.jsx(ht, { open: t, onClose: e, children: /* @__PURE__ */ n.jsxs(Br, { children: [
3988
+ /* @__PURE__ */ n.jsx(Wr, { onClose: e }),
3989
+ /* @__PURE__ */ n.jsx(bo, {}),
3990
+ /* @__PURE__ */ n.jsx(ro, {}),
3991
+ /* @__PURE__ */ n.jsx(go, {})
3992
+ ] }) }), ho = R(vo), Eo = () => {
3993
+ const e = _("AdvanceFilter", "Advance Filter"), t = _("Subject", "Subject"), r = _(
3977
3994
  "TicketCategory",
3978
3995
  "Ticket Category"
3979
- ), s = p("TicketStatus", "Ticket Status"), d = p("CreatedDate", "Created Date"), c = p("New", "New"), o = p("Open", "Open"), l = p("Reopen", "Reopen"), a = p("InProgress", "In Progress"), u = p("Responded", "Responded"), f = p("Fixed", "Fixed"), x = p("Done", "Done"), g = p("Closed", "Closed"), C = p("HDCancelled", "Cancelled"), y = p("Clear", "Clear"), w = p("Filter", "Filter"), k = en(), [_] = oe.useForm(), { openFilter: v, setOpenFilter: E, getListTicket: b, setCountFilters: h } = ve(), [m, j] = D([]), S = O(() => {
3980
- const M = `${c}/${o}/${l}`, L = `${a}/${u}`, F = `${f}/${x}`;
3996
+ ), s = _("TicketStatus", "Ticket Status"), a = _("CreatedDate", "Created Date"), c = _("New", "New"), o = _("Open", "Open"), d = _("Reopen", "Reopen"), i = _("InProgress", "In Progress"), u = _("Responded", "Responded"), f = _("Fixed", "Fixed"), x = _("Done", "Done"), g = _("Closed", "Closed"), C = _("HDCancelled", "Cancelled"), y = _("Clear", "Clear"), j = _("Filter", "Filter"), p = en(), [w] = oe.useForm(), { openFilter: v, setOpenFilter: h, getListTicket: b, setCountFilters: E } = ve(), [m, k] = D([]), S = O(() => {
3997
+ const M = `${c}/${o}/${d}`, L = `${i}/${u}`, I = `${f}/${x}`;
3981
3998
  return [
3982
3999
  { value: 3, label: M },
3983
4000
  { value: 1, label: L },
3984
- { value: 4, label: F },
4001
+ { value: 4, label: I },
3985
4002
  { value: 6, label: g },
3986
4003
  { value: 8, label: C }
3987
4004
  ];
3988
- }, []), I = () => {
4005
+ }, []), H = () => {
3989
4006
  var M;
3990
- (M = k({
4007
+ (M = p({
3991
4008
  endpoint: "/helpdesk/category/list",
3992
4009
  data: {
3993
4010
  LIMIT: 999999,
@@ -3996,40 +4013,40 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3996
4013
  SORT: { FIELD: "ORDER_NO", ORDER: "ASC" }
3997
4014
  }
3998
4015
  })) == null || M.then((L) => {
3999
- var F, $, H;
4000
- if ((F = L == null ? void 0 : L.data) != null && F.DATA) {
4001
- const G = (H = ($ = L == null ? void 0 : L.data) == null ? void 0 : $.DATA) == null ? void 0 : H.LIST;
4002
- j(
4003
- G == null ? void 0 : G.map((Z) => ({
4004
- label: Z == null ? void 0 : Z.CATEGORY_NAME,
4005
- value: Z == null ? void 0 : Z.CATEGORY_CODE
4016
+ var I, $, F;
4017
+ if ((I = L == null ? void 0 : L.data) != null && I.DATA) {
4018
+ const G = (F = ($ = L == null ? void 0 : L.data) == null ? void 0 : $.DATA) == null ? void 0 : F.LIST;
4019
+ k(
4020
+ G == null ? void 0 : G.map((J) => ({
4021
+ label: J == null ? void 0 : J.CATEGORY_NAME,
4022
+ value: J == null ? void 0 : J.CATEGORY_CODE
4006
4023
  }))
4007
4024
  );
4008
4025
  }
4009
4026
  });
4010
4027
  }, B = () => {
4011
- var F, $;
4012
- const M = _ == null ? void 0 : _.getFieldsValue(!0);
4028
+ var I, $;
4029
+ const M = w == null ? void 0 : w.getFieldsValue(!0);
4013
4030
  b(M);
4014
- const L = ($ = (F = Object.values(M || {})) == null ? void 0 : F.flat()) == null ? void 0 : $.filter(Boolean);
4015
- h(L == null ? void 0 : L.length);
4031
+ const L = ($ = (I = Object.values(M || {})) == null ? void 0 : I.flat()) == null ? void 0 : $.filter(Boolean);
4032
+ E(L == null ? void 0 : L.length);
4016
4033
  };
4017
4034
  return X(() => {
4018
- I();
4035
+ H();
4019
4036
  }, []), /* @__PURE__ */ n.jsxs(
4020
- bt,
4037
+ ht,
4021
4038
  {
4022
4039
  styleContainer: { height: "calc(100% - 50px)" },
4023
4040
  open: v,
4024
4041
  onClose: () => {
4025
- E(!1);
4042
+ h(!1);
4026
4043
  },
4027
4044
  footer: /* @__PURE__ */ n.jsxs("div", { className: "w-ticket-list-advance-filter-footer", children: [
4028
4045
  /* @__PURE__ */ n.jsx(
4029
4046
  z,
4030
4047
  {
4031
4048
  onClick: () => {
4032
- _ == null || _.resetFields(), B();
4049
+ w == null || w.resetFields(), B();
4033
4050
  },
4034
4051
  children: y
4035
4052
  },
@@ -4040,37 +4057,48 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4040
4057
  {
4041
4058
  type: "primary",
4042
4059
  onClick: () => {
4043
- B(), E(!1);
4060
+ B(), h(!1);
4044
4061
  },
4045
- children: w
4062
+ children: j
4046
4063
  },
4047
4064
  "filter"
4048
4065
  )
4049
4066
  ] }),
4050
4067
  children: [
4051
- /* @__PURE__ */ n.jsx(V.Text, { strong: !0, style: { fontSize: 16 }, children: e }),
4052
- /* @__PURE__ */ n.jsx("div", { className: "w-ticket-list-advance-filter-form-container", children: /* @__PURE__ */ n.jsxs(oe, { form: _, layout: "vertical", children: [
4068
+ /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, justifyContent: "space-between" }, children: [
4069
+ /* @__PURE__ */ n.jsx(V.Text, { strong: !0, style: { fontSize: 16 }, children: e }),
4070
+ /* @__PURE__ */ n.jsx(
4071
+ z,
4072
+ {
4073
+ icon: /* @__PURE__ */ n.jsx(P, { type: "close" }),
4074
+ onClick: () => {
4075
+ h(!1);
4076
+ }
4077
+ }
4078
+ )
4079
+ ] }),
4080
+ /* @__PURE__ */ n.jsx("div", { className: "w-ticket-list-advance-filter-form-container", children: /* @__PURE__ */ n.jsxs(oe, { form: w, layout: "vertical", children: [
4053
4081
  /* @__PURE__ */ n.jsx(oe.Item, { label: t, name: "TASK_NAME", children: /* @__PURE__ */ n.jsx(Be, { allowClear: !0 }) }),
4054
- /* @__PURE__ */ n.jsx(oe.Item, { label: r, name: "CATEGORY_CODE", children: /* @__PURE__ */ n.jsx(Wn, { options: m, mode: "multiple", allowClear: !0 }) }),
4055
- /* @__PURE__ */ n.jsx(oe.Item, { label: s, name: "TASK_STATUS", children: /* @__PURE__ */ n.jsx(Wn, { options: S, mode: "multiple", allowClear: !0 }) }),
4056
- /* @__PURE__ */ n.jsx(oe.Item, { label: d, name: "CREATED_DATE", children: /* @__PURE__ */ n.jsx(Xt, { style: { width: "100%" }, allowClear: !0 }) })
4082
+ /* @__PURE__ */ n.jsx(oe.Item, { label: r, name: "CATEGORY_CODE", children: /* @__PURE__ */ n.jsx(Vn, { options: m, mode: "multiple", allowClear: !0 }) }),
4083
+ /* @__PURE__ */ n.jsx(oe.Item, { label: s, name: "TASK_STATUS", children: /* @__PURE__ */ n.jsx(Vn, { options: S, mode: "multiple", allowClear: !0 }) }),
4084
+ /* @__PURE__ */ n.jsx(oe.Item, { label: a, name: "CREATED_DATE", children: /* @__PURE__ */ n.jsx(es, { style: { width: "100%" }, allowClear: !0 }) })
4057
4085
  ] }) })
4058
4086
  ]
4059
4087
  }
4060
4088
  );
4061
- }, ho = R(vo), Eo = () => {
4062
- const e = p(
4089
+ }, To = R(Eo), yo = () => {
4090
+ const e = _(
4063
4091
  "ReconnectManually",
4064
4092
  "Reconnect Manually"
4065
- ), t = p(
4093
+ ), t = _(
4066
4094
  "HelpdeskWebsocket",
4067
4095
  "Helpdesk Websocket"
4068
- ), r = p("NotConnected", "Not Connected"), s = p("Connecting", "Connecting"), {
4069
- connectWebSocket: d,
4096
+ ), r = _("NotConnected", "Not Connected"), s = _("Connecting", "Connecting"), {
4097
+ connectWebSocket: a,
4070
4098
  retryCountState: c,
4071
4099
  setRetryCountState: o,
4072
- retryCountRef: l
4073
- } = he(), a = O(() => c === Ie ? `${t} ${r}` : `${t} ${s}`, [c]);
4100
+ retryCountRef: d
4101
+ } = he(), i = O(() => c === Ie ? `${t} ${r}` : `${t} ${s}`, [c]);
4074
4102
  return /* @__PURE__ */ n.jsx(
4075
4103
  "div",
4076
4104
  {
@@ -4081,20 +4109,20 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4081
4109
  height: "100%"
4082
4110
  },
4083
4111
  children: /* @__PURE__ */ n.jsx(
4084
- Pt,
4112
+ ns,
4085
4113
  {
4086
4114
  ...c === Ie ? {
4087
4115
  status: "warning"
4088
4116
  } : {
4089
4117
  icon: null
4090
4118
  },
4091
- title: a,
4119
+ title: i,
4092
4120
  extra: c === Ie ? /* @__PURE__ */ n.jsx(
4093
4121
  z,
4094
4122
  {
4095
4123
  type: "primary",
4096
4124
  onClick: () => {
4097
- l.current = 0, o(0), d();
4125
+ d.current = 0, o(0), a();
4098
4126
  },
4099
4127
  children: e
4100
4128
  },
@@ -4112,15 +4140,15 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4112
4140
  )
4113
4141
  }
4114
4142
  );
4115
- }, To = R(Eo), yo = () => {
4116
- const { setTicketId: e, ticketId: t, openFilter: r } = ve(), { onSendMsg: s, setGetResponse: d } = he(), { showReadyWSHD: c } = K();
4143
+ }, jo = R(yo), wo = () => {
4144
+ const { setTicketId: e, ticketId: t, openFilter: r } = ve(), { onSendMsg: s, setGetResponse: a } = he(), { showReadyWSHD: c } = q();
4117
4145
  return c ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
4118
4146
  /* @__PURE__ */ n.jsx(
4119
- bo,
4147
+ ho,
4120
4148
  {
4121
4149
  visible: t,
4122
4150
  onClose: () => {
4123
- e(""), d(!1), s({
4151
+ e(""), a(!1), s({
4124
4152
  event: "LEAVE_ROOM",
4125
4153
  data: {
4126
4154
  TASK_ID: t
@@ -4129,22 +4157,22 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4129
4157
  }
4130
4158
  }
4131
4159
  ),
4132
- /* @__PURE__ */ n.jsx("div", { style: { display: !t && !r ? "block" : "none" }, children: /* @__PURE__ */ n.jsx(Fr, {}) }),
4133
- /* @__PURE__ */ n.jsx(ho, {})
4134
- ] }) : /* @__PURE__ */ n.jsx(To, {});
4135
- }, jo = R(yo), wo = ({ children: e, usePopover: t, ...r }) => t ? /* @__PURE__ */ n.jsx(vn, { ...r, visible: r == null ? void 0 : r.open, children: e }) : e, _o = () => {
4136
- const e = p("NeedHelp", "Need Help"), t = p(
4160
+ /* @__PURE__ */ n.jsx("div", { style: { display: !t && !r ? "block" : "none" }, children: /* @__PURE__ */ n.jsx(Ir, {}) }),
4161
+ /* @__PURE__ */ n.jsx(To, {})
4162
+ ] }) : /* @__PURE__ */ n.jsx(jo, {});
4163
+ }, ko = R(wo), po = ({ children: e, usePopover: t, ...r }) => t ? /* @__PURE__ */ n.jsx(hn, { ...r, visible: r == null ? void 0 : r.open, children: e }) : e, _o = () => {
4164
+ const e = _("NeedHelp", "Need Help"), t = _(
4137
4165
  "WidgetDisconnected",
4138
4166
  "Widget Disconnected"
4139
- ), [r, s] = D(!0), d = Y(), { widgetProps: c, setOpenWidget: o, isFirstOpenWidget: l, setFirstOpenWidget: a } = K(), { onSendMsg: u, connected: f, isHandshakeWidget: x } = fe(), g = () => {
4167
+ ), [r, s] = D(!0), a = K(), { widgetProps: c, setOpenWidget: o, isFirstOpenWidget: d, setFirstOpenWidget: i } = q(), { onSendMsg: u, connected: f, isHandshakeWidget: x } = fe(), g = () => {
4140
4168
  o(!0), u({ msg: c == null ? void 0 : c.getStartedPayload });
4141
4169
  };
4142
4170
  return X(() => {
4143
- s(!f), window.clearTimeout(d.current), d.current = setTimeout(() => {
4171
+ s(!f), window.clearTimeout(a.current), a.current = setTimeout(() => {
4144
4172
  s(!1);
4145
4173
  }, 3e3);
4146
4174
  }, [f]), /* @__PURE__ */ n.jsx(
4147
- wo,
4175
+ po,
4148
4176
  {
4149
4177
  usePopover: r && x === "show",
4150
4178
  open: r && x === "show",
@@ -4155,7 +4183,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4155
4183
  {
4156
4184
  className: "w-launcher-container",
4157
4185
  onClick: () => {
4158
- l || (a(!0), g()), o(!0);
4186
+ d || (i(!0), g()), o(!0);
4159
4187
  },
4160
4188
  children: [
4161
4189
  /* @__PURE__ */ n.jsx(P, { type: "chat-bubble" }),
@@ -4177,20 +4205,20 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4177
4205
  )
4178
4206
  }
4179
4207
  );
4180
- }, ko = R(_o), po = () => {
4181
- const e = p("NotConnected", "Not Connected"), t = p(
4208
+ }, Ao = R(_o), So = () => {
4209
+ const e = _("NotConnected", "Not Connected"), t = _(
4182
4210
  "CannotAutoReconnect",
4183
4211
  "Cannot auto reconnect"
4184
- ), r = p(
4212
+ ), r = _(
4185
4213
  "ReconnectManually",
4186
4214
  "Reconnect Manually"
4187
- ), [s, d] = D(!1), { connected: c, createSocket: o } = fe(), { widgetProps: l } = K();
4215
+ ), [s, a] = D(!1), { connected: c, createSocket: o } = fe(), { widgetProps: d } = q();
4188
4216
  return X(() => {
4189
- d(!c);
4217
+ a(!c);
4190
4218
  }, [c]), /* @__PURE__ */ n.jsx(
4191
- Et,
4219
+ yt,
4192
4220
  {
4193
- title: `${l == null ? void 0 : l.title} ${e}`,
4221
+ title: `${d == null ? void 0 : d.title} ${e}`,
4194
4222
  subTitle: /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
4195
4223
  /* @__PURE__ */ n.jsxs(V.Text, { children: [
4196
4224
  t,
@@ -4208,51 +4236,51 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4208
4236
  }
4209
4237
  )
4210
4238
  ] }),
4211
- onClose: () => d(!1),
4239
+ onClose: () => a(!1),
4212
4240
  open: !c && s
4213
4241
  }
4214
4242
  );
4215
- }, Ao = R(
4216
- po
4217
- ), So = () => {
4218
- const { xs: e } = Ce.useBreakpoint(), [t, r] = D(!1), { isOpenWidget: s, widgetProps: d } = K(), { isActiveTabVA: c } = be(), o = Y(null), l = O(() => {
4243
+ }, Lo = R(
4244
+ So
4245
+ ), Ro = () => {
4246
+ const { xs: e } = Ce.useBreakpoint(), [t, r] = D(!1), { isOpenWidget: s, widgetProps: a } = q(), { isActiveTabVA: c } = be(), o = K(null), d = O(() => {
4219
4247
  var f;
4220
4248
  const u = [un];
4221
- return e && (d != null && d.isSF ? u == null || u.push(`${un}-sf-mobile`) : u == null || u.push(`${un}-mobile`)), (f = u == null ? void 0 : u.filter(Boolean)) == null ? void 0 : f.join(" ");
4222
- }, [e, d == null ? void 0 : d.isSF]), a = Gt(
4249
+ return e && (a != null && a.isSF ? u == null || u.push(`${un}-sf-mobile`) : u == null || u.push(`${un}-mobile`)), (f = u == null ? void 0 : u.filter(Boolean)) == null ? void 0 : f.join(" ");
4250
+ }, [e, a == null ? void 0 : a.isSF]), i = Yt(
4223
4251
  (u) => {
4224
4252
  var x;
4225
4253
  const f = [u, xn == null ? void 0 : xn.FADE_IN];
4226
- return d != null && d.isSF && (f == null || f.push(`${u}-sf`)), e && (d != null && d.isSF ? f == null || f.push(`${u}-sf-mobile`) : f == null || f.push(`${u}-mobile`)), (x = f == null ? void 0 : f.filter(Boolean)) == null ? void 0 : x.join(" ");
4254
+ return a != null && a.isSF && (f == null || f.push(`${u}-sf`)), e && (a != null && a.isSF ? f == null || f.push(`${u}-sf-mobile`) : f == null || f.push(`${u}-mobile`)), (x = f == null ? void 0 : f.filter(Boolean)) == null ? void 0 : x.join(" ");
4227
4255
  },
4228
- [d == null ? void 0 : d.isSF, e]
4256
+ [a == null ? void 0 : a.isSF, e]
4229
4257
  );
4230
4258
  return X(() => {
4231
4259
  s && r(s), clearTimeout(o.current), o.current = setTimeout(() => {
4232
4260
  s || r(s);
4233
4261
  }, 250);
4234
- }, [s]), t ? /* @__PURE__ */ n.jsxs("div", { className: l, children: [
4262
+ }, [s]), t ? /* @__PURE__ */ n.jsxs("div", { className: d, children: [
4235
4263
  /* @__PURE__ */ n.jsxs("div", { style: { display: c ? "block" : "none" }, children: [
4236
- /* @__PURE__ */ n.jsx("div", { className: a(vs), children: /* @__PURE__ */ n.jsx(_r, {}) }),
4237
- /* @__PURE__ */ n.jsx(pr, {})
4264
+ /* @__PURE__ */ n.jsx("div", { className: i(Es), children: /* @__PURE__ */ n.jsx(_r, {}) }),
4265
+ /* @__PURE__ */ n.jsx(Sr, {})
4238
4266
  ] }),
4239
- /* @__PURE__ */ n.jsx("div", { style: { display: c ? "none" : "block" }, children: /* @__PURE__ */ n.jsx("div", { className: a(hs), children: /* @__PURE__ */ n.jsx(Nr, { children: /* @__PURE__ */ n.jsx(Rr, { children: /* @__PURE__ */ n.jsx(jo, {}) }) }) }) }),
4240
- /* @__PURE__ */ n.jsx(Ao, {})
4241
- ] }) : /* @__PURE__ */ n.jsx(ko, {});
4242
- }, Lo = R(So), Ro = ({ items: e, ...t }) => Le != null && Le.startsWith("5") || Re != null && Re.startsWith("18") ? /* @__PURE__ */ n.jsx(cn, { ...t, items: e }) : /* @__PURE__ */ n.jsx(cn, { ...t, children: e == null ? void 0 : e.map(({ ...r }) => /* @__PURE__ */ bn(
4267
+ /* @__PURE__ */ n.jsx("div", { style: { display: c ? "none" : "block" }, children: /* @__PURE__ */ n.jsx("div", { className: i(Ts), children: /* @__PURE__ */ n.jsx(Fr, { children: /* @__PURE__ */ n.jsx(Dr, { children: /* @__PURE__ */ n.jsx(ko, {}) }) }) }) }),
4268
+ /* @__PURE__ */ n.jsx(Lo, {})
4269
+ ] }) : /* @__PURE__ */ n.jsx(Ao, {});
4270
+ }, Oo = R(Ro), Do = ({ items: e, ...t }) => Le != null && Le.startsWith("5") || Re != null && Re.startsWith("18") ? /* @__PURE__ */ n.jsx(cn, { ...t, items: e }) : /* @__PURE__ */ n.jsx(cn, { ...t, children: e == null ? void 0 : e.map(({ ...r }) => /* @__PURE__ */ vn(
4243
4271
  cn.TabPane,
4244
4272
  {
4245
4273
  ...r,
4246
4274
  key: r == null ? void 0 : r.key,
4247
4275
  tab: r == null ? void 0 : r.label
4248
4276
  }
4249
- )) }), Oo = R(Ro), Do = () => {
4250
- const { isOpenWidget: e } = K(), { setActiveTab: t, activeTab: r } = be(), s = p(
4277
+ )) }), No = R(Do), Mo = () => {
4278
+ const { isOpenWidget: e } = q(), { setActiveTab: t, activeTab: r } = be(), s = _(
4251
4279
  "VirtualAssistant",
4252
4280
  "Virtual Assistant"
4253
- ), d = p("Helpdesk", "Helpdesk"), { xs: c } = Ce.useBreakpoint();
4281
+ ), a = _("Helpdesk", "Helpdesk"), { xs: c } = Ce.useBreakpoint();
4254
4282
  return X(() => {
4255
- const o = st();
4283
+ const o = ot();
4256
4284
  t((o == null ? void 0 : o.activeTab) ?? r);
4257
4285
  }, []), e ? /* @__PURE__ */ n.jsx(
4258
4286
  "div",
@@ -4264,7 +4292,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4264
4292
  }
4265
4293
  },
4266
4294
  children: /* @__PURE__ */ n.jsx(
4267
- Oo,
4295
+ No,
4268
4296
  {
4269
4297
  activeKey: r,
4270
4298
  onChange: (o) => {
@@ -4278,7 +4306,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4278
4306
  key: "va"
4279
4307
  },
4280
4308
  {
4281
- label: d,
4309
+ label: a,
4282
4310
  key: "helpdesk"
4283
4311
  }
4284
4312
  ]
@@ -4286,8 +4314,8 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4286
4314
  )
4287
4315
  }
4288
4316
  ) : null;
4289
- }, No = R(Do), Mo = () => {
4290
- const { isOpenWidget: e, setOpenWidget: t, setExpand: r, isExpand: s, widgetProps: d } = K(), { xs: c } = Ce.useBreakpoint();
4317
+ }, Fo = R(Mo), Ho = () => {
4318
+ const { isOpenWidget: e, setOpenWidget: t, setExpand: r, isExpand: s, widgetProps: a } = q(), { xs: c } = Ce.useBreakpoint();
4291
4319
  return e ? /* @__PURE__ */ n.jsxs(
4292
4320
  "div",
4293
4321
  {
@@ -4299,8 +4327,8 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4299
4327
  },
4300
4328
  children: [
4301
4329
  /* @__PURE__ */ n.jsxs("div", { className: `${He}-text`, children: [
4302
- /* @__PURE__ */ n.jsx("h4", { className: `${He}-title`, children: d == null ? void 0 : d.title }),
4303
- /* @__PURE__ */ n.jsx("span", { className: `${He}-subtitle`, children: d == null ? void 0 : d.subTitle })
4330
+ /* @__PURE__ */ n.jsx("h4", { className: `${He}-title`, children: a == null ? void 0 : a.title }),
4331
+ /* @__PURE__ */ n.jsx("span", { className: `${He}-subtitle`, children: a == null ? void 0 : a.subTitle })
4304
4332
  ] }),
4305
4333
  /* @__PURE__ */ n.jsxs("div", { className: `${He}-action`, children: [
4306
4334
  !c && /* @__PURE__ */ n.jsx(
@@ -4329,17 +4357,17 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4329
4357
  ]
4330
4358
  }
4331
4359
  ) : null;
4332
- }, Fo = R(Mo), Ho = () => {
4333
- const { isExpand: e, isOpenWidget: t, isFirstOpenWidget: r, setOpenWidget: s } = K(), { xs: d } = Ce.useBreakpoint(), c = O(() => {
4334
- var l;
4360
+ }, Io = R(Ho), $o = () => {
4361
+ const { isExpand: e, isOpenWidget: t, isFirstOpenWidget: r, setOpenWidget: s } = q(), { xs: a } = Ce.useBreakpoint(), c = O(() => {
4362
+ var d;
4335
4363
  const o = [
4336
- d && t && "w-container-widget-mobile",
4364
+ a && t && "w-container-widget-mobile",
4337
4365
  r && (t ? "w-show-animate" : "w-close-animate"),
4338
4366
  "w-container-widget",
4339
4367
  e && "w-container-widget-expand"
4340
4368
  ];
4341
- return (l = o == null ? void 0 : o.filter(Boolean)) == null ? void 0 : l.join(" ");
4342
- }, [e, d, r, t]);
4369
+ return (d = o == null ? void 0 : o.filter(Boolean)) == null ? void 0 : d.join(" ");
4370
+ }, [e, a, r, t]);
4343
4371
  return /* @__PURE__ */ n.jsxs(
4344
4372
  "div",
4345
4373
  {
@@ -4349,39 +4377,39 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4349
4377
  },
4350
4378
  tabIndex: 0,
4351
4379
  children: [
4352
- /* @__PURE__ */ n.jsx(Fo, {}),
4353
- /* @__PURE__ */ n.jsx("div", { id: "w-widget-content", children: /* @__PURE__ */ n.jsxs(nr, { children: [
4354
- /* @__PURE__ */ n.jsx(Rs, { children: /* @__PURE__ */ n.jsx(Lo, {}) }),
4355
- /* @__PURE__ */ n.jsx(No, {})
4380
+ /* @__PURE__ */ n.jsx(Io, {}),
4381
+ /* @__PURE__ */ n.jsx("div", { id: "w-widget-content", children: /* @__PURE__ */ n.jsxs(sr, { children: [
4382
+ /* @__PURE__ */ n.jsx(Ds, { children: /* @__PURE__ */ n.jsx(Oo, {}) }),
4383
+ /* @__PURE__ */ n.jsx(Fo, {})
4356
4384
  ] }) })
4357
4385
  ]
4358
4386
  }
4359
4387
  );
4360
- }, Io = R(Ho), Zo = ({
4388
+ }, Bo = R($o), Po = ({
4361
4389
  getStartedPayload: e,
4362
4390
  socketURL: t,
4363
4391
  socketPath: r,
4364
4392
  onPayslipFn: s,
4365
- title: d,
4393
+ title: a,
4366
4394
  subTitle: c,
4367
4395
  keyEncrypt: o,
4368
- history: l,
4369
- isSF: a = !1
4396
+ history: d,
4397
+ isSF: i = !1
4370
4398
  }) => /* @__PURE__ */ n.jsx(
4371
- As,
4399
+ Ls,
4372
4400
  {
4373
4401
  getStartedPayload: e,
4374
4402
  socketURL: t,
4375
4403
  socketPath: r,
4376
4404
  onPayslipFn: s,
4377
- title: d,
4405
+ title: a,
4378
4406
  subTitle: c,
4379
4407
  keyEncrypt: o,
4380
- history: l,
4381
- isSF: a,
4382
- children: /* @__PURE__ */ n.jsx(Ls, { children: /* @__PURE__ */ n.jsx(Io, {}) })
4408
+ history: d,
4409
+ isSF: i,
4410
+ children: /* @__PURE__ */ n.jsx(Os, { children: /* @__PURE__ */ n.jsx(Bo, {}) })
4383
4411
  }
4384
4412
  );
4385
4413
  export {
4386
- Zo as default
4414
+ Po as default
4387
4415
  };