@epam/ai-dial-chat-hooks 1.4.0-dev.110 → 1.4.0-dev.115

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 (36) hide show
  1. package/api-error/map-api-error.d.ts +10 -0
  2. package/api-error/map-api-error.d.ts.map +1 -0
  3. package/api-error/map-api-error.js +11 -0
  4. package/catalog/create-publish-api.d.ts +8 -1
  5. package/catalog/create-publish-api.d.ts.map +1 -1
  6. package/catalog/create-publish-api.js +7 -1
  7. package/catalog/publish-target-taken.d.ts +24 -0
  8. package/catalog/publish-target-taken.d.ts.map +1 -0
  9. package/catalog/publish-target-taken.js +14 -0
  10. package/catalog/resource-name-conflict.d.ts.map +1 -1
  11. package/catalog/resource-name-conflict.js +19 -22
  12. package/catalog/use-publish-target-guard.d.ts +45 -0
  13. package/catalog/use-publish-target-guard.d.ts.map +1 -0
  14. package/catalog/use-publish-target-guard.js +18 -0
  15. package/catalog.js +36 -34
  16. package/entry-points/catalog.d.ts +2 -0
  17. package/entry-points/catalog.d.ts.map +1 -1
  18. package/entry-points/scheduled-tasks.d.ts +1 -0
  19. package/entry-points/scheduled-tasks.d.ts.map +1 -1
  20. package/entry-points/utils.d.ts +1 -0
  21. package/entry-points/utils.d.ts.map +1 -1
  22. package/index.d.ts +4 -0
  23. package/index.d.ts.map +1 -1
  24. package/index.js +266 -262
  25. package/package.json +17 -17
  26. package/scheduled-task/scheduled-task-display.d.ts +4 -4
  27. package/scheduled-task/scheduled-task-display.d.ts.map +1 -1
  28. package/scheduled-task/scheduled-task-display.js +38 -47
  29. package/scheduled-task/scheduled-task-next-occurrence.d.ts +2 -0
  30. package/scheduled-task/scheduled-task-next-occurrence.d.ts.map +1 -1
  31. package/scheduled-task/scheduled-task-next-occurrence.js +2 -2
  32. package/scheduled-task/scheduled-task-time-format.d.ts +34 -0
  33. package/scheduled-task/scheduled-task-time-format.d.ts.map +1 -0
  34. package/scheduled-task/scheduled-task-time-format.js +33 -0
  35. package/scheduled-tasks.js +14 -13
  36. package/utils.js +28 -27
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-chat-hooks",
3
3
  "description": "Framework-level React hooks extracted from AI DIAL Chat for building custom chat interfaces",
4
- "version": "1.4.0-dev.110",
4
+ "version": "1.4.0-dev.115",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -131,7 +131,7 @@
131
131
  }
132
132
  },
133
133
  "dependencies": {
134
- "@epam/ai-dial-chat-api-client": "1.4.0-dev.110",
134
+ "@epam/ai-dial-chat-api-client": "1.4.0-dev.115",
135
135
  "dompurify": "3.4.17",
136
136
  "fflate": "^0.8.3",
137
137
  "lru-cache": "^10.4.3",
@@ -140,23 +140,23 @@
140
140
  },
141
141
  "peerDependencies": {
142
142
  "react": "^19.2.8",
143
- "@epam/ai-dial-attachment-canvas": "1.4.0-dev.110",
144
- "@epam/ai-dial-attachment-input": "1.4.0-dev.110",
145
- "@epam/ai-dial-catalog": "1.4.0-dev.110",
146
- "@epam/ai-dial-chat-overlay": "1.4.0-dev.110",
147
- "@epam/ai-dial-chat-shared": "1.4.0-dev.110",
148
- "@epam/ai-dial-conversation-input": "1.4.0-dev.110",
149
- "@epam/ai-dial-mcp-apps": "1.4.0-dev.110",
150
- "@epam/ai-dial-projects": "1.4.0-dev.110",
151
- "@epam/ai-dial-publish-panel": "1.4.0-dev.110",
152
- "@epam/ai-dial-quotations": "1.4.0-dev.110",
143
+ "@epam/ai-dial-attachment-canvas": "1.4.0-dev.115",
144
+ "@epam/ai-dial-attachment-input": "1.4.0-dev.115",
145
+ "@epam/ai-dial-catalog": "1.4.0-dev.115",
146
+ "@epam/ai-dial-chat-overlay": "1.4.0-dev.115",
147
+ "@epam/ai-dial-chat-shared": "1.4.0-dev.115",
148
+ "@epam/ai-dial-conversation-input": "1.4.0-dev.115",
149
+ "@epam/ai-dial-mcp-apps": "1.4.0-dev.115",
150
+ "@epam/ai-dial-projects": "1.4.0-dev.115",
151
+ "@epam/ai-dial-publish-panel": "1.4.0-dev.115",
152
+ "@epam/ai-dial-quotations": "1.4.0-dev.115",
153
153
  "@epam/ai-dial-react-file-manager": "^0.4.3",
154
- "@epam/ai-dial-scheduled-tasks": "1.4.0-dev.110",
155
- "@epam/ai-dial-share": "1.4.0-dev.110",
156
- "@epam/ai-dial-skill-editor": "1.4.0-dev.110",
157
- "@epam/ai-dial-source-panel": "1.4.0-dev.110",
154
+ "@epam/ai-dial-scheduled-tasks": "1.4.0-dev.115",
155
+ "@epam/ai-dial-share": "1.4.0-dev.115",
156
+ "@epam/ai-dial-skill-editor": "1.4.0-dev.115",
157
+ "@epam/ai-dial-source-panel": "1.4.0-dev.115",
158
158
  "@epam/ai-dial-ui-kit": "^0.16.0",
159
- "@epam/ai-dial-usage-dashboard": "1.4.0-dev.110",
159
+ "@epam/ai-dial-usage-dashboard": "1.4.0-dev.115",
160
160
  "@modelcontextprotocol/sdk": "^1.32.2",
161
161
  "@epam/pdf-highlighter-kit": "^0.0.23"
162
162
  },
