@epam/ai-dial-scheduled-tasks 1.2.0-dev.28 → 1.2.0-dev.284

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/calendar-value-B41Uk26Z.js +24 -0
  2. package/components/ScheduledTaskCard/ScheduledTaskCard.d.ts +6 -5
  3. package/components/ScheduledTaskCard/ScheduledTaskCard.d.ts.map +1 -1
  4. package/components/ScheduledTaskCardGrid/ScheduledTaskCardGrid.d.ts +1 -1
  5. package/components/ScheduledTaskCardGrid/ScheduledTaskCardGrid.d.ts.map +1 -1
  6. package/components/ScheduledTaskConfigurationSection/ScheduledTaskConfigurationSection.d.ts +1 -1
  7. package/components/ScheduledTaskConfigurationSection/ScheduledTaskConfigurationSection.d.ts.map +1 -1
  8. package/components/ScheduledTaskCreateForm/ScheduledTaskCreateForm.d.ts +7 -6
  9. package/components/ScheduledTaskCreateForm/ScheduledTaskCreateForm.d.ts.map +1 -1
  10. package/components/ScheduledTaskDeleteConfirmation/ScheduledTaskDeleteConfirmation.d.ts +59 -0
  11. package/components/ScheduledTaskDeleteConfirmation/ScheduledTaskDeleteConfirmation.d.ts.map +1 -0
  12. package/components/ScheduledTaskDetailView/ScheduledTaskDetailView.d.ts.map +1 -1
  13. package/components/ScheduledTaskDetailsSection/ScheduledTaskDetailsSection.d.ts.map +1 -1
  14. package/components/ScheduledTaskDetailsSummary/ScheduledTaskDetailsSummary.d.ts.map +1 -1
  15. package/components/ScheduledTaskHistorySection/ScheduledTaskHistorySection.d.ts.map +1 -1
  16. package/components/ScheduledTaskRunAtField/ScheduledTaskRunAtField.d.ts +16 -0
  17. package/components/ScheduledTaskRunAtField/ScheduledTaskRunAtField.d.ts.map +1 -0
  18. package/components/ScheduledTaskRunHistoryList/ScheduledTaskRunHistoryList.d.ts.map +1 -1
  19. package/components/ScheduledTaskStatusPill/ScheduledTaskStatusPill.d.ts +16 -0
  20. package/components/ScheduledTaskStatusPill/ScheduledTaskStatusPill.d.ts.map +1 -0
  21. package/components/ScheduledTasks/ScheduledTasks.d.ts.map +1 -1
  22. package/constants/public-class-names.d.ts +12 -0
  23. package/constants/public-class-names.d.ts.map +1 -0
  24. package/index.css +2 -2
  25. package/index.d.ts +12 -2
  26. package/index.d.ts.map +1 -1
  27. package/index.js +982 -632
  28. package/models/scheduled-task-card-grid-props.d.ts +12 -5
  29. package/models/scheduled-task-card-grid-props.d.ts.map +1 -1
  30. package/models/scheduled-task-card-props.d.ts +11 -1
  31. package/models/scheduled-task-card-props.d.ts.map +1 -1
  32. package/models/scheduled-task-configuration-section-props.d.ts +4 -0
  33. package/models/scheduled-task-configuration-section-props.d.ts.map +1 -1
  34. package/models/scheduled-task-create-form-props.d.ts +51 -4
  35. package/models/scheduled-task-create-form-props.d.ts.map +1 -1
  36. package/models/scheduled-task-detail-view-props.d.ts +46 -2
  37. package/models/scheduled-task-detail-view-props.d.ts.map +1 -1
  38. package/models/scheduled-task-details-section-props.d.ts +4 -0
  39. package/models/scheduled-task-details-section-props.d.ts.map +1 -1
  40. package/models/scheduled-task-details-summary-props.d.ts +4 -0
  41. package/models/scheduled-task-details-summary-props.d.ts.map +1 -1
  42. package/models/scheduled-task-history-section-props.d.ts +21 -2
  43. package/models/scheduled-task-history-section-props.d.ts.map +1 -1
  44. package/models/scheduled-task-item.d.ts +20 -0
  45. package/models/scheduled-task-item.d.ts.map +1 -1
  46. package/models/scheduled-task-run-history-list-props.d.ts +8 -0
  47. package/models/scheduled-task-run-history-list-props.d.ts.map +1 -1
  48. package/models/scheduled-tasks-props.d.ts +9 -1
  49. package/models/scheduled-tasks-props.d.ts.map +1 -1
  50. package/package.json +9 -4
  51. package/types/scheduled-task-status.d.ts +15 -0
  52. package/types/scheduled-task-status.d.ts.map +1 -0
  53. package/utils/calendar-value.d.ts +2 -0
  54. package/utils/calendar-value.d.ts.map +1 -1
  55. package/utils/scheduled-task-form-values.d.ts +4 -0
  56. package/utils/scheduled-task-form-values.d.ts.map +1 -0
  57. package/utils/scheduled-task-status.d.ts +5 -0
  58. package/utils/scheduled-task-status.d.ts.map +1 -0
  59. package/validation/index.d.ts +3 -0
  60. package/validation/index.d.ts.map +1 -0
  61. package/validation/scheduled-task-validation.d.ts +57 -0
  62. package/validation/scheduled-task-validation.d.ts.map +1 -0
  63. package/validation.d.ts +3 -0
  64. package/validation.d.ts.map +1 -0
  65. package/validation.js +34 -0
