@ynput/ayon-frontend-shared 0.6.3 → 0.6.5

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 (51) hide show
  1. package/dist/DetailsPanel.es.js +480 -477
  2. package/dist/ListTable.es.js +24 -25
  3. package/dist/NewEntity.es.js +6 -7
  4. package/dist/ProjectTreeTable.es.js +2016 -1996
  5. package/dist/Views.es.js +28 -28
  6. package/dist/api.es.js +291 -289
  7. package/dist/chunks/Actions.es.js +12 -12
  8. package/dist/chunks/ColumnDropIndicator.es.js +8 -9
  9. package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +31 -25
  10. package/dist/chunks/DeleteEntitiesContextInstance.es.js +1 -1
  11. package/dist/chunks/DetailsDialog.es.js +1 -1
  12. package/dist/chunks/EmptyPlaceholder.es.js +13 -12
  13. package/dist/chunks/EntityPath.es.js +67 -67
  14. package/dist/chunks/EntityPickerDialog.es.js +1 -1
  15. package/dist/chunks/EntityTooltip.es.js +8 -8
  16. package/dist/chunks/Feed.es.js +692 -689
  17. package/dist/chunks/MetaWidget.es.js +1283 -1279
  18. package/dist/chunks/PlayableIcon.es.js +458 -451
  19. package/dist/chunks/ProjectContext.es.js +20 -20
  20. package/dist/chunks/RepresentationsList.es.js +9 -9
  21. package/dist/chunks/ReviewablesSelector.es.js +1504 -1374
  22. package/dist/chunks/Slicer.es.js +68 -69
  23. package/dist/chunks/ThumbnailSimple.es.js +4 -4
  24. package/dist/chunks/Watchers.es.js +104 -105
  25. package/dist/chunks/activeEntities.es.js +58 -0
  26. package/dist/chunks/columnConfigConverter.es.js +57 -63
  27. package/dist/chunks/getUris.es.js +886 -831
  28. package/dist/chunks/iconUtils.es.js +151 -0
  29. package/dist/chunks/realtimeUpdatesUtils.es.js +113 -80
  30. package/dist/chunks/searchTerms.es.js +329 -247
  31. package/dist/chunks/useAttributeEnums.es.js +34 -34
  32. package/dist/chunks/viewUpdateHelper.es.js +11 -11
  33. package/dist/components.es.js +340 -337
  34. package/dist/context.es.js +48 -48
  35. package/dist/hooks.es.js +34 -34
  36. package/dist/index.es.js +1 -1
  37. package/dist/types/ContextMenu.d.ts +1 -1
  38. package/dist/types/Feed.d.ts +1 -1
  39. package/dist/types/ListTable.d.ts +1 -1
  40. package/dist/types/ProjectTreeTable.d.ts +4 -1
  41. package/dist/types/SimpleTable.d.ts +1 -1
  42. package/dist/types/Slicer.d.ts +5 -5
  43. package/dist/types/Views.d.ts +4 -4
  44. package/dist/types/api.d.ts +545 -171
  45. package/dist/types/components.d.ts +64 -9
  46. package/dist/types/context.d.ts +5 -5
  47. package/dist/types/util.d.ts +237 -2
  48. package/dist/util.es.js +127 -114
  49. package/package.json +1 -1
  50. package/dist/chunks/extractEntityHierarchyFromParents.es.js +0 -28
  51. package/dist/chunks/parseHtmlToPlainTextWithLinks.es.js +0 -138
@@ -1,17 +1,17 @@
1
1
  import { jsx as c, jsxs as x, Fragment as Ae } from "react/jsx-runtime";
2
- import Wt, { useMemo as N, useState as L, useEffect as Y, lazy as ro, Suspense as io, useCallback as We, useRef as ye, forwardRef as pt, useId as so, Fragment as co } from "react";
3
- import { v4 as pn } from "uuid";
4
- import te, { clsx as gn } from "clsx";
5
- import hn from "react-markdown";
6
- import fn from "remark-emoji";
7
- import yn from "remark-gfm";
8
- import lo from "remark-directive";
9
- import uo from "remark-directive-rehype";
2
+ import Qt, { useMemo as N, useState as L, useEffect as Y, lazy as so, Suspense as co, useCallback as We, useRef as fe, forwardRef as pt, useId as lo, Fragment as uo } from "react";
3
+ import { v4 as gn } from "uuid";
4
+ import te, { clsx as hn } from "clsx";
5
+ import fn from "react-markdown";
6
+ import yn from "remark-emoji";
7
+ import vn from "remark-gfm";
8
+ import mo from "remark-directive";
9
+ import po from "remark-directive-rehype";
10
10
  import { toast as ke } from "react-toastify";
11
- import { $createListItemNode as mo, $createListNode as po } from "@lexical/list";
12
- import { $getRoot as go } from "lexical";
13
- import { Button as at, Dialog as ho, getFileSizeString as fo, Icon as re, theme as vn, getTextColor as Nt, Dropdown as yo, SaveButton as vo, UserImage as bn, SEARCH_FILTER_ID as wn, buildFilterId as Qt, getFilterFromId as bo, SearchFilter as wo } from "@ynput/ayon-react-components";
14
- import { p as xo, Y as ko, q as Ao, P as Fo, o as xn, L as Co, l as To, V as Do, r as Yt, s as No, u as So, E as Io, M as Eo, T as Mo, v as _o, F as Po, w as Ro, x as $o, y as Lo, z as Oo, G as jo, S as Vo, H as zo, I as Uo, J as St, n as kn, K as Bo, A as Go, O as Ho, Q as qo, R as Wo, W as Qo, X as Yo, Z as Jo, _ as Jt, $ as Ko, a0 as Xo, a1 as Zo, a2 as ea, a3 as ta, a4 as na, b as oa, j as aa } from "./PlayableIcon.es.js";
11
+ import { $createListItemNode as go, $createListNode as ho } from "@lexical/list";
12
+ import { $getRoot as fo } from "lexical";
13
+ import { Button as at, Dialog as yo, getFileSizeString as vo, Icon as re, theme as bn, getTextColor as St, Dropdown as bo, SaveButton as wo, UserImage as wn, SEARCH_FILTER_ID as xn, buildFilterId as Yt, getFilterFromId as xo, SearchFilter as ko } from "@ynput/ayon-react-components";
14
+ import { p as Ao, Y as Fo, q as Co, P as To, o as kn, L as Do, l as No, V as So, r as Jt, s as Io, u as Eo, E as Mo, M as _o, T as Po, v as Ro, F as $o, w as Lo, x as Oo, y as jo, z as Vo, G as zo, S as Uo, H as Bo, I as Go, J as It, n as An, K as Ho, A as qo, O as Wo, Q as Qo, R as Yo, W as Jo, X as Xo, Z as Ko, _ as Xt, $ as Zo, a0 as ea, a1 as ta, a2 as na, a3 as oa, a4 as aa, b as ra, j as ia } from "./PlayableIcon.es.js";
15
15
  import "@lexical/markdown";
16
16
  import "@lexical/react/LexicalBlockWithAlignableContents";
17
17
  import "@lexical/react/LexicalDecoratorBlockNode";
@@ -19,38 +19,37 @@ import "@lexical/code";
19
19
  import "@lexical/rich-text";
20
20
  import "@lexical/selection";
21
21
  import "@lexical/utils";
22
- import F, { css as It } from "styled-components";
23
- import ra from "@uiw/react-textarea-code-editor";
24
- import { E as Ft } from "./EmptyPlaceholder.es.js";
25
- import { a as ia, M as sa } from "./Menu.es.js";
26
- import { aQ as ca, bi as Kt } from "./searchTerms.es.js";
27
- import { bf as la, bi as da, aE as ua, dd as ma, aR as pa, aL as ga, a_ as ha, K as fa, bA as ya, bh as va, bs as ba, bm as wa, bg as xa, bV as ka } from "./getUris.es.js";
22
+ import F, { css as Et } from "styled-components";
23
+ import sa from "@uiw/react-textarea-code-editor";
24
+ import { E as Ct } from "./EmptyPlaceholder.es.js";
25
+ import { a as ca, M as la } from "./Menu.es.js";
26
+ import { aQ as da, bi as Kt } from "./searchTerms.es.js";
27
+ import { bg as ua, bj as ma, aF as pa, df as ga, aS as ha, aM as fa, a$ as ya, N as va, bB as ba, bi as wa, bt as xa, bn as ka, bh as Aa, bX as Fa } from "./getUris.es.js";
28
28
  import "primereact/confirmdialog";
29
- import { union as Aa, isEqual as Fa } from "lodash";
30
- import { b as Ca, F as Ta, u as Re, a as An, T as Da, C as Na } from "./ThumbnailSimple.es.js";
29
+ import { union as Ca, isEqual as Ta } from "lodash";
30
+ import { b as Da, F as Na, u as Re, a as Fn, T as Sa, C as Ia } from "./ThumbnailSimple.es.js";
31
31
  import "@module-federation/enhanced/runtime";
32
- import { v as ze, x as Sa, _ as Et, u as Ia } from "./DeleteEntitiesContextInstance.es.js";
32
+ import { v as ze, x as Ea, _ as Mt, u as Ma } from "./DeleteEntitiesContextInstance.es.js";
33
33
  import "semver";
34
34
  import "./ContextMenuContextInstance.es.js";
35
35
  import "react-dom";
36
36
  import "react-redux";
37
- import { p as fe } from "./parseFilename.es.js";
38
- import Mt from "axios";
39
- import { b as Xt } from "./colorUtils.es.js";
37
+ import { p as he } from "./parseFilename.es.js";
38
+ import _t from "axios";
39
+ import { b as Zt } from "./colorUtils.es.js";
40
40
  import "./EntityTooltip.es.js";
41
- import { isValid as rt, isToday as Ea, isSameYear as Ma, isSameDay as _a, isSameWeek as Pa, isSameMinute as Ra, format as Zt, formatISO as $a, differenceInMinutes as La, differenceInSeconds as Oa, compareAsc as ja } from "date-fns";
42
- import "react-router-dom";
41
+ import { isValid as rt, isToday as _a, isSameYear as Pa, isSameDay as Ra, isSameWeek as $a, isSameMinute as La, format as en, formatISO as Oa, differenceInMinutes as ja, differenceInSeconds as Va, compareAsc as za } from "date-fns";
43
42
  import "./MenuItem.es.js";
44
- import { InView as Va } from "react-intersection-observer";
45
- import { t as za, c as Ua } from "./queryFilterToClientFilter.es.js";
46
- import { u as Ba } from "./useDateRangeFilter.es.js";
43
+ import { InView as Ua } from "react-intersection-observer";
44
+ import { t as Ba, c as Ga } from "./queryFilterToClientFilter.es.js";
45
+ import { u as Ha } from "./useDateRangeFilter.es.js";
47
46
  import "match-sorter";
