@ynput/ayon-frontend-shared 0.7.5 → 0.8.0

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 (74) hide show
  1. package/dist/DetailsPanel.es.js +471 -469
  2. package/dist/Feed.es.js +1 -1
  3. package/dist/ListTable.es.js +20 -20
  4. package/dist/NewEntity.es.js +7 -7
  5. package/dist/ProjectTreeTable.es.js +2523 -2502
  6. package/dist/ProjectsTable.es.js +5 -5
  7. package/dist/Slicer.es.js +28 -25
  8. package/dist/Views.es.js +150 -151
  9. package/dist/api.es.js +166 -165
  10. package/dist/chunks/Actions.es.js +9 -10
  11. package/dist/chunks/ColumnDropIndicator.es.js +4 -4
  12. package/dist/chunks/ColumnHeaderMenuUI.es.js +4 -5
  13. package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +2 -2
  14. package/dist/chunks/DetailsDialog.es.js +3 -3
  15. package/dist/chunks/EmptyPlaceholder.es.js +7 -7
  16. package/dist/chunks/EntityPath.es.js +38 -39
  17. package/dist/chunks/EntityPickerDialog.es.js +482 -462
  18. package/dist/chunks/EntityTooltip.es.js +18 -19
  19. package/dist/chunks/Feed.es.js +1382 -1355
  20. package/dist/chunks/FilmstripEntityCard.es.js +5201 -0
  21. package/dist/chunks/FilterErrorActions.es.js +3 -4
  22. package/dist/chunks/GroupSettingsFallback.es.js +4 -4
  23. package/dist/chunks/Menu.es.js +242 -240
  24. package/dist/chunks/MetaWidget.es.js +1948 -1875
  25. package/dist/chunks/ProjectFoldersContext.es.js +237 -0
  26. package/dist/chunks/RepresentationsList.es.js +1 -1
  27. package/dist/chunks/ReviewablesSelector.es.js +1260 -1190
  28. package/dist/chunks/SimpleTable.es.js +303 -297
  29. package/dist/chunks/Slicer.es.js +420 -413
  30. package/dist/chunks/TableExportContextInstance.es.js +622 -378
  31. package/dist/chunks/TableSettingsFallback.es.js +3 -4
  32. package/dist/chunks/ThumbnailSimple.es.js +114 -99
  33. package/dist/chunks/ThumbnailUploaderContext.es.js +48 -0
  34. package/dist/chunks/VideoPlayer.es.js +8 -9
  35. package/dist/chunks/Watchers.es.js +929 -872
  36. package/dist/chunks/{ColumnDropIndicator.styled.es.js → addonColumnTags.es.js} +60 -47
  37. package/dist/chunks/expandRelativeDates.es.js +1 -1
  38. package/dist/chunks/getThumbnailUrl.es.js +33 -21
  39. package/dist/chunks/getUris.es.js +1580 -1610
  40. package/dist/chunks/queryFilterToClientFilter.es.js +1 -1
  41. package/dist/chunks/realtimeUpdatesUtils.es.js +15 -15
  42. package/dist/chunks/searchTerms.es.js +773 -696
  43. package/dist/chunks/useAttributeEnums.es.js +22 -22
  44. package/dist/chunks/useDateRangeFilter.es.js +1 -1
  45. package/dist/chunks/useHierarchySelection.es.js +3 -4
  46. package/dist/chunks/useLoadModule.es.js +3 -4
  47. package/dist/components.es.js +1391 -1253
  48. package/dist/context.es.js +645 -668
  49. package/dist/hooks.es.js +193 -171
  50. package/dist/index.es.js +4 -4
  51. package/dist/types/Actions.d.ts +10 -8
  52. package/dist/types/DetailsPanel.d.ts +54 -76
  53. package/dist/types/EntityPickerDialog.d.ts +51 -2
  54. package/dist/types/Feed.d.ts +24 -24
  55. package/dist/types/ListTable.d.ts +33 -27
  56. package/dist/types/NewEntity.d.ts +26 -39
  57. package/dist/types/ProjectTreeTable.d.ts +318 -212
  58. package/dist/types/ProjectsTable.d.ts +6 -6
  59. package/dist/types/RepresentationsList.d.ts +4 -0
  60. package/dist/types/Slicer.d.ts +63 -246
  61. package/dist/types/Views.d.ts +71 -298
  62. package/dist/types/api.d.ts +3164 -2363
  63. package/dist/types/components.d.ts +537 -497
  64. package/dist/types/context.d.ts +293 -572
  65. package/dist/types/hooks.d.ts +76 -47
  66. package/dist/types/index.d.ts +6 -0
  67. package/dist/types/util.d.ts +141 -120
  68. package/dist/util.es.js +71 -68
  69. package/package.json +6 -6
  70. package/dist/chunks/EntityUpdatesContext.es.js +0 -61
  71. package/dist/chunks/PlayableIcon.es.js +0 -5020
  72. package/dist/chunks/ProjectContext.es.js +0 -158
  73. package/dist/chunks/useQueryArgumentChangeLoading.es.js +0 -11
  74. package/dist/chunks/viewUpdateHelper.es.js +0 -153
@@ -1,27 +1,26 @@
1
- import { jsx as g, jsxs as R, Fragment as ae } from "react/jsx-runtime";
2
- import { useMemo as I, useCallback as Y, useState as O, useEffect as q, useRef as ne, forwardRef as ee, useContext as Se } from "react";
3
- import { getMixedCounts as Te, BorderedSection as J, Button as _, applyMixedChange as je, StatusSelect as De, AssigneeSelect as Fe, TagsSelect as Ce, EnumDropdown as Ae, Icon as V, getMimeTypeIcon as Ne, theme as $e, getFileSizeString as Me, WatcherSelect as ze } from "@ynput/ayon-react-components";
4
- import { snakeCase as Re, upperFirst as Ue, intersectionBy as he } from "lodash";
1
+ import { jsx as u, jsxs as z, Fragment as ne } from "react/jsx-runtime";
2
+ import { useMemo as I, useCallback as ee, useState as O, useEffect as G, useRef as ie, forwardRef as te, useContext as Ae } from "react";
3
+ import { getMixedCounts as je, BorderedSection as Z, Button as Q, applyMixedChange as De, StatusSelect as Ce, AssigneeSelect as Ne, TagsSelect as Ue, EnumDropdown as $e, Icon as V, getMimeTypeIcon as Me, theme as ze, getFileSizeString as Re, WatcherSelect as We } from "@ynput/ayon-react-components";
4
+ import { snakeCase as Le, upperFirst as Pe, intersectionBy as fe } from "lodash";
5
5
  import "primereact/confirmdialog";
6
- import { toast as te } from "react-toastify";
7
- import { c as oe } from "./copyToClipboard.es.js";
6
+ import { toast as oe } from "react-toastify";
7
+ import { c as re } from "./copyToClipboard.es.js";
8
8
  import "uuid";
9
- import { aF as fe, b6 as Le, bs as ve, b9 as Pe, ba as We, bb as Oe, bB as Ie, by as Ve, bJ as Be, br as He, a as K, bz as _e } from "./searchTerms.es.js";
10
- import ye from "axios";
11
- import p, { keyframes as be, css as xe } from "styled-components";
12
- import U from "clsx";
13
- import { E as Qe, t as qe, M as Ge, T as Ke, D as Je, B as Ze, l as Xe } from "./MetaWidget.es.js";
14
- import "./PlayableIcon.es.js";
15
- import { dq as Ye, c0 as et, ce as we, bk as tt, as as ot, bz as rt, dd as at } from "./getUris.es.js";
9
+ import { aF as ve, b6 as Be, br as ye, b9 as Oe, ba as Ie, bb as Ve, bB as _e, by as He, bJ as Qe, bq as qe, a as J, bz as Ge } from "./searchTerms.es.js";
10
+ import be from "axios";
11
+ import m, { keyframes as xe, css as we } from "styled-components";
12
+ import W from "clsx";
13
+ import { E as Ke, t as Je, M as Ze, T as Xe, D as Ye, B as et, l as tt } from "./MetaWidget.es.js";
14
+ import { U as ot, F as ke } from "./FilmstripEntityCard.es.js";
15
+ import { dr as rt, c1 as at, cf as Ee, bl as nt, cA as it, as as st, bA as lt, de as ct } from "./getUris.es.js";
16
16
  import "@module-federation/enhanced/runtime";
17
17
  import "@ynput/ayon-addon/host";
18
- import { v as re, d as nt, x as it, T as st } from "./TableExportContextInstance.es.js";
18
+ import { m as ae, c as dt, q as pt, T as ut } from "./TableExportContextInstance.es.js";
19
19
  import "semver";
20
20
  import "./ContextMenuContextInstance.es.js";
21
21
  import "react-dom";
22
- import "react-redux";
23
22
  import "react-router-dom";
24
- import { format as lt } from "date-fns";
23
+ import { format as mt } from "date-fns";
25
24
  import "lexical";
26
25
  import "@lexical/markdown";
27
26
  import "match-sorter";
@@ -32,73 +31,74 @@ import "@lexical/selection";
32
31
  import "@lexical/utils";
33
32
  import "@lexical/react/LexicalBlockWithAlignableContents";
34
33
  import "@lexical/react/LexicalDecoratorBlockNode";
35
- import "@tanstack/react-table";
36
34
  import "@ynput/ayon-addon";