@@ -9,7 +9,7 @@ export interface ScheduledTaskScheduleLabels {
9
9
  everyNMinutes: (count: number) => string;
10
10
  /** An hourly run at `minute` past the hour. */
11
11
  hourlyAt: (minute: string) => string;
12
- /** A daily run at `time` (`HH:mm`). */
12
+ /** A daily run at `time`, a locale-formatted clock time such as `9:00 AM` or `09:00`. */
13
13
  dailyAt: (time: string) => string;
14
14
  /** A weekly run on `day` — one weekday name, or several joined as a locale list — at `time`. */
15
15
  weeklyAt: (day: string, time: string) => string;
@@ -46,6 +46,8 @@ export interface ScheduledTaskScheduleLabelOptions {
46
46
  locale?: string;
47
47
  /** The viewer's IANA zone; a task in a different zone gets its zone appended to the label. Defaults to the browser's resolved zone. */
48
48
  browserTimezone?: string;
49
+ /** Appends the task's zone even when it equals the viewer's zone. Needs `labels.withTimezone`. Defaults to `false`. */
50
+ alwaysShowTimezone?: boolean;
49
51
  }
50
52
  /** Inputs for formatting a run's start time. */
51
53
  export interface ScheduledTaskRunTimestampOptions {
@@ -87,8 +89,6 @@ export declare enum ScheduledTaskDeleteErrorKind {
87
89
  /** Any other failure. */
88
90
  Generic = "generic"
89
91
  }
90
- /** Formats a zone-local `YYYY-MM-DDTHH:mm` as a medium date and short time without converting it to another zone. */
91
- export declare const formatZonedDateTime: (dateTime: string, locale?: string) => string;
92
92
  /**
93
93
  * Formats a stored trigger datetime — a zone-local wall time, or an absolute
94
94
  * instant written by an older client — as the wall time it shows in the
@@ -100,7 +100,7 @@ export declare const formatScheduledTaskTriggerTime: (value: string, timezone: s
100
100
  * stored wall time is shown as is, and the zone is appended when it differs
101
101
  * from the viewer's.
102
102
  */
103
- export declare const formatScheduledTaskScheduleLabel: (task: ScheduledTaskDto, labels: ScheduledTaskScheduleLabels, { locale, browserTimezone, }?: ScheduledTaskScheduleLabelOptions) => string;
103
+ export declare const formatScheduledTaskScheduleLabel: (task: ScheduledTaskDto, labels: ScheduledTaskScheduleLabels, { locale, browserTimezone, alwaysShowTimezone, }?: ScheduledTaskScheduleLabelOptions) => string;
104
104
  /** Maps a scheduled-task DTO to the scheduled-tasks lib's card item. */
105
105
  export declare const toScheduledTaskItem: (task: ScheduledTaskDto, labels: ScheduledTaskScheduleLabels, options?: ScheduledTaskScheduleLabelOptions) => ScheduledTaskItem;
106
106
  /** Maps scheduled-task DTOs to card items, preserving order. */
@@ -1 +1 @@
1
- {"version":3,"file":"scheduled-task-display.d.ts","sourceRoot":"","sources":["../../src/scheduled-task/scheduled-task-display.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACzB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAIL,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EAC1B,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAO9D,mGAAmG;A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M,uBAAuB,GAClC,MAAM,mBAAmB,EAAE,EAC3B,SAAS,2BAA2B,KACnC,oBAAoB,EACkC,CAAC;AAE1D,4EAA4E;AAC5E,eAAO,MAAM,gCAAgC,GAC3C,QAAQ,MAAM,GAAG,SAAS,KACzB,4BAKF,CAAC;AAEF,qGAAqG;AACrG,eAAO,MAAM,+BAA+B,GAC1C,SAAS,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,iBAAiB,CAAC,EAC1D,oCAAoC,0BAA0B,KAC7D,MAIF,CAAC"}
@@ -1,74 +1,65 @@
1
1
  import { ScheduledTaskTriggerDescriptionKind as e, describeScheduledTaskTrigger as t } from "./scheduled-task-description.js";
2
2
  import { isSameTimezone as n } from "../shared/timezones.js";
3
- import { ScheduledTaskErrorCode as r, ScheduledTaskRunDtoStatusEnum as i } from "@epam/ai-dial-chat-api-client";
4
- import { ScheduledTaskRunStatus as a, instantToZonedDateTime as o, isAbsoluteInstant as s } from "@epam/ai-dial-scheduled-tasks";
3
+ import { SCHEDULED_TASK_WALL_DATE_TIME_PATTERN as r, formatScheduledTaskClockTime as i, formatScheduledTaskRunDate as a, formatScheduledTaskRunTime as o, formatScheduledTaskWeekdays as s, formatZonedDateTime as c } from "./scheduled-task-time-format.js";
4
+ import { ScheduledTaskErrorCode as l, ScheduledTaskRunDtoStatusEnum as u } from "@epam/ai-dial-chat-api-client";
5
+ import { ScheduledTaskRunStatus as d, instantToZonedDateTime as f, isAbsoluteInstant as p } from "@epam/ai-dial-scheduled-tasks";
5
6
  //#region src/scheduled-task/scheduled-task-display.ts
6
- var c = /* @__PURE__ */ function(e) {
7
+ var m = /* @__PURE__ */ function(e) {
7
8
  return e.NotFound = "notFound", e.Retryable = "retryable", e.Generic = "generic", e;
8
- }({}), l = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/, u = 60, d = 3600, f = (e, t) => new Intl.DateTimeFormat(t, {
9
- weekday: "long",
10
- timeZone: "UTC"
11
- }).format(new Date(Date.UTC(2023, 0, 2 + Number(e)))), p = (e, t) => new Intl.ListFormat(t, { type: "conjunction" }).format(e.map((e) => f(e, t))), m = (e, t) => e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate(), h = (e, t) => new Intl.DateTimeFormat(t, {
12
- dateStyle: "medium",
13
- timeStyle: "short",
14
- timeZone: "UTC"
15
- }).format(/* @__PURE__ */ new Date(`${e}:00Z`)), g = (e, t, n) => {
16
- let r = s(e) ? o(e, t) : e.slice(0, 16);
17
- return !r || !l.test(r) ? e : h(r, n);
18
- }, _ = (r, i, { locale: a, browserTimezone: o = Intl.DateTimeFormat().resolvedOptions().timeZone } = {}) => {
19
- let s = r.timezone || "UTC", c = t(r.trigger, { timezone: s }), l = c.time ?? "", u = (e) => i.withTimezone && !n(s, o) ? i.withTimezone(e, s) : e;
20
- switch (c.kind) {
21
- case e.OneTime: return u(i.onceAt(h(c.dateTime ?? "", a)));
22
- case e.EveryNMinutes: return i.everyNMinutes(c.intervalMinutes ?? 0);
23
- case e.Hourly: return u(i.hourlyAt(l));
24
- case e.Daily: return u(i.dailyAt(l));
25
- case e.Weekly: return u(i.weeklyAt(p(c.daysOfWeek ?? [c.dayOfWeek ?? ""], a), l));
26
- case e.Monthly: return u(i.monthlyAt(c.dayOfMonth ?? "", l));
27
- case e.Invalid: return i.invalid;
28
- default: return i.recurringFallback;
9
+ }({}), h = 60, g = 3600, _ = (e, t) => e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate(), v = (e, t, n) => {
10
+ let i = p(e) ? f(e, t) : e.slice(0, 16);
11
+ return !i || !r.test(i) ? e : c(i, n);
12
+ }, y = (r, a, { locale: o, browserTimezone: l = Intl.DateTimeFormat().resolvedOptions().timeZone, alwaysShowTimezone: u = !1 } = {}) => {
13
+ let d = r.timezone || "UTC", f = t(r.trigger, { timezone: d }), p = f.time ?? "", m = i(p, o), h = (e) => a.withTimezone && (u || !n(d, l)) ? a.withTimezone(e, d) : e;
14
+ switch (f.kind) {
15
+ case e.OneTime: return h(a.onceAt(c(f.dateTime ?? "", o)));
16
+ case e.EveryNMinutes: return a.everyNMinutes(f.intervalMinutes ?? 0);
17
+ case e.Hourly: return h(a.hourlyAt(p));
18
+ case e.Daily: return h(a.dailyAt(m));
19
+ case e.Weekly: return h(a.weeklyAt(s(f.daysOfWeek ?? [f.dayOfWeek ?? ""], o), m));
20
+ case e.Monthly: return h(a.monthlyAt(f.dayOfMonth ?? "", m));
21
+ case e.Invalid: return a.invalid;
22
+ default: return a.recurringFallback;
29
23
  }
30
- }, v = (e, t, n) => ({
24
+ }, b = (e, t, n) => ({
31
25
  id: e.id,
32
26
  displayName: e.displayName,
33
27
  descriptionPreview: e.description,
34
- scheduleLabel: _(e, t, n),
28
+ scheduleLabel: y(e, t, n),
35
29
  isActive: e.isActive,
36
30
  isCompleted: e.isCompleted
37
- }), y = (e, t, n) => e.map((e) => v(e, t, n)), b = (e, t) => {
31
+ }), x = (e, t, n) => e.map((e) => b(e, t, n)), S = (e, t) => {
38
32
  if (e == null) return;
39
33
  let n = [
40
- [Math.floor(e / d), t.hours],
41
- [Math.floor(e % d / u), t.minutes],
42
- [e % u, t.seconds]
34
+ [Math.floor(e / g), t.hours],
35
+ [Math.floor(e % g / h), t.minutes],
36
+ [e % h, t.seconds]
43
37
  ].filter(([e]) => e > 0).map(([e, t]) => t(e));
44
38
  return t.suffix(n.length ? n.join(" ") : t.seconds(0));
45
- }, x = (e, t, n, { durationLabels: r, locale: i, now: a = /* @__PURE__ */ new Date() } = {}) => {
46
- let o = new Date(e), s = new Intl.DateTimeFormat(i, { timeStyle: "short" }).format(o), c = m(o, a) ? n.todayAt(s) : n.dateAt(new Intl.DateTimeFormat(i, {
47
- month: "short",
48
- day: "numeric"
49
- }).format(o), s), l = r ? b(t, r) : void 0;
50
- return l ? `${c} ${l}` : c;
51
- }, S = (e) => {
39
+ }, C = (e, t, n, { durationLabels: r, locale: i, now: s = /* @__PURE__ */ new Date() } = {}) => {
40
+ let c = new Date(e), l = o(c, i), u = _(c, s) ? n.todayAt(l) : n.dateAt(a(c, i), l), d = r ? S(t, r) : void 0;
41
+ return d ? `${u} ${d}` : u;
42
+ }, w = (e) => {
52
43
  switch (e) {
53
- case i.Success: return a.Success;
54
- case i.Error: return a.Error;
55
- case i.InProgress: return a.InProgress;
56
- default: return a.Missed;
44
+ case u.Success: return d.Success;
45
+ case u.Error: return d.Error;
46
+ case u.InProgress: return d.InProgress;
47
+ default: return d.Missed;
57
48
  }
58
- }, C = (e, { timestampLabels: t, durationLabels: n, conversations: r, conversationIdsMatch: i, locale: a, now: o }) => {
49
+ }, T = (e, { timestampLabels: t, durationLabels: n, conversations: r, conversationIdsMatch: i, locale: a, now: o }) => {
59
50
  let { conversationId: s } = e, c = s ? r.find((e) => i(e.id, s)) : void 0;
60
51
  return {
61
52
  id: e.id,
62
- status: S(e.status),
63
- timestampLabel: x(e.startTime, void 0, t, {
53
+ status: w(e.status),
54
+ timestampLabel: C(e.startTime, void 0, t, {
64
55
  locale: a,
65
56
  now: o
66
57
  }),
67
- durationLabel: b(e.durationSeconds, n),
58
+ durationLabel: S(e.durationSeconds, n),
68
59
  conversationId: s,
69
60
  isUnread: c?.isUnread === !0,
70
61
  errorText: e.errorText
71
62
  };
72
- }, w = (e, t) => e.map((e) => C(e, t)), T = (e) => e === 404 || e === 409 ? "notFound" : e === 502 ? "retryable" : "generic", E = (e, { adminConsentRequired: t, fallback: n }) => e.code === r.ScheduledTaskAdminConsentRequired ? t : e.upstreamMessage?.trim() || n;
63
+ }, E = (e, t) => e.map((e) => T(e, t)), D = (e) => e === 404 || e === 409 ? "notFound" : e === 502 ? "retryable" : "generic", O = (e, { adminConsentRequired: t, fallback: n }) => e.code === l.ScheduledTaskAdminConsentRequired ? t : e.upstreamMessage?.trim() || n;
73
64
  //#endregion
74
- export { c as ScheduledTaskDeleteErrorKind, T as classifyScheduledTaskDeleteError, b as formatScheduledTaskRunDuration, x as formatScheduledTaskRunTimestamp, _ as formatScheduledTaskScheduleLabel, g as formatScheduledTaskTriggerTime, h as formatZonedDateTime, E as selectScheduledTaskErrorMessage, v as toScheduledTaskItem, y as toScheduledTaskItems, C as toScheduledTaskRunItem, w as toScheduledTaskRunItems };
65
+ export { m as ScheduledTaskDeleteErrorKind, D as classifyScheduledTaskDeleteError, S as formatScheduledTaskRunDuration, C as formatScheduledTaskRunTimestamp, y as formatScheduledTaskScheduleLabel, v as formatScheduledTaskTriggerTime, O as selectScheduledTaskErrorMessage, b as toScheduledTaskItem, x as toScheduledTaskItems, T as toScheduledTaskRunItem, E as toScheduledTaskRunItems };
@@ -8,4 +8,6 @@ import { ScheduleCronDto } from '@epam/ai-dial-chat-api-client';
8
8
  * evaluate or the zone is unknown.
9
9
  */
10
10
  export declare const getNextCronOccurrence: (cron: ScheduleCronDto, timezone: string, from?: Date) => string | undefined;
11
+ /** Returns whether a cron activity window's `endDate` is at or before `now` (epoch ms, default: the current time). */
12
+ export declare const hasScheduledTaskWindowEnded: (endDate: string, now?: number) => boolean;
11
13
  //# sourceMappingURL=scheduled-task-next-occurrence.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"scheduled-task-next-occurrence.d.ts","sourceRoot":"","sources":["../../src/scheduled-task/scheduled-task-next-occurrence.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AA8BrE;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,GAChC,MAAM,eAAe,EACrB,UAAU,MAAM,EAChB,OAAM,IAAiB,KACtB,MAAM,GAAG,SAmCX,CAAC"}
1
+ {"version":3,"file":"scheduled-task-next-occurrence.d.ts","sourceRoot":"","sources":["../../src/scheduled-task/scheduled-task-next-occurrence.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AA8BrE;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,GAChC,MAAM,eAAe,EACrB,UAAU,MAAM,EAChB,OAAM,IAAiB,KACtB,MAAM,GAAG,SAmCX,CAAC;AAEF,sHAAsH;AACtH,eAAO,MAAM,2BAA2B,GACtC,SAAS,MAAM,EACf,MAAK,MAAmB,KACvB,OAA6C,CAAC"}
@@ -15,6 +15,6 @@ var n = "last", r = 366, i = /^\d+$/, a = 864e5, o = (e, t, r) => t == null ? r
15
15
  let t = new Date(g + e * a), n = `${t.toISOString().slice(0, 10)}T${h}`;
16
16
  if (n > m && o(t, f, p)) return n;
17
17
  }
18
- };
18
+ }, c = (e, t = Date.now()) => new Date(e).getTime() <= t;
19
19
  //#endregion
20
- export { s as getNextCronOccurrence };
20
+ export { s as getNextCronOccurrence, c as hasScheduledTaskWindowEnded };
@@ -0,0 +1,34 @@
1
+ /** A zone-local `YYYY-MM-DDTHH:mm`, the shape the wall-time formatter can show. */
2
+ export declare const SCHEDULED_TASK_WALL_DATE_TIME_PATTERN: RegExp;
3
+ /** Style of a weekday name. */
4
+ export declare enum ScheduledTaskWeekdayStyle {
5
+ Long = "long",
6
+ Narrow = "narrow"
7
+ }
8
+ /**
9
+ * Formats a stored `HH:mm` wall time as the locale's short clock time (`9:00 AM`
10
+ * or `09:00`) without converting it to another zone. Returns the raw value when
11
+ * it is not a valid `HH:mm`.
12
+ */
13
+ export declare const formatScheduledTaskClockTime: (time: string, locale?: string) => string;
14
+ /** Formats a zone-local `YYYY-MM-DDTHH:mm` as a medium date and short time without converting it to another zone. */
15
+ export declare const formatZonedDateTime: (dateTime: string, locale?: string) => string;
16
+ /**
17
+ * Formats an absolute instant (an ISO string such as `nextRunTime`) as a medium
18
+ * date and short time in the viewer's zone. Returns the raw value when it is
19
+ * not a date.
20
+ */
21
+ export declare const formatScheduledTaskInstant: (instant: string, locale?: string) => string;
22
+ /** Formats the time of day of an instant as the locale's short time in the viewer's zone, e.g. `11:00 AM`. */
23
+ export declare const formatScheduledTaskRunTime: (date: Date, locale?: string) => string;
24
+ /** Formats the calendar day of an instant without a year in the viewer's zone, e.g. `Nov 17`. */
25
+ export declare const formatScheduledTaskRunDate: (date: Date, locale?: string) => string;
26
+ /**
27
+ * Formats an APScheduler weekday (`'0'` is Monday) as its localized name.
28
+ * 2023-01-02 was a Monday and the formatter runs in UTC, so the name is the
29
+ * segment's own day, not the viewer's local calendar's.
30
+ */
31
+ export declare const formatScheduledTaskWeekday: (dayOfWeek: string | number | undefined, locale?: string, style?: ScheduledTaskWeekdayStyle) => string;
32
+ /** Formats several APScheduler weekdays as one locale list, e.g. `Monday, Wednesday and Friday`. */
33
+ export declare const formatScheduledTaskWeekdays: (daysOfWeek: string[], locale?: string) => string;
34
+ //# sourceMappingURL=scheduled-task-time-format.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scheduled-task-time-format.d.ts","sourceRoot":"","sources":["../../src/scheduled-task/scheduled-task-time-format.ts"],"names":[],"mappings":"AAcA,mFAAmF;AACnF,eAAO,MAAM,qCAAqC,QACf,CAAC;AAIpC,+BAA+B;AAC/B,oBAAY,yBAAyB;IACnC,IAAI,SAAS;IACb,MAAM,WAAW;CAClB;AAED;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,GACvC,MAAM,MAAM,EACZ,SAAS,MAAM,KACd,MAUF,CAAC;AAEF,qHAAqH;AACrH,eAAO,MAAM,mBAAmB,GAC9B,UAAU,MAAM,EAChB,SAAS,MAAM,KACd,MAKqC,CAAC;AAEzC;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,GACrC,SAAS,MAAM,EACf,SAAS,MAAM,KACd,MASF,CAAC;AAEF,8GAA8G;AAC9G,eAAO,MAAM,0BAA0B,GACrC,MAAM,IAAI,EACV,SAAS,MAAM,KACd,MACmE,CAAC;AAEvE,iGAAiG;AACjG,eAAO,MAAM,0BAA0B,GACrC,MAAM,IAAI,EACV,SAAS,MAAM,KACd,MAGA,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,GACrC,WAAW,MAAM,GAAG,MAAM,GAAG,SAAS,EACtC,SAAS,MAAM,EACf,QAAO,yBAA0D,KAChE,MAGA,CAAC;AAEJ,oGAAoG;AACpG,eAAO,MAAM,2BAA2B,GACtC,YAAY,MAAM,EAAE,EACpB,SAAS,MAAM,KACd,MAKA,CAAC"}
@@ -0,0 +1,33 @@
1
+ //#region src/scheduled-task/scheduled-task-time-format.ts
2
+ var e = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/, t = /^(\d{1,2}):(\d{2})$/, n = /* @__PURE__ */ function(e) {
3
+ return e.Long = "long", e.Narrow = "narrow", e;
4
+ }({}), r = (e, n) => {
5
+ let r = t.exec(e);
6
+ if (!r) return e;
7
+ let i = Number(r[1]), a = Number(r[2]);
8
+ return i > 23 || a > 59 ? e : new Intl.DateTimeFormat(n, {
9
+ timeStyle: "short",
10
+ timeZone: "UTC"
11
+ }).format(new Date(Date.UTC(1970, 0, 1, i, a)));
12
+ }, i = (e, t) => new Intl.DateTimeFormat(t, {
13
+ dateStyle: "medium",
14
+ timeStyle: "short",
15
+ timeZone: "UTC"
16
+ }).format(/* @__PURE__ */ new Date(`${e}:00Z`)), a = (e, t) => {
17
+ try {
18
+ return new Intl.DateTimeFormat(t, {
19
+ dateStyle: "medium",
20
+ timeStyle: "short"
21
+ }).format(new Date(e));
22
+ } catch {
23
+ return e;
24
+ }
25
+ }, o = (e, t) => new Intl.DateTimeFormat(t, { timeStyle: "short" }).format(e), s = (e, t) => new Intl.DateTimeFormat(t, {
26
+ month: "short",
27
+ day: "numeric"
28
+ }).format(e), c = (e, t, n = "long") => new Intl.DateTimeFormat(t, {
29
+ weekday: n,
30
+ timeZone: "UTC"
31
+ }).format(new Date(Date.UTC(2023, 0, 2 + Number(e)))), l = (e, t) => new Intl.ListFormat(t, { type: "conjunction" }).format(e.map((e) => c(e, t)));
32
+ //#endregion
33
+ export { e as SCHEDULED_TASK_WALL_DATE_TIME_PATTERN, n as ScheduledTaskWeekdayStyle, r as formatScheduledTaskClockTime, a as formatScheduledTaskInstant, s as formatScheduledTaskRunDate, o as formatScheduledTaskRunTime, c as formatScheduledTaskWeekday, l as formatScheduledTaskWeekdays, i as formatZonedDateTime };
@@ -1,16 +1,17 @@
1
1
  import { UnsupportedTriggerReason as e } from "./scheduled-task/scheduled-task-mapping.js";
2
2
  import { ScheduledTaskTriggerDescriptionKind as t, describeScheduledTaskTrigger as n } from "./scheduled-task/scheduled-task-description.js";
3
3
  import { UTC_TIMEZONE_ID as r, findTimezoneOption as i, getTimezoneOptions as a, isKnownTimezone as o, isSameTimezone as s } from "./shared/timezones.js";
4
- import { ScheduledTaskDeleteErrorKind as c, classifyScheduledTaskDeleteError as l, formatScheduledTaskRunDuration as u, formatScheduledTaskRunTimestamp as d, formatScheduledTaskScheduleLabel as f, formatScheduledTaskTriggerTime as p, formatZonedDateTime as m, selectScheduledTaskErrorMessage as h, toScheduledTaskItem as g, toScheduledTaskItems as _, toScheduledTaskRunItem as v, toScheduledTaskRunItems as y } from "./scheduled-task/scheduled-task-display.js";
5
- import { mapFormValuesToCreateBody as b, mapFormValuesToUpdateBody as x, mapScheduledTaskDtoToFormValues as S } from "./scheduled-task/scheduled-task-trigger.js";
6
- import { prepareScheduledTaskCreateBody as C, prepareScheduledTaskUpdateBody as w } from "./scheduled-task/scheduled-task-preparation.js";
7
- import { createScheduledTasksApiClient as T } from "./scheduled-task/scheduled-tasks-api-client.js";
8
- import { useScheduledTasks as E } from "./scheduled-task/use-scheduled-tasks.js";
9
- import { mergeRunsById as D, useScheduledTaskRuns as O } from "./scheduled-task/use-scheduled-task-runs.js";
10
- import { ScheduledTaskRunStatusFeedback as k, mergeScheduledTaskRuns as A, useStartScheduledTask as j } from "./scheduled-task/useStartScheduledTask.js";
11
- import { getNextCronOccurrence as M } from "./scheduled-task/scheduled-task-next-occurrence.js";
12
- import { checkScheduledTaskAuthSessionError as N } from "./scheduled-task/check-scheduled-task-auth-session-error.js";
13
- import { useScheduledTaskSkillDisplayNames as P } from "./scheduled-task/useScheduledTaskSkillDisplayNames/useScheduledTaskSkillDisplayNames.js";
14
- import { ActiveScheduledTaskDetailState as F, ActiveScheduledTaskStatus as I, resolveActiveScheduledTask as L } from "./scheduled-task/active-scheduled-task.js";
15
- import { useActiveScheduledTaskDetails as R } from "./scheduled-task/useActiveScheduledTaskDetails.js";
16
- export { F as ActiveScheduledTaskDetailState, I as ActiveScheduledTaskStatus, c as ScheduledTaskDeleteErrorKind, k as ScheduledTaskRunStatusFeedback, t as ScheduledTaskTriggerDescriptionKind, r as UTC_TIMEZONE_ID, e as UnsupportedTriggerReason, N as checkScheduledTaskAuthSessionError, l as classifyScheduledTaskDeleteError, T as createScheduledTasksApiClient, n as describeScheduledTaskTrigger, i as findTimezoneOption, u as formatScheduledTaskRunDuration, d as formatScheduledTaskRunTimestamp, f as formatScheduledTaskScheduleLabel, p as formatScheduledTaskTriggerTime, m as formatZonedDateTime, M as getNextCronOccurrence, a as getTimezoneOptions, o as isKnownTimezone, s as isSameTimezone, b as mapFormValuesToCreateBody, x as mapFormValuesToUpdateBody, S as mapScheduledTaskDtoToFormValues, D as mergeRunsById, A as mergeScheduledTaskRuns, C as prepareScheduledTaskCreateBody, w as prepareScheduledTaskUpdateBody, L as resolveActiveScheduledTask, h as selectScheduledTaskErrorMessage, g as toScheduledTaskItem, _ as toScheduledTaskItems, v as toScheduledTaskRunItem, y as toScheduledTaskRunItems, R as useActiveScheduledTaskDetails, O as useScheduledTaskRuns, P as useScheduledTaskSkillDisplayNames, E as useScheduledTasks, j as useStartScheduledTask };
4
+ import { SCHEDULED_TASK_WALL_DATE_TIME_PATTERN as c, ScheduledTaskWeekdayStyle as l, formatScheduledTaskClockTime as u, formatScheduledTaskInstant as d, formatScheduledTaskRunDate as f, formatScheduledTaskRunTime as p, formatScheduledTaskWeekday as m, formatScheduledTaskWeekdays as h, formatZonedDateTime as g } from "./scheduled-task/scheduled-task-time-format.js";
5
+ import { ScheduledTaskDeleteErrorKind as _, classifyScheduledTaskDeleteError as v, formatScheduledTaskRunDuration as y, formatScheduledTaskRunTimestamp as b, formatScheduledTaskScheduleLabel as x, formatScheduledTaskTriggerTime as S, selectScheduledTaskErrorMessage as C, toScheduledTaskItem as w, toScheduledTaskItems as T, toScheduledTaskRunItem as E, toScheduledTaskRunItems as D } from "./scheduled-task/scheduled-task-display.js";
6
+ import { mapFormValuesToCreateBody as O, mapFormValuesToUpdateBody as k, mapScheduledTaskDtoToFormValues as A } from "./scheduled-task/scheduled-task-trigger.js";
7
+ import { prepareScheduledTaskCreateBody as j, prepareScheduledTaskUpdateBody as M } from "./scheduled-task/scheduled-task-preparation.js";
8
+ import { createScheduledTasksApiClient as N } from "./scheduled-task/scheduled-tasks-api-client.js";
9
+ import { useScheduledTasks as P } from "./scheduled-task/use-scheduled-tasks.js";
10
+ import { mergeRunsById as F, useScheduledTaskRuns as I } from "./scheduled-task/use-scheduled-task-runs.js";
11
+ import { ScheduledTaskRunStatusFeedback as L, mergeScheduledTaskRuns as R, useStartScheduledTask as z } from "./scheduled-task/useStartScheduledTask.js";
12
+ import { getNextCronOccurrence as B, hasScheduledTaskWindowEnded as V } from "./scheduled-task/scheduled-task-next-occurrence.js";
13
+ import { checkScheduledTaskAuthSessionError as H } from "./scheduled-task/check-scheduled-task-auth-session-error.js";
14
+ import { useScheduledTaskSkillDisplayNames as U } from "./scheduled-task/useScheduledTaskSkillDisplayNames/useScheduledTaskSkillDisplayNames.js";
15
+ import { ActiveScheduledTaskDetailState as W, ActiveScheduledTaskStatus as G, resolveActiveScheduledTask as K } from "./scheduled-task/active-scheduled-task.js";
16
+ import { useActiveScheduledTaskDetails as q } from "./scheduled-task/useActiveScheduledTaskDetails.js";
17
+ export { W as ActiveScheduledTaskDetailState, G as ActiveScheduledTaskStatus, c as SCHEDULED_TASK_WALL_DATE_TIME_PATTERN, _ as ScheduledTaskDeleteErrorKind, L as ScheduledTaskRunStatusFeedback, t as ScheduledTaskTriggerDescriptionKind, l as ScheduledTaskWeekdayStyle, r as UTC_TIMEZONE_ID, e as UnsupportedTriggerReason, H as checkScheduledTaskAuthSessionError, v as classifyScheduledTaskDeleteError, N as createScheduledTasksApiClient, n as describeScheduledTaskTrigger, i as findTimezoneOption, u as formatScheduledTaskClockTime, d as formatScheduledTaskInstant, f as formatScheduledTaskRunDate, y as formatScheduledTaskRunDuration, p as formatScheduledTaskRunTime, b as formatScheduledTaskRunTimestamp, x as formatScheduledTaskScheduleLabel, S as formatScheduledTaskTriggerTime, m as formatScheduledTaskWeekday, h as formatScheduledTaskWeekdays, g as formatZonedDateTime, B as getNextCronOccurrence, a as getTimezoneOptions, V as hasScheduledTaskWindowEnded, o as isKnownTimezone, s as isSameTimezone, O as mapFormValuesToCreateBody, k as mapFormValuesToUpdateBody, A as mapScheduledTaskDtoToFormValues, F as mergeRunsById, R as mergeScheduledTaskRuns, j as prepareScheduledTaskCreateBody, M as prepareScheduledTaskUpdateBody, K as resolveActiveScheduledTask, C as selectScheduledTaskErrorMessage, w as toScheduledTaskItem, T as toScheduledTaskItems, E as toScheduledTaskRunItem, D as toScheduledTaskRunItems, q as useActiveScheduledTaskDetails, I as useScheduledTaskRuns, U as useScheduledTaskSkillDisplayNames, P as useScheduledTasks, z as useStartScheduledTask };
package/utils.js CHANGED
@@ -1,28 +1,29 @@
1
1
  import { getAcceptInvitationErrorItemName as e, getApiErrorDetails as t, getApiErrorMessage as n, getApiErrorStatus as r, isConversationNotFoundError as i } from "./api-error/api-error.js";
2
- import { createCsrfMiddleware as a } from "./api-transport/create-csrf-middleware.js";
3
- import { createUnauthorizedMiddleware as o } from "./api-transport/create-unauthorized-middleware.js";
4
- import { includesIgnoreCase as s, safeDecodeURI as c, safeDecodeURIComponent as l, stripSurroundingSlashes as u, stripTrailingSlashes as d } from "./shared/string-utils.js";
5
- import { appendLocaleCode as f, buildAdditionalLocaleOptions as p, composeLocalePayload as m, decomposeLocalizedFields as h, resolveLocalizedText as g, toBaseLocale as _ } from "./shared/locale.js";
6
- import { formatCalendarDate as v, padTwoDigits as y } from "./shared/formatting.js";
7
- import { PromptSource as b, parsePromptResourceUrl as x } from "./prompt/prompt-resource.js";
8
- import { getRunnerSchemas as S, isCustomAppSchema as C, isQuickAppSchema as w } from "./shared/application-schema.js";
9
- import { buildExternalServiceScopeId as T, getExternalServiceFallbackName as E, parseExternalServiceUrl as D } from "./shared/external-services.js";
10
- import { SaveDestinationRoot as O } from "./catalog/save-destination-root.js";
11
- import { buildPromptExportEnvelope as k, buildPromptExportFileName as A, serializePromptExport as j } from "./prompt/export-prompt.js";
12
- import { PROMPT_CONTENT_MAX_LENGTH as M, PROMPT_COUNTER_ANNOUNCE_THRESHOLD as N, PROMPT_DESCRIPTION_MAX_LENGTH as P, PROMPT_FIELD_VALIDATORS as F, PROMPT_NAME_MAX_LENGTH as I, PromptFieldError as L, buildPromptPath as R, getRemainingCharacters as z, validatePromptContent as B, validatePromptDescription as V, validatePromptName as H } from "./prompt/prompt.js";
13
- import { usePromptsState as U } from "./prompt/usePromptsState/usePromptsState.js";
14
- import { getBrowserTimezone as W } from "./shared/browser-timezone.js";
15
- import { apSchedulerDayToJsDay as G, jsDayToApSchedulerDay as K } from "./shared/cron-weekday.js";
16
- import { isValidAbsoluteUrl as q, isValidFeaturesData as J, parseFeaturesData as Y } from "./shared/custom-apps.js";
17
- import { EXTERNAL_SERVICE_SIGNIN_METHOD as X, PendingSigninEventKind as Z, TOOLSET_SIGNIN_METHOD as Q } from "./shared/client-channel.js";
18
- import { ColorScheme as $, applyThemeColors as ee, getOsPreferredTheme as te } from "./shared/theme-colors.js";
19
- import { useUsageData as ne } from "./usage/useUsageData/useUsageData.js";
20
- import { triggerBrowserDownload as re } from "./files/browser-download.js";
21
- import { usePersistedState as ie } from "./shared/usePersistedState/usePersistedState.js";
22
- import { useAppVersionCheck as ae } from "./shared/useAppVersionCheck/useAppVersionCheck.js";
23
- import { getCleanedLocationTarget as oe } from "./shared/url-cleanup.js";
24
- import { OrgUnitsStatus as se } from "./org-units/types.js";
25
- import { useOrgUnits as ce } from "./org-units/useOrgUnits/useOrgUnits.js";
26
- import { OrgUnitFolderGuardPurpose as le, buildFolderGuards as ue, getOrgUnitNamespace as de, toPublishDisabledReason as fe } from "./org-units/org-unit-guards.js";
27
- import { useFolderGuards as pe } from "./org-units/useFolderGuards/useFolderGuards.js";
28
- export { $ as ColorScheme, X as EXTERNAL_SERVICE_SIGNIN_METHOD, le as OrgUnitFolderGuardPurpose, se as OrgUnitsStatus, M as PROMPT_CONTENT_MAX_LENGTH, N as PROMPT_COUNTER_ANNOUNCE_THRESHOLD, P as PROMPT_DESCRIPTION_MAX_LENGTH, F as PROMPT_FIELD_VALIDATORS, I as PROMPT_NAME_MAX_LENGTH, Z as PendingSigninEventKind, L as PromptFieldError, b as PromptSource, O as SaveDestinationRoot, Q as TOOLSET_SIGNIN_METHOD, G as apSchedulerDayToJsDay, f as appendLocaleCode, ee as applyThemeColors, p as buildAdditionalLocaleOptions, T as buildExternalServiceScopeId, ue as buildFolderGuards, k as buildPromptExportEnvelope, A as buildPromptExportFileName, R as buildPromptPath, m as composeLocalePayload, a as createCsrfMiddleware, o as createUnauthorizedMiddleware, h as decomposeLocalizedFields, v as formatCalendarDate, e as getAcceptInvitationErrorItemName, t as getApiErrorDetails, n as getApiErrorMessage, r as getApiErrorStatus, W as getBrowserTimezone, oe as getCleanedLocationTarget, E as getExternalServiceFallbackName, de as getOrgUnitNamespace, te as getOsPreferredTheme, z as getRemainingCharacters, S as getRunnerSchemas, s as includesIgnoreCase, i as isConversationNotFoundError, C as isCustomAppSchema, w as isQuickAppSchema, q as isValidAbsoluteUrl, J as isValidFeaturesData, K as jsDayToApSchedulerDay, y as padTwoDigits, D as parseExternalServiceUrl, Y as parseFeaturesData, x as parsePromptResourceUrl, g as resolveLocalizedText, c as safeDecodeURI, l as safeDecodeURIComponent, j as serializePromptExport, u as stripSurroundingSlashes, d as stripTrailingSlashes, _ as toBaseLocale, fe as toPublishDisabledReason, re as triggerBrowserDownload, ae as useAppVersionCheck, pe as useFolderGuards, ce as useOrgUnits, ie as usePersistedState, U as usePromptsState, ne as useUsageData, B as validatePromptContent, V as validatePromptDescription, H as validatePromptName };
2
+ import { withApiErrorMapping as a } from "./api-error/map-api-error.js";
3
+ import { createCsrfMiddleware as o } from "./api-transport/create-csrf-middleware.js";
4
+ import { createUnauthorizedMiddleware as s } from "./api-transport/create-unauthorized-middleware.js";
5
+ import { includesIgnoreCase as c, safeDecodeURI as l, safeDecodeURIComponent as u, stripSurroundingSlashes as d, stripTrailingSlashes as f } from "./shared/string-utils.js";
6
+ import { appendLocaleCode as p, buildAdditionalLocaleOptions as m, composeLocalePayload as h, decomposeLocalizedFields as g, resolveLocalizedText as _, toBaseLocale as v } from "./shared/locale.js";
7
+ import { formatCalendarDate as y, padTwoDigits as b } from "./shared/formatting.js";
8
+ import { PromptSource as x, parsePromptResourceUrl as S } from "./prompt/prompt-resource.js";
9
+ import { getRunnerSchemas as C, isCustomAppSchema as w, isQuickAppSchema as T } from "./shared/application-schema.js";
10
+ import { buildExternalServiceScopeId as E, getExternalServiceFallbackName as D, parseExternalServiceUrl as O } from "./shared/external-services.js";
11
+ import { SaveDestinationRoot as k } from "./catalog/save-destination-root.js";
12
+ import { buildPromptExportEnvelope as A, buildPromptExportFileName as j, serializePromptExport as M } from "./prompt/export-prompt.js";
13
+ import { PROMPT_CONTENT_MAX_LENGTH as N, PROMPT_COUNTER_ANNOUNCE_THRESHOLD as P, PROMPT_DESCRIPTION_MAX_LENGTH as F, PROMPT_FIELD_VALIDATORS as I, PROMPT_NAME_MAX_LENGTH as L, PromptFieldError as R, buildPromptPath as z, getRemainingCharacters as B, validatePromptContent as V, validatePromptDescription as H, validatePromptName as U } from "./prompt/prompt.js";
14
+ import { usePromptsState as W } from "./prompt/usePromptsState/usePromptsState.js";
15
+ import { getBrowserTimezone as G } from "./shared/browser-timezone.js";
16
+ import { apSchedulerDayToJsDay as K, jsDayToApSchedulerDay as q } from "./shared/cron-weekday.js";
17
+ import { isValidAbsoluteUrl as J, isValidFeaturesData as Y, parseFeaturesData as X } from "./shared/custom-apps.js";
18
+ import { EXTERNAL_SERVICE_SIGNIN_METHOD as Z, PendingSigninEventKind as Q, TOOLSET_SIGNIN_METHOD as $ } from "./shared/client-channel.js";
19
+ import { ColorScheme as ee, applyThemeColors as te, getOsPreferredTheme as ne } from "./shared/theme-colors.js";
20
+ import { useUsageData as re } from "./usage/useUsageData/useUsageData.js";
21
+ import { triggerBrowserDownload as ie } from "./files/browser-download.js";
22
+ import { usePersistedState as ae } from "./shared/usePersistedState/usePersistedState.js";
23
+ import { useAppVersionCheck as oe } from "./shared/useAppVersionCheck/useAppVersionCheck.js";
24
+ import { getCleanedLocationTarget as se } from "./shared/url-cleanup.js";
25
+ import { OrgUnitsStatus as ce } from "./org-units/types.js";
26
+ import { useOrgUnits as le } from "./org-units/useOrgUnits/useOrgUnits.js";
27
+ import { OrgUnitFolderGuardPurpose as ue, buildFolderGuards as de, getOrgUnitNamespace as fe, toPublishDisabledReason as pe } from "./org-units/org-unit-guards.js";
28
+ import { useFolderGuards as me } from "./org-units/useFolderGuards/useFolderGuards.js";
29
+ export { ee as ColorScheme, Z as EXTERNAL_SERVICE_SIGNIN_METHOD, ue as OrgUnitFolderGuardPurpose, ce as OrgUnitsStatus, N as PROMPT_CONTENT_MAX_LENGTH, P as PROMPT_COUNTER_ANNOUNCE_THRESHOLD, F as PROMPT_DESCRIPTION_MAX_LENGTH, I as PROMPT_FIELD_VALIDATORS, L as PROMPT_NAME_MAX_LENGTH, Q as PendingSigninEventKind, R as PromptFieldError, x as PromptSource, k as SaveDestinationRoot, $ as TOOLSET_SIGNIN_METHOD, K as apSchedulerDayToJsDay, p as appendLocaleCode, te as applyThemeColors, m as buildAdditionalLocaleOptions, E as buildExternalServiceScopeId, de as buildFolderGuards, A as buildPromptExportEnvelope, j as buildPromptExportFileName, z as buildPromptPath, h as composeLocalePayload, o as createCsrfMiddleware, s as createUnauthorizedMiddleware, g as decomposeLocalizedFields, y as formatCalendarDate, e as getAcceptInvitationErrorItemName, t as getApiErrorDetails, n as getApiErrorMessage, r as getApiErrorStatus, G as getBrowserTimezone, se as getCleanedLocationTarget, D as getExternalServiceFallbackName, fe as getOrgUnitNamespace, ne as getOsPreferredTheme, B as getRemainingCharacters, C as getRunnerSchemas, c as includesIgnoreCase, i as isConversationNotFoundError, w as isCustomAppSchema, T as isQuickAppSchema, J as isValidAbsoluteUrl, Y as isValidFeaturesData, q as jsDayToApSchedulerDay, b as padTwoDigits, O as parseExternalServiceUrl, X as parseFeaturesData, S as parsePromptResourceUrl, _ as resolveLocalizedText, l as safeDecodeURI, u as safeDecodeURIComponent, M as serializePromptExport, d as stripSurroundingSlashes, f as stripTrailingSlashes, v as toBaseLocale, pe as toPublishDisabledReason, ie as triggerBrowserDownload, oe as useAppVersionCheck, me as useFolderGuards, le as useOrgUnits, ae as usePersistedState, W as usePromptsState, re as useUsageData, V as validatePromptContent, H as validatePromptDescription, U as validatePromptName, a as withApiErrorMapping };