@8wave/ai-elements 0.106.0-beta.2 → 0.106.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.
Files changed (81) hide show
  1. package/dist/_chunks/{PkLazyImg-BoH1s5ni.js → PkLazyImg-Beug40gC.js} +2 -2
  2. package/dist/_chunks/{PkLazyImg-BoH1s5ni.js.map → PkLazyImg-Beug40gC.js.map} +1 -1
  3. package/dist/_chunks/{PkToolRequestGeolocation-CNAtslfG.js → PkToolRequestGeolocation-DUHzWOSe.js} +2 -2
  4. package/dist/_chunks/{PkToolRequestGeolocation-CNAtslfG.js.map → PkToolRequestGeolocation-DUHzWOSe.js.map} +1 -1
  5. package/dist/_chunks/{PkToolRequestOAuthConnection-DNZHj2Kx.js → PkToolRequestOAuthConnection-CdtnIiy6.js} +2 -2
  6. package/dist/_chunks/{PkToolRequestOAuthConnection-DNZHj2Kx.js.map → PkToolRequestOAuthConnection-CdtnIiy6.js.map} +1 -1
  7. package/dist/_chunks/{PkToolShowArtifact-Kfm50DPr.js → PkToolShowArtifact-B0gZZGvT.js} +3 -3
  8. package/dist/_chunks/{PkToolShowArtifact-Kfm50DPr.js.map → PkToolShowArtifact-B0gZZGvT.js.map} +1 -1
  9. package/dist/_chunks/{PkToolShowCalendarEvent-KJXNC-E_.js → PkToolShowCalendarEvent-DpEWSENB.js} +3 -3
  10. package/dist/_chunks/{PkToolShowCalendarEvent-KJXNC-E_.js.map → PkToolShowCalendarEvent-DpEWSENB.js.map} +1 -1
  11. package/dist/_chunks/{PkToolShowComparison-C1GPvcNH.js → PkToolShowComparison-DkHRpM8n.js} +3 -3
  12. package/dist/_chunks/{PkToolShowComparison-C1GPvcNH.js.map → PkToolShowComparison-DkHRpM8n.js.map} +1 -1
  13. package/dist/_chunks/{PkToolShowContactForm-Ws8DysdD.js → PkToolShowContactForm-B8YI2e0B.js} +3 -3
  14. package/dist/_chunks/{PkToolShowContactForm-Ws8DysdD.js.map → PkToolShowContactForm-B8YI2e0B.js.map} +1 -1
  15. package/dist/_chunks/{PkToolShowDiagram-CMuKde1V.js → PkToolShowDiagram-vmSzw6s0.js} +3 -3
  16. package/dist/_chunks/{PkToolShowDiagram-CMuKde1V.js.map → PkToolShowDiagram-vmSzw6s0.js.map} +1 -1
  17. package/dist/_chunks/{PkToolShowEmail-DvA69GLP.js → PkToolShowEmail-BtntDg5l.js} +3 -3
  18. package/dist/_chunks/{PkToolShowEmail-DvA69GLP.js.map → PkToolShowEmail-BtntDg5l.js.map} +1 -1
  19. package/dist/_chunks/{PkToolShowForm-CadrjzZx.js → PkToolShowForm-gD0MfOjQ.js} +104 -104
  20. package/dist/_chunks/PkToolShowForm-gD0MfOjQ.js.map +1 -0
  21. package/dist/_chunks/{PkToolShowImageGallery-CosOsHSh.js → PkToolShowImageGallery-DL-bFOKl.js} +2 -2
  22. package/dist/_chunks/{PkToolShowImageGallery-CosOsHSh.js.map → PkToolShowImageGallery-DL-bFOKl.js.map} +1 -1
  23. package/dist/_chunks/{PkToolShowLocation-BLSkytqC.js → PkToolShowLocation-DXPAEQCf.js} +3 -3
  24. package/dist/_chunks/{PkToolShowLocation-BLSkytqC.js.map → PkToolShowLocation-DXPAEQCf.js.map} +1 -1
  25. package/dist/_chunks/{PkToolShowMessage-Bb1fhAcX.js → PkToolShowMessage-WendSuVW.js} +3 -3
  26. package/dist/_chunks/{PkToolShowMessage-Bb1fhAcX.js.map → PkToolShowMessage-WendSuVW.js.map} +1 -1
  27. package/dist/_chunks/{PkToolShowProductList-DkaEOhxY.js → PkToolShowProductList-_ULcSOL_.js} +3 -3
  28. package/dist/_chunks/{PkToolShowProductList-DkaEOhxY.js.map → PkToolShowProductList-_ULcSOL_.js.map} +1 -1
  29. package/dist/_chunks/{PkToolShowQrCode-GaZJBhqE.js → PkToolShowQrCode-BIhYJSTf.js} +3 -3
  30. package/dist/_chunks/{PkToolShowQrCode-GaZJBhqE.js.map → PkToolShowQrCode-BIhYJSTf.js.map} +1 -1
  31. package/dist/_chunks/{PkToolShowSources-BcxmwOsZ.js → PkToolShowSources-BprUew-i.js} +2 -2
  32. package/dist/_chunks/{PkToolShowSources-BcxmwOsZ.js.map → PkToolShowSources-BprUew-i.js.map} +1 -1
  33. package/dist/_chunks/{PkToolShowSuggestedReply-4S7VvK7s.js → PkToolShowSuggestedReply-FJMsf1Ft.js} +2 -2
  34. package/dist/_chunks/{PkToolShowSuggestedReply-4S7VvK7s.js.map → PkToolShowSuggestedReply-FJMsf1Ft.js.map} +1 -1
  35. package/dist/_chunks/{PkToolShowVideo-CbSNJlH1.js → PkToolShowVideo-DXQo_Frk.js} +2 -2
  36. package/dist/_chunks/{PkToolShowVideo-CbSNJlH1.js.map → PkToolShowVideo-DXQo_Frk.js.map} +1 -1
  37. package/dist/_chunks/{PkToolShowWeather-Cr3NJEMI.js → PkToolShowWeather-Ca-ZrKx3.js} +2 -2
  38. package/dist/_chunks/{PkToolShowWeather-Cr3NJEMI.js.map → PkToolShowWeather-Ca-ZrKx3.js.map} +1 -1
  39. package/dist/_chunks/{PkToolShowWebPages-DLpd7Kg0.js → PkToolShowWebPages-DxxqCOav.js} +3 -3
  40. package/dist/_chunks/{PkToolShowWebPages-DLpd7Kg0.js.map → PkToolShowWebPages-DxxqCOav.js.map} +1 -1
  41. package/dist/_chunks/{VvCheckboxGroup.es-DLgx43U_.js → VvCheckboxGroup.es-6rXZzFDs.js} +2 -2
  42. package/dist/_chunks/{VvCheckboxGroup.es-DLgx43U_.js.map → VvCheckboxGroup.es-6rXZzFDs.js.map} +1 -1
  43. package/dist/_chunks/{VvCombobox.es-D5zLGtOy.js → VvCombobox.es-DgB4YbSj.js} +409 -409
  44. package/dist/_chunks/{VvCombobox.es-D5zLGtOy.js.map → VvCombobox.es-DgB4YbSj.js.map} +1 -1
  45. package/dist/_chunks/{VvInputText.es-DWwDzlwZ.js → VvInputText.es-UTEISDKU.js} +181 -181
  46. package/dist/_chunks/{VvInputText.es-DWwDzlwZ.js.map → VvInputText.es-UTEISDKU.js.map} +1 -1
  47. package/dist/_chunks/{VvRadioGroup.es-BZdnaITO.js → VvRadioGroup.es-CqMnxRGR.js} +2 -2
  48. package/dist/_chunks/{VvRadioGroup.es-BZdnaITO.js.map → VvRadioGroup.es-CqMnxRGR.js.map} +1 -1
  49. package/dist/_chunks/{VvSelect.es-BP6Gn5BZ.js → VvSelect.es-BLNrNcIi.js} +6 -6
  50. package/dist/_chunks/{VvSelect.es-BP6Gn5BZ.js.map → VvSelect.es-BLNrNcIi.js.map} +1 -1
  51. package/dist/_chunks/{VvTextarea.es-BuLyBuYz.js → VvTextarea.es-ChkbZSw6.js} +296 -296
  52. package/dist/_chunks/{VvTextarea.es-BuLyBuYz.js.map → VvTextarea.es-ChkbZSw6.js.map} +1 -1
  53. package/dist/_chunks/{dist-vbhhaYbZ.js → dist-Dhop5_et.js} +91 -28
  54. package/dist/_chunks/{dist-vbhhaYbZ.js.map → dist-Dhop5_et.js.map} +1 -1
  55. package/dist/_chunks/{index.es-DFq55nZZ.js → index.es-CNKCTfCu.js} +93 -93
  56. package/dist/_chunks/{index.es-DFq55nZZ.js.map → index.es-CNKCTfCu.js.map} +1 -1
  57. package/dist/_chunks/{index.es-DhjFGu5c.js → index.es-DB9_sQvG.js} +16 -16
  58. package/dist/_chunks/{index.es-DhjFGu5c.js.map → index.es-DB9_sQvG.js.map} +1 -1
  59. package/dist/ai-elements.es.js +2334 -2327
  60. package/dist/ai-elements.es.js.map +1 -1
  61. package/dist-vue/PkChatbot.js +1 -1
  62. package/dist-vue/PkChatbotMessages.js +1 -1
  63. package/dist-vue/PkChatbotViewChat.js +1 -1
  64. package/dist-vue/_chunks/{PkChatbot-a8Wh4tN4.js → PkChatbot-i_07-rvf.js} +76 -68
  65. package/dist-vue/_chunks/PkChatbot-i_07-rvf.js.map +1 -0
  66. package/dist-vue/_chunks/PkChatbotEmptyState-C7W0QgqW.js.map +1 -1
  67. package/dist-vue/_chunks/{PkChatbotMessages-D6rNh6PF.js → PkChatbotMessages-CZLj_OeK.js} +4 -4
  68. package/dist-vue/_chunks/PkChatbotMessages-CZLj_OeK.js.map +1 -0
  69. package/dist-vue/_chunks/{PkChatbotViewChat-DUn7M4SL.js → PkChatbotViewChat-B6MfjQIa.js} +3 -3
  70. package/dist-vue/_chunks/{PkChatbotViewChat-DUn7M4SL.js.map → PkChatbotViewChat-B6MfjQIa.js.map} +1 -1
  71. package/dist-vue/_chunks/{PkToolShowDiagram-Bbqo6jm8.js → PkToolShowDiagram-D7jh-yIc.js} +2 -2
  72. package/dist-vue/_chunks/{PkToolShowDiagram-Bbqo6jm8.js.map → PkToolShowDiagram-D7jh-yIc.js.map} +1 -1
  73. package/dist-vue/_chunks/{PkToolShowForm-CJtmt5yd.js → PkToolShowForm-BGp_gbtr.js} +54 -54
  74. package/dist-vue/_chunks/PkToolShowForm-BGp_gbtr.js.map +1 -0
  75. package/dist-vue/index.js +8 -8
  76. package/dist-vue/style.css +1 -1
  77. package/package.json +1 -1
  78. package/dist/_chunks/PkToolShowForm-CadrjzZx.js.map +0 -1
  79. package/dist-vue/_chunks/PkChatbot-a8Wh4tN4.js.map +0 -1
  80. package/dist-vue/_chunks/PkChatbotMessages-D6rNh6PF.js.map +0 -1
  81. package/dist-vue/_chunks/PkToolShowForm-CJtmt5yd.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import { t as e } from "./_chunks/PkChatbot-a8Wh4tN4.js";
1
+ import { t as e } from "./_chunks/PkChatbot-i_07-rvf.js";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "./_chunks/PkChatbotMessages-D6rNh6PF.js";
1
+ import { t as e } from "./_chunks/PkChatbotMessages-CZLj_OeK.js";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "./_chunks/PkChatbotViewChat-DUn7M4SL.js";
1
+ import { t as e } from "./_chunks/PkChatbotViewChat-B6MfjQIa.js";
2
2
  export { e as default };
@@ -1,7 +1,7 @@
1
1
  import { n as e, t } from "./PkStreamingMarkdown-DM_5YqQX.js";
2
2
  import { n } from "./useChatbotStore-9Yy6EGWV.js";
3
3
  import { t as ee } from "./PkChatbotViewConversations-DFY_X1Mw.js";