37
- import { g as ct, h as ie } from "./humanizeFieldName.es.js";
38
- import { a as dt, A as pt } from "./ThumbnailSimple.es.js";
39
- import { p as Q } from "./parseFilename.es.js";
40
- import { classNames as ut } from "primereact/utils";
41
- import { u as mt } from "./useCreateContextMenu.es.js";
42
- import { g as gt } from "./getThumbnailUrl.es.js";
43
- const se = [], ht = (e) => {
44
- const { data: t, isError: r } = Oe(void 0, { skip: !e });
35
+ import "@tanstack/react-table";
36
+ import "react-redux";
37
+ import { g as gt, h as se } from "./humanizeFieldName.es.js";
38
+ import { a as ht, A as ft } from "./ThumbnailSimple.es.js";
39
+ import { b as vt, g as yt, a as bt } from "./getThumbnailUrl.es.js";
40
+ import { p as q } from "./parseFilename.es.js";
41
+ import { classNames as xt } from "primereact/utils";
42
+ import { u as wt } from "./useCreateContextMenu.es.js";
43
+ const le = [], kt = (e) => {
44
+ const { data: t, isError: o } = Ve(void 0, { skip: !e });
45
45
  return I(
46
46
  () => ({
47
47
  // a failed registry is settled too: every param is sent, same fallback as the batch
48
- isRegistryLoaded: !!t || r,
49
- acceptedParams: t?.find(({ name: o }) => o === e)?.acceptedParams
48
+ isRegistryLoaded: !!t || o,
49
+ acceptedParams: t?.find(({ name: r }) => r === e)?.acceptedParams
50
50
  }),
51
- [t, r, e]
51
+ [t, o, e]
52
52
  );
53
- }, Jo = () => {
54
- const [e] = Pe(), [t] = We();
55
- return Y(
56
- async (r, o) => {
57
- const n = (await t(void 0, !0).unwrap().catch(() => {
58
- }))?.find(({ name: a }) => a === r.enumResolver)?.acceptedParams;
53
+ }, rr = () => {
54
+ const [e] = Oe(), [t] = Ie();
55
+ return ee(
56
+ async (o, r) => {
57
+ const c = (await t(void 0, !0).unwrap().catch(() => {
58
+ }))?.find(({ name: a }) => a === o.enumResolver)?.acceptedParams;
59
59
  try {
60
60
  const a = await e(
61
- fe(r, { projectName: o }, n),
61
+ ve(o, { projectName: r }, c),
62
62
  !0
63
63
  ).unwrap();
64
64
  if (a.error) throw new Error(a.error);
65
- return ve(a.items);
65
+ return ye(a.items);
66
66
  } catch (a) {
67
- throw ft(a);
67
+ throw Et(a);
68
68
  }
69
69
  },
70
70
  [e, t]
71
71
  );
72
- }, ft = (e) => {
72
+ }, Et = (e) => {
73
73
  if (e instanceof Error) return e;
74
74
  const {
75
75
  message: t,
76
- data: r,
77
- status: o,
78
- error: c
76
+ data: o,
77
+ status: r,
78
+ error: g
79
79
  } = e || {};
80
- return typeof r?.detail == "string" ? new Error(r.detail) : typeof c == "string" ? new Error(c) : typeof t == "string" ? new Error(t) : new Error(o ? `Request failed (${o})` : "Request failed");
81
- }, vt = (e, { projectName: t, skip: r } = {}) => {
82
- const o = e?.enumResolver, { acceptedParams: c, isRegistryLoaded: n } = ht(o), a = I(
83
- () => fe(e, { projectName: t }, c),
80
+ return typeof o?.detail == "string" ? new Error(o.detail) : typeof g == "string" ? new Error(g) : typeof t == "string" ? new Error(t) : new Error(r ? `Request failed (${r})` : "Request failed");
81
+ }, St = (e, { projectName: t, skip: o } = {}) => {
82
+ const r = e?.enumResolver, { acceptedParams: g, isRegistryLoaded: c } = kt(r), a = I(
83
+ () => ve(e, { projectName: t }, g),
84
84
  // eslint-disable-next-line react-hooks/exhaustive-deps
85
- [o, e?.enumResolverSettings, t, c]
85
+ [r, e?.enumResolverSettings, t, g]
86
86
  ), {
87
87
  currentData: d,
88
- isFetching: h,
88
+ isFetching: p,
89
89
  isError: i
90
- } = Le(a, {
90
+ } = Be(a, {
91
91
  // waiting for the registry keeps the cache key final: no request is sent with params that get dropped
92
- skip: !o || !!r || !n
93
- }), u = I(() => o ? d ? ve(d.items) : se : e?.enum || se, [o, d, e?.enum]), f = !!o && !h && (i || !!d?.error);
92
+ skip: !r || !!o || !c
93
+ }), f = I(() => r ? d ? ye(d.items) : le : e?.enum || le, [r, d, e?.enum]), s = !!r && !p && (i || !!d?.error);
94
94
  return {
95
- options: u,
95
+ options: f,
96
96
  // a background refetch (tag invalidation) keeps the cached options, so it is not a load
97
- isLoading: !!o && !r && (!n || h && !d),
98
- isError: f,
99
- errorMessage: f ? d?.error : void 0
97
+ isLoading: !!r && !o && (!c || p && !d),
98
+ isError: s,
99
+ errorMessage: s ? d?.error : void 0
100
100
  };
101
- }, yt = [
101
+ }, Tt = [
102
102
  "id",
103
103
  "name",
104
104
  "label",
@@ -109,18 +109,22 @@ const se = [], ht = (e) => {
109
109
  "tags",
110
110
  "status",
111
111
  "updatedAt",
112
+ "updatedBy",
112
113
  "createdAt",
114
+ "createdBy",
113
115
  "projectName",
114
116
  "path",
115
117
  "description"
116
- ], le = [
118
+ ], ce = [
117
119
  "id",
118
120
  "entityType",
119
121
  "projectName",
120
122
  "path",
121
123
  "createdAt",
122
- "updatedAt"
123
- ], bt = [
124
+ "createdBy",
125
+ "updatedAt",
126
+ "updatedBy"
127
+ ], Ft = [
124
128
  "name",
125
129
  "label",
126
130
  "taskType",
@@ -128,68 +132,70 @@ const se = [], ht = (e) => {
128
132
  "productType",
129
133
  "tags",
130
134
  "status"
131
- ], xt = (e, t) => {
132
- const [r, o] = O([]), [c, n] = O(null), a = () => {
133
- const i = {}, u = /* @__PURE__ */ new Set();
134
- e.forEach((s) => {
135
+ ], At = (e, t) => {
136
+ const [o, r] = O([]), [g, c] = O(null), a = () => {
137
+ const i = {}, f = /* @__PURE__ */ new Set();
138
+ e.forEach((n) => {
135
139
  const v = {
136
- id: s.id,
137
- name: s.name,
138
- label: s.label,
139
- entityType: s.entityType,
140
- createdAt: s.createdAt,
141
- updatedAt: s.updatedAt,
142
- projectName: s.projectName,
143
- status: s.status,
144
- tags: s.tags || [],
145
- path: s.path,
146
- folderType: s.folder?.folderType,
147
- productType: s.product?.productType,
148
- taskType: s.task?.taskType,
149
- description: s.attrib?.description?.toString() ?? ""
140
+ id: n.id,
141
+ name: n.name,
142
+ label: n.label,
143
+ entityType: n.entityType,
144
+ createdAt: n.createdAt,
145
+ createdBy: n.createdBy,
146
+ updatedAt: n.updatedAt,
147
+ updatedBy: n.updatedBy,
148
+ projectName: n.projectName,
149
+ status: n.status,
150
+ tags: n.tags || [],
151
+ path: n.path,
152
+ folderType: n.folder?.folderType,
153
+ productType: n.product?.productType,
154
+ taskType: n.task?.taskType,
155
+ description: n.attrib?.description?.toString() ?? ""
150
156
  };
151
- Object.keys(v).forEach((m) => {
152
- yt.includes(m) && (i[m] = i[m] || [], i[m].push(v[m]));
153
- }), s.attrib && Object.keys(s.attrib).forEach((m) => {
154
- if (m !== "description") {
155
- const w = `attrib.${m}`;
156
- i[w] = i[w] || [], i[w].push(s.attrib?.[m]);
157
+ Object.keys(v).forEach((h) => {
158
+ Tt.includes(h) && (i[h] = i[h] || [], i[h].push(v[h]));
159
+ }), n.attrib && Object.keys(n.attrib).forEach((h) => {
160
+ if (h !== "description") {
161
+ const x = `attrib.${h}`;
162
+ i[x] = i[x] || [], i[x].push(n.attrib?.[h]);
157
163
  }
158
164
  });
159
165
  });
160
- const f = Object.entries(i).reduce((s, [v, m]) => {
161
- const { value: w, isMixed: T } = ct(m);
162
- return s[v] = w, T && u.add(v), s;
166
+ const s = Object.entries(i).reduce((n, [v, h]) => {
167
+ const { value: x, isMixed: E } = gt(h);
168
+ return n[v] = x, E && f.add(v), n;
163
169
  }, {});
164
- n(f), o(Array.from(u));
170
+ c(s), r(Array.from(f));
165
171
  };
166
- return q(() => {
172
+ return G(() => {
167
173
  t || e.length === 0 || a();
168
174
  }, [e, t]), {
169
- formData: c,
170
- mixedFields: r,
171
- updateFormData: (i, u) => {
172
- n((f) => f && {
173
- ...f,
174
- [i]: u
175
+ formData: g,
176
+ mixedFields: o,
177
+ updateFormData: (i, f) => {
178
+ c((s) => s && {
179
+ ...s,
180
+ [i]: f
175
181
  });
176
182
  },
177
183
  clearMixedField: (i) => {
178
- o((u) => u.filter((f) => f !== i));
184
+ r((f) => f.filter((s) => s !== i));
179
185
  }
180
186
  };
181
- }, wt = ({
187
+ }, jt = ({
182
188
  attributes: e,
183
189
  folderTypes: t,
184
- taskTypes: r,
185
- statuses: o,
186
- tags: c,
187
- entityType: n,
190
+ taskTypes: o,
191
+ statuses: r,
192
+ tags: g,
193
+ entityType: c,
188
194
  folderHasVersions: a,
189
195
  attribAccess: d
190
196
  }) => {
191
- const h = I(() => {
192
- const { readableAttributes: f, writableAttributes: s, writableFields: v } = d || {}, w = [
197
+ const p = I(() => {
198
+ const { readableAttributes: s, writableAttributes: n, writableFields: v } = d || {}, x = [
193
199
  {
194
200
  name: "name",
195
201
  data: {
@@ -208,7 +214,7 @@ const se = [], ht = (e) => {
208
214
  },
209
215
  {
210
216
  name: "folderType",
211
- hidden: n !== "folder",
217
+ hidden: c !== "folder",
212
218
  data: {
213
219
  type: "string",
214
220
  title: "Folder Type",
@@ -222,12 +228,12 @@ const se = [], ht = (e) => {
222
228
  },
223
229
  {
224
230
  name: "taskType",
225
- hidden: n !== "task",
231
+ hidden: c !== "task",
226
232
  data: {
227
233
  type: "string",
228
234
  title: "Task Type",
229
235
  description: "Type of the task",
230
- enum: r.map((l) => ({
236
+ enum: o.map((l) => ({
231
237
  value: l.name,
232
238
  label: l.name,
233
239
  icon: l.icon
@@ -240,7 +246,7 @@ const se = [], ht = (e) => {
240
246
  type: "string",
241
247
  title: "Status",
242
248
  description: "The state the entity is in, is it approved or in progress etc.",
243
- enum: o.map((l) => ({
249
+ enum: r.map((l) => ({
244
250
  value: l.name,
245
251
  label: l.name,
246
252
  icon: l.icon,
@@ -254,7 +260,7 @@ const se = [], ht = (e) => {
254
260
  type: "list_of_strings",
255
261
  title: "Tags",
256
262
  widget: "tags",
257
- enum: c.map((l) => ({
263
+ enum: g.map((l) => ({
258
264
  value: l.name,
259
265
  label: l.name,
260
266
  color: l.color
@@ -262,7 +268,7 @@ const se = [], ht = (e) => {
262
268
  }
263
269
  }
264
270
  ].map(
265
- (l) => l.name === "folderType" && n === "folder" && a ? {
271
+ (l) => l.name === "folderType" && c === "folder" && a ? {
266
272
  ...l,
267
273
  readonly: !0,
268
274
  data: {
@@ -270,95 +276,100 @@ const se = [], ht = (e) => {
270
276
  description: "Folder type is locked because the folder has published versions."
271
277
  }
272
278
  } : l
273
- ), T = n === "version" ? [
274
- ...w.map(
279
+ ), E = c === "version" ? [
280
+ ...x.map(
275
281
  (l) => ["tags", "status"].includes(l.name) ? l : { ...l, readonly: !0 }
276
282
  )
277
- ] : w, S = v ? T.map(
278
- (l) => v.includes(l.name) || v.includes(Re(l.name)) ? l : { ...l, readonly: !0 }
279
- ) : T, b = n ? e.filter((l) => l.scope?.includes(n) && l.name !== "description").filter((l) => !f || f.includes(l.name)).map((l) => ({
283
+ ] : x, S = v ? E.map(
284
+ (l) => v.includes(l.name) || v.includes(Le(l.name)) ? l : { ...l, readonly: !0 }
285
+ ) : E, y = c ? e.filter((l) => l.scope?.includes(c) && l.name !== "description").filter((l) => !s || s.includes(l.name)).map((l) => ({
280
286
  name: "attrib." + l.name,
281
287
  data: l.data,
282
- ...n === "version" && l.builtin ? { readonly: !0 } : {},
283
- ...s && !s.includes(l.name) ? { readonly: !0 } : {}
284
- })) : [], k = le.map((l) => ({
288
+ ...c === "version" && l.builtin ? { readonly: !0 } : {},
289
+ ...n && !n.includes(l.name) ? { readonly: !0 } : {}
290
+ })) : [], k = ce.map((l) => ({
285
291
  name: l,
286
292
  readonly: !0,
287
293
  data: {
288
294
  type: "string",
289
- title: Ue(l)
295
+ title: {
296
+ createdAt: "Created at",
297
+ createdBy: "Created by",
298
+ updatedAt: "Updated at",
299
+ updatedBy: "Updated by"
300
+ }[l] || Pe(l)
290
301
  }
291
- })), C = [
302
+ })), j = [
292
303
  ...S,
293
- ...b,
304
+ ...y,
294
305
  ...k
295
- ], E = ["path", "name"];
296
- return [...C].sort((l, N) => {
297
- const $ = E.indexOf(l.name), z = E.indexOf(N.name);
298
- return $ === -1 && z === -1 ? 0 : $ === -1 ? 1 : z === -1 ? -1 : $ - z;
306
+ ], w = ["path", "name"];
307
+ return [...j].sort((l, $) => {
308
+ const N = w.indexOf(l.name), R = w.indexOf($.name);
309
+ return N === -1 && R === -1 ? 0 : N === -1 ? 1 : R === -1 ? -1 : N - R;
299
310
  });
300
311
  }, [
301
312
  e,
302
313
  t,
303
- r,
304
314
  o,
315
+ r,
316
+ g,
305
317
  c,
306
- n,
307
318
  a,
308
319
  d
309
- ]), i = h.filter(
310
- (f) => bt.includes(f.name) || f.name.startsWith("attrib.")
311
- ), u = h.filter(
312
- (f) => le.includes(f.name)
320
+ ]), i = p.filter(
321
+ (s) => Ft.includes(s.name) || s.name.startsWith("attrib.")
322
+ ), f = p.filter(
323
+ (s) => ce.includes(s.name)
313
324
  );
314
325
  return {
315
- fields: h,
326
+ fields: p,
316
327
  editableFields: i,
317
- readOnlyFieldsData: u
328
+ readOnlyFieldsData: f
318
329
  };
319
- }, kt = ({ entities: e, entityType: t }) => {
320
- const [r] = Ye(), { onUpdateEntity: o } = re();
321
- return { updateEntity: async (n, a) => {
330
+ }, Dt = ({ entities: e, entityType: t }) => {
331
+ const [o] = rt(), { onUpdateEntity: r } = ae();
332
+ return { updateEntity: async (c, a) => {
322
333
  if (a == null) {
323
334
  console.error("value is null or undefined");
324
335
  return;
325
336
  }
326
337
  try {
327
- const d = e.map((h) => ({
328
- id: h.id,
329
- projectName: h.projectName,
338
+ const d = e.map((p) => ({
339
+ id: p.id,
340
+ projectName: p.projectName,
330
341
  data: {
331
- [n]: typeof a == "function" ? a(h.id) : a
342
+ [c]: typeof a == "function" ? a(p.id) : a
332
343
  },
333
- currentAssignees: h.users,
344
+ currentAssignees: p.users,
334
345
  meta: {
335
- folderId: h.folderId
346
+ folderId: p.folderId
336
347
  }
337
348
  }));
338
- await r({ operations: d, entityType: t }), o?.({ operations: d, entityType: t });
349
+ await o({ operations: d, entityType: t }), r?.({ operations: d, entityType: t });
339
350
  } catch {
340
- te.error(`Error updating ${t}`);
351
+ oe.error(`Error updating ${t}`);
341
352
  }
342
353
  } };
343
- }, X = (e) => e.reduce(
344
- (t, r) => r ? t ? t.filter((o) => r.includes(o)) : r : t,
354
+ }, Y = (e) => e.reduce(
355
+ (t, o) => o ? t ? t.filter((r) => o.includes(r)) : o : t,
345
356
  void 0
346
- ), Et = ({ entities: e, entityType: t }) => {
347
- const { data: o } = et(), c = I(() => {
348
- if (!o?.projects) return {};
357
+ ), Ct = ({ entities: e, entityType: t }) => {
358
+ const { data: r } = at(), g = I(() => {
359
+ if (!r?.projects) return {};
349
360
  const a = [...new Set(e.map((i) => i.projectName))].map(
350
- (i) => o.projects?.[i] || {}
351
- ), d = a.map((i) => i.attrib_read), h = a.map((i) => i.attrib_write);
361
+ (i) => r.projects?.[i] || {}
362
+ ), d = a.map((i) => i.attrib_read), p = a.map((i) => i.attrib_write);
352
363
  return {
353
- readableAttributes: X(
364
+ readableAttributes: Y(
354
365
  d.map((i) => i?.enabled ? i.attributes ?? [] : void 0)
355
366
  ),
356
- writableAttributes: X(
357
- h.map((i) => i?.enabled ? i.attributes ?? [] : void 0)
367
+ writableAttributes: Y(
368
+ p.map((i) => i?.enabled ? i.attributes ?? [] : void 0)
358
369
  ),
359
- writableFields: X(h.map((i) => i?.enabled ? i.fields ?? [] : void 0))
370
+ writableFields: Y(p.map((i) => i?.enabled ? i.fields ?? [] : void 0))
360
371
  };
361
- }, [o, e]), { updateEntity: n } = kt({
372
+ }, [r, e]), { updateEntity: c } = Dt({
362
373
  entities: e.map((a) => ({
363
374
  id: a.id,
364
375
  projectName: a.projectName || "",
@@ -370,45 +381,45 @@ const se = [], ht = (e) => {
370
381
  });
371
382
  return {
372
383
  enableEditing: !0,
373
- attribAccess: c,
374
- updateEntity: n
384
+ attribAccess: g,
385
+ updateEntity: c
375
386
  };
376
- }, St = (e, t) => {
377
- const r = we({ projects: [...new Set(e).values()] });
378
- if (!r || !r.data)
387
+ }, Nt = (e, t) => {
388
+ const o = Ee({ projects: [...new Set(e).values()] });
389
+ if (!o || !o.data)
379
390
  return [];
380
- let o;
381
- for (const c of Object.values(r.data)) {
382
- const n = c.statuses?.filter(
391
+ let r;
392
+ for (const g of Object.values(o.data)) {
393
+ const c = g.statuses?.filter(
383
394
  (a) => t.every((d) => !a.scope || a.scope?.includes(d))
384
395
  ) || [];
385
- if (o === void 0) {
386
- o = n;
396
+ if (r === void 0) {
397
+ r = c;
387
398
  continue;
388
399
  }
389
- o = he(o, n, "name");
400
+ r = fe(r, c, "name");
390
401
  }
391
- return o;
392
- }, Zo = (e, t) => {
393
- let r = Object.values(e || {});
394
- return r.length == 0 || r[0].scope === void 0 ? r : r.filter(
395
- (o) => t.every((c) => o.scope === void 0 || o.scope.includes(c))
402
+ return r;
403
+ }, ar = (e, t) => {
404
+ let o = Object.values(e || {});
405
+ return o.length == 0 || o[0].scope === void 0 ? o : o.filter(
406
+ (r) => t.every((g) => r.scope === void 0 || r.scope.includes(g))
396
407
  );
397
- }, Tt = (e, t) => {
398
- const r = we({ projects: [...new Set(e).values()] });
399
- if (!r || !r.data)
408
+ }, Ut = (e, t) => {
409
+ const o = Ee({ projects: [...new Set(e).values()] });
410
+ if (!o || !o.data)
400
411
  return [];
401
- let o;
402
- for (const c of Object.values(r.data)) {
403
- let n = [];
404
- if (t === "task" ? n = c.taskTypes || [] : t === "folder" && (n = c.folderTypes || []), o === void 0) {
405
- o = n;
412
+ let r;
413
+ for (const g of Object.values(o.data)) {
414
+ let c = [];
415
+ if (t === "task" ? c = g.taskTypes || [] : t === "folder" && (c = g.folderTypes || []), r === void 0) {
416
+ r = c;
406
417
  continue;
407
418
  }
408
- o = he(o, n, "name");
419
+ r = fe(r, c, "name");
409
420
  }
410
- return o || [];
411
- }, ce = p.div`
421
+ return r || [];
422
+ }, de = m.div`
412
423
  width: 100%;
413
424
  overflow: hidden;
414
425
  text-overflow: ellipsis;
@@ -418,7 +429,7 @@ const se = [], ht = (e) => {
418
429
  input {
419
430
  text-align: left;
420
431
  }
421
- `, jt = p(Qe)`
432
+ `, $t = m(Ke)`
422
433
  .enum,
423
434
  .edit-trigger {
424
435
  &:hover {
@@ -428,179 +439,179 @@ const se = [], ht = (e) => {
428
439
  &:hover {
429
440
  background-color: unset;
430
441
  }
431
- `, Dt = p(qe)`
442
+ `, Mt = m(Je)`
432
443
  &.enum:hover {
433
444
  background-color: unset;
434
445
  }
435
- `, Ft = ({
446
+ `, zt = ({
436
447
  field: e,
437
448
  value: t,
438
- isEditing: r,
439
- isReadOnly: o,
440
- isMixed: c,
441
- onChange: n,
449
+ isEditing: o,
450
+ isReadOnly: r,
451
+ isMixed: g,
452
+ onChange: c,
442
453
  onMixedChange: a,
443
454
  onCancelEdit: d,
444
- onExpand: h,
455
+ onExpand: p,
445
456
  entities: i = [],
446
- entityType: u = "task",
447
- projectName: f
457
+ entityType: f = "task",
458
+ projectName: s
448
459
  }) => {
449
- const { type: s, widget: v } = e.data, m = {
450
- isEditing: r && !o,
451
- isReadOnly: o,
460
+ const { type: n, widget: v } = e.data, h = {
461
+ isEditing: o && !r,
462
+ isReadOnly: r,
452
463
  isInherited: !1,
453
- onChange: (A) => n(e.name, A)
454
- }, w = i.map((A) => A.projectName), T = St(w, [u]), S = Tt(w, u), b = f || w[0], {
464
+ onChange: (D) => c(e.name, D)
465
+ }, x = i.map((D) => D.projectName), E = Nt(x, [f]), S = Ut(x, f), y = s || x[0], {
455
466
  options: k,
456
- isLoading: C,
457
- isError: E,
458
- errorMessage: D
459
- } = vt(e.data, { projectName: b }), l = E ? He(D) : void 0, N = I(() => {
460
- if (!(!a || i.length < 2 || s !== "list_of_strings"))
461
- return Te(
462
- i.map((A) => {
463
- const L = e.name === "tags" ? A.tags : e.name.startsWith("attrib.") ? A.attrib?.[e.name.slice(7)] : void 0;
467
+ isLoading: j,
468
+ isError: w,
469
+ errorMessage: T
470
+ } = St(e.data, { projectName: y }), l = w ? qe(T) : void 0, $ = I(() => {
471
+ if (!(!a || i.length < 2 || n !== "list_of_strings"))
472
+ return je(
473
+ i.map((D) => {
474
+ const L = e.name === "tags" ? D.tags : e.name.startsWith("attrib.") ? D.attrib?.[e.name.slice(7)] : void 0;
464
475
  return Array.isArray(L) ? L.map(String) : [];
465
476
  })
466
477
  );
467
- }, [a, i, s, e.name]), $ = N && {
468
- mixedCounts: N,
478
+ }, [a, i, n, e.name]), N = $ && {
479
+ mixedCounts: $,
469
480
  mixedTotal: i.length,
470
- mixedLabel: `${u}s`,
471
- onMixedChange: (A) => a?.(e.name, A)
472
- }, z = e.name === "attrib.endDate" && i.length > 0 && i.every((A) => A.data?.schedulerSyncData?.allDay === !0);
473
- let F = t ?? "";
474
- const y = e.data.title || e.name, j = t == null || t === "" || Array.isArray(t) && t.length === 0;
475
- if (s !== "boolean" && o && !c && j)
476
- return /* @__PURE__ */ g(ce, { children: "-" });
481
+ mixedLabel: `${f}s`,
482
+ onMixedChange: (D) => a?.(e.name, D)
483
+ }, R = e.name === "attrib.endDate" && i.length > 0 && i.every((D) => D.data?.schedulerSyncData?.allDay === !0);
484
+ let C = t ?? "";
485
+ const b = e.data.title || e.name, F = t == null || t === "" || Array.isArray(t) && t.length === 0;
486
+ if (n !== "boolean" && r && !g && F)
487
+ return /* @__PURE__ */ u(de, { children: "-" });
477
488
  switch (!0) {
478
- case s === "boolean":
479
- return /* @__PURE__ */ g(Ze, { value: !!F, ...m, style: { margin: 0 } });
480
- case s === "datetime":
481
- return /* @__PURE__ */ g(
482
- Je,
489
+ case n === "boolean":
490
+ return /* @__PURE__ */ u(et, { value: !!C, ...h, style: { margin: 0 } });
491
+ case n === "datetime":
492
+ return /* @__PURE__ */ u(
493
+ Ye,
483
494
  {
484
- value: F,
485
- ...m,
495
+ value: C,
496
+ ...h,
486
497
  isEditing: !0,
487
498
  onCancelEdit: d,
488
499
  style: { width: "fit-content" },
489
500
  autoFocus: !1,
490
- isMidnightExclusive: z
501
+ isMidnightExclusive: R
491
502
  }
492
503
  );
493
504
  case v === "tags":
494
- return /* @__PURE__ */ g(
495
- Dt,
505
+ return /* @__PURE__ */ u(
506
+ Mt,
496
507
  {
497
- value: Array.isArray(F) ? F : [],
508
+ value: Array.isArray(C) ? C : [],
498
509
  options: k,
499
- projectName: b,
500
- isProjectTags: e.name === "tags" && new Set(w).size <= 1,
510
+ projectName: y,
511
+ isProjectTags: e.name === "tags" && new Set(x).size <= 1,
501
512
  pt: { template: { style: { height: 32 }, className: "enum" } },
502
- placeholder: c ? `Mixed ${y}` : `Select ${y}...`,
503
- ...$,
513
+ placeholder: g ? `Mixed ${b}` : `Select ${b}...`,
514
+ ...N,
504
515
  onCancelEdit: d,
505
516
  align: "right",
506
- ...m
517
+ ...h
507
518
  }
508
519
  );
509
- case Ie(e.data): {
510
- const A = s?.includes("list");
520
+ case _e(e.data): {
521
+ const D = n?.includes("list");
511
522
  let L = [];
512
- A ? L = Array.isArray(F) ? F : [] : c ? L = [] : L = [F];
513
- let P = k.map((x) => ({
514
- value: x.value,
515
- label: x.label,
516
- icon: Ve(x.icon),
517
- color: x.color,
518
- group: x.group,
519
- hidden: x.hidden
523
+ D ? L = Array.isArray(C) ? C : [] : g ? L = [] : L = [C];
524
+ let P = k.map((U) => ({
525
+ value: U.value,
526
+ label: U.label,
527
+ icon: He(U.icon),
528
+ color: U.color,
529
+ group: U.group,
530
+ hidden: U.hidden
520
531
  }));
521
- return e.name === "status" && i.length > 0 && T && T.length > 0 && (P = T.map((x) => ({
522
- value: x.name,
523
- label: x.name,
524
- icon: x.icon,
525
- color: x.color
526
- }))), e.name === "taskType" && i.length > 0 && S && S.length > 0 && (P = S.map((x) => ({
527
- value: x.name,
528
- label: x.name,
529
- icon: x.icon,
530
- color: x.color
531
- }))), e.allowNone && L.length && !A && F && F !== "" && (P = [
532
+ return e.name === "status" && i.length > 0 && E && E.length > 0 && (P = E.map((U) => ({
533
+ value: U.name,
534
+ label: U.name,
535
+ icon: U.icon,
536
+ color: U.color
537
+ }))), e.name === "taskType" && i.length > 0 && S && S.length > 0 && (P = S.map((U) => ({
538
+ value: U.name,
539
+ label: U.name,
540
+ icon: U.icon,
541
+ color: U.color
542
+ }))), e.allowNone && L.length && !D && C && C !== "" && (P = [
532
543
  { value: "", label: `No ${e.data.title || e.name}` },
533
544
  ...P
534
- ]), /* @__PURE__ */ g(
535
- jt,
545
+ ]), /* @__PURE__ */ u(
546
+ $t,
536
547
  {
537
548
  "data-tooltip": l,
538
549
  value: L,
539
550
  options: P,
540
- type: s,
551
+ type: n,
541
552
  pt: {
542
553
  template: {
543
554
  style: { height: 32 },
544
555
  className: "enum"
545
556
  }
546
557
  },
547
- placeholder: l ? `Could not load ${y}` : c ? `Mixed ${y}` : `Select ${y}...`,
548
- error: Be(l),
558
+ placeholder: l ? `Could not load ${b}` : g ? `Mixed ${b}` : `Select ${b}...`,
559
+ error: Qe(l),
549
560
  onCancelEdit: d,
550
561
  align: "right",
551
562
  enableCustomValues: e.enableCustomValues,
552
- isLoadingOptions: C,
563
+ isLoadingOptions: j,
553
564
  search: e.enableSearch ?? P.length >= 5,
554
565
  sortBySelected: !P,
555
- ...$,
556
- ...m
566
+ ...N,
567
+ ...h
557
568
  }
558
569
  );
559
570
  }
560
- case (s === "string" || s === "integer" || s === "float"):
571
+ case (n === "string" || n === "integer" || n === "float"):
561
572
  default:
562
- return v === "markdown" ? /* @__PURE__ */ g(
563
- Ge,
573
+ return v === "markdown" ? /* @__PURE__ */ u(
574
+ Ze,
564
575
  {
565
- value: F.toString(),
576
+ value: C.toString(),
566
577
  onCancelEdit: d,
567
- onExpand: h,
568
- showExpand: !!h,
569
- ...m
578
+ onExpand: p,
579
+ showExpand: !!p,
580
+ ...h
570
581
  }
571
- ) : /* @__PURE__ */ g(ce, { children: /* @__PURE__ */ g(
572
- Ke,
582
+ ) : /* @__PURE__ */ u(de, { children: /* @__PURE__ */ u(
583
+ Xe,
573
584
  {
574
- value: F.toString(),
585
+ value: C.toString(),
575
586
  onCancelEdit: d,
576
- type: s,
577
- ...m
587
+ type: n,
588
+ ...h
578
589
  }
579
590
  ) });
580
591
  }
581
- }, Ct = p.div`
592
+ }, Rt = m.div`
582
593
  color: var(--md-sys-color-outline);
583
594
  white-space: nowrap;
584
595
  overflow: hidden;
585
596
  text-overflow: ellipsis;
586
597
  font-size: 14px;
587
- `, ke = ({
598
+ `, Se = ({
588
599
  name: e,
589
600
  data: t,
590
- showDetailedTooltip: r = !1,
591
- ...o
601
+ showDetailedTooltip: o = !1,
602
+ ...r
592
603
  }) => {
593
- const c = t.title ? ie(t.title) : ie(e), n = r ? `${c} (${e}) ${t.description ? "-" : ""} ${t.description || ""}` : t.description || c;
594
- return /* @__PURE__ */ g(
595
- Ct,
604
+ const g = t.title ? se(t.title) : se(e), c = o ? `${g} (${e}) ${t.description ? "-" : ""} ${t.description || ""}` : t.description || g;
605
+ return /* @__PURE__ */ u(
606
+ Rt,
596
607
  {
597
- "data-tooltip": r ? n : void 0,
608
+ "data-tooltip": o ? c : void 0,
598
609
  "data-tooltip-delay": 700,
599
- ...o,
600
- children: c
610
+ ...r,
611
+ children: g
601
612
  }
602
613
  );
603
- }, Ee = p.div`
614
+ }, Te = m.div`
604
615
  display: grid;
605
616
  grid-template-columns: minmax(150px, 1fr) minmax(0, 1fr) 32px;
606
617
  row-gap: 2px;
@@ -634,7 +645,7 @@ const se = [], ht = (e) => {
634
645
  margin-top: 6px;
635
646
  }
636
647
  }
637
- `, At = p.div`
648
+ `, Wt = m.div`
638
649
  height: 32px;
639
650
  overflow: hidden;
640
651
  width: 100%;
@@ -670,7 +681,7 @@ const se = [], ht = (e) => {
670
681
  &.readonly {
671
682
  pointer-events: none;
672
683
  }
673
- `, Nt = p.div`
684
+ `, Lt = m.div`
674
685
  display: flex;
675
686
  flex-direction: column;
676
687
  gap: var(--base-gap-small);
@@ -680,7 +691,7 @@ const se = [], ht = (e) => {
680
691
  height: 32px;
681
692
  padding: 2px;
682
693
  }
683
- `, $t = p(Ee)`
694
+ `, Pt = m(Te)`
684
695
  &.loading {
685
696
  width: 100%;
686
697
  height: 33px;
@@ -688,114 +699,114 @@ const se = [], ht = (e) => {
688
699
  border-radius: 4px;
689
700
  margin-bottom: 4px;
690
701
  }
691
- `, Mt = ({
702
+ `, Bt = ({
692
703
  title: e,
693
704
  isLoading: t,
694
- form: r,
695
- fields: o,
696
- enableEditing: c,
697
- mixedFields: n,
705
+ form: o,
706
+ fields: r,
707
+ enableEditing: g,
708
+ mixedFields: c,
698
709
  onChange: a,
699
710
  onMixedChange: d,
700
- entities: h = [],
711
+ entities: p = [],
701
712
  projectName: i,
702
- entityType: u = "task"
713
+ entityType: f = "task"
703
714
  }) => {
704
- const [f, s] = O(null), v = I(
705
- () => h.map((b) => b?.id).join("|"),
706
- [h]
715
+ const [s, n] = O(null), v = I(
716
+ () => p.map((y) => y?.id).join("|"),
717
+ [p]
707
718
  );
708
- q(() => {
709
- s(null);
719
+ G(() => {
720
+ n(null);
710
721
  }, [v]);
711
- const m = (b) => {
712
- c && !o.find((k) => k.name === b)?.readonly ? s(b) : console.log("Editing not allowed:", {
713
- enableEditing: c,
714
- fieldReadonly: o.find((k) => k.name === b)?.readonly
722
+ const h = (y) => {
723
+ g && !r.find((k) => k.name === y)?.readonly ? n(y) : console.log("Editing not allowed:", {
724
+ enableEditing: g,
725
+ fieldReadonly: r.find((k) => k.name === y)?.readonly
715
726
  });
716
- }, w = (b, k) => {
717
- s(null), a?.(b, k);
718
- }, T = (b, k) => {
719
- s(null), d?.(b, k);
727
+ }, x = (y, k) => {
728
+ n(null), a?.(y, k);
729
+ }, E = (y, k) => {
730
+ n(null), d?.(y, k);
720
731
  }, S = () => {
721
- s(null);
732
+ n(null);
722
733
  };
723
- return t ? /* @__PURE__ */ g(J, { title: "Attributes", withPadding: !0, children: Array.from({ length: 10 }).map((b, k) => /* @__PURE__ */ R($t, { children: [
724
- /* @__PURE__ */ g("div", { className: "loading" }),
725
- /* @__PURE__ */ g("div", { className: "loading" })
726
- ] }, k)) }) : /* @__PURE__ */ g(
727
- J,
734
+ return t ? /* @__PURE__ */ u(Z, { title: "Attributes", withPadding: !0, children: Array.from({ length: 10 }).map((y, k) => /* @__PURE__ */ z(Pt, { children: [
735
+ /* @__PURE__ */ u("div", { className: "loading" }),
736
+ /* @__PURE__ */ u("div", { className: "loading" })
737
+ ] }, k)) }) : /* @__PURE__ */ u(
738
+ Z,
728
739
  {
729
740
  title: "Attributes",
730
741
  autoHeight: !0,
731
742
  showHeader: !0,
732
743
  withPadding: !0,
733
744
  pt: { content: { style: { minHeight: "unset" } } },
734
- children: o.filter((b) => !b.hidden).map((b) => {
735
- const k = r[b.name], C = f === b.name, E = b.readonly || !c, D = n?.includes(b.name) || !1;
736
- return /* @__PURE__ */ R(
737
- Ee,
745
+ children: r.filter((y) => !y.hidden).map((y) => {
746
+ const k = o[y.name], j = s === y.name, w = y.readonly || !g, T = c?.includes(y.name) || !1;
747
+ return /* @__PURE__ */ z(
748
+ Te,
738
749
  {
739
- className: U("field-row", { "multi-line": b.data.widget === "markdown" }),
750
+ className: W("field-row", { "multi-line": y.data.widget === "markdown" }),
740
751
  children: [
741
- /* @__PURE__ */ g(
742
- ke,
752
+ /* @__PURE__ */ u(
753
+ Se,
743
754
  {
744
- name: b.name,
745
- data: b.data,
755
+ name: y.name,
756
+ data: y.data,
746
757
  showDetailedTooltip: !0,
747
758
  className: "field-label"
748
759
  }
749
760
  ),
750
- /* @__PURE__ */ g(
751
- At,
761
+ /* @__PURE__ */ u(
762
+ Wt,
752
763
  {
753
- className: U("field-value", {
754
- editing: C,
755
- readonly: E
764
+ className: W("field-value", {
765
+ editing: j,
766
+ readonly: w
756
767
  }),
757
768
  onClick: (l) => {
758
- l.target.closest("a") || (l.preventDefault(), !C && !E && b.data.type !== "boolean" && m(b.name));
769
+ l.target.closest("a") || (l.preventDefault(), !j && !w && y.data.type !== "boolean" && h(y.name));
759
770
  },
760
- children: /* @__PURE__ */ g(
761
- Ft,
771
+ children: /* @__PURE__ */ u(
772
+ zt,
762
773
  {
763
- field: b,
774
+ field: y,
764
775
  value: k,
765
- isEditing: C,
766
- isReadOnly: E,
767
- isMixed: D,
768
- onChange: w,
769
- onMixedChange: d && T,
776
+ isEditing: j,
777
+ isReadOnly: w,
778
+ isMixed: T,
779
+ onChange: x,
780
+ onMixedChange: d && E,
770
781
  onCancelEdit: S,
771
782
  onExpand: () => {
772
783
  },
773
- entities: h,
784
+ entities: p,
774
785
  projectName: i,
775
- entityType: u
786
+ entityType: f
776
787
  }
777
788
  )
778
789
  }
779
790
  ),
780
- /* @__PURE__ */ g(Nt, { className: "field-tools", children: /* @__PURE__ */ g(
781
- _,
791
+ /* @__PURE__ */ u(Lt, { className: "field-tools", children: /* @__PURE__ */ u(
792
+ Q,
782
793
  {
783
794
  className: "tool",
784
795
  variant: "text",
785
796
  icon: "content_copy",
786
797
  onClick: (l) => {
787
- l.preventDefault(), l.stopPropagation(), oe((k ?? "").toString(), !0);
798
+ l.preventDefault(), l.stopPropagation(), re((k ?? "").toString(), !0);
788
799
  }
789
800
  }
790
801
  ) })
791
802
  ]
792
803
  },
793
- b.name
804
+ y.name
794
805
  );
795
806
  })
796
807
  }
797
808
  );
798
- }, de = p.div`
809
+ }, pe = m.div`
799
810
  display: grid;
800
811
  grid-template-columns: minmax(200px, 1fr) 1fr 32px;
801
812
  row-gap: 2px;
@@ -818,7 +829,7 @@ const se = [], ht = (e) => {
818
829
  &:hover .copy-icon {
819
830
  opacity: 1;
820
831
  }
821
- `, zt = p.div`
832
+ `, Ot = m.div`
822
833
  text-align: left;
823
834
  color: var(--md-sys-color-on-surface);
824
835
  white-space: nowrap;
@@ -827,7 +838,13 @@ const se = [], ht = (e) => {
827
838
  justify-self: end;
828
839
  font-size: 14px;
829
840
  width: 100%;
830
- `, pe = p.div`
841
+
842
+ &:has(img) {
843
+ display: flex;
844
+ align-items: center;
845
+ gap: 6px;
846
+ }
847
+ `, ue = m.div`
831
848
  height: 20px;
832
849
  background: var(--md-sys-color-surface-container-low);
833
850
  border-radius: 4px;
@@ -844,55 +861,59 @@ const se = [], ht = (e) => {
844
861
  opacity: 0.5;
845
862
  }
846
863
  }
847
- `, Rt = ({
864
+ `, It = ({
848
865
  fields: e,
849
866
  form: t,
850
- mixedFields: r = [],
851
- isLoading: o
867
+ mixedFields: o = [],
868
+ isLoading: r,
869
+ users: g = []
852
870
  }) => {
853
- const c = (n, a) => {
854
- if (n == null)
871
+ const c = (a, d) => {
872
+ if (a == null)
855
873
  return "-";
856
- if (a === "createdAt" || a === "updatedAt")
874
+ if (d === "createdAt" || d === "updatedAt")
857
875
  try {
858
- return lt(new Date(n), "PPpp");
876
+ return mt(new Date(a), "PPpp");
859
877
  } catch {
860
- return n.toString();
878
+ return a.toString();
861
879
  }
862
- return n.toString();
880
+ return a.toString();
863
881
  };
864
- return o ? /* @__PURE__ */ g(J, { title: "Details", withPadding: !0, children: Array.from({ length: 6 }).map((n, a) => /* @__PURE__ */ R(de, { children: [
865
- /* @__PURE__ */ g(pe, { style: { width: "80px" } }),
866
- /* @__PURE__ */ g(pe, { style: { width: "120px", justifySelf: "end" } }),
867
- /* @__PURE__ */ g("div", { style: { width: "24px" } })
868
- ] }, a)) }) : /* @__PURE__ */ g(J, { title: "Details", autoHeight: !0, showHeader: !0, withPadding: !0, children: e.filter((n) => !n.hidden).map((n) => {
869
- const a = t[n.name], d = r.includes(n.name), h = d ? "Multiple values" : c(a, n.name);
870
- return /* @__PURE__ */ R(de, { children: [
871
- /* @__PURE__ */ g(ke, { name: n.name, data: n.data, showDetailedTooltip: !0 }),
872
- /* @__PURE__ */ g(
873
- zt,
882
+ return r ? /* @__PURE__ */ u(Z, { title: "Details", withPadding: !0, children: Array.from({ length: 6 }).map((a, d) => /* @__PURE__ */ z(pe, { children: [
883
+ /* @__PURE__ */ u(ue, { style: { width: "80px" } }),
884
+ /* @__PURE__ */ u(ue, { style: { width: "120px", justifySelf: "end" } }),
885
+ /* @__PURE__ */ u("div", { style: { width: "24px" } })
886
+ ] }, d)) }) : /* @__PURE__ */ u(Z, { title: "Details", autoHeight: !0, showHeader: !0, withPadding: !0, children: e.filter((a) => !a.hidden).map((a) => {
887
+ const d = t[a.name], p = o.includes(a.name), i = p ? "Multiple values" : c(d, a.name), s = ["createdBy", "updatedBy"].includes(a.name) && !p ? g.find((n) => n.name === d) : void 0;
888
+ return /* @__PURE__ */ z(pe, { children: [
889
+ /* @__PURE__ */ u(Se, { name: a.name, data: a.data, showDetailedTooltip: !0 }),
890
+ /* @__PURE__ */ z(
891
+ Ot,
874
892
  {
875
893
  style: {
876
- color: d ? "var(--md-sys-color-on-surface-variant)" : "var(--md-sys-color-on-surface)",
877
- fontStyle: d ? "italic" : "normal"
894
+ color: p ? "var(--md-sys-color-on-surface-variant)" : "var(--md-sys-color-on-surface)",
895
+ fontStyle: p ? "italic" : "normal"
878
896
  },
879
- children: h
897
+ children: [
898
+ s && /* @__PURE__ */ u(ot, { name: s.name, fullName: s.fullName || void 0, size: 20 }),
899
+ s ? s.fullName || s.name : i
900
+ ]
880
901
  }
881
902
  ),
882
- /* @__PURE__ */ g(
883
- _,
903
+ /* @__PURE__ */ u(
904
+ Q,
884
905
  {
885
906
  className: "copy-icon",
886
907
  variant: "text",
887
908
  icon: "content_copy",
888
- onClick: (i) => {
889
- i.stopPropagation(), oe((a ?? "").toString(), !0);
909
+ onClick: (n) => {
910
+ n.stopPropagation(), re((d ?? "").toString(), !0);
890
911
  }
891
912
  }
892
913
  )
893
- ] }, n.name);
914
+ ] }, a.name);
894
915
  }) });
895
- }, Ut = p.div`
916
+ }, Vt = m.div`
896
917
  display: flex;
897
918
  flex-direction: column;
898
919
  height: 100%;
@@ -901,106 +922,112 @@ const se = [], ht = (e) => {
901
922
  padding-right: 8px;
902
923
  padding-left: 8px;
903
924
  margin-top: 16px;
904
- `, Xo = ({ entities: e = [], isLoading: t }) => {
905
- const { formData: r, mixedFields: o, updateFormData: c, clearMixedField: n } = xt(
925
+ `, nr = ({ entities: e = [], isLoading: t }) => {
926
+ const { formData: o, mixedFields: r, updateFormData: g, clearMixedField: c } = At(
906
927
  e,
907
928
  t
908
- ), { attributes: a } = nt(), {
929
+ ), { attributes: a } = dt(), {
909
930
  folderTypes: d = [],
910
- taskTypes: h = [],
931
+ taskTypes: p = [],
911
932
  statuses: i = [],
912
- tags: u = [],
913
- productTypes: f
914
- } = it(), { openSlideOut: s } = re(), [, v] = dt(), m = (e || []).filter((x) => x.entityType === "folder"), { data: w } = tt(
933
+ tags: f = [],
934
+ productTypes: s
935
+ } = pt(), { openSlideOut: n } = ae(), [, v] = ht(), h = (e || []).filter((A) => A.entityType === "folder"), { data: x } = nt(
915
936
  {
916
- entityIds: m.map((x) => x.id),
917
- projectName: r?.projectName || "",
937
+ entityIds: h.map((A) => A.id),
938
+ projectName: o?.projectName || "",
918
939
  referenceTypes: ["origin", "mention", "relation"],
919
940
  activityTypes: ["version.publish"]
920
941
  },
921
942
  {
922
- skip: !r?.projectName || m.length === 0
943
+ skip: !o?.projectName || h.length === 0
923
944
  }
924
- ), T = !!w?.pages?.[0]?.activities?.length, S = r?.entityType || "task", { enableEditing: b, attribAccess: k, updateEntity: C } = Et({
945
+ ), E = !!x?.pages?.[0]?.activities?.length, S = o?.entityType || "task", { enableEditing: y, attribAccess: k, updateEntity: j } = Ct({
925
946
  entities: e,
926
947
  entityType: S
927
- }), { editableFields: E, readOnlyFieldsData: D } = wt({
948
+ }), { editableFields: w, readOnlyFieldsData: T } = jt({
928
949
  attributes: a,
929
950
  folderTypes: d,
930
- taskTypes: h,
951
+ taskTypes: p,
931
952
  statuses: i,
932
- tags: u,
933
- entityType: r?.entityType,
934
- folderHasVersions: T,
953
+ tags: f,
954
+ entityType: o?.entityType,
955
+ folderHasVersions: E,
935
956
  attribAccess: k
936
- }), { writableAttributes: l } = k, N = !l || l.includes("description"), $ = (x, M) => {
937
- x === "tags" && (Array.isArray(M) || (M == null || M === "" ? M = [] : M = [String(M)])), x.startsWith("attrib.") && (M = {
938
- [x.replace("attrib.", "")]: M
939
- }, x = "attrib"), c(x, M), C(x, M);
940
- }, z = (x, M) => {
941
- const B = x.startsWith("attrib.") ? x.replace("attrib.", "") : void 0, Z = (W) => {
942
- const H = B ? W.attrib?.[B] : W.tags;
957
+ }), l = [o?.createdBy, o?.updatedBy].filter(
958
+ (A) => typeof A == "string" && !!A
959
+ ), { data: $ = [] } = it(
960
+ { names: l, projectName: o?.projectName || "" },
961
+ { skip: !l.length || !o?.projectName }
962
+ ), { writableAttributes: N } = k, R = !N || N.includes("description"), C = (A, M) => {
963
+ A === "tags" && (Array.isArray(M) || (M == null || M === "" ? M = [] : M = [String(M)])), A.startsWith("attrib.") && (M = {
964
+ [A.replace("attrib.", "")]: M
965
+ }, A = "attrib"), g(A, M), j(A, M);
966
+ }, b = (A, M) => {
967
+ const _ = A.startsWith("attrib.") ? A.replace("attrib.", "") : void 0, X = (B) => {
968
+ const H = _ ? B.attrib?.[_] : B.tags;
943
969
  return Array.isArray(H) ? H.map(String) : [];
944
- }, G = new Map(
945
- e.map((W) => [W.id, je(Z(W), M)])
970
+ }, K = new Map(
971
+ e.map((B) => [B.id, De(X(B), M)])
946
972
  );
947
- c(x, [...new Set([...G.values()].flat())]), C(B ? "attrib" : x, (W) => {
948
- const H = G.get(W) || [];
949
- return B ? { [B]: H } : H;
973
+ g(A, [...new Set([...K.values()].flat())]), j(_ ? "attrib" : A, (B) => {
974
+ const H = K.get(B) || [];
975
+ return _ ? { [_]: H } : H;
950
976
  });
951
- }, F = r?.projectName || e[0]?.projectName, y = e[0]?.id, j = I(
952
- () => F && y ? { projectName: F, entityType: S, entityId: y, productTypes: f, taskTypes: h } : void 0,
953
- [F, S, y, f, h]
954
- ), A = ({ type: x, id: M }) => {
955
- x === "user" || x === "team" || !F || s({ entityId: M, entityType: x, projectName: F });
956
- }, L = ({ type: x, id: M, label: B }, Z) => {
957
- const { x: G, y: W, width: H } = Z.getBoundingClientRect();
958
- v({ id: M, name: M, type: x, label: B, pos: { left: G + H / 2, top: W } });
959
- }, P = (x) => {
960
- c("description", x), n("description"), C("attrib", { description: x });
977
+ }, F = o?.projectName || e[0]?.projectName, D = e[0]?.id, L = I(
978
+ () => F && D ? { projectName: F, entityType: S, entityId: D, productTypes: s, taskTypes: p } : void 0,
979
+ [F, S, D, s, p]
980
+ ), P = ({ type: A, id: M }) => {
981
+ A === "user" || A === "team" || !F || n({ entityId: M, entityType: A, projectName: F });
982
+ }, U = ({ type: A, id: M, label: _ }, X) => {
983
+ const { x: K, y: B, width: H } = X.getBoundingClientRect();
984
+ v({ id: M, name: M, type: A, label: _, pos: { left: K + H / 2, top: B } });
985
+ }, Fe = (A) => {
986
+ g("description", A), c("description"), j("attrib", { description: A });
961
987
  };
962
- return /* @__PURE__ */ R(Ut, { children: [
963
- /* @__PURE__ */ g(
964
- Xe,
988
+ return /* @__PURE__ */ z(Vt, { children: [
989
+ /* @__PURE__ */ u(
990
+ tt,
965
991
  {
966
- description: r?.description || "",
967
- isMixed: o.includes("description"),
968
- enableEditing: N,
969
- onChange: P,
992
+ description: o?.description || "",
993
+ isMixed: r.includes("description"),
994
+ enableEditing: R,
995
+ onChange: Fe,
970
996
  isLoading: t,
971
- mentionsContext: j,
972
- onMentionClick: A,
973
- onMentionHover: L
997
+ mentionsContext: L,
998
+ onMentionClick: P,
999
+ onMentionHover: U
974
1000
  }
975
1001
  ),
976
- /* @__PURE__ */ g(pt, {}),
977
- /* @__PURE__ */ g(
978
- Mt,
1002
+ /* @__PURE__ */ u(ft, {}),
1003
+ /* @__PURE__ */ u(
1004
+ Bt,
979
1005
  {
980
- fields: E,
981
- form: r || {},
982
- mixedFields: o,
1006
+ fields: w,
1007
+ form: o || {},
1008
+ mixedFields: r,
983
1009
  isLoading: t,
984
- enableEditing: b,
985
- onChange: $,
986
- onMixedChange: z,
1010
+ enableEditing: y,
1011
+ onChange: C,
1012
+ onMixedChange: b,
987
1013
  entities: e,
988
1014
  entityType: S
989
1015
  }
990
1016
  ),
991
- /* @__PURE__ */ g(
992
- Rt,
1017
+ /* @__PURE__ */ u(
1018
+ It,
993
1019
  {
994
- fields: D,
995
- form: r || {},
996
- mixedFields: o,
997
- isLoading: t
1020
+ fields: T,
1021
+ form: o || {},
1022
+ mixedFields: r,
1023
+ isLoading: t,
1024
+ users: $
998
1025
  }
999
1026
  )
1000
1027
  ] });
1001
- }, Yo = p.div`
1028
+ }, ir = m.div`
1002
1029
  position: relative;
1003
- `, er = p.div`
1030
+ `, sr = m.div`
1004
1031
  position: relative;
1005
1032
  padding: 8px;
1006
1033
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
@@ -1032,13 +1059,13 @@ const se = [], ht = (e) => {
1032
1059
  /* align center */
1033
1060
  align-items: center;
1034
1061
  }
1035
- `, tr = p(_)`
1062
+ `, lr = m(Q)`
1036
1063
  position: absolute;
1037
1064
  right: 4px;
1038
1065
  top: 4px;
1039
1066
  width: fit-content;
1040
1067
  z-index: 50;
1041
- `, or = p.header`
1068
+ `, cr = m.header`
1042
1069
  display: flex;
1043
1070
  align-items: center;
1044
1071
  gap: var(--base-gap-large);
@@ -1053,7 +1080,7 @@ const se = [], ht = (e) => {
1053
1080
  display: none;
1054
1081
  }
1055
1082
  }
1056
- `, rr = p.div`
1083
+ `, dr = m.div`
1057
1084
  display: flex;
1058
1085
  align-items: center;
1059
1086
  gap: var(--base-gap-small);
@@ -1061,7 +1088,7 @@ const se = [], ht = (e) => {
1061
1088
  h2 {
1062
1089
  min-width: fit-content;
1063
1090
  }
1064
- `, ar = p.div`
1091
+ `, pr = m.div`
1065
1092
  position: relative;
1066
1093
  height: 100%;
1067
1094
 
@@ -1076,7 +1103,7 @@ const se = [], ht = (e) => {
1076
1103
  flex-direction: column;
1077
1104
  gap: var(--base-gap-small);
1078
1105
  }
1079
- `, nr = p.div`
1106
+ `, ur = m.div`
1080
1107
  display: flex;
1081
1108
  flex-direction: column;
1082
1109
  height: 100%;
@@ -1114,7 +1141,7 @@ const se = [], ht = (e) => {
1114
1141
  align-items: center;
1115
1142
  gap: var(--base-gap-medium);
1116
1143
  }
1117
- `, ir = p.div`
1144
+ `, mr = m.div`
1118
1145
  display: flex;
1119
1146
  justify-content: space-between;
1120
1147
  align-items: flex-start;
@@ -1123,10 +1150,10 @@ const se = [], ht = (e) => {
1123
1150
  label {
1124
1151
  color: var(--md-sys-color-outline);
1125
1152
  }
1126
- `, sr = p.div`
1153
+ `, gr = m.div`
1127
1154
  display: flex;
1128
1155
  flex-direction: column;
1129
- `, lr = p(De)`
1156
+ `, hr = m(Ce)`
1130
1157
  width: fit-content;
1131
1158
  .status-field.value {
1132
1159
  position: relative;
@@ -1137,11 +1164,11 @@ const se = [], ht = (e) => {
1137
1164
  margin-bottom: 2px;
1138
1165
  color: ${(e) => e.$textColor};
1139
1166
  }
1140
- `, cr = p(Fe)`
1167
+ `, fr = m(Ne)`
1141
1168
  width: fit-content;
1142
1169
  justify-self: end;
1143
1170
  max-width: 100%;
1144
- `, dr = p(Ce)`
1171
+ `, vr = m(Ue)`
1145
1172
  height: 24px;
1146
1173
  .template-value {
1147
1174
  padding: 0 2px;
@@ -1155,7 +1182,7 @@ const se = [], ht = (e) => {
1155
1182
  display: none;
1156
1183
  }
1157
1184
  }
1158
- `, pr = p.div`
1185
+ `, yr = m.div`
1159
1186
  display: flex;
1160
1187
  align-items: center;
1161
1188
  gap: 4px;
@@ -1175,7 +1202,7 @@ const se = [], ht = (e) => {
1175
1202
  border-radius: 3px;
1176
1203
  padding: 0 4px;
1177
1204
  }
1178
- `, ur = p(Ae)`
1205
+ `, br = m($e)`
1179
1206
  width: max-content;
1180
1207
  justify-self: end;
1181
1208
  /* remove text and dropdown icon */
@@ -1199,12 +1226,12 @@ const se = [], ht = (e) => {
1199
1226
  background-color: var(--md-sys-color-surface-container-low-hover);
1200
1227
  }
1201
1228
  }
1202
- `, mr = p.footer`
1229
+ `, xr = m.footer`
1203
1230
  display: flex;
1204
1231
  align-items: center;
1205
1232
  gap: var(--base-gap-small);
1206
1233
  justify-content: space-between;
1207
- `, gr = p.div`
1234
+ `, wr = m.div`
1208
1235
  height: 100%;
1209
1236
 
1210
1237
  > input[type='file'] {
@@ -1215,7 +1242,7 @@ const se = [], ht = (e) => {
1215
1242
  input[type='file'] {
1216
1243
  display: none;
1217
1244
  }
1218
- `, hr = p.div`
1245
+ `, kr = m.div`
1219
1246
  z-index: 100;
1220
1247
  position: absolute;
1221
1248
  inset: 0;
@@ -1227,7 +1254,7 @@ const se = [], ht = (e) => {
1227
1254
  display: flex;
1228
1255
  align-items: center;
1229
1256
  justify-content: center;
1230
- `, fr = p.div`
1257
+ `, Er = m.div`
1231
1258
  flex: 1;
1232
1259
  height: 100%;
1233
1260
  border-radius: var(--border-radius-l);
@@ -1256,11 +1283,11 @@ const se = [], ht = (e) => {
1256
1283
  /* show children */
1257
1284
  opacity: 1;
1258
1285
  }
1259
- `, vr = p(_)`
1286
+ `, Sr = m(Q)`
1260
1287
  position: absolute;
1261
1288
  top: 4px;
1262
1289
  right: 4px;
1263
- `, yr = p.div`
1290
+ `, Tr = m.div`
1264
1291
  display: flex;
1265
1292
  flex-direction: column;
1266
1293
  align-items: center;
@@ -1273,7 +1300,7 @@ const se = [], ht = (e) => {
1273
1300
  top: 12px;
1274
1301
  position: relative;
1275
1302
  }
1276
- `, br = p.div`
1303
+ `, Fr = m.div`
1277
1304
  height: 8px;
1278
1305
  position: absolute;
1279
1306
  border-radius: 4px;
@@ -1282,14 +1309,14 @@ const se = [], ht = (e) => {
1282
1309
  background-color: var(--md-sys-color-primary);
1283
1310
 
1284
1311
  transition: right 0.2s;
1285
- `, Lt = be`
1312
+ `, _t = xe`
1286
1313
  from {
1287
1314
  transform: rotate(0deg);
1288
1315
  }
1289
1316
  to {
1290
1317
  transform: rotate(360deg);
1291
1318
  }
1292
- `, Pt = p.div`
1319
+ `, Ht = m.div`
1293
1320
  position: relative;
1294
1321
  display: flex;
1295
1322
  justify-content: center;
@@ -1298,10 +1325,15 @@ const se = [], ht = (e) => {
1298
1325
  overflow: hidden;
1299
1326
 
1300
1327
  background-color: var(--md-sys-color-surface-container-low);
1301
- `, Wt = p(V)`
1302
- animation: ${Lt} 1s linear infinite;
1328
+
1329
+ /* the hover-scrub filmstrip replaces the static image */
1330
+ &[data-filmstrip-active] > img {
1331
+ visibility: hidden;
1332
+ }
1333
+ `, Qt = m(V)`
1334
+ animation: ${_t} 1s linear infinite;
1303
1335
  opacity: 0.6;
1304
- `, Ot = p.img`
1336
+ `, qt = m.img`
1305
1337
  position: absolute;
1306
1338
  inset: 0;
1307
1339
  object-fit: cover;
@@ -1313,56 +1345,62 @@ const se = [], ht = (e) => {
1313
1345
  &.hidden {
1314
1346
  opacity: 0;
1315
1347
  }
1316
- `, It = ({ mimetype: e = "", src: t, ...r }) => {
1317
- const [o, c] = O(!1), [n, a] = O(!1), d = ne(null), h = ne(0);
1318
- return q(() => {
1319
- const i = h.current + 1;
1320
- h.current = i, a(!1), c(!1);
1321
- const u = d.current;
1322
- let f = !1, s = 0, v = 0, m = 0;
1323
- const w = (k) => {
1324
- f || i !== h.current || (f = !0, cancelAnimationFrame(s), window.clearInterval(v), window.clearTimeout(m), k());
1325
- }, T = () => {
1326
- !u || i !== h.current || u.complete && u.naturalWidth > 0 && w(() => {
1327
- a(!0), c(!1);
1348
+ `, Gt = ({
1349
+ mimetype: e = "",
1350
+ src: t,
1351
+ filmstripSrc: o,
1352
+ ...r
1353
+ }) => {
1354
+ const [g, c] = O(!1), [a, d] = O(!1), p = ie(null), i = ie(0);
1355
+ return G(() => {
1356
+ const f = i.current + 1;
1357
+ i.current = f, d(!1), c(!1);
1358
+ const s = p.current;
1359
+ let n = !1, v = 0, h = 0, x = 0;
1360
+ const E = (j) => {
1361
+ n || f !== i.current || (n = !0, cancelAnimationFrame(v), window.clearInterval(h), window.clearTimeout(x), j());
1362
+ }, S = () => {
1363
+ !s || f !== i.current || s.complete && s.naturalWidth > 0 && E(() => {
1364
+ d(!0), c(!1);
1328
1365
  });
1329
- }, S = () => w(() => {
1330
- a(!0), c(!1);
1331
- }), b = () => w(() => {
1332
- a(!0), c(!0);
1366
+ }, y = () => E(() => {
1367
+ d(!0), c(!1);
1368
+ }), k = () => E(() => {
1369
+ d(!0), c(!0);
1333
1370
  });
1334
- return u && (u.addEventListener("load", S), u.addEventListener("error", b), typeof u.decode == "function" && u.decode().then(
1335
- () => w(() => {
1336
- a(!0), c(!1);
1371
+ return s && (s.addEventListener("load", y), s.addEventListener("error", k), typeof s.decode == "function" && s.decode().then(
1372
+ () => E(() => {
1373
+ d(!0), c(!1);
1337
1374
  })
1338
1375
  ).catch(() => {
1339
- T();
1340
- })), s = requestAnimationFrame(T), v = window.setInterval(T, 250), m = window.setTimeout(() => {
1341
- w(() => {
1342
- u && u.naturalWidth > 0 ? (a(!0), c(!1)) : a(!0);
1376
+ S();
1377
+ })), v = requestAnimationFrame(S), h = window.setInterval(S, 250), x = window.setTimeout(() => {
1378
+ E(() => {
1379
+ s && s.naturalWidth > 0 ? (d(!0), c(!1)) : d(!0);
1343
1380
  });
1344
1381
  }, 1e4), () => {
1345
- cancelAnimationFrame(s), window.clearInterval(v), window.clearTimeout(m), u && (u.removeEventListener("load", S), u.removeEventListener("error", b));
1382
+ cancelAnimationFrame(v), window.clearInterval(h), window.clearTimeout(x), s && (s.removeEventListener("load", y), s.removeEventListener("error", k));
1346
1383
  };
1347
- }, [t]), /* @__PURE__ */ R(Pt, { ...r, className: U("file-thumbnail", r.className), children: [
1348
- n ? /* @__PURE__ */ g(V, { icon: Ne(e) }) : /* @__PURE__ */ g(Wt, { icon: "progress_activity" }),
1349
- /* @__PURE__ */ g(
1350
- Ot,
1384
+ }, [t]), /* @__PURE__ */ z(Ht, { ...r, className: W("file-thumbnail", r.className), children: [
1385
+ a ? /* @__PURE__ */ u(V, { icon: Me(e) }) : /* @__PURE__ */ u(Qt, { icon: "progress_activity" }),
1386
+ /* @__PURE__ */ u(
1387
+ qt,
1351
1388
  {
1352
- ref: d,
1389
+ ref: p,
1353
1390
  src: t,
1354
1391
  ...r,
1355
- onError: (i) => {
1356
- i.currentTarget === d.current && (a(!0), c(!0));
1392
+ onError: (f) => {
1393
+ f.currentTarget === p.current && (d(!0), c(!0));
1357
1394
  },
1358
- onLoad: (i) => {
1359
- i.currentTarget === d.current && (a(!0), c(!1));
1395
+ onLoad: (f) => {
1396
+ f.currentTarget === p.current && (d(!0), c(!1));
1360
1397
  },
1361
- className: U({ hidden: !n || o })
1398
+ className: W({ hidden: !a || g })
1362
1399
  }
1363
- )
1400
+ ),
1401
+ o && /* @__PURE__ */ u(ke, { src: o, fit: "cover" })
1364
1402
  ] });
1365
- }, Vt = p.div`
1403
+ }, Kt = m.div`
1366
1404
  display: flex;
1367
1405
  align-items: center;
1368
1406
  overflow: hidden;
@@ -1429,7 +1467,7 @@ const se = [], ht = (e) => {
1429
1467
  background-color: var(--md-sys-color-primary-container);
1430
1468
  }
1431
1469
  }
1432
- `, Bt = p.div`
1470
+ `, Jt = m.div`
1433
1471
  display: flex;
1434
1472
  flex-direction: column;
1435
1473
  flex: 1;
@@ -1454,15 +1492,15 @@ const se = [], ht = (e) => {
1454
1492
  .name {
1455
1493
  color: var(--md-sys-color-outline);
1456
1494
  }
1457
- `, Ht = p.div`
1495
+ `, Zt = m.div`
1458
1496
  display: flex;
1459
1497
  align-items: center;
1460
1498
  gap: var(--base-gap-small);
1461
1499
 
1462
1500
  h4 {
1463
- ${$e.titleSmall}
1501
+ ${ze.titleSmall}
1464
1502
  }
1465
- `, _t = p(_)`
1503
+ `, Xt = m(Q)`
1466
1504
  /* hidden by default and show on card hover */
1467
1505
  display: none;
1468
1506
  .icon {
@@ -1474,78 +1512,79 @@ const se = [], ht = (e) => {
1474
1512
  }
1475
1513
 
1476
1514
  margin: -2px;
1477
- `, Qt = p(It)`
1515
+ `, Yt = m(Gt)`
1478
1516
  width: 71px;
1479
1517
  height: 40px;
1480
1518
 
1481
1519
  border-radius: var(--border-radius-m);
1482
1520
 
1483
1521
  object-fit: cover;
1484
- `, qt = p(V)`
1522
+ `, eo = m(V)`
1485
1523
  font-size: 25px;
1486
1524
 
1487
1525
  cursor: grab;
1488
1526
 
1489
1527
  /* default hidden */
1490
1528
  opacity: 0;
1491
- `, xr = ee(
1529
+ `, Ar = te(
1492
1530
  ({
1493
1531
  availability: e,
1494
1532
  projectName: t,
1495
- fileId: r,
1496
- filename: o,
1497
- label: c,
1498
- processing: n,
1533
+ fileId: o,
1534
+ filename: r,
1535
+ label: g,
1536
+ processing: c,
1499
1537
  mimetype: a,
1500
1538
  isDragOverlay: d,
1501
- isDropPlaceholder: h,
1539
+ isDropPlaceholder: p,
1502
1540
  isSelected: i,
1503
- isDragging: u,
1504
- dragProps: f = {},
1505
- sortingDisabled: s,
1541
+ isDragging: f,
1542
+ dragProps: s = {},
1543
+ sortingDisabled: n,
1506
1544
  onEdit: v,
1507
- ...m
1508
- }, w) => {
1509
- const T = (f || d) && !s, S = e === "conversionRecommended", b = S && !!n;
1510
- let k = o;
1511
- S && (k = "Unoptimized - conversion recommended"), b && (k = "Unoptimized - queued for conversion");
1512
- let C = c;
1513
- return S && (C = o), /* @__PURE__ */ R(
1514
- Vt,
1545
+ ...h
1546
+ }, x) => {
1547
+ const E = (s || d) && !n, S = e === "conversionRecommended", y = S && !!c;
1548
+ let k = r;
1549
+ S && (k = "Unoptimized - conversion recommended"), y && (k = "Unoptimized - queued for conversion");
1550
+ let j = g;
1551
+ return S && (j = r), /* @__PURE__ */ z(
1552
+ Kt,
1515
1553
  {
1516
- id: r,
1517
- ref: w,
1518
- className: U({
1519
- draggable: T,
1520
- "drop-placeholder": h,
1554
+ id: o,
1555
+ ref: x,
1556
+ className: W({
1557
+ draggable: E,
1558
+ "drop-placeholder": p,
1521
1559
  "drag-overlay": d,
1522
- dragging: u,
1560
+ dragging: f,
1523
1561
  // is anything dragging
1524
1562
  selected: i,
1525
1563
  editable: !!v
1526
1564
  }),
1527
- ...m,
1565
+ ...h,
1528
1566
  children: [
1529
- /* @__PURE__ */ g(
1530
- Qt,
1567
+ /* @__PURE__ */ u(
1568
+ Yt,
1531
1569
  {
1532
- src: `/api/projects/${t}/files/${r}/thumbnail`,
1533
- mimetype: a
1570
+ src: `/api/projects/${t}/files/${o}/thumbnail`,
1571
+ mimetype: a,
1572
+ filmstripSrc: !f && a?.startsWith("video/") ? vt(t, o) : null
1534
1573
  }
1535
1574
  ),
1536
- /* @__PURE__ */ R(Bt, { children: [
1537
- /* @__PURE__ */ R(Ht, { children: [
1538
- /* @__PURE__ */ g("h4", { children: C }),
1539
- !!v && /* @__PURE__ */ g(_t, { icon: "edit", variant: "text", className: "edit", onClick: v })
1575
+ /* @__PURE__ */ z(Jt, { children: [
1576
+ /* @__PURE__ */ z(Zt, { children: [
1577
+ /* @__PURE__ */ u("h4", { children: j }),
1578
+ !!v && /* @__PURE__ */ u(Xt, { icon: "edit", variant: "text", className: "edit", onClick: v })
1540
1579
  ] }),
1541
- /* @__PURE__ */ g("span", { className: "name", children: k })
1580
+ /* @__PURE__ */ u("span", { className: "name", children: k })
1542
1581
  ] }),
1543
- T && /* @__PURE__ */ g(qt, { className: "handle", ...f, icon: "drag_indicator" })
1582
+ E && /* @__PURE__ */ u(eo, { className: "handle", ...s, icon: "drag_indicator" })
1544
1583
  ]
1545
1584
  }
1546
1585
  );
1547
1586
  }
1548
- ), Gt = be`
1587
+ ), to = xe`
1549
1588
  from {
1550
1589
  transform: rotate(360deg);
1551
1590
  }
@@ -1554,7 +1593,7 @@ const se = [], ht = (e) => {
1554
1593
  transform: rotate(0deg);
1555
1594
  }
1556
1595
 
1557
- `, Kt = p.div`
1596
+ `, oo = m.div`
1558
1597
  position: relative;
1559
1598
  width: 100%;
1560
1599
  min-height: 50px;
@@ -1620,13 +1659,13 @@ const se = [], ht = (e) => {
1620
1659
  & > * {
1621
1660
  z-index: 10;
1622
1661
  }
1623
- `, Jt = p.div`
1662
+ `, ro = m.div`
1624
1663
  position: absolute;
1625
1664
  inset: 0;
1626
1665
  background-color: var(--md-sys-color-primary-container);
1627
1666
  z-index: 0;
1628
1667
  transition: right 0.2s;
1629
- `, Zt = p.div`
1668
+ `, ao = m.div`
1630
1669
  position: relative;
1631
1670
  width: 71px;
1632
1671
  height: 40px;
@@ -1645,7 +1684,7 @@ const se = [], ht = (e) => {
1645
1684
 
1646
1685
  &.spinning {
1647
1686
  /* spin animation */
1648
- animation: ${Gt} 1s infinite linear;
1687
+ animation: ${to} 1s infinite linear;
1649
1688
  }
1650
1689
  }
1651
1690
 
@@ -1657,84 +1696,84 @@ const se = [], ht = (e) => {
1657
1696
  object-fit: cover;
1658
1697
  opacity: 0.5;
1659
1698
  }
1660
- `, ue = ({
1699
+ `, me = ({
1661
1700
  name: e,
1662
1701
  progress: t,
1663
- size: r,
1664
- type: o,
1665
- fileId: c,
1666
- src: n,
1702
+ size: o,
1703
+ type: r,
1704
+ fileId: g,
1705
+ src: c,
1667
1706
  error: a,
1668
1707
  tooltip: d,
1669
- onRemove: h,
1708
+ onRemove: p,
1670
1709
  ...i
1671
1710
  }) => {
1672
- let u = "", f = !1, s = "";
1673
- switch (o) {
1711
+ let f = "", s = !1, n = "";
1712
+ switch (r) {
1674
1713
  case "processing":
1675
- u = "Transcoding", f = !0, s = "settings";
1714
+ f = "Transcoding", s = !0, n = "settings";
1676
1715
  break;
1677
1716
  case "unsupported":
1678
- u = "Unsupported - conversion required", s = "visibility_off";
1717
+ f = "Unsupported - conversion required", n = "visibility_off";
1679
1718
  break;
1680
1719
  case "upload":
1681
- u = "Uploading", f = !0, s = "sync";
1720
+ f = "Uploading", s = !0, n = "sync";
1682
1721
  break;
1683
1722
  case "queued":
1684
- u = "Queued - waiting to be transcoded", s = "hourglass";
1723
+ f = "Queued - waiting to be transcoded", n = "hourglass";
1685
1724
  break;
1686
1725
  case "waiting":
1687
- u = "Waiting for upload", s = "schedule";
1726
+ f = "Waiting for upload", n = "schedule";
1688
1727
  break;
1689
1728
  case "importing":
1690
- u = "Importing", s = "upload_file";
1729
+ f = "Importing", n = "upload_file";
1691
1730
  break;
1692
1731
  case "validating":
1693
- u = "Validating", s = "checklist";
1732
+ f = "Validating", n = "checklist";
1694
1733
  break;
1695
1734
  }
1696
- a && (f = !1, s = "error");
1735
+ a && (s = !1, n = "error");
1697
1736
  const v = t !== void 0 ? `- ${t}%` : "";
1698
- return /* @__PURE__ */ R(
1699
- Kt,
1737
+ return /* @__PURE__ */ z(
1738
+ oo,
1700
1739
  {
1701
- className: U({ finished: t === 100, error: !!a, [o]: !0 }),
1702
- id: c,
1740
+ className: W({ finished: t === 100, error: !!a, [r]: !0 }),
1741
+ id: g,
1703
1742
  ...i,
1704
1743
  children: [
1705
- /* @__PURE__ */ R(Zt, { children: [
1706
- n && /* @__PURE__ */ g("img", { src: n }),
1707
- s && /* @__PURE__ */ g(V, { icon: s, className: U({ spinning: f }) })
1744
+ /* @__PURE__ */ z(ao, { children: [
1745
+ c && /* @__PURE__ */ u("img", { src: c }),
1746
+ n && /* @__PURE__ */ u(V, { icon: n, className: W({ spinning: s }) })
1708
1747
  ] }),
1709
- /* @__PURE__ */ R("span", { className: "content", children: [
1710
- /* @__PURE__ */ g("span", { className: "name", children: e }),
1711
- /* @__PURE__ */ g("span", { className: "message", children: a || `${u} ${v}` })
1748
+ /* @__PURE__ */ z("span", { className: "content", children: [
1749
+ /* @__PURE__ */ u("span", { className: "name", children: e }),
1750
+ /* @__PURE__ */ u("span", { className: "message", children: a || `${f} ${v}` })
1712
1751
  ] }),
1713
- r && /* @__PURE__ */ g("span", { className: "size", children: Me(r) }),
1714
- d && /* @__PURE__ */ g(V, { icon: "info", className: "info", "data-tooltip": d, "data-tooltip-as": "markdown" }),
1715
- (a || o === "waiting") && /* @__PURE__ */ g(_, { icon: "close", variant: "text", onClick: h }),
1716
- /* @__PURE__ */ g(Jt, { className: "progress", style: { right: `${100 - (t ?? 0)}%` } })
1752
+ o && /* @__PURE__ */ u("span", { className: "size", children: Re(o) }),
1753
+ d && /* @__PURE__ */ u(V, { icon: "info", className: "info", "data-tooltip": d, "data-tooltip-as": "markdown" }),
1754
+ (a || r === "waiting") && /* @__PURE__ */ u(Q, { icon: "close", variant: "text", onClick: p }),
1755
+ /* @__PURE__ */ u(ro, { className: "progress", style: { right: `${100 - (t ?? 0)}%` } })
1717
1756
  ]
1718
1757
  },
1719
1758
  e
1720
1759
  );
1721
1760
  };
1722
- p.div`
1761
+ m.div`
1723
1762
  display: flex;
1724
1763
  flex-direction: column;
1725
1764
  gap: var(--base-gap-small);
1726
1765
  min-height: 100%;
1727
1766
  padding-bottom: var(--padding-m);
1728
1767
  `;
1729
- const wr = p.div`
1768
+ const jr = m.div`
1730
1769
  position: relative;
1731
1770
  overflow: hidden;
1732
1771
  border-radius: var(--border-radius-m);
1733
1772
  width: 100%;
1734
1773
  min-height: 50px;
1735
- `, kr = p.div`
1774
+ `, Dr = m.div`
1736
1775
  word-break: break-all;
1737
- `, Xt = p.div`
1776
+ `, no = m.div`
1738
1777
  display: flex;
1739
1778
  flex-direction: column;
1740
1779
  gap: var(--base-gap-small);
@@ -1751,7 +1790,7 @@ const wr = p.div`
1751
1790
  &.dragging {
1752
1791
  opacity: 0;
1753
1792
  }
1754
- `, Yt = p.div`
1793
+ `, io = m.div`
1755
1794
  position: relative;
1756
1795
  min-height: 50px;
1757
1796
  display: flex;
@@ -1780,7 +1819,7 @@ const wr = p.div`
1780
1819
  opacity: 0;
1781
1820
  cursor: pointer;
1782
1821
  }
1783
- `, eo = p.div`
1822
+ `, so = m.div`
1784
1823
  position: absolute;
1785
1824
  inset: var(--padding-s);
1786
1825
  background-color: var(--md-sys-color-surface-container-lowest);
@@ -1802,239 +1841,239 @@ const wr = p.div`
1802
1841
  .icon {
1803
1842
  font-size: 32px;
1804
1843
  }
1805
- `, me = (e) => {
1806
- if (ye.isAxiosError(e)) {
1844
+ `, ge = (e) => {
1845
+ if (be.isAxiosError(e)) {
1807
1846
  const t = e.response?.data;
1808
1847
  if (typeof t == "string" && t)
1809
1848
  return t;
1810
1849
  if (t && typeof t == "object" && "detail" in t) {
1811
- const r = t.detail;
1812
- if (typeof r == "string" && r)
1813
- return r;
1850
+ const o = t.detail;
1851
+ if (typeof o == "string" && o)
1852
+ return o;
1814
1853
  }
1815
1854
  return e.message || e.response?.statusText || "Unknown upload error";
1816
1855
  }
1817
1856
  return e instanceof Error ? e.message : typeof e == "string" ? e : "Unknown upload error";
1818
- }, to = ({
1857
+ }, lo = ({
1819
1858
  projectName: e,
1820
1859
  versionId: t,
1821
- taskId: r,
1822
- folderId: o,
1823
- productId: c,
1824
- dispatch: n,
1860
+ taskId: o,
1861
+ folderId: r,
1862
+ productId: g,
1863
+ dispatch: c,
1825
1864
  onUpload: a,
1826
1865
  onProgress: d
1827
1866
  }) => {
1828
- const [h, i] = O({}), u = Y(
1829
- (s) => {
1867
+ const [p, i] = O({}), f = ee(
1868
+ (n) => {
1830
1869
  t && i((v) => ({
1831
1870
  ...v,
1832
- [t]: v[t]?.filter((m) => m.name !== s) || []
1871
+ [t]: v[t]?.filter((h) => h.name !== n) || []
1833
1872
  }));
1834
1873
  },
1835
1874
  [t]
1836
1875
  );
1837
1876
  return {
1838
- handleFileUpload: Y(
1839
- async (s, v) => {
1840
- const m = v || t;
1841
- if (!m || !e) return;
1842
- const w = Array.from(s), T = w.map((E) => ({
1843
- name: Q(E.name),
1844
- size: E.size,
1877
+ handleFileUpload: ee(
1878
+ async (n, v) => {
1879
+ const h = v || t;
1880
+ if (!h || !e) return;
1881
+ const x = Array.from(n), E = x.map((w) => ({
1882
+ name: q(w.name),
1883
+ size: w.size,
1845
1884
  progress: 0
1846
- })), S = [...h[m] || [], ...T];
1847
- i({ ...h, [m]: S });
1848
- const b = (E) => (D) => {
1849
- if (!m) return;
1850
- console.log(`Upload successful for ${E.name}`);
1851
- const l = D.data;
1852
- e && (n(
1885
+ })), S = [...p[h] || [], ...E];
1886
+ i({ ...p, [h]: S });
1887
+ const y = (w) => (T) => {
1888
+ if (!h) return;
1889
+ console.log(`Upload successful for ${w.name}`);
1890
+ const l = T.data;
1891
+ e && (c(
1853
1892
  // @ts-ignore
1854
- ot.util.updateQueryData(
1893
+ st.util.updateQueryData(
1855
1894
  "getReviewablesForVersion",
1856
- { projectName: e, versionId: m },
1857
- (N) => {
1858
- N.reviewables || (N.reviewables = []), N.reviewables.push(l);
1895
+ { projectName: e, versionId: h },
1896
+ ($) => {
1897
+ $.reviewables || ($.reviewables = []), $.reviewables.push(l);
1859
1898
  }
1860
1899
  )
1861
- ), c && n(K.util.invalidateTags([{ type: "viewer", id: c }])), n(K.util.invalidateTags([{ type: "viewer", id: m }])), o && n(K.util.invalidateTags([{ type: "viewer", id: o }])), r && n(K.util.invalidateTags([{ type: "viewer", id: r }])), u(Q(E.name)));
1862
- }, k = (E) => (D) => {
1863
- m && (console.error(`Upload failed for ${E.name}: ${D}`), i((l) => {
1864
- const $ = (l[m] || []).map((z) => z.name !== Q(E.name) ? z : {
1865
- ...z,
1866
- error: me(D)
1900
+ ), g && c(J.util.invalidateTags([{ type: "viewer", id: g }])), c(J.util.invalidateTags([{ type: "viewer", id: h }])), r && c(J.util.invalidateTags([{ type: "viewer", id: r }])), o && c(J.util.invalidateTags([{ type: "viewer", id: o }])), f(q(w.name)));
1901
+ }, k = (w) => (T) => {
1902
+ h && (console.error(`Upload failed for ${w.name}: ${T}`), i((l) => {
1903
+ const N = (l[h] || []).map((R) => R.name !== q(w.name) ? R : {
1904
+ ...R,
1905
+ error: ge(T)
1867
1906
  });
1868
1907
  return {
1869
1908
  ...l,
1870
- [m]: $
1909
+ [h]: N
1871
1910
  };
1872
1911
  }));
1873
- }, C = (E) => m ? (D) => i((l) => {
1874
- const $ = (l[m] || []).map((y) => y.name !== Q(E.name) ? y : {
1875
- ...y,
1876
- progress: D.total ? Math.round(D.loaded / D.total * 100) : 0
1877
- }), z = $.reduce(
1878
- (y, j) => y + (j.progress || 0),
1912
+ }, j = (w) => h ? (T) => i((l) => {
1913
+ const N = (l[h] || []).map((b) => b.name !== q(w.name) ? b : {
1914
+ ...b,
1915
+ progress: T.total ? Math.round(T.loaded / T.total * 100) : 0
1916
+ }), R = N.reduce(
1917
+ (b, F) => b + (F.progress || 0),
1879
1918
  0
1880
- ), F = Math.round(z / $.length);
1881
- return d?.(F), {
1919
+ ), C = Math.round(R / N.length);
1920
+ return d?.(C), {
1882
1921
  ...l,
1883
- [m]: $
1922
+ [h]: N
1884
1923
  };
1885
1924
  }) : () => {
1886
1925
  };
1887
1926
  try {
1888
- const E = w.map((D) => {
1889
- const l = Q(D.name), N = l.split(".").slice(0, -1).join(".") || "unnamed", $ = `/api/projects/${e}/versions/${m}/reviewables?label=${N}`, z = { "content-type": D.type, "x-file-name": l };
1890
- return ye.post($, D, { headers: z, onUploadProgress: C(D) }).then(b(D)).catch((F) => {
1891
- throw k(D)(F), F;
1927
+ const w = x.map((T) => {
1928
+ const l = q(T.name), $ = l.split(".").slice(0, -1).join(".") || "unnamed", N = `/api/projects/${e}/versions/${h}/reviewables?label=${$}`, R = { "content-type": T.type, "x-file-name": l };
1929
+ return be.post(N, T, { headers: R, onUploadProgress: j(T) }).then(y(T)).catch((C) => {
1930
+ throw k(T)(C), C;
1892
1931
  });
1893
1932
  });
1894
- await Promise.all(E), a && a();
1895
- } catch (E) {
1896
- throw console.error(E), te.error(`Failed to upload file/s: ${me(E)}`), E;
1933
+ await Promise.all(w), a && a();
1934
+ } catch (w) {
1935
+ throw console.error(w), oe.error(`Failed to upload file/s: ${ge(w)}`), w;
1897
1936
  }
1898
1937
  },
1899
1938
  [
1900
1939
  t,
1901
1940
  e,
1902
- h,
1903
- n,
1941
+ p,
1904
1942
  c,
1905
- o,
1943
+ g,
1906
1944
  r,
1907
- u,
1945
+ o,
1946
+ f,
1908
1947
  a,
1909
1948
  d
1910
1949
  ]
1911
1950
  ),
1912
- handleRemoveUpload: u,
1913
- uploading: h
1951
+ handleRemoveUpload: f,
1952
+ uploading: p
1914
1953
  };
1915
- }, Er = ({
1954
+ }, Cr = ({
1916
1955
  projectName: e,
1917
1956
  taskId: t,
1918
- folderId: r,
1919
- versionId: o,
1920
- productId: c,
1921
- onUpload: n,
1957
+ folderId: o,
1958
+ versionId: r,
1959
+ productId: g,
1960
+ onUpload: c,
1922
1961
  onFilesAdded: a,
1923
1962
  children: d,
1924
- dispatch: h,
1963
+ dispatch: p,
1925
1964
  variant: i = "normal",
1926
- pendingFiles: u = [],
1927
- setPendingFiles: f,
1928
- className: s,
1965
+ pendingFiles: f = [],
1966
+ setPendingFiles: s,
1967
+ className: n,
1929
1968
  readOnly: v = !1,
1930
- pt: m,
1931
- ...w
1969
+ pt: h,
1970
+ ...x
1932
1971
  }) => {
1933
- const [T, S] = O(!1), {
1934
- handleFileUpload: b,
1972
+ const [E, S] = O(!1), {
1973
+ handleFileUpload: y,
1935
1974
  handleRemoveUpload: k,
1936
- uploading: C
1937
- } = to({
1975
+ uploading: j
1976
+ } = lo({
1938
1977
  projectName: e,
1939
- versionId: o,
1978
+ versionId: r,
1940
1979
  taskId: t,
1941
- folderId: r,
1942
- productId: c,
1943
- dispatch: h,
1944
- onUpload: n
1945
- }), E = !!o;
1946
- q(() => {
1947
- if (E && o && u.length > 0 && f) {
1948
- const y = u.map((j) => j.file);
1949
- u.forEach((j) => {
1950
- j.preview && URL.revokeObjectURL(j.preview);
1951
- }), f([]), b(y);
1980
+ folderId: o,
1981
+ productId: g,
1982
+ dispatch: p,
1983
+ onUpload: c
1984
+ }), w = !!r;
1985
+ G(() => {
1986
+ if (w && r && f.length > 0 && s) {
1987
+ const b = f.map((F) => F.file);
1988
+ f.forEach((F) => {
1989
+ F.preview && URL.revokeObjectURL(F.preview);
1990
+ }), s([]), y(b);
1952
1991
  }
1953
- }, [E, o, u.length, b, f]);
1954
- const D = (y) => y.type.startsWith("image/"), l = (y) => y.map((j) => ({
1955
- file: j,
1956
- preview: D(j) ? URL.createObjectURL(j) : void 0
1957
- })), N = async (y) => {
1958
- const j = Array.from(y);
1959
- if (a?.(j), !E || !o) {
1960
- f && f((A) => [...A, ...l(j)]);
1992
+ }, [w, r, f.length, y, s]);
1993
+ const T = (b) => b.type.startsWith("image/"), l = (b) => b.map((F) => ({
1994
+ file: F,
1995
+ preview: T(F) ? URL.createObjectURL(F) : void 0
1996
+ })), $ = async (b) => {
1997
+ const F = Array.from(b);
1998
+ if (a?.(F), !w || !r) {
1999
+ s && s((D) => [...D, ...l(F)]);
1961
2000
  return;
1962
2001
  }
1963
- await b(y);
1964
- }, $ = (y) => {
1965
- const j = y.target.files;
1966
- j && N(j);
1967
- }, z = (y) => {
1968
- y.preventDefault(), S(!1);
1969
- const j = y.dataTransfer.files;
1970
- j && N(j);
1971
- }, F = i === "large" ? { minWidth: "360px", maxWidth: "480px", alignSelf: "center" } : {};
1972
- return /* @__PURE__ */ R(ae, { children: [
1973
- /* @__PURE__ */ g(
1974
- Xt,
2002
+ await y(b);
2003
+ }, N = (b) => {
2004
+ const F = b.target.files;
2005
+ F && $(F);
2006
+ }, R = (b) => {
2007
+ b.preventDefault(), S(!1);
2008
+ const F = b.dataTransfer.files;
2009
+ F && $(F);
2010
+ }, C = i === "large" ? { minWidth: "360px", maxWidth: "480px", alignSelf: "center" } : {};
2011
+ return /* @__PURE__ */ z(ne, { children: [
2012
+ /* @__PURE__ */ u(
2013
+ no,
1975
2014
  {
1976
- className: U(s, i, { dragging: T }),
1977
- ...w,
2015
+ className: W(n, i, { dragging: E }),
2016
+ ...x,
1978
2017
  onDragEnter: () => !v && S(!0),
1979
- onDragOver: (y) => y.preventDefault(),
1980
- onDrop: (y) => {
1981
- v && (y.preventDefault(), y.stopPropagation());
2018
+ onDragOver: (b) => b.preventDefault(),
2019
+ onDrop: (b) => {
2020
+ v && (b.preventDefault(), b.stopPropagation());
1982
2021
  },
1983
- children: /* @__PURE__ */ R(ae, { children: [
2022
+ children: /* @__PURE__ */ z(ne, { children: [
1984
2023
  d,
1985
- !E && u?.map((y) => /* @__PURE__ */ g(
1986
- ue,
2024
+ !w && f?.map((b) => /* @__PURE__ */ u(
2025
+ me,
1987
2026
  {
1988
- name: y.file.name,
1989
- size: y.file.size,
1990
- src: y.preview,
2027
+ name: b.file.name,
2028
+ size: b.file.size,
2029
+ src: b.preview,
1991
2030
  type: "waiting",
1992
2031
  onRemove: () => {
1993
- f && f((j) => j.filter((A) => A.file.name !== y.file.name));
2032
+ s && s((F) => F.filter((D) => D.file.name !== b.file.name));
1994
2033
  }
1995
2034
  },
1996
- y.file.name
2035
+ b.file.name
1997
2036
  )),
1998
- o && C[o]?.map((y) => /* @__PURE__ */ g(
1999
- ue,
2037
+ r && j[r]?.map((b) => /* @__PURE__ */ u(
2038
+ me,
2000
2039
  {
2001
- ...y,
2040
+ ...b,
2002
2041
  type: "upload",
2003
- onRemove: () => k(y.name)
2042
+ onRemove: () => k(b.name)
2004
2043
  },
2005
- y.name
2044
+ b.name
2006
2045
  )),
2007
- !v && /* @__PURE__ */ R(
2008
- Yt,
2046
+ !v && /* @__PURE__ */ z(
2047
+ io,
2009
2048
  {
2010
2049
  id: "upload",
2011
- className: U("upload", i),
2012
- style: F,
2013
- ...m?.upload,
2050
+ className: W("upload", i),
2051
+ style: C,
2052
+ ...h?.upload,
2014
2053
  children: [
2015
- /* @__PURE__ */ g("span", { children: "Drop or click to upload" }),
2016
- /* @__PURE__ */ g("input", { type: "file", multiple: !0, onChange: $ })
2054
+ /* @__PURE__ */ u("span", { children: "Drop or click to upload" }),
2055
+ /* @__PURE__ */ u("input", { type: "file", multiple: !0, onChange: N })
2017
2056
  ]
2018
2057
  }
2019
2058
  )
2020
2059
  ] })
2021
2060
  }
2022
2061
  ),
2023
- T && !v && /* @__PURE__ */ R(
2024
- eo,
2062
+ E && !v && /* @__PURE__ */ z(
2063
+ so,
2025
2064
  {
2026
- onDragOver: (y) => y.preventDefault(),
2065
+ onDragOver: (b) => b.preventDefault(),
2027
2066
  onDragLeave: () => S(!1),
2028
- onDrop: z,
2029
- ...m?.dropzone,
2067
+ onDrop: R,
2068
+ ...h?.dropzone,
2030
2069
  children: [
2031
- /* @__PURE__ */ g(V, { icon: "upload" }),
2032
- /* @__PURE__ */ g("span", { children: "Upload reviewable" })
2070
+ /* @__PURE__ */ u(V, { icon: "upload" }),
2071
+ /* @__PURE__ */ u("span", { children: "Upload reviewable" })
2033
2072
  ]
2034
2073
  }
2035
2074
  )
2036
2075
  ] });
2037
- }, Sr = p.div`
2076
+ }, Nr = m.div`
2038
2077
  position: relative;
2039
2078
  border-radius: var(--border-radius-m);
2040
2079
  display: flex;
@@ -2049,9 +2088,9 @@ const wr = p.div`
2049
2088
  }
2050
2089
 
2051
2090
  flex: 1;
2052
- `, Tr = p.div`
2091
+ `, Ur = m.div`
2053
2092
  position: relative;
2054
- `, jr = p.span`
2093
+ `, $r = m.span`
2055
2094
  position: relative;
2056
2095
  padding: 0px 2px;
2057
2096
  border-radius: var(--border-radius-m);
@@ -2073,29 +2112,29 @@ const wr = p.div`
2073
2112
  color: var(--md-sys-color-on-surface);
2074
2113
  }
2075
2114
  }
2076
- `, Dr = p.span`
2115
+ `, Mr = m.span`
2077
2116
  text-overflow: ellipsis;
2078
2117
  overflow: hidden;
2079
2118
  display: inline-block;
2080
2119
  white-space: nowrap;
2081
- `, ge = xe`
2120
+ `, he = we`
2082
2121
  background-color: var(--md-sys-color-surface-container);
2083
2122
  &,
2084
2123
  .icon {
2085
2124
  color: var(--md-sys-color-on-surface);
2086
2125
  }
2087
- `, oo = p.div`
2126
+ `, co = m.div`
2088
2127
  & > span,
2089
2128
  & > li {
2090
2129
  cursor: pointer;
2091
2130
  &:hover {
2092
- ${ge}
2131
+ ${he}
2093
2132
  }
2094
2133
  }
2095
2134
 
2096
2135
  &.open {
2097
2136
  & > span {
2098
- ${ge}
2137
+ ${he}
2099
2138
  }
2100
2139
  }
2101
2140
 
@@ -2107,7 +2146,7 @@ const wr = p.div`
2107
2146
  }
2108
2147
  }
2109
2148
  }
2110
- `, Fr = p.div`
2149
+ `, zr = m.div`
2111
2150
  position: absolute;
2112
2151
  top: 100%;
2113
2152
  left: 0px;
@@ -2116,7 +2155,7 @@ const wr = p.div`
2116
2155
 
2117
2156
  z-index: 200;
2118
2157
  padding-top: 4px;
2119
- `, Cr = p.ul`
2158
+ `, Rr = m.ul`
2120
2159
  display: flex;
2121
2160
  flex-direction: column;
2122
2161
  gap: var(--base-gap-small);
@@ -2131,46 +2170,46 @@ const wr = p.div`
2131
2170
 
2132
2171
  max-height: 500px;
2133
2172
  overflow: auto;
2134
- `, Ar = p.li`
2173
+ `, Wr = m.li`
2135
2174
  padding: var(--base-gap-small);
2136
2175
  border-radius: var(--border-radius-m);
2137
2176
  color: var(--md-sys-color-on-surface);
2138
2177
  min-width: max-content;
2139
2178
  width: 100%;
2140
- `, Nr = ee(
2141
- ({ children: e, segment: t, isOpen: r, scope: o, projectName: c, ...n }, a) => {
2142
- const { openSlideOut: d } = re(), h = t?.type !== "product" && t?.type !== "project", i = () => {
2143
- if (!h) return;
2144
- const { type: v, id: m } = t || {};
2145
- !v || v === "project" || v === "product" || !m || d({
2179
+ `, Lr = te(
2180
+ ({ children: e, segment: t, isOpen: o, scope: r, projectName: g, ...c }, a) => {
2181
+ const { openSlideOut: d } = ae(), p = t?.type !== "product" && t?.type !== "project", i = () => {
2182
+ if (!p) return;
2183
+ const { type: v, id: h } = t || {};
2184
+ !v || v === "project" || v === "product" || !h || d({
2146
2185
  entityType: v,
2147
- entityId: m,
2148
- projectName: c
2186
+ entityId: h,
2187
+ projectName: g
2149
2188
  });
2150
- }, u = (v) => [
2189
+ }, f = (v) => [
2151
2190
  {
2152
2191
  label: `ID: ${v}`,
2153
2192
  icon: "content_copy",
2154
- command: () => oe(v)
2193
+ command: () => re(v)
2155
2194
  }
2156
- ], [f] = mt();
2157
- return /* @__PURE__ */ g(
2158
- oo,
2195
+ ], [s] = wt();
2196
+ return /* @__PURE__ */ u(
2197
+ co,
2159
2198
  {
2160
2199
  onClick: i,
2161
2200
  onContextMenu: (v) => {
2162
2201
  if (!t) return;
2163
- const m = u(t.id);
2164
- f(v, m);
2202
+ const h = f(t.id);
2203
+ s(v, h);
2165
2204
  },
2166
- className: ut({ link: h, open: r }),
2167
- ...n,
2205
+ className: xt({ link: p, open: o }),
2206
+ ...c,
2168
2207
  ref: a,
2169
2208
  children: e
2170
2209
  }
2171
2210
  );
2172
2211
  }
2173
- ), ro = p.div`
2212
+ ), po = m.div`
2174
2213
  position: relative;
2175
2214
  width: 100%;
2176
2215
  height: 52px;
@@ -2260,7 +2299,15 @@ const wr = p.div`
2260
2299
  border: none;
2261
2300
  border-color: transparent;
2262
2301
  }
2263
- `, ao = p.img`
2302
+
2303
+ /* the hover-scrub filmstrip replaces the static image */
2304
+ &[data-filmstrip-active] {
2305
+ img,
2306
+ .icon {
2307
+ visibility: hidden;
2308
+ }
2309
+ }
2310
+ `, uo = m.img`
2264
2311
  width: 100%;
2265
2312
  height: 100%;
2266
2313
  object-fit: contain;
@@ -2272,63 +2319,71 @@ const wr = p.div`
2272
2319
  inset: 0;
2273
2320
 
2274
2321
  transition: scale 0.2s, opacity 0.2s;
2275
- `, no = ({
2322
+ `, mo = ({
2276
2323
  projectName: e = "",
2277
2324
  entityType: t = "",
2278
- entityId: r = "",
2279
- icon: o,
2280
- color: c,
2281
- thumbnailHash: n,
2325
+ entityId: o = "",
2326
+ icon: r,
2327
+ color: g,
2328
+ thumbnailHash: c,
2282
2329
  isLoading: a,
2283
2330
  shimmer: d,
2284
- className: h,
2331
+ className: p,
2285
2332
  disabled: i,
2286
- src: u,
2287
- hoverIcon: f,
2288
- showBorder: s = !0,
2289
- ...v
2333
+ src: f,
2334
+ hoverIcon: s,
2335
+ showBorder: n = !0,
2336
+ filmstrip: v,
2337
+ ...h
2290
2338
  }) => {
2291
- const m = t === "project", w = ["product"].includes(t), T = m ? !!e : !!r;
2292
- let S = "";
2293
- t && (n || m) && T && (u ? S = u : S = gt({ projectName: e, entityType: t, entityId: r, thumbnailHash: n }) ?? "");
2294
- const [b, k] = O(!1), [C, E] = O(!1);
2295
- return q(() => {
2296
- if (S === "") {
2297
- E(!0), k(!0);
2339
+ const x = t === "project", E = ["product"].includes(t), S = x ? !!e : !!o;
2340
+ let y = "";
2341
+ t && (c || x) && S && (f ? y = f : y = yt({ projectName: e, entityType: t, entityId: o, thumbnailHash: c }) ?? "");
2342
+ const [k, j] = O(!1), [w, T] = O(!1);
2343
+ return G(() => {
2344
+ if (y === "") {
2345
+ T(!0), j(!0);
2298
2346
  return;
2299
2347
  }
2300
- E(!1), k(!1);
2301
- }, [S]), /* @__PURE__ */ R(
2302
- ro,
2348
+ T(!1), j(!1);
2349
+ }, [y]), /* @__PURE__ */ z(
2350
+ po,
2303
2351
  {
2304
- className: U(h, "thumbnail", {
2305
- loading: d && (a || !C),
2306
- loaded: C,
2307
- error: b,
2308
- clickable: !!v.onClick,
2309
- border: s
2352
+ className: W(p, "thumbnail", {
2353
+ loading: d && (a || !w),
2354
+ loaded: w,
2355
+ error: k,
2356
+ clickable: !!h.onClick,
2357
+ border: n
2310
2358
  }),
2311
- ...v,
2359
+ ...h,
2312
2360
  children: [
2313
- (!a || !C) && !i && /* @__PURE__ */ g(V, { style: { color: c || void 0 }, icon: o || "image", className: "type-icon" }),
2314
- t && e && !w && T && /* @__PURE__ */ g(
2315
- ao,
2361
+ (!a || !w) && !i && /* @__PURE__ */ u(V, { style: { color: g || void 0 }, icon: r || "image", className: "type-icon" }),
2362
+ t && e && !E && S && /* @__PURE__ */ u(
2363
+ uo,
2316
2364
  {
2317
- alt: `Entity thumbnail ${r || e}`,
2318
- src: S,
2365
+ alt: `Entity thumbnail ${o || e}`,
2366
+ src: y,
2319
2367
  onLoad: () => {
2320
- E(!0), k(!1);
2368
+ T(!0), j(!1);
2321
2369
  },
2322
2370
  onError: () => {
2323
- E(!0), k(!0);
2371
+ T(!0), j(!0);
2324
2372
  }
2325
2373
  }
2326
2374
  ),
2327
- f && /* @__PURE__ */ g(V, { icon: f, className: "hover-icon" })
2375
+ s && /* @__PURE__ */ u(V, { icon: s, className: "hover-icon" }),
2376
+ v && !a && !i && /* @__PURE__ */ u(
2377
+ ke,
2378
+ {
2379
+ src: bt({ projectName: e, entityType: t, entityId: o, thumbnailHash: c }),
2380
+ fit: "contain"
2381
+ }
2382
+ )
2328
2383
  ]
2329
2384
  }
2330
2385
  );
2331
- }, io = p.div`
2386
+ }, go = m.div`
2332
2387
  display: flex;
2333
2388
  z-index: 10;
2334
2389
  height: 100%;
@@ -2349,7 +2404,7 @@ const wr = p.div`
2349
2404
  font-size: 24px;
2350
2405
  }
2351
2406
 
2352
- ${({ $length: e }) => e > 1 && xe`
2407
+ ${({ $length: e }) => e > 1 && we`
2353
2408
  :not(:last-child) {
2354
2409
  box-shadow: 0 0 4px 0px black;
2355
2410
  }
@@ -2365,131 +2420,133 @@ const wr = p.div`
2365
2420
  object-fit: cover;
2366
2421
  }
2367
2422
  }
2368
- `, $r = ({
2423
+ `, Pr = ({
2369
2424
  thumbnails: e = [],
2370
2425
  isLoading: t,
2371
- className: r,
2372
- style: o,
2426
+ className: o,
2427
+ style: r,
2428
+ filmstrip: g,
2373
2429
  ...c
2374
2430
  }) => {
2375
- const { onContextMenu: n } = Se(st);
2431
+ const { onContextMenu: a } = Ae(ut);
2376
2432
  e = e.slice(0, 5);
2377
- const a = e.length > 1;
2378
- return e.length ? /* @__PURE__ */ g(
2379
- io,
2433
+ const d = e.length > 1;
2434
+ return e.length ? /* @__PURE__ */ u(
2435
+ go,
2380
2436
  {
2381
2437
  $length: e.length,
2382
- className: U("stacked-thumbnails", r, { stacking: a }),
2438
+ className: W("stacked-thumbnails", o, { stacking: d }),
2383
2439
  children: e.map(
2384
- (d, h) => d ? /* @__PURE__ */ g(
2385
- no,
2440
+ (p, i) => p ? /* @__PURE__ */ u(
2441
+ mo,
2386
2442
  {
2387
- projectName: d.projectName,
2388
- entityType: d.type,
2389
- entityId: d.id,
2390
- icon: d.icon,
2391
- color: d.color,
2392
- style: { ...o, zIndex: -h },
2393
- thumbnailHash: d.thumbnailHash,
2443
+ projectName: p.projectName,
2444
+ entityType: p.type,
2445
+ entityId: p.id,
2446
+ icon: p.icon,
2447
+ color: p.color,
2448
+ style: { ...r, zIndex: -i },
2449
+ thumbnailHash: p.thumbnailHash,
2394
2450
  isLoading: t,
2395
- src: d.src,
2396
- onContextMenu: n,
2451
+ src: p.src,
2452
+ filmstrip: g && !d,
2453
+ onContextMenu: a,
2397
2454
  ...c
2398
2455
  },
2399
- d.id || d.src || h
2456
+ p.id || p.src || i
2400
2457
  ) : null
2401
2458
  )
2402
2459
  }
2403
2460
  ) : null;
2404
- }, Mr = ee(
2405
- ({ entities: e, entityType: t, onWatchersUpdate: r, userName: o, ...c }, n) => {
2406
- const a = e.map((f) => ({
2407
- entityId: f.id,
2461
+ }, Br = te(
2462
+ ({ entities: e, entityType: t, onWatchersUpdate: o, userName: r, ...g }, c) => {
2463
+ const a = e.map((s) => ({
2464
+ entityId: s.id,
2408
2465
  entityType: t,
2409
- projectName: f.projectName
2410
- })), { data: d = [] } = rt(
2466
+ projectName: s.projectName
2467
+ })), { data: d = [] } = lt(
2411
2468
  {
2412
2469
  entities: a
2413
2470
  },
2414
2471
  { skip: !e.length }
2415
- ), h = Array.from(new Set(d.flatMap((f) => f.watchers))), [i] = at(), u = async (f) => {
2416
- const s = f.filter((w) => !h.includes(w)), v = h.filter((w) => !f.includes(w)), m = d.map((w) => {
2417
- const T = w.watchers.filter((S) => !v.includes(S));
2418
- return T.push(...s), {
2419
- ...w,
2420
- watchers: T
2472
+ ), p = Array.from(new Set(d.flatMap((s) => s.watchers))), [i] = ct(), f = async (s) => {
2473
+ const n = s.filter((x) => !p.includes(x)), v = p.filter((x) => !s.includes(x)), h = d.map((x) => {
2474
+ const E = x.watchers.filter((S) => !v.includes(S));
2475
+ return E.push(...n), {
2476
+ ...x,
2477
+ watchers: E
2421
2478
  };
2422
2479
  });
2423
2480
  try {
2424
- await i({ entities: m }).unwrap(), r && r(s, v);
2481
+ await i({ entities: h }).unwrap(), o && o(n, v);
2425
2482
  } catch {
2426
- te.error("Failed to update watchers");
2483
+ oe.error("Failed to update watchers");
2427
2484
  }
2428
2485
  };
2429
- return /* @__PURE__ */ g(
2430
- ze,
2486
+ return /* @__PURE__ */ u(
2487
+ We,
2431
2488
  {
2432
2489
  align: "right",
2433
- ...c,
2434
- options: _e(c.options, h),
2435
- value: h,
2436
- currentUser: o,
2437
- onChange: u,
2438
- ref: n,
2490
+ ...g,
2491
+ options: Ge(g.options, p),
2492
+ value: p,
2493
+ currentUser: r,
2494
+ onChange: f,
2495
+ ref: c,
2439
2496
  buttonProps: { "data-tooltip": "Watchers" }
2440
2497
  }
2441
2498
  );
2442
2499
  }
2443
2500
  );
2444
2501
  export {
2445
- nr as A,
2446
- rr as B,
2447
- vr as C,
2448
- fr as D,
2449
- dr as E,
2450
- Dr as F,
2451
- er as G,
2452
- Yo as H,
2453
- pr as I,
2454
- lr as J,
2455
- cr as K,
2456
- wr as L,
2457
- Fr as M,
2458
- ur as N,
2459
- tr as O,
2460
- br as P,
2461
- ir as Q,
2462
- xr as R,
2463
- jr as S,
2464
- ar as T,
2465
- yr as U,
2466
- mr as V,
2467
- Mr as W,
2468
- sr as X,
2469
- kt as a,
2470
- Jo as b,
2471
- St as c,
2472
- Tt as d,
2502
+ ur as A,
2503
+ dr as B,
2504
+ Sr as C,
2505
+ Er as D,
2506
+ vr as E,
2507
+ Mr as F,
2508
+ sr as G,
2509
+ ir as H,
2510
+ yr as I,
2511
+ hr as J,
2512
+ fr as K,
2513
+ jr as L,
2514
+ zr as M,
2515
+ br as N,
2516
+ lr as O,
2517
+ Fr as P,
2518
+ mr as Q,
2519
+ Ar as R,
2520
+ $r as S,
2521
+ pr as T,
2522
+ Tr as U,
2523
+ xr as V,
2524
+ Br as W,
2525
+ gr as X,
2526
+ Dr as a,
2527
+ Cr as b,
2528
+ me as c,
2529
+ wr as d,
2473
2530
  kr as e,
2474
- Zo as f,
2475
- Er as g,
2476
- ue as h,
2477
- to as i,
2478
- gr as j,
2479
- hr as k,
2480
- Sr as l,
2481
- Cr as m,
2482
- Nr as n,
2483
- Ar as o,
2484
- Tr as p,
2485
- Mt as q,
2486
- Rt as r,
2487
- Xo as s,
2488
- ke as t,
2489
- vt as u,
2490
- It as v,
2491
- $r as w,
2492
- no as x,
2493
- Et as y,
2494
- or as z
2531
+ Nr as f,
2532
+ Rr as g,
2533
+ Lr as h,
2534
+ Wr as i,
2535
+ Ur as j,
2536
+ ar as k,
2537
+ St as l,
2538
+ Dt as m,
2539
+ rr as n,
2540
+ Nt as o,
2541
+ Ut as p,
2542
+ Bt as q,
2543
+ It as r,
2544
+ nr as s,
2545
+ Se as t,
2546
+ lo as u,
2547
+ Gt as v,
2548
+ Pr as w,
2549
+ mo as x,
2550
+ Ct as y,
2551
+ cr as z
2495
2552
  };