@ssgc/alert-console 2.2.2 → 2.2.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.es.js CHANGED
@@ -1,29 +1,29 @@
1
- import { jsx as i, jsxs as d, Fragment as ws } from "react/jsx-runtime";
1
+ import { jsx as i, jsxs as u, Fragment as xs } from "react/jsx-runtime";
2
2
  import * as ce from "react";
3
- import { useMemo as ue, createContext as xs, useContext as Cs, useState as I, useEffect as he, useRef as Is } from "react";
4
- import { Select as me, Table as yt, Row as ye, Col as H, Input as Ts, Tag as Ve, Space as Se, Tooltip as Rs, Button as pe, Progress as ks, Dropdown as Os, Typography as _e, Spin as gt, Checkbox as je, Divider as Qe, TimePicker as Dt, Tabs as vt, Card as it, Steps as Ps, Modal as Es, Carousel as Ds } from "antd";
5
- import { MessageOutlined as Fs, MailOutlined as Ms, MoreOutlined as Us, EditOutlined as Ls, LeftOutlined as $s, RightOutlined as Bs } from "@ant-design/icons";
3
+ import { useMemo as ue, createContext as Is, useContext as Cs, useState as C, useEffect as he, useRef as Ts } from "react";
4
+ import { Select as me, Table as yt, Row as ye, Col as H, Input as Rs, Tag as Ve, Space as Se, Tooltip as ks, Button as pe, Progress as Os, Dropdown as Ps, Typography as _e, Spin as gt, Checkbox as je, Divider as Qe, TimePicker as Dt, Tabs as vt, Card as it, Steps as Es, Modal as Ds, Carousel as Fs } from "antd";
5
+ import { MessageOutlined as Ms, MailOutlined as Us, MoreOutlined as Ls, EditOutlined as $s, LeftOutlined as Bs, RightOutlined as js } from "@ant-design/icons";
6
6
  import { toast as ne } from "react-toastify";