48
- import { c as Ga } from "./confirmDelete.es.js";
49
- import { c as Fn } from "./copyToClipboard.es.js";
50
- import { g as en } from "./realtimeUpdatesUtils.es.js";
51
- const Ha = (e) => e.replace(/\r\n?/g, `
47
+ import { c as qa } from "./confirmDelete.es.js";
48
+ import { c as Cn } from "./copyToClipboard.es.js";
49
+ import { g as tn } from "./realtimeUpdatesUtils.es.js";
50
+ const Wa = (e) => e.replace(/\r\n?/g, `
52
51
  `).replace(/^\s*(```|~~~).*$/gm, "").replace(/!?\[([^\]]*)\]\((?:\\.|[^)\\])*\)/g, "$1").replace(/<(https?:[^>]+)>/g, "$1").replace(/<\/?[a-z][^>]*>/gi, "").replace(/[<>]/g, "").replace(/&nbsp;/g, " ").replace(/^\s*#{1,6}\s+/gm, "").replace(/^\s*>\s?/gm, "").replace(/^\s*(?:[-*+]|\d+[.)])\s+(?:\[[ xX]\]\s+)?/gm, "").replace(/`([^`]*)`/g, "$1").replace(/(\*\*|__)(.+?)\1/g, "$2").replace(/~~(.+?)~~/g, "$1").replace(/(^|[^\w*\\])\*(?!\s)([^*]+?)\*(?!\w)/g, "$1$2").replace(/(^|[^\w\\])_(?!\s)([^_]+?)_(?!\w)/g, "$1$2").replace(/\\\n/g, `
53
- `).replace(/\\([\\`*_{}[\]()#+\-.!~>|])/g, "$1").replace(/\s+/g, " ").trim(), qa = (e) => {
52
+ `).replace(/\\([\\`*_{}[\]()#+\-.!~>|])/g, "$1").replace(/\s+/g, " ").trim(), Qa = (e) => {
54
53
  const t = (e.node?.children ?? []).filter(
55
54
  (s) => !(s.type === "text" && !s.value?.trim())
56
55
  );
@@ -59,9 +58,9 @@ const Ha = (e) => e.replace(/\r\n?/g, `
59
58
  if (o.type !== "element" || o.tagName !== "a") return null;
60
59
  const n = o.properties?.href, a = o.children?.map((s) => s.value ?? "").join("");
61
60
  if (!n || a?.trim() !== n) return null;
62
- const r = xo(n);
63
- return r ? /* @__PURE__ */ c(ko, { video: r }) : null;
64
- }, Wa = (e, { onOpen: t } = {}) => {
61
+ const r = Ao(n);
62
+ return r ? /* @__PURE__ */ c(Fo, { video: r }) : null;
63
+ }, Ya = (e, { onOpen: t } = {}) => {
65
64
  const o = (e.node?.children ?? []).filter(
66
65
  (i) => !(i.type === "text" && !i.value?.trim())
67
66
  );
@@ -69,8 +68,8 @@ const Ha = (e) => e.replace(/\r\n?/g, `
69
68
  const [n] = o;
70
69
  if (n.type !== "element" || n.tagName !== "img") return null;
71
70
  const { src: a, alt: r, title: s } = n.properties ?? {};
72
- return a ? /* @__PURE__ */ c(Ao, { src: a, alt: r, mime: s, onOpen: t ? () => t(a) : void 0 }) : null;
73
- }, Qa = ({
71
+ return a ? /* @__PURE__ */ c(Co, { src: a, alt: r, mime: s, onOpen: t ? () => t(a) : void 0 }) : null;
72
+ }, Ja = ({
74
73
  entities: e,
75
74
  filter: t,
76
75
  backendFilter: o,
@@ -93,22 +92,22 @@ const Ha = (e) => e.replace(/\r\n?/g, `
93
92
  data: p,
94
93
  isLoading: m,
95
94
  isFetchingNextPage: g,
96
- currentData: h,
97
- fetchNextPage: f,
95
+ currentData: f,
96
+ fetchNextPage: h,
98
97
  hasNextPage: b
99
- } = la(u, { skip: l });
100
- const D = N(() => p?.pages ? p.pages.flatMap((A) => A.activities || []) : [], [p?.pages]), R = N(() => h?.pages ? h.pages.flatMap((A) => A.activities || []) : [], [h?.pages]), v = async () => {
98
+ } = ua(u, { skip: l });
99
+ const D = N(() => p?.pages ? p.pages.flatMap((A) => A.activities || []) : [], [p?.pages]), R = N(() => f?.pages ? f.pages.flatMap((A) => A.activities || []) : [], [f?.pages]), v = async () => {
101
100
  if (!b) {
102
101
  console.log("No more activities to load");
103
102
  return;
104
103
  }
105
- return console.log("loading next page..."), await f();
104
+ return console.log("loading next page..."), await h();
106
105
  }, y = N(() => {
107
106
  if (!m) return !1;
108
- const A = Aa(
107
+ const A = Ca(
109
108
  R?.flatMap((C) => C.entityId ? C.entityId : [])
110
109
  );
111
- return !Fa(A, i);
110
+ return !Ta(A, i);
112
111
  }, [R, i, m]);
113
112
  return l && (m = !0), {
114
113
  activitiesData: D,
@@ -118,8 +117,8 @@ const Ha = (e) => e.replace(/\r\n?/g, `
118
117
  hasNextPage: b,
119
118
  loadNextPage: v
120
119
  };
121
- }, nt = "__new__", mc = ({ children: e, ...t }) => {
122
- const { isGuest: o } = ze(), { data: n = [] } = da({ projects: [t.projectName] }), { data: a = [] } = ca.useGetTeamsQuery(
120
+ }, nt = "__new__", pc = ({ children: e, ...t }) => {
121
+ const { isGuest: o } = ze(), { data: n = [] } = ma({ projects: [t.projectName] }), { data: a = [] } = da.useGetTeamsQuery(
123
122
  { projectName: t.projectName, showMembers: !0 },
124
123
  { skip: !t.projectName }
125
124
  ), r = N(
@@ -128,14 +127,14 @@ const Ha = (e) => e.replace(/\r\n?/g, `
128
127
  ), [s, i] = L({
129
128
  operator: "and",
130
129
  conditions: []
131
- }), [l, u] = L(""), p = t.feedFilter ?? s, m = t.setFeedFilter ?? i, [g, h] = L(null), [f, b] = L(null), [D, { isLoading: R }] = ua(), [v, { isLoading: y }] = ma(), [A, { isLoading: C }] = pa(), S = R || y || C, M = async (O) => await D(O).unwrap(), I = async (O) => await v(O).unwrap(), E = async (O) => await A(O).unwrap(), [P] = ga(), [H] = ha(), Q = async (O) => await P(O).unwrap(), K = async (O) => await H(O).unwrap(), q = fa(p), $ = N(() => Ca(p), [p]), ue = Qa({
130
+ }), [l, u] = L(""), p = t.feedFilter ?? s, m = t.setFeedFilter ?? i, [g, f] = L(null), [h, b] = L(null), [D, { isLoading: R }] = pa(), [v, { isLoading: y }] = ga(), [A, { isLoading: C }] = ha(), S = R || y || C, M = async (O) => await D(O).unwrap(), I = async (O) => await v(O).unwrap(), E = async (O) => await A(O).unwrap(), [P] = fa(), [H] = ya(), Q = async (O) => await P(O).unwrap(), X = async (O) => await H(O).unwrap(), q = va(p), $ = N(() => Da(p), [p]), ue = Ja({
132
131
  entities: t.entities,
133
132
  filter: p,
134
133
  backendFilter: $,
135
134
  activityTypes: q,
136
135
  projectName: t.projectName,
137
136
  entityType: t.entityType
138
- }), { data: J = {} } = ya(
137
+ }), { data: J = {} } = ba(
139
138
  {
140
139
  suggestRequest: {
141
140
  entityType: t.entityType,
@@ -144,9 +143,9 @@ const Ha = (e) => e.replace(/\r\n?/g, `
144
143
  projectName: t.projectName
145
144
  },
146
145
  { skip: !g }
147
- ), { data: W = [] } = va({
146
+ ), { data: W = [] } = wa({
148
147
  projectName: t.projectName
149
- }), { data: ve } = ba(
148
+ }), { data: ve } = xa(
150
149
  {
151
150
  projectName: t.projectName,
152
151
  entityIds: t.entities.map((O) => O.id)
@@ -154,7 +153,7 @@ const Ha = (e) => e.replace(/\r\n?/g, `
154
153
  { skip: !t.projectName || !t.entities.length }
155
154
  );
156
155
  return /* @__PURE__ */ c(
157
- Ta.Provider,
156
+ Na.Provider,
158
157
  {
159
158
  value: {
160
159
  ...t,
@@ -165,7 +164,7 @@ const Ha = (e) => e.replace(/\r\n?/g, `
165
164
  users: n,
166
165
  isUpdatingActivity: S,
167
166
  userTeamNames: r,
168
- refTooltip: f,
167
+ refTooltip: h,
169
168
  activityTypes: q,
170
169
  feedFilter: p,
171
170
  setFeedFilter: m,
@@ -174,19 +173,19 @@ const Ha = (e) => e.replace(/\r\n?/g, `
174
173
  setSearchText: u,
175
174
  isGuest: o,
176
175
  editingId: g,
177
- setEditingId: h,
176
+ setEditingId: f,
178
177
  setRefTooltip: b,
179
178
  // Query functions
180
179
  createEntityActivity: M,
181
180
  updateActivity: I,
182
181
  deleteActivity: E,
183
182
  createReaction: Q,
184
- deleteReaction: K
183
+ deleteReaction: X
185
184
  },
186
185
  children: e
187
186
  }
188
187
  );
189
- }, Ya = F.div`
188
+ }, Xa = F.div`
190
189
  display: grid;
191
190
  grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
192
191
  gap: var(--base-gap-large);
@@ -202,7 +201,7 @@ const Ha = (e) => e.replace(/\r\n?/g, `
202
201
  301px + var(--padding-s) + var(--padding-s) + var(--base-gap-large)+ var(--base-gap-large)
203
202
  );
204
203
  overflow: auto;
205
- `, Ja = F.div`
204
+ `, Ka = F.div`
206
205
  position: relative;
207
206
  display: flex;
208
207
  flex-direction: column;
@@ -248,7 +247,7 @@ const Ha = (e) => e.replace(/\r\n?/g, `
248
247
  .download-icon {
249
248
  color: var(--md-sys-color-outline);
250
249
  }
251
- `, Ka = F.footer`
250
+ `, Za = F.footer`
252
251
  background-color: var(--md-sys-color-surface-container-low);
253
252
  display: flex;
254
253
  align-items: center;
@@ -348,7 +347,7 @@ const Ha = (e) => e.replace(/\r\n?/g, `
348
347
  }
349
348
  }
350
349
  }
351
- `, Xa = F.div`
350
+ `, er = F.div`
352
351
  position: relative;
353
352
  display: flex;
354
353
  justify-content: center;
@@ -385,7 +384,7 @@ const Ha = (e) => e.replace(/\r\n?/g, `
385
384
  &:hover .image-wrapper::after {
386
385
  opacity: 0.8;
387
386
  }
388
- `, tn = F.div`
387
+ `, nn = F.div`
389
388
  position: absolute;
390
389
  inset: 0;
391
390
  display: flex;
@@ -424,7 +423,7 @@ const Ha = (e) => e.replace(/\r\n?/g, `
424
423
  &.posterError {
425
424
  background-color: transparent;
426
425
  }
427
- `, Za = F.div`
426
+ `, tr = F.div`
428
427
  display: none;
429
428
  position: absolute;
430
429
  left: 0;
@@ -433,7 +432,7 @@ const Ha = (e) => e.replace(/\r\n?/g, `
433
432
  height: calc(100% - 20px);
434
433
  width: 100%;
435
434
  gap: 0;
436
- `, nn = F(at)`
435
+ `, on = F(at)`
437
436
  height: 100%;
438
437
  width: 100%;
439
438
  border: none;
@@ -444,7 +443,7 @@ const Ha = (e) => e.replace(/\r\n?/g, `
444
443
  background: none;
445
444
  opacity: 1;
446
445
  }
447
- `, er = F(Fo)`
446
+ `, nr = F(To)`
448
447
  --icon-size: 32px;
449
448
  top: calc(50% - 10px);
450
449
  left: 50%;
@@ -456,7 +455,7 @@ const Ha = (e) => e.replace(/\r\n?/g, `
456
455
  .icon {
457
456
  font-size: var(--icon-size);
458
457
  }
459
- `, pc = F(ho)`
458
+ `, gc = F(yo)`
460
459
  min-height: 90vh;
461
460
  max-height: 90vh;
462
461
  min-width: min(90vw, 100%);
@@ -541,7 +540,7 @@ const Ha = (e) => e.replace(/\r\n?/g, `
541
540
  &:focus-visible {
542
541
  outline: none;
543
542
  }
544
- `, tr = F.img`
543
+ `, or = F.img`
545
544
  height: 100%;
546
545
  width: 100%;
547
546
 
@@ -551,7 +550,7 @@ const Ha = (e) => e.replace(/\r\n?/g, `
551
550
  max-width: 90vw;
552
551
  min-width: 300px;
553
552
  background-color: var(--md-sys-color-surface-container-lowest);
554
- `, gc = F.div`
553
+ `, hc = F.div`
555
554
  &.scrollable {
556
555
  position: absolute;
557
556
  inset: 56px;
@@ -563,7 +562,7 @@ const Ha = (e) => e.replace(/\r\n?/g, `
563
562
  inset: 56px 0 0 0;
564
563
  display: flex;
565
564
  }
566
- `, on = F.div`
565
+ `, an = F.div`
567
566
  position: relative;
568
567
  display: flex;
569
568
  flex: 1;
@@ -580,18 +579,18 @@ const Ha = (e) => e.replace(/\r\n?/g, `
580
579
  flex: 1;
581
580
  min-width: 0;
582
581
  }
583
- `, it = (e, t) => `/api/projects/${t}/files/${e}`, nr = ({
582
+ `, it = (e, t) => `/api/projects/${t}/files/${e}`, ar = ({
584
583
  file: e,
585
584
  fullPreviews: t = ["png", "jpg", "jpeg", "gif", "svg", "webp"]
586
585
  }) => {
587
586
  const { id: o, projectName: n, mime: a } = e;
588
587
  let r = it(o, n);
589
- return t.some((i) => a.includes(i)) || (r += "/thumbnail"), /* @__PURE__ */ c(tr, { src: r, autoFocus: !0 });
590
- }, or = F(ra)`
588
+ return t.some((i) => a.includes(i)) || (r += "/thumbnail"), /* @__PURE__ */ c(or, { src: r, autoFocus: !0 });
589
+ }, rr = F(sa)`
591
590
  border-radius: var(--border-radius-m);
592
591
  height: 100%;
593
592
  overflow: auto !important;
594
- `, ar = ({ file: e }) => {
593
+ `, ir = ({ file: e }) => {
595
594
  let t = it(e.id, e.projectName);
596
595
  const [o, n] = L(""), [a, r] = L(null);
597
596
  return Y(() => {
@@ -609,8 +608,8 @@ const Ha = (e) => e.replace(/\r\n?/g, `
609
608
  }, [e.projectName, e.id, t]), a ? /* @__PURE__ */ x("div", { children: [
610
609
  "Error: ",
611
610
  a
612
- ] }) : e.mime?.includes("markdown") ? /* @__PURE__ */ c(hn, { remarkPlugins: [yn, fn], children: o }) : /* @__PURE__ */ c(or, { value: o, language: e.extension, readOnly: !0 });
613
- }, Cn = () => import("./VideoPlayer.es.js"), rr = ro(Cn), ir = ({ duration: e, width: t, height: o }) => Number.isFinite(e) && e > 0 && t > 0 && o > 0, sr = 1e4, cr = (e) => e ? `code ${e.code}${e.message ? `: ${e.message}` : ""}` : "no MediaError", lr = (e, t) => {
611
+ ] }) : e.mime?.includes("markdown") ? /* @__PURE__ */ c(fn, { remarkPlugins: [vn, yn], children: o }) : /* @__PURE__ */ c(rr, { value: o, language: e.extension, readOnly: !0 });
612
+ }, Tn = () => import("./VideoPlayer.es.js"), sr = so(Tn), cr = ({ duration: e, width: t, height: o }) => Number.isFinite(e) && e > 0 && t > 0 && o > 0, lr = 1e4, dr = (e) => e ? `code ${e.code}${e.message ? `: ${e.message}` : ""}` : "no MediaError", ur = (e, t) => {
614
613
  const [o, n] = L({ status: "loading" });
615
614
  return Y(() => {
616
615
  n({ status: "loading" });
@@ -626,25 +625,25 @@ const Ha = (e) => e.replace(/\r\n?/g, `
626
625
  width: r.videoWidth,
627
626
  height: r.videoHeight
628
627
  };
629
- if (ir(g)) {
628
+ if (cr(g)) {
630
629
  i(), n({ status: "ready", metadata: g });
631
630
  return;
632
631
  }
633
632
  p(`unusable metadata ${JSON.stringify(g)}`);
634
633
  }
635
634
  function u() {
636
- a || (clearTimeout(s), p(cr(r?.error ?? null)));
635
+ a || (clearTimeout(s), p(dr(r?.error ?? null)));
637
636
  }
638
637
  const p = (g) => {
639
- const h = r?.preload === "metadata";
640
- if (i(), h) {
638
+ const f = r?.preload === "metadata";
639
+ if (i(), f) {
641
640
  console.warn(`[VideoMime] metadata probe failed (${g}), retrying with full preload`), m("auto");
642
641
  return;
643
642
  }
644
643
  console.warn(`[VideoMime] video cannot be played: ${g}`, e), n({ status: "error" });
645
644
  };
646
645
  function m(g) {
647
- r = document.createElement("video"), r.preload = g, r.muted = !0, r.playsInline = !0, s = setTimeout(() => !a && p("timed out"), sr), r.addEventListener("loadedmetadata", l), r.addEventListener("error", u), r.src = e;
646
+ r = document.createElement("video"), r.preload = g, r.muted = !0, r.playsInline = !0, s = setTimeout(() => !a && p("timed out"), lr), r.addEventListener("loadedmetadata", l), r.addEventListener("error", u), r.src = e;
648
647
  }
649
648
  return m("metadata"), () => {
650
649
  a = !0, clearTimeout(s), i();
@@ -660,18 +659,18 @@ const Ha = (e) => e.replace(/\r\n?/g, `
660
659
  codec: t?.codec
661
660
  }
662
661
  };
663
- }, dr = ({ file: e }) => {
664
- const { id: t, projectName: o, name: n, mediaInfo: a } = e, r = it(t, o), s = lr(r, a);
662
+ }, mr = ({ file: e }) => {
663
+ const { id: t, projectName: o, name: n, mediaInfo: a } = e, r = it(t, o), s = ur(r, a);
665
664
  if (Y(() => {
666
- Cn();
665
+ Tn();
667
666
  }, []), s.status === "error")
668
- return /* @__PURE__ */ c(on, { children: /* @__PURE__ */ c(Ft, { icon: "videocam_off", message: "This video cannot be played in the browser", children: /* @__PURE__ */ x("a", { href: r, target: "_blank", rel: "noopener noreferrer", children: [
667
+ return /* @__PURE__ */ c(an, { children: /* @__PURE__ */ c(Ct, { icon: "videocam_off", message: "This video cannot be played in the browser", children: /* @__PURE__ */ x("a", { href: r, target: "_blank", rel: "noopener noreferrer", children: [
669
668
  "Download ",
670
669
  n
671
670
  ] }) }) });
672
- const i = /* @__PURE__ */ c(on, { children: /* @__PURE__ */ c(Ft, { icon: "hourglass_empty", message: "Loading video..." }) });
673
- return s.status === "loading" ? i : /* @__PURE__ */ c(io, { fallback: i, children: /* @__PURE__ */ c(
674
- rr,
671
+ const i = /* @__PURE__ */ c(an, { children: /* @__PURE__ */ c(Ct, { icon: "hourglass_empty", message: "Loading video..." }) });
672
+ return s.status === "loading" ? i : /* @__PURE__ */ c(co, { fallback: i, children: /* @__PURE__ */ c(
673
+ sr,
675
674
  {
676
675
  id: t,
677
676
  name: n,
@@ -684,20 +683,20 @@ const Ha = (e) => e.replace(/\r\n?/g, `
684
683
  codec: s.metadata.codec
685
684
  }
686
685
  ) });
687
- }, ur = {
686
+ }, pr = {
688
687
  image: {
689
- component: nr,
688
+ component: ar,
690
689
  mimeTypes: ["image/"],
691
690
  fullPreviews: ["png", "jpg", "jpeg", "gif", "svg", "webp"],
692
691
  id: "image"
693
692
  },
694
693
  video: {
695
- component: dr,
694
+ component: mr,
696
695
  mimeTypes: ["video/"],
697
696
  id: "video"
698
697
  },
699
698
  text: {
700
- component: ar,
699
+ component: ir,
701
700
  mimeTypes: ["text/", "application/json", "scss", "jsx"],
702
701
  id: "text"
703
702
  },
@@ -707,9 +706,9 @@ const Ha = (e) => e.replace(/\r\n?/g, `
707
706
  id: "pdf",
708
707
  callback: (e) => window.open(it(e.id, e.projectName), "_blank")
709
708
  }
710
- }, gt = (e = "", t = "") => Object.values(ur).some(
709
+ }, gt = (e = "", t = "") => Object.values(pr).some(
711
710
  ({ mimeTypes: o = [] }) => o.some((n) => (e || t)?.includes(n))
712
- ), mr = {
711
+ ), gr = {
713
712
  // special cases
714
713
  description: ["doc"],
715
714
  folder_zip: ["zip"],
@@ -751,12 +750,12 @@ const Ha = (e) => e.replace(/\r\n?/g, `
751
750
  filter_none: ["sequence"],
752
751
  font_download: ["font"],
753
752
  deployed_code: ["model", ".obj", ".abc", ".stl", ".fbx", ".gltf", ".glb", ".usd"]
754
- }, pr = (e) => {
755
- for (const [t, o] of Object.entries(mr))
753
+ }, hr = (e) => {
754
+ for (const [t, o] of Object.entries(gr))
756
755
  if (o.some((n) => e.includes(n)))
757
756
  return t;
758
757
  return "draft";
759
- }, gr = ({
758
+ }, fr = ({
760
759
  name: e,
761
760
  mime: t,
762
761
  src: o,
@@ -770,11 +769,11 @@ const Ha = (e) => e.replace(/\r\n?/g, `
770
769
  onExpand: p,
771
770
  disableExpand: m,
772
771
  onJumpTo: g,
773
- className: h,
774
- ...f
772
+ className: f,
773
+ ...h
775
774
  }) => {
776
- const b = s && s < 100, [D, R] = L(!1), [v, y] = L(!1), { feedAnnotationsEnabled: A } = ze(), { entities: C } = Re(), S = e.split("."), M = S.pop() || "", I = S.join("."), E = gt(t || "." + M), P = t?.includes("image/") || !!n, Q = !!t?.includes("video/") && !n && o ? `${o}/thumbnail` : void 0, K = /* @__PURE__ */ x(Ae, { children: [
777
- /* @__PURE__ */ c("span", { className: "size", children: fo(r) }),
775
+ const b = s && s < 100, [D, R] = L(!1), [v, y] = L(!1), { feedAnnotationsEnabled: A } = ze(), { entities: C } = Re(), S = e.split("."), M = S.pop() || "", I = S.join("."), E = gt(t || "." + M), P = t?.includes("image/") || !!n, Q = !!t?.includes("video/") && !n && o ? `${o}/thumbnail` : void 0, X = /* @__PURE__ */ x(Ae, { children: [
776
+ /* @__PURE__ */ c("span", { className: "size", children: vo(r) }),
778
777
  /* @__PURE__ */ c(re, { icon: "download", className: "download-icon" })
779
778
  ] }), q = N(
780
779
  () => n ?? a,
@@ -788,27 +787,27 @@ const Ha = (e) => e.replace(/\r\n?/g, `
788
787
  return isNaN(J) ? q?.range ?? [1, 1] : [J - 1 + q.range[0], J - 1 + q.range[1]];
789
788
  }, [q]);
790
789
  return /* @__PURE__ */ x(
791
- Ja,
790
+ Ka,
792
791
  {
793
- className: te(h, {
792
+ className: te(f, {
794
793
  compact: l,
795
794
  isDownloadable: u,
796
795
  isPreviewable: E,
797
796
  isUnsavedAnnotation: !!n
798
797
  }),
799
- ...f,
798
+ ...h,
800
799
  children: [
801
800
  /* @__PURE__ */ x(
802
- Xa,
801
+ er,
803
802
  {
804
803
  className: te("content-wrapper", {
805
804
  isPreviewable: E,
806
805
  isUnsavedAnnotation: !!n
807
806
  }),
808
807
  children: [
809
- /* @__PURE__ */ c(re, { icon: pr(t || "." + M), className: "type-icon" }),
808
+ /* @__PURE__ */ c(re, { icon: hr(t || "." + M), className: "type-icon" }),
810
809
  P && o && /* @__PURE__ */ c(
811
- tn,
810
+ nn,
812
811
  {
813
812
  className: te({
814
813
  "image-wrapper": !0,
@@ -827,7 +826,7 @@ const Ha = (e) => e.replace(/\r\n?/g, `
827
826
  }
828
827
  ),
829
828
  Q && /* @__PURE__ */ x(
830
- tn,
829
+ nn,
831
830
  {
832
831
  className: te({
833
832
  "image-wrapper": !0,
@@ -836,13 +835,13 @@ const Ha = (e) => e.replace(/\r\n?/g, `
836
835
  }),
837
836
  children: [
838
837
  !v && /* @__PURE__ */ c("img", { src: Q, onError: () => y(!0) }),
839
- /* @__PURE__ */ c(er, {})
838
+ /* @__PURE__ */ c(nr, {})
840
839
  ]
841
840
  }
842
841
  ),
843
- /* @__PURE__ */ x(Za, { className: "expand-buttons", children: [
842
+ /* @__PURE__ */ x(tr, { className: "expand-buttons", children: [
844
843
  E && !m && /* @__PURE__ */ c(
845
- nn,
844
+ on,
846
845
  {
847
846
  "data-tooltip": "Open preview",
848
847
  icon: "open_in_full",
@@ -851,7 +850,7 @@ const Ha = (e) => e.replace(/\r\n?/g, `
851
850
  }
852
851
  ),
853
852
  (n || A && a) && /* @__PURE__ */ c(
854
- nn,
853
+ on,
855
854
  {
856
855
  "data-tooltip": "Jump to annotation",
857
856
  icon: "play_circle",
@@ -864,7 +863,7 @@ const Ha = (e) => e.replace(/\r\n?/g, `
864
863
  }
865
864
  ),
866
865
  /* @__PURE__ */ x(
867
- Ka,
866
+ Za,
868
867
  {
869
868
  className: te({
870
869
  inProgress: b,
@@ -884,7 +883,7 @@ const Ha = (e) => e.replace(/\r\n?/g, `
884
883
  M
885
884
  ] })
886
885
  ] }) }),
887
- u && (i ? /* @__PURE__ */ c("div", { className: "download", children: K }) : /* @__PURE__ */ c("a", { href: o, target: "_blank", rel: "noopener noreferrer", className: "download", children: K }))
886
+ u && (i ? /* @__PURE__ */ c("div", { className: "download", children: X }) : /* @__PURE__ */ c("a", { href: o, target: "_blank", rel: "noopener noreferrer", className: "download", children: X }))
888
887
  ]
889
888
  }
890
889
  ),
@@ -892,7 +891,7 @@ const Ha = (e) => e.replace(/\r\n?/g, `
892
891
  ]
893
892
  }
894
893
  );
895
- }, Tn = ({
894
+ }, Dn = ({
896
895
  files: e = [],
897
896
  activityId: t,
898
897
  isCompact: o,
@@ -908,13 +907,13 @@ const Ha = (e) => e.replace(/\r\n?/g, `
908
907
  if (!e.length) return null;
909
908
  const m = We(
910
909
  (g) => {
911
- const h = e.filter((b) => gt(b.mime, b.ext)), f = h.findIndex((b) => b.id === e[g].id);
912
- i?.({ files: h, index: f, activityId: t || "" });
910
+ const f = e.filter((b) => gt(b.mime, b.ext)), h = f.findIndex((b) => b.id === e[g].id);
911
+ i?.({ files: f, index: h, activityId: t || "" });
913
912
  },
914
913
  [i]
915
914
  );
916
- return /* @__PURE__ */ c(Ya, { className: te({ compact: o }), ...p, children: e.map((g, h) => /* @__PURE__ */ c(
917
- gr,
915
+ return /* @__PURE__ */ c(Xa, { className: te({ compact: o }), ...p, children: e.map((g, f) => /* @__PURE__ */ c(
916
+ fr,
918
917
  {
919
918
  id: g.id || g.name,
920
919
  name: g.name,
@@ -927,14 +926,14 @@ const Ha = (e) => e.replace(/\r\n?/g, `
927
926
  onRemove: a ? () => a(g.id, g.name, !!g.unsavedAnnotation) : void 0,
928
927
  isCompact: o,
929
928
  isDownloadable: s,
930
- onExpand: () => m(h),
929
+ onExpand: () => m(f),
931
930
  onJumpTo: () => l?.(g),
932
931
  disableExpand: n,
933
932
  ...u?.file
934
933
  },
935
934
  g.id || g.name
936
935
  )) });
937
- }, hr = (e) => {
936
+ }, yr = (e) => {
938
937
  const t = /!\[.*?\]\((.*?)\)/g, o = e.match(t);
939
938
  let n = e;
940
939
  return o && o.forEach((a) => {
@@ -942,23 +941,23 @@ const Ha = (e) => e.replace(/\r\n?/g, `
942
941
  const r = a.match(/\(([^)]+)\)/)[1], s = r.split("?")[0];
943
942
  n = e.replace(r, s);
944
943
  }), n;
945
- }, fr = new AbortController(), yr = Mt.CancelToken, vr = yr.source(), Qe = (e, t, o) => new Promise((n, a) => {
944
+ }, vr = new AbortController(), br = _t.CancelToken, wr = br.source(), Qe = (e, t, o) => new Promise((n, a) => {
946
945
  new FormData().append("image", e);
947
946
  const s = {
948
- signal: fr.signal,
949
- cancelToken: vr.token,
947
+ signal: vr.signal,
948
+ cancelToken: wr.token,
950
949
  onUploadProgress: (i) => o && o(i, e),
951
950
  headers: {
952
951
  "Content-Type": e.type,
953
- "x-file-name": fe(e.name)
952
+ "x-file-name": he(e.name)
954
953
  }
955
954
  };
956
- Mt.post(`/api/projects/${t}/files`, e, s).then((i) => {
955
+ _t.post(`/api/projects/${t}/files`, e, s).then((i) => {
957
956
  n({ file: e, data: i.data });
958
957
  }).catch((i) => {
959
958
  console.error(i), a({ message: "Upload failed: " + i.response.data.detail });
960
959
  });
961
- }), br = (e, t, o, n, a) => {
960
+ }), xr = (e, t, o, n, a) => {
962
961
  e.preventDefault(), e.stopPropagation();
963
962
  let r = e.dataTransfer.files;
964
963
  if (r?.length) {
@@ -971,15 +970,15 @@ const Ha = (e) => e.replace(/\r\n?/g, `
971
970
  }
972
971
  );
973
972
  }
974
- }, wr = (e, t, o) => (t || console.warn("filterEntityAnnotations: entityId is empty"), Object.values(e).forEach((n) => {
973
+ }, kr = (e, t, o) => (t || console.warn("filterEntityAnnotations: entityId is empty"), Object.values(e).forEach((n) => {
975
974
  n.versionId || console.warn("filterEntityAnnotations: annotation.versionId is empty", n);
976
975
  }), Object.values(e).filter(
977
- (n) => n.versionId === t && !o.some((a) => a.name === fe(n.name))
976
+ (n) => n.versionId === t && !o.some((a) => a.name === he(n.name))
978
977
  ).map((n) => ({
979
978
  ...n,
980
979
  unsavedAnnotation: n
981
- }))), xr = ({ entityId: e, filesUploading: t }) => {
982
- const { editingId: o, setEditingId: n, annotations: a, removeAnnotation: r } = Re(), { onGoToFrame: s } = ze(), i = wr(a || [], e, t);
980
+ }))), Ar = ({ entityId: e, filesUploading: t }) => {
981
+ const { editingId: o, setEditingId: n, annotations: a, removeAnnotation: r } = Re(), { onGoToFrame: s } = ze(), i = kr(a || [], e, t);
983
982
  return Y(() => {
984
983
  i.length > 0 && !o && n(nt);
985
984
  }, [i]), {
@@ -990,15 +989,15 @@ const Ha = (e) => e.replace(/\r\n?/g, `
990
989
  },
991
990
  removeAnnotation: r
992
991
  };
993
- }, Dn = (e) => N(() => {
992
+ }, Nn = (e) => N(() => {
994
993
  if (!e)
995
994
  return { primary: void 0, secondary: void 0 };
996
- const t = getComputedStyle(document.documentElement), o = t.getPropertyValue("--md-sys-color-surface-container").trim(), n = t.getPropertyValue("--md-sys-color-surface-container-high").trim(), a = o || e, r = n || e, s = Xt(e, a, 0.1) || e, i = Xt(e, r, 0.2) || e;
995
+ const t = getComputedStyle(document.documentElement), o = t.getPropertyValue("--md-sys-color-surface-container").trim(), n = t.getPropertyValue("--md-sys-color-surface-container-high").trim(), a = o || e, r = n || e, s = Zt(e, a, 0.1) || e, i = Zt(e, r, 0.2) || e;
997
996
  return {
998
997
  primary: s,
999
998
  secondary: i
1000
999
  };
1001
- }, [e]), kr = ({ projectName: e, onSuccess: t, onProgress: o, onStart: n, onError: a }) => {
1000
+ }, [e]), Fr = ({ projectName: e, onSuccess: t, onProgress: o, onStart: n, onError: a }) => {
1002
1001
  const { exportAnnotationComposite: r } = Re(), s = async (l) => {
1003
1002
  const u = await r?.(l.id);
1004
1003
  if (!u)
@@ -1007,71 +1006,71 @@ const Ha = (e) => e.replace(/\r\n?/g, `
1007
1006
  type: "image/png"
1008
1007
  }), m = await fetch(l.annotationData).then((R) => R.blob()), g = new File([m], `annotation-${l.name}`, {
1009
1008
  type: "image/png"
1010
- }), h = await Promise.all([
1009
+ }), f = await Promise.all([
1011
1010
  Qe(p, e, o),
1012
1011
  Qe(g, e, () => {
1013
1012
  })
1014
- ]), [f, b] = h, D = [t(f), t(b, !0)];
1015
- return { annotation: l, uploads: h, files: D };
1013
+ ]), [h, b] = f, D = [t(h), t(b, !0)];
1014
+ return { annotation: l, uploads: f, files: D };
1016
1015
  };
1017
1016
  return async (l) => {
1018
1017
  try {
1019
- const u = l.map(async (h) => {
1020
- n?.(h);
1018
+ const u = l.map(async (f) => {
1019
+ n?.(f);
1021
1020
  try {
1022
- return await s(h);
1023
- } catch (f) {
1024
- throw a?.(h), f;
1021
+ return await s(f);
1022
+ } catch (h) {
1023
+ throw a?.(f), h;
1025
1024
  }
1026
1025
  }), p = await Promise.allSettled(u), m = [], g = [];
1027
- return p.forEach((h) => {
1028
- if (h.status === "fulfilled") {
1029
- const { uploads: f, annotation: b, files: D } = h.value;
1026
+ return p.forEach((f) => {
1027
+ if (f.status === "fulfilled") {
1028
+ const { uploads: h, annotation: b, files: D } = f.value;
1030
1029
  m.push(...D), g.push({
1031
1030
  range: b.range,
1032
1031
  id: b.id,
1033
- composite: f[0].data.id,
1034
- transparent: f[1].data.id
1032
+ composite: h[0].data.id,
1033
+ transparent: h[1].data.id
1035
1034
  });
1036
1035
  } else
1037
- ke.error("Upload failed: " + h.reason.message);
1036
+ ke.error("Upload failed: " + f.reason.message);
1038
1037
  }), { files: m, metadata: g };
1039
1038
  } catch (u) {
1040
1039
  return ke.error("Upload failed: " + u.message), { files: [], metadata: [] };
1041
1040
  }
1042
1041
  };
1043
- }, Nn = "ayon-comment-draft/", Sn = 720 * 60 * 60 * 1e3, Ar = (e) => !e.text.trim() && !e.files.length && !e.uploadedAnnotations.length, In = (e) => {
1042
+ }, Sn = "ayon-comment-draft/", In = 720 * 60 * 60 * 1e3, Cr = (e) => !e.text.trim() && !e.files.length && !e.uploadedAnnotations.length, En = (e) => {
1044
1043
  try {
1045
1044
  const t = localStorage.getItem(e);
1046
1045
  return t ? JSON.parse(t) : null;
1047
1046
  } catch {
1048
1047
  return null;
1049
1048
  }
1050
- }, Fr = (e, t) => {
1049
+ }, Tr = (e, t) => {
1051
1050
  try {
1052
- Ar(t) ? localStorage.removeItem(e) : localStorage.setItem(e, JSON.stringify({ ...t, savedAt: Date.now() }));
1051
+ Cr(t) ? localStorage.removeItem(e) : localStorage.setItem(e, JSON.stringify({ ...t, savedAt: Date.now() }));
1053
1052
  } catch (o) {
1054
1053
  console.warn("Could not save comment draft", o);
1055
1054
  }
1056
- }, Cr = () => {
1055
+ }, Dr = () => {
1057
1056
  try {
1058
1057
  const e = Date.now();
1059
1058
  for (const t of Object.keys(localStorage)) {
1060
- if (!t.startsWith(Nn)) continue;
1061
- const o = In(t);
1062
- (!o || e - o.savedAt > Sn) && localStorage.removeItem(t);
1059
+ if (!t.startsWith(Sn)) continue;
1060
+ const o = En(t);
1061
+ (!o || e - o.savedAt > In) && localStorage.removeItem(t);
1063
1062
  }
1064
1063
  } catch {
1065
1064
  }
1066
- }, Tr = (e, t, o) => e && t && o.length ? `${Nn}${e}/${t}/${[...o].sort().join(",")}` : null, Dr = ({ draftKey: e, draft: t, paused: o, restore: n }) => {
1067
- const a = ye(null), r = ye(!1);
1065
+ }, Nr = (e, t, o) => e && t && o.length ? `${Sn}${e}/${t}/${[...o].sort().join(",")}` : null, Sr = ({ draftKey: e, draft: t, paused: o, restore: n }) => {
1066
+ const a = fe(null), r = fe(!1);
1068
1067
  Y(() => {
1069
1068
  if (!e || o) return;
1070
1069
  const s = a.current;
1071
1070
  if (a.current = e, s === e) return;
1072
- s || Cr();
1073
- const i = In(e);
1074
- i && Date.now() - i.savedAt <= Sn ? (r.current = !0, n({
1071
+ s || Dr();
1072
+ const i = En(e);
1073
+ i && Date.now() - i.savedAt <= In ? (r.current = !0, n({
1075
1074
  text: i.text ?? "",
1076
1075
  files: i.files ?? [],
1077
1076
  uploadedAnnotations: i.uploadedAnnotations ?? [],
@@ -1082,9 +1081,9 @@ const Ha = (e) => e.replace(/\r\n?/g, `
1082
1081
  r.current = !1;
1083
1082
  return;
1084
1083
  }
1085
- !e || o || Fr(e, t);
1084
+ !e || o || Tr(e, t);
1086
1085
  }, [e, o, t.text, t.files, t.uploadedAnnotations, t.category]);
1087
- }, Nr = "Category", Sr = F.div`
1086
+ }, Ir = "Category", Er = F.div`
1088
1087
  display: flex;
1089
1088
  padding: 2px 4px;
1090
1089
  justify-content: center;
@@ -1110,7 +1109,7 @@ const Ha = (e) => e.replace(/\r\n?/g, `
1110
1109
 
1111
1110
  &.compact {
1112
1111
  padding: 1px 2px;
1113
- ${vn.labelMedium}
1112
+ ${bn.labelMedium}
1114
1113
  }
1115
1114
 
1116
1115
  &.editing {
@@ -1135,7 +1134,7 @@ const Ha = (e) => e.replace(/\r\n?/g, `
1135
1134
  }
1136
1135
  `, ot = pt(
1137
1136
  ({ value: e, color: t, isCompact: o, isEditing: n, isPower: a, isDisabled: r, style: s, className: i, ...l }, u) => /* @__PURE__ */ c(
1138
- Sr,
1137
+ Er,
1139
1138
  {
1140
1139
  ...l,
1141
1140
  ref: u,
@@ -1151,13 +1150,13 @@ const Ha = (e) => e.replace(/\r\n?/g, `
1151
1150
  ...t && {
1152
1151
  backgroundColor: t,
1153
1152
  borderColor: t,
1154
- color: Nt(t)
1153
+ color: St(t)
1155
1154
  }
1156
1155
  },
1157
- children: e || Nr
1156
+ children: e || Ir
1158
1157
  }
1159
1158
  )
1160
- ), Ir = F.span`
1159
+ ), Mr = F.span`
1161
1160
  display: flex;
1162
1161
  justify-content: flex-start;
1163
1162
  align-items: center;
@@ -1176,7 +1175,7 @@ const Ha = (e) => e.replace(/\r\n?/g, `
1176
1175
  color: var(--md-sys-color-on-surface) !important;
1177
1176
  }
1178
1177
  }
1179
- `, Er = pt(
1178
+ `, _r = pt(
1180
1179
  ({
1181
1180
  label: e,
1182
1181
  color: t,
@@ -1189,11 +1188,11 @@ const Ha = (e) => e.replace(/\r\n?/g, `
1189
1188
  className: l,
1190
1189
  ...u
1191
1190
  }, p) => /* @__PURE__ */ x(
1192
- Ir,
1191
+ Mr,
1193
1192
  {
1194
1193
  ...u,
1195
1194
  className: te(l, { selected: n }),
1196
- style: { backgroundColor: n && t ? t : "", color: Nt(n && t ? t : ""), ...i },
1195
+ style: { backgroundColor: n && t ? t : "", color: St(n && t ? t : ""), ...i },
1197
1196
  ref: p,
1198
1197
  children: [
1199
1198
  a,
@@ -1209,7 +1208,7 @@ const Ha = (e) => e.replace(/\r\n?/g, `
1209
1208
  ]
1210
1209
  }
1211
1210
  )
1212
- ), Mr = "1.3.0", _r = F(yo)`
1211
+ ), Pr = "1.3.0", Rr = F(bo)`
1213
1212
  button {
1214
1213
  /* remove all styles and just use a wrapper */
1215
1214
  background-color: unset !important;
@@ -1220,7 +1219,7 @@ const Ha = (e) => e.replace(/\r\n?/g, `
1220
1219
  width: unset !important;
1221
1220
  color: var(--md-sys-color-on-surface) !important;
1222
1221
  }
1223
- `, Pr = ({
1222
+ `, $r = ({
1224
1223
  value: e,
1225
1224
  categories: t,
1226
1225
  readonly: o,
@@ -1256,7 +1255,7 @@ const Ha = (e) => e.replace(/\r\n?/g, `
1256
1255
  isCompact: a,
1257
1256
  style: l.style,
1258
1257
  onClick: () => ke.warning(
1259
- `No categories found. Ensure they are set in the Powerpack settings and the version is at least ${Mr}.`
1258
+ `No categories found. Ensure they are set in the Powerpack settings and the version is at least ${Pr}.`
1260
1259
  )
1261
1260
  }
1262
1261
  );
@@ -1270,18 +1269,18 @@ const Ha = (e) => e.replace(/\r\n?/g, `
1270
1269
  }))
1271
1270
  ];
1272
1271
  return /* @__PURE__ */ c(
1273
- _r,
1272
+ Rr,
1274
1273
  {
1275
1274
  options: m,
1276
1275
  value: e ? [e] : [],
1277
1276
  onChange: (g) => i(g[0]),
1278
1277
  valueTemplate: () => /* @__PURE__ */ c(ot, { value: e, color: p, isCompact: a, isEditing: !0 }),
1279
- itemTemplate: (g, h, f, b) => /* @__PURE__ */ c(
1280
- Er,
1278
+ itemTemplate: (g, f, h, b) => /* @__PURE__ */ c(
1279
+ _r,
1281
1280
  {
1282
1281
  label: g.label,
1283
1282
  color: g.color,
1284
- isSelected: f,
1283
+ isSelected: h,
1285
1284
  isClear: g.value === null
1286
1285
  },
1287
1286
  b
@@ -1289,7 +1288,7 @@ const Ha = (e) => e.replace(/\r\n?/g, `
1289
1288
  ...l
1290
1289
  }
1291
1290
  );
1292
- }, Rr = (e, { isGuest: t, isAdmin: o }) => !!(t || !e.length && !o), En = 1e4, $r = F.span`
1291
+ }, Lr = (e, { isGuest: t, isAdmin: o }) => !!(t || !e.length && !o), Mn = 1e4, Or = F.span`
1293
1292
  margin-left: auto;
1294
1293
  color: var(--md-sys-color-outline);
1295
1294
  user-select: none;
@@ -1302,7 +1301,7 @@ const Ha = (e) => e.replace(/\r\n?/g, `
1302
1301
  min-width: 0;
1303
1302
  max-width: fit-content;
1304
1303
 
1305
- ${vn.bodySmall}
1304
+ ${bn.bodySmall}
1306
1305
  `, st = ({ date: e, isExact: t, exactTooltip: o = !1, ...n }) => {
1307
1306
  const [a, r] = L(!0), [s, i] = L(/* @__PURE__ */ new Date());
1308
1307
  if (!e) return null;
@@ -1311,18 +1310,18 @@ const Ha = (e) => e.replace(/\r\n?/g, `
1311
1310
  Y(() => {
1312
1311
  const A = setInterval(
1313
1312
  () => i(/* @__PURE__ */ new Date()),
1314
- En
1313
+ Mn
1315
1314
  );
1316
1315
  return () => clearInterval(A);
1317
1316
  }, []);
1318
- const u = Ea(l), p = Ma(l, s), m = _a(l, new Date(s.setDate(s.getDate() - 1))), g = Pa(l, s), h = Ra(l, s), f = m ? "" : p ? g ? "E" : "MMM d" : "MMM d yyyy", b = "h:mm a", D = N(() => xn(l), [l]), R = N(() => u ? Zt(l, `${f}, ${b}`) : Zt(l, `EEEE, dd MMM yyyy ${b}`), [l, u]);
1317
+ const u = _a(l), p = Pa(l, s), m = Ra(l, new Date(s.setDate(s.getDate() - 1))), g = $a(l, s), f = La(l, s), h = m ? "" : p ? g ? "E" : "MMM d" : "MMM d yyyy", b = "h:mm a", D = N(() => kn(l), [l]), R = N(() => u ? en(l, `${h}, ${b}`) : en(l, `EEEE, dd MMM yyyy ${b}`), [l, u]);
1319
1318
  let v = a && !t ? D : R;
1320
- m && a && !t && (v = `Yesterday${v}`), h && (v = "Just now");
1319
+ m && a && !t && (v = `Yesterday${v}`), f && (v = "Just now");
1321
1320
  const y = () => {
1322
1321
  r(!a);
1323
1322
  };
1324
1323
  return /* @__PURE__ */ c(
1325
- $r,
1324
+ Or,
1326
1325
  {
1327
1326
  className: te("date"),
1328
1327
  ...n,
@@ -1336,7 +1335,7 @@ const Ha = (e) => e.replace(/\r\n?/g, `
1336
1335
  );
1337
1336
  };
1338
1337
  var Ce = /* @__PURE__ */ ((e) => (e.APPROVE = "approve", e.REQUEST_CHANGES = "request_changes", e))(Ce || {});
1339
- const Mn = (e) => {
1338
+ const _n = (e) => {
1340
1339
  switch (e) {
1341
1340
  case Ce.REQUEST_CHANGES:
1342
1341
  return "requested changes";
@@ -1344,7 +1343,7 @@ const Mn = (e) => {
1344
1343
  default:
1345
1344
  return "approved this";
1346
1345
  }
1347
- }, Lr = (e, t) => {
1346
+ }, jr = (e, t) => {
1348
1347
  switch (e) {
1349
1348
  case Ce.REQUEST_CHANGES:
1350
1349
  return "Requested changes on " + t;
@@ -1352,7 +1351,7 @@ const Mn = (e) => {
1352
1351
  default:
1353
1352
  return "Approved " + t;
1354
1353
  }
1355
- }, _n = (e) => {
1354
+ }, Pn = (e) => {
1356
1355
  switch (e) {
1357
1356
  case Ce.REQUEST_CHANGES:
1358
1357
  return "refresh";
@@ -1360,37 +1359,37 @@ const Mn = (e) => {
1360
1359
  default:
1361
1360
  return "task_alt";
1362
1361
  }
1363
- }, Or = ({ lastOwnVersionReview: e }) => {
1362
+ }, Vr = ({ lastOwnVersionReview: e }) => {
1364
1363
  const [t, o] = L(/* @__PURE__ */ new Date());
1365
1364
  Y(() => {
1366
- const r = setInterval(() => o(/* @__PURE__ */ new Date()), En);
1365
+ const r = setInterval(() => o(/* @__PURE__ */ new Date()), Mn);
1367
1366
  return () => clearInterval(r);
1368
1367
  }, []);
1369
- const n = N(() => e?.activityData?.feedback, [e]), a = N(() => e?.createdAt ? xn(new Date(e?.createdAt)).toLowerCase() : "", [e?.createdAt, t]);
1370
- return /* @__PURE__ */ x(Co, { className: gn(n), children: [
1371
- /* @__PURE__ */ c(re, { icon: _n(n) }),
1368
+ const n = N(() => e?.activityData?.feedback, [e]), a = N(() => e?.createdAt ? kn(new Date(e?.createdAt)).toLowerCase() : "", [e?.createdAt, t]);
1369
+ return /* @__PURE__ */ x(Do, { className: hn(n), children: [
1370
+ /* @__PURE__ */ c(re, { icon: Pn(n) }),
1372
1371
  "You last ",
1373
- Mn(n),
1372
+ _n(n),
1374
1373
  " ",
1375
1374
  a,
1376
1375
  " ",
1377
1376
  a === "just now" ? "" : "ago"
1378
1377
  ] });
1379
- }, an = (e) => {
1378
+ }, rn = (e) => {
1380
1379
  const t = /^(\d+)(?:\s*-\s*(\d+))?$/.exec(e.trim());
1381
1380
  if (!t) return null;
1382
1381
  const o = Number(t[1]), n = t[2] ? Number(t[2]) : o;
1383
1382
  return Number.isSafeInteger(o) && o > 0 && Number.isSafeInteger(n) && n >= o ? { startFrame: o, endFrame: n } : null;
1384
- }, rn = async (e, t, o, n, a) => {
1385
- const { data: r } = await Mt.get(`/api/projects/${e}/files/${t}`, {
1383
+ }, sn = async (e, t, o, n, a) => {
1384
+ const { data: r } = await _t.get(`/api/projects/${e}/files/${t}`, {
1386
1385
  responseType: "blob"
1387
1386
  }), s = new File([r], o, { type: n || r.type });
1388
1387
  return Qe(s, e, a);
1389
- }, sn = (e, t) => `/api/projects/${e}/files/${t}`, cn = (e, t) => !!e && St(t).has(e), jr = [
1388
+ }, cn = (e, t) => `/api/projects/${e}/files/${t}`, ln = (e, t) => !!e && It(t).has(e), zr = [
1390
1389
  { trigger: "@", icon: "person", tooltip: "Mention user" },
1391
1390
  { trigger: "@@", icon: "layers", tooltip: "Mention version" },
1392
1391
  { trigger: "@@@", icon: "check_circle", tooltip: "Mention task" }
1393
- ], Pn = ({
1392
+ ], Rn = ({
1394
1393
  initValue: e,
1395
1394
  initFiles: t = [],
1396
1395
  initCategory: o = null,
@@ -1404,8 +1403,8 @@ const Mn = (e) => {
1404
1403
  onDuplicateHandled: p,
1405
1404
  isEditing: m,
1406
1405
  disabled: g,
1407
- isLoading: h,
1408
- isOpen: f,
1406
+ isLoading: f,
1407
+ isOpen: h,
1409
1408
  onOpen: b,
1410
1409
  onClose: D,
1411
1410
  saveDraft: R = !0
@@ -1420,19 +1419,19 @@ const Mn = (e) => {
1420
1419
  isGuest: I,
1421
1420
  userName: E,
1422
1421
  editingId: P
1423
- } = Re(), { hasLicense: H, onPowerFeature: Q, user: K, openSlideOut: q, commentFrameLink: $ } = ze(), ue = K?.data?.isAdmin, J = Sa(), [, W] = An(), [ve, O] = L(e || ""), [ne, X] = L(
1422
+ } = Re(), { hasLicense: H, onPowerFeature: Q, user: X, openSlideOut: q, commentFrameLink: $ } = ze(), ue = X?.data?.isAdmin, J = Ea(), [, W] = Fn(), [ve, O] = L(e || ""), [ne, K] = L(
1424
1423
  () => t.map(
1425
- (d) => cn(d.id, e || "") ? { ...d, isInline: !0 } : d
1424
+ (d) => ln(d.id, e || "") ? { ...d, isInline: !0 } : d
1426
1425
  )
1427
- ), [Ye, Te] = L(0), De = ye(/* @__PURE__ */ new Map()), [me, pe] = L([]), [Ie, Z] = L(!1), [Ne, $e] = L(!1), [Ee, Fe] = L([]), [Je, Le] = L([]), { annotations: ge, removeAnnotation: Ue, goToAnnotation: Be } = xr({
1426
+ ), [Ye, Te] = L(0), De = fe(/* @__PURE__ */ new Map()), [me, pe] = L([]), [Ie, Z] = L(!1), [Ne, $e] = L(!1), [Ee, Fe] = L([]), [Je, Le] = L([]), { annotations: ye, removeAnnotation: Ue, goToAnnotation: Be } = Ar({
1428
1427
  entityId: y[0]?.id,
1429
1428
  filesUploading: me
1430
- }), oe = y.length === 1 && y[0].entityType === "version" ? y[0] : void 0, Ke = $?.draft && $.draft.entityId === oe?.id ? $.draft : null, [Me, Ge] = L(
1429
+ }), oe = y.length === 1 && y[0].entityType === "version" ? y[0] : void 0, Xe = $?.draft && $.draft.entityId === oe?.id ? $.draft : null, [Me, Ge] = L(
1431
1430
  () => m && Number.isSafeInteger(n?.startFrame) && n.startFrame > 0 ? {
1432
1431
  startFrame: n.startFrame,
1433
1432
  endFrame: Number.isSafeInteger(n.endFrame) && n.endFrame >= n.startFrame ? n.endFrame : n.startFrame
1434
1433
  } : null
1435
- ), _e = (d) => Ge(d && { ...d, entityId: oe?.id }), Oe = m || Me?.entityId === oe?.id ? Me : null, [be, Pe] = L(!1), w = m ? Oe : Oe ?? Ke, _ = m ? !!oe || !!Oe : !!$ && !!oe, j = $?.formatFrame ?? String, U = w ? w.endFrame > w.startFrame ? `${j(w.startFrame)}-${j(w.endFrame)}` : j(w.startFrame) : void 0, [ie, T] = L(U ?? ""), le = ye(!1), we = ye(null), xe = (d) => {
1434
+ ), _e = (d) => Ge(d && { ...d, entityId: oe?.id }), Oe = m || Me?.entityId === oe?.id ? Me : null, [be, Pe] = L(!1), w = m ? Oe : Oe ?? Xe, _ = m ? !!oe || !!Oe : !!$ && !!oe, j = $?.formatFrame ?? String, U = w ? w.endFrame > w.startFrame ? `${j(w.startFrame)}-${j(w.endFrame)}` : j(w.startFrame) : void 0, [ie, T] = L(U ?? ""), le = fe(!1), we = fe(null), xe = (d) => {
1436
1435
  if (!oe) return;
1437
1436
  const k = d ? { ...d, entityId: oe.id } : null;
1438
1437
  if (!m) {
@@ -1445,7 +1444,7 @@ const Mn = (e) => {
1445
1444
  });
1446
1445
  }, je = (d) => {
1447
1446
  T(d);
1448
- const k = an(d);
1447
+ const k = rn(d);
1449
1448
  k && xe(k);
1450
1449
  };
1451
1450
  Y(() => {
@@ -1461,7 +1460,7 @@ const Mn = (e) => {
1461
1460
  le.current = !1, T(U ?? ""), xe(we.current), Pe(!1);
1462
1461
  return;
1463
1462
  }
1464
- const d = an(ie);
1463
+ const d = rn(ie);
1465
1464
  d ? (_e(d), xe(d)) : (T(U ?? ""), xe(we.current)), Pe(!1);
1466
1465
  }, He = () => {
1467
1466
  _e(null), m ? xe(null) : $?.unlink();
@@ -1487,8 +1486,8 @@ const Mn = (e) => {
1487
1486
  }
1488
1487
  ];
1489
1488
  }, [_, m, $, oe?.id, !!w, U]), [Se, dt] = L(o);
1490
- Dr({
1491
- draftKey: R && !m ? Tr(
1489
+ Sr({
1490
+ draftKey: R && !m ? Nr(
1492
1491
  v,
1493
1492
  E,
1494
1493
  y.map((d) => d.id)
@@ -1496,43 +1495,47 @@ const Mn = (e) => {
1496
1495
  draft: { text: ve, files: ne, uploadedAnnotations: Ee, category: Se },
1497
1496
  paused: Ne,
1498
1497
  restore: (d) => {
1499
- O(d.text), X(d.files), Fe(d.uploadedAnnotations), dt(d.category), (d.text.trim() || d.files.length || d.uploadedAnnotations.length) && !f && !P && b?.();
1498
+ O(d.text), K(d.files), Fe(d.uploadedAnnotations), dt(d.category), (d.text.trim() || d.files.length || d.uploadedAnnotations.length) && !h && !P && b?.();
1500
1499
  }
1501
1500
  });
1502
- const _t = M.filter((d) => d.accessLevel >= 20), Pt = M.find((d) => d.name === Se), Rt = Dn(Pt?.color), Xe = ye(null), $t = ye(null), ft = !!ve.trim(), Lt = !!C?.conditions?.some(
1501
+ const Pt = M.filter((d) => d.accessLevel >= 20), Rt = M.find((d) => d.name === Se), $t = Nn(Rt?.color), Ke = fe(null), Lt = fe(null), ft = !!ve.trim(), Ot = !!C?.conditions?.some(
1503
1502
  (d) => "key" in d && d.key === "checklists" && d.value === !0
1504
1503
  );
1505
1504
  Y(() => {
1506
- if (!f || m || !Lt) return;
1507
- const d = Xe.current;
1505
+ if (!h || m || !Ot) return;
1506
+ const d = Ke.current;
1508
1507
  !d || !d.isEmpty() || d.getEditor().update(() => {
1509
- const k = mo(!1);
1510
- go().clear().append(po("check").append(k)), k.select();
1508
+ const k = go(!1);
1509
+ fo().clear().append(ho("check").append(k)), k.select();
1511
1510
  });
1512
- }, [f, m, Lt]);
1513
- const Ot = y[0]?.entityType, jt = J?.productTypes, Bn = N(
1511
+ }, [h, m, Ot]);
1512
+ const jt = y[0]?.entityType, Vt = J?.productTypes, Gn = N(
1514
1513
  () => I ? void 0 : {
1515
- ...To({
1514
+ ...No({
1516
1515
  suggestions: S,
1517
- project: { productTypes: jt },
1516
+ project: { productTypes: Vt },
1518
1517
  taskTypes: A?.taskTypes,
1519
- entityType: Ot
1518
+ entityType: jt
1520
1519
  }),
1521
1520
  // keep the picker short
1522
1521
  limit: 5
1523
1522
  },
1524
- [I, S, jt, A?.taskTypes, Ot]
1525
- ), Gn = ({ type: d, id: k }) => {
1523
+ [I, S, Vt, A?.taskTypes, jt]
1524
+ ), Hn = ({ type: d, id: k }) => {
1526
1525
  d === "user" || d === "team" || q({ entityId: k, entityType: d, projectName: v });
1527
- }, Hn = ({ type: d, id: k, label: z }, V) => {
1526
+ }, qn = ({ type: d, id: k, label: z }, V) => {
1528
1527
  const { x: B, y: se, width: ce } = V.getBoundingClientRect();
1529
1528
  W({ id: k, name: k, type: d, label: z, pos: { left: B + ce / 2, top: se } });
1530
- }, qn = () => {
1531
- f || g || b && b();
1532
- }, Vt = () => {
1529
+ }, [Wn, yt] = L(!1);
1530
+ Y(() => {
1531
+ h || yt(!1);
1532
+ }, [h]);
1533
+ const Qn = () => {
1534
+ h || g || (yt(!0), b && b());
1535
+ }, zt = () => {
1533
1536
  m && $?.setEditPreview(null), (!ft || m) && O(""), D && D();
1534
1537
  }, Ze = ({ file: d, data: k }, z = !1) => {
1535
- const V = fe(d.name), B = {
1538
+ const V = he(d.name), B = {
1536
1539
  id: k.id,
1537
1540
  name: V,
1538
1541
  mime: d.type,
@@ -1540,17 +1543,17 @@ const Mn = (e) => {
1540
1543
  order: ne.length,
1541
1544
  isAnnotationLayer: z
1542
1545
  };
1543
- return X((se) => [...se, B]), pe(
1544
- (se) => se.filter((ce) => fe(ce.name) !== V)
1546
+ return K((se) => [...se, B]), pe(
1547
+ (se) => se.filter((ce) => he(ce.name) !== V)
1545
1548
  ), B;
1546
- }, Wn = (d, k, z) => {
1547
- z ? Ue?.(d) : (X((V) => V.filter((B) => B.id !== d)), pe((V) => V.filter((B) => fe(B.name) !== fe(k))));
1549
+ }, Yn = (d, k, z) => {
1550
+ z ? Ue?.(d) : (K((V) => V.filter((B) => B.id !== d)), pe((V) => V.filter((B) => he(B.name) !== he(k))));
1548
1551
  }, et = (d, k) => {
1549
1552
  const z = Math.round(d.loaded * 100 / d.total);
1550
1553
  if (z !== 100) {
1551
- const V = fe(k.name);
1554
+ const V = he(k.name);
1552
1555
  pe((B) => {
1553
- const se = B.find((G) => fe(G.name) === V), ce = B.filter((G) => fe(G.name) !== V), Ve = {
1556
+ const se = B.find((G) => he(G.name) === V), ce = B.filter((G) => he(G.name) !== V), Ve = {
1554
1557
  name: V,
1555
1558
  progress: z,
1556
1559
  type: k.type,
@@ -1560,8 +1563,8 @@ const Mn = (e) => {
1560
1563
  });
1561
1564
  }
1562
1565
  }, ut = (d) => {
1563
- pe((k) => k.filter((z) => z.name !== fe(d)));
1564
- }, zt = (d) => {
1566
+ pe((k) => k.filter((z) => z.name !== he(d)));
1567
+ }, Ut = (d) => {
1565
1568
  for (const k of d) {
1566
1569
  const z = Qe(k, v, et);
1567
1570
  De.current.set(k, z), z.then(
@@ -1571,52 +1574,52 @@ const Mn = (e) => {
1571
1574
  }
1572
1575
  );
1573
1576
  }
1574
- }, Qn = async (d) => {
1577
+ }, Jn = async (d) => {
1575
1578
  Te((k) => k + 1);
1576
1579
  try {
1577
1580
  const k = De.current.get(d);
1578
1581
  if (k) {
1579
1582
  const { data: B } = await k;
1580
- return X((se) => se.map((ce) => ce.id === B.id ? { ...ce, isInline: !0 } : ce)), {
1581
- src: sn(v, B.id),
1582
- name: fe(d.name),
1583
+ return K((se) => se.map((ce) => ce.id === B.id ? { ...ce, isInline: !0 } : ce)), {
1584
+ src: cn(v, B.id),
1585
+ name: he(d.name),
1583
1586
  mime: d.type
1584
1587
  };
1585
1588
  }
1586
- const { data: z } = await Qe(d, v, void 0), V = fe(d.name);
1587
- return X((B) => [
1589
+ const { data: z } = await Qe(d, v, void 0), V = he(d.name);
1590
+ return K((B) => [
1588
1591
  ...B,
1589
1592
  { id: z.id, name: V, mime: d.type, size: d.size, order: B.length, isInline: !0 }
1590
- ]), { src: sn(v, z.id), name: V, mime: d.type };
1593
+ ]), { src: cn(v, z.id), name: V, mime: d.type };
1591
1594
  } catch (k) {
1592
1595
  throw De.current.has(d) || ke.error(k?.message || "Upload failed"), k;
1593
1596
  } finally {
1594
1597
  Te((k) => k - 1);
1595
1598
  }
1596
- }, Yn = (d) => {
1597
- Z(!1), !d.defaultPrevented && br(
1599
+ }, Xn = (d) => {
1600
+ Z(!1), !d.defaultPrevented && xr(
1598
1601
  d,
1599
1602
  v,
1600
1603
  et,
1601
1604
  Ze,
1602
1605
  (k) => ut(k.name)
1603
1606
  );
1604
- }, Jn = (d) => {
1607
+ }, Kn = (d) => {
1605
1608
  d.preventDefault(), d.stopPropagation(), Z(!0);
1606
- }, Ut = ye(null), Kn = async ({ activity: d }) => {
1607
- const k = Et(d);
1609
+ }, Bt = fe(null), Zn = async ({ activity: d }) => {
1610
+ const k = Mt(d);
1608
1611
  k && k.entityId === oe?.id && (_e({ startFrame: k.startFrame, endFrame: k.endFrame }), $?.setDraft(k));
1609
- const z = kn(d.body || ""), V = d.files || [], B = St(z), se = y.length === 1 && y[0].id === (d.origin?.id ?? d.entityId), ce = (G) => {
1610
- const de = d.origin ?? (d.entityId && d.entityType ? { id: d.entityId, type: d.entityType } : void 0), ae = `[Source](${Bo(d.activityId, de)})`, ee = [G.trim(), ae].filter(Boolean).join(`
1612
+ const z = An(d.body || ""), V = d.files || [], B = It(z), se = y.length === 1 && y[0].id === (d.origin?.id ?? d.entityId), ce = (G) => {
1613
+ const de = d.origin ?? (d.entityId && d.entityType ? { id: d.entityId, type: d.entityType } : void 0), ae = `[Source](${Ho(d.activityId, de)})`, ee = [G.trim(), ae].filter(Boolean).join(`
1611
1614
 
1612
1615
  `);
1613
- O((he) => he.trim() ? `${he.trim()}
1616
+ O((ge) => ge.trim() ? `${ge.trim()}
1614
1617
 
1615
- ${ee}` : ee), Xe.current?.focus();
1618
+ ${ee}` : ee), Ke.current?.focus();
1616
1619
  }, Ve = async (G) => {
1617
1620
  const de = B.has(G.id);
1618
1621
  try {
1619
- const ae = await rn(
1622
+ const ae = await sn(
1620
1623
  v,
1621
1624
  G.id,
1622
1625
  G.name,
@@ -1624,27 +1627,27 @@ ${ee}` : ee), Xe.current?.focus();
1624
1627
  de ? void 0 : et
1625
1628
  );
1626
1629
  if (de) {
1627
- const { file: he, data: tt } = ae, mt = fe(he.name);
1628
- X((qt) => [
1629
- ...qt,
1630
- { id: tt.id, name: mt, mime: he.type, size: he.size, order: qt.length, isInline: de }
1630
+ const { file: ge, data: tt } = ae, mt = he(ge.name);
1631
+ K((Wt) => [
1632
+ ...Wt,
1633
+ { id: tt.id, name: mt, mime: ge.type, size: ge.size, order: Wt.length, isInline: de }
1631
1634
  ]);
1632
1635
  } else Ze(ae);
1633
1636
  const ee = G.annotation;
1634
1637
  if (ee && se) {
1635
- const he = await rn(
1638
+ const ge = await sn(
1636
1639
  v,
1637
1640
  ee.transparent,
1638
1641
  `annotation-${G.name}`,
1639
1642
  "image/png"
1640
1643
  );
1641
- Ze(he, !0), Fe((tt) => [
1644
+ Ze(ge, !0), Fe((tt) => [
1642
1645
  ...tt,
1643
1646
  {
1644
1647
  ...ee,
1645
- id: `${ee.id}-${pn()}`,
1648
+ id: `${ee.id}-${gn()}`,
1646
1649
  composite: ae.data.id,
1647
- transparent: he.data.id
1650
+ transparent: ge.data.id
1648
1651
  }
1649
1652
  ]);
1650
1653
  }
@@ -1659,13 +1662,13 @@ ${ee}` : ee), Xe.current?.focus();
1659
1662
  if (G.length) {
1660
1663
  const ee = new Map(
1661
1664
  (await Promise.all(G.map(Ve))).filter(
1662
- (he) => !!he
1665
+ (ge) => !!ge
1663
1666
  )
1664
1667
  );
1665
1668
  ce(
1666
1669
  z.replace(
1667
1670
  /(\/api\/projects\/[^/]+\/files\/)([\w-]+)/g,
1668
- (he, tt, mt) => ee.has(mt) ? tt + ee.get(mt) : he
1671
+ (ge, tt, mt) => ee.has(mt) ? tt + ee.get(mt) : ge
1669
1672
  )
1670
1673
  );
1671
1674
  } else ce(z);
@@ -1675,26 +1678,26 @@ ${ee}` : ee), Xe.current?.focus();
1675
1678
  }
1676
1679
  };
1677
1680
  Y(() => {
1678
- !u || Ut.current === u.key || (Ut.current = u.key, p?.(), Kn(u));
1681
+ !u || Bt.current === u.key || (Bt.current = u.key, yt(!0), p?.(), Zn(u));
1679
1682
  }, [u?.key]);
1680
- const Xn = kr({
1683
+ const eo = Fr({
1681
1684
  projectName: v,
1682
1685
  onSuccess: Ze,
1683
1686
  onProgress: et,
1684
1687
  // seed progress so the card switches to uploading before the export finishes
1685
1688
  onStart: (d) => et({ loaded: 1, total: 100 }, { name: d.name, type: "image/png" }),
1686
1689
  onError: (d) => ut(d.name)
1687
- }), Zn = me.length > 0 || Ye > 0, yt = Ne || Zn, vt = async () => {
1688
- if (!yt)
1690
+ }), to = me.length > 0 || Ye > 0, vt = Ne || to, bt = async () => {
1691
+ if (!vt)
1689
1692
  try {
1690
1693
  $e(!0);
1691
1694
  let d = [], k = Ee, z = [];
1692
- if (ge.length) {
1693
- Le(ge.map((ee) => ee.id));
1694
- const { files: de, metadata: ae } = await Xn(ge);
1695
+ if (ye.length) {
1696
+ Le(ye.map((ee) => ee.id));
1697
+ const { files: de, metadata: ae } = await eo(ye);
1695
1698
  d = de, k = [...k, ...ae], z = ae.map((ee) => ee.id), Le(z);
1696
1699
  }
1697
- const { annotations: V = [] } = n || {}, B = k.length ? [...V, ...k] : void 0, se = hr(Xe.current?.getMarkdown() ?? ve), ce = ne.filter((de) => !de.isInline || cn(de.id, se)), Ve = [...ce, ...d], G = {
1700
+ const { annotations: V = [] } = n || {}, B = k.length ? [...V, ...k] : void 0, se = yr(Ke.current?.getMarkdown() ?? ve), ce = ne.filter((de) => !de.isInline || ln(de.id, se)), Ve = [...ce, ...d], G = {
1698
1701
  ...n,
1699
1702
  annotations: B,
1700
1703
  // could be undefined
@@ -1706,11 +1709,11 @@ ${ee}` : ee), Xe.current?.focus();
1706
1709
  };
1707
1710
  if ((se || Ve.length) && i) {
1708
1711
  const de = ve;
1709
- O(""), X([]);
1712
+ O(""), K([]);
1710
1713
  try {
1711
1714
  await i(se, Ve, G), z.forEach((ae) => Ue?.(ae)), m && $?.setEditPreview(null), Fe([]), !m && w && $?.unlink(), m || _e(null);
1712
1715
  } catch {
1713
- O(de), X(ce), Fe(Ee);
1716
+ O(de), K(ce), Fe(Ee);
1714
1717
  return;
1715
1718
  }
1716
1719
  }
@@ -1719,50 +1722,50 @@ ${ee}` : ee), Xe.current?.focus();
1719
1722
  } finally {
1720
1723
  Le([]), $e(!1);
1721
1724
  }
1722
- }, Bt = [
1723
- ...ge.filter((d) => !Je.includes(d.id)),
1725
+ }, Gt = [
1726
+ ...ye.filter((d) => !Je.includes(d.id)),
1724
1727
  ...(ne || []).filter((d) => !d.isAnnotationLayer && !d.isInline),
1725
1728
  ...me
1726
- ].sort((d, k) => d.order - k.order), eo = Bt.length > 3, Gt = (d) => g ? I ? "You do not have permission to comment." : "Commenting is disabled across multiple projects." : I || !d ? "Leave a comment" : "Comment, or type / to add mentions, checklists, code and more...", Ht = async (d) => {
1729
+ ].sort((d, k) => d.order - k.order), no = Gt.length > 3, Ht = (d) => g ? I ? "You do not have permission to comment." : "Commenting is disabled across multiple projects." : I || !d ? "Leave a comment" : "Comment, or type / to add mentions, checklists, code and more...", qt = async (d) => {
1727
1730
  if (l)
1728
1731
  try {
1729
- (ft || ne.length > 0 || ge.length > 0) && await vt(), l(d);
1732
+ (ft || ne.length > 0 || ye.length > 0) && await bt(), l(d);
1730
1733
  } catch (k) {
1731
1734
  console.error(k), ke.error("Something went wrong while submitting the review");
1732
1735
  }
1733
- }, to = r && l && !g && /* @__PURE__ */ x(Do, { className: te("version-review-buttons", { guest: I }), children: [
1736
+ }, oo = r && l && !g && /* @__PURE__ */ x(So, { className: te("version-review-buttons", { guest: I }), children: [
1734
1737
  /* @__PURE__ */ c(
1735
- Yt,
1738
+ Jt,
1736
1739
  {
1737
1740
  icon: "check",
1738
1741
  variant: "tertiary",
1739
1742
  "data-tooltip": "Approve",
1740
- onClick: () => Ht(Ce.APPROVE),
1743
+ onClick: () => qt(Ce.APPROVE),
1741
1744
  children: /* @__PURE__ */ c("span", { className: "label", children: "Approve" })
1742
1745
  }
1743
1746
  ),
1744
1747
  /* @__PURE__ */ c(
1745
- Yt,
1748
+ Jt,
1746
1749
  {
1747
1750
  icon: "refresh",
1748
1751
  variant: "danger",
1749
1752
  "data-tooltip": "Request changes",
1750
- onClick: () => Ht(Ce.REQUEST_CHANGES),
1753
+ onClick: () => qt(Ce.REQUEST_CHANGES),
1751
1754
  children: /* @__PURE__ */ c("span", { className: "label", children: "Request changes" })
1752
1755
  }
1753
1756
  )
1754
- ] }), bt = !I && /* @__PURE__ */ c(
1755
- Pr,
1757
+ ] }), wt = !I && /* @__PURE__ */ c(
1758
+ $r,
1756
1759
  {
1757
1760
  value: Se,
1758
- categories: _t,
1761
+ categories: Pt,
1759
1762
  onChange: (d) => dt(d),
1760
1763
  isCompact: m,
1761
1764
  hasPowerpack: H,
1762
1765
  onPowerFeature: Q,
1763
- isHidden: Rr(_t, { isGuest: I, isAdmin: ue })
1766
+ isHidden: Lr(Pt, { isGuest: I, isAdmin: ue })
1764
1767
  }
1765
- ), no = /* @__PURE__ */ x(Ae, { children: [
1768
+ ), ao = /* @__PURE__ */ x(Ae, { children: [
1766
1769
  /* @__PURE__ */ c(
1767
1770
  at,
1768
1771
  {
@@ -1771,57 +1774,57 @@ ${ee}` : ee), Xe.current?.focus();
1771
1774
  className: "md-toolbar-button",
1772
1775
  "data-tooltip": "Attach files",
1773
1776
  onMouseDown: (d) => d.preventDefault(),
1774
- onClick: () => $t.current?.click()
1777
+ onClick: () => Lt.current?.click()
1775
1778
  }
1776
1779
  ),
1777
1780
  /* @__PURE__ */ c(
1778
1781
  "input",
1779
1782
  {
1780
- ref: $t,
1783
+ ref: Lt,
1781
1784
  type: "file",
1782
1785
  multiple: !0,
1783
1786
  hidden: !0,
1784
1787
  onChange: (d) => {
1785
- zt(Array.from(d.target.files || [])), d.target.value = "";
1788
+ Ut(Array.from(d.target.files || [])), d.target.value = "";
1786
1789
  }
1787
1790
  }
1788
1791
  )
1789
- ] }), oo = !(ge.length > 0 && ne.length === 0), ao = `calc(${Math.max((be ? ie || "Frame or range" : U || "").length, 1) + 2}ch + 16px)`;
1792
+ ] }), ro = m || Wn, io = `calc(${Math.max((be ? ie || "Frame or range" : U || "").length, 1) + 2}ch + 16px)`;
1790
1793
  return /* @__PURE__ */ c(Ae, { children: /* @__PURE__ */ x(
1791
- No,
1794
+ Io,
1792
1795
  {
1793
- className: te("comment-container", "md-mention-anchor", { isOpen: f, isEditing: m }),
1794
- onDragOver: Jn,
1796
+ className: te("comment-container", "md-mention-anchor", { isOpen: h, isEditing: m }),
1797
+ onDragOver: Kn,
1795
1798
  onDragLeave: () => Z(!1),
1796
- onDrop: Yn,
1799
+ onDrop: Xn,
1797
1800
  onClick: () => Z(!1),
1798
1801
  onKeyDown: (d) => d.stopPropagation(),
1799
1802
  children: [
1800
- r && s && /* @__PURE__ */ c(Or, { lastOwnVersionReview: s }),
1803
+ r && s && /* @__PURE__ */ c(Vr, { lastOwnVersionReview: s }),
1801
1804
  /* @__PURE__ */ x(
1802
- So,
1805
+ Eo,
1803
1806
  {
1804
1807
  className: te("block-shortcuts", {
1805
- isOpen: f,
1806
- isClosed: !f || g,
1808
+ isOpen: h,
1809
+ isClosed: !h || g,
1807
1810
  isEditing: m,
1808
1811
  isDropping: Ie,
1809
1812
  disabled: g,
1810
- isLoading: h,
1813
+ isLoading: f,
1811
1814
  isSubmitting: Ne,
1812
1815
  category: !!Se && !I
1813
1816
  }),
1814
- onClick: qn,
1815
- $categoryPrimary: Pt?.color,
1816
- $categoryTertiary: Rt.primary,
1817
- $categorySecondary: Rt.secondary,
1817
+ onClick: Qn,
1818
+ $categoryPrimary: Rt?.color,
1819
+ $categoryTertiary: $t.primary,
1820
+ $categorySecondary: $t.secondary,
1818
1821
  children: [
1819
- f && /* @__PURE__ */ c(
1820
- Tn,
1822
+ h && /* @__PURE__ */ c(
1823
+ Dn,
1821
1824
  {
1822
- files: Bt,
1823
- isCompact: eo || m,
1824
- onRemove: Wn,
1825
+ files: Gt,
1826
+ isCompact: no || m,
1827
+ onRemove: Yn,
1825
1828
  projectName: v,
1826
1829
  onAnnotationClick: Be,
1827
1830
  style: {
@@ -1838,60 +1841,60 @@ ${ee}` : ee), Xe.current?.focus();
1838
1841
  }
1839
1842
  }
1840
1843
  ),
1841
- f && !g ? /* @__PURE__ */ x(Ae, { children: [
1842
- m && bt && /* @__PURE__ */ c(Io, { children: bt }),
1844
+ h && !g ? /* @__PURE__ */ x(Ae, { children: [
1845
+ m && wt && /* @__PURE__ */ c(Mo, { children: wt }),
1843
1846
  /* @__PURE__ */ c(
1844
- Eo,
1847
+ _o,
1845
1848
  {
1846
- ref: Xe,
1849
+ ref: Ke,
1847
1850
  className: "comment-editor",
1848
1851
  value: ve,
1849
1852
  onChange: O,
1850
- placeholder: Gt(!0),
1851
- mentions: Bn,
1853
+ placeholder: Ht(!0),
1854
+ mentions: Gn,
1852
1855
  mentionPlacement: m ? "inline" : "top",
1853
- onMentionClick: Gn,
1854
- onMentionHover: Hn,
1855
- onSubmit: vt,
1856
- onEscape: Vt,
1857
- onFiles: zt,
1858
- onUploadMedia: Qn,
1856
+ onMentionClick: Hn,
1857
+ onMentionHover: qn,
1858
+ onSubmit: bt,
1859
+ onEscape: zt,
1860
+ onFiles: Ut,
1861
+ onUploadMedia: Jn,
1859
1862
  commands: lt,
1860
1863
  toolbar: !m,
1861
1864
  floatingToolbar: m,
1862
- toolbarStart: bt,
1865
+ toolbarStart: wt,
1863
1866
  toolbarEnd: /* @__PURE__ */ x(Ae, { children: [
1864
- /* @__PURE__ */ c(Mo, {}),
1865
- no
1867
+ /* @__PURE__ */ c(Po, {}),
1868
+ ao
1866
1869
  ] }),
1867
1870
  bordered: !1,
1868
- autoFocus: oo,
1871
+ autoFocus: ro,
1869
1872
  minHeight: m ? 40 : 88,
1870
1873
  maxHeight: 259
1871
1874
  }
1872
1875
  )
1873
- ] }) : /* @__PURE__ */ c(_o, { children: Gt() }),
1874
- /* @__PURE__ */ x(Po, { children: [
1875
- (!I || _) && /* @__PURE__ */ x(Ro, { children: [
1876
- !I && jr.map(({ trigger: d, icon: k, tooltip: z }) => /* @__PURE__ */ c(
1876
+ ] }) : /* @__PURE__ */ c(Ro, { children: Ht() }),
1877
+ /* @__PURE__ */ x($o, { children: [
1878
+ (!I || _) && /* @__PURE__ */ x(Lo, { children: [
1879
+ !I && zr.map(({ trigger: d, icon: k, tooltip: z }) => /* @__PURE__ */ c(
1877
1880
  at,
1878
1881
  {
1879
1882
  icon: k,
1880
1883
  variant: "text",
1881
1884
  onMouseDown: (V) => V.preventDefault(),
1882
- onClick: () => Xe.current?.insertMentionTrigger(d),
1885
+ onClick: () => Ke.current?.insertMentionTrigger(d),
1883
1886
  "data-tooltip": z,
1884
1887
  "data-shortcut": d
1885
1888
  },
1886
1889
  d
1887
1890
  )),
1888
1891
  _ && /* @__PURE__ */ x(
1889
- $o,
1892
+ Oo,
1890
1893
  {
1891
1894
  className: te("frame-link", { selected: !!w || be }),
1892
1895
  children: [
1893
1896
  /* @__PURE__ */ c(
1894
- Lo,
1897
+ jo,
1895
1898
  {
1896
1899
  icon: "timer",
1897
1900
  variant: "text",
@@ -1902,7 +1905,7 @@ ${ee}` : ee), Xe.current?.focus();
1902
1905
  }
1903
1906
  ),
1904
1907
  (w || be) && (be ? /* @__PURE__ */ c(
1905
- Oo,
1908
+ Vo,
1906
1909
  {
1907
1910
  autoFocus: !0,
1908
1911
  "aria-label": "Linked frame or range",
@@ -1913,14 +1916,14 @@ ${ee}` : ee), Xe.current?.focus();
1913
1916
  },
1914
1917
  onChange: (d) => je(d.target.value),
1915
1918
  onBlur: ct,
1916
- style: { width: ao },
1919
+ style: { width: io },
1917
1920
  onKeyDown: (d) => {
1918
1921
  d.key === "Enter" && (d.preventDefault(), d.currentTarget.blur()), d.key === "Escape" && (le.current = !0, d.currentTarget.blur());
1919
1922
  },
1920
1923
  "data-testid": "comment-frame-link-input"
1921
1924
  }
1922
1925
  ) : /* @__PURE__ */ c(
1923
- jo,
1926
+ zo,
1924
1927
  {
1925
1928
  variant: "text",
1926
1929
  "aria-label": `Edit linked frame ${U ?? ""}`,
@@ -1933,36 +1936,36 @@ ${ee}` : ee), Xe.current?.focus();
1933
1936
  }
1934
1937
  )
1935
1938
  ] }),
1936
- /* @__PURE__ */ x(Vo, { children: [
1937
- m && /* @__PURE__ */ c(at, { variant: "text", onClick: Vt, children: "Cancel" }),
1939
+ /* @__PURE__ */ x(Uo, { children: [
1940
+ m && /* @__PURE__ */ c(at, { variant: "text", onClick: zt, children: "Cancel" }),
1938
1941
  /* @__PURE__ */ c(
1939
- vo,
1942
+ wo,
1940
1943
  {
1941
1944
  label: m ? "Save" : "Comment",
1942
1945
  className: "comment",
1943
1946
  active: ft || !!ne.length,
1944
- onClick: vt,
1945
- disabled: h || yt,
1946
- saving: yt
1947
+ onClick: bt,
1948
+ disabled: f || vt,
1949
+ saving: vt
1947
1950
  }
1948
1951
  )
1949
1952
  ] })
1950
1953
  ] }),
1951
- /* @__PURE__ */ c(zo, { className: te({ show: Ie && f }), children: /* @__PURE__ */ c(re, { icon: "cloud_upload" }) })
1954
+ /* @__PURE__ */ c(Bo, { className: te({ show: Ie && h }), children: /* @__PURE__ */ c(re, { icon: "cloud_upload" }) })
1952
1955
  ]
1953
1956
  }
1954
1957
  ),
1955
- /* @__PURE__ */ c(Uo, {}),
1956
- to
1958
+ /* @__PURE__ */ c(Go, {}),
1959
+ oo
1957
1960
  ]
1958
1961
  }
1959
1962
  ) });
1960
- }, Vr = (e, t, o) => e && It`
1963
+ }, Ur = (e, t, o) => e && Et`
1961
1964
  --reaction-border-color: ${e};
1962
1965
  --reaction-active-bg: ${t};
1963
1966
  --reaction-hover-bg: ${t};
1964
1967
  --reaction-active-border: ${e};
1965
- `, zr = F.div`
1968
+ `, Br = F.div`
1966
1969
  /* VARS */
1967
1970
  --reaction-border-color: var(--md-sys-color-outline-variant);
1968
1971
  --reaction-hover-bg: var(--md-sys-color-surface-container-high-hover);
@@ -1975,7 +1978,7 @@ ${ee}` : ee), Xe.current?.focus();
1975
1978
  --reaction-compact-active-hover-bg: var(--md-sys-color-primary-container-hover);
1976
1979
 
1977
1980
  /* CATEGORY */
1978
- ${({ $categoryPrimary: e, $categorySecondary: t, $categoryTertiary: o }) => Vr(e, t)}
1981
+ ${({ $categoryPrimary: e, $categorySecondary: t, $categoryTertiary: o }) => Ur(e, t)}
1979
1982
 
1980
1983
  display: flex;
1981
1984
  justify-content: center;
@@ -2026,23 +2029,23 @@ ${ee}` : ee), Xe.current?.focus();
2026
2029
  position: relative;
2027
2030
  height: 19px;
2028
2031
  }
2029
- `, Ur = F.div`
2032
+ `, Gr = F.div`
2030
2033
  outline: 'solid 1px red';
2031
2034
  display: flex;
2032
2035
  gap: 8px;
2033
- `, Br = F.div`
2036
+ `, Hr = F.div`
2034
2037
  position: fixed;
2035
2038
  top: 0;
2036
2039
  bottom: 0;
2037
2040
  left: 0;
2038
2041
  right: 0;
2039
2042
  z-index: 55;
2040
- `, Gr = F.div`
2043
+ `, qr = F.div`
2041
2044
  /* VARS */
2042
2045
  --panel-bg: var(--md-sys-color-surface-container-high);
2043
2046
 
2044
2047
  /* CATEGORY */
2045
- ${({ $categoryPrimary: e, $categorySecondary: t }) => t && It`
2048
+ ${({ $categoryPrimary: e, $categorySecondary: t }) => t && Et`
2046
2049
  --panel-bg: ${t};
2047
2050
  `}
2048
2051
 
@@ -2058,14 +2061,14 @@ ${ee}` : ee), Xe.current?.focus();
2058
2061
  padding: 4px;
2059
2062
  border-radius: 4px;
2060
2063
  box-shadow: 0px 0px 6px 2px rgba(0, 0, 0, 0.15);
2061
- `, Hr = F.div`
2064
+ `, Wr = F.div`
2062
2065
  /* VARS */
2063
2066
  --opener-bg: var(--md-sys-color-surface-container-high);
2064
2067
  --opener-hover-bg: var(--md-sys-color-surface-container-high-hover);
2065
2068
  --opener-color: var(--md-sys-color-outline);
2066
2069
 
2067
2070
  /* CATEGORY */
2068
- ${({ $categoryPrimary: e, $categorySecondary: t }) => t && It`
2071
+ ${({ $categoryPrimary: e, $categorySecondary: t }) => t && Et`
2069
2072
  --opener-bg: ${t};
2070
2073
  --opener-hover-bg: ${t};
2071
2074
  --opener-color: ${e};
@@ -2088,31 +2091,31 @@ ${ee}` : ee), Xe.current?.focus();
2088
2091
  filter: ${({ $categoryPrimary: e }) => e ? "brightness(1.2)" : "none"};
2089
2092
  }
2090
2093
  }
2091
- `, qr = F.div`
2094
+ `, Qr = F.div`
2092
2095
  display: flex;
2093
2096
  gap: 8px;
2094
2097
  position: relative;
2095
- `, Wr = [
2098
+ `, Yr = [
2096
2099
  { key: "thumb_up", value: "👍" },
2097
2100
  { key: "thumb_down", value: "👎" },
2098
2101
  { key: "heart_plus", value: "❤" },
2099
2102
  { key: "celebration", value: "🎉" },
2100
2103
  { key: "notes", value: "📝" }
2101
- ], Qr = {
2104
+ ], Jr = {
2102
2105
  thumb_up: "👍",
2103
2106
  thumb_down: "👎",
2104
2107
  heart_plus: "❤️",
2105
2108
  celebration: "🎉",
2106
2109
  notes: "📝"
2107
- }, Ct = [
2110
+ }, Tt = [
2108
2111
  "thumb_up",
2109
2112
  "thumb_down",
2110
2113
  "heart_plus",
2111
2114
  "celebration",
2112
2115
  "notes"
2113
- ], Yr = (e) => [...e].sort(
2114
- (o, n) => Ct.indexOf(o.type) - Ct.indexOf(n.type)
2115
- ), Rn = ({
2116
+ ], Xr = (e) => [...e].sort(
2117
+ (o, n) => Tt.indexOf(o.type) - Tt.indexOf(n.type)
2118
+ ), $n = ({
2116
2119
  reaction: e,
2117
2120
  variant: t = "standard",
2118
2121
  onClick: o,
@@ -2122,7 +2125,7 @@ ${ee}` : ee), Xe.current?.focus();
2122
2125
  }) => {
2123
2126
  const s = e.users?.join(", ") || void 0;
2124
2127
  return /* @__PURE__ */ x(
2125
- zr,
2128
+ Br,
2126
2129
  {
2127
2130
  className: te(t, { active: e.isActive }),
2128
2131
  onClick: o,
@@ -2131,19 +2134,19 @@ ${ee}` : ee), Xe.current?.focus();
2131
2134
  $categorySecondary: a,
2132
2135
  $categoryTertiary: r,
2133
2136
  children: [
2134
- /* @__PURE__ */ c("span", { className: "emoji", children: Qr[e.type] }),
2137
+ /* @__PURE__ */ c("span", { className: "emoji", children: Jr[e.type] }),
2135
2138
  e.users && /* @__PURE__ */ c("span", { children: e.users.length })
2136
2139
  ]
2137
2140
  }
2138
2141
  );
2139
- }, Jr = ({
2142
+ }, Kr = ({
2140
2143
  reactions: e,
2141
2144
  changeHandler: t,
2142
2145
  categoryPrimary: o,
2143
2146
  categorySecondary: n,
2144
2147
  categoryTertiary: a
2145
- }) => /* @__PURE__ */ c(Ur, { children: e.map((r) => /* @__PURE__ */ c(
2146
- Rn,
2148
+ }) => /* @__PURE__ */ c(Gr, { children: e.map((r) => /* @__PURE__ */ c(
2149
+ $n,
2147
2150
  {
2148
2151
  reaction: r,
2149
2152
  isActive: r.isActive,
@@ -2155,7 +2158,7 @@ ${ee}` : ee), Xe.current?.focus();
2155
2158
  categoryTertiary: a
2156
2159
  },
2157
2160
  r.type
2158
- )) }), Kr = ({
2161
+ )) }), Zr = ({
2159
2162
  reactions: e,
2160
2163
  changeHandler: t,
2161
2164
  categoryPrimary: o,
@@ -2164,7 +2167,7 @@ ${ee}` : ee), Xe.current?.focus();
2164
2167
  }) => {
2165
2168
  const [r, s] = L(!1), i = e.filter((l) => l.isActive).map((l) => l.type);
2166
2169
  return /* @__PURE__ */ x(
2167
- Hr,
2170
+ Wr,
2168
2171
  {
2169
2172
  $categoryPrimary: o,
2170
2173
  $categorySecondary: n,
@@ -2179,20 +2182,20 @@ ${ee}` : ee), Xe.current?.focus();
2179
2182
  }
2180
2183
  ),
2181
2184
  r && /* @__PURE__ */ x(Ae, { children: [
2182
- /* @__PURE__ */ c(Br, { onClick: () => s(!1) }),
2185
+ /* @__PURE__ */ c(Hr, { onClick: () => s(!1) }),
2183
2186
  /* @__PURE__ */ c(
2184
- Gr,
2187
+ qr,
2185
2188
  {
2186
2189
  $categoryPrimary: o,
2187
2190
  $categorySecondary: n,
2188
2191
  $categoryTertiary: a,
2189
- children: Wr.map((l) => {
2192
+ children: Yr.map((l) => {
2190
2193
  const u = {
2191
2194
  type: l.key,
2192
2195
  isActive: i.includes(l.key)
2193
2196
  };
2194
2197
  return /* @__PURE__ */ c(
2195
- Rn,
2198
+ $n,
2196
2199
  {
2197
2200
  reaction: u,
2198
2201
  variant: "compact",
@@ -2212,7 +2215,7 @@ ${ee}` : ee), Xe.current?.focus();
2212
2215
  ]
2213
2216
  }
2214
2217
  );
2215
- }, Xr = ({
2218
+ }, ei = ({
2216
2219
  reactions: e,
2217
2220
  changeHandler: t,
2218
2221
  readOnly: o,
@@ -2222,34 +2225,34 @@ ${ee}` : ee), Xe.current?.focus();
2222
2225
  categoryTertiary: s
2223
2226
  }) => {
2224
2227
  const i = n ? { categoryPrimary: a, categorySecondary: r, categoryTertiary: s } : {};
2225
- return /* @__PURE__ */ x(qr, { children: [
2228
+ return /* @__PURE__ */ x(Qr, { children: [
2226
2229
  !o && /* @__PURE__ */ c(
2227
- Kr,
2230
+ Zr,
2228
2231
  {
2229
2232
  reactions: e,
2230
2233
  changeHandler: t,
2231
2234
  ...i
2232
2235
  }
2233
2236
  ),
2234
- /* @__PURE__ */ c(Jr, { reactions: e, changeHandler: t, ...i })
2237
+ /* @__PURE__ */ c(Kr, { reactions: e, changeHandler: t, ...i })
2235
2238
  ] });
2236
- }, Zr = (e = "") => (e.match(/\((.*?)\)/g) || []).flatMap((o) => {
2239
+ }, ti = (e = "") => (e.match(/\((.*?)\)/g) || []).flatMap((o) => {
2237
2240
  if (o.includes("http")) return [];
2238
2241
  const n = o.match(/\(([^)]+)\)/), a = n ? n[1].split(":") : [];
2239
2242
  return { type: a[0], id: a[1] };
2240
- }), ei = (e) => e.replace(/@(?=@|\[)/g, ""), ti = {
2243
+ }), ni = (e) => e.replace(/@(?=@|\[)/g, ""), oi = {
2241
2244
  "&": "&amp;",
2242
2245
  "<": "&lt;",
2243
2246
  ">": "&gt;",
2244
2247
  '"': "&quot;"
2245
- }, wt = (e) => e.replace(/[&<>"]/g, (t) => ti[t]), ni = (e) => e.replaceAll(" ", "%20"), oi = (e, t) => {
2248
+ }, xt = (e) => e.replace(/[&<>"]/g, (t) => oi[t]), ai = (e) => e.replaceAll(" ", "%20"), ri = (e, t) => {
2246
2249
  const o = t.cloneContents();
2247
2250
  if (!o.querySelector("[data-mention-value]")) return null;
2248
2251
  let n = "", a = "";
2249
2252
  const r = (s) => {
2250
2253
  if (s.nodeType === Node.TEXT_NODE) {
2251
2254
  const u = s.data;
2252
- n += u, a += wt(u);
2255
+ n += u, a += xt(u);
2253
2256
  return;
2254
2257
  }
2255
2258
  if (s.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
@@ -2261,8 +2264,8 @@ ${ee}` : ee), Xe.current?.focus();
2261
2264
  if (l) {
2262
2265
  const u = i.getAttribute("data-mention-label") || (i.textContent || "").trim();
2263
2266
  if (u) {
2264
- const p = ni(l);
2265
- n += `[${u}](${p})`, a += `<a href="@${wt(p)}">@${wt(u)}</a>`;
2267
+ const p = ai(l);
2268
+ n += `[${u}](${p})`, a += `<a href="@${xt(p)}">@${xt(u)}</a>`;
2266
2269
  }
2267
2270
  return;
2268
2271
  }
@@ -2280,15 +2283,15 @@ ${ee}` : ee), Xe.current?.focus();
2280
2283
  s.childNodes.forEach(r);
2281
2284
  };
2282
2285
  return r(o), n ? { text: n, html: a } : null;
2283
- }, ai = ({ children: e }) => {
2284
- const t = Wt.Children.map(e, (n) => {
2285
- if (!Wt.isValidElement(n)) return n;
2286
+ }, ii = ({ children: e }) => {
2287
+ const t = Qt.Children.map(e, (n) => {
2288
+ if (!Qt.isValidElement(n)) return n;
2286
2289
  const a = n.props.children;
2287
2290
  return typeof a != "string" ? n : {
2288
2291
  ...n,
2289
2292
  props: {
2290
2293
  ...n.props,
2291
- children: ei(a)
2294
+ children: ni(a)
2292
2295
  }
2293
2296
  };
2294
2297
  }), o = We((n) => {
@@ -2296,21 +2299,21 @@ ${ee}` : ee), Xe.current?.focus();
2296
2299
  if (!a || a.rangeCount === 0 || a.isCollapsed) return;
2297
2300
  const r = a.getRangeAt(0), s = n.currentTarget;
2298
2301
  if (!s.contains(r.startContainer) || !s.contains(r.endContainer)) return;
2299
- const i = oi(s, r);
2302
+ const i = ri(s, r);
2300
2303
  i && (n.preventDefault(), n.clipboardData.setData("text/plain", i.text), n.clipboardData.setData("text/html", i.html));
2301
2304
  }, []);
2302
2305
  return /* @__PURE__ */ c("div", { className: "comment-text", onCopy: o, children: t });
2303
- }, ri = (e = [], t) => {
2306
+ }, si = (e = [], t) => {
2304
2307
  let o = {};
2305
2308
  return e.forEach((n) => {
2306
2309
  const a = n.reaction;
2307
- Ct.includes(a) && (o[a] === void 0 && (o[a] = { type: a, isActive: !1, users: [] }), t == n.userName && (o[a].isActive = !0), o[a].users?.push(n.fullName || n.userName));
2308
- }), Yr(Object.values(o));
2309
- }, ii = F.div`
2310
+ Tt.includes(a) && (o[a] === void 0 && (o[a] = { type: a, isActive: !1, users: [] }), t == n.userName && (o[a].isActive = !0), o[a].users?.push(n.fullName || n.userName));
2311
+ }), Xr(Object.values(o));
2312
+ }, ci = F.div`
2310
2313
  display: flex;
2311
2314
  align-items: center;
2312
2315
  gap: var(--base-gap-small);
2313
- `, si = F.span`
2316
+ `, li = F.span`
2314
2317
  border-radius: var(--border-radius-m);
2315
2318
  padding: 2px 6px;
2316
2319
  margin: 0 2px;
@@ -2327,19 +2330,19 @@ ${ee}` : ee), Xe.current?.focus();
2327
2330
  font-size: 16px;
2328
2331
  font-variation-settings: 'FILL' 1, 'wght' 300, 'GRAD' 300, 'opsz' 20;
2329
2332
  }
2330
- `, ci = ({ name: e, statuses: t, children: o }) => {
2331
- const n = li(e, t);
2332
- return /* @__PURE__ */ x(ii, { children: [
2333
+ `, di = ({ name: e, statuses: t, children: o }) => {
2334
+ const n = ui(e, t);
2335
+ return /* @__PURE__ */ x(ci, { children: [
2333
2336
  o,
2334
- /* @__PURE__ */ x(si, { $color: Nt(n.color), style: { backgroundColor: n.color }, children: [
2337
+ /* @__PURE__ */ x(li, { $color: St(n.color), style: { backgroundColor: n.color }, children: [
2335
2338
  n.icon && /* @__PURE__ */ c(re, { icon: n.icon }),
2336
2339
  e
2337
2340
  ] })
2338
2341
  ] });
2339
- }, li = (e, t) => {
2342
+ }, ui = (e, t) => {
2340
2343
  const o = { name: e, color: "var(--md-sys-color-primary)", icon: void 0 };
2341
2344
  return t.find((n) => n.name === e) || o;
2342
- }, di = F.header`
2345
+ }, mi = F.header`
2343
2346
  display: flex;
2344
2347
  align-items: flex-end;
2345
2348
  gap: var(--base-gap-small);
@@ -2351,7 +2354,7 @@ ${ee}` : ee), Xe.current?.focus();
2351
2354
  margin-left: 4px;
2352
2355
  font-weight: 800;
2353
2356
  }
2354
- `, ui = F.div`
2357
+ `, pi = F.div`
2355
2358
  display: flex;
2356
2359
  gap: var(--base-gap-small);
2357
2360
  align-items: center;
@@ -2373,14 +2376,14 @@ F.li`
2373
2376
  background-color: var(--md-sys-color-surface-container-hover);
2374
2377
  }
2375
2378
  `;
2376
- const xt = F.span`
2379
+ const kt = F.span`
2377
2380
  color: var(--md-sys-color-outline);
2378
2381
  white-space: nowrap;
2379
2382
 
2380
2383
  strong {
2381
2384
  font-weight: 800;
2382
2385
  }
2383
- `, mi = F.li`
2386
+ `, gi = F.li`
2384
2387
  list-style: none;
2385
2388
  margin: var(--padding-s) var(--padding-m);
2386
2389
  padding: var(--padding-s) var(--padding-m) var(--padding-s) 0;
@@ -2407,7 +2410,7 @@ const xt = F.span`
2407
2410
  &.request_changes .date, {
2408
2411
  color: var(--md-sys-color-error);
2409
2412
  }
2410
- `, pi = F.div`
2413
+ `, hi = F.div`
2411
2414
  display: flex;
2412
2415
  flex-wrap: nowrap;
2413
2416
  align-items: center;
@@ -2426,7 +2429,7 @@ const xt = F.span`
2426
2429
  color: var(--md-sys-color-outline);
2427
2430
  opacity: 0.5;
2428
2431
  }
2429
- `, gi = F.span`
2432
+ `, fi = F.span`
2430
2433
  white-space: nowrap;
2431
2434
  font-size: 12px;
2432
2435
  text-overflow: ellipsis;
@@ -2437,8 +2440,8 @@ const xt = F.span`
2437
2440
  font-size: 12px;
2438
2441
  font-weight: 800;
2439
2442
  }
2440
- `, hi = "#c5c5c5";
2441
- function $n(e) {
2443
+ `, yi = "#c5c5c5";
2444
+ function Ln(e) {
2442
2445
  const { categories: t } = Re(), { categoryData: o, categoryNotFound: n } = N(() => {
2443
2446
  let a = !1;
2444
2447
  if (e) {
@@ -2446,7 +2449,7 @@ function $n(e) {
2446
2449
  return r || (a = !0), {
2447
2450
  categoryData: r || {
2448
2451
  name: e,
2449
- color: hi
2452
+ color: yi
2450
2453
  },
2451
2454
  categoryNotFound: a
2452
2455
  };
@@ -2458,21 +2461,21 @@ function $n(e) {
2458
2461
  }, [e, t]);
2459
2462
  return { categoryData: o, categoryNotFound: n };
2460
2463
  }
2461
- const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (e) => !e || !e.name ? vi : e.name === fi && !e.label ? yi : e.label ? e.label : e.name, Tt = "anonymous.guest", bi = ({ isGuest: e, activity: t }) => {
2464
+ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (e) => !e || !e.name ? wi : e.name === vi && !e.label ? bi : e.label ? e.label : e.name, Dt = "anonymous.guest", xi = ({ isGuest: e, activity: t }) => {
2462
2465
  const { authorName: o, authorFullName: n, createdAt: a, activityData: r } = t || {}, s = N(
2463
2466
  () => [
2464
- Ln({ name: o, label: n }),
2465
- Mn(r?.feedback ?? Ce.APPROVE)
2467
+ On({ name: o, label: n }),
2468
+ _n(r?.feedback ?? Ce.APPROVE)
2466
2469
  ].join(" "),
2467
2470
  [n, o, r?.feedback, a]
2468
- ), { categoryData: i, categoryNotFound: l } = $n(r?.category), u = N(() => {
2469
- if (!o?.startsWith(Tt))
2471
+ ), { categoryData: i, categoryNotFound: l } = Ln(r?.category), u = N(() => {
2472
+ if (!o?.startsWith(Dt))
2470
2473
  return `/api/users/${o}/avatar`;
2471
2474
  }, [o]);
2472
2475
  if (r?.feedback)
2473
- return /* @__PURE__ */ c(mi, { className: gn(r.feedback), children: /* @__PURE__ */ x(pi, { children: [
2476
+ return /* @__PURE__ */ c(gi, { className: hn(r.feedback), children: /* @__PURE__ */ x(hi, { children: [
2474
2477
  o && /* @__PURE__ */ c(
2475
- bn,
2478
+ wn,
2476
2479
  {
2477
2480
  name: o,
2478
2481
  fullName: n,
@@ -2480,7 +2483,7 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
2480
2483
  size: 22
2481
2484
  }
2482
2485
  ),
2483
- /* @__PURE__ */ c(re, { icon: _n(r.feedback) }),
2486
+ /* @__PURE__ */ c(re, { icon: Pn(r.feedback) }),
2484
2487
  i && !e && /* @__PURE__ */ c(
2485
2488
  ot,
2486
2489
  {
@@ -2491,10 +2494,10 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
2491
2494
  "data-tooltip-delay": 0
2492
2495
  }
2493
2496
  ),
2494
- /* @__PURE__ */ c(gi, { children: s }),
2497
+ /* @__PURE__ */ c(fi, { children: s }),
2495
2498
  /* @__PURE__ */ c(st, { date: a, exactTooltip: !0 })
2496
2499
  ] }) });
2497
- }, On = ({
2500
+ }, jn = ({
2498
2501
  name: e,
2499
2502
  fullName: t,
2500
2503
  date: o,
@@ -2506,20 +2509,20 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
2506
2509
  onReferenceClick: l,
2507
2510
  onReferenceTooltip: u
2508
2511
  }) => {
2509
- const { referenceType: p, origin: m, activityType: g, versions: h, activityId: f } = a, b = p === "mention", D = g === "version.publish", v = h && h?.length > 1 ? "published versions" : "published a version", y = b ? "mentioned" : "commented", A = b ? ` ${i} on` : "on", C = e?.startsWith("guest.") || e?.startsWith(Tt), S = (a.author?.deleted || !a.author?.active) && !C, M = N(() => {
2510
- if (!e?.startsWith(Tt))
2512
+ const { referenceType: p, origin: m, activityType: g, versions: f, activityId: h } = a, b = p === "mention", D = g === "version.publish", v = f && f?.length > 1 ? "published versions" : "published a version", y = b ? "mentioned" : "commented", A = b ? ` ${i} on` : "on", C = e?.startsWith("guest.") || e?.startsWith(Dt), S = (a.author?.deleted || !a.author?.active) && !C, M = N(() => {
2513
+ if (!e?.startsWith(Dt))
2511
2514
  return `/api/users/${e}/avatar`;
2512
2515
  }, [e]);
2513
- return /* @__PURE__ */ x(di, { children: [
2514
- /* @__PURE__ */ x(ui, { children: [
2515
- e && !S && /* @__PURE__ */ c(bn, { name: e, fullName: t, src: M, size: 22 }),
2516
+ return /* @__PURE__ */ x(mi, { children: [
2517
+ /* @__PURE__ */ x(pi, { children: [
2518
+ e && !S && /* @__PURE__ */ c(wn, { name: e, fullName: t, src: M, size: 22 }),
2516
2519
  S && /* @__PURE__ */ c(re, { icon: "account_circle" }),
2517
2520
  /* @__PURE__ */ c("h5", { children: t || a.activityData?.author || "Unknown" }),
2518
2521
  n && /* @__PURE__ */ x(Ae, { children: [
2519
- /* @__PURE__ */ c(xt, { children: /* @__PURE__ */ c("strong", { children: y }) }),
2520
- /* @__PURE__ */ c(xt, { style: { overflow: "hidden", textOverflow: "ellipsis" }, children: A }),
2522
+ /* @__PURE__ */ c(kt, { children: /* @__PURE__ */ c("strong", { children: y }) }),
2523
+ /* @__PURE__ */ c(kt, { style: { overflow: "hidden", textOverflow: "ellipsis" }, children: A }),
2521
2524
  m && /* @__PURE__ */ c(
2522
- Go,
2525
+ qo,
2523
2526
  {
2524
2527
  id: m.id,
2525
2528
  type: m.type,
@@ -2528,7 +2531,7 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
2528
2531
  entityId: m.id,
2529
2532
  entityType: m.type,
2530
2533
  projectName: s,
2531
- activityId: f
2534
+ activityId: h
2532
2535
  }),
2533
2536
  onMouseEnter: (I, E) => u?.({
2534
2537
  type: m.type,
@@ -2541,13 +2544,13 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
2541
2544
  }
2542
2545
  )
2543
2546
  ] }),
2544
- D && /* @__PURE__ */ c(xt, { children: v }),
2547
+ D && /* @__PURE__ */ c(kt, { children: v }),
2545
2548
  r
2546
2549
  ] }),
2547
2550
  /* @__PURE__ */ c(st, { date: o })
2548
2551
  ] });
2549
- }, wi = ({ flags: e }) => e.length ? /* @__PURE__ */ c(Ho, { children: e.map(({ id: t, label: o, icon: n, tooltip: a, onClick: r, disabled: s, testId: i }) => /* @__PURE__ */ x(
2550
- qo,
2552
+ }, ki = ({ flags: e }) => e.length ? /* @__PURE__ */ c(Wo, { children: e.map(({ id: t, label: o, icon: n, tooltip: a, onClick: r, disabled: s, testId: i }) => /* @__PURE__ */ x(
2553
+ Qo,
2551
2554
  {
2552
2555
  as: r ? "button" : "span",
2553
2556
  type: r ? "button" : void 0,
@@ -2562,7 +2565,7 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
2562
2565
  ]
2563
2566
  },
2564
2567
  t
2565
- )) }) : null, xi = ({
2568
+ )) }) : null, Ai = ({
2566
2569
  category: e,
2567
2570
  categoryNotFound: t,
2568
2571
  frameLink: o,
@@ -2589,7 +2592,7 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
2589
2592
  testId: "comment-frame-link-chip"
2590
2593
  }
2591
2594
  ] : []
2592
- ], ki = ({
2595
+ ], Fi = ({
2593
2596
  onDelete: e,
2594
2597
  onEdit: t,
2595
2598
  onCopyText: o,
@@ -2621,15 +2624,15 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
2621
2624
  id: "copy-link",
2622
2625
  label: "Copy link",
2623
2626
  icon: "link",
2624
- onClick: u(() => Fn(Wo(s, r, i)))
2627
+ onClick: u(() => Cn(Yo(s, r, i)))
2625
2628
  }), e && l.push({
2626
2629
  id: "delete",
2627
2630
  label: "Delete",
2628
2631
  icon: "delete",
2629
2632
  onClick: u(e),
2630
2633
  danger: !0
2631
- }), /* @__PURE__ */ c(ia, { menu: l });
2632
- }, Ai = ({
2634
+ }), /* @__PURE__ */ c(ca, { menu: l });
2635
+ }, Ci = ({
2633
2636
  activity: e = {},
2634
2637
  onCheckChange: t,
2635
2638
  onDelete: o,
@@ -2643,8 +2646,8 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
2643
2646
  onFileExpand: p,
2644
2647
  showOrigin: m,
2645
2648
  isHighlighted: g,
2646
- readOnly: h,
2647
- statuses: f = []
2649
+ readOnly: f,
2650
+ statuses: h = []
2648
2651
  }) => {
2649
2652
  const {
2650
2653
  userName: b,
@@ -2654,10 +2657,10 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
2654
2657
  setEditingId: y,
2655
2658
  isGuest: A,
2656
2659
  userTeamNames: C
2657
- } = Re(), S = ye(null), { toggleMenuOpen: M, menuOpen: I } = Ia(), { categoryData: E, categoryNotFound: P } = $n(e?.activityData?.category), H = Dn(E?.color);
2660
+ } = Re(), S = fe(null), { toggleMenuOpen: M, menuOpen: I } = Ma(), { categoryData: E, categoryNotFound: P } = Ln(e?.activityData?.category), H = Nn(E?.color);
2658
2661
  let {
2659
2662
  body: Q,
2660
- authorName: K,
2663
+ authorName: X,
2661
2664
  authorFullName: q,
2662
2665
  createdAt: $,
2663
2666
  referenceType: ue,
@@ -2666,30 +2669,30 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
2666
2669
  author: ve,
2667
2670
  isOwner: O,
2668
2671
  files: ne = [],
2669
- origin: X
2672
+ origin: K
2670
2673
  } = e;
2671
- K || (K = ve?.name || ""), q = Ln({ name: K, label: q });
2672
- const Ye = so(), Te = `activity-comment-menu-${W}-${Ye}`, De = I === Te, { onGoToFrame: me, setHighlightedActivities: pe, user: Ie, commentFrameLink: Z } = ze(), Ne = !!Ie?.data?.isAdmin, $e = O || Ne, Ee = O || Ne, Fe = () => {
2674
+ X || (X = ve?.name || ""), q = On({ name: X, label: q });
2675
+ const Ye = lo(), Te = `activity-comment-menu-${W}-${Ye}`, De = I === Te, { onGoToFrame: me, setHighlightedActivities: pe, user: Ie, commentFrameLink: Z } = ze(), Ne = !!Ie?.data?.isAdmin, $e = O || Ne, Ee = O || Ne, Fe = () => {
2673
2676
  y(W);
2674
2677
  }, Je = () => {
2675
2678
  y(null);
2676
2679
  }, Le = async (T, le, we) => {
2677
2680
  await n?.(T, le, void 0, we), y(null);
2678
- }, ge = v === W, Ue = ({ activityId: T, url: le }) => {
2681
+ }, ye = v === W, Ue = ({ activityId: T, url: le }) => {
2679
2682
  document.getElementById(T) ? pe([T]) : window.open(le, "_blank", "noreferrer");
2680
2683
  }, Be = ue !== "origin" || m, oe = async () => {
2681
- const T = Zr(Q);
2682
- Be && X && T.push({ id: X.id, type: X.type }), o && await o(W, J, T);
2683
- }, Ke = () => {
2684
- Ga({
2684
+ const T = ti(Q);
2685
+ Be && K && T.push({ id: K.id, type: K.type }), o && await o(W, J, T);
2686
+ }, Xe = () => {
2687
+ qa({
2685
2688
  title: "Delete comment",
2686
2689
  message: "Are you sure you want to delete this comment?",
2687
2690
  accept: async () => {
2688
2691
  await oe();
2689
2692
  }
2690
2693
  });
2691
- }, [, Me] = An(), Ge = N(
2692
- () => ri(e.reactions, b),
2694
+ }, [, Me] = Fn(), Ge = N(
2695
+ () => si(e.reactions, b),
2693
2696
  [[...e.reactions || []]]
2694
2697
  ), _e = (T) => {
2695
2698
  T.isActive ? D({
@@ -2712,22 +2715,22 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
2712
2715
  T.annotation && (me?.(T.annotation.range[0]), pe([W]));
2713
2716
  },
2714
2717
  [me]
2715
- ), be = N(() => St(Q), [Q]), Pe = N(
2718
+ ), be = N(() => It(Q), [Q]), Pe = N(
2716
2719
  () => (ne || []).filter((T) => !be.has(T.id)),
2717
2720
  [ne, be]
2718
2721
  ), w = (T) => {
2719
- const le = na(T), we = (ne || []).filter((je) => gt(je.mime, je.ext)), xe = we.findIndex((je) => je.id === le);
2722
+ const le = aa(T), we = (ne || []).filter((je) => gt(je.mime, je.ext)), xe = we.findIndex((je) => je.id === le);
2720
2723
  xe !== -1 && p?.({ files: we, index: xe, activityId: W });
2721
- }, _ = N(() => kn(Q || ""), [Q]), j = N(() => Et(e), [e]), U = Z?.formatFrame ?? String, ie = () => {
2724
+ }, _ = N(() => An(Q || ""), [Q]), j = N(() => Mt(e), [e]), U = Z?.formatFrame ?? String, ie = () => {
2722
2725
  j && (Z ? Z.goTo(j) : me?.(j.startFrame), pe([W]));
2723
2726
  };
2724
2727
  return /* @__PURE__ */ x(Ae, { children: [
2725
2728
  /* @__PURE__ */ x(
2726
- Qo,
2729
+ Jo,
2727
2730
  {
2728
2731
  className: te("comment", {
2729
2732
  isOwner: O,
2730
- isEditing: ge,
2733
+ isEditing: ye,
2731
2734
  isHighlighted: g,
2732
2735
  category: !!E && !A,
2733
2736
  menuOpen: De
@@ -2738,9 +2741,9 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
2738
2741
  $categorySecondary: H.secondary,
2739
2742
  children: [
2740
2743
  /* @__PURE__ */ c(
2741
- On,
2744
+ jn,
2742
2745
  {
2743
- name: K,
2746
+ name: X,
2744
2747
  fullName: q,
2745
2748
  date: $,
2746
2749
  isRef: Be,
@@ -2752,11 +2755,11 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
2752
2755
  children: void 0
2753
2756
  }
2754
2757
  ),
2755
- /* @__PURE__ */ x(Yo, { className: te("comment-body", { isEditing: ge }), children: [
2756
- !h && /* @__PURE__ */ x(Jo, { className: "tools", children: [
2757
- Ee && /* @__PURE__ */ c(Jt, { icon: "edit_square", onClick: Fe, variant: "text" }),
2758
+ /* @__PURE__ */ x(Xo, { className: te("comment-body", { isEditing: ye }), children: [
2759
+ !f && /* @__PURE__ */ x(Ko, { className: "tools", children: [
2760
+ Ee && /* @__PURE__ */ c(Xt, { icon: "edit_square", onClick: Fe, variant: "text" }),
2758
2761
  /* @__PURE__ */ c(
2759
- Jt,
2762
+ Xt,
2760
2763
  {
2761
2764
  icon: "more_horiz",
2762
2765
  ref: S,
@@ -2767,8 +2770,8 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
2767
2770
  }
2768
2771
  )
2769
2772
  ] }),
2770
- ge ? /* @__PURE__ */ c(
2771
- Pn,
2773
+ ye ? /* @__PURE__ */ c(
2774
+ Rn,
2772
2775
  {
2773
2776
  initValue: Q,
2774
2777
  initFiles: ne,
@@ -2784,9 +2787,9 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
2784
2787
  }
2785
2788
  ) : /* @__PURE__ */ x(Ae, { children: [
2786
2789
  /* @__PURE__ */ c(
2787
- wi,
2790
+ ki,
2788
2791
  {
2789
- flags: xi({
2792
+ flags: Ai({
2790
2793
  category: E,
2791
2794
  categoryNotFound: P,
2792
2795
  frameLink: j,
@@ -2797,19 +2800,19 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
2797
2800
  })
2798
2801
  }
2799
2802
  ),
2800
- /* @__PURE__ */ c(ai, { children: /* @__PURE__ */ c(
2801
- hn,
2803
+ /* @__PURE__ */ c(ii, { children: /* @__PURE__ */ c(
2804
+ fn,
2802
2805
  {
2803
- remarkPlugins: [yn, fn, lo, uo],
2806
+ remarkPlugins: [vn, yn, mo, po],
2804
2807
  urlTransform: (T) => T,
2805
2808
  components: {
2806
2809
  // a links
2807
2810
  // @ts-ignore
2808
2811
  a: (T) => (
2809
2812
  // @ts-ignore
2810
- ta(T, {
2811
- entityId: X?.id ?? J,
2812
- entityType: X?.type ?? l,
2813
+ oa(T, {
2814
+ entityId: K?.id ?? J,
2815
+ entityType: K?.type ?? l,
2813
2816
  userName: b,
2814
2817
  userTeamNames: C,
2815
2818
  projectName: i,
@@ -2823,29 +2826,29 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
2823
2826
  ),
2824
2827
  // checkbox inputs
2825
2828
  // @ts-ignore
2826
- input: (T) => ea(T, { activity: e, onCheckChange: t }),
2829
+ input: (T) => na(T, { activity: e, onCheckChange: t }),
2827
2830
  // code syntax highlighting
2828
2831
  // eslint-disable-next-line
2829
2832
  // @ts-ignore
2830
- code: (T) => Zo(T),
2833
+ code: (T) => ta(T),
2831
2834
  // @ts-ignore
2832
- blockquote: (T) => Xo(T),
2835
+ blockquote: (T) => ea(T),
2833
2836
  // @ts-ignore
2834
- tip: (T) => /* @__PURE__ */ x(Ko, { children: [
2837
+ tip: (T) => /* @__PURE__ */ x(Zo, { children: [
2835
2838
  /* @__PURE__ */ c(re, { icon: "info" }),
2836
2839
  T.children
2837
2840
  ] }),
2838
2841
  // a video url on its own line is an embedded video
2839
2842
  // @ts-ignore
2840
- p: (T) => Wa(T, { onOpen: w }) ?? qa(T) ?? /* @__PURE__ */ c("p", { children: T.children }),
2843
+ p: (T) => Ya(T, { onOpen: w }) ?? Qa(T) ?? /* @__PURE__ */ c("p", { children: T.children }),
2841
2844
  // @ts-ignore
2842
- status: (T) => /* @__PURE__ */ c(ci, { name: T.id, statuses: f, children: T.children })
2845
+ status: (T) => /* @__PURE__ */ c(di, { name: T.id, statuses: h, children: T.children })
2843
2846
  },
2844
2847
  children: _
2845
2848
  }
2846
2849
  ) }),
2847
2850
  /* @__PURE__ */ c(
2848
- Tn,
2851
+ Dn,
2849
2852
  {
2850
2853
  files: Pe,
2851
2854
  isCompact: Pe.length > 6,
@@ -2858,12 +2861,12 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
2858
2861
  }
2859
2862
  )
2860
2863
  ] }),
2861
- !ge && /* @__PURE__ */ c("div", { style: { marginTop: "16px" }, children: Ge && /* @__PURE__ */ c(
2862
- Xr,
2864
+ !ye && /* @__PURE__ */ c("div", { style: { marginTop: "16px" }, children: Ge && /* @__PURE__ */ c(
2865
+ ei,
2863
2866
  {
2864
2867
  reactions: Ge,
2865
2868
  changeHandler: _e,
2866
- readOnly: h,
2869
+ readOnly: f,
2867
2870
  category: E && !A ? E.name : void 0,
2868
2871
  categoryPrimary: E?.color,
2869
2872
  categorySecondary: H.secondary,
@@ -2875,7 +2878,7 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
2875
2878
  }
2876
2879
  ),
2877
2880
  /* @__PURE__ */ c(
2878
- sa,
2881
+ la,
2879
2882
  {
2880
2883
  target: S.current,
2881
2884
  id: Te,
@@ -2884,22 +2887,22 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
2884
2887
  T?.stopPropagation(), M(!1);
2885
2888
  },
2886
2889
  children: /* @__PURE__ */ c(
2887
- ki,
2890
+ Fi,
2888
2891
  {
2889
- onDelete: $e && o ? Ke : void 0,
2892
+ onDelete: $e && o ? Xe : void 0,
2890
2893
  onEdit: Ee ? Fe : void 0,
2891
- onCopyText: _ ? () => Fn(_) : void 0,
2894
+ onCopyText: _ ? () => Cn(_) : void 0,
2892
2895
  onDuplicate: a ? () => a(e) : void 0,
2893
2896
  activityId: W,
2894
2897
  onSelect: () => M(!1),
2895
2898
  projectName: i,
2896
- entity: X ?? (J ? { id: J, type: l } : void 0)
2899
+ entity: K ?? (J ? { id: J, type: l } : void 0)
2897
2900
  }
2898
2901
  )
2899
2902
  }
2900
2903
  )
2901
2904
  ] });
2902
- }, Fi = F.li`
2905
+ }, Ti = F.li`
2903
2906
  list-style: none;
2904
2907
  margin: 0;
2905
2908
  padding: 0;
@@ -2909,7 +2912,7 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
2909
2912
  padding: 4px 8px;
2910
2913
  border-radius: var(--border-radius-m);
2911
2914
  user-select: none;
2912
- `, Ci = F.div`
2915
+ `, Di = F.div`
2913
2916
  display: flex;
2914
2917
  flex-wrap: wrap;
2915
2918
  align-items: center;
@@ -2924,7 +2927,7 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
2924
2927
  color: var(--md-sys-color-outline);
2925
2928
  opacity: 0.5;
2926
2929
  }
2927
- `, kt = F.span`
2930
+ `, At = F.span`
2928
2931
  color: var(--md-sys-color-outline);
2929
2932
  white-space: nowrap;
2930
2933
  font-size: 12px;
@@ -2932,10 +2935,10 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
2932
2935
  font-size: 12px;
2933
2936
  font-weight: 800;
2934
2937
  }
2935
- `, Ti = (e, t) => {
2938
+ `, Ni = (e, t) => {
2936
2939
  let o = [], n = {};
2937
2940
  return e.activityData.origin.type == "folder" && !n.folder && (n.folder = !0, o.push(e.activityData.origin.name)), e.activityData.origin.type == "task" && !n.task && (n.task = !0, o.push(e.activityData.origin.name)), (t == "version" || e.activityData.origin.type == "version") && (n.product || (n.product = !0, o.push(e.activityData.parents?.find((a) => a.type == "product")?.name)), n.version || (n.version = !0, o.push(e.activityData.origin.name))), o;
2938
- }, Di = F.div`
2941
+ }, Si = F.div`
2939
2942
  display: inline-flex;
2940
2943
  align-items: center;
2941
2944
  gap: var(--base-gap-small);
@@ -2944,7 +2947,7 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
2944
2947
  font-variation-settings: 'FILL' 1, 'wght' 300, 'GRAD' 300, 'opsz' 20;
2945
2948
  font-size: 16px;
2946
2949
  }
2947
- `, Ni = F.span`
2950
+ `, Ii = F.span`
2948
2951
  color: var(--md-sys-color-outline);
2949
2952
  font-size: 12px;
2950
2953
  max-width: 300px;
@@ -2954,37 +2957,37 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
2954
2957
  span {
2955
2958
  font-size: inherit;
2956
2959
  }
2957
- `, Dt = pt(
2958
- ({ icon: e, color: t, name: o, items: n, ...a }, r) => /* @__PURE__ */ x(Di, { ...a, ref: r, children: [
2960
+ `, Nt = pt(
2961
+ ({ icon: e, color: t, name: o, items: n, ...a }, r) => /* @__PURE__ */ x(Si, { ...a, ref: r, children: [
2959
2962
  e && /* @__PURE__ */ c(re, { icon: e, style: { color: t } }),
2960
- /* @__PURE__ */ c(Ni, { title: o, children: n ? n.map((s, i) => /* @__PURE__ */ x(co, { children: [
2963
+ /* @__PURE__ */ c(Ii, { title: o, children: n ? n.map((s, i) => /* @__PURE__ */ x(uo, { children: [
2961
2964
  /* @__PURE__ */ c("span", { style: { color: s.color }, children: s.label }),
2962
2965
  i < n.length - 1 && ", "
2963
2966
  ] }, i)) : o })
2964
2967
  ] })
2965
- ), Si = (e) => {
2968
+ ), Ei = (e) => {
2966
2969
  const t = typeof e.icon == "string" ? e.icon : e.icon?.name, o = e.color ?? (typeof e.icon == "object" ? e.icon?.color : void 0);
2967
2970
  return { name: e.label, icon: t, color: o };
2968
- }, Ii = (e, t) => {
2971
+ }, Mi = (e, t) => {
2969
2972
  const o = t?.data.enum?.find((n) => n.value === e)?.label;
2970
2973
  if (o) return o;
2971
2974
  if (t?.data.type === "datetime") {
2972
2975
  const n = new Date(String(e));
2973
- if (!isNaN(n.getTime())) return oa(n, "dd-MM-yyyy");
2976
+ if (!isNaN(n.getTime())) return ra(n, "dd-MM-yyyy");
2974
2977
  }
2975
2978
  return String(e);
2976
- }, Ei = (e, t) => e === "description" || t?.data.widget === "markdown", Mi = (e, t, o) => {
2979
+ }, _i = (e, t) => e === "description" || t?.data.widget === "markdown", Pi = (e, t, o) => {
2977
2980
  if (e == null || e === "" || Array.isArray(e) && !e.length) return { name: "none" };
2978
- if (typeof e == "string" && Ei(o, t))
2979
- return { name: Ha(e) || "none" };
2981
+ if (typeof e == "string" && _i(o, t))
2982
+ return { name: Wa(e) || "none" };
2980
2983
  if (t?.data.type === "boolean") return { name: e ? "Checked" : "Unchecked" };
2981
2984
  const a = Array.isArray(e) ? e : [e];
2982
2985
  if (a.length === 1) {
2983
2986
  const r = t?.data.enum?.find((s) => s.value === a[0]);
2984
- if (r) return Si(r);
2987
+ if (r) return Ei(r);
2985
2988
  }
2986
- return { name: a.map((r) => Ii(r, t)).join(", ") };
2987
- }, _i = ({
2989
+ return { name: a.map((r) => Mi(r, t)).join(", ") };
2990
+ }, Ri = ({
2988
2991
  entityType: e,
2989
2992
  projectInfo: t,
2990
2993
  activity: o = {}
@@ -2997,35 +3000,35 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
2997
3000
  oldStatus: i,
2998
3001
  newStatus: l,
2999
3002
  activityData: u = {}
3000
- } = o, { key: p, oldValue: m, newValue: g } = u, h = Ti(o, e), f = n === "attrib.change", b = n === "tags.change", D = n === "subtype.change", { data: R = [] } = wa(void 0, { skip: !f }), v = N(() => R.find((P) => P.name === p), [R, p]), y = f ? v?.data.title || p : b ? "Tags" : D ? "Type" : void 0, A = (P) => ({
3003
+ } = o, { key: p, oldValue: m, newValue: g } = u, f = Ni(o, e), h = n === "attrib.change", b = n === "tags.change", D = n === "subtype.change", { data: R = [] } = ka(void 0, { skip: !h }), v = N(() => R.find((P) => P.name === p), [R, p]), y = h ? v?.data.title || p : b ? "Tags" : D ? "Type" : void 0, A = (P) => ({
3001
3004
  name: P?.name || "",
3002
3005
  icon: P?.icon,
3003
3006
  color: P?.color
3004
3007
  }), C = (P) => {
3005
3008
  const H = Array.isArray(P) ? P.map(String) : [];
3006
3009
  if (!H.length) return { name: "none" };
3007
- const Q = H.map((K) => ({
3008
- label: K,
3009
- color: t?.tags?.find((q) => q.name === K)?.color
3010
+ const Q = H.map((X) => ({
3011
+ label: X,
3012
+ color: t?.tags?.find((q) => q.name === X)?.color
3010
3013
  }));
3011
3014
  return { name: H.join(", "), items: Q };
3012
- }, S = n === "status.change", M = (P, H) => S ? A(H) : b ? C(P) : Mi(P, v, p), I = M(m, i), E = M(g, l);
3013
- return /* @__PURE__ */ x(Fi, { children: [
3014
- /* @__PURE__ */ x(Ci, { children: [
3015
- /* @__PURE__ */ c(kt, { children: r || a }),
3016
- /* @__PURE__ */ x(kt, { children: [
3015
+ }, S = n === "status.change", M = (P, H) => S ? A(H) : b ? C(P) : Pi(P, v, p), I = M(m, i), E = M(g, l);
3016
+ return /* @__PURE__ */ x(Ti, { children: [
3017
+ /* @__PURE__ */ x(Di, { children: [
3018
+ /* @__PURE__ */ c(At, { children: r || a }),
3019
+ /* @__PURE__ */ x(At, { children: [
3017
3020
  "- ",
3018
- h.join(" / "),
3021
+ f.join(" / "),
3019
3022
  " -"
3020
3023
  ] }),
3021
- y && /* @__PURE__ */ c(kt, { children: /* @__PURE__ */ c("strong", { children: y }) }),
3022
- /* @__PURE__ */ c(Dt, { ...I }),
3024
+ y && /* @__PURE__ */ c(At, { children: /* @__PURE__ */ c("strong", { children: y }) }),
3025
+ /* @__PURE__ */ c(Nt, { ...I }),
3023
3026
  /* @__PURE__ */ c(re, { icon: "trending_flat" }),
3024
- /* @__PURE__ */ c(Dt, { ...E })
3027
+ /* @__PURE__ */ c(Nt, { ...E })
3025
3028
  ] }),
3026
3029
  /* @__PURE__ */ c(st, { date: s })
3027
3030
  ] });
3028
- }, Pi = F.li`
3031
+ }, $i = F.li`
3029
3032
  /* reset default */
3030
3033
  list-style: none;
3031
3034
  margin: 0;
@@ -3038,7 +3041,7 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
3038
3041
  padding: 4px 8px;
3039
3042
  border-radius: var(--border-radius-m);
3040
3043
  user-select: none;
3041
- `, Ri = F.div`
3044
+ `, Li = F.div`
3042
3045
  display: flex;
3043
3046
  flex-wrap: nowrap;
3044
3047
  align-items: start;
@@ -3046,18 +3049,18 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
3046
3049
  gap: var(--base-gap-small);
3047
3050
  padding: 0px 4px;
3048
3051
  overflow: hidden;
3049
- `, $i = F.span`
3052
+ `, Oi = F.span`
3050
3053
  color: var(--md-sys-color-outline);
3051
3054
  white-space: wrap;
3052
3055
  font-size: 12px;
3053
- `, ln = ({ activity: e, isAdding: t }) => {
3056
+ `, dn = ({ activity: e, isAdding: t }) => {
3054
3057
  const { authorFullName: o, createdAt: n, activityData: a, authorName: r } = e || {}, { assignee: s } = a || {};
3055
3058
  let i = o || r;
3056
- return i += t ? " added " : " removed ", i += "assignee: " + s, /* @__PURE__ */ c(Pi, { children: /* @__PURE__ */ x(Ri, { children: [
3057
- /* @__PURE__ */ c($i, { children: i }),
3059
+ return i += t ? " added " : " removed ", i += "assignee: " + s, /* @__PURE__ */ c($i, { children: /* @__PURE__ */ x(Li, { children: [
3060
+ /* @__PURE__ */ c(Oi, { children: i }),
3058
3061
  /* @__PURE__ */ c(st, { date: n })
3059
3062
  ] }) });
3060
- }, Li = F.li`
3063
+ }, ji = F.li`
3061
3064
  /* reset default */
3062
3065
  list-style: none;
3063
3066
  margin: 0;
@@ -3069,7 +3072,7 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
3069
3072
 
3070
3073
  width: 100%;
3071
3074
  padding: 8px;
3072
- `, Oi = F.div`
3075
+ `, Vi = F.div`
3073
3076
  border-radius: var(--border-radius-m);
3074
3077
  padding: var(--padding-m);
3075
3078
 
@@ -3085,7 +3088,7 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
3085
3088
  display: inline;
3086
3089
  }
3087
3090
  }
3088
- `, ji = F.div`
3091
+ `, zi = F.div`
3089
3092
  display: flex;
3090
3093
  flex-direction: row;
3091
3094
  justify-content: space-between;
@@ -3099,7 +3102,7 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
3099
3102
  min-width: 0;
3100
3103
  overflow: hidden;
3101
3104
  }
3102
- `, dn = F.div`
3105
+ `, un = F.div`
3103
3106
  display: flex;
3104
3107
  align-items: center;
3105
3108
  justify-content: space-between;
@@ -3123,7 +3126,7 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
3123
3126
  display: none;
3124
3127
  flex: 1;
3125
3128
  }
3126
- `, Vi = F(Da)`
3129
+ `, Ui = F(Sa)`
3127
3130
  width: 74px;
3128
3131
  min-width: 74px;
3129
3132
  height: unset;
@@ -3137,23 +3140,23 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
3137
3140
  img {
3138
3141
  object-fit: cover;
3139
3142
  }
3140
- `, zi = F.span`
3143
+ `, Bi = F.span`
3141
3144
  overflow: hidden;
3142
3145
  text-overflow: ellipsis;
3143
3146
  white-space: nowrap;
3144
3147
  display: block;
3145
3148
  min-width: 0;
3146
- `, Ui = F.div`
3149
+ `, Gi = F.div`
3147
3150
  margin-top: var(--base-gap-small);
3148
3151
  color: var(--md-sys-color-outline);
3149
3152
  word-break: break-word;
3150
- `, Bi = F.li`
3153
+ `, Hi = F.li`
3151
3154
  /* reset default */
3152
3155
  list-style: none;
3153
3156
  margin: 0;
3154
3157
  padding: 0;
3155
3158
  padding: 0px 8px;
3156
- `, jn = F.div`
3159
+ `, Vn = F.div`
3157
3160
  width: 100%;
3158
3161
  display: flex;
3159
3162
  align-items: center;
@@ -3176,7 +3179,7 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
3176
3179
  &:hover {
3177
3180
  background-color: var(--md-sys-color-surface-container-hover);
3178
3181
  }
3179
- `, Gi = ({
3182
+ `, qi = ({
3180
3183
  activity: e,
3181
3184
  projectName: t,
3182
3185
  entityType: o,
@@ -3186,10 +3189,10 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
3186
3189
  }) => {
3187
3190
  const { onOpenViewer: s } = ze();
3188
3191
  let { authorName: i, authorFullName: l, createdAt: u, versions: p = [] } = e;
3189
- const m = a === "versions" || a && typeof a == "object" && a.conditions?.some((v) => v.key === "versions" && v.value === !0), [g, h] = L(m), f = 2, [b, D] = L(!1), R = (v, y) => s?.({ versionIds: [v], productId: y, projectName: t });
3190
- return /* @__PURE__ */ x(Li, { children: [
3192
+ const m = a === "versions" || a && typeof a == "object" && a.conditions?.some((v) => v.key === "versions" && v.value === !0), [g, f] = L(m), h = 2, [b, D] = L(!1), R = (v, y) => s?.({ versionIds: [v], productId: y, projectName: t });
3193
+ return /* @__PURE__ */ x(ji, { children: [
3191
3194
  /* @__PURE__ */ c(
3192
- On,
3195
+ jn,
3193
3196
  {
3194
3197
  name: i,
3195
3198
  fullName: l || i,
@@ -3202,18 +3205,18 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
3202
3205
  ),
3203
3206
  p.flatMap((v, y) => {
3204
3207
  const { name: A, id: C, productId: S, productName: M, thumbnailHash: I, comment: E } = v, P = r.find((H) => H.name === v.status);
3205
- return (y < f || g) && /* @__PURE__ */ x(Oi, { onClick: () => R(C, S), children: [
3206
- /* @__PURE__ */ x(ji, { children: [
3208
+ return (y < h || g) && /* @__PURE__ */ x(Vi, { onClick: () => R(C, S), children: [
3209
+ /* @__PURE__ */ x(zi, { children: [
3207
3210
  /* @__PURE__ */ x("div", { children: [
3208
- /* @__PURE__ */ x(dn, { children: [
3211
+ /* @__PURE__ */ x(un, { children: [
3209
3212
  /* @__PURE__ */ c("span", { children: M }),
3210
3213
  /* @__PURE__ */ c(st, { date: u, isExact: !0 })
3211
3214
  ] }),
3212
- /* @__PURE__ */ x(dn, { children: [
3213
- /* @__PURE__ */ c(zi, { className: "version", children: A }),
3215
+ /* @__PURE__ */ x(un, { children: [
3216
+ /* @__PURE__ */ c(Bi, { className: "version", children: A }),
3214
3217
  " -",
3215
3218
  /* @__PURE__ */ c(
3216
- Dt,
3219
+ Nt,
3217
3220
  {
3218
3221
  icon: P?.icon,
3219
3222
  color: P?.color,
@@ -3223,7 +3226,7 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
3223
3226
  ] })
3224
3227
  ] }),
3225
3228
  /* @__PURE__ */ c(
3226
- Vi,
3229
+ Ui,
3227
3230
  {
3228
3231
  projectName: t,
3229
3232
  entityId: C,
@@ -3235,25 +3238,25 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
3235
3238
  }
3236
3239
  )
3237
3240
  ] }),
3238
- E && /* @__PURE__ */ c(Ui, { children: E })
3241
+ E && /* @__PURE__ */ c(Gi, { children: E })
3239
3242
  ] }, C);
3240
3243
  }),
3241
- !m && p.length > f && /* @__PURE__ */ x(jn, { onClick: () => h(!g), children: [
3244
+ !m && p.length > h && /* @__PURE__ */ x(Vn, { onClick: () => f(!g), children: [
3242
3245
  /* @__PURE__ */ c(re, { icon: "more" }),
3243
- /* @__PURE__ */ c("span", { children: g ? "Show less" : `Show ${p.length - f} more versions` })
3246
+ /* @__PURE__ */ c("span", { children: g ? "Show less" : `Show ${p.length - h} more versions` })
3244
3247
  ] })
3245
3248
  ] });
3246
- }, Hi = ({ activities: e, editProps: t, ...o }) => {
3249
+ }, Wi = ({ activities: e, editProps: t, ...o }) => {
3247
3250
  const [n, a] = L(!1);
3248
3251
  return /* @__PURE__ */ x(Ae, { children: [
3249
- /* @__PURE__ */ c(Bi, { children: /* @__PURE__ */ x(jn, { onClick: () => a(!n), children: [
3252
+ /* @__PURE__ */ c(Hi, { children: /* @__PURE__ */ x(Vn, { onClick: () => a(!n), children: [
3250
3253
  /* @__PURE__ */ c(re, { icon: n ? "expand_less" : "chevron_right" }),
3251
3254
  n ? "Show less" : "Show more"
3252
3255
  ] }) }),
3253
3256
  n && e.map((r) => (
3254
3257
  // @ts-expect-error
3255
3258
  /* @__PURE__ */ c(
3256
- Vn,
3259
+ zn,
3257
3260
  {
3258
3261
  editProps: t,
3259
3262
  activity: r,
@@ -3264,7 +3267,7 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
3264
3267
  )
3265
3268
  ))
3266
3269
  ] });
3267
- }, Vn = ({
3270
+ }, zn = ({
3268
3271
  activity: e,
3269
3272
  fromGroup: t,
3270
3273
  projectInfo: o,
@@ -3282,7 +3285,7 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
3282
3285
  return (
3283
3286
  // @ts-expect-error
3284
3287
  /* @__PURE__ */ c(
3285
- Ai,
3288
+ Ci,
3286
3289
  {
3287
3290
  activity: e,
3288
3291
  projectInfo: o,
@@ -3298,18 +3301,18 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
3298
3301
  case "attrib.change":
3299
3302
  case "tags.change":
3300
3303
  case "subtype.change":
3301
- return /* @__PURE__ */ c(_i, { activity: e, projectInfo: o, ...p });
3304
+ return /* @__PURE__ */ c(Ri, { activity: e, projectInfo: o, ...p });
3302
3305
  case "assignee.add":
3303
- return /* @__PURE__ */ c(ln, { activity: e, ...p, isAdding: !0 });
3306
+ return /* @__PURE__ */ c(dn, { activity: e, ...p, isAdding: !0 });
3304
3307
  case "assignee.remove":
3305
- return /* @__PURE__ */ c(ln, { activity: e, ...p });
3308
+ return /* @__PURE__ */ c(dn, { activity: e, ...p });
3306
3309
  case "version.publish":
3307
- return /* @__PURE__ */ c(Gi, { activity: e, projectInfo: o, filter: r, statuses: i, ...p });
3310
+ return /* @__PURE__ */ c(qi, { activity: e, projectInfo: o, filter: r, statuses: i, ...p });
3308
3311
  case "version.review":
3309
- return /* @__PURE__ */ c(bi, { activity: e, isGuest: u, ...p });
3312
+ return /* @__PURE__ */ c(xi, { activity: e, isGuest: u, ...p });
3310
3313
  case "group":
3311
3314
  return !t && /* @__PURE__ */ c(
3312
- Hi,
3315
+ Wi,
3313
3316
  {
3314
3317
  editProps: a,
3315
3318
  activities: e.items || [],
@@ -3320,7 +3323,7 @@ const fi = "anonymous.guest", yi = "Anonymous User", vi = "unknown.user", Ln = (
3320
3323
  default:
3321
3324
  return null;
3322
3325
  }
3323
- }, qi = F.section`
3326
+ }, Qi = F.section`
3324
3327
  padding-bottom: 4px;
3325
3328
  overflow: hidden;
3326
3329
  position: relative;
@@ -3368,7 +3371,7 @@ F.div`
3368
3371
  color: inherit;
3369
3372
  }
3370
3373
  `;
3371
- const Wi = F.ul`
3374
+ const Yi = F.ul`
3372
3375
  gap: var(--base-gap-large);
3373
3376
  overflow-y: auto;
3374
3377
  padding: 24px 0;
@@ -3389,11 +3392,11 @@ const Wi = F.ul`
3389
3392
  & > *:last-child {
3390
3393
  margin-top: 32px;
3391
3394
  }
3392
- `, Qi = F.span`
3395
+ `, Ji = F.span`
3393
3396
  padding: 16px 8px;
3394
3397
  color: var(--md-sys-color-outline);
3395
3398
  font-size: 11px;
3396
- `, Yi = F.div`
3399
+ `, Xi = F.div`
3397
3400
  height: 50px;
3398
3401
  border-radius: 8px;
3399
3402
  overflow: hidden;
@@ -3401,7 +3404,7 @@ const Wi = F.ul`
3401
3404
  opacity: 0.5;
3402
3405
 
3403
3406
  position: relative;
3404
- `, Ji = ({
3407
+ `, Ki = ({
3405
3408
  projectName: e,
3406
3409
  entityType: t,
3407
3410
  entities: o = [],
@@ -3416,7 +3419,7 @@ const Wi = F.ul`
3416
3419
  userName: u,
3417
3420
  userFullName: p,
3418
3421
  activityTypes: m
3419
- } = Re(), g = o.map((v) => v.id), h = ({
3422
+ } = Re(), g = o.map((v) => v.id), f = ({
3420
3423
  entityId: v,
3421
3424
  newId: y,
3422
3425
  subTitle: A,
@@ -3431,7 +3434,7 @@ const Wi = F.ul`
3431
3434
  referenceType: "origin",
3432
3435
  authorName: u,
3433
3436
  authorFullName: p,
3434
- createdAt: $a(/* @__PURE__ */ new Date()),
3437
+ createdAt: Oa(/* @__PURE__ */ new Date()),
3435
3438
  files: S,
3436
3439
  reactions: [],
3437
3440
  activityData: M,
@@ -3448,7 +3451,7 @@ const Wi = F.ul`
3448
3451
  return {
3449
3452
  submitComment: async (v, y = [], A = {}) => {
3450
3453
  const C = o.map(({ id: I, subTitle: E }) => {
3451
- const P = en(), H = y.map((J) => J.id), Q = a ? { ...A, entityList: a } : A, K = {
3454
+ const P = tn(), H = y.map((J) => J.id), Q = a ? { ...A, entityList: a } : A, X = {
3452
3455
  body: v,
3453
3456
  activityType: "comment",
3454
3457
  id: P,
@@ -3458,12 +3461,12 @@ const Wi = F.ul`
3458
3461
  ({ id: J }) => !A.annotations?.some(
3459
3462
  (W) => W.transparent === J
3460
3463
  )
3461
- ), $ = h({ entityId: I, newId: P, subTitle: E, value: v, files: q, data: A });
3464
+ ), $ = f({ entityId: I, newId: P, subTitle: E, value: v, files: q, data: A });
3462
3465
  return r({
3463
3466
  projectName: e,
3464
3467
  entityType: t,
3465
3468
  entityId: I,
3466
- data: K,
3469
+ data: X,
3467
3470
  patch: $,
3468
3471
  filter: n,
3469
3472
  ...{ entityIds: g, activityTypes: m }
@@ -3517,12 +3520,12 @@ const Wi = F.ul`
3517
3520
  },
3518
3521
  submitReview: async (v) => {
3519
3522
  const y = o.map(({ id: A, subTitle: C }) => {
3520
- const S = en(), M = { feedback: v, entityList: a }, I = {
3521
- body: Lr(v, t),
3523
+ const S = tn(), M = { feedback: v, entityList: a }, I = {
3524
+ body: jr(v, t),
3522
3525
  activityType: "version.review",
3523
3526
  id: S,
3524
3527
  data: M
3525
- }, E = h({ entityId: A, newId: S, subTitle: C, value: "", data: M });
3528
+ }, E = f({ entityId: A, newId: S, subTitle: C, value: "", data: M });
3526
3529
  return r({
3527
3530
  projectName: e,
3528
3531
  entityType: t,
@@ -3536,7 +3539,7 @@ const Wi = F.ul`
3536
3539
  },
3537
3540
  isSaving: l
3538
3541
  };
3539
- }, At = (e = {}) => {
3542
+ }, Ft = (e = {}) => {
3540
3543
  const {
3541
3544
  updatedAt: t,
3542
3545
  createdAt: o,
@@ -3556,7 +3559,7 @@ const Wi = F.ul`
3556
3559
  status: i?.status,
3557
3560
  thumbnailHash: i?.thumbnailHash
3558
3561
  };
3559
- }, Ki = 5, Xi = (e = []) => {
3562
+ }, Zi = 5, es = (e = []) => {
3560
3563
  const t = [];
3561
3564
  let o = null;
3562
3565
  for (const n of e) {
@@ -3565,48 +3568,48 @@ const Wi = F.ul`
3565
3568
  continue;
3566
3569
  }
3567
3570
  if (!o) {
3568
- o = { ...n }, o.versions = [At(n)];
3571
+ o = { ...n }, o.versions = [Ft(n)];
3569
3572
  continue;
3570
3573
  }
3571
- const a = o.authorName === n.authorName, r = o.origin.id === n.origin.id, i = La(
3574
+ const a = o.authorName === n.authorName, r = o.origin.id === n.origin.id, i = ja(
3572
3575
  new Date(o.createdAt),
3573
3576
  new Date(n.createdAt)
3574
- ) <= Ki;
3577
+ ) <= Zi;
3575
3578
  if (a && i && r) {
3576
- o.versions.push(At(n));
3579
+ o.versions.push(Ft(n));
3577
3580
  continue;
3578
3581
  } else {
3579
- t.push(o), o = { ...n }, o.versions = [At(n)];
3582
+ t.push(o), o = { ...n }, o.versions = [Ft(n)];
3580
3583
  continue;
3581
3584
  }
3582
3585
  }
3583
3586
  return o && t.push(o), t;
3584
- }, Zi = (e, t) => {
3587
+ }, ts = (e, t) => {
3585
3588
  let o = {};
3586
3589
  t.reduce((i, l) => (i[l.name] = l, i), o);
3587
3590
  const n = [];
3588
3591
  let a = [];
3589
3592
  const r = (i) => {
3590
- const l = (h) => ["assignee.add", "assignee.remove"].includes(h[0].activityType) ? [
3593
+ const l = (f) => ["assignee.add", "assignee.remove"].includes(f[0].activityType) ? [
3591
3594
  {
3592
- ...h[0],
3593
- activityType: h[0].activityType,
3595
+ ...f[0],
3596
+ activityType: f[0].activityType,
3594
3597
  assignee: [
3595
- ...h.map(
3596
- (f) => o[f.activityData.assignee]?.attrib?.fullName || f.activityData.assignee
3598
+ ...f.map(
3599
+ (h) => o[h.activityData.assignee]?.attrib?.fullName || h.activityData.assignee
3597
3600
  )
3598
3601
  ].join(", "),
3599
3602
  activityData: {
3600
- ...h[0].activityData,
3601
- assignee: h.map(
3602
- (f) => o[f.activityData.assignee]?.attrib?.fullName || f.activityData.assignee
3603
+ ...f[0].activityData,
3604
+ assignee: f.map(
3605
+ (h) => o[h.activityData.assignee]?.attrib?.fullName || h.activityData.assignee
3603
3606
  ).join(", ")
3604
3607
  }
3605
3608
  }
3606
- ] : h;
3609
+ ] : f;
3607
3610
  let u = [], p = [], m = null, g = null;
3608
- return i.forEach((h) => {
3609
- m === null || m === h.activityType && g == h.authorName ? p.push(h) : (u.push(...l(p)), p = [h]), m = h.activityType, g = h.authorName;
3611
+ return i.forEach((f) => {
3612
+ m === null || m === f.activityType && g == f.authorName ? p.push(f) : (u.push(...l(p)), p = [f]), m = f.activityType, g = f.authorName;
3610
3613
  }), p.length != 0 && u.push(...l(p)), u;
3611
3614
  }, s = (i, l) => {
3612
3615
  if (a.length > 2) {
@@ -3629,14 +3632,14 @@ const Wi = F.ul`
3629
3632
  a = [];
3630
3633
  };
3631
3634
  for (const i of e)
3632
- if (es.includes(i.activityType))
3635
+ if (ns.includes(i.activityType))
3633
3636
  a.push(i);
3634
3637
  else {
3635
3638
  const l = n.length === 0;
3636
3639
  s(l, n.length), n.push(i);
3637
3640
  }
3638
3641
  return a.length > 0 && s(!1, n.length), n;
3639
- }, un = (e, t, o = "oldValue") => {
3642
+ }, mn = (e, t, o = "oldValue") => {
3640
3643
  const n = [];
3641
3644
  let a = null, r = null;
3642
3645
  for (const s of e)
@@ -3645,7 +3648,7 @@ const Wi = F.ul`
3645
3648
  a = { ...s }, r = new Date(s.createdAt);
3646
3649
  continue;
3647
3650
  }
3648
- const i = a.authorName === s.authorName, l = a.origin.id === s.entityId, u = a.activityData?.key === s.activityData?.key, p = new Date(s.createdAt), g = r !== null && rt(r) && rt(p) && Math.abs(Oa(r, p)) <= 20;
3651
+ const i = a.authorName === s.authorName, l = a.origin.id === s.entityId, u = a.activityData?.key === s.activityData?.key, p = new Date(s.createdAt), g = r !== null && rt(r) && rt(p) && Math.abs(Va(r, p)) <= 20;
3649
3652
  i && g && l && u ? (s[o] !== void 0 && (a[o] = s[o]), a.activityData = {
3650
3653
  ...a.activityData,
3651
3654
  oldValue: s.activityData.oldValue
@@ -3653,14 +3656,14 @@ const Wi = F.ul`
3653
3656
  } else
3654
3657
  a && (a.activityData.oldValue !== a.activityData.newValue && n.push(a), a = null, r = null), n.push(s);
3655
3658
  return a && a.activityData.oldValue !== a.activityData.newValue && !n.some((s) => s.activityId === a.activityId) && n.push(a), n;
3656
- }, es = [
3659
+ }, ns = [
3657
3660
  "status.change",
3658
3661
  "assignee.add",
3659
3662
  "assignee.remove",
3660
3663
  "attrib.change",
3661
3664
  "tags.change",
3662
3665
  "subtype.change"
3663
- ], ts = (e = [], t = {}) => e.map((o) => {
3666
+ ], os = (e = [], t = {}) => e.map((o) => {
3664
3667
  const n = { ...o, origin: { ...o.origin } };
3665
3668
  if (n.activityType === "status.change") {
3666
3669
  if (!t) return n;
@@ -3668,12 +3671,12 @@ const Wi = F.ul`
3668
3671
  n.oldStatus = { ...s, name: a }, n.newStatus = { ...i, name: r };
3669
3672
  }
3670
3673
  return n;
3671
- }), ns = (e = [], t = [], o) => t.includes(o) ? e.filter((n) => n.referenceType !== "relation") : e, os = (e = [], t = [], o = {}, n, a, r) => {
3674
+ }), as = (e = [], t = [], o) => t.includes(o) ? e.filter((n) => n.referenceType !== "relation") : e, rs = (e = [], t = [], o = {}, n, a, r) => {
3672
3675
  const s = N(
3673
- () => ts(e, o),
3676
+ () => os(e, o),
3674
3677
  [e, o]
3675
3678
  ), i = N(() => s.map((b) => ({ ...b, isOwner: a === b.authorName })), [s, a]), l = N(
3676
- () => ns(i, ["version"], n),
3679
+ () => as(i, ["version"], n),
3677
3680
  [i, n]
3678
3681
  ), u = N(() => [...l].sort((D, R) => {
3679
3682
  const v = new Date(D.createdAt), y = new Date(R.createdAt), A = rt(v), C = rt(y);
@@ -3683,35 +3686,35 @@ const Wi = F.ul`
3683
3686
  if (!C)
3684
3687
  return -1;
3685
3688
  } else return 1;
3686
- return ja(y, v);
3689
+ return za(y, v);
3687
3690
  }), [l]), p = N(
3688
- () => un(u, "status.change", "oldStatus"),
3691
+ () => mn(u, "status.change", "oldStatus"),
3689
3692
  [u]
3690
3693
  ), m = N(
3691
- () => un(p, "attrib.change"),
3694
+ () => mn(p, "attrib.change"),
3692
3695
  [p]
3693
3696
  ), g = N(() => r?.conditions?.some(
3694
3697
  (D) => "key" in D && D.key === "updates" && D.value === !0
3695
- ) ? m : Zi(m, t), [m, t, r]), h = N(
3696
- () => Xi(g),
3698
+ ) ? m : ts(m, t), [m, t, r]), f = N(
3699
+ () => es(g),
3697
3700
  [g]
3698
3701
  );
3699
3702
  return N(() => [...new Map(
3700
- h.filter((D) => D && D.activityId).map((D) => [D.activityId, D])
3701
- ).values()], [h]);
3702
- }, mn = (e, t) => JSON.stringify({ entities: e.map((o) => o.id), filter: t }), as = ({
3703
+ f.filter((D) => D && D.activityId).map((D) => [D.activityId, D])
3704
+ ).values()], [f]);
3705
+ }, pn = (e, t) => JSON.stringify({ entities: e.map((o) => o.id), filter: t }), is = ({
3703
3706
  entities: e = [],
3704
3707
  feedRef: t,
3705
3708
  filter: o,
3706
3709
  disabled: n,
3707
3710
  isLoading: a
3708
3711
  }) => {
3709
- const r = ye({}), s = (i) => {
3712
+ const r = fe({}), s = (i) => {
3710
3713
  const l = i.current.querySelectorAll(".scroll-to"), u = Array.from(l).map((m) => m.closest("li.comment"));
3711
3714
  return (u[u.length - 1]?.offsetTop || 0) - 8 || 0;
3712
3715
  };
3713
3716
  Y(() => {
3714
- const i = mn(e, o);
3717
+ const i = pn(e, o);
3715
3718
  !t.current || n || a || (t.current.scrollTop = r.current[i] || s(t));
3716
3719
  }, [e, o, t.current, a]), Y(() => {
3717
3720
  let i = null;
@@ -3722,27 +3725,27 @@ const Wi = F.ul`
3722
3725
  i = setTimeout(() => {
3723
3726
  i = null;
3724
3727
  }, 300);
3725
- const { scrollTop: p } = u.target, m = mn(e, o);
3728
+ const { scrollTop: p } = u.target, m = pn(e, o);
3726
3729
  r.current[m] = p;
3727
3730
  };
3728
3731
  return t.current?.addEventListener("scroll", l), () => {
3729
3732
  t.current?.removeEventListener("scroll", l);
3730
3733
  };
3731
3734
  }, [t.current, o, e, n]);
3732
- }, rs = ({ feedRef: e, isInputOpen: t, height: o }) => {
3735
+ }, ss = ({ feedRef: e, isInputOpen: t, height: o }) => {
3733
3736
  Y(() => {
3734
3737
  if (!e.current) return;
3735
3738
  const n = o;
3736
3739
  e.current.scrollTop === 0 || (t ? e.current.scrollBy(0, n) : e.current.scrollBy(0, -n));
3737
3740
  }, [t, e, o]);
3738
- }, is = (e = 50, t = 200) => Math.floor(Math.random() * (t - e + 1) + e), ss = (e) => new Array(e).fill(0).map((t, o) => /* @__PURE__ */ c(
3739
- Yi,
3741
+ }, cs = (e = 50, t = 200) => Math.floor(Math.random() * (t - e + 1) + e), ls = (e) => new Array(e).fill(0).map((t, o) => /* @__PURE__ */ c(
3742
+ Xi,
3740
3743
  {
3741
3744
  className: "loading",
3742
- style: { minHeight: is(50, 150) }
3745
+ style: { minHeight: cs(50, 150) }
3743
3746
  },
3744
3747
  o
3745
- )), cs = ({
3748
+ )), ds = ({
3746
3749
  feedRef: e,
3747
3750
  highlighted: t = [],
3748
3751
  isLoading: o,
@@ -3750,26 +3753,26 @@ const Wi = F.ul`
3750
3753
  hasNextPage: a,
3751
3754
  activities: r
3752
3755
  }) => {
3753
- const s = ye([]), i = async (u, p = 0) => {
3756
+ const s = fe([]), i = async (u, p = 0) => {
3754
3757
  if (!n) return null;
3755
3758
  const m = u.querySelector("li.isHighlighted");
3756
3759
  if (m) return m;
3757
3760
  if (p++, p > 10) return null;
3758
3761
  const g = await n();
3759
- return !g || !g.hasNextPage ? null : (await new Promise((f) => requestAnimationFrame(() => f())), i(u, p));
3762
+ return !g || !g.hasNextPage ? null : (await new Promise((h) => requestAnimationFrame(() => h())), i(u, p));
3760
3763
  }, l = async (u) => {
3761
3764
  const p = await i(u);
3762
3765
  if (!p) {
3763
3766
  console.error("No highlighted element found");
3764
3767
  return;
3765
3768
  }
3766
- const m = p.offsetTop, g = p.offsetHeight, h = u.offsetHeight || 0, f = 64, D = g + f > h ? m - 16 : m + g - h + f;
3769
+ const m = p.offsetTop, g = p.offsetHeight, f = u.offsetHeight || 0, h = 64, D = g + h > f ? m - 16 : m + g - f + h;
3767
3770
  console.log("FOUND: scrolling to highlighted..."), u.scrollTo({ top: D }), s.current = t;
3768
3771
  };
3769
3772
  Y(() => {
3770
3773
  !t.length || !e.current || o || !n || t.every((u) => s.current?.includes(u)) || (console.log("trying to scroll to highlighted..."), l(e.current));
3771
3774
  }, [e, t, r, o, n, s, a]);
3772
- }, ls = (e) => e.map((t) => {
3775
+ }, us = (e) => e.map((t) => {
3773
3776
  if (t.activityType !== "comment" || !t.activityData?.annotations) return t;
3774
3777
  const o = t.files.map((a) => {
3775
3778
  const r = t.activityData.annotations.find(
@@ -3778,17 +3781,17 @@ const Wi = F.ul`
3778
3781
  return r ? r.transparent === a.id ? null : { ...a, annotation: r } : a;
3779
3782
  }).filter(Boolean);
3780
3783
  return { ...t, files: o };
3781
- }), zn = [
3784
+ }), Un = [
3782
3785
  "comments",
3783
3786
  "versions",
3784
3787
  "updates",
3785
3788
  "checklists",
3786
3789
  "has_attachments",
3787
3790
  "in_review_session"
3788
- ], ds = (e) => !!e && "key" in e, us = (e, t) => {
3791
+ ], ms = (e) => !!e && "key" in e, ps = (e, t) => {
3789
3792
  const o = [], n = [], a = (r) => {
3790
3793
  if (!r) return;
3791
- if (ds(r)) {
3794
+ if (ms(r)) {
3792
3795
  const i = r.key;
3793
3796
  if (i === "body") {
3794
3797
  const p = String(r.value ?? "");
@@ -3797,9 +3800,9 @@ const Wi = F.ul`
3797
3800
  }
3798
3801
  const l = t.find((p) => p.id === i);
3799
3802
  if (!l) return;
3800
- if (zn.includes(i)) {
3803
+ if (Un.includes(i)) {
3801
3804
  r.value === !0 && o.push({
3802
- id: Qt(i),
3805
+ id: Yt(i),
3803
3806
  label: l.label,
3804
3807
  icon: l.icon,
3805
3808
  type: "boolean",
@@ -3812,7 +3815,7 @@ const Wi = F.ul`
3812
3815
  }
3813
3816
  const u = Array.isArray(r.value) ? r.value : [r.value];
3814
3817
  o.push({
3815
- id: Qt(i),
3818
+ id: Yt(i),
3816
3819
  label: l.label,
3817
3820
  type: l.type,
3818
3821
  icon: l.icon,
@@ -3825,32 +3828,32 @@ const Wi = F.ul`
3825
3828
  });
3826
3829
  return;
3827
3830
  }
3828
- const s = za(r, t);
3831
+ const s = Ba(r, t);
3829
3832
  if (s) {
3830
3833
  o.push(s);
3831
3834
  return;
3832
3835
  }
3833
3836
  r.conditions?.forEach(a);
3834
3837
  };
3835
- return e?.conditions?.forEach(a), n.length && o.push({ id: wn, label: "", values: n }), o;
3836
- }, ms = (e) => {
3838
+ return e?.conditions?.forEach(a), n.length && o.push({ id: xn, label: "", values: n }), o;
3839
+ }, gs = (e) => {
3837
3840
  const t = [], o = [];
3838
3841
  return e.forEach((n) => {
3839
- const a = bo(n.id), r = (n.values || []).map((s) => s.id);
3842
+ const a = xo(n.id), r = (n.values || []).map((s) => s.id);
3840
3843
  if (r.length)
3841
- if (a === wn)
3844
+ if (a === xn)
3842
3845
  r.forEach(
3843
3846
  (s) => o.push({ key: "body", operator: "like", value: String(s) })
3844
3847
  );
3845
- else if (zn.includes(a))
3848
+ else if (Un.includes(a))
3846
3849
  r.includes("true") && t.push({ key: a, operator: "eq", value: !0 });
3847
3850
  else if (n.type === "datetime") {
3848
- const s = Ua(a, n);
3851
+ const s = Ga(a, n);
3849
3852
  s && t.push(s);
3850
3853
  } else
3851
3854
  t.push({ key: a, operator: "in", value: r.map(String) });
3852
3855
  }), o.length === 1 ? t.push(o[0]) : o.length > 1 && t.push({ operator: "or", conditions: o }), { operator: "and", conditions: t };
3853
- }, ps = F.div`
3856
+ }, hs = F.div`
3854
3857
  padding: 4px 8px;
3855
3858
  padding-bottom: 0;
3856
3859
  filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.25));
@@ -3865,7 +3868,7 @@ const Wi = F.ul`
3865
3868
  opacity: 0.5;
3866
3869
  pointer-events: none;
3867
3870
  }
3868
- `, Un = pt(
3871
+ `, Bn = pt(
3869
3872
  ({
3870
3873
  feedFilter: e,
3871
3874
  setFeedFilter: t,
@@ -3927,7 +3930,7 @@ const Wi = F.ul`
3927
3930
  label: "Posted date",
3928
3931
  icon: "calendar_today",
3929
3932
  type: "datetime",
3930
- values: aa()
3933
+ values: ia()
3931
3934
  }
3932
3935
  ];
3933
3936
  }, [o, n, a]);
@@ -3937,11 +3940,11 @@ const Wi = F.ul`
3937
3940
  () => ["comments", { id: "checklists", label: u, tooltip: "Checklists" }],
3938
3941
  [u]
3939
3942
  ), m = N(
3940
- () => us(e, l),
3943
+ () => ps(e, l),
3941
3944
  [e, l]
3942
- ), [g, h] = L(m), f = Ba(), b = ye(null);
3945
+ ), [g, f] = L(m), h = Ha(), b = fe(null);
3943
3946
  Y(() => {
3944
- h(m);
3947
+ f(m);
3945
3948
  }, [JSON.stringify(m)]), Y(() => {
3946
3949
  const y = (A) => {
3947
3950
  const C = b.current?.getContainerElement();
@@ -3952,18 +3955,18 @@ const Wi = F.ul`
3952
3955
  };
3953
3956
  }, [b]);
3954
3957
  const D = (y) => {
3955
- t(ms(y)), i?.("");
3958
+ t(gs(y)), i?.("");
3956
3959
  };
3957
- return /* @__PURE__ */ x(ps, { className: r ? "loading" : void 0, children: [
3960
+ return /* @__PURE__ */ x(hs, { className: r ? "loading" : void 0, children: [
3958
3961
  /* @__PURE__ */ c(
3959
- wo,
3962
+ ko,
3960
3963
  {
3961
3964
  ref: b,
3962
3965
  compact: !0,
3963
3966
  options: l,
3964
3967
  filters: g,
3965
3968
  onChange: (y) => {
3966
- f.wrapFilterChange(y, g, h);
3969
+ h.wrapFilterChange(y, g, f);
3967
3970
  },
3968
3971
  onFinish: D,
3969
3972
  enableGlobalSearch: !0,
@@ -3976,12 +3979,12 @@ const Wi = F.ul`
3976
3979
  placeholder: "Search and filter feed...",
3977
3980
  pt: {
3978
3981
  searchBar: {
3979
- onClickCapture: (y) => f.handleSearchBarClickCapture(y, g)
3982
+ onClickCapture: (y) => h.handleSearchBarClickCapture(y, g)
3980
3983
  },
3981
3984
  dropdown: {
3982
3985
  pt: {
3983
3986
  item: {
3984
- onClick: (y) => f.handleDropdownItemClick(y, g, l)
3987
+ onClick: (y) => h.handleDropdownItemClick(y, g, l)
3985
3988
  }
3986
3989
  }
3987
3990
  }
@@ -3989,23 +3992,23 @@ const Wi = F.ul`
3989
3992
  }
3990
3993
  ),
3991
3994
  /* @__PURE__ */ c(
3992
- Na,
3995
+ Ia,
3993
3996
  {
3994
- isOpen: !!f.customRangeFilterId,
3995
- header: l.find((y) => y.id === f.customRangeFilterId?.split("__")[0])?.label ?? "Custom range",
3996
- startDate: f.customStartDate,
3997
- endDate: f.customEndDate,
3998
- onStartDateChange: f.setCustomStartDate,
3999
- onEndDateChange: f.setCustomEndDate,
4000
- onApply: () => f.handleCustomRangeApply(g, l, D, b),
4001
- onClose: f.handleCustomRangeClose
3997
+ isOpen: !!h.customRangeFilterId,
3998
+ header: l.find((y) => y.id === h.customRangeFilterId?.split("__")[0])?.label ?? "Custom range",
3999
+ startDate: h.customStartDate,
4000
+ endDate: h.customEndDate,
4001
+ onStartDateChange: h.setCustomStartDate,
4002
+ onEndDateChange: h.setCustomEndDate,
4003
+ onApply: () => h.handleCustomRangeApply(g, l, D, b),
4004
+ onClose: h.handleCustomRangeClose
4002
4005
  }
4003
4006
  )
4004
4007
  ] });
4005
4008
  }
4006
4009
  );
4007
- Un.displayName = "FeedSearchFilter";
4008
- function gs({
4010
+ Bn.displayName = "FeedSearchFilter";
4011
+ function fs({
4009
4012
  projectName: e,
4010
4013
  enabled: t,
4011
4014
  entityIds: o,
@@ -4016,7 +4019,7 @@ function gs({
4016
4019
  const s = N(
4017
4020
  () => n.find((p) => p.activityType === "version.review" && p.authorName === r),
4018
4021
  [n, r]
4019
- ), i = !!(o.length === 0 || !t || a || s), { data: l } = xa(
4022
+ ), i = !!(o.length === 0 || !t || a || s), { data: l } = Aa(
4020
4023
  {
4021
4024
  projectName: e,
4022
4025
  entityIds: o,
@@ -4028,7 +4031,7 @@ function gs({
4028
4031
  );
4029
4032
  return N(() => s ?? l?.activities.at(-1), [s, l]);
4030
4033
  }
4031
- const hc = 30, fc = ({
4034
+ const fc = 30, yc = ({
4032
4035
  disabled: e,
4033
4036
  readOnly: t,
4034
4037
  statuses: o = [],
@@ -4044,8 +4047,8 @@ const hc = 30, fc = ({
4044
4047
  editingId: p,
4045
4048
  projectInfo: m,
4046
4049
  setEditingId: g,
4047
- userName: h,
4048
- activitiesData: f,
4050
+ userName: f,
4051
+ activitiesData: h,
4049
4052
  isLoadingNew: b,
4050
4053
  isLoadingNextPage: D,
4051
4054
  loadNextPage: R,
@@ -4061,7 +4064,7 @@ const hc = 30, fc = ({
4061
4064
  } = Re(), {
4062
4065
  openSlideOut: H,
4063
4066
  highlightedActivities: Q,
4064
- setHighlightedActivities: K,
4067
+ setHighlightedActivities: X,
4065
4068
  onOpenImage: q,
4066
4069
  setFeedAnnotations: $,
4067
4070
  setFeedFrameLinks: ue,
@@ -4072,9 +4075,9 @@ const hc = 30, fc = ({
4072
4075
  (w) => "key" in w && ["comments", "checklists", "versions", "updates"].includes(w.key) && w.value === !0
4073
4076
  ), O = S.conditions?.some(
4074
4077
  (w) => "key" in w && (w.key === "comments" || w.key === "checklists") && w.value === !0
4075
- ), ne = u === "version" || u === "folder", { data: X, isLoading: Ye } = ka({ projectName: i }, { skip: !i }), De = !J.data?.isManager && !J.data?.isAdmin && !Ye && X?.activities?.enabled && !X?.activities?.activities?.includes("comment") || ve && !O, me = N(
4076
- () => ls(f),
4077
- [f]
4078
+ ), ne = u === "version" || u === "folder", { data: K, isLoading: Ye } = Fa({ projectName: i }, { skip: !i }), De = !J.data?.isManager && !J.data?.isAdmin && !Ye && K?.activities?.enabled && !K?.activities?.activities?.includes("comment") || ve && !O, me = N(
4079
+ () => us(h),
4080
+ [h]
4078
4081
  );
4079
4082
  Y(() => {
4080
4083
  me.length || $([]);
@@ -4086,19 +4089,19 @@ const hc = 30, fc = ({
4086
4089
  ).filter(Boolean).flat();
4087
4090
  $(w);
4088
4091
  }, [me]), Y(() => {
4089
- const w = f.map((_) => {
4090
- const j = Et(_);
4092
+ const w = h.map((_) => {
4093
+ const j = Mt(_);
4091
4094
  return j && { ...j, activityId: _.activityId };
4092
4095
  }).filter((_) => !!_);
4093
4096
  ue(w);
4094
- }, [f]);
4095
- const pe = os(
4097
+ }, [h]);
4098
+ const pe = rs(
4096
4099
  // @ts-ignore
4097
4100
  me,
4098
4101
  y,
4099
4102
  m,
4100
4103
  u,
4101
- h,
4104
+ f,
4102
4105
  S
4103
4106
  ), Ie = N(() => {
4104
4107
  if (!E) return pe;
@@ -4106,20 +4109,20 @@ const hc = 30, fc = ({
4106
4109
  return pe.filter(
4107
4110
  (_) => _.body?.toLowerCase().includes(w)
4108
4111
  );
4109
- }, [pe, E]), Z = ye(null);
4110
- rs({ feedRef: Z, isInputOpen: p === nt, height: 93 }), as({
4112
+ }, [pe, E]), Z = fe(null);
4113
+ ss({ feedRef: Z, isInputOpen: p === nt, height: 93 }), is({
4111
4114
  entities: l,
4112
4115
  feedRef: Z,
4113
4116
  filter: S,
4114
4117
  disabled: !!Q.length,
4115
4118
  isLoading: b
4116
- }), cs({
4119
+ }), ds({
4117
4120
  feedRef: Z,
4118
4121
  highlighted: Q,
4119
4122
  isLoading: b || D,
4120
4123
  loadNextPage: R,
4121
4124
  hasNextPage: !!R,
4122
- activities: f
4125
+ activities: h
4123
4126
  });
4124
4127
  const {
4125
4128
  submitComment: Ne,
@@ -4127,7 +4130,7 @@ const hc = 30, fc = ({
4127
4130
  deleteComment: Ee,
4128
4131
  submitReview: Fe,
4129
4132
  isSaving: Je
4130
- } = Ji({
4133
+ } = Ki({
4131
4134
  projectName: i,
4132
4135
  entityType: u,
4133
4136
  entities: l,
@@ -4138,7 +4141,7 @@ const hc = 30, fc = ({
4138
4141
  await Ne(w, _, j), Z.current && Z.current.scrollTo({ top: 0 });
4139
4142
  },
4140
4143
  [Ne, Z]
4141
- ), ge = We(
4144
+ ), ye = We(
4142
4145
  async (w) => {
4143
4146
  await Fe(w);
4144
4147
  },
@@ -4166,30 +4169,30 @@ const hc = 30, fc = ({
4166
4169
  if (!j || !["version", "task", "folder"].includes(j))
4167
4170
  return console.log("Entity type not supported yet");
4168
4171
  if (!_ || !j || !i) return console.log("No entity id or type found");
4169
- H({ entityId: _, entityType: j, projectName: i }), K([U]);
4172
+ H({ entityId: _, entityType: j, projectName: i }), X([U]);
4170
4173
  }, oe = ({ index: w, activityId: _ }) => {
4171
4174
  const j = Object.values(Ie).reverse().filter((U) => U.activityType == "comment").map((U) => ({
4172
4175
  id: U.activityId,
4173
4176
  files: U.files.filter((ie) => gt(ie.mime, ie.ext))
4174
4177
  })).filter((U) => U.files.length > 0);
4175
4178
  q?.({ files: j, activityId: _, index: w, projectName: i });
4176
- }, [Ke, Me] = L(null), Ge = !De && !t && !e, _e = We(
4179
+ }, [Xe, Me] = L(null), Ge = !De && !t && !e, _e = We(
4177
4180
  (w) => {
4178
- Me({ key: pn(), activity: w }), g(nt);
4181
+ Me({ key: gn(), activity: w }), g(nt);
4179
4182
  },
4180
4183
  [g]
4181
- ), Oe = N(() => ss(10), []), be = gs({
4184
+ ), Oe = N(() => ls(10), []), be = fs({
4182
4185
  projectName: i,
4183
4186
  enabled: r,
4184
4187
  entityIds: l.map((w) => w.id),
4185
4188
  activities: pe,
4186
4189
  loadingActivities: b,
4187
- userName: h
4190
+ userName: f
4188
4191
  });
4189
- return /* @__PURE__ */ c(Ae, { children: /* @__PURE__ */ x(qi, { className: "feed", children: [
4192
+ return /* @__PURE__ */ c(Ae, { children: /* @__PURE__ */ x(Qi, { className: "feed", children: [
4190
4193
  void 0,
4191
4194
  /* @__PURE__ */ c(
4192
- Un,
4195
+ Bn,
4193
4196
  {
4194
4197
  feedFilter: S,
4195
4198
  setFeedFilter: M,
@@ -4201,9 +4204,9 @@ const hc = 30, fc = ({
4201
4204
  checklistCount: C
4202
4205
  }
4203
4206
  ),
4204
- /* @__PURE__ */ x(Wi, { ref: Z, className: te({ loading: b }, "no-shimmer"), children: [
4207
+ /* @__PURE__ */ x(Yi, { ref: Z, className: te({ loading: b }, "no-shimmer"), children: [
4205
4208
  b ? Oe : Ie.map((w) => /* @__PURE__ */ c(
4206
- Vn,
4209
+ zn,
4207
4210
  {
4208
4211
  activity: w,
4209
4212
  onCheckChange: Ue,
@@ -4231,19 +4234,19 @@ const hc = 30, fc = ({
4231
4234
  },
4232
4235
  w.activityId
4233
4236
  )),
4234
- Ie.length === 0 && W && !O && !b && /* @__PURE__ */ c(Ft, { message: "No versions published yet", icon: "layers" }),
4237
+ Ie.length === 0 && W && !O && !b && /* @__PURE__ */ c(Ct, { message: "No versions published yet", icon: "layers" }),
4235
4238
  v && R && /* @__PURE__ */ c(
4236
- Va,
4239
+ Ua,
4237
4240
  {
4238
4241
  root: Z.current,
4239
4242
  onChange: (w) => w && R(),
4240
4243
  rootMargin: "400px 0px 0px 0px",
4241
- children: /* @__PURE__ */ c(Qi, { style: { height: 0 }, onClick: () => R(), children: D ? "Loading more..." : "Click to load more" })
4244
+ children: /* @__PURE__ */ c(Ji, { style: { height: 0 }, onClick: () => R(), children: D ? "Loading more..." : "Click to load more" })
4242
4245
  }
4243
4246
  )
4244
4247
  ] }),
4245
4248
  !De && /* @__PURE__ */ c(
4246
- Pn,
4249
+ Rn,
4247
4250
  {
4248
4251
  initValue: null,
4249
4252
  onSubmit: Le,
@@ -4254,8 +4257,8 @@ const hc = 30, fc = ({
4254
4257
  isLoading: b || !l.length || Je,
4255
4258
  versionReview: r,
4256
4259
  lastOwnVersionReview: be,
4257
- onReview: ge,
4258
- duplicate: Ke,
4260
+ onReview: ye,
4261
+ duplicate: Xe,
4259
4262
  onDuplicateHandled: () => Me(null),
4260
4263
  saveDraft: s
4261
4264
  }
@@ -4263,17 +4266,17 @@ const hc = 30, fc = ({
4263
4266
  ] }) });
4264
4267
  };
4265
4268
  export {
4266
- Pr as A,
4267
- Er as C,
4268
- pc as D,
4269
+ $r as A,
4270
+ _r as C,
4271
+ gc as D,
4269
4272
  nt as F,
4270
- on as P,
4271
- gc as S,
4273
+ an as P,
4274
+ hc as S,
4272
4275
  ot as a,
4273
- fc as b,
4274
- mc as c,
4275
- hc as d,
4276
- ur as e,
4276
+ yc as b,
4277
+ pc as c,
4278
+ fc as d,
4279
+ pr as e,
4277
4280
  gt as f,
4278
- Rr as i
4281
+ Lr as i
4279
4282
  };