@cccsaurora/clue-ui 1.6.0-dev.517.1 → 1.6.0-dev.524.1

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 (52) hide show
  1. package/{ActionForm-Sj0KtEYj.js → ActionForm-C1D2_1Pg.js} +3 -3
  2. package/{AnnotationDetails-B1NQ-B4f.js → AnnotationDetails-C683Hvym.js} +1 -1
  3. package/{AnnotationPreview-Cw3JUL8k.js → AnnotationPreview-Bm9e2UgC.js} +1 -1
  4. package/{ClueEnrichContext-Dpv_xiDv.js → ClueEnrichContext-DmERFjhQ.js} +1 -1
  5. package/components/AnnotationDetailPopover.js +1 -1
  6. package/components/AnnotationDetails.js +2 -2
  7. package/components/AnnotationPreview.js +1 -1
  8. package/components/EnrichedCard.js +1 -1
  9. package/components/EnrichedChip.js +2 -2
  10. package/components/EnrichedTypography.js +2 -2
  11. package/components/RetryFailedEnrichments.js +1 -1
  12. package/components/SourcePicker.js +1 -1
  13. package/components/actions/ActionForm.js +1 -1
  14. package/components/actions/ExecutePopover.js +1 -1
  15. package/components/actions/ResultModal.js +1 -1
  16. package/components/display/graph/index.js +1 -1
  17. package/components/display/graph/visualizations/cloud/index.js +2 -2
  18. package/components/display/graph/visualizations/tree/BundleLine.js +1 -1
  19. package/components/display/markdown/index.js +87 -27
  20. package/components/enrichment/EnrichPopover.js +1 -1
  21. package/components/fetchers/Fetcher.js +1 -1
  22. package/components/group/GroupControl.js +1 -1
  23. package/components/stats/QueryStatus.js +1 -1
  24. package/{index-CVUD9o3t.js → d3-CwtkB99t.js} +15024 -10621
  25. package/database/index.js +2 -2
  26. package/database/replication.js +2 -2
  27. package/hooks/ClueActionContext.js +2 -2
  28. package/hooks/ClueDatabaseContext.js +1 -1
  29. package/hooks/ClueEnrichContext.js +2 -2
  30. package/hooks/ClueFetcherContext.js +1 -1
  31. package/hooks/ClueGroupContext.js +1 -1
  32. package/hooks/CluePopupContext.js +2 -2
  33. package/hooks/ClueProvider.js +3 -3
  34. package/hooks/selectors.js +2 -2
  35. package/hooks/useActionResult.js +1 -1
  36. package/hooks/useAnnotations.js +2 -2
  37. package/hooks/useClue.js +1 -1
  38. package/hooks/useClueActions.js +1 -1
  39. package/hooks/useClueTypeConfig.js +1 -1
  40. package/hooks/useErrors.js +1 -1
  41. package/hooks/useFetcherResult.js +1 -1
  42. package/icons/Action.js +2 -2
  43. package/icons/Assessment.js +1 -1
  44. package/icons/Context.js +1 -1
  45. package/icons/Opinion.js +1 -1
  46. package/{index-29cEmZLo.js → index-Bx5giDpY.js} +727 -247
  47. package/{index-DieKGFn1.js → index-D1tw5sJ1.js} +20 -9
  48. package/{index-BCzfYx7I.js → index-DzbOfIT_.js} +9 -7
  49. package/main.js +5 -5
  50. package/package.json +12 -12
  51. package/{replication-DwPGDesg.js → replication-Bxa4yXXZ.js} +111 -42
  52. package/utils/time.js +8 -8
@@ -6,8 +6,8 @@ import Iconified from "./components/display/icons/Iconified.js";
6
6
  import { J as JSONViewer } from "./index-D4JJWbGh.js";
7
7
  import { ClueComponentContext } from "./hooks/ClueComponentContext.js";
8
8
  import { g as getDefaultExportFromCjs } from "./_commonjsHelpers-CUmg6egw.js";
