@8wave/ai-elements 0.68.0 → 0.69.0
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/dist/_chunks/{PkStreamingMarkdown-D3MJ5dfu.js → PkStreamingMarkdown-C0BpOvli.js} +2 -2
- package/dist/_chunks/{PkStreamingMarkdown-D3MJ5dfu.js.map → PkStreamingMarkdown-C0BpOvli.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-BFe_MhNr.js → PkToolShowArtifact-DzNIkKvZ.js} +3 -3
- package/dist/_chunks/{PkToolShowArtifact-BFe_MhNr.js.map → PkToolShowArtifact-DzNIkKvZ.js.map} +1 -1
- package/dist/_chunks/{PkToolShowLocation-DN57lKN1.js → PkToolShowLocation-BsBiA4jV.js} +2 -2
- package/dist/_chunks/{PkToolShowLocation-DN57lKN1.js.map → PkToolShowLocation-BsBiA4jV.js.map} +1 -1
- package/dist/_chunks/src-BRYn66N3.js.map +1 -1
- package/dist/_chunks/{vue-leaflet.es-7LObg4WN.js → vue-leaflet.es-BT-uRmMx.js} +5 -5
- package/dist/_chunks/{vue-leaflet.es-7LObg4WN.js.map → vue-leaflet.es-BT-uRmMx.js.map} +1 -1
- package/dist/ai-elements.es.js +293 -299
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/{PkChatbot-C_ASB2zq.js → PkChatbot-Cy7p5UI_.js} +5 -5
- package/dist-vue/_chunks/{PkChatbot-C_ASB2zq.js.map → PkChatbot-Cy7p5UI_.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotMessages-CQdxH86L.js → PkChatbotMessages-C7-ZtU0-.js} +11 -11
- package/dist-vue/_chunks/{PkChatbotMessages-CQdxH86L.js.map → PkChatbotMessages-C7-ZtU0-.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-DHOeNxnR.js → PkChatbotViewChat-EWotdJkz.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewChat-DHOeNxnR.js.map → PkChatbotViewChat-EWotdJkz.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewConversations-DFv_8-8K.js → PkChatbotViewConversations-Ct0TbDrg.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewConversations-DFv_8-8K.js.map → PkChatbotViewConversations-Ct0TbDrg.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-BUj0YnIi.js → PkChatbotViewProfile-BhdCxVSX.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-BUj0YnIi.js.map → PkChatbotViewProfile-BhdCxVSX.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-DIw-_JPA.js → PkToolShowArtifact-pTS7wzhw.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-DIw-_JPA.js.map → PkToolShowArtifact-pTS7wzhw.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowCalendarEvent-ZZM8p7wu.js → PkToolShowCalendarEvent-DQ--fzwb.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowCalendarEvent-ZZM8p7wu.js.map → PkToolShowCalendarEvent-DQ--fzwb.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowComparison-7akNsf1w.js → PkToolShowComparison-CzRUrjbP.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowComparison-7akNsf1w.js.map → PkToolShowComparison-CzRUrjbP.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowEmail-CpiAbmr0.js → PkToolShowEmail-htn0ivwY.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowEmail-CpiAbmr0.js.map → PkToolShowEmail-htn0ivwY.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowImageGallery-jY7iYqTv.js → PkToolShowImageGallery-CpU183SC.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowImageGallery-jY7iYqTv.js.map → PkToolShowImageGallery-CpU183SC.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowLocation-BeOkj0Q2.js → PkToolShowLocation-DSZvW68g.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowLocation-BeOkj0Q2.js.map → PkToolShowLocation-DSZvW68g.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowMessage-AS8VNcYP.js → PkToolShowMessage-DtGDm3pq.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowMessage-AS8VNcYP.js.map → PkToolShowMessage-DtGDm3pq.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-FEq8sFxW.js → PkToolShowProductList-BlkUdbtV.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-FEq8sFxW.js.map → PkToolShowProductList-BlkUdbtV.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowQrCode-DAt8tBHK.js → PkToolShowQrCode-BUyhM_MN.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowQrCode-DAt8tBHK.js.map → PkToolShowQrCode-BUyhM_MN.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-jA5eZRdi.js → PkToolShowWebPages-BQp9A4vb.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-jA5eZRdi.js.map → PkToolShowWebPages-BQp9A4vb.js.map} +1 -1
- package/dist-vue/_chunks/{dist-C-yeiSHm.js → dist-BHuX2VvC.js} +2 -2
- package/dist-vue/_chunks/{dist-C-yeiSHm.js.map → dist-BHuX2VvC.js.map} +1 -1
- package/dist-vue/_chunks/{dist-D2-23M8l.js → dist-BWXfA4NS.js} +4 -4
- package/dist-vue/_chunks/{dist-D2-23M8l.js.map → dist-BWXfA4NS.js.map} +1 -1
- package/dist-vue/_chunks/{dist-DJ_vDk0q.js → dist-CAXUIcdd.js} +3 -3
- package/dist-vue/_chunks/{dist-DJ_vDk0q.js.map → dist-CAXUIcdd.js.map} +1 -1
- package/dist-vue/_chunks/{dist-C38fHUMa.js → dist-D-VT7gvP.js} +2 -2
- package/dist-vue/_chunks/{dist-C38fHUMa.js.map → dist-D-VT7gvP.js.map} +1 -1
- package/dist-vue/_chunks/{dist-BrsWoii-.js → dist-DEe8jwtO.js} +2 -2
- package/dist-vue/_chunks/{dist-BrsWoii-.js.map → dist-DEe8jwtO.js.map} +1 -1
- package/dist-vue/_chunks/{dist-BmqFgHbN.js → dist-DV82RztV.js} +2 -2
- package/dist-vue/_chunks/{dist-BmqFgHbN.js.map → dist-DV82RztV.js.map} +1 -1
- package/dist-vue/_chunks/{dist-ByzpJpuj.js → dist-DVM_p-M1.js} +3 -3
- package/dist-vue/_chunks/{dist-ByzpJpuj.js.map → dist-DVM_p-M1.js.map} +1 -1
- package/dist-vue/_chunks/{dist-D3coexrW.js → dist-DfEAZDKB.js} +2 -2
- package/dist-vue/_chunks/{dist-D3coexrW.js.map → dist-DfEAZDKB.js.map} +1 -1
- package/dist-vue/_chunks/{dist-veLX58Me.js → dist-QbFF3eM_.js} +2 -2
- package/dist-vue/_chunks/{dist-veLX58Me.js.map → dist-QbFF3eM_.js.map} +1 -1
- package/dist-vue/_chunks/{dist-B65AhbTK.js → dist-bUGhZmKp.js} +3 -3
- package/dist-vue/_chunks/{dist-B65AhbTK.js.map → dist-bUGhZmKp.js.map} +1 -1
- package/dist-vue/_chunks/{dist-DmKzgdbO.js → dist-jVwgEJDw.js} +2 -2
- package/dist-vue/_chunks/{dist-DmKzgdbO.js.map → dist-jVwgEJDw.js.map} +1 -1
- package/dist-vue/_chunks/src-DjRNH9vV.js.map +1 -1
- package/dist-vue/_chunks/{useChatbotStore-B9BUWM4O.js → useChatbotStore-ys9uGP5v.js} +4 -10
- package/dist-vue/_chunks/{useChatbotStore-B9BUWM4O.js.map → useChatbotStore-ys9uGP5v.js.map} +1 -1
- package/dist-vue/composables.js +1 -1
- package/dist-vue/index.js +32 -32
- package/package.json +1 -1
package/dist/ai-elements.es.js
CHANGED
|
@@ -5,7 +5,7 @@ import { a as Fe, g as Ie, h as Le, u as Re } from "./_chunks/dist-BajHjEnz.js";
|
|
|
5
5
|
import { n as ze, t as Be } from "./_chunks/dot-prop-DBnEiG9k.js";
|
|
6
6
|
import { a as Ve, c as He, i as Ue, n as We, o as Ge, r as Ke, t as qe } from "./_chunks/index.es-D7jJWPne.js";
|
|
7
7
|
import { a as Je, c as Ye, d as Xe, f as Ze, i as Qe, l as $e, m as et, o as tt, p as nt, r as rt, s as it, t as at, u as ot } from "./_chunks/src-BRYn66N3.js";
|
|
8
|
-
import { t as st } from "./_chunks/PkStreamingMarkdown-
|
|
8
|
+
import { t as st } from "./_chunks/PkStreamingMarkdown-C0BpOvli.js";
|
|
9
9
|
import { n as ct, t as lt } from "./_chunks/useLightbox-RmU8z981.js";
|
|
10
10
|
import { n as ut, t as dt } from "./_chunks/PkUrl-BiCK2gUF.js";
|
|
11
11
|
//#region ../../node_modules/.pnpm/pinia@3.0.4_typescript@6.0.2_vue@3.5.32_typescript@6.0.2_/node_modules/pinia/dist/pinia.mjs
|
|
@@ -2759,7 +2759,7 @@ var mn = class {
|
|
|
2759
2759
|
height: 24
|
|
2760
2760
|
}, _n = {
|
|
2761
2761
|
prefix: "custom",
|
|
2762
|
-
lastModified:
|
|
2762
|
+
lastModified: 1776337699,
|
|
2763
2763
|
icons: {
|
|
2764
2764
|
"8wave": {
|
|
2765
2765
|
body: "<style>path{fill:currentColor}</style><path fill-rule=\"evenodd\" d=\"M216 108.9c0 14.2-2.8 28.2-8.2 41.3s-13.4 25-23.4 35-21.9 18-35 23.4-27.2 8.2-41.4 8.2-28.2-2.8-41.3-8.2-25-13.4-35.1-23.4c-10-10-17.9-21.9-23.4-35C2.8 137.1 0 123.1 0 108.9s2.8-28.2 8.2-41.3c5.5-13.1 13.4-25 23.4-35 10.1-10 22-18 35.1-23.4S93.8 1 108 1s28.3 2.8 41.4 8.2 25 13.4 35 23.4 18 21.9 23.4 35 8.2 27.1 8.2 41.3M47.4 83.1c-9.8 14.6-10.5 33.8-1.4 49 8.9 14.9 26.4 23.5 43.7 20 10.3-2.1 20.6-8.4 26.5-17.5q.4-.7.9-.1c21 21.6 55.3 9.5 60.2-19.3 5.9-34.6-34.8-58.5-60.3-32.1q-.1 0-.2.1h-.3l-.2-.2c-16.9-24.3-52.2-24.6-68.9.1m25 50.3c-3.1-1.3-5.8-3.3-8.1-5.8s-4.2-5.4-5.4-8.6c-1.3-3.3-1.9-6.7-1.9-10.3 0-3.5.6-6.9 1.9-10.2 1.2-3.2 3.1-6.1 5.4-8.6s5-4.5 8.1-5.8c3-1.3 6.2-2 9.5-2s6.5.7 9.6 2c3 1.3 5.8 3.3 8.1 5.8s4.1 5.4 5.4 8.6c1.2 3.3 1.9 6.7 1.9 10.3 0 3.5-.7 6.9-1.9 10.2-1.3 3.2-3.1 6.1-5.4 8.6s-5.1 4.5-8.1 5.8c-3.1 1.3-6.3 2-9.6 2s-6.5-.7-9.5-2m62.7-6c-2.2-1-4.2-2.4-5.9-4.2-1.6-1.9-3-4-3.9-6.4-.9-2.3-1.3-4.9-1.3-7.4 0-2.6.5-5.1 1.4-7.5.9-2.3 2.3-4.4 3.9-6.2 1.7-1.8 3.7-3.3 5.9-4.2q3.3-1.5 6.9-1.5t6.9 1.5c2.2 1 4.2 2.4 5.8 4.2 1.7 1.9 3 4 3.9 6.4.9 2.3 1.4 4.9 1.4 7.4 0 2.6-.5 5.1-1.4 7.5-.9 2.3-2.3 4.4-4 6.2-1.6 1.8-3.6 3.3-5.8 4.2-2.2 1-4.6 1.5-6.9 1.5q-3.6 0-6.9-1.5\"/><path d=\"M322 40.4V51q0 .2.1.4t.2.3q.2.2.4.3h19.7q.4 0 .5.4l.1 2.3q.1.5-.4.5h-20.1q-.8 0-1.6-.3-.7-.3-1.3-.9-.5-.5-.8-1.3-.3-.7-.3-1.5V26.5q0-4.5 4.5-4.5h19.6q.3 0 .2.3l-.1 2.9q0 .2-.2.2l-19.5-.1q-.1 0-.3.1t-.3.2q-.2.1-.2.3-.1.2-.1.4L322 36q0 .7.7.7h18.8q.9 0 .9.8v1.7q-.1.7-.8.7l-19-.1q-.6 0-.6.6m56-18q0-.3.3-.3h2.9q.3 0 .3.3v32.5q0 .3-.3.3h-2.9q-.3 0-.3-.3zm64.2 28.5V40.7q0-1.2 1.1-1.3h1q1.4-.1 1.4 1.3v10.7q0 3.7-3.7 3.8-6.4.2-13.1 0c-12-.4-12.8-12.4-11.7-21.6q1.4-11.1 12.3-11.5 7-.2 14.9 0 .8.1.7.9l-.1 1.6q-.1.7-.8.7-8.3-.2-15 .1c-10.4.4-9.5 14.5-7.5 21.3 1.2 4.5 4.9 5.3 9 5.4q5.4 0 10.5-.1 1 0 1-1.1m42.5-10.3v14.2q0 .1-.1.2l-.1.1q0 .1-.1.1h-2.9q-.1 0-.2-.1l-.1-.1q-.1 0-.1-.1v-.2l-.1-32.1q0-.1.1-.2 0-.1.1-.2l.1-.1h.2l2.7-.1q.1 0 .2.1.1 0 .1.1.1 0 .1.1.1.1.1.2v14q0 .1.1.1l.1.1q.1.1.2.1l18.9-.1h.2q.1 0 .2-.1l.1-.1V22.4q0-.1.1-.2.1 0 .2-.1h.1l2.7-.1h.2q.1.1.2.1 0 .1.1.2V55q-.1 0-.1.1-.1.1-.2.1h-3q-.1-.1-.2-.1 0-.1-.1-.2V40.6q0-.1-.1-.1 0-.1-.1-.2 0-.1-.1-.1h-.2l-18.9-.1h-.2q0 .1-.1.1-.1.1-.1.2zM554 25.3l-12.3.1h-.2l-.1-.1q-.1-.1-.1-.2l-.1-.1-.2-2.5q0-.5.5-.5h29.2q1.5 0 1 1.4-.2.5-.1 1 .3.9-.6.9h-12q-.2 0-.3.1-.1 0-.2.1t-.2.3v.2l-.1 28.6q0 .6-.6.6h-2.3q-.1 0-.2-.1-.1 0-.2-.1t-.1-.2q-.1-.1-.1-.2V26q0-.1-.1-.3 0-.1-.1-.2t-.2-.1q-.2-.1-.3-.1\"/><path fill-rule=\"evenodd\" d=\"M444.8 128.3h-33.9q-.1.1-.3.2l-.2.2q-.1.1-.2.3l-6.1 15.5q-.1.2-.2.3l-.2.2q-.2.1-.3.2h-15.1q0-.1-.1-.1 0-.1-.1-.2 0-.1.1-.2 13.6-32.6 27.7-65.9c2.9-7 8.8-7.7 15.4-7 6.8.7 8.3 5.4 11.1 11.9q12.7 30 25.6 60.7v.3q0 .2-.1.3l-.2.2h-14.5q-.1 0-.3-.1-.1 0-.3-.1l-.2-.2q-.1-.1-.2-.3l-6.5-15.7q0-.1-.1-.2l-.2-.2q-.1-.1-.3-.1-.1-.1-.3-.1zm-29.7-12q-.1.2-.1.4t.1.3l.3.3q.2.1.4.1h24.6q.2 0 .3-.1.2-.1.3-.3.1-.1.2-.3 0-.2-.1-.4l-12.3-30.6q-.1-.2-.3-.3t-.4-.1q-.3 0-.5.1t-.2.3z\"/><path d=\"M314.4 94.6q-.2-.1-.4 0-.1 0-.3.1l-.2.2q-.1.1-.2.3-6.9 24.3-11.9 42.1-2.1 7.3-9.3 8.7c-6 1.2-13.2.4-16.5-5.4q-1.8-3-2.7-6.3-8.7-30.2-17.5-60.6v-.3q0-.1.1-.3.1-.1.2-.1.1-.1.3-.1h17.8q.5 0 .6.5 6 23.1 13 49.2.2 1 .8 1.7.2.3.4.4.3.1.5 0 .3 0 .5-.2t.3-.4q6-21.2 12.5-44.2 1.6-5.8 7.3-7.2c4.7-1.2 11.1-.7 14.3 3.2q1.4 1.7 2.7 6.4 5.8 20.7 11.7 41.5v.1q0 .1.1.2l.1.1q.1 0 .1.1 1.5 1 2-.8 6.2-22.8 13.3-50.1 0-.1.1-.2l.2-.2q.1-.1.2-.1h18.2q.2.1.3.2 0 .1.1.3v.3q-7.9 26.3-16.2 55.8c-3.1 10.9-5.5 18.2-18.9 16.8q-8.8-1-11.1-9.2-5.7-20.3-11.8-41.8-.2-.6-.7-.7m203.9 42.2h.7q.3 0 .6-.2t.5-.4q.3-.3.4-.6 11.9-31.5 23.7-62.5V73q.1 0 .1-.1h.2l10.2-.1q.1 0 .1.1h.1v.1q-13.5 33.9-27 67.3-2.8 6.9-10.4 5.9-5.4-.6-7.4-5.7-13.6-33.7-26.9-67.4-.1 0-.1-.1h.1v-.1h.1l10.2-.1h.1q0 .1.1.1l.1.1v.1q11.7 31 23.4 62.2.5 1.3 1.1 1.5m70-30.7 43.9.1q1.3 0 1.3 1.3v1.5q0 1.2-1.1 1.2h-44.1q-.8 0-.8.8v25.4q0 4.7 4.6 4.7 19.4 0 42 .1.4 0 .5.4.2 1.4-.1 2.9-.1.6-.6.6-28.2.1-42.7 0-8.5-.1-8.4-9.1.1-25.2-.1-50c-.1-6.9.2-13 8.5-13q22.3-.1 42.3-.1.8 0 .8.8v2.8l-.2.2-.2.2h-.3l-41.8.1q-4.3 0-4.3 4.3v24q0 .8.8.8\"/>",
|
|
@@ -16685,8 +16685,7 @@ var uw = class {
|
|
|
16685
16685
|
lw.default;
|
|
16686
16686
|
//#endregion
|
|
16687
16687
|
//#region ../../packages/composable/src/chatbot/useChatbotStore.ts
|
|
16688
|
-
|
|
16689
|
-
function pw(e) {
|
|
16688
|
+
function fw(e) {
|
|
16690
16689
|
return Wt(`chatbot-${e}`, () => {
|
|
16691
16690
|
let { t, te: n, locale: r } = bC({ useScope: "global" }), i = O(""), a = O(), o = O(e), s = O(), c = O(), l = O(), u = O(), d = O(), f = O(), p = O(), m = O(), h = O(), g = O(), v = O(), y = O(), b = O(), x = E(() => c.value === "reasoning"), S = E(() => x.value ? g.value?.filter((e) => ![
|
|
16692
16691
|
"upvote",
|
|
@@ -16752,12 +16751,7 @@ function pw(e) {
|
|
|
16752
16751
|
onToolCall: ({ toolCall: e }) => {
|
|
16753
16752
|
Ze.log("Tool call:", e);
|
|
16754
16753
|
},
|
|
16755
|
-
sendAutomaticallyWhen:
|
|
16756
|
-
let t = e[e.length - 1];
|
|
16757
|
-
if (!t || t.role !== "assistant") return !1;
|
|
16758
|
-
let n = t.parts.filter((e) => "state" in e && fw.has(e.type.slice(5)));
|
|
16759
|
-
return n.length === 0 ? By({ messages: e }) : n.every((e) => e.state === "output-available" || e.state === "output-error");
|
|
16760
|
-
},
|
|
16754
|
+
sendAutomaticallyWhen: By,
|
|
16761
16755
|
onError: re
|
|
16762
16756
|
})), oe = E(() => {
|
|
16763
16757
|
let e = u.value?.initialMessage;
|
|
@@ -17018,7 +17012,7 @@ function pw(e) {
|
|
|
17018
17012
|
}
|
|
17019
17013
|
//#endregion
|
|
17020
17014
|
//#region ../../packages/composable/src/useTime.ts
|
|
17021
|
-
var
|
|
17015
|
+
var pw = () => {
|
|
17022
17016
|
let { t: e } = bC({ useScope: "global" }), t = (t) => {
|
|
17023
17017
|
if (!t) return {
|
|
17024
17018
|
value: 0,
|
|
@@ -17049,32 +17043,32 @@ var mw = () => {
|
|
|
17049
17043
|
};
|
|
17050
17044
|
//#endregion
|
|
17051
17045
|
//#region ../../packages/components/src/chat/utils.ts
|
|
17052
|
-
function
|
|
17046
|
+
function mw(e) {
|
|
17053
17047
|
return e && "state" in e ? e.state === "streaming" || e.state === "input-streaming" : !1;
|
|
17054
17048
|
}
|
|
17055
|
-
function
|
|
17049
|
+
function hw(e) {
|
|
17056
17050
|
if (e && "state" in e) return e.state;
|
|
17057
17051
|
}
|
|
17058
|
-
function
|
|
17052
|
+
function gw(e = "000000") {
|
|
17059
17053
|
let t = e.replace("#", "");
|
|
17060
17054
|
t.length === 3 && (t = t.split("").map((e) => e + e).join(""));
|
|
17061
17055
|
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;
|
|
17062
17056
|
return .2126 * a(n) + .7152 * a(r) + .0722 * a(i) > .179 ? "black" : "white";
|
|
17063
17057
|
}
|
|
17064
|
-
function
|
|
17065
|
-
return e === "white" || e === "black" ? e :
|
|
17058
|
+
function _w(e, t) {
|
|
17059
|
+
return e === "white" || e === "black" ? e : gw(t);
|
|
17066
17060
|
}
|
|
17067
|
-
function
|
|
17061
|
+
function vw(e) {
|
|
17068
17062
|
if (ot(e)) return e.type.includes("tool-subagent") ? "ri:robot-2-line" : e.type.includes("tool-mcp") ? "octicon:mcp-16" : e.type === "tool-retrieveRevisedAnswers" ? "ri:file-edit-line" : e.type === "tool-searchInKnowledgeBase" ? "ri:search-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-showSuggestedReply" ? "ri:corner-down-right-line" : e.type === "tool-requestGeolocation" ? "ri:map-pin-user-line" : "ri:tools-line";
|
|
17069
17063
|
if (Ye(e)) return "ri:lightbulb-line";
|
|
17070
17064
|
if ($e(e)) return "ri:double-quotes-r";
|
|
17071
17065
|
}
|
|
17072
|
-
function
|
|
17066
|
+
function yw(e, t) {
|
|
17073
17067
|
return ot(t) ? t.type === "tool-retrieveRevisedAnswers" ? e("messagePart.revisedAnswers") : t.type === "tool-searchInKnowledgeBase" ? e("messagePart.searchingDocuments") : 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-showSuggestedReply" ? e("messagePart.showSuggestedReply") : t.type === "tool-requestGeolocation" ? e("messagePart.requestGeolocation") : e("messagePart.tool") : Ye(t) ? e("messagePart.reasoning") : e("messagePart.streaming");
|
|
17074
17068
|
}
|
|
17075
17069
|
//#endregion
|
|
17076
17070
|
//#region src/composables/useChatbotAgent.ts
|
|
17077
|
-
function
|
|
17071
|
+
function bw(e) {
|
|
17078
17072
|
let t = O();
|
|
17079
17073
|
T([() => ke(e.organizationSlug), () => ke(e.agentId)], async ([n, r]) => {
|
|
17080
17074
|
if (!n || !r) return;
|
|
@@ -17089,7 +17083,7 @@ function xw(e) {
|
|
|
17089
17083
|
t.value = void 0;
|
|
17090
17084
|
}
|
|
17091
17085
|
}, { immediate: !0 });
|
|
17092
|
-
let n = E(() =>
|
|
17086
|
+
let n = E(() => _w(t.value?.interface.textColor, t.value?.interface.mainColor)), r = E(() => t.value?.interface.mainColor);
|
|
17093
17087
|
return {
|
|
17094
17088
|
agent: t,
|
|
17095
17089
|
contrastColor: n,
|
|
@@ -17106,7 +17100,7 @@ function xw(e) {
|
|
|
17106
17100
|
}
|
|
17107
17101
|
//#endregion
|
|
17108
17102
|
//#region src/composables/useFocusTrapBypass.ts
|
|
17109
|
-
function
|
|
17103
|
+
function xw() {
|
|
17110
17104
|
let e = null, t = (e) => {
|
|
17111
17105
|
e.stopPropagation();
|
|
17112
17106
|
};
|
|
@@ -17119,7 +17113,7 @@ function Sw() {
|
|
|
17119
17113
|
}
|
|
17120
17114
|
//#endregion
|
|
17121
17115
|
//#region ../../packages/components/src/chat/PkAvatar.vue
|
|
17122
|
-
var
|
|
17116
|
+
var Sw = /* @__PURE__ */ o({
|
|
17123
17117
|
__name: "PkAvatar",
|
|
17124
17118
|
props: {
|
|
17125
17119
|
name: { type: String },
|
|
@@ -17143,11 +17137,11 @@ var Cw = /* @__PURE__ */ o({
|
|
|
17143
17137
|
});
|
|
17144
17138
|
//#endregion
|
|
17145
17139
|
//#region ../../packages/components/src/composables/useChatbotError.ts
|
|
17146
|
-
function
|
|
17140
|
+
function Cw(e, t) {
|
|
17147
17141
|
return e?.message?.toLowerCase().includes(t) ?? !1;
|
|
17148
17142
|
}
|
|
17149
|
-
function
|
|
17150
|
-
let t = E(() =>
|
|
17143
|
+
function ww(e) {
|
|
17144
|
+
let t = E(() => Cw(ke(e), "context_length_exceeded")), n = E(() => Cw(ke(e), "entity-not-found")), r = E(() => Cw(ke(e), "rate-limit-exceeded")), i = E(() => Cw(ke(e), "origin-not-allowed")), a = E(() => Cw(ke(e), "credit-exhausted")), o = E(() => Cw(ke(e), "conversation-blocked")), s = E(() => Cw(ke(e), "bad request")), c = E(() => Cw(ke(e), "internal-server-error"));
|
|
17151
17145
|
return {
|
|
17152
17146
|
isContextWindowError: t,
|
|
17153
17147
|
isNotFoundError: n,
|
|
@@ -17162,12 +17156,12 @@ function Tw(e) {
|
|
|
17162
17156
|
}
|
|
17163
17157
|
//#endregion
|
|
17164
17158
|
//#region ../../packages/components/src/chat/PkChatbotError.vue?vue&type=script&setup=true&lang.ts
|
|
17165
|
-
var
|
|
17159
|
+
var Tw = { class: "flex" }, Ew = /* @__PURE__ */ o({
|
|
17166
17160
|
__name: "PkChatbotError",
|
|
17167
17161
|
props: { error: { type: Error } },
|
|
17168
17162
|
emits: ["retry", "reset"],
|
|
17169
17163
|
setup(t, { emit: n }) {
|
|
17170
|
-
let a = t, o = n, { t: s } = Ae({ useScope: "global" }), { isContextWindowError: l, isNotFoundError: u, isRateLimitError: f, isOriginNotAllowedError: p, isCreditExhaustedError: m, isConversationBlockedError: h, isBadRequestError: g, isInternalServerError: _, isRefreshableError: v } =
|
|
17164
|
+
let a = t, o = n, { t: s } = Ae({ useScope: "global" }), { isContextWindowError: l, isNotFoundError: u, isRateLimitError: f, isOriginNotAllowedError: p, isCreditExhaustedError: m, isConversationBlockedError: h, isBadRequestError: g, isInternalServerError: _, isRefreshableError: v } = ww(() => a.error), y = E(() => l.value ? s("message.chatErrorContextWindow") : u.value ? s("message.chatErrorNotFound") : f.value ? s("message.chatErrorRateLimit", { seconds: b.value }) : p.value ? s("message.chatErrorOriginNotAllowed") : m.value ? s("message.chatErrorCreditExhausted") : h.value ? s("message.chatErrorConversationBlocked") : g.value ? s("message.chatErrorBadRequest") : _.value ? s("message.chatErrorInternalServer") : s("message.chatErrorGeneric", { seconds: b.value })), b = O(0), x = O();
|
|
17171
17165
|
return T(() => a.error, (e) => {
|
|
17172
17166
|
if (x.value && clearTimeout(x.value), e && v.value) {
|
|
17173
17167
|
b.value = 10;
|
|
@@ -17184,7 +17178,7 @@ var Ew = { class: "flex" }, Dw = /* @__PURE__ */ o({
|
|
|
17184
17178
|
x.value && clearTimeout(x.value);
|
|
17185
17179
|
}), (t, n) => {
|
|
17186
17180
|
let a = Ue, o = Ge, l = He;
|
|
17187
|
-
return P(), j("div",
|
|
17181
|
+
return P(), j("div", Tw, [A(l, {
|
|
17188
17182
|
modifiers: N(v) ? "warning" : "danger",
|
|
17189
17183
|
class: "rounded-lg"
|
|
17190
17184
|
}, {
|
|
@@ -17210,76 +17204,76 @@ var Ew = { class: "flex" }, Dw = /* @__PURE__ */ o({
|
|
|
17210
17204
|
}, 8, ["modifiers"])]);
|
|
17211
17205
|
};
|
|
17212
17206
|
}
|
|
17213
|
-
}), $ = /* @__PURE__ */ ((e) => (e.text = "text", e.number = "number", e.email = "email", e.password = "password", e.tel = "tel", e.url = "url", e.search = "search", e.date = "date", e.time = "time", e.datetimeLocal = "datetime-local", e.month = "month", e.week = "week", e.color = "color", e.select = "select", e.checkbox = "checkbox", e.radio = "radio", e.textarea = "textarea", e.radioGroup = "radioGroup", e.checkboxGroup = "checkboxGroup", e.combobox = "combobox", e.custom = "custom", e))($ || {}),
|
|
17214
|
-
function
|
|
17207
|
+
}), $ = /* @__PURE__ */ ((e) => (e.text = "text", e.number = "number", e.email = "email", e.password = "password", e.tel = "tel", e.url = "url", e.search = "search", e.date = "date", e.time = "time", e.datetimeLocal = "datetime-local", e.month = "month", e.week = "week", e.color = "color", e.select = "select", e.checkbox = "checkbox", e.radio = "radio", e.textarea = "textarea", e.radioGroup = "radioGroup", e.checkboxGroup = "checkboxGroup", e.combobox = "combobox", e.custom = "custom", e))($ || {}), Dw = /* @__PURE__ */ ((e) => (e.invalid = "invalid", e.valid = "valid", e.submitting = "submitting", e.reset = "reset", e.updated = "updated", e.unknown = "unknown", e))(Dw || {}), Ow = (e) => e._def.typeName === "ZodObject", kw = (e) => e._zod.def.type === "object", Aw = (e) => e._def.typeName === "ZodDefault", jw = (e) => e._zod.def.type === "default", Mw = (e) => e._def.typeName === "ZodNullable", Nw = (e) => e._zod.def.type === "nullable", Pw = (e) => e._def.typeName === "ZodRecord", Fw = (e) => e._zod.def.type === "record", Iw = (e) => e._def.typeName === "ZodArray", Lw = (e) => e._zod.def.type === "array", Rw = (e) => e._def.typeName === "ZodEffects", zw = (e) => e._def.typeName === "ZodOptional", Bw = (e) => e._zod.def.type === "optional", Vw = (e) => e._zod.def.type === "pipe", Hw = (e) => e._zod.def.type === "transform";
|
|
17208
|
+
function Uw(e) {
|
|
17215
17209
|
let t = e;
|
|
17216
|
-
for (;
|
|
17210
|
+
for (; Rw(t);) t = t.innerType();
|
|
17217
17211
|
return t;
|
|
17218
17212
|
}
|
|
17219
|
-
function
|
|
17213
|
+
function Ww(e) {
|
|
17220
17214
|
let t = e;
|
|
17221
|
-
for (;
|
|
17215
|
+
for (; Vw(t);) t = Hw(t._zod.def.out) ? t._zod.def.in : t._zod.def.out;
|
|
17222
17216
|
return t;
|
|
17223
17217
|
}
|
|
17224
|
-
var
|
|
17218
|
+
var Gw = (e) => {
|
|
17219
|
+
let t = Uw(e);
|
|
17220
|
+
return zw(t) && (t = t._def.innerType), t;
|
|
17221
|
+
}, Kw = (e) => {
|
|
17225
17222
|
let t = Ww(e);
|
|
17226
|
-
return Bw(t) && (t = t.
|
|
17227
|
-
}, qw = (e) =>
|
|
17228
|
-
|
|
17229
|
-
|
|
17230
|
-
|
|
17231
|
-
|
|
17232
|
-
if (Xw(e)) {
|
|
17233
|
-
let n = qw(e);
|
|
17234
|
-
return Aw(n) ? {
|
|
17223
|
+
return Bw(t) && (t = t._zod.def.innerType), t;
|
|
17224
|
+
}, qw = (e) => !!zw(Uw(e)), Jw = (e) => !!Bw(Ww(e)), Yw = (e) => "_zod" in e;
|
|
17225
|
+
function Xw(e, t = {}) {
|
|
17226
|
+
if (Yw(e)) {
|
|
17227
|
+
let n = Kw(e);
|
|
17228
|
+
return kw(n) ? {
|
|
17235
17229
|
...n._zod.def.catchall && n._zod.def.catchall._zod.def.type !== "never" ? t : {},
|
|
17236
17230
|
...Object.fromEntries(("shape" in n._zod.def ? Object.entries(n._zod.def.shape) : []).map(([e, n]) => {
|
|
17237
|
-
let r = t[e], i =
|
|
17238
|
-
if (
|
|
17231
|
+
let r = t[e], i = Jw(n), a = Kw(n), o;
|
|
17232
|
+
if (jw(a) && (o = a._zod.def.defaultValue, a = a._zod.def.innerType), r === null && Nw(a)) return [e, r];
|
|
17239
17233
|
if (r == null && i) return [e, o];
|
|
17240
17234
|
if (a) {
|
|
17241
17235
|
let t = $s(n, r);
|
|
17242
17236
|
if (t.success) return [e, t.data ?? o];
|
|
17243
17237
|
}
|
|
17244
|
-
if (
|
|
17245
|
-
let t =
|
|
17246
|
-
if (
|
|
17238
|
+
if (Lw(a) && Array.isArray(r) && r.length) {
|
|
17239
|
+
let t = Kw(a._zod.def.element);
|
|
17240
|
+
if (kw(t)) return [e, r.map((e) => Xw(t, e && typeof e == "object" ? e : void 0))];
|
|
17247
17241
|
}
|
|
17248
|
-
if (
|
|
17249
|
-
let t =
|
|
17250
|
-
if (
|
|
17242
|
+
if (Fw(a) && r) {
|
|
17243
|
+
let t = Kw(a._zod.def.valueType);
|
|
17244
|
+
if (kw(t)) return [e, Object.keys(r).reduce((e, n) => (e[n] = Xw(t, r[n]), e), {})];
|
|
17251
17245
|
}
|
|
17252
|
-
return
|
|
17246
|
+
return kw(a) ? [e, Xw(a, r && typeof r == "object" ? r : o)] : [e, o];
|
|
17253
17247
|
}))
|
|
17254
17248
|
} : t;
|
|
17255
17249
|
}
|
|
17256
|
-
let n =
|
|
17257
|
-
return
|
|
17250
|
+
let n = Gw(e);
|
|
17251
|
+
return Ow(n) ? {
|
|
17258
17252
|
...n._def.unknownKeys === "passthrough" ? t : {},
|
|
17259
17253
|
...Object.fromEntries(("shape" in n ? Object.entries(n.shape) : []).map(([e, n]) => {
|
|
17260
|
-
let r = t[e], i =
|
|
17261
|
-
if (
|
|
17254
|
+
let r = t[e], i = qw(n), a = Gw(n), o;
|
|
17255
|
+
if (Aw(a) && (o = a._def.defaultValue(), a = a._def.innerType), r === null && Mw(a)) return [e, r];
|
|
17262
17256
|
if (r == null && i) return [e, o];
|
|
17263
17257
|
if (a) {
|
|
17264
17258
|
let t = n.safeParse(r);
|
|
17265
17259
|
if (t.success) return [e, t.data ?? o];
|
|
17266
17260
|
}
|
|
17267
|
-
if (
|
|
17268
|
-
let t =
|
|
17269
|
-
if (
|
|
17261
|
+
if (Iw(a) && Array.isArray(r) && r.length) {
|
|
17262
|
+
let t = Gw(a._def.type);
|
|
17263
|
+
if (Ow(t)) return [e, r.map((e) => Xw(t, e && typeof e == "object" ? e : void 0))];
|
|
17270
17264
|
}
|
|
17271
|
-
if (
|
|
17272
|
-
let t =
|
|
17273
|
-
if (
|
|
17265
|
+
if (Pw(a) && r) {
|
|
17266
|
+
let t = Gw(a._def.valueType);
|
|
17267
|
+
if (Ow(t)) return [e, Object.keys(r).reduce((e, n) => (e[n] = Xw(t, r[n]), e), {})];
|
|
17274
17268
|
}
|
|
17275
|
-
return
|
|
17269
|
+
return Ow(a) ? [e, Xw(a, r && typeof r == "object" ? r : o)] : [e, o];
|
|
17276
17270
|
}))
|
|
17277
17271
|
} : t;
|
|
17278
17272
|
}
|
|
17279
|
-
var
|
|
17280
|
-
function
|
|
17281
|
-
let s = O(), c = O(), l = E(() => c.value ===
|
|
17282
|
-
let n =
|
|
17273
|
+
var Zw = (e, t) => Yw(e) ? tc(e, t) : e.safeParseAsync(t), Qw = (e, t) => Yw(e) ? Ys(t) : t.format(), $w = (e, t) => Yw(e) ? Ys(new Ks(t)) : new Kh(t).format();
|
|
17274
|
+
function eT(e, t, r, i, a) {
|
|
17275
|
+
let s = O(), c = O(), l = E(() => c.value === Dw.invalid), u = O(), d = O(!1), f, m = (t) => {
|
|
17276
|
+
let n = Xw(e, t);
|
|
17283
17277
|
if (r?.class) {
|
|
17284
17278
|
let e = r.class;
|
|
17285
17279
|
return new e(n);
|
|
@@ -17287,19 +17281,19 @@ function tT(e, t, r, i, a) {
|
|
|
17287
17281
|
return n;
|
|
17288
17282
|
}, h = async (t = u.value, n) => {
|
|
17289
17283
|
if (f = n?.fields, d.value) return !0;
|
|
17290
|
-
let r = await
|
|
17284
|
+
let r = await Zw(e, t);
|
|
17291
17285
|
if (!r.success) {
|
|
17292
|
-
if (c.value =
|
|
17286
|
+
if (c.value = Dw.invalid, !f?.size) return s.value = Qw(e, r.error), !1;
|
|
17293
17287
|
let t = r.error.issues.filter((e) => f?.has(e.path.join(".")));
|
|
17294
|
-
return t.length ? (s.value =
|
|
17288
|
+
return t.length ? (s.value = $w(e, t), !1) : (s.value = void 0, !0);
|
|
17295
17289
|
}
|
|
17296
|
-
return s.value = void 0, c.value =
|
|
17290
|
+
return s.value = void 0, c.value = Dw.valid, u.value = m(r.data), !0;
|
|
17297
17291
|
}, g = () => {
|
|
17298
17292
|
s.value = void 0, c.value = void 0, f = void 0;
|
|
17299
17293
|
}, _ = () => {
|
|
17300
|
-
u.value = m(), g(), c.value =
|
|
17301
|
-
}, v = async (e) => d.value || !await h(void 0, e) ? !1 : (c.value =
|
|
17302
|
-
c.value =
|
|
17294
|
+
u.value = m(), g(), c.value = Dw.reset;
|
|
17295
|
+
}, v = async (e) => d.value || !await h(void 0, e) ? !1 : (c.value = Dw.submitting, !0), { ignoreUpdates: y, stop: b } = Ie(u, () => {
|
|
17296
|
+
c.value = Dw.updated;
|
|
17303
17297
|
}, {
|
|
17304
17298
|
deep: !0,
|
|
17305
17299
|
eventFilter: Le(r?.updateThrottle ?? 500)
|
|
@@ -17379,27 +17373,27 @@ function tT(e, t, r, i, a) {
|
|
|
17379
17373
|
u.value = typeof t?.clone == "function" ? t.clone() : JSON.parse(JSON.stringify(t));
|
|
17380
17374
|
}
|
|
17381
17375
|
}, { deep: !0 }), T(c, async (t) => {
|
|
17382
|
-
if (t ===
|
|
17376
|
+
if (t === Dw.invalid) {
|
|
17383
17377
|
let e = de(s.value);
|
|
17384
17378
|
i("invalid", e), r?.onInvalid?.(e);
|
|
17385
17379
|
return;
|
|
17386
17380
|
}
|
|
17387
|
-
if (t ===
|
|
17381
|
+
if (t === Dw.valid) {
|
|
17388
17382
|
let e = de(u.value);
|
|
17389
17383
|
i("valid", e), r?.onValid?.(e), i("update:modelValue", e), r?.onUpdate?.(e);
|
|
17390
17384
|
return;
|
|
17391
17385
|
}
|
|
17392
|
-
if (t ===
|
|
17386
|
+
if (t === Dw.submitting) {
|
|
17393
17387
|
let e = de(u.value);
|
|
17394
17388
|
i("submit", e), r?.onSubmit?.(e);
|
|
17395
17389
|
return;
|
|
17396
17390
|
}
|
|
17397
|
-
if (t ===
|
|
17391
|
+
if (t === Dw.reset) {
|
|
17398
17392
|
let e = de(u.value);
|
|
17399
17393
|
i("reset", e), r?.onReset?.(e);
|
|
17400
17394
|
return;
|
|
17401
17395
|
}
|
|
17402
|
-
if (t ===
|
|
17396
|
+
if (t === Dw.updated) {
|
|
17403
17397
|
if ((s.value || r?.continuousValidation || e.continuousValidation) && await h(void 0, {
|
|
17404
17398
|
superRefine: e.superRefine,
|
|
17405
17399
|
fields: f ?? new Set(e.validateFields)
|
|
@@ -17407,7 +17401,7 @@ function tT(e, t, r, i, a) {
|
|
|
17407
17401
|
let e = de(u.value);
|
|
17408
17402
|
i("update:modelValue", e), r?.onUpdate?.(e);
|
|
17409
17403
|
}
|
|
17410
|
-
c.value ===
|
|
17404
|
+
c.value === Dw.updated && (c.value = Dw.unknown);
|
|
17411
17405
|
}
|
|
17412
17406
|
}), p(() => {
|
|
17413
17407
|
e.readonly !== void 0 && (d.value = e.readonly);
|
|
@@ -17469,7 +17463,7 @@ function tT(e, t, r, i, a) {
|
|
|
17469
17463
|
})
|
|
17470
17464
|
};
|
|
17471
17465
|
}
|
|
17472
|
-
function
|
|
17466
|
+
function tT(e, t, r, i) {
|
|
17473
17467
|
return o({
|
|
17474
17468
|
name: "VvFormField",
|
|
17475
17469
|
props: {
|
|
@@ -17669,7 +17663,7 @@ function nT(e, t, r, i) {
|
|
|
17669
17663
|
}
|
|
17670
17664
|
});
|
|
17671
17665
|
}
|
|
17672
|
-
function
|
|
17666
|
+
function nT(e, t, r) {
|
|
17673
17667
|
return o({
|
|
17674
17668
|
name: "VvFormFieldsGroup",
|
|
17675
17669
|
props: {
|
|
@@ -17828,7 +17822,7 @@ function rT(e, t, r) {
|
|
|
17828
17822
|
}
|
|
17829
17823
|
});
|
|
17830
17824
|
}
|
|
17831
|
-
function
|
|
17825
|
+
function rT(e, t) {
|
|
17832
17826
|
return o({
|
|
17833
17827
|
name: "VvFormWrapper",
|
|
17834
17828
|
props: {
|
|
@@ -17933,7 +17927,7 @@ function iT(e, t) {
|
|
|
17933
17927
|
}
|
|
17934
17928
|
});
|
|
17935
17929
|
}
|
|
17936
|
-
function
|
|
17930
|
+
function iT(e, t) {
|
|
17937
17931
|
let n = o({
|
|
17938
17932
|
name: "VvFormTemplate",
|
|
17939
17933
|
props: {
|
|
@@ -17985,8 +17979,8 @@ function aT(e, t) {
|
|
|
17985
17979
|
});
|
|
17986
17980
|
return n;
|
|
17987
17981
|
}
|
|
17988
|
-
function
|
|
17989
|
-
let n = Symbol("formInjectionKey"), r = Symbol("formWrapperInjectionKey"), i = Symbol("formFieldInjectionKey"), a = Symbol("formFieldsGroupInjectionKey"), o =
|
|
17982
|
+
function aT(e, t = {}) {
|
|
17983
|
+
let n = Symbol("formInjectionKey"), r = Symbol("formWrapperInjectionKey"), i = Symbol("formFieldInjectionKey"), a = Symbol("formFieldsGroupInjectionKey"), o = rT(n, r), s = tT(n, r, i, t), c = nT(n, r, a), l = iT(n, s), u = /* @__PURE__ */ new Map(), { clear: d, errors: f, formData: p, ignoreUpdates: m, invalid: h, readonly: g, reset: _, status: v, stopUpdatesWatch: y, submit: b, validate: x, VvForm: S } = eT(e, n, t, l, u);
|
|
17990
17984
|
return {
|
|
17991
17985
|
clear: d,
|
|
17992
17986
|
errors: f,
|
|
@@ -18010,28 +18004,28 @@ function oT(e, t = {}) {
|
|
|
18010
18004
|
VvFormWrapper: o
|
|
18011
18005
|
};
|
|
18012
18006
|
}
|
|
18013
|
-
var
|
|
18014
|
-
function
|
|
18015
|
-
if (t.scope &&
|
|
18007
|
+
var oT = Symbol("pluginInjectionKey"), sT = /* @__PURE__ */ new Map();
|
|
18008
|
+
function cT(e, t = {}) {
|
|
18009
|
+
if (t.scope && sT.has(t.scope)) return sT.get(t.scope);
|
|
18016
18010
|
if (!a()) {
|
|
18017
|
-
let n =
|
|
18018
|
-
return t.scope &&
|
|
18011
|
+
let n = aT(e, t);
|
|
18012
|
+
return t.scope && sT.set(t.scope, n), n;
|
|
18019
18013
|
}
|
|
18020
|
-
let n =
|
|
18021
|
-
...me(
|
|
18014
|
+
let n = aT(e, {
|
|
18015
|
+
...me(oT, {}),
|
|
18022
18016
|
...t
|
|
18023
18017
|
});
|
|
18024
|
-
return t.scope &&
|
|
18018
|
+
return t.scope && sT.set(t.scope, n), n;
|
|
18025
18019
|
}
|
|
18026
18020
|
//#endregion
|
|
18027
18021
|
//#region ../../packages/components/src/chat/PkChatbotFeedbackForm.vue?vue&type=script&setup=true&lang.ts
|
|
18028
|
-
var
|
|
18022
|
+
var lT = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" }, uT = { class: "px-sm py-6 bg-surface-1 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8 min-h-40" }, dT = { class: "font-bold" }, fT = {
|
|
18029
18023
|
key: 0,
|
|
18030
18024
|
class: "p-sm"
|
|
18031
|
-
},
|
|
18025
|
+
}, pT = { class: "flex justify-end" }, mT = {
|
|
18032
18026
|
key: 1,
|
|
18033
18027
|
class: "p-sm"
|
|
18034
|
-
},
|
|
18028
|
+
}, hT = { class: "flex items-center gap-sm" }, gT = { class: "font-semibold block text-success" }, _T = { class: "text-word-3" }, vT = /* @__PURE__ */ o({
|
|
18035
18029
|
__name: "PkChatbotFeedbackForm",
|
|
18036
18030
|
props: {
|
|
18037
18031
|
submitted: { type: Boolean },
|
|
@@ -18040,17 +18034,17 @@ var uT = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
18040
18034
|
},
|
|
18041
18035
|
emits: ["submit", "close"],
|
|
18042
18036
|
setup(t, { emit: n }) {
|
|
18043
|
-
let { t: r } = Ae({ useScope: "global" }), i = n, { VvForm: a, VvFormField: o, formData: s } =
|
|
18037
|
+
let { t: r } = Ae({ useScope: "global" }), i = n, { VvForm: a, VvFormField: o, formData: s } = cT(B({ comment: R().min(1).default("") }), { lazyLoad: !0 }), l = (e) => {
|
|
18044
18038
|
i("submit", e.comment);
|
|
18045
18039
|
};
|
|
18046
18040
|
return (n, i) => {
|
|
18047
18041
|
let u = Ue, d = Ge, f = He, p = We;
|
|
18048
|
-
return P(), j("div",
|
|
18042
|
+
return P(), j("div", lT, [k("div", uT, [
|
|
18049
18043
|
A(u, {
|
|
18050
18044
|
name: "ri:feedback-line",
|
|
18051
18045
|
class: "text-16"
|
|
18052
18046
|
}),
|
|
18053
|
-
k("strong",
|
|
18047
|
+
k("strong", dT, c(N(r)("action.feedback")), 1),
|
|
18054
18048
|
A(d, {
|
|
18055
18049
|
icon: "ri:close-line",
|
|
18056
18050
|
modifiers: "action-quiet-small",
|
|
@@ -18059,10 +18053,10 @@ var uT = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
18059
18053
|
onClick: i[0] ||= _e((e) => n.$emit("close"), ["stop"])
|
|
18060
18054
|
}, null, 8, ["title"])
|
|
18061
18055
|
]), A(ye, { mode: "out-in" }, {
|
|
18062
|
-
default: e(() => [t.submitted ? (P(), j("div",
|
|
18056
|
+
default: e(() => [t.submitted ? (P(), j("div", mT, [k("div", hT, [A(u, {
|
|
18063
18057
|
name: "ri:checkbox-circle-line",
|
|
18064
18058
|
class: "text-24 text-success"
|
|
18065
|
-
}), k("div", null, [k("strong",
|
|
18059
|
+
}), k("div", null, [k("strong", gT, c(N(r)("message.feedbackSubmittedTitle")), 1), k("p", _T, c(N(r)("message.feedbackSubmittedMessage")), 1)])])])) : (P(), j("div", fT, [t.error ? (P(), M(f, {
|
|
18066
18060
|
key: 0,
|
|
18067
18061
|
modifiers: "danger",
|
|
18068
18062
|
class: "mb-sm",
|
|
@@ -18080,7 +18074,7 @@ var uT = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
18080
18074
|
placeholder: N(r)("placeholder.comment"),
|
|
18081
18075
|
modifiers: "compact no-label",
|
|
18082
18076
|
class: "mb-sm"
|
|
18083
|
-
}, null, 8, ["label", "placeholder"]), k("div",
|
|
18077
|
+
}, null, 8, ["label", "placeholder"]), k("div", pT, [A(p, null, {
|
|
18084
18078
|
default: e(() => [A(d, {
|
|
18085
18079
|
type: "button",
|
|
18086
18080
|
modifiers: "secondary",
|
|
@@ -18105,16 +18099,16 @@ var uT = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
18105
18099
|
})]);
|
|
18106
18100
|
};
|
|
18107
18101
|
}
|
|
18108
|
-
}),
|
|
18102
|
+
}), yT = { class: "pk-chatbot-file-preview" }, bT = [
|
|
18109
18103
|
"href",
|
|
18110
18104
|
"data-pswp-src",
|
|
18111
18105
|
"data-pswp-width",
|
|
18112
18106
|
"data-pswp-height",
|
|
18113
18107
|
"data-pswp-caption"
|
|
18114
|
-
],
|
|
18108
|
+
], xT = ["src", "alt"], ST = ["href"], CT = {
|
|
18115
18109
|
key: 2,
|
|
18116
18110
|
class: "pk-chatbot-file-preview__name"
|
|
18117
|
-
},
|
|
18111
|
+
}, wT = ["title"], TT = /* @__PURE__ */ ut(/* @__PURE__ */ o({
|
|
18118
18112
|
__name: "PkChatbotFilePreview",
|
|
18119
18113
|
props: {
|
|
18120
18114
|
mediaType: { type: String },
|
|
@@ -18134,7 +18128,7 @@ var uT = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
18134
18128
|
n.value && (i([{ url: t.url }]), await o());
|
|
18135
18129
|
}), (t, i) => {
|
|
18136
18130
|
let o = Ue;
|
|
18137
|
-
return P(), j("div",
|
|
18131
|
+
return P(), j("div", yT, [
|
|
18138
18132
|
n.value ? (P(), j("div", {
|
|
18139
18133
|
key: 0,
|
|
18140
18134
|
ref_key: "galleryRef",
|
|
@@ -18150,7 +18144,7 @@ var uT = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
18150
18144
|
src: e.url,
|
|
18151
18145
|
alt: e.filename,
|
|
18152
18146
|
class: "pk-chatbot-file-preview__thumb"
|
|
18153
|
-
}, null, 8,
|
|
18147
|
+
}, null, 8, xT)], 8, bT)], 512)) : (P(), j("a", {
|
|
18154
18148
|
key: 1,
|
|
18155
18149
|
href: e.url,
|
|
18156
18150
|
target: "_blank",
|
|
@@ -18159,8 +18153,8 @@ var uT = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
18159
18153
|
}, [A(o, {
|
|
18160
18154
|
name: "ri:file-line",
|
|
18161
18155
|
class: "pk-chatbot-file-preview__icon"
|
|
18162
|
-
})], 8,
|
|
18163
|
-
e.filename ? (P(), j("span",
|
|
18156
|
+
})], 8, ST)),
|
|
18157
|
+
e.filename ? (P(), j("span", CT, c(e.filename), 1)) : D("", !0),
|
|
18164
18158
|
e.loading ? (P(), M(o, {
|
|
18165
18159
|
key: 3,
|
|
18166
18160
|
name: "line-md:loading-loop",
|
|
@@ -18177,11 +18171,11 @@ var uT = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
18177
18171
|
class: "pk-chatbot-file-preview__remove",
|
|
18178
18172
|
title: t.$t("action.remove"),
|
|
18179
18173
|
onClick: i[0] ||= (e) => t.$emit("remove")
|
|
18180
|
-
}, [A(o, { name: "ri:close-line" })], 8,
|
|
18174
|
+
}, [A(o, { name: "ri:close-line" })], 8, wT)) : D("", !0)
|
|
18181
18175
|
]);
|
|
18182
18176
|
};
|
|
18183
18177
|
}
|
|
18184
|
-
}), [["styles", [".pk-chatbot-file-preview{align-items:center;gap:var(--spacing-4);max-width:160px;padding:var(--spacing-4) var(--spacing-xs);background-color:var(--color-surface-1);border:1px solid var(--color-surface-3);border-radius:var(--rounded-md);font-size:var(--text-12);color:var(--color-word-2);display:inline-flex}.pk-chatbot-file-preview__thumb-link{cursor:pointer;flex-shrink:0;display:flex}.pk-chatbot-file-preview__thumb{width:var(--spacing-20);height:var(--spacing-20);object-fit:cover;border-radius:var(--rounded-sm);flex-shrink:0}.pk-chatbot-file-preview__icon-link{color:inherit;flex-shrink:0;text-decoration:none;display:flex}.pk-chatbot-file-preview__icon{width:var(--spacing-16);height:var(--spacing-16);color:var(--color-word-3);flex-shrink:0}.pk-chatbot-file-preview__name{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.pk-chatbot-file-preview__loading,.pk-chatbot-file-preview__error{width:var(--spacing-14);height:var(--spacing-14);flex-shrink:0}.pk-chatbot-file-preview__error{color:var(--color-danger)}.pk-chatbot-file-preview__remove{cursor:pointer;color:var(--color-word-4);background:0 0;border:none;flex-shrink:0;align-items:center;padding:0;line-height:1;display:flex}.pk-chatbot-file-preview__remove:hover{color:var(--color-word-1)}"]]]),
|
|
18178
|
+
}), [["styles", [".pk-chatbot-file-preview{align-items:center;gap:var(--spacing-4);max-width:160px;padding:var(--spacing-4) var(--spacing-xs);background-color:var(--color-surface-1);border:1px solid var(--color-surface-3);border-radius:var(--rounded-md);font-size:var(--text-12);color:var(--color-word-2);display:inline-flex}.pk-chatbot-file-preview__thumb-link{cursor:pointer;flex-shrink:0;display:flex}.pk-chatbot-file-preview__thumb{width:var(--spacing-20);height:var(--spacing-20);object-fit:cover;border-radius:var(--rounded-sm);flex-shrink:0}.pk-chatbot-file-preview__icon-link{color:inherit;flex-shrink:0;text-decoration:none;display:flex}.pk-chatbot-file-preview__icon{width:var(--spacing-16);height:var(--spacing-16);color:var(--color-word-3);flex-shrink:0}.pk-chatbot-file-preview__name{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.pk-chatbot-file-preview__loading,.pk-chatbot-file-preview__error{width:var(--spacing-14);height:var(--spacing-14);flex-shrink:0}.pk-chatbot-file-preview__error{color:var(--color-danger)}.pk-chatbot-file-preview__remove{cursor:pointer;color:var(--color-word-4);background:0 0;border:none;flex-shrink:0;align-items:center;padding:0;line-height:1;display:flex}.pk-chatbot-file-preview__remove:hover{color:var(--color-word-1)}"]]]), ET = ["datetime"], DT = /* @__PURE__ */ o({
|
|
18185
18179
|
__name: "PkRelativeTime",
|
|
18186
18180
|
props: {
|
|
18187
18181
|
date: { type: [
|
|
@@ -18210,7 +18204,7 @@ var uT = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
18210
18204
|
let t = e, { t: n } = Ae({ useScope: "global" }), r = O(Date.now()), i = null, a = E(() => t.date instanceof Date ? t.date.getTime() : typeof t.date == "string" ? new Date(t.date).getTime() : t.date), o = E(() => t.endDate === void 0 ? null : t.endDate instanceof Date ? t.endDate.getTime() : typeof t.endDate == "string" ? new Date(t.endDate).getTime() : t.endDate), s = E(() => {
|
|
18211
18205
|
let e = o.value ?? r.value;
|
|
18212
18206
|
return a.value - e;
|
|
18213
|
-
}), l = E(() => s.value > 0), u = E(() => Math.abs(s.value)), { formatDelta: d } =
|
|
18207
|
+
}), l = E(() => s.value > 0), u = E(() => Math.abs(s.value)), { formatDelta: d } = pw(), f = E(() => {
|
|
18214
18208
|
let e = u.value;
|
|
18215
18209
|
return d(e);
|
|
18216
18210
|
}), m = E(() => {
|
|
@@ -18226,21 +18220,21 @@ var uT = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
18226
18220
|
t.autoUpdate && !t.endDate && (i = setTimeout(_, g()));
|
|
18227
18221
|
}), v(() => {
|
|
18228
18222
|
i && clearTimeout(i);
|
|
18229
|
-
}), (e, t) => (P(), j("time", { datetime: h.value }, c(m.value), 9,
|
|
18223
|
+
}), (e, t) => (P(), j("time", { datetime: h.value }, c(m.value), 9, ET));
|
|
18230
18224
|
}
|
|
18231
|
-
}),
|
|
18232
|
-
showArtifact: b(() => import("./_chunks/PkToolShowArtifact-
|
|
18225
|
+
}), OT = {
|
|
18226
|
+
showArtifact: b(() => import("./_chunks/PkToolShowArtifact-DzNIkKvZ.js")),
|
|
18233
18227
|
showEmail: b(() => import("./_chunks/PkToolShowEmail-BrBJY7Op.js")),
|
|
18234
18228
|
showMessage: b(() => import("./_chunks/PkToolShowMessage-D0hwYIlo.js")),
|
|
18235
18229
|
showWebPages: b(() => import("./_chunks/PkToolShowWebPages-CflGTyAq.js")),
|
|
18236
18230
|
showProductList: b(() => import("./_chunks/PkToolShowProductList-C-t2Q6vG.js")),
|
|
18237
18231
|
showCalendarEvent: b(() => import("./_chunks/PkToolShowCalendarEvent-Dolb7MTf.js")),
|
|
18238
18232
|
showComparison: b(() => import("./_chunks/PkToolShowComparison-BWwQPM6d.js")),
|
|
18239
|
-
showLocation: b(() => import("./_chunks/PkToolShowLocation-
|
|
18233
|
+
showLocation: b(() => import("./_chunks/PkToolShowLocation-BsBiA4jV.js")),
|
|
18240
18234
|
showQrCode: b(() => import("./_chunks/PkToolShowQrCode-pX-2NQ0q.js")),
|
|
18241
18235
|
showImageGallery: b(() => import("./_chunks/PkToolShowImageGallery-dnCkJaK8.js")),
|
|
18242
18236
|
showWeather: b(() => import("./_chunks/PkToolShowWeather-BlxQ4-di.js"))
|
|
18243
|
-
},
|
|
18237
|
+
}, kT = /* @__PURE__ */ o({
|
|
18244
18238
|
__name: "PkStreamingMarkdownAutoscroll",
|
|
18245
18239
|
props: {
|
|
18246
18240
|
markdown: { type: String },
|
|
@@ -18264,25 +18258,25 @@ var uT = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
18264
18258
|
class: r(e.innerClass)
|
|
18265
18259
|
}, null, 8, ["markdown", "class"])], 544));
|
|
18266
18260
|
}
|
|
18267
|
-
}),
|
|
18261
|
+
}), AT = { class: "pk-chatbot-messages__wrapper" }, jT = {
|
|
18268
18262
|
key: 0,
|
|
18269
18263
|
class: "pk-chatbot-divider"
|
|
18270
|
-
},
|
|
18264
|
+
}, MT = { class: "pk-chatbot-divider__label" }, NT = {
|
|
18271
18265
|
key: 0,
|
|
18272
18266
|
class: "pk-chatbot-message__text"
|
|
18273
|
-
},
|
|
18267
|
+
}, PT = {
|
|
18274
18268
|
key: 0,
|
|
18275
18269
|
class: "pk-chatbot-message__loading-info"
|
|
18276
|
-
},
|
|
18270
|
+
}, FT = { class: "flex gap-8 items-center" }, IT = { class: "font-mono rounded text-10" }, LT = { class: "flex gap-8 items-center" }, RT = {
|
|
18277
18271
|
key: 0,
|
|
18278
18272
|
class: "pk-chatbot-message__footer"
|
|
18279
|
-
},
|
|
18273
|
+
}, zT = {
|
|
18280
18274
|
key: 0,
|
|
18281
18275
|
class: "flex items-center gap-4 text-12 text-word-3"
|
|
18282
|
-
},
|
|
18276
|
+
}, BT = ["datetime"], VT = {
|
|
18283
18277
|
key: 2,
|
|
18284
18278
|
class: "flex items-center gap-4 text-12 text-word-3"
|
|
18285
|
-
},
|
|
18279
|
+
}, HT = /* @__PURE__ */ ut(/* @__PURE__ */ o({
|
|
18286
18280
|
__name: "PkChatbotMessages",
|
|
18287
18281
|
props: {
|
|
18288
18282
|
status: { type: String },
|
|
@@ -18319,7 +18313,7 @@ var uT = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
18319
18313
|
"reset-chat"
|
|
18320
18314
|
],
|
|
18321
18315
|
setup(t, { emit: n }) {
|
|
18322
|
-
let a = t, o = n, { t: d } = Ae({ useScope: "global" }), f = te(), m = ee("scrollEl"), h = O(), _ = O(0), v = O(!1), y = E(() =>
|
|
18316
|
+
let a = t, o = n, { t: d } = Ae({ useScope: "global" }), f = te(), m = ee("scrollEl"), h = O(), _ = O(0), v = O(!1), y = E(() => _w(a.textColor, a.mainColor)), b = () => {
|
|
18323
18317
|
if (!m.value) return;
|
|
18324
18318
|
let e = m.value.scrollTop;
|
|
18325
18319
|
e < _.value && (_.value - e < 50 && (v.value = !0), o("scroll-up")), e > _.value && (o("scroll-down"), e === m.value.scrollHeight - m.value.clientHeight && (v.value = !1)), _.value = e;
|
|
@@ -18351,10 +18345,10 @@ var uT = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
18351
18345
|
return e ? e.parts[e.parts.length - 1] : null;
|
|
18352
18346
|
}), se = E(() => a.status === "submitted" || a.status === "streaming"), ce = E(() => a.status === "error"), le = E(() => {
|
|
18353
18347
|
let e = oe.value;
|
|
18354
|
-
return
|
|
18348
|
+
return yw(d, e);
|
|
18355
18349
|
}), de = E(() => {
|
|
18356
18350
|
let e = oe.value;
|
|
18357
|
-
return
|
|
18351
|
+
return vw(e);
|
|
18358
18352
|
}), fe = (e) => a.messages?.findIndex((t) => t.id === e), pe = (e) => e === void 0 || !a.messages ? !1 : e === (a.messages?.length ?? 0) - 1, me = (e) => pe(e) && a.status === "ready" && a.actions?.includes("regenerate"), he = (e, t) => (pe(t) && a.status === "ready" || !pe(t)) && a.actions?.includes(e), ge = (e) => {
|
|
18359
18353
|
let t = e.parts[e.parts.length - 1];
|
|
18360
18354
|
return $e(t);
|
|
@@ -18388,19 +18382,19 @@ var uT = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
18388
18382
|
"--chatbot-contrast-color": y.value
|
|
18389
18383
|
}),
|
|
18390
18384
|
onScroll: b
|
|
18391
|
-
}, [k("div",
|
|
18392
|
-
(P(!0), j(ue, null, S(t.messages, (m, h) => (P(), j(ue, { key: m.id }, [h > 0 && m.role === "user" && xe(h) ? (P(), j("div",
|
|
18385
|
+
}, [k("div", AT, [
|
|
18386
|
+
(P(!0), j(ue, null, S(t.messages, (m, h) => (P(), j(ue, { key: m.id }, [h > 0 && m.role === "user" && xe(h) ? (P(), j("div", jT, [k("span", MT, c(n.$d(new Date(be(h)?.metadata?.createdAt ?? ""), "short")), 1)])) : D("", !0), k("div", {
|
|
18393
18387
|
ref_for: !0,
|
|
18394
18388
|
ref: "messagesEl",
|
|
18395
18389
|
class: r(["pk-chatbot-message", [`pk-chatbot-message--${m.role}`, { "pk-chatbot-message--loading": pe(h) && se.value && m.role === "assistant" }]]),
|
|
18396
18390
|
style: u({ minHeight: pe(h) && m.role === "assistant" && !ce.value ? `${ne.value}px` : void 0 })
|
|
18397
18391
|
}, [
|
|
18398
|
-
(P(!0), j(ue, null, S(m.parts, (e, r) => (P(), j(ue, { key: r }, [N($e)(e) ? (P(), j("div",
|
|
18392
|
+
(P(!0), j(ue, null, S(m.parts, (e, r) => (P(), j(ue, { key: r }, [N($e)(e) ? (P(), j("div", NT, [m.role === "assistant" ? (P(), M(st, {
|
|
18399
18393
|
key: 0,
|
|
18400
18394
|
class: "wysiwyg",
|
|
18401
18395
|
markdown: e.text,
|
|
18402
18396
|
loading: h === (t.messages?.length ?? 0) - 1 && t.status === "streaming"
|
|
18403
|
-
}, null, 8, ["markdown", "loading"])) : (P(), j(ue, { key: 1 }, [i(c(e.text), 1)], 64))])) : N(it)(e) ? (P(), M(
|
|
18397
|
+
}, null, 8, ["markdown", "loading"])) : (P(), j(ue, { key: 1 }, [i(c(e.text), 1)], 64))])) : N(it)(e) ? (P(), M(TT, {
|
|
18404
18398
|
key: 1,
|
|
18405
18399
|
"media-type": e.mediaType,
|
|
18406
18400
|
url: e.url,
|
|
@@ -18409,24 +18403,24 @@ var uT = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
18409
18403
|
"media-type",
|
|
18410
18404
|
"url",
|
|
18411
18405
|
"filename"
|
|
18412
|
-
])) : N(ot)(e) && !N(
|
|
18413
|
-
key: `component-${r}-${N(
|
|
18406
|
+
])) : N(ot)(e) && !N(mw)(e) ? (P(), j(ue, { key: 2 }, [!N(f)[e.type] && N(OT)[N(tt)(e)] ? (P(), M(w(N(OT)[N(tt)(e)]), {
|
|
18407
|
+
key: `component-${r}-${N(hw)(e)}`,
|
|
18414
18408
|
part: e
|
|
18415
|
-
}, null, 8, ["part"])) : l(n.$slots, e.type, g({ key: `slot-${r}-${N(
|
|
18409
|
+
}, null, 8, ["part"])) : l(n.$slots, e.type, g({ key: `slot-${r}-${N(hw)(e)}` }, { ref_for: !0 }, {
|
|
18416
18410
|
message: m,
|
|
18417
18411
|
part: e,
|
|
18418
18412
|
index: h,
|
|
18419
18413
|
isLoading: se.value
|
|
18420
|
-
}), () => [t.showAllMessageParts ? (P(), j("div",
|
|
18414
|
+
}), () => [t.showAllMessageParts ? (P(), j("div", PT, [k("div", FT, [N(vw)(e) ? (P(), M(o, {
|
|
18421
18415
|
key: 0,
|
|
18422
|
-
name: N(
|
|
18416
|
+
name: N(vw)(e),
|
|
18423
18417
|
class: "shrink-0"
|
|
18424
|
-
}, null, 8, ["name"])) : D("", !0), k("code",
|
|
18418
|
+
}, null, 8, ["name"])) : D("", !0), k("code", IT, c(N(Qe)(e.type)), 1)])])) : D("", !0)])], 64)) : D("", !0)], 64))), 128)),
|
|
18425
18419
|
A(ye, { mode: "out-in" }, {
|
|
18426
18420
|
default: e(() => [se.value && pe(h) && !ge(m) && m.role === "assistant" ? (P(), j("div", {
|
|
18427
18421
|
key: `loading-info-${m.id}`,
|
|
18428
18422
|
class: "pk-chatbot-message__loading-info"
|
|
18429
|
-
}, [k("div",
|
|
18423
|
+
}, [k("div", LT, [
|
|
18430
18424
|
A(o, {
|
|
18431
18425
|
name: "line-md:loading-loop",
|
|
18432
18426
|
class: "shrink-0"
|
|
@@ -18447,7 +18441,7 @@ var uT = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
18447
18441
|
_: 1
|
|
18448
18442
|
})
|
|
18449
18443
|
]), A(ye, { mode: "out-in" }, {
|
|
18450
|
-
default: e(() => [oe.value && "text" in oe.value && oe.value.text.trim() ? (P(), M(
|
|
18444
|
+
default: e(() => [oe.value && "text" in oe.value && oe.value.text.trim() ? (P(), M(kT, {
|
|
18451
18445
|
key: 0,
|
|
18452
18446
|
markdown: oe.value.text,
|
|
18453
18447
|
"inner-class": "wysiwyg",
|
|
@@ -18458,7 +18452,7 @@ var uT = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
18458
18452
|
_: 2
|
|
18459
18453
|
}, 1024),
|
|
18460
18454
|
A(ye, { mode: "out-in" }, {
|
|
18461
|
-
default: e(() => [Se(m, h) ? (P(), j("div",
|
|
18455
|
+
default: e(() => [Se(m, h) ? (P(), j("div", RT, [
|
|
18462
18456
|
A(p, {
|
|
18463
18457
|
modifiers: "compact",
|
|
18464
18458
|
class: "mr-auto"
|
|
@@ -18545,13 +18539,13 @@ var uT = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
18545
18539
|
]),
|
|
18546
18540
|
_: 2
|
|
18547
18541
|
}, 1024),
|
|
18548
|
-
t.showMessageTokensCount && m.metadata?.totalTokens ? (P(), j("span",
|
|
18542
|
+
t.showMessageTokensCount && m.metadata?.totalTokens ? (P(), j("span", zT, [A(o, { name: "ri:ai-generate-2-line" }), i(" " + c(n.$n(m.metadata.totalTokens, "integer")) + " " + c(N(d)("label.tokens")), 1)])) : D("", !0),
|
|
18549
18543
|
t.showMessageDateTime && m.metadata?.createdAt ? (P(), j("time", {
|
|
18550
18544
|
key: 1,
|
|
18551
18545
|
datetime: new Date(m.metadata?.createdAt).toISOString(),
|
|
18552
18546
|
class: "flex items-center gap-4 text-12 text-word-3"
|
|
18553
|
-
}, [A(o, { name: "ri:time-line" }), i(" " + c(n.$d(new Date(m.metadata?.createdAt), "date-time")), 1)], 8,
|
|
18554
|
-
t.showMessageDateTime && m?.metadata?.completedAt && m?.metadata?.createdAt ? (P(), j("div",
|
|
18547
|
+
}, [A(o, { name: "ri:time-line" }), i(" " + c(n.$d(new Date(m.metadata?.createdAt), "date-time")), 1)], 8, BT)) : D("", !0),
|
|
18548
|
+
t.showMessageDateTime && m?.metadata?.completedAt && m?.metadata?.createdAt ? (P(), j("div", VT, [A(o, { name: "ri:hourglass-line" }), A(DT, {
|
|
18555
18549
|
date: m.metadata?.createdAt,
|
|
18556
18550
|
"end-date": m.metadata?.completedAt
|
|
18557
18551
|
}, null, 8, ["date", "end-date"])])) : D("", !0)
|
|
@@ -18559,7 +18553,7 @@ var uT = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
18559
18553
|
_: 2
|
|
18560
18554
|
}, 1024),
|
|
18561
18555
|
A(ye, { mode: "out-in" }, {
|
|
18562
|
-
default: e(() => [m.id === t.feedbackMessageId ? (P(), M(
|
|
18556
|
+
default: e(() => [m.id === t.feedbackMessageId ? (P(), M(vT, {
|
|
18563
18557
|
key: 0,
|
|
18564
18558
|
ref_for: !0,
|
|
18565
18559
|
ref_key: "feedbackMessageEl",
|
|
@@ -18577,7 +18571,7 @@ var uT = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
18577
18571
|
_: 2
|
|
18578
18572
|
}, 1024)
|
|
18579
18573
|
], 6)], 64))), 128)),
|
|
18580
|
-
ce.value ? (P(), M(
|
|
18574
|
+
ce.value ? (P(), M(Ew, {
|
|
18581
18575
|
key: 0,
|
|
18582
18576
|
error: t.error,
|
|
18583
18577
|
onRetry: a[3] ||= (e) => n.$emit("auto-retry"),
|
|
@@ -18590,26 +18584,26 @@ var uT = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
18590
18584
|
])], 36);
|
|
18591
18585
|
};
|
|
18592
18586
|
}
|
|
18593
|
-
}), [["styles", [".pk-chatbot-messages{min-width:0;font-size:var(--spacing-14);scrollbar-width:thin;scrollbar-gutter:auto;scrollbar-color:var(--color-word-5) var(--color-surface-1);flex:1;overflow-y:auto}.pk-chatbot-messages__wrapper{gap:var(--spacing-16);flex-direction:column;min-width:0;display:flex}.pk-chatbot-messages__divider{border-bottom:1px solid var(--color-surface-3)}.pk-chatbot-divider{border-bottom:1px solid var(--color-surface-3);position:relative}.pk-chatbot-divider__label{padding-inline:var(--spacing-8);background-color:var(--color-surface);color:var(--color-word-4);font-size:var(--text-12);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.pk-chatbot-message{gap:var(--spacing-sm);flex-direction:column;align-items:flex-start;min-width:0;display:flex}.pk-chatbot-message__text{color:var(--color-word-2);line-height:var(--leading-normal);border-width:var(--spacing-px);border-color:var(--color-surface-3);padding:var(--spacing-sm);border-radius:var(--rounded-xl) var(--rounded-xl) var(--rounded-xl) 0}.pk-chatbot-message__loading-info{line-height:var(--leading-normal);border-width:var(--spacing-px);border-color:var(--color-surface-3);padding:var(--spacing-sm);border-radius:var(--rounded-xl) var(--rounded-xl) var(--rounded-xl) 0;font-size:var(--text-12);color:var(--color-word-3)}.pk-chatbot-message__footer{gap:var(--spacing-8);align-items:center;width:100%;display:flex}.pk-chatbot-message--user{align-items:flex-end}.pk-chatbot-message--user .pk-chatbot-message__text{background-color:var(--chatbot-main-color,var(--color-surface-1));border-width:var(--spacing-px);border-color:var(--chatbot-main-color,var(--color-surface-4));color:var(--chatbot-contrast-color,var(--color-word-1));border-radius:var(--rounded-xl) var(--rounded-xl) 0 var(--rounded-xl)}.pk-chatbot-message--assistant{gap:var(--spacing-16);flex-direction:column;width:100%;min-width:0;display:flex;overflow:hidden}.pk-chatbot-message--assistant .pk-chatbot-message__text{width:100%}.pk-chatbot-message--system{align-items:flex-end}.pk-chatbot-message--system .pk-chatbot-message__text{gap:var(--spacing-8);font-size:var(--text-12);padding:var(--spacing-8) var(--spacing-sm);border-width:var(--spacing-px);border-color:var(--chatbot-main-color,var(--color-surface-4));color:var(--chatbot-main-color,var(--color-word-1));border-radius:var(--rounded-xl) var(--rounded-xl) 0 var(--rounded-xl);align-items:center;display:flex}"]]]),
|
|
18594
|
-
function
|
|
18595
|
-
var t =
|
|
18587
|
+
}), [["styles", [".pk-chatbot-messages{min-width:0;font-size:var(--spacing-14);scrollbar-width:thin;scrollbar-gutter:auto;scrollbar-color:var(--color-word-5) var(--color-surface-1);flex:1;overflow-y:auto}.pk-chatbot-messages__wrapper{gap:var(--spacing-16);flex-direction:column;min-width:0;display:flex}.pk-chatbot-messages__divider{border-bottom:1px solid var(--color-surface-3)}.pk-chatbot-divider{border-bottom:1px solid var(--color-surface-3);position:relative}.pk-chatbot-divider__label{padding-inline:var(--spacing-8);background-color:var(--color-surface);color:var(--color-word-4);font-size:var(--text-12);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.pk-chatbot-message{gap:var(--spacing-sm);flex-direction:column;align-items:flex-start;min-width:0;display:flex}.pk-chatbot-message__text{color:var(--color-word-2);line-height:var(--leading-normal);border-width:var(--spacing-px);border-color:var(--color-surface-3);padding:var(--spacing-sm);border-radius:var(--rounded-xl) var(--rounded-xl) var(--rounded-xl) 0}.pk-chatbot-message__loading-info{line-height:var(--leading-normal);border-width:var(--spacing-px);border-color:var(--color-surface-3);padding:var(--spacing-sm);border-radius:var(--rounded-xl) var(--rounded-xl) var(--rounded-xl) 0;font-size:var(--text-12);color:var(--color-word-3)}.pk-chatbot-message__footer{gap:var(--spacing-8);align-items:center;width:100%;display:flex}.pk-chatbot-message--user{align-items:flex-end}.pk-chatbot-message--user .pk-chatbot-message__text{background-color:var(--chatbot-main-color,var(--color-surface-1));border-width:var(--spacing-px);border-color:var(--chatbot-main-color,var(--color-surface-4));color:var(--chatbot-contrast-color,var(--color-word-1));border-radius:var(--rounded-xl) var(--rounded-xl) 0 var(--rounded-xl)}.pk-chatbot-message--assistant{gap:var(--spacing-16);flex-direction:column;width:100%;min-width:0;display:flex;overflow:hidden}.pk-chatbot-message--assistant .pk-chatbot-message__text{width:100%}.pk-chatbot-message--system{align-items:flex-end}.pk-chatbot-message--system .pk-chatbot-message__text{gap:var(--spacing-8);font-size:var(--text-12);padding:var(--spacing-8) var(--spacing-sm);border-width:var(--spacing-px);border-color:var(--chatbot-main-color,var(--color-surface-4));color:var(--chatbot-main-color,var(--color-word-1));border-radius:var(--rounded-xl) var(--rounded-xl) 0 var(--rounded-xl);align-items:center;display:flex}"]]]), UT = /* @__PURE__ */ new Map();
|
|
18588
|
+
function WT(e) {
|
|
18589
|
+
var t = UT.get(e);
|
|
18596
18590
|
t && t.destroy();
|
|
18597
18591
|
}
|
|
18598
|
-
function
|
|
18599
|
-
var t =
|
|
18592
|
+
function GT(e) {
|
|
18593
|
+
var t = UT.get(e);
|
|
18600
18594
|
t && t.update();
|
|
18601
18595
|
}
|
|
18602
|
-
var
|
|
18603
|
-
typeof window > "u" ? ((
|
|
18596
|
+
var KT = null;
|
|
18597
|
+
typeof window > "u" ? ((KT = function(e) {
|
|
18604
18598
|
return e;
|
|
18605
18599
|
}).destroy = function(e) {
|
|
18606
18600
|
return e;
|
|
18607
|
-
},
|
|
18601
|
+
}, KT.update = function(e) {
|
|
18608
18602
|
return e;
|
|
18609
|
-
}) : ((
|
|
18603
|
+
}) : ((KT = function(e, t) {
|
|
18610
18604
|
return e && Array.prototype.forEach.call(e.length ? e : [e], function(e) {
|
|
18611
18605
|
return function(e) {
|
|
18612
|
-
if (e && e.nodeName && e.nodeName === "TEXTAREA" && !
|
|
18606
|
+
if (e && e.nodeName && e.nodeName === "TEXTAREA" && !UT.has(e)) {
|
|
18613
18607
|
var t, n = null, r = window.getComputedStyle(e), i = (t = e.value, function() {
|
|
18614
18608
|
o({
|
|
18615
18609
|
testForHeightReduction: t === "" || !e.value.startsWith(t),
|
|
@@ -18618,7 +18612,7 @@ typeof window > "u" ? ((qT = function(e) {
|
|
|
18618
18612
|
}), a = function(t) {
|
|
18619
18613
|
e.removeEventListener("autosize:destroy", a), e.removeEventListener("autosize:update", s), e.removeEventListener("input", i), window.removeEventListener("resize", s), Object.keys(t).forEach(function(n) {
|
|
18620
18614
|
return e.style[n] = t[n];
|
|
18621
|
-
}),
|
|
18615
|
+
}), UT.delete(e);
|
|
18622
18616
|
}.bind(e, {
|
|
18623
18617
|
height: e.style.height,
|
|
18624
18618
|
resize: e.style.resize,
|
|
@@ -18627,7 +18621,7 @@ typeof window > "u" ? ((qT = function(e) {
|
|
|
18627
18621
|
overflowX: e.style.overflowX,
|
|
18628
18622
|
wordWrap: e.style.wordWrap
|
|
18629
18623
|
});
|
|
18630
|
-
e.addEventListener("autosize:destroy", a), e.addEventListener("autosize:update", s), e.addEventListener("input", i), window.addEventListener("resize", s), e.style.overflowX = "hidden", e.style.wordWrap = "break-word",
|
|
18624
|
+
e.addEventListener("autosize:destroy", a), e.addEventListener("autosize:update", s), e.addEventListener("input", i), window.addEventListener("resize", s), e.style.overflowX = "hidden", e.style.wordWrap = "break-word", UT.set(e, {
|
|
18631
18625
|
destroy: a,
|
|
18632
18626
|
update: s
|
|
18633
18627
|
}), s();
|
|
@@ -18659,24 +18653,24 @@ typeof window > "u" ? ((qT = function(e) {
|
|
|
18659
18653
|
}(e);
|
|
18660
18654
|
}), e;
|
|
18661
18655
|
}).destroy = function(e) {
|
|
18656
|
+
return e && Array.prototype.forEach.call(e.length ? e : [e], WT), e;
|
|
18657
|
+
}, KT.update = function(e) {
|
|
18662
18658
|
return e && Array.prototype.forEach.call(e.length ? e : [e], GT), e;
|
|
18663
|
-
}, qT.update = function(e) {
|
|
18664
|
-
return e && Array.prototype.forEach.call(e.length ? e : [e], KT), e;
|
|
18665
18659
|
});
|
|
18666
|
-
var
|
|
18660
|
+
var qT = KT, JT = { class: "pk-chatbot-input" }, YT = {
|
|
18667
18661
|
key: 0,
|
|
18668
18662
|
class: "pk-chatbot-input-dismissable-notice"
|
|
18669
|
-
},
|
|
18663
|
+
}, XT = {
|
|
18670
18664
|
key: 0,
|
|
18671
18665
|
class: "pk-chatbot-input__drop-overlay"
|
|
18672
|
-
},
|
|
18666
|
+
}, ZT = {
|
|
18673
18667
|
key: 1,
|
|
18674
18668
|
class: "pk-chatbot-input__attachments"
|
|
18675
|
-
},
|
|
18669
|
+
}, QT = { class: "pk-chatbot-input__fieldset" }, $T = [
|
|
18676
18670
|
"title",
|
|
18677
18671
|
"disabled",
|
|
18678
18672
|
"onClick"
|
|
18679
|
-
],
|
|
18673
|
+
], eE = ["title", "disabled"], tE = ["accept"], nE = ["accept"], rE = { class: "pk-chatbot-input__content" }, iE = ["placeholder", "onKeydown"], aE = { class: "opacity-60" }, oE = ["title"], sE = ["title", "disabled"], cE = /* @__PURE__ */ ut(/* @__PURE__ */ o({
|
|
18680
18674
|
__name: "PkChatbotInput",
|
|
18681
18675
|
props: /* @__PURE__ */ m({
|
|
18682
18676
|
placeholder: { type: String },
|
|
@@ -18702,16 +18696,16 @@ var JT = qT, YT = { class: "pk-chatbot-input" }, XT = {
|
|
|
18702
18696
|
}, v = ee("textareaEl"), y = ee("fileInputEl"), b = ee("cameraInputEl"), x = ee("formEl"), w = "capture" in document.createElement("input");
|
|
18703
18697
|
p(() => {
|
|
18704
18698
|
try {
|
|
18705
|
-
v.value &&
|
|
18699
|
+
v.value && qT(v.value);
|
|
18706
18700
|
} catch {}
|
|
18707
18701
|
}), d(() => {
|
|
18708
18702
|
try {
|
|
18709
|
-
v.value &&
|
|
18703
|
+
v.value && qT.destroy(v.value);
|
|
18710
18704
|
} catch {}
|
|
18711
18705
|
for (let e of o.value) URL.revokeObjectURL(e.localUrl);
|
|
18712
18706
|
});
|
|
18713
18707
|
let te = E(() => m.status === "streaming"), T = E(() => m.status === "submitted"), ne = E(() => a.value?.length ?? 0), re = E(() => m.maxMessageLength !== void 0 && ne.value > m.maxMessageLength), ie = E(() => o.value.some((e) => e.state === "uploading")), oe = E(() => m.fileUpload?.allowedMimeTypes?.join(",") ?? ""), ce = E(() => (m.fileUpload?.allowedMimeTypes ?? []).filter((e) => e.startsWith("image/")).join(",")), le = E(() => w && ce.value.length > 0), de = E(() => te.value || T.value || ie.value || re.value ? !1 : (a.value?.trim().length ?? 0) > 0), fe = () => {
|
|
18714
|
-
v.value &&
|
|
18708
|
+
v.value && qT.update(v.value);
|
|
18715
18709
|
}, pe = () => {
|
|
18716
18710
|
de.value && (u("submit"), s(() => {
|
|
18717
18711
|
fe(), v.value?.blur();
|
|
@@ -18734,7 +18728,7 @@ var JT = qT, YT = { class: "pk-chatbot-input" }, XT = {
|
|
|
18734
18728
|
});
|
|
18735
18729
|
return (n, d) => {
|
|
18736
18730
|
let f = Ge, p = Ue, m = Ke, w = Ve;
|
|
18737
|
-
return P(), j("div",
|
|
18731
|
+
return P(), j("div", JT, [t.dismissableNotice && h.value ? (P(), j("div", YT, [A(st, {
|
|
18738
18732
|
markdown: t.dismissableNotice,
|
|
18739
18733
|
class: "wysiwyg"
|
|
18740
18734
|
}, null, 8, ["markdown"]), t.dismissableNotice ? (P(), M(f, {
|
|
@@ -18750,11 +18744,11 @@ var JT = qT, YT = { class: "pk-chatbot-input" }, XT = {
|
|
|
18750
18744
|
class: "pk-chatbot-input__form",
|
|
18751
18745
|
onSubmit: _e(pe, ["prevent"])
|
|
18752
18746
|
}, [
|
|
18753
|
-
N(be) && ye.value ? (P(), j("div",
|
|
18747
|
+
N(be) && ye.value ? (P(), j("div", XT, [A(p, {
|
|
18754
18748
|
name: "ri:upload-cloud-2-line",
|
|
18755
18749
|
class: "pk-chatbot-input__drop-overlay-icon"
|
|
18756
18750
|
}), k("span", null, c(n.$t("action.dropFile")), 1)])) : D("", !0),
|
|
18757
|
-
o.value.length ? (P(), j("div",
|
|
18751
|
+
o.value.length ? (P(), j("div", ZT, [(P(!0), j(ue, null, S(o.value, (e) => (P(), M(TT, {
|
|
18758
18752
|
key: e.id,
|
|
18759
18753
|
"media-type": e.file.type,
|
|
18760
18754
|
url: e.localUrl,
|
|
@@ -18772,7 +18766,7 @@ var JT = qT, YT = { class: "pk-chatbot-input" }, XT = {
|
|
|
18772
18766
|
"removable",
|
|
18773
18767
|
"onRemove"
|
|
18774
18768
|
]))), 128))])) : D("", !0),
|
|
18775
|
-
k("div",
|
|
18769
|
+
k("div", QT, [
|
|
18776
18770
|
t.fileUpload && t.fileUpload.enabled && (le.value || n.$slots["additional-actions"]) ? (P(), M(w, C(g({ key: 0 }, {
|
|
18777
18771
|
placement: "top-start",
|
|
18778
18772
|
modifiers: "menu",
|
|
@@ -18788,7 +18782,7 @@ var JT = qT, YT = { class: "pk-chatbot-input" }, XT = {
|
|
|
18788
18782
|
}), [A(p, {
|
|
18789
18783
|
name: "ri:add-line",
|
|
18790
18784
|
class: "pk-chatbot-input__button-icon"
|
|
18791
|
-
})], 16,
|
|
18785
|
+
})], 16, $T)]),
|
|
18792
18786
|
items: e(() => [
|
|
18793
18787
|
le.value ? (P(), M(m, {
|
|
18794
18788
|
key: 0,
|
|
@@ -18824,7 +18818,7 @@ var JT = qT, YT = { class: "pk-chatbot-input" }, XT = {
|
|
|
18824
18818
|
}, [A(p, {
|
|
18825
18819
|
name: "ri:add-line",
|
|
18826
18820
|
class: "pk-chatbot-input__button-icon"
|
|
18827
|
-
})], 8,
|
|
18821
|
+
})], 8, eE)) : D("", !0),
|
|
18828
18822
|
t.fileUpload && t.fileUpload.enabled ? (P(), j("input", {
|
|
18829
18823
|
key: 2,
|
|
18830
18824
|
ref_key: "fileInputEl",
|
|
@@ -18833,7 +18827,7 @@ var JT = qT, YT = { class: "pk-chatbot-input" }, XT = {
|
|
|
18833
18827
|
hidden: "",
|
|
18834
18828
|
accept: oe.value,
|
|
18835
18829
|
onChange: ge
|
|
18836
|
-
}, null, 40,
|
|
18830
|
+
}, null, 40, tE)) : D("", !0),
|
|
18837
18831
|
t.fileUpload && t.fileUpload.enabled && le.value ? (P(), j("input", {
|
|
18838
18832
|
key: 3,
|
|
18839
18833
|
ref_key: "cameraInputEl",
|
|
@@ -18843,8 +18837,8 @@ var JT = qT, YT = { class: "pk-chatbot-input" }, XT = {
|
|
|
18843
18837
|
hidden: "",
|
|
18844
18838
|
accept: ce.value,
|
|
18845
18839
|
onChange: ge
|
|
18846
|
-
}, null, 40,
|
|
18847
|
-
k("div",
|
|
18840
|
+
}, null, 40, nE)) : D("", !0),
|
|
18841
|
+
k("div", rE, [se(k("textarea", {
|
|
18848
18842
|
ref_key: "textareaEl",
|
|
18849
18843
|
ref: v,
|
|
18850
18844
|
"onUpdate:modelValue": d[0] ||= (e) => a.value = e,
|
|
@@ -18856,11 +18850,11 @@ var JT = qT, YT = { class: "pk-chatbot-input" }, XT = {
|
|
|
18856
18850
|
onBlur: fe,
|
|
18857
18851
|
onPaste: d[1] ||= (e) => s(fe),
|
|
18858
18852
|
onKeydown: Se(_e(pe, ["prevent"]), ["enter"])
|
|
18859
|
-
}, null, 40,
|
|
18853
|
+
}, null, 40, iE), [[ae, a.value]])]),
|
|
18860
18854
|
t.maxMessageLength ? (P(), j("div", {
|
|
18861
18855
|
key: 4,
|
|
18862
18856
|
class: r(["pk-chatbot-input__counter", { "pk-chatbot-input__counter--over": re.value }])
|
|
18863
|
-
}, [i(c(n.$n(ne.value, "integer")) + "/", 1), k("span",
|
|
18857
|
+
}, [i(c(n.$n(ne.value, "integer")) + "/", 1), k("span", aE, c(n.$n(t.maxMessageLength, "integer")), 1)], 2)) : D("", !0),
|
|
18864
18858
|
te.value ? (P(), j("button", {
|
|
18865
18859
|
key: 5,
|
|
18866
18860
|
class: "pk-chatbot-input__button",
|
|
@@ -18870,7 +18864,7 @@ var JT = qT, YT = { class: "pk-chatbot-input" }, XT = {
|
|
|
18870
18864
|
}, [A(p, {
|
|
18871
18865
|
name: "ri:stop-circle-line",
|
|
18872
18866
|
class: "pk-chatbot-input__button-icon"
|
|
18873
|
-
})], 8,
|
|
18867
|
+
})], 8, oE)) : (P(), j("button", {
|
|
18874
18868
|
key: 6,
|
|
18875
18869
|
class: "pk-chatbot-input__button",
|
|
18876
18870
|
type: "submit",
|
|
@@ -18879,12 +18873,12 @@ var JT = qT, YT = { class: "pk-chatbot-input" }, XT = {
|
|
|
18879
18873
|
}, [A(p, {
|
|
18880
18874
|
name: T.value ? "line-md:loading-loop" : de.value ? "ri:send-ins-fill" : "ri:send-ins-line",
|
|
18881
18875
|
class: "pk-chatbot-input__button-icon"
|
|
18882
|
-
}, null, 8, ["name"])], 8,
|
|
18876
|
+
}, null, 8, ["name"])], 8, sE))
|
|
18883
18877
|
])
|
|
18884
18878
|
], 544)]);
|
|
18885
18879
|
};
|
|
18886
18880
|
}
|
|
18887
|
-
}), [["styles", [".pk-chatbot-input{margin-inline:var(--spacing-sm);margin-bottom:var(--spacing-sm);flex-direction:column;display:flex;position:relative}.pk-chatbot-input-dismissable-notice{padding:var(--spacing-sm);justify-content:space-between;align-items:flex-start;gap:var(--spacing-sm);background-color:var(--color-surface-1);border-top-left-radius:var(--rounded-xl);border-top-right-radius:var(--rounded-xl);transition-property:var(--transition-property-all);transition-duration:var(--duration-300);transition-timing-function:var(--ease-in-out);font-size:var(--text-14);color:var(--color-word-2);display:flex;position:relative}.pk-chatbot-input-dismissable-notice:after{content:\"\";left:0;right:0;bottom:calc(-1 * var(--spacing-12));height:var(--spacing-12);background:var(--color-surface-1);z-index:1;display:block;position:absolute}.pk-chatbot-input__form{z-index:1;border-radius:var(--rounded-xl);border:1px solid var(--color-surface-3);background-color:var(--color-surface);padding:var(--spacing-14);box-shadow:var(--shadow-lg);font-size:var(--text-16);gap:var(--spacing-xs);transition:border-color var(--duration-200) var(--ease-in-out);flex-direction:column;display:flex;position:relative}@media (width>=576px){.pk-chatbot-input__form{font-size:var(--text-14);padding:var(--spacing-10)}}.pk-chatbot-input__form:has(:focus-within){border-color:var(--color-word-5)}.pk-chatbot-input__drop-overlay{z-index:10;justify-content:center;align-items:center;gap:var(--spacing-xs);border-radius:var(--rounded-xl);background-color:color-mix(in srgb, var(--color-surface) 85%, transparent);pointer-events:none;display:flex;position:absolute;inset:0}.pk-chatbot-input__fieldset{align-items:center;gap:var(--spacing-xs);flex:1;display:flex}.pk-chatbot-input__content{gap:var(--spacing-4);flex-direction:column;flex:1;min-width:0;display:flex;overflow:hidden}.pk-chatbot-input__textarea{resize:none;width:100%;color:var(--color-word-1);background-color:var(--color-surface);border:none;outline:none;display:block;overflow:hidden}.pk-chatbot-input__textarea::placeholder{color:var(--color-word-4)}.pk-chatbot-input__attachments{gap:var(--spacing-4);padding-bottom:var(--spacing-xs);border-bottom:1px solid var(--color-surface-2);flex-wrap:wrap;display:flex}.pk-chatbot-input__button{cursor:pointer;color:var(--color-word-1);padding:var(--spacing-4);transition:var(--transition-colors);border-radius:var(--rounded);background-color:#0000;border:none;flex-shrink:0}.pk-chatbot-input__button:hover{background-color:var(--color-surface-2)}.pk-chatbot-input__button:focus-visible{outline:1px solid var(--color-surface-5);outline-offset:0}.pk-chatbot-input__button:disabled{cursor:not-allowed;opacity:.5}.pk-chatbot-input__button-icon{width:var(--spacing-20);height:var(--spacing-20);display:block}.pk-chatbot-input__counter{background-color:var(--color-surface-1);border:1px solid var(--color-surface-3);border-radius:var(--rounded-md);font-size:var(--text-12);color:var(--color-word-3);padding-inline:var(--spacing-6);padding-block:var(--spacing-4);z-index:1;font-variant-numeric:tabular-nums;line-height:1;font-family:var(--font-mono);font-weight:var(--font-bold)}.pk-chatbot-input__counter--over{color:var(--color-danger);border-color:var(--color-danger-lighten-5);font-weight:var(--font-bold)}"]]]),
|
|
18881
|
+
}), [["styles", [".pk-chatbot-input{margin-inline:var(--spacing-sm);margin-bottom:var(--spacing-sm);flex-direction:column;display:flex;position:relative}.pk-chatbot-input-dismissable-notice{padding:var(--spacing-sm);justify-content:space-between;align-items:flex-start;gap:var(--spacing-sm);background-color:var(--color-surface-1);border-top-left-radius:var(--rounded-xl);border-top-right-radius:var(--rounded-xl);transition-property:var(--transition-property-all);transition-duration:var(--duration-300);transition-timing-function:var(--ease-in-out);font-size:var(--text-14);color:var(--color-word-2);display:flex;position:relative}.pk-chatbot-input-dismissable-notice:after{content:\"\";left:0;right:0;bottom:calc(-1 * var(--spacing-12));height:var(--spacing-12);background:var(--color-surface-1);z-index:1;display:block;position:absolute}.pk-chatbot-input__form{z-index:1;border-radius:var(--rounded-xl);border:1px solid var(--color-surface-3);background-color:var(--color-surface);padding:var(--spacing-14);box-shadow:var(--shadow-lg);font-size:var(--text-16);gap:var(--spacing-xs);transition:border-color var(--duration-200) var(--ease-in-out);flex-direction:column;display:flex;position:relative}@media (width>=576px){.pk-chatbot-input__form{font-size:var(--text-14);padding:var(--spacing-10)}}.pk-chatbot-input__form:has(:focus-within){border-color:var(--color-word-5)}.pk-chatbot-input__drop-overlay{z-index:10;justify-content:center;align-items:center;gap:var(--spacing-xs);border-radius:var(--rounded-xl);background-color:color-mix(in srgb, var(--color-surface) 85%, transparent);pointer-events:none;display:flex;position:absolute;inset:0}.pk-chatbot-input__fieldset{align-items:center;gap:var(--spacing-xs);flex:1;display:flex}.pk-chatbot-input__content{gap:var(--spacing-4);flex-direction:column;flex:1;min-width:0;display:flex;overflow:hidden}.pk-chatbot-input__textarea{resize:none;width:100%;color:var(--color-word-1);background-color:var(--color-surface);border:none;outline:none;display:block;overflow:hidden}.pk-chatbot-input__textarea::placeholder{color:var(--color-word-4)}.pk-chatbot-input__attachments{gap:var(--spacing-4);padding-bottom:var(--spacing-xs);border-bottom:1px solid var(--color-surface-2);flex-wrap:wrap;display:flex}.pk-chatbot-input__button{cursor:pointer;color:var(--color-word-1);padding:var(--spacing-4);transition:var(--transition-colors);border-radius:var(--rounded);background-color:#0000;border:none;flex-shrink:0}.pk-chatbot-input__button:hover{background-color:var(--color-surface-2)}.pk-chatbot-input__button:focus-visible{outline:1px solid var(--color-surface-5);outline-offset:0}.pk-chatbot-input__button:disabled{cursor:not-allowed;opacity:.5}.pk-chatbot-input__button-icon{width:var(--spacing-20);height:var(--spacing-20);display:block}.pk-chatbot-input__counter{background-color:var(--color-surface-1);border:1px solid var(--color-surface-3);border-radius:var(--rounded-md);font-size:var(--text-12);color:var(--color-word-3);padding-inline:var(--spacing-6);padding-block:var(--spacing-4);z-index:1;font-variant-numeric:tabular-nums;line-height:1;font-family:var(--font-mono);font-weight:var(--font-bold)}.pk-chatbot-input__counter--over{color:var(--color-danger);border-color:var(--color-danger-lighten-5);font-weight:var(--font-bold)}"]]]), lE = { class: "px-sm py-10 font-bold bg-surface-1 text-12 border-b border-surface-3 text-word-3" }, uE = { class: "px-sm py-10" }, dE = /* @__PURE__ */ o({
|
|
18888
18882
|
__name: "PkToolShowMultipleChoice",
|
|
18889
18883
|
props: { part: { type: null } },
|
|
18890
18884
|
emits: ["select"],
|
|
@@ -18898,7 +18892,7 @@ var JT = qT, YT = { class: "pk-chatbot-input" }, XT = {
|
|
|
18898
18892
|
return s.value.length ? (P(), j("div", {
|
|
18899
18893
|
key: u.value,
|
|
18900
18894
|
class: "border border-surface-3 rounded-xl w-full overflow-hidden"
|
|
18901
|
-
}, [k("div",
|
|
18895
|
+
}, [k("div", lE, c(o.value.input?.question), 1), k("div", uE, [(P(), M(f, {
|
|
18902
18896
|
key: s.value.length,
|
|
18903
18897
|
modifiers: "vertical",
|
|
18904
18898
|
class: "w-full"
|
|
@@ -18923,7 +18917,7 @@ var JT = qT, YT = { class: "pk-chatbot-input" }, XT = {
|
|
|
18923
18917
|
});
|
|
18924
18918
|
//#endregion
|
|
18925
18919
|
//#region ../../packages/components/src/composables/useLocalizedString.ts
|
|
18926
|
-
function
|
|
18920
|
+
function fE(e, t) {
|
|
18927
18921
|
let { locale: n, t: r, te: i } = Ae({ useScope: "global" });
|
|
18928
18922
|
return E(() => {
|
|
18929
18923
|
let a = ke(e), o = t !== void 0 && i(t) ? r(t) : void 0;
|
|
@@ -18932,13 +18926,13 @@ function pE(e, t) {
|
|
|
18932
18926
|
}
|
|
18933
18927
|
//#endregion
|
|
18934
18928
|
//#region ../../packages/components/src/chat/PkToolShowContactForm.vue?vue&type=script&setup=true&lang.ts
|
|
18935
|
-
var
|
|
18929
|
+
var pE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" }, mE = { class: "px-sm py-6 bg-surface-1 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8 min-h-40" }, hE = { class: "font-bold" }, gE = {
|
|
18936
18930
|
key: 0,
|
|
18937
18931
|
class: "p-sm"
|
|
18938
|
-
},
|
|
18932
|
+
}, _E = { class: "flex justify-between items-center gap-16 mt-xs" }, vE = { class: "text-smaller text-word-3 flex items-center gap-8" }, yE = {
|
|
18939
18933
|
key: 1,
|
|
18940
18934
|
class: "p-sm"
|
|
18941
|
-
},
|
|
18935
|
+
}, bE = { class: "flex items-center gap-sm" }, xE = { class: "font-semibold block text-success" }, SE = { class: "text-word-3" }, CE = /* @__PURE__ */ o({
|
|
18942
18936
|
__name: "PkToolShowContactForm",
|
|
18943
18937
|
props: {
|
|
18944
18938
|
part: { type: null },
|
|
@@ -18954,7 +18948,7 @@ var mE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
18954
18948
|
name: R().min(1).max(255).default(""),
|
|
18955
18949
|
email: ep().max(255).default(""),
|
|
18956
18950
|
phone: R().max(50).regex(/^[+0-9\s\-.()]*$/, r("validation.invalidPhoneNumber")).optional()
|
|
18957
|
-
}), u = n, { VvForm: d, VvFormField: f, formData: p } =
|
|
18951
|
+
}), u = n, { VvForm: d, VvFormField: f, formData: p } = cT(l, { lazyLoad: !0 });
|
|
18958
18952
|
T(o, (e) => {
|
|
18959
18953
|
p.value = {
|
|
18960
18954
|
name: e?.name || "",
|
|
@@ -18969,17 +18963,17 @@ var mE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
18969
18963
|
...e,
|
|
18970
18964
|
metadata: o.value?.conversationContext
|
|
18971
18965
|
});
|
|
18972
|
-
}, g =
|
|
18966
|
+
}, g = fE(() => i.privacyPolicyNotice, "message.defaultPrivacyPolicyNotice");
|
|
18973
18967
|
return (n, i) => {
|
|
18974
18968
|
let a = Ue, o = Ge;
|
|
18975
|
-
return P(), j("div",
|
|
18969
|
+
return P(), j("div", pE, [k("div", mE, [A(a, {
|
|
18976
18970
|
name: "ri:send-plane-2-line",
|
|
18977
18971
|
class: "text-16"
|
|
18978
|
-
}), k("strong",
|
|
18979
|
-
default: e(() => [m.value ? (P(), j("div",
|
|
18972
|
+
}), k("strong", hE, c(N(r)("label.contactUs")), 1)]), A(ye, { mode: "out-in" }, {
|
|
18973
|
+
default: e(() => [m.value ? (P(), j("div", yE, [k("div", bE, [A(a, {
|
|
18980
18974
|
name: "ri:mail-check-line",
|
|
18981
18975
|
class: "text-24 text-success"
|
|
18982
|
-
}), k("div", null, [k("strong",
|
|
18976
|
+
}), k("div", null, [k("strong", xE, c(N(r)("message.leadSubmittedTitle")), 1), k("p", SE, c(N(r)("message.leadSubmittedMessage")), 1)])])])) : (P(), j("div", gE, [A(N(d), {
|
|
18983
18977
|
modelValue: N(p),
|
|
18984
18978
|
"onUpdate:modelValue": i[0] ||= (e) => Ee(p) ? p.value = e : null,
|
|
18985
18979
|
readonly: t.readonly,
|
|
@@ -19013,7 +19007,7 @@ var mE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
19013
19007
|
class: "mb-md",
|
|
19014
19008
|
modifiers: "compact no-label"
|
|
19015
19009
|
}, null, 8, ["label", "placeholder"]),
|
|
19016
|
-
k("div",
|
|
19010
|
+
k("div", _E, [k("div", vE, [A(a, {
|
|
19017
19011
|
name: "ri:shield-check-line",
|
|
19018
19012
|
class: "text-16 shrink-0"
|
|
19019
19013
|
}), A(st, {
|
|
@@ -19039,10 +19033,10 @@ var mE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
19039
19033
|
})]);
|
|
19040
19034
|
};
|
|
19041
19035
|
}
|
|
19042
|
-
}),
|
|
19036
|
+
}), wE = {
|
|
19043
19037
|
key: 0,
|
|
19044
19038
|
class: "pk-tool-suggested-reply"
|
|
19045
|
-
},
|
|
19039
|
+
}, TE = ["disabled"], EE = /* @__PURE__ */ ut(/* @__PURE__ */ o({
|
|
19046
19040
|
__name: "PkToolShowSuggestedReply",
|
|
19047
19041
|
props: { part: { type: null } },
|
|
19048
19042
|
emits: ["select"],
|
|
@@ -19056,7 +19050,7 @@ var mE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
19056
19050
|
}
|
|
19057
19051
|
return (e, t) => {
|
|
19058
19052
|
let n = Ue;
|
|
19059
|
-
return a.value.input?.label ? (P(), j("div",
|
|
19053
|
+
return a.value.input?.label ? (P(), j("div", wE, [k("button", {
|
|
19060
19054
|
type: "button",
|
|
19061
19055
|
class: r(["pk-tool-suggested-reply__link", {
|
|
19062
19056
|
"is-clicked": o.value,
|
|
@@ -19067,13 +19061,13 @@ var mE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
19067
19061
|
}, [A(n, {
|
|
19068
19062
|
name: "ri:corner-down-right-line",
|
|
19069
19063
|
class: "pk-tool-suggested-reply__icon"
|
|
19070
|
-
}), k("span", null, c(a.value.input.label), 1)], 10,
|
|
19064
|
+
}), k("span", null, c(a.value.input.label), 1)], 10, TE)])) : D("", !0);
|
|
19071
19065
|
};
|
|
19072
19066
|
}
|
|
19073
|
-
}), [["styles", [".pk-tool-suggested-reply{align-items:center;display:flex}.pk-tool-suggested-reply__link{font:inherit;text-underline-offset:2px;cursor:pointer;color:var(--color-word-3);transition:opacity .15s;transition:var(--transition-colors);background:0 0;border:none;align-items:center;gap:.25rem;padding:0;font-size:.875em;text-decoration:underline;display:inline-flex}.pk-tool-suggested-reply__link:hover:not(:disabled){color:var(--color-word)}.pk-tool-suggested-reply__link.is-disabled{cursor:default;pointer-events:none;color:var(--color-word-5)}.pk-tool-suggested-reply__link.is-clicked{color:var(--color-word-5);text-decoration:none}.pk-tool-suggested-reply__icon{flex-shrink:0;width:1em;height:1em}"]]]),
|
|
19067
|
+
}), [["styles", [".pk-tool-suggested-reply{align-items:center;display:flex}.pk-tool-suggested-reply__link{font:inherit;text-underline-offset:2px;cursor:pointer;color:var(--color-word-3);transition:opacity .15s;transition:var(--transition-colors);background:0 0;border:none;align-items:center;gap:.25rem;padding:0;font-size:.875em;text-decoration:underline;display:inline-flex}.pk-tool-suggested-reply__link:hover:not(:disabled){color:var(--color-word)}.pk-tool-suggested-reply__link.is-disabled{cursor:default;pointer-events:none;color:var(--color-word-5)}.pk-tool-suggested-reply__link.is-clicked{color:var(--color-word-5);text-decoration:none}.pk-tool-suggested-reply__icon{flex-shrink:0;width:1em;height:1em}"]]]), DE = ["title"], OE = {
|
|
19074
19068
|
key: 0,
|
|
19075
19069
|
class: "text-10 text-word-4 shrink-0"
|
|
19076
|
-
},
|
|
19070
|
+
}, kE = /* @__PURE__ */ o({
|
|
19077
19071
|
__name: "PkChunkPreview",
|
|
19078
19072
|
props: {
|
|
19079
19073
|
content: { type: String },
|
|
@@ -19097,8 +19091,8 @@ var mE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
19097
19091
|
k("span", {
|
|
19098
19092
|
class: "text-10 text-word-2 truncate flex-1",
|
|
19099
19093
|
title: e.content
|
|
19100
|
-
}, c(N(Xe)(e.content)), 9,
|
|
19101
|
-
n.value == null ? D("", !0) : (P(), j("span",
|
|
19094
|
+
}, c(N(Xe)(e.content)), 9, DE),
|
|
19095
|
+
n.value == null ? D("", !0) : (P(), j("span", OE, c(n.value) + "% ", 1)),
|
|
19102
19096
|
A(i, {
|
|
19103
19097
|
name: e.expanded ? "ri:arrow-up-s-line" : "ri:arrow-down-s-line",
|
|
19104
19098
|
class: "text-14 text-word-4 shrink-0"
|
|
@@ -19106,13 +19100,13 @@ var mE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
19106
19100
|
], 64);
|
|
19107
19101
|
};
|
|
19108
19102
|
}
|
|
19109
|
-
}),
|
|
19103
|
+
}), AE = { class: "flex flex-col gap-2 min-w-0 flex-1" }, jE = { class: "font-bold text-12 text-word-1 truncate block" }, ME = {
|
|
19110
19104
|
key: 0,
|
|
19111
19105
|
class: "text-10 text-word-4 truncate"
|
|
19112
|
-
},
|
|
19106
|
+
}, NE = {
|
|
19113
19107
|
key: 1,
|
|
19114
19108
|
class: "text-10 text-word-4 truncate flex items-center gap-4"
|
|
19115
|
-
},
|
|
19109
|
+
}, PE = /* @__PURE__ */ o({
|
|
19116
19110
|
__name: "PkDocumentHeader",
|
|
19117
19111
|
props: {
|
|
19118
19112
|
type: { type: String },
|
|
@@ -19126,29 +19120,29 @@ var mE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
19126
19120
|
return P(), j(ue, null, [A(r, {
|
|
19127
19121
|
name: N(th)(e.type),
|
|
19128
19122
|
class: "shrink-0 text-14 text-word-3"
|
|
19129
|
-
}, null, 8, ["name"]), k("div",
|
|
19130
|
-
k("strong",
|
|
19131
|
-
e.filename ? (P(), j("span",
|
|
19132
|
-
e.url ? (P(), j("span",
|
|
19123
|
+
}, null, 8, ["name"]), k("div", AE, [
|
|
19124
|
+
k("strong", jE, c(e.name), 1),
|
|
19125
|
+
e.filename ? (P(), j("span", ME, c(e.filename), 1)) : D("", !0),
|
|
19126
|
+
e.url ? (P(), j("span", NE, [A(r, {
|
|
19133
19127
|
name: "ri:link",
|
|
19134
19128
|
class: "shrink-0 text-10"
|
|
19135
19129
|
}), A(dt, { url: e.url }, null, 8, ["url"])])) : D("", !0)
|
|
19136
19130
|
])], 64);
|
|
19137
19131
|
};
|
|
19138
19132
|
}
|
|
19139
|
-
}),
|
|
19133
|
+
}), FE = {
|
|
19140
19134
|
key: 0,
|
|
19141
19135
|
class: "flex flex-col gap-xs w-full"
|
|
19142
|
-
},
|
|
19136
|
+
}, IE = { class: "flex items-center gap-4 text-12 text-word-3 font-semibold" }, LE = { class: "text-word-4 font-normal" }, RE = { class: "flex flex-col gap-xs" }, zE = ["onClick"], BE = { class: "flex items-center gap-4 shrink-0" }, VE = {
|
|
19143
19137
|
key: 0,
|
|
19144
19138
|
class: "text-10 text-word-4 bg-surface-2 rounded px-4 py-2"
|
|
19145
|
-
},
|
|
19139
|
+
}, HE = { class: "text-10 text-word-4 bg-surface-2 rounded px-4 py-2 uppercase" }, UE = {
|
|
19146
19140
|
key: 0,
|
|
19147
19141
|
class: "border-t border-surface-3"
|
|
19148
|
-
},
|
|
19142
|
+
}, WE = ["onClick"], GE = {
|
|
19149
19143
|
key: 0,
|
|
19150
19144
|
class: "bg-surface-1 border-t border-surface-3"
|
|
19151
|
-
},
|
|
19145
|
+
}, KE = { class: "p-8 text-10 text-word-3" }, qE = { class: "flex items-center gap-8 px-8 py-6 border-t border-surface-3 bg-surface" }, JE = ["disabled", "onClick"], YE = ["onClick"], XE = ["href"], ZE = ["onClick"], QE = /* @__PURE__ */ o({
|
|
19152
19146
|
__name: "PkToolShowSources",
|
|
19153
19147
|
props: {
|
|
19154
19148
|
part: { type: null },
|
|
@@ -19188,22 +19182,22 @@ var mE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
19188
19182
|
}, v = O(!1), y = E(() => v.value ? s.value : s.value.slice(0, 3)), b = E(() => s.value.length > 3);
|
|
19189
19183
|
return (n, a) => {
|
|
19190
19184
|
let x = Ue;
|
|
19191
|
-
return o.value.length ? (P(), j("div",
|
|
19192
|
-
k("div",
|
|
19185
|
+
return o.value.length ? (P(), j("div", FE, [
|
|
19186
|
+
k("div", IE, [
|
|
19193
19187
|
A(x, {
|
|
19194
19188
|
name: "ri:article-line",
|
|
19195
19189
|
class: "text-14"
|
|
19196
19190
|
}),
|
|
19197
19191
|
i(" " + c(n.$t("label.sources")) + " ", 1),
|
|
19198
|
-
k("span",
|
|
19192
|
+
k("span", LE, " (" + c(s.value.length) + ") ", 1)
|
|
19199
19193
|
]),
|
|
19200
|
-
k("ul",
|
|
19194
|
+
k("ul", RE, [(P(!0), j(ue, null, S(y.value, (a) => (P(), j("li", {
|
|
19201
19195
|
key: a.document.documentId,
|
|
19202
19196
|
class: "border border-surface-3 rounded-lg overflow-hidden"
|
|
19203
19197
|
}, [k("button", {
|
|
19204
19198
|
class: "flex items-center gap-8 p-8 w-full text-left hover:bg-surface-1 transition-colors cursor-pointer",
|
|
19205
19199
|
onClick: (e) => m(a.document.documentId)
|
|
19206
|
-
}, [A(
|
|
19200
|
+
}, [A(PE, {
|
|
19207
19201
|
type: a.document.documentType,
|
|
19208
19202
|
name: a.document.documentName,
|
|
19209
19203
|
url: a.document.sourceUrl,
|
|
@@ -19213,14 +19207,14 @@ var mE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
19213
19207
|
"name",
|
|
19214
19208
|
"url",
|
|
19215
19209
|
"filename"
|
|
19216
|
-
]), k("div",
|
|
19217
|
-
a.chunks.length > 1 ? (P(), j("span",
|
|
19218
|
-
k("span",
|
|
19210
|
+
]), k("div", BE, [
|
|
19211
|
+
a.chunks.length > 1 ? (P(), j("span", VE, c(a.chunks.length), 1)) : D("", !0),
|
|
19212
|
+
k("span", HE, c(a.document.language), 1),
|
|
19219
19213
|
A(x, {
|
|
19220
19214
|
name: u.has(a.document.documentId) ? "ri:arrow-up-s-line" : "ri:arrow-down-s-line",
|
|
19221
19215
|
class: "text-16 text-word-3"
|
|
19222
19216
|
}, null, 8, ["name"])
|
|
19223
|
-
])], 8,
|
|
19217
|
+
])], 8, zE), u.has(a.document.documentId) ? (P(), j("div", UE, [a.document.sourceDescription ? (P(), M(st, {
|
|
19224
19218
|
key: 0,
|
|
19225
19219
|
markdown: a.document.sourceDescription,
|
|
19226
19220
|
class: "px-8 py-4 text-10 text-word-3 bg-surface-1 border-b border-surface-3"
|
|
@@ -19230,7 +19224,7 @@ var mE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
19230
19224
|
}, [k("button", {
|
|
19231
19225
|
class: "flex items-center gap-8 px-8 py-6 w-full text-left hover:bg-surface-1 transition-colors cursor-pointer",
|
|
19232
19226
|
onClick: (e) => h(a.chunkId)
|
|
19233
|
-
}, [A(
|
|
19227
|
+
}, [A(kE, {
|
|
19234
19228
|
content: a.content,
|
|
19235
19229
|
similarity: a.similarity,
|
|
19236
19230
|
"max-similarity": l.value,
|
|
@@ -19240,7 +19234,7 @@ var mE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
19240
19234
|
"similarity",
|
|
19241
19235
|
"max-similarity",
|
|
19242
19236
|
"expanded"
|
|
19243
|
-
])], 8,
|
|
19237
|
+
])], 8, WE), d.has(a.chunkId) ? (P(), j("div", GE, [k("div", KE, [A(ye, { mode: "out-in" }, {
|
|
19244
19238
|
default: e(() => [f.has(a.chunkId) ? (P(), M(st, {
|
|
19245
19239
|
key: 0,
|
|
19246
19240
|
markdown: f.get(a.chunkId),
|
|
@@ -19251,7 +19245,7 @@ var mE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
19251
19245
|
class: "wysiwyg"
|
|
19252
19246
|
}, null, 8, ["markdown"]))]),
|
|
19253
19247
|
_: 2
|
|
19254
|
-
}, 1024)]), k("div",
|
|
19248
|
+
}, 1024)]), k("div", qE, [
|
|
19255
19249
|
t.onExpandContext && a.chunkIndex != null && !f.has(a.chunkId) ? (P(), j("button", {
|
|
19256
19250
|
key: 0,
|
|
19257
19251
|
class: "text-10 text-word-3 hover:text-word flex items-center gap-4 cursor-pointer",
|
|
@@ -19260,14 +19254,14 @@ var mE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
19260
19254
|
}, [A(x, {
|
|
19261
19255
|
name: p.has(a.chunkId) ? "line-md:loading-loop" : "ri:expand-up-down-line",
|
|
19262
19256
|
class: "text-12"
|
|
19263
|
-
}, null, 8, ["name"]), i(" " + c(n.$t("label.expandContext")), 1)], 8,
|
|
19257
|
+
}, null, 8, ["name"]), i(" " + c(n.$t("label.expandContext")), 1)], 8, JE)) : f.has(a.chunkId) ? (P(), j("button", {
|
|
19264
19258
|
key: 1,
|
|
19265
19259
|
class: "text-10 text-word-3 hover:text-word-1 flex items-center gap-4 cursor-pointer",
|
|
19266
19260
|
onClick: (e) => _(a.chunkId)
|
|
19267
19261
|
}, [A(x, {
|
|
19268
19262
|
name: "ri:collapse-vertical-line",
|
|
19269
19263
|
class: "text-12"
|
|
19270
|
-
}), i(" " + c(n.$t("label.collapseContext")), 1)], 8,
|
|
19264
|
+
}), i(" " + c(n.$t("label.collapseContext")), 1)], 8, YE)) : D("", !0),
|
|
19271
19265
|
a.sourceUrl ? (P(), j("a", {
|
|
19272
19266
|
key: 2,
|
|
19273
19267
|
href: a.sourceUrl,
|
|
@@ -19277,7 +19271,7 @@ var mE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
19277
19271
|
}, [A(x, {
|
|
19278
19272
|
name: "ri:external-link-line",
|
|
19279
19273
|
class: "text-12"
|
|
19280
|
-
}), i(" " + c(n.$t("label.openSource")), 1)], 8,
|
|
19274
|
+
}), i(" " + c(n.$t("label.openSource")), 1)], 8, XE)) : D("", !0),
|
|
19281
19275
|
t.onDownload && a.documentType === "file" ? (P(), j("button", {
|
|
19282
19276
|
key: 3,
|
|
19283
19277
|
class: r(["text-10 text-word-3 hover:text-word-1 flex items-center gap-4 cursor-pointer", { "ml-auto": !a.sourceUrl }]),
|
|
@@ -19285,7 +19279,7 @@ var mE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
19285
19279
|
}, [A(x, {
|
|
19286
19280
|
name: "ri:download-line",
|
|
19287
19281
|
class: "text-12"
|
|
19288
|
-
}), i(" " + c(n.$t("label.downloadFile")), 1)], 10,
|
|
19282
|
+
}), i(" " + c(n.$t("label.downloadFile")), 1)], 10, ZE)) : D("", !0)
|
|
19289
19283
|
])])) : D("", !0)]))), 128))])) : D("", !0)]))), 128))]),
|
|
19290
19284
|
b.value ? (P(), j("button", {
|
|
19291
19285
|
key: 0,
|
|
@@ -19298,7 +19292,7 @@ var mE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
19298
19292
|
])) : D("", !0);
|
|
19299
19293
|
};
|
|
19300
19294
|
}
|
|
19301
|
-
}),
|
|
19295
|
+
}), $E = { class: "flex items-center gap-6 text-12 text-word-3 border border-surface-3 rounded-xl px-sm py-10" }, eD = /* @__PURE__ */ o({
|
|
19302
19296
|
__name: "PkToolRequestGeolocation",
|
|
19303
19297
|
props: {
|
|
19304
19298
|
part: { type: null },
|
|
@@ -19336,7 +19330,7 @@ var mE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
19336
19330
|
}
|
|
19337
19331
|
}), (e, t) => {
|
|
19338
19332
|
let n = Ue;
|
|
19339
|
-
return P(), j("div",
|
|
19333
|
+
return P(), j("div", $E, [l.value ? u.value ? (P(), j(ue, { key: 1 }, [A(n, {
|
|
19340
19334
|
name: "ri:map-pin-line",
|
|
19341
19335
|
class: "text-16"
|
|
19342
19336
|
}), k("span", null, [i(c(e.$n(u.value.latitude, {
|
|
@@ -19356,18 +19350,18 @@ var mE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
19356
19350
|
}), k("span", null, c(N(a)("messagePart.requestGeolocation")), 1)], 64))]);
|
|
19357
19351
|
};
|
|
19358
19352
|
}
|
|
19359
|
-
}),
|
|
19353
|
+
}), tD = {
|
|
19360
19354
|
key: 0,
|
|
19361
19355
|
class: "p-md border-t border-surface-3 text-center text-12 text-danger-darken-2 bg-surface-danger"
|
|
19362
|
-
},
|
|
19356
|
+
}, nD = {
|
|
19363
19357
|
key: 0,
|
|
19364
19358
|
class: "pk-chatbot-view-chat__drop-overlay"
|
|
19365
|
-
},
|
|
19359
|
+
}, rD = /* @__PURE__ */ ut(/* @__PURE__ */ o({
|
|
19366
19360
|
__name: "PkChatbotViewChat",
|
|
19367
19361
|
props: { agentId: { type: String } },
|
|
19368
19362
|
emits: ["show-info", "revise"],
|
|
19369
19363
|
setup(t, { emit: n }) {
|
|
19370
|
-
let i = t, a = n, o =
|
|
19364
|
+
let i = t, a = n, o = fw(i.agentId), { name: s, agentInterface: l, agentFileUpload: u, actions: d, revisedAnswers: f, messages: p, chat: m, messageFeedbacks: h, feedbackDialogMessage: g, isFeedbackSubmitting: _, isFeedbackSubmitted: v, feedbackSubmitError: y, isLeadSubmitted: b, isLoadingSubmitLead: x, submitLeadError: S, input: C, inputMessagePlaceholder: w, isConversationBlocked: te, baseUrl: T, pendingAttachments: ne, apiClient: re } = Gt(o), { handleSubmit: ie, stopGeneration: ae, regenerate: oe, onUpvote: se, onDownvote: O, onFeedback: ce, onFeedbackSubmit: le, onLeadSubmit: ue, startNewChat: de, addToolOutput: fe, handleFileSelect: pe } = o, me = fE(() => l.value?.dismissableNotice), he = ee("chatViewEl"), ge = async (e) => (await re.value.expandSourceContext(i.agentId, e.documentId, e.chunkIndex)).content, _e = async (e) => {
|
|
19371
19365
|
let t = await re.value.downloadSourceDocument(i.agentId, e);
|
|
19372
19366
|
window.open(t.downloadUrl, "_blank");
|
|
19373
19367
|
}, { isOverDropZone: ve } = Fe(he, {
|
|
@@ -19383,7 +19377,7 @@ var mE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
19383
19377
|
ref: he,
|
|
19384
19378
|
class: r(["pk-chatbot-view-chat", { "pk-chatbot-view-chat--dragover": N(ve) && N(u)?.enabled }])
|
|
19385
19379
|
}, [
|
|
19386
|
-
A(
|
|
19380
|
+
A(HT, {
|
|
19387
19381
|
class: "flex flex-col flex-1 min-h-0 p-md overflow-y-auto",
|
|
19388
19382
|
name: N(s),
|
|
19389
19383
|
messages: N(p),
|
|
@@ -19410,7 +19404,7 @@ var mE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
19410
19404
|
onDownvote: N(O),
|
|
19411
19405
|
onFeedback: N(ce)
|
|
19412
19406
|
}, {
|
|
19413
|
-
"tool-showContactForm": e(({ part: e }) => [A(
|
|
19407
|
+
"tool-showContactForm": e(({ part: e }) => [A(CE, {
|
|
19414
19408
|
part: e,
|
|
19415
19409
|
readonly: !N(T),
|
|
19416
19410
|
submitted: N(b),
|
|
@@ -19427,19 +19421,19 @@ var mE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
19427
19421
|
"privacy-policy-notice",
|
|
19428
19422
|
"onSubmit"
|
|
19429
19423
|
])]),
|
|
19430
|
-
"tool-showSuggestedReply": e(({ part: e }) => [A(
|
|
19424
|
+
"tool-showSuggestedReply": e(({ part: e }) => [A(EE, {
|
|
19431
19425
|
part: e,
|
|
19432
19426
|
onSelect: n[0] ||= (e) => {
|
|
19433
19427
|
C.value = e, N(ie)();
|
|
19434
19428
|
}
|
|
19435
19429
|
}, null, 8, ["part"])]),
|
|
19436
|
-
"tool-showSources": e(({ part: e }) => [A(
|
|
19430
|
+
"tool-showSources": e(({ part: e }) => [A(QE, {
|
|
19437
19431
|
part: e,
|
|
19438
19432
|
"on-expand-context": ge,
|
|
19439
19433
|
"on-download": _e
|
|
19440
19434
|
}, null, 8, ["part"])]),
|
|
19441
19435
|
"tool-showMultipleChoice": e(({ part: t }) => [A(ye, { mode: "out-in" }, {
|
|
19442
|
-
default: e(() => [A(
|
|
19436
|
+
default: e(() => [A(dE, {
|
|
19443
19437
|
part: t,
|
|
19444
19438
|
onSelect: (e) => N(fe)({
|
|
19445
19439
|
tool: "showMultipleChoice",
|
|
@@ -19449,7 +19443,7 @@ var mE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
19449
19443
|
}, null, 8, ["part", "onSelect"])]),
|
|
19450
19444
|
_: 2
|
|
19451
19445
|
}, 1024)]),
|
|
19452
|
-
"tool-requestGeolocation": e(({ part: e }) => [A(
|
|
19446
|
+
"tool-requestGeolocation": e(({ part: e }) => [A(eD, {
|
|
19453
19447
|
part: e,
|
|
19454
19448
|
"reverse-geocode": (e, t) => N(re).reverseGeocode(e, t),
|
|
19455
19449
|
onResult: (t) => N(fe)({
|
|
@@ -19485,7 +19479,7 @@ var mE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
19485
19479
|
"onDownvote",
|
|
19486
19480
|
"onFeedback"
|
|
19487
19481
|
]),
|
|
19488
|
-
N(te) ? (P(), j("div",
|
|
19482
|
+
N(te) ? (P(), j("div", tD, c(t.$t("message.chatErrorConversationBlocked")), 1)) : (P(), M(cE, {
|
|
19489
19483
|
key: 1,
|
|
19490
19484
|
modelValue: N(C),
|
|
19491
19485
|
"onUpdate:modelValue": n[5] ||= (e) => Ee(C) ? C.value = e : null,
|
|
@@ -19512,7 +19506,7 @@ var mE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
19512
19506
|
"onFileSelect"
|
|
19513
19507
|
])),
|
|
19514
19508
|
A(ye, null, {
|
|
19515
|
-
default: e(() => [N(ve) && N(u)?.enabled ? (P(), j("div",
|
|
19509
|
+
default: e(() => [N(ve) && N(u)?.enabled ? (P(), j("div", nD, [A(i, {
|
|
19516
19510
|
name: "ri:upload-cloud-2-line",
|
|
19517
19511
|
class: "pk-chatbot-view-chat__drop-overlay-icon"
|
|
19518
19512
|
}), k("span", null, c(t.$t("action.dropFile")), 1)])) : D("", !0)]),
|
|
@@ -19521,26 +19515,26 @@ var mE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
19521
19515
|
], 2);
|
|
19522
19516
|
};
|
|
19523
19517
|
}
|
|
19524
|
-
}), [["styles", [".pk-chatbot-view-chat{flex-direction:column;flex:1;min-height:0;display:flex;position:relative}.pk-chatbot-view-chat__drop-overlay{inset:var(--spacing-sm) var(--spacing-sm) var(--spacing-sm) var(--spacing-sm);z-index:1;justify-content:center;align-items:center;gap:var(--spacing-xs);background-color:color-mix(in srgb, var(--color-surface) 85%, transparent);border-radius:var(--rounded-xl);border:var(--spacing-2) dashed var(--color-surface-5);pointer-events:none;color:var(--color-word-3);flex-direction:column;display:flex;position:absolute}.pk-chatbot-view-chat__drop-overlay-icon{font-size:var(--spacing-32)}"]]]),
|
|
19518
|
+
}), [["styles", [".pk-chatbot-view-chat{flex-direction:column;flex:1;min-height:0;display:flex;position:relative}.pk-chatbot-view-chat__drop-overlay{inset:var(--spacing-sm) var(--spacing-sm) var(--spacing-sm) var(--spacing-sm);z-index:1;justify-content:center;align-items:center;gap:var(--spacing-xs);background-color:color-mix(in srgb, var(--color-surface) 85%, transparent);border-radius:var(--rounded-xl);border:var(--spacing-2) dashed var(--color-surface-5);pointer-events:none;color:var(--color-word-3);flex-direction:column;display:flex;position:absolute}.pk-chatbot-view-chat__drop-overlay-icon{font-size:var(--spacing-32)}"]]]), iD = { class: "flex flex-col flex-1 min-h-0 overflow-y-auto p-md gap-sm relative" }, aD = {
|
|
19525
19519
|
key: 0,
|
|
19526
19520
|
class: "flex justify-center p-lg text-word-3 text-sm"
|
|
19527
|
-
},
|
|
19521
|
+
}, oD = {
|
|
19528
19522
|
key: 1,
|
|
19529
19523
|
class: "flex flex-col min-h-0 gap-8 overflow-auto px-8 pb-8 light-scrollbar pb-64"
|
|
19530
|
-
},
|
|
19524
|
+
}, sD = ["onClick"], cD = { class: "flex items-center gap-16" }, lD = { class: "font-bold truncate block flex-1" }, uD = { class: "text-word-4 text-smaller shrink-0" }, dD = { class: "text-12 text-word-4 line-clamp-2" }, fD = { class: "absolute bottom-0 left-0 right-0 flex justify-center px-16 pb-16 pt-32 bg-gradient-to-t" }, pD = /* @__PURE__ */ o({
|
|
19531
19525
|
__name: "PkChatbotViewConversations",
|
|
19532
19526
|
props: { agentId: { type: String } },
|
|
19533
19527
|
setup(e) {
|
|
19534
|
-
let t = e, { t: n } = Ae({ useScope: "global" }), i =
|
|
19528
|
+
let t = e, { t: n } = Ae({ useScope: "global" }), i = fw(t.agentId), { conversations: a, localChatId: o } = Gt(i), { navigate: s, startNewChat: l } = i, u = (e) => {
|
|
19535
19529
|
o.value = e, s("chat");
|
|
19536
19530
|
}, d = (e) => o.value === e.id, f = (e, t) => Xe(Je(e.filter((e) => e.role === t).slice(-1)[0]) || "");
|
|
19537
19531
|
return (e, t) => {
|
|
19538
19532
|
let i = Ge;
|
|
19539
|
-
return P(), j("div",
|
|
19533
|
+
return P(), j("div", iD, [N(a).length === 0 ? (P(), j("div", aD, c(N(n)("message.noConversations")), 1)) : (P(), j("ul", oD, [(P(!0), j(ue, null, S(N(a), (e) => (P(), j("li", { key: e.id }, [k("button", {
|
|
19540
19534
|
type: "button",
|
|
19541
19535
|
class: r(["rounded-md border p-10 cursor-pointer block w-full transition-colors text-14 leading-relaxed border-b border-surface-3 hover:border-surface-5 hover:bg-surface-1", { "bg-surface-2 border-surface-5": d(e) }]),
|
|
19542
19536
|
onClick: (t) => u(e.id)
|
|
19543
|
-
}, [k("div",
|
|
19537
|
+
}, [k("div", cD, [k("strong", lD, c(N(Xe)(e.title) || f(e.messages, "assistant")), 1), k("span", uD, [A(DT, { date: e.updatedAt }, null, 8, ["date"])])]), k("span", dD, c(N(Xe)(e.summary) || f(e.messages, "user")), 1)], 10, sD)]))), 128))])), k("div", fD, [A(i, {
|
|
19544
19538
|
class: "text-14",
|
|
19545
19539
|
modifiers: "rounded",
|
|
19546
19540
|
label: N(n)("action.startNewChat"),
|
|
@@ -19548,29 +19542,29 @@ var mE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
19548
19542
|
}, null, 8, ["label"])])]);
|
|
19549
19543
|
};
|
|
19550
19544
|
}
|
|
19551
|
-
}),
|
|
19545
|
+
}), mD = { class: "flex flex-col flex-1 min-h-0 overflow-y-auto p-md gap-md" }, hD = { class: "text-sm font-semibold text-word-2" }, gD = { class: "flex flex-col items-center gap-sm p-lg" }, _D = {
|
|
19552
19546
|
key: 0,
|
|
19553
19547
|
class: "text-base font-semibold text-word-1"
|
|
19554
|
-
},
|
|
19548
|
+
}, vD = /* @__PURE__ */ o({
|
|
19555
19549
|
__name: "PkChatbotViewProfile",
|
|
19556
19550
|
props: { agentId: { type: String } },
|
|
19557
19551
|
setup(e) {
|
|
19558
|
-
let t = e, { t: n } = Ae({ useScope: "global" }), { name: r, agentInterface: i } = Gt(
|
|
19559
|
-
return (e, t) => (P(), j("div",
|
|
19560
|
-
k("p",
|
|
19561
|
-
k("div",
|
|
19552
|
+
let t = e, { t: n } = Ae({ useScope: "global" }), { name: r, agentInterface: i } = Gt(fw(t.agentId));
|
|
19553
|
+
return (e, t) => (P(), j("div", mD, [
|
|
19554
|
+
k("p", hD, c(N(n)("label.profile")), 1),
|
|
19555
|
+
k("div", gD, [A(Sw, {
|
|
19562
19556
|
modifiers: "surface ring",
|
|
19563
19557
|
class: "w-48 h-48",
|
|
19564
19558
|
name: N(r),
|
|
19565
19559
|
"img-src": N(i)?.logo
|
|
19566
|
-
}, null, 8, ["name", "img-src"]), N(r) ? (P(), j("strong",
|
|
19560
|
+
}, null, 8, ["name", "img-src"]), N(r) ? (P(), j("strong", _D, c(N(r)), 1)) : D("", !0)]),
|
|
19567
19561
|
l(e.$slots, "default")
|
|
19568
19562
|
]));
|
|
19569
19563
|
}
|
|
19570
|
-
}),
|
|
19564
|
+
}), yD = { class: "pk-chatbot__header-start" }, bD = ["title"], xD = { key: 0 }, SD = { class: "pk-chatbot__warning-body" }, CD = { class: "pk-chatbot__warning-header" }, wD = { class: "pk-chatbot__warning-title" }, TD = { class: "pk-chatbot__warning-text" }, ED = {
|
|
19571
19565
|
key: 4,
|
|
19572
19566
|
class: "pk-chatbot__footer"
|
|
19573
|
-
},
|
|
19567
|
+
}, DD = /* @__PURE__ */ ut(/* @__PURE__ */ o({
|
|
19574
19568
|
__name: "PkChatbot",
|
|
19575
19569
|
props: /* @__PURE__ */ m({
|
|
19576
19570
|
baseUrl: { type: String },
|
|
@@ -19604,7 +19598,7 @@ var mE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
19604
19598
|
"error"
|
|
19605
19599
|
], ["update:chatId"]),
|
|
19606
19600
|
setup(t, { expose: n, emit: a }) {
|
|
19607
|
-
let o = te(), { t: s } = Ae({ useScope: "global" }), d = t, p = a, m = f(t, "chatId"), v =
|
|
19601
|
+
let o = te(), { t: s } = Ae({ useScope: "global" }), d = t, p = a, m = f(t, "chatId"), v = fw(d.agentId), { messages: b, chat: x, localChatId: w, activeView: ee, chatError: ne } = Gt(v), re = le(v, "agentId"), { startNewChat: ie, stopGeneration: ae, regenerate: oe, navigate: se } = v;
|
|
19608
19602
|
_(() => {
|
|
19609
19603
|
v.baseUrl = d.baseUrl, v.basePath = d.basePath, v.name = d.name, v.agentType = d.agentType, v.userId = d.userId, v.agentInterface = d.agentInterface, v.agentModel = d.agentModel, v.agentTools = d.agentTools, v.headers = d.headers, v.revisedAnswers = d.revisedAnswers, v.model = d.model, v.actionsInput = d.actions, v.agentFileUpload = d.agentFileUpload, v.fallbackModels = d.fallbackModels, v.gatewayOptions = d.gatewayOptions;
|
|
19610
19604
|
}), T(() => m.value, (e) => {
|
|
@@ -19619,7 +19613,7 @@ var mE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
19619
19613
|
let O = E(() => d.agentType === "reasoning"), ce = E(() => d.agentInterface?.useColorsForAgentHeader), de = E(() => {
|
|
19620
19614
|
let e = d.agentInterface?.theme;
|
|
19621
19615
|
return (!e || e === "auto") && (e = d.systemTheme), e ? ["theme", `theme--${e}`] : ["theme"];
|
|
19622
|
-
}), fe = E(() => d.agentInterface?.mainColor), pe = E(() =>
|
|
19616
|
+
}), fe = E(() => d.agentInterface?.mainColor), pe = E(() => _w(d.agentInterface?.textColor, fe.value)), me = fE(() => d.agentInterface?.footerMessage), he = E(() => ee.value === "conversations" ? s("label.conversations") : ee.value === "profile" ? s("label.profile") : d.name), ge = E(() => x.value.status === "ready"), _e = E(() => b.value?.[b.value.length - 1]);
|
|
19623
19617
|
return n({
|
|
19624
19618
|
startNewChat: ie,
|
|
19625
19619
|
regenerate: oe,
|
|
@@ -19641,7 +19635,7 @@ var mE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
19641
19635
|
k("div", {
|
|
19642
19636
|
class: "pk-chatbot__header",
|
|
19643
19637
|
style: u(ce.value ? { backgroundColor: fe.value } : void 0)
|
|
19644
|
-
}, [k("div",
|
|
19638
|
+
}, [k("div", yD, [N(ee) === "chat" ? (P(), M(Sw, {
|
|
19645
19639
|
key: 1,
|
|
19646
19640
|
modifiers: "surface ring shrink-0",
|
|
19647
19641
|
class: "pk-chatbot__avatar",
|
|
@@ -19659,7 +19653,7 @@ var mE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
19659
19653
|
class: "pk-chatbot__title",
|
|
19660
19654
|
title: he.value,
|
|
19661
19655
|
style: u(ce.value ? { color: pe.value } : void 0)
|
|
19662
|
-
}, c(he.value), 13,
|
|
19656
|
+
}, c(he.value), 13, bD)]), A(v, {
|
|
19663
19657
|
class: "pk-chatbot__header-end",
|
|
19664
19658
|
modifiers: "compact"
|
|
19665
19659
|
}, {
|
|
@@ -19705,14 +19699,14 @@ var mE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
19705
19699
|
]),
|
|
19706
19700
|
_: 3
|
|
19707
19701
|
})], 4),
|
|
19708
|
-
O.value ? (P(), j("div",
|
|
19709
|
-
default: e(() => [k("div",
|
|
19702
|
+
O.value ? (P(), j("div", xD, [k("div", SD, [A(b, { modifiers: "callout" }, {
|
|
19703
|
+
default: e(() => [k("div", CD, [A(f, {
|
|
19710
19704
|
name: "ri:alert-line",
|
|
19711
19705
|
class: "pk-chatbot__warning-icon"
|
|
19712
|
-
}), k("strong",
|
|
19706
|
+
}), k("strong", wD, c(N(s)("message.warning")), 1)]), k("p", TD, c(N(s)("message.reasoningAgent")), 1)]),
|
|
19713
19707
|
_: 1
|
|
19714
19708
|
})])])) : D("", !0),
|
|
19715
|
-
N(ee) === "chat" ? (P(), M(
|
|
19709
|
+
N(ee) === "chat" ? (P(), M(rD, {
|
|
19716
19710
|
key: 1,
|
|
19717
19711
|
"agent-id": t.agentId,
|
|
19718
19712
|
onShowInfo: a[3] ||= (e) => p("show-info", e),
|
|
@@ -19720,34 +19714,34 @@ var mE = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
19720
19714
|
}, y({ _: 2 }, [S(Object.keys(N(o)), (t) => ({
|
|
19721
19715
|
name: t,
|
|
19722
19716
|
fn: e((e) => [l(n.$slots, t, C(h(e)))])
|
|
19723
|
-
}))]), 1032, ["agent-id"])) : N(ee) === "conversations" ? (P(), M(
|
|
19717
|
+
}))]), 1032, ["agent-id"])) : N(ee) === "conversations" ? (P(), M(pD, {
|
|
19724
19718
|
key: 2,
|
|
19725
19719
|
"agent-id": t.agentId
|
|
19726
19720
|
}, y({ _: 2 }, [S(Object.keys(N(o)), (t) => ({
|
|
19727
19721
|
name: t,
|
|
19728
19722
|
fn: e((e) => [l(n.$slots, t, C(h(e)))])
|
|
19729
|
-
}))]), 1032, ["agent-id"])) : (P(), M(
|
|
19723
|
+
}))]), 1032, ["agent-id"])) : (P(), M(vD, {
|
|
19730
19724
|
key: 3,
|
|
19731
19725
|
"agent-id": t.agentId
|
|
19732
19726
|
}, y({ _: 2 }, [S(Object.keys(N(o)), (t) => ({
|
|
19733
19727
|
name: t,
|
|
19734
19728
|
fn: e((e) => [l(n.$slots, t, C(h(e)))])
|
|
19735
19729
|
}))]), 1032, ["agent-id"])),
|
|
19736
|
-
N(me) ? (P(), j("div",
|
|
19730
|
+
N(me) ? (P(), j("div", ED, [A(st, {
|
|
19737
19731
|
markdown: N(me),
|
|
19738
19732
|
class: "wysiwyg"
|
|
19739
19733
|
}, null, 8, ["markdown"])])) : D("", !0)
|
|
19740
19734
|
], 2);
|
|
19741
19735
|
};
|
|
19742
19736
|
}
|
|
19743
|
-
}), [["styles", [".pk-chatbot{background-color:var(--color-surface);flex-direction:column;height:100%;display:flex;position:relative}.pk-chatbot__header{z-index:1;justify-content:space-between;gap:var(--spacing-14);background-color:var(--color-surface-1);padding:var(--spacing-14);border-bottom:1px solid var(--color-surface-4);display:flex;position:sticky;top:0}.pk-chatbot__header-start{align-items:center;gap:var(--spacing-sm);min-width:0;display:flex}.pk-chatbot__nav-icon{font-size:var(--text-18)}.pk-chatbot__avatar{width:var(--spacing-24);height:var(--spacing-24)}.pk-chatbot__title{font-size:var(--text-16);text-overflow:ellipsis;white-space:nowrap;font-weight:700;overflow:hidden}.pk-chatbot__header-end{flex-shrink:0}.pk-chatbot__warning-body{padding:var(--spacing-md);border-bottom:1px solid var(--color-surface-4)}.pk-chatbot__warning-header{align-items:center;gap:var(--spacing-4);margin-bottom:var(--spacing-4);display:flex}.pk-chatbot__warning-icon{width:var(--spacing-16);height:var(--spacing-16)}.pk-chatbot__warning-title{font-weight:600;font-size:var(--text-14)}.pk-chatbot__warning-text{font-size:var(--text-12);color:var(--color-word-3)}.pk-chatbot__footer{padding:var(--spacing-md);border-top:1px solid var(--color-surface-4);text-align:center;font-size:var(--text-12);color:var(--color-word-2)}"]]]),
|
|
19744
|
-
function
|
|
19737
|
+
}), [["styles", [".pk-chatbot{background-color:var(--color-surface);flex-direction:column;height:100%;display:flex;position:relative}.pk-chatbot__header{z-index:1;justify-content:space-between;gap:var(--spacing-14);background-color:var(--color-surface-1);padding:var(--spacing-14);border-bottom:1px solid var(--color-surface-4);display:flex;position:sticky;top:0}.pk-chatbot__header-start{align-items:center;gap:var(--spacing-sm);min-width:0;display:flex}.pk-chatbot__nav-icon{font-size:var(--text-18)}.pk-chatbot__avatar{width:var(--spacing-24);height:var(--spacing-24)}.pk-chatbot__title{font-size:var(--text-16);text-overflow:ellipsis;white-space:nowrap;font-weight:700;overflow:hidden}.pk-chatbot__header-end{flex-shrink:0}.pk-chatbot__warning-body{padding:var(--spacing-md);border-bottom:1px solid var(--color-surface-4)}.pk-chatbot__warning-header{align-items:center;gap:var(--spacing-4);margin-bottom:var(--spacing-4);display:flex}.pk-chatbot__warning-icon{width:var(--spacing-16);height:var(--spacing-16)}.pk-chatbot__warning-title{font-weight:600;font-size:var(--text-14)}.pk-chatbot__warning-text{font-size:var(--text-12);color:var(--color-word-3)}.pk-chatbot__footer{padding:var(--spacing-md);border-top:1px solid var(--color-surface-4);text-align:center;font-size:var(--text-12);color:var(--color-word-2)}"]]]), OD = ".loader{width:var(--spacing-48);height:var(--spacing-48);border-radius:50%;animation:1s linear infinite rotate;position:relative}.loader:before{content:\"\";box-sizing:border-box;border:var(--spacing-5) solid var(--color-brand);border-radius:50%;animation:2s linear infinite prix-clip-fix;position:absolute;inset:0}@keyframes rotate{to{rotate:360deg}}@keyframes prix-clip-fix{0%{clip-path:polygon(50% 50%,0 0,0 0,0 0,0 0,0 0)}25%{clip-path:polygon(50% 50%,0 0,100% 0,100% 0,100% 0,100% 0)}50%{clip-path:polygon(50% 50%,0 0,100% 0,100% 100%,100% 100%,100% 100%)}75%{clip-path:polygon(50% 50%,0 0,100% 0,100% 100%,0 100%,0 100%)}to{clip-path:polygon(50% 50%,0 0,100% 0,100% 100%,0 100%,0 0)}}", kD = {};
|
|
19738
|
+
function AD(e, t) {
|
|
19745
19739
|
return P(), j("div", null, [...t[0] ||= [k("div", {
|
|
19746
19740
|
"aria-hidden": "true",
|
|
19747
19741
|
class: "loader"
|
|
19748
19742
|
}, null, -1)]]);
|
|
19749
19743
|
}
|
|
19750
|
-
var
|
|
19744
|
+
var jD = /* @__PURE__ */ ut(kD, [["render", AD], ["styles", [OD]]]), MD = { class: "welcome-popup__text" }, ND = ["aria-label"], PD = 100, FD = /* @__PURE__ */ ut(/* @__PURE__ */ o({
|
|
19751
19745
|
__name: "PkWelcomePopup",
|
|
19752
19746
|
props: {
|
|
19753
19747
|
agentId: { type: String },
|
|
@@ -19763,12 +19757,12 @@ var MD = /* @__PURE__ */ ut(AD, [["render", jD], ["styles", [kD]]]), ND = { clas
|
|
|
19763
19757
|
},
|
|
19764
19758
|
emits: ["open"],
|
|
19765
19759
|
setup(t, { emit: n }) {
|
|
19766
|
-
let r = t, i = n, a =
|
|
19760
|
+
let r = t, i = n, a = fE(() => r.message, "message.defaultAgentWelcome"), o = Re(E(() => `${r.agentId}-welcome-popup-dismissed`), !1), s = O(!1), l = O(!1), u = O([]), d, f;
|
|
19767
19761
|
function p(e) {
|
|
19768
19762
|
u.value = [], l.value = !1;
|
|
19769
19763
|
let t = e.split(/(\s+)/), n = 0;
|
|
19770
19764
|
function r() {
|
|
19771
|
-
n < t.length ? (u.value.push(t[n]), n++, d = setTimeout(r,
|
|
19765
|
+
n < t.length ? (u.value.push(t[n]), n++, d = setTimeout(r, PD)) : l.value = !0;
|
|
19772
19766
|
}
|
|
19773
19767
|
r();
|
|
19774
19768
|
}
|
|
@@ -19792,7 +19786,7 @@ var MD = /* @__PURE__ */ ut(AD, [["render", jD], ["styles", [kD]]]), ND = { clas
|
|
|
19792
19786
|
key: 0,
|
|
19793
19787
|
class: "welcome-popup",
|
|
19794
19788
|
onClick: _e(g, ["stop"])
|
|
19795
|
-
}, [k("p",
|
|
19789
|
+
}, [k("p", MD, [(P(!0), j(ue, null, S(u.value, (e, t) => (P(), j("span", {
|
|
19796
19790
|
key: t,
|
|
19797
19791
|
class: "welcome-popup__word"
|
|
19798
19792
|
}, c(e), 1))), 128))]), A(ye, null, {
|
|
@@ -19808,13 +19802,13 @@ var MD = /* @__PURE__ */ ut(AD, [["render", jD], ["styles", [kD]]]), ND = { clas
|
|
|
19808
19802
|
width: "14",
|
|
19809
19803
|
height: "14",
|
|
19810
19804
|
fill: "currentColor"
|
|
19811
|
-
}, [k("path", { d: "M12.0007 10.5865L16.9504 5.63672L18.3646 7.05093L13.4149 12.0007L18.3646 16.9504L16.9504 18.3646L12.0007 13.4149L7.05093 18.3646L5.63672 16.9504L10.5865 12.0007L5.63672 7.05093L7.05093 5.63672L12.0007 10.5865Z" })], -1)]], 8,
|
|
19805
|
+
}, [k("path", { d: "M12.0007 10.5865L16.9504 5.63672L18.3646 7.05093L13.4149 12.0007L18.3646 16.9504L16.9504 18.3646L12.0007 13.4149L7.05093 18.3646L5.63672 16.9504L10.5865 12.0007L5.63672 7.05093L7.05093 5.63672L12.0007 10.5865Z" })], -1)]], 8, ND)) : D("", !0)]),
|
|
19812
19806
|
_: 1
|
|
19813
19807
|
})])) : D("", !0)]),
|
|
19814
19808
|
_: 1
|
|
19815
19809
|
}));
|
|
19816
19810
|
}
|
|
19817
|
-
}), [["styles", [".welcome-popup{background:var(--color-surface);pointer-events:auto;max-width:300px;color:var(--color-word-2);line-height:var(--leading-normal);border-width:var(--spacing-px);border-color:var(--color-surface-3);padding:var(--spacing-sm);border-radius:var(--rounded-xl);font-size:var(--text-14);cursor:pointer;box-shadow:0 4px 16px #00000014,0 1px 4px #0000000f}.welcome-popup__word{animation:.3s ease-out both welcome-popup-word-in;display:inline}.welcome-popup__close{background-color:var(--color-surface);border:1px solid var(--color-surface-3);border-radius:var(--rounded-full);width:var(--spacing-20);height:var(--spacing-20);top:calc(-1 * var(--spacing-8));right:calc(-1 * var(--spacing-8));padding:var(--spacing-2);cursor:pointer;color:var(--color-word-4);border-radius:var(--rounded-full);transition:var(--transition-colors);box-shadow:var(--shadow-md);justify-content:center;align-items:center;line-height:1;display:flex;position:absolute}.welcome-popup__close:hover{color:var(--color-word)}.welcome-popup-enter-active,.welcome-popup-leave-active{transition:all .3s ease-in-out}.welcome-popup-enter-from{opacity:0;transform:translateY(var(--spacing-32))}.welcome-popup-leave-to{opacity:0}@keyframes welcome-popup-word-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}"]]]),
|
|
19811
|
+
}), [["styles", [".welcome-popup{background:var(--color-surface);pointer-events:auto;max-width:300px;color:var(--color-word-2);line-height:var(--leading-normal);border-width:var(--spacing-px);border-color:var(--color-surface-3);padding:var(--spacing-sm);border-radius:var(--rounded-xl);font-size:var(--text-14);cursor:pointer;box-shadow:0 4px 16px #00000014,0 1px 4px #0000000f}.welcome-popup__word{animation:.3s ease-out both welcome-popup-word-in;display:inline}.welcome-popup__close{background-color:var(--color-surface);border:1px solid var(--color-surface-3);border-radius:var(--rounded-full);width:var(--spacing-20);height:var(--spacing-20);top:calc(-1 * var(--spacing-8));right:calc(-1 * var(--spacing-8));padding:var(--spacing-2);cursor:pointer;color:var(--color-word-4);border-radius:var(--rounded-full);transition:var(--transition-colors);box-shadow:var(--shadow-md);justify-content:center;align-items:center;line-height:1;display:flex;position:absolute}.welcome-popup__close:hover{color:var(--color-word)}.welcome-popup-enter-active,.welcome-popup-leave-active{transition:all .3s ease-in-out}.welcome-popup-enter-from{opacity:0;transform:translateY(var(--spacing-32))}.welcome-popup-leave-to{opacity:0}@keyframes welcome-popup-word-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}"]]]), ID = {
|
|
19818
19812
|
key: 0,
|
|
19819
19813
|
class: "w-full h-full",
|
|
19820
19814
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -19822,7 +19816,7 @@ var MD = /* @__PURE__ */ ut(AD, [["render", jD], ["styles", [kD]]]), ND = { clas
|
|
|
19822
19816
|
width: "24",
|
|
19823
19817
|
height: "24",
|
|
19824
19818
|
fill: "currentColor"
|
|
19825
|
-
},
|
|
19819
|
+
}, LD = {
|
|
19826
19820
|
key: 1,
|
|
19827
19821
|
class: "w-full h-full",
|
|
19828
19822
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -19830,10 +19824,10 @@ var MD = /* @__PURE__ */ ut(AD, [["render", jD], ["styles", [kD]]]), ND = { clas
|
|
|
19830
19824
|
width: "24",
|
|
19831
19825
|
height: "24",
|
|
19832
19826
|
fill: "currentColor"
|
|
19833
|
-
},
|
|
19827
|
+
}, RD = {
|
|
19834
19828
|
key: 0,
|
|
19835
19829
|
class: "floating-chat-widget__chat floating-chat-widget__loading"
|
|
19836
|
-
},
|
|
19830
|
+
}, zD = /* @__PURE__ */ ut(/* @__PURE__ */ o({
|
|
19837
19831
|
inheritAttrs: !1,
|
|
19838
19832
|
__name: "FloatingChatWidget.ce",
|
|
19839
19833
|
props: {
|
|
@@ -19861,7 +19855,7 @@ var MD = /* @__PURE__ */ ut(AD, [["render", jD], ["styles", [kD]]]), ND = { clas
|
|
|
19861
19855
|
}
|
|
19862
19856
|
},
|
|
19863
19857
|
setup(t) {
|
|
19864
|
-
|
|
19858
|
+
xw();
|
|
19865
19859
|
let n = t;
|
|
19866
19860
|
wn(n.appinsightsConnectionString), En({
|
|
19867
19861
|
organizationSlug: n.organizationSlug,
|
|
@@ -19880,7 +19874,7 @@ var MD = /* @__PURE__ */ ut(AD, [["render", jD], ["styles", [kD]]]), ND = { clas
|
|
|
19880
19874
|
function m(e) {
|
|
19881
19875
|
On(/* @__PURE__ */ Error(`${e.type}: ${e.title}`), { status: String(e.status) }), d(e);
|
|
19882
19876
|
}
|
|
19883
|
-
let { agent: h, contrastColor: g, themeClass: _, themeStyle: v } =
|
|
19877
|
+
let { agent: h, contrastColor: g, themeClass: _, themeStyle: v } = bw({
|
|
19884
19878
|
baseUrl: n.baseUrl,
|
|
19885
19879
|
organizationSlug: () => n.organizationSlug,
|
|
19886
19880
|
agentId: () => n.agentId,
|
|
@@ -19903,7 +19897,7 @@ var MD = /* @__PURE__ */ ut(AD, [["render", jD], ["styles", [kD]]]), ND = { clas
|
|
|
19903
19897
|
default: e(() => [N(h) ? (P(), j("div", {
|
|
19904
19898
|
key: 0,
|
|
19905
19899
|
class: r(["floating-chat-widget__launcher", N(_)])
|
|
19906
|
-
}, [A(
|
|
19900
|
+
}, [A(FD, {
|
|
19907
19901
|
"agent-id": t.agentId,
|
|
19908
19902
|
message: N(h).interface.initialMessage,
|
|
19909
19903
|
enabled: !N(o) && N(h).interface?.welcomePopup,
|
|
@@ -19917,15 +19911,15 @@ var MD = /* @__PURE__ */ ut(AD, [["render", jD], ["styles", [kD]]]), ND = { clas
|
|
|
19917
19911
|
"aria-label": "chat-button",
|
|
19918
19912
|
class: "floating-chat-widget__button",
|
|
19919
19913
|
onClick: _e(s, ["stop"])
|
|
19920
|
-
}, [N(o) ? (P(), j("svg",
|
|
19914
|
+
}, [N(o) ? (P(), j("svg", ID, [...d[0] ||= [k("path", { d: "M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z" }, null, -1)]])) : (P(), j("svg", LD, [...d[1] ||= [k("path", { d: "M12 1.99996C12.8632 1.99996 13.701 2.10973 14.5 2.31539L14 4.25192C13.3608 4.0874 12.6906 3.99997 12 3.99997C7.58174 3.99997 4.00002 7.58172 4 12C4 13.3344 4.3255 14.6174 4.93945 15.7656L5.28906 16.4189L4.63379 19.3662L7.58105 18.7109L8.23438 19.0605C9.38255 19.6745 10.6656 20 12 20C16.4183 20 20 16.4183 20 12C20 11.6771 19.9805 11.3587 19.9434 11.0459L21.9297 10.8095C21.976 11.1999 22 11.5972 22 12C22 17.5228 17.5228 22 12 22C10.2975 22 8.69425 21.5746 7.29102 20.8242L2 22L3.17578 16.709C2.42541 15.3057 2 13.7025 2 12C2.00002 6.47714 6.47717 1.99996 12 1.99996ZM19.5293 1.3193C19.7058 0.893513 20.2942 0.8935 20.4707 1.3193L20.7236 1.93063C21.1555 2.97343 21.9615 3.80614 22.9746 4.2568L23.6914 4.57614C24.1022 4.75882 24.1022 5.35635 23.6914 5.53903L22.9326 5.87692C21.945 6.3162 21.1534 7.11943 20.7139 8.1279L20.4668 8.69333C20.2863 9.10747 19.7136 9.10747 19.5332 8.69333L19.2861 8.1279C18.8466 7.11942 18.0551 6.3162 17.0674 5.87692L16.3076 5.53903C15.8974 5.35618 15.8974 4.75895 16.3076 4.57614L17.0254 4.2568C18.0384 3.80614 18.8445 2.97343 19.2764 1.93063L19.5293 1.3193Z" }, null, -1)]]))])], 2)) : D("", !0)]),
|
|
19921
19915
|
_: 1
|
|
19922
19916
|
}),
|
|
19923
19917
|
A(ye, null, {
|
|
19924
|
-
default: e(() => [N(o) && !(N(h) && N(l).data) ? (P(), j("div",
|
|
19918
|
+
default: e(() => [N(o) && !(N(h) && N(l).data) ? (P(), j("div", RD, [A(jD)])) : D("", !0)]),
|
|
19925
19919
|
_: 1
|
|
19926
19920
|
}),
|
|
19927
19921
|
A(ye, null, {
|
|
19928
|
-
default: e(() => [N(h) && N(o) && N(l).data ? (P(), M(
|
|
19922
|
+
default: e(() => [N(h) && N(o) && N(l).data ? (P(), M(DD, {
|
|
19929
19923
|
key: 0,
|
|
19930
19924
|
ref_key: "chatbotEl",
|
|
19931
19925
|
ref: a,
|
|
@@ -19966,10 +19960,10 @@ var MD = /* @__PURE__ */ ut(AD, [["render", jD], ["styles", [kD]]]), ND = { clas
|
|
|
19966
19960
|
], 6);
|
|
19967
19961
|
};
|
|
19968
19962
|
}
|
|
19969
|
-
}), [["styles", [".floating-chat-widget{display:contents}.floating-chat-widget__launcher{bottom:var(--spacing-16);right:var(--spacing-16);align-items:flex-end;gap:var(--spacing-14);z-index:2147483647;background:0 0;flex-direction:column;width:fit-content;display:flex;position:fixed}.floating-chat-widget__button{padding:var(--spacing-10);width:var(--spacing-48);height:var(--spacing-48);border-radius:var(--rounded-full);background-color:var(--chatbot-main-color,var(--color-black,#000));color:var(--chatbot-contrast-color,var(--color-white,#fff));cursor:pointer;pointer-events:auto;border:0;flex-shrink:0;justify-content:center;align-items:center;transition:all .2s ease-in-out;display:block;transform:scale(1);box-shadow:0 4px 8px #0003}.floating-chat-widget__button:hover{transform:scale(1.1)}.floating-chat-widget__chat{z-index:2147483647;height:auto;position:fixed;inset:0;overflow:hidden}@media (width>=576px){.floating-chat-widget__chat{border-radius:var(--rounded-xxl);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);width:406px;height:85dvh;inset:auto 16px 78px auto;box-shadow:0 260px 73px #0000,0 166px 67px #00000003,0 94px 56px #00000005,0 42px 42px #00000008,0 10px 23px #0000000a}}.floating-chat-widget__loading{background-color:var(--color-surface,#fff);justify-content:center;align-items:center;display:flex}.floating-chat-widget--position-left .floating-chat-widget__launcher{right:unset;left:var(--spacing-16);align-items:flex-start}@media (width>=576px){.floating-chat-widget--position-left .floating-chat-widget__chat{right:unset;left:16px}}"]]]),
|
|
19963
|
+
}), [["styles", [".floating-chat-widget{display:contents}.floating-chat-widget__launcher{bottom:var(--spacing-16);right:var(--spacing-16);align-items:flex-end;gap:var(--spacing-14);z-index:2147483647;background:0 0;flex-direction:column;width:fit-content;display:flex;position:fixed}.floating-chat-widget__button{padding:var(--spacing-10);width:var(--spacing-48);height:var(--spacing-48);border-radius:var(--rounded-full);background-color:var(--chatbot-main-color,var(--color-black,#000));color:var(--chatbot-contrast-color,var(--color-white,#fff));cursor:pointer;pointer-events:auto;border:0;flex-shrink:0;justify-content:center;align-items:center;transition:all .2s ease-in-out;display:block;transform:scale(1);box-shadow:0 4px 8px #0003}.floating-chat-widget__button:hover{transform:scale(1.1)}.floating-chat-widget__chat{z-index:2147483647;height:auto;position:fixed;inset:0;overflow:hidden}@media (width>=576px){.floating-chat-widget__chat{border-radius:var(--rounded-xxl);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);width:406px;height:85dvh;inset:auto 16px 78px auto;box-shadow:0 260px 73px #0000,0 166px 67px #00000003,0 94px 56px #00000005,0 42px 42px #00000008,0 10px 23px #0000000a}}.floating-chat-widget__loading{background-color:var(--color-surface,#fff);justify-content:center;align-items:center;display:flex}.floating-chat-widget--position-left .floating-chat-widget__launcher{right:unset;left:var(--spacing-16);align-items:flex-start}@media (width>=576px){.floating-chat-widget--position-left .floating-chat-widget__chat{right:unset;left:16px}}"]]]), BD = {
|
|
19970
19964
|
key: 1,
|
|
19971
19965
|
class: "embedded-chat-widget embedded-chat-widget--loading"
|
|
19972
|
-
},
|
|
19966
|
+
}, VD = /* @__PURE__ */ ut(/* @__PURE__ */ o({
|
|
19973
19967
|
inheritAttrs: !1,
|
|
19974
19968
|
__name: "EmbeddedChatWidget.ce",
|
|
19975
19969
|
props: {
|
|
@@ -19997,7 +19991,7 @@ var MD = /* @__PURE__ */ ut(AD, [["render", jD], ["styles", [kD]]]), ND = { clas
|
|
|
19997
19991
|
}
|
|
19998
19992
|
},
|
|
19999
19993
|
setup(t) {
|
|
20000
|
-
|
|
19994
|
+
xw();
|
|
20001
19995
|
let n = t;
|
|
20002
19996
|
wn(n.appinsightsConnectionString), En({
|
|
20003
19997
|
organizationSlug: n.organizationSlug,
|
|
@@ -20013,7 +20007,7 @@ var MD = /* @__PURE__ */ ut(AD, [["render", jD], ["styles", [kD]]]), ND = { clas
|
|
|
20013
20007
|
function f(e) {
|
|
20014
20008
|
On(/* @__PURE__ */ Error(`${e.type}: ${e.title}`), { status: String(e.status) }), o(e);
|
|
20015
20009
|
}
|
|
20016
|
-
let { agent: p, themeClass: m, themeStyle: h } =
|
|
20010
|
+
let { agent: p, themeClass: m, themeStyle: h } = bw({
|
|
20017
20011
|
baseUrl: n.baseUrl,
|
|
20018
20012
|
organizationSlug: () => n.organizationSlug,
|
|
20019
20013
|
agentId: () => n.agentId,
|
|
@@ -20027,8 +20021,8 @@ var MD = /* @__PURE__ */ ut(AD, [["render", jD], ["styles", [kD]]]), ND = { clas
|
|
|
20027
20021
|
default: e(() => [i(c(_.value), 1)]),
|
|
20028
20022
|
_: 1
|
|
20029
20023
|
})) : D("", !0),
|
|
20030
|
-
N(p) && N(a).data ? D("", !0) : (P(), j("div",
|
|
20031
|
-
N(p) && N(a).data ? (P(), M(
|
|
20024
|
+
N(p) && N(a).data ? D("", !0) : (P(), j("div", BD, [A(jD)])),
|
|
20025
|
+
N(p) && N(a).data ? (P(), M(DD, {
|
|
20032
20026
|
key: 2,
|
|
20033
20027
|
class: r(["embedded-chat-widget", N(m)]),
|
|
20034
20028
|
style: u(N(h)),
|
|
@@ -20069,7 +20063,7 @@ var MD = /* @__PURE__ */ ut(AD, [["render", jD], ["styles", [kD]]]), ND = { clas
|
|
|
20069
20063
|
}), [["styles", [".embedded-chat-widget{width:100%;height:100%}.embedded-chat-widget--loading{justify-content:center;align-items:center;display:flex}"]]]);
|
|
20070
20064
|
//#endregion
|
|
20071
20065
|
//#region src/lib.ts
|
|
20072
|
-
function
|
|
20066
|
+
function HD(e) {
|
|
20073
20067
|
let { t } = Qt.global;
|
|
20074
20068
|
e.use(At()), e.use(Qt), e.use(hn, {
|
|
20075
20069
|
iconsCollections: [gn, _n],
|
|
@@ -20090,16 +20084,16 @@ function UD(e) {
|
|
|
20090
20084
|
On(e instanceof Error ? e : Error(String(e)), { vueInfo: n });
|
|
20091
20085
|
};
|
|
20092
20086
|
}
|
|
20093
|
-
function
|
|
20087
|
+
function UD(e) {
|
|
20094
20088
|
let { styles: t } = e;
|
|
20095
20089
|
return {
|
|
20096
|
-
configureApp:
|
|
20090
|
+
configureApp: HD,
|
|
20097
20091
|
styles: [kn, ...t ?? []]
|
|
20098
20092
|
};
|
|
20099
20093
|
}
|
|
20100
|
-
var
|
|
20101
|
-
customElements.define("floating-chat-widget",
|
|
20094
|
+
var WD = fe(zD, UD(zD)), GD = fe(VD, UD(VD));
|
|
20095
|
+
customElements.define("floating-chat-widget", WD), customElements.define("embedded-chat-widget", GD);
|
|
20102
20096
|
//#endregion
|
|
20103
|
-
export {
|
|
20097
|
+
export { GD as EmbeddedChatWidgetCe, WD as FloatingChatWidgetCe };
|
|
20104
20098
|
|
|
20105
20099
|
//# sourceMappingURL=ai-elements.es.js.map
|