@epam/ai-dial-scheduled-tasks 1.1.0-dev.372 → 1.1.0-dev.375

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { MDMessageViewer as e, PanelEmptyState as t, buildCssVars as n, mergeClasses as r } from "@epam/ai-dial-chat-shared";
2
- import { ButtonAppearance as i, ButtonDropdown as a, ButtonVariant as o, Calendar as s, CalendarMode as c, CardShell as l, DIAL_ICON_SIZE as u, DIAL_KIT_ICON_STROKE as d, ElementSize as f, FolderPath as p, GhostButton as m, GhostIconButton as h, Highlight as g, Input as _, Label as v, LazyMarkdownEditor as y, NeutralButton as b, NumberInput as x, PrimaryButton as S, Search as C, Select as w, Skeleton as T, SkeletonVariant as E, Spinner as D, Switch as ee, Textarea as O } from "@epam/ai-dial-ui-kit";
3
- import { IconAlertTriangle as k, IconArrowLeft as te, IconCalendarTime as A, IconCircleCheck as j, IconCircleX as M, IconClipboardX as N, IconPencilMinus as ne, IconPlayerPause as P, IconPlus as re, IconTrashX as ie } from "@tabler/icons-react";
4
- import { Suspense as F, lazy as I, useEffect as L, useRef as ae } from "react";
5
- import { Fragment as R, jsx as z, jsxs as B } from "react/jsx-runtime";
6
- import { BuilderFormContainer as V } from "@epam/ai-dial-builder-form";
7
- var H = {
2
+ import { Button as i, ButtonAppearance as a, ButtonVariant as o, Calendar as s, CalendarMode as c, CardShell as l, DIAL_ICON_SIZE as u, DIAL_KIT_ICON_STROKE as d, Dropdown as f, ElementSize as p, EllipsisTooltip as m, FolderPath as h, GhostButton as g, GhostIconButton as _, Highlight as v, Input as y, Label as b, LazyMarkdownEditor as x, NeutralButton as S, NumberInput as C, PrimaryButton as w, Search as T, Select as E, Skeleton as D, SkeletonVariant as O, Spinner as k, Switch as ee, Textarea as A } from "@epam/ai-dial-ui-kit";
3
+ import { IconAlertTriangle as j, IconArrowLeft as te, IconCalendarTime as ne, IconCheck as M, IconChevronDown as re, IconChevronUp as ie, IconCircleCheck as ae, IconCircleX as N, IconClipboardX as P, IconPencilMinus as oe, IconPlayerPause as F, IconPlus as se, IconTrashX as I } from "@tabler/icons-react";
4
+ import { Suspense as L, lazy as R, useEffect as ce, useRef as z, useState as B } from "react";
5
+ import { Fragment as V, jsx as H, jsxs as U } from "react/jsx-runtime";
6
+ import { BuilderFormContainer as W } from "@epam/ai-dial-builder-form";
7
+ var G = {
8
8
  title: "_title_1hxc3_1",
9
9
  description: "_description_1hxc3_5",
10
10
  schedulePill: "_schedulePill_1hxc3_9",
@@ -15,21 +15,21 @@ var H = {
15
15
  pausedPill: "_pausedPill_1hxc3_31",
16
16
  pausedLabel: "_pausedLabel_1hxc3_36",
17
17
  locationDivider: "_locationDivider_1hxc3_40"
18
- }, oe = ({ item: e, searchQuery: t = "", onCardClick: i, labels: a, styles: o, className: s }) => {
19
- let c = a?.newBadgeLabel ?? "NEW", f = a?.pausedBadgeLabel ?? "Paused", { colors: m, typography: h } = o ?? {}, _ = h?.titleClassName ?? "dial-body-semi-text", v = h?.descriptionClassName ?? "dial-small-text", y = h?.descriptionSizeClassName ?? "dial-tiny-text", b = h?.scheduleLabelClassName ?? "dial-tiny-text", x = h?.locationLabelClassName ?? "dial-tiny-text", S = h?.locationLeafClassName ?? "dial-tiny-semi-text", C = h?.newBadgeClassName ?? "dial-tiny-semi-text", w = h?.pausedBadgeClassName ?? "dial-tiny-text", T = n({
20
- "--stc-title-text": m?.titleText,
21
- "--stc-desc-text": m?.descriptionText,
22
- "--stc-pill-bg": m?.schedulePillBackground,
23
- "--stc-pill-border": m?.schedulePillBorder,
24
- "--stc-schedule-label-text": m?.scheduleLabelText,
25
- "--stc-location-label-text": m?.locationLabelText,
26
- "--stc-location-leaf-text": m?.locationLeafText,
27
- "--stc-new-badge-bg": m?.newBadgeBackground,
28
- "--stc-new-badge-text": m?.newBadgeText,
29
- "--stc-location-divider-border": m?.locationDividerBorder,
30
- "--stc-paused-bg": m?.pausedBadgeBackground,
31
- "--stc-paused-border": m?.pausedBadgeBorder,
32
- "--stc-paused-text": m?.pausedBadgeText
18
+ }, K = ({ item: e, searchQuery: t = "", onCardClick: i, labels: a, styles: o, className: s }) => {
19
+ let c = a?.newBadgeLabel ?? "NEW", f = a?.pausedBadgeLabel ?? "Paused", { colors: p, typography: m } = o ?? {}, g = m?.titleClassName ?? "dial-body-semi-text", _ = m?.descriptionClassName ?? "dial-small-text", y = m?.descriptionSizeClassName ?? "dial-tiny-text", b = m?.scheduleLabelClassName ?? "dial-tiny-text", x = m?.locationLabelClassName ?? "dial-tiny-text", S = m?.locationLeafClassName ?? "dial-tiny-semi-text", C = m?.newBadgeClassName ?? "dial-tiny-semi-text", w = m?.pausedBadgeClassName ?? "dial-tiny-text", T = n({
20
+ "--stc-title-text": p?.titleText,
21
+ "--stc-desc-text": p?.descriptionText,
22
+ "--stc-pill-bg": p?.schedulePillBackground,
23
+ "--stc-pill-border": p?.schedulePillBorder,
24
+ "--stc-schedule-label-text": p?.scheduleLabelText,
25
+ "--stc-location-label-text": p?.locationLabelText,
26
+ "--stc-location-leaf-text": p?.locationLeafText,
27
+ "--stc-new-badge-bg": p?.newBadgeBackground,
28
+ "--stc-new-badge-text": p?.newBadgeText,
29
+ "--stc-location-divider-border": p?.locationDividerBorder,
30
+ "--stc-paused-bg": p?.pausedBadgeBackground,
31
+ "--stc-paused-border": p?.pausedBadgeBorder,
32
+ "--stc-paused-text": p?.pausedBadgeText
33
33
  }), E = i ? {
34
34
  tabIndex: 0,
35
35
  onClick: () => i(e.id),
@@ -37,182 +37,197 @@ var H = {
37
37
  (t.key === "Enter" || t.key === " ") && (t.preventDefault(), i(e.id));
38
38
  }
39
39
  } : {};
40
- return /* @__PURE__ */ B(l, {
40
+ return /* @__PURE__ */ U(l, {
41
41
  role: i ? "button" : "group",
42
42
  "aria-label": e.displayName,
43
43
  style: T,
44
44
  className: r("h-[232px]", i && "cursor-pointer", s),
45
45
  ...E,
46
46
  children: [
47
- /* @__PURE__ */ B("div", {
47
+ /* @__PURE__ */ U("div", {
48
48
  className: "flex min-w-0 shrink-0 items-center gap-2",
49
- children: [/* @__PURE__ */ z(g, {
49
+ children: [/* @__PURE__ */ H(v, {
50
50
  text: e.displayName,
51
51
  query: t,
52
52
  maxLines: 1,
53
- className: r(_, H.title)
54
- }), e.isNew && /* @__PURE__ */ z("span", {
55
- className: r("shrink-0 rounded-full px-2 py-0.5", C, H.newBadge),
53
+ className: r(g, G.title)
54
+ }), e.isNew && /* @__PURE__ */ H("span", {
55
+ className: r("shrink-0 rounded-full px-2 py-0.5", C, G.newBadge),
56
56
  children: c
57
57
  })]
58
58
  }),
59
- e.descriptionPreview && /* @__PURE__ */ z("p", {
60
- className: r("line-clamp-4 min-h-0 flex-1 overflow-hidden", y, v, H.description),
59
+ e.descriptionPreview && /* @__PURE__ */ H("p", {
60
+ className: r("line-clamp-4 min-h-0 flex-1 overflow-hidden", y, _, G.description),
61
61
  children: e.descriptionPreview
62
62
  }),
63
- /* @__PURE__ */ B("div", {
63
+ /* @__PURE__ */ U("div", {
64
64
  className: "mt-auto flex shrink-0 flex-col gap-3",
65
- children: [/* @__PURE__ */ z("div", {
65
+ children: [/* @__PURE__ */ H("div", {
66
66
  className: "flex min-h-[28px] items-center",
67
- children: e.isActive === !1 ? /* @__PURE__ */ B("span", {
68
- className: r("inline-flex items-center gap-1.5 rounded-full border px-2 py-1", H.pausedPill, w, H.pausedLabel),
69
- children: [/* @__PURE__ */ z(P, {
67
+ children: e.isActive === !1 ? /* @__PURE__ */ U("span", {
68
+ className: r("inline-flex items-center gap-1.5 rounded-full border px-2 py-1", G.pausedPill, w, G.pausedLabel),
69
+ children: [/* @__PURE__ */ H(F, {
70
70
  size: u.SM,
71
71
  "aria-hidden": !0,
72
72
  stroke: d
73
73
  }), f]
74
- }) : /* @__PURE__ */ z("span", {
75
- className: r("inline-block rounded-lg border px-2 py-1", H.schedulePill, b, H.scheduleLabel),
74
+ }) : /* @__PURE__ */ H("span", {
75
+ className: r("inline-block rounded-lg border px-2 py-1", G.schedulePill, b, G.scheduleLabel),
76
76
  children: e.scheduleLabel
77
77
  })
78
- }), e.locationSegments && e.locationSegments.length > 0 && /* @__PURE__ */ z(p, {
78
+ }), e.locationSegments && e.locationSegments.length > 0 && /* @__PURE__ */ H(h, {
79
79
  segments: e.locationSegments,
80
- labelClassName: r(x, H.locationLabel),
81
- leafClassName: r(S, H.locationLeaf),
82
- className: r("pt-3", H.locationDivider)
80
+ labelClassName: r(x, G.locationLabel),
81
+ leafClassName: r(S, G.locationLeaf),
82
+ className: r("pt-3", G.locationDivider)
83
83
  })]
84
84
  })
85
85
  ]
86
86
  });
87
- }, U = { card: "_card_11bez_1" }, W = [
87
+ }, le = { card: "_card_11bez_1" }, ue = [
88
88
  "100%",
89
89
  "100%",
90
90
  "61%"
91
- ], G = "var(--stcs-skeleton-bg)", K = ({ styles: e }) => /* @__PURE__ */ B(l, {
91
+ ], de = "var(--stcs-skeleton-bg)", fe = ({ styles: e }) => /* @__PURE__ */ U(l, {
92
92
  "aria-hidden": !0,
93
93
  style: n({ "--stcs-skeleton-bg": e?.colors?.skeletonColor }),
94
- className: r("h-[232px]", U.card),
94
+ className: r("h-[232px]", le.card),
95
95
  children: [
96
- /* @__PURE__ */ z(T, {
97
- variant: E.Rectangular,
96
+ /* @__PURE__ */ H(D, {
97
+ variant: O.Rectangular,
98
98
  width: "60%",
99
99
  height: "20px",
100
- color: G,
100
+ color: de,
101
101
  className: "shrink-0"
102
102
  }),
103
- /* @__PURE__ */ z("div", {
103
+ /* @__PURE__ */ H("div", {
104
104
  className: "flex min-h-0 flex-1 flex-col gap-3 overflow-hidden",
105
- children: W.map((e, t) => /* @__PURE__ */ z(T, {
106
- variant: E.Rectangular,
105
+ children: ue.map((e, t) => /* @__PURE__ */ H(D, {
106
+ variant: O.Rectangular,
107
107
  width: e,
108
108
  height: "16px",
109
- color: G
109
+ color: de
110
110
  }, t))
111
111
  }),
112
- /* @__PURE__ */ z(T, {
113
- variant: E.Rectangular,
112
+ /* @__PURE__ */ H(D, {
113
+ variant: O.Rectangular,
114
114
  width: "110px",
115
115
  height: "28px",
116
- color: G,
116
+ color: de,
117
117
  className: "shrink-0 rounded-lg"
118
118
  })
119
119
  ]
120
- }), se = ({ items: e, searchQuery: t, onCardClick: n, labels: r, cardStyles: i, trailingSkeletonCount: a = 0, skeletonStyles: o }) => /* @__PURE__ */ B("div", {
120
+ }), pe = ({ items: e, searchQuery: t, onCardClick: n, labels: r, cardStyles: i, trailingSkeletonCount: a = 0, skeletonStyles: o }) => /* @__PURE__ */ U("div", {
121
121
  className: "grid grid-cols-1 gap-5 desktop:grid-cols-3",
122
- children: [e.map((e) => /* @__PURE__ */ z(oe, {
122
+ children: [e.map((e) => /* @__PURE__ */ H(K, {
123
123
  item: e,
124
124
  searchQuery: t,
125
125
  onCardClick: n,
126
126
  labels: r,
127
127
  styles: i
128
- }, e.id)), Array.from({ length: a }, (e, t) => /* @__PURE__ */ z(K, { styles: o }, `skeleton-${t}`))]
128
+ }, e.id)), Array.from({ length: a }, (e, t) => /* @__PURE__ */ H(fe, { styles: o }, `skeleton-${t}`))]
129
129
  }), q = {
130
130
  container: "_container_r5sk9_1",
131
131
  subtitle: "_subtitle_r5sk9_5",
132
132
  sortButton: "_sortButton_r5sk9_9"
133
- }, ce = (e, t, n, r, i, a) => {
133
+ }, me = (e, t, n, r, i, a) => {
134
134
  if (!e) return t ? a.loadingMoreLabel : n ? a.errorLabel : r > 0 ? `${r}` : i ? a.noResultsLabel : a.emptyStateLabel;
135
- }, le = (e) => {
135
+ }, he = (e) => {
136
136
  if (!e || e === document.body) return null;
137
137
  let { overflow: t, overflowY: n } = getComputedStyle(e);
138
- return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e : le(e.parentElement);
139
- }, ue = ({ labels: e, onCreateClick: s, searchQuery: c, onSearchQueryChange: l, sortKey: p, onSortChange: h, items: g, isLoading: _ = !1, error: v, onRetry: y, hasMore: b = !1, isLoadingMore: x = !1, skeletonCount: w = 6, onLoadMore: T, onCardClick: E, styles: ee }) => {
140
- let { colors: O, typography: k, emptyStateIconSize: te = 48 } = ee ?? {}, j = k?.titleClassName ?? "dial-h1-text", M = k?.subtitleClassName ?? "dial-body-text", N = n({
141
- "--st-bg": O?.background,
142
- "--st-subtitle-text": O?.subtitleText,
143
- "--st-sort-text": O?.sortButtonText
144
- }), ne = (e) => {
138
+ return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e : he(e.parentElement);
139
+ }, ge = ({ labels: e, onCreateClick: s, searchQuery: c, onSearchQueryChange: l, sortKey: h, onSortChange: _, items: v, isLoading: y = !1, error: b, onRetry: x, hasMore: S = !1, isLoadingMore: C = !1, skeletonCount: E = 6, onLoadMore: D, onCardClick: O, styles: ee }) => {
140
+ let { colors: A, typography: j, emptyStateIconSize: te = 48 } = ee ?? {}, ae = j?.titleClassName ?? "dial-h1-text", N = j?.subtitleClassName ?? "dial-body-text", P = n({
141
+ "--st-bg": A?.background,
142
+ "--st-subtitle-text": A?.subtitleText,
143
+ "--st-sort-text": A?.sortButtonText
144
+ }), oe = (e) => {
145
145
  l(e ?? "");
146
- }, P = e.sortOptions.find((e) => e.key === p)?.label ?? "", ie = ce(_, x, !!v, g.length, c.trim().length > 0, e), F = ae(null);
147
- L(() => {
148
- let e = F.current;
149
- if (!e || !T) return;
150
- let t = le(e.parentElement);
146
+ }, [F, I] = B(!1), L = e.sortOptions.find((e) => e.key === h)?.label ?? e.sortLabel, R = e.sortOptions.map((e) => {
147
+ let t = e.key === h;
148
+ return {
149
+ ...e,
150
+ selectable: !0,
151
+ checked: t,
152
+ renderItem: () => /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(m, { text: e.label }), t && /* @__PURE__ */ H(M, {
153
+ size: u.SM,
154
+ stroke: d,
155
+ "aria-hidden": !0
156
+ })] }),
157
+ onClick: () => {
158
+ I(!1), _(e.key);
159
+ }
160
+ };
161
+ }), W = me(y, C, !!b, v.length, c.trim().length > 0, e), G = z(null);
162
+ ce(() => {
163
+ let e = G.current;
164
+ if (!e || !D) return;
165
+ let t = he(e.parentElement);
151
166
  if (!t) return;
152
167
  let n = () => {
153
- if (x || _ || !b) return;
168
+ if (C || y || !S) return;
154
169
  let n = t.getBoundingClientRect(), r = e.getBoundingClientRect();
155
- r.top < n.bottom && r.bottom > n.top && T();
170
+ r.top < n.bottom && r.bottom > n.top && D();
156
171
  };
157
172
  return t.addEventListener("scroll", n, { passive: !0 }), n(), () => t.removeEventListener("scroll", n);
158
173
  }, [
159
- b,
160
- x,
161
- _,
162
- T
174
+ S,
175
+ C,
176
+ y,
177
+ D
163
178
  ]);
164
- let I = () => _ ? /* @__PURE__ */ z(D, {}) : v ? /* @__PURE__ */ B("div", {
179
+ let K = () => y ? /* @__PURE__ */ H(k, {}) : b ? /* @__PURE__ */ U("div", {
165
180
  className: "flex flex-col items-center gap-3",
166
- children: [/* @__PURE__ */ z("p", {
167
- className: r(M, q.subtitle),
181
+ children: [/* @__PURE__ */ H("p", {
182
+ className: r(N, q.subtitle),
168
183
  children: e.errorLabel
169
- }), /* @__PURE__ */ z(m, {
184
+ }), /* @__PURE__ */ H(g, {
170
185
  label: e.retryLabel,
171
- onClick: y
186
+ onClick: x
172
187
  })]
173
- }) : g.length === 0 ? c.trim() ? /* @__PURE__ */ z("p", {
174
- className: r(M, q.subtitle),
188
+ }) : v.length === 0 ? c.trim() ? /* @__PURE__ */ H("p", {
189
+ className: r(N, q.subtitle),
175
190
  children: e.noResultsLabel
176
- }) : /* @__PURE__ */ z(t, {
177
- icon: /* @__PURE__ */ z(A, {
191
+ }) : /* @__PURE__ */ H(t, {
192
+ icon: /* @__PURE__ */ H(ne, {
178
193
  "aria-hidden": !0,
179
194
  size: te,
180
195
  stroke: 1
181
196
  }),
182
197
  label: e.emptyStateLabel
183
- }) : /* @__PURE__ */ B("div", {
198
+ }) : /* @__PURE__ */ U("div", {
184
199
  className: "flex w-full flex-col gap-6",
185
- children: [/* @__PURE__ */ z(se, {
186
- items: g,
200
+ children: [/* @__PURE__ */ H(pe, {
201
+ items: v,
187
202
  searchQuery: c,
188
- onCardClick: E,
203
+ onCardClick: O,
189
204
  labels: e.cardLabels,
190
- trailingSkeletonCount: x ? w : 0,
191
- skeletonStyles: { colors: { skeletonColor: O?.skeletonColor } }
192
- }), /* @__PURE__ */ z("div", {
193
- ref: F,
205
+ trailingSkeletonCount: C ? E : 0,
206
+ skeletonStyles: { colors: { skeletonColor: A?.skeletonColor } }
207
+ }), /* @__PURE__ */ H("div", {
208
+ ref: G,
194
209
  "aria-hidden": !0,
195
210
  className: "h-px w-full"
196
211
  })]
197
- }), R = _ || !!v || g.length === 0;
198
- return /* @__PURE__ */ B("div", {
199
- style: N,
212
+ }), le = y || !!b || v.length === 0;
213
+ return /* @__PURE__ */ U("div", {
214
+ style: P,
200
215
  className: r("flex h-full w-full flex-col gap-6 overflow-y-auto px-8 py-4", q.container),
201
216
  children: [
202
- /* @__PURE__ */ B("div", {
217
+ /* @__PURE__ */ U("div", {
203
218
  className: "flex items-start justify-between gap-4",
204
- children: [/* @__PURE__ */ B("div", {
219
+ children: [/* @__PURE__ */ U("div", {
205
220
  className: "min-w-0 gap-2",
206
- children: [/* @__PURE__ */ z("h1", {
207
- className: r("truncate", j),
221
+ children: [/* @__PURE__ */ H("h1", {
222
+ className: r("truncate", ae),
208
223
  children: e.title
209
- }), /* @__PURE__ */ z("p", {
210
- className: r("mt-1", M, q.subtitle),
224
+ }), /* @__PURE__ */ H("p", {
225
+ className: r("mt-1", N, q.subtitle),
211
226
  children: e.subtitle
212
227
  })]
213
- }), /* @__PURE__ */ z(S, {
228
+ }), /* @__PURE__ */ H(w, {
214
229
  label: e.createButtonLabel,
215
- iconBefore: /* @__PURE__ */ z(re, {
230
+ iconBefore: /* @__PURE__ */ H(se, {
216
231
  size: u.SM,
217
232
  "aria-hidden": !0,
218
233
  stroke: d
@@ -221,109 +236,118 @@ var H = {
221
236
  className: "shrink-0"
222
237
  })]
223
238
  }),
224
- /* @__PURE__ */ B("div", {
239
+ /* @__PURE__ */ U("div", {
225
240
  className: "flex flex-wrap items-center gap-3",
226
- children: [/* @__PURE__ */ z("div", {
241
+ children: [/* @__PURE__ */ H("div", {
227
242
  role: "search",
228
243
  className: "flex-1",
229
- children: /* @__PURE__ */ z(C, {
244
+ children: /* @__PURE__ */ H(T, {
230
245
  value: c,
231
- onChange: ne,
246
+ onChange: oe,
232
247
  placeholder: e.searchPlaceholder,
233
248
  clearLabel: e.clearSearchLabel,
234
249
  "aria-label": e.searchAriaLabel,
235
- size: f.Large
250
+ size: p.Large
251
+ })
252
+ }), e.sortOptions.length > 0 && /* @__PURE__ */ H(f, {
253
+ items: R,
254
+ open: F,
255
+ onOpenChange: I,
256
+ children: /* @__PURE__ */ H(i, {
257
+ label: L,
258
+ variant: o.Primary,
259
+ appearance: a.Ghost,
260
+ className: q.sortButton,
261
+ iconAfter: H(F ? ie : re, {
262
+ size: u.SM,
263
+ stroke: d,
264
+ "aria-hidden": !0
265
+ })
236
266
  })
237
- }), e.sortOptions.length > 0 && /* @__PURE__ */ z(a, {
238
- label: P,
239
- variant: o.Primary,
240
- appearance: i.Ghost,
241
- items: e.sortOptions.map((e) => ({
242
- ...e,
243
- onClick: () => h(e.key)
244
- }))
245
267
  })]
246
268
  }),
247
- /* @__PURE__ */ z("span", {
269
+ /* @__PURE__ */ H("span", {
248
270
  role: "status",
249
271
  "aria-live": "polite",
250
272
  className: "sr-only",
251
- children: ie
273
+ children: W
252
274
  }),
253
- /* @__PURE__ */ z("div", {
254
- className: r("mx-auto flex size-full w-full max-w-[1180px] flex-col", R && "items-center justify-center"),
255
- children: I()
275
+ /* @__PURE__ */ H("div", {
276
+ className: r("mx-auto flex size-full w-full max-w-[1180px] flex-col", le && "items-center justify-center"),
277
+ children: K()
256
278
  })
257
279
  ]
258
280
  });
259
- }, de = /* @__PURE__ */ function(e) {
281
+ }, _e = /* @__PURE__ */ function(e) {
260
282
  return e.FirstToRun = "firstToRun", e.LastToRun = "lastToRun", e.Newest = "newest", e.NameAZ = "nameAZ", e;
261
- }({}), fe = 500, J = /* @__PURE__ */ function(e) {
283
+ }({}), ve = 500, J = /* @__PURE__ */ function(e) {
262
284
  return e.OneTime = "oneTime", e.Hourly = "hourly", e.Daily = "daily", e.Weekly = "weekly", e.Monthly = "monthly", e;
263
- }({}), Y = (e) => String(e).padStart(2, "0"), pe = (e) => e ? new Date(e) : null, me = (e) => {
285
+ }({}), Y = (e) => String(e).padStart(2, "0"), ye = (e) => e ? new Date(e) : null, be = (e) => {
264
286
  if (e == null) return "";
265
287
  let t = e instanceof Date ? e : new Date(e);
266
288
  return Number.isNaN(t.getTime()) ? "" : `${t.getFullYear()}-${Y(t.getMonth() + 1)}-${Y(t.getDate())}T${Y(t.getHours())}:${Y(t.getMinutes())}`;
267
- }, he = (e) => {
289
+ }, xe = (e) => {
268
290
  if (!e) return null;
269
291
  let [t, n, r] = e.split("-").map(Number);
270
292
  return new Date(t, n - 1, r);
271
- }, ge = (e) => {
293
+ }, Se = (e) => {
272
294
  if (e == null) return "";
273
295
  let t = e instanceof Date ? e : new Date(e);
274
296
  return Number.isNaN(t.getTime()) ? "" : `${t.getFullYear()}-${Y(t.getMonth() + 1)}-${Y(t.getDate())}`;
275
- }, _e = (e) => {
297
+ }, Ce = (e) => {
276
298
  let t = Number(e);
277
299
  return e && Number.isFinite(t) ? String(t + 1) : null;
278
- }, ve = (e) => {
300
+ }, we = (e) => {
279
301
  let t = typeof e == "string" ? Number(e) : NaN;
280
302
  return Number.isFinite(t) ? String(t - 1) : "";
281
303
  }, X = {
282
304
  detailsColumn: "_detailsColumn_1mg3v_1",
283
305
  sectionSubtitle: "_sectionSubtitle_1mg3v_5",
284
306
  instructionsError: "_instructionsError_1mg3v_9"
285
- }, ye = I(async () => ({ default: (await y()).MarkdownEditor })), be = ({ labels: e, values: t, errors: i, modelSelector: a, modelLabelId: o, onFieldChange: l, onBack: u, onCancel: d, onSubmit: f, isSubmitting: p = !1, markdownEditorTheme: m, styles: h }) => {
286
- let { colors: g, typography: y } = h ?? {}, b = y?.titleClassName ?? "dial-h1-text", S = y?.sectionTitleClassName ?? "dial-body-semi-text", C = y?.sectionSubtitleClassName ?? "dial-tiny-text", T = y?.instructionsLabelClassName ?? "dial-body-semi-text mb-1", E = y?.instructionsErrorClassName ?? "dial-small-text", ee = n({
307
+ }, Te = R(async () => ({ default: (await x()).MarkdownEditor })), Ee = ({ labels: e, values: t, errors: i, modelSelector: a, modelLabelId: o, onFieldChange: l, onBack: u, onCancel: d, onSubmit: f, isSubmitting: p = !1, markdownEditorTheme: m, styles: h }) => {
308
+ let { colors: g, typography: _ } = h ?? {}, v = _?.titleClassName ?? "dial-h1-text", x = _?.sectionTitleClassName ?? "dial-body-semi-text", S = _?.sectionSubtitleClassName ?? "dial-tiny-text", w = _?.instructionsLabelClassName ?? "dial-body-semi-text mb-1", T = _?.instructionsErrorClassName ?? "dial-small-text", D = n({
287
309
  "--stcf-details-border": g?.detailsColumnBorder,
288
310
  "--stcf-subtitle-text": g?.sectionSubtitleText,
289
311
  "--stcf-error-text": g?.instructionsErrorText
290
- }), k = p || !t.displayName.trim() || !t.modelId || !t.prompt.trim();
291
- return /* @__PURE__ */ z(V, {
312
+ }), O = p || !t.displayName.trim() || !t.modelId || !t.prompt.trim();
313
+ return /* @__PURE__ */ H(W, {
292
314
  labels: {
293
315
  title: e.pageTitle,
294
316
  backButtonLabel: e.backButtonLabel,
295
317
  cancelButtonLabel: e.cancelButtonLabel,
296
- submitButtonLabel: e.createButtonLabel
318
+ submitButtonLabel: e.createButtonLabel,
319
+ submittingLabel: e.submittingLabel ?? "Saving"
297
320
  },
298
321
  onBack: u,
299
322
  onCancel: d,
300
323
  onSubmit: f,
301
324
  isCancelDisabled: p,
302
- isSubmitDisabled: k,
325
+ isSubmitDisabled: O,
326
+ isSubmitting: p,
303
327
  styles: {
304
328
  colors: { background: g?.background },
305
329
  header: {
306
330
  colors: { borderColor: g?.headerBorder },
307
- typography: { fontClassName: b }
331
+ typography: { fontClassName: v }
308
332
  },
309
- cssVars: ee
333
+ cssVars: D
310
334
  },
311
- left: /* @__PURE__ */ B("div", {
335
+ left: /* @__PURE__ */ U("div", {
312
336
  role: "group",
313
337
  "aria-label": e.detailsSectionTitle,
314
338
  className: r("flex flex-1 flex-col gap-5 border-e px-8 py-6", X.detailsColumn),
315
339
  children: [
316
- /* @__PURE__ */ B("div", {
340
+ /* @__PURE__ */ U("div", {
317
341
  className: "flex flex-col gap-1",
318
- children: [/* @__PURE__ */ z("h2", {
319
- className: S,
342
+ children: [/* @__PURE__ */ H("h2", {
343
+ className: x,
320
344
  children: e.detailsSectionTitle
321
- }), /* @__PURE__ */ z("p", {
322
- className: r(C, X.sectionSubtitle),
345
+ }), /* @__PURE__ */ H("p", {
346
+ className: r(S, X.sectionSubtitle),
323
347
  children: e.detailsSectionSubtitle
324
348
  })]
325
349
  }),
326
- /* @__PURE__ */ z(_, {
350
+ /* @__PURE__ */ H(y, {
327
351
  id: "scheduled-task-display-name",
328
352
  value: t.displayName,
329
353
  onChange: (e) => l("displayName", e ?? ""),
@@ -334,7 +358,7 @@ var H = {
334
358
  invalid: !!i.displayName,
335
359
  error: i.displayName
336
360
  }),
337
- /* @__PURE__ */ z(O, {
361
+ /* @__PURE__ */ H(A, {
338
362
  id: "scheduled-task-description",
339
363
  value: t.description ?? "",
340
364
  onChange: (e) => l("description", e),
@@ -344,25 +368,25 @@ var H = {
344
368
  error: i.description,
345
369
  caption: t.description ? `${t.description.length}/500` : void 0
346
370
  }),
347
- /* @__PURE__ */ B("div", {
371
+ /* @__PURE__ */ U("div", {
348
372
  className: "flex flex-col gap-1",
349
373
  children: [
350
- /* @__PURE__ */ z(v, {
374
+ /* @__PURE__ */ H(b, {
351
375
  id: o,
352
376
  label: e.modelOrAgentLabel,
353
377
  required: !0
354
378
  }),
355
379
  a,
356
- i.modelId && /* @__PURE__ */ z("p", {
357
- className: r(E, X.instructionsError),
380
+ i.modelId && /* @__PURE__ */ H("p", {
381
+ className: r(T, X.instructionsError),
358
382
  children: i.modelId
359
383
  })
360
384
  ]
361
385
  }),
362
- /* @__PURE__ */ B("div", {
386
+ /* @__PURE__ */ U("div", {
363
387
  className: "flex flex-col gap-3",
364
388
  children: [
365
- /* @__PURE__ */ z(w, {
389
+ /* @__PURE__ */ H(E, {
366
390
  labelProps: { label: e.repeatLabel },
367
391
  value: t.repeat,
368
392
  onChange: (e) => l("repeat", e),
@@ -371,27 +395,27 @@ var H = {
371
395
  label: e.label
372
396
  }))
373
397
  }),
374
- t.repeat === J.OneTime && /* @__PURE__ */ B("div", {
398
+ t.repeat === J.OneTime && /* @__PURE__ */ U("div", {
375
399
  className: "flex flex-col gap-1",
376
- children: [/* @__PURE__ */ z(s, {
400
+ children: [/* @__PURE__ */ H(s, {
377
401
  id: "scheduled-task-run-at",
378
402
  mode: c.DateTime,
379
- value: pe(t.runAt),
380
- onChange: (e) => l("runAt", me(e)),
403
+ value: ye(t.runAt),
404
+ onChange: (e) => l("runAt", be(e)),
381
405
  labelProps: {
382
406
  label: e.runAtLabel,
383
407
  required: !0
384
408
  },
385
409
  invalid: !!i.runAt
386
- }), i.runAt && /* @__PURE__ */ z("p", {
387
- className: r(E, X.instructionsError),
410
+ }), i.runAt && /* @__PURE__ */ H("p", {
411
+ className: r(T, X.instructionsError),
388
412
  children: i.runAt
389
413
  })]
390
414
  }),
391
- t.repeat !== J.OneTime && /* @__PURE__ */ B(R, { children: [
392
- t.repeat !== J.Hourly && /* @__PURE__ */ B("div", {
415
+ t.repeat !== J.OneTime && /* @__PURE__ */ U(V, { children: [
416
+ t.repeat !== J.Hourly && /* @__PURE__ */ U("div", {
393
417
  className: "flex flex-col gap-1",
394
- children: [/* @__PURE__ */ z(s, {
418
+ children: [/* @__PURE__ */ H(s, {
395
419
  id: "scheduled-task-time",
396
420
  mode: c.Time,
397
421
  value: t.time,
@@ -401,29 +425,29 @@ var H = {
401
425
  required: !0
402
426
  },
403
427
  invalid: !!i.time
404
- }), i.time && /* @__PURE__ */ z("p", {
405
- className: r(E, X.instructionsError),
428
+ }), i.time && /* @__PURE__ */ H("p", {
429
+ className: r(T, X.instructionsError),
406
430
  children: i.time
407
431
  })]
408
432
  }),
409
- t.repeat === J.Weekly && /* @__PURE__ */ B("div", {
433
+ t.repeat === J.Weekly && /* @__PURE__ */ U("div", {
410
434
  className: "flex flex-col gap-1",
411
- children: [/* @__PURE__ */ z(s, {
435
+ children: [/* @__PURE__ */ H(s, {
412
436
  id: "scheduled-task-day-of-week",
413
437
  mode: c.Weekday,
414
- value: _e(t.dayOfWeek),
415
- onChange: (e) => l("dayOfWeek", ve(e)),
438
+ value: Ce(t.dayOfWeek),
439
+ onChange: (e) => l("dayOfWeek", we(e)),
416
440
  labelProps: {
417
441
  label: e.dayOfWeekLabel,
418
442
  required: !0
419
443
  },
420
444
  invalid: !!i.dayOfWeek
421
- }), i.dayOfWeek && /* @__PURE__ */ z("p", {
422
- className: r(E, X.instructionsError),
445
+ }), i.dayOfWeek && /* @__PURE__ */ H("p", {
446
+ className: r(T, X.instructionsError),
423
447
  children: i.dayOfWeek
424
448
  })]
425
449
  }),
426
- t.repeat === J.Monthly && /* @__PURE__ */ z(_, {
450
+ t.repeat === J.Monthly && /* @__PURE__ */ H(y, {
427
451
  id: "scheduled-task-day-of-month",
428
452
  value: t.dayOfMonth ?? "",
429
453
  onChange: (e) => l("dayOfMonth", e ?? ""),
@@ -434,7 +458,7 @@ var H = {
434
458
  invalid: !!i.dayOfMonth,
435
459
  error: i.dayOfMonth
436
460
  }),
437
- t.repeat === J.Hourly && /* @__PURE__ */ z(x, {
461
+ t.repeat === J.Hourly && /* @__PURE__ */ H(C, {
438
462
  id: "scheduled-task-minute",
439
463
  integer: !0,
440
464
  min: 0,
@@ -448,34 +472,34 @@ var H = {
448
472
  invalid: !!i.minute,
449
473
  error: i.minute
450
474
  }),
451
- /* @__PURE__ */ B("div", {
475
+ /* @__PURE__ */ U("div", {
452
476
  className: "flex flex-col gap-3 desktop:flex-row",
453
- children: [/* @__PURE__ */ B("div", {
477
+ children: [/* @__PURE__ */ U("div", {
454
478
  className: "flex flex-1 flex-col gap-1",
455
- children: [/* @__PURE__ */ z(s, {
479
+ children: [/* @__PURE__ */ H(s, {
456
480
  id: "scheduled-task-start-date",
457
481
  mode: c.Date,
458
- value: he(t.startDate),
459
- onChange: (e) => l("startDate", ge(e)),
482
+ value: xe(t.startDate),
483
+ onChange: (e) => l("startDate", Se(e)),
460
484
  labelProps: { label: e.startDateLabel },
461
485
  placeholder: e.startDatePlaceholder,
462
486
  invalid: !!i.startDate
463
- }), i.startDate && /* @__PURE__ */ z("p", {
464
- className: r(E, X.instructionsError),
487
+ }), i.startDate && /* @__PURE__ */ H("p", {
488
+ className: r(T, X.instructionsError),
465
489
  children: i.startDate
466
490
  })]
467
- }), /* @__PURE__ */ B("div", {
491
+ }), /* @__PURE__ */ U("div", {
468
492
  className: "flex flex-1 flex-col gap-1",
469
- children: [/* @__PURE__ */ z(s, {
493
+ children: [/* @__PURE__ */ H(s, {
470
494
  id: "scheduled-task-end-date",
471
495
  mode: c.Date,
472
- value: he(t.endDate),
473
- onChange: (e) => l("endDate", ge(e)),
496
+ value: xe(t.endDate),
497
+ onChange: (e) => l("endDate", Se(e)),
474
498
  labelProps: { label: e.endDateLabel },
475
499
  placeholder: e.endDatePlaceholder,
476
500
  invalid: !!i.endDate
477
- }), i.endDate && /* @__PURE__ */ z("p", {
478
- className: r(E, X.instructionsError),
501
+ }), i.endDate && /* @__PURE__ */ H("p", {
502
+ className: r(T, X.instructionsError),
479
503
  children: i.endDate
480
504
  })]
481
505
  })]
@@ -485,39 +509,39 @@ var H = {
485
509
  })
486
510
  ]
487
511
  }),
488
- children: /* @__PURE__ */ B("div", {
512
+ children: /* @__PURE__ */ U("div", {
489
513
  role: "group",
490
514
  "aria-label": e.configurationSectionTitle,
491
515
  className: "flex flex-1 flex-col gap-5 px-8 py-6",
492
- children: [/* @__PURE__ */ B("div", {
516
+ children: [/* @__PURE__ */ U("div", {
493
517
  className: "flex flex-col gap-1",
494
- children: [/* @__PURE__ */ z("h2", {
495
- className: S,
518
+ children: [/* @__PURE__ */ H("h2", {
519
+ className: x,
496
520
  children: e.configurationSectionTitle
497
- }), /* @__PURE__ */ z("p", {
498
- className: r(C, X.sectionSubtitle),
521
+ }), /* @__PURE__ */ H("p", {
522
+ className: r(S, X.sectionSubtitle),
499
523
  children: e.configurationSectionSubtitle
500
524
  })]
501
- }), /* @__PURE__ */ B("div", {
525
+ }), /* @__PURE__ */ U("div", {
502
526
  role: "group",
503
527
  "aria-label": e.instructionsLabel,
504
528
  className: "flex flex-1 flex-col gap-1",
505
529
  children: [
506
- /* @__PURE__ */ z("span", {
507
- className: T,
530
+ /* @__PURE__ */ H("span", {
531
+ className: w,
508
532
  children: e.instructionsLabel
509
533
  }),
510
- /* @__PURE__ */ z(F, {
511
- fallback: /* @__PURE__ */ z(D, {}),
512
- children: /* @__PURE__ */ z(ye, {
534
+ /* @__PURE__ */ H(L, {
535
+ fallback: /* @__PURE__ */ H(k, {}),
536
+ children: /* @__PURE__ */ H(Te, {
513
537
  value: t.prompt,
514
538
  onChange: (e) => l("prompt", e),
515
539
  height: 480,
516
540
  theme: m
517
541
  })
518
542
  }),
519
- i.prompt && /* @__PURE__ */ z("p", {
520
- className: r(E, X.instructionsError),
543
+ i.prompt && /* @__PURE__ */ H("p", {
544
+ className: r(T, X.instructionsError),
521
545
  children: i.prompt
522
546
  })
523
547
  ]
@@ -527,30 +551,31 @@ var H = {
527
551
  }, Z = /* @__PURE__ */ function(e) {
528
552
  return e.Success = "success", e.Error = "error", e.InProgress = "inProgress", e.Missed = "missed", e;
529
553
  }({}), Q = {
530
- subtitleText: "_subtitleText_kxojs_1",
531
- successIcon: "_successIcon_kxojs_5",
532
- errorIcon: "_errorIcon_kxojs_9",
533
- missedIcon: "_missedIcon_kxojs_13",
534
- currentRun: "_currentRun_kxojs_17"
535
- }, xe = ({ status: e }) => {
554
+ subtitleText: "_subtitleText_1bug5_1",
555
+ successIcon: "_successIcon_1bug5_5",
556
+ errorIcon: "_errorIcon_1bug5_9",
557
+ missedIcon: "_missedIcon_1bug5_13",
558
+ currentRun: "_currentRun_1bug5_17",
559
+ unreadDot: "_unreadDot_1bug5_21"
560
+ }, De = ({ status: e }) => {
536
561
  switch (e) {
537
- case Z.Success: return /* @__PURE__ */ z(j, {
562
+ case Z.Success: return /* @__PURE__ */ H(ae, {
538
563
  size: u.SM,
539
564
  className: Q.successIcon,
540
565
  "aria-hidden": !0,
541
566
  stroke: d
542
567
  });
543
- case Z.Error: return /* @__PURE__ */ z(M, {
568
+ case Z.Error: return /* @__PURE__ */ H(N, {
544
569
  size: u.SM,
545
570
  className: Q.errorIcon,
546
571
  "aria-hidden": !0,
547
572
  stroke: d
548
573
  });
549
- case Z.InProgress: return /* @__PURE__ */ z("span", {
574
+ case Z.InProgress: return /* @__PURE__ */ H("span", {
550
575
  "aria-hidden": !0,
551
- children: /* @__PURE__ */ z(D, { size: u.SM })
576
+ children: /* @__PURE__ */ H(k, { size: u.SM })
552
577
  });
553
- case Z.Missed: return /* @__PURE__ */ z(k, {
578
+ case Z.Missed: return /* @__PURE__ */ H(j, {
554
579
  size: u.SM,
555
580
  className: Q.missedIcon,
556
581
  "aria-hidden": !0,
@@ -558,92 +583,102 @@ var H = {
558
583
  });
559
584
  default: return null;
560
585
  }
561
- }, Se = ({ items: e, isLoading: t = !1, isLoadingMore: i = !1, skeletonCount: a = 6, error: o, onRetry: s, currentRunId: c, onRunClick: l, labels: u, footer: f, styles: p }) => {
562
- let { colors: h, typography: g } = p ?? {}, _ = g?.runTimestampClassName ?? "dial-small-text", v = g?.subtitleClassName ?? "dial-body-text", y = n({
563
- "--strhl-success-icon": h?.successIconColor,
564
- "--strhl-error-icon": h?.errorIconColor,
565
- "--strhl-missed-icon": h?.missedIconColor,
566
- "--strhl-subtitle-text": h?.subtitleTextColor,
567
- "--strhl-current-run-bg": h?.currentRunBackground
568
- }), b = (e) => {
569
- let t = u.runStatusLabels[e.status], n = e.id === c, i = n && u.currentRunLabel ? `${t} ${e.timestampLabel} — ${u.currentRunLabel}` : `${t} ${e.timestampLabel}`, a = !!l;
570
- return /* @__PURE__ */ B("li", {
571
- ...a ? {
586
+ }, Oe = ({ items: e, isLoading: t = !1, isLoadingMore: i = !1, skeletonCount: a = 6, error: o, onRetry: s, currentRunId: c, onRunClick: l, labels: u, footer: f, styles: p }) => {
587
+ let { colors: m, typography: h } = p ?? {}, _ = h?.runTimestampClassName ?? "dial-small-text", v = h?.subtitleClassName ?? "dial-body-text", y = u.unreadIndicatorLabel ?? "Unread", b = n({
588
+ "--strhl-success-icon": m?.successIconColor,
589
+ "--strhl-error-icon": m?.errorIconColor,
590
+ "--strhl-missed-icon": m?.missedIconColor,
591
+ "--strhl-subtitle-text": m?.subtitleTextColor,
592
+ "--strhl-current-run-bg": m?.currentRunBackground,
593
+ "--strhl-unread-dot": m?.unreadDotColor
594
+ }), x = (e) => {
595
+ let t = u.runStatusLabels[e.status], n = e.id === c, i = [e.isUnread ? y : void 0, n ? u.currentRunLabel : void 0].filter((e) => !!e), a = [`${t} ${e.timestampLabel}`, ...i].join(" — "), o = !!e.conversationId && !!l;
596
+ return /* @__PURE__ */ U("li", {
597
+ ...o ? {
572
598
  role: "button",
573
599
  tabIndex: 0,
574
- onClick: () => l?.(e.id),
600
+ onClick: () => l?.(e),
575
601
  onKeyDown: (t) => {
576
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), l?.(e.id));
602
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), l?.(e));
577
603
  }
578
604
  } : {},
579
- "aria-label": i,
605
+ "aria-label": a,
580
606
  "aria-current": n ? "true" : void 0,
581
- className: r("flex h-8 items-center justify-between gap-2 rounded-full pe-2 ps-5", n && Q.currentRun, a && "cursor-pointer"),
582
- children: [/* @__PURE__ */ z("span", {
583
- className: r(_, "truncate"),
584
- children: e.timestampLabel
585
- }), /* @__PURE__ */ z("span", {
607
+ className: r("flex h-8 items-center justify-between gap-2 rounded-full pe-2 ps-5", n && Q.currentRun, o && "cursor-pointer"),
608
+ children: [/* @__PURE__ */ U("span", {
609
+ className: "flex items-center gap-2 truncate",
610
+ children: [/* @__PURE__ */ H("span", {
611
+ className: "relative flex size-3 shrink-0 items-center justify-center",
612
+ children: e.isUnread && /* @__PURE__ */ H("span", {
613
+ className: r("size-[5.33px] rounded-full", Q.unreadDot),
614
+ "aria-hidden": !0
615
+ })
616
+ }), /* @__PURE__ */ H("span", {
617
+ className: r(_, "truncate"),
618
+ children: e.timestampLabel
619
+ })]
620
+ }), /* @__PURE__ */ H("span", {
586
621
  className: "flex h-8 w-14 shrink-0 items-center justify-end",
587
- children: /* @__PURE__ */ z(xe, { status: e.status })
622
+ children: /* @__PURE__ */ H(De, { status: e.status })
588
623
  })]
589
624
  }, e.id);
590
- }, x = (e) => Array.from({ length: e }, (e, t) => /* @__PURE__ */ B("li", {
625
+ }, S = (e) => Array.from({ length: e }, (e, t) => /* @__PURE__ */ U("li", {
591
626
  "aria-hidden": "true",
592
627
  className: "flex h-8 items-center justify-between gap-2 pe-2 ps-5",
593
- children: [/* @__PURE__ */ z(T, {
594
- variant: E.Rectangular,
628
+ children: [/* @__PURE__ */ H(D, {
629
+ variant: O.Rectangular,
595
630
  width: "160px",
596
631
  height: "16px"
597
- }), /* @__PURE__ */ z(T, {
598
- variant: E.Rectangular,
632
+ }), /* @__PURE__ */ H(D, {
633
+ variant: O.Rectangular,
599
634
  width: "16px",
600
635
  height: "16px",
601
636
  className: "shrink-0 rounded-full"
602
637
  })]
603
638
  }, `history-skeleton-${t}`));
604
- return t && e.length === 0 ? /* @__PURE__ */ z("ul", {
605
- style: y,
639
+ return t && e.length === 0 ? /* @__PURE__ */ H("ul", {
640
+ style: b,
606
641
  "aria-label": u.historyTitle,
607
642
  className: "flex flex-col gap-0.5",
608
- children: x(a)
609
- }) : o && e.length === 0 ? /* @__PURE__ */ B("div", {
610
- style: y,
643
+ children: S(a)
644
+ }) : o && e.length === 0 ? /* @__PURE__ */ U("div", {
645
+ style: b,
611
646
  className: "flex flex-col items-start gap-3",
612
- children: [/* @__PURE__ */ z("p", {
647
+ children: [/* @__PURE__ */ H("p", {
613
648
  role: "alert",
614
649
  className: r(v, Q.subtitleText),
615
650
  children: u.errorLabel
616
- }), /* @__PURE__ */ z(m, {
651
+ }), /* @__PURE__ */ H(g, {
617
652
  label: u.retryLabel,
618
653
  onClick: s
619
654
  })]
620
- }) : e.length === 0 ? /* @__PURE__ */ B("div", {
621
- style: y,
655
+ }) : e.length === 0 ? /* @__PURE__ */ U("div", {
656
+ style: b,
622
657
  className: "flex w-full flex-col items-center justify-center gap-2 py-4",
623
- children: [/* @__PURE__ */ z(N, {
658
+ children: [/* @__PURE__ */ H(P, {
624
659
  size: 44,
625
660
  stroke: d,
626
661
  className: Q.subtitleText,
627
662
  "aria-hidden": !0
628
- }), /* @__PURE__ */ z("p", {
663
+ }), /* @__PURE__ */ H("p", {
629
664
  role: "status",
630
665
  className: _,
631
666
  children: u.emptyLabel
632
667
  })]
633
- }) : /* @__PURE__ */ B("ul", {
634
- style: y,
668
+ }) : /* @__PURE__ */ U("ul", {
669
+ style: b,
635
670
  "aria-label": u.historyTitle,
636
671
  className: "flex flex-col gap-0.5",
637
672
  children: [
638
- e.map(b),
639
- i && x(a),
640
- o ? /* @__PURE__ */ B("li", {
673
+ e.map(x),
674
+ i && S(a),
675
+ o ? /* @__PURE__ */ U("li", {
641
676
  className: "flex flex-col items-start gap-3 px-5 py-2",
642
- children: [/* @__PURE__ */ z("p", {
677
+ children: [/* @__PURE__ */ H("p", {
643
678
  role: "alert",
644
679
  className: r(v, Q.subtitleText),
645
680
  children: u.errorLabel
646
- }), /* @__PURE__ */ z(m, {
681
+ }), /* @__PURE__ */ H(g, {
647
682
  label: u.retryLabel,
648
683
  onClick: s
649
684
  })]
@@ -659,35 +694,35 @@ var H = {
659
694
  errorIcon: "_errorIcon_1ci42_21",
660
695
  missedIcon: "_missedIcon_1ci42_25",
661
696
  historyCard: "_historyCard_1ci42_29"
662
- }, Ce = ({ labels: t, onBack: i, onEdit: a, onDelete: s, isDeleting: c = !1, isDeleted: l = !1, isActive: f, isActiveUpdating: p = !1, isActiveDisabled: g = !1, onActiveChange: _, displayName: v, isLoading: y = !1, error: x, onRetry: S, description: C, modelLabel: w, repeatsLabel: T, activeWindowLabel: E, nextRunLabel: O, instructionsMarkdown: k, renderInstructions: A, runs: j, runsIsLoading: M = !1, runsIsLoadingMore: N = !1, runsSkeletonCount: P = 6, runsError: re, onRunsRetry: F, runsHasMore: I = !1, onRunsLoadMore: L, onRunClick: ae, styles: R }) => {
663
- let { colors: V, typography: H } = R ?? {}, oe = H?.titleClassName ?? "dial-h2-text", U = H?.sectionTitleClassName ?? "dial-body-semi-text", W = H?.fieldLabelClassName ?? "dial-tiny-text", G = H?.fieldValueClassName ?? "dial-small-text", K = H?.runTimestampClassName ?? "dial-small-text", se = n({
664
- "--stdv-bg": V?.background,
665
- "--stdv-header-border": V?.headerBorder,
666
- "--stdv-details-border": V?.detailsColumnBorder,
667
- "--stdv-subtitle-text": V?.subtitleText,
668
- "--stdv-success-icon": V?.successIconColor,
669
- "--stdv-error-icon": V?.errorIconColor,
670
- "--stdv-missed-icon": V?.missedIconColor,
671
- "--stdv-history-bg": V?.historyCardBackground
672
- }), q = L && I && t.historyShowMoreLabel ? /* @__PURE__ */ z("li", {
697
+ }, ke = ({ labels: t, onBack: i, onEdit: a, onDelete: s, isDeleting: c = !1, isDeleted: l = !1, isActive: f, isActiveUpdating: p = !1, isActiveDisabled: m = !1, onActiveChange: h, displayName: v, isLoading: y = !1, error: b, onRetry: x, description: C, modelLabel: w, repeatsLabel: T, activeWindowLabel: E, nextRunLabel: D, instructionsMarkdown: O, renderInstructions: A, runs: j, runsIsLoading: ne = !1, runsIsLoadingMore: M = !1, runsSkeletonCount: re = 6, runsError: ie, onRunsRetry: ae, runsHasMore: N = !1, onRunsLoadMore: P, onRunClick: F, styles: se }) => {
698
+ let { colors: L, typography: R } = se ?? {}, ce = R?.titleClassName ?? "dial-h2-text", z = R?.sectionTitleClassName ?? "dial-body-semi-text", B = R?.fieldLabelClassName ?? "dial-tiny-text", V = R?.fieldValueClassName ?? "dial-small-text", W = R?.runTimestampClassName ?? "dial-small-text", G = n({
699
+ "--stdv-bg": L?.background,
700
+ "--stdv-header-border": L?.headerBorder,
701
+ "--stdv-details-border": L?.detailsColumnBorder,
702
+ "--stdv-subtitle-text": L?.subtitleText,
703
+ "--stdv-success-icon": L?.successIconColor,
704
+ "--stdv-error-icon": L?.errorIconColor,
705
+ "--stdv-missed-icon": L?.missedIconColor,
706
+ "--stdv-history-bg": L?.historyCardBackground
707
+ }), K = P && N && t.historyShowMoreLabel ? /* @__PURE__ */ H("li", {
673
708
  className: r("sticky bottom-0 z-10 rounded-b-xl px-6 pb-5 pt-2", $.historyCard),
674
- children: /* @__PURE__ */ z(m, {
709
+ children: /* @__PURE__ */ H(g, {
675
710
  label: t.historyShowMoreLabel,
676
- onClick: L,
677
- disabled: N
711
+ onClick: P,
712
+ disabled: M
678
713
  })
679
714
  }) : void 0;
680
- return /* @__PURE__ */ B("div", {
681
- style: se,
715
+ return /* @__PURE__ */ U("div", {
716
+ style: G,
682
717
  className: r("flex h-full w-full flex-col overflow-y-auto", $.container),
683
718
  children: [
684
- /* @__PURE__ */ B("div", {
719
+ /* @__PURE__ */ U("div", {
685
720
  className: r("flex h-16 shrink-0 items-center justify-between gap-2 border-b px-8", $.header),
686
- children: [/* @__PURE__ */ B("div", {
721
+ children: [/* @__PURE__ */ U("div", {
687
722
  className: "flex min-w-0 items-center gap-2",
688
723
  children: [
689
- /* @__PURE__ */ z(h, {
690
- icon: /* @__PURE__ */ z(te, {
724
+ /* @__PURE__ */ H(_, {
725
+ icon: /* @__PURE__ */ H(te, {
691
726
  size: u.LG,
692
727
  className: "rtl:scale-x-[-1]",
693
728
  "aria-hidden": !0,
@@ -696,29 +731,29 @@ var H = {
696
731
  "aria-label": t.backAriaLabel,
697
732
  onClick: i
698
733
  }),
699
- /* @__PURE__ */ z("h1", {
700
- className: r("truncate", oe),
734
+ /* @__PURE__ */ H("h1", {
735
+ className: r("truncate", ce),
701
736
  children: v
702
737
  }),
703
- l && /* @__PURE__ */ z("span", {
704
- className: r("shrink-0", G, $.subtitleText),
738
+ l && /* @__PURE__ */ H("span", {
739
+ className: r("shrink-0", V, $.subtitleText),
705
740
  children: t.deletedStateLabel
706
741
  })
707
742
  ]
708
- }), /* @__PURE__ */ B("div", {
743
+ }), /* @__PURE__ */ U("div", {
709
744
  className: "flex shrink-0 items-center gap-2",
710
745
  children: [
711
- !l && f !== void 0 && /* @__PURE__ */ z(ee, {
746
+ !l && f !== void 0 && /* @__PURE__ */ H(ee, {
712
747
  id: "scheduled-task-active-switch",
713
748
  labelProps: { label: t.activeStatusLabel },
714
749
  isOn: f,
715
- disabled: p || g || c,
716
- onChange: (e) => _?.(e)
750
+ disabled: p || m || c,
751
+ onChange: (e) => h?.(e)
717
752
  }),
718
- !l && s && /* @__PURE__ */ z(m, {
753
+ !l && s && /* @__PURE__ */ H(g, {
719
754
  variant: o.Danger,
720
755
  label: t.deleteButtonLabel,
721
- iconBefore: /* @__PURE__ */ z(ie, {
756
+ iconBefore: /* @__PURE__ */ H(I, {
722
757
  size: u.SM,
723
758
  "aria-hidden": !0,
724
759
  stroke: d
@@ -727,9 +762,9 @@ var H = {
727
762
  disabled: c,
728
763
  className: "shrink-0"
729
764
  }),
730
- !l && a && /* @__PURE__ */ z(b, {
765
+ !l && a && /* @__PURE__ */ H(S, {
731
766
  label: t.editButtonLabel,
732
- iconBefore: /* @__PURE__ */ z(ne, {
767
+ iconBefore: /* @__PURE__ */ H(oe, {
733
768
  size: u.SM,
734
769
  "aria-hidden": !0,
735
770
  stroke: d
@@ -741,141 +776,143 @@ var H = {
741
776
  ]
742
777
  })]
743
778
  }),
744
- t.activeStatusAnnouncement != null && /* @__PURE__ */ z("span", {
779
+ t.activeStatusAnnouncement != null && /* @__PURE__ */ H("span", {
745
780
  role: "status",
746
781
  "aria-live": "polite",
747
782
  className: "sr-only",
748
783
  children: t.activeStatusAnnouncement
749
784
  }),
750
- y && /* @__PURE__ */ z("div", {
785
+ y && /* @__PURE__ */ H("div", {
751
786
  className: "flex flex-1 items-center justify-center",
752
- children: /* @__PURE__ */ z(D, {})
787
+ children: /* @__PURE__ */ H(k, {})
753
788
  }),
754
- !y && x && /* @__PURE__ */ B("div", {
789
+ !y && b && /* @__PURE__ */ U("div", {
755
790
  className: "flex flex-1 flex-col items-center justify-center gap-3",
756
- children: [/* @__PURE__ */ z("p", {
757
- className: r(G, $.subtitleText),
791
+ children: [/* @__PURE__ */ H("p", {
792
+ className: r(V, $.subtitleText),
758
793
  children: t.errorLabel
759
- }), /* @__PURE__ */ z(m, {
794
+ }), /* @__PURE__ */ H(g, {
760
795
  label: t.retryLabel,
761
- onClick: S
796
+ onClick: x
762
797
  })]
763
798
  }),
764
- !y && !x && /* @__PURE__ */ B("div", {
799
+ !y && !b && /* @__PURE__ */ U("div", {
765
800
  className: "flex flex-1 flex-col desktop:flex-row",
766
801
  children: [
767
- /* @__PURE__ */ B("div", {
802
+ /* @__PURE__ */ U("div", {
768
803
  role: "group",
769
804
  "aria-label": t.detailsTitle,
770
805
  className: r("flex w-full flex-col gap-5 border-e px-8 py-6 desktop:w-[360px] desktop:shrink-0", $.detailsColumn),
771
806
  children: [
772
- /* @__PURE__ */ z("h2", {
773
- className: U,
807
+ /* @__PURE__ */ H("h2", {
808
+ className: z,
774
809
  children: t.detailsTitle
775
810
  }),
776
- C && /* @__PURE__ */ B("div", {
811
+ C && /* @__PURE__ */ U("div", {
777
812
  className: "flex flex-col gap-1",
778
- children: [/* @__PURE__ */ z("span", {
779
- className: r(W, $.subtitleText),
813
+ children: [/* @__PURE__ */ H("span", {
814
+ className: r(B, $.subtitleText),
780
815
  children: t.descriptionLabel
781
- }), /* @__PURE__ */ z("p", {
782
- className: G,
816
+ }), /* @__PURE__ */ H("p", {
817
+ className: V,
783
818
  children: C
784
819
  })]
785
820
  }),
786
- w && /* @__PURE__ */ B("div", {
821
+ w && /* @__PURE__ */ U("div", {
787
822
  className: "flex flex-col gap-1",
788
- children: [/* @__PURE__ */ z("span", {
789
- className: r(W, $.subtitleText),
823
+ children: [/* @__PURE__ */ H("span", {
824
+ className: r(B, $.subtitleText),
790
825
  children: t.modelLabel
791
- }), /* @__PURE__ */ z("p", {
792
- className: G,
826
+ }), /* @__PURE__ */ H("p", {
827
+ className: V,
793
828
  children: w
794
829
  })]
795
830
  }),
796
- T && /* @__PURE__ */ B("div", {
831
+ T && /* @__PURE__ */ U("div", {
797
832
  className: "flex flex-col gap-1",
798
- children: [/* @__PURE__ */ z("span", {
799
- className: r(W, $.subtitleText),
833
+ children: [/* @__PURE__ */ H("span", {
834
+ className: r(B, $.subtitleText),
800
835
  children: t.repeatsLabel
801
- }), /* @__PURE__ */ z("p", {
802
- className: G,
836
+ }), /* @__PURE__ */ H("p", {
837
+ className: V,
803
838
  children: T
804
839
  })]
805
840
  }),
806
- E && /* @__PURE__ */ B("div", {
841
+ E && /* @__PURE__ */ U("div", {
807
842
  className: "flex flex-col gap-1",
808
- children: [/* @__PURE__ */ z("span", {
809
- className: r(W, $.subtitleText),
843
+ children: [/* @__PURE__ */ H("span", {
844
+ className: r(B, $.subtitleText),
810
845
  children: t.activeWindowLabel
811
- }), /* @__PURE__ */ z("p", {
812
- className: G,
846
+ }), /* @__PURE__ */ H("p", {
847
+ className: V,
813
848
  children: E
814
849
  })]
815
850
  })
816
851
  ]
817
852
  }),
818
- /* @__PURE__ */ B("div", {
853
+ /* @__PURE__ */ U("div", {
819
854
  className: "flex w-full min-w-0 flex-1 flex-col gap-5 px-8 py-6",
820
- children: [/* @__PURE__ */ z("h2", {
821
- className: U,
855
+ children: [/* @__PURE__ */ H("h2", {
856
+ className: z,
822
857
  children: t.configurationTitle
823
- }), /* @__PURE__ */ B("div", {
858
+ }), /* @__PURE__ */ U("div", {
824
859
  role: "group",
825
860
  "aria-label": t.instructionsLabel,
826
861
  className: "flex flex-col gap-1",
827
- children: [/* @__PURE__ */ z("span", {
828
- className: r(W, $.subtitleText),
862
+ children: [/* @__PURE__ */ H("span", {
863
+ className: r(B, $.subtitleText),
829
864
  children: t.instructionsLabel
830
- }), k && ((t) => A ? A(t) : /* @__PURE__ */ z(e, { content: t }))(k)]
865
+ }), O && ((t) => A ? A(t) : /* @__PURE__ */ H(e, { content: t }))(O)]
831
866
  })]
832
867
  }),
833
- /* @__PURE__ */ z("div", {
868
+ /* @__PURE__ */ H("div", {
834
869
  className: "flex w-full justify-center p-6 desktop:w-auto desktop:items-start",
835
- children: /* @__PURE__ */ B("div", {
870
+ children: /* @__PURE__ */ U("div", {
836
871
  className: r("flex max-h-[70vh] w-full flex-col overflow-y-auto rounded-xl shadow-md desktop:w-[360px]", $.historyCard),
837
- children: [/* @__PURE__ */ B("div", {
872
+ children: [/* @__PURE__ */ U("div", {
838
873
  className: r("sticky top-0 z-10 flex flex-col gap-4 rounded-t-xl px-6 pb-2 pt-5", $.historyCard),
839
874
  children: [
840
- /* @__PURE__ */ z("h2", {
841
- className: U,
875
+ /* @__PURE__ */ H("h2", {
876
+ className: z,
842
877
  children: t.historyTitle
843
878
  }),
844
- O && /* @__PURE__ */ z("p", {
845
- className: r(K, $.subtitleText),
846
- children: O
879
+ D && /* @__PURE__ */ H("p", {
880
+ className: r(W, $.subtitleText),
881
+ children: D
847
882
  }),
848
- t.historyLoadingMoreLabel && /* @__PURE__ */ z("span", {
883
+ t.historyLoadingMoreLabel && /* @__PURE__ */ H("span", {
849
884
  role: "status",
850
885
  "aria-live": "polite",
851
886
  className: "sr-only",
852
- children: N ? t.historyLoadingMoreLabel : ""
887
+ children: M ? t.historyLoadingMoreLabel : ""
853
888
  })
854
889
  ]
855
- }), /* @__PURE__ */ z("div", {
890
+ }), /* @__PURE__ */ H("div", {
856
891
  className: "flex flex-1 flex-col gap-4 px-6 pb-2",
857
- children: /* @__PURE__ */ z(Se, {
892
+ children: /* @__PURE__ */ H(Oe, {
858
893
  items: j,
859
- isLoading: M,
860
- isLoadingMore: N,
861
- skeletonCount: P,
862
- error: re,
863
- onRetry: F,
864
- onRunClick: ae,
894
+ isLoading: ne,
895
+ isLoadingMore: M,
896
+ skeletonCount: re,
897
+ error: ie,
898
+ onRetry: ae,
899
+ onRunClick: F,
865
900
  labels: {
866
901
  historyTitle: t.historyTitle,
867
902
  emptyLabel: t.historyEmptyLabel,
868
903
  errorLabel: t.historyErrorLabel,
869
904
  retryLabel: t.historyRetryLabel,
870
- runStatusLabels: t.runStatusLabels
905
+ runStatusLabels: t.runStatusLabels,
906
+ unreadIndicatorLabel: t.unreadIndicatorLabel
871
907
  },
872
- footer: q,
908
+ footer: K,
873
909
  styles: {
874
- typography: { runTimestampClassName: K },
910
+ typography: { runTimestampClassName: W },
875
911
  colors: {
876
- successIconColor: V?.successIconColor,
877
- errorIconColor: V?.errorIconColor,
878
- missedIconColor: V?.missedIconColor
912
+ successIconColor: L?.successIconColor,
913
+ errorIconColor: L?.errorIconColor,
914
+ missedIconColor: L?.missedIconColor,
915
+ unreadDotColor: L?.unreadDotColor
879
916
  }
880
917
  }
881
918
  })
@@ -886,27 +923,27 @@ var H = {
886
923
  })
887
924
  ]
888
925
  });
889
- }, we = ({ modelLabel: t, instructionsLabel: n, modelDisplayName: r, instructionsMarkdown: i, renderInstructions: a, styles: o }) => {
926
+ }, Ae = ({ modelLabel: t, instructionsLabel: n, modelDisplayName: r, instructionsMarkdown: i, renderInstructions: a, styles: o }) => {
890
927
  let s = o?.typography?.fieldLabelClassName ?? "dial-tiny-text", c = o?.typography?.fieldValueClassName ?? "dial-body-text";
891
- return /* @__PURE__ */ B("div", {
928
+ return /* @__PURE__ */ U("div", {
892
929
  className: "flex flex-col gap-3",
893
- children: [r && /* @__PURE__ */ B("div", {
930
+ children: [r && /* @__PURE__ */ U("div", {
894
931
  className: "flex flex-col gap-2",
895
- children: [/* @__PURE__ */ z("span", {
932
+ children: [/* @__PURE__ */ H("span", {
896
933
  className: s,
897
934
  children: t
898
- }), /* @__PURE__ */ z("p", {
935
+ }), /* @__PURE__ */ H("p", {
899
936
  className: c,
900
937
  children: r
901
938
  })]
902
- }), i && /* @__PURE__ */ B("div", {
939
+ }), i && /* @__PURE__ */ U("div", {
903
940
  className: "flex flex-col gap-2",
904
- children: [/* @__PURE__ */ z("span", {
941
+ children: [/* @__PURE__ */ H("span", {
905
942
  className: s,
906
943
  children: n
907
- }), ((t) => a ? a(t) : /* @__PURE__ */ z(e, { content: t }))(i)]
944
+ }), ((t) => a ? a(t) : /* @__PURE__ */ H(e, { content: t }))(i)]
908
945
  })]
909
946
  });
910
947
  };
911
948
  //#endregion
912
- export { fe as DESCRIPTION_MAX_LENGTH, oe as ScheduledTaskCard, se as ScheduledTaskCardGrid, K as ScheduledTaskCardSkeleton, be as ScheduledTaskCreateForm, Ce as ScheduledTaskDetailView, we as ScheduledTaskDetailsSummary, J as ScheduledTaskRepeat, Se as ScheduledTaskRunHistoryList, Z as ScheduledTaskRunStatus, ue as ScheduledTasks, de as ScheduledTasksSortKey };
949
+ export { ve as DESCRIPTION_MAX_LENGTH, K as ScheduledTaskCard, pe as ScheduledTaskCardGrid, fe as ScheduledTaskCardSkeleton, Ee as ScheduledTaskCreateForm, ke as ScheduledTaskDetailView, Ae as ScheduledTaskDetailsSummary, J as ScheduledTaskRepeat, Oe as ScheduledTaskRunHistoryList, Z as ScheduledTaskRunStatus, ge as ScheduledTasks, _e as ScheduledTasksSortKey };