@cccsaurora/clue-ui 1.2.0-dev.253 → 1.2.0

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.
Files changed (179) hide show
  1. package/ActionForm-pWyIi01Z.js +4460 -0
  2. package/AnnotationDetails-11P7yhyx.js +160 -0
  3. package/AnnotationPreview-BGqlBBcp.js +140 -0
  4. package/ClueEnrichContext-DDZf646J.js +418 -0
  5. package/FlexOne-BXWFOd1T.js +6 -0
  6. package/_MapCache-BiTi0iqu.js +180 -0
  7. package/_Uint8Array-TJBs9NS2.js +101 -0
  8. package/_baseAssignValue-CNMLQZco.js +20 -0
  9. package/_baseClone-DajKHDCs.js +207 -0
  10. package/_baseExtremum-DhV10dXG.js +27 -0
  11. package/_baseFlatten-C8CjmqQ-.js +72 -0
  12. package/_baseGet-DSZygzyq.js +79 -0
  13. package/_baseIsEqual-C08cUUpA.js +147 -0
  14. package/_baseIteratee-DGZdhdqr.js +95 -0
  15. package/_baseSlice-M5RKzt1A.js +10 -0
  16. package/_baseSum-wEbgNeUs.js +10 -0
  17. package/_baseUniq-CGlHphLr.js +79 -0
  18. package/_commonjsHelpers-DaMA6jEr.js +8 -0
  19. package/_createAggregator-BvcoTZto.js +53 -0
  20. package/_getPrototype-Dm06JiGv.js +5 -0
  21. package/_getTag-Cfxlub3L.js +90 -0
  22. package/_setToArray-C7yMOeww.js +29 -0
  23. package/cloneDeep-wjl3XmFj.js +8 -0
  24. package/components/AnnotationBody.js +35 -49
  25. package/components/AnnotationDetailPopover.js +30 -36
  26. package/components/AnnotationDetails.js +7 -7
  27. package/components/AnnotationEntry.js +35 -35
  28. package/components/AnnotationPreview.js +5 -5
  29. package/components/ClassificationChip.js +23 -44
  30. package/components/CountBadge.js +26 -31
  31. package/components/EnrichedCard.js +97 -110
  32. package/components/EnrichedChip.js +105 -130
  33. package/components/EnrichedTypography.js +107 -133
  34. package/components/ErrorBoundary.js +24 -28
  35. package/components/RetryFailedEnrichments.js +9 -10
  36. package/components/SourcePicker.js +49 -57
  37. package/components/actions/ActionForm.js +4 -4
  38. package/components/actions/ExecutePopover.js +59 -75
  39. package/components/actions/ResultModal.js +4 -4
  40. package/components/actions/form/schemaAdapter.js +23 -39
  41. package/components/actions/formats/FileResult.js +59 -86
  42. package/components/actions/formats/index.js +10 -21
  43. package/components/display/graph/ExpandMoreButton.js +10 -10
  44. package/components/display/graph/elements/NodeCard.js +91 -111
  45. package/components/display/graph/elements/NodeTag.js +13 -15
  46. package/components/display/graph/index.js +202 -261
  47. package/components/display/graph/visualizations/Leaf.js +69 -88
  48. package/components/display/graph/visualizations/cloud/index.js +81 -98
  49. package/components/display/graph/visualizations/icons/BaseIcon.js +21 -26
  50. package/components/display/graph/visualizations/icons/BugIcon.js +12 -12
  51. package/components/display/graph/visualizations/icons/HostIcon.js +12 -12
  52. package/components/display/graph/visualizations/icons/NetworkIcon.js +12 -12
  53. package/components/display/graph/visualizations/icons/ProcessIcon.js +12 -12
  54. package/components/display/graph/visualizations/icons/TargetIcon.js +13 -13
  55. package/components/display/graph/visualizations/icons/index.js +13 -14
  56. package/components/display/graph/visualizations/panels/NodePanel.js +8 -10
  57. package/components/display/graph/visualizations/tree/BundleLine.js +81 -108
  58. package/components/display/graph/visualizations/tree/Triangle.js +13 -13
  59. package/components/display/graph/visualizations/tree/index.js +305 -407
  60. package/components/display/icons/Iconified.js +12 -27
  61. package/components/display/json/index.js +4 -4
  62. package/components/display/markdown/index.js +5770 -8678
  63. package/components/enrichment/EnrichPopover.js +46 -54
  64. package/components/fetchers/Fetcher.js +117 -155
  65. package/components/fetchers/PreviewModal.js +17 -20
  66. package/components/fetchers/StatusChip.js +17 -21
  67. package/components/group/Entry.js +11 -13
  68. package/components/group/Group.js +10 -13
  69. package/components/group/GroupControl.js +65 -76
  70. package/components/stats/QueryStatus.js +33 -43
  71. package/countBy-pIyxNZhO.js +8 -0
  72. package/data/event.js +4 -6
  73. package/database/index.js +2 -2
  74. package/debounce-DryYcbJ4.js +56 -0
  75. package/get-CH7kz5Ix.js +8 -0
  76. package/groupBy-yNrpdipq.js +8 -0
  77. package/hooks/ClueActionContext.js +6 -6
  78. package/hooks/ClueComponentContext.js +23 -29
  79. package/hooks/ClueConfigProvider.js +12 -14
  80. package/hooks/ClueDatabaseContext.js +13 -19
  81. package/hooks/ClueEnrichContext.js +8 -8
  82. package/hooks/ClueFetcherContext.js +56 -83
  83. package/hooks/ClueGroupContext.js +14 -17
  84. package/hooks/CluePopupContext.js +5 -5
  85. package/hooks/ClueProvider.js +10 -12
  86. package/hooks/selectors.js +7 -7
  87. package/hooks/useActionResult.js +2 -2
  88. package/hooks/useAnnotations.js +31 -47
  89. package/hooks/useClue.js +4 -6
  90. package/hooks/useClueActions.js +3 -3
  91. package/hooks/useClueConfig.js +4 -6
  92. package/hooks/useClueTypeConfig.js +3 -3
  93. package/hooks/useComparator.js +435 -722
  94. package/hooks/useErrors.js +18 -22
  95. package/hooks/useFetcherResult.js +24 -33
  96. package/hooks/useMyHighlights.js +36 -66
  97. package/hooks/useMyLocalStorage.js +37 -66
  98. package/iconify-BBckr5AQ.js +1263 -0
  99. package/icons/Action.js +49 -66
  100. package/icons/Assessment.js +68 -84
  101. package/icons/Context.js +63 -77
  102. package/icons/Opinion.js +65 -77
  103. package/icons/iconMap.js +2 -2
  104. package/identity-ByMq8VxU.js +6 -0
  105. package/index-BHAe_V9n.js +12768 -0
  106. package/index-CA5CUNZO.js +975 -0
  107. package/index-D_ZywK71.js +358 -0
  108. package/index-Dj5C04IX.js +568 -0
  109. package/index-p5_wX7q1.js +11729 -0
  110. package/isNil-CjWwlQS3.js +6 -0
  111. package/isObject-B53jY8Qg.js +7 -0
  112. package/isObjectLike-BatpeCIi.js +29 -0
  113. package/isSymbol-C3_SC0Qp.js +8 -0
  114. package/last-7CdUxN0r.js +7 -0
  115. package/main.js +60 -60
  116. package/package.json +1 -1
  117. package/sortBy-0BpKRt8p.js +79 -0
  118. package/sumBy-Do6Ff4Bw.js +8 -0
  119. package/text/Frequency.js +23 -42
  120. package/toFinite-BMy6GObD.js +14 -0
  121. package/toNumber-YVhnnJv4.js +31 -0
  122. package/useClueTypeConfig-77zd_zdF.js +2292 -0
  123. package/utils/chain.js +64 -91
  124. package/utils/classificationParser.js +256 -519
  125. package/utils/constants.js +10 -35
  126. package/utils/graph.js +45 -72
  127. package/utils/hashUtil.js +7 -7
  128. package/utils/line.js +81 -131
  129. package/utils/loggerUtil.js +3 -5
  130. package/utils/sessionStorage.js +27 -41
  131. package/utils/time.js +423 -423
  132. package/utils/utils.js +9 -9
  133. package/utils/window.js +10 -21
  134. package/utils-D5hPDE7N.js +129 -0
  135. package/ActionForm-C0aE9HUv.js +0 -5941
  136. package/AnnotationDetails-CEou0vCc.js +0 -175
  137. package/AnnotationPreview-CLMVD6Ec.js +0 -188
  138. package/ClueEnrichContext-BkD9ZwM9.js +0 -541
  139. package/FlexOne-BSYAhhtG.js +0 -9
  140. package/_MapCache-WmuDdwuH.js +0 -222
  141. package/_Uint8Array-DdG4KLKn.js +0 -128
  142. package/_baseAssignValue-CGTuELqU.js +0 -25
  143. package/_baseClone-BpWiBnMp.js +0 -283
  144. package/_baseExtremum-BY663UjY.js +0 -33
  145. package/_baseFlatten-B69cDsaV.js +0 -92
  146. package/_baseGet-Bx3A4Qfp.js +0 -108
  147. package/_baseIsEqual-B4IufFlL.js +0 -208
  148. package/_baseIteratee-7AQvAy1o.js +0 -126
  149. package/_baseSlice-GAv_YFTT.js +0 -20
  150. package/_baseSum-D0WC1dN0.js +0 -13
  151. package/_baseUniq-B8fK6hI-.js +0 -115
  152. package/_commonjsHelpers-DWwsNxpa.js +0 -8
  153. package/_createAggregator-CwGPThny.js +0 -63
  154. package/_getPrototype-CblfEidB.js +0 -5
  155. package/_getTag-jwz4XLoZ.js +0 -126
  156. package/_setToArray-CaPKQhcz.js +0 -33
  157. package/cloneDeep-DmUylbkM.js +0 -8
  158. package/countBy-DqlU5OwT.js +0 -14
  159. package/debounce-bV0h5FC5.js +0 -92
  160. package/get-DSsNkRQs.js +0 -8
  161. package/groupBy-ChDRT7uy.js +0 -14
  162. package/iconify-CXMreGTg.js +0 -1782
  163. package/identity-CPGTqrE4.js +0 -6
  164. package/index-AMfoEg_6.js +0 -696
  165. package/index-B6C2a_Lg.js +0 -1172
  166. package/index-C12gPw2W.js +0 -17698
  167. package/index-DCKkHTvx.js +0 -15750
  168. package/index-UkW8Sur3.js +0 -465
  169. package/isNil-CIubwp4T.js +0 -6
  170. package/isObject-FTY-5JQX.js +0 -7
  171. package/isObjectLike-OAgjjZye.js +0 -48
  172. package/isSymbol-Xd2FsJyp.js +0 -8
  173. package/last-CUCl67Im.js +0 -7
  174. package/sortBy-C7mGPI_D.js +0 -100
  175. package/sumBy-CGALjmwQ.js +0 -8
  176. package/toFinite-Bc55msYj.js +0 -16
  177. package/toNumber-DPxy1FBy.js +0 -39
  178. package/useClueTypeConfig-D2tf4-NM.js +0 -3289
  179. package/utils-71DpzFrA.js +0 -199
