@epam/ai-dial-projects 1.3.0-rc.4 → 1.3.0

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