@epam/ai-dial-skill-editor 1.3.0-dev.235 → 1.3.0-dev.244

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,10 +1,10 @@
1
- import { MARKDOWN_EDITOR_FILL_HEIGHT_CLASS_NAME as e, MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as t, MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as n, RESIZABLE_TEXTAREA_CLASS_NAME as r, TAG_INPUT_TAG_CLASS_NAME as i, TextRefinementField as a, buildCssVars as o, formatFileSize as s, mergeClasses as c, useAvailableHeightCap as l, useIsMobile as u, useTextRefinement as d } from "@epam/ai-dial-chat-shared";
2
- import { Accordion as f, BottomSheet as p, ButtonAppearance as m, ButtonDropdown as h, ButtonVariant as g, CaptionText as _, DIAL_ICON_SIZE as v, DIAL_KIT_ICON_STROKE as y, DangerIconButton as b, EditorThemes as x, ElementSize as S, ErrorText as C, FileDropzone as w, FileName as T, GhostButton as E, GhostIconButton as ee, Input as D, Label as O, LinkButton as k, NeutralButton as A, Popup as te, PopupSize as ne, PrimaryButton as j, RadioGroup as re, ResizeHandle as M, Select as ie, Spinner as ae, TagInput as N, Textarea as oe, TextareaResize as se } from "@epam/ai-dial-ui-kit";
3
- import { Fragment as P, jsx as F, jsxs as I } from "react/jsx-runtime";
4
- import { IconArrowNarrowLeft as ce, IconDatabase as le, IconFileZip as ue, IconFolderPlus as L, IconPhoto as de, IconPlus as fe, IconTrashX as pe, IconUpload as me } from "@tabler/icons-react";
5
- import { Suspense as he, lazy as ge, memo as _e, useCallback as R, useEffect as z, useId as ve, useMemo as B, useRef as V, useState as H } from "react";
6
- import { DialFileNodeType as ye, DialFoldersTree as be } from "@epam/ai-dial-react-file-manager";
7
- import { LazyMarkdownEditor as xe } from "@epam/ai-dial-ui-kit/editors";
1
+ import { MARKDOWN_EDITOR_FILL_HEIGHT_CLASS_NAME as e, MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as t, MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as n, RESIZABLE_TEXTAREA_CLASS_NAME as r, TAG_INPUT_TAG_CLASS_NAME as i, TextRefinementField as a, buildCssVars as o, formatFileSize as s, mergeClasses as c, useAvailableHeightCap as l, useControlErrorAssociation as u, useIsMobile as d, useTextRefinement as f } from "@epam/ai-dial-chat-shared";
2
+ import { Accordion as p, BottomSheet as m, ButtonAppearance as h, ButtonDropdown as g, ButtonVariant as _, CaptionText as v, DIAL_ICON_SIZE as y, DIAL_KIT_ICON_STROKE as b, DangerIconButton as x, EditorThemes as S, ElementSize as C, ErrorMessageNotification as w, ErrorText as T, FileDropzone as E, FileName as D, GhostButton as O, GhostIconButton as ee, Input as k, Label as A, LinkButton as j, NeutralButton as M, Popup as te, PopupSize as ne, PrimaryButton as N, RadioGroup as re, ResizeHandle as ie, Select as ae, Spinner as oe, TagInput as se, Textarea as P, TextareaResize as ce } from "@epam/ai-dial-ui-kit";
3
+ import { Fragment as F, jsx as I, jsxs as L } from "react/jsx-runtime";
4
+ import { IconArrowNarrowLeft as le, IconDatabase as ue, IconFileZip as R, IconFolderPlus as de, IconPhoto as fe, IconPlus as pe, IconTrashX as me, IconUpload as he } from "@tabler/icons-react";
5
+ import { Suspense as ge, lazy as _e, memo as ve, useCallback as z, useEffect as B, useId as ye, useMemo as V, useRef as H, useState as U } from "react";
6
+ import { DialFileNodeType as be, DialFoldersTree as xe } from "@epam/ai-dial-react-file-manager";
7
+ import { LazyMarkdownEditor as Se } from "@epam/ai-dial-ui-kit/editors";
8
8
  c("flex flex-col desktop:min-h-0 desktop:overflow-y-auto", {
9
9
  body: "_body_1xd7h_2",
10
10
  sideColumn: "_sideColumn_1xd7h_6",
@@ -12,97 +12,97 @@ c("flex flex-col desktop:min-h-0 desktop:overflow-y-auto", {
12
12
  }.sideColumn);
13
13
  //#endregion
14
14
  //#region ../builder-form/src/constants/public-class-names.ts
15
- var Se = {
15
+ var Ce = {
16
16
  layout: "dial-builder-form-layout",
17
17
  section: "dial-builder-form-section",
18
18
  metadataSection: "dial-builder-form-metadata-section",
19
19
  setupSection: "dial-builder-form-setup-section",
20
20
  asideSection: "dial-builder-form-aside-section"
21
- }, Ce = {
21
+ }, we = {
22
22
  section: "_section_l1mnx_1",
23
23
  title: "_title_l1mnx_5"
24
- }, we = ({ title: e, children: t, styles: n, className: r }) => {
24
+ }, Te = ({ title: e, children: t, styles: n, className: r }) => {
25
25
  let i = o({
26
26
  "--es-border-color": n?.colors?.borderColor,
27
27
  "--es-title-color": n?.colors?.titleColor
28
28
  });
29
- return /* @__PURE__ */ I("section", {
30
- className: c("flex h-full flex-col gap-4 rounded border p-6", Ce.section, r, Se.section),
29
+ return /* @__PURE__ */ L("section", {
30
+ className: c("flex h-full flex-col gap-4 rounded border p-6", we.section, r, Ce.section),
31
31
  style: i,
32
- children: [e != null && /* @__PURE__ */ F("h2", {
33
- className: c("dial-h3-text", Ce.title),
32
+ children: [e != null && /* @__PURE__ */ I("h2", {
33
+ className: c("dial-h3-text", we.title),
34
34
  children: e
35
35
  }), t]
36
36
  });
37
- }, Te = (e, { min: t = 280, max: n = 640, containerWidth: r } = {}) => {
37
+ }, Ee = (e, { min: t = 280, max: n = 640, containerWidth: r } = {}) => {
38
38
  let i = r != null && r > 0 ? r - 360 : n;
39
39
  return Math.round(Math.min(Math.max(t, Math.min(n, i)), Math.max(t, Number.isFinite(e) ? e : t)));
40
- }, Ee = {
40
+ }, De = {
41
41
  headerBorder: "_headerBorder_1adw2_1",
42
42
  footerBorder: "_footerBorder_1adw2_5",
43
43
  columnBorder: "_columnBorder_1adw2_10"
44
- }, U = ({ title: e, onBack: t, backAriaLabel: n = "Back", actions: r, leftContent: i, centerContent: a, rightContent: s, resizableLeftColumn: l, isSaving: u = !1, labels: d, styles: f, dir: p }) => {
45
- let m = ve(), h = u ? d?.savingStatusLabel ?? "Saving" : "", g = V(null), [_, b] = H(), x = l != null && a != null, S = l?.minWidth, C = l?.maxWidth, w = {
44
+ }, Oe = ({ title: e, onBack: t, backAriaLabel: n = "Back", actions: r, leftContent: i, centerContent: a, rightContent: s, resizableLeftColumn: l, isSaving: u = !1, labels: d, styles: f, dir: p }) => {
45
+ let m = ye(), h = u ? d?.savingStatusLabel ?? "Saving" : "", g = H(null), [_, v] = U(), x = l != null && a != null, S = l?.minWidth, C = l?.maxWidth, w = {
46
46
  min: S,
47
47
  max: C,
48
48
  containerWidth: _
49
- }, T = x ? Te(l.width, w) : void 0, E = Te(C ?? 640, w);
50
- z(() => {
49
+ }, T = x ? Ee(l.width, w) : void 0, E = Ee(C ?? 640, w);
50
+ B(() => {
51
51
  let e = g.current;
52
52
  if (!x || e == null || typeof ResizeObserver > "u") return;
53
- let t = new ResizeObserver(() => b(e.clientWidth));
53
+ let t = new ResizeObserver(() => v(e.clientWidth));
54
54
  return t.observe(e), () => t.disconnect();
55
55
  }, [x]);
56
56
  let D = o({
57
57
  "--el-header-border-color": f?.colors?.headerBorderColor,
58
58
  "--el-sidebar-border-color": f?.colors?.sidebarBorderColor
59
59
  });
60
- return /* @__PURE__ */ I("div", {
60
+ return /* @__PURE__ */ L("div", {
61
61
  dir: p,
62
- className: c("flex min-h-0 flex-1 flex-col", Se.layout),
62
+ className: c("flex min-h-0 flex-1 flex-col", Ce.layout),
63
63
  style: D,
64
64
  children: [
65
- /* @__PURE__ */ F("span", {
65
+ /* @__PURE__ */ I("span", {
66
66
  role: "status",
67
67
  "aria-live": "polite",
68
68
  className: "sr-only",
69
69
  id: m,
70
70
  children: h
71
71
  }),
72
- /* @__PURE__ */ I("div", {
73
- className: c("flex items-center justify-between gap-2 border-b px-4 py-2 desktop:px-8 desktop:pt-3 desktop:pb-3", Ee.headerBorder),
74
- children: [/* @__PURE__ */ I("div", {
72
+ /* @__PURE__ */ L("div", {
73
+ className: c("flex items-center justify-between gap-2 border-b px-4 py-2 desktop:px-8 desktop:pt-3 desktop:pb-3", De.headerBorder),
74
+ children: [/* @__PURE__ */ L("div", {
75
75
  className: "flex min-w-0 flex-1 items-center gap-2",
76
- children: [/* @__PURE__ */ F(ee, {
77
- icon: /* @__PURE__ */ F(ce, {
78
- size: v.LG,
79
- stroke: y,
76
+ children: [/* @__PURE__ */ I(ee, {
77
+ icon: /* @__PURE__ */ I(le, {
78
+ size: y.LG,
79
+ stroke: b,
80
80
  "aria-hidden": !0,
81
81
  className: "rtl:scale-x-[-1]"
82
82
  }),
83
83
  "aria-label": n,
84
84
  onClick: t
85
- }), /* @__PURE__ */ F("h1", {
85
+ }), /* @__PURE__ */ I("h1", {
86
86
  className: "dial-h2-text min-w-0 truncate",
87
87
  children: e
88
88
  })]
89
- }), r != null && /* @__PURE__ */ F("div", {
89
+ }), r != null && /* @__PURE__ */ I("div", {
90
90
  className: "hidden shrink-0 items-center gap-2 desktop:flex",
91
91
  children: r
92
92
  })]
93
93
  }),
94
- /* @__PURE__ */ I("div", {
94
+ /* @__PURE__ */ L("div", {
95
95
  ref: g,
96
96
  className: "flex flex-1 flex-col overflow-y-auto desktop:flex-row desktop:overflow-hidden",
97
97
  children: [
98
- /* @__PURE__ */ F("div", {
99
- className: c(a == null ? "desktop:flex-1" : "desktop:shrink-0 desktop:overflow-y-auto desktop:border-e", a != null && !x && "desktop:w-[400px]", x && "desktop:relative desktop:w-[var(--el-left-width)]", "desktop:overflow-y-auto", a == null ? void 0 : Ee.columnBorder),
98
+ /* @__PURE__ */ I("div", {
99
+ className: c(a == null ? "desktop:flex-1" : "desktop:shrink-0 desktop:overflow-y-auto desktop:border-e", a != null && !x && "desktop:w-[400px]", x && "desktop:relative desktop:w-[var(--el-left-width)]", "desktop:overflow-y-auto", a == null ? void 0 : De.columnBorder),
100
100
  style: T == null ? void 0 : { "--el-left-width": `${T}px` },
101
101
  children: i
102
102
  }),
103
- x && T != null && /* @__PURE__ */ F("div", {
103
+ x && T != null && /* @__PURE__ */ I("div", {
104
104
  className: "relative hidden w-0 shrink-0 desktop:block",
105
- children: /* @__PURE__ */ F(M, {
105
+ children: /* @__PURE__ */ I(ie, {
106
106
  width: T,
107
107
  minWidth: S ?? 280,
108
108
  maxWidth: E,
@@ -112,78 +112,78 @@ var Se = {
112
112
  tooltip: d?.resizeHandleTooltip ?? "Drag to resize"
113
113
  })
114
114
  }),
115
- a != null && /* @__PURE__ */ F("div", {
115
+ a != null && /* @__PURE__ */ I("div", {
116
116
  className: "desktop:flex desktop:min-h-0 desktop:flex-1 desktop:flex-col desktop:overflow-y-auto",
117
117
  children: a
118
118
  }),
119
- s != null && /* @__PURE__ */ F("div", {
120
- className: c("desktop:w-[400px] desktop:shrink-0 desktop:overflow-y-auto desktop:border-s", Ee.columnBorder),
119
+ s != null && /* @__PURE__ */ I("div", {
120
+ className: c("desktop:w-[400px] desktop:shrink-0 desktop:overflow-y-auto desktop:border-s", De.columnBorder),
121
121
  children: s
122
122
  })
123
123
  ]
124
124
  }),
125
- r != null && /* @__PURE__ */ F("div", {
126
- className: c("flex shrink-0 flex-row-reverse items-center gap-2 border-t px-4 py-2 desktop:hidden [&>*]:flex-1", Ee.footerBorder),
125
+ r != null && /* @__PURE__ */ I("div", {
126
+ className: c("flex shrink-0 flex-row-reverse items-center gap-2 border-t px-4 py-2 desktop:hidden [&>*]:flex-1", De.footerBorder),
127
127
  children: r
128
128
  })
129
129
  ]
130
130
  });
131
- }, De = {
131
+ }, W = {
132
132
  box: "_box_c9as8_1",
133
133
  icon: "_icon_c9as8_6",
134
134
  caption: "_caption_c9as8_10"
135
- }, Oe = ({ label: e, avatarUrl: t, avatarAlt: n = "", addAvatarLabel: r = "Add avatar", captionText: i = "PNG, JPG or SVG (max 1 MB)", onAddAvatarClick: a, styles: s, className: l }) => {
135
+ }, ke = ({ label: e, avatarUrl: t, avatarAlt: n = "", addAvatarLabel: r = "Add avatar", captionText: i = "PNG, JPG or SVG (max 1 MB)", onAddAvatarClick: a, styles: s, className: l }) => {
136
136
  let u = o({
137
137
  "--aa-box-bg": s?.colors?.boxBackgroundColor,
138
138
  "--aa-box-border": s?.colors?.boxBorderColor,
139
139
  "--aa-icon": s?.colors?.placeholderIconColor,
140
140
  "--aa-caption": s?.colors?.captionColor
141
141
  });
142
- return /* @__PURE__ */ I("div", {
142
+ return /* @__PURE__ */ L("div", {
143
143
  className: c("flex flex-col gap-2", l),
144
144
  style: u,
145
- children: [/* @__PURE__ */ F(O, { label: e }), /* @__PURE__ */ I("div", {
145
+ children: [/* @__PURE__ */ I(A, { label: e }), /* @__PURE__ */ L("div", {
146
146
  className: "flex items-start gap-3",
147
- children: [/* @__PURE__ */ F("div", {
148
- className: c("flex h-16 w-16 shrink-0 items-center justify-center overflow-hidden rounded-lg border", De.box),
149
- children: t ? /* @__PURE__ */ F("img", {
147
+ children: [/* @__PURE__ */ I("div", {
148
+ className: c("flex h-16 w-16 shrink-0 items-center justify-center overflow-hidden rounded-lg border", W.box),
149
+ children: t ? /* @__PURE__ */ I("img", {
150
150
  src: t,
151
151
  alt: n,
152
152
  className: "h-16 w-16 object-cover"
153
- }) : /* @__PURE__ */ F(de, {
154
- size: v.LG,
155
- stroke: y,
153
+ }) : /* @__PURE__ */ I(fe, {
154
+ size: y.LG,
155
+ stroke: b,
156
156
  "aria-hidden": !0,
157
- className: De.icon
157
+ className: W.icon
158
158
  })
159
- }), /* @__PURE__ */ I("div", {
159
+ }), /* @__PURE__ */ L("div", {
160
160
  className: "flex flex-col gap-3",
161
- children: [/* @__PURE__ */ F(E, {
162
- size: S.Small,
163
- iconBefore: /* @__PURE__ */ F(fe, {
164
- size: v.SM,
165
- stroke: y,
161
+ children: [/* @__PURE__ */ I(O, {
162
+ size: C.Small,
163
+ iconBefore: /* @__PURE__ */ I(pe, {
164
+ size: y.SM,
165
+ stroke: b,
166
166
  "aria-hidden": !0
167
167
  }),
168
168
  className: "w-fit",
169
169
  label: r,
170
170
  onClick: a
171
- }), /* @__PURE__ */ F("span", {
172
- className: c("dial-tiny-text", De.caption),
171
+ }), /* @__PURE__ */ I("span", {
172
+ className: c("dial-tiny-text", W.caption),
173
173
  children: i
174
174
  })]
175
175
  })]
176
176
  })]
177
177
  });
178
- }, W = ({ isOpen: e, onClose: t, onAttach: n, bucket: r, FileManagerModal: i, allowedMimeTypes: a, maxFileSizeBytes: o, labels: s }) => {
179
- let c = R((e) => e.length === 1 ? s.deleteConfirmTitleSingle : s.deleteConfirmTitleMultiple, [s.deleteConfirmTitleSingle, s.deleteConfirmTitleMultiple]), l = R((e) => /* @__PURE__ */ F("div", {
178
+ }, Ae = ({ isOpen: e, onClose: t, onAttach: n, bucket: r, FileManagerModal: i, allowedMimeTypes: a, maxFileSizeBytes: o, labels: s }) => {
179
+ let c = z((e) => e.length === 1 ? s.deleteConfirmTitleSingle : s.deleteConfirmTitleMultiple, [s.deleteConfirmTitleSingle, s.deleteConfirmTitleMultiple]), l = z((e) => /* @__PURE__ */ I("div", {
180
180
  className: "dial-small-text px-6 py-3",
181
- children: /* @__PURE__ */ F("p", {
181
+ children: /* @__PURE__ */ I("p", {
182
182
  className: "mb-3 text-secondary",
183
- children: e.length === 1 ? /* @__PURE__ */ I(P, { children: [
183
+ children: e.length === 1 ? /* @__PURE__ */ L(F, { children: [
184
184
  s.deleteConfirmSingleText,
185
185
  " ",
186
- /* @__PURE__ */ I("span", {
186
+ /* @__PURE__ */ L("span", {
187
187
  className: "wrap-break-word text-primary",
188
188
  children: [
189
189
  "\"",
@@ -191,10 +191,10 @@ var Se = {
191
191
  "\"?"
192
192
  ]
193
193
  })
194
- ] }) : /* @__PURE__ */ I(P, { children: [
194
+ ] }) : /* @__PURE__ */ L(F, { children: [
195
195
  s.deleteConfirmMultipleText,
196
196
  " ",
197
- /* @__PURE__ */ I("span", {
197
+ /* @__PURE__ */ L("span", {
198
198
  className: "text-primary",
199
199
  children: [
200
200
  e.length,
@@ -209,9 +209,9 @@ var Se = {
209
209
  s.deleteConfirmMultipleText,
210
210
  s.deleteConfirmItemsLabel
211
211
  ]);
212
- return /* @__PURE__ */ F(he, {
212
+ return /* @__PURE__ */ I(ge, {
213
213
  fallback: null,
214
- children: e && /* @__PURE__ */ F(i, {
214
+ children: e && /* @__PURE__ */ I(i, {
215
215
  isOpen: e,
216
216
  onClose: t,
217
217
  onAttach: n,
@@ -244,106 +244,106 @@ var Se = {
244
244
  });
245
245
  }, G = /* @__PURE__ */ function(e) {
246
246
  return e.Avatar = "avatar", e.Name = "name", e.Version = "version", e.Description = "description", e.Locales = "locales", e.Tags = "tags", e;
247
- }({}), ke = [
247
+ }({}), K = [
248
248
  "avatar",
249
249
  "name",
250
250
  "version",
251
251
  "description",
252
252
  "locales",
253
253
  "tags"
254
- ], Ae = (e, t, n) => ({
254
+ ], je = (e, t, n) => ({
255
255
  id: e,
256
256
  language: n.find((e) => !t.has(e.code))?.code ?? "",
257
257
  name: "",
258
258
  description: ""
259
- }), je = ({ value: e, onChange: t, availableLocaleOptions: n = [], labels: i, className: a, summaryClassName: o = "dial-body-text text-secondary", rowLabelClassName: s = "dial-tiny-lead-text text-secondary" }) => {
260
- let { summaryLabel: l, addLabel: u, editLabel: d, popupTitle: f, addLocaleLabel: p, localeRowLabel: h = "Locale", languageLabel: _, nameLabel: x, namePlaceholder: C, descriptionLabel: w, descriptionPlaceholder: T, deleteAriaLabel: E, cancelLabel: ee = "Cancel", saveLabel: O = "Save" } = i, [A, ne] = H(!1), [j, re] = H([]), M = V(0);
261
- z(() => {
262
- A && re(e.length > 0 ? e : [Ae(`locale-row-${++M.current}`, /* @__PURE__ */ new Set(), n)]);
259
+ }), Me = ({ value: e, onChange: t, availableLocaleOptions: n = [], labels: i, className: a, summaryClassName: o = "dial-body-text text-secondary", rowLabelClassName: s = "dial-tiny-lead-text text-secondary" }) => {
260
+ let { summaryLabel: l, addLabel: u, editLabel: d, popupTitle: f, addLocaleLabel: p, localeRowLabel: m = "Locale", languageLabel: g, nameLabel: v, namePlaceholder: S, descriptionLabel: w, descriptionPlaceholder: T, deleteAriaLabel: E, cancelLabel: D = "Cancel", saveLabel: O = "Save" } = i, [ee, A] = U(!1), [M, ne] = U([]), N = H(0);
261
+ B(() => {
262
+ ee && ne(e.length > 0 ? e : [je(`locale-row-${++N.current}`, /* @__PURE__ */ new Set(), n)]);
263
263
  }, [
264
- A,
264
+ ee,
265
265
  e,
266
266
  n
267
267
  ]);
268
- let ae = () => ne(!0), N = () => ne(!1), P = () => {
269
- t(j.filter((e) => e.language && e.name)), ne(!1);
270
- }, ce = () => {
271
- let e = new Set(j.map((e) => e.language).filter(Boolean));
272
- re((t) => [...t, Ae(`locale-row-${++M.current}`, e, n)]);
273
- }, le = (e, t) => {
274
- re((n) => n.map((n) => n.id === e ? {
268
+ let re = () => A(!0), ie = () => A(!1), oe = () => {
269
+ t(M.filter((e) => e.language && e.name)), A(!1);
270
+ }, se = () => {
271
+ let e = new Set(M.map((e) => e.language).filter(Boolean));
272
+ ne((t) => [...t, je(`locale-row-${++N.current}`, e, n)]);
273
+ }, F = (e, t) => {
274
+ ne((n) => n.map((n) => n.id === e ? {
275
275
  ...n,
276
276
  ...t
277
277
  } : n));
278
- }, ue = (e) => {
279
- re((t) => t.filter((t) => t.id !== e));
280
- }, L = (e) => n.find((t) => t.code === e)?.label ?? e.toUpperCase(), de = j.some((e) => !e.language || !e.name);
281
- return n.length === 0 ? null : /* @__PURE__ */ I("div", {
278
+ }, le = (e) => {
279
+ ne((t) => t.filter((t) => t.id !== e));
280
+ }, ue = (e) => n.find((t) => t.code === e)?.label ?? e.toUpperCase(), R = M.some((e) => !e.language || !e.name);
281
+ return n.length === 0 ? null : /* @__PURE__ */ L("div", {
282
282
  className: c("flex items-center gap-2", a),
283
283
  children: [
284
- e.length > 0 && /* @__PURE__ */ F("span", {
284
+ e.length > 0 && /* @__PURE__ */ I("span", {
285
285
  className: o,
286
- children: `${l}: ${e.map((e) => `[${L(e.language)}]`).join(", ")}`
286
+ children: `${l}: ${e.map((e) => `[${ue(e.language)}]`).join(", ")}`
287
287
  }),
288
- /* @__PURE__ */ F(k, {
288
+ /* @__PURE__ */ I(j, {
289
289
  label: e.length > 0 ? d : u,
290
- iconBefore: /* @__PURE__ */ F(fe, {
291
- size: v.SM,
290
+ iconBefore: /* @__PURE__ */ I(pe, {
291
+ size: y.SM,
292
292
  "aria-hidden": !0,
293
- stroke: y
293
+ stroke: b
294
294
  }),
295
295
  className: "px-0!",
296
- onClick: ae
296
+ onClick: re
297
297
  }),
298
- /* @__PURE__ */ F(te, {
299
- open: A,
298
+ /* @__PURE__ */ I(te, {
299
+ open: ee,
300
300
  header: f,
301
- onClose: N,
301
+ onClose: ie,
302
302
  mainButtons: [{
303
- label: ee,
304
- onClick: N
303
+ label: D,
304
+ onClick: ie
305
305
  }, {
306
306
  label: O,
307
- variant: g.Primary,
308
- disabled: de,
309
- onClick: P
307
+ variant: _.Primary,
308
+ disabled: R,
309
+ onClick: oe
310
310
  }],
311
- children: /* @__PURE__ */ I("div", {
311
+ children: /* @__PURE__ */ L("div", {
312
312
  className: "flex flex-col gap-8 px-6 py-3",
313
- children: [j.map((e, t) => {
314
- let i = new Set(j.filter((t) => t.id !== e.id).map((e) => e.language).filter(Boolean));
315
- return /* @__PURE__ */ I("div", {
313
+ children: [M.map((e, t) => {
314
+ let i = new Set(M.filter((t) => t.id !== e.id).map((e) => e.language).filter(Boolean));
315
+ return /* @__PURE__ */ L("div", {
316
316
  className: "flex flex-col gap-2",
317
- children: [/* @__PURE__ */ I("div", {
317
+ children: [/* @__PURE__ */ L("div", {
318
318
  className: "flex items-center justify-between",
319
- children: [/* @__PURE__ */ I("span", {
319
+ children: [/* @__PURE__ */ L("span", {
320
320
  className: s,
321
321
  children: [
322
- h,
322
+ m,
323
323
  " ",
324
324
  t + 1
325
325
  ]
326
- }), /* @__PURE__ */ F(b, {
327
- appearance: m.Ghost,
328
- size: S.Small,
329
- icon: /* @__PURE__ */ F(pe, {
330
- size: v.SM,
326
+ }), /* @__PURE__ */ I(x, {
327
+ appearance: h.Ghost,
328
+ size: C.Small,
329
+ icon: /* @__PURE__ */ I(me, {
330
+ size: y.SM,
331
331
  "aria-hidden": !0,
332
- stroke: y
332
+ stroke: b
333
333
  }),
334
334
  "aria-label": `${E} ${t + 1}`,
335
- onClick: () => ue(e.id)
335
+ onClick: () => le(e.id)
336
336
  })]
337
- }), /* @__PURE__ */ I("div", {
337
+ }), /* @__PURE__ */ L("div", {
338
338
  role: "group",
339
- "aria-label": `${h} ${t + 1}`,
339
+ "aria-label": `${m} ${t + 1}`,
340
340
  className: "flex flex-col gap-5",
341
- children: [/* @__PURE__ */ I("div", {
341
+ children: [/* @__PURE__ */ L("div", {
342
342
  className: "flex flex-col gap-5 desktop:flex-row desktop:items-start",
343
- children: [/* @__PURE__ */ F(ie, {
343
+ children: [/* @__PURE__ */ I(ae, {
344
344
  id: `${e.id}-language`,
345
345
  labelProps: {
346
- label: _,
346
+ label: g,
347
347
  required: !0
348
348
  },
349
349
  className: "desktop:shrink-0 desktop:basis-40",
@@ -353,52 +353,52 @@ var Se = {
353
353
  disabled: i.has(e.code)
354
354
  })),
355
355
  value: e.language,
356
- onChange: (t) => le(e.id, { language: t })
357
- }), /* @__PURE__ */ F(D, {
356
+ onChange: (t) => F(e.id, { language: t })
357
+ }), /* @__PURE__ */ I(k, {
358
358
  id: `${e.id}-name`,
359
359
  containerClassName: "min-w-0 flex-1",
360
360
  required: !0,
361
361
  value: e.name,
362
- onChange: (t) => le(e.id, { name: t ?? "" }),
362
+ onChange: (t) => F(e.id, { name: t ?? "" }),
363
363
  labelProps: {
364
- label: x,
364
+ label: v,
365
365
  required: !0
366
366
  },
367
- placeholder: C
367
+ placeholder: S
368
368
  })]
369
- }), /* @__PURE__ */ F(oe, {
369
+ }), /* @__PURE__ */ I(P, {
370
370
  id: `${e.id}-description`,
371
371
  className: r,
372
- resize: se.Vertical,
372
+ resize: ce.Vertical,
373
373
  value: e.description,
374
- onChange: (t) => le(e.id, { description: t }),
374
+ onChange: (t) => F(e.id, { description: t }),
375
375
  labelProps: { label: w },
376
376
  placeholder: T
377
377
  })]
378
378
  })]
379
379
  }, e.id);
380
- }), /* @__PURE__ */ F(k, {
380
+ }), /* @__PURE__ */ I(j, {
381
381
  label: p,
382
- iconBefore: /* @__PURE__ */ F(fe, {
383
- size: v.SM,
382
+ iconBefore: /* @__PURE__ */ I(pe, {
383
+ size: y.SM,
384
384
  "aria-hidden": !0,
385
- stroke: y
385
+ stroke: b
386
386
  }),
387
387
  className: "self-start",
388
- onClick: ce,
389
- disabled: j.length >= n.length
388
+ onClick: se,
389
+ disabled: M.length >= n.length
390
390
  })]
391
391
  })
392
392
  })
393
393
  ]
394
394
  });
395
- }, Me = "Add tags, comma separated", Ne = "deployment-creation-form-description", Pe = ({ values: e, errors: t, onChange: n, onNameBlur: a, onVersionBlur: o, iconPreviewUrl: s, onAddAvatarClick: l, labels: u, styles: d, availableLocaleOptions: f = [], fields: p = ke, isNameReadOnly: m = !1, nameReadOnlyTooltip: h, nameCaption: g, isDescriptionRequired: _ = !1, descriptionCaption: v, renderDescription: y, focusRequestKey: b }) => {
396
- let x = V(null), S = V(null), C = V(null), w = V(!1), T = (e) => p.includes(e), E = T(G.Name), ee = T(G.Version), O = !!(t.name || t.version || t.description), k = V(b);
397
- z(() => {
395
+ }, Ne = "Add tags, comma separated", Pe = "deployment-creation-form-description", Fe = ({ values: e, errors: t, onChange: n, onNameBlur: a, onVersionBlur: o, iconPreviewUrl: s, onAddAvatarClick: l, labels: u, styles: d, availableLocaleOptions: f = [], fields: p = K, isNameReadOnly: m = !1, nameReadOnlyTooltip: h, nameCaption: g, isDescriptionRequired: _ = !1, descriptionCaption: v, renderDescription: y, focusRequestKey: b }) => {
396
+ let x = H(null), S = H(null), C = H(null), w = H(!1), T = (e) => p.includes(e), E = T(G.Name), D = T(G.Version), O = !!(t.name || t.version || t.description), ee = H(b);
397
+ B(() => {
398
398
  let e = () => {
399
399
  t.name ? x.current?.focus() : t.version ? S.current?.focus() : t.description && C.current?.focus();
400
400
  };
401
- b === void 0 ? (O && !w.current && e(), w.current = O) : b !== k.current && (k.current = b, e());
401
+ b === void 0 ? (O && !w.current && e(), w.current = O) : b !== ee.current && (ee.current = b, e());
402
402
  }, [
403
403
  b,
404
404
  O,
@@ -406,8 +406,8 @@ var Se = {
406
406
  t.version,
407
407
  t.description
408
408
  ]);
409
- let A = /* @__PURE__ */ F(oe, {
410
- id: Ne,
409
+ let A = /* @__PURE__ */ I(P, {
410
+ id: Pe,
411
411
  ref: C,
412
412
  value: e.description,
413
413
  onChange: (e) => n({ description: e }),
@@ -422,14 +422,14 @@ var Se = {
422
422
  invalid: !!t.description,
423
423
  containerClassName: y ? void 0 : d?.field,
424
424
  className: r,
425
- resize: se.Vertical
425
+ resize: ce.Vertical
426
426
  });
427
- return /* @__PURE__ */ I("div", {
427
+ return /* @__PURE__ */ L("div", {
428
428
  role: u.ariaLabel ? "group" : void 0,
429
429
  "aria-label": u.ariaLabel,
430
430
  className: c("flex flex-col gap-4", d?.root),
431
431
  children: [
432
- T(G.Avatar) && /* @__PURE__ */ F(Oe, {
432
+ T(G.Avatar) && /* @__PURE__ */ I(ke, {
433
433
  label: u.iconUrl.label,
434
434
  avatarUrl: s,
435
435
  addAvatarLabel: u.iconUrl.addAvatarLabel,
@@ -437,9 +437,9 @@ var Se = {
437
437
  onAddAvatarClick: l,
438
438
  className: d?.field
439
439
  }),
440
- (E || ee) && /* @__PURE__ */ I("div", {
440
+ (E || D) && /* @__PURE__ */ L("div", {
441
441
  className: c("flex items-start gap-4", d?.field),
442
- children: [E && /* @__PURE__ */ F(D, {
442
+ children: [E && /* @__PURE__ */ I(k, {
443
443
  id: "deployment-creation-form-name",
444
444
  inputRef: x,
445
445
  value: e.name,
@@ -455,8 +455,8 @@ var Se = {
455
455
  caption: g,
456
456
  error: t.name || void 0,
457
457
  invalid: !!t.name,
458
- containerClassName: ee ? "min-w-0 basis-0 grow-[2]" : "min-w-0 flex-1"
459
- }), ee && /* @__PURE__ */ F(D, {
458
+ containerClassName: D ? "min-w-0 basis-0 grow-[2]" : "min-w-0 flex-1"
459
+ }), D && /* @__PURE__ */ I(k, {
460
460
  id: "deployment-creation-form-version",
461
461
  inputRef: S,
462
462
  value: e.version,
@@ -469,23 +469,23 @@ var Se = {
469
469
  containerClassName: E ? "min-w-0 basis-0 grow-[1]" : "min-w-0 flex-1"
470
470
  })]
471
471
  }),
472
- T(G.Description) && (y ? /* @__PURE__ */ F("div", {
472
+ T(G.Description) && (y ? /* @__PURE__ */ I("div", {
473
473
  className: d?.field,
474
- children: y(A, Ne)
474
+ children: y(A, Pe)
475
475
  }) : A),
476
- T(G.Locales) && /* @__PURE__ */ F(je, {
476
+ T(G.Locales) && /* @__PURE__ */ I(Me, {
477
477
  value: e.otherLocales,
478
478
  onChange: (e) => n({ otherLocales: e }),
479
479
  availableLocaleOptions: f,
480
480
  labels: u.otherLocales,
481
481
  className: d?.field
482
482
  }),
483
- T(G.Tags) && /* @__PURE__ */ F("div", {
483
+ T(G.Tags) && /* @__PURE__ */ I("div", {
484
484
  className: d?.field,
485
- children: /* @__PURE__ */ F(N, {
485
+ children: /* @__PURE__ */ I(se, {
486
486
  id: "deployment-creation-form-topics",
487
487
  labelProps: { label: u.topics.label },
488
- placeholder: u.topics.placeholder ?? Me,
488
+ placeholder: u.topics.placeholder ?? Ne,
489
489
  value: e.topics,
490
490
  onChange: (e) => n({ topics: e }),
491
491
  tagClassName: i
@@ -493,13 +493,13 @@ var Se = {
493
493
  })
494
494
  ]
495
495
  });
496
- }, Fe = "border-0 p-4 desktop:p-8", Ie = "desktop:flex-1", Le = "px-4 pt-4 desktop:px-6 desktop:pt-6", Re = _e(({ title: e, onBack: t, onCancel: n, onSubmit: r, submitLabel: i, isSubmitting: a = !1, isSubmitDisabled: o = !1, extraActions: s, hideStandardActions: l = !1, metadata: u, metadataTitle: d, metadataFooter: f, setup: p, setupTitle: m, asideData: h, asideTitle: g, asideSectionClassName: _, alert: v, resizableLeftColumn: y, metadataSectionClassName: b, setupSectionClassName: x, labels: S, styles: C, dir: w }) => {
497
- let T = v == null ? null : /* @__PURE__ */ F("div", {
496
+ }, Ie = "border-0 p-4 desktop:p-8", Le = "desktop:flex-1", Re = "px-4 pt-4 desktop:px-6 desktop:pt-6", ze = ve(({ title: e, onBack: t, onCancel: n, onSubmit: r, submitLabel: i, isSubmitting: a = !1, isSubmitDisabled: o = !1, extraActions: s, hideStandardActions: l = !1, metadata: u, metadataTitle: d, metadataFooter: f, setup: p, setupTitle: m, asideData: h, asideTitle: g, asideSectionClassName: _, alert: v, resizableLeftColumn: y, metadataSectionClassName: b, setupSectionClassName: x, labels: S, styles: C, dir: w }) => {
497
+ let T = /* @__PURE__ */ I("div", {
498
498
  role: "alert",
499
- className: Le,
499
+ className: v == null ? void 0 : Re,
500
500
  children: v
501
501
  }), E = p != null;
502
- return /* @__PURE__ */ F(U, {
502
+ return /* @__PURE__ */ I(Oe, {
503
503
  title: e,
504
504
  onBack: t,
505
505
  backAriaLabel: S?.backAriaLabel ?? "Back",
@@ -510,41 +510,41 @@ var Se = {
510
510
  resizeHandleLabel: S?.resizeHandleLabel,
511
511
  resizeHandleTooltip: S?.resizeHandleTooltip
512
512
  },
513
- rightContent: h == null ? void 0 : /* @__PURE__ */ F(we, {
513
+ rightContent: h == null ? void 0 : /* @__PURE__ */ I(Te, {
514
514
  title: g,
515
515
  styles: C?.section,
516
- className: c(Fe, _, Se.asideSection),
516
+ className: c(Ie, _, Ce.asideSection),
517
517
  children: h
518
518
  }),
519
519
  styles: C?.layout,
520
520
  dir: w,
521
- actions: /* @__PURE__ */ I(P, { children: [s, !l && /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(A, {
521
+ actions: /* @__PURE__ */ L(F, { children: [s, !l && /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I(M, {
522
522
  label: S?.cancelLabel ?? "Cancel",
523
523
  disabled: a,
524
524
  onClick: n
525
- }), /* @__PURE__ */ F(j, {
525
+ }), /* @__PURE__ */ I(N, {
526
526
  label: i,
527
527
  disabled: a || o,
528
528
  onClick: r
529
529
  })] })] }),
530
- leftContent: /* @__PURE__ */ I(P, { children: [
530
+ leftContent: /* @__PURE__ */ L(F, { children: [
531
531
  !E && T,
532
- /* @__PURE__ */ F(we, {
532
+ /* @__PURE__ */ I(Te, {
533
533
  title: d === null ? void 0 : d ?? S?.metadataTitle ?? "Metadata",
534
534
  styles: C?.section,
535
- className: c(Fe, b, Se.metadataSection),
535
+ className: c(Ie, b, Ce.metadataSection),
536
536
  children: u
537
537
  }),
538
538
  f
539
539
  ] }),
540
- centerContent: E ? /* @__PURE__ */ I(P, { children: [T, /* @__PURE__ */ F(we, {
540
+ centerContent: E ? /* @__PURE__ */ L(F, { children: [T, /* @__PURE__ */ I(Te, {
541
541
  title: m === null ? void 0 : m ?? S?.setupTitle ?? "Setup",
542
542
  styles: C?.section,
543
- className: c(Fe, Ie, x, Se.setupSection),
543
+ className: c(Ie, Le, x, Ce.setupSection),
544
544
  children: p
545
545
  })] }) : void 0
546
546
  });
547
- }), ze = {
547
+ }), Be = {
548
548
  name: {
549
549
  label: "Name",
550
550
  placeholder: "Enter name"
@@ -583,7 +583,7 @@ var Se = {
583
583
  saveLabel: "Save"
584
584
  },
585
585
  ariaLabel: "Metadata"
586
- }, Be = {
586
+ }, Ve = {
587
587
  title: "Add avatar",
588
588
  attachLabel: "Attach",
589
589
  emptyTitle: "This folder is empty",
@@ -607,12 +607,12 @@ var Se = {
607
607
  deleteConfirmItemsLabel: "items?",
608
608
  deleteConfirmLabel: "Delete",
609
609
  deleteCancelLabel: "Cancel"
610
- }, Ve = _e(({ values: e, errors: t, onChange: n, onNameBlur: r, onVersionBlur: i, avatarPicker: a, availableLocaleOptions: o, fields: s = ke, isNameReadOnly: c, nameReadOnlyTooltip: l, nameCaption: u, isDescriptionRequired: d, descriptionCaption: f, renderDescription: p, focusRequestKey: m, labels: h }) => {
611
- let [g, _] = H(!1), v = B(() => a ? s : s.filter((e) => e !== G.Avatar), [a, s]), y = e.iconUrl, b = a?.resolveIconUrl, x = B(() => b ? b(y) : void 0, [y, b]), S = R(() => _(!0), []), C = R(() => _(!1), []), w = a?.resolveAttachedIconUrl, T = R((e) => {
610
+ }, He = ve(({ values: e, errors: t, onChange: n, onNameBlur: r, onVersionBlur: i, avatarPicker: a, availableLocaleOptions: o, fields: s = K, isNameReadOnly: c, nameReadOnlyTooltip: l, nameCaption: u, isDescriptionRequired: d, descriptionCaption: f, renderDescription: p, focusRequestKey: m, labels: h }) => {
611
+ let [g, _] = U(!1), v = V(() => a ? s : s.filter((e) => e !== G.Avatar), [a, s]), y = e.iconUrl, b = a?.resolveIconUrl, x = V(() => b ? b(y) : void 0, [y, b]), S = z(() => _(!0), []), C = z(() => _(!1), []), w = a?.resolveAttachedIconUrl, T = z((e) => {
612
612
  let t = w?.(e);
613
613
  t && n({ iconUrl: t }), _(!1);
614
614
  }, [n, w]);
615
- return /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(Pe, {
615
+ return /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I(Fe, {
616
616
  values: e,
617
617
  errors: t,
618
618
  onChange: n,
@@ -620,7 +620,7 @@ var Se = {
620
620
  onVersionBlur: i,
621
621
  iconPreviewUrl: x,
622
622
  onAddAvatarClick: S,
623
- labels: h?.form ?? ze,
623
+ labels: h?.form ?? Be,
624
624
  availableLocaleOptions: o,
625
625
  fields: v,
626
626
  isNameReadOnly: c,
@@ -630,7 +630,7 @@ var Se = {
630
630
  descriptionCaption: f,
631
631
  renderDescription: p,
632
632
  focusRequestKey: m
633
- }), a && /* @__PURE__ */ F(W, {
633
+ }), a && /* @__PURE__ */ I(Ae, {
634
634
  isOpen: g,
635
635
  onClose: C,
636
636
  onAttach: T,
@@ -638,51 +638,51 @@ var Se = {
638
638
  FileManagerModal: a.FileManagerModal,
639
639
  allowedMimeTypes: a.allowedMimeTypes,
640
640
  maxFileSizeBytes: a.maxFileSizeBytes,
641
- labels: h?.avatarPicker ?? Be
641
+ labels: h?.avatarPicker ?? Ve
642
642
  })] });
643
- }), He = /* @__PURE__ */ function(e) {
643
+ }), Ue = /* @__PURE__ */ function(e) {
644
644
  return e.Required = "required", e.InvalidFormat = "invalid-format", e.TooLong = "too-long", e.ControlCharacters = "control-characters", e;
645
645
  }({});
646
- He.TooLong, He.ControlCharacters;
646
+ Ue.TooLong, Ue.ControlCharacters;
647
647
  //#endregion
648
648
  //#region src/constants/public-class-names.ts
649
- var Ue = {
649
+ var We = {
650
650
  root: "dial-skill-editor-root",
651
651
  refineFeedback: "dial-skill-editor-refine-feedback"
652
- }, K = "SKILL.md", q = /* @__PURE__ */ function(e) {
652
+ }, q = "SKILL.md", J = /* @__PURE__ */ function(e) {
653
653
  return e.File = "file", e.Folder = "folder", e;
654
- }({}), We = /* @__PURE__ */ function(e) {
654
+ }({}), Ge = /* @__PURE__ */ function(e) {
655
655
  return e.Header = "header", e.Child = "child", e;
656
- }({}), Ge = (e) => {
656
+ }({}), Ke = (e) => {
657
657
  let t = e.lastIndexOf("/");
658
658
  return t === -1 ? null : e.slice(0, t);
659
- }, Ke = (e) => {
659
+ }, qe = (e) => {
660
660
  let t = e.lastIndexOf("/");
661
661
  return t === -1 ? e : e.slice(t + 1);
662
- }, qe = (e) => {
662
+ }, Je = (e) => {
663
663
  let t = /* @__PURE__ */ new Map(), n = (e) => {
664
664
  let n = t.get(e);
665
665
  if (n) return n;
666
666
  let r = {
667
667
  path: e,
668
- name: Ke(e),
669
- nodeType: ye.FOLDER,
670
- parentPath: Ge(e),
668
+ name: qe(e),
669
+ nodeType: be.FOLDER,
670
+ parentPath: Ke(e),
671
671
  folderId: e,
672
672
  items: []
673
673
  };
674
674
  return t.set(e, r), r;
675
675
  };
676
- for (let r of e) r.kind === q.Folder ? n(r.path).name = r.name : t.set(r.path, {
676
+ for (let r of e) r.kind === J.Folder ? n(r.path).name = r.name : t.set(r.path, {
677
677
  path: r.path,
678
678
  name: r.name,
679
- nodeType: ye.ITEM,
680
- parentPath: Ge(r.path),
681
- folderId: Ge(r.path) ?? ""
679
+ nodeType: be.ITEM,
680
+ parentPath: Ke(r.path),
681
+ folderId: Ke(r.path) ?? ""
682
682
  });
683
683
  for (let t of [...e]) {
684
- let e = Ge(t.path);
685
- for (; e != null;) n(e), e = Ge(e);
684
+ let e = Ke(t.path);
685
+ for (; e != null;) n(e), e = Ke(e);
686
686
  }
687
687
  let r = [];
688
688
  for (let e of t.values()) {
@@ -694,17 +694,17 @@ var Ue = {
694
694
  n ? n.items = [...n.items ?? [], e] : r.push(e);
695
695
  }
696
696
  return r;
697
- }, Je = (e, t) => e ? `${e}/${t}` : t, Ye = (e, t) => {
698
- let n = e.lastIndexOf("/"), r = n === -1 ? "" : e.slice(0, n), i = e.slice(n + 1), a = i.lastIndexOf("."), o = a > 0, s = o ? i.slice(0, a) : i, c = o ? i.slice(a) : "", l = 1, u = Je(r, `${s} (${l})${c}`);
699
- for (; t.has(u);) l += 1, u = Je(r, `${s} (${l})${c}`);
697
+ }, Ye = (e, t) => e ? `${e}/${t}` : t, Xe = (e, t) => {
698
+ let n = e.lastIndexOf("/"), r = n === -1 ? "" : e.slice(0, n), i = e.slice(n + 1), a = i.lastIndexOf("."), o = a > 0, s = o ? i.slice(0, a) : i, c = o ? i.slice(a) : "", l = 1, u = Ye(r, `${s} (${l})${c}`);
699
+ for (; t.has(u);) l += 1, u = Ye(r, `${s} (${l})${c}`);
700
700
  return u;
701
- }, Xe = (e, t) => {
701
+ }, Ze = (e, t) => {
702
702
  if (!t) return "";
703
703
  switch (e) {
704
- case We.Child: return t.path;
705
- case We.Header: return t.kind === q.Folder ? t.path : "";
704
+ case Ge.Child: return t.path;
705
+ case Ge.Header: return t.kind === J.Folder ? t.path : "";
706
706
  }
707
- }, Ze = (e, t) => {
707
+ }, Qe = (e, t) => {
708
708
  let n = t ? `${t}/` : "", r = /* @__PURE__ */ new Set();
709
709
  for (let { path: i } of e) {
710
710
  if (!i.startsWith(n) || i === t) continue;
@@ -712,29 +712,29 @@ var Ue = {
712
712
  r.add(e.split("/")[0]);
713
713
  }
714
714
  return r;
715
- }, Qe = (e, t, n) => {
715
+ }, $e = (e, t, n) => {
716
716
  let r = e.trim();
717
717
  if (!r) return n.required;
718
718
  if (/[/\\]/.test(r) || r === "." || r === "..") return n.invalid;
719
719
  if (t.has(r)) return n.duplicate;
720
- }, $e = "\\new-folder", et = ({ files: e, fileActions: t, defaultName: n, messages: r, onRevealFolder: i, onCreated: a }) => {
721
- let [o, s] = H(null), c = o?.parentPath ?? null, l = V([]), u = c == null ? void 0 : Je(c, $e), d = B(() => u == null ? void 0 : {
720
+ }, et = "\\new-folder", tt = ({ files: e, fileActions: t, defaultName: n, messages: r, onRevealFolder: i, onCreated: a }) => {
721
+ let [o, s] = U(null), c = o?.parentPath ?? null, l = H([]), u = c == null ? void 0 : Ye(c, et), d = V(() => u == null ? void 0 : {
722
722
  path: u,
723
723
  name: n,
724
- kind: q.Folder
725
- }, [u, n]), f = R((n, i) => {
726
- let a = Ze(e, i);
727
- return i === "" && a.add(K), Qe(n, a, r) ?? t.validateFolderPath?.(Je(i, n.trim()));
724
+ kind: J.Folder
725
+ }, [u, n]), f = z((n, i) => {
726
+ let a = Qe(e, i);
727
+ return i === "" && a.add(q), $e(n, a, r) ?? t.validateFolderPath?.(Ye(i, n.trim()));
728
728
  }, [
729
729
  e,
730
730
  r,
731
731
  t
732
- ]), p = R((e, t) => {
732
+ ]), p = z((e, t) => {
733
733
  l.current = [], s({
734
734
  parentPath: e,
735
735
  pane: t
736
736
  }), e !== "" && i(e);
737
- }, [i]), m = R((e, t) => {
737
+ }, [i]), m = z((e, t) => {
738
738
  if (c == null || t.path !== u) return null;
739
739
  let n = f(e, c);
740
740
  return l.current = [...l.current.slice(-1), {
@@ -745,16 +745,16 @@ var Ue = {
745
745
  c,
746
746
  u,
747
747
  f
748
- ]), h = R(() => {
748
+ ]), h = z(() => {
749
749
  l.current = [], s(null);
750
- }, []), g = R((e, n) => {
751
- let r = Je(n, e.trim());
750
+ }, []), g = z((e, n) => {
751
+ let r = Ye(n, e.trim());
752
752
  t.onCreateFolder?.(r), n !== "" && i(n), a(r);
753
753
  }, [
754
754
  t,
755
755
  i,
756
756
  a
757
- ]), _ = R((e) => {
757
+ ]), _ = z((e) => {
758
758
  if (c == null) return;
759
759
  let [t] = l.current;
760
760
  l.current.length === 2 && t != null && !t.isValid && t.value !== e || f(e, c) != null ? h() : (h(), g(e, c));
@@ -775,62 +775,62 @@ var Ue = {
775
775
  validateNewFolder: f,
776
776
  createFolder: g
777
777
  };
778
- }, tt = (e) => !!e.dataTransfer?.types.includes("Files"), nt = (e) => {
779
- let [t, n] = H(!1), r = V(0);
778
+ }, nt = (e) => !!e.dataTransfer?.types.includes("Files"), rt = (e) => {
779
+ let [t, n] = U(!1), r = H(0);
780
780
  return {
781
781
  isDragActive: t,
782
782
  dropZoneHandlers: {
783
- onDragEnter: R((e) => {
784
- tt(e) && (e.preventDefault(), r.current += 1, n(!0));
783
+ onDragEnter: z((e) => {
784
+ nt(e) && (e.preventDefault(), r.current += 1, n(!0));
785
785
  }, []),
786
- onDragLeave: R((e) => {
787
- tt(e) && (--r.current, r.current <= 0 && (r.current = 0, n(!1)));
786
+ onDragLeave: z((e) => {
787
+ nt(e) && (--r.current, r.current <= 0 && (r.current = 0, n(!1)));
788
788
  }, []),
789
- onDragOver: R((e) => {
790
- tt(e) && e.preventDefault();
789
+ onDragOver: z((e) => {
790
+ nt(e) && e.preventDefault();
791
791
  }, []),
792
- onDrop: R((t) => {
793
- if (!tt(t)) return;
792
+ onDrop: z((t) => {
793
+ if (!nt(t)) return;
794
794
  t.preventDefault(), r.current = 0, n(!1);
795
795
  let i = Array.from(t.dataTransfer?.files ?? []);
796
796
  i.length > 0 && e(i);
797
797
  }, [e])
798
798
  }
799
799
  };
800
- }, rt = /* @__PURE__ */ function(e) {
800
+ }, it = /* @__PURE__ */ function(e) {
801
801
  return e.Files = "files", e.Archive = "archive", e;
802
- }({}), J = /* @__PURE__ */ function(e) {
802
+ }({}), Y = /* @__PURE__ */ function(e) {
803
803
  return e.Mobile = "mobile", e.Desktop = "desktop", e;
804
- }({}), it = (e, t, n = v.MD) => /* @__PURE__ */ F(e, {
804
+ }({}), at = (e, t, n = y.MD) => /* @__PURE__ */ I(e, {
805
805
  size: n,
806
806
  className: t,
807
807
  "aria-hidden": !0,
808
- stroke: y
809
- }), Y = { footer: "_footer_hn1ri_7" }, at = ({ isOpen: e, title: t, closeAriaLabel: n, onClose: r, confirmLabel: i, onConfirm: a, cancelLabel: s, onCancel: l, isConfirmDisabled: d = !1, isConfirming: f = !1, children: h, colors: _ }) => {
810
- let v = u(), y = f ? /* @__PURE__ */ F(ae, {
808
+ stroke: b
809
+ }), ot = { footer: "_footer_hn1ri_7" }, st = ({ isOpen: e, title: t, closeAriaLabel: n, onClose: r, confirmLabel: i, onConfirm: a, cancelLabel: s, onCancel: l, isConfirmDisabled: u = !1, isConfirming: f = !1, children: p, colors: g }) => {
810
+ let v = d(), y = f ? /* @__PURE__ */ I(oe, {
811
811
  size: 16,
812
812
  ariaLabel: ""
813
813
  }) : void 0;
814
814
  if (v) {
815
- let u = o({
816
- "--se-dialog-footer-bg": _?.footerBackground,
817
- "--se-dialog-footer-border": _?.footerBorder
815
+ let d = o({
816
+ "--se-dialog-footer-bg": g?.footerBackground,
817
+ "--se-dialog-footer-border": g?.footerBorder
818
818
  });
819
- return /* @__PURE__ */ I(p, {
819
+ return /* @__PURE__ */ L(m, {
820
820
  open: e,
821
821
  title: t,
822
822
  closeAriaLabel: n,
823
823
  onClose: r,
824
- children: [h, /* @__PURE__ */ I("div", {
825
- className: c("sticky bottom-0 flex gap-3 border-t p-4", Y.footer),
826
- style: u,
827
- children: [/* @__PURE__ */ F(j, {
824
+ children: [p, /* @__PURE__ */ L("div", {
825
+ className: c("sticky bottom-0 flex gap-3 border-t p-4", ot.footer),
826
+ style: d,
827
+ children: [/* @__PURE__ */ I(N, {
828
828
  className: "flex-1",
829
829
  label: i,
830
830
  iconBefore: y,
831
- disabled: d,
831
+ disabled: u,
832
832
  onClick: a
833
- }), /* @__PURE__ */ F(A, {
833
+ }), /* @__PURE__ */ I(M, {
834
834
  className: "flex-1",
835
835
  label: s,
836
836
  onClick: l
@@ -838,7 +838,7 @@ var Ue = {
838
838
  })]
839
839
  });
840
840
  }
841
- return /* @__PURE__ */ F(te, {
841
+ return /* @__PURE__ */ I(te, {
842
842
  open: e,
843
843
  header: t,
844
844
  size: ne.Sm,
@@ -846,27 +846,27 @@ var Ue = {
846
846
  onClose: r,
847
847
  mainButtons: [{
848
848
  label: s,
849
- variant: g.Primary,
850
- appearance: m.Ghost,
849
+ variant: _.Primary,
850
+ appearance: h.Ghost,
851
851
  onClick: l
852
852
  }, {
853
853
  label: i,
854
- variant: g.Primary,
854
+ variant: _.Primary,
855
855
  iconBefore: y,
856
856
  onClick: a,
857
- disabled: d
857
+ disabled: u
858
858
  }],
859
- children: h
859
+ children: p
860
860
  });
861
- }, ot = ({ isOpen: e, onClose: t, validateName: n, onCreate: r, title: i, nameLabel: a, namePlaceholder: o, createLabel: s, cancelLabel: c, closeAriaLabel: l, dialogColors: u }) => {
862
- let d = ve(), [f, p] = H(""), [m, h] = H(!1);
863
- z(() => {
861
+ }, ct = ({ isOpen: e, onClose: t, validateName: n, onCreate: r, title: i, nameLabel: a, namePlaceholder: o, createLabel: s, cancelLabel: c, closeAriaLabel: l, dialogColors: u }) => {
862
+ let d = ye(), [f, p] = U(""), [m, h] = U(!1);
863
+ B(() => {
864
864
  e && (p(""), h(!1));
865
865
  }, [e]);
866
866
  let g = m ? n(f) : void 0, _ = () => {
867
867
  h(!0), n(f) ?? (r(f), t());
868
868
  };
869
- return /* @__PURE__ */ F(at, {
869
+ return /* @__PURE__ */ I(st, {
870
870
  isOpen: e,
871
871
  title: i,
872
872
  closeAriaLabel: l,
@@ -876,12 +876,12 @@ var Ue = {
876
876
  cancelLabel: c,
877
877
  onCancel: t,
878
878
  colors: u,
879
- children: /* @__PURE__ */ F("form", {
879
+ children: /* @__PURE__ */ I("form", {
880
880
  className: "px-4 py-4 desktop:px-6",
881
881
  onSubmit: (e) => {
882
882
  e.preventDefault(), _();
883
883
  },
884
- children: /* @__PURE__ */ F(D, {
884
+ children: /* @__PURE__ */ I(k, {
885
885
  id: d,
886
886
  labelProps: {
887
887
  label: a,
@@ -896,78 +896,78 @@ var Ue = {
896
896
  })
897
897
  })
898
898
  });
899
- }, st = ({ isVisible: e, labels: t }) => {
899
+ }, lt = ({ isVisible: e, labels: t }) => {
900
900
  if (!e) return null;
901
901
  let n = t ?? {};
902
- return /* @__PURE__ */ F("div", {
902
+ return /* @__PURE__ */ I("div", {
903
903
  role: "status",
904
904
  "aria-live": "polite",
905
905
  className: c("pointer-events-none absolute inset-0 z-[100] flex items-center justify-center backdrop-blur-sm"),
906
- children: /* @__PURE__ */ I("div", {
906
+ children: /* @__PURE__ */ L("div", {
907
907
  className: "flex flex-col items-center text-center",
908
908
  children: [
909
- /* @__PURE__ */ F(me, {
909
+ /* @__PURE__ */ I(he, {
910
910
  size: 100,
911
911
  className: "text-accent-primary",
912
912
  "aria-hidden": !0,
913
- stroke: y
913
+ stroke: b
914
914
  }),
915
- /* @__PURE__ */ F("span", {
915
+ /* @__PURE__ */ I("span", {
916
916
  className: "dial-h3-text mt-5",
917
917
  children: n.dropOverlayTitle ?? "Upload files"
918
918
  }),
919
- /* @__PURE__ */ F("span", {
919
+ /* @__PURE__ */ I("span", {
920
920
  className: "dial-small-text mt-4",
921
921
  children: n.dropOverlaySubtitle ?? "Drop files here to add them to this skill"
922
922
  })
923
923
  ]
924
924
  })
925
925
  });
926
- }, ct = {
926
+ }, X = {
927
927
  card: "_card_1tr87_2",
928
928
  label: "_label_1tr87_7",
929
929
  fileName: "_fileName_1tr87_11",
930
930
  header: "_header_1tr87_16"
931
- }, lt = ({ label: e, fileName: t, isExpanded: n, onToggle: r, children: i, labelClassName: a = "dial-tiny-lead-text", fileNameClassName: o = "dial-small-text" }) => /* @__PURE__ */ F(f, {
931
+ }, ut = ({ label: e, fileName: t, isExpanded: n, onToggle: r, children: i, labelClassName: a = "dial-tiny-lead-text", fileNameClassName: o = "dial-small-text" }) => /* @__PURE__ */ I(p, {
932
932
  expanded: n,
933
933
  onToggle: r,
934
- title: /* @__PURE__ */ F("span", {
935
- className: c("block", ct.label, a),
934
+ title: /* @__PURE__ */ I("span", {
935
+ className: c("block", X.label, a),
936
936
  children: e
937
937
  }),
938
- description: /* @__PURE__ */ F(T, {
938
+ description: /* @__PURE__ */ I(D, {
939
939
  name: t,
940
- nameClassName: c(ct.fileName, o)
940
+ nameClassName: c(X.fileName, o)
941
941
  }),
942
- className: c("rounded-lg border py-0 shadow-xs", ct.card),
943
- headerClassName: c("gap-4 rounded-lg py-2 ps-3 pe-2 text-start [&>span]:flex-1 [&>span]:gap-1 [&>svg]:size-6", n ? "[&>svg]:-rotate-90" : "[&>svg]:rotate-90", ct.header),
942
+ className: c("rounded-lg border py-0 shadow-xs", X.card),
943
+ headerClassName: c("gap-4 rounded-lg py-2 ps-3 pe-2 text-start [&>span]:flex-1 [&>span]:gap-1 [&>svg]:size-6", n ? "[&>svg]:-rotate-90" : "[&>svg]:rotate-90", X.header),
944
944
  contentClassName: "max-h-[416px] overflow-y-auto pt-4 pb-2 ps-3 pe-2",
945
945
  children: i
946
- }), ut = /* @__PURE__ */ function(e) {
946
+ }), dt = /* @__PURE__ */ function(e) {
947
947
  return e.SupportingFile = "supporting-file", e.Manifest = "manifest", e;
948
- }({}), dt = /* @__PURE__ */ function(e) {
948
+ }({}), ft = /* @__PURE__ */ function(e) {
949
949
  return e.Valid = "valid", e.Invalid = "invalid", e;
950
- }({}), X = /* @__PURE__ */ function(e) {
950
+ }({}), Z = /* @__PURE__ */ function(e) {
951
951
  return e.Replace = "replace", e.Duplicate = "duplicate", e;
952
- }({}), ft = (e) => (e.webkitRelativePath || e.name).replace(/\\/g, "/"), pt = ".zip,application/zip", mt = [], ht = 0, gt = () => `skill-file-candidate-${++ht}`, Z = (e, t, n) => ({
953
- id: gt(),
952
+ }({}), pt = (e) => (e.webkitRelativePath || e.name).replace(/\\/g, "/"), mt = ".zip,application/zip", ht = [], gt = 0, _t = () => `skill-file-candidate-${++gt}`, vt = (e, t, n) => ({
953
+ id: _t(),
954
954
  file: e,
955
- path: Je(n, t.replace(/\\/g, "/"))
956
- }), _t = ({ isOpen: e, onClose: t, fileActions: n, mode: r = rt.Files, targetFolderPath: i = "", initialFiles: a, initialEntries: o, existingFilePaths: l = mt, onCommitted: u, messageClassName: d = "dial-small-text", rowCaptionClassName: f = "dial-tiny-text text-secondary", labels: p, dialogColors: m }) => {
957
- let h = p ?? {}, [g, _] = H([]), [v, b] = H([]), [x, S] = H(X.Replace), E = B(() => new Set(l), [l]), [D, O] = H(/* @__PURE__ */ new Map()), [k, A] = H([]), [te, ne] = H(!1), [j, M] = H(), [ie, N] = H(!1), [oe, se] = H(), [ce, le] = H(0), ue = V(0), L = r === rt.Archive, de = h.uploadArchiveErrorMessage ?? "Couldn't read this archive", fe = ve(), me = ve(), he = V(null), ge = V(!1), _e = v[0]?.id;
958
- z(() => {
959
- e && (_e == null ? ge.current && (ge.current = !1, document.getElementById(me)?.focus()) : (ge.current = !0, he.current?.focus()));
955
+ path: Ye(n, t.replace(/\\/g, "/"))
956
+ }), yt = ({ isOpen: e, onClose: t, fileActions: n, mode: r = it.Files, targetFolderPath: i = "", initialFiles: a, initialEntries: o, existingFilePaths: l = ht, onCommitted: u, messageClassName: d = "dial-small-text", rowCaptionClassName: f, labels: p, dialogColors: m }) => {
957
+ let h = p ?? {}, [g, _] = U([]), [y, x] = U([]), [S, C] = U(Z.Replace), w = V(() => new Set(l), [l]), [O, k] = U(/* @__PURE__ */ new Map()), [A, j] = U([]), [M, te] = U(!1), [ne, N] = U(), [ie, ae] = U(!1), [se, P] = U(), [ce, le] = U(0), ue = H(0), R = r === it.Archive, de = h.uploadArchiveErrorMessage ?? "Couldn't read this archive", fe = ye(), pe = ye(), he = ye(), ge = H(null), _e = H(!1), ve = y[0]?.id;
958
+ B(() => {
959
+ e && (ve == null ? _e.current && (_e.current = !1, document.getElementById(pe)?.focus()) : (_e.current = !0, ge.current?.focus()));
960
960
  }, [
961
- _e,
961
+ ve,
962
962
  e,
963
- me
963
+ pe
964
964
  ]);
965
- let R = (e) => e.path !== "SKILL.md" && E.has(e.path), ye = (e) => {
966
- M(void 0), _((t) => [...t, ...e.filter((e) => !R(e))]), b((t) => [...t, ...e.filter(R)]);
967
- }, be = (e) => {
968
- let [t, ...n] = v;
969
- t && (b(n), S(X.Replace), e != null && (M(void 0), _((r) => {
970
- if (e === X.Replace) return [...r, {
965
+ let z = (e) => e.path !== "SKILL.md" && w.has(e.path), be = (e) => {
966
+ N(void 0), _((t) => [...t, ...e.filter((e) => !z(e))]), x((t) => [...t, ...e.filter(z)]);
967
+ }, xe = (e) => {
968
+ let [t, ...n] = y;
969
+ t && (x(n), C(Z.Replace), e != null && (N(void 0), _((r) => {
970
+ if (e === Z.Replace) return [...r, {
971
971
  ...t,
972
972
  replacesExisting: !0
973
973
  }];
@@ -978,297 +978,309 @@ var Ue = {
978
978
  ]);
979
979
  return [...r, {
980
980
  ...t,
981
- path: Ye(t.path, i)
981
+ path: Xe(t.path, i)
982
982
  }];
983
983
  })));
984
- }, xe = async (e) => {
984
+ }, Se = async (e) => {
985
985
  let { extractArchive: t } = n;
986
986
  if (!t) return;
987
987
  let r = ue.current;
988
- se(void 0), le((e) => e + 1);
988
+ P(void 0), le((e) => e + 1);
989
989
  try {
990
990
  let n = await Promise.all(e.map((e) => t(e)));
991
991
  if (r !== ue.current) return;
992
992
  let a = n.flat();
993
993
  if (a.length === 0) {
994
- se(h.uploadArchiveEmptyMessage ?? "This archive has no files");
994
+ P(h.uploadArchiveEmptyMessage ?? "This archive has no files");
995
995
  return;
996
996
  }
997
- ye(a.map((e) => Z(e.file, e.path, i)));
997
+ be(a.map((e) => vt(e.file, e.path, i)));
998
998
  } catch {
999
999
  if (r !== ue.current) return;
1000
- se(de);
1000
+ P(de);
1001
1001
  } finally {
1002
1002
  r === ue.current && le((e) => e - 1);
1003
1003
  }
1004
- }, Se = (e) => {
1005
- L ? xe(e) : ye(e.map((e) => Z(e, ft(e), i)));
1006
1004
  }, Ce = (e) => {
1005
+ R ? Se(e) : be(e.map((e) => vt(e, pt(e), i)));
1006
+ }, we = (e) => {
1007
1007
  _((t) => t.filter((t) => t.id !== e));
1008
1008
  };
1009
- z(() => {
1009
+ B(() => {
1010
1010
  if (!e) return;
1011
1011
  ue.current += 1;
1012
- let t = [...(a ?? []).map((e) => Z(e, ft(e), i)), ...(o ?? []).map((e) => Z(e.file, e.path, i))];
1013
- _(t.filter((e) => !R(e))), b(t.filter(R)), S(X.Replace), O(/* @__PURE__ */ new Map()), A([]), M(void 0), se(void 0), le(0);
1014
- }, [e]), z(() => {
1012
+ let t = [...(a ?? []).map((e) => vt(e, pt(e), i)), ...(o ?? []).map((e) => vt(e.file, e.path, i))];
1013
+ _(t.filter((e) => !z(e))), x(t.filter(z)), C(Z.Replace), k(/* @__PURE__ */ new Map()), j([]), N(void 0), P(void 0), le(0);
1014
+ }, [e]), B(() => {
1015
1015
  if (!e) return;
1016
1016
  let t = !1;
1017
- if (g.length === 0) O(/* @__PURE__ */ new Map()), A([]);
1018
- else return ne(!0), n.validateBatch(g).then(({ results: e, batchErrors: n }) => {
1019
- t || (O(new Map(e.map((e) => [e.candidateId, e]))), A(n.map((e) => e.message)));
1017
+ if (g.length === 0) k(/* @__PURE__ */ new Map()), j([]);
1018
+ else return te(!0), n.validateBatch(g).then(({ results: e, batchErrors: n }) => {
1019
+ t || (k(new Map(e.map((e) => [e.candidateId, e]))), j(n.map((e) => e.message)));
1020
1020
  }).finally(() => {
1021
- t || ne(!1);
1021
+ t || te(!1);
1022
1022
  }), () => {
1023
1023
  t = !0;
1024
1024
  };
1025
1025
  }, [g, e]);
1026
- let we = g.some((e) => D.get(e.id)?.status === dt.Invalid), Te = g.length > 0 && g.every((e) => D.get(e.id)?.status === dt.Invalid), Ee = g.length > 0 && !we && k.length === 0 && !te && !ie && ce === 0, U = async () => {
1027
- N(!0), M(void 0);
1026
+ let Te = g.some((e) => O.get(e.id)?.status === ft.Invalid), Ee = g.length > 0 && g.every((e) => O.get(e.id)?.status === ft.Invalid), De = [...A, ...g.flatMap((e) => {
1027
+ let t = O.get(e.id);
1028
+ return t?.status === ft.Invalid && t.error ? [`${e.path}: ${t.error}`] : [];
1029
+ })], Oe = g.length > 0 && !Te && A.length === 0 && !M && !ie && ce === 0, W = async () => {
1030
+ ae(!0), N(void 0);
1028
1031
  try {
1029
1032
  let { results: e, batchErrors: r } = await n.validateBatch(g), i = new Map(e.map((e) => [e.candidateId, e]));
1030
- if (O(i), A(r.map((e) => e.message)), g.some((e) => i.get(e.id)?.status === dt.Invalid) || r.length > 0) return;
1033
+ if (k(i), j(r.map((e) => e.message)), g.some((e) => i.get(e.id)?.status === ft.Invalid) || r.length > 0) return;
1031
1034
  let a = await n.commitBatch(g);
1032
1035
  if (a.error) {
1033
- M(a.error);
1036
+ N(a.error);
1034
1037
  return;
1035
1038
  }
1036
1039
  u?.(g), t();
1037
1040
  } finally {
1038
- N(!1);
1041
+ ae(!1);
1039
1042
  }
1040
- }, De = h.uploadDialogCloseAriaLabel ?? "Close", Oe = h.uploadCancelLabel ?? "Cancel", [W] = v;
1041
- if (W) {
1043
+ }, ke = h.uploadDialogCloseAriaLabel ?? "Close", Ae = h.uploadCancelLabel ?? "Cancel", [G] = y;
1044
+ if (G) {
1042
1045
  let t = h.uploadConflictTitle ?? "Replace or duplicate it?";
1043
- return /* @__PURE__ */ F(at, {
1046
+ return /* @__PURE__ */ I(st, {
1044
1047
  isOpen: e,
1045
1048
  title: t,
1046
- closeAriaLabel: De,
1047
- onClose: () => be(null),
1049
+ closeAriaLabel: ke,
1050
+ onClose: () => xe(null),
1048
1051
  confirmLabel: h.uploadConflictConfirmLabel ?? "Confirm",
1049
- onConfirm: () => be(x),
1050
- cancelLabel: Oe,
1051
- onCancel: () => be(null),
1052
+ onConfirm: () => xe(S),
1053
+ cancelLabel: Ae,
1054
+ onCancel: () => xe(null),
1052
1055
  colors: m,
1053
- children: /* @__PURE__ */ I("div", {
1056
+ children: /* @__PURE__ */ L("div", {
1054
1057
  className: "flex flex-col gap-4 px-4 py-4 desktop:px-6",
1055
- children: [/* @__PURE__ */ F("p", {
1056
- ref: he,
1058
+ children: [/* @__PURE__ */ I("p", {
1059
+ ref: ge,
1057
1060
  tabIndex: -1,
1058
1061
  className: c("outline-hidden", d),
1059
- children: h.uploadConflictMessage?.(W.path) ?? `Item with the same name "${W.path}" already exists.`
1060
- }), /* @__PURE__ */ F(re, {
1062
+ children: h.uploadConflictMessage?.(G.path) ?? `Item with the same name "${G.path}" already exists.`
1063
+ }), /* @__PURE__ */ I(re, {
1061
1064
  ariaLabel: t,
1062
- value: x,
1063
- onChange: (e) => S(e === X.Duplicate ? X.Duplicate : X.Replace),
1065
+ value: S,
1066
+ onChange: (e) => C(e === Z.Duplicate ? Z.Duplicate : Z.Replace),
1064
1067
  items: [{
1065
- value: X.Replace,
1068
+ value: Z.Replace,
1066
1069
  label: h.uploadConflictReplaceLabel ?? "Replace"
1067
1070
  }, {
1068
- value: X.Duplicate,
1071
+ value: Z.Duplicate,
1069
1072
  label: h.uploadConflictDuplicateLabel ?? "Duplicate"
1070
1073
  }]
1071
1074
  })]
1072
1075
  })
1073
1076
  });
1074
1077
  }
1075
- return /* @__PURE__ */ F(at, {
1078
+ return /* @__PURE__ */ I(st, {
1076
1079
  isOpen: e,
1077
- title: L ? h.uploadArchiveDialogTitle ?? "Upload archive from device" : h.uploadDialogTitle ?? "Upload files from device",
1078
- closeAriaLabel: De,
1080
+ title: R ? h.uploadArchiveDialogTitle ?? "Upload archive from device" : h.uploadDialogTitle ?? "Upload files from device",
1081
+ closeAriaLabel: ke,
1079
1082
  onClose: t,
1080
1083
  confirmLabel: h.uploadConfirmLabel ?? "Add",
1081
- onConfirm: () => void U(),
1082
- isConfirmDisabled: !Ee,
1084
+ onConfirm: () => void W(),
1085
+ isConfirmDisabled: !Oe,
1083
1086
  isConfirming: ie,
1084
- cancelLabel: Oe,
1087
+ cancelLabel: Ae,
1085
1088
  onCancel: t,
1086
1089
  colors: m,
1087
- children: /* @__PURE__ */ I("div", {
1090
+ children: /* @__PURE__ */ L("div", {
1088
1091
  className: "flex flex-col gap-4 px-4 py-4 desktop:px-6",
1089
1092
  children: [
1090
- /* @__PURE__ */ F(w, {
1091
- label: /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F("span", {
1093
+ /* @__PURE__ */ I(E, {
1094
+ label: /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I("span", {
1092
1095
  className: "desktop:hidden",
1093
- children: L ? h.uploadArchiveDropZoneMobileLabel ?? "Click here to upload a .zip archive" : h.uploadDropZoneMobileLabel ?? "Click here to upload"
1094
- }), /* @__PURE__ */ F("span", {
1096
+ children: R ? h.uploadArchiveDropZoneMobileLabel ?? "Click here to upload a .zip archive" : h.uploadDropZoneMobileLabel ?? "Click here to upload"
1097
+ }), /* @__PURE__ */ I("span", {
1095
1098
  className: "hidden desktop:inline",
1096
- children: L ? h.uploadArchiveDropZoneLabel ?? "Drag and drop a .zip archive or click here to upload" : h.uploadDropZoneLabel ?? "Drag and drop it or click here to upload"
1099
+ children: R ? h.uploadArchiveDropZoneLabel ?? "Drag and drop a .zip archive or click here to upload" : h.uploadDropZoneLabel ?? "Drag and drop it or click here to upload"
1097
1100
  })] }),
1098
- description: L ? h.uploadArchiveDropZoneDescription : h.uploadDropZoneDescription,
1099
- id: me,
1101
+ description: R ? h.uploadArchiveDropZoneDescription : h.uploadDropZoneDescription,
1102
+ id: pe,
1100
1103
  ariaLabel: h.uploadDropZoneAriaLabel ?? "Upload files",
1101
1104
  multiple: !0,
1102
- accept: L ? pt : void 0,
1103
- className: Te ? "border-error hover:border-error" : void 0,
1104
- onChange: Se,
1105
- onReject: L ? () => se(de) : void 0
1105
+ accept: R ? mt : void 0,
1106
+ className: Ee ? "border-error hover:border-error" : void 0,
1107
+ onChange: Ce,
1108
+ onReject: R ? () => P(de) : void 0
1106
1109
  }),
1107
- ce > 0 && /* @__PURE__ */ F(ae, { ariaLabel: h.uploadArchiveExtractingAriaLabel ?? "Reading archive" }),
1108
- /* @__PURE__ */ F("div", {
1110
+ ce > 0 && /* @__PURE__ */ I(oe, { ariaLabel: h.uploadArchiveExtractingAriaLabel ?? "Reading archive" }),
1111
+ /* @__PURE__ */ I("div", {
1109
1112
  role: "alert",
1110
- children: oe && /* @__PURE__ */ F(C, { text: oe })
1113
+ children: se && /* @__PURE__ */ I(T, { text: se })
1111
1114
  }),
1112
- /* @__PURE__ */ F("span", {
1115
+ /* @__PURE__ */ I("span", {
1113
1116
  role: "status",
1114
1117
  "aria-live": "polite",
1115
1118
  className: "sr-only",
1116
1119
  id: fe,
1117
- children: k.map((e) => `${h.uploadBatchErrorAriaPrefix ?? "Upload error: "}${e}`).join(" ")
1120
+ children: De.map((e) => `${h.uploadBatchErrorAriaPrefix ?? "Upload error: "}${e}`).join(" ")
1118
1121
  }),
1119
- k.map((e) => /* @__PURE__ */ F(C, { text: e }, e)),
1120
- g.length > 0 && /* @__PURE__ */ F("ul", {
1122
+ A.map((e) => /* @__PURE__ */ I(T, { text: e }, e)),
1123
+ g.length > 0 && /* @__PURE__ */ I("ul", {
1121
1124
  className: "flex flex-col gap-2",
1122
1125
  children: g.map((e) => {
1123
- let t = D.get(e.id), n = t?.kind === ut.Manifest, r = t?.status === dt.Invalid;
1124
- return /* @__PURE__ */ I("li", {
1126
+ let t = O.get(e.id), n = t?.kind === dt.Manifest, r = t?.status === ft.Invalid, i = r ? t?.error : void 0, a = `${he}${e.id}`;
1127
+ return /* @__PURE__ */ L("li", {
1125
1128
  className: "flex items-center gap-2 rounded-lg border border-tertiary p-2",
1126
- children: [/* @__PURE__ */ F(T, {
1129
+ children: [/* @__PURE__ */ I(D, {
1127
1130
  name: e.path,
1128
1131
  className: "min-w-0 flex-1",
1129
- details: /* @__PURE__ */ I(P, { children: [
1130
- /* @__PURE__ */ F("span", {
1132
+ details: /* @__PURE__ */ L(F, { children: [
1133
+ /* @__PURE__ */ I(v, {
1131
1134
  className: f,
1132
- children: s(e.file.size)
1135
+ text: s(e.file.size)
1136
+ }),
1137
+ /* @__PURE__ */ I(T, {
1138
+ id: a,
1139
+ text: i
1133
1140
  }),
1134
- r && t?.error && /* @__PURE__ */ F(C, { text: t.error }),
1135
- n && !r && /* @__PURE__ */ F("span", {
1141
+ n && !r && /* @__PURE__ */ I(v, {
1136
1142
  className: f,
1137
- children: h.uploadManifestRowNote ?? "Will replace this Skill's name, description, and instructions"
1143
+ text: h.uploadManifestRowNote ?? "Will replace this Skill's name, description, and instructions"
1138
1144
  }),
1139
- e.replacesExisting && !r && /* @__PURE__ */ F("span", {
1145
+ e.replacesExisting && !r && /* @__PURE__ */ I(v, {
1140
1146
  className: f,
1141
- children: h.uploadReplaceRowNote ?? "Will replace the existing file"
1147
+ text: h.uploadReplaceRowNote ?? "Will replace the existing file"
1142
1148
  })
1143
1149
  ] })
1144
- }), /* @__PURE__ */ F(ee, {
1145
- icon: /* @__PURE__ */ F(pe, {
1150
+ }), /* @__PURE__ */ I(ee, {
1151
+ icon: /* @__PURE__ */ I(me, {
1146
1152
  size: 16,
1147
1153
  "aria-hidden": !0,
1148
- stroke: y
1154
+ stroke: b
1149
1155
  }),
1150
1156
  "aria-label": h.uploadRemoveCandidateLabel?.(e.path) ?? `Remove ${e.path}`,
1151
- onClick: () => Ce(e.id)
1157
+ "aria-describedby": i ? a : void 0,
1158
+ onClick: () => we(e.id)
1152
1159
  })]
1153
1160
  }, e.id);
1154
1161
  })
1155
1162
  }),
1156
- j && /* @__PURE__ */ F(C, { text: j })
1163
+ /* @__PURE__ */ I("div", {
1164
+ role: "alert",
1165
+ children: ne && /* @__PURE__ */ I(T, { text: ne })
1166
+ })
1157
1167
  ]
1158
1168
  })
1159
1169
  });
1160
- }, vt = {
1170
+ }, bt = {
1161
1171
  title: "_title_5md1a_1",
1162
1172
  helperText: "_helperText_5md1a_5",
1163
1173
  refineFeedback: "_refineFeedback_5md1a_9",
1164
1174
  refineError: "_refineError_5md1a_13"
1165
- }, yt = {
1166
- mode: rt.Files,
1175
+ }, xt = {
1176
+ mode: it.Files,
1167
1177
  targetFolderPath: ""
1168
- }, bt = [G.Name, G.Description], xt = 24, St = 300, Ct = "pb-0 desktop:px-8 desktop:py-6", wt = "desktop:px-8 desktop:py-6", Tt = "gap-4 px-4 pt-5 pb-6 desktop:gap-5 desktop:px-8 desktop:py-6", Et = ge(async () => {
1169
- let { MarkdownEditor: e } = await xe();
1178
+ }, St = [G.Name, G.Description], Ct = 24, wt = 300, Tt = "pb-0 desktop:px-8 desktop:py-6", Et = "desktop:px-8 desktop:py-6", Dt = "gap-4 px-4 pt-5 pb-6 desktop:gap-5 desktop:px-8 desktop:py-6", Ot = _e(async () => {
1179
+ let { MarkdownEditor: e } = await Se();
1170
1180
  return { default: e };
1171
- }), Dt = ({ initialValues: r, files: i, selectedPath: s, onSelectedPathChange: u, expandedPaths: f, onExpandedPathsChange: p, isLoading: y = !1, hasLoadError: b = !1, isSubmitting: w = !1, errors: T, submitError: D, conflict: k, onReloadLatest: A, isNameReadOnly: te = !1, onDirtyChange: ne, onValuesChange: re, onRefineDescription: M, onRefineInstructions: ie, fileActions: N, supportingFileContent: oe, asideData: se, onSubmit: ce, onCancel: de, onBack: fe, backAriaLabel: ge, title: _e, onRetry: xe, onRetrySubmit: Se, labels: Ce, styles: we, dir: Te, instructionsEditorTheme: Ee = x.light }) => {
1172
- let [U, De] = H({
1181
+ }), kt = ({ initialValues: r, files: i, selectedPath: s, onSelectedPathChange: d, expandedPaths: p, onExpandedPathsChange: m, isLoading: x = !1, hasLoadError: E = !1, isSubmitting: D = !1, errors: k, submitError: j, conflict: M, onReloadLatest: te, isNameReadOnly: ne = !1, onDirtyChange: re, onValuesChange: ie, onRefineDescription: ae, onRefineInstructions: se, fileActions: P, supportingFileContent: ce, asideData: le, onSubmit: fe, onCancel: pe, onBack: _e, backAriaLabel: ve, title: Se, onRetry: Ce, onRetrySubmit: we, labels: Te, styles: Ee, dir: De, instructionsEditorTheme: Oe = S.light }) => {
1182
+ let [W, ke] = U({
1173
1183
  name: r?.name ?? "",
1174
1184
  description: r?.description ?? "",
1175
1185
  instructions: r?.instructions ?? ""
1176
- }), Oe = ve(), W = V(void 0), G = l({
1177
- bottomGap: xt,
1178
- minHeight: St
1179
- }), ke = V(U), Ae = (e) => {
1186
+ }), Ae = ye(), G = ye();
1187
+ u(() => document.getElementById(Ae), G, !!k?.instructions);
1188
+ let K = H(void 0), je = l({
1189
+ bottomGap: Ct,
1190
+ minHeight: wt
1191
+ }), Me = H(W), Ne = (e) => {
1180
1192
  let t = {
1181
- ...ke.current,
1193
+ ...Me.current,
1182
1194
  ...e
1183
1195
  };
1184
- ke.current = t, De(t), re?.(t);
1185
- }, je = (e) => e ? async (t, n) => {
1186
- if (W.current && !W.current.aborted) throw new DOMException("Busy", "AbortError");
1187
- W.current = n;
1196
+ Me.current = t, ke(t), ie?.(t);
1197
+ }, Pe = (e) => e ? async (t, n) => {
1198
+ if (K.current && !K.current.aborted) throw new DOMException("Busy", "AbortError");
1199
+ K.current = n;
1188
1200
  try {
1189
1201
  return await e(t, n);
1190
1202
  } finally {
1191
- W.current === n && (W.current = void 0);
1203
+ K.current === n && (K.current = void 0);
1192
1204
  }
1193
- } : void 0, Me = d({
1194
- value: U.description,
1195
- onChange: (e) => Ae({ description: e }),
1196
- onRefine: je(M),
1197
- disabled: w || y || b,
1205
+ } : void 0, Fe = f({
1206
+ value: W.description,
1207
+ onChange: (e) => Ne({ description: e }),
1208
+ onRefine: Pe(ae),
1209
+ disabled: D || x || E,
1198
1210
  resetKey: r
1199
- }), Ne = d({
1200
- value: U.instructions,
1201
- onChange: (e) => Ae({ instructions: e }),
1202
- onRefine: je(ie),
1203
- disabled: w || y || b,
1211
+ }), Ie = f({
1212
+ value: W.instructions,
1213
+ onChange: (e) => Ne({ instructions: e }),
1214
+ onRefine: Pe(se),
1215
+ disabled: D || x || E,
1204
1216
  resetKey: r
1205
- }), Pe = Me.isPending || Ne.isPending, Fe = () => {
1206
- Me.reset(), Ne.reset();
1207
- }, Ie = () => {
1208
- Fe(), de();
1209
- }, Le = () => {
1210
- Fe(), fe();
1211
- }, Be = () => {
1212
- w || y || b || W.current && !W.current.aborted || ce(U);
1213
- }, He = V(r), Ge = He.current !== r, Ke = V(i), [Je, Ye] = H(!1);
1214
- z(() => {
1215
- He.current = r;
1217
+ }), Le = Fe.isPending || Ie.isPending, Re = () => {
1218
+ Fe.reset(), Ie.reset();
1219
+ }, Ve = () => {
1220
+ Re(), pe();
1221
+ }, Ue = () => {
1222
+ Re(), _e();
1223
+ }, Ke = () => {
1224
+ D || x || E || K.current && !K.current.aborted || fe(W);
1225
+ }, qe = H(r), Ye = qe.current !== r, Xe = H(i), [Qe, $e] = U(!1);
1226
+ B(() => {
1227
+ qe.current = r;
1216
1228
  let e = {
1217
1229
  name: r?.name ?? "",
1218
1230
  description: r?.description ?? "",
1219
1231
  instructions: r?.instructions ?? ""
1220
1232
  };
1221
- ke.current = e, De(e), Ke.current = i, Ye(!1);
1233
+ Me.current = e, ke(e), Xe.current = i, $e(!1);
1222
1234
  }, [r]);
1223
- let Ze = (e) => JSON.stringify([...e].sort((e, t) => e.path.localeCompare(t.path))), Qe = V(!1);
1224
- z(() => {
1225
- if (Ge) return;
1235
+ let et = (e) => JSON.stringify([...e].sort((e, t) => e.path.localeCompare(t.path))), nt = H(!1);
1236
+ B(() => {
1237
+ if (Ye) return;
1226
1238
  let e = {
1227
1239
  name: r?.name ?? "",
1228
1240
  description: r?.description ?? "",
1229
1241
  instructions: r?.instructions ?? ""
1230
- }, t = JSON.stringify(U) !== JSON.stringify(e) || Ze(i) !== Ze(Ke.current) || Je;
1231
- t !== Qe.current && (Qe.current = t, ne?.(t));
1242
+ }, t = JSON.stringify(W) !== JSON.stringify(e) || et(i) !== et(Xe.current) || Qe;
1243
+ t !== nt.current && (nt.current = t, re?.(t));
1232
1244
  }, [
1233
- U,
1245
+ W,
1234
1246
  i,
1235
1247
  r,
1236
- Ge,
1237
- Je,
1238
- ne
1248
+ Ye,
1249
+ Qe,
1250
+ re
1239
1251
  ]);
1240
- let [$e, tt] = H(K), Y = s ?? $e, at = R((e) => {
1241
- tt(e), u?.(e);
1242
- }, [u]), [ct, ut] = H([]), dt = f ?? ct, X = B(() => new Set(dt), [dt]), ft = R((e) => {
1252
+ let [ot, st] = U(q), X = s ?? ot, dt = z((e) => {
1253
+ st(e), d?.(e);
1254
+ }, [d]), [ft, Z] = U([]), pt = p ?? ft, mt = V(() => new Set(pt), [pt]), ht = z((e) => {
1243
1255
  let t = [...e];
1244
- ut(t), p?.(t);
1245
- }, [p]), [pt, mt] = H(!1), [ht, gt] = H(yt), Z = R((e) => {
1246
- gt(e), mt(!0);
1247
- }, []), [Dt, Ot] = H(!1), { isDragActive: kt, dropZoneHandlers: At } = nt(R((e) => {
1248
- pt || Z({
1249
- ...yt,
1256
+ Z(t), m?.(t);
1257
+ }, [m]), [gt, _t] = U(!1), [vt, kt] = U(xt), At = z((e) => {
1258
+ kt(e), _t(!0);
1259
+ }, []), [jt, Mt] = U(!1), { isDragActive: Nt, dropZoneHandlers: Pt } = rt(z((e) => {
1260
+ gt || At({
1261
+ ...xt,
1250
1262
  initialFiles: e
1251
1263
  });
1252
- }, [pt, Z])), Q = Ce ?? {}, $ = we?.colors, jt = we?.typography ?? {}, Mt = jt.titleClassName ?? "dial-body-semi-text", Nt = jt.helperTextClassName ?? "dial-tiny-semi-text", Pt = jt.removeIconClassName, Ft = jt.menuIconClassName ?? "text-secondary", It = o({
1264
+ }, [gt, At])), Q = Te ?? {}, $ = Ee?.colors, Ft = Ee?.typography ?? {}, It = Ft.titleClassName ?? "dial-body-semi-text", Lt = Ft.helperTextClassName ?? "dial-tiny-semi-text", Rt = Ft.removeIconClassName, zt = Ft.menuIconClassName ?? "text-secondary", Bt = o({
1253
1265
  "--se-title-color": $?.title,
1254
1266
  "--se-helper-text-color": $?.helperText,
1255
1267
  "--se-refine-action-text": $?.refineActionText,
1256
1268
  "--se-refine-error-text": $?.refineErrorText,
1257
1269
  "--se-files-card-bg": $?.filesCardBackground,
1258
1270
  "--se-files-card-border": $?.filesCardBorder
1259
- }), Lt = {
1271
+ }), Vt = {
1260
1272
  footerBackground: $?.dialogFooterBackground,
1261
1273
  footerBorder: $?.dialogFooterBorder
1262
- }, Rt = {
1263
- feedbackClassName: c($?.refineActionText && vt.refineFeedback, jt.refineFeedbackClassName, Ue.refineFeedback),
1264
- errorClassName: vt.refineError
1265
- }, zt = {
1274
+ }, Ht = {
1275
+ feedbackClassName: c($?.refineActionText && bt.refineFeedback, Ft.refineFeedbackClassName, We.refineFeedback),
1276
+ errorClassName: bt.refineError
1277
+ }, Ut = {
1266
1278
  layout: $?.border ? { colors: {
1267
1279
  headerBorderColor: $.border,
1268
1280
  sidebarBorderColor: $.border
1269
1281
  } } : void 0,
1270
1282
  section: $?.title ? { colors: { titleColor: $.title } } : void 0
1271
- }, Bt = B(() => ({
1283
+ }, Wt = V(() => ({
1272
1284
  required: Q.folderNameRequiredError ?? "Enter a folder name",
1273
1285
  invalid: Q.folderNameInvalidError ?? "Folder name can't contain / or \\, or be . or ..",
1274
1286
  duplicate: Q.folderNameDuplicateError ?? "An item with this name already exists here"
@@ -1276,187 +1288,187 @@ var Ue = {
1276
1288
  Q.folderNameRequiredError,
1277
1289
  Q.folderNameInvalidError,
1278
1290
  Q.folderNameDuplicateError
1279
- ]), Vt = R((e) => {
1280
- X.has(e) || ft(/* @__PURE__ */ new Set([...X, e]));
1281
- }, [X, ft]), Ht = ht.targetFolderPath, Ut = B(() => ({
1282
- ...N,
1291
+ ]), Gt = z((e) => {
1292
+ mt.has(e) || ht(/* @__PURE__ */ new Set([...mt, e]));
1293
+ }, [mt, ht]), Kt = vt.targetFolderPath, qt = V(() => ({
1294
+ ...P,
1283
1295
  commitBatch: async (e) => {
1284
- let t = await N.commitBatch(e);
1285
- return !t.error && Ht !== "" && Vt(Ht), t;
1296
+ let t = await P.commitBatch(e);
1297
+ return !t.error && Kt !== "" && Gt(Kt), t;
1286
1298
  }
1287
1299
  }), [
1288
- N,
1289
- Ht,
1290
- Vt
1291
- ]), Wt = et({
1300
+ P,
1301
+ Kt,
1302
+ Gt
1303
+ ]), Jt = tt({
1292
1304
  files: i,
1293
- fileActions: N,
1305
+ fileActions: P,
1294
1306
  defaultName: Q.newFolderDefaultName ?? "New folder",
1295
- messages: Bt,
1296
- onRevealFolder: Vt,
1297
- onCreated: at
1298
- }), { draftNode: Gt, draftPath: Kt, draftPane: qt } = Wt, Jt = B(() => qe([{
1299
- path: K,
1300
- name: K,
1301
- kind: q.File
1302
- }, ...i]), [i]), Yt = B(() => Gt ? qe([
1307
+ messages: Wt,
1308
+ onRevealFolder: Gt,
1309
+ onCreated: dt
1310
+ }), { draftNode: Yt, draftPath: Xt, draftPane: Zt } = Jt, Qt = V(() => Je([{
1311
+ path: q,
1312
+ name: q,
1313
+ kind: J.File
1314
+ }, ...i]), [i]), $t = V(() => Yt ? Je([
1303
1315
  {
1304
- path: K,
1305
- name: K,
1306
- kind: q.File
1316
+ path: q,
1317
+ name: q,
1318
+ kind: J.File
1307
1319
  },
1308
1320
  ...i,
1309
- Gt
1310
- ]) : Jt, [
1321
+ Yt
1322
+ ]) : Qt, [
1311
1323
  i,
1312
- Gt,
1313
- Jt
1314
- ]), Xt = B(() => i.find((e) => e.path === Y), [i, Y]), Zt = R((e) => {
1315
- e.path !== Kt && at(e.path);
1316
- }, [at, Kt]), Qt = R((e) => {
1317
- N.onRemoveNode(e), Y === e && at(K);
1324
+ Yt,
1325
+ Qt
1326
+ ]), en = V(() => i.find((e) => e.path === X), [i, X]), tn = z((e) => {
1327
+ e.path !== Xt && dt(e.path);
1328
+ }, [dt, Xt]), nn = z((e) => {
1329
+ P.onRemoveNode(e), X === e && dt(q);
1318
1330
  }, [
1319
- N,
1320
- Y,
1321
- at
1322
- ]), { startDraft: $t } = Wt, { onCreateFolder: en, extractArchive: tn, pickFromFileSystem: nn } = N, [rn, an] = H(null), on = R((e, t) => {
1323
- t === J.Mobile ? an(e) : $t(e, t);
1324
- }, [$t]), sn = B(() => i.filter((e) => e.kind === q.File).map((e) => e.path), [i]), cn = R(async (e) => {
1325
- if (!nn) return;
1326
- let t = await nn();
1327
- t?.length && Z({
1328
- mode: rt.Files,
1331
+ P,
1332
+ X,
1333
+ dt
1334
+ ]), { startDraft: rn } = Jt, { onCreateFolder: an, extractArchive: on, pickFromFileSystem: sn } = P, [cn, ln] = U(null), un = z((e, t) => {
1335
+ t === Y.Mobile ? ln(e) : rn(e, t);
1336
+ }, [rn]), dn = V(() => i.filter((e) => e.kind === J.File).map((e) => e.path), [i]), fn = z(async (e) => {
1337
+ if (!sn) return;
1338
+ let t = await sn();
1339
+ t?.length && At({
1340
+ mode: it.Files,
1329
1341
  targetFolderPath: e,
1330
1342
  initialEntries: t
1331
1343
  });
1332
- }, [nn, Z]), ln = R((e, t) => {
1333
- let n = (e) => it(e, Ft), r = [];
1334
- return en && r.push({
1344
+ }, [sn, At]), pn = z((e, t) => {
1345
+ let n = (e) => at(e, zt), r = [];
1346
+ return an && r.push({
1335
1347
  key: "create-folder",
1336
1348
  label: Q.createFolderLabel ?? "Create folder",
1337
- icon: n(L),
1338
- onClick: () => on(e, t)
1349
+ icon: n(de),
1350
+ onClick: () => un(e, t)
1339
1351
  }), r.push({
1340
1352
  key: "upload-files",
1341
1353
  label: Q.uploadFilesLabel ?? "Upload files from device",
1342
- icon: n(me),
1343
- onClick: () => Z({
1344
- mode: rt.Files,
1354
+ icon: n(he),
1355
+ onClick: () => At({
1356
+ mode: it.Files,
1345
1357
  targetFolderPath: e
1346
1358
  })
1347
- }), tn && r.push({
1359
+ }), on && r.push({
1348
1360
  key: "upload-archive",
1349
1361
  label: Q.uploadArchiveLabel ?? "Upload archive from device",
1350
- icon: n(ue),
1351
- onClick: () => Z({
1352
- mode: rt.Archive,
1362
+ icon: n(R),
1363
+ onClick: () => At({
1364
+ mode: it.Archive,
1353
1365
  targetFolderPath: e
1354
1366
  })
1355
- }), nn && r.push({
1367
+ }), sn && r.push({
1356
1368
  key: "open-file-system",
1357
1369
  label: Q.openFileSystemLabel ?? "Open DIAL file system",
1358
- icon: n(le),
1359
- onClick: () => void cn(e)
1370
+ icon: n(ue),
1371
+ onClick: () => void fn(e)
1360
1372
  }), r;
1361
1373
  }, [
1362
- Ft,
1363
- en,
1364
- tn,
1365
- nn,
1374
+ zt,
1375
+ an,
1376
+ on,
1377
+ sn,
1366
1378
  Q.createFolderLabel,
1367
1379
  Q.uploadFilesLabel,
1368
1380
  Q.uploadArchiveLabel,
1369
1381
  Q.openFileSystemLabel,
1370
- on,
1371
- Z,
1372
- cn
1373
- ]), un = B(() => {
1374
- let e = Xe(We.Header, i.find((e) => e.path === Y));
1382
+ un,
1383
+ At,
1384
+ fn
1385
+ ]), mn = V(() => {
1386
+ let e = Ze(Ge.Header, i.find((e) => e.path === X));
1375
1387
  return {
1376
- [J.Mobile]: ln(e, J.Mobile),
1377
- [J.Desktop]: ln(e, J.Desktop)
1388
+ [Y.Mobile]: pn(e, Y.Mobile),
1389
+ [Y.Desktop]: pn(e, Y.Desktop)
1378
1390
  };
1379
1391
  }, [
1380
- ln,
1392
+ pn,
1381
1393
  i,
1382
- Y
1383
- ]), dn = R((e, t) => {
1384
- if (e.path === Kt || e.nodeType !== ye.FOLDER) return [];
1394
+ X
1395
+ ]), hn = z((e, t) => {
1396
+ if (e.path === Xt || e.nodeType !== be.FOLDER) return [];
1385
1397
  let n = {
1386
1398
  path: e.path,
1387
1399
  name: e.name,
1388
- kind: q.Folder
1389
- }, r = ln(Xe(We.Child, n), t);
1400
+ kind: J.Folder
1401
+ }, r = pn(Ze(Ge.Child, n), t);
1390
1402
  return r.push({
1391
1403
  key: "delete",
1392
1404
  label: Q.deleteLabel ?? "Delete",
1393
1405
  danger: !0,
1394
- icon: it(pe, Pt),
1395
- onClick: () => Qt(e.path)
1406
+ icon: at(me, Rt),
1407
+ onClick: () => nn(e.path)
1396
1408
  }), r;
1397
1409
  }, [
1398
- Kt,
1410
+ Xt,
1399
1411
  Q.deleteLabel,
1400
- Pt,
1401
- ln,
1402
- Qt
1403
- ]), fn = B(() => ({
1404
- [J.Mobile]: (e) => dn(e, J.Mobile),
1405
- [J.Desktop]: (e) => dn(e, J.Desktop)
1406
- }), [dn]), pn = R((e) => e.nodeType === ye.FOLDER || e.path === "SKILL.md" ? null : /* @__PURE__ */ F(ee, {
1407
- size: S.Small,
1408
- icon: it(pe, Pt, v.SM),
1412
+ Rt,
1413
+ pn,
1414
+ nn
1415
+ ]), gn = V(() => ({
1416
+ [Y.Mobile]: (e) => hn(e, Y.Mobile),
1417
+ [Y.Desktop]: (e) => hn(e, Y.Desktop)
1418
+ }), [hn]), _n = z((e) => e.nodeType === be.FOLDER || e.path === "SKILL.md" ? null : /* @__PURE__ */ I(ee, {
1419
+ size: C.Small,
1420
+ icon: at(me, Rt, y.SM),
1409
1421
  "aria-label": Q.deleteLabel ?? "Delete",
1410
- onClick: () => Qt(e.path)
1422
+ onClick: () => nn(e.path)
1411
1423
  }), [
1412
1424
  Q.deleteLabel,
1413
- Pt,
1414
- Qt
1415
- ]), mn = (e) => /* @__PURE__ */ I("div", {
1425
+ Rt,
1426
+ nn
1427
+ ]), vn = (e) => /* @__PURE__ */ L("div", {
1416
1428
  className: "flex flex-col gap-2 desktop:gap-5",
1417
- children: [/* @__PURE__ */ I("div", {
1429
+ children: [/* @__PURE__ */ L("div", {
1418
1430
  className: "flex items-center justify-between",
1419
- children: [/* @__PURE__ */ F("span", {
1420
- className: c(vt.title, Mt),
1431
+ children: [/* @__PURE__ */ I("span", {
1432
+ className: c(bt.title, It),
1421
1433
  children: Q.filesHeading ?? "Files"
1422
- }), /* @__PURE__ */ F(h, {
1434
+ }), /* @__PURE__ */ I(g, {
1423
1435
  label: Q.addLabel ?? "Add",
1424
- variant: g.Neutral,
1425
- appearance: m.Solid,
1426
- size: S.Small,
1427
- items: un[e]
1436
+ variant: _.Neutral,
1437
+ appearance: h.Solid,
1438
+ size: C.Small,
1439
+ items: mn[e]
1428
1440
  })]
1429
- }), /* @__PURE__ */ F("div", {
1441
+ }), /* @__PURE__ */ I("div", {
1430
1442
  role: "tree",
1431
1443
  "aria-label": Q.filesTreeAriaLabel ?? "Skill files",
1432
- children: /* @__PURE__ */ F(be, {
1433
- items: qt === e ? Yt : Jt,
1444
+ children: /* @__PURE__ */ I(xe, {
1445
+ items: Zt === e ? $t : Qt,
1434
1446
  showFiles: !0,
1435
- selectedPath: Y,
1436
- expandedPaths: X,
1437
- onExpandedPathsChange: ft,
1438
- onItemClick: Zt,
1439
- getContextMenuItems: fn[e],
1440
- renderItemActions: pn,
1441
- renamedPath: qt === e ? Kt : void 0,
1442
- onRenameSave: Wt.handleSave,
1443
- onRenameCancel: Wt.handleCancel,
1444
- onRenameValidate: Wt.handleValidate,
1447
+ selectedPath: X,
1448
+ expandedPaths: mt,
1449
+ onExpandedPathsChange: ht,
1450
+ onItemClick: tn,
1451
+ getContextMenuItems: gn[e],
1452
+ renderItemActions: _n,
1453
+ renamedPath: Zt === e ? Xt : void 0,
1454
+ onRenameSave: Jt.handleSave,
1455
+ onRenameCancel: Jt.handleCancel,
1456
+ onRenameValidate: Jt.handleValidate,
1445
1457
  rootItemPath: ""
1446
1458
  })
1447
1459
  })]
1448
- }), hn = B(() => ({
1449
- name: U.name,
1450
- description: U.description,
1460
+ }), yn = V(() => ({
1461
+ name: W.name,
1462
+ description: W.description,
1451
1463
  iconUrl: "",
1452
1464
  version: "",
1453
1465
  topics: [],
1454
1466
  otherLocales: []
1455
- }), [U.name, U.description]), gn = B(() => ({
1456
- name: T?.name,
1457
- description: T?.description
1458
- }), [T?.name, T?.description]), _n = B(() => ({ form: {
1459
- ...ze,
1467
+ }), [W.name, W.description]), bn = V(() => ({
1468
+ name: k?.name,
1469
+ description: k?.description
1470
+ }), [k?.name, k?.description]), xn = V(() => ({ form: {
1471
+ ...Be,
1460
1472
  name: {
1461
1473
  label: Q.nameLabel ?? "Name",
1462
1474
  placeholder: Q.namePlaceholder ?? "good-morning-breakfast"
@@ -1471,199 +1483,205 @@ var Ue = {
1471
1483
  Q.namePlaceholder,
1472
1484
  Q.descriptionLabel,
1473
1485
  Q.descriptionPlaceholder
1474
- ]), vn = (e) => {
1475
- e.name !== void 0 && Ae({ name: e.name }), e.description !== void 0 && (Me.reset(), Ae({ description: e.description }));
1476
- }, yn = M ? (e, t) => /* @__PURE__ */ F(a, {
1486
+ ]), Sn = (e) => {
1487
+ e.name !== void 0 && Ne({ name: e.name }), e.description !== void 0 && (Fe.reset(), Ne({ description: e.description }));
1488
+ }, Cn = ae ? (e, t) => /* @__PURE__ */ I(a, {
1477
1489
  isEnabled: !0,
1478
1490
  fieldId: t,
1479
1491
  required: !0,
1480
1492
  label: Q.descriptionLabel ?? "Description",
1481
1493
  labels: Q,
1482
- refinement: Me,
1483
- disabled: Pe || w,
1484
- ...Rt,
1494
+ refinement: Fe,
1495
+ disabled: Le || D,
1496
+ ...Ht,
1485
1497
  children: e
1486
- }) : void 0, bn = {
1487
- title: _e,
1488
- onBack: Le,
1489
- onCancel: Ie,
1490
- onSubmit: Be,
1498
+ }) : void 0, wn = {
1499
+ title: Se,
1500
+ onBack: Ue,
1501
+ onCancel: Ve,
1502
+ onSubmit: Ke,
1491
1503
  submitLabel: Q.createLabel ?? "Create",
1492
- isSubmitDisabled: Pe || y || b,
1504
+ isSubmitDisabled: Le || x || E,
1493
1505
  labels: {
1494
1506
  cancelLabel: Q.cancelLabel ?? "Cancel",
1495
- backAriaLabel: ge ?? "Back",
1507
+ backAriaLabel: ve ?? "Back",
1496
1508
  savingStatusLabel: Q.savingStatusLabel ?? "Saving"
1497
1509
  },
1498
- styles: zt,
1510
+ styles: Ut,
1499
1511
  metadataTitle: null
1500
1512
  };
1501
- if (y) return /* @__PURE__ */ F("div", {
1502
- dir: Te,
1513
+ if (x) return /* @__PURE__ */ I("div", {
1514
+ dir: De,
1503
1515
  className: "relative flex min-h-0 flex-1 flex-col",
1504
- children: /* @__PURE__ */ F(Re, {
1505
- ...bn,
1506
- metadata: /* @__PURE__ */ F("div", {
1516
+ children: /* @__PURE__ */ I(ze, {
1517
+ ...wn,
1518
+ metadata: /* @__PURE__ */ I("div", {
1507
1519
  role: "status",
1508
1520
  "aria-label": Q.loadingAriaLabel ?? "Loading skill",
1509
1521
  className: "flex flex-1 items-center justify-center p-8",
1510
- children: /* @__PURE__ */ F(ae, {})
1522
+ children: /* @__PURE__ */ I(oe, {})
1511
1523
  })
1512
1524
  })
1513
1525
  });
1514
- if (b) return /* @__PURE__ */ F("div", {
1515
- dir: Te,
1526
+ if (E) return /* @__PURE__ */ I("div", {
1527
+ dir: De,
1516
1528
  className: "relative flex min-h-0 flex-1 flex-col",
1517
- children: /* @__PURE__ */ F(Re, {
1518
- ...bn,
1529
+ children: /* @__PURE__ */ I(ze, {
1530
+ ...wn,
1519
1531
  metadata: /* @__PURE__ */ I("div", {
1520
- role: "alert",
1521
- className: "flex flex-col items-center gap-4 p-8",
1522
- children: [/* @__PURE__ */ F(C, { text: Q.loadErrorMessage ?? "Couldn't load this skill. Please try again." }), /* @__PURE__ */ F(j, {
1523
- label: Q.retryLabel ?? "Retry",
1524
- onClick: xe
1525
- })]
1532
+ className: "p-8",
1533
+ children: /* @__PURE__ */ I(w, {
1534
+ message: Q.loadErrorMessage ?? "Couldn't load this skill. Please try again.",
1535
+ iconStroke: b,
1536
+ action: /* @__PURE__ */ I(N, {
1537
+ label: Q.retryLabel ?? "Retry",
1538
+ onClick: Ce
1539
+ })
1540
+ })
1526
1541
  })
1527
1542
  })
1528
1543
  });
1529
- let xn = Y === K, Sn = xn ? K : Q.selectedFileHeading?.(Xt?.name ?? Y) ?? Xt?.name ?? Y, Cn = D != null || k != null ? /* @__PURE__ */ I("div", {
1544
+ let Tn = X === q, En = Tn ? q : Q.selectedFileHeading?.(en?.name ?? X) ?? en?.name ?? X, Dn = j != null || M != null ? /* @__PURE__ */ L("div", {
1530
1545
  className: "flex flex-col gap-2",
1531
- children: [D != null && /* @__PURE__ */ I("div", {
1546
+ children: [j != null && /* @__PURE__ */ L("div", {
1532
1547
  className: "flex items-center gap-2",
1533
- children: [/* @__PURE__ */ F(C, { text: D }), Se != null && /* @__PURE__ */ F(E, {
1548
+ children: [/* @__PURE__ */ I(T, { text: j }), we != null && /* @__PURE__ */ I(O, {
1534
1549
  label: Q.retryLabel ?? "Retry",
1535
- onClick: Se
1550
+ onClick: we
1536
1551
  })]
1537
- }), k != null && /* @__PURE__ */ I("div", {
1552
+ }), M != null && /* @__PURE__ */ L("div", {
1538
1553
  className: "flex items-center gap-2",
1539
- children: [/* @__PURE__ */ F(C, { text: k.message }), /* @__PURE__ */ F(E, {
1554
+ children: [/* @__PURE__ */ I(T, { text: M.message }), /* @__PURE__ */ I(O, {
1540
1555
  label: Q.reloadLatestLabel ?? "Reload latest",
1541
- onClick: A
1556
+ onClick: te
1542
1557
  })]
1543
1558
  })]
1544
- }) : void 0, wn = /* @__PURE__ */ F(a, {
1545
- isEnabled: !!ie,
1546
- fieldId: Oe,
1559
+ }) : void 0, On = /* @__PURE__ */ I(a, {
1560
+ isEnabled: !!se,
1561
+ fieldId: Ae,
1547
1562
  required: !0,
1548
- labelClassName: c(vt.helperText, Nt),
1563
+ labelClassName: c(bt.helperText, Lt),
1549
1564
  label: Q.instructionsLabel ?? "Instructions",
1550
1565
  labels: Q,
1551
- refinement: Ne,
1552
- disabled: Pe || w,
1553
- ...Rt,
1554
- children: /* @__PURE__ */ I("div", {
1566
+ refinement: Ie,
1567
+ disabled: Le || D,
1568
+ ...Ht,
1569
+ children: /* @__PURE__ */ L("div", {
1555
1570
  className: "flex flex-1 flex-col gap-2",
1556
1571
  children: [
1557
- !ie && /* @__PURE__ */ F(O, {
1558
- htmlFor: Oe,
1559
- className: c(vt.helperText, Nt),
1572
+ !se && /* @__PURE__ */ I(A, {
1573
+ htmlFor: Ae,
1574
+ className: c(bt.helperText, Lt),
1560
1575
  label: Q.instructionsLabel ?? "Instructions",
1561
1576
  required: !0
1562
1577
  }),
1563
- /* @__PURE__ */ F("div", {
1564
- ref: G,
1578
+ /* @__PURE__ */ I("div", {
1579
+ ref: je,
1565
1580
  className: c(t, e, n),
1566
- children: /* @__PURE__ */ F(he, {
1567
- fallback: /* @__PURE__ */ F(ae, { ariaLabel: Q.instructionsLoadingAriaLabel ?? "Loading" }),
1568
- children: /* @__PURE__ */ F(Et, {
1569
- id: Oe,
1581
+ children: /* @__PURE__ */ I(ge, {
1582
+ fallback: /* @__PURE__ */ I(oe, { ariaLabel: Q.instructionsLoadingAriaLabel ?? "Loading" }),
1583
+ children: /* @__PURE__ */ I(Ot, {
1584
+ id: Ae,
1570
1585
  ariaLabel: Q.instructionsLabel ?? "Instructions",
1571
- value: U.instructions,
1586
+ value: W.instructions,
1572
1587
  onChange: (e) => {
1573
- Ne.reset(), Ae({ instructions: e });
1588
+ Ie.reset(), Ne({ instructions: e });
1574
1589
  },
1575
- theme: Ee,
1590
+ theme: Oe,
1576
1591
  showDragbar: !1,
1577
1592
  placeholder: Q.instructionsPlaceholder ?? "Write the skill instructions in Markdown"
1578
1593
  })
1579
1594
  })
1580
1595
  }),
1581
- T?.instructions != null && /* @__PURE__ */ F(C, { text: T.instructions })
1596
+ k?.instructions != null && /* @__PURE__ */ I(T, {
1597
+ id: G,
1598
+ text: k.instructions
1599
+ })
1582
1600
  ]
1583
1601
  })
1584
1602
  });
1585
- return /* @__PURE__ */ I("div", {
1586
- dir: Te,
1587
- className: c("relative flex min-h-0 min-w-0 flex-1 flex-col", Ue.root),
1588
- style: It,
1589
- ...At,
1603
+ return /* @__PURE__ */ L("div", {
1604
+ dir: De,
1605
+ className: c("relative flex min-h-0 min-w-0 flex-1 flex-col", We.root),
1606
+ style: Bt,
1607
+ ...Pt,
1590
1608
  children: [
1591
- /* @__PURE__ */ F(st, {
1592
- isVisible: kt && !pt,
1593
- labels: Ce
1609
+ /* @__PURE__ */ I(lt, {
1610
+ isVisible: Nt && !gt,
1611
+ labels: Te
1594
1612
  }),
1595
- /* @__PURE__ */ F(Re, {
1596
- ...bn,
1597
- asideData: se,
1598
- asideSectionClassName: wt,
1599
- isSubmitting: w,
1600
- metadataSectionClassName: Ct,
1601
- metadata: /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F("div", {
1613
+ /* @__PURE__ */ I(ze, {
1614
+ ...wn,
1615
+ asideData: le,
1616
+ asideSectionClassName: Et,
1617
+ isSubmitting: D,
1618
+ metadataSectionClassName: Tt,
1619
+ metadata: /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I("div", {
1602
1620
  className: "desktop:hidden",
1603
- children: /* @__PURE__ */ F(lt, {
1621
+ children: /* @__PURE__ */ I(ut, {
1604
1622
  label: Q.editingFileLabel ?? "Editing file",
1605
- fileName: Xt?.name ?? "SKILL.md",
1606
- isExpanded: Dt,
1607
- onToggle: Ot,
1608
- labelClassName: jt.editingFileLabelClassName,
1609
- fileNameClassName: jt.editingFileNameClassName,
1610
- children: mn(J.Mobile)
1623
+ fileName: en?.name ?? "SKILL.md",
1624
+ isExpanded: jt,
1625
+ onToggle: Mt,
1626
+ labelClassName: Ft.editingFileLabelClassName,
1627
+ fileNameClassName: Ft.editingFileNameClassName,
1628
+ children: vn(Y.Mobile)
1611
1629
  })
1612
- }), /* @__PURE__ */ F("div", {
1630
+ }), /* @__PURE__ */ I("div", {
1613
1631
  className: "hidden desktop:block",
1614
- children: mn(J.Desktop)
1632
+ children: vn(Y.Desktop)
1615
1633
  })] }),
1616
- alert: Cn,
1617
- setupTitle: Sn,
1618
- setupSectionClassName: Tt,
1619
- setup: xn ? /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(Ve, {
1620
- values: hn,
1621
- errors: gn,
1622
- onChange: vn,
1623
- fields: bt,
1634
+ alert: Dn,
1635
+ setupTitle: En,
1636
+ setupSectionClassName: Dt,
1637
+ setup: Tn ? /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I(He, {
1638
+ values: yn,
1639
+ errors: bn,
1640
+ onChange: Sn,
1641
+ fields: St,
1624
1642
  isDescriptionRequired: !0,
1625
- isNameReadOnly: te,
1643
+ isNameReadOnly: ne,
1626
1644
  nameReadOnlyTooltip: Q.nameReadOnlyTooltip ?? "The skill name can't be changed after creation",
1627
- nameCaption: T?.name ? void 0 : Q.nameCaption ?? "Lowercase letters and hyphens only, no spaces. We'll reformat automatically if needed.",
1628
- renderDescription: yn,
1629
- labels: _n
1630
- }), wn] }) : /* @__PURE__ */ F(P, { children: Xt?.kind === q.File && /* @__PURE__ */ F("div", {
1645
+ nameCaption: k?.name ? void 0 : Q.nameCaption ?? "Lowercase letters and hyphens only, no spaces. We'll reformat automatically if needed.",
1646
+ renderDescription: Cn,
1647
+ labels: xn
1648
+ }), On] }) : /* @__PURE__ */ I(F, { children: en?.kind === J.File && /* @__PURE__ */ I("div", {
1631
1649
  className: "flex h-[max(320px,60dvh)] min-h-0 min-w-0 flex-none flex-col desktop:h-auto desktop:flex-1",
1632
- children: oe ?? /* @__PURE__ */ F(_, { text: Q.supportingFileNote ?? "This supporting file is included in the skill package as-is. Remove it from the Files panel to replace its content." })
1650
+ children: ce ?? /* @__PURE__ */ I(v, { text: Q.supportingFileNote ?? "This supporting file is included in the skill package as-is. Remove it from the Files panel to replace its content." })
1633
1651
  }) })
1634
1652
  }),
1635
- /* @__PURE__ */ F(_t, {
1636
- isOpen: pt,
1637
- onClose: () => mt(!1),
1638
- fileActions: Ut,
1639
- mode: ht.mode,
1640
- targetFolderPath: ht.targetFolderPath,
1641
- initialFiles: ht.initialFiles,
1642
- initialEntries: ht.initialEntries,
1643
- existingFilePaths: sn,
1653
+ /* @__PURE__ */ I(yt, {
1654
+ isOpen: gt,
1655
+ onClose: () => _t(!1),
1656
+ fileActions: qt,
1657
+ mode: vt.mode,
1658
+ targetFolderPath: vt.targetFolderPath,
1659
+ initialFiles: vt.initialFiles,
1660
+ initialEntries: vt.initialEntries,
1661
+ existingFilePaths: dn,
1644
1662
  onCommitted: (e) => {
1645
- e.some((e) => e.replacesExisting) && Ye(!0);
1663
+ e.some((e) => e.replacesExisting) && $e(!0);
1646
1664
  },
1647
- messageClassName: jt.uploadMessageClassName,
1648
- rowCaptionClassName: jt.uploadRowCaptionClassName,
1649
- labels: Ce,
1650
- dialogColors: Lt
1665
+ messageClassName: Ft.uploadMessageClassName,
1666
+ rowCaptionClassName: Ft.uploadRowCaptionClassName,
1667
+ labels: Te,
1668
+ dialogColors: Vt
1651
1669
  }),
1652
- /* @__PURE__ */ F(ot, {
1653
- isOpen: rn != null,
1654
- onClose: () => an(null),
1655
- validateName: (e) => Wt.validateNewFolder(e, rn ?? ""),
1656
- onCreate: (e) => Wt.createFolder(e, rn ?? ""),
1670
+ /* @__PURE__ */ I(ct, {
1671
+ isOpen: cn != null,
1672
+ onClose: () => ln(null),
1673
+ validateName: (e) => Jt.validateNewFolder(e, cn ?? ""),
1674
+ onCreate: (e) => Jt.createFolder(e, cn ?? ""),
1657
1675
  title: Q.createFolderLabel ?? "Create folder",
1658
1676
  nameLabel: Q.createFolderNameLabel ?? "Name",
1659
1677
  namePlaceholder: Q.createFolderNamePlaceholder ?? "Enter folder name",
1660
1678
  createLabel: Q.createFolderConfirmLabel ?? "Create",
1661
1679
  cancelLabel: Q.cancelLabel ?? "Cancel",
1662
1680
  closeAriaLabel: Q.createFolderCloseAriaLabel ?? "Close",
1663
- dialogColors: Lt
1681
+ dialogColors: Vt
1664
1682
  })
1665
1683
  ]
1666
1684
  });
1667
1685
  };
1668
1686
  //#endregion
1669
- export { Ue as SKILL_EDITOR_CLASS, Dt as SkillEditor, ut as SkillFileCandidateKind, q as SkillFileNodeKind, rt as SkillFileUploadMode, dt as SkillFileValidationStatus };
1687
+ export { We as SKILL_EDITOR_CLASS, kt as SkillEditor, dt as SkillFileCandidateKind, J as SkillFileNodeKind, it as SkillFileUploadMode, ft as SkillFileValidationStatus };