@8wave/ai-elements 0.112.0 → 0.114.0-beta.15

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 (118) hide show
  1. package/dist/_chunks/Agent-D3ODaN3E.js +566 -0
  2. package/dist/_chunks/Agent-D3ODaN3E.js.map +1 -0
  3. package/dist/_chunks/{PkStreamingMarkdown-CRlRDGYl.js → PkStreamingMarkdown-CYOm47PX.js} +1276 -453
  4. package/dist/_chunks/PkStreamingMarkdown-CYOm47PX.js.map +1 -0
  5. package/dist/_chunks/{PkToolRequestGeolocation-BbxYKt-9.js → PkToolRequestGeolocation-BY7nXImb.js} +2 -2
  6. package/dist/_chunks/{PkToolRequestGeolocation-BbxYKt-9.js.map → PkToolRequestGeolocation-BY7nXImb.js.map} +1 -1
  7. package/dist/_chunks/{PkToolRequestOAuthConnection-CTp2w60F.js → PkToolRequestOAuthConnection-DFOTALFt.js} +2 -2
  8. package/dist/_chunks/{PkToolRequestOAuthConnection-CTp2w60F.js.map → PkToolRequestOAuthConnection-DFOTALFt.js.map} +1 -1
  9. package/dist/_chunks/{PkToolShowArtifact-CNnt82aH.js → PkToolShowArtifact-DzHRWoru.js} +2 -2
  10. package/dist/_chunks/{PkToolShowArtifact-CNnt82aH.js.map → PkToolShowArtifact-DzHRWoru.js.map} +1 -1
  11. package/dist/_chunks/{PkToolShowContactForm-D77gyjQG.js → PkToolShowContactForm-1J6_1AA2.js} +2 -2
  12. package/dist/_chunks/{PkToolShowContactForm-D77gyjQG.js.map → PkToolShowContactForm-1J6_1AA2.js.map} +1 -1
  13. package/dist/_chunks/{PkToolShowForm-DP4LLAk3.js → PkToolShowForm-DmQYj3v1.js} +5 -5
  14. package/dist/_chunks/{PkToolShowForm-DP4LLAk3.js.map → PkToolShowForm-DmQYj3v1.js.map} +1 -1
  15. package/dist/_chunks/{PkToolShowSources-Bwy0Ptmi.js → PkToolShowSources-BO8V5rlS.js} +3 -3
  16. package/dist/_chunks/{PkToolShowSources-Bwy0Ptmi.js.map → PkToolShowSources-BO8V5rlS.js.map} +1 -1
  17. package/dist/_chunks/{PkToolShowSuggestedReply-CFO8wV1b.js → PkToolShowSuggestedReply-CTWVG1Zk.js} +2 -2
  18. package/dist/_chunks/{PkToolShowSuggestedReply-CFO8wV1b.js.map → PkToolShowSuggestedReply-CTWVG1Zk.js.map} +1 -1
  19. package/dist/_chunks/{markdown-BRD-hDrH.js → markdown-JpLFzufn.js} +7 -7
  20. package/dist/_chunks/{markdown-BRD-hDrH.js.map → markdown-JpLFzufn.js.map} +1 -1
  21. package/dist/_chunks/url-validation-uLMZ5-AU.js.map +1 -1
  22. package/dist/ai-elements.es.js +2773 -2733
  23. package/dist/ai-elements.es.js.map +1 -1
  24. package/dist-vue/PkChatbot.js +1 -1
  25. package/dist-vue/PkChatbotEmptyState.js +1 -1
  26. package/dist-vue/PkChatbotInput.js +1 -1
  27. package/dist-vue/PkChatbotMessages.js +1 -1
  28. package/dist-vue/PkChatbotStepPayload.js +1 -1
  29. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  30. package/dist-vue/PkChatbotSteps.js +1 -1
  31. package/dist-vue/PkChatbotViewChat.js +1 -1
  32. package/dist-vue/PkChatbotViewConversations.js +1 -1
  33. package/dist-vue/PkChatbotViewFiles.js +1 -1
  34. package/dist-vue/PkChatbotViewProfile.js +1 -1
  35. package/dist-vue/_chunks/Media-_HfFLHGD.js.map +1 -1
  36. package/dist-vue/_chunks/{PkChatbot-C11EVHnI.js → PkChatbot-DZP40EZP.js} +8 -8
  37. package/dist-vue/_chunks/{PkChatbot-C11EVHnI.js.map → PkChatbot-DZP40EZP.js.map} +1 -1
  38. package/dist-vue/_chunks/{PkChatbotEmptyState-CacY4o02.js → PkChatbotEmptyState-DycCrfwz.js} +2 -2
  39. package/dist-vue/_chunks/{PkChatbotEmptyState-CacY4o02.js.map → PkChatbotEmptyState-DycCrfwz.js.map} +1 -1
  40. package/dist-vue/_chunks/{PkChatbotInput-Dkz3SNAk.js → PkChatbotInput-BCuqLdkT.js} +2 -2
  41. package/dist-vue/_chunks/{PkChatbotInput-Dkz3SNAk.js.map → PkChatbotInput-BCuqLdkT.js.map} +1 -1
  42. package/dist-vue/_chunks/PkChatbotMessages-PjKRDNYJ.js +776 -0
  43. package/dist-vue/_chunks/PkChatbotMessages-PjKRDNYJ.js.map +1 -0
  44. package/dist-vue/_chunks/{PkChatbotStepPayload-DU0W-eUp.js → PkChatbotStepPayload-CI98RiNv.js} +2 -2
  45. package/dist-vue/_chunks/{PkChatbotStepPayload-DU0W-eUp.js.map → PkChatbotStepPayload-CI98RiNv.js.map} +1 -1
  46. package/dist-vue/_chunks/{PkChatbotStepToolDetail-etlBryOg.js → PkChatbotStepToolDetail-B8zXJOdI.js} +3 -3
  47. package/dist-vue/_chunks/{PkChatbotStepToolDetail-etlBryOg.js.map → PkChatbotStepToolDetail-B8zXJOdI.js.map} +1 -1
  48. package/dist-vue/_chunks/PkChatbotSteps-CL27pMFS.js +190 -0
  49. package/dist-vue/_chunks/{PkChatbotSteps-jW07Q-4x.js.map → PkChatbotSteps-CL27pMFS.js.map} +1 -1
  50. package/dist-vue/_chunks/{PkChatbotViewChat-DJnjuhjt.js → PkChatbotViewChat-BZVcDXzL.js} +7 -7
  51. package/dist-vue/_chunks/{PkChatbotViewChat-DJnjuhjt.js.map → PkChatbotViewChat-BZVcDXzL.js.map} +1 -1
  52. package/dist-vue/_chunks/{PkChatbotViewConversations-BCdolW0R.js → PkChatbotViewConversations-Cx-mLdUE.js} +2 -2
  53. package/dist-vue/_chunks/{PkChatbotViewConversations-BCdolW0R.js.map → PkChatbotViewConversations-Cx-mLdUE.js.map} +1 -1
  54. package/dist-vue/_chunks/{PkChatbotViewFiles-Cudao8ew.js → PkChatbotViewFiles-DLIa-xG8.js} +2 -2
  55. package/dist-vue/_chunks/{PkChatbotViewFiles-Cudao8ew.js.map → PkChatbotViewFiles-DLIa-xG8.js.map} +1 -1
  56. package/dist-vue/_chunks/{PkChatbotViewProfile-DDsKOkcC.js → PkChatbotViewProfile-DEc9apXY.js} +2 -2
  57. package/dist-vue/_chunks/{PkChatbotViewProfile-DDsKOkcC.js.map → PkChatbotViewProfile-DEc9apXY.js.map} +1 -1
  58. package/dist-vue/_chunks/PkStreamingMarkdown-B2iju0WK.js +3245 -0
  59. package/dist-vue/_chunks/PkStreamingMarkdown-B2iju0WK.js.map +1 -0
  60. package/dist-vue/_chunks/{PkToolShowArtifact-BnwU7CV2.js → PkToolShowArtifact-C0J71YF6.js} +2 -2
  61. package/dist-vue/_chunks/{PkToolShowArtifact-BnwU7CV2.js.map → PkToolShowArtifact-C0J71YF6.js.map} +1 -1
  62. package/dist-vue/_chunks/{PkToolShowContactForm-_x_dbiHn.js → PkToolShowContactForm-De3Od9mC.js} +2 -2
  63. package/dist-vue/_chunks/{PkToolShowContactForm-_x_dbiHn.js.map → PkToolShowContactForm-De3Od9mC.js.map} +1 -1
  64. package/dist-vue/_chunks/{PkToolShowDiagram-RtkI_sKL.js → PkToolShowDiagram-DmY_hhAS.js} +2 -2
  65. package/dist-vue/_chunks/{PkToolShowDiagram-RtkI_sKL.js.map → PkToolShowDiagram-DmY_hhAS.js.map} +1 -1
  66. package/dist-vue/_chunks/{PkToolShowEmail-CRQjoJr1.js → PkToolShowEmail-D_Z15wCS.js} +2 -2
  67. package/dist-vue/_chunks/{PkToolShowEmail-CRQjoJr1.js.map → PkToolShowEmail-D_Z15wCS.js.map} +1 -1
  68. package/dist-vue/_chunks/{PkToolShowForm-IPAkJIXh.js → PkToolShowForm-DUGysIxj.js} +3 -3
  69. package/dist-vue/_chunks/{PkToolShowForm-IPAkJIXh.js.map → PkToolShowForm-DUGysIxj.js.map} +1 -1
  70. package/dist-vue/_chunks/{PkToolShowMessage-joTzAg9N.js → PkToolShowMessage-e5_EI5mV.js} +2 -2
  71. package/dist-vue/_chunks/{PkToolShowMessage-joTzAg9N.js.map → PkToolShowMessage-e5_EI5mV.js.map} +1 -1
  72. package/dist-vue/_chunks/{PkToolShowProductList-tOYjd2bq.js → PkToolShowProductList-B3X7Svyc.js} +2 -2
  73. package/dist-vue/_chunks/{PkToolShowProductList-tOYjd2bq.js.map → PkToolShowProductList-B3X7Svyc.js.map} +1 -1
  74. package/dist-vue/_chunks/{PkToolShowSources-gI947JOm.js → PkToolShowSources-BUjBSGc5.js} +3 -3
  75. package/dist-vue/_chunks/{PkToolShowSources-gI947JOm.js.map → PkToolShowSources-BUjBSGc5.js.map} +1 -1
  76. package/dist-vue/_chunks/{PkToolShowWebPages-D3Xy4iUs.js → PkToolShowWebPages-DEih8h5k.js} +2 -2
  77. package/dist-vue/_chunks/{PkToolShowWebPages-D3Xy4iUs.js.map → PkToolShowWebPages-DEih8h5k.js.map} +1 -1
  78. package/dist-vue/_chunks/{PkUrl-BgMBemSz.js → PkUrl-3NH9t-WA.js} +2 -2
  79. package/dist-vue/_chunks/{PkUrl-BgMBemSz.js.map → PkUrl-3NH9t-WA.js.map} +1 -1
  80. package/dist-vue/_chunks/{createChatbotApiClient-CaVLm5W9.js → createChatbotApiClient-DohvHshj.js} +115 -108
  81. package/dist-vue/_chunks/createChatbotApiClient-DohvHshj.js.map +1 -0
  82. package/dist-vue/_chunks/url-validation-uLMZ5-AU.js.map +1 -1
  83. package/dist-vue/_chunks/{useChatbotStore-BwrBZJCq.js → useChatbotStore-_10Jaf4z.js} +2 -2
  84. package/dist-vue/_chunks/{useChatbotStore-BwrBZJCq.js.map → useChatbotStore-_10Jaf4z.js.map} +1 -1
  85. package/dist-vue/_chunks/utils-BL4Ppr2R.js +184 -0
  86. package/dist-vue/_chunks/utils-BL4Ppr2R.js.map +1 -0
  87. package/dist-vue/api.js +1 -1
  88. package/dist-vue/apps/web-component/src/composables/useChatbotAuth.d.ts +1 -3
  89. package/dist-vue/composables.js +136 -95
  90. package/dist-vue/composables.js.map +1 -1
  91. package/dist-vue/index.js +3203 -3107
  92. package/dist-vue/index.js.map +1 -1
  93. package/dist-vue/locales.js +16 -0
  94. package/dist-vue/packages/auth/src/social-redirect-plugin.d.ts +18 -12
  95. package/dist-vue/packages/components/src/chat/PkTurnEvaluation.d.ts +8 -0
  96. package/dist-vue/packages/components/src/chat/markdownHtml.d.ts +20 -0
  97. package/dist-vue/packages/components/src/chat/utils.d.ts +9 -0
  98. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +60 -0
  99. package/dist-vue/packages/models/src/schema/AgentApiTool.d.ts +70 -0
  100. package/dist-vue/packages/models/src/schema/Chat.d.ts +42 -0
  101. package/dist-vue/packages/models/src/schema/Lead.d.ts +13 -0
  102. package/dist-vue/packages/models/src/schema/Media.d.ts +0 -1
  103. package/dist-vue/packages/models/src/schema/ModelProvider.d.ts +1 -1
  104. package/dist-vue/style.css +1 -1
  105. package/package.json +2 -1
  106. package/dist/_chunks/Agent-DTLrWpzX.js +0 -460
  107. package/dist/_chunks/Agent-DTLrWpzX.js.map +0 -1
  108. package/dist/_chunks/Media-Cft7Pwrh.js +0 -108
  109. package/dist/_chunks/Media-Cft7Pwrh.js.map +0 -1
  110. package/dist/_chunks/PkStreamingMarkdown-CRlRDGYl.js.map +0 -1
  111. package/dist-vue/_chunks/PkChatbotMessages-BD-vUak6.js +0 -776
  112. package/dist-vue/_chunks/PkChatbotMessages-BD-vUak6.js.map +0 -1
  113. package/dist-vue/_chunks/PkChatbotSteps-jW07Q-4x.js +0 -190
  114. package/dist-vue/_chunks/PkStreamingMarkdown-BoEpwaYQ.js +0 -2430
  115. package/dist-vue/_chunks/PkStreamingMarkdown-BoEpwaYQ.js.map +0 -1
  116. package/dist-vue/_chunks/createChatbotApiClient-CaVLm5W9.js.map +0 -1
  117. package/dist-vue/_chunks/utils-h4C7rRcu.js +0 -177
  118. package/dist-vue/_chunks/utils-h4C7rRcu.js.map +0 -1
