@ynput/ayon-frontend-shared 0.6.8 → 0.7.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 (67) hide show
  1. package/dist/ContextMenu.es.js +44 -27
  2. package/dist/DetailsPanel.es.js +225 -224
  3. package/dist/Feed.es.js +64 -58
  4. package/dist/ListTable.es.js +423 -423
  5. package/dist/NewEntity.es.js +44 -43
  6. package/dist/ProjectTreeTable.es.js +3517 -3378
  7. package/dist/Slicer.es.js +301 -276
  8. package/dist/Views.es.js +366 -352
  9. package/dist/api.es.js +428 -413
  10. package/dist/chunks/Actions.es.js +18 -17
  11. package/dist/chunks/ColumnDropIndicator.es.js +21 -20
  12. package/dist/chunks/ColumnHeaderMenuUI.es.js +2 -2
  13. package/dist/chunks/ContextMenuContextInstance.es.js +4 -3
  14. package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +53 -41
  15. package/dist/chunks/DetailsDialog.es.js +26 -24
  16. package/dist/chunks/EmptyPlaceholder.es.js +3 -3
  17. package/dist/chunks/EmptyPlaceholderFlex.styled.es.js +40 -0
  18. package/dist/chunks/EntityPath.es.js +60 -59
  19. package/dist/chunks/EntityPickerDialog.es.js +88 -83
  20. package/dist/chunks/EntityTooltip.es.js +15 -14
  21. package/dist/chunks/EntityUpdatesContext.es.js +11 -11
  22. package/dist/chunks/Feed.es.js +1072 -1088
  23. package/dist/chunks/FilterErrorActions.es.js +4 -3
  24. package/dist/chunks/Menu.es.js +633 -289
  25. package/dist/chunks/MenuContext.es.js +1 -1
  26. package/dist/chunks/MetaWidget.es.js +2449 -2199
  27. package/dist/chunks/PlayableIcon.es.js +128 -88
  28. package/dist/chunks/ProjectContext.es.js +6 -6
  29. package/dist/chunks/RepresentationsList.es.js +1 -1
  30. package/dist/chunks/ReviewablesSelector.es.js +627 -611
  31. package/dist/chunks/SimpleForm.es.js +11 -10
  32. package/dist/chunks/SimpleTable.es.js +386 -363
  33. package/dist/chunks/Slicer.es.js +956 -823
  34. package/dist/chunks/{DeleteEntitiesContextInstance.es.js → TableExportContextInstance.es.js} +190 -186
  35. package/dist/chunks/TableSettingsFallback.es.js +4 -3
  36. package/dist/chunks/ThumbnailSimple.es.js +100 -99
  37. package/dist/chunks/VideoPlayer.es.js +1 -1
  38. package/dist/chunks/Watchers.es.js +224 -223
  39. package/dist/chunks/getBundleMode.es.js +33 -25
  40. package/dist/chunks/getEntityTypeIcon.es.js +5 -4
  41. package/dist/chunks/getUris.es.js +3873 -3736
  42. package/dist/chunks/realtimeUpdatesUtils.es.js +91 -82
  43. package/dist/chunks/searchTerms.es.js +621 -499
  44. package/dist/chunks/sortLists.es.js +22 -0
  45. package/dist/chunks/useAttributeEnums.es.js +43 -43
  46. package/dist/chunks/useDateRangeFilter.es.js +85 -59
  47. package/dist/chunks/useHierarchySelection.es.js +6 -5
  48. package/dist/chunks/useLoadModule.es.js +24 -23
  49. package/dist/chunks/viewUpdateHelper.es.js +41 -40
  50. package/dist/components.es.js +963 -891
  51. package/dist/context.es.js +528 -501
  52. package/dist/hooks.es.js +15 -15
  53. package/dist/index.es.js +6 -6
  54. package/dist/types/ContextMenu.d.ts +4 -1
  55. package/dist/types/Feed.d.ts +55 -1
  56. package/dist/types/ListTable.d.ts +1 -1
  57. package/dist/types/ProjectTreeTable.d.ts +128 -15
  58. package/dist/types/SimpleTable.d.ts +2 -1
  59. package/dist/types/Slicer.d.ts +26 -1
  60. package/dist/types/Views.d.ts +2 -0
  61. package/dist/types/api.d.ts +2359 -590
  62. package/dist/types/components.d.ts +542 -4
  63. package/dist/types/context.d.ts +94 -2
  64. package/dist/types/util.d.ts +58 -0
  65. package/dist/util.es.js +141 -129
  66. package/package.json +2 -2
  67. package/dist/chunks/MenuItem.es.js +0 -420
@@ -1,181 +1,182 @@
1
- import { C as Ye, S as $e, A as ke, a as Ke, T as je, D as Xe, b as Qe, c as Je, d as Se, e as Oe, f as qe, g as Ze, h as et, M as tt, F as st, i as at, j as ot, k as nt, l as rt } from "./chunks/ReviewablesSelector.es.js";
2
- import { m as ua, n as da, o as pa, p as fa, q as ma, r as ha, s as ga, E as ba, t as wa, u as ya, v as va, w as Ea, x as Ca, G as ka, y as Sa, L as Oa, P as Da, z as Va, R as Ta, B as Ra, H as Ia, I as Aa, J as Fa, K as Pa, N as _a, O as xa, Q as La, U as Na, V as Ma, W as Ba, X as Ua, Y as Wa, Z as Ha } from "./chunks/ReviewablesSelector.es.js";
3
- import { jsxs as G, jsx as C } from "react/jsx-runtime";
4
- import { useState as _, useRef as oe, useCallback as ee, useEffect as Y, useMemo as me, useContext as lt } from "react";
5
- import { matchSorter as De } from "match-sorter";
6
- import { InputText as it, Icon as le, Section as ct, SEARCH_FILTER_ID as ut } from "@ynput/ayon-react-components";
7
- import ue from "clsx";
8
- import { B as za, a as Ya, S as $a } from "./chunks/SimpleForm.es.js";
1
+ import { C as $e, S as ze, A as ke, a as Ke, T as je, D as Xe, b as Je, c as Qe, d as Oe, e as Se, f as qe, g as Ze, h as et, M as tt, F as at, i as st, j as ot, k as nt, l as rt } from "./chunks/ReviewablesSelector.es.js";
2
+ import { m as cs, n as ds, o as ps, p as fs, q as ms, r as hs, s as gs, E as bs, t as ws, u as ys, v as vs, w as Es, x as Cs, G as ks, y as Os, L as Ss, P as Ts, z as Ds, R as Vs, B as Rs, H as Is, I as As, J as xs, K as _s, N as Fs, O as Ps, Q as Ns, U as Ms, V as Ls, W as Bs, X as Us, Y as Gs, Z as Ws } from "./chunks/ReviewablesSelector.es.js";
3
+ import { jsxs as H, jsx as C } from "react/jsx-runtime";
4
+ import { useState as F, useRef as oe, useCallback as ee, useEffect as z, useMemo as me, useContext as lt } from "react";
5
+ import { matchSorter as Te } from "match-sorter";
6
+ import { InputText as it, Icon as ie, Section as ut, SEARCH_FILTER_ID as ct } from "@ynput/ayon-react-components";
7
+ import ce from "clsx";
8
+ import { B as Ys, a as $s, S as zs } from "./chunks/SimpleForm.es.js";
9
9
  import { d as dt, P as pt } from "./chunks/MetaWidget.es.js";
10
- import { A as ja, i as Xa, D as Qa, E as Ja, L as qa, j as Za, k as eo, l as to, m as so } from "./chunks/MetaWidget.es.js";
10
+ import { A as js, i as Xs, D as Js, E as Qs, L as qs, j as Zs, k as eo, l as to, m as ao } from "./chunks/MetaWidget.es.js";
11
11
  import { createPortal as ft } from "react-dom";
12
- import { format as re, parseISO as Le, isValid as Ne } from "date-fns";
13
- import { B as Ve, b as Me, c as we, g as ye } from "./chunks/PlayableIcon.es.js";
14
- import { C as oo, a as no, e as ro, D as lo, N as io, U as co, h as uo, i as po, d as fo, f as mo, j as ho } from "./chunks/PlayableIcon.es.js";
15
- import { d as Be, x as mt, a as ht, e as gt } from "./chunks/DeleteEntitiesContextInstance.es.js";
16
- import { f as bo, D as wo, R as yo } from "./chunks/DeleteEntitiesContextInstance.es.js";
17
- import { p as bt, a as Te } from "./chunks/DeleteEntitiesConfirmDialog.es.js";
18
- import { D as Eo, b as Co, c as ko, d as So, e as Oo, s as Do } from "./chunks/DeleteEntitiesConfirmDialog.es.js";
19
- import { D as To } from "./chunks/DetailsDialog.es.js";
12
+ import { format as le, parseISO as Ne, isValid as Me } from "date-fns";
13
+ import { B as De, e as Le, g as we, h as ye } from "./chunks/PlayableIcon.es.js";
14
+ import { $ as oo, j as no, k as ro, l as lo, m as io, n as uo, o as co, q as po, A as fo, C as mo, a as ho, r as go, D as bo, s as wo, t as yo, F as vo, I as Eo, u as Co, v as ko, w as Oo, x as So, y as To, M as Do, z as Vo, E as Ro, N as Io, U as Ao, Y as xo, G as _o, H as Fo, J as Po, K as No, d as Mo, f as Lo, L as Bo, O as Uo, P as Go, Q as Wo, R as Ho, S as Yo, T as $o, V as zo, W as Ko, X as jo, p as Xo, Z as Jo } from "./chunks/PlayableIcon.es.js";
15
+ import { d as Be, x as mt, a as ht, e as gt } from "./chunks/TableExportContextInstance.es.js";
16
+ import { f as qo, D as Zo, R as en } from "./chunks/TableExportContextInstance.es.js";
17
+ import { p as bt, a as Ve } from "./chunks/DeleteEntitiesConfirmDialog.es.js";
18
+ import { D as an, b as sn, c as on, d as nn, e as rn, s as ln } from "./chunks/DeleteEntitiesConfirmDialog.es.js";
19
+ import { D as cn } from "./chunks/DetailsDialog.es.js";
20
20
  import { q as wt, r as yt, n as vt } from "./chunks/Watchers.es.js";
21
- import { s as Io, t as Ao, v as Fo, R as Po, c as _o, b as xo, w as Lo, x as No, W as Mo, u as Bo } from "./chunks/Watchers.es.js";
22
- import { E as Wo, P as Ho } from "./chunks/EmptyPlaceholder.es.js";
23
- import { E as zo, b as Yo, c as $o, d as Ko, a as jo, M as Xo, e as Qo } from "./chunks/Menu.es.js";
24
- import { I as qo } from "./chunks/InfoMessage.es.js";
25
- import { J as en } from "./chunks/JsonViewer.es.js";
26
- import { E as sn, a as an, R as on, g as nn } from "./chunks/EntityPath.es.js";
27
- import { E as ln, a as cn } from "./chunks/EntityTooltip.es.js";
28
- import { bk as Re, bq as Et, bs as Ct } from "./chunks/searchTerms.es.js";
29
- import { bL as kt, bQ as St, cv as Ot, aK as Dt, aP as Vt, bG as Tt, bn as Rt, dm as It, c8 as At, bO as Ft } from "./chunks/getUris.es.js";
21
+ import { s as pn, t as fn, v as mn, R as hn, c as gn, b as bn, w as wn, x as yn, W as vn, u as En } from "./chunks/Watchers.es.js";
22
+ import { E as kn, P as On } from "./chunks/EmptyPlaceholder.es.js";
23
+ import { E as Tn, a as Dn } from "./chunks/EmptyPlaceholderFlex.styled.es.js";
24
+ import { I as Rn } from "./chunks/InfoMessage.es.js";
25
+ import { J as An } from "./chunks/JsonViewer.es.js";
26
+ import { E as _n, a as Fn, R as Pn, g as Nn } from "./chunks/EntityPath.es.js";
27
+ import { E as Ln, a as Bn } from "./chunks/EntityTooltip.es.js";
28
+ import { bB as Re, bA as Et, bD as Ct } from "./chunks/searchTerms.es.js";
29
+ import { bO as kt, bT as Ot, cA as St, aN as Tt, aS as Dt, bJ as Vt, bq as Rt, ds as It, cd as At, bR as xt } from "./chunks/getUris.es.js";
30
30
  export * from "primereact/confirmdialog";
31
31
  import "@module-federation/enhanced/runtime";
32
32
  import { toast as he } from "react-toastify";
33
- import { isEmpty as Pt, upperFirst as de } from "lodash";
33
+ import { isEmpty as _t, upperFirst as de } from "lodash";
34
34
  import "uuid";
35
- import { a as _t } from "./chunks/afterStartup.es.js";
35
+ import { a as Ft } from "./chunks/afterStartup.es.js";
36
36
  import "semver";
37
37
  import "./chunks/ContextMenuContextInstance.es.js";
38
38
  import "react-redux";
39
- import { F as xt } from "./chunks/ColumnDropIndicator.styled.es.js";
40
- import { C as pn, S as fn, b as mn, u as hn } from "./chunks/ColumnDropIndicator.styled.es.js";
41
- import { F as bn } from "./chunks/FilterErrorActions.es.js";
39
+ import { useSearchParams as Pt, useLocation as Nt, useNavigate as Mt, useParams as Lt } from "react-router-dom";
40
+ import { F as Bt } from "./chunks/ColumnDropIndicator.styled.es.js";
41
+ import { C as Wn, S as Hn, b as Yn, u as $n } from "./chunks/ColumnDropIndicator.styled.es.js";
42
+ import { F as Kn } from "./chunks/FilterErrorActions.es.js";
42
43
  import "lexical";
43
44
  import "@lexical/markdown";
44
- import "@lexical/react/LexicalBlockWithAlignableContents";
45
- import "@lexical/react/LexicalDecoratorBlockNode";
46
45
  import "@lexical/code";
47
46
  import "@lexical/list";
48
47
  import "@lexical/rich-text";
49
48
  import "@lexical/selection";
50
49
  import "@lexical/utils";
51
- import { T as yn } from "./chunks/TableSettingsFallback.es.js";
52
- import { a as Lt, b as Nt } from "./chunks/viewUpdateHelper.es.js";
53
- import { useSearchParams as Mt, useLocation as Bt, useNavigate as Ut, useParams as Wt } from "react-router-dom";
54
- import { g as Ht, c as Gt, b as zt, d as Yt } from "./chunks/Slicer.es.js";
55
- import { l as En } from "./chunks/Slicer.es.js";
56
- import { Splitter as $t, SplitterPanel as Ie } from "primereact/splitter";
57
- import { g as ae } from "./chunks/getEntityTypeIcon.es.js";
58
- import { g as K } from "./chunks/iconUtils.es.js";
59
- import { u as kn } from "./chunks/useDateRangeFilter.es.js";
60
- import { C as On, T as Dn } from "./chunks/ThumbnailSimple.es.js";
61
- import { S as Tn } from "./chunks/SimpleFormDialog.es.js";
62
- import { T as In } from "./chunks/EntityPickerDialog.es.js";
50
+ import "@lexical/react/LexicalBlockWithAlignableContents";
51
+ import "@lexical/react/LexicalDecoratorBlockNode";
52
+ import { m as Xn, r as Jn, a as Qn, u as qn } from "./chunks/useDateRangeFilter.es.js";
53
+ import { T as er } from "./chunks/TableSettingsFallback.es.js";
54
+ import { a as Ut, b as Gt } from "./chunks/viewUpdateHelper.es.js";
55
+ import { h as Wt, c as Ht, b as Yt, e as $t } from "./chunks/Slicer.es.js";
56
+ import { p as ar, q as sr } from "./chunks/Slicer.es.js";
57
+ import { Splitter as zt, SplitterPanel as Ie } from "primereact/splitter";
58
+ import { g as se } from "./chunks/getEntityTypeIcon.es.js";
59
+ import { g as $ } from "./chunks/iconUtils.es.js";
60
+ import { C as nr, T as rr } from "./chunks/ThumbnailSimple.es.js";
61
+ import { S as ir } from "./chunks/SimpleFormDialog.es.js";
62
+ import { T as cr } from "./chunks/EntityPickerDialog.es.js";
63
63
  import { e as Kt } from "./chunks/extractVersionFromFilename.es.js";
64
- import { b as jt, c as Xt, v as Qt } from "./chunks/versionUploadHelpers.es.js";
65
- import { p as Jt } from "./chunks/parseFilename.es.js";
64
+ import { b as jt, c as Xt, v as Jt } from "./chunks/versionUploadHelpers.es.js";
65
+ import { p as Qt } from "./chunks/parseFilename.es.js";
66
66
  import { V as qt } from "./chunks/VersionUploadContextInstance.es.js";
67
- import { u as Fn, a as Pn } from "./chunks/VersionUploadContextInstance.es.js";
68
- import { C as xn } from "./chunks/ColumnHeaderMenuUI.es.js";
69
- const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
67
+ import { u as pr, a as fr } from "./chunks/VersionUploadContextInstance.es.js";
68
+ import { b as hr, c as gr, a as br, M as wr, d as yr } from "./chunks/Menu.es.js";
69
+ import { C as Er } from "./chunks/ColumnHeaderMenuUI.es.js";
70
+ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
70
71
  shareOptions: t,
