@epam/ai-dial-publish-panel 1.4.0-dev.126 → 1.4.0-dev.128

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