@genspectrum/dashboard-components 0.3.2 → 0.4.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 (35) hide show
  1. package/custom-elements.json +45 -26
  2. package/dist/dashboard-components.js +518 -434
  3. package/dist/dashboard-components.js.map +1 -1
  4. package/dist/genspectrum-components.d.ts +21 -12
  5. package/dist/style.css +150 -229
  6. package/package.json +3 -1
  7. package/src/preact/aggregatedData/aggregate.tsx +1 -1
  8. package/src/preact/components/SegmentSelector.tsx +0 -1
  9. package/src/preact/components/checkbox-selector.tsx +7 -9
  10. package/src/preact/components/dropdown.tsx +40 -0
  11. package/src/preact/components/info.stories.tsx +8 -8
  12. package/src/preact/components/info.tsx +38 -19
  13. package/src/preact/components/mutation-type-selector.tsx +0 -1
  14. package/src/preact/components/proportion-selector-dropdown.tsx +9 -18
  15. package/src/preact/components/tabs.tsx +12 -3
  16. package/src/preact/dateRangeSelector/computeInitialValues.spec.ts +99 -0
  17. package/src/preact/dateRangeSelector/computeInitialValues.ts +73 -0
  18. package/src/preact/dateRangeSelector/date-range-selector.stories.tsx +93 -4
  19. package/src/preact/dateRangeSelector/date-range-selector.tsx +49 -106
  20. package/src/preact/dateRangeSelector/selectableOptions.ts +79 -0
  21. package/src/preact/locationFilter/location-filter.tsx +1 -1
  22. package/src/preact/mutationComparison/mutation-comparison.tsx +3 -3
  23. package/src/preact/mutationFilter/mutation-filter.stories.tsx +3 -6
  24. package/src/preact/mutationFilter/mutation-filter.tsx +48 -54
  25. package/src/preact/mutations/mutations.tsx +3 -4
  26. package/src/preact/prevalenceOverTime/prevalence-over-time.tsx +3 -5
  27. package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.tsx +3 -3
  28. package/src/preact/shared/floating-ui/hooks.ts +83 -0
  29. package/src/web-components/input/gs-date-range-selector.stories.ts +11 -5
  30. package/src/web-components/input/gs-date-range-selector.tsx +22 -5
  31. package/src/web-components/input/gs-location-filter.stories.ts +6 -7
  32. package/src/web-components/input/gs-location-filter.tsx +3 -2
  33. package/src/web-components/input/gs-mutation-filter.stories.ts +1 -8
  34. package/src/web-components/input/gs-mutation-filter.tsx +1 -9
  35. package/src/web-components/visualization/gs-prevalence-over-time.tsx +1 -1
@@ -6,6 +6,7 @@ import { options, createContext as createContext$1, Fragment, render } from "pre
6
6
  import { Grid } from "gridjs";
7
7
  import { Chart, registerables, Scale } from "chart.js";
8
8
  import { VennDiagramController, ArcSlice, extractSets } from "chartjs-chart-venn";
9
+ import { autoUpdate, computePosition, offset, shift, flip, size } from "@floating-ui/dom";
9
10
  import { ReactiveElement } from "@lit/reactive-element";
10
11
  import { BarWithErrorBarsController, BarWithErrorBar } from "chartjs-chart-error-bars";
11
12
  import flatpickr from "flatpickr";
@@ -1171,32 +1172,98 @@ function filterMutationData(data, displayedSegments, displayedMutationTypes) {
1171
1172
  }));
1172
1173
  }
1173
1174
  const LapisUrlContext = createContext$1("");
1175
+ function useFloatingUi(referenceRef, floatingRef, middleware, placement) {
1176
+ const cleanupRef = F(null);
1177
+ _(() => {
1178
+ if (!referenceRef.current || !floatingRef.current) {
1179
+ return;
1180
+ }
1181
+ const { current: reference } = referenceRef;
1182
+ const { current: floating } = floatingRef;
1183
+ const update = () => {
1184
+ computePosition(reference, floating, {
1185
+ placement,
1186
+ middleware
1187
+ }).then(({ x, y: y2 }) => {
1188
+ floating.style.left = `${x}px`;
1189
+ floating.style.top = `${y2}px`;
1190
+ });
1191
+ };
1192
+ update();
1193
+ cleanupRef.current = autoUpdate(reference, floating, update);
1194
+ return () => {
1195
+ if (cleanupRef.current) {
1196
+ cleanupRef.current();
1197
+ }
1198
+ };
1199
+ }, [placement, middleware, referenceRef, floatingRef]);
1200
+ }
1201
+ function useCloseOnClickOutside(floatingRef, referenceRef, setShowContent) {
1202
+ _(() => {
1203
+ const handleClickOutside = (event) => {
1204
+ const path = event.composedPath();
1205
+ if (floatingRef.current && !path.includes(floatingRef.current) && referenceRef.current && !path.includes(referenceRef.current)) {
1206
+ setShowContent(false);
1207
+ }
1208
+ };
1209
+ document.addEventListener("mousedown", handleClickOutside);
1210
+ return () => {
1211
+ document.removeEventListener("mousedown", handleClickOutside);
1212
+ };
1213
+ }, [floatingRef, referenceRef, setShowContent]);
1214
+ }
1215
+ function useCloseOnEsc(setShowHelp) {
1216
+ _(() => {
1217
+ const handleKeyDown = (event) => {
1218
+ if (event.key === "Escape") {
1219
+ setShowHelp(false);
1220
+ }
1221
+ };
1222
+ document.addEventListener("keydown", handleKeyDown);
1223
+ return () => {
1224
+ document.removeEventListener("keydown", handleKeyDown);
1225
+ };
1226
+ }, [setShowHelp]);
1227
+ }
1228
+ const dropdownClass = "z-10 absolute w-max top-0 left-0 bg-white p-4 border border-gray-200 shadow-lg rounded-md";
1229
+ const Dropdown = ({ children, buttonTitle, placement }) => {
1230
+ const [showContent, setShowContent] = p(false);
1231
+ const referenceRef = F(null);
1232
+ const floatingRef = F(null);
1233
+ useFloatingUi(referenceRef, floatingRef, [offset(4), shift(), flip()], placement);
1234
+ useCloseOnClickOutside(floatingRef, referenceRef, setShowContent);
1235
+ useCloseOnEsc(setShowContent);
1236
+ const toggle = () => {
1237
+ setShowContent(!showContent);
1238
+ };
1239
+ return /* @__PURE__ */ u$1("div", { children: [
1240
+ /* @__PURE__ */ u$1("button", { type: "button", className: "btn btn-xs whitespace-nowrap", onClick: toggle, ref: referenceRef, children: buttonTitle }),
1241
+ /* @__PURE__ */ u$1("div", { ref: floatingRef, className: `${dropdownClass} ${showContent ? "" : "hidden"}`, children })
1242
+ ] });
1243
+ };
1174
1244
  const CheckboxSelector = ({
1175
- className,
1176
1245
  items,
1177
1246
  label,
1178
1247
  setItems
1179
1248
  }) => {
1180
- return /* @__PURE__ */ u$1("div", { class: `dropdown ${className}`, children: [
1181
- /* @__PURE__ */ u$1("div", { tabIndex: 0, role: "button", class: "btn btn-xs text-nowrap", children: label }),
1182
- /* @__PURE__ */ u$1("ul", { tabIndex: 0, class: "p-2 shadow menu dropdown-content z-[1] bg-base-100 rounded-box", children: items.map((item, index) => /* @__PURE__ */ u$1("li", { class: "flex flex-row items-center", children: /* @__PURE__ */ u$1("label", { children: [
1183
- /* @__PURE__ */ u$1(
1184
- "input",
1185
- {
1186
- type: "checkbox",
1187
- id: `item-${index}`,
1188
- checked: item.checked,
1189
- onChange: () => {
1190
- const newItems = items.map(
1191
- (item2, i2) => i2 === index ? { ...item2, checked: !item2.checked } : item2
1192
- );
1193
- setItems(newItems);
1194
- }
1249
+ return /* @__PURE__ */ u$1(Dropdown, { buttonTitle: label, placement: "bottom-start", children: /* @__PURE__ */ u$1("ul", { children: items.map((item, index) => /* @__PURE__ */ u$1("li", { className: "flex flex-row items-center", children: /* @__PURE__ */ u$1("label", { children: [
1250
+ /* @__PURE__ */ u$1(
1251
+ "input",
1252
+ {
1253
+ className: "mr-2",
1254
+ type: "checkbox",
1255
+ id: `item-${index}`,
1256
+ checked: item.checked,
1257
+ onChange: () => {
1258
+ const newItems = items.map(
1259
+ (item2, i2) => i2 === index ? { ...item2, checked: !item2.checked } : item2
1260
+ );
1261
+ setItems(newItems);
1195
1262
  }
1196
- ),
1197
- item.label
1198
- ] }) }, item.label)) })
1199
- ] });
1263
+ }
1264
+ ),
1265
+ item.label
1266
+ ] }) }, item.label)) }) });
1200
1267
  };
1201
1268
  const ReferenceGenomeContext = createContext$1({ nucleotideSequences: [], genes: [] });
1202
1269
  const getSegmentSelectorLabel = (displayedSegments, prefix) => {
@@ -1220,7 +1287,6 @@ const SegmentSelector = ({
1220
1287
  return /* @__PURE__ */ u$1(
1221
1288
  CheckboxSelector,
1222
1289
  {
1223
- className: "mx-1",
1224
1290
  items: displayedSegments,
1225
1291
  label: getSegmentSelectorLabel(displayedSegments, prefix || "Segments: "),
1226
1292
  setItems: (items) => setDisplayedSegments(items)
@@ -1308,8 +1374,8 @@ const ErrorDisplay = ({ error }) => {
1308
1374
  ] })
1309
1375
  ] });
1310
1376
  };
1311
- const ResizeContainer = ({ children, size }) => {
1312
- return /* @__PURE__ */ u$1("div", { style: size, children });
1377
+ const ResizeContainer = ({ children, size: size2 }) => {
1378
+ return /* @__PURE__ */ u$1("div", { style: size2, children });
1313
1379
  };
1314
1380
  const Headline = ({ heading, children }) => {
1315
1381
  if (!heading) {
@@ -1331,28 +1397,52 @@ const ResizingHeadline = ({ heading, children }) => {
1331
1397
  /* @__PURE__ */ u$1("div", { style: { height: `calc(100% - ${h1Height})` }, children })
1332
1398
  ] });
1333
1399
  };
