widget-chatbot 2.0.0-alpha.8 → 2.0.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/widget-chatbot.css +1 -1
- package/dist/widget-chatbot.es.js +1356 -1327
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import mn, { version as Bt, createContext as Te, useContext as ye, useState as D, useRef as z, useMemo as R, useEffect as Z, memo as O, Children as Ut, isValidElement as Wt, cloneElement as Vt, Fragment as gn, createElement as bn, useCallback as Gt } from "react";
|
|
2
2
|
import Re from "axios";
|
|
3
3
|
import le from "dayjs";
|
|
4
|
-
import { version as
|
|
4
|
+
import { version as zt, Modal as Bn, Typography as Y, Button as G, Form as oe, notification as Ce, Radio as Yt, Divider as Kt, Input as Be, Image as qt, Skeleton as de, Avatar as Qn, Upload as Zn, Tooltip as Se, Tag as Jt, Badge as Qt, Grid as ge, Empty as Xn, Popover as vn, Mentions as Un, Select as Wn, DatePicker as Zt, Result as Xt, Tabs as cn } from "antd";
|
|
5
5
|
import { io as Pt } from "socket.io-client";
|
|
6
6
|
import es from "react-markdown";
|
|
7
7
|
import ns from "remark-gfm";
|
|
@@ -9,29 +9,29 @@ import { Prism as ts } from "react-syntax-highlighter";
|
|
|
9
9
|
import ss from "@ant-design/icons";
|
|
10
10
|
import { Pie as rs } from "@ant-design/charts";
|
|
11
11
|
import pe from "crypto-js";
|
|
12
|
-
import os from "
|
|
12
|
+
import { Picker as os } from "emoji-mart";
|
|
13
13
|
var Je = { exports: {} }, _e = {};
|
|
14
14
|
/*
|
|
15
15
|
object-assign
|
|
16
16
|
(c) Sindre Sorhus
|
|
17
17
|
@license MIT
|
|
18
18
|
*/
|
|
19
|
-
var ln,
|
|
19
|
+
var ln, Vn;
|
|
20
20
|
function Pn() {
|
|
21
|
-
if (
|
|
22
|
-
|
|
21
|
+
if (Vn) return ln;
|
|
22
|
+
Vn = 1;
|
|
23
23
|
var e = Object.getOwnPropertySymbols, t = Object.prototype.hasOwnProperty, s = Object.prototype.propertyIsEnumerable;
|
|
24
|
-
function r(
|
|
25
|
-
if (
|
|
24
|
+
function r(c) {
|
|
25
|
+
if (c == null)
|
|
26
26
|
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
27
|
-
return Object(
|
|
27
|
+
return Object(c);
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function i() {
|
|
30
30
|
try {
|
|
31
31
|
if (!Object.assign)
|
|
32
32
|
return !1;
|
|
33
|
-
var
|
|
34
|
-
if (
|
|
33
|
+
var c = new String("abc");
|
|
34
|
+
if (c[5] = "de", Object.getOwnPropertyNames(c)[0] === "5")
|
|
35
35
|
return !1;
|
|
36
36
|
for (var o = {}, a = 0; a < 10; a++)
|
|
37
37
|
o["_" + String.fromCharCode(a)] = a;
|
|
@@ -48,15 +48,15 @@ function Pn() {
|
|
|
48
48
|
return !1;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
return ln =
|
|
52
|
-
for (var a, d = r(
|
|
51
|
+
return ln = i() ? Object.assign : function(c, o) {
|
|
52
|
+
for (var a, d = r(c), u, f = 1; f < arguments.length; f++) {
|
|
53
53
|
a = Object(arguments[f]);
|
|
54
|
-
for (var
|
|
55
|
-
t.call(a,
|
|
54
|
+
for (var x in a)
|
|
55
|
+
t.call(a, x) && (d[x] = a[x]);
|
|
56
56
|
if (e) {
|
|
57
57
|
u = e(a);
|
|
58
|
-
for (var
|
|
59
|
-
s.call(a, u[
|
|
58
|
+
for (var g = 0; g < u.length; g++)
|
|
59
|
+
s.call(a, u[g]) && (d[u[g]] = a[u[g]]);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
return d;
|
|
@@ -70,22 +70,22 @@ 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
|
|
73
|
+
var Gn;
|
|
74
74
|
function cs() {
|
|
75
|
-
if (
|
|
76
|
-
|
|
77
|
-
var e =
|
|
75
|
+
if (Gn) return _e;
|
|
76
|
+
Gn = 1, Pn();
|
|
77
|
+
var e = mn, t = 60103;
|
|
78
78
|
if (_e.Fragment = 60107, typeof Symbol == "function" && Symbol.for) {
|
|
79
79
|
var s = Symbol.for;
|
|
80
80
|
t = s("react.element"), _e.Fragment = s("react.fragment");
|
|
81
81
|
}
|
|
82
|
-
var r = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,
|
|
82
|
+
var r = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = Object.prototype.hasOwnProperty, c = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
83
83
|
function o(a, d, u) {
|
|
84
|
-
var f,
|
|
85
|
-
u !== void 0 && (
|
|
86
|
-
for (f in d)
|
|
87
|
-
if (a && a.defaultProps) for (f in d = a.defaultProps, d)
|
|
88
|
-
return { $$typeof: t, type: a, key:
|
|
84
|
+
var f, x = {}, g = null, b = null;
|
|
85
|
+
u !== void 0 && (g = "" + u), d.key !== void 0 && (g = "" + d.key), d.ref !== void 0 && (b = d.ref);
|
|
86
|
+
for (f in d) i.call(d, f) && !c.hasOwnProperty(f) && (x[f] = d[f]);
|
|
87
|
+
if (a && a.defaultProps) for (f in d = a.defaultProps, d) x[f] === void 0 && (x[f] = d[f]);
|
|
88
|
+
return { $$typeof: t, type: a, key: g, ref: b, props: x, _owner: r.current };
|
|
89
89
|
}
|
|
90
90
|
return _e.jsx = o, _e.jsxs = o, _e;
|
|
91
91
|
}
|
|
@@ -102,88 +102,88 @@ var zn;
|
|
|
102
102
|
function is() {
|
|
103
103
|
return zn || (zn = 1, function(e) {
|
|
104
104
|
process.env.NODE_ENV !== "production" && function() {
|
|
105
|
-
var t =
|
|
105
|
+
var t = mn, s = Pn(), r = 60103, i = 60106;
|
|
106
106
|
e.Fragment = 60107;
|
|
107
|
-
var
|
|
107
|
+
var c = 60108, o = 60114, a = 60109, d = 60110, u = 60112, f = 60113, x = 60120, g = 60115, b = 60116, y = 60121, w = 60122, A = 60117, p = 60129, E = 60131;
|
|
108
108
|
if (typeof Symbol == "function" && Symbol.for) {
|
|
109
|
-
var
|
|
110
|
-
r =
|
|
109
|
+
var h = Symbol.for;
|
|
110
|
+
r = h("react.element"), i = h("react.portal"), e.Fragment = h("react.fragment"), c = h("react.strict_mode"), o = h("react.profiler"), a = h("react.provider"), d = h("react.context"), u = h("react.forward_ref"), f = h("react.suspense"), x = h("react.suspense_list"), g = h("react.memo"), b = h("react.lazy"), y = h("react.block"), w = h("react.server.block"), A = h("react.fundamental"), h("react.scope"), h("react.opaque.id"), p = h("react.debug_trace_mode"), h("react.offscreen"), E = h("react.legacy_hidden");
|
|
111
111
|
}
|
|
112
|
-
var
|
|
113
|
-
function
|
|
114
|
-
if (
|
|
112
|
+
var m = typeof Symbol == "function" && Symbol.iterator, v = "@@iterator";
|
|
113
|
+
function C(l) {
|
|
114
|
+
if (l === null || typeof l != "object")
|
|
115
115
|
return null;
|
|
116
|
-
var T =
|
|
116
|
+
var T = m && l[m] || l[v];
|
|
117
117
|
return typeof T == "function" ? T : null;
|
|
118
118
|
}
|
|
119
|
-
var
|
|
120
|
-
function
|
|
119
|
+
var j = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
120
|
+
function S(l) {
|
|
121
121
|
{
|
|
122
|
-
for (var T = arguments.length,
|
|
123
|
-
|
|
124
|
-
|
|
122
|
+
for (var T = arguments.length, k = new Array(T > 1 ? T - 1 : 0), N = 1; N < T; N++)
|
|
123
|
+
k[N - 1] = arguments[N];
|
|
124
|
+
I("error", l, k);
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function I(l, T, k) {
|
|
128
128
|
{
|
|
129
|
-
var
|
|
130
|
-
|
|
131
|
-
var
|
|
132
|
-
return "" +
|
|
129
|
+
var N = j.ReactDebugCurrentFrame, J = N.getStackAddendum();
|
|
130
|
+
J !== "" && (T += "%s", k = k.concat([J]));
|
|
131
|
+
var K = k.map(function(W) {
|
|
132
|
+
return "" + W;
|
|
133
133
|
});
|
|
134
|
-
|
|
134
|
+
K.unshift("Warning: " + T), Function.prototype.apply.call(console[l], console, K);
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
var
|
|
138
|
-
function
|
|
139
|
-
return !!(typeof
|
|
137
|
+
var B = !1;
|
|
138
|
+
function M(l) {
|
|
139
|
+
return !!(typeof l == "string" || typeof l == "function" || l === e.Fragment || l === o || l === p || l === c || l === f || l === x || l === E || B || typeof l == "object" && l !== null && (l.$$typeof === b || l.$$typeof === g || l.$$typeof === a || l.$$typeof === d || l.$$typeof === u || l.$$typeof === A || l.$$typeof === y || l[0] === w));
|
|
140
140
|
}
|
|
141
|
-
function
|
|
142
|
-
var
|
|
143
|
-
return
|
|
141
|
+
function L(l, T, k) {
|
|
142
|
+
var N = T.displayName || T.name || "";
|
|
143
|
+
return l.displayName || (N !== "" ? k + "(" + N + ")" : k);
|
|
144
144
|
}
|
|
145
|
-
function
|
|
146
|
-
return
|
|
145
|
+
function F(l) {
|
|
146
|
+
return l.displayName || "Context";
|
|
147
147
|
}
|
|
148
|
-
function
|
|
149
|
-
if (
|
|
148
|
+
function $(l) {
|
|
149
|
+
if (l == null)
|
|
150
150
|
return null;
|
|
151
|
-
if (typeof
|
|
152
|
-
return
|
|
153
|
-
if (typeof
|
|
154
|
-
return
|
|
155
|
-
switch (
|
|
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
|
|
158
|
+
case i:
|
|
159
159
|
return "Portal";
|
|
160
160
|
case o:
|
|
161
161
|
return "Profiler";
|
|
162
|
-
case
|
|
162
|
+
case c:
|
|
163
163
|
return "StrictMode";
|
|
164
164
|
case f:
|
|
165
165
|
return "Suspense";
|
|
166
|
-
case
|
|
166
|
+
case x:
|
|
167
167
|
return "SuspenseList";
|
|
168
168
|
}
|
|
169
|
-
if (typeof
|
|
170
|
-
switch (
|
|
169
|
+
if (typeof l == "object")
|
|
170
|
+
switch (l.$$typeof) {
|
|
171
171
|
case d:
|
|
172
|
-
var T =
|
|
173
|
-
return
|
|
172
|
+
var T = l;
|
|
173
|
+
return F(T) + ".Consumer";
|
|
174
174
|
case a:
|
|
175
|
-
var
|
|
176
|
-
return
|
|
175
|
+
var k = l;
|
|
176
|
+
return F(k._context) + ".Provider";
|
|
177
177
|
case u:
|
|
178
|
-
return
|
|
179
|
-
case
|
|
180
|
-
return
|
|
181
|
-
case
|
|
182
|
-
return
|
|
183
|
-
case
|
|
184
|
-
var
|
|
178
|
+
return L(l, l.render, "ForwardRef");
|
|
179
|
+
case g:
|
|
180
|
+
return $(l.type);
|
|
181
|
+
case y:
|
|
182
|
+
return $(l._render);
|
|
183
|
+
case b: {
|
|
184
|
+
var N = l, J = N._payload, K = N._init;
|
|
185
185
|
try {
|
|
186
|
-
return
|
|
186
|
+
return $(K(J));
|
|
187
187
|
} catch {
|
|
188
188
|
return null;
|
|
189
189
|
}
|
|
@@ -191,465 +191,465 @@ function is() {
|
|
|
191
191
|
}
|
|
192
192
|
return null;
|
|
193
193
|
}
|
|
194
|
-
var
|
|
194
|
+
var H = 0, V, Q, X, se, ee, ae, ce;
|
|
195
195
|
function Ne() {
|
|
196
196
|
}
|
|
197
197
|
Ne.__reactDisabledLog = !0;
|
|
198
198
|
function Ve() {
|
|
199
199
|
{
|
|
200
|
-
if (
|
|
201
|
-
|
|
202
|
-
var
|
|
200
|
+
if (H === 0) {
|
|
201
|
+
V = console.log, Q = console.info, X = console.warn, se = console.error, ee = console.group, ae = 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:
|
|
210
|
-
log:
|
|
211
|
-
warn:
|
|
212
|
-
error:
|
|
213
|
-
group:
|
|
214
|
-
groupCollapsed:
|
|
215
|
-
groupEnd:
|
|
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
|
-
|
|
218
|
+
H++;
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
|
-
function
|
|
221
|
+
function Ge() {
|
|
222
222
|
{
|
|
223
|
-
if (
|
|
224
|
-
var
|
|
223
|
+
if (H--, H === 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: s({},
|
|
231
|
-
value:
|
|
230
|
+
log: s({}, l, {
|
|
231
|
+
value: V
|
|
232
232
|
}),
|
|
233
|
-
info: s({},
|
|
234
|
-
value:
|
|
233
|
+
info: s({}, l, {
|
|
234
|
+
value: Q
|
|
235
235
|
}),
|
|
236
|
-
warn: s({},
|
|
237
|
-
value:
|
|
236
|
+
warn: s({}, l, {
|
|
237
|
+
value: X
|
|
238
238
|
}),
|
|
239
|
-
error: s({},
|
|
239
|
+
error: s({}, l, {
|
|
240
240
|
value: se
|
|
241
241
|
}),
|
|
242
|
-
group: s({},
|
|
242
|
+
group: s({}, l, {
|
|
243
243
|
value: ee
|
|
244
244
|
}),
|
|
245
|
-
groupCollapsed: s({},
|
|
245
|
+
groupCollapsed: s({}, l, {
|
|
246
246
|
value: ae
|
|
247
247
|
}),
|
|
248
|
-
groupEnd: s({},
|
|
248
|
+
groupEnd: s({}, l, {
|
|
249
249
|
value: ce
|
|
250
250
|
})
|
|
251
251
|
});
|
|
252
252
|
}
|
|
253
|
-
|
|
253
|
+
H < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
|
-
var Me =
|
|
257
|
-
function
|
|
256
|
+
var Me = j.ReactCurrentDispatcher, Fe;
|
|
257
|
+
function ze(l, T, k) {
|
|
258
258
|
{
|
|
259
259
|
if (Fe === void 0)
|
|
260
260
|
try {
|
|
261
261
|
throw Error();
|
|
262
|
-
} catch (
|
|
263
|
-
var
|
|
264
|
-
Fe =
|
|
262
|
+
} catch (J) {
|
|
263
|
+
var N = J.stack.trim().match(/\n( *(at )?)/);
|
|
264
|
+
Fe = N && N[1] || "";
|
|
265
265
|
}
|
|
266
266
|
return `
|
|
267
|
-
` + Fe +
|
|
267
|
+
` + Fe + l;
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
|
-
var nn = !1,
|
|
270
|
+
var nn = !1, Ye;
|
|
271
271
|
{
|
|
272
|
-
var
|
|
273
|
-
|
|
272
|
+
var Tt = typeof WeakMap == "function" ? WeakMap : Map;
|
|
273
|
+
Ye = new Tt();
|
|
274
274
|
}
|
|
275
|
-
function
|
|
276
|
-
if (!
|
|
275
|
+
function _n(l, T) {
|
|
276
|
+
if (!l || nn)
|
|
277
277
|
return "";
|
|
278
278
|
{
|
|
279
|
-
var
|
|
280
|
-
if (
|
|
281
|
-
return
|
|
279
|
+
var k = Ye.get(l);
|
|
280
|
+
if (k !== void 0)
|
|
281
|
+
return k;
|
|
282
282
|
}
|
|
283
|
-
var
|
|
283
|
+
var N;
|
|
284
284
|
nn = !0;
|
|
285
|
-
var
|
|
285
|
+
var J = Error.prepareStackTrace;
|
|
286
286
|
Error.prepareStackTrace = void 0;
|
|
287
|
-
var
|
|
288
|
-
|
|
287
|
+
var K;
|
|
288
|
+
K = Me.current, Me.current = null, Ve();
|
|
289
289
|
try {
|
|
290
290
|
if (T) {
|
|
291
|
-
var
|
|
291
|
+
var W = function() {
|
|
292
292
|
throw Error();
|
|
293
293
|
};
|
|
294
|
-
if (Object.defineProperty(
|
|
294
|
+
if (Object.defineProperty(W.prototype, "props", {
|
|
295
295
|
set: function() {
|
|
296
296
|
throw Error();
|
|
297
297
|
}
|
|
298
298
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
299
299
|
try {
|
|
300
|
-
Reflect.construct(
|
|
300
|
+
Reflect.construct(W, []);
|
|
301
301
|
} catch (xe) {
|
|
302
|
-
|
|
302
|
+
N = xe;
|
|
303
303
|
}
|
|
304
|
-
Reflect.construct(
|
|
304
|
+
Reflect.construct(l, [], W);
|
|
305
305
|
} else {
|
|
306
306
|
try {
|
|
307
|
-
|
|
307
|
+
W.call();
|
|
308
308
|
} catch (xe) {
|
|
309
|
-
|
|
309
|
+
N = xe;
|
|
310
310
|
}
|
|
311
|
-
|
|
311
|
+
l.call(W.prototype);
|
|
312
312
|
}
|
|
313
313
|
} else {
|
|
314
314
|
try {
|
|
315
315
|
throw Error();
|
|
316
316
|
} catch (xe) {
|
|
317
|
-
|
|
317
|
+
N = xe;
|
|
318
318
|
}
|
|
319
|
-
|
|
319
|
+
l();
|
|
320
320
|
}
|
|
321
321
|
} catch (xe) {
|
|
322
|
-
if (xe &&
|
|
323
|
-
for (var
|
|
324
|
-
`), re =
|
|
325
|
-
`), ne =
|
|
322
|
+
if (xe && N && typeof xe.stack == "string") {
|
|
323
|
+
for (var U = xe.stack.split(`
|
|
324
|
+
`), re = N.stack.split(`
|
|
325
|
+
`), ne = U.length - 1, te = re.length - 1; ne >= 1 && te >= 0 && U[ne] !== re[te]; )
|
|
326
326
|
te--;
|
|
327
327
|
for (; ne >= 1 && te >= 0; ne--, te--)
|
|
328
|
-
if (
|
|
328
|
+
if (U[ne] !== re[te]) {
|
|
329
329
|
if (ne !== 1 || te !== 1)
|
|
330
330
|
do
|
|
331
|
-
if (ne--, te--, te < 0 ||
|
|
331
|
+
if (ne--, te--, te < 0 || U[ne] !== re[te]) {
|
|
332
332
|
var fe = `
|
|
333
|
-
` +
|
|
334
|
-
return typeof
|
|
333
|
+
` + U[ne].replace(" at new ", " at ");
|
|
334
|
+
return typeof l == "function" && Ye.set(l, fe), fe;
|
|
335
335
|
}
|
|
336
336
|
while (ne >= 1 && te >= 0);
|
|
337
337
|
break;
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
340
|
} finally {
|
|
341
|
-
nn = !1, Me.current =
|
|
341
|
+
nn = !1, Me.current = K, Ge(), Error.prepareStackTrace = J;
|
|
342
342
|
}
|
|
343
|
-
var we =
|
|
344
|
-
return typeof
|
|
343
|
+
var we = l ? l.displayName || l.name : "", $n = we ? ze(we) : "";
|
|
344
|
+
return typeof l == "function" && Ye.set(l, $n), $n;
|
|
345
345
|
}
|
|
346
|
-
function
|
|
347
|
-
return
|
|
346
|
+
function kn(l, T, k) {
|
|
347
|
+
return _n(l, !1);
|
|
348
348
|
}
|
|
349
|
-
function yt(
|
|
350
|
-
var T =
|
|
349
|
+
function yt(l) {
|
|
350
|
+
var T = l.prototype;
|
|
351
351
|
return !!(T && T.isReactComponent);
|
|
352
352
|
}
|
|
353
|
-
function Ke(
|
|
354
|
-
if (
|
|
353
|
+
function Ke(l, T, k) {
|
|
354
|
+
if (l == null)
|
|
355
355
|
return "";
|
|
356
|
-
if (typeof
|
|
357
|
-
return
|
|
358
|
-
if (typeof
|
|
359
|
-
return
|
|
360
|
-
switch (
|
|
356
|
+
if (typeof l == "function")
|
|
357
|
+
return _n(l, yt(l));
|
|
358
|
+
if (typeof l == "string")
|
|
359
|
+
return ze(l);
|
|
360
|
+
switch (l) {
|
|
361
361
|
case f:
|
|
362
|
-
return
|
|
363
|
-
case
|
|
364
|
-
return
|
|
362
|
+
return ze("Suspense");
|
|
363
|
+
case x:
|
|
364
|
+
return ze("SuspenseList");
|
|
365
365
|
}
|
|
366
|
-
if (typeof
|
|
367
|
-
switch (
|
|
366
|
+
if (typeof l == "object")
|
|
367
|
+
switch (l.$$typeof) {
|
|
368
368
|
case u:
|
|
369
|
-
return
|
|
370
|
-
case
|
|
371
|
-
return Ke(
|
|
372
|
-
case
|
|
373
|
-
return
|
|
374
|
-
case
|
|
375
|
-
var
|
|
369
|
+
return kn(l.render);
|
|
370
|
+
case g:
|
|
371
|
+
return Ke(l.type, T, k);
|
|
372
|
+
case y:
|
|
373
|
+
return kn(l._render);
|
|
374
|
+
case b: {
|
|
375
|
+
var N = l, J = N._payload, K = N._init;
|
|
376
376
|
try {
|
|
377
|
-
return Ke(
|
|
377
|
+
return Ke(K(J), T, k);
|
|
378
378
|
} catch {
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
382
|
return "";
|
|
383
383
|
}
|
|
384
|
-
var
|
|
385
|
-
function qe(
|
|
386
|
-
if (
|
|
387
|
-
var T =
|
|
388
|
-
|
|
384
|
+
var An = {}, Sn = j.ReactDebugCurrentFrame;
|
|
385
|
+
function qe(l) {
|
|
386
|
+
if (l) {
|
|
387
|
+
var T = l._owner, k = Ke(l.type, l._source, T ? T.type : null);
|
|
388
|
+
Sn.setExtraStackFrame(k);
|
|
389
389
|
} else
|
|
390
|
-
|
|
390
|
+
Sn.setExtraStackFrame(null);
|
|
391
391
|
}
|
|
392
|
-
function jt(
|
|
392
|
+
function jt(l, T, k, N, J) {
|
|
393
393
|
{
|
|
394
|
-
var
|
|
395
|
-
for (var
|
|
396
|
-
if (
|
|
397
|
-
var
|
|
394
|
+
var K = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
395
|
+
for (var W in l)
|
|
396
|
+
if (K(l, W)) {
|
|
397
|
+
var U = void 0;
|
|
398
398
|
try {
|
|
399
|
-
if (typeof
|
|
400
|
-
var re = Error((
|
|
399
|
+
if (typeof l[W] != "function") {
|
|
400
|
+
var re = Error((N || "React class") + ": " + k + " 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
|
-
|
|
403
|
+
U = l[W](T, W, N, k, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
404
404
|
} catch (ne) {
|
|
405
|
-
|
|
405
|
+
U = ne;
|
|
406
406
|
}
|
|
407
|
-
|
|
407
|
+
U && !(U instanceof Error) && (qe(J), 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", k, W, typeof U), qe(null)), U instanceof Error && !(U.message in An) && (An[U.message] = !0, qe(J), S("Failed %s type: %s", k, U.message), qe(null));
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
|
-
var
|
|
411
|
+
var Ln = j.ReactCurrentOwner, tn = Object.prototype.hasOwnProperty, wt = {
|
|
412
412
|
key: !0,
|
|
413
413
|
ref: !0,
|
|
414
414
|
__self: !0,
|
|
415
415
|
__source: !0
|
|
416
|
-
},
|
|
417
|
-
function pt(
|
|
418
|
-
if (tn.call(
|
|
419
|
-
var T = Object.getOwnPropertyDescriptor(
|
|
416
|
+
}, On, Rn;
|
|
417
|
+
function pt(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
|
|
423
|
+
return l.ref !== void 0;
|
|
424
424
|
}
|
|
425
|
-
function _t(
|
|
426
|
-
if (tn.call(
|
|
427
|
-
var T = Object.getOwnPropertyDescriptor(
|
|
425
|
+
function _t(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
|
|
431
|
+
return l.key !== void 0;
|
|
432
432
|
}
|
|
433
|
-
function kt(
|
|
434
|
-
typeof
|
|
433
|
+
function kt(l, T) {
|
|
434
|
+
typeof l.ref == "string" && Ln.current;
|
|
435
435
|
}
|
|
436
|
-
function At(
|
|
436
|
+
function At(l, T) {
|
|
437
437
|
{
|
|
438
|
-
var
|
|
439
|
-
|
|
438
|
+
var k = function() {
|
|
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
|
-
|
|
442
|
-
get:
|
|
441
|
+
k.isReactWarning = !0, Object.defineProperty(l, "key", {
|
|
442
|
+
get: k,
|
|
443
443
|
configurable: !0
|
|
444
444
|
});
|
|
445
445
|
}
|
|
446
446
|
}
|
|
447
|
-
function St(
|
|
447
|
+
function St(l, T) {
|
|
448
448
|
{
|
|
449
|
-
var
|
|
450
|
-
|
|
449
|
+
var k = function() {
|
|
450
|
+
Rn || (Rn = !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
|
-
|
|
453
|
-
get:
|
|
452
|
+
k.isReactWarning = !0, Object.defineProperty(l, "ref", {
|
|
453
|
+
get: k,
|
|
454
454
|
configurable: !0
|
|
455
455
|
});
|
|
456
456
|
}
|
|
457
457
|
}
|
|
458
|
-
var Lt = function(
|
|
459
|
-
var
|
|
458
|
+
var Lt = function(l, T, k, N, J, K, W) {
|
|
459
|
+
var U = {
|
|
460
460
|
// This tag allows us to uniquely identify this as a React Element
|
|
461
461
|
$$typeof: r,
|
|
462
462
|
// Built-in properties that belong on the element
|
|
463
|
-
type:
|
|
463
|
+
type: l,
|
|
464
464
|
key: T,
|
|
465
|
-
ref:
|
|
466
|
-
props:
|
|
465
|
+
ref: k,
|
|
466
|
+
props: W,
|
|
467
467
|
// Record the component responsible for creating this element.
|
|
468
|
-
_owner:
|
|
468
|
+
_owner: K
|
|
469
469
|
};
|
|
470
|
-
return
|
|
470
|
+
return U._store = {}, Object.defineProperty(U._store, "validated", {
|
|
471
471
|
configurable: !1,
|
|
472
472
|
enumerable: !1,
|
|
473
473
|
writable: !0,
|
|
474
474
|
value: !1
|
|
475
|
-
}), Object.defineProperty(
|
|
475
|
+
}), Object.defineProperty(U, "_self", {
|
|
476
476
|
configurable: !1,
|
|
477
477
|
enumerable: !1,
|
|
478
478
|
writable: !1,
|
|
479
|
-
value:
|
|
480
|
-
}), Object.defineProperty(
|
|
479
|
+
value: N
|
|
480
|
+
}), Object.defineProperty(U, "_source", {
|
|
481
481
|
configurable: !1,
|
|
482
482
|
enumerable: !1,
|
|
483
483
|
writable: !1,
|
|
484
|
-
value:
|
|
485
|
-
}), Object.freeze && (Object.freeze(
|
|
484
|
+
value: J
|
|
485
|
+
}), Object.freeze && (Object.freeze(U.props), Object.freeze(U)), U;
|
|
486
486
|
};
|
|
487
|
-
function Ot(
|
|
487
|
+
function Ot(l, T, k, N, J) {
|
|
488
488
|
{
|
|
489
|
-
var
|
|
490
|
-
|
|
491
|
-
for (
|
|
492
|
-
tn.call(T,
|
|
493
|
-
if (
|
|
494
|
-
var ne =
|
|
495
|
-
for (
|
|
496
|
-
|
|
489
|
+
var K, W = {}, U = null, re = null;
|
|
490
|
+
k !== void 0 && (U = "" + k), _t(T) && (U = "" + T.key), pt(T) && (re = T.ref, kt(T, J));
|
|
491
|
+
for (K in T)
|
|
492
|
+
tn.call(T, K) && !wt.hasOwnProperty(K) && (W[K] = T[K]);
|
|
493
|
+
if (l && l.defaultProps) {
|
|
494
|
+
var ne = l.defaultProps;
|
|
495
|
+
for (K in ne)
|
|
496
|
+
W[K] === void 0 && (W[K] = ne[K]);
|
|
497
497
|
}
|
|
498
|
-
if (
|
|
499
|
-
var te = typeof
|
|
500
|
-
|
|
498
|
+
if (U || re) {
|
|
499
|
+
var te = typeof l == "function" ? l.displayName || l.name || "Unknown" : l;
|
|
500
|
+
U && At(W, te), re && St(W, te);
|
|
501
501
|
}
|
|
502
|
-
return Lt(
|
|
502
|
+
return Lt(l, U, re, J, N, Ln.current, W);
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
|
-
var sn =
|
|
506
|
-
function je(
|
|
507
|
-
if (
|
|
508
|
-
var T =
|
|
509
|
-
|
|
505
|
+
var sn = j.ReactCurrentOwner, Dn = j.ReactDebugCurrentFrame;
|
|
506
|
+
function je(l) {
|
|
507
|
+
if (l) {
|
|
508
|
+
var T = l._owner, k = Ke(l.type, l._source, T ? T.type : null);
|
|
509
|
+
Dn.setExtraStackFrame(k);
|
|
510
510
|
} else
|
|
511
|
-
|
|
511
|
+
Dn.setExtraStackFrame(null);
|
|
512
512
|
}
|
|
513
513
|
var rn;
|
|
514
514
|
rn = !1;
|
|
515
|
-
function on(
|
|
516
|
-
return typeof
|
|
515
|
+
function on(l) {
|
|
516
|
+
return typeof l == "object" && l !== null && l.$$typeof === r;
|
|
517
517
|
}
|
|
518
|
-
function
|
|
518
|
+
function Nn() {
|
|
519
519
|
{
|
|
520
520
|
if (sn.current) {
|
|
521
|
-
var
|
|
522
|
-
if (
|
|
521
|
+
var l = $(sn.current.type);
|
|
522
|
+
if (l)
|
|
523
523
|
return `
|
|
524
524
|
|
|
525
|
-
Check the render method of \`` +
|
|
525
|
+
Check the render method of \`` + l + "`.";
|
|
526
526
|
}
|
|
527
527
|
return "";
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
|
-
function Rt(
|
|
530
|
+
function Rt(l) {
|
|
531
531
|
return "";
|
|
532
532
|
}
|
|
533
|
-
var
|
|
534
|
-
function Dt(
|
|
533
|
+
var Mn = {};
|
|
534
|
+
function Dt(l) {
|
|
535
535
|
{
|
|
536
|
-
var T =
|
|
536
|
+
var T = Nn();
|
|
537
537
|
if (!T) {
|
|
538
|
-
var
|
|
539
|
-
|
|
538
|
+
var k = typeof l == "string" ? l : l.displayName || l.name;
|
|
539
|
+
k && (T = `
|
|
540
540
|
|
|
541
|
-
Check the top-level render call using <` +
|
|
541
|
+
Check the top-level render call using <` + k + ">.");
|
|
542
542
|
}
|
|
543
543
|
return T;
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
|
-
function
|
|
546
|
+
function Fn(l, T) {
|
|
547
547
|
{
|
|
548
|
-
if (!
|
|
548
|
+
if (!l._store || l._store.validated || l.key != null)
|
|
549
549
|
return;
|
|
550
|
-
|
|
551
|
-
var
|
|
552
|
-
if (
|
|
550
|
+
l._store.validated = !0;
|
|
551
|
+
var k = Dt(T);
|
|
552
|
+
if (Mn[k])
|
|
553
553
|
return;
|
|
554
|
-
|
|
555
|
-
var
|
|
556
|
-
|
|
554
|
+
Mn[k] = !0;
|
|
555
|
+
var N = "";
|
|
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.', k, N), je(null);
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
|
-
function
|
|
559
|
+
function Hn(l, T) {
|
|
560
560
|
{
|
|
561
|
-
if (typeof
|
|
561
|
+
if (typeof l != "object")
|
|
562
562
|
return;
|
|
563
|
-
if (Array.isArray(
|
|
564
|
-
for (var
|
|
565
|
-
var
|
|
566
|
-
on(
|
|
563
|
+
if (Array.isArray(l))
|
|
564
|
+
for (var k = 0; k < l.length; k++) {
|
|
565
|
+
var N = l[k];
|
|
566
|
+
on(N) && Fn(N, T);
|
|
567
567
|
}
|
|
568
|
-
else if (on(
|
|
569
|
-
|
|
570
|
-
else if (
|
|
571
|
-
var
|
|
572
|
-
if (typeof
|
|
573
|
-
for (var
|
|
574
|
-
on(
|
|
568
|
+
else if (on(l))
|
|
569
|
+
l._store && (l._store.validated = !0);
|
|
570
|
+
else if (l) {
|
|
571
|
+
var J = C(l);
|
|
572
|
+
if (typeof J == "function" && J !== l.entries)
|
|
573
|
+
for (var K = J.call(l), W; !(W = K.next()).done; )
|
|
574
|
+
on(W.value) && Fn(W.value, T);
|
|
575
575
|
}
|
|
576
576
|
}
|
|
577
577
|
}
|
|
578
|
-
function Nt(
|
|
578
|
+
function Nt(l) {
|
|
579
579
|
{
|
|
580
|
-
var T =
|
|
580
|
+
var T = l.type;
|
|
581
581
|
if (T == null || typeof T == "string")
|
|
582
582
|
return;
|
|
583
|
-
var
|
|
583
|
+
var k;
|
|
584
584
|
if (typeof T == "function")
|
|
585
|
-
|
|
585
|
+
k = T.propTypes;
|
|
586
586
|
else if (typeof T == "object" && (T.$$typeof === u || // Note: Memo only checks outer props here.
|
|
587
587
|
// Inner props are checked in the reconciler.
|
|
588
|
-
T.$$typeof ===
|
|
589
|
-
|
|
588
|
+
T.$$typeof === g))
|
|
589
|
+
k = T.propTypes;
|
|
590
590
|
else
|
|
591
591
|
return;
|
|
592
|
-
if (
|
|
593
|
-
var
|
|
594
|
-
jt(
|
|
592
|
+
if (k) {
|
|
593
|
+
var N = $(T);
|
|
594
|
+
jt(k, l.props, "prop", N, l);
|
|
595
595
|
} else if (T.PropTypes !== void 0 && !rn) {
|
|
596
596
|
rn = !0;
|
|
597
|
-
var
|
|
598
|
-
|
|
597
|
+
var J = $(T);
|
|
598
|
+
S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", J || "Unknown");
|
|
599
599
|
}
|
|
600
|
-
typeof T.getDefaultProps == "function" && !T.getDefaultProps.isReactClassApproved &&
|
|
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(
|
|
603
|
+
function Mt(l) {
|
|
604
604
|
{
|
|
605
|
-
for (var T = Object.keys(
|
|
606
|
-
var
|
|
607
|
-
if (
|
|
608
|
-
je(
|
|
605
|
+
for (var T = Object.keys(l.props), k = 0; k < T.length; k++) {
|
|
606
|
+
var N = T[k];
|
|
607
|
+
if (N !== "children" && N !== "key") {
|
|
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
|
-
|
|
612
|
+
l.ref !== null && (je(l), S("Invalid attribute `ref` supplied to `React.Fragment`."), je(null));
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
|
-
function
|
|
615
|
+
function In(l, T, k, N, J, K) {
|
|
616
616
|
{
|
|
617
|
-
var
|
|
618
|
-
if (
|
|
619
|
-
var
|
|
620
|
-
(
|
|
617
|
+
var W = M(l);
|
|
618
|
+
if (!W) {
|
|
619
|
+
var U = "";
|
|
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
621
|
var re = Rt();
|
|
622
|
-
re ?
|
|
622
|
+
re ? U += re : U += Nn();
|
|
623
623
|
var ne;
|
|
624
|
-
|
|
624
|
+
l === null ? ne = "null" : Array.isArray(l) ? ne = "array" : l !== void 0 && l.$$typeof === r ? (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 te = Ot(
|
|
626
|
+
var te = Ot(l, T, k, J, K);
|
|
627
627
|
if (te == null)
|
|
628
628
|
return te;
|
|
629
|
-
if (
|
|
629
|
+
if (W) {
|
|
630
630
|
var fe = T.children;
|
|
631
631
|
if (fe !== void 0)
|
|
632
|
-
if (
|
|
632
|
+
if (N)
|
|
633
633
|
if (Array.isArray(fe)) {
|
|
634
634
|
for (var we = 0; we < fe.length; we++)
|
|
635
|
-
|
|
635
|
+
Hn(fe[we], l);
|
|
636
636
|
Object.freeze && Object.freeze(fe);
|
|
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
|
-
|
|
640
|
+
Hn(fe, l);
|
|
641
641
|
}
|
|
642
|
-
return
|
|
642
|
+
return l === e.Fragment ? Mt(te) : Nt(te), te;
|
|
643
643
|
}
|
|
644
644
|
}
|
|
645
|
-
function Ft(
|
|
646
|
-
return
|
|
645
|
+
function Ft(l, T, k) {
|
|
646
|
+
return In(l, T, k, !0);
|
|
647
647
|
}
|
|
648
|
-
function Ht(
|
|
649
|
-
return
|
|
648
|
+
function Ht(l, T, k) {
|
|
649
|
+
return In(l, T, k, !1);
|
|
650
650
|
}
|
|
651
|
-
var
|
|
652
|
-
e.jsx =
|
|
651
|
+
var It = Ht, $t = Ft;
|
|
652
|
+
e.jsx = It, e.jsxs = $t;
|
|
653
653
|
}();
|
|
654
654
|
}(an)), an;
|
|
655
655
|
}
|
|
@@ -658,7 +658,7 @@ function ls() {
|
|
|
658
658
|
return Yn || (Yn = 1, process.env.NODE_ENV === "production" ? Je.exports = cs() : Je.exports = is()), Je.exports;
|
|
659
659
|
}
|
|
660
660
|
var n = ls();
|
|
661
|
-
const as = "2.0.0-alpha.
|
|
661
|
+
const as = "2.0.0-alpha.8", et = "chat_session", ds = "user_uttered", us = "bot_uttered", fs = "ehelp_bot_uttered", xs = "https://sfchatbot.dataon.com", gs = [
|
|
662
662
|
{
|
|
663
663
|
label: "Didn’t address my question",
|
|
664
664
|
value: "Didn’t address my question"
|
|
@@ -679,7 +679,7 @@ const as = "2.0.0-alpha.7", et = "chat_session", ds = "user_uttered", us = "bot_
|
|
|
679
679
|
label: "I’d like to explain further",
|
|
680
680
|
value: "another"
|
|
681
681
|
}
|
|
682
|
-
], Le =
|
|
682
|
+
], Le = zt, Oe = Bt, Cs = as, ms = "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 = [
|
|
683
683
|
// Raster (bitmap)
|
|
684
684
|
".jpg",
|
|
685
685
|
".jpeg",
|
|
@@ -703,7 +703,7 @@ const as = "2.0.0-alpha.7", et = "chat_session", ds = "user_uttered", us = "bot_
|
|
|
703
703
|
".xcf"
|
|
704
704
|
], un = "w-widget-content-container", fn = "w-ticket-detail-content-container", bs = "w-wrapper-body", vs = "w-wrapper-body-helpdesk", He = "w-header", xn = {
|
|
705
705
|
FADE_IN: "w-fade-in-animate"
|
|
706
|
-
},
|
|
706
|
+
}, hs = "https://placehold.co/600x400?text=No+Image", Ie = 3, Es = "GoHRDev2025WorkPlazeDataOnDotCom", ke = "(Helpdesk Widget Chatbot)", Ts = (e) => JSON.parse((e == null ? void 0 : e.replaceAll("/get_started", "")) || "{}"), nt = (e) => {
|
|
707
707
|
var t;
|
|
708
708
|
try {
|
|
709
709
|
return (t = new URL(e)) == null ? void 0 : t.host;
|
|
@@ -711,8 +711,8 @@ const as = "2.0.0-alpha.7", et = "chat_session", ds = "user_uttered", us = "bot_
|
|
|
711
711
|
return nt(xs);
|
|
712
712
|
}
|
|
713
713
|
}, ie = (e, t) => {
|
|
714
|
-
var s, r,
|
|
715
|
-
return ((s = Object.keys(e || {})) == null ? void 0 : s.length) > 0 ? (
|
|
714
|
+
var s, r, i;
|
|
715
|
+
return ((s = Object.keys(e || {})) == null ? void 0 : s.length) > 0 ? (i = (r = Object == null ? void 0 : Object.prototype) == null ? void 0 : r.hasOwnProperty) == null ? void 0 : i.call(e, t) : !1;
|
|
716
716
|
}, Ae = (e) => {
|
|
717
717
|
var s;
|
|
718
718
|
const t = e == null ? void 0 : e.attachment;
|
|
@@ -724,53 +724,53 @@ const as = "2.0.0-alpha.7", et = "chat_session", ds = "user_uttered", us = "bot_
|
|
|
724
724
|
chart: (t == null ? void 0 : t.type) === "charts" && ie(t, "chartType")
|
|
725
725
|
};
|
|
726
726
|
}, tt = (e) => {
|
|
727
|
-
var t, s, r,
|
|
727
|
+
var t, s, r, i;
|
|
728
728
|
if (e) {
|
|
729
|
-
const
|
|
730
|
-
(
|
|
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, "/"), a = decodeURIComponent(
|
|
730
|
+
(i = (r = (s = window == null ? void 0 : window.atob(o)) == null ? void 0 : s.split("")) == null ? void 0 : r.map((d) => "%" + ("00" + d.charCodeAt(0).toString(16)).slice(-2))) == null ? void 0 : i.join("")
|
|
731
731
|
);
|
|
732
732
|
return JSON == null ? void 0 : JSON.parse(a || "{}");
|
|
733
733
|
}
|
|
734
734
|
return {};
|
|
735
|
-
},
|
|
735
|
+
}, En = ({
|
|
736
736
|
downloadURL: e = "",
|
|
737
737
|
fileName: t = "",
|
|
738
738
|
isOpenNewTab: s = !1
|
|
739
739
|
}) => {
|
|
740
|
-
var
|
|
740
|
+
var i;
|
|
741
741
|
const r = document == null ? void 0 : document.createElement("a");
|
|
742
|
-
r.href = e, r.download = t || e, s && (r.target = "_blank"), (
|
|
742
|
+
r.href = e, r.download = t || e, s && (r.target = "_blank"), (i = document == null ? void 0 : document.body) == null || i.appendChild(r), r.click(), document.body.removeChild(r);
|
|
743
743
|
}, ys = () => "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
|
-
}),
|
|
746
|
+
}), Tn = ({
|
|
747
747
|
ArrObj: e,
|
|
748
748
|
key: t,
|
|
749
749
|
ignoreCaseSensitive: s = !1
|
|
750
750
|
}) => (e == null ? void 0 : e.length) > 0 ? [
|
|
751
751
|
...new Map(
|
|
752
752
|
e.map((r) => {
|
|
753
|
-
var
|
|
753
|
+
var i;
|
|
754
754
|
return [
|
|
755
|
-
s ? (
|
|
755
|
+
s ? (i = String(r[t])) == null ? void 0 : i.toLowerCase() : r[t],
|
|
756
756
|
r
|
|
757
757
|
];
|
|
758
758
|
})
|
|
759
759
|
).values()
|
|
760
760
|
] : [], js = (e = []) => {
|
|
761
761
|
const t = {}, s = [], r = [];
|
|
762
|
-
e == null || e.forEach((
|
|
762
|
+
e == null || e.forEach((c) => {
|
|
763
763
|
var o;
|
|
764
|
-
ie(
|
|
764
|
+
ie(c, "chats") ? (o = c == null ? void 0 : c.chats) == null || o.forEach((a) => {
|
|
765
765
|
r == null || r.push(a);
|
|
766
|
-
}) : r == null || r.push(
|
|
767
|
-
}), r == null || r.forEach((
|
|
766
|
+
}) : r == null || r.push(c);
|
|
767
|
+
}), r == null || r.forEach((c, o) => {
|
|
768
768
|
var d, u, f;
|
|
769
|
-
const a =
|
|
769
|
+
const a = c == null ? void 0 : c.generated_id;
|
|
770
770
|
a ? (t[a] || (t[a] = []), (u = t[a]) == null || u.push({
|
|
771
|
-
...
|
|
771
|
+
...c,
|
|
772
772
|
indexChat: o,
|
|
773
|
-
...!(
|
|
773
|
+
...!(c != null && c.timestamp) && {
|
|
774
774
|
timestamp: (d = le()) == null ? void 0 : d.format("hh:mm A")
|
|
775
775
|
}
|
|
776
776
|
}), s == null || s.push({
|
|
@@ -782,17 +782,17 @@ const as = "2.0.0-alpha.7", et = "chat_session", ds = "user_uttered", us = "bot_
|
|
|
782
782
|
},
|
|
783
783
|
chats: t == null ? void 0 : t[a]
|
|
784
784
|
})) : s == null || s.push({
|
|
785
|
-
...
|
|
785
|
+
...c,
|
|
786
786
|
keyItem: o,
|
|
787
|
-
...!(
|
|
787
|
+
...!(c != null && c.timestamp) && {
|
|
788
788
|
timestamp: (f = le()) == null ? void 0 : f.format("hh:mm A")
|
|
789
789
|
}
|
|
790
790
|
});
|
|
791
791
|
});
|
|
792
|
-
const
|
|
793
|
-
return
|
|
794
|
-
|
|
795
|
-
}),
|
|
792
|
+
const i = Tn({ ArrObj: s, key: "keyItem" });
|
|
793
|
+
return i == null || i.forEach((c) => {
|
|
794
|
+
c == null || delete c.keyItem;
|
|
795
|
+
}), i;
|
|
796
796
|
}, Pe = (e = {}) => {
|
|
797
797
|
const s = {
|
|
798
798
|
...st(),
|
|
@@ -811,10 +811,10 @@ const as = "2.0.0-alpha.7", et = "chat_session", ds = "user_uttered", us = "bot_
|
|
|
811
811
|
return "wss";
|
|
812
812
|
}
|
|
813
813
|
};
|
|
814
|
-
let
|
|
815
|
-
const
|
|
814
|
+
let qn = null;
|
|
815
|
+
const me = (e = ".w-wrapper-body") => {
|
|
816
816
|
const t = document.querySelector(e);
|
|
817
|
-
clearTimeout(
|
|
817
|
+
clearTimeout(qn), qn = setTimeout(() => {
|
|
818
818
|
t && t.scrollTo({
|
|
819
819
|
top: t.scrollHeight,
|
|
820
820
|
behavior: "smooth"
|
|
@@ -828,35 +828,35 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
828
828
|
return btoa(s);
|
|
829
829
|
}, _s = async (e, t) => {
|
|
830
830
|
var d;
|
|
831
|
-
const s = typeof e == "object" ? JSON == null ? void 0 : JSON.stringify(e || {}) : e, r = new TextEncoder(),
|
|
832
|
-
if (
|
|
831
|
+
const s = typeof e == "object" ? JSON == null ? void 0 : JSON.stringify(e || {}) : e, r = new TextEncoder(), i = r == null ? void 0 : r.encode(s), c = r == null ? void 0 : r.encode(t);
|
|
832
|
+
if (c.length !== 32)
|
|
833
833
|
throw new Error("Key length must be 32 bytes for AES-256");
|
|
834
834
|
const o = await ((d = crypto == null ? void 0 : crypto.subtle) == null ? void 0 : d.importKey(
|
|
835
835
|
"raw",
|
|
836
|
-
|
|
836
|
+
c,
|
|
837
837
|
{ name: "AES-CBC" },
|
|
838
838
|
!1,
|
|
839
839
|
["encrypt"]
|
|
840
840
|
)), a = await crypto.subtle.encrypt(
|
|
841
841
|
{ name: "AES-CBC", iv: new Uint8Array(16) },
|
|
842
842
|
o,
|
|
843
|
-
|
|
843
|
+
i
|
|
844
844
|
);
|
|
845
845
|
return ps(a);
|
|
846
846
|
}, Qe = (e) => {
|
|
847
|
-
const t = {}, s = rt(e), r = s == null ? void 0 : s.map((
|
|
847
|
+
const t = {}, s = rt(e), r = s == null ? void 0 : s.map((i) => {
|
|
848
848
|
var o;
|
|
849
|
-
const
|
|
849
|
+
const c = i == null ? void 0 : i.CREATED_DATE;
|
|
850
850
|
return {
|
|
851
|
-
...
|
|
852
|
-
DATE_KEY: (o = le(
|
|
851
|
+
...i,
|
|
852
|
+
DATE_KEY: (o = le(c)) == null ? void 0 : o.format("YYYY-MM-DD")
|
|
853
853
|
};
|
|
854
854
|
});
|
|
855
|
-
return r == null || r.forEach((
|
|
856
|
-
var
|
|
857
|
-
t[
|
|
855
|
+
return r == null || r.forEach((i) => {
|
|
856
|
+
var c;
|
|
857
|
+
t[i == null ? void 0 : i.DATE_KEY] || (t[i == null ? void 0 : i.DATE_KEY] = []), (c = t[i == null ? void 0 : i.DATE_KEY]) == null || c.push(i);
|
|
858
858
|
}), t;
|
|
859
|
-
},
|
|
859
|
+
}, yn = (e) => {
|
|
860
860
|
var t;
|
|
861
861
|
return (t = Object.values(e || {})) == null ? void 0 : t.flat();
|
|
862
862
|
}, rt = (e) => e == null ? void 0 : e.sort((t, s) => le(t == null ? void 0 : t.CREATED_DATE) - le(s == null ? void 0 : s.CREATED_DATE)), ot = (e) => {
|
|
@@ -865,24 +865,24 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
865
865
|
return e == null ? void 0 : e.replaceAll(`.${s}`, `_avatar.${s}`);
|
|
866
866
|
}
|
|
867
867
|
return e;
|
|
868
|
-
},
|
|
868
|
+
}, jn = (e) => `https://ui-avatars.com/api/?background=e5e5e5&color=000${e && typeof e == "string" ? `&name=${e.replaceAll(" ", "+")}` : ""}`, ct = Te({}), q = () => ye(ct), ks = ({
|
|
869
869
|
children: e,
|
|
870
870
|
getStartedPayload: t,
|
|
871
871
|
socketURL: s,
|
|
872
872
|
socketPath: r,
|
|
873
|
-
onPayslipFn:
|
|
874
|
-
title:
|
|
873
|
+
onPayslipFn: i,
|
|
874
|
+
title: c,
|
|
875
875
|
subTitle: o,
|
|
876
876
|
keyEncrypt: a,
|
|
877
877
|
history: d,
|
|
878
878
|
isSF: u
|
|
879
879
|
}) => {
|
|
880
|
-
const [f,
|
|
880
|
+
const [f, x] = D(!1), [g, b] = D("va"), [y, w] = D(!1), [A, p] = D({}), [E, h] = D(!1), [m, v] = D(!1), C = z(!1), j = R(() => ({
|
|
881
881
|
getStartedPayload: t,
|
|
882
882
|
socketURL: s,
|
|
883
883
|
socketPath: r,
|
|
884
|
-
onPayslipFn:
|
|
885
|
-
title:
|
|
884
|
+
onPayslipFn: i,
|
|
885
|
+
title: c,
|
|
886
886
|
subTitle: o,
|
|
887
887
|
keyEncrypt: a,
|
|
888
888
|
isSF: u
|
|
@@ -890,15 +890,15 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
890
890
|
t,
|
|
891
891
|
s,
|
|
892
892
|
r,
|
|
893
|
+
i,
|
|
893
894
|
c,
|
|
894
|
-
l,
|
|
895
895
|
o,
|
|
896
896
|
a,
|
|
897
897
|
u
|
|
898
|
-
]),
|
|
899
|
-
return
|
|
900
|
-
|
|
901
|
-
}, [t]),
|
|
898
|
+
]), S = R(() => tt(A == null ? void 0 : A.access_token), [A == null ? void 0 : A.access_token]);
|
|
899
|
+
return Z(() => {
|
|
900
|
+
p(Ts(t));
|
|
901
|
+
}, [t]), Z(() => {
|
|
902
902
|
Pe({
|
|
903
903
|
chatbot_version: Cs
|
|
904
904
|
});
|
|
@@ -906,28 +906,28 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
906
906
|
ct.Provider,
|
|
907
907
|
{
|
|
908
908
|
value: {
|
|
909
|
-
objInitPayload:
|
|
910
|
-
setOpenWidget:
|
|
909
|
+
objInitPayload: A,
|
|
910
|
+
setOpenWidget: x,
|
|
911
911
|
isOpenWidget: f,
|
|
912
|
-
activeTab:
|
|
913
|
-
setActiveTab:
|
|
914
|
-
isExpand:
|
|
915
|
-
setExpand:
|
|
916
|
-
setObjInitPayload:
|
|
917
|
-
parsedJWT:
|
|
918
|
-
widgetProps:
|
|
919
|
-
isFirstOpenWidget:
|
|
920
|
-
setFirstOpenWidget:
|
|
921
|
-
isFirstRenderHelpdesk:
|
|
912
|
+
activeTab: g,
|
|
913
|
+
setActiveTab: b,
|
|
914
|
+
isExpand: y,
|
|
915
|
+
setExpand: w,
|
|
916
|
+
setObjInitPayload: p,
|
|
917
|
+
parsedJWT: S,
|
|
918
|
+
widgetProps: j,
|
|
919
|
+
isFirstOpenWidget: E,
|
|
920
|
+
setFirstOpenWidget: h,
|
|
921
|
+
isFirstRenderHelpdesk: C,
|
|
922
922
|
history: d,
|
|
923
|
-
showReadyWSHD:
|
|
924
|
-
setShowReadyWSHD:
|
|
923
|
+
showReadyWSHD: m,
|
|
924
|
+
setShowReadyWSHD: v
|
|
925
925
|
},
|
|
926
926
|
children: e
|
|
927
927
|
}
|
|
928
928
|
);
|
|
929
|
-
}, it =
|
|
930
|
-
const { objInitPayload: t } =
|
|
929
|
+
}, it = Te({}), As = () => ye(it), Ss = ({ children: e }) => {
|
|
930
|
+
const { objInitPayload: t } = q(), [s, r] = D({}), i = () => {
|
|
931
931
|
var o;
|
|
932
932
|
(o = Re(
|
|
933
933
|
`${(t == null ? void 0 : t.uriService) || ms}optional/translations`
|
|
@@ -935,140 +935,140 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
935
935
|
var d;
|
|
936
936
|
if (a) {
|
|
937
937
|
const u = Object.keys((d = Object.values(a)) == null ? void 0 : d[0]), f = {};
|
|
938
|
-
u == null || u.forEach((
|
|
939
|
-
var
|
|
940
|
-
(
|
|
941
|
-
var
|
|
942
|
-
f[
|
|
938
|
+
u == null || u.forEach((x) => {
|
|
939
|
+
var g;
|
|
940
|
+
(g = Object.keys(a)) == null || g.forEach((b) => {
|
|
941
|
+
var y;
|
|
942
|
+
f[x == null ? void 0 : x.toLowerCase()] = (y = a == null ? void 0 : a[b]) == null ? void 0 : y[x];
|
|
943
943
|
});
|
|
944
944
|
}), r(f);
|
|
945
945
|
}
|
|
946
946
|
});
|
|
947
|
-
},
|
|
947
|
+
}, c = () => {
|
|
948
948
|
const o = window.indexedDB.open("language");
|
|
949
949
|
o.onsuccess = (a) => {
|
|
950
950
|
var u;
|
|
951
951
|
const d = a.target.result;
|
|
952
952
|
try {
|
|
953
|
-
const
|
|
954
|
-
|
|
955
|
-
r(
|
|
956
|
-
},
|
|
957
|
-
|
|
953
|
+
const x = d.transaction("keyvaluepairs", "readonly").objectStore("keyvaluepairs"), g = x == null ? void 0 : x.get((u = t == null ? void 0 : t.lang) == null ? void 0 : u.toLowerCase());
|
|
954
|
+
g.onsuccess = () => {
|
|
955
|
+
r(g == null ? void 0 : g.result);
|
|
956
|
+
}, g.onerror = () => {
|
|
957
|
+
i();
|
|
958
958
|
};
|
|
959
959
|
} catch {
|
|
960
|
-
|
|
960
|
+
i();
|
|
961
961
|
}
|
|
962
962
|
}, o.onerror = () => {
|
|
963
|
-
|
|
963
|
+
i();
|
|
964
964
|
};
|
|
965
965
|
};
|
|
966
|
-
return
|
|
967
|
-
|
|
966
|
+
return Z(() => {
|
|
967
|
+
c();
|
|
968
968
|
}, [t == null ? void 0 : t.uriService, t == null ? void 0 : t.lang]), /* @__PURE__ */ n.jsx(it.Provider, { value: { langDatas: s }, children: e });
|
|
969
|
-
}, lt =
|
|
970
|
-
var
|
|
971
|
-
const [t, s] =
|
|
972
|
-
objInitPayload:
|
|
973
|
-
widgetProps:
|
|
974
|
-
setOpenWidget:
|
|
975
|
-
setFirstOpenWidget:
|
|
976
|
-
isFirstRenderHelpdesk:
|
|
977
|
-
} =
|
|
978
|
-
const
|
|
979
|
-
s((
|
|
980
|
-
const
|
|
981
|
-
|
|
969
|
+
}, lt = Te({}), ue = () => ye(lt), Ls = ({ children: e }) => {
|
|
970
|
+
var M;
|
|
971
|
+
const [t, s] = D([]), [r, i] = D(!1), [c, o] = D(!1), [a, d] = D({}), [u, f] = D(!1), [x, g] = D(!1), {
|
|
972
|
+
objInitPayload: b,
|
|
973
|
+
widgetProps: y,
|
|
974
|
+
setOpenWidget: w,
|
|
975
|
+
setFirstOpenWidget: A,
|
|
976
|
+
isFirstRenderHelpdesk: p
|
|
977
|
+
} = q(), E = z(null), h = z(""), m = z(""), v = (L) => {
|
|
978
|
+
const F = ie(L, "text_feedback_link") && ie(L, "text");
|
|
979
|
+
s(($) => {
|
|
980
|
+
const H = [
|
|
981
|
+
...$,
|
|
982
982
|
{
|
|
983
|
-
...
|
|
984
|
-
...
|
|
983
|
+
...L,
|
|
984
|
+
...F && {
|
|
985
985
|
type: "text"
|
|
986
986
|
},
|
|
987
987
|
sender: "response"
|
|
988
988
|
}
|
|
989
989
|
];
|
|
990
|
-
return js(
|
|
991
|
-
}),
|
|
992
|
-
},
|
|
993
|
-
var
|
|
994
|
-
(
|
|
995
|
-
|
|
996
|
-
session_id:
|
|
990
|
+
return js(H);
|
|
991
|
+
}), i(!1), o(!1), me();
|
|
992
|
+
}, C = () => {
|
|
993
|
+
var L, F, $, H;
|
|
994
|
+
(L = E == null ? void 0 : E.current) == null || L.emit("session_request", { session_id: null }), (F = E == null ? void 0 : E.current) == null || F.on("session_confirm", (V) => {
|
|
995
|
+
h.current = V, Pe({
|
|
996
|
+
session_id: V == null ? void 0 : V.session_id
|
|
997
997
|
});
|
|
998
|
-
}), (
|
|
999
|
-
const
|
|
1000
|
-
ie(
|
|
1001
|
-
}), u || f(!0),
|
|
1002
|
-
},
|
|
1003
|
-
msg:
|
|
1004
|
-
additionalConfig:
|
|
1005
|
-
isShowLoadingResponse:
|
|
998
|
+
}), ($ = E == null ? void 0 : E.current) == null || $.on(us, v), (H = E == null ? void 0 : E.current) == null || H.on(fs, (V) => {
|
|
999
|
+
const Q = JSON.parse(V || "{}");
|
|
1000
|
+
ie(Q, "iswidget") && g(Q == null ? void 0 : Q.iswidget);
|
|
1001
|
+
}), u || f(!0), A(!1);
|
|
1002
|
+
}, j = ({
|
|
1003
|
+
msg: L,
|
|
1004
|
+
additionalConfig: F = {},
|
|
1005
|
+
isShowLoadingResponse: $ = !0
|
|
1006
1006
|
}) => {
|
|
1007
|
-
var
|
|
1008
|
-
(
|
|
1007
|
+
var H;
|
|
1008
|
+
(H = E == null ? void 0 : E.current) == null || H.emit(ds, {
|
|
1009
1009
|
customData: {
|
|
1010
|
-
language:
|
|
1010
|
+
language: b == null ? void 0 : b.lang
|
|
1011
1011
|
},
|
|
1012
|
-
message:
|
|
1013
|
-
session_id:
|
|
1014
|
-
...
|
|
1015
|
-
}),
|
|
1016
|
-
},
|
|
1017
|
-
var
|
|
1018
|
-
|
|
1019
|
-
const
|
|
1020
|
-
`${ws(
|
|
1021
|
-
|
|
1012
|
+
message: L,
|
|
1013
|
+
session_id: h == null ? void 0 : h.current,
|
|
1014
|
+
...F
|
|
1015
|
+
}), $ ? i(!0) : o(!0);
|
|
1016
|
+
}, S = () => {
|
|
1017
|
+
var F, $;
|
|
1018
|
+
E.current && ((F = E == null ? void 0 : E.current) == null || F.off(), ($ = E == null ? void 0 : E.current) == null || $.disconnect(), E.current = null), p.current = !1;
|
|
1019
|
+
const L = Pt(
|
|
1020
|
+
`${ws(y == null ? void 0 : y.socketURL)}://${nt(
|
|
1021
|
+
y == null ? void 0 : y.socketURL
|
|
1022
1022
|
)}`,
|
|
1023
1023
|
{
|
|
1024
|
-
path:
|
|
1024
|
+
path: y == null ? void 0 : y.socketPath,
|
|
1025
1025
|
transports: ["websocket"],
|
|
1026
1026
|
reconnection: !0,
|
|
1027
1027
|
reconnectionAttempts: 1
|
|
1028
1028
|
}
|
|
1029
1029
|
);
|
|
1030
|
-
|
|
1030
|
+
L.on("connect", C), L.on("connect_error", (H) => {
|
|
1031
1031
|
console.error("connect_error widget-chatbot : ", {
|
|
1032
|
-
err:
|
|
1033
|
-
socketURL:
|
|
1034
|
-
socketPath:
|
|
1032
|
+
err: H,
|
|
1033
|
+
socketURL: y == null ? void 0 : y.socketURL,
|
|
1034
|
+
socketPath: y == null ? void 0 : y.widgetProps
|
|
1035
1035
|
}), f(!1);
|
|
1036
|
-
}),
|
|
1036
|
+
}), L.io.on("reconnect", () => {
|
|
1037
1037
|
console.error("reconnect widget-chatbot : ", {
|
|
1038
|
-
socketURL:
|
|
1039
|
-
socketPath:
|
|
1038
|
+
socketURL: y == null ? void 0 : y.socketURL,
|
|
1039
|
+
socketPath: y == null ? void 0 : y.widgetProps
|
|
1040
1040
|
}), f(!1);
|
|
1041
|
-
}),
|
|
1042
|
-
},
|
|
1043
|
-
var
|
|
1044
|
-
(!((
|
|
1045
|
-
},
|
|
1041
|
+
}), E.current = L;
|
|
1042
|
+
}, I = () => {
|
|
1043
|
+
var L;
|
|
1044
|
+
(!((L = E == null ? void 0 : E.current) != null && L.connected) || !u) && (S(), w(!1));
|
|
1045
|
+
}, B = () => {
|
|
1046
1046
|
f(!1);
|
|
1047
1047
|
};
|
|
1048
|
-
return
|
|
1049
|
-
var
|
|
1050
|
-
|
|
1048
|
+
return Z(() => (w(!1), S(), window.addEventListener("online", I), window.addEventListener("offline", B), () => {
|
|
1049
|
+
var L, F;
|
|
1050
|
+
E.current && ((L = E.current) == null || L.off("connect", C), (F = E.current) == null || F.disconnect(), E.current = null), window.removeEventListener("online", I), window.removeEventListener("offline", B);
|
|
1051
1051
|
}), [
|
|
1052
|
-
JSON.stringify(
|
|
1053
|
-
|
|
1054
|
-
|
|
1052
|
+
JSON.stringify(b || {}),
|
|
1053
|
+
y == null ? void 0 : y.socketURL,
|
|
1054
|
+
y == null ? void 0 : y.socketPath
|
|
1055
1055
|
]), /* @__PURE__ */ n.jsx(
|
|
1056
1056
|
lt.Provider,
|
|
1057
1057
|
{
|
|
1058
1058
|
value: {
|
|
1059
1059
|
setChats: s,
|
|
1060
1060
|
chats: t,
|
|
1061
|
-
onSendMsg:
|
|
1061
|
+
onSendMsg: j,
|
|
1062
1062
|
isWaitResponse: r,
|
|
1063
|
-
socket:
|
|
1064
|
-
sessionId: (
|
|
1065
|
-
loadingRegenerate:
|
|
1063
|
+
socket: E == null ? void 0 : E.current,
|
|
1064
|
+
sessionId: (M = h == null ? void 0 : h.current) == null ? void 0 : M.session_id,
|
|
1065
|
+
loadingRegenerate: c,
|
|
1066
1066
|
file: a,
|
|
1067
1067
|
setFile: d,
|
|
1068
1068
|
connected: u,
|
|
1069
|
-
isHandshakeWidget:
|
|
1070
|
-
createSocket:
|
|
1071
|
-
currRegenerateId:
|
|
1069
|
+
isHandshakeWidget: x,
|
|
1070
|
+
createSocket: S,
|
|
1071
|
+
currRegenerateId: m
|
|
1072
1072
|
},
|
|
1073
1073
|
children: e
|
|
1074
1074
|
}
|
|
@@ -1354,15 +1354,15 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
1354
1354
|
boxShadow: "inset 5px 0 0 #f7d87c",
|
|
1355
1355
|
zIndex: "0"
|
|
1356
1356
|
}
|
|
1357
|
-
}, Rs = (e) => e.replace(/[^a-zA-Z0-9_]/g, "").trim(),
|
|
1357
|
+
}, Rs = (e) => e.replace(/[^a-zA-Z0-9_]/g, "").trim(), _ = (e = "", t) => {
|
|
1358
1358
|
var o;
|
|
1359
|
-
const { langDatas: s } = As(), r = localStorage == null ? void 0 : localStorage.getItem("show_text_id"),
|
|
1360
|
-
return ((o = Object.keys(s || {})) == null ? void 0 : o.length) > 0 ? r ? `WPUI_${
|
|
1359
|
+
const { langDatas: s } = As(), r = localStorage == null ? void 0 : localStorage.getItem("show_text_id"), i = Rs(String(e)), c = (s == null ? void 0 : s[i == null ? void 0 : i.toUpperCase()]) || t;
|
|
1360
|
+
return ((o = Object.keys(s || {})) == null ? void 0 : o.length) > 0 ? r ? `WPUI_${i}` : c : t;
|
|
1361
1361
|
}, Ds = ({ isFeedback: e = !1, open: t, ...s }) => {
|
|
1362
|
-
var
|
|
1363
|
-
const r =
|
|
1362
|
+
var i;
|
|
1363
|
+
const r = R(() => e ? "w-modal-container-feedback" : "", [e]);
|
|
1364
1364
|
return Le != null && Le.startsWith("5") ? /* @__PURE__ */ n.jsx(
|
|
1365
|
-
|
|
1365
|
+
Bn,
|
|
1366
1366
|
{
|
|
1367
1367
|
rootClassName: r,
|
|
1368
1368
|
...s,
|
|
@@ -1384,7 +1384,7 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
1384
1384
|
) : (
|
|
1385
1385
|
// <div className={rootClassName}>
|
|
1386
1386
|
/* @__PURE__ */ n.jsx(
|
|
1387
|
-
|
|
1387
|
+
Bn,
|
|
1388
1388
|
{
|
|
1389
1389
|
getContainer: "#w-widget-content",
|
|
1390
1390
|
width: 300,
|
|
@@ -1394,7 +1394,7 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
1394
1394
|
} : { visible: t },
|
|
1395
1395
|
maskStyle: {
|
|
1396
1396
|
backdropFilter: "blur(4x)",
|
|
1397
|
-
...((
|
|
1397
|
+
...((i = Object.keys((s == null ? void 0 : s.maskStyle) || {})) == null ? void 0 : i.length) > 0 && {
|
|
1398
1398
|
...s == null ? void 0 : s.maskStyle
|
|
1399
1399
|
}
|
|
1400
1400
|
},
|
|
@@ -1407,10 +1407,10 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
1407
1407
|
}
|
|
1408
1408
|
)
|
|
1409
1409
|
);
|
|
1410
|
-
}, at =
|
|
1411
|
-
const s = (r,
|
|
1412
|
-
var
|
|
1413
|
-
return (
|
|
1410
|
+
}, at = O(Ds), Jn = ({ props: e, isModal: t = !1 }) => {
|
|
1411
|
+
const s = (r, i) => {
|
|
1412
|
+
var c;
|
|
1413
|
+
return (c = Ut) == null ? void 0 : c.map(r, (o) => {
|
|
1414
1414
|
var a, d, u;
|
|
1415
1415
|
return !Wt(o) || ((a = Object.keys((o == null ? void 0 : o.props) || {})) == null ? void 0 : a.length) === 0 ? o : Vt(o, {
|
|
1416
1416
|
...o == null ? void 0 : o.props,
|
|
@@ -1427,7 +1427,7 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
1427
1427
|
}
|
|
1428
1428
|
}
|
|
1429
1429
|
},
|
|
1430
|
-
...o.type === "tr" &&
|
|
1430
|
+
...o.type === "tr" && i === "tbody" && {
|
|
1431
1431
|
className: "ant-table-row"
|
|
1432
1432
|
},
|
|
1433
1433
|
...(o == null ? void 0 : o.type) === "tbody" && {
|
|
@@ -1450,12 +1450,12 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
1450
1450
|
}
|
|
1451
1451
|
) }) }) });
|
|
1452
1452
|
}, Ns = ({ children: e }) => {
|
|
1453
|
-
const t =
|
|
1453
|
+
const t = _(
|
|
1454
1454
|
"OpenDetailTable",
|
|
1455
1455
|
"Open Detail Table"
|
|
1456
|
-
), s =
|
|
1456
|
+
), s = _("TableDetail", "Tabel Detail"), [r, i] = D(!1), c = {
|
|
1457
1457
|
table: ({ ...o }) => /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
1458
|
-
/* @__PURE__ */ n.jsx(
|
|
1458
|
+
/* @__PURE__ */ n.jsx(Jn, { props: o }),
|
|
1459
1459
|
/* @__PURE__ */ n.jsx(
|
|
1460
1460
|
"div",
|
|
1461
1461
|
{
|
|
@@ -1465,10 +1465,10 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
1465
1465
|
padding: "5px 0px 10px 0px"
|
|
1466
1466
|
},
|
|
1467
1467
|
children: /* @__PURE__ */ n.jsx(
|
|
1468
|
-
|
|
1468
|
+
G,
|
|
1469
1469
|
{
|
|
1470
1470
|
onClick: () => {
|
|
1471
|
-
|
|
1471
|
+
i(!0);
|
|
1472
1472
|
},
|
|
1473
1473
|
children: t
|
|
1474
1474
|
}
|
|
@@ -1484,9 +1484,9 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
1484
1484
|
width: 800,
|
|
1485
1485
|
open: r,
|
|
1486
1486
|
onCancel: () => {
|
|
1487
|
-
|
|
1487
|
+
i(!1);
|
|
1488
1488
|
},
|
|
1489
|
-
children: /* @__PURE__ */ n.jsx(
|
|
1489
|
+
children: /* @__PURE__ */ n.jsx(Jn, { props: o, isModal: !0 })
|
|
1490
1490
|
}
|
|
1491
1491
|
)
|
|
1492
1492
|
] }),
|
|
@@ -1501,11 +1501,11 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
1501
1501
|
style: Os,
|
|
1502
1502
|
children: String(a).replace(/\n$/, "")
|
|
1503
1503
|
}
|
|
1504
|
-
) : /* @__PURE__ */ n.jsx(
|
|
1504
|
+
) : /* @__PURE__ */ n.jsx(Y.Text, { code: !0, children: o == null ? void 0 : o.children });
|
|
1505
1505
|
}
|
|
1506
1506
|
};
|
|
1507
|
-
return /* @__PURE__ */ n.jsx(es, { remarkPlugins: [ns], components:
|
|
1508
|
-
}, dt =
|
|
1507
|
+
return /* @__PURE__ */ n.jsx(es, { remarkPlugins: [ns], components: c, children: e });
|
|
1508
|
+
}, dt = O(Ns), Ms = () => /* @__PURE__ */ n.jsx(
|
|
1509
1509
|
"svg",
|
|
1510
1510
|
{
|
|
1511
1511
|
width: "24",
|
|
@@ -1554,7 +1554,7 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
1554
1554
|
/* @__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" })
|
|
1555
1555
|
]
|
|
1556
1556
|
}
|
|
1557
|
-
),
|
|
1557
|
+
), Is = () => /* @__PURE__ */ n.jsxs(
|
|
1558
1558
|
"svg",
|
|
1559
1559
|
{
|
|
1560
1560
|
viewBox: "-2.4 -2.4 28.80 28.80",
|
|
@@ -1581,7 +1581,7 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
1581
1581
|
) })
|
|
1582
1582
|
]
|
|
1583
1583
|
}
|
|
1584
|
-
),
|
|
1584
|
+
), $s = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "sync", className: "anticon anticon-sync", children: /* @__PURE__ */ n.jsx(
|
|
1585
1585
|
"svg",
|
|
1586
1586
|
{
|
|
1587
1587
|
viewBox: "64 64 896 896",
|
|
@@ -1668,7 +1668,7 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
1668
1668
|
)
|
|
1669
1669
|
]
|
|
1670
1670
|
}
|
|
1671
|
-
) }),
|
|
1671
|
+
) }), Gs = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "delete", className: "anticon anticon-delete", children: /* @__PURE__ */ n.jsx(
|
|
1672
1672
|
"svg",
|
|
1673
1673
|
{
|
|
1674
1674
|
viewBox: "64 64 896 896",
|
|
@@ -1679,7 +1679,7 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
1679
1679
|
"aria-hidden": "true",
|
|
1680
1680
|
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" })
|
|
1681
1681
|
}
|
|
1682
|
-
) }),
|
|
1682
|
+
) }), zs = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "close", className: "anticon anticon-close", children: /* @__PURE__ */ n.jsx(
|
|
1683
1683
|
"svg",
|
|
1684
1684
|
{
|
|
1685
1685
|
fillRule: "evenodd",
|
|
@@ -1692,7 +1692,7 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
1692
1692
|
"aria-hidden": "true",
|
|
1693
1693
|
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" })
|
|
1694
1694
|
}
|
|
1695
|
-
) }),
|
|
1695
|
+
) }), Ys = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "upload", className: "anticon anticon-upload", children: /* @__PURE__ */ n.jsx(
|
|
1696
1696
|
"svg",
|
|
1697
1697
|
{
|
|
1698
1698
|
viewBox: "64 64 896 896",
|
|
@@ -1782,7 +1782,7 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
1782
1782
|
"aria-hidden": "true",
|
|
1783
1783
|
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" })
|
|
1784
1784
|
}
|
|
1785
|
-
) }), Ps = ({ ...e }) => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "loading", ...e, children: /* @__PURE__ */ n.jsx(
|
|
1785
|
+
) }), Ps = ({ ...e }) => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "loading", ...e, className: "w-spin-animate", children: /* @__PURE__ */ n.jsx(
|
|
1786
1786
|
"svg",
|
|
1787
1787
|
{
|
|
1788
1788
|
viewBox: "0 0 1024 1024",
|
|
@@ -1795,19 +1795,19 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
1795
1795
|
children: /* @__PURE__ */ n.jsx("path", { d: "M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z" })
|
|
1796
1796
|
}
|
|
1797
1797
|
) }), P = ({ type: e = "", chatProps: t, ...s }) => {
|
|
1798
|
-
const r =
|
|
1798
|
+
const r = R(() => ({
|
|
1799
1799
|
minimize: Ms,
|
|
1800
1800
|
expand: Fs,
|
|
1801
1801
|
send: Hs,
|
|
1802
|
-
stop:
|
|
1803
|
-
sync:
|
|
1802
|
+
stop: Is,
|
|
1803
|
+
sync: $s,
|
|
1804
1804
|
left: Bs,
|
|
1805
1805
|
right: Us,
|
|
1806
1806
|
like: () => /* @__PURE__ */ n.jsx(Ws, { ...t }),
|
|
1807
1807
|
dislike: () => /* @__PURE__ */ n.jsx(Vs, { ...t }),
|
|
1808
|
-
delete:
|
|
1809
|
-
close:
|
|
1810
|
-
upload:
|
|
1808
|
+
delete: Gs,
|
|
1809
|
+
close: zs,
|
|
1810
|
+
upload: Ys,
|
|
1811
1811
|
filter: Ks,
|
|
1812
1812
|
down: qs,
|
|
1813
1813
|
"paper-clip": Js,
|
|
@@ -1815,10 +1815,10 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
1815
1815
|
smile: Zs,
|
|
1816
1816
|
file: Xs,
|
|
1817
1817
|
loading: () => /* @__PURE__ */ n.jsx(Ps, { ...s })
|
|
1818
|
-
}), [e, t]);
|
|
1818
|
+
}), [e, t, s]);
|
|
1819
1819
|
return /* @__PURE__ */ n.jsx(ss, { component: r == null ? void 0 : r[e], ...s });
|
|
1820
|
-
}, ut =
|
|
1821
|
-
const [t, s] =
|
|
1820
|
+
}, ut = Te({}), be = () => ye(ut), er = ({ children: e }) => {
|
|
1821
|
+
const [t, s] = D("va"), r = R(() => t === "va", [t]);
|
|
1822
1822
|
return /* @__PURE__ */ n.jsx(
|
|
1823
1823
|
ut.Provider,
|
|
1824
1824
|
{
|
|
@@ -1831,112 +1831,112 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
1831
1831
|
}
|
|
1832
1832
|
);
|
|
1833
1833
|
}, nr = ({ ...e }) => {
|
|
1834
|
-
const t =
|
|
1834
|
+
const t = _(
|
|
1835
1835
|
"WeLoveToHearAboutYourExperienceWithTheSunfishChatbot",
|
|
1836
1836
|
"We'd love to hear about your experience with the Sunfish chatbot"
|
|
1837
|
-
), s =
|
|
1837
|
+
), s = _(
|
|
1838
1838
|
"ShareAnyCommentsOrSuggestionsToHelpUsImprove",
|
|
1839
1839
|
"Share any comments or suggestions to help us improve"
|
|
1840
|
-
), r =
|
|
1840
|
+
), r = _("Submit", "Submit"), i = _(
|
|
1841
1841
|
"ThankFeedback",
|
|
1842
1842
|
"Thank You for your feedback"
|
|
1843
|
-
),
|
|
1843
|
+
), c = _(
|
|
1844
1844
|
"AdditionalFeedback",
|
|
1845
1845
|
"Additional Feedback"
|
|
1846
|
-
), [o] = oe.useForm(), [a, d] =
|
|
1847
|
-
var
|
|
1848
|
-
const
|
|
1849
|
-
return typeof (e == null ? void 0 : e.text_thumbsup_link) == "string" && ((
|
|
1850
|
-
}, [e]),
|
|
1851
|
-
var
|
|
1852
|
-
const
|
|
1853
|
-
return typeof (e == null ? void 0 : e.text_thumbsdown_link) == "string" && ((
|
|
1854
|
-
}, [e]),
|
|
1855
|
-
if (
|
|
1846
|
+
), [o] = oe.useForm(), [a, d] = D(!1), [u, f] = D(""), { setChats: x } = ue(), { objInitPayload: g } = q(), { activeTab: b } = be(), y = R(() => {
|
|
1847
|
+
var h;
|
|
1848
|
+
const E = ie(e, "feedback") ? (e == null ? void 0 : e.feedback) === "like" || (e == null ? void 0 : e.feedback) === "" : !0;
|
|
1849
|
+
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()) !== "" && E;
|
|
1850
|
+
}, [e]), w = R(() => {
|
|
1851
|
+
var h;
|
|
1852
|
+
const E = ie(e, "feedback") ? (e == null ? void 0 : e.feedback) === "dislike" || (e == null ? void 0 : e.feedback) === "" : !0;
|
|
1853
|
+
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()) !== "" && E;
|
|
1854
|
+
}, [e]), A = R(() => {
|
|
1855
|
+
if (g != null && g.uriBackend)
|
|
1856
1856
|
try {
|
|
1857
|
-
return new URL(
|
|
1857
|
+
return new URL(g.uriBackend).origin;
|
|
1858
1858
|
} catch {
|
|
1859
1859
|
return "";
|
|
1860
1860
|
}
|
|
1861
1861
|
return "";
|
|
1862
|
-
}, [
|
|
1863
|
-
var
|
|
1864
|
-
const
|
|
1865
|
-
access_token:
|
|
1866
|
-
companycode:
|
|
1867
|
-
companyid:
|
|
1868
|
-
uriBackend:
|
|
1869
|
-
uriBackendEnt:
|
|
1870
|
-
lang:
|
|
1871
|
-
} =
|
|
1872
|
-
(
|
|
1862
|
+
}, [g == null ? void 0 : g.uriBackend]), p = (E) => {
|
|
1863
|
+
var M;
|
|
1864
|
+
const h = E === "like" ? e == null ? void 0 : e.text_thumbsup_link : e == null ? void 0 : e.text_thumbsdown_link, {
|
|
1865
|
+
access_token: m = "",
|
|
1866
|
+
companycode: v = "",
|
|
1867
|
+
companyid: C = "",
|
|
1868
|
+
uriBackend: j = "",
|
|
1869
|
+
uriBackendEnt: S = "",
|
|
1870
|
+
lang: I = ""
|
|
1871
|
+
} = g || {}, B = u === "another" ? o == null ? void 0 : o.getFieldValue("ADDITIONAL_FEEDBACK") : u;
|
|
1872
|
+
(M = Re({
|
|
1873
1873
|
method: "POST",
|
|
1874
|
-
url:
|
|
1874
|
+
url: h,
|
|
1875
1875
|
data: {
|
|
1876
1876
|
message_id: e == null ? void 0 : e.id,
|
|
1877
|
-
response_type:
|
|
1878
|
-
...
|
|
1879
|
-
additional_feedback:
|
|
1877
|
+
response_type: E === "like" ? "up" : "down",
|
|
1878
|
+
...E === "dislike" && {
|
|
1879
|
+
additional_feedback: B
|
|
1880
1880
|
}
|
|
1881
1881
|
},
|
|
1882
1882
|
headers: {
|
|
1883
1883
|
"Content-Type": "application/json",
|
|
1884
|
-
Authorization: `Bearer ${
|
|
1885
|
-
"company-code": `${
|
|
1886
|
-
"company-id": `${
|
|
1887
|
-
uriBackend: `${
|
|
1888
|
-
uriBackendEnt: `${
|
|
1889
|
-
"custom-origin": `${
|
|
1890
|
-
"Acc-Name": `${
|
|
1891
|
-
Language: `${
|
|
1884
|
+
Authorization: `Bearer ${m}`,
|
|
1885
|
+
"company-code": `${v}`,
|
|
1886
|
+
"company-id": `${C}`,
|
|
1887
|
+
uriBackend: `${j}`,
|
|
1888
|
+
uriBackendEnt: `${S}`,
|
|
1889
|
+
"custom-origin": `${A}`,
|
|
1890
|
+
"Acc-Name": `${v.toUpperCase()}`,
|
|
1891
|
+
Language: `${I}`
|
|
1892
1892
|
}
|
|
1893
|
-
})) == null ||
|
|
1894
|
-
var
|
|
1895
|
-
(
|
|
1893
|
+
})) == null || M.then((L) => {
|
|
1894
|
+
var F, $, H;
|
|
1895
|
+
(L == null ? void 0 : L.status) === 200 && (a && d(!1), (F = Ce) == null || F.destroy(), ($ = Ce) == null || $.config({
|
|
1896
1896
|
getContainer: () => document.querySelector(".w-widget-content-container"),
|
|
1897
1897
|
top: 28,
|
|
1898
1898
|
placement: "top",
|
|
1899
1899
|
duration: 3
|
|
1900
|
-
}), (
|
|
1901
|
-
message:
|
|
1900
|
+
}), (H = Ce) == null || H.success({
|
|
1901
|
+
message: i,
|
|
1902
1902
|
className: "w-notification-content"
|
|
1903
|
-
}),
|
|
1904
|
-
var
|
|
1905
|
-
return (
|
|
1903
|
+
}), x((V) => {
|
|
1904
|
+
var Q;
|
|
1905
|
+
return (Q = V == null ? void 0 : V.map((X) => {
|
|
1906
1906
|
var ee;
|
|
1907
|
-
if (ie(
|
|
1908
|
-
const ae = (ee =
|
|
1907
|
+
if (ie(X, "chats")) {
|
|
1908
|
+
const ae = (ee = X == null ? void 0 : X.chats) == null ? void 0 : ee.map((ce) => (ce == null ? void 0 : ce.indexChat) === (e == null ? void 0 : e.indexChat) ? {
|
|
1909
1909
|
...ce,
|
|
1910
|
-
feedback:
|
|
1910
|
+
feedback: E
|
|
1911
1911
|
} : ce);
|
|
1912
1912
|
return {
|
|
1913
|
-
...
|
|
1913
|
+
...X,
|
|
1914
1914
|
chats: ae
|
|
1915
1915
|
};
|
|
1916
1916
|
}
|
|
1917
|
-
return (e == null ? void 0 : e.message_id) === (
|
|
1918
|
-
...
|
|
1919
|
-
feedback:
|
|
1920
|
-
} :
|
|
1921
|
-
})) == null ? void 0 :
|
|
1917
|
+
return (e == null ? void 0 : e.message_id) === (X == null ? void 0 : X.message_id) ? {
|
|
1918
|
+
...X,
|
|
1919
|
+
feedback: E
|
|
1920
|
+
} : X;
|
|
1921
|
+
})) == null ? void 0 : Q.flat();
|
|
1922
1922
|
}));
|
|
1923
1923
|
});
|
|
1924
1924
|
};
|
|
1925
|
-
return
|
|
1926
|
-
var
|
|
1927
|
-
(
|
|
1928
|
-
}, [
|
|
1929
|
-
|
|
1930
|
-
|
|
1925
|
+
return Z(() => {
|
|
1926
|
+
var E;
|
|
1927
|
+
(E = Ce) == null || E.destroy();
|
|
1928
|
+
}, [b]), /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
1929
|
+
y && /* @__PURE__ */ n.jsx(
|
|
1930
|
+
G,
|
|
1931
1931
|
{
|
|
1932
1932
|
icon: /* @__PURE__ */ n.jsx(P, { type: "like", chatProps: e }),
|
|
1933
1933
|
onClick: () => {
|
|
1934
|
-
(e == null ? void 0 : e.feedback) !== "like" &&
|
|
1934
|
+
(e == null ? void 0 : e.feedback) !== "like" && p("like");
|
|
1935
1935
|
}
|
|
1936
1936
|
}
|
|
1937
1937
|
),
|
|
1938
|
-
|
|
1939
|
-
|
|
1938
|
+
w && /* @__PURE__ */ n.jsx(
|
|
1939
|
+
G,
|
|
1940
1940
|
{
|
|
1941
1941
|
icon: /* @__PURE__ */ n.jsx(P, { type: "dislike", chatProps: e }),
|
|
1942
1942
|
onClick: () => {
|
|
@@ -1954,7 +1954,7 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
1954
1954
|
d(!1);
|
|
1955
1955
|
},
|
|
1956
1956
|
onOk: () => {
|
|
1957
|
-
|
|
1957
|
+
p("dislike");
|
|
1958
1958
|
},
|
|
1959
1959
|
children: [
|
|
1960
1960
|
/* @__PURE__ */ n.jsx("p", { style: { textAlign: "center", fontWeight: 600, fontSize: 14 }, children: t }),
|
|
@@ -1963,33 +1963,33 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
1963
1963
|
"!"
|
|
1964
1964
|
] }),
|
|
1965
1965
|
/* @__PURE__ */ n.jsx(
|
|
1966
|
-
|
|
1966
|
+
Yt.Group,
|
|
1967
1967
|
{
|
|
1968
1968
|
className: "w-list-feedback-suggestion",
|
|
1969
1969
|
options: gs,
|
|
1970
1970
|
optionType: "button",
|
|
1971
1971
|
buttonStyle: "solid",
|
|
1972
|
-
onChange: (
|
|
1973
|
-
var
|
|
1974
|
-
f((
|
|
1972
|
+
onChange: (E) => {
|
|
1973
|
+
var h;
|
|
1974
|
+
f((h = E == null ? void 0 : E.target) == null ? void 0 : h.value);
|
|
1975
1975
|
}
|
|
1976
1976
|
}
|
|
1977
1977
|
),
|
|
1978
1978
|
u === "another" && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
1979
|
-
/* @__PURE__ */ n.jsx(Kt, { children:
|
|
1979
|
+
/* @__PURE__ */ n.jsx(Kt, { children: c }),
|
|
1980
1980
|
/* @__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 }) }) })
|
|
1981
1981
|
] })
|
|
1982
1982
|
]
|
|
1983
1983
|
}
|
|
1984
1984
|
)
|
|
1985
1985
|
] });
|
|
1986
|
-
}, tr =
|
|
1986
|
+
}, tr = O(nr), sr = ({
|
|
1987
1987
|
showFeedback: e = !0,
|
|
1988
1988
|
showRegenerate: t = !0,
|
|
1989
1989
|
position: s = "left",
|
|
1990
1990
|
...r
|
|
1991
1991
|
}) => {
|
|
1992
|
-
const
|
|
1992
|
+
const i = ys(), { chats: c, onSendMsg: o, setChats: a, loadingRegenerate: d, currRegenerateId: u } = ue(), f = R(() => r == null ? void 0 : r.sender, [r]), x = R(() => c == null ? void 0 : c.filter((A) => (A == null ? void 0 : A.sender) === "client"), [c]), g = R(() => t && f === "response" && (x == null ? void 0 : x.length) > 0 && (r == null ? void 0 : r.indexChat) === (c == null ? void 0 : c.length) - 1, [f, x, c, r == null ? void 0 : r.indexChat, t]), b = R(() => {
|
|
1993
1993
|
switch (s) {
|
|
1994
1994
|
case "left":
|
|
1995
1995
|
return "flex-start";
|
|
@@ -1998,21 +1998,21 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
1998
1998
|
case "right":
|
|
1999
1999
|
return "flex-end";
|
|
2000
2000
|
}
|
|
2001
|
-
}, [s]),
|
|
2002
|
-
const
|
|
2001
|
+
}, [s]), y = R(() => e && (r == null ? void 0 : r.text_FeedbackIcons) === "hidup", [r, e]), w = () => {
|
|
2002
|
+
const A = x == null ? void 0 : x[(x == null ? void 0 : x.length) - 1], p = c == null ? void 0 : c[(c == null ? void 0 : c.length) - 1];
|
|
2003
2003
|
a(
|
|
2004
|
-
(
|
|
2005
|
-
...
|
|
2006
|
-
generated_id: (
|
|
2004
|
+
(E = []) => E == null ? void 0 : E.map((h, m) => m === (E == null ? void 0 : E.length) - 1 && (h == null ? void 0 : h.sender) === "response" ? {
|
|
2005
|
+
...h,
|
|
2006
|
+
generated_id: (p == null ? void 0 : p.generated_id) ?? i
|
|
2007
2007
|
// adjust with response
|
|
2008
|
-
} :
|
|
2009
|
-
), u.current = (
|
|
2010
|
-
msg:
|
|
2008
|
+
} : h)
|
|
2009
|
+
), u.current = (p == null ? void 0 : p.generated_id) ?? i, o({
|
|
2010
|
+
msg: A == null ? void 0 : A.text,
|
|
2011
2011
|
additionalConfig: {
|
|
2012
|
-
generate_id: (
|
|
2012
|
+
generate_id: (p == null ? void 0 : p.generated_id) ?? i
|
|
2013
2013
|
},
|
|
2014
2014
|
isShowLoadingResponse: d
|
|
2015
|
-
}),
|
|
2015
|
+
}), me();
|
|
2016
2016
|
};
|
|
2017
2017
|
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(
|
|
2018
2018
|
"div",
|
|
@@ -2020,86 +2020,86 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
2020
2020
|
style: {
|
|
2021
2021
|
display: "flex",
|
|
2022
2022
|
gap: 8,
|
|
2023
|
-
justifyContent:
|
|
2023
|
+
justifyContent: b
|
|
2024
2024
|
},
|
|
2025
2025
|
children: [
|
|
2026
|
-
|
|
2027
|
-
|
|
2026
|
+
g && /* @__PURE__ */ n.jsx(
|
|
2027
|
+
G,
|
|
2028
2028
|
{
|
|
2029
2029
|
loading: d,
|
|
2030
2030
|
icon: /* @__PURE__ */ n.jsx(P, { type: "sync" }),
|
|
2031
2031
|
onClick: () => {
|
|
2032
|
-
|
|
2032
|
+
w();
|
|
2033
2033
|
}
|
|
2034
2034
|
}
|
|
2035
2035
|
),
|
|
2036
|
-
|
|
2036
|
+
y && /* @__PURE__ */ n.jsx(tr, { ...r })
|
|
2037
2037
|
]
|
|
2038
2038
|
}
|
|
2039
2039
|
) });
|
|
2040
|
-
}, Cn =
|
|
2040
|
+
}, Cn = O(sr), rr = ({ nameFallback: e = "", ...t }) => /* @__PURE__ */ n.jsx(
|
|
2041
2041
|
qt,
|
|
2042
2042
|
{
|
|
2043
2043
|
...typeof (t == null ? void 0 : t.onError) != "function" && {
|
|
2044
|
-
fallback:
|
|
2044
|
+
fallback: jn(e)
|
|
2045
2045
|
},
|
|
2046
2046
|
placeholder: /* @__PURE__ */ n.jsx(de.Image, { style: { width: "100%", height: "100%" } }),
|
|
2047
2047
|
loading: "lazy",
|
|
2048
2048
|
...t
|
|
2049
2049
|
}
|
|
2050
|
-
),
|
|
2051
|
-
const s =
|
|
2050
|
+
), wn = O(rr), or = ({ nameFallback: e = "", ...t }) => {
|
|
2051
|
+
const s = z(0);
|
|
2052
2052
|
return /* @__PURE__ */ n.jsx(
|
|
2053
2053
|
Qn,
|
|
2054
2054
|
{
|
|
2055
2055
|
...t,
|
|
2056
2056
|
src: /* @__PURE__ */ n.jsx(
|
|
2057
|
-
|
|
2057
|
+
wn,
|
|
2058
2058
|
{
|
|
2059
2059
|
src: t == null ? void 0 : t.src,
|
|
2060
2060
|
nameFallback: e,
|
|
2061
2061
|
...t,
|
|
2062
2062
|
onError: (r) => {
|
|
2063
|
-
s.current += 1, (s == null ? void 0 : s.current) < 3 ? r.target.src = ot(t == null ? void 0 : t.src) : r.target.src =
|
|
2063
|
+
s.current += 1, (s == null ? void 0 : s.current) < 3 ? r.target.src = ot(t == null ? void 0 : t.src) : r.target.src = jn(e);
|
|
2064
2064
|
}
|
|
2065
2065
|
}
|
|
2066
2066
|
)
|
|
2067
2067
|
}
|
|
2068
2068
|
);
|
|
2069
|
-
},
|
|
2070
|
-
|
|
2069
|
+
}, Ee = O(or);
|
|
2070
|
+
Ee.Group = Qn.Group;
|
|
2071
2071
|
const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", children: [
|
|
2072
2072
|
/* @__PURE__ */ n.jsx("div", {}),
|
|
2073
2073
|
/* @__PURE__ */ n.jsx("div", {}),
|
|
2074
2074
|
/* @__PURE__ */ n.jsx("div", {}),
|
|
2075
2075
|
/* @__PURE__ */ n.jsx("div", {})
|
|
2076
|
-
] }), ft =
|
|
2077
|
-
const { widgetProps: e } =
|
|
2076
|
+
] }), ft = O(cr), ir = () => {
|
|
2077
|
+
const { widgetProps: e } = q();
|
|
2078
2078
|
return /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
|
|
2079
|
-
/* @__PURE__ */ n.jsx(
|
|
2079
|
+
/* @__PURE__ */ n.jsx(Ee, { src: Ze, nameFallback: e == null ? void 0 : e.title }),
|
|
2080
2080
|
/* @__PURE__ */ n.jsx(ft, {})
|
|
2081
2081
|
] });
|
|
2082
|
-
},
|
|
2083
|
-
/* @__PURE__ */ n.jsx(
|
|
2084
|
-
/* @__PURE__ */ n.jsx(
|
|
2085
|
-
] }), Ue =
|
|
2086
|
-
var f,
|
|
2087
|
-
const [t, s] =
|
|
2088
|
-
const
|
|
2089
|
-
return (
|
|
2090
|
-
}, [d, e,
|
|
2091
|
-
return
|
|
2092
|
-
!r && (d == null ? void 0 : d.length) > 0 && (s(d == null ? void 0 : d.length),
|
|
2093
|
-
}, [r]), r && u ? /* @__PURE__ */ n.jsx(
|
|
2082
|
+
}, pn = O(ir), lr = ({ src: e, name: t }) => /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
|
|
2083
|
+
/* @__PURE__ */ n.jsx(Ee, { src: e, preview: !1, nameFallback: t }),
|
|
2084
|
+
/* @__PURE__ */ n.jsx(Y.Text, { children: t })
|
|
2085
|
+
] }), Ue = O(lr), ar = ({ ...e }) => {
|
|
2086
|
+
var f, x;
|
|
2087
|
+
const [t, s] = D(1), { loadingRegenerate: r, currRegenerateId: i } = ue(), { isExpand: c, widgetProps: o } = q(), a = R(() => e == null ? void 0 : e.sender, [e]), d = R(() => e == null ? void 0 : e.chats, [e == null ? void 0 : e.chats]), u = R(() => {
|
|
2088
|
+
const g = d == null ? void 0 : d[(d == null ? void 0 : d.length) - 1];
|
|
2089
|
+
return (g == null ? void 0 : g.generated_id) === i.current;
|
|
2090
|
+
}, [d, e, i.current]);
|
|
2091
|
+
return Z(() => {
|
|
2092
|
+
!r && (d == null ? void 0 : d.length) > 0 && (s(d == null ? void 0 : d.length), me());
|
|
2093
|
+
}, [r]), r && u ? /* @__PURE__ */ n.jsx(pn, {}) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2094
2094
|
a === "response" && /* @__PURE__ */ n.jsx(Ue, { name: o == null ? void 0 : o.title, src: Ze }),
|
|
2095
|
-
/* @__PURE__ */ n.jsx("div", { style: { display: "flex", gap: 8 }, children: d == null ? void 0 : d.map((
|
|
2096
|
-
var
|
|
2097
|
-
const
|
|
2095
|
+
/* @__PURE__ */ n.jsx("div", { style: { display: "flex", gap: 8 }, children: d == null ? void 0 : d.map((g, b) => {
|
|
2096
|
+
var A;
|
|
2097
|
+
const y = b === ((A = e == null ? void 0 : e.chats) == null ? void 0 : A.length) - 1, w = t === b + 1;
|
|
2098
2098
|
return /* @__PURE__ */ n.jsxs(
|
|
2099
2099
|
"div",
|
|
2100
2100
|
{
|
|
2101
2101
|
style: {
|
|
2102
|
-
display:
|
|
2102
|
+
display: w ? "flex" : "none",
|
|
2103
2103
|
flexDirection: "column",
|
|
2104
2104
|
gap: 8
|
|
2105
2105
|
},
|
|
@@ -2108,16 +2108,16 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2108
2108
|
/* @__PURE__ */ n.jsx(
|
|
2109
2109
|
"div",
|
|
2110
2110
|
{
|
|
2111
|
-
...
|
|
2112
|
-
className: `w-regenerate-chat-last ${
|
|
2111
|
+
...y && {
|
|
2112
|
+
className: `w-regenerate-chat-last ${c ? "w-regenerate-chat-last-expand" : ""}`
|
|
2113
2113
|
},
|
|
2114
2114
|
children: /* @__PURE__ */ n.jsxs(
|
|
2115
2115
|
"div",
|
|
2116
2116
|
{
|
|
2117
|
-
className: `w-bubble-chat w-bubble-chat-regenerate ${`w-${a}`} ${
|
|
2117
|
+
className: `w-bubble-chat w-bubble-chat-regenerate ${`w-${a}`} ${c ? "w-bubble-chat-regenerate-expand" : ""}`,
|
|
2118
2118
|
children: [
|
|
2119
|
-
/* @__PURE__ */ n.jsx(dt, { children:
|
|
2120
|
-
a === "response" && /* @__PURE__ */ n.jsx("span", { style: { fontSize: 12, color: "rgba(0,0,0,0.4)" }, children:
|
|
2119
|
+
/* @__PURE__ */ n.jsx(dt, { children: g == null ? void 0 : g.text }),
|
|
2120
|
+
a === "response" && /* @__PURE__ */ n.jsx("span", { style: { fontSize: 12, color: "rgba(0,0,0,0.4)" }, children: g == null ? void 0 : g.timestamp })
|
|
2121
2121
|
]
|
|
2122
2122
|
}
|
|
2123
2123
|
)
|
|
@@ -2128,12 +2128,12 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2128
2128
|
{
|
|
2129
2129
|
showFeedback: !0,
|
|
2130
2130
|
showRegenerate: !1,
|
|
2131
|
-
...
|
|
2131
|
+
...g
|
|
2132
2132
|
}
|
|
2133
2133
|
)
|
|
2134
2134
|
]
|
|
2135
2135
|
},
|
|
2136
|
-
|
|
2136
|
+
b
|
|
2137
2137
|
);
|
|
2138
2138
|
}) }),
|
|
2139
2139
|
/* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, justifyContent: "center" }, children: [
|
|
@@ -2147,42 +2147,42 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2147
2147
|
),
|
|
2148
2148
|
/* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 4, alignItems: "center" }, children: [
|
|
2149
2149
|
/* @__PURE__ */ n.jsx(
|
|
2150
|
-
|
|
2150
|
+
G,
|
|
2151
2151
|
{
|
|
2152
2152
|
size: "small",
|
|
2153
2153
|
shape: "circle",
|
|
2154
2154
|
disabled: t === 1,
|
|
2155
2155
|
icon: /* @__PURE__ */ n.jsx(P, { type: "left" }),
|
|
2156
2156
|
onClick: () => {
|
|
2157
|
-
t > 1 && s((
|
|
2157
|
+
t > 1 && s((g) => g - 1);
|
|
2158
2158
|
}
|
|
2159
2159
|
}
|
|
2160
2160
|
),
|
|
2161
|
-
/* @__PURE__ */ n.jsxs(
|
|
2161
|
+
/* @__PURE__ */ n.jsxs(Y.Text, { children: [
|
|
2162
2162
|
t,
|
|
2163
2163
|
" / ",
|
|
2164
2164
|
(f = e == null ? void 0 : e.chats) == null ? void 0 : f.length
|
|
2165
2165
|
] }),
|
|
2166
2166
|
/* @__PURE__ */ n.jsx(
|
|
2167
|
-
|
|
2167
|
+
G,
|
|
2168
2168
|
{
|
|
2169
2169
|
size: "small",
|
|
2170
2170
|
shape: "circle",
|
|
2171
|
-
disabled: t === ((
|
|
2171
|
+
disabled: t === ((x = e == null ? void 0 : e.chats) == null ? void 0 : x.length),
|
|
2172
2172
|
icon: /* @__PURE__ */ n.jsx(P, { type: "right" }),
|
|
2173
2173
|
onClick: () => {
|
|
2174
|
-
var
|
|
2175
|
-
t < ((
|
|
2174
|
+
var g;
|
|
2175
|
+
t < ((g = e == null ? void 0 : e.chats) == null ? void 0 : g.length) && s((b) => b + 1);
|
|
2176
2176
|
}
|
|
2177
2177
|
}
|
|
2178
2178
|
)
|
|
2179
2179
|
] })
|
|
2180
2180
|
] })
|
|
2181
2181
|
] });
|
|
2182
|
-
}, dr =
|
|
2183
|
-
var
|
|
2182
|
+
}, dr = O(ar), ur = ({ date: e, format: t, sender: s, ...r }) => {
|
|
2183
|
+
var i, c;
|
|
2184
2184
|
return /* @__PURE__ */ n.jsx(
|
|
2185
|
-
|
|
2185
|
+
Y.Text,
|
|
2186
2186
|
{
|
|
2187
2187
|
...r,
|
|
2188
2188
|
type: "secondary",
|
|
@@ -2192,32 +2192,32 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2192
2192
|
...s === "client" && {
|
|
2193
2193
|
textAlign: "right"
|
|
2194
2194
|
},
|
|
2195
|
-
...((
|
|
2195
|
+
...((i = Object.keys((r == null ? void 0 : r.style) || {})) == null ? void 0 : i.length) > 0 && {
|
|
2196
2196
|
...r == null ? void 0 : r.style
|
|
2197
2197
|
}
|
|
2198
2198
|
},
|
|
2199
|
-
children: t ? (
|
|
2199
|
+
children: t ? (c = le(e)) == null ? void 0 : c.format(t) : e
|
|
2200
2200
|
}
|
|
2201
2201
|
);
|
|
2202
|
-
}, We =
|
|
2202
|
+
}, We = O(ur), fr = ({ ...e }) => {
|
|
2203
2203
|
var o;
|
|
2204
|
-
const { loadingRegenerate: t, chats: s } = ue(), { widgetProps: r } =
|
|
2205
|
-
return ((o = e == null ? void 0 : e.chats) == null ? void 0 : o.length) > 0 ? /* @__PURE__ */ n.jsx(dr, { ...e }) : t &&
|
|
2206
|
-
|
|
2207
|
-
/* @__PURE__ */ n.jsxs("div", { className: `w-bubble-chat ${`w-${
|
|
2204
|
+
const { loadingRegenerate: t, chats: s } = ue(), { widgetProps: r } = q(), i = R(() => (s == null ? void 0 : s.length) - 1 === (e == null ? void 0 : e.indexChat), [s]), c = R(() => e == null ? void 0 : e.sender, [e]);
|
|
2205
|
+
return ((o = e == null ? void 0 : e.chats) == null ? void 0 : o.length) > 0 ? /* @__PURE__ */ n.jsx(dr, { ...e }) : t && i ? /* @__PURE__ */ n.jsx(pn, {}) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2206
|
+
c === "response" && /* @__PURE__ */ n.jsx(Ue, { name: r == null ? void 0 : r.title, src: Ze }),
|
|
2207
|
+
/* @__PURE__ */ n.jsxs("div", { className: `w-bubble-chat ${`w-${c}`}`, children: [
|
|
2208
2208
|
/* @__PURE__ */ n.jsx(dt, { children: e == null ? void 0 : e.text }),
|
|
2209
|
-
/* @__PURE__ */ n.jsx(We, { date: e == null ? void 0 : e.timestamp, sender:
|
|
2209
|
+
/* @__PURE__ */ n.jsx(We, { date: e == null ? void 0 : e.timestamp, sender: c })
|
|
2210
2210
|
] }),
|
|
2211
2211
|
/* @__PURE__ */ n.jsx(Cn, { ...e })
|
|
2212
2212
|
] });
|
|
2213
|
-
},
|
|
2214
|
-
const e =
|
|
2213
|
+
}, $e = O(fr), xr = () => {
|
|
2214
|
+
const e = _(
|
|
2215
2215
|
"PleaseUploadFile",
|
|
2216
2216
|
"Please upload specify file that needed to complete your request"
|
|
2217
|
-
), t =
|
|
2217
|
+
), t = _("ClickToUpload", "Click to upload"), s = _(
|
|
2218
2218
|
"ContinueWithoutUpload",
|
|
2219
2219
|
"Continue without upload"
|
|
2220
|
-
), { onSendMsg: r, setFile:
|
|
2220
|
+
), { onSendMsg: r, setFile: i } = ue(), c = () => {
|
|
2221
2221
|
r({
|
|
2222
2222
|
msg: "CANCEL UPLOAD"
|
|
2223
2223
|
});
|
|
@@ -2232,7 +2232,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2232
2232
|
marginBottom: 12
|
|
2233
2233
|
},
|
|
2234
2234
|
children: [
|
|
2235
|
-
/* @__PURE__ */ n.jsx(
|
|
2235
|
+
/* @__PURE__ */ n.jsx($e, { sender: "response", text: `${e}...` }),
|
|
2236
2236
|
/* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8 }, children: [
|
|
2237
2237
|
/* @__PURE__ */ n.jsx(
|
|
2238
2238
|
Zn,
|
|
@@ -2242,88 +2242,88 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2242
2242
|
fileList: [],
|
|
2243
2243
|
accept: ".doc, .jpg, .ods, .png, .txt, .docx, .pdf",
|
|
2244
2244
|
onChange: (o) => {
|
|
2245
|
-
|
|
2245
|
+
i(o == null ? void 0 : o.file);
|
|
2246
2246
|
},
|
|
2247
|
-
children: /* @__PURE__ */ n.jsx(
|
|
2247
|
+
children: /* @__PURE__ */ n.jsx(G, { icon: /* @__PURE__ */ n.jsx(P, { type: "upload" }), children: t })
|
|
2248
2248
|
}
|
|
2249
2249
|
),
|
|
2250
|
-
/* @__PURE__ */ n.jsx(
|
|
2250
|
+
/* @__PURE__ */ n.jsx(G, { type: "dashed", onClick: c, children: s })
|
|
2251
2251
|
] })
|
|
2252
2252
|
]
|
|
2253
2253
|
}
|
|
2254
2254
|
);
|
|
2255
|
-
}, gr =
|
|
2256
|
-
const [e, t] =
|
|
2257
|
-
}, onCheckPYAccess:
|
|
2258
|
-
} } = (
|
|
2255
|
+
}, gr = O(xr), Cr = () => {
|
|
2256
|
+
const [e, t] = D(!1), [s, r] = D(!1), [i, c] = D(!1), [o, a] = D(3), [d, u] = D(!1), [f, x] = D(""), { widgetProps: g } = q(), { onSendMsg: b, chats: y } = ue(), { onSubmitPYPwd: w = () => {
|
|
2257
|
+
}, onCheckPYAccess: A = () => {
|
|
2258
|
+
} } = (g == null ? void 0 : g.onPayslipFn) || {}, p = _(
|
|
2259
2259
|
"ProvidePasswordPayslip",
|
|
2260
2260
|
"Please provide your password account to access the download"
|
|
2261
|
-
),
|
|
2261
|
+
), E = _("Cancel", "Cancel"), h = _("Submit", "Submit"), m = _("Password", "Password"), v = _("IsRequired", "Is Required"), C = _(
|
|
2262
2262
|
"PasswordPayslipValid",
|
|
2263
2263
|
"Your password is valid. Please download the payslip file"
|
|
2264
|
-
),
|
|
2264
|
+
), j = _(
|
|
2265
2265
|
"AttemptPasswordExceeded",
|
|
2266
2266
|
"Your attempt to enter the password exceeded the limit"
|
|
2267
|
-
),
|
|
2267
|
+
), S = _(
|
|
2268
2268
|
"VerifyAccessPayslip",
|
|
2269
2269
|
"Please wait, verifying access to your payslip"
|
|
2270
|
-
),
|
|
2270
|
+
), I = _(
|
|
2271
2271
|
"WrongPwdPayslip",
|
|
2272
2272
|
"The password you entered is incorrect. Please try again or contact support if you need assistance"
|
|
2273
|
-
),
|
|
2273
|
+
), B = _(
|
|
2274
2274
|
"SessionExpired",
|
|
2275
2275
|
"Session expired. Please log in again to continue"
|
|
2276
|
-
), [
|
|
2277
|
-
var
|
|
2278
|
-
|
|
2276
|
+
), [M] = oe.useForm(), L = () => {
|
|
2277
|
+
var H, V, Q;
|
|
2278
|
+
c(!0), u(!0), (Q = (V = (H = A()) == null ? void 0 : H.then((X) => {
|
|
2279
2279
|
var ee, ae;
|
|
2280
|
-
const se = (ae = (ee =
|
|
2281
|
-
se &&
|
|
2282
|
-
})) == null ? void 0 :
|
|
2283
|
-
|
|
2284
|
-
})) == null ||
|
|
2280
|
+
const se = (ae = (ee = X == null ? void 0 : X.data) == null ? void 0 : ee.DATA) == null ? void 0 : ae.RESULT;
|
|
2281
|
+
se && b({ msg: "Valid" }), t(se), x("");
|
|
2282
|
+
})) == null ? void 0 : V.catch((X) => {
|
|
2283
|
+
x(X == null ? void 0 : X.toString());
|
|
2284
|
+
})) == null || Q.finally(() => {
|
|
2285
2285
|
r(!1), u(!1);
|
|
2286
2286
|
});
|
|
2287
|
-
},
|
|
2288
|
-
|
|
2289
|
-
},
|
|
2290
|
-
var
|
|
2291
|
-
const
|
|
2292
|
-
(
|
|
2293
|
-
var
|
|
2294
|
-
r(!0), (
|
|
2287
|
+
}, F = () => {
|
|
2288
|
+
b({ msg: "cancel" }), c(!1);
|
|
2289
|
+
}, $ = () => {
|
|
2290
|
+
var V;
|
|
2291
|
+
const H = M == null ? void 0 : M.getFieldValue("pwd");
|
|
2292
|
+
(V = M == null ? void 0 : M.validateFields()) == null || V.then(() => {
|
|
2293
|
+
var Q, X;
|
|
2294
|
+
r(!0), (X = (Q = w(H)) == null ? void 0 : Q.then(({ data: se }) => {
|
|
2295
2295
|
var ee;
|
|
2296
|
-
(ee = se == null ? void 0 : se.DATA) != null && ee.ISVALID ?
|
|
2297
|
-
})) == null ||
|
|
2298
|
-
var ae, ce, Ne, Ve,
|
|
2296
|
+
(ee = se == null ? void 0 : se.DATA) != null && ee.ISVALID ? L() : (x(I), a(o - 1), r(!1));
|
|
2297
|
+
})) == null || X.catch((se) => {
|
|
2298
|
+
var ae, ce, Ne, Ve, Ge;
|
|
2299
2299
|
const ee = se == null ? void 0 : se.response;
|
|
2300
2300
|
if ((ee == null ? void 0 : ee.status) === 401) {
|
|
2301
2301
|
const Me = (ce = (ae = ee == null ? void 0 : ee.data) == null ? void 0 : ae.ERRORS) == null ? void 0 : ce.includes(
|
|
2302
2302
|
"ACCESS_TOKEN_EXPIRED"
|
|
2303
|
-
), Fe = (
|
|
2303
|
+
), 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(
|
|
2304
2304
|
"invalid password"
|
|
2305
2305
|
);
|
|
2306
|
-
Me &&
|
|
2306
|
+
Me && x(B), Fe && (x(I), a(o - 1), r(!1));
|
|
2307
2307
|
} else
|
|
2308
|
-
|
|
2308
|
+
x(se == null ? void 0 : se.toString());
|
|
2309
2309
|
r(!1);
|
|
2310
2310
|
});
|
|
2311
2311
|
});
|
|
2312
2312
|
};
|
|
2313
|
-
return
|
|
2314
|
-
var
|
|
2315
|
-
const
|
|
2316
|
-
((
|
|
2317
|
-
}, []),
|
|
2318
|
-
/* @__PURE__ */ n.jsx(oe, { form:
|
|
2313
|
+
return Z(() => {
|
|
2314
|
+
var V;
|
|
2315
|
+
const H = y == null ? void 0 : y[(y == null ? void 0 : y.length) - 1];
|
|
2316
|
+
((V = H == null ? void 0 : H.attachment) == null ? void 0 : V.type) === "show_password_wp" && L();
|
|
2317
|
+
}, []), i ? d ? /* @__PURE__ */ n.jsx($e, { sender: "response", text: `${S}...` }) : o === 0 ? /* @__PURE__ */ n.jsx($e, { sender: "response", text: j }) : f ? /* @__PURE__ */ n.jsx($e, { sender: "response", text: f }) : /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
2318
|
+
/* @__PURE__ */ n.jsx(oe, { form: M, layout: "vertical", children: /* @__PURE__ */ n.jsx(
|
|
2319
2319
|
oe.Item,
|
|
2320
2320
|
{
|
|
2321
2321
|
name: "pwd",
|
|
2322
|
-
label: e ?
|
|
2322
|
+
label: e ? C : p,
|
|
2323
2323
|
rules: [
|
|
2324
2324
|
{
|
|
2325
2325
|
required: !0,
|
|
2326
|
-
message: `${
|
|
2326
|
+
message: `${m} ${v}`
|
|
2327
2327
|
}
|
|
2328
2328
|
],
|
|
2329
2329
|
children: /* @__PURE__ */ n.jsx(
|
|
@@ -2340,35 +2340,35 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2340
2340
|
}
|
|
2341
2341
|
) }),
|
|
2342
2342
|
!e && /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8 }, children: [
|
|
2343
|
-
/* @__PURE__ */ n.jsx(
|
|
2344
|
-
/* @__PURE__ */ n.jsx(
|
|
2343
|
+
/* @__PURE__ */ n.jsx(G, { disabled: s, onClick: F, children: E }),
|
|
2344
|
+
/* @__PURE__ */ n.jsx(G, { type: "primary", onClick: $, loading: s, children: h })
|
|
2345
2345
|
] })
|
|
2346
2346
|
] }) : null;
|
|
2347
|
-
}, mr =
|
|
2348
|
-
const { objInitPayload: t } =
|
|
2349
|
-
var
|
|
2350
|
-
const
|
|
2347
|
+
}, mr = O(Cr), br = ({ ...e }) => {
|
|
2348
|
+
const { objInitPayload: t } = q(), s = R(() => tt(t == null ? void 0 : t.access_token), [t]), r = () => {
|
|
2349
|
+
var c, o;
|
|
2350
|
+
const i = e == null ? void 0 : e.attachment;
|
|
2351
2351
|
(o = Re({
|
|
2352
2352
|
method: "POST",
|
|
2353
|
-
url:
|
|
2354
|
-
data:
|
|
2353
|
+
url: i == null ? void 0 : i.endpoint,
|
|
2354
|
+
data: i == null ? void 0 : i.body,
|
|
2355
2355
|
headers: {
|
|
2356
2356
|
Authorization: `Bearer ${t == null ? void 0 : t.access_token}`,
|
|
2357
|
-
"Content-Type":
|
|
2357
|
+
"Content-Type": i == null ? void 0 : i.headers["Content-Type"],
|
|
2358
2358
|
coid: t == null ? void 0 : t.companyid,
|
|
2359
2359
|
"Company-Id": t == null ? void 0 : t.companyid,
|
|
2360
|
-
"Acc-Name": (
|
|
2360
|
+
"Acc-Name": (c = s == null ? void 0 : s.INSTANCE) == null ? void 0 : c.toLowerCase()
|
|
2361
2361
|
},
|
|
2362
2362
|
responseType: "blob"
|
|
2363
2363
|
})) == null || o.then((a) => {
|
|
2364
|
-
var
|
|
2365
|
-
const d = (
|
|
2366
|
-
|
|
2364
|
+
var g;
|
|
2365
|
+
const d = (g = i == null ? void 0 : i.body) == null ? void 0 : g.media, u = `${i == null ? void 0 : i.filename}.${d}`, f = new Blob([a == null ? void 0 : a.data]), x = URL == null ? void 0 : URL.createObjectURL(f);
|
|
2366
|
+
En({ downloadURL: x, fileName: u }), URL.revokeObjectURL(x);
|
|
2367
2367
|
});
|
|
2368
2368
|
};
|
|
2369
|
-
return /* @__PURE__ */ n.jsx(
|
|
2370
|
-
}, vr =
|
|
2371
|
-
const t =
|
|
2369
|
+
return /* @__PURE__ */ n.jsx(G, { onClick: r, children: "Download file" });
|
|
2370
|
+
}, vr = O(br), hr = ({ ...e }) => {
|
|
2371
|
+
const t = z(), s = _("DownloadChart", "Download Chart"), r = R(() => e == null ? void 0 : e.attachment, [e == null ? void 0 : e.attachment]), i = R(() => {
|
|
2372
2372
|
var o;
|
|
2373
2373
|
return (o = r == null ? void 0 : r.data) == null ? void 0 : o.map((a, d) => {
|
|
2374
2374
|
var u, f;
|
|
@@ -2378,10 +2378,10 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2378
2378
|
color: (f = r == null ? void 0 : r.colors) == null ? void 0 : f[d]
|
|
2379
2379
|
};
|
|
2380
2380
|
});
|
|
2381
|
-
}, [r]),
|
|
2381
|
+
}, [r]), c = () => {
|
|
2382
2382
|
var a;
|
|
2383
2383
|
const o = (a = document == null ? void 0 : document.querySelector(".chart_widget canvas")) == null ? void 0 : a.toDataURL();
|
|
2384
|
-
|
|
2384
|
+
En({ fileName: r == null ? void 0 : r.title, downloadURL: o });
|
|
2385
2385
|
};
|
|
2386
2386
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2387
2387
|
/* @__PURE__ */ n.jsx(
|
|
@@ -2389,7 +2389,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2389
2389
|
{
|
|
2390
2390
|
className: "chart_widget",
|
|
2391
2391
|
ref: t,
|
|
2392
|
-
data:
|
|
2392
|
+
data: i,
|
|
2393
2393
|
angleField: "value",
|
|
2394
2394
|
colorField: "label",
|
|
2395
2395
|
label: {
|
|
@@ -2408,93 +2408,93 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2408
2408
|
}
|
|
2409
2409
|
),
|
|
2410
2410
|
/* @__PURE__ */ n.jsx("div", { style: { textAlign: "center" }, children: /* @__PURE__ */ n.jsx(
|
|
2411
|
-
|
|
2411
|
+
G,
|
|
2412
2412
|
{
|
|
2413
2413
|
onClick: () => {
|
|
2414
|
-
|
|
2414
|
+
c();
|
|
2415
2415
|
},
|
|
2416
2416
|
children: s
|
|
2417
2417
|
}
|
|
2418
2418
|
) })
|
|
2419
2419
|
] });
|
|
2420
|
-
},
|
|
2421
|
-
var t, s, r,
|
|
2420
|
+
}, Er = O(hr), Tr = ({ ...e }) => {
|
|
2421
|
+
var t, s, r, i, c;
|
|
2422
2422
|
switch (!0) {
|
|
2423
2423
|
case ((t = Ae(e)) == null ? void 0 : t.text):
|
|
2424
|
-
return /* @__PURE__ */ n.jsx(
|
|
2424
|
+
return /* @__PURE__ */ n.jsx($e, { ...e });
|
|
2425
2425
|
case ((s = Ae(e)) == null ? void 0 : s.upload):
|
|
2426
2426
|
return /* @__PURE__ */ n.jsx(gr, { ...e });
|
|
2427
2427
|
case ((r = Ae(e)) == null ? void 0 : r.password):
|
|
2428
2428
|
return /* @__PURE__ */ n.jsx(mr, { ...e });
|
|
2429
|
-
case ((
|
|
2429
|
+
case ((i = Ae(e)) == null ? void 0 : i.filedownload):
|
|
2430
2430
|
return /* @__PURE__ */ n.jsx(vr, { ...e });
|
|
2431
|
-
case ((
|
|
2432
|
-
return /* @__PURE__ */ n.jsx(
|
|
2431
|
+
case ((c = Ae(e)) == null ? void 0 : c.chart):
|
|
2432
|
+
return /* @__PURE__ */ n.jsx(Er, { ...e });
|
|
2433
2433
|
default:
|
|
2434
2434
|
return null;
|
|
2435
2435
|
}
|
|
2436
|
-
}, yr =
|
|
2437
|
-
const { isOpenWidget: e, widgetProps: t } =
|
|
2438
|
-
return
|
|
2439
|
-
|
|
2440
|
-
}, [
|
|
2441
|
-
/* @__PURE__ */ n.jsx("div", { className: "w-bubble-chat-container", children: s == null ? void 0 : s.map((
|
|
2436
|
+
}, yr = O(Tr), jr = () => {
|
|
2437
|
+
const { isOpenWidget: e, widgetProps: t } = q(), { chats: s, isWaitResponse: r } = ue(), { activeTab: i } = be();
|
|
2438
|
+
return Z(() => {
|
|
2439
|
+
me();
|
|
2440
|
+
}, [i]), e ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2441
|
+
/* @__PURE__ */ n.jsx("div", { className: "w-bubble-chat-container", children: s == null ? void 0 : s.map((c, o) => {
|
|
2442
2442
|
var d;
|
|
2443
|
-
const a = (d = Ae(
|
|
2443
|
+
const a = (d = Ae(c)) == null ? void 0 : d.text;
|
|
2444
2444
|
return /* @__PURE__ */ n.jsxs(gn, { children: [
|
|
2445
|
-
(
|
|
2445
|
+
(c == null ? void 0 : c.sender) === "response" && !a && /* @__PURE__ */ n.jsx(
|
|
2446
2446
|
Ue,
|
|
2447
2447
|
{
|
|
2448
2448
|
name: t == null ? void 0 : t.title,
|
|
2449
2449
|
src: Ze
|
|
2450
2450
|
}
|
|
2451
2451
|
),
|
|
2452
|
-
/* @__PURE__ */ n.jsx(yr, { indexChat: o, ...
|
|
2452
|
+
/* @__PURE__ */ n.jsx(yr, { indexChat: o, ...c })
|
|
2453
2453
|
] }, o);
|
|
2454
2454
|
}) }),
|
|
2455
|
-
r && /* @__PURE__ */ n.jsx(
|
|
2455
|
+
r && /* @__PURE__ */ n.jsx(pn, {})
|
|
2456
2456
|
] }) : null;
|
|
2457
|
-
}, wr =
|
|
2458
|
-
var
|
|
2459
|
-
const e =
|
|
2457
|
+
}, wr = O(jr), pr = () => {
|
|
2458
|
+
var h;
|
|
2459
|
+
const e = _(
|
|
2460
2460
|
"ContinueWithoutUpload",
|
|
2461
2461
|
"Continue without Upload"
|
|
2462
2462
|
), {
|
|
2463
2463
|
onSendMsg: t,
|
|
2464
2464
|
setChats: s,
|
|
2465
2465
|
isWaitResponse: r,
|
|
2466
|
-
loadingRegenerate:
|
|
2467
|
-
file:
|
|
2466
|
+
loadingRegenerate: i,
|
|
2467
|
+
file: c,
|
|
2468
2468
|
setFile: o,
|
|
2469
2469
|
chats: a,
|
|
2470
2470
|
connected: d
|
|
2471
|
-
} = ue(), { isActiveTabVA: u } =
|
|
2472
|
-
var
|
|
2473
|
-
const
|
|
2474
|
-
return (
|
|
2475
|
-
}, [a]),
|
|
2476
|
-
var
|
|
2477
|
-
const
|
|
2478
|
-
if (!(
|
|
2479
|
-
|
|
2480
|
-
const
|
|
2481
|
-
text:
|
|
2471
|
+
} = ue(), { isActiveTabVA: u } = be(), f = R(() => {
|
|
2472
|
+
var v;
|
|
2473
|
+
const m = a == null ? void 0 : a[(a == null ? void 0 : a.length) - 1];
|
|
2474
|
+
return (m == null ? void 0 : m.sender) === "response" && ((v = m == null ? void 0 : m.attachment) == null ? void 0 : v.type) === "fileuploader";
|
|
2475
|
+
}, [a]), x = z(), [g, b] = D(!1), [y, w] = D(!1), A = R(() => r || !y, [y, r]), p = () => {
|
|
2476
|
+
var C, j, S, I;
|
|
2477
|
+
const m = (S = (j = (C = x == null ? void 0 : x.current) == null ? void 0 : C.resizableTextArea) == null ? void 0 : j.textArea) == null ? void 0 : S.value;
|
|
2478
|
+
if (!(m != null && m.trim()) || r) return;
|
|
2479
|
+
w(!1), t({ msg: m }), b(!g);
|
|
2480
|
+
const v = {
|
|
2481
|
+
text: m,
|
|
2482
2482
|
sender: "client",
|
|
2483
2483
|
type: "text",
|
|
2484
|
-
timestamp: (
|
|
2484
|
+
timestamp: (I = le()) == null ? void 0 : I.format("hh:mm A")
|
|
2485
2485
|
};
|
|
2486
|
-
s((
|
|
2487
|
-
},
|
|
2486
|
+
s((B) => [...B, v]), me();
|
|
2487
|
+
}, E = () => {
|
|
2488
2488
|
t({ msg: "SKIP_WAITING_RESPONSE" });
|
|
2489
2489
|
};
|
|
2490
|
-
return
|
|
2491
|
-
var
|
|
2492
|
-
|
|
2490
|
+
return Z(() => {
|
|
2491
|
+
var m;
|
|
2492
|
+
x != null && x.current && u && ((m = x == null ? void 0 : x.current) == null || m.focus());
|
|
2493
2493
|
}, [u]), f ? /* @__PURE__ */ n.jsxs("div", { className: "w-input-container", style: { alignItems: "center" }, children: [
|
|
2494
|
-
/* @__PURE__ */ n.jsx(
|
|
2495
|
-
((
|
|
2494
|
+
/* @__PURE__ */ n.jsx(Y.Text, { children: c == null ? void 0 : c.name }),
|
|
2495
|
+
((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: [
|
|
2496
2496
|
/* @__PURE__ */ n.jsx(
|
|
2497
|
-
|
|
2497
|
+
G,
|
|
2498
2498
|
{
|
|
2499
2499
|
danger: !0,
|
|
2500
2500
|
icon: /* @__PURE__ */ n.jsx(P, { type: "delete" }),
|
|
@@ -2503,17 +2503,17 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2503
2503
|
}
|
|
2504
2504
|
),
|
|
2505
2505
|
/* @__PURE__ */ n.jsx(
|
|
2506
|
-
|
|
2506
|
+
G,
|
|
2507
2507
|
{
|
|
2508
2508
|
className: "w-send-btn",
|
|
2509
2509
|
style: { backgroundColor: "var(--primary-color, #395ebc)" },
|
|
2510
2510
|
icon: /* @__PURE__ */ n.jsx(P, { type: "send" }),
|
|
2511
2511
|
shape: "circle",
|
|
2512
|
-
onClick:
|
|
2512
|
+
onClick: p
|
|
2513
2513
|
}
|
|
2514
2514
|
)
|
|
2515
2515
|
] }) : /* @__PURE__ */ n.jsx(Se, { title: e, children: /* @__PURE__ */ n.jsx(
|
|
2516
|
-
|
|
2516
|
+
G,
|
|
2517
2517
|
{
|
|
2518
2518
|
icon: /* @__PURE__ */ n.jsx(P, { type: "close" }),
|
|
2519
2519
|
shape: "circle",
|
|
@@ -2530,49 +2530,49 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2530
2530
|
{
|
|
2531
2531
|
className: "w-input-widget",
|
|
2532
2532
|
disabled: !d,
|
|
2533
|
-
ref:
|
|
2533
|
+
ref: x,
|
|
2534
2534
|
placeholder: "Type a message...",
|
|
2535
|
-
onKeyDown: (
|
|
2536
|
-
((
|
|
2535
|
+
onKeyDown: (m) => {
|
|
2536
|
+
((m == null ? void 0 : m.code) === "Enter" || (m == null ? void 0 : m.key) === "Enter") && !(m != null && m.shiftKey) && p();
|
|
2537
2537
|
},
|
|
2538
|
-
onChange: ({ target: { value:
|
|
2539
|
-
const
|
|
2538
|
+
onChange: ({ target: { value: m } }) => {
|
|
2539
|
+
const v = /\S/;
|
|
2540
2540
|
Pe({
|
|
2541
|
-
input_va_value:
|
|
2542
|
-
}),
|
|
2541
|
+
input_va_value: m
|
|
2542
|
+
}), m && (v != null && v.test(m)) ? w(!0) : m != null && m.trim() || w(!1);
|
|
2543
2543
|
}
|
|
2544
2544
|
},
|
|
2545
|
-
|
|
2545
|
+
g
|
|
2546
2546
|
),
|
|
2547
|
-
r ||
|
|
2548
|
-
|
|
2547
|
+
r || i ? /* @__PURE__ */ n.jsx(
|
|
2548
|
+
G,
|
|
2549
2549
|
{
|
|
2550
2550
|
style: { border: "none" },
|
|
2551
2551
|
icon: /* @__PURE__ */ n.jsx(P, { type: "stop" }),
|
|
2552
2552
|
shape: "circle",
|
|
2553
|
-
onClick:
|
|
2553
|
+
onClick: E,
|
|
2554
2554
|
size: "large"
|
|
2555
2555
|
}
|
|
2556
2556
|
) : /* @__PURE__ */ n.jsx(
|
|
2557
|
-
|
|
2557
|
+
G,
|
|
2558
2558
|
{
|
|
2559
|
-
className: `w-send-btn ${
|
|
2560
|
-
disabled:
|
|
2559
|
+
className: `w-send-btn ${A ? "w-send-btn-disabled" : ""}`,
|
|
2560
|
+
disabled: A,
|
|
2561
2561
|
style: { backgroundColor: "var(--primary-color, #395ebc)" },
|
|
2562
2562
|
icon: /* @__PURE__ */ n.jsx(P, { type: "send" }),
|
|
2563
2563
|
shape: "circle",
|
|
2564
|
-
onClick:
|
|
2564
|
+
onClick: p
|
|
2565
2565
|
}
|
|
2566
2566
|
)
|
|
2567
2567
|
] });
|
|
2568
|
-
}, _r =
|
|
2569
|
-
const t =
|
|
2568
|
+
}, _r = O(pr), kr = ({ taskStatus: e }) => {
|
|
2569
|
+
const t = _("InProgress", "In Progress"), s = _("New", "New"), r = _("Closed", "Closed"), i = _("Done", "Done"), c = _("HDCancelled", "Cancelled"), o = {
|
|
2570
2570
|
"In Progress": t,
|
|
2571
2571
|
Open: s,
|
|
2572
2572
|
New: s,
|
|
2573
2573
|
Closed: r,
|
|
2574
|
-
Fixed:
|
|
2575
|
-
Cancelled:
|
|
2574
|
+
Fixed: i,
|
|
2575
|
+
Cancelled: c
|
|
2576
2576
|
}, a = {
|
|
2577
2577
|
"In Progress": "#FFF2D6",
|
|
2578
2578
|
Responded: "#FFF2D6",
|
|
@@ -2582,9 +2582,9 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2582
2582
|
Fixed: "#bbfab7",
|
|
2583
2583
|
Done: "#bbfab7",
|
|
2584
2584
|
Cancelled: "#FFF2D6"
|
|
2585
|
-
}, d =
|
|
2585
|
+
}, d = R(() => a[e] || a.Closed, [e]), u = R(() => o[e] || e, [e]);
|
|
2586
2586
|
return /* @__PURE__ */ n.jsx(Jt, { color: d, children: /* @__PURE__ */ n.jsx(
|
|
2587
|
-
|
|
2587
|
+
Y.Text,
|
|
2588
2588
|
{
|
|
2589
2589
|
className: "primary-color-active",
|
|
2590
2590
|
style: { width: "100%", textAlign: "center" },
|
|
@@ -2592,7 +2592,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2592
2592
|
children: u
|
|
2593
2593
|
}
|
|
2594
2594
|
) }, e);
|
|
2595
|
-
}, xt =
|
|
2595
|
+
}, xt = O(kr), Ar = ({ onClick: e, ...t }) => /* @__PURE__ */ n.jsxs(
|
|
2596
2596
|
"div",
|
|
2597
2597
|
{
|
|
2598
2598
|
className: "w-ticket-card-container",
|
|
@@ -2601,7 +2601,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2601
2601
|
},
|
|
2602
2602
|
children: [
|
|
2603
2603
|
/* @__PURE__ */ n.jsx(
|
|
2604
|
-
|
|
2604
|
+
Y.Text,
|
|
2605
2605
|
{
|
|
2606
2606
|
strong: !0,
|
|
2607
2607
|
style: {
|
|
@@ -2615,8 +2615,8 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2615
2615
|
),
|
|
2616
2616
|
/* @__PURE__ */ n.jsxs("div", { className: "w-ticket-card-content-container", children: [
|
|
2617
2617
|
/* @__PURE__ */ n.jsxs("div", { className: "w-ticket-card-cat-code", children: [
|
|
2618
|
-
/* @__PURE__ */ n.jsx(
|
|
2619
|
-
/* @__PURE__ */ n.jsx(
|
|
2618
|
+
/* @__PURE__ */ n.jsx(Y.Text, { children: (t == null ? void 0 : t.TASK_CATEGORY) || Kn }),
|
|
2619
|
+
/* @__PURE__ */ n.jsx(Y.Text, { children: (t == null ? void 0 : t.TASK_CODE) || Kn })
|
|
2620
2620
|
] }),
|
|
2621
2621
|
/* @__PURE__ */ n.jsxs(
|
|
2622
2622
|
"div",
|
|
@@ -2627,28 +2627,28 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2627
2627
|
},
|
|
2628
2628
|
children: [
|
|
2629
2629
|
/* @__PURE__ */ n.jsx(xt, { taskStatus: t == null ? void 0 : t.TASK_STATUS }),
|
|
2630
|
-
/* @__PURE__ */ n.jsx(
|
|
2630
|
+
/* @__PURE__ */ n.jsx(Y.Text, { children: t == null ? void 0 : t.CREATED_DATE })
|
|
2631
2631
|
]
|
|
2632
2632
|
}
|
|
2633
2633
|
)
|
|
2634
2634
|
] })
|
|
2635
2635
|
]
|
|
2636
2636
|
}
|
|
2637
|
-
), Sr =
|
|
2638
|
-
const { objInitPayload: e, setObjInitPayload: t, parsedJWT: s } =
|
|
2639
|
-
var
|
|
2637
|
+
), Sr = O(Ar), gt = () => {
|
|
2638
|
+
const { objInitPayload: e, setObjInitPayload: t, parsedJWT: s } = q(), r = R(() => {
|
|
2639
|
+
var c;
|
|
2640
2640
|
return {
|
|
2641
2641
|
Authorization: `Bearer ${e == null ? void 0 : e.access_token}`,
|
|
2642
2642
|
coid: s == null ? void 0 : s.COID,
|
|
2643
|
-
"Acc-Name": (
|
|
2643
|
+
"Acc-Name": (c = s == null ? void 0 : s.INSTANCE) == null ? void 0 : c.toLowerCase(),
|
|
2644
2644
|
"Company-Id": e == null ? void 0 : e.companyid,
|
|
2645
2645
|
Language: e == null ? void 0 : e.lang
|
|
2646
2646
|
};
|
|
2647
2647
|
}, [e]);
|
|
2648
|
-
return async (
|
|
2649
|
-
var u, f,
|
|
2650
|
-
const { onSuccess: o, onError: a, onFinally: d } =
|
|
2651
|
-
(
|
|
2648
|
+
return async (c) => {
|
|
2649
|
+
var u, f, x;
|
|
2650
|
+
const { onSuccess: o, onError: a, onFinally: d } = c ?? {};
|
|
2651
|
+
(x = (f = (u = Re({
|
|
2652
2652
|
url: e == null ? void 0 : e.uriBackend,
|
|
2653
2653
|
params: {
|
|
2654
2654
|
ofid: "sfsystem.RefreshToken",
|
|
@@ -2659,10 +2659,10 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2659
2659
|
},
|
|
2660
2660
|
headers: r,
|
|
2661
2661
|
method: "POST"
|
|
2662
|
-
})) == null ? void 0 : u.then((
|
|
2663
|
-
var
|
|
2664
|
-
const
|
|
2665
|
-
access_token:
|
|
2662
|
+
})) == null ? void 0 : u.then((g) => {
|
|
2663
|
+
var w;
|
|
2664
|
+
const b = (w = g == null ? void 0 : g.data) == null ? void 0 : w.DATA, y = {
|
|
2665
|
+
access_token: b == null ? void 0 : b.JWT_TOKEN,
|
|
2666
2666
|
refresh_token: e == null ? void 0 : e.refresh_token,
|
|
2667
2667
|
uagent: e == null ? void 0 : e.uagent,
|
|
2668
2668
|
uriBackend: e == null ? void 0 : e.uriBackend,
|
|
@@ -2674,68 +2674,68 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2674
2674
|
uriBackendHRMGO: e == null ? void 0 : e.uriBackendHRMGO,
|
|
2675
2675
|
config: e == null ? void 0 : e.config
|
|
2676
2676
|
};
|
|
2677
|
-
t(
|
|
2678
|
-
})) == null ? void 0 : f.catch((
|
|
2679
|
-
typeof a == "function" && a(
|
|
2680
|
-
})) == null ||
|
|
2677
|
+
t(y), typeof o == "function" && o(g);
|
|
2678
|
+
})) == null ? void 0 : f.catch((g) => {
|
|
2679
|
+
typeof a == "function" && a(g);
|
|
2680
|
+
})) == null || x.finally(() => {
|
|
2681
2681
|
typeof d == "function" && d();
|
|
2682
2682
|
});
|
|
2683
2683
|
};
|
|
2684
2684
|
}, en = () => {
|
|
2685
2685
|
var o;
|
|
2686
|
-
const e =
|
|
2686
|
+
const e = z(new AbortController()), { objInitPayload: t, parsedJWT: s } = q(), r = gt(), i = {
|
|
2687
2687
|
Authorization: `Bearer ${t == null ? void 0 : t.access_token}`,
|
|
2688
2688
|
coid: s == null ? void 0 : s.COID,
|
|
2689
2689
|
"Acc-Name": (o = s == null ? void 0 : s.INSTANCE) == null ? void 0 : o.toLowerCase(),
|
|
2690
2690
|
"Company-Id": t == null ? void 0 : t.companyid,
|
|
2691
2691
|
Language: t == null ? void 0 : t.lang
|
|
2692
|
-
},
|
|
2692
|
+
}, c = async ({
|
|
2693
2693
|
url: a,
|
|
2694
2694
|
endpoint: d,
|
|
2695
2695
|
method: u = "POST",
|
|
2696
2696
|
headers: f,
|
|
2697
|
-
...
|
|
2697
|
+
...x
|
|
2698
2698
|
}) => {
|
|
2699
|
-
var
|
|
2700
|
-
const
|
|
2699
|
+
var w, A, p, E, h, m;
|
|
2700
|
+
const g = {
|
|
2701
2701
|
url: a || `${t == null ? void 0 : t.uriBackendHRMGO}${d}`,
|
|
2702
2702
|
...e.current && {
|
|
2703
|
-
signal: (
|
|
2703
|
+
signal: (w = e == null ? void 0 : e.current) == null ? void 0 : w.signal
|
|
2704
2704
|
},
|
|
2705
2705
|
headers: {
|
|
2706
|
-
...
|
|
2706
|
+
...i,
|
|
2707
2707
|
...f,
|
|
2708
2708
|
"Company-Code": t == null ? void 0 : t.companycode
|
|
2709
2709
|
},
|
|
2710
2710
|
method: u,
|
|
2711
|
-
...
|
|
2712
|
-
},
|
|
2713
|
-
return (
|
|
2714
|
-
(
|
|
2715
|
-
(
|
|
2716
|
-
Promise.reject(
|
|
2711
|
+
...x
|
|
2712
|
+
}, b = (A = Re) == null ? void 0 : A.create(g);
|
|
2713
|
+
return (E = (p = b == null ? void 0 : b.interceptors) == null ? void 0 : p.request) == null || E.use(
|
|
2714
|
+
(v) => (t != null && t.access_token && (v.headers.Authorization = `Bearer ${t == null ? void 0 : t.access_token}`), v),
|
|
2715
|
+
(v) => {
|
|
2716
|
+
Promise.reject(v);
|
|
2717
2717
|
}
|
|
2718
|
-
), (
|
|
2719
|
-
(
|
|
2720
|
-
async (
|
|
2721
|
-
var
|
|
2722
|
-
const
|
|
2723
|
-
if (((
|
|
2724
|
-
const
|
|
2725
|
-
return
|
|
2718
|
+
), (m = (h = b == null ? void 0 : b.interceptors) == null ? void 0 : h.response) == null || m.use(
|
|
2719
|
+
(v) => v,
|
|
2720
|
+
async (v) => {
|
|
2721
|
+
var j;
|
|
2722
|
+
const C = v == null ? void 0 : v.config;
|
|
2723
|
+
if (((j = v == null ? void 0 : v.response) == null ? void 0 : j.status) === 401) {
|
|
2724
|
+
const S = await r();
|
|
2725
|
+
return C.headers.Authorization = `Bearer ${S}`, Re(C);
|
|
2726
2726
|
}
|
|
2727
|
-
return Promise == null ? void 0 : Promise.reject(
|
|
2727
|
+
return Promise == null ? void 0 : Promise.reject(v);
|
|
2728
2728
|
}
|
|
2729
|
-
), await (
|
|
2729
|
+
), await (b == null ? void 0 : b.request(g));
|
|
2730
2730
|
};
|
|
2731
|
-
return
|
|
2731
|
+
return c.abort = () => {
|
|
2732
2732
|
var a;
|
|
2733
2733
|
e != null && e.current && ((a = e == null ? void 0 : e.current) == null || a.abort(), e.current = new AbortController());
|
|
2734
|
-
},
|
|
2735
|
-
}, Ct =
|
|
2736
|
-
const t = en(), [s, r] =
|
|
2737
|
-
var
|
|
2738
|
-
u(!0), (
|
|
2734
|
+
}, Z(() => () => c.abort(), []), c;
|
|
2735
|
+
}, Ct = Te({}), ve = () => ye(Ct), Lr = ({ children: e }) => {
|
|
2736
|
+
const t = en(), [s, r] = D([]), [i, c] = D(""), [o, a] = D(!1), [d, u] = D(!0), [f, x] = D(0), g = (b) => {
|
|
2737
|
+
var y, w, A, p;
|
|
2738
|
+
u(!0), (p = (A = t({
|
|
2739
2739
|
endpoint: "/helpdesk/myticket/ticket-list",
|
|
2740
2740
|
method: "POST",
|
|
2741
2741
|
data: {
|
|
@@ -2744,10 +2744,10 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2744
2744
|
SEARCH: {
|
|
2745
2745
|
MY_TICKET: !0,
|
|
2746
2746
|
TASK_MODULE: "HD",
|
|
2747
|
-
...((
|
|
2748
|
-
...
|
|
2749
|
-
...(
|
|
2750
|
-
CREATED_DATE: (
|
|
2747
|
+
...((y = Object.keys(b || {})) == null ? void 0 : y.length) > 0 && {
|
|
2748
|
+
...b,
|
|
2749
|
+
...(b == null ? void 0 : b.CREATED_DATE) && {
|
|
2750
|
+
CREATED_DATE: (w = le(b == null ? void 0 : b.CREATED_DATE)) == null ? void 0 : w.format(hn)
|
|
2751
2751
|
}
|
|
2752
2752
|
}
|
|
2753
2753
|
},
|
|
@@ -2756,34 +2756,34 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2756
2756
|
ORDER: "DESC"
|
|
2757
2757
|
}
|
|
2758
2758
|
}
|
|
2759
|
-
})) == null ? void 0 :
|
|
2760
|
-
var
|
|
2761
|
-
(
|
|
2762
|
-
})) == null ||
|
|
2759
|
+
})) == null ? void 0 : A.then((E) => {
|
|
2760
|
+
var h, m, v;
|
|
2761
|
+
(h = E == null ? void 0 : E.data) != null && h.DATA && r((v = (m = E == null ? void 0 : E.data) == null ? void 0 : m.DATA) == null ? void 0 : v.LIST);
|
|
2762
|
+
})) == null || p.finally(() => {
|
|
2763
2763
|
u(!1);
|
|
2764
2764
|
});
|
|
2765
2765
|
};
|
|
2766
|
-
return
|
|
2767
|
-
|
|
2766
|
+
return Z(() => {
|
|
2767
|
+
g();
|
|
2768
2768
|
}, []), /* @__PURE__ */ n.jsx(
|
|
2769
2769
|
Ct.Provider,
|
|
2770
2770
|
{
|
|
2771
2771
|
value: {
|
|
2772
2772
|
listTicket: s,
|
|
2773
|
-
ticketId:
|
|
2774
|
-
setTicketId:
|
|
2775
|
-
getListTicket:
|
|
2773
|
+
ticketId: i,
|
|
2774
|
+
setTicketId: c,
|
|
2775
|
+
getListTicket: g,
|
|
2776
2776
|
openFilter: o,
|
|
2777
2777
|
setOpenFilter: a,
|
|
2778
2778
|
loadingListTicket: d,
|
|
2779
2779
|
countFilters: f,
|
|
2780
|
-
setCountFilters:
|
|
2780
|
+
setCountFilters: x
|
|
2781
2781
|
},
|
|
2782
2782
|
children: e
|
|
2783
2783
|
}
|
|
2784
2784
|
);
|
|
2785
2785
|
}, Or = () => {
|
|
2786
|
-
const e =
|
|
2786
|
+
const e = _("SubjectSearch", "Subject Search"), t = _("AdvanceFilter", "Advance Filter"), s = z(null), { getListTicket: r, setOpenFilter: i, loadingListTicket: c, countFilters: o } = ve();
|
|
2787
2787
|
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, marginBottom: 12 }, children: [
|
|
2788
2788
|
/* @__PURE__ */ n.jsx(
|
|
2789
2789
|
Be,
|
|
@@ -2800,146 +2800,148 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2800
2800
|
}
|
|
2801
2801
|
),
|
|
2802
2802
|
/* @__PURE__ */ n.jsx(Se, { title: `${t} (${o})`, children: /* @__PURE__ */ n.jsx(Qt, { count: o, children: /* @__PURE__ */ n.jsx(
|
|
2803
|
-
|
|
2803
|
+
G,
|
|
2804
2804
|
{
|
|
2805
|
-
loading:
|
|
2805
|
+
loading: c,
|
|
2806
2806
|
icon: /* @__PURE__ */ n.jsx(P, { type: "filter" }),
|
|
2807
2807
|
onClick: () => {
|
|
2808
|
-
|
|
2808
|
+
i(!0);
|
|
2809
2809
|
}
|
|
2810
2810
|
}
|
|
2811
2811
|
) }) })
|
|
2812
2812
|
] }) });
|
|
2813
|
-
}, Rr =
|
|
2814
|
-
const t =
|
|
2815
|
-
const
|
|
2816
|
-
|
|
2817
|
-
r.current = !0, s.current = 0, d(0),
|
|
2818
|
-
},
|
|
2819
|
-
|
|
2820
|
-
},
|
|
2813
|
+
}, Rr = O(Or), mt = Te({}), he = () => ye(mt), Dr = ({ children: e }) => {
|
|
2814
|
+
const t = z(null), s = z(0), r = z(!1), i = z(null), [c, o] = D([]), [a, d] = D(0), [u, f] = D(!1), { objInitPayload: x, parsedJWT: g, isFirstRenderHelpdesk: b, setShowReadyWSHD: y } = q(), w = gt(), A = (m) => {
|
|
2815
|
+
const v = new WebSocket(m);
|
|
2816
|
+
v.onopen = () => {
|
|
2817
|
+
r.current = !0, s.current = 0, d(0), y(!0);
|
|
2818
|
+
}, v.onerror = (C) => {
|
|
2819
|
+
y(!1), console.error(`${ke} - WebSocket error:`, C);
|
|
2820
|
+
}, v.onclose = (C) => {
|
|
2821
2821
|
console.warn(
|
|
2822
2822
|
`${ke} - WebSocket disconnected:`,
|
|
2823
|
-
|
|
2824
|
-
), r.current = !1,
|
|
2825
|
-
},
|
|
2826
|
-
},
|
|
2827
|
-
var
|
|
2828
|
-
if (((
|
|
2823
|
+
C
|
|
2824
|
+
), r.current = !1, y(!1), !(C != null && C.wasClean) && (s == null ? void 0 : s.current) < Ie && (s.current += 1, d((j) => j + 1), clearTimeout(i.current), i.current = setTimeout(p, 2e3));
|
|
2825
|
+
}, v.onmessage = E(v), t.current = v;
|
|
2826
|
+
}, p = async () => {
|
|
2827
|
+
var L, F, $;
|
|
2828
|
+
if (((L = t.current) == null ? void 0 : L.readyState) === (WebSocket == null ? void 0 : WebSocket.CONNECTING)) return;
|
|
2829
2829
|
const {
|
|
2830
|
-
access_token:
|
|
2831
|
-
companyid:
|
|
2832
|
-
companycode:
|
|
2833
|
-
lang:
|
|
2834
|
-
uriBackendHRMGO:
|
|
2835
|
-
} =
|
|
2836
|
-
if (!
|
|
2830
|
+
access_token: m,
|
|
2831
|
+
companyid: v = "",
|
|
2832
|
+
companycode: C = "",
|
|
2833
|
+
lang: j = "",
|
|
2834
|
+
uriBackendHRMGO: S = ""
|
|
2835
|
+
} = x ?? {};
|
|
2836
|
+
if (!m || !v || !C) {
|
|
2837
2837
|
console.warn(
|
|
2838
2838
|
`${ke} - Missing required WebSocket credentials.`
|
|
2839
2839
|
);
|
|
2840
2840
|
return;
|
|
2841
2841
|
}
|
|
2842
|
-
const
|
|
2843
|
-
COMPANY_ID:
|
|
2844
|
-
COMPANY_CODE:
|
|
2845
|
-
LANGUAGE:
|
|
2846
|
-
ACC_NAME: (
|
|
2847
|
-
TOKEN:
|
|
2842
|
+
const I = `Bearer ${m}`, B = (F = `${S}/ws`) == null ? void 0 : F.replace("https://", "wss://"), M = {
|
|
2843
|
+
COMPANY_ID: v.toString(),
|
|
2844
|
+
COMPANY_CODE: C.toLowerCase(),
|
|
2845
|
+
LANGUAGE: j,
|
|
2846
|
+
ACC_NAME: ($ = g == null ? void 0 : g.INSTANCE) == null ? void 0 : $.toLowerCase(),
|
|
2847
|
+
TOKEN: I
|
|
2848
2848
|
};
|
|
2849
2849
|
try {
|
|
2850
|
-
const
|
|
2851
|
-
|
|
2852
|
-
|
|
2850
|
+
const H = await _s(
|
|
2851
|
+
M,
|
|
2852
|
+
Es
|
|
2853
2853
|
);
|
|
2854
|
-
if (!
|
|
2854
|
+
if (!H || r.current || (s == null ? void 0 : s.current) >= Ie) {
|
|
2855
2855
|
console.warn(
|
|
2856
2856
|
`${ke} - Skipping WebSocket connection attempt.`
|
|
2857
2857
|
);
|
|
2858
2858
|
return;
|
|
2859
2859
|
}
|
|
2860
|
-
t.current && t.current.close(),
|
|
2861
|
-
} catch (
|
|
2860
|
+
t.current && t.current.close(), A(`${B}?t=${H}`);
|
|
2861
|
+
} catch (H) {
|
|
2862
2862
|
console.error(
|
|
2863
2863
|
`${ke} - Failed to encrypt token:`,
|
|
2864
|
-
|
|
2864
|
+
H
|
|
2865
2865
|
);
|
|
2866
2866
|
}
|
|
2867
|
-
},
|
|
2868
|
-
var
|
|
2867
|
+
}, E = (m) => (v) => {
|
|
2868
|
+
var C;
|
|
2869
2869
|
try {
|
|
2870
|
-
if ((
|
|
2871
|
-
|
|
2870
|
+
if ((v == null ? void 0 : v.data) === "PING")
|
|
2871
|
+
m.send("PONG");
|
|
2872
2872
|
else {
|
|
2873
|
-
const { DATA:
|
|
2874
|
-
!
|
|
2873
|
+
const { DATA: j, EVENT: S } = JSON.parse(v.data || "{}");
|
|
2874
|
+
!b.current && S === "USER_ONLINE_NOTIF" && Array.isArray(j == null ? void 0 : j.EMPLOYEES) && (o((C = j == null ? void 0 : j.EMPLOYEES) == null ? void 0 : C.filter(Boolean)), b.current = !0), S === "TOKEN_EXPIRED" && w({
|
|
2875
2875
|
onSuccess: () => {
|
|
2876
|
-
|
|
2876
|
+
p();
|
|
2877
2877
|
}
|
|
2878
2878
|
});
|
|
2879
2879
|
}
|
|
2880
2880
|
} catch {
|
|
2881
2881
|
console.error(
|
|
2882
2882
|
`${ke} - Invalid WebSocket message:`,
|
|
2883
|
-
|
|
2883
|
+
v.data
|
|
2884
2884
|
);
|
|
2885
2885
|
}
|
|
2886
|
-
},
|
|
2887
|
-
var
|
|
2888
|
-
(
|
|
2886
|
+
}, h = ({ event: m, data: v, module: C = "HELPDESK_CHAT" }) => {
|
|
2887
|
+
var j;
|
|
2888
|
+
(j = t == null ? void 0 : t.current) == null || j.send(
|
|
2889
2889
|
JSON.stringify({
|
|
2890
|
-
EVENT:
|
|
2891
|
-
DATA:
|
|
2892
|
-
MODULE:
|
|
2890
|
+
EVENT: m,
|
|
2891
|
+
DATA: v,
|
|
2892
|
+
MODULE: C
|
|
2893
2893
|
})
|
|
2894
2894
|
);
|
|
2895
2895
|
};
|
|
2896
|
-
return
|
|
2897
|
-
|
|
2896
|
+
return Z(() => {
|
|
2897
|
+
b.current || p();
|
|
2898
2898
|
}, []), /* @__PURE__ */ n.jsx(
|
|
2899
2899
|
mt.Provider,
|
|
2900
2900
|
{
|
|
2901
2901
|
value: {
|
|
2902
2902
|
ws: t == null ? void 0 : t.current,
|
|
2903
|
-
onSendMsg:
|
|
2904
|
-
userOnline:
|
|
2905
|
-
connectWebSocket:
|
|
2903
|
+
onSendMsg: h,
|
|
2904
|
+
userOnline: c,
|
|
2905
|
+
connectWebSocket: p,
|
|
2906
2906
|
retryCountState: a,
|
|
2907
2907
|
setRetryCountState: d,
|
|
2908
|
-
retryCountRef: s
|
|
2908
|
+
retryCountRef: s,
|
|
2909
|
+
isGetResponse: u,
|
|
2910
|
+
setGetResponse: f
|
|
2909
2911
|
},
|
|
2910
2912
|
children: e
|
|
2911
2913
|
}
|
|
2912
2914
|
);
|
|
2913
2915
|
}, Nr = () => {
|
|
2914
|
-
var
|
|
2915
|
-
const { widgetProps: e } =
|
|
2916
|
+
var a;
|
|
2917
|
+
const { widgetProps: e } = q(), { listTicket: t, setTicketId: s, loadingListTicket: r } = ve(), { onSendMsg: i, setGetResponse: c } = he(), { xs: o } = ge.useBreakpoint();
|
|
2916
2918
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2917
2919
|
/* @__PURE__ */ n.jsx(Rr, {}),
|
|
2918
|
-
r ? /* @__PURE__ */ n.jsx("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: (
|
|
2920
|
+
r ? /* @__PURE__ */ n.jsx("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: (a = Array.from({ length: 5 })) == null ? void 0 : a.map((d, u) => /* @__PURE__ */ n.jsx(
|
|
2919
2921
|
de.Input,
|
|
2920
2922
|
{
|
|
2921
2923
|
style: { height: 80, width: "100%", borderRadius: 8 }
|
|
2922
2924
|
},
|
|
2923
|
-
|
|
2925
|
+
u
|
|
2924
2926
|
)) }) : /* @__PURE__ */ n.jsx(
|
|
2925
2927
|
"div",
|
|
2926
2928
|
{
|
|
2927
|
-
className: `w-list-ticket-container ${e != null && e.isSF ? "w-list-ticket-container-sf" : ""} ${
|
|
2929
|
+
className: `w-list-ticket-container ${e != null && e.isSF ? "w-list-ticket-container-sf" : ""} ${o ? "w-list-ticket-container-mobile" : ""}`,
|
|
2928
2930
|
...(t == null ? void 0 : t.length) === 0 && {
|
|
2929
2931
|
style: { justifyContent: "center" }
|
|
2930
2932
|
},
|
|
2931
|
-
children: (t == null ? void 0 : t.length) > 0 ? t == null ? void 0 : t.map((
|
|
2933
|
+
children: (t == null ? void 0 : t.length) > 0 ? t == null ? void 0 : t.map((d, u) => /* @__PURE__ */ bn(
|
|
2932
2934
|
Sr,
|
|
2933
2935
|
{
|
|
2934
|
-
...
|
|
2935
|
-
key:
|
|
2936
|
+
...d,
|
|
2937
|
+
key: u,
|
|
2936
2938
|
onClick: () => {
|
|
2937
|
-
c({
|
|
2939
|
+
c(!0), i({
|
|
2938
2940
|
event: "JOIN_ROOM",
|
|
2939
2941
|
data: {
|
|
2940
|
-
TASK_ID:
|
|
2942
|
+
TASK_ID: d == null ? void 0 : d.TASK_ID
|
|
2941
2943
|
}
|
|
2942
|
-
}), s(
|
|
2944
|
+
}), s(d == null ? void 0 : d.TASK_ID);
|
|
2943
2945
|
}
|
|
2944
2946
|
}
|
|
2945
2947
|
)) : /* @__PURE__ */ n.jsx(
|
|
@@ -2957,19 +2959,19 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2957
2959
|
}
|
|
2958
2960
|
)
|
|
2959
2961
|
] });
|
|
2960
|
-
}, Mr =
|
|
2961
|
-
var
|
|
2962
|
-
const [
|
|
2963
|
-
|
|
2962
|
+
}, Mr = O(Nr), Fr = ({ children: e, open: t, onClose: s, footer: r, styleContainer: i }) => {
|
|
2963
|
+
var g;
|
|
2964
|
+
const [c, o] = D(!1), a = z(), d = z(null), u = z(), f = R(() => t ? "w-fade-in-animate" : "w-fade-out-animate", [t]), x = (b) => {
|
|
2965
|
+
b.code === "Escape" && !b.shiftKey && !b.altKey && !b.ctrlKey && b.key === "Escape" && (b.stopPropagation(), typeof s == "function" && s());
|
|
2964
2966
|
};
|
|
2965
|
-
return
|
|
2966
|
-
const
|
|
2967
|
-
return
|
|
2968
|
-
|
|
2969
|
-
}, 250),
|
|
2967
|
+
return Z(() => {
|
|
2968
|
+
const b = u.current;
|
|
2969
|
+
return b && (clearTimeout(d.current), d.current = setTimeout(() => {
|
|
2970
|
+
b == null || b.focus();
|
|
2971
|
+
}, 250), b == null || b.addEventListener("keydown", x)), t && o(!1), clearTimeout(a == null ? void 0 : a.current), a.current = setTimeout(() => {
|
|
2970
2972
|
t || o(!0);
|
|
2971
2973
|
}, 300), () => {
|
|
2972
|
-
|
|
2974
|
+
b && (b == null || b.removeEventListener("keydown", x));
|
|
2973
2975
|
};
|
|
2974
2976
|
}, [t]), /* @__PURE__ */ n.jsxs(
|
|
2975
2977
|
"div",
|
|
@@ -2978,10 +2980,10 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2978
2980
|
tabIndex: 1,
|
|
2979
2981
|
ref: u,
|
|
2980
2982
|
style: {
|
|
2981
|
-
display:
|
|
2983
|
+
display: c ? "none" : "block",
|
|
2982
2984
|
height: "100%",
|
|
2983
|
-
...((
|
|
2984
|
-
...
|
|
2985
|
+
...((g = Object == null ? void 0 : Object.keys(i || {})) == null ? void 0 : g.length) > 0 && {
|
|
2986
|
+
...i
|
|
2985
2987
|
}
|
|
2986
2988
|
},
|
|
2987
2989
|
children: [
|
|
@@ -2990,90 +2992,97 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2990
2992
|
]
|
|
2991
2993
|
}
|
|
2992
2994
|
);
|
|
2993
|
-
}, bt =
|
|
2994
|
-
const [t, s] =
|
|
2995
|
-
var
|
|
2996
|
-
const
|
|
2997
|
-
...
|
|
2998
|
-
}))) == null ? void 0 :
|
|
2999
|
-
var
|
|
3000
|
-
return ((
|
|
2995
|
+
}, bt = O(Fr), vt = Te({}), De = () => ye(vt), Hr = ({ children: e }) => {
|
|
2996
|
+
const [t, s] = D([]), [r, i] = D({}), [c, o] = D(!0), [a, d] = D({}), u = z(!1), f = en(), { ticketId: x } = ve(), { ws: g, setGetResponse: b } = he(), { parsedJWT: y } = q(), w = R(() => {
|
|
2997
|
+
var S;
|
|
2998
|
+
const m = (r == null ? void 0 : r.CREATED_BY) ?? {}, v = (r == null ? void 0 : r.ASSIGNEE) ?? {}, C = (r == null ? void 0 : r.OTHER_ASSIGNEE) ?? [], j = (S = [m, v, ...C].map((I) => ({
|
|
2999
|
+
...I
|
|
3000
|
+
}))) == null ? void 0 : S.filter((I) => {
|
|
3001
|
+
var B;
|
|
3002
|
+
return ((B = Object.keys(I || {})) == null ? void 0 : B.length) > 0;
|
|
3001
3003
|
});
|
|
3002
|
-
return
|
|
3003
|
-
}, [r]),
|
|
3004
|
-
var
|
|
3005
|
-
o(!0), (
|
|
3004
|
+
return Tn({ ArrObj: j, key: "EMP_ID" });
|
|
3005
|
+
}, [r]), A = () => {
|
|
3006
|
+
var m, v;
|
|
3007
|
+
o(!0), (v = (m = f({
|
|
3006
3008
|
endpoint: "/helpdesk/chat/list",
|
|
3007
3009
|
method: "POST",
|
|
3008
3010
|
data: {
|
|
3009
3011
|
LIMIT: 10,
|
|
3010
3012
|
PAGE: 1,
|
|
3011
|
-
TASK_ID:
|
|
3013
|
+
TASK_ID: x
|
|
3012
3014
|
}
|
|
3013
|
-
})) == null ? void 0 :
|
|
3014
|
-
var
|
|
3015
|
-
if (((
|
|
3016
|
-
const
|
|
3017
|
-
|
|
3015
|
+
})) == null ? void 0 : m.then((C) => {
|
|
3016
|
+
var j, S, I, B, M, L;
|
|
3017
|
+
if (((I = (S = (j = C == null ? void 0 : C.data) == null ? void 0 : j.DATA) == null ? void 0 : S.LIST) == null ? void 0 : I.length) > 0) {
|
|
3018
|
+
const F = (L = (M = (B = C == null ? void 0 : C.data) == null ? void 0 : B.DATA) == null ? void 0 : M.LIST) == null ? void 0 : L.map(($) => ({
|
|
3019
|
+
...$,
|
|
3018
3020
|
ACTOR: {
|
|
3019
|
-
|
|
3021
|
+
...$ == null ? void 0 : $.ACTOR
|
|
3020
3022
|
}
|
|
3021
3023
|
}));
|
|
3022
|
-
s(Qe(
|
|
3024
|
+
s(Qe(F));
|
|
3023
3025
|
} else
|
|
3024
3026
|
s({});
|
|
3025
|
-
})) == null ||
|
|
3027
|
+
})) == null || v.finally(() => {
|
|
3026
3028
|
o(!1);
|
|
3027
3029
|
});
|
|
3028
|
-
},
|
|
3029
|
-
var
|
|
3030
|
-
(
|
|
3030
|
+
}, p = () => {
|
|
3031
|
+
var m;
|
|
3032
|
+
(m = f({
|
|
3031
3033
|
endpoint: "/helpdesk/myticket/get",
|
|
3032
3034
|
method: "POST",
|
|
3033
3035
|
data: {
|
|
3034
|
-
TASK_ID:
|
|
3036
|
+
TASK_ID: x
|
|
3035
3037
|
}
|
|
3036
|
-
})) == null ||
|
|
3037
|
-
var C,
|
|
3038
|
-
if ((C =
|
|
3039
|
-
const
|
|
3040
|
-
|
|
3038
|
+
})) == null || m.then((v) => {
|
|
3039
|
+
var C, j, S;
|
|
3040
|
+
if ((C = v == null ? void 0 : v.data) != null && C.DATA) {
|
|
3041
|
+
const I = (S = (j = v == null ? void 0 : v.data) == null ? void 0 : j.DATA) == null ? void 0 : S.LIST;
|
|
3042
|
+
i(I);
|
|
3041
3043
|
} else
|
|
3042
|
-
|
|
3044
|
+
i({});
|
|
3043
3045
|
});
|
|
3044
|
-
}, E = (
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
const
|
|
3052
|
-
|
|
3046
|
+
}, E = (m) => {
|
|
3047
|
+
var j;
|
|
3048
|
+
const v = (j = m == null ? void 0 : m.ACTOR) == null ? void 0 : j.EMP_ID, C = y == null ? void 0 : y.EMP_ID;
|
|
3049
|
+
b(!0), d((S) => ({
|
|
3050
|
+
...S,
|
|
3051
|
+
[v]: !1
|
|
3052
|
+
})), u.current || s((S) => {
|
|
3053
|
+
const I = yn(S), B = v == C ? "to" : "from", M = [...I, { ...m, CHAT_ALIGN: B }];
|
|
3054
|
+
return Qe(M);
|
|
3055
|
+
}), u.current = !1;
|
|
3056
|
+
}, h = (m) => {
|
|
3057
|
+
if ((m == null ? void 0 : m.data) !== "PING") {
|
|
3058
|
+
const v = JSON.parse((m == null ? void 0 : m.data) || "{}"), { DATA: C = {}, EVENT: j = "" } = v ?? {};
|
|
3059
|
+
(j === "RECEIVE_MESSAGE" || j === "RECEIVE_ANOTHER_MESSAGE") && E(C);
|
|
3053
3060
|
}
|
|
3054
3061
|
};
|
|
3055
|
-
return
|
|
3056
|
-
|
|
3057
|
-
}), [
|
|
3062
|
+
return Z(() => (x && (A(), p()), g && x && (g == null || g.addEventListener("message", h)), () => {
|
|
3063
|
+
g && x && (g == null || g.removeEventListener("message", h));
|
|
3064
|
+
}), [x]), /* @__PURE__ */ n.jsx(
|
|
3058
3065
|
vt.Provider,
|
|
3059
3066
|
{
|
|
3060
3067
|
value: {
|
|
3061
3068
|
chats: t,
|
|
3062
3069
|
setChats: s,
|
|
3063
3070
|
detailTicket: r,
|
|
3064
|
-
employees:
|
|
3065
|
-
isFromSelf:
|
|
3066
|
-
loadingChats:
|
|
3071
|
+
employees: w,
|
|
3072
|
+
isFromSelf: u,
|
|
3073
|
+
loadingChats: c,
|
|
3074
|
+
objTypingOtherEmp: a,
|
|
3075
|
+
setTypingOtherEmp: d
|
|
3067
3076
|
},
|
|
3068
3077
|
children: e
|
|
3069
3078
|
}
|
|
3070
3079
|
);
|
|
3071
|
-
},
|
|
3072
|
-
const { xs:
|
|
3080
|
+
}, Ir = ({ onClose: e }) => {
|
|
3081
|
+
const { xs: t } = ge.useBreakpoint(), { employees: s, detailTicket: r, loadingChats: i } = De(), { userOnline: c } = he(), o = R(() => {
|
|
3073
3082
|
var d;
|
|
3074
|
-
return (d =
|
|
3075
|
-
}, [
|
|
3076
|
-
return
|
|
3083
|
+
return (d = s == null ? void 0 : s.map((u) => u == null ? void 0 : u.FULL_NAME)) == null ? void 0 : d.join(", ");
|
|
3084
|
+
}, [s]), a = R(() => t ? "click" : "hover", [t]);
|
|
3085
|
+
return i ? /* @__PURE__ */ n.jsxs("div", { className: "w-ticket-detail-header-container", children: [
|
|
3077
3086
|
/* @__PURE__ */ n.jsx(de.Avatar, {}),
|
|
3078
3087
|
/* @__PURE__ */ n.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
3079
3088
|
/* @__PURE__ */ n.jsx(de.Input, {}),
|
|
@@ -3083,17 +3092,17 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3083
3092
|
] }) : /* @__PURE__ */ n.jsxs("div", { className: "w-ticket-detail-header-container", children: [
|
|
3084
3093
|
/* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8 }, children: [
|
|
3085
3094
|
/* @__PURE__ */ n.jsx(
|
|
3086
|
-
|
|
3095
|
+
G,
|
|
3087
3096
|
{
|
|
3088
3097
|
icon: /* @__PURE__ */ n.jsx(P, { type: "down" }),
|
|
3089
3098
|
style: { border: "none" },
|
|
3090
3099
|
onClick: () => {
|
|
3091
|
-
|
|
3100
|
+
e();
|
|
3092
3101
|
}
|
|
3093
3102
|
}
|
|
3094
3103
|
),
|
|
3095
3104
|
/* @__PURE__ */ n.jsx(
|
|
3096
|
-
|
|
3105
|
+
Ee.Group,
|
|
3097
3106
|
{
|
|
3098
3107
|
maxCount: 2,
|
|
3099
3108
|
maxPopoverTrigger: a,
|
|
@@ -3102,10 +3111,10 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3102
3111
|
backgroundColor: "#fde3cf",
|
|
3103
3112
|
cursor: "pointer"
|
|
3104
3113
|
},
|
|
3105
|
-
children:
|
|
3106
|
-
const f =
|
|
3107
|
-
return /* @__PURE__ */ n.jsx(Se, { title: d == null ? void 0 : d.FULL_NAME, trigger: a, children: /* @__PURE__ */
|
|
3108
|
-
|
|
3114
|
+
children: s == null ? void 0 : s.map((d, u) => {
|
|
3115
|
+
const f = c == null ? void 0 : c.includes(d == null ? void 0 : d.EMP_ID);
|
|
3116
|
+
return /* @__PURE__ */ n.jsx(Se, { title: d == null ? void 0 : d.FULL_NAME, trigger: a, children: /* @__PURE__ */ bn(
|
|
3117
|
+
Ee,
|
|
3109
3118
|
{
|
|
3110
3119
|
...f && {
|
|
3111
3120
|
style: {
|
|
@@ -3125,17 +3134,17 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3125
3134
|
/* @__PURE__ */ n.jsx(
|
|
3126
3135
|
Se,
|
|
3127
3136
|
{
|
|
3128
|
-
title: `${
|
|
3137
|
+
title: `${r == null ? void 0 : r.TASK_CODE} - ${r == null ? void 0 : r.SUBJECT}`,
|
|
3129
3138
|
trigger: a,
|
|
3130
|
-
children: /* @__PURE__ */ n.jsxs(
|
|
3131
|
-
|
|
3139
|
+
children: /* @__PURE__ */ n.jsxs(Y.Text, { className: "w-ticket-detail-header-text", children: [
|
|
3140
|
+
r == null ? void 0 : r.TASK_CODE,
|
|
3132
3141
|
" - ",
|
|
3133
|
-
|
|
3142
|
+
r == null ? void 0 : r.SUBJECT
|
|
3134
3143
|
] })
|
|
3135
3144
|
}
|
|
3136
3145
|
),
|
|
3137
3146
|
/* @__PURE__ */ n.jsx(Se, { title: o, trigger: a, children: /* @__PURE__ */ n.jsx(
|
|
3138
|
-
|
|
3147
|
+
Y.Text,
|
|
3139
3148
|
{
|
|
3140
3149
|
type: "secondary",
|
|
3141
3150
|
className: "w-ticket-detail-header-text",
|
|
@@ -3147,10 +3156,10 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3147
3156
|
) })
|
|
3148
3157
|
] })
|
|
3149
3158
|
] }),
|
|
3150
|
-
/* @__PURE__ */ n.jsx(xt, { taskStatus:
|
|
3159
|
+
/* @__PURE__ */ n.jsx(xt, { taskStatus: r == null ? void 0 : r.STATUS })
|
|
3151
3160
|
] });
|
|
3152
|
-
},
|
|
3153
|
-
const t =
|
|
3161
|
+
}, $r = O(Ir), Br = ({ ...e }) => {
|
|
3162
|
+
const t = R(() => (e == null ? void 0 : e.CHAT_ALIGN) === "to" ? "client" : "response", [e]);
|
|
3154
3163
|
return /* @__PURE__ */ n.jsxs("div", { className: `w-bubble-chat ${`w-${t}`}`, children: [
|
|
3155
3164
|
/* @__PURE__ */ n.jsx(
|
|
3156
3165
|
"p",
|
|
@@ -3169,8 +3178,8 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3169
3178
|
}
|
|
3170
3179
|
)
|
|
3171
3180
|
] });
|
|
3172
|
-
}, Ur =
|
|
3173
|
-
const t =
|
|
3181
|
+
}, Ur = O(Br), Wr = ({ ...e }) => {
|
|
3182
|
+
const t = _("Download", "Download"), s = R(() => (e == null ? void 0 : e.CHAT_ALIGN) === "to" ? "client" : "response", [e]), r = R(() => {
|
|
3174
3183
|
var d;
|
|
3175
3184
|
const a = e == null ? void 0 : e.ATTACHMENT;
|
|
3176
3185
|
if (a)
|
|
@@ -3181,14 +3190,14 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3181
3190
|
return a;
|
|
3182
3191
|
}
|
|
3183
3192
|
return "";
|
|
3184
|
-
}, [e]),
|
|
3193
|
+
}, [e]), i = R(() => {
|
|
3185
3194
|
if (r != null && r.includes(".")) {
|
|
3186
3195
|
const a = r == null ? void 0 : r.split(".");
|
|
3187
3196
|
return `.${a == null ? void 0 : a[(a == null ? void 0 : a.length) - 1]}`;
|
|
3188
3197
|
}
|
|
3189
3198
|
return "";
|
|
3190
|
-
}, [e, r]),
|
|
3191
|
-
|
|
3199
|
+
}, [e, r]), c = R(() => dn == null ? void 0 : dn.includes(i), [e, i]), o = () => {
|
|
3200
|
+
En({
|
|
3192
3201
|
downloadURL: e == null ? void 0 : e.ATTACHMENT,
|
|
3193
3202
|
fileName: r,
|
|
3194
3203
|
isOpenNewTab: !0
|
|
@@ -3200,10 +3209,10 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3200
3209
|
className: `w-bubble-chat ${`w-${s}`}`,
|
|
3201
3210
|
style: { display: "flex", flexDirection: "column" },
|
|
3202
3211
|
children: [
|
|
3203
|
-
|
|
3212
|
+
c ? /* @__PURE__ */ n.jsx(wn, { src: e == null ? void 0 : e.ATTACHMENT, fallback: hs }) : /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
|
|
3204
3213
|
/* @__PURE__ */ n.jsx(P, { type: "file" }),
|
|
3205
3214
|
/* @__PURE__ */ n.jsx(
|
|
3206
|
-
|
|
3215
|
+
Y.Link,
|
|
3207
3216
|
{
|
|
3208
3217
|
onClick: o,
|
|
3209
3218
|
style: { display: "block", width: 160 },
|
|
@@ -3211,8 +3220,8 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3211
3220
|
}
|
|
3212
3221
|
)
|
|
3213
3222
|
] }),
|
|
3214
|
-
|
|
3215
|
-
|
|
3223
|
+
c && /* @__PURE__ */ n.jsx(
|
|
3224
|
+
G,
|
|
3216
3225
|
{
|
|
3217
3226
|
onClick: o,
|
|
3218
3227
|
style: {
|
|
@@ -3237,8 +3246,8 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3237
3246
|
]
|
|
3238
3247
|
}
|
|
3239
3248
|
) });
|
|
3240
|
-
}, Vr =
|
|
3241
|
-
const t =
|
|
3249
|
+
}, Vr = O(Wr), Gr = ({ ...e }) => {
|
|
3250
|
+
const t = R(() => (e == null ? void 0 : e.CHAT_ALIGN) === "to" ? "client" : "response", [e]);
|
|
3242
3251
|
return /* @__PURE__ */ n.jsxs("div", { className: "w-ticket-info-chat-container", children: [
|
|
3243
3252
|
/* @__PURE__ */ n.jsx(
|
|
3244
3253
|
We,
|
|
@@ -3248,17 +3257,17 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3248
3257
|
sender: t
|
|
3249
3258
|
}
|
|
3250
3259
|
),
|
|
3251
|
-
/* @__PURE__ */ n.jsx(
|
|
3260
|
+
/* @__PURE__ */ n.jsx(Y.Text, { children: e == null ? void 0 : e.MESSAGE })
|
|
3252
3261
|
] });
|
|
3253
|
-
},
|
|
3254
|
-
const { widgetProps: e } =
|
|
3262
|
+
}, zr = O(Gr), ht = () => {
|
|
3263
|
+
const { widgetProps: e } = q(), t = pe.enc.Hex.parse(
|
|
3255
3264
|
pe.enc.Utf8.parse(e == null ? void 0 : e.keyEncrypt).toString()
|
|
3256
3265
|
), s = {
|
|
3257
3266
|
mode: pe.mode.ECB,
|
|
3258
3267
|
padding: pe.pad.Pkcs7
|
|
3259
3268
|
}, r = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|GreatDayHR/i.test(
|
|
3260
3269
|
navigator.userAgent
|
|
3261
|
-
),
|
|
3270
|
+
), i = (o) => {
|
|
3262
3271
|
if (typeof o == "number" && (o = o.toString()), !o) return "";
|
|
3263
3272
|
if (r) return window.encodeURIComponent(o);
|
|
3264
3273
|
const a = pe.enc.Utf8.parse(o), d = pe.AES.encrypt(
|
|
@@ -3271,24 +3280,24 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3271
3280
|
return {
|
|
3272
3281
|
paramsEncrypt: (o) => {
|
|
3273
3282
|
const [a, d = null] = o.split("?"), u = a.split("/").map((f) => {
|
|
3274
|
-
const [,
|
|
3275
|
-
return
|
|
3283
|
+
const [, x = null] = f.split(":");
|
|
3284
|
+
return x && (e != null && e.keyEncrypt) ? i(x) : f;
|
|
3276
3285
|
}).join("/");
|
|
3277
3286
|
return d ? `${u}?${d}` : u;
|
|
3278
3287
|
},
|
|
3279
|
-
encrypt:
|
|
3288
|
+
encrypt: i
|
|
3280
3289
|
};
|
|
3281
|
-
},
|
|
3282
|
-
const t =
|
|
3290
|
+
}, Yr = ({ ...e }) => {
|
|
3291
|
+
const t = _("ViewFAQ", "View FAQ"), s = _(
|
|
3283
3292
|
"FAQUnavailable",
|
|
3284
3293
|
"FAQ unavailable"
|
|
3285
|
-
), r =
|
|
3294
|
+
), r = _(
|
|
3286
3295
|
"ThisFAQIsUnavailable",
|
|
3287
3296
|
"This FAQ is unavailable"
|
|
3288
|
-
), { paramsEncrypt:
|
|
3297
|
+
), { paramsEncrypt: i } = ht(), { history: c } = q(), o = R(() => (e == null ? void 0 : e.CHAT_ALIGN) === "to" ? "client" : "response", [e]), a = R(() => e == null ? void 0 : e.FAQ_ID, [e]);
|
|
3289
3298
|
return /* @__PURE__ */ n.jsxs("div", { className: `w-bubble-chat ${`w-${o}`}`, children: [
|
|
3290
3299
|
/* @__PURE__ */ n.jsx(
|
|
3291
|
-
|
|
3300
|
+
Y.Text,
|
|
3292
3301
|
{
|
|
3293
3302
|
style: {
|
|
3294
3303
|
backgroundColor: "rgb(244, 245, 246)",
|
|
@@ -3302,17 +3311,17 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3302
3311
|
}
|
|
3303
3312
|
),
|
|
3304
3313
|
a ? /* @__PURE__ */ n.jsx(
|
|
3305
|
-
|
|
3314
|
+
G,
|
|
3306
3315
|
{
|
|
3307
3316
|
block: !0,
|
|
3308
3317
|
onClick: () => {
|
|
3309
|
-
typeof
|
|
3310
|
-
|
|
3318
|
+
typeof c < "u" && c.push(
|
|
3319
|
+
i(`/standard/hrm.helpdesk.FAQ-detail/:${a}`)
|
|
3311
3320
|
);
|
|
3312
3321
|
},
|
|
3313
3322
|
children: t
|
|
3314
3323
|
}
|
|
3315
|
-
) : /* @__PURE__ */ n.jsx(
|
|
3324
|
+
) : /* @__PURE__ */ n.jsx(Y.Text, { children: r }),
|
|
3316
3325
|
/* @__PURE__ */ n.jsx(
|
|
3317
3326
|
We,
|
|
3318
3327
|
{
|
|
@@ -3322,10 +3331,10 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3322
3331
|
}
|
|
3323
3332
|
)
|
|
3324
3333
|
] });
|
|
3325
|
-
}, Kr =
|
|
3334
|
+
}, Kr = O(Yr), qr = ({ ...e }) => {
|
|
3326
3335
|
switch (e == null ? void 0 : e.CHAT_TYPE) {
|
|
3327
3336
|
case "info":
|
|
3328
|
-
return /* @__PURE__ */ n.jsx(
|
|
3337
|
+
return /* @__PURE__ */ n.jsx(zr, { ...e });
|
|
3329
3338
|
case "faq":
|
|
3330
3339
|
return /* @__PURE__ */ n.jsx(Kr, { ...e });
|
|
3331
3340
|
case "chat":
|
|
@@ -3333,37 +3342,42 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3333
3342
|
default:
|
|
3334
3343
|
return null;
|
|
3335
3344
|
}
|
|
3336
|
-
}, Jr =
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3345
|
+
}, Jr = O(qr), Qr = () => {
|
|
3346
|
+
var y;
|
|
3347
|
+
const [e, t] = D([]), s = _("And", "and"), r = _("IsTyping", "Is Typing"), i = _("People", "People"), { employees: c, setTypingOtherEmp: o, objTypingOtherEmp: a } = De(), { ws: d, setGetResponse: u } = he(), { parsedJWT: f } = q(), x = R(() => e == null ? void 0 : e.filter((w) => a == null ? void 0 : a[w == null ? void 0 : w.EMP_ID]), [a, e]), g = R(() => {
|
|
3348
|
+
const w = x == null ? void 0 : x.map((A) => A == null ? void 0 : A.FULL_NAME);
|
|
3349
|
+
if ((x == null ? void 0 : x.length) > 2) {
|
|
3350
|
+
const A = w == null ? void 0 : w.filter((E, h) => h <= 1), p = w == null ? void 0 : w.filter((E, h) => h > 1);
|
|
3351
|
+
return `${A == null ? void 0 : A.join(", ")}, ${s} ${p == null ? void 0 : p.length} ${i} ${r}`;
|
|
3342
3352
|
}
|
|
3343
|
-
return `${
|
|
3344
|
-
}, [
|
|
3345
|
-
if ((
|
|
3346
|
-
const
|
|
3347
|
-
if (
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3353
|
+
return `${w == null ? void 0 : w.join(", ")} ${r}`;
|
|
3354
|
+
}, [e, x]), b = (w) => {
|
|
3355
|
+
if ((w == null ? void 0 : w.data) !== "PING") {
|
|
3356
|
+
const A = JSON.parse((w == null ? void 0 : w.data) || "{}"), { DATA: p = {}, EVENT: E = "" } = A ?? {}, h = p == null ? void 0 : p.EMPLOYEE_ID, m = f == null ? void 0 : f.EMP_ID;
|
|
3357
|
+
if (E === "TYPING") {
|
|
3358
|
+
h === m ? u(!1) : o((j) => ({
|
|
3359
|
+
...j,
|
|
3360
|
+
[h]: p == null ? void 0 : p.IS_TYPING
|
|
3361
|
+
}));
|
|
3362
|
+
const v = c == null ? void 0 : c.find(
|
|
3363
|
+
(j) => (j == null ? void 0 : j.EMP_ID) === (p == null ? void 0 : p.EMPLOYEE_ID)
|
|
3364
|
+
), C = {
|
|
3365
|
+
...p,
|
|
3352
3366
|
...v
|
|
3353
3367
|
};
|
|
3354
|
-
|
|
3355
|
-
const
|
|
3356
|
-
ArrObj:
|
|
3368
|
+
t((j) => {
|
|
3369
|
+
const S = [...j, C], I = Tn({
|
|
3370
|
+
ArrObj: S,
|
|
3357
3371
|
key: "EMPLOYEE_ID"
|
|
3358
3372
|
});
|
|
3359
|
-
return
|
|
3373
|
+
return I == null ? void 0 : I.filter((B) => B == null ? void 0 : B.IS_TYPING);
|
|
3360
3374
|
});
|
|
3361
3375
|
}
|
|
3362
3376
|
}
|
|
3363
3377
|
};
|
|
3364
|
-
return
|
|
3365
|
-
|
|
3366
|
-
}), [
|
|
3378
|
+
return Z(() => (d && (d == null || d.addEventListener("message", b)), () => {
|
|
3379
|
+
d && (d == null || d.removeEventListener("message", b));
|
|
3380
|
+
}), [c]), (y = Object.values(a || {})) != null && y.every((w) => w === !1) ? null : /* @__PURE__ */ n.jsxs(
|
|
3367
3381
|
"div",
|
|
3368
3382
|
{
|
|
3369
3383
|
style: {
|
|
@@ -3373,7 +3387,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3373
3387
|
},
|
|
3374
3388
|
children: [
|
|
3375
3389
|
/* @__PURE__ */ n.jsx(
|
|
3376
|
-
|
|
3390
|
+
Ee.Group,
|
|
3377
3391
|
{
|
|
3378
3392
|
maxCount: 2,
|
|
3379
3393
|
maxPopoverTrigger: "click",
|
|
@@ -3382,44 +3396,44 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3382
3396
|
backgroundColor: "#fde3cf",
|
|
3383
3397
|
cursor: "pointer"
|
|
3384
3398
|
},
|
|
3385
|
-
children:
|
|
3399
|
+
children: x == null ? void 0 : x.map((w, A) => /* @__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 }) }, A))
|
|
3386
3400
|
}
|
|
3387
3401
|
),
|
|
3388
|
-
/* @__PURE__ */ n.jsx(
|
|
3389
|
-
(
|
|
3402
|
+
/* @__PURE__ */ n.jsx(Y.Text, { children: g }),
|
|
3403
|
+
(x == null ? void 0 : x.length) > 0 ? /* @__PURE__ */ n.jsx(ft, {}) : null
|
|
3390
3404
|
]
|
|
3391
3405
|
}
|
|
3392
3406
|
);
|
|
3393
|
-
}, Zr =
|
|
3394
|
-
var
|
|
3395
|
-
const { chats: e } = De(), { widgetProps: t } =
|
|
3396
|
-
return
|
|
3407
|
+
}, Zr = O(Qr), Xr = () => {
|
|
3408
|
+
var c;
|
|
3409
|
+
const { chats: e } = De(), { widgetProps: t } = q(), { activeTab: s } = be(), r = z(), { xs: i } = ge.useBreakpoint();
|
|
3410
|
+
return Z(() => {
|
|
3397
3411
|
clearTimeout(r.current), r.current = setTimeout(() => {
|
|
3398
|
-
|
|
3412
|
+
me(".w-ticket-detail-content-container");
|
|
3399
3413
|
}, 350);
|
|
3400
3414
|
}, [s]), /* @__PURE__ */ n.jsxs(
|
|
3401
3415
|
"div",
|
|
3402
3416
|
{
|
|
3403
|
-
className: `w-ticket-detail-content-container ${
|
|
3417
|
+
className: `w-ticket-detail-content-container ${i ? t != null && t.isSF ? "w-ticket-detail-content-container-sf-mobile" : "w-ticket-detail-content-container-mobile" : ""} `,
|
|
3404
3418
|
children: [
|
|
3405
|
-
(
|
|
3419
|
+
(c = Object.keys(e || {})) == null ? void 0 : c.map((o) => {
|
|
3406
3420
|
var d, u;
|
|
3407
3421
|
const a = e == null ? void 0 : e[o];
|
|
3408
3422
|
return /* @__PURE__ */ n.jsxs(gn, { children: [
|
|
3409
3423
|
/* @__PURE__ */ n.jsx("div", { className: "w-datekey-chats", children: (d = le(o)) == null ? void 0 : d.format("ddd, DD MMMM YYYY") }),
|
|
3410
|
-
/* @__PURE__ */ n.jsx("div", { className: "w-bubble-chat-container", children: (u = rt(a)) == null ? void 0 : u.map((f,
|
|
3411
|
-
var
|
|
3412
|
-
const
|
|
3424
|
+
/* @__PURE__ */ n.jsx("div", { className: "w-bubble-chat-container", children: (u = rt(a)) == null ? void 0 : u.map((f, x) => {
|
|
3425
|
+
var y, w;
|
|
3426
|
+
const g = (f == null ? void 0 : f.CHAT_ALIGN) === "to" ? "client" : "response", b = f == null ? void 0 : f.CHAT_TYPE;
|
|
3413
3427
|
return /* @__PURE__ */ n.jsxs(gn, { children: [
|
|
3414
|
-
|
|
3428
|
+
g === "response" && b !== "info" && /* @__PURE__ */ n.jsx(
|
|
3415
3429
|
Ue,
|
|
3416
3430
|
{
|
|
3417
|
-
src: (
|
|
3418
|
-
name: (
|
|
3431
|
+
src: (y = f == null ? void 0 : f.ACTOR) == null ? void 0 : y.PHOTO,
|
|
3432
|
+
name: (w = f == null ? void 0 : f.ACTOR) == null ? void 0 : w.FULL_NAME
|
|
3419
3433
|
}
|
|
3420
3434
|
),
|
|
3421
3435
|
/* @__PURE__ */ n.jsx(Jr, { ...f })
|
|
3422
|
-
] },
|
|
3436
|
+
] }, x);
|
|
3423
3437
|
}) })
|
|
3424
3438
|
] }, o);
|
|
3425
3439
|
}),
|
|
@@ -3427,9 +3441,9 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3427
3441
|
]
|
|
3428
3442
|
}
|
|
3429
3443
|
);
|
|
3430
|
-
}, Pr =
|
|
3431
|
-
var
|
|
3432
|
-
const { chats: e, loadingChats: t } = De(), { widgetProps: s } =
|
|
3444
|
+
}, Pr = O(Xr), eo = () => {
|
|
3445
|
+
var c, o;
|
|
3446
|
+
const { chats: e, loadingChats: t } = De(), { widgetProps: s } = q(), { xs: r } = ge.useBreakpoint(), i = R(() => {
|
|
3433
3447
|
var d;
|
|
3434
3448
|
const a = [fn];
|
|
3435
3449
|
return r && (s != null && s.isSF ? a == null || a.push(
|
|
@@ -3439,8 +3453,8 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3439
3453
|
return t ? /* @__PURE__ */ n.jsx(
|
|
3440
3454
|
"div",
|
|
3441
3455
|
{
|
|
3442
|
-
className: `${
|
|
3443
|
-
children: (
|
|
3456
|
+
className: `${i} w-ticket-detail-loading-chats`,
|
|
3457
|
+
children: (c = Array.from({ length: 3 })) == null ? void 0 : c.map((a, d) => {
|
|
3444
3458
|
const u = d % 2 === 0;
|
|
3445
3459
|
return /* @__PURE__ */ n.jsxs(
|
|
3446
3460
|
"div",
|
|
@@ -3483,7 +3497,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3483
3497
|
) : ((o = Object.keys(e || {})) == null ? void 0 : o.length) === 0 ? /* @__PURE__ */ n.jsx(
|
|
3484
3498
|
"div",
|
|
3485
3499
|
{
|
|
3486
|
-
className:
|
|
3500
|
+
className: i,
|
|
3487
3501
|
style: {
|
|
3488
3502
|
display: "flex",
|
|
3489
3503
|
justifyContent: "center",
|
|
@@ -3492,8 +3506,8 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3492
3506
|
children: /* @__PURE__ */ n.jsx(Xn, {})
|
|
3493
3507
|
}
|
|
3494
3508
|
) : /* @__PURE__ */ n.jsx(Pr, {});
|
|
3495
|
-
}, no =
|
|
3496
|
-
const t =
|
|
3509
|
+
}, no = O(eo), to = ({ ...e }) => {
|
|
3510
|
+
const t = z(0);
|
|
3497
3511
|
return /* @__PURE__ */ n.jsxs(
|
|
3498
3512
|
"div",
|
|
3499
3513
|
{
|
|
@@ -3503,7 +3517,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3503
3517
|
},
|
|
3504
3518
|
children: [
|
|
3505
3519
|
/* @__PURE__ */ n.jsx(
|
|
3506
|
-
|
|
3520
|
+
wn,
|
|
3507
3521
|
{
|
|
3508
3522
|
nameFallback: e == null ? void 0 : e.FULL_NAME,
|
|
3509
3523
|
src: e == null ? void 0 : e.PHOTO,
|
|
@@ -3513,30 +3527,30 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3513
3527
|
preview: !1,
|
|
3514
3528
|
loading: "lazy",
|
|
3515
3529
|
onError: (s) => {
|
|
3516
|
-
t.current += 1, (t == null ? void 0 : t.current) < 3 ? s.target.src = ot(e == null ? void 0 : e.PHOTO) : s.target.src =
|
|
3530
|
+
t.current += 1, (t == null ? void 0 : t.current) < 3 ? s.target.src = ot(e == null ? void 0 : e.PHOTO) : s.target.src = jn(e == null ? void 0 : e.FULL_NAME);
|
|
3517
3531
|
}
|
|
3518
3532
|
}
|
|
3519
3533
|
),
|
|
3520
3534
|
/* @__PURE__ */ n.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
3521
|
-
/* @__PURE__ */ n.jsx(
|
|
3522
|
-
/* @__PURE__ */ n.jsx(
|
|
3523
|
-
/* @__PURE__ */ n.jsx(
|
|
3524
|
-
/* @__PURE__ */ n.jsx(
|
|
3535
|
+
/* @__PURE__ */ n.jsx(Y.Text, { strong: !0, style: { fontSize: 18 }, children: e == null ? void 0 : e.FULL_NAME }),
|
|
3536
|
+
/* @__PURE__ */ n.jsx(Y.Text, { children: e == null ? void 0 : e.POSITION_NAME }, e == null ? void 0 : e.POSITION_NAME),
|
|
3537
|
+
/* @__PURE__ */ n.jsx(Y.Text, { children: e == null ? void 0 : e.DEPT_NAME }),
|
|
3538
|
+
/* @__PURE__ */ n.jsx(Y.Text, { children: e == null ? void 0 : e.WORKLOCATION })
|
|
3525
3539
|
] })
|
|
3526
3540
|
]
|
|
3527
3541
|
}
|
|
3528
3542
|
);
|
|
3529
|
-
}, so =
|
|
3530
|
-
var
|
|
3531
|
-
const s = en(), [r,
|
|
3543
|
+
}, so = O(to), ro = ({ setLoadingUpload: e, isLoadingUpload: t }) => {
|
|
3544
|
+
var p, E;
|
|
3545
|
+
const s = en(), [r, i] = D({}), c = z(null), o = _(
|
|
3532
3546
|
"ImageMustSmallerThan",
|
|
3533
3547
|
"Image must smaller than"
|
|
3534
|
-
), a =
|
|
3548
|
+
), a = _(
|
|
3535
3549
|
"MaximumFileSizeExceeded",
|
|
3536
3550
|
"Maximum file size exceeded"
|
|
3537
|
-
), { onSendMsg: d } =
|
|
3538
|
-
var
|
|
3539
|
-
(
|
|
3551
|
+
), { onSendMsg: d } = he(), { employees: u, setChats: f, isFromSelf: x } = De(), { ticketId: g } = ve(), { activeTab: b } = be(), y = () => {
|
|
3552
|
+
var h;
|
|
3553
|
+
(h = s({
|
|
3540
3554
|
endpoint: "/upload/get-upload-config",
|
|
3541
3555
|
data: {
|
|
3542
3556
|
LIMIT: 1,
|
|
@@ -3545,83 +3559,83 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3545
3559
|
UPLOAD_CODE: "helpdesk"
|
|
3546
3560
|
}
|
|
3547
3561
|
}
|
|
3548
|
-
})) == null ||
|
|
3549
|
-
var
|
|
3550
|
-
const
|
|
3551
|
-
(
|
|
3562
|
+
})) == null || h.then((m) => {
|
|
3563
|
+
var C, j;
|
|
3564
|
+
const v = (j = (C = m == null ? void 0 : m.data) == null ? void 0 : C.DATA) == null ? void 0 : j.LIST;
|
|
3565
|
+
(v == null ? void 0 : v.length) > 0 && i(v == null ? void 0 : v[0]);
|
|
3552
3566
|
});
|
|
3553
|
-
},
|
|
3554
|
-
var
|
|
3555
|
-
const
|
|
3556
|
-
return
|
|
3567
|
+
}, w = (h) => {
|
|
3568
|
+
var C, j, S;
|
|
3569
|
+
const m = h.size / 1024 / 1024, v = (r == null ? void 0 : r.MAXFILESIZE) / 1024;
|
|
3570
|
+
return m > v && ((C = Ce) == null || C.destroy(), (j = Ce) == null || j.config({
|
|
3557
3571
|
getContainer: () => document.querySelector(".w-widget-content-container"),
|
|
3558
3572
|
top: 28,
|
|
3559
3573
|
placement: "top"
|
|
3560
|
-
}), (
|
|
3574
|
+
}), (S = Ce) == null || S.error({
|
|
3561
3575
|
message: a,
|
|
3562
|
-
description: `${o} ${
|
|
3576
|
+
description: `${o} ${v == null ? void 0 : v.toFixed(
|
|
3563
3577
|
1
|
|
3564
3578
|
)} MB!`,
|
|
3565
3579
|
className: "w-notification-content",
|
|
3566
3580
|
duration: 3
|
|
3567
3581
|
})), !1;
|
|
3568
|
-
},
|
|
3569
|
-
var
|
|
3582
|
+
}, A = (h) => {
|
|
3583
|
+
var v, C;
|
|
3570
3584
|
e(!0);
|
|
3571
|
-
const
|
|
3572
|
-
|
|
3585
|
+
const m = new FormData();
|
|
3586
|
+
m.append("UPLOAD_CODE", r == null ? void 0 : r.UPLOAD_CODE), m.append("UPLOAD_TYPE", r == null ? void 0 : r.UPLOAD_TYPE), m.append("FILE", h), (C = (v = s({
|
|
3573
3587
|
endpoint: "/upload/temp",
|
|
3574
|
-
data:
|
|
3588
|
+
data: m,
|
|
3575
3589
|
headers: {
|
|
3576
3590
|
"Content-Type": "multipart/form-data"
|
|
3577
3591
|
}
|
|
3578
|
-
})) == null ? void 0 :
|
|
3579
|
-
var
|
|
3580
|
-
if ((
|
|
3581
|
-
const
|
|
3582
|
-
ATTACHMENT:
|
|
3592
|
+
})) == null ? void 0 : v.then((j) => {
|
|
3593
|
+
var S, I, B, M, L;
|
|
3594
|
+
if ((I = (S = j == null ? void 0 : j.data) == null ? void 0 : S.DATA) != null && I.LIST) {
|
|
3595
|
+
const F = (M = (B = j == null ? void 0 : j.data) == null ? void 0 : B.DATA) == null ? void 0 : M.LIST, $ = {
|
|
3596
|
+
ATTACHMENT: F == null ? void 0 : F.VIEW_PATH,
|
|
3583
3597
|
FAQ_ID: null,
|
|
3584
3598
|
MESSAGE: "",
|
|
3585
|
-
CREATED_DATE: (
|
|
3599
|
+
CREATED_DATE: (L = le()) == null ? void 0 : L.format(`${hn} HH:mm:ss`),
|
|
3586
3600
|
CHAT_ALIGN: "to",
|
|
3587
3601
|
CHAT_TYPE: "chat"
|
|
3588
3602
|
};
|
|
3589
|
-
f((
|
|
3590
|
-
const
|
|
3591
|
-
return Qe(
|
|
3592
|
-
}),
|
|
3603
|
+
f((H) => {
|
|
3604
|
+
const Q = [...yn(H), $];
|
|
3605
|
+
return Qe(Q);
|
|
3606
|
+
}), x.current = !0, d({
|
|
3593
3607
|
event: "SEND_MESSAGE",
|
|
3594
3608
|
data: {
|
|
3595
|
-
ATTACHMENT:
|
|
3609
|
+
ATTACHMENT: F == null ? void 0 : F.TEMP_PATH,
|
|
3596
3610
|
FAQ_ID: null,
|
|
3597
3611
|
MESSAGE: "",
|
|
3598
|
-
EMPLOYEES: u == null ? void 0 : u.map((
|
|
3599
|
-
TASK_ID:
|
|
3612
|
+
EMPLOYEES: u == null ? void 0 : u.map((H) => H == null ? void 0 : H.EMP_ID),
|
|
3613
|
+
TASK_ID: g
|
|
3600
3614
|
}
|
|
3601
|
-
}), clearTimeout(
|
|
3602
|
-
|
|
3615
|
+
}), clearTimeout(c.current), c.current = setTimeout(() => {
|
|
3616
|
+
me(".w-ticket-detail-content-container");
|
|
3603
3617
|
}, 350);
|
|
3604
3618
|
}
|
|
3605
|
-
})) == null ||
|
|
3619
|
+
})) == null || C.finally(() => {
|
|
3606
3620
|
e(!1);
|
|
3607
3621
|
});
|
|
3608
3622
|
};
|
|
3609
|
-
return
|
|
3610
|
-
|
|
3611
|
-
}, []),
|
|
3612
|
-
var
|
|
3613
|
-
(
|
|
3614
|
-
}, [
|
|
3623
|
+
return Z(() => {
|
|
3624
|
+
y();
|
|
3625
|
+
}, []), Z(() => {
|
|
3626
|
+
var h;
|
|
3627
|
+
(h = Ce) == null || h.destroy();
|
|
3628
|
+
}, [b]), /* @__PURE__ */ n.jsx(
|
|
3615
3629
|
Zn,
|
|
3616
3630
|
{
|
|
3617
|
-
beforeUpload:
|
|
3631
|
+
beforeUpload: w,
|
|
3618
3632
|
fileList: [],
|
|
3619
|
-
accept: (
|
|
3620
|
-
onChange: (
|
|
3621
|
-
|
|
3633
|
+
accept: (E = (p = r == null ? void 0 : r.EXT_LIST) == null ? void 0 : p.split(",")) == null ? void 0 : E.map((h) => `.${h}`),
|
|
3634
|
+
onChange: (h) => {
|
|
3635
|
+
A(h == null ? void 0 : h.file);
|
|
3622
3636
|
},
|
|
3623
3637
|
children: /* @__PURE__ */ n.jsx(
|
|
3624
|
-
|
|
3638
|
+
G,
|
|
3625
3639
|
{
|
|
3626
3640
|
loading: t,
|
|
3627
3641
|
icon: /* @__PURE__ */ n.jsx(P, { type: "paper-clip" }),
|
|
@@ -3631,108 +3645,119 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3631
3645
|
)
|
|
3632
3646
|
}
|
|
3633
3647
|
);
|
|
3634
|
-
}, oo =
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3648
|
+
}, oo = O(ro), co = (e) => {
|
|
3649
|
+
var r;
|
|
3650
|
+
const t = z(null), s = z(null);
|
|
3651
|
+
return s != null && s.current && ((r = s.current) == null || r.update(e)), Z(() => {
|
|
3652
|
+
var c;
|
|
3653
|
+
const i = (c = window == null ? void 0 : window.customElements) == null ? void 0 : c.get("em-emoji-picker");
|
|
3654
|
+
return s.current = new (i || os)({ ...e, ref: t }), () => {
|
|
3655
|
+
s.current = null;
|
|
3656
|
+
};
|
|
3657
|
+
}, []), mn.createElement("div", { ref: t });
|
|
3658
|
+
}, io = ({ refInput: e }) => {
|
|
3659
|
+
const { xs: t } = ge.useBreakpoint(), s = R(() => t ? "click" : "hover", [t]), r = () => {
|
|
3660
|
+
var g;
|
|
3661
|
+
const c = (g = e == null ? void 0 : e.current) == null ? void 0 : g.textarea;
|
|
3662
|
+
if (!c)
|
|
3639
3663
|
return !1;
|
|
3640
|
-
const { selectionStart: o, selectionEnd: a, value: d } =
|
|
3664
|
+
const { selectionStart: o, selectionEnd: a, value: d } = c, u = d == null ? void 0 : d.substring(0, o), f = d == null ? void 0 : d.substring(o, a), x = d == null ? void 0 : d.substring(a);
|
|
3641
3665
|
return {
|
|
3642
3666
|
before: u,
|
|
3643
3667
|
selectedText: f,
|
|
3644
|
-
after:
|
|
3668
|
+
after: x,
|
|
3645
3669
|
selectionStart: o,
|
|
3646
3670
|
selectionEnd: a,
|
|
3647
3671
|
text: d
|
|
3648
3672
|
};
|
|
3649
|
-
},
|
|
3650
|
-
var
|
|
3651
|
-
(
|
|
3652
|
-
const o = (
|
|
3673
|
+
}, i = (c) => {
|
|
3674
|
+
var x, g;
|
|
3675
|
+
(x = e == null ? void 0 : e.current) == null || x.focus();
|
|
3676
|
+
const o = (g = e == null ? void 0 : e.current) == null ? void 0 : g.textarea, a = c == null ? void 0 : c.native;
|
|
3653
3677
|
if (!o) return;
|
|
3654
3678
|
const { before: d, after: u } = r(), f = `${d}${a}${u}`;
|
|
3655
3679
|
typeof document.execCommand == "function" ? document.execCommand("insertText", !1, a) : o.value = f;
|
|
3656
3680
|
};
|
|
3657
3681
|
return /* @__PURE__ */ n.jsx(
|
|
3658
|
-
|
|
3682
|
+
vn,
|
|
3659
3683
|
{
|
|
3660
3684
|
trigger: s,
|
|
3661
3685
|
content: /* @__PURE__ */ n.jsx(
|
|
3662
|
-
|
|
3686
|
+
co,
|
|
3663
3687
|
{
|
|
3664
|
-
onEmojiSelect: (
|
|
3665
|
-
c
|
|
3688
|
+
onEmojiSelect: (c) => {
|
|
3689
|
+
i(c);
|
|
3666
3690
|
},
|
|
3667
3691
|
theme: "auto"
|
|
3668
3692
|
}
|
|
3669
3693
|
),
|
|
3670
|
-
children: /* @__PURE__ */ n.jsx(
|
|
3694
|
+
children: /* @__PURE__ */ n.jsx(G, { icon: /* @__PURE__ */ n.jsx(P, { type: "smile" }), style: { border: "none" } })
|
|
3671
3695
|
}
|
|
3672
3696
|
);
|
|
3673
|
-
},
|
|
3674
|
-
const [e, t] =
|
|
3675
|
-
var
|
|
3676
|
-
return ((
|
|
3677
|
-
}, [
|
|
3678
|
-
...
|
|
3697
|
+
}, lo = O(io), ao = () => {
|
|
3698
|
+
const [e, t] = D(0), [s, r] = D(!1), i = z(null), c = z(null), o = z(!1), a = z(null), { onSendMsg: d, setGetResponse: u, isGetResponse: f } = he(), { ticketId: x } = ve(), { isActiveTabVA: g } = be(), { employees: b, setChats: y, isFromSelf: w, detailTicket: A } = De(), p = R(() => s || !f, [s, f]), E = R(() => {
|
|
3699
|
+
var C;
|
|
3700
|
+
return ((C = A == null ? void 0 : A.STATUS) == null ? void 0 : C.toString().toLowerCase()) === "closed";
|
|
3701
|
+
}, [A == null ? void 0 : A.STATUS]), h = R(() => b == null ? void 0 : b.map((C) => ({
|
|
3702
|
+
...C,
|
|
3679
3703
|
label: /* @__PURE__ */ n.jsx(
|
|
3680
|
-
|
|
3704
|
+
vn,
|
|
3681
3705
|
{
|
|
3682
3706
|
placement: "left",
|
|
3683
|
-
content: /* @__PURE__ */ n.jsx(so, { ...
|
|
3684
|
-
children: /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(Ue, { src:
|
|
3707
|
+
content: /* @__PURE__ */ n.jsx(so, { ...C }),
|
|
3708
|
+
children: /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(Ue, { src: C == null ? void 0 : C.PHOTO, name: C == null ? void 0 : C.FULL_NAME }) })
|
|
3685
3709
|
}
|
|
3686
3710
|
),
|
|
3687
|
-
value:
|
|
3688
|
-
})), [
|
|
3689
|
-
var
|
|
3690
|
-
|
|
3711
|
+
value: C == null ? void 0 : C.FULL_NAME
|
|
3712
|
+
})), [b]), m = () => {
|
|
3713
|
+
var S, I, B;
|
|
3714
|
+
u(!1);
|
|
3715
|
+
const C = (I = (S = i == null ? void 0 : i.current) == null ? void 0 : S.textarea) == null ? void 0 : I.value;
|
|
3691
3716
|
d({
|
|
3692
3717
|
event: "SEND_MESSAGE",
|
|
3693
3718
|
data: {
|
|
3694
3719
|
ATTACHMENT: "",
|
|
3695
3720
|
FAQ_ID: null,
|
|
3696
|
-
MESSAGE:
|
|
3697
|
-
EMPLOYEES:
|
|
3698
|
-
TASK_ID:
|
|
3721
|
+
MESSAGE: C,
|
|
3722
|
+
EMPLOYEES: b == null ? void 0 : b.map((M) => M == null ? void 0 : M.EMP_ID),
|
|
3723
|
+
TASK_ID: x
|
|
3699
3724
|
}
|
|
3700
3725
|
});
|
|
3701
|
-
const
|
|
3726
|
+
const j = {
|
|
3702
3727
|
ATTACHMENT: "",
|
|
3703
3728
|
FAQ_ID: null,
|
|
3704
|
-
MESSAGE:
|
|
3705
|
-
CREATED_DATE: (
|
|
3729
|
+
MESSAGE: C,
|
|
3730
|
+
CREATED_DATE: (B = le()) == null ? void 0 : B.format(`${hn} HH:mm:ss`),
|
|
3706
3731
|
CHAT_ALIGN: "to",
|
|
3707
3732
|
CHAT_TYPE: "chat"
|
|
3708
3733
|
};
|
|
3709
|
-
|
|
3710
|
-
const
|
|
3711
|
-
return Qe(
|
|
3712
|
-
}),
|
|
3713
|
-
},
|
|
3714
|
-
window.clearTimeout(
|
|
3734
|
+
y((M) => {
|
|
3735
|
+
const F = [...yn(M), j];
|
|
3736
|
+
return Qe(F);
|
|
3737
|
+
}), w.current = !0, me(".w-ticket-detail-content-container"), t((M) => M + 1);
|
|
3738
|
+
}, v = () => {
|
|
3739
|
+
window.clearTimeout(c.current), o.current || (o.current = !0, d({
|
|
3715
3740
|
event: "TYPING",
|
|
3716
3741
|
data: {
|
|
3717
|
-
TASK_ID:
|
|
3742
|
+
TASK_ID: x,
|
|
3718
3743
|
IS_TYPING: !0
|
|
3719
3744
|
}
|
|
3720
|
-
})),
|
|
3745
|
+
})), c.current = setTimeout(() => {
|
|
3721
3746
|
d({
|
|
3722
3747
|
event: "TYPING",
|
|
3723
3748
|
data: {
|
|
3724
|
-
TASK_ID:
|
|
3749
|
+
TASK_ID: x,
|
|
3725
3750
|
IS_TYPING: !1
|
|
3726
3751
|
}
|
|
3727
3752
|
}), o.current = !1;
|
|
3728
3753
|
}, 250);
|
|
3729
3754
|
};
|
|
3730
|
-
return
|
|
3731
|
-
|
|
3732
|
-
var
|
|
3733
|
-
(
|
|
3755
|
+
return Z(() => {
|
|
3756
|
+
i != null && i.current && !g && x && (clearTimeout(a.current), a.current = setTimeout(() => {
|
|
3757
|
+
var C;
|
|
3758
|
+
(C = i == null ? void 0 : i.current) == null || C.focus();
|
|
3734
3759
|
}, 500));
|
|
3735
|
-
}, [
|
|
3760
|
+
}, [g, x]), E ? null : /* @__PURE__ */ n.jsxs(
|
|
3736
3761
|
"div",
|
|
3737
3762
|
{
|
|
3738
3763
|
className: "w-input-container",
|
|
@@ -3740,7 +3765,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3740
3765
|
margin: 0
|
|
3741
3766
|
},
|
|
3742
3767
|
children: [
|
|
3743
|
-
/* @__PURE__ */ n.jsx(
|
|
3768
|
+
/* @__PURE__ */ n.jsx(lo, { refInput: i }),
|
|
3744
3769
|
/* @__PURE__ */ n.jsx(
|
|
3745
3770
|
oo,
|
|
3746
3771
|
{
|
|
@@ -3749,58 +3774,63 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3749
3774
|
}
|
|
3750
3775
|
),
|
|
3751
3776
|
/* @__PURE__ */ n.jsx(
|
|
3752
|
-
|
|
3777
|
+
Un,
|
|
3753
3778
|
{
|
|
3754
3779
|
autoSize: {
|
|
3755
3780
|
maxRows: 3
|
|
3756
3781
|
},
|
|
3757
|
-
ref:
|
|
3782
|
+
ref: i,
|
|
3758
3783
|
className: "w-input-helpdesk",
|
|
3759
3784
|
placeholder: "Type a message...",
|
|
3760
3785
|
onChange: () => {
|
|
3761
|
-
|
|
3786
|
+
v();
|
|
3762
3787
|
},
|
|
3763
|
-
onKeyDown: (
|
|
3764
|
-
((
|
|
3788
|
+
onKeyDown: (C) => {
|
|
3789
|
+
((C == null ? void 0 : C.code) === "Enter" || (C == null ? void 0 : C.key) === "Enter") && !(C != null && C.shiftKey) && m();
|
|
3765
3790
|
},
|
|
3766
|
-
filterOption: (
|
|
3767
|
-
var
|
|
3768
|
-
const
|
|
3769
|
-
return
|
|
3791
|
+
filterOption: (C, j) => {
|
|
3792
|
+
var B, M, L;
|
|
3793
|
+
const S = (B = C == null ? void 0 : C.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();
|
|
3794
|
+
return I == null ? void 0 : I.includes(S);
|
|
3770
3795
|
},
|
|
3771
|
-
children:
|
|
3796
|
+
children: h == null ? void 0 : h.map((C, j) => /* @__PURE__ */ n.jsx(Un.Option, { ...C, children: C == null ? void 0 : C.label }, j))
|
|
3772
3797
|
},
|
|
3773
3798
|
e
|
|
3774
3799
|
),
|
|
3775
3800
|
/* @__PURE__ */ n.jsx(
|
|
3776
|
-
|
|
3801
|
+
G,
|
|
3777
3802
|
{
|
|
3778
|
-
loading:
|
|
3779
|
-
disabled:
|
|
3780
|
-
className: "w-send-btn
|
|
3781
|
-
style: {
|
|
3782
|
-
|
|
3803
|
+
loading: p,
|
|
3804
|
+
disabled: p,
|
|
3805
|
+
className: "w-send-btn",
|
|
3806
|
+
style: {
|
|
3807
|
+
backgroundColor: "var(--primary-color, #395ebc)",
|
|
3808
|
+
...p && {
|
|
3809
|
+
color: "white"
|
|
3810
|
+
}
|
|
3811
|
+
},
|
|
3812
|
+
icon: /* @__PURE__ */ n.jsx(P, { type: p ? "loading" : "send" }),
|
|
3783
3813
|
shape: "circle",
|
|
3784
|
-
onClick:
|
|
3814
|
+
onClick: m
|
|
3785
3815
|
}
|
|
3786
3816
|
)
|
|
3787
3817
|
]
|
|
3788
3818
|
}
|
|
3789
3819
|
);
|
|
3790
|
-
},
|
|
3791
|
-
var
|
|
3820
|
+
}, uo = O(ao), fo = ({ title: e, subTitle: t, onClose: s, open: r, styleWrapper: i }) => {
|
|
3821
|
+
var c;
|
|
3792
3822
|
return r ? /* @__PURE__ */ n.jsx(
|
|
3793
3823
|
"div",
|
|
3794
3824
|
{
|
|
3795
3825
|
className: "w-banner-container",
|
|
3796
|
-
...((
|
|
3797
|
-
style:
|
|
3826
|
+
...((c = Object.keys(i || {})) == null ? void 0 : c.length) > 0 && {
|
|
3827
|
+
style: i
|
|
3798
3828
|
},
|
|
3799
3829
|
children: /* @__PURE__ */ n.jsxs("div", { className: "w-banner-content", children: [
|
|
3800
|
-
e && /* @__PURE__ */ n.jsx(
|
|
3830
|
+
e && /* @__PURE__ */ n.jsx(Y.Text, { style: { fontSize: 16, fontWeight: 600 }, children: e }),
|
|
3801
3831
|
t && /* @__PURE__ */ n.jsx("div", { className: "w-banner-subtitle", children: t }),
|
|
3802
3832
|
typeof s == "function" && /* @__PURE__ */ n.jsx("div", { className: "w-banner-close-btn", children: /* @__PURE__ */ n.jsx(
|
|
3803
|
-
|
|
3833
|
+
G,
|
|
3804
3834
|
{
|
|
3805
3835
|
style: { border: "none", background: "transparent" },
|
|
3806
3836
|
icon: /* @__PURE__ */ n.jsx(P, { type: "close" }),
|
|
@@ -3810,25 +3840,25 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3810
3840
|
] })
|
|
3811
3841
|
}
|
|
3812
3842
|
) : null;
|
|
3813
|
-
},
|
|
3814
|
-
const e =
|
|
3843
|
+
}, Et = O(fo), xo = () => {
|
|
3844
|
+
const e = _(
|
|
3815
3845
|
"ForMoreInformationOfThisTicket",
|
|
3816
3846
|
"For more information of this ticket"
|
|
3817
|
-
), t =
|
|
3847
|
+
), t = _("ClickHere", "Click here"), { ticketId: s } = ve(), { history: r } = q(), { encrypt: i } = ht();
|
|
3818
3848
|
return /* @__PURE__ */ n.jsx(
|
|
3819
|
-
|
|
3849
|
+
Et,
|
|
3820
3850
|
{
|
|
3821
3851
|
subTitle: /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
3822
|
-
/* @__PURE__ */ n.jsx(
|
|
3852
|
+
/* @__PURE__ */ n.jsx(Y.Text, { children: e }),
|
|
3823
3853
|
/* @__PURE__ */ n.jsx(
|
|
3824
|
-
|
|
3854
|
+
Y.Link,
|
|
3825
3855
|
{
|
|
3826
3856
|
strong: !0,
|
|
3827
3857
|
className: "w-reconnect-manual",
|
|
3828
3858
|
onClick: () => {
|
|
3829
|
-
const
|
|
3859
|
+
const c = i(s);
|
|
3830
3860
|
r.push(
|
|
3831
|
-
`/standard/hrm.helpdesk.my-ticket.ticket-details?id=${
|
|
3861
|
+
`/standard/hrm.helpdesk.my-ticket.ticket-details?id=${c}`
|
|
3832
3862
|
);
|
|
3833
3863
|
},
|
|
3834
3864
|
children: t
|
|
@@ -3841,27 +3871,27 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3841
3871
|
}
|
|
3842
3872
|
}
|
|
3843
3873
|
);
|
|
3844
|
-
},
|
|
3845
|
-
/* @__PURE__ */ n.jsx(
|
|
3846
|
-
/* @__PURE__ */ n.jsx(
|
|
3874
|
+
}, go = O(xo), Co = ({ onClose: e, visible: t }) => /* @__PURE__ */ n.jsx(bt, { open: t, onClose: e, children: /* @__PURE__ */ n.jsxs(Hr, { children: [
|
|
3875
|
+
/* @__PURE__ */ n.jsx($r, { onClose: e }),
|
|
3876
|
+
/* @__PURE__ */ n.jsx(go, {}),
|
|
3847
3877
|
/* @__PURE__ */ n.jsx(no, {}),
|
|
3848
|
-
/* @__PURE__ */ n.jsx(
|
|
3849
|
-
] }) }),
|
|
3850
|
-
const e =
|
|
3878
|
+
/* @__PURE__ */ n.jsx(uo, {})
|
|
3879
|
+
] }) }), mo = O(Co), bo = () => {
|
|
3880
|
+
const e = _("AdvanceFilter", "Advance Filter"), t = _("Subject", "Subject"), s = _(
|
|
3851
3881
|
"TicketCategory",
|
|
3852
3882
|
"Ticket Category"
|
|
3853
|
-
), r =
|
|
3854
|
-
const
|
|
3883
|
+
), r = _("TicketStatus", "Ticket Status"), i = _("CreatedDate", "Created Date"), c = _("New", "New"), o = _("Open", "Open"), a = _("Reopen", "Reopen"), d = _("InProgress", "In Progress"), u = _("Responded", "Responded"), f = _("Fixed", "Fixed"), x = _("Done", "Done"), g = _("Closed", "Closed"), b = _("HDCancelled", "Cancelled"), y = _("Clear", "Clear"), w = _("Filter", "Filter"), A = en(), [p] = oe.useForm(), { openFilter: E, setOpenFilter: h, getListTicket: m, setCountFilters: v } = ve(), [C, j] = D([]), S = R(() => {
|
|
3884
|
+
const M = `${c}/${o}/${a}`, L = `${d}/${u}`, F = `${f}/${x}`;
|
|
3855
3885
|
return [
|
|
3856
|
-
{ value: 3, label:
|
|
3857
|
-
{ value: 1, label:
|
|
3858
|
-
{ value: 4, label:
|
|
3859
|
-
{ value: 6, label:
|
|
3860
|
-
{ value: 8, label:
|
|
3886
|
+
{ value: 3, label: M },
|
|
3887
|
+
{ value: 1, label: L },
|
|
3888
|
+
{ value: 4, label: F },
|
|
3889
|
+
{ value: 6, label: g },
|
|
3890
|
+
{ value: 8, label: b }
|
|
3861
3891
|
];
|
|
3862
|
-
}, []),
|
|
3863
|
-
var
|
|
3864
|
-
(
|
|
3892
|
+
}, []), I = () => {
|
|
3893
|
+
var M;
|
|
3894
|
+
(M = A({
|
|
3865
3895
|
endpoint: "/helpdesk/category/list",
|
|
3866
3896
|
data: {
|
|
3867
3897
|
LIMIT: 999999,
|
|
@@ -3869,82 +3899,82 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3869
3899
|
SELECTOR: "*",
|
|
3870
3900
|
SORT: { FIELD: "ORDER_NO", ORDER: "ASC" }
|
|
3871
3901
|
}
|
|
3872
|
-
})) == null ||
|
|
3873
|
-
var
|
|
3874
|
-
if ((
|
|
3875
|
-
const
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
label:
|
|
3879
|
-
value:
|
|
3902
|
+
})) == null || M.then((L) => {
|
|
3903
|
+
var F, $, H;
|
|
3904
|
+
if ((F = L == null ? void 0 : L.data) != null && F.DATA) {
|
|
3905
|
+
const V = (H = ($ = L == null ? void 0 : L.data) == null ? void 0 : $.DATA) == null ? void 0 : H.LIST;
|
|
3906
|
+
j(
|
|
3907
|
+
V == null ? void 0 : V.map((Q) => ({
|
|
3908
|
+
label: Q == null ? void 0 : Q.CATEGORY_NAME,
|
|
3909
|
+
value: Q == null ? void 0 : Q.CATEGORY_CODE
|
|
3880
3910
|
}))
|
|
3881
3911
|
);
|
|
3882
3912
|
}
|
|
3883
3913
|
});
|
|
3884
|
-
},
|
|
3885
|
-
var
|
|
3886
|
-
const
|
|
3887
|
-
|
|
3888
|
-
const
|
|
3889
|
-
|
|
3914
|
+
}, B = () => {
|
|
3915
|
+
var F, $;
|
|
3916
|
+
const M = p == null ? void 0 : p.getFieldsValue(!0);
|
|
3917
|
+
m(M);
|
|
3918
|
+
const L = ($ = (F = Object.values(M || {})) == null ? void 0 : F.flat()) == null ? void 0 : $.filter(Boolean);
|
|
3919
|
+
v(L == null ? void 0 : L.length);
|
|
3890
3920
|
};
|
|
3891
|
-
return
|
|
3892
|
-
|
|
3921
|
+
return Z(() => {
|
|
3922
|
+
I();
|
|
3893
3923
|
}, []), /* @__PURE__ */ n.jsxs(
|
|
3894
3924
|
bt,
|
|
3895
3925
|
{
|
|
3896
3926
|
styleContainer: { height: "calc(100% - 50px)" },
|
|
3897
|
-
open:
|
|
3927
|
+
open: E,
|
|
3898
3928
|
onClose: () => {
|
|
3899
|
-
|
|
3929
|
+
h(!1);
|
|
3900
3930
|
},
|
|
3901
3931
|
footer: /* @__PURE__ */ n.jsxs("div", { className: "w-ticket-list-advance-filter-footer", children: [
|
|
3902
3932
|
/* @__PURE__ */ n.jsx(
|
|
3903
|
-
|
|
3933
|
+
G,
|
|
3904
3934
|
{
|
|
3905
3935
|
onClick: () => {
|
|
3906
|
-
|
|
3936
|
+
p == null || p.resetFields(), B();
|
|
3907
3937
|
},
|
|
3908
|
-
children:
|
|
3938
|
+
children: y
|
|
3909
3939
|
},
|
|
3910
3940
|
"clear"
|
|
3911
3941
|
),
|
|
3912
3942
|
/* @__PURE__ */ n.jsx(
|
|
3913
|
-
|
|
3943
|
+
G,
|
|
3914
3944
|
{
|
|
3915
3945
|
type: "primary",
|
|
3916
3946
|
onClick: () => {
|
|
3917
|
-
|
|
3947
|
+
B(), h(!1);
|
|
3918
3948
|
},
|
|
3919
|
-
children:
|
|
3949
|
+
children: w
|
|
3920
3950
|
},
|
|
3921
3951
|
"filter"
|
|
3922
3952
|
)
|
|
3923
3953
|
] }),
|
|
3924
3954
|
children: [
|
|
3925
|
-
/* @__PURE__ */ n.jsx(
|
|
3926
|
-
/* @__PURE__ */ n.jsx("div", { className: "w-ticket-list-advance-filter-form-container", children: /* @__PURE__ */ n.jsxs(oe, { form:
|
|
3955
|
+
/* @__PURE__ */ n.jsx(Y.Text, { strong: !0, style: { fontSize: 16 }, children: e }),
|
|
3956
|
+
/* @__PURE__ */ n.jsx("div", { className: "w-ticket-list-advance-filter-form-container", children: /* @__PURE__ */ n.jsxs(oe, { form: p, layout: "vertical", children: [
|
|
3927
3957
|
/* @__PURE__ */ n.jsx(oe.Item, { label: t, name: "TASK_NAME", children: /* @__PURE__ */ n.jsx(Be, { allowClear: !0 }) }),
|
|
3928
|
-
/* @__PURE__ */ n.jsx(oe.Item, { label: s, name: "CATEGORY_CODE", children: /* @__PURE__ */ n.jsx(
|
|
3929
|
-
/* @__PURE__ */ n.jsx(oe.Item, { label: r, name: "TASK_STATUS", children: /* @__PURE__ */ n.jsx(
|
|
3930
|
-
/* @__PURE__ */ n.jsx(oe.Item, { label:
|
|
3958
|
+
/* @__PURE__ */ n.jsx(oe.Item, { label: s, name: "CATEGORY_CODE", children: /* @__PURE__ */ n.jsx(Wn, { options: C, mode: "multiple", allowClear: !0 }) }),
|
|
3959
|
+
/* @__PURE__ */ n.jsx(oe.Item, { label: r, name: "TASK_STATUS", children: /* @__PURE__ */ n.jsx(Wn, { options: S, mode: "multiple", allowClear: !0 }) }),
|
|
3960
|
+
/* @__PURE__ */ n.jsx(oe.Item, { label: i, name: "CREATED_DATE", children: /* @__PURE__ */ n.jsx(Zt, { style: { width: "100%" }, allowClear: !0 }) })
|
|
3931
3961
|
] }) })
|
|
3932
3962
|
]
|
|
3933
3963
|
}
|
|
3934
3964
|
);
|
|
3935
|
-
},
|
|
3936
|
-
const e =
|
|
3965
|
+
}, vo = O(bo), ho = () => {
|
|
3966
|
+
const e = _(
|
|
3937
3967
|
"ReconnectManually",
|
|
3938
3968
|
"Reconnect Manually"
|
|
3939
|
-
), t =
|
|
3969
|
+
), t = _(
|
|
3940
3970
|
"HelpdeskWebsocket",
|
|
3941
3971
|
"Helpdesk Websocket"
|
|
3942
|
-
), s =
|
|
3943
|
-
connectWebSocket:
|
|
3944
|
-
retryCountState:
|
|
3972
|
+
), s = _("NotConnected", "Not Connected"), r = _("Connecting", "Connecting"), {
|
|
3973
|
+
connectWebSocket: i,
|
|
3974
|
+
retryCountState: c,
|
|
3945
3975
|
setRetryCountState: o,
|
|
3946
3976
|
retryCountRef: a
|
|
3947
|
-
} =
|
|
3977
|
+
} = he(), d = R(() => c === Ie ? `${t} ${s}` : `${t} ${r}`, [c]);
|
|
3948
3978
|
return /* @__PURE__ */ n.jsx(
|
|
3949
3979
|
"div",
|
|
3950
3980
|
{
|
|
@@ -3957,18 +3987,18 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3957
3987
|
children: /* @__PURE__ */ n.jsx(
|
|
3958
3988
|
Xt,
|
|
3959
3989
|
{
|
|
3960
|
-
...
|
|
3990
|
+
...c === Ie ? {
|
|
3961
3991
|
status: "warning"
|
|
3962
3992
|
} : {
|
|
3963
3993
|
icon: null
|
|
3964
3994
|
},
|
|
3965
3995
|
title: d,
|
|
3966
|
-
extra:
|
|
3967
|
-
|
|
3996
|
+
extra: c === Ie ? /* @__PURE__ */ n.jsx(
|
|
3997
|
+
G,
|
|
3968
3998
|
{
|
|
3969
3999
|
type: "primary",
|
|
3970
4000
|
onClick: () => {
|
|
3971
|
-
a.current = 0, o(0),
|
|
4001
|
+
a.current = 0, o(0), i();
|
|
3972
4002
|
},
|
|
3973
4003
|
children: e
|
|
3974
4004
|
},
|
|
@@ -3977,7 +4007,6 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3977
4007
|
P,
|
|
3978
4008
|
{
|
|
3979
4009
|
type: "loading",
|
|
3980
|
-
className: "w-spin-animate",
|
|
3981
4010
|
style: {
|
|
3982
4011
|
paddingTop: 8
|
|
3983
4012
|
}
|
|
@@ -3987,15 +4016,15 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3987
4016
|
)
|
|
3988
4017
|
}
|
|
3989
4018
|
);
|
|
3990
|
-
},
|
|
3991
|
-
const { setTicketId: e, ticketId: t, openFilter: s } =
|
|
4019
|
+
}, Eo = O(ho), To = () => {
|
|
4020
|
+
const { setTicketId: e, ticketId: t, openFilter: s } = ve(), { onSendMsg: r, setGetResponse: i } = he(), { showReadyWSHD: c } = q();
|
|
3992
4021
|
return c ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
3993
4022
|
/* @__PURE__ */ n.jsx(
|
|
3994
|
-
|
|
4023
|
+
mo,
|
|
3995
4024
|
{
|
|
3996
4025
|
visible: t,
|
|
3997
4026
|
onClose: () => {
|
|
3998
|
-
e(""), r({
|
|
4027
|
+
e(""), i(!1), r({
|
|
3999
4028
|
event: "LEAVE_ROOM",
|
|
4000
4029
|
data: {
|
|
4001
4030
|
TASK_ID: t
|
|
@@ -4005,24 +4034,24 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4005
4034
|
}
|
|
4006
4035
|
),
|
|
4007
4036
|
/* @__PURE__ */ n.jsx("div", { style: { display: !t && !s ? "block" : "none" }, children: /* @__PURE__ */ n.jsx(Mr, {}) }),
|
|
4008
|
-
/* @__PURE__ */ n.jsx(
|
|
4009
|
-
] }) : /* @__PURE__ */ n.jsx(
|
|
4010
|
-
},
|
|
4011
|
-
const e =
|
|
4037
|
+
/* @__PURE__ */ n.jsx(vo, {})
|
|
4038
|
+
] }) : /* @__PURE__ */ n.jsx(Eo, {});
|
|
4039
|
+
}, yo = O(To), jo = ({ children: e, usePopover: t, ...s }) => t ? /* @__PURE__ */ n.jsx(vn, { ...s, visible: s == null ? void 0 : s.open, children: e }) : e, wo = () => {
|
|
4040
|
+
const e = _("NeedHelp", "Need Help"), t = _(
|
|
4012
4041
|
"WidgetDisconnected",
|
|
4013
4042
|
"Widget Disconnected"
|
|
4014
|
-
), [s, r] =
|
|
4015
|
-
o(!0), u({ msg:
|
|
4043
|
+
), [s, r] = D(!0), i = z(), { widgetProps: c, setOpenWidget: o, isFirstOpenWidget: a, setFirstOpenWidget: d } = q(), { onSendMsg: u, connected: f, isHandshakeWidget: x } = ue(), g = () => {
|
|
4044
|
+
o(!0), u({ msg: c == null ? void 0 : c.getStartedPayload });
|
|
4016
4045
|
};
|
|
4017
|
-
return
|
|
4018
|
-
r(!f), window.clearTimeout(
|
|
4046
|
+
return Z(() => {
|
|
4047
|
+
r(!f), window.clearTimeout(i.current), i.current = setTimeout(() => {
|
|
4019
4048
|
r(!1);
|
|
4020
|
-
},
|
|
4049
|
+
}, 3e3);
|
|
4021
4050
|
}, [f]), /* @__PURE__ */ n.jsx(
|
|
4022
|
-
|
|
4051
|
+
jo,
|
|
4023
4052
|
{
|
|
4024
|
-
usePopover: s &&
|
|
4025
|
-
open: s &&
|
|
4053
|
+
usePopover: s && x === "show",
|
|
4054
|
+
open: s && x === "show",
|
|
4026
4055
|
content: t,
|
|
4027
4056
|
placement: "right",
|
|
4028
4057
|
children: /* @__PURE__ */ n.jsxs(
|
|
@@ -4030,12 +4059,12 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4030
4059
|
{
|
|
4031
4060
|
className: "w-launcher-container",
|
|
4032
4061
|
onClick: () => {
|
|
4033
|
-
a || (d(!0),
|
|
4062
|
+
a || (d(!0), g()), o(!0);
|
|
4034
4063
|
},
|
|
4035
4064
|
children: [
|
|
4036
4065
|
/* @__PURE__ */ n.jsx(P, { type: "chat-bubble" }),
|
|
4037
4066
|
/* @__PURE__ */ n.jsxs(
|
|
4038
|
-
|
|
4067
|
+
Y.Text,
|
|
4039
4068
|
{
|
|
4040
4069
|
style: {
|
|
4041
4070
|
fontWeight: 600,
|
|
@@ -4052,27 +4081,27 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4052
4081
|
)
|
|
4053
4082
|
}
|
|
4054
4083
|
);
|
|
4055
|
-
},
|
|
4056
|
-
const e =
|
|
4084
|
+
}, po = O(wo), _o = () => {
|
|
4085
|
+
const e = _("NotConnected", "Not Connected"), t = _(
|
|
4057
4086
|
"CannotAutoReconnect",
|
|
4058
4087
|
"Cannot auto reconnect"
|
|
4059
|
-
), s =
|
|
4088
|
+
), s = _(
|
|
4060
4089
|
"ReconnectManually",
|
|
4061
4090
|
"Reconnect Manually"
|
|
4062
|
-
), [r,
|
|
4063
|
-
return
|
|
4064
|
-
|
|
4065
|
-
}, [
|
|
4066
|
-
|
|
4091
|
+
), [r, i] = D(!1), { connected: c, createSocket: o } = ue(), { widgetProps: a } = q();
|
|
4092
|
+
return Z(() => {
|
|
4093
|
+
i(!c);
|
|
4094
|
+
}, [c]), /* @__PURE__ */ n.jsx(
|
|
4095
|
+
Et,
|
|
4067
4096
|
{
|
|
4068
4097
|
title: `${a == null ? void 0 : a.title} ${e}`,
|
|
4069
4098
|
subTitle: /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
4070
|
-
/* @__PURE__ */ n.jsxs(
|
|
4099
|
+
/* @__PURE__ */ n.jsxs(Y.Text, { children: [
|
|
4071
4100
|
t,
|
|
4072
4101
|
"?"
|
|
4073
4102
|
] }),
|
|
4074
4103
|
/* @__PURE__ */ n.jsx(
|
|
4075
|
-
|
|
4104
|
+
Y.Link,
|
|
4076
4105
|
{
|
|
4077
4106
|
strong: !0,
|
|
4078
4107
|
className: "w-reconnect-manual",
|
|
@@ -4083,63 +4112,63 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4083
4112
|
}
|
|
4084
4113
|
)
|
|
4085
4114
|
] }),
|
|
4086
|
-
onClose: () =>
|
|
4087
|
-
open: !
|
|
4115
|
+
onClose: () => i(!1),
|
|
4116
|
+
open: !c && r
|
|
4088
4117
|
}
|
|
4089
4118
|
);
|
|
4090
|
-
},
|
|
4091
|
-
|
|
4092
|
-
),
|
|
4093
|
-
const { xs: e } = ge.useBreakpoint(), [t, s] =
|
|
4119
|
+
}, ko = O(
|
|
4120
|
+
_o
|
|
4121
|
+
), Ao = () => {
|
|
4122
|
+
const { xs: e } = ge.useBreakpoint(), [t, s] = D(!1), { isOpenWidget: r, widgetProps: i } = q(), { isActiveTabVA: c } = be(), o = z(null), a = R(() => {
|
|
4094
4123
|
var f;
|
|
4095
4124
|
const u = [un];
|
|
4096
|
-
return e && (
|
|
4097
|
-
}, [e,
|
|
4125
|
+
return e && (i != null && i.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(" ");
|
|
4126
|
+
}, [e, i == null ? void 0 : i.isSF]), d = Gt(
|
|
4098
4127
|
(u) => {
|
|
4099
|
-
var
|
|
4128
|
+
var x;
|
|
4100
4129
|
const f = [u, xn == null ? void 0 : xn.FADE_IN];
|
|
4101
|
-
return
|
|
4130
|
+
return i != null && i.isSF && (f == null || f.push(`${u}-sf`)), e && (i != null && i.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(" ");
|
|
4102
4131
|
},
|
|
4103
|
-
[
|
|
4132
|
+
[i == null ? void 0 : i.isSF, e]
|
|
4104
4133
|
);
|
|
4105
|
-
return
|
|
4134
|
+
return Z(() => {
|
|
4106
4135
|
r && s(r), clearTimeout(o.current), o.current = setTimeout(() => {
|
|
4107
4136
|
r || s(r);
|
|
4108
4137
|
}, 250);
|
|
4109
4138
|
}, [r]), t ? /* @__PURE__ */ n.jsxs("div", { className: a, children: [
|
|
4110
|
-
/* @__PURE__ */ n.jsxs("div", { style: { display:
|
|
4139
|
+
/* @__PURE__ */ n.jsxs("div", { style: { display: c ? "block" : "none" }, children: [
|
|
4111
4140
|
/* @__PURE__ */ n.jsx("div", { className: d(bs), children: /* @__PURE__ */ n.jsx(wr, {}) }),
|
|
4112
4141
|
/* @__PURE__ */ n.jsx(_r, {})
|
|
4113
4142
|
] }),
|
|
4114
|
-
/* @__PURE__ */ n.jsx("div", { style: { display:
|
|
4115
|
-
/* @__PURE__ */ n.jsx(
|
|
4116
|
-
] }) : /* @__PURE__ */ n.jsx(
|
|
4117
|
-
},
|
|
4143
|
+
/* @__PURE__ */ n.jsx("div", { style: { display: c ? "none" : "block" }, children: /* @__PURE__ */ n.jsx("div", { className: d(vs), children: /* @__PURE__ */ n.jsx(Dr, { children: /* @__PURE__ */ n.jsx(Lr, { children: /* @__PURE__ */ n.jsx(yo, {}) }) }) }) }),
|
|
4144
|
+
/* @__PURE__ */ n.jsx(ko, {})
|
|
4145
|
+
] }) : /* @__PURE__ */ n.jsx(po, {});
|
|
4146
|
+
}, So = O(Ao), Lo = ({ items: e, ...t }) => Le != null && Le.startsWith("5") || Oe != null && Oe.startsWith("18") ? /* @__PURE__ */ n.jsx(cn, { ...t, items: e }) : /* @__PURE__ */ n.jsx(cn, { ...t, children: e == null ? void 0 : e.map(({ ...s }) => /* @__PURE__ */ bn(
|
|
4118
4147
|
cn.TabPane,
|
|
4119
4148
|
{
|
|
4120
4149
|
...s,
|
|
4121
4150
|
key: s == null ? void 0 : s.key,
|
|
4122
4151
|
tab: s == null ? void 0 : s.label
|
|
4123
4152
|
}
|
|
4124
|
-
)) }),
|
|
4125
|
-
const { isOpenWidget: e } =
|
|
4153
|
+
)) }), Oo = O(Lo), Ro = () => {
|
|
4154
|
+
const { isOpenWidget: e } = q(), { setActiveTab: t, activeTab: s } = be(), r = _(
|
|
4126
4155
|
"VirtualAssistant",
|
|
4127
4156
|
"Virtual Assistant"
|
|
4128
|
-
),
|
|
4129
|
-
return
|
|
4157
|
+
), i = _("Helpdesk", "Helpdesk"), { xs: c } = ge.useBreakpoint();
|
|
4158
|
+
return Z(() => {
|
|
4130
4159
|
const o = st();
|
|
4131
4160
|
t((o == null ? void 0 : o.activeTab) ?? s);
|
|
4132
4161
|
}, []), e ? /* @__PURE__ */ n.jsx(
|
|
4133
4162
|
"div",
|
|
4134
4163
|
{
|
|
4135
4164
|
className: "w-widget-tab-footer-container",
|
|
4136
|
-
...
|
|
4165
|
+
...c && {
|
|
4137
4166
|
style: {
|
|
4138
4167
|
borderRadius: 0
|
|
4139
4168
|
}
|
|
4140
4169
|
},
|
|
4141
4170
|
children: /* @__PURE__ */ n.jsx(
|
|
4142
|
-
|
|
4171
|
+
Oo,
|
|
4143
4172
|
{
|
|
4144
4173
|
activeKey: s,
|
|
4145
4174
|
onChange: (o) => {
|
|
@@ -4153,7 +4182,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4153
4182
|
key: "va"
|
|
4154
4183
|
},
|
|
4155
4184
|
{
|
|
4156
|
-
label:
|
|
4185
|
+
label: i,
|
|
4157
4186
|
key: "helpdesk"
|
|
4158
4187
|
}
|
|
4159
4188
|
]
|
|
@@ -4161,24 +4190,24 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4161
4190
|
)
|
|
4162
4191
|
}
|
|
4163
4192
|
) : null;
|
|
4164
|
-
},
|
|
4165
|
-
const { isOpenWidget: e, setOpenWidget: t, setExpand: s, isExpand: r, widgetProps:
|
|
4193
|
+
}, Do = O(Ro), No = () => {
|
|
4194
|
+
const { isOpenWidget: e, setOpenWidget: t, setExpand: s, isExpand: r, widgetProps: i } = q(), { xs: c } = ge.useBreakpoint();
|
|
4166
4195
|
return e ? /* @__PURE__ */ n.jsxs(
|
|
4167
4196
|
"div",
|
|
4168
4197
|
{
|
|
4169
4198
|
className: `${He}-container`,
|
|
4170
|
-
...
|
|
4199
|
+
...c && {
|
|
4171
4200
|
style: {
|
|
4172
4201
|
borderRadius: 0
|
|
4173
4202
|
}
|
|
4174
4203
|
},
|
|
4175
4204
|
children: [
|
|
4176
4205
|
/* @__PURE__ */ n.jsxs("div", { className: `${He}-text`, children: [
|
|
4177
|
-
/* @__PURE__ */ n.jsx("h4", { className: `${He}-title`, children:
|
|
4178
|
-
/* @__PURE__ */ n.jsx("span", { className: `${He}-subtitle`, children:
|
|
4206
|
+
/* @__PURE__ */ n.jsx("h4", { className: `${He}-title`, children: i == null ? void 0 : i.title }),
|
|
4207
|
+
/* @__PURE__ */ n.jsx("span", { className: `${He}-subtitle`, children: i == null ? void 0 : i.subTitle })
|
|
4179
4208
|
] }),
|
|
4180
4209
|
/* @__PURE__ */ n.jsxs("div", { className: `${He}-action`, children: [
|
|
4181
|
-
!
|
|
4210
|
+
!c && /* @__PURE__ */ n.jsx(
|
|
4182
4211
|
P,
|
|
4183
4212
|
{
|
|
4184
4213
|
type: "expand",
|
|
@@ -4204,41 +4233,41 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4204
4233
|
]
|
|
4205
4234
|
}
|
|
4206
4235
|
) : null;
|
|
4207
|
-
},
|
|
4208
|
-
const { isExpand: e, isOpenWidget: t, isFirstOpenWidget: s, setOpenWidget: r } =
|
|
4236
|
+
}, Mo = O(No), Fo = () => {
|
|
4237
|
+
const { isExpand: e, isOpenWidget: t, isFirstOpenWidget: s, setOpenWidget: r } = q(), { xs: i } = ge.useBreakpoint(), c = R(() => {
|
|
4209
4238
|
var a;
|
|
4210
4239
|
const o = [
|
|
4211
|
-
|
|
4240
|
+
i && "w-container-widget-mobile",
|
|
4212
4241
|
s && (t ? "w-show-animate" : "w-close-animate"),
|
|
4213
4242
|
"w-container-widget",
|
|
4214
4243
|
e && "w-container-widget-expand"
|
|
4215
4244
|
];
|
|
4216
4245
|
return (a = o == null ? void 0 : o.filter(Boolean)) == null ? void 0 : a.join(" ");
|
|
4217
|
-
}, [e,
|
|
4246
|
+
}, [e, i, s, t]);
|
|
4218
4247
|
return /* @__PURE__ */ n.jsxs(
|
|
4219
4248
|
"div",
|
|
4220
4249
|
{
|
|
4221
|
-
className:
|
|
4250
|
+
className: c,
|
|
4222
4251
|
onKeyDown: (o) => {
|
|
4223
4252
|
(o == null ? void 0 : o.code) === "Escape" && !(o != null && o.shiftKey) && !(o != null && o.altKey) && !(o != null && o.ctrlKey) && (o == null ? void 0 : o.key) === "Escape" && r(!1);
|
|
4224
4253
|
},
|
|
4225
4254
|
tabIndex: 0,
|
|
4226
4255
|
children: [
|
|
4227
|
-
/* @__PURE__ */ n.jsx(
|
|
4256
|
+
/* @__PURE__ */ n.jsx(Mo, {}),
|
|
4228
4257
|
/* @__PURE__ */ n.jsx("div", { id: "w-widget-content", children: /* @__PURE__ */ n.jsxs(er, { children: [
|
|
4229
|
-
/* @__PURE__ */ n.jsx(Ls, { children: /* @__PURE__ */ n.jsx(
|
|
4230
|
-
/* @__PURE__ */ n.jsx(
|
|
4258
|
+
/* @__PURE__ */ n.jsx(Ls, { children: /* @__PURE__ */ n.jsx(So, {}) }),
|
|
4259
|
+
/* @__PURE__ */ n.jsx(Do, {})
|
|
4231
4260
|
] }) })
|
|
4232
4261
|
]
|
|
4233
4262
|
}
|
|
4234
4263
|
);
|
|
4235
|
-
},
|
|
4264
|
+
}, Ho = O(Fo), Qo = ({
|
|
4236
4265
|
getStartedPayload: e,
|
|
4237
4266
|
socketURL: t,
|
|
4238
4267
|
socketPath: s,
|
|
4239
4268
|
onPayslipFn: r,
|
|
4240
|
-
title:
|
|
4241
|
-
subTitle:
|
|
4269
|
+
title: i,
|
|
4270
|
+
subTitle: c,
|
|
4242
4271
|
keyEncrypt: o,
|
|
4243
4272
|
history: a,
|
|
4244
4273
|
isSF: d = !1
|
|
@@ -4249,14 +4278,14 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4249
4278
|
socketURL: t,
|
|
4250
4279
|
socketPath: s,
|
|
4251
4280
|
onPayslipFn: r,
|
|
4252
|
-
title:
|
|
4253
|
-
subTitle:
|
|
4281
|
+
title: i,
|
|
4282
|
+
subTitle: c,
|
|
4254
4283
|
keyEncrypt: o,
|
|
4255
4284
|
history: a,
|
|
4256
4285
|
isSF: d,
|
|
4257
|
-
children: /* @__PURE__ */ n.jsx(Ss, { children: /* @__PURE__ */ n.jsx(
|
|
4286
|
+
children: /* @__PURE__ */ n.jsx(Ss, { children: /* @__PURE__ */ n.jsx(Ho, {}) })
|
|
4258
4287
|
}
|
|
4259
4288
|
);
|
|
4260
4289
|
export {
|
|
4261
|
-
|
|
4290
|
+
Qo as default
|
|
4262
4291
|
};
|