9
- import { c as requireJsonSchemaTraverse, r as requireFastDeepEqual, a as requireFastUri } from "./index-DieKGFn1.js";
10
- import { a as api } from "./index-29cEmZLo.js";
9
+ import { c as requireJsonSchemaTraverse, r as requireFastDeepEqual, a as requireFastUri } from "./index-D1tw5sJ1.js";
10
+ import { a as api } from "./index-Bx5giDpY.js";
11
11
  import { d as toString } from "./_baseGet-Cmp6FztG.js";
12
12
  import { b as baseSlice } from "./_baseSlice-GAv_YFTT.js";
13
13
  import { i as isEqual } from "./utils-CEySTPtg.js";
@@ -16,7 +16,7 @@ import { a as useContextSelector, c as createContext, u as useContext } from "./
16
16
  import ErrorBoundary from "./components/ErrorBoundary.js";
17
17
  import { adaptSchema } from "./components/actions/form/schemaAdapter.js";
18
18
  import { I as Icon } from "./iconify-CYJTToEF.js";
19
- import { C as ClueEnrichContext } from "./ClueEnrichContext-Dpv_xiDv.js";
19
+ import { C as ClueEnrichContext } from "./ClueEnrichContext-DmERFjhQ.js";
20
20
  import { ClueFetcherContext } from "./hooks/ClueFetcherContext.js";
21
21
  import ClassificationChip from "./components/ClassificationChip.js";
22
22
  import Result from "./components/actions/formats/index.js";