@@ -0,0 +1,566 @@
1
+ import { C as e, S as t, a as n, b as r, c as i, d as a, f as o, g as s, h as c, i as l, l as u, n as d, o as f, s as ee, t as p, v as m, x as h, y as g } from "./zod-BTUfq5ZI.js";
2
+ //#region ../../packages/models/src/utils.ts
3
+ var _ = (e, t, n) => ee(e, t, {
4
+ encode: (e) => e,
5
+ decode: n
6
+ }), v = 51200, te = m(g(), h()).refine((e) => JSON.stringify(e).length <= v, { message: `Schema must not exceed ${v / 1024} KB` });
7
+ e();
8
+ var ne = (e) => [`${e}`, `-${e}`], re = (e) => e.flatMap((e) => ne(e)), y = {
9
+ pagination: (e = 1, t = 10) => ({
10
+ "page[number]": c().or(g()).transform((e) => Number(e)).default(e),
11
+ "page[size]": c().or(g()).transform((e) => Number(e)).default(t)
12
+ }),
13
+ filter: (e) => ({ [`filter[${e}]`]: g().optional() }),
14
+ include: (e) => ({ [`include[${e}]`]: g().optional() }),
15
+ range: (e) => ({
16
+ [`from[${e}]`]: g().optional(),
17
+ [`to[${e}]`]: g().optional()
18
+ }),
19
+ has: (e) => ({ [`has[${e}]`]: f().optional() }),
20
+ fullText: () => ({ "filter[fullText]": g().optional() }),
21
+ ids: () => ({ ids: r([g(), n(g())]).optional() }),
22
+ deleted: () => ({ "filter[isDeleted]": f().default(!1) }),
23
+ filters: (e) => e.map((e) => y.filter(e)).reduce((e, t) => ({
24
+ ...e,
25
+ ...t
26
+ })),
27
+ sort: (e) => {
28
+ let t = re(e);
29
+ return { sort: d(t).optional().default(t[0]) };
30
+ }
31
+ }, b = s({
32
+ dateTime: g().optional(),
33
+ timezone: g().optional(),
34
+ language: g().optional(),
35
+ languages: n(g()).optional(),
36
+ url: g().optional(),
37
+ pathname: g().optional(),
38
+ pageTitle: g().optional(),
39
+ referrer: g().optional(),
40
+ screenWidth: c().optional(),
41
+ screenHeight: c().optional(),
42
+ viewportWidth: c().optional(),
43
+ viewportHeight: c().optional(),
44
+ devicePixelRatio: c().optional(),
45
+ maxTouchPoints: c().optional(),
46
+ hardwareConcurrency: c().optional(),
47
+ deviceMemory: c().optional(),
48
+ platform: g().optional(),
49
+ connectionType: g().optional(),
50
+ connectionEffectiveType: g().optional(),
51
+ connectionDownlink: c().optional(),
52
+ connectionRtt: c().optional(),
53
+ saveData: f().optional(),
54
+ darkMode: f().optional(),
55
+ reducedMotion: f().optional(),
56
+ historyLength: c().optional(),
57
+ geolocationLatitude: c().optional(),
58
+ geolocationLongitude: c().optional(),
59
+ geolocationAccuracy: c().optional(),
60
+ geolocationCity: g().optional()
61
+ }), x = /^[a-z]+\/[a-z0-9\-+.]+$/i, ie = /* @__PURE__ */ function(e) {
62
+ return e.DEFAULT = "default", e.COLD = "cold", e.HOT = "hot", e.ARCHIVE = "archive", e;
63
+ }({}), ae = s({
64
+ type: o("azure-blob"),
65
+ blobUri: t(),
66
+ containerName: g().min(1),
67
+ pathRelativeToContainer: g().min(1)
68
+ }), oe = s({
69
+ type: o("s3"),
70
+ bucket: g().min(1),
71
+ key: g().min(1),
72
+ region: g().min(1)
73
+ }), se = u("type", [ae, oe]), S = s({
74
+ type: g().min(1),
75
+ name: g().min(1),
76
+ mimeType: g().regex(x),
77
+ bytesCount: c().positive(),
78
+ extension: g().regex(/^\.[a-zA-Z0-9]+$/).overwrite((e) => e.toLowerCase()),
79
+ storedFileName: g().optional(),
80
+ metadata: m(g(), g()).default({}),
81
+ tags: m(g(), g()).default({})
82
+ }).extend({
83
+ storageHandle: se,
84
+ storagePolicy: d(ie),
85
+ signData: g().optional(),
86
+ storedFileName: g().min(1)
87
+ }), C = s({
88
+ name: g().min(1),
89
+ src: S,
90
+ srcSet: n(S).default([]),
91
+ rawOptions: i().optional()
92
+ });
93
+ s({
94
+ src: S,
95
+ uploadHandle: s({
96
+ uploadSasuri: t(),
97
+ metadata: m(g(), g()).default({}),
98
+ tags: m(g(), g()).default({})
99
+ })
100
+ }), s({
101
+ src: S,
102
+ downloadHandle: s({
103
+ downloadSasuri: t(),
104
+ viewSasuri: t(),
105
+ previewSasuri: t().optional(),
106
+ expiresOn: g().datetime(),
107
+ type: g()
108
+ })
109
+ });
110
+ var w = /* @__PURE__ */ function(e) {
111
+ return e.picture = "picture", e.video = "video", e.audio = "audio", e.office = "office", e.archive = "archive", e.binary = "binary", e.executable = "executable", e;
112
+ }({}), ce = s({
113
+ type: o(w.picture),
114
+ width: c().positive(),
115
+ height: c().positive(),
116
+ blurhash: g().optional()
117
+ }), le = s({
118
+ type: o(w.video),
119
+ width: c().positive(),
120
+ height: c().positive(),
121
+ duration: c().nonnegative()
122
+ }), ue = s({
123
+ type: o(w.audio),
124
+ duration: c().nonnegative()
125
+ }), de = s({ type: o(w.office) }), fe = s({ type: o(w.archive) }), pe = s({ type: o(w.binary) }), me = s({ type: o(w.executable) });
126
+ u("type", [
127
+ ce,
128
+ le,
129
+ ue,
130
+ de,
131
+ fe,
132
+ pe,
133
+ me
134
+ ]);
135
+ //#endregion
136
+ //#region ../../packages/models/src/schema/Agent.ts
137
+ var T = /* @__PURE__ */ function(e) {
138
+ return e.Draft = "draft", e.Active = "active", e.Inactive = "inactive", e;
139
+ }({}), E = /* @__PURE__ */ function(e) {
140
+ return e.Public = "public", e.Private = "private", e.Organization = "organization", e;
141
+ }({}), D = /* @__PURE__ */ function(e) {
142
+ return e.Chat = "chat", e.Reasoning = "reasoning", e;
143
+ }({}), O = /* @__PURE__ */ function(e) {
144
+ return e.Semantic = "semantic", e.Balanced = "balanced", e.Keyword = "keyword", e;
145
+ }({}), k = [
146
+ "none",
147
+ "low",
148
+ "medium",
149
+ "high",
150
+ "xhigh",
151
+ "max"
152
+ ], A = [
153
+ "low",
154
+ "medium",
155
+ "high",
156
+ "xhigh",
157
+ "max"
158
+ ], j = [
159
+ "minimal",
160
+ "low",
161
+ "medium",
162
+ "high"
163
+ ], M = [
164
+ "auto",
165
+ "detailed",
166
+ "concise"
167
+ ], he = s({
168
+ reasoningEffort: d(k).optional(),
169
+ reasoningSummary: d(M).optional()
170
+ }), ge = s({
171
+ type: d([
172
+ "adaptive",
173
+ "enabled",
174
+ "disabled"
175
+ ]).optional(),
176
+ effort: d(A).optional(),
177
+ display: d(["summarized", "omitted"]).optional(),
178
+ budgetTokens: c().int().positive().optional()
179
+ }), _e = s({
180
+ thinkingLevel: d(j).optional(),
181
+ thinkingBudget: c().int().optional(),
182
+ includeThoughts: f().optional()
183
+ }), ve = s({ type: d(["enabled", "disabled"]).optional() }), N = [
184
+ "alibaba",
185
+ "meta",
186
+ "moonshotai",
187
+ "spacexai",
188
+ "xiaomi",
189
+ "zai"
190
+ ], ye = [
191
+ "none",
192
+ "minimal",
193
+ "low",
194
+ "medium",
195
+ "high",
196
+ "xhigh"
197
+ ], P = s({ reasoningEffort: d(ye).optional() });
198
+ function F(e, t) {
199
+ return e && t.includes(e) ? e : void 0;
200
+ }
201
+ var be = s({
202
+ openai: he.optional(),
203
+ anthropic: ge.optional(),
204
+ google: _e.optional(),
205
+ deepseek: ve.optional(),
206
+ alibaba: P.optional(),
207
+ meta: P.optional(),
208
+ moonshotai: P.optional(),
209
+ spacexai: P.optional(),
210
+ xiaomi: P.optional(),
211
+ zai: P.optional()
212
+ });
213
+ function xe(e) {
214
+ if (!e || typeof e != "object") return e;
215
+ let t = e, n = [
216
+ "openai",
217
+ "anthropic",
218
+ "google",
219
+ "deepseek",
220
+ ...N
221
+ ].some((e) => e in t);
222
+ if ("effort" in t && !n) {
223
+ let e = t.effort, n = t.reasoningSummary, r = {};
224
+ if (e && e !== "off" && e !== "none") {
225
+ let t = F(e, k), i = F(n, M);
226
+ (t || i) && (r.openai = {
227
+ ...t && { reasoningEffort: t },
228
+ ...i && { reasoningSummary: i }
229
+ });
230
+ let a = F(e, A);
231
+ a && (r.anthropic = {
232
+ type: "adaptive",
233
+ effort: a
234
+ });
235
+ let o = F(e === "xhigh" || e === "max" ? "high" : e, j);
236
+ o && (r.google = { thinkingLevel: o }), r.deepseek = { type: "enabled" };
237
+ let s = F(e === "max" ? "xhigh" : e, ye);
238
+ if (s) for (let e of N) r[e] = { reasoningEffort: s };
239
+ } else {
240
+ r.openai = { reasoningEffort: "none" }, r.anthropic = { type: "disabled" }, r.google = { thinkingLevel: "minimal" }, r.deepseek = { type: "disabled" };
241
+ for (let e of N) r[e] = { reasoningEffort: "none" };
242
+ }
243
+ return r;
244
+ }
245
+ return e;
246
+ }
247
+ var I = _(h(), be, xe).optional(), L = /* @__PURE__ */ function(e) {
248
+ return e.Geocode = "geocode", e.GetWeather = "getWeather", e.ReadDocumentFile = "readDocumentFile", e.RequestConfirm = "requestConfirm", e.RequestGeolocation = "requestGeolocation", e.RetrieveRevisedAnswers = "retrieveRevisedAnswers", e.SearchInKnowledgeBase = "searchInKnowledgeBase", e.SearchInUserFiles = "searchInUserFiles", e.UserMemory = "userMemory", e.RunWorker = "runWorker", e.FetchTeamsChannelHistory = "fetchTeamsChannelHistory", e.ShowArtifact = "showArtifact", e.ShowCalendarEvent = "showCalendarEvent", e.ShowComparison = "showComparison", e.ShowContactForm = "showContactForm", e.ShowDiagram = "showDiagram", e.ShowEmail = "showEmail", e.ShowImageGallery = "showImageGallery", e.ShowLocation = "showLocation", e.ShowMessage = "showMessage", e.ShowForm = "showForm", e.ShowProductList = "showProductList", e.ShowQrCode = "showQrCode", e.ShowSources = "showSources", e.ShowSuggestedReply = "showSuggestedReply", e.ShowVideo = "showVideo", e.ShowWeather = "showWeather", e.ShowWebPages = "showWebPages", e.ShowMultipleChoice = "showMultipleChoice", e;
249
+ }({});
250
+ function Se(e) {
251
+ return e === L.RequestConfirm || e === L.ShowArtifact || e === L.ShowCalendarEvent || e === L.ShowComparison || e === L.ShowContactForm || e === L.ShowDiagram || e === L.ShowEmail || e === L.ShowImageGallery || e === L.ShowLocation || e === L.ShowMessage || e === L.ShowForm || e === L.ShowMultipleChoice || e === L.ShowProductList || e === L.ShowQrCode || e === L.ShowSources || e === L.ShowSuggestedReply || e === L.ShowVideo || e === L.ShowWeather || e === L.ShowWebPages;
252
+ }
253
+ L.RequestConfirm, L.ShowArtifact, L.ShowWeather, L.ShowLocation, L.ShowComparison, L.ShowProductList, L.ShowWebPages, L.ShowImageGallery, L.ShowVideo, L.ShowSources, L.ShowSuggestedReply, L.ShowCalendarEvent, L.ShowEmail, L.ShowMessage, L.ShowForm;
254
+ var Ce = /* @__PURE__ */ new Set([
255
+ L.RequestConfirm,
256
+ L.RequestGeolocation,
257
+ L.ShowForm,
258
+ L.ShowMultipleChoice,
259
+ "requestOAuthConnection"
260
+ ]);
261
+ function we(e) {
262
+ return Ce.has(e);
263
+ }
264
+ L.RequestConfirm, L.RequestGeolocation, L.ShowArtifact, L.ShowCalendarEvent, L.ShowContactForm, L.ShowComparison, L.ShowDiagram, L.ShowEmail, L.ShowForm, L.ShowImageGallery, L.ShowLocation, L.ShowMessage, L.ShowMultipleChoice, L.ShowProductList, L.ShowQrCode, L.ShowSources, L.ShowSuggestedReply, L.ShowVideo, L.ShowWeather, L.ShowWebPages;
265
+ var Te = "Shown on the caller's screen";
266
+ function Ee(e) {
267
+ return typeof e == "string" && (e.startsWith("Voice turn note") || e.startsWith(Te));
268
+ }
269
+ var R = s({
270
+ maxSteps: c().int().min(1).max(10).optional().default(5),
271
+ maxOptionsPerStep: c().int().min(2).max(10).optional().default(5)
272
+ }), z = /* @__PURE__ */ function(e) {
273
+ return e.Perplexity = "perplexity", e.Parallel = "parallel", e.Native = "native", e;
274
+ }({}), De = s({
275
+ maxResults: c().int().min(1).max(20).optional(),
276
+ maxTokens: c().int().positive().max(1e6).optional(),
277
+ maxTokensPerPage: c().int().positive().optional(),
278
+ country: g().max(2).optional(),
279
+ searchLanguageFilter: n(g().max(5)).max(10).optional(),
280
+ searchDomainFilter: n(g()).max(20).optional(),
281
+ searchRecencyFilter: d([
282
+ "day",
283
+ "week",
284
+ "month",
285
+ "year"
286
+ ]).optional()
287
+ }), Oe = s({
288
+ mode: d(["one-shot", "agentic"]).optional(),
289
+ maxResults: c().int().min(1).max(20).optional(),
290
+ sourcePolicy: s({
291
+ includeDomains: n(g()).optional(),
292
+ excludeDomains: n(g()).optional(),
293
+ afterDate: g().optional()
294
+ }).optional(),
295
+ excerpts: s({
296
+ maxCharsPerResult: c().int().positive().optional(),
297
+ maxCharsTotal: c().int().positive().optional()
298
+ }).optional(),
299
+ fetchPolicy: s({ maxAgeSeconds: c().int().positive().optional() }).optional()
300
+ }), ke = s({
301
+ openai: s({}).optional(),
302
+ anthropic: s({
303
+ maxUses: c().int().positive().optional(),
304
+ allowedDomains: n(g()).optional(),
305
+ blockedDomains: n(g()).optional(),
306
+ userLocation: s({
307
+ type: o("approximate").optional(),
308
+ country: g().optional(),
309
+ region: g().optional(),
310
+ city: g().optional(),
311
+ timezone: g().optional()
312
+ }).optional()
313
+ }).optional(),
314
+ google: s({}).optional()
315
+ }), B = s({
316
+ enabled: f().default(!1),
317
+ provider: d(z).optional().default(z.Native),
318
+ perplexity: De.optional(),
319
+ parallel: Oe.optional(),
320
+ native: ke.optional()
321
+ }), V = s({ useAllUserKb: f().default(!1) }), H = s({ useAllUserFiles: f().default(!1) }), U = s({ tools: n(g()).default([]) }), W = s({
322
+ disabled: n(d(L)).default([
323
+ L.UserMemory,
324
+ L.SearchInUserFiles,
325
+ L.RunWorker,
326
+ L.FetchTeamsChannelHistory
327
+ ]),
328
+ showForm: R.optional().default(() => R.parse({})),
329
+ webSearch: B.optional().default(() => B.parse({})),
330
+ userMemory: V.optional().default(() => V.parse({})),
331
+ userFiles: H.optional().default(() => H.parse({})),
332
+ approval: U.optional().default(() => U.parse({}))
333
+ }), G = s({
334
+ freshness: s({
335
+ enabled: f().default(!1),
336
+ scale: c().int().min(86400).max(31536e3).default(7776e3),
337
+ weight: c().min(.05).max(.5).default(.1)
338
+ }).prefault({}),
339
+ priority: s({ enabled: f().default(!0) }).prefault({}),
340
+ mmr: s({
341
+ enabled: f().default(!1),
342
+ diversity: c().min(0).max(1).default(.3),
343
+ candidatesLimit: c().int().min(20).max(100).default(50)
344
+ }).prefault({})
345
+ }).prefault({}), Ae = s({
346
+ prompt: g().optional(),
347
+ temperature: c().min(0).max(2).optional().default(.6),
348
+ maxOutputTokens: c().positive().optional(),
349
+ presencePenalty: c().min(-2).max(2).optional(),
350
+ frequencyPenalty: c().min(-2).max(2).optional(),
351
+ searchMode: d(O).optional().default(O.Balanced),
352
+ limit: c().positive().max(100).optional().default(10),
353
+ maxStepCount: c().int().min(1).max(40).optional().default(10),
354
+ reasoning: I,
355
+ ranking: G.optional().default(() => G.parse({}))
356
+ }), K = _(h(), m(g(), g()), (e) => typeof e == "string" ? { it: e } : e), je = "https://cdn.jsdelivr.net/npm/@8wave/ai-elements/dist/ai-elements.es.js", q = /* @__PURE__ */ function(e) {
357
+ return e.InlineModule = "inline-module", e.ScriptSrc = "script-src", e.DynamicImport = "dynamic-import", e;
358
+ }({}), J = /* @__PURE__ */ function(e) {
359
+ return e.Frontoffice = "frontoffice", e.App = "app", e.Widget = "widget", e;
360
+ }({}), Y = Object.values(J), X = s({
361
+ media: C.optional(),
362
+ logo: g().optional(),
363
+ theme: d([
364
+ "light",
365
+ "dark",
366
+ "auto"
367
+ ]).optional().default("auto"),
368
+ mainColor: g().regex(/^#[0-9A-Fa-f]{6}$/).optional().default("#000000"),
369
+ textColor: d([
370
+ "auto",
371
+ "white",
372
+ "black"
373
+ ]).optional().default("auto"),
374
+ useColorsForAgentHeader: f().optional().default(!1),
375
+ initialMessage: K.optional(),
376
+ greeting: n(K).min(1).max(10).optional(),
377
+ messagePlaceholder: K.optional(),
378
+ dismissableNotice: K.optional(),
379
+ footerMessage: K.optional(),
380
+ privacyPolicyNotice: K.optional(),
381
+ interactiveLogin: f().optional().default(!0),
382
+ welcomePopup: f().optional().default(!1),
383
+ floatingButtonPosition: d(["left", "right"]).optional().default("right"),
384
+ maxMessageLength: c().int().positive().optional(),
385
+ widgetUrl: t().default(je),
386
+ loadDelay: c().int().min(0).max(3e4).optional().default(0),
387
+ loaderStrategy: d(q).optional().default(q.InlineModule),
388
+ customCss: g().optional(),
389
+ smoothStream: f().optional().default(!1),
390
+ showExtendedSteps: f().optional().default(!1)
391
+ }), Z = s({
392
+ enabled: f().default(!1),
393
+ maxFileSizeBytes: c().int().positive().max(104857600).optional().default(20971520),
394
+ allowedMimeTypes: n(g().regex(x)).optional().default([
395
+ "image/jpeg",
396
+ "image/png",
397
+ "image/gif",
398
+ "image/webp",
399
+ "application/pdf",
400
+ "text/plain",
401
+ "text/markdown",
402
+ "text/csv"
403
+ ]),
404
+ maxFilesPerMessage: c().int().positive().max(10).optional().default(5),
405
+ maxFilesPerChat: c().int().positive().max(50).optional().default(20)
406
+ }), Q = s({
407
+ zeroDataRetention: f().default(!0),
408
+ disallowPromptTraining: f().default(!0),
409
+ providerTimeoutMs: c().int().min(1e3).max(789e3).optional()
410
+ }), Me = s({ enabled: f().default(!1) }), Ne = /* @__PURE__ */ function(e) {
411
+ return e.Off = "off", e.Shadow = "shadow", e.Active = "active", e;
412
+ }({}), Pe = s({ mode: d(Ne).default(Ne.Off) }), Fe = s({
413
+ enabled: f().default(!1),
414
+ voiceId: g().optional(),
415
+ language: g().min(2).max(5).default("it"),
416
+ maxSessionSeconds: c().int().min(30).max(3600).default(600),
417
+ cascadeTimeoutSeconds: c().min(1).max(15).default(15).transform((e) => Math.max(5, e)),
418
+ fillerAfterSeconds: c().min(.5).max(8).optional(),
419
+ fillerMessage: g().max(200).optional(),
420
+ ignoreBackgroundVoices: f().default(!0),
421
+ turnEagerness: d([
422
+ "patient",
423
+ "normal",
424
+ "eager"
425
+ ]).default("normal"),
426
+ turnTimeoutSeconds: c().min(1).max(30).default(5),
427
+ firstMessage: g().max(300).optional(),
428
+ providerAgentId: g().optional(),
429
+ providerSecretId: g().optional(),
430
+ providerApiKeyId: g().optional()
431
+ }), Ie = s({ enabled: f() });
432
+ s({
433
+ chatId: g().min(1).optional(),
434
+ deviceContext: b.optional(),
435
+ externalContext: m(g(), h()).optional()
436
+ });
437
+ var Le = s({
438
+ sessionId: g(),
439
+ signedUrl: g(),
440
+ providerAgentId: g(),
441
+ chatId: g(),
442
+ maxSessionSeconds: c().int()
443
+ }), Re = s({
444
+ voiceId: g(),
445
+ name: g(),
446
+ category: g().optional(),
447
+ previewUrl: g().optional(),
448
+ labels: m(g(), g()).optional()
449
+ });
450
+ n(Re);
451
+ var ze = s({
452
+ model: Ae,
453
+ interface: X,
454
+ tools: W.optional().default(() => W.parse({})),
455
+ fileUpload: Z.optional().default(() => Z.parse({})),
456
+ gatewayOptions: Q.optional().default(() => Q.parse({})),
457
+ channels: n(d(J)).optional().default(() => [...Y]),
458
+ externalContextSchema: te.optional(),
459
+ openaiApi: Me.optional().default(() => Me.parse({})),
460
+ voice: Fe.optional().default(() => Fe.parse({})),
461
+ toolWorkingSet: Pe.optional().default(() => Pe.parse({}))
462
+ }), Be = s({
463
+ rateLimits: s({
464
+ minuteRateLimit: c().int().min(0).optional(),
465
+ hourRateLimit: c().int().min(0).optional(),
466
+ dayRateLimit: c().int().min(0).optional(),
467
+ monthRateLimit: c().int().min(0).optional()
468
+ }),
469
+ trustedOrigins: s({ origins: n(t().or(o(""))).overwrite((e) => e?.filter((e) => e?.trim())).default([]) }).default({ origins: [] })
470
+ });
471
+ s({
472
+ id: g().optional(),
473
+ name: g(),
474
+ prompt: g().optional(),
475
+ model: g().optional(),
476
+ fallbackModels: n(g()).default([]),
477
+ status: d(T).default(T.Draft),
478
+ visibility: d(E).default(E.Organization),
479
+ settings: ze,
480
+ security: Be.nullish(),
481
+ type: d(D).default(D.Chat),
482
+ organizationId: g()
483
+ }), a(() => s({
484
+ id: g(),
485
+ name: g(),
486
+ prompt: g(),
487
+ model: g(),
488
+ fallbackModels: n(g()).nullable().default([]),
489
+ status: d(T).default(T.Draft),
490
+ visibility: d(E).default(E.Organization),
491
+ settings: ze,
492
+ security: Be.nullable(),
493
+ type: d(D).default(D.Chat),
494
+ organizationId: g(),
495
+ createdAt: p(),
496
+ createdBy: g(),
497
+ updatedAt: p(),
498
+ updatedBy: g(),
499
+ deleted: f(),
500
+ deletedAt: p().nullable(),
501
+ deletedBy: g().nullable(),
502
+ outOfBudget: f().optional().default(!1),
503
+ outOfBudgetReason: g().optional().default("")
504
+ }));
505
+ var Ve = s({
506
+ id: g(),
507
+ name: g(),
508
+ status: d(T),
509
+ visibility: d(E),
510
+ organizationId: g(),
511
+ interface: X,
512
+ createdAt: p(),
513
+ updatedAt: p(),
514
+ capabilities: s({
515
+ fileUpload: Z,
516
+ voice: Ie
517
+ }),
518
+ channels: n(d(J)).default(() => [...Y])
519
+ }), He = X.pick({
520
+ logo: !0,
521
+ mainColor: !0,
522
+ textColor: !0,
523
+ theme: !0,
524
+ floatingButtonPosition: !0,
525
+ customCss: !0
526
+ }), Ue = Ve.pick({
527
+ id: !0,
528
+ name: !0,
529
+ organizationId: !0
530
+ }).extend({ interface: He }), We = s({
531
+ emailPassword: f(),
532
+ google: f(),
533
+ microsoft: f()
534
+ }), Ge = s({
535
+ requiresAuth: o(!1),
536
+ agent: Ve,
537
+ branding: l()
538
+ }), $ = s({
539
+ requiresAuth: o(!0),
540
+ agent: l(),
541
+ branding: Ue
542
+ });
543
+ u("requiresAuth", [Ge, $]), u("requiresAuth", [Ge.extend({ authMethods: We }), $.extend({ authMethods: We })]), s({
544
+ id: e(),
545
+ agentIds: n(e())
546
+ }), s({
547
+ ...y.pagination(),
548
+ ...y.sort([
549
+ "id",
550
+ "updatedAt",
551
+ "createdAt",
552
+ "name",
553
+ "type",
554
+ "status",
555
+ "visibility",
556
+ "model"
557
+ ]),
558
+ ...y.filters(["done", "type"]),
559
+ ...y.filter("id"),
560
+ ...y.fullText(),
561
+ ...y.ids()
562
+ });
563
+ //#endregion
564
+ export { O as a, Le as c, Ee as d, x as f, y as g, _ as h, I as i, Se as l, b as m, Q as n, T as o, C as p, G as r, B as s, L as t, we as u };
565
+
566
+ //# sourceMappingURL=Agent-D3ODaN3E.js.map