7
- const js = "#FF3B30", Qs = "#FF9500", qs = "#FFCC00", _s = "#34C759", He = {
8
- critical: js,
9
- high: Qs,
10
- medium: qs,
11
- low: _s
7
+ const Qs = "#FF3B30", qs = "#FF9500", _s = "#FFCC00", Hs = "#34C759", He = {
8
+ critical: Qs,
9
+ high: qs,
10
+ medium: _s,
11
+ low: Hs
12
12
  }, Ft = {
13
13
  Critical: He.critical,
14
14
  High: He.high,
15
15
  Medium: He.medium,
16
16
  Low: He.low
17
17
  };
18
- function Hs(e) {
18
+ function Gs(e) {
19
19
  return Ft[e] || Ft.Low;
20
20
  }
21
21
  function Mt(e) {
22
22
  if (!e || typeof e != "string") return 0;
23
23
  const t = e.trim().split(":");
24
24
  if (t.length !== 3) return 0;
25
- const [s, r, n] = t, a = Number.parseInt(s, 10), o = Number.parseInt(r, 10), l = Number.parseFloat(n || "0"), h = Number.isFinite(a) ? a : 0, u = Number.isFinite(o) ? o : 0, c = Number.isFinite(l) ? l : 0;
26
- return h * 3600 + u * 60 + c;
25
+ const [s, r, n] = t, a = Number.parseInt(s, 10), o = Number.parseInt(r, 10), l = Number.parseFloat(n || "0"), h = Number.isFinite(a) ? a : 0, d = Number.isFinite(o) ? o : 0, c = Number.isFinite(l) ? l : 0;
26
+ return h * 3600 + d * 60 + c;
27
27
  }
28
28
  function at(e) {
29
29
  const t = e.thirdPartyIds ?? e.ThirdPartyIds ?? e.thirdPartyId ?? e.ThirdPartyId ?? "", s = Array.isArray(t) ? t.join(",") : String(t ?? "");
@@ -33,13 +33,13 @@ function at(e) {
33
33
  n.has(o) || (n.add(o), a.push(o));
34
34
  }), a;
35
35
  }
36
- const ss = "", Gs = ss, Ws = "", Ks = "", Ut = {
36
+ const ss = "", Ws = ss, Ys = "", Ks = "", Ut = {
37
37
  snl: {
38
38
  alerts: ss,
39
- rules: Gs
39
+ rules: Ws
40
40
  },
41
41
  schools: {
42
- alerts: Ws,
42
+ alerts: Ys,
43
43
  rules: Ks
44
44
  }
45
45
  };
@@ -47,7 +47,7 @@ function ve(e, t) {
47
47
  const s = (e || "").replace(/\/+$/, ""), r = t.startsWith("/") ? t : `/${t}`;
48
48
  return `${s}${r}`;
49
49
  }
50
- function Ys() {
50
+ function zs() {
51
51
  try {
52
52
  const e = localStorage.getItem("authToken");
53
53
  return e ? { Authorization: `Bearer ${e}` } : {};
@@ -65,7 +65,7 @@ function Ge(e, t) {
65
65
  async function be(e, t) {
66
66
  const s = {
67
67
  ...t.headers,
68
- ...Ys()
68
+ ...zs()
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 be(e, t) {
84
84
  }
85
85
  return a;
86
86
  }
87
- function zs(e) {
87
+ function Vs(e) {
88
88
  const t = {
89
89
  "Content-Type": "application/json",
90
90
  ...e.headers || {}
@@ -194,7 +194,7 @@ function Lt(e, t) {
194
194
  const s = (e || "").replace(/\/+$/, ""), r = t.startsWith("/") ? t : `/${t}`;
195
195
  return `${s}${r}`;
196
196
  }
197
- function Vs() {
197
+ function Js() {
198
198
  try {
199
199
  const e = localStorage.getItem("authToken");
200
200
  return e ? { Authorization: `Bearer ${e}` } : {};
@@ -205,7 +205,7 @@ function Vs() {
205
205
  async function We(e, t) {
206
206
  const s = {
207
207
  ...t.headers,
208
- ...Vs()
208
+ ...Js()
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 We(e, t) {
224
224
  }
225
225
  return a;
226
226
  }
227
- function Js(e) {
227
+ function Xs(e) {
228
228
  const t = {
229
229
  "Content-Type": "application/json",
230
230
  ...e.headers || {}
@@ -254,69 +254,69 @@ function Js(e) {
254
254
  }
255
255
  };
256
256
  }
257
- function Xs(e) {
257
+ function Zs(e) {
258
258
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
259
259
  }
260
- var ze = { exports: {} }, Zs = ze.exports, $t;
261
- function er() {
260
+ var ze = { exports: {} }, er = ze.exports, $t;
261
+ function tr() {
262
262
  return $t || ($t = 1, (function(e, t) {
263
263
  (function(s, r) {
264
264
  e.exports = r();
265
- })(Zs, (function() {
266
- var s = 1e3, r = 6e4, n = 36e5, a = "millisecond", o = "second", l = "minute", h = "hour", u = "day", c = "week", N = "month", f = "quarter", O = "year", w = "date", p = "Invalid Date", S = /^(\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, L = { 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(k) {
267
- var g = ["th", "st", "nd", "rd"], m = k % 100;
268
- return "[" + k + (g[(m - 20) % 10] || g[m] || g[0]) + "]";
269
- } }, B = function(k, g, m) {
270
- var A = String(k);
271
- return !A || A.length >= g ? k : "" + Array(g + 1 - A.length).join(m) + k;
272
- }, U = { s: B, z: function(k) {
273
- var g = -k.utcOffset(), m = Math.abs(g), A = Math.floor(m / 60), y = m % 60;
265
+ })(er, (function() {
266
+ var s = 1e3, r = 6e4, n = 36e5, a = "millisecond", o = "second", l = "minute", h = "hour", d = "day", c = "week", N = "month", f = "quarter", R = "year", w = "date", p = "Invalid Date", S = /^(\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, L = { 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 g = ["th", "st", "nd", "rd"], m = O % 100;
268
+ return "[" + O + (g[(m - 20) % 10] || g[m] || g[0]) + "]";
269
+ } }, B = function(O, g, m) {
270
+ var A = String(O);
271
+ return !A || A.length >= g ? O : "" + Array(g + 1 - A.length).join(m) + O;
272
+ }, U = { s: B, z: function(O) {
273
+ var g = -O.utcOffset(), m = Math.abs(g), A = Math.floor(m / 60), y = m % 60;
274
274
  return (g <= 0 ? "+" : "-") + B(A, 2, "0") + ":" + B(y, 2, "0");
275
- }, m: function k(g, m) {
276
- if (g.date() < m.date()) return -k(m, g);
275
+ }, m: function O(g, m) {
276
+ if (g.date() < m.date()) return -O(m, g);
277
277
  var A = 12 * (m.year() - g.year()) + (m.month() - g.month()), y = g.clone().add(A, N), v = m - y < 0, b = g.clone().add(A + (v ? -1 : 1), N);
278
278
  return +(-(A + (m - y) / (v ? y - b : b - y)) || 0);
279
- }, a: function(k) {
280
- return k < 0 ? Math.ceil(k) || 0 : Math.floor(k);
281
- }, p: function(k) {
282
- return { M: N, y: O, w: c, d: u, D: w, h, m: l, s: o, ms: a, Q: f }[k] || String(k || "").toLowerCase().replace(/s$/, "");
283
- }, u: function(k) {
284
- return k === void 0;
285
- } }, Y = "en", J = {};
286
- J[Y] = L;
287
- var G = "$isDayjsObject", W = function(k) {
288
- return k instanceof se || !(!k || !k[G]);
289
- }, T = function k(g, m, A) {
279
+ }, a: function(O) {
280
+ return O < 0 ? Math.ceil(O) || 0 : Math.floor(O);
281
+ }, p: function(O) {
282
+ return { M: N, y: R, w: c, d, D: w, h, m: l, s: o, ms: a, Q: f }[O] || String(O || "").toLowerCase().replace(/s$/, "");
283
+ }, u: function(O) {
284
+ return O === void 0;
285
+ } }, K = "en", J = {};
286
+ J[K] = L;
287
+ var Y = "$isDayjsObject", G = function(O) {
288
+ return O instanceof te || !(!O || !O[Y]);
289
+ }, T = function O(g, m, A) {
290
290
  var y;
291
- if (!g) return Y;
291
+ if (!g) return K;
292
292
  if (typeof g == "string") {
293
293
  var v = g.toLowerCase();
294
294
  J[v] && (y = v), m && (J[v] = m, y = v);
295
295
  var b = g.split("-");
296
- if (!y && b.length > 1) return k(b[0]);
296
+ if (!y && b.length > 1) return O(b[0]);
297
297
  } else {
298
298
  var P = g.name;
299
299
  J[P] = g, y = P;
300
300
  }
301
- return !A && y && (Y = y), y || !A && Y;
302
- }, x = function(k, g) {
303
- if (W(k)) return k.clone();
301
+ return !A && y && (K = y), y || !A && K;
302
+ }, I = function(O, g) {
303
+ if (G(O)) return O.clone();
304
304
  var m = typeof g == "object" ? g : {};
305
- return m.date = k, m.args = arguments, new se(m);
306
- }, R = U;
307
- R.l = T, R.i = W, R.w = function(k, g) {
308
- return x(k, { locale: g.$L, utc: g.$u, x: g.$x, $offset: g.$offset });
305
+ return m.date = O, m.args = arguments, new te(m);
306
+ }, k = U;
307
+ k.l = T, k.i = G, k.w = function(O, g) {
308
+ return I(O, { locale: g.$L, utc: g.$u, x: g.$x, $offset: g.$offset });
309
309
  };
310
- var se = (function() {
311
- function k(m) {
312
- this.$L = T(m.locale, null, !0), this.parse(m), this.$x = this.$x || m.x || {}, this[G] = !0;
310
+ var te = (function() {
311
+ function O(m) {
312
+ this.$L = T(m.locale, null, !0), this.parse(m), this.$x = this.$x || m.x || {}, this[Y] = !0;
313
313
  }
314
- var g = k.prototype;
314
+ var g = O.prototype;
315
315
  return g.parse = function(m) {
316
316
  this.$d = (function(A) {
317
317
  var y = A.date, v = A.utc;
318
318
  if (y === null) return /* @__PURE__ */ new Date(NaN);
319
- if (R.u(y)) return /* @__PURE__ */ new Date();
319
+ if (k.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
322
  var b = y.match(S);
@@ -331,38 +331,38 @@ function er() {
331
331
  var m = this.$d;
332
332
  this.$y = m.getFullYear(), this.$M = m.getMonth(), this.$D = m.getDate(), this.$W = m.getDay(), this.$H = m.getHours(), this.$m = m.getMinutes(), this.$s = m.getSeconds(), this.$ms = m.getMilliseconds();
333
333
  }, g.$utils = function() {
334
- return R;
334
+ return k;
335
335
  }, g.isValid = function() {
336
336
  return this.$d.toString() !== p;
337
337
  }, g.isSame = function(m, A) {
338
- var y = x(m);
338
+ var y = I(m);
339
339
  return this.startOf(A) <= y && y <= this.endOf(A);
340
340
  }, g.isAfter = function(m, A) {
341
- return x(m) < this.startOf(A);
341
+ return I(m) < this.startOf(A);
342
342
  }, g.isBefore = function(m, A) {
343
- return this.endOf(A) < x(m);
343
+ return this.endOf(A) < I(m);
344
344
  }, g.$g = function(m, A, y) {
345
- return R.u(m) ? this[A] : this.set(y, m);
345
+ return k.u(m) ? this[A] : this.set(y, m);
346
346
  }, g.unix = function() {
347
347
  return Math.floor(this.valueOf() / 1e3);
348
348
  }, g.valueOf = function() {
349
349
  return this.$d.getTime();
350
350
  }, g.startOf = function(m, A) {
351
- var y = this, v = !!R.u(A) || A, b = R.p(m), P = function(le, re) {
352
- var C = R.w(y.$u ? Date.UTC(y.$y, re, le) : new Date(y.$y, re, le), y);
353
- return v ? C : C.endOf(u);
351
+ var y = this, v = !!k.u(A) || A, b = k.p(m), P = function(le, re) {
352
+ var x = k.w(y.$u ? Date.UTC(y.$y, re, le) : new Date(y.$y, re, le), y);
353
+ return v ? x : x.endOf(d);
354
354
  }, M = function(le, re) {
355
- return R.w(y.toDate()[le].apply(y.toDate("s"), (v ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(re)), y);
355
+ return k.w(y.toDate()[le].apply(y.toDate("s"), (v ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(re)), y);
356
356
  }, D = this.$W, j = this.$M, Q = this.$D, z = "set" + (this.$u ? "UTC" : "");
357
357
  switch (b) {
358
- case O:
358
+ case R:
359
359
  return v ? P(1, 0) : P(31, 11);
360
360
  case N:
361
361
  return v ? P(1, j) : P(0, j + 1);
362
362
  case c:
363
363
  var ie = this.$locale().weekStart || 0, fe = (D < ie ? D + 7 : D) - ie;
364
364
  return P(v ? Q - fe : Q + (6 - fe), j);
365
- case u:
365
+ case d:
366
366
  case w:
367
367
  return M(z + "Hours", 0);
368
368
  case h:
@@ -377,8 +377,8 @@ function er() {
377
377
  }, g.endOf = function(m) {
378
378
  return this.startOf(m, !1);
379
379
  }, g.$set = function(m, A) {
380
- var y, v = R.p(m), b = "set" + (this.$u ? "UTC" : ""), P = (y = {}, y[u] = b + "Date", y[w] = b + "Date", y[N] = b + "Month", y[O] = b + "FullYear", y[h] = b + "Hours", y[l] = b + "Minutes", y[o] = b + "Seconds", y[a] = b + "Milliseconds", y)[v], M = v === u ? this.$D + (A - this.$W) : A;
381
- if (v === N || v === O) {
380
+ var y, v = k.p(m), b = "set" + (this.$u ? "UTC" : ""), P = (y = {}, y[d] = b + "Date", y[w] = b + "Date", y[N] = b + "Month", y[R] = b + "FullYear", y[h] = b + "Hours", y[l] = b + "Minutes", y[o] = b + "Seconds", y[a] = b + "Milliseconds", y)[v], M = v === d ? this.$D + (A - this.$W) : A;
381
+ if (v === N || v === R) {
382
382
  var D = this.clone().set(w, 1);
383
383
  D.$d[P](M), D.init(), this.$d = D.set(w, Math.min(this.$D, D.daysInMonth())).$d;
384
384
  } else P && this.$d[P](M);
@@ -386,44 +386,44 @@ function er() {
386
386
  }, g.set = function(m, A) {
387
387
  return this.clone().$set(m, A);
388
388
  }, g.get = function(m) {
389
- return this[R.p(m)]();
389
+ return this[k.p(m)]();
390
390
  }, g.add = function(m, A) {
391
391
  var y, v = this;
392
392
  m = Number(m);
393
- var b = R.p(A), P = function(j) {
394
- var Q = x(v);
395
- return R.w(Q.date(Q.date() + Math.round(j * m)), v);
393
+ var b = k.p(A), P = function(j) {
394
+ var Q = I(v);
395
+ return k.w(Q.date(Q.date() + Math.round(j * m)), v);
396
396
  };
397
397
  if (b === N) return this.set(N, this.$M + m);
398
- if (b === O) return this.set(O, this.$y + m);
399
- if (b === u) return P(1);
398
+ if (b === R) return this.set(R, this.$y + m);
399
+ if (b === d) return P(1);
400
400
  if (b === c) return P(7);
401
401
  var M = (y = {}, y[l] = r, y[h] = n, y[o] = s, y)[b] || 1, D = this.$d.getTime() + m * M;
402
- return R.w(D, this);
402
+ return k.w(D, this);
403
403
  }, g.subtract = function(m, A) {
404
404
  return this.add(-1 * m, A);
405
405
  }, g.format = function(m) {
406
406
  var A = this, y = this.$locale();
407
407
  if (!this.isValid()) return y.invalidDate || p;
408
- var v = m || "YYYY-MM-DDTHH:mm:ssZ", b = R.z(this), P = this.$H, M = this.$m, D = this.$M, j = y.weekdays, Q = y.months, z = y.meridiem, ie = function(re, C, _, V) {
409
- return re && (re[C] || re(A, v)) || _[C].slice(0, V);
408
+ var v = m || "YYYY-MM-DDTHH:mm:ssZ", b = k.z(this), P = this.$H, M = this.$m, D = this.$M, j = y.weekdays, Q = y.months, z = y.meridiem, ie = function(re, x, _, V) {
409
+ return re && (re[x] || re(A, v)) || _[x].slice(0, V);
410
410
  }, fe = function(re) {
411
- return R.s(P % 12 || 12, re, "0");
412
- }, le = z || function(re, C, _) {
411
+ return k.s(P % 12 || 12, re, "0");
412
+ }, le = z || function(re, x, _) {
413
413
  var V = re < 12 ? "AM" : "PM";
414
414
  return _ ? V.toLowerCase() : V;
415
415
  };
416
- return v.replace($, (function(re, C) {
417
- return C || (function(_) {
416
+ return v.replace($, (function(re, x) {
417
+ return x || (function(_) {
418
418
  switch (_) {
419
419
  case "YY":
420
420
  return String(A.$y).slice(-2);
421
421
  case "YYYY":
422
- return R.s(A.$y, 4, "0");
422
+ return k.s(A.$y, 4, "0");
423
423
  case "M":
424
424
  return D + 1;
425
425
  case "MM":
426
- return R.s(D + 1, 2, "0");
426
+ return k.s(D + 1, 2, "0");
427
427
  case "MMM":
428
428
  return ie(y.monthsShort, D, Q, 3);
429
429
  case "MMMM":
@@ -431,7 +431,7 @@ function er() {
431
431
  case "D":
432
432
  return A.$D;
433
433
  case "DD":
434
- return R.s(A.$D, 2, "0");
434
+ return k.s(A.$D, 2, "0");
435
435
  case "d":
436
436
  return String(A.$W);
437
437
  case "dd":
@@ -443,7 +443,7 @@ function er() {
443
443
  case "H":
444
444
  return String(P);
445
445
  case "HH":
446
- return R.s(P, 2, "0");
446
+ return k.s(P, 2, "0");
447
447
  case "h":
448
448
  return fe(1);
449
449
  case "hh":
@@ -455,13 +455,13 @@ function er() {
455
455
  case "m":
456
456
  return String(M);
457
457
  case "mm":
458
- return R.s(M, 2, "0");
458
+ return k.s(M, 2, "0");
459
459
  case "s":
460
460
  return String(A.$s);
461
461
  case "ss":
462
- return R.s(A.$s, 2, "0");
462
+ return k.s(A.$s, 2, "0");
463
463
  case "SSS":
464
- return R.s(A.$ms, 3, "0");
464
+ return k.s(A.$ms, 3, "0");
465
465
  case "Z":
466
466
  return b;
467
467
  }
@@ -471,11 +471,11 @@ function er() {
471
471
  }, g.utcOffset = function() {
472
472
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
473
473
  }, g.diff = function(m, A, y) {
474
- var v, b = this, P = R.p(A), M = x(m), D = (M.utcOffset() - this.utcOffset()) * r, j = this - M, Q = function() {
475
- return R.m(b, M);
474
+ var v, b = this, P = k.p(A), M = I(m), D = (M.utcOffset() - this.utcOffset()) * r, j = this - M, Q = function() {
475
+ return k.m(b, M);
476
476
  };
477
477
  switch (P) {
478
- case O:
478
+ case R:
479
479
  v = Q() / 12;
480
480
  break;
481
481
  case N:
@@ -487,7 +487,7 @@ function er() {
487
487
  case c:
488
488
  v = (j - D) / 6048e5;
489
489
  break;
490
- case u:
490
+ case d:
491
491
  v = (j - D) / 864e5;
492
492
  break;
493
493
  case h:
@@ -502,7 +502,7 @@ function er() {
502
502
  default:
503
503
  v = j;
504
504
  }
505
- return y ? v : R.a(v);
505
+ return y ? v : k.a(v);
506
506
  }, g.daysInMonth = function() {
507
507
  return this.endOf(N).$D;
508
508
  }, g.$locale = function() {
@@ -512,7 +512,7 @@ function er() {
512
512
  var y = this.clone(), v = T(m, A, !0);
513
513
  return v && (y.$L = v), y;
514
514
  }, g.clone = function() {
515
- return R.w(this.$d, this);
515
+ return k.w(this.$d, this);
516
516
  }, g.toDate = function() {
517
517
  return new Date(this.valueOf());
518
518
  }, g.toJSON = function() {
@@ -521,35 +521,35 @@ function er() {
521
521
  return this.$d.toISOString();
522
522
  }, g.toString = function() {
523
523
  return this.$d.toUTCString();
524
- }, k;
525
- })(), te = se.prototype;
526
- return x.prototype = te, [["$ms", a], ["$s", o], ["$m", l], ["$H", h], ["$W", u], ["$M", N], ["$y", O], ["$D", w]].forEach((function(k) {
527
- te[k[1]] = function(g) {
528
- return this.$g(g, k[0], k[1]);
524
+ }, O;
525
+ })(), Z = te.prototype;
526
+ return I.prototype = Z, [["$ms", a], ["$s", o], ["$m", l], ["$H", h], ["$W", d], ["$M", N], ["$y", R], ["$D", w]].forEach((function(O) {
527
+ Z[O[1]] = function(g) {
528
+ return this.$g(g, O[0], O[1]);
529
529
  };
530
- })), x.extend = function(k, g) {
531
- return k.$i || (k(g, se, x), k.$i = !0), x;
532
- }, x.locale = T, x.isDayjs = W, x.unix = function(k) {
533
- return x(1e3 * k);
534
- }, x.en = J[Y], x.Ls = J, x.p = {}, x;
530
+ })), I.extend = function(O, g) {
531
+ return O.$i || (O(g, te, I), O.$i = !0), I;
532
+ }, I.locale = T, I.isDayjs = G, I.unix = function(O) {
533
+ return I(1e3 * O);
534
+ }, I.en = J[K], I.Ls = J, I.p = {}, I;
535
535
  }));
536
536
  })(ze)), ze.exports;
537
537
  }
538
- var tr = er();
539
- const sr = /* @__PURE__ */ Xs(tr);
540
- function rs(e) {
538
+ var sr = tr();
539
+ const rs = /* @__PURE__ */ Zs(sr);
540
+ function ns(e) {
541
541
  if (!e) return "By Severity";
542
542
  const t = e.trim().toLowerCase();
543
543
  return t.includes("created") ? "By Created Date" : t.includes("updated") || t.includes("modified") ? "By Updated Date" : "By Severity";
544
544
  }
545
- function ns(e) {
545
+ function is(e) {
546
546
  if (!e || typeof e != "string") return { hours: 0, minutes: 0, seconds: 0 };
547
547
  const t = e.split(":").map((a) => parseInt(a, 10)), s = Number.isFinite(t[0]) ? t[0] : 0, r = Number.isFinite(t[1]) ? t[1] : 0, n = Number.isFinite(t[2]) ? t[2] : 0;
548
548
  return { hours: s, minutes: r, seconds: n };
549
549
  }
550
550
  function Bt(e) {
551
- const { hours: t, minutes: s, seconds: r } = ns(e);
552
- return sr().hour(t).minute(s).second(r).millisecond(0);
551
+ const { hours: t, minutes: s, seconds: r } = is(e);
552
+ return rs().hour(t).minute(s).second(r).millisecond(0);
553
553
  }
554
554
  function xe(e, t) {
555
555
  const s = (e || "").replace(/\/+$/, ""), r = t.startsWith("/") ? t : `/${t}`;
@@ -570,7 +570,7 @@ function jt(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 Ce(e, t) {
573
+ async function Ie(e, t) {
574
574
  const s = {
575
575
  ...t.headers,
576
576
  ...rr()
@@ -623,21 +623,21 @@ function ir(e) {
623
623
  };
624
624
  return {
625
625
  async listAlerts() {
626
- const s = xe(e.baseUrl, "/api/detectionpolicy/alerts?customerId=99e5c8b5-b9d4-4d35-8885-7f121c532664"), r = await Ce(s, {
626
+ const s = xe(e.baseUrl, "/api/detectionpolicy/alerts?customerId=99e5c8b5-b9d4-4d35-8885-7f121c532664"), r = await Ie(s, {
627
627
  method: "GET",
628
628
  headers: t
629
629
  });
630
630
  return Array.isArray(r?.Items) ? (r?.Items).map(nr) : [];
631
631
  },
632
632
  async getAlertStatusList() {
633
- const s = xe(e.baseUrl, "/api/detectionpolicy/alerts/StatusList"), r = await Ce(s, {
633
+ const s = xe(e.baseUrl, "/api/detectionpolicy/alerts/StatusList"), r = await Ie(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 = xe(e.baseUrl, "/api/detectionpolicy/alerts/GetAlertsReport"), n = jt(r, s), a = await Ce(n, {
640
+ const r = xe(e.baseUrl, "/api/detectionpolicy/alerts/GetAlertsReport"), n = jt(r, s), a = await Ie(n, {
641
641
  method: "GET",
642
642
  headers: t
643
643
  });
@@ -649,14 +649,14 @@ function ir(e) {
649
649
  Status: s.status ?? s.Status ?? "",
650
650
  Notes: s.notes ?? s.Notes ?? ""
651
651
  };
652
- return Ce(r, {
652
+ return Ie(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 = xe(e.baseUrl, "/api/detectionpolicy/alerts/GetAdminSettings"), r = await Ce(s, {
659
+ const s = xe(e.baseUrl, "/api/detectionpolicy/alerts/GetAdminSettings"), r = await Ie(s, {
660
660
  method: "GET",
661
661
  headers: t
662
662
  });
@@ -672,14 +672,14 @@ function ir(e) {
672
672
  isAdminSetting: !0,
673
673
  sortBy: s?.sortBy ?? ""
674
674
  };
675
- return Ce(r, {
675
+ return Ie(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 = xe(e.baseUrl, "/api/detectionpolicy/alerts/GetPreferenceSettings"), r = await Ce(s, {
682
+ const s = xe(e.baseUrl, "/api/detectionpolicy/alerts/GetPreferenceSettings"), r = await Ie(s, {
683
683
  method: "GET",
684
684
  headers: t
685
685
  });
@@ -690,13 +690,13 @@ function ir(e) {
690
690
  return null;
691
691
  },
692
692
  async setPreferenceSettings(s) {
693
- const r = xe(e.baseUrl, "/api/detectionpolicy/alerts/SetPreferenceSettings"), n = (u) => {
694
- const { hours: c, minutes: N, seconds: f } = ns(u);
693
+ const r = xe(e.baseUrl, "/api/detectionpolicy/alerts/SetPreferenceSettings"), n = (d) => {
694
+ const { hours: c, minutes: N, seconds: f } = is(d);
695
695
  return (c * 3600 + N * 60 + f) * 1e7;
696
696
  }, a = {
697
697
  Settings: {
698
698
  UserId: 0,
699
- AnomalyIds: Array.isArray(s?.anomalyIds) ? s.anomalyIds.map((u) => String(u)) : [],
699
+ AnomalyIds: Array.isArray(s?.anomalyIds) ? s.anomalyIds.map((d) => String(d)) : [],
700
700
  DoNotDisturbStart: { Ticks: n(s?.doNotDisturbStart) },
701
701
  DoNotDisturbEnd: { Ticks: n(s?.doNotDisturbEnd) },
702
702
  InApp: !!s?.inApp,
@@ -704,7 +704,7 @@ function ir(e) {
704
704
  Email: !!s?.email,
705
705
  SortBy: s?.sortBy ?? ""
706
706
  }
707
- }, o = await Ce(r, {
707
+ }, o = await Ie(r, {
708
708
  method: "POST",
709
709
  headers: t,
710
710
  body: JSON.stringify(a)
@@ -717,7 +717,7 @@ function ir(e) {
717
717
  };
718
718
  },
719
719
  async getAlertNotifications(s) {
720
- const r = xe(e.baseUrl, "/api/detectionpolicy/alerts/GetNotifications"), n = jt(r, { alertId: s }), a = await Ce(n, {
720
+ const r = xe(e.baseUrl, "/api/detectionpolicy/alerts/GetNotifications"), n = jt(r, { alertId: s }), a = await Ie(n, {
721
721
  method: "GET",
722
722
  headers: t
723
723
  });
@@ -784,14 +784,14 @@ function or(e) {
784
784
  o,
785
785
  l,
786
786
  h,
787
- u
788
- ] = await Promise.allSettled(n), c = (U) => U.status === "fulfilled" && Array.isArray(U.value) ? U.value : [], N = c(a), f = c(o), O = c(l), w = c(h), p = c(u), S = N.map((U) => ({
787
+ d
788
+ ] = await Promise.allSettled(n), c = (U) => U.status === "fulfilled" && Array.isArray(U.value) ? U.value : [], N = c(a), f = c(o), R = c(l), w = c(h), p = c(d), S = N.map((U) => ({
789
789
  actionTypeId: Number(U?.ActionTypeId),
790
790
  name: U?.DisplayName ?? U?.Name ?? ""
791
791
  })), $ = f.map((U) => ({
792
792
  recordId: U?.AnomalyId,
793
793
  anomalyName: U?.DisplayName ?? U?.Name ?? ""
794
- })), L = O.map((U) => ({
794
+ })), L = R.map((U) => ({
795
795
  thirdPartyId: Number(U?.ThirdPartyId),
796
796
  thirdPartyName: U?.ThirdPartyName ?? U?.Name ?? ""
797
797
  })), B = {
@@ -811,7 +811,7 @@ function or(e) {
811
811
  }
812
812
  };
813
813
  }
814
- const is = xs(null);
814
+ const as = Is(null);
815
815
  function lr({
816
816
  tenant: e = "snl",
817
817
  override: t,
@@ -829,13 +829,13 @@ function lr({
829
829
  t?.rulesBaseUrl,
830
830
  JSON.stringify(t?.headers || {})
831
831
  ]), n = ue(() => {
832
- const a = r.tenant === "schools" ? ir({ baseUrl: r.alertsBaseUrl, headers: r.headers }) : zs({ baseUrl: r.alertsBaseUrl, headers: r.headers }), o = r.tenant === "schools" ? or({ baseUrl: r.rulesBaseUrl, headers: r.headers }) : Js({ baseUrl: r.alertsBaseUrl, headers: r.headers });
832
+ const a = r.tenant === "schools" ? ir({ baseUrl: r.alertsBaseUrl, headers: r.headers }) : Vs({ baseUrl: r.alertsBaseUrl, headers: r.headers }), o = r.tenant === "schools" ? or({ baseUrl: r.rulesBaseUrl, headers: r.headers }) : Xs({ baseUrl: r.alertsBaseUrl, headers: r.headers });
833
833
  return { config: r, alerts: a, rules: o };
834
834
  }, [r]);
835
- return /* @__PURE__ */ i(is.Provider, { value: n, children: s });
835
+ return /* @__PURE__ */ i(as.Provider, { value: n, children: s });
836
836
  }
837
837
  function Ae() {
838
- const e = Cs(is);
838
+ const e = Cs(as);
839
839
  if (!e) throw new Error("useApi must be used inside ApiProvider");
840
840
  return e;
841
841
  }
@@ -851,8 +851,8 @@ const cr = {
851
851
  Low: "#007AFF"
852
852
  }, bt = 6, St = 7;
853
853
  function dr(e, t, s) {
854
- const r = e === bt, n = e === St, a = t.isEmailSent, o = t.isSMSSent, l = r && a || n && o, h = r ? "Send Email" : n ? "Send SMS" : s, u = r && a ? "Email already sent" : n && o ? "SMS already sent" : `Click to ${h.toLowerCase()}`;
855
- return { isDisabled: l, buttonText: h, tooltipTitle: u };
854
+ const r = e === bt, n = e === St, a = t.isEmailSent, o = t.isSMSSent, l = r && a || n && o, h = r ? "Send Email" : n ? "Send SMS" : s, d = r && a ? "Email already sent" : n && o ? "SMS already sent" : `Click to ${h.toLowerCase()}`;
855
+ return { isDisabled: l, buttonText: h, tooltipTitle: d };
856
856
  }
857
857
  function hr(e) {
858
858
  const t = /* @__PURE__ */ new Set();
@@ -932,7 +932,7 @@ function Ar({
932
932
  toolbar: a,
933
933
  tableProps: o
934
934
  }) {
935
- return /* @__PURE__ */ d("div", { children: [
935
+ return /* @__PURE__ */ u("div", { children: [
936
936
  a,
937
937
  /* @__PURE__ */ i(
938
938
  yt,
@@ -952,34 +952,34 @@ function Ar({
952
952
  )
953
953
  ] });
954
954
  }
955
- function as({ data: e, loading: t = !1, pageSize: s = 10, columns: r, severityOptions: n, spaceOptions: a, renderActions: o, onAlertIdClick: l, onRefetch: h, excludeCompleted: u = !0 }) {
956
- const [c, N] = I("All"), [f, O] = I("All"), [w, p] = I("All"), [S, $] = I("All"), [L, B] = I(""), [U, Y] = I([{ label: "All", value: "All" }]), [J, G] = I(/* @__PURE__ */ new Set()), { rules: W, alerts: T } = Ae(), x = {
957
- 6: { title: "Email", kind: "icon", icon: /* @__PURE__ */ i(Ms, {}) },
958
- 7: { title: "SMS", kind: "icon", icon: /* @__PURE__ */ i(Fs, {}) }
959
- }, R = ue(() => hr(e), [e]), se = ue(() => fr(e), [e]);
955
+ function os({ data: e, loading: t = !1, pageSize: s = 10, columns: r, severityOptions: n, spaceOptions: a, renderActions: o, onAlertIdClick: l, onRefetch: h, excludeCompleted: d = !0 }) {
956
+ const [c, N] = C("All"), [f, R] = C("All"), [w, p] = C("All"), [S, $] = C("All"), [L, B] = C(""), [U, K] = C([{ label: "All", value: "All" }]), [J, Y] = C(/* @__PURE__ */ new Set()), { rules: G, alerts: T } = Ae(), I = {
957
+ 6: { title: "Email", kind: "icon", icon: /* @__PURE__ */ i(Us, {}) },
958
+ 7: { title: "SMS", kind: "icon", icon: /* @__PURE__ */ i(Ms, {}) }
959
+ }, k = ue(() => hr(e), [e]), te = ue(() => fr(e), [e]);
960
960
  he(() => {
961
961
  let v = !0;
962
962
  return (async () => {
963
963
  try {
964
- const b = await W.getLookups(), M = (Array.isArray(b.thirdParties) ? b.thirdParties : []).map((D) => ({
964
+ const b = await G.getLookups(), M = (Array.isArray(b.thirdParties) ? b.thirdParties : []).map((D) => ({
965
965
  label: D.thirdPartyName,
966
966
  value: String(D.thirdPartyId)
967
967
  }));
968
- v && Y([{ label: "All", value: "All" }, ...M]);
968
+ v && K([{ label: "All", value: "All" }, ...M]);
969
969
  } catch (b) {
970
970
  console.error("Error loading third party options", b);
971
971
  }
972
972
  })(), () => {
973
973
  v = !1;
974
974
  };
975
- }, [W]);
976
- const te = ue(
975
+ }, [G]);
976
+ const Z = ue(
977
977
  () => (e || []).some((v) => at(v).length > 0),
978
978
  [e]
979
- ), k = ue(() => (e || []).filter((v) => {
980
- const b = c === "All" || v.priority === c, P = `${v.id} ${v.description} ${v.statusType}`.toLowerCase(), M = !L || P.includes(L.toLowerCase()), D = f === "All" || (v.anomalyName || "").toLowerCase() === f.toLowerCase(), j = w === "All" || (v.spaceName || "").toLowerCase() === w.toLowerCase(), Q = !te || S === "All" || at(v).includes(Number(S)), z = !u || String(v.statusType || "").toLowerCase() !== "completed";
979
+ ), O = ue(() => (e || []).filter((v) => {
980
+ const b = c === "All" || v.priority === c, P = `${v.id} ${v.description} ${v.statusType}`.toLowerCase(), M = !L || P.includes(L.toLowerCase()), D = f === "All" || (v.anomalyName || "").toLowerCase() === f.toLowerCase(), j = w === "All" || (v.spaceName || "").toLowerCase() === w.toLowerCase(), Q = !Z || S === "All" || at(v).includes(Number(S)), z = !d || !["completed", "false positive"].includes(String(v.statusType || "").toLowerCase());
981
981
  return b && M && D && j && Q && z;
982
- }), [e, c, L, f, w, S, te, u]), g = R, m = a && a.length ? a : se, A = [
982
+ }), [e, c, L, f, w, S, Z, d]), g = k, m = a && a.length ? a : te, A = [
983
983
  {
984
984
  title: "Severity",
985
985
  dataIndex: "priority",
@@ -1007,38 +1007,38 @@ function as({ data: e, loading: t = !1, pageSize: s = 10, columns: r, severityOp
1007
1007
  key: "actions",
1008
1008
  width: 320,
1009
1009
  render: (v, b) => {
1010
- if (o) return /* @__PURE__ */ i(ws, { children: o(b) });
1010
+ if (o) return /* @__PURE__ */ i(xs, { children: o(b) });
1011
1011
  const P = at(b);
1012
1012
  if (!P.length) return null;
1013
1013
  const M = async (D, j) => {
1014
1014
  const Q = Qt(b.id, D);
1015
- G((z) => new Set(z).add(Q));
1015
+ Y((z) => new Set(z).add(Q));
1016
1016
  try {
1017
1017
  const z = await T.sendSMSorEmailNotifications?.(b.id, D, j);
1018
1018
  z?.responseStatus ? (ne.success(z.data || (D ? "Email sent successfully" : "SMS sent successfully")), h?.()) : ne.error(z?.data || z?.errorMessage || "Failed to send notification");
1019
1019
  } catch (z) {
1020
1020
  ne.error(z?.message || "Failed to send notification");
1021
1021
  } finally {
1022
- G((z) => {
1022
+ Y((z) => {
1023
1023
  const ie = new Set(z);
1024
1024
  return ie.delete(Q), ie;
1025
1025
  });
1026
1026
  }
1027
1027
  };
1028
1028
  return /* @__PURE__ */ i(Se, { size: "middle", children: P.map((D) => {
1029
- const j = x[D];
1029
+ const j = I[D];
1030
1030
  if (!j) return null;
1031
- const Q = D === bt, z = D === St, { isDisabled: ie, buttonText: fe, tooltipTitle: le } = dr(D, b, j.title), re = Qt(b.id, Q), C = qt(D) && J.has(re), _ = () => {
1031
+ const Q = D === bt, z = D === St, { isDisabled: ie, buttonText: fe, tooltipTitle: le } = dr(D, b, j.title), re = Qt(b.id, Q), x = qt(D) && J.has(re), _ = () => {
1032
1032
  M(Q, z);
1033
1033
  };
1034
- return /* @__PURE__ */ i(Rs, { title: le, children: /* @__PURE__ */ i(
1034
+ return /* @__PURE__ */ i(ks, { title: le, children: /* @__PURE__ */ i(
1035
1035
  pe,
1036
1036
  {
1037
1037
  size: "small",
1038
1038
  disabled: ie,
1039
- loading: C,
1039
+ loading: x,
1040
1040
  onClick: qt(D) ? _ : void 0,
1041
- icon: !C && (j.kind === "img" && j.src ? /* @__PURE__ */ i("img", { src: j.src, alt: j.alt || j.title }) : j.icon),
1041
+ icon: !x && (j.kind === "img" && j.src ? /* @__PURE__ */ i("img", { src: j.src, alt: j.alt || j.title }) : j.icon),
1042
1042
  className: "flex flex-col items-center justify-center gap-1",
1043
1043
  style: { height: "fit-content" },
1044
1044
  children: fe
@@ -1054,13 +1054,13 @@ function as({ data: e, loading: t = !1, pageSize: s = 10, columns: r, severityOp
1054
1054
  width: 220,
1055
1055
  render: (v, b) => {
1056
1056
  const P = b?.timeElapsed, M = b?.timeRemaining, D = P ? Mt(P) : 0, j = M ? Mt(M) : 0, Q = Math.round(D / (D + j) * 100);
1057
- return /* @__PURE__ */ d("div", { children: [
1058
- /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
1057
+ return /* @__PURE__ */ u("div", { children: [
1058
+ /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
1059
1059
  /* @__PURE__ */ i("span", { className: "w-[70px]", children: "Elapsed:" }),
1060
1060
  /* @__PURE__ */ i("span", { className: "font-medium", children: P ?? "-" })
1061
1061
  ] }),
1062
- /* @__PURE__ */ i(ks, { percent: Q, showInfo: !1, size: "small", strokeColor: Hs(b.priority) }),
1063
- /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
1062
+ /* @__PURE__ */ i(Os, { percent: Q, showInfo: !1, size: "small", strokeColor: Gs(b.priority) }),
1063
+ /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
1064
1064
  /* @__PURE__ */ i("span", { className: "w-[70px]", children: "Remaining" }),
1065
1065
  /* @__PURE__ */ i("span", { className: "font-medium", children: M ?? "-" })
1066
1066
  ] })
@@ -1077,7 +1077,7 @@ function as({ 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: (v, b) => /* @__PURE__ */ d("div", { children: [
1080
+ render: (v, b) => /* @__PURE__ */ u("div", { children: [
1081
1081
  /* @__PURE__ */ i(
1082
1082
  "a",
1083
1083
  {
@@ -1096,30 +1096,30 @@ function as({ data: e, loading: t = !1, pageSize: s = 10, columns: r, severityOp
1096
1096
  Ar,
1097
1097
  {
1098
1098
  rowKey: "id",
1099
- data: k,
1099
+ data: O,
1100
1100
  columns: y,
1101
1101
  loading: t,
1102
1102
  pageSize: s,
1103
- toolbar: /* @__PURE__ */ d(ye, { gutter: [12, 12], className: "mb-3", align: "middle", children: [
1104
- /* @__PURE__ */ i(H, { flex: "none", children: /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
1103
+ toolbar: /* @__PURE__ */ u(ye, { gutter: [12, 12], className: "mb-3", align: "middle", children: [
1104
+ /* @__PURE__ */ i(H, { flex: "none", children: /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
1105
1105
  /* @__PURE__ */ i("span", { children: "Severity" }),
1106
1106
  /* @__PURE__ */ i(pr, { value: c, onChange: N, options: n })
1107
1107
  ] }) }),
1108
- /* @__PURE__ */ i(H, { flex: "none", children: /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
1108
+ /* @__PURE__ */ i(H, { flex: "none", children: /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
1109
1109
  /* @__PURE__ */ i("span", { children: "Anomaly type" }),
1110
- /* @__PURE__ */ i(gr, { value: f, onChange: O, options: g })
1110
+ /* @__PURE__ */ i(gr, { value: f, onChange: R, options: g })
1111
1111
  ] }) }),
1112
- /* @__PURE__ */ i(H, { flex: "none", children: /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
1112
+ /* @__PURE__ */ i(H, { flex: "none", children: /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
1113
1113
  /* @__PURE__ */ i("span", { children: "Space" }),
1114
1114
  /* @__PURE__ */ i(vr, { value: w, onChange: p, options: m })
1115
1115
  ] }) }),
1116
- /* @__PURE__ */ i(H, { flex: "none", children: /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
1116
+ /* @__PURE__ */ i(H, { flex: "none", children: /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
1117
1117
  /* @__PURE__ */ i("span", { children: "Action Taken" }),
1118
1118
  /* @__PURE__ */ i(Sr, { value: S, onChange: $, options: U })
1119
1119
  ] }) }),
1120
1120
  /* @__PURE__ */ i(H, { flex: "auto" }),
1121
1121
  /* @__PURE__ */ i(H, { flex: "none", children: /* @__PURE__ */ i(
1122
- Ts.Search,
1122
+ Rs.Search,
1123
1123
  {
1124
1124
  allowClear: !0,
1125
1125
  placeholder: "Search",
@@ -1198,13 +1198,13 @@ function xr(e) {
1198
1198
  var Me = typeof window > "u" || "Deno" in globalThis;
1199
1199
  function de() {
1200
1200
  }
1201
- function Cr(e, t) {
1201
+ function Ir(e, t) {
1202
1202
  return typeof e == "function" ? e(t) : e;
1203
1203
  }
1204
1204
  function lt(e) {
1205
1205
  return typeof e == "number" && e >= 0 && e !== 1 / 0;
1206
1206
  }
1207
- function os(e, t) {
1207
+ function ls(e, t) {
1208
1208
  return Math.max(e + (t || 0) - Date.now(), 0);
1209
1209
  }
1210
1210
  function Pe(e, t) {
@@ -1261,28 +1261,29 @@ function Ue(e) {
1261
1261
  function qe(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) => qe(e[s], t[s])) : !1;
1263
1263
  }
1264
- var Ir = Object.prototype.hasOwnProperty;
1265
- function ct(e, t) {
1264
+ var Cr = Object.prototype.hasOwnProperty;
1265
+ function ct(e, t, s = 0) {
1266
1266
  if (e === t)
1267
1267
  return e;
1268
- const s = Gt(e) && Gt(t);
1269
- if (!s && !(ut(e) && ut(t))) return t;
1270
- const n = (s ? e : Object.keys(e)).length, a = s ? t : Object.keys(t), o = a.length, l = s ? new Array(o) : {};
1271
- let h = 0;
1272
- for (let u = 0; u < o; u++) {
1273
- const c = s ? u : a[u], N = e[c], f = t[c];
1274
- if (N === f) {
1275
- l[c] = N, (s ? u < n : Ir.call(e, c)) && h++;
1268
+ if (s > 500) return t;
1269
+ const r = Gt(e) && Gt(t);
1270
+ if (!r && !(ut(e) && ut(t))) return t;
1271
+ const a = (r ? e : Object.keys(e)).length, o = r ? t : Object.keys(t), l = o.length, h = r ? new Array(l) : {};
1272
+ let d = 0;
1273
+ for (let c = 0; c < l; c++) {
1274
+ const N = r ? c : o[c], f = e[N], R = t[N];
1275
+ if (f === R) {
1276
+ h[N] = f, (r ? c < a : Cr.call(e, N)) && d++;
1276
1277
  continue;
1277
1278
  }
1278
- if (N === null || f === null || typeof N != "object" || typeof f != "object") {
1279
- l[c] = f;
1279
+ if (f === null || R === null || typeof f != "object" || typeof R != "object") {
1280
+ h[N] = R;
1280
1281
  continue;
1281
1282
  }
1282
- const O = ct(N, f);
1283
- l[c] = O, O === N && h++;
1283
+ const w = ct(f, R, s + 1);
1284
+ h[N] = w, w === f && d++;
1284
1285
  }
1285
- return n === o && h === n ? e : l;
1286
+ return a === l && d === a ? e : h;
1286
1287
  }
1287
1288
  function Je(e, t) {
1288
1289
  if (!t || Object.keys(e).length !== Object.keys(t).length)
@@ -1337,7 +1338,7 @@ function kr(e, t, s = 0) {
1337
1338
  return s && r.length > s ? r.slice(0, -1) : r;
1338
1339
  }
1339
1340
  var Xe = /* @__PURE__ */ Symbol();
1340
- function ls(e, t) {
1341
+ function cs(e, t) {
1341
1342
  return process.env.NODE_ENV !== "production" && e.queryFn === Xe && console.error(
1342
1343
  `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`
1343
1344
  ), !e.queryFn && t?.initialPromise ? () => t.initialPromise : !e.queryFn || e.queryFn === Xe ? () => Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn;
@@ -1507,7 +1508,7 @@ var ae = Dr(), Fr = class extends Be {
1507
1508
  function Mr(e) {
1508
1509
  return Math.min(1e3 * 2 ** e, 3e4);
1509
1510
  }
1510
- function cs(e) {
1511
+ function us(e) {
1511
1512
  return (e ?? "online") === "online" ? Ze.isOnline() : !0;
1512
1513
  }
1513
1514
  var ft = class extends Error {
@@ -1515,7 +1516,7 @@ var ft = class extends Error {
1515
1516
  super("CancelledError"), this.revert = e?.revert, this.silent = e?.silent;
1516
1517
  }
1517
1518
  };
1518
- function us(e) {
1519
+ function ds(e) {
1519
1520
  let t = !1, s = 0, r;
1520
1521
  const n = ht(), a = () => n.status !== "pending", o = (p) => {
1521
1522
  if (!a()) {
@@ -1526,13 +1527,13 @@ function us(e) {
1526
1527
  t = !0;
1527
1528
  }, h = () => {
1528
1529
  t = !1;
1529
- }, u = () => wt.isFocused() && (e.networkMode === "always" || Ze.isOnline()) && e.canRun(), c = () => cs(e.networkMode) && e.canRun(), N = (p) => {
1530
+ }, d = () => wt.isFocused() && (e.networkMode === "always" || Ze.isOnline()) && e.canRun(), c = () => us(e.networkMode) && e.canRun(), N = (p) => {
1530
1531
  a() || (r?.(), n.resolve(p));
1531
1532
  }, f = (p) => {
1532
1533
  a() || (r?.(), n.reject(p));
1533
- }, O = () => new Promise((p) => {
1534
+ }, R = () => new Promise((p) => {
1534
1535
  r = (S) => {
1535
- (a() || u()) && p(S);
1536
+ (a() || d()) && p(S);
1536
1537
  }, e.onPause?.();
1537
1538
  }).then(() => {
1538
1539
  r = void 0, a() || e.onContinue?.();
@@ -1549,12 +1550,12 @@ function us(e) {
1549
1550
  Promise.resolve(p).then(N).catch(($) => {
1550
1551
  if (a())
1551
1552
  return;
1552
- const L = e.retry ?? (Me ? 0 : 3), B = e.retryDelay ?? Mr, U = typeof B == "function" ? B(s, $) : B, Y = L === !0 || typeof L == "number" && s < L || typeof L == "function" && L(s, $);
1553
- if (t || !Y) {
1553
+ const L = e.retry ?? (Me ? 0 : 3), B = e.retryDelay ?? Mr, U = typeof B == "function" ? B(s, $) : B, K = L === !0 || typeof L == "number" && s < L || typeof L == "function" && L(s, $);
1554
+ if (t || !K) {
1554
1555
  f($);
1555
1556
  return;
1556
1557
  }
1557
- s++, e.onFail?.(s, $), Tr(U).then(() => u() ? void 0 : O()).then(() => {
1558
+ s++, e.onFail?.(s, $), Tr(U).then(() => d() ? void 0 : R()).then(() => {
1558
1559
  t ? f($) : w();
1559
1560
  });
1560
1561
  });
@@ -1567,10 +1568,10 @@ function us(e) {
1567
1568
  cancelRetry: l,
1568
1569
  continueRetry: h,
1569
1570
  canStart: c,
1570
- start: () => (c() ? w() : O().then(w), n)
1571
+ start: () => (c() ? w() : R().then(w), n)
1571
1572
  };
1572
1573
  }
1573
- var ds = class {
1574
+ var hs = class {
1574
1575
  #e;
1575
1576
  destroy() {
1576
1577
  this.clearGcTimeout();
@@ -1589,7 +1590,7 @@ var ds = class {
1589
1590
  clearGcTimeout() {
1590
1591
  this.#e && (Fe.clearTimeout(this.#e), this.#e = void 0);
1591
1592
  }
1592
- }, Ur = class extends ds {
1593
+ }, Ur = class extends hs {
1593
1594
  #e;
1594
1595
  #t;
1595
1596
  #s;
@@ -1598,7 +1599,7 @@ var ds = class {
1598
1599
  #a;
1599
1600
  #o;
1600
1601
  constructor(e) {
1601
- super(), this.#o = !1, this.#a = e.defaultOptions, this.setOptions(e.options), this.observers = [], this.#n = e.client, this.#s = this.#n.getQueryCache(), this.queryKey = e.queryKey, this.queryHash = e.queryHash, this.#e = Yt(this.options), this.state = e.state ?? this.#e, this.scheduleGc();
1602
+ super(), this.#o = !1, this.#a = e.defaultOptions, this.setOptions(e.options), this.observers = [], this.#n = e.client, this.#s = this.#n.getQueryCache(), this.queryKey = e.queryKey, this.queryHash = e.queryHash, this.#e = Kt(this.options), this.state = e.state ?? this.#e, this.scheduleGc();
1602
1603
  }
1603
1604
  get meta() {
1604
1605
  return this.options.meta;
@@ -1608,9 +1609,9 @@ var ds = class {
1608
1609
  }
1609
1610
  setOptions(e) {
1610
1611
  if (this.options = { ...this.#a, ...e }, this.updateGcTime(this.options.gcTime), this.state && this.state.data === void 0) {
1611
- const t = Yt(this.options);
1612
+ const t = Kt(this.options);
1612
1613
  t.data !== void 0 && (this.setState(
1613
- Kt(t.data, t.dataUpdatedAt)
1614
+ Yt(t.data, t.dataUpdatedAt)
1614
1615
  ), this.#e = t);
1615
1616
  }
1616
1617
  }
@@ -1658,7 +1659,7 @@ var ds = class {
1658
1659
  ) : this.state.data === void 0 || this.state.isInvalidated;
1659
1660
  }
1660
1661
  isStaleByTime(e = 0) {
1661
- return this.state.data === void 0 ? !0 : e === "static" ? !1 : this.state.isInvalidated ? !0 : !os(this.state.dataUpdatedAt, e);
1662
+ return this.state.data === void 0 ? !0 : e === "static" ? !1 : this.state.isInvalidated ? !0 : !ls(this.state.dataUpdatedAt, e);
1662
1663
  }
1663
1664
  onFocus() {
1664
1665
  this.observers.find((t) => t.shouldFetchOnWindowFocus())?.refetch({ cancelRefetch: !1 }), this.#r?.continue();
@@ -1679,7 +1680,7 @@ var ds = class {
1679
1680
  this.state.isInvalidated || this.#i({ type: "invalidate" });
1680
1681
  }
1681
1682
  async fetch(e, t) {
1682
- if (this.state.fetchStatus !== "idle" && // If the promise in the retyer is already rejected, we have to definitely
1683
+ if (this.state.fetchStatus !== "idle" && // If the promise in the retryer is already rejected, we have to definitely
1683
1684
  // re-start the fetch; there is a chance that the query is still in a
1684
1685
  // pending state when that happens
1685
1686
  this.#r?.status() !== "rejected") {
@@ -1701,7 +1702,7 @@ var ds = class {
1701
1702
  get: () => (this.#o = !0, s.signal)
1702
1703
  });
1703
1704
  }, n = () => {
1704
- const l = ls(this.options, t), u = (() => {
1705
+ const l = cs(this.options, t), d = (() => {
1705
1706
  const c = {
1706
1707
  client: this.#n,
1707
1708
  queryKey: this.queryKey,
@@ -1711,9 +1712,9 @@ var ds = class {
1711
1712
  })();
1712
1713
  return this.#o = !1, this.options.persister ? this.options.persister(
1713
1714
  l,
1714
- u,
1715
+ d,
1715
1716
  this
1716
- ) : l(u);
1717
+ ) : l(d);
1717
1718
  }, o = (() => {
1718
1719
  const l = {
1719
1720
  fetchOptions: t,
@@ -1725,7 +1726,7 @@ var ds = class {
1725
1726
  };
1726
1727
  return r(l), l;
1727
1728
  })();
1728
- this.options.behavior?.onFetch(o, this), this.#t = this.state, (this.state.fetchStatus === "idle" || this.state.fetchMeta !== o.fetchOptions?.meta) && this.#i({ type: "fetch", meta: o.fetchOptions?.meta }), this.#r = us({
1729
+ this.options.behavior?.onFetch(o, this), this.#t = this.state, (this.state.fetchStatus === "idle" || this.state.fetchMeta !== o.fetchOptions?.meta) && this.#i({ type: "fetch", meta: o.fetchOptions?.meta }), this.#r = ds({
1729
1730
  initialPromise: t?.initialPromise,
1730
1731
  fn: o.fetchFn,
1731
1732
  onCancel: (l) => {
@@ -1806,13 +1807,13 @@ var ds = class {
1806
1807
  case "fetch":
1807
1808
  return {
1808
1809
  ...s,
1809
- ...hs(s.data, this.options),
1810
+ ...fs(s.data, this.options),
1810
1811
  fetchMeta: e.meta ?? null
1811
1812
  };
1812
1813
  case "success":
1813
1814
  const r = {
1814
1815
  ...s,
1815
- ...Kt(e.data, e.dataUpdatedAt),
1816
+ ...Yt(e.data, e.dataUpdatedAt),
1816
1817
  dataUpdateCount: s.dataUpdateCount + 1,
1817
1818
  ...!e.manual && {
1818
1819
  fetchStatus: "idle",
@@ -1855,18 +1856,18 @@ var ds = class {
1855
1856
  });
1856
1857
  }
1857
1858
  };
1858
- function hs(e, t) {
1859
+ function fs(e, t) {
1859
1860
  return {
1860
1861
  fetchFailureCount: 0,
1861
1862
  fetchFailureReason: null,
1862
- fetchStatus: cs(t.networkMode) ? "fetching" : "paused",
1863
+ fetchStatus: us(t.networkMode) ? "fetching" : "paused",
1863
1864
  ...e === void 0 && {
1864
1865
  error: null,
1865
1866
  status: "pending"
1866
1867
  }
1867
1868
  };
1868
1869
  }
1869
- function Kt(e, t) {
1870
+ function Yt(e, t) {
1870
1871
  return {
1871
1872
  data: e,
1872
1873
  dataUpdatedAt: t ?? Date.now(),
@@ -1875,7 +1876,7 @@ function Kt(e, t) {
1875
1876
  status: "success"
1876
1877
  };
1877
1878
  }
1878
- function Yt(e) {
1879
+ function Kt(e) {
1879
1880
  const t = typeof e.initialData == "function" ? e.initialData() : e.initialData, s = t !== void 0, r = s ? typeof e.initialDataUpdatedAt == "function" ? e.initialDataUpdatedAt() : e.initialDataUpdatedAt : 0;
1880
1881
  return {
1881
1882
  data: t,
@@ -2013,7 +2014,7 @@ var Lr = class extends Be {
2013
2014
  );
2014
2015
  if (Me || this.#n.isStale || !lt(e))
2015
2016
  return;
2016
- const s = os(this.#n.dataUpdatedAt, e) + 1;
2017
+ const s = ls(this.#n.dataUpdatedAt, e) + 1;
2017
2018
  this.#c = Fe.setTimeout(() => {
2018
2019
  this.#n.isStale || this.updateResult();
2019
2020
  }, s);
@@ -2036,26 +2037,26 @@ var Lr = class extends Be {
2036
2037
  this.#u && (Fe.clearInterval(this.#u), this.#u = void 0);
2037
2038
  }
2038
2039
  createResult(e, t) {
2039
- const s = this.#t, r = this.options, n = this.#n, a = this.#r, o = this.#a, h = e !== s ? e.state : this.#s, { state: u } = e;
2040
- let c = { ...u }, N = !1, f;
2040
+ const s = this.#t, r = this.options, n = this.#n, a = this.#r, o = this.#a, h = e !== s ? e.state : this.#s, { state: d } = e;
2041
+ let c = { ...d }, N = !1, f;
2041
2042
  if (t._optimisticResults) {
2042
- const W = this.hasListeners(), T = !W && zt(e, t), x = W && Vt(e, s, t, r);
2043
- (T || x) && (c = {
2043
+ const G = this.hasListeners(), T = !G && zt(e, t), I = G && Vt(e, s, t, r);
2044
+ (T || I) && (c = {
2044
2045
  ...c,
2045
- ...hs(u.data, e.options)
2046
+ ...fs(d.data, e.options)
2046
2047
  }), t._optimisticResults === "isRestoring" && (c.fetchStatus = "idle");
2047
2048
  }
2048
- let { error: O, errorUpdatedAt: w, status: p } = c;
2049
+ let { error: R, errorUpdatedAt: w, status: p } = c;
2049
2050
  f = c.data;
2050
2051
  let S = !1;
2051
2052
  if (t.placeholderData !== void 0 && f === void 0 && p === "pending") {
2052
- let W;
2053
- n?.isPlaceholderData && t.placeholderData === o?.placeholderData ? (W = n.data, S = !0) : W = typeof t.placeholderData == "function" ? t.placeholderData(
2053
+ let G;
2054
+ n?.isPlaceholderData && t.placeholderData === o?.placeholderData ? (G = n.data, S = !0) : G = typeof t.placeholderData == "function" ? t.placeholderData(
2054
2055
  this.#f?.state.data,
2055
2056
  this.#f
2056
- ) : t.placeholderData, W !== void 0 && (p = "success", f = dt(
2057
+ ) : t.placeholderData, G !== void 0 && (p = "success", f = dt(
2057
2058
  n?.data,
2058
- W,
2059
+ G,
2059
2060
  t
2060
2061
  ), N = !0);
2061
2062
  }
@@ -2065,11 +2066,11 @@ var Lr = class extends Be {
2065
2066
  else
2066
2067
  try {
2067
2068
  this.#p = t.select, f = t.select(f), f = dt(n?.data, f, t), this.#h = f, this.#i = null;
2068
- } catch (W) {
2069
- this.#i = W;
2069
+ } catch (G) {
2070
+ this.#i = G;
2070
2071
  }
2071
- this.#i && (O = this.#i, f = this.#h, w = Date.now(), p = "error");
2072
- const $ = c.fetchStatus === "fetching", L = p === "pending", B = p === "error", U = L && $, Y = f !== void 0, G = {
2072
+ this.#i && (R = this.#i, f = this.#h, w = Date.now(), p = "error");
2073
+ const $ = c.fetchStatus === "fetching", L = p === "pending", B = p === "error", U = L && $, K = f !== void 0, Y = {
2073
2074
  status: p,
2074
2075
  fetchStatus: c.fetchStatus,
2075
2076
  isPending: L,
@@ -2079,7 +2080,7 @@ var Lr = class extends Be {
2079
2080
  isLoading: U,
2080
2081
  data: f,
2081
2082
  dataUpdatedAt: c.dataUpdatedAt,
2082
- error: O,
2083
+ error: R,
2083
2084
  errorUpdatedAt: w,
2084
2085
  failureCount: c.fetchFailureCount,
2085
2086
  failureReason: c.fetchFailureReason,
@@ -2088,35 +2089,35 @@ var Lr = class extends Be {
2088
2089
  isFetchedAfterMount: c.dataUpdateCount > h.dataUpdateCount || c.errorUpdateCount > h.errorUpdateCount,
2089
2090
  isFetching: $,
2090
2091
  isRefetching: $ && !L,
2091
- isLoadingError: B && !Y,
2092
+ isLoadingError: B && !K,
2092
2093
  isPaused: c.fetchStatus === "paused",
2093
2094
  isPlaceholderData: N,
2094
- isRefetchError: B && Y,
2095
+ isRefetchError: B && K,
2095
2096
  isStale: xt(e, t),
2096
2097
  refetch: this.refetch,
2097
2098
  promise: this.#o,
2098
2099
  isEnabled: ge(t.enabled, e) !== !1
2099
2100
  };
2100
2101
  if (this.options.experimental_prefetchInRender) {
2101
- const W = (R) => {
2102
- G.status === "error" ? R.reject(G.error) : G.data !== void 0 && R.resolve(G.data);
2103
- }, T = () => {
2104
- const R = this.#o = G.promise = ht();
2105
- W(R);
2106
- }, x = this.#o;
2107
- switch (x.status) {
2102
+ const G = Y.data !== void 0, T = Y.status === "error" && !G, I = (Z) => {
2103
+ T ? Z.reject(Y.error) : G && Z.resolve(Y.data);
2104
+ }, k = () => {
2105
+ const Z = this.#o = Y.promise = ht();
2106
+ I(Z);
2107
+ }, te = this.#o;
2108
+ switch (te.status) {
2108
2109
  case "pending":
2109
- e.queryHash === s.queryHash && W(x);
2110
+ e.queryHash === s.queryHash && I(te);
2110
2111
  break;
2111
2112
  case "fulfilled":
2112
- (G.status === "error" || G.data !== x.value) && T();
2113
+ (T || Y.data !== te.value) && k();
2113
2114
  break;
2114
2115
  case "rejected":
2115
- (G.status !== "error" || G.error !== x.reason) && T();
2116
+ (!T || Y.error !== te.reason) && k();
2116
2117
  break;
2117
2118
  }
2118
2119
  }
2119
- return G;
2120
+ return Y;
2120
2121
  }
2121
2122
  updateResult() {
2122
2123
  const e = this.#n, t = this.createResult(this.#t, this.options);
@@ -2187,7 +2188,7 @@ function Jt(e) {
2187
2188
  onFetch: (t, s) => {
2188
2189
  const r = t.options, n = t.fetchOptions?.meta?.fetchMore?.direction, a = t.state.data?.pages || [], o = t.state.data?.pageParams || [];
2189
2190
  let l = { pages: [], pageParams: [] }, h = 0;
2190
- const u = async () => {
2191
+ const d = async () => {
2191
2192
  let c = !1;
2192
2193
  const N = (w) => {
2193
2194
  Or(
@@ -2195,7 +2196,7 @@ function Jt(e) {
2195
2196
  () => t.signal,
2196
2197
  () => c = !0
2197
2198
  );
2198
- }, f = ls(t.options, t.fetchOptions), O = async (w, p, S) => {
2199
+ }, f = cs(t.options, t.fetchOptions), R = async (w, p, S) => {
2199
2200
  if (c)
2200
2201
  return Promise.reject();
2201
2202
  if (p == null && w.pages.length)
@@ -2209,10 +2210,10 @@ function Jt(e) {
2209
2210
  meta: t.options.meta
2210
2211
  };
2211
2212
  return N(J), J;
2212
- })(), B = await f(L), { maxPages: U } = t.options, Y = S ? kr : Rr;
2213
+ })(), B = await f(L), { maxPages: U } = t.options, K = S ? kr : Rr;
2213
2214
  return {
2214
- pages: Y(w.pages, B, U),
2215
- pageParams: Y(w.pageParams, p, U)
2215
+ pages: K(w.pages, B, U),
2216
+ pageParams: K(w.pageParams, p, U)
2216
2217
  };
2217
2218
  };
2218
2219
  if (n && a.length) {
@@ -2220,20 +2221,20 @@ function Jt(e) {
2220
2221
  pages: a,
2221
2222
  pageParams: o
2222
2223
  }, $ = p(r, S);
2223
- l = await O(S, $, w);
2224
+ l = await R(S, $, w);
2224
2225
  } else {
2225
2226
  const w = e ?? a.length;
2226
2227
  do {
2227
2228
  const p = h === 0 ? o[0] ?? r.initialPageParam : Xt(r, l);
2228
2229
  if (h > 0 && p == null)
2229
2230
  break;
2230
- l = await O(l, p), h++;
2231
+ l = await R(l, p), h++;
2231
2232
  } while (h < w);
2232
2233
  }
2233
2234
  return l;
2234
2235
  };
2235
2236
  t.options.persister ? t.fetchFn = () => t.options.persister?.(
2236
- u,
2237
+ d,
2237
2238
  {
2238
2239
  client: t.client,
2239
2240
  queryKey: t.queryKey,
@@ -2241,7 +2242,7 @@ function Jt(e) {
2241
2242
  signal: t.signal
2242
2243
  },
2243
2244
  s
2244
- ) : t.fetchFn = u;
2245
+ ) : t.fetchFn = d;
2245
2246
  }
2246
2247
  };
2247
2248
  }
@@ -2257,13 +2258,13 @@ function Xt(e, { pages: t, pageParams: s }) {
2257
2258
  function jr(e, { pages: t, pageParams: s }) {
2258
2259
  return t.length > 0 ? e.getPreviousPageParam?.(t[0], t, s[0], s) : void 0;
2259
2260
  }
2260
- var Qr = class extends ds {
2261
+ var Qr = class extends hs {
2261
2262
  #e;
2262
2263
  #t;
2263
2264
  #s;
2264
2265
  #n;
2265
2266
  constructor(e) {
2266
- super(), this.#e = e.client, this.mutationId = e.mutationId, this.#s = e.mutationCache, this.#t = [], this.state = e.state || fs(), this.setOptions(e.options), this.scheduleGc();
2267
+ super(), this.#e = e.client, this.mutationId = e.mutationId, this.#s = e.mutationCache, this.#t = [], this.state = e.state || ms(), this.setOptions(e.options), this.scheduleGc();
2267
2268
  }
2268
2269
  setOptions(e) {
2269
2270
  this.options = e, this.updateGcTime(this.options.gcTime);
@@ -2300,7 +2301,7 @@ var Qr = class extends ds {
2300
2301
  meta: this.options.meta,
2301
2302
  mutationKey: this.options.mutationKey
2302
2303
  };
2303
- this.#n = us({
2304
+ this.#n = ds({
2304
2305
  fn: () => this.options.mutationFn ? this.options.mutationFn(e, s) : Promise.reject(new Error("No mutationFn found")),
2305
2306
  onFail: (a, o) => {
2306
2307
  this.#r({ type: "failed", failureCount: a, error: o });
@@ -2476,7 +2477,7 @@ var Qr = class extends ds {
2476
2477
  });
2477
2478
  }
2478
2479
  };
2479
- function fs() {
2480
+ function ms() {
2480
2481
  return {
2481
2482
  context: void 0,
2482
2483
  data: void 0,
@@ -2508,7 +2509,7 @@ var qr = class extends Be {
2508
2509
  }
2509
2510
  add(e) {
2510
2511
  this.#e.add(e);
2511
- const t = Ke(e);
2512
+ const t = Ye(e);
2512
2513
  if (typeof t == "string") {
2513
2514
  const s = this.#t.get(t);
2514
2515
  s ? s.push(e) : this.#t.set(t, [e]);
@@ -2517,7 +2518,7 @@ var qr = class extends Be {
2517
2518
  }
2518
2519
  remove(e) {
2519
2520
  if (this.#e.delete(e)) {
2520
- const t = Ke(e);
2521
+ const t = Ye(e);
2521
2522
  if (typeof t == "string") {
2522
2523
  const s = this.#t.get(t);
2523
2524
  if (s)
@@ -2530,7 +2531,7 @@ var qr = class extends Be {
2530
2531
  this.notify({ type: "removed", mutation: e });
2531
2532
  }
2532
2533
  canRun(e) {
2533
- const t = Ke(e);
2534
+ const t = Ye(e);
2534
2535
  if (typeof t == "string") {
2535
2536
  const r = this.#t.get(t)?.find(
2536
2537
  (n) => n.state.status === "pending"
@@ -2540,7 +2541,7 @@ var qr = class extends Be {
2540
2541
  return !0;
2541
2542
  }
2542
2543
  runNext(e) {
2543
- const t = Ke(e);
2544
+ const t = Ye(e);
2544
2545
  return typeof t == "string" ? this.#t.get(t)?.find((r) => r !== e && r.state.isPaused)?.continue() ?? Promise.resolve() : Promise.resolve();
2545
2546
  }
2546
2547
  clear() {
@@ -2578,7 +2579,7 @@ var qr = class extends Be {
2578
2579
  );
2579
2580
  }
2580
2581
  };
2581
- function Ke(e) {
2582
+ function Ye(e) {
2582
2583
  return e.options.scope?.id;
2583
2584
  }
2584
2585
  var _r = class extends Be {
@@ -2616,7 +2617,7 @@ var _r = class extends Be {
2616
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);
2617
2618
  }
2618
2619
  #r() {
2619
- const e = this.#s?.state ?? fs();
2620
+ const e = this.#s?.state ?? ms();
2620
2621
  this.#t = {
2621
2622
  ...e,
2622
2623
  isPending: e.status === "pending",
@@ -2809,7 +2810,7 @@ var _r = class extends Be {
2809
2810
  setQueryData(e, t, s) {
2810
2811
  const r = this.defaultQueryOptions({ queryKey: e }), a = this.#e.get(
2811
2812
  r.queryHash
2812
- )?.state.data, o = Cr(t, a);
2813
+ )?.state.data, o = Ir(t, a);
2813
2814
  if (o !== void 0)
2814
2815
  return this.#e.build(this, r).setData(o, { ...s, manual: !0 });
2815
2816
  }
@@ -2960,10 +2961,10 @@ var _r = class extends Be {
2960
2961
  clear() {
2961
2962
  this.#e.clear(), this.#t.clear();
2962
2963
  }
2963
- }, ms = ce.createContext(
2964
+ }, ps = ce.createContext(
2964
2965
  void 0
2965
- ), Ct = (e) => {
2966
- const t = ce.useContext(ms);
2966
+ ), It = (e) => {
2967
+ const t = ce.useContext(ps);
2967
2968
  if (!t)
2968
2969
  throw new Error("No QueryClient set, use QueryClientProvider to set one");
2969
2970
  return t;
@@ -2972,9 +2973,9 @@ var _r = class extends Be {
2972
2973
  children: t
2973
2974
  }) => (ce.useEffect(() => (e.mount(), () => {
2974
2975
  e.unmount();
2975
- }), [e]), /* @__PURE__ */ i(ms.Provider, { value: e, children: t })), ps = ce.createContext(!1), Kr = () => ce.useContext(ps);
2976
- ps.Provider;
2977
- function Yr() {
2976
+ }), [e]), /* @__PURE__ */ i(ps.Provider, { value: e, children: t })), ys = ce.createContext(!1), Yr = () => ce.useContext(ys);
2977
+ ys.Provider;
2978
+ function Kr() {
2978
2979
  let e = !1;
2979
2980
  return {
2980
2981
  clearReset: () => {
@@ -2986,7 +2987,7 @@ function Yr() {
2986
2987
  isReset: () => e
2987
2988
  };
2988
2989
  }
2989
- var zr = ce.createContext(Yr()), Vr = () => ce.useContext(zr), Jr = (e, t, s) => {
2990
+ var zr = ce.createContext(Kr()), Vr = () => ce.useContext(zr), Jr = (e, t, s) => {
2990
2991
  const r = s?.state.error && typeof e.throwOnError == "function" ? Nt(e.throwOnError, [s.state.error, s]) : e.throwOnError;
2991
2992
  (e.suspense || e.experimental_prefetchInRender || r) && (t.isReset() || (e.retryOnMount = !1));
2992
2993
  }, Xr = (e) => {
@@ -3015,7 +3016,7 @@ function rn(e, t, s) {
3015
3016
  throw new Error(
3016
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'
3017
3018
  );
3018
- const r = Kr(), n = Vr(), a = Ct(), o = a.defaultQueryOptions(e);
3019
+ const r = Yr(), n = Vr(), a = It(), o = a.defaultQueryOptions(e);
3019
3020
  a.getDefaultOptions().queries?._experimental_beforeQuery?.(
3020
3021
  o
3021
3022
  );
@@ -3023,26 +3024,26 @@ function rn(e, t, s) {
3023
3024
  process.env.NODE_ENV !== "production" && (o.queryFn || console.error(
3024
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`
3025
3026
  )), o._optimisticResults = r ? "isRestoring" : "optimistic", en(o), Jr(o, n, l), Xr(n);
3026
- const h = !a.getQueryCache().get(o.queryHash), [u] = ce.useState(
3027
+ const h = !a.getQueryCache().get(o.queryHash), [d] = ce.useState(
3027
3028
  () => new t(
3028
3029
  a,
3029
3030
  o
3030
3031
  )
3031
- ), c = u.getOptimisticResult(o), N = !r && e.subscribed !== !1;
3032
+ ), c = d.getOptimisticResult(o), N = !r && e.subscribed !== !1;
3032
3033
  if (ce.useSyncExternalStore(
3033
3034
  ce.useCallback(
3034
3035
  (f) => {
3035
- const O = N ? u.subscribe(ae.batchCalls(f)) : de;
3036
- return u.updateResult(), O;
3036
+ const R = N ? d.subscribe(ae.batchCalls(f)) : de;
3037
+ return d.updateResult(), R;
3037
3038
  },
3038
- [u, N]
3039
+ [d, N]
3039
3040
  ),
3040
- () => u.getCurrentResult(),
3041
- () => u.getCurrentResult()
3041
+ () => d.getCurrentResult(),
3042
+ () => d.getCurrentResult()
3042
3043
  ), ce.useEffect(() => {
3043
- u.setOptions(o);
3044
- }, [o, u]), sn(o, c))
3045
- throw Zt(o, u, n);
3044
+ d.setOptions(o);
3045
+ }, [o, d]), sn(o, c))
3046
+ throw Zt(o, d, n);
3046
3047
  if (Zr({
3047
3048
  result: c,
3048
3049
  errorResetBoundary: n,
@@ -3056,19 +3057,19 @@ function rn(e, t, s) {
3056
3057
  c
3057
3058
  ), o.experimental_prefetchInRender && !Me && tn(c, r) && (h ? (
3058
3059
  // Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
3059
- Zt(o, u, n)
3060
+ Zt(o, d, n)
3060
3061
  ) : (
3061
3062
  // subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
3062
3063
  l?.promise
3063
3064
  ))?.catch(de).finally(() => {
3064
- u.updateResult();
3065
- }), o.notifyOnChangeProps ? c : u.trackResult(c);
3065
+ d.updateResult();
3066
+ }), o.notifyOnChangeProps ? c : d.trackResult(c);
3066
3067
  }
3067
- function It(e, t) {
3068
+ function Ct(e, t) {
3068
3069
  return rn(e, Lr);
3069
3070
  }
3070
3071
  function nn(e, t) {
3071
- const s = Ct(), [r] = ce.useState(
3072
+ const s = It(), [r] = ce.useState(
3072
3073
  () => new _r(
3073
3074
  s,
3074
3075
  e
@@ -3094,8 +3095,8 @@ function nn(e, t) {
3094
3095
  throw n.error;
3095
3096
  return { ...n, mutate: a, mutateAsync: n.mutate };
3096
3097
  }
3097
- function ys() {
3098
- const { alerts: e } = Ae(), t = Ct();
3098
+ function gs() {
3099
+ const { alerts: e } = Ae(), t = It();
3099
3100
  return nn({
3100
3101
  mutationFn: (s) => e.updateAlertStatus(s),
3101
3102
  onSuccess: () => {
@@ -3129,7 +3130,7 @@ function on(e, t) {
3129
3130
  function ln(e) {
3130
3131
  if (!e) return "-";
3131
3132
  try {
3132
- 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()), h = s(t.getSeconds());
3133
+ const t = new Date(e), s = (d) => String(d).padStart(2, "0"), r = s(t.getMonth() + 1), n = s(t.getDate()), a = t.getFullYear(), o = s(t.getHours()), l = s(t.getMinutes()), h = s(t.getSeconds());
3133
3134
  return `${r}/${n}/${a} ${o}:${l}:${h}`;
3134
3135
  } catch {
3135
3136
  return "-";
@@ -3165,26 +3166,25 @@ function dn({
3165
3166
  alerts: e,
3166
3167
  loading: t = !1,
3167
3168
  pageSize: s = 10,
3168
- completedStatus: r = "Completed",
3169
- severityOptions: n,
3170
- anomalyOptions: a,
3171
- spaceOptions: o,
3172
- onAlertIdClick: l
3169
+ severityOptions: r,
3170
+ anomalyOptions: n,
3171
+ spaceOptions: a,
3172
+ onAlertIdClick: o
3173
3173
  }) {
3174
- const h = ys(), u = async (f) => {
3174
+ const l = gs(), h = ["completed", "false positive"], d = async (f) => {
3175
3175
  try {
3176
- const O = await h.mutateAsync({
3176
+ const R = 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 (O?.responseStatus) {
3184
- const w = O?.data || "Alert reopened successfully.";
3183
+ if (R?.responseStatus) {
3184
+ const w = R?.data || "Alert reopened successfully.";
3185
3185
  ne.success(w);
3186
3186
  } else {
3187
- const w = O?.errorMessage || "Failed to reopen alert";
3187
+ const w = R?.errorMessage || "Failed to reopen alert";
3188
3188
  ne.error(w);
3189
3189
  }
3190
3190
  } catch {
@@ -3225,15 +3225,15 @@ function dn({
3225
3225
  title: "Description",
3226
3226
  dataIndex: "description",
3227
3227
  key: "description",
3228
- render: (f, O) => /* @__PURE__ */ d("div", { children: [
3228
+ render: (f, R) => /* @__PURE__ */ u("div", { children: [
3229
3229
  /* @__PURE__ */ i(
3230
3230
  "a",
3231
3231
  {
3232
3232
  onClick: (w) => {
3233
- w.preventDefault(), l?.(O);
3233
+ w.preventDefault(), o?.(R);
3234
3234
  },
3235
3235
  className: "inline-block mb-1 text-blue-600",
3236
- children: O.alertNumber
3236
+ children: R.alertNumber
3237
3237
  }
3238
3238
  ),
3239
3239
  /* @__PURE__ */ i("div", { className: "text-black/65", children: f })
@@ -3244,8 +3244,8 @@ function dn({
3244
3244
  key: "menu",
3245
3245
  width: 60,
3246
3246
  align: "right",
3247
- render: (f, O) => /* @__PURE__ */ i(
3248
- Os,
3247
+ render: (f, R) => /* @__PURE__ */ i(
3248
+ Ps,
3249
3249
  {
3250
3250
  trigger: ["click"],
3251
3251
  menu: {
@@ -3253,28 +3253,28 @@ function dn({
3253
3253
  { key: "reopen", label: "Reopen" }
3254
3254
  ],
3255
3255
  onClick: ({ key: w }) => {
3256
- w === "reopen" && u(O);
3256
+ w === "reopen" && d(R);
3257
3257
  }
3258
3258
  },
3259
- children: /* @__PURE__ */ i(pe, { type: "text", icon: /* @__PURE__ */ i(Us, {}) })
3259
+ children: /* @__PURE__ */ i(pe, { type: "text", icon: /* @__PURE__ */ i(Ls, {}) })
3260
3260
  }
3261
3261
  )
3262
3262
  }
3263
3263
  ], N = (e || []).filter(
3264
- (f) => (f.statusType || "").toLowerCase() === r.toLowerCase()
3264
+ (f) => h.includes((f.statusType || "").toLowerCase())
3265
3265
  );
3266
3266
  return /* @__PURE__ */ i(
3267
- as,
3267
+ os,
3268
3268
  {
3269
3269
  data: N,
3270
3270
  loading: t,
3271
3271
  pageSize: s,
3272
3272
  columns: c,
3273
- severityOptions: n,
3274
- anomalyOptions: a,
3275
- spaceOptions: o,
3273
+ severityOptions: r,
3274
+ anomalyOptions: n,
3275
+ spaceOptions: a,
3276
3276
  renderActions: void 0,
3277
- onAlertIdClick: l,
3277
+ onAlertIdClick: o,
3278
3278
  excludeCompleted: !1
3279
3279
  }
3280
3280
  );
@@ -3297,8 +3297,8 @@ function hn({
3297
3297
  minutes: parseInt(N.find((f) => f.type === "minute")?.value || "0", 10),
3298
3298
  seconds: parseInt(N.find((f) => f.type === "second")?.value || "0", 10)
3299
3299
  };
3300
- }, [t, s]), o = a * 6, l = n * 6 + a * 0.1, h = r % 12 * 30 + n * 0.5, u = e / 2;
3301
- return /* @__PURE__ */ d(
3300
+ }, [t, s]), o = a * 6, l = n * 6 + a * 0.1, h = r % 12 * 30 + n * 0.5, d = e / 2;
3301
+ return /* @__PURE__ */ u(
3302
3302
  "div",
3303
3303
  {
3304
3304
  className: "relative rounded-full border border-gray-300 bg-white",
@@ -3307,7 +3307,7 @@ function hn({
3307
3307
  "aria-label": "Analog Clock",
3308
3308
  children: [
3309
3309
  [...Array(12)].map((c, N) => {
3310
- const f = N * 30, O = 6, w = u - 4, p = w - O, S = (f - 90) * (Math.PI / 180), $ = u + p * Math.cos(S), L = u + p * Math.sin(S), B = u + w * Math.cos(S), U = u + w * Math.sin(S);
3310
+ const f = N * 30, R = 6, w = d - 4, p = w - R, S = (f - 90) * (Math.PI / 180), $ = d + p * Math.cos(S), L = d + p * Math.sin(S), B = d + w * Math.cos(S), U = d + w * Math.sin(S);
3311
3311
  return /* @__PURE__ */ i(
3312
3312
  "svg",
3313
3313
  {
@@ -3340,10 +3340,10 @@ function hn({
3340
3340
  children: /* @__PURE__ */ i(
3341
3341
  "line",
3342
3342
  {
3343
- x1: u,
3344
- y1: u,
3345
- x2: u,
3346
- y2: u - e * 0.25,
3343
+ x1: d,
3344
+ y1: d,
3345
+ x2: d,
3346
+ y2: d - e * 0.25,
3347
3347
  stroke: "#1F2937",
3348
3348
  strokeWidth: 4,
3349
3349
  strokeLinecap: "round"
@@ -3361,10 +3361,10 @@ function hn({
3361
3361
  children: /* @__PURE__ */ i(
3362
3362
  "line",
3363
3363
  {
3364
- x1: u,
3365
- y1: u,
3366
- x2: u,
3367
- y2: u - e * 0.35,
3364
+ x1: d,
3365
+ y1: d,
3366
+ x2: d,
3367
+ y2: d - e * 0.35,
3368
3368
  stroke: "#374151",
3369
3369
  strokeWidth: 3,
3370
3370
  strokeLinecap: "round"
@@ -3382,10 +3382,10 @@ function hn({
3382
3382
  children: /* @__PURE__ */ i(
3383
3383
  "line",
3384
3384
  {
3385
- x1: u,
3386
- y1: u + e * 0.08,
3387
- x2: u,
3388
- y2: u - e * 0.38,
3385
+ x1: d,
3386
+ y1: d + e * 0.08,
3387
+ x2: d,
3388
+ y2: d - e * 0.38,
3389
3389
  stroke: "#EF4444",
3390
3390
  strokeWidth: 1.5,
3391
3391
  strokeLinecap: "round"
@@ -3400,8 +3400,8 @@ function hn({
3400
3400
  style: {
3401
3401
  width: 8,
3402
3402
  height: 8,
3403
- left: u - 4,
3404
- top: u - 4
3403
+ left: d - 4,
3404
+ top: d - 4
3405
3405
  }
3406
3406
  }
3407
3407
  )
@@ -3410,16 +3410,16 @@ function hn({
3410
3410
  );
3411
3411
  }
3412
3412
  function fn({ label: e = "USA", timeZone: t = "America/New_York", updateIntervalMs: s = 1e3, className: r }) {
3413
- const [n, a] = I(/* @__PURE__ */ new Date());
3413
+ const [n, a] = C(/* @__PURE__ */ new Date());
3414
3414
  he(() => {
3415
- const u = setInterval(() => a(/* @__PURE__ */ new Date()), s);
3416
- return () => clearInterval(u);
3415
+ const d = setInterval(() => a(/* @__PURE__ */ new Date()), s);
3416
+ return () => clearInterval(d);
3417
3417
  }, [s]);
3418
3418
  const o = ue(() => an(n, t), [n, t]), { abbr: l, offset: h } = ue(() => on(n, t), [n, t]);
3419
- return /* @__PURE__ */ d("div", { className: `flex items-center gap-3 ${r || ""}`, children: [
3419
+ return /* @__PURE__ */ u("div", { className: `flex items-center gap-3 ${r || ""}`, children: [
3420
3420
  /* @__PURE__ */ i(hn, { time: n, timeZone: t, size: 80 }),
3421
- /* @__PURE__ */ d("div", { className: "flex flex-col items-baseline gap-1", children: [
3422
- /* @__PURE__ */ d("div", { className: "flex items-center gap-2 text-sm text-gray-600", children: [
3421
+ /* @__PURE__ */ u("div", { className: "flex flex-col items-baseline gap-1", children: [
3422
+ /* @__PURE__ */ u("div", { className: "flex items-center gap-2 text-sm text-gray-600", children: [
3423
3423
  /* @__PURE__ */ i("span", { className: "uppercase", children: e }),
3424
3424
  l && /* @__PURE__ */ i("span", { className: "px-1.5 py-0.5 rounded-md border text-[10px] leading-none text-gray-600 bg-gray-50", children: l }),
3425
3425
  h && /* @__PURE__ */ i("span", { className: "text-xs text-gray-500", children: h })
@@ -3434,8 +3434,8 @@ const mn = [{ SeverityId: 1, Code: "LOW", DisplayName: "Low", SortOrder: 10, IsA
3434
3434
  userRoles: yn
3435
3435
  }, { Text: gn } = _e;
3436
3436
  function vn({ sortBy: e, onChange: t, showActions: s, onSave: r, onClear: n, saving: a }) {
3437
- return /* @__PURE__ */ d(ye, { gutter: [16, 16], align: "middle", children: [
3438
- /* @__PURE__ */ i(H, { xs: 24, md: 8, lg: 5, children: /* @__PURE__ */ d(Se, { className: "w-full items-center", direction: "horizontal", size: 12, children: [
3437
+ return /* @__PURE__ */ u(ye, { gutter: [16, 16], align: "middle", children: [
3438
+ /* @__PURE__ */ i(H, { xs: 24, md: 8, lg: 5, children: /* @__PURE__ */ u(Se, { className: "w-full items-center", direction: "horizontal", size: 12, children: [
3439
3439
  /* @__PURE__ */ i(gn, { className: "text-gray-600", children: "Sort by:" }),
3440
3440
  /* @__PURE__ */ i(
3441
3441
  me,
@@ -3452,13 +3452,13 @@ function vn({ sortBy: e, onChange: t, showActions: s, onSave: r, onClear: n, sav
3452
3452
  }
3453
3453
  )
3454
3454
  ] }) }),
3455
- /* @__PURE__ */ i(H, { xs: 24, md: 8, style: { alignSelf: "end" }, children: s ? /* @__PURE__ */ d(Se, { className: "w-full", direction: "horizontal", size: 8, children: [
3455
+ /* @__PURE__ */ i(H, { xs: 24, md: 8, style: { alignSelf: "end" }, children: s ? /* @__PURE__ */ u(Se, { className: "w-full", direction: "horizontal", size: 8, children: [
3456
3456
  /* @__PURE__ */ i(pe, { onClick: n, disabled: a, children: "Clear" }),
3457
3457
  /* @__PURE__ */ i(pe, { type: "primary", onClick: r, loading: a, children: "Save" })
3458
3458
  ] }) : null })
3459
3459
  ] });
3460
3460
  }
3461
- const { Text: Ie } = _e;
3461
+ const { Text: Ce } = _e;
3462
3462
  function bn(e) {
3463
3463
  const {
3464
3464
  // escBasis, setEscBasis,
@@ -3471,11 +3471,11 @@ function bn(e) {
3471
3471
  l1mins: o,
3472
3472
  setL1mins: l,
3473
3473
  l1role: h,
3474
- setL1role: u,
3474
+ setL1role: d,
3475
3475
  l2mins: c,
3476
3476
  setL2mins: N,
3477
3477
  l2role: f,
3478
- setL2role: O,
3478
+ setL2role: R,
3479
3479
  l3mins: w,
3480
3480
  setL3mins: p,
3481
3481
  l3role: S,
@@ -3483,23 +3483,23 @@ function bn(e) {
3483
3483
  actions: L,
3484
3484
  setActions: B,
3485
3485
  thirdPartyIds: U,
3486
- setThirdPartyIds: Y,
3486
+ setThirdPartyIds: K,
3487
3487
  humanLoop: J,
3488
- setHumanLoop: G,
3489
- onClear: W,
3488
+ setHumanLoop: Y,
3489
+ onClear: G,
3490
3490
  onSave: T,
3491
- saving: x,
3492
- onActionTypesLoaded: R
3493
- } = e, { rules: se } = Ae(), [te, k] = I([]), [g, m] = I([]), [A, y] = I(!1);
3491
+ saving: I,
3492
+ onActionTypesLoaded: k
3493
+ } = e, { rules: te } = Ae(), [Z, O] = C([]), [g, m] = C([]), [A, y] = C(!1);
3494
3494
  he(() => {
3495
3495
  let P = !1;
3496
3496
  return (async () => {
3497
3497
  try {
3498
3498
  y(!0);
3499
- const M = await se.getLookups();
3499
+ const M = await te.getLookups();
3500
3500
  if (P || !M || !Array.isArray(M.actionTypes)) return;
3501
3501
  const D = M.actionTypes.map((Q) => ({ label: Q.name, value: String(Q.actionTypeId) }));
3502
- k(D), R && R(M.actionTypes);
3502
+ O(D), k && k(M.actionTypes);
3503
3503
  const j = Array.isArray(M.thirdParties) ? M.thirdParties.map((Q) => ({ label: Q.thirdPartyName, value: Q.thirdPartyId })) : [];
3504
3504
  m(j);
3505
3505
  } catch (M) {
@@ -3512,10 +3512,10 @@ function bn(e) {
3512
3512
  };
3513
3513
  }, []);
3514
3514
  const v = typeof o == "number" || typeof h == "number" || typeof c == "number" || typeof f == "number" || typeof w == "number" || typeof S == "number" || Array.isArray(L) && L.length > 0 || Array.isArray(U) && U.length > 0 || !!J;
3515
- return /* @__PURE__ */ d(gt, { spinning: !!x || A, children: [
3516
- /* @__PURE__ */ d(ye, { gutter: [16, 16], align: "bottom", children: [
3517
- /* @__PURE__ */ i(H, { xs: 24, sm: 12, md: 8, lg: 4, children: /* @__PURE__ */ d("div", { children: [
3518
- /* @__PURE__ */ i(Ie, { className: "text-gray-700 font-medium block mb-1", children: "Rules" }),
3515
+ return /* @__PURE__ */ u(gt, { spinning: !!I || A, children: [
3516
+ /* @__PURE__ */ u(ye, { gutter: [16, 16], align: "bottom", children: [
3517
+ /* @__PURE__ */ i(H, { xs: 24, sm: 12, md: 8, lg: 4, children: /* @__PURE__ */ u("div", { children: [
3518
+ /* @__PURE__ */ i(Ce, { className: "text-gray-700 font-medium block mb-1", children: "Rules" }),
3519
3519
  /* @__PURE__ */ i(
3520
3520
  me,
3521
3521
  {
@@ -3527,12 +3527,12 @@ function bn(e) {
3527
3527
  }
3528
3528
  )
3529
3529
  ] }) }),
3530
- /* @__PURE__ */ i(H, { xs: 24, sm: 12, md: 8, lg: 4, children: /* @__PURE__ */ d("div", { children: [
3531
- /* @__PURE__ */ d(ye, { gutter: 8, children: [
3532
- /* @__PURE__ */ i(H, { span: 10, children: /* @__PURE__ */ i(Ie, { className: "text-gray-700 font-medium block mb-1", children: "Level 1 (mins)" }) }),
3533
- /* @__PURE__ */ i(H, { span: 14, children: /* @__PURE__ */ i(Ie, { className: "text-gray-700 font-medium block mb-1", children: "Escalate to" }) })
3530
+ /* @__PURE__ */ i(H, { xs: 24, sm: 12, md: 8, lg: 4, children: /* @__PURE__ */ u("div", { children: [
3531
+ /* @__PURE__ */ u(ye, { gutter: 8, children: [
3532
+ /* @__PURE__ */ i(H, { span: 10, children: /* @__PURE__ */ i(Ce, { className: "text-gray-700 font-medium block mb-1", children: "Level 1 (mins)" }) }),
3533
+ /* @__PURE__ */ i(H, { span: 14, children: /* @__PURE__ */ i(Ce, { className: "text-gray-700 font-medium block mb-1", children: "Escalate to" }) })
3534
3534
  ] }),
3535
- /* @__PURE__ */ d(ye, { gutter: 8, children: [
3535
+ /* @__PURE__ */ u(ye, { gutter: 8, children: [
3536
3536
  /* @__PURE__ */ i(H, { span: 10, children: /* @__PURE__ */ i(
3537
3537
  me,
3538
3538
  {
@@ -3549,18 +3549,18 @@ function bn(e) {
3549
3549
  placeholder: "Escalate to",
3550
3550
  className: "w-full",
3551
3551
  value: h,
3552
- onChange: u,
3552
+ onChange: d,
3553
3553
  options: a
3554
3554
  }
3555
3555
  ) })
3556
3556
  ] })
3557
3557
  ] }) }),
3558
- /* @__PURE__ */ i(H, { xs: 24, sm: 12, md: 8, lg: 4, children: /* @__PURE__ */ d("div", { children: [
3559
- /* @__PURE__ */ d(ye, { gutter: 8, children: [
3560
- /* @__PURE__ */ i(H, { span: 10, children: /* @__PURE__ */ i(Ie, { className: "text-gray-700 font-medium block mb-1", children: "Level 2 (mins)" }) }),
3561
- /* @__PURE__ */ i(H, { span: 14, children: /* @__PURE__ */ i(Ie, { className: "text-gray-700 font-medium block mb-1", children: "Escalate to" }) })
3558
+ /* @__PURE__ */ i(H, { xs: 24, sm: 12, md: 8, lg: 4, children: /* @__PURE__ */ u("div", { children: [
3559
+ /* @__PURE__ */ u(ye, { gutter: 8, children: [
3560
+ /* @__PURE__ */ i(H, { span: 10, children: /* @__PURE__ */ i(Ce, { className: "text-gray-700 font-medium block mb-1", children: "Level 2 (mins)" }) }),
3561
+ /* @__PURE__ */ i(H, { span: 14, children: /* @__PURE__ */ i(Ce, { className: "text-gray-700 font-medium block mb-1", children: "Escalate to" }) })
3562
3562
  ] }),
3563
- /* @__PURE__ */ d(ye, { gutter: 8, children: [
3563
+ /* @__PURE__ */ u(ye, { gutter: 8, children: [
3564
3564
  /* @__PURE__ */ i(H, { span: 10, children: /* @__PURE__ */ i(
3565
3565
  me,
3566
3566
  {
@@ -3577,18 +3577,18 @@ function bn(e) {
3577
3577
  placeholder: "Escalate to",
3578
3578
  className: "w-full",
3579
3579
  value: f,
3580
- onChange: O,
3580
+ onChange: R,
3581
3581
  options: a
3582
3582
  }
3583
3583
  ) })
3584
3584
  ] })
3585
3585
  ] }) }),
3586
- /* @__PURE__ */ i(H, { xs: 24, sm: 12, md: 8, lg: 4, children: /* @__PURE__ */ d("div", { children: [
3587
- /* @__PURE__ */ d(ye, { gutter: 8, children: [
3588
- /* @__PURE__ */ i(H, { span: 10, children: /* @__PURE__ */ i(Ie, { className: "text-gray-700 font-medium block mb-1", children: "Level 3 (mins)" }) }),
3589
- /* @__PURE__ */ i(H, { span: 14, children: /* @__PURE__ */ i(Ie, { className: "text-gray-700 font-medium block mb-1", children: "Escalate to" }) })
3586
+ /* @__PURE__ */ i(H, { xs: 24, sm: 12, md: 8, lg: 4, children: /* @__PURE__ */ u("div", { children: [
3587
+ /* @__PURE__ */ u(ye, { gutter: 8, children: [
3588
+ /* @__PURE__ */ i(H, { span: 10, children: /* @__PURE__ */ i(Ce, { className: "text-gray-700 font-medium block mb-1", children: "Level 3 (mins)" }) }),
3589
+ /* @__PURE__ */ i(H, { span: 14, children: /* @__PURE__ */ i(Ce, { className: "text-gray-700 font-medium block mb-1", children: "Escalate to" }) })
3590
3590
  ] }),
3591
- /* @__PURE__ */ d(ye, { gutter: 8, children: [
3591
+ /* @__PURE__ */ u(ye, { gutter: 8, children: [
3592
3592
  /* @__PURE__ */ i(H, { span: 10, children: /* @__PURE__ */ i(
3593
3593
  me,
3594
3594
  {
@@ -3611,8 +3611,8 @@ function bn(e) {
3611
3611
  ) })
3612
3612
  ] })
3613
3613
  ] }) }),
3614
- /* @__PURE__ */ i(H, { xs: 24, sm: 12, md: 8, lg: 5, children: /* @__PURE__ */ d("div", { children: [
3615
- /* @__PURE__ */ i(Ie, { className: "text-gray-700 font-medium block mb-1", children: "Pick Actions" }),
3614
+ /* @__PURE__ */ i(H, { xs: 24, sm: 12, md: 8, lg: 5, children: /* @__PURE__ */ u("div", { children: [
3615
+ /* @__PURE__ */ i(Ce, { className: "text-gray-700 font-medium block mb-1", children: "Pick Actions" }),
3616
3616
  /* @__PURE__ */ i(
3617
3617
  me,
3618
3618
  {
@@ -3621,15 +3621,15 @@ function bn(e) {
3621
3621
  className: "w-full",
3622
3622
  value: L,
3623
3623
  onChange: B,
3624
- options: te
3624
+ options: Z
3625
3625
  }
3626
3626
  )
3627
3627
  ] }) }),
3628
- /* @__PURE__ */ i(H, { xs: 24, sm: 12, md: 8, lg: 3, children: /* @__PURE__ */ i("div", { className: "flex items-end h-full", children: /* @__PURE__ */ i(je, { checked: J, onChange: (P) => G(P.target.checked), children: "Human-In-The-Loop" }) }) })
3628
+ /* @__PURE__ */ i(H, { xs: 24, sm: 12, md: 8, lg: 3, children: /* @__PURE__ */ i("div", { className: "flex items-end h-full", children: /* @__PURE__ */ i(je, { checked: J, onChange: (P) => Y(P.target.checked), children: "Human-In-The-Loop" }) }) })
3629
3629
  ] }),
3630
- /* @__PURE__ */ d(ye, { gutter: [16, 16], align: "bottom", className: "mt-4", children: [
3631
- /* @__PURE__ */ i(H, { xs: 24, sm: 12, md: 8, lg: 5, children: /* @__PURE__ */ d("div", { children: [
3632
- /* @__PURE__ */ i(Ie, { className: "text-gray-700 font-medium block mb-1", children: "Third Party App" }),
3630
+ /* @__PURE__ */ u(ye, { gutter: [16, 16], align: "bottom", className: "mt-4", children: [
3631
+ /* @__PURE__ */ i(H, { xs: 24, sm: 12, md: 8, lg: 5, children: /* @__PURE__ */ u("div", { children: [
3632
+ /* @__PURE__ */ i(Ce, { className: "text-gray-700 font-medium block mb-1", children: "Third Party App" }),
3633
3633
  /* @__PURE__ */ i(
3634
3634
  me,
3635
3635
  {
@@ -3637,14 +3637,14 @@ function bn(e) {
3637
3637
  placeholder: "Third Party app",
3638
3638
  className: "w-full",
3639
3639
  value: U,
3640
- onChange: Y,
3640
+ onChange: K,
3641
3641
  options: g
3642
3642
  }
3643
3643
  )
3644
3644
  ] }) }),
3645
- /* @__PURE__ */ i(H, { xs: 24, sm: 12, md: 8, children: /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
3646
- /* @__PURE__ */ i(pe, { onClick: W, children: "Clear" }),
3647
- /* @__PURE__ */ i(pe, { type: "primary", onClick: T, loading: !!x, disabled: !(!!t && v && !x), children: "Save" })
3645
+ /* @__PURE__ */ i(H, { xs: 24, sm: 12, md: 8, children: /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
3646
+ /* @__PURE__ */ i(pe, { onClick: G, children: "Clear" }),
3647
+ /* @__PURE__ */ i(pe, { type: "primary", onClick: T, loading: !!I, disabled: !(!!t && v && !I), children: "Save" })
3648
3648
  ] }) })
3649
3649
  ] })
3650
3650
  ] });
@@ -3663,7 +3663,7 @@ function Sn({ entries: e, userRoles: t, onEdit: s, loading: r }) {
3663
3663
  {
3664
3664
  title: "Level 1",
3665
3665
  key: "l1",
3666
- render: (o, l) => /* @__PURE__ */ d("span", { children: [
3666
+ render: (o, l) => /* @__PURE__ */ u("span", { children: [
3667
3667
  l.l1.minutes ? `Action taken in (${l.l1.minutes} Mins)` : "No Action taken in 0 Min",
3668
3668
  l.l1.roles?.length ? `, Escalate to (${a(l.l1.roles)})` : ""
3669
3669
  ] })
@@ -3671,7 +3671,7 @@ function Sn({ entries: e, userRoles: t, onEdit: s, loading: r }) {
3671
3671
  {
3672
3672
  title: "Level 2",
3673
3673
  key: "l2",
3674
- render: (o, l) => /* @__PURE__ */ d("span", { children: [
3674
+ render: (o, l) => /* @__PURE__ */ u("span", { children: [
3675
3675
  l.l2.minutes ? `Action taken in (${l.l2.minutes} Mins)` : "No Action taken in 0 Min",
3676
3676
  l.l2.roles?.length ? `, Escalate to (${a(l.l2.roles)})` : ""
3677
3677
  ] })
@@ -3679,7 +3679,7 @@ function Sn({ entries: e, userRoles: t, onEdit: s, loading: r }) {
3679
3679
  {
3680
3680
  title: "Level 3",
3681
3681
  key: "l3",
3682
- render: (o, l) => /* @__PURE__ */ d("span", { children: [
3682
+ render: (o, l) => /* @__PURE__ */ u("span", { children: [
3683
3683
  l.l3.minutes ? `Action taken in (${l.l3.minutes} Mins)` : "No Action taken in 0 Min",
3684
3684
  l.l3.roles?.length ? `, Escalate to (${a(l.l3.roles)})` : ""
3685
3685
  ] })
@@ -3702,7 +3702,7 @@ function Sn({ entries: e, userRoles: t, onEdit: s, loading: r }) {
3702
3702
  {
3703
3703
  title: "Actions",
3704
3704
  key: "ops",
3705
- render: (o, l) => /* @__PURE__ */ i(pe, { type: "text", onClick: () => s(l.id), children: /* @__PURE__ */ i(Ls, {}) })
3705
+ render: (o, l) => /* @__PURE__ */ i(pe, { type: "text", onClick: () => s(l.id), children: /* @__PURE__ */ i($s, {}) })
3706
3706
  }
3707
3707
  ]
3708
3708
  }
@@ -3710,7 +3710,7 @@ function Sn({ entries: e, userRoles: t, onEdit: s, loading: r }) {
3710
3710
  }
3711
3711
  const { Title: An } = _e;
3712
3712
  function Nn({ userRoles: e, rules: t, rawRules: s }) {
3713
- const { rules: r } = Ae(), [n, a] = I(!1), [o, l] = I(s), [h, u] = I({}), c = ue(() => e.map((p) => ({ label: p.userRoleName, value: p.userRoleId })), [e]), N = ue(
3713
+ const { rules: r } = Ae(), [n, a] = C(!1), [o, l] = C(s), [h, d] = C({}), c = ue(() => e.map((p) => ({ label: p.userRoleName, value: p.userRoleId })), [e]), N = ue(
3714
3714
  () => (t || []).map((p, S) => ({
3715
3715
  key: p.RuleId || p.Name || String(S),
3716
3716
  ruleName: p.Name || "-",
@@ -3724,7 +3724,7 @@ function Nn({ userRoles: e, rules: t, rawRules: s }) {
3724
3724
  try {
3725
3725
  a(!0);
3726
3726
  const S = await r.getRules();
3727
- p || (l(Array.isArray(S) ? S : []), u({}));
3727
+ p || (l(Array.isArray(S) ? S : []), d({}));
3728
3728
  } catch {
3729
3729
  !p && Array.isArray(s) && l(s);
3730
3730
  } finally {
@@ -3748,7 +3748,7 @@ function Nn({ userRoles: e, rules: t, rawRules: s }) {
3748
3748
  }
3749
3749
  return p;
3750
3750
  }, [o, N]);
3751
- return /* @__PURE__ */ d("div", { className: "w-full", children: [
3751
+ return /* @__PURE__ */ u("div", { className: "w-full", children: [
3752
3752
  /* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ i(An, { level: 4, className: "!mb-4", children: "Alert Assignment" }) }),
3753
3753
  /* @__PURE__ */ i(
3754
3754
  yt,
@@ -3770,7 +3770,7 @@ function Nn({ userRoles: e, rules: t, rawRules: s }) {
3770
3770
  placeholder: "Dropdown with Multi select",
3771
3771
  className: "w-full",
3772
3772
  value: h[S.key] ?? f[S.key] ?? [],
3773
- onChange: ($) => u((L) => ({ ...L, [S.key]: $ })),
3773
+ onChange: ($) => d((L) => ({ ...L, [S.key]: $ })),
3774
3774
  options: c
3775
3775
  }
3776
3776
  )
@@ -3778,9 +3778,9 @@ function Nn({ userRoles: e, rules: t, rawRules: s }) {
3778
3778
  ]
3779
3779
  }
3780
3780
  ),
3781
- /* @__PURE__ */ d(Se, { className: "mt-4", children: [
3781
+ /* @__PURE__ */ u(Se, { className: "mt-4", children: [
3782
3782
  /* @__PURE__ */ i(pe, { onClick: () => {
3783
- u({});
3783
+ d({});
3784
3784
  }, disabled: n, children: "Clear" }),
3785
3785
  /* @__PURE__ */ i(
3786
3786
  pe,
@@ -3795,22 +3795,22 @@ function Nn({ userRoles: e, rules: t, rawRules: s }) {
3795
3795
  a(!0);
3796
3796
  const p = Object.entries(h).map(async ([S, $]) => {
3797
3797
  const L = o.find(
3798
- (G) => G?.ruleId === S || G?.ruleName === S || G?.RuleId === S
3798
+ (Y) => Y?.ruleId === S || Y?.ruleName === S || Y?.RuleId === S
3799
3799
  ), B = typeof L?.recordId == "number" ? L.recordId : void 0;
3800
3800
  if (!L || typeof B != "number")
3801
3801
  throw new Error(`Unable to find recordId for rule ${S}`);
3802
- const U = Array.isArray($) ? $ : [], Y = U.map((G) => {
3803
- const W = e.find((T) => T.userRoleId === G);
3802
+ const U = Array.isArray($) ? $ : [], K = U.map((Y) => {
3803
+ const G = e.find((T) => T.userRoleId === Y);
3804
3804
  return {
3805
- id: G,
3806
- name: W?.userRoleName ?? String(G)
3805
+ id: Y,
3806
+ name: G?.userRoleName ?? String(Y)
3807
3807
  };
3808
3808
  }), J = {
3809
3809
  ...L,
3810
3810
  ruleId: S,
3811
3811
  // ensure ruleId matches the selected rule
3812
3812
  userRoleIds: U,
3813
- userRoles: Y,
3813
+ userRoles: K,
3814
3814
  actions: [
3815
3815
  {
3816
3816
  actionTypeId: 4,
@@ -3830,7 +3830,7 @@ function Nn({ userRoles: e, rules: t, rawRules: s }) {
3830
3830
  await Promise.all(p), ne.success("Alert assignment saved");
3831
3831
  try {
3832
3832
  const S = await r.getRules();
3833
- l(Array.isArray(S) ? S : []), u({});
3833
+ l(Array.isArray(S) ? S : []), d({});
3834
3834
  } catch (S) {
3835
3835
  console.error("Failed to refresh rules after save", S);
3836
3836
  }
@@ -3850,46 +3850,46 @@ function Nn({ userRoles: e, rules: t, rawRules: s }) {
3850
3850
  }
3851
3851
  const { Title: es } = _e;
3852
3852
  function wn({ severities: e, rules: t, userRoles: s, rawRules: r, onSave: n }) {
3853
- const { rules: a, alerts: o } = Ae(), [l, h] = I("By Severity"), [u, c] = I("By severity"), [N, f] = I("By Severity"), [O, w] = I(!1), [p, S] = I(!1), [$, L] = I(!1), [B, U] = I(null), [Y, J] = I("rules"), [G, W] = I(), [T, x] = I(), [R, se] = I(), [te, k] = I(), [g, m] = I(), [A, y] = I(), [v, b] = I(), [P, M] = I(), [D, j] = I([]), [Q, z] = I([]), [ie, fe] = I(!1), [le, re] = I({}), [C, _] = I({}), [V, Te] = I(s || []), [Re, Le] = I([]), [tt, ke] = I(!1), [st, Tt] = I(!1), [Ee, Rt] = I(r || []);
3853
+ const { rules: a, alerts: o } = Ae(), [l, h] = C("By Severity"), [d, c] = C("By severity"), [N, f] = C("By Severity"), [R, w] = C(!1), [p, S] = C(!1), [$, L] = C(!1), [B, U] = C(null), [K, J] = C("rules"), [Y, G] = C(), [T, I] = C(), [k, te] = C(), [Z, O] = C(), [g, m] = C(), [A, y] = C(), [v, b] = C(), [P, M] = C(), [D, j] = C([]), [Q, z] = C([]), [ie, fe] = C(!1), [le, re] = C({}), [x, _] = C({}), [V, Te] = C(s || []), [Re, Le] = C([]), [tt, ke] = C(!1), [st, Tt] = C(!1), [Ee, Rt] = C(r || []);
3854
3854
  he(() => {
3855
3855
  r && r.length && Rt(r);
3856
3856
  }, [r]), he(() => {
3857
3857
  if (!Ee || !Ee.length) return;
3858
- const E = Object.keys(le).length > 0 || Object.keys(C).length > 0;
3858
+ const E = Object.keys(le).length > 0 || Object.keys(x).length > 0;
3859
3859
  if (Re.length && !E) return;
3860
- const Z = Ee.map((q, F) => {
3861
- const X = t.find((we) => we.RuleId === (q.ruleId || q.ruleName))?.Name || q.ruleName || q.Name || "-", K = q.escalationSettings || {}, ee = typeof K.level1UserRoleId == "number" && K.level1UserRoleId > 0 ? [K.level1UserRoleId] : [], Ne = typeof K.level2UserRoleId == "number" && K.level2UserRoleId > 0 ? [K.level2UserRoleId] : [], rt = typeof K.level3UserRoleId == "number" && K.level3UserRoleId > 0 ? [K.level3UserRoleId] : [], Ot = (Array.isArray(K.escalationSettingsActionTypeIds) ? K.escalationSettingsActionTypeIds : []).map((we) => le[we] || String(we)), Et = (Array.isArray(K.thirdPartyId) ? K.thirdPartyId : []).map((we) => C[we] || String(we)), nt = typeof K.humanLoop == "boolean" ? K.humanLoop : null;
3860
+ const ee = Ee.map((q, F) => {
3861
+ const X = t.find((we) => we.RuleId === (q.ruleId || q.ruleName))?.Name || q.ruleName || q.Name || "-", W = q.escalationSettings || {}, se = typeof W.level1UserRoleId == "number" && W.level1UserRoleId > 0 ? [W.level1UserRoleId] : [], Ne = typeof W.level2UserRoleId == "number" && W.level2UserRoleId > 0 ? [W.level2UserRoleId] : [], rt = typeof W.level3UserRoleId == "number" && W.level3UserRoleId > 0 ? [W.level3UserRoleId] : [], Ot = (Array.isArray(W.escalationSettingsActionTypeIds) ? W.escalationSettingsActionTypeIds : []).map((we) => le[we] || String(we)), Et = (Array.isArray(W.thirdPartyId) ? W.thirdPartyId : []).map((we) => x[we] || String(we)), nt = typeof W.humanLoop == "boolean" ? W.humanLoop : null;
3862
3862
  return {
3863
3863
  id: String(q.ruleId || q.ruleName || F),
3864
3864
  ruleOrSeverityLabel: X,
3865
- l1: { minutes: K.level1PostAssistTime ?? void 0, roles: ee },
3866
- l2: { minutes: K.level2PostAssistTime ?? void 0, roles: Ne },
3867
- l3: { minutes: K.level3PostAssistTime ?? void 0, roles: rt },
3865
+ l1: { minutes: W.level1PostAssistTime ?? void 0, roles: se },
3866
+ l2: { minutes: W.level2PostAssistTime ?? void 0, roles: Ne },
3867
+ l3: { minutes: W.level3PostAssistTime ?? void 0, roles: rt },
3868
3868
  actions: Ot,
3869
3869
  notify: Et,
3870
3870
  humanLoop: nt
3871
3871
  };
3872
3872
  });
3873
- Le(Z);
3874
- }, [Ee, t, le, C]);
3875
- const vs = ue(
3873
+ Le(ee);
3874
+ }, [Ee, t, le, x]);
3875
+ const bs = ue(
3876
3876
  () => e.map((E) => ({ label: E.DisplayName, value: E.SeverityId })),
3877
3877
  [e]
3878
- ), bs = ue(
3878
+ ), Ss = ue(
3879
3879
  () => t.map((E) => ({ label: E.Name, value: E.RuleId })),
3880
3880
  [t]
3881
- ), Ss = ue(
3881
+ ), As = ue(
3882
3882
  () => V.map((E) => ({ label: E.userRoleName, value: E.userRoleId })),
3883
3883
  [V]
3884
- ), As = ue(() => [1, 3, 5, 10, 15, 20, 30, 45, 60].map((E) => ({ label: `${E}`, value: E })), []);
3884
+ ), Ns = ue(() => [1, 3, 5, 10, 15, 20, 30, 45, 60].map((E) => ({ label: `${E}`, value: E })), []);
3885
3885
  he(() => {
3886
3886
  let E = !1;
3887
- async function Z() {
3887
+ async function ee() {
3888
3888
  try {
3889
3889
  L(!0), U(null);
3890
3890
  const q = await o.getAdminSettings();
3891
3891
  if (!E && q) {
3892
- const F = rs(q.sortBy);
3892
+ const F = ns(q.sortBy);
3893
3893
  h(F), f(F), w(!1);
3894
3894
  }
3895
3895
  } catch (q) {
@@ -3901,39 +3901,39 @@ function wn({ severities: e, rules: t, userRoles: s, rawRules: r, onSave: n }) {
3901
3901
  E || L(!1);
3902
3902
  }
3903
3903
  }
3904
- return Z(), () => {
3904
+ return ee(), () => {
3905
3905
  E = !0;
3906
3906
  };
3907
3907
  }, []), he(() => {
3908
3908
  if (!T) return;
3909
3909
  const E = (X) => {
3910
- const K = Number(X);
3911
- return !isNaN(K) && K > 0 ? K : void 0;
3912
- }, Z = (X) => {
3913
- const K = Number(X);
3914
- return !isNaN(K) && K > 0 ? K : void 0;
3910
+ const W = Number(X);
3911
+ return !isNaN(W) && W > 0 ? W : void 0;
3912
+ }, ee = (X) => {
3913
+ const W = Number(X);
3914
+ return !isNaN(W) && W > 0 ? W : void 0;
3915
3915
  }, F = (Ee || []).find(
3916
3916
  (X) => X?.ruleId === T || X?.ruleName === T || X?.RuleId === T
3917
3917
  )?.escalationSettings;
3918
3918
  if (F && typeof F == "object") {
3919
- se(Z(F.level1PostAssistTime)), k(E(F.level1UserRoleId)), m(Z(F.level2PostAssistTime)), y(E(F.level2UserRoleId)), b(Z(F.level3PostAssistTime)), M(E(F.level3UserRoleId));
3919
+ te(ee(F.level1PostAssistTime)), O(E(F.level1UserRoleId)), m(ee(F.level2PostAssistTime)), y(E(F.level2UserRoleId)), b(ee(F.level3PostAssistTime)), M(E(F.level3UserRoleId));
3920
3920
  const X = Array.isArray(F.escalationSettingsActionTypeIds) ? F.escalationSettingsActionTypeIds : [];
3921
- j(X.map((K) => String(K))), z(Array.isArray(F.thirdPartyId) ? F.thirdPartyId : []), fe(!!F.humanLoop);
3921
+ j(X.map((W) => String(W))), z(Array.isArray(F.thirdPartyId) ? F.thirdPartyId : []), fe(!!F.humanLoop);
3922
3922
  }
3923
- }, [Y, T, Ee]);
3924
- const Ns = async () => {
3923
+ }, [K, T, Ee]);
3924
+ const ws = async () => {
3925
3925
  try {
3926
3926
  Tt(!0);
3927
- const E = await a.getRules(), Z = Array.isArray(E) ? E : Array.isArray(E?.data) ? E.data : [];
3928
- Rt(Z);
3929
- const q = Z.map((F, X) => {
3930
- const K = t.find((De) => De.RuleId === (F.ruleId || F.ruleName))?.Name || F.ruleName || F.Name || "-", ee = F.escalationSettings || {}, Ne = typeof ee.level1UserRoleId == "number" && ee.level1UserRoleId > 0 ? [ee.level1UserRoleId] : [], rt = typeof ee.level2UserRoleId == "number" && ee.level2UserRoleId > 0 ? [ee.level2UserRoleId] : [], kt = typeof ee.level3UserRoleId == "number" && ee.level3UserRoleId > 0 ? [ee.level3UserRoleId] : [], Pt = (Array.isArray(ee.escalationSettingsActionTypeIds) ? ee.escalationSettingsActionTypeIds : []).map((De) => le[De] || String(De)), nt = (Array.isArray(ee.thirdPartyId) ? ee.thirdPartyId : []).map((De) => C[De] || String(De)), we = typeof ee.humanLoop == "boolean" ? ee.humanLoop : null;
3927
+ const E = await a.getRules(), ee = Array.isArray(E) ? E : Array.isArray(E?.data) ? E.data : [];
3928
+ Rt(ee);
3929
+ const q = ee.map((F, X) => {
3930
+ const W = t.find((De) => De.RuleId === (F.ruleId || F.ruleName))?.Name || F.ruleName || F.Name || "-", se = F.escalationSettings || {}, Ne = typeof se.level1UserRoleId == "number" && se.level1UserRoleId > 0 ? [se.level1UserRoleId] : [], rt = typeof se.level2UserRoleId == "number" && se.level2UserRoleId > 0 ? [se.level2UserRoleId] : [], kt = typeof se.level3UserRoleId == "number" && se.level3UserRoleId > 0 ? [se.level3UserRoleId] : [], Pt = (Array.isArray(se.escalationSettingsActionTypeIds) ? se.escalationSettingsActionTypeIds : []).map((De) => le[De] || String(De)), nt = (Array.isArray(se.thirdPartyId) ? se.thirdPartyId : []).map((De) => x[De] || String(De)), we = typeof se.humanLoop == "boolean" ? se.humanLoop : null;
3931
3931
  return {
3932
3932
  id: String(F.ruleId || F.ruleName || X),
3933
- ruleOrSeverityLabel: K,
3934
- l1: { minutes: ee.level1PostAssistTime ?? void 0, roles: Ne },
3935
- l2: { minutes: ee.level2PostAssistTime ?? void 0, roles: rt },
3936
- l3: { minutes: ee.level3PostAssistTime ?? void 0, roles: kt },
3933
+ ruleOrSeverityLabel: W,
3934
+ l1: { minutes: se.level1PostAssistTime ?? void 0, roles: Ne },
3935
+ l2: { minutes: se.level2PostAssistTime ?? void 0, roles: rt },
3936
+ l3: { minutes: se.level3PostAssistTime ?? void 0, roles: kt },
3937
3937
  actions: Pt,
3938
3938
  notify: nt,
3939
3939
  humanLoop: we
@@ -3950,29 +3950,29 @@ function wn({ severities: e, rules: t, userRoles: s, rawRules: r, onSave: n }) {
3950
3950
  let E = !1;
3951
3951
  return (async () => {
3952
3952
  try {
3953
- const Z = await a.getLookups();
3954
- if (E || !Z) return;
3953
+ const ee = await a.getLookups();
3954
+ if (E || !ee) return;
3955
3955
  const q = {};
3956
- if (Array.isArray(Z.thirdParties))
3957
- for (const X of Z.thirdParties)
3956
+ if (Array.isArray(ee.thirdParties))
3957
+ for (const X of ee.thirdParties)
3958
3958
  typeof X.thirdPartyId == "number" && (q[X.thirdPartyId] = X.thirdPartyName);
3959
3959
  _(q);
3960
- const F = Array.isArray(Z.userRoles) ? Z.userRoles.map((X) => ({
3960
+ const F = Array.isArray(ee.userRoles) ? ee.userRoles.map((X) => ({
3961
3961
  userRoleId: X.userRoleId ?? X.id,
3962
3962
  userRoleName: X.userRoleName ?? X.name
3963
3963
  })) : [];
3964
3964
  E || Te(F.length ? F : s || []);
3965
- } catch (Z) {
3966
- console.error("Error loading lookups", Z);
3965
+ } catch (ee) {
3966
+ console.error("Error loading lookups", ee);
3967
3967
  }
3968
3968
  })(), () => {
3969
3969
  E = !0;
3970
3970
  };
3971
- }, []), /* @__PURE__ */ d("div", { className: "w-full", children: [
3972
- /* @__PURE__ */ d("div", { className: "mb-6", children: [
3971
+ }, []), /* @__PURE__ */ u("div", { className: "w-full", children: [
3972
+ /* @__PURE__ */ u("div", { className: "mb-6", children: [
3973
3973
  /* @__PURE__ */ i(es, { level: 4, className: "!mb-2", children: "Admin Settings" }),
3974
- /* @__PURE__ */ d(gt, { spinning: $, children: [
3975
- B ? /* @__PURE__ */ d("div", { className: "text-sm text-red-600 mb-2", children: [
3974
+ /* @__PURE__ */ u(gt, { spinning: $, children: [
3975
+ B ? /* @__PURE__ */ u("div", { className: "text-sm text-red-600 mb-2", children: [
3976
3976
  "Failed to load settings: ",
3977
3977
  B
3978
3978
  ] }) : null,
@@ -3980,11 +3980,11 @@ function wn({ severities: e, rules: t, userRoles: s, rawRules: r, onSave: n }) {
3980
3980
  vn,
3981
3981
  {
3982
3982
  sortBy: l,
3983
- groupBy: u,
3983
+ groupBy: d,
3984
3984
  onChange: (E) => {
3985
3985
  E.sortBy && (h(E.sortBy), w(!0)), E.groupBy && (c(E.groupBy), w(!0));
3986
3986
  },
3987
- showActions: O,
3987
+ showActions: R,
3988
3988
  onSave: async () => {
3989
3989
  S(!0);
3990
3990
  try {
@@ -4005,25 +4005,25 @@ function wn({ severities: e, rules: t, userRoles: s, rawRules: r, onSave: n }) {
4005
4005
  ] })
4006
4006
  ] }),
4007
4007
  /* @__PURE__ */ i(Qe, { className: "my-6" }),
4008
- /* @__PURE__ */ d("div", { children: [
4008
+ /* @__PURE__ */ u("div", { children: [
4009
4009
  /* @__PURE__ */ i(es, { level: 4, className: "!mb-4", children: "Escalation Settings" }),
4010
4010
  /* @__PURE__ */ i(
4011
4011
  bn,
4012
4012
  {
4013
- escBasis: Y,
4013
+ escBasis: K,
4014
4014
  setEscBasis: J,
4015
- selectedSeverity: G,
4016
- setSelectedSeverity: W,
4015
+ selectedSeverity: Y,
4016
+ setSelectedSeverity: G,
4017
4017
  selectedRule: T,
4018
- setSelectedRule: x,
4019
- severityOptions: vs,
4020
- ruleOptions: bs,
4021
- minsOptions: As,
4022
- roleOptions: Ss,
4023
- l1mins: R,
4024
- setL1mins: se,
4025
- l1role: te,
4026
- setL1role: k,
4018
+ setSelectedRule: I,
4019
+ severityOptions: bs,
4020
+ ruleOptions: Ss,
4021
+ minsOptions: Ns,
4022
+ roleOptions: As,
4023
+ l1mins: k,
4024
+ setL1mins: te,
4025
+ l1role: Z,
4026
+ setL1role: O,
4027
4027
  l2mins: g,
4028
4028
  setL2mins: m,
4029
4029
  l2role: A,
@@ -4039,13 +4039,13 @@ function wn({ severities: e, rules: t, userRoles: s, rawRules: r, onSave: n }) {
4039
4039
  humanLoop: ie,
4040
4040
  setHumanLoop: fe,
4041
4041
  onClear: () => {
4042
- h("By Severity"), c("By severity"), J("rules"), W(void 0), x(void 0), se(void 0), k(void 0), m(void 0), y(void 0), b(void 0), M(void 0), j([]), z([]), fe(!1);
4042
+ h("By Severity"), c("By severity"), J("rules"), G(void 0), I(void 0), te(void 0), O(void 0), m(void 0), y(void 0), b(void 0), M(void 0), j([]), z([]), fe(!1);
4043
4043
  },
4044
4044
  onSave: async () => {
4045
4045
  ke(!0), n?.({
4046
4046
  ruleId: T,
4047
4047
  levels: [
4048
- { minutes: R, role: te },
4048
+ { minutes: k, role: Z },
4049
4049
  { minutes: g, role: A },
4050
4050
  { minutes: v, role: P }
4051
4051
  ],
@@ -4062,7 +4062,7 @@ function wn({ severities: e, rules: t, userRoles: s, rawRules: r, onSave: n }) {
4062
4062
  ne.error("Unable to find rule recordId for update");
4063
4063
  return;
4064
4064
  }
4065
- const K = {
4065
+ const W = {
4066
4066
  ...F,
4067
4067
  actions: [
4068
4068
  //this will definitely be remoed
@@ -4079,8 +4079,8 @@ function wn({ severities: e, rules: t, userRoles: s, rawRules: r, onSave: n }) {
4079
4079
  }
4080
4080
  ],
4081
4081
  escalationSettings: {
4082
- level1UserRoleId: te ?? 0,
4083
- level1PostAssistTime: R ?? 0,
4082
+ level1UserRoleId: Z ?? 0,
4083
+ level1PostAssistTime: k ?? 0,
4084
4084
  level2UserRoleId: A ?? 0,
4085
4085
  level2PostAssistTime: g ?? 0,
4086
4086
  level3UserRoleId: P ?? 0,
@@ -4089,9 +4089,9 @@ function wn({ severities: e, rules: t, userRoles: s, rawRules: r, onSave: n }) {
4089
4089
  thirdPartyId: Array.isArray(Q) ? Q : [],
4090
4090
  humanLoop: ie
4091
4091
  }
4092
- }, ee = await a.updateRule(X, K);
4093
- if (ee?.responseStatus || ee?.ok || ee) {
4094
- ne.success("Escalation settings saved"), await Ns(), x(void 0), se(void 0), k(void 0), m(void 0), y(void 0), b(void 0), M(void 0), j([]), z([]), fe(!1);
4092
+ }, se = await a.updateRule(X, W);
4093
+ if (se?.responseStatus || se?.ok || se) {
4094
+ ne.success("Escalation settings saved"), await ws(), I(void 0), te(void 0), O(void 0), m(void 0), y(void 0), b(void 0), M(void 0), j([]), z([]), fe(!1);
4095
4095
  return;
4096
4096
  }
4097
4097
  }
@@ -4100,30 +4100,30 @@ function wn({ severities: e, rules: t, userRoles: s, rawRules: r, onSave: n }) {
4100
4100
  } finally {
4101
4101
  ke(!1);
4102
4102
  }
4103
- const Z = t.find((q) => q.RuleId === T)?.Name || "-";
4103
+ const ee = t.find((q) => q.RuleId === T)?.Name || "-";
4104
4104
  Le((q) => [
4105
4105
  ...q,
4106
4106
  {
4107
4107
  id: `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
4108
- ruleOrSeverityLabel: Z,
4109
- l1: { minutes: R, roles: te ? [te] : [] },
4108
+ ruleOrSeverityLabel: ee,
4109
+ l1: { minutes: k, roles: Z ? [Z] : [] },
4110
4110
  l2: { minutes: g, roles: A ? [A] : [] },
4111
4111
  l3: { minutes: v, roles: P ? [P] : [] },
4112
4112
  actions: (Array.isArray(D) ? D : []).map((F) => {
4113
4113
  const X = Number(F);
4114
4114
  return le[X] || String(F);
4115
4115
  }),
4116
- notify: (Array.isArray(Q) ? Q : []).map((F) => C[F] || String(F)),
4116
+ notify: (Array.isArray(Q) ? Q : []).map((F) => x[F] || String(F)),
4117
4117
  humanLoop: !!ie
4118
4118
  }
4119
4119
  ]);
4120
4120
  },
4121
4121
  saving: tt,
4122
4122
  onActionTypesLoaded: (E) => {
4123
- const Z = {};
4123
+ const ee = {};
4124
4124
  for (const q of E)
4125
- typeof q.actionTypeId == "number" && (Z[q.actionTypeId] = q.name);
4126
- re(Z);
4125
+ typeof q.actionTypeId == "number" && (ee[q.actionTypeId] = q.name);
4126
+ re(ee);
4127
4127
  }
4128
4128
  }
4129
4129
  )
@@ -4137,8 +4137,8 @@ function wn({ severities: e, rules: t, userRoles: s, rawRules: r, onSave: n }) {
4137
4137
  loading: st,
4138
4138
  onEdit: (E) => {
4139
4139
  J("rules");
4140
- const Z = Re.find((F) => F.id === E), q = t.find((F) => F.RuleId === E) || (Z ? t.find((F) => F.Name === Z.ruleOrSeverityLabel) : void 0);
4141
- x(q ? q.RuleId : E);
4140
+ const ee = Re.find((F) => F.id === E), q = t.find((F) => F.RuleId === E) || (ee ? t.find((F) => F.Name === ee.ruleOrSeverityLabel) : void 0);
4141
+ I(q ? q.RuleId : E);
4142
4142
  }
4143
4143
  }
4144
4144
  ),
@@ -4147,28 +4147,28 @@ function wn({ severities: e, rules: t, userRoles: s, rawRules: r, onSave: n }) {
4147
4147
  /* @__PURE__ */ i(Qe, {})
4148
4148
  ] });
4149
4149
  }
4150
- const { Title: ts, Text: Ye } = _e;
4150
+ const { Title: ts, Text: Ke } = _e;
4151
4151
  function xn({ severities: e, rules: t, onSave: s, onCancel: r }) {
4152
4152
  const { rules: n, alerts: a } = Ae(), o = [
4153
4153
  { label: "By Severity", value: "By Severity" },
4154
4154
  { label: "By Created Date", value: "By Created Date" }
4155
- ], [l, h] = I("By Severity"), [u, c] = I(/* @__PURE__ */ new Set()), [N, f] = I(null), [O, w] = I(null), [p, S] = I({ inApp: !1, sms: !1, email: !1 }), [$, L] = I([]), [B, U] = I(!0), [Y, J] = I(!1);
4155
+ ], [l, h] = C("By Severity"), [d, c] = C(/* @__PURE__ */ new Set()), [N, f] = C(null), [R, w] = C(null), [p, S] = C({ inApp: !1, sms: !1, email: !1 }), [$, L] = C([]), [B, U] = C(!0), [K, J] = C(!1);
4156
4156
  he(() => {
4157
4157
  let T = !1;
4158
4158
  return (async () => {
4159
4159
  try {
4160
- const x = await a.getPreferenceSettings();
4161
- if (T || !x) return;
4160
+ const I = await a.getPreferenceSettings();
4161
+ if (T || !I) return;
4162
4162
  S({
4163
- inApp: !!x.inApp,
4163
+ inApp: !!I.inApp,
4164
4164
  //convert to bool - as the resp is str
4165
- sms: !!x.sms,
4166
- email: !!x.email
4165
+ sms: !!I.sms,
4166
+ email: !!I.email
4167
4167
  });
4168
- const R = rs(x.sortBy);
4169
- h(R === "By Created Date" ? "By Created Date" : "By Severity"), f(Bt(x.doNotDisturbStart)), w(Bt(x.doNotDisturbEnd)), Array.isArray(x.anomalyIds) && c(new Set(x.anomalyIds.map((se) => String(se))));
4170
- } catch (x) {
4171
- console.error("Error in loading my preferences: ", x);
4168
+ const k = ns(I.sortBy);
4169
+ h(k === "By Created Date" ? "By Created Date" : "By Severity"), f(Bt(I.doNotDisturbStart)), w(Bt(I.doNotDisturbEnd)), Array.isArray(I.anomalyIds) && c(new Set(I.anomalyIds.map((te) => String(te))));
4170
+ } catch (I) {
4171
+ console.error("Error in loading my preferences: ", I);
4172
4172
  }
4173
4173
  })(), () => {
4174
4174
  T = !0;
@@ -4178,12 +4178,12 @@ function xn({ severities: e, rules: t, onSave: s, onCancel: r }) {
4178
4178
  return (async () => {
4179
4179
  try {
4180
4180
  U(!0);
4181
- const x = await n.getLookups();
4182
- if (T || !x) return;
4183
- const R = Array.isArray(x.anomalies) ? x.anomalies : [];
4184
- L(R);
4185
- } catch (x) {
4186
- console.error("Failed to load anomalies lookups", x);
4181
+ const I = await n.getLookups();
4182
+ if (T || !I) return;
4183
+ const k = Array.isArray(I.anomalies) ? I.anomalies : [];
4184
+ L(k);
4185
+ } catch (I) {
4186
+ console.error("Failed to load anomalies lookups", I);
4187
4187
  } finally {
4188
4188
  T || U(!1);
4189
4189
  }
@@ -4191,83 +4191,83 @@ function xn({ severities: e, rules: t, onSave: s, onCancel: r }) {
4191
4191
  T = !0;
4192
4192
  };
4193
4193
  }, []);
4194
- const G = (T) => {
4195
- c((x) => {
4196
- const R = new Set(x);
4197
- return R.has(T) ? R.delete(T) : R.add(T), R;
4194
+ const Y = (T) => {
4195
+ c((I) => {
4196
+ const k = new Set(I);
4197
+ return k.has(T) ? k.delete(T) : k.add(T), k;
4198
4198
  });
4199
- }, W = async () => {
4199
+ }, G = async () => {
4200
4200
  s?.({
4201
4201
  sortBy: l,
4202
- subscribedRuleIds: Array.from(u),
4202
+ subscribedRuleIds: Array.from(d),
4203
4203
  dnd: {
4204
4204
  from: N,
4205
- to: O
4205
+ to: R
4206
4206
  },
4207
4207
  channels: p
4208
4208
  });
4209
4209
  try {
4210
4210
  J(!0);
4211
- const T = N ? N.format?.("HH:mm:ss") ?? "00:00:00" : "00:00:00", x = O ? O.format?.("HH:mm:ss") ?? "00:00:00" : "00:00:00", R = Array.from(u).map((te) => Number(te)).filter((te) => Number.isFinite(te)), se = await a.setPreferenceSettings({
4212
- anomalyIds: R,
4211
+ const T = N ? N.format?.("HH:mm:ss") ?? "00:00:00" : "00:00:00", I = R ? R.format?.("HH:mm:ss") ?? "00:00:00" : "00:00:00", k = Array.from(d).map((Z) => Number(Z)).filter((Z) => Number.isFinite(Z)), te = await a.setPreferenceSettings({
4212
+ anomalyIds: k,
4213
4213
  doNotDisturbStart: T,
4214
- doNotDisturbEnd: x,
4214
+ doNotDisturbEnd: I,
4215
4215
  inApp: !!p.inApp,
4216
4216
  sms: !!p.sms,
4217
4217
  email: !!p.email,
4218
4218
  sortBy: l
4219
4219
  });
4220
- se?.responseStatus && ne.success(se?.data || "Preferences updated successfully.");
4220
+ te?.responseStatus && ne.success(te?.data || "Preferences updated successfully.");
4221
4221
  } catch (T) {
4222
4222
  console.error("Error in saving my preferences: ", T);
4223
4223
  } finally {
4224
4224
  J(!1);
4225
4225
  }
4226
4226
  };
4227
- return /* @__PURE__ */ d("div", { className: "w-full", children: [
4228
- /* @__PURE__ */ i(ye, { gutter: [16, 16], align: "middle", className: "mb-4", children: /* @__PURE__ */ i(H, { xs: 24, md: 8, children: /* @__PURE__ */ d(Se, { direction: "horizontal", size: 12, className: "w-full items-center", children: [
4229
- /* @__PURE__ */ i(Ye, { className: "text-gray-600", children: "Sort By:" }),
4227
+ return /* @__PURE__ */ u("div", { className: "w-full", children: [
4228
+ /* @__PURE__ */ i(ye, { gutter: [16, 16], align: "middle", className: "mb-4", children: /* @__PURE__ */ i(H, { xs: 24, md: 8, children: /* @__PURE__ */ u(Se, { direction: "horizontal", size: 12, className: "w-full items-center", children: [
4229
+ /* @__PURE__ */ i(Ke, { className: "text-gray-600", children: "Sort By:" }),
4230
4230
  /* @__PURE__ */ i(me, { className: "w-[240px]", value: l, options: o, onChange: h })
4231
4231
  ] }) }) }),
4232
- /* @__PURE__ */ d("div", { className: "mb-4", children: [
4232
+ /* @__PURE__ */ u("div", { className: "mb-4", children: [
4233
4233
  /* @__PURE__ */ i(ts, { level: 5, className: "!mb-2", children: "Anomalies" }),
4234
4234
  B ? /* @__PURE__ */ i("div", { className: "py-4", children: /* @__PURE__ */ i(gt, {}) }) : /* @__PURE__ */ i(Se, { direction: "vertical", size: 10, className: "w-full", children: (Array.isArray($) ? $ : []).map((T) => {
4235
- const x = String(T.recordId), R = T.anomalyName;
4236
- return /* @__PURE__ */ i(je, { checked: u.has(x), onChange: () => G(x), children: R }, x);
4235
+ const I = String(T.recordId), k = T.anomalyName;
4236
+ return /* @__PURE__ */ i(je, { checked: d.has(I), onChange: () => Y(I), children: k }, I);
4237
4237
  }) })
4238
4238
  ] }),
4239
- /* @__PURE__ */ d("div", { className: "mb-4", children: [
4239
+ /* @__PURE__ */ u("div", { className: "mb-4", children: [
4240
4240
  /* @__PURE__ */ i(ts, { level: 5, className: "!mb-2", children: "Notification Timing & Channels" }),
4241
- /* @__PURE__ */ i(ye, { gutter: [16, 16], align: "middle", className: "mb-3", children: /* @__PURE__ */ i(H, { xs: 24, md: 12, children: /* @__PURE__ */ d(Se, { direction: "horizontal", size: 12, className: "w-full items-center", children: [
4242
- /* @__PURE__ */ i(Ye, { children: "Do Not Disturb mode:" }),
4243
- /* @__PURE__ */ d(Se, { size: 12, className: "w-full", children: [
4244
- /* @__PURE__ */ d(Se, { direction: "horizontal", size: 8, className: "items-center", children: [
4245
- /* @__PURE__ */ i(Ye, { children: "From" }),
4241
+ /* @__PURE__ */ i(ye, { gutter: [16, 16], align: "middle", className: "mb-3", children: /* @__PURE__ */ i(H, { xs: 24, md: 12, children: /* @__PURE__ */ u(Se, { direction: "horizontal", size: 12, className: "w-full items-center", children: [
4242
+ /* @__PURE__ */ i(Ke, { children: "Do Not Disturb mode:" }),
4243
+ /* @__PURE__ */ u(Se, { size: 12, className: "w-full", children: [
4244
+ /* @__PURE__ */ u(Se, { direction: "horizontal", size: 8, className: "items-center", children: [
4245
+ /* @__PURE__ */ i(Ke, { children: "From" }),
4246
4246
  /* @__PURE__ */ i(Dt, { value: N, onChange: (T) => f(T), format: "HH:mm" })
4247
4247
  ] }),
4248
- /* @__PURE__ */ d(Se, { direction: "horizontal", size: 8, className: "items-center", children: [
4249
- /* @__PURE__ */ i(Ye, { children: "To" }),
4250
- /* @__PURE__ */ i(Dt, { value: O, onChange: (T) => w(T), format: "HH:mm" })
4248
+ /* @__PURE__ */ u(Se, { direction: "horizontal", size: 8, className: "items-center", children: [
4249
+ /* @__PURE__ */ i(Ke, { children: "To" }),
4250
+ /* @__PURE__ */ i(Dt, { value: R, onChange: (T) => w(T), format: "HH:mm" })
4251
4251
  ] })
4252
4252
  ] })
4253
4253
  ] }) }) }),
4254
- /* @__PURE__ */ d(ye, { gutter: [24, 12], children: [
4254
+ /* @__PURE__ */ u(ye, { gutter: [24, 12], children: [
4255
4255
  /* @__PURE__ */ i(H, { children: /* @__PURE__ */ i(je, { checked: p.inApp, onChange: (T) => S({ ...p, inApp: T.target.checked }), children: "In-app" }) }),
4256
4256
  /* @__PURE__ */ i(H, { children: /* @__PURE__ */ i(je, { checked: p.sms, onChange: (T) => S({ ...p, sms: T.target.checked }), children: "SMS" }) }),
4257
4257
  /* @__PURE__ */ i(H, { children: /* @__PURE__ */ i(je, { checked: p.email, onChange: (T) => S({ ...p, email: T.target.checked }), children: "Email" }) })
4258
4258
  ] })
4259
4259
  ] }),
4260
4260
  /* @__PURE__ */ i(Qe, {}),
4261
- /* @__PURE__ */ d(Se, { className: "gap-3", children: [
4262
- /* @__PURE__ */ i(pe, { onClick: r, disabled: Y, children: "Cancel" }),
4263
- /* @__PURE__ */ i(pe, { type: "primary", onClick: W, loading: Y, children: "Save" })
4261
+ /* @__PURE__ */ u(Se, { className: "gap-3", children: [
4262
+ /* @__PURE__ */ i(pe, { onClick: r, disabled: K, children: "Cancel" }),
4263
+ /* @__PURE__ */ i(pe, { type: "primary", onClick: G, loading: K, children: "Save" })
4264
4264
  ] })
4265
4265
  ] });
4266
4266
  }
4267
- function Cn({ severities: e, rules: t, userRoles: s, rawRules: r }) {
4268
- const [n, a] = I("global");
4269
- return /* @__PURE__ */ d("div", { className: "w-full", children: [
4270
- /* @__PURE__ */ d("div", { className: "inline-flex rounded-xl overflow-hidden border border-gray-200 mb-4", children: [
4267
+ function In({ severities: e, rules: t, userRoles: s, rawRules: r }) {
4268
+ const [n, a] = C("global");
4269
+ return /* @__PURE__ */ u("div", { className: "w-full", children: [
4270
+ /* @__PURE__ */ u("div", { className: "inline-flex rounded-xl overflow-hidden border border-gray-200 mb-4", children: [
4271
4271
  /* @__PURE__ */ i(
4272
4272
  "button",
4273
4273
  {
@@ -4289,12 +4289,12 @@ function Cn({ severities: e, rules: t, userRoles: s, rawRules: r }) {
4289
4289
  n === "global" ? /* @__PURE__ */ i(wn, { severities: e, rules: t, userRoles: s, rawRules: r }) : /* @__PURE__ */ i(xn, { severities: e, rules: t })
4290
4290
  ] });
4291
4291
  }
4292
- const In = "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=", Tn = "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";
4292
+ const Cn = "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=", Tn = "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";
4293
4293
  function Rn(e) {
4294
- const t = (e.status || "").toLowerCase() === "completed" ? /* @__PURE__ */ i("img", { src: In, alt: "completed", style: { width: 20, height: 20 } }) : /* @__PURE__ */ i("img", { src: Tn, alt: "pending", style: { width: 20, height: 20 } });
4294
+ const t = (e.status || "").toLowerCase() === "completed" ? /* @__PURE__ */ i("img", { src: Cn, alt: "completed", style: { width: 20, height: 20 } }) : /* @__PURE__ */ i("img", { src: Tn, alt: "pending", style: { width: 20, height: 20 } });
4295
4295
  return {
4296
- title: /* @__PURE__ */ d("div", { className: "flex flex-col gap-0 min-w-0", children: [
4297
- /* @__PURE__ */ d("div", { className: "flex flex-col", children: [
4296
+ title: /* @__PURE__ */ u("div", { className: "flex flex-col gap-0 min-w-0", children: [
4297
+ /* @__PURE__ */ u("div", { className: "flex flex-col", children: [
4298
4298
  /* @__PURE__ */ i("span", { className: "block text-sm break-words mb-1 overflow-visible whitespace-normal", children: /* @__PURE__ */ i("b", { children: e.title }) }),
4299
4299
  e.description ? /* @__PURE__ */ i("span", { className: "text-gray-500 text-xs", children: e.description }) : null
4300
4300
  ] }),
@@ -4313,29 +4313,29 @@ function kn({ data: e }) {
4313
4313
  {
4314
4314
  key: "action",
4315
4315
  label: "Action Taken",
4316
- children: /* @__PURE__ */ d("div", { className: "w-full", children: [
4317
- /* @__PURE__ */ i(it, { className: "mb-4 rounded-md p-4", bordered: !0, children: /* @__PURE__ */ d("div", { className: "grid grid-cols-4 gap-6 text-xs", children: [
4318
- /* @__PURE__ */ d("div", { className: "flex flex-col gap-1", children: [
4316
+ children: /* @__PURE__ */ u("div", { className: "w-full", children: [
4317
+ /* @__PURE__ */ i(it, { className: "mb-4 rounded-md p-4", bordered: !0, children: /* @__PURE__ */ u("div", { className: "grid grid-cols-4 gap-6 text-xs", children: [
4318
+ /* @__PURE__ */ u("div", { className: "flex flex-col gap-1", children: [
4319
4319
  /* @__PURE__ */ i("span", { className: "text-gray-500", children: "Alert ID" }),
4320
4320
  /* @__PURE__ */ i("span", { className: "text-black", children: e.summary.alertNumber })
4321
4321
  ] }),
4322
- /* @__PURE__ */ d("div", { className: "flex flex-col gap-1", children: [
4322
+ /* @__PURE__ */ u("div", { className: "flex flex-col gap-1", children: [
4323
4323
  /* @__PURE__ */ i("span", { className: "text-gray-500", children: "Incident ID" }),
4324
4324
  /* @__PURE__ */ i("span", { className: "text-black", children: e.summary.incidentId })
4325
4325
  ] }),
4326
- /* @__PURE__ */ d("div", { className: "flex flex-col gap-1", children: [
4326
+ /* @__PURE__ */ u("div", { className: "flex flex-col gap-1", children: [
4327
4327
  /* @__PURE__ */ i("span", { className: "text-gray-500", children: "Severity" }),
4328
4328
  /* @__PURE__ */ i("span", { className: "text-black", children: e.summary.severity })
4329
4329
  ] }),
4330
- /* @__PURE__ */ d("div", { className: "flex flex-col gap-1", children: [
4330
+ /* @__PURE__ */ u("div", { className: "flex flex-col gap-1", children: [
4331
4331
  /* @__PURE__ */ i("span", { className: "text-gray-500", children: "Location" }),
4332
4332
  /* @__PURE__ */ i("span", { className: "text-black", children: e.summary.location })
4333
4333
  ] })
4334
4334
  ] }) }),
4335
- /* @__PURE__ */ d(it, { className: "rounded-md p-4", bordered: !0, children: [
4335
+ /* @__PURE__ */ u(it, { className: "rounded-md p-4", bordered: !0, children: [
4336
4336
  /* @__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" }) }),
4337
4337
  /* @__PURE__ */ i("div", { className: "mt-2", children: /* @__PURE__ */ i(
4338
- Ps,
4338
+ Es,
4339
4339
  {
4340
4340
  direction: "vertical",
4341
4341
  size: "small",
@@ -4349,47 +4349,54 @@ function kn({ data: e }) {
4349
4349
  {
4350
4350
  key: "notification",
4351
4351
  label: "Notification Sent",
4352
- children: /* @__PURE__ */ d("div", { className: "grid grid-cols-2 gap-4", children: [
4353
- (e.notifications || []).map((t, s) => /* @__PURE__ */ d(it, { className: "rounded-md p-4", bordered: !0, children: [
4354
- /* @__PURE__ */ d("div", { className: "flex items-start justify-between", children: [
4355
- /* @__PURE__ */ d("div", { className: "flex flex-col", children: [
4352
+ children: /* @__PURE__ */ u("div", { className: "grid grid-cols-2 gap-4", children: [
4353
+ (e.notifications || []).map((t, s) => /* @__PURE__ */ u(it, { className: "rounded-md p-4", bordered: !0, children: [
4354
+ /* @__PURE__ */ u("div", { className: "flex items-start justify-between", children: [
4355
+ /* @__PURE__ */ u("div", { className: "flex flex-col", children: [
4356
4356
  /* @__PURE__ */ i("h4", { className: "text-sm text-black font-medium", children: t.channelLabel }),
4357
- /* @__PURE__ */ i("span", { className: "text-xs text-gray-500 mt-1", children: t.sentAt })
4357
+ /* @__PURE__ */ i("span", { className: "text-xs text-gray-500 mt-1", children: rs(t.sentAt)?.format("MM/DD/YYYY HH:mm:ss") })
4358
4358
  ] }),
4359
- /* @__PURE__ */ d("span", { className: "text-[11px] px-2 py-1 rounded-full bg-green-50 text-green-700 border border-green-200", children: [
4359
+ /* @__PURE__ */ u("span", { className: "text-[11px] px-2 py-1 rounded-full bg-green-50 text-green-700 border border-green-200", children: [
4360
4360
  t.delivered,
4361
4361
  "/",
4362
4362
  t.total,
4363
4363
  " Delivered"
4364
4364
  ] })
4365
4365
  ] }),
4366
- /* @__PURE__ */ d("div", { className: "mt-4 text-xs", children: [
4367
- /* @__PURE__ */ d("div", { className: "text-black", children: [
4366
+ /* @__PURE__ */ u("div", { className: "mt-4 text-xs", children: [
4367
+ /* @__PURE__ */ u("div", { className: "text-black", children: [
4368
4368
  " ",
4369
4369
  t.messageTitle
4370
4370
  ] }),
4371
4371
  t.messageBody ? /* @__PURE__ */ i("div", { className: "text-gray-600", children: t.messageBody }) : null
4372
4372
  ] }),
4373
- /* @__PURE__ */ d("div", { className: "mt-4", children: [
4374
- /* @__PURE__ */ d("div", { className: "text-xs text-black font-medium", children: [
4373
+ /* @__PURE__ */ u("div", { className: "mt-4", children: [
4374
+ /* @__PURE__ */ u("div", { className: "text-xs text-black font-medium", children: [
4375
4375
  "Recipients (",
4376
4376
  t.total,
4377
4377
  ")"
4378
4378
  ] }),
4379
- /* @__PURE__ */ i("div", { className: "mt-2 flex flex-col gap-3 text-xs", children: (t.recipients || []).map((r, n) => /* @__PURE__ */ d("div", { className: "flex items-center justify-between", children: [
4380
- /* @__PURE__ */ d("div", { className: "flex flex-col", children: [
4381
- /* @__PURE__ */ i("span", { className: "text-black", children: r.name }),
4382
- /* @__PURE__ */ d("span", { className: "text-gray-500", children: [
4383
- r.role,
4384
- " . ",
4385
- r.phone
4386
- ] })
4387
- ] }),
4388
- /* @__PURE__ */ i("span", { className: `text-[11px] px-3 py-[2px] rounded ${r.status === "Delivered" ? "bg-green-50 text-green-700 border border-green-200" : "bg-red-50 text-red-700 border border-red-200"}`, children: r.status })
4389
- ] }, n)) })
4379
+ /* @__PURE__ */ i("div", { className: "mt-2 flex flex-col gap-3 text-xs", children: (t.recipients || []).map((r, n) => {
4380
+ const a = String(r?.notificationReceipientType || "").toLowerCase() === "EscalationNotification".toLowerCase();
4381
+ return /* @__PURE__ */ u("div", { className: "flex items-center justify-between", children: [
4382
+ /* @__PURE__ */ u("div", { className: "flex flex-col", children: [
4383
+ /* @__PURE__ */ u("span", { className: "text-black", children: [
4384
+ r.name,
4385
+ " - ",
4386
+ /* @__PURE__ */ i("span", { style: { color: a ? "#FF3B30" : "#FFB86A" }, children: a ? "Escalation Notification" : "Alert Notification" })
4387
+ ] }),
4388
+ /* @__PURE__ */ u("span", { className: "text-gray-500", children: [
4389
+ r.role,
4390
+ " . ",
4391
+ r.phone
4392
+ ] })
4393
+ ] }),
4394
+ /* @__PURE__ */ i("span", { className: `text-[11px] px-3 py-[2px] rounded ${r.status === "Delivered" ? "bg-green-50 text-green-700 border border-green-200" : "bg-red-50 text-red-700 border border-red-200"}`, children: r.status })
4395
+ ] }, n);
4396
+ }) })
4390
4397
  ] })
4391
4398
  ] }, s)),
4392
- e.notifications?.length ? null : /* @__PURE__ */ i("span", { className: "text-gray-500 text-xs", children: "No notifications." })
4399
+ e?.notifications?.length ? null : /* @__PURE__ */ i("span", { className: "text-gray-500 text-xs", children: "No notifications." })
4393
4400
  ] })
4394
4401
  }
4395
4402
  // {
@@ -4468,13 +4475,13 @@ const Dn = {
4468
4475
  Medium: "#FEF9C2",
4469
4476
  Low: "#E0EDFF"
4470
4477
  }, Mn = ({ isModalOpen: e, handleModalClose: t, selectedRow: s, fetchAlertLogs: r, alertStatusList: n = [], alertStatusLoading: a = !1, initialTab: o = "details" }) => {
4471
- const [l, h] = I(), [u, c] = I(""), [N, f] = I(!1), O = Is(null), [w, p] = I("details"), [S, $] = I(void 0), [L, B] = I(!1), U = ys(), { alerts: Y, config: J } = Ae(), G = J?.tenant === "schools", W = s?.originalData || {}, {
4478
+ const [l, h] = C(), [d, c] = C(""), [N, f] = C(!1), R = Ts(null), [w, p] = C("details"), [S, $] = C(void 0), [L, B] = C(!1), U = gs(), { alerts: K, config: J } = Ae(), Y = J?.tenant === "schools", G = s?.originalData || {}, {
4472
4479
  eventName: T,
4473
- alertId: x,
4474
- timestamp: R,
4475
- description: se,
4476
- spaceName: te,
4477
- assignTeam: k,
4480
+ alertId: I,
4481
+ timestamp: k,
4482
+ description: te,
4483
+ spaceName: Z,
4484
+ assignTeam: O,
4478
4485
  priority: g,
4479
4486
  statusType: m,
4480
4487
  id: A,
@@ -4482,18 +4489,19 @@ const Dn = {
4482
4489
  statusHistory: v,
4483
4490
  mediaDetails: b,
4484
4491
  alertNumber: P
4485
- } = W, M = !G && typeof W?.anomalyName == "string" && String(W?.anomalyName || "").toLowerCase().includes("elopement"), D = (C) => {
4486
- const _ = String(C || "").toLowerCase();
4492
+ } = G, M = !Y && typeof G?.anomalyName == "string" && String(G?.anomalyName || "").toLowerCase().includes("elopement"), D = (x) => {
4493
+ const _ = String(x || "").toLowerCase();
4487
4494
  return _ === "delivered" ? "Delivered" : _ === "failed" ? "Failed" : "Queued";
4488
- }, j = (C) => ({
4489
- name: C?.receipientName || C?.recipientName || "-",
4490
- role: C?.receipientRoleName || "",
4491
- phone: C?.receipentPhoneNumber || C?.recipientPhoneNumber || C?.receipientEmail || C?.recipientEmail || "",
4492
- status: D(C?.messageStatus)
4493
- }), Q = (C, _) => {
4494
- const V = _.map(j), Te = V.filter((ke) => ke.status === "Delivered").length, Re = _.map((ke) => ke?.sentAt).filter(Boolean).sort((ke, st) => new Date(st).getTime() - new Date(ke).getTime())[0], Le = _[0] || {}, tt = [Le?.severityName, Le?.anomalyName].filter(Boolean).join(" - ") || `${C} Notification`;
4495
+ }, j = (x) => ({
4496
+ name: x?.receipientName || x?.recipientName || "-",
4497
+ role: x?.receipientRoleName || "",
4498
+ phone: x?.receipentPhoneNumber || x?.recipientPhoneNumber || x?.receipientEmail || x?.recipientEmail || "",
4499
+ status: D(x?.messageStatus),
4500
+ notificationReceipientType: x?.notificationReceipientType || ""
4501
+ }), Q = (x, _) => {
4502
+ const V = _.map(j), Te = V.filter((ke) => ke.status === "Delivered").length, Re = _.map((ke) => ke?.sentAt).filter(Boolean).sort((ke, st) => new Date(st).getTime() - new Date(ke).getTime())[0], Le = _[0] || {}, tt = [Le?.severityName, Le?.anomalyName].filter(Boolean).join(" - ") || `${x} Notification`;
4495
4503
  return {
4496
- channelLabel: `${C} Notification`,
4504
+ channelLabel: `${x} Notification`,
4497
4505
  sentAt: Re || "",
4498
4506
  messageTitle: tt,
4499
4507
  messageBody: "",
@@ -4501,15 +4509,15 @@ const Dn = {
4501
4509
  delivered: Te,
4502
4510
  recipients: V
4503
4511
  };
4504
- }, z = (C) => {
4512
+ }, z = (x) => {
4505
4513
  const _ = /* @__PURE__ */ new Map();
4506
- return (C || []).forEach((V) => {
4514
+ return (x || []).forEach((V) => {
4507
4515
  const Te = String(V?.notificationType || "Unknown"), Re = _.get(Te) || [];
4508
4516
  Re.push(V), _.set(Te, Re);
4509
4517
  }), Array.from(_.entries()).map(([V, Te]) => Q(V, Te));
4510
- }, ie = async (C) => {
4518
+ }, ie = async (x) => {
4511
4519
  try {
4512
- const _ = await Y.getAlertNotifications(C), V = z(_);
4520
+ const _ = await K.getAlertNotifications(x), V = z(_);
4513
4521
  $(V);
4514
4522
  } catch {
4515
4523
  $(void 0);
@@ -4517,28 +4525,28 @@ const Dn = {
4517
4525
  };
4518
4526
  he(() => {
4519
4527
  if (w !== "track" || !A) return;
4520
- let C = !1;
4528
+ let x = !1;
4521
4529
  return ie(A).then(() => {
4522
- C && $(void 0);
4530
+ x && $(void 0);
4523
4531
  }), () => {
4524
- C = !0;
4532
+ x = !0;
4525
4533
  };
4526
4534
  }, [w, A]), he(() => {
4527
4535
  e && p(o);
4528
4536
  }, [e, o]);
4529
- const fe = (n || []).map((C) => ({
4530
- value: C.value,
4531
- label: C.statusName
4537
+ const fe = (n || []).map((x) => ({
4538
+ value: x.value,
4539
+ label: x.statusName
4532
4540
  })), le = async () => {
4533
4541
  try {
4534
4542
  f(!0);
4535
- const C = {
4536
- alertUniqueId: x,
4543
+ const x = {
4544
+ alertUniqueId: I,
4537
4545
  alertId: A,
4538
4546
  status: l ? String(l) : void 0,
4539
- notes: u.trim(),
4547
+ notes: d.trim(),
4540
4548
  modifiedBy: 0
4541
- }, _ = await U.mutateAsync(C);
4549
+ }, _ = await U.mutateAsync(x);
4542
4550
  if (_?.responseStatus) {
4543
4551
  const V = _?.data || "Alert updated successfully.";
4544
4552
  ne.success(V, {
@@ -4551,8 +4559,8 @@ const Dn = {
4551
4559
  const V = _?.errorMessage || "Failed to update alert status";
4552
4560
  ne.error(V);
4553
4561
  }
4554
- } catch (C) {
4555
- console.error("Error updating alert status:", C), ne.error("Failed to update alert status. Please try again.");
4562
+ } catch (x) {
4563
+ console.error("Error updating alert status:", x), ne.error("Failed to update alert status. Please try again.");
4556
4564
  } finally {
4557
4565
  f(!1);
4558
4566
  }
@@ -4563,12 +4571,12 @@ const Dn = {
4563
4571
  return;
4564
4572
  }
4565
4573
  B(!0);
4566
- const C = A;
4567
- if (!Y.notifyFamilyMembers) {
4574
+ const x = A;
4575
+ if (!K.notifyFamilyMembers) {
4568
4576
  ne.error("Notify Family is not supported.");
4569
4577
  return;
4570
4578
  }
4571
- const _ = await Y.notifyFamilyMembers(C);
4579
+ const _ = await K.notifyFamilyMembers(x);
4572
4580
  if (_?.responseStatus) {
4573
4581
  const V = _?.data || "Alert Notifications sent to Family Members.";
4574
4582
  ne.success(V);
@@ -4576,14 +4584,14 @@ const Dn = {
4576
4584
  const V = _?.errorMessage || "Failed to send notifications.";
4577
4585
  ne.error(V);
4578
4586
  }
4579
- } catch (C) {
4580
- console.error("Error notifying family members:", C), ne.error("Failed to send notifications. Please try again.");
4587
+ } catch (x) {
4588
+ console.error("Error notifying family members:", x), ne.error("Failed to send notifications. Please try again.");
4581
4589
  } finally {
4582
4590
  B(!1);
4583
4591
  }
4584
4592
  };
4585
4593
  return /* @__PURE__ */ i(
4586
- Es,
4594
+ Ds,
4587
4595
  {
4588
4596
  open: e,
4589
4597
  onCancel: t,
@@ -4594,7 +4602,7 @@ const Dn = {
4594
4602
  overflowY: "auto"
4595
4603
  }
4596
4604
  },
4597
- footer: w === "details" ? /* @__PURE__ */ d("div", { className: "flex flex-row gap-2 justify-start", children: [
4605
+ footer: w === "details" ? /* @__PURE__ */ u("div", { className: "flex flex-row gap-2 justify-start", children: [
4598
4606
  /* @__PURE__ */ i(pe, { onClick: t, className: "bg-[#6C757D] text-white", children: "Cancel" }),
4599
4607
  /* @__PURE__ */ i(
4600
4608
  pe,
@@ -4610,15 +4618,15 @@ const Dn = {
4610
4618
  vt,
4611
4619
  {
4612
4620
  activeKey: w,
4613
- onChange: (C) => p(C),
4621
+ onChange: (x) => p(x),
4614
4622
  items: [
4615
4623
  {
4616
4624
  key: "details",
4617
4625
  label: "Alert Detail",
4618
- children: /* @__PURE__ */ d("div", { className: "grid grid-cols-2 gap-2", children: [
4619
- /* @__PURE__ */ d("div", { className: "flex flex-col gap-2", children: [
4626
+ children: /* @__PURE__ */ u("div", { className: "grid grid-cols-2 gap-2", children: [
4627
+ /* @__PURE__ */ u("div", { className: "flex flex-col gap-2", children: [
4620
4628
  /* @__PURE__ */ i("div", { className: "text-sm font-bold", children: T || "Alert Event" }),
4621
- y?.firstName ? /* @__PURE__ */ d("div", { className: "text-sm text-gray-500", children: [
4629
+ y?.firstName ? /* @__PURE__ */ u("div", { className: "text-sm text-gray-500", children: [
4622
4630
  "Resident ID/Name: ",
4623
4631
  y?.firstName,
4624
4632
  " ",
@@ -4626,25 +4634,25 @@ const Dn = {
4626
4634
  "   ",
4627
4635
  y?.residentId || ""
4628
4636
  ] }) : null,
4629
- /* @__PURE__ */ d("div", { className: "text-sm text-gray-500", children: [
4637
+ /* @__PURE__ */ u("div", { className: "text-sm text-gray-500", children: [
4630
4638
  "Timestamp: ",
4631
- pt(R)
4639
+ pt(k)
4632
4640
  ] }),
4633
- /* @__PURE__ */ d("div", { className: "font-sm text-gray-500", children: [
4641
+ /* @__PURE__ */ u("div", { className: "font-sm text-gray-500", children: [
4634
4642
  /* @__PURE__ */ i("b", { className: "text-black text-sm/6", children: "Description:" }),
4635
4643
  " ",
4636
- se || "No description available"
4644
+ te || "No description available"
4637
4645
  ] }),
4638
- te && /* @__PURE__ */ d("div", { className: "font-sm text-gray-500", children: [
4646
+ Z && /* @__PURE__ */ u("div", { className: "font-sm text-gray-500", children: [
4639
4647
  "Space: ",
4640
- te
4648
+ Z
4641
4649
  ] }),
4642
- k && /* @__PURE__ */ d("div", { className: "font-sm text-gray-500", children: [
4650
+ O && /* @__PURE__ */ u("div", { className: "font-sm text-gray-500", children: [
4643
4651
  "Assigned to: ",
4644
- k
4652
+ O
4645
4653
  ] }),
4646
- /* @__PURE__ */ d("div", { className: "flex gap-2 justify-start mt-3", children: [
4647
- /* @__PURE__ */ d(
4654
+ /* @__PURE__ */ u("div", { className: "flex gap-2 justify-start mt-3", children: [
4655
+ /* @__PURE__ */ u(
4648
4656
  Ve,
4649
4657
  {
4650
4658
  className: "font-sm text-gray-500 rounded-[8px] py-2 px-3",
@@ -4658,7 +4666,7 @@ const Dn = {
4658
4666
  ]
4659
4667
  }
4660
4668
  ),
4661
- /* @__PURE__ */ d(
4669
+ /* @__PURE__ */ u(
4662
4670
  Ve,
4663
4671
  {
4664
4672
  className: "font-sm text-gray-500 rounded-[8px] py-2 px-3",
@@ -4670,19 +4678,19 @@ const Dn = {
4670
4678
  }
4671
4679
  )
4672
4680
  ] }),
4673
- /* @__PURE__ */ i("div", { className: "w-full flex flex-col justify-start items-start mt-2 font-bold", children: /* @__PURE__ */ d("div", { className: "w-full mt-4", children: [
4681
+ /* @__PURE__ */ i("div", { className: "w-full flex flex-col justify-start items-start mt-2 font-bold", children: /* @__PURE__ */ u("div", { className: "w-full mt-4", children: [
4674
4682
  /* @__PURE__ */ i("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ i(
4675
4683
  me,
4676
4684
  {
4677
4685
  placeholder: "Change Status",
4678
4686
  className: "w-full text-gray-500",
4679
- onChange: (C) => h(C),
4687
+ onChange: (x) => h(x),
4680
4688
  value: l,
4681
4689
  options: fe,
4682
4690
  loading: a
4683
4691
  }
4684
4692
  ) }),
4685
- /* @__PURE__ */ d("div", { className: "flex flex-col gap-2 mt-3", children: [
4693
+ /* @__PURE__ */ u("div", { className: "flex flex-col gap-2 mt-3", children: [
4686
4694
  /* @__PURE__ */ i("label", { htmlFor: "action-details-input", className: "text-xs text-gray-500 font-medium", children: "Action Taken (Comments)" }),
4687
4695
  /* @__PURE__ */ i(
4688
4696
  "textarea",
@@ -4690,12 +4698,12 @@ const Dn = {
4690
4698
  id: "action-details-input",
4691
4699
  placeholder: "Enter details...",
4692
4700
  className: "w-full text-gray-500 h-20 border border-grey-500 rounded-md p-2",
4693
- value: u,
4694
- onChange: (C) => c(C.target.value)
4701
+ value: d,
4702
+ onChange: (x) => c(x.target.value)
4695
4703
  }
4696
4704
  )
4697
4705
  ] }),
4698
- M && /* @__PURE__ */ d("div", { className: "border border-[#DFE4EA] rounded-md px-4 py-2 flex flex-row justify-between items-center mt-4 mb-8", children: [
4706
+ M && /* @__PURE__ */ u("div", { className: "border border-[#DFE4EA] rounded-md px-4 py-2 flex flex-row justify-between items-center mt-4 mb-8", children: [
4699
4707
  /* @__PURE__ */ i("label", { htmlFor: "notify-family-button", className: "text-xs font-medium", children: "Alert notification will be sent to all Family Members." }),
4700
4708
  /* @__PURE__ */ i(
4701
4709
  pe,
@@ -4710,34 +4718,34 @@ const Dn = {
4710
4718
  ] })
4711
4719
  ] }) })
4712
4720
  ] }),
4713
- /* @__PURE__ */ i("div", { className: "flex flex-col gap-4", children: /* @__PURE__ */ d("div", { className: "w-full mt-1", children: [
4714
- /* @__PURE__ */ d("div", { className: "w-full flex items-center justify-between", children: [
4721
+ /* @__PURE__ */ i("div", { className: "flex flex-col gap-4", children: /* @__PURE__ */ u("div", { className: "w-full mt-1", children: [
4722
+ /* @__PURE__ */ u("div", { className: "w-full flex items-center justify-between", children: [
4715
4723
  /* @__PURE__ */ i("h3", { className: "text-black font-bold text-sm", children: "Camera Footage" }),
4716
- ot(b).length ? /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
4724
+ ot(b).length ? /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
4717
4725
  /* @__PURE__ */ i(
4718
4726
  "button",
4719
4727
  {
4720
4728
  type: "button",
4721
- onClick: () => O.current?.prev?.(),
4729
+ onClick: () => R.current?.prev?.(),
4722
4730
  className: "w-6 h-6 flex items-center justify-center rounded-full bg-gray-200 hover:bg-gray-300 text-gray-600",
4723
4731
  "aria-label": "Previous media",
4724
- children: /* @__PURE__ */ i($s, { style: { fontSize: 12 } })
4732
+ children: /* @__PURE__ */ i(Bs, { style: { fontSize: 12 } })
4725
4733
  }
4726
4734
  ),
4727
4735
  /* @__PURE__ */ i(
4728
4736
  "button",
4729
4737
  {
4730
4738
  type: "button",
4731
- onClick: () => O.current?.next?.(),
4739
+ onClick: () => R.current?.next?.(),
4732
4740
  className: "w-6 h-6 flex items-center justify-center rounded-full bg-gray-200 hover:bg-gray-300 text-gray-600",
4733
4741
  "aria-label": "Next media",
4734
- children: /* @__PURE__ */ i(Bs, { style: { fontSize: 12 } })
4742
+ children: /* @__PURE__ */ i(js, { style: { fontSize: 12 } })
4735
4743
  }
4736
4744
  )
4737
4745
  ] }) : null
4738
4746
  ] }),
4739
- ot(b).length ? /* @__PURE__ */ i("div", { className: "w-full", children: /* @__PURE__ */ i(Ds, { ref: O, dots: !0, className: "w-full", children: ot(b).map((C, _) => /* @__PURE__ */ d("div", { className: "flex justify-center items-center", children: [
4740
- En(C) ? /* @__PURE__ */ d(
4747
+ ot(b).length ? /* @__PURE__ */ i("div", { className: "w-full", children: /* @__PURE__ */ i(Fs, { ref: R, dots: !0, className: "w-full", children: ot(b).map((x, _) => /* @__PURE__ */ u("div", { className: "flex justify-center items-center", children: [
4748
+ En(x) ? /* @__PURE__ */ u(
4741
4749
  "video",
4742
4750
  {
4743
4751
  width: "240",
@@ -4745,19 +4753,19 @@ const Dn = {
4745
4753
  controls: !0,
4746
4754
  className: "max-w-full max-h-[90vh] object-contain rounded-lg shadow-lg",
4747
4755
  children: [
4748
- /* @__PURE__ */ i("source", { src: C.mediaUrl || C }),
4756
+ /* @__PURE__ */ i("source", { src: x.mediaUrl || x }),
4749
4757
  "Your browser does not support the video tag."
4750
4758
  ]
4751
4759
  }
4752
4760
  ) : /* @__PURE__ */ i(
4753
4761
  "img",
4754
4762
  {
4755
- src: C.mediaUrl || C,
4756
- alt: C.caption || `media-${_}`,
4763
+ src: x.mediaUrl || x,
4764
+ alt: x.caption || `media-${_}`,
4757
4765
  className: "max-w-full max-h-[90vh] object-contain rounded-lg shadow-lg"
4758
4766
  }
4759
4767
  ),
4760
- C.caption && /* @__PURE__ */ i("p", { className: "text-xs text-gray-500 mt-1", children: C.caption })
4768
+ x.caption && /* @__PURE__ */ i("p", { className: "text-xs text-gray-500 mt-1", children: x.caption })
4761
4769
  ] }, _)) }) }) : null
4762
4770
  ] }) })
4763
4771
  ] })
@@ -4768,10 +4776,10 @@ const Dn = {
4768
4776
  children: /* @__PURE__ */ i(
4769
4777
  On,
4770
4778
  {
4771
- alertId: x,
4779
+ alertId: I,
4772
4780
  id: A,
4773
4781
  priority: g,
4774
- spaceName: te,
4782
+ spaceName: Z,
4775
4783
  alertNumber: P,
4776
4784
  statusHistory: v,
4777
4785
  notifGroups: S
@@ -4785,7 +4793,7 @@ const Dn = {
4785
4793
  );
4786
4794
  };
4787
4795
  function Un() {
4788
- const { alerts: e } = Ae(), t = It({
4796
+ const { alerts: e } = Ae(), t = Ct({
4789
4797
  queryKey: ["alerts", "statusList"],
4790
4798
  queryFn: () => e.getAlertStatusList(),
4791
4799
  staleTime: 5 * 6e4
@@ -4797,12 +4805,12 @@ function Un() {
4797
4805
  refetch: t.refetch
4798
4806
  };
4799
4807
  }
4800
- function gs({ alerts: e, loading: t = !1, columns: s, onRefetch: r }) {
4801
- const [n, a] = I(!1), [o, l] = I(null), [h, u] = I("details"), { list: c, loading: N } = Un();
4808
+ function vs({ alerts: e, loading: t = !1, columns: s, onRefetch: r }) {
4809
+ const [n, a] = C(!1), [o, l] = C(null), [h, d] = C("details"), { list: c, loading: N } = Un();
4802
4810
  function f(p, S) {
4803
- l(p), u(S?.tab ?? "details"), a(!0);
4811
+ l(p), d(S?.tab ?? "details"), a(!0);
4804
4812
  }
4805
- function O() {
4813
+ function R() {
4806
4814
  a(!1);
4807
4815
  }
4808
4816
  const w = o ? {
@@ -4814,8 +4822,8 @@ function gs({ alerts: e, loading: t = !1, columns: s, onRefetch: r }) {
4814
4822
  mediaDetails: o.mediaDetails
4815
4823
  }
4816
4824
  } : null;
4817
- return /* @__PURE__ */ d("div", { className: "p-6 flex flex-col items-start justify-start min-h-screen w-full overflow-auto", children: [
4818
- /* @__PURE__ */ d("div", { className: "w-1/2 flex items-center justify-between mb-4", children: [
4825
+ return /* @__PURE__ */ u("div", { className: "p-6 flex flex-col items-start justify-start min-h-screen w-full overflow-auto", children: [
4826
+ /* @__PURE__ */ u("div", { className: "w-1/2 flex items-center justify-between mb-4", children: [
4819
4827
  /* @__PURE__ */ i("h1", { className: "text-xl font-bold text-black", children: "Alert Console" }),
4820
4828
  /* @__PURE__ */ i(fn, { label: "USA", timeZone: "America/New_York" })
4821
4829
  ] }),
@@ -4832,7 +4840,7 @@ function gs({ alerts: e, loading: t = !1, columns: s, onRefetch: r }) {
4832
4840
  {
4833
4841
  key: "active",
4834
4842
  label: "Active",
4835
- children: /* @__PURE__ */ i(as, { data: e, loading: t, pageSize: 10, columns: s || [], onAlertIdClick: f, onRefetch: r })
4843
+ children: /* @__PURE__ */ i(os, { data: e, loading: t, pageSize: 10, columns: s || [], onAlertIdClick: f, onRefetch: r })
4836
4844
  },
4837
4845
  {
4838
4846
  key: "archived",
@@ -4856,7 +4864,7 @@ function gs({ alerts: e, loading: t = !1, columns: s, onRefetch: r }) {
4856
4864
  Mn,
4857
4865
  {
4858
4866
  isModalOpen: n,
4859
- handleModalClose: O,
4867
+ handleModalClose: R,
4860
4868
  selectedRow: w,
4861
4869
  fetchAlertLogs: () => {
4862
4870
  },
@@ -4868,7 +4876,7 @@ function gs({ alerts: e, loading: t = !1, columns: s, onRefetch: r }) {
4868
4876
  ] });
4869
4877
  }
4870
4878
  function Ln() {
4871
- const [e, t] = I([]), [s, r] = I([]), [n, a] = I([]), { rules: o } = Ae();
4879
+ const [e, t] = C([]), [s, r] = C([]), [n, a] = C([]), { rules: o } = Ae();
4872
4880
  return he(() => {
4873
4881
  let l = !0;
4874
4882
  return (async () => {
@@ -4876,13 +4884,13 @@ function Ln() {
4876
4884
  const h = await o.getRules();
4877
4885
  if (!l) return;
4878
4886
  a(Array.isArray(h) ? h : []);
4879
- const u = (h || []).map((c, N) => ({
4887
+ const d = (h || []).map((c, N) => ({
4880
4888
  RuleId: c.ruleId || c.ruleName || String(N),
4881
4889
  Name: c.ruleName || c.Name || "-",
4882
4890
  Description: c.ruleDesc || c.Description || "",
4883
4891
  SeverityId: 0
4884
4892
  }));
4885
- t(u.length ? u : $e.rules);
4893
+ t(d.length ? d : $e.rules);
4886
4894
  try {
4887
4895
  const c = await o.getLookups(), N = Array.isArray(c?.userRoles) ? c.userRoles.map((f) => ({
4888
4896
  userRoleId: f.userRoleId ?? f.id,
@@ -4899,7 +4907,7 @@ function Ln() {
4899
4907
  l = !1;
4900
4908
  };
4901
4909
  }, []), /* @__PURE__ */ i(
4902
- Cn,
4910
+ In,
4903
4911
  {
4904
4912
  severities: $e.severities,
4905
4913
  rules: e,
@@ -4909,7 +4917,7 @@ function Ln() {
4909
4917
  );
4910
4918
  }
4911
4919
  function $n() {
4912
- const { alerts: e } = Ae(), t = It({
4920
+ const { alerts: e } = Ae(), t = Ct({
4913
4921
  queryKey: ["alerts", "list"],
4914
4922
  queryFn: () => e.listAlerts(),
4915
4923
  staleTime: 3e4
@@ -4923,7 +4931,7 @@ function $n() {
4923
4931
  }
4924
4932
  function Bn(e) {
4925
4933
  const { alerts: t, loading: s, refetch: r } = $n();
4926
- return /* @__PURE__ */ i(gs, { alerts: t, loading: s, columns: e.columns, onRefetch: r });
4934
+ return /* @__PURE__ */ i(vs, { alerts: t, loading: s, columns: e.columns, onRefetch: r });
4927
4935
  }
4928
4936
  function zn({
4929
4937
  tenant: e,
@@ -4934,7 +4942,7 @@ function zn({
4934
4942
  loading: a,
4935
4943
  columns: o
4936
4944
  }) {
4937
- const [l] = I(() => new Gr()), h = ue(
4945
+ const [l] = C(() => new Gr()), h = ue(
4938
4946
  () => ({
4939
4947
  alertsBaseUrl: t,
4940
4948
  rulesBaseUrl: s || t,
@@ -4942,10 +4950,10 @@ function zn({
4942
4950
  }),
4943
4951
  [t, s, r]
4944
4952
  );
4945
- return /* @__PURE__ */ i(Wr, { client: l, children: /* @__PURE__ */ i(lr, { tenant: e, override: h, children: Array.isArray(n) ? /* @__PURE__ */ i(gs, { alerts: n, loading: !!a, columns: o }) : /* @__PURE__ */ i(Bn, { columns: o }) }) });
4953
+ return /* @__PURE__ */ i(Wr, { client: l, children: /* @__PURE__ */ i(lr, { tenant: e, override: h, children: Array.isArray(n) ? /* @__PURE__ */ i(vs, { alerts: n, loading: !!a, columns: o }) : /* @__PURE__ */ i(Bn, { columns: o }) }) });
4946
4954
  }
4947
4955
  function Vn(e) {
4948
- const { alerts: t } = Ae(), s = It({
4956
+ const { alerts: t } = Ae(), s = Ct({
4949
4957
  queryKey: ["alerts", "report", e],
4950
4958
  queryFn: () => t.getAlertsReport(e),
4951
4959
  staleTime: 6e4
@@ -4966,21 +4974,21 @@ const Jn = [
4966
4974
  ];
4967
4975
  export {
4968
4976
  Nn as AlertAssignment,
4969
- gs as AlertConsole,
4977
+ vs as AlertConsole,
4970
4978
  zn as AlertConsoleWidget,
4971
- as as AlertsTable,
4979
+ os as AlertsTable,
4972
4980
  lr as ApiProvider,
4973
4981
  dn as ArchivedTable,
4974
4982
  fn as Clock,
4975
4983
  Ar as DataTable,
4976
4984
  xn as MyPreferencesPanel,
4977
4985
  wn as SettingsPanel,
4978
- Cn as SettingsTabs,
4986
+ In as SettingsTabs,
4979
4987
  Jn as exampleAlertColumns,
4980
4988
  Un as useAlertStatusList,
4981
4989
  $n as useAlerts,
4982
4990
  Vn as useAlertsReport,
4983
4991
  Ae as useApi,
4984
- ys as useUpdateAlertStatus
4992
+ gs as useUpdateAlertStatus
4985
4993
  };
4986
4994
  //# sourceMappingURL=index.es.js.map