1334
- const ErrorBoundary = ({ size, headline, children }) => {
1400
+ const ErrorBoundary = ({ size: size2, headline, children }) => {
1335
1401
  const [internalError] = b2();
1336
1402
  if (internalError) {
1337
- return /* @__PURE__ */ u$1(ResizeContainer, { size, children: /* @__PURE__ */ u$1(Headline, { heading: headline, children: /* @__PURE__ */ u$1(ErrorDisplay, { error: internalError }) }) });
1403
+ return /* @__PURE__ */ u$1(ResizeContainer, { size: size2, children: /* @__PURE__ */ u$1(Headline, { heading: headline, children: /* @__PURE__ */ u$1(ErrorDisplay, { error: internalError }) }) });
1338
1404
  }
1339
1405
  return /* @__PURE__ */ u$1(Fragment, { children });
1340
1406
  };
1341
- const Info = ({ children, size }) => {
1407
+ const Info = ({ children, height }) => {
1342
1408
  const [showHelp, setShowHelp] = p(false);
1409
+ const referenceRef = F(null);
1410
+ const floatingRef = F(null);
1411
+ useFloatingUi(referenceRef, floatingRef, [
1412
+ offset(10),
1413
+ shift(),
1414
+ size({
1415
+ apply() {
1416
+ if (!floatingRef.current) {
1417
+ return;
1418
+ }
1419
+ floatingRef.current.style.width = "100vw";
1420
+ floatingRef.current.style.height = height ? height : "50vh";
1421
+ }
1422
+ })
1423
+ ]);
1343
1424
  const toggleHelp = () => {
1344
1425
  setShowHelp(!showHelp);
1345
1426
  };
1427
+ useCloseOnEsc(setShowHelp);
1428
+ useCloseOnClickOutside(floatingRef, referenceRef, setShowHelp);
1346
1429
  return /* @__PURE__ */ u$1("div", { className: "relative", children: [
1347
- /* @__PURE__ */ u$1("button", { className: "btn btn-xs", onClick: toggleHelp, children: "?" }),
1348
- showHelp && /* @__PURE__ */ u$1(
1430
+ /* @__PURE__ */ u$1("button", { type: "button", className: "btn btn-xs", onClick: toggleHelp, ref: referenceRef, children: "?" }),
1431
+ /* @__PURE__ */ u$1(
1349
1432
  "div",
1350
1433
  {
1351
- className: "absolute top-8 right-6 bg-white p-2 border border-black flex flex-col overflow-auto shadow-lg rounded z-50",
1352
- style: size,
1434
+ ref: floatingRef,
1435
+ className: `${dropdownClass} overflow-y-auto opacity-90 ${showHelp ? "" : "hidden"}`,
1353
1436
  children: [
1354
1437
  /* @__PURE__ */ u$1("div", { className: "flex flex-col", children }),
1355
- /* @__PURE__ */ u$1("div", { className: "flex justify-end", children: /* @__PURE__ */ u$1("button", { className: "text-sm underline mt-2", onClick: toggleHelp, children: "Close" }) })
1438
+ /* @__PURE__ */ u$1(
1439
+ "button",
1440
+ {
1441
+ onClick: () => setShowHelp(false),
1442
+ className: "float-right underline text-sm hover:text-blue-700 mr-2",
1443
+ children: "Close"
1444
+ }
1445
+ )
1356
1446
  ]
1357
1447
  }
1358
1448
  )
@@ -1382,7 +1472,6 @@ const MutationTypeSelector = ({
1382
1472
  return /* @__PURE__ */ u$1(
1383
1473
  CheckboxSelector,
1384
1474
  {
1385
- className: "mx-1",
1386
1475
  items: displayedMutationTypes,
1387
1476
  label: mutationTypesSelectorLabel,
1388
1477
  setItems: (items) => setDisplayedMutationTypes(items)
@@ -1541,34 +1630,34 @@ const ProportionSelector = ({
1541
1630
  const ProportionSelectorDropdown = ({
1542
1631
  proportionInterval,
1543
1632
  setMinProportion,
1544
- setMaxProportion,
1545
- openDirection = "right"
1633
+ setMaxProportion
1546
1634
  }) => {
1547
1635
  const label = `${(proportionInterval.min * 100).toFixed(1)}% - ${(proportionInterval.max * 100).toFixed(1)}%`;
1548
- return /* @__PURE__ */ u$1("div", { class: `dropdown ${openDirection === "left" ? "dropdown-end" : ""}`, children: [
1549
- /* @__PURE__ */ u$1("div", { tabIndex: 0, role: "button", class: "btn btn-xs whitespace-nowrap", children: [
1550
- "Proportion ",
1551
- label
1552
- ] }),
1553
- /* @__PURE__ */ u$1("ul", { tabIndex: 0, class: "p-2 shadow menu dropdown-content z-[1] bg-base-100 rounded-box w-72", children: /* @__PURE__ */ u$1("div", { class: "mb-2 ml-2", children: /* @__PURE__ */ u$1(
1554
- ProportionSelector,
1555
- {
1556
- proportionInterval,
1557
- setMinProportion,
1558
- setMaxProportion
1559
- }
1560
- ) }) })
1561
- ] });
1636
+ return /* @__PURE__ */ u$1(Dropdown, { buttonTitle: `Proportion ${label}`, placement: "bottom-start", children: /* @__PURE__ */ u$1(
1637
+ ProportionSelector,
1638
+ {
1639
+ proportionInterval,
1640
+ setMinProportion,
1641
+ setMaxProportion
1642
+ }
1643
+ ) });
1562
1644
  };
1563
1645
  const Tabs = ({ tabs, toolbar }) => {
1564
1646
  const [activeTab, setActiveTab] = p(tabs[0].title);
1565
1647
  const [heightOfTabs, setHeightOfTabs] = p("3rem");
1566
1648
  const tabRef = F(null);
1567
- _(() => {
1649
+ const updateHeightOfTabs = () => {
1568
1650
  if (tabRef.current) {
1569
1651
  const heightOfTabs2 = tabRef.current.getBoundingClientRect().height;
1570
1652
  setHeightOfTabs(`${heightOfTabs2}px`);
1571
1653
  }
1654
+ };
1655
+ _(() => {
1656
+ updateHeightOfTabs();
1657
+ window.addEventListener("resize", updateHeightOfTabs);
1658
+ return () => {
1659
+ window.removeEventListener("resize", updateHeightOfTabs);
1660
+ };
1572
1661
  }, []);
1573
1662
  const tabElements = /* @__PURE__ */ u$1("div", { className: "flex flex-row", children: tabs.map((tab) => {
1574
1663
  return /* @__PURE__ */ u$1(Fragment, { children: /* @__PURE__ */ u$1(
@@ -1584,9 +1673,9 @@ const Tabs = ({ tabs, toolbar }) => {
1584
1673
  }) });
1585
1674
  const toolbarElement = typeof toolbar === "function" ? toolbar(activeTab) : toolbar;
1586
1675
  return /* @__PURE__ */ u$1("div", { className: "h-full w-full", children: [
1587
- /* @__PURE__ */ u$1("div", { ref: tabRef, className: "flex flex-row justify-between", children: [
1676
+ /* @__PURE__ */ u$1("div", { ref: tabRef, className: "flex flex-row justify-between flex-wrap", children: [
1588
1677
  tabElements,
1589
- toolbar && /* @__PURE__ */ u$1("div", { className: "py-2", children: toolbarElement })
1678
+ toolbar && /* @__PURE__ */ u$1("div", { className: "py-2 flex flex-wrap gap-y-1", children: toolbarElement })
1590
1679
  ] }),
1591
1680
  /* @__PURE__ */ u$1(
1592
1681
  "div",
@@ -1627,8 +1716,8 @@ const MutationComparison = ({
1627
1716
  height,
1628
1717
  headline = "Mutation comparison"
1629
1718
  }) => {
1630
- const size = { height, width };
1631
- return /* @__PURE__ */ u$1(ErrorBoundary, { size, headline, children: /* @__PURE__ */ u$1(ResizeContainer, { size, children: /* @__PURE__ */ u$1(Headline, { heading: headline, children: /* @__PURE__ */ u$1(MutationComparisonInner, { variants, sequenceType, views }) }) }) });
1719
+ const size2 = { height, width };
1720
+ return /* @__PURE__ */ u$1(ErrorBoundary, { size: size2, headline, children: /* @__PURE__ */ u$1(ResizeContainer, { size: size2, children: /* @__PURE__ */ u$1(Headline, { heading: headline, children: /* @__PURE__ */ u$1(MutationComparisonInner, { variants, sequenceType, views }) }) }) });
1632
1721
  };
1633
1722
  const MutationComparisonInner = ({
1634
1723
  variants,
@@ -1716,7 +1805,7 @@ const Toolbar$3 = ({
1716
1805
  proportionInterval,
1717
1806
  setProportionInterval
1718
1807
  }) => {
1719
- return /* @__PURE__ */ u$1("div", { class: "flex flex-row", children: [
1808
+ return /* @__PURE__ */ u$1(Fragment, { children: [
1720
1809
  /* @__PURE__ */ u$1(
1721
1810
  ProportionSelectorDropdown,
1722
1811
  {
@@ -1741,7 +1830,7 @@ const Toolbar$3 = ({
1741
1830
  filename: "mutation_comparison.csv"
1742
1831
  }
1743
1832
  ),
1744
- /* @__PURE__ */ u$1(Info, { children: "Info for mutation comparison" })
1833
+ /* @__PURE__ */ u$1(Info, { height: "100px", children: "Info for mutation comparison" })
1745
1834
  ] });
1746
1835
  };
1747
1836
  const gridJsStyle = '.gridjs-head button, .gridjs-footer button {\n cursor: pointer;\n background-color: transparent;\n background-image: none;\n padding: 0;\n margin: 0;\n border: none;\n outline: none;\n}\n\n.gridjs-temp {\n position: relative;\n}\n\n.gridjs-head {\n width: 100%;\n margin-bottom: 5px;\n padding: 5px 1px;\n}\n.gridjs-head::after {\n content: "";\n display: block;\n clear: both;\n}\n.gridjs-head:empty {\n padding: 0;\n border: none;\n}\n\n.gridjs-container {\n overflow: hidden;\n display: inline-block;\n padding: 2px;\n color: #000;\n position: relative;\n z-index: 0;\n}\n\n.gridjs-footer {\n display: block;\n position: relative;\n width: 100%;\n z-index: 5;\n padding: 12px 24px;\n border-top: 1px solid #e5e7eb;\n background-color: #fff;\n box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.26);\n border-radius: 0 0 8px 8px;\n border-bottom-width: 1px;\n border-color: #e5e7eb;\n}\n.gridjs-footer:empty {\n padding: 0;\n border: none;\n}\n\ninput.gridjs-input {\n outline: none;\n background-color: #fff;\n border: 1px solid #d2d6dc;\n border-radius: 5px;\n padding: 10px 13px;\n font-size: 14px;\n line-height: 1.45;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n}\ninput.gridjs-input:focus {\n box-shadow: 0 0 0 3px rgba(149, 189, 243, 0.5);\n border-color: #9bc2f7;\n}\n\n.gridjs-pagination {\n color: #3d4044;\n}\n.gridjs-pagination::after {\n content: "";\n display: block;\n clear: both;\n}\n.gridjs-pagination .gridjs-summary {\n float: left;\n margin-top: 5px;\n}\n.gridjs-pagination .gridjs-pages {\n float: right;\n}\n.gridjs-pagination .gridjs-pages button {\n padding: 5px 14px;\n border: 1px solid #d2d6dc;\n background-color: #fff;\n border-right: none;\n outline: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n.gridjs-pagination .gridjs-pages button:focus {\n box-shadow: 0 0 0 2px rgba(149, 189, 243, 0.5);\n position: relative;\n margin-right: -1px;\n border-right: 1px solid #d2d6dc;\n}\n.gridjs-pagination .gridjs-pages button:hover {\n background-color: #f7f7f7;\n color: rgb(60, 66, 87);\n outline: none;\n}\n.gridjs-pagination .gridjs-pages button:disabled,\n.gridjs-pagination .gridjs-pages button[disabled],\n.gridjs-pagination .gridjs-pages button:hover:disabled {\n cursor: default;\n background-color: #fff;\n color: #6b7280;\n}\n.gridjs-pagination .gridjs-pages button.gridjs-spread {\n cursor: default;\n box-shadow: none;\n background-color: #fff;\n}\n.gridjs-pagination .gridjs-pages button.gridjs-currentPage {\n background-color: #f7f7f7;\n font-weight: bold;\n}\n.gridjs-pagination .gridjs-pages button:last-child {\n border-bottom-right-radius: 6px;\n border-top-right-radius: 6px;\n border-right: 1px solid #d2d6dc;\n}\n.gridjs-pagination .gridjs-pages button:first-child {\n border-bottom-left-radius: 6px;\n border-top-left-radius: 6px;\n}\n.gridjs-pagination .gridjs-pages button:last-child:focus {\n margin-right: 0;\n}\n\nbutton.gridjs-sort {\n float: right;\n height: 24px;\n width: 13px;\n background-color: transparent;\n background-repeat: no-repeat;\n background-position-x: center;\n cursor: pointer;\n padding: 0;\n margin: 0;\n border: none;\n outline: none;\n background-size: contain;\n}\nbutton.gridjs-sort-neutral {\n opacity: 0.3;\n background-image: url("data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHdpZHRoPSI0MDEuOTk4cHgiIGhlaWdodD0iNDAxLjk5OHB4IiB2aWV3Qm94PSIwIDAgNDAxLjk5OCA0MDEuOTk4IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA0MDEuOTk4IDQwMS45OTg7IgoJIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8Zz4KCTxnPgoJCTxwYXRoIGQ9Ik03My4wOTIsMTY0LjQ1MmgyNTUuODEzYzQuOTQ5LDAsOS4yMzMtMS44MDcsMTIuODQ4LTUuNDI0YzMuNjEzLTMuNjE2LDUuNDI3LTcuODk4LDUuNDI3LTEyLjg0NwoJCQljMC00Ljk0OS0xLjgxMy05LjIyOS01LjQyNy0xMi44NUwyMTMuODQ2LDUuNDI0QzIxMC4yMzIsMS44MTIsMjA1Ljk1MSwwLDIwMC45OTksMHMtOS4yMzMsMS44MTItMTIuODUsNS40MjRMNjAuMjQyLDEzMy4zMzEKCQkJYy0zLjYxNywzLjYxNy01LjQyNCw3LjkwMS01LjQyNCwxMi44NWMwLDQuOTQ4LDEuODA3LDkuMjMxLDUuNDI0LDEyLjg0N0M2My44NjMsMTYyLjY0NSw2OC4xNDQsMTY0LjQ1Miw3My4wOTIsMTY0LjQ1MnoiLz4KCQk8cGF0aCBkPSJNMzI4LjkwNSwyMzcuNTQ5SDczLjA5MmMtNC45NTIsMC05LjIzMywxLjgwOC0xMi44NSw1LjQyMWMtMy42MTcsMy42MTctNS40MjQsNy44OTgtNS40MjQsMTIuODQ3CgkJCWMwLDQuOTQ5LDEuODA3LDkuMjMzLDUuNDI0LDEyLjg0OEwxODguMTQ5LDM5Ni41N2MzLjYyMSwzLjYxNyw3LjkwMiw1LjQyOCwxMi44NSw1LjQyOHM5LjIzMy0xLjgxMSwxMi44NDctNS40MjhsMTI3LjkwNy0xMjcuOTA2CgkJCWMzLjYxMy0zLjYxNCw1LjQyNy03Ljg5OCw1LjQyNy0xMi44NDhjMC00Ljk0OC0xLjgxMy05LjIyOS01LjQyNy0xMi44NDdDMzM4LjEzOSwyMzkuMzUzLDMzMy44NTQsMjM3LjU0OSwzMjguOTA1LDIzNy41NDl6Ii8+Cgk8L2c+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+");\n background-position-y: center;\n}\nbutton.gridjs-sort-asc {\n background-image: url("data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHdpZHRoPSIyOTIuMzYycHgiIGhlaWdodD0iMjkyLjM2MXB4IiB2aWV3Qm94PSIwIDAgMjkyLjM2MiAyOTIuMzYxIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAyOTIuMzYyIDI5Mi4zNjE7IgoJIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8Zz4KCTxwYXRoIGQ9Ik0yODYuOTM1LDE5Ny4yODdMMTU5LjAyOCw2OS4zODFjLTMuNjEzLTMuNjE3LTcuODk1LTUuNDI0LTEyLjg0Ny01LjQyNHMtOS4yMzMsMS44MDctMTIuODUsNS40MjRMNS40MjQsMTk3LjI4NwoJCUMxLjgwNywyMDAuOTA0LDAsMjA1LjE4NiwwLDIxMC4xMzRzMS44MDcsOS4yMzMsNS40MjQsMTIuODQ3YzMuNjIxLDMuNjE3LDcuOTAyLDUuNDI1LDEyLjg1LDUuNDI1aDI1NS44MTMKCQljNC45NDksMCw5LjIzMy0xLjgwOCwxMi44NDgtNS40MjVjMy42MTMtMy42MTMsNS40MjctNy44OTgsNS40MjctMTIuODQ3UzI5MC41NDgsMjAwLjkwNCwyODYuOTM1LDE5Ny4yODd6Ii8+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+");\n background-position-y: 35%;\n background-size: 10px;\n}\nbutton.gridjs-sort-desc {\n background-image: url("data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHdpZHRoPSIyOTIuMzYycHgiIGhlaWdodD0iMjkyLjM2MnB4IiB2aWV3Qm94PSIwIDAgMjkyLjM2MiAyOTIuMzYyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAyOTIuMzYyIDI5Mi4zNjI7IgoJIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8Zz4KCTxwYXRoIGQ9Ik0yODYuOTM1LDY5LjM3N2MtMy42MTQtMy42MTctNy44OTgtNS40MjQtMTIuODQ4LTUuNDI0SDE4LjI3NGMtNC45NTIsMC05LjIzMywxLjgwNy0xMi44NSw1LjQyNAoJCUMxLjgwNyw3Mi45OTgsMCw3Ny4yNzksMCw4Mi4yMjhjMCw0Ljk0OCwxLjgwNyw5LjIyOSw1LjQyNCwxMi44NDdsMTI3LjkwNywxMjcuOTA3YzMuNjIxLDMuNjE3LDcuOTAyLDUuNDI4LDEyLjg1LDUuNDI4CgkJczkuMjMzLTEuODExLDEyLjg0Ny01LjQyOEwyODYuOTM1LDk1LjA3NGMzLjYxMy0zLjYxNyw1LjQyNy03Ljg5OCw1LjQyNy0xMi44NDdDMjkyLjM2Miw3Ny4yNzksMjkwLjU0OCw3Mi45OTgsMjg2LjkzNSw2OS4zNzd6Ii8+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+");\n background-position-y: 65%;\n background-size: 10px;\n}\nbutton.gridjs-sort:focus {\n outline: none;\n}\n\ntable.gridjs-table {\n width: 100%;\n max-width: 100%;\n border-collapse: collapse;\n text-align: left;\n display: table;\n margin: 0;\n padding: 0;\n overflow: auto;\n table-layout: fixed;\n}\n\n.gridjs-tbody {\n background-color: #fff;\n}\n\ntd.gridjs-td {\n border: 1px solid #e5e7eb;\n padding: 12px 24px;\n background-color: #fff;\n box-sizing: content-box;\n}\ntd.gridjs-td:first-child {\n border-left: none;\n}\ntd.gridjs-td:last-child {\n border-right: none;\n}\ntd.gridjs-message {\n text-align: center;\n}\n\nth.gridjs-th {\n position: relative;\n color: #6b7280;\n background-color: #f9fafb;\n border: 1px solid #e5e7eb;\n border-top: none;\n padding: 14px 24px;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n box-sizing: border-box;\n white-space: nowrap;\n outline: none;\n vertical-align: middle;\n}\nth.gridjs-th .gridjs-th-content {\n text-overflow: ellipsis;\n overflow: hidden;\n width: 100%;\n float: left;\n}\nth.gridjs-th-sort {\n cursor: pointer;\n}\nth.gridjs-th-sort .gridjs-th-content {\n width: calc(100% - 15px);\n}\nth.gridjs-th-sort:hover {\n background-color: #e5e7eb;\n}\nth.gridjs-th-sort:focus {\n background-color: #e5e7eb;\n}\nth.gridjs-th-fixed {\n position: sticky;\n box-shadow: 0 1px 0 0 #e5e7eb;\n}\n@supports (-moz-appearance: none) {\n th.gridjs-th-fixed {\n box-shadow: 0 0 0 1px #e5e7eb;\n }\n}\nth.gridjs-th:first-child {\n border-left: none;\n}\nth.gridjs-th:last-child {\n border-right: none;\n}\n\n.gridjs-tr {\n border: none;\n}\n.gridjs-tr-selected td {\n background-color: #ebf5ff;\n}\n.gridjs-tr:last-child td {\n border-bottom: 0;\n}\n\n.gridjs *,\n.gridjs :after,\n.gridjs :before {\n box-sizing: border-box;\n}\n\n.gridjs-wrapper {\n position: relative;\n z-index: 1;\n overflow: auto;\n width: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.26);\n border-radius: 8px 8px 0 0;\n display: block;\n border-top-width: 1px;\n border-color: #e5e7eb;\n}\n.gridjs-wrapper:nth-last-of-type(2) {\n border-radius: 8px;\n border-bottom-width: 1px;\n}\n\n.gridjs-search {\n float: left;\n}\n.gridjs-search-input {\n width: 250px;\n}\n\n.gridjs-loading-bar {\n z-index: 10;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n background-color: #fff;\n opacity: 0.5;\n}\n.gridjs-loading-bar::after {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n transform: translateX(-100%);\n background-image: linear-gradient(90deg, rgba(204, 204, 204, 0) 0, rgba(204, 204, 204, 0.2) 20%, rgba(204, 204, 204, 0.5) 60%, rgba(204, 204, 204, 0));\n animation: shimmer 2s infinite;\n content: "";\n}\n@keyframes shimmer {\n 100% {\n transform: translateX(100%);\n }\n}\n\n.gridjs-td .gridjs-checkbox {\n display: block;\n margin: auto;\n cursor: pointer;\n}\n\n.gridjs-resizable {\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: 5px;\n}\n.gridjs-resizable:hover {\n cursor: ew-resize;\n background-color: #9bc2f7;\n}\n/*# sourceMappingURL=mermaid.css?inline.map */';
@@ -2387,15 +2476,6 @@ html {
2387
2476
  color: var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));
2388
2477
  }
2389
2478
 
2390
- .menu li > *:not(ul, .menu-title, details, .btn):active,
2391
- .menu li > *:not(ul, .menu-title, details, .btn).active,
2392
- .menu li > details > summary:active {
2393
- --tw-bg-opacity: 1;
2394
- background-color: var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));
2395
- --tw-text-opacity: 1;
2396
- color: var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)));
2397
- }
2398
-
2399
2479
  .tab:hover {
2400
2480
  --tw-text-opacity: 1;
2401
2481
  }
@@ -2514,39 +2594,6 @@ html {
2514
2594
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
2515
2595
  transition-duration: 200ms;
2516
2596
  }
2517
- .dropdown-end .dropdown-content {
2518
- inset-inline-end: 0px;
2519
- }
2520
- .dropdown-left .dropdown-content {
2521
- bottom: auto;
2522
- inset-inline-end: 100%;
2523
- top: 0px;
2524
- transform-origin: right;
2525
- }
2526
- .dropdown-right .dropdown-content {
2527
- bottom: auto;
2528
- inset-inline-start: 100%;
2529
- top: 0px;
2530
- transform-origin: left;
2531
- }
2532
- .dropdown-bottom .dropdown-content {
2533
- bottom: auto;
2534
- top: 100%;
2535
- transform-origin: top;
2536
- }
2537
- .dropdown-top .dropdown-content {
2538
- bottom: 100%;
2539
- top: auto;
2540
- transform-origin: bottom;
2541
- }
2542
- .dropdown-end.dropdown-right .dropdown-content {
2543
- bottom: 0px;
2544
- top: auto;
2545
- }
2546
- .dropdown-end.dropdown-left .dropdown-content {
2547
- bottom: 0px;
2548
- top: auto;
2549
- }
2550
2597
  .dropdown.dropdown-open .dropdown-content,
2551
2598
  .dropdown:not(.dropdown-hover):focus .dropdown-content,
2552
2599
  .dropdown:focus-within .dropdown-content {
@@ -2641,19 +2688,6 @@ html {
2641
2688
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
2642
2689
  }
2643
2690
 
2644
- :where(.menu li:not(.menu-title, .disabled) > *:not(ul, details, .menu-title)):not(.active, .btn):hover, :where(.menu li:not(.menu-title, .disabled) > details > summary:not(.menu-title)):not(.active, .btn):hover {
2645
- cursor: pointer;
2646
- outline: 2px solid transparent;
2647
- outline-offset: 2px;
2648
- }
2649
-
2650
- @supports (color: oklch(0% 0 0)) {
2651
-
2652
- :where(.menu li:not(.menu-title, .disabled) > *:not(ul, details, .menu-title)):not(.active, .btn):hover, :where(.menu li:not(.menu-title, .disabled) > details > summary:not(.menu-title)):not(.active, .btn):hover {
2653
- background-color: var(--fallback-bc,oklch(var(--bc)/0.1));
2654
- }
2655
- }
2656
-
2657
2691
  .tab[disabled],
2658
2692
  .tab[disabled]:hover {
2659
2693
  cursor: not-allowed;
@@ -2780,31 +2814,6 @@ html {
2780
2814
  border-radius: inherit;
2781
2815
  }
2782
2816
  }
2783
- .menu {
2784
- display: flex;
2785
- flex-direction: column;
2786
- flex-wrap: wrap;
2787
- font-size: 0.875rem;
2788
- line-height: 1.25rem;
2789
- padding: 0.5rem;
2790
- }
2791
- .menu :where(li ul) {
2792
- position: relative;
2793
- white-space: nowrap;
2794
- margin-inline-start: 1rem;
2795
- padding-inline-start: 0.5rem;
2796
- }
2797
- .menu :where(li:not(.menu-title) > *:not(ul, details, .menu-title, .btn)), .menu :where(li:not(.menu-title) > details > summary:not(.menu-title)) {
2798
- display: grid;
2799
- grid-auto-flow: column;
2800
- align-content: flex-start;
2801
- align-items: center;
2802
- gap: 0.5rem;
2803
- grid-auto-columns: minmax(auto, max-content) auto max-content;
2804
- -webkit-user-select: none;
2805
- -moz-user-select: none;
2806
- user-select: none;
2807
- }
2808
2817
  .menu li.disabled {
2809
2818
  cursor: not-allowed;
2810
2819
  -webkit-user-select: none;
@@ -2812,20 +2821,6 @@ html {
2812
2821
  user-select: none;
2813
2822
  color: var(--fallback-bc,oklch(var(--bc)/0.3));
2814
2823
  }
2815
- .menu :where(li > .menu-dropdown:not(.menu-dropdown-show)) {
2816
- display: none;
2817
- }
2818
- :where(.menu li) {
2819
- position: relative;
2820
- display: flex;
2821
- flex-shrink: 0;
2822
- flex-direction: column;
2823
- flex-wrap: wrap;
2824
- align-items: stretch;
2825
- }
2826
- :where(.menu li) .badge {
2827
- justify-self: end;
2828
- }
2829
2824
  .modal {
2830
2825
  pointer-events: none;
2831
2826
  position: fixed;
@@ -3049,6 +3044,29 @@ input.tab:checked + .tab-content,
3049
3044
  --tw-bg-opacity: 1;
3050
3045
  background-color: var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));
3051
3046
  }
3047
+ .toggle {
3048
+ flex-shrink: 0;
3049
+ --tglbg: var(--fallback-b1,oklch(var(--b1)/1));
3050
+ --handleoffset: 1.5rem;
3051
+ --handleoffsetcalculator: calc(var(--handleoffset) * -1);
3052
+ --togglehandleborder: 0 0;
3053
+ height: 1.5rem;
3054
+ width: 3rem;
3055
+ cursor: pointer;
3056
+ -webkit-appearance: none;
3057
+ -moz-appearance: none;
3058
+ appearance: none;
3059
+ border-radius: var(--rounded-badge, 1.9rem);
3060
+ border-width: 1px;
3061
+ border-color: currentColor;
3062
+ background-color: currentColor;
3063
+ color: var(--fallback-bc,oklch(var(--bc)/0.5));
3064
+ transition: background,
3065
+ box-shadow var(--animation-input, 0.2s) ease-out;
3066
+ box-shadow: var(--handleoffsetcalculator) 0 0 2px var(--tglbg) inset,
3067
+ 0 0 0 2px var(--tglbg) inset,
3068
+ var(--togglehandleborder);
3069
+ }
3052
3070
  .alert-error {
3053
3071
  border-color: var(--fallback-er,oklch(var(--er)/0.2));
3054
3072
  --tw-text-opacity: 1;
@@ -3282,9 +3300,6 @@ input.tab:checked + .tab-content,
3282
3300
  margin-bottom: 0px;
3283
3301
  margin-inline-start: -1px;
3284
3302
  }
3285
- .join-item:focus {
3286
- isolation: isolate;
3287
- }
3288
3303
  .loading {
3289
3304
  pointer-events: none;
3290
3305
  display: inline-block;
@@ -3307,40 +3322,6 @@ input.tab:checked + .tab-content,
3307
3322
  .loading-md {
3308
3323
  width: 1.5rem;
3309
3324
  }
3310
- :where(.menu li:empty) {
3311
- --tw-bg-opacity: 1;
3312
- background-color: var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));
3313
- opacity: 0.1;
3314
- margin: 0.5rem 1rem;
3315
- height: 1px;
3316
- }
3317
- .menu :where(li ul):before {
3318
- position: absolute;
3319
- bottom: 0.75rem;
3320
- inset-inline-start: 0px;
3321
- top: 0.75rem;
3322
- width: 1px;
3323
- --tw-bg-opacity: 1;
3324
- background-color: var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));
3325
- opacity: 0.1;
3326
- content: "";
3327
- }
3328
- .menu :where(li:not(.menu-title) > *:not(ul, details, .menu-title, .btn)),
3329
- .menu :where(li:not(.menu-title) > details > summary:not(.menu-title)) {
3330
- border-radius: var(--rounded-btn, 0.5rem);
3331
- padding-left: 1rem;
3332
- padding-right: 1rem;
3333
- padding-top: 0.5rem;
3334
- padding-bottom: 0.5rem;
3335
- text-align: start;
3336
- transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;
3337
- transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
3338
- transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;
3339
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
3340
- transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
3341
- transition-duration: 200ms;
3342
- text-wrap: balance;
3343
- }
3344
3325
  :where(.menu li:not(.menu-title, .disabled) > *:not(ul, details, .menu-title)):not(summary, .active, .btn).focus, :where(.menu li:not(.menu-title, .disabled) > *:not(ul, details, .menu-title)):not(summary, .active, .btn):focus, :where(.menu li:not(.menu-title, .disabled) > *:not(ul, details, .menu-title)):is(summary):not(.active, .btn):focus-visible, :where(.menu li:not(.menu-title, .disabled) > details > summary:not(.menu-title)):not(summary, .active, .btn).focus, :where(.menu li:not(.menu-title, .disabled) > details > summary:not(.menu-title)):not(summary, .active, .btn):focus, :where(.menu li:not(.menu-title, .disabled) > details > summary:not(.menu-title)):is(summary):not(.active, .btn):focus-visible {
3345
3326
  cursor: pointer;
3346
3327
  background-color: var(--fallback-bc,oklch(var(--bc)/0.1));
@@ -3349,38 +3330,6 @@ input.tab:checked + .tab-content,
3349
3330
  outline: 2px solid transparent;
3350
3331
  outline-offset: 2px;
3351
3332
  }
3352
- .menu li > *:not(ul, .menu-title, details, .btn):active,
3353
- .menu li > *:not(ul, .menu-title, details, .btn).active,
3354
- .menu li > details > summary:active {
3355
- --tw-bg-opacity: 1;
3356
- background-color: var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));
3357
- --tw-text-opacity: 1;
3358
- color: var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)));
3359
- }
3360
- .menu :where(li > details > summary)::-webkit-details-marker {
3361
- display: none;
3362
- }
3363
- .menu :where(li > details > summary):after,
3364
- .menu :where(li > .menu-dropdown-toggle):after {
3365
- justify-self: end;
3366
- display: block;
3367
- margin-top: -0.5rem;
3368
- height: 0.5rem;
3369
- width: 0.5rem;
3370
- transform: rotate(45deg);
3371
- transition-property: transform, margin-top;
3372
- transition-duration: 0.3s;
3373
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
3374
- content: "";
3375
- transform-origin: 75% 75%;
3376
- box-shadow: 2px 2px;
3377
- pointer-events: none;
3378
- }
3379
- .menu :where(li > details[open] > summary):after,
3380
- .menu :where(li > .menu-dropdown-toggle.menu-dropdown-show):after {
3381
- transform: rotate(225deg);
3382
- margin-top: 0;
3383
- }
3384
3333
  .mockup-phone .display {
3385
3334
  overflow: hidden;
3386
3335
  border-radius: 40px;
@@ -3901,6 +3850,49 @@ input.tab:checked + .tab-content,
3901
3850
  opacity: 1;
3902
3851
  }
3903
3852
  }
3853
+ [dir="rtl"] .toggle {
3854
+ --handleoffsetcalculator: calc(var(--handleoffset) * 1);
3855
+ }
3856
+ .toggle:focus-visible {
3857
+ outline-style: solid;
3858
+ outline-width: 2px;
3859
+ outline-offset: 2px;
3860
+ outline-color: var(--fallback-bc,oklch(var(--bc)/0.2));
3861
+ }
3862
+ .toggle:hover {
3863
+ background-color: currentColor;
3864
+ }
3865
+ .toggle:checked,
3866
+ .toggle[aria-checked="true"] {
3867
+ background-image: none;
3868
+ --handleoffsetcalculator: var(--handleoffset);
3869
+ --tw-text-opacity: 1;
3870
+ color: var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));
3871
+ }
3872
+ [dir="rtl"] .toggle:checked, [dir="rtl"] .toggle[aria-checked="true"] {
3873
+ --handleoffsetcalculator: calc(var(--handleoffset) * -1);
3874
+ }
3875
+ .toggle:indeterminate {
3876
+ --tw-text-opacity: 1;
3877
+ color: var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));
3878
+ box-shadow: calc(var(--handleoffset) / 2) 0 0 2px var(--tglbg) inset,
3879
+ calc(var(--handleoffset) / -2) 0 0 2px var(--tglbg) inset,
3880
+ 0 0 0 2px var(--tglbg) inset;
3881
+ }
3882
+ [dir="rtl"] .toggle:indeterminate {
3883
+ box-shadow: calc(var(--handleoffset) / 2) 0 0 2px var(--tglbg) inset,
3884
+ calc(var(--handleoffset) / -2) 0 0 2px var(--tglbg) inset,
3885
+ 0 0 0 2px var(--tglbg) inset;
3886
+ }
3887
+ .toggle:disabled {
3888
+ cursor: not-allowed;
3889
+ --tw-border-opacity: 1;
3890
+ border-color: var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));
3891
+ background-color: transparent;
3892
+ opacity: 0.3;
3893
+ --togglehandleborder: 0 0 0 3px var(--fallback-bc,oklch(var(--bc)/1)) inset,
3894
+ var(--handleoffsetcalculator) 0 0 3px var(--fallback-bc,oklch(var(--bc)/1)) inset;
3895
+ }
3904
3896
  .btn-xs {
3905
3897
  height: 1.5rem;
3906
3898
  min-height: 1.5rem;
@@ -4224,23 +4216,32 @@ input.tab:checked + .tab-content,
4224
4216
  .relative {
4225
4217
  position: relative;
4226
4218
  }
4219
+ .-right-3 {
4220
+ right: -0.75rem;
4221
+ }
4222
+ .-top-3 {
4223
+ top: -0.75rem;
4224
+ }
4225
+ .left-0 {
4226
+ left: 0px;
4227
+ }
4227
4228
  .right-2 {
4228
4229
  right: 0.5rem;
4229
4230
  }
4230
- .right-6 {
4231
- right: 1.5rem;
4231
+ .top-0 {
4232
+ top: 0px;
4232
4233
  }
4233
4234
  .top-2 {
4234
4235
  top: 0.5rem;
4235
4236
  }
4236
- .top-8 {
4237
- top: 2rem;
4237
+ .z-10 {
4238
+ z-index: 10;
4238
4239
  }
4239
- .z-50 {
4240
- z-index: 50;
4240
+ .float-right {
4241
+ float: right;
4241
4242
  }
4242
- .z-\\[1\\] {
4243
- z-index: 1;
4243
+ .m-1 {
4244
+ margin: 0.25rem;
4244
4245
  }
4245
4246
  .m-2 {
4246
4247
  margin: 0.5rem;
@@ -4257,24 +4258,18 @@ input.tab:checked + .tab-content,
4257
4258
  margin-top: 1rem;
4258
4259
  margin-bottom: 1rem;
4259
4260
  }
4260
- .mb-1 {
4261
- margin-bottom: 0.25rem;
4262
- }
4263
4261
  .mb-2 {
4264
4262
  margin-bottom: 0.5rem;
4265
4263
  }
4266
- .me-1 {
4267
- margin-inline-end: 0.25rem;
4268
- }
4269
- .ml-2 {
4270
- margin-left: 0.5rem;
4271
- }
4272
- .mt-2 {
4273
- margin-top: 0.5rem;
4264
+ .mr-2 {
4265
+ margin-right: 0.5rem;
4274
4266
  }
4275
4267
  .mt-4 {
4276
4268
  margin-top: 1rem;
4277
4269
  }
4270
+ .inline-block {
4271
+ display: inline-block;
4272
+ }
4278
4273
  .inline {
4279
4274
  display: inline;
4280
4275
  }
@@ -4299,21 +4294,21 @@ input.tab:checked + .tab-content,
4299
4294
  .w-32 {
4300
4295
  width: 8rem;
4301
4296
  }
4297
+ .w-40 {
4298
+ width: 10rem;
4299
+ }
4302
4300
  .w-64 {
4303
4301
  width: 16rem;
4304
4302
  }
4305
- .w-72 {
4306
- width: 18rem;
4307
- }
4308
4303
  .w-full {
4309
4304
  width: 100%;
4310
4305
  }
4311
- .min-w-0 {
4312
- min-width: 0px;
4306
+ .w-max {
4307
+ width: -moz-max-content;
4308
+ width: max-content;
4313
4309
  }
4314
- .min-w-max {
4315
- min-width: -moz-max-content;
4316
- min-width: max-content;
4310
+ .min-w-40 {
4311
+ min-width: 10rem;
4317
4312
  }
4318
4313
  .max-w-screen-lg {
4319
4314
  max-width: 1024px;
@@ -4321,9 +4316,15 @@ input.tab:checked + .tab-content,
4321
4316
  .flex-1 {
4322
4317
  flex: 1 1 0%;
4323
4318
  }
4319
+ .flex-grow {
4320
+ flex-grow: 1;
4321
+ }
4324
4322
  .grow {
4325
4323
  flex-grow: 1;
4326
4324
  }
4325
+ .resize {
4326
+ resize: both;
4327
+ }
4327
4328
  .flex-row {
4328
4329
  flex-direction: row;
4329
4330
  }
@@ -4333,50 +4334,35 @@ input.tab:checked + .tab-content,
4333
4334
  .flex-wrap {
4334
4335
  flex-wrap: wrap;
4335
4336
  }
4336
- .flex-nowrap {
4337
- flex-wrap: nowrap;
4338
- }
4339
4337
  .items-center {
4340
4338
  align-items: center;
4341
4339
  }
4342
- .justify-end {
4343
- justify-content: flex-end;
4344
- }
4345
4340
  .justify-center {
4346
4341
  justify-content: center;
4347
4342
  }
4348
4343
  .justify-between {
4349
4344
  justify-content: space-between;
4350
4345
  }
4351
- .gap-1 {
4352
- gap: 0.25rem;
4353
- }
4354
4346
  .gap-2 {
4355
4347
  gap: 0.5rem;
4356
4348
  }
4349
+ .gap-y-1 {
4350
+ row-gap: 0.25rem;
4351
+ }
4357
4352
  .overflow-auto {
4358
4353
  overflow: auto;
4359
4354
  }
4360
- .overflow-scroll {
4361
- overflow: scroll;
4355
+ .overflow-y-auto {
4356
+ overflow-y: auto;
4362
4357
  }
4363
4358
  .whitespace-nowrap {
4364
4359
  white-space: nowrap;
4365
4360
  }
4366
- .text-nowrap {
4367
- text-wrap: nowrap;
4368
- }
4369
4361
  .break-words {
4370
4362
  overflow-wrap: break-word;
4371
4363
  }
4372
- .rounded {
4373
- border-radius: 0.25rem;
4374
- }
4375
- .rounded-box {
4376
- border-radius: var(--rounded-box, 1rem);
4377
- }
4378
- .rounded-lg {
4379
- border-radius: 0.5rem;
4364
+ .rounded-full {
4365
+ border-radius: 9999px;
4380
4366
  }
4381
4367
  .rounded-md {
4382
4368
  border-radius: 0.375rem;
@@ -4403,9 +4389,11 @@ input.tab:checked + .tab-content,
4403
4389
  .border-b-2 {
4404
4390
  border-bottom-width: 2px;
4405
4391
  }
4406
- .border-black {
4407
- --tw-border-opacity: 1;
4408
- border-color: rgb(0 0 0 / var(--tw-border-opacity));
4392
+ .border-solid {
4393
+ border-style: solid;
4394
+ }
4395
+ .border-none {
4396
+ border-style: none;
4409
4397
  }
4410
4398
  .border-error {
4411
4399
  --tw-border-opacity: 1;
@@ -4415,6 +4403,10 @@ input.tab:checked + .tab-content,
4415
4403
  --tw-border-opacity: 1;
4416
4404
  border-color: rgb(243 244 246 / var(--tw-border-opacity));
4417
4405
  }
4406
+ .border-gray-200 {
4407
+ --tw-border-opacity: 1;
4408
+ border-color: rgb(229 231 235 / var(--tw-border-opacity));
4409
+ }
4418
4410
  .border-gray-300 {
4419
4411
  --tw-border-opacity: 1;
4420
4412
  border-color: rgb(209 213 219 / var(--tw-border-opacity));
@@ -4423,9 +4415,9 @@ input.tab:checked + .tab-content,
4423
4415
  --tw-border-opacity: 1;
4424
4416
  border-color: rgb(156 163 175 / var(--tw-border-opacity));
4425
4417
  }
4426
- .bg-base-100 {
4427
- --tw-bg-opacity: 1;
4428
- background-color: var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));
4418
+ .border-red-500 {
4419
+ --tw-border-opacity: 1;
4420
+ border-color: rgb(239 68 68 / var(--tw-border-opacity));
4429
4421
  }
4430
4422
  .bg-base-200 {
4431
4423
  --tw-bg-opacity: 1;
@@ -4435,28 +4427,26 @@ input.tab:checked + .tab-content,
4435
4427
  --tw-bg-opacity: 1;
4436
4428
  background-color: rgb(255 255 255 / var(--tw-bg-opacity));
4437
4429
  }
4430
+ .p-1 {
4431
+ padding: 0.25rem;
4432
+ }
4438
4433
  .p-2 {
4439
4434
  padding: 0.5rem;
4440
4435
  }
4436
+ .p-4 {
4437
+ padding: 1rem;
4438
+ }
4441
4439
  .px-2 {
4442
4440
  padding-left: 0.5rem;
4443
4441
  padding-right: 0.5rem;
4444
4442
  }
4445
- .px-2\\.5 {
4446
- padding-left: 0.625rem;
4447
- padding-right: 0.625rem;
4448
- }
4449
4443
  .px-4 {
4450
4444
  padding-left: 1rem;
4451
4445
  padding-right: 1rem;
4452
4446
  }
4453
- .py-0 {
4454
- padding-top: 0px;
4455
- padding-bottom: 0px;
4456
- }
4457
- .py-0\\.5 {
4458
- padding-top: 0.125rem;
4459
- padding-bottom: 0.125rem;
4447
+ .py-1 {
4448
+ padding-top: 0.25rem;
4449
+ padding-bottom: 0.25rem;
4460
4450
  }
4461
4451
  .py-16 {
4462
4452
  padding-top: 4rem;
@@ -4517,6 +4507,9 @@ input.tab:checked + .tab-content,
4517
4507
  .underline {
4518
4508
  text-decoration-line: underline;
4519
4509
  }
4510
+ .opacity-90 {
4511
+ opacity: 0.9;
4512
+ }
4520
4513
  .shadow {
4521
4514
  --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
4522
4515
  --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
@@ -4542,10 +4535,18 @@ input.tab:checked + .tab-content,
4542
4535
  .duration-150 {
4543
4536
  transition-duration: 150ms;
4544
4537
  }
4538
+ .focus-within\\:border-gray-400:focus-within {
4539
+ --tw-border-opacity: 1;
4540
+ border-color: rgb(156 163 175 / var(--tw-border-opacity));
4541
+ }
4545
4542
  .hover\\:bg-gray-100:hover {
4546
4543
  --tw-bg-opacity: 1;
4547
4544
  background-color: rgb(243 244 246 / var(--tw-bg-opacity));
4548
4545
  }
4546
+ .hover\\:text-blue-700:hover {
4547
+ --tw-text-opacity: 1;
4548
+ color: rgb(29 78 216 / var(--tw-text-opacity));
4549
+ }
4549
4550
  .hover\\:text-blue-800:hover {
4550
4551
  --tw-text-opacity: 1;
4551
4552
  color: rgb(30 64 175 / var(--tw-text-opacity));
@@ -4557,6 +4558,15 @@ input.tab:checked + .tab-content,
4557
4558
  .hover\\:text-gray-700:hover {
4558
4559
  --tw-text-opacity: 1;
4559
4560
  color: rgb(55 65 81 / var(--tw-text-opacity));
4561
+ }
4562
+ .focus\\:outline-none:focus {
4563
+ outline: 2px solid transparent;
4564
+ outline-offset: 2px;
4565
+ }
4566
+ .focus\\:ring-0:focus {
4567
+ --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
4568
+ --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);
4569
+ box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
4560
4570
  }`;
4561
4571
  var __defProp$9 = Object.defineProperty;
4562
4572
  var __getOwnPropDesc$9 = Object.getOwnPropertyDescriptor;
@@ -4921,8 +4931,8 @@ const Mutations = ({
4921
4931
  height,
4922
4932
  headline = "Mutations"
4923
4933
  }) => {
4924
- const size = { height, width };
4925
- return /* @__PURE__ */ u$1(ErrorBoundary, { size, headline, children: /* @__PURE__ */ u$1(ResizeContainer, { size, children: /* @__PURE__ */ u$1(Headline, { heading: headline, children: /* @__PURE__ */ u$1(MutationsInner, { variant, sequenceType, views }) }) }) });
4934
+ const size2 = { height, width };
4935
+ return /* @__PURE__ */ u$1(ErrorBoundary, { size: size2, headline, children: /* @__PURE__ */ u$1(ResizeContainer, { size: size2, children: /* @__PURE__ */ u$1(Headline, { heading: headline, children: /* @__PURE__ */ u$1(MutationsInner, { variant, sequenceType, views }) }) }) });
4926
4936
  };
4927
4937
  const MutationsInner = ({ variant, sequenceType, views }) => {
4928
4938
  const lapis = P(LapisUrlContext);
@@ -5000,7 +5010,7 @@ const Toolbar$2 = ({
5000
5010
  proportionInterval,
5001
5011
  setProportionInterval
5002
5012
  }) => {
5003
- return /* @__PURE__ */ u$1("div", { class: "flex flex-row", children: [
5013
+ return /* @__PURE__ */ u$1(Fragment, { children: [
5004
5014
  /* @__PURE__ */ u$1(SegmentSelector, { displayedSegments, setDisplayedSegments }),
5005
5015
  activeTab === "Table" && /* @__PURE__ */ u$1(
5006
5016
  MutationTypeSelector,
@@ -5015,8 +5025,7 @@ const Toolbar$2 = ({
5015
5025
  {
5016
5026
  proportionInterval,
5017
5027
  setMinProportion: (min) => setProportionInterval((prev) => ({ ...prev, min })),
5018
- setMaxProportion: (max) => setProportionInterval((prev) => ({ ...prev, max })),
5019
- openDirection: "left"
5028
+ setMaxProportion: (max) => setProportionInterval((prev) => ({ ...prev, max }))
5020
5029
  }
5021
5030
  ),
5022
5031
  /* @__PURE__ */ u$1(
@@ -5041,7 +5050,7 @@ const Toolbar$2 = ({
5041
5050
  filename: "insertions.csv"
5042
5051
  }
5043
5052
  ),
5044
- /* @__PURE__ */ u$1(Info, { children: "Info for mutations" })
5053
+ /* @__PURE__ */ u$1(Info, { height: "100px", children: "Info for mutations" })
5045
5054
  ] });
5046
5055
  };
5047
5056
  var __defProp$7 = Object.defineProperty;
@@ -6652,8 +6661,8 @@ const PrevalenceOverTime = ({
6652
6661
  headline = "Prevalence over time",
6653
6662
  lapisDateField
6654
6663
  }) => {
6655
- const size = { height, width };
6656
- return /* @__PURE__ */ u$1(ErrorBoundary, { size, headline, children: /* @__PURE__ */ u$1(ResizeContainer, { size, children: /* @__PURE__ */ u$1(Headline, { heading: headline, children: /* @__PURE__ */ u$1(
6664
+ const size2 = { height, width };
6665
+ return /* @__PURE__ */ u$1(ErrorBoundary, { size: size2, headline, children: /* @__PURE__ */ u$1(ResizeContainer, { size: size2, children: /* @__PURE__ */ u$1(Headline, { heading: headline, children: /* @__PURE__ */ u$1(
6657
6666
  PrevalenceOverTimeInner,
6658
6667
  {
6659
6668
  numerator,
@@ -6773,7 +6782,7 @@ const Toolbar$1 = ({
6773
6782
  data,
6774
6783
  granularity
6775
6784
  }) => {
6776
- return /* @__PURE__ */ u$1("div", { class: "flex", children: [
6785
+ return /* @__PURE__ */ u$1(Fragment, { children: [
6777
6786
  activeTab !== "Table" && /* @__PURE__ */ u$1(ScalingSelector, { yAxisScaleType, setYAxisScaleType }),
6778
6787
  (activeTab === "Bar" || activeTab === "Line") && /* @__PURE__ */ u$1(
6779
6788
  ConfidenceIntervalSelector,
@@ -6795,7 +6804,7 @@ const Toolbar$1 = ({
6795
6804
  ] });
6796
6805
  };
6797
6806
  const PrevalenceOverTimeInfo = () => {
6798
- return /* @__PURE__ */ u$1(Info, { size: { width: "600px", height: "30vh" }, children: [
6807
+ return /* @__PURE__ */ u$1(Info, { height: "100px", children: [
6799
6808
  /* @__PURE__ */ u$1(InfoHeadline1, { children: "Prevalence over time" }),
6800
6809
  /* @__PURE__ */ u$1(InfoParagraph, { children: "Prevalence over time info." })
6801
6810
  ] });
@@ -7073,8 +7082,8 @@ const RelativeGrowthAdvantage = ({
7073
7082
  headline = "Relative growth advantage",
7074
7083
  lapisDateField
7075
7084
  }) => {
7076
- const size = { height, width };
7077
- return /* @__PURE__ */ u$1(ErrorBoundary, { size, headline, children: /* @__PURE__ */ u$1(ResizeContainer, { size, children: /* @__PURE__ */ u$1(Headline, { heading: headline, children: /* @__PURE__ */ u$1(
7085
+ const size2 = { height, width };
7086
+ return /* @__PURE__ */ u$1(ErrorBoundary, { size: size2, headline, children: /* @__PURE__ */ u$1(ResizeContainer, { size: size2, children: /* @__PURE__ */ u$1(Headline, { heading: headline, children: /* @__PURE__ */ u$1(
7078
7087
  RelativeGrowthAdvantageInner,
7079
7088
  {
7080
7089
  views,
@@ -7160,13 +7169,13 @@ const RelativeGrowthAdvantageToolbar = ({
7160
7169
  setYAxisScaleType,
7161
7170
  generationTime
7162
7171
  }) => {
7163
- return /* @__PURE__ */ u$1("div", { class: "flex", children: [
7172
+ return /* @__PURE__ */ u$1(Fragment, { children: [
7164
7173
  /* @__PURE__ */ u$1(ScalingSelector, { yAxisScaleType, setYAxisScaleType }),
7165
7174
  /* @__PURE__ */ u$1(RelativeGrowthAdvantageInfo, { generationTime })
7166
7175
  ] });
7167
7176
  };
7168
7177
  const RelativeGrowthAdvantageInfo = ({ generationTime }) => {
7169
- return /* @__PURE__ */ u$1(Info, { size: { width: "600px", height: "30vh" }, children: [
7178
+ return /* @__PURE__ */ u$1(Info, { children: [
7170
7179
  /* @__PURE__ */ u$1(InfoHeadline1, { children: "Relative growth advantage" }),
7171
7180
  /* @__PURE__ */ u$1(InfoParagraph, { children: [
7172
7181
  "If variants spread pre-dominantly by local transmission across demographic groups, this estimate reflects the relative viral intrinsic growth advantage of the focal variant in the selected country and time frame. We report the relative growth advantage per ",
@@ -7291,8 +7300,8 @@ const Aggregate = ({
7291
7300
  filter,
7292
7301
  fields
7293
7302
  }) => {
7294
- const size = { height, width };
7295
- return /* @__PURE__ */ u$1(ErrorBoundary, { size, headline, children: /* @__PURE__ */ u$1(ResizeContainer, { size, children: /* @__PURE__ */ u$1(Headline, { heading: headline, children: /* @__PURE__ */ u$1(AggregateInner, { fields, filter, views }) }) }) });
7303
+ const size2 = { height, width };
7304
+ return /* @__PURE__ */ u$1(ErrorBoundary, { size: size2, headline, children: /* @__PURE__ */ u$1(ResizeContainer, { size: size2, children: /* @__PURE__ */ u$1(Headline, { heading: headline, children: /* @__PURE__ */ u$1(AggregateInner, { fields, filter, views }) }) }) });
7296
7305
  };
7297
7306
  const AggregateInner = ({ fields, views, filter }) => {
7298
7307
  const lapis = P(LapisUrlContext);
@@ -7326,7 +7335,7 @@ const AggregatedDataTabs = ({ data, views, fields }) => {
7326
7335
  const Toolbar = ({ data }) => {
7327
7336
  return /* @__PURE__ */ u$1("div", { class: "flex flex-row", children: [
7328
7337
  /* @__PURE__ */ u$1(CsvDownloadButton, { className: "mx-1 btn btn-xs", getData: () => data, filename: "aggregate.csv" }),
7329
- /* @__PURE__ */ u$1(Info, { children: "Info for aggregate" })
7338
+ /* @__PURE__ */ u$1(Info, { height: "100px", children: "Info for aggregate" })
7330
7339
  ] });
7331
7340
  };
7332
7341
  var __defProp$4 = Object.defineProperty;
@@ -7385,13 +7394,6 @@ __decorateClass$4([
7385
7394
  AggregateComponent = __decorateClass$4([
7386
7395
  t$2("gs-aggregate")
7387
7396
  ], AggregateComponent);
7388
- const toYYYYMMDD = (date) => {
7389
- if (!date) {
7390
- return void 0;
7391
- }
7392
- const options2 = { year: "numeric", month: "2-digit", day: "2-digit" };
7393
- return date.toLocaleDateString("en-CA", options2);
7394
- };
7395
7397
  const PRESET_VALUE_CUSTOM = "custom";
7396
7398
  const PRESET_VALUE_ALL_TIMES = "allTimes";
7397
7399
  const PRESET_VALUE_LAST_2_WEEKS = "last2Weeks";
@@ -7408,21 +7410,121 @@ const presets = {
7408
7410
  [PRESET_VALUE_LAST_3_MONTHS]: { label: "Last 3 months" },
7409
7411
  [PRESET_VALUE_LAST_6_MONTHS]: { label: "Last 6 months" }
7410
7412
  };
7413
+ const getSelectableOptions = (customSelectOptions) => {
7414
+ const presetOptions = Object.entries(presets).map(([key, value]) => {
7415
+ return { label: value.label, value: key };
7416
+ });
7417
+ const customOptions = customSelectOptions.map((customSelectOption) => {
7418
+ return { label: customSelectOption.label, value: customSelectOption.label };
7419
+ });
7420
+ return [...presetOptions, ...customOptions];
7421
+ };
7422
+ const getDatesForSelectorValue = (selectorValue, customSelectOptions, earliestDate) => {
7423
+ const today = /* @__PURE__ */ new Date();
7424
+ const customSelectOption = customSelectOptions.find((option) => option.label === selectorValue);
7425
+ if (customSelectOption) {
7426
+ return { dateFrom: new Date(customSelectOption.dateFrom), dateTo: new Date(customSelectOption.dateTo) };
7427
+ }
7428
+ switch (selectorValue) {
7429
+ case PRESET_VALUE_LAST_2_WEEKS: {
7430
+ const twoWeeksAgo = new Date(today);
7431
+ twoWeeksAgo.setDate(today.getDate() - 14);
7432
+ return { dateFrom: twoWeeksAgo, dateTo: today };
7433
+ }
7434
+ case PRESET_VALUE_LAST_MONTH: {
7435
+ const lastMonth = new Date(today);
7436
+ lastMonth.setMonth(today.getMonth() - 1);
7437
+ return { dateFrom: lastMonth, dateTo: today };
7438
+ }
7439
+ case PRESET_VALUE_LAST_2_MONTHS: {
7440
+ const twoMonthsAgo = new Date(today);
7441
+ twoMonthsAgo.setMonth(today.getMonth() - 2);
7442
+ return { dateFrom: twoMonthsAgo, dateTo: today };
7443
+ }
7444
+ case PRESET_VALUE_LAST_3_MONTHS: {
7445
+ const threeMonthsAgo = new Date(today);
7446
+ threeMonthsAgo.setMonth(today.getMonth() - 3);
7447
+ return { dateFrom: threeMonthsAgo, dateTo: today };
7448
+ }
7449
+ case PRESET_VALUE_LAST_6_MONTHS: {
7450
+ const sixMonthsAgo = new Date(today);
7451
+ sixMonthsAgo.setMonth(today.getMonth() - 6);
7452
+ return { dateFrom: sixMonthsAgo, dateTo: today };
7453
+ }
7454
+ case PRESET_VALUE_ALL_TIMES: {
7455
+ return { dateFrom: new Date(earliestDate), dateTo: today };
7456
+ }
7457
+ default:
7458
+ return { dateFrom: today, dateTo: today };
7459
+ }
7460
+ };
7461
+ function computeInitialValues(initialValue, initialDateFrom, initialDateTo, earliestDate, customSelectOptions) {
7462
+ if (isUndefinedOrEmpty(initialDateFrom) && isUndefinedOrEmpty(initialDateTo)) {
7463
+ const selectableOptions = getSelectableOptions(customSelectOptions);
7464
+ const initialSelectedDateRange = initialValue !== void 0 && selectableOptions.some((option) => option.value === initialValue) ? initialValue : PRESET_VALUE_LAST_6_MONTHS;
7465
+ const { dateFrom, dateTo } = getDatesForSelectorValue(
7466
+ initialSelectedDateRange,
7467
+ customSelectOptions,
7468
+ earliestDate
7469
+ );
7470
+ return {
7471
+ initialSelectedDateRange,
7472
+ initialSelectedDateFrom: dateFrom,
7473
+ initialSelectedDateTo: dateTo
7474
+ };
7475
+ }
7476
+ const initialSelectedDateFrom = isUndefinedOrEmpty(initialDateFrom) ? new Date(earliestDate) : new Date(initialDateFrom);
7477
+ let initialSelectedDateTo = isUndefinedOrEmpty(initialDateTo) ? /* @__PURE__ */ new Date() : new Date(initialDateTo);
7478
+ if (isNaN(initialSelectedDateFrom.getTime())) {
7479
+ throw new UserFacingError(
7480
+ "Invalid initialDateFrom",
7481
+ `Invalid initialDateFrom "${initialDateFrom}", It must be of the format YYYY-MM-DD`
7482
+ );
7483
+ }
7484
+ if (isNaN(initialSelectedDateTo.getTime())) {
7485
+ throw new UserFacingError(
7486
+ "Invalid initialDateTo",
7487
+ `Invalid initialDateTo "${initialDateTo}", It must be of the format YYYY-MM-DD`
7488
+ );
7489
+ }
7490
+ if (initialSelectedDateFrom > initialSelectedDateTo) {
7491
+ initialSelectedDateTo = initialSelectedDateFrom;
7492
+ }
7493
+ return {
7494
+ initialSelectedDateRange: PRESET_VALUE_CUSTOM,
7495
+ initialSelectedDateFrom,
7496
+ initialSelectedDateTo
7497
+ };
7498
+ }
7499
+ function isUndefinedOrEmpty(value) {
7500
+ return value === void 0 || value === "";
7501
+ }
7502
+ const toYYYYMMDD = (date) => {
7503
+ if (!date) {
7504
+ return void 0;
7505
+ }
7506
+ const options2 = { year: "numeric", month: "2-digit", day: "2-digit" };
7507
+ return date.toLocaleDateString("en-CA", options2);
7508
+ };
7411
7509
  const DateRangeSelector = ({
7412
7510
  customSelectOptions,
7413
7511
  earliestDate = "1900-01-01",
7414
7512
  initialValue,
7415
7513
  width,
7416
- dateColumn
7514
+ dateColumn,
7515
+ initialDateFrom,
7516
+ initialDateTo
7417
7517
  }) => {
7418
- const size = { width, height: "3rem" };
7419
- return /* @__PURE__ */ u$1(ErrorBoundary, { size, children: /* @__PURE__ */ u$1(ResizeContainer, { size, children: /* @__PURE__ */ u$1(
7518
+ const size2 = { width, height: "3rem" };
7519
+ return /* @__PURE__ */ u$1(ErrorBoundary, { size: size2, children: /* @__PURE__ */ u$1(ResizeContainer, { size: size2, children: /* @__PURE__ */ u$1(
7420
7520
  DateRangeSelectorInner,
7421
7521
  {
7422
7522
  customSelectOptions,
7423
7523
  earliestDate,
7424
7524
  initialValue,
7425
- dateColumn
7525
+ dateColumn,
7526
+ initialDateFrom,
7527
+ initialDateTo
7426
7528
  }
7427
7529
  ) }) });
7428
7530
  };
@@ -7430,20 +7532,28 @@ const DateRangeSelectorInner = ({
7430
7532
  customSelectOptions,
7431
7533
  earliestDate = "1900-01-01",
7432
7534
  initialValue,
7433
- dateColumn
7535
+ dateColumn,
7536
+ initialDateFrom,
7537
+ initialDateTo
7434
7538
  }) => {
7539
+ const initialValues = computeInitialValues(
7540
+ initialValue,
7541
+ initialDateFrom,
7542
+ initialDateTo,
7543
+ earliestDate,
7544
+ customSelectOptions
7545
+ );
7435
7546
  const fromDatePickerRef = F(null);
7436
7547
  const toDatePickerRef = F(null);
7437
7548
  const divRef = F(null);
7438
7549
  const [dateFromPicker, setDateFromPicker] = p(null);
7439
7550
  const [dateToPicker, setDateToPicker] = p(null);
7440
- const selectableOptions = getSelectableOptions(customSelectOptions);
7441
7551
  const [selectedDateRange, setSelectedDateRange] = p(
7442
- initialValue !== void 0 && selectableOptions.some((option) => option.value === initialValue) ? initialValue : PRESET_VALUE_LAST_6_MONTHS
7552
+ initialValues.initialSelectedDateRange
7443
7553
  );
7444
7554
  const [selectedDates, setSelectedDates] = p({
7445
- dateFrom: getDatesForSelectorValue("last6Months", customSelectOptions, earliestDate).dateFrom,
7446
- dateTo: getDatesForSelectorValue("last6Months", customSelectOptions, earliestDate).dateTo
7555
+ dateFrom: initialValues.initialSelectedDateFrom,
7556
+ dateTo: initialValues.initialSelectedDateTo
7447
7557
  });
7448
7558
  _(() => {
7449
7559
  const commonConfig = {
@@ -7518,13 +7628,13 @@ const DateRangeSelectorInner = ({
7518
7628
  })
7519
7629
  );
7520
7630
  };
7521
- return /* @__PURE__ */ u$1("div", { class: "join w-full", ref: divRef, children: [
7631
+ return /* @__PURE__ */ u$1("div", { class: "flex flex-wrap", ref: divRef, children: [
7522
7632
  /* @__PURE__ */ u$1(
7523
7633
  Select,
7524
7634
  {
7525
- items: selectableOptions,
7635
+ items: getSelectableOptions(customSelectOptions),
7526
7636
  selected: selectedDateRange,
7527
- selectStyle: "select-bordered rounded-none join-item grow",
7637
+ selectStyle: "select-bordered rounded-none flex-grow w-40",
7528
7638
  onChange: (event) => {
7529
7639
  event.preventDefault();
7530
7640
  const select = event.target;
@@ -7533,78 +7643,34 @@ const DateRangeSelectorInner = ({
7533
7643
  }
7534
7644
  }
7535
7645
  ),
7536
- /* @__PURE__ */ u$1(
7537
- "input",
7538
- {
7539
- class: "input input-bordered rounded-none join-item grow",
7540
- type: "text",
7541
- placeholder: "Date from",
7542
- ref: fromDatePickerRef,
7543
- onChange: onChangeDateFrom,
7544
- onBlur: onChangeDateFrom
7545
- }
7546
- ),
7547
- /* @__PURE__ */ u$1(
7548
- "input",
7549
- {
7550
- class: "input input-bordered rounded-none join-item grow",
7551
- type: "text",
7552
- placeholder: "Date to",
7553
- ref: toDatePickerRef,
7554
- onChange: onChangeDateTo,
7555
- onBlur: onChangeDateTo
7556
- }
7557
- )
7646
+ /* @__PURE__ */ u$1("div", { className: "flex flex-wrap flex-grow", children: [
7647
+ /* @__PURE__ */ u$1(
7648
+ "input",
7649
+ {
7650
+ class: "input input-bordered rounded-none flex-grow min-w-40",
7651
+ type: "text",
7652
+ size: 10,
7653
+ placeholder: "Date from",
7654
+ ref: fromDatePickerRef,
7655
+ onChange: onChangeDateFrom,
7656
+ onBlur: onChangeDateFrom
7657
+ }
7658
+ ),
7659
+ /* @__PURE__ */ u$1(
7660
+ "input",
7661
+ {
7662
+ class: "input input-bordered rounded-none flex-grow min-w-40",
7663
+ type: "text",
7664
+ size: 10,
7665
+ placeholder: "Date to",
7666
+ ref: toDatePickerRef,
7667
+ onChange: onChangeDateTo,
7668
+ onBlur: onChangeDateTo
7669
+ }
7670
+ )
7671
+ ] })
7558
7672
  ] });
7559
7673
  };
7560
- const getSelectableOptions = (customSelectOptions) => {
7561
- const presetOptions = Object.entries(presets).map(([key, value]) => {
7562
- return { label: value.label, value: key };
7563
- });
7564
- const customOptions = customSelectOptions.map((customSelectOption) => {
7565
- return { label: customSelectOption.label, value: customSelectOption.label };
7566
- });
7567
- return [...presetOptions, ...customOptions];
7568
- };
7569
- const getDatesForSelectorValue = (selectorValue, customSelectOptions, earliestDate) => {
7570
- const today = /* @__PURE__ */ new Date();
7571
- const customSelectOption = customSelectOptions.find((option) => option.label === selectorValue);
7572
- if (customSelectOption) {
7573
- return { dateFrom: new Date(customSelectOption.dateFrom), dateTo: new Date(customSelectOption.dateTo) };
7574
- }
7575
- switch (selectorValue) {
7576
- case PRESET_VALUE_LAST_2_WEEKS: {
7577
- const twoWeeksAgo = new Date(today);
7578
- twoWeeksAgo.setDate(today.getDate() - 14);
7579
- return { dateFrom: twoWeeksAgo, dateTo: today };
7580
- }
7581
- case PRESET_VALUE_LAST_MONTH: {
7582
- const lastMonth = new Date(today);
7583
- lastMonth.setMonth(today.getMonth() - 1);
7584
- return { dateFrom: lastMonth, dateTo: today };
7585
- }
7586
- case PRESET_VALUE_LAST_2_MONTHS: {
7587
- const twoMonthsAgo = new Date(today);
7588
- twoMonthsAgo.setMonth(today.getMonth() - 2);
7589
- return { dateFrom: twoMonthsAgo, dateTo: today };
7590
- }
7591
- case PRESET_VALUE_LAST_3_MONTHS: {
7592
- const threeMonthsAgo = new Date(today);
7593
- threeMonthsAgo.setMonth(today.getMonth() - 3);
7594
- return { dateFrom: threeMonthsAgo, dateTo: today };
7595
- }
7596
- case PRESET_VALUE_LAST_6_MONTHS: {
7597
- const sixMonthsAgo = new Date(today);
7598
- sixMonthsAgo.setMonth(today.getMonth() - 6);
7599
- return { dateFrom: sixMonthsAgo, dateTo: today };
7600
- }
7601
- case PRESET_VALUE_ALL_TIMES: {
7602
- return { dateFrom: new Date(earliestDate), dateTo: today };
7603
- }
7604
- default:
7605
- return { dateFrom: today, dateTo: today };
7606
- }
7607
- };
7608
7674
  var __defProp$3 = Object.defineProperty;
7609
7675
  var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
7610
7676
  var __decorateClass$3 = (decorators, target, key, kind) => {
@@ -7622,6 +7688,8 @@ let DateRangeSelectorComponent = class extends PreactLitAdapter {
7622
7688
  this.customSelectOptions = [];
7623
7689
  this.earliestDate = "1900-01-01";
7624
7690
  this.initialValue = "last6Months";
7691
+ this.initialDateFrom = "";
7692
+ this.initialDateTo = "";
7625
7693
  this.width = "100%";
7626
7694
  this.dateColumn = "date";
7627
7695
  }
@@ -7632,6 +7700,8 @@ let DateRangeSelectorComponent = class extends PreactLitAdapter {
7632
7700
  customSelectOptions: this.customSelectOptions,
7633
7701
  earliestDate: this.earliestDate,
7634
7702
  initialValue: this.initialValue,
7703
+ initialDateFrom: this.initialDateFrom,
7704
+ initialDateTo: this.initialDateTo,
7635
7705
  dateColumn: this.dateColumn,
7636
7706
  width: this.width
7637
7707
  }
@@ -7647,6 +7717,12 @@ __decorateClass$3([
7647
7717
  __decorateClass$3([
7648
7718
  n2()
7649
7719
  ], DateRangeSelectorComponent.prototype, "initialValue", 2);
7720
+ __decorateClass$3([
7721
+ n2()
7722
+ ], DateRangeSelectorComponent.prototype, "initialDateFrom", 2);
7723
+ __decorateClass$3([
7724
+ n2()
7725
+ ], DateRangeSelectorComponent.prototype, "initialDateTo", 2);
7650
7726
  __decorateClass$3([
7651
7727
  n2({ type: String })
7652
7728
  ], DateRangeSelectorComponent.prototype, "width", 2);
@@ -7700,8 +7776,8 @@ function compareLocationEntries(fields) {
7700
7776
  };
7701
7777
  }
7702
7778
  const LocationFilter = ({ width, initialValue, fields }) => {
7703
- const size = { width, height: "3rem" };
7704
- return /* @__PURE__ */ u$1(ErrorBoundary, { size, children: /* @__PURE__ */ u$1(ResizeContainer, { size, children: /* @__PURE__ */ u$1(LocationFilterInner, { initialValue, fields }) }) });
7779
+ const size2 = { width, height: "3rem" };
7780
+ return /* @__PURE__ */ u$1(ErrorBoundary, { size: size2, children: /* @__PURE__ */ u$1(ResizeContainer, { size: size2, children: /* @__PURE__ */ u$1(LocationFilterInner, { initialValue, fields }) }) });
7705
7781
  };
7706
7782
  const LocationFilterInner = ({ initialValue, fields }) => {
7707
7783
  const lapis = P(LapisUrlContext);
@@ -7755,7 +7831,7 @@ const LocationFilterInner = ({ initialValue, fields }) => {
7755
7831
  };
7756
7832
  const parseLocation = (location, fields) => {
7757
7833
  const fieldValues = location.split("/").map((part) => part.trim());
7758
- return fieldValues.reduce((acc, fieldValue, i2) => ({ ...acc, [fields[i2]]: fieldValue }), {});
7834
+ return fields.reduce((acc, field, i2) => ({ ...acc, [field]: fieldValues[i2] }), {});
7759
7835
  };
7760
7836
  const hasMatchingEntry = (data, eventDetail) => {
7761
7837
  if (data === null) {
@@ -7804,8 +7880,8 @@ async function fetchAutocompleteList(lapis, field, signal) {
7804
7880
  return data.map((item) => item[field]);
7805
7881
  }
7806
7882
  const TextInput = ({ width, lapisField, placeholderText, initialValue }) => {
7807
- const size = { width, height: "3rem" };
7808
- return /* @__PURE__ */ u$1(ErrorBoundary, { size, children: /* @__PURE__ */ u$1(ResizeContainer, { size, children: /* @__PURE__ */ u$1(TextInputInner, { lapisField, placeholderText, initialValue }) }) });
7883
+ const size2 = { width, height: "3rem" };
7884
+ return /* @__PURE__ */ u$1(ErrorBoundary, { size: size2, children: /* @__PURE__ */ u$1(ResizeContainer, { size: size2, children: /* @__PURE__ */ u$1(TextInputInner, { lapisField, placeholderText, initialValue }) }) });
7809
7885
  };
7810
7886
  const TextInputInner = ({
7811
7887
  lapisField,
@@ -7981,9 +8057,8 @@ const DeleteIcon = () => {
7981
8057
  }
7982
8058
  );
7983
8059
  };
7984
- const MutationFilter = ({ initialValue, width, height }) => {
7985
- const size = { height, width };
7986
- return /* @__PURE__ */ u$1(ErrorBoundary, { size, children: /* @__PURE__ */ u$1(ResizeContainer, { size, children: /* @__PURE__ */ u$1(MutationFilterInner, { initialValue }) }) });
8060
+ const MutationFilter = ({ initialValue, width }) => {
8061
+ return /* @__PURE__ */ u$1(ErrorBoundary, { size: { height: "3.375rem", width }, children: /* @__PURE__ */ u$1("div", { style: width, children: /* @__PURE__ */ u$1(MutationFilterInner, { initialValue }) }) });
7987
8062
  };
7988
8063
  const MutationFilterInner = ({ initialValue }) => {
7989
8064
  const referenceGenome = P(ReferenceGenomeContext);
@@ -7995,6 +8070,9 @@ const MutationFilterInner = ({ initialValue }) => {
7995
8070
  const formRef = F(null);
7996
8071
  const handleSubmit = (event) => {
7997
8072
  event.preventDefault();
8073
+ if (inputValue === "") {
8074
+ return;
8075
+ }
7998
8076
  const parsedMutation = parseAndValidateMutation(inputValue, referenceGenome);
7999
8077
  if (parsedMutation === null) {
8000
8078
  setIsError(true);
@@ -8034,8 +8112,9 @@ const MutationFilterInner = ({ initialValue }) => {
8034
8112
  setInputValue(event.target.value);
8035
8113
  setIsError(false);
8036
8114
  };
8037
- return /* @__PURE__ */ u$1("div", { class: `h-full w-full rounded-lg border border-gray-300 bg-white p-2 overflow-scroll`, children: [
8038
- /* @__PURE__ */ u$1("div", { class: "flex justify-between", children: [
8115
+ return /* @__PURE__ */ u$1("form", { className: "w-full border boder-gray-300 rounded-md relative", onSubmit: handleSubmit, ref: formRef, children: [
8116
+ /* @__PURE__ */ u$1("div", { className: "absolute -top-3 -right-3", children: /* @__PURE__ */ u$1(Info, { height: "100px", children: "Info for mutation filter" }) }),
8117
+ /* @__PURE__ */ u$1("div", { className: "w-full flex p-2 flex-wrap items-center", children: [
8039
8118
  /* @__PURE__ */ u$1(
8040
8119
  SelectedMutationDisplay,
8041
8120
  {
@@ -8044,22 +8123,27 @@ const MutationFilterInner = ({ initialValue }) => {
8044
8123
  fireChangeEvent
8045
8124
  }
8046
8125
  ),
8047
- /* @__PURE__ */ u$1(Info, { children: "Info for mutation filter" })
8048
- ] }),
8049
- /* @__PURE__ */ u$1("form", { className: "mt-2 w-full", onSubmit: handleSubmit, ref: formRef, children: /* @__PURE__ */ u$1("label", { className: `input flex items-center gap-2 ${isError ? "input-error" : "input-bordered"}`, children: [
8050
8126
  /* @__PURE__ */ u$1(
8051
- "input",
8127
+ "div",
8052
8128
  {
8053
- className: "grow min-w-0",
8054
- type: "text",
8055
- value: inputValue,
8056
- onInput: handleInputChange,
8057
- placeholder: getPlaceholder(referenceGenome),
8058
- onBlur: handleOnBlur
8129
+ className: `w-full flex border ${isError ? "border-red-500" : "border-gray-300"} border-solid m-2 text-sm focus-within:border-gray-400 `,
8130
+ children: [
8131
+ /* @__PURE__ */ u$1(
8132
+ "input",
8133
+ {
8134
+ className: "grow flex-1 p-1 border-none focus:outline-none focus:ring-0",
8135
+ type: "text",
8136
+ value: inputValue,
8137
+ onInput: handleInputChange,
8138
+ placeholder: getPlaceholder(referenceGenome),
8139
+ onBlur: handleOnBlur
8140
+ }
8141
+ ),
8142
+ /* @__PURE__ */ u$1("button", { type: "submit", className: "btn btn-xs m-1", children: "+" })
8143
+ ]
8059
8144
  }
8060
- ),
8061
- /* @__PURE__ */ u$1("button", { className: "btn btn-sm", children: "+" })
8062
- ] }) })
8145
+ )
8146
+ ] })
8063
8147
  ] });
8064
8148
  };
8065
8149
  function getInitialState(initialValue, referenceGenome) {
@@ -8105,35 +8189,39 @@ const SelectedMutationDisplay = ({ selectedFilters, setSelectedFilters, fireChan
8105
8189
  setSelectedFilters(newSelectedValues);
8106
8190
  fireChangeEvent(newSelectedValues);
8107
8191
  };
8108
- return /* @__PURE__ */ u$1("ul", { class: "flex flex-wrap", children: [
8109
- selectedFilters.nucleotideMutations.map((mutation) => /* @__PURE__ */ u$1("li", { children: /* @__PURE__ */ u$1(
8192
+ return /* @__PURE__ */ u$1(Fragment, { children: [
8193
+ selectedFilters.nucleotideMutations.map((mutation) => /* @__PURE__ */ u$1(
8110
8194
  SelectedNucleotideMutation,
8111
8195
  {
8112
8196
  mutation,
8113
8197
  onDelete: (mutation2) => onSelectedRemoved(mutation2, "nucleotideMutations")
8114
- }
8115
- ) }, mutation.toString())),
8116
- selectedFilters.aminoAcidMutations.map((mutation) => /* @__PURE__ */ u$1("li", { children: /* @__PURE__ */ u$1(
8198
+ },
8199
+ mutation.toString()
8200
+ )),
8201
+ selectedFilters.aminoAcidMutations.map((mutation) => /* @__PURE__ */ u$1(
8117
8202
  SelectedAminoAcidMutation,
8118
8203
  {
8119
8204
  mutation,
8120
8205
  onDelete: (mutation2) => onSelectedRemoved(mutation2, "aminoAcidMutations")
8121
- }
8122
- ) }, mutation.toString())),
8123
- selectedFilters.nucleotideInsertions.map((insertion) => /* @__PURE__ */ u$1("li", { children: /* @__PURE__ */ u$1(
8206
+ },
8207
+ mutation.toString()
8208
+ )),
8209
+ selectedFilters.nucleotideInsertions.map((insertion) => /* @__PURE__ */ u$1(
8124
8210
  SelectedNucleotideInsertion,
8125
8211
  {
8126
8212
  insertion,
8127
8213
  onDelete: (insertion2) => onSelectedRemoved(insertion2, "nucleotideInsertions")
8128
- }
8129
- ) }, insertion.toString())),
8130
- selectedFilters.aminoAcidInsertions.map((insertion) => /* @__PURE__ */ u$1("li", { children: /* @__PURE__ */ u$1(
8214
+ },
8215
+ insertion.toString()
8216
+ )),
8217
+ selectedFilters.aminoAcidInsertions.map((insertion) => /* @__PURE__ */ u$1(
8131
8218
  SelectedAminoAcidInsertion,
8132
8219
  {
8133
8220
  insertion,
8134
8221
  onDelete: (insertion2) => onSelectedRemoved(insertion2, "aminoAcidInsertions")
8135
- }
8136
- ) }, insertion.toString()))
8222
+ },
8223
+ insertion.toString()
8224
+ ))
8137
8225
  ] });
8138
8226
  };
8139
8227
  const SelectedAminoAcidInsertion = ({ insertion, onDelete }) => {
@@ -8195,12 +8283,12 @@ const SelectedFilter = ({
8195
8283
  textColor
8196
8284
  }) => {
8197
8285
  return /* @__PURE__ */ u$1(
8198
- "div",
8286
+ "span",
8199
8287
  {
8200
- class: "flex items-center flex-nowrap gap-1 rounded me-1 px-2.5 py-0.5 font-medium text-xs mb-1 min-w-max",
8288
+ class: "inline-block mx-1 px-2 py-1 font-medium text-xs rounded-full",
8201
8289
  style: { backgroundColor, color: textColor },
8202
8290
  children: [
8203
- /* @__PURE__ */ u$1("div", { className: "whitespace-nowrap min-w-max", children: mutation.toString() }),
8291
+ mutation.toString(),
8204
8292
  /* @__PURE__ */ u$1("button", { type: "button", onClick: () => onDelete(mutation), children: /* @__PURE__ */ u$1(DeleteIcon, {}) })
8205
8293
  ]
8206
8294
  }
@@ -8230,10 +8318,9 @@ let MutationFilterComponent = class extends PreactLitAdapter {
8230
8318
  super(...arguments);
8231
8319
  this.initialValue = void 0;
8232
8320
  this.width = "100%";
8233
- this.height = "6.5rem";
8234
8321
  }
8235
8322
  render() {
8236
- return /* @__PURE__ */ u$1(ReferenceGenomesAwaiter, { children: /* @__PURE__ */ u$1(MutationFilter, { initialValue: this.initialValue, width: this.width, height: this.height }) });
8323
+ return /* @__PURE__ */ u$1(ReferenceGenomesAwaiter, { children: /* @__PURE__ */ u$1(MutationFilter, { initialValue: this.initialValue, width: this.width }) });
8237
8324
  }
8238
8325
  };
8239
8326
  __decorateClass([
@@ -8242,9 +8329,6 @@ __decorateClass([
8242
8329
  __decorateClass([
8243
8330
  n2({ type: String })
8244
8331
  ], MutationFilterComponent.prototype, "width", 2);
8245
- __decorateClass([
8246
- n2({ type: String })
8247
- ], MutationFilterComponent.prototype, "height", 2);
8248
8332
  MutationFilterComponent = __decorateClass([
8249
8333
  t$2("gs-mutation-filter")
8250
8334
  ], MutationFilterComponent);