4
- import { t as te } from "./PkChatbotViewChat-DUn7M4SL.js";
4
+ import { t as te } from "./PkChatbotViewChat-B6MfjQIa.js";
5
5
  import { t as ne } from "./PkChatbotViewFiles-ByECvvwv.js";
6
6
  import { t as r } from "./useLocalizedString-PfaKjIQY.js";
7
7
  import { t as re } from "./PkAvatar-paEJByEA.js";
@@ -9,14 +9,15 @@ import { y as i } from "./utils-Coqik0XI.js";
9
9
  import { t as a } from "./chatbotProfileContext-CgnFhNPn.js";
10
10
  import { t as ie } from "./PkChatbotViewProfile-CjF-lW_p.js";
11
11
  import { VvAlert as ae, VvButton as oe, VvButtonGroup as se, VvDropdown as ce, VvDropdownAction as le, VvIcon as ue } from "@volverjs/ui-vue/components";
12
- import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createSlots as f, createTextVNode as p, createVNode as m, defineComponent as h, guardReactiveProps as g, inject as _, mergeModels as v, mergeProps as y, normalizeClass as de, normalizeProps as b, normalizeStyle as x, openBlock as S, renderList as C, renderSlot as w, toDisplayString as T, toRef as fe, unref as E, useModel as pe, useSlots as me, watch as D, watchEffect as he, withCtx as O } from "vue";
13
- import { useI18n as ge } from "vue-i18n";
14
- import { storeToRefs as _e } from "pinia";
12
+ import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createSlots as f, createTextVNode as p, createVNode as m, defineComponent as h, guardReactiveProps as g, inject as _, mergeModels as v, mergeProps as y, normalizeClass as de, normalizeProps as b, normalizeStyle as x, openBlock as S, renderList as C, renderSlot as w, toDisplayString as T, toRef as fe, unref as E, useModel as pe, useSlots as me, useTemplateRef as he, watch as D, watchEffect as ge, withCtx as O } from "vue";
13
+ import { useI18n as _e } from "vue-i18n";
14
+ import { useElementSize as ve } from "@vueuse/core";
15
+ import { storeToRefs as ye } from "pinia";
15
16
  //#region ../../packages/components/src/chat/PkChatbot.vue?vue&type=script&setup=true&lang.ts