@@ -4,7 +4,7 @@ import { useTheme, Stack, Typography, Tooltip, Box, IconButton, CircularProgress
4
4
  import Iconified from "./components/display/icons/Iconified.js";
5
5
  import { SNACKBAR_EVENT_ID } from "./data/event.js";
6
6
  import { ClueComponentContext } from "./hooks/ClueComponentContext.js";
7
- import { f as useClueEnrichSelector } from "./ActionForm-Sj0KtEYj.js";
7
+ import { f as useClueEnrichSelector } from "./ActionForm-C1D2_1Pg.js";
8
8
  import useAnnotations from "./hooks/useAnnotations.js";
9
9
  import useErrors from "./hooks/useErrors.js";
10
10
  import { ICON_MAP } from "./icons/iconMap.js";
@@ -8,7 +8,7 @@ import { useState, useRef, useCallback, useEffect, useMemo } from "react";
8
8
  import { c as createContext, a as useContextSelector } from "./index-_gpzM2Px.js";
9
9
  import { SHOW_EVENT_ID, HIDE_EVENT_ID } from "./data/event.js";
10
10
  import { safeDispatchEvent, safeAddEventListener } from "./utils/window.js";
11
- import { i as isNull } from "./AnnotationDetails-B1NQ-B4f.js";
11
+ import { i as isNull } from "./AnnotationDetails-C683Hvym.js";
12
12
  const CluePopupContext = createContext(null);
13
13
  const CluePopupProvider = ({ children }) => {
14
14
  const [popupType, setPopupType] = useState(null);
@@ -1,6 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { a as addAPIProvider } from "./iconify-CYJTToEF.js";
3
- import { a as api, p as post } from "./index-29cEmZLo.js";
3
+ import { a as api, p as post } from "./index-Bx5giDpY.js";
4
4
  import { REPLICATORS } from "./database/globals.js";
5
5
  import { clueDebugLogger } from "./utils/loggerUtil.js";
6
6
  import { detectType } from "./utils/typeDetection.js";
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { Popover } from "@mui/material";
3
3
  import React3__default, { useRef, useState, useEffect } from "react";
4
- import { A as AnnotationDetails } from "../AnnotationDetails-B1NQ-B4f.js";
4
+ import { A as AnnotationDetails } from "../AnnotationDetails-C683Hvym.js";
5
5
  const AnnotationDetailPopover = React3__default.memo(({ anchorEl, enrichRequest, open, onClose, ...otherProps }) => {
6
6
  var _a, _b, _c;
7
7
  const actionRef = useRef();
@@ -4,13 +4,13 @@ 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-Sj0KtEYj.js";
7
+ import "../ActionForm-C1D2_1Pg.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
12
  import "../groupBy-BVV07EGQ.js";
13
- import { A } from "../AnnotationDetails-B1NQ-B4f.js";
13
+ import { A } from "../AnnotationDetails-C683Hvym.js";
14
14
  import "../uniq-CahZPAwp.js";
15
15
  import "react";
16
16
  import "../index-_gpzM2Px.js";
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "../iconify-CYJTToEF.js";
3
3
  import "@mui/material";
4
- import { A } from "../AnnotationPreview-Cw3JUL8k.js";
4
+ import { A } from "../AnnotationPreview-Bm9e2UgC.js";
5
5
  import "../hooks/useAnnotations.js";
6
6
  import "../utils-CEySTPtg.js";
7
7
  import "react";
@@ -2,7 +2,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { I as Icon } from "../iconify-CYJTToEF.js";
3
3
  import { useTheme, Card, CardHeader, Stack, CircularProgress, Divider, CardContent, Grid, Chip, Typography, Tooltip, Box } from "@mui/material";
4
4
  import { ClueComponentContext } from "../hooks/ClueComponentContext.js";
5
- import { f as useClueEnrichSelector } from "../ActionForm-Sj0KtEYj.js";
5
+ import { f as useClueEnrichSelector } from "../ActionForm-C1D2_1Pg.js";
6
6
  import useAnnotations from "../hooks/useAnnotations.js";
7
7
  import useErrors from "../hooks/useErrors.js";
8
8
  import AssessmentIcon from "../icons/Assessment.js";
@@ -3,8 +3,8 @@ import { Chip, Tooltip, Box, Stack, CircularProgress } from "@mui/material";
3
3
  import Iconified from "./display/icons/Iconified.js";
4
4
  import { ClueComponentContext } from "../hooks/ClueComponentContext.js";
5
5
  import { ClueGroupContext } from "../hooks/ClueGroupContext.js";
6
- import { C as CluePopupContext } from "../AnnotationPreview-Cw3JUL8k.js";
7
- import { f as useClueEnrichSelector } from "../ActionForm-Sj0KtEYj.js";
6
+ import { C as CluePopupContext } from "../AnnotationPreview-Bm9e2UgC.js";
7
+ import { f as useClueEnrichSelector } from "../ActionForm-C1D2_1Pg.js";
8
8
  import useAnnotations from "../hooks/useAnnotations.js";
9
9
  import ActionIcon from "../icons/Action.js";
10
10
  import AssessmentIcon from "../icons/Assessment.js";
@@ -3,8 +3,8 @@ import { useTheme, Stack, CircularProgress, Tooltip, IconButton } from "@mui/mat
3
3
  import Iconified from "./display/icons/Iconified.js";
4
4
  import { ClueComponentContext } from "../hooks/ClueComponentContext.js";
5
5
  import { ClueGroupContext } from "../hooks/ClueGroupContext.js";
6
- import { C as CluePopupContext } from "../AnnotationPreview-Cw3JUL8k.js";
7
- import { f as useClueEnrichSelector } from "../ActionForm-Sj0KtEYj.js";
6
+ import { C as CluePopupContext } from "../AnnotationPreview-Bm9e2UgC.js";
7
+ import { f as useClueEnrichSelector } from "../ActionForm-C1D2_1Pg.js";
8
8
  import useAnnotations from "../hooks/useAnnotations.js";
9
9
  import ActionIcon from "../icons/Action.js";
10
10
  import AssessmentIcon from "../icons/Assessment.js";
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { Button } from "@mui/material";
3
3
  import { ClueComponentContext } from "../hooks/ClueComponentContext.js";
4
- import { f as useClueEnrichSelector } from "../ActionForm-Sj0KtEYj.js";
4
+ import { f as useClueEnrichSelector } from "../ActionForm-C1D2_1Pg.js";
5
5
  import { a as useContextSelector } from "../index-_gpzM2Px.js";
6
6
  const RetryFailedEnrichments = () => {
7
7
  const enrichFailedEnrichments = useClueEnrichSelector((ctx) => ctx.enrichFailedEnrichments);
@@ -1,6 +1,6 @@
1
1
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { Button, Popover, TextField, Divider, Stack, FormControlLabel, Checkbox } from "@mui/material";
3
- import { e as useClueComponentSelector, f as useClueEnrichSelector } from "../ActionForm-Sj0KtEYj.js";
3
+ import { e as useClueComponentSelector, f as useClueEnrichSelector } from "../ActionForm-C1D2_1Pg.js";
4
4
  import { memo, useState, useEffect } from "react";
5
5
  const SourcePicker = () => {
6
6
  const { t } = useClueComponentSelector((ctx) => ctx.i18next);
@@ -5,7 +5,7 @@ import "@mui/material";
5
5
  import "../display/icons/Iconified.js";
6
6
  import "../../index-D4JJWbGh.js";
7
7
  import "../../hooks/ClueComponentContext.js";
8
- import { A } from "../../ActionForm-Sj0KtEYj.js";
8
+ import { A } from "../../ActionForm-C1D2_1Pg.js";
9
9
  import "../../utils-CEySTPtg.js";
10
10
  import "react";
11
11
  import "../../index-_gpzM2Px.js";
@@ -3,7 +3,7 @@ import { I as Icon } from "../../iconify-CYJTToEF.js";
3
3
  import { useTheme, Tooltip, IconButton, CircularProgress, Button, Popover, Paper, Stack, Typography, Box, Divider } from "@mui/material";
4
4
  import Iconified from "../display/icons/Iconified.js";
5
5
  import { ClueComponentContext } from "../../hooks/ClueComponentContext.js";
6
- import { d as useClueActionsSelector } from "../../ActionForm-Sj0KtEYj.js";
6
+ import { d as useClueActionsSelector } from "../../ActionForm-C1D2_1Pg.js";
7
7
  import useClueConfig from "../../hooks/useClueConfig.js";
8
8
  import { isAccessible } from "../../utils/classificationParser.js";
9
9
  import { useState, useRef, useMemo, useEffect } from "react";
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
2
2
  import "../../iconify-CYJTToEF.js";
3
3
  import "@mui/material";
4
4
  import "../../hooks/ClueComponentContext.js";
5
- import { R } from "../../ActionForm-Sj0KtEYj.js";
5
+ import { R } from "../../ActionForm-C1D2_1Pg.js";
6
6
  import "react";
7
7
  import "../../index-_gpzM2Px.js";
8
8
  import "../ClassificationChip.js";
@@ -2,7 +2,6 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { useMemo, useRef, useState, useEffect, useCallback, createElement } from "react";
3
3
  import { useTheme, lighten, darken, Stack, Card, Typography, Autocomplete, TextField, FormControl, InputLabel, Select, MenuItem, alpha, IconButton, Collapse } from "@mui/material";
4
4
  import { p as parseEvent } from "../../../index-D4JJWbGh.js";
5
- import { z as zoom, i as identity, s as select, t as transform, p as pointer } from "../../../index-CVUD9o3t.js";
6
5
  import { ClueComponentContext } from "../../../hooks/ClueComponentContext.js";
7
6
  import useComparator from "../../../hooks/useComparator.js";
8
7
  import { useMyLocalStorageItem } from "../../../hooks/useMyLocalStorage.js";
@@ -15,6 +14,7 @@ import ExpandMoreButton from "./ExpandMoreButton.js";
15
14
  import Cloud from "./visualizations/cloud/index.js";
16
15
  import NodePanel from "./visualizations/panels/NodePanel.js";
17
16
  import Tree from "./visualizations/tree/index.js";
17
+ import { z as zoom, i as identity, s as select, t as transform, p as pointer } from "../../../d3-CwtkB99t.js";
18
18
  const Graph = ({ graph, sx = {} }) => {
19
19
  var _a, _b, _c, _d, _e;
20
20
  const { t } = useContextSelector(ClueComponentContext, (ctx) => ctx.i18next);
@@ -1,5 +1,5 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { o as ordinal, d as d3, S as Spectral, a as index, h as hierarchy } from "../../../../../index-CVUD9o3t.js";
2
+ import { o as ordinal, d as d3, S as Spectral, a as index$1, h as hierarchy } from "../../../../../d3-CwtkB99t.js";
3
3
  import useMyHighlights from "../../../../../hooks/useMyHighlights.js";
4
4
  import { useMyLocalStorageItem } from "../../../../../hooks/useMyLocalStorage.js";
5
5
  import { StorageKey } from "../../../../../utils/constants.js";
@@ -70,7 +70,7 @@ const Cloud = ({ svgRef, graph, options = {} }) => {
70
70
  ),
71
71
  [nodes]
72
72
  );
73
- const pack = useMemo(() => index().size([600, 600]).padding(circlePadding), [circlePadding]);
73
+ const pack = useMemo(() => index$1().size([600, 600]).padding(circlePadding), [circlePadding]);
74
74
  const cloudLocations = useMemo(() => {
75
75
  const data = Object.entries(clouds).map(([id]) => ({
76
76
  id,
@@ -1,6 +1,6 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useTheme } from "@mui/material";
3
- import { d as d3, S as Spectral } from "../../../../../index-CVUD9o3t.js";
3
+ import { d as d3, S as Spectral } from "../../../../../d3-CwtkB99t.js";
4
4
  import { useMyLocalStorageItem } from "../../../../../hooks/useMyLocalStorage.js";
5
5
  import { StorageKey } from "../../../../../utils/constants.js";
6
6
  import { buildHorizontalLine, buildVerticalLine } from "../../../../../utils/line.js";
@@ -7,7 +7,7 @@ import ReactMarkdown from "react-markdown";
7
7
  import { Prism } from "react-syntax-highlighter";
8
8
  import remarkGfm from "remark-gfm";
9
9
  /**
10
- * react-router v7.18.4
10
+ * react-router v7.18.5
11
11
  *
12
12
  * Copyright (c) Remix Software Inc.
13
13
  *
@@ -1785,7 +1785,7 @@ var isBrowser2 = typeof window !== "undefined" && typeof window.document !== "un
1785
1785
  try {
1786
1786
  if (isBrowser2) {
1787
1787
  window.__reactRouterVersion = // @ts-expect-error
1788
- "7.18.4";
1788
+ "7.18.5";
1789
1789
  }
1790
1790
  } catch (e) {
1791
1791
  }
@@ -14277,16 +14277,50 @@ const empty = [];
14277
14277
  const CONTINUE = true;
14278
14278
  const EXIT = false;
14279
14279
  const SKIP = "skip";
14280
- function visitParents(tree, test, visitor, reverse) {
14280
+ function visitParents(tree, testOrEnterOrVisitors, enterOrVisitorsOrReverse, reverse) {
14281
+ if (!tree || typeof tree !== "object") {
14282
+ throw new Error("Unexpected value `" + tree + "` for `tree`, expected node");
14283
+ }
14284
+ let preorder = true;
14281
14285
  let check;
14282
- if (typeof test === "function" && typeof visitor !== "function") {
14283
- reverse = visitor;
14284
- visitor = test;
14286
+ let visitors;
14287
+ let enter;
14288
+ let exit;
14289
+ if (typeof enterOrVisitorsOrReverse === "function" || enterOrVisitorsOrReverse && typeof enterOrVisitorsOrReverse === "object") {
14290
+ check = /** @type {Test} */
14291
+ testOrEnterOrVisitors;
14292
+ visitors = enterOrVisitorsOrReverse;
14293
+ if (reverse) preorder = false;
14285
14294
  } else {
14286
- check = test;
14295
+ visitors = /** @type {Visitors | Visitor} */
14296
+ testOrEnterOrVisitors;
14297
+ if (enterOrVisitorsOrReverse) preorder = false;
14298
+ }
14299
+ if (typeof visitors === "function") {
14300
+ enter = visitors;
14301
+ } else if (visitors && typeof visitors === "object") {
14302
+ if (visitors.enter === null || visitors.enter === void 0) ;
14303
+ else if (typeof visitors.enter === "function") {
14304
+ enter = visitors.enter;
14305
+ } else {
14306
+ throw new Error(
14307
+ "Unexpected value `" + visitors.enter + "` for `visitors.enter`, expected optional visitor"
14308
+ );
14309
+ }
14310
+ if (typeof visitors.exit === "function") {
14311
+ exit = visitors.exit;
14312
+ } else {
14313
+ throw new Error(
14314
+ "Unexpected value `" + visitors.exit + "` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)"
14315
+ );
14316
+ }
14317
+ } else {
14318
+ throw new Error(
14319
+ "Unexpected value `" + visitors + "` for `enter` or `visitors`, expected visitor or object with visitors"
14320
+ );
14287
14321
  }
14288
14322
  const is = convert(check);
14289
- const step = reverse ? -1 : 1;
14323
+ const step = preorder ? 1 : -1;
14290
14324
  factory(tree, void 0, [])();
14291
14325
  function factory(node, index, parents) {
14292
14326
  const value = (
@@ -14307,12 +14341,10 @@ function visitParents(tree, test, visitor, reverse) {
14307
14341
  }
14308
14342
  return visit2;
14309
14343
  function visit2() {
14344
+ const matches = !check || is(node, index, parents[parents.length - 1] || void 0);
14310
14345
  let result = empty;
14311
- let subresult;
14312
- let offset;
14313
- let grandparents;
14314
- if (!test || is(node, index, parents[parents.length - 1] || void 0)) {
14315
- result = toResult(visitor(node, parents));
14346
+ if (enter && matches) {
14347
+ result = toResult(enter(node, parents, index));
14316
14348
  if (result[0] === EXIT) {
14317
14349
  return result;
14318
14350
  }
@@ -14323,11 +14355,11 @@ function visitParents(tree, test, visitor, reverse) {
14323
14355
  node
14324
14356
  );
14325
14357
  if (nodeAsParent.children && result[0] !== SKIP) {
14326
- offset = (reverse ? nodeAsParent.children.length : -1) + step;
14327
- grandparents = parents.concat(nodeAsParent);
14358
+ let offset = (preorder ? -1 : nodeAsParent.children.length) + step;
14359
+ const grandparents = [...parents, nodeAsParent];
14328
14360
  while (offset > -1 && offset < nodeAsParent.children.length) {
14329
14361
  const child = nodeAsParent.children[offset];
14330
- subresult = factory(child, offset, grandparents)();
14362
+ const subresult = factory(child, offset, grandparents)();
14331
14363
  if (subresult[0] === EXIT) {
14332
14364
  return subresult;
14333
14365
  }
@@ -14335,6 +14367,17 @@ function visitParents(tree, test, visitor, reverse) {
14335
14367
  }
14336
14368
  }
14337
14369
  }
14370
+ if (exit && matches) {
14371
+ const exitResult = toResult(exit(node, parents, index));
14372
+ if (exitResult[0] === SKIP) {
14373
+ throw new Error(
14374
+ "Unexpected value `" + exitResult[0] + "` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing"
14375
+ );
14376
+ }
14377
+ if (exitResult[0] === EXIT || typeof exitResult[1] === "number") {
14378
+ return exitResult;
14379
+ }
14380
+ }
14338
14381
  return result;
14339
14382
  }
14340
14383
  }
@@ -14348,20 +14391,37 @@ function toResult(value) {
14348
14391
  }
14349
14392
  return value === null || value === void 0 ? empty : [value];
14350
14393
  }
14351
- function visit(tree, testOrVisitor, visitorOrReverse, maybeReverse) {
14394
+ function visit(tree, testOrEnterOrVisitors, enterOrVisitorsOrReverse, maybeReverse) {
14395
+ let check;
14396
+ let visitors;
14352
14397
  let reverse;
14353
- let test;
14354
- let visitor;
14355
- {
14356
- test = testOrVisitor;
14357
- visitor = visitorOrReverse;
14398
+ if (typeof enterOrVisitorsOrReverse === "function" || enterOrVisitorsOrReverse && typeof enterOrVisitorsOrReverse === "object") {
14399
+ check = /** @type {Test} */
14400
+ testOrEnterOrVisitors;
14401
+ visitors = enterOrVisitorsOrReverse;
14358
14402
  reverse = maybeReverse;
14403
+ } else {
14404
+ visitors = /** @type {Visitor | Visitors} */
14405
+ testOrEnterOrVisitors;
14406
+ reverse = enterOrVisitorsOrReverse;
14359
14407
  }
14360
- visitParents(tree, test, overload, reverse);
14361
- function overload(node, parents) {
14362
- const parent = parents[parents.length - 1];
14363
- const index = parent ? parent.children.indexOf(node) : void 0;
14364
- return visitor(node, index, parent);
14408
+ if (typeof visitors === "function") {
14409
+ visitParents(tree, check, wrap(visitors), reverse);
14410
+ } else {
14411
+ visitParents(tree, check, wrapVisitors(visitors), reverse);
14412
+ }
14413
+ }
14414
+ function wrapVisitors(visitors) {
14415
+ if (!visitors || typeof visitors !== "object") return visitors;
14416
+ return {
14417
+ enter: typeof visitors.enter === "function" ? wrap(visitors.enter) : visitors.enter,
14418
+ exit: typeof visitors.exit === "function" ? wrap(visitors.exit) : visitors.exit
14419
+ };
14420
+ }
14421
+ function wrap(visitor) {
14422
+ return overload;
14423
+ function overload(node, parents, index) {
14424
+ return visitor(node, index, parents[parents.length - 1]);
14365
14425
  }
14366
14426
  }
14367
14427
  const gfmTagfilterExpression = /<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi;
@@ -1,6 +1,6 @@
1
1
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { useTheme, Tooltip, IconButton, CircularProgress, Button, Popover, Paper, Stack, Box, Typography, Divider } from "@mui/material";
3
- import { e as useClueComponentSelector, f as useClueEnrichSelector, c as capitalize } from "../../ActionForm-Sj0KtEYj.js";
3
+ import { e as useClueComponentSelector, f as useClueEnrichSelector, c as capitalize } from "../../ActionForm-C1D2_1Pg.js";
4
4
  import { useState, useRef, useCallback, useEffect } from "react";
5
5
  import Iconified from "../display/icons/Iconified.js";
6
6
  const EnrichPopover = ({ show = false, size = "small", selector }) => {
@@ -4,7 +4,7 @@ import { useTheme, Skeleton, Chip, Tooltip, Stack, Typography, LinearProgress, P
4
4
  import { F as FlexOne } from "../../FlexOne-BSYAhhtG.js";
5
5
  import Iconified from "../display/icons/Iconified.js";
6
6
  import { ClueComponentContext } from "../../hooks/ClueComponentContext.js";
7
- import { g as useClueFetcherSelector } from "../../ActionForm-Sj0KtEYj.js";
7
+ import { g as useClueFetcherSelector } from "../../ActionForm-C1D2_1Pg.js";
8
8
  import React3__default, { useState, useRef, useMemo, useEffect, memo } from "react";
9
9
  import { a as useContextSelector } from "../../index-_gpzM2Px.js";
10
10
  import { FetcherResultView } from "./FetcherResultView.js";
@@ -4,7 +4,7 @@ import { F as FlexOne } from "../../FlexOne-BSYAhhtG.js";
4
4
  import Iconified from "../display/icons/Iconified.js";
5
5
  import { SNACKBAR_EVENT_ID } from "../../data/event.js";
6
6
  import { ClueGroupContext } from "../../hooks/ClueGroupContext.js";
7
- import { e as useClueComponentSelector, f as useClueEnrichSelector, c as capitalize } from "../../ActionForm-Sj0KtEYj.js";
7
+ import { e as useClueComponentSelector, f as useClueEnrichSelector, c as capitalize } from "../../ActionForm-C1D2_1Pg.js";
8
8
  import { safeDispatchEvent } from "../../utils/window.js";
9
9
  import { useState, useMemo, useCallback } from "react";
10
10
  import { a as useContextSelector } from "../../index-_gpzM2Px.js";
@@ -1,7 +1,7 @@
1
1
  import { jsxs } from "react/jsx-runtime";
2
2
  import { Stack, Typography } from "@mui/material";
3
3
  import { ClueDatabaseContext } from "../../hooks/ClueDatabaseContext.js";
4
- import { e as useClueComponentSelector, f as useClueEnrichSelector } from "../../ActionForm-Sj0KtEYj.js";
4
+ import { e as useClueComponentSelector, f as useClueEnrichSelector } from "../../ActionForm-C1D2_1Pg.js";
5
5
  import { useContext, useState, useEffect } from "react";
6
6
  const QueryStatus = () => {
7
7
  const { t } = useClueComponentSelector((ctx) => ctx.i18next);