@ssgc/alert-console 2.3.2 → 2.3.3
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 +1083 -1067
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { jsx as i, jsxs as h, Fragment as
|
|
1
|
+
import { jsx as i, jsxs as h, Fragment as Ps } from "react/jsx-runtime";
|
|
2
2
|
import * as he from "react";
|
|
3
|
-
import { useContext as
|
|
4
|
-
import { Select as
|
|
5
|
-
import { MessageOutlined as
|
|
6
|
-
import { toast as
|
|
7
|
-
const
|
|
8
|
-
critical:
|
|
9
|
-
high:
|
|
10
|
-
medium:
|
|
11
|
-
low:
|
|
3
|
+
import { useContext as Ms, useMemo as ue, createContext as Ds, useState as w, useEffect as ce, forwardRef as ls, createElement as mt, useRef as Fs } from "react";
|
|
4
|
+
import { Select as ve, Table as Nt, Row as Ae, Col as G, Input as Us, Tag as tt, Space as Ie, Tooltip as Ls, Button as Se, Progress as $s, Dropdown as Bs, Typography as Ke, Spin as xt, Checkbox as qe, Divider as Ge, TimePicker as $t, Tabs as Ct, Card as dt, Steps as js, Modal as _s, Carousel as qs } from "antd";
|
|
5
|
+
import { MessageOutlined as Qs, MailOutlined as Hs, MoreOutlined as Gs, EditOutlined as Ws, LeftOutlined as Ks, RightOutlined as Ys } from "@ant-design/icons";
|
|
6
|
+
import { toast as ye } from "react-toastify";
|
|
7
|
+
const zs = "#FF3B30", Vs = "#FF9500", Js = "#FFCC00", Zs = "#34C759", ze = {
|
|
8
|
+
critical: zs,
|
|
9
|
+
high: Vs,
|
|
10
|
+
medium: Js,
|
|
11
|
+
low: Zs
|
|
12
12
|
}, Bt = {
|
|
13
13
|
Critical: ze.critical,
|
|
14
14
|
High: ze.high,
|
|
15
15
|
Medium: ze.medium,
|
|
16
16
|
Low: ze.low
|
|
17
17
|
};
|
|
18
|
-
function
|
|
18
|
+
function Xs(e) {
|
|
19
19
|
return Bt[e] || Bt.Low;
|
|
20
20
|
}
|
|
21
21
|
function jt(e) {
|
|
@@ -25,7 +25,7 @@ function jt(e) {
|
|
|
25
25
|
const [s, r, n] = t, a = Number.parseInt(s, 10), o = Number.parseInt(r, 10), l = Number.parseFloat(n || "0"), d = Number.isFinite(a) ? a : 0, u = Number.isFinite(o) ? o : 0, c = Number.isFinite(l) ? l : 0;
|
|
26
26
|
return d * 3600 + u * 60 + c;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function ht(e) {
|
|
29
29
|
const t = e.thirdPartyIds ?? e.ThirdPartyIds ?? e.thirdPartyId ?? e.ThirdPartyId ?? "", s = Array.isArray(t) ? t.join(",") : String(t ?? "");
|
|
30
30
|
if (!s || !s.trim()) return [];
|
|
31
31
|
const r = s.split(",").map((o) => parseInt(String(o).trim(), 10)).filter((o) => Number.isFinite(o)), n = /* @__PURE__ */ new Set(), a = [];
|
|
@@ -33,21 +33,21 @@ function dt(e) {
|
|
|
33
33
|
n.has(o) || (n.add(o), a.push(o));
|
|
34
34
|
}), a;
|
|
35
35
|
}
|
|
36
|
-
const cs = "",
|
|
36
|
+
const cs = "", er = cs, tr = "", sr = "", _t = {
|
|
37
37
|
snl: {
|
|
38
38
|
alerts: cs,
|
|
39
|
-
rules:
|
|
39
|
+
rules: er
|
|
40
40
|
},
|
|
41
41
|
schools: {
|
|
42
|
-
alerts:
|
|
43
|
-
rules:
|
|
42
|
+
alerts: tr,
|
|
43
|
+
rules: sr
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
function xe(e, t) {
|
|
47
47
|
const s = (e || "").replace(/\/+$/, ""), r = t.startsWith("/") ? t : `/${t}`;
|
|
48
48
|
return `${s}${r}`;
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function rr() {
|
|
51
51
|
try {
|
|
52
52
|
const e = localStorage.getItem("authToken");
|
|
53
53
|
return e ? { Authorization: `Bearer ${e}` } : {};
|
|
@@ -65,7 +65,7 @@ function Ve(e, t) {
|
|
|
65
65
|
async function Ce(e, t) {
|
|
66
66
|
const s = {
|
|
67
67
|
...t.headers,
|
|
68
|
-
...
|
|
68
|
+
...rr()
|
|
69
69
|
}, r = await fetch(e, { ...t, headers: s });
|
|
70
70
|
if (r.status === 401)
|
|
71
71
|
throw window.location.href = "/login", new Error("Unauthorized");
|
|
@@ -84,7 +84,7 @@ async function Ce(e, t) {
|
|
|
84
84
|
}
|
|
85
85
|
return a;
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function nr(e) {
|
|
88
88
|
const t = {
|
|
89
89
|
"Content-Type": "application/json",
|
|
90
90
|
...e.headers || {}
|
|
@@ -194,7 +194,7 @@ function qt(e, t) {
|
|
|
194
194
|
const s = (e || "").replace(/\/+$/, ""), r = t.startsWith("/") ? t : `/${t}`;
|
|
195
195
|
return `${s}${r}`;
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function ir() {
|
|
198
198
|
try {
|
|
199
199
|
const e = localStorage.getItem("authToken");
|
|
200
200
|
return e ? { Authorization: `Bearer ${e}` } : {};
|
|
@@ -205,7 +205,7 @@ function rr() {
|
|
|
205
205
|
async function Je(e, t) {
|
|
206
206
|
const s = {
|
|
207
207
|
...t.headers,
|
|
208
|
-
...
|
|
208
|
+
...ir()
|
|
209
209
|
}, r = await fetch(e, { ...t, headers: s });
|
|
210
210
|
if (r.status === 401)
|
|
211
211
|
throw window.location.href = "/login", new Error("Unauthorized");
|
|
@@ -224,7 +224,7 @@ async function Je(e, t) {
|
|
|
224
224
|
}
|
|
225
225
|
return a;
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function ar(e) {
|
|
228
228
|
const t = {
|
|
229
229
|
"Content-Type": "application/json",
|
|
230
230
|
...e.headers || {}
|
|
@@ -254,289 +254,289 @@ function nr(e) {
|
|
|
254
254
|
}
|
|
255
255
|
};
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function or(e) {
|
|
258
258
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
259
259
|
}
|
|
260
|
-
var et = { exports: {} },
|
|
261
|
-
function
|
|
260
|
+
var et = { exports: {} }, lr = et.exports, Qt;
|
|
261
|
+
function cr() {
|
|
262
262
|
return Qt || (Qt = 1, (function(e, t) {
|
|
263
263
|
(function(s, r) {
|
|
264
264
|
e.exports = r();
|
|
265
|
-
})(
|
|
266
|
-
var s = 1e3, r = 6e4, n = 36e5, a = "millisecond", o = "second", l = "minute", d = "hour", u = "day", c = "week",
|
|
267
|
-
var
|
|
268
|
-
return "[" +
|
|
269
|
-
} },
|
|
270
|
-
var x = String(
|
|
271
|
-
return !x || x.length >=
|
|
272
|
-
}, L = { s:
|
|
273
|
-
var
|
|
274
|
-
return (
|
|
275
|
-
}, m: function
|
|
276
|
-
if (
|
|
277
|
-
var x = 12 * (p.year() -
|
|
278
|
-
return +(-(x + (p - y) / (
|
|
279
|
-
}, a: function(
|
|
280
|
-
return
|
|
281
|
-
}, p: function(
|
|
282
|
-
return { M:
|
|
283
|
-
}, u: function(
|
|
284
|
-
return
|
|
285
|
-
} }, J = "en",
|
|
286
|
-
|
|
287
|
-
var
|
|
288
|
-
return
|
|
289
|
-
}, T = function
|
|
265
|
+
})(lr, (function() {
|
|
266
|
+
var s = 1e3, r = 6e4, n = 36e5, a = "millisecond", o = "second", l = "minute", d = "hour", u = "day", c = "week", S = "month", f = "quarter", k = "year", N = "date", m = "Invalid Date", A = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, $ = /\[([^\]]+)]|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, F = { 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) {
|
|
267
|
+
var v = ["th", "st", "nd", "rd"], p = O % 100;
|
|
268
|
+
return "[" + O + (v[(p - 20) % 10] || v[p] || v[0]) + "]";
|
|
269
|
+
} }, j = function(O, v, p) {
|
|
270
|
+
var x = String(O);
|
|
271
|
+
return !x || x.length >= v ? O : "" + Array(v + 1 - x.length).join(p) + O;
|
|
272
|
+
}, L = { s: j, z: function(O) {
|
|
273
|
+
var v = -O.utcOffset(), p = Math.abs(v), x = Math.floor(p / 60), y = p % 60;
|
|
274
|
+
return (v <= 0 ? "+" : "-") + j(x, 2, "0") + ":" + j(y, 2, "0");
|
|
275
|
+
}, m: function O(v, p) {
|
|
276
|
+
if (v.date() < p.date()) return -O(p, v);
|
|
277
|
+
var x = 12 * (p.year() - v.year()) + (p.month() - v.month()), y = v.clone().add(x, S), b = p - y < 0, g = v.clone().add(x + (b ? -1 : 1), S);
|
|
278
|
+
return +(-(x + (p - y) / (b ? y - g : g - y)) || 0);
|
|
279
|
+
}, a: function(O) {
|
|
280
|
+
return O < 0 ? Math.ceil(O) || 0 : Math.floor(O);
|
|
281
|
+
}, p: function(O) {
|
|
282
|
+
return { M: S, y: k, w: c, d: u, D: N, h: d, m: l, s: o, ms: a, Q: f }[O] || String(O || "").toLowerCase().replace(/s$/, "");
|
|
283
|
+
}, u: function(O) {
|
|
284
|
+
return O === void 0;
|
|
285
|
+
} }, J = "en", V = {};
|
|
286
|
+
V[J] = F;
|
|
287
|
+
var Y = "$isDayjsObject", K = function(O) {
|
|
288
|
+
return O instanceof W || !(!O || !O[Y]);
|
|
289
|
+
}, T = function O(v, p, x) {
|
|
290
290
|
var y;
|
|
291
|
-
if (!
|
|
292
|
-
if (typeof
|
|
293
|
-
var
|
|
294
|
-
|
|
295
|
-
var
|
|
296
|
-
if (!y &&
|
|
291
|
+
if (!v) return J;
|
|
292
|
+
if (typeof v == "string") {
|
|
293
|
+
var b = v.toLowerCase();
|
|
294
|
+
V[b] && (y = b), p && (V[b] = p, y = b);
|
|
295
|
+
var g = v.split("-");
|
|
296
|
+
if (!y && g.length > 1) return O(g[0]);
|
|
297
297
|
} else {
|
|
298
|
-
var
|
|
299
|
-
|
|
298
|
+
var P = v.name;
|
|
299
|
+
V[P] = v, y = P;
|
|
300
300
|
}
|
|
301
301
|
return !x && y && (J = y), y || !x && J;
|
|
302
|
-
}, I = function(
|
|
303
|
-
if (K(
|
|
304
|
-
var p = typeof
|
|
305
|
-
return p.date =
|
|
306
|
-
},
|
|
307
|
-
|
|
308
|
-
return I(
|
|
302
|
+
}, I = function(O, v) {
|
|
303
|
+
if (K(O)) return O.clone();
|
|
304
|
+
var p = typeof v == "object" ? v : {};
|
|
305
|
+
return p.date = O, p.args = arguments, new W(p);
|
|
306
|
+
}, E = L;
|
|
307
|
+
E.l = T, E.i = K, E.w = function(O, v) {
|
|
308
|
+
return I(O, { locale: v.$L, utc: v.$u, x: v.$x, $offset: v.$offset });
|
|
309
309
|
};
|
|
310
|
-
var
|
|
311
|
-
function
|
|
312
|
-
this.$L = T(p.locale, null, !0), this.parse(p), this.$x = this.$x || p.x || {}, this[
|
|
310
|
+
var W = (function() {
|
|
311
|
+
function O(p) {
|
|
312
|
+
this.$L = T(p.locale, null, !0), this.parse(p), this.$x = this.$x || p.x || {}, this[Y] = !0;
|
|
313
313
|
}
|
|
314
|
-
var
|
|
315
|
-
return
|
|
314
|
+
var v = O.prototype;
|
|
315
|
+
return v.parse = function(p) {
|
|
316
316
|
this.$d = (function(x) {
|
|
317
|
-
var y = x.date,
|
|
317
|
+
var y = x.date, b = x.utc;
|
|
318
318
|
if (y === null) return /* @__PURE__ */ new Date(NaN);
|
|
319
|
-
if (
|
|
319
|
+
if (E.u(y)) return /* @__PURE__ */ new Date();
|
|
320
320
|
if (y instanceof Date) return new Date(y);
|
|
321
321
|
if (typeof y == "string" && !/Z$/i.test(y)) {
|
|
322
|
-
var
|
|
323
|
-
if (
|
|
324
|
-
var
|
|
325
|
-
return
|
|
322
|
+
var g = y.match(A);
|
|
323
|
+
if (g) {
|
|
324
|
+
var P = g[2] - 1 || 0, B = (g[7] || "0").substring(0, 3);
|
|
325
|
+
return b ? new Date(Date.UTC(g[1], P, g[3] || 1, g[4] || 0, g[5] || 0, g[6] || 0, B)) : new Date(g[1], P, g[3] || 1, g[4] || 0, g[5] || 0, g[6] || 0, B);
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
328
|
return new Date(y);
|
|
329
329
|
})(p), this.init();
|
|
330
|
-
},
|
|
330
|
+
}, v.init = function() {
|
|
331
331
|
var p = this.$d;
|
|
332
332
|
this.$y = p.getFullYear(), this.$M = p.getMonth(), this.$D = p.getDate(), this.$W = p.getDay(), this.$H = p.getHours(), this.$m = p.getMinutes(), this.$s = p.getSeconds(), this.$ms = p.getMilliseconds();
|
|
333
|
-
},
|
|
334
|
-
return
|
|
335
|
-
},
|
|
333
|
+
}, v.$utils = function() {
|
|
334
|
+
return E;
|
|
335
|
+
}, v.isValid = function() {
|
|
336
336
|
return this.$d.toString() !== m;
|
|
337
|
-
},
|
|
337
|
+
}, v.isSame = function(p, x) {
|
|
338
338
|
var y = I(p);
|
|
339
339
|
return this.startOf(x) <= y && y <= this.endOf(x);
|
|
340
|
-
},
|
|
340
|
+
}, v.isAfter = function(p, x) {
|
|
341
341
|
return I(p) < this.startOf(x);
|
|
342
|
-
},
|
|
342
|
+
}, v.isBefore = function(p, x) {
|
|
343
343
|
return this.endOf(x) < I(p);
|
|
344
|
-
},
|
|
345
|
-
return
|
|
346
|
-
},
|
|
344
|
+
}, v.$g = function(p, x, y) {
|
|
345
|
+
return E.u(p) ? this[x] : this.set(y, p);
|
|
346
|
+
}, v.unix = function() {
|
|
347
347
|
return Math.floor(this.valueOf() / 1e3);
|
|
348
|
-
},
|
|
348
|
+
}, v.valueOf = function() {
|
|
349
349
|
return this.$d.getTime();
|
|
350
|
-
},
|
|
351
|
-
var y = this,
|
|
352
|
-
var ae =
|
|
353
|
-
return
|
|
354
|
-
},
|
|
355
|
-
return
|
|
356
|
-
},
|
|
357
|
-
switch (
|
|
358
|
-
case
|
|
359
|
-
return
|
|
360
|
-
case
|
|
361
|
-
return
|
|
350
|
+
}, v.startOf = function(p, x) {
|
|
351
|
+
var y = this, b = !!E.u(x) || x, g = E.p(p), P = function(fe, ne) {
|
|
352
|
+
var ae = E.w(y.$u ? Date.UTC(y.$y, ne, fe) : new Date(y.$y, ne, fe), y);
|
|
353
|
+
return b ? ae : ae.endOf(u);
|
|
354
|
+
}, B = function(fe, ne) {
|
|
355
|
+
return E.w(y.toDate()[fe].apply(y.toDate("s"), (b ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ne)), y);
|
|
356
|
+
}, R = this.$W, U = this.$M, _ = this.$D, z = "set" + (this.$u ? "UTC" : "");
|
|
357
|
+
switch (g) {
|
|
358
|
+
case k:
|
|
359
|
+
return b ? P(1, 0) : P(31, 11);
|
|
360
|
+
case S:
|
|
361
|
+
return b ? P(1, U) : P(0, U + 1);
|
|
362
362
|
case c:
|
|
363
|
-
var
|
|
364
|
-
return
|
|
363
|
+
var se = this.$locale().weekStart || 0, ge = (R < se ? R + 7 : R) - se;
|
|
364
|
+
return P(b ? _ - ge : _ + (6 - ge), U);
|
|
365
365
|
case u:
|
|
366
366
|
case N:
|
|
367
|
-
return
|
|
367
|
+
return B(z + "Hours", 0);
|
|
368
368
|
case d:
|
|
369
|
-
return
|
|
369
|
+
return B(z + "Minutes", 1);
|
|
370
370
|
case l:
|
|
371
|
-
return
|
|
371
|
+
return B(z + "Seconds", 2);
|
|
372
372
|
case o:
|
|
373
|
-
return
|
|
373
|
+
return B(z + "Milliseconds", 3);
|
|
374
374
|
default:
|
|
375
375
|
return this.clone();
|
|
376
376
|
}
|
|
377
|
-
},
|
|
377
|
+
}, v.endOf = function(p) {
|
|
378
378
|
return this.startOf(p, !1);
|
|
379
|
-
},
|
|
380
|
-
var y,
|
|
381
|
-
if (
|
|
382
|
-
var
|
|
383
|
-
|
|
384
|
-
} else
|
|
379
|
+
}, v.$set = function(p, x) {
|
|
380
|
+
var y, b = E.p(p), g = "set" + (this.$u ? "UTC" : ""), P = (y = {}, y[u] = g + "Date", y[N] = g + "Date", y[S] = g + "Month", y[k] = g + "FullYear", y[d] = g + "Hours", y[l] = g + "Minutes", y[o] = g + "Seconds", y[a] = g + "Milliseconds", y)[b], B = b === u ? this.$D + (x - this.$W) : x;
|
|
381
|
+
if (b === S || b === k) {
|
|
382
|
+
var R = this.clone().set(N, 1);
|
|
383
|
+
R.$d[P](B), R.init(), this.$d = R.set(N, Math.min(this.$D, R.daysInMonth())).$d;
|
|
384
|
+
} else P && this.$d[P](B);
|
|
385
385
|
return this.init(), this;
|
|
386
|
-
},
|
|
386
|
+
}, v.set = function(p, x) {
|
|
387
387
|
return this.clone().$set(p, x);
|
|
388
|
-
},
|
|
389
|
-
return this[
|
|
390
|
-
},
|
|
391
|
-
var y,
|
|
388
|
+
}, v.get = function(p) {
|
|
389
|
+
return this[E.p(p)]();
|
|
390
|
+
}, v.add = function(p, x) {
|
|
391
|
+
var y, b = this;
|
|
392
392
|
p = Number(p);
|
|
393
|
-
var
|
|
394
|
-
var _ = I(
|
|
395
|
-
return
|
|
393
|
+
var g = E.p(x), P = function(U) {
|
|
394
|
+
var _ = I(b);
|
|
395
|
+
return E.w(_.date(_.date() + Math.round(U * p)), b);
|
|
396
396
|
};
|
|
397
|
-
if (
|
|
398
|
-
if (
|
|
399
|
-
if (
|
|
400
|
-
if (
|
|
401
|
-
var
|
|
402
|
-
return
|
|
403
|
-
},
|
|
397
|
+
if (g === S) return this.set(S, this.$M + p);
|
|
398
|
+
if (g === k) return this.set(k, this.$y + p);
|
|
399
|
+
if (g === u) return P(1);
|
|
400
|
+
if (g === c) return P(7);
|
|
401
|
+
var B = (y = {}, y[l] = r, y[d] = n, y[o] = s, y)[g] || 1, R = this.$d.getTime() + p * B;
|
|
402
|
+
return E.w(R, this);
|
|
403
|
+
}, v.subtract = function(p, x) {
|
|
404
404
|
return this.add(-1 * p, x);
|
|
405
|
-
},
|
|
405
|
+
}, v.format = function(p) {
|
|
406
406
|
var x = this, y = this.$locale();
|
|
407
407
|
if (!this.isValid()) return y.invalidDate || m;
|
|
408
|
-
var
|
|
409
|
-
return ne && (ne[ae] || ne(x,
|
|
410
|
-
},
|
|
411
|
-
return
|
|
412
|
-
},
|
|
408
|
+
var b = p || "YYYY-MM-DDTHH:mm:ssZ", g = E.z(this), P = this.$H, B = this.$m, R = this.$M, U = y.weekdays, _ = y.months, z = y.meridiem, se = function(ne, ae, Re, we) {
|
|
409
|
+
return ne && (ne[ae] || ne(x, b)) || Re[ae].slice(0, we);
|
|
410
|
+
}, ge = function(ne) {
|
|
411
|
+
return E.s(P % 12 || 12, ne, "0");
|
|
412
|
+
}, fe = z || function(ne, ae, Re) {
|
|
413
413
|
var we = ne < 12 ? "AM" : "PM";
|
|
414
414
|
return Re ? we.toLowerCase() : we;
|
|
415
415
|
};
|
|
416
|
-
return
|
|
416
|
+
return b.replace($, (function(ne, ae) {
|
|
417
417
|
return ae || (function(Re) {
|
|
418
418
|
switch (Re) {
|
|
419
419
|
case "YY":
|
|
420
420
|
return String(x.$y).slice(-2);
|
|
421
421
|
case "YYYY":
|
|
422
|
-
return
|
|
422
|
+
return E.s(x.$y, 4, "0");
|
|
423
423
|
case "M":
|
|
424
|
-
return
|
|
424
|
+
return R + 1;
|
|
425
425
|
case "MM":
|
|
426
|
-
return
|
|
426
|
+
return E.s(R + 1, 2, "0");
|
|
427
427
|
case "MMM":
|
|
428
|
-
return
|
|
428
|
+
return se(y.monthsShort, R, _, 3);
|
|
429
429
|
case "MMMM":
|
|
430
|
-
return
|
|
430
|
+
return se(_, R);
|
|
431
431
|
case "D":
|
|
432
432
|
return x.$D;
|
|
433
433
|
case "DD":
|
|
434
|
-
return
|
|
434
|
+
return E.s(x.$D, 2, "0");
|
|
435
435
|
case "d":
|
|
436
436
|
return String(x.$W);
|
|
437
437
|
case "dd":
|
|
438
|
-
return
|
|
438
|
+
return se(y.weekdaysMin, x.$W, U, 2);
|
|
439
439
|
case "ddd":
|
|
440
|
-
return
|
|
440
|
+
return se(y.weekdaysShort, x.$W, U, 3);
|
|
441
441
|
case "dddd":
|
|
442
|
-
return
|
|
442
|
+
return U[x.$W];
|
|
443
443
|
case "H":
|
|
444
|
-
return String(
|
|
444
|
+
return String(P);
|
|
445
445
|
case "HH":
|
|
446
|
-
return
|
|
446
|
+
return E.s(P, 2, "0");
|
|
447
447
|
case "h":
|
|
448
|
-
return
|
|
448
|
+
return ge(1);
|
|
449
449
|
case "hh":
|
|
450
|
-
return
|
|
450
|
+
return ge(2);
|
|
451
451
|
case "a":
|
|
452
|
-
return
|
|
452
|
+
return fe(P, B, !0);
|
|
453
453
|
case "A":
|
|
454
|
-
return
|
|
454
|
+
return fe(P, B, !1);
|
|
455
455
|
case "m":
|
|
456
|
-
return String(
|
|
456
|
+
return String(B);
|
|
457
457
|
case "mm":
|
|
458
|
-
return
|
|
458
|
+
return E.s(B, 2, "0");
|
|
459
459
|
case "s":
|
|
460
460
|
return String(x.$s);
|
|
461
461
|
case "ss":
|
|
462
|
-
return
|
|
462
|
+
return E.s(x.$s, 2, "0");
|
|
463
463
|
case "SSS":
|
|
464
|
-
return
|
|
464
|
+
return E.s(x.$ms, 3, "0");
|
|
465
465
|
case "Z":
|
|
466
|
-
return
|
|
466
|
+
return g;
|
|
467
467
|
}
|
|
468
468
|
return null;
|
|
469
|
-
})(ne) ||
|
|
469
|
+
})(ne) || g.replace(":", "");
|
|
470
470
|
}));
|
|
471
|
-
},
|
|
471
|
+
}, v.utcOffset = function() {
|
|
472
472
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
473
|
-
},
|
|
474
|
-
var
|
|
475
|
-
return
|
|
473
|
+
}, v.diff = function(p, x, y) {
|
|
474
|
+
var b, g = this, P = E.p(x), B = I(p), R = (B.utcOffset() - this.utcOffset()) * r, U = this - B, _ = function() {
|
|
475
|
+
return E.m(g, B);
|
|
476
476
|
};
|
|
477
|
-
switch (
|
|
478
|
-
case
|
|
479
|
-
|
|
477
|
+
switch (P) {
|
|
478
|
+
case k:
|
|
479
|
+
b = _() / 12;
|
|
480
480
|
break;
|
|
481
|
-
case
|
|
482
|
-
|
|
481
|
+
case S:
|
|
482
|
+
b = _();
|
|
483
483
|
break;
|
|
484
484
|
case f:
|
|
485
|
-
|
|
485
|
+
b = _() / 3;
|
|
486
486
|
break;
|
|
487
487
|
case c:
|
|
488
|
-
|
|
488
|
+
b = (U - R) / 6048e5;
|
|
489
489
|
break;
|
|
490
490
|
case u:
|
|
491
|
-
|
|
491
|
+
b = (U - R) / 864e5;
|
|
492
492
|
break;
|
|
493
493
|
case d:
|
|
494
|
-
|
|
494
|
+
b = U / n;
|
|
495
495
|
break;
|
|
496
496
|
case l:
|
|
497
|
-
|
|
497
|
+
b = U / r;
|
|
498
498
|
break;
|
|
499
499
|
case o:
|
|
500
|
-
|
|
500
|
+
b = U / s;
|
|
501
501
|
break;
|
|
502
502
|
default:
|
|
503
|
-
|
|
503
|
+
b = U;
|
|
504
504
|
}
|
|
505
|
-
return y ?
|
|
506
|
-
},
|
|
507
|
-
return this.endOf(
|
|
508
|
-
},
|
|
509
|
-
return
|
|
510
|
-
},
|
|
505
|
+
return y ? b : E.a(b);
|
|
506
|
+
}, v.daysInMonth = function() {
|
|
507
|
+
return this.endOf(S).$D;
|
|
508
|
+
}, v.$locale = function() {
|
|
509
|
+
return V[this.$L];
|
|
510
|
+
}, v.locale = function(p, x) {
|
|
511
511
|
if (!p) return this.$L;
|
|
512
|
-
var y = this.clone(),
|
|
513
|
-
return
|
|
514
|
-
},
|
|
515
|
-
return
|
|
516
|
-
},
|
|
512
|
+
var y = this.clone(), b = T(p, x, !0);
|
|
513
|
+
return b && (y.$L = b), y;
|
|
514
|
+
}, v.clone = function() {
|
|
515
|
+
return E.w(this.$d, this);
|
|
516
|
+
}, v.toDate = function() {
|
|
517
517
|
return new Date(this.valueOf());
|
|
518
|
-
},
|
|
518
|
+
}, v.toJSON = function() {
|
|
519
519
|
return this.isValid() ? this.toISOString() : null;
|
|
520
|
-
},
|
|
520
|
+
}, v.toISOString = function() {
|
|
521
521
|
return this.$d.toISOString();
|
|
522
|
-
},
|
|
522
|
+
}, v.toString = function() {
|
|
523
523
|
return this.$d.toUTCString();
|
|
524
|
-
},
|
|
525
|
-
})(), te =
|
|
526
|
-
return I.prototype = te, [["$ms", a], ["$s", o], ["$m", l], ["$H", d], ["$W", u], ["$M",
|
|
527
|
-
te[
|
|
528
|
-
return this.$g(
|
|
524
|
+
}, O;
|
|
525
|
+
})(), te = W.prototype;
|
|
526
|
+
return I.prototype = te, [["$ms", a], ["$s", o], ["$m", l], ["$H", d], ["$W", u], ["$M", S], ["$y", k], ["$D", N]].forEach((function(O) {
|
|
527
|
+
te[O[1]] = function(v) {
|
|
528
|
+
return this.$g(v, O[0], O[1]);
|
|
529
529
|
};
|
|
530
|
-
})), I.extend = function(
|
|
531
|
-
return
|
|
532
|
-
}, I.locale = T, I.isDayjs = K, I.unix = function(
|
|
533
|
-
return I(1e3 *
|
|
534
|
-
}, I.en =
|
|
530
|
+
})), I.extend = function(O, v) {
|
|
531
|
+
return O.$i || (O(v, W, I), O.$i = !0), I;
|
|
532
|
+
}, I.locale = T, I.isDayjs = K, I.unix = function(O) {
|
|
533
|
+
return I(1e3 * O);
|
|
534
|
+
}, I.en = V[J], I.Ls = V, I.p = {}, I;
|
|
535
535
|
}));
|
|
536
536
|
})(et)), et.exports;
|
|
537
537
|
}
|
|
538
|
-
var
|
|
539
|
-
const us = /* @__PURE__ */
|
|
538
|
+
var ur = cr();
|
|
539
|
+
const us = /* @__PURE__ */ or(ur);
|
|
540
540
|
function ds(e) {
|
|
541
541
|
if (!e) return "By Severity";
|
|
542
542
|
const t = e.trim().toLowerCase();
|
|
@@ -551,11 +551,11 @@ function Ht(e) {
|
|
|
551
551
|
const { hours: t, minutes: s, seconds: r } = hs(e);
|
|
552
552
|
return us().hour(t).minute(s).second(r).millisecond(0);
|
|
553
553
|
}
|
|
554
|
-
function
|
|
554
|
+
function Oe(e, t) {
|
|
555
555
|
const s = (e || "").replace(/\/+$/, ""), r = t.startsWith("/") ? t : `/${t}`;
|
|
556
556
|
return `${s}${r}`;
|
|
557
557
|
}
|
|
558
|
-
function
|
|
558
|
+
function dr() {
|
|
559
559
|
try {
|
|
560
560
|
const e = localStorage.getItem("authToken");
|
|
561
561
|
return e ? { Authorization: `Bearer ${e}` } : {};
|
|
@@ -570,10 +570,10 @@ function Gt(e, t) {
|
|
|
570
570
|
n != null && String(n).length > 0 && s.searchParams.set(r, String(n));
|
|
571
571
|
}), s.toString();
|
|
572
572
|
}
|
|
573
|
-
async function
|
|
573
|
+
async function Pe(e, t) {
|
|
574
574
|
const s = {
|
|
575
575
|
...t.headers,
|
|
576
|
-
...
|
|
576
|
+
...dr()
|
|
577
577
|
}, r = await fetch(e, { ...t, headers: s });
|
|
578
578
|
if (r.status === 401)
|
|
579
579
|
throw window.location.href = "/login", new Error("Unauthorized");
|
|
@@ -593,7 +593,7 @@ async function Me(e, t) {
|
|
|
593
593
|
return a;
|
|
594
594
|
}
|
|
595
595
|
const le = (...e) => e.find((t) => t != null);
|
|
596
|
-
function
|
|
596
|
+
function hr(e) {
|
|
597
597
|
return {
|
|
598
598
|
// important: do not fall back to `id` here; only AlertId/alertId are considered the Alert ID
|
|
599
599
|
id: String(le(e?.AlertId, e?.alertId) ?? ""),
|
|
@@ -616,47 +616,47 @@ function ur(e) {
|
|
|
616
616
|
statusHistory: le(e?.StatusHistory, e?.statusHistory)
|
|
617
617
|
};
|
|
618
618
|
}
|
|
619
|
-
function
|
|
619
|
+
function fr(e) {
|
|
620
620
|
const t = {
|
|
621
621
|
"Content-Type": "application/json",
|
|
622
622
|
...e.headers || {}
|
|
623
623
|
};
|
|
624
624
|
return {
|
|
625
625
|
async listAlerts() {
|
|
626
|
-
const s =
|
|
626
|
+
const s = Oe(e.baseUrl, "/api/detectionpolicy/alerts?customerId=99e5c8b5-b9d4-4d35-8885-7f121c532664"), r = await Pe(s, {
|
|
627
627
|
method: "GET",
|
|
628
628
|
headers: t
|
|
629
629
|
});
|
|
630
|
-
return Array.isArray(r?.Items) ? (r?.Items).map(
|
|
630
|
+
return Array.isArray(r?.Items) ? (r?.Items).map(hr) : [];
|
|
631
631
|
},
|
|
632
632
|
async getAlertStatusList() {
|
|
633
|
-
const s =
|
|
633
|
+
const s = Oe(e.baseUrl, "/api/detectionpolicy/alerts/StatusList"), r = await Pe(s, {
|
|
634
634
|
method: "GET",
|
|
635
635
|
headers: t
|
|
636
636
|
});
|
|
637
637
|
return Array.isArray(r) ? r : [];
|
|
638
638
|
},
|
|
639
639
|
async getAlertsReport(s) {
|
|
640
|
-
const r =
|
|
640
|
+
const r = Oe(e.baseUrl, "/api/detectionpolicy/alerts/GetAlertsReport"), n = Gt(r, s), a = await Pe(n, {
|
|
641
641
|
method: "GET",
|
|
642
642
|
headers: t
|
|
643
643
|
});
|
|
644
644
|
return Array.isArray(a) ? a : [];
|
|
645
645
|
},
|
|
646
646
|
async updateAlertStatus(s) {
|
|
647
|
-
const r =
|
|
647
|
+
const r = Oe(e.baseUrl, "/api/detectionpolicy/alerts/Log"), n = {
|
|
648
648
|
AlertId: s.alertId ?? s.alertUniqueId ?? s.AlertId,
|
|
649
649
|
Status: s.status ?? s.Status ?? "",
|
|
650
650
|
Notes: s.notes ?? s.Notes ?? ""
|
|
651
651
|
};
|
|
652
|
-
return
|
|
652
|
+
return Pe(r, {
|
|
653
653
|
method: "POST",
|
|
654
654
|
headers: t,
|
|
655
655
|
body: JSON.stringify(n)
|
|
656
656
|
});
|
|
657
657
|
},
|
|
658
658
|
async getAdminSettings() {
|
|
659
|
-
const s =
|
|
659
|
+
const s = Oe(e.baseUrl, "/api/detectionpolicy/alerts/GetAdminSettings"), r = await Pe(s, {
|
|
660
660
|
method: "GET",
|
|
661
661
|
headers: t
|
|
662
662
|
});
|
|
@@ -667,19 +667,19 @@ function dr(e) {
|
|
|
667
667
|
return null;
|
|
668
668
|
},
|
|
669
669
|
async setAdminSettings(s) {
|
|
670
|
-
const r =
|
|
670
|
+
const r = Oe(e.baseUrl, "/api/detectionpolicy/alerts/SetAdminSettings"), n = {
|
|
671
671
|
userId: 0,
|
|
672
672
|
isAdminSetting: !0,
|
|
673
673
|
sortBy: s?.sortBy ?? ""
|
|
674
674
|
};
|
|
675
|
-
return
|
|
675
|
+
return Pe(r, {
|
|
676
676
|
method: "POST",
|
|
677
677
|
headers: t,
|
|
678
678
|
body: JSON.stringify(n)
|
|
679
679
|
});
|
|
680
680
|
},
|
|
681
681
|
async getPreferenceSettings() {
|
|
682
|
-
const s =
|
|
682
|
+
const s = Oe(e.baseUrl, "/api/detectionpolicy/alerts/GetPreferenceSettings"), r = await Pe(s, {
|
|
683
683
|
method: "GET",
|
|
684
684
|
headers: t
|
|
685
685
|
});
|
|
@@ -690,9 +690,9 @@ function dr(e) {
|
|
|
690
690
|
return null;
|
|
691
691
|
},
|
|
692
692
|
async setPreferenceSettings(s) {
|
|
693
|
-
const r =
|
|
694
|
-
const { hours: c, minutes:
|
|
695
|
-
return (c * 3600 +
|
|
693
|
+
const r = Oe(e.baseUrl, "/api/detectionpolicy/alerts/SetPreferenceSettings"), n = (u) => {
|
|
694
|
+
const { hours: c, minutes: S, seconds: f } = hs(u);
|
|
695
|
+
return (c * 3600 + S * 60 + f) * 1e7;
|
|
696
696
|
}, a = {
|
|
697
697
|
Settings: {
|
|
698
698
|
UserId: 0,
|
|
@@ -704,7 +704,7 @@ function dr(e) {
|
|
|
704
704
|
Email: !!s?.email,
|
|
705
705
|
SortBy: s?.sortBy ?? ""
|
|
706
706
|
}
|
|
707
|
-
}, o = await
|
|
707
|
+
}, o = await Pe(r, {
|
|
708
708
|
method: "POST",
|
|
709
709
|
headers: t,
|
|
710
710
|
body: JSON.stringify(a)
|
|
@@ -717,7 +717,7 @@ function dr(e) {
|
|
|
717
717
|
};
|
|
718
718
|
},
|
|
719
719
|
async getAlertNotifications(s) {
|
|
720
|
-
const r =
|
|
720
|
+
const r = Oe(e.baseUrl, "/api/detectionpolicy/alerts/GetNotifications"), n = Gt(r, { alertId: s }), a = await Pe(n, {
|
|
721
721
|
method: "GET",
|
|
722
722
|
headers: t
|
|
723
723
|
});
|
|
@@ -725,7 +725,7 @@ function dr(e) {
|
|
|
725
725
|
}
|
|
726
726
|
};
|
|
727
727
|
}
|
|
728
|
-
function
|
|
728
|
+
function mr() {
|
|
729
729
|
try {
|
|
730
730
|
const e = localStorage.getItem("authToken");
|
|
731
731
|
return e ? { Authorization: `Bearer ${e}` } : {};
|
|
@@ -733,10 +733,10 @@ function hr() {
|
|
|
733
733
|
return {};
|
|
734
734
|
}
|
|
735
735
|
}
|
|
736
|
-
async function
|
|
736
|
+
async function De(e, t) {
|
|
737
737
|
const s = {
|
|
738
738
|
...t.headers,
|
|
739
|
-
...
|
|
739
|
+
...mr()
|
|
740
740
|
}, r = await fetch(e, { ...t, headers: s });
|
|
741
741
|
if (r.status === 401)
|
|
742
742
|
throw window.location.href = "/login", new Error("Unauthorized");
|
|
@@ -755,18 +755,18 @@ async function Fe(e, t) {
|
|
|
755
755
|
}
|
|
756
756
|
return a;
|
|
757
757
|
}
|
|
758
|
-
function
|
|
758
|
+
function pr(e) {
|
|
759
759
|
const t = {
|
|
760
760
|
"Content-Type": "application/json",
|
|
761
761
|
...e.headers || {}
|
|
762
762
|
}, s = new URL("/api/detectionpolicy/rules", e.baseUrl).toString();
|
|
763
763
|
return {
|
|
764
764
|
async getRules() {
|
|
765
|
-
const r = await
|
|
765
|
+
const r = await De(s, { method: "GET", headers: t });
|
|
766
766
|
return Array.isArray(r) ? r : [];
|
|
767
767
|
},
|
|
768
768
|
async setEscalationSettings(r) {
|
|
769
|
-
return
|
|
769
|
+
return De(s, {
|
|
770
770
|
method: "POST",
|
|
771
771
|
headers: t,
|
|
772
772
|
body: JSON.stringify(r ?? {})
|
|
@@ -774,36 +774,36 @@ function fr(e) {
|
|
|
774
774
|
},
|
|
775
775
|
async getLookups() {
|
|
776
776
|
const r = (L) => new URL(L, e.baseUrl).toString(), n = [
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
777
|
+
De(r("/api/detectionpolicy/lookups/actiontypes"), { method: "GET", headers: t }),
|
|
778
|
+
De(r("/api/detectionpolicy/lookups/anomalies"), { method: "GET", headers: t }),
|
|
779
|
+
De(r("/api/detectionpolicy/lookups/thirdparty"), { method: "GET", headers: t }),
|
|
780
|
+
De(r("/api/detectionpolicy/lookups/severity"), { method: "GET", headers: t }),
|
|
781
|
+
De(r("/api/detectionpolicy/lookups/scheduletypes"), { method: "GET", headers: t })
|
|
782
782
|
], [
|
|
783
783
|
a,
|
|
784
784
|
o,
|
|
785
785
|
l,
|
|
786
786
|
d,
|
|
787
787
|
u
|
|
788
|
-
] = await Promise.allSettled(n), c = (L) => L.status === "fulfilled" && Array.isArray(L.value) ? L.value : [],
|
|
788
|
+
] = await Promise.allSettled(n), c = (L) => L.status === "fulfilled" && Array.isArray(L.value) ? L.value : [], S = c(a), f = c(o), k = c(l), N = c(d), m = c(u), A = S.map((L) => ({
|
|
789
789
|
actionTypeId: Number(L?.ActionTypeId),
|
|
790
790
|
name: L?.DisplayName ?? L?.Name ?? ""
|
|
791
791
|
})), $ = f.map((L) => ({
|
|
792
792
|
recordId: L?.AnomalyId,
|
|
793
793
|
anomalyName: L?.DisplayName ?? L?.Name ?? ""
|
|
794
|
-
})),
|
|
794
|
+
})), F = k.map((L) => ({
|
|
795
795
|
thirdPartyId: Number(L?.ThirdPartyId),
|
|
796
796
|
thirdPartyName: L?.ThirdPartyName ?? L?.Name ?? ""
|
|
797
|
-
})),
|
|
798
|
-
actionTypes:
|
|
797
|
+
})), j = {
|
|
798
|
+
actionTypes: A,
|
|
799
799
|
anomalies: $,
|
|
800
|
-
thirdParties:
|
|
800
|
+
thirdParties: F
|
|
801
801
|
};
|
|
802
|
-
return N.length && (
|
|
802
|
+
return N.length && (j.severities = N), m.length && (j.scheduleTypes = m), j;
|
|
803
803
|
},
|
|
804
804
|
async updateRule(r, n) {
|
|
805
805
|
const a = `${s}/${r}`;
|
|
806
|
-
return
|
|
806
|
+
return De(a, {
|
|
807
807
|
method: "PUT",
|
|
808
808
|
headers: t,
|
|
809
809
|
body: JSON.stringify(n ?? {})
|
|
@@ -811,8 +811,8 @@ function fr(e) {
|
|
|
811
811
|
}
|
|
812
812
|
};
|
|
813
813
|
}
|
|
814
|
-
const fs =
|
|
815
|
-
function
|
|
814
|
+
const fs = Ds(null);
|
|
815
|
+
function yr({
|
|
816
816
|
tenant: e = "snl",
|
|
817
817
|
override: t,
|
|
818
818
|
children: s
|
|
@@ -829,32 +829,32 @@ function mr({
|
|
|
829
829
|
t?.rulesBaseUrl,
|
|
830
830
|
JSON.stringify(t?.headers || {})
|
|
831
831
|
]), n = ue(() => {
|
|
832
|
-
const a = r.tenant === "schools" ?
|
|
832
|
+
const a = r.tenant === "schools" ? fr({ baseUrl: r.alertsBaseUrl, headers: r.headers }) : nr({ baseUrl: r.alertsBaseUrl, headers: r.headers }), o = r.tenant === "schools" ? pr({ baseUrl: r.rulesBaseUrl, headers: r.headers }) : ar({ baseUrl: r.alertsBaseUrl, headers: r.headers });
|
|
833
833
|
return { config: r, alerts: a, rules: o };
|
|
834
834
|
}, [r]);
|
|
835
835
|
return /* @__PURE__ */ i(fs.Provider, { value: n, children: s });
|
|
836
836
|
}
|
|
837
837
|
function Te() {
|
|
838
|
-
const e =
|
|
838
|
+
const e = Ms(fs);
|
|
839
839
|
if (!e) throw new Error("useApi must be used inside ApiProvider");
|
|
840
840
|
return e;
|
|
841
841
|
}
|
|
842
|
-
const
|
|
842
|
+
const gr = {
|
|
843
843
|
Critical: "#FFE2E2",
|
|
844
844
|
High: "#FF95004D",
|
|
845
845
|
Medium: "#FEF9C2",
|
|
846
846
|
Low: "#E0EDFF"
|
|
847
|
-
},
|
|
847
|
+
}, vr = {
|
|
848
848
|
Critical: "#FF3B30",
|
|
849
849
|
High: "#FFB86A",
|
|
850
850
|
Medium: "#FFCC00",
|
|
851
851
|
Low: "#007AFF"
|
|
852
|
-
},
|
|
853
|
-
function
|
|
854
|
-
const r = e ===
|
|
852
|
+
}, It = 6, Tt = 7;
|
|
853
|
+
function br(e, t, s) {
|
|
854
|
+
const r = e === It, n = e === Tt, a = t.isEmailSent, o = t.isSMSSent, l = r && a || n && o, d = r ? "Send Email" : n ? "Send SMS" : s, u = r && a ? "Email sent" : n && o ? "SMS sent" : d, c = r && a ? "Email sent" : n && o ? "SMS sent" : `Click to ${d}`;
|
|
855
855
|
return { isDisabled: l, buttonText: u, tooltipTitle: c };
|
|
856
856
|
}
|
|
857
|
-
function
|
|
857
|
+
function Ar(e) {
|
|
858
858
|
const t = /* @__PURE__ */ new Set();
|
|
859
859
|
(e || []).forEach((r) => {
|
|
860
860
|
const n = r.anomalyName;
|
|
@@ -863,7 +863,7 @@ function vr(e) {
|
|
|
863
863
|
const s = Array.from(t).map((r) => ({ label: r, value: r }));
|
|
864
864
|
return [{ label: "All Types", value: "All" }, ...s];
|
|
865
865
|
}
|
|
866
|
-
function
|
|
866
|
+
function Sr(e) {
|
|
867
867
|
const t = /* @__PURE__ */ new Set();
|
|
868
868
|
(e || []).forEach((r) => {
|
|
869
869
|
const n = r.spaceName;
|
|
@@ -876,11 +876,11 @@ function Wt(e, t) {
|
|
|
876
876
|
return `${e}-${t ? "email" : "sms"}`;
|
|
877
877
|
}
|
|
878
878
|
function Kt(e) {
|
|
879
|
-
return e ===
|
|
879
|
+
return e === It || e === Tt;
|
|
880
880
|
}
|
|
881
881
|
function it({ value: e, onChange: t, options: s, className: r, dropdownWidth: n }) {
|
|
882
882
|
return /* @__PURE__ */ i(
|
|
883
|
-
|
|
883
|
+
ve,
|
|
884
884
|
{
|
|
885
885
|
className: r,
|
|
886
886
|
options: s,
|
|
@@ -890,29 +890,29 @@ function it({ value: e, onChange: t, options: s, className: r, dropdownWidth: n
|
|
|
890
890
|
}
|
|
891
891
|
);
|
|
892
892
|
}
|
|
893
|
-
const
|
|
893
|
+
const wr = [
|
|
894
894
|
{ label: "All levels", value: "All" },
|
|
895
895
|
{ label: "Critical", value: "Critical" },
|
|
896
896
|
{ label: "High", value: "High" },
|
|
897
897
|
{ label: "Medium", value: "Medium" },
|
|
898
898
|
{ label: "Low", value: "Low" }
|
|
899
899
|
];
|
|
900
|
-
function
|
|
901
|
-
return /* @__PURE__ */ i(it, { className: "w-[140px]", value: e, onChange: t, options: s ||
|
|
900
|
+
function Nr({ value: e, onChange: t, options: s }) {
|
|
901
|
+
return /* @__PURE__ */ i(it, { className: "w-[140px]", value: e, onChange: t, options: s || wr });
|
|
902
902
|
}
|
|
903
|
-
const
|
|
903
|
+
const xr = [
|
|
904
904
|
{ label: "All Types", value: "All" },
|
|
905
905
|
{ label: "Weapon Detection", value: "Weapon" },
|
|
906
906
|
{ label: "Unauthorized Access", value: "Unauthorized" },
|
|
907
907
|
{ label: "Aggressive Behavior", value: "Aggressive" }
|
|
908
908
|
];
|
|
909
|
-
function
|
|
910
|
-
return /* @__PURE__ */ i(it, { className: "w-[220px]", dropdownWidth: 280, value: e, onChange: t, options: s ||
|
|
909
|
+
function Cr({ value: e, onChange: t, options: s }) {
|
|
910
|
+
return /* @__PURE__ */ i(it, { className: "w-[220px]", dropdownWidth: 280, value: e, onChange: t, options: s || xr });
|
|
911
911
|
}
|
|
912
|
-
function
|
|
912
|
+
function Ir({ value: e, onChange: t, options: s }) {
|
|
913
913
|
return /* @__PURE__ */ i(it, { className: "w-[100px]", value: e, onChange: t, options: s || [] });
|
|
914
914
|
}
|
|
915
|
-
const
|
|
915
|
+
const Tr = [
|
|
916
916
|
{ label: "All", value: "All" },
|
|
917
917
|
{ label: "SOS", value: "SOS" },
|
|
918
918
|
{ label: "911", value: "911" },
|
|
@@ -920,10 +920,10 @@ const Cr = [
|
|
|
920
920
|
{ label: "Eli", value: "Eli" },
|
|
921
921
|
{ label: "Skydio", value: "Skydio" }
|
|
922
922
|
];
|
|
923
|
-
function
|
|
924
|
-
return /* @__PURE__ */ i(it, { className: "w-[130px]", value: e, onChange: t, options: s ||
|
|
923
|
+
function Rr({ value: e, onChange: t, options: s }) {
|
|
924
|
+
return /* @__PURE__ */ i(it, { className: "w-[130px]", value: e, onChange: t, options: s || Tr });
|
|
925
925
|
}
|
|
926
|
-
function
|
|
926
|
+
function kr({
|
|
927
927
|
columns: e,
|
|
928
928
|
data: t,
|
|
929
929
|
loading: s = !1,
|
|
@@ -935,7 +935,7 @@ function Tr({
|
|
|
935
935
|
return /* @__PURE__ */ h("div", { children: [
|
|
936
936
|
a,
|
|
937
937
|
/* @__PURE__ */ i(
|
|
938
|
-
|
|
938
|
+
Nt,
|
|
939
939
|
{
|
|
940
940
|
rowKey: n,
|
|
941
941
|
dataSource: t,
|
|
@@ -953,49 +953,49 @@ function Tr({
|
|
|
953
953
|
] });
|
|
954
954
|
}
|
|
955
955
|
function ms({ data: e, loading: t = !1, pageSize: s = 10, columns: r, severityOptions: n, spaceOptions: a, renderActions: o, onAlertIdClick: l, onRefetch: d, excludeCompleted: u = !0 }) {
|
|
956
|
-
const [c,
|
|
957
|
-
6: { title: "Email", kind: "icon", icon: /* @__PURE__ */ i(
|
|
958
|
-
7: { title: "SMS", kind: "icon", icon: /* @__PURE__ */ i(
|
|
959
|
-
},
|
|
956
|
+
const [c, S] = w("All"), [f, k] = w("All"), [N, m] = w("All"), [A, $] = w("All"), [F, j] = w(""), [L, J] = w([{ label: "All", value: "All" }]), [V, Y] = w(/* @__PURE__ */ new Set()), { rules: K, alerts: T } = Te(), I = {
|
|
957
|
+
6: { title: "Email", kind: "icon", icon: /* @__PURE__ */ i(Hs, {}) },
|
|
958
|
+
7: { title: "SMS", kind: "icon", icon: /* @__PURE__ */ i(Qs, {}) }
|
|
959
|
+
}, E = ue(() => Ar(e), [e]), W = ue(() => Sr(e), [e]);
|
|
960
960
|
ce(() => {
|
|
961
|
-
let
|
|
961
|
+
let b = !0;
|
|
962
962
|
return (async () => {
|
|
963
963
|
try {
|
|
964
|
-
const
|
|
965
|
-
label:
|
|
966
|
-
value: String(
|
|
964
|
+
const g = await K.getLookups(), B = (Array.isArray(g.thirdParties) ? g.thirdParties : []).map((R) => ({
|
|
965
|
+
label: R.thirdPartyName,
|
|
966
|
+
value: String(R.thirdPartyId)
|
|
967
967
|
}));
|
|
968
|
-
|
|
969
|
-
} catch (
|
|
970
|
-
console.error("Error loading third party options",
|
|
968
|
+
b && J([{ label: "All", value: "All" }, ...B]);
|
|
969
|
+
} catch (g) {
|
|
970
|
+
console.error("Error loading third party options", g);
|
|
971
971
|
}
|
|
972
972
|
})(), () => {
|
|
973
|
-
|
|
973
|
+
b = !1;
|
|
974
974
|
};
|
|
975
975
|
}, [K]);
|
|
976
976
|
const te = ue(
|
|
977
|
-
() => (e || []).some((
|
|
977
|
+
() => (e || []).some((b) => ht(b).length > 0),
|
|
978
978
|
[e]
|
|
979
|
-
),
|
|
980
|
-
const
|
|
981
|
-
return
|
|
982
|
-
}), [e, c,
|
|
979
|
+
), O = ue(() => (e || []).filter((b) => {
|
|
980
|
+
const g = c === "All" || b.priority === c, P = `${b.id} ${b.description} ${b.statusType}`.toLowerCase(), B = !F || P.includes(F.toLowerCase()), R = f === "All" || (b.anomalyName || "").toLowerCase() === f.toLowerCase(), U = N === "All" || (b.spaceName || "").toLowerCase() === N.toLowerCase(), _ = !te || A === "All" || ht(b).includes(Number(A)), z = !u || !["completed", "false positive"].includes(String(b.statusType || "").toLowerCase());
|
|
981
|
+
return g && B && R && U && _ && z;
|
|
982
|
+
}), [e, c, F, f, N, A, te, u]), v = E, p = a && a.length ? a : W, x = [
|
|
983
983
|
{
|
|
984
984
|
title: "Severity",
|
|
985
985
|
dataIndex: "priority",
|
|
986
986
|
key: "priority",
|
|
987
987
|
width: 120,
|
|
988
|
-
render: (
|
|
988
|
+
render: (b) => /* @__PURE__ */ i(tt, { className: "px-[10px] py-[2px]", style: { border: `2px solid ${vr[b]}`, backgroundColor: gr[b] }, children: b })
|
|
989
989
|
},
|
|
990
990
|
{
|
|
991
991
|
title: "Tracker",
|
|
992
992
|
key: "tracker",
|
|
993
993
|
width: 140,
|
|
994
|
-
render: (
|
|
994
|
+
render: (b, g) => /* @__PURE__ */ i(
|
|
995
995
|
"a",
|
|
996
996
|
{
|
|
997
|
-
onClick: (
|
|
998
|
-
|
|
997
|
+
onClick: (P) => {
|
|
998
|
+
P.preventDefault(), l?.(g, { tab: "track", sourceTab: "active" });
|
|
999
999
|
},
|
|
1000
1000
|
className: "text-blue-600 hover:underline",
|
|
1001
1001
|
children: "Tracker"
|
|
@@ -1006,44 +1006,44 @@ function ms({ data: e, loading: t = !1, pageSize: s = 10, columns: r, severityOp
|
|
|
1006
1006
|
title: "Call to action/Human in the loop",
|
|
1007
1007
|
key: "actions",
|
|
1008
1008
|
width: 320,
|
|
1009
|
-
render: (
|
|
1010
|
-
if (o) return /* @__PURE__ */ i(
|
|
1011
|
-
const
|
|
1012
|
-
if (!
|
|
1013
|
-
const
|
|
1014
|
-
const _ = Wt(
|
|
1015
|
-
|
|
1009
|
+
render: (b, g) => {
|
|
1010
|
+
if (o) return /* @__PURE__ */ i(Ps, { children: o(g) });
|
|
1011
|
+
const P = ht(g);
|
|
1012
|
+
if (!P.length) return null;
|
|
1013
|
+
const B = async (R, U) => {
|
|
1014
|
+
const _ = Wt(g.id, R);
|
|
1015
|
+
Y((z) => new Set(z).add(_));
|
|
1016
1016
|
try {
|
|
1017
|
-
const
|
|
1018
|
-
|
|
1019
|
-
} catch (
|
|
1020
|
-
|
|
1017
|
+
const z = await T.sendSMSorEmailNotifications?.(g.id, R, U);
|
|
1018
|
+
z?.responseStatus ? (ye.success(z.data || (R ? "Email sent successfully" : "SMS sent successfully")), d?.()) : ye.error(z?.data || z?.errorMessage || "Failed to send notification");
|
|
1019
|
+
} catch (z) {
|
|
1020
|
+
ye.error(z?.message || "Failed to send notification");
|
|
1021
1021
|
} finally {
|
|
1022
|
-
|
|
1023
|
-
const
|
|
1024
|
-
return
|
|
1022
|
+
Y((z) => {
|
|
1023
|
+
const se = new Set(z);
|
|
1024
|
+
return se.delete(_), se;
|
|
1025
1025
|
});
|
|
1026
1026
|
}
|
|
1027
1027
|
};
|
|
1028
|
-
return /* @__PURE__ */ i(Ie, { size: "middle", children:
|
|
1029
|
-
const
|
|
1030
|
-
if (!
|
|
1031
|
-
const _ =
|
|
1032
|
-
|
|
1028
|
+
return /* @__PURE__ */ i(Ie, { size: "middle", children: P.map((R) => {
|
|
1029
|
+
const U = I[R];
|
|
1030
|
+
if (!U) return null;
|
|
1031
|
+
const _ = R === It, z = R === Tt, { isDisabled: se, buttonText: ge, tooltipTitle: fe } = br(R, g, U.title), ne = Wt(g.id, _), ae = Kt(R) && V.has(ne), Re = () => {
|
|
1032
|
+
B(_, z);
|
|
1033
1033
|
};
|
|
1034
|
-
return /* @__PURE__ */ i(
|
|
1034
|
+
return /* @__PURE__ */ i(Ls, { title: fe, children: /* @__PURE__ */ i(
|
|
1035
1035
|
Se,
|
|
1036
1036
|
{
|
|
1037
1037
|
size: "small",
|
|
1038
|
-
disabled:
|
|
1038
|
+
disabled: se,
|
|
1039
1039
|
loading: ae,
|
|
1040
|
-
onClick: Kt(
|
|
1041
|
-
icon: !ae && (
|
|
1040
|
+
onClick: Kt(R) ? Re : void 0,
|
|
1041
|
+
icon: !ae && (U.kind === "img" && U.src ? /* @__PURE__ */ i("img", { src: U.src, alt: U.alt || U.title }) : U.icon),
|
|
1042
1042
|
className: "flex flex-col items-center justify-center gap-1",
|
|
1043
1043
|
style: { height: "fit-content" },
|
|
1044
|
-
children:
|
|
1044
|
+
children: ge
|
|
1045
1045
|
}
|
|
1046
|
-
) },
|
|
1046
|
+
) }, R);
|
|
1047
1047
|
}) });
|
|
1048
1048
|
}
|
|
1049
1049
|
},
|
|
@@ -1052,17 +1052,17 @@ function ms({ data: e, loading: t = !1, pageSize: s = 10, columns: r, severityOp
|
|
|
1052
1052
|
dataIndex: "timestamp",
|
|
1053
1053
|
key: "timestamp",
|
|
1054
1054
|
width: 220,
|
|
1055
|
-
render: (
|
|
1056
|
-
const
|
|
1055
|
+
render: (b, g) => {
|
|
1056
|
+
const P = g?.timeElapsed, B = g?.timeRemaining, R = P ? jt(P) : 0, U = B ? jt(B) : 0, _ = Math.round(R / (R + U) * 100);
|
|
1057
1057
|
return /* @__PURE__ */ h("div", { children: [
|
|
1058
1058
|
/* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
1059
1059
|
/* @__PURE__ */ i("span", { className: "w-[70px]", children: "Elapsed:" }),
|
|
1060
|
-
/* @__PURE__ */ i("span", { className: "font-medium", children:
|
|
1060
|
+
/* @__PURE__ */ i("span", { className: "font-medium", children: P ?? "-" })
|
|
1061
1061
|
] }),
|
|
1062
|
-
/* @__PURE__ */ i(
|
|
1062
|
+
/* @__PURE__ */ i($s, { percent: _, showInfo: !1, size: "small", strokeColor: Xs(g.priority) }),
|
|
1063
1063
|
/* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
1064
1064
|
/* @__PURE__ */ i("span", { className: "w-[70px]", children: "Remaining" }),
|
|
1065
|
-
/* @__PURE__ */ i("span", { className: "font-medium", children:
|
|
1065
|
+
/* @__PURE__ */ i("span", { className: "font-medium", children: B ?? "-" })
|
|
1066
1066
|
] })
|
|
1067
1067
|
] });
|
|
1068
1068
|
}
|
|
@@ -1077,54 +1077,54 @@ function ms({ data: e, loading: t = !1, pageSize: s = 10, columns: r, severityOp
|
|
|
1077
1077
|
title: "Description",
|
|
1078
1078
|
dataIndex: "description",
|
|
1079
1079
|
key: "description",
|
|
1080
|
-
render: (
|
|
1080
|
+
render: (b, g) => /* @__PURE__ */ h("div", { children: [
|
|
1081
1081
|
/* @__PURE__ */ i(
|
|
1082
1082
|
"a",
|
|
1083
1083
|
{
|
|
1084
|
-
onClick: (
|
|
1085
|
-
|
|
1084
|
+
onClick: (P) => {
|
|
1085
|
+
P.preventDefault(), l?.(g, { sourceTab: "active" });
|
|
1086
1086
|
},
|
|
1087
1087
|
className: "inline-block mb-1 text-blue-600",
|
|
1088
|
-
children:
|
|
1088
|
+
children: g.alertNumber
|
|
1089
1089
|
}
|
|
1090
1090
|
),
|
|
1091
|
-
/* @__PURE__ */ i("div", { className: "text-black/65", children:
|
|
1091
|
+
/* @__PURE__ */ i("div", { className: "text-black/65", children: b })
|
|
1092
1092
|
] })
|
|
1093
1093
|
}
|
|
1094
1094
|
], y = r && r.length ? r : x;
|
|
1095
1095
|
return /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(
|
|
1096
|
-
|
|
1096
|
+
kr,
|
|
1097
1097
|
{
|
|
1098
1098
|
rowKey: "id",
|
|
1099
|
-
data:
|
|
1099
|
+
data: O,
|
|
1100
1100
|
columns: y,
|
|
1101
1101
|
loading: t,
|
|
1102
1102
|
pageSize: s,
|
|
1103
|
-
toolbar: /* @__PURE__ */ h(
|
|
1104
|
-
/* @__PURE__ */ i(
|
|
1103
|
+
toolbar: /* @__PURE__ */ h(Ae, { gutter: [12, 12], className: "mb-3", align: "middle", children: [
|
|
1104
|
+
/* @__PURE__ */ i(G, { flex: "none", children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
1105
1105
|
/* @__PURE__ */ i("span", { children: "Severity" }),
|
|
1106
|
-
/* @__PURE__ */ i(
|
|
1106
|
+
/* @__PURE__ */ i(Nr, { value: c, onChange: S, options: n })
|
|
1107
1107
|
] }) }),
|
|
1108
|
-
/* @__PURE__ */ i(
|
|
1108
|
+
/* @__PURE__ */ i(G, { flex: "none", children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
1109
1109
|
/* @__PURE__ */ i("span", { children: "Anomaly type" }),
|
|
1110
|
-
/* @__PURE__ */ i(
|
|
1110
|
+
/* @__PURE__ */ i(Cr, { value: f, onChange: k, options: v })
|
|
1111
1111
|
] }) }),
|
|
1112
|
-
/* @__PURE__ */ i(
|
|
1112
|
+
/* @__PURE__ */ i(G, { flex: "none", children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
1113
1113
|
/* @__PURE__ */ i("span", { children: "Space" }),
|
|
1114
|
-
/* @__PURE__ */ i(
|
|
1114
|
+
/* @__PURE__ */ i(Ir, { value: N, onChange: m, options: p })
|
|
1115
1115
|
] }) }),
|
|
1116
|
-
/* @__PURE__ */ i(
|
|
1116
|
+
/* @__PURE__ */ i(G, { flex: "none", children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
1117
1117
|
/* @__PURE__ */ i("span", { children: "Action Taken" }),
|
|
1118
|
-
/* @__PURE__ */ i(
|
|
1118
|
+
/* @__PURE__ */ i(Rr, { value: A, onChange: $, options: L })
|
|
1119
1119
|
] }) }),
|
|
1120
|
-
/* @__PURE__ */ i(
|
|
1121
|
-
/* @__PURE__ */ i(
|
|
1122
|
-
|
|
1120
|
+
/* @__PURE__ */ i(G, { flex: "auto" }),
|
|
1121
|
+
/* @__PURE__ */ i(G, { flex: "none", children: /* @__PURE__ */ i(
|
|
1122
|
+
Us.Search,
|
|
1123
1123
|
{
|
|
1124
1124
|
allowClear: !0,
|
|
1125
1125
|
placeholder: "Search",
|
|
1126
|
-
onSearch:
|
|
1127
|
-
onChange: (
|
|
1126
|
+
onSearch: j,
|
|
1127
|
+
onChange: (b) => j(b.target.value),
|
|
1128
1128
|
className: "w-[260px] ",
|
|
1129
1129
|
enterButton: !0
|
|
1130
1130
|
}
|
|
@@ -1133,7 +1133,7 @@ function ms({ data: e, loading: t = !1, pageSize: s = 10, columns: r, severityOp
|
|
|
1133
1133
|
}
|
|
1134
1134
|
) });
|
|
1135
1135
|
}
|
|
1136
|
-
var
|
|
1136
|
+
var Qe = class {
|
|
1137
1137
|
constructor() {
|
|
1138
1138
|
this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
|
|
1139
1139
|
}
|
|
@@ -1149,7 +1149,7 @@ var qe = class {
|
|
|
1149
1149
|
}
|
|
1150
1150
|
onUnsubscribe() {
|
|
1151
1151
|
}
|
|
1152
|
-
},
|
|
1152
|
+
}, Er = {
|
|
1153
1153
|
// We need the wrapper function syntax below instead of direct references to
|
|
1154
1154
|
// global setTimeout etc.
|
|
1155
1155
|
//
|
|
@@ -1164,14 +1164,14 @@ var qe = class {
|
|
|
1164
1164
|
clearTimeout: (e) => clearTimeout(e),
|
|
1165
1165
|
setInterval: (e, t) => setInterval(e, t),
|
|
1166
1166
|
clearInterval: (e) => clearInterval(e)
|
|
1167
|
-
},
|
|
1167
|
+
}, Or = class {
|
|
1168
1168
|
// We cannot have TimeoutManager<T> as we must instantiate it with a concrete
|
|
1169
1169
|
// type at app boot; and if we leave that type, then any new timer provider
|
|
1170
1170
|
// would need to support ReturnType<typeof setTimeout>, which is infeasible.
|
|
1171
1171
|
//
|
|
1172
1172
|
// We settle for type safety for the TimeoutProvider type, and accept that
|
|
1173
1173
|
// this class is unsafe internally to allow for extension.
|
|
1174
|
-
#e =
|
|
1174
|
+
#e = Er;
|
|
1175
1175
|
#t = !1;
|
|
1176
1176
|
setTimeoutProvider(e) {
|
|
1177
1177
|
process.env.NODE_ENV !== "production" && this.#t && e !== this.#e && console.error(
|
|
@@ -1191,26 +1191,26 @@ var qe = class {
|
|
|
1191
1191
|
clearInterval(e) {
|
|
1192
1192
|
this.#e.clearInterval(e);
|
|
1193
1193
|
}
|
|
1194
|
-
},
|
|
1195
|
-
function
|
|
1194
|
+
}, Le = new Or();
|
|
1195
|
+
function Pr(e) {
|
|
1196
1196
|
setTimeout(e, 0);
|
|
1197
1197
|
}
|
|
1198
|
-
var
|
|
1199
|
-
function
|
|
1198
|
+
var $e = typeof window > "u" || "Deno" in globalThis;
|
|
1199
|
+
function pe() {
|
|
1200
1200
|
}
|
|
1201
|
-
function
|
|
1201
|
+
function Mr(e, t) {
|
|
1202
1202
|
return typeof e == "function" ? e(t) : e;
|
|
1203
1203
|
}
|
|
1204
|
-
function
|
|
1204
|
+
function pt(e) {
|
|
1205
1205
|
return typeof e == "number" && e >= 0 && e !== 1 / 0;
|
|
1206
1206
|
}
|
|
1207
1207
|
function ps(e, t) {
|
|
1208
1208
|
return Math.max(e + (t || 0) - Date.now(), 0);
|
|
1209
1209
|
}
|
|
1210
|
-
function
|
|
1210
|
+
function Fe(e, t) {
|
|
1211
1211
|
return typeof e == "function" ? e(t) : e;
|
|
1212
1212
|
}
|
|
1213
|
-
function
|
|
1213
|
+
function Ne(e, t) {
|
|
1214
1214
|
return typeof e == "function" ? e(t) : e;
|
|
1215
1215
|
}
|
|
1216
1216
|
function Yt(e, t) {
|
|
@@ -1224,7 +1224,7 @@ function Yt(e, t) {
|
|
|
1224
1224
|
} = e;
|
|
1225
1225
|
if (o) {
|
|
1226
1226
|
if (r) {
|
|
1227
|
-
if (t.queryHash !==
|
|
1227
|
+
if (t.queryHash !== Rt(o, t.options))
|
|
1228
1228
|
return !1;
|
|
1229
1229
|
} else if (!We(t.queryKey, o))
|
|
1230
1230
|
return !1;
|
|
@@ -1242,46 +1242,46 @@ function zt(e, t) {
|
|
|
1242
1242
|
if (!t.options.mutationKey)
|
|
1243
1243
|
return !1;
|
|
1244
1244
|
if (s) {
|
|
1245
|
-
if (
|
|
1245
|
+
if (Be(t.options.mutationKey) !== Be(a))
|
|
1246
1246
|
return !1;
|
|
1247
1247
|
} else if (!We(t.options.mutationKey, a))
|
|
1248
1248
|
return !1;
|
|
1249
1249
|
}
|
|
1250
1250
|
return !(r && t.state.status !== r || n && !n(t));
|
|
1251
1251
|
}
|
|
1252
|
-
function
|
|
1253
|
-
return (t?.queryKeyHashFn ||
|
|
1252
|
+
function Rt(e, t) {
|
|
1253
|
+
return (t?.queryKeyHashFn || Be)(e);
|
|
1254
1254
|
}
|
|
1255
|
-
function
|
|
1255
|
+
function Be(e) {
|
|
1256
1256
|
return JSON.stringify(
|
|
1257
1257
|
e,
|
|
1258
|
-
(t, s) =>
|
|
1258
|
+
(t, s) => gt(s) ? Object.keys(s).sort().reduce((r, n) => (r[n] = s[n], r), {}) : s
|
|
1259
1259
|
);
|
|
1260
1260
|
}
|
|
1261
1261
|
function We(e, t) {
|
|
1262
1262
|
return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? Object.keys(t).every((s) => We(e[s], t[s])) : !1;
|
|
1263
1263
|
}
|
|
1264
|
-
var
|
|
1265
|
-
function
|
|
1264
|
+
var Dr = Object.prototype.hasOwnProperty;
|
|
1265
|
+
function yt(e, t, s = 0) {
|
|
1266
1266
|
if (e === t)
|
|
1267
1267
|
return e;
|
|
1268
1268
|
if (s > 500) return t;
|
|
1269
1269
|
const r = Vt(e) && Vt(t);
|
|
1270
|
-
if (!r && !(
|
|
1270
|
+
if (!r && !(gt(e) && gt(t))) return t;
|
|
1271
1271
|
const a = (r ? e : Object.keys(e)).length, o = r ? t : Object.keys(t), l = o.length, d = r ? new Array(l) : {};
|
|
1272
1272
|
let u = 0;
|
|
1273
1273
|
for (let c = 0; c < l; c++) {
|
|
1274
|
-
const
|
|
1275
|
-
if (f ===
|
|
1276
|
-
d[
|
|
1274
|
+
const S = r ? c : o[c], f = e[S], k = t[S];
|
|
1275
|
+
if (f === k) {
|
|
1276
|
+
d[S] = f, (r ? c < a : Dr.call(e, S)) && u++;
|
|
1277
1277
|
continue;
|
|
1278
1278
|
}
|
|
1279
|
-
if (f === null ||
|
|
1280
|
-
d[
|
|
1279
|
+
if (f === null || k === null || typeof f != "object" || typeof k != "object") {
|
|
1280
|
+
d[S] = k;
|
|
1281
1281
|
continue;
|
|
1282
1282
|
}
|
|
1283
|
-
const N =
|
|
1284
|
-
d[
|
|
1283
|
+
const N = yt(f, k, s + 1);
|
|
1284
|
+
d[S] = N, N === f && u++;
|
|
1285
1285
|
}
|
|
1286
1286
|
return a === l && u === a ? e : d;
|
|
1287
1287
|
}
|
|
@@ -1296,7 +1296,7 @@ function st(e, t) {
|
|
|
1296
1296
|
function Vt(e) {
|
|
1297
1297
|
return Array.isArray(e) && e.length === Object.keys(e).length;
|
|
1298
1298
|
}
|
|
1299
|
-
function
|
|
1299
|
+
function gt(e) {
|
|
1300
1300
|
if (!Jt(e))
|
|
1301
1301
|
return !1;
|
|
1302
1302
|
const t = e.constructor;
|
|
@@ -1308,32 +1308,32 @@ function yt(e) {
|
|
|
1308
1308
|
function Jt(e) {
|
|
1309
1309
|
return Object.prototype.toString.call(e) === "[object Object]";
|
|
1310
1310
|
}
|
|
1311
|
-
function
|
|
1311
|
+
function Fr(e) {
|
|
1312
1312
|
return new Promise((t) => {
|
|
1313
|
-
|
|
1313
|
+
Le.setTimeout(t, e);
|
|
1314
1314
|
});
|
|
1315
1315
|
}
|
|
1316
|
-
function
|
|
1316
|
+
function vt(e, t, s) {
|
|
1317
1317
|
if (typeof s.structuralSharing == "function")
|
|
1318
1318
|
return s.structuralSharing(e, t);
|
|
1319
1319
|
if (s.structuralSharing !== !1) {
|
|
1320
1320
|
if (process.env.NODE_ENV !== "production")
|
|
1321
1321
|
try {
|
|
1322
|
-
return
|
|
1322
|
+
return yt(e, t);
|
|
1323
1323
|
} catch (r) {
|
|
1324
1324
|
throw console.error(
|
|
1325
1325
|
`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${s.queryHash}]: ${r}`
|
|
1326
1326
|
), r;
|
|
1327
1327
|
}
|
|
1328
|
-
return
|
|
1328
|
+
return yt(e, t);
|
|
1329
1329
|
}
|
|
1330
1330
|
return t;
|
|
1331
1331
|
}
|
|
1332
|
-
function
|
|
1332
|
+
function Ur(e, t, s = 0) {
|
|
1333
1333
|
const r = [...e, t];
|
|
1334
1334
|
return s && r.length > s ? r.slice(1) : r;
|
|
1335
1335
|
}
|
|
1336
|
-
function
|
|
1336
|
+
function Lr(e, t, s = 0) {
|
|
1337
1337
|
const r = [t, ...e];
|
|
1338
1338
|
return s && r.length > s ? r.slice(0, -1) : r;
|
|
1339
1339
|
}
|
|
@@ -1343,23 +1343,23 @@ function ys(e, t) {
|
|
|
1343
1343
|
`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`
|
|
1344
1344
|
), !e.queryFn && t?.initialPromise ? () => t.initialPromise : !e.queryFn || e.queryFn === rt ? () => Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn;
|
|
1345
1345
|
}
|
|
1346
|
-
function
|
|
1346
|
+
function kt(e, t) {
|
|
1347
1347
|
return typeof e == "function" ? e(...t) : !!e;
|
|
1348
1348
|
}
|
|
1349
|
-
function
|
|
1349
|
+
function $r(e, t, s) {
|
|
1350
1350
|
let r = !1, n;
|
|
1351
1351
|
return Object.defineProperty(e, "signal", {
|
|
1352
1352
|
enumerable: !0,
|
|
1353
1353
|
get: () => (n ??= t(), r || (r = !0, n.aborted ? s() : n.addEventListener("abort", s, { once: !0 })), n)
|
|
1354
1354
|
}), e;
|
|
1355
1355
|
}
|
|
1356
|
-
var
|
|
1356
|
+
var Br = class extends Qe {
|
|
1357
1357
|
#e;
|
|
1358
1358
|
#t;
|
|
1359
1359
|
#s;
|
|
1360
1360
|
constructor() {
|
|
1361
1361
|
super(), this.#s = (e) => {
|
|
1362
|
-
if (
|
|
1362
|
+
if (!$e && window.addEventListener) {
|
|
1363
1363
|
const t = () => e();
|
|
1364
1364
|
return window.addEventListener("visibilitychange", t, !1), () => {
|
|
1365
1365
|
window.removeEventListener("visibilitychange", t);
|
|
@@ -1390,8 +1390,8 @@ var Lr = class extends qe {
|
|
|
1390
1390
|
isFocused() {
|
|
1391
1391
|
return typeof this.#e == "boolean" ? this.#e : globalThis.document?.visibilityState !== "hidden";
|
|
1392
1392
|
}
|
|
1393
|
-
},
|
|
1394
|
-
function
|
|
1393
|
+
}, Et = new Br();
|
|
1394
|
+
function bt() {
|
|
1395
1395
|
let e, t;
|
|
1396
1396
|
const s = new Promise((n, a) => {
|
|
1397
1397
|
e = n, t = a;
|
|
@@ -1413,13 +1413,13 @@ function vt() {
|
|
|
1413
1413
|
}), t(n);
|
|
1414
1414
|
}, s;
|
|
1415
1415
|
}
|
|
1416
|
-
var
|
|
1417
|
-
function
|
|
1416
|
+
var jr = Pr;
|
|
1417
|
+
function _r() {
|
|
1418
1418
|
let e = [], t = 0, s = (l) => {
|
|
1419
1419
|
l();
|
|
1420
1420
|
}, r = (l) => {
|
|
1421
1421
|
l();
|
|
1422
|
-
}, n =
|
|
1422
|
+
}, n = jr;
|
|
1423
1423
|
const a = (l) => {
|
|
1424
1424
|
t ? e.push(l) : n(() => {
|
|
1425
1425
|
s(l);
|
|
@@ -1473,13 +1473,13 @@ function Br() {
|
|
|
1473
1473
|
}
|
|
1474
1474
|
};
|
|
1475
1475
|
}
|
|
1476
|
-
var oe =
|
|
1476
|
+
var oe = _r(), qr = class extends Qe {
|
|
1477
1477
|
#e = !0;
|
|
1478
1478
|
#t;
|
|
1479
1479
|
#s;
|
|
1480
1480
|
constructor() {
|
|
1481
1481
|
super(), this.#s = (e) => {
|
|
1482
|
-
if (
|
|
1482
|
+
if (!$e && window.addEventListener) {
|
|
1483
1483
|
const t = () => e(!0), s = () => e(!1);
|
|
1484
1484
|
return window.addEventListener("online", t, !1), window.addEventListener("offline", s, !1), () => {
|
|
1485
1485
|
window.removeEventListener("online", t), window.removeEventListener("offline", s);
|
|
@@ -1504,36 +1504,36 @@ var oe = Br(), jr = class extends qe {
|
|
|
1504
1504
|
isOnline() {
|
|
1505
1505
|
return this.#e;
|
|
1506
1506
|
}
|
|
1507
|
-
}, nt = new
|
|
1508
|
-
function
|
|
1507
|
+
}, nt = new qr();
|
|
1508
|
+
function Qr(e) {
|
|
1509
1509
|
return Math.min(1e3 * 2 ** e, 3e4);
|
|
1510
1510
|
}
|
|
1511
1511
|
function gs(e) {
|
|
1512
1512
|
return (e ?? "online") === "online" ? nt.isOnline() : !0;
|
|
1513
1513
|
}
|
|
1514
|
-
var
|
|
1514
|
+
var At = class extends Error {
|
|
1515
1515
|
constructor(e) {
|
|
1516
1516
|
super("CancelledError"), this.revert = e?.revert, this.silent = e?.silent;
|
|
1517
1517
|
}
|
|
1518
1518
|
};
|
|
1519
1519
|
function vs(e) {
|
|
1520
1520
|
let t = !1, s = 0, r;
|
|
1521
|
-
const n =
|
|
1521
|
+
const n = bt(), a = () => n.status !== "pending", o = (m) => {
|
|
1522
1522
|
if (!a()) {
|
|
1523
|
-
const
|
|
1524
|
-
f(
|
|
1523
|
+
const A = new At(m);
|
|
1524
|
+
f(A), e.onCancel?.(A);
|
|
1525
1525
|
}
|
|
1526
1526
|
}, l = () => {
|
|
1527
1527
|
t = !0;
|
|
1528
1528
|
}, d = () => {
|
|
1529
1529
|
t = !1;
|
|
1530
|
-
}, u = () =>
|
|
1530
|
+
}, u = () => Et.isFocused() && (e.networkMode === "always" || nt.isOnline()) && e.canRun(), c = () => gs(e.networkMode) && e.canRun(), S = (m) => {
|
|
1531
1531
|
a() || (r?.(), n.resolve(m));
|
|
1532
1532
|
}, f = (m) => {
|
|
1533
1533
|
a() || (r?.(), n.reject(m));
|
|
1534
|
-
},
|
|
1535
|
-
r = (
|
|
1536
|
-
(a() || u()) && m(
|
|
1534
|
+
}, k = () => new Promise((m) => {
|
|
1535
|
+
r = (A) => {
|
|
1536
|
+
(a() || u()) && m(A);
|
|
1537
1537
|
}, e.onPause?.();
|
|
1538
1538
|
}).then(() => {
|
|
1539
1539
|
r = void 0, a() || e.onContinue?.();
|
|
@@ -1541,21 +1541,21 @@ function vs(e) {
|
|
|
1541
1541
|
if (a())
|
|
1542
1542
|
return;
|
|
1543
1543
|
let m;
|
|
1544
|
-
const
|
|
1544
|
+
const A = s === 0 ? e.initialPromise : void 0;
|
|
1545
1545
|
try {
|
|
1546
|
-
m =
|
|
1546
|
+
m = A ?? e.fn();
|
|
1547
1547
|
} catch ($) {
|
|
1548
1548
|
m = Promise.reject($);
|
|
1549
1549
|
}
|
|
1550
|
-
Promise.resolve(m).then(
|
|
1550
|
+
Promise.resolve(m).then(S).catch(($) => {
|
|
1551
1551
|
if (a())
|
|
1552
1552
|
return;
|
|
1553
|
-
const
|
|
1553
|
+
const F = e.retry ?? ($e ? 0 : 3), j = e.retryDelay ?? Qr, L = typeof j == "function" ? j(s, $) : j, J = F === !0 || typeof F == "number" && s < F || typeof F == "function" && F(s, $);
|
|
1554
1554
|
if (t || !J) {
|
|
1555
1555
|
f($);
|
|
1556
1556
|
return;
|
|
1557
1557
|
}
|
|
1558
|
-
s++, e.onFail?.(s, $),
|
|
1558
|
+
s++, e.onFail?.(s, $), Fr(L).then(() => u() ? void 0 : k()).then(() => {
|
|
1559
1559
|
t ? f($) : N();
|
|
1560
1560
|
});
|
|
1561
1561
|
});
|
|
@@ -1568,7 +1568,7 @@ function vs(e) {
|
|
|
1568
1568
|
cancelRetry: l,
|
|
1569
1569
|
continueRetry: d,
|
|
1570
1570
|
canStart: c,
|
|
1571
|
-
start: () => (c() ? N() :
|
|
1571
|
+
start: () => (c() ? N() : k().then(N), n)
|
|
1572
1572
|
};
|
|
1573
1573
|
}
|
|
1574
1574
|
var bs = class {
|
|
@@ -1577,20 +1577,20 @@ var bs = class {
|
|
|
1577
1577
|
this.clearGcTimeout();
|
|
1578
1578
|
}
|
|
1579
1579
|
scheduleGc() {
|
|
1580
|
-
this.clearGcTimeout(),
|
|
1580
|
+
this.clearGcTimeout(), pt(this.gcTime) && (this.#e = Le.setTimeout(() => {
|
|
1581
1581
|
this.optionalRemove();
|
|
1582
1582
|
}, this.gcTime));
|
|
1583
1583
|
}
|
|
1584
1584
|
updateGcTime(e) {
|
|
1585
1585
|
this.gcTime = Math.max(
|
|
1586
1586
|
this.gcTime || 0,
|
|
1587
|
-
e ?? (
|
|
1587
|
+
e ?? ($e ? 1 / 0 : 300 * 1e3)
|
|
1588
1588
|
);
|
|
1589
1589
|
}
|
|
1590
1590
|
clearGcTimeout() {
|
|
1591
|
-
this.#e && (
|
|
1591
|
+
this.#e && (Le.clearTimeout(this.#e), this.#e = void 0);
|
|
1592
1592
|
}
|
|
1593
|
-
},
|
|
1593
|
+
}, Hr = class extends bs {
|
|
1594
1594
|
#e;
|
|
1595
1595
|
#t;
|
|
1596
1596
|
#s;
|
|
@@ -1619,7 +1619,7 @@ var bs = class {
|
|
|
1619
1619
|
!this.observers.length && this.state.fetchStatus === "idle" && this.#s.remove(this);
|
|
1620
1620
|
}
|
|
1621
1621
|
setData(e, t) {
|
|
1622
|
-
const s =
|
|
1622
|
+
const s = vt(this.state.data, e, this.options);
|
|
1623
1623
|
return this.#i({
|
|
1624
1624
|
data: s,
|
|
1625
1625
|
type: "success",
|
|
@@ -1632,7 +1632,7 @@ var bs = class {
|
|
|
1632
1632
|
}
|
|
1633
1633
|
cancel(e) {
|
|
1634
1634
|
const t = this.#r?.promise;
|
|
1635
|
-
return this.#r?.cancel(e), t ? t.then(
|
|
1635
|
+
return this.#r?.cancel(e), t ? t.then(pe).catch(pe) : Promise.resolve();
|
|
1636
1636
|
}
|
|
1637
1637
|
destroy() {
|
|
1638
1638
|
super.destroy(), this.cancel({ silent: !0 });
|
|
@@ -1642,7 +1642,7 @@ var bs = class {
|
|
|
1642
1642
|
}
|
|
1643
1643
|
isActive() {
|
|
1644
1644
|
return this.observers.some(
|
|
1645
|
-
(e) =>
|
|
1645
|
+
(e) => Ne(e.options.enabled, this) !== !1
|
|
1646
1646
|
);
|
|
1647
1647
|
}
|
|
1648
1648
|
isDisabled() {
|
|
@@ -1650,7 +1650,7 @@ var bs = class {
|
|
|
1650
1650
|
}
|
|
1651
1651
|
isStatic() {
|
|
1652
1652
|
return this.getObserversCount() > 0 ? this.observers.some(
|
|
1653
|
-
(e) =>
|
|
1653
|
+
(e) => Fe(e.options.staleTime, this) === "static"
|
|
1654
1654
|
) : !1;
|
|
1655
1655
|
}
|
|
1656
1656
|
isStale() {
|
|
@@ -1730,7 +1730,7 @@ var bs = class {
|
|
|
1730
1730
|
initialPromise: t?.initialPromise,
|
|
1731
1731
|
fn: o.fetchFn,
|
|
1732
1732
|
onCancel: (l) => {
|
|
1733
|
-
l instanceof
|
|
1733
|
+
l instanceof At && l.revert && this.setState({
|
|
1734
1734
|
...this.#t,
|
|
1735
1735
|
fetchStatus: "idle"
|
|
1736
1736
|
}), s.abort();
|
|
@@ -1761,7 +1761,7 @@ var bs = class {
|
|
|
1761
1761
|
this
|
|
1762
1762
|
), l;
|
|
1763
1763
|
} catch (l) {
|
|
1764
|
-
if (l instanceof
|
|
1764
|
+
if (l instanceof At) {
|
|
1765
1765
|
if (l.silent)
|
|
1766
1766
|
return this.#r.promise;
|
|
1767
1767
|
if (l.revert) {
|
|
@@ -1807,7 +1807,7 @@ var bs = class {
|
|
|
1807
1807
|
case "fetch":
|
|
1808
1808
|
return {
|
|
1809
1809
|
...s,
|
|
1810
|
-
...
|
|
1810
|
+
...As(s.data, this.options),
|
|
1811
1811
|
fetchMeta: e.meta ?? null
|
|
1812
1812
|
};
|
|
1813
1813
|
case "success":
|
|
@@ -1856,7 +1856,7 @@ var bs = class {
|
|
|
1856
1856
|
});
|
|
1857
1857
|
}
|
|
1858
1858
|
};
|
|
1859
|
-
function
|
|
1859
|
+
function As(e, t) {
|
|
1860
1860
|
return {
|
|
1861
1861
|
fetchFailureCount: 0,
|
|
1862
1862
|
fetchFailureReason: null,
|
|
@@ -1893,9 +1893,9 @@ function Xt(e) {
|
|
|
1893
1893
|
fetchStatus: "idle"
|
|
1894
1894
|
};
|
|
1895
1895
|
}
|
|
1896
|
-
var
|
|
1896
|
+
var Gr = class extends Qe {
|
|
1897
1897
|
constructor(e, t) {
|
|
1898
|
-
super(), this.options = t, this.#e = e, this.#i = null, this.#o =
|
|
1898
|
+
super(), this.options = t, this.#e = e, this.#i = null, this.#o = bt(), this.bindMethods(), this.setOptions(t);
|
|
1899
1899
|
}
|
|
1900
1900
|
#e;
|
|
1901
1901
|
#t = void 0;
|
|
@@ -1938,11 +1938,11 @@ var Qr = class extends qe {
|
|
|
1938
1938
|
);
|
|
1939
1939
|
}
|
|
1940
1940
|
destroy() {
|
|
1941
|
-
this.listeners = /* @__PURE__ */ new Set(), this.#
|
|
1941
|
+
this.listeners = /* @__PURE__ */ new Set(), this.#A(), this.#S(), this.#t.removeObserver(this);
|
|
1942
1942
|
}
|
|
1943
1943
|
setOptions(e) {
|
|
1944
1944
|
const t = this.options, s = this.#t;
|
|
1945
|
-
if (this.options = this.#e.defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof
|
|
1945
|
+
if (this.options = this.#e.defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof Ne(this.options.enabled, this.#t) != "boolean")
|
|
1946
1946
|
throw new Error(
|
|
1947
1947
|
"Expected enabled to be a boolean or a callback that returns a boolean"
|
|
1948
1948
|
);
|
|
@@ -1957,13 +1957,13 @@ var Qr = class extends qe {
|
|
|
1957
1957
|
s,
|
|
1958
1958
|
this.options,
|
|
1959
1959
|
t
|
|
1960
|
-
) && this.#d(), this.updateResult(), r && (this.#t !== s ||
|
|
1960
|
+
) && this.#d(), this.updateResult(), r && (this.#t !== s || Ne(this.options.enabled, this.#t) !== Ne(t.enabled, this.#t) || Fe(this.options.staleTime, this.#t) !== Fe(t.staleTime, this.#t)) && this.#y();
|
|
1961
1961
|
const n = this.#g();
|
|
1962
|
-
r && (this.#t !== s ||
|
|
1962
|
+
r && (this.#t !== s || Ne(this.options.enabled, this.#t) !== Ne(t.enabled, this.#t) || n !== this.#l) && this.#v(n);
|
|
1963
1963
|
}
|
|
1964
1964
|
getOptimisticResult(e) {
|
|
1965
1965
|
const t = this.#e.getQueryCache().build(this.#e, e), s = this.createResult(t, e);
|
|
1966
|
-
return
|
|
1966
|
+
return Kr(this, s) && (this.#n = s, this.#a = this.options, this.#r = this.#t.state), s;
|
|
1967
1967
|
}
|
|
1968
1968
|
getCurrentResult() {
|
|
1969
1969
|
return this.#n;
|
|
@@ -2004,18 +2004,18 @@ var Qr = class extends qe {
|
|
|
2004
2004
|
this.options,
|
|
2005
2005
|
e
|
|
2006
2006
|
);
|
|
2007
|
-
return e?.throwOnError || (t = t.catch(
|
|
2007
|
+
return e?.throwOnError || (t = t.catch(pe)), t;
|
|
2008
2008
|
}
|
|
2009
2009
|
#y() {
|
|
2010
|
-
this.#
|
|
2011
|
-
const e =
|
|
2010
|
+
this.#A();
|
|
2011
|
+
const e = Fe(
|
|
2012
2012
|
this.options.staleTime,
|
|
2013
2013
|
this.#t
|
|
2014
2014
|
);
|
|
2015
|
-
if (
|
|
2015
|
+
if ($e || this.#n.isStale || !pt(e))
|
|
2016
2016
|
return;
|
|
2017
2017
|
const s = ps(this.#n.dataUpdatedAt, e) + 1;
|
|
2018
|
-
this.#c =
|
|
2018
|
+
this.#c = Le.setTimeout(() => {
|
|
2019
2019
|
this.#n.isStale || this.updateResult();
|
|
2020
2020
|
}, s);
|
|
2021
2021
|
}
|
|
@@ -2023,64 +2023,64 @@ var Qr = class extends qe {
|
|
|
2023
2023
|
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.#t) : this.options.refetchInterval) ?? !1;
|
|
2024
2024
|
}
|
|
2025
2025
|
#v(e) {
|
|
2026
|
-
this.#
|
|
2027
|
-
(this.options.refetchIntervalInBackground ||
|
|
2026
|
+
this.#S(), this.#l = e, !($e || Ne(this.options.enabled, this.#t) === !1 || !pt(this.#l) || this.#l === 0) && (this.#u = Le.setInterval(() => {
|
|
2027
|
+
(this.options.refetchIntervalInBackground || Et.isFocused()) && this.#d();
|
|
2028
2028
|
}, this.#l));
|
|
2029
2029
|
}
|
|
2030
2030
|
#b() {
|
|
2031
2031
|
this.#y(), this.#v(this.#g());
|
|
2032
2032
|
}
|
|
2033
|
-
#S() {
|
|
2034
|
-
this.#c && ($e.clearTimeout(this.#c), this.#c = void 0);
|
|
2035
|
-
}
|
|
2036
2033
|
#A() {
|
|
2037
|
-
this.#
|
|
2034
|
+
this.#c && (Le.clearTimeout(this.#c), this.#c = void 0);
|
|
2035
|
+
}
|
|
2036
|
+
#S() {
|
|
2037
|
+
this.#u && (Le.clearInterval(this.#u), this.#u = void 0);
|
|
2038
2038
|
}
|
|
2039
2039
|
createResult(e, t) {
|
|
2040
2040
|
const s = this.#t, r = this.options, n = this.#n, a = this.#r, o = this.#a, d = e !== s ? e.state : this.#s, { state: u } = e;
|
|
2041
|
-
let c = { ...u },
|
|
2041
|
+
let c = { ...u }, S = !1, f;
|
|
2042
2042
|
if (t._optimisticResults) {
|
|
2043
2043
|
const K = this.hasListeners(), T = !K && es(e, t), I = K && ts(e, s, t, r);
|
|
2044
2044
|
(T || I) && (c = {
|
|
2045
2045
|
...c,
|
|
2046
|
-
...
|
|
2046
|
+
...As(u.data, e.options)
|
|
2047
2047
|
}), t._optimisticResults === "isRestoring" && (c.fetchStatus = "idle");
|
|
2048
2048
|
}
|
|
2049
|
-
let { error:
|
|
2049
|
+
let { error: k, errorUpdatedAt: N, status: m } = c;
|
|
2050
2050
|
f = c.data;
|
|
2051
|
-
let
|
|
2051
|
+
let A = !1;
|
|
2052
2052
|
if (t.placeholderData !== void 0 && f === void 0 && m === "pending") {
|
|
2053
2053
|
let K;
|
|
2054
|
-
n?.isPlaceholderData && t.placeholderData === o?.placeholderData ? (K = n.data,
|
|
2054
|
+
n?.isPlaceholderData && t.placeholderData === o?.placeholderData ? (K = n.data, A = !0) : K = typeof t.placeholderData == "function" ? t.placeholderData(
|
|
2055
2055
|
this.#f?.state.data,
|
|
2056
2056
|
this.#f
|
|
2057
|
-
) : t.placeholderData, K !== void 0 && (m = "success", f =
|
|
2057
|
+
) : t.placeholderData, K !== void 0 && (m = "success", f = vt(
|
|
2058
2058
|
n?.data,
|
|
2059
2059
|
K,
|
|
2060
2060
|
t
|
|
2061
|
-
),
|
|
2061
|
+
), S = !0);
|
|
2062
2062
|
}
|
|
2063
|
-
if (t.select && f !== void 0 && !
|
|
2063
|
+
if (t.select && f !== void 0 && !A)
|
|
2064
2064
|
if (n && f === a?.data && t.select === this.#p)
|
|
2065
2065
|
f = this.#h;
|
|
2066
2066
|
else
|
|
2067
2067
|
try {
|
|
2068
|
-
this.#p = t.select, f = t.select(f), f =
|
|
2068
|
+
this.#p = t.select, f = t.select(f), f = vt(n?.data, f, t), this.#h = f, this.#i = null;
|
|
2069
2069
|
} catch (K) {
|
|
2070
2070
|
this.#i = K;
|
|
2071
2071
|
}
|
|
2072
|
-
this.#i && (
|
|
2073
|
-
const $ = c.fetchStatus === "fetching",
|
|
2072
|
+
this.#i && (k = this.#i, f = this.#h, N = Date.now(), m = "error");
|
|
2073
|
+
const $ = c.fetchStatus === "fetching", F = m === "pending", j = m === "error", L = F && $, J = f !== void 0, Y = {
|
|
2074
2074
|
status: m,
|
|
2075
2075
|
fetchStatus: c.fetchStatus,
|
|
2076
|
-
isPending:
|
|
2076
|
+
isPending: F,
|
|
2077
2077
|
isSuccess: m === "success",
|
|
2078
|
-
isError:
|
|
2078
|
+
isError: j,
|
|
2079
2079
|
isInitialLoading: L,
|
|
2080
2080
|
isLoading: L,
|
|
2081
2081
|
data: f,
|
|
2082
2082
|
dataUpdatedAt: c.dataUpdatedAt,
|
|
2083
|
-
error:
|
|
2083
|
+
error: k,
|
|
2084
2084
|
errorUpdatedAt: N,
|
|
2085
2085
|
failureCount: c.fetchFailureCount,
|
|
2086
2086
|
failureReason: c.fetchFailureReason,
|
|
@@ -2088,36 +2088,36 @@ var Qr = class extends qe {
|
|
|
2088
2088
|
isFetched: c.dataUpdateCount > 0 || c.errorUpdateCount > 0,
|
|
2089
2089
|
isFetchedAfterMount: c.dataUpdateCount > d.dataUpdateCount || c.errorUpdateCount > d.errorUpdateCount,
|
|
2090
2090
|
isFetching: $,
|
|
2091
|
-
isRefetching: $ && !
|
|
2092
|
-
isLoadingError:
|
|
2091
|
+
isRefetching: $ && !F,
|
|
2092
|
+
isLoadingError: j && !J,
|
|
2093
2093
|
isPaused: c.fetchStatus === "paused",
|
|
2094
|
-
isPlaceholderData:
|
|
2095
|
-
isRefetchError:
|
|
2094
|
+
isPlaceholderData: S,
|
|
2095
|
+
isRefetchError: j && J,
|
|
2096
2096
|
isStale: Ot(e, t),
|
|
2097
2097
|
refetch: this.refetch,
|
|
2098
2098
|
promise: this.#o,
|
|
2099
|
-
isEnabled:
|
|
2099
|
+
isEnabled: Ne(t.enabled, e) !== !1
|
|
2100
2100
|
};
|
|
2101
2101
|
if (this.options.experimental_prefetchInRender) {
|
|
2102
|
-
const K =
|
|
2103
|
-
T ? te.reject(
|
|
2104
|
-
},
|
|
2105
|
-
const te = this.#o =
|
|
2102
|
+
const K = Y.data !== void 0, T = Y.status === "error" && !K, I = (te) => {
|
|
2103
|
+
T ? te.reject(Y.error) : K && te.resolve(Y.data);
|
|
2104
|
+
}, E = () => {
|
|
2105
|
+
const te = this.#o = Y.promise = bt();
|
|
2106
2106
|
I(te);
|
|
2107
|
-
},
|
|
2108
|
-
switch (
|
|
2107
|
+
}, W = this.#o;
|
|
2108
|
+
switch (W.status) {
|
|
2109
2109
|
case "pending":
|
|
2110
|
-
e.queryHash === s.queryHash && I(
|
|
2110
|
+
e.queryHash === s.queryHash && I(W);
|
|
2111
2111
|
break;
|
|
2112
2112
|
case "fulfilled":
|
|
2113
|
-
(T ||
|
|
2113
|
+
(T || Y.data !== W.value) && E();
|
|
2114
2114
|
break;
|
|
2115
2115
|
case "rejected":
|
|
2116
|
-
(!T ||
|
|
2116
|
+
(!T || Y.error !== W.reason) && E();
|
|
2117
2117
|
break;
|
|
2118
2118
|
}
|
|
2119
2119
|
}
|
|
2120
|
-
return
|
|
2120
|
+
return Y;
|
|
2121
2121
|
}
|
|
2122
2122
|
updateResult() {
|
|
2123
2123
|
const e = this.#n, t = this.createResult(this.#t, this.options);
|
|
@@ -2161,26 +2161,26 @@ var Qr = class extends qe {
|
|
|
2161
2161
|
});
|
|
2162
2162
|
}
|
|
2163
2163
|
};
|
|
2164
|
-
function
|
|
2165
|
-
return
|
|
2164
|
+
function Wr(e, t) {
|
|
2165
|
+
return Ne(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && t.retryOnMount === !1);
|
|
2166
2166
|
}
|
|
2167
2167
|
function es(e, t) {
|
|
2168
|
-
return
|
|
2168
|
+
return Wr(e, t) || e.state.data !== void 0 && St(e, t, t.refetchOnMount);
|
|
2169
2169
|
}
|
|
2170
2170
|
function St(e, t, s) {
|
|
2171
|
-
if (
|
|
2171
|
+
if (Ne(t.enabled, e) !== !1 && Fe(t.staleTime, e) !== "static") {
|
|
2172
2172
|
const r = typeof s == "function" ? s(e) : s;
|
|
2173
2173
|
return r === "always" || r !== !1 && Ot(e, t);
|
|
2174
2174
|
}
|
|
2175
2175
|
return !1;
|
|
2176
2176
|
}
|
|
2177
2177
|
function ts(e, t, s, r) {
|
|
2178
|
-
return (e !== t ||
|
|
2178
|
+
return (e !== t || Ne(r.enabled, e) === !1) && (!s.suspense || e.state.status !== "error") && Ot(e, s);
|
|
2179
2179
|
}
|
|
2180
2180
|
function Ot(e, t) {
|
|
2181
|
-
return
|
|
2181
|
+
return Ne(t.enabled, e) !== !1 && e.isStaleByTime(Fe(t.staleTime, e));
|
|
2182
2182
|
}
|
|
2183
|
-
function
|
|
2183
|
+
function Kr(e, t) {
|
|
2184
2184
|
return !st(e.getCurrentResult(), t);
|
|
2185
2185
|
}
|
|
2186
2186
|
function ss(e) {
|
|
@@ -2190,45 +2190,45 @@ function ss(e) {
|
|
|
2190
2190
|
let l = { pages: [], pageParams: [] }, d = 0;
|
|
2191
2191
|
const u = async () => {
|
|
2192
2192
|
let c = !1;
|
|
2193
|
-
const
|
|
2194
|
-
|
|
2193
|
+
const S = (N) => {
|
|
2194
|
+
$r(
|
|
2195
2195
|
N,
|
|
2196
2196
|
() => t.signal,
|
|
2197
2197
|
() => c = !0
|
|
2198
2198
|
);
|
|
2199
|
-
}, f = ys(t.options, t.fetchOptions),
|
|
2199
|
+
}, f = ys(t.options, t.fetchOptions), k = async (N, m, A) => {
|
|
2200
2200
|
if (c)
|
|
2201
2201
|
return Promise.reject();
|
|
2202
2202
|
if (m == null && N.pages.length)
|
|
2203
2203
|
return Promise.resolve(N);
|
|
2204
|
-
const
|
|
2205
|
-
const
|
|
2204
|
+
const F = (() => {
|
|
2205
|
+
const V = {
|
|
2206
2206
|
client: t.client,
|
|
2207
2207
|
queryKey: t.queryKey,
|
|
2208
2208
|
pageParam: m,
|
|
2209
|
-
direction:
|
|
2209
|
+
direction: A ? "backward" : "forward",
|
|
2210
2210
|
meta: t.options.meta
|
|
2211
2211
|
};
|
|
2212
|
-
return
|
|
2213
|
-
})(),
|
|
2212
|
+
return S(V), V;
|
|
2213
|
+
})(), j = await f(F), { maxPages: L } = t.options, J = A ? Lr : Ur;
|
|
2214
2214
|
return {
|
|
2215
|
-
pages: J(N.pages,
|
|
2215
|
+
pages: J(N.pages, j, L),
|
|
2216
2216
|
pageParams: J(N.pageParams, m, L)
|
|
2217
2217
|
};
|
|
2218
2218
|
};
|
|
2219
2219
|
if (n && a.length) {
|
|
2220
|
-
const N = n === "backward", m = N ?
|
|
2220
|
+
const N = n === "backward", m = N ? Yr : rs, A = {
|
|
2221
2221
|
pages: a,
|
|
2222
2222
|
pageParams: o
|
|
2223
|
-
}, $ = m(r,
|
|
2224
|
-
l = await
|
|
2223
|
+
}, $ = m(r, A);
|
|
2224
|
+
l = await k(A, $, N);
|
|
2225
2225
|
} else {
|
|
2226
2226
|
const N = e ?? a.length;
|
|
2227
2227
|
do {
|
|
2228
2228
|
const m = d === 0 ? o[0] ?? r.initialPageParam : rs(r, l);
|
|
2229
2229
|
if (d > 0 && m == null)
|
|
2230
2230
|
break;
|
|
2231
|
-
l = await
|
|
2231
|
+
l = await k(l, m), d++;
|
|
2232
2232
|
} while (d < N);
|
|
2233
2233
|
}
|
|
2234
2234
|
return l;
|
|
@@ -2255,16 +2255,16 @@ function rs(e, { pages: t, pageParams: s }) {
|
|
|
2255
2255
|
s
|
|
2256
2256
|
) : void 0;
|
|
2257
2257
|
}
|
|
2258
|
-
function
|
|
2258
|
+
function Yr(e, { pages: t, pageParams: s }) {
|
|
2259
2259
|
return t.length > 0 ? e.getPreviousPageParam?.(t[0], t, s[0], s) : void 0;
|
|
2260
2260
|
}
|
|
2261
|
-
var
|
|
2261
|
+
var zr = class extends bs {
|
|
2262
2262
|
#e;
|
|
2263
2263
|
#t;
|
|
2264
2264
|
#s;
|
|
2265
2265
|
#n;
|
|
2266
2266
|
constructor(e) {
|
|
2267
|
-
super(), this.#e = e.client, this.mutationId = e.mutationId, this.#s = e.mutationCache, this.#t = [], this.state = e.state ||
|
|
2267
|
+
super(), this.#e = e.client, this.mutationId = e.mutationId, this.#s = e.mutationCache, this.#t = [], this.state = e.state || Ss(), this.setOptions(e.options), this.scheduleGc();
|
|
2268
2268
|
}
|
|
2269
2269
|
setOptions(e) {
|
|
2270
2270
|
this.options = e, this.updateGcTime(this.options.gcTime);
|
|
@@ -2477,7 +2477,7 @@ var Kr = class extends bs {
|
|
|
2477
2477
|
});
|
|
2478
2478
|
}
|
|
2479
2479
|
};
|
|
2480
|
-
function
|
|
2480
|
+
function Ss() {
|
|
2481
2481
|
return {
|
|
2482
2482
|
context: void 0,
|
|
2483
2483
|
data: void 0,
|
|
@@ -2490,7 +2490,7 @@ function As() {
|
|
|
2490
2490
|
submittedAt: 0
|
|
2491
2491
|
};
|
|
2492
2492
|
}
|
|
2493
|
-
var
|
|
2493
|
+
var Vr = class extends Qe {
|
|
2494
2494
|
constructor(e = {}) {
|
|
2495
2495
|
super(), this.config = e, this.#e = /* @__PURE__ */ new Set(), this.#t = /* @__PURE__ */ new Map(), this.#s = 0;
|
|
2496
2496
|
}
|
|
@@ -2498,7 +2498,7 @@ var Yr = class extends qe {
|
|
|
2498
2498
|
#t;
|
|
2499
2499
|
#s;
|
|
2500
2500
|
build(e, t, s) {
|
|
2501
|
-
const r = new
|
|
2501
|
+
const r = new zr({
|
|
2502
2502
|
client: e,
|
|
2503
2503
|
mutationCache: this,
|
|
2504
2504
|
mutationId: ++this.#s,
|
|
@@ -2574,7 +2574,7 @@ var Yr = class extends qe {
|
|
|
2574
2574
|
const e = this.getAll().filter((t) => t.state.isPaused);
|
|
2575
2575
|
return oe.batch(
|
|
2576
2576
|
() => Promise.all(
|
|
2577
|
-
e.map((t) => t.continue().catch(
|
|
2577
|
+
e.map((t) => t.continue().catch(pe))
|
|
2578
2578
|
)
|
|
2579
2579
|
);
|
|
2580
2580
|
}
|
|
@@ -2582,7 +2582,7 @@ var Yr = class extends qe {
|
|
|
2582
2582
|
function Ze(e) {
|
|
2583
2583
|
return e.options.scope?.id;
|
|
2584
2584
|
}
|
|
2585
|
-
var
|
|
2585
|
+
var Jr = class extends Qe {
|
|
2586
2586
|
#e;
|
|
2587
2587
|
#t = void 0;
|
|
2588
2588
|
#s;
|
|
@@ -2599,7 +2599,7 @@ var zr = class extends qe {
|
|
|
2599
2599
|
type: "observerOptionsUpdated",
|
|
2600
2600
|
mutation: this.#s,
|
|
2601
2601
|
observer: this
|
|
2602
|
-
}), t?.mutationKey && this.options.mutationKey &&
|
|
2602
|
+
}), t?.mutationKey && this.options.mutationKey && Be(t.mutationKey) !== Be(this.options.mutationKey) ? this.reset() : this.#s?.state.status === "pending" && this.#s.setOptions(this.options);
|
|
2603
2603
|
}
|
|
2604
2604
|
onUnsubscribe() {
|
|
2605
2605
|
this.hasListeners() || this.#s?.removeObserver(this);
|
|
@@ -2617,7 +2617,7 @@ var zr = class extends qe {
|
|
|
2617
2617
|
return this.#n = t, this.#s?.removeObserver(this), this.#s = this.#e.getMutationCache().build(this.#e, this.options), this.#s.addObserver(this), this.#s.execute(e);
|
|
2618
2618
|
}
|
|
2619
2619
|
#r() {
|
|
2620
|
-
const e = this.#s?.state ??
|
|
2620
|
+
const e = this.#s?.state ?? Ss();
|
|
2621
2621
|
this.#t = {
|
|
2622
2622
|
...e,
|
|
2623
2623
|
isPending: e.status === "pending",
|
|
@@ -2687,15 +2687,15 @@ var zr = class extends qe {
|
|
|
2687
2687
|
});
|
|
2688
2688
|
});
|
|
2689
2689
|
}
|
|
2690
|
-
},
|
|
2690
|
+
}, Zr = class extends Qe {
|
|
2691
2691
|
constructor(e = {}) {
|
|
2692
2692
|
super(), this.config = e, this.#e = /* @__PURE__ */ new Map();
|
|
2693
2693
|
}
|
|
2694
2694
|
#e;
|
|
2695
2695
|
build(e, t, s) {
|
|
2696
|
-
const r = t.queryKey, n = t.queryHash ??
|
|
2696
|
+
const r = t.queryKey, n = t.queryHash ?? Rt(r, t);
|
|
2697
2697
|
let a = this.get(n);
|
|
2698
|
-
return a || (a = new
|
|
2698
|
+
return a || (a = new Hr({
|
|
2699
2699
|
client: e,
|
|
2700
2700
|
queryKey: r,
|
|
2701
2701
|
queryHash: n,
|
|
@@ -2758,7 +2758,7 @@ var zr = class extends qe {
|
|
|
2758
2758
|
});
|
|
2759
2759
|
});
|
|
2760
2760
|
}
|
|
2761
|
-
},
|
|
2761
|
+
}, Xr = class {
|
|
2762
2762
|
#e;
|
|
2763
2763
|
#t;
|
|
2764
2764
|
#s;
|
|
@@ -2768,10 +2768,10 @@ var zr = class extends qe {
|
|
|
2768
2768
|
#o;
|
|
2769
2769
|
#i;
|
|
2770
2770
|
constructor(e = {}) {
|
|
2771
|
-
this.#e = e.queryCache || new
|
|
2771
|
+
this.#e = e.queryCache || new Zr(), this.#t = e.mutationCache || new Vr(), this.#s = e.defaultOptions || {}, this.#n = /* @__PURE__ */ new Map(), this.#r = /* @__PURE__ */ new Map(), this.#a = 0;
|
|
2772
2772
|
}
|
|
2773
2773
|
mount() {
|
|
2774
|
-
this.#a++, this.#a === 1 && (this.#o =
|
|
2774
|
+
this.#a++, this.#a === 1 && (this.#o = Et.subscribe(async (e) => {
|
|
2775
2775
|
e && (await this.resumePausedMutations(), this.#e.onFocus());
|
|
2776
2776
|
}), this.#i = nt.subscribe(async (e) => {
|
|
2777
2777
|
e && (await this.resumePausedMutations(), this.#e.onOnline());
|
|
@@ -2799,7 +2799,7 @@ var zr = class extends qe {
|
|
|
2799
2799
|
}
|
|
2800
2800
|
ensureQueryData(e) {
|
|
2801
2801
|
const t = this.defaultQueryOptions(e), s = this.#e.build(this, t), r = s.state.data;
|
|
2802
|
-
return r === void 0 ? this.fetchQuery(e) : (e.revalidateIfStale && s.isStaleByTime(
|
|
2802
|
+
return r === void 0 ? this.fetchQuery(e) : (e.revalidateIfStale && s.isStaleByTime(Fe(t.staleTime, s)) && this.prefetchQuery(t), Promise.resolve(r));
|
|
2803
2803
|
}
|
|
2804
2804
|
getQueriesData(e) {
|
|
2805
2805
|
return this.#e.findAll(e).map(({ queryKey: t, state: s }) => {
|
|
@@ -2810,7 +2810,7 @@ var zr = class extends qe {
|
|
|
2810
2810
|
setQueryData(e, t, s) {
|
|
2811
2811
|
const r = this.defaultQueryOptions({ queryKey: e }), a = this.#e.get(
|
|
2812
2812
|
r.queryHash
|
|
2813
|
-
)?.state.data, o =
|
|
2813
|
+
)?.state.data, o = Mr(t, a);
|
|
2814
2814
|
if (o !== void 0)
|
|
2815
2815
|
return this.#e.build(this, r).setData(o, { ...s, manual: !0 });
|
|
2816
2816
|
}
|
|
@@ -2852,7 +2852,7 @@ var zr = class extends qe {
|
|
|
2852
2852
|
const s = { revert: !0, ...t }, r = oe.batch(
|
|
2853
2853
|
() => this.#e.findAll(e).map((n) => n.cancel(s))
|
|
2854
2854
|
);
|
|
2855
|
-
return Promise.all(r).then(
|
|
2855
|
+
return Promise.all(r).then(pe).catch(pe);
|
|
2856
2856
|
}
|
|
2857
2857
|
invalidateQueries(e, t = {}) {
|
|
2858
2858
|
return oe.batch(() => (this.#e.findAll(e).forEach((s) => {
|
|
@@ -2872,27 +2872,27 @@ var zr = class extends qe {
|
|
|
2872
2872
|
}, r = oe.batch(
|
|
2873
2873
|
() => this.#e.findAll(e).filter((n) => !n.isDisabled() && !n.isStatic()).map((n) => {
|
|
2874
2874
|
let a = n.fetch(void 0, s);
|
|
2875
|
-
return s.throwOnError || (a = a.catch(
|
|
2875
|
+
return s.throwOnError || (a = a.catch(pe)), n.state.fetchStatus === "paused" ? Promise.resolve() : a;
|
|
2876
2876
|
})
|
|
2877
2877
|
);
|
|
2878
|
-
return Promise.all(r).then(
|
|
2878
|
+
return Promise.all(r).then(pe);
|
|
2879
2879
|
}
|
|
2880
2880
|
fetchQuery(e) {
|
|
2881
2881
|
const t = this.defaultQueryOptions(e);
|
|
2882
2882
|
t.retry === void 0 && (t.retry = !1);
|
|
2883
2883
|
const s = this.#e.build(this, t);
|
|
2884
2884
|
return s.isStaleByTime(
|
|
2885
|
-
|
|
2885
|
+
Fe(t.staleTime, s)
|
|
2886
2886
|
) ? s.fetch(t) : Promise.resolve(s.state.data);
|
|
2887
2887
|
}
|
|
2888
2888
|
prefetchQuery(e) {
|
|
2889
|
-
return this.fetchQuery(e).then(
|
|
2889
|
+
return this.fetchQuery(e).then(pe).catch(pe);
|
|
2890
2890
|
}
|
|
2891
2891
|
fetchInfiniteQuery(e) {
|
|
2892
2892
|
return e.behavior = ss(e.pages), this.fetchQuery(e);
|
|
2893
2893
|
}
|
|
2894
2894
|
prefetchInfiniteQuery(e) {
|
|
2895
|
-
return this.fetchInfiniteQuery(e).then(
|
|
2895
|
+
return this.fetchInfiniteQuery(e).then(pe).catch(pe);
|
|
2896
2896
|
}
|
|
2897
2897
|
ensureInfiniteQueryData(e) {
|
|
2898
2898
|
return e.behavior = ss(e.pages), this.ensureQueryData(e);
|
|
@@ -2913,7 +2913,7 @@ var zr = class extends qe {
|
|
|
2913
2913
|
this.#s = e;
|
|
2914
2914
|
}
|
|
2915
2915
|
setQueryDefaults(e, t) {
|
|
2916
|
-
this.#n.set(
|
|
2916
|
+
this.#n.set(Be(e), {
|
|
2917
2917
|
queryKey: e,
|
|
2918
2918
|
defaultOptions: t
|
|
2919
2919
|
});
|
|
@@ -2925,7 +2925,7 @@ var zr = class extends qe {
|
|
|
2925
2925
|
}), s;
|
|
2926
2926
|
}
|
|
2927
2927
|
setMutationDefaults(e, t) {
|
|
2928
|
-
this.#r.set(
|
|
2928
|
+
this.#r.set(Be(e), {
|
|
2929
2929
|
mutationKey: e,
|
|
2930
2930
|
defaultOptions: t
|
|
2931
2931
|
});
|
|
@@ -2945,7 +2945,7 @@ var zr = class extends qe {
|
|
|
2945
2945
|
...e,
|
|
2946
2946
|
_defaulted: !0
|
|
2947
2947
|
};
|
|
2948
|
-
return t.queryHash || (t.queryHash =
|
|
2948
|
+
return t.queryHash || (t.queryHash = Rt(
|
|
2949
2949
|
t.queryKey,
|
|
2950
2950
|
t
|
|
2951
2951
|
)), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.queryFn === rt && (t.enabled = !1), t;
|
|
@@ -2963,19 +2963,19 @@ var zr = class extends qe {
|
|
|
2963
2963
|
}
|
|
2964
2964
|
}, ws = he.createContext(
|
|
2965
2965
|
void 0
|
|
2966
|
-
),
|
|
2966
|
+
), Pt = (e) => {
|
|
2967
2967
|
const t = he.useContext(ws);
|
|
2968
2968
|
if (!t)
|
|
2969
2969
|
throw new Error("No QueryClient set, use QueryClientProvider to set one");
|
|
2970
2970
|
return t;
|
|
2971
|
-
},
|
|
2971
|
+
}, en = ({
|
|
2972
2972
|
client: e,
|
|
2973
2973
|
children: t
|
|
2974
2974
|
}) => (he.useEffect(() => (e.mount(), () => {
|
|
2975
2975
|
e.unmount();
|
|
2976
|
-
}), [e]), /* @__PURE__ */ i(ws.Provider, { value: e, children: t })), Ns = he.createContext(!1),
|
|
2976
|
+
}), [e]), /* @__PURE__ */ i(ws.Provider, { value: e, children: t })), Ns = he.createContext(!1), tn = () => he.useContext(Ns);
|
|
2977
2977
|
Ns.Provider;
|
|
2978
|
-
function
|
|
2978
|
+
function sn() {
|
|
2979
2979
|
let e = !1;
|
|
2980
2980
|
return {
|
|
2981
2981
|
clearReset: () => {
|
|
@@ -2987,20 +2987,20 @@ function en() {
|
|
|
2987
2987
|
isReset: () => e
|
|
2988
2988
|
};
|
|
2989
2989
|
}
|
|
2990
|
-
var
|
|
2991
|
-
const r = s?.state.error && typeof e.throwOnError == "function" ?
|
|
2990
|
+
var rn = he.createContext(sn()), nn = () => he.useContext(rn), an = (e, t, s) => {
|
|
2991
|
+
const r = s?.state.error && typeof e.throwOnError == "function" ? kt(e.throwOnError, [s.state.error, s]) : e.throwOnError;
|
|
2992
2992
|
(e.suspense || e.experimental_prefetchInRender || r) && (t.isReset() || (e.retryOnMount = !1));
|
|
2993
|
-
},
|
|
2993
|
+
}, on = (e) => {
|
|
2994
2994
|
he.useEffect(() => {
|
|
2995
2995
|
e.clearReset();
|
|
2996
2996
|
}, [e]);
|
|
2997
|
-
},
|
|
2997
|
+
}, ln = ({
|
|
2998
2998
|
result: e,
|
|
2999
2999
|
errorResetBoundary: t,
|
|
3000
3000
|
throwOnError: s,
|
|
3001
3001
|
query: r,
|
|
3002
3002
|
suspense: n
|
|
3003
|
-
}) => e.isError && !t.isReset() && !e.isFetching && r && (n && e.data === void 0 ||
|
|
3003
|
+
}) => e.isError && !t.isReset() && !e.isFetching && r && (n && e.data === void 0 || kt(s, [e.error, r])), cn = (e) => {
|
|
3004
3004
|
if (e.suspense) {
|
|
3005
3005
|
const s = (n) => n === "static" ? n : Math.max(n ?? 1e3, 1e3), r = e.staleTime;
|
|
3006
3006
|
e.staleTime = typeof r == "function" ? (...n) => s(r(...n)) : s(r), typeof e.gcTime == "number" && (e.gcTime = Math.max(
|
|
@@ -3008,43 +3008,43 @@ var tn = he.createContext(en()), sn = () => he.useContext(tn), rn = (e, t, s) =>
|
|
|
3008
3008
|
1e3
|
|
3009
3009
|
));
|
|
3010
3010
|
}
|
|
3011
|
-
},
|
|
3011
|
+
}, un = (e, t) => e.isLoading && e.isFetching && !t, dn = (e, t) => e?.suspense && t.isPending, ns = (e, t, s) => t.fetchOptimistic(e).catch(() => {
|
|
3012
3012
|
s.clearReset();
|
|
3013
3013
|
});
|
|
3014
|
-
function
|
|
3014
|
+
function hn(e, t, s) {
|
|
3015
3015
|
if (process.env.NODE_ENV !== "production" && (typeof e != "object" || Array.isArray(e)))
|
|
3016
3016
|
throw new Error(
|
|
3017
3017
|
'Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'
|
|
3018
3018
|
);
|
|
3019
|
-
const r =
|
|
3019
|
+
const r = tn(), n = nn(), a = Pt(), o = a.defaultQueryOptions(e);
|
|
3020
3020
|
a.getDefaultOptions().queries?._experimental_beforeQuery?.(
|
|
3021
3021
|
o
|
|
3022
3022
|
);
|
|
3023
3023
|
const l = a.getQueryCache().get(o.queryHash);
|
|
3024
3024
|
process.env.NODE_ENV !== "production" && (o.queryFn || console.error(
|
|
3025
3025
|
`[${o.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`
|
|
3026
|
-
)), o._optimisticResults = r ? "isRestoring" : "optimistic",
|
|
3026
|
+
)), o._optimisticResults = r ? "isRestoring" : "optimistic", cn(o), an(o, n, l), on(n);
|
|
3027
3027
|
const d = !a.getQueryCache().get(o.queryHash), [u] = he.useState(
|
|
3028
3028
|
() => new t(
|
|
3029
3029
|
a,
|
|
3030
3030
|
o
|
|
3031
3031
|
)
|
|
3032
|
-
), c = u.getOptimisticResult(o),
|
|
3032
|
+
), c = u.getOptimisticResult(o), S = !r && e.subscribed !== !1;
|
|
3033
3033
|
if (he.useSyncExternalStore(
|
|
3034
3034
|
he.useCallback(
|
|
3035
3035
|
(f) => {
|
|
3036
|
-
const
|
|
3037
|
-
return u.updateResult(),
|
|
3036
|
+
const k = S ? u.subscribe(oe.batchCalls(f)) : pe;
|
|
3037
|
+
return u.updateResult(), k;
|
|
3038
3038
|
},
|
|
3039
|
-
[u,
|
|
3039
|
+
[u, S]
|
|
3040
3040
|
),
|
|
3041
3041
|
() => u.getCurrentResult(),
|
|
3042
3042
|
() => u.getCurrentResult()
|
|
3043
3043
|
), he.useEffect(() => {
|
|
3044
3044
|
u.setOptions(o);
|
|
3045
|
-
}, [o, u]),
|
|
3045
|
+
}, [o, u]), dn(o, c))
|
|
3046
3046
|
throw ns(o, u, n);
|
|
3047
|
-
if (
|
|
3047
|
+
if (ln({
|
|
3048
3048
|
result: c,
|
|
3049
3049
|
errorResetBoundary: n,
|
|
3050
3050
|
throwOnError: o.throwOnError,
|
|
@@ -3055,22 +3055,22 @@ function un(e, t, s) {
|
|
|
3055
3055
|
return a.getDefaultOptions().queries?._experimental_afterQuery?.(
|
|
3056
3056
|
o,
|
|
3057
3057
|
c
|
|
3058
|
-
), o.experimental_prefetchInRender &&
|
|
3058
|
+
), o.experimental_prefetchInRender && !$e && un(c, r) && (d ? (
|
|
3059
3059
|
// Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
|
|
3060
3060
|
ns(o, u, n)
|
|
3061
3061
|
) : (
|
|
3062
3062
|
// subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
|
|
3063
3063
|
l?.promise
|
|
3064
|
-
))?.catch(
|
|
3064
|
+
))?.catch(pe).finally(() => {
|
|
3065
3065
|
u.updateResult();
|
|
3066
3066
|
}), o.notifyOnChangeProps ? c : u.trackResult(c);
|
|
3067
3067
|
}
|
|
3068
|
-
function
|
|
3069
|
-
return
|
|
3068
|
+
function Mt(e, t) {
|
|
3069
|
+
return hn(e, Gr);
|
|
3070
3070
|
}
|
|
3071
|
-
function
|
|
3072
|
-
const s =
|
|
3073
|
-
() => new
|
|
3071
|
+
function fn(e, t) {
|
|
3072
|
+
const s = Pt(), [r] = he.useState(
|
|
3073
|
+
() => new Jr(
|
|
3074
3074
|
s,
|
|
3075
3075
|
e
|
|
3076
3076
|
)
|
|
@@ -3087,24 +3087,24 @@ function dn(e, t) {
|
|
|
3087
3087
|
() => r.getCurrentResult()
|
|
3088
3088
|
), a = he.useCallback(
|
|
3089
3089
|
(o, l) => {
|
|
3090
|
-
r.mutate(o, l).catch(
|
|
3090
|
+
r.mutate(o, l).catch(pe);
|
|
3091
3091
|
},
|
|
3092
3092
|
[r]
|
|
3093
3093
|
);
|
|
3094
|
-
if (n.error &&
|
|
3094
|
+
if (n.error && kt(r.options.throwOnError, [n.error]))
|
|
3095
3095
|
throw n.error;
|
|
3096
3096
|
return { ...n, mutate: a, mutateAsync: n.mutate };
|
|
3097
3097
|
}
|
|
3098
3098
|
function xs() {
|
|
3099
|
-
const { alerts: e } = Te(), t =
|
|
3100
|
-
return
|
|
3099
|
+
const { alerts: e } = Te(), t = Pt();
|
|
3100
|
+
return fn({
|
|
3101
3101
|
mutationFn: (s) => e.updateAlertStatus(s),
|
|
3102
3102
|
onSuccess: () => {
|
|
3103
3103
|
t.invalidateQueries({ queryKey: ["alerts", "list"] }), t.invalidateQueries({ queryKey: ["alerts", "report"] });
|
|
3104
3104
|
}
|
|
3105
3105
|
});
|
|
3106
3106
|
}
|
|
3107
|
-
function
|
|
3107
|
+
function mn(e, t) {
|
|
3108
3108
|
return e.toLocaleTimeString([], {
|
|
3109
3109
|
hour: "2-digit",
|
|
3110
3110
|
minute: "2-digit",
|
|
@@ -3113,7 +3113,7 @@ function hn(e, t) {
|
|
|
3113
3113
|
timeZone: t
|
|
3114
3114
|
});
|
|
3115
3115
|
}
|
|
3116
|
-
function
|
|
3116
|
+
function pn(e, t) {
|
|
3117
3117
|
try {
|
|
3118
3118
|
const n = new Intl.DateTimeFormat("en-US", { timeZone: t, timeZoneName: "short" }).formatToParts(e).find((o) => o.type === "timeZoneName")?.value;
|
|
3119
3119
|
let a;
|
|
@@ -3127,7 +3127,7 @@ function fn(e, t) {
|
|
|
3127
3127
|
return {};
|
|
3128
3128
|
}
|
|
3129
3129
|
}
|
|
3130
|
-
function
|
|
3130
|
+
function yn(e) {
|
|
3131
3131
|
if (!e) return "-";
|
|
3132
3132
|
try {
|
|
3133
3133
|
const t = new Date(e), s = (u) => String(u).padStart(2, "0"), r = s(t.getMonth() + 1), n = s(t.getDate()), a = t.getFullYear(), o = s(t.getHours()), l = s(t.getMinutes()), d = s(t.getSeconds());
|
|
@@ -3136,7 +3136,7 @@ function mn(e) {
|
|
|
3136
3136
|
return "-";
|
|
3137
3137
|
}
|
|
3138
3138
|
}
|
|
3139
|
-
function
|
|
3139
|
+
function wt(e) {
|
|
3140
3140
|
if (!e) return "-";
|
|
3141
3141
|
try {
|
|
3142
3142
|
return new Date(e).toLocaleString("en-US", {
|
|
@@ -3151,18 +3151,18 @@ function At(e) {
|
|
|
3151
3151
|
return "-";
|
|
3152
3152
|
}
|
|
3153
3153
|
}
|
|
3154
|
-
const
|
|
3154
|
+
const gn = {
|
|
3155
3155
|
Critical: "#FF3B30",
|
|
3156
3156
|
High: "#FFB86A",
|
|
3157
3157
|
Medium: "#FFCC00",
|
|
3158
3158
|
Low: "#007AFF"
|
|
3159
|
-
},
|
|
3159
|
+
}, vn = {
|
|
3160
3160
|
Critical: "#FFE2E2",
|
|
3161
3161
|
High: "#FF95004D",
|
|
3162
3162
|
Medium: "#FEF9C2",
|
|
3163
3163
|
Low: "#E0EDFF"
|
|
3164
3164
|
};
|
|
3165
|
-
function
|
|
3165
|
+
function bn({
|
|
3166
3166
|
alerts: e,
|
|
3167
3167
|
loading: t = !1,
|
|
3168
3168
|
pageSize: s = 10,
|
|
@@ -3173,22 +3173,22 @@ function gn({
|
|
|
3173
3173
|
}) {
|
|
3174
3174
|
const l = xs(), d = ["completed", "false positive"], u = async (f) => {
|
|
3175
3175
|
try {
|
|
3176
|
-
const
|
|
3176
|
+
const k = await l.mutateAsync({
|
|
3177
3177
|
alertUniqueId: f.alertId ?? f.id,
|
|
3178
3178
|
alertId: f.id,
|
|
3179
3179
|
status: "Reopen",
|
|
3180
3180
|
notes: "Reopened",
|
|
3181
3181
|
modifiedBy: 0
|
|
3182
3182
|
});
|
|
3183
|
-
if (
|
|
3184
|
-
const N =
|
|
3185
|
-
|
|
3183
|
+
if (k?.responseStatus) {
|
|
3184
|
+
const N = k?.data || "Alert reopened successfully.";
|
|
3185
|
+
ye.success(N);
|
|
3186
3186
|
} else {
|
|
3187
|
-
const N =
|
|
3188
|
-
|
|
3187
|
+
const N = k?.errorMessage || "Failed to reopen alert";
|
|
3188
|
+
ye.error(N);
|
|
3189
3189
|
}
|
|
3190
3190
|
} catch {
|
|
3191
|
-
|
|
3191
|
+
ye.error("Failed to reopen alert. Please try again.");
|
|
3192
3192
|
}
|
|
3193
3193
|
}, c = [
|
|
3194
3194
|
{
|
|
@@ -3201,8 +3201,8 @@ function gn({
|
|
|
3201
3201
|
{
|
|
3202
3202
|
className: "px-[10px] py-[2px]",
|
|
3203
3203
|
style: {
|
|
3204
|
-
border: `2px solid ${
|
|
3205
|
-
backgroundColor:
|
|
3204
|
+
border: `2px solid ${gn[f]}`,
|
|
3205
|
+
backgroundColor: vn[String(f)]
|
|
3206
3206
|
},
|
|
3207
3207
|
children: f
|
|
3208
3208
|
}
|
|
@@ -3213,7 +3213,7 @@ function gn({
|
|
|
3213
3213
|
dataIndex: "timestamp",
|
|
3214
3214
|
key: "timestamp",
|
|
3215
3215
|
width: 200,
|
|
3216
|
-
render: (f) =>
|
|
3216
|
+
render: (f) => yn(f)
|
|
3217
3217
|
},
|
|
3218
3218
|
{
|
|
3219
3219
|
title: "Status",
|
|
@@ -3225,15 +3225,15 @@ function gn({
|
|
|
3225
3225
|
title: "Description",
|
|
3226
3226
|
dataIndex: "description",
|
|
3227
3227
|
key: "description",
|
|
3228
|
-
render: (f,
|
|
3228
|
+
render: (f, k) => /* @__PURE__ */ h("div", { children: [
|
|
3229
3229
|
/* @__PURE__ */ i(
|
|
3230
3230
|
"a",
|
|
3231
3231
|
{
|
|
3232
3232
|
onClick: (N) => {
|
|
3233
|
-
N.preventDefault(), o?.(
|
|
3233
|
+
N.preventDefault(), o?.(k, { sourceTab: "archived" });
|
|
3234
3234
|
},
|
|
3235
3235
|
className: "inline-block mb-1 text-blue-600",
|
|
3236
|
-
children:
|
|
3236
|
+
children: k.alertNumber
|
|
3237
3237
|
}
|
|
3238
3238
|
),
|
|
3239
3239
|
/* @__PURE__ */ i("div", { className: "text-black/65", children: f })
|
|
@@ -3244,8 +3244,8 @@ function gn({
|
|
|
3244
3244
|
key: "menu",
|
|
3245
3245
|
width: 60,
|
|
3246
3246
|
align: "right",
|
|
3247
|
-
render: (f,
|
|
3248
|
-
|
|
3247
|
+
render: (f, k) => /* @__PURE__ */ i(
|
|
3248
|
+
Bs,
|
|
3249
3249
|
{
|
|
3250
3250
|
trigger: ["click"],
|
|
3251
3251
|
menu: {
|
|
@@ -3253,20 +3253,20 @@ function gn({
|
|
|
3253
3253
|
{ key: "reopen", label: "Reopen" }
|
|
3254
3254
|
],
|
|
3255
3255
|
onClick: ({ key: N }) => {
|
|
3256
|
-
N === "reopen" && u(
|
|
3256
|
+
N === "reopen" && u(k);
|
|
3257
3257
|
}
|
|
3258
3258
|
},
|
|
3259
|
-
children: /* @__PURE__ */ i(Se, { type: "text", icon: /* @__PURE__ */ i(
|
|
3259
|
+
children: /* @__PURE__ */ i(Se, { type: "text", icon: /* @__PURE__ */ i(Gs, {}) })
|
|
3260
3260
|
}
|
|
3261
3261
|
)
|
|
3262
3262
|
}
|
|
3263
|
-
],
|
|
3263
|
+
], S = (e || []).filter(
|
|
3264
3264
|
(f) => d.includes((f.statusType || "").toLowerCase())
|
|
3265
3265
|
);
|
|
3266
3266
|
return /* @__PURE__ */ i(
|
|
3267
3267
|
ms,
|
|
3268
3268
|
{
|
|
3269
|
-
data:
|
|
3269
|
+
data: S,
|
|
3270
3270
|
loading: t,
|
|
3271
3271
|
pageSize: s,
|
|
3272
3272
|
columns: c,
|
|
@@ -3279,13 +3279,13 @@ function gn({
|
|
|
3279
3279
|
}
|
|
3280
3280
|
);
|
|
3281
3281
|
}
|
|
3282
|
-
function
|
|
3282
|
+
function An({
|
|
3283
3283
|
size: e = 120,
|
|
3284
3284
|
time: t,
|
|
3285
3285
|
timeZone: s = "America/New_York"
|
|
3286
3286
|
}) {
|
|
3287
3287
|
const { hours: r, minutes: n, seconds: a } = ue(() => {
|
|
3288
|
-
const
|
|
3288
|
+
const S = new Intl.DateTimeFormat("en-US", {
|
|
3289
3289
|
timeZone: s,
|
|
3290
3290
|
hour: "numeric",
|
|
3291
3291
|
minute: "numeric",
|
|
@@ -3293,9 +3293,9 @@ function vn({
|
|
|
3293
3293
|
hour12: !1
|
|
3294
3294
|
}).formatToParts(t);
|
|
3295
3295
|
return {
|
|
3296
|
-
hours: parseInt(
|
|
3297
|
-
minutes: parseInt(
|
|
3298
|
-
seconds: parseInt(
|
|
3296
|
+
hours: parseInt(S.find((f) => f.type === "hour")?.value || "0", 10),
|
|
3297
|
+
minutes: parseInt(S.find((f) => f.type === "minute")?.value || "0", 10),
|
|
3298
|
+
seconds: parseInt(S.find((f) => f.type === "second")?.value || "0", 10)
|
|
3299
3299
|
};
|
|
3300
3300
|
}, [t, s]), o = a * 6, l = n * 6 + a * 0.1, d = r % 12 * 30 + n * 0.5, u = e / 2;
|
|
3301
3301
|
return /* @__PURE__ */ h(
|
|
@@ -3306,8 +3306,8 @@ function vn({
|
|
|
3306
3306
|
role: "img",
|
|
3307
3307
|
"aria-label": "Analog Clock",
|
|
3308
3308
|
children: [
|
|
3309
|
-
[...Array(12)].map((c,
|
|
3310
|
-
const f =
|
|
3309
|
+
[...Array(12)].map((c, S) => {
|
|
3310
|
+
const f = S * 30, k = 6, N = u - 4, m = N - k, A = (f - 90) * (Math.PI / 180), $ = u + m * Math.cos(A), F = u + m * Math.sin(A), j = u + N * Math.cos(A), L = u + N * Math.sin(A);
|
|
3311
3311
|
return /* @__PURE__ */ i(
|
|
3312
3312
|
"svg",
|
|
3313
3313
|
{
|
|
@@ -3318,16 +3318,16 @@ function vn({
|
|
|
3318
3318
|
"line",
|
|
3319
3319
|
{
|
|
3320
3320
|
x1: $,
|
|
3321
|
-
y1:
|
|
3322
|
-
x2:
|
|
3321
|
+
y1: F,
|
|
3322
|
+
x2: j,
|
|
3323
3323
|
y2: L,
|
|
3324
3324
|
stroke: "#9CA3AF",
|
|
3325
|
-
strokeWidth:
|
|
3325
|
+
strokeWidth: S % 3 === 0 ? 2 : 1,
|
|
3326
3326
|
strokeLinecap: "round"
|
|
3327
3327
|
}
|
|
3328
3328
|
)
|
|
3329
3329
|
},
|
|
3330
|
-
|
|
3330
|
+
S
|
|
3331
3331
|
);
|
|
3332
3332
|
}),
|
|
3333
3333
|
/* @__PURE__ */ i(
|
|
@@ -3409,15 +3409,15 @@ function vn({
|
|
|
3409
3409
|
}
|
|
3410
3410
|
);
|
|
3411
3411
|
}
|
|
3412
|
-
function
|
|
3412
|
+
function Sn({ label: e = "USA", timeZone: t = "America/New_York", updateIntervalMs: s = 1e3, className: r }) {
|
|
3413
3413
|
const [n, a] = w(/* @__PURE__ */ new Date());
|
|
3414
3414
|
ce(() => {
|
|
3415
3415
|
const u = setInterval(() => a(/* @__PURE__ */ new Date()), s);
|
|
3416
3416
|
return () => clearInterval(u);
|
|
3417
3417
|
}, [s]);
|
|
3418
|
-
const o = ue(() =>
|
|
3418
|
+
const o = ue(() => mn(n, t), [n, t]), { abbr: l, offset: d } = ue(() => pn(n, t), [n, t]);
|
|
3419
3419
|
return /* @__PURE__ */ h("div", { className: `flex items-center gap-3 ${r || ""}`, children: [
|
|
3420
|
-
/* @__PURE__ */ i(
|
|
3420
|
+
/* @__PURE__ */ i(An, { time: n, timeZone: t, size: 80 }),
|
|
3421
3421
|
/* @__PURE__ */ h("div", { className: "flex flex-col items-baseline gap-1", children: [
|
|
3422
3422
|
/* @__PURE__ */ h("div", { className: "flex items-center gap-2 text-sm text-gray-600", children: [
|
|
3423
3423
|
/* @__PURE__ */ i("span", { className: "uppercase", children: e }),
|
|
@@ -3428,17 +3428,17 @@ function bn({ label: e = "USA", timeZone: t = "America/New_York", updateInterval
|
|
|
3428
3428
|
] })
|
|
3429
3429
|
] });
|
|
3430
3430
|
}
|
|
3431
|
-
const
|
|
3432
|
-
severities:
|
|
3433
|
-
rules:
|
|
3434
|
-
userRoles:
|
|
3435
|
-
}, { Text:
|
|
3436
|
-
function
|
|
3437
|
-
return /* @__PURE__ */ h(
|
|
3438
|
-
/* @__PURE__ */ i(
|
|
3439
|
-
/* @__PURE__ */ i(
|
|
3431
|
+
const wn = [{ SeverityId: 1, Code: "LOW", DisplayName: "Low", SortOrder: 10, IsActive: !0 }, { SeverityId: 2, Code: "MEDIUM", DisplayName: "Medium", SortOrder: 20, IsActive: !0 }, { SeverityId: 3, Code: "HIGH", DisplayName: "High", SortOrder: 30, IsActive: !0 }, { SeverityId: 4, Code: "CRITICAL", DisplayName: "Critical", SortOrder: 40, IsActive: !0 }], Nn = [{ RuleId: "0938aa00-dfa7-4258-805a-67396366c776", RuleVersionId: "36d2d581-57c3-45c3-8705-8235935fdf96", Name: "License Plate Recognition", Description: "License Plate Recognition", VersionCount: 1, ActionCount: 0, ApplicabilityPeriodCount: 0, SuppressionCount: 0, AssignmentCount: 0, ExclusionCount: 0, IsDeleted: !1, SeverityId: 3, AnomalyId: "915976ef-4eb6-4f7b-bbe6-e53862517fc9", Level: "global" }, { RuleId: "2437286a-db6a-4d35-814e-9ac49f158dde", RuleVersionId: "00000000-0000-0000-0000-000000000000", Name: "Monitor And Track Onsite Vehicle timelog", Description: "Monitor And Track Onsite Vehicle timelog", VersionCount: 0, ActionCount: 0, ApplicabilityPeriodCount: 0, SuppressionCount: 0, AssignmentCount: 0, ExclusionCount: 0, IsDeleted: !1, SeverityId: 3, AnomalyId: "9fd651ab-4312-4826-84b6-94d735894477", Level: "global" }, { RuleId: "b99120ba-7a83-4ade-b5d9-a420550fe351", RuleVersionId: "d7b14dae-a7b1-474e-a357-199182c02ac3", Name: "Watchlist person detected", Description: "Watchlist person detected", VersionCount: 1, ActionCount: 0, ApplicabilityPeriodCount: 0, SuppressionCount: 0, AssignmentCount: 0, ExclusionCount: 0, IsDeleted: !1, SeverityId: 4, AnomalyId: "bb3a3d3a-73a3-4f5a-8804-1baadbd0d412", Level: "global" }, { RuleId: "ffc2c24f-adb7-4aba-ace7-f19c54e21530", RuleVersionId: "6ab3178f-bf77-4a1e-898d-1d5dbef749c5", Name: "Weapon Detection", Description: "Weapon Detection", VersionCount: 1, ActionCount: 0, ApplicabilityPeriodCount: 0, SuppressionCount: 0, AssignmentCount: 0, ExclusionCount: 0, IsDeleted: !1, SeverityId: 4, AnomalyId: "ac82c3a2-72e6-4f9c-88fb-851a3ca3c4de", Level: "global" }], xn = [{ userRoleId: 1, userRoleName: "Super Admin" }, { userRoleId: 2, userRoleName: "Security Officer" }, { userRoleId: 3, userRoleName: "Security Admin" }, { userRoleId: 4, userRoleName: "Regulatory Officer/First Responder" }, { userRoleId: 5, userRoleName: "User" }], _e = {
|
|
3432
|
+
severities: wn,
|
|
3433
|
+
rules: Nn,
|
|
3434
|
+
userRoles: xn
|
|
3435
|
+
}, { Text: Cn } = Ke;
|
|
3436
|
+
function In({ sortBy: e, onChange: t, showActions: s, onSave: r, onClear: n, saving: a }) {
|
|
3437
|
+
return /* @__PURE__ */ h(Ae, { gutter: [16, 16], align: "middle", children: [
|
|
3438
|
+
/* @__PURE__ */ i(G, { xs: 24, md: 8, lg: 5, children: /* @__PURE__ */ h(Ie, { className: "w-full items-center", direction: "horizontal", size: 12, children: [
|
|
3439
|
+
/* @__PURE__ */ i(Cn, { className: "text-gray-600 whitespace-nowrap", children: "Sort By:" }),
|
|
3440
3440
|
/* @__PURE__ */ i(
|
|
3441
|
-
|
|
3441
|
+
ve,
|
|
3442
3442
|
{
|
|
3443
3443
|
placeholder: "By Severity",
|
|
3444
3444
|
value: e,
|
|
@@ -3452,14 +3452,14 @@ function xn({ sortBy: e, onChange: t, showActions: s, onSave: r, onClear: n, sav
|
|
|
3452
3452
|
}
|
|
3453
3453
|
)
|
|
3454
3454
|
] }) }),
|
|
3455
|
-
/* @__PURE__ */ i(
|
|
3455
|
+
/* @__PURE__ */ i(G, { xs: 24, md: 8, style: { alignSelf: "end" }, children: s ? /* @__PURE__ */ h(Ie, { className: "w-full", direction: "horizontal", size: 8, children: [
|
|
3456
3456
|
/* @__PURE__ */ i(Se, { onClick: n, disabled: a, children: "Clear" }),
|
|
3457
3457
|
/* @__PURE__ */ i(Se, { type: "primary", onClick: r, loading: a, children: "Save" })
|
|
3458
3458
|
] }) : null })
|
|
3459
3459
|
] });
|
|
3460
3460
|
}
|
|
3461
|
-
const { Text:
|
|
3462
|
-
function
|
|
3461
|
+
const { Text: Me } = Ke;
|
|
3462
|
+
function Tn(e) {
|
|
3463
3463
|
const {
|
|
3464
3464
|
// escBasis, setEscBasis,
|
|
3465
3465
|
// selectedSeverity, setSelectedSeverity,
|
|
@@ -3473,51 +3473,53 @@ function Cn(e) {
|
|
|
3473
3473
|
l1role: d,
|
|
3474
3474
|
setL1role: u,
|
|
3475
3475
|
l2mins: c,
|
|
3476
|
-
setL2mins:
|
|
3476
|
+
setL2mins: S,
|
|
3477
3477
|
l2role: f,
|
|
3478
|
-
setL2role:
|
|
3478
|
+
setL2role: k,
|
|
3479
3479
|
l3mins: N,
|
|
3480
3480
|
setL3mins: m,
|
|
3481
|
-
l3role:
|
|
3481
|
+
l3role: A,
|
|
3482
3482
|
setL3role: $,
|
|
3483
|
-
actions:
|
|
3484
|
-
setActions:
|
|
3483
|
+
actions: F,
|
|
3484
|
+
setActions: j,
|
|
3485
3485
|
thirdPartyIds: L,
|
|
3486
3486
|
setThirdPartyIds: J,
|
|
3487
|
-
humanLoop:
|
|
3488
|
-
setHumanLoop:
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3487
|
+
humanLoop: V,
|
|
3488
|
+
setHumanLoop: Y,
|
|
3489
|
+
isAutoExpire: K,
|
|
3490
|
+
setAutoExpire: T,
|
|
3491
|
+
onClear: I,
|
|
3492
|
+
onSave: E,
|
|
3493
|
+
saving: W,
|
|
3494
|
+
onActionTypesLoaded: te
|
|
3495
|
+
} = e, { rules: O } = Te(), [v, p] = w([]), [x, y] = w([]), [b, g] = w(!1);
|
|
3494
3496
|
ce(() => {
|
|
3495
|
-
let
|
|
3497
|
+
let R = !1;
|
|
3496
3498
|
return (async () => {
|
|
3497
3499
|
try {
|
|
3498
|
-
|
|
3499
|
-
const
|
|
3500
|
-
if (
|
|
3501
|
-
const
|
|
3502
|
-
|
|
3503
|
-
const
|
|
3504
|
-
|
|
3505
|
-
} catch (
|
|
3506
|
-
console.error("Error loading lookups",
|
|
3500
|
+
g(!0);
|
|
3501
|
+
const U = await O.getLookups();
|
|
3502
|
+
if (R || !U || !Array.isArray(U.actionTypes)) return;
|
|
3503
|
+
const _ = U.actionTypes.map((se) => ({ label: se.name, value: String(se.actionTypeId) }));
|
|
3504
|
+
p(_), te && te(U.actionTypes);
|
|
3505
|
+
const z = Array.isArray(U.thirdParties) ? U.thirdParties.map((se) => ({ label: se.thirdPartyName, value: se.thirdPartyId })) : [];
|
|
3506
|
+
y(z);
|
|
3507
|
+
} catch (U) {
|
|
3508
|
+
console.error("Error loading lookups", U);
|
|
3507
3509
|
} finally {
|
|
3508
|
-
|
|
3510
|
+
R || g(!1);
|
|
3509
3511
|
}
|
|
3510
3512
|
})(), () => {
|
|
3511
|
-
|
|
3513
|
+
R = !0;
|
|
3512
3514
|
};
|
|
3513
3515
|
}, []);
|
|
3514
|
-
const
|
|
3515
|
-
return /* @__PURE__ */ h(
|
|
3516
|
-
/* @__PURE__ */ h(
|
|
3517
|
-
/* @__PURE__ */ i(
|
|
3518
|
-
/* @__PURE__ */ i(
|
|
3516
|
+
const P = typeof o == "number" || typeof d == "number" || typeof c == "number" || typeof f == "number" || typeof N == "number" || typeof A == "number" || Array.isArray(F) && F.length > 0 || Array.isArray(L) && L.length > 0 || !!V || !!K;
|
|
3517
|
+
return /* @__PURE__ */ h(xt, { spinning: !!W || b, children: [
|
|
3518
|
+
/* @__PURE__ */ h(Ae, { gutter: [16, 16], align: "bottom", children: [
|
|
3519
|
+
/* @__PURE__ */ i(G, { xs: 24, sm: 12, md: 8, lg: 4, children: /* @__PURE__ */ h("div", { children: [
|
|
3520
|
+
/* @__PURE__ */ i(Me, { className: "text-gray-700 font-medium block mb-1", children: "Rules" }),
|
|
3519
3521
|
/* @__PURE__ */ i(
|
|
3520
|
-
|
|
3522
|
+
ve,
|
|
3521
3523
|
{
|
|
3522
3524
|
placeholder: "Rules",
|
|
3523
3525
|
value: t,
|
|
@@ -3527,14 +3529,14 @@ function Cn(e) {
|
|
|
3527
3529
|
}
|
|
3528
3530
|
)
|
|
3529
3531
|
] }) }),
|
|
3530
|
-
/* @__PURE__ */ i(
|
|
3531
|
-
/* @__PURE__ */ h(
|
|
3532
|
-
/* @__PURE__ */ i(
|
|
3533
|
-
/* @__PURE__ */ i(
|
|
3532
|
+
/* @__PURE__ */ i(G, { xs: 24, sm: 12, md: 8, lg: 4, children: /* @__PURE__ */ h("div", { children: [
|
|
3533
|
+
/* @__PURE__ */ h(Ae, { gutter: 8, children: [
|
|
3534
|
+
/* @__PURE__ */ i(G, { span: 10, children: /* @__PURE__ */ i(Me, { className: "text-gray-700 font-medium block mb-1", children: "Level 1 (mins)" }) }),
|
|
3535
|
+
/* @__PURE__ */ i(G, { span: 14, children: /* @__PURE__ */ i(Me, { className: "text-gray-700 font-medium block mb-1", children: "Escalate to" }) })
|
|
3534
3536
|
] }),
|
|
3535
|
-
/* @__PURE__ */ h(
|
|
3536
|
-
/* @__PURE__ */ i(
|
|
3537
|
-
|
|
3537
|
+
/* @__PURE__ */ h(Ae, { gutter: 8, children: [
|
|
3538
|
+
/* @__PURE__ */ i(G, { span: 10, children: /* @__PURE__ */ i(
|
|
3539
|
+
ve,
|
|
3538
3540
|
{
|
|
3539
3541
|
className: "w-full",
|
|
3540
3542
|
placeholder: "Mins",
|
|
@@ -3543,8 +3545,8 @@ function Cn(e) {
|
|
|
3543
3545
|
options: n
|
|
3544
3546
|
}
|
|
3545
3547
|
) }),
|
|
3546
|
-
/* @__PURE__ */ i(
|
|
3547
|
-
|
|
3548
|
+
/* @__PURE__ */ i(G, { span: 14, children: /* @__PURE__ */ i(
|
|
3549
|
+
ve,
|
|
3548
3550
|
{
|
|
3549
3551
|
placeholder: "Escalate to",
|
|
3550
3552
|
className: "w-full",
|
|
@@ -3555,42 +3557,42 @@ function Cn(e) {
|
|
|
3555
3557
|
) })
|
|
3556
3558
|
] })
|
|
3557
3559
|
] }) }),
|
|
3558
|
-
/* @__PURE__ */ i(
|
|
3559
|
-
/* @__PURE__ */ h(
|
|
3560
|
-
/* @__PURE__ */ i(
|
|
3561
|
-
/* @__PURE__ */ i(
|
|
3560
|
+
/* @__PURE__ */ i(G, { xs: 24, sm: 12, md: 8, lg: 4, children: /* @__PURE__ */ h("div", { children: [
|
|
3561
|
+
/* @__PURE__ */ h(Ae, { gutter: 8, children: [
|
|
3562
|
+
/* @__PURE__ */ i(G, { span: 10, children: /* @__PURE__ */ i(Me, { className: "text-gray-700 font-medium block mb-1", children: "Level 2 (mins)" }) }),
|
|
3563
|
+
/* @__PURE__ */ i(G, { span: 14, children: /* @__PURE__ */ i(Me, { className: "text-gray-700 font-medium block mb-1", children: "Escalate to" }) })
|
|
3562
3564
|
] }),
|
|
3563
|
-
/* @__PURE__ */ h(
|
|
3564
|
-
/* @__PURE__ */ i(
|
|
3565
|
-
|
|
3565
|
+
/* @__PURE__ */ h(Ae, { gutter: 8, children: [
|
|
3566
|
+
/* @__PURE__ */ i(G, { span: 10, children: /* @__PURE__ */ i(
|
|
3567
|
+
ve,
|
|
3566
3568
|
{
|
|
3567
3569
|
className: "w-full",
|
|
3568
3570
|
placeholder: "Mins",
|
|
3569
3571
|
value: c,
|
|
3570
|
-
onChange:
|
|
3572
|
+
onChange: S,
|
|
3571
3573
|
options: n
|
|
3572
3574
|
}
|
|
3573
3575
|
) }),
|
|
3574
|
-
/* @__PURE__ */ i(
|
|
3575
|
-
|
|
3576
|
+
/* @__PURE__ */ i(G, { span: 14, children: /* @__PURE__ */ i(
|
|
3577
|
+
ve,
|
|
3576
3578
|
{
|
|
3577
3579
|
placeholder: "Escalate to",
|
|
3578
3580
|
className: "w-full",
|
|
3579
3581
|
value: f,
|
|
3580
|
-
onChange:
|
|
3582
|
+
onChange: k,
|
|
3581
3583
|
options: a
|
|
3582
3584
|
}
|
|
3583
3585
|
) })
|
|
3584
3586
|
] })
|
|
3585
3587
|
] }) }),
|
|
3586
|
-
/* @__PURE__ */ i(
|
|
3587
|
-
/* @__PURE__ */ h(
|
|
3588
|
-
/* @__PURE__ */ i(
|
|
3589
|
-
/* @__PURE__ */ i(
|
|
3588
|
+
/* @__PURE__ */ i(G, { xs: 24, sm: 12, md: 8, lg: 4, children: /* @__PURE__ */ h("div", { children: [
|
|
3589
|
+
/* @__PURE__ */ h(Ae, { gutter: 8, children: [
|
|
3590
|
+
/* @__PURE__ */ i(G, { span: 10, children: /* @__PURE__ */ i(Me, { className: "text-gray-700 font-medium block mb-1", children: "Level 3 (mins)" }) }),
|
|
3591
|
+
/* @__PURE__ */ i(G, { span: 14, children: /* @__PURE__ */ i(Me, { className: "text-gray-700 font-medium block mb-1", children: "Escalate to" }) })
|
|
3590
3592
|
] }),
|
|
3591
|
-
/* @__PURE__ */ h(
|
|
3592
|
-
/* @__PURE__ */ i(
|
|
3593
|
-
|
|
3593
|
+
/* @__PURE__ */ h(Ae, { gutter: 8, children: [
|
|
3594
|
+
/* @__PURE__ */ i(G, { span: 10, children: /* @__PURE__ */ i(
|
|
3595
|
+
ve,
|
|
3594
3596
|
{
|
|
3595
3597
|
className: "w-full",
|
|
3596
3598
|
placeholder: "Mins",
|
|
@@ -3599,60 +3601,63 @@ function Cn(e) {
|
|
|
3599
3601
|
options: n
|
|
3600
3602
|
}
|
|
3601
3603
|
) }),
|
|
3602
|
-
/* @__PURE__ */ i(
|
|
3603
|
-
|
|
3604
|
+
/* @__PURE__ */ i(G, { span: 14, children: /* @__PURE__ */ i(
|
|
3605
|
+
ve,
|
|
3604
3606
|
{
|
|
3605
3607
|
placeholder: "Escalate to",
|
|
3606
3608
|
className: "w-full",
|
|
3607
|
-
value:
|
|
3609
|
+
value: A,
|
|
3608
3610
|
onChange: $,
|
|
3609
3611
|
options: a
|
|
3610
3612
|
}
|
|
3611
3613
|
) })
|
|
3612
3614
|
] })
|
|
3613
3615
|
] }) }),
|
|
3614
|
-
/* @__PURE__ */ i(
|
|
3615
|
-
/* @__PURE__ */ i(
|
|
3616
|
+
/* @__PURE__ */ i(G, { xs: 24, sm: 12, md: 8, lg: 4, children: /* @__PURE__ */ h("div", { children: [
|
|
3617
|
+
/* @__PURE__ */ i(Me, { className: "text-gray-700 font-medium block mb-1", children: "Pick Actions" }),
|
|
3616
3618
|
/* @__PURE__ */ i(
|
|
3617
|
-
|
|
3619
|
+
ve,
|
|
3618
3620
|
{
|
|
3619
3621
|
mode: "multiple",
|
|
3620
3622
|
placeholder: "Select response actions",
|
|
3621
3623
|
className: "w-full",
|
|
3622
|
-
value:
|
|
3623
|
-
onChange:
|
|
3624
|
-
options:
|
|
3624
|
+
value: F,
|
|
3625
|
+
onChange: j,
|
|
3626
|
+
options: v
|
|
3625
3627
|
}
|
|
3626
3628
|
)
|
|
3627
3629
|
] }) }),
|
|
3628
|
-
/* @__PURE__ */ i(
|
|
3629
|
-
|
|
3630
|
-
/* @__PURE__ */ h(be, { gutter: [16, 16], align: "bottom", className: "mt-4", children: [
|
|
3631
|
-
/* @__PURE__ */ i(H, { xs: 24, sm: 12, md: 8, lg: 5, children: /* @__PURE__ */ h("div", { children: [
|
|
3632
|
-
/* @__PURE__ */ i(De, { className: "text-gray-700 font-medium block mb-1", children: "Third Party App" }),
|
|
3630
|
+
/* @__PURE__ */ i(G, { xs: 24, sm: 12, md: 8, lg: 4, children: /* @__PURE__ */ h("div", { children: [
|
|
3631
|
+
/* @__PURE__ */ i(Me, { className: "text-gray-700 font-medium block mb-1", children: "Third Party App" }),
|
|
3633
3632
|
/* @__PURE__ */ i(
|
|
3634
|
-
|
|
3633
|
+
ve,
|
|
3635
3634
|
{
|
|
3636
3635
|
mode: "multiple",
|
|
3637
3636
|
placeholder: "Third Party app",
|
|
3638
3637
|
className: "w-full",
|
|
3639
3638
|
value: L,
|
|
3640
3639
|
onChange: J,
|
|
3641
|
-
options:
|
|
3640
|
+
options: x
|
|
3642
3641
|
}
|
|
3643
3642
|
)
|
|
3643
|
+
] }) })
|
|
3644
|
+
] }),
|
|
3645
|
+
/* @__PURE__ */ h(Ae, { gutter: [16, 16], align: "bottom", className: "mt-4 items-center", children: [
|
|
3646
|
+
/* @__PURE__ */ i(G, { xs: 24, sm: 12, md: 8, lg: 7, children: /* @__PURE__ */ h("div", { className: "flex items-center h-full gap-8", children: [
|
|
3647
|
+
/* @__PURE__ */ i(qe, { checked: V, onChange: (R) => Y(R.target.checked), className: "w-full", children: "Human-In-The-Loop" }),
|
|
3648
|
+
/* @__PURE__ */ i(qe, { checked: K, onChange: (R) => T(R.target.checked), className: "w-full", children: "Auto-expire in 5 minutes" })
|
|
3644
3649
|
] }) }),
|
|
3645
|
-
/* @__PURE__ */ i(
|
|
3646
|
-
/* @__PURE__ */ i(Se, { onClick:
|
|
3647
|
-
/* @__PURE__ */ i(Se, { type: "primary", onClick:
|
|
3650
|
+
/* @__PURE__ */ i(G, { xs: 24, sm: 12, md: 8, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
3651
|
+
/* @__PURE__ */ i(Se, { onClick: I, children: "Clear" }),
|
|
3652
|
+
/* @__PURE__ */ i(Se, { type: "primary", onClick: E, loading: !!W, disabled: !(!!t && P && !W), children: "Save" })
|
|
3648
3653
|
] }) })
|
|
3649
3654
|
] })
|
|
3650
3655
|
] });
|
|
3651
3656
|
}
|
|
3652
|
-
function
|
|
3657
|
+
function Rn({ entries: e, userRoles: t, onEdit: s, loading: r }) {
|
|
3653
3658
|
const n = new Map(t.map((o) => [o.userRoleId, o.userRoleName])), a = (o) => o.map((l) => n.get(l) || String(l)).join(", ");
|
|
3654
3659
|
return /* @__PURE__ */ i(
|
|
3655
|
-
|
|
3660
|
+
Nt,
|
|
3656
3661
|
{
|
|
3657
3662
|
rowKey: "id",
|
|
3658
3663
|
dataSource: e,
|
|
@@ -3687,32 +3692,37 @@ function In({ entries: e, userRoles: t, onEdit: s, loading: r }) {
|
|
|
3687
3692
|
{
|
|
3688
3693
|
title: "Pick Actions",
|
|
3689
3694
|
key: "actionsCol",
|
|
3690
|
-
render: (o, l) => l.actions
|
|
3695
|
+
render: (o, l) => l.actions?.length ? l.actions.join(", ") : "-"
|
|
3691
3696
|
},
|
|
3692
3697
|
{
|
|
3693
3698
|
title: "Notify",
|
|
3694
3699
|
key: "notify",
|
|
3695
|
-
render: (o, l) => l.notify
|
|
3700
|
+
render: (o, l) => l.notify?.length ? l.notify.join(", ") : "-"
|
|
3696
3701
|
},
|
|
3697
3702
|
{
|
|
3698
3703
|
title: "Human-In-The-Loop",
|
|
3699
3704
|
key: "humanLoop",
|
|
3700
3705
|
render: (o, l) => l.humanLoop ? "Yes" : "No"
|
|
3701
3706
|
},
|
|
3707
|
+
{
|
|
3708
|
+
title: "Auto Expire",
|
|
3709
|
+
key: "isAutoExpire",
|
|
3710
|
+
render: (o, l) => l.isAutoExpire ? "Yes" : "No"
|
|
3711
|
+
},
|
|
3702
3712
|
{
|
|
3703
3713
|
title: "Actions",
|
|
3704
3714
|
key: "ops",
|
|
3705
|
-
render: (o, l) => /* @__PURE__ */ i(Se, { type: "text", onClick: () => s(l.id), children: /* @__PURE__ */ i(
|
|
3715
|
+
render: (o, l) => /* @__PURE__ */ i(Se, { type: "text", onClick: () => s(l.id), children: /* @__PURE__ */ i(Ws, {}) })
|
|
3706
3716
|
}
|
|
3707
3717
|
]
|
|
3708
3718
|
}
|
|
3709
3719
|
);
|
|
3710
3720
|
}
|
|
3711
|
-
const { Title:
|
|
3712
|
-
function
|
|
3713
|
-
const { rules: r } = Te(), [n, a] = w(!1), [o, l] = w(s), [d, u] = w({}), c = ue(() => e.map((m) => ({ label: m.userRoleName, value: m.userRoleId })), [e]),
|
|
3714
|
-
() => (t || []).map((m,
|
|
3715
|
-
key: m.RuleId || m.Name || String(
|
|
3721
|
+
const { Title: kn } = Ke;
|
|
3722
|
+
function En({ userRoles: e, rules: t, rawRules: s }) {
|
|
3723
|
+
const { rules: r } = Te(), [n, a] = w(!1), [o, l] = w(s), [d, u] = w({}), c = ue(() => e.map((m) => ({ label: m.userRoleName, value: m.userRoleId })), [e]), S = ue(
|
|
3724
|
+
() => (t || []).map((m, A) => ({
|
|
3725
|
+
key: m.RuleId || m.Name || String(A),
|
|
3716
3726
|
ruleName: m.Name || "-",
|
|
3717
3727
|
ruleDesc: m.Description || ""
|
|
3718
3728
|
})),
|
|
@@ -3723,8 +3733,8 @@ function Rn({ userRoles: e, rules: t, rawRules: s }) {
|
|
|
3723
3733
|
return (async () => {
|
|
3724
3734
|
try {
|
|
3725
3735
|
a(!0);
|
|
3726
|
-
const
|
|
3727
|
-
m || (l(Array.isArray(
|
|
3736
|
+
const A = await r.getRules();
|
|
3737
|
+
m || (l(Array.isArray(A) ? A : []), u({}));
|
|
3728
3738
|
} catch {
|
|
3729
3739
|
!m && Array.isArray(s) && l(s);
|
|
3730
3740
|
} finally {
|
|
@@ -3739,22 +3749,22 @@ function Rn({ userRoles: e, rules: t, rawRules: s }) {
|
|
|
3739
3749
|
const f = ue(() => {
|
|
3740
3750
|
if (!Array.isArray(o) || !o.length) return {};
|
|
3741
3751
|
const m = {};
|
|
3742
|
-
for (const
|
|
3752
|
+
for (const A of S) {
|
|
3743
3753
|
const $ = o.find(
|
|
3744
|
-
(
|
|
3745
|
-
|
|
3746
|
-
),
|
|
3747
|
-
|
|
3754
|
+
(j) => j?.ruleId === A.key || j?.ruleName === A.key || j?.RuleId === A.key || j?.ruleName === A.ruleName || // fallback by name
|
|
3755
|
+
j?.Name === A.ruleName
|
|
3756
|
+
), F = Array.isArray($?.userRoleIds) ? $.userRoleIds : [];
|
|
3757
|
+
F.length && (m[A.key] = F);
|
|
3748
3758
|
}
|
|
3749
3759
|
return m;
|
|
3750
|
-
}, [o,
|
|
3760
|
+
}, [o, S]);
|
|
3751
3761
|
return /* @__PURE__ */ h("div", { className: "w-full", children: [
|
|
3752
|
-
/* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ i(
|
|
3762
|
+
/* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ i(kn, { level: 4, className: "!mb-4", children: "Alert Assignment" }) }),
|
|
3753
3763
|
/* @__PURE__ */ i(
|
|
3754
|
-
|
|
3764
|
+
Nt,
|
|
3755
3765
|
{
|
|
3756
3766
|
rowKey: "key",
|
|
3757
|
-
dataSource:
|
|
3767
|
+
dataSource: S,
|
|
3758
3768
|
loading: n,
|
|
3759
3769
|
pagination: !1,
|
|
3760
3770
|
columns: [
|
|
@@ -3763,14 +3773,14 @@ function Rn({ userRoles: e, rules: t, rawRules: s }) {
|
|
|
3763
3773
|
{
|
|
3764
3774
|
title: "Alert Notification To",
|
|
3765
3775
|
key: "assign",
|
|
3766
|
-
render: (m,
|
|
3767
|
-
|
|
3776
|
+
render: (m, A) => /* @__PURE__ */ i(
|
|
3777
|
+
ve,
|
|
3768
3778
|
{
|
|
3769
3779
|
mode: "multiple",
|
|
3770
3780
|
placeholder: "Dropdown with Multi select",
|
|
3771
3781
|
className: "w-full",
|
|
3772
|
-
value: d[
|
|
3773
|
-
onChange: ($) => u((
|
|
3782
|
+
value: d[A.key] ?? f[A.key] ?? [],
|
|
3783
|
+
onChange: ($) => u((F) => ({ ...F, [A.key]: $ })),
|
|
3774
3784
|
options: c
|
|
3775
3785
|
}
|
|
3776
3786
|
)
|
|
@@ -3789,25 +3799,25 @@ function Rn({ userRoles: e, rules: t, rawRules: s }) {
|
|
|
3789
3799
|
onClick: async () => {
|
|
3790
3800
|
try {
|
|
3791
3801
|
if (!o || !Array.isArray(o) || Object.keys(d).length === 0) {
|
|
3792
|
-
|
|
3802
|
+
ye.info("No changes to save");
|
|
3793
3803
|
return;
|
|
3794
3804
|
}
|
|
3795
3805
|
a(!0);
|
|
3796
|
-
const m = Object.entries(d).map(async ([
|
|
3797
|
-
const
|
|
3798
|
-
(
|
|
3799
|
-
),
|
|
3800
|
-
if (!
|
|
3801
|
-
throw new Error(`Unable to find recordId for rule ${
|
|
3802
|
-
const L = Array.isArray($) ? $ : [], J = L.map((
|
|
3803
|
-
const K = e.find((T) => T.userRoleId ===
|
|
3806
|
+
const m = Object.entries(d).map(async ([A, $]) => {
|
|
3807
|
+
const F = o.find(
|
|
3808
|
+
(Y) => Y?.ruleId === A || Y?.ruleName === A || Y?.RuleId === A
|
|
3809
|
+
), j = typeof F?.recordId == "number" ? F.recordId : void 0;
|
|
3810
|
+
if (!F || typeof j != "number")
|
|
3811
|
+
throw new Error(`Unable to find recordId for rule ${A}`);
|
|
3812
|
+
const L = Array.isArray($) ? $ : [], J = L.map((Y) => {
|
|
3813
|
+
const K = e.find((T) => T.userRoleId === Y);
|
|
3804
3814
|
return {
|
|
3805
|
-
id:
|
|
3806
|
-
name: K?.userRoleName ?? String(
|
|
3815
|
+
id: Y,
|
|
3816
|
+
name: K?.userRoleName ?? String(Y)
|
|
3807
3817
|
};
|
|
3808
|
-
}),
|
|
3809
|
-
...
|
|
3810
|
-
ruleId:
|
|
3818
|
+
}), V = {
|
|
3819
|
+
...F,
|
|
3820
|
+
ruleId: A,
|
|
3811
3821
|
// ensure ruleId matches the selected rule
|
|
3812
3822
|
userRoleIds: L,
|
|
3813
3823
|
userRoles: J,
|
|
@@ -3825,14 +3835,14 @@ function Rn({ userRoles: e, rules: t, rawRules: s }) {
|
|
|
3825
3835
|
}
|
|
3826
3836
|
]
|
|
3827
3837
|
};
|
|
3828
|
-
return r.updateRule(
|
|
3838
|
+
return r.updateRule(j, V);
|
|
3829
3839
|
});
|
|
3830
|
-
await Promise.all(m),
|
|
3840
|
+
await Promise.all(m), ye.success("Alert assignment saved");
|
|
3831
3841
|
try {
|
|
3832
|
-
const
|
|
3833
|
-
l(Array.isArray(
|
|
3834
|
-
} catch (
|
|
3835
|
-
console.error("Failed to refresh rules after save",
|
|
3842
|
+
const A = await r.getRules();
|
|
3843
|
+
l(Array.isArray(A) ? A : []), u({});
|
|
3844
|
+
} catch (A) {
|
|
3845
|
+
console.error("Failed to refresh rules after save", A);
|
|
3836
3846
|
}
|
|
3837
3847
|
} catch (m) {
|
|
3838
3848
|
console.error("Failed to save alert assignment", m);
|
|
@@ -3849,155 +3859,156 @@ function Rn({ userRoles: e, rules: t, rawRules: s }) {
|
|
|
3849
3859
|
] });
|
|
3850
3860
|
}
|
|
3851
3861
|
const { Title: is } = Ke;
|
|
3852
|
-
function
|
|
3853
|
-
const { rules: a, alerts: o } = Te(), [l, d] = w("By Severity"), [u, c] = w("By severity"), [
|
|
3862
|
+
function On({ severities: e, rules: t, userRoles: s, rawRules: r, onSave: n }) {
|
|
3863
|
+
const { rules: a, alerts: o } = Te(), [l, d] = w("By Severity"), [u, c] = w("By severity"), [S, f] = w("By Severity"), [k, N] = w(!1), [m, A] = w(!1), [$, F] = w(!1), [j, L] = w(null), [J, V] = w("rules"), [Y, K] = w(), [T, I] = w(), [E, W] = w(), [te, O] = w(), [v, p] = w(), [x, y] = w(), [b, g] = w(), [P, B] = w(), [R, U] = w([]), [_, z] = w([]), [se, ge] = w(!1), [fe, ne] = w(!1), [ae, Re] = w({}), [we, at] = w({}), [je, Ue] = w(s || []), [Ye, C] = w([]), [H, ie] = w(!1), [ke, X] = w(!1), [de, He] = w(r || []);
|
|
3854
3864
|
ce(() => {
|
|
3855
|
-
r && r.length &&
|
|
3865
|
+
r && r.length && He(r);
|
|
3856
3866
|
}, [r]), ce(() => {
|
|
3857
|
-
if (!
|
|
3858
|
-
const
|
|
3859
|
-
if (
|
|
3860
|
-
const ee =
|
|
3861
|
-
const Z = t.find((
|
|
3867
|
+
if (!de || !de.length) return;
|
|
3868
|
+
const M = Object.keys(ae).length > 0 || Object.keys(we).length > 0;
|
|
3869
|
+
if (Ye.length && !M) return;
|
|
3870
|
+
const ee = de.map((q, D) => {
|
|
3871
|
+
const Z = t.find((me) => me.RuleId === (q.ruleId || q.ruleName))?.Name || q.ruleName || q.Name || "-", Q = q.escalationSettings || {}, re = typeof Q.level1UserRoleId == "number" && Q.level1UserRoleId > 0 ? [Q.level1UserRoleId] : [], Ee = typeof Q.level2UserRoleId == "number" && Q.level2UserRoleId > 0 ? [Q.level2UserRoleId] : [], lt = typeof Q.level3UserRoleId == "number" && Q.level3UserRoleId > 0 ? [Q.level3UserRoleId] : [], Ft = (Array.isArray(Q.escalationSettingsActionTypeIds) ? Q.escalationSettingsActionTypeIds : []).map((me) => ae[me] || String(me)), Lt = (Array.isArray(Q.thirdPartyId) ? Q.thirdPartyId : []).map((me) => we[me] || String(me)), ct = typeof Q.humanLoop == "boolean" ? Q.humanLoop : null, ut = typeof Q.isAutoExpire == "boolean" ? Q.isAutoExpire : null;
|
|
3862
3872
|
return {
|
|
3863
|
-
id: String(q.ruleId || q.ruleName ||
|
|
3873
|
+
id: String(q.ruleId || q.ruleName || D),
|
|
3864
3874
|
ruleOrSeverityLabel: Z,
|
|
3865
|
-
l1: { minutes:
|
|
3866
|
-
l2: { minutes:
|
|
3867
|
-
l3: { minutes:
|
|
3875
|
+
l1: { minutes: Q.level1PostAssistTime ?? void 0, roles: re },
|
|
3876
|
+
l2: { minutes: Q.level2PostAssistTime ?? void 0, roles: Ee },
|
|
3877
|
+
l3: { minutes: Q.level3PostAssistTime ?? void 0, roles: lt },
|
|
3868
3878
|
actions: Ft,
|
|
3869
3879
|
notify: Lt,
|
|
3870
|
-
humanLoop: ct
|
|
3880
|
+
humanLoop: ct,
|
|
3881
|
+
isAutoExpire: ut
|
|
3871
3882
|
};
|
|
3872
3883
|
});
|
|
3873
|
-
|
|
3874
|
-
}, [
|
|
3875
|
-
const
|
|
3876
|
-
() => e.map((
|
|
3884
|
+
C(ee);
|
|
3885
|
+
}, [de, t, ae, we]);
|
|
3886
|
+
const be = ue(
|
|
3887
|
+
() => e.map((M) => ({ label: M.DisplayName, value: M.SeverityId })),
|
|
3877
3888
|
[e]
|
|
3878
|
-
),
|
|
3879
|
-
() => t.map((
|
|
3889
|
+
), ot = ue(
|
|
3890
|
+
() => t.map((M) => ({ label: M.Name, value: M.RuleId })),
|
|
3880
3891
|
[t]
|
|
3881
|
-
),
|
|
3882
|
-
() =>
|
|
3883
|
-
[
|
|
3884
|
-
),
|
|
3892
|
+
), ks = ue(
|
|
3893
|
+
() => je.map((M) => ({ label: M.userRoleName, value: M.userRoleId })),
|
|
3894
|
+
[je]
|
|
3895
|
+
), Es = ue(() => [1, 3, 5, 10, 15, 20, 30, 45, 60].map((M) => ({ label: `${M}`, value: M })), []);
|
|
3885
3896
|
ce(() => {
|
|
3886
|
-
let
|
|
3897
|
+
let M = !1;
|
|
3887
3898
|
async function ee() {
|
|
3888
3899
|
try {
|
|
3889
|
-
|
|
3900
|
+
F(!0), L(null);
|
|
3890
3901
|
const q = await o.getAdminSettings();
|
|
3891
|
-
if (!
|
|
3892
|
-
const
|
|
3893
|
-
d(
|
|
3902
|
+
if (!M && q) {
|
|
3903
|
+
const D = ds(q.sortBy);
|
|
3904
|
+
d(D), f(D), N(!1);
|
|
3894
3905
|
}
|
|
3895
3906
|
} catch (q) {
|
|
3896
|
-
if (!
|
|
3897
|
-
const
|
|
3898
|
-
L(
|
|
3907
|
+
if (!M) {
|
|
3908
|
+
const D = q instanceof Error ? q.message : "Failed to load admin settings";
|
|
3909
|
+
L(D);
|
|
3899
3910
|
}
|
|
3900
3911
|
} finally {
|
|
3901
|
-
|
|
3912
|
+
M || F(!1);
|
|
3902
3913
|
}
|
|
3903
3914
|
}
|
|
3904
3915
|
return ee(), () => {
|
|
3905
|
-
|
|
3916
|
+
M = !0;
|
|
3906
3917
|
};
|
|
3907
3918
|
}, []), ce(() => {
|
|
3908
3919
|
if (!T) return;
|
|
3909
|
-
const
|
|
3910
|
-
const
|
|
3911
|
-
return !isNaN(
|
|
3920
|
+
const M = (Z) => {
|
|
3921
|
+
const Q = Number(Z);
|
|
3922
|
+
return !isNaN(Q) && Q > 0 ? Q : void 0;
|
|
3912
3923
|
}, ee = (Z) => {
|
|
3913
|
-
const
|
|
3914
|
-
return !isNaN(
|
|
3915
|
-
},
|
|
3924
|
+
const Q = Number(Z);
|
|
3925
|
+
return !isNaN(Q) && Q > 0 ? Q : void 0;
|
|
3926
|
+
}, D = (de || []).find(
|
|
3916
3927
|
(Z) => Z?.ruleId === T || Z?.ruleName === T || Z?.RuleId === T
|
|
3917
3928
|
)?.escalationSettings;
|
|
3918
|
-
if (
|
|
3919
|
-
|
|
3920
|
-
const Z = Array.isArray(
|
|
3921
|
-
|
|
3929
|
+
if (D && typeof D == "object") {
|
|
3930
|
+
W(ee(D.level1PostAssistTime)), O(M(D.level1UserRoleId)), p(ee(D.level2PostAssistTime)), y(M(D.level2UserRoleId)), g(ee(D.level3PostAssistTime)), B(M(D.level3UserRoleId));
|
|
3931
|
+
const Z = Array.isArray(D.escalationSettingsActionTypeIds) ? D.escalationSettingsActionTypeIds : [];
|
|
3932
|
+
U(Z.map((Q) => String(Q))), z(Array.isArray(D.thirdPartyId) ? D.thirdPartyId : []), ge(!!D.humanLoop), ne(!!D.isAutoExpire);
|
|
3922
3933
|
}
|
|
3923
|
-
}, [J, T,
|
|
3924
|
-
const
|
|
3934
|
+
}, [J, T, de]);
|
|
3935
|
+
const Os = async () => {
|
|
3925
3936
|
try {
|
|
3926
|
-
|
|
3927
|
-
const
|
|
3928
|
-
|
|
3929
|
-
const q = ee.map((
|
|
3930
|
-
const
|
|
3937
|
+
X(!0);
|
|
3938
|
+
const M = await a.getRules(), ee = Array.isArray(M) ? M : Array.isArray(M?.data) ? M.data : [];
|
|
3939
|
+
He(ee);
|
|
3940
|
+
const q = ee.map((D, Z) => {
|
|
3941
|
+
const Q = t.find((me) => me.RuleId === (D.ruleId || D.ruleName))?.Name || D.ruleName || D.Name || "-", re = D.escalationSettings || {}, Ee = typeof re.level1UserRoleId == "number" && re.level1UserRoleId > 0 ? [re.level1UserRoleId] : [], lt = typeof re.level2UserRoleId == "number" && re.level2UserRoleId > 0 ? [re.level2UserRoleId] : [], Dt = typeof re.level3UserRoleId == "number" && re.level3UserRoleId > 0 ? [re.level3UserRoleId] : [], Ut = (Array.isArray(re.escalationSettingsActionTypeIds) ? re.escalationSettingsActionTypeIds : []).map((me) => ae[me] || String(me)), ct = (Array.isArray(re.thirdPartyId) ? re.thirdPartyId : []).map((me) => we[me] || String(me)), ut = typeof re.humanLoop == "boolean" ? re.humanLoop : null;
|
|
3931
3942
|
return {
|
|
3932
|
-
id: String(
|
|
3933
|
-
ruleOrSeverityLabel:
|
|
3934
|
-
l1: { minutes:
|
|
3935
|
-
l2: { minutes:
|
|
3936
|
-
l3: { minutes:
|
|
3943
|
+
id: String(D.ruleId || D.ruleName || Z),
|
|
3944
|
+
ruleOrSeverityLabel: Q,
|
|
3945
|
+
l1: { minutes: re.level1PostAssistTime ?? void 0, roles: Ee },
|
|
3946
|
+
l2: { minutes: re.level2PostAssistTime ?? void 0, roles: lt },
|
|
3947
|
+
l3: { minutes: re.level3PostAssistTime ?? void 0, roles: Dt },
|
|
3937
3948
|
actions: Ut,
|
|
3938
3949
|
notify: ct,
|
|
3939
|
-
humanLoop:
|
|
3950
|
+
humanLoop: ut
|
|
3940
3951
|
};
|
|
3941
3952
|
});
|
|
3942
|
-
|
|
3943
|
-
} catch (
|
|
3944
|
-
console.error("Failed to refetch entries",
|
|
3953
|
+
C(q);
|
|
3954
|
+
} catch (M) {
|
|
3955
|
+
console.error("Failed to refetch entries", M);
|
|
3945
3956
|
} finally {
|
|
3946
|
-
|
|
3957
|
+
X(!1);
|
|
3947
3958
|
}
|
|
3948
3959
|
};
|
|
3949
3960
|
return ce(() => {
|
|
3950
|
-
let
|
|
3961
|
+
let M = !1;
|
|
3951
3962
|
return (async () => {
|
|
3952
3963
|
try {
|
|
3953
3964
|
const ee = await a.getLookups();
|
|
3954
|
-
if (
|
|
3965
|
+
if (M || !ee) return;
|
|
3955
3966
|
const q = {};
|
|
3956
3967
|
if (Array.isArray(ee.thirdParties))
|
|
3957
3968
|
for (const Z of ee.thirdParties)
|
|
3958
3969
|
typeof Z.thirdPartyId == "number" && (q[Z.thirdPartyId] = Z.thirdPartyName);
|
|
3959
|
-
|
|
3960
|
-
const
|
|
3970
|
+
at(q);
|
|
3971
|
+
const D = Array.isArray(ee.userRoles) ? ee.userRoles.map((Z) => ({
|
|
3961
3972
|
userRoleId: Z.userRoleId ?? Z.id,
|
|
3962
3973
|
userRoleName: Z.userRoleName ?? Z.name
|
|
3963
3974
|
})) : [];
|
|
3964
|
-
|
|
3975
|
+
M || Ue(D.length ? D : s || []);
|
|
3965
3976
|
} catch (ee) {
|
|
3966
3977
|
console.error("Error loading lookups", ee);
|
|
3967
3978
|
}
|
|
3968
3979
|
})(), () => {
|
|
3969
|
-
|
|
3980
|
+
M = !0;
|
|
3970
3981
|
};
|
|
3971
3982
|
}, []), /* @__PURE__ */ h("div", { className: "w-full", children: [
|
|
3972
3983
|
/* @__PURE__ */ h("div", { className: "mb-6", children: [
|
|
3973
3984
|
/* @__PURE__ */ i(is, { level: 4, className: "!mb-2", children: "Admin Settings" }),
|
|
3974
|
-
/* @__PURE__ */ h(
|
|
3975
|
-
|
|
3985
|
+
/* @__PURE__ */ h(xt, { spinning: $, children: [
|
|
3986
|
+
j ? /* @__PURE__ */ h("div", { className: "text-sm text-red-600 mb-2", children: [
|
|
3976
3987
|
"Failed to load settings: ",
|
|
3977
|
-
|
|
3988
|
+
j
|
|
3978
3989
|
] }) : null,
|
|
3979
3990
|
/* @__PURE__ */ i(
|
|
3980
|
-
|
|
3991
|
+
In,
|
|
3981
3992
|
{
|
|
3982
3993
|
sortBy: l,
|
|
3983
3994
|
groupBy: u,
|
|
3984
|
-
onChange: (
|
|
3985
|
-
|
|
3995
|
+
onChange: (M) => {
|
|
3996
|
+
M.sortBy && (d(M.sortBy), N(!0)), M.groupBy && (c(M.groupBy), N(!0));
|
|
3986
3997
|
},
|
|
3987
|
-
showActions:
|
|
3998
|
+
showActions: k,
|
|
3988
3999
|
onSave: async () => {
|
|
3989
|
-
|
|
4000
|
+
A(!0);
|
|
3990
4001
|
try {
|
|
3991
|
-
const
|
|
3992
|
-
|
|
3993
|
-
} catch (
|
|
3994
|
-
console.error("Error saving admin settings",
|
|
4002
|
+
const M = await o.setAdminSettings({ sortBy: l, groupBy: "string" });
|
|
4003
|
+
M?.responseStatus && M?.data && ye.success(M.data), f(l), N(!1);
|
|
4004
|
+
} catch (M) {
|
|
4005
|
+
console.error("Error saving admin settings", M);
|
|
3995
4006
|
} finally {
|
|
3996
|
-
|
|
4007
|
+
A(!1);
|
|
3997
4008
|
}
|
|
3998
4009
|
},
|
|
3999
4010
|
onClear: () => {
|
|
4000
|
-
d(
|
|
4011
|
+
d(S), N(!1);
|
|
4001
4012
|
},
|
|
4002
4013
|
saving: m
|
|
4003
4014
|
}
|
|
@@ -4008,62 +4019,63 @@ function kn({ severities: e, rules: t, userRoles: s, rawRules: r, onSave: n }) {
|
|
|
4008
4019
|
/* @__PURE__ */ h("div", { children: [
|
|
4009
4020
|
/* @__PURE__ */ i(is, { level: 4, className: "!mb-4", children: "Escalation Settings" }),
|
|
4010
4021
|
/* @__PURE__ */ i(
|
|
4011
|
-
|
|
4022
|
+
Tn,
|
|
4012
4023
|
{
|
|
4013
4024
|
escBasis: J,
|
|
4014
|
-
setEscBasis:
|
|
4015
|
-
selectedSeverity:
|
|
4025
|
+
setEscBasis: V,
|
|
4026
|
+
selectedSeverity: Y,
|
|
4016
4027
|
setSelectedSeverity: K,
|
|
4017
4028
|
selectedRule: T,
|
|
4018
4029
|
setSelectedRule: I,
|
|
4019
|
-
severityOptions:
|
|
4020
|
-
ruleOptions:
|
|
4021
|
-
minsOptions:
|
|
4022
|
-
roleOptions:
|
|
4023
|
-
l1mins:
|
|
4024
|
-
setL1mins:
|
|
4030
|
+
severityOptions: be,
|
|
4031
|
+
ruleOptions: ot,
|
|
4032
|
+
minsOptions: Es,
|
|
4033
|
+
roleOptions: ks,
|
|
4034
|
+
l1mins: E,
|
|
4035
|
+
setL1mins: W,
|
|
4025
4036
|
l1role: te,
|
|
4026
|
-
setL1role:
|
|
4027
|
-
l2mins:
|
|
4037
|
+
setL1role: O,
|
|
4038
|
+
l2mins: v,
|
|
4028
4039
|
setL2mins: p,
|
|
4029
4040
|
l2role: x,
|
|
4030
4041
|
setL2role: y,
|
|
4031
|
-
l3mins:
|
|
4032
|
-
setL3mins:
|
|
4033
|
-
l3role:
|
|
4034
|
-
setL3role:
|
|
4035
|
-
actions:
|
|
4036
|
-
setActions:
|
|
4042
|
+
l3mins: b,
|
|
4043
|
+
setL3mins: g,
|
|
4044
|
+
l3role: P,
|
|
4045
|
+
setL3role: B,
|
|
4046
|
+
actions: R,
|
|
4047
|
+
setActions: U,
|
|
4037
4048
|
thirdPartyIds: _,
|
|
4038
|
-
setThirdPartyIds:
|
|
4039
|
-
humanLoop:
|
|
4040
|
-
setHumanLoop:
|
|
4049
|
+
setThirdPartyIds: z,
|
|
4050
|
+
humanLoop: se,
|
|
4051
|
+
setHumanLoop: ge,
|
|
4041
4052
|
onClear: () => {
|
|
4042
|
-
d("By Severity"), c("By severity"),
|
|
4053
|
+
d("By Severity"), c("By severity"), V("rules"), K(void 0), I(void 0), W(void 0), O(void 0), p(void 0), y(void 0), g(void 0), B(void 0), U([]), z([]), ge(!1), ne(!1);
|
|
4043
4054
|
},
|
|
4044
4055
|
onSave: async () => {
|
|
4045
|
-
|
|
4056
|
+
ie(!0), n?.({
|
|
4046
4057
|
ruleId: T,
|
|
4047
4058
|
levels: [
|
|
4048
|
-
{ minutes:
|
|
4049
|
-
{ minutes:
|
|
4050
|
-
{ minutes:
|
|
4059
|
+
{ minutes: E, role: te },
|
|
4060
|
+
{ minutes: v, role: x },
|
|
4061
|
+
{ minutes: b, role: P }
|
|
4051
4062
|
],
|
|
4052
|
-
actions:
|
|
4063
|
+
actions: R,
|
|
4053
4064
|
thirdPartyIds: _,
|
|
4054
|
-
humanLoop:
|
|
4065
|
+
humanLoop: se,
|
|
4066
|
+
isAutoExpire: fe
|
|
4055
4067
|
});
|
|
4056
4068
|
try {
|
|
4057
4069
|
if (T) {
|
|
4058
|
-
const q = Array.isArray(
|
|
4059
|
-
(
|
|
4060
|
-
), Z = typeof
|
|
4061
|
-
if (!
|
|
4062
|
-
|
|
4070
|
+
const q = Array.isArray(R) ? R.map((Ee) => Number(Ee)) : [], D = (de || []).find(
|
|
4071
|
+
(Ee) => Ee?.ruleId === T || Ee?.ruleName === T || Ee?.RuleId === T
|
|
4072
|
+
), Z = typeof D?.recordId == "number" ? D.recordId : void 0;
|
|
4073
|
+
if (!D || typeof Z != "number") {
|
|
4074
|
+
ye.error("Unable to find rule recordId for update");
|
|
4063
4075
|
return;
|
|
4064
4076
|
}
|
|
4065
|
-
const
|
|
4066
|
-
...
|
|
4077
|
+
const Q = {
|
|
4078
|
+
...D,
|
|
4067
4079
|
actions: [
|
|
4068
4080
|
//this will definitely be remoed
|
|
4069
4081
|
{
|
|
@@ -4080,93 +4092,97 @@ function kn({ severities: e, rules: t, userRoles: s, rawRules: r, onSave: n }) {
|
|
|
4080
4092
|
],
|
|
4081
4093
|
escalationSettings: {
|
|
4082
4094
|
level1UserRoleId: te ?? 0,
|
|
4083
|
-
level1PostAssistTime:
|
|
4095
|
+
level1PostAssistTime: E ?? 0,
|
|
4084
4096
|
level2UserRoleId: x ?? 0,
|
|
4085
|
-
level2PostAssistTime:
|
|
4086
|
-
level3UserRoleId:
|
|
4087
|
-
level3PostAssistTime:
|
|
4097
|
+
level2PostAssistTime: v ?? 0,
|
|
4098
|
+
level3UserRoleId: P ?? 0,
|
|
4099
|
+
level3PostAssistTime: b ?? 0,
|
|
4088
4100
|
escalationSettingsActionTypeIds: q,
|
|
4089
4101
|
thirdPartyId: Array.isArray(_) ? _ : [],
|
|
4090
|
-
humanLoop:
|
|
4102
|
+
humanLoop: se,
|
|
4103
|
+
isAutoExpire: fe
|
|
4091
4104
|
}
|
|
4092
|
-
},
|
|
4093
|
-
if (
|
|
4094
|
-
|
|
4105
|
+
}, re = await a.updateRule(Z, Q);
|
|
4106
|
+
if (re?.responseStatus || re?.ok || re) {
|
|
4107
|
+
ye.success("Escalation settings saved"), await Os(), I(void 0), W(void 0), O(void 0), p(void 0), y(void 0), g(void 0), B(void 0), U([]), z([]), ge(!1), ne(!1);
|
|
4095
4108
|
return;
|
|
4096
4109
|
}
|
|
4097
4110
|
}
|
|
4098
4111
|
} catch (q) {
|
|
4099
4112
|
console.error("Error saving escalation settings", q);
|
|
4100
4113
|
} finally {
|
|
4101
|
-
|
|
4114
|
+
ie(!1);
|
|
4102
4115
|
}
|
|
4103
4116
|
const ee = t.find((q) => q.RuleId === T)?.Name || "-";
|
|
4104
|
-
|
|
4117
|
+
C((q) => [
|
|
4105
4118
|
...q,
|
|
4106
4119
|
{
|
|
4107
4120
|
id: `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
|
|
4108
4121
|
ruleOrSeverityLabel: ee,
|
|
4109
|
-
l1: { minutes:
|
|
4110
|
-
l2: { minutes:
|
|
4111
|
-
l3: { minutes:
|
|
4112
|
-
actions: (Array.isArray(
|
|
4113
|
-
const Z = Number(
|
|
4114
|
-
return
|
|
4122
|
+
l1: { minutes: E, roles: te ? [te] : [] },
|
|
4123
|
+
l2: { minutes: v, roles: x ? [x] : [] },
|
|
4124
|
+
l3: { minutes: b, roles: P ? [P] : [] },
|
|
4125
|
+
actions: (Array.isArray(R) ? R : []).map((D) => {
|
|
4126
|
+
const Z = Number(D);
|
|
4127
|
+
return ae[Z] || String(D);
|
|
4115
4128
|
}),
|
|
4116
|
-
notify: (Array.isArray(_) ? _ : []).map((
|
|
4117
|
-
humanLoop: !!
|
|
4129
|
+
notify: (Array.isArray(_) ? _ : []).map((D) => we[D] || String(D)),
|
|
4130
|
+
humanLoop: !!se,
|
|
4131
|
+
isAutoExpire: !!fe
|
|
4118
4132
|
}
|
|
4119
4133
|
]);
|
|
4120
4134
|
},
|
|
4121
|
-
saving:
|
|
4122
|
-
onActionTypesLoaded: (
|
|
4135
|
+
saving: H,
|
|
4136
|
+
onActionTypesLoaded: (M) => {
|
|
4123
4137
|
const ee = {};
|
|
4124
|
-
for (const q of
|
|
4138
|
+
for (const q of M)
|
|
4125
4139
|
typeof q.actionTypeId == "number" && (ee[q.actionTypeId] = q.name);
|
|
4126
|
-
|
|
4127
|
-
}
|
|
4140
|
+
Re(ee);
|
|
4141
|
+
},
|
|
4142
|
+
isAutoExpire: fe,
|
|
4143
|
+
setAutoExpire: ne
|
|
4128
4144
|
}
|
|
4129
4145
|
)
|
|
4130
4146
|
] }),
|
|
4131
4147
|
/* @__PURE__ */ i(Ge, { className: "my-6" }),
|
|
4132
4148
|
/* @__PURE__ */ i(
|
|
4133
|
-
|
|
4149
|
+
Rn,
|
|
4134
4150
|
{
|
|
4135
|
-
entries:
|
|
4136
|
-
userRoles:
|
|
4137
|
-
loading:
|
|
4138
|
-
onEdit: (
|
|
4139
|
-
|
|
4140
|
-
const ee =
|
|
4141
|
-
I(q ? q.RuleId :
|
|
4151
|
+
entries: Ye,
|
|
4152
|
+
userRoles: je,
|
|
4153
|
+
loading: ke,
|
|
4154
|
+
onEdit: (M) => {
|
|
4155
|
+
V("rules");
|
|
4156
|
+
const ee = Ye.find((D) => D.id === M), q = t.find((D) => D.RuleId === M) || (ee ? t.find((D) => D.Name === ee.ruleOrSeverityLabel) : void 0);
|
|
4157
|
+
I(q ? q.RuleId : M);
|
|
4142
4158
|
}
|
|
4143
4159
|
}
|
|
4144
4160
|
),
|
|
4145
4161
|
/* @__PURE__ */ i(Ge, { className: "my-6" }),
|
|
4146
|
-
/* @__PURE__ */ i(
|
|
4162
|
+
/* @__PURE__ */ i(En, { userRoles: je, rules: t, rawRules: r }),
|
|
4147
4163
|
/* @__PURE__ */ i(Ge, {})
|
|
4148
4164
|
] });
|
|
4149
4165
|
}
|
|
4150
4166
|
const { Title: as, Text: Xe } = Ke;
|
|
4151
|
-
function
|
|
4167
|
+
function Pn({ severities: e, rules: t, onSave: s, onCancel: r }) {
|
|
4152
4168
|
const { rules: n, alerts: a } = Te(), o = [
|
|
4153
4169
|
{ label: "By Severity", value: "By Severity" },
|
|
4154
4170
|
{ label: "By Created Date", value: "By Created Date" }
|
|
4155
|
-
], [l, d] = w("By Severity"), [u, c] = w(/* @__PURE__ */ new Set()), [
|
|
4171
|
+
], [l, d] = w("By Severity"), [u, c] = w(/* @__PURE__ */ new Set()), [S, f] = w(null), [k, N] = w(null), [m, A] = w({ inApp: !1, sms: !1, email: !1 }), [$, F] = w([]), [j, L] = w(!0), [J, V] = w(!1);
|
|
4156
4172
|
ce(() => {
|
|
4157
4173
|
let T = !1;
|
|
4158
4174
|
return (async () => {
|
|
4159
4175
|
try {
|
|
4160
4176
|
const I = await a.getPreferenceSettings();
|
|
4161
4177
|
if (T || !I) return;
|
|
4162
|
-
|
|
4178
|
+
A({
|
|
4163
4179
|
inApp: !!I.inApp,
|
|
4164
4180
|
//convert to bool - as the resp is str
|
|
4165
4181
|
sms: !!I.sms,
|
|
4166
4182
|
email: !!I.email
|
|
4167
4183
|
});
|
|
4168
|
-
const
|
|
4169
|
-
d(
|
|
4184
|
+
const E = ds(I.sortBy);
|
|
4185
|
+
d(E === "By Created Date" ? "By Created Date" : "By Severity"), f(Ht(I.doNotDisturbStart)), N(Ht(I.doNotDisturbEnd)), Array.isArray(I.anomalyIds) && c(new Set(I.anomalyIds.map((W) => String(W))));
|
|
4170
4186
|
} catch (I) {
|
|
4171
4187
|
console.error("Error in loading my preferences: ", I);
|
|
4172
4188
|
}
|
|
@@ -4180,8 +4196,8 @@ function On({ severities: e, rules: t, onSave: s, onCancel: r }) {
|
|
|
4180
4196
|
L(!0);
|
|
4181
4197
|
const I = await n.getLookups();
|
|
4182
4198
|
if (T || !I) return;
|
|
4183
|
-
const
|
|
4184
|
-
|
|
4199
|
+
const E = Array.isArray(I.anomalies) ? I.anomalies : [];
|
|
4200
|
+
F(E);
|
|
4185
4201
|
} catch (I) {
|
|
4186
4202
|
console.error("Failed to load anomalies lookups", I);
|
|
4187
4203
|
} finally {
|
|
@@ -4191,25 +4207,25 @@ function On({ severities: e, rules: t, onSave: s, onCancel: r }) {
|
|
|
4191
4207
|
T = !0;
|
|
4192
4208
|
};
|
|
4193
4209
|
}, []);
|
|
4194
|
-
const
|
|
4210
|
+
const Y = (T) => {
|
|
4195
4211
|
c((I) => {
|
|
4196
|
-
const
|
|
4197
|
-
return
|
|
4212
|
+
const E = new Set(I);
|
|
4213
|
+
return E.has(T) ? E.delete(T) : E.add(T), E;
|
|
4198
4214
|
});
|
|
4199
4215
|
}, K = async () => {
|
|
4200
4216
|
s?.({
|
|
4201
4217
|
sortBy: l,
|
|
4202
4218
|
subscribedRuleIds: Array.from(u),
|
|
4203
4219
|
dnd: {
|
|
4204
|
-
from:
|
|
4205
|
-
to:
|
|
4220
|
+
from: S,
|
|
4221
|
+
to: k
|
|
4206
4222
|
},
|
|
4207
4223
|
channels: m
|
|
4208
4224
|
});
|
|
4209
4225
|
try {
|
|
4210
|
-
|
|
4211
|
-
const T =
|
|
4212
|
-
anomalyIds:
|
|
4226
|
+
V(!0);
|
|
4227
|
+
const T = S ? S.format?.("HH:mm:ss") ?? "00:00:00" : "00:00:00", I = k ? k.format?.("HH:mm:ss") ?? "00:00:00" : "00:00:00", E = Array.from(u).map((te) => Number(te)).filter((te) => Number.isFinite(te)), W = await a.setPreferenceSettings({
|
|
4228
|
+
anomalyIds: E,
|
|
4213
4229
|
doNotDisturbStart: T,
|
|
4214
4230
|
doNotDisturbEnd: I,
|
|
4215
4231
|
inApp: !!m.inApp,
|
|
@@ -4217,44 +4233,44 @@ function On({ severities: e, rules: t, onSave: s, onCancel: r }) {
|
|
|
4217
4233
|
email: !!m.email,
|
|
4218
4234
|
sortBy: l
|
|
4219
4235
|
});
|
|
4220
|
-
|
|
4236
|
+
W?.responseStatus && ye.success(W?.data || "Preferences updated successfully.");
|
|
4221
4237
|
} catch (T) {
|
|
4222
4238
|
console.error("Error in saving my preferences: ", T);
|
|
4223
4239
|
} finally {
|
|
4224
|
-
|
|
4240
|
+
V(!1);
|
|
4225
4241
|
}
|
|
4226
4242
|
};
|
|
4227
4243
|
return /* @__PURE__ */ h("div", { className: "w-full", children: [
|
|
4228
|
-
/* @__PURE__ */ i(
|
|
4244
|
+
/* @__PURE__ */ i(Ae, { gutter: [16, 16], align: "middle", className: "mb-4", children: /* @__PURE__ */ i(G, { xs: 24, md: 8, children: /* @__PURE__ */ h(Ie, { direction: "horizontal", size: 12, className: "w-full items-center", children: [
|
|
4229
4245
|
/* @__PURE__ */ i(Xe, { className: "text-gray-600", children: "Sort By:" }),
|
|
4230
|
-
/* @__PURE__ */ i(
|
|
4246
|
+
/* @__PURE__ */ i(ve, { className: "w-[240px]", value: l, options: o, onChange: d })
|
|
4231
4247
|
] }) }) }),
|
|
4232
4248
|
/* @__PURE__ */ h("div", { className: "mb-4", children: [
|
|
4233
4249
|
/* @__PURE__ */ i(as, { level: 5, className: "!mb-2", children: "Anomalies" }),
|
|
4234
|
-
|
|
4235
|
-
const I = String(T.recordId),
|
|
4236
|
-
return /* @__PURE__ */ i(
|
|
4250
|
+
j ? /* @__PURE__ */ i("div", { className: "py-4", children: /* @__PURE__ */ i(xt, {}) }) : /* @__PURE__ */ i(Ie, { direction: "vertical", size: 10, className: "w-full", children: (Array.isArray($) ? $ : []).map((T) => {
|
|
4251
|
+
const I = String(T.recordId), E = T.anomalyName;
|
|
4252
|
+
return /* @__PURE__ */ i(qe, { checked: u.has(I), onChange: () => Y(I), children: E }, I);
|
|
4237
4253
|
}) })
|
|
4238
4254
|
] }),
|
|
4239
4255
|
/* @__PURE__ */ h("div", { className: "mb-4", children: [
|
|
4240
4256
|
/* @__PURE__ */ i(as, { level: 5, className: "!mb-2", children: "Notification Timing & Channels" }),
|
|
4241
|
-
/* @__PURE__ */ i(
|
|
4257
|
+
/* @__PURE__ */ i(Ae, { gutter: [16, 16], align: "middle", className: "mb-3", children: /* @__PURE__ */ i(G, { xs: 24, md: 12, children: /* @__PURE__ */ h(Ie, { direction: "horizontal", size: 12, className: "w-full items-center", children: [
|
|
4242
4258
|
/* @__PURE__ */ i(Xe, { children: "Do Not Disturb mode:" }),
|
|
4243
4259
|
/* @__PURE__ */ h(Ie, { size: 12, className: "w-full", children: [
|
|
4244
4260
|
/* @__PURE__ */ h(Ie, { direction: "horizontal", size: 8, className: "items-center", children: [
|
|
4245
4261
|
/* @__PURE__ */ i(Xe, { children: "From" }),
|
|
4246
|
-
/* @__PURE__ */ i($t, { value:
|
|
4262
|
+
/* @__PURE__ */ i($t, { value: S, onChange: (T) => f(T), format: "HH:mm" })
|
|
4247
4263
|
] }),
|
|
4248
4264
|
/* @__PURE__ */ h(Ie, { direction: "horizontal", size: 8, className: "items-center", children: [
|
|
4249
4265
|
/* @__PURE__ */ i(Xe, { children: "To" }),
|
|
4250
|
-
/* @__PURE__ */ i($t, { value:
|
|
4266
|
+
/* @__PURE__ */ i($t, { value: k, onChange: (T) => N(T), format: "HH:mm" })
|
|
4251
4267
|
] })
|
|
4252
4268
|
] })
|
|
4253
4269
|
] }) }) }),
|
|
4254
|
-
/* @__PURE__ */ h(
|
|
4255
|
-
/* @__PURE__ */ i(
|
|
4256
|
-
/* @__PURE__ */ i(
|
|
4257
|
-
/* @__PURE__ */ i(
|
|
4270
|
+
/* @__PURE__ */ h(Ae, { gutter: [24, 12], children: [
|
|
4271
|
+
/* @__PURE__ */ i(G, { children: /* @__PURE__ */ i(qe, { checked: m.inApp, onChange: (T) => A({ ...m, inApp: T.target.checked }), children: "In-app" }) }),
|
|
4272
|
+
/* @__PURE__ */ i(G, { children: /* @__PURE__ */ i(qe, { checked: m.sms, onChange: (T) => A({ ...m, sms: T.target.checked }), children: "SMS" }) }),
|
|
4273
|
+
/* @__PURE__ */ i(G, { children: /* @__PURE__ */ i(qe, { checked: m.email, onChange: (T) => A({ ...m, email: T.target.checked }), children: "Email" }) })
|
|
4258
4274
|
] })
|
|
4259
4275
|
] }),
|
|
4260
4276
|
/* @__PURE__ */ i(Ge, {}),
|
|
@@ -4264,7 +4280,7 @@ function On({ severities: e, rules: t, onSave: s, onCancel: r }) {
|
|
|
4264
4280
|
] })
|
|
4265
4281
|
] });
|
|
4266
4282
|
}
|
|
4267
|
-
function
|
|
4283
|
+
function Mn({ severities: e, rules: t, userRoles: s, rawRules: r }) {
|
|
4268
4284
|
const [n, a] = w("global");
|
|
4269
4285
|
return /* @__PURE__ */ h("div", { className: "w-full", children: [
|
|
4270
4286
|
/* @__PURE__ */ h("div", { className: "inline-flex rounded-xl overflow-hidden border border-gray-200 mb-4", children: [
|
|
@@ -4286,12 +4302,12 @@ function En({ severities: e, rules: t, userRoles: s, rawRules: r }) {
|
|
|
4286
4302
|
}
|
|
4287
4303
|
)
|
|
4288
4304
|
] }),
|
|
4289
|
-
n === "global" ? /* @__PURE__ */ i(
|
|
4305
|
+
n === "global" ? /* @__PURE__ */ i(On, { severities: e, rules: t, userRoles: s, rawRules: r }) : /* @__PURE__ */ i(Pn, { severities: e, rules: t })
|
|
4290
4306
|
] });
|
|
4291
4307
|
}
|
|
4292
|
-
const
|
|
4293
|
-
function
|
|
4294
|
-
const t = (e.status || "").toLowerCase() === "completed" ? /* @__PURE__ */ i("img", { src:
|
|
4308
|
+
const Dn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAIZSURBVHgBnZW/b9NAFMe/z3H6i1ZNJUBFQsL/QQkLCFBtRhhKF1ibhBmpXbtgFlYqsTG0gRGWwgAjMb8EYmjYGN0pCCrVVaX+SBxf37PiqHWcOu5Xsux79+6j77vz3RH66IbdsDTQPCFngmBwqMCPBwVXoe204Fd/2ZfrSWMpHrDshtGCvsY9FlKkFNYD+Es/7EtuX+itp1sLnLrScTWoPMYsfnty/lUPtAOs4syiUgQOoWHJpG9kdBiX11Z+UaZCk1YT+vOzACuzYxgf7hZbyBGvhTi9af+7SkQbyKi7M8N4ZJ5D+eU2dg9UN07KvyNOS8io6UkNFXMMj1/vnACKAuTmNXZpIqME+LF+iIbX7ukjkClODWTQw+ujuGYMYfXzXnICbxSBDrxAUvYDhkrZp6ggUC8+sDI7mpj9YmESb3/uJ5Z9TJ5A3eORvzsBpgs6lufGT2TKPNY3fbxh6Knis0FTSjnx+LP3u5DJicDi/t7MCFadPaRJQTl02/5vKcKnpITluYkwrWjksebs48Pvg3SoUkXtq32hxt+1pITI8Zc/zcGACN59ty/WdWnklV5ukZ+49wU8MUJIF3mBGlqUr3Dv1+wpl20v9UuP75pElyrgc3XK7UJFbLvK4DJiv9ggDmWcjO9G4imWvW00yV/hjvtpOFnpQOVLkcO+0EhyevGrROG1ol1hREFc8ZGxyddIje+v9c4i9+gI5z7MozLxclgAAAAASUVORK5CYII=", Fn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAKeSURBVHgBjVVdbtpAEJ5ZmygPfTBSaVWpUt0bwFuURgJOUG5QeoLACbw+QeAEwA3SGxgJokh9CDeI+xSpTRU/Imw8nbFZx6QQGAl5d2fm229+dkDYI2f6oaUAOwhWExBcPnL4FwFBSLCexpCMf+qPi12++PKgpR/cGOwRa1pwQIjgOoWkf6s/hOVzVd588R+/xWjf5YAY8Y0+ErQrZFfnXg3lK3uGm7A+RISOxfbit5NprqBxxgBoeEIVHehqtI9lSz+5McaaITaA2J17bycFaBayMOS8IaT+zHuv4Ui58P9oAvB4Ga0paUgqbFGswL5idIcIx3P9DCiXrQB7iJawcTiCkMMIUlj7Jo8zr6Yv/EfRXXIqRnzUxnP9u46Id8Q5Sslq3+pqWErHAPKqvxROC/ZMuJwKJ8bkPouUkrYUqgt5IgMDKAxfAYT8nAZnmR2A5J47YSjrFKyOYpZN2SiIJ8YjRqVfASyAFVg9s2F2gXwRsClMXdnYcFpq5PyiQ8KEilaywc79+aEow2i7fdCF46SIpuTvCGi2kWSXjCM4QqS4Zl3yjwQ0UySwrBfGRJNjQKW4ZrmEpL45CxUDTGWdgmoZgxOoDA6zxYgr7ZudhWk3x6Sp4kl0nZmgujQhcH5Cvqy/Hxi5hdL+dgsWxR2rma4FkLeDw+PMM243+t2YB0jDDI9nMBquyWqI3tjmLYguQfqDzxebty/DIcnePr9jfePVfDhSzv2/Hs8LAY3kMmFfTCl+rl3uu1GWF6Jx+X3vkpa+58jeeNyXvY3Pd8N+a0hvgK9ge3hMTmG5CPTnSICWcFpXaDfZUcAck99yOnZM/id3hcmAFV/hgEilU6p0TcH2gpZYS98xc/kXUJ8YImPFzfeLh0cgXbMp8n/yD3ySPZSK0MWKAAAAAElFTkSuQmCC";
|
|
4309
|
+
function Un(e) {
|
|
4310
|
+
const t = (e.status || "").toLowerCase() === "completed" ? /* @__PURE__ */ i("img", { src: Dn, alt: "completed", style: { width: 20, height: 20 } }) : /* @__PURE__ */ i("img", { src: Fn, alt: "pending", style: { width: 20, height: 20 } });
|
|
4295
4311
|
return {
|
|
4296
4312
|
title: /* @__PURE__ */ h("div", { className: "flex flex-col gap-0 min-w-0", children: [
|
|
4297
4313
|
/* @__PURE__ */ h("div", { className: "flex flex-col", children: [
|
|
@@ -4304,9 +4320,9 @@ function Dn(e) {
|
|
|
4304
4320
|
description: null
|
|
4305
4321
|
};
|
|
4306
4322
|
}
|
|
4307
|
-
function
|
|
4323
|
+
function Ln({ data: e }) {
|
|
4308
4324
|
return /* @__PURE__ */ i("div", { className: "w-full", children: /* @__PURE__ */ i(
|
|
4309
|
-
|
|
4325
|
+
Ct,
|
|
4310
4326
|
{
|
|
4311
4327
|
type: "card",
|
|
4312
4328
|
items: [
|
|
@@ -4314,7 +4330,7 @@ function Fn({ data: e }) {
|
|
|
4314
4330
|
key: "action",
|
|
4315
4331
|
label: "Action Taken",
|
|
4316
4332
|
children: /* @__PURE__ */ h("div", { className: "w-full", children: [
|
|
4317
|
-
/* @__PURE__ */ i(
|
|
4333
|
+
/* @__PURE__ */ i(dt, { className: "mb-4 rounded-md p-4", bordered: !0, children: /* @__PURE__ */ h("div", { className: "grid grid-cols-4 gap-6 text-xs", children: [
|
|
4318
4334
|
/* @__PURE__ */ h("div", { className: "flex flex-col gap-1", children: [
|
|
4319
4335
|
/* @__PURE__ */ i("span", { className: "text-gray-500", children: "Alert ID" }),
|
|
4320
4336
|
/* @__PURE__ */ i("span", { className: "text-black", children: e.summary.alertNumber })
|
|
@@ -4328,15 +4344,15 @@ function Fn({ data: e }) {
|
|
|
4328
4344
|
/* @__PURE__ */ i("span", { className: "text-black", children: e.summary.location })
|
|
4329
4345
|
] })
|
|
4330
4346
|
] }) }),
|
|
4331
|
-
/* @__PURE__ */ h(
|
|
4347
|
+
/* @__PURE__ */ h(dt, { className: "rounded-md p-4", bordered: !0, children: [
|
|
4332
4348
|
/* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ i("h4", { className: "text-sm text-black font-medium", children: "Response Timeline/ Audit trail/log" }) }),
|
|
4333
4349
|
/* @__PURE__ */ i("div", { className: "mt-2", children: /* @__PURE__ */ i(
|
|
4334
|
-
|
|
4350
|
+
js,
|
|
4335
4351
|
{
|
|
4336
4352
|
direction: "vertical",
|
|
4337
4353
|
size: "small",
|
|
4338
4354
|
current: 1,
|
|
4339
|
-
items: (e.timeline || []).map(
|
|
4355
|
+
items: (e.timeline || []).map(Un)
|
|
4340
4356
|
}
|
|
4341
4357
|
) })
|
|
4342
4358
|
] })
|
|
@@ -4346,7 +4362,7 @@ function Fn({ data: e }) {
|
|
|
4346
4362
|
key: "notification",
|
|
4347
4363
|
label: "Notification Sent",
|
|
4348
4364
|
children: /* @__PURE__ */ h("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
4349
|
-
(e.notifications || []).map((t, s) => /* @__PURE__ */ h(
|
|
4365
|
+
(e.notifications || []).map((t, s) => /* @__PURE__ */ h(dt, { className: "rounded-md p-4", bordered: !0, children: [
|
|
4350
4366
|
/* @__PURE__ */ h("div", { className: "flex items-start justify-between", children: [
|
|
4351
4367
|
/* @__PURE__ */ h("div", { className: "flex flex-col", children: [
|
|
4352
4368
|
/* @__PURE__ */ i("h4", { className: "text-sm text-black font-medium", children: t.channelLabel }),
|
|
@@ -4417,7 +4433,7 @@ function Fn({ data: e }) {
|
|
|
4417
4433
|
}
|
|
4418
4434
|
) });
|
|
4419
4435
|
}
|
|
4420
|
-
const
|
|
4436
|
+
const $n = ({
|
|
4421
4437
|
alertId: e,
|
|
4422
4438
|
id: t,
|
|
4423
4439
|
priority: s,
|
|
@@ -4433,32 +4449,32 @@ const Un = ({
|
|
|
4433
4449
|
location: r || "",
|
|
4434
4450
|
alertNumber: n ?? ""
|
|
4435
4451
|
}, d = a?.length ? a.map((c) => {
|
|
4436
|
-
const
|
|
4452
|
+
const S = (c?.status || c?.eventStatus || "").toLowerCase() === "completed" ? "Completed" : "Inprogress", f = c?.createdDate ? wt(c.createdDate) : c?.timestamp ? wt(c.timestamp) : "";
|
|
4437
4453
|
return {
|
|
4438
|
-
status:
|
|
4454
|
+
status: S,
|
|
4439
4455
|
title: c?.status || c?.eventStatus || "Status Update",
|
|
4440
4456
|
description: c?.description || c?.actionNotes || "",
|
|
4441
4457
|
timestamp: f
|
|
4442
4458
|
};
|
|
4443
4459
|
}) : [];
|
|
4444
|
-
return /* @__PURE__ */ i(
|
|
4460
|
+
return /* @__PURE__ */ i(Ln, { data: {
|
|
4445
4461
|
summary: l,
|
|
4446
4462
|
timeline: d,
|
|
4447
4463
|
notifications: o ?? []
|
|
4448
4464
|
} });
|
|
4449
4465
|
};
|
|
4450
|
-
const
|
|
4466
|
+
const Bn = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), jn = (e) => e.replace(
|
|
4451
4467
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
4452
4468
|
(t, s, r) => r ? r.toUpperCase() : s.toLowerCase()
|
|
4453
4469
|
), os = (e) => {
|
|
4454
|
-
const t =
|
|
4470
|
+
const t = jn(e);
|
|
4455
4471
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
4456
|
-
}, Cs = (...e) => e.filter((t, s, r) => !!t && t.trim() !== "" && r.indexOf(t) === s).join(" ").trim(),
|
|
4472
|
+
}, Cs = (...e) => e.filter((t, s, r) => !!t && t.trim() !== "" && r.indexOf(t) === s).join(" ").trim(), _n = (e) => {
|
|
4457
4473
|
for (const t in e)
|
|
4458
4474
|
if (t.startsWith("aria-") || t === "role" || t === "title")
|
|
4459
4475
|
return !0;
|
|
4460
4476
|
};
|
|
4461
|
-
var
|
|
4477
|
+
var qn = {
|
|
4462
4478
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4463
4479
|
width: 24,
|
|
4464
4480
|
height: 24,
|
|
@@ -4469,7 +4485,7 @@ var jn = {
|
|
|
4469
4485
|
strokeLinecap: "round",
|
|
4470
4486
|
strokeLinejoin: "round"
|
|
4471
4487
|
};
|
|
4472
|
-
const
|
|
4488
|
+
const Qn = ls(
|
|
4473
4489
|
({
|
|
4474
4490
|
color: e = "currentColor",
|
|
4475
4491
|
size: t = 24,
|
|
@@ -4479,32 +4495,32 @@ const _n = ls(
|
|
|
4479
4495
|
children: a,
|
|
4480
4496
|
iconNode: o,
|
|
4481
4497
|
...l
|
|
4482
|
-
}, d) =>
|
|
4498
|
+
}, d) => mt(
|
|
4483
4499
|
"svg",
|
|
4484
4500
|
{
|
|
4485
4501
|
ref: d,
|
|
4486
|
-
...
|
|
4502
|
+
...qn,
|
|
4487
4503
|
width: t,
|
|
4488
4504
|
height: t,
|
|
4489
4505
|
stroke: e,
|
|
4490
4506
|
strokeWidth: r ? Number(s) * 24 / Number(t) : s,
|
|
4491
4507
|
className: Cs("lucide", n),
|
|
4492
|
-
...!a && !
|
|
4508
|
+
...!a && !_n(l) && { "aria-hidden": "true" },
|
|
4493
4509
|
...l
|
|
4494
4510
|
},
|
|
4495
4511
|
[
|
|
4496
|
-
...o.map(([u, c]) =>
|
|
4512
|
+
...o.map(([u, c]) => mt(u, c)),
|
|
4497
4513
|
...Array.isArray(a) ? a : [a]
|
|
4498
4514
|
]
|
|
4499
4515
|
)
|
|
4500
4516
|
);
|
|
4501
4517
|
const Is = (e, t) => {
|
|
4502
4518
|
const s = ls(
|
|
4503
|
-
({ className: r, ...n }, a) =>
|
|
4519
|
+
({ className: r, ...n }, a) => mt(Qn, {
|
|
4504
4520
|
ref: a,
|
|
4505
4521
|
iconNode: t,
|
|
4506
4522
|
className: Cs(
|
|
4507
|
-
`lucide-${
|
|
4523
|
+
`lucide-${Bn(os(e))}`,
|
|
4508
4524
|
`lucide-${e}`,
|
|
4509
4525
|
r
|
|
4510
4526
|
),
|
|
@@ -4513,18 +4529,18 @@ const Is = (e, t) => {
|
|
|
4513
4529
|
);
|
|
4514
4530
|
return s.displayName = os(e), s;
|
|
4515
4531
|
};
|
|
4516
|
-
const
|
|
4532
|
+
const Hn = [
|
|
4517
4533
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
4518
4534
|
["path", { d: "m21 3-7 7", key: "1l2asr" }],
|
|
4519
4535
|
["path", { d: "m3 21 7-7", key: "tjx5ai" }],
|
|
4520
4536
|
["path", { d: "M9 21H3v-6", key: "wtvkvv" }]
|
|
4521
|
-
], Ts = Is("maximize-2",
|
|
4522
|
-
const
|
|
4537
|
+
], Ts = Is("maximize-2", Hn);
|
|
4538
|
+
const Gn = [
|
|
4523
4539
|
["path", { d: "m14 10 7-7", key: "oa77jy" }],
|
|
4524
4540
|
["path", { d: "M20 10h-6V4", key: "mjg0md" }],
|
|
4525
4541
|
["path", { d: "m3 21 7-7", key: "tjx5ai" }],
|
|
4526
4542
|
["path", { d: "M4 14h6v6", key: "rmj7iw" }]
|
|
4527
|
-
],
|
|
4543
|
+
], Wn = Is("minimize-2", Gn), Kn = ({ isOpen: e, onClose: t, src: s, type: r = "image" }) => {
|
|
4528
4544
|
const [n, a] = w(!1), [o, l] = w(!1);
|
|
4529
4545
|
return ce(() => {
|
|
4530
4546
|
e && l(!1);
|
|
@@ -4578,7 +4594,7 @@ const Qn = [
|
|
|
4578
4594
|
{
|
|
4579
4595
|
onClick: () => a(!n),
|
|
4580
4596
|
className: "absolute bottom-3 right-3 text-white bg-black/50 rounded-full p-2 hover:bg-black/70",
|
|
4581
|
-
children: n ? /* @__PURE__ */ i(
|
|
4597
|
+
children: n ? /* @__PURE__ */ i(Wn, { size: 20 }) : /* @__PURE__ */ i(Ts, { size: 20 })
|
|
4582
4598
|
}
|
|
4583
4599
|
)
|
|
4584
4600
|
]
|
|
@@ -4587,123 +4603,123 @@ const Qn = [
|
|
|
4587
4603
|
}
|
|
4588
4604
|
) : null;
|
|
4589
4605
|
};
|
|
4590
|
-
function
|
|
4606
|
+
function Yn(e) {
|
|
4591
4607
|
if (!e || typeof e != "string") return !1;
|
|
4592
4608
|
const t = e.split("?")[0].toLowerCase();
|
|
4593
4609
|
return t.endsWith(".mp4") || t.endsWith(".webm") || t.endsWith(".ogg") || t.endsWith(".m3u8");
|
|
4594
4610
|
}
|
|
4595
|
-
function
|
|
4611
|
+
function ft(e) {
|
|
4596
4612
|
const t = (e?.mediaType || e?.type || "").toString().toLowerCase();
|
|
4597
|
-
return t === "video" || t === "mp4" ? !0 :
|
|
4613
|
+
return t === "video" || t === "mp4" ? !0 : Yn(e?.mediaUrl || e);
|
|
4598
4614
|
}
|
|
4599
|
-
function
|
|
4615
|
+
function zn(e) {
|
|
4600
4616
|
const t = e;
|
|
4601
4617
|
return t ? Array.isArray(t) ? t : [t] : [];
|
|
4602
4618
|
}
|
|
4603
|
-
const
|
|
4619
|
+
const Vn = {
|
|
4604
4620
|
Critical: "#FF3B30",
|
|
4605
4621
|
High: "#FFB86A",
|
|
4606
4622
|
Medium: "#FFCC00",
|
|
4607
4623
|
Low: "#007AFF"
|
|
4608
|
-
},
|
|
4624
|
+
}, Jn = {
|
|
4609
4625
|
Critical: "#FFE2E2",
|
|
4610
4626
|
High: "#FF95004D",
|
|
4611
4627
|
Medium: "#FEF9C2",
|
|
4612
4628
|
Low: "#E0EDFF"
|
|
4613
|
-
},
|
|
4614
|
-
const [d, u] = w(), [c,
|
|
4615
|
-
eventName:
|
|
4616
|
-
alertId:
|
|
4629
|
+
}, Zn = ({ isModalOpen: e, handleModalClose: t, selectedRow: s, fetchAlertLogs: r, alertStatusList: n = [], alertStatusLoading: a = !1, initialTab: o = "details", sourceTab: l }) => {
|
|
4630
|
+
const [d, u] = w(), [c, S] = w(""), [f, k] = w(!1), N = Fs(null), [m, A] = w("details"), [$, F] = w(void 0), j = xs(), { alerts: L } = Te(), [J, V] = w(!1), [Y, K] = w(void 0), [T, I] = w(void 0), [E, W] = w({}), te = s?.originalData || {}, {
|
|
4631
|
+
eventName: O,
|
|
4632
|
+
alertId: v,
|
|
4617
4633
|
timestamp: p,
|
|
4618
4634
|
description: x,
|
|
4619
4635
|
spaceName: y,
|
|
4620
|
-
assignTeam:
|
|
4621
|
-
priority:
|
|
4622
|
-
statusType:
|
|
4623
|
-
id:
|
|
4624
|
-
alertDetails:
|
|
4625
|
-
statusHistory:
|
|
4636
|
+
assignTeam: b,
|
|
4637
|
+
priority: g,
|
|
4638
|
+
statusType: P,
|
|
4639
|
+
id: B,
|
|
4640
|
+
alertDetails: R,
|
|
4641
|
+
statusHistory: U,
|
|
4626
4642
|
mediaDetails: _,
|
|
4627
|
-
alertNumber:
|
|
4628
|
-
} = te,
|
|
4629
|
-
const
|
|
4630
|
-
return
|
|
4631
|
-
},
|
|
4643
|
+
alertNumber: z
|
|
4644
|
+
} = te, se = (C) => {
|
|
4645
|
+
const H = String(C || "").toLowerCase();
|
|
4646
|
+
return H === "delivered" || H === "sent" ? "Delivered" : H === "failed" ? "Failed" : "Queued";
|
|
4647
|
+
}, ge = (C) => ({
|
|
4632
4648
|
name: C?.receipientName || C?.recipientName || "-",
|
|
4633
4649
|
role: C?.receipientRoleName || "",
|
|
4634
4650
|
phone: C?.receipentPhoneNumber || C?.recipientPhoneNumber || C?.receipientEmail || C?.recipientEmail || "",
|
|
4635
|
-
status:
|
|
4651
|
+
status: se(C?.messageStatus),
|
|
4636
4652
|
notificationReceipientType: C?.notificationReceipientType || ""
|
|
4637
|
-
}),
|
|
4638
|
-
const
|
|
4653
|
+
}), fe = (C, H) => {
|
|
4654
|
+
const ie = H.map(ge), ke = ie.filter((be) => be.status === "Delivered").length, X = H.map((be) => be?.sentAt).filter(Boolean).sort((be, ot) => new Date(ot).getTime() - new Date(be).getTime())[0], de = H[0] || {}, He = [de?.severityName, de?.anomalyName].filter(Boolean).join(" - ") || `${C} Notification`;
|
|
4639
4655
|
return {
|
|
4640
4656
|
channelLabel: `${C} Notification`,
|
|
4641
4657
|
sentAt: X || "",
|
|
4642
|
-
messageTitle:
|
|
4658
|
+
messageTitle: He,
|
|
4643
4659
|
messageBody: "",
|
|
4644
|
-
total:
|
|
4645
|
-
delivered:
|
|
4646
|
-
recipients:
|
|
4660
|
+
total: ie.length,
|
|
4661
|
+
delivered: ke,
|
|
4662
|
+
recipients: ie
|
|
4647
4663
|
};
|
|
4648
4664
|
}, ne = (C) => {
|
|
4649
|
-
const
|
|
4650
|
-
return (C || []).forEach((
|
|
4651
|
-
const
|
|
4652
|
-
X.push(
|
|
4653
|
-
}), Array.from(
|
|
4665
|
+
const H = /* @__PURE__ */ new Map();
|
|
4666
|
+
return (C || []).forEach((ie) => {
|
|
4667
|
+
const ke = String(ie?.notificationType || "Unknown"), X = H.get(ke) || [];
|
|
4668
|
+
X.push(ie), H.set(ke, X);
|
|
4669
|
+
}), Array.from(H.entries()).map(([ie, ke]) => fe(ie, ke));
|
|
4654
4670
|
}, ae = async (C) => {
|
|
4655
4671
|
try {
|
|
4656
|
-
const
|
|
4657
|
-
|
|
4672
|
+
const H = await L.getAlertNotifications(C), ie = ne(H);
|
|
4673
|
+
F(ie);
|
|
4658
4674
|
} catch {
|
|
4659
|
-
|
|
4675
|
+
F(void 0);
|
|
4660
4676
|
}
|
|
4661
4677
|
};
|
|
4662
4678
|
ce(() => {
|
|
4663
|
-
if (m !== "track" || !
|
|
4679
|
+
if (m !== "track" || !B) return;
|
|
4664
4680
|
let C = !1;
|
|
4665
|
-
return ae(
|
|
4666
|
-
C &&
|
|
4681
|
+
return ae(B).then(() => {
|
|
4682
|
+
C && F(void 0);
|
|
4667
4683
|
}), () => {
|
|
4668
4684
|
C = !0;
|
|
4669
4685
|
};
|
|
4670
|
-
}, [m,
|
|
4671
|
-
e &&
|
|
4686
|
+
}, [m, B]), ce(() => {
|
|
4687
|
+
e && A(o);
|
|
4672
4688
|
}, [e, o]);
|
|
4673
|
-
const we = l === "archived" || ["completed", "false positive"].includes(String(
|
|
4674
|
-
const
|
|
4675
|
-
return
|
|
4676
|
-
},
|
|
4677
|
-
const
|
|
4678
|
-
return typeof l < "u" ? l === "archived" ?
|
|
4679
|
-
}).map((C) => ({ value: C.value, label: C.statusName })),
|
|
4689
|
+
const we = l === "archived" || ["completed", "false positive"].includes(String(P || "").toLowerCase()), at = (C) => {
|
|
4690
|
+
const H = String(C?.value || "").toLowerCase(), ie = String(C?.statusName || "").toLowerCase();
|
|
4691
|
+
return H.includes("reopen") || ie.includes("reopen");
|
|
4692
|
+
}, je = (n || []).filter((C) => {
|
|
4693
|
+
const H = at(C);
|
|
4694
|
+
return typeof l < "u" ? l === "archived" ? H : !H : we ? H : !H;
|
|
4695
|
+
}).map((C) => ({ value: C.value, label: C.statusName })), Ue = ue(() => zn(_), [_]);
|
|
4680
4696
|
return ce(() => {
|
|
4681
4697
|
let C = !1;
|
|
4682
|
-
const
|
|
4698
|
+
const H = new AbortController(), ie = async (X) => {
|
|
4683
4699
|
if (X) {
|
|
4684
|
-
C ||
|
|
4700
|
+
C || W((de) => ({ ...de, [X]: !1 }));
|
|
4685
4701
|
try {
|
|
4686
|
-
const
|
|
4687
|
-
if (
|
|
4688
|
-
C ||
|
|
4702
|
+
const de = await fetch(X, { method: "HEAD", signal: H.signal });
|
|
4703
|
+
if (de.ok) {
|
|
4704
|
+
C || W((be) => ({ ...be, [X]: !0 }));
|
|
4689
4705
|
return;
|
|
4690
4706
|
}
|
|
4691
|
-
if (
|
|
4692
|
-
C ||
|
|
4707
|
+
if (de.status === 404) {
|
|
4708
|
+
C || W((be) => ({ ...be, [X]: !1 }));
|
|
4693
4709
|
return;
|
|
4694
4710
|
}
|
|
4695
|
-
if (!(await fetch(X, { method: "GET", signal:
|
|
4696
|
-
C ||
|
|
4711
|
+
if (!(await fetch(X, { method: "GET", signal: H.signal })).ok) throw new Error("Media not available");
|
|
4712
|
+
C || W((be) => ({ ...be, [X]: !0 }));
|
|
4697
4713
|
} catch {
|
|
4698
|
-
C ||
|
|
4714
|
+
C || W((de) => ({ ...de, [X]: !1 }));
|
|
4699
4715
|
}
|
|
4700
4716
|
}
|
|
4701
4717
|
};
|
|
4702
|
-
return
|
|
4703
|
-
C = !0,
|
|
4718
|
+
return W({}), Ue.filter((X) => !ft(X)).map((X) => X?.mediaUrl || X).filter((X) => typeof X == "string" && X.length > 0).forEach((X) => ie(X)), () => {
|
|
4719
|
+
C = !0, H.abort();
|
|
4704
4720
|
};
|
|
4705
|
-
}, [
|
|
4706
|
-
|
|
4721
|
+
}, [Ue]), /* @__PURE__ */ i(
|
|
4722
|
+
_s,
|
|
4707
4723
|
{
|
|
4708
4724
|
open: e,
|
|
4709
4725
|
onCancel: t,
|
|
@@ -4722,30 +4738,30 @@ const Yn = {
|
|
|
4722
4738
|
type: "primary",
|
|
4723
4739
|
onClick: async () => {
|
|
4724
4740
|
try {
|
|
4725
|
-
|
|
4741
|
+
k(!0);
|
|
4726
4742
|
const C = {
|
|
4727
|
-
alertUniqueId:
|
|
4728
|
-
alertId:
|
|
4743
|
+
alertUniqueId: v,
|
|
4744
|
+
alertId: B,
|
|
4729
4745
|
status: d ? String(d) : void 0,
|
|
4730
4746
|
notes: c.trim(),
|
|
4731
4747
|
modifiedBy: 0
|
|
4732
|
-
},
|
|
4733
|
-
if (
|
|
4734
|
-
const
|
|
4735
|
-
|
|
4748
|
+
}, H = await j.mutateAsync(C);
|
|
4749
|
+
if (H?.responseStatus) {
|
|
4750
|
+
const ie = H?.data || "Alert updated successfully.";
|
|
4751
|
+
ye.success(ie, {
|
|
4736
4752
|
autoClose: 1500,
|
|
4737
4753
|
onClose: () => {
|
|
4738
4754
|
r(), t();
|
|
4739
4755
|
}
|
|
4740
|
-
}), u(void 0),
|
|
4756
|
+
}), u(void 0), S("");
|
|
4741
4757
|
} else {
|
|
4742
|
-
const
|
|
4743
|
-
|
|
4758
|
+
const ie = H?.errorMessage || "Failed to update alert status";
|
|
4759
|
+
ye.error(ie);
|
|
4744
4760
|
}
|
|
4745
4761
|
} catch (C) {
|
|
4746
|
-
console.error("Error updating alert status:", C),
|
|
4762
|
+
console.error("Error updating alert status:", C), ye.error("Failed to update alert status. Please try again.");
|
|
4747
4763
|
} finally {
|
|
4748
|
-
|
|
4764
|
+
k(!1);
|
|
4749
4765
|
}
|
|
4750
4766
|
},
|
|
4751
4767
|
loading: f,
|
|
@@ -4754,28 +4770,28 @@ const Yn = {
|
|
|
4754
4770
|
)
|
|
4755
4771
|
] }) : null,
|
|
4756
4772
|
children: s && /* @__PURE__ */ i(
|
|
4757
|
-
|
|
4773
|
+
Ct,
|
|
4758
4774
|
{
|
|
4759
4775
|
activeKey: m,
|
|
4760
|
-
onChange: (C) =>
|
|
4776
|
+
onChange: (C) => A(C),
|
|
4761
4777
|
items: [
|
|
4762
4778
|
{
|
|
4763
4779
|
key: "details",
|
|
4764
4780
|
label: "Alert Detail",
|
|
4765
4781
|
children: /* @__PURE__ */ h("div", { className: "grid grid-cols-2 gap-2", children: [
|
|
4766
4782
|
/* @__PURE__ */ h("div", { className: "flex flex-col gap-2", children: [
|
|
4767
|
-
/* @__PURE__ */ i("div", { className: "text-sm font-bold", children:
|
|
4768
|
-
|
|
4783
|
+
/* @__PURE__ */ i("div", { className: "text-sm font-bold", children: O || "Alert Event" }),
|
|
4784
|
+
R?.firstName ? /* @__PURE__ */ h("div", { className: "text-sm text-gray-500", children: [
|
|
4769
4785
|
"Resident ID/Name: ",
|
|
4770
|
-
|
|
4786
|
+
R?.firstName,
|
|
4771
4787
|
" ",
|
|
4772
|
-
|
|
4788
|
+
R?.lastName || "",
|
|
4773
4789
|
" ",
|
|
4774
|
-
|
|
4790
|
+
R?.residentId || ""
|
|
4775
4791
|
] }) : null,
|
|
4776
4792
|
/* @__PURE__ */ h("div", { className: "text-sm text-gray-500", children: [
|
|
4777
4793
|
"Timestamp: ",
|
|
4778
|
-
|
|
4794
|
+
wt(p)
|
|
4779
4795
|
] }),
|
|
4780
4796
|
/* @__PURE__ */ h("div", { className: "font-sm text-gray-500", children: [
|
|
4781
4797
|
/* @__PURE__ */ i("b", { className: "text-black text-sm/6", children: "Description:" }),
|
|
@@ -4786,9 +4802,9 @@ const Yn = {
|
|
|
4786
4802
|
"Space: ",
|
|
4787
4803
|
y
|
|
4788
4804
|
] }),
|
|
4789
|
-
|
|
4805
|
+
b && /* @__PURE__ */ h("div", { className: "font-sm text-gray-500", children: [
|
|
4790
4806
|
"Assigned to: ",
|
|
4791
|
-
|
|
4807
|
+
b
|
|
4792
4808
|
] }),
|
|
4793
4809
|
/* @__PURE__ */ h("div", { className: "flex gap-2 justify-start mt-3", children: [
|
|
4794
4810
|
/* @__PURE__ */ h(
|
|
@@ -4796,12 +4812,12 @@ const Yn = {
|
|
|
4796
4812
|
{
|
|
4797
4813
|
className: "font-sm text-gray-500 rounded-[8px] py-2 px-3",
|
|
4798
4814
|
style: {
|
|
4799
|
-
border: `2px solid ${
|
|
4800
|
-
backgroundColor:
|
|
4815
|
+
border: `2px solid ${Vn[String(g)] || "#DFE4EA"}`,
|
|
4816
|
+
backgroundColor: Jn[String(g)]
|
|
4801
4817
|
},
|
|
4802
4818
|
children: [
|
|
4803
4819
|
"Severity: ",
|
|
4804
|
-
|
|
4820
|
+
g || "N/A"
|
|
4805
4821
|
]
|
|
4806
4822
|
}
|
|
4807
4823
|
),
|
|
@@ -4809,23 +4825,23 @@ const Yn = {
|
|
|
4809
4825
|
tt,
|
|
4810
4826
|
{
|
|
4811
4827
|
className: "font-sm text-gray-500 rounded-[8px] py-2 px-3",
|
|
4812
|
-
style: String(
|
|
4828
|
+
style: String(P || "").toLowerCase() === "completed" ? { background: "#E7F6EC", border: "0.68px solid var(--Green, #34C759)" } : { background: "#E0EDFF", border: "1px solid var(--Grays-Gray-4, #D1D1D6)" },
|
|
4813
4829
|
children: [
|
|
4814
4830
|
"Status: ",
|
|
4815
|
-
|
|
4831
|
+
P || "N/A"
|
|
4816
4832
|
]
|
|
4817
4833
|
}
|
|
4818
4834
|
)
|
|
4819
4835
|
] }),
|
|
4820
4836
|
/* @__PURE__ */ i("div", { className: "w-full flex flex-col justify-start items-start mt-2 font-bold", children: /* @__PURE__ */ h("div", { className: "w-full mt-4", children: [
|
|
4821
4837
|
/* @__PURE__ */ i("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ i(
|
|
4822
|
-
|
|
4838
|
+
ve,
|
|
4823
4839
|
{
|
|
4824
4840
|
placeholder: "Change Status",
|
|
4825
4841
|
className: "w-full text-gray-500",
|
|
4826
4842
|
onChange: (C) => u(C),
|
|
4827
4843
|
value: d,
|
|
4828
|
-
options:
|
|
4844
|
+
options: je,
|
|
4829
4845
|
loading: a
|
|
4830
4846
|
}
|
|
4831
4847
|
) }),
|
|
@@ -4838,7 +4854,7 @@ const Yn = {
|
|
|
4838
4854
|
placeholder: "Enter details...",
|
|
4839
4855
|
className: "w-full text-gray-500 h-20 border border-grey-500 rounded-md p-2",
|
|
4840
4856
|
value: c,
|
|
4841
|
-
onChange: (C) =>
|
|
4857
|
+
onChange: (C) => S(C.target.value)
|
|
4842
4858
|
}
|
|
4843
4859
|
)
|
|
4844
4860
|
] })
|
|
@@ -4847,7 +4863,7 @@ const Yn = {
|
|
|
4847
4863
|
/* @__PURE__ */ i("div", { className: "flex flex-col gap-4", children: /* @__PURE__ */ h("div", { className: "w-full mt-1", children: [
|
|
4848
4864
|
/* @__PURE__ */ h("div", { className: "w-full flex items-center justify-between", children: [
|
|
4849
4865
|
/* @__PURE__ */ i("h3", { className: "text-black font-bold text-sm", children: "Camera Footage" }),
|
|
4850
|
-
|
|
4866
|
+
Ue.length > 1 ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
4851
4867
|
/* @__PURE__ */ i(
|
|
4852
4868
|
"button",
|
|
4853
4869
|
{
|
|
@@ -4855,7 +4871,7 @@ const Yn = {
|
|
|
4855
4871
|
onClick: () => N.current?.prev?.(),
|
|
4856
4872
|
className: "w-6 h-6 flex items-center justify-center rounded-full bg-gray-200 hover:bg-gray-300 text-gray-600",
|
|
4857
4873
|
"aria-label": "Previous media",
|
|
4858
|
-
children: /* @__PURE__ */ i(
|
|
4874
|
+
children: /* @__PURE__ */ i(Ks, { style: { fontSize: 12 } })
|
|
4859
4875
|
}
|
|
4860
4876
|
),
|
|
4861
4877
|
/* @__PURE__ */ i(
|
|
@@ -4865,13 +4881,13 @@ const Yn = {
|
|
|
4865
4881
|
onClick: () => N.current?.next?.(),
|
|
4866
4882
|
className: "w-6 h-6 flex items-center justify-center rounded-full bg-gray-200 hover:bg-gray-300 text-gray-600",
|
|
4867
4883
|
"aria-label": "Next media",
|
|
4868
|
-
children: /* @__PURE__ */ i(
|
|
4884
|
+
children: /* @__PURE__ */ i(Ys, { style: { fontSize: 12 } })
|
|
4869
4885
|
}
|
|
4870
4886
|
)
|
|
4871
4887
|
] }) : null
|
|
4872
4888
|
] }),
|
|
4873
|
-
|
|
4874
|
-
|
|
4889
|
+
Ue.length ? /* @__PURE__ */ i("div", { className: "w-full", children: /* @__PURE__ */ i(qs, { ref: N, dots: !0, className: "w-full", children: Ue.map((C, H) => /* @__PURE__ */ h("div", { className: "flex justify-center items-center", children: [
|
|
4890
|
+
ft(C) ? /* @__PURE__ */ h(
|
|
4875
4891
|
"video",
|
|
4876
4892
|
{
|
|
4877
4893
|
width: "240",
|
|
@@ -4887,29 +4903,29 @@ const Yn = {
|
|
|
4887
4903
|
"img",
|
|
4888
4904
|
{
|
|
4889
4905
|
src: C.mediaUrl || C,
|
|
4890
|
-
alt: C.caption || `media-${
|
|
4906
|
+
alt: C.caption || `media-${H}`,
|
|
4891
4907
|
className: "max-w-full max-h-[90vh] object-contain rounded-lg shadow-lg"
|
|
4892
4908
|
}
|
|
4893
4909
|
),
|
|
4894
4910
|
C.caption && /* @__PURE__ */ i("p", { className: "text-xs text-gray-500 mt-1", children: C.caption }),
|
|
4895
|
-
!
|
|
4911
|
+
!ft(C) && E[String(C.mediaUrl || C)] ? /* @__PURE__ */ i(
|
|
4896
4912
|
"button",
|
|
4897
4913
|
{
|
|
4898
4914
|
onClick: () => {
|
|
4899
|
-
|
|
4915
|
+
V(!0), K(C.mediaUrl || C), I(C.type || "image");
|
|
4900
4916
|
},
|
|
4901
4917
|
className: "absolute bottom-3 right-3 text-white bg-black/50 rounded-full p-2 hover:bg-black/70",
|
|
4902
4918
|
children: /* @__PURE__ */ i(Ts, { size: 20 })
|
|
4903
4919
|
}
|
|
4904
4920
|
) : null
|
|
4905
|
-
] },
|
|
4921
|
+
] }, H)) }) }) : null
|
|
4906
4922
|
] }) }),
|
|
4907
4923
|
/* @__PURE__ */ i(
|
|
4908
|
-
|
|
4924
|
+
Kn,
|
|
4909
4925
|
{
|
|
4910
4926
|
isOpen: J,
|
|
4911
|
-
onClose: () =>
|
|
4912
|
-
src:
|
|
4927
|
+
onClose: () => V(!1),
|
|
4928
|
+
src: Y || "",
|
|
4913
4929
|
type: T || "image"
|
|
4914
4930
|
}
|
|
4915
4931
|
)
|
|
@@ -4919,14 +4935,14 @@ const Yn = {
|
|
|
4919
4935
|
key: "track",
|
|
4920
4936
|
label: "Track Incident",
|
|
4921
4937
|
children: /* @__PURE__ */ i(
|
|
4922
|
-
|
|
4938
|
+
$n,
|
|
4923
4939
|
{
|
|
4924
|
-
alertId:
|
|
4925
|
-
id:
|
|
4926
|
-
priority:
|
|
4940
|
+
alertId: v,
|
|
4941
|
+
id: B,
|
|
4942
|
+
priority: g,
|
|
4927
4943
|
spaceName: y,
|
|
4928
|
-
alertNumber:
|
|
4929
|
-
statusHistory:
|
|
4944
|
+
alertNumber: z,
|
|
4945
|
+
statusHistory: U,
|
|
4930
4946
|
notifGroups: $
|
|
4931
4947
|
}
|
|
4932
4948
|
)
|
|
@@ -4937,8 +4953,8 @@ const Yn = {
|
|
|
4937
4953
|
}
|
|
4938
4954
|
);
|
|
4939
4955
|
};
|
|
4940
|
-
function
|
|
4941
|
-
const { alerts: e } = Te(), t =
|
|
4956
|
+
function Xn() {
|
|
4957
|
+
const { alerts: e } = Te(), t = Mt({
|
|
4942
4958
|
queryKey: ["alerts", "statusList"],
|
|
4943
4959
|
queryFn: () => e.getAlertStatusList(),
|
|
4944
4960
|
staleTime: 5 * 6e4
|
|
@@ -4951,14 +4967,14 @@ function Jn() {
|
|
|
4951
4967
|
};
|
|
4952
4968
|
}
|
|
4953
4969
|
function Rs({ alerts: e, loading: t = !1, columns: s, onRefetch: r }) {
|
|
4954
|
-
const [n, a] = w(!1), [o, l] = w(null), [d, u] = w("details"), { list: c, loading:
|
|
4955
|
-
function f($,
|
|
4956
|
-
l($), u(
|
|
4970
|
+
const [n, a] = w(!1), [o, l] = w(null), [d, u] = w("details"), { list: c, loading: S } = Xn();
|
|
4971
|
+
function f($, F) {
|
|
4972
|
+
l($), u(F?.tab ?? "details"), m(F?.sourceTab ?? "active"), a(!0);
|
|
4957
4973
|
}
|
|
4958
|
-
function
|
|
4974
|
+
function k() {
|
|
4959
4975
|
a(!1);
|
|
4960
4976
|
}
|
|
4961
|
-
const [N, m] = w("active"),
|
|
4977
|
+
const [N, m] = w("active"), A = o ? {
|
|
4962
4978
|
originalData: {
|
|
4963
4979
|
// include the full selected alert so alll modal fieldsare present
|
|
4964
4980
|
...o,
|
|
@@ -4970,10 +4986,10 @@ function Rs({ alerts: e, loading: t = !1, columns: s, onRefetch: r }) {
|
|
|
4970
4986
|
return /* @__PURE__ */ h("div", { className: "p-6 flex flex-col items-start justify-start min-h-screen w-full overflow-auto", children: [
|
|
4971
4987
|
/* @__PURE__ */ h("div", { className: "w-1/2 flex items-center justify-between mb-4", children: [
|
|
4972
4988
|
/* @__PURE__ */ i("h1", { className: "text-xl font-bold text-black", children: "Alert Console" }),
|
|
4973
|
-
/* @__PURE__ */ i(
|
|
4989
|
+
/* @__PURE__ */ i(Sn, { label: "USA", timeZone: "America/New_York" })
|
|
4974
4990
|
] }),
|
|
4975
4991
|
/* @__PURE__ */ i(
|
|
4976
|
-
|
|
4992
|
+
Ct,
|
|
4977
4993
|
{
|
|
4978
4994
|
defaultActiveKey: "active",
|
|
4979
4995
|
className: "w-full",
|
|
@@ -4990,12 +5006,12 @@ function Rs({ alerts: e, loading: t = !1, columns: s, onRefetch: r }) {
|
|
|
4990
5006
|
{
|
|
4991
5007
|
key: "archived",
|
|
4992
5008
|
label: "Archived",
|
|
4993
|
-
children: /* @__PURE__ */ i(
|
|
5009
|
+
children: /* @__PURE__ */ i(bn, { alerts: e, loading: t, columns: s || [], onAlertIdClick: f })
|
|
4994
5010
|
},
|
|
4995
5011
|
{
|
|
4996
5012
|
key: "settings",
|
|
4997
5013
|
label: "Settings",
|
|
4998
|
-
children: /* @__PURE__ */ i(
|
|
5014
|
+
children: /* @__PURE__ */ i(ei, {})
|
|
4999
5015
|
}
|
|
5000
5016
|
// {
|
|
5001
5017
|
// key: "reports",
|
|
@@ -5006,22 +5022,22 @@ function Rs({ alerts: e, loading: t = !1, columns: s, onRefetch: r }) {
|
|
|
5006
5022
|
}
|
|
5007
5023
|
),
|
|
5008
5024
|
/* @__PURE__ */ i(
|
|
5009
|
-
|
|
5025
|
+
Zn,
|
|
5010
5026
|
{
|
|
5011
5027
|
isModalOpen: n,
|
|
5012
|
-
handleModalClose:
|
|
5013
|
-
selectedRow:
|
|
5028
|
+
handleModalClose: k,
|
|
5029
|
+
selectedRow: A,
|
|
5014
5030
|
fetchAlertLogs: () => {
|
|
5015
5031
|
},
|
|
5016
5032
|
alertStatusList: c,
|
|
5017
|
-
alertStatusLoading:
|
|
5033
|
+
alertStatusLoading: S,
|
|
5018
5034
|
initialTab: d,
|
|
5019
5035
|
sourceTab: N
|
|
5020
5036
|
}
|
|
5021
5037
|
)
|
|
5022
5038
|
] });
|
|
5023
5039
|
}
|
|
5024
|
-
function
|
|
5040
|
+
function ei() {
|
|
5025
5041
|
const [e, t] = w([]), [s, r] = w([]), [n, a] = w([]), { rules: o } = Te();
|
|
5026
5042
|
return ce(() => {
|
|
5027
5043
|
let l = !0;
|
|
@@ -5030,19 +5046,19 @@ function Zn() {
|
|
|
5030
5046
|
const d = await o.getRules();
|
|
5031
5047
|
if (!l) return;
|
|
5032
5048
|
a(Array.isArray(d) ? d : []);
|
|
5033
|
-
const u = (d || []).map((c,
|
|
5034
|
-
RuleId: c.ruleId || c.ruleName || String(
|
|
5049
|
+
const u = (d || []).map((c, S) => ({
|
|
5050
|
+
RuleId: c.ruleId || c.ruleName || String(S),
|
|
5035
5051
|
Name: c.ruleName || c.Name || "-",
|
|
5036
5052
|
Description: c.ruleDesc || c.Description || "",
|
|
5037
5053
|
SeverityId: 0
|
|
5038
5054
|
}));
|
|
5039
5055
|
t(u.length ? u : _e.rules);
|
|
5040
5056
|
try {
|
|
5041
|
-
const c = await o.getLookups(),
|
|
5057
|
+
const c = await o.getLookups(), S = Array.isArray(c?.userRoles) ? c.userRoles.map((f) => ({
|
|
5042
5058
|
userRoleId: f.userRoleId ?? f.id,
|
|
5043
5059
|
userRoleName: f.userRoleName ?? f.name
|
|
5044
5060
|
})) : [];
|
|
5045
|
-
r(
|
|
5061
|
+
r(S.length ? S : _e.userRoles);
|
|
5046
5062
|
} catch {
|
|
5047
5063
|
r(_e.userRoles);
|
|
5048
5064
|
}
|
|
@@ -5053,7 +5069,7 @@ function Zn() {
|
|
|
5053
5069
|
l = !1;
|
|
5054
5070
|
};
|
|
5055
5071
|
}, []), /* @__PURE__ */ i(
|
|
5056
|
-
|
|
5072
|
+
Mn,
|
|
5057
5073
|
{
|
|
5058
5074
|
severities: _e.severities,
|
|
5059
5075
|
rules: e,
|
|
@@ -5062,8 +5078,8 @@ function Zn() {
|
|
|
5062
5078
|
}
|
|
5063
5079
|
);
|
|
5064
5080
|
}
|
|
5065
|
-
function
|
|
5066
|
-
const { alerts: e } = Te(), t =
|
|
5081
|
+
function ti() {
|
|
5082
|
+
const { alerts: e } = Te(), t = Mt({
|
|
5067
5083
|
queryKey: ["alerts", "list"],
|
|
5068
5084
|
queryFn: () => e.listAlerts(),
|
|
5069
5085
|
staleTime: 3e4
|
|
@@ -5075,11 +5091,11 @@ function Xn() {
|
|
|
5075
5091
|
refetch: t.refetch
|
|
5076
5092
|
};
|
|
5077
5093
|
}
|
|
5078
|
-
function
|
|
5079
|
-
const { alerts: t, loading: s, refetch: r } =
|
|
5094
|
+
function si(e) {
|
|
5095
|
+
const { alerts: t, loading: s, refetch: r } = ti();
|
|
5080
5096
|
return /* @__PURE__ */ i(Rs, { alerts: t, loading: s, columns: e.columns, onRefetch: r });
|
|
5081
5097
|
}
|
|
5082
|
-
function
|
|
5098
|
+
function hi({
|
|
5083
5099
|
tenant: e,
|
|
5084
5100
|
apiDomain: t,
|
|
5085
5101
|
rulesDomain: s,
|
|
@@ -5088,7 +5104,7 @@ function ui({
|
|
|
5088
5104
|
loading: a,
|
|
5089
5105
|
columns: o
|
|
5090
5106
|
}) {
|
|
5091
|
-
const [l] = w(() => new
|
|
5107
|
+
const [l] = w(() => new Xr()), d = ue(
|
|
5092
5108
|
() => ({
|
|
5093
5109
|
alertsBaseUrl: t,
|
|
5094
5110
|
rulesBaseUrl: s || t,
|
|
@@ -5096,10 +5112,10 @@ function ui({
|
|
|
5096
5112
|
}),
|
|
5097
5113
|
[t, s, r]
|
|
5098
5114
|
);
|
|
5099
|
-
return /* @__PURE__ */ i(
|
|
5115
|
+
return /* @__PURE__ */ i(en, { client: l, children: /* @__PURE__ */ i(yr, { tenant: e, override: d, children: Array.isArray(n) ? /* @__PURE__ */ i(Rs, { alerts: n, loading: !!a, columns: o }) : /* @__PURE__ */ i(si, { columns: o }) }) });
|
|
5100
5116
|
}
|
|
5101
|
-
function
|
|
5102
|
-
const { alerts: t } = Te(), s =
|
|
5117
|
+
function fi(e) {
|
|
5118
|
+
const { alerts: t } = Te(), s = Mt({
|
|
5103
5119
|
queryKey: ["alerts", "report", e],
|
|
5104
5120
|
queryFn: () => t.getAlertsReport(e),
|
|
5105
5121
|
staleTime: 6e4
|
|
@@ -5111,7 +5127,7 @@ function di(e) {
|
|
|
5111
5127
|
refetch: s.refetch
|
|
5112
5128
|
};
|
|
5113
5129
|
}
|
|
5114
|
-
const
|
|
5130
|
+
const mi = [
|
|
5115
5131
|
{ title: "ID", dataIndex: "id", key: "id", width: 120 },
|
|
5116
5132
|
{ title: "Priority", dataIndex: "priority", key: "priority", width: 120 },
|
|
5117
5133
|
{ title: "Timestamp", dataIndex: "timestamp", key: "timestamp", width: 220 },
|
|
@@ -5119,21 +5135,21 @@ const hi = [
|
|
|
5119
5135
|
{ title: "Description", dataIndex: "description", key: "description" }
|
|
5120
5136
|
];
|
|
5121
5137
|
export {
|
|
5122
|
-
|
|
5138
|
+
En as AlertAssignment,
|
|
5123
5139
|
Rs as AlertConsole,
|
|
5124
|
-
|
|
5140
|
+
hi as AlertConsoleWidget,
|
|
5125
5141
|
ms as AlertsTable,
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5142
|
+
yr as ApiProvider,
|
|
5143
|
+
bn as ArchivedTable,
|
|
5144
|
+
Sn as Clock,
|
|
5145
|
+
kr as DataTable,
|
|
5146
|
+
Pn as MyPreferencesPanel,
|
|
5147
|
+
On as SettingsPanel,
|
|
5148
|
+
Mn as SettingsTabs,
|
|
5149
|
+
mi as exampleAlertColumns,
|
|
5150
|
+
Xn as useAlertStatusList,
|
|
5151
|
+
ti as useAlerts,
|
|
5152
|
+
fi as useAlertsReport,
|
|
5137
5153
|
Te as useApi,
|
|
5138
5154
|
xs as useUpdateAlertStatus
|
|
5139
5155
|
};
|