@epam/ai-dial-skill-editor 1.3.1 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.css +1 -1
  2. package/index.js +408 -420
  3. package/package.json +8 -4
package/index.js CHANGED
@@ -1,16 +1,10 @@
1
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, Breadcrumbs as h, ButtonAppearance as g, ButtonDropdown as _, ButtonVariant as v, CaptionText as y, DIAL_ICON_SIZE as b, DIAL_KIT_ICON_STROKE as x, DangerIconButton as S, DialItemType as C, EditorThemes as w, ElementSize as T, ErrorMessageNotification as E, ErrorText as D, FileDropzone as O, FileName as k, GhostButton as A, GhostIconButton as ee, Input as j, Label as te, LinkButton as ne, LiveRegion as re, LiveRegionElement as ie, LiveRegionPoliteness as M, NeutralButton as ae, NoDataContent as oe, Popup as N, PopupSize as se, PrimaryButton as ce, RadioGroup as le, ResizeHandle as ue, Select as de, Spinner as fe, TagInput as pe, Textarea as me, TextareaResize as he } 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 ge, IconDatabase as L, IconFileZip as _e, IconFolderPlus as ve, IconPhoto as ye, IconPlus as be, IconTrashX as xe, IconUpload as Se } from "@tabler/icons-react";
2
+ import { Accordion as p, BottomSheet as m, Breadcrumbs as h, ButtonAppearance as g, ButtonDropdown as _, ButtonVariant as v, CaptionText as y, DIAL_ICON_SIZE as b, DIAL_KIT_ICON_STROKE as x, DangerIconButton as S, DialItemType as C, EditorThemes as w, ElementSize as T, ErrorMessageNotification as ee, ErrorText as E, FileDropzone as D, FileName as O, GhostButton as k, GhostIconButton as te, Input as A, Label as ne, LinkButton as re, LiveRegion as ie, LiveRegionElement as ae, LiveRegionPoliteness as j, NeutralButton as oe, NoDataContent as se, Popup as M, PopupSize as ce, PrimaryButton as le, RadioGroup as ue, ResizeHandle as de, Select as fe, Spinner as pe, TagInput as me, Textarea as he, TextareaResize as ge } from "@epam/ai-dial-ui-kit";
3
+ import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
4
+ import { IconArrowNarrowLeft as I, IconDatabase as L, IconFileZip as _e, IconFolderPlus as ve, IconPhoto as ye, IconPlus as be, IconTrashX as xe, IconUpload as Se } from "@tabler/icons-react";
5
5
  import { Suspense as Ce, lazy as we, memo as Te, useCallback as R, useEffect as Ee, useId as De, useMemo as z, useRef as B, useState as V } from "react";
6
6
  import { DialFileNodeType as Oe, DialFoldersTree as ke } from "@epam/ai-dial-react-file-manager";
7
7
  import { LazyMarkdownEditor as Ae } from "@epam/ai-dial-ui-kit/editors";
8
- c("flex flex-col desktop:min-h-0 desktop:overflow-y-auto", {
9
- body: "_body_1xd7h_2",
10
- sideColumn: "_sideColumn_1xd7h_6",
11
- reservedColumn: "_reservedColumn_1xd7h_10"
12
- }.sideColumn);
13
- //#endregion
14
8
  //#region ../builder-form/src/constants/public-class-names.ts
15
9
  var H = {
16
10
  layout: "dial-builder-form-layout",
@@ -26,10 +20,10 @@ var H = {
26
20
  "--es-border-color": n?.colors?.borderColor,
27
21
  "--es-title-color": n?.colors?.titleColor
28
22
  });