package/index.js CHANGED
@@ -1,316 +1,461 @@
1
- import { MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as e, MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as t, MDMessageViewer as n, PanelEmptyState as r, buildCssVars as i, mergeClasses as a, useAvailableHeightCap as o, useIsMobile as s } from "@epam/ai-dial-chat-shared";
2
- import { ButtonAppearance as c, ButtonDropdown as l, ButtonVariant as u, Calendar as d, CalendarMode as f, CardShell as p, DIAL_ICON_SIZE as m, DIAL_KIT_ICON_STROKE as h, ElementSize as g, FolderPath as _, GhostButton as v, GhostIconButton as y, Highlight as b, Input as x, Label as S, MenuItemMark as C, NeutralButton as w, NumberInput as ee, PrimaryButton as te, Search as T, Select as ne, Skeleton as E, SkeletonVariant as D, Spinner as O, Switch as k, Tabs as re, Textarea as A } from "@epam/ai-dial-ui-kit";
3
- import { IconAlertTriangle as j, IconArrowLeft as ie, IconCircleCheck as M, IconCircleX as ae, IconClipboardX as N, IconPencilMinus as oe, IconPlayerPause as se, IconPlus as ce, IconTrashX as le } from "@tabler/icons-react";
4
- import { Suspense as ue, lazy as de, useCallback as P, useEffect as F, useId as I, useLayoutEffect as L, useMemo as fe, useRef as R, useState as pe } from "react";
5
- import { Fragment as z, jsx as B, jsxs as V } from "react/jsx-runtime";
6
- import { BuilderFormContainer as H } from "@epam/ai-dial-builder-form";
7
- import { LazyMarkdownEditor as me } from "@epam/ai-dial-ui-kit/editors";
8
- var U = {
9
- title: "_title_1hxc3_1",
10
- description: "_description_1hxc3_5",
11
- schedulePill: "_schedulePill_1hxc3_9",
12
- scheduleLabel: "_scheduleLabel_1hxc3_14",
13
- locationLabel: "_locationLabel_1hxc3_18",
14
- locationLeaf: "_locationLeaf_1hxc3_22",
15
- newBadge: "_newBadge_1hxc3_26",
16
- pausedPill: "_pausedPill_1hxc3_31",
17
- pausedLabel: "_pausedLabel_1hxc3_36",
18
- locationDivider: "_locationDivider_1hxc3_40"
19
- }, he = ({ item: e, searchQuery: t = "", onCardClick: n, labels: r, styles: o, className: s }) => {
20
- let c = r?.newBadgeLabel ?? "NEW", l = r?.pausedBadgeLabel ?? "Paused", { colors: u, typography: d } = o ?? {}, f = d?.titleClassName ?? "dial-body-semi-text", g = d?.descriptionClassName ?? "dial-small-text", v = d?.descriptionSizeClassName ?? "dial-tiny-text", y = d?.scheduleLabelClassName ?? "dial-tiny-text", x = d?.locationLabelClassName ?? "dial-tiny-text", S = d?.locationLeafClassName ?? "dial-tiny-semi-text", C = d?.newBadgeClassName ?? "dial-tiny-semi-text", w = d?.pausedBadgeClassName ?? "dial-tiny-text", ee = i({
21
- "--stc-title-text": u?.titleText,
22
- "--stc-desc-text": u?.descriptionText,
23
- "--stc-pill-bg": u?.schedulePillBackground,
24
- "--stc-pill-border": u?.schedulePillBorder,
25
- "--stc-schedule-label-text": u?.scheduleLabelText,
26
- "--stc-location-label-text": u?.locationLabelText,
27
- "--stc-location-leaf-text": u?.locationLeafText,
28
- "--stc-new-badge-bg": u?.newBadgeBackground,
29
- "--stc-new-badge-text": u?.newBadgeText,
30
- "--stc-location-divider-border": u?.locationDividerBorder,
31
- "--stc-paused-bg": u?.pausedBadgeBackground,
32
- "--stc-paused-border": u?.pausedBadgeBorder,
33
- "--stc-paused-text": u?.pausedBadgeText
34
- }), te = n ? {
1
+ import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./calendar-value-B41Uk26Z.js";
2
+ import { ConfirmationDialog as l, ConfirmationIdentityCard as u, ConfirmationIdentityRow as d, MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as f, MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as p, MDMessageViewer as m, PanelEmptyState as h, TextRefinementField as g, buildCssVars as _, mergeClasses as v, useAvailableHeightCap as y, useIsMobile as b, useTextRefinement as ee, useUnsavedChangesGuard as x } from "@epam/ai-dial-chat-shared";
3
+ import { ButtonAppearance as te, ButtonDropdown as ne, ButtonVariant as re, Calendar as S, CalendarMode as C, CardShell as w, ConfirmationPopupVariant as T, DIAL_ICON_SIZE as E, DIAL_KIT_ICON_STROKE as D, ElementSize as ie, FolderPath as O, GhostButton as k, GhostIconButton as ae, Highlight as A, Input as oe, Label as se, MenuItemMark as ce, NeutralButton as le, NumberInput as ue, PrimaryButton as de, Search as j, Select as fe, Skeleton as M, SkeletonVariant as N, Spinner as pe, Switch as me, Tabs as he, Textarea as ge } from "@epam/ai-dial-ui-kit";
4
+ import { IconAlertTriangle as _e, IconArrowNarrowLeft as ve, IconArrowsSort as P, IconCheck as ye, IconCircleCheck as F, IconCircleX as be, IconClipboardX as I, IconClockHour3 as L, IconPencilMinus as xe, IconPlayerPause as Se, IconPlayerPlay as R, IconPlus as z, IconTrashX as Ce } from "@tabler/icons-react";
5
+ import { Suspense as we, lazy as B, useCallback as Te, useEffect as Ee, useId as De, useLayoutEffect as V, useMemo as Oe, useRef as H, useState as ke } from "react";
6
+ import { Fragment as Ae, jsx as U, jsxs as W } from "react/jsx-runtime";
7
+ import { BuilderFormContainer as je } from "@epam/ai-dial-builder-form";
8
+ import { LazyMarkdownEditor as G } from "@epam/ai-dial-ui-kit/editors";
9
+ //#region src/constants/public-class-names.ts
10
+ var Me = {
11
+ card: "dial-scheduled-tasks-card",
12
+ cardGrid: "dial-scheduled-tasks-card-grid",
13
+ refineFeedback: "dial-scheduled-tasks-refine-feedback"
14
+ }, K = /* @__PURE__ */ function(e) {
15
+ return e.Scheduled = "scheduled", e.Paused = "paused", e.Completed = "completed", e;
16
+ }({}), Ne = /* @__PURE__ */ function(e) {
17
+ return e.Active = "active", e.Paused = "paused", e.Completed = "completed", e;
18
+ }({}), Pe = (e) => {
19
+ switch (e.presentationStatus) {
20
+ case Ne.Active: return K.Scheduled;
21
+ case Ne.Paused: return K.Paused;
22
+ case Ne.Completed: return K.Completed;
23
+ }
24
+ return e.isCompleted ? K.Completed : e.isActive === !1 ? K.Paused : K.Scheduled;
25
+ }, q = {
26
+ schedulePill: "_schedulePill_146jw_1",
27
+ scheduleLabel: "_scheduleLabel_146jw_6",
28
+ pausedPill: "_pausedPill_146jw_10",
29
+ pausedLabel: "_pausedLabel_146jw_15",
30
+ completedPill: "_completedPill_146jw_19",
31
+ completedLabel: "_completedLabel_146jw_24"
32
+ }, Fe = {
33
+ [K.Scheduled]: {
34
+ pillClassName: "inline-block rounded-lg border px-2 py-1",
35
+ wrapperClassName: q.schedulePill,
36
+ labelClassName: q.scheduleLabel
37
+ },
38
+ [K.Paused]: {
39
+ pillClassName: "inline-flex items-center gap-1.5 rounded-full border px-2 py-1",
40
+ wrapperClassName: q.pausedPill,
41
+ labelClassName: q.pausedLabel,
42
+ renderIcon: () => /* @__PURE__ */ U(Se, {
43
+ size: E.SM,
44
+ "aria-hidden": !0,
45
+ stroke: D
46
+ })
47
+ },
48
+ [K.Completed]: {
49
+ pillClassName: "inline-flex items-center gap-1.5 rounded-full border px-2 py-1",
50
+ wrapperClassName: q.completedPill,
51
+ labelClassName: q.completedLabel,
52
+ renderIcon: () => /* @__PURE__ */ U(ye, {
53
+ size: E.SM,
54
+ "aria-hidden": !0,
55
+ stroke: D
56
+ })
57
+ }
58
+ }, Ie = ({ status: e, text: t, textClassName: n = "dial-tiny-text", className: r }) => {
59
+ let { pillClassName: i, wrapperClassName: a, labelClassName: o, renderIcon: s } = Fe[e];
60
+ return /* @__PURE__ */ W("span", {
61
+ className: v(i, n, a, o, r),
62
+ children: [s && s(), t]
63
+ });
64
+ }, J = {
65
+ title: "_title_ogabr_1",
66
+ description: "_description_ogabr_5",
67
+ locationLabel: "_locationLabel_ogabr_9",
68
+ locationLeaf: "_locationLeaf_ogabr_13",
69
+ newBadge: "_newBadge_ogabr_17",
70
+ locationDivider: "_locationDivider_ogabr_22"
71
+ }, Le = ({ item: e, searchQuery: t = "", onCardClick: n, labels: r, styles: i, className: a }) => {
72
+ let o = r?.newBadgeLabel ?? "NEW", s = r?.pausedBadgeLabel ?? "Paused", c = r?.completedBadgeLabel ?? "Completed", { colors: l, typography: u } = i ?? {}, d = u?.titleClassName ?? "dial-body-semi-text", f = u?.descriptionClassName ?? "dial-small-text", p = u?.descriptionSizeClassName ?? "dial-tiny-text", m = u?.scheduleLabelClassName ?? "dial-tiny-text", h = u?.pausedBadgeClassName ?? "dial-tiny-text", g = u?.completedBadgeClassName ?? "dial-tiny-text", y = u?.locationLabelClassName ?? "dial-tiny-text", b = u?.locationLeafClassName ?? "dial-tiny-semi-text", ee = u?.newBadgeClassName ?? "dial-tiny-semi-text", x = Pe(e), { text: te, textClassName: ne } = {
73
+ [K.Scheduled]: {
74
+ text: e.scheduleLabel,
75
+ textClassName: m
76
+ },
77
+ [K.Paused]: {
78
+ text: s,
79
+ textClassName: h
80
+ },
81
+ [K.Completed]: {
82
+ text: c,
83
+ textClassName: g
84
+ }
85
+ }[x], re = _({
86
+ "--stc-title-text": l?.titleText,
87
+ "--stc-desc-text": l?.descriptionText,
88
+ "--stc-pill-bg": l?.schedulePillBackground,
89
+ "--stc-pill-border": l?.schedulePillBorder,
90
+ "--stc-schedule-label-text": l?.scheduleLabelText,
91
+ "--stc-location-label-text": l?.locationLabelText,
92
+ "--stc-location-leaf-text": l?.locationLeafText,
93
+ "--stc-new-badge-bg": l?.newBadgeBackground,
94
+ "--stc-new-badge-text": l?.newBadgeText,
95
+ "--stc-location-divider-border": l?.locationDividerBorder,
96
+ "--stc-paused-bg": l?.pausedBadgeBackground,
97
+ "--stc-paused-border": l?.pausedBadgeBorder,
98
+ "--stc-paused-text": l?.pausedBadgeText,
99
+ "--stc-completed-bg": l?.completedBadgeBackground,
100
+ "--stc-completed-border": l?.completedBadgeBorder,
101
+ "--stc-completed-text": l?.completedBadgeText
102
+ }), S = n ? {
35
103
  tabIndex: 0,
36
104
  onClick: () => n(e.id),
37
105
  onKeyDown: (t) => {
38
106
  (t.key === "Enter" || t.key === " ") && (t.preventDefault(), n(e.id));
39
107
  }
40
108
  } : {};
41
- return /* @__PURE__ */ V(p, {
109
+ return /* @__PURE__ */ W(w, {
42
110
  role: n ? "button" : "group",
43
111
  "aria-label": e.displayName,
44
- style: ee,
45
- className: a("h-[232px]", n && "cursor-pointer", s),
46
- ...te,
112
+ style: re,
113
+ className: v("h-[var(--st-card-height,232px)]", n && "cursor-pointer", a, Me.card),
114
+ ...S,
47
115
  children: [
48
- /* @__PURE__ */ V("div", {
116
+ /* @__PURE__ */ W("div", {
49
117
  className: "flex min-w-0 shrink-0 items-center gap-2",
50
- children: [/* @__PURE__ */ B(b, {
118
+ children: [/* @__PURE__ */ U(A, {
51
119
  text: e.displayName,
52
120
  query: t,
53
121
  maxLines: 1,
54
- className: a(f, U.title)
55
- }), e.isNew && /* @__PURE__ */ B("span", {
56
- className: a("shrink-0 rounded-full px-2 py-0.5", C, U.newBadge),
57
- children: c
122
+ className: v(d, J.title)
123
+ }), e.isNew && /* @__PURE__ */ U("span", {
124
+ className: v("shrink-0 rounded-full px-2 py-0.5", ee, J.newBadge),
125
+ children: o
58
126
  })]
59
127
  }),
60
- e.descriptionPreview && /* @__PURE__ */ B("p", {
61
- className: a("line-clamp-4 min-h-0 flex-1 overflow-hidden", v, g, U.description),
128
+ e.descriptionPreview && /* @__PURE__ */ U("p", {
129
+ className: v("line-clamp-4 min-h-0 flex-1 overflow-hidden", p, f, J.description),
62
130
  children: e.descriptionPreview
63
131
  }),
64
- /* @__PURE__ */ V("div", {
132
+ /* @__PURE__ */ W("div", {
65
133
  className: "mt-auto flex shrink-0 flex-col gap-3",
66
- children: [/* @__PURE__ */ B("div", {
134
+ children: [/* @__PURE__ */ U("div", {
67
135
  className: "flex min-h-[28px] items-center",
68
- children: e.isActive === !1 ? /* @__PURE__ */ V("span", {
69
- className: a("inline-flex items-center gap-1.5 rounded-full border px-2 py-1", U.pausedPill, w, U.pausedLabel),
70
- children: [/* @__PURE__ */ B(se, {
71
- size: m.SM,
72
- "aria-hidden": !0,
73
- stroke: h
74
- }), l]
75
- }) : /* @__PURE__ */ B("span", {
76
- className: a("inline-block rounded-lg border px-2 py-1", U.schedulePill, y, U.scheduleLabel),
77
- children: e.scheduleLabel
136
+ children: /* @__PURE__ */ U(Ie, {
137
+ status: x,
138
+ text: te,
139
+ textClassName: ne
78
140
  })
79
- }), e.locationSegments && e.locationSegments.length > 0 && /* @__PURE__ */ B(_, {
141
+ }), e.locationSegments && e.locationSegments.length > 0 && /* @__PURE__ */ U(O, {
80
142
  segments: e.locationSegments,
81
- labelClassName: a(x, U.locationLabel),
82
- leafClassName: a(S, U.locationLeaf),
83
- className: a("pt-3", U.locationDivider)
143
+ labelClassName: v(y, J.locationLabel),
144
+ leafClassName: v(b, J.locationLeaf),
145
+ className: v("pt-3", J.locationDivider)
84
146
  })]
85
147
  })
86
148
  ]
87
149
  });
88
- }, ge = { card: "_card_11bez_1" }, _e = [
150
+ }, Re = { card: "_card_11bez_1" }, ze = [
89
151
  "100%",
90
152
  "100%",
91
153
  "61%"
92
- ], W = "var(--stcs-skeleton-bg)", G = ({ styles: e }) => /* @__PURE__ */ V(p, {
154
+ ], Be = "var(--stcs-skeleton-bg)", Ve = ({ styles: e }) => /* @__PURE__ */ W(w, {
93
155
  "aria-hidden": !0,
94
- style: i({ "--stcs-skeleton-bg": e?.colors?.skeletonColor }),
95
- className: a("h-[232px]", ge.card),
156
+ style: _({ "--stcs-skeleton-bg": e?.colors?.skeletonColor }),
157
+ className: v("h-[var(--st-card-height,232px)]", Re.card),
96
158
  children: [
97
- /* @__PURE__ */ B(E, {
98
- variant: D.Rectangular,
159
+ /* @__PURE__ */ U(M, {
160
+ variant: N.Rectangular,
99
161
  width: "60%",
100
162
  height: "20px",
101
- color: W,
163
+ color: Be,
102
164
  className: "shrink-0"
103
165
  }),
104
- /* @__PURE__ */ B("div", {
166
+ /* @__PURE__ */ U("div", {
105
167
  className: "flex min-h-0 flex-1 flex-col gap-3 overflow-hidden",
106
- children: _e.map((e, t) => /* @__PURE__ */ B(E, {
107
- variant: D.Rectangular,
168
+ children: ze.map((e, t) => /* @__PURE__ */ U(M, {
169
+ variant: N.Rectangular,
108
170
  width: e,
109
171
  height: "16px",
110
- color: W
172
+ color: Be
111
173
  }, t))
112
174
  }),
113
- /* @__PURE__ */ B(E, {
114
- variant: D.Rectangular,
175
+ /* @__PURE__ */ U(M, {
176
+ variant: N.Rectangular,
115
177
  width: "110px",
116
178
  height: "28px",
117
- color: W,
179
+ color: Be,
118
180
  className: "shrink-0 rounded-lg"
119
181
  })
120
182
  ]
121
- }), ve = ({ items: e, searchQuery: t, onCardClick: n, labels: r, cardStyles: i, trailingSkeletonCount: a = 0, skeletonStyles: o }) => /* @__PURE__ */ V("div", {
122
- className: "grid grid-cols-1 gap-5 desktop:grid-cols-3",
123
- children: [e.map((e) => /* @__PURE__ */ B(he, {
183
+ }), He = ({ items: e, searchQuery: t, onCardClick: n, labels: r, cardStyles: i, trailingSkeletonCount: a = 0, skeletonStyles: o, layout: s }) => /* @__PURE__ */ W("div", {
184
+ style: {
185
+ "--st-grid-min-card-width": s?.minCardWidth,
186
+ "--st-grid-gap": s?.gap,
187
+ "--st-card-height": s?.cardHeight,
188
+ "--st-grid-columns": s?.maxColumns ?? 3,
189
+ maxWidth: s?.maxWidth ?? "1180px",
190
+ gap: "var(--st-grid-gap, 20px)",
191
+ gridTemplateColumns: "repeat(auto-fill, minmax(min(100%, max(var(--st-grid-min-card-width, 320px), calc((100% - (var(--st-grid-columns) - 1) * var(--st-grid-gap, 20px)) / var(--st-grid-columns)))), 1fr))"
192
+ },
193
+ className: v("mx-auto grid w-full min-w-0", Me.cardGrid),
194
+ children: [e.map((e) => /* @__PURE__ */ U(Le, {
124
195
  item: e,
125
196
  searchQuery: t,
126
197
  onCardClick: n,
127
198
  labels: r,
128
199
  styles: i
129
- }, e.id)), Array.from({ length: a }, (e, t) => /* @__PURE__ */ B(G, { styles: o }, `skeleton-${t}`))]
130
- }), K = {
131
- container: "_container_1ct1h_2",
132
- subtitle: "_subtitle_1ct1h_6",
133
- sortButton: "_sortButton_1ct1h_10",
134
- createButton: "_createButton_1ct1h_19",
135
- sortControlHidden: "_sortControlHidden_1ct1h_40"
136
- }, ye = (e, t, n, r, i, a) => {
200
+ }, e.id)), Array.from({ length: a }, (e, t) => /* @__PURE__ */ U(Ve, { styles: o }, `skeleton-${t}`))]
201
+ }), Y = {
202
+ container: "_container_3vz4t_2",
203
+ subtitle: "_subtitle_3vz4t_6",
204
+ createButtonLabel: "_createButtonLabel_3vz4t_10",
205
+ sortButton: "_sortButton_3vz4t_19",
206
+ createButton: "_createButton_3vz4t_10",
207
+ sortControlHidden: "_sortControlHidden_3vz4t_49"
208
+ }, Ue = /* @__PURE__ */ U(L, {
209
+ size: 48,
210
+ stroke: 1,
211
+ "aria-hidden": !0
212
+ }), We = (e, t, n, r, i, a) => {
137
213
  if (!e) return t ? a.loadingMoreLabel : n ? a.errorLabel : r > 0 ? `${r}` : i ? a.noResultsLabel : a.emptyStateLabel;
138
- }, be = (e) => {
214
+ }, Ge = (e) => {
139
215
  if (!e || e === document.body) return null;
140
216
  let { overflow: t, overflowY: n } = getComputedStyle(e);
141
- return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e : be(e.parentElement);
142
- }, xe = ({ labels: e, onCreateClick: t, searchQuery: n, onSearchQueryChange: o, sortKey: s, onSortChange: d, items: f, isLoading: p = !1, error: _, onRetry: y, hasMore: b = !1, isLoadingMore: x = !1, skeletonCount: S = 6, onLoadMore: w, onCardClick: ee, banner: ne, styles: E }) => {
143
- let { colors: D, typography: k } = E ?? {}, re = k?.titleClassName ?? "dial-h1-text", A = k?.subtitleClassName ?? "dial-body-text", j = i({
144
- "--st-bg": D?.background,
145
- "--st-subtitle-text": D?.subtitleText,
146
- "--st-sort-text": D?.sortButtonText
147
- }), ie = (e) => {
148
- o(e ?? "");
149
- }, [M, ae] = pe(!1), [N, oe] = pe(!1), se = R(null), le = P(() => {
150
- oe(!0);
151
- }, []), ue = P(() => {
152
- oe(!1);
217
+ return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e : Ge(e.parentElement);
218
+ }, Ke = ({ labels: e, onCreateClick: t, searchQuery: n, onSearchQueryChange: r, sortKey: i, onSortChange: a, items: o, isLoading: s = !1, error: c, onRetry: l, hasMore: u = !1, isLoadingMore: d = !1, skeletonCount: f = 6, onLoadMore: p, onCardClick: m, banner: g, styles: y, sortIcon: b, className: ee, gridLayout: x, cardStyles: S, loadMoreError: C, onRetryLoadMore: w }) => {
219
+ let { colors: T, typography: O } = y ?? {}, ae = O?.titleClassName ?? "dial-h1-text", A = O?.subtitleClassName ?? "dial-body-text", oe = _({
220
+ "--st-bg": T?.background,
221
+ "--st-subtitle-text": T?.subtitleText,
222
+ "--st-sort-text": T?.sortButtonText
223
+ }), se = (e) => {
224
+ r(e ?? "");
225
+ }, [le, ue] = ke(!1), [fe, M] = ke(!1), N = H(null), me = Te(() => {
226
+ M(!0);
227
+ }, []), he = Te(() => {
228
+ M(!1);
153
229
  }, []);
154
- L(() => {
155
- let e = se.current;
156
- N && M && e != null && e.offsetParent == null && ae(!1);
157
- }, [N, M]);
158
- let de = e.sortOptions.find((e) => e.value === s)?.label ?? e.sortLabel, I = fe(() => e.sortOptions.map((e) => ({
230
+ V(() => {
231
+ let e = N.current;
232
+ fe && le && e != null && e.offsetParent == null && ue(!1);
233
+ }, [fe, le]);
234
+ let ge = e.sortOptions.find((e) => e.value === i)?.label ?? e.sortLabel, _e = Oe(() => e.sortOptions.map((e) => ({
159
235
  key: e.value,
160
236
  label: e.label,
161
- mark: C.Check,
162
- checked: e.value === s,
163
- onClick: () => d(e.value)
237
+ mark: ce.Check,
238
+ checked: e.value === i,
239
+ onClick: () => a(e.value)
164
240
  })), [
165
241
  e.sortOptions,
166
- s,
167
- d
168
- ]), z = ye(p, x, !!_, f.length, n.trim().length > 0, e), H = R(null);
169
- F(() => {
170
- let e = H.current;
171
- if (!e || !w) return;
172
- let t = be(e.parentElement);
242
+ i,
243
+ a
244
+ ]), ve = We(s, d, !!c, o.length, n.trim().length > 0, e), ye = H(null);
245
+ Ee(() => {
246
+ let e = ye.current;
247
+ if (!e || !p) return;
248
+ let t = Ge(e.parentElement);
173
249
  if (!t) return;
174
250
  let n = () => {
175
- if (x || p || !b) return;
251
+ if (d || s || C || !u) return;
176
252
  let n = t.getBoundingClientRect(), r = e.getBoundingClientRect();
177
- r.top < n.bottom && r.bottom > n.top && w();
253
+ r.top < n.bottom && r.bottom > n.top && p();
178
254
  };
179
255
  return t.addEventListener("scroll", n, { passive: !0 }), n(), () => t.removeEventListener("scroll", n);
180
256
  }, [
181
- b,
182
- x,
183
- p,
184
- w
257
+ u,
258
+ d,
259
+ s,
260
+ C,
261
+ p
185
262
  ]);
186
- let me = () => p ? /* @__PURE__ */ B(O, {}) : _ ? /* @__PURE__ */ V("div", {
263
+ let F = () => s ? /* @__PURE__ */ U(pe, {}) : c ? /* @__PURE__ */ W("div", {
187
264
  className: "flex flex-col items-center gap-3",
188
- children: [/* @__PURE__ */ B("p", {
189
- className: a(A, K.subtitle),
265
+ children: [/* @__PURE__ */ U("p", {
266
+ className: v(A, Y.subtitle),
190
267
  children: e.errorLabel
191
- }), /* @__PURE__ */ B(v, {
268
+ }), /* @__PURE__ */ U(k, {
192
269
  label: e.retryLabel,
193
- onClick: y
270
+ onClick: l
194
271
  })]
195
- }) : f.length === 0 ? n.trim() ? /* @__PURE__ */ B("p", {
196
- className: a(A, K.subtitle),
272
+ }) : o.length === 0 ? n.trim() ? /* @__PURE__ */ U("p", {
273
+ className: v(A, Y.subtitle),
197
274
  children: e.noResultsLabel
198
- }) : /* @__PURE__ */ B(r, { label: e.emptyStateLabel }) : /* @__PURE__ */ V("div", {
275
+ }) : /* @__PURE__ */ U(h, {
276
+ label: e.emptyStateLabel,
277
+ icon: Ue
278
+ }) : /* @__PURE__ */ W("div", {
199
279
  className: "flex w-full flex-col gap-6",
200
- children: [/* @__PURE__ */ B(ve, {
201
- items: f,
202
- searchQuery: n,
203
- onCardClick: ee,
204
- labels: e.cardLabels,
205
- trailingSkeletonCount: x ? S : 0,
206
- skeletonStyles: { colors: { skeletonColor: D?.skeletonColor } }
207
- }), /* @__PURE__ */ B("div", {
208
- ref: H,
209
- "aria-hidden": !0,
210
- className: "h-px w-full"
211
- })]
212
- }), U = p || !!_ || f.length === 0;
213
- return /* @__PURE__ */ V("div", {
214
- style: j,
215
- className: a("flex h-full w-full flex-col gap-6 overflow-y-auto px-8 py-4", K.container),
216
280
  children: [
217
- /* @__PURE__ */ V("div", {
281
+ /* @__PURE__ */ U(He, {
282
+ items: o,
283
+ searchQuery: n,
284
+ onCardClick: m,
285
+ labels: e.cardLabels,
286
+ trailingSkeletonCount: d ? f : 0,
287
+ skeletonStyles: { colors: { skeletonColor: T?.skeletonColor } },
288
+ cardStyles: S,
289
+ layout: x
290
+ }),
291
+ C && /* @__PURE__ */ W("div", {
292
+ role: "alert",
293
+ className: "flex items-center gap-3",
294
+ children: [/* @__PURE__ */ U("span", {
295
+ className: v(A, Y.subtitle),
296
+ children: e.loadMoreErrorLabel ?? e.errorLabel
297
+ }), /* @__PURE__ */ U(k, {
298
+ label: e.retryLabel,
299
+ onClick: w
300
+ })]
301
+ }),
302
+ /* @__PURE__ */ U("div", {
303
+ ref: ye,
304
+ "aria-hidden": !0,
305
+ className: "h-px w-full"
306
+ })
307
+ ]
308
+ }), be = s || !!c || o.length === 0;
309
+ return /* @__PURE__ */ W("div", {
310
+ style: oe,
311
+ className: v("flex h-full w-full flex-col gap-6 overflow-y-auto px-8 py-4", Y.container, ee),
312
+ children: [
313
+ /* @__PURE__ */ W("div", {
218
314
  className: "flex items-start justify-between gap-4",
219
- children: [/* @__PURE__ */ V("div", {
315
+ children: [/* @__PURE__ */ W("div", {
220
316
  className: "min-w-0 gap-2",
221
- children: [/* @__PURE__ */ B("h1", {
222
- className: a("truncate", re),
317
+ children: [/* @__PURE__ */ U("h1", {
318
+ className: v("truncate", ae),
223
319
  children: e.title
224
- }), /* @__PURE__ */ B("p", {
225
- className: a("mt-1", A, K.subtitle),
320
+ }), /* @__PURE__ */ U("p", {
321
+ className: v("mt-1", A, Y.subtitle),
226
322
  children: e.subtitle
227
323
  })]
228
- }), /* @__PURE__ */ B(te, {
324
+ }), /* @__PURE__ */ U(de, {
229
325
  label: e.createButtonLabel,
230
- textClassName: "hidden desktop:inline",
326
+ textClassName: Y.createButtonLabel,
231
327
  "aria-label": e.createButtonLabel,
232
- iconBefore: /* @__PURE__ */ B(ce, {
233
- size: m.SM,
328
+ iconBefore: /* @__PURE__ */ U(z, {
329
+ size: E.SM,
234
330
  "aria-hidden": !0,
235
- stroke: h
331
+ stroke: D
236
332
  }),
237
333
  onClick: t,
238
- className: a("shrink-0", K.createButton)
334
+ className: v("shrink-0", Y.createButton)
239
335
  })]
240
336
  }),
241
- /* @__PURE__ */ V("div", {
337
+ /* @__PURE__ */ W("div", {
242
338
  className: "flex flex-wrap items-center gap-3",
243
- children: [/* @__PURE__ */ B("div", {
339
+ children: [/* @__PURE__ */ U("div", {
244
340
  role: "search",
245
341
  className: "flex-1",
246
- children: /* @__PURE__ */ B(T, {
342
+ children: /* @__PURE__ */ U(j, {
247
343
  value: n,
248
- onChange: ie,
344
+ onChange: se,
249
345
  placeholder: e.searchPlaceholder,
250
346
  clearLabel: e.clearSearchLabel,
251
347
  "aria-label": e.searchAriaLabel,
252
- size: g.Large,
253
- onFocus: le,
254
- onBlur: ue
348
+ size: ie.Large,
349
+ onFocus: me,
350
+ onBlur: he
255
351
  })
256
- }), e.sortOptions.length > 0 && /* @__PURE__ */ B("div", {
257
- ref: se,
258
- className: a(N && K.sortControlHidden),
259
- children: /* @__PURE__ */ B(l, {
260
- items: I,
261
- label: de,
262
- variant: u.Primary,
263
- appearance: c.Ghost,
264
- className: K.sortButton
352
+ }), e.sortOptions.length > 0 && /* @__PURE__ */ U("div", {
353
+ ref: N,
354
+ className: v(fe && Y.sortControlHidden),
355
+ children: /* @__PURE__ */ U(ne, {
356
+ items: _e,
357
+ label: ge,
358
+ variant: re.Primary,
359
+ appearance: te.Ghost,
360
+ iconBefore: b === void 0 ? /* @__PURE__ */ U(P, {
361
+ size: E.SM,
362
+ "aria-hidden": !0,
363
+ stroke: D
364
+ }) : b,
365
+ className: Y.sortButton
265
366
  })
266
367
  })]
267
368
  }),
268
- ne,
269
- /* @__PURE__ */ B("span", {
369
+ g,
370
+ /* @__PURE__ */ U("span", {
270
371
  role: "status",
271
372
  "aria-live": "polite",
272
373
  className: "sr-only",
273
- children: z
374
+ children: ve
274
375
  }),
275
- /* @__PURE__ */ B("div", {
276
- className: a("mx-auto flex size-full w-full max-w-[1180px] flex-col", U && "items-center justify-center"),
277
- children: me()
376
+ /* @__PURE__ */ U("div", {
377
+ className: v("mx-auto flex size-full w-full min-w-0 flex-col", be && "items-center justify-center"),
378
+ children: F()
278
379
  })
279
380
  ]
280
381
  });
281
- }, Se = /* @__PURE__ */ function(e) {
382
+ }, qe = /* @__PURE__ */ function(e) {
282
383
  return e.FirstToRun = "firstToRun", e.LastToRun = "lastToRun", e.Newest = "newest", e.NameAZ = "nameAZ", e;
283
- }({}), Ce = 500, q = /* @__PURE__ */ function(e) {
284
- return e.OneTime = "oneTime", e.Hourly = "hourly", e.Daily = "daily", e.Weekly = "weekly", e.Monthly = "monthly", e;
285
- }({}), J = (e) => String(e).padStart(2, "0"), we = (e) => e ? new Date(e) : null, Te = (e) => {
286
- if (e == null) return "";
287
- let t = e instanceof Date ? e : new Date(e);
288
- return Number.isNaN(t.getTime()) ? "" : `${t.getFullYear()}-${J(t.getMonth() + 1)}-${J(t.getDate())}T${J(t.getHours())}:${J(t.getMinutes())}`;
289
- }, Ee = (e) => {
290
- if (!e) return null;
291
- let [t, n, r] = e.split("-").map(Number);
292
- return new Date(t, n - 1, r);
293
- }, De = (e) => {
294
- if (e == null) return "";
295
- let t = e instanceof Date ? e : new Date(e);
296
- return Number.isNaN(t.getTime()) ? "" : `${t.getFullYear()}-${J(t.getMonth() + 1)}-${J(t.getDate())}`;
297
- }, Oe = (e) => {
298
- let t = Number(e);
299
- return e && Number.isFinite(t) ? String(t + 1) : null;
300
- }, ke = (e) => {
301
- let t = typeof e == "string" ? Number(e) : NaN;
302
- return Number.isFinite(t) ? String(t - 1) : "";
303
- }, Y = {
304
- detailsColumn: "_detailsColumn_1mg3v_1",
305
- sectionSubtitle: "_sectionSubtitle_1mg3v_5",
306
- instructionsError: "_instructionsError_1mg3v_9"
307
- }, Ae = de(async () => ({ default: (await me()).MarkdownEditor })), je = ({ labels: n, values: r, errors: s, modelSelector: c, modelLabelId: l, onFieldChange: u, onBack: p, onCancel: m, onSubmit: h, isSubmitting: g = !1, markdownEditorTheme: _, styles: v }) => {
308
- let y = I(), b = o(), { colors: C, typography: w } = v ?? {}, te = w?.titleClassName ?? "dial-h1-text", T = w?.sectionTitleClassName ?? "dial-body-semi-text", E = w?.sectionSubtitleClassName ?? "dial-tiny-text", D = w?.instructionsLabelClassName ?? "dial-body-semi-text mb-1", k = w?.instructionsErrorClassName ?? "dial-small-text", re = i({
309
- "--stcf-details-border": C?.detailsColumnBorder,
310
- "--stcf-subtitle-text": C?.sectionSubtitleText,
311
- "--stcf-error-text": C?.instructionsErrorText
312
- }), j = g || !r.displayName.trim() || !r.modelId || !r.prompt.trim();
313
- return /* @__PURE__ */ B(H, {
384
+ }({}), Je = (e) => e == null ? "" : typeof e == "string" ? e.trim() : Array.isArray(e) ? e.length ? JSON.stringify(e) : "" : JSON.stringify(e), Ye = (e, t) => {
385
+ let n = new Set([...Object.keys(e), ...Object.keys(t)]);
386
+ for (let r of n) if (Je(e[r]) !== Je(t[r])) return !0;
387
+ return !1;
388
+ }, Xe = { error: "_error_v2pfn_4" }, Ze = ({ label: e, value: t, onChange: r, error: i, errorClassName: a = "dial-small-text" }) => {
389
+ let o = H(/* @__PURE__ */ new Date()).current;
390
+ return /* @__PURE__ */ W("div", {
391
+ className: "flex flex-col gap-1",
392
+ children: [/* @__PURE__ */ U(S, {
393
+ id: "scheduled-task-run-at",
394
+ mode: C.DateTime,
395
+ value: s(t),
396
+ onChange: (e) => r(n(e)),
397
+ minDate: o,
398
+ labelProps: {
399
+ label: e,
400
+ required: !0
401
+ },
402
+ invalid: !!i
403
+ }), i && /* @__PURE__ */ U("p", {
404
+ className: v(a, Xe.error),
405
+ children: i
406
+ })]
407
+ });
408
+ }, X = {
409
+ formColumn: "_formColumn_1gu82_1",
410
+ detailsColumn: "_detailsColumn_1gu82_10",
411
+ sectionSubtitle: "_sectionSubtitle_1gu82_14",
412
+ instructionsError: "_instructionsError_1gu82_18",
413
+ refineFeedback: "_refineFeedback_1gu82_22",
414
+ refineError: "_refineError_1gu82_26"
415
+ }, Qe = B(async () => ({ default: (await G()).MarkdownEditor })), $e = ({ labels: n, values: r, initialValues: s, errors: u, modelSelector: d, modelLabelId: m, skillSelector: h, onFieldChange: b, onBack: te, onCancel: ne, onSubmit: re, isSubmitting: w = !1, onRefineDescription: ie, onRefineInstructions: O, markdownEditorTheme: k, backIcon: ae, className: A, styles: ce }) => {
416
+ let le = De(), de = De(), j = H(void 0), M = (e) => e ? async (t, n) => {
417
+ if (j.current && !j.current.aborted) throw new DOMException("Busy", "AbortError");
418
+ j.current = n;
419
+ try {
420
+ return await e(t, n);
421
+ } finally {
422
+ j.current === n && (j.current = void 0);
423
+ }
424
+ } : void 0, N = ee({
425
+ value: r.description ?? "",
426
+ onChange: (e) => b("description", e),
427
+ onRefine: M(ie),
428
+ disabled: w
429
+ }), me = ee({
430
+ value: r.prompt,
431
+ onChange: (e) => b("prompt", e),
432
+ onRefine: M(O),
433
+ disabled: w
434
+ }), he = N.isPending || me.isPending, _e = () => {
435
+ N.reset(), me.reset();
436
+ }, P = x(!!(s && Ye(r, s))), ye = () => P.guard(() => {
437
+ _e(), te();
438
+ }), F = () => P.guard(() => {
439
+ _e(), ne();
440
+ }), be = y(), I = !r.skillUrls?.length, [L, xe] = ke(), Se = H(/* @__PURE__ */ new Date()).current, { colors: R, typography: z, layout: Ce } = ce ?? {}, B = z?.titleClassName ?? "dial-h1-text", Te = z?.sectionTitleClassName ?? "dial-body-semi-text", V = z?.sectionSubtitleClassName ?? "dial-tiny-text", Oe = z?.instructionsLabelClassName ?? "dial-body-semi-text mb-1", G = z?.instructionsErrorClassName ?? "dial-small-text", K = _({
441
+ "--stcf-details-border": R?.detailsColumnBorder,
442
+ "--stcf-subtitle-text": R?.sectionSubtitleText,
443
+ "--stcf-error-text": R?.instructionsErrorText,
444
+ "--stcf-refine-action-text": R?.refineActionText,
445
+ "--stcf-refine-error-text": R?.refineErrorText
446
+ }), Ne = {
447
+ feedbackClassName: v(X.refineFeedback, z?.refineFeedbackClassName ?? "dial-small-text", Me.refineFeedback),
448
+ errorClassName: X.refineError
449
+ }, Pe = (e) => {
450
+ xe(c.test(e.target.value) ? void 0 : n.timeInvalidLabel), b("time", e.target.value);
451
+ }, q = (e) => {
452
+ xe(void 0), b("time", typeof e == "string" ? e : "");
453
+ }, Fe = r.repeat !== t.OneTime && r.repeat !== t.Hourly;
454
+ Ee(() => {
455
+ Fe || xe(void 0);
456
+ }, [Fe]);
457
+ let Ie = Fe ? L ?? u.time : void 0, J = (e) => b("runAt", e), Le = w || he || !r.displayName.trim() || !r.modelId || !r.prompt.trim() && !r.skillUrls?.length || !!u.skillUrls || Fe && !r.time || !!Ie;
458
+ return /* @__PURE__ */ W(Ae, { children: [/* @__PURE__ */ U(je, {
314
459
  labels: {
315
460
  title: n.pageTitle,
316
461
  backButtonLabel: n.backButtonLabel,
@@ -318,189 +463,212 @@ var U = {
318
463
  submitButtonLabel: n.createButtonLabel,
319
464
  submittingLabel: n.submittingLabel ?? "Saving"
320
465
  },
321
- onBack: p,
322
- onCancel: m,
323
- onSubmit: h,
324
- isCancelDisabled: g,
325
- isSubmitDisabled: j,
326
- isSubmitting: g,
466
+ onBack: ye,
467
+ onCancel: F,
468
+ onSubmit: () => {
469
+ !Le && (!j.current || j.current.aborted) && re();
470
+ },
471
+ isCancelDisabled: w,
472
+ isSubmitDisabled: Le,
473
+ isSubmitting: w,
474
+ backIcon: ae === void 0 ? /* @__PURE__ */ U(ve, {
475
+ size: E.LG,
476
+ stroke: D,
477
+ "aria-hidden": !0,
478
+ className: "rtl:scale-x-[-1]"
479
+ }) : ae,
480
+ layout: {
481
+ sideColumnWidth: Ce?.detailsWidth,
482
+ columnGap: Ce?.columnGap,
483
+ reserveEndColumn: !1
484
+ },
485
+ className: A,
327
486
  styles: {
328
- colors: { background: C?.background },
487
+ colors: { background: R?.background },
329
488
  header: {
330
- colors: { borderColor: C?.headerBorder },
331
- typography: { fontClassName: te }
489
+ colors: { borderColor: R?.headerBorder },
490
+ typography: { fontClassName: B }
332
491
  },
333
- cssVars: re
492
+ cssVars: K
334
493
  },
335
- left: /* @__PURE__ */ V("div", {
494
+ left: /* @__PURE__ */ W("div", {
336
495
  role: "group",
337
496
  "aria-label": n.detailsSectionTitle,
338
- className: a("flex flex-1 flex-col gap-5 border-e px-4 py-6 desktop:px-8", Y.detailsColumn),
497
+ className: v("flex flex-1 flex-col gap-5 border-e py-6", X.detailsColumn, X.formColumn),
339
498
  children: [
340
- /* @__PURE__ */ V("div", {
499
+ /* @__PURE__ */ W("div", {
341
500
  className: "flex flex-col gap-1",
342
- children: [/* @__PURE__ */ B("h2", {
343
- className: T,
501
+ children: [/* @__PURE__ */ U("h2", {
502
+ className: Te,
344
503
  children: n.detailsSectionTitle
345
- }), /* @__PURE__ */ B("p", {
346
- className: a(E, Y.sectionSubtitle),
504
+ }), /* @__PURE__ */ U("p", {
505
+ className: v(V, X.sectionSubtitle),
347
506
  children: n.detailsSectionSubtitle
348
507
  })]
349
508
  }),
350
- /* @__PURE__ */ B(x, {
509
+ /* @__PURE__ */ U(oe, {
351
510
  id: "scheduled-task-display-name",
352
511
  value: r.displayName,
353
- onChange: (e) => u("displayName", e ?? ""),
512
+ onChange: (e) => b("displayName", e ?? ""),
354
513
  labelProps: {
355
514
  label: n.displayNameLabel,
356
515
  required: !0
357
516
  },
358
- invalid: !!s.displayName,
359
- error: s.displayName
517
+ invalid: !!u.displayName,
518
+ error: u.displayName
360
519
  }),
361
- /* @__PURE__ */ B(A, {
362
- id: "scheduled-task-description",
363
- value: r.description ?? "",
364
- onChange: (e) => u("description", e),
365
- labelProps: { label: n.descriptionLabel },
366
- maxLength: 500,
367
- invalid: !!s.description,
368
- error: s.description,
369
- caption: r.description ? `${r.description.length}/500` : void 0
520
+ /* @__PURE__ */ U(g, {
521
+ isEnabled: !!ie,
522
+ fieldId: le,
523
+ label: n.descriptionLabel,
524
+ labels: n,
525
+ refinement: N,
526
+ disabled: w || he,
527
+ ...Ne,
528
+ children: /* @__PURE__ */ U(ge, {
529
+ id: le,
530
+ value: r.description ?? "",
531
+ onChange: (e) => {
532
+ N.reset(), b("description", e);
533
+ },
534
+ labelProps: ie ? void 0 : { label: n.descriptionLabel },
535
+ maxLength: 500,
536
+ invalid: !!u.description,
537
+ error: u.description,
538
+ caption: r.description ? `${r.description.length}/500` : void 0
539
+ })
370
540
  }),
371
- /* @__PURE__ */ V("div", {
541
+ /* @__PURE__ */ W("div", {
372
542
  className: "flex flex-col gap-1",
373
543
  children: [
374
- /* @__PURE__ */ B(S, {
375
- id: l,
544
+ /* @__PURE__ */ U(se, {
545
+ id: m,
376
546
  label: n.modelOrAgentLabel,
377
547
  required: !0
378
548
  }),
379
- c,
380
- s.modelId && /* @__PURE__ */ B("p", {
381
- className: a(k, Y.instructionsError),
382
- children: s.modelId
549
+ d,
550
+ u.modelId && /* @__PURE__ */ U("p", {
551
+ className: v(G, X.instructionsError),
552
+ children: u.modelId
383
553
  })
384
554
  ]
385
555
  }),
386
- /* @__PURE__ */ V("div", {
556
+ /* @__PURE__ */ W("div", {
387
557
  className: "flex flex-col gap-3",
388
558
  children: [
389
- /* @__PURE__ */ B(ne, {
559
+ /* @__PURE__ */ U(fe, {
390
560
  labelProps: { label: n.repeatLabel },
391
561
  value: r.repeat,
392
- onChange: (e) => u("repeat", e),
562
+ onChange: (e) => b("repeat", e),
393
563
  options: n.repeatOptions.map((e) => ({
394
564
  value: e.key,
395
565
  label: e.label
396
566
  }))
397
567
  }),
398
- r.repeat === q.OneTime && /* @__PURE__ */ V("div", {
399
- className: "flex flex-col gap-1",
400
- children: [/* @__PURE__ */ B(d, {
401
- id: "scheduled-task-run-at",
402
- mode: f.DateTime,
403
- value: we(r.runAt),
404
- onChange: (e) => u("runAt", Te(e)),
405
- labelProps: {
406
- label: n.runAtLabel,
407
- required: !0
408
- },
409
- invalid: !!s.runAt
410
- }), s.runAt && /* @__PURE__ */ B("p", {
411
- className: a(k, Y.instructionsError),
412
- children: s.runAt
413
- })]
568
+ r.repeat === t.OneTime && /* @__PURE__ */ U(Ze, {
569
+ label: n.runAtLabel,
570
+ value: r.runAt ?? "",
571
+ onChange: J,
572
+ error: u.runAt,
573
+ errorClassName: G
414
574
  }),
415
- r.repeat !== q.OneTime && /* @__PURE__ */ V(z, { children: [
416
- r.repeat !== q.Hourly && /* @__PURE__ */ V("div", {
575
+ r.repeat !== t.OneTime && /* @__PURE__ */ W(Ae, { children: [
576
+ Fe && /* @__PURE__ */ W("div", {
417
577
  className: "flex flex-col gap-1",
418
- children: [/* @__PURE__ */ B(d, {
578
+ children: [/* @__PURE__ */ U(S, {
419
579
  id: "scheduled-task-time",
420
- mode: f.Time,
580
+ mode: C.Time,
421
581
  value: r.time,
422
- onChange: (e) => u("time", typeof e == "string" ? e : ""),
582
+ onChange: q,
583
+ onBlur: Pe,
423
584
  labelProps: {
424
585
  label: n.timeLabel,
425
586
  required: !0
426
587
  },
427
- invalid: !!s.time
428
- }), s.time && /* @__PURE__ */ B("p", {
429
- className: a(k, Y.instructionsError),
430
- children: s.time
588
+ invalid: !!Ie,
589
+ disabled: w,
590
+ showTimezone: !0
591
+ }), Ie && /* @__PURE__ */ U("p", {
592
+ className: v(G, X.instructionsError),
593
+ children: Ie
431
594
  })]
432
595
  }),
433
- r.repeat === q.Weekly && /* @__PURE__ */ V("div", {
596
+ r.repeat === t.Weekly && /* @__PURE__ */ W("div", {
434
597
  className: "flex flex-col gap-1",
435
- children: [/* @__PURE__ */ B(d, {
598
+ children: [/* @__PURE__ */ U(S, {
436
599
  id: "scheduled-task-day-of-week",
437
- mode: f.Weekday,
438
- value: Oe(r.dayOfWeek),
439
- onChange: (e) => u("dayOfWeek", ke(e)),
600
+ mode: C.Weekday,
601
+ value: a(r.dayOfWeek),
602
+ onChange: (e) => b("dayOfWeek", o(e)),
440
603
  labelProps: {
441
604
  label: n.dayOfWeekLabel,
442
605
  required: !0
443
606
  },
444
- invalid: !!s.dayOfWeek
445
- }), s.dayOfWeek && /* @__PURE__ */ B("p", {
446
- className: a(k, Y.instructionsError),
447
- children: s.dayOfWeek
607
+ invalid: !!u.dayOfWeek
608
+ }), u.dayOfWeek && /* @__PURE__ */ U("p", {
609
+ className: v(G, X.instructionsError),
610
+ children: u.dayOfWeek
448
611
  })]
449
612
  }),
450
- r.repeat === q.Monthly && /* @__PURE__ */ B(x, {
613
+ r.repeat === t.Monthly && /* @__PURE__ */ U(ue, {
451
614
  id: "scheduled-task-day-of-month",
615
+ integer: !0,
616
+ min: 1,
617
+ max: 31,
452
618
  value: r.dayOfMonth ?? "",
453
- onChange: (e) => u("dayOfMonth", e ?? ""),
619
+ onChange: (e) => b("dayOfMonth", e == null ? "" : String(e)),
454
620
  labelProps: {
455
621
  label: n.dayOfMonthLabel,
456
622
  required: !0
457
623
  },
458
- invalid: !!s.dayOfMonth,
459
- error: s.dayOfMonth
624
+ invalid: !!u.dayOfMonth,
625
+ error: u.dayOfMonth
460
626
  }),
461
- r.repeat === q.Hourly && /* @__PURE__ */ B(ee, {
627
+ r.repeat === t.Hourly && /* @__PURE__ */ U(ue, {
462
628
  id: "scheduled-task-minute",
463
629
  integer: !0,
464
630
  min: 0,
465
631
  max: 59,
466
632
  value: r.minute ?? "",
467
- onChange: (e) => u("minute", e == null ? "" : String(e)),
633
+ onChange: (e) => b("minute", e == null ? "" : String(e)),
468
634
  labelProps: {
469
635
  label: n.minuteLabel,
470
636
  required: !0
471
637
  },
472
- invalid: !!s.minute,
473
- error: s.minute
638
+ invalid: !!u.minute,
639
+ error: u.minute
474
640
  }),
475
- /* @__PURE__ */ V("div", {
476
- className: "flex flex-row gap-3 desktop:flex-col",
477
- children: [/* @__PURE__ */ V("div", {
641
+ /* @__PURE__ */ W("div", {
642
+ className: "flex flex-row gap-3",
643
+ children: [/* @__PURE__ */ W("div", {
478
644
  className: "flex flex-1 flex-col gap-1",
479
- children: [/* @__PURE__ */ B(d, {
645
+ children: [/* @__PURE__ */ U(S, {
480
646
  id: "scheduled-task-start-date",
481
- mode: f.Date,
482
- value: Ee(r.startDate),
483
- onChange: (e) => u("startDate", De(e)),
647
+ mode: C.Date,
648
+ value: e(r.startDate),
649
+ onChange: (e) => b("startDate", i(e)),
650
+ minDate: Se,
484
651
  labelProps: { label: n.startDateLabel },
485
652
  placeholder: n.startDatePlaceholder,
486
- invalid: !!s.startDate
487
- }), s.startDate && /* @__PURE__ */ B("p", {
488
- className: a(k, Y.instructionsError),
489
- children: s.startDate
653
+ invalid: !!u.startDate
654
+ }), u.startDate && /* @__PURE__ */ U("p", {
655
+ className: v(G, X.instructionsError),
656
+ children: u.startDate
490
657
  })]
491
- }), /* @__PURE__ */ V("div", {
658
+ }), /* @__PURE__ */ W("div", {
492
659
  className: "flex flex-1 flex-col gap-1",
493
- children: [/* @__PURE__ */ B(d, {
660
+ children: [/* @__PURE__ */ U(S, {
494
661
  id: "scheduled-task-end-date",
495
- mode: f.Date,
496
- value: Ee(r.endDate),
497
- onChange: (e) => u("endDate", De(e)),
662
+ mode: C.Date,
663
+ value: e(r.endDate),
664
+ onChange: (e) => b("endDate", i(e)),
665
+ minDate: Se,
498
666
  labelProps: { label: n.endDateLabel },
499
667
  placeholder: n.endDatePlaceholder,
500
- invalid: !!s.endDate
501
- }), s.endDate && /* @__PURE__ */ B("p", {
502
- className: a(k, Y.instructionsError),
503
- children: s.endDate
668
+ invalid: !!u.endDate
669
+ }), u.endDate && /* @__PURE__ */ U("p", {
670
+ className: v(G, X.instructionsError),
671
+ children: u.endDate
504
672
  })]
505
673
  })]
506
674
  })
@@ -509,266 +677,355 @@ var U = {
509
677
  })
510
678
  ]
511
679
  }),
512
- children: /* @__PURE__ */ V("div", {
680
+ children: /* @__PURE__ */ W("div", {
513
681
  role: "group",
514
682
  "aria-label": n.configurationSectionTitle,
515
- className: "flex flex-1 flex-col gap-5 px-4 py-6 desktop:px-8",
516
- children: [/* @__PURE__ */ V("div", {
517
- className: "flex flex-col gap-1",
518
- children: [/* @__PURE__ */ B("h2", {
519
- className: T,
520
- children: n.configurationSectionTitle
521
- }), /* @__PURE__ */ B("p", {
522
- className: a(E, Y.sectionSubtitle),
523
- children: n.configurationSectionSubtitle
524
- })]
525
- }), /* @__PURE__ */ V("div", {
526
- className: "flex flex-1 flex-col gap-1",
527
- children: [
528
- /* @__PURE__ */ B("label", {
529
- htmlFor: y,
530
- className: D,
531
- children: n.instructionsLabel
532
- }),
533
- /* @__PURE__ */ B("div", {
534
- ref: b,
535
- className: a(e, t),
536
- children: /* @__PURE__ */ B(ue, {
537
- fallback: /* @__PURE__ */ B(O, {}),
538
- children: /* @__PURE__ */ B(Ae, {
539
- id: y,
540
- value: r.prompt,
541
- onChange: (e) => u("prompt", e),
542
- height: 480,
543
- theme: _
544
- })
683
+ className: v("flex flex-1 flex-col gap-5 py-6", X.formColumn),
684
+ children: [
685
+ /* @__PURE__ */ W("div", {
686
+ className: "flex flex-col gap-1",
687
+ children: [/* @__PURE__ */ U("h2", {
688
+ className: Te,
689
+ children: n.configurationSectionTitle
690
+ }), /* @__PURE__ */ U("p", {
691
+ className: v(V, X.sectionSubtitle),
692
+ children: n.configurationSectionSubtitle
693
+ })]
694
+ }),
695
+ h == null ? u.skillUrls && /* @__PURE__ */ U("div", {
696
+ "aria-live": "polite",
697
+ children: /* @__PURE__ */ U("p", {
698
+ className: v(G, X.instructionsError),
699
+ children: u.skillUrls
700
+ })
701
+ }) : /* @__PURE__ */ U("div", {
702
+ className: "w-full min-w-0 max-w-[996px]",
703
+ children: h
704
+ }),
705
+ /* @__PURE__ */ U("div", {
706
+ className: "flex w-full min-w-0 max-w-[996px] flex-col",
707
+ children: /* @__PURE__ */ U(g, {
708
+ isEnabled: !!O,
709
+ fieldId: de,
710
+ labelClassName: Oe,
711
+ label: n.instructionsLabel,
712
+ required: I,
713
+ labels: n,
714
+ refinement: me,
715
+ disabled: w || he,
716
+ ...Ne,
717
+ children: /* @__PURE__ */ W("div", {
718
+ className: "flex flex-1 flex-col gap-1",
719
+ children: [
720
+ !O && /* @__PURE__ */ U(se, {
721
+ htmlFor: de,
722
+ className: Oe,
723
+ label: n.instructionsLabel,
724
+ required: I
725
+ }),
726
+ /* @__PURE__ */ U("div", {
727
+ ref: be,
728
+ className: v("w-full", f, p),
729
+ children: /* @__PURE__ */ U(we, {
730
+ fallback: /* @__PURE__ */ U(pe, {}),
731
+ children: /* @__PURE__ */ U(Qe, {
732
+ id: de,
733
+ value: r.prompt,
734
+ onChange: (e) => {
735
+ me.reset(), b("prompt", e);
736
+ },
737
+ height: 480,
738
+ theme: k,
739
+ placeholder: n.instructionsPlaceholder
740
+ })
741
+ })
742
+ }),
743
+ u.prompt && /* @__PURE__ */ U("p", {
744
+ className: v(G, X.instructionsError),
745
+ children: u.prompt
746
+ })
747
+ ]
545
748
  })
546
- }),
547
- s.prompt && /* @__PURE__ */ B("p", {
548
- className: a(k, Y.instructionsError),
549
- children: s.prompt
550
749
  })
551
- ]
552
- })]
750
+ })
751
+ ]
553
752
  })
554
- });
555
- }, X = /* @__PURE__ */ function(e) {
753
+ }), P.isConfirmOpen && /* @__PURE__ */ U(l, {
754
+ open: !0,
755
+ title: n.discardTitle ?? "Discard unsaved changes?",
756
+ message: n.discardMessage ?? "You have unsaved changes. Leaving now will discard them.",
757
+ confirmLabel: n.discardConfirmLabel ?? "Discard changes",
758
+ cancelLabel: n.discardCancelLabel ?? "Keep editing",
759
+ variant: T.Danger,
760
+ onConfirm: P.confirm,
761
+ onClose: P.dismiss
762
+ })] });
763
+ }, Z = /* @__PURE__ */ function(e) {
556
764
  return e.Details = "details", e.Configuration = "configuration", e.History = "history", e;
557
- }({}), Me = /* @__PURE__ */ function(e) {
765
+ }({}), et = /* @__PURE__ */ function(e) {
558
766
  return e.Card = "card", e.Flow = "flow", e;
559
- }({}), Ne = { subtitleText: "_subtitleText_1i4x2_3" }, Pe = ({ instructionsLabel: e, instructionsMarkdown: t, renderInstructions: r, fieldLabelClassName: i = "dial-tiny-text" }) => /* @__PURE__ */ V("div", {
560
- role: "group",
561
- "aria-label": e,
562
- className: "flex flex-col gap-1",
563
- children: [/* @__PURE__ */ B("span", {
564
- className: a(i, Ne.subtitleText),
565
- children: e
566
- }), t && (r ? r(t) : /* @__PURE__ */ B(n, { content: t }))]
567
- }), Fe = { subtitleText: "_subtitleText_1i4x2_3" }, Ie = ({ labels: e, description: t, modelLabel: n, repeatsLabel: r, activeWindowLabel: i, fieldLabelClassName: o = "dial-tiny-text", fieldValueClassName: s = "dial-small-text" }) => /* @__PURE__ */ V(z, { children: [
568
- t && /* @__PURE__ */ V("div", {
767
+ }({}), tt = { subtitleText: "_subtitleText_1i4x2_3" }, nt = ({ skillLabel: e, skillDisplayNames: t, instructionsLabel: n, instructionsMarkdown: r, renderInstructions: i, fieldLabelClassName: a = "dial-tiny-text" }) => /* @__PURE__ */ W("div", {
768
+ className: "flex min-w-0 flex-col gap-5",
769
+ children: [!!t?.length && /* @__PURE__ */ W("div", {
770
+ role: "group",
771
+ "aria-label": e,
772
+ className: "flex min-w-0 flex-col gap-1",
773
+ children: [/* @__PURE__ */ U("span", {
774
+ className: v(a, tt.subtitleText),
775
+ children: e
776
+ }), /* @__PURE__ */ U("p", {
777
+ className: "whitespace-normal break-all",
778
+ children: t?.map((e, t) => /* @__PURE__ */ U("span", {
779
+ className: "block",
780
+ children: e
781
+ }, `${t}:${e}`))
782
+ })]
783
+ }), r && /* @__PURE__ */ W("div", {
784
+ role: "group",
785
+ "aria-label": n,
786
+ className: "flex min-w-0 flex-col gap-1",
787
+ children: [/* @__PURE__ */ U("span", {
788
+ className: v(a, tt.subtitleText),
789
+ children: n
790
+ }), i ? i(r) : /* @__PURE__ */ U(m, { content: r })]
791
+ })]
792
+ }), rt = { subtitleText: "_subtitleText_1i4x2_3" }, it = ({ labels: e, description: t, modelLabel: n, repeatsLabel: r, activeWindowLabel: i, completedLabel: a, fieldLabelClassName: o = "dial-tiny-text", fieldValueClassName: s = "dial-small-text" }) => /* @__PURE__ */ W(Ae, { children: [
793
+ t && /* @__PURE__ */ W("div", {
569
794
  className: "flex flex-col gap-1",
570
- children: [/* @__PURE__ */ B("span", {
571
- className: a(o, Fe.subtitleText),
795
+ children: [/* @__PURE__ */ U("span", {
796
+ className: v(o, rt.subtitleText),
572
797
  children: e.descriptionLabel
573
- }), /* @__PURE__ */ B("p", {
798
+ }), /* @__PURE__ */ U("p", {
574
799
  className: s,
575
800
  children: t
576
801
  })]
577
802
  }),
578
- n && /* @__PURE__ */ V("div", {
803
+ a && /* @__PURE__ */ W("div", {
804
+ className: "flex flex-col gap-1",
805
+ children: [/* @__PURE__ */ U("span", {
806
+ className: v(o, rt.subtitleText),
807
+ children: e.completedFieldLabel
808
+ }), /* @__PURE__ */ U("p", {
809
+ className: s,
810
+ children: a
811
+ })]
812
+ }),
813
+ n && /* @__PURE__ */ W("div", {
579
814
  className: "flex flex-col gap-1",
580
- children: [/* @__PURE__ */ B("span", {
581
- className: a(o, Fe.subtitleText),
815
+ children: [/* @__PURE__ */ U("span", {
816
+ className: v(o, rt.subtitleText),
582
817
  children: e.modelLabel
583
- }), /* @__PURE__ */ B("p", {
818
+ }), /* @__PURE__ */ U("p", {
584
819
  className: s,
585
820
  children: n
586
821
  })]
587
822
  }),
588
- r && /* @__PURE__ */ V("div", {
823
+ r && /* @__PURE__ */ W("div", {
589
824
  className: "flex flex-col gap-1",
590
- children: [/* @__PURE__ */ B("span", {
591
- className: a(o, Fe.subtitleText),
825
+ children: [/* @__PURE__ */ U("span", {
826
+ className: v(o, rt.subtitleText),
592
827
  children: e.repeatsLabel
593
- }), /* @__PURE__ */ B("p", {
828
+ }), /* @__PURE__ */ U("p", {
594
829
  className: s,
595
830
  children: r
596
831
  })]
597
832
  }),
598
- i && /* @__PURE__ */ V("div", {
833
+ i && /* @__PURE__ */ W("div", {
599
834
  className: "flex flex-col gap-1",
600
- children: [/* @__PURE__ */ B("span", {
601
- className: a(o, Fe.subtitleText),
835
+ children: [/* @__PURE__ */ U("span", {
836
+ className: v(o, rt.subtitleText),
602
837
  children: e.activeWindowLabel
603
- }), /* @__PURE__ */ B("p", {
838
+ }), /* @__PURE__ */ U("p", {
604
839
  className: s,
605
840
  children: i
606
841
  })]
607
842
  })
608
- ] }), Z = /* @__PURE__ */ function(e) {
843
+ ] }), at = /* @__PURE__ */ function(e) {
609
844
  return e.Success = "success", e.Error = "error", e.InProgress = "inProgress", e.Missed = "missed", e;
610
845
  }({}), Q = {
611
- subtitleText: "_subtitleText_1bug5_1",
612
- successIcon: "_successIcon_1bug5_5",
613
- errorIcon: "_errorIcon_1bug5_9",
614
- missedIcon: "_missedIcon_1bug5_13",
615
- currentRun: "_currentRun_1bug5_17",
616
- unreadDot: "_unreadDot_1bug5_21"
617
- }, Le = ({ status: e }) => {
846
+ subtitleText: "_subtitleText_1d5p9_1",
847
+ successIcon: "_successIcon_1d5p9_5",
848
+ errorIcon: "_errorIcon_1d5p9_9",
849
+ missedIcon: "_missedIcon_1d5p9_13",
850
+ currentRun: "_currentRun_1d5p9_17",
851
+ interactiveRow: "_interactiveRow_1d5p9_22",
852
+ unreadDot: "_unreadDot_1d5p9_33",
853
+ rowLayout: "_rowLayout_1d5p9_37"
854
+ }, ot = ({ status: e }) => {
618
855
  switch (e) {
619
- case Z.Success: return /* @__PURE__ */ B(M, {
620
- size: m.SM,
856
+ case at.Success: return /* @__PURE__ */ U(F, {
857
+ size: E.SM,
621
858
  className: Q.successIcon,
622
859
  "aria-hidden": !0,
623
- stroke: h
860
+ stroke: D
624
861
  });
625
- case Z.Error: return /* @__PURE__ */ B(ae, {
626
- size: m.SM,
862
+ case at.Error: return /* @__PURE__ */ U(be, {
863
+ size: E.SM,
627
864
  className: Q.errorIcon,
628
865
  "aria-hidden": !0,
629
- stroke: h
866
+ stroke: D
630
867
  });
631
- case Z.InProgress: return /* @__PURE__ */ B("span", {
868
+ case at.InProgress: return /* @__PURE__ */ U("span", {
632
869
  "aria-hidden": !0,
633
- children: /* @__PURE__ */ B(O, { size: m.SM })
870
+ children: /* @__PURE__ */ U(pe, { size: E.SM })
634
871
  });
635
- case Z.Missed: return /* @__PURE__ */ B(j, {
636
- size: m.SM,
872
+ case at.Missed: return /* @__PURE__ */ U(_e, {
873
+ size: E.SM,
637
874
  className: Q.missedIcon,
638
875
  "aria-hidden": !0,
639
- stroke: h
876
+ stroke: D
640
877
  });
641
878
  default: return null;
642
879
  }
643
- }, Re = ({ items: e, isLoading: t = !1, isLoadingMore: n = !1, skeletonCount: r = 6, error: o, onRetry: s, currentRunId: c, onRunClick: l, labels: u, footer: d, styles: f }) => {
644
- let { colors: p, typography: m } = f ?? {}, g = m?.runTimestampClassName ?? "dial-small-text", _ = m?.subtitleClassName ?? "dial-body-text", y = u.unreadIndicatorLabel ?? "Unread", b = i({
645
- "--strhl-success-icon": p?.successIconColor,
646
- "--strhl-error-icon": p?.errorIconColor,
647
- "--strhl-missed-icon": p?.missedIconColor,
648
- "--strhl-subtitle-text": p?.subtitleTextColor,
649
- "--strhl-current-run-bg": p?.currentRunBackground,
650
- "--strhl-unread-dot": p?.unreadDotColor
651
- }), x = (e) => {
652
- let t = u.runStatusLabels[e.status], n = e.id === c, r = [e.isUnread ? y : void 0, n ? u.currentRunLabel : void 0].filter((e) => !!e), i = [`${t} ${e.timestampLabel}`, ...r].join(" — "), o = !!e.conversationId && !!l;
653
- return /* @__PURE__ */ V("li", {
654
- ...o ? {
880
+ }, st = ({ items: e, isLoading: t = !1, isLoadingMore: n = !1, skeletonCount: r = 6, error: i, onRetry: a, currentRunId: o, onRunClick: s, labels: c, footer: l, styles: u }) => {
881
+ let { colors: d, typography: f } = u ?? {}, p = f?.runTimestampClassName ?? "dial-small-text", m = f?.subtitleClassName ?? "dial-body-text", h = c.unreadIndicatorLabel ?? "Unread", g = _({
882
+ "--strhl-success-icon": d?.successIconColor,
883
+ "--strhl-error-icon": d?.errorIconColor,
884
+ "--strhl-missed-icon": d?.missedIconColor,
885
+ "--strhl-subtitle-text": d?.subtitleTextColor,
886
+ "--strhl-current-run-bg": d?.currentRunBackground,
887
+ "--strhl-unread-dot": d?.unreadDotColor,
888
+ "--strhl-row-hover-bg": u?.rowHoverBackground,
889
+ "--strhl-row-focus-bg": u?.rowFocusBackground,
890
+ "--strhl-row-focus-outline": u?.rowFocusOutline
891
+ }), y = (e) => {
892
+ let t = c.runStatusLabels[e.status], n = e.id === o, r = [e.isUnread ? h : void 0, n ? c.currentRunLabel : void 0].filter((e) => !!e), i = [`${t} ${e.timestampLabel}`, ...r].join(" — "), a = !!e.conversationId && !!s;
893
+ return /* @__PURE__ */ W("li", {
894
+ ...a ? {
655
895
  role: "button",
656
896
  tabIndex: 0,
657
- onClick: () => l?.(e),
897
+ onClick: () => s?.(e),
658
898
  onKeyDown: (t) => {
659
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), l?.(e));
899
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), s?.(e));
660
900
  }
661
901
  } : {},
662
902
  "aria-label": i,
663
903
  "aria-current": n ? "true" : void 0,
664
- className: a("flex h-8 items-center justify-between gap-2 rounded-full pe-2 ps-5", n && Q.currentRun, o && "cursor-pointer"),
665
- children: [/* @__PURE__ */ V("span", {
904
+ className: v("flex min-h-[var(--strhl-row-min-height,32px)] max-w-[328px] items-center justify-between gap-2 rounded-full pe-2", Q.rowLayout, n && Q.currentRun, a && "cursor-pointer", a && Q.interactiveRow),
905
+ children: [/* @__PURE__ */ W("span", {
666
906
  className: "flex items-center gap-2 truncate",
667
- children: [/* @__PURE__ */ B("span", {
907
+ children: [/* @__PURE__ */ U("span", {
668
908
  className: "relative flex size-3 shrink-0 items-center justify-center",
669
- children: e.isUnread && /* @__PURE__ */ B("span", {
670
- className: a("size-[5.33px] rounded-full", Q.unreadDot),
909
+ children: e.isUnread && /* @__PURE__ */ U("span", {
910
+ className: v("size-[5.33px] rounded-full", Q.unreadDot),
671
911
  "aria-hidden": !0
672
912
  })
673
- }), /* @__PURE__ */ B("span", {
674
- className: a(g, "truncate"),
913
+ }), /* @__PURE__ */ U("span", {
914
+ className: v(p, "truncate"),
675
915
  children: e.timestampLabel
676
916
  })]
677
- }), /* @__PURE__ */ B("span", {
678
- className: "flex h-8 w-14 shrink-0 items-center justify-end",
679
- children: /* @__PURE__ */ B(Le, { status: e.status })
917
+ }), /* @__PURE__ */ U("span", {
918
+ className: "flex min-h-[var(--strhl-row-min-height,32px)] w-14 shrink-0 items-center justify-end",
919
+ children: /* @__PURE__ */ U(ot, { status: e.status })
680
920
  })]
681
921
  }, e.id);
682
- }, S = (e) => Array.from({ length: e }, (e, t) => /* @__PURE__ */ V("li", {
922
+ }, b = (e) => Array.from({ length: e }, (e, t) => /* @__PURE__ */ W("li", {
683
923
  "aria-hidden": "true",
684
- className: "flex h-8 items-center justify-between gap-2 pe-2 ps-5",
685
- children: [/* @__PURE__ */ B(E, {
686
- variant: D.Rectangular,
924
+ className: v("flex min-h-[var(--strhl-row-min-height,32px)] max-w-[328px] items-center justify-between gap-2 pe-2", Q.rowLayout),
925
+ children: [/* @__PURE__ */ U(M, {
926
+ variant: N.Rectangular,
687
927
  width: "160px",
688
928
  height: "16px"
689
- }), /* @__PURE__ */ B(E, {
690
- variant: D.Rectangular,
929
+ }), /* @__PURE__ */ U(M, {
930
+ variant: N.Rectangular,
691
931
  width: "16px",
692
932
  height: "16px",
693
933
  className: "shrink-0 rounded-full"
694
934
  })]
695
935
  }, `history-skeleton-${t}`));
696
- return t && e.length === 0 ? /* @__PURE__ */ B("ul", {
697
- style: b,
698
- "aria-label": u.historyTitle,
936
+ return t && e.length === 0 ? /* @__PURE__ */ U("ul", {
937
+ style: {
938
+ ...g,
939
+ "--strhl-row-min-height": u?.rowMinHeight
940
+ },
941
+ "aria-label": c.historyTitle,
699
942
  className: "flex flex-col gap-0.5",
700
- children: S(r)
701
- }) : o && e.length === 0 ? /* @__PURE__ */ V("div", {
702
- style: b,
943
+ children: b(r)
944
+ }) : i && e.length === 0 ? /* @__PURE__ */ W("div", {
945
+ style: g,
703
946
  className: "flex flex-col items-start gap-3",
704
- children: [/* @__PURE__ */ B("p", {
947
+ children: [/* @__PURE__ */ U("p", {
705
948
  role: "alert",
706
- className: a(_, Q.subtitleText),
707
- children: u.errorLabel
708
- }), /* @__PURE__ */ B(v, {
709
- label: u.retryLabel,
710
- onClick: s
949
+ className: v(m, Q.subtitleText),
950
+ children: c.errorLabel
951
+ }), /* @__PURE__ */ U(k, {
952
+ label: c.retryLabel,
953
+ onClick: a
711
954
  })]
712
- }) : e.length === 0 ? /* @__PURE__ */ V("div", {
713
- style: b,
955
+ }) : e.length === 0 ? /* @__PURE__ */ W("div", {
956
+ style: g,
714
957
  className: "flex w-full flex-col items-center justify-center gap-2 py-4",
715
- children: [/* @__PURE__ */ B(N, {
958
+ children: [/* @__PURE__ */ U(I, {
716
959
  size: 44,
717
- stroke: h,
960
+ stroke: D,
718
961
  className: Q.subtitleText,
719
962
  "aria-hidden": !0
720
- }), /* @__PURE__ */ B("p", {
963
+ }), /* @__PURE__ */ U("p", {
721
964
  role: "status",
722
- className: g,
723
- children: u.emptyLabel
965
+ className: p,
966
+ children: c.emptyLabel
724
967
  })]
725
- }) : /* @__PURE__ */ V("ul", {
726
- style: b,
727
- "aria-label": u.historyTitle,
968
+ }) : /* @__PURE__ */ W("ul", {
969
+ style: {
970
+ ...g,
971
+ "--strhl-row-min-height": u?.rowMinHeight
972
+ },
973
+ "aria-label": c.historyTitle,
728
974
  className: "flex flex-col gap-0.5",
729
975
  children: [
730
- e.map(x),
731
- n && S(r),
732
- o ? /* @__PURE__ */ V("li", {
976
+ e.map(y),
977
+ n && b(r),
978
+ i ? /* @__PURE__ */ W("li", {
733
979
  className: "flex flex-col items-start gap-3 px-5 py-2",
734
- children: [/* @__PURE__ */ B("p", {
980
+ children: [/* @__PURE__ */ U("p", {
735
981
  role: "alert",
736
- className: a(_, Q.subtitleText),
737
- children: u.errorLabel
738
- }), /* @__PURE__ */ B(v, {
739
- label: u.retryLabel,
740
- onClick: s
982
+ className: v(m, Q.subtitleText),
983
+ children: c.errorLabel
984
+ }), /* @__PURE__ */ U(k, {
985
+ label: c.retryLabel,
986
+ onClick: a
741
987
  })]
742
- }) : d
988
+ }) : l
743
989
  ]
744
990
  });
745
- }, ze = {
746
- historyCard: "_historyCard_qqobi_4",
747
- subtitleText: "_subtitleText_qqobi_8"
748
- }, Be = ({ variant: e, labels: t, nextRunLabel: n, items: r, isLoading: i = !1, isLoadingMore: o = !1, skeletonCount: s = 6, error: c, onRetry: l, hasMore: u = !1, onLoadMore: d, onRunClick: f, runTimestampClassName: p = "dial-small-text", sectionTitleClassName: m = "dial-body-semi-text", colors: h }) => {
749
- let g = e === Me.Card, _ = g ? a("sticky bottom-0 z-10 rounded-b-xl px-6 pb-5 pt-2", ze.historyCard) : "pt-2", y = d && u && t.historyShowMoreLabel ? /* @__PURE__ */ B("li", {
750
- className: _,
751
- children: /* @__PURE__ */ B(v, {
991
+ }, ct = {
992
+ historyCard: "_historyCard_153p9_4",
993
+ subtitleText: "_subtitleText_153p9_8",
994
+ cardLayout: "_cardLayout_153p9_13"
995
+ }, lt = ({ variant: e, labels: t, nextRunLabel: n, items: r, isLoading: i = !1, isLoadingMore: a = !1, skeletonCount: o = 6, error: s, onRetry: c, loadMoreError: l, onRetryLoadMore: u, hasMore: d = !1, onLoadMore: f, onRunClick: p, runTimestampClassName: m = "dial-small-text", sectionTitleClassName: h = "dial-body-semi-text", colors: g, styles: _ }) => {
996
+ let y = e === et.Card, b = y ? v("sticky bottom-0 z-10 rounded-b-xl px-6 pb-5 pt-2", ct.historyCard) : "pt-2", ee = l ? /* @__PURE__ */ W("li", {
997
+ className: b,
998
+ children: [/* @__PURE__ */ U("p", {
999
+ role: "alert",
1000
+ children: t.historyLoadMoreErrorLabel ?? t.historyErrorLabel
1001
+ }), u && /* @__PURE__ */ U(k, {
1002
+ label: t.historyRetryLabel,
1003
+ onClick: u,
1004
+ disabled: a
1005
+ })]
1006
+ }) : f && d && t.historyShowMoreLabel ? /* @__PURE__ */ U("li", {
1007
+ className: b,
1008
+ children: /* @__PURE__ */ U(k, {
752
1009
  label: t.historyShowMoreLabel,
753
- onClick: d,
754
- disabled: o
1010
+ onClick: f,
1011
+ disabled: a
755
1012
  })
756
- }) : void 0, b = n ? /* @__PURE__ */ B("p", {
757
- className: a(p, ze.subtitleText),
1013
+ }) : void 0, x = n ? /* @__PURE__ */ U("p", {
1014
+ className: v(m, ct.subtitleText),
758
1015
  children: n
759
- }) : void 0, x = t.historyLoadingMoreLabel ? /* @__PURE__ */ B("span", {
1016
+ }) : void 0, te = t.historyLoadingMoreLabel ? /* @__PURE__ */ U("span", {
760
1017
  role: "status",
761
1018
  "aria-live": "polite",
762
1019
  className: "sr-only",
763
- children: o ? t.historyLoadingMoreLabel : ""
764
- }) : void 0, S = /* @__PURE__ */ B(Re, {
1020
+ children: a ? t.historyLoadingMoreLabel : ""
1021
+ }) : void 0, ne = /* @__PURE__ */ U(st, {
765
1022
  items: r,
766
1023
  isLoading: i,
767
- isLoadingMore: o,
768
- skeletonCount: s,
769
- error: c,
770
- onRetry: l,
771
- onRunClick: f,
1024
+ isLoadingMore: a,
1025
+ skeletonCount: o,
1026
+ error: s,
1027
+ onRetry: c,
1028
+ onRunClick: p,
772
1029
  labels: {
773
1030
  historyTitle: t.historyTitle,
774
1031
  emptyLabel: t.historyEmptyLabel,
@@ -777,261 +1034,354 @@ var U = {
777
1034
  runStatusLabels: t.runStatusLabels,
778
1035
  unreadIndicatorLabel: t.unreadIndicatorLabel
779
1036
  },
780
- footer: y,
1037
+ footer: ee,
781
1038
  styles: {
782
- typography: { runTimestampClassName: p },
783
- colors: h
1039
+ typography: { runTimestampClassName: m },
1040
+ colors: _?.colors ?? g,
1041
+ rowMinHeight: _?.rowMinHeight,
1042
+ rowHoverBackground: _?.rowHoverBackground,
1043
+ rowFocusBackground: _?.rowFocusBackground,
1044
+ rowFocusOutline: _?.rowFocusOutline
784
1045
  }
785
1046
  });
786
- return g ? /* @__PURE__ */ V("div", {
787
- className: a("flex max-h-[70vh] w-full flex-col overflow-y-auto rounded-xl shadow-md desktop:w-[360px]", ze.historyCard),
788
- children: [/* @__PURE__ */ V("div", {
789
- className: a("sticky top-0 z-10 flex flex-col gap-4 rounded-t-xl px-6 pb-2 pt-5", ze.historyCard),
1047
+ return y ? /* @__PURE__ */ W("div", {
1048
+ className: v("flex max-h-[var(--st-history-max-height,70vh)] w-full max-w-full flex-col overflow-y-auto rounded-xl shadow-md", ct.historyCard, ct.cardLayout),
1049
+ style: { "--st-history-max-height": _?.maxHeight },
1050
+ children: [/* @__PURE__ */ W("div", {
1051
+ className: v("sticky top-0 z-10 flex flex-col gap-4 rounded-t-xl px-6 pb-2 pt-5", ct.historyCard),
790
1052
  children: [
791
- /* @__PURE__ */ B("h2", {
792
- className: m,
1053
+ /* @__PURE__ */ U("h2", {
1054
+ className: h,
793
1055
  children: t.historyTitle
794
1056
  }),
795
- b,
796
- x
1057
+ x,
1058
+ te
797
1059
  ]
798
- }), /* @__PURE__ */ B("div", {
1060
+ }), /* @__PURE__ */ U("div", {
799
1061
  className: "flex flex-1 flex-col gap-4 px-6 pb-2",
800
- children: S
1062
+ children: ne
801
1063
  })]
802
- }) : /* @__PURE__ */ V("div", {
1064
+ }) : /* @__PURE__ */ W("div", {
803
1065
  className: "flex flex-col gap-4",
804
1066
  children: [
805
- b,
806
1067
  x,
807
- S
1068
+ te,
1069
+ ne
808
1070
  ]
809
1071
  });
810
1072
  }, $ = {
811
- container: "_container_178k1_1",
812
- header: "_header_178k1_8",
813
- detailsColumn: "_detailsColumn_178k1_12",
814
- subtitleText: "_subtitleText_178k1_16"
815
- }, Ve = ({ labels: e, onBack: t, onEdit: n, onDelete: r, isDeleting: o = !1, isDeleted: c = !1, isActive: l, isActiveUpdating: d = !1, isActiveDisabled: f = !1, onActiveChange: p, displayName: g, isLoading: _ = !1, error: b, onRetry: x, description: S, modelLabel: C, repeatsLabel: ee, activeWindowLabel: te, nextRunLabel: T, instructionsMarkdown: ne, renderInstructions: E, runs: D, runsIsLoading: A = !1, runsIsLoadingMore: j = !1, runsSkeletonCount: M = 6, runsError: ae, onRunsRetry: N, runsHasMore: se = !1, onRunsLoadMore: ce, onRunClick: ue, styles: de }) => {
816
- let { colors: P, typography: F } = de ?? {}, I = F?.titleClassName ?? "dial-h2-text", L = F?.sectionTitleClassName ?? "dial-body-semi-text", fe = F?.fieldLabelClassName ?? "dial-tiny-text", R = F?.fieldValueClassName ?? "dial-small-text", z = F?.runTimestampClassName ?? "dial-small-text", H = i({
817
- "--stdv-bg": P?.background,
818
- "--stdv-header-border": P?.headerBorder,
819
- "--stdv-details-border": P?.detailsColumnBorder,
820
- "--stdv-subtitle-text": P?.subtitleText,
821
- "--stdv-history-bg": P?.historyCardBackground
822
- }), me = s(), [U, he] = pe(X.Details), ge = [
1073
+ container: "_container_1w44s_1",
1074
+ header: "_header_1w44s_8",
1075
+ headerActions: "_headerActions_1w44s_24",
1076
+ detailsColumn: "_detailsColumn_1w44s_30",
1077
+ subtitleText: "_subtitleText_1w44s_34",
1078
+ desktopTitle: "_desktopTitle_1w44s_39",
1079
+ desktopBadge: "_desktopBadge_1w44s_40",
1080
+ mobileTitleRow: "_mobileTitleRow_1w44s_44"
1081
+ }, ut = ({ labels: e, onBack: t, onEdit: n, onStartNow: r, isStarting: i = !1, isStartNowDisabled: a = !1, onDelete: o, isDeleting: s = !1, isDeleted: c = !1, isCompleted: l = !1, isActive: u, isActiveUpdating: d = !1, isActiveDisabled: f = !1, activeDisabledReason: p, onActiveChange: m, displayName: h, isLoading: g = !1, error: y, onRetry: ee, description: x, modelLabel: te, repeatsLabel: ne, activeWindowLabel: S, completedLabel: C, nextRunLabel: w, instructionsMarkdown: T, skillDisplayNames: ie, renderInstructions: O, runs: A, runsIsLoading: oe = !1, runsIsLoadingMore: se = !1, runsSkeletonCount: ce = 6, runsError: ue, onRunsRetry: de, runsLoadMoreError: j, onRunsRetryLoadMore: fe, runsHasMore: M = !1, onRunsLoadMore: N, onRunClick: ge, styles: _e, className: P, backIcon: ye, layout: F, historyStyles: be }) => {
1082
+ let { colors: I, typography: L } = _e ?? {}, Se = L?.titleClassName ?? "dial-h2-text", z = L?.sectionTitleClassName ?? "dial-body-semi-text", we = L?.fieldLabelClassName ?? "dial-tiny-text", B = L?.fieldValueClassName ?? "dial-small-text", Te = L?.runTimestampClassName ?? "dial-small-text", Ee = _({
1083
+ "--stdv-bg": I?.background,
1084
+ "--stdv-header-border": I?.headerBorder,
1085
+ "--stdv-details-border": I?.detailsColumnBorder,
1086
+ "--stdv-subtitle-text": I?.subtitleText,
1087
+ "--stdv-history-bg": I?.historyCardBackground
1088
+ }), De = b(), [V, Oe] = ke(Z.Details), H = [
823
1089
  {
824
- id: X.Details,
1090
+ id: Z.Details,
825
1091
  label: e.detailsTitle
826
1092
  },
827
1093
  {
828
- id: X.Configuration,
1094
+ id: Z.Configuration,
829
1095
  label: e.configurationTitle
830
1096
  },
831
1097
  {
832
- id: X.History,
1098
+ id: Z.History,
833
1099
  label: e.historyTitle
834
1100
  }
835
- ], _e = ge.find((e) => e.id === U)?.label ?? e.detailsTitle, W = /* @__PURE__ */ B(Ie, {
1101
+ ], je = H.find((e) => e.id === V)?.label ?? e.detailsTitle, G = /* @__PURE__ */ U(it, {
836
1102
  labels: {
837
1103
  descriptionLabel: e.descriptionLabel,
838
1104
  modelLabel: e.modelLabel,
839
1105
  repeatsLabel: e.repeatsLabel,
840
- activeWindowLabel: e.activeWindowLabel
1106
+ activeWindowLabel: e.activeWindowLabel,
1107
+ completedFieldLabel: e.completedFieldLabel
841
1108
  },
842
- description: S,
843
- modelLabel: C,
844
- repeatsLabel: ee,
845
- activeWindowLabel: te,
846
- fieldLabelClassName: fe,
847
- fieldValueClassName: R
848
- }), G = /* @__PURE__ */ B(Pe, {
1109
+ description: x,
1110
+ modelLabel: te,
1111
+ repeatsLabel: ne,
1112
+ activeWindowLabel: S,
1113
+ completedLabel: C,
1114
+ fieldLabelClassName: we,
1115
+ fieldValueClassName: B
1116
+ }), Me = /* @__PURE__ */ U(nt, {
849
1117
  instructionsLabel: e.instructionsLabel,
850
- instructionsMarkdown: ne,
851
- renderInstructions: E,
852
- fieldLabelClassName: fe
853
- }), ve = (t) => /* @__PURE__ */ B(Be, {
1118
+ skillLabel: e.skillLabel,
1119
+ skillDisplayNames: ie,
1120
+ instructionsMarkdown: T,
1121
+ renderInstructions: O,
1122
+ fieldLabelClassName: we
1123
+ }), K = (t) => /* @__PURE__ */ U(lt, {
854
1124
  variant: t,
855
1125
  labels: {
856
1126
  historyTitle: e.historyTitle,
857
1127
  historyEmptyLabel: e.historyEmptyLabel,
858
1128
  historyErrorLabel: e.historyErrorLabel,
1129
+ historyLoadMoreErrorLabel: e.historyLoadMoreErrorLabel,
859
1130
  historyRetryLabel: e.historyRetryLabel,
860
1131
  historyLoadingMoreLabel: e.historyLoadingMoreLabel,
861
1132
  historyShowMoreLabel: e.historyShowMoreLabel,
862
1133
  runStatusLabels: e.runStatusLabels,
863
1134
  unreadIndicatorLabel: e.unreadIndicatorLabel
864
1135
  },
865
- nextRunLabel: T,
866
- items: D,
867
- isLoading: A,
868
- isLoadingMore: j,
869
- skeletonCount: M,
870
- error: ae,
871
- onRetry: N,
872
- hasMore: se,
873
- onLoadMore: ce,
874
- onRunClick: ue,
875
- runTimestampClassName: z,
876
- sectionTitleClassName: L,
877
- colors: P
1136
+ nextRunLabel: w,
1137
+ items: A,
1138
+ isLoading: oe,
1139
+ isLoadingMore: se,
1140
+ skeletonCount: ce,
1141
+ error: ue,
1142
+ onRetry: de,
1143
+ loadMoreError: j,
1144
+ onRetryLoadMore: fe,
1145
+ hasMore: M,
1146
+ onLoadMore: N,
1147
+ onRunClick: ge,
1148
+ runTimestampClassName: Te,
1149
+ sectionTitleClassName: z,
1150
+ colors: I,
1151
+ styles: be
878
1152
  });
879
- return /* @__PURE__ */ V("div", {
880
- style: H,
881
- className: a("flex h-full w-full flex-col overflow-y-auto", $.container),
1153
+ return /* @__PURE__ */ W("div", {
1154
+ style: Ee,
1155
+ className: v("flex h-full min-h-0 w-full flex-col overflow-hidden", $.container, P),
882
1156
  children: [
883
- /* @__PURE__ */ V("div", {
884
- className: a("flex h-16 shrink-0 items-center justify-between gap-2 border-t px-8 desktop:border-b desktop:border-t-0", $.header),
885
- children: [/* @__PURE__ */ V("div", {
1157
+ /* @__PURE__ */ W("div", {
1158
+ className: v("flex min-h-16 shrink-0 items-center justify-between gap-2 px-4 py-2 desktop:h-16 desktop:flex-nowrap desktop:px-8 desktop:py-0", $.header),
1159
+ children: [/* @__PURE__ */ W("div", {
886
1160
  className: "flex min-w-0 items-center gap-2",
887
1161
  children: [
888
- /* @__PURE__ */ B(y, {
889
- icon: /* @__PURE__ */ B(ie, {
890
- size: m.LG,
1162
+ /* @__PURE__ */ U(ae, {
1163
+ icon: ye === void 0 ? /* @__PURE__ */ U(ve, {
1164
+ size: E.LG,
891
1165
  className: "rtl:scale-x-[-1]",
892
1166
  "aria-hidden": !0,
893
- stroke: h
894
- }),
1167
+ stroke: D
1168
+ }) : ye,
895
1169
  "aria-label": e.backAriaLabel,
896
1170
  onClick: t
897
1171
  }),
898
- /* @__PURE__ */ B("h1", {
899
- className: a("hidden truncate desktop:block", I),
900
- children: g
1172
+ /* @__PURE__ */ U("h1", {
1173
+ className: v("truncate", $.desktopTitle, Se),
1174
+ children: h
901
1175
  }),
902
- c && /* @__PURE__ */ B("span", {
903
- className: a("hidden shrink-0 desktop:inline", R, $.subtitleText),
1176
+ c && /* @__PURE__ */ U("span", {
1177
+ className: v("shrink-0", $.desktopBadge, B, $.subtitleText),
904
1178
  children: e.deletedStateLabel
905
1179
  })
906
1180
  ]
907
- }), /* @__PURE__ */ V("div", {
908
- className: "flex shrink-0 items-center gap-2",
1181
+ }), /* @__PURE__ */ W("div", {
1182
+ className: v("flex min-w-0 flex-1 flex-wrap items-center justify-end gap-2 desktop:flex-none desktop:flex-nowrap", $.headerActions),
909
1183
  children: [
910
- !c && l !== void 0 && /* @__PURE__ */ B(k, {
1184
+ !c && !l && u !== void 0 && /* @__PURE__ */ W(Ae, { children: [/* @__PURE__ */ U(me, {
911
1185
  id: "scheduled-task-active-switch",
912
1186
  labelProps: { label: e.activeStatusLabel },
913
- isOn: l,
914
- disabled: d || f || o,
915
- onChange: (e) => p?.(e)
916
- }),
917
- !c && r && /* @__PURE__ */ B(v, {
918
- variant: u.Danger,
1187
+ isOn: u,
1188
+ disabled: d || f || s,
1189
+ onChange: (e) => m?.(e)
1190
+ }), f && p && /* @__PURE__ */ U("span", {
1191
+ className: v(B, $.subtitleText),
1192
+ children: p
1193
+ })] }),
1194
+ !c && o && /* @__PURE__ */ U(k, {
1195
+ variant: re.Danger,
919
1196
  label: e.deleteButtonLabel,
920
- iconBefore: /* @__PURE__ */ B(le, {
921
- size: m.SM,
1197
+ iconBefore: /* @__PURE__ */ U(Ce, {
1198
+ size: E.SM,
922
1199
  "aria-hidden": !0,
923
- stroke: h
1200
+ stroke: D
924
1201
  }),
925
- onClick: r,
926
- disabled: o,
927
- className: "shrink-0"
1202
+ onClick: o,
1203
+ disabled: s,
1204
+ className: "min-h-11 shrink-0"
928
1205
  }),
929
- !c && n && /* @__PURE__ */ B(w, {
1206
+ !c && n && /* @__PURE__ */ U(le, {
930
1207
  label: e.editButtonLabel,
931
- iconBefore: /* @__PURE__ */ B(oe, {
932
- size: m.SM,
1208
+ iconBefore: /* @__PURE__ */ U(xe, {
1209
+ size: E.SM,
933
1210
  "aria-hidden": !0,
934
- stroke: h
1211
+ stroke: D
935
1212
  }),
936
1213
  onClick: n,
937
- disabled: o,
938
- className: "shrink-0"
1214
+ disabled: s,
1215
+ className: "min-h-11 shrink-0"
1216
+ }),
1217
+ !c && r && e.startNowButtonLabel && /* @__PURE__ */ U("div", {
1218
+ "aria-busy": i,
1219
+ children: /* @__PURE__ */ U(le, {
1220
+ label: i ? e.startingLabel ?? e.startNowButtonLabel : e.startNowButtonLabel,
1221
+ iconBefore: /* @__PURE__ */ U(R, {
1222
+ size: E.SM,
1223
+ "aria-hidden": !0,
1224
+ stroke: D
1225
+ }),
1226
+ onClick: r,
1227
+ disabled: s || i || a,
1228
+ className: "min-h-11 shrink-0"
1229
+ })
939
1230
  })
940
1231
  ]
941
1232
  })]
942
1233
  }),
943
- /* @__PURE__ */ V("div", {
944
- className: "flex min-w-0 items-center gap-2 px-8 py-3 desktop:hidden",
945
- children: [/* @__PURE__ */ B("h1", {
946
- className: a("truncate", I),
947
- children: g
948
- }), c && /* @__PURE__ */ B("span", {
949
- className: a("shrink-0", R, $.subtitleText),
1234
+ /* @__PURE__ */ W("div", {
1235
+ className: v("min-w-0 items-center gap-2 px-8 py-3", $.mobileTitleRow),
1236
+ children: [/* @__PURE__ */ U("h1", {
1237
+ className: v("truncate", Se),
1238
+ children: h
1239
+ }), c && /* @__PURE__ */ U("span", {
1240
+ className: v("shrink-0", B, $.subtitleText),
950
1241
  children: e.deletedStateLabel
951
1242
  })]
952
1243
  }),
953
- e.activeStatusAnnouncement != null && /* @__PURE__ */ B("span", {
1244
+ e.activeStatusAnnouncement != null && /* @__PURE__ */ U("span", {
954
1245
  role: "status",
955
1246
  "aria-live": "polite",
956
1247
  className: "sr-only",
957
1248
  children: e.activeStatusAnnouncement
958
1249
  }),
959
- _ && /* @__PURE__ */ B("div", {
1250
+ e.startStatusAnnouncement != null && /* @__PURE__ */ U("span", {
1251
+ role: "status",
1252
+ "aria-live": "polite",
1253
+ className: "sr-only",
1254
+ children: e.startStatusAnnouncement
1255
+ }),
1256
+ g && /* @__PURE__ */ U("div", {
960
1257
  className: "flex flex-1 items-center justify-center",
961
- children: /* @__PURE__ */ B(O, {})
1258
+ children: /* @__PURE__ */ U(pe, {})
962
1259
  }),
963
- !_ && b && /* @__PURE__ */ V("div", {
1260
+ !g && y && /* @__PURE__ */ W("div", {
964
1261
  className: "flex flex-1 flex-col items-center justify-center gap-3",
965
- children: [/* @__PURE__ */ B("p", {
966
- className: a(R, $.subtitleText),
1262
+ children: [/* @__PURE__ */ U("p", {
1263
+ className: v(B, $.subtitleText),
967
1264
  children: e.errorLabel
968
- }), /* @__PURE__ */ B(v, {
1265
+ }), /* @__PURE__ */ U(k, {
969
1266
  label: e.retryLabel,
970
- onClick: x
1267
+ onClick: ee
971
1268
  })]
972
1269
  }),
973
- !_ && !b && (me ? /* @__PURE__ */ V("div", {
974
- className: "flex flex-1 flex-col",
975
- children: [/* @__PURE__ */ B(re, {
1270
+ !g && !y && (De ? /* @__PURE__ */ W("div", {
1271
+ className: "flex min-h-0 flex-1 flex-col overflow-y-auto",
1272
+ children: [/* @__PURE__ */ U(he, {
976
1273
  ariaLabel: e.tabsAriaLabel ?? "Scheduled task sections",
977
1274
  className: "px-8",
978
- tabs: ge,
979
- activeTabId: U,
980
- onTabChange: he
981
- }), /* @__PURE__ */ B("div", {
1275
+ tabs: H,
1276
+ activeTabId: V,
1277
+ onTabChange: Oe
1278
+ }), /* @__PURE__ */ U("div", {
982
1279
  role: "tabpanel",
983
- "aria-label": _e,
1280
+ "aria-label": je,
984
1281
  className: "flex flex-1 flex-col gap-5 px-8 py-6",
985
- children: U === X.Configuration ? G : U === X.History ? ve(Me.Flow) : W
1282
+ children: V === Z.Configuration ? Me : V === Z.History ? K(et.Flow) : G
986
1283
  })]
987
- }) : /* @__PURE__ */ V("div", {
988
- className: "flex flex-1 flex-col desktop:flex-row",
1284
+ }) : /* @__PURE__ */ W("div", {
1285
+ style: {
1286
+ flexDirection: "row",
1287
+ "--st-details-width": F?.detailsWidth,
1288
+ "--st-history-width": F?.historyWidth,
1289
+ "--st-history-max-height": F?.historyMaxHeight,
1290
+ "--st-configuration-min-width": F?.configurationMinWidth
1291
+ },
1292
+ className: "flex min-h-0 flex-1 overflow-y-auto desktop:overflow-hidden",
989
1293
  children: [
990
- /* @__PURE__ */ V("div", {
1294
+ /* @__PURE__ */ W("div", {
991
1295
  role: "group",
992
1296
  "aria-label": e.detailsTitle,
993
- className: a("flex w-full flex-col gap-5 border-e px-8 py-6 desktop:w-[360px] desktop:shrink-0", $.detailsColumn),
994
- children: [/* @__PURE__ */ B("h2", {
995
- className: L,
1297
+ style: {
1298
+ flex: `0 1 ${F?.detailsWidth ?? "360px"}`,
1299
+ maxWidth: "100%"
1300
+ },
1301
+ className: v("flex min-h-0 w-full flex-col gap-5 overflow-y-auto border-e px-8 py-6", $.detailsColumn),
1302
+ children: [/* @__PURE__ */ U("h2", {
1303
+ className: z,
996
1304
  children: e.detailsTitle
997
- }), W]
1305
+ }), G]
998
1306
  }),
999
- /* @__PURE__ */ V("div", {
1000
- className: "flex w-full min-w-0 flex-1 flex-col gap-5 px-8 py-6",
1001
- children: [/* @__PURE__ */ B("h2", {
1002
- className: L,
1307
+ /* @__PURE__ */ W("div", {
1308
+ style: {
1309
+ flex: `1 1 ${F?.configurationMinWidth ?? "320px"}`,
1310
+ minWidth: 0
1311
+ },
1312
+ className: "flex min-h-0 w-full min-w-0 flex-col gap-5 overflow-y-auto px-8 py-6",
1313
+ children: [/* @__PURE__ */ U("h2", {
1314
+ className: z,
1003
1315
  children: e.configurationTitle
1004
- }), G]
1316
+ }), Me]
1005
1317
  }),
1006
- /* @__PURE__ */ B("div", {
1007
- className: "flex w-full justify-center p-6 desktop:w-auto desktop:items-start",
1008
- children: ve(Me.Card)
1318
+ /* @__PURE__ */ U("div", {
1319
+ style: {
1320
+ flex: `0 1 calc(${F?.historyWidth ?? "360px"} + 48px)`,
1321
+ minWidth: 0
1322
+ },
1323
+ className: "flex min-h-0 w-full items-start justify-center overflow-y-auto p-6",
1324
+ children: K(et.Card)
1009
1325
  })
1010
1326
  ]
1011
1327
  }))
1012
1328
  ]
1013
1329
  });
1014
- }, He = ({ modelLabel: e, instructionsLabel: t, modelDisplayName: r, instructionsMarkdown: i, renderInstructions: a, styles: o }) => {
1015
- let s = o?.typography?.fieldLabelClassName ?? "dial-tiny-text", c = o?.typography?.fieldValueClassName ?? "dial-body-text";
1016
- return /* @__PURE__ */ V("div", {
1330
+ }, dt = ({ modelLabel: e, skillLabel: t, skillDisplayNames: n, instructionsLabel: r, modelDisplayName: i, instructionsMarkdown: a, renderInstructions: o, styles: s }) => {
1331
+ let c = s?.typography?.fieldLabelClassName ?? "dial-tiny-text", l = s?.typography?.fieldValueClassName ?? "dial-body-text";
1332
+ return /* @__PURE__ */ W("div", {
1017
1333
  className: "flex flex-col gap-3",
1018
- children: [r && /* @__PURE__ */ V("div", {
1019
- className: "flex flex-col gap-2",
1020
- children: [/* @__PURE__ */ B("span", {
1021
- className: s,
1022
- children: e
1023
- }), /* @__PURE__ */ B("p", {
1024
- className: c,
1025
- children: r
1026
- })]
1027
- }), i && /* @__PURE__ */ V("div", {
1028
- className: "flex flex-col gap-2",
1029
- children: [/* @__PURE__ */ B("span", {
1030
- className: s,
1031
- children: t
1032
- }), ((e) => a ? a(e) : /* @__PURE__ */ B(n, { content: e }))(i)]
1033
- })]
1334
+ children: [
1335
+ i && /* @__PURE__ */ W("div", {
1336
+ className: "flex flex-col gap-2",
1337
+ children: [/* @__PURE__ */ U("span", {
1338
+ className: c,
1339
+ children: e
1340
+ }), /* @__PURE__ */ U("p", {
1341
+ className: l,
1342
+ children: i
1343
+ })]
1344
+ }),
1345
+ !!n?.length && /* @__PURE__ */ W("div", {
1346
+ className: "flex min-w-0 flex-col gap-2",
1347
+ children: [/* @__PURE__ */ U("span", {
1348
+ className: c,
1349
+ children: t
1350
+ }), /* @__PURE__ */ U("p", {
1351
+ className: `${l} whitespace-normal break-all`,
1352
+ children: n?.map((e, t) => /* @__PURE__ */ U("span", {
1353
+ className: "block",
1354
+ children: e
1355
+ }, `${t}:${e}`))
1356
+ })]
1357
+ }),
1358
+ a && /* @__PURE__ */ W("div", {
1359
+ className: "flex flex-col gap-2",
1360
+ children: [/* @__PURE__ */ U("span", {
1361
+ className: c,
1362
+ children: r
1363
+ }), ((e) => o ? o(e) : /* @__PURE__ */ U(m, { content: e }))(a)]
1364
+ })
1365
+ ]
1034
1366
  });
1035
- };
1367
+ }, ft = ({ taskName: e, icon: t, typeLabel: n, body: r, pendingLabel: i, isDeleting: a = !1, styles: o, ...s }) => /* @__PURE__ */ U(l, {
1368
+ ...s,
1369
+ variant: T.Danger,
1370
+ popupClassName: o?.popupClassName,
1371
+ titleClassName: o?.titleClassName,
1372
+ messageClassName: o?.messageClassName ?? "dial-body-paragraph-text",
1373
+ message: r,
1374
+ isLoading: a,
1375
+ loadingStatusLabel: i,
1376
+ identity: /* @__PURE__ */ U(u, {
1377
+ variant: T.Danger,
1378
+ children: /* @__PURE__ */ U(d, {
1379
+ icon: t,
1380
+ typeLabel: n,
1381
+ name: e,
1382
+ styles: { colors: o?.colors }
1383
+ })
1384
+ })
1385
+ });
1036
1386
  //#endregion
1037
- export { Ce as DESCRIPTION_MAX_LENGTH, he as ScheduledTaskCard, ve as ScheduledTaskCardGrid, G as ScheduledTaskCardSkeleton, je as ScheduledTaskCreateForm, Ve as ScheduledTaskDetailView, He as ScheduledTaskDetailsSummary, q as ScheduledTaskRepeat, Re as ScheduledTaskRunHistoryList, Z as ScheduledTaskRunStatus, xe as ScheduledTasks, Se as ScheduledTasksSortKey };
1387
+ export { r as DESCRIPTION_MAX_LENGTH, Me as SCHEDULED_TASKS_CLASS, Le as ScheduledTaskCard, He as ScheduledTaskCardGrid, Ve as ScheduledTaskCardSkeleton, $e as ScheduledTaskCreateForm, ft as ScheduledTaskDeleteConfirmation, ut as ScheduledTaskDetailView, dt as ScheduledTaskDetailsSummary, lt as ScheduledTaskHistorySection, Ne as ScheduledTaskPresentationStatus, t as ScheduledTaskRepeat, st as ScheduledTaskRunHistoryList, at as ScheduledTaskRunStatus, K as ScheduledTaskStatus, Ke as ScheduledTasks, qe as ScheduledTasksSortKey, c as TIME_OF_DAY_PATTERN, Pe as getScheduledTaskStatus, Ye as hasScheduledTaskFormChanges };