@blocklet/discuss-kit-ux 1.6.224 → 1.6.225

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.
@@ -10,7 +10,7 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
10
10
  import { useTheme, ThemeProvider, styled } from "@mui/material/styles";
11
11
  import { create as create$1, styled as styled$1 } from "@arcblock/ux/lib/Theme";
12
12
  import { useEffect, useRef, lazy, useState, createElement, useContext, useMemo, isValidElement, Suspense, createContext, Fragment as Fragment$1, forwardRef, useCallback } from "react";
13
- import Box from "@mui/material/Box";
13
+ import { Box, useTheme as useTheme$1, useMediaQuery, Tooltip as Tooltip$1, Chip as Chip$1, alpha, ClickAwayListener, Dialog as Dialog$1, DialogTitle, DialogContent, DialogActions, DialogContentText, Button as Button$1, Divider, Skeleton, IconButton as IconButton$2, InputBase, tooltipClasses as tooltipClasses$1, Autocomplete, Typography as Typography$1, TextField as TextField$1, InputAdornment, Backdrop, Badge as Badge$1, Paper, ToggleButtonGroup, ToggleButton } from "@mui/material";
14
14
  import isNil from "lodash/isNil";
15
15
  import { useEditorConfig, EditorConfigProvider } from "@blocklet/editor/lib/config";
16
16
  import { $getRoot, $createParagraphNode, $createTextNode, KEY_ENTER_COMMAND, COMMAND_PRIORITY_LOW, $getSelection } from "lexical";
@@ -20,6 +20,7 @@ import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext
20
20
  import { ImageNode } from "@blocklet/editor/lib/main/nodes/ImageNode";
21
21
  import { VideoNode } from "@blocklet/editor/lib/ext/VideoPlugin/VideoNode";
22
22
  import { useSize, useInViewport, useSetState, useRequest, useGetState, useReactive } from "ahooks";
23
+ import Box$1 from "@mui/material/Box";
23
24
  import LoadingButton from "@mui/lab/LoadingButton";
24
25
  import { Send, Save, ChatBubbleOutlineOutlined, MoreVert, NavigateNext, DeleteOutlineOutlined, ContentCopy, ArrowUpward, ArrowDownward, ArrowBackIos, Add, BorderColorOutlined } from "@mui/icons-material";
25
26
  import { LocaleContext, useLocaleContext } from "@arcblock/ux/lib/Locale/context";
@@ -45,7 +46,6 @@ import BrokenImageIcon from "@mui/icons-material/BrokenImage";
45
46
  import { Icon } from "@iconify/react";
46
47
  import Empty$3 from "@arcblock/ux/lib/Empty";
47
48
  import { SessionContext } from "@arcblock/did-connect/lib/Session";
48
- import { useTheme as useTheme$1, useMediaQuery, Box as Box$1, Tooltip as Tooltip$1, Chip as Chip$1, alpha, ClickAwayListener, Dialog as Dialog$1, DialogTitle, DialogContent, DialogActions, DialogContentText, Button as Button$1, Divider, Skeleton, IconButton as IconButton$2, InputBase, tooltipClasses as tooltipClasses$1, Autocomplete, Typography as Typography$1, TextField as TextField$1, InputAdornment, Backdrop, Badge as Badge$1, Paper, ToggleButtonGroup, ToggleButton } from "@mui/material";
49
49
  import NotificationsActiveOutlinedIcon from "@mui/icons-material/NotificationsActiveOutlined";
50
50
  import CheckboxPlugin from "@blocklet/editor/lib/ext/CheckboxPlugin";
51
51
  import DIDAddress from "@arcblock/did-connect/lib/Address";
