@ssgc/alert-console 2.10.11 → 2.10.13

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,6 +1,6 @@
1
1
  import { jsx as c, jsxs as f, Fragment as rn } from "react/jsx-runtime";
2
2
  import { useContext as Li, useMemo as ve, createContext as Fi, useRef as pr, useState as S, useCallback as bn, useEffect as oe, useLayoutEffect as $i, forwardRef as gr, createElement as Hs } from "react";
3
- import { Select as Pe, Table as an, Row as Ze, Col as K, Input as Pi, Tag as wt, Space as st, Tooltip as In, Button as ze, Progress as Wi, Dropdown as Vi, Typography as Jt, Spin as Ns, Checkbox as Ot, Divider as Zt, TimePicker as kn, Tabs as on, Card as Ds, Steps as Bi, Timeline as Zi, Modal as zi, Carousel as Hi } from "antd";
3
+ import { Select as Pe, Table as an, Row as Ze, Col as K, Input as Pi, Tag as wt, Space as st, Tooltip as In, Button as ze, Progress as Wi, Dropdown as Vi, Typography as Jt, Spin as Ns, Checkbox as Mt, Divider as zt, TimePicker as kn, Tabs as on, Card as Ds, Steps as Bi, Timeline as Zi, Modal as zi, Carousel as Hi } from "antd";
4
4
  import { MessageOutlined as Gi, MailOutlined as qi, MoreOutlined as Yi, PlusOutlined as _i, EditOutlined as ji, LeftOutlined as Ji, RightOutlined as Ki } from "@ant-design/icons";
5
5
  import { toast as Ee } from "react-toastify";
6
6
  import { useQueryClient as Qi, useMutation as Xi, useQuery as ln, QueryClient as ea, QueryClientProvider as ta } from "@tanstack/react-query";
@@ -54,7 +54,7 @@ function ma() {
54
54
  return {};
55
55
  }
56
56
  }
