widget-chatbot 2.0.3 → 2.0.4-alpha.2
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 +967 -958
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import ot, { version as Lr, createContext as He, useContext as Ue, useState as H, useRef as se, useMemo as z, useEffect as ge, memo as
|
|
1
|
+
import ot, { version as Lr, createContext as He, useContext as Ue, useState as H, useRef as se, useMemo as z, useEffect as ge, memo as Y, Fragment as pt, Children as Mr, isValidElement as Nr, cloneElement as Fr, createElement as Ht, useCallback as Ir } from "react";
|
|
2
2
|
import Je from "axios";
|
|
3
3
|
import Se from "dayjs";
|
|
4
4
|
import { version as $r, Modal as un, Collapse as dn, Typography as ce, Button as le, Form as Ce, notification as Te, Radio as Hr, Divider as Ur, Input as st, Image as Wr, Skeleton as _e, Avatar as Un, Upload as Wn, Spin as Br, Tooltip as Ke, Tag as Yr, Badge as Vr, Grid as Re, Empty as Bn, Popover as Ut, Mentions as fn, Select as gn, DatePicker as zr, Result as Gr, Tabs as wt } from "antd";
|
|
@@ -39,28 +39,28 @@ function Wt() {
|
|
|
39
39
|
return !1;
|
|
40
40
|
for (var i = {}, c = 0; c < 10; c++)
|
|
41
41
|
i["_" + String.fromCharCode(c)] = c;
|
|
42
|
-
var l = Object.getOwnPropertyNames(i).map(function(
|
|
43
|
-
return i[
|
|
42
|
+
var l = Object.getOwnPropertyNames(i).map(function(h) {
|
|
43
|
+
return i[h];
|
|
44
44
|
});
|
|
45
45
|
if (l.join("") !== "0123456789")
|
|
46
46
|
return !1;
|
|
47
|
-
var
|
|
48
|
-
return "abcdefghijklmnopqrst".split("").forEach(function(
|
|
49
|
-
|
|
50
|
-
}), Object.keys(Object.assign({},
|
|
47
|
+
var x = {};
|
|
48
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(h) {
|
|
49
|
+
x[h] = h;
|
|
50
|
+
}), Object.keys(Object.assign({}, x)).join("") === "abcdefghijklmnopqrst";
|
|
51
51
|
} catch {
|
|
52
52
|
return !1;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
return _t = a() ? Object.assign : function(s, i) {
|
|
56
|
-
for (var c, l = r(s),
|
|
57
|
-
c = Object(arguments[
|
|
56
|
+
for (var c, l = r(s), x, h = 1; h < arguments.length; h++) {
|
|
57
|
+
c = Object(arguments[h]);
|
|
58
58
|
for (var p in c)
|
|
59
59
|
n.call(c, p) && (l[p] = c[p]);
|
|
60
60
|
if (e) {
|
|
61
|
-
|
|
62
|
-
for (var
|
|
63
|
-
o.call(c, f
|
|
61
|
+
x = e(c);
|
|
62
|
+
for (var f = 0; f < x.length; f++)
|
|
63
|
+
o.call(c, x[f]) && (l[x[f]] = c[x[f]]);
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
return l;
|
|
@@ -74,22 +74,22 @@ function Wt() {
|
|
|
74
74
|
* This source code is licensed under the MIT license found in the
|
|
75
75
|
* LICENSE file in the root directory of this source tree.
|
|
76
76
|
*/
|
|
77
|
-
var
|
|
77
|
+
var xn;
|
|
78
78
|
function to() {
|
|
79
|
-
if (
|
|
80
|
-
|
|
79
|
+
if (xn) return ze;
|
|
80
|
+
xn = 1, Wt();
|
|
81
81
|
var e = ot, n = 60103;
|
|
82
82
|
if (ze.Fragment = 60107, typeof Symbol == "function" && Symbol.for) {
|
|
83
83
|
var o = Symbol.for;
|
|
84
84
|
n = o("react.element"), ze.Fragment = o("react.fragment");
|
|
85
85
|
}
|
|
86
86
|
var r = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = Object.prototype.hasOwnProperty, s = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
87
|
-
function i(c, l,
|
|
88
|
-
var
|
|
89
|
-
|
|
90
|
-
for (
|
|
91
|
-
if (c && c.defaultProps) for (
|
|
92
|
-
return { $$typeof: n, type: c, key:
|
|
87
|
+
function i(c, l, x) {
|
|
88
|
+
var h, p = {}, f = null, m = null;
|
|
89
|
+
x !== void 0 && (f = "" + x), l.key !== void 0 && (f = "" + l.key), l.ref !== void 0 && (m = l.ref);
|
|
90
|
+
for (h in l) a.call(l, h) && !s.hasOwnProperty(h) && (p[h] = l[h]);
|
|
91
|
+
if (c && c.defaultProps) for (h in l = c.defaultProps, l) p[h] === void 0 && (p[h] = l[h]);
|
|
92
|
+
return { $$typeof: n, type: c, key: f, ref: m, props: p, _owner: r.current };
|
|
93
93
|
}
|
|
94
94
|
return ze.jsx = i, ze.jsxs = i, ze;
|
|
95
95
|
}
|
|
@@ -102,22 +102,22 @@ var jt = {};
|
|
|
102
102
|
* This source code is licensed under the MIT license found in the
|
|
103
103
|
* LICENSE file in the root directory of this source tree.
|
|
104
104
|
*/
|
|
105
|
-
var
|
|
105
|
+
var hn;
|
|
106
106
|
function no() {
|
|
107
|
-
return
|
|
107
|
+
return hn || (hn = 1, function(e) {
|
|
108
108
|
process.env.NODE_ENV !== "production" && function() {
|
|
109
109
|
var n = ot, o = Wt(), r = 60103, a = 60106;
|
|
110
110
|
e.Fragment = 60107;
|
|
111
|
-
var s = 60108, i = 60114, c = 60109, l = 60110,
|
|
111
|
+
var s = 60108, i = 60114, c = 60109, l = 60110, x = 60112, h = 60113, p = 60120, f = 60115, m = 60116, j = 60121, T = 60122, S = 60117, C = 60129, E = 60131;
|
|
112
112
|
if (typeof Symbol == "function" && Symbol.for) {
|
|
113
|
-
var
|
|
114
|
-
r =
|
|
113
|
+
var y = Symbol.for;
|
|
114
|
+
r = y("react.element"), a = y("react.portal"), e.Fragment = y("react.fragment"), s = y("react.strict_mode"), i = y("react.profiler"), c = y("react.provider"), l = y("react.context"), x = y("react.forward_ref"), h = y("react.suspense"), p = y("react.suspense_list"), f = y("react.memo"), m = y("react.lazy"), j = y("react.block"), T = y("react.server.block"), S = y("react.fundamental"), y("react.scope"), y("react.opaque.id"), C = y("react.debug_trace_mode"), y("react.offscreen"), E = y("react.legacy_hidden");
|
|
115
115
|
}
|
|
116
|
-
var
|
|
117
|
-
function
|
|
116
|
+
var w = typeof Symbol == "function" && Symbol.iterator, d = "@@iterator";
|
|
117
|
+
function v(g) {
|
|
118
118
|
if (g === null || typeof g != "object")
|
|
119
119
|
return null;
|
|
120
|
-
var A =
|
|
120
|
+
var A = w && g[w] || g[d];
|
|
121
121
|
return typeof A == "function" ? A : null;
|
|
122
122
|
}
|
|
123
123
|
var u = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
@@ -140,7 +140,7 @@ function no() {
|
|
|
140
140
|
}
|
|
141
141
|
var D = !1;
|
|
142
142
|
function R(g) {
|
|
143
|
-
return !!(typeof g == "string" || typeof g == "function" || g === e.Fragment || g === i || g === C || g === s || g ===
|
|
143
|
+
return !!(typeof g == "string" || typeof g == "function" || g === e.Fragment || g === i || g === C || g === s || g === h || g === p || g === E || D || typeof g == "object" && g !== null && (g.$$typeof === m || g.$$typeof === f || g.$$typeof === c || g.$$typeof === l || g.$$typeof === x || g.$$typeof === S || g.$$typeof === j || g[0] === T));
|
|
144
144
|
}
|
|
145
145
|
function U(g, A, N) {
|
|
146
146
|
var q = A.displayName || A.name || "";
|
|
@@ -149,7 +149,7 @@ function no() {
|
|
|
149
149
|
function $(g) {
|
|
150
150
|
return g.displayName || "Context";
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function V(g) {
|
|
153
153
|
if (g == null)
|
|
154
154
|
return null;
|
|
155
155
|
if (typeof g.tag == "number" && b("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."), typeof g == "function")
|
|
@@ -165,7 +165,7 @@ function no() {
|
|
|
165
165
|
return "Profiler";
|
|
166
166
|
case s:
|
|
167
167
|
return "StrictMode";
|
|
168
|
-
case
|
|
168
|
+
case h:
|
|
169
169
|
return "Suspense";
|
|
170
170
|
case p:
|
|
171
171
|
return "SuspenseList";
|
|
@@ -178,16 +178,16 @@ function no() {
|
|
|
178
178
|
case c:
|
|
179
179
|
var N = g;
|
|
180
180
|
return $(N._context) + ".Provider";
|
|
181
|
-
case
|
|
181
|
+
case x:
|
|
182
182
|
return U(g, g.render, "ForwardRef");
|
|
183
|
-
case
|
|
184
|
-
return
|
|
183
|
+
case f:
|
|
184
|
+
return V(g.type);
|
|
185
185
|
case j:
|
|
186
|
-
return
|
|
187
|
-
case
|
|
186
|
+
return V(g._render);
|
|
187
|
+
case m: {
|
|
188
188
|
var q = g, fe = q._payload, de = q._init;
|
|
189
189
|
try {
|
|
190
|
-
return
|
|
190
|
+
return V(de(fe));
|
|
191
191
|
} catch {
|
|
192
192
|
return null;
|
|
193
193
|
}
|
|
@@ -195,18 +195,18 @@ function no() {
|
|
|
195
195
|
}
|
|
196
196
|
return null;
|
|
197
197
|
}
|
|
198
|
-
var G = 0, P,
|
|
199
|
-
function
|
|
198
|
+
var G = 0, P, F, Z, K, _, O, W;
|
|
199
|
+
function I() {
|
|
200
200
|
}
|
|
201
|
-
|
|
202
|
-
function
|
|
201
|
+
I.__reactDisabledLog = !0;
|
|
202
|
+
function B() {
|
|
203
203
|
{
|
|
204
204
|
if (G === 0) {
|
|
205
|
-
P = console.log,
|
|
205
|
+
P = console.log, F = console.info, Z = console.warn, K = console.error, _ = console.group, O = console.groupCollapsed, W = console.groupEnd;
|
|
206
206
|
var g = {
|
|
207
207
|
configurable: !0,
|
|
208
208
|
enumerable: !0,
|
|
209
|
-
value:
|
|
209
|
+
value: I,
|
|
210
210
|
writable: !0
|
|
211
211
|
};
|
|
212
212
|
Object.defineProperties(console, {
|
|
@@ -235,7 +235,7 @@ function no() {
|
|
|
235
235
|
value: P
|
|
236
236
|
}),
|
|
237
237
|
info: o({}, g, {
|
|
238
|
-
value:
|
|
238
|
+
value: F
|
|
239
239
|
}),
|
|
240
240
|
warn: o({}, g, {
|
|
241
241
|
value: Z
|
|
@@ -289,7 +289,7 @@ function no() {
|
|
|
289
289
|
var fe = Error.prepareStackTrace;
|
|
290
290
|
Error.prepareStackTrace = void 0;
|
|
291
291
|
var de;
|
|
292
|
-
de = X.current, X.current = null,
|
|
292
|
+
de = X.current, X.current = null, B();
|
|
293
293
|
try {
|
|
294
294
|
if (A) {
|
|
295
295
|
var oe = function() {
|
|
@@ -326,18 +326,18 @@ function no() {
|
|
|
326
326
|
if (Ae && q && typeof Ae.stack == "string") {
|
|
327
327
|
for (var ne = Ae.stack.split(`
|
|
328
328
|
`), ve = q.stack.split(`
|
|
329
|
-
`),
|
|
329
|
+
`), xe = ne.length - 1, me = ve.length - 1; xe >= 1 && me >= 0 && ne[xe] !== ve[me]; )
|
|
330
330
|
me--;
|
|
331
|
-
for (;
|
|
332
|
-
if (ne[
|
|
333
|
-
if (
|
|
331
|
+
for (; xe >= 1 && me >= 0; xe--, me--)
|
|
332
|
+
if (ne[xe] !== ve[me]) {
|
|
333
|
+
if (xe !== 1 || me !== 1)
|
|
334
334
|
do
|
|
335
|
-
if (
|
|
335
|
+
if (xe--, me--, me < 0 || ne[xe] !== ve[me]) {
|
|
336
336
|
var ke = `
|
|
337
|
-
` + ne[
|
|
337
|
+
` + ne[xe].replace(" at new ", " at ");
|
|
338
338
|
return typeof g == "function" && te.set(g, ke), ke;
|
|
339
339
|
}
|
|
340
|
-
while (
|
|
340
|
+
while (xe >= 1 && me >= 0);
|
|
341
341
|
break;
|
|
342
342
|
}
|
|
343
343
|
}
|
|
@@ -362,20 +362,20 @@ function no() {
|
|
|
362
362
|
if (typeof g == "string")
|
|
363
363
|
return ee(g);
|
|
364
364
|
switch (g) {
|
|
365
|
-
case
|
|
365
|
+
case h:
|
|
366
366
|
return ee("Suspense");
|
|
367
367
|
case p:
|
|
368
368
|
return ee("SuspenseList");
|
|
369
369
|
}
|
|
370
370
|
if (typeof g == "object")
|
|
371
371
|
switch (g.$$typeof) {
|
|
372
|
-
case
|
|
372
|
+
case x:
|
|
373
373
|
return be(g.render);
|
|
374
|
-
case
|
|
374
|
+
case f:
|
|
375
375
|
return Ie(g.type, A, N);
|
|
376
376
|
case j:
|
|
377
377
|
return be(g._render);
|
|
378
|
-
case
|
|
378
|
+
case m: {
|
|
379
379
|
var q = g, fe = q._payload, de = q._init;
|
|
380
380
|
try {
|
|
381
381
|
return Ie(de(fe), A, N);
|
|
@@ -393,7 +393,7 @@ function no() {
|
|
|
393
393
|
} else
|
|
394
394
|
Zt.setExtraStackFrame(null);
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function hr(g, A, N, q, fe) {
|
|
397
397
|
{
|
|
398
398
|
var de = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
399
399
|
for (var oe in g)
|
|
@@ -405,8 +405,8 @@ function no() {
|
|
|
405
405
|
throw ve.name = "Invariant Violation", ve;
|
|
406
406
|
}
|
|
407
407
|
ne = g[oe](A, oe, q, N, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
408
|
-
} catch (
|
|
409
|
-
ne =
|
|
408
|
+
} catch (xe) {
|
|
409
|
+
ne = xe;
|
|
410
410
|
}
|
|
411
411
|
ne && !(ne instanceof Error) && (ct(fe), b("%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).", q || "React class", N, oe, typeof ne), ct(null)), ne instanceof Error && !(ne.message in Jt) && (Jt[ne.message] = !0, ct(fe), b("Failed %s type: %s", N, ne.message), ct(null));
|
|
412
412
|
}
|
|
@@ -495,9 +495,9 @@ function no() {
|
|
|
495
495
|
for (de in A)
|
|
496
496
|
Ct.call(A, de) && !mr.hasOwnProperty(de) && (oe[de] = A[de]);
|
|
497
497
|
if (g && g.defaultProps) {
|
|
498
|
-
var
|
|
499
|
-
for (de in
|
|
500
|
-
oe[de] === void 0 && (oe[de] =
|
|
498
|
+
var xe = g.defaultProps;
|
|
499
|
+
for (de in xe)
|
|
500
|
+
oe[de] === void 0 && (oe[de] = xe[de]);
|
|
501
501
|
}
|
|
502
502
|
if (ne || ve) {
|
|
503
503
|
var me = typeof g == "function" ? g.displayName || g.name || "Unknown" : g;
|
|
@@ -522,7 +522,7 @@ function no() {
|
|
|
522
522
|
function rn() {
|
|
523
523
|
{
|
|
524
524
|
if (Tt.current) {
|
|
525
|
-
var g =
|
|
525
|
+
var g = V(Tt.current.type);
|
|
526
526
|
if (g)
|
|
527
527
|
return `
|
|
528
528
|
|
|
@@ -557,7 +557,7 @@ Check the top-level render call using <` + N + ">.");
|
|
|
557
557
|
return;
|
|
558
558
|
on[N] = !0;
|
|
559
559
|
var q = "";
|
|
560
|
-
g && g._owner && g._owner !== Tt.current && (q = " It was passed a child from " +
|
|
560
|
+
g && g._owner && g._owner !== Tt.current && (q = " It was passed a child from " + V(g._owner.type) + "."), Be(g), b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', N, q), Be(null);
|
|
561
561
|
}
|
|
562
562
|
}
|
|
563
563
|
function an(g, A) {
|
|
@@ -572,7 +572,7 @@ Check the top-level render call using <` + N + ">.");
|
|
|
572
572
|
else if (St(g))
|
|
573
573
|
g._store && (g._store.validated = !0);
|
|
574
574
|
else if (g) {
|
|
575
|
-
var fe =
|
|
575
|
+
var fe = v(g);
|
|
576
576
|
if (typeof fe == "function" && fe !== g.entries)
|
|
577
577
|
for (var de = fe.call(g), oe; !(oe = de.next()).done; )
|
|
578
578
|
St(oe.value) && sn(oe.value, A);
|
|
@@ -587,18 +587,18 @@ Check the top-level render call using <` + N + ">.");
|
|
|
587
587
|
var N;
|
|
588
588
|
if (typeof A == "function")
|
|
589
589
|
N = A.propTypes;
|
|
590
|
-
else if (typeof A == "object" && (A.$$typeof ===
|
|
590
|
+
else if (typeof A == "object" && (A.$$typeof === x || // Note: Memo only checks outer props here.
|
|
591
591
|
// Inner props are checked in the reconciler.
|
|
592
|
-
A.$$typeof ===
|
|
592
|
+
A.$$typeof === f))
|
|
593
593
|
N = A.propTypes;
|
|
594
594
|
else
|
|
595
595
|
return;
|
|
596
596
|
if (N) {
|
|
597
|
-
var q =
|
|
598
|
-
|
|
597
|
+
var q = V(A);
|
|
598
|
+
hr(N, g.props, "prop", q, g);
|
|
599
599
|
} else if (A.PropTypes !== void 0 && !Et) {
|
|
600
600
|
Et = !0;
|
|
601
|
-
var fe =
|
|
601
|
+
var fe = V(A);
|
|
602
602
|
b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", fe || "Unknown");
|
|
603
603
|
}
|
|
604
604
|
typeof A.getDefaultProps == "function" && !A.getDefaultProps.isReactClassApproved && b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
@@ -624,8 +624,8 @@ Check the top-level render call using <` + N + ">.");
|
|
|
624
624
|
(g === void 0 || typeof g == "object" && g !== null && Object.keys(g).length === 0) && (ne += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
625
625
|
var ve = wr();
|
|
626
626
|
ve ? ne += ve : ne += rn();
|
|
627
|
-
var
|
|
628
|
-
g === null ?
|
|
627
|
+
var xe;
|
|
628
|
+
g === null ? xe = "null" : Array.isArray(g) ? xe = "array" : g !== void 0 && g.$$typeof === r ? (xe = "<" + (V(g.type) || "Unknown") + " />", ne = " Did you accidentally export a JSX literal instead of a component?") : xe = typeof g, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", xe, ne);
|
|
629
629
|
}
|
|
630
630
|
var me = Sr(g, A, N, fe, de);
|
|
631
631
|
if (me == null)
|
|
@@ -662,7 +662,7 @@ function ro() {
|
|
|
662
662
|
return mn || (mn = 1, process.env.NODE_ENV === "production" ? lt.exports = to() : lt.exports = no()), lt.exports;
|
|
663
663
|
}
|
|
664
664
|
var t = ro();
|
|
665
|
-
const oo = "2.0.
|
|
665
|
+
const oo = "2.0.4-alpha.2", Vn = "chat_session", so = "user_uttered", io = "bot_uttered", ao = "ehelp_bot_uttered";
|
|
666
666
|
JSON.stringify({
|
|
667
667
|
enabled_agents: ["Alice", "Maria", "Jani"],
|
|
668
668
|
default_active_agent: "Alice"
|
|
@@ -692,7 +692,7 @@ const co = "https://sfchatbot.dataon.com", lo = [
|
|
|
692
692
|
label: "I’d like to explain further",
|
|
693
693
|
value: "another"
|
|
694
694
|
}
|
|
695
|
-
], Pe = $r, Xe = Lr, uo = oo, fo = "https://sfchatbot.dataon.com/openai-service-dev/",
|
|
695
|
+
], Pe = $r, Xe = Lr, uo = oo, fo = "https://sfchatbot.dataon.com/openai-service-dev/", ht = "https://res.cloudinary.com/dcvolkyfb/image/upload/v1740135794/svg/bot_profile_hlnyop.png", Bt = "YYYY-MM-DD", mt = "HH:mm", yn = "N/A", kt = [
|
|
696
696
|
// Raster (bitmap)
|
|
697
697
|
".jpg",
|
|
698
698
|
".jpeg",
|
|
@@ -716,7 +716,7 @@ const co = "https://sfchatbot.dataon.com", lo = [
|
|
|
716
716
|
".xcf"
|
|
717
717
|
], At = "w-widget-content-container", Rt = "w-ticket-detail-content-container", go = "w-wrapper-body", po = "w-wrapper-body-helpdesk", Qe = "w-header", Ot = {
|
|
718
718
|
FADE_IN: "w-fade-in-animate"
|
|
719
|
-
},
|
|
719
|
+
}, xo = "https://placehold.co/600x400?text=No+Image", nt = 3, ho = "GoHRDev2025WorkPlazeDataOnDotCom", Ge = "(Helpdesk Widget Chatbot)", mo = (e) => JSON.parse((e == null ? void 0 : e.replaceAll("/get_started", "")) || "{}"), zn = (e) => {
|
|
720
720
|
var n;
|
|
721
721
|
try {
|
|
722
722
|
return (n = new URL(e)) == null ? void 0 : n.host;
|
|
@@ -778,9 +778,9 @@ const co = "https://sfchatbot.dataon.com", lo = [
|
|
|
778
778
|
r == null || r.push(c);
|
|
779
779
|
}) : r == null || r.push(s);
|
|
780
780
|
}), r == null || r.forEach((s, i) => {
|
|
781
|
-
var l,
|
|
781
|
+
var l, x, h;
|
|
782
782
|
const c = s == null ? void 0 : s.generated_id;
|
|
783
|
-
c ? (n[c] || (n[c] = []), (
|
|
783
|
+
c ? (n[c] || (n[c] = []), (x = n[c]) == null || x.push({
|
|
784
784
|
...s,
|
|
785
785
|
indexChat: i,
|
|
786
786
|
...!(s != null && s.timestamp) && {
|
|
@@ -799,7 +799,7 @@ const co = "https://sfchatbot.dataon.com", lo = [
|
|
|
799
799
|
...s,
|
|
800
800
|
keyItem: i,
|
|
801
801
|
...!(s != null && s.timestamp) && {
|
|
802
|
-
timestamp: (
|
|
802
|
+
timestamp: (h = Se()) == null ? void 0 : h.format("hh:mm A")
|
|
803
803
|
}
|
|
804
804
|
});
|
|
805
805
|
});
|
|
@@ -857,7 +857,7 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
857
857
|
a
|
|
858
858
|
);
|
|
859
859
|
return Co(c);
|
|
860
|
-
},
|
|
860
|
+
}, xt = (e) => {
|
|
861
861
|
const n = {}, o = Kn(e), r = o == null ? void 0 : o.map((a) => {
|
|
862
862
|
var i;
|
|
863
863
|
const s = a == null ? void 0 : a.CREATED_DATE;
|
|
@@ -895,10 +895,10 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
895
895
|
subTitle: i,
|
|
896
896
|
keyEncrypt: c,
|
|
897
897
|
history: l,
|
|
898
|
-
modelName:
|
|
899
|
-
isSF:
|
|
898
|
+
modelName: x,
|
|
899
|
+
isSF: h
|
|
900
900
|
}) => {
|
|
901
|
-
const [p,
|
|
901
|
+
const [p, f] = H(!1), [m, j] = H("va"), [T, S] = H(!1), [C, E] = H({}), [y, w] = H(!1), [d, v] = H(!1), [u, b] = H(!1), k = se(!1), D = z(() => ({
|
|
902
902
|
getStartedPayload: n,
|
|
903
903
|
socketURL: o,
|
|
904
904
|
socketPath: r,
|
|
@@ -907,8 +907,8 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
907
907
|
subTitle: i,
|
|
908
908
|
keyEncrypt: c,
|
|
909
909
|
history: l,
|
|
910
|
-
modelName:
|
|
911
|
-
isSF:
|
|
910
|
+
modelName: x,
|
|
911
|
+
isSF: h
|
|
912
912
|
}), [
|
|
913
913
|
n,
|
|
914
914
|
o,
|
|
@@ -918,8 +918,8 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
918
918
|
i,
|
|
919
919
|
c,
|
|
920
920
|
l,
|
|
921
|
-
|
|
922
|
-
|
|
921
|
+
x,
|
|
922
|
+
h
|
|
923
923
|
]), R = z(() => Gn(C == null ? void 0 : C.access_token), [C == null ? void 0 : C.access_token]);
|
|
924
924
|
return ge(() => {
|
|
925
925
|
E(mo(n));
|
|
@@ -932,20 +932,20 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
932
932
|
{
|
|
933
933
|
value: {
|
|
934
934
|
objInitPayload: C,
|
|
935
|
-
setOpenWidget:
|
|
935
|
+
setOpenWidget: f,
|
|
936
936
|
isOpenWidget: p,
|
|
937
|
-
activeTab:
|
|
937
|
+
activeTab: m,
|
|
938
938
|
setActiveTab: j,
|
|
939
939
|
isExpand: T,
|
|
940
|
-
setExpand:
|
|
940
|
+
setExpand: S,
|
|
941
941
|
setObjInitPayload: E,
|
|
942
942
|
parsedJWT: R,
|
|
943
943
|
widgetProps: D,
|
|
944
|
-
isFirstOpenWidget:
|
|
945
|
-
setFirstOpenWidget:
|
|
944
|
+
isFirstOpenWidget: y,
|
|
945
|
+
setFirstOpenWidget: w,
|
|
946
946
|
isFirstRenderHelpdesk: k,
|
|
947
947
|
showReadyWSHD: d,
|
|
948
|
-
setShowReadyWSHD:
|
|
948
|
+
setShowReadyWSHD: v,
|
|
949
949
|
isUserInputHide: u,
|
|
950
950
|
setUserInputHide: b
|
|
951
951
|
},
|
|
@@ -960,26 +960,26 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
960
960
|
)) == null || i.then(({ data: c }) => {
|
|
961
961
|
var l;
|
|
962
962
|
if (c) {
|
|
963
|
-
const
|
|
964
|
-
|
|
965
|
-
var
|
|
966
|
-
(
|
|
963
|
+
const x = Object.keys((l = Object.values(c)) == null ? void 0 : l[0]), h = {};
|
|
964
|
+
x == null || x.forEach((p) => {
|
|
965
|
+
var f;
|
|
966
|
+
(f = Object.keys(c)) == null || f.forEach((m) => {
|
|
967
967
|
var j;
|
|
968
|
-
|
|
968
|
+
h[p == null ? void 0 : p.toLowerCase()] = (j = c == null ? void 0 : c[m]) == null ? void 0 : j[p];
|
|
969
969
|
});
|
|
970
|
-
}), r(
|
|
970
|
+
}), r(h);
|
|
971
971
|
}
|
|
972
972
|
});
|
|
973
973
|
}, s = () => {
|
|
974
974
|
const i = window.indexedDB.open("language");
|
|
975
975
|
i.onsuccess = (c) => {
|
|
976
|
-
var
|
|
976
|
+
var x;
|
|
977
977
|
const l = c.target.result;
|
|
978
978
|
try {
|
|
979
|
-
const p = l.transaction("keyvaluepairs", "readonly").objectStore("keyvaluepairs"),
|
|
980
|
-
|
|
981
|
-
r(
|
|
982
|
-
},
|
|
979
|
+
const p = l.transaction("keyvaluepairs", "readonly").objectStore("keyvaluepairs"), f = p == null ? void 0 : p.get((x = n == null ? void 0 : n.lang) == null ? void 0 : x.toLowerCase());
|
|
980
|
+
f.onsuccess = () => {
|
|
981
|
+
r(f == null ? void 0 : f.result);
|
|
982
|
+
}, f.onerror = () => {
|
|
983
983
|
a();
|
|
984
984
|
};
|
|
985
985
|
} catch {
|
|
@@ -994,44 +994,42 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
994
994
|
}, [n == null ? void 0 : n.uriService, n == null ? void 0 : n.lang]), /* @__PURE__ */ t.jsx(Jn.Provider, { value: { langDatas: o }, children: e });
|
|
995
995
|
}, Zn = He({}), je = () => Ue(Zn), jo = ({ children: e }) => {
|
|
996
996
|
var P;
|
|
997
|
-
const [n, o] = H([]), [r, a] = H(!1), [s, i] = H(!1), [c, l] = H({}), [
|
|
997
|
+
const [n, o] = H([]), [r, a] = H(!1), [s, i] = H(!1), [c, l] = H({}), [x, h] = H(!1), [p, f] = H(!1), [m, j] = H(""), [T, S] = H(!1), {
|
|
998
998
|
objInitPayload: C,
|
|
999
999
|
widgetProps: E,
|
|
1000
|
-
setOpenWidget:
|
|
1001
|
-
setFirstOpenWidget:
|
|
1000
|
+
setOpenWidget: y,
|
|
1001
|
+
setFirstOpenWidget: w,
|
|
1002
1002
|
isFirstRenderHelpdesk: d,
|
|
1003
|
-
setUserInputHide:
|
|
1004
|
-
} = ue(), u = se(null), b = se(""), k = se(""), D = (
|
|
1003
|
+
setUserInputHide: v
|
|
1004
|
+
} = ue(), u = se(null), b = se(""), k = se(""), D = (F) => {
|
|
1005
1005
|
var K, _;
|
|
1006
|
-
const Z = (K =
|
|
1007
|
-
if (
|
|
1008
|
-
const O = Ee(
|
|
1006
|
+
const Z = (K = F == null ? void 0 : F.metadata) == null ? void 0 : K.stopped;
|
|
1007
|
+
if (v(((_ = F == null ? void 0 : F.metadata) == null ? void 0 : _.userInput) === "hide"), !Z) {
|
|
1008
|
+
const O = Ee(F, "text_feedback_link") && Ee(F, "text");
|
|
1009
1009
|
o((W) => {
|
|
1010
|
-
const
|
|
1011
|
-
return (
|
|
1012
|
-
...
|
|
1013
|
-
...O && {
|
|
1014
|
-
type: "text"
|
|
1015
|
-
},
|
|
1010
|
+
const I = [...W], B = I == null ? void 0 : I[(I == null ? void 0 : I.length) - 1];
|
|
1011
|
+
return (B == null ? void 0 : B.id) === (F == null ? void 0 : F.id) ? (B.text += F == null ? void 0 : F.text, F != null && F.tag && (B.tag = F.tag)) : I.push({
|
|
1012
|
+
...F,
|
|
1013
|
+
...O && { type: "text" },
|
|
1016
1014
|
sender: "response"
|
|
1017
|
-
}), vo(
|
|
1015
|
+
}), vo(I);
|
|
1018
1016
|
});
|
|
1019
1017
|
}
|
|
1020
1018
|
a(!1), i(!1), Le();
|
|
1021
|
-
}, R = (
|
|
1019
|
+
}, R = (F) => {
|
|
1022
1020
|
var Z, K, _, O;
|
|
1023
|
-
|
|
1021
|
+
F && U({
|
|
1024
1022
|
msg: E == null ? void 0 : E.getStartedPayload
|
|
1025
1023
|
}), (Z = u == null ? void 0 : u.current) == null || Z.emit("session_request", { session_id: null }), (K = u == null ? void 0 : u.current) == null || K.on("session_confirm", (W) => {
|
|
1026
1024
|
b.current = W, yt({
|
|
1027
1025
|
session_id: W == null ? void 0 : W.session_id
|
|
1028
1026
|
});
|
|
1029
1027
|
}), (_ = u == null ? void 0 : u.current) == null || _.on(io, D), (O = u == null ? void 0 : u.current) == null || O.on(ao, (W) => {
|
|
1030
|
-
const
|
|
1031
|
-
Ee(
|
|
1032
|
-
}),
|
|
1028
|
+
const I = JSON.parse(W || "{}");
|
|
1029
|
+
Ee(I, "iswidget") && f(I == null ? void 0 : I.iswidget);
|
|
1030
|
+
}), x || h(!0), w(!1);
|
|
1033
1031
|
}, U = ({
|
|
1034
|
-
msg:
|
|
1032
|
+
msg: F,
|
|
1035
1033
|
additionalConfig: Z = {},
|
|
1036
1034
|
isShowLoadingResponse: K = !0
|
|
1037
1035
|
}) => {
|
|
@@ -1040,11 +1038,11 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
1040
1038
|
customData: {
|
|
1041
1039
|
language: C == null ? void 0 : C.lang
|
|
1042
1040
|
},
|
|
1043
|
-
message:
|
|
1041
|
+
message: F,
|
|
1044
1042
|
session_id: b == null ? void 0 : b.current,
|
|
1045
1043
|
...Z
|
|
1046
1044
|
}), K ? a(!0) : i(!0);
|
|
1047
|
-
}, $ = (
|
|
1045
|
+
}, $ = (F = !1) => {
|
|
1048
1046
|
var K, _;
|
|
1049
1047
|
u.current && ((K = u == null ? void 0 : u.current) == null || K.off(), (_ = u == null ? void 0 : u.current) == null || _.disconnect(), u.current = null), d.current = !1;
|
|
1050
1048
|
const Z = qr(
|
|
@@ -1059,28 +1057,28 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
1059
1057
|
}
|
|
1060
1058
|
);
|
|
1061
1059
|
Z.on("connect", () => {
|
|
1062
|
-
R(
|
|
1060
|
+
R(F);
|
|
1063
1061
|
}), Z.on("connect_error", (O) => {
|
|
1064
1062
|
console.error("connect_error widget-chatbot : ", {
|
|
1065
1063
|
err: O,
|
|
1066
1064
|
socketURL: E == null ? void 0 : E.socketURL,
|
|
1067
1065
|
socketPath: E == null ? void 0 : E.widgetProps
|
|
1068
|
-
}),
|
|
1066
|
+
}), h(!1);
|
|
1069
1067
|
}), Z.io.on("reconnect", () => {
|
|
1070
1068
|
console.error("reconnect widget-chatbot : ", {
|
|
1071
1069
|
socketURL: E == null ? void 0 : E.socketURL,
|
|
1072
1070
|
socketPath: E == null ? void 0 : E.widgetProps
|
|
1073
|
-
}),
|
|
1071
|
+
}), h(!1);
|
|
1074
1072
|
}), u.current = Z;
|
|
1075
|
-
},
|
|
1076
|
-
var
|
|
1077
|
-
(!((
|
|
1073
|
+
}, V = () => {
|
|
1074
|
+
var F;
|
|
1075
|
+
(!((F = u == null ? void 0 : u.current) != null && F.connected) || !x) && ($(), y(!1));
|
|
1078
1076
|
}, G = () => {
|
|
1079
|
-
|
|
1077
|
+
h(!1);
|
|
1080
1078
|
};
|
|
1081
|
-
return ge(() => (
|
|
1082
|
-
var
|
|
1083
|
-
u.current && ((
|
|
1079
|
+
return ge(() => (y(!1), $(), window.addEventListener("online", V), window.addEventListener("offline", G), () => {
|
|
1080
|
+
var F, Z;
|
|
1081
|
+
u.current && ((F = u.current) == null || F.off("connect", R), (Z = u.current) == null || Z.disconnect(), u.current = null), window.removeEventListener("online", V), window.removeEventListener("offline", G);
|
|
1084
1082
|
}), [
|
|
1085
1083
|
JSON.stringify(C || {}),
|
|
1086
1084
|
E == null ? void 0 : E.socketURL,
|
|
@@ -1098,14 +1096,14 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
1098
1096
|
loadingRegenerate: s,
|
|
1099
1097
|
file: c,
|
|
1100
1098
|
setFile: l,
|
|
1101
|
-
connected:
|
|
1099
|
+
connected: x,
|
|
1102
1100
|
isHandshakeWidget: p,
|
|
1103
1101
|
createSocket: $,
|
|
1104
1102
|
currRegenerateId: k,
|
|
1105
|
-
thinkingText:
|
|
1103
|
+
thinkingText: m,
|
|
1106
1104
|
setThinkingText: j,
|
|
1107
1105
|
isThinkingCompleted: T,
|
|
1108
|
-
setIsThinkingCompleted:
|
|
1106
|
+
setIsThinkingCompleted: S
|
|
1109
1107
|
},
|
|
1110
1108
|
children: e
|
|
1111
1109
|
}
|
|
@@ -1444,58 +1442,69 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
1444
1442
|
}
|
|
1445
1443
|
)
|
|
1446
1444
|
);
|
|
1447
|
-
}, Qn =
|
|
1448
|
-
const
|
|
1449
|
-
const
|
|
1450
|
-
let
|
|
1451
|
-
const
|
|
1452
|
-
for (;
|
|
1453
|
-
const f = e == null ? void 0 : e.indexOf(
|
|
1454
|
-
if (f !== -1 &&
|
|
1455
|
-
f >
|
|
1445
|
+
}, Qn = Y(Ro), Oo = ({ childrenData: e, children: n, tag: o }) => {
|
|
1446
|
+
const r = M("ThinkProcess", "Think Process"), s = (() => {
|
|
1447
|
+
const i = [], c = [];
|
|
1448
|
+
let l = 0;
|
|
1449
|
+
const x = "<think>", h = "</think>";
|
|
1450
|
+
for (; l < (e == null ? void 0 : e.length); ) {
|
|
1451
|
+
const f = e == null ? void 0 : e.indexOf(x, l), m = e == null ? void 0 : e.indexOf(h, l);
|
|
1452
|
+
if (f !== -1 && m !== -1 && f < m)
|
|
1453
|
+
f > l && i.push({
|
|
1456
1454
|
type: "text",
|
|
1457
|
-
value: e == null ? void 0 : e.slice(
|
|
1458
|
-
}),
|
|
1459
|
-
|
|
1460
|
-
value: e == null ? void 0 : e.slice(f + c.length, x)
|
|
1455
|
+
value: e == null ? void 0 : e.slice(l, f)
|
|
1456
|
+
}), c.push(
|
|
1457
|
+
e == null ? void 0 : e.slice(f + x.length, m)
|
|
1461
1458
|
// ini buat ambil text dri stlah <think> sampai sblm </think>
|
|
1462
|
-
|
|
1463
|
-
else if (f !== -1 &&
|
|
1464
|
-
f >
|
|
1459
|
+
), l = m + h.length;
|
|
1460
|
+
else if (f !== -1 && m === -1) {
|
|
1461
|
+
f > l && i.push({
|
|
1465
1462
|
type: "text",
|
|
1466
|
-
value: e == null ? void 0 : e.slice(
|
|
1467
|
-
}),
|
|
1468
|
-
|
|
1469
|
-
value: e == null ? void 0 : e.slice(f + c.length)
|
|
1463
|
+
value: e == null ? void 0 : e.slice(l, f)
|
|
1464
|
+
}), c.push(
|
|
1465
|
+
e == null ? void 0 : e.slice(f + x.length)
|
|
1470
1466
|
// ini buat ambil smua text stlah <think> aja, karna </think> blm ada
|
|
1471
|
-
|
|
1467
|
+
);
|
|
1472
1468
|
break;
|
|
1473
1469
|
} else {
|
|
1474
|
-
|
|
1470
|
+
i.push({
|
|
1475
1471
|
type: "text",
|
|
1476
|
-
value: e == null ? void 0 : e.slice(
|
|
1472
|
+
value: e == null ? void 0 : e.slice(l)
|
|
1477
1473
|
});
|
|
1478
1474
|
break;
|
|
1479
1475
|
}
|
|
1480
1476
|
}
|
|
1481
|
-
|
|
1477
|
+
const p = [];
|
|
1478
|
+
return c.length > 0 && p.push({
|
|
1479
|
+
type: "think",
|
|
1480
|
+
value: c.join(`
|
|
1481
|
+
|
|
1482
|
+
`)
|
|
1483
|
+
// gabungkan semua isi <think> dengan pemisah newline
|
|
1484
|
+
}), p.push(...i), p;
|
|
1482
1485
|
})();
|
|
1483
|
-
return /* @__PURE__ */ t.jsx("div", { children:
|
|
1486
|
+
return /* @__PURE__ */ t.jsx("div", { children: s == null ? void 0 : s.map((i, c) => (i == null ? void 0 : i.type) === "think" ? /* @__PURE__ */ t.jsx(
|
|
1484
1487
|
dn,
|
|
1485
1488
|
{
|
|
1486
1489
|
className: "w-think-collapse",
|
|
1487
|
-
defaultActiveKey: ["think"],
|
|
1488
1490
|
ghost: !0,
|
|
1489
1491
|
style: { marginBottom: 12 },
|
|
1490
|
-
children: /* @__PURE__ */ t.jsx(
|
|
1492
|
+
children: /* @__PURE__ */ t.jsx(
|
|
1493
|
+
dn.Panel,
|
|
1494
|
+
{
|
|
1495
|
+
header: o || r,
|
|
1496
|
+
children: /* @__PURE__ */ t.jsx(ce.Paragraph, { children: /* @__PURE__ */ t.jsx("blockquote", { children: n(i == null ? void 0 : i.value, "think") }) })
|
|
1497
|
+
},
|
|
1498
|
+
"think"
|
|
1499
|
+
)
|
|
1491
1500
|
},
|
|
1492
|
-
|
|
1493
|
-
) : /* @__PURE__ */ t.jsx(pt, { children: n(
|
|
1494
|
-
}, Do =
|
|
1501
|
+
c
|
|
1502
|
+
) : /* @__PURE__ */ t.jsx(pt, { children: n(i == null ? void 0 : i.value, "text") }, c)) });
|
|
1503
|
+
}, Do = Y(Oo), Cn = ({ props: e, isModal: n = !1 }) => {
|
|
1495
1504
|
const o = (r, a) => {
|
|
1496
1505
|
var s;
|
|
1497
1506
|
return (s = Mr) == null ? void 0 : s.map(r, (i) => {
|
|
1498
|
-
var c, l,
|
|
1507
|
+
var c, l, x;
|
|
1499
1508
|
return !Nr(i) || ((c = Object.keys((i == null ? void 0 : i.props) || {})) == null ? void 0 : c.length) === 0 ? i : Fr(i, {
|
|
1500
1509
|
...i == null ? void 0 : i.props,
|
|
1501
1510
|
...(i == null ? void 0 : i.type) === "thead" && {
|
|
@@ -1517,7 +1526,7 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
1517
1526
|
...(i == null ? void 0 : i.type) === "tbody" && {
|
|
1518
1527
|
className: "ant-table-tbody"
|
|
1519
1528
|
},
|
|
1520
|
-
children: (l = i == null ? void 0 : i.props) != null && l.children ? o((
|
|
1529
|
+
children: (l = i == null ? void 0 : i.props) != null && l.children ? o((x = i == null ? void 0 : i.props) == null ? void 0 : x.children, i == null ? void 0 : i.type) : i == null ? void 0 : i.props
|
|
1521
1530
|
});
|
|
1522
1531
|
});
|
|
1523
1532
|
};
|
|
@@ -1533,18 +1542,18 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
1533
1542
|
children: /* @__PURE__ */ t.jsx("table", { className: "wp-md-table", ...e, children: o(e == null ? void 0 : e.children, "") })
|
|
1534
1543
|
}
|
|
1535
1544
|
) }) }) });
|
|
1536
|
-
}, Lo = ({ children: e }) => {
|
|
1537
|
-
const
|
|
1545
|
+
}, Lo = ({ children: e, tag: n }) => {
|
|
1546
|
+
const o = M(
|
|
1538
1547
|
"OpenDetailTable",
|
|
1539
1548
|
"Open Detail Table"
|
|
1540
|
-
),
|
|
1541
|
-
return /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(Do, { childrenData: e, children: (
|
|
1549
|
+
), r = M("TableDetail", "Tabel Detail"), { widgetProps: a, objInitPayload: s } = ue(), [i, c] = H(!1);
|
|
1550
|
+
return /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(Do, { childrenData: e, tag: n, children: (l, x) => /* @__PURE__ */ t.jsx(
|
|
1542
1551
|
Kr,
|
|
1543
1552
|
{
|
|
1544
1553
|
remarkPlugins: [Pr],
|
|
1545
1554
|
components: {
|
|
1546
|
-
table: ({ ...
|
|
1547
|
-
/* @__PURE__ */ t.jsx(Cn, { props:
|
|
1555
|
+
table: ({ ...h }) => /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1556
|
+
/* @__PURE__ */ t.jsx(Cn, { props: h }),
|
|
1548
1557
|
/* @__PURE__ */ t.jsx(
|
|
1549
1558
|
"div",
|
|
1550
1559
|
{
|
|
@@ -1557,9 +1566,9 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
1557
1566
|
le,
|
|
1558
1567
|
{
|
|
1559
1568
|
onClick: () => {
|
|
1560
|
-
|
|
1569
|
+
c(!0);
|
|
1561
1570
|
},
|
|
1562
|
-
children:
|
|
1571
|
+
children: o
|
|
1563
1572
|
}
|
|
1564
1573
|
)
|
|
1565
1574
|
}
|
|
@@ -1569,66 +1578,66 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
1569
1578
|
{
|
|
1570
1579
|
getContainer: () => document.body,
|
|
1571
1580
|
footer: null,
|
|
1572
|
-
title:
|
|
1581
|
+
title: r,
|
|
1573
1582
|
width: 800,
|
|
1574
|
-
open:
|
|
1583
|
+
open: i,
|
|
1575
1584
|
onCancel: () => {
|
|
1576
|
-
|
|
1585
|
+
c(!1);
|
|
1577
1586
|
},
|
|
1578
|
-
children: /* @__PURE__ */ t.jsx(Cn, { props:
|
|
1587
|
+
children: /* @__PURE__ */ t.jsx(Cn, { props: h, isModal: !0 })
|
|
1579
1588
|
}
|
|
1580
1589
|
)
|
|
1581
1590
|
] }),
|
|
1582
|
-
p: (
|
|
1591
|
+
p: (h) => /* @__PURE__ */ t.jsx(
|
|
1583
1592
|
"p",
|
|
1584
1593
|
{
|
|
1585
|
-
...
|
|
1594
|
+
...h,
|
|
1586
1595
|
style: {
|
|
1587
|
-
...(
|
|
1588
|
-
...
|
|
1596
|
+
...(h == null ? void 0 : h.style) || {},
|
|
1597
|
+
...x === "think" && {
|
|
1589
1598
|
fontSize: 12,
|
|
1590
1599
|
color: "grey"
|
|
1591
1600
|
}
|
|
1592
1601
|
}
|
|
1593
1602
|
}
|
|
1594
1603
|
),
|
|
1595
|
-
code: ({ className:
|
|
1596
|
-
const
|
|
1597
|
-
return
|
|
1604
|
+
code: ({ className: h, children: p }) => {
|
|
1605
|
+
const f = /language-(\w+)/.exec(h || "");
|
|
1606
|
+
return f ? /* @__PURE__ */ t.jsx(
|
|
1598
1607
|
Xr,
|
|
1599
1608
|
{
|
|
1600
|
-
language:
|
|
1609
|
+
language: f[1],
|
|
1601
1610
|
style: ko,
|
|
1602
1611
|
PreTag: "div",
|
|
1603
|
-
children: String(
|
|
1612
|
+
children: String(p).replace(/\n$/, "")
|
|
1604
1613
|
}
|
|
1605
|
-
) : /* @__PURE__ */ t.jsx(ce.Text, { code: !0, children:
|
|
1614
|
+
) : /* @__PURE__ */ t.jsx(ce.Text, { code: !0, children: p });
|
|
1606
1615
|
},
|
|
1607
|
-
a: (
|
|
1608
|
-
var
|
|
1609
|
-
const
|
|
1610
|
-
|
|
1616
|
+
a: (h) => {
|
|
1617
|
+
var T, S;
|
|
1618
|
+
const p = h.href, f = (T = h.children) == null ? void 0 : T[0], m = bn(p), j = bn(
|
|
1619
|
+
s == null ? void 0 : s.uriBackend
|
|
1611
1620
|
);
|
|
1612
|
-
return !
|
|
1613
|
-
|
|
1614
|
-
)) == null ||
|
|
1621
|
+
return !m && j ? ((S = Eo(
|
|
1622
|
+
s == null ? void 0 : s.uriBackend
|
|
1623
|
+
)) == null || S.origin, /* @__PURE__ */ t.jsx(
|
|
1615
1624
|
"span",
|
|
1616
1625
|
{
|
|
1617
1626
|
className: "w-link-path",
|
|
1618
|
-
onClick: (
|
|
1619
|
-
|
|
1620
|
-
const
|
|
1621
|
-
|
|
1627
|
+
onClick: (C) => {
|
|
1628
|
+
C.stopPropagation();
|
|
1629
|
+
const E = `${p}`;
|
|
1630
|
+
a != null && a.history && a.history.push(E);
|
|
1622
1631
|
},
|
|
1623
|
-
children:
|
|
1632
|
+
children: f
|
|
1624
1633
|
}
|
|
1625
|
-
)) : /* @__PURE__ */ t.jsx("a", { ...
|
|
1634
|
+
)) : /* @__PURE__ */ t.jsx("a", { ...h, target: "_blank", className: "w-link-path" });
|
|
1626
1635
|
}
|
|
1627
1636
|
},
|
|
1628
|
-
children:
|
|
1637
|
+
children: l
|
|
1629
1638
|
}
|
|
1630
1639
|
) }) });
|
|
1631
|
-
}, er =
|
|
1640
|
+
}, er = Y(Lo), Mo = () => /* @__PURE__ */ t.jsxs(
|
|
1632
1641
|
"svg",
|
|
1633
1642
|
{
|
|
1634
1643
|
width: "24",
|
|
@@ -2006,56 +2015,56 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
2006
2015
|
), s = M(
|
|
2007
2016
|
"AdditionalFeedback",
|
|
2008
2017
|
"Additional Feedback"
|
|
2009
|
-
), [i] = Ce.useForm(), [c, l] = H(!1), [
|
|
2010
|
-
var
|
|
2011
|
-
const
|
|
2012
|
-
return typeof (e == null ? void 0 : e.text_thumbsup_link) == "string" && ((
|
|
2013
|
-
}, [e]),
|
|
2014
|
-
var
|
|
2015
|
-
const
|
|
2016
|
-
return typeof (e == null ? void 0 : e.text_thumbsdown_link) == "string" && ((
|
|
2018
|
+
), [i] = Ce.useForm(), [c, l] = H(!1), [x, h] = H(""), { setChats: p } = je(), { objInitPayload: f, isUserInputHide: m } = ue(), { activeTab: j } = Me(), T = z(() => {
|
|
2019
|
+
var w;
|
|
2020
|
+
const y = Ee(e, "feedback") ? (e == null ? void 0 : e.feedback) === "like" || (e == null ? void 0 : e.feedback) === "" : !0;
|
|
2021
|
+
return typeof (e == null ? void 0 : e.text_thumbsup_link) == "string" && ((w = e == null ? void 0 : e.text_thumbsup_link) == null ? void 0 : w.trim()) !== "" && y;
|
|
2022
|
+
}, [e]), S = z(() => {
|
|
2023
|
+
var w;
|
|
2024
|
+
const y = Ee(e, "feedback") ? (e == null ? void 0 : e.feedback) === "dislike" || (e == null ? void 0 : e.feedback) === "" : !0;
|
|
2025
|
+
return typeof (e == null ? void 0 : e.text_thumbsdown_link) == "string" && ((w = e == null ? void 0 : e.text_thumbsdown_link) == null ? void 0 : w.trim()) !== "" && y;
|
|
2017
2026
|
}, [e]), C = z(() => {
|
|
2018
|
-
if (
|
|
2027
|
+
if (f != null && f.uriBackend)
|
|
2019
2028
|
try {
|
|
2020
|
-
return new URL(
|
|
2029
|
+
return new URL(f.uriBackend).origin;
|
|
2021
2030
|
} catch {
|
|
2022
2031
|
return "";
|
|
2023
2032
|
}
|
|
2024
2033
|
return "";
|
|
2025
|
-
}, [
|
|
2034
|
+
}, [f == null ? void 0 : f.uriBackend]), E = (y) => {
|
|
2026
2035
|
var U;
|
|
2027
|
-
const
|
|
2036
|
+
const w = y === "like" ? e == null ? void 0 : e.text_thumbsup_link : e == null ? void 0 : e.text_thumbsdown_link, {
|
|
2028
2037
|
access_token: d = "",
|
|
2029
|
-
companycode:
|
|
2038
|
+
companycode: v = "",
|
|
2030
2039
|
companyid: u = "",
|
|
2031
2040
|
uriBackend: b = "",
|
|
2032
2041
|
uriBackendEnt: k = "",
|
|
2033
2042
|
lang: D = ""
|
|
2034
|
-
} =
|
|
2043
|
+
} = f || {}, R = x === "another" ? i == null ? void 0 : i.getFieldValue("ADDITIONAL_FEEDBACK") : x;
|
|
2035
2044
|
(U = Je({
|
|
2036
2045
|
method: "POST",
|
|
2037
|
-
url:
|
|
2046
|
+
url: w,
|
|
2038
2047
|
data: {
|
|
2039
2048
|
message_id: e == null ? void 0 : e.id,
|
|
2040
|
-
response_type:
|
|
2041
|
-
...
|
|
2049
|
+
response_type: y === "like" ? "up" : "down",
|
|
2050
|
+
...y === "dislike" && {
|
|
2042
2051
|
additional_feedback: R
|
|
2043
2052
|
}
|
|
2044
2053
|
},
|
|
2045
2054
|
headers: {
|
|
2046
2055
|
"Content-Type": "application/json",
|
|
2047
2056
|
Authorization: `Bearer ${d}`,
|
|
2048
|
-
"company-code": `${
|
|
2057
|
+
"company-code": `${v}`,
|
|
2049
2058
|
"company-id": `${u}`,
|
|
2050
2059
|
uriBackend: `${b}`,
|
|
2051
2060
|
uriBackendEnt: `${k}`,
|
|
2052
2061
|
"custom-origin": `${C}`,
|
|
2053
|
-
"Acc-Name": `${
|
|
2062
|
+
"Acc-Name": `${v.toUpperCase()}`,
|
|
2054
2063
|
Language: `${D}`
|
|
2055
2064
|
}
|
|
2056
2065
|
})) == null || U.then(($) => {
|
|
2057
|
-
var
|
|
2058
|
-
($ == null ? void 0 : $.status) === 200 && (c && l(!1), (
|
|
2066
|
+
var V, G, P;
|
|
2067
|
+
($ == null ? void 0 : $.status) === 200 && (c && l(!1), (V = Te) == null || V.destroy(), (G = Te) == null || G.config({
|
|
2059
2068
|
getContainer: () => document.querySelector(".w-widget-content-container"),
|
|
2060
2069
|
top: 28,
|
|
2061
2070
|
placement: "top",
|
|
@@ -2063,15 +2072,15 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
2063
2072
|
}), (P = Te) == null || P.success({
|
|
2064
2073
|
message: a,
|
|
2065
2074
|
className: "w-notification-content"
|
|
2066
|
-
}), p((
|
|
2075
|
+
}), p((F) => {
|
|
2067
2076
|
var Z;
|
|
2068
|
-
return (Z =
|
|
2077
|
+
return (Z = F == null ? void 0 : F.map((K) => {
|
|
2069
2078
|
var O;
|
|
2070
2079
|
if (Ee(K, "chats")) {
|
|
2071
|
-
const W = (O = K == null ? void 0 : K.chats) == null ? void 0 : O.map((
|
|
2072
|
-
...
|
|
2073
|
-
feedback:
|
|
2074
|
-
} :
|
|
2080
|
+
const W = (O = K == null ? void 0 : K.chats) == null ? void 0 : O.map((I) => (I == null ? void 0 : I.indexChat) === (e == null ? void 0 : e.indexChat) ? {
|
|
2081
|
+
...I,
|
|
2082
|
+
feedback: y
|
|
2083
|
+
} : I);
|
|
2075
2084
|
return {
|
|
2076
2085
|
...K,
|
|
2077
2086
|
chats: W
|
|
@@ -2079,16 +2088,16 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
2079
2088
|
}
|
|
2080
2089
|
return (e == null ? void 0 : e.message_id) === (K == null ? void 0 : K.message_id) ? {
|
|
2081
2090
|
...K,
|
|
2082
|
-
feedback:
|
|
2091
|
+
feedback: y
|
|
2083
2092
|
} : K;
|
|
2084
2093
|
})) == null ? void 0 : Z.flat();
|
|
2085
2094
|
}));
|
|
2086
2095
|
});
|
|
2087
2096
|
};
|
|
2088
2097
|
return ge(() => {
|
|
2089
|
-
var
|
|
2090
|
-
(
|
|
2091
|
-
}, [j]),
|
|
2098
|
+
var y;
|
|
2099
|
+
(y = Te) == null || y.destroy();
|
|
2100
|
+
}, [j]), m ? null : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2092
2101
|
T && /* @__PURE__ */ t.jsx(
|
|
2093
2102
|
le,
|
|
2094
2103
|
{
|
|
@@ -2098,7 +2107,7 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
2098
2107
|
}
|
|
2099
2108
|
}
|
|
2100
2109
|
),
|
|
2101
|
-
|
|
2110
|
+
S && /* @__PURE__ */ t.jsx(
|
|
2102
2111
|
le,
|
|
2103
2112
|
{
|
|
2104
2113
|
icon: /* @__PURE__ */ t.jsx(pe, { type: "dislike", chatProps: e }),
|
|
@@ -2132,13 +2141,13 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
2132
2141
|
options: lo,
|
|
2133
2142
|
optionType: "button",
|
|
2134
2143
|
buttonStyle: "solid",
|
|
2135
|
-
onChange: (
|
|
2136
|
-
var
|
|
2137
|
-
|
|
2144
|
+
onChange: (y) => {
|
|
2145
|
+
var w;
|
|
2146
|
+
h((w = y == null ? void 0 : y.target) == null ? void 0 : w.value);
|
|
2138
2147
|
}
|
|
2139
2148
|
}
|
|
2140
2149
|
),
|
|
2141
|
-
|
|
2150
|
+
x === "another" && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2142
2151
|
/* @__PURE__ */ t.jsx(Ur, { children: s }),
|
|
2143
2152
|
/* @__PURE__ */ t.jsx(Ce, { form: i, layout: "vertical", children: /* @__PURE__ */ t.jsx(Ce.Item, { name: "ADDITIONAL_FEEDBACK", children: /* @__PURE__ */ t.jsx(st.TextArea, { rows: 3 }) }) })
|
|
2144
2153
|
] })
|
|
@@ -2146,13 +2155,13 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
2146
2155
|
}
|
|
2147
2156
|
)
|
|
2148
2157
|
] });
|
|
2149
|
-
}, rs =
|
|
2158
|
+
}, rs = Y(ns), os = ({
|
|
2150
2159
|
showFeedback: e = !0,
|
|
2151
2160
|
showRegenerate: n = !0,
|
|
2152
2161
|
position: o = "left",
|
|
2153
2162
|
...r
|
|
2154
2163
|
}) => {
|
|
2155
|
-
const a = yo(), { chats: s, onSendMsg: i, setChats: c, loadingRegenerate: l, currRegenerateId:
|
|
2164
|
+
const a = yo(), { chats: s, onSendMsg: i, setChats: c, loadingRegenerate: l, currRegenerateId: x } = je(), h = z(() => r == null ? void 0 : r.sender, [r]), p = z(() => s == null ? void 0 : s.filter((S) => (S == null ? void 0 : S.sender) === "client"), [s]), f = z(() => n && h === "response" && (p == null ? void 0 : p.length) > 0 && (r == null ? void 0 : r.indexChat) === (s == null ? void 0 : s.length) - 1 && (r == null ? void 0 : r.text_FeedbackIcons) === "hidup", [h, p, s, r, n]), m = z(() => {
|
|
2156
2165
|
switch (o) {
|
|
2157
2166
|
case "left":
|
|
2158
2167
|
return "flex-start";
|
|
@@ -2162,15 +2171,15 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
2162
2171
|
return "flex-end";
|
|
2163
2172
|
}
|
|
2164
2173
|
}, [o]), j = z(() => e && (r == null ? void 0 : r.text_FeedbackIcons) === "hidup", [r, e]), T = () => {
|
|
2165
|
-
const
|
|
2174
|
+
const S = p == null ? void 0 : p[(p == null ? void 0 : p.length) - 1], C = s == null ? void 0 : s[(s == null ? void 0 : s.length) - 1];
|
|
2166
2175
|
c(
|
|
2167
|
-
(E = []) => E == null ? void 0 : E.map((
|
|
2168
|
-
...
|
|
2176
|
+
(E = []) => E == null ? void 0 : E.map((y, w) => w === (E == null ? void 0 : E.length) - 1 && (y == null ? void 0 : y.sender) === "response" ? {
|
|
2177
|
+
...y,
|
|
2169
2178
|
generated_id: (C == null ? void 0 : C.generated_id) ?? a
|
|
2170
2179
|
// adjust with response
|
|
2171
|
-
} :
|
|
2172
|
-
),
|
|
2173
|
-
msg:
|
|
2180
|
+
} : y)
|
|
2181
|
+
), x.current = (C == null ? void 0 : C.generated_id) ?? a, i({
|
|
2182
|
+
msg: S == null ? void 0 : S.text,
|
|
2174
2183
|
additionalConfig: {
|
|
2175
2184
|
generate_id: (C == null ? void 0 : C.generated_id) ?? a
|
|
2176
2185
|
},
|
|
@@ -2183,10 +2192,10 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
2183
2192
|
style: {
|
|
2184
2193
|
display: "flex",
|
|
2185
2194
|
gap: 8,
|
|
2186
|
-
justifyContent:
|
|
2195
|
+
justifyContent: m
|
|
2187
2196
|
},
|
|
2188
2197
|
children: [
|
|
2189
|
-
|
|
2198
|
+
f && /* @__PURE__ */ t.jsx(
|
|
2190
2199
|
le,
|
|
2191
2200
|
{
|
|
2192
2201
|
loading: l,
|
|
@@ -2200,7 +2209,7 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
2200
2209
|
]
|
|
2201
2210
|
}
|
|
2202
2211
|
) });
|
|
2203
|
-
}, $t =
|
|
2212
|
+
}, $t = Y(os), ss = ({ nameFallback: e = "", ...n }) => /* @__PURE__ */ t.jsx(
|
|
2204
2213
|
Wr,
|
|
2205
2214
|
{
|
|
2206
2215
|
...typeof (n == null ? void 0 : n.onError) != "function" && {
|
|
@@ -2210,7 +2219,7 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
2210
2219
|
loading: "lazy",
|
|
2211
2220
|
...n
|
|
2212
2221
|
}
|
|
2213
|
-
), qt =
|
|
2222
|
+
), qt = Y(ss), is = ({ nameFallback: e = "", ...n }) => {
|
|
2214
2223
|
const o = se(0);
|
|
2215
2224
|
return /* @__PURE__ */ t.jsx(
|
|
2216
2225
|
Un,
|
|
@@ -2230,35 +2239,35 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
2230
2239
|
)
|
|
2231
2240
|
}
|
|
2232
2241
|
);
|
|
2233
|
-
}, $e =
|
|
2242
|
+
}, $e = Y(is);
|
|
2234
2243
|
$e.Group = Un.Group;
|
|
2235
2244
|
const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", children: [
|
|
2236
2245
|
/* @__PURE__ */ t.jsx("div", {}),
|
|
2237
2246
|
/* @__PURE__ */ t.jsx("div", {}),
|
|
2238
2247
|
/* @__PURE__ */ t.jsx("div", {}),
|
|
2239
2248
|
/* @__PURE__ */ t.jsx("div", {})
|
|
2240
|
-
] }), nr =
|
|
2249
|
+
] }), nr = Y(as), cs = () => {
|
|
2241
2250
|
const { widgetProps: e } = ue();
|
|
2242
2251
|
return /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
|
|
2243
|
-
/* @__PURE__ */ t.jsx($e, { src:
|
|
2252
|
+
/* @__PURE__ */ t.jsx($e, { src: ht, nameFallback: e == null ? void 0 : e.title }),
|
|
2244
2253
|
/* @__PURE__ */ t.jsx(nr, {})
|
|
2245
2254
|
] });
|
|
2246
|
-
}, Kt =
|
|
2255
|
+
}, Kt = Y(cs), ls = ({ src: e, name: n }) => /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
|
|
2247
2256
|
/* @__PURE__ */ t.jsx($e, { src: e, preview: !1, nameFallback: n }),
|
|
2248
2257
|
/* @__PURE__ */ t.jsx(ce.Text, { children: n })
|
|
2249
|
-
] }), it =
|
|
2250
|
-
var
|
|
2251
|
-
const [n, o] = H(1), { loadingRegenerate: r, currRegenerateId: a } = je(), { isExpand: s, widgetProps: i } = ue(), c = z(() => e == null ? void 0 : e.sender, [e]), l = z(() => e == null ? void 0 : e.chats, [e == null ? void 0 : e.chats]),
|
|
2252
|
-
const
|
|
2253
|
-
return (
|
|
2258
|
+
] }), it = Y(ls), us = ({ ...e }) => {
|
|
2259
|
+
var h, p;
|
|
2260
|
+
const [n, o] = H(1), { loadingRegenerate: r, currRegenerateId: a } = je(), { isExpand: s, widgetProps: i } = ue(), c = z(() => e == null ? void 0 : e.sender, [e]), l = z(() => e == null ? void 0 : e.chats, [e == null ? void 0 : e.chats]), x = z(() => {
|
|
2261
|
+
const f = l == null ? void 0 : l[(l == null ? void 0 : l.length) - 1];
|
|
2262
|
+
return (f == null ? void 0 : f.generated_id) === a.current;
|
|
2254
2263
|
}, [l, e, a.current]);
|
|
2255
2264
|
return ge(() => {
|
|
2256
2265
|
!r && (l == null ? void 0 : l.length) > 0 && (o(l == null ? void 0 : l.length), Le());
|
|
2257
|
-
}, [r]), r &&
|
|
2258
|
-
c === "response" && /* @__PURE__ */ t.jsx(it, { name: i == null ? void 0 : i.title, src:
|
|
2259
|
-
/* @__PURE__ */ t.jsx("div", { style: { display: "flex", gap: 8 }, children: l == null ? void 0 : l.map((
|
|
2260
|
-
var
|
|
2261
|
-
const j =
|
|
2266
|
+
}, [r]), r && x ? /* @__PURE__ */ t.jsx(Kt, {}) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2267
|
+
c === "response" && /* @__PURE__ */ t.jsx(it, { name: i == null ? void 0 : i.title, src: ht }),
|
|
2268
|
+
/* @__PURE__ */ t.jsx("div", { style: { display: "flex", gap: 8 }, children: l == null ? void 0 : l.map((f, m) => {
|
|
2269
|
+
var S;
|
|
2270
|
+
const j = m === ((S = e == null ? void 0 : e.chats) == null ? void 0 : S.length) - 1, T = n === m + 1;
|
|
2262
2271
|
return /* @__PURE__ */ t.jsxs(
|
|
2263
2272
|
"div",
|
|
2264
2273
|
{
|
|
@@ -2280,8 +2289,8 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2280
2289
|
{
|
|
2281
2290
|
className: `w-bubble-chat w-bubble-chat-regenerate ${`w-${c}`} ${s ? "w-bubble-chat-regenerate-expand" : ""}`,
|
|
2282
2291
|
children: [
|
|
2283
|
-
/* @__PURE__ */ t.jsx(er, { children:
|
|
2284
|
-
c === "response" && /* @__PURE__ */ t.jsx("span", { style: { fontSize: 12, color: "rgba(0,0,0,0.4)" }, children:
|
|
2292
|
+
/* @__PURE__ */ t.jsx(er, { tag: f == null ? void 0 : f.tag, children: f == null ? void 0 : f.text }),
|
|
2293
|
+
c === "response" && /* @__PURE__ */ t.jsx("span", { style: { fontSize: 12, color: "rgba(0,0,0,0.4)" }, children: f == null ? void 0 : f.timestamp })
|
|
2285
2294
|
]
|
|
2286
2295
|
}
|
|
2287
2296
|
)
|
|
@@ -2292,12 +2301,12 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2292
2301
|
{
|
|
2293
2302
|
showFeedback: !0,
|
|
2294
2303
|
showRegenerate: !1,
|
|
2295
|
-
...
|
|
2304
|
+
...f
|
|
2296
2305
|
}
|
|
2297
2306
|
)
|
|
2298
2307
|
]
|
|
2299
2308
|
},
|
|
2300
|
-
|
|
2309
|
+
m
|
|
2301
2310
|
);
|
|
2302
2311
|
}) }),
|
|
2303
2312
|
/* @__PURE__ */ t.jsxs("div", { style: { display: "flex", gap: 8, justifyContent: "center" }, children: [
|
|
@@ -2318,14 +2327,14 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2318
2327
|
disabled: n === 1,
|
|
2319
2328
|
icon: /* @__PURE__ */ t.jsx(pe, { type: "left" }),
|
|
2320
2329
|
onClick: () => {
|
|
2321
|
-
n > 1 && o((
|
|
2330
|
+
n > 1 && o((f) => f - 1);
|
|
2322
2331
|
}
|
|
2323
2332
|
}
|
|
2324
2333
|
),
|
|
2325
2334
|
/* @__PURE__ */ t.jsxs(ce.Text, { children: [
|
|
2326
2335
|
n,
|
|
2327
2336
|
" / ",
|
|
2328
|
-
(
|
|
2337
|
+
(h = e == null ? void 0 : e.chats) == null ? void 0 : h.length
|
|
2329
2338
|
] }),
|
|
2330
2339
|
/* @__PURE__ */ t.jsx(
|
|
2331
2340
|
le,
|
|
@@ -2335,15 +2344,15 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2335
2344
|
disabled: n === ((p = e == null ? void 0 : e.chats) == null ? void 0 : p.length),
|
|
2336
2345
|
icon: /* @__PURE__ */ t.jsx(pe, { type: "right" }),
|
|
2337
2346
|
onClick: () => {
|
|
2338
|
-
var
|
|
2339
|
-
n < ((
|
|
2347
|
+
var f;
|
|
2348
|
+
n < ((f = e == null ? void 0 : e.chats) == null ? void 0 : f.length) && o((m) => m + 1);
|
|
2340
2349
|
}
|
|
2341
2350
|
}
|
|
2342
2351
|
)
|
|
2343
2352
|
] })
|
|
2344
2353
|
] })
|
|
2345
2354
|
] });
|
|
2346
|
-
}, ds =
|
|
2355
|
+
}, ds = Y(us), fs = ({ date: e, format: n, sender: o, ...r }) => {
|
|
2347
2356
|
var a, s;
|
|
2348
2357
|
return /* @__PURE__ */ t.jsx(
|
|
2349
2358
|
ce.Text,
|
|
@@ -2363,18 +2372,18 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2363
2372
|
children: n ? (s = Se(e)) == null ? void 0 : s.format(n) : e
|
|
2364
2373
|
}
|
|
2365
2374
|
);
|
|
2366
|
-
}, at =
|
|
2375
|
+
}, at = Y(fs), gs = ({ showResponseInfo: e = !0, ...n }) => {
|
|
2367
2376
|
var c;
|
|
2368
2377
|
const { loadingRegenerate: o, chats: r } = je(), { widgetProps: a } = ue(), s = z(() => (r == null ? void 0 : r.length) - 1 === (n == null ? void 0 : n.indexChat), [r]), i = z(() => n == null ? void 0 : n.sender, [n]);
|
|
2369
2378
|
return ((c = n == null ? void 0 : n.chats) == null ? void 0 : c.length) > 0 ? /* @__PURE__ */ t.jsx(ds, { ...n }) : o && s ? /* @__PURE__ */ t.jsx(Kt, {}) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2370
|
-
i === "response" && e && /* @__PURE__ */ t.jsx(it, { name: a == null ? void 0 : a.title, src:
|
|
2379
|
+
i === "response" && e && /* @__PURE__ */ t.jsx(it, { name: a == null ? void 0 : a.title, src: ht }),
|
|
2371
2380
|
/* @__PURE__ */ t.jsxs("div", { className: `w-bubble-chat ${`w-${i}`}`, children: [
|
|
2372
|
-
/* @__PURE__ */ t.jsx(er, { children: n == null ? void 0 : n.text }, n == null ? void 0 : n.text),
|
|
2381
|
+
/* @__PURE__ */ t.jsx(er, { tag: n == null ? void 0 : n.tag, children: n == null ? void 0 : n.text }, n == null ? void 0 : n.text),
|
|
2373
2382
|
/* @__PURE__ */ t.jsx(at, { date: n == null ? void 0 : n.timestamp, sender: i })
|
|
2374
2383
|
] }),
|
|
2375
2384
|
/* @__PURE__ */ t.jsx($t, { ...n })
|
|
2376
2385
|
] });
|
|
2377
|
-
}, rt =
|
|
2386
|
+
}, rt = Y(gs), ps = () => {
|
|
2378
2387
|
const e = M(
|
|
2379
2388
|
"PleaseUploadFile",
|
|
2380
2389
|
"Please upload specify file that needed to complete your request"
|
|
@@ -2423,13 +2432,13 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2423
2432
|
]
|
|
2424
2433
|
}
|
|
2425
2434
|
);
|
|
2426
|
-
},
|
|
2427
|
-
const [e, n] = H(!1), [o, r] = H(!1), [a, s] = H(!1), [i, c] = H(3), [l,
|
|
2428
|
-
}, onCheckPYAccess:
|
|
2429
|
-
} } = (
|
|
2435
|
+
}, xs = Y(ps), hs = () => {
|
|
2436
|
+
const [e, n] = H(!1), [o, r] = H(!1), [a, s] = H(!1), [i, c] = H(3), [l, x] = H(!1), [h, p] = H(""), { widgetProps: f } = ue(), { onSendMsg: m, chats: j } = je(), { onSubmitPYPwd: T = () => {
|
|
2437
|
+
}, onCheckPYAccess: S = () => {
|
|
2438
|
+
} } = (f == null ? void 0 : f.onPayslipFn) || {}, C = M(
|
|
2430
2439
|
"ProvidePasswordPayslip",
|
|
2431
2440
|
"Please provide your password account to access the download"
|
|
2432
|
-
), E = M("Cancel", "Cancel"),
|
|
2441
|
+
), E = M("Cancel", "Cancel"), y = M("Submit", "Submit"), w = M("Password", "Password"), d = M("IsRequired", "Is Required"), v = M(
|
|
2433
2442
|
"PrepareTheFiles",
|
|
2434
2443
|
"Prepare the files"
|
|
2435
2444
|
), u = M(
|
|
@@ -2445,33 +2454,33 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2445
2454
|
"SessionExpired",
|
|
2446
2455
|
"Session expired. Please log in again to continue"
|
|
2447
2456
|
), [R] = Ce.useForm(), U = () => {
|
|
2448
|
-
var G, P,
|
|
2449
|
-
s(!0),
|
|
2457
|
+
var G, P, F;
|
|
2458
|
+
s(!0), x(!0), (F = (P = (G = S()) == null ? void 0 : G.then((Z) => {
|
|
2450
2459
|
var _, O;
|
|
2451
2460
|
const K = (O = (_ = Z == null ? void 0 : Z.data) == null ? void 0 : _.DATA) == null ? void 0 : O.RESULT;
|
|
2452
|
-
K &&
|
|
2461
|
+
K && m({ msg: "Valid" }), n(K), p("");
|
|
2453
2462
|
})) == null ? void 0 : P.catch((Z) => {
|
|
2454
2463
|
p(Z == null ? void 0 : Z.toString());
|
|
2455
|
-
})) == null ||
|
|
2456
|
-
r(!1),
|
|
2464
|
+
})) == null || F.finally(() => {
|
|
2465
|
+
r(!1), x(!1);
|
|
2457
2466
|
});
|
|
2458
2467
|
}, $ = () => {
|
|
2459
|
-
|
|
2460
|
-
},
|
|
2468
|
+
m({ msg: "cancel" }), s(!1);
|
|
2469
|
+
}, V = () => {
|
|
2461
2470
|
var P;
|
|
2462
2471
|
const G = R == null ? void 0 : R.getFieldValue("pwd");
|
|
2463
2472
|
(P = R == null ? void 0 : R.validateFields()) == null || P.then(() => {
|
|
2464
|
-
var
|
|
2465
|
-
r(!0), (Z = (
|
|
2473
|
+
var F, Z;
|
|
2474
|
+
r(!0), (Z = (F = T(G)) == null ? void 0 : F.then(({ data: K }) => {
|
|
2466
2475
|
var _;
|
|
2467
2476
|
(_ = K == null ? void 0 : K.DATA) != null && _.ISVALID ? U() : (p(k), c(i - 1), r(!1));
|
|
2468
2477
|
})) == null || Z.catch((K) => {
|
|
2469
|
-
var O, W,
|
|
2478
|
+
var O, W, I, B, Q;
|
|
2470
2479
|
const _ = K == null ? void 0 : K.response;
|
|
2471
2480
|
if ((_ == null ? void 0 : _.status) === 401) {
|
|
2472
2481
|
const X = (W = (O = _ == null ? void 0 : _.data) == null ? void 0 : O.ERRORS) == null ? void 0 : W.includes(
|
|
2473
2482
|
"ACCESS_TOKEN_EXPIRED"
|
|
2474
|
-
), J = (Q = (
|
|
2483
|
+
), J = (Q = (B = (I = _ == null ? void 0 : _.data) == null ? void 0 : I.MESSAGE) == null ? void 0 : B.toLowerCase()) == null ? void 0 : Q.includes(
|
|
2475
2484
|
"invalid password"
|
|
2476
2485
|
);
|
|
2477
2486
|
X && p(D), J && (p(k), c(i - 1), r(!1));
|
|
@@ -2499,7 +2508,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2499
2508
|
text: u,
|
|
2500
2509
|
showResponseInfo: !1
|
|
2501
2510
|
}
|
|
2502
|
-
) :
|
|
2511
|
+
) : h ? /* @__PURE__ */ t.jsx(rt, { sender: "response", text: h, showResponseInfo: !1 }) : /* @__PURE__ */ t.jsx(
|
|
2503
2512
|
"div",
|
|
2504
2513
|
{
|
|
2505
2514
|
style: { display: "flex", flexDirection: "column" },
|
|
@@ -2511,7 +2520,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2511
2520
|
layout: "vertical",
|
|
2512
2521
|
style: { display: "flex", flexDirection: "column", gap: 8 },
|
|
2513
2522
|
children: [
|
|
2514
|
-
/* @__PURE__ */ t.jsx(ce.Text, { children: e ? `${
|
|
2523
|
+
/* @__PURE__ */ t.jsx(ce.Text, { children: e ? `${v}...` : C }),
|
|
2515
2524
|
!e && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2516
2525
|
/* @__PURE__ */ t.jsx(
|
|
2517
2526
|
Ce.Item,
|
|
@@ -2520,7 +2529,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2520
2529
|
rules: [
|
|
2521
2530
|
{
|
|
2522
2531
|
required: !0,
|
|
2523
|
-
message: `${
|
|
2532
|
+
message: `${w} ${d}`
|
|
2524
2533
|
}
|
|
2525
2534
|
],
|
|
2526
2535
|
children: /* @__PURE__ */ t.jsx(st.Password, {})
|
|
@@ -2532,10 +2541,10 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2532
2541
|
le,
|
|
2533
2542
|
{
|
|
2534
2543
|
type: "primary",
|
|
2535
|
-
onClick:
|
|
2544
|
+
onClick: V,
|
|
2536
2545
|
loading: o,
|
|
2537
2546
|
htmlType: "submit",
|
|
2538
|
-
children:
|
|
2547
|
+
children: y
|
|
2539
2548
|
}
|
|
2540
2549
|
)
|
|
2541
2550
|
] })
|
|
@@ -2545,13 +2554,13 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2545
2554
|
)
|
|
2546
2555
|
}
|
|
2547
2556
|
) : null;
|
|
2548
|
-
}, ms =
|
|
2557
|
+
}, ms = Y(hs), ys = ({ ...e }) => {
|
|
2549
2558
|
var c;
|
|
2550
2559
|
const { objInitPayload: n } = ue(), [o, r] = H(!1), a = M("Error", "Error"), s = z(() => Gn(n == null ? void 0 : n.access_token), [n]), i = () => {
|
|
2551
|
-
var
|
|
2560
|
+
var x, h, p, f;
|
|
2552
2561
|
r(!0);
|
|
2553
2562
|
const l = e == null ? void 0 : e.attachment;
|
|
2554
|
-
(
|
|
2563
|
+
(f = (p = (h = Je({
|
|
2555
2564
|
method: "POST",
|
|
2556
2565
|
url: l == null ? void 0 : l.endpoint,
|
|
2557
2566
|
data: l == null ? void 0 : l.body,
|
|
@@ -2560,17 +2569,17 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2560
2569
|
"Content-Type": l == null ? void 0 : l.headers["Content-Type"],
|
|
2561
2570
|
coid: n == null ? void 0 : n.companyid,
|
|
2562
2571
|
"Company-Id": n == null ? void 0 : n.companyid,
|
|
2563
|
-
"Acc-Name": (
|
|
2572
|
+
"Acc-Name": (x = s == null ? void 0 : s.INSTANCE) == null ? void 0 : x.toLowerCase()
|
|
2564
2573
|
},
|
|
2565
2574
|
responseType: "blob"
|
|
2566
|
-
})) == null ? void 0 :
|
|
2575
|
+
})) == null ? void 0 : h.then((m) => {
|
|
2567
2576
|
var E;
|
|
2568
|
-
const j = (E = l == null ? void 0 : l.body) == null ? void 0 : E.media, T = `${l == null ? void 0 : l.filename}.${j}`,
|
|
2577
|
+
const j = (E = l == null ? void 0 : l.body) == null ? void 0 : E.media, T = `${l == null ? void 0 : l.filename}.${j}`, S = new Blob([m == null ? void 0 : m.data]), C = URL == null ? void 0 : URL.createObjectURL(S);
|
|
2569
2578
|
Yt({ downloadURL: C, fileName: T }), URL.revokeObjectURL(C);
|
|
2570
|
-
})) == null ? void 0 : p.catch((
|
|
2571
|
-
var T,
|
|
2572
|
-
const j =
|
|
2573
|
-
(T = Te) == null || T.destroy(), (
|
|
2579
|
+
})) == null ? void 0 : p.catch((m) => {
|
|
2580
|
+
var T, S, C;
|
|
2581
|
+
const j = m == null ? void 0 : m.message;
|
|
2582
|
+
(T = Te) == null || T.destroy(), (S = Te) == null || S.config({
|
|
2574
2583
|
getContainer: () => document.querySelector(".w-widget-content-container"),
|
|
2575
2584
|
top: 28,
|
|
2576
2585
|
placement: "top"
|
|
@@ -2580,7 +2589,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2580
2589
|
className: "w-notification-content",
|
|
2581
2590
|
duration: 3
|
|
2582
2591
|
});
|
|
2583
|
-
})) == null ||
|
|
2592
|
+
})) == null || f.finally(() => {
|
|
2584
2593
|
r(!1);
|
|
2585
2594
|
});
|
|
2586
2595
|
};
|
|
@@ -2608,15 +2617,15 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2608
2617
|
] })
|
|
2609
2618
|
}
|
|
2610
2619
|
);
|
|
2611
|
-
}, vs =
|
|
2620
|
+
}, vs = Y(ys), bs = ({ ...e }) => {
|
|
2612
2621
|
const n = se(), o = M("DownloadChart", "Download Chart"), r = z(() => e == null ? void 0 : e.attachment, [e == null ? void 0 : e.attachment]), a = z(() => {
|
|
2613
2622
|
var i;
|
|
2614
2623
|
return (i = r == null ? void 0 : r.data) == null ? void 0 : i.map((c, l) => {
|
|
2615
|
-
var
|
|
2624
|
+
var x, h;
|
|
2616
2625
|
return {
|
|
2617
|
-
label: (
|
|
2626
|
+
label: (x = r == null ? void 0 : r.labels) == null ? void 0 : x[l],
|
|
2618
2627
|
value: c,
|
|
2619
|
-
color: (
|
|
2628
|
+
color: (h = r == null ? void 0 : r.colors) == null ? void 0 : h[l]
|
|
2620
2629
|
};
|
|
2621
2630
|
});
|
|
2622
2631
|
}, [r]), s = () => {
|
|
@@ -2658,13 +2667,13 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2658
2667
|
}
|
|
2659
2668
|
) })
|
|
2660
2669
|
] });
|
|
2661
|
-
}, Cs =
|
|
2670
|
+
}, Cs = Y(bs), Ts = ({ ...e }) => {
|
|
2662
2671
|
var n, o, r, a, s;
|
|
2663
2672
|
switch (!0) {
|
|
2664
2673
|
case ((n = qe(e)) == null ? void 0 : n.text):
|
|
2665
2674
|
return /* @__PURE__ */ t.jsx(rt, { ...e });
|
|
2666
2675
|
case ((o = qe(e)) == null ? void 0 : o.upload):
|
|
2667
|
-
return /* @__PURE__ */ t.jsx(
|
|
2676
|
+
return /* @__PURE__ */ t.jsx(xs, { ...e });
|
|
2668
2677
|
case ((r = qe(e)) == null ? void 0 : r.password):
|
|
2669
2678
|
return /* @__PURE__ */ t.jsx(ms, { ...e });
|
|
2670
2679
|
case ((a = qe(e)) == null ? void 0 : a.filedownload):
|
|
@@ -2674,7 +2683,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2674
2683
|
default:
|
|
2675
2684
|
return null;
|
|
2676
2685
|
}
|
|
2677
|
-
}, Es =
|
|
2686
|
+
}, Es = Y(Ts), Ss = () => {
|
|
2678
2687
|
const { isOpenWidget: e, widgetProps: n } = ue(), { chats: o, isWaitResponse: r } = je(), { activeTab: a } = Me();
|
|
2679
2688
|
return ge(() => {
|
|
2680
2689
|
Le();
|
|
@@ -2687,7 +2696,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2687
2696
|
it,
|
|
2688
2697
|
{
|
|
2689
2698
|
name: n == null ? void 0 : n.title,
|
|
2690
|
-
src:
|
|
2699
|
+
src: ht
|
|
2691
2700
|
}
|
|
2692
2701
|
),
|
|
2693
2702
|
/* @__PURE__ */ t.jsx(Es, { indexChat: i, ...s })
|
|
@@ -2695,8 +2704,8 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2695
2704
|
}) }),
|
|
2696
2705
|
r && /* @__PURE__ */ t.jsx(Kt, {})
|
|
2697
2706
|
] }) : null;
|
|
2698
|
-
}, ws =
|
|
2699
|
-
var
|
|
2707
|
+
}, ws = Y(Ss), _s = () => {
|
|
2708
|
+
var w;
|
|
2700
2709
|
const e = M(
|
|
2701
2710
|
"ContinueWithoutUpload",
|
|
2702
2711
|
"Continue without Upload"
|
|
@@ -2709,31 +2718,31 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2709
2718
|
setFile: i,
|
|
2710
2719
|
chats: c,
|
|
2711
2720
|
connected: l
|
|
2712
|
-
} = je(), { isUserInputHide:
|
|
2713
|
-
var
|
|
2721
|
+
} = je(), { isUserInputHide: x } = ue(), { isActiveTabVA: h } = Me(), p = z(() => {
|
|
2722
|
+
var v;
|
|
2714
2723
|
const d = c == null ? void 0 : c[(c == null ? void 0 : c.length) - 1];
|
|
2715
|
-
return (d == null ? void 0 : d.sender) === "response" && ((
|
|
2716
|
-
}, [c]),
|
|
2724
|
+
return (d == null ? void 0 : d.sender) === "response" && ((v = d == null ? void 0 : d.attachment) == null ? void 0 : v.type) === "fileuploader";
|
|
2725
|
+
}, [c]), f = se(), [m, j] = H(!1), [T, S] = H(!1), C = z(() => r || !T, [T, r]), E = () => {
|
|
2717
2726
|
var u, b, k, D;
|
|
2718
|
-
const d = (k = (b = (u =
|
|
2727
|
+
const d = (k = (b = (u = f == null ? void 0 : f.current) == null ? void 0 : u.resizableTextArea) == null ? void 0 : b.textArea) == null ? void 0 : k.value;
|
|
2719
2728
|
if (!(d != null && d.trim()) || r) return;
|
|
2720
|
-
|
|
2721
|
-
const
|
|
2729
|
+
S(!1), n({ msg: d }), j(!m);
|
|
2730
|
+
const v = {
|
|
2722
2731
|
text: d,
|
|
2723
2732
|
sender: "client",
|
|
2724
2733
|
type: "text",
|
|
2725
2734
|
timestamp: (D = Se()) == null ? void 0 : D.format("hh:mm A")
|
|
2726
2735
|
};
|
|
2727
|
-
o((R) => [...R,
|
|
2728
|
-
},
|
|
2736
|
+
o((R) => [...R, v]), Le();
|
|
2737
|
+
}, y = () => {
|
|
2729
2738
|
n({ msg: "SKIP_WAITING_RESPONSE" });
|
|
2730
2739
|
};
|
|
2731
2740
|
return ge(() => {
|
|
2732
2741
|
var d;
|
|
2733
|
-
|
|
2734
|
-
}, [
|
|
2742
|
+
f != null && f.current && h && ((d = f == null ? void 0 : f.current) == null || d.focus());
|
|
2743
|
+
}, [h]), x ? null : p ? /* @__PURE__ */ t.jsxs("div", { className: "w-input-container", style: { alignItems: "center" }, children: [
|
|
2735
2744
|
/* @__PURE__ */ t.jsx(ce.Text, { children: s == null ? void 0 : s.name }),
|
|
2736
|
-
((
|
|
2745
|
+
((w = Object == null ? void 0 : Object.keys(s || {})) == null ? void 0 : w.length) > 0 ? /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
|
|
2737
2746
|
/* @__PURE__ */ t.jsx(
|
|
2738
2747
|
le,
|
|
2739
2748
|
{
|
|
@@ -2771,19 +2780,19 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2771
2780
|
{
|
|
2772
2781
|
className: "w-input-widget",
|
|
2773
2782
|
disabled: !l,
|
|
2774
|
-
ref:
|
|
2783
|
+
ref: f,
|
|
2775
2784
|
placeholder: "Type a message...",
|
|
2776
2785
|
onKeyDown: (d) => {
|
|
2777
2786
|
((d == null ? void 0 : d.code) === "Enter" || (d == null ? void 0 : d.key) === "Enter") && !(d != null && d.shiftKey) && E();
|
|
2778
2787
|
},
|
|
2779
2788
|
onChange: ({ target: { value: d } }) => {
|
|
2780
|
-
const
|
|
2789
|
+
const v = /\S/;
|
|
2781
2790
|
yt({
|
|
2782
2791
|
input_va_value: d
|
|
2783
|
-
}), d && (
|
|
2792
|
+
}), d && (v != null && v.test(d)) ? S(!0) : d != null && d.trim() || S(!1);
|
|
2784
2793
|
}
|
|
2785
2794
|
},
|
|
2786
|
-
|
|
2795
|
+
m
|
|
2787
2796
|
),
|
|
2788
2797
|
r || a ? /* @__PURE__ */ t.jsx(
|
|
2789
2798
|
le,
|
|
@@ -2791,7 +2800,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2791
2800
|
style: { border: "none" },
|
|
2792
2801
|
icon: /* @__PURE__ */ t.jsx(pe, { type: "stop" }),
|
|
2793
2802
|
shape: "circle",
|
|
2794
|
-
onClick:
|
|
2803
|
+
onClick: y,
|
|
2795
2804
|
size: "large"
|
|
2796
2805
|
}
|
|
2797
2806
|
) : /* @__PURE__ */ t.jsx(
|
|
@@ -2806,7 +2815,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2806
2815
|
}
|
|
2807
2816
|
)
|
|
2808
2817
|
] });
|
|
2809
|
-
}, js =
|
|
2818
|
+
}, js = Y(_s), ks = ({ taskStatus: e }) => {
|
|
2810
2819
|
const n = M("InProgress", "In Progress"), o = M("New", "New"), r = M("Closed", "Closed"), a = M("Done", "Done"), s = M("HDCancelled", "Cancelled"), i = {
|
|
2811
2820
|
"In Progress": n,
|
|
2812
2821
|
Open: o,
|
|
@@ -2823,17 +2832,17 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2823
2832
|
Fixed: "#bbfab7",
|
|
2824
2833
|
Done: "#bbfab7",
|
|
2825
2834
|
Cancelled: "#FFF2D6"
|
|
2826
|
-
}, l = z(() => c[e] || c.Closed, [e]),
|
|
2835
|
+
}, l = z(() => c[e] || c.Closed, [e]), x = z(() => i[e] || e, [e]);
|
|
2827
2836
|
return /* @__PURE__ */ t.jsx(Yr, { color: l, children: /* @__PURE__ */ t.jsx(
|
|
2828
2837
|
ce.Text,
|
|
2829
2838
|
{
|
|
2830
2839
|
className: "primary-color-active",
|
|
2831
2840
|
style: { width: "100%", textAlign: "center" },
|
|
2832
|
-
ellipsis: { tooltip:
|
|
2833
|
-
children:
|
|
2841
|
+
ellipsis: { tooltip: x },
|
|
2842
|
+
children: x
|
|
2834
2843
|
}
|
|
2835
2844
|
) }, e);
|
|
2836
|
-
}, rr =
|
|
2845
|
+
}, rr = Y(ks), As = ({ onClick: e, ...n }) => /* @__PURE__ */ t.jsxs(
|
|
2837
2846
|
"div",
|
|
2838
2847
|
{
|
|
2839
2848
|
className: "w-ticket-card-container",
|
|
@@ -2875,7 +2884,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2875
2884
|
] })
|
|
2876
2885
|
]
|
|
2877
2886
|
}
|
|
2878
|
-
), Rs =
|
|
2887
|
+
), Rs = Y(As), or = () => {
|
|
2879
2888
|
const { objInitPayload: e, setObjInitPayload: n, parsedJWT: o } = ue(), r = z(() => {
|
|
2880
2889
|
var s;
|
|
2881
2890
|
return {
|
|
@@ -2887,9 +2896,9 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2887
2896
|
};
|
|
2888
2897
|
}, [e]);
|
|
2889
2898
|
return async (s) => {
|
|
2890
|
-
var
|
|
2899
|
+
var x, h, p;
|
|
2891
2900
|
const { onSuccess: i, onError: c, onFinally: l } = s ?? {};
|
|
2892
|
-
(p = (
|
|
2901
|
+
(p = (h = (x = Je({
|
|
2893
2902
|
url: e == null ? void 0 : e.uriBackend,
|
|
2894
2903
|
params: {
|
|
2895
2904
|
ofid: "sfsystem.RefreshToken",
|
|
@@ -2900,10 +2909,10 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2900
2909
|
},
|
|
2901
2910
|
headers: r,
|
|
2902
2911
|
method: "POST"
|
|
2903
|
-
})) == null ? void 0 :
|
|
2912
|
+
})) == null ? void 0 : x.then((f) => {
|
|
2904
2913
|
var T;
|
|
2905
|
-
const
|
|
2906
|
-
access_token:
|
|
2914
|
+
const m = (T = f == null ? void 0 : f.data) == null ? void 0 : T.DATA, j = {
|
|
2915
|
+
access_token: m == null ? void 0 : m.JWT_TOKEN,
|
|
2907
2916
|
refresh_token: e == null ? void 0 : e.refresh_token,
|
|
2908
2917
|
uagent: e == null ? void 0 : e.uagent,
|
|
2909
2918
|
uriBackend: e == null ? void 0 : e.uriBackend,
|
|
@@ -2915,9 +2924,9 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2915
2924
|
uriBackendHRMGO: e == null ? void 0 : e.uriBackendHRMGO,
|
|
2916
2925
|
config: e == null ? void 0 : e.config
|
|
2917
2926
|
};
|
|
2918
|
-
n(j), typeof i == "function" && i(
|
|
2919
|
-
})) == null ? void 0 :
|
|
2920
|
-
typeof c == "function" && c(
|
|
2927
|
+
n(j), typeof i == "function" && i(f);
|
|
2928
|
+
})) == null ? void 0 : h.catch((f) => {
|
|
2929
|
+
typeof c == "function" && c(f);
|
|
2921
2930
|
})) == null || p.finally(() => {
|
|
2922
2931
|
typeof l == "function" && l();
|
|
2923
2932
|
});
|
|
@@ -2933,50 +2942,50 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2933
2942
|
}, s = async ({
|
|
2934
2943
|
url: c,
|
|
2935
2944
|
endpoint: l,
|
|
2936
|
-
method:
|
|
2937
|
-
headers:
|
|
2945
|
+
method: x = "POST",
|
|
2946
|
+
headers: h,
|
|
2938
2947
|
...p
|
|
2939
2948
|
}) => {
|
|
2940
|
-
var T,
|
|
2941
|
-
const
|
|
2949
|
+
var T, S, C, E, y, w;
|
|
2950
|
+
const f = {
|
|
2942
2951
|
url: c || `${n == null ? void 0 : n.uriBackendHRMGO}${l}`,
|
|
2943
2952
|
...e.current && {
|
|
2944
2953
|
signal: (T = e == null ? void 0 : e.current) == null ? void 0 : T.signal
|
|
2945
2954
|
},
|
|
2946
2955
|
headers: {
|
|
2947
2956
|
...a,
|
|
2948
|
-
...
|
|
2957
|
+
...h,
|
|
2949
2958
|
"Company-Code": n == null ? void 0 : n.companycode
|
|
2950
2959
|
},
|
|
2951
|
-
method:
|
|
2960
|
+
method: x,
|
|
2952
2961
|
...p
|
|
2953
|
-
},
|
|
2954
|
-
return (E = (C =
|
|
2962
|
+
}, m = (S = Je) == null ? void 0 : S.create(f);
|
|
2963
|
+
return (E = (C = m == null ? void 0 : m.interceptors) == null ? void 0 : C.request) == null || E.use(
|
|
2955
2964
|
(d) => (n != null && n.access_token && (d.headers.Authorization = `Bearer ${n == null ? void 0 : n.access_token}`), d),
|
|
2956
2965
|
(d) => {
|
|
2957
2966
|
Promise.reject(d);
|
|
2958
2967
|
}
|
|
2959
|
-
), (
|
|
2968
|
+
), (w = (y = m == null ? void 0 : m.interceptors) == null ? void 0 : y.response) == null || w.use(
|
|
2960
2969
|
(d) => d,
|
|
2961
2970
|
async (d) => {
|
|
2962
2971
|
var u;
|
|
2963
|
-
const
|
|
2972
|
+
const v = d == null ? void 0 : d.config;
|
|
2964
2973
|
if (((u = d == null ? void 0 : d.response) == null ? void 0 : u.status) === 401) {
|
|
2965
2974
|
const b = await r();
|
|
2966
|
-
return
|
|
2975
|
+
return v.headers.Authorization = `Bearer ${b}`, Je(v);
|
|
2967
2976
|
}
|
|
2968
2977
|
return Promise == null ? void 0 : Promise.reject(d);
|
|
2969
2978
|
}
|
|
2970
|
-
), await (
|
|
2979
|
+
), await (m == null ? void 0 : m.request(f));
|
|
2971
2980
|
};
|
|
2972
2981
|
return s.abort = () => {
|
|
2973
2982
|
var c;
|
|
2974
2983
|
e != null && e.current && ((c = e == null ? void 0 : e.current) == null || c.abort(), e.current = new AbortController());
|
|
2975
2984
|
}, ge(() => () => s.abort(), []), s;
|
|
2976
2985
|
}, sr = He({}), Ne = () => Ue(sr), Os = ({ children: e }) => {
|
|
2977
|
-
const n = vt(), [o, r] = H([]), [a, s] = H(""), [i, c] = H(!1), [l,
|
|
2978
|
-
var j, T,
|
|
2979
|
-
|
|
2986
|
+
const n = vt(), [o, r] = H([]), [a, s] = H(""), [i, c] = H(!1), [l, x] = H(!0), [h, p] = H(0), f = (m) => {
|
|
2987
|
+
var j, T, S, C;
|
|
2988
|
+
x(!0), (C = (S = n({
|
|
2980
2989
|
endpoint: "/helpdesk/myticket/ticket-list",
|
|
2981
2990
|
method: "POST",
|
|
2982
2991
|
data: {
|
|
@@ -2985,10 +2994,10 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2985
2994
|
SEARCH: {
|
|
2986
2995
|
MY_TICKET: !0,
|
|
2987
2996
|
TASK_MODULE: "HD",
|
|
2988
|
-
...((j = Object.keys(
|
|
2989
|
-
...
|
|
2990
|
-
...(
|
|
2991
|
-
CREATED_DATE: (T = Se(
|
|
2997
|
+
...((j = Object.keys(m || {})) == null ? void 0 : j.length) > 0 && {
|
|
2998
|
+
...m,
|
|
2999
|
+
...(m == null ? void 0 : m.CREATED_DATE) && {
|
|
3000
|
+
CREATED_DATE: (T = Se(m == null ? void 0 : m.CREATED_DATE)) == null ? void 0 : T.format(Bt)
|
|
2992
3001
|
}
|
|
2993
3002
|
}
|
|
2994
3003
|
},
|
|
@@ -2997,15 +3006,15 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2997
3006
|
ORDER: "DESC"
|
|
2998
3007
|
}
|
|
2999
3008
|
}
|
|
3000
|
-
})) == null ? void 0 :
|
|
3001
|
-
var
|
|
3002
|
-
(
|
|
3009
|
+
})) == null ? void 0 : S.then((E) => {
|
|
3010
|
+
var y, w, d;
|
|
3011
|
+
(y = E == null ? void 0 : E.data) != null && y.DATA && r((d = (w = E == null ? void 0 : E.data) == null ? void 0 : w.DATA) == null ? void 0 : d.LIST);
|
|
3003
3012
|
})) == null || C.finally(() => {
|
|
3004
|
-
|
|
3013
|
+
x(!1);
|
|
3005
3014
|
});
|
|
3006
3015
|
};
|
|
3007
3016
|
return ge(() => {
|
|
3008
|
-
|
|
3017
|
+
f();
|
|
3009
3018
|
}, []), /* @__PURE__ */ t.jsx(
|
|
3010
3019
|
sr.Provider,
|
|
3011
3020
|
{
|
|
@@ -3013,11 +3022,11 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3013
3022
|
listTicket: o,
|
|
3014
3023
|
ticketId: a,
|
|
3015
3024
|
setTicketId: s,
|
|
3016
|
-
getListTicket:
|
|
3025
|
+
getListTicket: f,
|
|
3017
3026
|
openFilter: i,
|
|
3018
3027
|
setOpenFilter: c,
|
|
3019
3028
|
loadingListTicket: l,
|
|
3020
|
-
countFilters:
|
|
3029
|
+
countFilters: h,
|
|
3021
3030
|
setCountFilters: p
|
|
3022
3031
|
},
|
|
3023
3032
|
children: e
|
|
@@ -3051,46 +3060,46 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3051
3060
|
}
|
|
3052
3061
|
) }) })
|
|
3053
3062
|
] }) });
|
|
3054
|
-
}, Ls =
|
|
3055
|
-
const n = se(null), o = se(0), r = se(!1), a = se(null), [s, i] = H([]), [c, l] = H(0), [
|
|
3056
|
-
const d = new WebSocket(
|
|
3063
|
+
}, Ls = Y(Ds), ir = He({}), Fe = () => Ue(ir), Ms = ({ children: e }) => {
|
|
3064
|
+
const n = se(null), o = se(0), r = se(!1), a = se(null), [s, i] = H([]), [c, l] = H(0), [x, h] = H(!1), { objInitPayload: p, parsedJWT: f, isFirstRenderHelpdesk: m, setShowReadyWSHD: j } = ue(), T = or(), S = (w) => {
|
|
3065
|
+
const d = new WebSocket(w);
|
|
3057
3066
|
d.onopen = () => {
|
|
3058
3067
|
r.current = !0, o.current = 0, l(0), j(!0);
|
|
3059
|
-
}, d.onerror = (
|
|
3060
|
-
j(!1), console.error(`${Ge} - WebSocket error:`,
|
|
3061
|
-
}, d.onclose = (
|
|
3068
|
+
}, d.onerror = (v) => {
|
|
3069
|
+
j(!1), console.error(`${Ge} - WebSocket error:`, v);
|
|
3070
|
+
}, d.onclose = (v) => {
|
|
3062
3071
|
console.warn(
|
|
3063
3072
|
`${Ge} - WebSocket disconnected:`,
|
|
3064
|
-
|
|
3065
|
-
), r.current = !1, j(!1), !(
|
|
3073
|
+
v
|
|
3074
|
+
), r.current = !1, j(!1), !(v != null && v.wasClean) && (o == null ? void 0 : o.current) < nt && (o.current += 1, l((u) => u + 1), clearTimeout(a.current), a.current = setTimeout(C, 2e3));
|
|
3066
3075
|
}, d.onmessage = E(d), n.current = d;
|
|
3067
3076
|
}, C = async () => {
|
|
3068
|
-
var U, $,
|
|
3077
|
+
var U, $, V;
|
|
3069
3078
|
if (((U = n.current) == null ? void 0 : U.readyState) === (WebSocket == null ? void 0 : WebSocket.CONNECTING)) return;
|
|
3070
3079
|
const {
|
|
3071
|
-
access_token:
|
|
3080
|
+
access_token: w,
|
|
3072
3081
|
companyid: d = "",
|
|
3073
|
-
companycode:
|
|
3082
|
+
companycode: v = "",
|
|
3074
3083
|
lang: u = "",
|
|
3075
3084
|
uriBackendHRMGO: b = ""
|
|
3076
3085
|
} = p ?? {};
|
|
3077
|
-
if (!
|
|
3086
|
+
if (!w || !d || !v) {
|
|
3078
3087
|
console.warn(
|
|
3079
3088
|
`${Ge} - Missing required WebSocket credentials.`
|
|
3080
3089
|
);
|
|
3081
3090
|
return;
|
|
3082
3091
|
}
|
|
3083
|
-
const k = `Bearer ${
|
|
3092
|
+
const k = `Bearer ${w}`, D = ($ = `${b}/ws`) == null ? void 0 : $.replace("https://", "wss://"), R = {
|
|
3084
3093
|
COMPANY_ID: d.toString(),
|
|
3085
|
-
COMPANY_CODE:
|
|
3094
|
+
COMPANY_CODE: v.toLowerCase(),
|
|
3086
3095
|
LANGUAGE: u,
|
|
3087
|
-
ACC_NAME: (
|
|
3096
|
+
ACC_NAME: (V = f == null ? void 0 : f.INSTANCE) == null ? void 0 : V.toLowerCase(),
|
|
3088
3097
|
TOKEN: k
|
|
3089
3098
|
};
|
|
3090
3099
|
try {
|
|
3091
3100
|
const G = await To(
|
|
3092
3101
|
R,
|
|
3093
|
-
|
|
3102
|
+
ho
|
|
3094
3103
|
);
|
|
3095
3104
|
if (!G || r.current || (o == null ? void 0 : o.current) >= nt) {
|
|
3096
3105
|
console.warn(
|
|
@@ -3098,21 +3107,21 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3098
3107
|
);
|
|
3099
3108
|
return;
|
|
3100
3109
|
}
|
|
3101
|
-
n.current && n.current.close(),
|
|
3110
|
+
n.current && n.current.close(), S(`${D}?t=${G}`);
|
|
3102
3111
|
} catch (G) {
|
|
3103
3112
|
console.error(
|
|
3104
3113
|
`${Ge} - Failed to encrypt token:`,
|
|
3105
3114
|
G
|
|
3106
3115
|
);
|
|
3107
3116
|
}
|
|
3108
|
-
}, E = (
|
|
3109
|
-
var
|
|
3117
|
+
}, E = (w) => (d) => {
|
|
3118
|
+
var v;
|
|
3110
3119
|
try {
|
|
3111
3120
|
if ((d == null ? void 0 : d.data) === "PING")
|
|
3112
|
-
|
|
3121
|
+
w.send("PONG");
|
|
3113
3122
|
else {
|
|
3114
3123
|
const { DATA: u, EVENT: b } = JSON.parse(d.data || "{}");
|
|
3115
|
-
!
|
|
3124
|
+
!m.current && b === "USER_ONLINE_NOTIF" && Array.isArray(u == null ? void 0 : u.EMPLOYEES) && (i((v = u == null ? void 0 : u.EMPLOYEES) == null ? void 0 : v.filter(Boolean)), m.current = !0), b === "TOKEN_EXPIRED" && T({
|
|
3116
3125
|
onSuccess: () => {
|
|
3117
3126
|
C();
|
|
3118
3127
|
}
|
|
@@ -3124,31 +3133,31 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3124
3133
|
d.data
|
|
3125
3134
|
);
|
|
3126
3135
|
}
|
|
3127
|
-
},
|
|
3136
|
+
}, y = ({ event: w, data: d, module: v = "HELPDESK_CHAT" }) => {
|
|
3128
3137
|
var u;
|
|
3129
3138
|
(u = n == null ? void 0 : n.current) == null || u.send(
|
|
3130
3139
|
JSON.stringify({
|
|
3131
|
-
EVENT:
|
|
3140
|
+
EVENT: w,
|
|
3132
3141
|
DATA: d,
|
|
3133
|
-
MODULE:
|
|
3142
|
+
MODULE: v
|
|
3134
3143
|
})
|
|
3135
3144
|
);
|
|
3136
3145
|
};
|
|
3137
3146
|
return ge(() => {
|
|
3138
|
-
|
|
3147
|
+
m.current || C();
|
|
3139
3148
|
}, []), /* @__PURE__ */ t.jsx(
|
|
3140
3149
|
ir.Provider,
|
|
3141
3150
|
{
|
|
3142
3151
|
value: {
|
|
3143
3152
|
ws: n == null ? void 0 : n.current,
|
|
3144
|
-
onSendMsg:
|
|
3153
|
+
onSendMsg: y,
|
|
3145
3154
|
userOnline: s,
|
|
3146
3155
|
connectWebSocket: C,
|
|
3147
3156
|
retryCountState: c,
|
|
3148
3157
|
setRetryCountState: l,
|
|
3149
3158
|
retryCountRef: o,
|
|
3150
|
-
isGetResponse:
|
|
3151
|
-
setGetResponse:
|
|
3159
|
+
isGetResponse: x,
|
|
3160
|
+
setGetResponse: h
|
|
3152
3161
|
},
|
|
3153
3162
|
children: e
|
|
3154
3163
|
}
|
|
@@ -3158,12 +3167,12 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3158
3167
|
const { widgetProps: e } = ue(), { listTicket: n, setTicketId: o, loadingListTicket: r } = Ne(), { onSendMsg: a, setGetResponse: s } = Fe(), { xs: i } = Re.useBreakpoint();
|
|
3159
3168
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
3160
3169
|
/* @__PURE__ */ t.jsx(Ls, {}),
|
|
3161
|
-
r ? /* @__PURE__ */ t.jsx("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: (c = Array.from({ length: 5 })) == null ? void 0 : c.map((l,
|
|
3170
|
+
r ? /* @__PURE__ */ t.jsx("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: (c = Array.from({ length: 5 })) == null ? void 0 : c.map((l, x) => /* @__PURE__ */ t.jsx(
|
|
3162
3171
|
_e.Input,
|
|
3163
3172
|
{
|
|
3164
3173
|
style: { height: 80, width: "100%", borderRadius: 8 }
|
|
3165
3174
|
},
|
|
3166
|
-
|
|
3175
|
+
x
|
|
3167
3176
|
)) }) : /* @__PURE__ */ t.jsx(
|
|
3168
3177
|
"div",
|
|
3169
3178
|
{
|
|
@@ -3171,11 +3180,11 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3171
3180
|
...(n == null ? void 0 : n.length) === 0 && {
|
|
3172
3181
|
style: { justifyContent: "center" }
|
|
3173
3182
|
},
|
|
3174
|
-
children: (n == null ? void 0 : n.length) > 0 ? n == null ? void 0 : n.map((l,
|
|
3183
|
+
children: (n == null ? void 0 : n.length) > 0 ? n == null ? void 0 : n.map((l, x) => /* @__PURE__ */ Ht(
|
|
3175
3184
|
Rs,
|
|
3176
3185
|
{
|
|
3177
3186
|
...l,
|
|
3178
|
-
key:
|
|
3187
|
+
key: x,
|
|
3179
3188
|
onClick: () => {
|
|
3180
3189
|
s(!0), a({
|
|
3181
3190
|
event: "JOIN_ROOM",
|
|
@@ -3200,30 +3209,30 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3200
3209
|
}
|
|
3201
3210
|
)
|
|
3202
3211
|
] });
|
|
3203
|
-
}, Fs =
|
|
3204
|
-
var
|
|
3205
|
-
const [s, i] = H(!1), c = se(), l = se(null),
|
|
3206
|
-
|
|
3212
|
+
}, Fs = Y(Ns), Is = ({ children: e, open: n, onClose: o, footer: r, styleContainer: a }) => {
|
|
3213
|
+
var f;
|
|
3214
|
+
const [s, i] = H(!1), c = se(), l = se(null), x = se(), h = z(() => n ? "w-fade-in-animate" : "w-fade-out-animate", [n]), p = (m) => {
|
|
3215
|
+
m.code === "Escape" && !m.shiftKey && !m.altKey && !m.ctrlKey && m.key === "Escape" && (m.stopPropagation(), typeof o == "function" && o());
|
|
3207
3216
|
};
|
|
3208
3217
|
return ge(() => {
|
|
3209
|
-
const
|
|
3210
|
-
return
|
|
3211
|
-
|
|
3212
|
-
}, 250),
|
|
3218
|
+
const m = x.current;
|
|
3219
|
+
return m && (clearTimeout(l.current), l.current = setTimeout(() => {
|
|
3220
|
+
m == null || m.focus();
|
|
3221
|
+
}, 250), m == null || m.addEventListener("keydown", p)), n && i(!1), clearTimeout(c == null ? void 0 : c.current), c.current = setTimeout(() => {
|
|
3213
3222
|
n || i(!0);
|
|
3214
3223
|
}, 300), () => {
|
|
3215
|
-
|
|
3224
|
+
m && (m == null || m.removeEventListener("keydown", p));
|
|
3216
3225
|
};
|
|
3217
3226
|
}, [n]), /* @__PURE__ */ t.jsxs(
|
|
3218
3227
|
"div",
|
|
3219
3228
|
{
|
|
3220
|
-
className: `${
|
|
3229
|
+
className: `${h}`,
|
|
3221
3230
|
tabIndex: 1,
|
|
3222
|
-
ref:
|
|
3231
|
+
ref: x,
|
|
3223
3232
|
style: {
|
|
3224
3233
|
display: s ? "none" : "block",
|
|
3225
3234
|
height: "100%",
|
|
3226
|
-
...((
|
|
3235
|
+
...((f = Object == null ? void 0 : Object.keys(a || {})) == null ? void 0 : f.length) > 0 && {
|
|
3227
3236
|
...a
|
|
3228
3237
|
}
|
|
3229
3238
|
},
|
|
@@ -3233,19 +3242,19 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3233
3242
|
]
|
|
3234
3243
|
}
|
|
3235
3244
|
);
|
|
3236
|
-
}, ar =
|
|
3237
|
-
const [n, o] = H([]), [r, a] = H({}), [s, i] = H(!0), [c, l] = H({}),
|
|
3245
|
+
}, ar = Y(Is), cr = He({}), Ze = () => Ue(cr), $s = ({ children: e }) => {
|
|
3246
|
+
const [n, o] = H([]), [r, a] = H({}), [s, i] = H(!0), [c, l] = H({}), x = se(!1), h = vt(), { ticketId: p } = Ne(), { ws: f, setGetResponse: m } = Fe(), { parsedJWT: j } = ue(), T = z(() => {
|
|
3238
3247
|
var b;
|
|
3239
|
-
const
|
|
3248
|
+
const w = (r == null ? void 0 : r.CREATED_BY) ?? {}, d = (r == null ? void 0 : r.ASSIGNEE) ?? {}, v = (r == null ? void 0 : r.OTHER_ASSIGNEE) ?? [], u = (b = [w, d, ...v].map((k) => ({
|
|
3240
3249
|
...k
|
|
3241
3250
|
}))) == null ? void 0 : b.filter((k) => {
|
|
3242
3251
|
var D;
|
|
3243
3252
|
return ((D = Object.keys(k || {})) == null ? void 0 : D.length) > 0;
|
|
3244
3253
|
});
|
|
3245
3254
|
return Vt({ ArrObj: u, key: "EMP_ID" });
|
|
3246
|
-
}, [r]),
|
|
3247
|
-
var
|
|
3248
|
-
i(!0), (d = (
|
|
3255
|
+
}, [r]), S = () => {
|
|
3256
|
+
var w, d;
|
|
3257
|
+
i(!0), (d = (w = h({
|
|
3249
3258
|
endpoint: "/helpdesk/chat/list",
|
|
3250
3259
|
method: "POST",
|
|
3251
3260
|
data: {
|
|
@@ -3253,55 +3262,55 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3253
3262
|
PAGE: 1,
|
|
3254
3263
|
TASK_ID: p
|
|
3255
3264
|
}
|
|
3256
|
-
})) == null ? void 0 :
|
|
3265
|
+
})) == null ? void 0 : w.then((v) => {
|
|
3257
3266
|
var u, b, k, D, R, U;
|
|
3258
|
-
if (((k = (b = (u =
|
|
3259
|
-
const $ = (U = (R = (D =
|
|
3260
|
-
...
|
|
3267
|
+
if (((k = (b = (u = v == null ? void 0 : v.data) == null ? void 0 : u.DATA) == null ? void 0 : b.LIST) == null ? void 0 : k.length) > 0) {
|
|
3268
|
+
const $ = (U = (R = (D = v == null ? void 0 : v.data) == null ? void 0 : D.DATA) == null ? void 0 : R.LIST) == null ? void 0 : U.map((V) => ({
|
|
3269
|
+
...V,
|
|
3261
3270
|
ACTOR: {
|
|
3262
|
-
...
|
|
3271
|
+
...V == null ? void 0 : V.ACTOR
|
|
3263
3272
|
}
|
|
3264
3273
|
}));
|
|
3265
|
-
o(
|
|
3274
|
+
o(xt($));
|
|
3266
3275
|
} else
|
|
3267
3276
|
o({});
|
|
3268
3277
|
})) == null || d.finally(() => {
|
|
3269
3278
|
i(!1);
|
|
3270
3279
|
});
|
|
3271
3280
|
}, C = () => {
|
|
3272
|
-
var
|
|
3273
|
-
(
|
|
3281
|
+
var w;
|
|
3282
|
+
(w = h({
|
|
3274
3283
|
endpoint: "/helpdesk/myticket/get",
|
|
3275
3284
|
method: "POST",
|
|
3276
3285
|
data: {
|
|
3277
3286
|
TASK_ID: p
|
|
3278
3287
|
}
|
|
3279
|
-
})) == null ||
|
|
3280
|
-
var
|
|
3281
|
-
if ((
|
|
3288
|
+
})) == null || w.then((d) => {
|
|
3289
|
+
var v, u, b;
|
|
3290
|
+
if ((v = d == null ? void 0 : d.data) != null && v.DATA) {
|
|
3282
3291
|
const k = (b = (u = d == null ? void 0 : d.data) == null ? void 0 : u.DATA) == null ? void 0 : b.LIST;
|
|
3283
3292
|
a(k);
|
|
3284
3293
|
} else
|
|
3285
3294
|
a({});
|
|
3286
3295
|
});
|
|
3287
|
-
}, E = (
|
|
3296
|
+
}, E = (w) => {
|
|
3288
3297
|
var u;
|
|
3289
|
-
const d = (u =
|
|
3290
|
-
|
|
3298
|
+
const d = (u = w == null ? void 0 : w.ACTOR) == null ? void 0 : u.EMP_ID, v = j == null ? void 0 : j.EMP_ID;
|
|
3299
|
+
m(!0), l((b) => ({
|
|
3291
3300
|
...b,
|
|
3292
3301
|
[d]: !1
|
|
3293
|
-
})),
|
|
3294
|
-
const k = zt(b), D = d ==
|
|
3295
|
-
return
|
|
3296
|
-
}),
|
|
3297
|
-
},
|
|
3298
|
-
if ((
|
|
3299
|
-
const d = JSON.parse((
|
|
3300
|
-
(u === "RECEIVE_MESSAGE" || u === "RECEIVE_ANOTHER_MESSAGE") && E(
|
|
3302
|
+
})), x.current || o((b) => {
|
|
3303
|
+
const k = zt(b), D = d == v ? "to" : "from", R = [...k, { ...w, CHAT_ALIGN: D }];
|
|
3304
|
+
return xt(R);
|
|
3305
|
+
}), x.current = !1;
|
|
3306
|
+
}, y = (w) => {
|
|
3307
|
+
if ((w == null ? void 0 : w.data) !== "PING") {
|
|
3308
|
+
const d = JSON.parse((w == null ? void 0 : w.data) || "{}"), { DATA: v = {}, EVENT: u = "" } = d ?? {};
|
|
3309
|
+
(u === "RECEIVE_MESSAGE" || u === "RECEIVE_ANOTHER_MESSAGE") && E(v);
|
|
3301
3310
|
}
|
|
3302
3311
|
};
|
|
3303
|
-
return ge(() => (p && (
|
|
3304
|
-
|
|
3312
|
+
return ge(() => (p && (S(), C()), f && p && (f == null || f.addEventListener("message", y)), () => {
|
|
3313
|
+
f && p && (f == null || f.removeEventListener("message", y));
|
|
3305
3314
|
}), [p]), /* @__PURE__ */ t.jsx(
|
|
3306
3315
|
cr.Provider,
|
|
3307
3316
|
{
|
|
@@ -3310,7 +3319,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3310
3319
|
setChats: o,
|
|
3311
3320
|
detailTicket: r,
|
|
3312
3321
|
employees: T,
|
|
3313
|
-
isFromSelf:
|
|
3322
|
+
isFromSelf: x,
|
|
3314
3323
|
loadingChats: s,
|
|
3315
3324
|
objTypingOtherEmp: c,
|
|
3316
3325
|
setTypingOtherEmp: l
|
|
@@ -3321,7 +3330,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3321
3330
|
}, Hs = ({ onClose: e }) => {
|
|
3322
3331
|
const { xs: n } = Re.useBreakpoint(), { employees: o, detailTicket: r, loadingChats: a } = Ze(), { userOnline: s } = Fe(), i = z(() => {
|
|
3323
3332
|
var l;
|
|
3324
|
-
return (l = o == null ? void 0 : o.map((
|
|
3333
|
+
return (l = o == null ? void 0 : o.map((x) => x == null ? void 0 : x.FULL_NAME)) == null ? void 0 : l.join(", ");
|
|
3325
3334
|
}, [o]), c = z(() => n ? "click" : "hover", [n]);
|
|
3326
3335
|
return a ? /* @__PURE__ */ t.jsxs("div", { className: "w-ticket-detail-header-container", children: [
|
|
3327
3336
|
/* @__PURE__ */ t.jsx(_e.Avatar, {}),
|
|
@@ -3352,22 +3361,22 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3352
3361
|
backgroundColor: "#fde3cf",
|
|
3353
3362
|
cursor: "pointer"
|
|
3354
3363
|
},
|
|
3355
|
-
children: o == null ? void 0 : o.map((l,
|
|
3356
|
-
const
|
|
3364
|
+
children: o == null ? void 0 : o.map((l, x) => {
|
|
3365
|
+
const h = s == null ? void 0 : s.includes(l == null ? void 0 : l.EMP_ID);
|
|
3357
3366
|
return /* @__PURE__ */ t.jsx(Ke, { title: l == null ? void 0 : l.FULL_NAME, trigger: c, children: /* @__PURE__ */ Ht(
|
|
3358
3367
|
$e,
|
|
3359
3368
|
{
|
|
3360
|
-
...
|
|
3369
|
+
...h && {
|
|
3361
3370
|
style: {
|
|
3362
3371
|
border: "2px solid green",
|
|
3363
3372
|
borderRadius: "50%"
|
|
3364
3373
|
}
|
|
3365
3374
|
},
|
|
3366
3375
|
src: l == null ? void 0 : l.PHOTO,
|
|
3367
|
-
key:
|
|
3376
|
+
key: x,
|
|
3368
3377
|
nameFallback: l == null ? void 0 : l.FULL_NAME
|
|
3369
3378
|
}
|
|
3370
|
-
) },
|
|
3379
|
+
) }, x);
|
|
3371
3380
|
})
|
|
3372
3381
|
}
|
|
3373
3382
|
),
|
|
@@ -3399,7 +3408,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3399
3408
|
] }),
|
|
3400
3409
|
/* @__PURE__ */ t.jsx(rr, { taskStatus: r == null ? void 0 : r.STATUS })
|
|
3401
3410
|
] });
|
|
3402
|
-
}, Us =
|
|
3411
|
+
}, Us = Y(Hs), Ws = ({ ...e }) => {
|
|
3403
3412
|
const n = z(() => (e == null ? void 0 : e.CHAT_ALIGN) === "to" ? "client" : "response", [e]);
|
|
3404
3413
|
return /* @__PURE__ */ t.jsxs("div", { className: `w-bubble-chat ${`w-${n}`}`, children: [
|
|
3405
3414
|
/* @__PURE__ */ t.jsx(
|
|
@@ -3419,14 +3428,14 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3419
3428
|
}
|
|
3420
3429
|
)
|
|
3421
3430
|
] });
|
|
3422
|
-
}, Bs =
|
|
3431
|
+
}, Bs = Y(Ws), Ys = ({ ...e }) => {
|
|
3423
3432
|
const n = M("Download", "Download"), o = z(() => (e == null ? void 0 : e.CHAT_ALIGN) === "to" ? "client" : "response", [e]), r = z(() => {
|
|
3424
3433
|
var l;
|
|
3425
3434
|
const c = e == null ? void 0 : e.ATTACHMENT;
|
|
3426
3435
|
if (c)
|
|
3427
3436
|
try {
|
|
3428
|
-
const
|
|
3429
|
-
return
|
|
3437
|
+
const x = new URL(c), h = (l = x == null ? void 0 : x.pathname) == null ? void 0 : l.split("/");
|
|
3438
|
+
return h == null ? void 0 : h[(h == null ? void 0 : h.length) - 1];
|
|
3430
3439
|
} catch {
|
|
3431
3440
|
return c;
|
|
3432
3441
|
}
|
|
@@ -3450,7 +3459,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3450
3459
|
className: `w-bubble-chat ${`w-${o}`}`,
|
|
3451
3460
|
style: { display: "flex", flexDirection: "column" },
|
|
3452
3461
|
children: [
|
|
3453
|
-
s ? /* @__PURE__ */ t.jsx(qt, { src: e == null ? void 0 : e.ATTACHMENT, fallback:
|
|
3462
|
+
s ? /* @__PURE__ */ t.jsx(qt, { src: e == null ? void 0 : e.ATTACHMENT, fallback: xo }) : /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
|
|
3454
3463
|
/* @__PURE__ */ t.jsx(pe, { type: "file" }),
|
|
3455
3464
|
/* @__PURE__ */ t.jsx(
|
|
3456
3465
|
ce.Link,
|
|
@@ -3487,7 +3496,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3487
3496
|
]
|
|
3488
3497
|
}
|
|
3489
3498
|
) });
|
|
3490
|
-
}, Vs =
|
|
3499
|
+
}, Vs = Y(Ys), zs = ({ ...e }) => {
|
|
3491
3500
|
const n = z(() => (e == null ? void 0 : e.CHAT_ALIGN) === "to" ? "client" : "response", [e]);
|
|
3492
3501
|
return /* @__PURE__ */ t.jsxs("div", { className: "w-ticket-info-chat-container", children: [
|
|
3493
3502
|
/* @__PURE__ */ t.jsx(
|
|
@@ -3500,7 +3509,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3500
3509
|
),
|
|
3501
3510
|
/* @__PURE__ */ t.jsx(ce.Text, { children: e == null ? void 0 : e.MESSAGE })
|
|
3502
3511
|
] });
|
|
3503
|
-
}, Gs =
|
|
3512
|
+
}, Gs = Y(zs), lr = () => {
|
|
3504
3513
|
const { widgetProps: e } = ue(), n = Ve.enc.Hex.parse(
|
|
3505
3514
|
Ve.enc.Utf8.parse(e == null ? void 0 : e.keyEncrypt).toString()
|
|
3506
3515
|
), o = {
|
|
@@ -3520,11 +3529,11 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3520
3529
|
};
|
|
3521
3530
|
return {
|
|
3522
3531
|
paramsEncrypt: (i) => {
|
|
3523
|
-
const [c, l = null] = i.split("?"),
|
|
3524
|
-
const [, p = null] =
|
|
3525
|
-
return p && (e != null && e.keyEncrypt) ? a(p) :
|
|
3532
|
+
const [c, l = null] = i.split("?"), x = c.split("/").map((h) => {
|
|
3533
|
+
const [, p = null] = h.split(":");
|
|
3534
|
+
return p && (e != null && e.keyEncrypt) ? a(p) : h;
|
|
3526
3535
|
}).join("/");
|
|
3527
|
-
return l ? `${
|
|
3536
|
+
return l ? `${x}?${l}` : x;
|
|
3528
3537
|
},
|
|
3529
3538
|
encrypt: a
|
|
3530
3539
|
};
|
|
@@ -3573,7 +3582,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3573
3582
|
}
|
|
3574
3583
|
)
|
|
3575
3584
|
] });
|
|
3576
|
-
}, Ks =
|
|
3585
|
+
}, Ks = Y(qs), Ps = ({ ...e }) => {
|
|
3577
3586
|
switch (e == null ? void 0 : e.CHAT_TYPE) {
|
|
3578
3587
|
case "info":
|
|
3579
3588
|
return /* @__PURE__ */ t.jsx(Gs, { ...e });
|
|
@@ -3584,31 +3593,31 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3584
3593
|
default:
|
|
3585
3594
|
return null;
|
|
3586
3595
|
}
|
|
3587
|
-
}, Xs =
|
|
3596
|
+
}, Xs = Y(Ps), Js = () => {
|
|
3588
3597
|
var j;
|
|
3589
|
-
const [e, n] = H([]), o = M("And", "and"), r = M("IsTyping", "Is Typing"), a = M("People", "People"), { employees: s, setTypingOtherEmp: i, objTypingOtherEmp: c } = Ze(), { ws: l, setGetResponse:
|
|
3590
|
-
const T = p == null ? void 0 : p.map((
|
|
3598
|
+
const [e, n] = H([]), o = M("And", "and"), r = M("IsTyping", "Is Typing"), a = M("People", "People"), { employees: s, setTypingOtherEmp: i, objTypingOtherEmp: c } = Ze(), { ws: l, setGetResponse: x } = Fe(), { parsedJWT: h } = ue(), p = z(() => e == null ? void 0 : e.filter((T) => c == null ? void 0 : c[T == null ? void 0 : T.EMP_ID]), [c, e]), f = z(() => {
|
|
3599
|
+
const T = p == null ? void 0 : p.map((S) => S == null ? void 0 : S.FULL_NAME);
|
|
3591
3600
|
if ((p == null ? void 0 : p.length) > 2) {
|
|
3592
|
-
const
|
|
3593
|
-
return `${
|
|
3601
|
+
const S = T == null ? void 0 : T.filter((E, y) => y <= 1), C = T == null ? void 0 : T.filter((E, y) => y > 1);
|
|
3602
|
+
return `${S == null ? void 0 : S.join(", ")}, ${o} ${C == null ? void 0 : C.length} ${a} ${r}`;
|
|
3594
3603
|
}
|
|
3595
3604
|
return `${T == null ? void 0 : T.join(", ")} ${r}`;
|
|
3596
|
-
}, [e, p]),
|
|
3605
|
+
}, [e, p]), m = (T) => {
|
|
3597
3606
|
if ((T == null ? void 0 : T.data) !== "PING") {
|
|
3598
|
-
const
|
|
3607
|
+
const S = JSON.parse((T == null ? void 0 : T.data) || "{}"), { DATA: C = {}, EVENT: E = "" } = S ?? {}, y = C == null ? void 0 : C.EMPLOYEE_ID, w = h == null ? void 0 : h.EMP_ID;
|
|
3599
3608
|
if (E === "TYPING") {
|
|
3600
|
-
|
|
3609
|
+
y === w ? x(!1) : i((u) => ({
|
|
3601
3610
|
...u,
|
|
3602
|
-
[
|
|
3611
|
+
[y]: C == null ? void 0 : C.IS_TYPING
|
|
3603
3612
|
}));
|
|
3604
3613
|
const d = s == null ? void 0 : s.find(
|
|
3605
3614
|
(u) => (u == null ? void 0 : u.EMP_ID) === (C == null ? void 0 : C.EMPLOYEE_ID)
|
|
3606
|
-
),
|
|
3615
|
+
), v = {
|
|
3607
3616
|
...C,
|
|
3608
3617
|
...d
|
|
3609
3618
|
};
|
|
3610
3619
|
n((u) => {
|
|
3611
|
-
const b = [...u,
|
|
3620
|
+
const b = [...u, v], k = Vt({
|
|
3612
3621
|
ArrObj: b,
|
|
3613
3622
|
key: "EMPLOYEE_ID"
|
|
3614
3623
|
});
|
|
@@ -3617,8 +3626,8 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3617
3626
|
}
|
|
3618
3627
|
}
|
|
3619
3628
|
};
|
|
3620
|
-
return ge(() => (l && (l == null || l.addEventListener("message",
|
|
3621
|
-
l && (l == null || l.removeEventListener("message",
|
|
3629
|
+
return ge(() => (l && (l == null || l.addEventListener("message", m)), () => {
|
|
3630
|
+
l && (l == null || l.removeEventListener("message", m));
|
|
3622
3631
|
}), [s]), (j = Object.values(c || {})) != null && j.every((T) => T === !1) ? null : /* @__PURE__ */ t.jsxs(
|
|
3623
3632
|
"div",
|
|
3624
3633
|
{
|
|
@@ -3638,15 +3647,15 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3638
3647
|
backgroundColor: "#fde3cf",
|
|
3639
3648
|
cursor: "pointer"
|
|
3640
3649
|
},
|
|
3641
|
-
children: p == null ? void 0 : p.map((T,
|
|
3650
|
+
children: p == null ? void 0 : p.map((T, S) => /* @__PURE__ */ t.jsx(Ke, { title: T == null ? void 0 : T.FULL_NAME, children: /* @__PURE__ */ t.jsx($e, { src: T == null ? void 0 : T.PHOTO, nameFallback: T == null ? void 0 : T.FULL_NAME }) }, S))
|
|
3642
3651
|
}
|
|
3643
3652
|
),
|
|
3644
|
-
/* @__PURE__ */ t.jsx(ce.Text, { children:
|
|
3653
|
+
/* @__PURE__ */ t.jsx(ce.Text, { children: f }),
|
|
3645
3654
|
(p == null ? void 0 : p.length) > 0 ? /* @__PURE__ */ t.jsx(nr, {}) : null
|
|
3646
3655
|
]
|
|
3647
3656
|
}
|
|
3648
3657
|
);
|
|
3649
|
-
}, Zs =
|
|
3658
|
+
}, Zs = Y(Js), Qs = () => {
|
|
3650
3659
|
var s;
|
|
3651
3660
|
const { chats: e } = Ze(), { widgetProps: n } = ue(), { activeTab: o } = Me(), r = se(), { xs: a } = Re.useBreakpoint();
|
|
3652
3661
|
return ge(() => {
|
|
@@ -3659,22 +3668,22 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3659
3668
|
className: `w-ticket-detail-content-container ${a ? n != null && n.isSF ? "w-ticket-detail-content-container-sf-mobile" : "w-ticket-detail-content-container-mobile" : ""} `,
|
|
3660
3669
|
children: [
|
|
3661
3670
|
(s = Object.keys(e || {})) == null ? void 0 : s.map((i) => {
|
|
3662
|
-
var l,
|
|
3671
|
+
var l, x;
|
|
3663
3672
|
const c = e == null ? void 0 : e[i];
|
|
3664
3673
|
return /* @__PURE__ */ t.jsxs(pt, { children: [
|
|
3665
3674
|
/* @__PURE__ */ t.jsx("div", { className: "w-datekey-chats", children: (l = Se(i)) == null ? void 0 : l.format("ddd, DD MMMM YYYY") }),
|
|
3666
|
-
/* @__PURE__ */ t.jsx("div", { className: "w-bubble-chat-container", children: (
|
|
3675
|
+
/* @__PURE__ */ t.jsx("div", { className: "w-bubble-chat-container", children: (x = Kn(c)) == null ? void 0 : x.map((h, p) => {
|
|
3667
3676
|
var j, T;
|
|
3668
|
-
const
|
|
3677
|
+
const f = (h == null ? void 0 : h.CHAT_ALIGN) === "to" ? "client" : "response", m = h == null ? void 0 : h.CHAT_TYPE;
|
|
3669
3678
|
return /* @__PURE__ */ t.jsxs(pt, { children: [
|
|
3670
|
-
|
|
3679
|
+
f === "response" && m !== "info" && /* @__PURE__ */ t.jsx(
|
|
3671
3680
|
it,
|
|
3672
3681
|
{
|
|
3673
|
-
src: (j =
|
|
3674
|
-
name: (T =
|
|
3682
|
+
src: (j = h == null ? void 0 : h.ACTOR) == null ? void 0 : j.PHOTO,
|
|
3683
|
+
name: (T = h == null ? void 0 : h.ACTOR) == null ? void 0 : T.FULL_NAME
|
|
3675
3684
|
}
|
|
3676
3685
|
),
|
|
3677
|
-
/* @__PURE__ */ t.jsx(Xs, { ...
|
|
3686
|
+
/* @__PURE__ */ t.jsx(Xs, { ...h })
|
|
3678
3687
|
] }, p);
|
|
3679
3688
|
}) })
|
|
3680
3689
|
] }, i);
|
|
@@ -3683,7 +3692,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3683
3692
|
]
|
|
3684
3693
|
}
|
|
3685
3694
|
);
|
|
3686
|
-
}, ei =
|
|
3695
|
+
}, ei = Y(Qs), ti = () => {
|
|
3687
3696
|
var s, i;
|
|
3688
3697
|
const { chats: e, loadingChats: n } = Ze(), { widgetProps: o } = ue(), { xs: r } = Re.useBreakpoint(), a = z(() => {
|
|
3689
3698
|
var l;
|
|
@@ -3697,19 +3706,19 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3697
3706
|
{
|
|
3698
3707
|
className: `${a} w-ticket-detail-loading-chats`,
|
|
3699
3708
|
children: (s = Array.from({ length: 3 })) == null ? void 0 : s.map((c, l) => {
|
|
3700
|
-
const
|
|
3709
|
+
const x = l % 2 === 0;
|
|
3701
3710
|
return /* @__PURE__ */ t.jsxs(
|
|
3702
3711
|
"div",
|
|
3703
3712
|
{
|
|
3704
3713
|
style: {
|
|
3705
3714
|
display: "flex",
|
|
3706
3715
|
gap: 8,
|
|
3707
|
-
...
|
|
3716
|
+
...x && {
|
|
3708
3717
|
alignSelf: "flex-end"
|
|
3709
3718
|
}
|
|
3710
3719
|
},
|
|
3711
3720
|
children: [
|
|
3712
|
-
/* @__PURE__ */ t.jsx("div", { style: { order:
|
|
3721
|
+
/* @__PURE__ */ t.jsx("div", { style: { order: x ? 2 : 1 }, children: /* @__PURE__ */ t.jsx(_e.Avatar, {}) }),
|
|
3713
3722
|
/* @__PURE__ */ t.jsxs(
|
|
3714
3723
|
"div",
|
|
3715
3724
|
{
|
|
@@ -3717,7 +3726,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3717
3726
|
display: "flex",
|
|
3718
3727
|
flexDirection: "column",
|
|
3719
3728
|
gap: 8,
|
|
3720
|
-
order:
|
|
3729
|
+
order: x ? 1 : 2
|
|
3721
3730
|
},
|
|
3722
3731
|
children: [
|
|
3723
3732
|
/* @__PURE__ */ t.jsx(_e.Input, { style: { width: 120, borderRadius: 8 } }),
|
|
@@ -3748,7 +3757,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3748
3757
|
children: /* @__PURE__ */ t.jsx(Bn, {})
|
|
3749
3758
|
}
|
|
3750
3759
|
) : /* @__PURE__ */ t.jsx(ei, {});
|
|
3751
|
-
}, ni =
|
|
3760
|
+
}, ni = Y(ti), ri = ({ ...e }) => {
|
|
3752
3761
|
const n = se(0);
|
|
3753
3762
|
return /* @__PURE__ */ t.jsxs(
|
|
3754
3763
|
"div",
|
|
@@ -3782,7 +3791,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3782
3791
|
]
|
|
3783
3792
|
}
|
|
3784
3793
|
);
|
|
3785
|
-
}, oi =
|
|
3794
|
+
}, oi = Y(ri), si = ({ setLoadingUpload: e, isLoadingUpload: n }) => {
|
|
3786
3795
|
var C, E;
|
|
3787
3796
|
const o = vt(), [r, a] = H({}), s = se(null), i = M(
|
|
3788
3797
|
"ImageMustSmallerThan",
|
|
@@ -3790,9 +3799,9 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3790
3799
|
), c = M(
|
|
3791
3800
|
"MaximumFileSizeExceeded",
|
|
3792
3801
|
"Maximum file size exceeded"
|
|
3793
|
-
), { onSendMsg: l } = Fe(), { employees:
|
|
3794
|
-
var
|
|
3795
|
-
(
|
|
3802
|
+
), { onSendMsg: l } = Fe(), { employees: x, setChats: h, isFromSelf: p } = Ze(), { ticketId: f } = Ne(), { activeTab: m } = Me(), j = () => {
|
|
3803
|
+
var y;
|
|
3804
|
+
(y = o({
|
|
3796
3805
|
endpoint: "/upload/get-upload-config",
|
|
3797
3806
|
data: {
|
|
3798
3807
|
LIMIT: 1,
|
|
@@ -3801,15 +3810,15 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3801
3810
|
UPLOAD_CODE: "helpdesk"
|
|
3802
3811
|
}
|
|
3803
3812
|
}
|
|
3804
|
-
})) == null ||
|
|
3805
|
-
var
|
|
3806
|
-
const d = (u = (
|
|
3813
|
+
})) == null || y.then((w) => {
|
|
3814
|
+
var v, u;
|
|
3815
|
+
const d = (u = (v = w == null ? void 0 : w.data) == null ? void 0 : v.DATA) == null ? void 0 : u.LIST;
|
|
3807
3816
|
(d == null ? void 0 : d.length) > 0 && a(d == null ? void 0 : d[0]);
|
|
3808
3817
|
});
|
|
3809
|
-
}, T = (
|
|
3810
|
-
var
|
|
3811
|
-
const
|
|
3812
|
-
return
|
|
3818
|
+
}, T = (y) => {
|
|
3819
|
+
var v, u, b;
|
|
3820
|
+
const w = y.size / 1024 / 1024, d = (r == null ? void 0 : r.MAXFILESIZE) / 1024;
|
|
3821
|
+
return w > d && ((v = Te) == null || v.destroy(), (u = Te) == null || u.config({
|
|
3813
3822
|
getContainer: () => document.querySelector(".w-widget-content-container"),
|
|
3814
3823
|
top: 28,
|
|
3815
3824
|
placement: "top"
|
|
@@ -3821,20 +3830,20 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3821
3830
|
className: "w-notification-content",
|
|
3822
3831
|
duration: 3
|
|
3823
3832
|
})), !1;
|
|
3824
|
-
},
|
|
3825
|
-
var d,
|
|
3833
|
+
}, S = (y) => {
|
|
3834
|
+
var d, v;
|
|
3826
3835
|
e(!0);
|
|
3827
|
-
const
|
|
3828
|
-
|
|
3836
|
+
const w = new FormData();
|
|
3837
|
+
w.append("UPLOAD_CODE", r == null ? void 0 : r.UPLOAD_CODE), w.append("UPLOAD_TYPE", r == null ? void 0 : r.UPLOAD_TYPE), w.append("FILE", y), (v = (d = o({
|
|
3829
3838
|
endpoint: "/upload/temp",
|
|
3830
|
-
data:
|
|
3839
|
+
data: w,
|
|
3831
3840
|
headers: {
|
|
3832
3841
|
"Content-Type": "multipart/form-data"
|
|
3833
3842
|
}
|
|
3834
3843
|
})) == null ? void 0 : d.then((u) => {
|
|
3835
3844
|
var b, k, D, R, U;
|
|
3836
3845
|
if ((k = (b = u == null ? void 0 : u.data) == null ? void 0 : b.DATA) != null && k.LIST) {
|
|
3837
|
-
const $ = (R = (D = u == null ? void 0 : u.data) == null ? void 0 : D.DATA) == null ? void 0 : R.LIST,
|
|
3846
|
+
const $ = (R = (D = u == null ? void 0 : u.data) == null ? void 0 : D.DATA) == null ? void 0 : R.LIST, V = {
|
|
3838
3847
|
ATTACHMENT: $ == null ? void 0 : $.VIEW_PATH,
|
|
3839
3848
|
FAQ_ID: null,
|
|
3840
3849
|
MESSAGE: "",
|
|
@@ -3842,39 +3851,39 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3842
3851
|
CHAT_ALIGN: "to",
|
|
3843
3852
|
CHAT_TYPE: "chat"
|
|
3844
3853
|
};
|
|
3845
|
-
|
|
3846
|
-
const
|
|
3847
|
-
return
|
|
3854
|
+
h((G) => {
|
|
3855
|
+
const F = [...zt(G), V];
|
|
3856
|
+
return xt(F);
|
|
3848
3857
|
}), p.current = !0, l({
|
|
3849
3858
|
event: "SEND_MESSAGE",
|
|
3850
3859
|
data: {
|
|
3851
3860
|
ATTACHMENT: $ == null ? void 0 : $.TEMP_PATH,
|
|
3852
3861
|
FAQ_ID: null,
|
|
3853
3862
|
MESSAGE: "",
|
|
3854
|
-
EMPLOYEES:
|
|
3855
|
-
TASK_ID:
|
|
3863
|
+
EMPLOYEES: x == null ? void 0 : x.map((G) => G == null ? void 0 : G.EMP_ID),
|
|
3864
|
+
TASK_ID: f
|
|
3856
3865
|
}
|
|
3857
3866
|
}), clearTimeout(s.current), s.current = setTimeout(() => {
|
|
3858
3867
|
Le(".w-ticket-detail-content-container");
|
|
3859
3868
|
}, 350);
|
|
3860
3869
|
}
|
|
3861
|
-
})) == null ||
|
|
3870
|
+
})) == null || v.finally(() => {
|
|
3862
3871
|
e(!1);
|
|
3863
3872
|
});
|
|
3864
3873
|
};
|
|
3865
3874
|
return ge(() => {
|
|
3866
3875
|
j();
|
|
3867
3876
|
}, []), ge(() => {
|
|
3868
|
-
var
|
|
3869
|
-
(
|
|
3870
|
-
}, [
|
|
3877
|
+
var y;
|
|
3878
|
+
(y = Te) == null || y.destroy();
|
|
3879
|
+
}, [m]), /* @__PURE__ */ t.jsx(
|
|
3871
3880
|
Wn,
|
|
3872
3881
|
{
|
|
3873
3882
|
beforeUpload: T,
|
|
3874
3883
|
fileList: [],
|
|
3875
|
-
accept: (E = (C = r == null ? void 0 : r.EXT_LIST) == null ? void 0 : C.split(",")) == null ? void 0 : E.map((
|
|
3876
|
-
onChange: (
|
|
3877
|
-
|
|
3884
|
+
accept: (E = (C = r == null ? void 0 : r.EXT_LIST) == null ? void 0 : C.split(",")) == null ? void 0 : E.map((y) => `.${y}`),
|
|
3885
|
+
onChange: (y) => {
|
|
3886
|
+
S(y == null ? void 0 : y.file);
|
|
3878
3887
|
},
|
|
3879
3888
|
children: /* @__PURE__ */ t.jsx(
|
|
3880
3889
|
le,
|
|
@@ -3887,7 +3896,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3887
3896
|
)
|
|
3888
3897
|
}
|
|
3889
3898
|
);
|
|
3890
|
-
}, ii =
|
|
3899
|
+
}, ii = Y(si), ai = (e) => {
|
|
3891
3900
|
var r;
|
|
3892
3901
|
const n = se(null), o = se(null);
|
|
3893
3902
|
return o != null && o.current && ((r = o.current) == null || r.update(e)), ge(() => {
|
|
@@ -3899,26 +3908,26 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3899
3908
|
}, []), ot.createElement("div", { ref: n });
|
|
3900
3909
|
}, ci = ({ refInput: e }) => {
|
|
3901
3910
|
const { xs: n } = Re.useBreakpoint(), o = z(() => n ? "click" : "hover", [n]), r = () => {
|
|
3902
|
-
var
|
|
3903
|
-
const s = (
|
|
3911
|
+
var f;
|
|
3912
|
+
const s = (f = e == null ? void 0 : e.current) == null ? void 0 : f.textarea;
|
|
3904
3913
|
if (!s)
|
|
3905
3914
|
return !1;
|
|
3906
|
-
const { selectionStart: i, selectionEnd: c, value: l } = s,
|
|
3915
|
+
const { selectionStart: i, selectionEnd: c, value: l } = s, x = l == null ? void 0 : l.substring(0, i), h = l == null ? void 0 : l.substring(i, c), p = l == null ? void 0 : l.substring(c);
|
|
3907
3916
|
return {
|
|
3908
|
-
before:
|
|
3909
|
-
selectedText:
|
|
3917
|
+
before: x,
|
|
3918
|
+
selectedText: h,
|
|
3910
3919
|
after: p,
|
|
3911
3920
|
selectionStart: i,
|
|
3912
3921
|
selectionEnd: c,
|
|
3913
3922
|
text: l
|
|
3914
3923
|
};
|
|
3915
3924
|
}, a = (s) => {
|
|
3916
|
-
var p,
|
|
3925
|
+
var p, f;
|
|
3917
3926
|
(p = e == null ? void 0 : e.current) == null || p.focus();
|
|
3918
|
-
const i = (
|
|
3927
|
+
const i = (f = e == null ? void 0 : e.current) == null ? void 0 : f.textarea, c = s == null ? void 0 : s.native;
|
|
3919
3928
|
if (!i) return;
|
|
3920
|
-
const { before: l, after:
|
|
3921
|
-
typeof document.execCommand == "function" ? document.execCommand("insertText", !1, c) : i.value =
|
|
3929
|
+
const { before: l, after: x } = r(), h = `${l}${c}${x}`;
|
|
3930
|
+
typeof document.execCommand == "function" ? document.execCommand("insertText", !1, c) : i.value = h;
|
|
3922
3931
|
};
|
|
3923
3932
|
return /* @__PURE__ */ t.jsx(
|
|
3924
3933
|
Ut,
|
|
@@ -3936,46 +3945,46 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3936
3945
|
children: /* @__PURE__ */ t.jsx(le, { icon: /* @__PURE__ */ t.jsx(pe, { type: "smile" }), style: { border: "none" } })
|
|
3937
3946
|
}
|
|
3938
3947
|
);
|
|
3939
|
-
}, li =
|
|
3940
|
-
const [e, n] = H(0), [o, r] = H(!1), a = se(null), s = se(null), i = se(!1), c = se(null), { onSendMsg: l, setGetResponse:
|
|
3941
|
-
var
|
|
3942
|
-
return ((
|
|
3943
|
-
}, [
|
|
3944
|
-
...
|
|
3948
|
+
}, li = Y(ci), ui = () => {
|
|
3949
|
+
const [e, n] = H(0), [o, r] = H(!1), a = se(null), s = se(null), i = se(!1), c = se(null), { onSendMsg: l, setGetResponse: x, isGetResponse: h } = Fe(), { ticketId: p } = Ne(), { isActiveTabVA: f } = Me(), { employees: m, setChats: j, isFromSelf: T, detailTicket: S } = Ze(), C = z(() => o || !h, [o, h]), E = z(() => {
|
|
3950
|
+
var v;
|
|
3951
|
+
return ((v = S == null ? void 0 : S.STATUS) == null ? void 0 : v.toString().toLowerCase()) === "closed";
|
|
3952
|
+
}, [S == null ? void 0 : S.STATUS]), y = z(() => m == null ? void 0 : m.map((v) => ({
|
|
3953
|
+
...v,
|
|
3945
3954
|
label: /* @__PURE__ */ t.jsx(
|
|
3946
3955
|
Ut,
|
|
3947
3956
|
{
|
|
3948
3957
|
placement: "left",
|
|
3949
|
-
content: /* @__PURE__ */ t.jsx(oi, { ...
|
|
3950
|
-
children: /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(it, { src:
|
|
3958
|
+
content: /* @__PURE__ */ t.jsx(oi, { ...v }),
|
|
3959
|
+
children: /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(it, { src: v == null ? void 0 : v.PHOTO, name: v == null ? void 0 : v.FULL_NAME }) })
|
|
3951
3960
|
}
|
|
3952
3961
|
),
|
|
3953
|
-
value:
|
|
3954
|
-
})), [
|
|
3962
|
+
value: v == null ? void 0 : v.FULL_NAME
|
|
3963
|
+
})), [m]), w = () => {
|
|
3955
3964
|
var b, k, D;
|
|
3956
|
-
|
|
3957
|
-
const
|
|
3965
|
+
x(!1);
|
|
3966
|
+
const v = (k = (b = a == null ? void 0 : a.current) == null ? void 0 : b.textarea) == null ? void 0 : k.value;
|
|
3958
3967
|
l({
|
|
3959
3968
|
event: "SEND_MESSAGE",
|
|
3960
3969
|
data: {
|
|
3961
3970
|
ATTACHMENT: "",
|
|
3962
3971
|
FAQ_ID: null,
|
|
3963
|
-
MESSAGE:
|
|
3964
|
-
EMPLOYEES:
|
|
3972
|
+
MESSAGE: v,
|
|
3973
|
+
EMPLOYEES: m == null ? void 0 : m.map((R) => R == null ? void 0 : R.EMP_ID),
|
|
3965
3974
|
TASK_ID: p
|
|
3966
3975
|
}
|
|
3967
3976
|
});
|
|
3968
3977
|
const u = {
|
|
3969
3978
|
ATTACHMENT: "",
|
|
3970
3979
|
FAQ_ID: null,
|
|
3971
|
-
MESSAGE:
|
|
3980
|
+
MESSAGE: v,
|
|
3972
3981
|
CREATED_DATE: (D = Se()) == null ? void 0 : D.format(`${Bt} HH:mm:ss`),
|
|
3973
3982
|
CHAT_ALIGN: "to",
|
|
3974
3983
|
CHAT_TYPE: "chat"
|
|
3975
3984
|
};
|
|
3976
3985
|
j((R) => {
|
|
3977
3986
|
const $ = [...zt(R), u];
|
|
3978
|
-
return
|
|
3987
|
+
return xt($);
|
|
3979
3988
|
}), T.current = !0, Le(".w-ticket-detail-content-container"), n((R) => R + 1);
|
|
3980
3989
|
}, d = () => {
|
|
3981
3990
|
window.clearTimeout(s.current), i.current || (i.current = !0, l({
|
|
@@ -3995,11 +4004,11 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3995
4004
|
}, 250);
|
|
3996
4005
|
};
|
|
3997
4006
|
return ge(() => {
|
|
3998
|
-
a != null && a.current && !
|
|
3999
|
-
var
|
|
4000
|
-
(
|
|
4007
|
+
a != null && a.current && !f && p && (clearTimeout(c.current), c.current = setTimeout(() => {
|
|
4008
|
+
var v;
|
|
4009
|
+
(v = a == null ? void 0 : a.current) == null || v.focus();
|
|
4001
4010
|
}, 500));
|
|
4002
|
-
}, [
|
|
4011
|
+
}, [f, p]), E ? null : /* @__PURE__ */ t.jsxs(
|
|
4003
4012
|
"div",
|
|
4004
4013
|
{
|
|
4005
4014
|
className: "w-input-container",
|
|
@@ -4027,15 +4036,15 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4027
4036
|
onChange: () => {
|
|
4028
4037
|
d();
|
|
4029
4038
|
},
|
|
4030
|
-
onKeyDown: (
|
|
4031
|
-
((
|
|
4039
|
+
onKeyDown: (v) => {
|
|
4040
|
+
((v == null ? void 0 : v.code) === "Enter" || (v == null ? void 0 : v.key) === "Enter") && !(v != null && v.shiftKey) && w();
|
|
4032
4041
|
},
|
|
4033
|
-
filterOption: (
|
|
4042
|
+
filterOption: (v, u) => {
|
|
4034
4043
|
var D, R, U;
|
|
4035
|
-
const b = (D =
|
|
4044
|
+
const b = (D = v == null ? void 0 : v.toString()) == null ? void 0 : D.toLowerCase(), k = (U = (R = u == null ? void 0 : u.FULL_NAME) == null ? void 0 : R.toString()) == null ? void 0 : U.toLowerCase();
|
|
4036
4045
|
return k == null ? void 0 : k.includes(b);
|
|
4037
4046
|
},
|
|
4038
|
-
children:
|
|
4047
|
+
children: y == null ? void 0 : y.map((v, u) => /* @__PURE__ */ t.jsx(fn.Option, { ...v, children: v == null ? void 0 : v.label }, u))
|
|
4039
4048
|
},
|
|
4040
4049
|
e
|
|
4041
4050
|
),
|
|
@@ -4053,13 +4062,13 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4053
4062
|
},
|
|
4054
4063
|
icon: /* @__PURE__ */ t.jsx(pe, { type: C ? "loading" : "send" }),
|
|
4055
4064
|
shape: "circle",
|
|
4056
|
-
onClick:
|
|
4065
|
+
onClick: w
|
|
4057
4066
|
}
|
|
4058
4067
|
)
|
|
4059
4068
|
]
|
|
4060
4069
|
}
|
|
4061
4070
|
);
|
|
4062
|
-
}, di =
|
|
4071
|
+
}, di = Y(ui), fi = ({ title: e, subTitle: n, onClose: o, open: r, styleWrapper: a }) => {
|
|
4063
4072
|
var s;
|
|
4064
4073
|
return r ? /* @__PURE__ */ t.jsx(
|
|
4065
4074
|
"div",
|
|
@@ -4082,7 +4091,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4082
4091
|
] })
|
|
4083
4092
|
}
|
|
4084
4093
|
) : null;
|
|
4085
|
-
}, ur =
|
|
4094
|
+
}, ur = Y(fi), gi = () => {
|
|
4086
4095
|
const e = M(
|
|
4087
4096
|
"ForMoreInformationOfThisTicket",
|
|
4088
4097
|
"For more information of this ticket"
|
|
@@ -4113,27 +4122,27 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4113
4122
|
}
|
|
4114
4123
|
}
|
|
4115
4124
|
);
|
|
4116
|
-
}, pi =
|
|
4125
|
+
}, pi = Y(gi), xi = ({ onClose: e, visible: n }) => /* @__PURE__ */ t.jsx(ar, { open: n, onClose: e, children: /* @__PURE__ */ t.jsxs($s, { children: [
|
|
4117
4126
|
/* @__PURE__ */ t.jsx(Us, { onClose: e }),
|
|
4118
4127
|
/* @__PURE__ */ t.jsx(pi, {}),
|
|
4119
4128
|
/* @__PURE__ */ t.jsx(ni, {}),
|
|
4120
4129
|
/* @__PURE__ */ t.jsx(di, {})
|
|
4121
|
-
] }) }),
|
|
4130
|
+
] }) }), hi = Y(xi), mi = () => {
|
|
4122
4131
|
const e = M("AdvanceFilter", "Advance Filter"), n = M("Subject", "Subject"), o = M(
|
|
4123
4132
|
"TicketCategory",
|
|
4124
4133
|
"Ticket Category"
|
|
4125
|
-
), r = M("TicketStatus", "Ticket Status"), a = M("CreatedDate", "Created Date"), s = M("New", "New"), i = M("Open", "Open"), c = M("Reopen", "Reopen"), l = M("InProgress", "In Progress"),
|
|
4126
|
-
const R = `${s}/${i}/${c}`, U = `${l}/${
|
|
4134
|
+
), r = M("TicketStatus", "Ticket Status"), a = M("CreatedDate", "Created Date"), s = M("New", "New"), i = M("Open", "Open"), c = M("Reopen", "Reopen"), l = M("InProgress", "In Progress"), x = M("Responded", "Responded"), h = M("Fixed", "Fixed"), p = M("Done", "Done"), f = M("Closed", "Closed"), m = M("HDCancelled", "Cancelled"), j = M("Clear", "Clear"), T = M("Filter", "Filter"), S = vt(), [C] = Ce.useForm(), { openFilter: E, setOpenFilter: y, getListTicket: w, setCountFilters: d } = Ne(), [v, u] = H([]), b = z(() => {
|
|
4135
|
+
const R = `${s}/${i}/${c}`, U = `${l}/${x}`, $ = `${h}/${p}`;
|
|
4127
4136
|
return [
|
|
4128
4137
|
{ value: 3, label: R },
|
|
4129
4138
|
{ value: 1, label: U },
|
|
4130
4139
|
{ value: 4, label: $ },
|
|
4131
|
-
{ value: 6, label:
|
|
4132
|
-
{ value: 8, label:
|
|
4140
|
+
{ value: 6, label: f },
|
|
4141
|
+
{ value: 8, label: m }
|
|
4133
4142
|
];
|
|
4134
4143
|
}, []), k = () => {
|
|
4135
4144
|
var R;
|
|
4136
|
-
(R =
|
|
4145
|
+
(R = S({
|
|
4137
4146
|
endpoint: "/helpdesk/category/list",
|
|
4138
4147
|
data: {
|
|
4139
4148
|
LIMIT: 999999,
|
|
@@ -4142,22 +4151,22 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4142
4151
|
SORT: { FIELD: "ORDER_NO", ORDER: "ASC" }
|
|
4143
4152
|
}
|
|
4144
4153
|
})) == null || R.then((U) => {
|
|
4145
|
-
var $,
|
|
4154
|
+
var $, V, G;
|
|
4146
4155
|
if (($ = U == null ? void 0 : U.data) != null && $.DATA) {
|
|
4147
|
-
const P = (G = (
|
|
4156
|
+
const P = (G = (V = U == null ? void 0 : U.data) == null ? void 0 : V.DATA) == null ? void 0 : G.LIST;
|
|
4148
4157
|
u(
|
|
4149
|
-
P == null ? void 0 : P.map((
|
|
4150
|
-
label:
|
|
4151
|
-
value:
|
|
4158
|
+
P == null ? void 0 : P.map((F) => ({
|
|
4159
|
+
label: F == null ? void 0 : F.CATEGORY_NAME,
|
|
4160
|
+
value: F == null ? void 0 : F.CATEGORY_CODE
|
|
4152
4161
|
}))
|
|
4153
4162
|
);
|
|
4154
4163
|
}
|
|
4155
4164
|
});
|
|
4156
4165
|
}, D = () => {
|
|
4157
|
-
var $,
|
|
4166
|
+
var $, V;
|
|
4158
4167
|
const R = C == null ? void 0 : C.getFieldsValue(!0);
|
|
4159
|
-
|
|
4160
|
-
const U = (
|
|
4168
|
+
w(R);
|
|
4169
|
+
const U = (V = ($ = Object.values(R || {})) == null ? void 0 : $.flat()) == null ? void 0 : V.filter(Boolean);
|
|
4161
4170
|
d(U == null ? void 0 : U.length);
|
|
4162
4171
|
};
|
|
4163
4172
|
return ge(() => {
|
|
@@ -4168,7 +4177,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4168
4177
|
styleContainer: { height: "calc(100% - 50px)" },
|
|
4169
4178
|
open: E,
|
|
4170
4179
|
onClose: () => {
|
|
4171
|
-
|
|
4180
|
+
y(!1);
|
|
4172
4181
|
},
|
|
4173
4182
|
footer: /* @__PURE__ */ t.jsxs("div", { className: "w-ticket-list-advance-filter-footer", children: [
|
|
4174
4183
|
/* @__PURE__ */ t.jsx(
|
|
@@ -4186,7 +4195,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4186
4195
|
{
|
|
4187
4196
|
type: "primary",
|
|
4188
4197
|
onClick: () => {
|
|
4189
|
-
D(),
|
|
4198
|
+
D(), y(!1);
|
|
4190
4199
|
},
|
|
4191
4200
|
children: T
|
|
4192
4201
|
},
|
|
@@ -4201,21 +4210,21 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4201
4210
|
{
|
|
4202
4211
|
icon: /* @__PURE__ */ t.jsx(pe, { type: "close" }),
|
|
4203
4212
|
onClick: () => {
|
|
4204
|
-
|
|
4213
|
+
y(!1);
|
|
4205
4214
|
}
|
|
4206
4215
|
}
|
|
4207
4216
|
)
|
|
4208
4217
|
] }),
|
|
4209
4218
|
/* @__PURE__ */ t.jsx("div", { className: "w-ticket-list-advance-filter-form-container", children: /* @__PURE__ */ t.jsxs(Ce, { form: C, layout: "vertical", children: [
|
|
4210
4219
|
/* @__PURE__ */ t.jsx(Ce.Item, { label: n, name: "TASK_NAME", children: /* @__PURE__ */ t.jsx(st, { allowClear: !0 }) }),
|
|
4211
|
-
/* @__PURE__ */ t.jsx(Ce.Item, { label: o, name: "CATEGORY_CODE", children: /* @__PURE__ */ t.jsx(gn, { options:
|
|
4220
|
+
/* @__PURE__ */ t.jsx(Ce.Item, { label: o, name: "CATEGORY_CODE", children: /* @__PURE__ */ t.jsx(gn, { options: v, mode: "multiple", allowClear: !0 }) }),
|
|
4212
4221
|
/* @__PURE__ */ t.jsx(Ce.Item, { label: r, name: "TASK_STATUS", children: /* @__PURE__ */ t.jsx(gn, { options: b, mode: "multiple", allowClear: !0 }) }),
|
|
4213
4222
|
/* @__PURE__ */ t.jsx(Ce.Item, { label: a, name: "CREATED_DATE", children: /* @__PURE__ */ t.jsx(zr, { style: { width: "100%" }, allowClear: !0 }) })
|
|
4214
4223
|
] }) })
|
|
4215
4224
|
]
|
|
4216
4225
|
}
|
|
4217
4226
|
);
|
|
4218
|
-
}, yi =
|
|
4227
|
+
}, yi = Y(mi), vi = () => {
|
|
4219
4228
|
const e = M(
|
|
4220
4229
|
"ReconnectManually",
|
|
4221
4230
|
"Reconnect Manually"
|
|
@@ -4269,11 +4278,11 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4269
4278
|
)
|
|
4270
4279
|
}
|
|
4271
4280
|
);
|
|
4272
|
-
}, bi =
|
|
4281
|
+
}, bi = Y(vi), Ci = () => {
|
|
4273
4282
|
const { setTicketId: e, ticketId: n, openFilter: o } = Ne(), { onSendMsg: r, setGetResponse: a } = Fe(), { showReadyWSHD: s } = ue();
|
|
4274
4283
|
return s ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
4275
4284
|
/* @__PURE__ */ t.jsx(
|
|
4276
|
-
|
|
4285
|
+
hi,
|
|
4277
4286
|
{
|
|
4278
4287
|
visible: n,
|
|
4279
4288
|
onClose: () => {
|
|
@@ -4289,7 +4298,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4289
4298
|
/* @__PURE__ */ t.jsx("div", { style: { display: !n && !o ? "block" : "none" }, children: /* @__PURE__ */ t.jsx(Fs, {}) }),
|
|
4290
4299
|
/* @__PURE__ */ t.jsx(yi, {})
|
|
4291
4300
|
] }) : /* @__PURE__ */ t.jsx(bi, {});
|
|
4292
|
-
}, Ti =
|
|
4301
|
+
}, Ti = Y(Ci);
|
|
4293
4302
|
var et = { exports: {} }, Dt = {}, ut = { exports: {} }, dt = { exports: {} }, ie = {};
|
|
4294
4303
|
/** @license React v16.13.1
|
|
4295
4304
|
* react-is.production.min.js
|
|
@@ -4303,15 +4312,15 @@ var Tn;
|
|
|
4303
4312
|
function Ei() {
|
|
4304
4313
|
if (Tn) return ie;
|
|
4305
4314
|
Tn = 1;
|
|
4306
|
-
var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, o = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, s = e ? Symbol.for("react.profiler") : 60114, i = e ? Symbol.for("react.provider") : 60109, c = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111,
|
|
4307
|
-
function
|
|
4315
|
+
var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, o = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, s = e ? Symbol.for("react.profiler") : 60114, i = e ? Symbol.for("react.provider") : 60109, c = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, x = e ? Symbol.for("react.concurrent_mode") : 60111, h = e ? Symbol.for("react.forward_ref") : 60112, p = e ? Symbol.for("react.suspense") : 60113, f = e ? Symbol.for("react.suspense_list") : 60120, m = e ? Symbol.for("react.memo") : 60115, j = e ? Symbol.for("react.lazy") : 60116, T = e ? Symbol.for("react.block") : 60121, S = e ? Symbol.for("react.fundamental") : 60117, C = e ? Symbol.for("react.responder") : 60118, E = e ? Symbol.for("react.scope") : 60119;
|
|
4316
|
+
function y(d) {
|
|
4308
4317
|
if (typeof d == "object" && d !== null) {
|
|
4309
|
-
var
|
|
4310
|
-
switch (
|
|
4318
|
+
var v = d.$$typeof;
|
|
4319
|
+
switch (v) {
|
|
4311
4320
|
case n:
|
|
4312
4321
|
switch (d = d.type, d) {
|
|
4313
4322
|
case l:
|
|
4314
|
-
case
|
|
4323
|
+
case x:
|
|
4315
4324
|
case r:
|
|
4316
4325
|
case s:
|
|
4317
4326
|
case a:
|
|
@@ -4320,50 +4329,50 @@ function Ei() {
|
|
|
4320
4329
|
default:
|
|
4321
4330
|
switch (d = d && d.$$typeof, d) {
|
|
4322
4331
|
case c:
|
|
4323
|
-
case
|
|
4332
|
+
case h:
|
|
4324
4333
|
case j:
|
|
4325
|
-
case
|
|
4334
|
+
case m:
|
|
4326
4335
|
case i:
|
|
4327
4336
|
return d;
|
|
4328
4337
|
default:
|
|
4329
|
-
return
|
|
4338
|
+
return v;
|
|
4330
4339
|
}
|
|
4331
4340
|
}
|
|
4332
4341
|
case o:
|
|
4333
|
-
return
|
|
4342
|
+
return v;
|
|
4334
4343
|
}
|
|
4335
4344
|
}
|
|
4336
4345
|
}
|
|
4337
|
-
function
|
|
4338
|
-
return
|
|
4346
|
+
function w(d) {
|
|
4347
|
+
return y(d) === x;
|
|
4339
4348
|
}
|
|
4340
|
-
return ie.AsyncMode = l, ie.ConcurrentMode =
|
|
4341
|
-
return
|
|
4342
|
-
}, ie.isConcurrentMode =
|
|
4343
|
-
return
|
|
4349
|
+
return ie.AsyncMode = l, ie.ConcurrentMode = x, ie.ContextConsumer = c, ie.ContextProvider = i, ie.Element = n, ie.ForwardRef = h, ie.Fragment = r, ie.Lazy = j, ie.Memo = m, ie.Portal = o, ie.Profiler = s, ie.StrictMode = a, ie.Suspense = p, ie.isAsyncMode = function(d) {
|
|
4350
|
+
return w(d) || y(d) === l;
|
|
4351
|
+
}, ie.isConcurrentMode = w, ie.isContextConsumer = function(d) {
|
|
4352
|
+
return y(d) === c;
|
|
4344
4353
|
}, ie.isContextProvider = function(d) {
|
|
4345
|
-
return
|
|
4354
|
+
return y(d) === i;
|
|
4346
4355
|
}, ie.isElement = function(d) {
|
|
4347
4356
|
return typeof d == "object" && d !== null && d.$$typeof === n;
|
|
4348
4357
|
}, ie.isForwardRef = function(d) {
|
|
4349
|
-
return
|
|
4358
|
+
return y(d) === h;
|
|
4350
4359
|
}, ie.isFragment = function(d) {
|
|
4351
|
-
return
|
|
4360
|
+
return y(d) === r;
|
|
4352
4361
|
}, ie.isLazy = function(d) {
|
|
4353
|
-
return
|
|
4362
|
+
return y(d) === j;
|
|
4354
4363
|
}, ie.isMemo = function(d) {
|
|
4355
|
-
return
|
|
4364
|
+
return y(d) === m;
|
|
4356
4365
|
}, ie.isPortal = function(d) {
|
|
4357
|
-
return
|
|
4366
|
+
return y(d) === o;
|
|
4358
4367
|
}, ie.isProfiler = function(d) {
|
|
4359
|
-
return
|
|
4368
|
+
return y(d) === s;
|
|
4360
4369
|
}, ie.isStrictMode = function(d) {
|
|
4361
|
-
return
|
|
4370
|
+
return y(d) === a;
|
|
4362
4371
|
}, ie.isSuspense = function(d) {
|
|
4363
|
-
return
|
|
4372
|
+
return y(d) === p;
|
|
4364
4373
|
}, ie.isValidElementType = function(d) {
|
|
4365
|
-
return typeof d == "string" || typeof d == "function" || d === r || d ===
|
|
4366
|
-
}, ie.typeOf =
|
|
4374
|
+
return typeof d == "string" || typeof d == "function" || d === r || d === x || d === s || d === a || d === p || d === f || typeof d == "object" && d !== null && (d.$$typeof === j || d.$$typeof === m || d.$$typeof === i || d.$$typeof === c || d.$$typeof === h || d.$$typeof === S || d.$$typeof === C || d.$$typeof === E || d.$$typeof === T);
|
|
4375
|
+
}, ie.typeOf = y, ie;
|
|
4367
4376
|
}
|
|
4368
4377
|
var ae = {};
|
|
4369
4378
|
/** @license React v16.13.1
|
|
@@ -4377,12 +4386,12 @@ var ae = {};
|
|
|
4377
4386
|
var En;
|
|
4378
4387
|
function Si() {
|
|
4379
4388
|
return En || (En = 1, process.env.NODE_ENV !== "production" && function() {
|
|
4380
|
-
var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, o = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, s = e ? Symbol.for("react.profiler") : 60114, i = e ? Symbol.for("react.provider") : 60109, c = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111,
|
|
4381
|
-
function
|
|
4389
|
+
var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, o = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, s = e ? Symbol.for("react.profiler") : 60114, i = e ? Symbol.for("react.provider") : 60109, c = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, x = e ? Symbol.for("react.concurrent_mode") : 60111, h = e ? Symbol.for("react.forward_ref") : 60112, p = e ? Symbol.for("react.suspense") : 60113, f = e ? Symbol.for("react.suspense_list") : 60120, m = e ? Symbol.for("react.memo") : 60115, j = e ? Symbol.for("react.lazy") : 60116, T = e ? Symbol.for("react.block") : 60121, S = e ? Symbol.for("react.fundamental") : 60117, C = e ? Symbol.for("react.responder") : 60118, E = e ? Symbol.for("react.scope") : 60119;
|
|
4390
|
+
function y(L) {
|
|
4382
4391
|
return typeof L == "string" || typeof L == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
4383
|
-
L === r || L ===
|
|
4392
|
+
L === r || L === x || L === s || L === a || L === p || L === f || typeof L == "object" && L !== null && (L.$$typeof === j || L.$$typeof === m || L.$$typeof === i || L.$$typeof === c || L.$$typeof === h || L.$$typeof === S || L.$$typeof === C || L.$$typeof === E || L.$$typeof === T);
|
|
4384
4393
|
}
|
|
4385
|
-
function
|
|
4394
|
+
function w(L) {
|
|
4386
4395
|
if (typeof L == "object" && L !== null) {
|
|
4387
4396
|
var be = L.$$typeof;
|
|
4388
4397
|
switch (be) {
|
|
@@ -4390,7 +4399,7 @@ function Si() {
|
|
|
4390
4399
|
var We = L.type;
|
|
4391
4400
|
switch (We) {
|
|
4392
4401
|
case l:
|
|
4393
|
-
case
|
|
4402
|
+
case x:
|
|
4394
4403
|
case r:
|
|
4395
4404
|
case s:
|
|
4396
4405
|
case a:
|
|
@@ -4400,9 +4409,9 @@ function Si() {
|
|
|
4400
4409
|
var Ie = We && We.$$typeof;
|
|
4401
4410
|
switch (Ie) {
|
|
4402
4411
|
case c:
|
|
4403
|
-
case
|
|
4412
|
+
case h:
|
|
4404
4413
|
case j:
|
|
4405
|
-
case
|
|
4414
|
+
case m:
|
|
4406
4415
|
case i:
|
|
4407
4416
|
return Ie;
|
|
4408
4417
|
default:
|
|
@@ -4414,47 +4423,47 @@ function Si() {
|
|
|
4414
4423
|
}
|
|
4415
4424
|
}
|
|
4416
4425
|
}
|
|
4417
|
-
var d = l,
|
|
4426
|
+
var d = l, v = x, u = c, b = i, k = n, D = h, R = r, U = j, $ = m, V = o, G = s, P = a, F = p, Z = !1;
|
|
4418
4427
|
function K(L) {
|
|
4419
|
-
return Z || (Z = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), _(L) ||
|
|
4428
|
+
return Z || (Z = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), _(L) || w(L) === l;
|
|
4420
4429
|
}
|
|
4421
4430
|
function _(L) {
|
|
4422
|
-
return
|
|
4431
|
+
return w(L) === x;
|
|
4423
4432
|
}
|
|
4424
4433
|
function O(L) {
|
|
4425
|
-
return
|
|
4434
|
+
return w(L) === c;
|
|
4426
4435
|
}
|
|
4427
4436
|
function W(L) {
|
|
4428
|
-
return
|
|
4437
|
+
return w(L) === i;
|
|
4429
4438
|
}
|
|
4430
|
-
function
|
|
4439
|
+
function I(L) {
|
|
4431
4440
|
return typeof L == "object" && L !== null && L.$$typeof === n;
|
|
4432
4441
|
}
|
|
4433
|
-
function
|
|
4434
|
-
return
|
|
4442
|
+
function B(L) {
|
|
4443
|
+
return w(L) === h;
|
|
4435
4444
|
}
|
|
4436
4445
|
function Q(L) {
|
|
4437
|
-
return
|
|
4446
|
+
return w(L) === r;
|
|
4438
4447
|
}
|
|
4439
4448
|
function X(L) {
|
|
4440
|
-
return
|
|
4449
|
+
return w(L) === j;
|
|
4441
4450
|
}
|
|
4442
4451
|
function J(L) {
|
|
4443
|
-
return
|
|
4452
|
+
return w(L) === m;
|
|
4444
4453
|
}
|
|
4445
4454
|
function ee(L) {
|
|
4446
|
-
return
|
|
4455
|
+
return w(L) === o;
|
|
4447
4456
|
}
|
|
4448
4457
|
function re(L) {
|
|
4449
|
-
return
|
|
4458
|
+
return w(L) === s;
|
|
4450
4459
|
}
|
|
4451
4460
|
function te(L) {
|
|
4452
|
-
return
|
|
4461
|
+
return w(L) === a;
|
|
4453
4462
|
}
|
|
4454
4463
|
function ye(L) {
|
|
4455
|
-
return
|
|
4464
|
+
return w(L) === p;
|
|
4456
4465
|
}
|
|
4457
|
-
ae.AsyncMode = d, ae.ConcurrentMode =
|
|
4466
|
+
ae.AsyncMode = d, ae.ConcurrentMode = v, ae.ContextConsumer = u, ae.ContextProvider = b, ae.Element = k, ae.ForwardRef = D, ae.Fragment = R, ae.Lazy = U, ae.Memo = $, ae.Portal = V, ae.Profiler = G, ae.StrictMode = P, ae.Suspense = F, ae.isAsyncMode = K, ae.isConcurrentMode = _, ae.isContextConsumer = O, ae.isContextProvider = W, ae.isElement = I, ae.isForwardRef = B, ae.isFragment = Q, ae.isLazy = X, ae.isMemo = J, ae.isPortal = ee, ae.isProfiler = re, ae.isStrictMode = te, ae.isSuspense = ye, ae.isValidElementType = y, ae.typeOf = w;
|
|
4458
4467
|
}()), ae;
|
|
4459
4468
|
}
|
|
4460
4469
|
var Sn;
|
|
@@ -4489,29 +4498,29 @@ function wi() {
|
|
|
4489
4498
|
}
|
|
4490
4499
|
};
|
|
4491
4500
|
}
|
|
4492
|
-
function a(s, i, c, l,
|
|
4501
|
+
function a(s, i, c, l, x) {
|
|
4493
4502
|
if (process.env.NODE_ENV !== "production") {
|
|
4494
|
-
for (var
|
|
4495
|
-
if (r(s,
|
|
4503
|
+
for (var h in s)
|
|
4504
|
+
if (r(s, h)) {
|
|
4496
4505
|
var p;
|
|
4497
4506
|
try {
|
|
4498
|
-
if (typeof s[
|
|
4499
|
-
var
|
|
4500
|
-
(l || "React class") + ": " + c + " type `" +
|
|
4507
|
+
if (typeof s[h] != "function") {
|
|
4508
|
+
var f = Error(
|
|
4509
|
+
(l || "React class") + ": " + c + " type `" + h + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof s[h] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
4501
4510
|
);
|
|
4502
|
-
throw
|
|
4511
|
+
throw f.name = "Invariant Violation", f;
|
|
4503
4512
|
}
|
|
4504
|
-
p = s[
|
|
4513
|
+
p = s[h](i, h, l, c, null, n);
|
|
4505
4514
|
} catch (j) {
|
|
4506
4515
|
p = j;
|
|
4507
4516
|
}
|
|
4508
4517
|
if (p && !(p instanceof Error) && e(
|
|
4509
|
-
(l || "React class") + ": type specification of " + c + " `" +
|
|
4518
|
+
(l || "React class") + ": type specification of " + c + " `" + h + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof p + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
4510
4519
|
), p instanceof Error && !(p.message in o)) {
|
|
4511
4520
|
o[p.message] = !0;
|
|
4512
|
-
var
|
|
4521
|
+
var m = x ? x() : "";
|
|
4513
4522
|
e(
|
|
4514
|
-
"Failed " + c + " type: " + p.message + (
|
|
4523
|
+
"Failed " + c + " type: " + p.message + (m ?? "")
|
|
4515
4524
|
);
|
|
4516
4525
|
}
|
|
4517
4526
|
}
|
|
@@ -4539,13 +4548,13 @@ function _i() {
|
|
|
4539
4548
|
return null;
|
|
4540
4549
|
}
|
|
4541
4550
|
return Ft = function(c, l) {
|
|
4542
|
-
var
|
|
4551
|
+
var x = typeof Symbol == "function" && Symbol.iterator, h = "@@iterator";
|
|
4543
4552
|
function p(_) {
|
|
4544
|
-
var O = _ && (
|
|
4553
|
+
var O = _ && (x && _[x] || _[h]);
|
|
4545
4554
|
if (typeof O == "function")
|
|
4546
4555
|
return O;
|
|
4547
4556
|
}
|
|
4548
|
-
var
|
|
4557
|
+
var f = "<<anonymous>>", m = {
|
|
4549
4558
|
array: C("array"),
|
|
4550
4559
|
bigint: C("bigint"),
|
|
4551
4560
|
bool: C("boolean"),
|
|
@@ -4555,10 +4564,10 @@ function _i() {
|
|
|
4555
4564
|
string: C("string"),
|
|
4556
4565
|
symbol: C("symbol"),
|
|
4557
4566
|
any: E(),
|
|
4558
|
-
arrayOf:
|
|
4559
|
-
element:
|
|
4567
|
+
arrayOf: y,
|
|
4568
|
+
element: w(),
|
|
4560
4569
|
elementType: d(),
|
|
4561
|
-
instanceOf:
|
|
4570
|
+
instanceOf: v,
|
|
4562
4571
|
node: D(),
|
|
4563
4572
|
objectOf: b,
|
|
4564
4573
|
oneOf: u,
|
|
@@ -4573,11 +4582,11 @@ function _i() {
|
|
|
4573
4582
|
this.message = _, this.data = O && typeof O == "object" ? O : {}, this.stack = "";
|
|
4574
4583
|
}
|
|
4575
4584
|
T.prototype = Error.prototype;
|
|
4576
|
-
function
|
|
4585
|
+
function S(_) {
|
|
4577
4586
|
if (process.env.NODE_ENV !== "production")
|
|
4578
4587
|
var O = {}, W = 0;
|
|
4579
|
-
function
|
|
4580
|
-
if (ee = ee ||
|
|
4588
|
+
function I(Q, X, J, ee, re, te, ye) {
|
|
4589
|
+
if (ee = ee || f, te = te || J, ye !== o) {
|
|
4581
4590
|
if (l) {
|
|
4582
4591
|
var L = new Error(
|
|
4583
4592
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
@@ -4593,109 +4602,109 @@ function _i() {
|
|
|
4593
4602
|
}
|
|
4594
4603
|
return X[J] == null ? Q ? X[J] === null ? new T("The " + re + " `" + te + "` is marked as required " + ("in `" + ee + "`, but its value is `null`.")) : new T("The " + re + " `" + te + "` is marked as required in " + ("`" + ee + "`, but its value is `undefined`.")) : null : _(X, J, ee, re, te);
|
|
4595
4604
|
}
|
|
4596
|
-
var
|
|
4597
|
-
return
|
|
4605
|
+
var B = I.bind(null, !1);
|
|
4606
|
+
return B.isRequired = I.bind(null, !0), B;
|
|
4598
4607
|
}
|
|
4599
4608
|
function C(_) {
|
|
4600
|
-
function O(W,
|
|
4601
|
-
var ee = W[
|
|
4609
|
+
function O(W, I, B, Q, X, J) {
|
|
4610
|
+
var ee = W[I], re = P(ee);
|
|
4602
4611
|
if (re !== _) {
|
|
4603
|
-
var te =
|
|
4612
|
+
var te = F(ee);
|
|
4604
4613
|
return new T(
|
|
4605
|
-
"Invalid " + Q + " `" + X + "` of type " + ("`" + te + "` supplied to `" +
|
|
4614
|
+
"Invalid " + Q + " `" + X + "` of type " + ("`" + te + "` supplied to `" + B + "`, expected ") + ("`" + _ + "`."),
|
|
4606
4615
|
{ expectedType: _ }
|
|
4607
4616
|
);
|
|
4608
4617
|
}
|
|
4609
4618
|
return null;
|
|
4610
4619
|
}
|
|
4611
|
-
return
|
|
4620
|
+
return S(O);
|
|
4612
4621
|
}
|
|
4613
4622
|
function E() {
|
|
4614
|
-
return
|
|
4623
|
+
return S(i);
|
|
4615
4624
|
}
|
|
4616
|
-
function
|
|
4617
|
-
function O(W,
|
|
4625
|
+
function y(_) {
|
|
4626
|
+
function O(W, I, B, Q, X) {
|
|
4618
4627
|
if (typeof _ != "function")
|
|
4619
|
-
return new T("Property `" + X + "` of component `" +
|
|
4620
|
-
var J = W[
|
|
4628
|
+
return new T("Property `" + X + "` of component `" + B + "` has invalid PropType notation inside arrayOf.");
|
|
4629
|
+
var J = W[I];
|
|
4621
4630
|
if (!Array.isArray(J)) {
|
|
4622
4631
|
var ee = P(J);
|
|
4623
|
-
return new T("Invalid " + Q + " `" + X + "` of type " + ("`" + ee + "` supplied to `" +
|
|
4632
|
+
return new T("Invalid " + Q + " `" + X + "` of type " + ("`" + ee + "` supplied to `" + B + "`, expected an array."));
|
|
4624
4633
|
}
|
|
4625
4634
|
for (var re = 0; re < J.length; re++) {
|
|
4626
|
-
var te = _(J, re,
|
|
4635
|
+
var te = _(J, re, B, Q, X + "[" + re + "]", o);
|
|
4627
4636
|
if (te instanceof Error)
|
|
4628
4637
|
return te;
|
|
4629
4638
|
}
|
|
4630
4639
|
return null;
|
|
4631
4640
|
}
|
|
4632
|
-
return
|
|
4641
|
+
return S(O);
|
|
4633
4642
|
}
|
|
4634
|
-
function
|
|
4635
|
-
function _(O, W,
|
|
4643
|
+
function w() {
|
|
4644
|
+
function _(O, W, I, B, Q) {
|
|
4636
4645
|
var X = O[W];
|
|
4637
4646
|
if (!c(X)) {
|
|
4638
4647
|
var J = P(X);
|
|
4639
|
-
return new T("Invalid " +
|
|
4648
|
+
return new T("Invalid " + B + " `" + Q + "` of type " + ("`" + J + "` supplied to `" + I + "`, expected a single ReactElement."));
|
|
4640
4649
|
}
|
|
4641
4650
|
return null;
|
|
4642
4651
|
}
|
|
4643
|
-
return
|
|
4652
|
+
return S(_);
|
|
4644
4653
|
}
|
|
4645
4654
|
function d() {
|
|
4646
|
-
function _(O, W,
|
|
4655
|
+
function _(O, W, I, B, Q) {
|
|
4647
4656
|
var X = O[W];
|
|
4648
4657
|
if (!e.isValidElementType(X)) {
|
|
4649
4658
|
var J = P(X);
|
|
4650
|
-
return new T("Invalid " +
|
|
4659
|
+
return new T("Invalid " + B + " `" + Q + "` of type " + ("`" + J + "` supplied to `" + I + "`, expected a single ReactElement type."));
|
|
4651
4660
|
}
|
|
4652
4661
|
return null;
|
|
4653
4662
|
}
|
|
4654
|
-
return
|
|
4663
|
+
return S(_);
|
|
4655
4664
|
}
|
|
4656
|
-
function
|
|
4657
|
-
function O(W,
|
|
4658
|
-
if (!(W[
|
|
4659
|
-
var J = _.name ||
|
|
4660
|
-
return new T("Invalid " + Q + " `" + X + "` of type " + ("`" + ee + "` supplied to `" +
|
|
4665
|
+
function v(_) {
|
|
4666
|
+
function O(W, I, B, Q, X) {
|
|
4667
|
+
if (!(W[I] instanceof _)) {
|
|
4668
|
+
var J = _.name || f, ee = K(W[I]);
|
|
4669
|
+
return new T("Invalid " + Q + " `" + X + "` of type " + ("`" + ee + "` supplied to `" + B + "`, expected ") + ("instance of `" + J + "`."));
|
|
4661
4670
|
}
|
|
4662
4671
|
return null;
|
|
4663
4672
|
}
|
|
4664
|
-
return
|
|
4673
|
+
return S(O);
|
|
4665
4674
|
}
|
|
4666
4675
|
function u(_) {
|
|
4667
4676
|
if (!Array.isArray(_))
|
|
4668
4677
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? s(
|
|
4669
4678
|
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
4670
4679
|
) : s("Invalid argument supplied to oneOf, expected an array.")), i;
|
|
4671
|
-
function O(W,
|
|
4672
|
-
for (var J = W[
|
|
4680
|
+
function O(W, I, B, Q, X) {
|
|
4681
|
+
for (var J = W[I], ee = 0; ee < _.length; ee++)
|
|
4673
4682
|
if (j(J, _[ee]))
|
|
4674
4683
|
return null;
|
|
4675
4684
|
var re = JSON.stringify(_, function(ye, L) {
|
|
4676
|
-
var be =
|
|
4685
|
+
var be = F(L);
|
|
4677
4686
|
return be === "symbol" ? String(L) : L;
|
|
4678
4687
|
});
|
|
4679
|
-
return new T("Invalid " + Q + " `" + X + "` of value `" + String(J) + "` " + ("supplied to `" +
|
|
4688
|
+
return new T("Invalid " + Q + " `" + X + "` of value `" + String(J) + "` " + ("supplied to `" + B + "`, expected one of " + re + "."));
|
|
4680
4689
|
}
|
|
4681
|
-
return
|
|
4690
|
+
return S(O);
|
|
4682
4691
|
}
|
|
4683
4692
|
function b(_) {
|
|
4684
|
-
function O(W,
|
|
4693
|
+
function O(W, I, B, Q, X) {
|
|
4685
4694
|
if (typeof _ != "function")
|
|
4686
|
-
return new T("Property `" + X + "` of component `" +
|
|
4687
|
-
var J = W[
|
|
4695
|
+
return new T("Property `" + X + "` of component `" + B + "` has invalid PropType notation inside objectOf.");
|
|
4696
|
+
var J = W[I], ee = P(J);
|
|
4688
4697
|
if (ee !== "object")
|
|
4689
|
-
return new T("Invalid " + Q + " `" + X + "` of type " + ("`" + ee + "` supplied to `" +
|
|
4698
|
+
return new T("Invalid " + Q + " `" + X + "` of type " + ("`" + ee + "` supplied to `" + B + "`, expected an object."));
|
|
4690
4699
|
for (var re in J)
|
|
4691
4700
|
if (r(J, re)) {
|
|
4692
|
-
var te = _(J, re,
|
|
4701
|
+
var te = _(J, re, B, Q, X + "." + re, o);
|
|
4693
4702
|
if (te instanceof Error)
|
|
4694
4703
|
return te;
|
|
4695
4704
|
}
|
|
4696
4705
|
return null;
|
|
4697
4706
|
}
|
|
4698
|
-
return
|
|
4707
|
+
return S(O);
|
|
4699
4708
|
}
|
|
4700
4709
|
function k(_) {
|
|
4701
4710
|
if (!Array.isArray(_))
|
|
@@ -4707,9 +4716,9 @@ function _i() {
|
|
|
4707
4716
|
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + Z(W) + " at index " + O + "."
|
|
4708
4717
|
), i;
|
|
4709
4718
|
}
|
|
4710
|
-
function
|
|
4719
|
+
function I(B, Q, X, J, ee) {
|
|
4711
4720
|
for (var re = [], te = 0; te < _.length; te++) {
|
|
4712
|
-
var ye = _[te], L = ye(
|
|
4721
|
+
var ye = _[te], L = ye(B, Q, X, J, ee, o);
|
|
4713
4722
|
if (L == null)
|
|
4714
4723
|
return null;
|
|
4715
4724
|
L.data && r(L.data, "expectedType") && re.push(L.data.expectedType);
|
|
@@ -4717,60 +4726,60 @@ function _i() {
|
|
|
4717
4726
|
var be = re.length > 0 ? ", expected one of type [" + re.join(", ") + "]" : "";
|
|
4718
4727
|
return new T("Invalid " + J + " `" + ee + "` supplied to " + ("`" + X + "`" + be + "."));
|
|
4719
4728
|
}
|
|
4720
|
-
return
|
|
4729
|
+
return S(I);
|
|
4721
4730
|
}
|
|
4722
4731
|
function D() {
|
|
4723
|
-
function _(O, W,
|
|
4724
|
-
return
|
|
4732
|
+
function _(O, W, I, B, Q) {
|
|
4733
|
+
return V(O[W]) ? null : new T("Invalid " + B + " `" + Q + "` supplied to " + ("`" + I + "`, expected a ReactNode."));
|
|
4725
4734
|
}
|
|
4726
|
-
return
|
|
4735
|
+
return S(_);
|
|
4727
4736
|
}
|
|
4728
|
-
function R(_, O, W,
|
|
4737
|
+
function R(_, O, W, I, B) {
|
|
4729
4738
|
return new T(
|
|
4730
|
-
(_ || "React class") + ": " + O + " type `" + W + "." +
|
|
4739
|
+
(_ || "React class") + ": " + O + " type `" + W + "." + I + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + B + "`."
|
|
4731
4740
|
);
|
|
4732
4741
|
}
|
|
4733
4742
|
function U(_) {
|
|
4734
|
-
function O(W,
|
|
4735
|
-
var J = W[
|
|
4743
|
+
function O(W, I, B, Q, X) {
|
|
4744
|
+
var J = W[I], ee = P(J);
|
|
4736
4745
|
if (ee !== "object")
|
|
4737
|
-
return new T("Invalid " + Q + " `" + X + "` of type `" + ee + "` " + ("supplied to `" +
|
|
4746
|
+
return new T("Invalid " + Q + " `" + X + "` of type `" + ee + "` " + ("supplied to `" + B + "`, expected `object`."));
|
|
4738
4747
|
for (var re in _) {
|
|
4739
4748
|
var te = _[re];
|
|
4740
4749
|
if (typeof te != "function")
|
|
4741
|
-
return R(
|
|
4742
|
-
var ye = te(J, re,
|
|
4750
|
+
return R(B, Q, X, re, F(te));
|
|
4751
|
+
var ye = te(J, re, B, Q, X + "." + re, o);
|
|
4743
4752
|
if (ye)
|
|
4744
4753
|
return ye;
|
|
4745
4754
|
}
|
|
4746
4755
|
return null;
|
|
4747
4756
|
}
|
|
4748
|
-
return
|
|
4757
|
+
return S(O);
|
|
4749
4758
|
}
|
|
4750
4759
|
function $(_) {
|
|
4751
|
-
function O(W,
|
|
4752
|
-
var J = W[
|
|
4760
|
+
function O(W, I, B, Q, X) {
|
|
4761
|
+
var J = W[I], ee = P(J);
|
|
4753
4762
|
if (ee !== "object")
|
|
4754
|
-
return new T("Invalid " + Q + " `" + X + "` of type `" + ee + "` " + ("supplied to `" +
|
|
4755
|
-
var re = n({}, W[
|
|
4763
|
+
return new T("Invalid " + Q + " `" + X + "` of type `" + ee + "` " + ("supplied to `" + B + "`, expected `object`."));
|
|
4764
|
+
var re = n({}, W[I], _);
|
|
4756
4765
|
for (var te in re) {
|
|
4757
4766
|
var ye = _[te];
|
|
4758
4767
|
if (r(_, te) && typeof ye != "function")
|
|
4759
|
-
return R(
|
|
4768
|
+
return R(B, Q, X, te, F(ye));
|
|
4760
4769
|
if (!ye)
|
|
4761
4770
|
return new T(
|
|
4762
|
-
"Invalid " + Q + " `" + X + "` key `" + te + "` supplied to `" +
|
|
4771
|
+
"Invalid " + Q + " `" + X + "` key `" + te + "` supplied to `" + B + "`.\nBad object: " + JSON.stringify(W[I], null, " ") + `
|
|
4763
4772
|
Valid keys: ` + JSON.stringify(Object.keys(_), null, " ")
|
|
4764
4773
|
);
|
|
4765
|
-
var L = ye(J, te,
|
|
4774
|
+
var L = ye(J, te, B, Q, X + "." + te, o);
|
|
4766
4775
|
if (L)
|
|
4767
4776
|
return L;
|
|
4768
4777
|
}
|
|
4769
4778
|
return null;
|
|
4770
4779
|
}
|
|
4771
|
-
return
|
|
4780
|
+
return S(O);
|
|
4772
4781
|
}
|
|
4773
|
-
function
|
|
4782
|
+
function V(_) {
|
|
4774
4783
|
switch (typeof _) {
|
|
4775
4784
|
case "number":
|
|
4776
4785
|
case "string":
|
|
@@ -4780,20 +4789,20 @@ Valid keys: ` + JSON.stringify(Object.keys(_), null, " ")
|
|
|
4780
4789
|
return !_;
|
|
4781
4790
|
case "object":
|
|
4782
4791
|
if (Array.isArray(_))
|
|
4783
|
-
return _.every(
|
|
4792
|
+
return _.every(V);
|
|
4784
4793
|
if (_ === null || c(_))
|
|
4785
4794
|
return !0;
|
|
4786
4795
|
var O = p(_);
|
|
4787
4796
|
if (O) {
|
|
4788
|
-
var W = O.call(_),
|
|
4797
|
+
var W = O.call(_), I;
|
|
4789
4798
|
if (O !== _.entries) {
|
|
4790
|
-
for (; !(
|
|
4791
|
-
if (!
|
|
4799
|
+
for (; !(I = W.next()).done; )
|
|
4800
|
+
if (!V(I.value))
|
|
4792
4801
|
return !1;
|
|
4793
4802
|
} else
|
|
4794
|
-
for (; !(
|
|
4795
|
-
var
|
|
4796
|
-
if (
|
|
4803
|
+
for (; !(I = W.next()).done; ) {
|
|
4804
|
+
var B = I.value;
|
|
4805
|
+
if (B && !V(B[1]))
|
|
4797
4806
|
return !1;
|
|
4798
4807
|
}
|
|
4799
4808
|
} else
|
|
@@ -4810,7 +4819,7 @@ Valid keys: ` + JSON.stringify(Object.keys(_), null, " ")
|
|
|
4810
4819
|
var O = typeof _;
|
|
4811
4820
|
return Array.isArray(_) ? "array" : _ instanceof RegExp ? "object" : G(O, _) ? "symbol" : O;
|
|
4812
4821
|
}
|
|
4813
|
-
function
|
|
4822
|
+
function F(_) {
|
|
4814
4823
|
if (typeof _ > "u" || _ === null)
|
|
4815
4824
|
return "" + _;
|
|
4816
4825
|
var O = P(_);
|
|
@@ -4823,7 +4832,7 @@ Valid keys: ` + JSON.stringify(Object.keys(_), null, " ")
|
|
|
4823
4832
|
return O;
|
|
4824
4833
|
}
|
|
4825
4834
|
function Z(_) {
|
|
4826
|
-
var O =
|
|
4835
|
+
var O = F(_);
|
|
4827
4836
|
switch (O) {
|
|
4828
4837
|
case "array":
|
|
4829
4838
|
case "object":
|
|
@@ -4837,9 +4846,9 @@ Valid keys: ` + JSON.stringify(Object.keys(_), null, " ")
|
|
|
4837
4846
|
}
|
|
4838
4847
|
}
|
|
4839
4848
|
function K(_) {
|
|
4840
|
-
return !_.constructor || !_.constructor.name ?
|
|
4849
|
+
return !_.constructor || !_.constructor.name ? f : _.constructor.name;
|
|
4841
4850
|
}
|
|
4842
|
-
return
|
|
4851
|
+
return m.checkPropTypes = a, m.resetWarningCache = a.resetWarningCache, m.PropTypes = m, m;
|
|
4843
4852
|
}, Ft;
|
|
4844
4853
|
}
|
|
4845
4854
|
var It, An;
|
|
@@ -4852,12 +4861,12 @@ function ji() {
|
|
|
4852
4861
|
function o() {
|
|
4853
4862
|
}
|
|
4854
4863
|
return o.resetWarningCache = n, It = function() {
|
|
4855
|
-
function r(i, c, l,
|
|
4864
|
+
function r(i, c, l, x, h, p) {
|
|
4856
4865
|
if (p !== e) {
|
|
4857
|
-
var
|
|
4866
|
+
var f = new Error(
|
|
4858
4867
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
4859
4868
|
);
|
|
4860
|
-
throw
|
|
4869
|
+
throw f.name = "Invariant Violation", f;
|
|
4861
4870
|
}
|
|
4862
4871
|
}
|
|
4863
4872
|
r.isRequired = r;
|
|
@@ -4919,7 +4928,7 @@ function ki() {
|
|
|
4919
4928
|
}
|
|
4920
4929
|
return ft.exports = n, ft.exports.clsx = n, ft.exports;
|
|
4921
4930
|
}
|
|
4922
|
-
var
|
|
4931
|
+
var he = {}, Oe = {}, Dn;
|
|
4923
4932
|
function bt() {
|
|
4924
4933
|
if (Dn) return Oe;
|
|
4925
4934
|
Dn = 1, Object.defineProperty(Oe, "__esModule", {
|
|
@@ -4957,8 +4966,8 @@ function Ai() {
|
|
|
4957
4966
|
if (typeof window > "u") return "";
|
|
4958
4967
|
const i = (l = (c = window.document) == null ? void 0 : c.documentElement) == null ? void 0 : l.style;
|
|
4959
4968
|
if (!i || s in i) return "";
|
|
4960
|
-
for (let
|
|
4961
|
-
if (o(s, e[
|
|
4969
|
+
for (let x = 0; x < e.length; x++)
|
|
4970
|
+
if (o(s, e[x]) in i) return e[x];
|
|
4962
4971
|
return "";
|
|
4963
4972
|
}
|
|
4964
4973
|
function o(s, i) {
|
|
@@ -4977,22 +4986,22 @@ function Ai() {
|
|
|
4977
4986
|
}
|
|
4978
4987
|
var Mn;
|
|
4979
4988
|
function Xt() {
|
|
4980
|
-
if (Mn) return
|
|
4981
|
-
Mn = 1, Object.defineProperty(
|
|
4989
|
+
if (Mn) return he;
|
|
4990
|
+
Mn = 1, Object.defineProperty(he, "__esModule", {
|
|
4982
4991
|
value: !0
|
|
4983
|
-
}),
|
|
4992
|
+
}), he.addClassName = d, he.addEvent = i, he.addUserSelectStyles = E, he.createCSSTransform = m, he.createSVGTransform = j, he.getTouch = S, he.getTouchIdentifier = C, he.getTranslation = T, he.innerHeight = h, he.innerWidth = p, he.matchesSelector = a, he.matchesSelectorAndParentsTo = s, he.offsetXYFromParent = f, he.outerHeight = l, he.outerWidth = x, he.removeClassName = v, he.removeEvent = c, he.scheduleRemoveUserSelectStyles = y;
|
|
4984
4993
|
var e = bt(), n = o(Ai());
|
|
4985
4994
|
function o(u, b) {
|
|
4986
4995
|
if (typeof WeakMap == "function") var k = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap();
|
|
4987
4996
|
return (o = function(R, U) {
|
|
4988
4997
|
if (!U && R && R.__esModule) return R;
|
|
4989
|
-
var $,
|
|
4998
|
+
var $, V, G = { __proto__: null, default: R };
|
|
4990
4999
|
if (R === null || typeof R != "object" && typeof R != "function") return G;
|
|
4991
5000
|
if ($ = U ? D : k) {
|
|
4992
5001
|
if ($.has(R)) return $.get(R);
|
|
4993
5002
|
$.set(R, G);
|
|
4994
5003
|
}
|
|
4995
|
-
for (const P in R) P !== "default" && {}.hasOwnProperty.call(R, P) && ((
|
|
5004
|
+
for (const P in R) P !== "default" && {}.hasOwnProperty.call(R, P) && ((V = ($ = Object.defineProperty) && Object.getOwnPropertyDescriptor(R, P)) && (V.get || V.set) ? $(G, P, V) : G[P] = R[P]);
|
|
4996
5005
|
return G;
|
|
4997
5006
|
})(u, b);
|
|
4998
5007
|
}
|
|
@@ -5032,12 +5041,12 @@ function Xt() {
|
|
|
5032
5041
|
const k = u.ownerDocument.defaultView.getComputedStyle(u);
|
|
5033
5042
|
return b += (0, e.int)(k.borderTopWidth), b += (0, e.int)(k.borderBottomWidth), b;
|
|
5034
5043
|
}
|
|
5035
|
-
function
|
|
5044
|
+
function x(u) {
|
|
5036
5045
|
let b = u.clientWidth;
|
|
5037
5046
|
const k = u.ownerDocument.defaultView.getComputedStyle(u);
|
|
5038
5047
|
return b += (0, e.int)(k.borderLeftWidth), b += (0, e.int)(k.borderRightWidth), b;
|
|
5039
5048
|
}
|
|
5040
|
-
function
|
|
5049
|
+
function h(u) {
|
|
5041
5050
|
let b = u.clientHeight;
|
|
5042
5051
|
const k = u.ownerDocument.defaultView.getComputedStyle(u);
|
|
5043
5052
|
return b -= (0, e.int)(k.paddingTop), b -= (0, e.int)(k.paddingBottom), b;
|
|
@@ -5047,7 +5056,7 @@ function Xt() {
|
|
|
5047
5056
|
const k = u.ownerDocument.defaultView.getComputedStyle(u);
|
|
5048
5057
|
return b -= (0, e.int)(k.paddingLeft), b -= (0, e.int)(k.paddingRight), b;
|
|
5049
5058
|
}
|
|
5050
|
-
function
|
|
5059
|
+
function f(u, b, k) {
|
|
5051
5060
|
const R = b === b.ownerDocument.body ? {
|
|
5052
5061
|
left: 0,
|
|
5053
5062
|
top: 0
|
|
@@ -5057,7 +5066,7 @@ function Xt() {
|
|
|
5057
5066
|
y: $
|
|
5058
5067
|
};
|
|
5059
5068
|
}
|
|
5060
|
-
function
|
|
5069
|
+
function m(u, b) {
|
|
5061
5070
|
const k = T(u, b, "px");
|
|
5062
5071
|
return {
|
|
5063
5072
|
[(0, n.browserPrefixToKey)("transform", n.default)]: k
|
|
@@ -5072,12 +5081,12 @@ function Xt() {
|
|
|
5072
5081
|
y: R
|
|
5073
5082
|
} = u, U = `translate(${D}${k},${R}${k})`;
|
|
5074
5083
|
if (b) {
|
|
5075
|
-
const $ = `${typeof b.x == "string" ? b.x : b.x + k}`,
|
|
5076
|
-
U = `translate(${$}, ${
|
|
5084
|
+
const $ = `${typeof b.x == "string" ? b.x : b.x + k}`, V = `${typeof b.y == "string" ? b.y : b.y + k}`;
|
|
5085
|
+
U = `translate(${$}, ${V})` + U;
|
|
5077
5086
|
}
|
|
5078
5087
|
return U;
|
|
5079
5088
|
}
|
|
5080
|
-
function
|
|
5089
|
+
function S(u, b) {
|
|
5081
5090
|
return u.targetTouches && (0, e.findInArray)(u.targetTouches, (k) => b === k.identifier) || u.changedTouches && (0, e.findInArray)(u.changedTouches, (k) => b === k.identifier);
|
|
5082
5091
|
}
|
|
5083
5092
|
function C(u) {
|
|
@@ -5091,15 +5100,15 @@ function Xt() {
|
|
|
5091
5100
|
`, b.innerHTML += `.react-draggable-transparent-selection *::selection {all: inherit;}
|
|
5092
5101
|
`, u.getElementsByTagName("head")[0].appendChild(b)), u.body && d(u.body, "react-draggable-transparent-selection");
|
|
5093
5102
|
}
|
|
5094
|
-
function
|
|
5103
|
+
function y(u) {
|
|
5095
5104
|
window.requestAnimationFrame ? window.requestAnimationFrame(() => {
|
|
5096
|
-
|
|
5097
|
-
}) :
|
|
5105
|
+
w(u);
|
|
5106
|
+
}) : w(u);
|
|
5098
5107
|
}
|
|
5099
|
-
function
|
|
5108
|
+
function w(u) {
|
|
5100
5109
|
if (u)
|
|
5101
5110
|
try {
|
|
5102
|
-
if (u.body &&
|
|
5111
|
+
if (u.body && v(u.body, "react-draggable-transparent-selection"), u.selection)
|
|
5103
5112
|
u.selection.empty();
|
|
5104
5113
|
else {
|
|
5105
5114
|
const b = (u.defaultView || window).getSelection();
|
|
@@ -5111,10 +5120,10 @@ function Xt() {
|
|
|
5111
5120
|
function d(u, b) {
|
|
5112
5121
|
u.classList ? u.classList.add(b) : u.className.match(new RegExp(`(?:^|\\s)${b}(?!\\S)`)) || (u.className += ` ${b}`);
|
|
5113
5122
|
}
|
|
5114
|
-
function
|
|
5123
|
+
function v(u, b) {
|
|
5115
5124
|
u.classList ? u.classList.remove(b) : u.className = u.className.replace(new RegExp(`(?:^|\\s)${b}(?!\\S)`, "g"), "");
|
|
5116
5125
|
}
|
|
5117
|
-
return
|
|
5126
|
+
return he;
|
|
5118
5127
|
}
|
|
5119
5128
|
var we = {}, Nn;
|
|
5120
5129
|
function pr() {
|
|
@@ -5123,32 +5132,32 @@ function pr() {
|
|
|
5123
5132
|
value: !0
|
|
5124
5133
|
}), we.canDragX = a, we.canDragY = s, we.createCoreData = c, we.createDraggableData = l, we.getBoundPosition = o, we.getControlPosition = i, we.snapToGrid = r;
|
|
5125
5134
|
var e = bt(), n = Xt();
|
|
5126
|
-
function o(p,
|
|
5127
|
-
if (!p.props.bounds) return [
|
|
5135
|
+
function o(p, f, m) {
|
|
5136
|
+
if (!p.props.bounds) return [f, m];
|
|
5128
5137
|
let {
|
|
5129
5138
|
bounds: j
|
|
5130
5139
|
} = p.props;
|
|
5131
|
-
j = typeof j == "string" ? j :
|
|
5132
|
-
const T =
|
|
5140
|
+
j = typeof j == "string" ? j : x(j);
|
|
5141
|
+
const T = h(p);
|
|
5133
5142
|
if (typeof j == "string") {
|
|
5134
5143
|
const {
|
|
5135
|
-
ownerDocument:
|
|
5136
|
-
} = T, C =
|
|
5144
|
+
ownerDocument: S
|
|
5145
|
+
} = T, C = S.defaultView;
|
|
5137
5146
|
let E;
|
|
5138
5147
|
if (j === "parent" ? E = T.parentNode : E = T.getRootNode().querySelector(j), !(E instanceof C.HTMLElement))
|
|
5139
5148
|
throw new Error('Bounds selector "' + j + '" could not find an element.');
|
|
5140
|
-
const
|
|
5149
|
+
const y = E, w = C.getComputedStyle(T), d = C.getComputedStyle(y);
|
|
5141
5150
|
j = {
|
|
5142
|
-
left: -T.offsetLeft + (0, e.int)(d.paddingLeft) + (0, e.int)(
|
|
5143
|
-
top: -T.offsetTop + (0, e.int)(d.paddingTop) + (0, e.int)(
|
|
5144
|
-
right: (0, n.innerWidth)(
|
|
5145
|
-
bottom: (0, n.innerHeight)(
|
|
5151
|
+
left: -T.offsetLeft + (0, e.int)(d.paddingLeft) + (0, e.int)(w.marginLeft),
|
|
5152
|
+
top: -T.offsetTop + (0, e.int)(d.paddingTop) + (0, e.int)(w.marginTop),
|
|
5153
|
+
right: (0, n.innerWidth)(y) - (0, n.outerWidth)(T) - T.offsetLeft + (0, e.int)(d.paddingRight) - (0, e.int)(w.marginRight),
|
|
5154
|
+
bottom: (0, n.innerHeight)(y) - (0, n.outerHeight)(T) - T.offsetTop + (0, e.int)(d.paddingBottom) - (0, e.int)(w.marginBottom)
|
|
5146
5155
|
};
|
|
5147
5156
|
}
|
|
5148
|
-
return (0, e.isNum)(j.right) && (
|
|
5157
|
+
return (0, e.isNum)(j.right) && (f = Math.min(f, j.right)), (0, e.isNum)(j.bottom) && (m = Math.min(m, j.bottom)), (0, e.isNum)(j.left) && (f = Math.max(f, j.left)), (0, e.isNum)(j.top) && (m = Math.max(m, j.top)), [f, m];
|
|
5149
5158
|
}
|
|
5150
|
-
function r(p,
|
|
5151
|
-
const j = Math.round(
|
|
5159
|
+
function r(p, f, m) {
|
|
5160
|
+
const j = Math.round(f / p[0]) * p[0], T = Math.round(m / p[1]) * p[1];
|
|
5152
5161
|
return [j, T];
|
|
5153
5162
|
}
|
|
5154
5163
|
function a(p) {
|
|
@@ -5157,45 +5166,45 @@ function pr() {
|
|
|
5157
5166
|
function s(p) {
|
|
5158
5167
|
return p.props.axis === "both" || p.props.axis === "y";
|
|
5159
5168
|
}
|
|
5160
|
-
function i(p,
|
|
5161
|
-
const j = typeof
|
|
5162
|
-
if (typeof
|
|
5163
|
-
const T =
|
|
5164
|
-
return (0, n.offsetXYFromParent)(j || p,
|
|
5169
|
+
function i(p, f, m) {
|
|
5170
|
+
const j = typeof f == "number" ? (0, n.getTouch)(p, f) : null;
|
|
5171
|
+
if (typeof f == "number" && !j) return null;
|
|
5172
|
+
const T = h(m), S = m.props.offsetParent || T.offsetParent || T.ownerDocument.body;
|
|
5173
|
+
return (0, n.offsetXYFromParent)(j || p, S, m.props.scale);
|
|
5165
5174
|
}
|
|
5166
|
-
function c(p,
|
|
5167
|
-
const j = !(0, e.isNum)(p.lastX), T =
|
|
5175
|
+
function c(p, f, m) {
|
|
5176
|
+
const j = !(0, e.isNum)(p.lastX), T = h(p);
|
|
5168
5177
|
return j ? {
|
|
5169
5178
|
node: T,
|
|
5170
5179
|
deltaX: 0,
|
|
5171
5180
|
deltaY: 0,
|
|
5172
|
-
lastX:
|
|
5173
|
-
lastY:
|
|
5174
|
-
x:
|
|
5175
|
-
y:
|
|
5181
|
+
lastX: f,
|
|
5182
|
+
lastY: m,
|
|
5183
|
+
x: f,
|
|
5184
|
+
y: m
|
|
5176
5185
|
} : {
|
|
5177
5186
|
node: T,
|
|
5178
|
-
deltaX:
|
|
5179
|
-
deltaY:
|
|
5187
|
+
deltaX: f - p.lastX,
|
|
5188
|
+
deltaY: m - p.lastY,
|
|
5180
5189
|
lastX: p.lastX,
|
|
5181
5190
|
lastY: p.lastY,
|
|
5182
|
-
x:
|
|
5183
|
-
y:
|
|
5191
|
+
x: f,
|
|
5192
|
+
y: m
|
|
5184
5193
|
};
|
|
5185
5194
|
}
|
|
5186
|
-
function l(p,
|
|
5187
|
-
const
|
|
5195
|
+
function l(p, f) {
|
|
5196
|
+
const m = p.props.scale;
|
|
5188
5197
|
return {
|
|
5189
|
-
node:
|
|
5190
|
-
x: p.state.x +
|
|
5191
|
-
y: p.state.y +
|
|
5192
|
-
deltaX:
|
|
5193
|
-
deltaY:
|
|
5198
|
+
node: f.node,
|
|
5199
|
+
x: p.state.x + f.deltaX / m,
|
|
5200
|
+
y: p.state.y + f.deltaY / m,
|
|
5201
|
+
deltaX: f.deltaX / m,
|
|
5202
|
+
deltaY: f.deltaY / m,
|
|
5194
5203
|
lastX: p.state.x,
|
|
5195
5204
|
lastY: p.state.y
|
|
5196
5205
|
};
|
|
5197
5206
|
}
|
|
5198
|
-
function
|
|
5207
|
+
function x(p) {
|
|
5199
5208
|
return {
|
|
5200
5209
|
left: p.left,
|
|
5201
5210
|
top: p.top,
|
|
@@ -5203,16 +5212,16 @@ function pr() {
|
|
|
5203
5212
|
bottom: p.bottom
|
|
5204
5213
|
};
|
|
5205
5214
|
}
|
|
5206
|
-
function
|
|
5207
|
-
const
|
|
5208
|
-
if (!
|
|
5215
|
+
function h(p) {
|
|
5216
|
+
const f = p.findDOMNode();
|
|
5217
|
+
if (!f)
|
|
5209
5218
|
throw new Error("<DraggableCore>: Unmounted during event!");
|
|
5210
|
-
return
|
|
5219
|
+
return f;
|
|
5211
5220
|
}
|
|
5212
5221
|
return we;
|
|
5213
5222
|
}
|
|
5214
5223
|
var tt = {}, gt = {}, Fn;
|
|
5215
|
-
function
|
|
5224
|
+
function xr() {
|
|
5216
5225
|
if (Fn) return gt;
|
|
5217
5226
|
Fn = 1, Object.defineProperty(gt, "__esModule", {
|
|
5218
5227
|
value: !0
|
|
@@ -5227,42 +5236,42 @@ function Ri() {
|
|
|
5227
5236
|
In = 1, Object.defineProperty(tt, "__esModule", {
|
|
5228
5237
|
value: !0
|
|
5229
5238
|
}), tt.default = void 0;
|
|
5230
|
-
var e = l(ot), n = c(/* @__PURE__ */ gr()), o = c(Yn), r = Xt(), a = pr(), s = bt(), i = c(
|
|
5239
|
+
var e = l(ot), n = c(/* @__PURE__ */ gr()), o = c(Yn), r = Xt(), a = pr(), s = bt(), i = c(xr());
|
|
5231
5240
|
function c(T) {
|
|
5232
5241
|
return T && T.__esModule ? T : { default: T };
|
|
5233
5242
|
}
|
|
5234
|
-
function l(T,
|
|
5243
|
+
function l(T, S) {
|
|
5235
5244
|
if (typeof WeakMap == "function") var C = /* @__PURE__ */ new WeakMap(), E = /* @__PURE__ */ new WeakMap();
|
|
5236
|
-
return (l = function(
|
|
5237
|
-
if (!
|
|
5238
|
-
var d,
|
|
5239
|
-
if (
|
|
5240
|
-
if (d =
|
|
5241
|
-
if (d.has(
|
|
5242
|
-
d.set(
|
|
5245
|
+
return (l = function(y, w) {
|
|
5246
|
+
if (!w && y && y.__esModule) return y;
|
|
5247
|
+
var d, v, u = { __proto__: null, default: y };
|
|
5248
|
+
if (y === null || typeof y != "object" && typeof y != "function") return u;
|
|
5249
|
+
if (d = w ? E : C) {
|
|
5250
|
+
if (d.has(y)) return d.get(y);
|
|
5251
|
+
d.set(y, u);
|
|
5243
5252
|
}
|
|
5244
|
-
for (const b in
|
|
5253
|
+
for (const b in y) b !== "default" && {}.hasOwnProperty.call(y, b) && ((v = (d = Object.defineProperty) && Object.getOwnPropertyDescriptor(y, b)) && (v.get || v.set) ? d(u, b, v) : u[b] = y[b]);
|
|
5245
5254
|
return u;
|
|
5246
|
-
})(T,
|
|
5255
|
+
})(T, S);
|
|
5247
5256
|
}
|
|
5248
|
-
function
|
|
5249
|
-
return (
|
|
5257
|
+
function x(T, S, C) {
|
|
5258
|
+
return (S = h(S)) in T ? Object.defineProperty(T, S, { value: C, enumerable: !0, configurable: !0, writable: !0 }) : T[S] = C, T;
|
|
5250
5259
|
}
|
|
5251
|
-
function
|
|
5252
|
-
var
|
|
5253
|
-
return typeof
|
|
5260
|
+
function h(T) {
|
|
5261
|
+
var S = p(T, "string");
|
|
5262
|
+
return typeof S == "symbol" ? S : S + "";
|
|
5254
5263
|
}
|
|
5255
|
-
function p(T,
|
|
5264
|
+
function p(T, S) {
|
|
5256
5265
|
if (typeof T != "object" || !T) return T;
|
|
5257
5266
|
var C = T[Symbol.toPrimitive];
|
|
5258
5267
|
if (C !== void 0) {
|
|
5259
|
-
var E = C.call(T,
|
|
5268
|
+
var E = C.call(T, S);
|
|
5260
5269
|
if (typeof E != "object") return E;
|
|
5261
5270
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
5262
5271
|
}
|
|
5263
|
-
return (
|
|
5272
|
+
return (S === "string" ? String : Number)(T);
|
|
5264
5273
|
}
|
|
5265
|
-
const
|
|
5274
|
+
const f = {
|
|
5266
5275
|
touch: {
|
|
5267
5276
|
start: "touchstart",
|
|
5268
5277
|
move: "touchmove",
|
|
@@ -5274,42 +5283,42 @@ function Ri() {
|
|
|
5274
5283
|
stop: "mouseup"
|
|
5275
5284
|
}
|
|
5276
5285
|
};
|
|
5277
|
-
let
|
|
5286
|
+
let m = f.mouse, j = class extends e.Component {
|
|
5278
5287
|
constructor() {
|
|
5279
|
-
super(...arguments),
|
|
5280
|
-
if (this.props.onMouseDown(
|
|
5288
|
+
super(...arguments), x(this, "dragging", !1), x(this, "lastX", NaN), x(this, "lastY", NaN), x(this, "touchIdentifier", null), x(this, "mounted", !1), x(this, "handleDragStart", (S) => {
|
|
5289
|
+
if (this.props.onMouseDown(S), !this.props.allowAnyClick && typeof S.button == "number" && S.button !== 0) return !1;
|
|
5281
5290
|
const C = this.findDOMNode();
|
|
5282
5291
|
if (!C || !C.ownerDocument || !C.ownerDocument.body)
|
|
5283
5292
|
throw new Error("<DraggableCore> not mounted on DragStart!");
|
|
5284
5293
|
const {
|
|
5285
5294
|
ownerDocument: E
|
|
5286
5295
|
} = C;
|
|
5287
|
-
if (this.props.disabled || !(
|
|
5296
|
+
if (this.props.disabled || !(S.target instanceof E.defaultView.Node) || this.props.handle && !(0, r.matchesSelectorAndParentsTo)(S.target, this.props.handle, C) || this.props.cancel && (0, r.matchesSelectorAndParentsTo)(S.target, this.props.cancel, C))
|
|
5288
5297
|
return;
|
|
5289
|
-
|
|
5290
|
-
const
|
|
5291
|
-
this.touchIdentifier =
|
|
5292
|
-
const
|
|
5293
|
-
if (
|
|
5298
|
+
S.type === "touchstart" && !this.props.allowMobileScroll && S.preventDefault();
|
|
5299
|
+
const y = (0, r.getTouchIdentifier)(S);
|
|
5300
|
+
this.touchIdentifier = y;
|
|
5301
|
+
const w = (0, a.getControlPosition)(S, y, this);
|
|
5302
|
+
if (w == null) return;
|
|
5294
5303
|
const {
|
|
5295
5304
|
x: d,
|
|
5296
|
-
y
|
|
5297
|
-
} =
|
|
5298
|
-
(0, i.default)("DraggableCore: handleDragStart: %j", u), (0, i.default)("calling", this.props.onStart), !(this.props.onStart(
|
|
5299
|
-
}),
|
|
5300
|
-
const C = (0, a.getControlPosition)(
|
|
5305
|
+
y: v
|
|
5306
|
+
} = w, u = (0, a.createCoreData)(this, d, v);
|
|
5307
|
+
(0, i.default)("DraggableCore: handleDragStart: %j", u), (0, i.default)("calling", this.props.onStart), !(this.props.onStart(S, u) === !1 || this.mounted === !1) && (this.props.enableUserSelectHack && (0, r.addUserSelectStyles)(E), this.dragging = !0, this.lastX = d, this.lastY = v, (0, r.addEvent)(E, m.move, this.handleDrag), (0, r.addEvent)(E, m.stop, this.handleDragStop));
|
|
5308
|
+
}), x(this, "handleDrag", (S) => {
|
|
5309
|
+
const C = (0, a.getControlPosition)(S, this.touchIdentifier, this);
|
|
5301
5310
|
if (C == null) return;
|
|
5302
5311
|
let {
|
|
5303
5312
|
x: E,
|
|
5304
|
-
y
|
|
5313
|
+
y
|
|
5305
5314
|
} = C;
|
|
5306
5315
|
if (Array.isArray(this.props.grid)) {
|
|
5307
|
-
let
|
|
5308
|
-
if ([
|
|
5309
|
-
E = this.lastX +
|
|
5316
|
+
let v = E - this.lastX, u = y - this.lastY;
|
|
5317
|
+
if ([v, u] = (0, a.snapToGrid)(this.props.grid, v, u), !v && !u) return;
|
|
5318
|
+
E = this.lastX + v, y = this.lastY + u;
|
|
5310
5319
|
}
|
|
5311
|
-
const
|
|
5312
|
-
if ((0, i.default)("DraggableCore: handleDrag: %j",
|
|
5320
|
+
const w = (0, a.createCoreData)(this, E, y);
|
|
5321
|
+
if ((0, i.default)("DraggableCore: handleDrag: %j", w), this.props.onDrag(S, w) === !1 || this.mounted === !1) {
|
|
5313
5322
|
try {
|
|
5314
5323
|
this.handleDragStop(new MouseEvent("mouseup"));
|
|
5315
5324
|
} catch {
|
|
@@ -5318,40 +5327,40 @@ function Ri() {
|
|
|
5318
5327
|
}
|
|
5319
5328
|
return;
|
|
5320
5329
|
}
|
|
5321
|
-
this.lastX = E, this.lastY =
|
|
5322
|
-
}),
|
|
5330
|
+
this.lastX = E, this.lastY = y;
|
|
5331
|
+
}), x(this, "handleDragStop", (S) => {
|
|
5323
5332
|
if (!this.dragging) return;
|
|
5324
|
-
const C = (0, a.getControlPosition)(
|
|
5333
|
+
const C = (0, a.getControlPosition)(S, this.touchIdentifier, this);
|
|
5325
5334
|
if (C == null) return;
|
|
5326
5335
|
let {
|
|
5327
5336
|
x: E,
|
|
5328
|
-
y
|
|
5337
|
+
y
|
|
5329
5338
|
} = C;
|
|
5330
5339
|
if (Array.isArray(this.props.grid)) {
|
|
5331
|
-
let u = E - this.lastX || 0, b =
|
|
5332
|
-
[u, b] = (0, a.snapToGrid)(this.props.grid, u, b), E = this.lastX + u,
|
|
5340
|
+
let u = E - this.lastX || 0, b = y - this.lastY || 0;
|
|
5341
|
+
[u, b] = (0, a.snapToGrid)(this.props.grid, u, b), E = this.lastX + u, y = this.lastY + b;
|
|
5333
5342
|
}
|
|
5334
|
-
const
|
|
5335
|
-
if (this.props.onStop(
|
|
5336
|
-
const
|
|
5337
|
-
|
|
5338
|
-
}),
|
|
5343
|
+
const w = (0, a.createCoreData)(this, E, y);
|
|
5344
|
+
if (this.props.onStop(S, w) === !1 || this.mounted === !1) return !1;
|
|
5345
|
+
const v = this.findDOMNode();
|
|
5346
|
+
v && this.props.enableUserSelectHack && (0, r.scheduleRemoveUserSelectStyles)(v.ownerDocument), (0, i.default)("DraggableCore: handleDragStop: %j", w), this.dragging = !1, this.lastX = NaN, this.lastY = NaN, v && ((0, i.default)("DraggableCore: Removing handlers"), (0, r.removeEvent)(v.ownerDocument, m.move, this.handleDrag), (0, r.removeEvent)(v.ownerDocument, m.stop, this.handleDragStop));
|
|
5347
|
+
}), x(this, "onMouseDown", (S) => (m = f.mouse, this.handleDragStart(S))), x(this, "onMouseUp", (S) => (m = f.mouse, this.handleDragStop(S))), x(this, "onTouchStart", (S) => (m = f.touch, this.handleDragStart(S))), x(this, "onTouchEnd", (S) => (m = f.touch, this.handleDragStop(S)));
|
|
5339
5348
|
}
|
|
5340
5349
|
componentDidMount() {
|
|
5341
5350
|
this.mounted = !0;
|
|
5342
|
-
const
|
|
5343
|
-
|
|
5351
|
+
const S = this.findDOMNode();
|
|
5352
|
+
S && (0, r.addEvent)(S, f.touch.start, this.onTouchStart, {
|
|
5344
5353
|
passive: !1
|
|
5345
5354
|
});
|
|
5346
5355
|
}
|
|
5347
5356
|
componentWillUnmount() {
|
|
5348
5357
|
this.mounted = !1;
|
|
5349
|
-
const
|
|
5350
|
-
if (
|
|
5358
|
+
const S = this.findDOMNode();
|
|
5359
|
+
if (S) {
|
|
5351
5360
|
const {
|
|
5352
5361
|
ownerDocument: C
|
|
5353
|
-
} =
|
|
5354
|
-
(0, r.removeEvent)(C,
|
|
5362
|
+
} = S;
|
|
5363
|
+
(0, r.removeEvent)(C, f.mouse.move, this.handleDrag), (0, r.removeEvent)(C, f.touch.move, this.handleDrag), (0, r.removeEvent)(C, f.mouse.stop, this.handleDragStop), (0, r.removeEvent)(C, f.touch.stop, this.handleDragStop), (0, r.removeEvent)(S, f.touch.start, this.onTouchStart, {
|
|
5355
5364
|
passive: !1
|
|
5356
5365
|
}), this.props.enableUserSelectHack && (0, r.scheduleRemoveUserSelectStyles)(C);
|
|
5357
5366
|
}
|
|
@@ -5359,8 +5368,8 @@ function Ri() {
|
|
|
5359
5368
|
// React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
|
|
5360
5369
|
// the underlying DOM node ourselves. See the README for more information.
|
|
5361
5370
|
findDOMNode() {
|
|
5362
|
-
var
|
|
5363
|
-
return (
|
|
5371
|
+
var S, C, E;
|
|
5372
|
+
return (S = this.props) != null && S.nodeRef ? (E = (C = this.props) == null ? void 0 : C.nodeRef) == null ? void 0 : E.current : o.default.findDOMNode(this);
|
|
5364
5373
|
}
|
|
5365
5374
|
render() {
|
|
5366
5375
|
return /* @__PURE__ */ e.cloneElement(e.Children.only(this.props.children), {
|
|
@@ -5375,7 +5384,7 @@ function Ri() {
|
|
|
5375
5384
|
});
|
|
5376
5385
|
}
|
|
5377
5386
|
};
|
|
5378
|
-
return tt.default = j,
|
|
5387
|
+
return tt.default = j, x(j, "displayName", "DraggableCore"), x(j, "propTypes", {
|
|
5379
5388
|
/**
|
|
5380
5389
|
* `allowAnyClick` allows dragging using any mouse button.
|
|
5381
5390
|
* By default, we only accept the left button.
|
|
@@ -5407,8 +5416,8 @@ function Ri() {
|
|
|
5407
5416
|
* `offsetParent`, if set, uses the passed DOM node to compute drag offsets
|
|
5408
5417
|
* instead of using the parent node.
|
|
5409
5418
|
*/
|
|
5410
|
-
offsetParent: function(T,
|
|
5411
|
-
if (T[
|
|
5419
|
+
offsetParent: function(T, S) {
|
|
5420
|
+
if (T[S] && T[S].nodeType !== 1)
|
|
5412
5421
|
throw new Error("Draggable's offsetParent must be a DOM Node.");
|
|
5413
5422
|
},
|
|
5414
5423
|
/**
|
|
@@ -5505,7 +5514,7 @@ function Ri() {
|
|
|
5505
5514
|
className: s.dontSetMe,
|
|
5506
5515
|
style: s.dontSetMe,
|
|
5507
5516
|
transform: s.dontSetMe
|
|
5508
|
-
}),
|
|
5517
|
+
}), x(j, "defaultProps", {
|
|
5509
5518
|
allowAnyClick: !1,
|
|
5510
5519
|
// by default only accept left click
|
|
5511
5520
|
allowMobileScroll: !1,
|
|
@@ -5533,17 +5542,17 @@ function Oi() {
|
|
|
5533
5542
|
return l.default;
|
|
5534
5543
|
}
|
|
5535
5544
|
}), e.default = void 0;
|
|
5536
|
-
var n = p(ot), o =
|
|
5537
|
-
function
|
|
5545
|
+
var n = p(ot), o = h(/* @__PURE__ */ gr()), r = h(Yn), a = ki(), s = Xt(), i = pr(), c = bt(), l = h(Ri()), x = h(xr());
|
|
5546
|
+
function h(C) {
|
|
5538
5547
|
return C && C.__esModule ? C : { default: C };
|
|
5539
5548
|
}
|
|
5540
5549
|
function p(C, E) {
|
|
5541
|
-
if (typeof WeakMap == "function") var
|
|
5542
|
-
return (p = function(d,
|
|
5543
|
-
if (!
|
|
5550
|
+
if (typeof WeakMap == "function") var y = /* @__PURE__ */ new WeakMap(), w = /* @__PURE__ */ new WeakMap();
|
|
5551
|
+
return (p = function(d, v) {
|
|
5552
|
+
if (!v && d && d.__esModule) return d;
|
|
5544
5553
|
var u, b, k = { __proto__: null, default: d };
|
|
5545
5554
|
if (d === null || typeof d != "object" && typeof d != "function") return k;
|
|
5546
|
-
if (u =
|
|
5555
|
+
if (u = v ? w : y) {
|
|
5547
5556
|
if (u.has(d)) return u.get(d);
|
|
5548
5557
|
u.set(d, k);
|
|
5549
5558
|
}
|
|
@@ -5551,17 +5560,17 @@ function Oi() {
|
|
|
5551
5560
|
return k;
|
|
5552
5561
|
})(C, E);
|
|
5553
5562
|
}
|
|
5554
|
-
function
|
|
5555
|
-
return
|
|
5563
|
+
function f() {
|
|
5564
|
+
return f = Object.assign ? Object.assign.bind() : function(C) {
|
|
5556
5565
|
for (var E = 1; E < arguments.length; E++) {
|
|
5557
|
-
var
|
|
5558
|
-
for (var
|
|
5566
|
+
var y = arguments[E];
|
|
5567
|
+
for (var w in y) ({}).hasOwnProperty.call(y, w) && (C[w] = y[w]);
|
|
5559
5568
|
}
|
|
5560
5569
|
return C;
|
|
5561
|
-
},
|
|
5570
|
+
}, f.apply(null, arguments);
|
|
5562
5571
|
}
|
|
5563
|
-
function
|
|
5564
|
-
return (E = j(E)) in C ? Object.defineProperty(C, E, { value:
|
|
5572
|
+
function m(C, E, y) {
|
|
5573
|
+
return (E = j(E)) in C ? Object.defineProperty(C, E, { value: y, enumerable: !0, configurable: !0, writable: !0 }) : C[E] = y, C;
|
|
5565
5574
|
}
|
|
5566
5575
|
function j(C) {
|
|
5567
5576
|
var E = T(C, "string");
|
|
@@ -5569,45 +5578,45 @@ function Oi() {
|
|
|
5569
5578
|
}
|
|
5570
5579
|
function T(C, E) {
|
|
5571
5580
|
if (typeof C != "object" || !C) return C;
|
|
5572
|
-
var
|
|
5573
|
-
if (
|
|
5574
|
-
var
|
|
5575
|
-
if (typeof
|
|
5581
|
+
var y = C[Symbol.toPrimitive];
|
|
5582
|
+
if (y !== void 0) {
|
|
5583
|
+
var w = y.call(C, E);
|
|
5584
|
+
if (typeof w != "object") return w;
|
|
5576
5585
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
5577
5586
|
}
|
|
5578
5587
|
return (E === "string" ? String : Number)(C);
|
|
5579
5588
|
}
|
|
5580
|
-
class
|
|
5589
|
+
class S extends n.Component {
|
|
5581
5590
|
// React 16.3+
|
|
5582
5591
|
// Arity (props, state)
|
|
5583
|
-
static getDerivedStateFromProps(E,
|
|
5592
|
+
static getDerivedStateFromProps(E, y) {
|
|
5584
5593
|
let {
|
|
5585
|
-
position:
|
|
5594
|
+
position: w
|
|
5586
5595
|
} = E, {
|
|
5587
5596
|
prevPropsPosition: d
|
|
5588
|
-
} =
|
|
5589
|
-
return
|
|
5590
|
-
position:
|
|
5597
|
+
} = y;
|
|
5598
|
+
return w && (!d || w.x !== d.x || w.y !== d.y) ? ((0, x.default)("Draggable: getDerivedStateFromProps %j", {
|
|
5599
|
+
position: w,
|
|
5591
5600
|
prevPropsPosition: d
|
|
5592
5601
|
}), {
|
|
5593
|
-
x:
|
|
5594
|
-
y:
|
|
5602
|
+
x: w.x,
|
|
5603
|
+
y: w.y,
|
|
5595
5604
|
prevPropsPosition: {
|
|
5596
|
-
...
|
|
5605
|
+
...w
|
|
5597
5606
|
}
|
|
5598
5607
|
}) : null;
|
|
5599
5608
|
}
|
|
5600
5609
|
constructor(E) {
|
|
5601
|
-
super(E),
|
|
5602
|
-
if ((0,
|
|
5610
|
+
super(E), m(this, "onDragStart", (y, w) => {
|
|
5611
|
+
if ((0, x.default)("Draggable: onDragStart: %j", w), this.props.onStart(y, (0, i.createDraggableData)(this, w)) === !1) return !1;
|
|
5603
5612
|
this.setState({
|
|
5604
5613
|
dragging: !0,
|
|
5605
5614
|
dragged: !0
|
|
5606
5615
|
});
|
|
5607
|
-
}),
|
|
5616
|
+
}), m(this, "onDrag", (y, w) => {
|
|
5608
5617
|
if (!this.state.dragging) return !1;
|
|
5609
|
-
(0,
|
|
5610
|
-
const d = (0, i.createDraggableData)(this,
|
|
5618
|
+
(0, x.default)("Draggable: onDrag: %j", w);
|
|
5619
|
+
const d = (0, i.createDraggableData)(this, w), v = {
|
|
5611
5620
|
x: d.x,
|
|
5612
5621
|
y: d.y,
|
|
5613
5622
|
slackX: 0,
|
|
@@ -5617,17 +5626,17 @@ function Oi() {
|
|
|
5617
5626
|
const {
|
|
5618
5627
|
x: b,
|
|
5619
5628
|
y: k
|
|
5620
|
-
} =
|
|
5621
|
-
|
|
5622
|
-
const [D, R] = (0, i.getBoundPosition)(this,
|
|
5623
|
-
|
|
5629
|
+
} = v;
|
|
5630
|
+
v.x += this.state.slackX, v.y += this.state.slackY;
|
|
5631
|
+
const [D, R] = (0, i.getBoundPosition)(this, v.x, v.y);
|
|
5632
|
+
v.x = D, v.y = R, v.slackX = this.state.slackX + (b - v.x), v.slackY = this.state.slackY + (k - v.y), d.x = v.x, d.y = v.y, d.deltaX = v.x - this.state.x, d.deltaY = v.y - this.state.y;
|
|
5624
5633
|
}
|
|
5625
|
-
if (this.props.onDrag(
|
|
5626
|
-
this.setState(
|
|
5627
|
-
}),
|
|
5628
|
-
if (!this.state.dragging || this.props.onStop(
|
|
5629
|
-
(0,
|
|
5630
|
-
const
|
|
5634
|
+
if (this.props.onDrag(y, d) === !1) return !1;
|
|
5635
|
+
this.setState(v);
|
|
5636
|
+
}), m(this, "onDragStop", (y, w) => {
|
|
5637
|
+
if (!this.state.dragging || this.props.onStop(y, (0, i.createDraggableData)(this, w)) === !1) return !1;
|
|
5638
|
+
(0, x.default)("Draggable: onDragStop: %j", w);
|
|
5639
|
+
const v = {
|
|
5631
5640
|
dragging: !1,
|
|
5632
5641
|
slackX: 0,
|
|
5633
5642
|
slackY: 0
|
|
@@ -5637,9 +5646,9 @@ function Oi() {
|
|
|
5637
5646
|
x: b,
|
|
5638
5647
|
y: k
|
|
5639
5648
|
} = this.props.position;
|
|
5640
|
-
|
|
5649
|
+
v.x = b, v.y = k;
|
|
5641
5650
|
}
|
|
5642
|
-
this.setState(
|
|
5651
|
+
this.setState(v);
|
|
5643
5652
|
}), this.state = {
|
|
5644
5653
|
// Whether or not we are currently dragging.
|
|
5645
5654
|
dragging: !1,
|
|
@@ -5671,16 +5680,16 @@ function Oi() {
|
|
|
5671
5680
|
// React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
|
|
5672
5681
|
// the underlying DOM node ourselves. See the README for more information.
|
|
5673
5682
|
findDOMNode() {
|
|
5674
|
-
var E,
|
|
5675
|
-
return ((
|
|
5683
|
+
var E, y;
|
|
5684
|
+
return ((y = (E = this.props) == null ? void 0 : E.nodeRef) == null ? void 0 : y.current) ?? r.default.findDOMNode(this);
|
|
5676
5685
|
}
|
|
5677
5686
|
render() {
|
|
5678
5687
|
const {
|
|
5679
5688
|
axis: E,
|
|
5680
|
-
bounds:
|
|
5681
|
-
children:
|
|
5689
|
+
bounds: y,
|
|
5690
|
+
children: w,
|
|
5682
5691
|
defaultPosition: d,
|
|
5683
|
-
defaultClassName:
|
|
5692
|
+
defaultClassName: v,
|
|
5684
5693
|
defaultClassNameDragging: u,
|
|
5685
5694
|
defaultClassNameDragged: b,
|
|
5686
5695
|
position: k,
|
|
@@ -5688,33 +5697,33 @@ function Oi() {
|
|
|
5688
5697
|
scale: R,
|
|
5689
5698
|
...U
|
|
5690
5699
|
} = this.props;
|
|
5691
|
-
let $ = {},
|
|
5692
|
-
const P = !!!k || this.state.dragging,
|
|
5700
|
+
let $ = {}, V = null;
|
|
5701
|
+
const P = !!!k || this.state.dragging, F = k || d, Z = {
|
|
5693
5702
|
// Set left if horizontal drag is enabled
|
|
5694
|
-
x: (0, i.canDragX)(this) && P ? this.state.x :
|
|
5703
|
+
x: (0, i.canDragX)(this) && P ? this.state.x : F.x,
|
|
5695
5704
|
// Set top if vertical drag is enabled
|
|
5696
|
-
y: (0, i.canDragY)(this) && P ? this.state.y :
|
|
5705
|
+
y: (0, i.canDragY)(this) && P ? this.state.y : F.y
|
|
5697
5706
|
};
|
|
5698
|
-
this.state.isElementSVG ?
|
|
5699
|
-
const K = (0, a.clsx)(
|
|
5707
|
+
this.state.isElementSVG ? V = (0, s.createSVGTransform)(Z, D) : $ = (0, s.createCSSTransform)(Z, D);
|
|
5708
|
+
const K = (0, a.clsx)(w.props.className || "", v, {
|
|
5700
5709
|
[u]: this.state.dragging,
|
|
5701
5710
|
[b]: this.state.dragged
|
|
5702
5711
|
});
|
|
5703
|
-
return /* @__PURE__ */ n.createElement(l.default,
|
|
5712
|
+
return /* @__PURE__ */ n.createElement(l.default, f({}, U, {
|
|
5704
5713
|
onStart: this.onDragStart,
|
|
5705
5714
|
onDrag: this.onDrag,
|
|
5706
5715
|
onStop: this.onDragStop
|
|
5707
|
-
}), /* @__PURE__ */ n.cloneElement(n.Children.only(
|
|
5716
|
+
}), /* @__PURE__ */ n.cloneElement(n.Children.only(w), {
|
|
5708
5717
|
className: K,
|
|
5709
5718
|
style: {
|
|
5710
|
-
...
|
|
5719
|
+
...w.props.style,
|
|
5711
5720
|
...$
|
|
5712
5721
|
},
|
|
5713
|
-
transform:
|
|
5722
|
+
transform: V
|
|
5714
5723
|
}));
|
|
5715
5724
|
}
|
|
5716
5725
|
}
|
|
5717
|
-
e.default =
|
|
5726
|
+
e.default = S, m(S, "displayName", "Draggable"), m(S, "propTypes", {
|
|
5718
5727
|
// Accepts all props <DraggableCore> accepts.
|
|
5719
5728
|
...l.default.propTypes,
|
|
5720
5729
|
/**
|
|
@@ -5821,7 +5830,7 @@ function Oi() {
|
|
|
5821
5830
|
className: c.dontSetMe,
|
|
5822
5831
|
style: c.dontSetMe,
|
|
5823
5832
|
transform: c.dontSetMe
|
|
5824
|
-
}),
|
|
5833
|
+
}), m(S, "defaultProps", {
|
|
5825
5834
|
...l.default.defaultProps,
|
|
5826
5835
|
axis: "both",
|
|
5827
5836
|
bounds: !1,
|
|
@@ -5855,12 +5864,12 @@ const Mi = /* @__PURE__ */ eo(Li), Ni = ({ children: e, usePopover: n, ...o }) =
|
|
|
5855
5864
|
x: 0,
|
|
5856
5865
|
y: 250,
|
|
5857
5866
|
maxY: window.innerHeight - 200
|
|
5858
|
-
}), [s, i] = H(!1), [c, l] = H(!1),
|
|
5867
|
+
}), [s, i] = H(!1), [c, l] = H(!1), x = se(), h = se(null), p = se(null), f = se(null), m = se({
|
|
5859
5868
|
x: 0,
|
|
5860
5869
|
y: 0
|
|
5861
|
-
}), { widgetProps: j, setOpenWidget: T, isFirstOpenWidget:
|
|
5870
|
+
}), { widgetProps: j, setOpenWidget: T, isFirstOpenWidget: S, setFirstOpenWidget: C } = ue(), { onSendMsg: E, connected: y, isHandshakeWidget: w } = je(), d = () => {
|
|
5862
5871
|
T(!0), E({ msg: j == null ? void 0 : j.getStartedPayload });
|
|
5863
|
-
},
|
|
5872
|
+
}, v = () => {
|
|
5864
5873
|
const k = window.innerHeight;
|
|
5865
5874
|
a({
|
|
5866
5875
|
x: 0,
|
|
@@ -5869,25 +5878,25 @@ const Mi = /* @__PURE__ */ eo(Li), Ni = ({ children: e, usePopover: n, ...o }) =
|
|
|
5869
5878
|
maxY: k - 200
|
|
5870
5879
|
});
|
|
5871
5880
|
}, u = () => {
|
|
5872
|
-
clearTimeout(
|
|
5873
|
-
i(!0),
|
|
5881
|
+
clearTimeout(h.current), clearTimeout(p.current), s && (f.current.style.right = "0px"), s || (f.current.style.right = "-25px", h.current = setTimeout(() => {
|
|
5882
|
+
i(!0), f.current.style.right = "0px";
|
|
5874
5883
|
}, 300));
|
|
5875
5884
|
}, b = () => {
|
|
5876
|
-
clearTimeout(p.current), s && (
|
|
5877
|
-
i(!1),
|
|
5885
|
+
clearTimeout(p.current), s && (f.current.style.right = "-15px", p.current = setTimeout(() => {
|
|
5886
|
+
i(!1), f.current.style.right = "-28px";
|
|
5878
5887
|
}, 2500));
|
|
5879
5888
|
};
|
|
5880
5889
|
return ge(() => {
|
|
5881
|
-
o(!
|
|
5890
|
+
o(!y), window.clearTimeout(x.current), x.current = setTimeout(() => {
|
|
5882
5891
|
o(!1);
|
|
5883
5892
|
}, 3e3);
|
|
5884
|
-
}, [
|
|
5885
|
-
window.removeEventListener("resize",
|
|
5893
|
+
}, [y]), ge(() => (v(), window.addEventListener("resize", v), () => {
|
|
5894
|
+
window.removeEventListener("resize", v);
|
|
5886
5895
|
}), []), /* @__PURE__ */ t.jsx(
|
|
5887
5896
|
Ni,
|
|
5888
5897
|
{
|
|
5889
|
-
usePopover: n &&
|
|
5890
|
-
open: n &&
|
|
5898
|
+
usePopover: n && w === "show",
|
|
5899
|
+
open: n && w === "show",
|
|
5891
5900
|
content: e,
|
|
5892
5901
|
placement: "right",
|
|
5893
5902
|
children: /* @__PURE__ */ t.jsx(
|
|
@@ -5900,7 +5909,7 @@ const Mi = /* @__PURE__ */ eo(Li), Ni = ({ children: e, usePopover: n, ...o }) =
|
|
|
5900
5909
|
handle: ".w-handler-launcher-widget",
|
|
5901
5910
|
axis: "y",
|
|
5902
5911
|
onDrag: (k, D) => {
|
|
5903
|
-
const R = Math.abs(D.x -
|
|
5912
|
+
const R = Math.abs(D.x - m.current.x), U = Math.abs(D.y - m.current.y);
|
|
5904
5913
|
(R > 3 || U > 3) && l(!0), a(($) => ({
|
|
5905
5914
|
...$,
|
|
5906
5915
|
y: D.y
|
|
@@ -5911,15 +5920,15 @@ const Mi = /* @__PURE__ */ eo(Li), Ni = ({ children: e, usePopover: n, ...o }) =
|
|
|
5911
5920
|
y: r == null ? void 0 : r.y
|
|
5912
5921
|
},
|
|
5913
5922
|
onStart: (k, D) => {
|
|
5914
|
-
|
|
5923
|
+
m.current = { x: D.x, y: D.y }, l(!1);
|
|
5915
5924
|
},
|
|
5916
5925
|
children: /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
5917
5926
|
"div",
|
|
5918
5927
|
{
|
|
5919
|
-
ref:
|
|
5928
|
+
ref: f,
|
|
5920
5929
|
className: `w-launcher-container w-handler-launcher-widget ${s ? "w-show-launcher" : "w-hide-launcher"}`,
|
|
5921
5930
|
onClick: () => {
|
|
5922
|
-
c || (
|
|
5931
|
+
c || (S || (C(!0), d()), T(!0));
|
|
5923
5932
|
},
|
|
5924
5933
|
onMouseOver: () => {
|
|
5925
5934
|
u();
|
|
@@ -5942,7 +5951,7 @@ const Mi = /* @__PURE__ */ eo(Li), Ni = ({ children: e, usePopover: n, ...o }) =
|
|
|
5942
5951
|
)
|
|
5943
5952
|
}
|
|
5944
5953
|
);
|
|
5945
|
-
}, Ii =
|
|
5954
|
+
}, Ii = Y(Fi), $i = () => {
|
|
5946
5955
|
const e = M("NotConnected", "Not Connected"), n = M(
|
|
5947
5956
|
"CannotAutoReconnect",
|
|
5948
5957
|
"Cannot auto reconnect"
|
|
@@ -5977,18 +5986,18 @@ const Mi = /* @__PURE__ */ eo(Li), Ni = ({ children: e, usePopover: n, ...o }) =
|
|
|
5977
5986
|
open: !s && r
|
|
5978
5987
|
}
|
|
5979
5988
|
);
|
|
5980
|
-
}, Hi =
|
|
5989
|
+
}, Hi = Y(
|
|
5981
5990
|
$i
|
|
5982
5991
|
), Ui = () => {
|
|
5983
5992
|
const { xs: e } = Re.useBreakpoint(), [n, o] = H(!1), { isOpenWidget: r, widgetProps: a } = ue(), { isActiveTabVA: s } = Me(), i = se(null), c = z(() => {
|
|
5984
|
-
var
|
|
5985
|
-
const
|
|
5986
|
-
return e && (a != null && a.isSF ?
|
|
5993
|
+
var h;
|
|
5994
|
+
const x = [At];
|
|
5995
|
+
return e && (a != null && a.isSF ? x == null || x.push(`${At}-sf-mobile`) : x == null || x.push(`${At}-mobile`)), (h = x == null ? void 0 : x.filter(Boolean)) == null ? void 0 : h.join(" ");
|
|
5987
5996
|
}, [e, a == null ? void 0 : a.isSF]), l = Ir(
|
|
5988
|
-
(
|
|
5997
|
+
(x) => {
|
|
5989
5998
|
var p;
|
|
5990
|
-
const
|
|
5991
|
-
return a != null && a.isSF && (
|
|
5999
|
+
const h = [x, Ot == null ? void 0 : Ot.FADE_IN];
|
|
6000
|
+
return a != null && a.isSF && (h == null || h.push(`${x}-sf`)), e && (a != null && a.isSF ? h == null || h.push(`${x}-sf-mobile`) : h == null || h.push(`${x}-mobile`)), (p = h == null ? void 0 : h.filter(Boolean)) == null ? void 0 : p.join(" ");
|
|
5992
6001
|
},
|
|
5993
6002
|
[a == null ? void 0 : a.isSF, e]
|
|
5994
6003
|
);
|
|
@@ -6004,14 +6013,14 @@ const Mi = /* @__PURE__ */ eo(Li), Ni = ({ children: e, usePopover: n, ...o }) =
|
|
|
6004
6013
|
/* @__PURE__ */ t.jsx("div", { style: { display: s ? "none" : "block" }, children: /* @__PURE__ */ t.jsx("div", { className: l(po), children: /* @__PURE__ */ t.jsx(Ms, { children: /* @__PURE__ */ t.jsx(Os, { children: /* @__PURE__ */ t.jsx(Ti, {}) }) }) }) }),
|
|
6005
6014
|
/* @__PURE__ */ t.jsx(Hi, {})
|
|
6006
6015
|
] }) : /* @__PURE__ */ t.jsx(Ii, {});
|
|
6007
|
-
}, Wi =
|
|
6016
|
+
}, Wi = Y(Ui), Bi = ({ items: e, ...n }) => Pe != null && Pe.startsWith("5") || Xe != null && Xe.startsWith("18") ? /* @__PURE__ */ t.jsx(wt, { ...n, items: e }) : /* @__PURE__ */ t.jsx(wt, { ...n, children: e == null ? void 0 : e.map(({ ...o }) => /* @__PURE__ */ Ht(
|
|
6008
6017
|
wt.TabPane,
|
|
6009
6018
|
{
|
|
6010
6019
|
...o,
|
|
6011
6020
|
key: o == null ? void 0 : o.key,
|
|
6012
6021
|
tab: o == null ? void 0 : o.label
|
|
6013
6022
|
}
|
|
6014
|
-
)) }), Yi =
|
|
6023
|
+
)) }), Yi = Y(Bi), Vi = () => {
|
|
6015
6024
|
const { isOpenWidget: e, isUserInputHide: n } = ue(), { setActiveTab: o, activeTab: r } = Me(), a = M(
|
|
6016
6025
|
"VirtualAssistant",
|
|
6017
6026
|
"Virtual Assistant"
|
|
@@ -6051,7 +6060,7 @@ const Mi = /* @__PURE__ */ eo(Li), Ni = ({ children: e, usePopover: n, ...o }) =
|
|
|
6051
6060
|
)
|
|
6052
6061
|
}
|
|
6053
6062
|
) : null;
|
|
6054
|
-
}, zi =
|
|
6063
|
+
}, zi = Y(Vi), Gi = () => {
|
|
6055
6064
|
const { isOpenWidget: e, setOpenWidget: n, setExpand: o, isExpand: r, widgetProps: a } = ue(), { xs: s } = Re.useBreakpoint(), i = z(() => {
|
|
6056
6065
|
const { title: c = "", modelName: l = "" } = a;
|
|
6057
6066
|
return l ? `${c} (${l})` : c;
|
|
@@ -6097,7 +6106,7 @@ const Mi = /* @__PURE__ */ eo(Li), Ni = ({ children: e, usePopover: n, ...o }) =
|
|
|
6097
6106
|
]
|
|
6098
6107
|
}
|
|
6099
6108
|
) : null;
|
|
6100
|
-
}, qi =
|
|
6109
|
+
}, qi = Y(Gi), Ki = () => {
|
|
6101
6110
|
const { isExpand: e, isOpenWidget: n, isFirstOpenWidget: o, setOpenWidget: r } = ue(), { xs: a } = Re.useBreakpoint(), s = z(() => {
|
|
6102
6111
|
var c;
|
|
6103
6112
|
const i = [
|
|
@@ -6125,7 +6134,7 @@ const Mi = /* @__PURE__ */ eo(Li), Ni = ({ children: e, usePopover: n, ...o }) =
|
|
|
6125
6134
|
]
|
|
6126
6135
|
}
|
|
6127
6136
|
);
|
|
6128
|
-
}, Pi =
|
|
6137
|
+
}, Pi = Y(Ki), ua = ({
|
|
6129
6138
|
getStartedPayload: e,
|
|
6130
6139
|
socketURL: n,
|
|
6131
6140
|
socketPath: o,
|
|
@@ -6135,7 +6144,7 @@ const Mi = /* @__PURE__ */ eo(Li), Ni = ({ children: e, usePopover: n, ...o }) =
|
|
|
6135
6144
|
keyEncrypt: i,
|
|
6136
6145
|
history: c,
|
|
6137
6146
|
modelName: l,
|
|
6138
|
-
isSF:
|
|
6147
|
+
isSF: x = !1
|
|
6139
6148
|
}) => /* @__PURE__ */ t.jsx(
|
|
6140
6149
|
So,
|
|
6141
6150
|
{
|
|
@@ -6148,7 +6157,7 @@ const Mi = /* @__PURE__ */ eo(Li), Ni = ({ children: e, usePopover: n, ...o }) =
|
|
|
6148
6157
|
keyEncrypt: i,
|
|
6149
6158
|
history: c,
|
|
6150
6159
|
modelName: l,
|
|
6151
|
-
isSF:
|
|
6160
|
+
isSF: x,
|
|
6152
6161
|
children: /* @__PURE__ */ t.jsx(_o, { children: /* @__PURE__ */ t.jsx(Pi, {}) })
|
|
6153
6162
|
}
|
|
6154
6163
|
);
|