@@ -691,7 +691,7 @@ function CommentInput({
691
691
  render: ({ submit, content, loading, error, inSmallView }) => {
692
692
  return /* @__PURE__ */ jsxs(Fragment, { children: [
693
693
  /* @__PURE__ */ jsxs(
694
- Box,
694
+ Box$1,
695
695
  {
696
696
  position: "absolute",
697
697
  bottom: 0,
@@ -703,7 +703,7 @@ function CommentInput({
703
703
  alignItems: "end",
704
704
  children: [
705
705
  /* @__PURE__ */ jsxs(
706
- Box,
706
+ Box$1,
707
707
  {
708
708
  component: "a",
709
709
  href: "https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax",
@@ -718,12 +718,12 @@ function CommentInput({
718
718
  "&:hover": { color: "text.secondary" }
719
719
  },
720
720
  children: [
721
- /* @__PURE__ */ jsx(Box, { component: "span", sx: { display: "inline-flex", alignItems: "center", mr: 0.5, lineHeight: 1 }, children: /* @__PURE__ */ jsx(mdiLanguageMarkdown, { style: { fontSize: 16 } }) }),
721
+ /* @__PURE__ */ jsx(Box$1, { component: "span", sx: { display: "inline-flex", alignItems: "center", mr: 0.5, lineHeight: 1 }, children: /* @__PURE__ */ jsx(mdiLanguageMarkdown, { style: { fontSize: 16 } }) }),
722
722
  /* @__PURE__ */ jsx("span", { children: "Styling with Markdown is supported" })
723
723
  ]
724
724
  }
725
725
  ),
726
- /* @__PURE__ */ jsx(Box, { display: "flex", gap: 1, alignItems: "center", children: /* @__PURE__ */ jsx(
726
+ /* @__PURE__ */ jsx(Box$1, { display: "flex", gap: 1, alignItems: "center", children: /* @__PURE__ */ jsx(
727
727
  LoadingButton,
728
728
  {
729
729
  disabled: isBoolean(disabledSend) ? disabledSend : !content,
@@ -735,9 +735,9 @@ function CommentInput({
735
735
  title: "⌘ Enter",
736
736
  onClick: submit,
737
737
  className: "editor-submit-button",
738
- children: /* @__PURE__ */ jsxs(Box, { component: "span", sx: { display: "inline-flex", gap: 0.5, fontSize: 12 }, children: [
738
+ children: /* @__PURE__ */ jsxs(Box$1, { component: "span", sx: { display: "inline-flex", gap: 0.5, fontSize: 12 }, children: [
739
739
  /* @__PURE__ */ jsx("span", { children: sendText || t("sendComment") }),
740
- /* @__PURE__ */ jsx(Box, { component: "span", sx: { display: inSmallView ? "none" : "inline" }, children: "(⌘ Enter)" })
740
+ /* @__PURE__ */ jsx(Box$1, { component: "span", sx: { display: inSmallView ? "none" : "inline" }, children: "(⌘ Enter)" })
741
741
  ] })
742
742
  }
743
743
  ) })
@@ -759,7 +759,7 @@ function PostEdit({ content, send, onCancel, onSuccess, ...rest }) {
759
759
  send,
760
760
  onSuccess,
761
761
  ...rest,
762
- render: ({ submit, content: content2, loading }) => /* @__PURE__ */ jsxs(Box, { display: "flex", justifyContent: "end", alignItems: "end", gap: 1, mt: 1, children: [
762
+ render: ({ submit, content: content2, loading }) => /* @__PURE__ */ jsxs(Box$1, { display: "flex", justifyContent: "end", alignItems: "end", gap: 1, mt: 1, children: [
763
763
  /* @__PURE__ */ jsx(Button, { variant: "text", color: "primary", onClick: onCancel, children: t("cancel") }),
764
764
  /* @__PURE__ */ jsx(
765
765
  LoadingButton,
@@ -779,7 +779,7 @@ function PostEdit({ content, send, onCancel, onSuccess, ...rest }) {
779
779
  }
780
780
  );
781
781
  }
782
- const Root$4 = styled$1(Box)`
782
+ const Root$4 = styled$1(Box$1)`
783
783
  height: 100%;
784
784
  .be-editable {
785
785
  overflow-y: auto;
@@ -839,7 +839,7 @@ const Root$3 = styled$1(AvatarGroup)`
839
839
  `;
840
840
  function Avatars({ users, variant = "circle", ...restProps }) {
841
841
  return /* @__PURE__ */ jsx(Root$3, { sx: { ".avatars-item + .avatars-item .image": { boxShadow: "0 0 0 2px #fff" } }, max: 999, ...restProps, children: users.map((user, index) => {
842
- return /* @__PURE__ */ jsx(Box, { className: "avatars-item", sx: { position: "relative", zIndex: index + 1 }, children: /* @__PURE__ */ jsx(Avatar, { did: user.did, src: user.avatar, size: 24, shape: "circle", variant }) }, index);
842
+ return /* @__PURE__ */ jsx(Box$1, { className: "avatars-item", sx: { position: "relative", zIndex: index + 1 }, children: /* @__PURE__ */ jsx(Avatar, { did: user.did, src: user.avatar, size: 24, shape: "circle", variant }) }, index);
843
843
  }) });
844
844
  }
845
845
  function RelativeTime({ value, ...rest }) {
@@ -849,7 +849,7 @@ function RelativeTime({ value, ...rest }) {
849
849
  function EmptyStatus() {
850
850
  const { t } = useLocaleContext();
851
851
  return /* @__PURE__ */ jsx(
852
- Box,
852
+ Box$1,
853
853
  {
854
854
  sx: { height: "50vh", width: "100%" },
855
855
  display: "flex",
@@ -1112,7 +1112,7 @@ function ProfileCard({ user, click, ...rest }) {
1112
1112
  chatUrl = "";
1113
1113
  }
1114
1114
  return /* @__PURE__ */ jsxs(
1115
- Box,
1115
+ Box$1,
1116
1116
  {
1117
1117
  sx: {
1118
1118
  boxSizing: "border-box",
@@ -1127,11 +1127,11 @@ function ProfileCard({ user, click, ...rest }) {
1127
1127
  },
1128
1128
  ...rest,
1129
1129
  children: [
1130
- /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", alignItems: "center", gap: 2, cursor: "pointer" }, onClick: click, children: [
1130
+ /* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", alignItems: "center", gap: 2, cursor: "pointer" }, onClick: click, children: [
1131
1131
  /* @__PURE__ */ jsx(Avatar, { did: user.did, src: user.avatar, size: 44, shape: "circle", variant: "circle" }),
1132
- /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", flexDirection: "column", flex: 1 }, children: [
1132
+ /* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", flexDirection: "column", flex: 1 }, children: [
1133
1133
  /* @__PURE__ */ jsxs(
1134
- Box,
1134
+ Box$1,
1135
1135
  {
1136
1136
  component: "span",
1137
1137
  sx: {
@@ -1141,9 +1141,9 @@ function ProfileCard({ user, click, ...rest }) {
1141
1141
  lineHeight: 1.3
1142
1142
  },
1143
1143
  children: [
1144
- /* @__PURE__ */ jsx(Box, { sx: { fontWeight: "bold" }, children: user.fullName }),
1144
+ /* @__PURE__ */ jsx(Box$1, { sx: { fontWeight: "bold" }, children: user.fullName }),
1145
1145
  user.role && /* @__PURE__ */ jsx(
1146
- Box,
1146
+ Box$1,
1147
1147
  {
1148
1148
  sx: {
1149
1149
  px: 1.25,
@@ -1173,8 +1173,8 @@ function ProfileCard({ user, click, ...rest }) {
1173
1173
  ] })
1174
1174
  ] }),
1175
1175
  chatUrl && ((_b2 = session == null ? void 0 : session.user) == null ? void 0 : _b2.did) && ((_c = session == null ? void 0 : session.user) == null ? void 0 : _c.did) !== user.did && /* @__PURE__ */ jsxs(Fragment, { children: [
1176
- /* @__PURE__ */ jsx(Box, { sx: { my: 2, borderTop: "1px solid #eee" } }),
1177
- /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(
1176
+ /* @__PURE__ */ jsx(Box$1, { sx: { my: 2, borderTop: "1px solid #eee" } }),
1177
+ /* @__PURE__ */ jsx(Box$1, { children: /* @__PURE__ */ jsx(
1178
1178
  Button,
1179
1179
  {
1180
1180
  component: Link,
@@ -1240,7 +1240,7 @@ function AuthorInfo({
1240
1240
  return createdAt;
1241
1241
  }
1242
1242
  createdAt = typeof createdAt === "string" ? new Date(createdAt) : createdAt;
1243
- return /* @__PURE__ */ jsx(Box, { component: RelativeTime, sx: { color: "text.secondary" }, value: createdAt });
1243
+ return /* @__PURE__ */ jsx(Box$1, { component: RelativeTime, sx: { color: "text.secondary" }, value: createdAt });
1244
1244
  };
1245
1245
  const click = (e) => {
1246
1246
  var _a2, _b2;
@@ -1263,7 +1263,7 @@ function AuthorInfo({
1263
1263
  onClose: () => setOpen(false),
1264
1264
  onOpen: () => setOpen(true),
1265
1265
  title: /* @__PURE__ */ jsx(ProfileCard, { user, click }),
1266
- children: /* @__PURE__ */ jsx(Box, { sx: { display: "flex", cursor: "pointer", width: avatarSize, height: avatarSize }, onClick: click, children: /* @__PURE__ */ jsx(
1266
+ children: /* @__PURE__ */ jsx(Box$1, { sx: { display: "flex", cursor: "pointer", width: avatarSize, height: avatarSize }, onClick: click, children: /* @__PURE__ */ jsx(
1267
1267
  Avatar,
1268
1268
  {
1269
1269
  did: user == null ? void 0 : user.did,
@@ -1280,7 +1280,7 @@ function AuthorInfo({
1280
1280
  }
1281
1281
  );
1282
1282
  }
1283
- return /* @__PURE__ */ jsx(Box, { sx: { display: "flex", cursor: "pointer", width: avatarSize, height: avatarSize }, onClick: click, children: /* @__PURE__ */ jsx(
1283
+ return /* @__PURE__ */ jsx(Box$1, { sx: { display: "flex", cursor: "pointer", width: avatarSize, height: avatarSize }, onClick: click, children: /* @__PURE__ */ jsx(
1284
1284
  Avatar,
1285
1285
  {
1286
1286
  did: user == null ? void 0 : user.did,
@@ -1298,17 +1298,17 @@ function AuthorInfo({
1298
1298
  const BadgeRender = /* @__PURE__ */ jsx(
1299
1299
  Badge,
1300
1300
  {
1301
- startComponent: !downMd && /* @__PURE__ */ jsx(Box, { component: "span", display: "inline-block", mx: 0.5 }, "dot"),
1301
+ startComponent: !downMd && /* @__PURE__ */ jsx(Box$1, { component: "span", display: "inline-block", mx: 0.5 }, "dot"),
1302
1302
  passports: (user == null ? void 0 : user.passports) || [],
1303
1303
  pointInfo: (user == null ? void 0 : user.pointInfo) || {},
1304
1304
  did: user == null ? void 0 : user.did
1305
1305
  }
1306
1306
  );
1307
- return /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", alignItems: "center", gap: 1, fontSize }, ...rest, children: [
1307
+ return /* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", alignItems: "center", gap: 1, fontSize }, ...rest, children: [
1308
1308
  renderAvatar(),
1309
- /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", flexDirection: "column", flex: 1 }, children: [
1309
+ /* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", flexDirection: "column", flex: 1 }, children: [
1310
1310
  /* @__PURE__ */ jsxs(
1311
- Box,
1311
+ Box$1,
1312
1312
  {
1313
1313
  className: "author-info-title",
1314
1314
  sx: { display: "flex", alignItems: "center", minHeight: 20, flexWrap: "wrap", lineHeight: 1.5 },
@@ -1316,7 +1316,7 @@ function AuthorInfo({
1316
1316
  children: [
1317
1317
  /* @__PURE__ */ jsx("span", { className: "user-fullname", children: newTitle || (user == null ? void 0 : user.fullName) }),
1318
1318
  createdAt && /* @__PURE__ */ jsxs(Fragment, { children: [
1319
- /* @__PURE__ */ jsx(Box, { component: "span", display: "inline-block", mx: 0.5, children: "·" }),
1319
+ /* @__PURE__ */ jsx(Box$1, { component: "span", display: "inline-block", mx: 0.5, children: "·" }),
1320
1320
  renderTime()
1321
1321
  ] }),
1322
1322
  append,
@@ -1324,9 +1324,9 @@ function AuthorInfo({
1324
1324
  ]
1325
1325
  }
1326
1326
  ),
1327
- showBadge && downMd && /* @__PURE__ */ jsx(Box, { mt: 0.5, children: BadgeRender }),
1327
+ showBadge && downMd && /* @__PURE__ */ jsx(Box$1, { mt: 0.5, children: BadgeRender }),
1328
1328
  showDID && !(responsive && downMd) && /* @__PURE__ */ jsx(DID, { style: { lineHeight: 1.5, minHeight: 20, maxWidth: 250 }, size: 14, did: user == null ? void 0 : user.did }),
1329
- children && /* @__PURE__ */ jsx(Box, { children })
1329
+ children && /* @__PURE__ */ jsx(Box$1, { children })
1330
1330
  ] })
1331
1331
  ] });
1332
1332
  }
@@ -1340,9 +1340,9 @@ function SystemUser({
1340
1340
  }) {
1341
1341
  const sm = size === "sm";
1342
1342
  const iconSize = sm ? 40 : 48;
1343
- return /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", alignItems: "center", gap: 1, fontSize: 14 }, ...rest, children: [
1343
+ return /* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", alignItems: "center", gap: 1, fontSize: 14 }, ...rest, children: [
1344
1344
  showIcon && /* @__PURE__ */ jsx(
1345
- Box,
1345
+ Box$1,
1346
1346
  {
1347
1347
  sx: {
1348
1348
  display: "flex",
@@ -1358,8 +1358,8 @@ function SystemUser({
1358
1358
  children: icon || /* @__PURE__ */ jsx(NotificationsActiveOutlinedIcon, { sx: { fontSize: size === "sm" ? 16 : 18 } })
1359
1359
  }
1360
1360
  ),
1361
- /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", flexDirection: "column" }, children: [
1362
- /* @__PURE__ */ jsx(Box, { sx: { display: "flex", alignItems: "center" }, lineHeight: 1.5, children: /* @__PURE__ */ jsx(Box, { component: "span", sx: { fontWeight: "bold" }, children: name }) }),
1361
+ /* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", flexDirection: "column" }, children: [
1362
+ /* @__PURE__ */ jsx(Box$1, { sx: { display: "flex", alignItems: "center" }, lineHeight: 1.5, children: /* @__PURE__ */ jsx(Box$1, { component: "span", sx: { fontWeight: "bold" }, children: name }) }),
1363
1363
  showDidAddress && /* @__PURE__ */ jsx(
1364
1364
  DID,
1365
1365
  {
@@ -1400,7 +1400,7 @@ function ViewMore({ children, ...rest }) {
1400
1400
  /* @__PURE__ */ jsx("div", { className: "markdown-viewer-shadow" })
1401
1401
  ] }),
1402
1402
  _collapsed && /* @__PURE__ */ jsx(
1403
- Box,
1403
+ Box$1,
1404
1404
  {
1405
1405
  onClick: () => setCollapsed(false),
1406
1406
  sx: {
@@ -1438,7 +1438,7 @@ function PostContent({
1438
1438
  }) {
1439
1439
  if (editing && onSubmit) {
1440
1440
  return /* @__PURE__ */ jsx(
1441
- Box,
1441
+ Box$1,
1442
1442
  {
1443
1443
  sx: {
1444
1444
  ".be-editable": { maxHeight: 768, overflow: "auto", minHeight: `${Math.max(innerHeight, 200)}px !important` }
@@ -1507,7 +1507,7 @@ function Menu({ items = [], ...rest }) {
1507
1507
  if (!(items == null ? void 0 : items.length)) {
1508
1508
  return null;
1509
1509
  }
1510
- return /* @__PURE__ */ jsxs(Box, { display: "inline-block", ...rest, onClick: handleOnClick, children: [
1510
+ return /* @__PURE__ */ jsxs(Box$1, { display: "inline-block", ...rest, onClick: handleOnClick, children: [
1511
1511
  /* @__PURE__ */ jsx(
1512
1512
  IconButton$1,
1513
1513
  {
@@ -1539,7 +1539,7 @@ function Menu({ items = [], ...rest }) {
1539
1539
  ] });
1540
1540
  }
1541
1541
  Menu.Item = MuiMenuItem;
1542
- const Root$1 = styled(Box)`
1542
+ const Root$1 = styled(Box$1)`
1543
1543
  .post-highlighted {
1544
1544
  animation: highlighted-post-fade 3s;
1545
1545
  animation-timing-function: ease-out;
@@ -1606,7 +1606,7 @@ function PostComponent({
1606
1606
  menuItems = customMenu ? customMenu(menuItems, postContext) : menuItems;
1607
1607
  const renderTime = () => {
1608
1608
  if (allowCopyLink) {
1609
- return /* @__PURE__ */ jsx(Box, { component: "a", href: `#${post.id}`, sx: { color: "text.secondary", textDecoration: "none" }, children: /* @__PURE__ */ jsx(RelativeTime, { value: post.createdAt }) });
1609
+ return /* @__PURE__ */ jsx(Box$1, { component: "a", href: `#${post.id}`, sx: { color: "text.secondary", textDecoration: "none" }, children: /* @__PURE__ */ jsx(RelativeTime, { value: post.createdAt }) });
1610
1610
  }
1611
1611
  return /* @__PURE__ */ jsx(RelativeTime, { value: post.createdAt });
1612
1612
  };
@@ -1623,14 +1623,14 @@ function PostComponent({
1623
1623
  }
1624
1624
  }, [inViewport]);
1625
1625
  return /* @__PURE__ */ jsxs(Root$1, { sx: { position: "relative", mt: 2, py: 1 }, ...rest, children: [
1626
- /* @__PURE__ */ jsxs(Box, { id: post.id, flex: "1", className: clsx({ "post-highlighted": isTargetPost && hasEnteredViewport }), children: [
1627
- /* @__PURE__ */ jsxs(Box, { display: "flex", justifyContent: "space-between", alignItems: "start", children: [
1626
+ /* @__PURE__ */ jsxs(Box$1, { id: post.id, flex: "1", className: clsx({ "post-highlighted": isTargetPost && hasEnteredViewport }), children: [
1627
+ /* @__PURE__ */ jsxs(Box$1, { display: "flex", justifyContent: "space-between", alignItems: "start", children: [
1628
1628
  /* @__PURE__ */ jsx(AuthorInfo, { size: "sm", user: post.author, createdAt: renderTime(), showProfileCard }),
1629
1629
  /* @__PURE__ */ jsx(Menu, { items: menuItems, style: { position: "absolute", right: 0, top: 0 } })
1630
1630
  ] }),
1631
- /* @__PURE__ */ jsxs(Box, { sx: { ml: 5.5 }, children: [
1631
+ /* @__PURE__ */ jsxs(Box$1, { sx: { ml: 5.5 }, children: [
1632
1632
  post.replyTo && /* @__PURE__ */ jsxs(
1633
- Box,
1633
+ Box$1,
1634
1634
  {
1635
1635
  mt: 0.5,
1636
1636
  fontSize: 13,
@@ -1639,7 +1639,7 @@ function PostComponent({
1639
1639
  sx: { ".did-address-text": { color: "primary.light" } },
1640
1640
  children: [
1641
1641
  "@",
1642
- /* @__PURE__ */ jsx(Box, { component: "span", mr: 1, children: post.replyTo.fullName }),
1642
+ /* @__PURE__ */ jsx(Box$1, { component: "span", mr: 1, children: post.replyTo.fullName }),
1643
1643
  "(",
1644
1644
  /* @__PURE__ */ jsx(DIDAddress, { copyable: false, responsive: false, compact: true, inline: true, children: post.replyTo.did }),
1645
1645
  ")"
@@ -1647,7 +1647,7 @@ function PostComponent({
1647
1647
  }
1648
1648
  ),
1649
1649
  showSystemTip && /* @__PURE__ */ jsx(
1650
- Box,
1650
+ Box$1,
1651
1651
  {
1652
1652
  display: "inline-block",
1653
1653
  px: 2.5,
@@ -1660,7 +1660,7 @@ function PostComponent({
1660
1660
  children: systemTip
1661
1661
  }
1662
1662
  ),
1663
- !showSystemTip && !post.deletedAt && /* @__PURE__ */ jsx(Box, { my: 1, children: /* @__PURE__ */ jsx(
1663
+ !showSystemTip && !post.deletedAt && /* @__PURE__ */ jsx(Box$1, { my: 1, children: /* @__PURE__ */ jsx(
1664
1664
  PostContent,
1665
1665
  {
1666
1666
  content: post.content,
@@ -1671,7 +1671,7 @@ function PostComponent({
1671
1671
  },
1672
1672
  editing ? "comment-content" : post.synced || 0
1673
1673
  ) }),
1674
- render && /* @__PURE__ */ jsx(Box, { sx: { mt: 1 }, children: render(postContext) })
1674
+ render && /* @__PURE__ */ jsx(Box$1, { sx: { mt: 1 }, children: render(postContext) })
1675
1675
  ] })
1676
1676
  ] }),
1677
1677
  renderExtraContent && renderExtraContent(postContext)
@@ -1689,9 +1689,9 @@ const StyledDialog = styled(Dialog)`
1689
1689
  `;
1690
1690
  function RaterList({ open, onClose, value, ratings }) {
1691
1691
  const raters = ratings.filter((item) => item.value === value).map((item) => item.rater);
1692
- return /* @__PURE__ */ jsx(StyledDialog, { open, onClose, PaperProps: { style: { width: 400, minHeight: 200 } }, children: /* @__PURE__ */ jsx(Box, { children: raters.map((rater) => {
1692
+ return /* @__PURE__ */ jsx(StyledDialog, { open, onClose, PaperProps: { style: { width: 400, minHeight: 200 } }, children: /* @__PURE__ */ jsx(Box$1, { children: raters.map((rater) => {
1693
1693
  return /* @__PURE__ */ jsxs(
1694
- Box,
1694
+ Box$1,
1695
1695
  {
1696
1696
  sx: {
1697
1697
  display: "flex",
@@ -1703,7 +1703,7 @@ function RaterList({ open, onClose, value, ratings }) {
1703
1703
  },
1704
1704
  children: [
1705
1705
  /* @__PURE__ */ jsx(Avatar, { did: rater.did, src: rater.avatar, variant: "circle", size: 26 }),
1706
- /* @__PURE__ */ jsx(Box, { children: rater.fullName })
1706
+ /* @__PURE__ */ jsx(Box$1, { children: rater.fullName })
1707
1707
  ]
1708
1708
  },
1709
1709
  rater.did
@@ -1829,7 +1829,7 @@ function BinaryThumb({ data = [], variant = "default", size = "sm", ...rest }) {
1829
1829
  }
1830
1830
  );
1831
1831
  }
1832
- const Root = styled$1(Box)`
1832
+ const Root = styled$1(Box$1)`
1833
1833
  display: flex;
1834
1834
  .reaction-item {
1835
1835
  display: flex;
@@ -2002,8 +2002,8 @@ function GithubReaction({
2002
2002
  }
2003
2003
  };
2004
2004
  const mergedSx = [{}, ...Array.isArray(sx) ? sx : [sx]];
2005
- return /* @__PURE__ */ jsxs(Box$1, { ...rest, sx: mergedSx, children: [
2006
- Object.keys(countPerValue).length > 0 && /* @__PURE__ */ jsx(Box$1, { sx: { display: "flex", gap: 1, mb: 1 }, children: options.map((option) => {
2005
+ return /* @__PURE__ */ jsxs(Box, { ...rest, sx: mergedSx, children: [
2006
+ Object.keys(countPerValue).length > 0 && /* @__PURE__ */ jsx(Box, { sx: { display: "flex", gap: 1, mb: 1 }, children: options.map((option) => {
2007
2007
  if (!countPerValue[option.value]) {
2008
2008
  return null;
2009
2009
  }
@@ -2011,8 +2011,8 @@ function GithubReaction({
2011
2011
  return /* @__PURE__ */ jsx(Tooltip$1, { title: raters == null ? void 0 : raters.join(", "), children: /* @__PURE__ */ jsx(
2012
2012
  Chip$1,
2013
2013
  {
2014
- label: /* @__PURE__ */ jsxs(Box$1, { component: "span", sx: { display: "inline-flex", alignItems: "center", gap: 1 }, children: [
2015
- /* @__PURE__ */ jsx(Box$1, { component: "span", sx: emojiFont, children: option.label }),
2014
+ label: /* @__PURE__ */ jsxs(Box, { component: "span", sx: { display: "inline-flex", alignItems: "center", gap: 1 }, children: [
2015
+ /* @__PURE__ */ jsx(Box, { component: "span", sx: emojiFont, children: option.label }),
2016
2016
  /* @__PURE__ */ jsx("span", { children: countPerValue[option.value] })
2017
2017
  ] }),
2018
2018
  color: "default",
@@ -2036,9 +2036,9 @@ function GithubReaction({
2036
2036
  }
2037
2037
  ) }, option.value);
2038
2038
  }) }),
2039
- /* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", alignItems: "center", gap: 2 }, children: [
2039
+ /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", alignItems: "center", gap: 2 }, children: [
2040
2040
  /* @__PURE__ */ jsxs(
2041
- Box$1,
2041
+ Box,
2042
2042
  {
2043
2043
  sx: {
2044
2044
  position: "relative",
@@ -2058,10 +2058,10 @@ function GithubReaction({
2058
2058
  },
2059
2059
  onClick: handleOpen,
2060
2060
  children: [
2061
- /* @__PURE__ */ jsx(Box$1, { className: "github-reaction-text", component: tablerMoodPlus, sx: { fontSize: 18 } }),
2062
- /* @__PURE__ */ jsx(Box$1, { className: "github-reaction-text", component: "span", sx: { fontSize: 13 }, children: "Sticker" }),
2061
+ /* @__PURE__ */ jsx(Box, { className: "github-reaction-text", component: tablerMoodPlus, sx: { fontSize: 18 } }),
2062
+ /* @__PURE__ */ jsx(Box, { className: "github-reaction-text", component: "span", sx: { fontSize: 13 }, children: "Sticker" }),
2063
2063
  open && /* @__PURE__ */ jsx(ClickAwayListener, { onClickAway: () => setOpen(false), children: /* @__PURE__ */ jsx(
2064
- Box$1,
2064
+ Box,
2065
2065
  {
2066
2066
  sx: {
2067
2067
  display: "flex",
@@ -2079,7 +2079,7 @@ function GithubReaction({
2079
2079
  children: options.map((option) => {
2080
2080
  const selected = selectedValuesMap[option.value];
2081
2081
  return /* @__PURE__ */ jsx(
2082
- Box$1,
2082
+ Box,
2083
2083
  {
2084
2084
  onClick: () => toggleRate(option.value),
2085
2085
  sx: {
@@ -2096,7 +2096,7 @@ function GithubReaction({
2096
2096
  bgcolor: (theme) => alpha(theme.palette.primary.light, 0.2)
2097
2097
  }
2098
2098
  },
2099
- children: /* @__PURE__ */ jsx(Box$1, { sx: emojiFont, children: option.label })
2099
+ children: /* @__PURE__ */ jsx(Box, { sx: emojiFont, children: option.label })
2100
2100
  },
2101
2101
  option.value
2102
2102
  );
@@ -2236,14 +2236,14 @@ function Comment({
2236
2236
  const customMenu = (items, { isAuthor, isAdmin, post }) => {
2237
2237
  if ((isAdmin || isAuthor) && !post.deletedAt) {
2238
2238
  items.push(
2239
- /* @__PURE__ */ jsx(MuiMenuItem, { onClick: () => handleDelete(post), children: /* @__PURE__ */ jsx(Box, { component: "span", sx: { color: "error.main" }, children: t("delete") }) }, "delete")
2239
+ /* @__PURE__ */ jsx(MuiMenuItem, { onClick: () => handleDelete(post), children: /* @__PURE__ */ jsx(Box$1, { component: "span", sx: { color: "error.main" }, children: t("delete") }) }, "delete")
2240
2240
  );
2241
2241
  }
2242
2242
  return items;
2243
2243
  };
2244
2244
  const render = ({ post, interactive }) => {
2245
2245
  return /* @__PURE__ */ jsxs(Fragment, { children: [
2246
- /* @__PURE__ */ jsx(Box, { sx: { display: "flex", alignItems: "center", gap: 3, mt: 1 }, children: /* @__PURE__ */ jsx(
2246
+ /* @__PURE__ */ jsx(Box$1, { sx: { display: "flex", alignItems: "center", gap: 3, mt: 1 }, children: /* @__PURE__ */ jsx(
2247
2247
  GithubReaction,
2248
2248
  {
2249
2249
  data: (post == null ? void 0 : post.rating) || [],
@@ -2251,7 +2251,7 @@ function Comment({
2251
2251
  onUnrate: () => onUnrate(post),
2252
2252
  interactive,
2253
2253
  append: (!!(session == null ? void 0 : session.user) || preferences.displayReplyButtonForAnonymousUsers) && interactive && /* @__PURE__ */ jsxs(
2254
- Box,
2254
+ Box$1,
2255
2255
  {
2256
2256
  onClick: () => protectLogin(session, () => setInputVisible(!inputVisible)),
2257
2257
  sx: {
@@ -2264,14 +2264,14 @@ function Comment({
2264
2264
  "&:hover": { cursor: "pointer" }
2265
2265
  },
2266
2266
  children: [
2267
- /* @__PURE__ */ jsx(Box, { component: tablerMessageCircle, sx: { fontSize: 18, color: "text.secondary" } }),
2268
- /* @__PURE__ */ jsx(Box, { component: "span", children: "Reply" })
2267
+ /* @__PURE__ */ jsx(Box$1, { component: tablerMessageCircle, sx: { fontSize: 18, color: "text.secondary" } }),
2268
+ /* @__PURE__ */ jsx(Box$1, { component: "span", children: "Reply" })
2269
2269
  ]
2270
2270
  }
2271
2271
  )
2272
2272
  }
2273
2273
  ) }),
2274
- inputVisible && /* @__PURE__ */ jsx(Box, { my: 2, children: /* @__PURE__ */ jsx(
2274
+ inputVisible && /* @__PURE__ */ jsx(Box$1, { my: 2, children: /* @__PURE__ */ jsx(
2275
2275
  CommentInput,
2276
2276
  {
2277
2277
  send: (content) => onReply(post, content),
@@ -2285,7 +2285,7 @@ function Comment({
2285
2285
  const renderExtraContent = ({ post }) => {
2286
2286
  var _a2;
2287
2287
  if ((_a2 = post.replies) == null ? void 0 : _a2.length) {
2288
- return /* @__PURE__ */ jsxs(Box, { sx: { mt: 1, ml: 5.5 }, children: [
2288
+ return /* @__PURE__ */ jsxs(Box$1, { sx: { mt: 1, ml: 5.5 }, children: [
2289
2289
  post.replies.map((item) => {
2290
2290
  return /* @__PURE__ */ jsx(
2291
2291
  Comment,
@@ -2617,7 +2617,7 @@ function CommentsProvider({
2617
2617
  );
2618
2618
  return /* @__PURE__ */ jsx(CommentsContext.Provider, { value, children });
2619
2619
  }
2620
- const LoadMoreButtonWrapper = styled(Box)`
2620
+ const LoadMoreButtonWrapper = styled(Box$1)`
2621
2621
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 11L8 5L16 11' stroke='%23e1e4e8' stroke-linecap='square' stroke-width='1.5' /%3E%3C/svg%3E");
2622
2622
  background-repeat: repeat-x;
2623
2623
  background-position: center;
@@ -2647,7 +2647,7 @@ function SegmentalList({ ...rest }) {
2647
2647
  comments.map((comment) => {
2648
2648
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
2649
2649
  comment.id === (highlighted == null ? void 0 : highlighted.id) && hiddenComments > 0 && nextCursor && /* @__PURE__ */ jsx(LoadMoreButtonWrapper, { sx: { my: 4, textAlign: "center" }, children: /* @__PURE__ */ jsxs(
2650
- Box,
2650
+ Box$1,
2651
2651
  {
2652
2652
  sx: {
2653
2653
  display: "inline-flex",
@@ -2664,7 +2664,7 @@ function SegmentalList({ ...rest }) {
2664
2664
  },
2665
2665
  children: [
2666
2666
  /* @__PURE__ */ jsx(Button, { onClick: () => loadMore(nextCursor), variant: "text", color: "primary", sx: { fontSize: 13 }, children: t("loadMore") }),
2667
- /* @__PURE__ */ jsxs(Box, { sx: { fontSize: 12, color: "grey.500" }, children: [
2667
+ /* @__PURE__ */ jsxs(Box$1, { sx: { fontSize: 12, color: "grey.500" }, children: [
2668
2668
  hiddenComments,
2669
2669
  " Comments"
2670
2670
  ] })
@@ -2689,7 +2689,7 @@ function SegmentalList({ ...rest }) {
2689
2689
  )
2690
2690
  ] }, comment.id);
2691
2691
  }),
2692
- highlighted.nextCursor && /* @__PURE__ */ jsx(Box, { sx: { my: 2, textAlign: "center" }, children: /* @__PURE__ */ jsx(
2692
+ highlighted.nextCursor && /* @__PURE__ */ jsx(Box$1, { sx: { my: 2, textAlign: "center" }, children: /* @__PURE__ */ jsx(
2693
2693
  Button,
2694
2694
  {
2695
2695
  onClick: loadMoreForTailSection,
@@ -2738,7 +2738,7 @@ function CommentList(props) {
2738
2738
  },
2739
2739
  comment.id
2740
2740
  )),
2741
- nextCursor && /* @__PURE__ */ jsx(Box, { sx: { my: 2, textAlign: "center" }, children: /* @__PURE__ */ jsx(
2741
+ nextCursor && /* @__PURE__ */ jsx(Box$1, { sx: { my: 2, textAlign: "center" }, children: /* @__PURE__ */ jsx(
2742
2742
  Button,
2743
2743
  {
2744
2744
  className: "load-more",
@@ -2800,7 +2800,7 @@ function UploaderTrigger({ onChange, children }) {
2800
2800
  });
2801
2801
  }
2802
2802
  };
2803
- return /* @__PURE__ */ jsx(Box$1, { onClick: handleOpen, children });
2803
+ return /* @__PURE__ */ jsx(Box, { onClick: handleOpen, children });
2804
2804
  }
2805
2805
  function UploaderProvider({ children }) {
2806
2806
  const uploaderRef = useRef(null);
@@ -2851,7 +2851,7 @@ function CoverImage({
2851
2851
  const [loaded, setLoaded] = useState(false);
2852
2852
  const [errored, setErrored] = useState(false);
2853
2853
  return /* @__PURE__ */ jsxs(
2854
- Box$1,
2854
+ Box,
2855
2855
  {
2856
2856
  sx: [
2857
2857
  {
@@ -2883,7 +2883,7 @@ function CoverImage({
2883
2883
  }
2884
2884
  ),
2885
2885
  !!url && // add box because img can't add :after
2886
- /* @__PURE__ */ jsx(Box$1, { children: /* @__PURE__ */ jsx(
2886
+ /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(
2887
2887
  "img",
2888
2888
  {
2889
2889
  src: url ? composeImageUrl(url, width) : "",
@@ -2905,7 +2905,7 @@ function CoverImage({
2905
2905
  }
2906
2906
  ) }),
2907
2907
  (!url || errored) && /* @__PURE__ */ jsx(
2908
- Box$1,
2908
+ Box,
2909
2909
  {
2910
2910
  sx: {
2911
2911
  position: "absolute",
@@ -2922,7 +2922,7 @@ function CoverImage({
2922
2922
  );
2923
2923
  }
2924
2924
  function CoverImageUpload({ url, onChange, width, ...rest }) {
2925
- return /* @__PURE__ */ jsx(Box$1, { ...rest, children: /* @__PURE__ */ jsxs(
2925
+ return /* @__PURE__ */ jsx(Box, { ...rest, children: /* @__PURE__ */ jsxs(
2926
2926
  UploaderTrigger,
2927
2927
  {
2928
2928
  onChange: ({ response }) => {
@@ -2932,7 +2932,7 @@ function CoverImageUpload({ url, onChange, width, ...rest }) {
2932
2932
  },
2933
2933
  children: [
2934
2934
  /* @__PURE__ */ jsx(
2935
- Box$1,
2935
+ Box,
2936
2936
  {
2937
2937
  sx: {
2938
2938
  display: url ? "none" : "block",
@@ -2945,7 +2945,7 @@ function CoverImageUpload({ url, onChange, width, ...rest }) {
2945
2945
  cursor: "pointer"
2946
2946
  },
2947
2947
  children: /* @__PURE__ */ jsx(
2948
- Box$1,
2948
+ Box,
2949
2949
  {
2950
2950
  sx: {
2951
2951
  position: "absolute",
@@ -2960,7 +2960,7 @@ function CoverImageUpload({ url, onChange, width, ...rest }) {
2960
2960
  }
2961
2961
  ),
2962
2962
  /* @__PURE__ */ jsxs(
2963
- Box$1,
2963
+ Box,
2964
2964
  {
2965
2965
  sx: {
2966
2966
  display: url ? "block" : "none",
@@ -2970,7 +2970,7 @@ function CoverImageUpload({ url, onChange, width, ...rest }) {
2970
2970
  },
2971
2971
  children: [
2972
2972
  /* @__PURE__ */ jsx(CoverImage, { url, width }),
2973
- /* @__PURE__ */ jsx(Box$1, { sx: { position: "absolute", top: 8, right: 8, display: "none" }, className: "cover-image-delete", children: /* @__PURE__ */ jsx(
2973
+ /* @__PURE__ */ jsx(Box, { sx: { position: "absolute", top: 8, right: 8, display: "none" }, className: "cover-image-delete", children: /* @__PURE__ */ jsx(
2974
2974
  IconButton$2,
2975
2975
  {
2976
2976
  color: "inherit",
@@ -3056,18 +3056,18 @@ function BlogItem({
3056
3056
  const coverImgWidths = { xs: 84, md: 180, lg: 200 };
3057
3057
  const coverImgWidth = useResponsiveValue(coverImgWidths);
3058
3058
  if (loading) {
3059
- return /* @__PURE__ */ jsx(Box, { sx: { display: "block", color: "inherit", textDecoration: "none", "& + &": { mt: { xs: 2.5, md: 6 } } }, children: /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
3060
- /* @__PURE__ */ jsxs(Box, { sx: { flex: 1, pr: { xs: 2, md: 4 } }, children: [
3061
- hideAuthor === "1" || /* @__PURE__ */ jsxs(Box, { flex: 1, display: "flex", children: [
3059
+ return /* @__PURE__ */ jsx(Box$1, { sx: { display: "block", color: "inherit", textDecoration: "none", "& + &": { mt: { xs: 2.5, md: 6 } } }, children: /* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
3060
+ /* @__PURE__ */ jsxs(Box$1, { sx: { flex: 1, pr: { xs: 2, md: 4 } }, children: [
3061
+ hideAuthor === "1" || /* @__PURE__ */ jsxs(Box$1, { flex: 1, display: "flex", children: [
3062
3062
  /* @__PURE__ */ jsx(Skeleton$1, { variant: "circular", width: 40, height: 40 }),
3063
- /* @__PURE__ */ jsxs(Box, { flex: 1, ml: 1, children: [
3063
+ /* @__PURE__ */ jsxs(Box$1, { flex: 1, ml: 1, children: [
3064
3064
  /* @__PURE__ */ jsx(Skeleton$1, { height: 20, width: 40 }),
3065
3065
  /* @__PURE__ */ jsx(Skeleton$1, { height: 20, width: 100 })
3066
3066
  ] })
3067
3067
  ] }),
3068
3068
  /* @__PURE__ */ jsx(Skeleton$1, { height: 30 }),
3069
3069
  /* @__PURE__ */ jsx(
3070
- Box,
3070
+ Box$1,
3071
3071
  {
3072
3072
  sx: {
3073
3073
  display: { xs: "inline-block", md: "none" },
@@ -3080,21 +3080,21 @@ function BlogItem({
3080
3080
  }
3081
3081
  )
3082
3082
  ] }),
3083
- /* @__PURE__ */ jsx(Box, { sx: { flex: "0 0 auto", width: { xs: 84, md: 180, lg: 200 } }, children: /* @__PURE__ */ jsx(Skeleton$1, { height: 130 }) })
3083
+ /* @__PURE__ */ jsx(Box$1, { sx: { flex: "0 0 auto", width: { xs: 84, md: 180, lg: 200 } }, children: /* @__PURE__ */ jsx(Skeleton$1, { height: 130 }) })
3084
3084
  ] }) });
3085
3085
  }
3086
3086
  return /* @__PURE__ */ jsx(
3087
- Box,
3087
+ Box$1,
3088
3088
  {
3089
3089
  component: Link,
3090
3090
  target: itemLinkTarget,
3091
3091
  to: getBlogLink(item),
3092
3092
  sx: { display: "block", color: "inherit", textDecoration: "none", "& + &": { mt: { xs: 2.5, md: 6 } } },
3093
3093
  className: "blog-list-item",
3094
- children: /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
3095
- /* @__PURE__ */ jsxs(Box, { sx: { flex: 1, minWidth: 0, pr: { xs: 2, md: 4 } }, children: [
3094
+ children: /* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
3095
+ /* @__PURE__ */ jsxs(Box$1, { sx: { flex: 1, minWidth: 0, pr: { xs: 2, md: 4 } }, children: [
3096
3096
  typeof prepend === "function" ? prepend(item) : prepend,
3097
- hideAuthor === "1" || /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(AuthorInfo, { user: item.author, createdAt: downMd ? void 0 : item.publishTime, size: "sm", responsive: true }) }),
3097
+ hideAuthor === "1" || /* @__PURE__ */ jsx(Box$1, { children: /* @__PURE__ */ jsx(AuthorInfo, { user: item.author, createdAt: downMd ? void 0 : item.publishTime, size: "sm", responsive: true }) }),
3098
3098
  /* @__PURE__ */ jsx(Typography, { variant: "h4", component: "h3", sx: { ...lineClamp2, my: 0.5 }, className: "item-title", children: item.title }),
3099
3099
  item.excerpt && /* @__PURE__ */ jsxs(
3100
3100
  Typography,
@@ -3120,7 +3120,7 @@ function BlogItem({
3120
3120
  renderLabel: (node, element) => {
3121
3121
  const { id: id2 } = node.data;
3122
3122
  return /* @__PURE__ */ jsx(
3123
- Box,
3123
+ Box$1,
3124
3124
  {
3125
3125
  onClick: (e) => {
3126
3126
  e.preventDefault();
@@ -3135,7 +3135,7 @@ function BlogItem({
3135
3135
  }
3136
3136
  ),
3137
3137
  /* @__PURE__ */ jsx(
3138
- Box,
3138
+ Box$1,
3139
3139
  {
3140
3140
  sx: {
3141
3141
  display: { xs: "inline-block", md: "none" },
@@ -3148,7 +3148,7 @@ function BlogItem({
3148
3148
  }
3149
3149
  )
3150
3150
  ] }),
3151
- item.cover && /* @__PURE__ */ jsx(Box, { sx: { flex: "0 0 auto", width: coverImgWidths }, children: /* @__PURE__ */ jsx(CoverImage, { url: item.cover, aspectRatio: downMd ? 1 : 3 / 2, loading: "lazy", width: coverImgWidth * 2 }) })
3151
+ item.cover && /* @__PURE__ */ jsx(Box$1, { sx: { flex: "0 0 auto", width: coverImgWidths }, children: /* @__PURE__ */ jsx(CoverImage, { url: item.cover, aspectRatio: downMd ? 1 : 3 / 2, loading: "lazy", width: coverImgWidth * 2 }) })
3152
3152
  ] })
3153
3153
  },
3154
3154
  item.id
@@ -3192,13 +3192,13 @@ function BlogList({
3192
3192
  item.id
3193
3193
  ));
3194
3194
  }
3195
- return /* @__PURE__ */ jsx(Box, { ...rest, children: content });
3195
+ return /* @__PURE__ */ jsx(Box$1, { ...rest, children: content });
3196
3196
  }
3197
3197
  const BlogCard = forwardRef(
3198
3198
  ({ post, hideAuthor, linkTarget, compactLayout, loading = false }, ref) => {
3199
3199
  if (loading) {
3200
- return /* @__PURE__ */ jsx(Box, { sx: { display: "flex", justifyContent: "center", color: "inherit", textDecoration: "none" }, children: /* @__PURE__ */ jsxs(
3201
- Box,
3200
+ return /* @__PURE__ */ jsx(Box$1, { sx: { display: "flex", justifyContent: "center", color: "inherit", textDecoration: "none" }, children: /* @__PURE__ */ jsxs(
3201
+ Box$1,
3202
3202
  {
3203
3203
  sx: {
3204
3204
  display: "flex",
@@ -3210,15 +3210,15 @@ const BlogCard = forwardRef(
3210
3210
  boxShadow: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)"
3211
3211
  },
3212
3212
  children: [
3213
- /* @__PURE__ */ jsx(Box, { sx: { flex: "0 0 auto" }, children: /* @__PURE__ */ jsx(Skeleton$1, { variant: "rectangular", width: "100%", height: 180 }) }),
3214
- /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", flexDirection: "column", flex: 1, mt: 1, p: 2, pt: 0 }, children: [
3213
+ /* @__PURE__ */ jsx(Box$1, { sx: { flex: "0 0 auto" }, children: /* @__PURE__ */ jsx(Skeleton$1, { variant: "rectangular", width: "100%", height: 180 }) }),
3214
+ /* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", flexDirection: "column", flex: 1, mt: 1, p: 2, pt: 0 }, children: [
3215
3215
  /* @__PURE__ */ jsx(Skeleton$1, { width: "60%" }),
3216
3216
  /* @__PURE__ */ jsx(Skeleton$1, {})
3217
3217
  ] }),
3218
- compactLayout === "1" || /* @__PURE__ */ jsxs(Box, { sx: { mt: "auto", px: 2 }, children: [
3218
+ compactLayout === "1" || /* @__PURE__ */ jsxs(Box$1, { sx: { mt: "auto", px: 2 }, children: [
3219
3219
  /* @__PURE__ */ jsx(Skeleton$1, { width: "30%" }),
3220
3220
  /* @__PURE__ */ jsxs(
3221
- Box,
3221
+ Box$1,
3222
3222
  {
3223
3223
  sx: {
3224
3224
  display: "flex",
@@ -3229,15 +3229,15 @@ const BlogCard = forwardRef(
3229
3229
  borderTop: "1px solid #eee"
3230
3230
  },
3231
3231
  children: [
3232
- hideAuthor === "1" || /* @__PURE__ */ jsxs(Box, { flex: 1, display: "flex", children: [
3232
+ hideAuthor === "1" || /* @__PURE__ */ jsxs(Box$1, { flex: 1, display: "flex", children: [
3233
3233
  /* @__PURE__ */ jsx(Skeleton$1, { variant: "circular", width: 40, height: 40 }),
3234
- /* @__PURE__ */ jsxs(Box, { flex: 1, ml: 1, children: [
3234
+ /* @__PURE__ */ jsxs(Box$1, { flex: 1, ml: 1, children: [
3235
3235
  /* @__PURE__ */ jsx(Skeleton$1, { height: 20, width: 40 }),
3236
3236
  /* @__PURE__ */ jsx(Skeleton$1, { height: 20, width: 100 })
3237
3237
  ] })
3238
3238
  ] }),
3239
3239
  /* @__PURE__ */ jsxs(
3240
- Box,
3240
+ Box$1,
3241
3241
  {
3242
3242
  sx: {
3243
3243
  display: "flex",
@@ -3247,7 +3247,7 @@ const BlogCard = forwardRef(
3247
3247
  },
3248
3248
  children: [
3249
3249
  /* @__PURE__ */ jsx(ChatBubbleOutlineOutlined, { sx: { mt: 0.25, fontSize: 18, color: "grey.600" } }),
3250
- /* @__PURE__ */ jsx(Box, { component: "span", sx: { fontSize: 12 }, children: /* @__PURE__ */ jsx(Skeleton$1, { width: 20 }) })
3250
+ /* @__PURE__ */ jsx(Box$1, { component: "span", sx: { fontSize: 12 }, children: /* @__PURE__ */ jsx(Skeleton$1, { width: 20 }) })
3251
3251
  ]
3252
3252
  }
3253
3253
  )
@@ -3260,7 +3260,7 @@ const BlogCard = forwardRef(
3260
3260
  ) });
3261
3261
  }
3262
3262
  return /* @__PURE__ */ jsx(
3263
- Box,
3263
+ Box$1,
3264
3264
  {
3265
3265
  ref,
3266
3266
  component: Link,
@@ -3268,7 +3268,7 @@ const BlogCard = forwardRef(
3268
3268
  to: getBlogLink(post),
3269
3269
  sx: { display: "flex", justifyContent: "center", color: "inherit", textDecoration: "none" },
3270
3270
  children: /* @__PURE__ */ jsxs(
3271
- Box,
3271
+ Box$1,
3272
3272
  {
3273
3273
  sx: {
3274
3274
  display: "flex",
@@ -3280,16 +3280,16 @@ const BlogCard = forwardRef(
3280
3280
  boxShadow: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)"
3281
3281
  },
3282
3282
  children: [
3283
- /* @__PURE__ */ jsx(Box, { sx: { flex: "0 0 auto" }, children: /* @__PURE__ */ jsx(CoverImage, { url: post.cover, sx: { borderRadius: 0 }, loading: "lazy", width: 640 }) }),
3284
- /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", flexDirection: "column", flex: 1, mt: 1, p: 2, pt: 0 }, children: [
3283
+ /* @__PURE__ */ jsx(Box$1, { sx: { flex: "0 0 auto" }, children: /* @__PURE__ */ jsx(CoverImage, { url: post.cover, sx: { borderRadius: 0 }, loading: "lazy", width: 640 }) }),
3284
+ /* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", flexDirection: "column", flex: 1, mt: 1, p: 2, pt: 0 }, children: [
3285
3285
  /* @__PURE__ */ jsx(Typography, { variant: "h4", sx: { ...lineClamp2, my: 0.5 }, children: post.title }),
3286
3286
  post.excerpt && /* @__PURE__ */ jsxs(Typography, { variant: "body1", sx: { ...lineClamp2, fontSize: { xs: 13, md: 14 }, color: "grey.600" }, children: [
3287
3287
  post.excerpt,
3288
3288
  "..."
3289
3289
  ] }),
3290
- compactLayout === "1" || /* @__PURE__ */ jsxs(Box, { sx: { mt: "auto" }, children: [
3290
+ compactLayout === "1" || /* @__PURE__ */ jsxs(Box$1, { sx: { mt: "auto" }, children: [
3291
3291
  /* @__PURE__ */ jsxs(
3292
- Box,
3292
+ Box$1,
3293
3293
  {
3294
3294
  sx: {
3295
3295
  mt: 2,
@@ -3305,7 +3305,7 @@ const BlogCard = forwardRef(
3305
3305
  }
3306
3306
  ),
3307
3307
  /* @__PURE__ */ jsxs(
3308
- Box,
3308
+ Box$1,
3309
3309
  {
3310
3310
  sx: {
3311
3311
  display: "flex",
@@ -3318,7 +3318,7 @@ const BlogCard = forwardRef(
3318
3318
  children: [
3319
3319
  hideAuthor === "1" || /* @__PURE__ */ jsx(AuthorInfo, { user: post.author, size: "sm", responsive: true }),
3320
3320
  /* @__PURE__ */ jsxs(
3321
- Box,
3321
+ Box$1,
3322
3322
  {
3323
3323
  sx: {
3324
3324
  display: "flex",
@@ -3328,7 +3328,7 @@ const BlogCard = forwardRef(
3328
3328
  },
3329
3329
  children: [
3330
3330
  /* @__PURE__ */ jsx(ChatBubbleOutlineOutlined, { sx: { mt: 0.25, fontSize: 18, color: "grey.600" } }),
3331
- /* @__PURE__ */ jsx(Box, { component: "span", sx: { fontSize: 12 }, children: post.commentCount || 0 })
3331
+ /* @__PURE__ */ jsx(Box$1, { component: "span", sx: { fontSize: 12 }, children: post.commentCount || 0 })
3332
3332
  ]
3333
3333
  }
3334
3334
  )
@@ -3393,8 +3393,8 @@ function BlogCardList({
3393
3393
  );
3394
3394
  });
3395
3395
  }
3396
- return /* @__PURE__ */ jsx(Box, { ...rest, sx: [{}, ...Array.isArray(rest.sx) ? rest.sx : [rest.sx]], children: /* @__PURE__ */ jsx(
3397
- Box,
3396
+ return /* @__PURE__ */ jsx(Box$1, { ...rest, sx: [{}, ...Array.isArray(rest.sx) ? rest.sx : [rest.sx]], children: /* @__PURE__ */ jsx(
3397
+ Box$1,
3398
3398
  {
3399
3399
  ref: containerRef,
3400
3400
  sx: {
@@ -3419,8 +3419,8 @@ function BlogListWrapper({
3419
3419
  }
3420
3420
  const prefix = joinUrl(window.location.origin, inferDiscussKitApiPrefix(), "blog");
3421
3421
  function BlogPermaLink({ slug, onChange, ...rest }) {
3422
- return /* @__PURE__ */ jsx(Box$1, { ...rest, className: "blog-permalink-container", children: /* @__PURE__ */ jsxs(
3423
- Box$1,
3422
+ return /* @__PURE__ */ jsx(Box, { ...rest, className: "blog-permalink-container", children: /* @__PURE__ */ jsxs(
3423
+ Box,
3424
3424
  {
3425
3425
  component: "form",
3426
3426
  sx: {
@@ -3432,7 +3432,7 @@ function BlogPermaLink({ slug, onChange, ...rest }) {
3432
3432
  },
3433
3433
  children: [
3434
3434
  /* @__PURE__ */ jsx(
3435
- Box$1,
3435
+ Box,
3436
3436
  {
3437
3437
  sx: {
3438
3438
  display: "flex",
@@ -3443,7 +3443,7 @@ function BlogPermaLink({ slug, onChange, ...rest }) {
3443
3443
  bgcolor: "grey.200"
3444
3444
  },
3445
3445
  children: /* @__PURE__ */ jsx(
3446
- Box$1,
3446
+ Box,
3447
3447
  {
3448
3448
  component: "input",
3449
3449
  value: prefix,
@@ -3884,9 +3884,9 @@ const tablerUsersGroup = (props) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 2
3884
3884
  function ChannelGroup({ size = "normal", chat, children, ...rest }) {
3885
3885
  const sm = size === "sm";
3886
3886
  const iconSize = sm ? 40 : 48;
3887
- return /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", alignItems: "center", gap: 1, fontSize: 14 }, ...rest, children: [
3887
+ return /* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", alignItems: "center", gap: 1, fontSize: 14 }, ...rest, children: [
3888
3888
  /* @__PURE__ */ jsx(
3889
- Box,
3889
+ Box$1,
3890
3890
  {
3891
3891
  sx: {
3892
3892
  display: "flex",
@@ -3899,12 +3899,12 @@ function ChannelGroup({ size = "normal", chat, children, ...rest }) {
3899
3899
  p: 0.8,
3900
3900
  borderRadius: "100%"
3901
3901
  },
3902
- children: /* @__PURE__ */ jsx(Box, { component: tablerUsersGroup, sx: { fontSize: 16, color: amber[700], width: iconSize } })
3902
+ children: /* @__PURE__ */ jsx(Box$1, { component: tablerUsersGroup, sx: { fontSize: 16, color: amber[700], width: iconSize } })
3903
3903
  }
3904
3904
  ),
3905
- /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", flexDirection: "column", height: "100%", justifyContent: "space-between" }, children: [
3906
- /* @__PURE__ */ jsx(Box, { sx: { display: "flex", alignItems: "center" }, lineHeight: 1.5, children: /* @__PURE__ */ jsx(Box, { component: "span", sx: { fontWeight: "bold" }, children: chat == null ? void 0 : chat.name }) }),
3907
- children && /* @__PURE__ */ jsx(Box, { children })
3905
+ /* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", flexDirection: "column", height: "100%", justifyContent: "space-between" }, children: [
3906
+ /* @__PURE__ */ jsx(Box$1, { sx: { display: "flex", alignItems: "center" }, lineHeight: 1.5, children: /* @__PURE__ */ jsx(Box$1, { component: "span", sx: { fontWeight: "bold" }, children: chat == null ? void 0 : chat.name }) }),
3907
+ children && /* @__PURE__ */ jsx(Box$1, { children })
3908
3908
  ] })
3909
3909
  ] });
3910
3910
  }
@@ -3917,7 +3917,7 @@ function ChatList({ inWallet, ...rest }) {
3917
3917
  }
3918
3918
  const latestMessageText = getLastMessageText(chat);
3919
3919
  const latestMessageTextContent = latestMessageText && /* @__PURE__ */ jsx(
3920
- Box,
3920
+ Box$1,
3921
3921
  {
3922
3922
  className: "message-content-text",
3923
3923
  sx: {
@@ -3951,11 +3951,11 @@ function ChatList({ inWallet, ...rest }) {
3951
3951
  }
3952
3952
  return null;
3953
3953
  };
3954
- return /* @__PURE__ */ jsx(Box, { ...rest, children: /* @__PURE__ */ jsx(Flipper, { flipKey: orderedChats.map((x) => x.id).join(""), children: orderedChats.map((chat) => {
3954
+ return /* @__PURE__ */ jsx(Box$1, { ...rest, children: /* @__PURE__ */ jsx(Flipper, { flipKey: orderedChats.map((x) => x.id).join(""), children: orderedChats.map((chat) => {
3955
3955
  const isActiveChat = activeChatId === chat.id;
3956
3956
  const _hasUnreadMessages = hasUnreadMessages(chat) && (chat.type !== "channel" || chat.hasJoined);
3957
3957
  return /* @__PURE__ */ jsx(Flipped, { flipId: chat.id, children: /* @__PURE__ */ jsxs(
3958
- Box,
3958
+ Box$1,
3959
3959
  {
3960
3960
  sx: {
3961
3961
  position: "relative",
@@ -3998,7 +3998,7 @@ function ChatList({ inWallet, ...rest }) {
3998
3998
  children: [
3999
3999
  renderItem(chat),
4000
4000
  _hasUnreadMessages && /* @__PURE__ */ jsx(
4001
- Box,
4001
+ Box$1,
4002
4002
  {
4003
4003
  sx: {
4004
4004
  position: "absolute",
@@ -4027,7 +4027,7 @@ const Time = ({ createdAt }) => {
4027
4027
  const diffInMilliseconds = now.getTime() - messageTime.getTime();
4028
4028
  const diffInDays = diffInMilliseconds / (1e3 * 60 * 60 * 24);
4029
4029
  const isWithinSevenDays = diffInDays <= 3;
4030
- return /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Box, { sx: { display: "inline-block", fontSize: 12, color: "grey.500", ml: 3 }, children: isWithinSevenDays ? /* @__PURE__ */ jsx(RelativeTime, { value: createdAt }) : dayjs(messageTime).format("YYYY-MM-DD HH:mm") }) });
4030
+ return /* @__PURE__ */ jsx(Box$1, { children: /* @__PURE__ */ jsx(Box$1, { sx: { display: "inline-block", fontSize: 12, color: "grey.500", ml: 3 }, children: isWithinSevenDays ? /* @__PURE__ */ jsx(RelativeTime, { value: createdAt }) : dayjs(messageTime).format("YYYY-MM-DD HH:mm") }) });
4031
4031
  };
4032
4032
  const baseItemSx = {
4033
4033
  px: 1.25,
@@ -4053,7 +4053,7 @@ function Message({ message, prevMessage, showTime = true, ...rest }) {
4053
4053
  }
4054
4054
  };
4055
4055
  const renderPostContent = () => {
4056
- return /* @__PURE__ */ jsx(Box, { className: "author-chat-item", children: /* @__PURE__ */ jsx(PostContent, { content: message.content }) });
4056
+ return /* @__PURE__ */ jsx(Box$1, { className: "author-chat-item", children: /* @__PURE__ */ jsx(PostContent, { content: message.content }) });
4057
4057
  };
4058
4058
  const menuItems = [];
4059
4059
  const isSender = message.sender.did === ((_a2 = session == null ? void 0 : session.user) == null ? void 0 : _a2.did);
@@ -4063,12 +4063,12 @@ function Message({ message, prevMessage, showTime = true, ...rest }) {
4063
4063
  const isSameUser = message.sender.did === ((_b2 = prevMessage == null ? void 0 : prevMessage.sender) == null ? void 0 : _b2.did);
4064
4064
  if (isSender || isAdmin) {
4065
4065
  menuItems.push(
4066
- /* @__PURE__ */ jsx(MuiMenuItem, { onClick: handleDeleteMessage, children: /* @__PURE__ */ jsx(Box, { component: "span", sx: { color: "error.main" }, children: t("delete") }) }, "delete")
4066
+ /* @__PURE__ */ jsx(MuiMenuItem, { onClick: handleDeleteMessage, children: /* @__PURE__ */ jsx(Box$1, { component: "span", sx: { color: "error.main" }, children: t("delete") }) }, "delete")
4067
4067
  );
4068
4068
  }
4069
4069
  const compactMessage = messageInterval <= 6e4 && isSameUser;
4070
4070
  return /* @__PURE__ */ jsxs(
4071
- Box,
4071
+ Box$1,
4072
4072
  {
4073
4073
  ...rest,
4074
4074
  sx: {
@@ -4138,7 +4138,7 @@ function NotificationMessage({ chat, message, prevMessage }) {
4138
4138
  const { t } = useLocaleContext();
4139
4139
  const renderQuote = ({ title, cover }) => {
4140
4140
  if ("post" in message) {
4141
- return /* @__PURE__ */ jsxs(Box, { sx: { color: 14, mt: 1 }, children: [
4141
+ return /* @__PURE__ */ jsxs(Box$1, { sx: { color: 14, mt: 1 }, children: [
4142
4142
  title && /* @__PURE__ */ jsx(
4143
4143
  Typography,
4144
4144
  {
@@ -4151,8 +4151,8 @@ function NotificationMessage({ chat, message, prevMessage }) {
4151
4151
  }
4152
4152
  ),
4153
4153
  cover && // cover image
4154
- /* @__PURE__ */ jsx(Box, { sx: { maxWidth: 200, mt: 1 }, children: /* @__PURE__ */ jsx(
4155
- Box,
4154
+ /* @__PURE__ */ jsx(Box$1, { sx: { maxWidth: 200, mt: 1 }, children: /* @__PURE__ */ jsx(
4155
+ Box$1,
4156
4156
  {
4157
4157
  sx: [
4158
4158
  {
@@ -4187,14 +4187,14 @@ function NotificationMessage({ chat, message, prevMessage }) {
4187
4187
  };
4188
4188
  if (message.type === "post_create") {
4189
4189
  return /* @__PURE__ */ jsxs(
4190
- Box,
4190
+ Box$1,
4191
4191
  {
4192
4192
  sx: {
4193
4193
  ...baseCardSx
4194
4194
  },
4195
4195
  children: [
4196
4196
  /* @__PURE__ */ jsxs(
4197
- Box,
4197
+ Box$1,
4198
4198
  {
4199
4199
  sx: {
4200
4200
  display: "flex",
@@ -4204,9 +4204,9 @@ function NotificationMessage({ chat, message, prevMessage }) {
4204
4204
  color: "primary.light"
4205
4205
  },
4206
4206
  children: [
4207
- /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", alignItems: "center" }, children: [
4207
+ /* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", alignItems: "center" }, children: [
4208
4208
  /* @__PURE__ */ jsx(Icon, { icon: "tabler:news", style: { height: 15, width: 15, marginRight: 4 } }),
4209
- /* @__PURE__ */ jsx(Box, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
4209
+ /* @__PURE__ */ jsx(Box$1, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
4210
4210
  /* @__PURE__ */ jsx("span", { children: t("chat.newPost") })
4211
4211
  ] }),
4212
4212
  /* @__PURE__ */ jsx(Time, { createdAt: message.createdAt })
@@ -4220,14 +4220,14 @@ function NotificationMessage({ chat, message, prevMessage }) {
4220
4220
  }
4221
4221
  if (message.type === "comment") {
4222
4222
  return /* @__PURE__ */ jsxs(
4223
- Box,
4223
+ Box$1,
4224
4224
  {
4225
4225
  sx: {
4226
4226
  ...baseCardSx
4227
4227
  },
4228
4228
  children: [
4229
4229
  /* @__PURE__ */ jsxs(
4230
- Box,
4230
+ Box$1,
4231
4231
  {
4232
4232
  sx: {
4233
4233
  display: "flex",
@@ -4237,9 +4237,9 @@ function NotificationMessage({ chat, message, prevMessage }) {
4237
4237
  color: "primary.light"
4238
4238
  },
4239
4239
  children: [
4240
- /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", alignItems: "center" }, children: [
4240
+ /* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", alignItems: "center" }, children: [
4241
4241
  /* @__PURE__ */ jsx(Icon, { icon: "tabler:message-circle-2", style: { height: 15, width: 15, marginRight: 4 } }),
4242
- /* @__PURE__ */ jsx(Box, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
4242
+ /* @__PURE__ */ jsx(Box$1, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
4243
4243
  /* @__PURE__ */ jsx("span", { children: ((_a2 = message == null ? void 0 : message.sourceUser) == null ? void 0 : _a2.did) === ((_b2 = session == null ? void 0 : session.user) == null ? void 0 : _b2.did) ? t("chat.commentedYourPost") : t("chat.commentedPost") })
4244
4244
  ] }),
4245
4245
  /* @__PURE__ */ jsx(Time, { createdAt: message.createdAt })
@@ -4254,14 +4254,14 @@ function NotificationMessage({ chat, message, prevMessage }) {
4254
4254
  }
4255
4255
  if (message.type === "reply") {
4256
4256
  return /* @__PURE__ */ jsxs(
4257
- Box,
4257
+ Box$1,
4258
4258
  {
4259
4259
  sx: {
4260
4260
  ...baseCardSx
4261
4261
  },
4262
4262
  children: [
4263
4263
  /* @__PURE__ */ jsxs(
4264
- Box,
4264
+ Box$1,
4265
4265
  {
4266
4266
  sx: {
4267
4267
  display: "flex",
@@ -4271,9 +4271,9 @@ function NotificationMessage({ chat, message, prevMessage }) {
4271
4271
  color: "primary.light"
4272
4272
  },
4273
4273
  children: [
4274
- /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", alignItems: "center" }, children: [
4274
+ /* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", alignItems: "center" }, children: [
4275
4275
  /* @__PURE__ */ jsx(Icon, { icon: "tabler:message-circle-2", style: { height: 15, width: 15, marginRight: 4 } }),
4276
- /* @__PURE__ */ jsx(Box, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
4276
+ /* @__PURE__ */ jsx(Box$1, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
4277
4277
  /* @__PURE__ */ jsx("span", { children: (message == null ? void 0 : message.recipient) === ((_d = session == null ? void 0 : session.user) == null ? void 0 : _d.did) ? t("chat.replyYourComment") : t("chat.replyComment") })
4278
4278
  ] }),
4279
4279
  /* @__PURE__ */ jsx(Time, { createdAt: message.createdAt })
@@ -4288,14 +4288,14 @@ function NotificationMessage({ chat, message, prevMessage }) {
4288
4288
  }
4289
4289
  if (message.type === "mentionInComment") {
4290
4290
  return /* @__PURE__ */ jsxs(
4291
- Box,
4291
+ Box$1,
4292
4292
  {
4293
4293
  sx: {
4294
4294
  ...baseCardSx
4295
4295
  },
4296
4296
  children: [
4297
4297
  /* @__PURE__ */ jsxs(
4298
- Box,
4298
+ Box$1,
4299
4299
  {
4300
4300
  sx: {
4301
4301
  display: "flex",
@@ -4305,9 +4305,9 @@ function NotificationMessage({ chat, message, prevMessage }) {
4305
4305
  color: "primary.light"
4306
4306
  },
4307
4307
  children: [
4308
- /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", alignItems: "center" }, children: [
4308
+ /* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", alignItems: "center" }, children: [
4309
4309
  /* @__PURE__ */ jsx(Icon, { icon: "tabler:message-circle-2", style: { height: 15, width: 15, marginRight: 4 } }),
4310
- /* @__PURE__ */ jsx(Box, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
4310
+ /* @__PURE__ */ jsx(Box$1, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
4311
4311
  /* @__PURE__ */ jsxs("span", { children: [
4312
4312
  " ",
4313
4313
  t("chat.mentionInComment")
@@ -4325,14 +4325,14 @@ function NotificationMessage({ chat, message, prevMessage }) {
4325
4325
  }
4326
4326
  if (message.type === "mentionInPost") {
4327
4327
  return /* @__PURE__ */ jsxs(
4328
- Box,
4328
+ Box$1,
4329
4329
  {
4330
4330
  sx: {
4331
4331
  ...baseCardSx
4332
4332
  },
4333
4333
  children: [
4334
4334
  /* @__PURE__ */ jsxs(
4335
- Box,
4335
+ Box$1,
4336
4336
  {
4337
4337
  sx: {
4338
4338
  display: "flex",
@@ -4342,9 +4342,9 @@ function NotificationMessage({ chat, message, prevMessage }) {
4342
4342
  color: "primary.light"
4343
4343
  },
4344
4344
  children: [
4345
- /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", alignItems: "center" }, children: [
4345
+ /* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", alignItems: "center" }, children: [
4346
4346
  /* @__PURE__ */ jsx(Icon, { icon: "tabler:message-circle-2", style: { height: 15, width: 15, marginRight: 4 } }),
4347
- /* @__PURE__ */ jsx(Box, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
4347
+ /* @__PURE__ */ jsx(Box$1, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
4348
4348
  /* @__PURE__ */ jsx("span", { children: t("chat.mentionInPost") })
4349
4349
  ] }),
4350
4350
  /* @__PURE__ */ jsx(Time, { createdAt: message.createdAt })
@@ -4361,8 +4361,8 @@ function NotificationMessage({ chat, message, prevMessage }) {
4361
4361
  const unit = points > 1 ? t("chat.points") : t("chat.point");
4362
4362
  const event = eventKey ? `for ${eventKey.toLowerCase().replaceAll("-", " ")}: ` : ": ";
4363
4363
  const tip = t("chat.pointUp", { points, unit, event });
4364
- return /* @__PURE__ */ jsxs(Box, { children: [
4365
- /* @__PURE__ */ jsx(Box, { component: "span", sx: { color: "grey.600" }, children: tip }),
4364
+ return /* @__PURE__ */ jsxs(Box$1, { children: [
4365
+ /* @__PURE__ */ jsx(Box$1, { component: "span", sx: { color: "grey.600" }, children: tip }),
4366
4366
  comment && /* @__PURE__ */ jsx(Typography, { variant: "body1", children: comment.excerpt }),
4367
4367
  post && renderQuote(post)
4368
4368
  ] });
@@ -4375,14 +4375,14 @@ function NotificationMessage({ chat, message, prevMessage }) {
4375
4375
  unassign: t("chat.unassignTask")
4376
4376
  };
4377
4377
  return /* @__PURE__ */ jsxs(
4378
- Box,
4378
+ Box$1,
4379
4379
  {
4380
4380
  sx: {
4381
4381
  ...baseCardSx
4382
4382
  },
4383
4383
  children: [
4384
4384
  /* @__PURE__ */ jsxs(
4385
- Box,
4385
+ Box$1,
4386
4386
  {
4387
4387
  sx: {
4388
4388
  display: "flex",
@@ -4392,9 +4392,9 @@ function NotificationMessage({ chat, message, prevMessage }) {
4392
4392
  color: "primary.light"
4393
4393
  },
4394
4394
  children: [
4395
- /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", alignItems: "center" }, children: [
4395
+ /* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", alignItems: "center" }, children: [
4396
4396
  /* @__PURE__ */ jsx(Icon, { icon: "tabler:arrow-forward-up", style: { height: 15, width: 15, marginRight: 4 } }),
4397
- /* @__PURE__ */ jsx(Box, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
4397
+ /* @__PURE__ */ jsx(Box$1, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
4398
4398
  /* @__PURE__ */ jsx("span", { children: titles[message.subtype] })
4399
4399
  ] }),
4400
4400
  /* @__PURE__ */ jsx(Time, { createdAt: message.createdAt })
@@ -4408,7 +4408,7 @@ function NotificationMessage({ chat, message, prevMessage }) {
4408
4408
  }
4409
4409
  return /* @__PURE__ */ jsx(Message, { message, showTime: false });
4410
4410
  };
4411
- return /* @__PURE__ */ jsx(Box, { sx: { ...baseItemSx, fontSize: 14 }, children: render() });
4411
+ return /* @__PURE__ */ jsx(Box$1, { sx: { ...baseItemSx, fontSize: 14 }, children: render() });
4412
4412
  }
4413
4413
  const checkIsAtBottom = (element) => {
4414
4414
  return element && (element.scrollHeight === 0 || element.scrollHeight - element.scrollTop < element.clientHeight + 60);
@@ -4446,9 +4446,9 @@ function MessageList({ chat, ...rest }) {
4446
4446
  setIsAtBottom(checkIsAtBottom(containerRef.current));
4447
4447
  }
4448
4448
  }, [isActive]);
4449
- return /* @__PURE__ */ jsxs(Box, { ...rest, sx: { position: "relative", height: "100%" }, children: [
4449
+ return /* @__PURE__ */ jsxs(Box$1, { ...rest, sx: { position: "relative", height: "100%" }, children: [
4450
4450
  /* @__PURE__ */ jsxs(
4451
- Box,
4451
+ Box$1,
4452
4452
  {
4453
4453
  sx: {
4454
4454
  height: "100%",
@@ -4479,7 +4479,7 @@ function MessageList({ chat, ...rest }) {
4479
4479
  ref: containerRef,
4480
4480
  children: [
4481
4481
  chat.nextCursor && /* @__PURE__ */ jsx(
4482
- Box,
4482
+ Box$1,
4483
4483
  {
4484
4484
  id: "next-cursor",
4485
4485
  sx: {
@@ -4527,12 +4527,12 @@ function MessageList({ chat, ...rest }) {
4527
4527
  chat.type !== "notification" && ((_a2 = chat.messages) == null ? void 0 : _a2.map((message, index) => {
4528
4528
  var _a3;
4529
4529
  const prev = (_a3 = chat.messages) == null ? void 0 : _a3[index - 1];
4530
- return /* @__PURE__ */ jsx(Box, { className: "message-item", id: message.id, children: /* @__PURE__ */ jsx(Message, { message, prevMessage: prev }) }, message.id);
4530
+ return /* @__PURE__ */ jsx(Box$1, { className: "message-item", id: message.id, children: /* @__PURE__ */ jsx(Message, { message, prevMessage: prev }) }, message.id);
4531
4531
  })),
4532
4532
  chat.type === "notification" && ((_b2 = chat.messages) == null ? void 0 : _b2.map((message, index) => {
4533
4533
  var _a3;
4534
4534
  const prev = (_a3 = chat.messages) == null ? void 0 : _a3[index - 1];
4535
- return /* @__PURE__ */ jsx(Box, { className: "message-item", id: message.id, children: /* @__PURE__ */ jsx(
4535
+ return /* @__PURE__ */ jsx(Box$1, { className: "message-item", id: message.id, children: /* @__PURE__ */ jsx(
4536
4536
  NotificationMessage,
4537
4537
  {
4538
4538
  chat,
@@ -4544,7 +4544,7 @@ function MessageList({ chat, ...rest }) {
4544
4544
  ]
4545
4545
  }
4546
4546
  ),
4547
- !isAtBottom && /* @__PURE__ */ jsx(Box, { sx: { position: "absolute", bottom: 16, right: 24 }, onClick: scrollToBottom, children: /* @__PURE__ */ jsx(Fab, { color: "inherit", sx: { width: { xs: 36, sm: 44 }, height: { xs: 36, sm: 44 } }, children: /* @__PURE__ */ jsx(ArrowDownward, {}) }) })
4547
+ !isAtBottom && /* @__PURE__ */ jsx(Box$1, { sx: { position: "absolute", bottom: 16, right: 24 }, onClick: scrollToBottom, children: /* @__PURE__ */ jsx(Fab, { color: "inherit", sx: { width: { xs: 36, sm: 44 }, height: { xs: 36, sm: 44 } }, children: /* @__PURE__ */ jsx(ArrowDownward, {}) }) })
4548
4548
  ] });
4549
4549
  }
4550
4550
  const HtmlTooltip = styled(({ className, ...props }) => /* @__PURE__ */ jsx(Tooltip$1, { ...props, classes: { popper: className } }))(() => ({
@@ -4583,7 +4583,7 @@ function Participants({ users, sx, ...rest }) {
4583
4583
  },
4584
4584
  ...Array.isArray(sx) ? sx : [sx]
4585
4585
  ];
4586
- return /* @__PURE__ */ jsx(ClickAwayListener, { onClickAway: handleTooltipClose, children: /* @__PURE__ */ jsx(Box$1, { children: /* @__PURE__ */ jsx(
4586
+ return /* @__PURE__ */ jsx(ClickAwayListener, { onClickAway: handleTooltipClose, children: /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(
4587
4587
  HtmlTooltip,
4588
4588
  {
4589
4589
  PopperProps: {
@@ -4594,10 +4594,10 @@ function Participants({ users, sx, ...rest }) {
4594
4594
  disableFocusListener: true,
4595
4595
  disableHoverListener: true,
4596
4596
  disableTouchListener: true,
4597
- title: /* @__PURE__ */ jsx(Fragment, { children: users.map((item, i) => /* @__PURE__ */ jsx(Box$1, { sx: { p: 1 }, children: /* @__PURE__ */ jsx(AuthorInfo, { user: item, size: "sm" }) }, i)) }),
4597
+ title: /* @__PURE__ */ jsx(Fragment, { children: users.map((item, i) => /* @__PURE__ */ jsx(Box, { sx: { p: 1 }, children: /* @__PURE__ */ jsx(AuthorInfo, { user: item, size: "sm" }) }, i)) }),
4598
4598
  children: /* @__PURE__ */ jsxs(Button$1, { ...rest, sx: mergedSx, onClick: handleTooltipOpen, children: [
4599
4599
  /* @__PURE__ */ jsx(Avatars, { users: visibleUsers, max: 5 }),
4600
- /* @__PURE__ */ jsx(Box$1, { sx: { fontSize: 12, fontWeight: "bold", color: "grey.600" }, children: users.length })
4600
+ /* @__PURE__ */ jsx(Box, { sx: { fontSize: 12, fontWeight: "bold", color: "grey.600" }, children: users.length })
4601
4601
  ] })
4602
4602
  }
4603
4603
  ) }) });
@@ -4656,7 +4656,7 @@ function getLineClamp(count) {
4656
4656
  };
4657
4657
  }
4658
4658
  function RoomTitle({ title }) {
4659
- return /* @__PURE__ */ jsx(Box, { component: "span", sx: { fontSize: 14, fontWeight: "medium" }, children: title });
4659
+ return /* @__PURE__ */ jsx(Box$1, { component: "span", sx: { fontSize: 14, fontWeight: "medium" }, children: title });
4660
4660
  }
4661
4661
  function ChatRoom({ chat, inWallet, ...rest }) {
4662
4662
  var _a2;
@@ -4668,6 +4668,7 @@ function ChatRoom({ chat, inWallet, ...rest }) {
4668
4668
  const isActive = isActiveChat(chat.id);
4669
4669
  const { session, isAdmin } = useSessionContext();
4670
4670
  const isCreator = chat.creator.did === ((_a2 = session == null ? void 0 : session.user) == null ? void 0 : _a2.did);
4671
+ const [input, setInput] = useState("");
4671
4672
  useEffect(() => {
4672
4673
  if (chat.isActivated) {
4673
4674
  initChatRoom(chat.id);
@@ -4695,31 +4696,31 @@ function ChatRoom({ chat, inWallet, ...rest }) {
4695
4696
  const menuItems = [];
4696
4697
  if (chat.hasJoined && !isCreator) {
4697
4698
  menuItems.push(
4698
- /* @__PURE__ */ jsx(Menu.Item, { onClick: () => leaveChannel(chat.id), children: /* @__PURE__ */ jsx(Box, { component: "span", sx: { color: "error.main" }, children: t("chat.leaveChannel") }) }, "leave")
4699
+ /* @__PURE__ */ jsx(Menu.Item, { onClick: () => leaveChannel(chat.id), children: /* @__PURE__ */ jsx(Box$1, { component: "span", sx: { color: "error.main" }, children: t("chat.leaveChannel") }) }, "leave")
4699
4700
  );
4700
4701
  }
4701
4702
  if (isAdmin || isCreator) {
4702
4703
  menuItems.push(
4703
- /* @__PURE__ */ jsx(Menu.Item, { onClick: handleDeleteChannel, children: /* @__PURE__ */ jsx(Box, { component: "span", sx: { color: "error.main" }, children: t("chat.deleteChannel") }) }, "delete")
4704
+ /* @__PURE__ */ jsx(Menu.Item, { onClick: handleDeleteChannel, children: /* @__PURE__ */ jsx(Box$1, { component: "span", sx: { color: "error.main" }, children: t("chat.deleteChannel") }) }, "delete")
4704
4705
  );
4705
4706
  }
4706
- return /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", justifyContent: "space-between", alignItems: "center", width: 1, flex: 1 }, children: [
4707
- /* @__PURE__ */ jsxs(Box, { children: [
4708
- /* @__PURE__ */ jsx(Box, { component: "span", sx: { fontSize: 14, fontWeight: "bold", color: "grey.700", ...getLineClamp(1) }, children: chat.name }),
4709
- /* @__PURE__ */ jsx(Box, { sx: { fontSize: 12, color: "grey.500", ...getLineClamp(1) }, children: chat.description })
4707
+ return /* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", justifyContent: "space-between", alignItems: "center", width: 1, flex: 1 }, children: [
4708
+ /* @__PURE__ */ jsxs(Box$1, { children: [
4709
+ /* @__PURE__ */ jsx(Box$1, { component: "span", sx: { fontSize: 14, fontWeight: "bold", color: "grey.700", ...getLineClamp(1) }, children: chat.name }),
4710
+ /* @__PURE__ */ jsx(Box$1, { sx: { fontSize: 12, color: "grey.500", ...getLineClamp(1) }, children: chat.description })
4710
4711
  ] }),
4711
- /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
4712
+ /* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
4712
4713
  !chat.hasJoined && /* @__PURE__ */ jsx(
4713
4714
  Button,
4714
4715
  {
4715
4716
  variant: "contained",
4716
4717
  color: "primary",
4717
4718
  onClick: () => joinChannel(chat.id),
4718
- startIcon: /* @__PURE__ */ jsx(Box, { component: tablerUsersPlus, sx: { fontSize: "16px!important" } }),
4719
+ startIcon: /* @__PURE__ */ jsx(Box$1, { component: tablerUsersPlus, sx: { fontSize: "16px!important" } }),
4719
4720
  children: t("chat.joinChannel")
4720
4721
  }
4721
4722
  ),
4722
- chat.hasJoined && /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Participants, { users: chat.participants, sx: { border: "none" } }) }),
4723
+ chat.hasJoined && /* @__PURE__ */ jsx(Box$1, { children: /* @__PURE__ */ jsx(Participants, { users: chat.participants, sx: { border: "none" } }) }),
4723
4724
  /* @__PURE__ */ jsx(Menu, { items: menuItems })
4724
4725
  ] })
4725
4726
  ] });
@@ -4727,11 +4728,11 @@ function ChatRoom({ chat, inWallet, ...rest }) {
4727
4728
  return null;
4728
4729
  };
4729
4730
  if (chat.isActivated && !chat.ready) {
4730
- return /* @__PURE__ */ jsx(Box, { sx: { display: "flex", justifyContent: "center", alignItems: "center", height: 1 }, children: /* @__PURE__ */ jsx(CircularProgress, {}) });
4731
+ return /* @__PURE__ */ jsx(Box$1, { sx: { display: "flex", justifyContent: "center", alignItems: "center", height: 1 }, children: /* @__PURE__ */ jsx(CircularProgress, {}) });
4731
4732
  }
4732
- return /* @__PURE__ */ jsxs(Box, { ...rest, sx: { display: isActive ? "flex" : "none", flexDirection: "column", height: "100%" }, children: [
4733
+ return /* @__PURE__ */ jsxs(Box$1, { ...rest, sx: { display: isActive ? "flex" : "none", flexDirection: "column", height: "100%" }, children: [
4733
4734
  !inWallet && /* @__PURE__ */ jsxs(
4734
- Box,
4735
+ Box$1,
4735
4736
  {
4736
4737
  sx: {
4737
4738
  display: "flex",
@@ -4747,9 +4748,9 @@ function ChatRoom({ chat, inWallet, ...rest }) {
4747
4748
  ]
4748
4749
  }
4749
4750
  ),
4750
- /* @__PURE__ */ jsx(Box, { sx: { flex: 1, overflow: "hidden", background: theme.palette.grey[50] }, children: /* @__PURE__ */ jsx(MessageList, { chat }) }),
4751
+ /* @__PURE__ */ jsx(Box$1, { sx: { flex: 1, overflow: "hidden", background: theme.palette.grey[50] }, children: /* @__PURE__ */ jsx(MessageList, { chat }) }),
4751
4752
  /* @__PURE__ */ jsx(
4752
- Box,
4753
+ Box$1,
4753
4754
  {
4754
4755
  sx: {
4755
4756
  flex: "0 0 auto",
@@ -4761,10 +4762,12 @@ function ChatRoom({ chat, inWallet, ...rest }) {
4761
4762
  borderRadius: "0px !important"
4762
4763
  }
4763
4764
  },
4764
- children: /* @__PURE__ */ jsxs(Box, { sx: { position: "relative" }, children: [
4765
- /* @__PURE__ */ jsx(
4765
+ children: /* @__PURE__ */ jsxs(Box$1, { sx: { position: "relative" }, children: [
4766
+ isActive && /* @__PURE__ */ jsx(
4766
4767
  CommentInput,
4767
4768
  {
4769
+ initialContent: input,
4770
+ onChange: (editorState) => setInput(editorState ? JSON.stringify(editorState) : ""),
4768
4771
  send: (content) => sendMessage(chat.id, content),
4769
4772
  placeholder: t("chat.typeSomething"),
4770
4773
  sendText: t("chat.reply"),
@@ -4772,7 +4775,7 @@ function ChatRoom({ chat, inWallet, ...rest }) {
4772
4775
  }
4773
4776
  ),
4774
4777
  chat.type === "channel" && !chat.hasJoined && /* @__PURE__ */ jsxs(
4775
- Box,
4778
+ Box$1,
4776
4779
  {
4777
4780
  sx: {
4778
4781
  position: "absolute",
@@ -4789,10 +4792,10 @@ function ChatRoom({ chat, inWallet, ...rest }) {
4789
4792
  color: "#fff"
4790
4793
  },
4791
4794
  children: [
4792
- /* @__PURE__ */ jsx(Box, { sx: { mb: 0.5, fontSize: 18 }, children: "🚪" }),
4793
- /* @__PURE__ */ jsx(Box, { sx: { color: "primary.main", mb: 0.5, fontSize: 13, fontWeight: 500 }, children: t("chat.notYetJoinedTheChannel") }),
4795
+ /* @__PURE__ */ jsx(Box$1, { sx: { mb: 0.5, fontSize: 18 }, children: "🚪" }),
4796
+ /* @__PURE__ */ jsx(Box$1, { sx: { color: "primary.main", mb: 0.5, fontSize: 13, fontWeight: 500 }, children: t("chat.notYetJoinedTheChannel") }),
4794
4797
  /* @__PURE__ */ jsx(
4795
- Box,
4798
+ Box$1,
4796
4799
  {
4797
4800
  sx: { color: "secondary.main", cursor: "pointer", fontSize: 13 },
4798
4801
  onClick: () => joinChannel(chat.id),
@@ -4834,7 +4837,7 @@ function NewChannelDialog({ open, onSubmit, onClose, ...rest }) {
4834
4837
  onClose,
4835
4838
  ...rest,
4836
4839
  children: /* @__PURE__ */ jsxs(
4837
- Box,
4840
+ Box$1,
4838
4841
  {
4839
4842
  width: { xs: "100%", md: 560 },
4840
4843
  sx: {
@@ -4845,8 +4848,8 @@ function NewChannelDialog({ open, onSubmit, onClose, ...rest }) {
4845
4848
  },
4846
4849
  minHeight: 140,
4847
4850
  children: [
4848
- /* @__PURE__ */ jsxs(Box, { children: [
4849
- /* @__PURE__ */ jsx(Box, { sx: { fontSize: 14, fontWeight: "medium", mb: 0 }, children: t("chat.channelName") }),
4851
+ /* @__PURE__ */ jsxs(Box$1, { children: [
4852
+ /* @__PURE__ */ jsx(Box$1, { sx: { fontSize: 14, fontWeight: "medium", mb: 0 }, children: t("chat.channelName") }),
4850
4853
  /* @__PURE__ */ jsx(
4851
4854
  TextField,
4852
4855
  {
@@ -4864,8 +4867,8 @@ function NewChannelDialog({ open, onSubmit, onClose, ...rest }) {
4864
4867
  }
4865
4868
  )
4866
4869
  ] }),
4867
- /* @__PURE__ */ jsxs(Box, { children: [
4868
- /* @__PURE__ */ jsx(Box, { sx: { fontSize: 14, fontWeight: "medium", mb: 0 }, children: t("chat.channelDescription") }),
4870
+ /* @__PURE__ */ jsxs(Box$1, { children: [
4871
+ /* @__PURE__ */ jsx(Box$1, { sx: { fontSize: 14, fontWeight: "medium", mb: 0 }, children: t("chat.channelDescription") }),
4869
4872
  /* @__PURE__ */ jsx(
4870
4873
  TextField,
4871
4874
  {
@@ -4924,7 +4927,7 @@ function UserSearch({ sx, ...rest }) {
4924
4927
  }
4925
4928
  );
4926
4929
  const mergedSx = mergeSx({}, sx);
4927
- return /* @__PURE__ */ jsxs(Box$1, { sx: mergedSx, ...rest, children: [
4930
+ return /* @__PURE__ */ jsxs(Box, { sx: mergedSx, ...rest, children: [
4928
4931
  /* @__PURE__ */ jsx(
4929
4932
  Autocomplete,
4930
4933
  {
@@ -4938,10 +4941,10 @@ function UserSearch({ sx, ...rest }) {
4938
4941
  filterOptions: (x) => x,
4939
4942
  options: data || [],
4940
4943
  getOptionLabel: () => "",
4941
- renderOption: (props, option) => /* @__PURE__ */ createElement(Box$1, { component: "li", ...props, key: option.did, sx: { px: "8px!important" } }, /* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", alignItems: "center", width: 1 }, children: [
4942
- /* @__PURE__ */ jsx(Box$1, { sx: { mt: 0.25, lineHeight: 1 }, children: /* @__PURE__ */ jsx(Avatar, { did: option.did, src: option.avatar, size: 28, shape: "circle", variant: "circle" }) }),
4944
+ renderOption: (props, option) => /* @__PURE__ */ createElement(Box, { component: "li", ...props, key: option.did, sx: { px: "8px!important" } }, /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", alignItems: "center", width: 1 }, children: [
4945
+ /* @__PURE__ */ jsx(Box, { sx: { mt: 0.25, lineHeight: 1 }, children: /* @__PURE__ */ jsx(Avatar, { did: option.did, src: option.avatar, size: 28, shape: "circle", variant: "circle" }) }),
4943
4946
  /* @__PURE__ */ jsxs(
4944
- Box$1,
4947
+ Box,
4945
4948
  {
4946
4949
  sx: {
4947
4950
  flex: 1,
@@ -4965,7 +4968,7 @@ function UserSearch({ sx, ...rest }) {
4965
4968
  children: option.fullName
4966
4969
  }
4967
4970
  ),
4968
- /* @__PURE__ */ jsx(Box$1, { sx: { ".span": { lineHeight: 1 } }, children: /* @__PURE__ */ jsx(DID, { did: option.did, copyable: false, compact: true, responsive: false, size: 12 }) })
4971
+ /* @__PURE__ */ jsx(Box, { sx: { ".span": { lineHeight: 1 } }, children: /* @__PURE__ */ jsx(DID, { did: option.did, copyable: false, compact: true, responsive: false, size: 12 }) })
4969
4972
  ]
4970
4973
  }
4971
4974
  )
@@ -5006,7 +5009,7 @@ function UserSearch({ sx, ...rest }) {
5006
5009
  InputProps: {
5007
5010
  ...params.InputProps,
5008
5011
  type: "search",
5009
- startAdornment: /* @__PURE__ */ jsx(InputAdornment, { position: "start", children: /* @__PURE__ */ jsx(Box$1, { component: tablerSearch, sx: { fontSize: 14 } }) })
5012
+ startAdornment: /* @__PURE__ */ jsx(InputAdornment, { position: "start", children: /* @__PURE__ */ jsx(Box, { component: tablerSearch, sx: { fontSize: 14 } }) })
5010
5013
  },
5011
5014
  sx: {
5012
5015
  fontSize: 12,
@@ -5039,9 +5042,9 @@ function Empty$2({ sx }) {
5039
5042
  },
5040
5043
  ...Array.isArray(sx) ? sx : [sx]
5041
5044
  ];
5042
- return /* @__PURE__ */ jsxs(Box, { sx: mergedSx, children: [
5045
+ return /* @__PURE__ */ jsxs(Box$1, { sx: mergedSx, children: [
5043
5046
  /* @__PURE__ */ jsx(iconoirChatBubbleEmpty, { style: { fontSize: 32 } }),
5044
- /* @__PURE__ */ jsx(Box, { component: "span", sx: { fontSize: 14, fontWeight: 500 }, children: t("chat.noChats") })
5047
+ /* @__PURE__ */ jsx(Box$1, { component: "span", sx: { fontSize: 14, fontWeight: 500 }, children: t("chat.noChats") })
5045
5048
  ] });
5046
5049
  }
5047
5050
  function Chat({ sx, ...rest }) {
@@ -5090,10 +5093,10 @@ function Chat({ sx, ...rest }) {
5090
5093
  setNewChannelVisible(false);
5091
5094
  setActiveChat(newChannel);
5092
5095
  };
5093
- return /* @__PURE__ */ jsxs(Box, { ...rest, sx: mergedSx, children: [
5096
+ return /* @__PURE__ */ jsxs(Box$1, { ...rest, sx: mergedSx, children: [
5094
5097
  /* @__PURE__ */ jsx(Helmet, { title: getWebTitle() }),
5095
5098
  show.left && /* @__PURE__ */ jsxs(
5096
- Box,
5099
+ Box$1,
5097
5100
  {
5098
5101
  sx: {
5099
5102
  display: "flex",
@@ -5103,7 +5106,7 @@ function Chat({ sx, ...rest }) {
5103
5106
  },
5104
5107
  children: [
5105
5108
  /* @__PURE__ */ jsxs(
5106
- Box,
5109
+ Box$1,
5107
5110
  {
5108
5111
  sx: {
5109
5112
  display: "flex",
@@ -5132,7 +5135,7 @@ function Chat({ sx, ...rest }) {
5132
5135
  ]
5133
5136
  }
5134
5137
  ),
5135
- show.right && /* @__PURE__ */ jsxs(Box, { sx: { flex: 1, overflow: "hidden" }, children: [
5138
+ show.right && /* @__PURE__ */ jsxs(Box$1, { sx: { flex: 1, overflow: "hidden" }, children: [
5136
5139
  chats.map((chat) => {
5137
5140
  return /* @__PURE__ */ jsx(ChatRoom, { chat, inWallet: false }, chat.id);
5138
5141
  }),
@@ -5162,9 +5165,9 @@ function Empty$1({ sx }) {
5162
5165
  },
5163
5166
  ...Array.isArray(sx) ? sx : [sx]
5164
5167
  ];
5165
- return /* @__PURE__ */ jsxs(Box, { sx: mergedSx, children: [
5168
+ return /* @__PURE__ */ jsxs(Box$1, { sx: mergedSx, children: [
5166
5169
  /* @__PURE__ */ jsx(iconoirChatBubbleEmpty, { style: { fontSize: 32 } }),
5167
- /* @__PURE__ */ jsx(Box, { component: "span", sx: { fontSize: 14, fontWeight: 500 }, children: t("chat.noChats") })
5170
+ /* @__PURE__ */ jsx(Box$1, { component: "span", sx: { fontSize: 14, fontWeight: 500 }, children: t("chat.noChats") })
5168
5171
  ] });
5169
5172
  }
5170
5173
  function ChatInWallet({ sx, ...rest }) {
@@ -5189,7 +5192,7 @@ function ChatInWallet({ sx, ...rest }) {
5189
5192
  return /* @__PURE__ */ jsx(CircularProgress, {});
5190
5193
  }
5191
5194
  const mergedSx = [{ display: "flex", height: "100%", bgcolor: "#fff" }, ...Array.isArray(sx) ? sx : [sx]];
5192
- return /* @__PURE__ */ jsx(Box, { ...rest, sx: mergedSx, children: show.right && /* @__PURE__ */ jsxs(Box, { sx: { flex: 1, overflow: "hidden" }, children: [
5195
+ return /* @__PURE__ */ jsx(Box$1, { ...rest, sx: mergedSx, children: show.right && /* @__PURE__ */ jsxs(Box$1, { sx: { flex: 1, overflow: "hidden" }, children: [
5193
5196
  /* @__PURE__ */ jsx(ChatRoom, { chat: activeChat, inWallet: true }),
5194
5197
  !activeChatId && /* @__PURE__ */ jsx(Empty$1, { sx: { height: 1 } })
5195
5198
  ] }) });
@@ -5207,9 +5210,9 @@ function Empty({ sx }) {
5207
5210
  },
5208
5211
  ...Array.isArray(sx) ? sx : [sx]
5209
5212
  ];
5210
- return /* @__PURE__ */ jsxs(Box, { sx: mergedSx, children: [
5213
+ return /* @__PURE__ */ jsxs(Box$1, { sx: mergedSx, children: [
5211
5214
  /* @__PURE__ */ jsx(iconoirChatBubbleEmpty, { style: { fontSize: 32 } }),
5212
- /* @__PURE__ */ jsx(Box, { component: "span", sx: { fontSize: 14, fontWeight: 500 }, children: t("chat.noChats") })
5215
+ /* @__PURE__ */ jsx(Box$1, { component: "span", sx: { fontSize: 14, fontWeight: 500 }, children: t("chat.noChats") })
5213
5216
  ] });
5214
5217
  }
5215
5218
  function ChatListInWallet({ sx, ...rest }) {
@@ -5231,8 +5234,8 @@ function ChatListInWallet({ sx, ...rest }) {
5231
5234
  return /* @__PURE__ */ jsx(CircularProgress, {});
5232
5235
  }
5233
5236
  const mergedSx = [{ display: "flex", height: "100%", bgcolor: "#fff" }, ...Array.isArray(sx) ? sx : [sx]];
5234
- return /* @__PURE__ */ jsx(Box, { ...rest, sx: mergedSx, children: show.left && /* @__PURE__ */ jsxs(
5235
- Box,
5237
+ return /* @__PURE__ */ jsx(Box$1, { ...rest, sx: mergedSx, children: show.left && /* @__PURE__ */ jsxs(
5238
+ Box$1,
5236
5239
  {
5237
5240
  sx: {
5238
5241
  display: "flex",
@@ -5267,7 +5270,7 @@ function SecureLabelPicker(props) {
5267
5270
  const addon = editable ? (
5268
5271
  // @ts-ignore
5269
5272
  /* @__PURE__ */ jsx(AccessControl, { roles: ["admin", "owner"], children: /* @__PURE__ */ jsxs(
5270
- Box,
5273
+ Box$1,
5271
5274
  {
5272
5275
  className: "label-box",
5273
5276
  component: Link,
@@ -5361,9 +5364,9 @@ const useDefaultApiErrorHandler = (options) => {
5361
5364
  }
5362
5365
  case 409: {
5363
5366
  showWarning(
5364
- /* @__PURE__ */ jsxs(Box, { children: [
5365
- /* @__PURE__ */ jsx(Box, { children: t("apiError.409") }),
5366
- /* @__PURE__ */ jsxs(Box, { children: [
5367
+ /* @__PURE__ */ jsxs(Box$1, { children: [
5368
+ /* @__PURE__ */ jsx(Box$1, { children: t("apiError.409") }),
5369
+ /* @__PURE__ */ jsxs(Box$1, { children: [
5367
5370
  "(",
5368
5371
  t("apiError.staleTip"),
5369
5372
  ")"
@@ -5578,9 +5581,9 @@ function Pagination({
5578
5581
  }
5579
5582
  );
5580
5583
  }
5581
- const Editor = lazy(() => import("./editor-xw6iQCuH.mjs"));
5584
+ const Editor = lazy(() => import("./editor-s7PBL7A3.mjs"));
5582
5585
  function LazyEditor(props) {
5583
- const fallback = /* @__PURE__ */ jsxs(Box$1, { sx: { px: 3 }, children: [
5586
+ const fallback = /* @__PURE__ */ jsxs(Box, { sx: { px: 3 }, children: [
5584
5587
  /* @__PURE__ */ jsx(Skeleton, {}),
5585
5588
  /* @__PURE__ */ jsx(Skeleton, { width: "80%" }),
5586
5589
  /* @__PURE__ */ jsx(Skeleton, { width: "60%" }),
@@ -5629,8 +5632,22 @@ const useDirtyPrompt = () => {
5629
5632
  const { t } = useLocaleContext();
5630
5633
  const [dirty, setDirty, getDirty] = useGetState(false);
5631
5634
  const { confirm } = useConfirm();
5635
+ const resetCallbackRef = useRef(null);
5632
5636
  useBeforeUnloadPrompt(dirty);
5633
- const reset = useCallback(() => setDirty(false), [setDirty]);
5637
+ const reset = useCallback(
5638
+ (callback) => {
5639
+ resetCallbackRef.current = callback;
5640
+ setDirty(false);
5641
+ },
5642
+ [setDirty]
5643
+ );
5644
+ useEffect(() => {
5645
+ var _a2;
5646
+ if (!dirty) {
5647
+ (_a2 = resetCallbackRef.current) == null ? void 0 : _a2.call(resetCallbackRef);
5648
+ resetCallbackRef.current = null;
5649
+ }
5650
+ }, [dirty]);
5634
5651
  const markDirty = useCallback(() => setDirty(true), [setDirty]);
5635
5652
  const check = useCallback(async () => {
5636
5653
  if (getDirty()) {
@@ -11384,7 +11401,7 @@ const usePointUpContext = () => useContext(PointUpContext);
11384
11401
  function PointUp({ points }) {
11385
11402
  const { t } = useLocaleContext();
11386
11403
  return /* @__PURE__ */ jsxs(
11387
- Box,
11404
+ Box$1,
11388
11405
  {
11389
11406
  sx: {
11390
11407
  display: "inline-flex",
@@ -11405,7 +11422,7 @@ function PointUp({ points }) {
11405
11422
  }
11406
11423
  ),
11407
11424
  /* @__PURE__ */ jsx(
11408
- Box,
11425
+ Box$1,
11409
11426
  {
11410
11427
  sx: {
11411
11428
  mt: 1,
@@ -11485,7 +11502,7 @@ function PointUpProvider({ children }) {
11485
11502
  return /* @__PURE__ */ jsxs(PointUpContext.Provider, { value, children: [
11486
11503
  (pointUpComponent == null ? void 0 : pointUpComponent.mountPoint) && createPortal(
11487
11504
  /* @__PURE__ */ jsx(
11488
- Box,
11505
+ Box$1,
11489
11506
  {
11490
11507
  onClick: () => {
11491
11508
  window.open(joinUrl(window.location.origin, pointUpComponent.mountPoint, "my"));
@@ -11594,9 +11611,9 @@ function ButtonGroup({
11594
11611
  }, [selectTab, selectedArray, boardId]);
11595
11612
  return (
11596
11613
  // eslint-disable-next-line @typescript-eslint/no-use-before-define
11597
- /* @__PURE__ */ jsxs(Box$1, { className: Group, children: [
11614
+ /* @__PURE__ */ jsxs(Box, { className: Group, children: [
11598
11615
  /* @__PURE__ */ jsxs(
11599
- Box$1,
11616
+ Box,
11600
11617
  {
11601
11618
  sx: {
11602
11619
  bgcolor: theme === "dark" ? "#F9FAFB" : "",
@@ -11637,7 +11654,7 @@ function ButtonGroup({
11637
11654
  }
11638
11655
  },
11639
11656
  ...rest,
11640
- children: /* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", alignItems: "center" }, children: [
11657
+ children: /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", alignItems: "center" }, children: [
11641
11658
  item == null ? void 0 : item.icon,
11642
11659
  " ",
11643
11660
  item == null ? void 0 : item.title