@ssgc/alert-console 2.10.10 → 2.10.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +308 -289
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as c, jsxs as f, Fragment as rn } from "react/jsx-runtime";
|
|
2
2
|
import { useContext as Li, useMemo as ve, createContext as Fi, useRef as pr, useState as S, useCallback as bn, useEffect as oe, useLayoutEffect as $i, forwardRef as gr, createElement as Hs } from "react";
|
|
3
|
-
import { Select as
|
|
3
|
+
import { Select as Pe, Table as an, Row as Ze, Col as K, Input as Pi, Tag as wt, Space as st, Tooltip as In, Button as ze, Progress as Wi, Dropdown as Vi, Typography as Jt, Spin as Ns, Checkbox as Ot, Divider as Zt, TimePicker as kn, Tabs as on, Card as Ds, Steps as Bi, Timeline as Zi, Modal as zi, Carousel as Hi } from "antd";
|
|
4
4
|
import { MessageOutlined as Gi, MailOutlined as qi, MoreOutlined as Yi, PlusOutlined as _i, EditOutlined as ji, LeftOutlined as Ji, RightOutlined as Ki } from "@ant-design/icons";
|
|
5
|
-
import { toast as
|
|
5
|
+
import { toast as Ee } from "react-toastify";
|
|
6
6
|
import { useQueryClient as Qi, useMutation as Xi, useQuery as ln, QueryClient as ea, QueryClientProvider as ta } from "@tanstack/react-query";
|
|
7
7
|
const sa = "#FF3B30", na = "#FF9500", ra = "#FFCC00", ia = "#34C759", ns = {
|
|
8
8
|
critical: sa,
|
|
@@ -18,14 +18,14 @@ const sa = "#FF3B30", na = "#FF9500", ra = "#FFCC00", ia = "#34C759", ns = {
|
|
|
18
18
|
function aa(t) {
|
|
19
19
|
return xn[t] || xn.Low;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function En(t) {
|
|
22
22
|
if (!t || typeof t != "string") return 0;
|
|
23
23
|
const e = t.trim().split(":");
|
|
24
24
|
if (e.length !== 3) return 0;
|
|
25
25
|
const [s, n, r] = e, i = Number.parseInt(s, 10), a = Number.parseInt(n, 10), o = Number.parseFloat(r || "0"), l = Number.isFinite(i) ? i : 0, u = Number.isFinite(a) ? a : 0, m = Number.isFinite(o) ? o : 0;
|
|
26
26
|
return l * 3600 + u * 60 + m;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function On(t) {
|
|
29
29
|
return t.toLowerCase().replaceAll("'", "").replaceAll("‘", "").replaceAll("’", "");
|
|
30
30
|
}
|
|
31
31
|
const Sr = "", oa = Sr, la = "", ca = "", ua = "", da = "", Mn = {
|
|
@@ -306,58 +306,58 @@ function Sa() {
|
|
|
306
306
|
(function(s, n) {
|
|
307
307
|
t.exports = n();
|
|
308
308
|
})(ga, (function() {
|
|
309
|
-
var s = 1e3, n = 6e4, r = 36e5, i = "millisecond", a = "second", o = "minute", l = "hour", u = "day", m = "week", d = "month", y = "quarter", p = "year", v = "date", k = "Invalid Date", b = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, B = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, q = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(
|
|
310
|
-
var N = ["th", "st", "nd", "rd"], A =
|
|
311
|
-
return "[" +
|
|
312
|
-
} }, Q = function(
|
|
313
|
-
var
|
|
314
|
-
return !
|
|
315
|
-
}, x = { s: Q, z: function(
|
|
316
|
-
var N = -
|
|
317
|
-
return (N <= 0 ? "+" : "-") + Q(
|
|
318
|
-
}, m: function
|
|
319
|
-
if (N.date() < A.date()) return -
|
|
320
|
-
var
|
|
321
|
-
return +(-(
|
|
322
|
-
}, a: function(
|
|
323
|
-
return
|
|
324
|
-
}, p: function(
|
|
325
|
-
return { M: d, y: p, w: m, d: u, D: v, h: l, m: o, s: a, ms: i, Q: y }[
|
|
326
|
-
}, u: function(
|
|
327
|
-
return
|
|
309
|
+
var s = 1e3, n = 6e4, r = 36e5, i = "millisecond", a = "second", o = "minute", l = "hour", u = "day", m = "week", d = "month", y = "quarter", p = "year", v = "date", k = "Invalid Date", b = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, B = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, q = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(O) {
|
|
310
|
+
var N = ["th", "st", "nd", "rd"], A = O % 100;
|
|
311
|
+
return "[" + O + (N[(A - 20) % 10] || N[A] || N[0]) + "]";
|
|
312
|
+
} }, Q = function(O, N, A) {
|
|
313
|
+
var E = String(O);
|
|
314
|
+
return !E || E.length >= N ? O : "" + Array(N + 1 - E.length).join(A) + O;
|
|
315
|
+
}, x = { s: Q, z: function(O) {
|
|
316
|
+
var N = -O.utcOffset(), A = Math.abs(N), E = Math.floor(A / 60), T = A % 60;
|
|
317
|
+
return (N <= 0 ? "+" : "-") + Q(E, 2, "0") + ":" + Q(T, 2, "0");
|
|
318
|
+
}, m: function O(N, A) {
|
|
319
|
+
if (N.date() < A.date()) return -O(A, N);
|
|
320
|
+
var E = 12 * (A.year() - N.year()) + (A.month() - N.month()), T = N.clone().add(E, d), D = A - T < 0, L = N.clone().add(E + (D ? -1 : 1), d);
|
|
321
|
+
return +(-(E + (A - T) / (D ? T - L : L - T)) || 0);
|
|
322
|
+
}, a: function(O) {
|
|
323
|
+
return O < 0 ? Math.ceil(O) || 0 : Math.floor(O);
|
|
324
|
+
}, p: function(O) {
|
|
325
|
+
return { M: d, y: p, w: m, d: u, D: v, h: l, m: o, s: a, ms: i, Q: y }[O] || String(O || "").toLowerCase().replace(/s$/, "");
|
|
326
|
+
}, u: function(O) {
|
|
327
|
+
return O === void 0;
|
|
328
328
|
} }, C = "en", Z = {};
|
|
329
329
|
Z[C] = q;
|
|
330
|
-
var R = "$isDayjsObject", G = function(
|
|
331
|
-
return
|
|
332
|
-
}, h = function
|
|
330
|
+
var R = "$isDayjsObject", G = function(O) {
|
|
331
|
+
return O instanceof ie || !(!O || !O[R]);
|
|
332
|
+
}, h = function O(N, A, E) {
|
|
333
333
|
var T;
|
|
334
334
|
if (!N) return C;
|
|
335
335
|
if (typeof N == "string") {
|
|
336
336
|
var D = N.toLowerCase();
|
|
337
337
|
Z[D] && (T = D), A && (Z[D] = A, T = D);
|
|
338
338
|
var L = N.split("-");
|
|
339
|
-
if (!T && L.length > 1) return
|
|
339
|
+
if (!T && L.length > 1) return O(L[0]);
|
|
340
340
|
} else {
|
|
341
341
|
var _ = N.name;
|
|
342
342
|
Z[_] = N, T = _;
|
|
343
343
|
}
|
|
344
|
-
return !
|
|
345
|
-
}, g = function(
|
|
346
|
-
if (G(
|
|
344
|
+
return !E && T && (C = T), T || !E && C;
|
|
345
|
+
}, g = function(O, N) {
|
|
346
|
+
if (G(O)) return O.clone();
|
|
347
347
|
var A = typeof N == "object" ? N : {};
|
|
348
|
-
return A.date =
|
|
348
|
+
return A.date = O, A.args = arguments, new ie(A);
|
|
349
349
|
}, M = x;
|
|
350
|
-
M.l = h, M.i = G, M.w = function(
|
|
351
|
-
return g(
|
|
350
|
+
M.l = h, M.i = G, M.w = function(O, N) {
|
|
351
|
+
return g(O, { locale: N.$L, utc: N.$u, x: N.$x, $offset: N.$offset });
|
|
352
352
|
};
|
|
353
353
|
var ie = (function() {
|
|
354
|
-
function
|
|
354
|
+
function O(A) {
|
|
355
355
|
this.$L = h(A.locale, null, !0), this.parse(A), this.$x = this.$x || A.x || {}, this[R] = !0;
|
|
356
356
|
}
|
|
357
|
-
var N =
|
|
357
|
+
var N = O.prototype;
|
|
358
358
|
return N.parse = function(A) {
|
|
359
|
-
this.$d = (function(
|
|
360
|
-
var T =
|
|
359
|
+
this.$d = (function(E) {
|
|
360
|
+
var T = E.date, D = E.utc;
|
|
361
361
|
if (T === null) return /* @__PURE__ */ new Date(NaN);
|
|
362
362
|
if (M.u(T)) return /* @__PURE__ */ new Date();
|
|
363
363
|
if (T instanceof Date) return new Date(T);
|
|
@@ -377,26 +377,26 @@ function Sa() {
|
|
|
377
377
|
return M;
|
|
378
378
|
}, N.isValid = function() {
|
|
379
379
|
return this.$d.toString() !== k;
|
|
380
|
-
}, N.isSame = function(A,
|
|
380
|
+
}, N.isSame = function(A, E) {
|
|
381
381
|
var T = g(A);
|
|
382
|
-
return this.startOf(
|
|
383
|
-
}, N.isAfter = function(A,
|
|
384
|
-
return g(A) < this.startOf(
|
|
385
|
-
}, N.isBefore = function(A,
|
|
386
|
-
return this.endOf(
|
|
387
|
-
}, N.$g = function(A,
|
|
388
|
-
return M.u(A) ? this[
|
|
382
|
+
return this.startOf(E) <= T && T <= this.endOf(E);
|
|
383
|
+
}, N.isAfter = function(A, E) {
|
|
384
|
+
return g(A) < this.startOf(E);
|
|
385
|
+
}, N.isBefore = function(A, E) {
|
|
386
|
+
return this.endOf(E) < g(A);
|
|
387
|
+
}, N.$g = function(A, E, T) {
|
|
388
|
+
return M.u(A) ? this[E] : this.set(T, A);
|
|
389
389
|
}, N.unix = function() {
|
|
390
390
|
return Math.floor(this.valueOf() / 1e3);
|
|
391
391
|
}, N.valueOf = function() {
|
|
392
392
|
return this.$d.getTime();
|
|
393
|
-
}, N.startOf = function(A,
|
|
394
|
-
var T = this, D = !!M.u(
|
|
393
|
+
}, N.startOf = function(A, E) {
|
|
394
|
+
var T = this, D = !!M.u(E) || E, L = M.p(A), _ = function(ke, pe) {
|
|
395
395
|
var P = M.w(T.$u ? Date.UTC(T.$y, pe, ke) : new Date(T.$y, pe, ke), T);
|
|
396
396
|
return D ? P : P.endOf(u);
|
|
397
397
|
}, Y = function(ke, pe) {
|
|
398
398
|
return M.w(T.toDate()[ke].apply(T.toDate("s"), (D ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(pe)), T);
|
|
399
|
-
}, j = this.$W, ce = this.$M, me = this.$D,
|
|
399
|
+
}, j = this.$W, ce = this.$M, me = this.$D, Oe = "set" + (this.$u ? "UTC" : "");
|
|
400
400
|
switch (L) {
|
|
401
401
|
case p:
|
|
402
402
|
return D ? _(1, 0) : _(31, 11);
|
|
@@ -407,33 +407,33 @@ function Sa() {
|
|
|
407
407
|
return _(D ? me - Se : me + (6 - Se), ce);
|
|
408
408
|
case u:
|
|
409
409
|
case v:
|
|
410
|
-
return Y(
|
|
410
|
+
return Y(Oe + "Hours", 0);
|
|
411
411
|
case l:
|
|
412
|
-
return Y(
|
|
412
|
+
return Y(Oe + "Minutes", 1);
|
|
413
413
|
case o:
|
|
414
|
-
return Y(
|
|
414
|
+
return Y(Oe + "Seconds", 2);
|
|
415
415
|
case a:
|
|
416
|
-
return Y(
|
|
416
|
+
return Y(Oe + "Milliseconds", 3);
|
|
417
417
|
default:
|
|
418
418
|
return this.clone();
|
|
419
419
|
}
|
|
420
420
|
}, N.endOf = function(A) {
|
|
421
421
|
return this.startOf(A, !1);
|
|
422
|
-
}, N.$set = function(A,
|
|
423
|
-
var T, D = M.p(A), L = "set" + (this.$u ? "UTC" : ""), _ = (T = {}, T[u] = L + "Date", T[v] = L + "Date", T[d] = L + "Month", T[p] = L + "FullYear", T[l] = L + "Hours", T[o] = L + "Minutes", T[a] = L + "Seconds", T[i] = L + "Milliseconds", T)[D], Y = D === u ? this.$D + (
|
|
422
|
+
}, N.$set = function(A, E) {
|
|
423
|
+
var T, D = M.p(A), L = "set" + (this.$u ? "UTC" : ""), _ = (T = {}, T[u] = L + "Date", T[v] = L + "Date", T[d] = L + "Month", T[p] = L + "FullYear", T[l] = L + "Hours", T[o] = L + "Minutes", T[a] = L + "Seconds", T[i] = L + "Milliseconds", T)[D], Y = D === u ? this.$D + (E - this.$W) : E;
|
|
424
424
|
if (D === d || D === p) {
|
|
425
425
|
var j = this.clone().set(v, 1);
|
|
426
426
|
j.$d[_](Y), j.init(), this.$d = j.set(v, Math.min(this.$D, j.daysInMonth())).$d;
|
|
427
427
|
} else _ && this.$d[_](Y);
|
|
428
428
|
return this.init(), this;
|
|
429
|
-
}, N.set = function(A,
|
|
430
|
-
return this.clone().$set(A,
|
|
429
|
+
}, N.set = function(A, E) {
|
|
430
|
+
return this.clone().$set(A, E);
|
|
431
431
|
}, N.get = function(A) {
|
|
432
432
|
return this[M.p(A)]();
|
|
433
|
-
}, N.add = function(A,
|
|
433
|
+
}, N.add = function(A, E) {
|
|
434
434
|
var T, D = this;
|
|
435
435
|
A = Number(A);
|
|
436
|
-
var L = M.p(
|
|
436
|
+
var L = M.p(E), _ = function(ce) {
|
|
437
437
|
var me = g(D);
|
|
438
438
|
return M.w(me.date(me.date() + Math.round(ce * A)), D);
|
|
439
439
|
};
|
|
@@ -443,16 +443,16 @@ function Sa() {
|
|
|
443
443
|
if (L === m) return _(7);
|
|
444
444
|
var Y = (T = {}, T[o] = n, T[l] = r, T[a] = s, T)[L] || 1, j = this.$d.getTime() + A * Y;
|
|
445
445
|
return M.w(j, this);
|
|
446
|
-
}, N.subtract = function(A,
|
|
447
|
-
return this.add(-1 * A,
|
|
446
|
+
}, N.subtract = function(A, E) {
|
|
447
|
+
return this.add(-1 * A, E);
|
|
448
448
|
}, N.format = function(A) {
|
|
449
|
-
var
|
|
449
|
+
var E = this, T = this.$locale();
|
|
450
450
|
if (!this.isValid()) return T.invalidDate || k;
|
|
451
|
-
var D = A || "YYYY-MM-DDTHH:mm:ssZ", L = M.z(this), _ = this.$H, Y = this.$m, j = this.$M, ce = T.weekdays, me = T.months,
|
|
452
|
-
return pe && (pe[P] || pe(
|
|
451
|
+
var D = A || "YYYY-MM-DDTHH:mm:ssZ", L = M.z(this), _ = this.$H, Y = this.$m, j = this.$M, ce = T.weekdays, me = T.months, Oe = T.meridiem, te = function(pe, P, W, ge) {
|
|
452
|
+
return pe && (pe[P] || pe(E, D)) || W[P].slice(0, ge);
|
|
453
453
|
}, Se = function(pe) {
|
|
454
454
|
return M.s(_ % 12 || 12, pe, "0");
|
|
455
|
-
}, ke =
|
|
455
|
+
}, ke = Oe || function(pe, P, W) {
|
|
456
456
|
var ge = pe < 12 ? "AM" : "PM";
|
|
457
457
|
return W ? ge.toLowerCase() : ge;
|
|
458
458
|
};
|
|
@@ -460,9 +460,9 @@ function Sa() {
|
|
|
460
460
|
return P || (function(W) {
|
|
461
461
|
switch (W) {
|
|
462
462
|
case "YY":
|
|
463
|
-
return String(
|
|
463
|
+
return String(E.$y).slice(-2);
|
|
464
464
|
case "YYYY":
|
|
465
|
-
return M.s(
|
|
465
|
+
return M.s(E.$y, 4, "0");
|
|
466
466
|
case "M":
|
|
467
467
|
return j + 1;
|
|
468
468
|
case "MM":
|
|
@@ -472,17 +472,17 @@ function Sa() {
|
|
|
472
472
|
case "MMMM":
|
|
473
473
|
return te(me, j);
|
|
474
474
|
case "D":
|
|
475
|
-
return
|
|
475
|
+
return E.$D;
|
|
476
476
|
case "DD":
|
|
477
|
-
return M.s(
|
|
477
|
+
return M.s(E.$D, 2, "0");
|
|
478
478
|
case "d":
|
|
479
|
-
return String(
|
|
479
|
+
return String(E.$W);
|
|
480
480
|
case "dd":
|
|
481
|
-
return te(T.weekdaysMin,
|
|
481
|
+
return te(T.weekdaysMin, E.$W, ce, 2);
|
|
482
482
|
case "ddd":
|
|
483
|
-
return te(T.weekdaysShort,
|
|
483
|
+
return te(T.weekdaysShort, E.$W, ce, 3);
|
|
484
484
|
case "dddd":
|
|
485
|
-
return ce[
|
|
485
|
+
return ce[E.$W];
|
|
486
486
|
case "H":
|
|
487
487
|
return String(_);
|
|
488
488
|
case "HH":
|
|
@@ -500,11 +500,11 @@ function Sa() {
|
|
|
500
500
|
case "mm":
|
|
501
501
|
return M.s(Y, 2, "0");
|
|
502
502
|
case "s":
|
|
503
|
-
return String(
|
|
503
|
+
return String(E.$s);
|
|
504
504
|
case "ss":
|
|
505
|
-
return M.s(
|
|
505
|
+
return M.s(E.$s, 2, "0");
|
|
506
506
|
case "SSS":
|
|
507
|
-
return M.s(
|
|
507
|
+
return M.s(E.$ms, 3, "0");
|
|
508
508
|
case "Z":
|
|
509
509
|
return L;
|
|
510
510
|
}
|
|
@@ -513,8 +513,8 @@ function Sa() {
|
|
|
513
513
|
}));
|
|
514
514
|
}, N.utcOffset = function() {
|
|
515
515
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
516
|
-
}, N.diff = function(A,
|
|
517
|
-
var D, L = this, _ = M.p(
|
|
516
|
+
}, N.diff = function(A, E, T) {
|
|
517
|
+
var D, L = this, _ = M.p(E), Y = g(A), j = (Y.utcOffset() - this.utcOffset()) * n, ce = this - Y, me = function() {
|
|
518
518
|
return M.m(L, Y);
|
|
519
519
|
};
|
|
520
520
|
switch (_) {
|
|
@@ -550,9 +550,9 @@ function Sa() {
|
|
|
550
550
|
return this.endOf(d).$D;
|
|
551
551
|
}, N.$locale = function() {
|
|
552
552
|
return Z[this.$L];
|
|
553
|
-
}, N.locale = function(A,
|
|
553
|
+
}, N.locale = function(A, E) {
|
|
554
554
|
if (!A) return this.$L;
|
|
555
|
-
var T = this.clone(), D = h(A,
|
|
555
|
+
var T = this.clone(), D = h(A, E, !0);
|
|
556
556
|
return D && (T.$L = D), T;
|
|
557
557
|
}, N.clone = function() {
|
|
558
558
|
return M.w(this.$d, this);
|
|
@@ -564,16 +564,16 @@ function Sa() {
|
|
|
564
564
|
return this.$d.toISOString();
|
|
565
565
|
}, N.toString = function() {
|
|
566
566
|
return this.$d.toUTCString();
|
|
567
|
-
},
|
|
567
|
+
}, O;
|
|
568
568
|
})(), ye = ie.prototype;
|
|
569
|
-
return g.prototype = ye, [["$ms", i], ["$s", a], ["$m", o], ["$H", l], ["$W", u], ["$M", d], ["$y", p], ["$D", v]].forEach((function(
|
|
570
|
-
ye[
|
|
571
|
-
return this.$g(N,
|
|
569
|
+
return g.prototype = ye, [["$ms", i], ["$s", a], ["$m", o], ["$H", l], ["$W", u], ["$M", d], ["$y", p], ["$D", v]].forEach((function(O) {
|
|
570
|
+
ye[O[1]] = function(N) {
|
|
571
|
+
return this.$g(N, O[0], O[1]);
|
|
572
572
|
};
|
|
573
|
-
})), g.extend = function(
|
|
574
|
-
return
|
|
575
|
-
}, g.locale = h, g.isDayjs = G, g.unix = function(
|
|
576
|
-
return g(1e3 *
|
|
573
|
+
})), g.extend = function(O, N) {
|
|
574
|
+
return O.$i || (O(N, ie, g), O.$i = !0), g;
|
|
575
|
+
}, g.locale = h, g.isDayjs = G, g.unix = function(O) {
|
|
576
|
+
return g(1e3 * O);
|
|
577
577
|
}, g.en = Z[C], g.Ls = Z, g.p = {}, g;
|
|
578
578
|
}));
|
|
579
579
|
})(hs)), hs.exports;
|
|
@@ -594,7 +594,7 @@ function Rn(t) {
|
|
|
594
594
|
const { hours: e, minutes: s, seconds: n } = wr(t);
|
|
595
595
|
return wa().hour(e).minute(s).second(n).millisecond(0);
|
|
596
596
|
}
|
|
597
|
-
function
|
|
597
|
+
function Fe(t, e) {
|
|
598
598
|
const s = (t || "").replace(/\/+$/, ""), n = e.startsWith("/") ? e : `/${e}`;
|
|
599
599
|
return `${s}${n}`;
|
|
600
600
|
}
|
|
@@ -613,7 +613,7 @@ function is(t, e) {
|
|
|
613
613
|
r != null && String(r).length > 0 && s.searchParams.set(n, String(r));
|
|
614
614
|
}), s.toString();
|
|
615
615
|
}
|
|
616
|
-
async function
|
|
616
|
+
async function $e(t, e) {
|
|
617
617
|
const s = {
|
|
618
618
|
...e.headers,
|
|
619
619
|
...Aa()
|
|
@@ -645,17 +645,19 @@ function zt(t, e, s = {}) {
|
|
|
645
645
|
return n;
|
|
646
646
|
}
|
|
647
647
|
function Na(t) {
|
|
648
|
-
return Array.isArray(t) ? t.map(
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
648
|
+
return Array.isArray(t) ? t.map(
|
|
649
|
+
(e) => zt(e, [
|
|
650
|
+
"alertLogId",
|
|
651
|
+
"alertId",
|
|
652
|
+
"status",
|
|
653
|
+
"description",
|
|
654
|
+
"actionNotes",
|
|
655
|
+
"createdDate",
|
|
656
|
+
"createdBy",
|
|
657
|
+
"modifiedDate",
|
|
658
|
+
"modifiedBy"
|
|
659
|
+
])
|
|
660
|
+
) : t;
|
|
659
661
|
}
|
|
660
662
|
function Ta(t) {
|
|
661
663
|
return {
|
|
@@ -675,7 +677,12 @@ function Ta(t) {
|
|
|
675
677
|
assignTeam: he(t?.AssignTeam, t?.assignTeam),
|
|
676
678
|
cameraName: he(t?.CameraName, t?.cameraName),
|
|
677
679
|
type: he(t?.Type, t?.type),
|
|
678
|
-
mediaDetails: he(
|
|
680
|
+
mediaDetails: he(
|
|
681
|
+
t?.MediaDetails,
|
|
682
|
+
t?.mediaDetails,
|
|
683
|
+
t?.MediaUrls,
|
|
684
|
+
t?.mediaUrls
|
|
685
|
+
),
|
|
679
686
|
additionalMedia: he(t?.AdditionalMedia, t?.additionalMedia),
|
|
680
687
|
timeElapsed: he(t?.TimeElapsed, t?.timeElapsed),
|
|
681
688
|
timeRemaining: he(t?.TimeRemaining, t?.timeRemaining),
|
|
@@ -694,7 +701,7 @@ function ba(t) {
|
|
|
694
701
|
};
|
|
695
702
|
return {
|
|
696
703
|
async listAlerts(s) {
|
|
697
|
-
const n =
|
|
704
|
+
const n = Fe(t.baseUrl, "/api/detectionpolicy/alerts"), r = is(n, {
|
|
698
705
|
customerId: "99e5c8b5-b9d4-4d35-8885-7f121c532664",
|
|
699
706
|
pageSize: s?.pageSize ?? 10,
|
|
700
707
|
page: s?.pageNumber ?? 1,
|
|
@@ -704,44 +711,49 @@ function ba(t) {
|
|
|
704
711
|
...s?.thirdPartyIds?.length && { ThirdPartyIds: s.thirdPartyIds.join(",") },
|
|
705
712
|
...s?.searchText && { searchText: s.searchText },
|
|
706
713
|
isArchived: s?.isArchived ?? !1
|
|
707
|
-
}), i = await
|
|
714
|
+
}), i = await $e(r, {
|
|
708
715
|
method: "GET",
|
|
709
716
|
headers: e
|
|
710
717
|
});
|
|
711
718
|
return { items: Array.isArray(i?.Items) ? i.Items.map(Ta) : [], total: i?.Total };
|
|
712
719
|
},
|
|
713
720
|
async getAlertStatusList() {
|
|
714
|
-
const s =
|
|
721
|
+
const s = Fe(t.baseUrl, "/api/detectionpolicy/alerts/StatusList"), n = await $e(s, {
|
|
715
722
|
method: "GET",
|
|
716
723
|
headers: e
|
|
717
724
|
});
|
|
718
|
-
return (Array.isArray(n) ? n : []).map(
|
|
719
|
-
"alertStatusId",
|
|
720
|
-
|
|
721
|
-
"statusName"
|
|
722
|
-
]));
|
|
725
|
+
return (Array.isArray(n) ? n : []).map(
|
|
726
|
+
(i) => zt(i, ["alertStatusId", "value", "statusName"])
|
|
727
|
+
);
|
|
723
728
|
},
|
|
724
729
|
async getAlertsReport(s) {
|
|
725
|
-
const n =
|
|
730
|
+
const n = Fe(t.baseUrl, "/api/detectionpolicy/alerts/GetAlertsReport"), r = is(n, s), i = await $e(r, {
|
|
726
731
|
method: "GET",
|
|
727
732
|
headers: e
|
|
728
733
|
});
|
|
729
734
|
return Array.isArray(i) ? i : [];
|
|
730
735
|
},
|
|
731
736
|
async updateAlertStatus(s) {
|
|
732
|
-
const n =
|
|
737
|
+
const n = Fe(t.baseUrl, "/api/detectionpolicy/alerts/Log"), r = {
|
|
733
738
|
AlertId: s.alertId ?? s.alertUniqueId ?? s.AlertId,
|
|
734
739
|
Status: s.status ?? s.Status ?? "",
|
|
735
740
|
Notes: s.notes ?? s.Notes ?? ""
|
|
736
741
|
};
|
|
737
|
-
return
|
|
742
|
+
return $e(n, {
|
|
738
743
|
method: "POST",
|
|
739
744
|
headers: e,
|
|
740
745
|
body: JSON.stringify(r)
|
|
741
746
|
});
|
|
742
747
|
},
|
|
748
|
+
async getAlertTimeline(s) {
|
|
749
|
+
const n = Fe(t.baseUrl, `/api/detectionpolicy/alerts/alertTimelines/${s}`);
|
|
750
|
+
return $e(n, {
|
|
751
|
+
method: "GET",
|
|
752
|
+
headers: e
|
|
753
|
+
});
|
|
754
|
+
},
|
|
743
755
|
async getAdminSettings() {
|
|
744
|
-
const s =
|
|
756
|
+
const s = Fe(t.baseUrl, "/api/detectionpolicy/alerts/GetAdminSettings"), n = await $e(s, {
|
|
745
757
|
method: "GET",
|
|
746
758
|
headers: e
|
|
747
759
|
});
|
|
@@ -755,7 +767,7 @@ function ba(t) {
|
|
|
755
767
|
return null;
|
|
756
768
|
},
|
|
757
769
|
async setAdminSettings(s) {
|
|
758
|
-
const n =
|
|
770
|
+
const n = Fe(t.baseUrl, "/api/detectionpolicy/alerts/SetAdminSettings"), r = {
|
|
759
771
|
Settings: {
|
|
760
772
|
UserId: 0,
|
|
761
773
|
IsAdminSetting: !0,
|
|
@@ -763,14 +775,14 @@ function ba(t) {
|
|
|
763
775
|
GroupBy: s?.groupBy ?? null
|
|
764
776
|
}
|
|
765
777
|
};
|
|
766
|
-
return
|
|
778
|
+
return $e(n, {
|
|
767
779
|
method: "POST",
|
|
768
780
|
headers: e,
|
|
769
781
|
body: JSON.stringify(r)
|
|
770
782
|
});
|
|
771
783
|
},
|
|
772
784
|
async getPreferenceSettings() {
|
|
773
|
-
const s =
|
|
785
|
+
const s = Fe(t.baseUrl, "/api/detectionpolicy/alerts/GetPreferenceSettings"), n = await $e(s, {
|
|
774
786
|
method: "GET",
|
|
775
787
|
headers: e
|
|
776
788
|
});
|
|
@@ -781,7 +793,7 @@ function ba(t) {
|
|
|
781
793
|
return null;
|
|
782
794
|
},
|
|
783
795
|
async setPreferenceSettings(s) {
|
|
784
|
-
const n =
|
|
796
|
+
const n = Fe(t.baseUrl, "/api/detectionpolicy/alerts/SetPreferenceSettings"), r = (u) => {
|
|
785
797
|
const { hours: m, minutes: d, seconds: y } = wr(u);
|
|
786
798
|
return (m * 3600 + d * 60 + y) * 1e7;
|
|
787
799
|
}, i = {
|
|
@@ -795,7 +807,7 @@ function ba(t) {
|
|
|
795
807
|
Email: !!s?.email,
|
|
796
808
|
SortBy: s?.sortBy ?? ""
|
|
797
809
|
}
|
|
798
|
-
}, a = await
|
|
810
|
+
}, a = await $e(n, {
|
|
799
811
|
method: "POST",
|
|
800
812
|
headers: e,
|
|
801
813
|
body: JSON.stringify(i)
|
|
@@ -808,45 +820,52 @@ function ba(t) {
|
|
|
808
820
|
};
|
|
809
821
|
},
|
|
810
822
|
async sendSMSorEmailNotifications(s, n, r) {
|
|
811
|
-
const i =
|
|
812
|
-
|
|
823
|
+
const i = Fe(
|
|
824
|
+
t.baseUrl,
|
|
825
|
+
"/api/detectionpolicy/alerts/SendSMSorEmailNotifications"
|
|
826
|
+
), a = is(i, { alertId: s, isEmail: n, isSMS: r });
|
|
827
|
+
return $e(a, {
|
|
813
828
|
method: "POST",
|
|
814
829
|
headers: e
|
|
815
830
|
});
|
|
816
831
|
},
|
|
817
832
|
async getAlertNotifications(s) {
|
|
818
|
-
const n =
|
|
833
|
+
const n = Fe(t.baseUrl, "/api/detectionpolicy/alerts/GetNotifications"), r = is(n, { alertId: s }), i = await $e(r, {
|
|
819
834
|
method: "GET",
|
|
820
835
|
headers: e
|
|
821
836
|
});
|
|
822
837
|
let a = [];
|
|
823
|
-
return Array.isArray(i) ? a = i : Array.isArray(i?.data) && (a = i.data), a.map(
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
838
|
+
return Array.isArray(i) ? a = i : Array.isArray(i?.data) && (a = i.data), a.map(
|
|
839
|
+
(o) => zt(o, [
|
|
840
|
+
"alertNotificationSentId",
|
|
841
|
+
"alertId",
|
|
842
|
+
"notificationType",
|
|
843
|
+
"receipientName",
|
|
844
|
+
"receipentPhoneNumber",
|
|
845
|
+
"messageSID",
|
|
846
|
+
"messageStatus",
|
|
847
|
+
"receipientEmail",
|
|
848
|
+
"notificationReceipientType",
|
|
849
|
+
"sentAt"
|
|
850
|
+
])
|
|
851
|
+
);
|
|
835
852
|
},
|
|
836
853
|
async getTimeZoneMasters() {
|
|
837
|
-
const s =
|
|
854
|
+
const s = Fe(t.baseUrl, "/api/TimeZoneMaster"), n = await $e(s, {
|
|
838
855
|
method: "GET",
|
|
839
856
|
headers: e
|
|
840
857
|
});
|
|
841
|
-
return (Array.isArray(n?.Data) ? n.Data : []).map(
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
858
|
+
return (Array.isArray(n?.Data) ? n.Data : []).map(
|
|
859
|
+
(i) => zt(i, [
|
|
860
|
+
"timeZoneUniqueId",
|
|
861
|
+
"ianaTimeZoneId",
|
|
862
|
+
"timeZoneName",
|
|
863
|
+
"offset"
|
|
864
|
+
])
|
|
865
|
+
);
|
|
847
866
|
},
|
|
848
867
|
async getAllSpaces() {
|
|
849
|
-
const s = t.spacesBaseUrl || t.baseUrl, n =
|
|
868
|
+
const s = t.spacesBaseUrl || t.baseUrl, n = Fe(s, "/api/AllSpaces"), r = await $e(n, {
|
|
850
869
|
method: "GET",
|
|
851
870
|
headers: e
|
|
852
871
|
});
|
|
@@ -856,12 +875,12 @@ function ba(t) {
|
|
|
856
875
|
}));
|
|
857
876
|
},
|
|
858
877
|
async getMyAppPreferences() {
|
|
859
|
-
const s =
|
|
878
|
+
const s = Fe(t.baseUrl, "/MyProfile"), n = await $e(s, {
|
|
860
879
|
method: "GET",
|
|
861
880
|
headers: e
|
|
862
881
|
}), r = n?.data?.userGuid ?? n?.Data?.userGuid ?? n?.userGuid;
|
|
863
882
|
if (!r) return null;
|
|
864
|
-
const i =
|
|
883
|
+
const i = Fe(t.baseUrl, `/api/GetMyAppPreferences/${r}`), a = await $e(i, {
|
|
865
884
|
method: "GET",
|
|
866
885
|
headers: e
|
|
867
886
|
});
|
|
@@ -1022,7 +1041,7 @@ async function ct(t, e) {
|
|
|
1022
1041
|
}
|
|
1023
1042
|
return i;
|
|
1024
1043
|
}
|
|
1025
|
-
function
|
|
1044
|
+
function Ea(t) {
|
|
1026
1045
|
const e = {
|
|
1027
1046
|
"Content-Type": "application/json",
|
|
1028
1047
|
...t.headers || {}
|
|
@@ -1123,7 +1142,7 @@ function qe(t, e) {
|
|
|
1123
1142
|
const s = (t || "").replace(/\/+$/, ""), n = e.startsWith("/") ? e : `/${e}`;
|
|
1124
1143
|
return `${s}${n}`;
|
|
1125
1144
|
}
|
|
1126
|
-
function
|
|
1145
|
+
function Oa() {
|
|
1127
1146
|
try {
|
|
1128
1147
|
const t = localStorage.getItem("authToken");
|
|
1129
1148
|
return t ? { Authorization: `Bearer ${t}` } : {};
|
|
@@ -1141,7 +1160,7 @@ function as(t, e) {
|
|
|
1141
1160
|
async function Ye(t, e) {
|
|
1142
1161
|
const s = {
|
|
1143
1162
|
...e.headers,
|
|
1144
|
-
...
|
|
1163
|
+
...Oa()
|
|
1145
1164
|
}, n = await fetch(t, { ...e, headers: s });
|
|
1146
1165
|
if (n.status === 401)
|
|
1147
1166
|
throw window.location.href = "/login", new Error("Unauthorized");
|
|
@@ -1329,7 +1348,7 @@ function Da({
|
|
|
1329
1348
|
snl: () => fa(l)
|
|
1330
1349
|
}, d = {
|
|
1331
1350
|
schools: () => ka({ ...u, userManagementBaseUrl: a.userManagementDomain }),
|
|
1332
|
-
transit: () =>
|
|
1351
|
+
transit: () => Ea({ ...u, userManagementBaseUrl: a.userManagementDomain }),
|
|
1333
1352
|
snl: () => ya({ baseUrl: a.alertsBaseUrl, headers: a.headers })
|
|
1334
1353
|
};
|
|
1335
1354
|
return {
|
|
@@ -1368,7 +1387,7 @@ function os(t) {
|
|
|
1368
1387
|
}
|
|
1369
1388
|
function Ts({ value: t, onChange: e, options: s, className: n, dropdownWidth: r }) {
|
|
1370
1389
|
return /* @__PURE__ */ c(
|
|
1371
|
-
|
|
1390
|
+
Pe,
|
|
1372
1391
|
{
|
|
1373
1392
|
className: n,
|
|
1374
1393
|
options: s,
|
|
@@ -1764,7 +1783,7 @@ const Ja = [
|
|
|
1764
1783
|
}
|
|
1765
1784
|
],
|
|
1766
1785
|
["path", { d: "M21 15V5a2 2 0 0 0-2-2H9", key: "43el77" }]
|
|
1767
|
-
],
|
|
1786
|
+
], Er = dn("image-off", Ja);
|
|
1768
1787
|
const Ka = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], Qa = dn("loader-circle", Ka);
|
|
1769
1788
|
const Xa = [
|
|
1770
1789
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
@@ -1778,7 +1797,7 @@ function to(t) {
|
|
|
1778
1797
|
const n = s.mediaUrl ?? s;
|
|
1779
1798
|
return typeof n != "string" || !n.length ? null : { url: n, item: s };
|
|
1780
1799
|
}
|
|
1781
|
-
function
|
|
1800
|
+
function Or({ record: t }) {
|
|
1782
1801
|
const e = ve(() => to(t), [t]), [s, n] = S(!1), [r, i] = S(!1), a = ve(
|
|
1783
1802
|
() => t.bbox_xyxy ? [{ bbox_xyxy: t.bbox_xyxy, personName: t.personName }] : [],
|
|
1784
1803
|
[t.bbox_xyxy, t.personName]
|
|
@@ -1797,7 +1816,7 @@ function Er({ record: t }) {
|
|
|
1797
1816
|
className: "p-0 border-0 bg-transparent rounded-sm focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-1 cursor-pointer disabled:cursor-not-allowed disabled:opacity-60",
|
|
1798
1817
|
"aria-label": r ? "Preview unavailable" : "Expand preview",
|
|
1799
1818
|
onClick: () => n(!0),
|
|
1800
|
-
children: r ? /* @__PURE__ */ c("span", { className: `${d} flex items-center justify-center text-gray-400`, children: /* @__PURE__ */ c(
|
|
1819
|
+
children: r ? /* @__PURE__ */ c("span", { className: `${d} flex items-center justify-center text-gray-400`, children: /* @__PURE__ */ c(Er, { size: 20, "aria-hidden": !0 }) }) : u ? /* @__PURE__ */ c(
|
|
1801
1820
|
"video",
|
|
1802
1821
|
{
|
|
1803
1822
|
src: o,
|
|
@@ -1852,7 +1871,7 @@ function Mr({
|
|
|
1852
1871
|
}, [r]);
|
|
1853
1872
|
const [G, h] = S([
|
|
1854
1873
|
{ label: "All", value: "All" }
|
|
1855
|
-
]), [g, M] = S([]), [ie, ye] = S([]), [
|
|
1874
|
+
]), [g, M] = S([]), [ie, ye] = S([]), [O, N] = S([]), [A, E] = S(/* @__PURE__ */ new Set()), { rules: T, alerts: D, config: L } = Ge(), _ = L.tenant === "schools", Y = L.tenant === "transit", j = so(x, 600), ce = _ && j.trim() ? 100 : s, me = {
|
|
1856
1875
|
6: { title: "Email", kind: "icon", icon: /* @__PURE__ */ c(qi, {}) },
|
|
1857
1876
|
7: { title: "SMS", kind: "icon", icon: /* @__PURE__ */ c(Gi, {}) }
|
|
1858
1877
|
};
|
|
@@ -1898,12 +1917,12 @@ function Mr({
|
|
|
1898
1917
|
};
|
|
1899
1918
|
}, [T]), oe(() => {
|
|
1900
1919
|
if (!m) return;
|
|
1901
|
-
const P =
|
|
1920
|
+
const P = O.find((ge) => ge.value === y), W = {
|
|
1902
1921
|
anomalyId: ie.length > 1 && v !== "All" ? v : void 0,
|
|
1903
1922
|
spaceId: !Y && g.length > 1 && b !== "All" ? b : void 0,
|
|
1904
1923
|
spaceNumber: Y && g.length > 1 && b !== "All" ? b : void 0,
|
|
1905
|
-
severityId:
|
|
1906
|
-
severityName:
|
|
1924
|
+
severityId: O.length > 1 && y !== "All" ? y : void 0,
|
|
1925
|
+
severityName: O.length > 1 && y !== "All" ? P?.label : void 0,
|
|
1907
1926
|
thirdPartyIds: q === "All" ? void 0 : [Number(q)],
|
|
1908
1927
|
searchText: j.trim() || void 0
|
|
1909
1928
|
};
|
|
@@ -1916,11 +1935,11 @@ function Mr({
|
|
|
1916
1935
|
j,
|
|
1917
1936
|
ie.length,
|
|
1918
1937
|
g.length,
|
|
1919
|
-
|
|
1938
|
+
O.length,
|
|
1920
1939
|
Y,
|
|
1921
1940
|
_
|
|
1922
1941
|
]);
|
|
1923
|
-
const
|
|
1942
|
+
const Oe = ie.length > 1 ? ie : void 0, te = g.length > 1 ? g : void 0, Se = O.length > 1 ? O : void 0, ke = [
|
|
1924
1943
|
{
|
|
1925
1944
|
title: "Severity",
|
|
1926
1945
|
dataIndex: "priority",
|
|
@@ -1959,25 +1978,25 @@ function Mr({
|
|
|
1959
1978
|
width: 320,
|
|
1960
1979
|
render: (P, W) => {
|
|
1961
1980
|
if (a) return /* @__PURE__ */ c(rn, { children: a(W) });
|
|
1962
|
-
const ge = async (
|
|
1963
|
-
const bt = Cs(W.id,
|
|
1964
|
-
|
|
1981
|
+
const ge = async (Be, Tt) => {
|
|
1982
|
+
const bt = Cs(W.id, Be);
|
|
1983
|
+
E((xe) => new Set(xe).add(bt));
|
|
1965
1984
|
try {
|
|
1966
|
-
const xe = await D.sendSMSorEmailNotifications?.(W.id,
|
|
1967
|
-
xe?.responseStatus || xe?.Success || xe?.success ? (
|
|
1968
|
-
xe?.message || xe.data || (
|
|
1969
|
-
), l?.()) :
|
|
1985
|
+
const xe = await D.sendSMSorEmailNotifications?.(W.id, Be, Tt);
|
|
1986
|
+
xe?.responseStatus || xe?.Success || xe?.success ? (Ee.success(
|
|
1987
|
+
xe?.message || xe.data || (Be ? "Email sent successfully" : "SMS sent successfully")
|
|
1988
|
+
), l?.()) : Ee.error(
|
|
1970
1989
|
xe?.message || xe?.data || xe?.errorMessage || "Failed to send notification"
|
|
1971
1990
|
);
|
|
1972
1991
|
} catch (xe) {
|
|
1973
|
-
|
|
1992
|
+
Ee.error(xe?.message || "Failed to send notification");
|
|
1974
1993
|
} finally {
|
|
1975
|
-
|
|
1994
|
+
E((xe) => {
|
|
1976
1995
|
const It = new Set(xe);
|
|
1977
1996
|
return It.delete(bt), It;
|
|
1978
1997
|
});
|
|
1979
1998
|
}
|
|
1980
|
-
}, ue = cn,
|
|
1999
|
+
}, ue = cn, Ve = un, be = me[ue], Ke = me[Ve], Me = Un(ue, W, be?.title), Ne = Un(Ve, W, Ke?.title), Pt = Cs(W.id, !0), pt = Cs(W.id, !1), Nt = os(ue) && A.has(Pt), nt = os(Ve) && A.has(pt);
|
|
1981
2000
|
return /* @__PURE__ */ f(st, { size: "middle", children: [
|
|
1982
2001
|
/* @__PURE__ */ c(In, { title: Me.tooltipTitle, children: /* @__PURE__ */ c(
|
|
1983
2002
|
ze,
|
|
@@ -1998,13 +2017,13 @@ function Mr({
|
|
|
1998
2017
|
size: "small",
|
|
1999
2018
|
disabled: Ne.isDisabled,
|
|
2000
2019
|
loading: nt,
|
|
2001
|
-
onClick: os(
|
|
2020
|
+
onClick: os(Ve) ? () => ge(!1, !0) : void 0,
|
|
2002
2021
|
icon: !nt && Ke?.icon,
|
|
2003
2022
|
className: "flex flex-col items-center justify-center gap-1",
|
|
2004
2023
|
style: { height: "fit-content" },
|
|
2005
2024
|
children: Ne.buttonText
|
|
2006
2025
|
}
|
|
2007
|
-
) }, String(
|
|
2026
|
+
) }, String(Ve))
|
|
2008
2027
|
] });
|
|
2009
2028
|
}
|
|
2010
2029
|
},
|
|
@@ -2014,7 +2033,7 @@ function Mr({
|
|
|
2014
2033
|
key: "timestamp",
|
|
2015
2034
|
width: 220,
|
|
2016
2035
|
render: (P, W) => {
|
|
2017
|
-
const ge = W?.timeElapsed, ue = W?.timeRemaining,
|
|
2036
|
+
const ge = W?.timeElapsed, ue = W?.timeRemaining, Ve = ge ? En(ge) : 0, be = ue ? En(ue) : 0, Ke = Math.round(Ve / (Ve + be) * 100);
|
|
2018
2037
|
return /* @__PURE__ */ f("div", { children: [
|
|
2019
2038
|
/* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
|
|
2020
2039
|
/* @__PURE__ */ c("span", { className: "w-[70px]", children: "Elapsed:" }),
|
|
@@ -2065,7 +2084,7 @@ function Mr({
|
|
|
2065
2084
|
key: "preview",
|
|
2066
2085
|
width: 100,
|
|
2067
2086
|
align: "center",
|
|
2068
|
-
render: (P, W) => /* @__PURE__ */ c(
|
|
2087
|
+
render: (P, W) => /* @__PURE__ */ c(Or, { record: W })
|
|
2069
2088
|
}
|
|
2070
2089
|
], pe = i && i.length ? i : ke;
|
|
2071
2090
|
return /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(
|
|
@@ -2098,7 +2117,7 @@ function Mr({
|
|
|
2098
2117
|
{
|
|
2099
2118
|
value: v,
|
|
2100
2119
|
onChange: k,
|
|
2101
|
-
options:
|
|
2120
|
+
options: Oe
|
|
2102
2121
|
}
|
|
2103
2122
|
)
|
|
2104
2123
|
] }) }),
|
|
@@ -2895,13 +2914,13 @@ class re {
|
|
|
2895
2914
|
}
|
|
2896
2915
|
}
|
|
2897
2916
|
let Ls = null;
|
|
2898
|
-
class
|
|
2917
|
+
class We extends Kt {
|
|
2899
2918
|
/**
|
|
2900
2919
|
* Get a singleton instance of UTC
|
|
2901
2920
|
* @return {FixedOffsetZone}
|
|
2902
2921
|
*/
|
|
2903
2922
|
static get utcInstance() {
|
|
2904
|
-
return Ls === null && (Ls = new
|
|
2923
|
+
return Ls === null && (Ls = new We(0)), Ls;
|
|
2905
2924
|
}
|
|
2906
2925
|
/**
|
|
2907
2926
|
* Get an instance with a specified offset
|
|
@@ -2909,7 +2928,7 @@ class $e extends Kt {
|
|
|
2909
2928
|
* @return {FixedOffsetZone}
|
|
2910
2929
|
*/
|
|
2911
2930
|
static instance(e) {
|
|
2912
|
-
return e === 0 ?
|
|
2931
|
+
return e === 0 ? We.utcInstance : new We(e);
|
|
2913
2932
|
}
|
|
2914
2933
|
/**
|
|
2915
2934
|
* Get an instance of FixedOffsetZone from a UTC offset string, like "UTC+6"
|
|
@@ -2923,7 +2942,7 @@ class $e extends Kt {
|
|
|
2923
2942
|
if (e) {
|
|
2924
2943
|
const s = e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);
|
|
2925
2944
|
if (s)
|
|
2926
|
-
return new
|
|
2945
|
+
return new We(xs(s[1], s[2]));
|
|
2927
2946
|
}
|
|
2928
2947
|
return null;
|
|
2929
2948
|
}
|
|
@@ -3058,8 +3077,8 @@ function ht(t, e) {
|
|
|
3058
3077
|
return t;
|
|
3059
3078
|
if (Ro(t)) {
|
|
3060
3079
|
const s = t.toLowerCase();
|
|
3061
|
-
return s === "default" ? e : s === "local" || s === "system" ? bs.instance : s === "utc" || s === "gmt" ?
|
|
3062
|
-
} else return yt(t) ?
|
|
3080
|
+
return s === "default" ? e : s === "local" || s === "system" ? bs.instance : s === "utc" || s === "gmt" ? We.utcInstance : We.parseSpecifier(s) || lt.create(t);
|
|
3081
|
+
} else return yt(t) ? We.instance(t) : typeof t == "object" && "offset" in t && typeof t.offset == "function" ? t : new xo(t);
|
|
3063
3082
|
}
|
|
3064
3083
|
const mn = {
|
|
3065
3084
|
arab: "[٠-٩]",
|
|
@@ -3103,15 +3122,15 @@ const mn = {
|
|
|
3103
3122
|
telu: [3174, 3183],
|
|
3104
3123
|
thai: [3664, 3673],
|
|
3105
3124
|
tibt: [3872, 3881]
|
|
3106
|
-
},
|
|
3107
|
-
function
|
|
3125
|
+
}, Eo = mn.hanidec.replace(/[\[|\]]/g, "").split("");
|
|
3126
|
+
function Oo(t) {
|
|
3108
3127
|
let e = parseInt(t, 10);
|
|
3109
3128
|
if (isNaN(e)) {
|
|
3110
3129
|
e = "";
|
|
3111
3130
|
for (let s = 0; s < t.length; s++) {
|
|
3112
3131
|
const n = t.charCodeAt(s);
|
|
3113
3132
|
if (t[s].search(mn.hanidec) !== -1)
|
|
3114
|
-
e +=
|
|
3133
|
+
e += Eo.indexOf(t[s]);
|
|
3115
3134
|
else
|
|
3116
3135
|
for (const r in Wn) {
|
|
3117
3136
|
const [i, a] = Wn[r];
|
|
@@ -3307,22 +3326,22 @@ function hn(t, e) {
|
|
|
3307
3326
|
function vs(t, e = 4, s = 1) {
|
|
3308
3327
|
const { year: n, month: r, day: i } = t, a = si(n, r, i), o = hn(fn(n, r, i), s);
|
|
3309
3328
|
let l = Math.floor((a - o + 14 - e) / 7), u;
|
|
3310
|
-
return l < 1 ? (u = n - 1, l = _t(u, e, s)) : l > _t(n, e, s) ? (u = n + 1, l = 1) : u = n, { weekYear: u, weekNumber: l, weekday: o, ...
|
|
3329
|
+
return l < 1 ? (u = n - 1, l = _t(u, e, s)) : l > _t(n, e, s) ? (u = n + 1, l = 1) : u = n, { weekYear: u, weekNumber: l, weekday: o, ...Es(t) };
|
|
3311
3330
|
}
|
|
3312
3331
|
function _n(t, e = 4, s = 1) {
|
|
3313
3332
|
const { weekYear: n, weekNumber: r, weekday: i } = t, a = hn(fn(n, 1, e), s), o = Dt(n);
|
|
3314
3333
|
let l = r * 7 + i - a - 7 + e, u;
|
|
3315
3334
|
l < 1 ? (u = n - 1, l += Dt(u)) : l > o ? (u = n + 1, l -= Dt(n)) : u = n;
|
|
3316
3335
|
const { month: m, day: d } = ni(u, l);
|
|
3317
|
-
return { year: u, month: m, day: d, ...
|
|
3336
|
+
return { year: u, month: m, day: d, ...Es(t) };
|
|
3318
3337
|
}
|
|
3319
3338
|
function Fs(t) {
|
|
3320
3339
|
const { year: e, month: s, day: n } = t, r = si(e, s, n);
|
|
3321
|
-
return { year: e, ordinal: r, ...
|
|
3340
|
+
return { year: e, ordinal: r, ...Es(t) };
|
|
3322
3341
|
}
|
|
3323
3342
|
function jn(t) {
|
|
3324
3343
|
const { year: e, ordinal: s } = t, { month: n, day: r } = ni(e, s);
|
|
3325
|
-
return { year: e, month: n, day: r, ...
|
|
3344
|
+
return { year: e, month: n, day: r, ...Es(t) };
|
|
3326
3345
|
}
|
|
3327
3346
|
function Jn(t, e) {
|
|
3328
3347
|
if (!$(t.localWeekday) || !$(t.localWeekNumber) || !$(t.localWeekYear)) {
|
|
@@ -3537,7 +3556,7 @@ function Yt(t, e) {
|
|
|
3537
3556
|
throw new RangeError(`Value format ${e} is out of range for property format`);
|
|
3538
3557
|
}
|
|
3539
3558
|
}
|
|
3540
|
-
function
|
|
3559
|
+
function Es(t) {
|
|
3541
3560
|
return Fo(t, ["hour", "minute", "second", "millisecond"]);
|
|
3542
3561
|
}
|
|
3543
3562
|
const Po = [
|
|
@@ -3980,7 +3999,7 @@ function $t(t, e) {
|
|
|
3980
3999
|
}, null, e + 4];
|
|
3981
4000
|
}
|
|
3982
4001
|
function Xt(t, e) {
|
|
3983
|
-
const s = !t[e] && !t[e + 1], n = xs(t[e + 1], t[e + 2]), r = s ? null :
|
|
4002
|
+
const s = !t[e] && !t[e + 1], n = xs(t[e + 1], t[e + 2]), r = s ? null : We.instance(n);
|
|
3984
4003
|
return [{}, r, e + 3];
|
|
3985
4004
|
}
|
|
3986
4005
|
function es(t, e) {
|
|
@@ -4041,7 +4060,7 @@ function ul(t) {
|
|
|
4041
4060
|
d
|
|
4042
4061
|
] = t, y = vn(e, r, n, s, i, a, o);
|
|
4043
4062
|
let p;
|
|
4044
|
-
return l ? p = ll[l] : u ? p = 0 : p = xs(m, d), [y, new
|
|
4063
|
+
return l ? p = ll[l] : u ? p = 0 : p = xs(m, d), [y, new We(p)];
|
|
4045
4064
|
}
|
|
4046
4065
|
function dl(t) {
|
|
4047
4066
|
return t.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").trim();
|
|
@@ -4049,11 +4068,11 @@ function dl(t) {
|
|
|
4049
4068
|
const ml = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/, fl = /^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/, hl = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;
|
|
4050
4069
|
function er(t) {
|
|
4051
4070
|
const [, e, s, n, r, i, a, o] = t;
|
|
4052
|
-
return [vn(e, r, n, s, i, a, o),
|
|
4071
|
+
return [vn(e, r, n, s, i, a, o), We.utcInstance];
|
|
4053
4072
|
}
|
|
4054
4073
|
function yl(t) {
|
|
4055
4074
|
const [, e, s, n, r, i, a, o] = t;
|
|
4056
|
-
return [vn(e, o, s, n, r, i, a),
|
|
4075
|
+
return [vn(e, o, s, n, r, i, a), We.utcInstance];
|
|
4057
4076
|
}
|
|
4058
4077
|
const pl = Ut(Ko, Sn), gl = Ut(Qo, Sn), Sl = Ut(Xo, Sn), vl = Ut(wi), Ni = Lt(
|
|
4059
4078
|
rl,
|
|
@@ -4099,10 +4118,10 @@ function kl(t) {
|
|
|
4099
4118
|
return Ft(t, [al, ol]);
|
|
4100
4119
|
}
|
|
4101
4120
|
const xl = Lt($t);
|
|
4102
|
-
function
|
|
4121
|
+
function El(t) {
|
|
4103
4122
|
return Ft(t, [il, xl]);
|
|
4104
4123
|
}
|
|
4105
|
-
const
|
|
4124
|
+
const Ol = Ut(sl, nl), Ml = Ut(Ai), Dl = Lt(
|
|
4106
4125
|
$t,
|
|
4107
4126
|
Xt,
|
|
4108
4127
|
es
|
|
@@ -4110,7 +4129,7 @@ const El = Ut(sl, nl), Ml = Ut(Ai), Dl = Lt(
|
|
|
4110
4129
|
function Cl(t) {
|
|
4111
4130
|
return Ft(
|
|
4112
4131
|
t,
|
|
4113
|
-
[
|
|
4132
|
+
[Ol, Ni],
|
|
4114
4133
|
[Ml, Dl]
|
|
4115
4134
|
);
|
|
4116
4135
|
}
|
|
@@ -4350,7 +4369,7 @@ class X {
|
|
|
4350
4369
|
* @return {Duration}
|
|
4351
4370
|
*/
|
|
4352
4371
|
static fromISOTime(e, s) {
|
|
4353
|
-
const [n] =
|
|
4372
|
+
const [n] = El(e);
|
|
4354
4373
|
return n ? X.fromObject(n, s) : X.invalid("unparsable", `the input "${e}" can't be parsed as ISO 8601`);
|
|
4355
4374
|
}
|
|
4356
4375
|
/**
|
|
@@ -5509,7 +5528,7 @@ function Pl(t, e, s, n) {
|
|
|
5509
5528
|
}
|
|
5510
5529
|
const Wl = "missing Intl.DateTimeFormat.formatToParts support";
|
|
5511
5530
|
function ee(t, e = (s) => s) {
|
|
5512
|
-
return { regex: t, deser: ([s]) => e(
|
|
5531
|
+
return { regex: t, deser: ([s]) => e(Oo(s)) };
|
|
5513
5532
|
}
|
|
5514
5533
|
const Vl = " ", Ii = `[ ${Vl}]`, ki = new RegExp(Ii, "g");
|
|
5515
5534
|
function Bl(t) {
|
|
@@ -5772,7 +5791,7 @@ function _l(t) {
|
|
|
5772
5791
|
}
|
|
5773
5792
|
};
|
|
5774
5793
|
let s = null, n;
|
|
5775
|
-
return $(t.z) || (s = lt.create(t.z)), $(t.Z) || (s || (s = new
|
|
5794
|
+
return $(t.z) || (s = lt.create(t.z)), $(t.Z) || (s || (s = new We(t.Z)), n = t.Z), $(t.q) || (t.M = (t.q - 1) * 3 + 1), $(t.h) || (t.h < 12 && t.a === 1 ? t.h += 12 : t.h === 12 && t.a === 0 && (t.h = 0)), t.G === 0 && t.y && (t.y = -t.y), $(t.u) || (t.S = yn(t.u)), [Object.keys(t).reduce((i, a) => {
|
|
5776
5795
|
const o = e(a);
|
|
5777
5796
|
return o && (i[o] = t[a]), i;
|
|
5778
5797
|
}, {}), s, n];
|
|
@@ -5790,7 +5809,7 @@ function Jl(t, e) {
|
|
|
5790
5809
|
function xi(t, e) {
|
|
5791
5810
|
return Array.prototype.concat(...t.map((s) => Jl(s, e)));
|
|
5792
5811
|
}
|
|
5793
|
-
class
|
|
5812
|
+
class Ei {
|
|
5794
5813
|
constructor(e, s) {
|
|
5795
5814
|
if (this.locale = e, this.format = s, this.tokens = xi(Ce.parseFormat(s), e), this.units = this.tokens.map((n) => zl(n, e)), this.disqualifyingUnit = this.units.find((n) => n.invalidReason), !this.disqualifyingUnit) {
|
|
5796
5815
|
const [n, r] = ql(this.units);
|
|
@@ -5824,11 +5843,11 @@ class Oi {
|
|
|
5824
5843
|
return this.disqualifyingUnit ? this.disqualifyingUnit.invalidReason : null;
|
|
5825
5844
|
}
|
|
5826
5845
|
}
|
|
5827
|
-
function
|
|
5828
|
-
return new
|
|
5846
|
+
function Oi(t, e, s) {
|
|
5847
|
+
return new Ei(t, s).explainFromTokens(e);
|
|
5829
5848
|
}
|
|
5830
5849
|
function Kl(t, e, s) {
|
|
5831
|
-
const { result: n, zone: r, specificOffset: i, invalidReason: a } =
|
|
5850
|
+
const { result: n, zone: r, specificOffset: i, invalidReason: a } = Oi(t, e, s);
|
|
5832
5851
|
return [n, r, i, a];
|
|
5833
5852
|
}
|
|
5834
5853
|
function Mi(t, e) {
|
|
@@ -5907,7 +5926,7 @@ function lr(t, e) {
|
|
|
5907
5926
|
let [l, u] = Di(o, s, t.zone);
|
|
5908
5927
|
return a !== 0 && (l += a, u = t.zone.offset(l)), { ts: l, o: u };
|
|
5909
5928
|
}
|
|
5910
|
-
function
|
|
5929
|
+
function Et(t, e, s, n, r, i) {
|
|
5911
5930
|
const { setZone: a, zone: o } = s;
|
|
5912
5931
|
if (t && Object.keys(t).length !== 0 || e) {
|
|
5913
5932
|
const l = e || o, u = F.fromObject(t, {
|
|
@@ -6156,7 +6175,7 @@ class F {
|
|
|
6156
6175
|
*/
|
|
6157
6176
|
static utc() {
|
|
6158
6177
|
const [e, s] = fr(arguments), [n, r, i, a, o, l, u] = s;
|
|
6159
|
-
return e.zone =
|
|
6178
|
+
return e.zone = We.utcInstance, dr({ year: n, month: r, day: i, hour: a, minute: o, second: l, millisecond: u }, e);
|
|
6160
6179
|
}
|
|
6161
6180
|
/**
|
|
6162
6181
|
* Create a DateTime from a JavaScript Date object. Uses the default zone.
|
|
@@ -6304,7 +6323,7 @@ class F {
|
|
|
6304
6323
|
*/
|
|
6305
6324
|
static fromISO(e, s = {}) {
|
|
6306
6325
|
const [n, r] = Tl(e);
|
|
6307
|
-
return
|
|
6326
|
+
return Et(n, r, s, "ISO 8601", e);
|
|
6308
6327
|
}
|
|
6309
6328
|
/**
|
|
6310
6329
|
* Create a DateTime from an RFC 2822 string
|
|
@@ -6323,7 +6342,7 @@ class F {
|
|
|
6323
6342
|
*/
|
|
6324
6343
|
static fromRFC2822(e, s = {}) {
|
|
6325
6344
|
const [n, r] = bl(e);
|
|
6326
|
-
return
|
|
6345
|
+
return Et(n, r, s, "RFC 2822", e);
|
|
6327
6346
|
}
|
|
6328
6347
|
/**
|
|
6329
6348
|
* Create a DateTime from an HTTP header date
|
|
@@ -6343,7 +6362,7 @@ class F {
|
|
|
6343
6362
|
*/
|
|
6344
6363
|
static fromHTTP(e, s = {}) {
|
|
6345
6364
|
const [n, r] = Il(e);
|
|
6346
|
-
return
|
|
6365
|
+
return Et(n, r, s, "HTTP", s);
|
|
6347
6366
|
}
|
|
6348
6367
|
/**
|
|
6349
6368
|
* Create a DateTime from an input string and format string.
|
|
@@ -6367,7 +6386,7 @@ class F {
|
|
|
6367
6386
|
numberingSystem: i,
|
|
6368
6387
|
defaultToEN: !0
|
|
6369
6388
|
}), [o, l, u, m] = Kl(a, e, s);
|
|
6370
|
-
return m ? F.invalid(m) :
|
|
6389
|
+
return m ? F.invalid(m) : Et(o, l, n, `format ${s}`, e, u);
|
|
6371
6390
|
}
|
|
6372
6391
|
/**
|
|
6373
6392
|
* @deprecated use fromFormat instead
|
|
@@ -6398,7 +6417,7 @@ class F {
|
|
|
6398
6417
|
*/
|
|
6399
6418
|
static fromSQL(e, s = {}) {
|
|
6400
6419
|
const [n, r] = Cl(e);
|
|
6401
|
-
return
|
|
6420
|
+
return Et(n, r, s, "SQL", e);
|
|
6402
6421
|
}
|
|
6403
6422
|
/**
|
|
6404
6423
|
* Create an invalid DateTime.
|
|
@@ -6820,7 +6839,7 @@ class F {
|
|
|
6820
6839
|
* @return {DateTime}
|
|
6821
6840
|
*/
|
|
6822
6841
|
toUTC(e = 0, s = {}) {
|
|
6823
|
-
return this.setZone(
|
|
6842
|
+
return this.setZone(We.instance(e), s);
|
|
6824
6843
|
}
|
|
6825
6844
|
/**
|
|
6826
6845
|
* "Set" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime.
|
|
@@ -7433,7 +7452,7 @@ class F {
|
|
|
7433
7452
|
numberingSystem: i,
|
|
7434
7453
|
defaultToEN: !0
|
|
7435
7454
|
});
|
|
7436
|
-
return
|
|
7455
|
+
return Oi(a, e, s);
|
|
7437
7456
|
}
|
|
7438
7457
|
/**
|
|
7439
7458
|
* @deprecated use fromFormatExplain instead
|
|
@@ -7459,7 +7478,7 @@ class F {
|
|
|
7459
7478
|
numberingSystem: r,
|
|
7460
7479
|
defaultToEN: !0
|
|
7461
7480
|
});
|
|
7462
|
-
return new
|
|
7481
|
+
return new Ei(i, e);
|
|
7463
7482
|
}
|
|
7464
7483
|
/**
|
|
7465
7484
|
* Create a DateTime from an input string and format parser.
|
|
@@ -7486,7 +7505,7 @@ class F {
|
|
|
7486
7505
|
`fromFormatParser called with a locale of ${a}, but the format parser was created for ${s.locale}`
|
|
7487
7506
|
);
|
|
7488
7507
|
const { result: o, zone: l, specificOffset: u, invalidReason: m } = s.explainFromTokens(e);
|
|
7489
|
-
return m ? F.invalid(m) :
|
|
7508
|
+
return m ? F.invalid(m) : Et(
|
|
7490
7509
|
o,
|
|
7491
7510
|
l,
|
|
7492
7511
|
n,
|
|
@@ -7730,13 +7749,13 @@ function lc({
|
|
|
7730
7749
|
});
|
|
7731
7750
|
if (b?.responseStatus || b?.Success) {
|
|
7732
7751
|
const B = b?.Message || b?.data || "Alert reopened successfully.";
|
|
7733
|
-
|
|
7752
|
+
Ee.success(B);
|
|
7734
7753
|
} else {
|
|
7735
7754
|
const B = b?.errorMessage || b?.Message || "Failed to reopen alert";
|
|
7736
|
-
|
|
7755
|
+
Ee.error(B);
|
|
7737
7756
|
}
|
|
7738
7757
|
} catch {
|
|
7739
|
-
|
|
7758
|
+
Ee.error("Failed to reopen alert. Please try again.");
|
|
7740
7759
|
}
|
|
7741
7760
|
}, p = [
|
|
7742
7761
|
{
|
|
@@ -7792,7 +7811,7 @@ function lc({
|
|
|
7792
7811
|
key: "preview",
|
|
7793
7812
|
width: 100,
|
|
7794
7813
|
align: "center",
|
|
7795
|
-
render: (k, b) => /* @__PURE__ */ c(
|
|
7814
|
+
render: (k, b) => /* @__PURE__ */ c(Or, { record: b })
|
|
7796
7815
|
},
|
|
7797
7816
|
{
|
|
7798
7817
|
title: "",
|
|
@@ -7814,8 +7833,8 @@ function lc({
|
|
|
7814
7833
|
)
|
|
7815
7834
|
}
|
|
7816
7835
|
], v = o ? t : (t || []).filter((k) => {
|
|
7817
|
-
const b =
|
|
7818
|
-
return no.some((B) => b.includes(
|
|
7836
|
+
const b = On(k.statusType || "");
|
|
7837
|
+
return no.some((B) => b.includes(On(B)));
|
|
7819
7838
|
});
|
|
7820
7839
|
return /* @__PURE__ */ c(
|
|
7821
7840
|
Mr,
|
|
@@ -7995,7 +8014,7 @@ function mc({ sortBy: t, onChange: e, showActions: s, onSave: n, onClear: r, sav
|
|
|
7995
8014
|
/* @__PURE__ */ c(K, { xs: 24, md: 8, lg: 5, children: /* @__PURE__ */ f(st, { className: "w-full items-center", direction: "horizontal", size: 12, children: [
|
|
7996
8015
|
/* @__PURE__ */ c(dc, { className: "text-gray-600 whitespace-nowrap", children: "Sort By:" }),
|
|
7997
8016
|
/* @__PURE__ */ c(
|
|
7998
|
-
|
|
8017
|
+
Pe,
|
|
7999
8018
|
{
|
|
8000
8019
|
placeholder: "By Severity",
|
|
8001
8020
|
value: t,
|
|
@@ -8054,13 +8073,13 @@ function fc(t) {
|
|
|
8054
8073
|
onSave: M,
|
|
8055
8074
|
saving: ie,
|
|
8056
8075
|
onActionTypesLoaded: ye
|
|
8057
|
-
} = t, { rules:
|
|
8076
|
+
} = t, { rules: O, config: N } = Ge(), A = N.tenant === "schools", [E, T] = S([]), [D, L] = S([]), [_, Y] = S(!1);
|
|
8058
8077
|
oe(() => {
|
|
8059
8078
|
let te = !1;
|
|
8060
8079
|
return (async () => {
|
|
8061
8080
|
try {
|
|
8062
8081
|
Y(!0);
|
|
8063
|
-
const Se = await
|
|
8082
|
+
const Se = await O.getLookups();
|
|
8064
8083
|
if (te || !Se || !Array.isArray(Se.actionTypes)) return;
|
|
8065
8084
|
const ke = Se.actionTypes.map((P) => ({ label: P.name, value: String(P.actionTypeId) }));
|
|
8066
8085
|
T(ke), ye && ye(Se.actionTypes);
|
|
@@ -8081,7 +8100,7 @@ function fc(t) {
|
|
|
8081
8100
|
/* @__PURE__ */ c(K, { xs: 24, sm: 12, md: 8, lg: 4, children: /* @__PURE__ */ f("div", { children: [
|
|
8082
8101
|
/* @__PURE__ */ c(ot, { className: "text-gray-700 font-medium block mb-1", children: "Rules" }),
|
|
8083
8102
|
/* @__PURE__ */ c(
|
|
8084
|
-
|
|
8103
|
+
Pe,
|
|
8085
8104
|
{
|
|
8086
8105
|
placeholder: "Rules",
|
|
8087
8106
|
value: e,
|
|
@@ -8098,7 +8117,7 @@ function fc(t) {
|
|
|
8098
8117
|
] }),
|
|
8099
8118
|
/* @__PURE__ */ f(Ze, { gutter: 8, children: [
|
|
8100
8119
|
/* @__PURE__ */ c(K, { span: 10, children: /* @__PURE__ */ c(
|
|
8101
|
-
|
|
8120
|
+
Pe,
|
|
8102
8121
|
{
|
|
8103
8122
|
className: "w-full",
|
|
8104
8123
|
placeholder: "Mins",
|
|
@@ -8108,7 +8127,7 @@ function fc(t) {
|
|
|
8108
8127
|
}
|
|
8109
8128
|
) }),
|
|
8110
8129
|
/* @__PURE__ */ c(K, { span: 14, children: /* @__PURE__ */ c(
|
|
8111
|
-
|
|
8130
|
+
Pe,
|
|
8112
8131
|
{
|
|
8113
8132
|
placeholder: "Escalate to",
|
|
8114
8133
|
className: "w-full",
|
|
@@ -8126,7 +8145,7 @@ function fc(t) {
|
|
|
8126
8145
|
] }),
|
|
8127
8146
|
/* @__PURE__ */ f(Ze, { gutter: 8, children: [
|
|
8128
8147
|
/* @__PURE__ */ c(K, { span: 10, children: /* @__PURE__ */ c(
|
|
8129
|
-
|
|
8148
|
+
Pe,
|
|
8130
8149
|
{
|
|
8131
8150
|
className: "w-full",
|
|
8132
8151
|
placeholder: "Mins",
|
|
@@ -8136,7 +8155,7 @@ function fc(t) {
|
|
|
8136
8155
|
}
|
|
8137
8156
|
) }),
|
|
8138
8157
|
/* @__PURE__ */ c(K, { span: 14, children: /* @__PURE__ */ c(
|
|
8139
|
-
|
|
8158
|
+
Pe,
|
|
8140
8159
|
{
|
|
8141
8160
|
placeholder: "Escalate to",
|
|
8142
8161
|
className: "w-full",
|
|
@@ -8154,7 +8173,7 @@ function fc(t) {
|
|
|
8154
8173
|
] }),
|
|
8155
8174
|
/* @__PURE__ */ f(Ze, { gutter: 8, children: [
|
|
8156
8175
|
/* @__PURE__ */ c(K, { span: 10, children: /* @__PURE__ */ c(
|
|
8157
|
-
|
|
8176
|
+
Pe,
|
|
8158
8177
|
{
|
|
8159
8178
|
className: "w-full",
|
|
8160
8179
|
placeholder: "Mins",
|
|
@@ -8164,7 +8183,7 @@ function fc(t) {
|
|
|
8164
8183
|
}
|
|
8165
8184
|
) }),
|
|
8166
8185
|
/* @__PURE__ */ c(K, { span: 14, children: /* @__PURE__ */ c(
|
|
8167
|
-
|
|
8186
|
+
Pe,
|
|
8168
8187
|
{
|
|
8169
8188
|
placeholder: "Escalate to",
|
|
8170
8189
|
className: "w-full",
|
|
@@ -8178,14 +8197,14 @@ function fc(t) {
|
|
|
8178
8197
|
/* @__PURE__ */ c(K, { xs: 24, sm: 12, md: 8, lg: 4, children: /* @__PURE__ */ f("div", { children: [
|
|
8179
8198
|
/* @__PURE__ */ c(ot, { className: "text-gray-700 font-medium block mb-1", children: "Pick Actions" }),
|
|
8180
8199
|
/* @__PURE__ */ c(
|
|
8181
|
-
|
|
8200
|
+
Pe,
|
|
8182
8201
|
{
|
|
8183
8202
|
mode: "multiple",
|
|
8184
8203
|
placeholder: "Select response actions",
|
|
8185
8204
|
className: "w-full",
|
|
8186
8205
|
value: q,
|
|
8187
8206
|
onChange: Q,
|
|
8188
|
-
options:
|
|
8207
|
+
options: E,
|
|
8189
8208
|
maxTagCount: 1,
|
|
8190
8209
|
maxTagPlaceholder: nn
|
|
8191
8210
|
}
|
|
@@ -8194,7 +8213,7 @@ function fc(t) {
|
|
|
8194
8213
|
/* @__PURE__ */ c(K, { xs: 24, sm: 12, md: 8, lg: 4, children: /* @__PURE__ */ f("div", { children: [
|
|
8195
8214
|
/* @__PURE__ */ c(ot, { className: "text-gray-700 font-medium block mb-1", children: "Notify" }),
|
|
8196
8215
|
/* @__PURE__ */ c(
|
|
8197
|
-
|
|
8216
|
+
Pe,
|
|
8198
8217
|
{
|
|
8199
8218
|
mode: "multiple",
|
|
8200
8219
|
placeholder: "Notify",
|
|
@@ -8210,8 +8229,8 @@ function fc(t) {
|
|
|
8210
8229
|
] }),
|
|
8211
8230
|
/* @__PURE__ */ f(Ze, { gutter: [16, 16], align: "bottom", className: "mt-4 items-center", children: [
|
|
8212
8231
|
/* @__PURE__ */ c(K, { xs: 24, sm: 12, md: 8, lg: 7, children: /* @__PURE__ */ f("div", { className: "flex items-center h-full gap-8", children: [
|
|
8213
|
-
!A && /* @__PURE__ */ c(
|
|
8214
|
-
/* @__PURE__ */ c(
|
|
8232
|
+
!A && /* @__PURE__ */ c(Ot, { checked: Z, onChange: (te) => R(te.target.checked), className: "w-full", children: "Human-In-The-Loop" }),
|
|
8233
|
+
/* @__PURE__ */ c(Ot, { checked: G, onChange: (te) => h(te.target.checked), className: "w-full", children: "Auto-expire in 5 minutes" })
|
|
8215
8234
|
] }) }),
|
|
8216
8235
|
/* @__PURE__ */ c(K, { xs: 24, sm: 12, md: 8, children: /* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
|
|
8217
8236
|
/* @__PURE__ */ c(ze, { onClick: g, children: "Clear" }),
|
|
@@ -8342,7 +8361,7 @@ function pc({ userRoles: t, rules: e, rawRules: s }) {
|
|
|
8342
8361
|
/* @__PURE__ */ c(K, { xs: 24, sm: 12, md: 8, lg: 6, children: /* @__PURE__ */ f("div", { children: [
|
|
8343
8362
|
/* @__PURE__ */ c(Zs, { className: "text-gray-700 font-medium block mb-1", children: "Rules" }),
|
|
8344
8363
|
/* @__PURE__ */ c(
|
|
8345
|
-
|
|
8364
|
+
Pe,
|
|
8346
8365
|
{
|
|
8347
8366
|
placeholder: "Rules",
|
|
8348
8367
|
value: m,
|
|
@@ -8355,7 +8374,7 @@ function pc({ userRoles: t, rules: e, rawRules: s }) {
|
|
|
8355
8374
|
/* @__PURE__ */ c(K, { xs: 24, sm: 12, md: 8, lg: 8, children: /* @__PURE__ */ f("div", { children: [
|
|
8356
8375
|
/* @__PURE__ */ c(Zs, { className: "text-gray-700 font-medium block mb-1", children: "Alert Notification To" }),
|
|
8357
8376
|
/* @__PURE__ */ c(
|
|
8358
|
-
|
|
8377
|
+
Pe,
|
|
8359
8378
|
{
|
|
8360
8379
|
mode: "multiple",
|
|
8361
8380
|
placeholder: "Select roles",
|
|
@@ -8378,7 +8397,7 @@ function pc({ userRoles: t, rules: e, rawRules: s }) {
|
|
|
8378
8397
|
type: "primary",
|
|
8379
8398
|
onClick: async () => {
|
|
8380
8399
|
if (!m) {
|
|
8381
|
-
|
|
8400
|
+
Ee.info("Please select a rule");
|
|
8382
8401
|
return;
|
|
8383
8402
|
}
|
|
8384
8403
|
try {
|
|
@@ -8398,9 +8417,9 @@ function pc({ userRoles: t, rules: e, rawRules: s }) {
|
|
|
8398
8417
|
userRoles: Z
|
|
8399
8418
|
}, G = await n.updateRule(C, R);
|
|
8400
8419
|
if (!G?.responseStatus && !G?.Success && !G?.success)
|
|
8401
|
-
|
|
8420
|
+
Ee.error(G?.errorMessage || G?.Message || "Error saving Alert Assignment");
|
|
8402
8421
|
else {
|
|
8403
|
-
|
|
8422
|
+
Ee.success("Alert assignment saved"), d(void 0), p([]);
|
|
8404
8423
|
try {
|
|
8405
8424
|
const h = await n.getRules();
|
|
8406
8425
|
u(Array.isArray(h) ? h : []);
|
|
@@ -8409,7 +8428,7 @@ function pc({ userRoles: t, rules: e, rawRules: s }) {
|
|
|
8409
8428
|
}
|
|
8410
8429
|
}
|
|
8411
8430
|
} catch (x) {
|
|
8412
|
-
console.error("Failed to save alert assignment", x),
|
|
8431
|
+
console.error("Failed to save alert assignment", x), Ee.error(x instanceof Error ? x.message : "Error saving Alert Assignment");
|
|
8413
8432
|
} finally {
|
|
8414
8433
|
o(!1);
|
|
8415
8434
|
}
|
|
@@ -8467,14 +8486,14 @@ function zs(t) {
|
|
|
8467
8486
|
};
|
|
8468
8487
|
}
|
|
8469
8488
|
function gc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules: r, onSave: i }) {
|
|
8470
|
-
const { rules: a, alerts: o } = Ge(), [l, u] = S("By Severity"), [m, d] = S("By severity"), [y, p] = S("By Severity"), [v, k] = S(!1), [b, B] = S(!1), [q, Q] = S(!1), [x, C] = S(null), [Z, R] = S("rules"), [G, h] = S(), [g, M] = S(), [ie, ye] = S(), [
|
|
8489
|
+
const { rules: a, alerts: o } = Ge(), [l, u] = S("By Severity"), [m, d] = S("By severity"), [y, p] = S("By Severity"), [v, k] = S(!1), [b, B] = S(!1), [q, Q] = S(!1), [x, C] = S(null), [Z, R] = S("rules"), [G, h] = S(), [g, M] = S(), [ie, ye] = S(), [O, N] = S(), [A, E] = S(), [T, D] = S(), [L, _] = S(), [Y, j] = S(), [ce, me] = S([]), [Oe, te] = S([]), [Se, ke] = S(!1), [pe, P] = S(!1), [W, ge] = S({}), [ue, Ve] = S({}), [be, Ke] = S(s || []), [Me, Ne] = S([]), [Pt, pt] = S(!1), [Nt, nt] = S(!1), [Be, Tt] = S(n || []);
|
|
8471
8490
|
oe(() => {
|
|
8472
8491
|
n && n.length && Tt(n);
|
|
8473
8492
|
}, [n]), oe(() => {
|
|
8474
|
-
if (!
|
|
8493
|
+
if (!Be || !Be.length) return;
|
|
8475
8494
|
const U = Object.keys(W).length > 0 || Object.keys(ue).length > 0;
|
|
8476
8495
|
if (Me.length && !U) return;
|
|
8477
|
-
const se =
|
|
8496
|
+
const se = Be.map((J, V) => {
|
|
8478
8497
|
const de = e.find((le) => le.RuleId === (J.ruleId || J.ruleName))?.Name || J.ruleName || J.Name || "-", z = zs(J.escalationSettings), ne = typeof z.level1UserRoleId == "number" && z.level1UserRoleId > 0 ? [z.level1UserRoleId] : [], rt = typeof z.level2UserRoleId == "number" && z.level2UserRoleId > 0 ? [z.level2UserRoleId] : [], ss = typeof z.level3UserRoleId == "number" && z.level3UserRoleId > 0 ? [z.level3UserRoleId] : [], H = (Array.isArray(z.escalationSettingsActionTypeIds) ? z.escalationSettingsActionTypeIds : []).map((le) => W[le] || String(le)), Ie = (Array.isArray(z.thirdPartyId) ? z.thirdPartyId : []).map((le) => ue[le] || String(le)), Re = typeof z.humanLoop == "boolean" ? z.humanLoop : null, fe = typeof z.isAutoExpire == "boolean" ? z.isAutoExpire : null;
|
|
8479
8498
|
return {
|
|
8480
8499
|
id: String(J.ruleId || J.ruleName || V),
|
|
@@ -8489,7 +8508,7 @@ function gc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
|
|
|
8489
8508
|
};
|
|
8490
8509
|
});
|
|
8491
8510
|
Ne(se);
|
|
8492
|
-
}, [
|
|
8511
|
+
}, [Be, e, W, ue]);
|
|
8493
8512
|
const bt = ve(
|
|
8494
8513
|
() => t.map((U) => ({ label: U.DisplayName, value: U.SeverityId })),
|
|
8495
8514
|
[t]
|
|
@@ -8499,7 +8518,7 @@ function gc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
|
|
|
8499
8518
|
), It = ve(
|
|
8500
8519
|
() => be.map((U) => ({ label: U.userRoleName, value: U.userRoleId })),
|
|
8501
8520
|
[be]
|
|
8502
|
-
),
|
|
8521
|
+
), Os = ve(() => [1, 3, 5, 10, 15, 20, 30, 45, 60].map((U) => ({ label: `${U}`, value: U })), []);
|
|
8503
8522
|
oe(() => {
|
|
8504
8523
|
let U = !1;
|
|
8505
8524
|
async function se() {
|
|
@@ -8530,15 +8549,15 @@ function gc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
|
|
|
8530
8549
|
}, se = (de) => {
|
|
8531
8550
|
const z = Number(de);
|
|
8532
8551
|
return !isNaN(z) && z > 0 ? z : void 0;
|
|
8533
|
-
}, J = (
|
|
8552
|
+
}, J = (Be || []).find(
|
|
8534
8553
|
(de) => de?.ruleId === g || de?.ruleName === g || de?.RuleId === g
|
|
8535
8554
|
), V = zs(J?.escalationSettings);
|
|
8536
8555
|
if (V && typeof V == "object") {
|
|
8537
|
-
ye(se(V.level1PostAssistTime)), N(U(V.level1UserRoleId)),
|
|
8556
|
+
ye(se(V.level1PostAssistTime)), N(U(V.level1UserRoleId)), E(se(V.level2PostAssistTime)), D(U(V.level2UserRoleId)), _(se(V.level3PostAssistTime)), j(U(V.level3UserRoleId));
|
|
8538
8557
|
const de = Array.isArray(V.escalationSettingsActionTypeIds) ? V.escalationSettingsActionTypeIds : [];
|
|
8539
8558
|
me(de.map((z) => String(z))), te(Array.isArray(V.thirdPartyId) ? V.thirdPartyId : []), ke(!!V.humanLoop), P(!!V.isAutoExpire);
|
|
8540
8559
|
}
|
|
8541
|
-
}, [Z, g,
|
|
8560
|
+
}, [Z, g, Be]);
|
|
8542
8561
|
const Ms = async () => {
|
|
8543
8562
|
try {
|
|
8544
8563
|
nt(!0);
|
|
@@ -8576,7 +8595,7 @@ function gc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
|
|
|
8576
8595
|
const z = de.thirdPartyIds ?? de.thirdPartyId;
|
|
8577
8596
|
typeof z == "number" && (J[z] = de.thirdPartyName);
|
|
8578
8597
|
}
|
|
8579
|
-
|
|
8598
|
+
Ve(J);
|
|
8580
8599
|
const V = Array.isArray(se.userRoles) ? se.userRoles.map((de) => ({
|
|
8581
8600
|
userRoleId: de.userRoleId ?? de.id,
|
|
8582
8601
|
userRoleName: de.userRoleName ?? de.name
|
|
@@ -8609,7 +8628,7 @@ function gc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
|
|
|
8609
8628
|
B(!0);
|
|
8610
8629
|
try {
|
|
8611
8630
|
const U = await o.setAdminSettings({ sortBy: l, groupBy: "string" });
|
|
8612
|
-
U?.responseStatus && U?.data &&
|
|
8631
|
+
U?.responseStatus && U?.data && Ee.success(U.data), p(l), k(!1);
|
|
8613
8632
|
} catch (U) {
|
|
8614
8633
|
console.error("Error saving admin settings", U);
|
|
8615
8634
|
} finally {
|
|
@@ -8638,14 +8657,14 @@ function gc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
|
|
|
8638
8657
|
setSelectedRule: M,
|
|
8639
8658
|
severityOptions: bt,
|
|
8640
8659
|
ruleOptions: xe,
|
|
8641
|
-
minsOptions:
|
|
8660
|
+
minsOptions: Os,
|
|
8642
8661
|
roleOptions: It,
|
|
8643
8662
|
l1mins: ie,
|
|
8644
8663
|
setL1mins: ye,
|
|
8645
|
-
l1role:
|
|
8664
|
+
l1role: O,
|
|
8646
8665
|
setL1role: N,
|
|
8647
8666
|
l2mins: A,
|
|
8648
|
-
setL2mins:
|
|
8667
|
+
setL2mins: E,
|
|
8649
8668
|
l2role: T,
|
|
8650
8669
|
setL2role: D,
|
|
8651
8670
|
l3mins: L,
|
|
@@ -8654,51 +8673,51 @@ function gc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
|
|
|
8654
8673
|
setL3role: j,
|
|
8655
8674
|
actions: ce,
|
|
8656
8675
|
setActions: me,
|
|
8657
|
-
thirdPartyIds:
|
|
8676
|
+
thirdPartyIds: Oe,
|
|
8658
8677
|
setThirdPartyIds: te,
|
|
8659
8678
|
humanLoop: Se,
|
|
8660
8679
|
setHumanLoop: ke,
|
|
8661
8680
|
onClear: () => {
|
|
8662
|
-
u("By Severity"), d("By severity"), R("rules"), h(void 0), M(void 0), ye(void 0), N(void 0),
|
|
8681
|
+
u("By Severity"), d("By severity"), R("rules"), h(void 0), M(void 0), ye(void 0), N(void 0), E(void 0), D(void 0), _(void 0), j(void 0), me([]), te([]), ke(!1), P(!1);
|
|
8663
8682
|
},
|
|
8664
8683
|
onSave: async () => {
|
|
8665
8684
|
pt(!0), i?.({
|
|
8666
8685
|
ruleId: g,
|
|
8667
8686
|
levels: [
|
|
8668
|
-
{ minutes: ie, role:
|
|
8687
|
+
{ minutes: ie, role: O },
|
|
8669
8688
|
{ minutes: A, role: T },
|
|
8670
8689
|
{ minutes: L, role: Y }
|
|
8671
8690
|
],
|
|
8672
8691
|
actions: ce,
|
|
8673
|
-
thirdPartyIds:
|
|
8692
|
+
thirdPartyIds: Oe,
|
|
8674
8693
|
humanLoop: Se,
|
|
8675
8694
|
isAutoExpire: pe
|
|
8676
8695
|
});
|
|
8677
8696
|
try {
|
|
8678
8697
|
if (g) {
|
|
8679
|
-
const se = Array.isArray(ce) ? ce.map((ne) => Number.isNaN(Number(ne)) ? ne : Number(ne)) : [], J = (
|
|
8698
|
+
const se = Array.isArray(ce) ? ce.map((ne) => Number.isNaN(Number(ne)) ? ne : Number(ne)) : [], J = (Be || []).find(
|
|
8680
8699
|
(ne) => ne?.ruleId === g || ne?.ruleName === g || ne?.RuleId === g
|
|
8681
8700
|
), V = typeof J?.recordId == "number" ? J.recordId : J?.ruleId || J?.RuleId || void 0;
|
|
8682
8701
|
if (!J || !V) {
|
|
8683
|
-
|
|
8702
|
+
Ee.error("Unable to find rule identifier for update");
|
|
8684
8703
|
return;
|
|
8685
8704
|
}
|
|
8686
8705
|
const de = {
|
|
8687
8706
|
...J,
|
|
8688
8707
|
escalationSettings: {
|
|
8689
|
-
level1UserRoleId:
|
|
8708
|
+
level1UserRoleId: O ?? 0,
|
|
8690
8709
|
level1PostAssistTime: ie ?? 0,
|
|
8691
8710
|
level2UserRoleId: T ?? 0,
|
|
8692
8711
|
level2PostAssistTime: A ?? 0,
|
|
8693
8712
|
level3UserRoleId: Y ?? 0,
|
|
8694
8713
|
level3PostAssistTime: L ?? 0,
|
|
8695
8714
|
escalationSettingsActionTypeIds: se,
|
|
8696
|
-
thirdPartyId: Array.isArray(
|
|
8715
|
+
thirdPartyId: Array.isArray(Oe) ? Oe : [],
|
|
8697
8716
|
humanLoop: Se,
|
|
8698
8717
|
isAutoExpire: pe
|
|
8699
8718
|
}
|
|
8700
8719
|
}, z = await a.updateRule(V, de);
|
|
8701
|
-
z?.responseStatus || z?.Success || z?.success ? (
|
|
8720
|
+
z?.responseStatus || z?.Success || z?.success ? (Ee.success("Escalation settings saved"), await Ms(), M(void 0), ye(void 0), N(void 0), E(void 0), D(void 0), _(void 0), j(void 0), me([]), te([]), ke(!1), P(!1)) : Ee.error(z?.errorMessage || z?.Message || "Error saving Escalation Settings");
|
|
8702
8721
|
}
|
|
8703
8722
|
} catch (se) {
|
|
8704
8723
|
console.error("Error saving escalation settings", se);
|
|
@@ -8807,7 +8826,7 @@ function Bc({ severities: t, rules: e, onSave: s, onCancel: n }) {
|
|
|
8807
8826
|
email: !!k.email,
|
|
8808
8827
|
sortBy: o
|
|
8809
8828
|
});
|
|
8810
|
-
ie?.responseStatus &&
|
|
8829
|
+
ie?.responseStatus && Ee.success(ie?.data || "Preferences updated successfully.");
|
|
8811
8830
|
} catch (h) {
|
|
8812
8831
|
console.error("Error in saving my preferences: ", h);
|
|
8813
8832
|
} finally {
|
|
@@ -8817,13 +8836,13 @@ function Bc({ severities: t, rules: e, onSave: s, onCancel: n }) {
|
|
|
8817
8836
|
return /* @__PURE__ */ f("div", { className: "w-full", children: [
|
|
8818
8837
|
/* @__PURE__ */ c(Ze, { gutter: [16, 16], align: "middle", className: "mb-4", children: /* @__PURE__ */ c(K, { xs: 24, md: 8, children: /* @__PURE__ */ f(st, { direction: "horizontal", size: 12, className: "w-full items-center", children: [
|
|
8819
8838
|
/* @__PURE__ */ c(fs, { className: "text-gray-600", children: "Sort By:" }),
|
|
8820
|
-
/* @__PURE__ */ c(
|
|
8839
|
+
/* @__PURE__ */ c(Pe, { className: "w-[240px]", value: o, options: a, onChange: l })
|
|
8821
8840
|
] }) }) }),
|
|
8822
8841
|
/* @__PURE__ */ f("div", { className: "mb-4", children: [
|
|
8823
8842
|
/* @__PURE__ */ c(yr, { level: 5, className: "!mb-2", children: "Anomalies" }),
|
|
8824
8843
|
Q ? /* @__PURE__ */ c("div", { className: "py-4", children: /* @__PURE__ */ c(Ns, {}) }) : /* @__PURE__ */ c(st, { direction: "vertical", size: 10, className: "w-full", children: (Array.isArray(B) ? B : []).map((h) => {
|
|
8825
8844
|
const g = String(h.recordId), M = h.anomalyName;
|
|
8826
|
-
return /* @__PURE__ */ c(
|
|
8845
|
+
return /* @__PURE__ */ c(Ot, { checked: u.has(g), onChange: () => R(g), children: M }, g);
|
|
8827
8846
|
}) })
|
|
8828
8847
|
] }),
|
|
8829
8848
|
/* @__PURE__ */ f("div", { className: "mb-4", children: [
|
|
@@ -8842,9 +8861,9 @@ function Bc({ severities: t, rules: e, onSave: s, onCancel: n }) {
|
|
|
8842
8861
|
] })
|
|
8843
8862
|
] }) }) }),
|
|
8844
8863
|
/* @__PURE__ */ f(Ze, { gutter: [24, 12], children: [
|
|
8845
|
-
/* @__PURE__ */ c(K, { children: /* @__PURE__ */ c(
|
|
8846
|
-
/* @__PURE__ */ c(K, { children: /* @__PURE__ */ c(
|
|
8847
|
-
/* @__PURE__ */ c(K, { children: /* @__PURE__ */ c(
|
|
8864
|
+
/* @__PURE__ */ c(K, { children: /* @__PURE__ */ c(Ot, { checked: k.inApp, onChange: (h) => b({ ...k, inApp: h.target.checked }), children: "In-app" }) }),
|
|
8865
|
+
/* @__PURE__ */ c(K, { children: /* @__PURE__ */ c(Ot, { checked: k.sms, onChange: (h) => b({ ...k, sms: h.target.checked }), children: "SMS" }) }),
|
|
8866
|
+
/* @__PURE__ */ c(K, { children: /* @__PURE__ */ c(Ot, { checked: k.email, onChange: (h) => b({ ...k, email: h.target.checked }), children: "Email" }) })
|
|
8848
8867
|
] })
|
|
8849
8868
|
] }),
|
|
8850
8869
|
/* @__PURE__ */ c(Zt, {}),
|
|
@@ -9104,14 +9123,14 @@ const Tc = ({
|
|
|
9104
9123
|
High: "#FF95004D",
|
|
9105
9124
|
Medium: "#FEF9C2",
|
|
9106
9125
|
Low: "#E0EDFF"
|
|
9107
|
-
},
|
|
9126
|
+
}, Ec = {
|
|
9108
9127
|
"elopement attempt": "elopement",
|
|
9109
9128
|
"elopement completed": "elopement",
|
|
9110
9129
|
"watchlist person detected": "watchlist",
|
|
9111
9130
|
"watch list person detected": "watchlist",
|
|
9112
9131
|
"brandished guns & knives": "weapon",
|
|
9113
9132
|
"brandished guns and knives": "weapon"
|
|
9114
|
-
},
|
|
9133
|
+
}, Oc = ({
|
|
9115
9134
|
isModalOpen: t,
|
|
9116
9135
|
handleModalClose: e,
|
|
9117
9136
|
selectedRow: s,
|
|
@@ -9125,10 +9144,10 @@ const Tc = ({
|
|
|
9125
9144
|
}) => {
|
|
9126
9145
|
const [m, d] = S(), [y, p] = S(""), [v, k] = S(!1), [b, B] = S([]), q = pr(null), [Q, x] = S("details"), [C, Z] = S(void 0), R = Dr(), { alerts: G, rules: h, config: g } = Ge(), { timeZoneDetails: M } = ts(), [ie, ye] = S(
|
|
9127
9146
|
null
|
|
9128
|
-
), [
|
|
9147
|
+
), [O, N] = S(!1), [A, E] = S(!1), [T, D] = S(void 0), [L, _] = S(void 0), [Y, j] = S({}), [ce, me] = S({}), Oe = (w, H, ae) => {
|
|
9129
9148
|
const Ie = ce[w];
|
|
9130
9149
|
return Y[w] === !1 && !Ie ? /* @__PURE__ */ f("div", { className: "w-full flex flex-col items-center justify-center min-h-[200px] bg-gray-100 rounded-lg gap-2 text-gray-400", children: [
|
|
9131
|
-
/* @__PURE__ */ c(
|
|
9150
|
+
/* @__PURE__ */ c(Er, { size: 40 }),
|
|
9132
9151
|
/* @__PURE__ */ c("span", { className: "text-sm", children: "Media not available" })
|
|
9133
9152
|
] }) : /* @__PURE__ */ f("div", { className: "relative w-full flex justify-center items-center min-h-[200px]", children: [
|
|
9134
9153
|
Ie && /* @__PURE__ */ c("div", { className: "absolute inset-0 flex items-center justify-center bg-gray-100 rounded-lg z-10", children: /* @__PURE__ */ c(Qa, { size: 32, className: "animate-spin text-gray-400" }) }),
|
|
@@ -9139,7 +9158,7 @@ const Tc = ({
|
|
|
9139
9158
|
alt: H.caption || `media-${ae}`,
|
|
9140
9159
|
isLoading: Ie,
|
|
9141
9160
|
priority: be,
|
|
9142
|
-
detections:
|
|
9161
|
+
detections: Be,
|
|
9143
9162
|
onLoadSuccess: () => me((Re) => ({ ...Re, [w]: !1 })),
|
|
9144
9163
|
onError: () => me((Re) => ({ ...Re, [w]: !1 }))
|
|
9145
9164
|
}
|
|
@@ -9153,7 +9172,7 @@ const Tc = ({
|
|
|
9153
9172
|
timestamp: W,
|
|
9154
9173
|
description: ge,
|
|
9155
9174
|
spaceName: ue,
|
|
9156
|
-
assignTeam:
|
|
9175
|
+
assignTeam: Ve,
|
|
9157
9176
|
priority: be,
|
|
9158
9177
|
statusType: Ke,
|
|
9159
9178
|
id: Me,
|
|
@@ -9161,7 +9180,7 @@ const Tc = ({
|
|
|
9161
9180
|
statusHistory: Pt,
|
|
9162
9181
|
mediaDetails: pt,
|
|
9163
9182
|
alertNumber: Nt
|
|
9164
|
-
} = te, nt = te.bbox_xyxy,
|
|
9183
|
+
} = te, nt = te.bbox_xyxy, Be = ve(
|
|
9165
9184
|
() => nt ? [{ bbox_xyxy: nt, personName: te.personName }] : [],
|
|
9166
9185
|
[nt, te.personName]
|
|
9167
9186
|
), Tt = g.tenant === "snl" ? ke || Se || "Alert Event" : Se || "Alert Event", bt = (w) => {
|
|
@@ -9185,7 +9204,7 @@ const Tc = ({
|
|
|
9185
9204
|
delivered: Ie,
|
|
9186
9205
|
recipients: ae
|
|
9187
9206
|
};
|
|
9188
|
-
},
|
|
9207
|
+
}, Os = (w) => {
|
|
9189
9208
|
const H = /* @__PURE__ */ new Map();
|
|
9190
9209
|
return (w || []).forEach((ae) => {
|
|
9191
9210
|
const Ie = String(ae?.notificationType || "Unknown"), Re = H.get(Ie) || [];
|
|
@@ -9195,7 +9214,7 @@ const Tc = ({
|
|
|
9195
9214
|
);
|
|
9196
9215
|
}, Ms = async (w) => {
|
|
9197
9216
|
try {
|
|
9198
|
-
const H = await G.getAlertNotifications(w), ae =
|
|
9217
|
+
const H = await G.getAlertNotifications(w), ae = Os(H);
|
|
9199
9218
|
Z(ae);
|
|
9200
9219
|
} catch {
|
|
9201
9220
|
Z(void 0);
|
|
@@ -9246,7 +9265,7 @@ const Tc = ({
|
|
|
9246
9265
|
const wn = o === "archived" || ["completed", "false positive"].includes(String(Ke || "").toLowerCase()), An = (w) => {
|
|
9247
9266
|
const H = String(w?.value || "").toLowerCase(), ae = String(w?.statusName || "").toLowerCase();
|
|
9248
9267
|
return H.includes("reopen") || ae.includes("reopen");
|
|
9249
|
-
}, Nn = String(pe || "").trim().toLowerCase(), U =
|
|
9268
|
+
}, Nn = String(pe || "").trim().toLowerCase(), U = Ec[Nn] ?? "general", se = r.filter((w) => {
|
|
9250
9269
|
const H = An(w);
|
|
9251
9270
|
return typeof o < "u" ? o === "archived" ? H : !H : wn ? H : !H;
|
|
9252
9271
|
}).map((w) => ({ value: w.value, label: w.statusName })), J = ie ?? [], V = (w) => !!w.isWatchListStatus, de = (w) => !!w.isWeapontStatus, z = J.filter((w) => {
|
|
@@ -9317,7 +9336,7 @@ const Tc = ({
|
|
|
9317
9336
|
}, H = await R.mutateAsync(w);
|
|
9318
9337
|
if (H?.responseStatus || H?.Success) {
|
|
9319
9338
|
const ae = H?.Message || H?.data || "Alert updated successfully.";
|
|
9320
|
-
|
|
9339
|
+
Ee.success(ae, {
|
|
9321
9340
|
autoClose: 1500,
|
|
9322
9341
|
onClose: () => {
|
|
9323
9342
|
n(), e();
|
|
@@ -9325,10 +9344,10 @@ const Tc = ({
|
|
|
9325
9344
|
}), d(void 0), p("");
|
|
9326
9345
|
} else {
|
|
9327
9346
|
const ae = H?.errorMessage || H?.Message || "Failed to update alert status";
|
|
9328
|
-
|
|
9347
|
+
Ee.error(ae);
|
|
9329
9348
|
}
|
|
9330
9349
|
} catch (w) {
|
|
9331
|
-
console.error("Error updating alert status:", w),
|
|
9350
|
+
console.error("Error updating alert status:", w), Ee.error("Failed to update alert status. Please try again.");
|
|
9332
9351
|
} finally {
|
|
9333
9352
|
k(!1);
|
|
9334
9353
|
}
|
|
@@ -9374,9 +9393,9 @@ const Tc = ({
|
|
|
9374
9393
|
"Space: ",
|
|
9375
9394
|
ue
|
|
9376
9395
|
] }),
|
|
9377
|
-
|
|
9396
|
+
Ve && /* @__PURE__ */ f("div", { className: "font-sm text-gray-500", children: [
|
|
9378
9397
|
"Assigned to: ",
|
|
9379
|
-
|
|
9398
|
+
Ve
|
|
9380
9399
|
] }),
|
|
9381
9400
|
/* @__PURE__ */ f("div", { className: "flex gap-2 justify-start mt-3", children: [
|
|
9382
9401
|
/* @__PURE__ */ f(
|
|
@@ -9413,14 +9432,14 @@ const Tc = ({
|
|
|
9413
9432
|
] }),
|
|
9414
9433
|
/* @__PURE__ */ c("div", { className: "w-full flex flex-col justify-start items-start mt-2 font-bold", children: /* @__PURE__ */ f("div", { className: "w-full mt-4", children: [
|
|
9415
9434
|
/* @__PURE__ */ c("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ c(
|
|
9416
|
-
|
|
9435
|
+
Pe,
|
|
9417
9436
|
{
|
|
9418
9437
|
placeholder: "Change Status",
|
|
9419
9438
|
className: "w-full text-gray-500",
|
|
9420
9439
|
onChange: (w) => d(w),
|
|
9421
9440
|
value: m,
|
|
9422
9441
|
options: ne,
|
|
9423
|
-
loading: g.tenant === "snl" ?
|
|
9442
|
+
loading: g.tenant === "snl" ? O : i
|
|
9424
9443
|
}
|
|
9425
9444
|
) }),
|
|
9426
9445
|
/* @__PURE__ */ f("div", { className: "flex flex-col gap-2 mt-3", children: [
|
|
@@ -9491,13 +9510,13 @@ const Tc = ({
|
|
|
9491
9510
|
"Your browser does not support the video tag."
|
|
9492
9511
|
]
|
|
9493
9512
|
}
|
|
9494
|
-
) :
|
|
9513
|
+
) : Oe(String(ae), w, H),
|
|
9495
9514
|
w.caption && /* @__PURE__ */ c("p", { className: "text-xs text-gray-500 mt-1", children: w.caption }),
|
|
9496
9515
|
!Ie && Y[String(ae)] ? /* @__PURE__ */ c(
|
|
9497
9516
|
"button",
|
|
9498
9517
|
{
|
|
9499
9518
|
onClick: () => {
|
|
9500
|
-
|
|
9519
|
+
E(!0), D(ae), _(w.type || "image");
|
|
9501
9520
|
},
|
|
9502
9521
|
className: "absolute bottom-3 right-3 text-white bg-black/50 rounded-full p-2 hover:bg-black/70",
|
|
9503
9522
|
children: /* @__PURE__ */ c(eo, { size: 20 })
|
|
@@ -9515,10 +9534,10 @@ const Tc = ({
|
|
|
9515
9534
|
kr,
|
|
9516
9535
|
{
|
|
9517
9536
|
isOpen: A,
|
|
9518
|
-
onClose: () =>
|
|
9537
|
+
onClose: () => E(!1),
|
|
9519
9538
|
src: T || "",
|
|
9520
9539
|
type: L || "image",
|
|
9521
|
-
detections:
|
|
9540
|
+
detections: Be,
|
|
9522
9541
|
priority: be
|
|
9523
9542
|
}
|
|
9524
9543
|
)
|
|
@@ -9602,7 +9621,7 @@ function Ri({
|
|
|
9602
9621
|
tabBarStyle: { fontSize: "medium" },
|
|
9603
9622
|
onChange: (ie) => {
|
|
9604
9623
|
const ye = ie === "archived";
|
|
9605
|
-
g((
|
|
9624
|
+
g((O) => O + 1), a?.(1), o?.({ isArchived: ye });
|
|
9606
9625
|
},
|
|
9607
9626
|
items: [
|
|
9608
9627
|
{
|
|
@@ -9660,7 +9679,7 @@ function Ri({
|
|
|
9660
9679
|
}
|
|
9661
9680
|
),
|
|
9662
9681
|
/* @__PURE__ */ c(
|
|
9663
|
-
|
|
9682
|
+
Oc,
|
|
9664
9683
|
{
|
|
9665
9684
|
isModalOpen: m,
|
|
9666
9685
|
handleModalClose: Z,
|