@epam/ai-dial-publish-panel 1.4.0-dev.12 → 1.4.0-dev.34

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