29
- return /* @__PURE__ */ I("section", {
23
+ return /* @__PURE__ */ F("section", {
30
24
  className: c("flex h-full flex-col gap-4 rounded border", je.section, r, H.section),
31
25
  style: i,
32
- children: [e != null && /* @__PURE__ */ F("h2", {
26
+ children: [e != null && /* @__PURE__ */ P("h2", {
33
27
  className: c(n?.typography?.titleClassName ?? "dial-h3-text", je.title),
34
28
  children: e
35
29
  }), t]
@@ -46,34 +40,34 @@ var H = {
46
40
  min: S,
47
41
  max: C,
48
42
  containerWidth: _
49
- }, T = y ? Ne(l.width, w) : void 0, E = Ne(C ?? 640, w);
43
+ }, T = y ? Ne(l.width, w) : void 0, ee = Ne(C ?? 640, w);
50
44
  Ee(() => {
51
45
  let e = g.current;
52
46
  if (!y || e == null || typeof ResizeObserver > "u") return;
53
47
  let t = new ResizeObserver(() => v(e.clientWidth));
54
48
  return t.observe(e), () => t.disconnect();
55
49
  }, [y]);
56
- let D = o({
50
+ let E = o({
57
51
  "--el-header-border-color": f?.colors?.headerBorderColor,
58
52
  "--el-sidebar-border-color": f?.colors?.sidebarBorderColor
59
53
  });
60
- return /* @__PURE__ */ I("div", {
54
+ return /* @__PURE__ */ F("div", {
61
55
  dir: p,
62
56
  className: c("flex min-h-0 flex-1 flex-col", H.layout),
63
- style: D,
57
+ style: E,
64
58
  children: [
65
- /* @__PURE__ */ F(re, {
59
+ /* @__PURE__ */ P(ie, {
66
60
  visuallyHidden: !0,
67
- as: ie.Span,
61
+ as: ae.Span,
68
62
  id: m,
69
63
  children: h
70
64
  }),
71
- /* @__PURE__ */ I("div", {
65
+ /* @__PURE__ */ F("div", {
72
66
  className: c("flex items-center justify-between gap-2 border-b px-4 py-2 desktop:px-8 desktop:pt-3 desktop:pb-3", U.headerBorder),
73
- children: [/* @__PURE__ */ I("div", {
67
+ children: [/* @__PURE__ */ F("div", {
74
68
  className: "flex min-w-0 flex-1 items-center gap-2",
75
- children: [/* @__PURE__ */ F(ee, {
76
- icon: /* @__PURE__ */ F(ge, {
69
+ children: [/* @__PURE__ */ P(te, {
70
+ icon: /* @__PURE__ */ P(I, {
77
71
  size: b.LG,
78
72
  stroke: x,
79
73
  "aria-hidden": !0,
@@ -81,47 +75,47 @@ var H = {
81
75
  }),
82
76
  "aria-label": n,
83
77
  onClick: t
84
- }), /* @__PURE__ */ F("h1", {
78
+ }), /* @__PURE__ */ P("h1", {
85
79
  className: c(f?.typography?.titleClassName ?? "dial-h2-text", "min-w-0 truncate"),
86
80
  children: e
87
81
  })]
88
- }), r != null && /* @__PURE__ */ F("div", {
82
+ }), r != null && /* @__PURE__ */ P("div", {
89
83
  className: "hidden shrink-0 items-center gap-2 desktop:flex",
90
84
  children: r
91
85
  })]
92
86
  }),
93
- /* @__PURE__ */ I("div", {
87
+ /* @__PURE__ */ F("div", {
94
88
  ref: g,
95
89
  className: "flex flex-1 flex-col overflow-y-auto desktop:flex-row desktop:overflow-hidden",
96
90
  children: [
97
- /* @__PURE__ */ F("div", {
91
+ /* @__PURE__ */ P("div", {
98
92
  className: c(a == null ? "desktop:flex-1" : "desktop:shrink-0 desktop:overflow-y-auto desktop:border-e", a != null && !y && "desktop:w-[400px]", y && "desktop:relative desktop:w-(--el-left-width)", "desktop:overflow-y-auto", a == null ? void 0 : U.columnBorder),
99
93
  style: T == null ? void 0 : { "--el-left-width": `${T}px` },
100
94
  children: i
101
95
  }),
102
- y && T != null && /* @__PURE__ */ F("div", {
96
+ y && T != null && /* @__PURE__ */ P("div", {
103
97
  className: "relative hidden w-0 shrink-0 desktop:block",
104
- children: /* @__PURE__ */ F(ue, {
98
+ children: /* @__PURE__ */ P(de, {
105
99
  width: T,
106
100
  minWidth: S ?? 280,
107
- maxWidth: E,
101
+ maxWidth: ee,
108
102
  defaultWidth: l.defaultWidth ?? 400,
109
103
  onWidthChange: l.onWidthChange,
110
104
  label: d?.resizeHandleLabel ?? "Resize columns",
111
105
  tooltip: d?.resizeHandleTooltip ?? "Drag to resize"
112
106
  })
113
107
  }),
114
- a != null && /* @__PURE__ */ F("div", {
108
+ a != null && /* @__PURE__ */ P("div", {
115
109
  className: "desktop:flex desktop:min-h-0 desktop:flex-1 desktop:flex-col desktop:overflow-y-auto",
116
110
  children: a
117
111
  }),
118
- s != null && /* @__PURE__ */ F("div", {
112
+ s != null && /* @__PURE__ */ P("div", {
119
113
  className: c("desktop:w-[400px] desktop:shrink-0 desktop:overflow-y-auto desktop:border-s", U.columnBorder),
120
114
  children: s
121
115
  })
122
116
  ]
123
117
  }),
124
- r != null && /* @__PURE__ */ F("div", {
118
+ r != null && /* @__PURE__ */ P("div", {
125
119
  className: c("flex shrink-0 flex-row-reverse items-center gap-2 border-t px-4 py-2 *:flex-1 desktop:hidden", U.footerBorder),
126
120
  children: r
127
121
  })
@@ -138,28 +132,28 @@ var H = {
138
132
  "--aa-icon": l?.colors?.placeholderIconColor,
139
133
  "--aa-caption": l?.colors?.captionColor
140
134
  });
141
- return /* @__PURE__ */ I("div", {
135
+ return /* @__PURE__ */ F("div", {
142
136
  className: c("flex flex-col gap-2", u),
143
137
  style: d,
144
- children: [/* @__PURE__ */ F(te, { label: e }), /* @__PURE__ */ I("div", {
138
+ children: [/* @__PURE__ */ P(ne, { label: e }), /* @__PURE__ */ F("div", {
145
139
  className: "flex items-start gap-3",
146
- children: [/* @__PURE__ */ F("div", {
140
+ children: [/* @__PURE__ */ P("div", {
147
141
  className: c("flex h-16 w-16 shrink-0 items-center justify-center overflow-hidden rounded-lg border", Fe.box),
148
- children: t ? /* @__PURE__ */ F("img", {
142
+ children: t ? /* @__PURE__ */ P("img", {
149
143
  src: t,
150
144
  alt: n,
151
145
  className: "h-16 w-16 object-cover"
152
- }) : /* @__PURE__ */ F(ye, {
146
+ }) : /* @__PURE__ */ P(ye, {
153
147
  size: b.LG,
154
148
  stroke: x,
155
149
  "aria-hidden": !0,
156
150
  className: Fe.icon
157
151
  })
158
- }), /* @__PURE__ */ I("div", {
152
+ }), /* @__PURE__ */ F("div", {
159
153
  className: "flex flex-col gap-3",
160
- children: [/* @__PURE__ */ F(A, {
154
+ children: [/* @__PURE__ */ P(k, {
161
155
  size: T.Small,
162
- iconBefore: /* @__PURE__ */ F(be, {
156
+ iconBefore: /* @__PURE__ */ P(be, {
163
157
  size: b.SM,
164
158
  stroke: x,
165
159
  "aria-hidden": !0
@@ -167,7 +161,7 @@ var H = {
167
161
  className: "w-fit",
168
162
  label: r,
169
163
  onClick: a
170
- }), /* @__PURE__ */ F("span", {
164
+ }), /* @__PURE__ */ P("span", {
171
165
  className: c(s, Fe.caption),
172
166
  children: i
173
167
  })]
@@ -178,18 +172,18 @@ var H = {
178
172
  confirmText: "_confirmText_19ec1_1",
179
173
  confirmItem: "_confirmItem_19ec1_5"
180
174
  }, Re = ({ isOpen: e, onClose: t, onAttach: n, bucket: r, FileManagerModal: i, allowedMimeTypes: a, maxFileSizeBytes: s, labels: l, confirmBodyClassName: u = "dial-small-text", styles: d }) => {
181
- let f = d?.colors?.confirmText, p = d?.colors?.confirmItemText, m = R((e) => e.length === 1 ? l.deleteConfirmTitleSingle : l.deleteConfirmTitleMultiple, [l.deleteConfirmTitleSingle, l.deleteConfirmTitleMultiple]), h = R((e) => /* @__PURE__ */ F("div", {
175
+ let f = d?.colors?.confirmText, p = d?.colors?.confirmItemText, m = R((e) => e.length === 1 ? l.deleteConfirmTitleSingle : l.deleteConfirmTitleMultiple, [l.deleteConfirmTitleSingle, l.deleteConfirmTitleMultiple]), h = R((e) => /* @__PURE__ */ P("div", {
182
176
  className: c(u, "px-6 py-3"),
183
177
  style: o({
184
178
  "--apm-confirm-text": f,
185
179
  "--apm-confirm-item-text": p
186
180
  }),
187
- children: /* @__PURE__ */ F("p", {
181
+ children: /* @__PURE__ */ P("p", {
188
182
  className: c("mb-3", Le.confirmText),
189
- children: e.length === 1 ? /* @__PURE__ */ I(P, { children: [
183
+ children: e.length === 1 ? /* @__PURE__ */ F(N, { children: [
190
184
  l.deleteConfirmSingleText,
191
185
  " ",
192
- /* @__PURE__ */ I("span", {
186
+ /* @__PURE__ */ F("span", {
193
187
  className: c("wrap-break-word", Le.confirmItem),
194
188
  children: [
195
189
  "\"",
@@ -197,10 +191,10 @@ var H = {
197
191
  "\"?"
198
192
  ]
199
193
  })
200
- ] }) : /* @__PURE__ */ I(P, { children: [
194
+ ] }) : /* @__PURE__ */ F(N, { children: [
201
195
  l.deleteConfirmMultipleText,
202
196
  " ",
203
- /* @__PURE__ */ I("span", {
197
+ /* @__PURE__ */ F("span", {
204
198
  className: Le.confirmItem,
205
199
  children: [
206
200
  e.length,
@@ -218,9 +212,9 @@ var H = {
218
212
  p,
219
213
  u
220
214
  ]);
221
- return /* @__PURE__ */ F(Ce, {
215
+ return /* @__PURE__ */ P(Ce, {
222
216
  fallback: null,
223
- children: e && /* @__PURE__ */ F(i, {
217
+ children: e && /* @__PURE__ */ P(i, {
224
218
  isOpen: e,
225
219
  onClose: t,
226
220
  onAttach: n,
@@ -272,28 +266,28 @@ var H = {
272
266
  let f = o({
273
267
  "--dlf-summary-text": d?.summaryText,
274
268
  "--dlf-row-label-text": d?.rowLabelText
275
- }), { summaryLabel: p, addLabel: m, editLabel: h, popupTitle: _, addLocaleLabel: y, localeRowLabel: C = "Locale", languageLabel: w, nameLabel: E, namePlaceholder: D, descriptionLabel: O, descriptionPlaceholder: k, deleteAriaLabel: A, cancelLabel: ee = "Cancel", saveLabel: te = "Save" } = a, [re, ie] = V(!1), [M, ae] = V([]), oe = B(0);
269
+ }), { summaryLabel: p, addLabel: m, editLabel: h, popupTitle: _, addLocaleLabel: y, localeRowLabel: C = "Locale", languageLabel: w, nameLabel: ee, namePlaceholder: E, descriptionLabel: D, descriptionPlaceholder: O, deleteAriaLabel: k, cancelLabel: te = "Cancel", saveLabel: ne = "Save" } = a, [ie, ae] = V(!1), [j, oe] = V([]), se = B(0);
276
270
  Ee(() => {
277
- re && ae(e.length > 0 ? e : [Ve(`locale-row-${++oe.current}`, /* @__PURE__ */ new Set(), n)]);
271
+ ie && oe(e.length > 0 ? e : [Ve(`locale-row-${++se.current}`, /* @__PURE__ */ new Set(), n)]);
278
272
  }, [
279
- re,
273
+ ie,
280
274
  e,
281
275
  n
282
276
  ]);
283
- let se = () => ie(!0), ce = () => ie(!1), le = () => {
284
- t(M.filter((e) => e.language && e.name)), ie(!1);
285
- }, ue = () => {
286
- let e = new Set(M.map((e) => e.language).filter(Boolean));
287
- ae((t) => [...t, Ve(`locale-row-${++oe.current}`, e, n)]);
288
- }, fe = (e, t) => {
289
- ae((n) => n.map((n) => n.id === e ? {
277
+ let ce = () => ae(!0), le = () => ae(!1), ue = () => {
278
+ t(j.filter((e) => e.language && e.name)), ae(!1);
279
+ }, de = () => {
280
+ let e = new Set(j.map((e) => e.language).filter(Boolean));
281
+ oe((t) => [...t, Ve(`locale-row-${++se.current}`, e, n)]);
282
+ }, pe = (e, t) => {
283
+ oe((n) => n.map((n) => n.id === e ? {
290
284
  ...n,
291
285
  ...t
292
286
  } : n));
293
- }, pe = (e) => {
294
- ae((t) => t.filter((t) => t.id !== e));
295
- }, P = new Set(n.map((e) => e.code)), ge = (e) => e !== "" && !P.has(e), L = e.some((e) => ge(e.language)), _e = new Set(M.map((e) => e.language).filter((e) => P.has(e))).size, ve = (t, r) => {
296
- let a = e.find((e) => e.id === t.id)?.language, o = [...new Set([a ?? "", t.language].filter(ge))];
287
+ }, me = (e) => {
288
+ oe((t) => t.filter((t) => t.id !== e));
289
+ }, N = new Set(n.map((e) => e.code)), I = (e) => e !== "" && !N.has(e), L = e.some((e) => I(e.language)), _e = new Set(j.map((e) => e.language).filter((e) => N.has(e))).size, ve = (t, r) => {
290
+ let a = e.find((e) => e.id === t.id)?.language, o = [...new Set([a ?? "", t.language].filter(I))];
297
291
  return [...n.map((e) => ({
298
292
  value: e.code,
299
293
  label: e.label,
@@ -303,72 +297,72 @@ var H = {
303
297
  label: i(e),
304
298
  disabled: r.has(e)
305
299
  }))];
306
- }, ye = M.some((e) => !e.language || !e.name);
307
- return n.length === 0 && !L ? null : /* @__PURE__ */ I("div", {
300
+ }, ye = j.some((e) => !e.language || !e.name);
301
+ return n.length === 0 && !L ? null : /* @__PURE__ */ F("div", {
308
302
  className: c("flex items-center gap-2", s),
309
303
  style: f,
310
304
  children: [
311
- e.length > 0 && /* @__PURE__ */ F("span", {
305
+ e.length > 0 && /* @__PURE__ */ P("span", {
312
306
  className: c(Be.summary, l),
313
307
  children: `${p}: ${e.map((e) => `[${e.language.toUpperCase()}]`).join(", ")}`
314
308
  }),
315
- /* @__PURE__ */ F(ne, {
309
+ /* @__PURE__ */ P(re, {
316
310
  label: e.length > 0 ? h : m,
317
- iconBefore: /* @__PURE__ */ F(be, {
311
+ iconBefore: /* @__PURE__ */ P(be, {
318
312
  size: b.SM,
319
313
  "aria-hidden": !0,
320
314
  stroke: x
321
315
  }),
322
316
  className: "px-0!",
323
- onClick: se
317
+ onClick: ce
324
318
  }),
325
- /* @__PURE__ */ F(N, {
326
- open: re,
319
+ /* @__PURE__ */ P(M, {
320
+ open: ie,
327
321
  header: _,
328
- onClose: ce,
322
+ onClose: le,
329
323
  mainButtons: [{
330
- label: ee,
331
- onClick: ce
332
- }, {
333
324
  label: te,
325
+ onClick: le
326
+ }, {
327
+ label: ne,
334
328
  variant: v.Primary,
335
329
  disabled: ye,
336
- onClick: le
330
+ onClick: ue
337
331
  }],
338
- children: /* @__PURE__ */ I("div", {
332
+ children: /* @__PURE__ */ F("div", {
339
333
  className: "flex flex-col gap-8 px-6 py-3",
340
334
  style: f,
341
- children: [M.map((e, t) => {
342
- let n = new Set(M.filter((t) => t.id !== e.id).map((e) => e.language).filter(Boolean));
343
- return /* @__PURE__ */ I("div", {
335
+ children: [j.map((e, t) => {
336
+ let n = new Set(j.filter((t) => t.id !== e.id).map((e) => e.language).filter(Boolean));
337
+ return /* @__PURE__ */ F("div", {
344
338
  className: "flex flex-col gap-2",
345
- children: [/* @__PURE__ */ I("div", {
339
+ children: [/* @__PURE__ */ F("div", {
346
340
  className: "flex items-center justify-between",
347
- children: [/* @__PURE__ */ I("span", {
341
+ children: [/* @__PURE__ */ F("span", {
348
342
  className: c(Be.rowLabel, u),
349
343
  children: [
350
344
  C,
351
345
  " ",
352
346
  t + 1
353
347
  ]
354
- }), /* @__PURE__ */ F(S, {
348
+ }), /* @__PURE__ */ P(S, {
355
349
  appearance: g.Ghost,
356
350
  size: T.Small,
357
- icon: /* @__PURE__ */ F(xe, {
351
+ icon: /* @__PURE__ */ P(xe, {
358
352
  size: b.SM,
359
353
  "aria-hidden": !0,
360
354
  stroke: x
361
355
  }),
362
- "aria-label": `${A} ${t + 1}`,
363
- onClick: () => pe(e.id)
356
+ "aria-label": `${k} ${t + 1}`,
357
+ onClick: () => me(e.id)
364
358
  })]
365
- }), /* @__PURE__ */ I("div", {
359
+ }), /* @__PURE__ */ F("div", {
366
360
  role: "group",
367
361
  "aria-label": `${C} ${t + 1}`,
368
362
  className: "flex flex-col gap-5",
369
- children: [/* @__PURE__ */ I("div", {
363
+ children: [/* @__PURE__ */ F("div", {
370
364
  className: "flex flex-col gap-5 desktop:flex-row desktop:items-start",
371
- children: [/* @__PURE__ */ F(de, {
365
+ children: [/* @__PURE__ */ P(fe, {
372
366
  id: `${e.id}-language`,
373
367
  labelProps: {
374
368
  label: w,
@@ -377,39 +371,39 @@ var H = {
377
371
  className: "desktop:shrink-0 desktop:basis-40",
378
372
  options: ve(e, n),
379
373
  value: e.language,
380
- onChange: (t) => fe(e.id, { language: t })
381
- }), /* @__PURE__ */ F(j, {
374
+ onChange: (t) => pe(e.id, { language: t })
375
+ }), /* @__PURE__ */ P(A, {
382
376
  id: `${e.id}-name`,
383
377
  containerClassName: "min-w-0 flex-1",
384
378
  required: !0,
385
379
  value: e.name,
386
- onChange: (t) => fe(e.id, { name: t ?? "" }),
380
+ onChange: (t) => pe(e.id, { name: t ?? "" }),
387
381
  labelProps: {
388
- label: E,
382
+ label: ee,
389
383
  required: !0
390
384
  },
391
- placeholder: D
385
+ placeholder: E
392
386
  })]
393
- }), /* @__PURE__ */ F(me, {
387
+ }), /* @__PURE__ */ P(he, {
394
388
  id: `${e.id}-description`,
395
389
  className: r,
396
- resize: he.Vertical,
390
+ resize: ge.Vertical,
397
391
  value: e.description,
398
- onChange: (t) => fe(e.id, { description: t }),
399
- labelProps: { label: O },
400
- placeholder: k
392
+ onChange: (t) => pe(e.id, { description: t }),
393
+ labelProps: { label: D },
394
+ placeholder: O
401
395
  })]
402
396
  })]
403
397
  }, e.id);
404
- }), /* @__PURE__ */ F(ne, {
398
+ }), /* @__PURE__ */ P(re, {
405
399
  label: y,
406
- iconBefore: /* @__PURE__ */ F(be, {
400
+ iconBefore: /* @__PURE__ */ P(be, {
407
401
  size: b.SM,
408
402
  "aria-hidden": !0,
409
403
  stroke: x
410
404
  }),
411
405
  className: "self-start",
412
- onClick: ue,
406
+ onClick: de,
413
407
  disabled: _e >= n.length
414
408
  })]
415
409
  })
@@ -417,22 +411,22 @@ var H = {
417
411
  ]
418
412
  });
419
413
  }, We = "Add tags, comma separated", Ge = "The version is changed with \"Save as new version\"", Ke = "deployment-creation-form-description", qe = ({ values: e, errors: t, onChange: n, onNameBlur: a, onVersionBlur: o, iconPreviewUrl: s, onAddAvatarClick: l, labels: u, styles: d, availableLocaleOptions: f = [], formatLocaleLabel: p, fields: m = ze, isNameReadOnly: h = !1, nameReadOnlyTooltip: g, isVersionReadOnly: _ = !1, versionReadOnlyTooltip: v = Ge, nameCaption: y, isDescriptionRequired: b = !1, descriptionCaption: x, renderDescription: S, focusRequestKey: C }) => {
420
- let w = B(null), T = B(null), E = B(null), D = B(!1), O = (e) => m.includes(e), k = O(W.Name), A = O(W.Version), ee = !!(t.name || t.version || t.description), te = B(C);
414
+ let w = B(null), T = B(null), ee = B(null), E = B(!1), D = (e) => m.includes(e), O = D(W.Name), k = D(W.Version), te = !!(t.name || t.version || t.description), ne = B(C);
421
415
  Ee(() => {
422
416
  let e = () => {
423
- t.name ? w.current?.focus() : t.version ? T.current?.focus() : t.description && E.current?.focus();
417
+ t.name ? w.current?.focus() : t.version ? T.current?.focus() : t.description && ee.current?.focus();
424
418
  };
425
- C === void 0 ? (ee && !D.current && e(), D.current = ee) : C !== te.current && (te.current = C, e());
419
+ C === void 0 ? (te && !E.current && e(), E.current = te) : C !== ne.current && (ne.current = C, e());
426
420
  }, [
427
421
  C,
428
- ee,
422
+ te,
429
423
  t.name,
430
424
  t.version,
431
425
  t.description
432
426
  ]);
433
- let ne = /* @__PURE__ */ F(me, {
427
+ let re = /* @__PURE__ */ P(he, {
434
428
  id: Ke,
435
- ref: E,
429
+ ref: ee,
436
430
  value: e.description,
437
431
  onChange: (e) => n({ description: e }),
438
432
  "aria-required": b || void 0,
@@ -446,14 +440,14 @@ var H = {
446
440
  invalid: !!t.description,
447
441
  containerClassName: S ? void 0 : d?.field,
448
442
  className: r,
449
- resize: he.Vertical
443
+ resize: ge.Vertical
450
444
  });
451
- return /* @__PURE__ */ I("div", {
445
+ return /* @__PURE__ */ F("div", {
452
446
  role: u.ariaLabel ? "group" : void 0,
453
447
  "aria-label": u.ariaLabel,
454
448
  className: c("flex flex-col gap-4", d?.root),
455
449
  children: [
456
- O(W.Avatar) && /* @__PURE__ */ F(Ie, {
450
+ D(W.Avatar) && /* @__PURE__ */ P(Ie, {
457
451
  label: u.iconUrl.label,
458
452
  avatarUrl: s,
459
453
  addAvatarLabel: u.iconUrl.addAvatarLabel,
@@ -461,9 +455,9 @@ var H = {
461
455
  onAddAvatarClick: l,
462
456
  className: d?.field
463
457
  }),
464
- (k || A) && /* @__PURE__ */ I("div", {
458
+ (O || k) && /* @__PURE__ */ F("div", {
465
459
  className: c("flex items-start gap-4", d?.field),
466
- children: [k && /* @__PURE__ */ F(j, {
460
+ children: [O && /* @__PURE__ */ P(A, {
467
461
  id: "deployment-creation-form-name",
468
462
  inputRef: w,
469
463
  value: e.name,
@@ -479,8 +473,8 @@ var H = {
479
473
  caption: y,
480
474
  error: t.name || void 0,
481
475
  invalid: !!t.name,
482
- containerClassName: A ? "min-w-0 basis-0 grow-[2]" : "min-w-0 flex-1"
483
- }), A && /* @__PURE__ */ F(j, {
476
+ containerClassName: k ? "min-w-0 basis-0 grow-[2]" : "min-w-0 flex-1"
477
+ }), k && /* @__PURE__ */ P(A, {
484
478
  id: "deployment-creation-form-version",
485
479
  inputRef: T,
486
480
  value: e.version,
@@ -494,14 +488,14 @@ var H = {
494
488
  placeholder: u.version.placeholder,
495
489
  error: t.version || void 0,
496
490
  invalid: !!t.version,
497
- containerClassName: k ? "min-w-0 basis-0 grow-[1]" : "min-w-0 flex-1"
491
+ containerClassName: O ? "min-w-0 basis-0 grow-[1]" : "min-w-0 flex-1"
498
492
  })]
499
493
  }),
500
- O(W.Description) && (S ? /* @__PURE__ */ F("div", {
494
+ D(W.Description) && (S ? /* @__PURE__ */ P("div", {
501
495
  className: d?.field,
502
- children: S(ne, Ke)
503
- }) : ne),
504
- O(W.Locales) && /* @__PURE__ */ F(Ue, {
496
+ children: S(re, Ke)
497
+ }) : re),
498
+ D(W.Locales) && /* @__PURE__ */ P(Ue, {
505
499
  value: e.otherLocales,
506
500
  onChange: (e) => n({ otherLocales: e }),
507
501
  availableLocaleOptions: f,
@@ -510,9 +504,9 @@ var H = {
510
504
  className: d?.field,
511
505
  colors: d?.localesColors
512
506
  }),
513
- O(W.Tags) && /* @__PURE__ */ F("div", {
507
+ D(W.Tags) && /* @__PURE__ */ P("div", {
514
508
  className: d?.field,
515
- children: /* @__PURE__ */ F(pe, {
509
+ children: /* @__PURE__ */ P(me, {
516
510
  id: "deployment-creation-form-topics",
517
511
  labelProps: { label: u.topics.label },
518
512
  placeholder: u.topics.placeholder ?? We,
@@ -524,12 +518,12 @@ var H = {
524
518
  ]
525
519
  });
526
520
  }, Je = "border-0 p-4 desktop:p-8", Ye = "border-0", Xe = "desktop:flex-1", Ze = "px-4 pt-4 desktop:px-6 desktop:pt-6", Qe = Te(({ 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, hasSetupSectionPadding: S = !0, labels: C, styles: w, dir: T }) => {
527
- let E = /* @__PURE__ */ F(re, {
528
- politeness: M.Assertive,
521
+ let ee = /* @__PURE__ */ P(ie, {
522
+ politeness: j.Assertive,
529
523
  className: v == null ? void 0 : Ze,
530
524
  children: v
531
- }), D = p != null;
532
- return /* @__PURE__ */ F(Pe, {
525
+ }), E = p != null;
526
+ return /* @__PURE__ */ P(Pe, {
533
527
  title: e,
534
528
  onBack: t,
535
529
  backAriaLabel: C?.backAriaLabel ?? "Back",
@@ -540,7 +534,7 @@ var H = {
540
534
  resizeHandleLabel: C?.resizeHandleLabel,
541
535
  resizeHandleTooltip: C?.resizeHandleTooltip
542
536
  },
543
- rightContent: h == null ? void 0 : /* @__PURE__ */ F(Me, {
537
+ rightContent: h == null ? void 0 : /* @__PURE__ */ P(Me, {
544
538
  title: g,
545
539
  styles: w?.section,
546
540
  className: c(Je, _, H.asideSection),
@@ -548,18 +542,18 @@ var H = {
548
542
  }),
549
543
  styles: w?.layout,
550
544
  dir: T,
551
- actions: /* @__PURE__ */ I(P, { children: [s, !l && /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(ae, {
545
+ actions: /* @__PURE__ */ F(N, { children: [s, !l && /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(oe, {
552
546
  label: C?.cancelLabel ?? "Cancel",
553
547
  disabled: a,
554
548
  onClick: n
555
- }), /* @__PURE__ */ F(ce, {
549
+ }), /* @__PURE__ */ P(le, {
556
550
  label: i,
557
551
  disabled: a || o,
558
552
  onClick: r
559
553
  })] })] }),
560
- leftContent: /* @__PURE__ */ I(P, { children: [
561
- !D && E,
562
- /* @__PURE__ */ F(Me, {
554
+ leftContent: /* @__PURE__ */ F(N, { children: [
555
+ !E && ee,
556
+ /* @__PURE__ */ P(Me, {
563
557
  title: d === null ? void 0 : d ?? C?.metadataTitle ?? "Metadata",
564
558
  styles: w?.section,
565
559
  className: c(Je, b, H.metadataSection),
@@ -567,7 +561,7 @@ var H = {
567
561
  }),
568
562
  f
569
563
  ] }),
570
- centerContent: D ? /* @__PURE__ */ I(P, { children: [E, /* @__PURE__ */ F(Me, {
564
+ centerContent: E ? /* @__PURE__ */ F(N, { children: [ee, /* @__PURE__ */ P(Me, {
571
565
  title: m === null ? void 0 : m ?? C?.setupTitle ?? "Setup",
572
566
  styles: w?.section,
573
567
  className: c(S ? Je : Ye, Xe, x, H.setupSection),
@@ -638,11 +632,11 @@ var H = {
638
632
  deleteConfirmLabel: "Delete",
639
633
  deleteCancelLabel: "Cancel"
640
634
  }, tt = Te(({ values: e, errors: t, onChange: n, onNameBlur: r, onVersionBlur: i, avatarPicker: a, availableLocaleOptions: o, formatLocaleLabel: s, fields: c = ze, isNameReadOnly: l, nameReadOnlyTooltip: u, isVersionReadOnly: d, versionReadOnlyTooltip: f, nameCaption: p, isDescriptionRequired: m, descriptionCaption: h, renderDescription: g, focusRequestKey: _, labels: v }) => {
641
- let [y, b] = V(!1), x = z(() => a ? c : c.filter((e) => e !== W.Avatar), [a, c]), S = e.iconUrl, C = a?.resolveIconUrl, w = z(() => C ? C(S) : void 0, [S, C]), T = R(() => b(!0), []), E = R(() => b(!1), []), D = a?.resolveAttachedIconUrl, O = R((e) => {
642
- let t = D?.(e);
635
+ let [y, b] = V(!1), x = z(() => a ? c : c.filter((e) => e !== W.Avatar), [a, c]), S = e.iconUrl, C = a?.resolveIconUrl, w = z(() => C ? C(S) : void 0, [S, C]), T = R(() => b(!0), []), ee = R(() => b(!1), []), E = a?.resolveAttachedIconUrl, D = R((e) => {
636
+ let t = E?.(e);
643
637
  t && n({ iconUrl: t }), b(!1);
644
- }, [n, D]);
645
- return /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(qe, {
638
+ }, [n, E]);
639
+ return /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(qe, {
646
640
  values: e,
647
641
  errors: t,
648
642
  onChange: n,
@@ -663,30 +657,24 @@ var H = {
663
657
  descriptionCaption: h,
664
658
  renderDescription: g,
665
659
  focusRequestKey: _
666
- }), a && /* @__PURE__ */ F(Re, {
660
+ }), a && /* @__PURE__ */ P(Re, {
667
661
  isOpen: y,
668
- onClose: E,
669
- onAttach: O,
662
+ onClose: ee,
663
+ onAttach: D,
670
664
  bucket: a.bucket,
671
665
  FileManagerModal: a.FileManagerModal,
672
666
  allowedMimeTypes: a.allowedMimeTypes,
673
667
  maxFileSizeBytes: a.maxFileSizeBytes,
674
668
  labels: v?.avatarPicker ?? et
675
669
  })] });
676
- }), G = /* @__PURE__ */ function(e) {
677
- return e.Required = "required", e.InvalidFormat = "invalid-format", e.TooLong = "too-long", e.ControlCharacters = "control-characters", e;
678
- }({});
679
- G.TooLong, G.ControlCharacters;
680
- //#endregion
681
- //#region src/constants/public-class-names.ts
682
- var nt = {
670
+ }), nt = {
683
671
  root: "dial-skill-editor-root",
684
672
  refineFeedback: "dial-skill-editor-refine-feedback"
685
- }, K = "SKILL.md", q = /* @__PURE__ */ function(e) {
673
+ }, G = "SKILL.md", K = /* @__PURE__ */ function(e) {
686
674
  return e.File = "file", e.Folder = "folder", e;
687
675
  }({}), rt = /* @__PURE__ */ function(e) {
688
676
  return e.Header = "header", e.Child = "child", e;
689
- }({}), J = (e) => {
677
+ }({}), q = (e) => {
690
678
  let t = e.lastIndexOf("/");
691
679
  return t === -1 ? null : e.slice(0, t);
692
680
  }, it = (e) => {
@@ -700,22 +688,22 @@ var nt = {
700
688
  path: e,
701
689
  name: it(e),
702
690
  nodeType: Oe.FOLDER,
703
- parentPath: J(e),
691
+ parentPath: q(e),
704
692
  folderId: e,
705
693
  items: []
706
694
  };
707
695
  return t.set(e, r), r;
708
696
  };
709
- for (let r of e) r.kind === q.Folder ? n(r.path).name = r.name : t.set(r.path, {
697
+ for (let r of e) r.kind === K.Folder ? n(r.path).name = r.name : t.set(r.path, {
710
698
  path: r.path,
711
699
  name: r.name,
712
700
  nodeType: Oe.ITEM,
713
- parentPath: J(r.path),
714
- folderId: J(r.path) ?? ""
701
+ parentPath: q(r.path),
702
+ folderId: q(r.path) ?? ""
715
703
  });
716
704
  for (let t of [...e]) {
717
- let e = J(t.path);
718
- for (; e != null;) n(e), e = J(e);
705
+ let e = q(t.path);
706
+ for (; e != null;) n(e), e = q(e);
719
707
  }
720
708
  let r = [];
721
709
  for (let e of t.values()) {
@@ -735,7 +723,7 @@ var nt = {
735
723
  if (!t) return "";
736
724
  switch (e) {
737
725
  case rt.Child: return t.path;
738
- case rt.Header: return t.kind === q.Folder ? t.path : "";
726
+ case rt.Header: return t.kind === K.Folder ? t.path : "";
739
727
  }
740
728
  }, lt = (e, t) => new Set(dt(e, t).map((e) => e.name)), ut = (e, t, n) => {
741
729
  let r = e.trim();
@@ -746,7 +734,7 @@ var nt = {
746
734
  let n = t ? `${t}/` : "", r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
747
735
  for (let a of e) {
748
736
  if (!a.path.startsWith(n) || a.path === t) continue;
749
- let e = a.path.slice(n.length), o = e.indexOf("/"), s = o === -1, c = s ? e : e.slice(0, o), l = `${n}${c}`, u = s && a.kind === q.File ? q.File : q.Folder;
737
+ let e = a.path.slice(n.length), o = e.indexOf("/"), s = o === -1, c = s ? e : e.slice(0, o), l = `${n}${c}`, u = s && a.kind === K.File ? K.File : K.Folder;
750
738
  if (r.has(l) || r.set(l, {
751
739
  path: l,
752
740
  name: c,
@@ -760,7 +748,7 @@ var nt = {
760
748
  return [...r.values()].map((e) => ({
761
749
  ...e,
762
750
  childCount: i.get(e.path)?.size ?? 0
763
- })).sort((e, t) => e.kind === t.kind ? e.name.localeCompare(t.name) : e.kind === q.Folder ? -1 : 1);
751
+ })).sort((e, t) => e.kind === t.kind ? e.name.localeCompare(t.name) : e.kind === K.Folder ? -1 : 1);
764
752
  }, ft = (e) => {
765
753
  let t = e.split("/").slice(0, -1);
766
754
  return t.map((e, n) => t.slice(0, n + 1).join("/"));
@@ -768,10 +756,10 @@ var nt = {
768
756
  let [o, s] = V(null), c = o?.parentPath ?? null, l = B([]), u = c == null ? void 0 : ot(c, pt), d = z(() => u == null ? void 0 : {
769
757
  path: u,
770
758
  name: n,
771
- kind: q.Folder
759
+ kind: K.Folder
772
760
  }, [u, n]), f = R((n, i) => {
773
761
  let a = lt(e, i);
774
- return i === "" && a.add(K), ut(n, a, r) ?? t.validateFolderPath?.(ot(i, n.trim()));
762
+ return i === "" && a.add(G), ut(n, a, r) ?? t.validateFolderPath?.(ot(i, n.trim()));
775
763
  }, [
776
764
  e,
777
765
  r,
@@ -846,16 +834,16 @@ var nt = {
846
834
  };
847
835
  }, _t = /* @__PURE__ */ function(e) {
848
836
  return e.Files = "files", e.Archive = "archive", e;
849
- }({}), Y = /* @__PURE__ */ function(e) {
837
+ }({}), J = /* @__PURE__ */ function(e) {
850
838
  return e.Mobile = "mobile", e.Desktop = "desktop", e;
851
- }({}), vt = (e, t, n = b.MD, r) => /* @__PURE__ */ F(e, {
839
+ }({}), vt = (e, t, n = b.MD, r) => /* @__PURE__ */ P(e, {
852
840
  size: n,
853
841
  className: t,
854
842
  style: r,
855
843
  "aria-hidden": !0,
856
844
  stroke: x
857
845
  }), yt = { footer: "_footer_hn1ri_7" }, bt = ({ 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: h }) => {
858
- let _ = d(), y = f ? /* @__PURE__ */ F(fe, {
846
+ let _ = d(), y = f ? /* @__PURE__ */ P(pe, {
859
847
  size: 16,
860
848
  ariaLabel: ""
861
849
  }) : void 0;
@@ -864,21 +852,21 @@ var nt = {
864
852
  "--se-dialog-footer-bg": h?.footerBackground,
865
853
  "--se-dialog-footer-border": h?.footerBorder
866
854
  });
867
- return /* @__PURE__ */ I(m, {
855
+ return /* @__PURE__ */ F(m, {
868
856
  open: e,
869
857
  title: t,
870
858
  closeAriaLabel: n,
871
859
  onClose: r,
872
- children: [p, /* @__PURE__ */ I("div", {
860
+ children: [p, /* @__PURE__ */ F("div", {
873
861
  className: c("sticky bottom-0 flex gap-3 border-t p-4", yt.footer),
874
862
  style: d,
875
- children: [/* @__PURE__ */ F(ce, {
863
+ children: [/* @__PURE__ */ P(le, {
876
864
  className: "flex-1",
877
865
  label: i,
878
866
  iconBefore: y,
879
867
  disabled: u,
880
868
  onClick: a
881
- }), /* @__PURE__ */ F(ae, {
869
+ }), /* @__PURE__ */ P(oe, {
882
870
  className: "flex-1",
883
871
  label: s,
884
872
  onClick: l
@@ -886,10 +874,10 @@ var nt = {
886
874
  })]
887
875
  });
888
876
  }
889
- return /* @__PURE__ */ F(N, {
877
+ return /* @__PURE__ */ P(M, {
890
878
  open: e,
891
879
  header: t,
892
- size: se.Sm,
880
+ size: ce.Sm,
893
881
  closeAriaLabel: n,
894
882
  onClose: r,
895
883
  mainButtons: [{
@@ -914,7 +902,7 @@ var nt = {
914
902
  let g = m ? n(f) : void 0, _ = () => {
915
903
  h(!0), n(f) ?? (r(f), t());
916
904
  };
917
- return /* @__PURE__ */ F(bt, {
905
+ return /* @__PURE__ */ P(bt, {
918
906
  isOpen: e,
919
907
  title: i,
920
908
  closeAriaLabel: l,
@@ -924,12 +912,12 @@ var nt = {
924
912
  cancelLabel: c,
925
913
  onCancel: t,
926
914
  colors: u,
927
- children: /* @__PURE__ */ F("form", {
915
+ children: /* @__PURE__ */ P("form", {
928
916
  className: "px-4 py-4 desktop:px-6",
929
917
  onSubmit: (e) => {
930
918
  e.preventDefault(), _();
931
919
  },
932
- children: /* @__PURE__ */ F(j, {
920
+ children: /* @__PURE__ */ P(A, {
933
921
  id: d,
934
922
  labelProps: {
935
923
  label: a,
@@ -945,69 +933,69 @@ var nt = {
945
933
  })
946
934
  });
947
935
  }, St = { icon: "_icon_1p1f5_1" }, Ct = ({ isVisible: e, labels: t, titleClassName: n = "dial-h3-text", subtitleClassName: r = "dial-small-text" }) => {
948
- let i = t ?? {}, a = i.dropOverlayTitle ?? "Upload files", o = i.dropOverlaySubtitle ?? "Drop files here to add them to this skill", s = /* @__PURE__ */ F(re, {
936
+ let i = t ?? {}, a = i.dropOverlayTitle ?? "Upload files", o = i.dropOverlaySubtitle ?? "Drop files here to add them to this skill", s = /* @__PURE__ */ P(ie, {
949
937
  visuallyHidden: !0,
950
- as: ie.Span,
938
+ as: ae.Span,
951
939
  children: e ? `${a}. ${o}` : ""
952
940
  });
953
- return e ? /* @__PURE__ */ I(P, { children: [s, /* @__PURE__ */ F("div", {
941
+ return e ? /* @__PURE__ */ F(N, { children: [s, /* @__PURE__ */ P("div", {
954
942
  className: c("pointer-events-none absolute inset-0 z-100 flex items-center justify-center backdrop-blur-sm"),
955
- children: /* @__PURE__ */ I("div", {
943
+ children: /* @__PURE__ */ F("div", {
956
944
  "aria-hidden": !0,
957
945
  className: "flex flex-col items-center text-center",
958
946
  children: [
959
- /* @__PURE__ */ F(Se, {
947
+ /* @__PURE__ */ P(Se, {
960
948
  size: 100,
961
949
  className: St.icon,
962
950
  "aria-hidden": !0,
963
951
  stroke: x
964
952
  }),
965
- /* @__PURE__ */ F("span", {
953
+ /* @__PURE__ */ P("span", {
966
954
  className: c("mt-5", n),
967
955
  children: a
968
956
  }),
969
- /* @__PURE__ */ F("span", {
957
+ /* @__PURE__ */ P("span", {
970
958
  className: c("mt-4", r),
971
959
  children: o
972
960
  })
973
961
  ]
974
962
  })
975
963
  })] }) : s;
976
- }, wt = {
964
+ }, Y = {
977
965
  card: "_card_1tr87_2",
978
966
  label: "_label_1tr87_7",
979
967
  fileName: "_fileName_1tr87_11",
980
968
  header: "_header_1tr87_16"
981
- }, Tt = ({ label: e, fileName: t, isExpanded: n, onToggle: r, children: i, labelClassName: a = "dial-tiny-lead-text", fileNameClassName: o = "dial-small-text" }) => /* @__PURE__ */ F(p, {
969
+ }, wt = ({ label: e, fileName: t, isExpanded: n, onToggle: r, children: i, labelClassName: a = "dial-tiny-lead-text", fileNameClassName: o = "dial-small-text" }) => /* @__PURE__ */ P(p, {
982
970
  expanded: n,
983
971
  onToggle: r,
984
- title: /* @__PURE__ */ F("span", {
985
- className: c("block", wt.label, a),
972
+ title: /* @__PURE__ */ P("span", {
973
+ className: c("block", Y.label, a),
986
974
  children: e
987
975
  }),
988
- description: /* @__PURE__ */ F(k, {
976
+ description: /* @__PURE__ */ P(O, {
989
977
  name: t,
990
- nameClassName: c(wt.fileName, o)
978
+ nameClassName: c(Y.fileName, o)
991
979
  }),
992
- className: c("rounded-lg border py-0 shadow-xs", wt.card),
993
- 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", wt.header),
980
+ className: c("rounded-lg border py-0 shadow-xs", Y.card),
981
+ 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", Y.header),
994
982
  contentClassName: "max-h-[416px] overflow-y-auto pt-4 pb-2 ps-3 pe-2",
995
983
  children: i
996
- }), Et = /* @__PURE__ */ function(e) {
984
+ }), Tt = /* @__PURE__ */ function(e) {
997
985
  return e.SupportingFile = "supporting-file", e.Manifest = "manifest", e;
998
- }({}), Dt = /* @__PURE__ */ function(e) {
986
+ }({}), Et = /* @__PURE__ */ function(e) {
999
987
  return e.Valid = "valid", e.Invalid = "invalid", e;
1000
988
  }({}), X = /* @__PURE__ */ function(e) {
1001
989
  return e.Replace = "replace", e.Duplicate = "duplicate", e;
1002
- }({}), Z = (e) => (e.webkitRelativePath || e.name).replace(/\\/g, "/"), Q = {
990
+ }({}), Dt = (e) => (e.webkitRelativePath || e.name).replace(/\\/g, "/"), Z = {
1003
991
  invalidDropZone: "_invalidDropZone_j9j9q_1",
1004
992
  row: "_row_j9j9q_5"
1005
- }, $ = ".zip,application/zip", Ot = [], kt = 0, At = () => `skill-file-candidate-${++kt}`, jt = (e, t, n) => ({
1006
- id: At(),
993
+ }, Q = ".zip,application/zip", $ = [], Ot = 0, kt = () => `skill-file-candidate-${++Ot}`, At = (e, t, n) => ({
994
+ id: kt(),
1007
995
  file: e,
1008
996
  path: ot(n, t.replace(/\\/g, "/"))
1009
- }), Mt = ({ isOpen: e, onClose: t, fileActions: n, mode: r = _t.Files, targetFolderPath: i = "", initialFiles: a, initialEntries: l, existingFilePaths: u = Ot, onCommitted: d, messageClassName: f = "dial-small-text", rowCaptionClassName: p, labels: m, dialogColors: h, colors: g }) => {
1010
- let _ = m ?? {}, [v, b] = V([]), [S, C] = V([]), [w, T] = V(X.Replace), E = z(() => new Set(u), [u]), [A, j] = V(/* @__PURE__ */ new Map()), [te, ne] = V([]), [ae, oe] = V(!1), [N, se] = V(), [ce, ue] = V(!1), [de, pe] = V(), [me, he] = V(0), ge = B(0), L = r === _t.Archive, _e = _.uploadArchiveErrorMessage ?? "Couldn't read this archive", ve = De(), ye = De(), be = De(), Se = B(null), Ce = B(!1), we = S[0]?.id;
997
+ }), jt = ({ isOpen: e, onClose: t, fileActions: n, mode: r = _t.Files, targetFolderPath: i = "", initialFiles: a, initialEntries: l, existingFilePaths: u = $, onCommitted: d, messageClassName: f = "dial-small-text", rowCaptionClassName: p, labels: m, dialogColors: h, colors: g }) => {
998
+ let _ = m ?? {}, [v, b] = V([]), [S, C] = V([]), [w, T] = V(X.Replace), ee = z(() => new Set(u), [u]), [k, A] = V(/* @__PURE__ */ new Map()), [ne, re] = V([]), [oe, se] = V(!1), [M, ce] = V(), [le, de] = V(!1), [fe, me] = V(), [he, ge] = V(0), I = B(0), L = r === _t.Archive, _e = _.uploadArchiveErrorMessage ?? "Couldn't read this archive", ve = De(), ye = De(), be = De(), Se = B(null), Ce = B(!1), we = S[0]?.id;
1011
999
  Ee(() => {
1012
1000
  e && (we == null ? Ce.current && (Ce.current = !1, document.getElementById(ye)?.focus()) : (Ce.current = !0, Se.current?.focus()));
1013
1001
  }, [
@@ -1015,11 +1003,11 @@ var nt = {
1015
1003
  e,
1016
1004
  ye
1017
1005
  ]);
1018
- let Te = (e) => e.path !== "SKILL.md" && E.has(e.path), R = (e) => {
1019
- se(void 0), b((t) => [...t, ...e.filter((e) => !Te(e))]), C((t) => [...t, ...e.filter(Te)]);
1006
+ let Te = (e) => e.path !== "SKILL.md" && ee.has(e.path), R = (e) => {
1007
+ ce(void 0), b((t) => [...t, ...e.filter((e) => !Te(e))]), C((t) => [...t, ...e.filter(Te)]);
1020
1008
  }, Oe = (e) => {
1021
1009
  let [t, ...n] = S;
1022
- t && (C(n), T(X.Replace), e != null && (se(void 0), b((r) => {
1010
+ t && (C(n), T(X.Replace), e != null && (ce(void 0), b((r) => {
1023
1011
  if (e === X.Replace) return [...r, {
1024
1012
  ...t,
1025
1013
  replacesExisting: !0
@@ -1037,66 +1025,66 @@ var nt = {
1037
1025
  }, ke = async (e) => {
1038
1026
  let { extractArchive: t } = n;
1039
1027
  if (!t) return;
1040
- let r = ge.current;
1041
- pe(void 0), he((e) => e + 1);
1028
+ let r = I.current;
1029
+ me(void 0), ge((e) => e + 1);
1042
1030
  try {
1043
1031
  let n = await Promise.all(e.map((e) => t(e)));
1044
- if (r !== ge.current) return;
1032
+ if (r !== I.current) return;
1045
1033
  let a = n.flat();
1046
1034
  if (a.length === 0) {
1047
- pe(_.uploadArchiveEmptyMessage ?? "This archive has no files");
1035
+ me(_.uploadArchiveEmptyMessage ?? "This archive has no files");
1048
1036
  return;
1049
1037
  }
1050
- R(a.map((e) => jt(e.file, e.path, i)));
1038
+ R(a.map((e) => At(e.file, e.path, i)));
1051
1039
  } catch {
1052
- if (r !== ge.current) return;
1053
- pe(_e);
1040
+ if (r !== I.current) return;
1041
+ me(_e);
1054
1042
  } finally {
1055
- r === ge.current && he((e) => e - 1);
1043
+ r === I.current && ge((e) => e - 1);
1056
1044
  }
1057
1045
  }, Ae = (e) => {
1058
- L ? ke(e) : R(e.map((e) => jt(e, Z(e), i)));
1046
+ L ? ke(e) : R(e.map((e) => At(e, Dt(e), i)));
1059
1047
  }, H = (e) => {
1060
1048
  b((t) => t.filter((t) => t.id !== e));
1061
1049
  };
1062
1050
  Ee(() => {
1063
1051
  if (!e) return;
1064
- ge.current += 1;
1065
- let t = [...(a ?? []).map((e) => jt(e, Z(e), i)), ...(l ?? []).map((e) => jt(e.file, e.path, i))];
1066
- b(t.filter((e) => !Te(e))), C(t.filter(Te)), T(X.Replace), j(/* @__PURE__ */ new Map()), ne([]), se(void 0), pe(void 0), he(0);
1052
+ I.current += 1;
1053
+ let t = [...(a ?? []).map((e) => At(e, Dt(e), i)), ...(l ?? []).map((e) => At(e.file, e.path, i))];
1054
+ b(t.filter((e) => !Te(e))), C(t.filter(Te)), T(X.Replace), A(/* @__PURE__ */ new Map()), re([]), ce(void 0), me(void 0), ge(0);
1067
1055
  }, [e]), Ee(() => {
1068
1056
  if (!e) return;
1069
1057
  let t = !1;
1070
- if (v.length === 0) j(/* @__PURE__ */ new Map()), ne([]);
1071
- else return oe(!0), n.validateBatch(v).then(({ results: e, batchErrors: n }) => {
1072
- t || (j(new Map(e.map((e) => [e.candidateId, e]))), ne(n.map((e) => e.message)));
1058
+ if (v.length === 0) A(/* @__PURE__ */ new Map()), re([]);
1059
+ else return se(!0), n.validateBatch(v).then(({ results: e, batchErrors: n }) => {
1060
+ t || (A(new Map(e.map((e) => [e.candidateId, e]))), re(n.map((e) => e.message)));
1073
1061
  }).finally(() => {
1074
- t || oe(!1);
1062
+ t || se(!1);
1075
1063
  }), () => {
1076
1064
  t = !0;
1077
1065
  };
1078
1066
  }, [v, e]);
1079
- let je = v.some((e) => A.get(e.id)?.status === Dt.Invalid), Me = v.length > 0 && v.every((e) => A.get(e.id)?.status === Dt.Invalid), Ne = [...te, ...v.flatMap((e) => {
1080
- let t = A.get(e.id);
1081
- return t?.status === Dt.Invalid && t.error ? [`${e.path}: ${t.error}`] : [];
1082
- })], U = v.length > 0 && !je && te.length === 0 && !ae && !ce && me === 0, Pe = async () => {
1083
- ue(!0), se(void 0);
1067
+ let je = v.some((e) => k.get(e.id)?.status === Et.Invalid), Me = v.length > 0 && v.every((e) => k.get(e.id)?.status === Et.Invalid), Ne = [...ne, ...v.flatMap((e) => {
1068
+ let t = k.get(e.id);
1069
+ return t?.status === Et.Invalid && t.error ? [`${e.path}: ${t.error}`] : [];
1070
+ })], U = v.length > 0 && !je && ne.length === 0 && !oe && !le && he === 0, Pe = async () => {
1071
+ de(!0), ce(void 0);
1084
1072
  try {
1085
1073
  let { results: e, batchErrors: r } = await n.validateBatch(v), i = new Map(e.map((e) => [e.candidateId, e]));
1086
- if (j(i), ne(r.map((e) => e.message)), v.some((e) => i.get(e.id)?.status === Dt.Invalid) || r.length > 0) return;
1074
+ if (A(i), re(r.map((e) => e.message)), v.some((e) => i.get(e.id)?.status === Et.Invalid) || r.length > 0) return;
1087
1075
  let a = await n.commitBatch(v);
1088
1076
  if (a.error) {
1089
- se(a.error);
1077
+ ce(a.error);
1090
1078
  return;
1091
1079
  }
1092
1080
  d?.(v), t();
1093
1081
  } finally {
1094
- ue(!1);
1082
+ de(!1);
1095
1083
  }
1096
1084
  }, Fe = _.uploadDialogCloseAriaLabel ?? "Close", Ie = _.uploadCancelLabel ?? "Cancel", [Le] = S;
1097
1085
  if (Le) {
1098
1086
  let t = _.uploadConflictTitle ?? "Replace or duplicate it?";
1099
- return /* @__PURE__ */ F(bt, {
1087
+ return /* @__PURE__ */ P(bt, {
1100
1088
  isOpen: e,
1101
1089
  title: t,
1102
1090
  closeAriaLabel: Fe,
@@ -1106,14 +1094,14 @@ var nt = {
1106
1094
  cancelLabel: Ie,
1107
1095
  onCancel: () => Oe(null),
1108
1096
  colors: h,
1109
- children: /* @__PURE__ */ I("div", {
1097
+ children: /* @__PURE__ */ F("div", {
1110
1098
  className: "flex flex-col gap-4 px-4 py-4 desktop:px-6",
1111
- children: [/* @__PURE__ */ F("p", {
1099
+ children: [/* @__PURE__ */ P("p", {
1112
1100
  ref: Se,
1113
1101
  tabIndex: -1,
1114
1102
  className: c("outline-hidden", f),
1115
1103
  children: _.uploadConflictMessage?.(Le.path) ?? `Item with the same name "${Le.path}" already exists.`
1116
- }), /* @__PURE__ */ F(le, {
1104
+ }), /* @__PURE__ */ P(ue, {
1117
1105
  ariaLabel: t,
1118
1106
  value: w,
1119
1107
  onChange: (e) => T(e === X.Duplicate ? X.Duplicate : X.Replace),
@@ -1128,7 +1116,7 @@ var nt = {
1128
1116
  })
1129
1117
  });
1130
1118
  }
1131
- return /* @__PURE__ */ F(bt, {
1119
+ return /* @__PURE__ */ P(bt, {
1132
1120
  isOpen: e,
1133
1121
  title: L ? _.uploadArchiveDialogTitle ?? "Upload archive from device" : _.uploadDialogTitle ?? "Upload files from device",
1134
1122
  closeAriaLabel: Fe,
@@ -1136,22 +1124,22 @@ var nt = {
1136
1124
  confirmLabel: _.uploadConfirmLabel ?? "Add",
1137
1125
  onConfirm: () => void Pe(),
1138
1126
  isConfirmDisabled: !U,
1139
- isConfirming: ce,
1127
+ isConfirming: le,
1140
1128
  cancelLabel: Ie,
1141
1129
  onCancel: t,
1142
1130
  colors: h,
1143
- children: /* @__PURE__ */ I("div", {
1131
+ children: /* @__PURE__ */ F("div", {
1144
1132
  className: "flex flex-col gap-4 px-4 py-4 desktop:px-6",
1145
1133
  style: o({
1146
1134
  "--se-upload-invalid-dropzone-border": g?.invalidDropZoneBorder,
1147
1135
  "--se-upload-row-border": g?.rowBorder
1148
1136
  }),
1149
1137
  children: [
1150
- /* @__PURE__ */ F(O, {
1151
- label: /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F("span", {
1138
+ /* @__PURE__ */ P(D, {
1139
+ label: /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P("span", {
1152
1140
  className: "desktop:hidden",
1153
1141
  children: L ? _.uploadArchiveDropZoneMobileLabel ?? "Click here to upload a .zip archive" : _.uploadDropZoneMobileLabel ?? "Click here to upload"
1154
- }), /* @__PURE__ */ F("span", {
1142
+ }), /* @__PURE__ */ P("span", {
1155
1143
  className: "hidden desktop:inline",
1156
1144
  children: L ? _.uploadArchiveDropZoneLabel ?? "Drag and drop a .zip archive or click here to upload" : _.uploadDropZoneLabel ?? "Drag and drop it or click here to upload"
1157
1145
  })] }),
@@ -1159,52 +1147,52 @@ var nt = {
1159
1147
  id: ye,
1160
1148
  ariaLabel: _.uploadDropZoneAriaLabel ?? "Upload files",
1161
1149
  multiple: !0,
1162
- accept: L ? $ : void 0,
1163
- className: Me ? Q.invalidDropZone : void 0,
1150
+ accept: L ? Q : void 0,
1151
+ className: Me ? Z.invalidDropZone : void 0,
1164
1152
  onChange: Ae,
1165
- onReject: L ? () => pe(_e) : void 0
1153
+ onReject: L ? () => me(_e) : void 0
1166
1154
  }),
1167
- me > 0 && /* @__PURE__ */ F(fe, { ariaLabel: _.uploadArchiveExtractingAriaLabel ?? "Reading archive" }),
1168
- /* @__PURE__ */ F(D, {
1169
- text: de,
1170
- announce: M.Assertive
1155
+ he > 0 && /* @__PURE__ */ P(pe, { ariaLabel: _.uploadArchiveExtractingAriaLabel ?? "Reading archive" }),
1156
+ /* @__PURE__ */ P(E, {
1157
+ text: fe,
1158
+ announce: j.Assertive
1171
1159
  }),
1172
- /* @__PURE__ */ F(re, {
1160
+ /* @__PURE__ */ P(ie, {
1173
1161
  visuallyHidden: !0,
1174
- as: ie.Span,
1162
+ as: ae.Span,
1175
1163
  id: ve,
1176
1164
  children: Ne.map((e) => `${_.uploadBatchErrorAriaPrefix ?? "Upload error: "}${e}`).join(" ")
1177
1165
  }),
1178
- te.map((e) => /* @__PURE__ */ F(D, { text: e }, e)),
1179
- v.length > 0 && /* @__PURE__ */ F("ul", {
1166
+ ne.map((e) => /* @__PURE__ */ P(E, { text: e }, e)),
1167
+ v.length > 0 && /* @__PURE__ */ P("ul", {
1180
1168
  className: "flex flex-col gap-2",
1181
1169
  children: v.map((e) => {
1182
- let t = A.get(e.id), n = t?.kind === Et.Manifest, r = t?.status === Dt.Invalid, i = r ? t?.error : void 0, a = `${be}${e.id}`;
1183
- return /* @__PURE__ */ I("li", {
1184
- className: c("flex items-center gap-2 rounded-lg border p-2", Q.row),
1185
- children: [/* @__PURE__ */ F(k, {
1170
+ let t = k.get(e.id), n = t?.kind === Tt.Manifest, r = t?.status === Et.Invalid, i = r ? t?.error : void 0, a = `${be}${e.id}`;
1171
+ return /* @__PURE__ */ F("li", {
1172
+ className: c("flex items-center gap-2 rounded-lg border p-2", Z.row),
1173
+ children: [/* @__PURE__ */ P(O, {
1186
1174
  name: e.path,
1187
1175
  className: "min-w-0 flex-1",
1188
- details: /* @__PURE__ */ I(P, { children: [
1189
- /* @__PURE__ */ F(y, {
1176
+ details: /* @__PURE__ */ F(N, { children: [
1177
+ /* @__PURE__ */ P(y, {
1190
1178
  className: p,
1191
1179
  text: s(e.file.size)
1192
1180
  }),
1193
- /* @__PURE__ */ F(D, {
1181
+ /* @__PURE__ */ P(E, {
1194
1182
  id: a,
1195
1183
  text: i
1196
1184
  }),
1197
- n && !r && /* @__PURE__ */ F(y, {
1185
+ n && !r && /* @__PURE__ */ P(y, {
1198
1186
  className: p,
1199
1187
  text: _.uploadManifestRowNote ?? "Will replace this Skill's name, description, and instructions"
1200
1188
  }),
1201
- e.replacesExisting && !r && /* @__PURE__ */ F(y, {
1189
+ e.replacesExisting && !r && /* @__PURE__ */ P(y, {
1202
1190
  className: p,
1203
1191
  text: _.uploadReplaceRowNote ?? "Will replace the existing file"
1204
1192
  })
1205
1193
  ] })
1206
- }), /* @__PURE__ */ F(ee, {
1207
- icon: /* @__PURE__ */ F(xe, {
1194
+ }), /* @__PURE__ */ P(te, {
1195
+ icon: /* @__PURE__ */ P(xe, {
1208
1196
  size: 16,
1209
1197
  "aria-hidden": !0,
1210
1198
  stroke: x
@@ -1216,55 +1204,55 @@ var nt = {
1216
1204
  }, e.id);
1217
1205
  })
1218
1206
  }),
1219
- /* @__PURE__ */ F(D, {
1220
- text: N,
1221
- announce: M.Assertive
1207
+ /* @__PURE__ */ P(E, {
1208
+ text: M,
1209
+ announce: j.Assertive
1222
1210
  })
1223
1211
  ]
1224
1212
  })
1225
1213
  });
1226
- }, Nt = {
1214
+ }, Mt = {
1227
1215
  list: "_list_1hpyi_1",
1228
1216
  row: "_row_1hpyi_5",
1229
1217
  count: "_count_1hpyi_14"
1230
- }, Pt = (e) => e === 1 ? "1 item" : `${e} items`, Ft = ({ folderPath: e, entries: t, onOpen: n, rootLabel: r = "Skill", breadcrumbAriaLabel: i = "Folder path", overflowAriaLabel: a = "Show hidden path segments", listAriaLabel: o = "Folder content", emptyTitle: s = "This folder is empty", emptyDescription: l = "Use Add to upload files or create a subfolder.", itemCountLabel: u = Pt, itemCountClassName: d = "dial-tiny-text" }) => {
1218
+ }, Nt = (e) => e === 1 ? "1 item" : `${e} items`, Pt = ({ folderPath: e, entries: t, onOpen: n, rootLabel: r = "Skill", breadcrumbAriaLabel: i = "Folder path", overflowAriaLabel: a = "Show hidden path segments", listAriaLabel: o = "Folder content", emptyTitle: s = "This folder is empty", emptyDescription: l = "Use Add to upload files or create a subfolder.", itemCountLabel: u = Nt, itemCountClassName: d = "dial-tiny-text" }) => {
1231
1219
  let f = e.split("/"), p = [{
1232
1220
  label: r,
1233
- onClick: () => n("", q.Folder)
1221
+ onClick: () => n("", K.Folder)
1234
1222
  }, ...f.map((e, t) => {
1235
1223
  let r = f.slice(0, t + 1).join("/");
1236
1224
  return t === f.length - 1 ? { label: e } : {
1237
1225
  label: e,
1238
- onClick: () => n(r, q.Folder)
1226
+ onClick: () => n(r, K.Folder)
1239
1227
  };
1240
1228
  })];
1241
- return /* @__PURE__ */ I("div", {
1229
+ return /* @__PURE__ */ F("div", {
1242
1230
  className: "flex min-h-0 flex-1 flex-col gap-4",
1243
- children: [/* @__PURE__ */ F(h, {
1231
+ children: [/* @__PURE__ */ P(h, {
1244
1232
  items: p,
1245
1233
  ariaLabel: i,
1246
1234
  overflowAriaLabel: a
1247
- }), t.length === 0 ? /* @__PURE__ */ F(oe, {
1235
+ }), t.length === 0 ? /* @__PURE__ */ P(se, {
1248
1236
  title: s,
1249
1237
  description: l,
1250
1238
  live: !0
1251
- }) : /* @__PURE__ */ F("ul", {
1239
+ }) : /* @__PURE__ */ P("ul", {
1252
1240
  "aria-label": o,
1253
- className: c("m-0 flex list-none flex-col overflow-hidden rounded-lg border p-0", Nt.list),
1241
+ className: c("m-0 flex list-none flex-col overflow-hidden rounded-lg border p-0", Mt.list),
1254
1242
  children: t.map((e) => {
1255
- let t = e.kind === q.Folder;
1256
- return /* @__PURE__ */ F("li", {
1243
+ let t = e.kind === K.Folder;
1244
+ return /* @__PURE__ */ P("li", {
1257
1245
  className: "m-0 p-0",
1258
- children: /* @__PURE__ */ I("button", {
1246
+ children: /* @__PURE__ */ F("button", {
1259
1247
  type: "button",
1260
1248
  onClick: () => n(e.path, e.kind),
1261
- className: c("flex w-full cursor-pointer items-center justify-between gap-4 border-b bg-transparent px-3 py-2 text-start last:border-b-0", Nt.row),
1262
- children: [/* @__PURE__ */ F(k, {
1249
+ className: c("flex w-full cursor-pointer items-center justify-between gap-4 border-b bg-transparent px-3 py-2 text-start last:border-b-0", Mt.row),
1250
+ children: [/* @__PURE__ */ P(O, {
1263
1251
  name: e.name,
1264
1252
  type: t ? C.Folder : C.File,
1265
1253
  className: "min-w-0 flex-1"
1266
- }), t && /* @__PURE__ */ F("span", {
1267
- className: c("shrink-0", Nt.count, d),
1254
+ }), t && /* @__PURE__ */ P("span", {
1255
+ className: c("shrink-0", Mt.count, d),
1268
1256
  children: u(e.childCount)
1269
1257
  })]
1270
1258
  })
@@ -1272,34 +1260,34 @@ var nt = {
1272
1260
  })
1273
1261
  })]
1274
1262
  });
1275
- }, It = {
1263
+ }, Ft = {
1276
1264
  title: "_title_lgmx6_1",
1277
1265
  helperText: "_helperText_lgmx6_5",
1278
1266
  refineFeedback: "_refineFeedback_lgmx6_9",
1279
1267
  refineError: "_refineError_lgmx6_13",
1280
1268
  menuIcon: "_menuIcon_lgmx6_17"
1281
- }, Lt = {
1269
+ }, It = {
1282
1270
  mode: _t.Files,
1283
1271
  targetFolderPath: ""
1284
- }, Rt = [W.Name, W.Description], zt = 24, Bt = 300, Vt = "pb-0 desktop:px-8 desktop:py-6", Ht = "desktop:px-8 desktop:py-6", Ut = "gap-4 px-4 pt-5 pb-6 desktop:gap-5 desktop:px-8 desktop:py-6", Wt = we(async () => {
1272
+ }, Lt = [W.Name, W.Description], Rt = 24, zt = 300, Bt = "pb-0 desktop:px-8 desktop:py-6", Vt = "desktop:px-8 desktop:py-6", Ht = "gap-4 px-4 pt-5 pb-6 desktop:gap-5 desktop:px-8 desktop:py-6", Ut = we(async () => {
1285
1273
  let { MarkdownEditor: e } = await Ae();
1286
1274
  return { default: e };
1287
- }), Gt = ({ initialValues: r, files: i, selectedPath: s, onSelectedPathChange: d, expandedPaths: p, onExpandedPathsChange: m, isLoading: h = !1, hasLoadError: S = !1, isSubmitting: C = !1, errors: O, submitError: k, conflict: j, onReloadLatest: ne, isNameReadOnly: re = !1, onDirtyChange: ie, onValuesChange: M, onRefineDescription: ae, onRefineInstructions: oe, fileActions: N, supportingFileContent: se, asideData: le, onSubmit: ue, onCancel: de, onBack: pe, backAriaLabel: me, title: he, onRetry: ge, onRetrySubmit: ye, labels: be, styles: we, dir: Te, instructionsEditorTheme: Ae = w.light }) => {
1275
+ }), Wt = ({ initialValues: r, files: i, selectedPath: s, onSelectedPathChange: d, expandedPaths: p, onExpandedPathsChange: m, isLoading: h = !1, hasLoadError: S = !1, isSubmitting: C = !1, errors: D, submitError: O, conflict: A, onReloadLatest: re, isNameReadOnly: ie = !1, onDirtyChange: ae, onValuesChange: j, onRefineDescription: oe, onRefineInstructions: se, fileActions: M, supportingFileContent: ce, asideData: ue, onSubmit: de, onCancel: fe, onBack: me, backAriaLabel: he, title: ge, onRetry: I, onRetrySubmit: ye, labels: be, styles: we, dir: Te, instructionsEditorTheme: Ae = w.light }) => {
1288
1276
  let [H, je] = V({
1289
1277
  name: r?.name ?? "",
1290
1278
  description: r?.description ?? "",
1291
1279
  instructions: r?.instructions ?? ""
1292
1280
  }), Me = De(), Ne = De();
1293
- u(() => document.getElementById(Me), Ne, !!O?.instructions);
1281
+ u(() => document.getElementById(Me), Ne, !!D?.instructions);
1294
1282
  let U = B(void 0), Pe = l({
1295
- bottomGap: zt,
1296
- minHeight: Bt
1283
+ bottomGap: Rt,
1284
+ minHeight: zt
1297
1285
  }), Fe = B(H), Ie = (e) => {
1298
1286
  let t = {
1299
1287
  ...Fe.current,
1300
1288
  ...e
1301
1289
  };
1302
- Fe.current = t, je(t), M?.(t);
1290
+ Fe.current = t, je(t), j?.(t);
1303
1291
  }, Le = (e) => e ? async (t, n) => {
1304
1292
  if (U.current && !U.current.aborted) throw new DOMException("Busy", "AbortError");
1305
1293
  U.current = n;
@@ -1311,23 +1299,23 @@ var nt = {
1311
1299
  } : void 0, Re = f({
1312
1300
  value: H.description,
1313
1301
  onChange: (e) => Ie({ description: e }),
1314
- onRefine: Le(ae),
1302
+ onRefine: Le(oe),
1315
1303
  disabled: C || h || S,
1316
1304
  resetKey: r
1317
1305
  }), W = f({
1318
1306
  value: H.instructions,
1319
1307
  onChange: (e) => Ie({ instructions: e }),
1320
- onRefine: Le(oe),
1308
+ onRefine: Le(se),
1321
1309
  disabled: C || h || S,
1322
1310
  resetKey: r
1323
1311
  }), ze = Re.isPending || W.isPending, Be = () => {
1324
1312
  Re.reset(), W.reset();
1325
1313
  }, Ve = () => {
1326
- Be(), de();
1314
+ Be(), fe();
1327
1315
  }, He = () => {
1328
- Be(), pe();
1316
+ Be(), me();
1329
1317
  }, Ue = () => {
1330
- C || h || S || U.current && !U.current.aborted || ue(H);
1318
+ C || h || S || U.current && !U.current.aborted || de(H);
1331
1319
  }, We = B(r), Ge = We.current !== r, Ke = B(i), [qe, Je] = V(!1);
1332
1320
  Ee(() => {
1333
1321
  We.current = r;
@@ -1346,28 +1334,28 @@ var nt = {
1346
1334
  description: r?.description ?? "",
1347
1335
  instructions: r?.instructions ?? ""
1348
1336
  }, t = JSON.stringify(H) !== JSON.stringify(e) || Ye(i) !== Ye(Ke.current) || qe;
1349
- t !== Xe.current && (Xe.current = t, ie?.(t));
1337
+ t !== Xe.current && (Xe.current = t, ae?.(t));
1350
1338
  }, [
1351
1339
  H,
1352
1340
  i,
1353
1341
  r,
1354
1342
  Ge,
1355
1343
  qe,
1356
- ie
1344
+ ae
1357
1345
  ]);
1358
- let [Ze, et] = V(K), G = s ?? Ze, J = R((e) => {
1346
+ let [Ze, et] = V(G), q = s ?? Ze, it = R((e) => {
1359
1347
  et(e), d?.(e);
1360
- }, [d]), [it, ot] = V([]), st = p ?? it, lt = z(() => new Set(st), [st]), ut = R((e) => {
1348
+ }, [d]), [ot, st] = V([]), lt = p ?? ot, ut = z(() => new Set(lt), [lt]), pt = R((e) => {
1361
1349
  let t = [...e];
1362
- ot(t), m?.(t);
1363
- }, [m]), [pt, ht] = V(!1), [yt, bt] = V(Lt), St = R((e) => {
1364
- bt(e), ht(!0);
1365
- }, []), [wt, Et] = V(!1), { isDragActive: Dt, dropZoneHandlers: X } = gt(R((e) => {
1366
- pt || St({
1367
- ...Lt,
1350
+ st(t), m?.(t);
1351
+ }, [m]), [ht, yt] = V(!1), [bt, St] = V(It), Y = R((e) => {
1352
+ St(e), yt(!0);
1353
+ }, []), [Tt, Et] = V(!1), { isDragActive: X, dropZoneHandlers: Dt } = gt(R((e) => {
1354
+ ht || Y({
1355
+ ...It,
1368
1356
  initialFiles: e
1369
1357
  });
1370
- }, [pt, St])), Z = be ?? {}, Q = we?.colors, $ = we?.typography ?? {}, Ot = $.titleClassName ?? "dial-body-semi-text", kt = $.helperTextClassName ?? "dial-tiny-semi-text", At = $.removeIconClassName, jt = z(() => o({ "--se-menu-icon": Q?.menuIcon }), [Q?.menuIcon]), Nt = o({
1358
+ }, [ht, Y])), Z = be ?? {}, Q = we?.colors, $ = we?.typography ?? {}, Ot = $.titleClassName ?? "dial-body-semi-text", kt = $.helperTextClassName ?? "dial-tiny-semi-text", At = $.removeIconClassName, Mt = z(() => o({ "--se-menu-icon": Q?.menuIcon }), [Q?.menuIcon]), Nt = o({
1371
1359
  "--se-title-color": Q?.title,
1372
1360
  "--se-helper-text-color": Q?.helperText,
1373
1361
  "--se-refine-action-text": Q?.refineActionText,
@@ -1377,12 +1365,12 @@ var nt = {
1377
1365
  "--se-folder-row-border": Q?.folderRowBorder,
1378
1366
  "--se-folder-row-hover-bg": Q?.folderRowHoverBackground,
1379
1367
  "--se-drop-overlay-icon": Q?.dropOverlayIcon
1380
- }), Pt = {
1368
+ }), Wt = {
1381
1369
  footerBackground: Q?.dialogFooterBackground,
1382
1370
  footerBorder: Q?.dialogFooterBorder
1383
1371
  }, Gt = {
1384
- feedbackClassName: c(Q?.refineActionText && It.refineFeedback, $.refineFeedbackClassName, nt.refineFeedback),
1385
- errorClassName: It.refineError
1372
+ feedbackClassName: c(Q?.refineActionText && Ft.refineFeedback, $.refineFeedbackClassName, nt.refineFeedback),
1373
+ errorClassName: Ft.refineError
1386
1374
  }, Kt = {
1387
1375
  layout: Q?.border ? { colors: {
1388
1376
  headerBorderColor: Q.border,
@@ -1398,33 +1386,33 @@ var nt = {
1398
1386
  Z.folderNameInvalidError,
1399
1387
  Z.folderNameDuplicateError
1400
1388
  ]), Jt = R((e) => {
1401
- lt.has(e) || ut(/* @__PURE__ */ new Set([...lt, e]));
1402
- }, [lt, ut]), Yt = yt.targetFolderPath, Xt = z(() => ({
1403
- ...N,
1389
+ ut.has(e) || pt(/* @__PURE__ */ new Set([...ut, e]));
1390
+ }, [ut, pt]), Yt = bt.targetFolderPath, Xt = z(() => ({
1391
+ ...M,
1404
1392
  commitBatch: async (e) => {
1405
- let t = await N.commitBatch(e);
1393
+ let t = await M.commitBatch(e);
1406
1394
  return !t.error && Yt !== "" && Jt(Yt), t;
1407
1395
  }
1408
1396
  }), [
1409
- N,
1397
+ M,
1410
1398
  Yt,
1411
1399
  Jt
1412
1400
  ]), Zt = mt({
1413
1401
  files: i,
1414
- fileActions: N,
1402
+ fileActions: M,
1415
1403
  defaultName: Z.newFolderDefaultName ?? "New folder",
1416
1404
  messages: qt,
1417
1405
  onRevealFolder: Jt,
1418
- onCreated: J
1406
+ onCreated: it
1419
1407
  }), { draftNode: Qt, draftPath: $t, draftPane: en } = Zt, tn = z(() => at([{
1420
- path: K,
1421
- name: K,
1422
- kind: q.File
1408
+ path: G,
1409
+ name: G,
1410
+ kind: K.File
1423
1411
  }, ...i]), [i]), nn = z(() => Qt ? at([
1424
1412
  {
1425
- path: K,
1426
- name: K,
1427
- kind: q.File
1413
+ path: G,
1414
+ name: G,
1415
+ kind: K.File
1428
1416
  },
1429
1417
  ...i,
1430
1418
  Qt
@@ -1432,37 +1420,37 @@ var nt = {
1432
1420
  i,
1433
1421
  Qt,
1434
1422
  tn
1435
- ]), rn = z(() => i.find((e) => e.path === G), [i, G]), an = z(() => dt(i, G), [i, G]), on = rn?.kind === q.Folder || an.length > 0, sn = R((e) => {
1436
- e.path !== $t && J(e.path);
1437
- }, [J, $t]), cn = R((e, t) => {
1423
+ ]), rn = z(() => i.find((e) => e.path === q), [i, q]), an = z(() => dt(i, q), [i, q]), on = rn?.kind === K.Folder || an.length > 0, sn = R((e) => {
1424
+ e.path !== $t && it(e.path);
1425
+ }, [it, $t]), cn = R((e, t) => {
1438
1426
  if (e === "") {
1439
- J(K);
1427
+ it(G);
1440
1428
  return;
1441
1429
  }
1442
- let n = [...ft(e), ...t === q.Folder ? [e] : []].filter((e) => !lt.has(e));
1443
- n.length > 0 && ut(/* @__PURE__ */ new Set([...lt, ...n])), J(e);
1430
+ let n = [...ft(e), ...t === K.Folder ? [e] : []].filter((e) => !ut.has(e));
1431
+ n.length > 0 && pt(/* @__PURE__ */ new Set([...ut, ...n])), it(e);
1444
1432
  }, [
1445
- lt,
1446
1433
  ut,
1447
- J
1434
+ pt,
1435
+ it
1448
1436
  ]), ln = R((e) => {
1449
- N.onRemoveNode(e), (G === e || G.startsWith(`${e}/`)) && J(K);
1437
+ M.onRemoveNode(e), (q === e || q.startsWith(`${e}/`)) && it(G);
1450
1438
  }, [
1451
- N,
1452
- G,
1453
- J
1454
- ]), { startDraft: un } = Zt, { onCreateFolder: dn, extractArchive: fn, pickFromFileSystem: pn } = N, [mn, hn] = V(null), gn = R((e, t) => {
1455
- t === Y.Mobile ? hn(e) : un(e, t);
1456
- }, [un]), _n = z(() => i.filter((e) => e.kind === q.File).map((e) => e.path), [i]), vn = R(async (e) => {
1439
+ M,
1440
+ q,
1441
+ it
1442
+ ]), { startDraft: un } = Zt, { onCreateFolder: dn, extractArchive: fn, pickFromFileSystem: pn } = M, [mn, hn] = V(null), gn = R((e, t) => {
1443
+ t === J.Mobile ? hn(e) : un(e, t);
1444
+ }, [un]), _n = z(() => i.filter((e) => e.kind === K.File).map((e) => e.path), [i]), vn = R(async (e) => {
1457
1445
  if (!pn) return;
1458
1446
  let t = await pn();
1459
- t?.length && St({
1447
+ t?.length && Y({
1460
1448
  mode: _t.Files,
1461
1449
  targetFolderPath: e,
1462
1450
  initialEntries: t
1463
1451
  });
1464
- }, [pn, St]), yn = R((e, t) => {
1465
- let n = (e) => vt(e, It.menuIcon, void 0, jt), r = [];
1452
+ }, [pn, Y]), yn = R((e, t) => {
1453
+ let n = (e) => vt(e, Ft.menuIcon, void 0, Mt), r = [];
1466
1454
  return dn && r.push({
1467
1455
  key: "create-folder",
1468
1456
  label: Z.createFolderLabel ?? "Create folder",
@@ -1472,7 +1460,7 @@ var nt = {
1472
1460
  key: "upload-files",
1473
1461
  label: Z.uploadFilesLabel ?? "Upload files from device",
1474
1462
  icon: n(Se),
1475
- onClick: () => St({
1463
+ onClick: () => Y({
1476
1464
  mode: _t.Files,
1477
1465
  targetFolderPath: e
1478
1466
  })
@@ -1480,7 +1468,7 @@ var nt = {
1480
1468
  key: "upload-archive",
1481
1469
  label: Z.uploadArchiveLabel ?? "Upload archive from device",
1482
1470
  icon: n(_e),
1483
- onClick: () => St({
1471
+ onClick: () => Y({
1484
1472
  mode: _t.Archive,
1485
1473
  targetFolderPath: e
1486
1474
  })
@@ -1491,7 +1479,7 @@ var nt = {
1491
1479
  onClick: () => void vn(e)
1492
1480
  }), r;
1493
1481
  }, [
1494
- jt,
1482
+ Mt,
1495
1483
  dn,
1496
1484
  fn,
1497
1485
  pn,
@@ -1500,24 +1488,24 @@ var nt = {
1500
1488
  Z.uploadArchiveLabel,
1501
1489
  Z.openFileSystemLabel,
1502
1490
  gn,
1503
- St,
1491
+ Y,
1504
1492
  vn
1505
1493
  ]), bn = z(() => {
1506
- let e = ct(rt.Header, i.find((e) => e.path === G));
1494
+ let e = ct(rt.Header, i.find((e) => e.path === q));
1507
1495
  return {
1508
- [Y.Mobile]: yn(e, Y.Mobile),
1509
- [Y.Desktop]: yn(e, Y.Desktop)
1496
+ [J.Mobile]: yn(e, J.Mobile),
1497
+ [J.Desktop]: yn(e, J.Desktop)
1510
1498
  };
1511
1499
  }, [
1512
1500
  yn,
1513
1501
  i,
1514
- G
1502
+ q
1515
1503
  ]), xn = R((e, t) => {
1516
1504
  if (e.path === $t || e.nodeType !== Oe.FOLDER) return [];
1517
1505
  let n = {
1518
1506
  path: e.path,
1519
1507
  name: e.name,
1520
- kind: q.Folder
1508
+ kind: K.Folder
1521
1509
  }, r = yn(ct(rt.Child, n), t);
1522
1510
  return r.push({
1523
1511
  key: "delete",
@@ -1533,9 +1521,9 @@ var nt = {
1533
1521
  yn,
1534
1522
  ln
1535
1523
  ]), Sn = z(() => ({
1536
- [Y.Mobile]: (e) => xn(e, Y.Mobile),
1537
- [Y.Desktop]: (e) => xn(e, Y.Desktop)
1538
- }), [xn]), Cn = R((e) => e.nodeType === Oe.FOLDER || e.path === "SKILL.md" ? null : /* @__PURE__ */ F(ee, {
1524
+ [J.Mobile]: (e) => xn(e, J.Mobile),
1525
+ [J.Desktop]: (e) => xn(e, J.Desktop)
1526
+ }), [xn]), Cn = R((e) => e.nodeType === Oe.FOLDER || e.path === "SKILL.md" ? null : /* @__PURE__ */ P(te, {
1539
1527
  size: T.Small,
1540
1528
  icon: vt(xe, At, b.SM),
1541
1529
  "aria-label": Z.deleteLabel ?? "Delete",
@@ -1544,29 +1532,29 @@ var nt = {
1544
1532
  Z.deleteLabel,
1545
1533
  At,
1546
1534
  ln
1547
- ]), wn = (e) => /* @__PURE__ */ I("div", {
1535
+ ]), wn = (e) => /* @__PURE__ */ F("div", {
1548
1536
  className: "flex flex-col gap-2 desktop:gap-5",
1549
- children: [/* @__PURE__ */ I("div", {
1537
+ children: [/* @__PURE__ */ F("div", {
1550
1538
  className: "flex items-center justify-between",
1551
- children: [/* @__PURE__ */ F("span", {
1552
- className: c(It.title, Ot),
1539
+ children: [/* @__PURE__ */ P("span", {
1540
+ className: c(Ft.title, Ot),
1553
1541
  children: Z.filesHeading ?? "Files"
1554
- }), /* @__PURE__ */ F(_, {
1542
+ }), /* @__PURE__ */ P(_, {
1555
1543
  label: Z.addLabel ?? "Add",
1556
1544
  variant: v.Neutral,
1557
1545
  appearance: g.Solid,
1558
1546
  size: T.Small,
1559
1547
  items: bn[e]
1560
1548
  })]
1561
- }), /* @__PURE__ */ F("div", {
1549
+ }), /* @__PURE__ */ P("div", {
1562
1550
  role: "tree",
1563
1551
  "aria-label": Z.filesTreeAriaLabel ?? "Skill files",
1564
- children: /* @__PURE__ */ F(ke, {
1552
+ children: /* @__PURE__ */ P(ke, {
1565
1553
  items: en === e ? nn : tn,
1566
1554
  showFiles: !0,
1567
- selectedPath: G,
1568
- expandedPaths: lt,
1569
- onExpandedPathsChange: ut,
1555
+ selectedPath: q,
1556
+ expandedPaths: ut,
1557
+ onExpandedPathsChange: pt,
1570
1558
  onItemClick: sn,
1571
1559
  getContextMenuItems: Sn[e],
1572
1560
  renderItemActions: Cn,
@@ -1585,9 +1573,9 @@ var nt = {
1585
1573
  topics: [],
1586
1574
  otherLocales: []
1587
1575
  }), [H.name, H.description]), En = z(() => ({
1588
- name: O?.name,
1589
- description: O?.description
1590
- }), [O?.name, O?.description]), Dn = z(() => ({ form: {
1576
+ name: D?.name,
1577
+ description: D?.description
1578
+ }), [D?.name, D?.description]), Dn = z(() => ({ form: {
1591
1579
  ...$e,
1592
1580
  name: {
1593
1581
  label: Z.nameLabel ?? "Name",
@@ -1605,7 +1593,7 @@ var nt = {
1605
1593
  Z.descriptionPlaceholder
1606
1594
  ]), On = (e) => {
1607
1595
  e.name !== void 0 && Ie({ name: e.name }), e.description !== void 0 && (Re.reset(), Ie({ description: e.description }));
1608
- }, kn = ae ? (e, t) => /* @__PURE__ */ F(a, {
1596
+ }, kn = oe ? (e, t) => /* @__PURE__ */ P(a, {
1609
1597
  isEnabled: !0,
1610
1598
  fieldId: t,
1611
1599
  required: !0,
@@ -1616,7 +1604,7 @@ var nt = {
1616
1604
  ...Gt,
1617
1605
  children: e
1618
1606
  }) : void 0, An = {
1619
- title: he,
1607
+ title: ge,
1620
1608
  onBack: He,
1621
1609
  onCancel: Ve,
1622
1610
  onSubmit: Ue,
@@ -1624,81 +1612,81 @@ var nt = {
1624
1612
  isSubmitDisabled: ze || h || S,
1625
1613
  labels: {
1626
1614
  cancelLabel: Z.cancelLabel ?? "Cancel",
1627
- backAriaLabel: me ?? "Back",
1615
+ backAriaLabel: he ?? "Back",
1628
1616
  savingStatusLabel: Z.savingStatusLabel ?? "Saving"
1629
1617
  },
1630
1618
  styles: Kt,
1631
1619
  metadataTitle: null
1632
1620
  };
1633
- if (h) return /* @__PURE__ */ F("div", {
1621
+ if (h) return /* @__PURE__ */ P("div", {
1634
1622
  dir: Te,
1635
1623
  className: "relative flex min-h-0 flex-1 flex-col",
1636
- children: /* @__PURE__ */ F(Qe, {
1624
+ children: /* @__PURE__ */ P(Qe, {
1637
1625
  ...An,
1638
- metadata: /* @__PURE__ */ F("div", {
1626
+ metadata: /* @__PURE__ */ P("div", {
1639
1627
  className: "flex flex-1 items-center justify-center p-8",
1640
- children: /* @__PURE__ */ F(fe, { ariaLabel: Z.loadingAriaLabel ?? "Loading skill" })
1628
+ children: /* @__PURE__ */ P(pe, { ariaLabel: Z.loadingAriaLabel ?? "Loading skill" })
1641
1629
  })
1642
1630
  })
1643
1631
  });
1644
- if (S) return /* @__PURE__ */ F("div", {
1632
+ if (S) return /* @__PURE__ */ P("div", {
1645
1633
  dir: Te,
1646
1634
  className: "relative flex min-h-0 flex-1 flex-col",
1647
- children: /* @__PURE__ */ F(Qe, {
1635
+ children: /* @__PURE__ */ P(Qe, {
1648
1636
  ...An,
1649
- metadata: /* @__PURE__ */ F("div", {
1637
+ metadata: /* @__PURE__ */ P("div", {
1650
1638
  className: "p-8",
1651
- children: /* @__PURE__ */ F(E, {
1639
+ children: /* @__PURE__ */ P(ee, {
1652
1640
  message: Z.loadErrorMessage ?? "Couldn't load this skill. Please try again.",
1653
1641
  iconStroke: x,
1654
- action: /* @__PURE__ */ F(ce, {
1642
+ action: /* @__PURE__ */ P(le, {
1655
1643
  label: Z.retryLabel ?? "Retry",
1656
- onClick: ge
1644
+ onClick: I
1657
1645
  })
1658
1646
  })
1659
1647
  })
1660
1648
  })
1661
1649
  });
1662
- let jn = G === K, Mn = rn?.name ?? G.slice(G.lastIndexOf("/") + 1), Nn = jn ? K : Z.selectedFileHeading?.(Mn) ?? Mn, Pn = k != null || j != null ? /* @__PURE__ */ I("div", {
1650
+ let jn = q === G, Mn = rn?.name ?? q.slice(q.lastIndexOf("/") + 1), Nn = jn ? G : Z.selectedFileHeading?.(Mn) ?? Mn, Pn = O != null || A != null ? /* @__PURE__ */ F("div", {
1663
1651
  className: "flex flex-col gap-2",
1664
- children: [k != null && /* @__PURE__ */ I("div", {
1652
+ children: [O != null && /* @__PURE__ */ F("div", {
1665
1653
  className: "flex items-center gap-2",
1666
- children: [/* @__PURE__ */ F(D, { text: k }), ye != null && /* @__PURE__ */ F(A, {
1654
+ children: [/* @__PURE__ */ P(E, { text: O }), ye != null && /* @__PURE__ */ P(k, {
1667
1655
  label: Z.retryLabel ?? "Retry",
1668
1656
  onClick: ye
1669
1657
  })]
1670
- }), j != null && /* @__PURE__ */ I("div", {
1658
+ }), A != null && /* @__PURE__ */ F("div", {
1671
1659
  className: "flex items-center gap-2",
1672
- children: [/* @__PURE__ */ F(D, { text: j.message }), /* @__PURE__ */ F(A, {
1660
+ children: [/* @__PURE__ */ P(E, { text: A.message }), /* @__PURE__ */ P(k, {
1673
1661
  label: Z.reloadLatestLabel ?? "Reload latest",
1674
- onClick: ne
1662
+ onClick: re
1675
1663
  })]
1676
1664
  })]
1677
- }) : void 0, Fn = /* @__PURE__ */ F(a, {
1678
- isEnabled: !!oe,
1665
+ }) : void 0, Fn = /* @__PURE__ */ P(a, {
1666
+ isEnabled: !!se,
1679
1667
  fieldId: Me,
1680
1668
  required: !0,
1681
- labelClassName: c(It.helperText, kt),
1669
+ labelClassName: c(Ft.helperText, kt),
1682
1670
  label: Z.instructionsLabel ?? "Instructions",
1683
1671
  labels: Z,
1684
1672
  refinement: W,
1685
1673
  disabled: ze || C,
1686
1674
  ...Gt,
1687
- children: /* @__PURE__ */ I("div", {
1675
+ children: /* @__PURE__ */ F("div", {
1688
1676
  className: "flex flex-1 flex-col gap-2",
1689
1677
  children: [
1690
- !oe && /* @__PURE__ */ F(te, {
1678
+ !se && /* @__PURE__ */ P(ne, {
1691
1679
  htmlFor: Me,
1692
- className: c(It.helperText, kt),
1680
+ className: c(Ft.helperText, kt),
1693
1681
  label: Z.instructionsLabel ?? "Instructions",
1694
1682
  required: !0
1695
1683
  }),
1696
- /* @__PURE__ */ F("div", {
1684
+ /* @__PURE__ */ P("div", {
1697
1685
  ref: Pe,
1698
1686
  className: c(t, e, n),
1699
- children: /* @__PURE__ */ F(Ce, {
1700
- fallback: /* @__PURE__ */ F(fe, { ariaLabel: Z.instructionsLoadingAriaLabel ?? "Loading" }),
1701
- children: /* @__PURE__ */ F(Wt, {
1687
+ children: /* @__PURE__ */ P(Ce, {
1688
+ fallback: /* @__PURE__ */ P(pe, { ariaLabel: Z.instructionsLoadingAriaLabel ?? "Loading" }),
1689
+ children: /* @__PURE__ */ P(Ut, {
1702
1690
  id: Me,
1703
1691
  ariaLabel: Z.instructionsLabel ?? "Instructions",
1704
1692
  value: H.instructions,
@@ -1711,62 +1699,62 @@ var nt = {
1711
1699
  })
1712
1700
  })
1713
1701
  }),
1714
- O?.instructions != null && /* @__PURE__ */ F(D, {
1702
+ D?.instructions != null && /* @__PURE__ */ P(E, {
1715
1703
  id: Ne,
1716
- text: O.instructions
1704
+ text: D.instructions
1717
1705
  })
1718
1706
  ]
1719
1707
  })
1720
1708
  });
1721
- return /* @__PURE__ */ I("div", {
1709
+ return /* @__PURE__ */ F("div", {
1722
1710
  dir: Te,
1723
1711
  className: c("relative flex min-h-0 min-w-0 flex-1 flex-col", nt.root),
1724
1712
  style: Nt,
1725
- ...X,
1713
+ ...Dt,
1726
1714
  children: [
1727
- /* @__PURE__ */ F(Ct, {
1728
- isVisible: Dt && !pt,
1715
+ /* @__PURE__ */ P(Ct, {
1716
+ isVisible: X && !ht,
1729
1717
  labels: be,
1730
1718
  titleClassName: $.dropOverlayTitleClassName,
1731
1719
  subtitleClassName: $.dropOverlaySubtitleClassName
1732
1720
  }),
1733
- /* @__PURE__ */ F(Qe, {
1721
+ /* @__PURE__ */ P(Qe, {
1734
1722
  ...An,
1735
- asideData: le,
1736
- asideSectionClassName: Ht,
1723
+ asideData: ue,
1724
+ asideSectionClassName: Vt,
1737
1725
  isSubmitting: C,
1738
- metadataSectionClassName: Vt,
1739
- metadata: /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F("div", {
1726
+ metadataSectionClassName: Bt,
1727
+ metadata: /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P("div", {
1740
1728
  className: "desktop:hidden",
1741
- children: /* @__PURE__ */ F(Tt, {
1729
+ children: /* @__PURE__ */ P(wt, {
1742
1730
  label: Z.editingFileLabel ?? "Editing file",
1743
- fileName: jn ? K : Mn,
1744
- isExpanded: wt,
1731
+ fileName: jn ? G : Mn,
1732
+ isExpanded: Tt,
1745
1733
  onToggle: Et,
1746
1734
  labelClassName: $.editingFileLabelClassName,
1747
1735
  fileNameClassName: $.editingFileNameClassName,
1748
- children: wn(Y.Mobile)
1736
+ children: wn(J.Mobile)
1749
1737
  })
1750
- }), /* @__PURE__ */ F("div", {
1738
+ }), /* @__PURE__ */ P("div", {
1751
1739
  className: "hidden desktop:block",
1752
- children: wn(Y.Desktop)
1740
+ children: wn(J.Desktop)
1753
1741
  })] }),
1754
1742
  alert: Pn,
1755
1743
  setupTitle: Nn,
1756
- setupSectionClassName: Ut,
1757
- setup: jn ? /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(tt, {
1744
+ setupSectionClassName: Ht,
1745
+ setup: jn ? /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(tt, {
1758
1746
  values: Tn,
1759
1747
  errors: En,
1760
1748
  onChange: On,
1761
- fields: Rt,
1749
+ fields: Lt,
1762
1750
  isDescriptionRequired: !0,
1763
- isNameReadOnly: re,
1751
+ isNameReadOnly: ie,
1764
1752
  nameReadOnlyTooltip: Z.nameReadOnlyTooltip ?? "The skill name can't be changed after creation",
1765
- nameCaption: O?.name ? void 0 : Z.nameCaption ?? "Lowercase letters and hyphens only, no spaces. We'll reformat automatically if needed.",
1753
+ nameCaption: D?.name ? void 0 : Z.nameCaption ?? "Lowercase letters and hyphens only, no spaces. We'll reformat automatically if needed.",
1766
1754
  renderDescription: kn,
1767
1755
  labels: Dn
1768
- }), Fn] }) : /* @__PURE__ */ I(P, { children: [on && G !== $t && /* @__PURE__ */ F(Ft, {
1769
- folderPath: G,
1756
+ }), Fn] }) : /* @__PURE__ */ F(N, { children: [on && q !== $t && /* @__PURE__ */ P(Pt, {
1757
+ folderPath: q,
1770
1758
  entries: an,
1771
1759
  onOpen: cn,
1772
1760
  rootLabel: Z.folderPreviewRootLabel,
@@ -1777,19 +1765,19 @@ var nt = {
1777
1765
  emptyDescription: Z.folderEmptyDescription,
1778
1766
  itemCountLabel: Z.folderItemCountLabel,
1779
1767
  itemCountClassName: $.folderItemCountClassName
1780
- }), rn?.kind === q.File && /* @__PURE__ */ F("div", {
1768
+ }), rn?.kind === K.File && /* @__PURE__ */ P("div", {
1781
1769
  className: "flex h-[max(320px,60dvh)] min-h-0 min-w-0 flex-none flex-col desktop:h-auto desktop:flex-1",
1782
- children: se ?? /* @__PURE__ */ F(y, { text: Z.supportingFileNote ?? "This supporting file is included in the skill package as-is. Remove it from the Files panel to replace its content." })
1770
+ children: ce ?? /* @__PURE__ */ P(y, { text: Z.supportingFileNote ?? "This supporting file is included in the skill package as-is. Remove it from the Files panel to replace its content." })
1783
1771
  })] })
1784
1772
  }),
1785
- /* @__PURE__ */ F(Mt, {
1786
- isOpen: pt,
1787
- onClose: () => ht(!1),
1773
+ /* @__PURE__ */ P(jt, {
1774
+ isOpen: ht,
1775
+ onClose: () => yt(!1),
1788
1776
  fileActions: Xt,
1789
- mode: yt.mode,
1790
- targetFolderPath: yt.targetFolderPath,
1791
- initialFiles: yt.initialFiles,
1792
- initialEntries: yt.initialEntries,
1777
+ mode: bt.mode,
1778
+ targetFolderPath: bt.targetFolderPath,
1779
+ initialFiles: bt.initialFiles,
1780
+ initialEntries: bt.initialEntries,
1793
1781
  existingFilePaths: _n,
1794
1782
  onCommitted: (e) => {
1795
1783
  e.some((e) => e.replacesExisting) && Je(!0);
@@ -1797,13 +1785,13 @@ var nt = {
1797
1785
  messageClassName: $.uploadMessageClassName,
1798
1786
  rowCaptionClassName: $.uploadRowCaptionClassName,
1799
1787
  labels: be,
1800
- dialogColors: Pt,
1788
+ dialogColors: Wt,
1801
1789
  colors: {
1802
1790
  invalidDropZoneBorder: Q?.uploadInvalidDropZoneBorder,
1803
1791
  rowBorder: Q?.uploadRowBorder
1804
1792
  }
1805
1793
  }),
1806
- /* @__PURE__ */ F(xt, {
1794
+ /* @__PURE__ */ P(xt, {
1807
1795
  isOpen: mn != null,
1808
1796
  onClose: () => hn(null),
1809
1797
  validateName: (e) => Zt.validateNewFolder(e, mn ?? ""),
@@ -1814,10 +1802,10 @@ var nt = {
1814
1802
  createLabel: Z.createFolderConfirmLabel ?? "Create",
1815
1803
  cancelLabel: Z.cancelLabel ?? "Cancel",
1816
1804
  closeAriaLabel: Z.createFolderCloseAriaLabel ?? "Close",
1817
- dialogColors: Pt
1805
+ dialogColors: Wt
1818
1806
  })
1819
1807
  ]
1820
1808
  });
1821
1809
  };
1822
1810
  //#endregion
1823
- export { nt as SKILL_EDITOR_CLASS, Gt as SkillEditor, Et as SkillFileCandidateKind, q as SkillFileNodeKind, _t as SkillFileUploadMode, Dt as SkillFileValidationStatus };
1811
+ export { nt as SKILL_EDITOR_CLASS, Wt as SkillEditor, Tt as SkillFileCandidateKind, K as SkillFileNodeKind, _t as SkillFileUploadMode, Et as SkillFileValidationStatus };