@@ -0,0 +1,79 @@
1
+ import { i as b, a as w, b as A, d as I, g as S, e as d, f as x, S as u } from "./_getTag-Cfxlub3L.js";
2
+ import { i as T } from "./_MapCache-BiTi0iqu.js";
3
+ import { s as a, S as y, c as O } from "./_setToArray-C7yMOeww.js";
4
+ function j() {
5
+ }
6
+ function m(n, t, r, i) {
7
+ for (var e = n.length, f = r + -1; ++f < e; )
8
+ if (t(n[f], f, n))
9
+ return f;
10
+ return -1;
11
+ }
12
+ function N(n) {
13
+ return n !== n;
14
+ }
15
+ function P(n, t, r) {
16
+ for (var i = r - 1, e = n.length; ++i < e; )
17
+ if (n[i] === t)
18
+ return i;
19
+ return -1;
20
+ }
21
+ function R(n, t, r) {
22
+ return t === t ? P(n, t, r) : m(n, N, r);
23
+ }
24
+ function E(n, t) {
25
+ var r = n == null ? 0 : n.length;
26
+ return !!r && R(n, t, 0) > -1;
27
+ }
28
+ function C(n, t, r) {
29
+ for (var i = -1, e = n == null ? 0 : n.length; ++i < e; )
30
+ if (r(t, n[i]))
31
+ return !0;
32
+ return !1;
33
+ }
34
+ var F = "[object Map]", L = "[object Set]", Y = Object.prototype, _ = Y.hasOwnProperty;
35
+ function K(n) {
36
+ if (n == null)
37
+ return !0;
38
+ if (b(n) && (T(n) || typeof n == "string" || typeof n.splice == "function" || w(n) || A(n) || I(n)))
39
+ return !n.length;
40
+ var t = S(n);
41
+ if (t == F || t == L)
42
+ return !n.size;
43
+ if (d(n))
44
+ return !x(n).length;
45
+ for (var r in n)
46
+ if (_.call(n, r))
47
+ return !1;
48
+ return !0;
49
+ }
50
+ var k = 1 / 0, q = u && 1 / a(new u([, -0]))[1] == k ? function(n) {
51
+ return new u(n);
52
+ } : j, z = 200;
53
+ function M(n, t, r) {
54
+ var i = -1, e = E, f = n.length, c = !0, h = [], s = h;
55
+ if (r)
56
+ c = !1, e = C;
57
+ else if (f >= z) {
58
+ var l = t ? null : q(n);
59
+ if (l)
60
+ return a(l);
61
+ c = !1, e = O, s = new y();
62
+ } else
63
+ s = t ? [] : h;
64
+ n:
65
+ for (; ++i < f; ) {
66
+ var o = n[i], g = t ? t(o) : o;
67
+ if (o = r || o !== 0 ? o : 0, c && g === g) {
68
+ for (var p = s.length; p--; )
69
+ if (s[p] === g)
70
+ continue n;
71
+ t && s.push(g), h.push(o);
72
+ } else e(s, g, r) || (s !== h && s.push(g), h.push(o));
73
+ }
74
+ return h;
75
+ }
76
+ export {
77
+ M as b,
78
+ K as i
79
+ };
@@ -0,0 +1,8 @@
1
+ var o = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2
+ function l(e) {
3
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
4
+ }
5
+ export {
6
+ o as c,
7
+ l as g
8
+ };
@@ -0,0 +1,53 @@
1
+ import { k as g } from "./_Uint8Array-TJBs9NS2.js";
2
+ import { i as h } from "./_getTag-Cfxlub3L.js";
3
+ import { b } from "./_baseIteratee-DGZdhdqr.js";
4
+ import { i as o } from "./_MapCache-BiTi0iqu.js";
5
+ function m(e, t, r, n) {
6
+ for (var a = -1, i = e == null ? 0 : e.length; ++a < i; ) {
7
+ var f = e[a];
8
+ t(n, f, r(f), e);
9
+ }
10
+ return n;
11
+ }
12
+ function p(e) {
13
+ return function(t, r, n) {
14
+ for (var a = -1, i = Object(t), f = n(t), u = f.length; u--; ) {
15
+ var s = f[++a];
16
+ if (r(i[s], s, i) === !1)
17
+ break;
18
+ }
19
+ return t;
20
+ };
21
+ }
22
+ var v = p();
23
+ function k(e, t) {
24
+ return e && v(e, t, g);
25
+ }
26
+ function A(e, t) {
27
+ return function(r, n) {
28
+ if (r == null)
29
+ return r;
30
+ if (!h(r))
31
+ return e(r, n);
32
+ for (var a = r.length, i = -1, f = Object(r); ++i < a && n(f[i], i, f) !== !1; )
33
+ ;
34
+ return r;
35
+ };
36
+ }
37
+ var w = A(k);
38
+ function x(e, t, r, n) {
39
+ return w(e, function(a, i, f) {
40
+ t(n, a, r(a), f);
41
+ }), n;
42
+ }
43
+ function E(e, t) {
44
+ return function(r, n) {
45
+ var a = o(r) ? m : x, i = {};
46
+ return a(r, e, b(n), i);
47
+ };
48
+ }
49
+ export {
50
+ k as a,
51
+ w as b,
52
+ E as c
53
+ };
@@ -0,0 +1,5 @@
1
+ import { o as t } from "./_getTag-Cfxlub3L.js";
2
+ var e = t(Object.getPrototypeOf, Object);
3
+ export {
4
+ e as g
5
+ };
@@ -0,0 +1,90 @@
1
+ import { g as i, b as B, t as n, a as b } from "./_MapCache-BiTi0iqu.js";
2
+ import { r as c, i as T, b as u, f as C } from "./isObjectLike-BatpeCIi.js";
3
+ var f = i(c, "WeakMap"), k = 9007199254740991;
4
+ function P(r) {
5
+ return typeof r == "number" && r > -1 && r % 1 == 0 && r <= k;
6
+ }
7
+ function Pr(r) {
8
+ return r != null && P(r.length) && !B(r);
9
+ }
10
+ var V = Object.prototype;
11
+ function F(r) {
12
+ var t = r && r.constructor, a = typeof t == "function" && t.prototype || V;
13
+ return r === a;
14
+ }
15
+ var U = "[object Arguments]";
16
+ function l(r) {
17
+ return T(r) && u(r) == U;
18
+ }
19
+ var h = Object.prototype, D = h.hasOwnProperty, W = h.propertyIsEnumerable, hr = l(/* @__PURE__ */ function() {
20
+ return arguments;
21
+ }()) ? l : function(r) {
22
+ return T(r) && D.call(r, "callee") && !W.call(r, "callee");
23
+ };
24
+ function G() {
25
+ return !1;
26
+ }
27
+ var E = typeof exports == "object" && exports && !exports.nodeType && exports, m = E && typeof module == "object" && module && !module.nodeType && module, L = m && m.exports === E, v = L ? c.Buffer : void 0, N = v ? v.isBuffer : void 0, Er = N || G, q = "[object Arguments]", K = "[object Array]", R = "[object Boolean]", _ = "[object Date]", X = "[object Error]", z = "[object Function]", H = "[object Map]", J = "[object Number]", Q = "[object Object]", Y = "[object RegExp]", Z = "[object Set]", rr = "[object String]", er = "[object WeakMap]", tr = "[object ArrayBuffer]", ar = "[object DataView]", or = "[object Float32Array]", nr = "[object Float64Array]", sr = "[object Int8Array]", cr = "[object Int16Array]", ir = "[object Int32Array]", ur = "[object Uint8Array]", pr = "[object Uint8ClampedArray]", br = "[object Uint16Array]", fr = "[object Uint32Array]", e = {};
28
+ e[or] = e[nr] = e[sr] = e[cr] = e[ir] = e[ur] = e[pr] = e[br] = e[fr] = !0;
29
+ e[q] = e[K] = e[tr] = e[R] = e[ar] = e[_] = e[X] = e[z] = e[H] = e[J] = e[Q] = e[Y] = e[Z] = e[rr] = e[er] = !1;
30
+ function gr(r) {
31
+ return T(r) && P(r.length) && !!e[u(r)];
32
+ }
33
+ function yr(r) {
34
+ return function(t) {
35
+ return r(t);
36
+ };
37
+ }
38
+ var I = typeof exports == "object" && exports && !exports.nodeType && exports, s = I && typeof module == "object" && module && !module.nodeType && module, jr = s && s.exports === I, p = jr && C.process, A = function() {
39
+ try {
40
+ var r = s && s.require && s.require("util").types;
41
+ return r || p && p.binding && p.binding("util");
42
+ } catch {
43
+ }
44
+ }(), w = A && A.isTypedArray, Ir = w ? yr(w) : gr;
45
+ function Tr(r, t) {
46
+ return function(a) {
47
+ return r(t(a));
48
+ };
49
+ }
50
+ var dr = Tr(Object.keys, Object), lr = Object.prototype, mr = lr.hasOwnProperty;
51
+ function Br(r) {
52
+ if (!F(r))
53
+ return dr(r);
54
+ var t = [];
55
+ for (var a in Object(r))
56
+ mr.call(r, a) && a != "constructor" && t.push(a);
57
+ return t;
58
+ }
59
+ var g = i(c, "DataView"), y = i(c, "Promise"), j = i(c, "Set"), x = "[object Map]", vr = "[object Object]", S = "[object Promise]", M = "[object Set]", O = "[object WeakMap]", $ = "[object DataView]", Ar = n(g), wr = n(b), xr = n(y), Sr = n(j), Mr = n(f), o = u;
60
+ (g && o(new g(new ArrayBuffer(1))) != $ || b && o(new b()) != x || y && o(y.resolve()) != S || j && o(new j()) != M || f && o(new f()) != O) && (o = function(r) {
61
+ var t = u(r), a = t == vr ? r.constructor : void 0, d = a ? n(a) : "";
62
+ if (d)
63
+ switch (d) {
64
+ case Ar:
65
+ return $;
66
+ case wr:
67
+ return x;
68
+ case xr:
69
+ return S;
70
+ case Sr:
71
+ return M;
72
+ case Mr:
73
+ return O;
74
+ }
75
+ return t;
76
+ });
77
+ export {
78
+ j as S,
79
+ Er as a,
80
+ Ir as b,
81
+ yr as c,
82
+ hr as d,
83
+ F as e,
84
+ Br as f,
85
+ o as g,
86
+ P as h,
87
+ Pr as i,
88
+ A as n,
89
+ Tr as o
90
+ };
@@ -0,0 +1,29 @@
1
+ import { M as h } from "./_MapCache-BiTi0iqu.js";
2
+ var s = "__lodash_hash_undefined__";
3
+ function _(t) {
4
+ return this.__data__.set(t, s), this;
5
+ }
6
+ function o(t) {
7
+ return this.__data__.has(t);
8
+ }
9
+ function n(t) {
10
+ var a = -1, e = t == null ? 0 : t.length;
11
+ for (this.__data__ = new h(); ++a < e; )
12
+ this.add(t[a]);
13
+ }
14
+ n.prototype.add = n.prototype.push = _;
15
+ n.prototype.has = o;
16
+ function c(t, a) {
17
+ return t.has(a);
18
+ }
19
+ function d(t) {
20
+ var a = -1, e = Array(t.size);
21
+ return t.forEach(function(r) {
22
+ e[++a] = r;
23
+ }), e;
24
+ }
25
+ export {
26
+ n as S,
27
+ c,
28
+ d as s
29
+ };
@@ -0,0 +1,8 @@
1
+ import { b as o } from "./_baseClone-DajKHDCs.js";
2
+ var r = 1, n = 4;
3
+ function a(e) {
4
+ return o(e, r | n);
5
+ }
6
+ export {
7
+ a as c
8
+ };
@@ -1,56 +1,42 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { I as Icon } from "../iconify-CXMreGTg.js";
3
- import { Box, Chip, Stack, Typography } from "@mui/material";
4
- import { memo, useMemo } from "react";
5
- const AnnotationBody = ({ annotation }) => {
6
- const icon = useMemo(() => {
7
- if (annotation.type === "assessment") {
8
- return ["trivial", "recon", "attempt", "compromise", "mitigated"].includes(annotation.value) ? "healthicons:hazardous" : "fluent-mdl2:ribbon-solid";
1
+ import { jsx as r, jsxs as p } from "react/jsx-runtime";
2
+ import { I as s } from "../iconify-BBckr5AQ.js";
3
+ import { Box as u, Chip as m, Stack as d, Typography as i } from "@mui/material";
4
+ import { memo as o, useMemo as t } from "react";
5
+ const y = ({ annotation: e }) => {
6
+ const l = t(() => e.type === "assessment" ? ["trivial", "recon", "attempt", "compromise", "mitigated"].includes(e.value) ? "healthicons:hazardous" : "fluent-mdl2:ribbon-solid" : e.type === "opinion" ? e.value === "benign" ? "mdi:shield-check" : e.value === "suspicious" ? "mdi:warning-outline" : e.value === "obscure" ? "bi:eye-slash-fill" : "mdi:warning-decagram" : null, [e.type, e.value]);
7
+ return e.type === "assessment" ? /* @__PURE__ */ r(u, { children: /* @__PURE__ */ r(
8
+ m,
9
+ {
10
+ size: "small",
11
+ icon: /* @__PURE__ */ r(s, { icon: l }),
12
+ color: ["trivial", "recon", "attempt", "compromise", "mitigated"].includes(e.value) ? "error" : "success",
13
+ label: `${e.type}: ${e.value}`,
14
+ sx: { textTransform: "capitalize" }
9
15
  }
10
- if (annotation.type === "opinion") {
11
- return annotation.value === "benign" ? "mdi:shield-check" : annotation.value === "suspicious" ? "mdi:warning-outline" : annotation.value === "obscure" ? "bi:eye-slash-fill" : "mdi:warning-decagram";
16
+ ) }) : e.type === "opinion" ? /* @__PURE__ */ r(u, { children: /* @__PURE__ */ r(
17
+ m,
18
+ {
19
+ size: "small",
20
+ icon: /* @__PURE__ */ r(s, { icon: l }),
21
+ color: {
22
+ benign: "success",
23
+ suspicious: "warning",
24
+ obscure: "error",
25
+ malicious: "error"
26
+ }[e.value],
27
+ label: `${e.type}: ${e.value}`,
28
+ sx: { textTransform: "capitalize" }
12
29
  }
13
- return null;
14
- }, [annotation.type, annotation.value]);
15
- if (annotation.type === "assessment") {
16
- return /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(
17
- Chip,
18
- {
19
- size: "small",
20
- icon: /* @__PURE__ */ jsx(Icon, { icon }),
21
- color: ["trivial", "recon", "attempt", "compromise", "mitigated"].includes(annotation.value) ? "error" : "success",
22
- label: `${annotation.type}: ${annotation.value}`,
23
- sx: { textTransform: "capitalize" }
24
- }
25
- ) });
26
- }
27
- if (annotation.type === "opinion") {
28
- return /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(
29
- Chip,
30
- {
31
- size: "small",
32
- icon: /* @__PURE__ */ jsx(Icon, { icon }),
33
- color: {
34
- benign: "success",
35
- suspicious: "warning",
36
- obscure: "error",
37
- malicious: "error"
38
- }[annotation.value],
39
- label: `${annotation.type}: ${annotation.value}`,
40
- sx: { textTransform: "capitalize" }
41
- }
42
- ) });
43
- }
44
- return /* @__PURE__ */ jsxs(Stack, { direction: "row", alignItems: "center", spacing: 0.5, children: [
45
- annotation.icon && /* @__PURE__ */ jsx(Icon, { icon: annotation.icon, style: { filter: "drop-shadow(0px 0px 1px rgb(0 0 0 / 0.4))" } }),
46
- annotation.type !== "context" && /* @__PURE__ */ jsxs(Typography, { variant: "body2", sx: { textTransform: "capitalize" }, children: [
47
- annotation.type,
30
+ ) }) : /* @__PURE__ */ p(d, { direction: "row", alignItems: "center", spacing: 0.5, children: [
31
+ e.icon && /* @__PURE__ */ r(s, { icon: e.icon, style: { filter: "drop-shadow(0px 0px 1px rgb(0 0 0 / 0.4))" } }),
32
+ e.type !== "context" && /* @__PURE__ */ p(i, { variant: "body2", sx: { textTransform: "capitalize" }, children: [
33
+ e.type,
48
34
  ":"
49
35
  ] }),
50
- typeof annotation.value !== "string" ? /* @__PURE__ */ jsx(Typography, { variant: "body2", children: annotation.value }) : /* @__PURE__ */ jsx(Stack, { spacing: 0.5, children: annotation.value.split("\n").map((line) => /* @__PURE__ */ jsx(Typography, { variant: "body2", children: line }, line)) })
36
+ typeof e.value != "string" ? /* @__PURE__ */ r(i, { variant: "body2", children: e.value }) : /* @__PURE__ */ r(d, { spacing: 0.5, children: e.value.split(`
37
+ `).map((c) => /* @__PURE__ */ r(i, { variant: "body2", children: c }, c)) })
51
38
  ] });
52
- };
53
- const AnnotationBody$1 = memo(AnnotationBody);
39
+ }, g = o(y);
54
40
  export {
55
- AnnotationBody$1 as default
41
+ g as default
56
42
  };
@@ -1,55 +1,49 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { Popover } from "@mui/material";
3
- import React__default, { useRef, useState, useEffect } from "react";
4
- import { A as AnnotationDetails } from "../AnnotationDetails-CEou0vCc.js";
5
- const AnnotationDetailPopover = React__default.memo(({ anchorEl, enrichRequest, open, onClose, ...otherProps }) => {
6
- var _a, _b, _c;
7
- const actionRef = useRef();
8
- const [ready, setReady] = useState(false);
9
- useEffect(() => {
10
- if (!open) {
11
- setReady(false);
12
- }
13
- }, [open]);
14
- return /* @__PURE__ */ jsx(
15
- Popover,
1
+ import { jsx as d } from "react/jsx-runtime";
2
+ import { Popover as r } from "@mui/material";
3
+ import v, { useRef as c, useState as g, useEffect as R } from "react";
4
+ import { A as k } from "../AnnotationDetails-11P7yhyx.js";
5
+ const S = v.memo(({ anchorEl: t, enrichRequest: u, open: o, onClose: l, ...e }) => {
6
+ var f, s, m;
7
+ const a = c(), [x, n] = g(!1);
8
+ return R(() => {
9
+ o || n(!1);
10
+ }, [o]), /* @__PURE__ */ d(
11
+ r,
16
12
  {
17
13
  anchorOrigin: { horizontal: "left", vertical: "bottom" },
18
- ...otherProps,
19
- action: actionRef,
20
- open: !!(open && ready),
21
- keepMounted: open,
22
- anchorEl,
23
- onClose,
14
+ ...e,
15
+ action: a,
16
+ open: !!(o && x),
17
+ keepMounted: o,
18
+ anchorEl: t,
19
+ onClose: l,
24
20
  slotProps: {
25
- ...otherProps.slotProps ?? {},
21
+ ...e.slotProps ?? {},
26
22
  paper: {
27
- ...((_a = otherProps.slotProps) == null ? void 0 : _a.paper) ?? {},
23
+ ...((f = e.slotProps) == null ? void 0 : f.paper) ?? {},
28
24
  sx: [
29
25
  {
30
26
  maxHeight: "min(600px, 95vh)",
31
27
  overflowY: "auto",
32
28
  maxWidth: "500px",
33
29
  width: "100%",
34
- zIndex: ((_c = (_b = anchorEl == null ? void 0 : anchorEl.computedStyleMap) == null ? void 0 : _b.call(anchorEl).get("z-index")) == null ? void 0 : _c.toString()) || 2
30
+ zIndex: ((m = (s = t == null ? void 0 : t.computedStyleMap) == null ? void 0 : s.call(t).get("z-index")) == null ? void 0 : m.toString()) || 2
35
31
  }
36
32
  ]
37
33
  }
38
34
  },
39
- onClick: (e) => {
40
- var _a2;
41
- e.preventDefault();
42
- e.stopPropagation();
43
- (_a2 = otherProps.onClick) == null ? void 0 : _a2.call(otherProps, e);
35
+ onClick: (i) => {
36
+ var p;
37
+ i.preventDefault(), i.stopPropagation(), (p = e.onClick) == null || p.call(e, i);
44
38
  },
45
- children: /* @__PURE__ */ jsx(
46
- AnnotationDetails,
39
+ children: /* @__PURE__ */ d(
40
+ k,
47
41
  {
48
- enrichRequest,
49
- setReady,
42
+ enrichRequest: u,
43
+ setReady: n,
50
44
  updatePosition: () => {
51
- var _a2;
52
- return (_a2 = actionRef.current) == null ? void 0 : _a2.updatePosition();
45
+ var i;
46
+ return (i = a.current) == null ? void 0 : i.updatePosition();
53
47
  }
54
48
  }
55
49
  )
@@ -57,5 +51,5 @@ const AnnotationDetailPopover = React__default.memo(({ anchorEl, enrichRequest,
57
51
  );
58
52
  });
59
53
  export {
60
- AnnotationDetailPopover as default
54
+ S as default
61
55
  };
@@ -1,23 +1,23 @@
1
1
  import "react/jsx-runtime";
2
- import "../iconify-CXMreGTg.js";
2
+ import "../iconify-BBckr5AQ.js";
3
3
  import "@mui/material";
4
4
  import "./display/icons/Iconified.js";
5
5
  import "../data/event.js";
6
6
  import "../hooks/ClueComponentContext.js";
7
- import "../ActionForm-C0aE9HUv.js";
7
+ import "../ActionForm-pWyIi01Z.js";
8
8
  import "../hooks/useAnnotations.js";
9
9
  import "../hooks/useErrors.js";
10
10
  import "../icons/iconMap.js";
11
11
  import "../utils/window.js";
12
- import "../groupBy-ChDRT7uy.js";
13
- import { A } from "../AnnotationDetails-CEou0vCc.js";
14
- import "../useClueTypeConfig-D2tf4-NM.js";
12
+ import "../groupBy-yNrpdipq.js";
13
+ import { A as n } from "../AnnotationDetails-11P7yhyx.js";
14
+ import "../useClueTypeConfig-77zd_zdF.js";
15
15
  import "react";
16
- import "../index-AMfoEg_6.js";
16
+ import "../index-Dj5C04IX.js";
17
17
  import "./actions/ExecutePopover.js";
18
18
  import "./AnnotationEntry.js";
19
19
  import "./ClassificationChip.js";
20
20
  import "./enrichment/EnrichPopover.js";
21
21
  export {
22
- A as default
22
+ n as default
23
23
  };
@@ -1,55 +1,55 @@
1
- import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
- import { I as Icon } from "../iconify-CXMreGTg.js";
3
- import { Stack, Typography, Chip, IconButton } from "@mui/material";
4
- import Iconified from "./display/icons/Iconified.js";
5
- import { t as twitterShort } from "../utils-71DpzFrA.js";
6
- import { memo } from "react";
7
- import AnnotationBody from "./AnnotationBody.js";
8
- import ClassificationChip from "./ClassificationChip.js";
9
- const AnnotatonEntry = ({ annotation }) => {
10
- var _a;
11
- return /* @__PURE__ */ jsxs(Stack, { direction: "column", spacing: 1, children: [
12
- /* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [
13
- annotation.analytic_icon && /* @__PURE__ */ jsx(
14
- Icon,
1
+ import { jsxs as e, jsx as i, Fragment as s } from "react/jsx-runtime";
2
+ import { I as a } from "../iconify-BBckr5AQ.js";
3
+ import { Stack as t, Typography as c, Chip as n, IconButton as m } from "@mui/material";
4
+ import p from "./display/icons/Iconified.js";
5
+ import { t as d } from "../utils-D5hPDE7N.js";
6
+ import { memo as f } from "react";
7
+ import y from "./AnnotationBody.js";
8
+ import h from "./ClassificationChip.js";
9
+ const x = ({ annotation: r }) => {
10
+ var l;
11
+ return /* @__PURE__ */ e(t, { direction: "column", spacing: 1, children: [
12
+ /* @__PURE__ */ e(t, { direction: "row", spacing: 1, alignItems: "center", children: [
13
+ r.analytic_icon && /* @__PURE__ */ i(
14
+ a,
15
15
  {
16
16
  style: { alignSelf: "center", filter: "drop-shadow(0px 0px 1px rgb(0 0 0 / 0.4))" },
17
- icon: annotation.analytic_icon
17
+ icon: r.analytic_icon
18
18
  }
19
19
  ),
20
- /* @__PURE__ */ jsx(Typography, { variant: "body1", sx: { textTransform: "capitalize", maxWidth: "275px" }, children: annotation.analytic ?? annotation.author }),
21
- annotation.quantity > 1 && /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "text.secondary", children: [
20
+ /* @__PURE__ */ i(c, { variant: "body1", sx: { textTransform: "capitalize", maxWidth: "275px" }, children: r.analytic ?? r.author }),
21
+ r.quantity > 1 && /* @__PURE__ */ e(c, { variant: "caption", color: "text.secondary", children: [
22
22
  "(x",
23
- annotation.quantity,
23
+ r.quantity,
24
24
  ")"
25
25
  ] }),
26
- /* @__PURE__ */ jsx("div", { style: { flex: 1 } }),
27
- annotation.version && /* @__PURE__ */ jsx(
28
- Chip,
26
+ /* @__PURE__ */ i("div", { style: { flex: 1 } }),
27
+ r.version && /* @__PURE__ */ i(
28
+ n,
29
29
  {
30
30
  size: "small",
31
- label: /* @__PURE__ */ jsxs(Fragment, { children: [
31
+ label: /* @__PURE__ */ e(s, { children: [
32
32
  "v",
33
- annotation.version.replace(/^v/, "")
33
+ r.version.replace(/^v/, "")
34
34
  ] })
35
35
  }
36
36
  ),
37
- annotation.link && /* @__PURE__ */ jsx(IconButton, { component: "a", href: annotation.link, target: "_blank", rel: "noreferrer", size: "small", children: /* @__PURE__ */ jsx(Iconified, { icon: "ic:baseline-open-in-new", fontSize: "small" }) }),
38
- annotation.classification && /* @__PURE__ */ jsx(ClassificationChip, { size: "small", classification: annotation.classification })
37
+ r.link && /* @__PURE__ */ i(m, { component: "a", href: r.link, target: "_blank", rel: "noreferrer", size: "small", children: /* @__PURE__ */ i(p, { icon: "ic:baseline-open-in-new", fontSize: "small" }) }),
38
+ r.classification && /* @__PURE__ */ i(h, { size: "small", classification: r.classification })
39
39
  ] }),
40
- /* @__PURE__ */ jsx(AnnotationBody, { annotation }),
41
- (_a = annotation.summary) == null ? void 0 : _a.split("\n").map((line) => /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "text.secondary", children: line }, line)),
42
- /* @__PURE__ */ jsxs(Stack, { direction: "row", children: [
43
- /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "text.secondary", fontSize: "10px", children: twitterShort(annotation.timestamp) }),
44
- /* @__PURE__ */ jsx("div", { style: { flex: 1 } }),
45
- !!annotation.latency && /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "text.secondary", fontSize: "10px", children: [
46
- Math.round(annotation.latency),
40
+ /* @__PURE__ */ i(y, { annotation: r }),
41
+ (l = r.summary) == null ? void 0 : l.split(`
42
+ `).map((o) => /* @__PURE__ */ i(c, { variant: "caption", color: "text.secondary", children: o }, o)),
43
+ /* @__PURE__ */ e(t, { direction: "row", children: [
44
+ /* @__PURE__ */ i(c, { variant: "caption", color: "text.secondary", fontSize: "10px", children: d(r.timestamp) }),
45
+ /* @__PURE__ */ i("div", { style: { flex: 1 } }),
46
+ !!r.latency && /* @__PURE__ */ e(c, { variant: "caption", color: "text.secondary", fontSize: "10px", children: [
47
+ Math.round(r.latency),
47
48
  "ms"
48
49
  ] })
49
50
  ] })
50
51
  ] });
51
- };
52
- const AnnotationEntry = memo(AnnotatonEntry);
52
+ }, k = f(x);
53
53
  export {
54
- AnnotationEntry as default
54
+ k as default
55
55
  };
@@ -1,11 +1,11 @@
1
1
  import "react/jsx-runtime";
2
- import "../iconify-CXMreGTg.js";
2
+ import "../iconify-BBckr5AQ.js";
3
3
  import "@mui/material";
4
- import { A } from "../AnnotationPreview-CLMVD6Ec.js";
4
+ import { A as d } from "../AnnotationPreview-BGqlBBcp.js";
5
5
  import "../hooks/useAnnotations.js";
6
- import "../utils-71DpzFrA.js";
6
+ import "../utils-D5hPDE7N.js";
7
7
  import "react";
8
- import "../index-AMfoEg_6.js";
8
+ import "../index-Dj5C04IX.js";
9
9
  export {
10
- A as default
10
+ d as default
11
11
  };