@8wave/ai-elements 0.125.0-beta.43 → 0.125.0-beta.45
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/README.md +9 -4
- package/dist/_chunks/{PkFilePreview-yjdtArag.js → PkFilePreview-DfYzaj3Y.js} +427 -427
- package/dist/_chunks/{PkFilePreview-yjdtArag.js.map → PkFilePreview-DfYzaj3Y.js.map} +1 -1
- package/dist/_chunks/{PkFilePreviewDialog-Df0Lt40J.js → PkFilePreviewDialog-COkwyLq6.js} +2 -2
- package/dist/_chunks/{PkFilePreviewDialog-Df0Lt40J.js.map → PkFilePreviewDialog-COkwyLq6.js.map} +1 -1
- package/dist/_chunks/{PkImageEditorDialog-PVf3IHGB.js → PkImageEditorDialog-Ceas-HZA.js} +2 -2
- package/dist/_chunks/{PkImageEditorDialog-PVf3IHGB.js.map → PkImageEditorDialog-Ceas-HZA.js.map} +1 -1
- package/dist/_chunks/{PkSelectionActions-CMyg_x8h.js → PkSelectionActions-Dl3cKb7x.js} +2 -2
- package/dist/_chunks/PkSelectionActions-Dl3cKb7x.js.map +1 -0
- package/dist/_chunks/{PkStreamingMarkdown-BDXbU2tz.js → PkStreamingMarkdown-DZvLHy2l.js} +2 -2
- package/dist/_chunks/{PkStreamingMarkdown-BDXbU2tz.js.map → PkStreamingMarkdown-DZvLHy2l.js.map} +1 -1
- package/dist/_chunks/{PkToolChatFile-CMQdMs-9.js → PkToolChatFile-D4ukZ9g6.js} +2 -2
- package/dist/_chunks/{PkToolChatFile-CMQdMs-9.js.map → PkToolChatFile-D4ukZ9g6.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-YrC54qxc.js → PkToolShowArtifact-wIAxyXrL.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-YrC54qxc.js.map → PkToolShowArtifact-wIAxyXrL.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-Dio2FNkA.js → PkToolShowContactForm-BhcM-Z6m.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-Dio2FNkA.js.map → PkToolShowContactForm-BhcM-Z6m.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-w9HGhvCy.js → PkToolShowForm-D6k7_QLF.js} +3 -3
- package/dist/_chunks/{PkToolShowForm-w9HGhvCy.js.map → PkToolShowForm-D6k7_QLF.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-DXFvFHOo.js → PkToolShowSources-Cw1ofky2.js} +2 -2
- package/dist/_chunks/{PkToolShowSources-DXFvFHOo.js.map → PkToolShowSources-Cw1ofky2.js.map} +1 -1
- package/dist/_chunks/{utils-BBoaLDYF.js → utils-C2aFWWye.js} +132 -110
- package/{dist-vue/_chunks/utils-C9l078yb.js.map → dist/_chunks/utils-C2aFWWye.js.map} +1 -1
- package/dist/ai-elements.es.js +2911 -2860
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotEmptyState.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotStepPayload.js +1 -1
- package/dist-vue/PkChatbotStepToolDetail.js +1 -1
- package/dist-vue/PkChatbotSteps.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/_chunks/{PkChatbot-CxkTubw8.js → PkChatbot-CBSe9MOB.js} +5 -5
- package/dist-vue/_chunks/{PkChatbot-CxkTubw8.js.map → PkChatbot-CBSe9MOB.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotEmptyState-CUoHkCgO.js → PkChatbotEmptyState-DfyYZXHQ.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-CUoHkCgO.js.map → PkChatbotEmptyState-DfyYZXHQ.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-CPf7wqiQ.js → PkChatbotInput-CBalSveL.js} +4 -4
- package/dist-vue/_chunks/{PkChatbotInput-CPf7wqiQ.js.map → PkChatbotInput-CBalSveL.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotMessages-CLNu2dTm.js → PkChatbotMessages-C2AUTqk4.js} +15 -15
- package/dist-vue/_chunks/{PkChatbotMessages-CLNu2dTm.js.map → PkChatbotMessages-C2AUTqk4.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepPayload-Cf7mJPjL.js → PkChatbotStepPayload-Bb3Y6kuL.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-Cf7mJPjL.js.map → PkChatbotStepPayload-Bb3Y6kuL.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-D6nwNnHv.js → PkChatbotStepToolDetail-CwOxzYOe.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-D6nwNnHv.js.map → PkChatbotStepToolDetail-CwOxzYOe.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotSteps-xkxdaX7O.js → PkChatbotSteps-FduD9X9i.js} +5 -5
- package/dist-vue/_chunks/{PkChatbotSteps-xkxdaX7O.js.map → PkChatbotSteps-FduD9X9i.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-BkkyjiFl.js → PkChatbotViewChat-jl3ZbK7H.js} +6 -6
- package/dist-vue/_chunks/{PkChatbotViewChat-BkkyjiFl.js.map → PkChatbotViewChat-jl3ZbK7H.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewConversations-hgqSO1hx.js → PkChatbotViewConversations-BtwTWqmM.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewConversations-hgqSO1hx.js.map → PkChatbotViewConversations-BtwTWqmM.js.map} +1 -1
- package/dist-vue/_chunks/{PkFilePreview-CmsT6lSP.js → PkFilePreview-CRfDEYYo.js} +3 -3
- package/dist-vue/_chunks/PkFilePreview-CRfDEYYo.js.map +1 -0
- package/dist-vue/_chunks/{PkFilePreviewDialog-DIiTt9iK.js → PkFilePreviewDialog-u-0rhuRx.js} +2 -2
- package/dist-vue/_chunks/{PkFilePreviewDialog-DIiTt9iK.js.map → PkFilePreviewDialog-u-0rhuRx.js.map} +1 -1
- package/dist-vue/_chunks/{PkImageEditorDialog-CE0Y5Pwr.js → PkImageEditorDialog-CjMwpb-a.js} +2 -2
- package/dist-vue/_chunks/{PkImageEditorDialog-CE0Y5Pwr.js.map → PkImageEditorDialog-CjMwpb-a.js.map} +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-BBvCtDlO.js → PkStreamingMarkdown-7Kl_VBH-.js} +2 -2
- package/dist-vue/_chunks/{PkStreamingMarkdown-BBvCtDlO.js.map → PkStreamingMarkdown-7Kl_VBH-.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolChatFile-DVhunkPS.js → PkToolChatFile-DcNRCVXy.js} +2 -2
- package/dist-vue/_chunks/{PkToolChatFile-DVhunkPS.js.map → PkToolChatFile-DcNRCVXy.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-DKOTsP9C.js → PkToolShowArtifact-C7CxCqVO.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-DKOTsP9C.js.map → PkToolShowArtifact-C7CxCqVO.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowChart-CNBUjDc7.js → PkToolShowChart-DULlrMjq.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowChart-CNBUjDc7.js.map → PkToolShowChart-DULlrMjq.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-D1Ff15Zf.js → PkToolShowContactForm-472d-SAE.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowContactForm-D1Ff15Zf.js.map → PkToolShowContactForm-472d-SAE.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-CBwqjy6a.js → PkToolShowDiagram-RrqVpOaX.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-CBwqjy6a.js.map → PkToolShowDiagram-RrqVpOaX.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-D-rzzwJa.js → PkToolShowForm-CgyszDEI.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowForm-D-rzzwJa.js.map → PkToolShowForm-CgyszDEI.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowImageGallery-Cre2zSGV.js → PkToolShowImageGallery-LBx9JE6p.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowImageGallery-Cre2zSGV.js.map → PkToolShowImageGallery-LBx9JE6p.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-D4FAfMS-.js → PkToolShowProductList-THiH4EzZ.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-D4FAfMS-.js.map → PkToolShowProductList-THiH4EzZ.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-BC6YJl-O.js → PkToolShowSources-CEqGXOOt.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSources-BC6YJl-O.js.map → PkToolShowSources-CEqGXOOt.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowVideo-CxN7z_cZ.js → PkToolShowVideo-8Gi3vOer.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowVideo-CxN7z_cZ.js.map → PkToolShowVideo-8Gi3vOer.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-0Ux6n8G1.js → PkToolShowWebPages-xjUPdfOU.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-0Ux6n8G1.js.map → PkToolShowWebPages-xjUPdfOU.js.map} +1 -1
- package/dist-vue/_chunks/{utils-C9l078yb.js → utils-VVbH-Liq.js} +22 -22
- package/dist-vue/_chunks/utils-VVbH-Liq.js.map +1 -0
- package/dist-vue/apps/web-component/src/composables/useChatbotAgent.d.ts +6 -6
- package/dist-vue/apps/web-component/src/composables/useSelectionActions.d.ts +14 -4
- package/dist-vue/composables.js +3 -3
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +21 -21
- package/dist-vue/packages/auth/src/organization-auto-join.d.ts +13 -1
- package/dist-vue/packages/auth/src/unproven-password.d.ts +30 -0
- package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +6 -6
- package/dist-vue/packages/components/src/chat/PkChatbotMessages.d.ts +1 -1
- package/dist-vue/packages/components/src/chat/PkSelectionActionIconPicker.d.ts +2 -2
- package/dist-vue/packages/components/src/chat/PkSelectionAnswerCard.d.ts +6 -0
- package/dist-vue/packages/components/src/chat/selectionActionEdits.d.ts +1 -1
- package/dist-vue/packages/components/src/chat/useChatFilePreview.d.ts +4 -4
- package/dist-vue/packages/components/src/chat/utils.d.ts +51 -4
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +18 -18
- package/dist-vue/packages/composable/src/useSettledSelection.d.ts +2 -2
- package/dist-vue/packages/models/src/schema/Agent.d.ts +21 -21
- package/dist-vue/packages/models/src/schema/Chart.d.ts +1 -1
- package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +6 -6
- package/dist-vue/packages/models/src/schema/SelectionAction.d.ts +11 -11
- package/dist-vue/packages/models/src/schema/SelectionActionPreview.d.ts +3 -3
- package/dist-vue/packages/models/src/schema/SpreadsheetPreview.d.ts +5 -5
- package/dist-vue/packages/models/src/schema/SubAgent.d.ts +6 -6
- package/dist-vue/packages/models/src/schema/WordPreview.d.ts +1 -1
- package/package.json +1 -1
- package/dist/_chunks/PkSelectionActions-CMyg_x8h.js.map +0 -1
- package/dist/_chunks/utils-BBoaLDYF.js.map +0 -1
- package/dist-vue/_chunks/PkFilePreview-CmsT6lSP.js.map +0 -1
|
@@ -49,16 +49,16 @@ function m(e, t) {
|
|
|
49
49
|
function h(e) {
|
|
50
50
|
return e ? e.type === "reasoning" : !1;
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function g(e) {
|
|
53
53
|
return e ? e.parts.some((e) => c(e)) : !1;
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function _(e) {
|
|
56
56
|
if (!e) return;
|
|
57
57
|
let t = e.parts;
|
|
58
58
|
if (Array.isArray(t)) return t.find((e) => c(e))?.text;
|
|
59
59
|
}
|
|
60
60
|
// ../../packages/components/src/chat/utils.ts
|
|
61
|
-
function
|
|
61
|
+
function v(e) {
|
|
62
62
|
let t = [];
|
|
63
63
|
for (let n of e) {
|
|
64
64
|
if (!c(n)) {
|
|
@@ -73,31 +73,31 @@ function ne(e) {
|
|
|
73
73
|
}
|
|
74
74
|
return t;
|
|
75
75
|
}
|
|
76
|
-
var
|
|
77
|
-
function
|
|
76
|
+
var y = (e) => l(e) && t(u(e));
|
|
77
|
+
function b(e) {
|
|
78
78
|
let t = /* @__PURE__ */ new Map();
|
|
79
|
-
for (let [n, r] of e.entries())
|
|
80
|
-
return e.filter((e, n) => !(
|
|
79
|
+
for (let [n, r] of e.entries()) y(r) && r.state !== "output-error" && !D(r) && t.set(r.type, n);
|
|
80
|
+
return e.filter((e, n) => !(y(e) && e.state === "output-error" && (t.get(e.type) ?? -1) > n));
|
|
81
81
|
}
|
|
82
|
-
var
|
|
82
|
+
var x = /* @__PURE__ */ new Set([
|
|
83
83
|
"tool-editSpreadsheet",
|
|
84
84
|
"tool-shareDocument",
|
|
85
85
|
"tool-editWordDocument",
|
|
86
86
|
"tool-createSpreadsheet",
|
|
87
87
|
"tool-createWordDocument"
|
|
88
88
|
]);
|
|
89
|
-
function
|
|
90
|
-
let t = e.filter((e) =>
|
|
91
|
-
return t.length > 0 ? [...e.filter((e) => !
|
|
89
|
+
function ee(e) {
|
|
90
|
+
let t = e.filter((e) => x.has(e.type));
|
|
91
|
+
return t.length > 0 ? [...e.filter((e) => !x.has(e.type)), ...t] : e;
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function te(e, t) {
|
|
94
94
|
let n = e.toolCallId;
|
|
95
|
-
return
|
|
95
|
+
return x.has(e.type) && n ? `file-${n}` : t;
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function S(t) {
|
|
98
98
|
return e(t) ? t : void 0;
|
|
99
99
|
}
|
|
100
|
-
var
|
|
100
|
+
var C = {
|
|
101
101
|
page_snapshot: {
|
|
102
102
|
icon: "ri:pages-line",
|
|
103
103
|
label: "messagePart.pageTool.snapshot"
|
|
@@ -142,21 +142,21 @@ var ie = {
|
|
|
142
142
|
icon: "ri:links-line",
|
|
143
143
|
label: "messagePart.pageTool.navigate"
|
|
144
144
|
}
|
|
145
|
-
},
|
|
145
|
+
}, w = Symbol("hostStepTitles"), T = Symbol("hostStepChanges"), ne = {
|
|
146
146
|
icon: "ri:survey-line",
|
|
147
147
|
label: "messagePart.pageTool.form"
|
|
148
|
-
},
|
|
149
|
-
function
|
|
150
|
-
return
|
|
148
|
+
}, E = (e) => e.toolMetadata?.provider === "page" ? C[e.toolName] ?? (e.toolName.startsWith("form_") ? ne : void 0) : void 0;
|
|
149
|
+
function re(e) {
|
|
150
|
+
return S(e)?.toolMetadata?.readOnly === !1;
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function D(e) {
|
|
153
153
|
return e && "state" in e ? e.state === "streaming" || e.state === "input-streaming" : !1;
|
|
154
154
|
}
|
|
155
|
-
var
|
|
156
|
-
function
|
|
155
|
+
var ie = 4e3, ae = /^[ \t]*(?:(?:[-*+]|\d{1,9}[.)])[ \t]+|>[ \t]?)*(`{3,}|~{3,})(.*)$/gm;
|
|
156
|
+
function oe(e, t) {
|
|
157
157
|
if (e.length <= t) return e;
|
|
158
158
|
let n = e.length - t, r = n + t / 2, i = (e, t) => e !== -1 && e < r ? e + t : void 0, a = i(e.indexOf("\n\n", n), 2) ?? i(e.indexOf("\n", n), 1) ?? n, o;
|
|
159
|
-
for (let t of e.matchAll(
|
|
159
|
+
for (let t of e.matchAll(ae)) {
|
|
160
160
|
if (t.index >= a) break;
|
|
161
161
|
let [, e, n] = t;
|
|
162
162
|
if (o) e[0] === o[0] && e.length >= o.length && !n.trim() && (o = void 0);
|
|
@@ -167,34 +167,34 @@ function T(e, t) {
|
|
|
167
167
|
}
|
|
168
168
|
return `…\n\n${o ? `${o}\n` : ""}${e.slice(a)}`;
|
|
169
169
|
}
|
|
170
|
-
var
|
|
170
|
+
var se = /* @__PURE__ */ new Set([
|
|
171
171
|
"approval-requested",
|
|
172
172
|
"approval-responded",
|
|
173
173
|
"output-denied"
|
|
174
174
|
]);
|
|
175
|
-
function
|
|
176
|
-
return l(e) ?
|
|
175
|
+
function ce(e) {
|
|
176
|
+
return l(e) ? se.has(e.state) ? !0 : e.approval != null : !1;
|
|
177
177
|
}
|
|
178
|
-
var
|
|
179
|
-
function
|
|
178
|
+
var le = "requestConfirm";
|
|
179
|
+
function O(e) {
|
|
180
180
|
return l(e) && e.type === "tool-requestConfirm";
|
|
181
181
|
}
|
|
182
|
-
function
|
|
183
|
-
return
|
|
182
|
+
function k(e) {
|
|
183
|
+
return ce(e) || O(e);
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function A(e) {
|
|
186
186
|
if (l(e)) return e.approval?.id;
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function j(e) {
|
|
189
189
|
if (e && "state" in e) return e.state;
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function M(e = "000000") {
|
|
192
192
|
let t = e.replace("#", "");
|
|
193
193
|
t.length === 3 && (t = t.split("").map((e) => e + e).join(""));
|
|
194
194
|
let n = parseInt(t.substring(0, 2), 16) / 255, r = parseInt(t.substring(2, 4), 16) / 255, i = parseInt(t.substring(4, 6), 16) / 255, a = (e) => e <= .03928 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4;
|
|
195
195
|
return .2126 * a(n) + .7152 * a(r) + .0722 * a(i) > .179 ? "black" : "white";
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function N(e) {
|
|
198
198
|
let t = e?.trim().replace("#", "") ?? "";
|
|
199
199
|
if (/^[0-9a-f]{3}$/i.test(t) && (t = t.split("").map((e) => e + e).join("")), !/^[0-9a-f]{6}$/i.test(t)) return !1;
|
|
200
200
|
let n = [
|
|
@@ -204,8 +204,8 @@ function P(e) {
|
|
|
204
204
|
].map((e) => parseInt(t.substring(e, e + 2), 16));
|
|
205
205
|
return Math.max(...n) - Math.min(...n) < 32;
|
|
206
206
|
}
|
|
207
|
-
var
|
|
208
|
-
function
|
|
207
|
+
var P = (e) => `#${e.map((e) => e.toString(16).padStart(2, "0")).join("")}`;
|
|
208
|
+
function F(e, t) {
|
|
209
209
|
e.style.color = CSS.supports("color", "color-mix(in srgb, red 100%, transparent)") ? `color-mix(in srgb, ${t} 100%, transparent)` : t;
|
|
210
210
|
let n = getComputedStyle(e).color;
|
|
211
211
|
e.style.color = "";
|
|
@@ -220,11 +220,11 @@ function I(e, t) {
|
|
|
220
220
|
i[3]
|
|
221
221
|
].map((e) => Math.round(Number(e))) : null;
|
|
222
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function I(e, { mainColor: t, tones: n = "auto", secondColor: r }) {
|
|
224
224
|
let i = document.createElement("span");
|
|
225
225
|
i.hidden = !0, e.append(i);
|
|
226
226
|
try {
|
|
227
|
-
return
|
|
227
|
+
return L(i, {
|
|
228
228
|
mainColor: t,
|
|
229
229
|
tones: n,
|
|
230
230
|
secondColor: r
|
|
@@ -233,20 +233,20 @@ function L(e, { mainColor: t, tones: n = "auto", secondColor: r }) {
|
|
|
233
233
|
i.remove();
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
|
-
function
|
|
237
|
-
let i =
|
|
236
|
+
function L(e, { mainColor: t, tones: n, secondColor: r }) {
|
|
237
|
+
let i = F(e, t ?? "currentcolor");
|
|
238
238
|
if (!i) return null;
|
|
239
|
-
let a =
|
|
239
|
+
let a = P(i), o = N(a), s = (e, t = 0) => CSS.supports("color", "oklch(from red l c h)") ? `oklch(from ${e} clamp(0.55, l, 0.75) c calc(h + ${t}))` : e, c = F(e, s(o ? "var(--color-accent)" : a)), l = F(e, r ? s(r) : o ? s("var(--color-info)") : s(a, 40));
|
|
240
240
|
return !c || !l ? null : {
|
|
241
241
|
first: c,
|
|
242
242
|
second: l,
|
|
243
243
|
duo: n === "two" || n === "auto" && o
|
|
244
244
|
};
|
|
245
245
|
}
|
|
246
|
-
function
|
|
247
|
-
return e === "white" || e === "black" ? e :
|
|
246
|
+
function R(e, t) {
|
|
247
|
+
return e === "white" || e === "black" ? e : M(t);
|
|
248
248
|
}
|
|
249
|
-
function
|
|
249
|
+
function z(e, t) {
|
|
250
250
|
if (e) return {
|
|
251
251
|
"--chatbot-main-color": e,
|
|
252
252
|
"--chatbot-contrast-color": t,
|
|
@@ -255,10 +255,10 @@ function B(e, t) {
|
|
|
255
255
|
"--input-focus-color": "var(--color-brand-graphic)"
|
|
256
256
|
};
|
|
257
257
|
}
|
|
258
|
-
function
|
|
258
|
+
function B(e, t) {
|
|
259
259
|
if (!(t === void 0 || t < 50)) return e(t / 1e3, "seconds");
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function V(e) {
|
|
262
262
|
if (e !== void 0) {
|
|
263
263
|
if (typeof e == "string") return e.trim() || void 0;
|
|
264
264
|
try {
|
|
@@ -269,10 +269,10 @@ function H(e) {
|
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
|
-
function
|
|
273
|
-
return
|
|
272
|
+
function H(e) {
|
|
273
|
+
return V(e) !== void 0;
|
|
274
274
|
}
|
|
275
|
-
function
|
|
275
|
+
function U(e, t) {
|
|
276
276
|
let n = e?.input;
|
|
277
277
|
if (typeof t == "string") {
|
|
278
278
|
let e = n?.question ?? n?.steps?.[0]?.question;
|
|
@@ -284,14 +284,14 @@ function W(e, t) {
|
|
|
284
284
|
return i ? `${i} ${n}` : n;
|
|
285
285
|
}).join(". ");
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function W(e) {
|
|
288
288
|
return e?.options ? e.options.map((e) => ({
|
|
289
289
|
label: e.label,
|
|
290
290
|
value: e.label,
|
|
291
291
|
description: e.description
|
|
292
292
|
})) : [];
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function ue(e, t) {
|
|
295
295
|
let n = {};
|
|
296
296
|
if (t == null) return n;
|
|
297
297
|
if (typeof t == "string") return e.length === 1 && (n[0] = t), n;
|
|
@@ -307,7 +307,7 @@ function le(e, t) {
|
|
|
307
307
|
for (let [e, n] of Object.entries(t)) n !== void 0 && r(e, n);
|
|
308
308
|
return n;
|
|
309
309
|
}
|
|
310
|
-
var
|
|
310
|
+
var G = a.map((e) => `tool-${e}`), de = /* @__PURE__ */ new Set([
|
|
311
311
|
"tool-searchInKnowledgeBase",
|
|
312
312
|
"tool-retrieveRevisedAnswers",
|
|
313
313
|
"tool-expandChunkContext",
|
|
@@ -316,63 +316,63 @@ var K = a.map((e) => `tool-${e}`), ue = /* @__PURE__ */ new Set([
|
|
|
316
316
|
"tool-geocode",
|
|
317
317
|
"tool-recallUserMemory",
|
|
318
318
|
"tool-saveUserMemory",
|
|
319
|
-
...
|
|
319
|
+
...G
|
|
320
320
|
]);
|
|
321
|
-
function
|
|
322
|
-
return l(e) &&
|
|
321
|
+
function fe(e) {
|
|
322
|
+
return l(e) && de.has(e.type);
|
|
323
323
|
}
|
|
324
|
-
var
|
|
324
|
+
var K = (e) => e && typeof e == "object" && !Array.isArray(e) ? e : void 0, q = (e, ...t) => {
|
|
325
325
|
for (let n of t) {
|
|
326
326
|
let t = e?.[n];
|
|
327
327
|
if (typeof t == "string" && t.trim()) return t;
|
|
328
328
|
}
|
|
329
329
|
};
|
|
330
|
-
function
|
|
330
|
+
function pe(e) {
|
|
331
331
|
if (!l(e)) return;
|
|
332
|
-
let t =
|
|
333
|
-
if (e.type === "tool-searchInKnowledgeBase" ||
|
|
332
|
+
let t = K("input" in e ? e.input : void 0), n = K("output" in e ? e.output : void 0);
|
|
333
|
+
if (e.type === "tool-searchInKnowledgeBase" || G.includes(e.type)) {
|
|
334
334
|
let e = t?.queries;
|
|
335
335
|
if (Array.isArray(e)) {
|
|
336
336
|
let t = e.filter((e) => typeof e == "string" && !!e.trim());
|
|
337
337
|
return t.length ? t.join(" · ") : void 0;
|
|
338
338
|
}
|
|
339
|
-
return
|
|
339
|
+
return q(t, "query", "objective");
|
|
340
340
|
}
|
|
341
|
-
if (e.type === "tool-retrieveRevisedAnswers") return
|
|
342
|
-
if (e.type === "tool-getWeather") return
|
|
343
|
-
if (e.type === "tool-geocode") return
|
|
344
|
-
if (e.type === "tool-expandChunkContext") return
|
|
345
|
-
if (e.type === "tool-readDocumentFile" || e.type === "tool-readChatAttachment" || e.type === "tool-sendChatFile" || e.type === "tool-shareDocument") return
|
|
341
|
+
if (e.type === "tool-retrieveRevisedAnswers") return q(t, "query");
|
|
342
|
+
if (e.type === "tool-getWeather") return q(n, "location") ?? q(t, "locationName");
|
|
343
|
+
if (e.type === "tool-geocode") return q(t, "locationName");
|
|
344
|
+
if (e.type === "tool-expandChunkContext") return q(n, "documentName");
|
|
345
|
+
if (e.type === "tool-readDocumentFile" || e.type === "tool-readChatAttachment" || e.type === "tool-sendChatFile" || e.type === "tool-shareDocument") return q(n, "name");
|
|
346
346
|
if (e.type === "tool-readSpreadsheet") {
|
|
347
|
-
let e =
|
|
347
|
+
let e = q(t, "sheet"), n = q(t, "range");
|
|
348
348
|
return e && n ? `${e}!${n}` : e;
|
|
349
349
|
}
|
|
350
|
-
if (e.type === "tool-editSpreadsheet") return
|
|
351
|
-
if (e.type === "tool-readWordDocument") return
|
|
352
|
-
if (e.type === "tool-editWordDocument") return
|
|
353
|
-
if (e.type === "tool-createSpreadsheet" || e.type === "tool-createWordDocument") return
|
|
354
|
-
if (e.type === "tool-querySpreadsheet") return
|
|
355
|
-
if (e.type === "tool-recallUserMemory") return
|
|
356
|
-
if (e.type === "tool-saveUserMemory") return
|
|
357
|
-
}
|
|
358
|
-
function
|
|
359
|
-
let t =
|
|
360
|
-
if (t) return
|
|
361
|
-
if (l(e)) return e.type.includes("tool-subagent") ? "ri:robot-2-line" : e.type === "tool-runWorker" ? "ri:flow-chart" : e.type === "tool-scheduleWakeup" ? "ri:alarm-line" : e.type === "tool-fetchTeamsChannelHistory" ? "ri:chat-history-line" : e.type === "tool-readEarlierMessages" ? "ri:history-line" : e.type === "tool-readChatAttachment" ? "ri:attachment-line" : e.type === "tool-sendChatFile" ? "ri:send-plane-line" : e.type === "tool-enableTools" ? "ri:toggle-line" : e.type.includes("tool-mcp") ? "mcp" : e.type === "tool-retrieveRevisedAnswers" ? "ri:file-edit-line" : e.type === "tool-searchInKnowledgeBase" ? "ri:search-line" : e.type === "tool-expandChunkContext" ? "ri:file-search-line" : e.type === "tool-readDocumentFile" ? "ri:file-text-line" : e.type === "tool-readSpreadsheet" ? "ri:table-line" : e.type === "tool-editSpreadsheet" || e.type === "tool-createSpreadsheet" ? "ri:file-excel-2-line" : e.type === "tool-shareDocument" ? "ri:file-download-line" : e.type === "tool-readWordDocument" ? "ri:file-text-line" : e.type === "tool-editWordDocument" || e.type === "tool-createWordDocument" ? "ri:file-word-2-line" : e.type === "tool-querySpreadsheet" ? "ri:database-2-line" : e.type === "tool-geocode" ? "ri:map-2-line" : e.type === "tool-getWeather" ? "ri:sun-cloudy-line" : e.type === "tool-recallUserMemory" ? "ri:brain-line" : e.type === "tool-saveUserMemory" ? "ri:save-3-line" : e.type === "tool-showWeather" ? "ri:sun-line" : e.type === "tool-showChart" ? "ri:bar-chart-2-line" : e.type === "tool-showDiagram" ? "ri:flow-chart" : e.type === "tool-showSources" ? "ri:book-2-line" : e.type === "tool-showForm" ? "ri:survey-line" : e.type === "tool-showMultipleChoice" ? "ri:checkbox-multiple-line" : e.type === "tool-showArtifact" ? "ri:file-code-line" : e.type === "tool-showEmail" ? "ri:mail-line" : e.type === "tool-showMessage" ? "ri:chat-1-line" : e.type === "tool-showWebPages" ? "ri:pages-line" : e.type === "tool-showProductList" ? "ri:shopping-bag-line" : e.type === "tool-showContactForm" ? "ri:send-plane-2-line" : e.type === "tool-showCalendarEvent" ? "ri:calendar-event-line" : e.type === "tool-showComparison" ? "ri:scales-line" : e.type === "tool-showLocation" ? "ri:map-pin-line" : e.type === "tool-showQrCode" ? "ri:qr-code-line" : e.type === "tool-showImageGallery" ? "ri:image-line" : e.type === "tool-showVideo" ? "ri:film-line" : e.type === "tool-showSuggestedReply" ? "ri:corner-down-right-line" : e.type === "tool-requestGeolocation" ? "ri:map-pin-user-line" : e.type === "tool-disconnectOAuthConnection" ? "ri:link-unlink" : e.type === "tool-requestAccountLink" ? "ri:link" : e.type === "tool-unlinkAccount" ? "ri:link-unlink" :
|
|
350
|
+
if (e.type === "tool-editSpreadsheet") return q(n, "filename");
|
|
351
|
+
if (e.type === "tool-readWordDocument") return q(t, "search") ?? q(t, "from");
|
|
352
|
+
if (e.type === "tool-editWordDocument") return q(n, "filename");
|
|
353
|
+
if (e.type === "tool-createSpreadsheet" || e.type === "tool-createWordDocument") return q(n, "filename") ?? q(t, "filename");
|
|
354
|
+
if (e.type === "tool-querySpreadsheet") return q(n, "file");
|
|
355
|
+
if (e.type === "tool-recallUserMemory") return q(t, "query");
|
|
356
|
+
if (e.type === "tool-saveUserMemory") return q(t, "content", "query");
|
|
357
|
+
}
|
|
358
|
+
function me(e) {
|
|
359
|
+
let t = S(e);
|
|
360
|
+
if (t) return E(t)?.icon ?? "ri:apps-line";
|
|
361
|
+
if (l(e)) return e.type.includes("tool-subagent") ? "ri:robot-2-line" : e.type === "tool-runWorker" ? "ri:flow-chart" : e.type === "tool-scheduleWakeup" ? "ri:alarm-line" : e.type === "tool-fetchTeamsChannelHistory" ? "ri:chat-history-line" : e.type === "tool-readEarlierMessages" ? "ri:history-line" : e.type === "tool-readChatAttachment" ? "ri:attachment-line" : e.type === "tool-sendChatFile" ? "ri:send-plane-line" : e.type === "tool-enableTools" ? "ri:toggle-line" : e.type.includes("tool-mcp") ? "mcp" : e.type === "tool-retrieveRevisedAnswers" ? "ri:file-edit-line" : e.type === "tool-searchInKnowledgeBase" ? "ri:search-line" : e.type === "tool-expandChunkContext" ? "ri:file-search-line" : e.type === "tool-readDocumentFile" ? "ri:file-text-line" : e.type === "tool-readSpreadsheet" ? "ri:table-line" : e.type === "tool-editSpreadsheet" || e.type === "tool-createSpreadsheet" ? "ri:file-excel-2-line" : e.type === "tool-shareDocument" ? "ri:file-download-line" : e.type === "tool-readWordDocument" ? "ri:file-text-line" : e.type === "tool-editWordDocument" || e.type === "tool-createWordDocument" ? "ri:file-word-2-line" : e.type === "tool-querySpreadsheet" ? "ri:database-2-line" : e.type === "tool-geocode" ? "ri:map-2-line" : e.type === "tool-getWeather" ? "ri:sun-cloudy-line" : e.type === "tool-recallUserMemory" ? "ri:brain-line" : e.type === "tool-saveUserMemory" ? "ri:save-3-line" : e.type === "tool-showWeather" ? "ri:sun-line" : e.type === "tool-showChart" ? "ri:bar-chart-2-line" : e.type === "tool-showDiagram" ? "ri:flow-chart" : e.type === "tool-showSources" ? "ri:book-2-line" : e.type === "tool-showForm" ? "ri:survey-line" : e.type === "tool-showMultipleChoice" ? "ri:checkbox-multiple-line" : e.type === "tool-showArtifact" ? "ri:file-code-line" : e.type === "tool-showEmail" ? "ri:mail-line" : e.type === "tool-showMessage" ? "ri:chat-1-line" : e.type === "tool-showWebPages" ? "ri:pages-line" : e.type === "tool-showProductList" ? "ri:shopping-bag-line" : e.type === "tool-showContactForm" ? "ri:send-plane-2-line" : e.type === "tool-showCalendarEvent" ? "ri:calendar-event-line" : e.type === "tool-showComparison" ? "ri:scales-line" : e.type === "tool-showLocation" ? "ri:map-pin-line" : e.type === "tool-showQrCode" ? "ri:qr-code-line" : e.type === "tool-showImageGallery" ? "ri:image-line" : e.type === "tool-showVideo" ? "ri:film-line" : e.type === "tool-showSuggestedReply" ? "ri:corner-down-right-line" : e.type === "tool-requestGeolocation" ? "ri:map-pin-user-line" : e.type === "tool-disconnectOAuthConnection" ? "ri:link-unlink" : e.type === "tool-requestAccountLink" ? "ri:link" : e.type === "tool-unlinkAccount" ? "ri:link-unlink" : G.includes(e.type) ? "ri:global-line" : "ri:tools-line";
|
|
362
362
|
if (h(e)) return "ri:lightbulb-line";
|
|
363
363
|
if (c(e)) return "ri:double-quotes-r";
|
|
364
364
|
}
|
|
365
|
-
var
|
|
365
|
+
var he = [
|
|
366
366
|
i,
|
|
367
367
|
n,
|
|
368
368
|
r
|
|
369
369
|
];
|
|
370
|
-
function
|
|
370
|
+
function J(e, { t, te: n }) {
|
|
371
371
|
if (n(`agent.tool.${e}`)) return t(`agent.tool.${e}`);
|
|
372
|
-
let r =
|
|
372
|
+
let r = he.find((t) => e.startsWith(t)), i = r ? e.slice(r.length) : e;
|
|
373
373
|
return s(o(i).trim().toLowerCase());
|
|
374
374
|
}
|
|
375
|
-
var
|
|
375
|
+
var ge = {
|
|
376
376
|
custom: (e) => e("messagePart.type.custom"),
|
|
377
377
|
data: (e) => e("messagePart.type.data"),
|
|
378
378
|
file: (e) => e("messagePart.type.file"),
|
|
@@ -382,13 +382,13 @@ var he = {
|
|
|
382
382
|
"step-start": (e) => e("messagePart.type.stepStart"),
|
|
383
383
|
text: (e) => e("messagePart.type.text")
|
|
384
384
|
};
|
|
385
|
-
function
|
|
386
|
-
if (l(e)) return
|
|
387
|
-
if (e.type === "dynamic-tool") return
|
|
388
|
-
let n =
|
|
385
|
+
function _e(e, t) {
|
|
386
|
+
if (l(e)) return J(u(e), t);
|
|
387
|
+
if (e.type === "dynamic-tool") return J(e.toolName, t);
|
|
388
|
+
let n = ge[e.type.startsWith("data-") ? "data" : e.type];
|
|
389
389
|
return n ? n(t.t) : s(o(e.type));
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function ve(e, t) {
|
|
392
392
|
if (!e) return e;
|
|
393
393
|
let n = {
|
|
394
394
|
Intent: t("conversationSummary.intent"),
|
|
@@ -398,17 +398,17 @@ function _e(e, t) {
|
|
|
398
398
|
};
|
|
399
399
|
return e.replace(/\*\*(Intent|Topics covered|Key facts|Open questions)(:?)\*\*/g, (e, t, r) => `**${n[t]}${r}**`);
|
|
400
400
|
}
|
|
401
|
-
function
|
|
402
|
-
let r =
|
|
401
|
+
function ye(e, t, n) {
|
|
402
|
+
let r = S(t);
|
|
403
403
|
if (r) {
|
|
404
404
|
let t = r.toolCallId ? n?.[r.toolCallId] : void 0;
|
|
405
405
|
if (t) return t;
|
|
406
|
-
let i =
|
|
406
|
+
let i = E(r);
|
|
407
407
|
return i ? e(i.label) : r.title || r.toolName;
|
|
408
408
|
}
|
|
409
|
-
return l(t) ? t.type.includes("tool-subagent") ? e("messagePart.runSubagent") : t.type === "tool-runWorker" ? e("messagePart.runWorker") : t.type === "tool-scheduleWakeup" ? e("messagePart.scheduleWakeup") : t.type === "tool-fetchTeamsChannelHistory" ? e("messagePart.fetchTeamsChannelHistory") : t.type === "tool-readEarlierMessages" ? e("messagePart.readEarlierMessages") : t.type === "tool-readChatAttachment" ? e("messagePart.readChatAttachment") : t.type === "tool-sendChatFile" ? e("messagePart.sendChatFile") : t.type === "tool-enableTools" ? e("messagePart.enableTools") : t.type === "tool-retrieveRevisedAnswers" ? e("messagePart.revisedAnswers") : t.type === "tool-searchInKnowledgeBase" ? e("messagePart.searchingDocuments") : t.type === "tool-expandChunkContext" ? e("messagePart.expandChunkContext") : t.type === "tool-readDocumentFile" ? e("messagePart.readDocumentFile") : t.type === "tool-readSpreadsheet" ? e("messagePart.readSpreadsheet") : t.type === "tool-editSpreadsheet" ? e("messagePart.editSpreadsheet") : t.type === "tool-shareDocument" ? e("messagePart.shareDocument") : t.type === "tool-readWordDocument" ? e("messagePart.readWordDocument") : t.type === "tool-editWordDocument" ? e("messagePart.editWordDocument") : t.type === "tool-createSpreadsheet" ? e("messagePart.createSpreadsheet") : t.type === "tool-createWordDocument" ? e("messagePart.createWordDocument") : t.type === "tool-querySpreadsheet" ? e("messagePart.querySpreadsheet") : t.type === "tool-geocode" ? e("messagePart.geocode") : t.type === "tool-getWeather" ? e("messagePart.getWeather") : t.type === "tool-recallUserMemory" ? e("messagePart.recallUserMemory") : t.type === "tool-saveUserMemory" ? e("messagePart.saveUserMemory") : t.type === "tool-showWeather" ? e("messagePart.showWeather") : t.type === "tool-showForm" ? e("messagePart.showForm") : t.type === "tool-showChart" ? e("messagePart.showChart") : t.type === "tool-showDiagram" ? e("messagePart.showDiagram") : t.type === "tool-showSources" ? e("messagePart.showSources") : t.type === "tool-showMultipleChoice" ? e("messagePart.showMultipleChoice") : t.type === "tool-showArtifact" ? e("messagePart.showArtifact") : t.type === "tool-showEmail" ? e("messagePart.showEmail") : t.type === "tool-showMessage" ? e("messagePart.showMessage") : t.type === "tool-showWebPages" ? e("messagePart.showWebPages") : t.type === "tool-showProducts" ? e("messagePart.showProducts") : t.type === "tool-showContactForm" ? e("messagePart.showContactForm") : t.type === "tool-showCalendarEvent" ? e("messagePart.showCalendarEvent") : t.type === "tool-showComparison" ? e("messagePart.showComparison") : t.type === "tool-showLocation" ? e("messagePart.showLocation") : t.type === "tool-showQrCode" ? e("messagePart.showQrCode") : t.type === "tool-showImageGallery" ? e("messagePart.showImageGallery") : t.type === "tool-showVideo" ? e("messagePart.showVideo") : t.type === "tool-showSuggestedReply" ? e("messagePart.showSuggestedReply") : t.type === "tool-requestGeolocation" ? e("messagePart.requestGeolocation") : t.type === "tool-disconnectOAuthConnection" ? e("messagePart.disconnectOAuthConnection") : t.type === "tool-requestAccountLink" ? e("messagePart.requestAccountLink") : t.type === "tool-unlinkAccount" ? e("messagePart.unlinkAccount") :
|
|
409
|
+
return l(t) ? t.type.includes("tool-subagent") ? e("messagePart.runSubagent") : t.type === "tool-runWorker" ? e("messagePart.runWorker") : t.type === "tool-scheduleWakeup" ? e("messagePart.scheduleWakeup") : t.type === "tool-fetchTeamsChannelHistory" ? e("messagePart.fetchTeamsChannelHistory") : t.type === "tool-readEarlierMessages" ? e("messagePart.readEarlierMessages") : t.type === "tool-readChatAttachment" ? e("messagePart.readChatAttachment") : t.type === "tool-sendChatFile" ? e("messagePart.sendChatFile") : t.type === "tool-enableTools" ? e("messagePart.enableTools") : t.type === "tool-retrieveRevisedAnswers" ? e("messagePart.revisedAnswers") : t.type === "tool-searchInKnowledgeBase" ? e("messagePart.searchingDocuments") : t.type === "tool-expandChunkContext" ? e("messagePart.expandChunkContext") : t.type === "tool-readDocumentFile" ? e("messagePart.readDocumentFile") : t.type === "tool-readSpreadsheet" ? e("messagePart.readSpreadsheet") : t.type === "tool-editSpreadsheet" ? e("messagePart.editSpreadsheet") : t.type === "tool-shareDocument" ? e("messagePart.shareDocument") : t.type === "tool-readWordDocument" ? e("messagePart.readWordDocument") : t.type === "tool-editWordDocument" ? e("messagePart.editWordDocument") : t.type === "tool-createSpreadsheet" ? e("messagePart.createSpreadsheet") : t.type === "tool-createWordDocument" ? e("messagePart.createWordDocument") : t.type === "tool-querySpreadsheet" ? e("messagePart.querySpreadsheet") : t.type === "tool-geocode" ? e("messagePart.geocode") : t.type === "tool-getWeather" ? e("messagePart.getWeather") : t.type === "tool-recallUserMemory" ? e("messagePart.recallUserMemory") : t.type === "tool-saveUserMemory" ? e("messagePart.saveUserMemory") : t.type === "tool-showWeather" ? e("messagePart.showWeather") : t.type === "tool-showForm" ? e("messagePart.showForm") : t.type === "tool-showChart" ? e("messagePart.showChart") : t.type === "tool-showDiagram" ? e("messagePart.showDiagram") : t.type === "tool-showSources" ? e("messagePart.showSources") : t.type === "tool-showMultipleChoice" ? e("messagePart.showMultipleChoice") : t.type === "tool-showArtifact" ? e("messagePart.showArtifact") : t.type === "tool-showEmail" ? e("messagePart.showEmail") : t.type === "tool-showMessage" ? e("messagePart.showMessage") : t.type === "tool-showWebPages" ? e("messagePart.showWebPages") : t.type === "tool-showProducts" ? e("messagePart.showProducts") : t.type === "tool-showContactForm" ? e("messagePart.showContactForm") : t.type === "tool-showCalendarEvent" ? e("messagePart.showCalendarEvent") : t.type === "tool-showComparison" ? e("messagePart.showComparison") : t.type === "tool-showLocation" ? e("messagePart.showLocation") : t.type === "tool-showQrCode" ? e("messagePart.showQrCode") : t.type === "tool-showImageGallery" ? e("messagePart.showImageGallery") : t.type === "tool-showVideo" ? e("messagePart.showVideo") : t.type === "tool-showSuggestedReply" ? e("messagePart.showSuggestedReply") : t.type === "tool-requestGeolocation" ? e("messagePart.requestGeolocation") : t.type === "tool-disconnectOAuthConnection" ? e("messagePart.disconnectOAuthConnection") : t.type === "tool-requestAccountLink" ? e("messagePart.requestAccountLink") : t.type === "tool-unlinkAccount" ? e("messagePart.unlinkAccount") : G.includes(t.type) ? e("messagePart.webSearch") : e("messagePart.tool") : h(t) ? e("messagePart.reasoning") : e("messagePart.streaming");
|
|
410
410
|
}
|
|
411
|
-
var
|
|
411
|
+
var be = {
|
|
412
412
|
calibri: "Calibri, Carlito, \"Segoe UI\", Arial, sans-serif",
|
|
413
413
|
"calibri light": "\"Calibri Light\", Calibri, Carlito, \"Segoe UI\", sans-serif",
|
|
414
414
|
aptos: "Aptos, Calibri, Carlito, \"Segoe UI\", Arial, sans-serif",
|
|
@@ -422,7 +422,7 @@ var ye = {
|
|
|
422
422
|
georgia: "Georgia, serif",
|
|
423
423
|
verdana: "Verdana, \"DejaVu Sans\", sans-serif",
|
|
424
424
|
tahoma: "Tahoma, Verdana, sans-serif"
|
|
425
|
-
},
|
|
425
|
+
}, xe = {
|
|
426
426
|
calibri: 1.22,
|
|
427
427
|
"calibri light": 1.22,
|
|
428
428
|
cambria: 1.17,
|
|
@@ -433,10 +433,10 @@ var ye = {
|
|
|
433
433
|
georgia: 1.14,
|
|
434
434
|
verdana: 1.22,
|
|
435
435
|
tahoma: 1.21
|
|
436
|
-
},
|
|
436
|
+
}, Se = (e) => xe[e.toLowerCase()] ?? 1.17, Ce = (e) => be[e.toLowerCase()] ?? `"${e.replace(/"/g, "")}", ${/roman|garamond|cambria|georgia|serif|book|times/i.test(e) ? "Georgia, serif" : "Calibri, Carlito, \"Segoe UI\", Arial, sans-serif"}`, we = Symbol("wordPreviewImages"), Te = Symbol("wordPreviewCharts"), Ee = (e, t) => {
|
|
437
437
|
let n = e?.[t];
|
|
438
438
|
return n?.startsWith("data:image/webp;base64,") ? n : void 0;
|
|
439
|
-
},
|
|
439
|
+
}, De = (e, t) => {
|
|
440
440
|
let n = e.anchor;
|
|
441
441
|
return {
|
|
442
442
|
left: `${n.xFrom === "page" ? n.x : t.margins.left + n.x}pt`,
|
|
@@ -445,10 +445,10 @@ var ye = {
|
|
|
445
445
|
height: `${e.height}pt`,
|
|
446
446
|
zIndex: n.wrap === "behind" ? -1 : 1
|
|
447
447
|
};
|
|
448
|
-
},
|
|
448
|
+
}, Y = (e) => {
|
|
449
449
|
let t = e.anchor;
|
|
450
450
|
return t ? t.wrap === "around" ? "around" : t.wrap === "block" ? "block" : t.yFrom === "paragraph" ? "paragraph" : "page" : "inline";
|
|
451
|
-
},
|
|
451
|
+
}, X = (e, t) => e.filter((e) => t === "accepted" ? e.change !== "deleted" : t !== "original" || e.change !== "inserted"), Z = (e) => e.some((e) => e.image || e.text.trim()), Oe = (e, t) => {
|
|
452
452
|
let n = [], r = !1, i, a = (e, t, a, o, s, c) => {
|
|
453
453
|
let l = s ?? i;
|
|
454
454
|
n.push({
|
|
@@ -466,33 +466,55 @@ var ye = {
|
|
|
466
466
|
if (e.kind === "table") {
|
|
467
467
|
let r = !!e.pageBreakBefore, i = e.section;
|
|
468
468
|
e.rows.forEach((e, o) => {
|
|
469
|
-
(!e.some((e) => e.runs.length) || e.some((e) =>
|
|
469
|
+
(!e.some((e) => e.runs.length) || e.some((e) => Z(X(e.runs, t)))) && (a(`${n}:${o}`, n, o, r, i, e.some((e) => e.keepNext)), r = !1, i = void 0);
|
|
470
470
|
}), o(r, i);
|
|
471
|
-
} else !e.runs.length ||
|
|
471
|
+
} else !e.runs.length || Z(X(e.runs, t)) ? a(`${n}`, n, void 0, !!e.style?.pageBreakBefore, e.section, !!e.style?.keepNext) : o(!!e.style?.pageBreakBefore, e.section);
|
|
472
472
|
}), n;
|
|
473
|
-
},
|
|
473
|
+
}, ke = (e, t) => e.flatMap((e) => e.kind === "table" ? [] : X(e.runs, t).flatMap((e) => e.picture && Y(e.picture) === "page" ? [e.picture] : [])), Ae = (e, t) => t ? e.replace(RegExp(` \\(v${t}\\)(\\.\\w+)$`), "$1") : e, je = /* @__PURE__ */ new Set([
|
|
474
474
|
"image/jpeg",
|
|
475
475
|
"image/png",
|
|
476
476
|
"image/webp"
|
|
477
477
|
]);
|
|
478
|
-
function
|
|
479
|
-
return
|
|
478
|
+
function Q(e) {
|
|
479
|
+
return je.has(e);
|
|
480
480
|
}
|
|
481
|
-
function
|
|
481
|
+
function Me(e) {
|
|
482
482
|
return e.isComposing || e.keyCode === 229;
|
|
483
483
|
}
|
|
484
|
-
function
|
|
484
|
+
function Ne(e, t) {
|
|
485
485
|
let n = t / 2;
|
|
486
486
|
return e.left <= n && e.right >= n && e.top <= 92 && e.bottom >= 48;
|
|
487
487
|
}
|
|
488
|
-
function
|
|
489
|
-
let s =
|
|
488
|
+
function $({ start: e, bottom: t, bar: n, bounds: r, touch: i = !1, gap: a = 8, margin: o = 8 }) {
|
|
489
|
+
let s = r.top + r.height - o - n.height, c = t + (i ? Math.max(a, 28) : a), l = Math.max(r.top + o, Math.min(c, s)), u = e.top - a - n.height - (i ? 56 : 0), d = u >= r.top + o, f = (i ? c > s && d : d) ? "above" : "below";
|
|
490
490
|
return {
|
|
491
|
-
top:
|
|
491
|
+
top: f === "above" ? u : l,
|
|
492
492
|
left: Math.max(r.left + o, Math.min(e.left, r.left + r.width - o - n.width)),
|
|
493
|
-
placement:
|
|
493
|
+
placement: f
|
|
494
|
+
};
|
|
495
|
+
}
|
|
496
|
+
function Pe({ start: e, bottom: t, bounds: n, card: r, tallest: i, shortest: a, touch: o = !1, gap: s = 8, margin: c = 8 }) {
|
|
497
|
+
let l = o ? 56 : 0, u = o ? Math.max(s, 28) : s, d = {
|
|
498
|
+
above: e.top - s - l - (n.top + c),
|
|
499
|
+
below: n.top + n.height - c - (t + u)
|
|
500
|
+
}, [f, p] = o ? ["below", "above"] : ["above", "below"], m = d[f] >= i || d[p] < i && d[p] <= d[f] ? f : p, h = Math.min(i, n.height - 2 * c, Math.max(a, d[m])), g = Math.min(r.height, h), _ = Math.max(n.top + c, Math.min(m === "above" ? e.top - s - l - g : t + u, n.top + n.height - c - g)), { left: v } = $({
|
|
501
|
+
start: e,
|
|
502
|
+
bottom: t,
|
|
503
|
+
bounds: n,
|
|
504
|
+
bar: {
|
|
505
|
+
width: r.width,
|
|
506
|
+
height: g
|
|
507
|
+
},
|
|
508
|
+
gap: s,
|
|
509
|
+
margin: c
|
|
510
|
+
});
|
|
511
|
+
return {
|
|
512
|
+
top: _,
|
|
513
|
+
left: v,
|
|
514
|
+
maxHeight: h,
|
|
515
|
+
maxWidth: n.width - 2 * c
|
|
494
516
|
};
|
|
495
517
|
}
|
|
496
|
-
export {
|
|
518
|
+
export { _ as $, re as A, Pe as B, ye as C, N as D, fe as E, v as F, X as G, J as H, ee as I, ke as J, Se as K, R as L, D as M, O as N, k as O, ve as P, p as Q, I as R, A as S, H as T, Oe as U, V, Ce as W, Ee as X, Y, f as Z, S as _, G as a, l as at, j as b, z as c, b as d, u as et, te as f, B as g, W as h, ie as i, c as it, Me as j, Q as k, Ne as l, ue as m, T as n, d as nt, Te as o, m as ot, U as p, De as q, w as r, h as rt, we as s, le as t, g as tt, Ae as u, oe as v, pe as w, _e as x, me as y, $ as z };
|
|
497
519
|
|
|
498
|
-
//# sourceMappingURL=utils-
|
|
520
|
+
//# sourceMappingURL=utils-C2aFWWye.js.map
|