@ynput/ayon-frontend-shared 0.6.3 → 0.6.4

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