@epam/ai-dial-publish-panel 1.4.0-dev.140 → 1.4.0-dev.144

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 (30) hide show
  1. package/components/PublishPanel/PublishPanel.d.ts +4 -21
  2. package/components/PublishPanel/PublishPanel.d.ts.map +1 -1
  3. package/components/PublishPanel/StandalonePublishPanel.d.ts +1 -11
  4. package/components/PublishPanel/StandalonePublishPanel.d.ts.map +1 -1
  5. package/components/SaveToFolderPanel/SaveToFolderPanel.d.ts.map +1 -1
  6. package/index.css +2 -2
  7. package/index.d.ts +3 -8
  8. package/index.d.ts.map +1 -1
  9. package/index.js +761 -1122
  10. package/models/folder-destination.d.ts +0 -2
  11. package/models/folder-destination.d.ts.map +1 -1
  12. package/models/publish-panel-styles.d.ts +0 -3
  13. package/models/publish-panel-styles.d.ts.map +1 -1
  14. package/models/publish.d.ts +0 -19
  15. package/models/publish.d.ts.map +1 -1
  16. package/models/save-to-folder-panel.d.ts +1 -24
  17. package/models/save-to-folder-panel.d.ts.map +1 -1
  18. package/package.json +2 -2
  19. package/types/publish-panel.d.ts +1 -1
  20. package/types/publish-panel.d.ts.map +1 -1
  21. package/utils/use-publish-flow.d.ts +8 -27
  22. package/utils/use-publish-flow.d.ts.map +1 -1
  23. package/components/PublishAccessRuleEditor/PublishAccessRuleEditor.d.ts +0 -5
  24. package/components/PublishAccessRuleEditor/PublishAccessRuleEditor.d.ts.map +0 -1
  25. package/components/PublishAccessRules/PublishAccessRules.d.ts +0 -83
  26. package/components/PublishAccessRules/PublishAccessRules.d.ts.map +0 -1
  27. package/models/publish-access-rule-editor.d.ts +0 -79
  28. package/models/publish-access-rule-editor.d.ts.map +0 -1
  29. package/models/publish-access-rules-styles.d.ts +0 -25
  30. package/models/publish-access-rules-styles.d.ts.map +0 -1
package/index.js CHANGED
@@ -1,58 +1,56 @@
1
1
  import { useCallback as e, useEffect as t, useId as n, useMemo as r, useRef as i, useState as a } from "react";
2
- import { Badge as o, BottomSheet as s, ButtonVariant as c, Checkbox as l, ConfirmationPopupVariant as u, DIAL_ICON_SIZE as d, DIAL_KIT_ICON_STROKE as f, DialFileNodeType as p, DialItemType as m, ElementSize as h, EllipsisTooltip as g, ErrorText as _, FileIcon as v, FolderName as y, GhostButton as b, GhostIconButton as x, Highlight as S, Input as ee, LinkButton as C, LiveRegion as te, LiveRegionElement as w, LiveRegionPoliteness as T, NeutralButton as E, Notification as D, NotificationType as O, NotificationVariant as k, PrimaryButton as A, RadioGroup as ne, Search as j, Select as M, SideDrawer as N, Skeleton as P, SkeletonVariant as F, Spinner as re, Tag as I, TagInput as ie } from "@epam/ai-dial-ui-kit";
3
- import { ConfirmationDialog as L, DeploymentIcon as R, ResourceSummary as ae, TAG_INPUT_TAG_CLASS_NAME as z, buildCssVars as oe, mergeClasses as B, useIsMobile as se } from "@epam/ai-dial-chat-shared";
4
- import { Fragment as V, jsx as H, jsxs as U } from "react/jsx-runtime";
5
- import { IconFolder as ce, IconFolderPlus as le, IconPlus as ue, IconTrashX as W } from "@tabler/icons-react";
6
- import { DialFileNodeType as de, DialFoldersTree as fe } from "@epam/ai-dial-react-file-manager";
2
+ import { Badge as o, Checkbox as s, ConfirmationPopupVariant as c, DIAL_ICON_SIZE as l, DIAL_KIT_ICON_STROKE as u, DialFileNodeType as d, DialItemType as f, ElementSize as p, EllipsisTooltip as m, ErrorText as h, FileIcon as g, FolderName as _, GhostButton as v, Input as y, LinkButton as b, LiveRegion as x, LiveRegionElement as S, LiveRegionPoliteness as C, NeutralButton as w, Notification as T, NotificationType as E, NotificationVariant as D, PrimaryButton as ee, RadioGroup as O, Search as k, SideDrawer as te, Skeleton as A, SkeletonVariant as j, Spinner as M, Tag as N } from "@epam/ai-dial-ui-kit";
3
+ import { ConfirmationDialog as P, DeploymentIcon as F, ResourceSummary as I, buildCssVars as L, mergeClasses as R } from "@epam/ai-dial-chat-shared";
4
+ import { Fragment as z, jsx as B, jsxs as V } from "react/jsx-runtime";
5
+ import { DialFileNodeType as ne, DialFoldersTree as re } from "@epam/ai-dial-react-file-manager";
6
+ import { IconFolder as ie, IconFolderPlus as ae, IconPlus as H } from "@tabler/icons-react";
7
7
  //#region src/models/publish.ts