57
- function Vt(t, e) {
57
+ function Bt(t, e) {
58
58
  if (!e) return t;
59
59
  const s = new URL(t);
60
60
  return Object.entries(e).forEach(([n, r]) => {
@@ -90,7 +90,7 @@ function fa(t) {
90
90
  };
91
91
  return {
92
92
  async listAlerts(s) {
93
- const n = Ue(t.baseUrl, "/api/Alert"), r = Vt(n, {
93
+ const n = Ue(t.baseUrl, "/api/Alert"), r = Bt(n, {
94
94
  page: s?.pageNumber ?? 1,
95
95
  pageSize: s?.pageSize ?? 10,
96
96
  ...s?.anomalyId !== void 0 && { anomalyId: s.anomalyId },
@@ -113,7 +113,7 @@ function fa(t) {
113
113
  return Array.isArray(n) ? n : n && typeof n == "object" && Array.isArray(n.data) ? n.data : [];
114
114
  },
115
115
  async getAlertsReport(s) {
116
- const n = Ue(t.baseUrl, "/Alerts/GetAlertsReport"), r = Vt(n, s), i = await Le(r, {
116
+ const n = Ue(t.baseUrl, "/Alerts/GetAlertsReport"), r = Bt(n, s), i = await Le(r, {
117
117
  method: "GET",
118
118
  headers: e
119
119
  });
@@ -183,21 +183,21 @@ function fa(t) {
183
183
  };
184
184
  },
185
185
  async getAlertNotifications(s) {
186
- const n = Ue(t.baseUrl, "/api/Alert/GetNotifications"), r = Vt(n, { alertId: s }), i = await Le(r, {
186
+ const n = Ue(t.baseUrl, "/api/Alert/GetNotifications"), r = Bt(n, { alertId: s }), i = await Le(r, {
187
187
  method: "GET",
188
188
  headers: e
189
189
  });
190
190
  return Array.isArray(i) ? i : i && typeof i == "object" && Array.isArray(i.data) ? i.data : [];
191
191
  },
192
192
  async notifyFamilyMembers(s) {
193
- const n = Ue(t.baseUrl, "/api/Alert/NotificationToFamilyMembers"), r = Vt(n, { alertId: s });
193
+ const n = Ue(t.baseUrl, "/api/Alert/NotificationToFamilyMembers"), r = Bt(n, { alertId: s });
194
194
  return Le(r, {
195
195
  method: "POST",
196
196
  headers: e
197
197
  });
198
198
  },
199
199
  async sendSMSorEmailNotifications(s, n, r) {
200
- const i = Ue(t.baseUrl, "/api/Alert/SendSMSorEmailNotifications"), a = Vt(i, { alertId: s, isEmail: n, isSMS: r });
200
+ const i = Ue(t.baseUrl, "/api/Alert/SendSMSorEmailNotifications"), a = Bt(i, { alertId: s, isEmail: n, isSMS: r });
201
201
  return Le(a, {
202
202
  method: "POST",
203
203
  headers: e
@@ -636,7 +636,7 @@ async function $e(t, e) {
636
636
  return i;
637
637
  }
638
638
  const he = (...t) => t.find((e) => e != null);
639
- function zt(t, e, s = {}) {
639
+ function Ot(t, e, s = {}) {
640
640
  const n = {};
641
641
  for (const r of e) {
642
642
  const i = s[r] ?? r.charAt(0).toUpperCase() + r.slice(1);
@@ -646,7 +646,7 @@ function zt(t, e, s = {}) {
646
646
  }
647
647
  function Na(t) {
648
648
  return Array.isArray(t) ? t.map(
649
- (e) => zt(e, [
649
+ (e) => Ot(e, [
650
650
  "alertLogId",
651
651
  "alertId",
652
652
  "status",
@@ -723,7 +723,7 @@ function ba(t) {
723
723
  headers: e
724
724
  });
725
725
  return (Array.isArray(n) ? n : []).map(
726
- (i) => zt(i, ["alertStatusId", "value", "statusName"])
726
+ (i) => Ot(i, ["alertStatusId", "value", "statusName"])
727
727
  );
728
728
  },
729
729
  async getAlertsReport(s) {
@@ -746,11 +746,18 @@ function ba(t) {
746
746
  });
747
747
  },
748
748
  async getAlertTimeline(s) {
749
- const n = Fe(t.baseUrl, `/api/detectionpolicy/alerts/alertTimelines/${s}`);
750
- return $e(n, {
749
+ const n = Fe(t.baseUrl, `/api/detectionpolicy/alerts/alertTimelines/${s}`), r = await $e(n, {
751
750
  method: "GET",
752
751
  headers: e
753
752
  });
753
+ return (Array.isArray(r) ? r : []).map(
754
+ (a) => Ot(a, [
755
+ "alertUniqueId",
756
+ "timeElapsed",
757
+ "eventName",
758
+ "timeStamp"
759
+ ])
760
+ );
754
761
  },
755
762
  async getAdminSettings() {
756
763
  const s = Fe(t.baseUrl, "/api/detectionpolicy/alerts/GetAdminSettings"), n = await $e(s, {
@@ -760,7 +767,7 @@ function ba(t) {
760
767
  if (n && typeof n == "object") {
761
768
  const r = n.data ?? n.Data ?? n;
762
769
  if (r && typeof r == "object")
763
- return zt(r, ["userId", "isAdminSetting", "sortBy"], {
770
+ return Ot(r, ["userId", "isAdminSetting", "sortBy"], {
764
771
  sortBy: "SortOption"
765
772
  });
766
773
  }
@@ -836,7 +843,7 @@ function ba(t) {
836
843
  });
837
844
  let a = [];
838
845
  return Array.isArray(i) ? a = i : Array.isArray(i?.data) && (a = i.data), a.map(
839
- (o) => zt(o, [
846
+ (o) => Ot(o, [
840
847
  "alertNotificationSentId",
841
848
  "alertId",
842
849
  "notificationType",
@@ -856,7 +863,7 @@ function ba(t) {
856
863
  headers: e
857
864
  });
858
865
  return (Array.isArray(n?.Data) ? n.Data : []).map(
859
- (i) => zt(i, [
866
+ (i) => Ot(i, [
860
867
  "timeZoneUniqueId",
861
868
  "ianaTimeZoneId",
862
869
  "timeZoneName",
@@ -946,12 +953,30 @@ function ka(t) {
946
953
  },
947
954
  async getLookups() {
948
955
  const n = (h) => new URL(h, t.baseUrl).toString(), r = t.userManagementBaseUrl || t.baseUrl, i = [
949
- it(n("/api/detectionpolicy/lookups/actiontypes"), { method: "GET", headers: e }),
950
- it(n("/api/detectionpolicy/lookups/anomalies"), { method: "GET", headers: e }),
951
- it(n("/api/detectionpolicy/lookups/thirdparty"), { method: "GET", headers: e }),
952
- it(n("/api/detectionpolicy/lookups/severity"), { method: "GET", headers: e }),
953
- it(n("/api/detectionpolicy/lookups/scheduletypes"), { method: "GET", headers: e }),
954
- it(new URL("/user/user-roles", r).toString(), { method: "GET", headers: e })
956
+ it(n("/api/detectionpolicy/lookups/actiontypes"), {
957
+ method: "GET",
958
+ headers: e
959
+ }),
960
+ it(n("/api/detectionpolicy/lookups/anomalies"), {
961
+ method: "GET",
962
+ headers: e
963
+ }),
964
+ it(n("/api/detectionpolicy/lookups/thirdparty"), {
965
+ method: "GET",
966
+ headers: e
967
+ }),
968
+ it(n("/api/detectionpolicy/lookups/severity"), {
969
+ method: "GET",
970
+ headers: e
971
+ }),
972
+ it(n("/api/detectionpolicy/lookups/scheduletypes"), {
973
+ method: "GET",
974
+ headers: e
975
+ }),
976
+ it(new URL("/user/user-roles", r).toString(), {
977
+ method: "GET",
978
+ headers: e
979
+ })
955
980
  ], [
956
981
  a,
957
982
  o,
@@ -970,8 +995,8 @@ function ka(t) {
970
995
  actionTypeId: Number(h?.ActionTypeId),
971
996
  name: h?.DisplayName ?? h?.Name ?? ""
972
997
  })), C = v.map((h) => ({
973
- recordId: h?.AnomalyId,
974
- anomalyName: h?.DisplayName ?? h?.Name ?? ""
998
+ AnomalyId: h?.AnomalyId,
999
+ DisplayName: h?.DisplayName ?? h?.Name ?? ""
975
1000
  })), Z = k.map((h) => ({
976
1001
  thirdPartyId: Number(h?.ThirdPartyId),
977
1002
  thirdPartyName: h?.ThirdPartyName ?? h?.Name ?? ""
@@ -1898,15 +1923,15 @@ function Mr({
1898
1923
  let P = !0;
1899
1924
  return (async () => {
1900
1925
  try {
1901
- const W = await T.getLookups(), ue = (Array.isArray(W.thirdParties) ? W.thirdParties : []).map((Ne) => ({
1902
- label: Ne.thirdPartyName,
1903
- value: String(Ne.thirdPartyId)
1904
- })), be = (Array.isArray(W.anomalies) ? W.anomalies : []).map((Ne) => ({
1905
- label: Ne.anomalyName,
1906
- value: Ne.anomalyId
1907
- })), Me = (Array.isArray(W.severities) ? W.severities : []).map((Ne) => ({
1908
- label: Ne.severityName,
1909
- value: String(Ne.severityId)
1926
+ const W = await T.getLookups(), ue = (Array.isArray(W.thirdParties) ? W.thirdParties : []).map((we) => ({
1927
+ label: we.thirdPartyName,
1928
+ value: String(we.thirdPartyId)
1929
+ })), be = (Array.isArray(W.anomalies) ? W.anomalies : []).map((we) => ({
1930
+ label: we.anomalyName ?? we.DisplayName,
1931
+ value: we.anomalyId ?? we.AnomalyId
1932
+ })), Me = (Array.isArray(W.severities) ? W.severities : []).map((we) => ({
1933
+ label: we.severityName,
1934
+ value: String(we.severityId)
1910
1935
  }));
1911
1936
  P && (h([{ label: "All", value: "All" }, ...ue]), be.length && ye([{ label: "All Types", value: "All" }, ...be]), Me.length && N([{ label: "All levels", value: "All" }, ...Me]));
1912
1937
  } catch (W) {
@@ -1996,7 +2021,7 @@ function Mr({
1996
2021
  return It.delete(bt), It;
1997
2022
  });
1998
2023
  }
1999
- }, ue = cn, Ve = un, be = me[ue], Ke = me[Ve], Me = Un(ue, W, be?.title), Ne = Un(Ve, W, Ke?.title), Pt = Cs(W.id, !0), pt = Cs(W.id, !1), Nt = os(ue) && A.has(Pt), nt = os(Ve) && A.has(pt);
2024
+ }, ue = cn, Ve = un, be = me[ue], Ke = me[Ve], Me = Un(ue, W, be?.title), we = Un(Ve, W, Ke?.title), Wt = Cs(W.id, !0), pt = Cs(W.id, !1), Nt = os(ue) && A.has(Wt), nt = os(Ve) && A.has(pt);
2000
2025
  return /* @__PURE__ */ f(st, { size: "middle", children: [
2001
2026
  /* @__PURE__ */ c(In, { title: Me.tooltipTitle, children: /* @__PURE__ */ c(
2002
2027
  ze,
@@ -2011,17 +2036,17 @@ function Mr({
2011
2036
  children: Me.buttonText
2012
2037
  }
2013
2038
  ) }, String(ue)),
2014
- /* @__PURE__ */ c(In, { title: Ne.tooltipTitle, children: /* @__PURE__ */ c(
2039
+ /* @__PURE__ */ c(In, { title: we.tooltipTitle, children: /* @__PURE__ */ c(
2015
2040
  ze,
2016
2041
  {
2017
2042
  size: "small",
2018
- disabled: Ne.isDisabled,
2043
+ disabled: we.isDisabled,
2019
2044
  loading: nt,
2020
2045
  onClick: os(Ve) ? () => ge(!1, !0) : void 0,
2021
2046
  icon: !nt && Ke?.icon,
2022
2047
  className: "flex flex-col items-center justify-center gap-1",
2023
2048
  style: { height: "fit-content" },
2024
- children: Ne.buttonText
2049
+ children: we.buttonText
2025
2050
  }
2026
2051
  ) }, String(Ve))
2027
2052
  ] });
@@ -2186,7 +2211,7 @@ class ao extends At {
2186
2211
  super(`Invalid Duration: ${e.toMessage()}`);
2187
2212
  }
2188
2213
  }
2189
- class Mt extends At {
2214
+ class Dt extends At {
2190
2215
  }
2191
2216
  class Cr extends At {
2192
2217
  constructor(e) {
@@ -2796,7 +2821,7 @@ class re {
2796
2821
  );
2797
2822
  }
2798
2823
  static create(e, s, n, r, i = !1) {
2799
- const a = e || Ae.defaultLocale, o = a || (i ? "en-US" : go()), l = s || Ae.defaultNumberingSystem, u = n || Ae.defaultOutputCalendar, m = en(r) || Ae.defaultWeekSettings;
2824
+ const a = e || Ne.defaultLocale, o = a || (i ? "en-US" : go()), l = s || Ne.defaultNumberingSystem, u = n || Ne.defaultOutputCalendar, m = en(r) || Ne.defaultWeekSettings;
2800
2825
  return new re(o, l, u, m, a);
2801
2826
  }
2802
2827
  static resetCache() {
@@ -3153,7 +3178,7 @@ function Qe({ numberingSystem: t }, e = "") {
3153
3178
  return r === void 0 && (r = new RegExp(`${mn[s]}${e}`), n.set(e, r)), r;
3154
3179
  }
3155
3180
  let Vn = () => Date.now(), Bn = "system", Zn = null, zn = null, Hn = null, Gn = 60, qn, Yn = null;
3156
- class Ae {
3181
+ class Ne {
3157
3182
  /**
3158
3183
  * Get the callback for returning the current timestamp.
3159
3184
  * @type {function}
@@ -3329,9 +3354,9 @@ function vs(t, e = 4, s = 1) {
3329
3354
  return l < 1 ? (u = n - 1, l = _t(u, e, s)) : l > _t(n, e, s) ? (u = n + 1, l = 1) : u = n, { weekYear: u, weekNumber: l, weekday: o, ...Es(t) };
3330
3355
  }
3331
3356
  function _n(t, e = 4, s = 1) {
3332
- const { weekYear: n, weekNumber: r, weekday: i } = t, a = hn(fn(n, 1, e), s), o = Dt(n);
3357
+ const { weekYear: n, weekNumber: r, weekday: i } = t, a = hn(fn(n, 1, e), s), o = Ct(n);
3333
3358
  let l = r * 7 + i - a - 7 + e, u;
3334
- l < 1 ? (u = n - 1, l += Dt(u)) : l > o ? (u = n + 1, l -= Dt(n)) : u = n;
3359
+ l < 1 ? (u = n - 1, l += Ct(u)) : l > o ? (u = n + 1, l -= Ct(n)) : u = n;
3335
3360
  const { month: m, day: d } = ni(u, l);
3336
3361
  return { year: u, month: m, day: d, ...Es(t) };
3337
3362
  }
@@ -3346,7 +3371,7 @@ function jn(t) {
3346
3371
  function Jn(t, e) {
3347
3372
  if (!$(t.localWeekday) || !$(t.localWeekNumber) || !$(t.localWeekYear)) {
3348
3373
  if (!$(t.weekday) || !$(t.weekNumber) || !$(t.weekYear))
3349
- throw new Mt(
3374
+ throw new Dt(
3350
3375
  "Cannot mix locale-based week fields with ISO-based week fields"
3351
3376
  );
3352
3377
  return $(t.localWeekday) || (t.weekday = t.localWeekday), $(t.localWeekNumber) || (t.weekNumber = t.localWeekNumber), $(t.localWeekYear) || (t.weekYear = t.localWeekYear), delete t.localWeekday, delete t.localWeekNumber, delete t.localWeekYear, {
@@ -3365,7 +3390,7 @@ function Do(t, e = 4, s = 1) {
3365
3390
  return n ? r ? i ? !1 : je("weekday", t.weekday) : je("week", t.weekNumber) : je("weekYear", t.weekYear);
3366
3391
  }
3367
3392
  function Co(t) {
3368
- const e = Is(t.year), s = Je(t.ordinal, 1, Dt(t.year));
3393
+ const e = Is(t.year), s = Je(t.ordinal, 1, Ct(t.year));
3369
3394
  return e ? s ? !1 : je("ordinal", t.ordinal) : je("year", t.year);
3370
3395
  }
3371
3396
  function ri(t) {
@@ -3418,7 +3443,7 @@ function Kn(t, e, s) {
3418
3443
  function Fo(t, e) {
3419
3444
  return e.reduce((s, n) => (s[n] = t[n], s), {});
3420
3445
  }
3421
- function Rt(t, e) {
3446
+ function Ut(t, e) {
3422
3447
  return Object.prototype.hasOwnProperty.call(t, e);
3423
3448
  }
3424
3449
  function en(t) {
@@ -3479,7 +3504,7 @@ function pn(t, e, s = "round") {
3479
3504
  function Qt(t) {
3480
3505
  return t % 4 === 0 && (t % 100 !== 0 || t % 400 === 0);
3481
3506
  }
3482
- function Dt(t) {
3507
+ function Ct(t) {
3483
3508
  return Qt(t) ? 366 : 365;
3484
3509
  }
3485
3510
  function ws(t, e) {
@@ -3503,10 +3528,10 @@ function Qn(t, e, s) {
3503
3528
  }
3504
3529
  function _t(t, e = 4, s = 1) {
3505
3530
  const n = Qn(t, e, s), r = Qn(t + 1, e, s);
3506
- return (Dt(t) - n + r) / 7;
3531
+ return (Ct(t) - n + r) / 7;
3507
3532
  }
3508
3533
  function tn(t) {
3509
- return t > 99 ? t : t > Ae.twoDigitCutoffYear ? 1900 + t : 2e3 + t;
3534
+ return t > 99 ? t : t > Ne.twoDigitCutoffYear ? 1900 + t : 2e3 + t;
3510
3535
  }
3511
3536
  function li(t, e, s, n = null) {
3512
3537
  const r = new Date(t), i = {
@@ -3536,7 +3561,7 @@ function ci(t) {
3536
3561
  function As(t, e) {
3537
3562
  const s = {};
3538
3563
  for (const n in t)
3539
- if (Rt(t, n)) {
3564
+ if (Ut(t, n)) {
3540
3565
  const r = t[n];
3541
3566
  if (r == null) continue;
3542
3567
  s[e(n)] = ci(r);
@@ -3944,11 +3969,11 @@ class Ce {
3944
3969
  }
3945
3970
  }
3946
3971
  const gi = /[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;
3947
- function Ut(...t) {
3972
+ function Lt(...t) {
3948
3973
  const e = t.reduce((s, n) => s + n.source, "");
3949
3974
  return RegExp(`^${e}$`);
3950
3975
  }
3951
- function Lt(...t) {
3976
+ function Ft(...t) {
3952
3977
  return (e) => t.reduce(
3953
3978
  ([s, n, r], i) => {
3954
3979
  const [a, o, l] = i(e, r);
@@ -3957,7 +3982,7 @@ function Lt(...t) {
3957
3982
  [{}, null, 1]
3958
3983
  ).slice(0, 2);
3959
3984
  }
3960
- function Ft(t, ...e) {
3985
+ function $t(t, ...e) {
3961
3986
  if (t == null)
3962
3987
  return [null, null];
3963
3988
  for (const [s, n] of e) {
@@ -3979,22 +4004,22 @@ function Si(...t) {
3979
4004
  const vi = /(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/, Jo = `(?:${vi.source}?(?:\\[(${gi.source})\\])?)?`, gn = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/, wi = RegExp(`${gn.source}${Jo}`), Sn = RegExp(`(?:[Tt]${wi.source})?`), Ko = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/, Qo = /(\d{4})-?W(\d\d)(?:-?(\d))?/, Xo = /(\d{4})-?(\d{3})/, el = Si("weekYear", "weekNumber", "weekDay"), tl = Si("year", "ordinal"), sl = /(\d{4})-(\d\d)-(\d\d)/, Ai = RegExp(
3980
4005
  `${gn.source} ?(?:${vi.source}|(${gi.source}))?`
3981
4006
  ), nl = RegExp(`(?: ${Ai.source})?`);
3982
- function Ct(t, e, s) {
4007
+ function Rt(t, e, s) {
3983
4008
  const n = t[e];
3984
4009
  return $(n) ? s : ft(n);
3985
4010
  }
3986
4011
  function rl(t, e) {
3987
4012
  return [{
3988
- year: Ct(t, e),
3989
- month: Ct(t, e + 1, 1),
3990
- day: Ct(t, e + 2, 1)
4013
+ year: Rt(t, e),
4014
+ month: Rt(t, e + 1, 1),
4015
+ day: Rt(t, e + 2, 1)
3991
4016
  }, null, e + 3];
3992
4017
  }
3993
- function $t(t, e) {
4018
+ function Pt(t, e) {
3994
4019
  return [{
3995
- hours: Ct(t, e, 0),
3996
- minutes: Ct(t, e + 1, 0),
3997
- seconds: Ct(t, e + 2, 0),
4020
+ hours: Rt(t, e, 0),
4021
+ minutes: Rt(t, e + 1, 0),
4022
+ seconds: Rt(t, e + 2, 0),
3998
4023
  milliseconds: yn(t[e + 3])
3999
4024
  }, null, e + 4];
4000
4025
  }
@@ -4074,28 +4099,28 @@ function yl(t) {
4074
4099
  const [, e, s, n, r, i, a, o] = t;
4075
4100
  return [vn(e, o, s, n, r, i, a), We.utcInstance];
4076
4101
  }
4077
- const pl = Ut(Ko, Sn), gl = Ut(Qo, Sn), Sl = Ut(Xo, Sn), vl = Ut(wi), Ni = Lt(
4102
+ const pl = Lt(Ko, Sn), gl = Lt(Qo, Sn), Sl = Lt(Xo, Sn), vl = Lt(wi), Ni = Ft(
4078
4103
  rl,
4079
- $t,
4104
+ Pt,
4080
4105
  Xt,
4081
4106
  es
4082
- ), wl = Lt(
4107
+ ), wl = Ft(
4083
4108
  el,
4084
- $t,
4109
+ Pt,
4085
4110
  Xt,
4086
4111
  es
4087
- ), Al = Lt(
4112
+ ), Al = Ft(
4088
4113
  tl,
4089
- $t,
4114
+ Pt,
4090
4115
  Xt,
4091
4116
  es
4092
- ), Nl = Lt(
4093
- $t,
4117
+ ), Nl = Ft(
4118
+ Pt,
4094
4119
  Xt,
4095
4120
  es
4096
4121
  );
4097
4122
  function Tl(t) {
4098
- return Ft(
4123
+ return $t(
4099
4124
  t,
4100
4125
  [pl, Ni],
4101
4126
  [gl, wl],
@@ -4104,10 +4129,10 @@ function Tl(t) {
4104
4129
  );
4105
4130
  }
4106
4131
  function bl(t) {
4107
- return Ft(dl(t), [cl, ul]);
4132
+ return $t(dl(t), [cl, ul]);
4108
4133
  }
4109
4134
  function Il(t) {
4110
- return Ft(
4135
+ return $t(
4111
4136
  t,
4112
4137
  [ml, er],
4113
4138
  [fl, er],
@@ -4115,19 +4140,19 @@ function Il(t) {
4115
4140
  );
4116
4141
  }
4117
4142
  function kl(t) {
4118
- return Ft(t, [al, ol]);
4143
+ return $t(t, [al, ol]);
4119
4144
  }
4120
- const xl = Lt($t);
4145
+ const xl = Ft(Pt);
4121
4146
  function El(t) {
4122
- return Ft(t, [il, xl]);
4147
+ return $t(t, [il, xl]);
4123
4148
  }
4124
- const Ol = Ut(sl, nl), Ml = Ut(Ai), Dl = Lt(
4125
- $t,
4149
+ const Ol = Lt(sl, nl), Ml = Lt(Ai), Dl = Ft(
4150
+ Pt,
4126
4151
  Xt,
4127
4152
  es
4128
4153
  );
4129
4154
  function Cl(t) {
4130
- return Ft(
4155
+ return $t(
4131
4156
  t,
4132
4157
  [Ol, Ni],
4133
4158
  [Ml, Dl]
@@ -4382,7 +4407,7 @@ class X {
4382
4407
  if (!e)
4383
4408
  throw new De("need to specify a reason the Duration is invalid");
4384
4409
  const n = e instanceof et ? e : new et(e, s);
4385
- if (Ae.throwOnInvalid)
4410
+ if (Ne.throwOnInvalid)
4386
4411
  throw new ao(n);
4387
4412
  return new X({ invalid: n });
4388
4413
  }
@@ -4588,7 +4613,7 @@ class X {
4588
4613
  if (!this.isValid) return this;
4589
4614
  const s = X.fromDurationLike(e), n = {};
4590
4615
  for (const r of vt)
4591
- (Rt(s.values, r) || Rt(this.values, r)) && (n[r] = s.get(r) + this.get(r));
4616
+ (Ut(s.values, r) || Ut(this.values, r)) && (n[r] = s.get(r) + this.get(r));
4592
4617
  return at(this, { values: n }, !0);
4593
4618
  }
4594
4619
  /**
@@ -4858,12 +4883,12 @@ class X {
4858
4883
  }
4859
4884
  const xt = "Invalid Interval";
4860
4885
  function Fl(t, e) {
4861
- return !t || !t.isValid ? we.invalid("missing or invalid start") : !e || !e.isValid ? we.invalid("missing or invalid end") : e < t ? we.invalid(
4886
+ return !t || !t.isValid ? Ae.invalid("missing or invalid start") : !e || !e.isValid ? Ae.invalid("missing or invalid end") : e < t ? Ae.invalid(
4862
4887
  "end before start",
4863
4888
  `The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`
4864
4889
  ) : null;
4865
4890
  }
4866
- class we {
4891
+ class Ae {
4867
4892
  /**
4868
4893
  * @private
4869
4894
  */
@@ -4880,9 +4905,9 @@ class we {
4880
4905
  if (!e)
4881
4906
  throw new De("need to specify a reason the Interval is invalid");
4882
4907
  const n = e instanceof et ? e : new et(e, s);
4883
- if (Ae.throwOnInvalid)
4908
+ if (Ne.throwOnInvalid)
4884
4909
  throw new io(n);
4885
- return new we({ invalid: n });
4910
+ return new Ae({ invalid: n });
4886
4911
  }
4887
4912
  /**
4888
4913
  * Create an Interval from a start DateTime and an end DateTime. Inclusive of the start but not the end.
@@ -4891,8 +4916,8 @@ class we {
4891
4916
  * @return {Interval}
4892
4917
  */
4893
4918
  static fromDateTimes(e, s) {
4894
- const n = Bt(e), r = Bt(s), i = Fl(n, r);
4895
- return i ?? new we({
4919
+ const n = Zt(e), r = Zt(s), i = Fl(n, r);
4920
+ return i ?? new Ae({
4896
4921
  start: n,
4897
4922
  end: r
4898
4923
  });
@@ -4904,8 +4929,8 @@ class we {
4904
4929
  * @return {Interval}
4905
4930
  */
4906
4931
  static after(e, s) {
4907
- const n = X.fromDurationLike(s), r = Bt(e);
4908
- return we.fromDateTimes(r, r.plus(n));
4932
+ const n = X.fromDurationLike(s), r = Zt(e);
4933
+ return Ae.fromDateTimes(r, r.plus(n));
4909
4934
  }
4910
4935
  /**
4911
4936
  * Create an Interval from an end DateTime and a Duration to extend backwards to.
@@ -4914,8 +4939,8 @@ class we {
4914
4939
  * @return {Interval}
4915
4940
  */
4916
4941
  static before(e, s) {
4917
- const n = X.fromDurationLike(s), r = Bt(e);
4918
- return we.fromDateTimes(r.minus(n), r);
4942
+ const n = X.fromDurationLike(s), r = Zt(e);
4943
+ return Ae.fromDateTimes(r.minus(n), r);
4919
4944
  }
4920
4945
  /**
4921
4946
  * Create an Interval from an ISO 8601 string.
@@ -4941,18 +4966,18 @@ class we {
4941
4966
  l = !1;
4942
4967
  }
4943
4968
  if (a && l)
4944
- return we.fromDateTimes(i, o);
4969
+ return Ae.fromDateTimes(i, o);
4945
4970
  if (a) {
4946
4971
  const u = X.fromISO(r, s);
4947
4972
  if (u.isValid)
4948
- return we.after(i, u);
4973
+ return Ae.after(i, u);
4949
4974
  } else if (l) {
4950
4975
  const u = X.fromISO(n, s);
4951
4976
  if (u.isValid)
4952
- return we.before(o, u);
4977
+ return Ae.before(o, u);
4953
4978
  }
4954
4979
  }
4955
- return we.invalid("unparsable", `the input "${e}" can't be parsed as ISO 8601`);
4980
+ return Ae.invalid("unparsable", `the input "${e}" can't be parsed as ISO 8601`);
4956
4981
  }
4957
4982
  /**
4958
4983
  * Check if an object is an Interval. Works across context boundaries
@@ -5075,7 +5100,7 @@ class we {
5075
5100
  * @return {Interval}
5076
5101
  */
5077
5102
  set({ start: e, end: s } = {}) {
5078
- return this.isValid ? we.fromDateTimes(e || this.s, s || this.e) : this;
5103
+ return this.isValid ? Ae.fromDateTimes(e || this.s, s || this.e) : this;
5079
5104
  }
5080
5105
  /**
5081
5106
  * Split this Interval at each of the specified DateTimes
@@ -5084,11 +5109,11 @@ class we {
5084
5109
  */
5085
5110
  splitAt(...e) {
5086
5111
  if (!this.isValid) return [];
5087
- const s = e.map(Bt).filter((a) => this.contains(a)).sort((a, o) => a.toMillis() - o.toMillis()), n = [];
5112
+ const s = e.map(Zt).filter((a) => this.contains(a)).sort((a, o) => a.toMillis() - o.toMillis()), n = [];
5088
5113
  let { s: r } = this, i = 0;
5089
5114
  for (; r < this.e; ) {
5090
5115
  const a = s[i] || this.e, o = +a > +this.e ? this.e : a;
5091
- n.push(we.fromDateTimes(r, o)), r = o, i += 1;
5116
+ n.push(Ae.fromDateTimes(r, o)), r = o, i += 1;
5092
5117
  }
5093
5118
  return n;
5094
5119
  }
@@ -5106,7 +5131,7 @@ class we {
5106
5131
  const a = [];
5107
5132
  for (; n < this.e; ) {
5108
5133
  const o = this.start.plus(s.mapUnits((l) => l * r));
5109
- i = +o > +this.e ? this.e : o, a.push(we.fromDateTimes(n, i)), n = i, r += 1;
5134
+ i = +o > +this.e ? this.e : o, a.push(Ae.fromDateTimes(n, i)), n = i, r += 1;
5110
5135
  }
5111
5136
  return a;
5112
5137
  }
@@ -5168,7 +5193,7 @@ class we {
5168
5193
  intersection(e) {
5169
5194
  if (!this.isValid) return this;
5170
5195
  const s = this.s > e.s ? this.s : e.s, n = this.e < e.e ? this.e : e.e;
5171
- return s >= n ? null : we.fromDateTimes(s, n);
5196
+ return s >= n ? null : Ae.fromDateTimes(s, n);
5172
5197
  }
5173
5198
  /**
5174
5199
  * Return an Interval representing the union of this Interval and the specified Interval.
@@ -5179,7 +5204,7 @@ class we {
5179
5204
  union(e) {
5180
5205
  if (!this.isValid) return this;
5181
5206
  const s = this.s < e.s ? this.s : e.s, n = this.e > e.e ? this.e : e.e;
5182
- return we.fromDateTimes(s, n);
5207
+ return Ae.fromDateTimes(s, n);
5183
5208
  }
5184
5209
  /**
5185
5210
  * Merge an array of Intervals into an equivalent minimal set of Intervals.
@@ -5209,8 +5234,8 @@ class we {
5209
5234
  { time: l.e, type: "e" }
5210
5235
  ]), a = Array.prototype.concat(...i), o = a.sort((l, u) => l.time - u.time);
5211
5236
  for (const l of o)
5212
- n += l.type === "s" ? 1 : -1, n === 1 ? s = l.time : (s && +s != +l.time && r.push(we.fromDateTimes(s, l.time)), s = null);
5213
- return we.merge(r);
5237
+ n += l.type === "s" ? 1 : -1, n === 1 ? s = l.time : (s && +s != +l.time && r.push(Ae.fromDateTimes(s, l.time)), s = null);
5238
+ return Ae.merge(r);
5214
5239
  }
5215
5240
  /**
5216
5241
  * Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals.
@@ -5218,7 +5243,7 @@ class we {
5218
5243
  * @return {Array}
5219
5244
  */
5220
5245
  difference(...e) {
5221
- return we.xor([this].concat(e)).map((s) => this.intersection(s)).filter((s) => s && !s.isEmpty());
5246
+ return Ae.xor([this].concat(e)).map((s) => this.intersection(s)).filter((s) => s && !s.isEmpty());
5222
5247
  }
5223
5248
  /**
5224
5249
  * Returns a string representation of this Interval appropriate for debugging.
@@ -5320,7 +5345,7 @@ class we {
5320
5345
  * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 }))
5321
5346
  */
5322
5347
  mapEndpoints(e) {
5323
- return we.fromDateTimes(e(this.s), e(this.e));
5348
+ return Ae.fromDateTimes(e(this.s), e(this.e));
5324
5349
  }
5325
5350
  }
5326
5351
  class cs {
@@ -5329,7 +5354,7 @@ class cs {
5329
5354
  * @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone.
5330
5355
  * @return {boolean}
5331
5356
  */
5332
- static hasDST(e = Ae.defaultZone) {
5357
+ static hasDST(e = Ne.defaultZone) {
5333
5358
  const s = F.now().setZone(e).set({ month: 12 });
5334
5359
  return !e.isUniversal && s.offset !== s.set({ month: 6 }).offset;
5335
5360
  }
@@ -5356,7 +5381,7 @@ class cs {
5356
5381
  * @return {Zone}
5357
5382
  */
5358
5383
  static normalizeZone(e) {
5359
- return ht(e, Ae.defaultZone);
5384
+ return ht(e, Ne.defaultZone);
5360
5385
  }
5361
5386
  /**
5362
5387
  * Get the weekday on which the week starts according to the given locale.
@@ -5748,7 +5773,7 @@ function Yl(t, e, s) {
5748
5773
  const r = {};
5749
5774
  let i = 1;
5750
5775
  for (const a in s)
5751
- if (Rt(s, a)) {
5776
+ if (Ut(s, a)) {
5752
5777
  const o = s[a], l = o.groups ? o.groups + 1 : 1;
5753
5778
  !o.literal && o.token && (r[o.token.val[0]] = o.deser(n.slice(i, i + l))), i += l;
5754
5779
  }
@@ -5819,8 +5844,8 @@ class Ei {
5819
5844
  explainFromTokens(e) {
5820
5845
  if (this.isValid) {
5821
5846
  const [s, n] = Yl(e, this.regex, this.handlers), [r, i, a] = n ? _l(n) : [null, null, void 0];
5822
- if (Rt(n, "a") && Rt(n, "H"))
5823
- throw new Mt(
5847
+ if (Ut(n, "a") && Ut(n, "H"))
5848
+ throw new Dt(
5824
5849
  "Can't include meridiem when specifying 24-hour format"
5825
5850
  );
5826
5851
  return {
@@ -6052,20 +6077,20 @@ function ur(t) {
6052
6077
  }
6053
6078
  }
6054
6079
  function sc(t) {
6055
- if (qt === void 0 && (qt = Ae.now()), t.type !== "iana")
6080
+ if (qt === void 0 && (qt = Ne.now()), t.type !== "iana")
6056
6081
  return t.offset(qt);
6057
6082
  const e = t.name;
6058
6083
  let s = sn.get(e);
6059
6084
  return s === void 0 && (s = t.offset(qt), sn.set(e, s)), s;
6060
6085
  }
6061
6086
  function dr(t, e) {
6062
- const s = ht(e.zone, Ae.defaultZone);
6087
+ const s = ht(e.zone, Ne.defaultZone);
6063
6088
  if (!s.isValid)
6064
6089
  return F.invalid(Gt(s));
6065
6090
  const n = re.fromObject(e);
6066
6091
  let r, i;
6067
6092
  if ($(t.year))
6068
- r = Ae.now();
6093
+ r = Ne.now();
6069
6094
  else {
6070
6095
  for (const l of ps)
6071
6096
  $(t[l]) && (t[l] = Ci[l]);
@@ -6099,9 +6124,9 @@ class F {
6099
6124
  * @access private
6100
6125
  */
6101
6126
  constructor(e) {
6102
- const s = e.zone || Ae.defaultZone;
6127
+ const s = e.zone || Ne.defaultZone;
6103
6128
  let n = e.invalid || (Number.isNaN(e.ts) ? new et("invalid input") : null) || (s.isValid ? null : Gt(s));
6104
- this.ts = $(e.ts) ? Ae.now() : e.ts;
6129
+ this.ts = $(e.ts) ? Ne.now() : e.ts;
6105
6130
  let r = null, i = null;
6106
6131
  if (!n)
6107
6132
  if (e.old && e.old.ts === this.ts && e.old.zone.equals(s))
@@ -6188,7 +6213,7 @@ class F {
6188
6213
  const n = Uo(e) ? e.valueOf() : NaN;
6189
6214
  if (Number.isNaN(n))
6190
6215
  return F.invalid("invalid input");
6191
- const r = ht(s.zone, Ae.defaultZone);
6216
+ const r = ht(s.zone, Ne.defaultZone);
6192
6217
  return r.isValid ? new F({
6193
6218
  ts: n,
6194
6219
  zone: r,
@@ -6210,7 +6235,7 @@ class F {
6210
6235
  if (yt(e))
6211
6236
  return e < -or || e > or ? F.invalid("Timestamp out of range") : new F({
6212
6237
  ts: e,
6213
- zone: ht(s.zone, Ae.defaultZone),
6238
+ zone: ht(s.zone, Ne.defaultZone),
6214
6239
  loc: re.fromObject(s)
6215
6240
  });
6216
6241
  throw new De(
@@ -6232,7 +6257,7 @@ class F {
6232
6257
  if (yt(e))
6233
6258
  return new F({
6234
6259
  ts: e * 1e3,
6235
- zone: ht(s.zone, Ae.defaultZone),
6260
+ zone: ht(s.zone, Ne.defaultZone),
6236
6261
  loc: re.fromObject(s)
6237
6262
  });
6238
6263
  throw new De("fromSeconds requires a numerical input");
@@ -6272,16 +6297,16 @@ class F {
6272
6297
  */
6273
6298
  static fromObject(e, s = {}) {
6274
6299
  e = e || {};
6275
- const n = ht(s.zone, Ae.defaultZone);
6300
+ const n = ht(s.zone, Ne.defaultZone);
6276
6301
  if (!n.isValid)
6277
6302
  return F.invalid(Gt(n));
6278
- const r = re.fromObject(s), i = As(e, ur), { minDaysInFirstWeek: a, startOfWeek: o } = Jn(i, r), l = Ae.now(), u = $(s.specificOffset) ? n.offset(l) : s.specificOffset, m = !$(i.ordinal), d = !$(i.year), y = !$(i.month) || !$(i.day), p = d || y, v = i.weekYear || i.weekNumber;
6303
+ const r = re.fromObject(s), i = As(e, ur), { minDaysInFirstWeek: a, startOfWeek: o } = Jn(i, r), l = Ne.now(), u = $(s.specificOffset) ? n.offset(l) : s.specificOffset, m = !$(i.ordinal), d = !$(i.year), y = !$(i.month) || !$(i.day), p = d || y, v = i.weekYear || i.weekNumber;
6279
6304
  if ((p || m) && v)
6280
- throw new Mt(
6305
+ throw new Dt(
6281
6306
  "Can't mix weekYear/weekNumber units with year/month/day or ordinals"
6282
6307
  );
6283
6308
  if (y && m)
6284
- throw new Mt("Can't mix ordinal dates with month/day");
6309
+ throw new Dt("Can't mix ordinal dates with month/day");
6285
6310
  const k = v || i.weekday && !p;
6286
6311
  let b, B, q = ds(l, u);
6287
6312
  k ? (b = ec, B = Ql, q = vs(q, a, o)) : m ? (b = tc, B = Xl, q = Fs(q)) : (b = ps, B = Ci);
@@ -6429,7 +6454,7 @@ class F {
6429
6454
  if (!e)
6430
6455
  throw new De("need to specify a reason the DateTime is invalid");
6431
6456
  const n = e instanceof et ? e : new et(e, s);
6432
- if (Ae.throwOnInvalid)
6457
+ if (Ne.throwOnInvalid)
6433
6458
  throw new ro(n);
6434
6459
  return new F({ invalid: n });
6435
6460
  }
@@ -6791,7 +6816,7 @@ class F {
6791
6816
  * @type {number}
6792
6817
  */
6793
6818
  get daysInYear() {
6794
- return this.isValid ? Dt(this.year) : NaN;
6819
+ return this.isValid ? Ct(this.year) : NaN;
6795
6820
  }
6796
6821
  /**
6797
6822
  * Returns the number of weeks in this DateTime's year
@@ -6848,7 +6873,7 @@ class F {
6848
6873
  * @return {DateTime}
6849
6874
  */
6850
6875
  toLocal() {
6851
- return this.setZone(Ae.defaultZone);
6876
+ return this.setZone(Ne.defaultZone);
6852
6877
  }
6853
6878
  /**
6854
6879
  * "Set" the DateTime's zone to specified zone. Returns a newly-constructed DateTime.
@@ -6860,7 +6885,7 @@ class F {
6860
6885
  * @return {DateTime}
6861
6886
  */
6862
6887
  setZone(e, { keepLocalTime: s = !1, keepCalendarTime: n = !1 } = {}) {
6863
- if (e = ht(e, Ae.defaultZone), e.equals(this.zone))
6888
+ if (e = ht(e, Ne.defaultZone), e.equals(this.zone))
6864
6889
  return this;
6865
6890
  if (e.isValid) {
6866
6891
  let r = this.ts;
@@ -6908,11 +6933,11 @@ class F {
6908
6933
  if (!this.isValid) return this;
6909
6934
  const s = As(e, ur), { minDaysInFirstWeek: n, startOfWeek: r } = Jn(s, this.loc), i = !$(s.weekYear) || !$(s.weekNumber) || !$(s.weekday), a = !$(s.ordinal), o = !$(s.year), l = !$(s.month) || !$(s.day), u = o || l, m = s.weekYear || s.weekNumber;
6910
6935
  if ((u || a) && m)
6911
- throw new Mt(
6936
+ throw new Dt(
6912
6937
  "Can't mix weekYear/weekNumber units with year/month/day or ordinals"
6913
6938
  );
6914
6939
  if (l && a)
6915
- throw new Mt("Can't mix ordinal dates with month/day");
6940
+ throw new Dt("Can't mix ordinal dates with month/day");
6916
6941
  let d;
6917
6942
  i ? d = _n(
6918
6943
  { ...vs(this.c, n, r), ...s },
@@ -7339,7 +7364,7 @@ class F {
7339
7364
  * @return {Interval|DateTime}
7340
7365
  */
7341
7366
  until(e) {
7342
- return this.isValid ? we.fromDateTimes(this, e) : this;
7367
+ return this.isValid ? Ae.fromDateTimes(this, e) : this;
7343
7368
  }
7344
7369
  /**
7345
7370
  * Return whether this DateTime is in the same unit of time as another DateTime.
@@ -7670,7 +7695,7 @@ class F {
7670
7695
  return Kr;
7671
7696
  }
7672
7697
  }
7673
- function Bt(t) {
7698
+ function Zt(t) {
7674
7699
  if (F.isDateTime(t))
7675
7700
  return t;
7676
7701
  if (t && t.valueOf && yt(t.valueOf()))
@@ -8229,8 +8254,8 @@ function fc(t) {
8229
8254
  ] }),
8230
8255
  /* @__PURE__ */ f(Ze, { gutter: [16, 16], align: "bottom", className: "mt-4 items-center", children: [
8231
8256
  /* @__PURE__ */ c(K, { xs: 24, sm: 12, md: 8, lg: 7, children: /* @__PURE__ */ f("div", { className: "flex items-center h-full gap-8", children: [
8232
- !A && /* @__PURE__ */ c(Ot, { checked: Z, onChange: (te) => R(te.target.checked), className: "w-full", children: "Human-In-The-Loop" }),
8233
- /* @__PURE__ */ c(Ot, { checked: G, onChange: (te) => h(te.target.checked), className: "w-full", children: "Auto-expire in 5 minutes" })
8257
+ !A && /* @__PURE__ */ c(Mt, { checked: Z, onChange: (te) => R(te.target.checked), className: "w-full", children: "Human-In-The-Loop" }),
8258
+ /* @__PURE__ */ c(Mt, { checked: G, onChange: (te) => h(te.target.checked), className: "w-full", children: "Auto-expire in 5 minutes" })
8234
8259
  ] }) }),
8235
8260
  /* @__PURE__ */ c(K, { xs: 24, sm: 12, md: 8, children: /* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
8236
8261
  /* @__PURE__ */ c(ze, { onClick: g, children: "Clear" }),
@@ -8486,7 +8511,7 @@ function zs(t) {
8486
8511
  };
8487
8512
  }
8488
8513
  function gc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules: r, onSave: i }) {
8489
- const { rules: a, alerts: o } = Ge(), [l, u] = S("By Severity"), [m, d] = S("By severity"), [y, p] = S("By Severity"), [v, k] = S(!1), [b, B] = S(!1), [q, Q] = S(!1), [x, C] = S(null), [Z, R] = S("rules"), [G, h] = S(), [g, M] = S(), [ie, ye] = S(), [O, N] = S(), [A, E] = S(), [T, D] = S(), [L, _] = S(), [Y, j] = S(), [ce, me] = S([]), [Oe, te] = S([]), [Se, ke] = S(!1), [pe, P] = S(!1), [W, ge] = S({}), [ue, Ve] = S({}), [be, Ke] = S(s || []), [Me, Ne] = S([]), [Pt, pt] = S(!1), [Nt, nt] = S(!1), [Be, Tt] = S(n || []);
8514
+ const { rules: a, alerts: o } = Ge(), [l, u] = S("By Severity"), [m, d] = S("By severity"), [y, p] = S("By Severity"), [v, k] = S(!1), [b, B] = S(!1), [q, Q] = S(!1), [x, C] = S(null), [Z, R] = S("rules"), [G, h] = S(), [g, M] = S(), [ie, ye] = S(), [O, N] = S(), [A, E] = S(), [T, D] = S(), [L, _] = S(), [Y, j] = S(), [ce, me] = S([]), [Oe, te] = S([]), [Se, ke] = S(!1), [pe, P] = S(!1), [W, ge] = S({}), [ue, Ve] = S({}), [be, Ke] = S(s || []), [Me, we] = S([]), [Wt, pt] = S(!1), [Nt, nt] = S(!1), [Be, Tt] = S(n || []);
8490
8515
  oe(() => {
8491
8516
  n && n.length && Tt(n);
8492
8517
  }, [n]), oe(() => {
@@ -8507,7 +8532,7 @@ function gc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
8507
8532
  isAutoExpire: fe
8508
8533
  };
8509
8534
  });
8510
- Ne(se);
8535
+ we(se);
8511
8536
  }, [Be, e, W, ue]);
8512
8537
  const bt = ve(
8513
8538
  () => t.map((U) => ({ label: U.DisplayName, value: U.SeverityId })),
@@ -8576,7 +8601,7 @@ function gc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
8576
8601
  humanLoop: fe
8577
8602
  };
8578
8603
  });
8579
- Ne(J);
8604
+ we(J);
8580
8605
  } catch (U) {
8581
8606
  console.error("Failed to refetch entries", U);
8582
8607
  } finally {
@@ -8643,7 +8668,7 @@ function gc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
8643
8668
  )
8644
8669
  ] })
8645
8670
  ] }),
8646
- /* @__PURE__ */ c(Zt, { className: "my-6" }),
8671
+ /* @__PURE__ */ c(zt, { className: "my-6" }),
8647
8672
  /* @__PURE__ */ f("div", { children: [
8648
8673
  /* @__PURE__ */ c(hr, { level: 4, className: "!mb-4", children: "Escalation Settings" }),
8649
8674
  /* @__PURE__ */ c(
@@ -8725,7 +8750,7 @@ function gc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
8725
8750
  pt(!1);
8726
8751
  }
8727
8752
  },
8728
- saving: Pt,
8753
+ saving: Wt,
8729
8754
  onActionTypesLoaded: (U) => {
8730
8755
  const se = {};
8731
8756
  for (const J of U)
@@ -8737,7 +8762,7 @@ function gc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
8737
8762
  }
8738
8763
  )
8739
8764
  ] }),
8740
- /* @__PURE__ */ c(Zt, { className: "my-6" }),
8765
+ /* @__PURE__ */ c(zt, { className: "my-6" }),
8741
8766
  /* @__PURE__ */ c(
8742
8767
  hc,
8743
8768
  {
@@ -8751,9 +8776,9 @@ function gc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
8751
8776
  }
8752
8777
  }
8753
8778
  ),
8754
- /* @__PURE__ */ c(Zt, { className: "my-6" }),
8779
+ /* @__PURE__ */ c(zt, { className: "my-6" }),
8755
8780
  /* @__PURE__ */ c(pc, { userRoles: be, rules: e, rawRules: n }),
8756
- /* @__PURE__ */ c(Zt, {})
8781
+ /* @__PURE__ */ c(zt, {})
8757
8782
  ] });
8758
8783
  }
8759
8784
  const { Title: yr, Text: fs } = Jt;
@@ -8842,7 +8867,7 @@ function Bc({ severities: t, rules: e, onSave: s, onCancel: n }) {
8842
8867
  /* @__PURE__ */ c(yr, { level: 5, className: "!mb-2", children: "Anomalies" }),
8843
8868
  Q ? /* @__PURE__ */ c("div", { className: "py-4", children: /* @__PURE__ */ c(Ns, {}) }) : /* @__PURE__ */ c(st, { direction: "vertical", size: 10, className: "w-full", children: (Array.isArray(B) ? B : []).map((h) => {
8844
8869
  const g = String(h.recordId), M = h.anomalyName;
8845
- return /* @__PURE__ */ c(Ot, { checked: u.has(g), onChange: () => R(g), children: M }, g);
8870
+ return /* @__PURE__ */ c(Mt, { checked: u.has(g), onChange: () => R(g), children: M }, g);
8846
8871
  }) })
8847
8872
  ] }),
8848
8873
  /* @__PURE__ */ f("div", { className: "mb-4", children: [
@@ -8861,12 +8886,12 @@ function Bc({ severities: t, rules: e, onSave: s, onCancel: n }) {
8861
8886
  ] })
8862
8887
  ] }) }) }),
8863
8888
  /* @__PURE__ */ f(Ze, { gutter: [24, 12], children: [
8864
- /* @__PURE__ */ c(K, { children: /* @__PURE__ */ c(Ot, { checked: k.inApp, onChange: (h) => b({ ...k, inApp: h.target.checked }), children: "In-app" }) }),
8865
- /* @__PURE__ */ c(K, { children: /* @__PURE__ */ c(Ot, { checked: k.sms, onChange: (h) => b({ ...k, sms: h.target.checked }), children: "SMS" }) }),
8866
- /* @__PURE__ */ c(K, { children: /* @__PURE__ */ c(Ot, { checked: k.email, onChange: (h) => b({ ...k, email: h.target.checked }), children: "Email" }) })
8889
+ /* @__PURE__ */ c(K, { children: /* @__PURE__ */ c(Mt, { checked: k.inApp, onChange: (h) => b({ ...k, inApp: h.target.checked }), children: "In-app" }) }),
8890
+ /* @__PURE__ */ c(K, { children: /* @__PURE__ */ c(Mt, { checked: k.sms, onChange: (h) => b({ ...k, sms: h.target.checked }), children: "SMS" }) }),
8891
+ /* @__PURE__ */ c(K, { children: /* @__PURE__ */ c(Mt, { checked: k.email, onChange: (h) => b({ ...k, email: h.target.checked }), children: "Email" }) })
8867
8892
  ] })
8868
8893
  ] }),
8869
- /* @__PURE__ */ c(Zt, {}),
8894
+ /* @__PURE__ */ c(zt, {}),
8870
8895
  /* @__PURE__ */ f(st, { className: "gap-3", children: [
8871
8896
  /* @__PURE__ */ c(ze, { onClick: n, disabled: C, children: "Cancel" }),
8872
8897
  /* @__PURE__ */ c(ze, { type: "primary", onClick: G, loading: C, children: "Save" })
@@ -9073,7 +9098,7 @@ const Tc = ({
9073
9098
  /* @__PURE__ */ c(Tr, { boxes: d, priority: n })
9074
9099
  ] });
9075
9100
  }, Ic = ({ items: t }) => {
9076
- const { timeZoneDetails: e } = ts(), s = (i) => i.replace(/([a-z])([A-Z])/g, "$1 $2"), r = (() => {
9101
+ const { timeZoneDetails: e } = ts(), s = (i) => i?.replace(/([a-z])([A-Z])/g, "$1 $2"), r = (() => {
9077
9102
  if (!t?.length || t.length < 2) return null;
9078
9103
  const i = new Date(t[0].timeStamp).getTime(), a = new Date(t[t.length - 1].timeStamp).getTime(), o = Math.floor((a - i) / 1e3), l = a - i, u = Math.floor(o / 3600), m = Math.floor(o % 3600 / 60), d = o % 60, y = l % 1e3;
9079
9104
  return [
@@ -9176,8 +9201,8 @@ const Tc = ({
9176
9201
  priority: be,
9177
9202
  statusType: Ke,
9178
9203
  id: Me,
9179
- alertDetails: Ne,
9180
- statusHistory: Pt,
9204
+ alertDetails: we,
9205
+ statusHistory: Wt,
9181
9206
  mediaDetails: pt,
9182
9207
  alertNumber: Nt
9183
9208
  } = te, nt = te.bbox_xyxy, Be = ve(
@@ -9288,15 +9313,15 @@ const Tc = ({
9288
9313
  try {
9289
9314
  const le = await fetch(fe, { method: "HEAD", signal: H.signal });
9290
9315
  if (le.ok) {
9291
- w || j((Wt) => ({ ...Wt, [fe]: !0 }));
9316
+ w || j((Vt) => ({ ...Vt, [fe]: !0 }));
9292
9317
  return;
9293
9318
  }
9294
9319
  if (le.status === 404) {
9295
- w || j((Wt) => ({ ...Wt, [fe]: !1 }));
9320
+ w || j((Vt) => ({ ...Vt, [fe]: !1 }));
9296
9321
  return;
9297
9322
  }
9298
9323
  if (!(await fetch(fe, { method: "GET", signal: H.signal })).ok) throw new Error("Media not available");
9299
- w || j((Wt) => ({ ...Wt, [fe]: !0 }));
9324
+ w || j((Vt) => ({ ...Vt, [fe]: !0 }));
9300
9325
  } catch {
9301
9326
  w || j((le) => ({ ...le, [fe]: !1 }));
9302
9327
  }
@@ -9370,14 +9395,14 @@ const Tc = ({
9370
9395
  children: [
9371
9396
  /* @__PURE__ */ f("div", { className: "flex flex-col gap-2", children: [
9372
9397
  /* @__PURE__ */ c("div", { className: "text-sm font-bold", children: Tt }),
9373
- Ne?.firstName ? /* @__PURE__ */ f("div", { className: "text-sm text-gray-500", children: [
9398
+ we?.firstName ? /* @__PURE__ */ f("div", { className: "text-sm text-gray-500", children: [
9374
9399
  "Resident ID/Name: ",
9375
- Ne?.firstName,
9400
+ we?.firstName,
9376
9401
  " ",
9377
- Ne?.lastName || "",
9402
+ we?.lastName || "",
9378
9403
  " ",
9379
9404
  "  ",
9380
- Ne?.residentId || ""
9405
+ we?.residentId || ""
9381
9406
  ] }) : null,
9382
9407
  /* @__PURE__ */ f("div", { className: "text-sm text-gray-500", children: [
9383
9408
  "Timestamp:",
@@ -9556,7 +9581,7 @@ const Tc = ({
9556
9581
  priority: be,
9557
9582
  spaceName: ue,
9558
9583
  alertNumber: Nt,
9559
- statusHistory: Pt,
9584
+ statusHistory: Wt,
9560
9585
  notifGroups: C
9561
9586
  }
9562
9587
  )