16
- var ve = { class: "pk-chatbot__header-start" }, ye = ["title"], be = { key: 1 }, xe = { class: "pk-chatbot__warning-body" }, Se = { class: "pk-chatbot__warning-header" }, Ce = { class: "pk-chatbot__warning-title" }, we = { class: "pk-chatbot__warning-text" }, Te = {
17
+ var be = { class: "pk-chatbot__header-start" }, xe = ["title"], Se = { key: 1 }, Ce = { class: "pk-chatbot__warning-body" }, we = { class: "pk-chatbot__warning-header" }, Te = { class: "pk-chatbot__warning-title" }, Ee = { class: "pk-chatbot__warning-text" }, De = {
17
18
  key: 5,
18
19
  class: "pk-chatbot__view-auth flex-1 min-h-0 overflow-y-auto"
19
- }, Ee = {
20
+ }, Oe = {
20
21
  key: 7,
21
22
  class: "pk-chatbot__footer"
22
23
  }, k = /* @__PURE__ */ h({
@@ -58,101 +59,108 @@ var ve = { class: "pk-chatbot__header-start" }, ye = ["title"], be = { key: 1 },
58
59
  "error"
59
60
  ], ["update:chatId"]),
60
61
  setup(h, { expose: v, emit: k }) {
61
- let A = me(), { t: j } = ge({ useScope: "global" }), M = h, N = k, P = pe(h, "chatId"), F = n(M.agentId);
62
+ let A = me(), { t: j } = _e({ useScope: "global" }), M = h, N = k, P = pe(h, "chatId"), F = n(M.agentId);
62
63
  e((e) => F.apiClient.resolveShortUrls(e));
63
- let { messages: I, chat: De, localChatId: L, activeView: R, chatError: Oe, isDark: ke } = _e(F), z = fe(F, "agentId"), { startNewChat: B, stopGeneration: V, regenerate: Ae, navigate: H, sendMessage: je } = F, U = _(a, void 0), W = s(() => U?.canManageProfile.value ?? !1), G = s(() => !W.value && (U?.canSignIn?.value ?? !1) && A["view-auth"] !== void 0);
64
- D(W, (e) => {
65
- e && R.value === "auth" && H("chat");
66
- }), he(() => {
64
+ let { messages: I, chat: ke, localChatId: L, activeView: R, chatError: Ae, isDark: je } = ye(F), Me = fe(F, "agentId"), { startNewChat: z, stopGeneration: B, regenerate: Ne, navigate: V, sendMessage: Pe } = F, H = _(a, void 0), U = s(() => H?.canManageProfile.value ?? !1), W = s(() => !U.value && (H?.canSignIn?.value ?? !1) && A["view-auth"] !== void 0);
65
+ D(U, (e) => {
66
+ e && R.value === "auth" && V("chat");
67
+ }), ge(() => {
67
68
  F.baseUrl = M.baseUrl, F.basePath = M.basePath, F.name = M.name, F.agentType = M.agentType, F.userId = M.userId, F.agentInterface = M.agentInterface, F.agentModel = M.agentModel, F.agentTools = M.agentTools, F.headers = M.headers, F.revisedAnswers = M.revisedAnswers, F.model = M.model, F.actionsInput = M.actions, F.agentFileUpload = M.agentFileUpload, F.agentVoice = M.voice, F.fallbackModels = M.fallbackModels, F.gatewayOptions = M.gatewayOptions, F.externalContext = M.externalContext, F.systemTheme = M.systemTheme, F.hideWelcomeMessage = M.modifier === "fullscreen";
68
69
  }), D(() => P.value, (e) => {
69
70
  e && e !== F.localChatId && (F.localChatId = e);
70
71
  }, { immediate: !0 }), D(L, (e) => {
71
72
  P.value = e;
72
- }), D(Oe, (e) => {
73
+ }), D(Ae, (e) => {
73
74
  if (e) try {
74
75
  let t = JSON.parse(e.message);
75
76
  N("error", t);
76
77
  } catch {}
77
78
  });
78
- let K = s(() => M.modifier === "fullscreen"), q = s(() => M.modifier === "panel"), J = s(() => M.agentType === "reasoning"), Y = s(() => M.agentInterface?.useColorsForAgentHeader), Me = s(() => !q.value || W.value || G.value || !!M.userFilesEnabled && !!L.value), Ne = s(() => ["theme", `theme--${ke.value ? "dark" : "light"}`]), X = s(() => M.agentInterface?.mainColor), Z = s(() => i(M.agentInterface?.textColor, X.value)), Q = r(() => M.agentInterface?.footerMessage), Pe = s(() => R.value === "conversations" ? j("label.conversations") : R.value === "profile" ? j("label.profile") : R.value === "auth" ? j("label.authentication") : R.value === "files" ? j("userFiles.chatFilesTitle") : M.name), $ = s(() => De.value.status === "ready"), Fe = s(() => I.value?.[I.value.length - 1]);
79
+ let G = s(() => M.modifier === "fullscreen"), K = s(() => M.modifier === "panel"), q = he("chatbotEl"), { width: J } = ve(q), Fe = s(() => J.value > 0 && J.value < 576), Ie = s(() => J.value > 0 && J.value < 640), Le = s(() => J.value >= 848), Y = s(() => M.agentType === "reasoning"), X = s(() => M.agentInterface?.useColorsForAgentHeader), Re = s(() => !K.value || U.value || W.value || !!M.userFilesEnabled && !!L.value), ze = s(() => ["theme", `theme--${je.value ? "dark" : "light"}`]), Z = s(() => M.agentInterface?.mainColor), Q = s(() => i(M.agentInterface?.textColor, Z.value)), Be = r(() => M.agentInterface?.footerMessage), Ve = s(() => R.value === "conversations" ? j("label.conversations") : R.value === "profile" ? j("label.profile") : R.value === "auth" ? j("label.authentication") : R.value === "files" ? j("userFiles.chatFilesTitle") : M.name), $ = s(() => ke.value.status === "ready"), He = s(() => I.value?.[I.value.length - 1]);
79
80
  return v({
80
- startNewChat: B,
81
- regenerate: Ae,
82
- stopGeneration: V,
83
- sendMessage: je
84
- }), D([z, L], async ([e, t]) => {
81
+ startNewChat: z,
82
+ regenerate: Ne,
83
+ stopGeneration: B,
84
+ sendMessage: Pe
85
+ }), D([Me, L], async ([e, t]) => {
85
86
  await F.initialize(e, t);
86
87
  }, { immediate: !0 }), D(R, (e) => {
87
- e === "conversations" ? F.loadConversations(z.value) : e === "files" && F.loadChatFiles();
88
- }), D(Fe, (e) => {
88
+ e === "conversations" ? F.loadConversations(Me.value) : e === "files" && F.loadChatFiles();
89
+ }), D(He, (e) => {
89
90
  e && N("message-update", e);
90
91
  }, {
91
92
  deep: !0,
92
93
  immediate: !0
93
94
  }), (e, n) => {
94
95
  let r = oe, i = ue, a = le, s = ce, _ = se, v = ae;
95
- return S(), u("div", { class: de(["pk-chatbot", [Ne.value, {
96
- "pk-chatbot--fullscreen": K.value,
97
- "pk-chatbot--panel": q.value
98
- }]]) }, [
99
- K.value ? l("", !0) : (S(), u("div", {
96
+ return S(), u("div", {
97
+ ref_key: "chatbotEl",
98
+ ref: q,
99
+ class: de(["pk-chatbot", [ze.value, {
100
+ "pk-chatbot--fullscreen": G.value,
101
+ "pk-chatbot--panel": K.value,
102
+ "pk-chatbot--phone": Fe.value,
103
+ "pk-chatbot--tight": Ie.value,
104
+ "pk-chatbot--wide": Le.value
105
+ }]])
106
+ }, [
107
+ G.value ? l("", !0) : (S(), u("div", {
100
108
  key: 0,
101
109
  class: "pk-chatbot__header",
102
- style: x(Y.value ? { backgroundColor: X.value } : void 0)
103
- }, [d("div", ve, [E(R) === "chat" ? q.value ? l("", !0) : (S(), c(re, {
110
+ style: x(X.value ? { backgroundColor: Z.value } : void 0)
111
+ }, [d("div", be, [E(R) === "chat" ? K.value ? l("", !0) : (S(), c(re, {
104
112
  key: 1,
105
113
  modifiers: "surface ring shrink-0",
106
114
  class: "pk-chatbot__avatar",
107
115
  name: h.name,
108
116
  "img-src": h.agentInterface?.logo
109
117
  }, null, 8, ["name", "img-src"])) : (S(), u(o, { key: 0 }, [m(r, y({
110
- modifiers: Y.value ? `action-quiet-${Z.value}` : "action-quiet",
118
+ modifiers: X.value ? `action-quiet-${Q.value}` : "action-quiet",
111
119
  icon: "ri:arrow-left-s-line",
112
120
  title: E(j)("action.goBack")
113
- }, { onClick: n[0] ||= (e) => E(H)("chat") }), null, 16), m(i, {
121
+ }, { onClick: n[0] ||= (e) => E(V)("chat") }), null, 16), m(i, {
114
122
  name: E(R) === "conversations" ? "ri:history-line" : E(R) === "files" ? "ri:attachment-2" : "ri:user-line",
115
123
  class: "pk-chatbot__nav-icon",
116
- style: x(Y.value ? { color: Z.value } : void 0)
124
+ style: x(X.value ? { color: Q.value } : void 0)
117
125
  }, null, 8, ["name", "style"])], 64)), d("strong", {
118
126
  class: "pk-chatbot__title",
119
- title: Pe.value,
120
- style: x(Y.value ? { color: Z.value } : void 0)
121
- }, T(Pe.value), 13, ye)]), m(_, {
127
+ title: Ve.value,
128
+ style: x(X.value ? { color: Q.value } : void 0)
129
+ }, T(Ve.value), 13, xe)]), m(_, {
122
130
  class: "pk-chatbot__header-end",
123
131
  modifiers: "compact"
124
132
  }, {
125
133
  default: O(() => [
126
134
  w(e.$slots, "header-actions", b(g({
127
- mainColor: X.value,
128
- useColorsForAgentHeader: Y.value,
129
- contrastColor: Z.value,
130
- startNewChat: E(B),
131
- stopGeneration: E(V)
135
+ mainColor: Z.value,
136
+ useColorsForAgentHeader: X.value,
137
+ contrastColor: Q.value,
138
+ startNewChat: E(z),
139
+ stopGeneration: E(B)
132
140
  }))),
133
- q.value ? (S(), u(o, { key: 0 }, [m(r, {
134
- modifiers: Y.value ? `action-quiet-${Z.value}` : "action-quiet",
141
+ K.value ? (S(), u(o, { key: 0 }, [m(r, {
142
+ modifiers: X.value ? `action-quiet-${Q.value}` : "action-quiet",
135
143
  icon: "ri:edit-box-line",
136
144
  disabled: !$.value,
137
145
  title: E(j)("action.startNewChat"),
138
- onClick: n[1] ||= (e) => E(B)()
146
+ onClick: n[1] ||= (e) => E(z)()
139
147
  }, null, 8, [
140
148
  "modifiers",
141
149
  "disabled",
142
150
  "title"
143
- ]), J.value ? l("", !0) : (S(), c(r, {
151
+ ]), Y.value ? l("", !0) : (S(), c(r, {
144
152
  key: 0,
145
- modifiers: Y.value ? `action-quiet-${Z.value}` : "action-quiet",
153
+ modifiers: X.value ? `action-quiet-${Q.value}` : "action-quiet",
146
154
  icon: "ri:history-line",
147
155
  disabled: !$.value,
148
156
  title: E(j)("action.viewRecentChats"),
149
- onClick: n[2] ||= (e) => E(H)("conversations")
157
+ onClick: n[2] ||= (e) => E(V)("conversations")
150
158
  }, null, 8, [
151
159
  "modifiers",
152
160
  "disabled",
153
161
  "title"
154
162
  ]))], 64)) : l("", !0),
155
- Me.value ? (S(), c(s, b(y({ key: 1 }, {
163
+ Re.value ? (S(), c(s, b(y({ key: 1 }, {
156
164
  placement: "bottom-end",
157
165
  modifiers: "menu",
158
166
  flip: !0,
@@ -160,43 +168,43 @@ var ve = { class: "pk-chatbot__header-start" }, ye = ["title"], be = { key: 1 },
160
168
  strategy: "fixed"
161
169
  })), {
162
170
  items: O(() => [
163
- q.value ? l("", !0) : (S(), c(a, {
171
+ K.value ? l("", !0) : (S(), c(a, {
164
172
  key: 0,
165
- onClick: n[3] ||= (e) => E(B)()
173
+ onClick: n[3] ||= (e) => E(z)()
166
174
  }, {
167
175
  default: O(() => [m(i, { name: "ri:edit-box-line" }), p(" " + T(E(j)("action.startNewChat")), 1)]),
168
176
  _: 1
169
177
  })),
170
- !J.value && !q.value ? (S(), c(a, {
178
+ !Y.value && !K.value ? (S(), c(a, {
171
179
  key: 1,
172
- onClick: n[4] ||= (e) => E(H)("conversations")
180
+ onClick: n[4] ||= (e) => E(V)("conversations")
173
181
  }, {
174
182
  default: O(() => [m(i, { name: "ri:history-line" }), p(" " + T(E(j)("action.viewRecentChats")), 1)]),
175
183
  _: 1
176
184
  })) : l("", !0),
177
- (W.value || h.userFilesEnabled) && E(L) ? (S(), c(a, {
185
+ (U.value || h.userFilesEnabled) && E(L) ? (S(), c(a, {
178
186
  key: 2,
179
- onClick: n[5] ||= (e) => E(H)("files")
187
+ onClick: n[5] ||= (e) => E(V)("files")
180
188
  }, {
181
189
  default: O(() => [m(i, { name: "ri:attachment-2" }), p(" " + T(E(j)("userFiles.chatFilesTitle")), 1)]),
182
190
  _: 1
183
191
  })) : l("", !0),
184
- W.value ? (S(), c(a, {
192
+ U.value ? (S(), c(a, {
185
193
  key: 3,
186
- onClick: n[6] ||= (e) => E(H)("profile")
194
+ onClick: n[6] ||= (e) => E(V)("profile")
187
195
  }, {
188
196
  default: O(() => [m(i, { name: "ri:user-line" }), p(" " + T(E(j)("label.profile")), 1)]),
189
197
  _: 1
190
- })) : G.value ? (S(), c(a, {
198
+ })) : W.value ? (S(), c(a, {
191
199
  key: 4,
192
- onClick: n[7] ||= (e) => E(H)("auth")
200
+ onClick: n[7] ||= (e) => E(V)("auth")
193
201
  }, {
194
202
  default: O(() => [m(i, { name: "ri:account-circle-line" }), p(" " + T(E(j)("action.signIn")), 1)]),
195
203
  _: 1
196
204
  })) : l("", !0)
197
205
  ]),
198
206
  default: O(() => [m(r, b(g({
199
- modifiers: Y.value ? `action-quiet-${Z.value}` : "action-quiet",
207
+ modifiers: X.value ? `action-quiet-${Q.value}` : "action-quiet",
200
208
  icon: "ri:more-2-fill",
201
209
  disabled: !$.value,
202
210
  title: E(j)("action.moreActions")
@@ -204,20 +212,20 @@ var ve = { class: "pk-chatbot__header-start" }, ye = ["title"], be = { key: 1 },
204
212
  _: 1
205
213
  }, 16)) : l("", !0),
206
214
  w(e.$slots, "actions", b(g({
207
- mainColor: X.value,
208
- useColorsForAgentHeader: Y.value,
209
- contrastColor: Z.value,
210
- startNewChat: E(B),
211
- stopGeneration: E(V)
215
+ mainColor: Z.value,
216
+ useColorsForAgentHeader: X.value,
217
+ contrastColor: Q.value,
218
+ startNewChat: E(z),
219
+ stopGeneration: E(B)
212
220
  })))
213
221
  ]),
214
222
  _: 3
215
223
  })], 4)),
216
- J.value ? (S(), u("div", be, [d("div", xe, [m(v, { modifiers: "callout" }, {
217
- default: O(() => [d("div", Se, [m(i, {
224
+ Y.value ? (S(), u("div", Se, [d("div", Ce, [m(v, { modifiers: "callout" }, {
225
+ default: O(() => [d("div", we, [m(i, {
218
226
  name: "ri:alert-line",
219
227
  class: "pk-chatbot__warning-icon"
220
- }), d("strong", Ce, T(E(j)("message.warning")), 1)]), d("p", we, T(E(j)("message.reasoningAgent")), 1)]),
228
+ }), d("strong", Te, T(E(j)("message.warning")), 1)]), d("p", Ee, T(E(j)("message.reasoningAgent")), 1)]),
221
229
  _: 1
222
230
  })])])) : l("", !0),
223
231
  E(R) === "chat" ? (S(), c(te, {
@@ -243,15 +251,15 @@ var ve = { class: "pk-chatbot__header-start" }, ye = ["title"], be = { key: 1 },
243
251
  }))]), 1032, ["agent-id"])) : E(R) === "files" ? (S(), c(ne, {
244
252
  key: 4,
245
253
  "agent-id": h.agentId
246
- }, null, 8, ["agent-id"])) : E(R) === "auth" ? (S(), u("div", Te, [w(e.$slots, "view-auth")])) : (S(), c(ie, {
254
+ }, null, 8, ["agent-id"])) : E(R) === "auth" ? (S(), u("div", De, [w(e.$slots, "view-auth")])) : (S(), c(ie, {
247
255
  key: 6,
248
256
  "agent-id": h.agentId
249
257
  }, f({ _: 2 }, [C(Object.keys(E(A)), (t) => ({
250
258
  name: t,
251
259
  fn: O((n) => [w(e.$slots, t, b(g(n)))])
252
260
  }))]), 1032, ["agent-id"])),
253
- E(Q) ? (S(), u("div", Ee, [m(t, {
254
- markdown: E(Q),
261
+ E(Be) ? (S(), u("div", Oe, [m(t, {
262
+ markdown: E(Be),
255
263
  class: "wysiwyg"
256
264
  }, null, 8, ["markdown"])])) : l("", !0)
257
265
  ], 2);
@@ -261,4 +269,4 @@ var ve = { class: "pk-chatbot__header-start" }, ye = ["title"], be = { key: 1 },
261
269
  //#endregion
262
270
  export { k as t };
263
271
 
264
- //# sourceMappingURL=PkChatbot-a8Wh4tN4.js.map
272
+ //# sourceMappingURL=PkChatbot-i_07-rvf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PkChatbot-i_07-rvf.js","names":[],"sources":["../../../../packages/components/src/chat/PkChatbot.vue","../../../../packages/components/src/chat/PkChatbot.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import {\n computed,\n inject,\n toRef,\n useTemplateRef,\n watch,\n watchEffect,\n useSlots,\n } from 'vue'\n import { useElementSize } from '@vueuse/core'\n import { storeToRefs } from 'pinia'\n import { useI18n } from 'vue-i18n'\n import type {\n AgentInterface,\n AgentModel,\n AgentFileUpload,\n AgentGatewayOptions,\n AgentVoiceCapability,\n ChatMessageActions,\n RevisedAnswer,\n UIChatMessage,\n AgentTools,\n } from 'models'\n import {\n useChatbotStore,\n useLocalizedString,\n provideShortUrlResolver,\n } from 'composables'\n import PkAvatar from './PkAvatar.vue'\n import PkChatbotViewChat from './PkChatbotViewChat.vue'\n import PkChatbotViewConversations from './PkChatbotViewConversations.vue'\n import PkChatbotViewFiles from './PkChatbotViewFiles.vue'\n import PkChatbotViewProfile from './PkChatbotViewProfile.vue'\n import PkStreamingMarkdown from './PkStreamingMarkdown.vue'\n import { ChatbotProfileContextKey } from './chatbotProfileContext'\n import { resolveContrastColor } from './utils'\n\n // Captured in script setup to avoid TS7022 circular inference in template\n const slots = useSlots()\n\n const { t: $t } = useI18n({\n useScope: 'global',\n })\n\n const props = defineProps<{\n baseUrl: string\n basePath?: string\n agentId: string\n agentType?: 'reasoning' | 'chat'\n userId?: string\n name?: string\n model?: string\n agentModel?: AgentModel\n agentTools?: AgentTools\n agentInterface?: AgentInterface\n actions?: ChatMessageActions[]\n revisedAnswers?: RevisedAnswer[]\n headers?: Record<string, string>\n systemTheme?: 'light' | 'dark'\n agentFileUpload?: AgentFileUpload\n /** Voice configuration from the agent settings: enables the talk button. */\n voice?: AgentVoiceCapability\n fallbackModels?: string[]\n gatewayOptions?: Partial<AgentGatewayOptions>\n externalContext?: Record<string, unknown>\n /** Layout modifier: `widget` (default) keeps the contained layout with header, `fullscreen` removes header/background for full-page usage (the page provides the chrome), `panel` keeps the header but slims it down for a docked side panel (the host provides background and border) */\n modifier?: 'widget' | 'fullscreen' | 'panel'\n /** Display name of the current user, used for the `{name}` placeholder in the fullscreen greeting */\n userName?: string\n /** Show the \"Files in this chat\" menu for hosts that don't provide the\n * profile context but whose user is authenticated (e.g. the backoffice\n * playground). The widget host relies on `canManageProfile` instead. */\n userFilesEnabled?: boolean\n }>()\n const emit = defineEmits<{\n 'message-update': [message: UIChatMessage]\n 'show-info': [message: UIChatMessage]\n revise: [message: UIChatMessage]\n error: [error: { type: string; title: string; status: number }]\n }>()\n\n const chatId = defineModel<string | undefined>('chatId', {\n type: String,\n default: undefined,\n })\n\n const store = useChatbotStore(props.agentId)\n\n // Resolve backend short-urls (`/api/r/<hash>`) back to their real target\n // for display in tool components. Batched + cached across the chat tree.\n provideShortUrlResolver((hashes) =>\n store.apiClient.resolveShortUrls(hashes),\n )\n\n const { messages, chat, localChatId, activeView, chatError, isDark } =\n storeToRefs(store)\n\n // Ref to store.agentId for watchers (avoids duplicate-key with agentId prop)\n const storeAgentId = toRef(store, 'agentId')\n\n const { startNewChat, stopGeneration, regenerate, navigate, sendMessage } =\n store\n\n // Optional profile-management context provided by the host widget.\n // Present only for authenticated, non-anonymous sessions.\n const profile = inject(ChatbotProfileContextKey, undefined)\n const canManageProfile = computed(\n () => profile?.canManageProfile.value ?? false,\n )\n // Anonymous users get a \"Sign in\" entry instead of the profile one,\n // provided the host filled the `view-auth` slot and the agent has at\n // least one auth method enabled.\n const canSignIn = computed(\n () =>\n !canManageProfile.value &&\n (profile?.canSignIn?.value ?? false) &&\n slots['view-auth'] !== undefined,\n )\n\n // Once the sign-in completes (the session becomes non-anonymous) leave\n // the auth view and return to the conversation.\n watch(canManageProfile, (canManage) => {\n if (canManage && activeView.value === 'auth') {\n navigate('chat')\n }\n })\n\n // Sync props → store reactively\n watchEffect(() => {\n store.baseUrl = props.baseUrl\n store.basePath = props.basePath\n store.name = props.name\n store.agentType = props.agentType\n store.userId = props.userId\n store.agentInterface = props.agentInterface\n store.agentModel = props.agentModel\n store.agentTools = props.agentTools\n store.headers = props.headers\n store.revisedAnswers = props.revisedAnswers\n store.model = props.model\n store.actionsInput = props.actions\n store.agentFileUpload = props.agentFileUpload\n store.agentVoice = props.voice\n store.fallbackModels = props.fallbackModels\n store.gatewayOptions = props.gatewayOptions\n store.externalContext = props.externalContext\n store.systemTheme = props.systemTheme\n store.hideWelcomeMessage = props.modifier === 'fullscreen'\n })\n\n // Sync chatId v-model ↔ store (bidirectional)\n // Parent → store: if the parent provides an external chatId, push it into\n // the store so the Chat instance picks it up.\n watch(\n () => chatId.value,\n (id) => {\n if (id && id !== store.localChatId) {\n store.localChatId = id\n }\n },\n { immediate: true },\n )\n // Store → parent: keep the v-model in sync whenever the store changes\n // the chatId internally (e.g. startNewChat).\n watch(localChatId, (id) => {\n chatId.value = id\n })\n\n // Emit structured errors from chat to the parent component\n watch(chatError, (error) => {\n if (!error) {\n return\n }\n try {\n const parsedError = JSON.parse(error.message) as {\n type: string\n title: string\n status: number\n }\n emit('error', parsedError)\n } catch {\n // ignore non-JSON errors\n }\n })\n\n // ui\n const isFullscreen = computed(() => props.modifier === 'fullscreen')\n const isPanel = computed(() => props.modifier === 'panel')\n\n /**\n * How much room the chat has, measured on the chat and not on the window.\n *\n * The same chat renders in a phone page, in a 408px widget, in a docked\n * panel and in a preview frame that the side panels squeeze to phone width\n * on a desktop screen, so the viewport says nothing about the space the\n * layout actually has. A CSS container query would read the same number\n * with no JavaScript, but `container-type` makes the element a containing\n * block for `position: fixed` descendants on every engine except Chrome\n * 129 and later, which displaces every dropdown in the chat: see\n * docs/agents/gotchas.md, \"The chat measures its own width, and not with a\n * container query\".\n *\n * The thresholds carry the modifiers, so the CSS stays declarative:\n * `--phone` has as much room as a phone page, `--tight` is too tight for\n * the agent chip beside the field, `--wide` has room for the outline rail\n * beside the reading column. Before the first measurement the width is 0\n * and no modifier applies, which is the roomy layout the base CSS writes.\n */\n const chatbotEl = useTemplateRef<HTMLDivElement>('chatbotEl')\n const { width: chatbotWidth } = useElementSize(chatbotEl)\n const isPhoneWidth = computed(\n () => chatbotWidth.value > 0 && chatbotWidth.value < 576,\n )\n const isTightWidth = computed(\n () => chatbotWidth.value > 0 && chatbotWidth.value < 640,\n )\n const isWideWidth = computed(() => chatbotWidth.value >= 848)\n const isReasoningAgent = computed(() => props.agentType === 'reasoning')\n const useColorsForAgentHeader = computed(\n () => props.agentInterface?.useColorsForAgentHeader,\n )\n // Panel mode promotes the everyday actions (new chat, history) from the\n // dropdown to direct header buttons: the dropdown then only remains for\n // the secondary entries (files, profile, sign-in) and disappears when\n // none of them applies.\n const showHeaderMenu = computed(\n () =>\n !isPanel.value ||\n canManageProfile.value ||\n canSignIn.value ||\n (!!props.userFilesEnabled && !!localChatId.value),\n )\n const themeClass = computed(() => [\n 'theme',\n `theme--${isDark.value ? 'dark' : 'light'}`,\n ])\n const mainColor = computed(() => props.agentInterface?.mainColor)\n const contrastColor = computed(() =>\n resolveContrastColor(props.agentInterface?.textColor, mainColor.value),\n )\n const footerMessage = useLocalizedString(\n () => props.agentInterface?.footerMessage,\n )\n const title = computed(() => {\n if (activeView.value === 'conversations') {\n return $t('label.conversations')\n }\n if (activeView.value === 'profile') {\n return $t('label.profile')\n }\n if (activeView.value === 'auth') {\n return $t('label.authentication')\n }\n if (activeView.value === 'files') {\n return $t('userFiles.chatFilesTitle')\n }\n return props.name\n })\n\n // state\n const isReady = computed(() => chat.value.status === 'ready')\n const activeMessage = computed(() => {\n return messages.value?.[messages.value.length - 1]\n })\n\n // expose\n defineExpose({\n startNewChat,\n regenerate,\n stopGeneration,\n sendMessage,\n })\n\n // load chat, conversations and feedbacks on agent or chat change\n watch(\n [storeAgentId, localChatId],\n async ([newAgentId, newChatId]) => {\n await store.initialize(newAgentId, newChatId)\n },\n {\n immediate: true,\n },\n )\n // load conversations when navigating to conversations view\n watch(activeView, (newView) => {\n if (newView === 'conversations') {\n store.loadConversations(storeAgentId.value)\n } else if (newView === 'files') {\n store.loadChatFiles()\n }\n })\n // emit message updates for up-to-date context in parent components\n watch(\n activeMessage,\n (message) => {\n if (message) {\n emit('message-update', message)\n }\n },\n {\n deep: true,\n immediate: true,\n },\n )\n</script>\n\n<template>\n <div\n ref=\"chatbotEl\"\n class=\"pk-chatbot\"\n :class=\"[\n themeClass,\n {\n 'pk-chatbot--fullscreen': isFullscreen,\n 'pk-chatbot--panel': isPanel,\n 'pk-chatbot--phone': isPhoneWidth,\n 'pk-chatbot--tight': isTightWidth,\n 'pk-chatbot--wide': isWideWidth,\n },\n ]\">\n <!-- #region title -->\n <div\n v-if=\"!isFullscreen\"\n class=\"pk-chatbot__header\"\n :style=\"\n useColorsForAgentHeader\n ? {\n backgroundColor: mainColor,\n }\n : undefined\n \">\n <div class=\"pk-chatbot__header-start\">\n <template v-if=\"activeView !== 'chat'\">\n <VvButton\n v-bind=\"{\n modifiers: useColorsForAgentHeader\n ? `action-quiet-${contrastColor}`\n : 'action-quiet',\n icon: 'ri:arrow-left-s-line',\n title: $t('action.goBack'),\n }\"\n @click=\"navigate('chat')\" />\n <VvIcon\n :name=\"\n activeView === 'conversations'\n ? 'ri:history-line'\n : activeView === 'files'\n ? 'ri:attachment-2'\n : 'ri:user-line'\n \"\n class=\"pk-chatbot__nav-icon\"\n :style=\"\n useColorsForAgentHeader\n ? {\n color: contrastColor,\n }\n : undefined\n \" />\n </template>\n <!-- Panel mode: no avatar, the docked panel identifies the\n agent with the title alone -->\n <PkAvatar\n v-else-if=\"!isPanel\"\n modifiers=\"surface ring shrink-0\"\n class=\"pk-chatbot__avatar\"\n :name\n :img-src=\"agentInterface?.logo\" />\n <strong\n class=\"pk-chatbot__title\"\n :title=\"title\"\n :style=\"\n useColorsForAgentHeader\n ? {\n color: contrastColor,\n }\n : undefined\n \">\n {{ title }}\n </strong>\n </div>\n <VvButtonGroup class=\"pk-chatbot__header-end\" modifiers=\"compact\">\n <slot\n name=\"header-actions\"\n v-bind=\"{\n mainColor,\n useColorsForAgentHeader,\n contrastColor,\n startNewChat,\n stopGeneration,\n }\" />\n <template v-if=\"isPanel\">\n <VvButton\n :modifiers=\"\n useColorsForAgentHeader\n ? `action-quiet-${contrastColor}`\n : 'action-quiet'\n \"\n icon=\"ri:edit-box-line\"\n :disabled=\"!isReady\"\n :title=\"$t('action.startNewChat')\"\n @click=\"startNewChat()\" />\n <VvButton\n v-if=\"!isReasoningAgent\"\n :modifiers=\"\n useColorsForAgentHeader\n ? `action-quiet-${contrastColor}`\n : 'action-quiet'\n \"\n icon=\"ri:history-line\"\n :disabled=\"!isReady\"\n :title=\"$t('action.viewRecentChats')\"\n @click=\"navigate('conversations')\" />\n </template>\n <VvDropdown\n v-if=\"showHeaderMenu\"\n v-bind=\"{\n placement: 'bottom-end',\n modifiers: 'menu',\n flip: true,\n offset: 3,\n strategy: 'fixed',\n }\">\n <VvButton\n v-bind=\"{\n modifiers: useColorsForAgentHeader\n ? `action-quiet-${contrastColor}`\n : 'action-quiet',\n icon: 'ri:more-2-fill',\n disabled: !isReady,\n title: $t('action.moreActions'),\n }\" />\n <template #items>\n <VvDropdownAction\n v-if=\"!isPanel\"\n @click=\"startNewChat()\">\n <VvIcon name=\"ri:edit-box-line\" />\n {{ $t('action.startNewChat') }}\n </VvDropdownAction>\n <VvDropdownAction\n v-if=\"!isReasoningAgent && !isPanel\"\n @click=\"navigate('conversations')\">\n <VvIcon name=\"ri:history-line\" />\n {{ $t('action.viewRecentChats') }}\n </VvDropdownAction>\n <VvDropdownAction\n v-if=\"\n (canManageProfile || userFilesEnabled) &&\n localChatId\n \"\n @click=\"navigate('files')\">\n <VvIcon name=\"ri:attachment-2\" />\n {{ $t('userFiles.chatFilesTitle') }}\n </VvDropdownAction>\n <VvDropdownAction\n v-if=\"canManageProfile\"\n @click=\"navigate('profile')\">\n <VvIcon name=\"ri:user-line\" />\n {{ $t('label.profile') }}\n </VvDropdownAction>\n <VvDropdownAction\n v-else-if=\"canSignIn\"\n @click=\"navigate('auth')\">\n <VvIcon name=\"ri:account-circle-line\" />\n {{ $t('action.signIn') }}\n </VvDropdownAction>\n </template>\n </VvDropdown>\n <slot\n name=\"actions\"\n v-bind=\"{\n mainColor,\n useColorsForAgentHeader,\n contrastColor,\n startNewChat,\n stopGeneration,\n }\" />\n </VvButtonGroup>\n </div>\n <!-- #endregion -->\n\n <div v-if=\"isReasoningAgent\">\n <div class=\"pk-chatbot__warning-body\">\n <VvAlert modifiers=\"callout\">\n <div class=\"pk-chatbot__warning-header\">\n <VvIcon\n name=\"ri:alert-line\"\n class=\"pk-chatbot__warning-icon\" />\n <strong class=\"pk-chatbot__warning-title\">\n {{ $t('message.warning') }}\n </strong>\n </div>\n <p class=\"pk-chatbot__warning-text\">\n {{ $t('message.reasoningAgent') }}\n </p>\n </VvAlert>\n </div>\n </div>\n\n <!-- #region views -->\n <PkChatbotViewChat\n v-if=\"activeView === 'chat'\"\n :agent-id\n :modifier\n :user-name\n @show-info=\"emit('show-info', $event)\"\n @revise=\"emit('revise', $event)\">\n <template\n v-for=\"slotName in Object.keys(slots)\"\n #[slotName]=\"slotData\"\n ><slot :name=\"slotName\" v-bind=\"slotData\"\n /></template>\n </PkChatbotViewChat>\n <PkChatbotViewConversations\n v-else-if=\"activeView === 'conversations'\"\n :agent-id>\n <template\n v-for=\"slotName in Object.keys(slots)\"\n #[slotName]=\"slotData\"\n ><slot :name=\"slotName\" v-bind=\"slotData\"\n /></template>\n </PkChatbotViewConversations>\n <PkChatbotViewFiles v-else-if=\"activeView === 'files'\" :agent-id />\n <div\n v-else-if=\"activeView === 'auth'\"\n class=\"pk-chatbot__view-auth flex-1 min-h-0 overflow-y-auto\">\n <!-- Sign-in form provided by the host widget (owns the auth client) -->\n <slot name=\"view-auth\" />\n </div>\n <PkChatbotViewProfile v-else :agent-id>\n <template\n v-for=\"slotName in Object.keys(slots)\"\n #[slotName]=\"slotData\"\n ><slot :name=\"slotName\" v-bind=\"slotData\"\n /></template>\n </PkChatbotViewProfile>\n <!-- #endregion -->\n\n <!-- #region footer -->\n <div v-if=\"footerMessage\" class=\"pk-chatbot__footer\">\n <PkStreamingMarkdown :markdown=\"footerMessage\" class=\"wysiwyg\" />\n </div>\n <!-- #endregion -->\n </div>\n</template>\n\n<style lang=\"scss\">\n .pk-chatbot {\n display: flex;\n flex-direction: column;\n position: relative;\n height: 100%;\n background-color: var(--color-surface);\n\n &__header {\n position: sticky;\n top: 0;\n z-index: 1;\n display: flex;\n justify-content: space-between;\n gap: var(--spacing-14);\n background-color: var(--color-surface-1);\n padding: var(--spacing-14);\n border-bottom: 1px solid var(--color-surface-4);\n }\n\n &__header-start {\n display: flex;\n align-items: center;\n gap: var(--spacing-sm);\n min-width: 0;\n }\n\n &__nav-icon {\n font-size: var(--text-18);\n }\n\n &__avatar {\n width: var(--spacing-24);\n height: var(--spacing-24);\n }\n\n &__title {\n font-size: var(--text-16);\n font-weight: var(--font-semibold);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n &__header-end {\n flex-shrink: 0;\n }\n\n &__warning-body {\n padding: var(--spacing-md);\n border-bottom: 1px solid var(--color-surface-4);\n }\n\n &__warning-header {\n display: flex;\n align-items: center;\n gap: var(--spacing-4);\n margin-bottom: var(--spacing-4);\n }\n\n &__warning-icon {\n width: var(--spacing-16);\n height: var(--spacing-16);\n }\n\n &__warning-title {\n font-weight: 600;\n font-size: var(--text-14);\n }\n\n &__warning-text {\n font-size: var(--text-12);\n color: var(--color-word-3);\n }\n\n &__footer {\n padding: var(--spacing-md);\n border-top: 1px solid var(--color-surface-4);\n text-align: center;\n font-size: var(--text-12);\n color: var(--color-word-2);\n }\n\n // Modifier: fullscreen — layout full-page (Gemini-style): nessun\n // header interno, sfondo trasparente, input pill centrato.\n // Il chrome (sidebar, navigazione) è gestito dalla pagina ospite.\n &--fullscreen {\n background-color: transparent;\n\n .pk-chatbot__footer {\n border-top: none;\n padding: 0 var(--spacing-md) var(--spacing-sm) var(--spacing-md);\n }\n\n // Reading column aligned with the input (Gemini-style). The\n // constraint lives on the inner wrapper so the scroll container\n // spans the page and the scrollbar sits at its edge.\n .pk-chatbot-messages {\n // Symmetric gutters: a visible scrollbar would otherwise\n // shrink the content box on one side only, shifting the\n // column off the input axis\n scrollbar-gutter: stable both-edges;\n // Dissolve the content at both edges (works on any page\n // background, dots included — a surface-colored fade band\n // would cut through the pattern instead)\n mask-image: linear-gradient(\n to bottom,\n transparent 0,\n #000 var(--spacing-40),\n #000 calc(100% - var(--spacing-40)),\n transparent 100%\n );\n // Resting clearance so the first/last lines sit inside the\n // fully opaque zone\n padding-block: var(--spacing-48);\n }\n\n .pk-chatbot-messages__wrapper {\n width: 100%;\n max-width: 768px;\n margin-inline: auto;\n }\n\n // Outline rail: wide chats only, measured on the chat and not on\n // the viewport, so a preview frame squeezed by side panels loses\n // it like a phone does. The rail sits at the edge of the scroll\n // area beside the reading column: below the `--wide` threshold\n // (768px column plus a 40px rail on each side) it would cover the\n // messages instead.\n .pk-chatbot-messages__outline {\n display: none;\n }\n\n &.pk-chatbot--wide .pk-chatbot-messages__outline {\n display: block;\n }\n\n .pk-chatbot-file-preview {\n background-color: var(--color-surface);\n }\n\n .pk-chatbot-input__notice {\n background-color: var(--color-surface);\n border-inline: 1px solid var(--color-surface-3);\n border-top: 1px solid var(--color-surface-2);\n padding: var(--spacing-10) var(--spacing-16);\n\n &::after {\n background-color: var(--color-surface);\n border-inline: 1px solid var(--color-surface-2);\n bottom: calc(-1 * var(--spacing-20));\n height: var(--spacing-20);\n left: -1px;\n right: -1px;\n }\n }\n\n .pk-chatbot-input {\n width: calc(100% - var(--spacing-sm) * 2);\n max-width: 768px;\n margin-inline: auto;\n\n &__form {\n border-radius: var(--rounded-xxxl); // pill shape\n padding: var(--spacing-12) var(--spacing-16);\n background-color: var(--color-surface-1);\n border-color: var(--color-surface-2);\n box-shadow: none;\n transition:\n border-color var(--duration-200) var(--ease-in-out),\n box-shadow var(--duration-200) var(--ease-in-out);\n\n &:has(:focus-within) {\n border-color: var(--color-surface-4);\n box-shadow: var(--shadow-sm);\n }\n\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n }\n\n &__textarea {\n background-color: transparent;\n }\n }\n\n // Touch target ≥44px: estende l'hit area dei pulsanti\n // (icona 20px + padding 4px ≈ 28px) senza ingrandire l'icona.\n // Vale per l'input e per la barra della chiamata, che montano\n // lo stesso pulsante.\n .pk-chat-button {\n position: relative;\n\n &::after {\n content: '';\n position: absolute;\n inset: calc(-1 * var(--spacing-8));\n }\n }\n\n // A live call takes the place of the input, so it takes its shape,\n // its column and its height: full-bleed here would break the\n // reading axis, and a different height would make the dock jump\n // the moment the call starts.\n .pk-voice-session {\n // 60px. There is no 60 in the spacing scale and a raw `60px`\n // would stop following the root font size, which the label\n // inside does follow.\n --pk-chat-dock-height: calc(\n var(--spacing-56) + var(--spacing-4)\n );\n --pk-voice-orb-size: var(--spacing-40);\n --pk-voice-orb-bars-height: var(--spacing-20);\n --pk-voice-session-surface: var(--color-surface-1);\n width: calc(100% - var(--spacing-sm) * 2);\n max-width: 768px;\n margin-inline: auto;\n padding-inline: var(--spacing-16);\n border-color: var(--color-surface-2);\n border-radius: var(--rounded-xxxl); // pill shape\n box-shadow: none;\n\n &__timer {\n font-size: var(--text-14);\n }\n }\n }\n\n // Modifier: panel — compact chrome for a docked side panel: the host\n // container owns background and border, the header slims down and\n // drops its own surface so the chat blends into the panel.\n &--panel {\n background-color: transparent;\n\n .pk-chatbot__header {\n background-color: transparent;\n\n // Fixed height so the panel header lines up with the host's\n // own chrome. Custom properties inherit through the shadow\n // root: an embedding host can override it to match its\n // header (the default matches the platform header, 50px).\n height: var(--pk-chatbot-panel-header-height, 50px);\n align-items: center;\n padding-block: 0;\n padding-inline: var(--spacing-10);\n border-bottom: 1px solid var(--color-surface-3);\n }\n\n .pk-chatbot__title {\n font-size: var(--text-14);\n }\n\n .pk-chatbot__footer {\n border-top: none;\n padding: var(--spacing-6) var(--spacing-md);\n }\n }\n }\n</style>\n","<script setup lang=\"ts\">\n import {\n computed,\n inject,\n toRef,\n useTemplateRef,\n watch,\n watchEffect,\n useSlots,\n } from 'vue'\n import { useElementSize } from '@vueuse/core'\n import { storeToRefs } from 'pinia'\n import { useI18n } from 'vue-i18n'\n import type {\n AgentInterface,\n AgentModel,\n AgentFileUpload,\n AgentGatewayOptions,\n AgentVoiceCapability,\n ChatMessageActions,\n RevisedAnswer,\n UIChatMessage,\n AgentTools,\n } from 'models'\n import {\n useChatbotStore,\n useLocalizedString,\n provideShortUrlResolver,\n } from 'composables'\n import PkAvatar from './PkAvatar.vue'\n import PkChatbotViewChat from './PkChatbotViewChat.vue'\n import PkChatbotViewConversations from './PkChatbotViewConversations.vue'\n import PkChatbotViewFiles from './PkChatbotViewFiles.vue'\n import PkChatbotViewProfile from './PkChatbotViewProfile.vue'\n import PkStreamingMarkdown from './PkStreamingMarkdown.vue'\n import { ChatbotProfileContextKey } from './chatbotProfileContext'\n import { resolveContrastColor } from './utils'\n\n // Captured in script setup to avoid TS7022 circular inference in template\n const slots = useSlots()\n\n const { t: $t } = useI18n({\n useScope: 'global',\n })\n\n const props = defineProps<{\n baseUrl: string\n basePath?: string\n agentId: string\n agentType?: 'reasoning' | 'chat'\n userId?: string\n name?: string\n model?: string\n agentModel?: AgentModel\n agentTools?: AgentTools\n agentInterface?: AgentInterface\n actions?: ChatMessageActions[]\n revisedAnswers?: RevisedAnswer[]\n headers?: Record<string, string>\n systemTheme?: 'light' | 'dark'\n agentFileUpload?: AgentFileUpload\n /** Voice configuration from the agent settings: enables the talk button. */\n voice?: AgentVoiceCapability\n fallbackModels?: string[]\n gatewayOptions?: Partial<AgentGatewayOptions>\n externalContext?: Record<string, unknown>\n /** Layout modifier: `widget` (default) keeps the contained layout with header, `fullscreen` removes header/background for full-page usage (the page provides the chrome), `panel` keeps the header but slims it down for a docked side panel (the host provides background and border) */\n modifier?: 'widget' | 'fullscreen' | 'panel'\n /** Display name of the current user, used for the `{name}` placeholder in the fullscreen greeting */\n userName?: string\n /** Show the \"Files in this chat\" menu for hosts that don't provide the\n * profile context but whose user is authenticated (e.g. the backoffice\n * playground). The widget host relies on `canManageProfile` instead. */\n userFilesEnabled?: boolean\n }>()\n const emit = defineEmits<{\n 'message-update': [message: UIChatMessage]\n 'show-info': [message: UIChatMessage]\n revise: [message: UIChatMessage]\n error: [error: { type: string; title: string; status: number }]\n }>()\n\n const chatId = defineModel<string | undefined>('chatId', {\n type: String,\n default: undefined,\n })\n\n const store = useChatbotStore(props.agentId)\n\n // Resolve backend short-urls (`/api/r/<hash>`) back to their real target\n // for display in tool components. Batched + cached across the chat tree.\n provideShortUrlResolver((hashes) =>\n store.apiClient.resolveShortUrls(hashes),\n )\n\n const { messages, chat, localChatId, activeView, chatError, isDark } =\n storeToRefs(store)\n\n // Ref to store.agentId for watchers (avoids duplicate-key with agentId prop)\n const storeAgentId = toRef(store, 'agentId')\n\n const { startNewChat, stopGeneration, regenerate, navigate, sendMessage } =\n store\n\n // Optional profile-management context provided by the host widget.\n // Present only for authenticated, non-anonymous sessions.\n const profile = inject(ChatbotProfileContextKey, undefined)\n const canManageProfile = computed(\n () => profile?.canManageProfile.value ?? false,\n )\n // Anonymous users get a \"Sign in\" entry instead of the profile one,\n // provided the host filled the `view-auth` slot and the agent has at\n // least one auth method enabled.\n const canSignIn = computed(\n () =>\n !canManageProfile.value &&\n (profile?.canSignIn?.value ?? false) &&\n slots['view-auth'] !== undefined,\n )\n\n // Once the sign-in completes (the session becomes non-anonymous) leave\n // the auth view and return to the conversation.\n watch(canManageProfile, (canManage) => {\n if (canManage && activeView.value === 'auth') {\n navigate('chat')\n }\n })\n\n // Sync props → store reactively\n watchEffect(() => {\n store.baseUrl = props.baseUrl\n store.basePath = props.basePath\n store.name = props.name\n store.agentType = props.agentType\n store.userId = props.userId\n store.agentInterface = props.agentInterface\n store.agentModel = props.agentModel\n store.agentTools = props.agentTools\n store.headers = props.headers\n store.revisedAnswers = props.revisedAnswers\n store.model = props.model\n store.actionsInput = props.actions\n store.agentFileUpload = props.agentFileUpload\n store.agentVoice = props.voice\n store.fallbackModels = props.fallbackModels\n store.gatewayOptions = props.gatewayOptions\n store.externalContext = props.externalContext\n store.systemTheme = props.systemTheme\n store.hideWelcomeMessage = props.modifier === 'fullscreen'\n })\n\n // Sync chatId v-model ↔ store (bidirectional)\n // Parent → store: if the parent provides an external chatId, push it into\n // the store so the Chat instance picks it up.\n watch(\n () => chatId.value,\n (id) => {\n if (id && id !== store.localChatId) {\n store.localChatId = id\n }\n },\n { immediate: true },\n )\n // Store → parent: keep the v-model in sync whenever the store changes\n // the chatId internally (e.g. startNewChat).\n watch(localChatId, (id) => {\n chatId.value = id\n })\n\n // Emit structured errors from chat to the parent component\n watch(chatError, (error) => {\n if (!error) {\n return\n }\n try {\n const parsedError = JSON.parse(error.message) as {\n type: string\n title: string\n status: number\n }\n emit('error', parsedError)\n } catch {\n // ignore non-JSON errors\n }\n })\n\n // ui\n const isFullscreen = computed(() => props.modifier === 'fullscreen')\n const isPanel = computed(() => props.modifier === 'panel')\n\n /**\n * How much room the chat has, measured on the chat and not on the window.\n *\n * The same chat renders in a phone page, in a 408px widget, in a docked\n * panel and in a preview frame that the side panels squeeze to phone width\n * on a desktop screen, so the viewport says nothing about the space the\n * layout actually has. A CSS container query would read the same number\n * with no JavaScript, but `container-type` makes the element a containing\n * block for `position: fixed` descendants on every engine except Chrome\n * 129 and later, which displaces every dropdown in the chat: see\n * docs/agents/gotchas.md, \"The chat measures its own width, and not with a\n * container query\".\n *\n * The thresholds carry the modifiers, so the CSS stays declarative:\n * `--phone` has as much room as a phone page, `--tight` is too tight for\n * the agent chip beside the field, `--wide` has room for the outline rail\n * beside the reading column. Before the first measurement the width is 0\n * and no modifier applies, which is the roomy layout the base CSS writes.\n */\n const chatbotEl = useTemplateRef<HTMLDivElement>('chatbotEl')\n const { width: chatbotWidth } = useElementSize(chatbotEl)\n const isPhoneWidth = computed(\n () => chatbotWidth.value > 0 && chatbotWidth.value < 576,\n )\n const isTightWidth = computed(\n () => chatbotWidth.value > 0 && chatbotWidth.value < 640,\n )\n const isWideWidth = computed(() => chatbotWidth.value >= 848)\n const isReasoningAgent = computed(() => props.agentType === 'reasoning')\n const useColorsForAgentHeader = computed(\n () => props.agentInterface?.useColorsForAgentHeader,\n )\n // Panel mode promotes the everyday actions (new chat, history) from the\n // dropdown to direct header buttons: the dropdown then only remains for\n // the secondary entries (files, profile, sign-in) and disappears when\n // none of them applies.\n const showHeaderMenu = computed(\n () =>\n !isPanel.value ||\n canManageProfile.value ||\n canSignIn.value ||\n (!!props.userFilesEnabled && !!localChatId.value),\n )\n const themeClass = computed(() => [\n 'theme',\n `theme--${isDark.value ? 'dark' : 'light'}`,\n ])\n const mainColor = computed(() => props.agentInterface?.mainColor)\n const contrastColor = computed(() =>\n resolveContrastColor(props.agentInterface?.textColor, mainColor.value),\n )\n const footerMessage = useLocalizedString(\n () => props.agentInterface?.footerMessage,\n )\n const title = computed(() => {\n if (activeView.value === 'conversations') {\n return $t('label.conversations')\n }\n if (activeView.value === 'profile') {\n return $t('label.profile')\n }\n if (activeView.value === 'auth') {\n return $t('label.authentication')\n }\n if (activeView.value === 'files') {\n return $t('userFiles.chatFilesTitle')\n }\n return props.name\n })\n\n // state\n const isReady = computed(() => chat.value.status === 'ready')\n const activeMessage = computed(() => {\n return messages.value?.[messages.value.length - 1]\n })\n\n // expose\n defineExpose({\n startNewChat,\n regenerate,\n stopGeneration,\n sendMessage,\n })\n\n // load chat, conversations and feedbacks on agent or chat change\n watch(\n [storeAgentId, localChatId],\n async ([newAgentId, newChatId]) => {\n await store.initialize(newAgentId, newChatId)\n },\n {\n immediate: true,\n },\n )\n // load conversations when navigating to conversations view\n watch(activeView, (newView) => {\n if (newView === 'conversations') {\n store.loadConversations(storeAgentId.value)\n } else if (newView === 'files') {\n store.loadChatFiles()\n }\n })\n // emit message updates for up-to-date context in parent components\n watch(\n activeMessage,\n (message) => {\n if (message) {\n emit('message-update', message)\n }\n },\n {\n deep: true,\n immediate: true,\n },\n )\n</script>\n\n<template>\n <div\n ref=\"chatbotEl\"\n class=\"pk-chatbot\"\n :class=\"[\n themeClass,\n {\n 'pk-chatbot--fullscreen': isFullscreen,\n 'pk-chatbot--panel': isPanel,\n 'pk-chatbot--phone': isPhoneWidth,\n 'pk-chatbot--tight': isTightWidth,\n 'pk-chatbot--wide': isWideWidth,\n },\n ]\">\n <!-- #region title -->\n <div\n v-if=\"!isFullscreen\"\n class=\"pk-chatbot__header\"\n :style=\"\n useColorsForAgentHeader\n ? {\n backgroundColor: mainColor,\n }\n : undefined\n \">\n <div class=\"pk-chatbot__header-start\">\n <template v-if=\"activeView !== 'chat'\">\n <VvButton\n v-bind=\"{\n modifiers: useColorsForAgentHeader\n ? `action-quiet-${contrastColor}`\n : 'action-quiet',\n icon: 'ri:arrow-left-s-line',\n title: $t('action.goBack'),\n }\"\n @click=\"navigate('chat')\" />\n <VvIcon\n :name=\"\n activeView === 'conversations'\n ? 'ri:history-line'\n : activeView === 'files'\n ? 'ri:attachment-2'\n : 'ri:user-line'\n \"\n class=\"pk-chatbot__nav-icon\"\n :style=\"\n useColorsForAgentHeader\n ? {\n color: contrastColor,\n }\n : undefined\n \" />\n </template>\n <!-- Panel mode: no avatar, the docked panel identifies the\n agent with the title alone -->\n <PkAvatar\n v-else-if=\"!isPanel\"\n modifiers=\"surface ring shrink-0\"\n class=\"pk-chatbot__avatar\"\n :name\n :img-src=\"agentInterface?.logo\" />\n <strong\n class=\"pk-chatbot__title\"\n :title=\"title\"\n :style=\"\n useColorsForAgentHeader\n ? {\n color: contrastColor,\n }\n : undefined\n \">\n {{ title }}\n </strong>\n </div>\n <VvButtonGroup class=\"pk-chatbot__header-end\" modifiers=\"compact\">\n <slot\n name=\"header-actions\"\n v-bind=\"{\n mainColor,\n useColorsForAgentHeader,\n contrastColor,\n startNewChat,\n stopGeneration,\n }\" />\n <template v-if=\"isPanel\">\n <VvButton\n :modifiers=\"\n useColorsForAgentHeader\n ? `action-quiet-${contrastColor}`\n : 'action-quiet'\n \"\n icon=\"ri:edit-box-line\"\n :disabled=\"!isReady\"\n :title=\"$t('action.startNewChat')\"\n @click=\"startNewChat()\" />\n <VvButton\n v-if=\"!isReasoningAgent\"\n :modifiers=\"\n useColorsForAgentHeader\n ? `action-quiet-${contrastColor}`\n : 'action-quiet'\n \"\n icon=\"ri:history-line\"\n :disabled=\"!isReady\"\n :title=\"$t('action.viewRecentChats')\"\n @click=\"navigate('conversations')\" />\n </template>\n <VvDropdown\n v-if=\"showHeaderMenu\"\n v-bind=\"{\n placement: 'bottom-end',\n modifiers: 'menu',\n flip: true,\n offset: 3,\n strategy: 'fixed',\n }\">\n <VvButton\n v-bind=\"{\n modifiers: useColorsForAgentHeader\n ? `action-quiet-${contrastColor}`\n : 'action-quiet',\n icon: 'ri:more-2-fill',\n disabled: !isReady,\n title: $t('action.moreActions'),\n }\" />\n <template #items>\n <VvDropdownAction\n v-if=\"!isPanel\"\n @click=\"startNewChat()\">\n <VvIcon name=\"ri:edit-box-line\" />\n {{ $t('action.startNewChat') }}\n </VvDropdownAction>\n <VvDropdownAction\n v-if=\"!isReasoningAgent && !isPanel\"\n @click=\"navigate('conversations')\">\n <VvIcon name=\"ri:history-line\" />\n {{ $t('action.viewRecentChats') }}\n </VvDropdownAction>\n <VvDropdownAction\n v-if=\"\n (canManageProfile || userFilesEnabled) &&\n localChatId\n \"\n @click=\"navigate('files')\">\n <VvIcon name=\"ri:attachment-2\" />\n {{ $t('userFiles.chatFilesTitle') }}\n </VvDropdownAction>\n <VvDropdownAction\n v-if=\"canManageProfile\"\n @click=\"navigate('profile')\">\n <VvIcon name=\"ri:user-line\" />\n {{ $t('label.profile') }}\n </VvDropdownAction>\n <VvDropdownAction\n v-else-if=\"canSignIn\"\n @click=\"navigate('auth')\">\n <VvIcon name=\"ri:account-circle-line\" />\n {{ $t('action.signIn') }}\n </VvDropdownAction>\n </template>\n </VvDropdown>\n <slot\n name=\"actions\"\n v-bind=\"{\n mainColor,\n useColorsForAgentHeader,\n contrastColor,\n startNewChat,\n stopGeneration,\n }\" />\n </VvButtonGroup>\n </div>\n <!-- #endregion -->\n\n <div v-if=\"isReasoningAgent\">\n <div class=\"pk-chatbot__warning-body\">\n <VvAlert modifiers=\"callout\">\n <div class=\"pk-chatbot__warning-header\">\n <VvIcon\n name=\"ri:alert-line\"\n class=\"pk-chatbot__warning-icon\" />\n <strong class=\"pk-chatbot__warning-title\">\n {{ $t('message.warning') }}\n </strong>\n </div>\n <p class=\"pk-chatbot__warning-text\">\n {{ $t('message.reasoningAgent') }}\n </p>\n </VvAlert>\n </div>\n </div>\n\n <!-- #region views -->\n <PkChatbotViewChat\n v-if=\"activeView === 'chat'\"\n :agent-id\n :modifier\n :user-name\n @show-info=\"emit('show-info', $event)\"\n @revise=\"emit('revise', $event)\">\n <template\n v-for=\"slotName in Object.keys(slots)\"\n #[slotName]=\"slotData\"\n ><slot :name=\"slotName\" v-bind=\"slotData\"\n /></template>\n </PkChatbotViewChat>\n <PkChatbotViewConversations\n v-else-if=\"activeView === 'conversations'\"\n :agent-id>\n <template\n v-for=\"slotName in Object.keys(slots)\"\n #[slotName]=\"slotData\"\n ><slot :name=\"slotName\" v-bind=\"slotData\"\n /></template>\n </PkChatbotViewConversations>\n <PkChatbotViewFiles v-else-if=\"activeView === 'files'\" :agent-id />\n <div\n v-else-if=\"activeView === 'auth'\"\n class=\"pk-chatbot__view-auth flex-1 min-h-0 overflow-y-auto\">\n <!-- Sign-in form provided by the host widget (owns the auth client) -->\n <slot name=\"view-auth\" />\n </div>\n <PkChatbotViewProfile v-else :agent-id>\n <template\n v-for=\"slotName in Object.keys(slots)\"\n #[slotName]=\"slotData\"\n ><slot :name=\"slotName\" v-bind=\"slotData\"\n /></template>\n </PkChatbotViewProfile>\n <!-- #endregion -->\n\n <!-- #region footer -->\n <div v-if=\"footerMessage\" class=\"pk-chatbot__footer\">\n <PkStreamingMarkdown :markdown=\"footerMessage\" class=\"wysiwyg\" />\n </div>\n <!-- #endregion -->\n </div>\n</template>\n\n<style lang=\"scss\">\n .pk-chatbot {\n display: flex;\n flex-direction: column;\n position: relative;\n height: 100%;\n background-color: var(--color-surface);\n\n &__header {\n position: sticky;\n top: 0;\n z-index: 1;\n display: flex;\n justify-content: space-between;\n gap: var(--spacing-14);\n background-color: var(--color-surface-1);\n padding: var(--spacing-14);\n border-bottom: 1px solid var(--color-surface-4);\n }\n\n &__header-start {\n display: flex;\n align-items: center;\n gap: var(--spacing-sm);\n min-width: 0;\n }\n\n &__nav-icon {\n font-size: var(--text-18);\n }\n\n &__avatar {\n width: var(--spacing-24);\n height: var(--spacing-24);\n }\n\n &__title {\n font-size: var(--text-16);\n font-weight: var(--font-semibold);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n &__header-end {\n flex-shrink: 0;\n }\n\n &__warning-body {\n padding: var(--spacing-md);\n border-bottom: 1px solid var(--color-surface-4);\n }\n\n &__warning-header {\n display: flex;\n align-items: center;\n gap: var(--spacing-4);\n margin-bottom: var(--spacing-4);\n }\n\n &__warning-icon {\n width: var(--spacing-16);\n height: var(--spacing-16);\n }\n\n &__warning-title {\n font-weight: 600;\n font-size: var(--text-14);\n }\n\n &__warning-text {\n font-size: var(--text-12);\n color: var(--color-word-3);\n }\n\n &__footer {\n padding: var(--spacing-md);\n border-top: 1px solid var(--color-surface-4);\n text-align: center;\n font-size: var(--text-12);\n color: var(--color-word-2);\n }\n\n // Modifier: fullscreen — layout full-page (Gemini-style): nessun\n // header interno, sfondo trasparente, input pill centrato.\n // Il chrome (sidebar, navigazione) è gestito dalla pagina ospite.\n &--fullscreen {\n background-color: transparent;\n\n .pk-chatbot__footer {\n border-top: none;\n padding: 0 var(--spacing-md) var(--spacing-sm) var(--spacing-md);\n }\n\n // Reading column aligned with the input (Gemini-style). The\n // constraint lives on the inner wrapper so the scroll container\n // spans the page and the scrollbar sits at its edge.\n .pk-chatbot-messages {\n // Symmetric gutters: a visible scrollbar would otherwise\n // shrink the content box on one side only, shifting the\n // column off the input axis\n scrollbar-gutter: stable both-edges;\n // Dissolve the content at both edges (works on any page\n // background, dots included — a surface-colored fade band\n // would cut through the pattern instead)\n mask-image: linear-gradient(\n to bottom,\n transparent 0,\n #000 var(--spacing-40),\n #000 calc(100% - var(--spacing-40)),\n transparent 100%\n );\n // Resting clearance so the first/last lines sit inside the\n // fully opaque zone\n padding-block: var(--spacing-48);\n }\n\n .pk-chatbot-messages__wrapper {\n width: 100%;\n max-width: 768px;\n margin-inline: auto;\n }\n\n // Outline rail: wide chats only, measured on the chat and not on\n // the viewport, so a preview frame squeezed by side panels loses\n // it like a phone does. The rail sits at the edge of the scroll\n // area beside the reading column: below the `--wide` threshold\n // (768px column plus a 40px rail on each side) it would cover the\n // messages instead.\n .pk-chatbot-messages__outline {\n display: none;\n }\n\n &.pk-chatbot--wide .pk-chatbot-messages__outline {\n display: block;\n }\n\n .pk-chatbot-file-preview {\n background-color: var(--color-surface);\n }\n\n .pk-chatbot-input__notice {\n background-color: var(--color-surface);\n border-inline: 1px solid var(--color-surface-3);\n border-top: 1px solid var(--color-surface-2);\n padding: var(--spacing-10) var(--spacing-16);\n\n &::after {\n background-color: var(--color-surface);\n border-inline: 1px solid var(--color-surface-2);\n bottom: calc(-1 * var(--spacing-20));\n height: var(--spacing-20);\n left: -1px;\n right: -1px;\n }\n }\n\n .pk-chatbot-input {\n width: calc(100% - var(--spacing-sm) * 2);\n max-width: 768px;\n margin-inline: auto;\n\n &__form {\n border-radius: var(--rounded-xxxl); // pill shape\n padding: var(--spacing-12) var(--spacing-16);\n background-color: var(--color-surface-1);\n border-color: var(--color-surface-2);\n box-shadow: none;\n transition:\n border-color var(--duration-200) var(--ease-in-out),\n box-shadow var(--duration-200) var(--ease-in-out);\n\n &:has(:focus-within) {\n border-color: var(--color-surface-4);\n box-shadow: var(--shadow-sm);\n }\n\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n }\n\n &__textarea {\n background-color: transparent;\n }\n }\n\n // Touch target ≥44px: estende l'hit area dei pulsanti\n // (icona 20px + padding 4px ≈ 28px) senza ingrandire l'icona.\n // Vale per l'input e per la barra della chiamata, che montano\n // lo stesso pulsante.\n .pk-chat-button {\n position: relative;\n\n &::after {\n content: '';\n position: absolute;\n inset: calc(-1 * var(--spacing-8));\n }\n }\n\n // A live call takes the place of the input, so it takes its shape,\n // its column and its height: full-bleed here would break the\n // reading axis, and a different height would make the dock jump\n // the moment the call starts.\n .pk-voice-session {\n // 60px. There is no 60 in the spacing scale and a raw `60px`\n // would stop following the root font size, which the label\n // inside does follow.\n --pk-chat-dock-height: calc(\n var(--spacing-56) + var(--spacing-4)\n );\n --pk-voice-orb-size: var(--spacing-40);\n --pk-voice-orb-bars-height: var(--spacing-20);\n --pk-voice-session-surface: var(--color-surface-1);\n width: calc(100% - var(--spacing-sm) * 2);\n max-width: 768px;\n margin-inline: auto;\n padding-inline: var(--spacing-16);\n border-color: var(--color-surface-2);\n border-radius: var(--rounded-xxxl); // pill shape\n box-shadow: none;\n\n &__timer {\n font-size: var(--text-14);\n }\n }\n }\n\n // Modifier: panel — compact chrome for a docked side panel: the host\n // container owns background and border, the header slims down and\n // drops its own surface so the chat blends into the panel.\n &--panel {\n background-color: transparent;\n\n .pk-chatbot__header {\n background-color: transparent;\n\n // Fixed height so the panel header lines up with the host's\n // own chrome. Custom properties inherit through the shadow\n // root: an embedding host can override it to match its\n // header (the default matches the platform header, 50px).\n height: var(--pk-chatbot-panel-header-height, 50px);\n align-items: center;\n padding-block: 0;\n padding-inline: var(--spacing-10);\n border-bottom: 1px solid var(--color-surface-3);\n }\n\n .pk-chatbot__title {\n font-size: var(--text-14);\n }\n\n .pk-chatbot__footer {\n border-top: none;\n padding: var(--spacing-6) var(--spacing-md);\n }\n }\n }\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuCI,IAAM,IAAQ,GAAS,GAEjB,EAAE,GAAG,MAAO,GAAQ,EACtB,UAAU,SACd,CAAC,GAEK,IAAQ,GA8BR,IAAO,GAOP,IAAS,GAA+B,GAAC,QAG9C,GAEK,IAAQ,EAAgB,EAAM,OAAO;EAI3C,GAAyB,MACrB,EAAM,UAAU,iBAAiB,CAAM,CAC3C;EAEA,IAAM,EAAE,aAAU,UAAM,gBAAa,eAAY,eAAW,eACxD,GAAY,CAAK,GAGf,KAAe,GAAM,GAAO,SAAS,GAErC,EAAE,iBAAc,mBAAgB,gBAAY,aAAU,oBACxD,GAIE,IAAU,EAAO,GAA0B,KAAA,CAAS,GACpD,IAAmB,QACf,GAAS,iBAAiB,SAAS,EAC7C,GAIM,IAAY,QAEV,CAAC,EAAiB,UACjB,GAAS,WAAW,SAAS,OAC9B,EAAM,iBAAiB,KAAA,CAC/B;EAoDA,AAhDA,EAAM,IAAmB,MAAc;GACnC,AAAI,KAAa,EAAW,UAAU,UAClC,EAAS,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AA,MAAA,GAAA,CAAA,UAAA,CAAA,KAAA,EAAA,CAAA,MAAU,UADzB,EAAA,GAAA,EAKM,OALN,IAKM,CADF,EAAyB,EAAA,QAAA,WAAA,CAAA,CAAA,MAE7B,EAAA,GAAA,EAMuB,IAAA;;KANO,YAAA,EAAA;IAEH,GAAA,EAAA,EAAA,GAAA,EAAA,GAAA,CAAA,EAAA,OAAO,KAAK,EAAA,CAAA,CAAK,IAA7B;KACN,MAAA;KACA,IAAA,GADY,MAAQ,CACpB,EACH,EAAA,QADgB,GAAQ,EAAA,EAAU,CAAQ,CAAA,CAAA,CAAA,CAAA;;IAMrC,EAAA,EAAA,KAAX,EAAA,GAAA,EAEM,OAFN,IAEM,CADF,EAAiE,GAAA;KAA3C,UAAU,EAAA,EAAA;KAAe,OAAM"}
@@ -1 +1 @@
1
- {"version":3,"file":"PkChatbotEmptyState-C7W0QgqW.js","names":[],"sources":["../../../../packages/components/src/chat/PkChatbotEmptyState.vue","../../../../packages/components/src/chat/PkChatbotEmptyState.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import PkAvatar from './PkAvatar.vue'\n import PkStreamingMarkdown from './PkStreamingMarkdown.vue'\n\n defineProps<{\n greeting?: string\n /** Agent avatar shown above the greeting where the input chip is hidden (mobile) */\n logo?: string | null\n name?: string\n }>()\n</script>\n\n<template>\n <div class=\"pk-chatbot-empty-state\">\n <PkAvatar\n v-if=\"logo || name\"\n class=\"pk-chatbot-empty-state__avatar\"\n modifiers=\"surface\"\n :img-src=\"logo\"\n :name=\"name\" />\n <PkStreamingMarkdown\n v-if=\"greeting\"\n :markdown=\"greeting\"\n :animation=\"null\"\n class=\"wysiwyg pk-chatbot-empty-state__greeting\" />\n </div>\n</template>\n\n<style lang=\"scss\">\n .pk-chatbot-empty-state {\n // Above the fullscreen ambient glow\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--spacing-sm);\n padding: var(--spacing-md);\n text-align: center;\n\n // Let the greeting wrap on a couple of lines (Gemini-like)\n @include media-breakpoint-down('xs', $breakpoints) {\n padding-inline: var(--spacing-56);\n }\n\n &__avatar {\n width: var(--spacing-64);\n height: var(--spacing-64);\n font-size: var(--text-20);\n border-radius: var(--rounded-full);\n\n // The agent identity lives in the input chip when that is visible\n @include media-breakpoint-up('md', $breakpoints) {\n display: none;\n }\n }\n\n &__greeting {\n font-size: var(--text-28);\n font-weight: var(--font-light);\n color: var(--color-word-1);\n text-wrap: balance;\n\n // Render the greeting markdown inline as a single heading line\n :first-child {\n margin-top: 0;\n }\n\n :last-child {\n margin-bottom: 0;\n }\n }\n\n // Enters fading in from below, in sync with the glow ignition\n &__avatar,\n &__greeting {\n animation: pk-chatbot-greeting-enter 600ms var(--ease-out) both;\n\n @media (prefers-reduced-motion: reduce) {\n animation: none;\n }\n }\n }\n\n @keyframes pk-chatbot-greeting-enter {\n from {\n opacity: 0;\n transform: translateY(var(--spacing-16));\n }\n }\n</style>\n","<script setup lang=\"ts\">\n import PkAvatar from './PkAvatar.vue'\n import PkStreamingMarkdown from './PkStreamingMarkdown.vue'\n\n defineProps<{\n greeting?: string\n /** Agent avatar shown above the greeting where the input chip is hidden (mobile) */\n logo?: string | null\n name?: string\n }>()\n</script>\n\n<template>\n <div class=\"pk-chatbot-empty-state\">\n <PkAvatar\n v-if=\"logo || name\"\n class=\"pk-chatbot-empty-state__avatar\"\n modifiers=\"surface\"\n :img-src=\"logo\"\n :name=\"name\" />\n <PkStreamingMarkdown\n v-if=\"greeting\"\n :markdown=\"greeting\"\n :animation=\"null\"\n class=\"wysiwyg pk-chatbot-empty-state__greeting\" />\n </div>\n</template>\n\n<style lang=\"scss\">\n .pk-chatbot-empty-state {\n // Above the fullscreen ambient glow\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--spacing-sm);\n padding: var(--spacing-md);\n text-align: center;\n\n // Let the greeting wrap on a couple of lines (Gemini-like)\n @include media-breakpoint-down('xs', $breakpoints) {\n padding-inline: var(--spacing-56);\n }\n\n &__avatar {\n width: var(--spacing-64);\n height: var(--spacing-64);\n font-size: var(--text-20);\n border-radius: var(--rounded-full);\n\n // The agent identity lives in the input chip when that is visible\n @include media-breakpoint-up('md', $breakpoints) {\n display: none;\n }\n }\n\n &__greeting {\n font-size: var(--text-28);\n font-weight: var(--font-light);\n color: var(--color-word-1);\n text-wrap: balance;\n\n // Render the greeting markdown inline as a single heading line\n :first-child {\n margin-top: 0;\n }\n\n :last-child {\n margin-bottom: 0;\n }\n }\n\n // Enters fading in from below, in sync with the glow ignition\n &__avatar,\n &__greeting {\n animation: pk-chatbot-greeting-enter 600ms var(--ease-out) both;\n\n @media (prefers-reduced-motion: reduce) {\n animation: none;\n }\n }\n }\n\n @keyframes pk-chatbot-greeting-enter {\n from {\n opacity: 0;\n transform: translateY(var(--spacing-16));\n }\n }\n</style>\n"],"mappings":";;;;;;;;;;;;oBAaI,EAAA,GAAA,EAYM,OAZN,GAYM,CAVQ,EAAA,QAAQ,EAAA,QADlB,EAAA,GAAA,EAKmB,GAAA;;GAHf,OAAM;GACN,WAAU;GACT,WAAS,EAAA;GACT,MAAM,EAAA;EAED,GAAA,MAAA,GAAA,CAAA,WAAA,MAAA,CAAA,KAAA,EAAA,IAAA,EAAA,GAAA,EAAA,YADV,EAAA,GAAA,EAIuD,GAAA;;GAFlD,UAAU,EAAA;GACV,WAAW;GACZ,OAAM"}
1
+ {"version":3,"file":"PkChatbotEmptyState-C7W0QgqW.js","names":[],"sources":["../../../../packages/components/src/chat/PkChatbotEmptyState.vue","../../../../packages/components/src/chat/PkChatbotEmptyState.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import PkAvatar from './PkAvatar.vue'\n import PkStreamingMarkdown from './PkStreamingMarkdown.vue'\n\n defineProps<{\n greeting?: string\n /** Agent avatar shown above the greeting where the input chip is hidden (mobile) */\n logo?: string | null\n name?: string\n }>()\n</script>\n\n<template>\n <div class=\"pk-chatbot-empty-state\">\n <PkAvatar\n v-if=\"logo || name\"\n class=\"pk-chatbot-empty-state__avatar\"\n modifiers=\"surface\"\n :img-src=\"logo\"\n :name=\"name\" />\n <PkStreamingMarkdown\n v-if=\"greeting\"\n :markdown=\"greeting\"\n :animation=\"null\"\n class=\"wysiwyg pk-chatbot-empty-state__greeting\" />\n </div>\n</template>\n\n<style lang=\"scss\">\n .pk-chatbot-empty-state {\n // Above the fullscreen ambient glow\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--spacing-sm);\n padding: var(--spacing-md);\n text-align: center;\n\n // Let the greeting wrap on a couple of lines (Gemini-like). Keyed on\n // the chat's own width (`--phone`, measured in PkChatbot): a narrow\n // preview frame on a desktop screen wraps like a phone\n .pk-chatbot--phone & {\n padding-inline: var(--spacing-56);\n }\n\n &__avatar {\n width: var(--spacing-64);\n height: var(--spacing-64);\n font-size: var(--text-20);\n border-radius: var(--rounded-full);\n\n // The agent identity lives in the input chip when that is\n // visible: the chip hides itself at `--tight`, so keying the\n // avatar on the absence of that modifier shows exactly one of\n // the two\n .pk-chatbot:not(.pk-chatbot--tight) & {\n display: none;\n }\n }\n\n &__greeting {\n font-size: var(--text-28);\n font-weight: var(--font-light);\n color: var(--color-word-1);\n text-wrap: balance;\n\n // Render the greeting markdown inline as a single heading line\n :first-child {\n margin-top: 0;\n }\n\n :last-child {\n margin-bottom: 0;\n }\n }\n\n // Enters fading in from below, in sync with the glow ignition\n &__avatar,\n &__greeting {\n animation: pk-chatbot-greeting-enter 600ms var(--ease-out) both;\n\n @media (prefers-reduced-motion: reduce) {\n animation: none;\n }\n }\n }\n\n @keyframes pk-chatbot-greeting-enter {\n from {\n opacity: 0;\n transform: translateY(var(--spacing-16));\n }\n }\n</style>\n","<script setup lang=\"ts\">\n import PkAvatar from './PkAvatar.vue'\n import PkStreamingMarkdown from './PkStreamingMarkdown.vue'\n\n defineProps<{\n greeting?: string\n /** Agent avatar shown above the greeting where the input chip is hidden (mobile) */\n logo?: string | null\n name?: string\n }>()\n</script>\n\n<template>\n <div class=\"pk-chatbot-empty-state\">\n <PkAvatar\n v-if=\"logo || name\"\n class=\"pk-chatbot-empty-state__avatar\"\n modifiers=\"surface\"\n :img-src=\"logo\"\n :name=\"name\" />\n <PkStreamingMarkdown\n v-if=\"greeting\"\n :markdown=\"greeting\"\n :animation=\"null\"\n class=\"wysiwyg pk-chatbot-empty-state__greeting\" />\n </div>\n</template>\n\n<style lang=\"scss\">\n .pk-chatbot-empty-state {\n // Above the fullscreen ambient glow\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--spacing-sm);\n padding: var(--spacing-md);\n text-align: center;\n\n // Let the greeting wrap on a couple of lines (Gemini-like). Keyed on\n // the chat's own width (`--phone`, measured in PkChatbot): a narrow\n // preview frame on a desktop screen wraps like a phone\n .pk-chatbot--phone & {\n padding-inline: var(--spacing-56);\n }\n\n &__avatar {\n width: var(--spacing-64);\n height: var(--spacing-64);\n font-size: var(--text-20);\n border-radius: var(--rounded-full);\n\n // The agent identity lives in the input chip when that is\n // visible: the chip hides itself at `--tight`, so keying the\n // avatar on the absence of that modifier shows exactly one of\n // the two\n .pk-chatbot:not(.pk-chatbot--tight) & {\n display: none;\n }\n }\n\n &__greeting {\n font-size: var(--text-28);\n font-weight: var(--font-light);\n color: var(--color-word-1);\n text-wrap: balance;\n\n // Render the greeting markdown inline as a single heading line\n :first-child {\n margin-top: 0;\n }\n\n :last-child {\n margin-bottom: 0;\n }\n }\n\n // Enters fading in from below, in sync with the glow ignition\n &__avatar,\n &__greeting {\n animation: pk-chatbot-greeting-enter 600ms var(--ease-out) both;\n\n @media (prefers-reduced-motion: reduce) {\n animation: none;\n }\n }\n }\n\n @keyframes pk-chatbot-greeting-enter {\n from {\n opacity: 0;\n transform: translateY(var(--spacing-16));\n }\n }\n</style>\n"],"mappings":";;;;;;;;;;;;oBAaI,EAAA,GAAA,EAYM,OAZN,GAYM,CAVQ,EAAA,QAAQ,EAAA,QADlB,EAAA,GAAA,EAKmB,GAAA;;GAHf,OAAM;GACN,WAAU;GACT,WAAS,EAAA;GACT,MAAM,EAAA;EAED,GAAA,MAAA,GAAA,CAAA,WAAA,MAAA,CAAA,KAAA,EAAA,IAAA,EAAA,GAAA,EAAA,YADV,EAAA,GAAA,EAIuD,GAAA;;GAFlD,UAAU,EAAA;GACV,WAAW;GACZ,OAAM"}
@@ -20,13 +20,13 @@ var W = (e) => e.normalize("NFD").replace(/[\u0300-\u036f]/g, ""), ge = (e) => e
20
20
  showCalendarEvent: M(() => import("./PkToolShowCalendarEvent-BsBdsbV0.js").then((e) => e.n)),
21
21
  showComparison: M(() => import("./PkToolShowComparison-D0iMf7JW.js").then((e) => e.n)),
22
22
  showContactForm: M(() => import("./PkToolShowContactForm-DMpYDol1.js").then((e) => e.n)),
23
- showDiagram: M(() => import("./PkToolShowDiagram-Bbqo6jm8.js")),
23
+ showDiagram: M(() => import("./PkToolShowDiagram-D7jh-yIc.js")),
24
24
  showEmail: M(() => import("./PkToolShowEmail-jiQMkC2X.js").then((e) => e.n)),
25
25
  showImageGallery: M(() => import("./PkToolShowImageGallery-V9U3LJfF.js").then((e) => e.n)),
26
26
  showLocation: M(() => import("./PkToolShowLocation-BOyEsW_W.js").then((e) => e.n)),
27
27
  showMessage: M(() => import("./PkToolShowMessage-Da-TEsrI.js").then((e) => e.n)),
28
- showForm: M(() => import("./PkToolShowForm-CJtmt5yd.js").then((e) => e.n)),
29
- showMultipleChoice: M(() => import("./PkToolShowForm-CJtmt5yd.js").then((e) => e.n)),
28
+ showForm: M(() => import("./PkToolShowForm-BGp_gbtr.js").then((e) => e.n)),
29
+ showMultipleChoice: M(() => import("./PkToolShowForm-BGp_gbtr.js").then((e) => e.n)),
30
30
  showProductList: M(() => import("./PkToolShowProductList-BIpye1Yx.js").then((e) => e.n)),
31
31
  showQrCode: M(() => import("./PkToolShowQrCode-DEAvfLFu.js").then((e) => e.n)),
32
32
  showSources: M(() => import("./PkToolShowSources-D4yCW9Vq.js").then((e) => e.n)),
@@ -768,4 +768,4 @@ var De = ["aria-busy"], Oe = {
768
768
  //#endregion
769
769
  export { ve as a, _e as i, ye as n, ge as r, $e as t };
770
770
 
771
- //# sourceMappingURL=PkChatbotMessages-D6rNh6PF.js.map
771
+ //# sourceMappingURL=PkChatbotMessages-CZLj_OeK.js.map