8
- var G = /* @__PURE__ */ function(e) {
9
- return e.Equal = "EQUAL", e.Contain = "CONTAIN", e.Regex = "REGEX", e;
10
- }({}), K = /* @__PURE__ */ function(e) {
8
+ var U = /* @__PURE__ */ function(e) {
11
9
  return e.None = "none", e.Info = "info", e.ReplaceWarning = "replaceWarning", e.TargetTaken = "targetTaken", e.NoAccess = "noAccess", e.SubmitError = "submitError", e;
12
- }({}), q = /* @__PURE__ */ function(e) {
10
+ }({}), W = /* @__PURE__ */ function(e) {
13
11
  return e.Application = "application", e.Toolset = "toolset", e.Prompt = "prompt", e.Skill = "skill", e.File = "file", e;
14
- }({}), J = /* @__PURE__ */ function(e) {
12
+ }({}), oe = /* @__PURE__ */ function(e) {
15
13
  return e.Warning = "warning", e.Published = "published", e;
16
- }({}), pe = (e) => e.isSubmitting ? {
17
- calloutKind: K.None,
14
+ }({}), se = (e) => e.isSubmitting ? {
15
+ calloutKind: U.None,
18
16
  isSubmitDisabled: !0,
19
17
  isSubmitLoading: !0
20
18
  } : e.hasSelectedFolder ? e.hasWriteAccess ? e.isTargetChecking ? {
21
- calloutKind: K.None,
19
+ calloutKind: U.None,
22
20
  isSubmitDisabled: !0,
23
21
  isSubmitLoading: !1
24
22
  } : e.hasSubmitError ? {
25
- calloutKind: K.SubmitError,
23
+ calloutKind: U.SubmitError,
26
24
  isSubmitDisabled: !1,
27
25
  isSubmitLoading: !1
28
26
  } : e.hasExistingPublicationInFolder ? {
29
- calloutKind: K.ReplaceWarning,
27
+ calloutKind: U.ReplaceWarning,
30
28
  isSubmitDisabled: e.allowReplace === !1,
31
29
  isSubmitLoading: !1
32
30
  } : e.isTargetTaken ? {
33
- calloutKind: K.TargetTaken,
31
+ calloutKind: U.TargetTaken,
34
32
  isSubmitDisabled: !0,
35
33
  isSubmitLoading: !1
36
34
  } : {
37
- calloutKind: K.Info,
35
+ calloutKind: U.Info,
38
36
  isSubmitDisabled: !1,
39
37
  isSubmitLoading: !1
40
38
  } : {
41
- calloutKind: K.NoAccess,
39
+ calloutKind: U.NoAccess,
42
40
  isSubmitDisabled: !0,
43
41
  isSubmitLoading: !1
44
42
  } : {
45
- calloutKind: K.None,
43
+ calloutKind: U.None,
46
44
  isSubmitDisabled: !0,
47
45
  isSubmitLoading: !1
48
- }, Y = 864e5, X = (e, t = Date.now(), n) => {
49
- let r = Math.floor((t - e) / Y);
46
+ }, G = 864e5, ce = (e, t = Date.now(), n) => {
47
+ let r = Math.floor((t - e) / G);
50
48
  return r <= 0 ? "Today" : r === 1 ? "Yesterday" : r < 7 ? `${r} days ago` : new Date(e).toLocaleDateString(n, {
51
49
  month: "short",
52
50
  day: "numeric",
53
51
  year: "numeric"
54
52
  });
55
- }, Z = (e, t, n) => t.length === 0 ? [...e, {
53
+ }, le = (e, t, n) => t.length === 0 ? [...e, {
56
54
  path: [n],
57
55
  name: n
58
56
  }] : e.map((e) => e.path.join("/") === t.join("/") ? {
@@ -63,525 +61,199 @@ var G = /* @__PURE__ */ function(e) {
63
61
  }]
64
62
  } : {
65
63
  ...e,
66
- children: e.children ? Z(e.children, t, n) : e.children
67
- }), me = (e, t, n) => {
64
+ children: e.children ? le(e.children, t, n) : e.children
65
+ }), ue = (e, t, n) => {
68
66
  let r = [...t, n].join("/");
69
67
  return t.length === 0 ? e.filter((e) => e.path.join("/") !== r) : e.map((e) => e.path.join("/") === t.join("/") ? {
70
68
  ...e,
71
69
  children: (e.children ?? []).filter((e) => e.path.join("/") !== r)
72
70
  } : {
73
71
  ...e,
74
- children: e.children ? me(e.children, t, n) : e.children
72
+ children: e.children ? ue(e.children, t, n) : e.children
75
73
  });
76
- }, he = ({ item: n, history: o, folderItems: s, hasWriteAccess: c = () => !0, defaultAuthor: l = "", onCreateFolder: u, onPublish: d, onPublishSuccess: f, onPublishError: p, onFetchExistingRules: m, onCheckTargetExists: h, isTargetTakenError: g, canPublishDirectlyTo: _, onPublishDirectly: v }) => {
77
- let [y, b] = a(s);
74
+ }, de = ({ item: n, history: o, folderItems: s, hasWriteAccess: c = () => !0, defaultAuthor: l = "", onCreateFolder: u, onPublish: d, onPublishSuccess: f, onPublishError: p, onCheckTargetExists: m, isTargetTakenError: h, canPublishDirectlyTo: g, onPublishDirectly: _ }) => {
75
+ let [v, y] = a(s);
78
76
  t(() => {
79
- b(s);
77
+ y(s);
80
78
  }, [s]);
81
- let [x, S] = a(), [ee, C] = a(!1), [te, w] = a(!1), [T, E] = a([]), [D, O] = a(!1), [k, A] = a(!1), [ne, j] = a(l), [M, N] = a(!1), [P, F] = a(!1);
79
+ let [b, x] = a(), [S, C] = a(!1), [w, T] = a(!1), [E, D] = a(l), [ee, O] = a(!1), [k, te] = a(!1);
82
80
  t(() => {
83
- P || j(l);
84
- }, [l, P]);
85
- let re = e((e) => {
86
- F(!0), j(e);
87
- }, []), I = x != null && _ != null && v != null && _(x);
81
+ k || D(l);
82
+ }, [l, k]);
83
+ let A = e((e) => {
84
+ te(!0), D(e);
85
+ }, []), j = b != null && g != null && _ != null && g(b);
88
86
  t(() => {
89
- I && N(!1);
90
- }, [I]), t(() => {
91
- if (x == null || I) {
92
- E([]), A(!1), O(!1);
93
- return;
94
- }
95
- if (!m) return;
96
- let e = !1;
97
- return O(!0), A(!1), m(x).then((t) => {
98
- e || E(t);
99
- }).catch(() => {
100
- e || A(!0);
101
- }).finally(() => {
102
- e || O(!1);
103
- }), () => {
104
- e = !0;
105
- };
106
- }, [x, I]);
107
- let ie = r(() => {
108
- if (!x || I) return !1;
109
- let e = x.join("/");
87
+ j && O(!1);
88
+ }, [j]);
89
+ let M = r(() => {
90
+ if (!b || j) return !1;
91
+ let e = b.join("/");
110
92
  return o.some((t) => t.folderPath.join("/") === e ? n.version == null || t.version === n.version : !1);
111
93
  }, [
112
94
  o,
113
- I,
95
+ j,
114
96
  n.version,
115
- x
116
- ]), L = i(/* @__PURE__ */ new Set()), [R, ae] = a(), [z, oe] = a(), [B, se] = a(!1), V = x == null ? void 0 : `${n.id ?? ""}\u0000${x.join("/")}\u0000${n.version ?? ""}`, H = V != null && (R === V || z === V);
97
+ b
98
+ ]), N = i(/* @__PURE__ */ new Set()), [P, F] = a(), [I, L] = a(), [R, z] = a(!1), B = b == null ? void 0 : `${n.id ?? ""}\u0000${b.join("/")}\u0000${n.version ?? ""}`, V = B != null && (P === B || I === B);
117
99
  t(() => {
118
- if (x == null || V == null || !h || ie) {
119
- se(!1);
100
+ if (b == null || B == null || !m || M) {
101
+ z(!1);
120
102
  return;
121
103
  }
122
- let e = x.join("/");
123
- if ([...L.current].some((t) => e === t || e.startsWith(`${t}/`))) {
124
- se(!1);
104
+ let e = b.join("/");
105
+ if ([...N.current].some((t) => e === t || e.startsWith(`${t}/`))) {
106
+ z(!1);
125
107
  return;
126
108
  }
127
109
  let t = !1;
128
- return se(!0), h(n, x).then((e) => {
129
- t || ae((t) => e ? V : t === V ? void 0 : t);
110
+ return z(!0), m(n, b).then((e) => {
111
+ t || F((t) => e ? B : t === B ? void 0 : t);
130
112
  }).catch(() => void 0).finally(() => {
131
- t || se(!1);
113
+ t || z(!1);
132
114
  }), () => {
133
115
  t = !0;
134
116
  };
135
117
  }, [
136
- V,
137
- ie,
138
- h == null
118
+ B,
119
+ M,
120
+ m == null
139
121
  ]);
140
- let U = e(async (e, t) => {
122
+ let ne = e(async (e, t) => {
141
123
  let n = [...e, t].join("/");
142
- L.current.add(n), b((n) => Z(n, e, t));
124
+ N.current.add(n), y((n) => le(n, e, t));
143
125
  try {
144
126
  await u?.(e, t);
145
127
  } catch {
146
- L.current.delete(n), b((n) => me(n, e, t)), w(!0);
128
+ N.current.delete(n), y((n) => ue(n, e, t)), T(!0);
147
129
  }
148
- }, [u]), ce = e(async () => {
149
- if (!x) return !1;
150
- C(!0), w(!1);
130
+ }, [u]), re = e(async () => {
131
+ if (!b) return !1;
132
+ C(!0), T(!1);
151
133
  try {
152
- return I && v ? await v(n, x) : await d(n, x, T, ne.trim(), M), f?.(n, x, I), !0;
134
+ return j && _ ? await _(n, b) : await d(n, b, E.trim(), ee), f?.(n, b, j), !0;
153
135
  } catch (e) {
154
- return g?.(e) && V != null ? oe(V) : w(!0), p?.(n, x, e), !1;
136
+ return h?.(e) && B != null ? L(B) : T(!0), p?.(n, b, e), !1;
155
137
  } finally {
156
138
  C(!1);
157
139
  }
158
140
  }, [
159
- ne,
160
- I,
161
- g,
141
+ E,
142
+ j,
143
+ h,
162
144
  n,
163
145
  d,
164
- v,
146
+ _,
165
147
  p,
166
148
  f,
167
- M,
168
- T,
169
- x,
170
- V
171
- ]), le = e(() => {
172
- b(s), S(void 0), w(!1), E([]), A(!1), j(l), F(!1), N(!1), L.current.clear(), ae(void 0), oe(void 0), se(!1);
149
+ ee,
150
+ b,
151
+ B
152
+ ]), ie = e(() => {
153
+ y(s), x(void 0), T(!1), D(l), te(!1), O(!1), N.current.clear(), F(void 0), L(void 0), z(!1);
173
154
  }, [l, s]);
174
155
  return {
175
- folderItems: y,
176
- selectedFolderPath: x,
177
- setSelectedFolderPath: S,
178
- handleCreateFolder: U,
179
- hasExistingPublicationInFolder: ie,
180
- hasWriteAccess: !x || c(x),
181
- isSubmitting: ee,
182
- hasSubmitError: te,
183
- handleSubmit: ce,
184
- reset: le,
185
- rules: T,
186
- setRules: E,
187
- author: ne,
188
- setAuthor: re,
189
- publishCredentials: M,
190
- setPublishCredentials: N,
191
- isTargetTaken: H,
192
- isTargetChecking: B,
193
- isRulesLoading: D,
194
- hasRulesLoadError: k,
195
- isDirectWrite: I
156
+ folderItems: v,
157
+ selectedFolderPath: b,
158
+ setSelectedFolderPath: x,
159
+ handleCreateFolder: ne,
160
+ hasExistingPublicationInFolder: M,
161
+ hasWriteAccess: !b || c(b),
162
+ isSubmitting: S,
163
+ hasSubmitError: w,
164
+ handleSubmit: re,
165
+ reset: ie,
166
+ author: E,
167
+ setAuthor: A,
168
+ publishCredentials: ee,
169
+ setPublishCredentials: O,
170
+ isTargetTaken: V,
171
+ isTargetChecking: R,
172
+ isDirectWrite: j
196
173
  };
197
- }, Q = /* @__PURE__ */ function(e) {
174
+ }, K = /* @__PURE__ */ function(e) {
198
175
  return e.Main = "main", e.ChangeFolder = "change-folder", e;
199
- }({}), ge = ({ isOpen: e, selectedFolderPath: n, onSelectedFolderPathChange: r }) => {
200
- let [i, o] = a(Q.Main), [s, c] = a();
176
+ }({}), q = ({ isOpen: e, selectedFolderPath: n, onSelectedFolderPathChange: r }) => {
177
+ let [i, o] = a(K.Main), [s, c] = a();
201
178
  return t(() => {
202
- e && o(Q.Main);
179
+ e && o(K.Main);
203
180
  }, [e]), {
204
181
  view: i,
205
182
  pendingFolderPath: s,
206
183
  setPendingFolderPath: c,
207
184
  openFolderView: () => {
208
- c(n), o(Q.ChangeFolder);
185
+ c(n), o(K.ChangeFolder);
209
186
  },
210
- backToMain: () => o(Q.Main),
187
+ backToMain: () => o(K.Main),
211
188
  selectFolder: () => {
212
- s != null && r(s), o(Q.Main);
189
+ s != null && r(s), o(K.Main);
213
190
  }
214
191
  };
215
- }, _e = (e, t) => {
192
+ }, fe = (e, t) => {
216
193
  let n = t.trim().toLowerCase();
217
194
  return n ? e.reduce((e, r) => {
218
- let i = r.children ? _e(r.children, t) : void 0;
195
+ let i = r.children ? fe(r.children, t) : void 0;
219
196
  return r.name.toLowerCase().includes(n) ? e.push(r) : i?.length && e.push({
220
197
  ...r,
221
198
  children: i
222
199
  }), e;
223
200
  }, []) : e;
224
- }, ve = (e, t) => e.localeCompare(t, void 0, {
201
+ }, pe = (e, t) => e.localeCompare(t, void 0, {
225
202
  sensitivity: "base",
226
203
  numeric: !0
227
- }), ye = (e) => [...e].sort((e, t) => ve(e.name, t.name)).map((e) => e.children ? {
204
+ }), me = (e) => [...e].sort((e, t) => pe(e.name, t.name)).map((e) => e.children ? {
228
205
  ...e,
229
- children: ye(e.children)
230
- } : e), be = (e, t, n) => {
206
+ children: me(e.children)
207
+ } : e), he = (e, t, n) => {
231
208
  let [r, ...i] = t;
232
209
  if (r == null) return e;
233
210
  let a = [...n, r], o = e.find((e) => e.name === r);
234
211
  return o ? i.length ? e.map((e) => e === o ? {
235
212
  ...e,
236
- children: be(e.children ?? [], i, a)
213
+ children: he(e.children ?? [], i, a)
237
214
  } : e) : e : [...e, {
238
215
  path: a,
239
216
  name: r,
240
- children: i.length ? be([], i, a) : void 0
217
+ children: i.length ? he([], i, a) : void 0
241
218
  }];
242
- }, xe = (e, t) => t.reduce((e, t) => t.length ? be(e, t, []) : e, e), Se = (e) => e.flatMap((e) => [e.path.join("/"), ...e.children ? Se(e.children) : []]), $ = (e) => e.join("/"), Ce = (e) => e.split("/").filter(Boolean), we = (e, t) => Ce(e).at(-1) ?? t, Te = (e) => e.map((e) => {
243
- let t = $(e.path);
219
+ }, ge = (e, t) => t.reduce((e, t) => t.length ? he(e, t, []) : e, e), _e = (e) => e.flatMap((e) => [e.path.join("/"), ...e.children ? _e(e.children) : []]), J = (e) => e.join("/"), ve = (e) => e.split("/").filter(Boolean), Y = (e, t) => ve(e).at(-1) ?? t, ye = (e) => e.map((e) => {
220
+ let t = J(e.path);
244
221
  return {
245
222
  path: t,
246
223
  name: e.name,
247
224
  folderId: t,
248
- nodeType: p.FOLDER,
249
- items: e.children ? Te(e.children) : void 0
225
+ nodeType: d.FOLDER,
226
+ items: e.children ? ye(e.children) : void 0
250
227
  };
251
- }), Ee = /[/\\:;,={}&"]/, De = (e, t, n, r) => {
228
+ }), X = /[/\\:;,={}&"]/, be = (e, t, n, r) => {
252
229
  let i = e.trim();
253
- return i ? i.includes("..") || Ee.test(i) ? n.invalid : t.some((e) => e.toLowerCase() === i.toLowerCase()) ? n.duplicate : r?.toLowerCase() === i.toLowerCase() ? n.sameAsParent ?? n.duplicate : null : n.empty;
254
- }, Oe = (e, t) => {
230
+ return i ? i.includes("..") || X.test(i) ? n.invalid : t.some((e) => e.toLowerCase() === i.toLowerCase()) ? n.duplicate : r?.toLowerCase() === i.toLowerCase() ? n.sameAsParent ?? n.duplicate : null : n.empty;
231
+ }, xe = (e, t) => {
255
232
  let n = new Set(t.map((e) => e.toLowerCase()));
256
233
  if (!n.has(e.toLowerCase())) return e;
257
234
  let r = 2;
258
235
  for (; n.has(`${e} ${r}`.toLowerCase());) r += 1;
259
236
  return `${e} ${r}`;
260
- }, ke = (e, t) => {
237
+ }, Se = (e, t) => {
261
238
  if (t.length === 0) return e.map((e) => e.name);
262
- let n = $(t), r = (e) => {
239
+ let n = J(t), r = (e) => {
263
240
  for (let t of e) {
264
- if ($(t.path) === n) return t;
241
+ if (J(t.path) === n) return t;
265
242
  let e = t.children ? r(t.children) : void 0;
266
243
  if (e) return e;
267
244
  }
268
245
  };
269
246
  return (r(e)?.children ?? []).map((e) => e.name);
270
- }, Ae = {
271
- sheet: "_sheet_1jbwn_3",
272
- inline: "_inline_1jbwn_7",
273
- selectField: "_selectField_1jbwn_21",
274
- selectFieldOpen: "_selectFieldOpen_1jbwn_33"
275
- }, je = 20, Me = 200, Ne = 8, Pe = (e) => {
276
- let t = e.trim();
277
- if (t.length === 0 || t.length > Me) return !1;
278
- try {
279
- return new RegExp(t) instanceof RegExp;
280
- } catch {
281
- return !1;
282
- }
283
- }, Fe = ({ sourceOptions: e, onSave: o, onCancel: c, disabled: l = !1, maxTargets: u = je, labels: d = {}, styles: f = {} }) => {
284
- let p = se(), m = {
285
- ...oe({
286
- "--pare-mobile-bg": f.colors?.mobileBackground,
287
- "--pare-bg": f.colors?.background,
288
- "--pare-select-border": f.colors?.selectBorder,
289
- "--pare-select-border-hover": f.colors?.selectBorderHover,
290
- "--pare-select-border-open": f.colors?.selectBorderOpen,
291
- "--pare-select-border-focus": f.colors?.selectBorderFocus
292
- }),
293
- ...f.cssVars
294
- }, { sourceLabel: h = "Source", sourcePlaceholder: g = "Select...", functionLabel: _ = "Function", equalOptionLabel: v = "Equal", containOptionLabel: y = "Contain", regexOptionLabel: x = "Regex", targetsLabel: C = "Targets", targetsPlaceholder: te = "Add a target", targetsHintLabel: w = "Press Enter or comma to add a target.", patternLabel: T = "Pattern", patternPlaceholder: D = "Enter a regular expression", invalidRegexError: O = "Enter a valid regular expression.", requiredFieldError: k = "This field is required.", targetsRequiredError: A = "Add at least one target.", saveLabel: ne = "Save", cancelLabel: j = "Cancel", dialogAriaLabel: N = "Add access rule" } = d, P = n(), F = n(), re = n(), I = n(), L = i(null);
295
- t(() => {
296
- p || L.current?.focus();
297
- }, [p]);
298
- let [R, ae] = a(), [ce, le] = a(), [ue, W] = a([]), [de, fe] = a(""), [K, q] = a(!1), [J, pe] = a(""), [Y, X] = a(!1), [Z, me] = a(!1), he = B(Ae.selectField, K && Ae.selectFieldOpen), Q = B(Ae.selectField, Y && Ae.selectFieldOpen), ge = r(() => e.map((e) => ({
299
- value: e,
300
- label: e,
301
- labelNode: J.trim() ? /* @__PURE__ */ H(S, {
302
- text: e,
303
- query: J,
304
- maxLines: 1
305
- }) : void 0
306
- })), [e, J]), _e = r(() => [
307
- {
308
- value: G.Equal,
309
- label: v
310
- },
311
- {
312
- value: G.Contain,
313
- label: y
314
- },
315
- {
316
- value: G.Regex,
317
- label: x
318
- }
319
- ], [
320
- v,
321
- y,
322
- x
323
- ]), ve = ce === G.Regex, ye = Pe(de), be = R != null && ce != null && (ve ? ye : ue.length > 0), xe = (e) => {
324
- ae(Array.isArray(e) ? e[0] : e), q(!1);
325
- }, Se = (e) => {
326
- let t = Array.isArray(e) ? e[0] : e;
327
- ce === G.Regex != (t === G.Regex) && (W([]), fe("")), le(t), X(!1);
328
- }, $ = (e) => {
329
- let t = [];
330
- for (let n of e) {
331
- let e = n.trim();
332
- if (!(e.length === 0 || t.includes(e)) && (t.push(e), t.length >= u)) break;
333
- }
334
- W(t);
335
- }, Ce = () => {
336
- !be || R == null || ce == null ? me(!0) : o({
337
- source: R,
338
- function: ce,
339
- targets: ve ? [de.trim()] : ue
340
- });
341
- }, we = (de.length > 0 || Z) && !ye, Te = (e) => {
342
- e.key === "Escape" && (e.stopPropagation(), c());
343
- }, Ee = /* @__PURE__ */ U(V, { children: [
344
- /* @__PURE__ */ H(M, {
345
- id: F,
346
- labelProps: { label: h },
347
- options: ge,
348
- value: R,
349
- onChange: xe,
350
- placeholder: g,
351
- searchable: e.length > Ne,
352
- searchPlaceholder: g,
353
- onSearchQueryChange: pe,
354
- disabled: l,
355
- open: K,
356
- onOpenChange: q,
357
- fieldClassName: he,
358
- invalid: Z && R == null,
359
- error: Z && R == null ? k : void 0
360
- }),
361
- /* @__PURE__ */ H(M, {
362
- labelProps: { label: _ },
363
- id: re,
364
- options: _e,
365
- value: ce,
366
- onChange: Se,
367
- placeholder: _,
368
- disabled: l,
369
- open: Y,
370
- onOpenChange: X,
371
- fieldClassName: Q,
372
- invalid: Z && ce == null,
373
- error: Z && ce == null ? k : void 0
374
- }),
375
- ve ? /* @__PURE__ */ H(ee, {
376
- id: P,
377
- labelProps: { label: T },
378
- placeholder: D,
379
- value: de,
380
- onChange: (e) => fe(e ?? ""),
381
- error: we ? O : void 0,
382
- disabled: l
383
- }) : /* @__PURE__ */ H(ie, {
384
- id: I,
385
- labelProps: { label: C },
386
- placeholder: te,
387
- caption: Z && ue.length === 0 ? void 0 : w,
388
- error: Z && ue.length === 0 ? A : void 0,
389
- invalid: Z && ue.length === 0,
390
- value: ue,
391
- onChange: $,
392
- disabled: l,
393
- tagClassName: z
394
- }),
395
- /* @__PURE__ */ U("div", {
396
- className: "mt-auto flex justify-end gap-2 desktop:mt-2",
397
- children: [/* @__PURE__ */ H(b, {
398
- label: j,
399
- onClick: c,
400
- disabled: l
401
- }), /* @__PURE__ */ H(E, {
402
- label: ne,
403
- onClick: Ce,
404
- disabled: l
405
- })]
406
- })
407
- ] });
408
- return p ? /* @__PURE__ */ H(s, {
409
- open: !0,
410
- onClose: c,
411
- ariaLabel: N,
412
- style: m,
413
- className: Ae.sheet,
414
- bodyClassName: "flex flex-col gap-3 p-4",
415
- children: Ee
416
- }) : /* @__PURE__ */ H("div", {
417
- ref: L,
418
- role: "group",
419
- "aria-label": N,
420
- tabIndex: -1,
421
- onKeyDown: Te,
422
- style: m,
423
- className: B("flex flex-none flex-col gap-3 rounded-lg p-3", Ae.inline),
424
- children: Ee
425
- });
426
- }, Ie = {
427
- ruleRow: "_ruleRow_nx0en_1",
428
- heading: "_heading_nx0en_5",
429
- hint: "_hint_nx0en_9",
430
- loading: "_loading_nx0en_13",
431
- ruleText: "_ruleText_nx0en_17"
432
- }, Le = 20, Re = (e, t) => e === G.Equal ? t.equal : e === G.Contain ? t.contain : t.regex, ze = ({ rules: e, onRulesChange: r, sourceOptions: o, folderName: s, disabled: l = !1, isLoading: u = !1, hasLoadError: p = !1, maxRules: m = Le, maxTargetsPerRule: h, labels: g = {}, headingClassName: _ = "dial-body-semi-text", hintClassName: v = "dial-small-text", loadingClassName: y = "dial-small-text", ruleTextClassName: S = "dial-small-text", ruleSourceClassName: ee = "dial-small-semi-text", styles: C = {} }) => {
433
- let T = {
434
- ...oe({
435
- "--par-rule-bg": C.colors?.ruleBackground,
436
- "--par-heading-text": C.colors?.headingText,
437
- "--par-hint-text": C.colors?.hintText,
438
- "--par-loading-text": C.colors?.loadingText,
439
- "--par-rule-text": C.colors?.ruleText
440
- }),
441
- ...C.cssVars
442
- }, { heading: E = "Allow access if all match", folderScopeHint: A = "These rules apply to \"{folder}\". Selecting another folder loads that folder's own rules instead.", noFolderScopeHint: ne = "Access rules apply to the destination folder — pick a folder above to set its rules.", rulesWithoutFolderWarning: j = "These rules have no destination yet. Select a folder above to apply them.", maxRulesReachedLabel: M = "Rule limit reached ({max}). Remove a rule to add another.", addRuleLabel: N = "Add rule", clearAllLabel: P = "Clear all", orSeparatorLabel: F = "Or", removeRuleAriaLabelTemplate: I = "Remove rule for {source}: {targets}", equalFunctionLabel: ie = "Equal", containFunctionLabel: L = "Contain", regexFunctionLabel: R = "Regex", loadingLabel: ae = "Loading existing rules…", loadErrorLabel: z = "Couldn't load existing rules for this folder. You can still add rules manually.", ruleAddedAnnouncement: se = "Rule added.", ruleRemovedAnnouncement: V = "Rule removed.", rulesClearedAnnouncement: ce = "All rules cleared.", rulesLoadedAnnouncement: le = "Existing rules loaded for the selected folder.", editorLabels: de } = g, fe = n(), [G, K] = a(!1), [q, J] = a(""), pe = i(null), Y = i(u);
443
- t(() => {
444
- Y.current && !u && e.length > 0 && J(le), Y.current = u;
445
- }, [
446
- u,
447
- e,
448
- le
449
- ]);
450
- let X = () => {
451
- pe.current = document.activeElement, K(!0);
452
- }, Z = () => {
453
- K(!1), pe.current?.focus?.();
454
- }, me = (t) => {
455
- r([...e, t]), J(se), Z();
456
- }, he = (t) => {
457
- r(e.filter((e, n) => n !== t)), J(V);
458
- }, Q = () => {
459
- r([]), J(ce);
460
- }, ge = {
461
- equal: ie,
462
- contain: L,
463
- regex: R
464
- }, _e = e.length >= m, ve = l || _e, ye = s != null && s !== "";
465
- return /* @__PURE__ */ U("div", {
466
- role: "group",
467
- "aria-labelledby": fe,
468
- style: T,
469
- className: B(l && "pointer-events-none opacity-60"),
470
- children: [
471
- /* @__PURE__ */ H(te, {
472
- visuallyHidden: !0,
473
- as: w.Span,
474
- children: q
475
- }),
476
- /* @__PURE__ */ U("div", {
477
- className: "mb-1 flex items-center justify-between gap-2",
478
- children: [/* @__PURE__ */ H("div", {
479
- id: fe,
480
- className: B(_, Ie.heading),
481
- children: E
482
- }), e.length > 0 && /* @__PURE__ */ H(b, {
483
- variant: c.Primary,
484
- label: P,
485
- onClick: Q,
486
- disabled: l
487
- })]
488
- }),
489
- /* @__PURE__ */ H("p", {
490
- className: B("mb-2", v, Ie.hint),
491
- children: ye ? A.replace("{folder}", s) : ne
492
- }),
493
- e.length > 0 && !ye && /* @__PURE__ */ H("div", {
494
- className: "mb-2",
495
- children: /* @__PURE__ */ H(D, {
496
- type: O.SectionMessage,
497
- variant: k.Warning,
498
- message: j
499
- })
500
- }),
501
- u && /* @__PURE__ */ U("div", {
502
- className: B("mb-2 flex items-center gap-2", y, Ie.loading),
503
- children: [/* @__PURE__ */ H(re, {
504
- size: 16,
505
- ariaLabel: ae
506
- }), /* @__PURE__ */ H("span", { children: ae })]
507
- }),
508
- p && /* @__PURE__ */ H("div", {
509
- className: "mb-2",
510
- children: /* @__PURE__ */ H(D, {
511
- type: O.SectionMessage,
512
- variant: k.Warning,
513
- message: z
514
- })
515
- }),
516
- e.length > 0 && /* @__PURE__ */ H("ul", {
517
- className: "mb-3 flex flex-col gap-2",
518
- children: e.map((e, t) => {
519
- let n = e.targets.join(` ${F} `), r = I.replace("{source}", e.source).replace("{targets}", n);
520
- return /* @__PURE__ */ U("li", {
521
- className: B("flex items-center justify-between gap-2 rounded-lg px-3 py-2", Ie.ruleRow),
522
- children: [/* @__PURE__ */ U("span", {
523
- className: B("truncate", S, Ie.ruleText),
524
- children: [
525
- /* @__PURE__ */ H("span", {
526
- className: ee,
527
- children: e.source
528
- }),
529
- " ",
530
- Re(e.function, ge),
531
- ": ",
532
- n
533
- ]
534
- }), /* @__PURE__ */ H(x, {
535
- icon: /* @__PURE__ */ H(W, {
536
- size: d.SM,
537
- "aria-hidden": !0,
538
- stroke: f
539
- }),
540
- "aria-label": r,
541
- onClick: () => he(t),
542
- disabled: l
543
- })]
544
- }, t);
545
- })
546
- }),
547
- G && /* @__PURE__ */ H(Fe, {
548
- sourceOptions: o,
549
- onSave: me,
550
- onCancel: Z,
551
- disabled: l,
552
- maxTargets: h,
553
- labels: de,
554
- styles: C.editor
555
- }),
556
- /* @__PURE__ */ H("div", {
557
- className: "flex flex-wrap items-center gap-2",
558
- children: /* @__PURE__ */ H(b, {
559
- label: N,
560
- iconBefore: /* @__PURE__ */ H(ue, {
561
- size: d.SM,
562
- "aria-hidden": !0,
563
- stroke: f
564
- }),
565
- onClick: X,
566
- disabled: ve
567
- })
568
- }),
569
- _e && /* @__PURE__ */ H("p", {
570
- className: B("mt-2", v, Ie.hint),
571
- children: M.replace("{max}", String(m))
572
- })
573
- ]
574
- });
575
- }, Be = /* @__PURE__ */ function(e) {
247
+ }, Ce = /* @__PURE__ */ function(e) {
576
248
  return e.NotPublished = "not-published", e.InReview = "in-review", e.Published = "published", e.Unknown = "unknown", e;
577
- }({}), Ve = {
249
+ }({}), Z = {
578
250
  skeletonColor: "var(--pp-vh-skeleton, var(--bg-control-disable-primary, #dce0e8))",
579
251
  heading: "_heading_s0cgn_2",
580
252
  version: "_version_s0cgn_6",
581
253
  date: "_date_s0cgn_10",
582
254
  meta: "_meta_s0cgn_15",
583
255
  row: "_row_s0cgn_19"
584
- }, He = {
256
+ }, we = {
585
257
  heading: "Versions history",
586
258
  inReviewLabel: "In review",
587
259
  publishedLabel: "Published",
@@ -590,93 +262,93 @@ var G = /* @__PURE__ */ function(e) {
590
262
  emptyLabel: "No saved versions yet.",
591
263
  errorLabel: "Could not load publication statuses.",
592
264
  retryLabel: "Retry"
593
- }, Ue = (e, t) => {
265
+ }, Te = (e, t) => {
594
266
  switch (e.status) {
595
- case Be.InReview: return t.inReviewLabel;
596
- case Be.Unknown: return t.unknownLabel;
597
- case Be.Published: return t.publishedLabel;
267
+ case Ce.InReview: return t.inReviewLabel;
268
+ case Ce.Unknown: return t.unknownLabel;
269
+ case Ce.Published: return t.publishedLabel;
598
270
  default: return;
599
271
  }
600
- }, We = ({ rows: e, isLoading: r = !1, hasError: i = !1, onRetry: s, labels: c = {}, headingClassName: l = "dial-body-semi-text", versionClassName: u = "dial-small-semi-text", dateClassName: d = "dial-small-text", metaClassName: f = "dial-tiny-text", styles: p = {} }) => {
601
- let m = n(), [v, b] = a(!1);
602
- t(() => b(!0), []);
603
- let x = {
604
- ...He,
272
+ }, Ee = ({ rows: e, isLoading: r = !1, hasError: i = !1, onRetry: s, labels: c = {}, headingClassName: l = "dial-body-semi-text", versionClassName: u = "dial-small-semi-text", dateClassName: d = "dial-small-text", metaClassName: f = "dial-tiny-text", styles: g = {} }) => {
273
+ let v = n(), [y, S] = a(!1);
274
+ t(() => S(!0), []);
275
+ let w = {
276
+ ...we,
605
277
  ...c
606
- }, { colors: S } = p, ee = {
607
- ...oe({
608
- "--pp-vh-heading-text": S?.headingText,
609
- "--pp-vh-version-text": S?.versionText,
610
- "--pp-vh-date-text": S?.dateText,
611
- "--pp-vh-skeleton": S?.skeleton,
612
- "--pp-vh-meta-text": S?.metaText,
613
- "--pp-vh-row-border": S?.rowBorder
278
+ }, { colors: T } = g, E = {
279
+ ...L({
280
+ "--pp-vh-heading-text": T?.headingText,
281
+ "--pp-vh-version-text": T?.versionText,
282
+ "--pp-vh-date-text": T?.dateText,
283
+ "--pp-vh-skeleton": T?.skeleton,
284
+ "--pp-vh-meta-text": T?.metaText,
285
+ "--pp-vh-row-border": T?.rowBorder
614
286
  }),
615
- ...p.cssVars
287
+ ...g.cssVars
616
288
  };
617
- return /* @__PURE__ */ U("section", {
618
- "aria-labelledby": m,
289
+ return /* @__PURE__ */ V("section", {
290
+ "aria-labelledby": v,
619
291
  className: "flex flex-col gap-2",
620
- style: ee,
292
+ style: E,
621
293
  children: [
622
- /* @__PURE__ */ H("h2", {
623
- id: m,
624
- className: B(l, Ve.heading),
625
- children: x.heading
294
+ /* @__PURE__ */ B("h2", {
295
+ id: v,
296
+ className: R(l, Z.heading),
297
+ children: w.heading
626
298
  }),
627
- /* @__PURE__ */ H(te, {
299
+ /* @__PURE__ */ B(x, {
628
300
  visuallyHidden: !0,
629
- politeness: T.Polite,
630
- children: v && r && !i ? x.loadingLabel : ""
301
+ politeness: C.Polite,
302
+ children: y && r && !i ? w.loadingLabel : ""
631
303
  }),
632
- /* @__PURE__ */ H(te, {
633
- politeness: T.Assertive,
634
- children: i && /* @__PURE__ */ U("div", {
304
+ /* @__PURE__ */ B(x, {
305
+ politeness: C.Assertive,
306
+ children: i && /* @__PURE__ */ V("div", {
635
307
  className: "flex flex-wrap items-center gap-2",
636
- children: [/* @__PURE__ */ H(_, { text: x.errorLabel }), s && /* @__PURE__ */ H(C, {
637
- label: x.retryLabel,
638
- size: h.Small,
308
+ children: [/* @__PURE__ */ B(h, { text: w.errorLabel }), s && /* @__PURE__ */ B(b, {
309
+ label: w.retryLabel,
310
+ size: p.Small,
639
311
  onClick: s
640
312
  })]
641
313
  })
642
314
  }),
643
- e.length === 0 ? /* @__PURE__ */ H("p", {
644
- className: B(f, Ve.meta),
645
- children: x.emptyLabel
646
- }) : /* @__PURE__ */ H("ul", { children: e.map((e) => {
647
- let t = Ue(e, x), n = e.status == null && r && !i;
648
- return /* @__PURE__ */ U("li", {
649
- className: B("flex flex-col gap-1 py-2", Ve.row),
650
- children: [/* @__PURE__ */ U("div", {
315
+ e.length === 0 ? /* @__PURE__ */ B("p", {
316
+ className: R(f, Z.meta),
317
+ children: w.emptyLabel
318
+ }) : /* @__PURE__ */ B("ul", { children: e.map((e) => {
319
+ let t = Te(e, w), n = e.status == null && r && !i;
320
+ return /* @__PURE__ */ V("li", {
321
+ className: R("flex flex-col gap-1 py-2", Z.row),
322
+ children: [/* @__PURE__ */ V("div", {
651
323
  className: "flex min-h-6 min-w-0 items-center gap-2",
652
324
  children: [
653
- /* @__PURE__ */ H(g, {
325
+ /* @__PURE__ */ B(m, {
654
326
  text: e.version,
655
- className: B("flex-initial!", u, Ve.version)
327
+ className: R("flex-initial!", u, Z.version)
656
328
  }),
657
- t && /* @__PURE__ */ H(o, { label: t }),
658
- n && /* @__PURE__ */ H("span", {
329
+ t && /* @__PURE__ */ B(o, { label: t }),
330
+ n && /* @__PURE__ */ B("span", {
659
331
  "aria-hidden": !0,
660
332
  className: "shrink-0",
661
- children: /* @__PURE__ */ H(P, {
662
- variant: F.Text,
333
+ children: /* @__PURE__ */ B(A, {
334
+ variant: j.Text,
663
335
  width: "84px",
664
336
  height: "24px",
665
- color: Ve.skeletonColor
337
+ color: Z.skeletonColor
666
338
  })
667
339
  }),
668
- e.modifiedAt && /* @__PURE__ */ H("span", {
669
- className: B("ms-auto shrink-0", d, Ve.date),
340
+ e.modifiedAt && /* @__PURE__ */ B("span", {
341
+ className: R("ms-auto shrink-0", d, Z.date),
670
342
  children: e.modifiedAt
671
343
  })
672
344
  ]
673
- }), (e.folder || e.author) && /* @__PURE__ */ U("div", {
345
+ }), (e.folder || e.author) && /* @__PURE__ */ V("div", {
674
346
  className: "flex min-w-0 items-center justify-between gap-2",
675
- children: [e.folder && /* @__PURE__ */ H(y, {
347
+ children: [e.folder && /* @__PURE__ */ B(_, {
676
348
  name: e.folder,
677
- nameClassName: B(f, Ve.meta)
678
- }), e.author && /* @__PURE__ */ H("span", {
679
- className: B("ms-auto shrink-0", f, Ve.meta),
349
+ nameClassName: R(f, Z.meta)
350
+ }), e.author && /* @__PURE__ */ B("span", {
351
+ className: R("ms-auto shrink-0", f, Z.meta),
680
352
  children: e.author
681
353
  })]
682
354
  })]
@@ -684,51 +356,51 @@ var G = /* @__PURE__ */ function(e) {
684
356
  }) })
685
357
  ]
686
358
  });
687
- }, Ge = {
359
+ }, Q = {
688
360
  panel: "dial-publish-panel-panel",
689
361
  dependencies: "dial-publish-panel-dependencies",
690
362
  dependenciesList: "dial-publish-panel-dependencies-list",
691
363
  dependenciesItem: "dial-publish-panel-dependencies-item"
692
- }, Ke = "Private dependencies", qe = {
364
+ }, De = "Private dependencies", $ = {
693
365
  heading: "_heading_18b5e_1",
694
366
  name: "_name_18b5e_5",
695
367
  meta: "_meta_18b5e_9",
696
368
  caption: "_caption_18b5e_13",
697
369
  type: "_type_18b5e_17",
698
370
  row: "_row_18b5e_21"
699
- }, Je = {
700
- [q.Application]: "Application",
701
- [q.Toolset]: "Toolset",
702
- [q.Prompt]: "Prompt",
703
- [q.Skill]: "Skill",
704
- [q.File]: "File"
705
- }, Ye = 32, Xe = 24, Ze = 40, Qe = 32, $e = (e, t) => {
706
- let n = t ? Ze : Ye;
707
- return /* @__PURE__ */ H("span", {
371
+ }, Oe = {
372
+ [W.Application]: "Application",
373
+ [W.Toolset]: "Toolset",
374
+ [W.Prompt]: "Prompt",
375
+ [W.Skill]: "Skill",
376
+ [W.File]: "File"
377
+ }, ke = 32, Ae = 24, je = 40, Me = 32, Ne = (e, t) => {
378
+ let n = t ? je : ke;
379
+ return /* @__PURE__ */ B("span", {
708
380
  "aria-hidden": "true",
709
381
  className: "shrink-0",
710
- children: e.type === q.File ? /* @__PURE__ */ H("span", {
382
+ children: e.type === W.File ? /* @__PURE__ */ B("span", {
711
383
  className: "flex items-center justify-center",
712
384
  style: {
713
385
  width: n,
714
386
  height: n
715
387
  },
716
- children: /* @__PURE__ */ H(v, {
388
+ children: /* @__PURE__ */ B(g, {
717
389
  decorative: !0,
718
- size: t ? Qe : Xe,
390
+ size: t ? Me : Ae,
719
391
  name: e.name,
720
- type: e.isFolder ? m.Folder : m.File
392
+ type: e.isFolder ? f.Folder : f.File
721
393
  })
722
- }) : /* @__PURE__ */ H(R, {
394
+ }) : /* @__PURE__ */ B(F, {
723
395
  size: n,
724
396
  src: e.iconUrl,
725
397
  initialsName: e.name,
726
398
  styles: { badgeClassName: t ? "rounded-xl" : "rounded-lg" }
727
399
  })
728
400
  });
729
- }, et = "This item depends on personal private resources (listed below). After publishing, other users may not be able to use it fully, or may run into problems.", tt = (e) => `${e} ${e === 1 ? "dependency is" : "dependencies are"} not public yet`, nt = ({ dependencies: e, labels: t = {}, headingClassName: r = "dial-body-semi-text", nameClassName: i, metaClassName: a = "dial-small-text", captionClassName: o = "dial-tiny-text", typeClassName: s = "dial-tiny-lead-semi-text", styles: c = {} }) => {
730
- let l = n(), { title: u = Ke, description: d = et, appearance: f = J.Warning, typeLabels: p = {}, getAnnouncement: m = tt } = t, h = f === J.Published, g = i ?? (h ? "dial-body-semi-text" : "dial-small-semi-text"), { colors: _ } = c, v = {
731
- ...oe({
401
+ }, Pe = "This item depends on personal private resources (listed below). After publishing, other users may not be able to use it fully, or may run into problems.", Fe = (e) => `${e} ${e === 1 ? "dependency is" : "dependencies are"} not public yet`, Ie = ({ dependencies: e, labels: t = {}, headingClassName: r = "dial-body-semi-text", nameClassName: i, metaClassName: a = "dial-small-text", captionClassName: o = "dial-tiny-text", typeClassName: s = "dial-tiny-lead-semi-text", styles: c = {} }) => {
402
+ let l = n(), { title: u = De, description: d = Pe, appearance: f = oe.Warning, typeLabels: p = {}, getAnnouncement: m = Fe } = t, h = f === oe.Published, g = i ?? (h ? "dial-body-semi-text" : "dial-small-semi-text"), { colors: _ } = c, v = {
403
+ ...L({
732
404
  "--pp-dependencies-heading-text": _?.headingText,
733
405
  "--pp-dependencies-name-text": _?.nameText,
734
406
  "--pp-dependencies-meta-text": _?.metaText,
@@ -738,66 +410,66 @@ var G = /* @__PURE__ */ function(e) {
738
410
  }),
739
411
  ...c.cssVars
740
412
  }, y = e.length;
741
- return /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(te, {
413
+ return /* @__PURE__ */ V(z, { children: [/* @__PURE__ */ B(x, {
742
414
  visuallyHidden: !0,
743
- as: w.Span,
415
+ as: S.Span,
744
416
  children: y > 0 ? m(y) : ""
745
- }), y > 0 && /* @__PURE__ */ U("section", {
417
+ }), y > 0 && /* @__PURE__ */ V("section", {
746
418
  "aria-labelledby": l,
747
- className: B("flex flex-col", h ? "gap-2" : "gap-3", Ge.dependencies),
419
+ className: R("flex flex-col", h ? "gap-2" : "gap-3", Q.dependencies),
748
420
  style: v,
749
421
  children: [
750
- /* @__PURE__ */ H("h2", {
422
+ /* @__PURE__ */ B("h2", {
751
423
  id: l,
752
- className: B(r, qe.heading),
424
+ className: R(r, $.heading),
753
425
  children: u
754
426
  }),
755
- h ? /* @__PURE__ */ H("p", {
756
- className: B(o, qe.caption),
427
+ h ? /* @__PURE__ */ B("p", {
428
+ className: R(o, $.caption),
757
429
  children: d
758
- }) : /* @__PURE__ */ H(D, {
759
- type: O.SectionMessage,
760
- variant: k.Warning,
430
+ }) : /* @__PURE__ */ B(T, {
431
+ type: E.SectionMessage,
432
+ variant: D.Warning,
761
433
  message: d,
762
434
  role: "note"
763
435
  }),
764
- /* @__PURE__ */ H("ul", {
765
- className: Ge.dependenciesList,
436
+ /* @__PURE__ */ B("ul", {
437
+ className: Q.dependenciesList,
766
438
  children: e.map(h ? (e) => {
767
- let t = p[e.type] ?? Je[e.type];
768
- return /* @__PURE__ */ U("li", {
769
- className: B("flex items-center gap-3 py-3", qe.row, Ge.dependenciesItem),
770
- children: [$e(e, !0), /* @__PURE__ */ U("div", {
439
+ let t = p[e.type] ?? Oe[e.type];
440
+ return /* @__PURE__ */ V("li", {
441
+ className: R("flex items-center gap-3 py-3", $.row, Q.dependenciesItem),
442
+ children: [Ne(e, !0), /* @__PURE__ */ V("div", {
771
443
  className: "flex min-w-0 flex-col",
772
- children: [/* @__PURE__ */ U("span", {
773
- className: B("truncate", s, qe.type),
774
- children: [t, e.location && /* @__PURE__ */ H("span", {
775
- className: B("ms-1 normal-case", a, qe.meta),
444
+ children: [/* @__PURE__ */ V("span", {
445
+ className: R("truncate", s, $.type),
446
+ children: [t, e.location && /* @__PURE__ */ B("span", {
447
+ className: R("ms-1 normal-case", a, $.meta),
776
448
  children: `· ${e.location}`
777
449
  })]
778
- }), /* @__PURE__ */ U("span", {
779
- className: B("truncate", g, qe.name),
780
- children: [e.name, e.version != null && /* @__PURE__ */ H("span", {
781
- className: B("ms-2", a, qe.meta),
450
+ }), /* @__PURE__ */ V("span", {
451
+ className: R("truncate", g, $.name),
452
+ children: [e.name, e.version != null && /* @__PURE__ */ B("span", {
453
+ className: R("ms-2", a, $.meta),
782
454
  children: e.version
783
455
  })]
784
456
  })]
785
457
  })]
786
458
  }, e.id);
787
459
  } : (e) => {
788
- let t = p[e.type] ?? Je[e.type];
789
- return /* @__PURE__ */ U("li", {
790
- className: B("flex items-center gap-3 py-2", Ge.dependenciesItem),
791
- children: [$e(e, !1), /* @__PURE__ */ U("div", {
460
+ let t = p[e.type] ?? Oe[e.type];
461
+ return /* @__PURE__ */ V("li", {
462
+ className: R("flex items-center gap-3 py-2", Q.dependenciesItem),
463
+ children: [Ne(e, !1), /* @__PURE__ */ V("div", {
792
464
  className: "flex min-w-0 flex-col",
793
- children: [/* @__PURE__ */ U("span", {
794
- className: B("truncate", g, qe.name),
795
- children: [e.name, e.version != null && /* @__PURE__ */ H("span", {
796
- className: B("ms-2", a, qe.meta),
465
+ children: [/* @__PURE__ */ V("span", {
466
+ className: R("truncate", g, $.name),
467
+ children: [e.name, e.version != null && /* @__PURE__ */ B("span", {
468
+ className: R("ms-2", a, $.meta),
797
469
  children: e.version
798
470
  })]
799
- }), /* @__PURE__ */ H("span", {
800
- className: B("truncate", a, qe.meta),
471
+ }), /* @__PURE__ */ B("span", {
472
+ className: R("truncate", a, $.meta),
801
473
  children: e.location ? `${t} · ${e.location}` : t
802
474
  })]
803
475
  })]
@@ -806,15 +478,15 @@ var G = /* @__PURE__ */ function(e) {
806
478
  })
807
479
  ]
808
480
  })] });
809
- }, rt = {
481
+ }, Le = {
810
482
  currentBadge: "_currentBadge_d0adf_1",
811
483
  sharedCredentialsBadge: "_sharedCredentialsBadge_d0adf_7",
812
484
  version: "_version_d0adf_13",
813
485
  date: "_date_d0adf_17",
814
486
  emptyState: "_emptyState_d0adf_21",
815
487
  stripedRow: "_stripedRow_d0adf_25"
816
- }, it = ({ entries: e, currentVersion: t, isLoading: n = !1, hasError: r = !1, versionPrefix: i = "Version", currentBadgeLabel: a = "Current", sharedCredentialsLabel: o = "Shared credentials", emptyStateLabel: s = "Not published to this folder yet — this will be the first version here.", loadingLabel: c = "Loading history…", errorLabel: l = "Failed to load publish history.", versionClassName: u = "dial-small-text", dateClassName: d = "dial-small-text", emptyStateClassName: f = "dial-small-text", colors: p }) => {
817
- let m = oe({
488
+ }, Re = ({ entries: e, currentVersion: t, isLoading: n = !1, hasError: r = !1, versionPrefix: i = "Version", currentBadgeLabel: a = "Current", sharedCredentialsLabel: o = "Shared credentials", emptyStateLabel: s = "Not published to this folder yet — this will be the first version here.", loadingLabel: c = "Loading history…", errorLabel: l = "Failed to load publish history.", versionClassName: u = "dial-small-text", dateClassName: d = "dial-small-text", emptyStateClassName: f = "dial-small-text", colors: p }) => {
489
+ let m = L({
818
490
  "--phl-badge-border": p?.currentBadgeBorder,
819
491
  "--phl-badge-bg": p?.currentBadgeBackground,
820
492
  "--phl-badge-text": p?.currentBadgeText,
@@ -825,538 +497,524 @@ var G = /* @__PURE__ */ function(e) {
825
497
  "--phl-date-text": p?.dateText,
826
498
  "--phl-empty-text": p?.emptyStateText,
827
499
  "--phl-striped-bg": p?.stripedBackground
828
- }), h = B(f, rt.emptyState);
500
+ }), h = R(f, Le.emptyState);
829
501
  if (n || r || e.length === 0) {
830
502
  let e = s;
831
- return n ? e = c : r && (e = l), /* @__PURE__ */ H(te, {
832
- as: w.P,
503
+ return n ? e = c : r && (e = l), /* @__PURE__ */ B(x, {
504
+ as: S.P,
833
505
  style: m,
834
506
  className: h,
835
507
  children: e
836
508
  });
837
509
  }
838
- return /* @__PURE__ */ H("ul", {
510
+ return /* @__PURE__ */ B("ul", {
839
511
  style: m,
840
- children: e.map((e, n) => /* @__PURE__ */ U("li", {
841
- className: B("flex items-center justify-between gap-2 rounded-lg px-3 py-[11px]", n % 2 == 0 && rt.stripedRow),
842
- children: [/* @__PURE__ */ U("span", {
512
+ children: e.map((e, n) => /* @__PURE__ */ V("li", {
513
+ className: R("flex items-center justify-between gap-2 rounded-lg px-3 py-[11px]", n % 2 == 0 && Le.stripedRow),
514
+ children: [/* @__PURE__ */ V("span", {
843
515
  className: "flex min-w-0 items-center gap-2",
844
516
  style: m,
845
517
  children: [
846
- /* @__PURE__ */ U("span", {
847
- className: B(u, rt.version),
518
+ /* @__PURE__ */ V("span", {
519
+ className: R(u, Le.version),
848
520
  children: [
849
521
  i,
850
522
  " ",
851
523
  e.version
852
524
  ]
853
525
  }),
854
- e.version === t && /* @__PURE__ */ H(I, {
526
+ e.version === t && /* @__PURE__ */ B(N, {
855
527
  label: a,
856
- className: B("shrink-0 whitespace-nowrap", rt.currentBadge)
528
+ className: R("shrink-0 whitespace-nowrap", Le.currentBadge)
857
529
  }),
858
- e.publishCredentials === !0 && /* @__PURE__ */ H(I, {
530
+ e.publishCredentials === !0 && /* @__PURE__ */ B(N, {
859
531
  label: o,
860
- className: B("shrink-0 whitespace-nowrap", rt.sharedCredentialsBadge)
532
+ className: R("shrink-0 whitespace-nowrap", Le.sharedCredentialsBadge)
861
533
  })
862
534
  ]
863
- }), /* @__PURE__ */ H("span", {
864
- className: B(d, rt.date),
865
- children: X(e.publishedAt)
535
+ }), /* @__PURE__ */ B("span", {
536
+ className: R(d, Le.date),
537
+ children: ce(e.publishedAt)
866
538
  })]
867
539
  }, `${e.version}-${n}`))
868
540
  });
869
- }, at = ":", ot = (e) => `${at}${e}`, st = (e) => e?.startsWith(at) ? e.slice(1) : void 0, ct = (e) => [ot(e.rootKey), ...e.path], lt = (e) => {
870
- let [t, ...n] = e, r = st(t);
541
+ }, ze = ":", Be = (e) => `${ze}${e}`, Ve = (e) => e?.startsWith(ze) ? e.slice(1) : void 0, He = (e) => [Be(e.rootKey), ...e.path], Ue = (e) => {
542
+ let [t, ...n] = e, r = Ve(t);
871
543
  return r == null ? void 0 : {
872
544
  rootKey: r,
873
545
  path: n
874
546
  };
875
- }, ut = (e, t) => e.map((e) => ({
547
+ }, We = (e, t) => e.map((e) => ({
876
548
  ...e,
877
549
  path: [t, ...e.path],
878
- children: e.children ? ut(e.children, t) : void 0
879
- })), dt = (e) => e.map((e) => {
880
- let t = ot(e.key);
550
+ children: e.children ? We(e.children, t) : void 0
551
+ })), Ge = (e) => e.map((e) => {
552
+ let t = Be(e.key);
881
553
  return {
882
554
  path: [t],
883
555
  name: e.label,
884
- children: ut(ye(e.items), t)
556
+ children: We(me(e.items), t)
885
557
  };
886
- }), ft = (e) => e.map((e) => ot(e.key)), pt = (e, t) => {
558
+ }), Ke = (e) => e.map((e) => Be(e.key)), qe = (e, t) => {
887
559
  let n = /* @__PURE__ */ new Set();
888
560
  for (let r of e) {
889
- let e = ot(r.key);
561
+ let e = Be(r.key);
890
562
  for (let i of t(r) ?? []) n.add(i ? `${e}/${i}` : e);
891
563
  }
892
564
  return n;
893
- }, mt = (e, t) => {
565
+ }, Je = (e, t) => {
894
566
  let n = new Map(e.map((e) => [e.key, /* @__PURE__ */ new Set()]));
895
567
  for (let e of t) {
896
- let [t, ...r] = e.split("/"), i = st(t);
897
- i != null && r.length !== 0 && n.get(i)?.add($(r));
568
+ let [t, ...r] = e.split("/"), i = Ve(t);
569
+ i != null && r.length !== 0 && n.get(i)?.add(J(r));
898
570
  }
899
571
  return n;
900
- }, ht = {
572
+ }, Ye = {
901
573
  divider: "_divider_1gs31_1",
902
574
  tree: "_tree_1gs31_17"
903
- }, gt = "data-cancel-creating-folder", _t = "", vt = [], yt = ({ items: e = vt, selectedPath: n, onSelectedPathChange: o, onCreateFolder: s, roots: c, destination: l, onDestinationChange: u, onCreateDestinationFolder: p, searchQuery: m, getDisabledReason: h, disabled: g = !1, createFolderLabel: _ = "Create new folder", cancelCreatingFolderLabel: v = "Cancel", addSiblingFolderLabel: y = "Add sibling", addChildFolderLabel: x = "Add child", newFolderDefaultName: S = "New folder", noResultsLabel: ee = "No folders match \"{query}\".", emptyFolderNameError: C = "Folder name cannot be empty.", invalidFolderNameError: te = "Folder name contains invalid characters.", duplicateFolderNameError: w = "A folder with this name already exists.", sameAsParentFolderNameError: T = "A folder cannot have the same name as its parent folder.", rootLabel: E = "Organization", expandedPaths: D, onExpandedPathsChange: O, loadingPaths: k, styles: A = {} }) => {
904
- let ne = {
905
- ...oe({ "--pft-divider": A.colors?.divider }),
575
+ }, Xe = "data-cancel-creating-folder", Ze = "", Qe = [], $e = ({ items: e = Qe, selectedPath: n, onSelectedPathChange: o, onCreateFolder: s, roots: c, destination: d, onDestinationChange: f, onCreateDestinationFolder: p, searchQuery: m, getDisabledReason: h, disabled: g = !1, createFolderLabel: _ = "Create new folder", cancelCreatingFolderLabel: y = "Cancel", addSiblingFolderLabel: b = "Add sibling", addChildFolderLabel: x = "Add child", newFolderDefaultName: S = "New folder", noResultsLabel: C = "No folders match \"{query}\".", emptyFolderNameError: w = "Folder name cannot be empty.", invalidFolderNameError: T = "Folder name contains invalid characters.", duplicateFolderNameError: E = "A folder with this name already exists.", sameAsParentFolderNameError: D = "A folder cannot have the same name as its parent folder.", rootLabel: ee = "Organization", expandedPaths: O, onExpandedPathsChange: k, loadingPaths: te, styles: A = {} }) => {
576
+ let j = {
577
+ ...L({ "--pft-divider": A.colors?.divider }),
906
578
  ...A.cssVars
907
- }, j = c != null, M = r(() => c ? dt(c) : e, [c, e]), N = i(M);
579
+ }, M = c != null, N = r(() => c ? Ge(c) : e, [c, e]), P = i(N);
908
580
  t(() => {
909
- N.current = M;
910
- }, [M]);
911
- let P = r(() => c ? ft(c) : [_t], [c]), F = n;
912
- j && (F = l ? ct(l) : void 0);
913
- let re = (e) => {
914
- j ? u?.(e ? lt(e) : void 0) : o?.(e);
915
- }, [I, ie] = a(() => new Set(F?.map((e, t) => $(F.slice(0, t + 1))) ?? [])), L = r(() => c ? /* @__PURE__ */ new Set([...I, ...pt(c, (e) => e.expandedPaths)]) : void 0, [c, I]) ?? D ?? I, R = r(() => c ? pt(c, (e) => e.loadingPaths) : k, [c, k]), ae = (e) => {
581
+ P.current = N;
582
+ }, [N]);
583
+ let F = r(() => c ? Ke(c) : [Ze], [c]), I = n;
584
+ M && (I = d ? He(d) : void 0);
585
+ let z = (e) => {
586
+ M ? f?.(e ? Ue(e) : void 0) : o?.(e);
587
+ }, [ie, U] = a(() => new Set(I?.map((e, t) => J(I.slice(0, t + 1))) ?? [])), W = r(() => c ? /* @__PURE__ */ new Set([...ie, ...qe(c, (e) => e.expandedPaths)]) : void 0, [c, ie]) ?? O ?? ie, oe = r(() => c ? qe(c, (e) => e.loadingPaths) : te, [c, te]), se = (e) => {
916
588
  let t = new Set(e);
917
- for (let e of P) t.delete(e);
589
+ for (let e of F) t.delete(e);
918
590
  if (c) {
919
- ie(t);
920
- let e = mt(c, t);
591
+ U(t);
592
+ let e = Je(c, t);
921
593
  for (let t of c) t.onExpandedPathsChange?.(e.get(t.key) ?? /* @__PURE__ */ new Set());
922
- } else O ? O(t) : ie(t);
923
- }, [z, se] = a(null), [V, ce] = a(S), W = i(null), G = i(!1);
594
+ } else k ? k(t) : U(t);
595
+ }, [G, ce] = a(null), [le, ue] = a(S), de = i(null), K = i(!1);
924
596
  t(() => {
925
597
  let e = (e) => {
926
- e.target instanceof Element && e.target.closest(`[${gt}]`) && (G.current = !0);
598
+ e.target instanceof Element && e.target.closest(`[${Xe}]`) && (K.current = !0);
927
599
  };
928
600
  return document.addEventListener("pointerdown", e, !0), () => document.removeEventListener("pointerdown", e, !0);
929
601
  }, []);
930
- let K = m.trim(), q = z != null, J = r(() => _e(M, m), [M, m]), pe = K.length > 0 && J.length === 0, Y = !q && K.length > 0, X = r(() => {
931
- let e = Y ? J : M;
932
- return j ? e : ye(e);
602
+ let q = m.trim(), pe = G != null, he = r(() => fe(N, m), [N, m]), ge = q.length > 0 && he.length === 0, Y = !pe && q.length > 0, X = r(() => {
603
+ let e = Y ? he : N;
604
+ return M ? e : me(e);
933
605
  }, [
934
606
  Y,
935
- J,
936
- M,
937
- j
938
- ]), Z = r(() => /* @__PURE__ */ new Set([...P, ...Se(X)]), [P, X]), me = r(() => /* @__PURE__ */ new Set([...P, ...Y ? Z : L]), [
939
- P,
607
+ he,
608
+ N,
609
+ M
610
+ ]), Ce = r(() => /* @__PURE__ */ new Set([...F, ..._e(X)]), [F, X]), Z = r(() => /* @__PURE__ */ new Set([...F, ...Y ? Ce : W]), [
611
+ F,
940
612
  Y,
941
- Z,
942
- L
943
- ]), he = r(() => Te(X), [X]), Q = r(() => Y && he.length === 0 ? [] : j ? he : [{
944
- path: _t,
945
- name: E,
946
- folderId: _t,
947
- nodeType: de.FOLDER,
948
- items: he
613
+ Ce,
614
+ W
615
+ ]), we = r(() => ye(X), [X]), Te = r(() => Y && we.length === 0 ? [] : M ? we : [{
616
+ path: Ze,
617
+ name: ee,
618
+ folderId: Ze,
619
+ nodeType: ne.FOLDER,
620
+ items: we
949
621
  }], [
950
- he,
951
- E,
622
+ we,
623
+ ee,
952
624
  Y,
953
- j
954
- ]), ge = z ? $(z) : null, ve = {
955
- empty: C,
956
- invalid: te,
957
- duplicate: w,
958
- sameAsParent: T
959
- }, be = (e) => P.includes($(e)) ? void 0 : e.at(-1), xe = (e) => c ? lt(e) : {
960
- rootKey: _t,
625
+ M
626
+ ]), Ee = G ? J(G) : null, Q = {
627
+ empty: w,
628
+ invalid: T,
629
+ duplicate: E,
630
+ sameAsParent: D
631
+ }, De = (e) => F.includes(J(e)) ? void 0 : e.at(-1), $ = (e) => c ? Ue(e) : {
632
+ rootKey: Ze,
961
633
  path: e
962
- }, we = (e) => {
634
+ }, Oe = (e) => {
963
635
  if (!h) return;
964
- let t = xe(Ce(e.path));
636
+ let t = $(ve(e.path));
965
637
  return t && h(t) || void 0;
966
- }, Ee = (e) => {
967
- let t = xe(e);
638
+ }, ke = (e) => {
639
+ let t = $(e);
968
640
  return t != null && !!h?.(t);
969
641
  }, Ae = (e) => {
970
- if (Ee(e)) return !1;
642
+ if (ke(e)) return !1;
971
643
  if (!c) return !0;
972
- let t = lt(e), n = c.find((e) => e.key === t?.rootKey);
644
+ let t = Ue(e), n = c.find((e) => e.key === t?.rootKey);
973
645
  return n != null && n.canCreateFolders !== !1;
974
646
  }, je = (() => {
975
647
  if (!c) {
976
- let e = F ?? [];
648
+ let e = I ?? [];
977
649
  return Ae(e) ? e : void 0;
978
650
  }
979
- if (F && Ae(F)) return F;
651
+ if (I && Ae(I)) return I;
980
652
  let e = c.find((e) => e.canCreateFolders !== !1);
981
- return e ? ct({
653
+ return e ? He({
982
654
  rootKey: e.key,
983
655
  path: []
984
656
  }) : void 0;
985
657
  })(), Me = (e) => {
986
- let t = pe && De(K, [], ve) == null, n = be(e);
987
- return Oe(t ? K : S, [...ke(M, e), ...n ? [n] : []]);
658
+ let t = ge && be(q, [], Q) == null, n = De(e);
659
+ return xe(t ? q : S, [...Se(N, e), ...n ? [n] : []]);
988
660
  }, [Ne, Pe] = a(null);
989
- Ne != null && !R?.has($(Ne)) && (Pe(null), se(Ne), ce(Me(Ne)));
661
+ Ne != null && !oe?.has(J(Ne)) && (Pe(null), ce(Ne), ue(Me(Ne)));
990
662
  let Fe = (e) => {
991
- se(null), Pe(e), W.current = null, G.current = !1;
992
- let t = $(e);
993
- t && ae(new Set(L).add(t));
663
+ ce(null), Pe(e), de.current = null, K.current = !1;
664
+ let t = J(e);
665
+ t && se(new Set(W).add(t));
994
666
  }, Ie = () => {
995
667
  je && Fe(je);
996
668
  }, Le = (e) => {
997
- let t = Ce(e.path);
669
+ let t = ve(e.path);
998
670
  if (!Ae(t)) return [];
999
671
  let n = [{
1000
672
  key: "add-child",
1001
673
  label: x,
1002
- icon: /* @__PURE__ */ H(le, {
1003
- size: d.SM,
674
+ icon: /* @__PURE__ */ B(ae, {
675
+ size: l.SM,
1004
676
  "aria-hidden": !0,
1005
- stroke: f
677
+ stroke: u
1006
678
  }),
1007
679
  onClick: () => Fe(t)
1008
680
  }];
1009
- return P.includes(e.path) || n.push({
681
+ return F.includes(e.path) || n.push({
1010
682
  key: "add-sibling",
1011
- label: y,
1012
- icon: /* @__PURE__ */ H(ue, {
1013
- size: d.SM,
683
+ label: b,
684
+ icon: /* @__PURE__ */ B(H, {
685
+ size: l.SM,
1014
686
  "aria-hidden": !0,
1015
- stroke: f
687
+ stroke: u
1016
688
  }),
1017
689
  onClick: () => Fe(t.slice(0, -1))
1018
690
  }), n;
1019
691
  }, Re = (e) => {
1020
- if (!z) return null;
1021
- let t = De(e, ke(N.current, z), ve, be(z));
1022
- return W.current = t, t;
692
+ if (!G) return null;
693
+ let t = be(e, Se(P.current, G), Q, De(G));
694
+ return de.current = t, t;
1023
695
  }, ze = (e) => {
1024
- if (!z || G.current) return;
1025
- let t = e.trim(), n = W.current;
696
+ if (!G || K.current) return;
697
+ let t = e.trim(), n = de.current;
1026
698
  if (!(Re(e) ?? n)) {
1027
- let e = c ? lt(z) : void 0;
1028
- e ? p?.(e.rootKey, e.path, t) : s?.(z, t), re([...z, t]);
699
+ let e = c ? Ue(G) : void 0;
700
+ e ? p?.(e.rootKey, e.path, t) : s?.(G, t), z([...G, t]);
1029
701
  }
1030
- se(null);
1031
- }, Be = () => se(null);
1032
- return /* @__PURE__ */ U("div", {
1033
- style: ne,
1034
- className: B(g && "pointer-events-none opacity-60", A.className),
702
+ ce(null);
703
+ }, Be = () => ce(null);
704
+ return /* @__PURE__ */ V("div", {
705
+ style: j,
706
+ className: R(g && "pointer-events-none opacity-60", A.className),
1035
707
  children: [
1036
- /* @__PURE__ */ H("div", {
1037
- className: B("w-full max-w-full min-w-0", ht.tree),
1038
- children: /* @__PURE__ */ H(fe, {
1039
- items: Q,
708
+ /* @__PURE__ */ B("div", {
709
+ className: R("w-full max-w-full min-w-0", Ye.tree),
710
+ children: /* @__PURE__ */ B(re, {
711
+ items: Te,
1040
712
  showFiles: !1,
1041
- selectedPath: F == null ? void 0 : $(F),
1042
- expandedPaths: me,
1043
- onExpandedPathsChange: ae,
1044
- loadingPaths: R,
713
+ selectedPath: I == null ? void 0 : J(I),
714
+ expandedPaths: Z,
715
+ onExpandedPathsChange: se,
716
+ loadingPaths: oe,
1045
717
  onItemClick: (e) => {
1046
- if (g || we(e)) return;
1047
- let t = F != null && $(F) === e.path;
1048
- re(t ? void 0 : Ce(e.path));
718
+ if (g || Oe(e)) return;
719
+ let t = I != null && J(I) === e.path;
720
+ z(t ? void 0 : ve(e.path));
1049
721
  },
1050
- getDisabledTooltip: h ? we : void 0,
722
+ getDisabledTooltip: h ? Oe : void 0,
1051
723
  getContextMenuItems: Le,
1052
- createdFolderPath: ge,
1053
- newFolderDefaultName: V,
724
+ createdFolderPath: Ee,
725
+ newFolderDefaultName: le,
1054
726
  onCreateFolderSave: ze,
1055
727
  onCreateFolderCancel: Be,
1056
728
  onRenameValidate: (e) => Re(e),
1057
- searchQuery: Y ? K : void 0,
1058
- emptyStateTitle: Y ? ee.replace("{query}", K) : void 0
729
+ searchQuery: Y ? q : void 0,
730
+ emptyStateTitle: Y ? C.replace("{query}", q) : void 0
1059
731
  })
1060
732
  }),
1061
- /* @__PURE__ */ H("div", {
1062
- className: B("my-2 h-px", ht.divider),
733
+ /* @__PURE__ */ B("div", {
734
+ className: R("my-2 h-px", Ye.divider),
1063
735
  "aria-hidden": !0
1064
736
  }),
1065
- /* @__PURE__ */ U("div", {
737
+ /* @__PURE__ */ V("div", {
1066
738
  className: "mb-4 flex flex-wrap items-center gap-2",
1067
- children: [/* @__PURE__ */ H(b, {
739
+ children: [/* @__PURE__ */ B(v, {
1068
740
  onClick: Ie,
1069
741
  label: _,
1070
- iconBefore: /* @__PURE__ */ H(ue, {
1071
- size: d.SM,
742
+ iconBefore: /* @__PURE__ */ B(H, {
743
+ size: l.SM,
1072
744
  "aria-hidden": !0,
1073
- stroke: f
745
+ stroke: u
1074
746
  }),
1075
- disabled: g || q || !je
1076
- }), q && /* @__PURE__ */ H(b, {
1077
- label: v,
747
+ disabled: g || pe || !je
748
+ }), pe && /* @__PURE__ */ B(v, {
749
+ label: y,
1078
750
  onClick: Be,
1079
751
  disabled: g,
1080
- [gt]: ""
752
+ [Xe]: ""
1081
753
  })]
1082
754
  })
1083
755
  ]
1084
756
  });
1085
- }, bt = {
757
+ }, et = {
1086
758
  summaryTitle: "_summaryTitle_hp97x_1",
1087
759
  sectionHeading: "_sectionHeading_hp97x_5",
1088
760
  destination: "_destination_hp97x_9",
1089
761
  directNote: "_directNote_hp97x_13"
1090
- }, xt = 200, St = [], Ct = [], wt = ({ view: e = Q.Main, onChangeFolderClick: o, resource: s, renderSummary: c, dependencies: u, versionHistory: p, folderItems: m, selectedFolderPath: g, pendingFolderPath: _, onPendingFolderPathChange: v, onCreateFolder: x, getDisabledReason: S, expandedPaths: C, onExpandedPathsChange: te, loadingPaths: w, hasExistingPublicationInFolder: T, hasWriteAccess: E, isSubmitting: A, hasSubmitError: ne = !1, isTargetTaken: M = !1, isTargetChecking: N = !1, allowReplace: P = !0, author: F = "", onAuthorChange: re, publishCredentials: I = !1, onPublishCredentialsChange: ie, rules: L = St, onRulesChange: R, ruleSourceOptions: z = Ct, isRulesLoading: se = !1, hasRulesLoadError: V = !1, isDirectWrite: le = !1, directUnavailableNote: ue, labels: W = {}, summaryTitleClassName: de = "dial-body-semi-text", headingClassName: fe = "dial-body-semi-text", directNoteClassName: G = "dial-small-text", destinationClassName: q = "dial-small-semi-text", calloutFolderNameClassName: J = "dial-small-paragraph-semi-text", styles: Y = {} }) => {
1091
- let { colors: X, folderTree: Z, accessRules: me, dependencies: he } = Y, ge = {
1092
- ...oe({
1093
- "--pp-summary-title-text": X?.summaryTitleText,
1094
- "--pp-heading-text": X?.headingText,
1095
- "--pp-destination-text": X?.destinationText,
1096
- "--pp-direct-note-text": X?.directNoteText
762
+ }, tt = 200, nt = ({ view: e = K.Main, onChangeFolderClick: o, resource: c, renderSummary: d, dependencies: f, versionHistory: m, folderItems: h, selectedFolderPath: g, pendingFolderPath: b, onPendingFolderPathChange: x, onCreateFolder: S, getDisabledReason: C, expandedPaths: w, onExpandedPathsChange: ee, loadingPaths: O, hasExistingPublicationInFolder: te, hasWriteAccess: A, isSubmitting: j, hasSubmitError: M = !1, isTargetTaken: N = !1, isTargetChecking: P = !1, allowReplace: F = !0, author: z = "", onAuthorChange: ne, publishCredentials: re = !1, onPublishCredentialsChange: ae, isDirectWrite: H = !1, directUnavailableNote: W, labels: oe = {}, summaryTitleClassName: G = "dial-body-semi-text", headingClassName: ce = "dial-body-semi-text", directNoteClassName: le = "dial-small-text", destinationClassName: ue = "dial-small-semi-text", calloutFolderNameClassName: de = "dial-small-paragraph-semi-text", styles: q = {} }) => {
763
+ let { colors: fe, folderTree: pe, dependencies: me } = q, he = {
764
+ ...L({
765
+ "--pp-summary-title-text": fe?.summaryTitleText,
766
+ "--pp-heading-text": fe?.headingText,
767
+ "--pp-destination-text": fe?.destinationText,
768
+ "--pp-direct-note-text": fe?.directNoteText
1097
769
  }),
1098
- ...Y.cssVars
1099
- }, _e = {
1100
- border: X?.summaryBorder,
1101
- background: X?.summaryBackground
1102
- }, { folderLabel: ve = "Publish to folder", destinationAriaLabel: ye = "Destination folder", noFolderSelectedLabel: be = "No folder selected", changeFolderLabel: xe = "Change", chooseFolderLabel: Se = "Choose", replaceWarning: $ = "Version {version} is already published in {folder}. Publishing will replace it.", targetTakenLabel: Ce = "A resource with this name already exists in {folder}. Rename it or choose another folder.", targetTakenVersionedLabel: we = "Version {version} of a resource with this name already exists in {folder}. Rename it, change its version or choose another folder.", noAccessError: Te = "You don't have permission to publish to {folder}. Pick another, or ask an owner for access.", submitError: Ee = "Publishing failed. Please try again.", adminApprovalTitle: De = "Admin approval required", adminApprovalMessage: Oe = "We’ll send a request to your organization’s admin. If approved, it will appear in the folder.", folderEmptyStateLabel: ke, addSiblingFolderLabel: Ae, addChildFolderLabel: je, cancelCreatingFolderLabel: Me, createFolderEmptyNameError: Ne, createFolderInvalidNameError: Pe, createFolderDuplicateNameError: Fe, createFolderSameAsParentNameError: Ie, rootFolderLabel: Le = "Organization", accessRulesLabels: Re, dependenciesLabels: Be, searchPlaceholder: Ve, clearSearchAriaLabel: He, authorLabel: Ue = "Author", authorPlaceholder: Ke = "Author name", authorHint: qe = "Shown as the publication’s author. Defaults to you — replace it to credit a team instead.", credentialsLabel: Je = "Publish with my credentials", directWriteNote: Ye, credentialsHint: Xe = "Members will use this without signing in themselves. Your credential itself is never shown to them." } = W, [Ze, Qe] = a(""), $e = n(), et = i(null), tt = i(null), rt = (e) => {
1103
- Qe(e ?? "");
1104
- }, it = i(e);
770
+ ...q.cssVars
771
+ }, ge = {
772
+ border: fe?.summaryBorder,
773
+ background: fe?.summaryBackground
774
+ }, { folderLabel: _e = "Publish to folder", destinationAriaLabel: J = "Destination folder", noFolderSelectedLabel: ve = "No folder selected", changeFolderLabel: Y = "Change", chooseFolderLabel: ye = "Choose", replaceWarning: X = "Version {version} is already published in {folder}. Publishing will replace it.", targetTakenLabel: be = "A resource with this name already exists in {folder}. Rename it or choose another folder.", targetTakenVersionedLabel: xe = "Version {version} of a resource with this name already exists in {folder}. Rename it, change its version or choose another folder.", noAccessError: Se = "You don't have permission to publish to {folder}. Pick another, or ask an owner for access.", submitError: Ce = "Publishing failed. Please try again.", adminApprovalTitle: Z = "Admin approval required", adminApprovalMessage: we = "We’ll send a request to your organization’s admin. If approved, it will appear in the folder.", folderEmptyStateLabel: Te, addSiblingFolderLabel: De, addChildFolderLabel: $, cancelCreatingFolderLabel: Oe, createFolderEmptyNameError: ke, createFolderInvalidNameError: Ae, createFolderDuplicateNameError: je, createFolderSameAsParentNameError: Me, rootFolderLabel: Ne = "Organization", dependenciesLabels: Pe, searchPlaceholder: Fe, clearSearchAriaLabel: Le, authorLabel: Re = "Author", authorPlaceholder: ze = "Author name", authorHint: Be = "Shown as the publication’s author. Defaults to you — replace it to credit a team instead.", credentialsLabel: Ve = "Publish with my credentials", directWriteNote: He, credentialsHint: Ue = "Members will use this without signing in themselves. Your credential itself is never shown to them." } = oe, [We, Ge] = a(""), Ke = n(), qe = i(null), Je = i(null), Ye = (e) => {
775
+ Ge(e ?? "");
776
+ }, Xe = i(e);
1105
777
  t(() => {
1106
- it.current !== e && (it.current = e, e === Q.ChangeFolder ? tt.current?.focus({ preventScroll: !0 }) : et.current?.focus({ preventScroll: !0 }));
778
+ Xe.current !== e && (Xe.current = e, e === K.ChangeFolder ? Je.current?.focus({ preventScroll: !0 }) : qe.current?.focus({ preventScroll: !0 }));
1107
779
  }, [e]);
1108
- let at = g != null, ot = r(() => pe({
1109
- hasSelectedFolder: at,
1110
- hasExistingPublicationInFolder: T,
1111
- hasWriteAccess: E,
1112
- isSubmitting: A,
1113
- hasSubmitError: ne,
1114
- isTargetTaken: M,
1115
- isTargetChecking: N,
1116
- allowReplace: P
780
+ let Ze = g != null, Qe = r(() => se({
781
+ hasSelectedFolder: Ze,
782
+ hasExistingPublicationInFolder: te,
783
+ hasWriteAccess: A,
784
+ isSubmitting: j,
785
+ hasSubmitError: M,
786
+ isTargetTaken: N,
787
+ isTargetChecking: P,
788
+ allowReplace: F
1117
789
  }), [
1118
- at,
1119
- T,
1120
- E,
790
+ Ze,
791
+ te,
1121
792
  A,
1122
- ne,
793
+ j,
1123
794
  M,
1124
795
  N,
1125
- P
1126
- ]), st = at ? g[g.length - 1] ?? Le : "", ct = c ? c() : /* @__PURE__ */ H("span", {
1127
- className: B("truncate", de, bt.summaryTitle),
1128
- children: s?.title
796
+ P,
797
+ F
798
+ ]), nt = Ze ? g[g.length - 1] ?? Ne : "", it = d ? d() : /* @__PURE__ */ B("span", {
799
+ className: R("truncate", G, et.summaryTitle),
800
+ children: c?.title
1129
801
  });
1130
- if (e === Q.ChangeFolder) return /* @__PURE__ */ U("div", {
1131
- ref: tt,
802
+ if (e === K.ChangeFolder) return /* @__PURE__ */ V("div", {
803
+ ref: Je,
1132
804
  tabIndex: -1,
1133
805
  role: "group",
1134
- "aria-label": ve,
1135
- className: B("flex flex-col gap-3 outline-none", Ge.panel),
1136
- style: ge,
1137
- children: [/* @__PURE__ */ H("div", {
806
+ "aria-label": _e,
807
+ className: R("flex flex-col gap-3 outline-none", Q.panel),
808
+ style: he,
809
+ children: [/* @__PURE__ */ B("div", {
1138
810
  role: "search",
1139
- children: /* @__PURE__ */ H(j, {
1140
- value: Ze,
1141
- onChange: rt,
1142
- placeholder: Ve,
1143
- clearLabel: He,
1144
- "aria-label": Ve
811
+ children: /* @__PURE__ */ B(k, {
812
+ value: We,
813
+ onChange: Ye,
814
+ placeholder: Fe,
815
+ clearLabel: Le,
816
+ "aria-label": Fe
1145
817
  })
1146
- }), /* @__PURE__ */ H(yt, {
1147
- items: m,
1148
- selectedPath: _,
1149
- onSelectedPathChange: v,
1150
- onCreateFolder: x,
1151
- getDisabledReason: S,
1152
- expandedPaths: C,
1153
- onExpandedPathsChange: te,
1154
- loadingPaths: w,
1155
- searchQuery: Ze,
1156
- disabled: A,
1157
- noResultsLabel: ke,
1158
- addSiblingFolderLabel: Ae,
1159
- addChildFolderLabel: je,
1160
- cancelCreatingFolderLabel: Me,
1161
- emptyFolderNameError: Ne,
1162
- invalidFolderNameError: Pe,
1163
- duplicateFolderNameError: Fe,
1164
- sameAsParentFolderNameError: Ie,
1165
- rootLabel: Le,
1166
- styles: Z
818
+ }), /* @__PURE__ */ B($e, {
819
+ items: h,
820
+ selectedPath: b,
821
+ onSelectedPathChange: x,
822
+ onCreateFolder: S,
823
+ getDisabledReason: C,
824
+ expandedPaths: w,
825
+ onExpandedPathsChange: ee,
826
+ loadingPaths: O,
827
+ searchQuery: We,
828
+ disabled: j,
829
+ noResultsLabel: Te,
830
+ addSiblingFolderLabel: De,
831
+ addChildFolderLabel: $,
832
+ cancelCreatingFolderLabel: Oe,
833
+ emptyFolderNameError: ke,
834
+ invalidFolderNameError: Ae,
835
+ duplicateFolderNameError: je,
836
+ sameAsParentFolderNameError: Me,
837
+ rootLabel: Ne,
838
+ styles: pe
1167
839
  })]
1168
840
  });
1169
- let lt = B(q, bt.destination);
1170
- return /* @__PURE__ */ U("div", {
1171
- className: B("flex flex-col gap-5", Ge.panel),
1172
- style: ge,
841
+ let ot = R(ue, et.destination);
842
+ return /* @__PURE__ */ V("div", {
843
+ className: R("flex flex-col gap-5", Q.panel),
844
+ style: he,
1173
845
  children: [
1174
- s?.type == null ? /* @__PURE__ */ H(ae, {
1175
- colors: _e,
1176
- children: ct
1177
- }) : /* @__PURE__ */ H(ae, {
846
+ c?.type == null ? /* @__PURE__ */ B(I, {
847
+ colors: ge,
848
+ children: it
849
+ }) : /* @__PURE__ */ B(I, {
1178
850
  item: {
1179
- type: s.type,
1180
- name: s.title,
1181
- version: s.version ?? "",
1182
- iconUrl: s.iconUrl
851
+ type: c.type,
852
+ name: c.title,
853
+ version: c.version ?? "",
854
+ iconUrl: c.iconUrl
1183
855
  },
1184
856
  hasVersionTag: !1,
1185
- colors: _e
857
+ colors: ge
1186
858
  }),
1187
- /* @__PURE__ */ U("section", { children: [
1188
- /* @__PURE__ */ H("h2", {
1189
- className: B("mb-2", fe, bt.sectionHeading),
1190
- children: ve
859
+ /* @__PURE__ */ V("section", { children: [
860
+ /* @__PURE__ */ B("h2", {
861
+ className: R("mb-2", ce, et.sectionHeading),
862
+ children: _e
1191
863
  }),
1192
- /* @__PURE__ */ U("div", {
864
+ /* @__PURE__ */ V("div", {
1193
865
  className: "flex min-w-0 items-center gap-2",
1194
- children: [/* @__PURE__ */ H("div", {
866
+ children: [/* @__PURE__ */ B("div", {
1195
867
  role: "group",
1196
- "aria-label": ye,
868
+ "aria-label": J,
1197
869
  className: "min-w-0 flex-1",
1198
- children: at ? /* @__PURE__ */ H(y, {
1199
- name: [Le, ...g].join(" / "),
1200
- nameClassName: lt
1201
- }) : /* @__PURE__ */ H("span", {
1202
- className: B("block truncate", lt),
1203
- children: be
870
+ children: Ze ? /* @__PURE__ */ B(_, {
871
+ name: [Ne, ...g].join(" / "),
872
+ nameClassName: ot
873
+ }) : /* @__PURE__ */ B("span", {
874
+ className: R("block truncate", ot),
875
+ children: ve
1204
876
  })
1205
- }), /* @__PURE__ */ H(b, {
1206
- ref: et,
1207
- size: h.Small,
1208
- label: at ? xe : Se,
1209
- iconBefore: /* @__PURE__ */ H(ce, {
1210
- size: d.SM,
1211
- stroke: f,
877
+ }), /* @__PURE__ */ B(v, {
878
+ ref: qe,
879
+ size: p.Small,
880
+ label: Ze ? Y : ye,
881
+ iconBefore: /* @__PURE__ */ B(ie, {
882
+ size: l.SM,
883
+ stroke: u,
1212
884
  "aria-hidden": !0
1213
885
  }),
1214
- disabled: A,
886
+ disabled: j,
1215
887
  onClick: o
1216
888
  })]
1217
889
  }),
1218
- ot.calloutKind === K.Info && !le && /* @__PURE__ */ H("div", {
890
+ Qe.calloutKind === U.Info && !H && /* @__PURE__ */ B("div", {
1219
891
  className: "my-4",
1220
- children: /* @__PURE__ */ H(D, {
1221
- type: O.SectionMessage,
1222
- variant: k.Info,
1223
- title: De,
1224
- message: Oe
892
+ children: /* @__PURE__ */ B(T, {
893
+ type: E.SectionMessage,
894
+ variant: D.Info,
895
+ title: Z,
896
+ message: we
1225
897
  })
1226
898
  }),
1227
- ot.calloutKind !== K.None && ot.calloutKind !== K.Info && /* @__PURE__ */ H("div", {
899
+ Qe.calloutKind !== U.None && Qe.calloutKind !== U.Info && /* @__PURE__ */ B("div", {
1228
900
  className: "mt-3",
1229
- children: /* @__PURE__ */ H(D, {
1230
- type: O.SectionMessage,
1231
- variant: Tt(ot.calloutKind),
1232
- message: Dt(ot.calloutKind, {
1233
- replaceWarning: $,
1234
- targetTaken: s?.version ? we : Ce,
1235
- noAccessError: Te,
1236
- submitError: Ee,
1237
- folderName: st,
1238
- version: s?.version,
1239
- folderNameClassName: J
901
+ children: /* @__PURE__ */ B(T, {
902
+ type: E.SectionMessage,
903
+ variant: rt(Qe.calloutKind),
904
+ message: at(Qe.calloutKind, {
905
+ replaceWarning: X,
906
+ targetTaken: c?.version ? xe : be,
907
+ noAccessError: Se,
908
+ submitError: Ce,
909
+ folderName: nt,
910
+ version: c?.version,
911
+ folderNameClassName: de
1240
912
  })
1241
913
  })
1242
914
  }),
1243
- ue != null && !le && /* @__PURE__ */ H("div", {
915
+ W != null && !H && /* @__PURE__ */ B("div", {
1244
916
  className: "mt-4",
1245
- children: /* @__PURE__ */ H(D, {
1246
- type: O.SectionMessage,
1247
- variant: k.Info,
1248
- message: ue
917
+ children: /* @__PURE__ */ B(T, {
918
+ type: E.SectionMessage,
919
+ variant: D.Info,
920
+ message: W
1249
921
  })
1250
922
  }),
1251
- re != null && !le && /* @__PURE__ */ H("div", {
923
+ ne != null && !H && /* @__PURE__ */ B("div", {
1252
924
  className: "mt-4",
1253
- children: /* @__PURE__ */ H(ee, {
1254
- id: $e,
1255
- labelProps: { label: Ue },
1256
- placeholder: Ke,
1257
- caption: qe,
1258
- value: F,
1259
- onChange: (e) => re(e ?? ""),
1260
- maxLength: xt,
1261
- disabled: A
925
+ children: /* @__PURE__ */ B(y, {
926
+ id: Ke,
927
+ labelProps: { label: Re },
928
+ placeholder: ze,
929
+ caption: Be,
930
+ value: z,
931
+ onChange: (e) => ne(e ?? ""),
932
+ maxLength: tt,
933
+ disabled: j
1262
934
  })
1263
935
  }),
1264
- le && Ye != null && /* @__PURE__ */ H("p", {
1265
- className: B("mt-4", bt.directNote, G),
1266
- children: Ye
1267
- }),
1268
- ie != null && !le && /* @__PURE__ */ H("div", {
1269
- className: "mt-4",
1270
- children: /* @__PURE__ */ H(l, {
1271
- labelProps: { label: Je },
1272
- caption: Xe,
1273
- isSelected: I,
1274
- onChange: ie,
1275
- disabled: A
1276
- })
936
+ H && He != null && /* @__PURE__ */ B("p", {
937
+ className: R("mt-4", et.directNote, le),
938
+ children: He
1277
939
  }),
1278
- R != null && !le && /* @__PURE__ */ H("div", {
940
+ ae != null && !H && /* @__PURE__ */ B("div", {
1279
941
  className: "mt-4",
1280
- children: /* @__PURE__ */ H(ze, {
1281
- rules: L,
1282
- onRulesChange: R,
1283
- sourceOptions: z,
1284
- folderName: at ? st : void 0,
1285
- disabled: A,
1286
- isLoading: se,
1287
- hasLoadError: V,
1288
- labels: Re,
1289
- styles: me
942
+ children: /* @__PURE__ */ B(s, {
943
+ labelProps: { label: Ve },
944
+ caption: Ue,
945
+ isSelected: re,
946
+ onChange: ae,
947
+ disabled: j
1290
948
  })
1291
949
  })
1292
950
  ] }),
1293
- u != null && /* @__PURE__ */ H(nt, {
1294
- dependencies: u,
1295
- labels: Be,
1296
- headingClassName: fe,
1297
- styles: he
951
+ f != null && /* @__PURE__ */ B(Ie, {
952
+ dependencies: f,
953
+ labels: Pe,
954
+ headingClassName: ce,
955
+ styles: me
1298
956
  }),
1299
- p != null && /* @__PURE__ */ H(We, {
1300
- headingClassName: fe,
1301
- ...p
957
+ m != null && /* @__PURE__ */ B(Ee, {
958
+ headingClassName: ce,
959
+ ...m
1302
960
  })
1303
961
  ]
1304
962
  });
1305
- }, Tt = (e) => e === K.ReplaceWarning || e === K.TargetTaken ? k.Warning : k.Error, Et = (e, t, n) => {
963
+ }, rt = (e) => e === U.ReplaceWarning || e === U.TargetTaken ? D.Warning : D.Error, it = (e, t, n) => {
1306
964
  let [r, i, ...a] = e.split("{folder}");
1307
- return i === void 0 || a.length > 0 ? e : /* @__PURE__ */ U(V, { children: [
965
+ return i === void 0 || a.length > 0 ? e : /* @__PURE__ */ V(z, { children: [
1308
966
  r,
1309
- /* @__PURE__ */ H("strong", {
967
+ /* @__PURE__ */ B("strong", {
1310
968
  className: n,
1311
969
  children: t
1312
970
  }),
1313
971
  i
1314
972
  ] });
1315
- }, Dt = (e, t) => e === K.ReplaceWarning ? Et(t.replaceWarning.replace("{version}", t.version ?? ""), t.folderName, t.folderNameClassName) : e === K.TargetTaken ? Et(t.targetTaken.replace("{version}", t.version ?? ""), t.folderName, t.folderNameClassName) : e === K.NoAccess ? Et(t.noAccessError, t.folderName, t.folderNameClassName) : t.submitError, Ot = { footer: "_footer_dks1v_1" }, kt = ({ version: e, hasExistingPublicationInFolder: t, allowReplace: n = !0, isSubmitDisabled: r, isSubmitLoading: i, onCancel: a, onSubmit: o, view: s = Q.Main, onSelectFolder: c, isSelectFolderDisabled: l = !1, labels: u = {}, colors: f }) => {
1316
- let p = oe({ "--pf-border": f?.border }), { cancelLabel: m = "Cancel", publishDefaultLabel: h = "Publish", updateLabel: g = "Update version {version}", publishingInProgressLabel: _ = "Publishing…", selectFolderLabel: v = "Select" } = u, y = s === Q.ChangeFolder, x = i ? _ : n && t && e != null ? g.replace("{version}", e) : h;
1317
- return /* @__PURE__ */ U("div", {
973
+ }, at = (e, t) => e === U.ReplaceWarning ? it(t.replaceWarning.replace("{version}", t.version ?? ""), t.folderName, t.folderNameClassName) : e === U.TargetTaken ? it(t.targetTaken.replace("{version}", t.version ?? ""), t.folderName, t.folderNameClassName) : e === U.NoAccess ? it(t.noAccessError, t.folderName, t.folderNameClassName) : t.submitError, ot = { footer: "_footer_dks1v_1" }, st = ({ version: e, hasExistingPublicationInFolder: t, allowReplace: n = !0, isSubmitDisabled: r, isSubmitLoading: i, onCancel: a, onSubmit: o, view: s = K.Main, onSelectFolder: c, isSelectFolderDisabled: u = !1, labels: d = {}, colors: f }) => {
974
+ let p = L({ "--pf-border": f?.border }), { cancelLabel: m = "Cancel", publishDefaultLabel: h = "Publish", updateLabel: g = "Update version {version}", publishingInProgressLabel: _ = "Publishing…", selectFolderLabel: y = "Select" } = d, b = s === K.ChangeFolder, x = i ? _ : n && t && e != null ? g.replace("{version}", e) : h;
975
+ return /* @__PURE__ */ V("div", {
1318
976
  style: p,
1319
- className: B("flex items-center justify-end gap-2 border-t px-4 py-4 rtl:flex-row-reverse rtl:justify-start desktop:px-3.5", Ot.footer),
1320
- children: [/* @__PURE__ */ H(b, {
977
+ className: R("flex items-center justify-end gap-2 border-t px-4 py-4 rtl:flex-row-reverse rtl:justify-start desktop:px-3.5", ot.footer),
978
+ children: [/* @__PURE__ */ B(v, {
1321
979
  label: m,
1322
980
  className: "mobile:flex-1",
1323
981
  disabled: i,
1324
982
  onClick: a
1325
- }), y ? /* @__PURE__ */ H(E, {
1326
- label: v,
983
+ }), b ? /* @__PURE__ */ B(w, {
984
+ label: y,
1327
985
  className: "mobile:flex-1",
1328
- disabled: l,
986
+ disabled: u,
1329
987
  onClick: c
1330
- }) : /* @__PURE__ */ H(A, {
988
+ }) : /* @__PURE__ */ B(ee, {
1331
989
  label: x,
1332
990
  className: "mobile:flex-1",
1333
991
  disabled: r,
1334
- iconBefore: i ? /* @__PURE__ */ H("span", {
992
+ iconBefore: i ? /* @__PURE__ */ B("span", {
1335
993
  "aria-hidden": !0,
1336
- children: /* @__PURE__ */ H(re, { size: d.SM })
994
+ children: /* @__PURE__ */ B(M, { size: l.SM })
1337
995
  }) : void 0,
1338
996
  onClick: o
1339
997
  })]
1340
998
  });
1341
- }, At = {
999
+ }, ct = {
1342
1000
  backdrop: "_backdrop_16jmd_6",
1343
1001
  panel: "_panel_16jmd_10",
1344
1002
  divider: "_divider_16jmd_15",
1345
1003
  content: "_content_16jmd_19",
1346
1004
  title: "_title_16jmd_24"
1347
- }, jt = ({ isOpen: e, resource: n, renderSummary: i, dependencies: o, versionHistory: s, folderItems: c, selectedFolderPath: l, onSelectedFolderPathChange: u, onCreateFolder: d, getDisabledReason: f, expandedPaths: p, onExpandedPathsChange: m, loadingPaths: h, hasExistingPublicationInFolder: g, hasWriteAccess: _, isSubmitting: v, hasSubmitError: y = !1, isTargetTaken: b = !1, isTargetChecking: x = !1, allowReplace: S = !0, author: ee, onAuthorChange: C, rules: te, onRulesChange: w, ruleSourceOptions: T, isRulesLoading: E = !1, hasRulesLoadError: D = !1, onClose: O, returnFocusRef: k, onSubmit: A, panelLabels: ne, panelStyles: j, panelSummaryTitleClassName: M, panelHeadingClassName: P, panelCalloutFolderNameClassName: F, footerLabels: re, labels: I = {}, titleClassName: ie = "dial-body-semi-text", colors: L }) => {
1348
- let R = oe({
1349
- "--spp-backdrop-bg": L?.backdropBackground,
1350
- "--spp-panel-bg": L?.panelBackground,
1351
- "--spp-panel-border": L?.panelBorder,
1352
- "--spp-divider-border": L?.dividerBorder,
1353
- "--spp-scrollbar-thumb": L?.scrollbarThumb,
1354
- "--spp-title-text": L?.titleText
1355
- }), [ae, z] = a(null), { title: se = "Publish", changeFolderTitle: V = "Change folder", backAriaLabel: ce = "Back", ariaLabel: le = "Publish", closeAriaLabel: ue = "Close" } = I, W = ge({
1005
+ }, lt = ({ isOpen: e, resource: n, renderSummary: i, dependencies: o, versionHistory: s, folderItems: c, selectedFolderPath: l, onSelectedFolderPathChange: u, onCreateFolder: d, getDisabledReason: f, expandedPaths: p, onExpandedPathsChange: m, loadingPaths: h, hasExistingPublicationInFolder: g, hasWriteAccess: _, isSubmitting: v, hasSubmitError: y = !1, isTargetTaken: b = !1, isTargetChecking: x = !1, allowReplace: S = !0, author: C, onAuthorChange: w, onClose: T, returnFocusRef: E, onSubmit: D, panelLabels: ee, panelStyles: O, panelSummaryTitleClassName: k, panelHeadingClassName: A, panelCalloutFolderNameClassName: j, footerLabels: M, labels: N = {}, titleClassName: P = "dial-body-semi-text", colors: F }) => {
1006
+ let I = L({
1007
+ "--spp-backdrop-bg": F?.backdropBackground,
1008
+ "--spp-panel-bg": F?.panelBackground,
1009
+ "--spp-panel-border": F?.panelBorder,
1010
+ "--spp-divider-border": F?.dividerBorder,
1011
+ "--spp-scrollbar-thumb": F?.scrollbarThumb,
1012
+ "--spp-title-text": F?.titleText
1013
+ }), [z, ne] = a(null), { title: re = "Publish", changeFolderTitle: ie = "Change folder", backAriaLabel: ae = "Back", ariaLabel: H = "Publish", closeAriaLabel: U = "Close" } = N, W = q({
1356
1014
  isOpen: e,
1357
1015
  selectedFolderPath: l,
1358
1016
  onSelectedFolderPathChange: u
1359
- }), de = W.view === Q.ChangeFolder, fe = r(() => pe({
1017
+ }), oe = W.view === K.ChangeFolder, G = r(() => se({
1360
1018
  hasSelectedFolder: l != null,
1361
1019
  hasExistingPublicationInFolder: g,
1362
1020
  hasWriteAccess: _,
@@ -1376,7 +1034,7 @@ var G = /* @__PURE__ */ function(e) {
1376
1034
  S
1377
1035
  ]);
1378
1036
  return t(() => {
1379
- let t = ae?.closest("[role=\"dialog\"]");
1037
+ let t = z?.closest("[role=\"dialog\"]");
1380
1038
  if (!e || !t) return;
1381
1039
  let n = () => t.focus({ preventScroll: !0 });
1382
1040
  n();
@@ -1386,39 +1044,39 @@ var G = /* @__PURE__ */ function(e) {
1386
1044
  document.addEventListener("focusin", r);
1387
1045
  let i = requestAnimationFrame(() => {
1388
1046
  document.removeEventListener("focusin", r);
1389
- }), a = k?.current;
1047
+ }), a = E?.current;
1390
1048
  return () => {
1391
1049
  cancelAnimationFrame(i), document.removeEventListener("focusin", r), a?.isConnected && a.focus({ preventScroll: !0 });
1392
1050
  };
1393
1051
  }, [
1394
1052
  e,
1395
- ae,
1396
- k
1397
- ]), /* @__PURE__ */ U(N, {
1053
+ z,
1054
+ E
1055
+ ]), /* @__PURE__ */ V(te, {
1398
1056
  open: e,
1399
- onClose: O,
1400
- header: /* @__PURE__ */ H("span", {
1401
- className: B("block truncate text-center", ie, At.title),
1402
- children: de ? V : se
1057
+ onClose: T,
1058
+ header: /* @__PURE__ */ B("span", {
1059
+ className: R("block truncate text-center", P, ct.title),
1060
+ children: oe ? ie : re
1403
1061
  }),
1404
- ariaLabel: le,
1405
- onBack: de ? W.backToMain : void 0,
1406
- backAriaLabel: ce,
1062
+ ariaLabel: H,
1063
+ onBack: oe ? W.backToMain : void 0,
1064
+ backAriaLabel: ae,
1407
1065
  backDisabled: v,
1408
- closeAriaLabel: ue,
1066
+ closeAriaLabel: U,
1409
1067
  closeDisabled: v,
1410
- style: R,
1411
- overlayStyle: R,
1412
- className: B(At.panel, "tablet:w-[540px]! tablet:max-w-[calc(100%-32px)]!"),
1413
- overlayClassName: At.backdrop,
1414
- headerClassName: B("px-[22px]", At.divider),
1068
+ style: I,
1069
+ overlayStyle: I,
1070
+ className: R(ct.panel, "tablet:w-[540px]! tablet:max-w-[calc(100%-32px)]!"),
1071
+ overlayClassName: ct.backdrop,
1072
+ headerClassName: R("px-[22px]", ct.divider),
1415
1073
  bodyClassName: "flex flex-col overflow-hidden",
1416
- children: [/* @__PURE__ */ H("div", {
1417
- ref: z,
1418
- className: B("min-h-0 flex-1 overflow-y-auto", At.content),
1419
- children: /* @__PURE__ */ H("div", {
1074
+ children: [/* @__PURE__ */ B("div", {
1075
+ ref: ne,
1076
+ className: R("min-h-0 flex-1 overflow-y-auto", ct.content),
1077
+ children: /* @__PURE__ */ B("div", {
1420
1078
  className: "p-[22px]",
1421
- children: /* @__PURE__ */ H(wt, {
1079
+ children: /* @__PURE__ */ B(nt, {
1422
1080
  resource: n,
1423
1081
  renderSummary: i,
1424
1082
  dependencies: o,
@@ -1441,178 +1099,159 @@ var G = /* @__PURE__ */ function(e) {
1441
1099
  isTargetTaken: b,
1442
1100
  isTargetChecking: x,
1443
1101
  allowReplace: S,
1444
- author: ee,
1445
- onAuthorChange: C,
1446
- rules: te,
1447
- onRulesChange: w,
1448
- ruleSourceOptions: T,
1449
- isRulesLoading: E,
1450
- hasRulesLoadError: D,
1451
- labels: ne,
1452
- styles: j,
1453
- summaryTitleClassName: M,
1454
- headingClassName: P,
1455
- calloutFolderNameClassName: F
1102
+ author: C,
1103
+ onAuthorChange: w,
1104
+ labels: ee,
1105
+ styles: O,
1106
+ summaryTitleClassName: k,
1107
+ headingClassName: A,
1108
+ calloutFolderNameClassName: j
1456
1109
  })
1457
1110
  })
1458
- }), /* @__PURE__ */ H(kt, {
1111
+ }), /* @__PURE__ */ B(st, {
1459
1112
  version: n?.version,
1460
1113
  hasExistingPublicationInFolder: g,
1461
1114
  allowReplace: S,
1462
- isSubmitDisabled: fe.isSubmitDisabled,
1463
- isSubmitLoading: fe.isSubmitLoading,
1464
- onCancel: de ? W.backToMain : O,
1465
- onSubmit: A,
1115
+ isSubmitDisabled: G.isSubmitDisabled,
1116
+ isSubmitLoading: G.isSubmitLoading,
1117
+ onCancel: oe ? W.backToMain : T,
1118
+ onSubmit: D,
1466
1119
  view: W.view,
1467
1120
  onSelectFolder: W.selectFolder,
1468
1121
  isSelectFolderDisabled: W.pendingFolderPath == null,
1469
- labels: re
1122
+ labels: M
1470
1123
  })]
1471
1124
  });
1472
- }, Mt = { option: "_option_skygm_1" }, Nt = (e, t) => `Unpublish "${e}" from "${t}"?`, Pt = (e) => `Choose which folder to unpublish "${e}" from.`, Ft = ({ isOpen: e, name: t, folders: n, selectedFolder: r, onSelectedFolderChange: i, isLoading: a = !1, labels: o, optionClassName: s = "dial-small-text", colors: c, onConfirm: l, onClose: d }) => {
1473
- let { title: f = "Unpublish?", confirmLabel: p = "Unpublish", cancelLabel: m = "Cancel", rootFolderLabel: h = "Organization", folderGroupAriaLabel: g = "Published folders", loadingStatusLabel: _ = "Requesting unpublish…", confirmMessage: v = Nt, selectFolderMessage: y = Pt } = o ?? {}, b = n.length > 1;
1474
- return /* @__PURE__ */ H(L, {
1125
+ }, ut = { option: "_option_skygm_1" }, dt = (e, t) => `Unpublish "${e}" from "${t}"?`, ft = (e) => `Choose which folder to unpublish "${e}" from.`, pt = ({ isOpen: e, name: t, folders: n, selectedFolder: r, onSelectedFolderChange: i, isLoading: a = !1, labels: o, optionClassName: s = "dial-small-text", colors: l, onConfirm: u, onClose: d }) => {
1126
+ let { title: f = "Unpublish?", confirmLabel: p = "Unpublish", cancelLabel: m = "Cancel", rootFolderLabel: h = "Organization", folderGroupAriaLabel: g = "Published folders", loadingStatusLabel: _ = "Requesting unpublish…", confirmMessage: v = dt, selectFolderMessage: y = ft } = o ?? {}, b = n.length > 1;
1127
+ return /* @__PURE__ */ B(P, {
1475
1128
  open: e,
1476
1129
  title: f,
1477
1130
  confirmLabel: p,
1478
1131
  cancelLabel: m,
1479
- variant: u.Danger,
1132
+ variant: c.Danger,
1480
1133
  isLoading: a,
1481
1134
  isConfirmDisabled: b && r == null,
1482
1135
  loadingStatusLabel: _,
1483
- message: /* @__PURE__ */ H("span", {
1136
+ message: /* @__PURE__ */ B("span", {
1484
1137
  className: "wrap-break-word",
1485
- children: b ? y(t) : v(t, we(n[0] ?? "", h))
1138
+ children: b ? y(t) : v(t, Y(n[0] ?? "", h))
1486
1139
  }),
1487
- onConfirm: l,
1140
+ onConfirm: u,
1488
1141
  onClose: d,
1489
- children: b && /* @__PURE__ */ H("div", {
1142
+ children: b && /* @__PURE__ */ B("div", {
1490
1143
  className: "mt-3",
1491
- style: oe({ "--ucd-option-text": c?.optionText }),
1492
- children: /* @__PURE__ */ H(ne, {
1144
+ style: L({ "--ucd-option-text": l?.optionText }),
1145
+ children: /* @__PURE__ */ B(O, {
1493
1146
  ariaLabel: g,
1494
1147
  value: r ?? void 0,
1495
1148
  onChange: i,
1496
1149
  disabled: a,
1497
1150
  items: n.map((e) => ({
1498
1151
  value: e,
1499
- label: we(e, h)
1152
+ label: Y(e, h)
1500
1153
  })),
1501
- radioClassName: B(s, Mt.option)
1154
+ radioClassName: R(s, ut.option)
1502
1155
  })
1503
1156
  })
1504
1157
  });
1505
- }, It = /* @__PURE__ */ function(e) {
1158
+ }, mt = /* @__PURE__ */ function(e) {
1506
1159
  return e.Keep = "keep", e.New = "new", e;
1507
- }({}), Lt = /* @__PURE__ */ function(e) {
1160
+ }({}), ht = /* @__PURE__ */ function(e) {
1508
1161
  return e.Main = "main", e.ChangeFolder = "change-folder", e;
1509
- }({}), Rt = {
1162
+ }({}), gt = {
1510
1163
  heading: "_heading_1no2p_1",
1511
1164
  destination: "_destination_1no2p_5",
1512
1165
  note: "_note_1no2p_9"
1513
- }, zt = ({ view: e, resource: t, roots: i, destination: o, onCreateFolder: s, getDisabledReason: c, onChangeFolderClick: l, changeFolderButtonRef: u, pendingDestination: p, onPendingDestinationChange: m, version: g, accessRules: v, dependencies: x, dependenciesLabels: S, dependenciesStyles: w, dependenciesNote: E, destinationNote: A, noteClassName: M = "dial-small-text", versionHistory: N, isSubmitting: P = !1, submitError: F, foldersError: re, onRetryFolders: I, panelLabels: ie = {}, panelStyles: L = {}, headingClassName: R = "dial-body-semi-text", destinationClassName: z = "dial-small-semi-text" }) => {
1514
- let { saveToFolderHeading: se = "Save to folder", changeFolderLabel: V = "Change", destinationAriaLabel: le = "Destination folder", versionHeading: ue = "Version", keepVersionLabel: W = "Keep version {version}", saveAsNewVersionLabel: de = "Save as new version", newVersionLabel: fe = "Version", newVersionPlaceholder: G = "Enter new version", searchPlaceholder: K = "Search folders", clearSearchAriaLabel: q = "Clear search", folderEmptyStateLabel: J, createFolderLabel: pe, cancelCreatingFolderLabel: Y, addSiblingFolderLabel: X, addChildFolderLabel: Z, createFolderEmptyNameError: me, createFolderInvalidNameError: he, createFolderDuplicateNameError: Q, createFolderSameAsParentNameError: ge, retryLabel: _e = "Retry" } = ie, { colors: ve, folderTree: ye } = L, be = {
1515
- ...oe({
1516
- "--stf-heading-text": ve?.headingText,
1517
- "--stf-destination-text": ve?.destinationText,
1518
- "--stf-note-text": ve?.noteText
1166
+ }, _t = ({ view: e, resource: t, roots: i, destination: o, onCreateFolder: s, getDisabledReason: c, onChangeFolderClick: d, changeFolderButtonRef: f, pendingDestination: m, onPendingDestinationChange: g, version: S, dependencies: w, dependenciesLabels: ee, dependenciesStyles: te, dependenciesNote: A, destinationNote: j, noteClassName: M = "dial-small-text", versionHistory: N, isSubmitting: P = !1, submitError: F, foldersError: z, onRetryFolders: ne, panelLabels: re = {}, panelStyles: ae = {}, headingClassName: H = "dial-body-semi-text", destinationClassName: U = "dial-small-semi-text" }) => {
1167
+ let { saveToFolderHeading: W = "Save to folder", changeFolderLabel: oe = "Change", destinationAriaLabel: se = "Destination folder", versionHeading: G = "Version", keepVersionLabel: ce = "Keep version {version}", saveAsNewVersionLabel: le = "Save as new version", newVersionLabel: ue = "Version", newVersionPlaceholder: de = "Enter new version", searchPlaceholder: K = "Search folders", clearSearchAriaLabel: q = "Clear search", folderEmptyStateLabel: fe, createFolderLabel: pe, cancelCreatingFolderLabel: me, addSiblingFolderLabel: he, addChildFolderLabel: ge, createFolderEmptyNameError: _e, createFolderInvalidNameError: J, createFolderDuplicateNameError: ve, createFolderSameAsParentNameError: Y, retryLabel: ye = "Retry" } = re, { colors: X, folderTree: be } = ae, xe = {
1168
+ ...L({
1169
+ "--stf-heading-text": X?.headingText,
1170
+ "--stf-destination-text": X?.destinationText,
1171
+ "--stf-note-text": X?.noteText
1519
1172
  }),
1520
- ...L.cssVars
1521
- }, xe = {
1522
- border: ve?.summaryBorder,
1523
- background: ve?.summaryBackground
1524
- }, [Se, $] = a(""), Ce = n(), we = n(), Te = n(), Ee = r(() => [i.find((e) => e.key === o.rootKey)?.label ?? o.rootKey, ...o.path], [i, o]), De = i.find((e) => e.key === p?.rootKey), Oe = p ? p.path[p.path.length - 1] ?? De?.label : void 0, ke = B(R, Rt.heading), Ae = c?.(o), je = !!E && (x?.length ?? 0) === 0;
1525
- if (e === Lt.ChangeFolder) return /* @__PURE__ */ U("div", {
1173
+ ...ae.cssVars
1174
+ }, Se = {
1175
+ border: X?.summaryBorder,
1176
+ background: X?.summaryBackground
1177
+ }, [Ce, Z] = a(""), we = n(), Te = n(), Q = n(), De = r(() => [i.find((e) => e.key === o.rootKey)?.label ?? o.rootKey, ...o.path], [i, o]), $ = R(H, gt.heading), Oe = c?.(o), ke = !!A && (w?.length ?? 0) === 0;
1178
+ if (e === ht.ChangeFolder) return /* @__PURE__ */ V("div", {
1526
1179
  className: "flex flex-col gap-3",
1527
- style: be,
1180
+ style: xe,
1528
1181
  children: [
1529
- /* @__PURE__ */ H("div", {
1182
+ /* @__PURE__ */ B("div", {
1530
1183
  role: "search",
1531
- children: /* @__PURE__ */ H(j, {
1532
- value: Se,
1533
- onChange: (e) => $(e ?? ""),
1184
+ children: /* @__PURE__ */ B(k, {
1185
+ value: Ce,
1186
+ onChange: (e) => Z(e ?? ""),
1534
1187
  placeholder: K,
1535
1188
  clearLabel: q,
1536
1189
  "aria-label": K
1537
1190
  })
1538
1191
  }),
1539
- /* @__PURE__ */ H(te, {
1540
- politeness: T.Assertive,
1541
- children: re && /* @__PURE__ */ U("div", {
1192
+ /* @__PURE__ */ B(x, {
1193
+ politeness: C.Assertive,
1194
+ children: z && /* @__PURE__ */ V("div", {
1542
1195
  className: "flex flex-wrap items-center gap-2",
1543
- children: [/* @__PURE__ */ H(_, { text: re }), I && /* @__PURE__ */ H(C, {
1544
- label: _e,
1545
- onClick: I
1196
+ children: [/* @__PURE__ */ B(h, { text: z }), ne && /* @__PURE__ */ B(b, {
1197
+ label: ye,
1198
+ onClick: ne
1546
1199
  })]
1547
1200
  })
1548
1201
  }),
1549
- /* @__PURE__ */ H(yt, {
1202
+ /* @__PURE__ */ B($e, {
1550
1203
  roots: i,
1551
- destination: p,
1552
- onDestinationChange: m,
1204
+ destination: m,
1205
+ onDestinationChange: g,
1553
1206
  onCreateDestinationFolder: s,
1554
1207
  getDisabledReason: c,
1555
- searchQuery: Se,
1208
+ searchQuery: Ce,
1556
1209
  disabled: P,
1557
- noResultsLabel: J,
1210
+ noResultsLabel: fe,
1558
1211
  createFolderLabel: pe,
1559
- cancelCreatingFolderLabel: Y,
1560
- addSiblingFolderLabel: X,
1561
- addChildFolderLabel: Z,
1562
- emptyFolderNameError: me,
1563
- invalidFolderNameError: he,
1564
- duplicateFolderNameError: Q,
1565
- sameAsParentFolderNameError: ge,
1566
- styles: ye
1567
- }),
1568
- v && De?.hasAccessRules && !(p && v.isHiddenFor?.(p)) && /* @__PURE__ */ H("div", {
1569
- className: "mt-1",
1570
- children: /* @__PURE__ */ H(ze, {
1571
- rules: v.rules,
1572
- onRulesChange: v.onRulesChange,
1573
- sourceOptions: v.sourceOptions,
1574
- folderName: Oe,
1575
- disabled: P,
1576
- isLoading: v.isLoading,
1577
- hasLoadError: v.hasLoadError,
1578
- labels: v.labels,
1579
- styles: v.styles
1580
- })
1212
+ cancelCreatingFolderLabel: me,
1213
+ addSiblingFolderLabel: he,
1214
+ addChildFolderLabel: ge,
1215
+ emptyFolderNameError: _e,
1216
+ invalidFolderNameError: J,
1217
+ duplicateFolderNameError: ve,
1218
+ sameAsParentFolderNameError: Y,
1219
+ styles: be
1581
1220
  })
1582
1221
  ]
1583
1222
  });
1584
- let Me = g ? [{
1585
- value: It.Keep,
1586
- label: W.replace("{version}", g.currentVersion)
1223
+ let Ae = S ? [{
1224
+ value: mt.Keep,
1225
+ label: ce.replace("{version}", S.currentVersion)
1587
1226
  }, {
1588
- value: It.New,
1589
- label: de,
1590
- content: /* @__PURE__ */ H(ee, {
1591
- id: Ce,
1592
- value: g.newVersion,
1593
- onChange: (e) => g.onNewVersionChange(e ?? ""),
1594
- onBlur: g.onNewVersionBlur,
1227
+ value: mt.New,
1228
+ label: le,
1229
+ content: /* @__PURE__ */ B(y, {
1230
+ id: we,
1231
+ value: S.newVersion,
1232
+ onChange: (e) => S.onNewVersionChange(e ?? ""),
1233
+ onBlur: S.onNewVersionBlur,
1595
1234
  labelProps: {
1596
- label: fe,
1235
+ label: ue,
1597
1236
  required: !0
1598
1237
  },
1599
- placeholder: G,
1600
- error: g.newVersionError,
1601
- invalid: !!g.newVersionError,
1238
+ placeholder: de,
1239
+ error: S.newVersionError,
1240
+ invalid: !!S.newVersionError,
1602
1241
  disabled: P
1603
1242
  })
1604
1243
  }] : [];
1605
- return /* @__PURE__ */ U("div", {
1244
+ return /* @__PURE__ */ V("div", {
1606
1245
  className: "flex flex-col gap-5",
1607
- style: be,
1246
+ style: xe,
1608
1247
  children: [
1609
- t.type == null ? /* @__PURE__ */ H(ae, {
1610
- colors: xe,
1611
- children: /* @__PURE__ */ H("span", {
1612
- className: B("truncate", ke),
1248
+ t.type == null ? /* @__PURE__ */ B(I, {
1249
+ colors: Se,
1250
+ children: /* @__PURE__ */ B("span", {
1251
+ className: R("truncate", $),
1613
1252
  children: t.title
1614
1253
  })
1615
- }) : /* @__PURE__ */ H(ae, {
1254
+ }) : /* @__PURE__ */ B(I, {
1616
1255
  item: {
1617
1256
  type: t.type,
1618
1257
  name: t.title,
@@ -1620,188 +1259,188 @@ var G = /* @__PURE__ */ function(e) {
1620
1259
  iconUrl: t.iconUrl
1621
1260
  },
1622
1261
  hasVersionTag: !1,
1623
- colors: xe
1262
+ colors: Se
1624
1263
  }),
1625
- /* @__PURE__ */ U("section", {
1264
+ /* @__PURE__ */ V("section", {
1626
1265
  className: "flex flex-col gap-2",
1627
1266
  children: [
1628
- /* @__PURE__ */ H("h2", {
1629
- className: ke,
1630
- children: se
1267
+ /* @__PURE__ */ B("h2", {
1268
+ className: $,
1269
+ children: W
1631
1270
  }),
1632
- /* @__PURE__ */ U("div", {
1271
+ /* @__PURE__ */ V("div", {
1633
1272
  className: "flex min-w-0 items-center gap-2",
1634
- children: [/* @__PURE__ */ H("div", {
1273
+ children: [/* @__PURE__ */ B("div", {
1635
1274
  role: "group",
1636
- "aria-label": le,
1637
- "aria-describedby": Ae ? we : void 0,
1275
+ "aria-label": se,
1276
+ "aria-describedby": Oe ? Te : void 0,
1638
1277
  className: "min-w-0 flex-1",
1639
- children: /* @__PURE__ */ H(y, {
1640
- name: Ee.join(" / "),
1641
- nameClassName: B(z, Rt.destination)
1278
+ children: /* @__PURE__ */ B(_, {
1279
+ name: De.join(" / "),
1280
+ nameClassName: R(U, gt.destination)
1642
1281
  })
1643
- }), /* @__PURE__ */ H(b, {
1644
- ref: u,
1645
- size: h.Small,
1646
- label: V,
1647
- iconBefore: /* @__PURE__ */ H(ce, {
1648
- size: d.SM,
1649
- stroke: f,
1282
+ }), /* @__PURE__ */ B(v, {
1283
+ ref: f,
1284
+ size: p.Small,
1285
+ label: oe,
1286
+ iconBefore: /* @__PURE__ */ B(ie, {
1287
+ size: l.SM,
1288
+ stroke: u,
1650
1289
  "aria-hidden": !0
1651
1290
  }),
1652
1291
  disabled: P,
1653
- onClick: l
1292
+ onClick: d
1654
1293
  })]
1655
1294
  }),
1656
- /* @__PURE__ */ H(te, {
1657
- politeness: T.Assertive,
1658
- children: Ae && /* @__PURE__ */ H("div", {
1659
- id: we,
1660
- children: /* @__PURE__ */ H(D, {
1661
- type: O.SectionMessage,
1662
- variant: k.Error,
1295
+ /* @__PURE__ */ B(x, {
1296
+ politeness: C.Assertive,
1297
+ children: Oe && /* @__PURE__ */ B("div", {
1298
+ id: Te,
1299
+ children: /* @__PURE__ */ B(T, {
1300
+ type: E.SectionMessage,
1301
+ variant: D.Error,
1663
1302
  role: "none",
1664
- message: Ae
1303
+ message: Oe
1665
1304
  })
1666
1305
  })
1667
1306
  }),
1668
- A && /* @__PURE__ */ H("p", {
1669
- className: B(M, Rt.note),
1670
- children: A
1307
+ j && /* @__PURE__ */ B("p", {
1308
+ className: R(M, gt.note),
1309
+ children: j
1671
1310
  })
1672
1311
  ]
1673
1312
  }),
1674
- g && /* @__PURE__ */ U("section", {
1313
+ S && /* @__PURE__ */ V("section", {
1675
1314
  className: "flex flex-col gap-2",
1676
- children: [/* @__PURE__ */ H("h2", {
1677
- className: ke,
1678
- children: ue
1679
- }), /* @__PURE__ */ H(ne, {
1680
- ariaLabel: ue,
1681
- value: g.versionMode,
1682
- onChange: (e) => g.onVersionModeChange(e),
1683
- items: Me,
1315
+ children: [/* @__PURE__ */ B("h2", {
1316
+ className: $,
1317
+ children: G
1318
+ }), /* @__PURE__ */ B(O, {
1319
+ ariaLabel: G,
1320
+ value: S.versionMode,
1321
+ onChange: (e) => S.onVersionModeChange(e),
1322
+ items: Ae,
1684
1323
  disabled: P
1685
1324
  })]
1686
1325
  }),
1687
- /* @__PURE__ */ H(te, {
1688
- politeness: T.Assertive,
1689
- children: F && /* @__PURE__ */ H(_, { text: F })
1326
+ /* @__PURE__ */ B(x, {
1327
+ politeness: C.Assertive,
1328
+ children: F && /* @__PURE__ */ B(h, { text: F })
1690
1329
  }),
1691
- je && /* @__PURE__ */ U("section", {
1330
+ ke && /* @__PURE__ */ V("section", {
1692
1331
  className: "flex flex-col gap-2",
1693
- "aria-labelledby": Te,
1694
- children: [/* @__PURE__ */ H("h2", {
1695
- id: Te,
1696
- className: ke,
1697
- children: S?.title ?? "Private dependencies"
1698
- }), /* @__PURE__ */ H("p", {
1699
- className: B(M, Rt.note),
1700
- children: E
1332
+ "aria-labelledby": Q,
1333
+ children: [/* @__PURE__ */ B("h2", {
1334
+ id: Q,
1335
+ className: $,
1336
+ children: ee?.title ?? "Private dependencies"
1337
+ }), /* @__PURE__ */ B("p", {
1338
+ className: R(M, gt.note),
1339
+ children: A
1701
1340
  })]
1702
1341
  }),
1703
- !je && x != null && /* @__PURE__ */ H(nt, {
1704
- dependencies: x,
1705
- labels: S,
1706
- headingClassName: R,
1707
- styles: w
1342
+ !ke && w != null && /* @__PURE__ */ B(Ie, {
1343
+ dependencies: w,
1344
+ labels: ee,
1345
+ headingClassName: H,
1346
+ styles: te
1708
1347
  }),
1709
- N != null && /* @__PURE__ */ H(We, {
1710
- headingClassName: R,
1348
+ N != null && /* @__PURE__ */ B(Ee, {
1349
+ headingClassName: H,
1711
1350
  ...N
1712
1351
  })
1713
1352
  ]
1714
1353
  });
1715
- }, Bt = {
1354
+ }, vt = {
1716
1355
  backdrop: "_backdrop_1ie8s_6",
1717
1356
  panel: "_panel_1ie8s_10",
1718
1357
  divider: "_divider_1ie8s_15",
1719
1358
  footer: "_footer_1ie8s_19",
1720
1359
  content: "_content_1ie8s_23",
1721
1360
  title: "_title_1ie8s_28"
1722
- }, Vt = ({ isOpen: e, onClose: n, onSubmit: r, isSubmitDisabled: o = !1, returnFocusRef: s, labels: c = {}, colors: l, titleClassName: u = "dial-body-semi-text", destination: f, onDestinationChange: p, isSubmitting: m = !1, onPendingDestinationChange: h, ...g }) => {
1723
- let { title: _ = "Save", changeFolderTitle: v = "Change folder", closeAriaLabel: y = "Close", backAriaLabel: x = "Back", cancelLabel: S = "Cancel", saveLabel: ee = "Save", savingLabel: C = "Saving…", selectLabel: te = "Select" } = c, w = oe({
1724
- "--sstf-backdrop-bg": l?.backdropBackground,
1725
- "--sstf-panel-bg": l?.panelBackground,
1726
- "--sstf-panel-border": l?.panelBorder,
1727
- "--sstf-divider-border": l?.dividerBorder,
1728
- "--sstf-scrollbar-thumb": l?.scrollbarThumb,
1729
- "--sstf-title-text": l?.titleText
1730
- }), [T, D] = a(Lt.Main), [O, k] = a(f), ne = i(null), j = i(null);
1361
+ }, yt = ({ isOpen: e, onClose: n, onSubmit: r, isSubmitDisabled: o = !1, returnFocusRef: s, labels: c = {}, colors: u, titleClassName: d = "dial-body-semi-text", destination: f, onDestinationChange: p, isSubmitting: m = !1, onPendingDestinationChange: h, ...g }) => {
1362
+ let { title: _ = "Save", changeFolderTitle: y = "Change folder", closeAriaLabel: b = "Close", backAriaLabel: x = "Back", cancelLabel: S = "Cancel", saveLabel: C = "Save", savingLabel: T = "Saving…", selectLabel: E = "Select" } = c, D = L({
1363
+ "--sstf-backdrop-bg": u?.backdropBackground,
1364
+ "--sstf-panel-bg": u?.panelBackground,
1365
+ "--sstf-panel-border": u?.panelBorder,
1366
+ "--sstf-divider-border": u?.dividerBorder,
1367
+ "--sstf-scrollbar-thumb": u?.scrollbarThumb,
1368
+ "--sstf-title-text": u?.titleText
1369
+ }), [O, k] = a(ht.Main), [A, j] = a(f), N = i(null), P = i(null);
1731
1370
  t(() => {
1732
- e && D(Lt.Main);
1371
+ e && k(ht.Main);
1733
1372
  }, [e]);
1734
- let M = i(T);
1373
+ let F = i(O);
1735
1374
  t(() => {
1736
- M.current !== T && (M.current = T, T === Lt.ChangeFolder ? ne.current?.focus({ preventScroll: !0 }) : j.current?.focus({ preventScroll: !0 }));
1737
- }, [T]);
1738
- let P = i(e);
1375
+ F.current !== O && (F.current = O, O === ht.ChangeFolder ? N.current?.focus({ preventScroll: !0 }) : P.current?.focus({ preventScroll: !0 }));
1376
+ }, [O]);
1377
+ let I = i(e);
1739
1378
  t(() => {
1740
- let t = P.current;
1741
- P.current = e, t && !e && s?.current?.isConnected && s.current.focus({ preventScroll: !0 });
1379
+ let t = I.current;
1380
+ I.current = e, t && !e && s?.current?.isConnected && s.current.focus({ preventScroll: !0 });
1742
1381
  }, [e, s]);
1743
- let F = T === Lt.ChangeFolder, I = (e) => {
1744
- k(e), h?.(e);
1382
+ let z = O === ht.ChangeFolder, ne = (e) => {
1383
+ j(e), h?.(e);
1384
+ }, re = () => {
1385
+ ne(f), k(ht.ChangeFolder);
1745
1386
  }, ie = () => {
1746
- I(f), D(Lt.ChangeFolder);
1747
- }, L = () => {
1748
- h?.(f), D(Lt.Main);
1749
- }, R = () => {
1750
- O && p(O), D(Lt.Main);
1387
+ h?.(f), k(ht.Main);
1388
+ }, ae = () => {
1389
+ A && p(A), k(ht.Main);
1751
1390
  };
1752
- return /* @__PURE__ */ U(N, {
1391
+ return /* @__PURE__ */ V(te, {
1753
1392
  open: e,
1754
1393
  onClose: n,
1755
- header: /* @__PURE__ */ H("span", {
1756
- ref: ne,
1394
+ header: /* @__PURE__ */ B("span", {
1395
+ ref: N,
1757
1396
  tabIndex: -1,
1758
- className: B("block truncate outline-none", u, Bt.title),
1759
- children: F ? v : _
1397
+ className: R("block truncate outline-none", d, vt.title),
1398
+ children: z ? y : _
1760
1399
  }),
1761
1400
  ariaLabel: _,
1762
- onBack: F ? L : void 0,
1401
+ onBack: z ? ie : void 0,
1763
1402
  backAriaLabel: x,
1764
1403
  backDisabled: m,
1765
- closeAriaLabel: y,
1404
+ closeAriaLabel: b,
1766
1405
  closeDisabled: m,
1767
- style: w,
1768
- overlayStyle: w,
1769
- className: B(Bt.panel, "tablet:w-[540px]! tablet:max-w-[calc(100%-32px)]!"),
1770
- overlayClassName: Bt.backdrop,
1771
- headerClassName: B("px-[22px]", Bt.divider),
1406
+ style: D,
1407
+ overlayStyle: D,
1408
+ className: R(vt.panel, "tablet:w-[540px]! tablet:max-w-[calc(100%-32px)]!"),
1409
+ overlayClassName: vt.backdrop,
1410
+ headerClassName: R("px-[22px]", vt.divider),
1772
1411
  bodyClassName: "flex flex-col overflow-hidden",
1773
- children: [/* @__PURE__ */ H("div", {
1774
- className: B("min-h-0 flex-1 overflow-y-auto p-[22px]", Bt.content),
1775
- children: /* @__PURE__ */ H(zt, {
1412
+ children: [/* @__PURE__ */ B("div", {
1413
+ className: R("min-h-0 flex-1 overflow-y-auto p-[22px]", vt.content),
1414
+ children: /* @__PURE__ */ B(_t, {
1776
1415
  ...g,
1777
- view: T,
1416
+ view: O,
1778
1417
  destination: f,
1779
1418
  onDestinationChange: p,
1780
1419
  isSubmitting: m,
1781
- onChangeFolderClick: ie,
1782
- changeFolderButtonRef: j,
1783
- pendingDestination: O,
1784
- onPendingDestinationChange: I
1420
+ onChangeFolderClick: re,
1421
+ changeFolderButtonRef: P,
1422
+ pendingDestination: A,
1423
+ onPendingDestinationChange: ne
1785
1424
  })
1786
- }), /* @__PURE__ */ U("div", {
1787
- className: B("flex items-center justify-end gap-2 border-t px-4 py-4 desktop:px-3.5", Bt.footer),
1788
- children: [/* @__PURE__ */ H(b, {
1425
+ }), /* @__PURE__ */ V("div", {
1426
+ className: R("flex items-center justify-end gap-2 border-t px-4 py-4 desktop:px-3.5", vt.footer),
1427
+ children: [/* @__PURE__ */ B(v, {
1789
1428
  label: S,
1790
1429
  className: "mobile:flex-1",
1791
1430
  disabled: m,
1792
- onClick: F ? L : n
1793
- }), F ? /* @__PURE__ */ H(E, {
1794
- label: te,
1431
+ onClick: z ? ie : n
1432
+ }), z ? /* @__PURE__ */ B(w, {
1433
+ label: E,
1795
1434
  className: "mobile:flex-1",
1796
- disabled: O == null,
1797
- onClick: R
1798
- }) : /* @__PURE__ */ H(A, {
1799
- label: m ? C : ee,
1435
+ disabled: A == null,
1436
+ onClick: ae
1437
+ }) : /* @__PURE__ */ B(ee, {
1438
+ label: m ? T : C,
1800
1439
  className: "mobile:flex-1",
1801
1440
  disabled: o || m,
1802
- iconBefore: m ? /* @__PURE__ */ H("span", {
1441
+ iconBefore: m ? /* @__PURE__ */ B("span", {
1803
1442
  "aria-hidden": !0,
1804
- children: /* @__PURE__ */ H(re, { size: d.SM })
1443
+ children: /* @__PURE__ */ B(M, { size: l.SM })
1805
1444
  }) : void 0,
1806
1445
  onClick: r
1807
1446
  })]
@@ -1809,4 +1448,4 @@ var G = /* @__PURE__ */ function(e) {
1809
1448
  });
1810
1449
  };
1811
1450
  //#endregion
1812
- export { Ge as PUBLISH_PANEL_CLASS, G as PublicationRuleFunction, Fe as PublishAccessRuleEditor, ze as PublishAccessRules, K as PublishCalloutKind, J as PublishDependenciesAppearance, nt as PublishDependenciesList, q as PublishDependencyType, yt as PublishFoldersTree, kt as PublishFooter, it as PublishHistoryList, wt as PublishPanel, Q as PublishPanelView, zt as SaveToFolderPanel, Lt as SaveToFolderView, It as SaveVersionMode, jt as StandalonePublishPanel, Vt as StandaloneSaveToFolderPanel, Ft as UnpublishConfirmationDialog, We as VersionHistorySection, Be as VersionHistoryStatus, Se as collectFolderKeys, pe as derivePublishState, _e as filterFolderTree, X as formatPublishedDate, Ce as fromFolderPathKey, ke as getSiblingFolderNames, Oe as getUniqueFolderName, xe as mergeFolderPaths, ye as sortFolderTree, Te as toDialFileTree, $ as toFolderPathKey, he as usePublishFlow, ge as usePublishFolderView, De as validateFolderName };
1451
+ export { Q as PUBLISH_PANEL_CLASS, U as PublishCalloutKind, oe as PublishDependenciesAppearance, Ie as PublishDependenciesList, W as PublishDependencyType, $e as PublishFoldersTree, st as PublishFooter, Re as PublishHistoryList, nt as PublishPanel, K as PublishPanelView, _t as SaveToFolderPanel, ht as SaveToFolderView, mt as SaveVersionMode, lt as StandalonePublishPanel, yt as StandaloneSaveToFolderPanel, pt as UnpublishConfirmationDialog, Ee as VersionHistorySection, Ce as VersionHistoryStatus, _e as collectFolderKeys, se as derivePublishState, fe as filterFolderTree, ce as formatPublishedDate, ve as fromFolderPathKey, Se as getSiblingFolderNames, xe as getUniqueFolderName, ge as mergeFolderPaths, me as sortFolderTree, ye as toDialFileTree, J as toFolderPathKey, de as usePublishFlow, q as usePublishFolderView, be as validateFolderName };