@epam/ai-dial-projects 1.3.0-rc.2 → 1.3.0-rc.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.
package/index.js CHANGED
@@ -1,38 +1,38 @@
1
- import { ActionMenu as e, DeleteConfirmationDialog as t, MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as n, MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as r, MarkdownRenderer as i, PROHIBITED_CONVERSATION_NAME_CHARS_RE as a, PanelEmptyState as o, RequestStatus as s, TextRefinementField as c, buildCssVars as ee, getAttachmentTypeFromMime as l, inferMimeTypeFromPath as u, mergeClasses as d, useAvailableHeightCap as f, useIsMobile as p, useTextRefinement as m } from "@epam/ai-dial-chat-shared";
2
- import { Button as h, ButtonAppearance as g, ButtonDropdown as _, ButtonVariant as v, CaptionText as te, CardShell as y, DIAL_ICON_SIZE as b, DIAL_KIT_ICON_STROKE as x, ElementSize as S, EllipsisTooltip as C, ErrorText as w, FileDropzone as T, FolderPath as E, GhostButton as D, GhostIconButton as O, Highlight as k, Input as ne, Label as re, LinkButton as A, LiveRegion as j, LiveRegionElement as ie, LiveRegionPoliteness as M, MenuItemMark as N, NeutralButton as P, Popup as F, PopupSize as I, Search as ae, Spinner as oe } from "@epam/ai-dial-ui-kit";
3
- import { IconArrowNarrowLeft as se, IconArrowsSort as L, IconDotsVertical as R, IconDownload as z, IconPencilMinus as B, IconPin as V, IconPinFilled as ce, IconPlus as le, IconShare as ue, IconSparkles as H, IconTrashX as de, IconWorldOff as U, IconWorldShare as fe, createReactComponent as pe } from "@tabler/icons-react";
4
- import { Suspense as me, lazy as he, memo as W, useCallback as G, useEffect as ge, useId as K, useMemo as q, useRef as J, useState as Y } from "react";
5
- import { Fragment as _e, jsx as X, jsxs as Z } from "react/jsx-runtime";
6
- import { AttachmentCard as ve, FileDndOverlay as ye } from "@epam/ai-dial-attachment-input";
7
- import { BuilderFormActionsOrder as be, BuilderFormContainer as xe } from "@epam/ai-dial-builder-form";
8
- import { LazyMarkdownEditor as Se } from "@epam/ai-dial-ui-kit/editors";
1
+ import { ActionMenu as e, ConfirmationDialog as t, ConfirmationIdentityRow as n, DeleteConfirmationDialog as r, MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as i, MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as a, MarkdownRenderer as o, PROHIBITED_CONVERSATION_NAME_CHARS_RE as s, PanelEmptyState as c, RequestStatus as l, ResourceSummary as u, TextRefinementField as d, buildCssVars as f, getAttachmentTypeFromMime as p, inferMimeTypeFromPath as m, mergeClasses as h, useAvailableHeightCap as g, useIsMobile as _, useTextRefinement as v } from "@epam/ai-dial-chat-shared";
2
+ import { Button as y, ButtonAppearance as ee, ButtonDropdown as b, ButtonVariant as x, CaptionText as S, CardShell as C, ConfirmationPopupVariant as w, DIAL_ICON_SIZE as T, DIAL_KIT_ICON_STROKE as E, ElementSize as D, EllipsisTooltip as O, ErrorText as k, FileDropzone as te, FolderPath as A, GhostButton as j, GhostIconButton as ne, Highlight as M, Input as re, Label as N, LinkButton as P, LiveRegion as F, LiveRegionElement as ie, LiveRegionPoliteness as I, MenuItemMark as ae, NeutralButton as L, Popup as oe, PopupSize as R, Search as se, Spinner as ce } from "@epam/ai-dial-ui-kit";
3
+ import { IconArrowNarrowLeft as z, IconArrowsSort as B, IconDotsVertical as le, IconDownload as ue, IconPencilMinus as de, IconPin as V, IconPinFilled as H, IconPlus as fe, IconShare as pe, IconSparkles as me, IconTrashX as he, IconWorldOff as ge, IconWorldShare as _e, createReactComponent as ve } from "@tabler/icons-react";
4
+ import { Suspense as ye, lazy as be, memo as U, useCallback as W, useEffect as xe, useId as G, useMemo as K, useRef as q, useState as J } from "react";
5
+ import { Fragment as Y, jsx as X, jsxs as Z } from "react/jsx-runtime";
6
+ import { AttachmentCard as Se, FileDndOverlay as Ce } from "@epam/ai-dial-attachment-input";
7
+ import { BuilderFormActionsOrder as we, BuilderFormContainer as Te } from "@epam/ai-dial-builder-form";
8
+ import { LazyMarkdownEditor as Ee } from "@epam/ai-dial-ui-kit/editors";
9
9
  //#region src/types/projects-sort-key.ts