71
72
  existingAccess: e,
72
73
  owner: i,
73
- placeholder: c = "Add people or access groups",
74
+ placeholder: u = "Add people or access groups",
74
75
  disabled: o = !1,
75
- mode: s = "internal",
76
- onSelectOption: a,
76
+ mode: a = "internal",
77
+ onSelectOption: s,
77
78
  pt: h,
78
79
  ...l
79
80
  }) => {
80
- const [f, n] = _(""), [E, y] = _(!1), [D, m] = _(-1), A = oe(null), R = t.filter((V) => !e.includes(V.value)).toSorted((V, b) => {
81
- const v = (p) => p.value === "__everyone__" ? 0 : p.value.startsWith("__") ? 1 : p.value.startsWith("team:") ? 2 : p.value.startsWith("group:") ? 3 : p.value.startsWith("user:") ? 4 : 5, O = v(V), r = v(b);
82
- return O !== r ? O - r : V.label.localeCompare(b.label);
83
- }), g = (f ? De(R, f, {
81
+ const [m, n] = F(""), [E, v] = F(!1), [T, f] = F(-1), A = oe(null), R = t.filter((D) => !e.includes(D.value)).toSorted((D, b) => {
82
+ const w = (p) => p.value === "__everyone__" ? 0 : p.value.startsWith("__") ? 1 : p.value.startsWith("team:") ? 2 : p.value.startsWith("group:") ? 3 : p.value.startsWith("user:") ? 4 : 5, S = w(D), r = w(b);
83
+ return S !== r ? S - r : D.label.localeCompare(b.label);
84
+ }), g = (m ? Te(R, m, {
84
85
  keys: ["name", "label", "value"],
85
- threshold: De.rankings.CONTAINS
86
- }) : R).slice(0, Ae), T = Zt.test(f) && !t.some((V) => V.name === f) && s === "external", I = () => {
87
- y(!0), m(-1);
88
- }, N = () => {
86
+ threshold: Te.rankings.CONTAINS
87
+ }) : R).slice(0, Ae), V = Zt.test(m) && !t.some((D) => D.name === m) && a === "external", I = () => {
88
+ v(!0), f(-1);
89
+ }, M = () => {
89
90
  setTimeout(() => {
90
- y(!1), m(-1);
91
+ v(!1), f(-1);
91
92
  }, 200);
92
- }, L = (V) => {
93
- n(V.target.value), m(-1), y(!0);
94
- }, M = (V) => {
93
+ }, N = (D) => {
94
+ n(D.target.value), f(-1), v(!0);
95
+ }, L = (D) => {
95
96
  if (!E || g.length === 0) {
96
- V.key === "Enter" && g.length > 0 && (V.preventDefault(), z(g[0]));
97
+ D.key === "Enter" && g.length > 0 && (D.preventDefault(), Y(g[0]));
97
98
  return;
98
99
  }
99
- switch (V.key) {
100
+ switch (D.key) {
100
101
  case "ArrowDown":
101
- V.preventDefault(), m((b) => b < g.length - 1 ? b + 1 : b);
102
+ D.preventDefault(), f((b) => b < g.length - 1 ? b + 1 : b);
102
103
  break;
103
104
  case "ArrowUp":
104
- V.preventDefault(), m((b) => b > 0 ? b - 1 : -1);
105
+ D.preventDefault(), f((b) => b > 0 ? b - 1 : -1);
105
106
  break;
106
107
  case "Enter":
107
- V.preventDefault(), D >= 0 && D < g.length ? z(g[D]) : g.length > 0 && z(g[0]);
108
+ D.preventDefault(), T >= 0 && T < g.length ? Y(g[T]) : g.length > 0 && Y(g[0]);
108
109
  break;
109
110
  case "Escape":
110
- y(!1), m(-1), A.current?.blur(), V.stopPropagation();
111
+ v(!1), f(-1), A.current?.blur(), D.stopPropagation();
111
112
  break;
112
113
  }
113
- }, z = (V) => {
114
- a(V, 10), n(""), y(!1), m(-1), A.current?.focus();
115
- }, $ = () => {
116
- a(
114
+ }, Y = (D) => {
115
+ s(D, 10), n(""), v(!1), f(-1), A.current?.focus();
116
+ }, K = () => {
117
+ s(
117
118
  {
118
- name: f,
119
- label: f,
120
- value: f,
119
+ name: m,
120
+ label: m,
121
+ value: m,
121
122
  shareType: "guest"
122
123
  },
123
124
  10
124
- ), n(""), y(!1), m(-1), A.current?.focus();
125
+ ), n(""), v(!1), f(-1), A.current?.focus();
125
126
  };
126
- return /* @__PURE__ */ G(Ye, { ...l, children: [
127
+ return /* @__PURE__ */ H($e, { ...l, children: [
127
128
  /* @__PURE__ */ C(
128
129
  it,
129
130
  {
130
131
  ref: A,
131
- value: f,
132
- placeholder: c,
132
+ value: m,
133
+ placeholder: u,
133
134
  disabled: o,
134
135
  onFocus: I,
135
136
  onClick: I,
136
- onBlur: N,
137
- onChange: L,
138
- onKeyDown: M,
137
+ onBlur: M,
138
+ onChange: N,
139
+ onKeyDown: L,
139
140
  style: { width: "100%" }
140
141
  }
141
142
  ),
142
- E && (g.length > 0 || T) && /* @__PURE__ */ G(
143
- $e,
143
+ E && (g.length > 0 || V) && /* @__PURE__ */ H(
144
+ ze,
144
145
  {
145
146
  ...h?.list,
146
- className: ue(h?.list?.className, { "no-owner": !i }),
147
+ className: ce(h?.list?.className, { "no-owner": !i }),
147
148
  children: [
148
- g.map((V, b) => /* @__PURE__ */ C(
149
+ g.map((D, b) => /* @__PURE__ */ C(
149
150
  ke,
150
151
  {
151
- name: V.name,
152
- label: V.label,
153
- shareType: V.shareType,
152
+ name: D.name,
153
+ label: D.label,
154
+ shareType: D.shareType,
154
155
  isOwner: !1,
155
156
  isMe: !1,
156
157
  "data-index": b,
157
- className: b === D ? "highlighted" : "",
158
+ className: b === T ? "highlighted" : "",
158
159
  style: { cursor: "pointer" },
159
- onClick: () => z(V),
160
- onMouseEnter: () => m(b),
160
+ onClick: () => Y(D),
161
+ onMouseEnter: () => f(b),
161
162
  isCompact: !0,
162
163
  isSearchResult: !0
163
164
  },
164
- V.value
165
+ D.value
165
166
  )),
166
- T && /* @__PURE__ */ C(
167
+ V && /* @__PURE__ */ C(
167
168
  ke,
168
169
  {
169
- name: f,
170
- label: f,
170
+ name: m,
171
+ label: m,
171
172
  shareType: "guest",
172
173
  isOwner: !1,
173
174
  isMe: !1,
174
175
  "data-index": g.length,
175
- className: g.length === D ? "highlighted" : "",
176
+ className: g.length === T ? "highlighted" : "",
176
177
  style: { cursor: "pointer" },
177
- onClick: $,
178
- onMouseEnter: () => m(g.length),
178
+ onClick: K,
179
+ onMouseEnter: () => f(g.length),
179
180
  isCompact: !0,
180
181
  isSearchResult: !0
181
182
  }
@@ -185,130 +186,130 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
185
186
  }
186
187
  )
187
188
  ] });
188
- }, Qs = {
189
+ }, Ja = {
189
190
  0: "No access",
190
191
  10: "Viewer",
191
192
  20: "Editor",
192
193
  30: "Admin"
193
- }, Fe = (t) => {
194
+ }, xe = (t) => {
194
195
  if (!t) return "";
195
196
  try {
196
- const e = Le(t);
197
- if (Ne(e))
198
- return Me(e, "yyyy-MM-dd");
197
+ const e = Ne(t);
198
+ if (Me(e))
199
+ return Le(e, "yyyy-MM-dd");
199
200
  } catch {
200
201
  return "";
201
202
  }
202
203
  return "";
203
- }, Pe = (t, e) => {
204
+ }, _e = (t, e) => {
204
205
  if (!t) return null;
205
206
  try {
206
- const i = Le(t);
207
- if (Ne(i))
208
- return Me(i, e);
207
+ const i = Ne(t);
208
+ if (Me(i))
209
+ return Le(i, e);
209
210
  } catch {
210
211
  return null;
211
212
  }
212
213
  return null;
213
- }, se = (t) => {
214
+ }, ae = (t) => {
214
215
  if (!t) return null;
215
216
  try {
216
- const [e, i, c] = t.split("-").map(Number);
217
- if (e && i && c)
218
- return new Date(Date.UTC(e, i - 1, c)).toISOString();
217
+ const [e, i, u] = t.split("-").map(Number);
218
+ if (e && i && u)
219
+ return new Date(Date.UTC(e, i - 1, u)).toISOString();
219
220
  } catch {
220
221
  return null;
221
222
  }
222
223
  return null;
223
- }, Js = ({
224
+ }, Qa = ({
224
225
  value: t,
225
226
  onChange: e,
226
227
  emptyTrigger: i,
227
- valueTrigger: c,
228
+ valueTrigger: u,
228
229
  align: o = "left",
229
- disabled: s = !1,
230
- className: a,
230
+ disabled: a = !1,
231
+ className: s,
231
232
  displayFormat: h = "MMM d",
232
233
  minDate: l,
233
- maxDate: f,
234
+ maxDate: m,
234
235
  pt: n
235
236
  }) => {
236
- const [E, y] = _(!1), [D, m] = _(""), [A, R] = _(""), g = oe(null), T = oe(null), I = oe(null), N = oe(null), L = t.startDate || t.endDate, M = ee(() => {
237
- const w = se(D), x = se(A);
238
- (w !== t.startDate || x !== t.endDate) && e({ startDate: w, endDate: x }), y(!1);
239
- }, [D, A, t.startDate, t.endDate, e]);
240
- Y(() => {
241
- E && (m(Fe(t.startDate)), R(Fe(t.endDate)), !t.startDate && !t.endDate && setTimeout(() => {
237
+ const [E, v] = F(!1), [T, f] = F(""), [A, R] = F(""), g = oe(null), V = oe(null), I = oe(null), M = oe(null), N = t.startDate || t.endDate, L = ee(() => {
238
+ const y = ae(T), P = ae(A);
239
+ (y !== t.startDate || P !== t.endDate) && e({ startDate: y, endDate: P }), v(!1);
240
+ }, [T, A, t.startDate, t.endDate, e]);
241
+ z(() => {
242
+ E && (f(xe(t.startDate)), R(xe(t.endDate)), !t.startDate && !t.endDate && setTimeout(() => {
242
243
  try {
243
244
  I.current?.showPicker();
244
245
  } catch {
245
246
  }
246
247
  }, 100));
247
- }, [E, t.startDate, t.endDate]), Y(() => {
248
+ }, [E, t.startDate, t.endDate]), z(() => {
248
249
  if (!E) return;
249
- const w = (x) => {
250
- const B = x.target;
251
- g.current && !g.current.contains(B) && T.current && !T.current.contains(B) && M();
250
+ const y = (P) => {
251
+ const B = P.target;
252
+ g.current && !g.current.contains(B) && V.current && !V.current.contains(B) && L();
252
253
  };
253
- return document.addEventListener("mousedown", w), () => document.removeEventListener("mousedown", w);
254
- }, [E, M]), Y(() => {
254
+ return document.addEventListener("mousedown", y), () => document.removeEventListener("mousedown", y);
255
+ }, [E, L]), z(() => {
255
256
  if (!E) return;
256
- const w = (x) => {
257
- x.key === "Escape" && (x.stopPropagation(), M());
257
+ const y = (P) => {
258
+ P.key === "Escape" && (P.stopPropagation(), L());
258
259
  };
259
- return document.addEventListener("keydown", w), () => document.removeEventListener("keydown", w);
260
- }, [E, M]);
261
- const z = (w) => {
262
- const x = w.target.value;
263
- m(x);
264
- const B = se(x), W = se(A);
260
+ return document.addEventListener("keydown", y), () => document.removeEventListener("keydown", y);
261
+ }, [E, L]);
262
+ const Y = (y) => {
263
+ const P = y.target.value;
264
+ f(P);
265
+ const B = ae(P), W = ae(A);
265
266
  if (B && W) {
266
267
  const j = new Date(B), te = new Date(W);
267
- j > te && R(x);
268
+ j > te && R(P);
268
269
  }
269
270
  B && setTimeout(() => {
270
271
  try {
271
- N.current?.showPicker();
272
+ M.current?.showPicker();
272
273
  } catch {
273
274
  }
274
275
  }, 100);
275
- }, $ = (w) => {
276
- const x = w.target.value;
277
- R(x);
278
- const B = se(x), W = se(D);
276
+ }, K = (y) => {
277
+ const P = y.target.value;
278
+ R(P);
279
+ const B = ae(P), W = ae(T);
279
280
  let j = W, te = B;
280
281
  if (B && W) {
281
282
  const q = new Date(W);
282
- new Date(B) < q && (m(x), j = B);
283
+ new Date(B) < q && (f(P), j = B);
283
284
  }
284
285
  e({ startDate: j, endDate: te });
285
- }, V = () => {
286
- m(""), R(""), e({ startDate: null, endDate: null }), y(!1);
287
- }, b = (w) => {
288
- w.stopPropagation(), s || (E ? M() : y(!0));
289
- }, v = E ? se(D) : t.startDate, O = E ? se(A) : t.endDate, r = Pe(v, h), p = Pe(O, h), u = r && p ? `${r} - ${p}` : r || p || "", d = () => {
286
+ }, D = () => {
287
+ f(""), R(""), e({ startDate: null, endDate: null }), v(!1);
288
+ }, b = (y) => {
289
+ y.stopPropagation(), a || (E ? L() : v(!0));
290
+ }, w = E ? ae(T) : t.startDate, S = E ? ae(A) : t.endDate, r = _e(w, h), p = _e(S, h), c = r && p ? `${r} - ${p}` : r || p || "", d = () => {
290
291
  if (!g.current) return { top: 0, left: 0 };
291
- const w = g.current.getBoundingClientRect();
292
+ const y = g.current.getBoundingClientRect();
292
293
  return {
293
- top: w.bottom + 4,
294
- left: o === "left" ? w.left : w.right
294
+ top: y.bottom + 4,
295
+ left: o === "left" ? y.left : y.right
295
296
  };
296
- }, k = () => L ? c ? c(t, u) : /* @__PURE__ */ C("span", { className: ue("date-value", n?.valueDisplay?.className), ...n?.valueDisplay, children: u }) : i || /* @__PURE__ */ C(Ze, { icon: "calendar_add_on" }), F = d();
297
- return /* @__PURE__ */ G(
297
+ }, k = () => N ? u ? u(t, c) : /* @__PURE__ */ C("span", { className: ce("date-value", n?.valueDisplay?.className), ...n?.valueDisplay, children: c }) : i || /* @__PURE__ */ C(Ze, { icon: "calendar_add_on" }), x = d();
298
+ return /* @__PURE__ */ H(
298
299
  Ke,
299
300
  {
300
301
  ...n?.root,
301
- className: ue(Ve, a, n?.root?.className),
302
+ className: ce(De, s, n?.root?.className),
302
303
  children: [
303
304
  /* @__PURE__ */ C(
304
305
  je,
305
306
  {
306
307
  ref: g,
307
308
  onClick: b,
308
- disabled: s,
309
+ disabled: a,
309
310
  type: "button",
310
311
  ...n?.trigger,
311
- className: ue(L ? "has-value" : "empty", n?.trigger?.className),
312
+ className: ce(N ? "has-value" : "empty", n?.trigger?.className),
312
313
  children: k()
313
314
  }
314
315
  ),
@@ -316,45 +317,45 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
316
317
  /* @__PURE__ */ C(
317
318
  Xe,
318
319
  {
319
- ref: T,
320
+ ref: V,
320
321
  style: {
321
- top: F.top,
322
- left: o === "left" ? F.left : "auto",
323
- right: o === "right" ? window.innerWidth - F.left : "auto",
322
+ top: x.top,
323
+ left: o === "left" ? x.left : "auto",
324
+ right: o === "right" ? window.innerWidth - x.left : "auto",
324
325
  ...n?.dropdown?.style
325
326
  },
326
- onMouseDown: (w) => w.stopPropagation(),
327
+ onMouseDown: (y) => y.stopPropagation(),
327
328
  ...n?.dropdown,
328
- className: ue(Ve, o, n?.dropdown?.className),
329
- children: /* @__PURE__ */ G(Qe, { className: n?.content?.className, ...n?.content, children: [
329
+ className: ce(De, o, n?.dropdown?.className),
330
+ children: /* @__PURE__ */ H(Je, { className: n?.content?.className, ...n?.content, children: [
330
331
  /* @__PURE__ */ C(
331
- Je,
332
+ Qe,
332
333
  {
333
334
  icon: "close",
334
335
  variant: "text",
335
- onClick: M,
336
+ onClick: L,
336
337
  ...n?.closeButton
337
338
  }
338
339
  ),
339
- /* @__PURE__ */ G(
340
- Se,
340
+ /* @__PURE__ */ H(
341
+ Oe,
341
342
  {
342
343
  className: n?.startDate?.field?.className,
343
344
  ...n?.startDate?.field,
344
345
  children: [
345
346
  /* @__PURE__ */ C("label", { ...n?.startDate?.label, children: "Start date" }),
346
347
  /* @__PURE__ */ C(
347
- Oe,
348
+ Se,
348
349
  {
349
350
  ref: I,
350
351
  type: "date",
351
- value: D,
352
- onChange: z,
353
- max: f ? re(f, "yyyy-MM-dd") : void 0,
354
- min: l ? re(l, "yyyy-MM-dd") : void 0,
355
- onClick: (w) => {
352
+ value: T,
353
+ onChange: Y,
354
+ max: m ? le(m, "yyyy-MM-dd") : void 0,
355
+ min: l ? le(l, "yyyy-MM-dd") : void 0,
356
+ onClick: (y) => {
356
357
  try {
357
- w.currentTarget.showPicker();
358
+ y.currentTarget.showPicker();
358
359
  } catch {
359
360
  }
360
361
  },
@@ -364,20 +365,20 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
364
365
  ]
365
366
  }
366
367
  ),
367
- /* @__PURE__ */ G(Se, { className: n?.endDate?.field?.className, ...n?.endDate?.field, children: [
368
+ /* @__PURE__ */ H(Oe, { className: n?.endDate?.field?.className, ...n?.endDate?.field, children: [
368
369
  /* @__PURE__ */ C("label", { ...n?.endDate?.label, children: "End date" }),
369
370
  /* @__PURE__ */ C(
370
- Oe,
371
+ Se,
371
372
  {
372
- ref: N,
373
+ ref: M,
373
374
  type: "date",
374
375
  value: A,
375
- onChange: $,
376
- max: f ? re(f, "yyyy-MM-dd") : void 0,
377
- min: D || (l ? re(l, "yyyy-MM-dd") : void 0),
378
- onClick: (w) => {
376
+ onChange: K,
377
+ max: m ? le(m, "yyyy-MM-dd") : void 0,
378
+ min: T || (l ? le(l, "yyyy-MM-dd") : void 0),
379
+ onClick: (y) => {
379
380
  try {
380
- w.currentTarget.showPicker();
381
+ y.currentTarget.showPicker();
381
382
  } catch {
382
383
  }
383
384
  },
@@ -385,7 +386,7 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
385
386
  }
386
387
  )
387
388
  ] }),
388
- L && /* @__PURE__ */ C(qe, { onClick: V, variant: "text", ...n?.clearButton, children: "Clear dates" })
389
+ N && /* @__PURE__ */ C(qe, { onClick: D, variant: "text", ...n?.clearButton, children: "Clear dates" })
389
390
  ] })
390
391
  }
391
392
  ),
@@ -398,150 +399,150 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
398
399
  version: 1,
399
400
  name: "review",
400
401
  productType: "review"
401
- }, qs = ({
402
+ }, qa = ({
402
403
  children: t,
403
404
  projectName: e,
404
405
  onVersionCreated: i,
405
- dispatch: c
406
+ dispatch: u
406
407
  }) => {
407
- const [o, s] = _(""), [a, h] = _(""), [l, f] = _(null), [n, E] = _(null), [y, D] = _(!1), [m, A] = _([]), [R, g] = _(ne), [T, I] = _(!1), [N, L] = _(""), [M, z] = _(null), [$, V] = _(null), [b, v] = _(void 0), [O, r] = _(void 0), p = oe(!1), u = oe(null), { data: d = [], isLoading: k } = kt(
408
+ const [o, a] = F(""), [s, h] = F(""), [l, m] = F(null), [n, E] = F(null), [v, T] = F(!1), [f, A] = F([]), [R, g] = F(ne), [V, I] = F(!1), [M, N] = F(""), [L, Y] = F(null), [K, D] = F(null), [b, w] = F(void 0), [S, r] = F(void 0), p = oe(!1), c = oe(null), { data: d = [], isLoading: k } = kt(
408
409
  { projectName: e, folderId: o },
409
- { skip: !o || !y || !!a }
410
- ), F = me(() => {
411
- if (!(a || !R.name || d.length === 0))
412
- return d.find((S) => S.name === R.name);
413
- }, [a, R.name, d]), w = a || F?.id || "", { currentData: x } = St(
410
+ { skip: !o || !v || !!s }
411
+ ), x = me(() => {
412
+ if (!(s || !R.name || d.length === 0))
413
+ return d.find((O) => O.name === R.name);
414
+ }, [s, R.name, d]), y = s || x?.id || "", { currentData: P } = Ot(
414
415
  {
415
416
  projectName: e,
416
- productId: a
417
+ productId: s
417
418
  },
418
- { skip: !a || !y || b != null }
419
- ), { data: B } = Ot(
420
- { projectName: e, versionId: O },
421
- { skip: !O || !y || l !== null }
422
- ), W = l ?? B?.taskId ?? "", j = !!(O && l === null && !B), te = ee(
423
- ({ productId: S, folderId: P, taskId: U, linkedTask: Z, latestVersionNumber: ie, latestVersionId: Ge }) => {
424
- h(S || ""), s(P || ""), f(U || null), E(Z || null), v(ie), r(Ge), g((ze) => ({
425
- ...ze,
426
- ...ie != null ? { version: ie + 1 } : {}
427
- })), D(!0);
419
+ { skip: !s || !v || b != null }
420
+ ), { data: B } = St(
421
+ { projectName: e, versionId: S },
422
+ { skip: !S || !v || l !== null }
423
+ ), W = l ?? B?.taskId ?? "", j = !!(S && l === null && !B), te = ee(
424
+ ({ productId: O, folderId: _, taskId: U, linkedTask: Z, latestVersionNumber: ue, latestVersionId: He }) => {
425
+ h(O || ""), a(_ || ""), m(U || null), E(Z || null), w(ue), r(He), g((Ye) => ({
426
+ ...Ye,
427
+ ...ue != null ? { version: ue + 1 } : {}
428
+ })), T(!0);
428
429
  },
429
430
  []
430
431
  ), q = ee(() => {
431
- m.forEach((S) => {
432
- S.preview && URL.revokeObjectURL(S.preview);
433
- }), A([]), g(ne), z(null), V(null), L(""), I(!1), D(!1), h(""), s(""), f(null), E(null), p.current = !1, v(void 0), r(void 0);
434
- }, [m]), [be] = Dt(), [pe] = Vt(), X = ee(
435
- async (S) => {
432
+ f.forEach((O) => {
433
+ O.preview && URL.revokeObjectURL(O.preview);
434
+ }), A([]), g(ne), Y(null), D(null), N(""), I(!1), T(!1), h(""), a(""), m(null), E(null), p.current = !1, w(void 0), r(void 0);
435
+ }, [f]), [be] = Tt(), [pe] = Dt(), X = ee(
436
+ async (O) => {
436
437
  try {
437
- if (w) {
438
- const P = await jt(pe, e, {
439
- productId: w,
440
- version: S.version,
438
+ if (y) {
439
+ const _ = await jt(pe, e, {
440
+ productId: y,
441
+ version: O.version,
441
442
  taskId: W || void 0
442
443
  });
443
- return i(w, P.id), he.success("Created new version"), {
444
- productId: w,
445
- versionId: P.id
444
+ return i(y, _.id), he.success("Created new version"), {
445
+ productId: y,
446
+ versionId: _.id
446
447
  };
447
448
  } else {
448
- const { product: P, version: U } = await Xt(
449
+ const { product: _, version: U } = await Xt(
449
450
  be,
450
451
  pe,
451
452
  e,
452
453
  {
453
454
  folderId: o,
454
- name: S.name,
455
- productType: S.productType || "review",
456
- productBaseType: S.productType || "review"
455
+ name: O.name,
456
+ productType: O.productType || "review",
457
+ productBaseType: O.productType || "review"
457
458
  },
458
459
  {
459
- version: S.version,
460
+ version: O.version,
460
461
  taskId: W || void 0
461
462
  }
462
463
  );
463
- return i(P.id, U.id), he.success("Created new version"), {
464
- productId: P.id,
464
+ return i(_.id, U.id), he.success("Created new version"), {
465
+ productId: _.id,
465
466
  versionId: U.id
466
467
  };
467
468
  }
468
- } catch (P) {
469
- throw console.error("Error uploading version:", P), P.message || P;
469
+ } catch (_) {
470
+ throw console.error("Error uploading version:", _), _.message || _;
470
471
  }
471
472
  },
472
- [q, w, o, W, e]
473
+ [q, y, o, W, e]
473
474
  ), fe = ee(
474
- (S) => {
475
- if (w) return;
476
- const P = S[0];
477
- if (P) {
478
- const U = Jt(P.name), Z = Kt(U);
479
- Z && Z !== R.version && g((ie) => ({
480
- ...ie,
475
+ (O) => {
476
+ if (y) return;
477
+ const _ = O[0];
478
+ if (_) {
479
+ const U = Qt(_.name), Z = Kt(U);
480
+ Z && Z !== R.version && g((ue) => ({
481
+ ...ue,
481
482
  version: Z
482
483
  }));
483
484
  }
484
485
  },
485
- [w, R.version]
486
- ), Q = x?.version ?? b ?? F?.latestVersion?.version, J = ee((S, P) => {
486
+ [y, R.version]
487
+ ), J = P?.version ?? b ?? x?.latestVersion?.version, Q = ee((O, _) => {
487
488
  g((U) => ({
488
489
  ...U,
489
- [S]: P
490
- })), L("");
490
+ [O]: _
491
+ })), N("");
491
492
  }, []), Ee = ee(
492
- async (S) => {
493
+ async (O) => {
493
494
  try {
494
- I(!0), L("");
495
- const P = Qt(S, Q, !w);
496
- if (!P.isValid)
497
- throw P.error;
498
- const U = await X(S);
499
- o && (u.current = { folderId: o, productName: S.name }), U?.productId && z(U.productId), U?.versionId && V(U.versionId), m.length < 1 && (I(!1), q());
500
- } catch (P) {
501
- L(P), I(!1);
495
+ I(!0), N("");
496
+ const _ = Jt(O, J, !y);
497
+ if (!_.isValid)
498
+ throw _.error;
499
+ const U = await X(O);
500
+ o && (c.current = { folderId: o, productName: O.name }), U?.productId && Y(U.productId), U?.versionId && D(U.versionId), f.length < 1 && (I(!1), q());
501
+ } catch (_) {
502
+ N(_), I(!1);
502
503
  }
503
504
  },
504
- [X, m.length, q, Q, w]
505
+ [X, f.length, q, J, y]
505
506
  );
506
- Y(() => {
507
- if (!(!y || b != null))
508
- return g(x ? (S) => ({ ...S, version: x.version + 1 }) : ne), () => {
507
+ z(() => {
508
+ if (!(!v || b != null))
509
+ return g(P ? (O) => ({ ...O, version: P.version + 1 }) : ne), () => {
509
510
  g(ne);
510
511
  };
511
- }, [y, x, b]), Y(() => {
512
- if (!y || a || d.length === 0 || R.name !== ne.name) return;
513
- const S = u.current;
514
- if (S && S.folderId === o && d.some((Z) => Z.name === S.productName)) {
515
- g((Z) => ({ ...Z, name: S.productName }));
512
+ }, [v, P, b]), z(() => {
513
+ if (!v || s || d.length === 0 || R.name !== ne.name) return;
514
+ const O = c.current;
515
+ if (O && O.folderId === o && d.some((Z) => Z.name === O.productName)) {
516
+ g((Z) => ({ ...Z, name: O.productName }));
516
517
  return;
517
518
  }
518
- const P = d[d.length - 1];
519
- P && g((U) => ({ ...U, name: P.name }));
520
- }, [y, a, d]), Y(() => {
521
- if (!(!y || a))
522
- if (F) {
523
- g((P) => ({
524
- ...P,
525
- productType: F.productType,
526
- ...F.latestVersion && {
527
- version: F.latestVersion.version + 1
519
+ const _ = d[d.length - 1];
520
+ _ && g((U) => ({ ...U, name: _.name }));
521
+ }, [v, s, d]), z(() => {
522
+ if (!(!v || s))
523
+ if (x) {
524
+ g((_) => ({
525
+ ..._,
526
+ productType: x.productType,
527
+ ...x.latestVersion && {
528
+ version: x.latestVersion.version + 1
528
529
  }
529
530
  }));
530
- const S = F.latestVersion?.task;
531
- S && (l === null || p.current) ? (f(S.id), E({
532
- id: S.id,
533
- name: S.name,
534
- label: S.label,
535
- taskType: S.taskType
536
- }), p.current = !0) : !S && p.current && (f(null), E(null), p.current = !1);
531
+ const O = x.latestVersion?.task;
532
+ O && (l === null || p.current) ? (m(O.id), E({
533
+ id: O.id,
534
+ name: O.name,
535
+ label: O.label,
536
+ taskType: O.taskType
537
+ }), p.current = !0) : !O && p.current && (m(null), E(null), p.current = !1);
537
538
  } else
538
- g((S) => ({ ...S, version: ne.version })), (l === null || p.current) && (f(null), E(null), p.current = !1);
539
- }, [y, a, F]);
540
- const Ce = ee((S) => {
541
- f(S), p.current = !1;
542
- }, []), He = me(
539
+ g((O) => ({ ...O, version: ne.version })), (l === null || p.current) && (m(null), E(null), p.current = !1);
540
+ }, [v, s, x]);
541
+ const Ce = ee((O) => {
542
+ m(O), p.current = !1;
543
+ }, []), We = me(
543
544
  () => ({
544
- productId: a,
545
+ productId: s,
545
546
  setProductId: h,
546
547
  folderId: o,
547
548
  taskId: W,
@@ -549,11 +550,11 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
549
550
  isLoadingTask: j,
550
551
  setTaskId: Ce,
551
552
  setLinkedTask: E,
552
- setFolderId: s,
553
- isOpen: y,
553
+ setFolderId: a,
554
+ isOpen: v,
554
555
  projectName: e,
555
- latestVersion: Q,
556
- pendingFiles: m,
556
+ latestVersion: J,
557
+ pendingFiles: f,
557
558
  setPendingFiles: A,
558
559
  onOpenVersionUpload: te,
559
560
  onCloseVersionUpload: q,
@@ -561,105 +562,105 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
561
562
  extractAndSetVersionFromFiles: fe,
562
563
  form: R,
563
564
  setForm: g,
564
- isSubmitting: T,
565
- error: N,
566
- createdProductId: M,
567
- createdVersionId: $,
568
- handleFormChange: J,
565
+ isSubmitting: V,
566
+ error: M,
567
+ createdProductId: L,
568
+ createdVersionId: K,
569
+ handleFormChange: Q,
569
570
  handleFormSubmit: Ee,
570
571
  folderProducts: d,
571
572
  isFolderProductsLoading: k,
572
- matchedProduct: F,
573
- dispatch: c
573
+ matchedProduct: x,
574
+ dispatch: u
574
575
  }),
575
576
  [
576
577
  o,
577
- s,
578
578
  a,
579
+ s,
579
580
  W,
580
581
  n,
581
582
  j,
582
583
  Ce,
583
584
  E,
584
585
  h,
585
- y,
586
+ v,
586
587
  e,
587
- Q,
588
- m,
588
+ J,
589
+ f,
589
590
  A,
590
591
  te,
591
592
  q,
592
593
  X,
593
594
  fe,
594
595
  R,
595
- T,
596
- N,
596
+ V,
597
597
  M,
598
- $,
599
- J,
598
+ L,
599
+ K,
600
+ Q,
600
601
  Ee,
601
602
  d,
602
603
  k,
603
- F,
604
- c
604
+ x,
605
+ u
605
606
  ]
606
607
  );
607
- return /* @__PURE__ */ C(qt.Provider, { value: He, children: t });
608
- }, Zs = ({ children: t }) => {
609
- const [e, i] = _(!1), { siteInfo: c, user: o, cloudInfo: s } = Be(), { data: a, isLoading: h } = Tt(
608
+ return /* @__PURE__ */ C(qt.Provider, { value: We, children: t });
609
+ }, Za = ({ children: t }) => {
610
+ const [e, i] = F(!1), { siteInfo: u, user: o, cloudInfo: a } = Be(), { data: s, isLoading: h } = Vt(
610
611
  {},
611
612
  {
612
- skip: !o?.name || !s?.connected
613
+ skip: !o?.name || !a?.connected
613
614
  }
614
615
  ), l = () => {
615
- e || (_t(() => {
616
+ e || (Ft(() => {
616
617
  if (document.getElementById("featurebase-sdk")) return;
617
- const u = document.createElement("script");
618
- u.src = "https://do.featurebase.app/js/sdk.js", u.id = "featurebase-sdk", u.async = !0, document.body.appendChild(u);
618
+ const c = document.createElement("script");
619
+ c.src = "https://do.featurebase.app/js/sdk.js", c.id = "featurebase-sdk", c.async = !0, document.body.appendChild(c);
619
620
  }), i(!0));
620
- }, f = () => {
621
- const u = window;
622
- typeof u.Featurebase != "function" && (u.Featurebase = function() {
623
- (u.Featurebase.q = u.Featurebase.q || []).push(arguments);
621
+ }, m = () => {
622
+ const c = window;
623
+ typeof c.Featurebase != "function" && (c.Featurebase = function() {
624
+ (c.Featurebase.q = c.Featurebase.q || []).push(arguments);
624
625
  });
625
- }, n = c?.version?.split("+")[0] || "unknown", E = c?.version?.split("+")[1] || "unknown", y = () => {
626
- if (!o?.name || !a?.available) return;
627
- const u = {
628
- ...a.data,
626
+ }, n = u?.version?.split("+")[0] || "unknown", E = u?.version?.split("+")[1] || "unknown", v = () => {
627
+ if (!o?.name || !s?.available) return;
628
+ const c = {
629
+ ...s.data,
629
630
  customFields: {
630
631
  origin: window.location.origin,
631
632
  serverVersion: n,
632
633
  frontendVersion: E,
633
- instanceId: s?.instanceId
634
+ instanceId: a?.instanceId
634
635
  }
635
636
  };
636
- console.log(u), window.Featurebase("identify", u, (k) => {
637
+ console.log(c), window.Featurebase("identify", c, (k) => {
637
638
  k ? console.error(k) : console.log("Featurebase identify completed");
638
639
  });
639
- }, [D, m] = _(!1), [A, R] = _(0), g = () => {
640
- const u = window;
641
- if (typeof u.Featurebase == "function") {
642
- if (console.log("Initializing Featurebase messenger widget"), !a?.available)
640
+ }, [T, f] = F(!1), [A, R] = F(0), g = () => {
641
+ const c = window;
642
+ if (typeof c.Featurebase == "function") {
643
+ if (console.log("Initializing Featurebase messenger widget"), !s?.available)
643
644
  return console.warn("messenger verification not available, skipping messenger init");
644
- u.Featurebase(
645
+ c.Featurebase(
645
646
  "boot",
646
647
  {
647
648
  theme: "dark",
648
- ...a?.data
649
+ ...s?.data
649
650
  },
650
651
  (d) => {
651
- d ? console.error(d) : (console.log("Featurebase messenger completed"), m(!0), u.Featurebase("onUnreadCountChange", function(k) {
652
+ d ? console.error(d) : (console.log("Featurebase messenger completed"), f(!0), c.Featurebase("onUnreadCountChange", function(k) {
652
653
  R(k);
653
654
  }));
654
655
  }
655
656
  );
656
657
  }
657
- }, T = () => {
658
- const u = [];
658
+ }, V = () => {
659
+ const c = [];
659
660
  if (o?.data?.isAdmin) {
660
661
  const k = ["Server", "Addon", "Pipeline"];
661
- u.push(...k);
662
- } else c?.disableChangelog || u.push("Highlights");
662
+ c.push(...k);
663
+ } else u?.disableChangelog || c.push("Highlights");
663
664
  const d = window;
664
665
  return typeof d.Featurebase == "function" && d.Featurebase("init_changelog_widget", {
665
666
  organization: "ayon",
@@ -671,12 +672,12 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
671
672
  usersName: o?.attrib?.fullName,
672
673
  autoOpenForNewUpdates: !0
673
674
  },
674
- category: u,
675
+ category: c,
675
676
  theme: "dark"
676
677
  }), !1;
677
678
  }, I = () => {
678
- const u = window;
679
- return typeof u.Featurebase == "function" && u.Featurebase(
679
+ const c = window;
680
+ return typeof c.Featurebase == "function" && c.Featurebase(
680
681
  "initialize_feedback_widget",
681
682
  {
682
683
  organization: "ayon",
@@ -687,9 +688,9 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
687
688
  d && console.error("Error initializing feedback widget:", d);
688
689
  }
689
690
  ), !1;
690
- }, N = () => {
691
- const u = window;
692
- return typeof u.Featurebase == "function" && u.Featurebase(
691
+ }, M = () => {
692
+ const c = window;
693
+ return typeof c.Featurebase == "function" && c.Featurebase(
693
694
  "initialize_portal_widget",
694
695
  {
695
696
  organization: "ayon",
@@ -698,16 +699,16 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
698
699
  },
699
700
  (d) => d ? (console.error("Error initializing portal widget:", d), !1) : !0
700
701
  ), !1;
701
- }, L = () => {
702
- const u = window;
703
- return typeof u.Featurebase == "function" && u.Featurebase(
702
+ }, N = () => {
703
+ const c = window;
704
+ return typeof c.Featurebase == "function" && c.Featurebase(
704
705
  "initialize_survey_widget",
705
706
  {
706
707
  organization: "ayon",
707
708
  placement: "bottom-right",
708
709
  theme: "dark",
709
710
  email: o?.attrib?.email,
710
- featurebaseJwt: a?.data?.featurebaseJwt,
711
+ featurebaseJwt: s?.data?.featurebaseJwt,
711
712
  locale: "en"
712
713
  },
713
714
  (d) => {
@@ -715,60 +716,60 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
715
716
  }
716
717
  ), !1;
717
718
  };
718
- Y(() => {
719
- o?.name && c && (c.disableFeedback || e || (l(), f(), T(), I(), N()));
720
- }, [o?.name, e, c]);
721
- const [M, z] = _(!1);
722
- Y(() => {
723
- !o?.name || !s || !a || !e || M || (y(), L(), z(!0));
719
+ z(() => {
720
+ o?.name && u && (u.disableFeedback || e || (l(), m(), V(), I(), M()));
721
+ }, [o?.name, e, u]);
722
+ const [L, Y] = F(!1);
723
+ z(() => {
724
+ !o?.name || !a || !s || !e || L || (v(), N(), Y(!0));
724
725
  }, [
725
726
  o?.name,
726
- s?.instanceId,
727
- a?.available,
727
+ a?.instanceId,
728
+ s?.available,
728
729
  e,
729
730
  window.location.pathname,
730
- M
731
- ]), Y(() => {
731
+ L
732
+ ]), z(() => {
732
733
  h || !e || g();
733
- }, [a, h, e]);
734
- const $ = () => {
734
+ }, [s, h, e]);
735
+ const K = () => {
735
736
  window.postMessage({
736
737
  target: "FeaturebaseWidget",
737
738
  data: {
738
739
  action: "openFeedbackWidget"
739
740
  }
740
741
  });
741
- }, V = (u = "MainView", d) => {
742
+ }, D = (c = "MainView", d) => {
742
743
  window.postMessage({
743
744
  target: "FeaturebaseWidget",
744
745
  data: {
745
746
  action: "changePage",
746
- payload: u,
747
+ payload: c,
747
748
  openWidget: !0,
748
749
  ...d && { articleId: d }
749
750
  }
750
751
  });
751
- }, [b, v] = _(!1), O = document.getElementById("fb-messenger-root"), r = (u) => O instanceof HTMLElement && (O.style.display = u ? "block" : "none");
752
- Y(() => {
753
- !e || !D || r(b);
754
- }, [e, D, b]), Y(() => {
755
- if (!e || !D) return;
756
- const u = window;
757
- typeof u.Featurebase == "function" && u.Featurebase("onHide", function() {
758
- v(!1);
752
+ }, [b, w] = F(!1), S = document.getElementById("fb-messenger-root"), r = (c) => S instanceof HTMLElement && (S.style.display = c ? "block" : "none");
753
+ z(() => {
754
+ !e || !T || r(b);
755
+ }, [e, T, b]), z(() => {
756
+ if (!e || !T) return;
757
+ const c = window;
758
+ typeof c.Featurebase == "function" && c.Featurebase("onHide", function() {
759
+ w(!1);
759
760
  });
760
- }, [e, D]);
761
- const p = (u = "Home", d) => {
761
+ }, [e, T]);
762
+ const p = (c = "Home", d) => {
762
763
  const k = window;
763
764
  if (typeof k.Featurebase != "function") {
764
765
  window.alert("Featurebase SDK is not loaded yet. Please try again later."), console.warn("Featurebase SDK is not loaded yet.");
765
766
  return;
766
767
  }
767
768
  if (b) {
768
- k.Featurebase("hide"), v(!1);
769
+ k.Featurebase("hide"), w(!1);
769
770
  return;
770
771
  }
771
- switch (v(!0), u) {
772
+ switch (w(!0), c) {
772
773
  case "Home":
773
774
  k.Featurebase("show");
774
775
  break;
@@ -793,35 +794,35 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
793
794
  }
794
795
  };
795
796
  return /* @__PURE__ */ C(
796
- xt.Provider,
797
+ Bt.Provider,
797
798
  {
798
799
  value: {
799
800
  openSupport: p,
800
- openFeedback: $,
801
- openPortal: V,
802
- messengerLoaded: D,
801
+ openFeedback: K,
802
+ openPortal: D,
803
+ messengerLoaded: T,
803
804
  unreadCount: A,
804
805
  messengerVisibility: b,
805
- setMessengerVisibility: v,
806
+ setMessengerVisibility: w,
806
807
  loaded: e
807
808
  },
808
809
  children: t
809
810
  }
810
811
  );
811
- }, ea = ({
812
+ }, es = ({
812
813
  projectName: t,
813
814
  list: e,
814
815
  isLoading: i,
815
- attributes: c = []
816
+ attributes: u = []
816
817
  }) => {
817
- const [o, s] = _({
818
+ const [o, a] = F({
818
819
  label: "",
819
820
  tags: [],
820
821
  active: !1
821
- }), a = (e?.accessLevel || 0) >= 30, { tags: h } = mt(), { data: l = [] } = Rt(), f = me(
822
- () => l.filter((m) => m.scope?.includes("list")).map((m) => ({
823
- name: m.name,
824
- data: m.data
822
+ }), s = (e?.accessLevel || 0) >= 30, { tags: h } = mt(), { data: l = [] } = Rt(), m = me(
823
+ () => l.filter((f) => f.scope?.includes("list")).map((f) => ({
824
+ name: f.name,
825
+ data: f.data
825
826
  })),
826
827
  [l]
827
828
  ), n = me(
@@ -832,51 +833,51 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
832
833
  data: {
833
834
  type: "list_of_strings",
834
835
  title: "Tags",
835
- enum: h?.map((m) => ({ value: m.name, label: m.name, color: m.color })),
836
+ enum: h?.map((f) => ({ value: f.name, label: f.name, color: f.color })),
836
837
  enableCustomValues: !0,
837
838
  enableSearch: !0
838
839
  }
839
840
  },
840
- ...f,
841
+ ...m,
841
842
  { name: "active", data: { type: "boolean", title: "Active" } },
842
- ...c
843
+ ...u
843
844
  ],
844
- [h, f, c]
845
+ [h, m, u]
845
846
  );
846
- Y(() => {
847
+ z(() => {
847
848
  if (e) {
848
- const m = e.attrib || {}, R = [...f, ...c].reduce((g, { name: T }) => {
849
- const I = m[T];
850
- return g[T] = I || "", g;
849
+ const f = e.attrib || {}, R = [...m, ...u].reduce((g, { name: V }) => {
850
+ const I = f[V];
851
+ return g[V] = I || "", g;
851
852
  }, {});
852
- s({
853
+ a({
853
854
  label: e?.label || "",
854
855
  tags: e?.tags || [],
855
856
  active: e?.active ?? !1,
856
857
  ...R
857
858
  });
858
859
  }
859
- }, [e, JSON.stringify(c), JSON.stringify(f)]);
860
- const [E] = It(), y = (m) => c.some((A) => A.name === m) || f.some((A) => A.name === m), D = ee(
861
- async (m, A) => {
860
+ }, [e, JSON.stringify(u), JSON.stringify(m)]);
861
+ const [E] = It(), v = (f) => u.some((A) => A.name === f) || m.some((A) => A.name === f), T = ee(
862
+ async (f, A) => {
862
863
  if (!e?.id) return console.warn("No list ID provided");
863
864
  let R;
864
- if (y(m)) {
865
+ if (v(f)) {
865
866
  const g = e.attrib || {};
866
- A === "" && m === "category" ? R = {
867
+ A === "" && f === "category" ? R = {
867
868
  attrib: {
868
869
  ...g,
869
- [m]: null
870
+ [f]: null
870
871
  }
871
872
  } : R = {
872
873
  attrib: {
873
874
  ...g,
874
- [m]: A
875
+ [f]: A
875
876
  }
876
- }, s((T) => ({ ...T, [m]: A }));
877
+ }, a((V) => ({ ...V, [f]: A }));
877
878
  } else {
878
- const g = { [m]: A };
879
- R = g, s((T) => ({ ...T, ...g }));
879
+ const g = { [f]: A };
880
+ R = g, a((V) => ({ ...V, ...g }));
880
881
  }
881
882
  try {
882
883
  await E({
@@ -888,173 +889,173 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
888
889
  console.error(g), he.error("Failed to update list attribute: ", g.attrib.detail);
889
890
  }
890
891
  },
891
- [e?.id, e?.attrib, t, E, f, c]
892
+ [e?.id, e?.attrib, t, E, m, u]
892
893
  );
893
894
  return /* @__PURE__ */ C(
894
895
  wt,
895
896
  {
896
- enableEditing: a,
897
+ enableEditing: s,
897
898
  projectName: t,
898
899
  fields: n,
899
900
  form: o,
900
901
  isLoading: i,
901
- onChange: D,
902
+ onChange: T,
902
903
  title: "Attributes"
903
904
  }
904
905
  );
905
- }, ta = ({ list: t, isLoading: e }) => {
906
+ }, ts = ({ list: t, isLoading: e }) => {
906
907
  const i = Object.fromEntries(
907
908
  Object.entries(t?.data || {}).filter(
908
- ([s, a]) => !["category", "count"].includes(s) && a !== null && typeof a != "object"
909
+ ([a, s]) => !["category", "count"].includes(a) && s !== null && typeof s != "object"
909
910
  )
910
- ), c = {
911
+ ), u = {
911
912
  Id: t?.id,
912
913
  "Entity type": t?.entityType,
913
914
  "List type": t?.entityListType,
914
915
  "Items count": t?.data?.count ?? t?.items?.length,
915
916
  Owner: t?.owner,
916
- "Created at": t?.createdAt && re(new Date(t?.createdAt), "PPpp"),
917
+ "Created at": t?.createdAt && le(new Date(t?.createdAt), "PPpp"),
917
918
  "Created by": t?.createdBy,
918
- "Updated at": t?.updatedAt && re(new Date(t?.updatedAt), "PPpp"),
919
+ "Updated at": t?.updatedAt && le(new Date(t?.updatedAt), "PPpp"),
919
920
  "Last updated by": t?.updatedBy,
920
921
  ...i
921
- }, o = Object.keys(c).map((s) => ({
922
- name: s,
922
+ }, o = Object.keys(u).map((a) => ({
923
+ name: a,
923
924
  data: { type: "string" },
924
925
  hidden: !1
925
926
  }));
926
- return /* @__PURE__ */ C(yt, { form: c, fields: o, isLoading: !!e });
927
- }, sa = ({
927
+ return /* @__PURE__ */ C(yt, { form: u, fields: o, isLoading: !!e });
928
+ }, as = ({
928
929
  label: t,
929
930
  description: e,
930
931
  features: i,
931
- isCloseable: c = !0,
932
+ isCloseable: u = !0,
932
933
  addon: o
933
934
  }) => {
934
- const [s, a] = _(!1), { setPowerpackDialog: h, selectedPowerPack: l, powerpackDialog: f, addonDialog: n } = ht(), E = !!o || !!n, y = t ?? f?.label ?? n?.label, D = e ?? f?.description ?? (n ? n.features[n.selectedFeature ?? ""]?.description ?? Object.values(n.features)[0]?.description : void 0), m = o?.icon ?? (n ? n.icon : "bolt");
935
- if (!f && !n && (!t || !e)) return null;
935
+ const [a, s] = F(!1), { setPowerpackDialog: h, selectedPowerPack: l, powerpackDialog: m, addonDialog: n } = ht(), E = !!o || !!n, v = t ?? m?.label ?? n?.label, T = e ?? m?.description ?? (n ? n.features[n.selectedFeature ?? ""]?.description ?? Object.values(n.features)[0]?.description : void 0), f = o?.icon ?? (n ? n.icon : "bolt");
936
+ if (!m && !n && (!t || !e)) return null;
936
937
  const R = (() => {
937
938
  if (i)
938
939
  return Object.entries(i);
939
940
  if (n) {
940
- const T = n.featureOrder.filter((I) => I in n.features).map(
941
+ const V = n.featureOrder.filter((I) => I in n.features).map(
941
942
  (I) => [I, n.features[I]]
942
943
  );
943
944
  if (n.selectedFeature) {
944
- const I = T.findIndex(([N]) => N === n.selectedFeature);
945
+ const I = V.findIndex(([M]) => M === n.selectedFeature);
945
946
  if (I > 0) {
946
- const [N] = T.splice(I, 1);
947
- T.unshift(N);
947
+ const [M] = V.splice(I, 1);
948
+ V.unshift(M);
948
949
  }
949
950
  }
950
- return T;
951
+ return V;
951
952
  }
952
- return Object.entries(bt).sort(([T], [I]) => {
953
- if (T === l) return -1;
953
+ return Object.entries(bt).sort(([V], [I]) => {
954
+ if (V === l) return -1;
954
955
  if (I === l) return 1;
955
- const N = Te.indexOf(T), L = Te.indexOf(I);
956
- return N > -1 && L > -1 ? N - L : N > -1 ? -1 : L > -1 ? 1 : 0;
956
+ const M = Ve.indexOf(V), N = Ve.indexOf(I);
957
+ return M > -1 && N > -1 ? M - N : M > -1 ? -1 : N > -1 ? 1 : 0;
957
958
  });
958
959
  })();
959
- return /* @__PURE__ */ G(
960
+ return /* @__PURE__ */ H(
960
961
  et,
961
962
  {
962
963
  isOpen: !0,
963
964
  onClose: () => {
964
- c && (h(null), a(!1));
965
+ u && (h(null), s(!1));
965
966
  },
966
967
  size: "lg",
967
- hideCancelButton: !c,
968
- hideBackdrop: !c,
968
+ hideCancelButton: !u,
969
+ hideBackdrop: !u,
969
970
  children: [
970
- /* @__PURE__ */ G(tt, { children: [
971
- /* @__PURE__ */ G("h1", { children: [
972
- /* @__PURE__ */ C(le, { icon: m }),
973
- y
971
+ /* @__PURE__ */ H(tt, { children: [
972
+ /* @__PURE__ */ H("h1", { children: [
973
+ /* @__PURE__ */ C(ie, { icon: f }),
974
+ v
974
975
  ] }),
975
- /* @__PURE__ */ C("h2", { children: D })
976
+ /* @__PURE__ */ C("h2", { children: T })
976
977
  ] }),
977
- /* @__PURE__ */ G(st, { children: [
978
- E ? /* @__PURE__ */ G("h3", { children: [
978
+ /* @__PURE__ */ H(at, { children: [
979
+ E ? /* @__PURE__ */ H("h3", { children: [
979
980
  "Unlock all ",
980
981
  /* @__PURE__ */ C("span", { className: "green", children: "Premium Addons" }),
981
982
  " with an AYON Studio subscription."
982
- ] }) : /* @__PURE__ */ G("h3", { children: [
983
+ ] }) : /* @__PURE__ */ H("h3", { children: [
983
984
  "Unlock all ",
984
- /* @__PURE__ */ C(le, { icon: "bolt" }),
985
+ /* @__PURE__ */ C(ie, { icon: "bolt" }),
985
986
  " ",
986
987
  /* @__PURE__ */ C("span", { className: "green", children: "Power Features" }),
987
988
  " with an AYON subscription."
988
989
  ] }),
989
- /* @__PURE__ */ C("ul", { children: R.slice(0, s ? void 0 : 5).map(([T, I]) => /* @__PURE__ */ G("li", { children: [
990
- /* @__PURE__ */ C(le, { icon: I.icon ?? "check" }),
990
+ /* @__PURE__ */ C("ul", { children: R.slice(0, a ? void 0 : 5).map(([V, I]) => /* @__PURE__ */ H("li", { children: [
991
+ /* @__PURE__ */ C(ie, { icon: I.icon ?? "check" }),
991
992
  /* @__PURE__ */ C("span", { children: I.bullet })
992
- ] }, T)) }),
993
- !s && R.length > 5 && /* @__PURE__ */ C(at, { onClick: () => a(!0), children: "Show all" })
993
+ ] }, V)) }),
994
+ !a && R.length > 5 && /* @__PURE__ */ C(st, { onClick: () => s(!0), children: "Show all" })
994
995
  ] }),
995
996
  /* @__PURE__ */ C(ot, { addon: o?.name, children: /* @__PURE__ */ C(nt, {}) })
996
997
  ]
997
998
  }
998
999
  );
999
- }, _e = ({
1000
+ }, Fe = ({
1000
1001
  Component: t,
1001
1002
  projectName: e,
1002
1003
  state: i,
1003
- dispatch: c,
1004
+ dispatch: u,
1004
1005
  useSelector: o,
1005
- onOpenImage: s,
1006
- onGoToFrame: a,
1006
+ onOpenImage: a,
1007
+ onGoToFrame: s,
1007
1008
  onOpenViewer: h,
1008
1009
  onUpdateEntity: l,
1009
- ...f
1010
+ ...m
1010
1011
  }) => {
1011
- const n = gt(), { onCreateView: E, getLatestSettings: y, markCacheDirty: D } = Lt();
1012
+ const n = gt(), { onCreateView: E, getLatestSettings: v, markCacheDirty: T } = Ut();
1012
1013
  return /* @__PURE__ */ C(
1013
1014
  t,
1014
1015
  {
1015
- router: { useParams: Wt, useNavigate: Ut, useLocation: Bt, useSearchParams: Mt },
1016
+ router: { useParams: Lt, useNavigate: Mt, useLocation: Nt, useSearchParams: Pt },
1016
1017
  projectName: e,
1017
1018
  views: {
1018
1019
  ...n,
1019
1020
  settings: n.viewSettings,
1020
- updateViewSettings: (...m) => Nt(...m, n, E, y, D)
1021
+ updateViewSettings: (...f) => Gt(...f, n, E, v, T)
1021
1022
  },
1022
1023
  context: {},
1023
1024
  state: i,
1024
- dispatch: c,
1025
+ dispatch: u,
1025
1026
  useSelector: o,
1026
- onOpenImage: s,
1027
- onGoToFrame: a,
1027
+ onOpenImage: a,
1028
+ onGoToFrame: s,
1028
1029
  onOpenViewer: h,
1029
1030
  onUpdateEntity: l,
1030
1031
  toast: he,
1031
- ...f
1032
+ ...m
1032
1033
  }
1033
1034
  );
1034
- }, es = ({ children: t, fields: e }) => {
1035
- const i = Ht.filter((c) => e.includes(c.value));
1036
- return /* @__PURE__ */ C("main", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ G(
1037
- $t,
1035
+ }, ea = ({ children: t, fields: e }) => {
1036
+ const i = Wt.filter((u) => e.includes(u.value));
1037
+ return /* @__PURE__ */ C("main", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ H(
1038
+ zt,
1038
1039
  {
1039
1040
  layout: "horizontal",
1040
1041
  style: { width: "100%", height: "100%" },
1041
- stateKey: Gt,
1042
+ stateKey: Ht,
1042
1043
  stateStorage: "local",
1043
1044
  children: [
1044
- /* @__PURE__ */ C(Ie, { ...zt, children: /* @__PURE__ */ C(ct, { wrap: !0, children: /* @__PURE__ */ C(Yt, { sliceFields: i, pinnedSliceType: "hierarchy" }) }) }),
1045
+ /* @__PURE__ */ C(Ie, { ...Yt, children: /* @__PURE__ */ C(ut, { wrap: !0, children: /* @__PURE__ */ C($t, { sliceFields: i, pinnedSliceType: "hierarchy" }) }) }),
1045
1046
  /* @__PURE__ */ C(Ie, { size: 80, children: t })
1046
1047
  ]
1047
1048
  }
1048
1049
  ) });
1049
- }, aa = ({
1050
+ }, ss = ({
1050
1051
  Component: t,
1051
1052
  projectName: e,
1052
1053
  slicer: i,
1053
- state: c = {},
1054
+ state: u = {},
1054
1055
  addonProps: o,
1055
- ...s
1056
+ ...a
1056
1057
  }) => {
1057
- let a = /* @__PURE__ */ C(_e, { Component: t, projectName: e, ...s });
1058
+ let s = /* @__PURE__ */ C(Fe, { Component: t, projectName: e, ...a });
1058
1059
  if (i && e) {
1059
1060
  let h = null;
1060
1061
  try {
@@ -1062,20 +1063,21 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
1062
1063
  } catch {
1063
1064
  console.log("Slicer context not available for this addon page");
1064
1065
  }
1065
- a = /* @__PURE__ */ C(es, { fields: i.fields, children: /* @__PURE__ */ C(
1066
- _e,
1066
+ s = /* @__PURE__ */ C(ea, { fields: i.fields, children: /* @__PURE__ */ C(
1067
+ Fe,
1067
1068
  {
1068
1069
  Component: t,
1069
1070
  projectName: e,
1070
- ...s,
1071
- state: { slicer: h, ...c },
1071
+ ...a,
1072
+ state: { slicer: h, ...u },
1072
1073
  ...o
1073
1074
  }
1074
1075
  ) });
1075
1076
  }
1076
- return a;
1077
- }, ts = /* @__PURE__ */ new Set([
1077
+ return s;
1078
+ }, ta = /* @__PURE__ */ new Set([
1078
1079
  "name",
1080
+ "extension",
1079
1081
  "status",
1080
1082
  "tags",
1081
1083
  "assignees",
@@ -1089,29 +1091,29 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
1089
1091
  "hasReviewables",
1090
1092
  "createdAt",
1091
1093
  "updatedAt"
1092
- ]), oa = ({
1094
+ ]), os = ({
1093
1095
  filterTypes: t = [],
1094
1096
  projectNames: e,
1095
1097
  scope: i,
1096
- scopes: c,
1098
+ scopes: u,
1097
1099
  data: o,
1098
- config: s,
1099
- power: a
1100
+ config: a,
1101
+ power: s
1100
1102
  }) => {
1101
- const h = vt(), l = o.productTypes || [], f = o.productBaseTypes || [];
1103
+ const h = vt(), l = o.productTypes || [], m = o.productBaseTypes || [];
1102
1104
  let n = [];
1103
- const E = /* @__PURE__ */ new Map(), y = c || (i ? Array.isArray(i) ? i : [i] : []).map((v) => ({
1104
- scope: v,
1105
+ const E = /* @__PURE__ */ new Map(), v = u || (i ? Array.isArray(i) ? i : [i] : []).map((w) => ({
1106
+ scope: w,
1105
1107
  filterTypes: t
1106
- })), D = y.length > 1, m = new Set(
1107
- Array.from(new Set(y.flatMap(({ filterTypes: b }) => b))).filter(
1108
- (b) => y.filter(({ filterTypes: v }) => v.includes(b)).length > 1
1108
+ })), T = v.length > 1, f = new Set(
1109
+ Array.from(new Set(v.flatMap(({ filterTypes: b }) => b))).filter(
1110
+ (b) => v.filter(({ filterTypes: w }) => w.includes(b)).length > 1
1109
1111
  )
1110
- ), A = y.some(
1111
- (b) => ["entitySubType", "status"].some((v) => b.filterTypes.includes(v))
1112
- ), R = y.some(
1112
+ ), A = v.some(
1113
+ (b) => ["entitySubType", "status"].some((w) => b.filterTypes.includes(w))
1114
+ ), R = v.some(
1113
1115
  (b) => ["assignees", "users", "author"].some(
1114
- (v) => b.filterTypes.includes(v)
1116
+ (w) => b.filterTypes.includes(w)
1115
1117
  )
1116
1118
  ), { data: g = {} } = At(
1117
1119
  {
@@ -1120,110 +1122,110 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
1120
1122
  {
1121
1123
  skip: !e?.length || !A
1122
1124
  }
1123
- ), { data: T = [] } = Ft(
1125
+ ), { data: V = [] } = xt(
1124
1126
  { projects: e },
1125
1127
  {
1126
1128
  skip: !e?.length || !R
1127
1129
  }
1128
- ), { attributes: I } = Be(), N = lt(pt), L = N?.attribFields?.length ? N.attribFields : I, M = /* @__PURE__ */ new Map();
1129
- y.forEach(({ scope: b, filterTypes: v }) => {
1130
- v.includes("attributes") && L.filter((O) => O.scope?.includes(b)).forEach((O) => {
1131
- M.set(
1132
- O.name,
1133
- (M.get(O.name) || 0) + 1
1130
+ ), { attributes: I } = Be(), M = lt(pt), N = M?.attribFields?.length ? M.attribFields : I, L = /* @__PURE__ */ new Map();
1131
+ v.forEach(({ scope: b, filterTypes: w }) => {
1132
+ w.includes("attributes") && N.filter((S) => S.scope?.includes(b)).forEach((S) => {
1133
+ L.set(
1134
+ S.name,
1135
+ (L.get(S.name) || 0) + 1
1134
1136
  );
1135
1137
  });
1136
- }), y.forEach(({ scope: b, filterTypes: v }) => {
1137
- const O = D ? b : void 0;
1138
- if (v.includes("taskType") && b !== "user") {
1139
- const r = H(
1138
+ }), v.forEach(({ scope: b, filterTypes: w }) => {
1139
+ const S = T ? b : void 0;
1140
+ if (w.includes("taskType") && b !== "user") {
1141
+ const r = G(
1140
1142
  "taskType",
1141
1143
  {
1142
- ...s,
1144
+ ...a,
1143
1145
  enableOperatorChange: !1
1144
1146
  },
1145
- O,
1146
- m.has("taskType")
1147
+ S,
1148
+ f.has("taskType")
1147
1149
  );
1148
1150
  if (r) {
1149
1151
  let p = ve({ projectsInfo: g, productTypes: l }, "task");
1150
1152
  r.values?.push(...p), n.push(r);
1151
1153
  }
1152
1154
  }
1153
- if (v.includes("folderType") && b !== "user") {
1154
- const r = H(
1155
+ if (w.includes("folderType") && b !== "user") {
1156
+ const r = G(
1155
1157
  "folderType",
1156
1158
  {
1157
- ...s,
1159
+ ...a,
1158
1160
  enableOperatorChange: !1
1159
1161
  },
1160
- O,
1161
- m.has("folderType")
1162
+ S,
1163
+ f.has("folderType")
1162
1164
  );
1163
1165
  if (r) {
1164
1166
  let p = ve({ projectsInfo: g, productTypes: l }, "folder");
1165
1167
  r.values?.push(...p), n.push(r);
1166
1168
  }
1167
1169
  }
1168
- if (v.includes("productType") && b !== "user") {
1169
- const r = H(
1170
+ if (w.includes("productType") && b !== "user") {
1171
+ const r = G(
1170
1172
  "productType",
1171
1173
  {
1172
- ...s,
1174
+ ...a,
1173
1175
  enableOperatorChange: !1
1174
1176
  },
1175
- O,
1176
- m.has("productType")
1177
+ S,
1178
+ f.has("productType")
1177
1179
  );
1178
1180
  if (r) {
1179
1181
  let p = ve({ projectsInfo: g, productTypes: l }, "product");
1180
1182
  r.values?.push(...p), n.push(r);
1181
1183
  }
1182
1184
  }
1183
- if (v.includes("productBaseType") && b !== "user") {
1184
- const r = H(
1185
+ if (w.includes("productBaseType") && b !== "user") {
1186
+ const r = G(
1185
1187
  "productBaseType",
1186
1188
  {
1187
- ...s,
1189
+ ...a,
1188
1190
  enableOperatorChange: !1
1189
1191
  },
1190
- O,
1191
- m.has("productBaseType")
1192
+ S,
1193
+ f.has("productBaseType")
1192
1194
  );
1193
- r && (f.forEach(({ icon: p, name: u }) => {
1194
- r.values?.some((d) => d.id === u) || r.values?.push({
1195
- id: u,
1196
- label: u,
1197
- icon: p || ae("product")
1195
+ r && (m.forEach(({ icon: p, name: c }) => {
1196
+ r.values?.some((d) => d.id === c) || r.values?.push({
1197
+ id: c,
1198
+ label: c,
1199
+ icon: p || se("product")
1198
1200
  });
1199
- }), o.productBaseTypes?.forEach(({ icon: p, name: u }) => {
1200
- r.values?.some((d) => d.id === u) || r.values?.push({
1201
- id: u,
1202
- label: u,
1203
- icon: p || ae("product")
1201
+ }), o.productBaseTypes?.forEach(({ icon: p, name: c }) => {
1202
+ r.values?.some((d) => d.id === c) || r.values?.push({
1203
+ id: c,
1204
+ label: c,
1205
+ icon: p || se("product")
1204
1206
  });
1205
1207
  }), n.push(r));
1206
1208
  }
1207
- if (v.includes("productName") && b === "product") {
1208
- const r = H(
1209
+ if (w.includes("productName") && b === "product") {
1210
+ const r = G(
1209
1211
  "productName",
1210
- s,
1211
- O,
1212
- m.has("productName")
1212
+ a,
1213
+ S,
1214
+ f.has("productName")
1213
1215
  );
1214
1216
  r && (o.productNames?.forEach((p) => {
1215
- r.values?.some((u) => u.id === p) || r.values?.push({
1217
+ r.values?.some((c) => c.id === p) || r.values?.push({
1216
1218
  id: p,
1217
1219
  label: p
1218
1220
  });
1219
1221
  }), n.push(r));
1220
1222
  }
1221
- if (v.includes("status")) {
1222
- const r = H(
1223
+ if (w.includes("status")) {
1224
+ const r = G(
1223
1225
  "status",
1224
- { ...s, enableOperatorChange: !1 },
1225
- O,
1226
- m.has("status")
1226
+ { ...a, enableOperatorChange: !1 },
1227
+ S,
1228
+ f.has("status")
1227
1229
  );
1228
1230
  r && (Object.values(g).forEach((p) => {
1229
1231
  (p?.statuses || []).filter((d) => d.scope?.includes(b)).forEach((d) => {
@@ -1236,34 +1238,34 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
1236
1238
  });
1237
1239
  }), n.push(r));
1238
1240
  }
1239
- if (v.includes("assignees")) {
1240
- const r = H(
1241
+ if (w.includes("assignees")) {
1242
+ const r = G(
1241
1243
  "assignees",
1242
- s,
1243
- O,
1244
- m.has("assignees")
1244
+ a,
1245
+ S,
1246
+ f.has("assignees")
1245
1247
  );
1246
- r && (T.forEach((p) => {
1247
- r.values?.some((u) => u.id === p.name) || r.values?.push({
1248
+ r && (V.forEach((p) => {
1249
+ r.values?.some((c) => c.id === p.name) || r.values?.push({
1248
1250
  id: p.name,
1249
1251
  label: p.attrib.fullName || p.name,
1250
1252
  img: `/api/users/${p.name}/avatar`,
1251
1253
  icon: null
1252
1254
  });
1253
- }), r.values?.sort((p, u) => {
1254
- const d = o.assignees?.filter((F) => F === p.id).length || 0;
1255
- return (o.assignees?.filter((F) => F === u.id).length || 0) - d;
1255
+ }), r.values?.sort((p, c) => {
1256
+ const d = o.assignees?.filter((x) => x === p.id).length || 0;
1257
+ return (o.assignees?.filter((x) => x === c.id).length || 0) - d;
1256
1258
  }), n.push(r));
1257
1259
  }
1258
- if (v.includes("author")) {
1259
- const r = H(
1260
+ if (w.includes("author")) {
1261
+ const r = G(
1260
1262
  "author",
1261
- s,
1262
- O,
1263
- m.has("author")
1263
+ a,
1264
+ S,
1265
+ f.has("author")
1264
1266
  );
1265
- r && (T.forEach((p) => {
1266
- r.values?.some((u) => u.id === p.name) || r.values?.push({
1267
+ r && (V.forEach((p) => {
1268
+ r.values?.some((c) => c.id === p.name) || r.values?.push({
1267
1269
  id: p.name,
1268
1270
  label: p.attrib.fullName || p.name,
1269
1271
  img: `/api/users/${p.name}/avatar`,
@@ -1271,59 +1273,68 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
1271
1273
  });
1272
1274
  }), n.push(r));
1273
1275
  }
1274
- if (v.includes("tags")) {
1275
- const r = H("tags", s, O, m.has("tags"));
1276
+ if (w.includes("tags")) {
1277
+ const r = G("tags", a, S, f.has("tags"));
1276
1278
  if (r) {
1277
1279
  const p = /* @__PURE__ */ new Map();
1278
1280
  Object.values(g).forEach((k) => {
1279
- k?.tags && k.tags.forEach((F) => {
1280
- p.has(F.name) || p.set(F.name, F);
1281
+ k?.tags && k.tags.forEach((x) => {
1282
+ p.has(x.name) || p.set(x.name, x);
1281
1283
  });
1282
1284
  });
1283
- const u = /* @__PURE__ */ new Map();
1285
+ const c = /* @__PURE__ */ new Map();
1284
1286
  o.tags?.forEach((k) => {
1285
- const F = u.get(k);
1286
- if (F) {
1287
- F.count++;
1287
+ const x = c.get(k);
1288
+ if (x) {
1289
+ x.count++;
1288
1290
  return;
1289
1291
  } else {
1290
- const w = p.get(k);
1291
- u.set(k, {
1292
+ const y = p.get(k);
1293
+ c.set(k, {
1292
1294
  id: k,
1293
1295
  type: "string",
1294
1296
  label: k,
1295
1297
  values: [],
1296
- color: w?.color || null,
1298
+ color: y?.color || null,
1297
1299
  count: 1
1298
1300
  });
1299
1301
  }
1300
1302
  });
1301
- const d = Array.from(u.values()).sort(
1302
- (k, F) => F.count - k.count
1303
+ const d = Array.from(c.values()).sort(
1304
+ (k, x) => x.count - k.count
1303
1305
  );
1304
1306
  r.values?.push(...d), n.push(r);
1305
1307
  }
1306
1308
  }
1307
- if (v.includes("version")) {
1308
- const r = H("version", s, O);
1309
- r && (rt.forEach((u) => {
1309
+ if (w.includes("version")) {
1310
+ const r = G("version", a, S);
1311
+ r && (rt.forEach((c) => {
1310
1312
  r.values?.push({
1311
- id: u.value,
1312
- label: u.label,
1313
- icon: u.icon
1313
+ id: c.value,
1314
+ label: c.label,
1315
+ icon: c.icon
1314
1316
  });
1315
1317
  }), n.push(r));
1316
1318
  }
1317
- if (v.includes("name")) {
1318
- const r = H("name", s, O, m.has("name"));
1319
+ if (w.includes("name")) {
1320
+ const r = G("name", a, S, f.has("name"));
1319
1321
  r && n.push(r);
1320
1322
  }
1321
- if (v.includes("hasReviewables")) {
1322
- const r = H(
1323
+ if (w.includes("extension") && b === "representation") {
1324
+ const r = G(
1325
+ "extension",
1326
+ a,
1327
+ S,
1328
+ f.has("extension")
1329
+ );
1330
+ r && n.push(r);
1331
+ }
1332
+ if (w.includes("hasReviewables")) {
1333
+ const r = G(
1323
1334
  "hasReviewables",
1324
- s,
1325
- O,
1326
- m.has("hasReviewables")
1335
+ a,
1336
+ S,
1337
+ f.has("hasReviewables")
1327
1338
  );
1328
1339
  if (r) {
1329
1340
  const p = [
@@ -1341,63 +1352,65 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
1341
1352
  r.values?.push(...p), n.push(r);
1342
1353
  }
1343
1354
  }
1344
- if (v.includes("createdAt")) {
1345
- const r = H(
1355
+ if (w.includes("createdAt")) {
1356
+ const r = G(
1346
1357
  "createdAt",
1347
- s,
1348
- O,
1349
- m.has("createdAt")
1358
+ a,
1359
+ S,
1360
+ f.has("createdAt")
1350
1361
  );
1351
1362
  r && (r.values?.push(we), r.values?.push(
1352
1363
  ...ye().map((p) => ({
1353
1364
  ...p,
1354
- contentAfter: a ? void 0 : /* @__PURE__ */ C(le, { icon: "bolt" })
1365
+ contentAfter: s ? void 0 : /* @__PURE__ */ C(ie, { icon: "bolt" })
1355
1366
  }))
1356
1367
  ), n.push(r));
1357
1368
  }
1358
- if (v.includes("updatedAt")) {
1359
- const r = H(
1369
+ if (w.includes("updatedAt")) {
1370
+ const r = G(
1360
1371
  "updatedAt",
1361
- s,
1362
- O,
1363
- m.has("updatedAt")
1372
+ a,
1373
+ S,
1374
+ f.has("updatedAt")
1364
1375
  );
1365
1376
  r && (r.values?.push(we), r.values?.push(
1366
1377
  ...ye().map((p) => ({
1367
1378
  ...p,
1368
- contentAfter: a ? void 0 : /* @__PURE__ */ C(le, { icon: "bolt" })
1379
+ contentAfter: s ? void 0 : /* @__PURE__ */ C(ie, { icon: "bolt" })
1369
1380
  }))
1370
1381
  ), n.push(r));
1371
1382
  }
1372
- if (v.includes("attributes")) {
1373
- const r = L.filter(
1374
- (d) => d.scope?.includes(b)
1375
- ), p = Pt(o.attributes) ? r : r.filter(
1383
+ if (w.includes("attributes")) {
1384
+ const r = N.filter(
1385
+ (d) => d.scope?.includes(b) && // replaced by the dedicated extension option: publishing never sets this
1386
+ // attribute on representations, so filtering on it matches nothing
1387
+ !(w.includes("extension") && d.name === "extension")
1388
+ ), p = _t(o.attributes) ? r : r.filter(
1376
1389
  (d) => o.attributes && o.attributes[d.name]
1377
1390
  );
1378
- (s?.enableRelativeValues ? p : p.filter((d) => d.data.type !== "datetime")).forEach((d) => {
1379
- const k = o.attributes && o.attributes[d.name], F = d.data.enum, w = d.data.type, x = [
1391
+ (a?.enableRelativeValues ? p : p.filter((d) => d.data.type !== "datetime")).forEach((d) => {
1392
+ const k = o.attributes && o.attributes[d.name], x = d.data.enum, y = d.data.type, P = [
1380
1393
  "list_of_strings",
1381
1394
  "list_of_integers",
1382
1395
  "list_of_any",
1383
1396
  "list_of_submodels"
1384
- ].includes(w || ""), B = w === "datetime", W = w === "string", j = w === "integer" || w === "float", te = x ? s?.enableOperatorChange : !1, q = d.data.default !== void 0 && d.data.default !== null && d.data.inherit !== !1, pe = (x || B || W || j) && !q ? s?.enableRelativeValues : !1, X = ss(
1397
+ ].includes(y || ""), B = y === "datetime", W = y === "string", j = y === "integer" || y === "float", te = P ? a?.enableOperatorChange : !1, q = d.data.default !== void 0 && d.data.default !== null && d.data.inherit !== !1, pe = (P || B || W || j) && !q ? a?.enableRelativeValues : !1, X = aa(
1385
1398
  d,
1386
1399
  {
1387
- ...s,
1400
+ ...a,
1388
1401
  allowsCustomValues: !0,
1389
1402
  enableOperatorChange: te,
1390
1403
  enableRelativeValues: pe
1391
1404
  },
1392
- O,
1393
- (M.get(d.name) || 0) > 1
1405
+ S,
1406
+ (L.get(d.name) || 0) > 1
1394
1407
  );
1395
1408
  if (d.data.enumResolver) {
1396
- const J = d.data;
1397
- X.loadValuesKey = e?.[0], X.loadValues = async () => xe(
1409
+ const Q = d.data;
1410
+ X.loadValuesKey = e?.[0], X.loadValues = async () => Pe(
1398
1411
  k,
1399
- await h(J, e?.[0]),
1400
- w
1412
+ await h(Q, e?.[0]),
1413
+ y
1401
1414
  );
1402
1415
  }
1403
1416
  const fe = [
@@ -1406,13 +1419,13 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
1406
1419
  "float",
1407
1420
  "list_of_strings",
1408
1421
  "list_of_integers"
1409
- ], Q = [];
1410
- if (fe.includes(w)) {
1411
- const J = xe(k, F, w);
1412
- Q.push(...J);
1422
+ ], J = [];
1423
+ if (fe.includes(y)) {
1424
+ const Q = Pe(k, x, y);
1425
+ J.push(...Q);
1413
1426
  }
1414
- if (w === "boolean") {
1415
- const J = [
1427
+ if (y === "boolean") {
1428
+ const Q = [
1416
1429
  {
1417
1430
  id: "true",
1418
1431
  label: "Yes",
@@ -1424,56 +1437,56 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
1424
1437
  values: []
1425
1438
  }
1426
1439
  ];
1427
- Q.push(...J);
1440
+ J.push(...Q);
1428
1441
  }
1429
- B && (Q.push(we), Q.push(
1430
- ...ye().map((J) => ({
1431
- ...J,
1432
- contentAfter: a ? void 0 : /* @__PURE__ */ C(le, { icon: "bolt" })
1442
+ B && (J.push(we), J.push(
1443
+ ...ye().map((Q) => ({
1444
+ ...Q,
1445
+ contentAfter: s ? void 0 : /* @__PURE__ */ C(ie, { icon: "bolt" })
1433
1446
  }))
1434
- )), X.values?.push(...Q), E.set(X.id, d.name), n.push(X);
1447
+ )), X.values?.push(...J), E.set(X.id, d.name), n.push(X);
1435
1448
  });
1436
1449
  }
1437
1450
  });
1438
- const z = n.reduce((b, v) => {
1439
- if (!v.group) return b;
1440
- const O = typeof v.group == "string" ? void 0 : v.group, r = O?.name || v.group, p = y.some(({ scope: u }) => u === r);
1441
- return b.some((u) => u.name === r) || b.push({
1451
+ const Y = n.reduce((b, w) => {
1452
+ if (!w.group) return b;
1453
+ const S = typeof w.group == "string" ? void 0 : w.group, r = S?.name || w.group, p = v.some(({ scope: c }) => c === r);
1454
+ return b.some((c) => c.name === r) || b.push({
1442
1455
  name: r,
1443
- label: p ? de(r) : O?.label || v.label,
1444
- icon: p ? ae(r) : O?.icon || v.icon,
1445
- color: O?.color || v.color
1456
+ label: p ? de(r) : S?.label || w.label,
1457
+ icon: p ? se(r) : S?.icon || w.icon,
1458
+ color: S?.color || w.color
1446
1459
  }), b;
1447
- }, []), $ = as(n, E, L), V = os(
1448
- z,
1449
- $,
1460
+ }, []), K = sa(n, E, N), D = oa(
1461
+ Y,
1462
+ K,
1450
1463
  E,
1451
- L
1464
+ N
1452
1465
  );
1453
- return { options: $, groupOptions: V };
1466
+ return { options: K, groupOptions: D };
1454
1467
  }, ve = ({
1455
1468
  projectsInfo: t,
1456
1469
  productTypes: e
1457
1470
  }, i) => {
1458
- const c = [];
1459
- return i === "product" ? e.forEach(({ icon: o, name: s }) => {
1460
- c.push({
1461
- id: s,
1471
+ const u = [];
1472
+ return i === "product" ? e.forEach(({ icon: o, name: a }) => {
1473
+ u.push({
1474
+ id: a,
1462
1475
  type: "string",
1463
- label: s,
1464
- icon: o || ae("product"),
1476
+ label: a,
1477
+ icon: o || se("product"),
1465
1478
  inverted: !1,
1466
1479
  values: [],
1467
1480
  allowsCustomValues: !1
1468
1481
  });
1469
1482
  }) : i === "task" ? Object.values(t).forEach((o) => {
1470
- (o?.taskTypes || []).forEach((a) => {
1471
- c.some((h) => h.id === a.name) || c.push({
1472
- id: a.name,
1483
+ (o?.taskTypes || []).forEach((s) => {
1484
+ u.some((h) => h.id === s.name) || u.push({
1485
+ id: s.name,
1473
1486
  type: "string",
1474
- label: a.name,
1475
- icon: a.icon,
1476
- color: a.color,
1487
+ label: s.name,
1488
+ icon: s.icon,
1489
+ color: s.color,
1477
1490
  inverted: !1,
1478
1491
  values: [],
1479
1492
  allowsCustomValues: !1,
@@ -1485,13 +1498,13 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
1485
1498
  });
1486
1499
  });
1487
1500
  }) : i === "folder" && Object.values(t).forEach((o) => {
1488
- (o?.folderTypes || []).forEach((a) => {
1489
- c.some((h) => h.id === a.name) || c.push({
1490
- id: a.name,
1501
+ (o?.folderTypes || []).forEach((s) => {
1502
+ u.some((h) => h.id === s.name) || u.push({
1503
+ id: s.name,
1491
1504
  type: "string",
1492
- label: a.name,
1493
- icon: a.icon,
1494
- color: a.color,
1505
+ label: s.name,
1506
+ icon: s.icon,
1507
+ color: s.color,
1495
1508
  inverted: !1,
1496
1509
  values: [],
1497
1510
  allowsCustomValues: !1,
@@ -1502,21 +1515,21 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
1502
1515
  }
1503
1516
  });
1504
1517
  });
1505
- }), c;
1506
- }, Ue = (t, e, i, c) => {
1507
- const { prefixes: o, keys: s } = i || {};
1508
- let a = t;
1509
- return s && e in s ? a = `${s[e]}` : o && e in o && (a = `${o[e]}${t}`), c && (a = `${c}_${a}`), a;
1510
- }, H = (t, e, i, c = !1) => {
1518
+ }), u;
1519
+ }, Ue = (t, e, i, u) => {
1520
+ const { prefixes: o, keys: a } = i || {};
1521
+ let s = t;
1522
+ return a && e in a ? s = `${a[e]}` : o && e in o && (s = `${o[e]}${t}`), u && (s = `${u}_${s}`), s;
1523
+ }, G = (t, e, i, u = !1) => {
1511
1524
  const o = (l) => Ue(l, t, e, i);
1512
- let s = null;
1525
+ let a = null;
1513
1526
  switch (t) {
1514
1527
  case "taskType":
1515
- s = {
1528
+ a = {
1516
1529
  id: o("taskType"),
1517
1530
  type: "string",
1518
1531
  label: "Task Type",
1519
- icon: K("task"),
1532
+ icon: $("task"),
1520
1533
  inverted: !1,
1521
1534
  operator: "OR",
1522
1535
  values: [],
@@ -1528,11 +1541,11 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
1528
1541
  };
1529
1542
  break;
1530
1543
  case "folderType":
1531
- s = {
1544
+ a = {
1532
1545
  id: o("folderType"),
1533
1546
  type: "string",
1534
1547
  label: "Folder Type",
1535
- icon: K("folder"),
1548
+ icon: $("folder"),
1536
1549
  inverted: !1,
1537
1550
  operator: "OR",
1538
1551
  values: [],
@@ -1544,11 +1557,11 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
1544
1557
  };
1545
1558
  break;
1546
1559
  case "productType":
1547
- s = {
1560
+ a = {
1548
1561
  id: o("productType"),
1549
1562
  type: "string",
1550
1563
  label: "Product Type",
1551
- icon: K("product"),
1564
+ icon: $("product"),
1552
1565
  inverted: !1,
1553
1566
  operator: "OR",
1554
1567
  values: [],
@@ -1560,11 +1573,11 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
1560
1573
  };
1561
1574
  break;
1562
1575
  case "productBaseType":
1563
- s = {
1576
+ a = {
1564
1577
  id: o("productBaseType"),
1565
1578
  type: "string",
1566
1579
  label: "Product Base Type",
1567
- icon: K("product"),
1580
+ icon: $("product"),
1568
1581
  inverted: !1,
1569
1582
  operator: "OR",
1570
1583
  values: [],
@@ -1576,11 +1589,11 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
1576
1589
  };
1577
1590
  break;
1578
1591
  case "productName":
1579
- s = {
1592
+ a = {
1580
1593
  id: o("productNames"),
1581
1594
  type: "string",
1582
1595
  label: "Product Name",
1583
- icon: K("productName", "string"),
1596
+ icon: $("productName", "string"),
1584
1597
  inverted: !1,
1585
1598
  operator: "OR",
1586
1599
  values: [],
@@ -1592,11 +1605,11 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
1592
1605
  };
1593
1606
  break;
1594
1607
  case "status":
1595
- s = {
1608
+ a = {
1596
1609
  id: o("status"),
1597
1610
  type: "string",
1598
1611
  label: "Status",
1599
- icon: K("status"),
1612
+ icon: $("status"),
1600
1613
  inverted: !1,
1601
1614
  operator: "OR",
1602
1615
  values: [],
@@ -1608,11 +1621,11 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
1608
1621
  };
1609
1622
  break;
1610
1623
  case "assignees":
1611
- s = {
1624
+ a = {
1612
1625
  id: o("assignees"),
1613
1626
  type: "list_of_strings",
1614
1627
  label: "Assignee",
1615
- icon: K("assignees"),
1628
+ icon: $("assignees"),
1616
1629
  inverted: !1,
1617
1630
  operator: "OR",
1618
1631
  values: [],
@@ -1624,11 +1637,11 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
1624
1637
  };
1625
1638
  break;
1626
1639
  case "author":
1627
- s = {
1640
+ a = {
1628
1641
  id: o("author"),
1629
1642
  type: "string",
1630
1643
  label: "Author",
1631
- icon: K("author"),
1644
+ icon: $("author"),
1632
1645
  inverted: !1,
1633
1646
  operator: "OR",
1634
1647
  values: [],
@@ -1640,11 +1653,11 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
1640
1653
  };
1641
1654
  break;
1642
1655
  case "tags":
1643
- s = {
1656
+ a = {
1644
1657
  id: o("tags"),
1645
1658
  type: "list_of_strings",
1646
1659
  label: "Tags",
1647
- icon: K("tags"),
1660
+ icon: $("tags"),
1648
1661
  inverted: !1,
1649
1662
  operator: "OR",
1650
1663
  values: [],
@@ -1656,11 +1669,11 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
1656
1669
  };
1657
1670
  break;
1658
1671
  case "version":
1659
- s = {
1672
+ a = {
1660
1673
  id: o("version"),
1661
1674
  type: "string",
1662
1675
  label: "Version",
1663
- icon: ae("version"),
1676
+ icon: se("version"),
1664
1677
  inverted: !1,
1665
1678
  operator: "OR",
1666
1679
  values: [],
@@ -1673,7 +1686,7 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
1673
1686
  };
1674
1687
  break;
1675
1688
  case "name":
1676
- s = {
1689
+ a = {
1677
1690
  id: o("name"),
1678
1691
  type: "string",
1679
1692
  label: "Name",
@@ -1688,8 +1701,24 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
1688
1701
  operatorChangeable: !1
1689
1702
  };
1690
1703
  break;
1704
+ case "extension":
1705
+ a = {
1706
+ id: o("extension"),
1707
+ type: "string",
1708
+ label: "File Extension",
1709
+ icon: $("extension", "string"),
1710
+ inverted: !1,
1711
+ operator: "OR",
1712
+ values: [],
1713
+ allowsCustomValues: !0,
1714
+ allowHasValue: !1,
1715
+ allowNoValue: !1,
1716
+ allowExcludes: !1,
1717
+ operatorChangeable: !1
1718
+ };
1719
+ break;
1691
1720
  case "hasReviewables":
1692
- s = {
1721
+ a = {
1693
1722
  id: o("hasReviewables"),
1694
1723
  type: "boolean",
1695
1724
  label: "Has Reviewables",
@@ -1706,7 +1735,7 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
1706
1735
  };
1707
1736
  break;
1708
1737
  case "createdAt":
1709
- s = {
1738
+ a = {
1710
1739
  id: o("createdAt"),
1711
1740
  type: "datetime",
1712
1741
  label: "Created",
@@ -1723,7 +1752,7 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
1723
1752
  };
1724
1753
  break;
1725
1754
  case "updatedAt":
1726
- s = {
1755
+ a = {
1727
1756
  id: o("updatedAt"),
1728
1757
  type: "datetime",
1729
1758
  label: "Updated",
@@ -1740,21 +1769,21 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
1740
1769
  };
1741
1770
  break;
1742
1771
  }
1743
- const a = de(i || ""), h = (l) => i ? `${a} ${l}` : l;
1744
- if ((c || i) && s) {
1772
+ const s = de(i || ""), h = (l) => i ? `${s} ${l}` : l;
1773
+ if ((u || i) && a) {
1745
1774
  const l = i || t;
1746
- s.group = {
1775
+ a.group = {
1747
1776
  name: l,
1748
- label: i ? de(i) : s.label,
1749
- icon: i ? ae(i) : s.icon
1777
+ label: i ? de(i) : a.label,
1778
+ icon: i ? se(i) : a.icon
1750
1779
  };
1751
1780
  }
1752
- return s && i && (s.tooltip = h(s.label), s.value = { label: h(s.label) }), s && t === "version" && i === "version" && (s.value = { label: "Product Version" }, s.tooltip = "Product Version"), s;
1753
- }, ss = (t, e, i, c = !1) => {
1754
- const o = t.data.title || t.name, s = c || i ? {
1781
+ return a && i && (a.tooltip = h(a.label), a.value = { label: h(a.label) }), a && t === "version" && i === "version" && (a.value = { label: "Product Version" }, a.tooltip = "Product Version"), a;
1782
+ }, aa = (t, e, i, u = !1) => {
1783
+ const o = t.data.title || t.name, a = u || i ? {
1755
1784
  name: i || t.name,
1756
1785
  label: i ? de(i) : o,
1757
- icon: i ? ae(i) : K(t.name, t.data.type, Re(t.data))
1786
+ icon: i ? se(i) : $(t.name, t.data.type, Re(t.data))
1758
1787
  } : void 0;
1759
1788
  return {
1760
1789
  id: Ue(t.name, "attributes", e, i),
@@ -1768,27 +1797,27 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
1768
1797
  allowNoValue: e.enableRelativeValues,
1769
1798
  allowExcludes: e?.enableExcludes,
1770
1799
  operatorChangeable: e?.enableOperatorChange,
1771
- icon: K(t.name, t.data.type, Re(t.data)),
1772
- group: s,
1800
+ icon: $(t.name, t.data.type, Re(t.data)),
1801
+ group: a,
1773
1802
  tooltip: i ? `${de(i)} ${o}` : void 0,
1774
- value: i ? { icon: ae(i) } : void 0,
1803
+ value: i ? { icon: se(i) } : void 0,
1775
1804
  singleSelect: ["boolean", "datetime"].includes(t.data.type || "")
1776
1805
  };
1777
- }, xe = (t, e, i) => {
1778
- const c = [], o = [];
1806
+ }, Pe = (t, e, i) => {
1807
+ const u = [], o = [];
1779
1808
  if (e) {
1780
- const s = (t || []).flatMap((a) => Array.isArray(a) ? a : [a]);
1781
- Et(e, s).forEach(
1782
- (a) => {
1783
- const h = a.icon, l = Ct(h);
1784
- c.push({
1785
- id: a.value.toString(),
1809
+ const a = (t || []).flatMap((s) => Array.isArray(s) ? s : [s]);
1810
+ Et(e, a).forEach(
1811
+ (s) => {
1812
+ const h = s.icon, l = Ct(h);
1813
+ u.push({
1814
+ id: s.value.toString(),
1786
1815
  type: i,
1787
- label: a.label,
1816
+ label: s.label,
1788
1817
  values: [],
1789
1818
  icon: l ? null : h,
1790
1819
  img: l ? h : void 0,
1791
- color: a.color,
1820
+ color: s.color,
1792
1821
  pt: {
1793
1822
  style: { color: "inherit" }
1794
1823
  }
@@ -1796,147 +1825,150 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
1796
1825
  }
1797
1826
  );
1798
1827
  }
1799
- return t?.forEach((s) => {
1800
- if (!s) return;
1801
- let a = "";
1802
- switch (typeof s) {
1828
+ return t?.forEach((a) => {
1829
+ if (!a) return;
1830
+ let s = "";
1831
+ switch (typeof a) {
1803
1832
  case "string":
1804
1833
  case "number":
1805
1834
  case "boolean":
1806
- a = s.toString();
1835
+ s = a.toString();
1807
1836
  break;
1808
1837
  case "object":
1809
- Array.isArray(s) ? a = s.join(", ") : a = JSON.stringify(s);
1838
+ Array.isArray(a) ? s = a.join(", ") : s = JSON.stringify(a);
1810
1839
  break;
1811
1840
  }
1812
- const h = a.trim().toLowerCase().replace(/[^a-z0-9\s]/g, "").replace(/\s+/g, "-");
1813
- if (c?.find((n) => n.id === h)) return;
1814
- const f = o.find((n) => n.id === h);
1815
- if (f) {
1816
- f.count++;
1841
+ const h = s.trim().toLowerCase().replace(/[^a-z0-9\s]/g, "").replace(/\s+/g, "-");
1842
+ if (u?.find((n) => n.id === h)) return;
1843
+ const m = o.find((n) => n.id === h);
1844
+ if (m) {
1845
+ m.count++;
1817
1846
  return;
1818
1847
  } else
1819
1848
  o.push({
1820
1849
  id: h,
1821
1850
  type: i,
1822
- label: a,
1851
+ label: s,
1823
1852
  values: [],
1824
1853
  count: 1
1825
1854
  });
1826
- }), o.sort((s, a) => a.count - s.count), [...c, ...o];
1827
- }, as = (t, e, i) => [...t].sort((c, o) => We(
1828
- ge(c),
1829
- e.get(c.id),
1855
+ }), o.sort((a, s) => s.count - a.count), [...u, ...o];
1856
+ }, sa = (t, e, i) => [...t].sort((u, o) => Ge(
1857
+ ge(u),
1858
+ e.get(u.id),
1830
1859
  ge(o),
1831
1860
  e.get(o.id),
1832
1861
  i
1833
- )), ge = (t) => t.group ? typeof t.group == "string" ? t.group : t.group.name : t.id, os = (t, e, i, c) => [...t].sort((o, s) => {
1834
- const a = e.find((l) => (typeof l.group == "string" ? l.group : l.group?.name) === o.name), h = e.find((l) => (typeof l.group == "string" ? l.group : l.group?.name) === s.name);
1835
- return We(
1836
- a ? ge(a) : o.name,
1837
- a ? i.get(a.id) : o.name,
1838
- h ? ge(h) : s.name,
1839
- h ? i.get(h.id) : s.name,
1840
- c
1862
+ )), ge = (t) => t.group ? typeof t.group == "string" ? t.group : t.group.name : t.id, oa = (t, e, i, u) => [...t].sort((o, a) => {
1863
+ const s = e.find((l) => (typeof l.group == "string" ? l.group : l.group?.name) === o.name), h = e.find((l) => (typeof l.group == "string" ? l.group : l.group?.name) === a.name);
1864
+ return Ge(
1865
+ s ? ge(s) : o.name,
1866
+ s ? i.get(s.id) : o.name,
1867
+ h ? ge(h) : a.name,
1868
+ h ? i.get(h.id) : a.name,
1869
+ u
1841
1870
  );
1842
- }), We = (t, e, i, c, o) => {
1843
- const s = new Map(o.map((f, n) => [f.name, n])), a = (f) => {
1871
+ }), Ge = (t, e, i, u, o) => {
1872
+ const a = new Map(o.map((m, n) => [m.name, n])), s = (m) => {
1844
1873
  let n = 0;
1845
- for (const E of ts) {
1846
- if (f === E || f.endsWith(`_${E}`)) return n;
1874
+ for (const E of ta) {
1875
+ if (m === E || m.endsWith(`_${E}`)) return n;
1847
1876
  n++;
1848
1877
  }
1849
1878
  return Number.MAX_SAFE_INTEGER;
1850
- }, h = e ? [1, s.get(e) ?? Number.MAX_SAFE_INTEGER] : [0, a(t)], l = c ? [1, s.get(c) ?? Number.MAX_SAFE_INTEGER] : [0, a(i)];
1879
+ }, h = e ? [1, a.get(e) ?? Number.MAX_SAFE_INTEGER] : [0, s(t)], l = u ? [1, a.get(u) ?? Number.MAX_SAFE_INTEGER] : [0, s(i)];
1851
1880
  return h[0] - l[0] || h[1] - l[1];
1852
- }, na = (t, e, i, c) => {
1881
+ }, ns = (t, e, i, u) => {
1853
1882
  const o = {
1854
1883
  folder: { conditions: [], operator: t?.operator || "and" },
1855
1884
  product: { conditions: [], operator: t?.operator || "and" },
1856
1885
  task: { conditions: [], operator: t?.operator || "and" },
1857
1886
  user: { conditions: [], operator: t?.operator || "and" },
1858
1887
  version: { conditions: [], operator: t?.operator || "and" },
1888
+ representation: { conditions: [], operator: t?.operator || "and" },
1859
1889
  unscoped: { conditions: [], operator: t?.operator || "and" }
1860
1890
  };
1861
1891
  if (!t?.conditions || t?.conditions.length === 0)
1862
1892
  return o;
1863
- const s = (l) => {
1864
- const f = e.find((n) => l.startsWith(`${n}_`));
1865
- if (f) {
1866
- const n = l.substring(`${f}_`.length);
1867
- return { scope: f, cleanId: n };
1893
+ const a = (l) => {
1894
+ const m = e.find((n) => l.startsWith(`${n}_`));
1895
+ if (m) {
1896
+ const n = l.substring(`${m}_`.length);
1897
+ return { scope: m, cleanId: n };
1868
1898
  } else if (i?.fallbackScope)
1869
1899
  return { scope: i.fallbackScope, cleanId: l };
1870
1900
  return { scope: null, cleanId: l };
1871
- }, a = (l) => {
1872
- const f = {
1901
+ }, s = (l) => {
1902
+ const m = {
1873
1903
  folder: [],
1874
1904
  product: [],
1875
1905
  task: [],
1876
1906
  user: [],
1877
1907
  version: [],
1908
+ representation: [],
1878
1909
  unscoped: []
1879
1910
  };
1880
1911
  if ("conditions" in l && !("key" in l)) {
1881
- const n = (l.conditions || []).map((E) => a(E));
1882
- Object.keys(f).forEach((E) => {
1883
- const y = E, D = n.flatMap((m) => m[y]);
1884
- D.length > 0 && (D.length === 1 && !l.operator ? f[y].push(D[0]) : f[y].push({
1885
- conditions: D,
1912
+ const n = (l.conditions || []).map((E) => s(E));
1913
+ Object.keys(m).forEach((E) => {
1914
+ const v = E, T = n.flatMap((f) => f[v]);
1915
+ T.length > 0 && (T.length === 1 && !l.operator ? m[v].push(T[0]) : m[v].push({
1916
+ conditions: T,
1886
1917
  operator: l.operator
1887
1918
  }));
1888
1919
  });
1889
1920
  } else if ("key" in l) {
1890
- const { scope: n, cleanId: E } = s(l.key);
1921
+ const { scope: n, cleanId: E } = a(l.key);
1891
1922
  if (n)
1892
- f[n].push({ ...l, key: E });
1923
+ m[n].push({ ...l, key: E });
1893
1924
  else {
1894
- const y = c?.[l.key];
1895
- y ? f[y].push(l) : l.key === ut || l.key === "name" || l.key?.endsWith("_name") ? e.forEach((D) => {
1896
- f[D].push(l);
1897
- }) : f.unscoped.push(l);
1925
+ const v = u?.[l.key];
1926
+ v ? m[v].push(l) : l.key === ct || l.key === "name" || l.key?.endsWith("_name") ? e.forEach((T) => {
1927
+ m[T].push(l);
1928
+ }) : m.unscoped.push(l);
1898
1929
  }
1899
1930
  }
1900
- return f;
1901
- }, h = (t.conditions || []).map((l) => a(l));
1931
+ return m;
1932
+ }, h = (t.conditions || []).map((l) => s(l));
1902
1933
  return Object.keys(o).forEach((l) => {
1903
- const f = l;
1904
- o[f].conditions = h.flatMap((n) => n[f]);
1934
+ const m = l;
1935
+ o[m].conditions = h.flatMap((n) => n[m]);
1905
1936
  }), o;
1906
- }, ra = (t, e, i) => {
1907
- const c = {
1937
+ }, rs = (t, e, i) => {
1938
+ const u = {
1908
1939
  folder: [],
1909
1940
  product: [],
1910
1941
  task: [],
1911
1942
  user: [],
1912
1943
  version: [],
1944
+ representation: [],
1913
1945
  unscoped: []
1914
1946
  };
1915
1947
  if (!t || t.length === 0)
1916
- return c;
1917
- const o = (a) => e.find((l) => a.startsWith(`${l}_`)) || null, s = (a, h) => {
1948
+ return u;
1949
+ const o = (s) => e.find((l) => s.startsWith(`${l}_`)) || null, a = (s, h) => {
1918
1950
  const l = `${h}_`;
1919
- return a.startsWith(l) ? a.substring(l.length) : a;
1951
+ return s.startsWith(l) ? s.substring(l.length) : s;
1920
1952
  };
1921
- return t.forEach((a) => {
1922
- if (!a.id) return;
1923
- const h = o(a.id);
1953
+ return t.forEach((s) => {
1954
+ if (!s.id) return;
1955
+ const h = o(s.id);
1924
1956
  if (h) {
1925
1957
  const l = {
1926
- ...a,
1927
- id: s(a.id, h)
1958
+ ...s,
1959
+ id: a(s.id, h)
1928
1960
  };
1929
- c[h].push(l);
1961
+ u[h].push(l);
1930
1962
  } else {
1931
- const l = i?.[a.id];
1932
- l ? c[l].push(a) : c.unscoped.push(a);
1963
+ const l = i?.[s.id];
1964
+ l ? u[l].push(s) : u.unscoped.push(s);
1933
1965
  }
1934
- }), c;
1935
- }, ce = ["status", "tags", "attributes", "createdAt", "updatedAt"], ns = {
1936
- folder: [...ce, "name", "folderType"],
1937
- task: [...ce, "name", "taskType", "folderType", "assignees"],
1966
+ }), u;
1967
+ }, re = ["status", "tags", "attributes", "createdAt", "updatedAt"], na = {
1968
+ folder: [...re, "name", "folderType"],
1969
+ task: [...re, "name", "taskType", "folderType", "assignees"],
1938
1970
  version: [
1939
- ...ce,
1971
+ ...re,
1940
1972
  "version",
1941
1973
  "productName",
1942
1974
  "productType",
@@ -1946,145 +1978,185 @@ const Ae = 500, Zt = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xs = ({
1946
1978
  "taskType",
1947
1979
  "folderType"
1948
1980
  ],
1949
- product: [...ce, "productName", "productBaseType"],
1950
- user: [...ce]
1951
- }, la = (t, e) => t.map((i) => ({
1981
+ product: [...re, "productName", "productBaseType"],
1982
+ representation: [...re, "name", "extension"],
1983
+ user: [...re]
1984
+ }, ls = (t, e) => t.map((i) => ({
1952
1985
  scope: i,
1953
- filterTypes: ns[i].filter((c) => !e?.[i]?.includes(c))
1986
+ filterTypes: na[i].filter((u) => !e?.[i]?.includes(u))
1954
1987
  }));
1955
1988
  export {
1956
- Qs as ACCESS_LEVEL_LABELS,
1957
- Xs as AccessSearchInput,
1989
+ oo as $createMediaNode,
1990
+ no as $createMentionNode,
1991
+ ro as $createYouTubeNode,
1992
+ lo as $getMarkdown,
1993
+ io as $isMediaNode,
1994
+ uo as $isMentionNode,
1995
+ co as $isYouTubeNode,
1996
+ po as $setMarkdown,
1997
+ Ja as ACCESS_LEVEL_LABELS,
1998
+ fo as ACTIVITY_LINK_LABEL,
1999
+ Xa as AccessSearchInput,
1958
2000
  ke as AccessUser,
1959
- ua as AddColumnButton,
1960
- ja as AddNewLinks,
1961
- da as AddonLoadingScreen,
1962
- pa as AttributeEditor,
1963
- Ve as BLOCK_DIALOG_CLOSE_CLASS,
1964
- za as Badge,
1965
- Ya as BadgeWrapper,
1966
- oo as CUSTOM_RANGE_ICON,
1967
- no as CUSTOM_RANGE_ID,
1968
- ro as CellEditingDialog,
1969
- Xa as Chips,
1970
- xn as ColumnHeaderMenuUI,
1971
- pn as ColumnMenuButton,
1972
- fa as ColumnsSettings,
1973
- ma as ColumnsSettingsWithContext,
1974
- On as CustomDateRangeDialog,
1975
- ha as CustomizeButton,
1976
- ga as DEFAULT_FEATURED_ORDER,
1977
- bo as DELETE_CONFIRM_THRESHOLD,
1978
- Eo as DELETE_TYPE_ORDER,
1979
- Js as DateRangePicker,
1980
- wo as DeleteConfirmContent,
1981
- Co as DeleteEntitiesConfirmDialog,
1982
- Qa as DescriptionSection,
1983
- To as DetailsDialog,
2001
+ cs as AddColumnButton,
2002
+ js as AddNewLinks,
2003
+ ds as AddonLoadingScreen,
2004
+ ps as AttributeEditor,
2005
+ De as BLOCK_DIALOG_CLOSE_CLASS,
2006
+ Ys as Badge,
2007
+ $s as BadgeWrapper,
2008
+ mo as CUSTOM_RANGE_ICON,
2009
+ ho as CUSTOM_RANGE_ID,
2010
+ go as CellEditingDialog,
2011
+ Xs as Chips,
2012
+ Er as ColumnHeaderMenuUI,
2013
+ Wn as ColumnMenuButton,
2014
+ fs as ColumnsSettings,
2015
+ ms as ColumnsSettingsWithContext,
2016
+ nr as CustomDateRangeDialog,
2017
+ hs as CustomizeButton,
2018
+ gs as DEFAULT_FEATURED_ORDER,
2019
+ bo as DEFAULT_TOOLBAR,
2020
+ qo as DELETE_CONFIRM_THRESHOLD,
2021
+ an as DELETE_TYPE_ORDER,
2022
+ wo as DESCRIPTION_TOOLBAR,
2023
+ Qa as DateRangePicker,
2024
+ Zo as DeleteConfirmContent,
2025
+ sn as DeleteEntitiesConfirmDialog,
2026
+ Js as DescriptionSection,
2027
+ cn as DetailsDialog,
1984
2028
  wt as DetailsPanelAttributesEditor,
1985
- Io as DetailsPanelDetails,
2029
+ pn as DetailsPanelDetails,
1986
2030
  yt as DetailsSection,
1987
- lo as DoneCheckbox,
1988
- ln as ENTITY_TOOLTIP_TYPES,
1989
- ba as EVERYONE_GROUP_KEY,
1990
- wa as EVERY_GUESTS_KEY,
1991
- ya as EarlyPreview,
1992
- Wo as EmptyPlaceholder,
1993
- zo as EmptyPlaceholderFlex,
1994
- Yo as EmptyPlaceholderFlexWrapper,
1995
- Ja as EntityIcon,
1996
- sn as EntityPanelUploader,
1997
- an as EntityPath,
1998
- cn as EntityTooltip,
1999
- va as EnumEditor,
2000
- Ea as EnumEditorItem,
2031
+ yo as DoneCheckbox,
2032
+ Ln as ENTITY_TOOLTIP_TYPES,
2033
+ bs as EVERYONE_GROUP_KEY,
2034
+ ws as EVERY_GUESTS_KEY,
2035
+ ys as EarlyPreview,
2036
+ kn as EmptyPlaceholder,
2037
+ Tn as EmptyPlaceholderFlex,
2038
+ Dn as EmptyPlaceholderFlexWrapper,
2039
+ Qs as EntityIcon,
2040
+ _n as EntityPanelUploader,
2041
+ Fn as EntityPath,
2042
+ Bn as EntityTooltip,
2043
+ vs as EnumEditor,
2044
+ Es as EnumEditorItem,
2001
2045
  rt as FEATURED_VERSION_TYPES,
2002
- ns as FILTER_TYPES_BY_SCOPE,
2003
- Ca as FeaturedVersionOrder,
2004
- xt as FeedbackContext,
2005
- Zs as FeedbackProvider,
2006
- Ao as FieldLabel,
2007
- Fo as FileThumbnail,
2008
- bn as FilterErrorActions,
2046
+ na as FILTER_TYPES_BY_SCOPE,
2047
+ vo as FLOATING_TOOLBAR,
2048
+ Cs as FeaturedVersionOrder,
2049
+ Bt as FeedbackContext,
2050
+ Za as FeedbackProvider,
2051
+ fn as FieldLabel,
2052
+ mn as FileThumbnail,
2053
+ Kn as FilterErrorActions,
2009
2054
  ot as FreeTrialLink,
2010
- ka as GROUP_KEY_PREFIX,
2011
- Sa as GUEST_KEY_PREFIX,
2012
- qo as InfoMessage,
2013
- en as JsonViewer,
2014
- Oa as LegacyBadge,
2015
- qa as LinkManagerItem,
2016
- Za as LinksManager,
2017
- ea as ListAttributeForm,
2018
- ta as ListMetaData,
2019
- $o as MENU_PORTAL_CONTENT_ID,
2020
- Ko as MENU_PORTAL_DIALOG_ID,
2021
- jo as Menu,
2022
- Xo as MenuContainer,
2023
- Qo as MenuList,
2024
- io as NO_DATE,
2025
- Ho as Placeholder,
2026
- Da as PowerpackButton,
2027
- sa as PowerpackDialog,
2028
- aa as ProjectPageRemote,
2029
- Va as ProjectTableSettings,
2030
- yo as RefreshToast,
2031
- _e as RemotePageWrapper,
2032
- Ta as RequiredAddonVersion,
2033
- Po as ReviewableCard,
2034
- _o as ReviewableProgressCard,
2035
- xo as ReviewableUpload,
2036
- on as ReviewablesList,
2037
- Ra as ReviewablesSelector,
2038
- Ia as SettingOption,
2039
- Aa as SettingSwitch,
2040
- Fa as SettingsPanel,
2041
- Pa as SettingsPanelItemTemplate,
2042
- _a as ShareOptionIcon,
2043
- $a as SimpleForm,
2044
- Tn as SimpleFormDialog,
2045
- xa as SizeSlider,
2046
- La as SplitterStyles,
2047
- Lo as StackedThumbnails,
2048
- Na as StyledLink,
2055
+ ks as GROUP_KEY_PREFIX,
2056
+ Os as GUEST_KEY_PREFIX,
2057
+ Eo as INSERT_MENTION_TRIGGER_COMMAND,
2058
+ Rn as InfoMessage,
2059
+ An as JsonViewer,
2060
+ Ss as LegacyBadge,
2061
+ qs as LinkManagerItem,
2062
+ Zs as LinksManager,
2063
+ es as ListAttributeForm,
2064
+ ts as ListMetaData,
2065
+ Co as MARKDOWN_TRANSFORMERS,
2066
+ ko as MENTION,
2067
+ Oo as MENTION_REF_TYPES,
2068
+ So as MENTION_TRIGGER_BY_TYPE,
2069
+ hr as MENU_PORTAL_CONTENT_ID,
2070
+ gr as MENU_PORTAL_DIALOG_ID,
2071
+ To as MarkdownEditor,
2072
+ Do as MediaBlock,
2073
+ Vo as MediaNode,
2074
+ Ro as MentionNode,
2075
+ br as Menu,
2076
+ wr as MenuContainer,
2077
+ yr as MenuList,
2078
+ Io as NO_DATE,
2079
+ On as Placeholder,
2080
+ Ts as PowerpackButton,
2081
+ as as PowerpackDialog,
2082
+ ss as ProjectPageRemote,
2083
+ Ds as ProjectTableSettings,
2084
+ en as RefreshToast,
2085
+ Fe as RemotePageWrapper,
2086
+ Vs as RequiredAddonVersion,
2087
+ hn as ReviewableCard,
2088
+ gn as ReviewableProgressCard,
2089
+ bn as ReviewableUpload,
2090
+ Pn as ReviewablesList,
2091
+ Rs as ReviewablesSelector,
2092
+ Is as SettingOption,
2093
+ As as SettingSwitch,
2094
+ xs as SettingsPanel,
2095
+ _s as SettingsPanelItemTemplate,
2096
+ Fs as ShareOptionIcon,
2097
+ zs as SimpleForm,
2098
+ ir as SimpleFormDialog,
2099
+ Ps as SizeSlider,
2100
+ Ns as SplitterStyles,
2101
+ wn as StackedThumbnails,
2102
+ Ms as StyledLink,
2049
2103
  eo as SubtasksManagerWrapper,
2050
- fn as SupportBubble,
2051
- En as SyncButton,
2052
- Ma as TEAM_KEY_PREFIX,
2053
- Ba as TableGridSwitch,
2054
- In as TableSearch,
2055
- yn as TableSettingsFallback,
2056
- No as Thumbnail,
2057
- Dn as ThumbnailSimple,
2058
- Ua as USER_KEY_PREFIX,
2059
- Wa as UploadVersionDialog,
2060
- co as UserImage,
2104
+ Hn as SupportBubble,
2105
+ ar as SyncButton,
2106
+ Ls as TEAM_KEY_PREFIX,
2107
+ Bs as TableGridSwitch,
2108
+ cr as TableSearch,
2109
+ er as TableSettingsFallback,
2110
+ yn as Thumbnail,
2111
+ rr as ThumbnailSimple,
2112
+ Us as USER_KEY_PREFIX,
2113
+ Gs as UploadVersionDialog,
2114
+ Ao as UserImage,
2061
2115
  qt as VersionUploadContext,
2062
- qs as VersionUploadProvider,
2063
- Mo as Watchers,
2064
- ko as buildChildrenDetails,
2065
- So as buildEntityLabel,
2066
- Oo as buildExpectedCounts,
2067
- la as buildScopes,
2116
+ qa as VersionUploadProvider,
2117
+ vn as Watchers,
2118
+ xo as YouTubeEmbed,
2119
+ _o as YouTubeNode,
2120
+ on as buildChildrenDetails,
2121
+ nn as buildEntityLabel,
2122
+ rn as buildExpectedCounts,
2123
+ ls as buildScopes,
2124
+ sr as buildSortMenuItem,
2125
+ Fo as createFeedMentionSource,
2068
2126
  we as customRangeOption,
2069
- uo as dateOptions,
2070
- po as datePresetOptions,
2071
- fo as detectRelativeDatePattern,
2072
- mo as filterDateFunctions,
2073
- ho as generateDateOptions,
2127
+ Po as dateOptions,
2128
+ No as datePresetOptions,
2129
+ Mo as detectRelativeDatePattern,
2130
+ Lo as filterDateFunctions,
2131
+ Bo as generateDateOptions,
2074
2132
  ye as generateDatePresetOptions,
2075
- nn as getGroupedReviewables,
2076
- Ha as getUiTypeLabel,
2133
+ Nn as getGroupedReviewables,
2134
+ Uo as getInlineMediaFileIds,
2135
+ Go as getLinkLabel,
2136
+ Wo as getMediaKind,
2137
+ Ho as getMentionTrigger,
2138
+ Yo as getProjectFileId,
2139
+ $o as getSourceLink,
2140
+ Ws as getUiTypeLabel,
2077
2141
  to as groupLinksByEntity,
2078
- Jt as parseFilename,
2079
- ra as splitClientFiltersByScope,
2080
- na as splitFiltersByScope,
2081
- Do as sumExpectedCounts,
2082
- oa as useBuildFilterOptions,
2083
- kn as useDateRangeFilter,
2084
- mn as useFeedback,
2085
- hn as useFeedbackSafe,
2086
- Fn as useOptionalVersionUploadContext,
2087
- Bo as useReviewablesUpload,
2088
- so as useUpdateLinks,
2089
- Pn as useVersionUploadContext
2142
+ zo as isMediaFile,
2143
+ Xn as markdownToPlainText,
2144
+ Ko as normalizeLegacyMarkdown,
2145
+ jo as parseActivityLink,
2146
+ Qt as parseFilename,
2147
+ Xo as parseYouTubeUrl,
2148
+ Jn as renderMediaParagraph,
2149
+ Qn as renderYouTubeParagraph,
2150
+ rs as splitClientFiltersByScope,
2151
+ ns as splitFiltersByScope,
2152
+ ln as sumExpectedCounts,
2153
+ Jo as toggleBlockFormat,
2154
+ os as useBuildFilterOptions,
2155
+ qn as useDateRangeFilter,
2156
+ Yn as useFeedback,
2157
+ $n as useFeedbackSafe,
2158
+ pr as useOptionalVersionUploadContext,
2159
+ En as useReviewablesUpload,
2160
+ ao as useUpdateLinks,
2161
+ fr as useVersionUploadContext
2090
2162
  };