10
- var Ce = /* @__PURE__ */ function(e) {
10
+ var De = /* @__PURE__ */ function(e) {
11
11
  return e.Newest = "newest", e.Oldest = "oldest", e.NameAsc = "name-asc", e;
12
- }({}), we = (e, t) => {
12
+ }({}), Oe = (e, t) => {
13
13
  let n = t.trim().toLocaleLowerCase();
14
14
  return n ? e.filter((e) => e.name.toLocaleLowerCase().includes(n)) : e;
15
- }, Te = (e, t, n) => {
15
+ }, ke = (e, t, n) => {
16
16
  let r = new Intl.Collator(n, {
17
17
  sensitivity: "base",
18
18
  numeric: !0
19
19
  }), i = (e, t) => r.compare(e.name, t.name), a = (e, t) => Number(t.isPinned ?? !1) - Number(e.isPinned ?? !1);
20
- if (t === Ce.NameAsc) return [...e].sort((e, t) => a(e, t) || i(e, t));
21
- let o = t === Ce.Oldest ? 1 : -1;
20
+ if (t === De.NameAsc) return [...e].sort((e, t) => a(e, t) || i(e, t));
21
+ let o = t === De.Oldest ? 1 : -1;
22
22
  return [...e].sort((e, t) => {
23
23
  let n = a(e, t);
24
24
  return n === 0 ? e.updatedAt == null && t.updatedAt == null ? i(e, t) : e.updatedAt == null ? 1 : t.updatedAt == null ? -1 : (e.updatedAt - t.updatedAt) * o || i(e, t) : n;
25
25
  });
26
- }, Ee = 60, De = 3600, Oe = 24 * De, ke = [
27
- ["year", 365 * Oe],
28
- ["month", 30 * Oe],
29
- ["week", 7 * Oe],
30
- ["day", Oe],
31
- ["hour", De],
32
- ["minute", Ee]
33
- ], Ae = (e, t, n) => {
26
+ }, Ae = 60, je = 3600, Me = 24 * je, Ne = [
27
+ ["year", 365 * Me],
28
+ ["month", 30 * Me],
29
+ ["week", 7 * Me],
30
+ ["day", Me],
31
+ ["hour", je],
32
+ ["minute", Ae]
33
+ ], Pe = (e, t, n) => {
34
34
  let r = (t - e) / 1e3;
35
- for (let [e, t] of ke) {
35
+ for (let [e, t] of Ne) {
36
36
  let i = Math.floor(r / t);
37
37
  if (i >= 1) return new Intl.RelativeTimeFormat(n).format(-i, e);
38
38
  }
@@ -48,71 +48,71 @@ var Ce = /* @__PURE__ */ function(e) {
48
48
  link: "_link_13sy6_41",
49
49
  aboveLink: "_aboveLink_13sy6_57",
50
50
  interactive: "_interactive_13sy6_62"
51
- }, je = (e, t) => [e, ...(t ?? "").split("/").filter((e) => e.length > 0)], Me = (e) => e.button === 0 && !e.metaKey && !e.ctrlKey && !e.shiftKey && !e.altKey, Ne = ({ project: e, searchQuery: t, sourceLabel: n, folderPathLabel: r, pinnedLabel: i, pinLabel: a, onTogglePin: o, href: s, onOpen: c, now: ee, locale: l, updatedAtClassName: u, titleClassName: f, pathLabelClassName: p, pathLeafClassName: m }) => {
52
- let h = /* @__PURE__ */ X(k, {
51
+ }, Fe = (e, t) => [e, ...(t ?? "").split("/").filter((e) => e.length > 0)], Ie = (e) => e.button === 0 && !e.metaKey && !e.ctrlKey && !e.shiftKey && !e.altKey, Le = ({ project: e, searchQuery: t, sourceLabel: n, folderPathLabel: r, pinnedLabel: i, pinLabel: a, onTogglePin: o, href: s, onOpen: c, now: l, locale: u, updatedAtClassName: d, titleClassName: f, pathLabelClassName: p, pathLeafClassName: m }) => {
52
+ let g = /* @__PURE__ */ X(M, {
53
53
  text: e.name,
54
54
  query: t,
55
55
  maxLines: 1,
56
- className: d("min-w-0", f, Q.title, s != null && Q.aboveLink)
57
- }), g = /* @__PURE__ */ X(E, {
58
- segments: je(n, e.parentPath),
56
+ className: h("min-w-0", f, Q.title, s != null && Q.aboveLink)
57
+ }), _ = /* @__PURE__ */ X(A, {
58
+ segments: Fe(n, e.parentPath),
59
59
  ariaLabel: r,
60
- labelClassName: d(p, Q.path),
61
- leafClassName: d(m, Q.path)
62
- }), _ = J(null);
60
+ labelClassName: h(p, Q.path),
61
+ leafClassName: h(m, Q.path)
62
+ }), v = q(null);
63
63
  return /* @__PURE__ */ X("li", {
64
64
  className: "flex min-w-0",
65
- children: /* @__PURE__ */ Z(y, {
65
+ children: /* @__PURE__ */ Z(C, {
66
66
  "aria-label": e.name,
67
- className: d("relative flex w-full min-w-0 flex-col gap-2", Q.card, s != null && "has-focus-visible:translate-y-[-3px] has-focus-visible:shadow-lg motion-reduce:has-focus-visible:translate-y-0", s != null && Q.interactive),
67
+ className: h("relative flex w-full min-w-0 flex-col gap-2", Q.card, s != null && "has-focus-visible:translate-y-[-3px] has-focus-visible:shadow-lg motion-reduce:has-focus-visible:translate-y-0", s != null && Q.interactive),
68
68
  children: [
69
69
  e.updatedAt != null && /* @__PURE__ */ X("time", {
70
70
  dateTime: new Date(e.updatedAt).toISOString(),
71
- className: d(u, Q.updatedAt, (e.isPinned || o != null) && "pe-6"),
72
- children: Ae(e.updatedAt, ee, l)
71
+ className: h(d, Q.updatedAt, (e.isPinned || o != null) && "pe-6"),
72
+ children: Pe(e.updatedAt, l, u)
73
73
  }),
74
74
  /* @__PURE__ */ Z("div", {
75
- className: d("flex min-w-0 items-center", (e.isPinned || o != null) && "pe-6"),
75
+ className: h("flex min-w-0 items-center", (e.isPinned || o != null) && "pe-6"),
76
76
  children: [s == null ? /* @__PURE__ */ X("div", {
77
77
  className: "min-w-0 flex-1",
78
- children: h
78
+ children: g
79
79
  }) : /* @__PURE__ */ X("a", {
80
- ref: _,
80
+ ref: v,
81
81
  href: s,
82
82
  onClick: (t) => {
83
- c != null && Me(t) && (t.preventDefault(), c(e.id));
83
+ c != null && Ie(t) && (t.preventDefault(), c(e.id));
84
84
  },
85
- className: d("min-w-0 flex-1", Q.link),
86
- children: h
85
+ className: h("min-w-0 flex-1", Q.link),
86
+ children: g
87
87
  }), o == null ? e.isPinned && /* @__PURE__ */ Z("span", {
88
- className: d("absolute inset-e-5 top-5 flex", Q.pin),
89
- children: [/* @__PURE__ */ X(ce, {
90
- size: b.SM,
88
+ className: h("absolute inset-e-5 top-5 flex", Q.pin),
89
+ children: [/* @__PURE__ */ X(H, {
90
+ size: T.SM,
91
91
  "aria-hidden": !0
92
92
  }), /* @__PURE__ */ X("span", {
93
93
  className: "sr-only",
94
94
  children: i
95
95
  })]
96
- }) : /* @__PURE__ */ X(O, {
97
- size: S.Small,
98
- icon: e.isPinned ? /* @__PURE__ */ X(ce, {
99
- size: b.SM,
96
+ }) : /* @__PURE__ */ X(ne, {
97
+ size: D.Small,
98
+ icon: e.isPinned ? /* @__PURE__ */ X(H, {
99
+ size: T.SM,
100
100
  "aria-hidden": !0
101
101
  }) : /* @__PURE__ */ X(V, {
102
- size: b.SM,
102
+ size: T.SM,
103
103
  "aria-hidden": !0,
104
- stroke: x
104
+ stroke: E
105
105
  }),
106
106
  "aria-label": a,
107
107
  "aria-pressed": e.isPinned === !0,
108
108
  onClick: () => o(e.id, !e.isPinned),
109
- className: d("absolute inset-e-4 top-4", Q.pinToggle, !e.isPinned && Q.pinToggleIdle)
109
+ className: h("absolute inset-e-4 top-4", Q.pinToggle, !e.isPinned && Q.pinToggleIdle)
110
110
  })]
111
111
  }),
112
- s == null ? g : /* @__PURE__ */ X("div", {
112
+ s == null ? _ : /* @__PURE__ */ X("div", {
113
113
  className: Q.aboveLink,
114
114
  onClick: (e) => {
115
- _.current?.dispatchEvent(new window.MouseEvent("click", {
115
+ v.current?.dispatchEvent(new window.MouseEvent("click", {
116
116
  bubbles: !0,
117
117
  cancelable: !0,
118
118
  button: e.button,
@@ -122,233 +122,233 @@ var Ce = /* @__PURE__ */ function(e) {
122
122
  altKey: e.altKey
123
123
  }));
124
124
  },
125
- children: g
125
+ children: _
126
126
  })
127
127
  ]
128
128
  })
129
129
  });
130
- }, Pe = {
130
+ }, Re = {
131
131
  container: "_container_4rer8_1",
132
132
  subtitle: "_subtitle_4rer8_5",
133
133
  sortButton: "_sortButton_4rer8_9"
134
- }, Fe = ({ projects: e, isLoading: t = !1, hasError: n = !1, incompleteSources: r = [], onRetry: i, onCreateProject: a, onTogglePin: s, onOpenProject: c, getProjectHref: l, searchQuery: u, onSearchQueryChange: f, sortKey: m, onSortKeyChange: te, labels: y, locale: C, styles: w }) => {
135
- let { colors: T, typography: E } = w ?? {}, O = E?.titleClassName ?? "dial-h1-text", k = E?.subtitleClassName ?? "dial-body-text", ne = E?.cardTitleClassName ?? "dial-body-semi-text", re = E?.pathLabelClassName ?? "dial-tiny-text", A = E?.pathLeafClassName ?? "dial-tiny-semi-text", M = E?.updatedAtClassName ?? "dial-tiny-text", P = E?.emptyStateDescriptionClassName ?? "dial-small-paragraph-text", F = ee({
136
- "--pr-bg": T?.background,
137
- "--pr-subtitle-text": T?.subtitleText,
138
- "--pr-sort-text": T?.sortButtonText,
139
- "--pr-card-bg": T?.cardBackground,
140
- "--pr-card-title-text": T?.cardTitleText,
141
- "--pr-updated-at-text": T?.updatedAtText,
142
- "--pr-path-text": T?.pathText,
143
- "--pr-card-focus-outline": T?.cardFocusOutline
144
- }), I = p(), se = q(() => Date.now(), [e]), R = u.trim(), z = r.length > 0, B = z && e.length === 0, V = q(() => Te(we(e, u), m, C), [
134
+ }, ze = ({ projects: e, isLoading: t = !1, hasError: n = !1, incompleteSources: r = [], onRetry: i, onCreateProject: a, onTogglePin: o, onOpenProject: s, getProjectHref: l, searchQuery: u, onSearchQueryChange: d, sortKey: p, onSortKeyChange: m, labels: g, locale: v, styles: S }) => {
135
+ let { colors: C, typography: w } = S ?? {}, O = w?.titleClassName ?? "dial-h1-text", k = w?.subtitleClassName ?? "dial-body-text", te = w?.cardTitleClassName ?? "dial-body-semi-text", A = w?.pathLabelClassName ?? "dial-tiny-text", ne = w?.pathLeafClassName ?? "dial-tiny-semi-text", M = w?.updatedAtClassName ?? "dial-tiny-text", re = w?.emptyStateDescriptionClassName ?? "dial-small-paragraph-text", N = f({
136
+ "--pr-bg": C?.background,
137
+ "--pr-subtitle-text": C?.subtitleText,
138
+ "--pr-sort-text": C?.sortButtonText,
139
+ "--pr-card-bg": C?.cardBackground,
140
+ "--pr-card-title-text": C?.cardTitleText,
141
+ "--pr-updated-at-text": C?.updatedAtText,
142
+ "--pr-path-text": C?.pathText,
143
+ "--pr-card-focus-outline": C?.cardFocusOutline
144
+ }), P = _(), I = K(() => Date.now(), [e]), L = u.trim(), oe = r.length > 0, R = oe && e.length === 0, z = K(() => ke(Oe(e, u), p, v), [
145
145
  e,
146
146
  u,
147
- m,
148
- C
149
- ]), ce = y.sortOptions.find((e) => e.value === m)?.label ?? y.sortLabel, ue = q(() => y.sortOptions.map((e) => ({
147
+ p,
148
+ v
149
+ ]), le = g.sortOptions.find((e) => e.value === p)?.label ?? g.sortLabel, ue = K(() => g.sortOptions.map((e) => ({
150
150
  key: e.value,
151
151
  label: e.label,
152
- mark: N.Check,
153
- checked: e.value === m,
154
- onClick: () => te(e.value)
152
+ mark: ae.Check,
153
+ checked: e.value === p,
154
+ onClick: () => m(e.value)
155
155
  })), [
156
- y.sortOptions,
157
- m,
158
- te
159
- ]), H = (e) => {
160
- f(e ?? "");
161
- }, de = () => {
162
- if (!t) return n ? y.errorLabel : z ? y.incompleteLabel : e.length === 0 ? y.emptyStateLabel : V.length === 0 ? y.noResultsLabel : y.resultCountLabel(V.length);
163
- }, U = (e, t) => a ? /* @__PURE__ */ X(h, {
164
- label: y.createProjectLabel,
156
+ g.sortOptions,
157
+ p,
158
+ m
159
+ ]), de = (e) => {
160
+ d(e ?? "");
161
+ }, V = () => {
162
+ if (!t) return n ? g.errorLabel : oe ? g.incompleteLabel : e.length === 0 ? g.emptyStateLabel : z.length === 0 ? g.noResultsLabel : g.resultCountLabel(z.length);
163
+ }, H = (e, t) => a ? /* @__PURE__ */ X(y, {
164
+ label: g.createProjectLabel,
165
165
  variant: e,
166
166
  onClick: a,
167
- className: d("shrink-0", t)
168
- }) : void 0, fe = () => t ? /* @__PURE__ */ X(oe, { ariaLabel: y.loadingAriaLabel ?? "Loading projects" }) : n || B ? /* @__PURE__ */ Z("div", {
167
+ className: h("shrink-0", t)
168
+ }) : void 0, pe = () => t ? /* @__PURE__ */ X(ce, { ariaLabel: g.loadingAriaLabel ?? "Loading projects" }) : n || R ? /* @__PURE__ */ Z("div", {
169
169
  className: "flex flex-col items-center gap-3",
170
170
  children: [/* @__PURE__ */ X("p", {
171
- className: d(k, Pe.subtitle),
172
- children: n ? y.errorLabel : y.incompleteLabel
173
- }), /* @__PURE__ */ X(D, {
174
- label: y.retryLabel,
171
+ className: h(k, Re.subtitle),
172
+ children: n ? g.errorLabel : g.incompleteLabel
173
+ }), /* @__PURE__ */ X(j, {
174
+ label: g.retryLabel,
175
175
  onClick: i
176
176
  })]
177
- }) : e.length === 0 ? /* @__PURE__ */ X(o, {
178
- label: y.emptyStateLabel,
179
- description: y.emptyStateDescription,
180
- action: U(v.Secondary, "mt-2"),
181
- containerClassName: me,
177
+ }) : e.length === 0 ? /* @__PURE__ */ X(c, {
178
+ label: g.emptyStateLabel,
179
+ description: g.emptyStateDescription,
180
+ action: H(x.Secondary, "mt-2"),
181
+ containerClassName: he,
182
182
  labelClassName: "mt-3",
183
- descriptionClassName: P
184
- }) : V.length === 0 ? /* @__PURE__ */ X(o, {
185
- label: y.noResultsLabel,
186
- containerClassName: me,
183
+ descriptionClassName: re
184
+ }) : z.length === 0 ? /* @__PURE__ */ X(c, {
185
+ label: g.noResultsLabel,
186
+ containerClassName: he,
187
187
  labelClassName: "mt-3"
188
188
  }) : /* @__PURE__ */ X("ul", {
189
189
  className: "m-0 grid w-full min-w-0 list-none grid-cols-1 gap-4 p-0 desktop:grid-cols-3 desktop:gap-5",
190
- children: V.map((e) => /* @__PURE__ */ X(Ne, {
190
+ children: z.map((e) => /* @__PURE__ */ X(Le, {
191
191
  project: e,
192
- searchQuery: R,
193
- sourceLabel: y.sourceLabels[e.source],
194
- folderPathLabel: y.folderPathLabel,
195
- pinnedLabel: y.pinnedLabel ?? "Pinned",
196
- pinLabel: y.pinLabel ?? "Pin",
197
- onTogglePin: s,
192
+ searchQuery: L,
193
+ sourceLabel: g.sourceLabels[e.source],
194
+ folderPathLabel: g.folderPathLabel,
195
+ pinnedLabel: g.pinnedLabel ?? "Pinned",
196
+ pinLabel: g.pinLabel ?? "Pin",
197
+ onTogglePin: o,
198
198
  href: l?.(e.id),
199
- onOpen: c,
200
- now: se,
201
- locale: C,
199
+ onOpen: s,
200
+ now: I,
201
+ locale: v,
202
202
  updatedAtClassName: M,
203
- titleClassName: ne,
204
- pathLabelClassName: re,
205
- pathLeafClassName: A
203
+ titleClassName: te,
204
+ pathLabelClassName: A,
205
+ pathLeafClassName: ne
206
206
  }, e.id))
207
- }), pe = t || n || B, me = "mt-6 p-3 desktop:mt-0";
207
+ }), me = t || n || R, he = "mt-6 p-3 desktop:mt-0";
208
208
  return /* @__PURE__ */ Z("div", {
209
- style: F,
210
- className: d("relative flex size-full min-h-0 min-w-0 flex-1 flex-col", Pe.container),
209
+ style: N,
210
+ className: h("relative flex size-full min-h-0 min-w-0 flex-1 flex-col", Re.container),
211
211
  children: [/* @__PURE__ */ Z("div", {
212
212
  className: "flex min-h-0 w-full min-w-0 flex-1 flex-col overflow-y-auto",
213
213
  children: [
214
- I ? /* @__PURE__ */ X("h1", {
214
+ P ? /* @__PURE__ */ X("h1", {
215
215
  className: "sr-only",
216
- children: y.title
216
+ children: g.title
217
217
  }) : /* @__PURE__ */ Z("div", {
218
218
  className: "flex min-w-0 items-start gap-2 px-8 py-4",
219
219
  children: [/* @__PURE__ */ Z("div", {
220
220
  className: "flex min-h-10 min-w-0 flex-1 flex-col justify-center gap-0.5",
221
221
  children: [/* @__PURE__ */ X("h1", {
222
- className: d("wrap-break-word", O),
223
- children: y.title
224
- }), y.subtitle && /* @__PURE__ */ X("p", {
225
- className: d(k, Pe.subtitle),
226
- children: y.subtitle
222
+ className: h("wrap-break-word", O),
223
+ children: g.title
224
+ }), g.subtitle && /* @__PURE__ */ X("p", {
225
+ className: h(k, Re.subtitle),
226
+ children: g.subtitle
227
227
  })]
228
- }), U(v.Primary)]
228
+ }), H(x.Primary)]
229
229
  }),
230
230
  /* @__PURE__ */ Z("div", {
231
231
  className: "flex items-center gap-2 p-4 desktop:gap-3 desktop:px-8 desktop:pt-4 desktop:pb-5",
232
232
  children: [/* @__PURE__ */ X("div", {
233
233
  role: "search",
234
234
  className: "min-w-0 flex-1",
235
- children: /* @__PURE__ */ X(ae, {
235
+ children: /* @__PURE__ */ X(se, {
236
236
  value: u,
237
- onChange: H,
238
- placeholder: y.searchPlaceholder,
239
- clearLabel: y.clearSearchLabel,
240
- "aria-label": y.searchAriaLabel,
241
- size: I ? S.Standard : S.Large
237
+ onChange: de,
238
+ placeholder: g.searchPlaceholder,
239
+ clearLabel: g.clearSearchLabel,
240
+ "aria-label": g.searchAriaLabel,
241
+ size: P ? D.Standard : D.Large
242
242
  })
243
- }), y.sortOptions.length > 0 && /* @__PURE__ */ X("div", {
243
+ }), g.sortOptions.length > 0 && /* @__PURE__ */ X("div", {
244
244
  role: "group",
245
- "aria-label": y.sortLabel,
245
+ "aria-label": g.sortLabel,
246
246
  className: "shrink-0",
247
- children: /* @__PURE__ */ X(_, {
247
+ children: /* @__PURE__ */ X(b, {
248
248
  items: ue,
249
- label: ce,
250
- variant: v.Primary,
251
- appearance: g.Ghost,
252
- size: I ? S.Small : S.Standard,
253
- iconBefore: /* @__PURE__ */ X(L, {
254
- size: I ? b.SM : b.MD,
249
+ label: le,
250
+ variant: x.Primary,
251
+ appearance: ee.Ghost,
252
+ size: P ? D.Small : D.Standard,
253
+ iconBefore: /* @__PURE__ */ X(B, {
254
+ size: P ? T.SM : T.MD,
255
255
  "aria-hidden": !0,
256
- stroke: x
256
+ stroke: E
257
257
  }),
258
- className: d("desktop:px-3", Pe.sortButton)
258
+ className: h("desktop:px-3", Re.sortButton)
259
259
  })
260
260
  })]
261
261
  }),
262
- /* @__PURE__ */ X(j, {
262
+ /* @__PURE__ */ X(F, {
263
263
  visuallyHidden: !0,
264
264
  as: ie.Span,
265
- children: de()
265
+ children: V()
266
266
  }),
267
267
  /* @__PURE__ */ Z("div", {
268
268
  className: "flex w-full min-w-0 flex-1 flex-col items-center gap-4 px-4 pb-20 desktop:gap-5 desktop:px-8 desktop:pt-6 desktop:pb-8",
269
- children: [z && !t && !n && !B && /* @__PURE__ */ Z("div", {
269
+ children: [oe && !t && !n && !R && /* @__PURE__ */ Z("div", {
270
270
  className: "flex w-full max-w-[1116px] flex-wrap items-center gap-3",
271
271
  children: [/* @__PURE__ */ X("p", {
272
- className: d(k, Pe.subtitle),
273
- children: y.incompleteLabel
274
- }), /* @__PURE__ */ X(D, {
275
- label: y.retryLabel,
272
+ className: h(k, Re.subtitle),
273
+ children: g.incompleteLabel
274
+ }), /* @__PURE__ */ X(j, {
275
+ label: g.retryLabel,
276
276
  onClick: i
277
277
  })]
278
278
  }), /* @__PURE__ */ X("div", {
279
- className: d("flex w-full max-w-[1116px] min-w-0 flex-col items-center", pe && "flex-1 justify-center"),
280
- children: fe()
279
+ className: h("flex w-full max-w-[1116px] min-w-0 flex-col items-center", me && "flex-1 justify-center"),
280
+ children: pe()
281
281
  })]
282
282
  })
283
283
  ]
284
- }), I && a && /* @__PURE__ */ X(h, {
285
- variant: v.Primary,
286
- iconBefore: /* @__PURE__ */ X(le, {
287
- size: b.LG,
284
+ }), P && a && /* @__PURE__ */ X(y, {
285
+ variant: x.Primary,
286
+ iconBefore: /* @__PURE__ */ X(fe, {
287
+ size: T.LG,
288
288
  "aria-hidden": !0,
289
- stroke: x
289
+ stroke: E
290
290
  }),
291
- "aria-label": y.createProjectLabel,
291
+ "aria-label": g.createProjectLabel,
292
292
  onClick: a,
293
293
  className: "absolute inset-e-4 bottom-4 z-10 size-10 rounded-full px-0"
294
294
  })]
295
295
  });
296
- }, Ie = /* @__PURE__ */ function(e) {
296
+ }, Be = /* @__PURE__ */ function(e) {
297
297
  return e.Personal = "personal", e.Shared = "shared", e.Organization = "organization", e;
298
- }({}), Le = (e) => !!e.dataTransfer?.types.includes("Files"), Re = (e) => {
299
- let [t, n] = Y(!1), r = J(0);
298
+ }({}), Ve = (e) => !!e.dataTransfer?.types.includes("Files"), He = (e) => {
299
+ let [t, n] = J(!1), r = q(0);
300
300
  return {
301
301
  isDragActive: t,
302
302
  handlers: {
303
- onDragEnter: G((e) => {
304
- Le(e) && (e.preventDefault(), r.current += 1, n(!0));
303
+ onDragEnter: W((e) => {
304
+ Ve(e) && (e.preventDefault(), r.current += 1, n(!0));
305
305
  }, []),
306
- onDragLeave: G((e) => {
307
- Le(e) && (--r.current, r.current <= 0 && (r.current = 0, n(!1)));
306
+ onDragLeave: W((e) => {
307
+ Ve(e) && (--r.current, r.current <= 0 && (r.current = 0, n(!1)));
308
308
  }, []),
309
- onDragOver: G((e) => {
310
- Le(e) && e.preventDefault();
309
+ onDragOver: W((e) => {
310
+ Ve(e) && e.preventDefault();
311
311
  }, []),
312
- onDrop: G((t) => {
313
- if (!Le(t)) return;
312
+ onDrop: W((t) => {
313
+ if (!Ve(t)) return;
314
314
  t.preventDefault(), r.current = 0, n(!1);
315
315
  let i = Array.from(t.dataTransfer?.files ?? []);
316
316
  i.length > 0 && e(i);
317
317
  }, [e])
318
318
  }
319
319
  };
320
- }, ze = /* @__PURE__ */ function(e) {
320
+ }, Ue = /* @__PURE__ */ function(e) {
321
321
  return e.UnsupportedType = "unsupported-type", e.TooLarge = "too-large", e.CapacityExceeded = "capacity-exceeded", e.Duplicate = "duplicate", e.InvalidName = "invalid-name", e;
322
- }({}), Be = /* @__PURE__ */ function(e) {
322
+ }({}), We = /* @__PURE__ */ function(e) {
323
323
  return e.Required = "required", e.InvalidCharacters = "invalid-characters", e.Reserved = "reserved", e.TooLong = "too-long", e;
324
- }({}), Ve = 255, He = new RegExp(a.source, "u"), Ue = /[\p{Cc}‎‏‪-‮⁦-⁩]/u, We = /* @__PURE__ */ new Set([
324
+ }({}), Ge = 255, Ke = new RegExp(s.source, "u"), qe = /[\p{Cc}‎‏‪-‮⁦-⁩]/u, Je = /* @__PURE__ */ new Set([
325
325
  ".",
326
326
  "..",
327
327
  "v",
328
328
  "files",
329
329
  ".dial-resource",
330
330
  ".dial-folder"
331
- ]), Ge = (e) => new TextEncoder().encode(e).length, Ke = (e) => {
331
+ ]), Ye = (e) => new TextEncoder().encode(e).length, Xe = (e) => {
332
332
  let t = e.trim();
333
- return t.length === 0 ? Be.Required : Ge(t) > 255 ? Be.TooLong : He.test(t) || Ue.test(t) ? Be.InvalidCharacters : We.has(t) ? Be.Reserved : null;
334
- }, qe = (e) => {
333
+ return t.length === 0 ? We.Required : Ye(t) > 255 ? We.TooLong : Ke.test(t) || qe.test(t) ? We.InvalidCharacters : Je.has(t) ? We.Reserved : null;
334
+ }, Ze = (e) => {
335
335
  let t = e.lastIndexOf(".");
336
336
  return t > 0 ? e.slice(t + 1).toLowerCase() : "";
337
- }, Je = (e) => "isStored" in e && e.isStored, Ye = (e) => Je(e) ? e.size : e.file.size, Xe = (e) => e.reduce((e, t) => e + Ye(t), 0), Ze = 0, Qe = () => (Ze += 1, `project-context-${Date.now()}-${Ze}`), $e = (e) => {
338
- let t = e.type || u(e.name) || "application/octet-stream";
337
+ }, Qe = (e) => "isStored" in e && e.isStored, $e = (e) => Qe(e) ? e.size : e.file.size, et = (e) => e.reduce((e, t) => e + $e(t), 0), tt = 0, nt = () => (tt += 1, `project-context-${Date.now()}-${tt}`), rt = (e) => {
338
+ let t = e.type || m(e.name) || "application/octet-stream";
339
339
  return {
340
- id: Qe(),
340
+ id: nt(),
341
341
  name: e.name,
342
342
  contentType: t,
343
- type: l(t),
344
- status: s.Idle,
343
+ type: p(t),
344
+ status: l.Idle,
345
345
  file: e
346
346
  };
347
- }, et = (e, t, n, r) => Ke(e.name) != null || e.name.trim() !== e.name ? ze.InvalidName : r.allowedExtensions.includes(qe(e.name)) ? t.has(e.name) ? ze.Duplicate : e.size > r.maxFileBytes ? ze.TooLarge : n + e.size > r.maxTotalBytes ? ze.CapacityExceeded : null : ze.UnsupportedType, tt = (e, t, n) => {
348
- let r = new Set(t.map((e) => e.name)), i = Xe(t), a = [], o = [];
347
+ }, it = (e, t, n, r) => Xe(e.name) != null || e.name.trim() !== e.name ? Ue.InvalidName : r.allowedExtensions.includes(Ze(e.name)) ? t.has(e.name) ? Ue.Duplicate : e.size > r.maxFileBytes ? Ue.TooLarge : n + e.size > r.maxTotalBytes ? Ue.CapacityExceeded : null : Ue.UnsupportedType, at = (e, t, n) => {
348
+ let r = new Set(t.map((e) => e.name)), i = et(t), a = [], o = [];
349
349
  for (let t of e) {
350
- let e = et(t, r, i, n);
351
- e == null ? (r.add(t.name), i += t.size, a.push($e(t))) : o.push({
350
+ let e = it(t, r, i, n);
351
+ e == null ? (r.add(t.name), i += t.size, a.push(rt(t))) : o.push({
352
352
  name: t.name,
353
353
  reason: e
354
354
  });
@@ -357,214 +357,214 @@ var Ce = /* @__PURE__ */ function(e) {
357
357
  accepted: a,
358
358
  rejected: o
359
359
  };
360
- }, nt = (e, t) => {
360
+ }, ot = (e, t) => {
361
361
  let n = t.trim().toLowerCase();
362
362
  return n === "" ? e : e.filter((e) => e.name.toLowerCase().includes(n));
363
- }, rt = {
363
+ }, st = {
364
364
  formColumn: "_formColumn_ru73x_1",
365
365
  dropZone: "_dropZone_ru73x_11",
366
366
  label: "_label_ru73x_20",
367
367
  link: "_link_ru73x_24"
368
- }, it = he(async () => ({ default: (await Se()).MarkdownEditor })), at = (e) => `Preview ${e}`, ot = (e) => `Download ${e}`, st = "The project name can't be changed after creation", ct = ({ values: e, errors: t, onFieldChange: i, contextFiles: a, onContextFilesChange: o, onContextFileClick: s, onContextFileDownload: l, selectedContextFileId: u, allowedExtensions: p, maxFileBytes: h, maxTotalBytes: g, onPickFromFileManager: _, onRefineInstructions: v, onBack: y, onCancel: S, onSubmit: C, isSubmitting: E = !1, isNameReadOnly: D = !1, labels: O, markdownEditorTheme: k, className: A, styles: N }) => {
369
- let P = K(), F = K(), I = K(), ae = K(), L = K(), R = K(), z = J(null), B = f(), [V, ce] = Y(!1), [le, ue] = Y([]), [H, de] = Y(""), U = m({
368
+ }, ct = be(async () => ({ default: (await Ee()).MarkdownEditor })), lt = (e) => `Preview ${e}`, ut = (e) => `Download ${e}`, dt = "The project name can't be changed after creation", ft = ({ values: e, errors: t, onFieldChange: n, contextFiles: r, onContextFilesChange: o, onContextFileClick: s, onContextFileDownload: c, selectedContextFileId: l, allowedExtensions: u, maxFileBytes: p, maxTotalBytes: m, onPickFromFileManager: _, onRefineInstructions: y, onBack: ee, onCancel: b, onSubmit: x, isSubmitting: C = !1, isNameReadOnly: w = !1, labels: D, markdownEditorTheme: O, className: A, styles: j }) => {
369
+ let ne = G(), M = G(), P = G(), ae = G(), L = G(), oe = G(), R = q(null), se = g(), [B, le] = J(!1), [ue, de] = J([]), [V, H] = J(""), fe = v({
370
370
  value: e.instructions,
371
- onChange: (e) => i("instructions", e),
372
- onRefine: v,
373
- disabled: E
374
- }), fe = U.isPending, pe = Ke(e.name), he = O.nameReadOnlyHint ?? st, W = t.name ?? (V && pe != null ? O.nameErrors[pe] : void 0), G = !D && !!t.name, _e = pe != null || G || E || fe, Se;
375
- t.name ? Se = F : W && (Se = I);
376
- let Ce = [D && ae, Se].filter(Boolean).join(" ") || void 0;
377
- ge(() => {
378
- t.name && !D && z.current?.focus();
379
- }, [t.name, D]);
380
- let we = q(() => p.map((e) => `.${e}`).join(","), [p]), Te = (e) => {
371
+ onChange: (e) => n("instructions", e),
372
+ onRefine: y,
373
+ disabled: C
374
+ }), pe = fe.isPending, me = Xe(e.name), he = D.nameReadOnlyHint ?? dt, ge = t.name ?? (B && me != null ? D.nameErrors[me] : void 0), _e = !w && !!t.name, ve = me != null || _e || C || pe, be;
375
+ t.name ? be = M : ge && (be = P);
376
+ let U = [w && ae, be].filter(Boolean).join(" ") || void 0;
377
+ xe(() => {
378
+ t.name && !w && R.current?.focus();
379
+ }, [t.name, w]);
380
+ let W = K(() => u.map((e) => `.${e}`).join(","), [u]), Y = (e) => {
381
381
  if (e.length === 0) return;
382
- let { accepted: t, rejected: n } = tt(e, a, {
383
- allowedExtensions: p,
384
- maxFileBytes: h,
385
- maxTotalBytes: g
382
+ let { accepted: t, rejected: n } = at(e, r, {
383
+ allowedExtensions: u,
384
+ maxFileBytes: p,
385
+ maxTotalBytes: m
386
386
  });
387
- ue(n), t.length > 0 && o([...a, ...t]), de([t.length > 0 ? O.filesAddedStatus(t.length) : "", ...n.map(({ name: e, reason: t }) => O.fileRejections[t](e))].filter(Boolean).join(" "));
388
- }, { isDragActive: Ee, handlers: De } = Re(Te), Oe = O.openFileLabel ?? at, ke = O.downloadFileLabel ?? ot, Ae = (e) => {
389
- let t = a.find((t) => t.id === e);
390
- o(a.filter((t) => t.id !== e)), ue([]), t && de(O.fileRemovedStatus(t.name));
391
- }, Q = async (e) => {
387
+ de(n), t.length > 0 && o([...r, ...t]), H([t.length > 0 ? D.filesAddedStatus(t.length) : "", ...n.map(({ name: e, reason: t }) => D.fileRejections[t](e))].filter(Boolean).join(" "));
388
+ }, { isDragActive: Ee, handlers: De } = He(Y), Oe = D.openFileLabel ?? lt, ke = D.downloadFileLabel ?? ut, Ae = (e) => {
389
+ let t = r.find((t) => t.id === e);
390
+ o(r.filter((t) => t.id !== e)), de([]), t && H(D.fileRemovedStatus(t.name));
391
+ }, je = async (e) => {
392
392
  if (e.preventDefault(), e.stopPropagation(), _) try {
393
393
  let e = await _();
394
- e && Te(e);
394
+ e && Y(e);
395
395
  } catch {}
396
- }, je = () => {
397
- _e || C();
398
- }, { colors: Me, typography: Ne } = N ?? {}, Pe = Ne?.titleClassName ?? "dial-h1-text", Fe = d(Ne?.labelClassName ?? "dial-tiny-semi-text", rt.label), Ie = Ne?.helperClassName ?? "dial-tiny-text", Le = ee({
399
- "--pcf-label-text": Me?.labelText,
400
- "--pcf-link-text": Me?.linkText,
401
- "--pcf-dropzone-bg": Me?.dropZoneBackground
402
- }), ze = O.refinement, Be = t.context, Ve = [...le.map(({ name: e, reason: t }) => O.fileRejections[t](e)), Be].filter(Boolean).join("\n"), He = O.dropZoneLabel({
403
- fromDevice: /* @__PURE__ */ X("span", { className: rt.link }),
396
+ }, Me = () => {
397
+ ve || x();
398
+ }, { colors: Ne, typography: Pe } = j ?? {}, Q = Pe?.titleClassName ?? "dial-h1-text", Fe = h(Pe?.labelClassName ?? "dial-tiny-semi-text", st.label), Ie = Pe?.helperClassName ?? "dial-tiny-text", Le = f({
399
+ "--pcf-label-text": Ne?.labelText,
400
+ "--pcf-link-text": Ne?.linkText,
401
+ "--pcf-dropzone-bg": Ne?.dropZoneBackground
402
+ }), Re = D.refinement, ze = t.context, Be = [...ue.map(({ name: e, reason: t }) => D.fileRejections[t](e)), ze].filter(Boolean).join("\n"), Ve = D.dropZoneLabel({
403
+ fromDevice: /* @__PURE__ */ X("span", { className: st.link }),
404
404
  fileManager: _ ? /* @__PURE__ */ X("button", {
405
405
  type: "button",
406
- className: rt.link,
407
- disabled: E,
408
- onClick: (e) => void Q(e)
406
+ className: st.link,
407
+ disabled: C,
408
+ onClick: (e) => void je(e)
409
409
  }) : void 0
410
410
  });
411
411
  return /* @__PURE__ */ Z("div", {
412
- className: d("relative flex h-full min-h-0 w-full", A),
412
+ className: h("relative flex h-full min-h-0 w-full", A),
413
413
  ...De,
414
414
  children: [
415
- /* @__PURE__ */ X(ye, {
415
+ /* @__PURE__ */ X(Ce, {
416
416
  isVisible: Ee,
417
417
  labels: {
418
- title: O.dropOverlayTitle,
419
- subtitle: O.dropOverlaySubtitle
418
+ title: D.dropOverlayTitle,
419
+ subtitle: D.dropOverlaySubtitle
420
420
  }
421
421
  }),
422
- /* @__PURE__ */ X(xe, {
422
+ /* @__PURE__ */ X(Te, {
423
423
  labels: {
424
- title: O.title,
425
- backButtonLabel: O.backLabel,
426
- cancelButtonLabel: O.cancelLabel,
427
- submitButtonLabel: O.createLabel,
428
- submittingLabel: O.submittingLabel ?? O.createLabel
424
+ title: D.title,
425
+ backButtonLabel: D.backLabel,
426
+ cancelButtonLabel: D.cancelLabel,
427
+ submitButtonLabel: D.createLabel,
428
+ submittingLabel: D.submittingLabel ?? D.createLabel
429
429
  },
430
- onBack: y,
431
- onCancel: S,
432
- onSubmit: je,
433
- isCancelDisabled: E,
434
- isSubmitDisabled: _e,
435
- isSubmitting: E,
436
- footerActionsOrder: be.SubmitFirst,
437
- backIcon: /* @__PURE__ */ X(se, {
438
- size: b.LG,
439
- stroke: x,
430
+ onBack: ee,
431
+ onCancel: b,
432
+ onSubmit: Me,
433
+ isCancelDisabled: C,
434
+ isSubmitDisabled: ve,
435
+ isSubmitting: C,
436
+ footerActionsOrder: we.SubmitFirst,
437
+ backIcon: /* @__PURE__ */ X(z, {
438
+ size: T.LG,
439
+ stroke: E,
440
440
  "aria-hidden": !0,
441
441
  className: "rtl:scale-x-[-1]"
442
442
  }),
443
443
  styles: {
444
- colors: { background: Me?.background },
444
+ colors: { background: Ne?.background },
445
445
  header: {
446
- colors: { borderColor: Me?.headerBorder },
447
- typography: { fontClassName: Pe }
446
+ colors: { borderColor: Ne?.headerBorder },
447
+ typography: { fontClassName: Q }
448
448
  },
449
449
  cssVars: Le
450
450
  },
451
451
  children: /* @__PURE__ */ Z("div", {
452
- className: d("mx-auto flex w-full max-w-262 min-w-0 flex-col gap-5 py-6", rt.formColumn),
452
+ className: h("mx-auto flex w-full max-w-262 min-w-0 flex-col gap-5 py-6", st.formColumn),
453
453
  children: [
454
454
  /* @__PURE__ */ Z("div", {
455
455
  className: "flex flex-col gap-1",
456
456
  children: [
457
- /* @__PURE__ */ X(ne, {
458
- id: P,
459
- inputRef: z,
457
+ /* @__PURE__ */ X(re, {
458
+ id: ne,
459
+ inputRef: R,
460
460
  value: e.name,
461
461
  onChange: (e) => {
462
- D || i("name", e ?? "");
462
+ w || n("name", e ?? "");
463
463
  },
464
- onBlur: () => ce(!0),
465
- placeholder: O.namePlaceholder,
464
+ onBlur: () => le(!0),
465
+ placeholder: D.namePlaceholder,
466
466
  labelProps: {
467
- label: O.nameLabel,
467
+ label: D.nameLabel,
468
468
  required: !0
469
469
  },
470
470
  required: !0,
471
471
  "aria-required": !0,
472
- readOnly: D,
473
- disabled: D,
474
- tooltipText: D ? he : void 0,
475
- invalid: !!W,
476
- "aria-invalid": !!W,
477
- "aria-describedby": Ce
472
+ readOnly: w,
473
+ disabled: w,
474
+ tooltipText: w ? he : void 0,
475
+ invalid: !!ge,
476
+ "aria-invalid": !!ge,
477
+ "aria-describedby": U
478
478
  }),
479
- D && /* @__PURE__ */ X(te, {
479
+ w && /* @__PURE__ */ X(S, {
480
480
  id: ae,
481
481
  className: Ie,
482
482
  text: he
483
483
  }),
484
- /* @__PURE__ */ X(w, {
485
- announce: M.Assertive,
486
- id: F,
484
+ /* @__PURE__ */ X(k, {
485
+ announce: I.Assertive,
486
+ id: M,
487
487
  className: Ie,
488
488
  text: t.name ?? ""
489
489
  }),
490
- W && !t.name && /* @__PURE__ */ X(w, {
491
- id: I,
490
+ ge && !t.name && /* @__PURE__ */ X(k, {
491
+ id: P,
492
492
  className: Ie,
493
- text: W
493
+ text: ge
494
494
  })
495
495
  ]
496
496
  }),
497
- /* @__PURE__ */ X(c, {
498
- isEnabled: !!v,
497
+ /* @__PURE__ */ X(d, {
498
+ isEnabled: !!y,
499
499
  fieldId: L,
500
- label: O.instructionsLabel,
500
+ label: D.instructionsLabel,
501
501
  labelClassName: Fe,
502
- labels: ze,
503
- refinement: U,
504
- disabled: E || fe,
502
+ labels: Re,
503
+ refinement: fe,
504
+ disabled: C || pe,
505
505
  children: /* @__PURE__ */ Z("div", {
506
506
  className: "flex flex-1 flex-col gap-2",
507
- children: [!v && /* @__PURE__ */ X(re, {
507
+ children: [!y && /* @__PURE__ */ X(N, {
508
508
  htmlFor: L,
509
509
  className: Fe,
510
- label: O.instructionsLabel
510
+ label: D.instructionsLabel
511
511
  }), /* @__PURE__ */ X("div", {
512
- ref: B,
513
- className: d("w-full", n, r),
514
- children: /* @__PURE__ */ X(me, {
515
- fallback: /* @__PURE__ */ X(oe, { ariaLabel: O.editorLoadingAriaLabel ?? "Loading editor" }),
516
- children: /* @__PURE__ */ X(it, {
512
+ ref: se,
513
+ className: h("w-full", i, a),
514
+ children: /* @__PURE__ */ X(ye, {
515
+ fallback: /* @__PURE__ */ X(ce, { ariaLabel: D.editorLoadingAriaLabel ?? "Loading editor" }),
516
+ children: /* @__PURE__ */ X(ct, {
517
517
  id: L,
518
518
  value: e.instructions,
519
519
  onChange: (e) => {
520
- U.reset(), i("instructions", e);
520
+ fe.reset(), n("instructions", e);
521
521
  },
522
522
  height: 176,
523
- theme: k,
524
- placeholder: O.instructionsPlaceholder
523
+ theme: O,
524
+ placeholder: D.instructionsPlaceholder
525
525
  })
526
526
  })
527
527
  })]
528
528
  })
529
529
  }),
530
530
  /* @__PURE__ */ Z("section", {
531
- "aria-labelledby": R,
531
+ "aria-labelledby": oe,
532
532
  className: "flex flex-col gap-2",
533
533
  children: [
534
534
  /* @__PURE__ */ X("h2", {
535
- id: R,
535
+ id: oe,
536
536
  className: Fe,
537
- children: O.contextLabel
537
+ children: D.contextLabel
538
538
  }),
539
- /* @__PURE__ */ X(T, {
540
- label: He,
541
- ariaLabel: O.dropZoneAriaLabel,
542
- description: O.dropZoneHint,
543
- accept: we,
539
+ /* @__PURE__ */ X(te, {
540
+ label: Ve,
541
+ ariaLabel: D.dropZoneAriaLabel,
542
+ description: D.dropZoneHint,
543
+ accept: W,
544
544
  multiple: !0,
545
- disabled: E,
546
- onChange: Te,
547
- onReject: Te,
548
- errorText: Ve || void 0,
549
- className: rt.dropZone
545
+ disabled: C,
546
+ onChange: Y,
547
+ onReject: Y,
548
+ errorText: Be || void 0,
549
+ className: st.dropZone
550
550
  }),
551
- /* @__PURE__ */ X(j, {
551
+ /* @__PURE__ */ X(F, {
552
552
  visuallyHidden: !0,
553
- politeness: M.Assertive,
554
- children: Be
553
+ politeness: I.Assertive,
554
+ children: ze
555
555
  }),
556
- a.length > 0 && /* @__PURE__ */ X("ul", {
556
+ r.length > 0 && /* @__PURE__ */ X("ul", {
557
557
  className: "flex min-w-0 flex-wrap gap-2 pt-3",
558
- children: a.map((e) => /* @__PURE__ */ X("li", {
558
+ children: r.map((e) => /* @__PURE__ */ X("li", {
559
559
  className: "min-w-0",
560
- children: /* @__PURE__ */ X(ve, {
560
+ children: /* @__PURE__ */ X(Se, {
561
561
  attachment: e,
562
562
  onClick: s,
563
- isSelected: s == null ? void 0 : e.id === u,
563
+ isSelected: s == null ? void 0 : e.id === l,
564
564
  onRemove: Ae,
565
- onDownload: l,
565
+ onDownload: c,
566
566
  labels: {
567
- removeLabel: O.removeFileLabel(e.name),
567
+ removeLabel: D.removeFileLabel(e.name),
568
568
  clickLabel: Oe(e.name),
569
569
  downloadLabel: ke(e.name)
570
570
  }
@@ -576,14 +576,14 @@ var Ce = /* @__PURE__ */ function(e) {
576
576
  ]
577
577
  })
578
578
  }),
579
- /* @__PURE__ */ X(j, {
579
+ /* @__PURE__ */ X(F, {
580
580
  visuallyHidden: !0,
581
581
  as: ie.Span,
582
- children: E ? O.creatingStatus : H
582
+ children: C ? D.creatingStatus : V
583
583
  })
584
584
  ]
585
585
  });
586
- }, lt = pe("outline", "pin-off", "PinOff", [
586
+ }, pt = ve("outline", "pin-off", "PinOff", [
587
587
  ["path", {
588
588
  d: "M3 3l18 18",
589
589
  key: "svg-0"
@@ -619,21 +619,21 @@ var Ce = /* @__PURE__ */ function(e) {
619
619
  body: "_body_1j6j0_16",
620
620
  secondary: "_secondary_1j6j0_20",
621
621
  panel: "_panel_1j6j0_24"
622
- }, ut = (e) => ({
622
+ }, mt = (e) => ({
623
623
  id: e.name,
624
624
  name: e.name,
625
625
  contentType: e.contentType,
626
- type: l(e.contentType),
627
- status: s.Idle
628
- }), dt = (e) => `Download ${e}`, ft = W(({ project: t, isLoading: n = !1, hasError: r = !1, isNotFound: a = !1, isPinned: s, isPinPending: c = !1, contextSearchQuery: l, onContextSearchQueryChange: u, onBack: f, onTogglePin: p, onPublish: m, onUnpublish: h, onEdit: g, onShare: _, onDelete: v, onDownload: te, onContextFileClick: y, onContextFileDownload: S, selectedContextFileId: w, isDetailsStacked: T = !1, onRetry: E, onBrowseProjects: k, mainContent: ne, mainContentLabel: re = "Project content", labels: A, styles: M }) => {
629
- let { colors: N, typography: F } = M ?? {}, I = A.downloadFileLabel ?? dt, L = F?.titleClassName ?? "dial-h1-text", ce = F?.panelTitleClassName ?? "dial-body-semi-text", le = F?.sectionTitleClassName ?? "dial-tiny-text", H = F?.bodyClassName ?? "dial-small-text", pe = F?.helperClassName ?? "dial-tiny-text", me = F?.instructionsHeadingClassName ?? "dial-small-semi-text", he = ee({
626
+ type: p(e.contentType),
627
+ status: l.Idle
628
+ }), ht = (e) => `Download ${e}`, gt = U(({ project: t, isLoading: n = !1, hasError: r = !1, isNotFound: i = !1, isPinned: a, isPinPending: s = !1, contextSearchQuery: l, onContextSearchQueryChange: u, onBack: d, onTogglePin: p, onPublish: m, onUnpublish: g, onEdit: _, onShare: v, onDelete: y, onRemoveFromMyList: ee, onDownload: b, onContextFileClick: x, onContextFileDownload: S, selectedContextFileId: C, isDetailsStacked: w = !1, onRetry: D, onBrowseProjects: k, mainContent: te, mainContentLabel: A = "Project content", labels: M, styles: re }) => {
629
+ let { colors: N, typography: P } = re ?? {}, I = M.downloadFileLabel ?? ht, ae = P?.titleClassName ?? "dial-h1-text", oe = P?.panelTitleClassName ?? "dial-body-semi-text", R = P?.sectionTitleClassName ?? "dial-tiny-text", B = P?.bodyClassName ?? "dial-small-text", H = P?.helperClassName ?? "dial-tiny-text", fe = P?.instructionsHeadingClassName ?? "dial-small-semi-text", me = f({
630
630
  "--pv-bg": N?.background,
631
631
  "--pv-border": N?.border,
632
632
  "--pv-heading-text": N?.headingText,
633
633
  "--pv-body-text": N?.bodyText,
634
634
  "--pv-secondary-text": N?.secondaryText
635
- }), W = q(() => t?.contextFiles ?? [], [t]), G = q(() => nt(W, l), [W, l]), ge = l.trim(), J = K(), Y = q(() => {
636
- let e = d("mb-1 mt-3 first:mt-0", me);
635
+ }), ve = K(() => t?.contextFiles ?? [], [t]), ye = K(() => ot(ve, l), [ve, l]), be = l.trim(), U = G(), W = K(() => {
636
+ let e = h("mb-1 mt-3 first:mt-0", fe);
637
637
  return {
638
638
  h1: e,
639
639
  h2: e,
@@ -641,259 +641,264 @@ var Ce = /* @__PURE__ */ function(e) {
641
641
  h4: e,
642
642
  h5: e,
643
643
  h6: e,
644
- p: H,
645
- ul: H,
646
- ol: H
644
+ p: B,
645
+ ul: B,
646
+ ol: B
647
647
  };
648
- }, [H, me]), ye = A.unpublishLabel ?? "Unpublish", be = () => {
649
- c || p();
650
- }, xe = (e) => /* @__PURE__ */ X(e, {
651
- size: b.SM,
648
+ }, [B, fe]), xe = M.unpublishLabel ?? "Unpublish", q = () => {
649
+ s || p();
650
+ }, J = (e) => /* @__PURE__ */ X(e, {
651
+ size: T.SM,
652
652
  "aria-hidden": !0,
653
- stroke: x
654
- }), Se = (e) => {
653
+ stroke: E
654
+ }), Ce = (e) => {
655
655
  let t = [];
656
656
  return e && t.push({
657
657
  key: "pin",
658
- label: s ? A.unpinLabel : A.pinLabel,
659
- icon: xe(s ? lt : V),
660
- onClick: be
661
- }), e && h ? t.push({
658
+ label: a ? M.unpinLabel : M.pinLabel,
659
+ icon: J(a ? pt : V),
660
+ onClick: q
661
+ }), e && g ? t.push({
662
662
  key: "unpublish",
663
- label: ye,
664
- icon: xe(U),
665
- onClick: h
663
+ label: xe,
664
+ icon: J(ge),
665
+ onClick: g
666
666
  }) : e && m && t.push({
667
667
  key: "publish",
668
- label: A.publishLabel,
669
- icon: xe(fe),
668
+ label: M.publishLabel,
669
+ icon: J(_e),
670
670
  onClick: m
671
- }), e && g && t.push({
671
+ }), e && _ && t.push({
672
672
  key: "edit",
673
- label: A.editLabel,
674
- icon: xe(B),
675
- onClick: g
676
- }), _ && t.push({
677
- key: "share",
678
- label: A.shareLabel,
679
- icon: xe(ue),
673
+ label: M.editLabel,
674
+ icon: J(de),
680
675
  onClick: _
676
+ }), v && t.push({
677
+ key: "share",
678
+ label: M.shareLabel,
679
+ icon: J(pe),
680
+ onClick: v
681
681
  }), t.push({
682
682
  key: "download",
683
- label: A.downloadLabel,
684
- icon: xe(z),
685
- onClick: te
686
- }), v && t.push({
683
+ label: M.downloadLabel,
684
+ icon: J(ue),
685
+ onClick: b
686
+ }), ee && t.push({
687
+ key: "removeFromMyList",
688
+ label: M.removeFromMyListLabel ?? "Remove from My List",
689
+ icon: J(he),
690
+ onClick: ee
691
+ }), y && t.push({
687
692
  key: "delete",
688
- label: A.deleteLabel,
689
- icon: xe(de),
693
+ label: M.deleteLabel,
694
+ icon: J(he),
690
695
  danger: !0,
691
- onClick: v
696
+ onClick: y
692
697
  }), t;
693
- }, Ce = (n, r) => /* @__PURE__ */ X("div", {
698
+ }, we = (n, r) => /* @__PURE__ */ X("div", {
694
699
  className: r,
695
700
  children: /* @__PURE__ */ X(e, {
696
- items: Se(n),
697
- title: n ? t?.name ?? A.moreActionsLabel : A.moreActionsLabel,
698
- closeLabel: A.closeLabel,
701
+ items: Ce(n),
702
+ title: n ? t?.name ?? M.moreActionsLabel : M.moreActionsLabel,
703
+ closeLabel: M.closeLabel,
699
704
  matchReferenceWidth: !1,
700
705
  listClassName: "w-[200px]",
701
- children: /* @__PURE__ */ X(O, {
702
- icon: /* @__PURE__ */ X(R, {
703
- size: b.MD,
706
+ children: /* @__PURE__ */ X(ne, {
707
+ icon: /* @__PURE__ */ X(le, {
708
+ size: T.MD,
704
709
  "aria-hidden": !0,
705
- stroke: x
710
+ stroke: E
706
711
  }),
707
- "aria-label": A.moreActionsLabel
712
+ "aria-label": M.moreActionsLabel
708
713
  })
709
714
  })
710
- }), we = () => n ? /* @__PURE__ */ X(oe, { ariaLabel: A.loadingAriaLabel ?? "Loading project" }) : r ? /* @__PURE__ */ Z("div", {
715
+ }), Te = () => n ? /* @__PURE__ */ X(ce, { ariaLabel: M.loadingAriaLabel ?? "Loading project" }) : r ? /* @__PURE__ */ Z("div", {
711
716
  className: "flex flex-col items-center gap-3",
712
717
  children: [/* @__PURE__ */ X("p", {
713
718
  "aria-hidden": !0,
714
- className: d(H, $.body),
715
- children: A.errorLabel
716
- }), /* @__PURE__ */ X(D, {
717
- label: A.retryLabel,
718
- onClick: E
719
+ className: h(B, $.body),
720
+ children: M.errorLabel
721
+ }), /* @__PURE__ */ X(j, {
722
+ label: M.retryLabel,
723
+ onClick: D
719
724
  })]
720
725
  }) : /* @__PURE__ */ Z("div", {
721
726
  className: "flex flex-col items-center gap-3",
722
727
  children: [/* @__PURE__ */ X("p", {
723
- className: d(H, $.body),
724
- children: A.notFoundLabel
725
- }), /* @__PURE__ */ X(D, {
726
- label: A.browseProjectsLabel,
728
+ className: h(B, $.body),
729
+ children: M.notFoundLabel
730
+ }), /* @__PURE__ */ X(j, {
731
+ label: M.browseProjectsLabel,
727
732
  onClick: k
728
733
  })]
729
734
  });
730
- if (n || r || a || t == null) return /* @__PURE__ */ Z("div", {
731
- style: he,
732
- className: d("flex h-full w-full min-w-0 items-center justify-center p-4", $.container),
733
- children: [/* @__PURE__ */ X(j, {
735
+ if (n || r || i || t == null) return /* @__PURE__ */ Z("div", {
736
+ style: me,
737
+ className: h("flex h-full w-full min-w-0 items-center justify-center p-4", $.container),
738
+ children: [/* @__PURE__ */ X(F, {
734
739
  visuallyHidden: !0,
735
- children: !n && r && A.errorLabel
736
- }), we()]
740
+ children: !n && r && M.errorLabel
741
+ }), Te()]
737
742
  });
738
- let Te = () => W.length === 0 ? /* @__PURE__ */ X(o, { label: A.emptyContextLabel }) : /* @__PURE__ */ Z(_e, { children: [
743
+ let Ee = () => ve.length === 0 ? /* @__PURE__ */ X(c, { label: M.emptyContextLabel }) : /* @__PURE__ */ Z(Y, { children: [
739
744
  /* @__PURE__ */ X("div", {
740
745
  role: "search",
741
- children: /* @__PURE__ */ X(ae, {
746
+ children: /* @__PURE__ */ X(se, {
742
747
  value: l,
743
748
  onChange: (e) => u(e ?? ""),
744
- placeholder: A.contextSearchPlaceholder,
745
- clearLabel: A.clearSearchLabel,
746
- "aria-label": A.contextSearchAriaLabel
749
+ placeholder: M.contextSearchPlaceholder,
750
+ clearLabel: M.clearSearchLabel,
751
+ "aria-label": M.contextSearchAriaLabel
747
752
  })
748
753
  }),
749
- G.length === 0 ? /* @__PURE__ */ X("p", {
750
- className: d(pe, $.secondary),
751
- children: A.noContextMatchesLabel
754
+ ye.length === 0 ? /* @__PURE__ */ X("p", {
755
+ className: h(H, $.secondary),
756
+ children: M.noContextMatchesLabel
752
757
  }) : /* @__PURE__ */ X("ul", {
753
758
  className: "m-0 flex min-w-0 list-none flex-wrap gap-2 p-0 pt-2",
754
- children: G.map((e) => /* @__PURE__ */ X("li", {
759
+ children: ye.map((e) => /* @__PURE__ */ X("li", {
755
760
  className: "min-w-0",
756
- children: /* @__PURE__ */ X(ve, {
757
- attachment: ut(e),
758
- searchQuery: ge,
759
- onClick: y,
761
+ children: /* @__PURE__ */ X(Se, {
762
+ attachment: mt(e),
763
+ searchQuery: be,
764
+ onClick: x,
760
765
  onDownload: S,
761
- isSelected: e.name === w,
766
+ isSelected: e.name === C,
762
767
  labels: {
763
- clickLabel: A.openFileLabel(e.name),
768
+ clickLabel: M.openFileLabel(e.name),
764
769
  downloadLabel: I(e.name)
765
770
  }
766
771
  })
767
772
  }, e.name))
768
773
  }),
769
- /* @__PURE__ */ X(j, {
774
+ /* @__PURE__ */ X(F, {
770
775
  visuallyHidden: !0,
771
776
  as: ie.Span,
772
- children: ge === "" ? "" : A.contextResultCountLabel(G.length)
777
+ children: be === "" ? "" : M.contextResultCountLabel(ye.length)
773
778
  })
774
- ] }), Ee = !T;
779
+ ] }), De = !w;
775
780
  return /* @__PURE__ */ Z("div", {
776
- style: he,
777
- className: d("flex size-full min-h-0 min-w-0 flex-1 flex-col", $.container),
781
+ style: me,
782
+ className: h("flex size-full min-h-0 min-w-0 flex-1 flex-col", $.container),
778
783
  children: [/* @__PURE__ */ Z("header", {
779
- className: d("flex min-w-0 shrink-0 items-center gap-2 px-4 py-3 desktop:px-8 desktop:py-4", $.header),
784
+ className: h("flex min-w-0 shrink-0 items-center gap-2 px-4 py-3 desktop:px-8 desktop:py-4", $.header),
780
785
  children: [
781
- /* @__PURE__ */ X(O, {
782
- icon: /* @__PURE__ */ X(se, {
783
- size: b.LG,
786
+ /* @__PURE__ */ X(ne, {
787
+ icon: /* @__PURE__ */ X(z, {
788
+ size: T.LG,
784
789
  className: "rtl:scale-x-[-1]",
785
790
  "aria-hidden": !0,
786
- stroke: x
791
+ stroke: E
787
792
  }),
788
- "aria-label": A.backLabel,
789
- onClick: f
793
+ "aria-label": M.backLabel,
794
+ onClick: d
790
795
  }),
791
796
  /* @__PURE__ */ X("h1", {
792
- className: d("min-w-0 flex-1", L, $.title),
793
- children: /* @__PURE__ */ X(C, { text: t.name })
797
+ className: h("min-w-0 flex-1", ae, $.title),
798
+ children: /* @__PURE__ */ X(O, { text: t.name })
794
799
  }),
795
- /* @__PURE__ */ X(D, {
796
- label: s ? A.unpinLabel : A.pinLabel,
797
- iconBefore: X(s ? lt : V, {
798
- size: b.MD,
800
+ /* @__PURE__ */ X(j, {
801
+ label: a ? M.unpinLabel : M.pinLabel,
802
+ iconBefore: X(a ? pt : V, {
803
+ size: T.MD,
799
804
  "aria-hidden": !0,
800
- stroke: x
805
+ stroke: E
801
806
  }),
802
- "aria-disabled": c || void 0,
803
- onClick: be,
807
+ "aria-disabled": s || void 0,
808
+ onClick: q,
804
809
  className: "hidden shrink-0 desktop:inline-flex"
805
810
  }),
806
- h && /* @__PURE__ */ X(P, {
807
- label: ye,
808
- iconBefore: /* @__PURE__ */ X(U, {
809
- size: b.MD,
811
+ g && /* @__PURE__ */ X(L, {
812
+ label: xe,
813
+ iconBefore: /* @__PURE__ */ X(ge, {
814
+ size: T.MD,
810
815
  "aria-hidden": !0,
811
- stroke: x
816
+ stroke: E
812
817
  }),
813
- onClick: h,
818
+ onClick: g,
814
819
  className: "hidden shrink-0 desktop:inline-flex"
815
820
  }),
816
- !h && m && /* @__PURE__ */ X(P, {
817
- label: A.publishLabel,
818
- iconBefore: /* @__PURE__ */ X(fe, {
819
- size: b.MD,
821
+ !g && m && /* @__PURE__ */ X(L, {
822
+ label: M.publishLabel,
823
+ iconBefore: /* @__PURE__ */ X(_e, {
824
+ size: T.MD,
820
825
  "aria-hidden": !0,
821
- stroke: x
826
+ stroke: E
822
827
  }),
823
828
  onClick: m,
824
829
  className: "hidden shrink-0 desktop:inline-flex"
825
830
  }),
826
- g && /* @__PURE__ */ X(P, {
827
- label: A.editLabel,
828
- iconBefore: /* @__PURE__ */ X(B, {
829
- size: b.MD,
831
+ _ && /* @__PURE__ */ X(L, {
832
+ label: M.editLabel,
833
+ iconBefore: /* @__PURE__ */ X(de, {
834
+ size: T.MD,
830
835
  "aria-hidden": !0,
831
- stroke: x
836
+ stroke: E
832
837
  }),
833
- onClick: g,
838
+ onClick: _,
834
839
  className: "hidden shrink-0 desktop:inline-flex"
835
840
  }),
836
- Ce(!1, "hidden desktop:block"),
837
- Ce(!0, "desktop:hidden")
841
+ we(!1, "hidden desktop:block"),
842
+ we(!0, "desktop:hidden")
838
843
  ]
839
844
  }), /* @__PURE__ */ Z("div", {
840
- className: d("flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto", Ee && "desktop:flex-row desktop:overflow-hidden", ne == null && Ee && "desktop:justify-end"),
841
- children: [ne != null && /* @__PURE__ */ X("section", {
842
- "aria-label": re,
843
- className: d("flex min-w-0 flex-1 flex-col px-4 py-6 desktop:px-8", Ee && "desktop:overflow-y-auto"),
845
+ className: h("flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto", De && "desktop:flex-row desktop:overflow-hidden", te == null && De && "desktop:justify-end"),
846
+ children: [te != null && /* @__PURE__ */ X("section", {
847
+ "aria-label": A,
848
+ className: h("flex min-w-0 flex-1 flex-col px-4 py-6 desktop:px-8", De && "desktop:overflow-y-auto"),
844
849
  children: /* @__PURE__ */ X("div", {
845
850
  className: "mx-auto flex w-full max-w-[748px] min-w-0 flex-col gap-5",
846
- children: ne
851
+ children: te
847
852
  })
848
853
  }), /* @__PURE__ */ Z("aside", {
849
- "aria-labelledby": J,
850
- className: d("flex w-full min-w-0 flex-col gap-5 border-t px-4 py-6 desktop:px-8", Ee && "desktop:w-[488px] desktop:shrink-0 desktop:overflow-y-auto desktop:border-s desktop:border-t-0", $.panel),
854
+ "aria-labelledby": U,
855
+ className: h("flex w-full min-w-0 flex-col gap-5 border-t px-4 py-6 desktop:px-8", De && "desktop:w-[488px] desktop:shrink-0 desktop:overflow-y-auto desktop:border-s desktop:border-t-0", $.panel),
851
856
  children: [
852
857
  /* @__PURE__ */ X("h2", {
853
- id: J,
854
- className: d(ce, $.title),
855
- children: A.detailsLabel
858
+ id: U,
859
+ className: h(oe, $.title),
860
+ children: M.detailsLabel
856
861
  }),
857
862
  t.description !== "" && /* @__PURE__ */ Z("section", {
858
863
  className: "flex min-w-0 flex-col gap-1",
859
864
  children: [/* @__PURE__ */ X("h3", {
860
- className: d(le, $.secondary),
861
- children: A.descriptionLabel
865
+ className: h(R, $.secondary),
866
+ children: M.descriptionLabel
862
867
  }), /* @__PURE__ */ X("p", {
863
- className: d("wrap-break-word whitespace-pre-line", H, $.body),
868
+ className: h("wrap-break-word whitespace-pre-line", B, $.body),
864
869
  children: t.description
865
870
  })]
866
871
  }),
867
872
  t.instructions !== "" && /* @__PURE__ */ Z("section", {
868
873
  className: "flex min-w-0 flex-col gap-1",
869
874
  children: [/* @__PURE__ */ X("h3", {
870
- className: d(le, $.secondary),
871
- children: A.instructionsLabel
875
+ className: h(R, $.secondary),
876
+ children: M.instructionsLabel
872
877
  }), /* @__PURE__ */ X("div", {
873
- className: d("min-w-0 wrap-break-word", H, $.body),
874
- children: /* @__PURE__ */ X(i, {
878
+ className: h("min-w-0 wrap-break-word", B, $.body),
879
+ children: /* @__PURE__ */ X(o, {
875
880
  content: t.instructions,
876
- classNames: Y
881
+ classNames: W
877
882
  })
878
883
  })]
879
884
  }),
880
885
  /* @__PURE__ */ Z("section", {
881
886
  className: "flex min-w-0 flex-col gap-2",
882
887
  children: [/* @__PURE__ */ X("h3", {
883
- className: d(le, $.secondary),
884
- children: A.contextLabel
885
- }), Te()]
888
+ className: h(R, $.secondary),
889
+ children: M.contextLabel
890
+ }), Ee()]
886
891
  })
887
892
  ]
888
893
  })]
889
894
  })]
890
895
  });
891
- }), pt = {
896
+ }), _t = {
892
897
  row: "_row_1030u_1",
893
898
  readDot: "_readDot_1030u_6",
894
899
  unreadDot: "_unreadDot_1030u_10"
895
- }, mt = ({ item: t, labels: n, rowTitleClassName: r, unreadRowTitleClassName: i, onOpen: a, onRename: o, onDelete: s }) => {
896
- let c = K(), [ee, l] = Y(!1), u = t.isUnread === !0, f = q(() => [...o ? [{
900
+ }, vt = ({ item: t, labels: n, rowTitleClassName: r, unreadRowTitleClassName: i, onOpen: a, onRename: o, onDelete: s }) => {
901
+ let c = G(), [l, u] = J(!1), d = t.isUnread === !0, f = K(() => [...o ? [{
897
902
  key: "rename",
898
903
  label: n.renameLabel,
899
904
  onClick: () => o(t.id)
@@ -910,32 +915,32 @@ var Ce = /* @__PURE__ */ function(e) {
910
915
  o
911
916
  ]);
912
917
  return /* @__PURE__ */ Z("li", {
913
- className: d("group/row flex min-w-0 items-center gap-1 rounded-xl", pt.row),
918
+ className: h("group/row flex min-w-0 items-center gap-1 rounded-xl", _t.row),
914
919
  children: [
915
920
  /* @__PURE__ */ Z("button", {
916
921
  type: "button",
917
922
  "aria-label": n.openLabel(t.title, t.authorName),
918
- "aria-describedby": u ? c : void 0,
923
+ "aria-describedby": d ? c : void 0,
919
924
  className: "flex min-w-0 flex-1 items-center gap-3 rounded-xl p-3 text-start focus-visible:outline-2 focus-visible:-outline-offset-2",
920
925
  onClick: () => a(t.id),
921
926
  children: [
922
927
  t.leading ?? /* @__PURE__ */ X("span", {
923
928
  "aria-hidden": !0,
924
929
  className: "flex size-4 shrink-0 items-center justify-center",
925
- children: /* @__PURE__ */ X("span", { className: d("size-[7.11px] rounded-full", u ? pt.unreadDot : pt.readDot) })
930
+ children: /* @__PURE__ */ X("span", { className: h("size-[7.11px] rounded-full", d ? _t.unreadDot : _t.readDot) })
926
931
  }),
927
- /* @__PURE__ */ X(C, {
932
+ /* @__PURE__ */ X(O, {
928
933
  text: t.title,
929
- className: d("min-w-0 flex-1", u ? i : r)
934
+ className: h("min-w-0 flex-1", d ? i : r)
930
935
  }),
931
- t.trailing ?? (u && t.leading != null && /* @__PURE__ */ X("span", {
936
+ t.trailing ?? (d && t.leading != null && /* @__PURE__ */ X("span", {
932
937
  "aria-hidden": !0,
933
938
  className: "flex size-6 shrink-0 items-center justify-center",
934
- children: /* @__PURE__ */ X("span", { className: d("size-[7.11px] rounded-full", pt.unreadDot) })
939
+ children: /* @__PURE__ */ X("span", { className: h("size-[7.11px] rounded-full", _t.unreadDot) })
935
940
  }))
936
941
  ]
937
942
  }),
938
- u && /* @__PURE__ */ X("span", {
943
+ d && /* @__PURE__ */ X("span", {
939
944
  id: c,
940
945
  className: "sr-only",
941
946
  children: n.unreadLabel ?? "Unread"
@@ -945,44 +950,44 @@ var Ce = /* @__PURE__ */ function(e) {
945
950
  title: n.moreActionsLabel(t.title),
946
951
  closeLabel: n.closeLabel,
947
952
  placement: "bottom-end",
948
- onOpenChange: l,
949
- children: /* @__PURE__ */ X(O, {
953
+ onOpenChange: u,
954
+ children: /* @__PURE__ */ X(ne, {
950
955
  "aria-label": n.moreActionsLabel(t.title),
951
- size: S.Small,
952
- className: d("me-2 shrink-0", !ee && "desktop:opacity-0 desktop:group-focus-within/row:opacity-100 desktop:group-hover/row:opacity-100"),
953
- icon: /* @__PURE__ */ X(R, {
956
+ size: D.Small,
957
+ className: h("me-2 shrink-0", !l && "desktop:opacity-0 desktop:group-focus-within/row:opacity-100 desktop:group-hover/row:opacity-100"),
958
+ icon: /* @__PURE__ */ X(le, {
954
959
  "aria-hidden": !0,
955
- size: b.SM,
956
- stroke: x
960
+ size: T.SM,
961
+ stroke: E
957
962
  })
958
963
  })
959
964
  })
960
965
  ]
961
966
  });
962
- }, ht = W(({ items: e, isLoading: t = !1, hasError: n = !1, onRetry: r, hasMore: i = !1, isLoadingMore: a = !1, onLoadMore: s, isEmptyStateShown: c = !0, onOpen: l, onRename: u, onDelete: f, labels: p, typography: m, colors: h }) => {
963
- let g = K(), _ = m?.titleClassName ?? "dial-body-semi-text", v = m?.rowTitleClassName ?? "dial-body-text", te = m?.unreadRowTitleClassName ?? "dial-body-semi-text", y = q(() => ee({
964
- "--pcl-read-dot": h?.readDot,
965
- "--pcl-unread-dot": h?.unreadDot,
966
- "--pcl-row-hover": h?.rowHoverBackground
967
+ }, yt = U(({ items: e, isLoading: t = !1, hasError: n = !1, onRetry: r, hasMore: i = !1, isLoadingMore: a = !1, onLoadMore: o, isEmptyStateShown: s = !0, onOpen: l, onRename: u, onDelete: d, labels: p, typography: m, colors: g }) => {
968
+ let _ = G(), v = m?.titleClassName ?? "dial-body-semi-text", y = m?.rowTitleClassName ?? "dial-body-text", ee = m?.unreadRowTitleClassName ?? "dial-body-semi-text", b = K(() => f({
969
+ "--pcl-read-dot": g?.readDot,
970
+ "--pcl-unread-dot": g?.unreadDot,
971
+ "--pcl-row-hover": g?.rowHoverBackground
967
972
  }), [
968
- h?.readDot,
969
- h?.unreadDot,
970
- h?.rowHoverBackground
971
- ]), b = m?.messageClassName ?? "dial-small-text", x = !t && !n && e.length === 0;
972
- return x && !c ? null : /* @__PURE__ */ Z("section", {
973
- "aria-labelledby": x ? void 0 : g,
974
- "aria-label": x ? p.title : void 0,
973
+ g?.readDot,
974
+ g?.unreadDot,
975
+ g?.rowHoverBackground
976
+ ]), x = m?.messageClassName ?? "dial-small-text", S = !t && !n && e.length === 0;
977
+ return S && !s ? null : /* @__PURE__ */ Z("section", {
978
+ "aria-labelledby": S ? void 0 : _,
979
+ "aria-label": S ? p.title : void 0,
975
980
  className: "flex min-w-0 flex-col gap-2 pt-3",
976
- style: y,
981
+ style: b,
977
982
  children: [
978
- !x && /* @__PURE__ */ X("h2", {
979
- id: g,
980
- className: d("m-0", _),
983
+ !S && /* @__PURE__ */ X("h2", {
984
+ id: _,
985
+ className: h("m-0", v),
981
986
  children: p.title
982
987
  }),
983
- /* @__PURE__ */ X(j, {
988
+ /* @__PURE__ */ X(F, {
984
989
  visuallyHidden: !0,
985
- children: t ? p.loadingLabel : n ? p.errorLabel : x ? /* @__PURE__ */ Z(_e, { children: [
990
+ children: t ? p.loadingLabel : n ? p.errorLabel : S ? /* @__PURE__ */ Z(Y, { children: [
986
991
  /* @__PURE__ */ X("span", { children: p.emptyTitle }),
987
992
  " ",
988
993
  /* @__PURE__ */ X("span", { children: p.emptyDescription })
@@ -992,202 +997,202 @@ var Ce = /* @__PURE__ */ function(e) {
992
997
  className: "flex justify-center py-6",
993
998
  children: /* @__PURE__ */ X("span", {
994
999
  "aria-hidden": !0,
995
- children: /* @__PURE__ */ X(oe, {})
1000
+ children: /* @__PURE__ */ X(ce, {})
996
1001
  })
997
1002
  }) : n ? /* @__PURE__ */ Z("div", {
998
1003
  className: "flex flex-col items-center gap-3 py-6 text-center",
999
1004
  children: [/* @__PURE__ */ X("p", {
1000
1005
  "aria-hidden": !0,
1001
- className: d("m-0", b),
1006
+ className: h("m-0", x),
1002
1007
  children: p.errorLabel
1003
- }), /* @__PURE__ */ X(D, {
1008
+ }), /* @__PURE__ */ X(j, {
1004
1009
  label: p.retryLabel,
1005
1010
  onClick: r
1006
1011
  })]
1007
- }) : x ? /* @__PURE__ */ X("div", {
1012
+ }) : S ? /* @__PURE__ */ X("div", {
1008
1013
  "aria-hidden": !0,
1009
- children: /* @__PURE__ */ X(o, {
1014
+ children: /* @__PURE__ */ X(c, {
1010
1015
  label: p.emptyTitle,
1011
1016
  description: p.emptyDescription
1012
1017
  })
1013
- }) : /* @__PURE__ */ Z(_e, { children: [/* @__PURE__ */ X("ul", {
1018
+ }) : /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X("ul", {
1014
1019
  className: "m-0 flex min-w-0 list-none flex-col gap-2 p-0",
1015
- children: e.map((e) => /* @__PURE__ */ X(mt, {
1020
+ children: e.map((e) => /* @__PURE__ */ X(vt, {
1016
1021
  item: e,
1017
1022
  labels: p,
1018
- rowTitleClassName: v,
1019
- unreadRowTitleClassName: te,
1023
+ rowTitleClassName: y,
1024
+ unreadRowTitleClassName: ee,
1020
1025
  onOpen: l,
1021
1026
  onRename: u,
1022
- onDelete: f
1027
+ onDelete: d
1023
1028
  }, e.id))
1024
- }), i && s && /* @__PURE__ */ X(A, {
1029
+ }), i && o && /* @__PURE__ */ X(P, {
1025
1030
  className: "self-start",
1026
1031
  label: p.loadMoreLabel ?? "See more",
1027
1032
  disabled: a,
1028
- onClick: s
1033
+ onClick: o
1029
1034
  })] })
1030
1035
  ]
1031
1036
  });
1032
- }), gt = W(({ composer: e, outputs: n, hasOutputs: r = !1, items: i, isLoading: a = !1, hasError: o = !1, onRetry: s, hasMore: c, isLoadingMore: ee, onLoadMore: l, onOpen: u, onRename: d, onGenerateTitle: f, onDelete: p, labels: m, listTypography: h, listColors: _ }) => {
1033
- let te = K(), y = J(null), [S, C] = Y(null), [w, T] = Y(""), [E, D] = Y(), [k, re] = Y(!1), [A, j] = Y(!1), ie = J(0), [M, N] = Y(null), [P, ae] = Y(!1), se = J(null), L = G(() => {
1034
- se.current = document.activeElement;
1035
- }, []), R = G(() => {
1036
- let e = se.current;
1037
- se.current = null, e?.isConnected && window.setTimeout(() => e.focus(), 0);
1038
- }, []), z = G((e) => {
1039
- se.current = null, window.setTimeout(() => {
1037
+ }), bt = U(({ composer: e, outputs: t, hasOutputs: n = !1, items: i, isLoading: a = !1, hasError: o = !1, onRetry: s, hasMore: c, isLoadingMore: l, onLoadMore: u, onOpen: d, onRename: f, onGenerateTitle: p, onDelete: m, labels: h, listTypography: g, listColors: _ }) => {
1038
+ let v = G(), y = q(null), [b, S] = J(null), [C, w] = J(""), [D, O] = J(), [k, te] = J(!1), [A, j] = J(!1), M = q(0), [N, P] = J(null), [F, ie] = J(!1), I = q(null), ae = W(() => {
1039
+ I.current = document.activeElement;
1040
+ }, []), L = W(() => {
1041
+ let e = I.current;
1042
+ I.current = null, e?.isConnected && window.setTimeout(() => e.focus(), 0);
1043
+ }, []), se = W((e) => {
1044
+ I.current = null, window.setTimeout(() => {
1040
1045
  let t = y.current;
1041
1046
  if (!t) return;
1042
1047
  let n = t.querySelectorAll("li > button"), r = n[Math.min(e, n.length - 1)] ?? t.querySelector("h2, section");
1043
1048
  r && !r.matches("button") && (r.tabIndex = -1), r?.focus();
1044
1049
  }, 0);
1045
- }, []), B = G((e) => i.find((t) => t.id === e) ?? null, [i]);
1046
- ge(() => {
1050
+ }, []), z = W((e) => i.find((t) => t.id === e) ?? null, [i]);
1051
+ xe(() => {
1047
1052
  let e = (e) => e != null && i.some((t) => t.id === e.id);
1048
- S && !k && !e(S) && (C(null), z(0)), M && !P && !e(M) && (N(null), z(0));
1053
+ b && !k && !e(b) && (S(null), se(0)), N && !F && !e(N) && (P(null), se(0));
1049
1054
  }, [
1050
- M,
1051
- z,
1052
- P,
1055
+ N,
1056
+ se,
1057
+ F,
1053
1058
  k,
1054
1059
  i,
1055
- S
1060
+ b
1056
1061
  ]);
1057
- let V = G((e) => {
1058
- L();
1059
- let t = B(e);
1060
- ie.current += 1, j(!1), C(t), T(t?.title ?? ""), D(void 0);
1061
- }, [B, L]), ce = G((e) => {
1062
- L(), N(B(e));
1063
- }, [B, L]), le = G(() => {
1064
- k || (ie.current += 1, j(!1), C(null), R());
1065
- }, [k, R]), ue = G(() => {
1066
- P || (N(null), R());
1067
- }, [P, R]), de = S != null && w.trim() === S.title.trim(), U = G(async () => {
1068
- if (!S || !d || k || de) return;
1069
- let e = w.trim();
1070
- if (!e) D(m.renameEmptyError);
1062
+ let B = W((e) => {
1063
+ ae();
1064
+ let t = z(e);
1065
+ M.current += 1, j(!1), S(t), w(t?.title ?? ""), O(void 0);
1066
+ }, [z, ae]), le = W((e) => {
1067
+ ae(), P(z(e));
1068
+ }, [z, ae]), ue = W(() => {
1069
+ k || (M.current += 1, j(!1), S(null), L());
1070
+ }, [k, L]), de = W(() => {
1071
+ F || (P(null), L());
1072
+ }, [F, L]), V = b != null && C.trim() === b.title.trim(), H = W(async () => {
1073
+ if (!b || !f || k || V) return;
1074
+ let e = C.trim();
1075
+ if (!e) O(h.renameEmptyError);
1071
1076
  else {
1072
- re(!0);
1077
+ te(!0);
1073
1078
  try {
1074
- await d(S.id, e), C(null), R();
1079
+ await f(b.id, e), S(null), L();
1075
1080
  } catch {} finally {
1076
- re(!1);
1081
+ te(!1);
1077
1082
  }
1078
1083
  }
1079
1084
  }, [
1080
1085
  k,
1081
- de,
1082
- m.renameEmptyError,
1083
- d,
1084
- S,
1085
- w,
1086
- R
1087
- ]), fe = G(async () => {
1088
- if (!S || !f || A) return;
1089
- let e = ++ie.current;
1090
- j(!0), D(void 0);
1086
+ V,
1087
+ h.renameEmptyError,
1088
+ f,
1089
+ b,
1090
+ C,
1091
+ L
1092
+ ]), fe = W(async () => {
1093
+ if (!b || !p || A) return;
1094
+ let e = ++M.current;
1095
+ j(!0), O(void 0);
1091
1096
  try {
1092
- let t = await f(S.id);
1093
- if (e !== ie.current) return;
1094
- T(t);
1097
+ let t = await p(b.id);
1098
+ if (e !== M.current) return;
1099
+ w(t);
1095
1100
  } catch {
1096
- if (e !== ie.current) return;
1097
- D(m.renameWithAiError ?? "Could not generate a name. Try again.");
1101
+ if (e !== M.current) return;
1102
+ O(h.renameWithAiError ?? "Could not generate a name. Try again.");
1098
1103
  } finally {
1099
- e === ie.current && j(!1);
1104
+ e === M.current && j(!1);
1100
1105
  }
1101
1106
  }, [
1102
1107
  A,
1103
- m.renameWithAiError,
1104
- f,
1105
- S
1106
- ]), pe = G((e) => {
1107
- e.key !== "Enter" || e.nativeEvent.isComposing || (e.preventDefault(), U());
1108
- }, [U]), me = G(async () => {
1109
- if (!M || !p) return;
1110
- let e = i.findIndex((e) => e.id === M.id);
1111
- ae(!0);
1108
+ h.renameWithAiError,
1109
+ p,
1110
+ b
1111
+ ]), pe = W((e) => {
1112
+ e.key !== "Enter" || e.nativeEvent.isComposing || (e.preventDefault(), H());
1113
+ }, [H]), he = W(async () => {
1114
+ if (!N || !m) return;
1115
+ let e = i.findIndex((e) => e.id === N.id);
1116
+ ie(!0);
1112
1117
  try {
1113
- await p(M.id), N(null), z(Math.max(e, 0));
1118
+ await m(N.id), P(null), se(Math.max(e, 0));
1114
1119
  } catch {} finally {
1115
- ae(!1);
1120
+ ie(!1);
1116
1121
  }
1117
1122
  }, [
1118
- M,
1119
- z,
1123
+ N,
1124
+ se,
1120
1125
  i,
1121
- p
1122
- ]), he = q(() => [{
1123
- label: m.renameCancelLabel ?? "Cancel",
1124
- variant: v.Primary,
1125
- appearance: g.Ghost,
1126
+ m
1127
+ ]), ge = K(() => [{
1128
+ label: h.renameCancelLabel ?? "Cancel",
1129
+ variant: x.Primary,
1130
+ appearance: ee.Ghost,
1126
1131
  disabled: k,
1127
- onClick: le
1132
+ onClick: ue
1128
1133
  }, {
1129
- label: m.renameSaveLabel,
1130
- variant: v.Primary,
1131
- disabled: k || de || w.trim() === "",
1134
+ label: h.renameSaveLabel,
1135
+ variant: x.Primary,
1136
+ disabled: k || V || C.trim() === "",
1132
1137
  onClick: () => {
1133
- U();
1138
+ H();
1134
1139
  }
1135
1140
  }], [
1136
- le,
1137
- U,
1138
- de,
1141
+ ue,
1142
+ H,
1143
+ V,
1139
1144
  k,
1140
- w,
1141
- m.renameCancelLabel,
1142
- m.renameSaveLabel
1145
+ C,
1146
+ h.renameCancelLabel,
1147
+ h.renameSaveLabel
1143
1148
  ]);
1144
- return /* @__PURE__ */ Z(_e, { children: [
1149
+ return /* @__PURE__ */ Z(Y, { children: [
1145
1150
  e,
1146
- n,
1151
+ t,
1147
1152
  /* @__PURE__ */ X("div", {
1148
1153
  ref: y,
1149
1154
  className: "contents",
1150
- children: /* @__PURE__ */ X(ht, {
1155
+ children: /* @__PURE__ */ X(yt, {
1151
1156
  items: i,
1152
1157
  isLoading: a,
1153
1158
  hasError: o,
1154
1159
  onRetry: s,
1155
1160
  hasMore: c,
1156
- isLoadingMore: ee,
1157
- onLoadMore: l,
1158
- isEmptyStateShown: !r,
1159
- onOpen: u,
1160
- onRename: d ? V : void 0,
1161
- onDelete: p ? ce : void 0,
1162
- labels: m.list,
1163
- typography: h,
1161
+ isLoadingMore: l,
1162
+ onLoadMore: u,
1163
+ isEmptyStateShown: !n,
1164
+ onOpen: d,
1165
+ onRename: f ? B : void 0,
1166
+ onDelete: m ? le : void 0,
1167
+ labels: h.list,
1168
+ typography: g,
1164
1169
  colors: _
1165
1170
  })
1166
1171
  }),
1167
- S && /* @__PURE__ */ X(F, {
1172
+ b && /* @__PURE__ */ X(oe, {
1168
1173
  open: !0,
1169
- header: m.renameTitle,
1170
- size: I.Sm,
1171
- mainButtons: he,
1172
- onClose: le,
1174
+ header: h.renameTitle,
1175
+ size: R.Sm,
1176
+ mainButtons: ge,
1177
+ onClose: ue,
1173
1178
  children: /* @__PURE__ */ Z("div", {
1174
1179
  className: "flex items-end gap-2 px-6 py-4",
1175
1180
  children: [/* @__PURE__ */ X("div", {
1176
1181
  className: "min-w-0 flex-1",
1177
- children: /* @__PURE__ */ X(ne, {
1178
- id: te,
1179
- value: w,
1180
- labelProps: { label: m.renameInputLabel },
1181
- error: E,
1182
+ children: /* @__PURE__ */ X(re, {
1183
+ id: v,
1184
+ value: C,
1185
+ labelProps: { label: h.renameInputLabel },
1186
+ error: D,
1182
1187
  disabled: k,
1183
1188
  onKeyDown: pe,
1184
1189
  onChange: (e) => {
1185
- T(e ?? ""), D(void 0);
1190
+ w(e ?? ""), O(void 0);
1186
1191
  }
1187
1192
  })
1188
- }), f && /* @__PURE__ */ X(O, {
1189
- "aria-label": m.renameWithAiLabel ?? "Rename with AI",
1190
- tooltipProps: { tooltip: m.renameWithAiLabel ?? "Rename with AI" },
1193
+ }), p && /* @__PURE__ */ X(ne, {
1194
+ "aria-label": h.renameWithAiLabel ?? "Rename with AI",
1195
+ tooltipProps: { tooltip: h.renameWithAiLabel ?? "Rename with AI" },
1191
1196
  disabled: A || k,
1192
1197
  "aria-busy": A,
1193
1198
  onClick: () => {
@@ -1196,52 +1201,52 @@ var Ce = /* @__PURE__ */ function(e) {
1196
1201
  icon: A ? /* @__PURE__ */ X("span", {
1197
1202
  className: "flex",
1198
1203
  "aria-hidden": !0,
1199
- children: /* @__PURE__ */ X(oe, { size: b.MD })
1200
- }) : /* @__PURE__ */ X(H, {
1201
- size: b.MD,
1202
- stroke: x,
1204
+ children: /* @__PURE__ */ X(ce, { size: T.MD })
1205
+ }) : /* @__PURE__ */ X(me, {
1206
+ size: T.MD,
1207
+ stroke: E,
1203
1208
  "aria-hidden": !0
1204
1209
  })
1205
1210
  })]
1206
1211
  })
1207
1212
  }),
1208
- M && /* @__PURE__ */ X(t, {
1213
+ N && /* @__PURE__ */ X(r, {
1209
1214
  open: !0,
1210
- title: m.deleteTitle(M.title),
1211
- names: [M.title],
1212
- message: m.deleteDescription,
1213
- labels: m.deleteDialog,
1214
- isLoading: P,
1215
+ title: h.deleteTitle(N.title),
1216
+ names: [N.title],
1217
+ message: h.deleteDescription,
1218
+ labels: h.deleteDialog,
1219
+ isLoading: F,
1215
1220
  onConfirm: () => {
1216
- me();
1221
+ he();
1217
1222
  },
1218
- onClose: ue
1223
+ onClose: de
1219
1224
  })
1220
1225
  ] });
1221
- }), _t = {
1226
+ }), xt = {
1222
1227
  title: "_title_17sbf_1",
1223
1228
  secondary: "_secondary_17sbf_5"
1224
- }, vt = 6, yt = (e) => ({
1229
+ }, St = 6, Ct = (e) => ({
1225
1230
  id: e.name,
1226
1231
  name: e.name,
1227
1232
  contentType: e.contentType,
1228
- type: l(e.contentType),
1229
- status: s.Idle
1230
- }), bt = W(({ items: e, onOpenOutput: t, selectedOutputName: n, hasError: r = !1, onRetry: i, previewLimit: a = vt, labels: o, styles: s }) => {
1231
- let c = K(), l = K(), u = J(null), f = J(!1), [p, m] = Y(!1), { colors: h, typography: g } = s ?? {}, _ = g?.titleClassName ?? "dial-body-semi-text", v = g?.helperClassName ?? "dial-tiny-text", te = o?.title ?? "Outputs", y = o?.errorLabel ?? "Could not load outputs", b = q(() => ee({
1232
- "--po-heading-text": h?.headingText,
1233
- "--po-secondary-text": h?.secondaryText
1234
- }), [h?.headingText, h?.secondaryText]), x = G(() => m((e) => !e), []), S = G(() => {
1235
- f.current = !0, i?.();
1233
+ type: p(e.contentType),
1234
+ status: l.Idle
1235
+ }), wt = U(({ items: e, onOpenOutput: t, selectedOutputName: n, hasError: r = !1, onRetry: i, previewLimit: a = St, labels: o, styles: s }) => {
1236
+ let c = G(), l = G(), u = q(null), d = q(!1), [p, m] = J(!1), { colors: g, typography: _ } = s ?? {}, v = _?.titleClassName ?? "dial-body-semi-text", y = _?.helperClassName ?? "dial-tiny-text", ee = o?.title ?? "Outputs", b = o?.errorLabel ?? "Could not load outputs", x = K(() => f({
1237
+ "--po-heading-text": g?.headingText,
1238
+ "--po-secondary-text": g?.secondaryText
1239
+ }), [g?.headingText, g?.secondaryText]), S = W(() => m((e) => !e), []), C = W(() => {
1240
+ d.current = !0, i?.();
1236
1241
  }, [i]);
1237
- ge(() => {
1238
- !r && f.current && (f.current = !1, u.current?.focus());
1242
+ xe(() => {
1243
+ !r && d.current && (d.current = !1, u.current?.focus());
1239
1244
  }, [r]);
1240
- let C = r || e.length > 0, w = e.length > a, T = p || !w ? e : e.slice(0, a), E = o?.openOutputLabel ?? ((e) => `Preview ${e}`), O = o?.seeAllLabel?.(e.length) ?? `See all (${e.length})`, k = o?.showLessLabel ?? "Show less";
1245
+ let w = r || e.length > 0, T = e.length > a, E = p || !T ? e : e.slice(0, a), D = o?.openOutputLabel ?? ((e) => `Preview ${e}`), O = o?.seeAllLabel?.(e.length) ?? `See all (${e.length})`, k = o?.showLessLabel ?? "Show less";
1241
1246
  return /* @__PURE__ */ Z("div", {
1242
1247
  className: "contents",
1243
- style: b,
1244
- children: [C && /* @__PURE__ */ Z("section", {
1248
+ style: x,
1249
+ children: [w && /* @__PURE__ */ Z("section", {
1245
1250
  "aria-labelledby": c,
1246
1251
  className: "flex min-w-0 flex-col gap-2 pt-3",
1247
1252
  children: [/* @__PURE__ */ Z("div", {
@@ -1250,61 +1255,82 @@ var Ce = /* @__PURE__ */ function(e) {
1250
1255
  ref: u,
1251
1256
  id: c,
1252
1257
  tabIndex: -1,
1253
- className: d("m-0", _t.title, _),
1254
- children: te
1255
- }), !r && w && /* @__PURE__ */ X(A, {
1258
+ className: h("m-0", xt.title, v),
1259
+ children: ee
1260
+ }), !r && T && /* @__PURE__ */ X(P, {
1256
1261
  label: p ? k : O,
1257
1262
  "aria-expanded": p,
1258
1263
  "aria-controls": l,
1259
- onClick: x
1264
+ onClick: S
1260
1265
  })]
1261
- }), r ? /* @__PURE__ */ Z(_e, { children: [/* @__PURE__ */ X("p", {
1266
+ }), r ? /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X("p", {
1262
1267
  "aria-hidden": !0,
1263
- className: d("m-0", _t.secondary, v),
1264
- children: y
1265
- }), i && /* @__PURE__ */ X(D, {
1268
+ className: h("m-0", xt.secondary, y),
1269
+ children: b
1270
+ }), i && /* @__PURE__ */ X(j, {
1266
1271
  className: "self-start",
1267
1272
  label: o?.retryLabel ?? "Retry",
1268
- onClick: S
1273
+ onClick: C
1269
1274
  })] }) : /* @__PURE__ */ X("ul", {
1270
1275
  id: l,
1271
- className: d("m-0 flex min-w-0 list-none gap-2 p-0", p ? "flex-wrap" : "flex-nowrap overflow-x-auto"),
1272
- children: T.map((e) => /* @__PURE__ */ X("li", {
1276
+ className: h("m-0 flex min-w-0 list-none gap-2 p-0", p ? "flex-wrap" : "flex-nowrap overflow-x-auto"),
1277
+ children: E.map((e) => /* @__PURE__ */ X("li", {
1273
1278
  className: "shrink-0",
1274
- children: /* @__PURE__ */ X(ve, {
1275
- attachment: yt(e),
1279
+ children: /* @__PURE__ */ X(Se, {
1280
+ attachment: Ct(e),
1276
1281
  onClick: t,
1277
1282
  isSelected: e.name === n,
1278
- labels: { clickLabel: E(e.name) }
1283
+ labels: { clickLabel: D(e.name) }
1279
1284
  })
1280
1285
  }, e.name))
1281
1286
  })]
1282
- }), /* @__PURE__ */ X(j, {
1287
+ }), /* @__PURE__ */ X(F, {
1283
1288
  visuallyHidden: !0,
1284
- children: r ? y : ""
1289
+ children: r ? b : ""
1285
1290
  })]
1286
1291
  });
1287
- }), xt = W(({ projectName: e, projectHref: t, onBack: n, onProjectLinkClick: r, backLabel: i, className: a, nameClassName: o = "dial-body-text" }) => /* @__PURE__ */ Z("nav", {
1292
+ }), Tt = "Remove from My List", Et = [
1293
+ "You will lose access to this item",
1294
+ "Other people keep their access",
1295
+ "You will need a new invitation to get it back"
1296
+ ], Dt = U(({ isOpen: e, projectName: r, isRemoving: i = !1, onConfirm: a, onClose: o, labels: s }) => /* @__PURE__ */ X(t, {
1297
+ open: e,
1298
+ title: s?.title ?? Tt,
1299
+ variant: w.Info,
1300
+ identity: /* @__PURE__ */ X(u, { children: /* @__PURE__ */ X(n, { name: r }) }),
1301
+ message: s?.message?.(r) ?? /* @__PURE__ */ Z(Y, { children: [
1302
+ "Remove ",
1303
+ /* @__PURE__ */ X("strong", { children: r }),
1304
+ " from your list? You'll need a new invitation to access it again."
1305
+ ] }),
1306
+ consequences: s?.consequences ?? Et,
1307
+ confirmLabel: s?.confirmLabel ?? Tt,
1308
+ cancelLabel: s?.cancelLabel ?? "Cancel",
1309
+ isLoading: i,
1310
+ loadingStatusLabel: s?.removingStatusLabel ?? "Removing…",
1311
+ onConfirm: a,
1312
+ onClose: o
1313
+ })), Ot = U(({ projectName: e, projectHref: t, onBack: n, onProjectLinkClick: r, backLabel: i, className: a, nameClassName: o = "dial-body-text" }) => /* @__PURE__ */ Z("nav", {
1288
1314
  "aria-label": i,
1289
- className: d("flex min-w-0 shrink-0 items-center gap-2 border-b px-4 py-2", a),
1290
- children: [/* @__PURE__ */ X(O, {
1315
+ className: h("flex max-w-full min-w-0 shrink-0 items-center gap-2 border-b px-4 py-2", a),
1316
+ children: [/* @__PURE__ */ X(ne, {
1291
1317
  "aria-label": i,
1292
- icon: /* @__PURE__ */ X(se, {
1318
+ icon: /* @__PURE__ */ X(z, {
1293
1319
  "aria-hidden": !0,
1294
- size: b.MD,
1295
- stroke: x,
1320
+ size: T.MD,
1321
+ stroke: E,
1296
1322
  className: "rtl:scale-x-[-1]"
1297
1323
  }),
1298
1324
  onClick: n
1299
1325
  }), /* @__PURE__ */ X("a", {
1300
1326
  href: t,
1301
1327
  onClick: r,
1302
- className: "min-w-0 hover:underline focus-visible:underline",
1303
- children: /* @__PURE__ */ X(C, {
1328
+ className: "block min-w-0 hover:underline focus-visible:underline",
1329
+ children: /* @__PURE__ */ X(O, {
1304
1330
  text: e,
1305
- className: d("min-w-0", o)
1331
+ className: h("min-w-0", o)
1306
1332
  })
1307
1333
  })]
1308
1334
  }));
1309
1335
  //#endregion
1310
- export { ze as ContextFileRejection, Ve as PROJECT_NAME_MAX_BYTES, xt as ProjectChatHeader, ht as ProjectConversationList, gt as ProjectConversationsPanel, ct as ProjectCreateForm, Be as ProjectNameError, bt as ProjectOutputs, Ie as ProjectSource, ft as ProjectView, Fe as Projects, Ce as ProjectsSortKey, tt as checkContextFiles, nt as filterContextFileItems, Xe as getContextFilesSize, Je as isStoredContextFile, Ke as validateProjectName };
1336
+ export { Ue as ContextFileRejection, Ge as PROJECT_NAME_MAX_BYTES, Ot as ProjectChatHeader, yt as ProjectConversationList, bt as ProjectConversationsPanel, ft as ProjectCreateForm, We as ProjectNameError, wt as ProjectOutputs, Dt as ProjectRemoveFromListConfirmation, Be as ProjectSource, gt as ProjectView, ze as Projects, De as ProjectsSortKey, at as checkContextFiles, ot as filterContextFileItems, et as getContextFilesSize, Qe as isStoredContextFile, Xe as validateProjectName };