@8wave/ai-elements 0.98.0-beta.2 → 0.98.0-beta.4

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 (23) hide show
  1. package/dist/ai-elements.es.js +391 -355
  2. package/dist/ai-elements.es.js.map +1 -1
  3. package/dist-vue/PkChatbot.js +1 -1
  4. package/dist-vue/PkChatbotViewChat.js +1 -1
  5. package/dist-vue/PkChatbotViewConversations.js +1 -1
  6. package/dist-vue/PkChatbotViewFiles.js +1 -1
  7. package/dist-vue/PkChatbotViewProfile.js +1 -1
  8. package/dist-vue/_chunks/{PkChatbot-CneS8fVC.js → PkChatbot-CxpAotKB.js} +6 -6
  9. package/dist-vue/_chunks/{PkChatbot-CneS8fVC.js.map → PkChatbot-CxpAotKB.js.map} +1 -1
  10. package/dist-vue/_chunks/{PkChatbotViewChat-C7Xv2Oer.js → PkChatbotViewChat-QzWSymIg.js} +2 -2
  11. package/dist-vue/_chunks/{PkChatbotViewChat-C7Xv2Oer.js.map → PkChatbotViewChat-QzWSymIg.js.map} +1 -1
  12. package/dist-vue/_chunks/{PkChatbotViewConversations-YbHHc8oD.js → PkChatbotViewConversations-O-wm_nu1.js} +2 -2
  13. package/dist-vue/_chunks/{PkChatbotViewConversations-YbHHc8oD.js.map → PkChatbotViewConversations-O-wm_nu1.js.map} +1 -1
  14. package/dist-vue/_chunks/{PkChatbotViewFiles-BPE0g2Jk.js → PkChatbotViewFiles-RHMwvWUS.js} +2 -2
  15. package/dist-vue/_chunks/{PkChatbotViewFiles-BPE0g2Jk.js.map → PkChatbotViewFiles-RHMwvWUS.js.map} +1 -1
  16. package/dist-vue/_chunks/{PkChatbotViewProfile-B_gWPgVY.js → PkChatbotViewProfile-Bka6CUAa.js} +2 -2
  17. package/dist-vue/_chunks/{PkChatbotViewProfile-B_gWPgVY.js.map → PkChatbotViewProfile-Bka6CUAa.js.map} +1 -1
  18. package/dist-vue/_chunks/{useChatbotStore-Cfx-qlC4.js → useChatbotStore-DeHwEN8W.js} +528 -511
  19. package/dist-vue/_chunks/{useChatbotStore-Cfx-qlC4.js.map → useChatbotStore-DeHwEN8W.js.map} +1 -1
  20. package/dist-vue/composables.js +1 -1
  21. package/dist-vue/index.js +12 -11
  22. package/dist-vue/index.js.map +1 -1
  23. package/package.json +1 -1
@@ -15856,7 +15856,24 @@ function Jx(t) {
15856
15856
  function ot(e) {
15857
15857
  _e.value = e;
15858
15858
  }
15859
- return {
15859
+ let st;
15860
+ function ct(e) {
15861
+ let t = () => E.value.getChat(s.value, e).then((e) => e !== null);
15862
+ return t().catch(() => t().catch(() => !1));
15863
+ }
15864
+ return _(u, async (e) => {
15865
+ if (!e || e === st) return;
15866
+ let t = st;
15867
+ if (st = e, t === void 0) return;
15868
+ let n = C.value, r = !ae.value && await ct(n);
15869
+ if (!(u.value !== e || C.value !== n)) {
15870
+ if (r) {
15871
+ L(s.value);
15872
+ return;
15873
+ }
15874
+ k.value = [], N.value = [], j.value = [], await Be(), we.value = "";
15875
+ }
15876
+ }), {
15860
15877
  apiClient: E,
15861
15878
  baseUrl: a,
15862
15879
  basePath: o,
@@ -17017,12 +17034,21 @@ function yC(e = {}) {
17017
17034
  };
17018
17035
  }
17019
17036
  //#endregion
17037
+ //#region src/composables/useChatbotStoreSync.ts
17038
+ t();
17039
+ function bC(t) {
17040
+ let n = Jx(t.agentId);
17041
+ return e(() => {
17042
+ n.baseUrl = t.baseUrl, n.headers = t.headers.value, n.userId = t.userId.value;
17043
+ }), n;
17044
+ }
17045
+ //#endregion
17020
17046
  //#region ../../packages/components/src/chat/chatbotProfileContext.ts
17021
- var bC = Symbol("chatbotProfileContext");
17047
+ var xC = Symbol("chatbotProfileContext");
17022
17048
  //#endregion
17023
17049
  //#region src/composables/useChatbotProfile.ts
17024
17050
  t(), C();
17025
- function xC(e) {
17051
+ function SC(e) {
17026
17052
  let { session: t, signOut: n, erasure: r } = e, i = O(() => {
17027
17053
  let e = t.value.data?.user;
17028
17054
  return !e || e.isAnonymous ? null : {
@@ -17055,14 +17081,14 @@ function xC(e) {
17055
17081
  //#endregion
17056
17082
  //#region src/composables/useChatbotProfileProvider.ts
17057
17083
  t();
17058
- function SC(e) {
17084
+ function CC(e) {
17059
17085
  let { agent: t, branding: r, authMethods: i, session: a, signOut: o, token: s } = e, c = O(() => !!i.value && (i.value.emailPassword || i.value.google || i.value.microsoft)), l = O(() => c.value && t.value?.interface?.interactiveLogin !== !1), u = O(() => t.value ? {
17060
17086
  id: t.value.id,
17061
17087
  name: t.value.name,
17062
17088
  organizationId: t.value.organizationId,
17063
17089
  interface: t.value.interface
17064
17090
  } : r.value);
17065
- return n(bC, xC({
17091
+ return n(xC, SC({
17066
17092
  session: a,
17067
17093
  signOut: o,
17068
17094
  canSignIn: l,
@@ -17081,7 +17107,7 @@ function SC(e) {
17081
17107
  }
17082
17108
  //#endregion
17083
17109
  //#region ../../packages/components/src/chat/utils.ts
17084
- function CC(e) {
17110
+ function wC(e) {
17085
17111
  let t = [];
17086
17112
  for (let n of e) {
17087
17113
  if (!$l(n)) {
@@ -17096,25 +17122,25 @@ function CC(e) {
17096
17122
  }
17097
17123
  return t;
17098
17124
  }
17099
- function wC(e) {
17125
+ function TC(e) {
17100
17126
  return e && "state" in e ? e.state === "streaming" || e.state === "input-streaming" : !1;
17101
17127
  }
17102
- function TC(e) {
17128
+ function EC(e) {
17103
17129
  if (e && "state" in e) return e.state;
17104
17130
  }
17105
- function EC(e = "000000") {
17131
+ function DC(e = "000000") {
17106
17132
  let t = e.replace("#", "");
17107
17133
  t.length === 3 && (t = t.split("").map((e) => e + e).join(""));
17108
17134
  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;
17109
17135
  return .2126 * a(n) + .7152 * a(r) + .0722 * a(i) > .179 ? "black" : "white";
17110
17136
  }
17111
- function DC(e, t) {
17112
- return e === "white" || e === "black" ? e : EC(t);
17113
- }
17114
17137
  function OC(e, t) {
17138
+ return e === "white" || e === "black" ? e : DC(t);
17139
+ }
17140
+ function kC(e, t) {
17115
17141
  if (!(t === void 0 || t < 50)) return e(t / 1e3, "seconds");
17116
17142
  }
17117
- function kC(e) {
17143
+ function AC(e) {
17118
17144
  if (e !== void 0) {
17119
17145
  if (typeof e == "string") return e.trim() || void 0;
17120
17146
  try {
@@ -17125,12 +17151,12 @@ function kC(e) {
17125
17151
  }
17126
17152
  }
17127
17153
  }
17128
- var AC = [
17154
+ var jC = [
17129
17155
  "tool-perplexity_search",
17130
17156
  "tool-parallel_search",
17131
17157
  "tool-web_search",
17132
17158
  "tool-google_search"
17133
- ], jC = /* @__PURE__ */ new Set([
17159
+ ], MC = /* @__PURE__ */ new Set([
17134
17160
  "tool-searchInKnowledgeBase",
17135
17161
  "tool-retrieveRevisedAnswers",
17136
17162
  "tool-expandChunkContext",
@@ -17139,48 +17165,48 @@ var AC = [
17139
17165
  "tool-geocode",
17140
17166
  "tool-recallUserMemory",
17141
17167
  "tool-saveUserMemory",
17142
- ...AC
17168
+ ...jC
17143
17169
  ]);
17144
- function MC(e) {
17145
- return eu(e) && jC.has(e.type);
17170
+ function NC(e) {
17171
+ return eu(e) && MC.has(e.type);
17146
17172
  }
17147
- var NC = (e) => e && typeof e == "object" && !Array.isArray(e) ? e : void 0, PC = (e, ...t) => {
17173
+ var PC = (e) => e && typeof e == "object" && !Array.isArray(e) ? e : void 0, FC = (e, ...t) => {
17148
17174
  for (let n of t) {
17149
17175
  let t = e?.[n];
17150
17176
  if (typeof t == "string" && t.trim()) return t;
17151
17177
  }
17152
17178
  };
17153
- function FC(e) {
17179
+ function IC(e) {
17154
17180
  if (!eu(e)) return;
17155
- let t = NC("input" in e ? e.input : void 0), n = NC("output" in e ? e.output : void 0);
17156
- if (e.type === "tool-searchInKnowledgeBase" || AC.includes(e.type)) {
17181
+ let t = PC("input" in e ? e.input : void 0), n = PC("output" in e ? e.output : void 0);
17182
+ if (e.type === "tool-searchInKnowledgeBase" || jC.includes(e.type)) {
17157
17183
  let e = t?.queries;
17158
17184
  if (Array.isArray(e)) {
17159
17185
  let t = e.filter((e) => typeof e == "string" && !!e.trim());
17160
17186
  return t.length ? t.join(" · ") : void 0;
17161
17187
  }
17162
- return PC(t, "query", "objective");
17188
+ return FC(t, "query", "objective");
17163
17189
  }
17164
- if (e.type === "tool-retrieveRevisedAnswers") return PC(t, "query");
17165
- if (e.type === "tool-getWeather") return PC(n, "location") ?? PC(t, "locationName");
17166
- if (e.type === "tool-geocode") return PC(t, "locationName");
17167
- if (e.type === "tool-expandChunkContext") return PC(n, "documentName");
17168
- if (e.type === "tool-readDocumentFile") return PC(n, "name");
17169
- if (e.type === "tool-recallUserMemory") return PC(t, "query");
17170
- if (e.type === "tool-saveUserMemory") return PC(t, "content", "query");
17190
+ if (e.type === "tool-retrieveRevisedAnswers") return FC(t, "query");
17191
+ if (e.type === "tool-getWeather") return FC(n, "location") ?? FC(t, "locationName");
17192
+ if (e.type === "tool-geocode") return FC(t, "locationName");
17193
+ if (e.type === "tool-expandChunkContext") return FC(n, "documentName");
17194
+ if (e.type === "tool-readDocumentFile") return FC(n, "name");
17195
+ if (e.type === "tool-recallUserMemory") return FC(t, "query");
17196
+ if (e.type === "tool-saveUserMemory") return FC(t, "content", "query");
17171
17197
  }
17172
- function IC(e) {
17198
+ function LC(e) {
17173
17199
  if (eu(e)) return e.type.includes("tool-subagent") ? "ri:robot-2-line" : e.type === "tool-runWorker" ? "ri:flow-chart" : e.type === "tool-fetchTeamsChannelHistory" ? "ri:chat-history-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-expandChunkContext" ? "ri:file-search-line" : e.type === "tool-readDocumentFile" ? "ri:file-text-line" : e.type === "tool-geocode" ? "ri:map-2-line" : e.type === "tool-getWeather" ? "ri:sun-cloudy-line" : e.type === "tool-recallUserMemory" ? "ri:brain-line" : e.type === "tool-saveUserMemory" ? "ri:save-3-line" : e.type === "tool-showWeather" ? "ri:sun-line" : e.type === "tool-showDiagram" ? "ri:flow-chart" : e.type === "tool-showSources" ? "ri:book-2-line" : e.type === "tool-showForm" ? "ri:survey-line" : e.type === "tool-showMultipleChoice" ? "ri:checkbox-multiple-line" : e.type === "tool-showArtifact" ? "ri:file-code-line" : e.type === "tool-showEmail" ? "ri:mail-line" : e.type === "tool-showMessage" ? "ri:chat-1-line" : e.type === "tool-showWebPages" ? "ri:pages-line" : e.type === "tool-showProductList" ? "ri:shopping-bag-line" : e.type === "tool-showContactForm" ? "ri:send-plane-2-line" : e.type === "tool-showCalendarEvent" ? "ri:calendar-event-line" : e.type === "tool-showComparison" ? "ri:scales-line" : e.type === "tool-showLocation" ? "ri:map-pin-line" : e.type === "tool-showQrCode" ? "ri:qr-code-line" : e.type === "tool-showImageGallery" ? "ri:image-line" : e.type === "tool-showVideo" ? "ri:film-line" : e.type === "tool-showSuggestedReply" ? "ri:corner-down-right-line" : e.type === "tool-requestGeolocation" ? "ri:map-pin-user-line" : e.type === "tool-perplexity_search" || e.type === "tool-parallel_search" || e.type === "tool-web_search" || e.type === "tool-google_search" ? "ri:global-line" : "ri:tools-line";
17174
17200
  if (iu(e)) return "ri:lightbulb-line";
17175
17201
  if ($l(e)) return "ri:double-quotes-r";
17176
17202
  }
17177
- function LC(e, t) {
17178
- return eu(t) ? t.type === "tool-runWorker" ? e("messagePart.runWorker") : t.type === "tool-fetchTeamsChannelHistory" ? e("messagePart.fetchTeamsChannelHistory") : t.type === "tool-retrieveRevisedAnswers" ? e("messagePart.revisedAnswers") : t.type === "tool-searchInKnowledgeBase" ? e("messagePart.searchingDocuments") : t.type === "tool-expandChunkContext" ? e("messagePart.expandChunkContext") : t.type === "tool-readDocumentFile" ? e("messagePart.readDocumentFile") : t.type === "tool-geocode" ? e("messagePart.geocode") : t.type === "tool-getWeather" ? e("messagePart.getWeather") : t.type === "tool-recallUserMemory" ? e("messagePart.recallUserMemory") : t.type === "tool-saveUserMemory" ? e("messagePart.saveUserMemory") : t.type === "tool-showWeather" ? e("messagePart.showWeather") : t.type === "tool-showForm" ? e("messagePart.showForm") : t.type === "tool-showDiagram" ? e("messagePart.showDiagram") : t.type === "tool-showSources" ? e("messagePart.showSources") : t.type === "tool-showMultipleChoice" ? e("messagePart.showMultipleChoice") : t.type === "tool-showArtifact" ? e("messagePart.showArtifact") : t.type === "tool-showEmail" ? e("messagePart.showEmail") : t.type === "tool-showMessage" ? e("messagePart.showMessage") : t.type === "tool-showWebPages" ? e("messagePart.showWebPages") : t.type === "tool-showProducts" ? e("messagePart.showProducts") : t.type === "tool-showContactForm" ? e("messagePart.showContactForm") : t.type === "tool-showCalendarEvent" ? e("messagePart.showCalendarEvent") : t.type === "tool-showComparison" ? e("messagePart.showComparison") : t.type === "tool-showLocation" ? e("messagePart.showLocation") : t.type === "tool-showQrCode" ? e("messagePart.showQrCode") : t.type === "tool-showImageGallery" ? e("messagePart.showImageGallery") : t.type === "tool-showVideo" ? e("messagePart.showVideo") : t.type === "tool-showSuggestedReply" ? e("messagePart.showSuggestedReply") : t.type === "tool-requestGeolocation" ? e("messagePart.requestGeolocation") : AC.includes(t.type) ? e("messagePart.webSearch") : e("messagePart.tool") : iu(t) ? e("messagePart.reasoning") : e("messagePart.streaming");
17203
+ function RC(e, t) {
17204
+ return eu(t) ? t.type === "tool-runWorker" ? e("messagePart.runWorker") : t.type === "tool-fetchTeamsChannelHistory" ? e("messagePart.fetchTeamsChannelHistory") : t.type === "tool-retrieveRevisedAnswers" ? e("messagePart.revisedAnswers") : t.type === "tool-searchInKnowledgeBase" ? e("messagePart.searchingDocuments") : t.type === "tool-expandChunkContext" ? e("messagePart.expandChunkContext") : t.type === "tool-readDocumentFile" ? e("messagePart.readDocumentFile") : t.type === "tool-geocode" ? e("messagePart.geocode") : t.type === "tool-getWeather" ? e("messagePart.getWeather") : t.type === "tool-recallUserMemory" ? e("messagePart.recallUserMemory") : t.type === "tool-saveUserMemory" ? e("messagePart.saveUserMemory") : t.type === "tool-showWeather" ? e("messagePart.showWeather") : t.type === "tool-showForm" ? e("messagePart.showForm") : t.type === "tool-showDiagram" ? e("messagePart.showDiagram") : t.type === "tool-showSources" ? e("messagePart.showSources") : t.type === "tool-showMultipleChoice" ? e("messagePart.showMultipleChoice") : t.type === "tool-showArtifact" ? e("messagePart.showArtifact") : t.type === "tool-showEmail" ? e("messagePart.showEmail") : t.type === "tool-showMessage" ? e("messagePart.showMessage") : t.type === "tool-showWebPages" ? e("messagePart.showWebPages") : t.type === "tool-showProducts" ? e("messagePart.showProducts") : t.type === "tool-showContactForm" ? e("messagePart.showContactForm") : t.type === "tool-showCalendarEvent" ? e("messagePart.showCalendarEvent") : t.type === "tool-showComparison" ? e("messagePart.showComparison") : t.type === "tool-showLocation" ? e("messagePart.showLocation") : t.type === "tool-showQrCode" ? e("messagePart.showQrCode") : t.type === "tool-showImageGallery" ? e("messagePart.showImageGallery") : t.type === "tool-showVideo" ? e("messagePart.showVideo") : t.type === "tool-showSuggestedReply" ? e("messagePart.showSuggestedReply") : t.type === "tool-requestGeolocation" ? e("messagePart.requestGeolocation") : jC.includes(t.type) ? e("messagePart.webSearch") : e("messagePart.tool") : iu(t) ? e("messagePart.reasoning") : e("messagePart.streaming");
17179
17205
  }
17180
17206
  //#endregion
17181
17207
  //#region src/composables/useChatbotAgent.ts
17182
17208
  t(), C();
17183
- function RC(e) {
17209
+ function zC(e) {
17184
17210
  let t = A(), n = A(), r = A(), i = A(!1), a = A(!1), o = A(!1);
17185
17211
  async function s() {
17186
17212
  let s = T(e.organizationSlug), c = T(e.agentId);
@@ -17205,7 +17231,7 @@ function RC(e) {
17205
17231
  }, { immediate: !0 }), _(() => T(e.headers), () => {
17206
17232
  i.value && s();
17207
17233
  });
17208
- let c = O(() => t.value?.interface ?? n.value?.interface), l = O(() => DC(c.value?.textColor, c.value?.mainColor)), u = O(() => c.value?.mainColor);
17234
+ let c = O(() => t.value?.interface ?? n.value?.interface), l = O(() => OC(c.value?.textColor, c.value?.mainColor)), u = O(() => c.value?.mainColor);
17209
17235
  return {
17210
17236
  agent: t,
17211
17237
  branding: n,
@@ -17231,7 +17257,7 @@ function RC(e) {
17231
17257
  //#endregion
17232
17258
  //#region src/composables/useChatbotAuthForm.ts
17233
17259
  C();
17234
- function zC(e) {
17260
+ function BC(e) {
17235
17261
  let { t } = Oe({ useScope: "global" }), n = A(), r = A(), i = A(!1);
17236
17262
  function a(e) {
17237
17263
  return {
@@ -17305,7 +17331,7 @@ function zC(e) {
17305
17331
  //#endregion
17306
17332
  //#region src/composables/useFocusTrapBypass.ts
17307
17333
  t();
17308
- function BC() {
17334
+ function VC() {
17309
17335
  let e = null, t = (e) => {
17310
17336
  e.stopPropagation();
17311
17337
  };
@@ -17319,7 +17345,7 @@ function BC() {
17319
17345
  t(), k();
17320
17346
  //#endregion
17321
17347
  //#region ../../packages/components/src/chat/PkAvatar.vue
17322
- var VC = /*#__PURE__*/ jt(/* @__PURE__ */ b({
17348
+ var HC = /*#__PURE__*/ jt(/* @__PURE__ */ b({
17323
17349
  __name: "PkAvatar",
17324
17350
  props: {
17325
17351
  name: { type: String },
@@ -17343,13 +17369,13 @@ var VC = /*#__PURE__*/ jt(/* @__PURE__ */ b({
17343
17369
  }
17344
17370
  }), [["styles", [".pk-avatar{object-fit:cover;overflow:hidden}"]]]);
17345
17371
  t(), C();
17346
- var HC = {
17372
+ var UC = {
17347
17373
  class: "pk-aurora",
17348
17374
  "aria-hidden": "true"
17349
- }, UC = {
17375
+ }, WC = {
17350
17376
  key: 1,
17351
17377
  class: "pk-aurora__fallback"
17352
- }, WC = "\nattribute vec2 a_position;\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n}", GC = "\nprecision mediump float;\nuniform vec2 u_resolution;\nuniform float u_time;\nuniform vec3 u_color;\nuniform vec2 u_center;\nuniform vec2 u_half;\nuniform float u_spread;\n\nvec3 permute(vec3 x) { return mod(((x * 34.0) + 1.0) * x, 289.0); }\n\nfloat snoise(vec2 v) {\n const vec4 C = vec4(0.211324865405187, 0.366025403784439,\n -0.577350269189626, 0.024390243902439);\n vec2 i = floor(v + dot(v, C.yy));\n vec2 x0 = v - i + dot(i, C.xx);\n vec2 i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);\n vec4 x12 = x0.xyxy + C.xxzz;\n x12.xy -= i1;\n i = mod(i, 289.0);\n vec3 p = permute(permute(i.y + vec3(0.0, i1.y, 1.0))\n + i.x + vec3(0.0, i1.x, 1.0));\n vec3 m = max(0.5 - vec3(dot(x0, x0), dot(x12.xy, x12.xy),\n dot(x12.zw, x12.zw)), 0.0);\n m = m * m;\n m = m * m;\n vec3 x = 2.0 * fract(p * C.www) - 1.0;\n vec3 h = abs(x) - 0.5;\n vec3 ox = floor(x + 0.5);\n vec3 a0 = x - ox;\n m *= 1.79284291400159 - 0.85373472095314 * (a0 * a0 + h * h);\n vec3 g;\n g.x = a0.x * x0.x + h.x * x0.y;\n g.yz = a0.yz * x12.xz + h.yz * x12.yw;\n return 130.0 * dot(m, g);\n}\n\nvoid main() {\n vec2 px = gl_FragCoord.xy;\n vec2 rel = px - u_center;\n\n // Ignition: the ellipse lights up expanding from the center on mount\n float intro = smoothstep(0.0, 1.4, u_time);\n\n // Breathing: size and brightness oscillate gently but visibly\n float breath = 1.0\n + 0.12 * sin(u_time * 0.55)\n + 0.06 * snoise(vec2(u_time * 0.1, 3.7));\n float pulse = 1.0 + 0.2 * sin(u_time * 0.55 + 1.3);\n\n // Keep it simple (Gemini-style): one huge soft elliptical glow\n // centered on the pill\n vec2 radii = vec2(u_half.x * 0.95, u_half.y * 6.5)\n * u_spread\n * breath\n * mix(0.15, 1.0, intro);\n float r = length(rel / max(radii, vec2(1.0)));\n float glow = exp(-r * r * 2.2);\n\n // Never cut hard against the canvas bounds\n vec2 m = min(px, u_resolution - px);\n glow *= smoothstep(0.0, 32.0, min(m.x, m.y));\n\n // Dither: breaks the 8-bit banding rings of the very soft gradient\n // (no CSS blur on the canvas, the noise must fully mask the bands)\n glow = max(glow + (snoise(px * 0.9) - 0.5) * 0.03, 0.0);\n\n float alpha = glow * 0.2 * pulse * intro;\n\n // Premultiplied alpha (default canvas compositing)\n gl_FragColor = vec4(u_color * alpha, alpha);\n}", KC = /*#__PURE__*/ jt(/* @__PURE__ */ b({
17378
+ }, GC = "\nattribute vec2 a_position;\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n}", KC = "\nprecision mediump float;\nuniform vec2 u_resolution;\nuniform float u_time;\nuniform vec3 u_color;\nuniform vec2 u_center;\nuniform vec2 u_half;\nuniform float u_spread;\n\nvec3 permute(vec3 x) { return mod(((x * 34.0) + 1.0) * x, 289.0); }\n\nfloat snoise(vec2 v) {\n const vec4 C = vec4(0.211324865405187, 0.366025403784439,\n -0.577350269189626, 0.024390243902439);\n vec2 i = floor(v + dot(v, C.yy));\n vec2 x0 = v - i + dot(i, C.xx);\n vec2 i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);\n vec4 x12 = x0.xyxy + C.xxzz;\n x12.xy -= i1;\n i = mod(i, 289.0);\n vec3 p = permute(permute(i.y + vec3(0.0, i1.y, 1.0))\n + i.x + vec3(0.0, i1.x, 1.0));\n vec3 m = max(0.5 - vec3(dot(x0, x0), dot(x12.xy, x12.xy),\n dot(x12.zw, x12.zw)), 0.0);\n m = m * m;\n m = m * m;\n vec3 x = 2.0 * fract(p * C.www) - 1.0;\n vec3 h = abs(x) - 0.5;\n vec3 ox = floor(x + 0.5);\n vec3 a0 = x - ox;\n m *= 1.79284291400159 - 0.85373472095314 * (a0 * a0 + h * h);\n vec3 g;\n g.x = a0.x * x0.x + h.x * x0.y;\n g.yz = a0.yz * x12.xz + h.yz * x12.yw;\n return 130.0 * dot(m, g);\n}\n\nvoid main() {\n vec2 px = gl_FragCoord.xy;\n vec2 rel = px - u_center;\n\n // Ignition: the ellipse lights up expanding from the center on mount\n float intro = smoothstep(0.0, 1.4, u_time);\n\n // Breathing: size and brightness oscillate gently but visibly\n float breath = 1.0\n + 0.12 * sin(u_time * 0.55)\n + 0.06 * snoise(vec2(u_time * 0.1, 3.7));\n float pulse = 1.0 + 0.2 * sin(u_time * 0.55 + 1.3);\n\n // Keep it simple (Gemini-style): one huge soft elliptical glow\n // centered on the pill\n vec2 radii = vec2(u_half.x * 0.95, u_half.y * 6.5)\n * u_spread\n * breath\n * mix(0.15, 1.0, intro);\n float r = length(rel / max(radii, vec2(1.0)));\n float glow = exp(-r * r * 2.2);\n\n // Never cut hard against the canvas bounds\n vec2 m = min(px, u_resolution - px);\n glow *= smoothstep(0.0, 32.0, min(m.x, m.y));\n\n // Dither: breaks the 8-bit banding rings of the very soft gradient\n // (no CSS blur on the canvas, the noise must fully mask the bands)\n glow = max(glow + (snoise(px * 0.9) - 0.5) * 0.03, 0.0);\n\n float alpha = glow * 0.2 * pulse * intro;\n\n // Premultiplied alpha (default canvas compositing)\n gl_FragColor = vec4(u_color * alpha, alpha);\n}", qC = /*#__PURE__*/ jt(/* @__PURE__ */ b({
17353
17379
  __name: "PkAuroraCanvas",
17354
17380
  props: { sourceSelector: { type: String } },
17355
17381
  setup(e) {
@@ -17390,7 +17416,7 @@ var HC = {
17390
17416
  r.value = !0;
17391
17417
  return;
17392
17418
  }
17393
- let a = h(i.VERTEX_SHADER, WC), l = h(i.FRAGMENT_SHADER, GC), f = i.createProgram();
17419
+ let a = h(i.VERTEX_SHADER, GC), l = h(i.FRAGMENT_SHADER, KC), f = i.createProgram();
17394
17420
  if (!a || !l || !f) {
17395
17421
  r.value = !0;
17396
17422
  return;
@@ -17424,7 +17450,7 @@ var HC = {
17424
17450
  i = null, setTimeout(() => {
17425
17451
  e?.getExtension("WEBGL_lose_context")?.loseContext();
17426
17452
  }, 150);
17427
- }), (e, t) => (R(), w("div", HC, [r.value ? (R(), w("div", UC)) : (R(), w("canvas", {
17453
+ }), (e, t) => (R(), w("div", UC, [r.value ? (R(), w("div", WC)) : (R(), w("canvas", {
17428
17454
  key: 0,
17429
17455
  ref_key: "canvasEl",
17430
17456
  ref: n,
@@ -17435,7 +17461,7 @@ var HC = {
17435
17461
  t(), C(), k();
17436
17462
  //#endregion
17437
17463
  //#region ../../packages/components/src/chat/PkChatbotError.vue
17438
- var qC = /* @__PURE__ */ b({
17464
+ var JC = /* @__PURE__ */ b({
17439
17465
  __name: "PkChatbotError",
17440
17466
  props: { error: { type: Error } },
17441
17467
  emits: ["retry", "reset"],
@@ -17494,10 +17520,10 @@ var qC = /* @__PURE__ */ b({
17494
17520
  }
17495
17521
  });
17496
17522
  t(), C(), k(), fe();
17497
- var JC = { class: "border border-surface-3 rounded-xl w-full overflow-hidden bg-surface" }, YC = { class: "px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8 min-h-40" }, XC = { class: "font-bold" }, ZC = { key: 0 }, QC = { class: "p-sm" }, $C = { class: "flex justify-end border-t border-surface-3 px-sm py-10" }, ew = {
17523
+ var YC = { class: "border border-surface-3 rounded-xl w-full overflow-hidden bg-surface" }, XC = { class: "px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8 min-h-40" }, ZC = { class: "font-bold" }, QC = { key: 0 }, $C = { class: "p-sm" }, ew = { class: "flex justify-end border-t border-surface-3 px-sm py-10" }, tw = {
17498
17524
  key: 1,
17499
17525
  class: "p-sm"
17500
- }, tw = { class: "flex items-center gap-sm" }, nw = { class: "font-semibold block text-success" }, rw = { class: "text-word-3" }, iw = /* @__PURE__ */ b({
17526
+ }, nw = { class: "flex items-center gap-sm" }, rw = { class: "font-semibold block text-success" }, iw = { class: "text-word-3" }, aw = /* @__PURE__ */ b({
17501
17527
  __name: "PkChatbotFeedbackForm",
17502
17528
  props: {
17503
17529
  submitted: { type: Boolean },
@@ -17511,12 +17537,12 @@ var JC = { class: "border border-surface-3 rounded-xl w-full overflow-hidden bg-
17511
17537
  };
17512
17538
  return (t, i) => {
17513
17539
  let l = nt, u = at, d = tt, f = rt;
17514
- return R(), w("div", JC, [S("div", YC, [
17540
+ return R(), w("div", YC, [S("div", XC, [
17515
17541
  r(l, {
17516
17542
  name: "ri:feedback-line",
17517
17543
  class: "text-16"
17518
17544
  }),
17519
- S("strong", XC, N(I(n)("action.feedback")), 1),
17545
+ S("strong", ZC, N(I(n)("action.feedback")), 1),
17520
17546
  r(u, {
17521
17547
  icon: "ri:close-line",
17522
17548
  modifiers: "action-quiet-small",
@@ -17525,10 +17551,10 @@ var JC = { class: "border border-surface-3 rounded-xl w-full overflow-hidden bg-
17525
17551
  onClick: i[0] ||= ue((e) => t.$emit("close"), ["stop"])
17526
17552
  }, null, 8, ["title"])
17527
17553
  ]), r(j, { mode: "out-in" }, {
17528
- default: E(() => [e.submitted ? (R(), w("div", ew, [S("div", tw, [r(l, {
17554
+ default: E(() => [e.submitted ? (R(), w("div", tw, [S("div", nw, [r(l, {
17529
17555
  name: "ri:checkbox-circle-line",
17530
17556
  class: "text-24 text-success"
17531
- }), S("div", null, [S("strong", nw, N(I(n)("message.feedbackSubmittedTitle")), 1), S("p", rw, N(I(n)("message.feedbackSubmittedMessage")), 1)])])])) : (R(), w("div", ZC, [e.error ? (R(), P(d, {
17557
+ }), S("div", null, [S("strong", rw, N(I(n)("message.feedbackSubmittedTitle")), 1), S("p", iw, N(I(n)("message.feedbackSubmittedMessage")), 1)])])])) : (R(), w("div", QC, [e.error ? (R(), P(d, {
17532
17558
  key: 0,
17533
17559
  modifiers: "danger",
17534
17560
  class: "mb-sm",
@@ -17538,7 +17564,7 @@ var JC = { class: "border border-surface-3 rounded-xl w-full overflow-hidden bg-
17538
17564
  "onUpdate:modelValue": i[2] ||= (e) => ge(s) ? s.value = e : null,
17539
17565
  onSubmit: c
17540
17566
  }, {
17541
- default: E(() => [S("div", QC, [r(I(o), {
17567
+ default: E(() => [S("div", $C, [r(I(o), {
17542
17568
  name: "comment",
17543
17569
  type: "textarea",
17544
17570
  rows: "3",
@@ -17546,7 +17572,7 @@ var JC = { class: "border border-surface-3 rounded-xl w-full overflow-hidden bg-
17546
17572
  placeholder: I(n)("placeholder.comment"),
17547
17573
  modifiers: "compact no-label",
17548
17574
  class: "mb-0"
17549
- }, null, 8, ["label", "placeholder"])]), S("div", $C, [r(f, null, {
17575
+ }, null, 8, ["label", "placeholder"])]), S("div", ew, [r(f, null, {
17550
17576
  default: E(() => [r(u, {
17551
17577
  type: "button",
17552
17578
  modifiers: "action-quiet",
@@ -17577,13 +17603,13 @@ var JC = { class: "border border-surface-3 rounded-xl w-full overflow-hidden bg-
17577
17603
  }
17578
17604
  });
17579
17605
  t(), k();
17580
- var aw = { class: "pk-message-feedback__badge" }, ow = {
17606
+ var ow = { class: "pk-message-feedback__badge" }, sw = {
17581
17607
  key: 0,
17582
17608
  class: "pk-message-feedback__emoji"
17583
- }, sw = {
17609
+ }, cw = {
17584
17610
  key: 0,
17585
17611
  class: "pk-message-feedback__comment"
17586
- }, cw = /*#__PURE__*/ jt(/* @__PURE__ */ b({
17612
+ }, lw = /*#__PURE__*/ jt(/* @__PURE__ */ b({
17587
17613
  __name: "PkChatbotMessageFeedback",
17588
17614
  props: { feedback: { type: null } },
17589
17615
  setup(e) {
@@ -17607,35 +17633,35 @@ var aw = { class: "pk-message-feedback__badge" }, ow = {
17607
17633
  });
17608
17634
  return (t, a) => {
17609
17635
  let o = nt;
17610
- return R(), w("div", { class: c(["pk-message-feedback", r.value]) }, [S("span", aw, [n.value ? (R(), w("span", ow, N(n.value), 1)) : (R(), P(o, {
17636
+ return R(), w("div", { class: c(["pk-message-feedback", r.value]) }, [S("span", ow, [n.value ? (R(), w("span", sw, N(n.value), 1)) : (R(), P(o, {
17611
17637
  key: 1,
17612
17638
  name: i.value
17613
- }, null, 8, ["name"]))]), e.feedback.comment ? (R(), w("p", sw, N(e.feedback.comment), 1)) : L("", !0)], 2);
17639
+ }, null, 8, ["name"]))]), e.feedback.comment ? (R(), w("p", cw, N(e.feedback.comment), 1)) : L("", !0)], 2);
17614
17640
  };
17615
17641
  }
17616
17642
  }), [["styles", [".pk-message-feedback{align-items:center;gap:var(--spacing-8);padding:var(--spacing-6) var(--spacing-12) var(--spacing-6) var(--spacing-6);border-radius:var(--rounded-lg);background:var(--pk-feedback-surface);font-size:var(--text-12);color:var(--color-word-2);display:flex}.pk-message-feedback--positive{--pk-feedback-accent:var(--color-success)}.pk-message-feedback--negative{--pk-feedback-accent:var(--color-danger)}.pk-message-feedback--neutral{--pk-feedback-accent:var(--color-surface-4)}.pk-message-feedback{--pk-feedback-surface:color-mix(in srgb, var(--pk-feedback-accent) 8%, var(--color-surface))}.pk-message-feedback__badge{width:var(--spacing-22,1.375rem);height:var(--spacing-22,1.375rem);border-radius:var(--rounded-full,9999px);background:var(--color-surface);color:var(--pk-feedback-accent);box-shadow:var(--shadow-sm);flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.pk-message-feedback__emoji{font-size:var(--text-12);line-height:1}.pk-message-feedback__comment{white-space:pre-wrap;text-wrap:pretty;margin:0}"]]]);
17617
17643
  t(), fe(), k(), C();
17618
- var lw = [
17644
+ var uw = [
17619
17645
  "href",
17620
17646
  "data-pswp-src",
17621
17647
  "data-pswp-width",
17622
17648
  "data-pswp-height",
17623
17649
  "data-pswp-caption",
17624
17650
  "aria-label"
17625
- ], uw = ["src", "alt"], dw = {
17651
+ ], dw = ["src", "alt"], fw = {
17626
17652
  key: 0,
17627
17653
  class: "pk-chatbot-file-preview__status pk-chatbot-file-preview__status--overlay"
17628
- }, fw = {
17654
+ }, pw = {
17629
17655
  key: 1,
17630
17656
  class: "pk-chatbot-file-preview__status pk-chatbot-file-preview__status--overlay pk-chatbot-file-preview__status--error"
17631
- }, pw = {
17657
+ }, mw = {
17632
17658
  key: 0,
17633
17659
  class: "pk-chatbot-file-preview__caption"
17634
- }, mw = ["title"], hw = { class: "pk-chatbot-file-preview__meta" }, gw = ["title"], _w = ["title", "aria-label"], vw = { class: "pk-chatbot-file-preview__body" }, yw = ["title"], bw = { class: "pk-chatbot-file-preview__meta" }, xw = ["title"], Sw = [
17660
+ }, hw = ["title"], gw = { class: "pk-chatbot-file-preview__meta" }, _w = ["title"], vw = ["title", "aria-label"], yw = { class: "pk-chatbot-file-preview__body" }, bw = ["title"], xw = { class: "pk-chatbot-file-preview__meta" }, Sw = ["title"], Cw = [
17635
17661
  "href",
17636
17662
  "title",
17637
17663
  "aria-label"
17638
- ], Cw = ["title", "aria-label"], ww = 300, Tw = /*#__PURE__*/ jt(/* @__PURE__ */ b({
17664
+ ], ww = ["title", "aria-label"], Tw = 300, Ew = /*#__PURE__*/ jt(/* @__PURE__ */ b({
17639
17665
  __name: "PkChatbotFilePreview",
17640
17666
  props: {
17641
17667
  mediaType: { type: String },
@@ -17746,7 +17772,7 @@ var lw = [
17746
17772
  for (; r >= 1024 && i < n.length - 1;) r /= 1024, i += 1;
17747
17773
  return `${r < 10 ? r.toFixed(1) : Math.round(r)} ${n[i]}`;
17748
17774
  }), d = /* @__PURE__ */ new Map(), p = (e, t) => {
17749
- d.delete(e), d.set(e, t), d.size > ww && d.delete(d.keys().next().value);
17775
+ d.delete(e), d.set(e, t), d.size > Tw && d.delete(d.keys().next().value);
17750
17776
  }, m = d.get(t.url), h = A(m?.status ?? "loading"), g = A(m?.dimensions), _ = (e) => {
17751
17777
  let n = e.target;
17752
17778
  n.naturalWidth && n.naturalHeight && (g.value = {
@@ -17792,16 +17818,16 @@ var lw = [
17792
17818
  class: "pk-chatbot-file-preview__thumb",
17793
17819
  onLoad: _,
17794
17820
  onError: v
17795
- }, null, 40, uw), [[Se, h.value === "loaded"]])], 8, lw), e.loading || h.value === "loading" ? (R(), w("span", dw, [r(a, { name: "line-md:loading-loop" })])) : h.value === "error" ? (R(), w("span", fw, [r(a, { name: "ri:image-2-line" })])) : L("", !0)], 512),
17796
- e.compact ? L("", !0) : (R(), w("figcaption", pw, [e.filename ? (R(), w("span", {
17821
+ }, null, 40, dw), [[Se, h.value === "loaded"]])], 8, uw), e.loading || h.value === "loading" ? (R(), w("span", fw, [r(a, { name: "line-md:loading-loop" })])) : h.value === "error" ? (R(), w("span", pw, [r(a, { name: "ri:image-2-line" })])) : L("", !0)], 512),
17822
+ e.compact ? L("", !0) : (R(), w("figcaption", mw, [e.filename ? (R(), w("span", {
17797
17823
  key: 0,
17798
17824
  class: "pk-chatbot-file-preview__name",
17799
17825
  title: e.filename
17800
- }, N(e.filename), 9, mw)) : L("", !0), S("span", hw, [e.error ? (R(), w("span", {
17826
+ }, N(e.filename), 9, hw)) : L("", !0), S("span", gw, [e.error ? (R(), w("span", {
17801
17827
  key: 0,
17802
17828
  class: "pk-chatbot-file-preview__error",
17803
17829
  title: e.error
17804
- }, [r(a, { name: "ri:error-warning-line" }), y(" " + N(e.error), 1)], 8, gw)) : (R(), w(M, { key: 1 }, [y(N(x.value.join(" · ")), 1)], 64))])])),
17830
+ }, [r(a, { name: "ri:error-warning-line" }), y(" " + N(e.error), 1)], 8, _w)) : (R(), w(M, { key: 1 }, [y(N(x.value.join(" · ")), 1)], 64))])])),
17805
17831
  e.removable && !e.loading ? (R(), w("button", {
17806
17832
  key: 1,
17807
17833
  type: "button",
@@ -17809,7 +17835,7 @@ var lw = [
17809
17835
  title: t.$t("action.remove"),
17810
17836
  "aria-label": t.$t("action.remove"),
17811
17837
  onClick: i[0] ||= ue((e) => t.$emit("remove"), ["prevent"])
17812
- }, [r(a, { name: "ri:close-line" })], 8, _w)) : L("", !0)
17838
+ }, [r(a, { name: "ri:close-line" })], 8, vw)) : L("", !0)
17813
17839
  ], 2)) : (R(), w("div", {
17814
17840
  key: 1,
17815
17841
  class: c(["pk-chatbot-file-preview pk-chatbot-file-preview--doc", {
@@ -17829,15 +17855,15 @@ var lw = [
17829
17855
  name: s.value.icon,
17830
17856
  class: "pk-chatbot-file-preview__icon"
17831
17857
  }, null, 8, ["name"]))], 4),
17832
- S("span", vw, [e.filename ? (R(), w("span", {
17858
+ S("span", yw, [e.filename ? (R(), w("span", {
17833
17859
  key: 0,
17834
17860
  class: "pk-chatbot-file-preview__name",
17835
17861
  title: e.filename
17836
- }, N(e.filename), 9, yw)) : L("", !0), S("span", bw, [e.error ? (R(), w("span", {
17862
+ }, N(e.filename), 9, bw)) : L("", !0), S("span", xw, [e.error ? (R(), w("span", {
17837
17863
  key: 0,
17838
17864
  class: "pk-chatbot-file-preview__error",
17839
17865
  title: e.error
17840
- }, [r(a, { name: "ri:error-warning-line" }), y(" " + N(e.error), 1)], 8, xw)) : (R(), w(M, { key: 1 }, [y(N(ee.value.join(" · ")), 1)], 64))])]),
17866
+ }, [r(a, { name: "ri:error-warning-line" }), y(" " + N(e.error), 1)], 8, Sw)) : (R(), w(M, { key: 1 }, [y(N(ee.value.join(" · ")), 1)], 64))])]),
17841
17867
  !e.loading && !e.error && !e.compact ? (R(), w("a", {
17842
17868
  key: 0,
17843
17869
  href: e.url,
@@ -17846,7 +17872,7 @@ var lw = [
17846
17872
  class: "pk-chatbot-file-preview__open",
17847
17873
  title: t.$t("action.download"),
17848
17874
  "aria-label": `${t.$t("action.download")}${e.filename ? ` — ${e.filename}` : ""}`
17849
- }, [r(a, { name: "ri:download-2-line" })], 8, Sw)) : L("", !0),
17875
+ }, [r(a, { name: "ri:download-2-line" })], 8, Cw)) : L("", !0),
17850
17876
  e.removable && !e.loading ? (R(), w("button", {
17851
17877
  key: 1,
17852
17878
  type: "button",
@@ -17854,13 +17880,13 @@ var lw = [
17854
17880
  title: t.$t("action.remove"),
17855
17881
  "aria-label": t.$t("action.remove"),
17856
17882
  onClick: i[1] ||= (e) => t.$emit("remove")
17857
- }, [r(a, { name: "ri:close-line" })], 10, Cw)) : L("", !0)
17883
+ }, [r(a, { name: "ri:close-line" })], 10, ww)) : L("", !0)
17858
17884
  ], 2));
17859
17885
  };
17860
17886
  }
17861
17887
  }), [["styles", [".pk-chatbot-file-preview{--file-radius:var(--rounded-lg,12px);background-color:var(--color-surface-1);border:1px solid var(--color-surface-3);border-radius:var(--file-radius);max-width:280px;color:var(--color-word-2);font-size:var(--text-12);position:relative}.pk-chatbot-file-preview--error{border-color:var(--color-danger)}.pk-chatbot-file-preview--doc{align-items:center;gap:var(--spacing-8);padding:var(--spacing-8);min-width:0;transition:border-color .18s var(--ease-out), background-color .18s var(--ease-out), box-shadow .18s var(--ease-out);display:flex}.pk-chatbot-file-preview--doc:hover{border-color:var(--color-surface-4);background-color:var(--color-surface-2);box-shadow:var(--shadow-sm)}.pk-chatbot-file-preview__icon-tile{width:var(--spacing-36);height:var(--spacing-36);border-radius:var(--rounded-md,6px);background-color:color-mix(in srgb, var(--file-accent) 14%, transparent);color:var(--file-accent);flex-shrink:0;justify-content:center;align-items:center;display:flex}.pk-chatbot-file-preview__icon{width:var(--spacing-20);height:var(--spacing-20)}.pk-chatbot-file-preview__body{flex-direction:column;flex:1;gap:1px;min-width:0;display:flex}.pk-chatbot-file-preview__open{width:var(--spacing-28);height:var(--spacing-28);border-radius:var(--rounded);color:var(--color-word-3);opacity:0;transition:opacity .18s var(--ease-out), color .18s var(--ease-out), background-color .18s var(--ease-out);flex-shrink:0;justify-content:center;align-items:center;margin-inline-start:var(--spacing-4);text-decoration:none;display:flex}.pk-chatbot-file-preview__open:hover{background-color:var(--color-surface-3);color:var(--color-word-1)}.pk-chatbot-file-preview--doc:hover .pk-chatbot-file-preview__open,.pk-chatbot-file-preview--doc:focus-within .pk-chatbot-file-preview__open{opacity:1}@media (hover:none){.pk-chatbot-file-preview--doc .pk-chatbot-file-preview__open{opacity:1}}.pk-chatbot-file-preview--image{flex-direction:column;margin:0;display:inline-flex}.pk-chatbot-file-preview__thumb-wrap{background-color:var(--color-surface);border-radius:var(--file-radius);width:280px;max-width:100%;height:200px;display:flex;position:relative;overflow:hidden}.pk-chatbot-file-preview__thumb-link{cursor:pointer;width:100%;height:100%;display:flex}.pk-chatbot-file-preview__thumb{object-fit:cover;width:100%;height:100%;display:block}.pk-chatbot-file-preview__caption{padding:var(--spacing-8);flex-direction:column;gap:1px;min-width:0;display:flex}.pk-chatbot-file-preview__name{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-weight:var(--font-medium,500);color:var(--color-word-1);overflow:hidden}.pk-chatbot-file-preview__meta{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:var(--text-10);line-height:var(--leading-normal);min-height:1.4em;color:var(--color-word-4);font-variant-numeric:tabular-nums;overflow:hidden}.pk-chatbot-file-preview__error{align-items:center;gap:var(--spacing-4);color:var(--color-danger);display:inline-flex}.pk-chatbot-file-preview__error .vv-icon{flex-shrink:0}.pk-chatbot-file-preview__status{justify-content:center;align-items:center;display:inline-flex}.pk-chatbot-file-preview__status .vv-icon{width:var(--spacing-32);height:var(--spacing-32)}.pk-chatbot-file-preview__status--overlay{background-color:color-mix(in srgb, var(--color-surface-1) 70%, transparent);color:var(--color-word-1);position:absolute;inset:0}.pk-chatbot-file-preview__status--error{color:var(--color-word-4)}.pk-chatbot-file-preview__remove{width:var(--spacing-28);height:var(--spacing-28);border-radius:var(--rounded-full,9999px);background-color:color-mix(in srgb, var(--color-surface-1) 85%, transparent);color:var(--color-word-2);cursor:pointer;box-shadow:var(--shadow-sm);transition:background-color .18s var(--ease-out), color .18s var(--ease-out), scale .12s var(--ease-out);border:none;justify-content:center;align-items:center;padding:0;line-height:1;display:flex;position:absolute;top:0;right:0;transform:translate(50%,-50%)}.pk-chatbot-file-preview__remove:hover{background-color:var(--color-surface-2);color:var(--color-word-1)}.pk-chatbot-file-preview__remove:active{scale:.96}.pk-chatbot-file-preview__remove--inline{box-shadow:none;color:var(--color-word-4);background-color:#0000;flex-shrink:0;position:static}.pk-chatbot-file-preview__remove--inline:hover{background-color:var(--color-surface-3);color:var(--color-word-1)}.pk-chatbot-file-preview--compact{--chip-size:var(--spacing-56);max-width:240px}.pk-chatbot-file-preview--compact.pk-chatbot-file-preview--image{width:var(--chip-size);height:var(--chip-size);border-radius:var(--rounded-md,6px)}.pk-chatbot-file-preview--compact .pk-chatbot-file-preview__thumb-wrap,.pk-chatbot-file-preview--compact .pk-chatbot-file-preview__thumb-link{width:100%;height:100%}.pk-chatbot-file-preview--compact.pk-chatbot-file-preview--doc{height:var(--chip-size);gap:var(--spacing-8);padding:var(--spacing-8);padding-inline-end:var(--spacing-28)}.pk-chatbot-file-preview--compact .pk-chatbot-file-preview__icon-tile{aspect-ratio:1;align-self:stretch;width:auto;height:auto}.pk-chatbot-file-preview--compact .pk-chatbot-file-preview__icon{width:var(--spacing-20);height:var(--spacing-20)}.pk-chatbot-file-preview--compact .pk-chatbot-file-preview__remove{top:var(--spacing-4);right:var(--spacing-4);width:var(--spacing-24);height:var(--spacing-24);border:1px solid var(--color-surface-4);background-color:var(--color-surface);color:var(--color-word-1);font-size:var(--text-16);box-shadow:var(--shadow-sm)}.pk-chatbot-file-preview--compact .pk-chatbot-file-preview__remove:after{content:\"\";inset:calc(-1 * var(--spacing-4));position:absolute}.pk-chatbot-file-preview--compact .pk-chatbot-file-preview__remove:hover{background-color:var(--color-surface-2);color:var(--color-word-1)}@media (prefers-reduced-motion:reduce){.pk-chatbot-file-preview--doc,.pk-chatbot-file-preview__open,.pk-chatbot-file-preview__remove{transition:none}}"]]]);
17862
17888
  t(), k(), C();
17863
- var Ew = ["datetime"], Dw = 6e4, Ow = /* @__PURE__ */ b({
17889
+ var Dw = ["datetime"], Ow = 6e4, kw = /* @__PURE__ */ b({
17864
17890
  __name: "PkRelativeTime",
17865
17891
  props: {
17866
17892
  date: { type: [
@@ -17889,7 +17915,7 @@ var Ew = ["datetime"], Dw = 6e4, Ow = /* @__PURE__ */ b({
17889
17915
  let t = e, { t: n } = Oe({ useScope: "global" }), r = A(Date.now()), i = null, a = O(() => t.date instanceof Date ? t.date.getTime() : typeof t.date == "string" ? new Date(t.date).getTime() : t.date), o = O(() => t.endDate === void 0 ? null : t.endDate instanceof Date ? t.endDate.getTime() : typeof t.endDate == "string" ? new Date(t.endDate).getTime() : t.endDate), s = O(() => {
17890
17916
  let e = o.value ?? r.value;
17891
17917
  return a.value - e;
17892
- }), c = O(() => t.endDate ? s.value > 0 : s.value > Dw), l = O(() => Math.abs(s.value)), { formatDelta: u } = dS(), d = O(() => {
17918
+ }), c = O(() => t.endDate ? s.value > 0 : s.value > Ow), l = O(() => Math.abs(s.value)), { formatDelta: u } = dS(), d = O(() => {
17893
17919
  let e = l.value;
17894
17920
  return u(e);
17895
17921
  }), p = O(() => {
@@ -17905,13 +17931,13 @@ var Ew = ["datetime"], Dw = 6e4, Ow = /* @__PURE__ */ b({
17905
17931
  t.autoUpdate && !t.endDate && (i = setTimeout(g, h()));
17906
17932
  }), v(() => {
17907
17933
  i && clearTimeout(i);
17908
- }), (e, t) => (R(), w("time", { datetime: m.value }, N(p.value), 9, Ew));
17934
+ }), (e, t) => (R(), w("time", { datetime: m.value }, N(p.value), 9, Dw));
17909
17935
  }
17910
17936
  });
17911
17937
  //#endregion
17912
17938
  //#region ../../packages/components/src/chat/toolComponentMap.ts
17913
17939
  t();
17914
- var kw = {
17940
+ var Aw = {
17915
17941
  requestConfirm: F(() => import("./_chunks/PkToolRequestConfirm-BGt2J3e5.js")),
17916
17942
  requestOAuthConnection: F(() => import("./_chunks/PkToolRequestOAuthConnection-BH2tXr0j.js")),
17917
17943
  showArtifact: F(() => import("./_chunks/PkToolShowArtifact-BaGEr7O9.js")),
@@ -17936,7 +17962,7 @@ var kw = {
17936
17962
  t(), k(), C();
17937
17963
  //#endregion
17938
17964
  //#region ../../packages/components/src/chat/PkStreamingMarkdownAutoscroll.vue
17939
- var Aw = /* @__PURE__ */ b({
17965
+ var jw = /* @__PURE__ */ b({
17940
17966
  __name: "PkStreamingMarkdownAutoscroll",
17941
17967
  props: {
17942
17968
  markdown: { type: String },
@@ -17968,41 +17994,41 @@ var Aw = /* @__PURE__ */ b({
17968
17994
  }
17969
17995
  });
17970
17996
  t(), k(), C(), fe();
17971
- var jw = { class: "pk-chatbot-step-detail" }, Mw = {
17997
+ var Mw = { class: "pk-chatbot-step-detail" }, Nw = {
17972
17998
  key: 0,
17973
17999
  class: "pk-chatbot-step-detail__chips"
17974
- }, Nw = { class: "pk-chatbot-step-detail__chip-text" }, Pw = {
18000
+ }, Pw = { class: "pk-chatbot-step-detail__chip-text" }, Fw = {
17975
18001
  key: 1,
17976
18002
  class: "pk-chatbot-step-detail__fact"
17977
- }, Fw = {
18003
+ }, Iw = {
17978
18004
  key: 2,
17979
18005
  class: "pk-chatbot-step-detail__empty"
17980
- }, Iw = {
18006
+ }, Lw = {
17981
18007
  key: 3,
17982
18008
  class: "pk-chatbot-step-detail__hits"
17983
- }, Lw = { class: "pk-chatbot-step-detail__hit-heading" }, Rw = { class: "pk-chatbot-step-detail__hit-title" }, zw = ["href"], Bw = {
18009
+ }, Rw = { class: "pk-chatbot-step-detail__hit-heading" }, zw = { class: "pk-chatbot-step-detail__hit-title" }, Bw = ["href"], Vw = {
17984
18010
  key: 0,
17985
18011
  class: "pk-chatbot-step-detail__hit-meta"
17986
- }, Vw = {
18012
+ }, Hw = {
17987
18013
  key: 1,
17988
18014
  class: "pk-chatbot-step-detail__relevance",
17989
18015
  "aria-hidden": "true"
17990
- }, Hw = {
18016
+ }, Uw = {
17991
18017
  key: 0,
17992
18018
  class: "pk-chatbot-step-detail__hit-body"
17993
- }, Uw = {
18019
+ }, Ww = {
17994
18020
  key: 4,
17995
18021
  class: "pk-chatbot-step-detail__passage"
17996
- }, Ww = { class: "pk-chatbot-step-detail__passage-header" }, Gw = { class: "pk-chatbot-step-detail__hit-heading" }, Kw = { class: "pk-chatbot-step-detail__hit-title" }, qw = {
18022
+ }, Gw = { class: "pk-chatbot-step-detail__passage-header" }, Kw = { class: "pk-chatbot-step-detail__hit-heading" }, qw = { class: "pk-chatbot-step-detail__hit-title" }, Jw = {
17997
18023
  key: 0,
17998
18024
  class: "pk-chatbot-step-detail__hit-meta"
17999
- }, Jw = { class: "pk-chatbot-step-detail__passage-content" }, Yw = {
18025
+ }, Yw = { class: "pk-chatbot-step-detail__passage-content" }, Xw = {
18000
18026
  key: 5,
18001
18027
  class: "pk-chatbot-steps__step-payload"
18002
- }, Xw = { class: "pk-chatbot-steps__step-payload-label" }, Zw = {
18028
+ }, Zw = { class: "pk-chatbot-steps__step-payload-label" }, Qw = {
18003
18029
  key: 6,
18004
18030
  class: "pk-chatbot-steps__step-payload"
18005
- }, Qw = { class: "pk-chatbot-steps__step-payload-label" }, $w = /*#__PURE__*/ jt(/* @__PURE__ */ b({
18031
+ }, $w = { class: "pk-chatbot-steps__step-payload-label" }, eT = /*#__PURE__*/ jt(/* @__PURE__ */ b({
18006
18032
  __name: "PkChatbotStepToolDetail",
18007
18033
  props: { part: { type: null } },
18008
18034
  setup(e) {
@@ -18125,31 +18151,31 @@ var jw = { class: "pk-chatbot-step-detail" }, Mw = {
18125
18151
  text: t
18126
18152
  } } : {};
18127
18153
  }
18128
- return AC.includes(e) ? {
18154
+ return jC.includes(e) ? {
18129
18155
  chips: d.value,
18130
- rawOutput: kC(c.value)
18156
+ rawOutput: AC(c.value)
18131
18157
  } : {};
18132
18158
  }, y = O(() => {
18133
18159
  let e = v();
18134
- return e.chips?.length || e.fact || e.passage || e.showEmpty || e.hits?.length || (e.rawInput = kC(s.value), e.rawOutput ??= kC(c.value)), e;
18160
+ return e.chips?.length || e.fact || e.passage || e.showEmpty || e.hits?.length || (e.rawInput = AC(s.value), e.rawOutput ??= AC(c.value)), e;
18135
18161
  }), b = D(/* @__PURE__ */ new Set()), x = (e) => {
18136
18162
  b.has(e) ? b.delete(e) : b.add(e);
18137
18163
  };
18138
18164
  return (e, t) => {
18139
18165
  let i = nt;
18140
- return R(), w("div", jw, [
18141
- y.value.chips?.length ? (R(), w("ul", Mw, [(R(!0), w(M, null, te(y.value.chips, (e, t) => (R(), w("li", {
18166
+ return R(), w("div", Mw, [
18167
+ y.value.chips?.length ? (R(), w("ul", Nw, [(R(!0), w(M, null, te(y.value.chips, (e, t) => (R(), w("li", {
18142
18168
  key: `${t}-${e}`,
18143
18169
  class: "pk-chatbot-step-detail__chip"
18144
18170
  }, [r(i, {
18145
18171
  name: "ri:search-line",
18146
18172
  class: "shrink-0"
18147
- }), S("span", Nw, N(e), 1)]))), 128))])) : L("", !0),
18148
- y.value.fact ? (R(), w("div", Pw, [r(i, {
18173
+ }), S("span", Pw, N(e), 1)]))), 128))])) : L("", !0),
18174
+ y.value.fact ? (R(), w("div", Fw, [r(i, {
18149
18175
  name: y.value.fact.icon,
18150
18176
  class: "shrink-0"
18151
18177
  }, null, 8, ["name"]), S("span", null, N(y.value.fact.text), 1)])) : L("", !0),
18152
- y.value.showEmpty ? (R(), w("div", Fw, N(I(n)("messagePart.stepNoResults")), 1)) : y.value.hits?.length ? (R(), w("ul", Iw, [(R(!0), w(M, null, te(y.value.hits, (e) => (R(), w("li", { key: e.key }, [(R(), P(ne(e.body ? "button" : "div"), {
18178
+ y.value.showEmpty ? (R(), w("div", Iw, N(I(n)("messagePart.stepNoResults")), 1)) : y.value.hits?.length ? (R(), w("ul", Lw, [(R(!0), w(M, null, te(y.value.hits, (e) => (R(), w("li", { key: e.key }, [(R(), P(ne(e.body ? "button" : "div"), {
18153
18179
  type: e.body ? "button" : void 0,
18154
18180
  class: "pk-chatbot-step-detail__hit-header",
18155
18181
  "aria-expanded": e.body ? b.has(e.key) : void 0,
@@ -18160,16 +18186,16 @@ var jw = { class: "pk-chatbot-step-detail" }, Mw = {
18160
18186
  name: e.icon,
18161
18187
  class: "pk-chatbot-step-detail__hit-icon"
18162
18188
  }, null, 8, ["name"]),
18163
- S("span", Lw, [S("span", Rw, N(e.title), 1), e.url ? (R(), w("a", {
18189
+ S("span", Rw, [S("span", zw, N(e.title), 1), e.url ? (R(), w("a", {
18164
18190
  key: 0,
18165
18191
  href: e.url,
18166
18192
  target: "_blank",
18167
18193
  rel: "noopener noreferrer",
18168
18194
  class: "pk-chatbot-step-detail__link",
18169
18195
  onClick: t[0] ||= ue(() => {}, ["stop"])
18170
- }, [r(i, { name: "ri:external-link-line" })], 8, zw)) : L("", !0)]),
18171
- e.meta ? (R(), w("span", Bw, N(e.meta), 1)) : L("", !0),
18172
- e.relevance === void 0 ? L("", !0) : (R(), w("span", Vw, [S("span", {
18196
+ }, [r(i, { name: "ri:external-link-line" })], 8, Bw)) : L("", !0)]),
18197
+ e.meta ? (R(), w("span", Vw, N(e.meta), 1)) : L("", !0),
18198
+ e.relevance === void 0 ? L("", !0) : (R(), w("span", Hw, [S("span", {
18173
18199
  class: "pk-chatbot-step-detail__relevance-fill",
18174
18200
  style: re({ width: `${Math.round(e.relevance * 100)}%` })
18175
18201
  }, null, 4)])),
@@ -18184,44 +18210,44 @@ var jw = { class: "pk-chatbot-step-detail" }, Mw = {
18184
18210
  "type",
18185
18211
  "aria-expanded",
18186
18212
  "onClick"
18187
- ])), e.body && b.has(e.key) ? (R(), w("div", Hw, N(e.body), 1)) : L("", !0)]))), 128))])) : L("", !0),
18188
- y.value.passage ? (R(), w("div", Uw, [S("div", Ww, [
18213
+ ])), e.body && b.has(e.key) ? (R(), w("div", Uw, N(e.body), 1)) : L("", !0)]))), 128))])) : L("", !0),
18214
+ y.value.passage ? (R(), w("div", Ww, [S("div", Gw, [
18189
18215
  r(i, {
18190
18216
  name: "ri:file-text-line",
18191
18217
  class: "shrink-0"
18192
18218
  }),
18193
- S("span", Gw, [S("span", Kw, N(y.value.passage.title ?? I(n)("messagePart.stepDocument")), 1)]),
18194
- y.value.passage.meta ? (R(), w("span", qw, N(y.value.passage.meta), 1)) : L("", !0)
18195
- ]), S("div", Jw, N(y.value.passage.content), 1)])) : L("", !0),
18196
- y.value.rawInput ? (R(), w("div", Yw, [S("span", Xw, N(I(n)("messagePart.stepInput")), 1), S("pre", null, N(y.value.rawInput), 1)])) : L("", !0),
18197
- y.value.rawOutput ? (R(), w("div", Zw, [S("span", Qw, N(I(n)("messagePart.stepOutput")), 1), S("pre", null, N(y.value.rawOutput), 1)])) : L("", !0)
18219
+ S("span", Kw, [S("span", qw, N(y.value.passage.title ?? I(n)("messagePart.stepDocument")), 1)]),
18220
+ y.value.passage.meta ? (R(), w("span", Jw, N(y.value.passage.meta), 1)) : L("", !0)
18221
+ ]), S("div", Yw, N(y.value.passage.content), 1)])) : L("", !0),
18222
+ y.value.rawInput ? (R(), w("div", Xw, [S("span", Zw, N(I(n)("messagePart.stepInput")), 1), S("pre", null, N(y.value.rawInput), 1)])) : L("", !0),
18223
+ y.value.rawOutput ? (R(), w("div", Qw, [S("span", $w, N(I(n)("messagePart.stepOutput")), 1), S("pre", null, N(y.value.rawOutput), 1)])) : L("", !0)
18198
18224
  ]);
18199
18225
  };
18200
18226
  }
18201
18227
  }), [["styles", [".pk-chatbot-step-detail{gap:var(--spacing-8);font-size:var(--text-12);color:var(--color-word-3);flex-direction:column;display:flex}.pk-chatbot-step-detail__chips{gap:var(--spacing-4);flex-wrap:wrap;display:flex}.pk-chatbot-step-detail__chip{align-items:center;gap:var(--spacing-4);max-width:100%;padding:var(--spacing-2) var(--spacing-8);border:var(--spacing-px) solid var(--color-surface-4);border-radius:var(--rounded-full);background-color:var(--color-surface-1);color:var(--color-word-2);display:inline-flex}.pk-chatbot-step-detail__chip-text{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.pk-chatbot-step-detail__fact{align-items:center;gap:var(--spacing-8);color:var(--color-word-2);display:flex}.pk-chatbot-step-detail__empty{color:var(--color-word-4);font-style:italic}.pk-chatbot-step-detail__hits{border:var(--spacing-px) solid var(--color-surface-4);border-radius:var(--rounded);background-color:var(--color-surface-1);flex-direction:column;display:flex;overflow:hidden}.pk-chatbot-step-detail__hits>li+li{border-top:var(--spacing-px) solid var(--color-surface-3)}.pk-chatbot-step-detail__hit-header{align-items:center;gap:var(--spacing-8);width:100%;min-height:var(--spacing-32);padding:var(--spacing-4) var(--spacing-8);text-align:left;display:flex}.pk-chatbot-step-detail__hit-header:is(button){cursor:pointer;transition:background-color .2s}.pk-chatbot-step-detail__hit-header:is(button):hover{background-color:var(--color-surface-2)}.pk-chatbot-step-detail__hit-icon{color:var(--color-word-3);flex-shrink:0}.pk-chatbot-step-detail__hit-heading{align-items:center;gap:var(--spacing-4);flex:1 1 0;min-width:0;display:flex}.pk-chatbot-step-detail__hit-title{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--color-word-2);overflow:hidden}.pk-chatbot-step-detail__hit-meta{color:var(--color-word-4);font-variant-numeric:tabular-nums;white-space:nowrap}.pk-chatbot-step-detail__relevance{width:var(--spacing-40);height:var(--spacing-4);border-radius:var(--rounded-full);background-color:var(--color-surface-3);flex-shrink:0;overflow:hidden}.pk-chatbot-step-detail__relevance-fill{border-radius:inherit;background-color:var(--chatbot-main-color,var(--color-word-4));height:100%;display:block}.pk-chatbot-step-detail__link{color:var(--color-word-4);flex-shrink:0;display:inline-flex}.pk-chatbot-step-detail__link:hover{color:var(--color-word-1)}.pk-chatbot-step-detail__hit-body,.pk-chatbot-step-detail__passage-content{padding:var(--spacing-8);max-height:var(--spacing-160);white-space:pre-wrap;word-break:break-word;color:var(--color-word-3);overflow:auto}.pk-chatbot-step-detail__hit-body{border-top:var(--spacing-px) solid var(--color-surface-3)}.pk-chatbot-step-detail__passage{border:var(--spacing-px) solid var(--color-surface-4);border-radius:var(--rounded);background-color:var(--color-surface-1);overflow:hidden}.pk-chatbot-step-detail__passage-header{align-items:center;gap:var(--spacing-8);min-height:var(--spacing-32);padding:var(--spacing-4) var(--spacing-8);border-bottom:var(--spacing-px) solid var(--color-surface-3);display:flex}"]]]);
18202
18228
  t(), C(), k();
18203
- var eT = {
18229
+ var tT = {
18204
18230
  key: 0,
18205
18231
  class: "pk-chatbot-steps"
18206
- }, tT = ["aria-expanded"], nT = { class: "pk-chatbot-steps__title" }, rT = { class: "pk-chatbot-steps__meta" }, iT = {
18232
+ }, nT = ["aria-expanded"], rT = { class: "pk-chatbot-steps__title" }, iT = { class: "pk-chatbot-steps__meta" }, aT = {
18207
18233
  key: 0,
18208
18234
  class: "pk-chatbot-steps__list"
18209
- }, aT = { class: "pk-chatbot-steps__step-label" }, oT = { class: "pk-chatbot-steps__step-summary" }, sT = {
18235
+ }, oT = { class: "pk-chatbot-steps__step-label" }, sT = { class: "pk-chatbot-steps__step-summary" }, cT = {
18210
18236
  key: 0,
18211
18237
  class: "pk-chatbot-steps__step-duration"
18212
- }, cT = {
18238
+ }, lT = {
18213
18239
  key: 0,
18214
18240
  class: "pk-chatbot-steps__step-body"
18215
- }, lT = {
18241
+ }, uT = {
18216
18242
  key: 2,
18217
18243
  class: "pk-chatbot-steps__step-payload pk-chatbot-steps__step-payload--error"
18218
- }, uT = { class: "pk-chatbot-steps__step-payload-label" }, dT = {
18244
+ }, dT = { class: "pk-chatbot-steps__step-payload-label" }, fT = {
18219
18245
  key: 0,
18220
18246
  class: "pk-chatbot-steps__step-payload"
18221
- }, fT = { class: "pk-chatbot-steps__step-payload-label" }, pT = {
18247
+ }, pT = { class: "pk-chatbot-steps__step-payload-label" }, mT = {
18222
18248
  key: 1,
18223
18249
  class: "pk-chatbot-steps__step-payload"
18224
- }, mT = { class: "pk-chatbot-steps__step-payload-label" }, hT = /*#__PURE__*/ jt(/* @__PURE__ */ b({
18250
+ }, hT = { class: "pk-chatbot-steps__step-payload-label" }, gT = /*#__PURE__*/ jt(/* @__PURE__ */ b({
18225
18251
  __name: "PkChatbotSteps",
18226
18252
  props: {
18227
18253
  message: { type: Object },
@@ -18238,9 +18264,9 @@ var eT = {
18238
18264
  i.push({
18239
18265
  key: l ?? `${o.type}-${a}`,
18240
18266
  part: o,
18241
- icon: IC(o),
18242
- label: LC(n, o),
18243
- summary: FC(o),
18267
+ icon: LC(o),
18268
+ label: RC(n, o),
18269
+ summary: IC(o),
18244
18270
  durationMs: l ? r?.[l] : void 0,
18245
18271
  isActive: !!t.isStreaming && a === e.length - 1,
18246
18272
  text: s && o.text.trim() ? o.text : void 0,
@@ -18252,14 +18278,14 @@ var eT = {
18252
18278
  }), o = O(() => {
18253
18279
  let { createdAt: e, completedAt: n } = t.message.metadata ?? {};
18254
18280
  if (!(!e || !n)) return n - e;
18255
- }), s = (e) => OC(i, e), l = (e) => TC(e.part) === "output-error" && "errorText" in e.part && typeof e.part.errorText == "string" ? e.part.errorText : void 0, u = (e) => e.text || l(e) ? !0 : MC(e.part) ? e.toolInput !== void 0 || e.toolOutput !== void 0 : !!(kC(e.toolInput) ?? kC(e.toolOutput)), d = D(/* @__PURE__ */ new Map()), f = (e) => d.get(e.key) ?? e.isActive, p = (e) => {
18281
+ }), s = (e) => kC(i, e), l = (e) => EC(e.part) === "output-error" && "errorText" in e.part && typeof e.part.errorText == "string" ? e.part.errorText : void 0, u = (e) => e.text || l(e) ? !0 : NC(e.part) ? e.toolInput !== void 0 || e.toolOutput !== void 0 : !!(AC(e.toolInput) ?? AC(e.toolOutput)), d = D(/* @__PURE__ */ new Map()), f = (e) => d.get(e.key) ?? e.isActive, p = (e) => {
18256
18282
  d.set(e.key, !f(e));
18257
18283
  }, m = A(void 0), h = O(() => m.value ?? !!t.isStreaming);
18258
18284
  return _(() => t.isStreaming, (e) => {
18259
18285
  e && (m.value = void 0, d.clear());
18260
18286
  }), (t, i) => {
18261
18287
  let d = nt;
18262
- return a.value.length ? (R(), w("div", eT, [S("button", {
18288
+ return a.value.length ? (R(), w("div", tT, [S("button", {
18263
18289
  type: "button",
18264
18290
  class: "pk-chatbot-steps__header",
18265
18291
  "aria-expanded": h.value,
@@ -18274,13 +18300,13 @@ var eT = {
18274
18300
  name: "ri:route-line",
18275
18301
  class: "shrink-0"
18276
18302
  })),
18277
- S("span", nT, N(I(n)("messagePart.steps")), 1),
18278
- S("span", rT, [y(N(I(n)("messagePart.stepCount", a.value.length)) + " ", 1), s(o.value) ? (R(), w(M, { key: 0 }, [y(" · " + N(s(o.value)), 1)], 64)) : L("", !0)]),
18303
+ S("span", rT, N(I(n)("messagePart.steps")), 1),
18304
+ S("span", iT, [y(N(I(n)("messagePart.stepCount", a.value.length)) + " ", 1), s(o.value) ? (R(), w(M, { key: 0 }, [y(" · " + N(s(o.value)), 1)], 64)) : L("", !0)]),
18279
18305
  r(d, {
18280
18306
  name: h.value ? "ri:arrow-up-s-line" : "ri:arrow-down-s-line",
18281
18307
  class: "pk-chatbot-steps__chevron shrink-0 ml-auto"
18282
18308
  }, null, 8, ["name"])
18283
- ], 8, tT), h.value ? (R(), w("ol", iT, [(R(!0), w(M, null, te(a.value, (t) => (R(), w("li", {
18309
+ ], 8, nT), h.value ? (R(), w("ol", aT, [(R(!0), w(M, null, te(a.value, (t) => (R(), w("li", {
18284
18310
  key: t.key,
18285
18311
  class: c(["pk-chatbot-steps__step", { "pk-chatbot-steps__step--active": t.isActive }])
18286
18312
  }, [(R(), P(ne(u(t) ? "button" : "div"), {
@@ -18297,9 +18323,9 @@ var eT = {
18297
18323
  key: 1,
18298
18324
  name: t.icon
18299
18325
  }, null, 8, ["name"])) : L("", !0)], 2),
18300
- S("span", aT, N(t.label), 1),
18301
- S("span", oT, N(t.summary), 1),
18302
- s(t.durationMs) ? (R(), w("span", sT, N(s(t.durationMs)), 1)) : L("", !0),
18326
+ S("span", oT, N(t.label), 1),
18327
+ S("span", sT, N(t.summary), 1),
18328
+ s(t.durationMs) ? (R(), w("span", cT, N(s(t.durationMs)), 1)) : L("", !0),
18303
18329
  u(t) ? (R(), P(d, {
18304
18330
  key: 1,
18305
18331
  name: f(t) ? "ri:arrow-up-s-line" : "ri:arrow-down-s-line",
@@ -18311,7 +18337,7 @@ var eT = {
18311
18337
  "type",
18312
18338
  "aria-expanded",
18313
18339
  "onClick"
18314
- ])), u(t) && f(t) ? (R(), w("div", cT, [t.text && t.isActive ? (R(), P(Aw, {
18340
+ ])), u(t) && f(t) ? (R(), w("div", lT, [t.text && t.isActive ? (R(), P(jw, {
18315
18341
  key: 0,
18316
18342
  markdown: t.text,
18317
18343
  "is-dark": e.isDark,
@@ -18322,18 +18348,18 @@ var eT = {
18322
18348
  markdown: t.text,
18323
18349
  "is-dark": e.isDark,
18324
18350
  class: "wysiwyg pk-chatbot-steps__step-content"
18325
- }, null, 8, ["markdown", "is-dark"])) : l(t) ? (R(), w("div", lT, [S("span", uT, N(I(n)("messagePart.stepError")), 1), S("pre", null, N(l(t)), 1)])) : I(MC)(t.part) ? (R(), P($w, {
18351
+ }, null, 8, ["markdown", "is-dark"])) : l(t) ? (R(), w("div", uT, [S("span", dT, N(I(n)("messagePart.stepError")), 1), S("pre", null, N(l(t)), 1)])) : I(NC)(t.part) ? (R(), P(eT, {
18326
18352
  key: 3,
18327
18353
  part: t.part
18328
- }, null, 8, ["part"])) : (R(), w(M, { key: 4 }, [I(kC)(t.toolInput) ? (R(), w("div", dT, [S("span", fT, N(I(n)("messagePart.stepInput")), 1), S("pre", null, N(I(kC)(t.toolInput)), 1)])) : L("", !0), I(kC)(t.toolOutput) ? (R(), w("div", pT, [S("span", mT, N(I(n)("messagePart.stepOutput")), 1), S("pre", null, N(I(kC)(t.toolOutput)), 1)])) : L("", !0)], 64))])) : L("", !0)], 2))), 128))])) : L("", !0)])) : L("", !0);
18354
+ }, null, 8, ["part"])) : (R(), w(M, { key: 4 }, [I(AC)(t.toolInput) ? (R(), w("div", fT, [S("span", pT, N(I(n)("messagePart.stepInput")), 1), S("pre", null, N(I(AC)(t.toolInput)), 1)])) : L("", !0), I(AC)(t.toolOutput) ? (R(), w("div", mT, [S("span", hT, N(I(n)("messagePart.stepOutput")), 1), S("pre", null, N(I(AC)(t.toolOutput)), 1)])) : L("", !0)], 64))])) : L("", !0)], 2))), 128))])) : L("", !0)])) : L("", !0);
18329
18355
  };
18330
18356
  }
18331
18357
  }), [["styles", [".pk-chatbot-steps{border:var(--spacing-px) solid var(--color-surface-3);border-radius:var(--rounded-lg);background-color:var(--color-surface-1);width:100%;font-size:var(--text-12);color:var(--color-word-3);overflow:hidden}.pk-chatbot-steps__header{align-items:center;gap:var(--spacing-8);width:100%;min-height:var(--spacing-40);padding:var(--spacing-8) var(--spacing-sm);text-align:left;cursor:pointer;transition:background-color .2s;display:flex}.pk-chatbot-steps__header:hover{background-color:var(--color-surface-2)}.pk-chatbot-steps__chevron{font-size:var(--text-16)}.pk-chatbot-steps__title{color:var(--color-word-2);flex-grow:1;font-weight:600}.pk-chatbot-steps__meta{color:var(--color-word-4);font-variant-numeric:tabular-nums;white-space:nowrap}.pk-chatbot-steps__list{background-color:var(--color-surface);border-top:var(--spacing-px) solid var(--color-surface-3);padding:var(--spacing-8) var(--spacing-sm);flex-direction:column;display:flex}.pk-chatbot-steps__step{position:relative}.pk-chatbot-steps__step:not(:last-child):before{content:\"\";left:var(--spacing-10);top:var(--spacing-28);bottom:calc(var(--spacing-8) * -1);width:var(--spacing-px);background-color:var(--color-surface-4);position:absolute}.pk-chatbot-steps__step-header{align-items:center;gap:var(--spacing-8);width:calc(100% + var(--spacing-16));min-height:var(--spacing-36);margin-inline:calc(var(--spacing-8) * -1);padding:var(--spacing-4) var(--spacing-8);text-align:left;display:flex}.pk-chatbot-steps__step-header:is(button){cursor:pointer;border-radius:var(--rounded);transition:background-color .2s}.pk-chatbot-steps__step-header:is(button):hover{background-color:var(--color-surface-2)}.pk-chatbot-steps-marker{width:var(--spacing-20);height:var(--spacing-20);z-index:1;background-color:var(--color-surface-1);border-radius:var(--rounded-full);border:var(--spacing-px) solid var(--color-surface-4);flex-shrink:0;justify-content:center;align-items:center;display:inline-flex;position:relative}.pk-chatbot-steps-marker--active{background-color:var(--chatbot-main-color,var(--color-surface-4));color:var(--chatbot-contrast-color,var(--color-word-1));border-color:#0000}.pk-chatbot-steps__step-label{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--color-word-2);overflow:hidden}.pk-chatbot-steps__step-summary{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--color-word-4);flex:1 1 0;overflow:hidden}.pk-chatbot-steps__step-duration{color:var(--color-word-4);font-variant-numeric:tabular-nums;white-space:nowrap}.pk-chatbot-steps__step--active .pk-chatbot-steps__step-label{color:var(--color-word-1)}.pk-chatbot-steps__step-body{margin-left:var(--spacing-28);margin-block:var(--spacing-4) var(--spacing-8)}.pk-chatbot-steps__step-content{border:var(--spacing-px) solid var(--color-surface-4);border-radius:var(--rounded);padding:var(--spacing-8);background-color:var(--color-surface-1)}.pk-chatbot-steps__step-content--scroll{max-height:var(--spacing-256)}.pk-chatbot-steps__step-payload{gap:var(--spacing-2);flex-direction:column;display:flex}.pk-chatbot-steps__step-payload+.pk-chatbot-steps__step-payload{margin-top:var(--spacing-8)}.pk-chatbot-steps__step-payload pre{border:var(--spacing-px) solid var(--color-surface-4);border-radius:var(--rounded);padding:var(--spacing-8);font-size:var(--text-10);max-height:var(--spacing-160);white-space:pre-wrap;word-break:break-word;font-family:var(--font-mono);background-color:var(--color-surface-1);overflow:auto}.pk-chatbot-steps__step-payload-label{color:var(--color-word-3);text-transform:uppercase;font-weight:600;font-size:var(--text-10);letter-spacing:.05em}.pk-chatbot-steps__step-payload--error .pk-chatbot-steps__step-payload-label,.pk-chatbot-steps__step-payload--error pre{color:var(--color-danger)}.pk-chatbot-steps__step-payload--error pre{border-color:var(--color-danger-lighten-5)}"]]]);
18332
18358
  t(), C(), k();
18333
- var gT = ["aria-label"], _T = {
18359
+ var _T = ["aria-label"], vT = {
18334
18360
  class: "pk-chatbot-outline__bars",
18335
18361
  "aria-hidden": "true"
18336
- }, vT = { class: "pk-chatbot-outline__panel" }, yT = ["aria-current", "onClick"], bT = /*#__PURE__*/ jt(/* @__PURE__ */ b({
18362
+ }, yT = { class: "pk-chatbot-outline__panel" }, bT = ["aria-current", "onClick"], xT = /*#__PURE__*/ jt(/* @__PURE__ */ b({
18337
18363
  __name: "PkChatbotOutlineRail",
18338
18364
  props: {
18339
18365
  items: { type: Array },
@@ -18345,30 +18371,30 @@ var gT = ["aria-label"], _T = {
18345
18371
  return (t, n) => (R(), w("nav", {
18346
18372
  class: c(["pk-chatbot-outline", { "pk-chatbot-outline--dense": a.value }]),
18347
18373
  "aria-label": I(i)("label.conversationOutline")
18348
- }, [S("div", _T, [(R(!0), w(M, null, te(e.items, (t) => (R(), w("span", {
18374
+ }, [S("div", vT, [(R(!0), w(M, null, te(e.items, (t) => (R(), w("span", {
18349
18375
  key: t.id,
18350
18376
  class: c(["pk-chatbot-outline__bar", { "pk-chatbot-outline__bar--active": t.id === e.activeId }])
18351
- }, null, 2))), 128))]), S("div", vT, [(R(!0), w(M, null, te(e.items, (t) => (R(), w("button", {
18377
+ }, null, 2))), 128))]), S("div", yT, [(R(!0), w(M, null, te(e.items, (t) => (R(), w("button", {
18352
18378
  key: t.id,
18353
18379
  type: "button",
18354
18380
  class: c(["pk-chatbot-outline__item", { "pk-chatbot-outline__item--active": t.id === e.activeId }]),
18355
18381
  "aria-current": t.id === e.activeId ? "true" : void 0,
18356
18382
  onClick: (e) => r("select", t.id)
18357
- }, N(t.preview), 11, yT))), 128))])], 10, gT));
18383
+ }, N(t.preview), 11, bT))), 128))])], 10, _T));
18358
18384
  }
18359
18385
  }), [["styles", [".pk-chatbot-outline{padding:var(--spacing-12);align-items:center;display:flex;position:relative}.pk-chatbot-outline__bars{align-items:flex-end;gap:var(--spacing-6);flex-direction:column;max-height:60vh;display:flex;overflow:hidden}.pk-chatbot-outline--dense .pk-chatbot-outline__bars{gap:var(--spacing-2)}.pk-chatbot-outline__bar{width:var(--spacing-16);height:var(--spacing-2);border-radius:var(--rounded-full);background-color:var(--color-surface-5);transition:var(--transition-colors)}.pk-chatbot-outline__bar--active{background-color:var(--color-word-2)}.pk-chatbot-outline__panel{gap:var(--spacing-2);min-width:180px;max-width:280px;max-height:min(50vh,480px);padding:var(--spacing-6);border:1px solid var(--color-surface-3);border-radius:var(--rounded-lg);background-color:var(--color-surface);box-shadow:var(--shadow-md);opacity:0;visibility:hidden;translate:var(--spacing-8) 0;transition:opacity .15s var(--ease-out), translate .15s var(--ease-out), visibility .15s;flex-direction:column;display:flex;position:absolute;bottom:0;right:100%;overflow-y:auto}@media (prefers-reduced-motion:reduce){.pk-chatbot-outline__panel{transition:none}}.pk-chatbot-outline:hover .pk-chatbot-outline__panel,.pk-chatbot-outline:focus-within .pk-chatbot-outline__panel{opacity:1;visibility:visible;translate:0}.pk-chatbot-outline__item{padding:var(--spacing-6) var(--spacing-10);border-radius:var(--rounded-md);font-size:var(--text-12);color:var(--color-word-2);text-align:start;white-space:nowrap;text-overflow:ellipsis;cursor:pointer;transition:var(--transition-colors);overflow:hidden}.pk-chatbot-outline__item:hover{background-color:var(--color-surface-1)}.pk-chatbot-outline__item--active{background-color:var(--color-surface-2);color:var(--color-word-1);font-weight:var(--font-semibold)}"]]]);
18360
18386
  //#endregion
18361
18387
  //#region ../../packages/components/src/chat/useChatScroll.ts
18362
18388
  C(), t();
18363
- var xT = 30, ST = 500;
18364
- function CT(e) {
18389
+ var ST = 30, CT = 500;
18390
+ function wT(e) {
18365
18391
  let { scrollEl: t, status: n, messagesLength: r, lastMessageRole: i, contentEl: a, onScrollUp: s, onScrollDown: c } = e, u = A(!1), d = A(!0), p = !1, m = null, h = null, g = null, v = null, y = 0, b = (e = "smooth") => {
18366
18392
  !t.value || u.value || (p = !0, t.value.scrollTo({
18367
18393
  top: t.value.scrollHeight,
18368
18394
  behavior: e
18369
18395
  }), setTimeout(() => {
18370
18396
  p = !1;
18371
- }, e === "instant" ? 0 : ST));
18397
+ }, e === "instant" ? 0 : CT));
18372
18398
  }, x = (e) => {
18373
18399
  e.deltaY < 0 && (u.value = !0);
18374
18400
  }, ee = 0, te = (e) => {
@@ -18379,7 +18405,7 @@ function CT(e) {
18379
18405
  }, re = () => {
18380
18406
  if (!t.value) return;
18381
18407
  let { scrollTop: e, scrollHeight: n, clientHeight: r } = t.value;
18382
- if (d.value = n - r - e < xT, p) {
18408
+ if (d.value = n - r - e < ST, p) {
18383
18409
  y = e;
18384
18410
  return;
18385
18411
  }
@@ -18433,34 +18459,34 @@ function CT(e) {
18433
18459
  };
18434
18460
  }
18435
18461
  t(), C(), k(), fe();
18436
- var wT = ["aria-busy"], TT = {
18462
+ var TT = ["aria-busy"], ET = {
18437
18463
  key: 0,
18438
18464
  class: "pk-chatbot-messages__outline"
18439
- }, ET = {
18465
+ }, DT = {
18440
18466
  key: 0,
18441
18467
  class: "pk-chatbot-divider"
18442
- }, DT = { class: "pk-chatbot-divider__label" }, OT = { class: "pk-chatbot-message__text" }, kT = ["title"], AT = {
18468
+ }, OT = { class: "pk-chatbot-divider__label" }, kT = { class: "pk-chatbot-message__text" }, AT = ["title"], jT = {
18443
18469
  key: 0,
18444
18470
  class: "pk-chatbot-message__reaction-emoji"
18445
- }, jT = {
18471
+ }, MT = {
18446
18472
  key: 0,
18447
18473
  class: "pk-chatbot-message__loading-info"
18448
- }, MT = { class: "flex gap-8 items-center" }, NT = { class: "font-mono rounded text-12" }, PT = { class: "flex gap-8 items-center" }, FT = {
18474
+ }, NT = { class: "flex gap-8 items-center" }, PT = { class: "font-mono rounded text-12" }, FT = { class: "flex gap-8 items-center" }, IT = {
18449
18475
  key: 0,
18450
18476
  class: "pk-chatbot-message__footer"
18451
- }, IT = {
18477
+ }, LT = {
18452
18478
  key: 0,
18453
18479
  class: "pk-chatbot-message__hover-meta"
18454
- }, LT = ["datetime", "title"], RT = { class: "truncate" }, zT = {
18480
+ }, RT = ["datetime", "title"], zT = { class: "truncate" }, BT = {
18455
18481
  key: 0,
18456
18482
  class: "flex items-center gap-4 min-w-0"
18457
- }, BT = { class: "truncate" }, VT = {
18483
+ }, VT = { class: "truncate" }, HT = {
18458
18484
  key: 1,
18459
18485
  class: "flex items-center gap-4 text-12 text-word-3"
18460
- }, HT = { class: "truncate" }, UT = ["datetime"], WT = { class: "truncate" }, GT = {
18486
+ }, UT = { class: "truncate" }, WT = ["datetime"], GT = { class: "truncate" }, KT = {
18461
18487
  key: 3,
18462
18488
  class: "flex items-center gap-4 text-12 text-word-3"
18463
- }, KT = ["title", "aria-label"], qT = /*#__PURE__*/ jt(/* @__PURE__ */ b({
18489
+ }, qT = ["title", "aria-label"], JT = /*#__PURE__*/ jt(/* @__PURE__ */ b({
18464
18490
  __name: "PkChatbotMessages",
18465
18491
  props: {
18466
18492
  status: { type: String },
@@ -18499,7 +18525,7 @@ var wT = ["aria-busy"], TT = {
18499
18525
  "reset-chat"
18500
18526
  ],
18501
18527
  setup(e, { emit: t }) {
18502
- let n = e, i = t, { t: a, d: l, n: u } = Oe({ useScope: "global" }), d = ae(), f = ie("scrollEl"), p = ie("wrapperEl"), m = O(() => DC(n.textColor, n.mainColor)), h = ie("messagesEl"), { handleScroll: v, scrollToBottom: b, userScrolledUp: x, isAtBottom: ee } = CT({
18528
+ let n = e, i = t, { t: a, d: l, n: u } = Oe({ useScope: "global" }), d = ae(), f = ie("scrollEl"), p = ie("wrapperEl"), m = O(() => OC(n.textColor, n.mainColor)), h = ie("messagesEl"), { handleScroll: v, scrollToBottom: b, userScrolledUp: x, isAtBottom: ee } = wT({
18503
18529
  scrollEl: f,
18504
18530
  status: () => n.status,
18505
18531
  messagesLength: () => n.messages?.length,
@@ -18561,14 +18587,14 @@ var wT = ["aria-busy"], TT = {
18561
18587
  return e ? e.parts[e.parts.length - 1] : null;
18562
18588
  }), Ce = O(() => {
18563
18589
  let e = /* @__PURE__ */ new Map();
18564
- for (let t of n.messages ?? []) t.role === "assistant" && e.set(t.id, CC(t.parts));
18590
+ for (let t of n.messages ?? []) t.role === "assistant" && e.set(t.id, wC(t.parts));
18565
18591
  return e;
18566
18592
  }), we = (e) => Ce.value.get(e.id) ?? e.parts, F = O(() => n.status === "submitted" || n.status === "streaming"), Te = O(() => n.status === "error"), Ee = O(() => {
18567
18593
  let e = Se.value;
18568
- return LC(a, e);
18594
+ return RC(a, e);
18569
18595
  }), De = O(() => {
18570
18596
  let e = Se.value;
18571
- return IC(e);
18597
+ return LC(e);
18572
18598
  }), ke = (e) => n.messages?.findIndex((t) => t.id === e), Ae = (e) => e === void 0 || !n.messages ? !1 : e === n.messages.length - 1, je = (e) => Ae(e) && n.status === "ready" && !!n.actions?.includes("regenerate"), Me = (e, t) => (!Ae(t) || n.status === "ready") && !!n.actions?.includes(e), Ne = (e) => {
18573
18599
  let t = e.parts[e.parts.length - 1];
18574
18600
  return $l(t);
@@ -18582,7 +18608,7 @@ var wT = ["aria-busy"], TT = {
18582
18608
  return l(t, n ? "time" : "date-time");
18583
18609
  }, Ue = (e) => {
18584
18610
  let { createdAt: t, completedAt: n } = e.metadata ?? {};
18585
- if (!(!t || !n)) return OC(u, n - t);
18611
+ if (!(!t || !n)) return kC(u, n - t);
18586
18612
  }, We = ie("feedbackMessageEl");
18587
18613
  return _(() => n.feedbackMessageId, async () => {
18588
18614
  if (await o(), !n.feedbackMessageId) return;
@@ -18613,7 +18639,7 @@ var wT = ["aria-busy"], TT = {
18613
18639
  }),
18614
18640
  onScroll: le
18615
18641
  }, [
18616
- e.showScrollToBottom && C.value.length > 1 ? (R(), w("div", TT, [r(bT, {
18642
+ e.showScrollToBottom && C.value.length > 1 ? (R(), w("div", ET, [r(xT, {
18617
18643
  items: C.value,
18618
18644
  "active-id": T.value,
18619
18645
  onSelect: D
@@ -18623,7 +18649,7 @@ var wT = ["aria-busy"], TT = {
18623
18649
  ref: p,
18624
18650
  class: "pk-chatbot-messages__wrapper"
18625
18651
  }, [
18626
- (R(!0), w(M, null, te(e.messages, (f, p) => (R(), w(M, { key: f.id }, [Le(f) && Be(p) ? (R(), w("div", ET, [S("span", DT, N(I(l)(Be(p), "short")), 1)])) : L("", !0), f.parts.length || Ae(p) && F.value && Ie(f) ? (R(), w("div", {
18652
+ (R(!0), w(M, null, te(e.messages, (f, p) => (R(), w(M, { key: f.id }, [Le(f) && Be(p) ? (R(), w("div", DT, [S("span", OT, N(I(l)(Be(p), "short")), 1)])) : L("", !0), f.parts.length || Ae(p) && F.value && Ie(f) ? (R(), w("div", {
18627
18653
  key: 1,
18628
18654
  ref_for: !0,
18629
18655
  ref: "messagesEl",
@@ -18634,7 +18660,7 @@ var wT = ["aria-busy"], TT = {
18634
18660
  appear: "",
18635
18661
  name: "pk-chatbot-part"
18636
18662
  }, {
18637
- default: E(() => [Fe(f) ? (R(), P(hT, {
18663
+ default: E(() => [Fe(f) ? (R(), P(gT, {
18638
18664
  key: 0,
18639
18665
  message: f,
18640
18666
  "is-streaming": F.value && Ae(p),
@@ -18651,7 +18677,7 @@ var wT = ["aria-busy"], TT = {
18651
18677
  appear: "",
18652
18678
  name: "pk-chatbot-part"
18653
18679
  }, {
18654
- default: E(() => [S("div", OT, [s(t.$slots, "text", g({ ref_for: !0 }, {
18680
+ default: E(() => [S("div", kT, [s(t.$slots, "text", g({ ref_for: !0 }, {
18655
18681
  message: f,
18656
18682
  part: n,
18657
18683
  index: p,
@@ -18670,17 +18696,17 @@ var wT = ["aria-busy"], TT = {
18670
18696
  key: 0,
18671
18697
  class: c(["pk-chatbot-message__reaction", ve(f.id)]),
18672
18698
  title: ye(f.id)
18673
- }, [ge(f.id) ? (R(), w("span", AT, N(ge(f.id)), 1)) : (R(), P(i, {
18699
+ }, [ge(f.id) ? (R(), w("span", jT, N(ge(f.id)), 1)) : (R(), P(i, {
18674
18700
  key: 1,
18675
18701
  name: k(f.id) === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-up-fill"
18676
- }, null, 8, ["name"]))], 10, kT)) : L("", !0)])]),
18702
+ }, null, 8, ["name"]))], 10, AT)) : L("", !0)])]),
18677
18703
  _: 2
18678
18704
  }, 1024)) : I(nu)(n) ? (R(), P(j, {
18679
18705
  key: 1,
18680
18706
  appear: "",
18681
18707
  name: "pk-chatbot-part"
18682
18708
  }, {
18683
- default: E(() => [r(Tw, {
18709
+ default: E(() => [r(Ew, {
18684
18710
  "media-type": n.mediaType,
18685
18711
  url: n.url,
18686
18712
  filename: n.filename,
@@ -18692,27 +18718,27 @@ var wT = ["aria-busy"], TT = {
18692
18718
  "size"
18693
18719
  ])]),
18694
18720
  _: 2
18695
- }, 1024)) : I(eu)(n) && !I(wC)(n) && (I(kw)[I(tu)(n)] || I(d)[n.type] || e.showAllMessageParts) ? (R(), P(j, {
18721
+ }, 1024)) : I(eu)(n) && !I(TC)(n) && (I(Aw)[I(tu)(n)] || I(d)[n.type] || e.showAllMessageParts) ? (R(), P(j, {
18696
18722
  key: 2,
18697
18723
  appear: "",
18698
18724
  name: "pk-chatbot-part"
18699
18725
  }, {
18700
- default: E(() => [!I(d)[n.type] && I(kw)[I(tu)(n)] ? (R(), P(ne(I(kw)[I(tu)(n)]), {
18701
- key: `component-${a}-${I(TC)(n)}`,
18726
+ default: E(() => [!I(d)[n.type] && I(Aw)[I(tu)(n)] ? (R(), P(ne(I(Aw)[I(tu)(n)]), {
18727
+ key: `component-${a}-${I(EC)(n)}`,
18702
18728
  part: n
18703
18729
  }, null, 8, ["part"])) : s(t.$slots, n.type, g({ ref_for: !0 }, {
18704
18730
  message: f,
18705
18731
  part: n,
18706
18732
  index: p,
18707
18733
  isLoading: F.value
18708
- }), () => [e.showAllMessageParts ? (R(), w("div", jT, [S("div", MT, [I(IC)(n) ? (R(), P(i, {
18734
+ }), () => [e.showAllMessageParts ? (R(), w("div", MT, [S("div", NT, [I(LC)(n) ? (R(), P(i, {
18709
18735
  key: 0,
18710
- name: I(IC)(n),
18736
+ name: I(LC)(n),
18711
18737
  class: "shrink-0"
18712
- }, null, 8, ["name"])) : L("", !0), S("code", NT, N(I(qe)(n.type)), 1)])])) : L("", !0)], void 0, 1)]),
18738
+ }, null, 8, ["name"])) : L("", !0), S("code", PT, N(I(qe)(n.type)), 1)])])) : L("", !0)], void 0, 1)]),
18713
18739
  _: 2
18714
18740
  }, 1024)) : L("", !0), r(j, { mode: "out-in" }, {
18715
- default: E(() => [a === be(f) && e.readonlyFeedback && pe(f.id)?.comment ? (R(), P(cw, {
18741
+ default: E(() => [a === be(f) && e.readonlyFeedback && pe(f.id)?.comment ? (R(), P(lw, {
18716
18742
  key: 0,
18717
18743
  feedback: pe(f.id)
18718
18744
  }, null, 8, ["feedback"])) : L("", !0)]),
@@ -18725,7 +18751,7 @@ var wT = ["aria-busy"], TT = {
18725
18751
  default: E(() => [F.value && Ae(p) && !Ne(f) && Ie(f) && !Fe(f) ? (R(), w("div", {
18726
18752
  key: `loading-info-${f.id}`,
18727
18753
  class: "pk-chatbot-message__loading-info"
18728
- }, [S("div", PT, [
18754
+ }, [S("div", FT, [
18729
18755
  r(i, {
18730
18756
  name: "line-md:loading-loop",
18731
18757
  class: "shrink-0"
@@ -18749,7 +18775,7 @@ var wT = ["aria-busy"], TT = {
18749
18775
  name: "fade-in",
18750
18776
  mode: "out-in"
18751
18777
  }, {
18752
- default: E(() => [Se.value && "text" in Se.value && Se.value.text.trim() ? (R(), P(Aw, {
18778
+ default: E(() => [Se.value && "text" in Se.value && Se.value.text.trim() ? (R(), P(jw, {
18753
18779
  key: 0,
18754
18780
  markdown: Se.value.text,
18755
18781
  "is-dark": e.isDark,
@@ -18761,7 +18787,7 @@ var wT = ["aria-busy"], TT = {
18761
18787
  _: 2
18762
18788
  }, 1024),
18763
18789
  r(j, { mode: "out-in" }, {
18764
- default: E(() => [Ve(f, p) ? (R(), w("div", FT, [
18790
+ default: E(() => [Ve(f, p) ? (R(), w("div", IT, [
18765
18791
  r(h, {
18766
18792
  modifiers: "compact",
18767
18793
  class: "mr-auto shrink-0"
@@ -18862,21 +18888,21 @@ var wT = ["aria-busy"], TT = {
18862
18888
  ]),
18863
18889
  _: 2
18864
18890
  }, 1024),
18865
- !e.showMessageDateTime && f.metadata?.createdAt && f.metadata?.completedAt ? (R(), w("div", IT, [S("time", {
18891
+ !e.showMessageDateTime && f.metadata?.createdAt && f.metadata?.completedAt ? (R(), w("div", LT, [S("time", {
18866
18892
  datetime: new Date(f.metadata.createdAt).toISOString(),
18867
18893
  title: I(l)(new Date(f.metadata.createdAt), "date-time"),
18868
18894
  class: "flex items-center gap-4 min-w-0"
18869
18895
  }, [r(i, {
18870
18896
  name: "ri:time-line",
18871
18897
  class: "shrink-0"
18872
- }), S("span", RT, N(He(f.metadata.createdAt)), 1)], 8, LT), Ue(f) ? (R(), w("span", zT, [r(i, {
18898
+ }), S("span", zT, N(He(f.metadata.createdAt)), 1)], 8, RT), Ue(f) ? (R(), w("span", BT, [r(i, {
18873
18899
  name: "ri:hourglass-line",
18874
18900
  class: "shrink-0"
18875
- }), S("span", BT, N(Ue(f)), 1)])) : L("", !0)])) : L("", !0),
18876
- e.showMessageTokensCount && f.metadata?.totalTokens ? (R(), w("span", VT, [r(i, {
18901
+ }), S("span", VT, N(Ue(f)), 1)])) : L("", !0)])) : L("", !0),
18902
+ e.showMessageTokensCount && f.metadata?.totalTokens ? (R(), w("span", HT, [r(i, {
18877
18903
  name: "ri:ai-generate-2-line",
18878
18904
  class: "shrink-0"
18879
- }), S("span", HT, N(I(u)(f.metadata.totalTokens, "integer")) + " " + N(I(a)("label.tokens")), 1)])) : L("", !0),
18905
+ }), S("span", UT, N(I(u)(f.metadata.totalTokens, "integer")) + " " + N(I(a)("label.tokens")), 1)])) : L("", !0),
18880
18906
  e.showMessageDateTime && f.metadata?.createdAt ? (R(), w("time", {
18881
18907
  key: 2,
18882
18908
  datetime: new Date(f.metadata?.createdAt).toISOString(),
@@ -18884,11 +18910,11 @@ var wT = ["aria-busy"], TT = {
18884
18910
  }, [r(i, {
18885
18911
  name: "ri:time-line",
18886
18912
  class: "shrink-0"
18887
- }), S("span", WT, N(I(l)(new Date(f.metadata?.createdAt), "date-time")), 1)], 8, UT)) : L("", !0),
18888
- e.showMessageDateTime && f?.metadata?.completedAt && f?.metadata?.createdAt ? (R(), w("div", GT, [r(i, {
18913
+ }), S("span", GT, N(I(l)(new Date(f.metadata?.createdAt), "date-time")), 1)], 8, WT)) : L("", !0),
18914
+ e.showMessageDateTime && f?.metadata?.completedAt && f?.metadata?.createdAt ? (R(), w("div", KT, [r(i, {
18889
18915
  name: "ri:hourglass-line",
18890
18916
  class: "shrink-0"
18891
- }), r(Ow, {
18917
+ }), r(kw, {
18892
18918
  class: "truncate",
18893
18919
  date: f.metadata?.createdAt,
18894
18920
  "end-date": f.metadata?.completedAt
@@ -18897,7 +18923,7 @@ var wT = ["aria-busy"], TT = {
18897
18923
  _: 2
18898
18924
  }, 1024),
18899
18925
  r(j, { mode: "out-in" }, {
18900
- default: E(() => [f.id === e.feedbackMessageId ? (R(), P(iw, {
18926
+ default: E(() => [f.id === e.feedbackMessageId ? (R(), P(aw, {
18901
18927
  key: 0,
18902
18928
  ref_for: !0,
18903
18929
  ref_key: "feedbackMessageEl",
@@ -18919,7 +18945,7 @@ var wT = ["aria-busy"], TT = {
18919
18945
  appear: "",
18920
18946
  name: "pk-chatbot-part"
18921
18947
  }, {
18922
- default: E(() => [Te.value ? (R(), P(qC, {
18948
+ default: E(() => [Te.value ? (R(), P(JC, {
18923
18949
  key: 0,
18924
18950
  error: e.error,
18925
18951
  onRetry: n[3] ||= (e) => t.$emit("auto-retry"),
@@ -18941,32 +18967,32 @@ var wT = ["aria-busy"], TT = {
18941
18967
  title: I(a)("action.scrollToBottom"),
18942
18968
  "aria-label": I(a)("action.scrollToBottom"),
18943
18969
  onClick: oe
18944
- }, [r(i, { name: "ri:arrow-down-line" })], 8, KT)) : L("", !0)]),
18970
+ }, [r(i, { name: "ri:arrow-down-line" })], 8, qT)) : L("", !0)]),
18945
18971
  _: 1
18946
18972
  })
18947
- ], 44, wT);
18973
+ ], 44, TT);
18948
18974
  };
18949
18975
  }
18950
- }), [["styles", [".pk-chatbot-messages{min-width:0;font-size:var(--text-14);scrollbar-width:thin;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__outline{z-index:2;flex:none;align-self:flex-end;height:0;display:none;position:sticky;top:50%}@media (width>=992px){.pk-chatbot-messages__outline{display:block}}.pk-chatbot-messages__outline .pk-chatbot-outline{position:absolute;top:0;right:0;transform:translateY(-50%)}.pk-chatbot-messages__spacer{transition:min-height .3s var(--ease-out)}@media (prefers-reduced-motion:reduce){.pk-chatbot-messages__spacer{transition:none}}.pk-chatbot-messages__scroll-to-bottom{bottom:var(--spacing-8);z-index:2;width:var(--spacing-36);height:var(--spacing-36);border:1px solid var(--color-surface-3);border-radius:var(--rounded-full);background-color:var(--color-surface-1);box-shadow:var(--shadow-md);color:var(--color-word-1);cursor:pointer;transition:var(--transition-colors);flex:none;justify-content:center;align-items:center;margin-block-start:calc(-1 * var(--spacing-36));margin-inline:auto;display:flex;position:sticky}.pk-chatbot-messages__scroll-to-bottom:hover{background-color:var(--color-surface-2)}.pk-chatbot-messages-fab-enter-active,.pk-chatbot-messages-fab-leave-active{transition:opacity .15s var(--ease-out)}.pk-chatbot-messages-fab-enter-from,.pk-chatbot-messages-fab-leave-to{opacity:0}@media (prefers-reduced-motion:reduce){.pk-chatbot-messages-fab-enter-active,.pk-chatbot-messages-fab-leave-active{transition:none}}.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);min-width:0;max-width:100%;transition:min-height .3s var(--ease-out);flex-direction:column;align-items:flex-start;display:flex;overflow:hidden}@media (prefers-reduced-motion:reduce){.pk-chatbot-message{transition:none}}.pk-chatbot-message__text{color:var(--color-word-2);background-color:var(--color-surface);line-height:var(--leading-normal);border-width:var(--spacing-px);border-style:solid;border-color:var(--color-surface-3);padding:var(--spacing-sm);border-radius:var(--rounded-xl) var(--rounded-xl) var(--rounded-xl) 0;text-overflow:ellipsis;max-width:100%;position:relative;overflow:hidden}.pk-chatbot-message__reaction{right:var(--spacing-8);width:var(--spacing-24);height:var(--spacing-24);border-radius:var(--rounded-full,9999px);color:var(--color-white,#fff);font-size:var(--text-12);box-shadow:var(--shadow-md);justify-content:center;align-items:center;display:inline-flex;position:absolute;bottom:0;transform:translateY(50%)}.pk-chatbot-message__reaction--positive{background-color:var(--color-success)}.pk-chatbot-message__reaction--negative{background-color:var(--color-danger)}.pk-chatbot-message__reaction--neutral{background-color:var(--color-surface-1)}.pk-chatbot-message__reaction-emoji{font-size:var(--text-12);line-height:1}.pk-chatbot-message__loading-info{line-height:var(--leading-normal);border-width:var(--spacing-px);border-style:solid;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__hover-meta{align-items:center;gap:var(--spacing-8);min-width:0;font-size:var(--text-12);color:var(--color-word-3);white-space:nowrap;font-variant-numeric:tabular-nums;opacity:0;transition:opacity .2s;display:flex}.pk-chatbot-message:hover .pk-chatbot-message__hover-meta,.pk-chatbot-message:focus-within .pk-chatbot-message__hover-meta{opacity:1}@media (hover:none){.pk-chatbot-message__hover-meta{opacity:1}}.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-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);width:100%}.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-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}.pk-chatbot-part-enter-active{transition:opacity .25s,transform .25s}.pk-chatbot-part-enter-from{opacity:0;transform:translateY(8px)}@media (prefers-reduced-motion:reduce){.pk-chatbot-part-enter-active{transition:none}.pk-chatbot-part-enter-from{transform:none}}"]]]), JT = /* @__PURE__ */ new Map();
18951
- function YT(e) {
18952
- var t = JT.get(e);
18976
+ }), [["styles", [".pk-chatbot-messages{min-width:0;font-size:var(--text-14);scrollbar-width:thin;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__outline{z-index:2;flex:none;align-self:flex-end;height:0;display:none;position:sticky;top:50%}@media (width>=992px){.pk-chatbot-messages__outline{display:block}}.pk-chatbot-messages__outline .pk-chatbot-outline{position:absolute;top:0;right:0;transform:translateY(-50%)}.pk-chatbot-messages__spacer{transition:min-height .3s var(--ease-out)}@media (prefers-reduced-motion:reduce){.pk-chatbot-messages__spacer{transition:none}}.pk-chatbot-messages__scroll-to-bottom{bottom:var(--spacing-8);z-index:2;width:var(--spacing-36);height:var(--spacing-36);border:1px solid var(--color-surface-3);border-radius:var(--rounded-full);background-color:var(--color-surface-1);box-shadow:var(--shadow-md);color:var(--color-word-1);cursor:pointer;transition:var(--transition-colors);flex:none;justify-content:center;align-items:center;margin-block-start:calc(-1 * var(--spacing-36));margin-inline:auto;display:flex;position:sticky}.pk-chatbot-messages__scroll-to-bottom:hover{background-color:var(--color-surface-2)}.pk-chatbot-messages-fab-enter-active,.pk-chatbot-messages-fab-leave-active{transition:opacity .15s var(--ease-out)}.pk-chatbot-messages-fab-enter-from,.pk-chatbot-messages-fab-leave-to{opacity:0}@media (prefers-reduced-motion:reduce){.pk-chatbot-messages-fab-enter-active,.pk-chatbot-messages-fab-leave-active{transition:none}}.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);min-width:0;max-width:100%;transition:min-height .3s var(--ease-out);flex-direction:column;align-items:flex-start;display:flex;overflow:hidden}@media (prefers-reduced-motion:reduce){.pk-chatbot-message{transition:none}}.pk-chatbot-message__text{color:var(--color-word-2);background-color:var(--color-surface);line-height:var(--leading-normal);border-width:var(--spacing-px);border-style:solid;border-color:var(--color-surface-3);padding:var(--spacing-sm);border-radius:var(--rounded-xl) var(--rounded-xl) var(--rounded-xl) 0;text-overflow:ellipsis;max-width:100%;position:relative;overflow:hidden}.pk-chatbot-message__reaction{right:var(--spacing-8);width:var(--spacing-24);height:var(--spacing-24);border-radius:var(--rounded-full,9999px);color:var(--color-white,#fff);font-size:var(--text-12);box-shadow:var(--shadow-md);justify-content:center;align-items:center;display:inline-flex;position:absolute;bottom:0;transform:translateY(50%)}.pk-chatbot-message__reaction--positive{background-color:var(--color-success)}.pk-chatbot-message__reaction--negative{background-color:var(--color-danger)}.pk-chatbot-message__reaction--neutral{background-color:var(--color-surface-1)}.pk-chatbot-message__reaction-emoji{font-size:var(--text-12);line-height:1}.pk-chatbot-message__loading-info{line-height:var(--leading-normal);border-width:var(--spacing-px);border-style:solid;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__hover-meta{align-items:center;gap:var(--spacing-8);min-width:0;font-size:var(--text-12);color:var(--color-word-3);white-space:nowrap;font-variant-numeric:tabular-nums;opacity:0;transition:opacity .2s;display:flex}.pk-chatbot-message:hover .pk-chatbot-message__hover-meta,.pk-chatbot-message:focus-within .pk-chatbot-message__hover-meta{opacity:1}@media (hover:none){.pk-chatbot-message__hover-meta{opacity:1}}.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-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);width:100%}.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-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}.pk-chatbot-part-enter-active{transition:opacity .25s,transform .25s}.pk-chatbot-part-enter-from{opacity:0;transform:translateY(8px)}@media (prefers-reduced-motion:reduce){.pk-chatbot-part-enter-active{transition:none}.pk-chatbot-part-enter-from{transform:none}}"]]]), YT = /* @__PURE__ */ new Map();
18977
+ function XT(e) {
18978
+ var t = YT.get(e);
18953
18979
  t && t.destroy();
18954
18980
  }
18955
- function XT(e) {
18956
- var t = JT.get(e);
18981
+ function ZT(e) {
18982
+ var t = YT.get(e);
18957
18983
  t && t.update();
18958
18984
  }
18959
- var ZT = null;
18960
- typeof window > "u" ? ((ZT = function(e) {
18985
+ var QT = null;
18986
+ typeof window > "u" ? ((QT = function(e) {
18961
18987
  return e;
18962
18988
  }).destroy = function(e) {
18963
18989
  return e;
18964
- }, ZT.update = function(e) {
18990
+ }, QT.update = function(e) {
18965
18991
  return e;
18966
- }) : ((ZT = function(e, t) {
18992
+ }) : ((QT = function(e, t) {
18967
18993
  return e && Array.prototype.forEach.call(e.length ? e : [e], function(e) {
18968
18994
  return function(e) {
18969
- if (e && e.nodeName && e.nodeName === "TEXTAREA" && !JT.has(e)) {
18995
+ if (e && e.nodeName && e.nodeName === "TEXTAREA" && !YT.has(e)) {
18970
18996
  var t, n = null, r = window.getComputedStyle(e), i = (t = e.value, function() {
18971
18997
  o({
18972
18998
  testForHeightReduction: t === "" || !e.value.startsWith(t),
@@ -18975,7 +19001,7 @@ typeof window > "u" ? ((ZT = function(e) {
18975
19001
  }), a = function(t) {
18976
19002
  e.removeEventListener("autosize:destroy", a), e.removeEventListener("autosize:update", s), e.removeEventListener("input", i), window.removeEventListener("resize", s), Object.keys(t).forEach(function(n) {
18977
19003
  return e.style[n] = t[n];
18978
- }), JT.delete(e);
19004
+ }), YT.delete(e);
18979
19005
  }.bind(e, {
18980
19006
  height: e.style.height,
18981
19007
  resize: e.style.resize,
@@ -18984,7 +19010,7 @@ typeof window > "u" ? ((ZT = function(e) {
18984
19010
  overflowX: e.style.overflowX,
18985
19011
  wordWrap: e.style.wordWrap
18986
19012
  });
18987
- 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", JT.set(e, {
19013
+ 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", YT.set(e, {
18988
19014
  destroy: a,
18989
19015
  update: s
18990
19016
  }), s();
@@ -19016,30 +19042,30 @@ typeof window > "u" ? ((ZT = function(e) {
19016
19042
  }(e);
19017
19043
  }), e;
19018
19044
  }).destroy = function(e) {
19019
- return e && Array.prototype.forEach.call(e.length ? e : [e], YT), e;
19020
- }, ZT.update = function(e) {
19021
19045
  return e && Array.prototype.forEach.call(e.length ? e : [e], XT), e;
19046
+ }, QT.update = function(e) {
19047
+ return e && Array.prototype.forEach.call(e.length ? e : [e], ZT), e;
19022
19048
  });
19023
- var QT = ZT;
19049
+ var $T = QT;
19024
19050
  t(), k(), C(), fe();
19025
- var $T = { class: "pk-chatbot-input" }, eE = {
19051
+ var eE = { class: "pk-chatbot-input" }, tE = {
19026
19052
  key: 2,
19027
19053
  class: "pk-chatbot-input__notice-text"
19028
- }, tE = {
19054
+ }, nE = {
19029
19055
  key: 0,
19030
19056
  class: "pk-chatbot-input__drop-overlay"
19031
- }, nE = {
19057
+ }, rE = {
19032
19058
  key: 1,
19033
19059
  class: "pk-chatbot-input__attachments"
19034
- }, rE = { class: "pk-chatbot-input__fieldset" }, iE = [
19060
+ }, iE = { class: "pk-chatbot-input__fieldset" }, aE = [
19035
19061
  "title",
19036
19062
  "disabled",
19037
19063
  "onClick"
19038
- ], aE = ["title", "disabled"], oE = ["accept"], sE = ["accept"], cE = { class: "pk-chatbot-input__content" }, lE = [
19064
+ ], oE = ["title", "disabled"], sE = ["accept"], cE = ["accept"], lE = { class: "pk-chatbot-input__content" }, uE = [
19039
19065
  "value",
19040
19066
  "placeholder",
19041
19067
  "onKeydown"
19042
- ], uE = { class: "opacity-60" }, dE = ["title"], fE = ["title", "disabled"], pE = /*#__PURE__*/ jt(/* @__PURE__ */ b({
19068
+ ], dE = { class: "opacity-60" }, fE = ["title"], pE = ["title", "disabled"], mE = /*#__PURE__*/ jt(/* @__PURE__ */ b({
19043
19069
  __name: "PkChatbotInput",
19044
19070
  props: /*@__PURE__*/ m({
19045
19071
  placeholder: { type: String },
@@ -19076,7 +19102,7 @@ var $T = { class: "pk-chatbot-input" }, eE = {
19076
19102
  };
19077
19103
  _(n, (e) => {
19078
19104
  e !== b.value && (b.value = e ?? "", o(() => {
19079
- p.value && QT.update(p.value);
19105
+ p.value && $T.update(p.value);
19080
19106
  }));
19081
19107
  });
19082
19108
  let C = O(() => d.status === "streaming"), T = O(() => d.status === "submitted"), se = O(() => C.value || T.value), le = O(() => b.value.length), D = O(() => d.maxMessageLength !== void 0 && le.value > d.maxMessageLength), de = O(() => i.value.some((e) => e.state === "uploading")), fe = O(() => se.value || de.value || D.value ? !1 : b.value.trim().length > 0), pe = "capture" in document.createElement("input"), me = O(() => d.fileUpload?.allowedMimeTypes?.join(",") ?? ""), he = O(() => (d.fileUpload?.allowedMimeTypes ?? []).filter((e) => e.startsWith("image/")).join(",")), k = O(() => pe && he.value.length > 0), ge = () => {
@@ -19109,17 +19135,17 @@ var $T = { class: "pk-chatbot-input" }, eE = {
19109
19135
  dismiss: Ce
19110
19136
  } : null), F = () => {
19111
19137
  fe.value && (re(), a("submit"), b.value = "", n.value = "", o(() => {
19112
- p.value && (p.value.value = "", QT.update(p.value));
19138
+ p.value && (p.value.value = "", $T.update(p.value));
19113
19139
  }));
19114
19140
  };
19115
19141
  return f(() => {
19116
- p.value && QT(p.value);
19142
+ p.value && $T(p.value);
19117
19143
  }), l(() => {
19118
- ne(), p.value && QT.destroy(p.value);
19144
+ ne(), p.value && $T.destroy(p.value);
19119
19145
  for (let e of i.value) URL.revokeObjectURL(e.localUrl);
19120
19146
  }), (t, n) => {
19121
19147
  let o = nt, l = at, u = st, d = $e;
19122
- return R(), w("div", $T, [we.value ? (R(), w("div", {
19148
+ return R(), w("div", eE, [we.value ? (R(), w("div", {
19123
19149
  key: we.value.id,
19124
19150
  class: "pk-chatbot-input__notice",
19125
19151
  role: "status"
@@ -19133,7 +19159,7 @@ var $T = { class: "pk-chatbot-input" }, eE = {
19133
19159
  key: 1,
19134
19160
  markdown: we.value.markdown,
19135
19161
  class: "wysiwyg pk-chatbot-input__notice-text"
19136
- }, null, 8, ["markdown"])) : (R(), w("span", eE, N(we.value.text), 1)),
19162
+ }, null, 8, ["markdown"])) : (R(), w("span", tE, N(we.value.text), 1)),
19137
19163
  we.value.dismiss ? (R(), P(l, {
19138
19164
  key: 3,
19139
19165
  title: t.$t("action.close"),
@@ -19148,11 +19174,11 @@ var $T = { class: "pk-chatbot-input" }, eE = {
19148
19174
  class: "pk-chatbot-input__form",
19149
19175
  onSubmit: ue(F, ["prevent"])
19150
19176
  }, [
19151
- I(xe) && be.value ? (R(), w("div", tE, [r(o, {
19177
+ I(xe) && be.value ? (R(), w("div", nE, [r(o, {
19152
19178
  name: "ri:upload-cloud-2-line",
19153
19179
  class: "pk-chatbot-input__drop-overlay-icon"
19154
19180
  }), S("span", null, N(t.$t("action.dropFile")), 1)])) : L("", !0),
19155
- i.value.length ? (R(), w("div", nE, [(R(!0), w(M, null, te(i.value, (e) => (R(), P(Tw, {
19181
+ i.value.length ? (R(), w("div", rE, [(R(!0), w(M, null, te(i.value, (e) => (R(), P(Ew, {
19156
19182
  key: e.id,
19157
19183
  "media-type": e.file.type,
19158
19184
  url: e.localUrl,
@@ -19173,7 +19199,7 @@ var $T = { class: "pk-chatbot-input" }, eE = {
19173
19199
  "removable",
19174
19200
  "onRemove"
19175
19201
  ]))), 128))])) : L("", !0),
19176
- S("div", rE, [
19202
+ S("div", iE, [
19177
19203
  s(t.$slots, "prepend"),
19178
19204
  e.fileUpload && e.fileUpload.enabled && (k.value || t.$slots["additional-actions"]) ? (R(), P(d, ee(g({ key: 0 }, {
19179
19205
  placement: "top-start",
@@ -19190,7 +19216,7 @@ var $T = { class: "pk-chatbot-input" }, eE = {
19190
19216
  }), [r(o, {
19191
19217
  name: "ri:add-line",
19192
19218
  class: "pk-chatbot-input__button-icon"
19193
- })], 16, iE)]),
19219
+ })], 16, aE)]),
19194
19220
  items: E(() => [
19195
19221
  k.value ? (R(), P(u, {
19196
19222
  key: 0,
@@ -19226,7 +19252,7 @@ var $T = { class: "pk-chatbot-input" }, eE = {
19226
19252
  }, [r(o, {
19227
19253
  name: "ri:add-line",
19228
19254
  class: "pk-chatbot-input__button-icon"
19229
- })], 8, aE)) : L("", !0),
19255
+ })], 8, oE)) : L("", !0),
19230
19256
  e.fileUpload && e.fileUpload.enabled ? (R(), w("input", {
19231
19257
  key: 2,
19232
19258
  ref_key: "fileInputEl",
@@ -19236,7 +19262,7 @@ var $T = { class: "pk-chatbot-input" }, eE = {
19236
19262
  multiple: "",
19237
19263
  accept: me.value,
19238
19264
  onChange: ve
19239
- }, null, 40, oE)) : L("", !0),
19265
+ }, null, 40, sE)) : L("", !0),
19240
19266
  e.fileUpload && e.fileUpload.enabled && k.value ? (R(), w("input", {
19241
19267
  key: 3,
19242
19268
  ref_key: "cameraInputEl",
@@ -19246,8 +19272,8 @@ var $T = { class: "pk-chatbot-input" }, eE = {
19246
19272
  hidden: "",
19247
19273
  accept: he.value,
19248
19274
  onChange: ve
19249
- }, null, 40, sE)) : L("", !0),
19250
- S("div", cE, [S("textarea", {
19275
+ }, null, 40, cE)) : L("", !0),
19276
+ S("div", lE, [S("textarea", {
19251
19277
  ref_key: "textareaEl",
19252
19278
  ref: p,
19253
19279
  value: b.value,
@@ -19257,11 +19283,11 @@ var $T = { class: "pk-chatbot-input" }, eE = {
19257
19283
  placeholder: e.placeholder,
19258
19284
  onInput: oe,
19259
19285
  onKeydown: ce(ue(F, ["prevent"]), ["enter"])
19260
- }, null, 40, lE)]),
19286
+ }, null, 40, uE)]),
19261
19287
  e.maxMessageLength ? (R(), w("div", {
19262
19288
  key: 4,
19263
19289
  class: c(["pk-chatbot-input__counter", { "pk-chatbot-input__counter--over": D.value }])
19264
- }, [y(N(t.$n(le.value, "integer")) + "/", 1), S("span", uE, N(t.$n(e.maxMessageLength, "integer")), 1)], 2)) : L("", !0),
19290
+ }, [y(N(t.$n(le.value, "integer")) + "/", 1), S("span", dE, N(t.$n(e.maxMessageLength, "integer")), 1)], 2)) : L("", !0),
19265
19291
  C.value ? (R(), w("button", {
19266
19292
  key: 5,
19267
19293
  class: "pk-chatbot-input__button",
@@ -19271,7 +19297,7 @@ var $T = { class: "pk-chatbot-input" }, eE = {
19271
19297
  }, [r(o, {
19272
19298
  name: "ri:stop-circle-line",
19273
19299
  class: "pk-chatbot-input__button-icon"
19274
- })], 8, dE)) : (R(), w("button", {
19300
+ })], 8, fE)) : (R(), w("button", {
19275
19301
  key: 6,
19276
19302
  class: "pk-chatbot-input__button",
19277
19303
  type: "submit",
@@ -19280,7 +19306,7 @@ var $T = { class: "pk-chatbot-input" }, eE = {
19280
19306
  }, [r(o, {
19281
19307
  name: T.value ? "line-md:loading-loop" : fe.value ? "ri:send-ins-fill" : "ri:send-ins-line",
19282
19308
  class: "pk-chatbot-input__button-icon"
19283
- }, null, 8, ["name"])], 8, fE))
19309
+ }, null, 8, ["name"])], 8, pE))
19284
19310
  ])
19285
19311
  ], 544)]);
19286
19312
  };
@@ -19289,7 +19315,7 @@ var $T = { class: "pk-chatbot-input" }, eE = {
19289
19315
  //#endregion
19290
19316
  //#region ../../packages/components/src/chat/PkChatbotEmptyState.vue?vue&type=script&setup=true&lang.ts
19291
19317
  t();
19292
- var mE = { class: "pk-chatbot-empty-state" }, hE = /*#__PURE__*/ jt(/* @__PURE__ */ b({
19318
+ var hE = { class: "pk-chatbot-empty-state" }, gE = /*#__PURE__*/ jt(/* @__PURE__ */ b({
19293
19319
  __name: "PkChatbotEmptyState",
19294
19320
  props: {
19295
19321
  greeting: { type: String },
@@ -19297,7 +19323,7 @@ var mE = { class: "pk-chatbot-empty-state" }, hE = /*#__PURE__*/ jt(/* @__PURE__
19297
19323
  name: { type: String }
19298
19324
  },
19299
19325
  setup(e) {
19300
- return (t, n) => (R(), w("div", mE, [e.logo || e.name ? (R(), P(VC, {
19326
+ return (t, n) => (R(), w("div", hE, [e.logo || e.name ? (R(), P(HC, {
19301
19327
  key: 0,
19302
19328
  class: "pk-chatbot-empty-state__avatar",
19303
19329
  modifiers: "surface",
@@ -19312,16 +19338,16 @@ var mE = { class: "pk-chatbot-empty-state" }, hE = /*#__PURE__*/ jt(/* @__PURE__
19312
19338
  }
19313
19339
  }), [["styles", [".pk-chatbot-empty-state{align-items:center;gap:var(--spacing-sm);padding:var(--spacing-md);text-align:center;flex-direction:column;display:flex;position:relative}@media (width<=575.98px){.pk-chatbot-empty-state{padding-inline:var(--spacing-56)}}.pk-chatbot-empty-state__avatar{width:var(--spacing-64);height:var(--spacing-64);font-size:var(--text-20);border-radius:var(--rounded-full)}@media (width>=992px){.pk-chatbot-empty-state__avatar{display:none}}.pk-chatbot-empty-state__greeting{font-size:var(--text-28);font-weight:var(--font-light);color:var(--color-word-1);text-wrap:balance}.pk-chatbot-empty-state__greeting :first-child{margin-top:0}.pk-chatbot-empty-state__greeting :last-child{margin-bottom:0}.pk-chatbot-empty-state__avatar,.pk-chatbot-empty-state__greeting{animation:pk-chatbot-greeting-enter .6s var(--ease-out) both}@media (prefers-reduced-motion:reduce){.pk-chatbot-empty-state__avatar,.pk-chatbot-empty-state__greeting{animation:none}}@keyframes pk-chatbot-greeting-enter{0%{opacity:0;transform:translateY(var(--spacing-16))}}"]]]);
19314
19340
  t(), C(), fe(), k();
19315
- var gE = { class: "pk-chatbot-view-chat__input-stage" }, _E = {
19341
+ var _E = { class: "pk-chatbot-view-chat__input-stage" }, vE = {
19316
19342
  key: 0,
19317
19343
  class: "p-md border-t border-surface-3 text-center text-12 text-danger-darken-2 bg-surface-danger"
19318
- }, vE = { class: "pk-chatbot-view-chat__agent-chip" }, yE = {
19344
+ }, yE = { class: "pk-chatbot-view-chat__agent-chip" }, bE = {
19319
19345
  key: 0,
19320
19346
  class: "pk-chatbot-view-chat__agent-chip-name"
19321
- }, bE = {
19347
+ }, xE = {
19322
19348
  key: 0,
19323
19349
  class: "pk-chatbot-view-chat__drop-overlay"
19324
- }, xE = /*#__PURE__*/ jt(/* @__PURE__ */ b({
19350
+ }, SE = /*#__PURE__*/ jt(/* @__PURE__ */ b({
19325
19351
  __name: "PkChatbotViewChat",
19326
19352
  props: {
19327
19353
  agentId: { type: String },
@@ -19356,7 +19382,7 @@ var gE = { class: "pk-chatbot-view-chat__input-stage" }, _E = {
19356
19382
  name: "pk-chatbot-view-chat-fade",
19357
19383
  mode: "out-in"
19358
19384
  }, {
19359
- default: E(() => [je.value ? (R(), P(hE, {
19385
+ default: E(() => [je.value ? (R(), P(gE, {
19360
19386
  key: 0,
19361
19387
  greeting: I(Me),
19362
19388
  logo: I(g)?.logo,
@@ -19365,7 +19391,7 @@ var gE = { class: "pk-chatbot-view-chat__input-stage" }, _E = {
19365
19391
  "greeting",
19366
19392
  "logo",
19367
19393
  "name"
19368
- ])) : (R(), P(qT, {
19394
+ ])) : (R(), P(JT, {
19369
19395
  key: 1,
19370
19396
  class: "flex flex-col flex-1 min-h-0 p-md overflow-y-auto",
19371
19397
  messages: I(b),
@@ -19523,14 +19549,14 @@ var gE = { class: "pk-chatbot-view-chat__input-stage" }, _E = {
19523
19549
  ]))]),
19524
19550
  _: 1
19525
19551
  }),
19526
- S("div", gE, [r(j, { name: "pk-chatbot-view-chat-fade" }, {
19527
- default: E(() => [je.value ? (R(), P(KC, {
19552
+ S("div", _E, [r(j, { name: "pk-chatbot-view-chat-fade" }, {
19553
+ default: E(() => [je.value ? (R(), P(qC, {
19528
19554
  key: 0,
19529
19555
  class: "pk-chatbot-view-chat__aurora",
19530
19556
  "source-selector": ".pk-chatbot-input__form"
19531
19557
  })) : L("", !0)]),
19532
19558
  _: 1
19533
- }), I(le) ? (R(), w("div", _E, N(I(Ee)("message.chatErrorConversationBlocked")), 1)) : (R(), P(pE, {
19559
+ }), I(le) ? (R(), w("div", vE, N(I(Ee)("message.chatErrorConversationBlocked")), 1)) : (R(), P(mE, {
19534
19560
  key: 1,
19535
19561
  modelValue: I(se),
19536
19562
  "onUpdate:modelValue": ie[5] ||= (e) => ge(se) ? se.value = e : null,
@@ -19549,12 +19575,12 @@ var gE = { class: "pk-chatbot-view-chat__input-stage" }, _E = {
19549
19575
  onDismissAttachmentNotice: I(we)
19550
19576
  }, Te({ _: 2 }, [e.modifier === "fullscreen" ? {
19551
19577
  name: "prepend",
19552
- fn: E(() => [S("span", vE, [r(VC, {
19578
+ fn: E(() => [S("span", yE, [r(HC, {
19553
19579
  modifiers: "surface",
19554
19580
  class: "pk-chatbot-view-chat__agent-chip-avatar",
19555
19581
  "img-src": I(g)?.logo,
19556
19582
  name: I(h).name
19557
- }, null, 8, ["img-src", "name"]), I(h).name ? (R(), w("strong", yE, N(I(h).name), 1)) : L("", !0)])]),
19583
+ }, null, 8, ["img-src", "name"]), I(h).name ? (R(), w("strong", bE, N(I(h).name), 1)) : L("", !0)])]),
19558
19584
  key: "0"
19559
19585
  } : void 0]), 1032, [
19560
19586
  "modelValue",
@@ -19572,7 +19598,7 @@ var gE = { class: "pk-chatbot-view-chat__input-stage" }, _E = {
19572
19598
  "onDismissAttachmentNotice"
19573
19599
  ]))]),
19574
19600
  r(j, null, {
19575
- default: E(() => [I(Ie) && I(_)?.enabled ? (R(), w("div", bE, [r(O, {
19601
+ default: E(() => [I(Ie) && I(_)?.enabled ? (R(), w("div", xE, [r(O, {
19576
19602
  name: "ri:upload-cloud-2-line",
19577
19603
  class: "pk-chatbot-view-chat__drop-overlay-icon"
19578
19604
  }), S("span", null, N(I(Ee)("action.dropFile")), 1)])) : L("", !0)]),
@@ -19583,23 +19609,23 @@ var gE = { class: "pk-chatbot-view-chat__input-stage" }, _E = {
19583
19609
  }
19584
19610
  }), [["styles", [".pk-chatbot-view-chat{flex-direction:column;flex:1;min-height:0;display:flex;position:relative}.pk-chatbot-view-chat--empty{justify-content:center;gap:var(--spacing-md)}@media (width<=575.98px){.pk-chatbot-view-chat--empty{justify-content:flex-start}.pk-chatbot-view-chat--empty .pk-chatbot-empty-state{flex:1;justify-content:center}}.pk-chatbot-view-chat__input-stage{position:relative}.pk-chatbot-view-chat__input-stage .pk-chatbot-view-chat__aurora{inset:calc(-1 * var(--spacing-224)) calc(-1 * var(--spacing-96)) calc(-1 * var(--spacing-160))}@media (width<=575.98px){.pk-chatbot-view-chat__input-stage .pk-chatbot-view-chat__aurora{--aurora-spread:1.6;inset:calc(-1 * var(--spacing-384) - var(--spacing-128)) calc(-1 * var(--spacing-96)) calc(-1 * var(--spacing-160))}}.pk-chatbot-view-chat__agent-chip{align-items:center;gap:var(--spacing-6);padding:var(--spacing-4) var(--spacing-10) var(--spacing-4) var(--spacing-4);border:1px solid var(--color-surface-3);border-radius:var(--rounded-full);background-color:var(--color-surface);flex-shrink:0;display:inline-flex}@media (width<=1023.98px){.pk-chatbot-view-chat__agent-chip{display:none}}.pk-chatbot-view-chat__agent-chip-avatar{width:var(--spacing-24);height:var(--spacing-24);font-size:var(--text-10);border-radius:var(--rounded-full)}.pk-chatbot-view-chat__agent-chip-name{font-size:var(--text-12);font-weight:var(--font-semibold);color:var(--color-word-2);white-space:nowrap}.pk-chatbot-view-chat-fade-enter-active{transition:opacity .25s var(--ease-out)}.pk-chatbot-view-chat-fade-leave-active{transition:opacity .15s var(--ease-out)}.pk-chatbot-view-chat-fade-enter-from,.pk-chatbot-view-chat-fade-leave-to{opacity:0}@media (prefers-reduced-motion:reduce){.pk-chatbot-view-chat-fade-enter-active,.pk-chatbot-view-chat-fade-leave-active{transition:none}}.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)}"]]]);
19585
19611
  t(), C(), k(), fe();
19586
- var SE = { class: "flex flex-col flex-1 min-h-0 relative" }, CE = {
19612
+ var CE = { class: "flex flex-col flex-1 min-h-0 relative" }, wE = {
19587
19613
  key: 0,
19588
19614
  class: "flex flex-col gap-8 p-16 vv-skeleton"
19589
- }, wE = {
19615
+ }, TE = {
19590
19616
  key: 1,
19591
19617
  class: "flex flex-col flex-1 items-center justify-center gap-12 p-24 text-center"
19592
- }, TE = { class: "w-64 h-64 rounded-full bg-surface-1 border border-surface-3 flex items-center justify-center" }, EE = { class: "flex flex-col gap-4" }, DE = { class: "text-16 font-semibold text-word-1" }, OE = { class: "text-14 text-word-3 leading-relaxed" }, kE = {
19618
+ }, EE = { class: "w-64 h-64 rounded-full bg-surface-1 border border-surface-3 flex items-center justify-center" }, DE = { class: "flex flex-col gap-4" }, OE = { class: "text-16 font-semibold text-word-1" }, kE = { class: "text-14 text-word-3 leading-relaxed" }, AE = {
19593
19619
  key: 2,
19594
19620
  class: "flex flex-col gap-8 overflow-y-auto p-16 pb-64 light-scrollbar"
19595
- }, AE = ["onClick"], jE = { class: "flex gap-8" }, ME = { class: "font-bold truncate block flex-1" }, NE = {
19621
+ }, jE = ["onClick"], ME = { class: "flex gap-8" }, NE = { class: "font-bold truncate block flex-1" }, PE = {
19596
19622
  key: 0,
19597
19623
  class: "text-12 text-word-4 line-clamp-2"
19598
- }, PE = {
19624
+ }, FE = {
19599
19625
  key: 3,
19600
19626
  class: "absolute bottom-0 left-0 right-0 flex flex-col items-center gap-4 px-16 pb-16 pt-32 pointer-events-none",
19601
19627
  style: { background: "linear-gradient(to top, var(--color-surface) 55%, transparent)" }
19602
- }, FE = /* @__PURE__ */ b({
19628
+ }, IE = /* @__PURE__ */ b({
19603
19629
  __name: "PkChatbotViewConversations",
19604
19630
  props: { agentId: { type: String } },
19605
19631
  setup(e) {
@@ -19610,7 +19636,7 @@ var SE = { class: "flex flex-col flex-1 min-h-0 relative" }, CE = {
19610
19636
  p.value || (s.value = e, l("chat"));
19611
19637
  }, ne = (e) => s.value === e.id, re = (e, t) => ze(au(e.filter((e) => e.role === t).slice(-1)[0]) || ""), ie = (e) => {
19612
19638
  h(e, re(e.messages, "assistant"));
19613
- }, { openDialogConfirm: ae } = rS(), oe = me(bC, void 0), C = A(!1), T = async () => {
19639
+ }, { openDialogConfirm: ae } = rS(), oe = me(xC, void 0), C = A(!1), T = async () => {
19614
19640
  let e = oe?.eraseConversations;
19615
19641
  if (e && await ae({
19616
19642
  title: n("action.deleteMyConversations"),
@@ -19628,15 +19654,15 @@ var SE = { class: "flex flex-col flex-1 min-h-0 relative" }, CE = {
19628
19654
  };
19629
19655
  return (e, t) => {
19630
19656
  let i = nt, s = at, l = it, d = rt, f = st, h = $e;
19631
- return R(), w("div", SE, [I(o) && I(a).length === 0 ? (R(), w("div", CE, [(R(), w(M, null, te(5, (e) => S("div", {
19657
+ return R(), w("div", CE, [I(o) && I(a).length === 0 ? (R(), w("div", wE, [(R(), w(M, null, te(5, (e) => S("div", {
19632
19658
  key: e,
19633
19659
  class: "vv-skeleton__item rounded-md h-64"
19634
- })), 64))])) : I(a).length === 0 ? (R(), w("div", wE, [
19635
- S("div", TE, [r(i, {
19660
+ })), 64))])) : I(a).length === 0 ? (R(), w("div", TE, [
19661
+ S("div", EE, [r(i, {
19636
19662
  name: "ri:chat-3-line",
19637
19663
  class: "w-28 h-28 text-word-4"
19638
19664
  })]),
19639
- S("div", EE, [S("strong", DE, N(I(n)("message.noConversations")), 1), S("span", OE, N(I(n)("message.noConversationsHint")), 1)]),
19665
+ S("div", DE, [S("strong", OE, N(I(n)("message.noConversations")), 1), S("span", kE, N(I(n)("message.noConversationsHint")), 1)]),
19640
19666
  r(s, {
19641
19667
  modifiers: "primary rounded",
19642
19668
  icon: "ri:add-line",
@@ -19644,11 +19670,11 @@ var SE = { class: "flex flex-col flex-1 min-h-0 relative" }, CE = {
19644
19670
  label: I(n)("action.startNewChat"),
19645
19671
  onClick: t[0] ||= (e) => I(u)()
19646
19672
  }, null, 8, ["label"])
19647
- ])) : (R(), w("ul", kE, [(R(!0), w(M, null, te(I(a), (e) => (R(), w("li", { key: e.id }, [S("button", {
19673
+ ])) : (R(), w("ul", AE, [(R(!0), w(M, null, te(I(a), (e) => (R(), w("li", { key: e.id }, [S("button", {
19648
19674
  type: "button",
19649
19675
  class: c(["w-full block rounded-md border border-surface-3 p-12 text-left text-14 leading-relaxed cursor-pointer transition-colors hover:border-surface-5 hover:bg-surface-1 focus-within:border-word", { "border-brand bg-surface-1": ne(e) }]),
19650
19676
  onClick: (t) => ee(e.id)
19651
- }, [S("div", jE, [I(p) === e.id ? (R(), w(M, { key: 0 }, [r(l, {
19677
+ }, [S("div", ME, [I(p) === e.id ? (R(), w(M, { key: 0 }, [r(l, {
19652
19678
  modelValue: I(m),
19653
19679
  "onUpdate:modelValue": t[1] ||= (e) => ge(m) ? m.value = e : null,
19654
19680
  class: "flex-1",
@@ -19677,8 +19703,8 @@ var SE = { class: "flex flex-col flex-1 min-h-0 relative" }, CE = {
19677
19703
  }, null, 8, ["title"])]),
19678
19704
  _: 2
19679
19705
  }, 1024)], 64)) : (R(), w(M, { key: 1 }, [
19680
- S("strong", ME, N(I(ze)(e.title) || re(e.messages, "assistant")), 1),
19681
- r(Ow, {
19706
+ S("strong", NE, N(I(ze)(e.title) || re(e.messages, "assistant")), 1),
19707
+ r(kw, {
19682
19708
  class: "text-word-4 text-smaller shrink-0",
19683
19709
  date: e.lastMessageAt
19684
19710
  }, null, 8, ["date"]),
@@ -19703,7 +19729,7 @@ var SE = { class: "flex flex-col flex-1 min-h-0 relative" }, CE = {
19703
19729
  }, null, 8, ["title"])]),
19704
19730
  _: 2
19705
19731
  }, 1040)])
19706
- ], 64))]), I(p) === e.id ? L("", !0) : (R(), w("span", NE, N(I(ze)(e.summary) || re(e.messages, "user")), 1))], 10, AE)]))), 128))])), I(a).length > 0 ? (R(), w("div", PE, [r(s, {
19732
+ ], 64))]), I(p) === e.id ? L("", !0) : (R(), w("span", PE, N(I(ze)(e.summary) || re(e.messages, "user")), 1))], 10, jE)]))), 128))])), I(a).length > 0 ? (R(), w("div", FE, [r(s, {
19707
19733
  class: "text-14 pointer-events-auto",
19708
19734
  modifiers: "primary rounded",
19709
19735
  icon: "ri:add-line",
@@ -19727,16 +19753,16 @@ var SE = { class: "flex flex-col flex-1 min-h-0 relative" }, CE = {
19727
19753
  }
19728
19754
  });
19729
19755
  t(), C(), k();
19730
- var IE = { class: "flex flex-col flex-1 min-h-0 relative" }, LE = {
19756
+ var LE = { class: "flex flex-col flex-1 min-h-0 relative" }, RE = {
19731
19757
  key: 0,
19732
19758
  class: "flex flex-col gap-8 p-16 vv-skeleton"
19733
- }, RE = {
19759
+ }, zE = {
19734
19760
  key: 1,
19735
19761
  class: "flex flex-col flex-1 items-center justify-center gap-12 p-24 text-center"
19736
- }, zE = { class: "w-64 h-64 rounded-full bg-surface-1 border border-surface-3 flex items-center justify-center" }, BE = { class: "text-14 text-word-3 leading-relaxed" }, VE = {
19762
+ }, BE = { class: "w-64 h-64 rounded-full bg-surface-1 border border-surface-3 flex items-center justify-center" }, VE = { class: "text-14 text-word-3 leading-relaxed" }, HE = {
19737
19763
  key: 2,
19738
19764
  class: "pk-chatbot-files"
19739
- }, HE = { class: "pk-chatbot-files__icon" }, UE = ["src", "onError"], WE = ["title", "onClick"], GE = { class: "pk-chatbot-files__name" }, KE = { class: "pk-chatbot-files__date" }, qE = { class: "pk-chatbot-files__actions" }, JE = /*#__PURE__*/ jt(/* @__PURE__ */ b({
19765
+ }, UE = { class: "pk-chatbot-files__icon" }, WE = ["src", "onError"], GE = ["title", "onClick"], KE = { class: "pk-chatbot-files__name" }, qE = { class: "pk-chatbot-files__date" }, JE = { class: "pk-chatbot-files__actions" }, YE = /*#__PURE__*/ jt(/* @__PURE__ */ b({
19740
19766
  __name: "PkChatbotViewFiles",
19741
19767
  props: { agentId: { type: String } },
19742
19768
  setup(e) {
@@ -19758,17 +19784,17 @@ var IE = { class: "flex flex-col flex-1 min-h-0 relative" }, LE = {
19758
19784
  };
19759
19785
  return (e, t) => {
19760
19786
  let i = nt, a = at;
19761
- return R(), w("div", IE, [I(s) && I(o).length === 0 ? (R(), w("div", LE, [(R(), w(M, null, te(4, (e) => S("div", {
19787
+ return R(), w("div", LE, [I(s) && I(o).length === 0 ? (R(), w("div", RE, [(R(), w(M, null, te(4, (e) => S("div", {
19762
19788
  key: e,
19763
19789
  class: "vv-skeleton__item rounded-md h-56"
19764
- })), 64))])) : I(o).length === 0 ? (R(), w("div", RE, [S("div", zE, [r(i, {
19790
+ })), 64))])) : I(o).length === 0 ? (R(), w("div", zE, [S("div", BE, [r(i, {
19765
19791
  name: "ri:folder-open-line",
19766
19792
  class: "w-28 h-28 text-word-4"
19767
- })]), S("span", BE, N(I(n)("userFiles.chatFilesEmpty")), 1)])) : (R(), w("ul", VE, [(R(!0), w(M, null, te(I(o), (e) => (R(), w("li", {
19793
+ })]), S("span", VE, N(I(n)("userFiles.chatFilesEmpty")), 1)])) : (R(), w("ul", HE, [(R(!0), w(M, null, te(I(o), (e) => (R(), w("li", {
19768
19794
  key: e.documentId,
19769
19795
  class: "pk-chatbot-files__item"
19770
19796
  }, [
19771
- S("span", HE, [I(c)(e) ? (R(), w("img", {
19797
+ S("span", UE, [I(c)(e) ? (R(), w("img", {
19772
19798
  key: 0,
19773
19799
  src: I(l)(e),
19774
19800
  loading: "lazy",
@@ -19776,7 +19802,7 @@ var IE = { class: "flex flex-col flex-1 min-h-0 relative" }, LE = {
19776
19802
  alt: "",
19777
19803
  class: "pk-chatbot-files__thumb",
19778
19804
  onError: (t) => I(u)(e)
19779
- }, null, 40, UE)) : (R(), P(i, {
19805
+ }, null, 40, WE)) : (R(), P(i, {
19780
19806
  key: 1,
19781
19807
  name: I(Ge)(e.mimeType)
19782
19808
  }, null, 8, ["name"]))]),
@@ -19785,8 +19811,8 @@ var IE = { class: "flex flex-col flex-1 min-h-0 relative" }, LE = {
19785
19811
  class: "pk-chatbot-files__main",
19786
19812
  title: I(n)("userFiles.open"),
19787
19813
  onClick: (t) => I(d)(e)
19788
- }, [S("span", GE, N(e.name || I(n)("userFiles.untitled")), 1), S("span", KE, N(I(f)(e.createdAt)), 1)], 8, WE),
19789
- S("div", qE, [r(a, {
19814
+ }, [S("span", KE, N(e.name || I(n)("userFiles.untitled")), 1), S("span", qE, N(I(f)(e.createdAt)), 1)], 8, GE),
19815
+ S("div", JE, [r(a, {
19790
19816
  modifiers: "action-quiet xs",
19791
19817
  icon: "ri:download-line",
19792
19818
  title: I(n)("action.download"),
@@ -19809,20 +19835,20 @@ var IE = { class: "flex flex-col flex-1 min-h-0 relative" }, LE = {
19809
19835
  }
19810
19836
  }), [["styles", [".pk-chatbot-files{padding:var(--spacing-8);flex-direction:column;margin:0;list-style:none;display:flex;overflow-y:auto}.pk-chatbot-files__item{align-items:center;gap:var(--spacing-10);padding:var(--spacing-8) var(--spacing-10);border-radius:var(--rounded-md);transition:var(--transition-colors);display:flex}.pk-chatbot-files__item+.pk-chatbot-files__item{border-top:1px solid var(--color-surface-3)}.pk-chatbot-files__item:hover{background-color:var(--color-surface-2)}.pk-chatbot-files__icon{width:var(--spacing-36);height:var(--spacing-36);border-radius:var(--rounded-md);background-color:var(--color-surface-1);color:var(--color-word-3);flex-shrink:0;justify-content:center;align-items:center;display:flex;overflow:hidden}.pk-chatbot-files__thumb{object-fit:cover;width:100%;height:100%}.pk-chatbot-files__main{text-align:left;cursor:pointer;background:0 0;border:0;flex-direction:column;flex:1;min-width:0;padding:0;display:flex}.pk-chatbot-files__name{font-size:var(--text-14);color:var(--color-word-1);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.pk-chatbot-files__date{font-size:var(--text-12);color:var(--color-word-3)}.pk-chatbot-files__actions{align-items:center;gap:var(--spacing-2);flex-shrink:0;display:flex}"]]]);
19811
19837
  t(), C(), k();
19812
- var YE = { class: "flex flex-col flex-1 min-h-0 overflow-y-auto" }, XE = { class: "flex flex-col items-center gap-sm pt-lg px-lg pb-md bg-surface-1 border-b border-surface-3" }, ZE = { class: "flex flex-col items-center gap-6 text-center" }, QE = {
19838
+ var XE = { class: "flex flex-col flex-1 min-h-0 overflow-y-auto" }, ZE = { class: "flex flex-col items-center gap-sm pt-lg px-lg pb-md bg-surface-1 border-b border-surface-3" }, QE = { class: "flex flex-col items-center gap-6 text-center" }, $E = {
19813
19839
  key: 0,
19814
19840
  class: "text-16 font-semibold text-word-1 leading-tight"
19815
- }, $E = {
19841
+ }, eD = {
19816
19842
  key: 1,
19817
19843
  class: "text-12 text-word-3 leading-none"
19818
- }, eD = { class: "flex flex-col gap-sm p-md flex-1" }, tD = ["href"], nD = { class: "w-40 h-40 rounded-md bg-surface-2 border border-surface-3 flex items-center justify-center shrink-0" }, rD = { class: "flex flex-col flex-1 min-w-0 gap-1" }, iD = { class: "text-14 font-medium text-word-1 leading-tight" }, aD = { class: "text-12 text-word-3 leading-tight" }, oD = {
19844
+ }, tD = { class: "flex flex-col gap-sm p-md flex-1" }, nD = ["href"], rD = { class: "w-40 h-40 rounded-md bg-surface-2 border border-surface-3 flex items-center justify-center shrink-0" }, iD = { class: "flex flex-col flex-1 min-w-0 gap-1" }, aD = { class: "text-14 font-medium text-word-1 leading-tight" }, oD = { class: "text-12 text-word-3 leading-tight" }, sD = {
19819
19845
  key: 0,
19820
19846
  class: "px-md py-sm"
19821
- }, sD = /* @__PURE__ */ b({
19847
+ }, cD = /* @__PURE__ */ b({
19822
19848
  __name: "PkChatbotViewProfile",
19823
19849
  props: { agentId: { type: String } },
19824
19850
  setup(e) {
19825
- let t = e, { t: n } = Oe({ useScope: "global" }), { name: i, agentInterface: a } = pn(Jx(t.agentId)), o = me(bC, void 0), c = O(() => o?.user.value ?? null), l = O(() => o?.canManageProfile.value ?? !1), u = O(() => o?.profileUrl.value), d = O(() => o?.isExternalAuth?.value ?? !1), f = A(!1), p = A();
19851
+ let t = e, { t: n } = Oe({ useScope: "global" }), { name: i, agentInterface: a } = pn(Jx(t.agentId)), o = me(xC, void 0), c = O(() => o?.user.value ?? null), l = O(() => o?.canManageProfile.value ?? !1), u = O(() => o?.profileUrl.value), d = O(() => o?.isExternalAuth?.value ?? !1), f = A(!1), p = A();
19826
19852
  async function m() {
19827
19853
  if (o) {
19828
19854
  f.value = !0;
@@ -19837,14 +19863,14 @@ var YE = { class: "flex flex-col flex-1 min-h-0 overflow-y-auto" }, XE = { class
19837
19863
  }
19838
19864
  return (e, t) => {
19839
19865
  let o = tt, h = nt, g = at;
19840
- return R(), w("div", YE, [
19841
- S("div", XE, [r(VC, {
19866
+ return R(), w("div", XE, [
19867
+ S("div", ZE, [r(HC, {
19842
19868
  modifiers: "surface ring",
19843
19869
  class: "w-64 h-64",
19844
19870
  name: c.value?.name ?? I(i),
19845
19871
  "img-src": c.value?.image ?? I(a)?.logo
19846
- }, null, 8, ["name", "img-src"]), S("div", ZE, [c.value?.name ?? I(i) ? (R(), w("strong", QE, N(c.value?.name ?? I(i)), 1)) : L("", !0), c.value?.email ? (R(), w("span", $E, N(c.value.email), 1)) : L("", !0)])]),
19847
- S("div", eD, [p.value ? (R(), P(o, {
19872
+ }, null, 8, ["name", "img-src"]), S("div", QE, [c.value?.name ?? I(i) ? (R(), w("strong", $E, N(c.value?.name ?? I(i)), 1)) : L("", !0), c.value?.email ? (R(), w("span", eD, N(c.value.email), 1)) : L("", !0)])]),
19873
+ S("div", tD, [p.value ? (R(), P(o, {
19848
19874
  key: 0,
19849
19875
  modifiers: "danger",
19850
19876
  content: p.value
@@ -19855,17 +19881,17 @@ var YE = { class: "flex flex-col flex-1 min-h-0 overflow-y-auto" }, XE = { class
19855
19881
  rel: "noopener noreferrer",
19856
19882
  class: "flex items-center gap-12 p-12 rounded-lg border border-surface-3 hover:border-surface-5 hover:bg-surface-1 transition-colors cursor-pointer no-underline"
19857
19883
  }, [
19858
- S("div", nD, [r(h, {
19884
+ S("div", rD, [r(h, {
19859
19885
  name: "ri:user-settings-line",
19860
19886
  class: "w-20 h-20 text-word-2"
19861
19887
  })]),
19862
- S("div", rD, [S("span", iD, N(I(n)("action.manageProfile")), 1), S("span", aD, N(I(n)("label.manageProfileDescription")), 1)]),
19888
+ S("div", iD, [S("span", aD, N(I(n)("action.manageProfile")), 1), S("span", oD, N(I(n)("label.manageProfileDescription")), 1)]),
19863
19889
  r(h, {
19864
19890
  name: "ri:arrow-right-s-line",
19865
19891
  class: "w-16 h-16 text-word-4 shrink-0"
19866
19892
  })
19867
- ], 8, tD)) : L("", !0)]),
19868
- d.value ? L("", !0) : (R(), w("div", oD, [r(g, {
19893
+ ], 8, nD)) : L("", !0)]),
19894
+ d.value ? L("", !0) : (R(), w("div", sD, [r(g, {
19869
19895
  modifiers: "secondary-danger",
19870
19896
  class: "w-full",
19871
19897
  icon: "ri:logout-box-line",
@@ -19884,13 +19910,13 @@ var YE = { class: "flex flex-col flex-1 min-h-0 overflow-y-auto" }, XE = { class
19884
19910
  }
19885
19911
  });
19886
19912
  t(), C(), k();
19887
- var cD = { class: "pk-chatbot__header-start" }, lD = ["title"], uD = { key: 1 }, dD = { class: "pk-chatbot__warning-body" }, fD = { class: "pk-chatbot__warning-header" }, pD = { class: "pk-chatbot__warning-title" }, mD = { class: "pk-chatbot__warning-text" }, hD = {
19913
+ var lD = { class: "pk-chatbot__header-start" }, uD = ["title"], dD = { key: 1 }, fD = { class: "pk-chatbot__warning-body" }, pD = { class: "pk-chatbot__warning-header" }, mD = { class: "pk-chatbot__warning-title" }, hD = { class: "pk-chatbot__warning-text" }, gD = {
19888
19914
  key: 5,
19889
19915
  class: "pk-chatbot__view-auth flex-1 min-h-0 overflow-y-auto"
19890
- }, gD = {
19916
+ }, _D = {
19891
19917
  key: 7,
19892
19918
  class: "pk-chatbot__footer"
19893
- }, _D = /*#__PURE__*/ jt(/* @__PURE__ */ b({
19919
+ }, vD = /*#__PURE__*/ jt(/* @__PURE__ */ b({
19894
19920
  __name: "PkChatbot",
19895
19921
  props: /*@__PURE__*/ m({
19896
19922
  baseUrl: { type: String },
@@ -19930,7 +19956,7 @@ var cD = { class: "pk-chatbot__header-start" }, lD = ["title"], uD = { key: 1 },
19930
19956
  setup(t, { expose: n, emit: a }) {
19931
19957
  let o = ae(), { t: l } = Oe({ useScope: "global" }), d = t, f = a, p = u(t, "chatId"), m = Jx(d.agentId);
19932
19958
  At((e) => m.apiClient.resolveShortUrls(e));
19933
- let { messages: h, chat: v, localChatId: b, activeView: x, chatError: ne, isDark: ie } = pn(m), oe = we(m, "agentId"), { startNewChat: C, stopGeneration: T, regenerate: se, navigate: ce, sendMessage: le } = m, ue = me(bC, void 0), D = O(() => ue?.canManageProfile.value ?? !1), de = O(() => !D.value && (ue?.canSignIn?.value ?? !1) && o["view-auth"] !== void 0);
19959
+ let { messages: h, chat: v, localChatId: b, activeView: x, chatError: ne, isDark: ie } = pn(m), oe = we(m, "agentId"), { startNewChat: C, stopGeneration: T, regenerate: se, navigate: ce, sendMessage: le } = m, ue = me(xC, void 0), D = O(() => ue?.canManageProfile.value ?? !1), de = O(() => !D.value && (ue?.canSignIn?.value ?? !1) && o["view-auth"] !== void 0);
19934
19960
  _(D, (e) => {
19935
19961
  e && x.value === "auth" && ce("chat");
19936
19962
  }), e(() => {
@@ -19945,7 +19971,7 @@ var cD = { class: "pk-chatbot__header-start" }, lD = ["title"], uD = { key: 1 },
19945
19971
  f("error", t);
19946
19972
  } catch {}
19947
19973
  });
19948
- let fe = O(() => d.modifier === "fullscreen"), pe = O(() => d.agentType === "reasoning"), he = O(() => d.agentInterface?.useColorsForAgentHeader), k = O(() => ["theme", `theme--${ie.value ? "dark" : "light"}`]), ge = O(() => d.agentInterface?.mainColor), A = O(() => DC(d.agentInterface?.textColor, ge.value)), j = Et(() => d.agentInterface?.footerMessage), _e = O(() => x.value === "conversations" ? l("label.conversations") : x.value === "profile" ? l("label.profile") : x.value === "auth" ? l("label.authentication") : x.value === "files" ? l("userFiles.chatFilesTitle") : d.name), ve = O(() => v.value.status === "ready"), ye = O(() => h.value?.[h.value.length - 1]);
19974
+ let fe = O(() => d.modifier === "fullscreen"), pe = O(() => d.agentType === "reasoning"), he = O(() => d.agentInterface?.useColorsForAgentHeader), k = O(() => ["theme", `theme--${ie.value ? "dark" : "light"}`]), ge = O(() => d.agentInterface?.mainColor), A = O(() => OC(d.agentInterface?.textColor, ge.value)), j = Et(() => d.agentInterface?.footerMessage), _e = O(() => x.value === "conversations" ? l("label.conversations") : x.value === "profile" ? l("label.profile") : x.value === "auth" ? l("label.authentication") : x.value === "files" ? l("userFiles.chatFilesTitle") : d.name), ve = O(() => v.value.status === "ready"), ye = O(() => h.value?.[h.value.length - 1]);
19949
19975
  return n({
19950
19976
  startNewChat: C,
19951
19977
  regenerate: se,
@@ -19967,7 +19993,7 @@ var cD = { class: "pk-chatbot__header-start" }, lD = ["title"], uD = { key: 1 },
19967
19993
  key: 0,
19968
19994
  class: "pk-chatbot__header",
19969
19995
  style: re(he.value ? { backgroundColor: ge.value } : void 0)
19970
- }, [S("div", cD, [I(x) === "chat" ? (R(), P(VC, {
19996
+ }, [S("div", lD, [I(x) === "chat" ? (R(), P(HC, {
19971
19997
  key: 1,
19972
19998
  modifiers: "surface ring shrink-0",
19973
19999
  class: "pk-chatbot__avatar",
@@ -19985,7 +20011,7 @@ var cD = { class: "pk-chatbot__header-start" }, lD = ["title"], uD = { key: 1 },
19985
20011
  class: "pk-chatbot__title",
19986
20012
  title: _e.value,
19987
20013
  style: re(he.value ? { color: A.value } : void 0)
19988
- }, N(_e.value), 13, lD)]), r(m, {
20014
+ }, N(_e.value), 13, uD)]), r(m, {
19989
20015
  class: "pk-chatbot__header-end",
19990
20016
  modifiers: "compact"
19991
20017
  }, {
@@ -20055,14 +20081,14 @@ var cD = { class: "pk-chatbot__header-start" }, lD = ["title"], uD = { key: 1 },
20055
20081
  ]),
20056
20082
  _: 3
20057
20083
  })], 4)),
20058
- pe.value ? (R(), w("div", uD, [S("div", dD, [r(h, { modifiers: "callout" }, {
20059
- default: E(() => [S("div", fD, [r(u, {
20084
+ pe.value ? (R(), w("div", dD, [S("div", fD, [r(h, { modifiers: "callout" }, {
20085
+ default: E(() => [S("div", pD, [r(u, {
20060
20086
  name: "ri:alert-line",
20061
20087
  class: "pk-chatbot__warning-icon"
20062
- }), S("strong", pD, N(I(l)("message.warning")), 1)]), S("p", mD, N(I(l)("message.reasoningAgent")), 1)]),
20088
+ }), S("strong", mD, N(I(l)("message.warning")), 1)]), S("p", hD, N(I(l)("message.reasoningAgent")), 1)]),
20063
20089
  _: 1
20064
20090
  })])])) : L("", !0),
20065
- I(x) === "chat" ? (R(), P(xE, {
20091
+ I(x) === "chat" ? (R(), P(SE, {
20066
20092
  key: 2,
20067
20093
  "agent-id": t.agentId,
20068
20094
  modifier: t.modifier,
@@ -20076,23 +20102,23 @@ var cD = { class: "pk-chatbot__header-start" }, lD = ["title"], uD = { key: 1 },
20076
20102
  "agent-id",
20077
20103
  "modifier",
20078
20104
  "user-name"
20079
- ])) : I(x) === "conversations" ? (R(), P(FE, {
20105
+ ])) : I(x) === "conversations" ? (R(), P(IE, {
20080
20106
  key: 3,
20081
20107
  "agent-id": t.agentId
20082
20108
  }, Te({ _: 2 }, [te(Object.keys(I(o)), (t) => ({
20083
20109
  name: t,
20084
20110
  fn: E((n) => [s(e.$slots, t, ee(i(n)))])
20085
- }))]), 1032, ["agent-id"])) : I(x) === "files" ? (R(), P(JE, {
20111
+ }))]), 1032, ["agent-id"])) : I(x) === "files" ? (R(), P(YE, {
20086
20112
  key: 4,
20087
20113
  "agent-id": t.agentId
20088
- }, null, 8, ["agent-id"])) : I(x) === "auth" ? (R(), w("div", hD, [s(e.$slots, "view-auth")])) : (R(), P(sD, {
20114
+ }, null, 8, ["agent-id"])) : I(x) === "auth" ? (R(), w("div", gD, [s(e.$slots, "view-auth")])) : (R(), P(cD, {
20089
20115
  key: 6,
20090
20116
  "agent-id": t.agentId
20091
20117
  }, Te({ _: 2 }, [te(Object.keys(I(o)), (t) => ({
20092
20118
  name: t,
20093
20119
  fn: E((n) => [s(e.$slots, t, ee(i(n)))])
20094
20120
  }))]), 1032, ["agent-id"])),
20095
- I(j) ? (R(), w("div", gD, [r(Mt, {
20121
+ I(j) ? (R(), w("div", _D, [r(Mt, {
20096
20122
  markdown: I(j),
20097
20123
  class: "wysiwyg"
20098
20124
  }, null, 8, ["markdown"])])) : L("", !0)
@@ -20101,16 +20127,16 @@ var cD = { class: "pk-chatbot__header-start" }, lD = ["title"], uD = { key: 1 },
20101
20127
  }
20102
20128
  }), [["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);font-weight:var(--font-semibold);text-overflow:ellipsis;white-space:nowrap;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)}.pk-chatbot--fullscreen{background-color:#0000}.pk-chatbot--fullscreen .pk-chatbot__footer{padding:0 var(--spacing-md) var(--spacing-sm) var(--spacing-md);border-top:none}.pk-chatbot--fullscreen .pk-chatbot-messages{scrollbar-gutter:stable both-edges;-webkit-mask-image:linear-gradient(to bottom, transparent 0, #000 var(--spacing-40), #000 calc(100% - var(--spacing-40)), transparent 100%);mask-image:linear-gradient(to bottom, transparent 0, #000 var(--spacing-40), #000 calc(100% - var(--spacing-40)), transparent 100%);padding-block:var(--spacing-48)}.pk-chatbot--fullscreen .pk-chatbot-messages__wrapper{width:100%;max-width:768px;margin-inline:auto}.pk-chatbot--fullscreen .pk-chatbot-file-preview{background-color:var(--color-surface)}.pk-chatbot--fullscreen .pk-chatbot-input__notice{background-color:var(--color-surface);border-inline:1px solid var(--color-surface-3);border-top:1px solid var(--color-surface-2);padding:var(--spacing-10) var(--spacing-16)}.pk-chatbot--fullscreen .pk-chatbot-input__notice:after{background-color:var(--color-surface);border-inline:1px solid var(--color-surface-2);bottom:calc(-1 * var(--spacing-20));height:var(--spacing-20);left:-1px;right:-1px}.pk-chatbot--fullscreen .pk-chatbot-input{width:calc(100% - var(--spacing-sm) * 2);max-width:768px;margin-inline:auto}.pk-chatbot--fullscreen .pk-chatbot-input__form{border-radius:var(--rounded-xxxl);padding:var(--spacing-12) var(--spacing-16);background-color:var(--color-surface-1);border-color:var(--color-surface-2);box-shadow:none;transition:border-color var(--duration-200) var(--ease-in-out), box-shadow var(--duration-200) var(--ease-in-out)}.pk-chatbot--fullscreen .pk-chatbot-input__form:has(:focus-within){border-color:var(--color-surface-4);box-shadow:var(--shadow-sm)}@media (prefers-reduced-motion:reduce){.pk-chatbot--fullscreen .pk-chatbot-input__form{transition:none}}.pk-chatbot--fullscreen .pk-chatbot-input__textarea{background-color:#0000}.pk-chatbot--fullscreen .pk-chatbot-input__button{position:relative}.pk-chatbot--fullscreen .pk-chatbot-input__button:after{content:\"\";inset:calc(-1 * var(--spacing-8));position:absolute}"]]]);
20103
20129
  t(), k(), C(), fe();
20104
- var vD = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-full min-h-full p-lg overflow-y-auto" }, yD = { class: "pk-chatbot-auth__flip w-full max-w-384 mx-auto my-auto" }, bD = { class: "pk-chatbot-auth__success-icon w-64 h-64 border border-surface-3 rounded-full bg-surface-0 flex items-center justify-center overflow-hidden bg-surface mx-auto mb-md" }, xD = { class: "font-bold text-18 mb-xs" }, SD = { class: "mb-lg text-16 text-word-3" }, CD = {
20130
+ var yD = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-full min-h-full p-lg overflow-y-auto" }, bD = { class: "pk-chatbot-auth__flip w-full max-w-384 mx-auto my-auto" }, xD = { class: "pk-chatbot-auth__success-icon w-64 h-64 border border-surface-3 rounded-full bg-surface-0 flex items-center justify-center overflow-hidden bg-surface mx-auto mb-md" }, SD = { class: "font-bold text-18 mb-xs" }, CD = { class: "mb-lg text-16 text-word-3" }, wD = {
20105
20131
  key: "form",
20106
20132
  class: "pk-chatbot-auth__flip-card flex flex-col"
20107
- }, wD = { class: "flex flex-col" }, TD = {
20133
+ }, TD = { class: "flex flex-col" }, ED = {
20108
20134
  key: 0,
20109
20135
  class: "flex justify-center mb-md"
20110
- }, ED = ["src", "alt"], DD = { class: "text-center leading-normal mb-lg" }, OD = {
20136
+ }, DD = ["src", "alt"], OD = { class: "text-center leading-normal mb-lg" }, kD = {
20111
20137
  key: 0,
20112
20138
  class: "font-bold text-20 m-0"
20113
- }, kD = { class: "mb-md" }, AD = { class: "mb-md" }, jD = { class: "mb-md" }, MD = { class: "hr mt-xs" }, ND = { class: "pt-lg text-center text-word-3" }, PD = /*#__PURE__*/ jt(/* @__PURE__ */ b({
20139
+ }, AD = { class: "mb-md" }, jD = { class: "mb-md" }, MD = { class: "mb-md" }, ND = { class: "hr mt-xs" }, PD = { class: "pt-lg text-center text-word-3" }, FD = /*#__PURE__*/ jt(/* @__PURE__ */ b({
20114
20140
  __name: "PkChatbotAuth",
20115
20141
  props: /*@__PURE__*/ m({
20116
20142
  branding: {
@@ -20181,7 +20207,7 @@ var vD = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
20181
20207
  }
20182
20208
  return (t, i) => {
20183
20209
  let s = nt, u = at, f = tt, p = rt;
20184
- return R(), w("div", vD, [S("div", yD, [r(j, {
20210
+ return R(), w("div", yD, [S("div", bD, [r(j, {
20185
20211
  name: "pk-flip",
20186
20212
  mode: "out-in",
20187
20213
  onAfterEnter: ie
@@ -20193,13 +20219,13 @@ var vD = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
20193
20219
  tabindex: "-1",
20194
20220
  class: "pk-chatbot-auth__flip-card outline-none flex flex-col text-center leading-normal"
20195
20221
  }, [
20196
- S("div", bD, [r(s, {
20222
+ S("div", xD, [r(s, {
20197
20223
  name: "ri:mail-check-line",
20198
20224
  "aria-hidden": "true",
20199
20225
  class: "text-success w-32 h-32"
20200
20226
  })]),
20201
- S("h1", xD, N(o.value.title), 1),
20202
- S("p", SD, N(o.value.message), 1),
20227
+ S("h1", SD, N(o.value.title), 1),
20228
+ S("p", CD, N(o.value.message), 1),
20203
20229
  r(u, {
20204
20230
  type: "button",
20205
20231
  modifiers: "link",
@@ -20207,13 +20233,13 @@ var vD = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
20207
20233
  label: I(n)("action.backToSignIn"),
20208
20234
  onClick: l
20209
20235
  }, null, 8, ["label"])
20210
- ], 512)) : (R(), w("div", CD, [S("div", wD, [
20211
- e.branding?.interface.logo ? (R(), w("div", TD, [S("img", {
20236
+ ], 512)) : (R(), w("div", wD, [S("div", TD, [
20237
+ e.branding?.interface.logo ? (R(), w("div", ED, [S("img", {
20212
20238
  src: e.branding.interface.logo,
20213
20239
  alt: e.branding.name,
20214
20240
  class: "w-64 h-64 border border-surface-3 rounded-full bg-surface-0 overflow-hidden bg-surface object-contain"
20215
- }, null, 8, ED)])) : L("", !0),
20216
- S("div", DD, [e.branding?.name ? (R(), w("h1", OD, N(e.branding.name), 1)) : L("", !0), (R(), P(ne(e.branding?.name ? "h2" : "h1"), { class: "text-word-3 mb-0" }, {
20241
+ }, null, 8, DD)])) : L("", !0),
20242
+ S("div", OD, [e.branding?.name ? (R(), w("h1", kD, N(e.branding.name), 1)) : L("", !0), (R(), P(ne(e.branding?.name ? "h2" : "h1"), { class: "text-word-3 mb-0" }, {
20217
20243
  default: E(() => [c.value === "sign-in" ? (R(), w(M, { key: 0 }, [y(N(I(n)("auth.signInTitle")), 1)], 64)) : c.value === "sign-up" ? (R(), w(M, { key: 1 }, [y(N(I(n)("auth.signUpTitle")), 1)], 64)) : c.value === "reset" ? (R(), w(M, { key: 2 }, [y(N(I(n)("auth.resetTitle")), 1)], 64)) : L("", !0)]),
20218
20244
  _: 1
20219
20245
  }))]),
@@ -20229,7 +20255,7 @@ var vD = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
20229
20255
  readonly: e.loading,
20230
20256
  onSubmit: ae
20231
20257
  }, {
20232
- default: E(() => [S("div", kD, [
20258
+ default: E(() => [S("div", AD, [
20233
20259
  r(I(h), {
20234
20260
  name: "email",
20235
20261
  type: "email",
@@ -20244,7 +20270,7 @@ var vD = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
20244
20270
  label: I(n)("label.password"),
20245
20271
  floating: ""
20246
20272
  }, null, 8, ["label"]),
20247
- S("div", AD, [r(u, {
20273
+ S("div", jD, [r(u, {
20248
20274
  type: "button",
20249
20275
  modifiers: "link",
20250
20276
  label: I(n)("action.forgetPassword"),
@@ -20274,7 +20300,7 @@ var vD = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
20274
20300
  readonly: e.loading,
20275
20301
  onSubmit: oe
20276
20302
  }, {
20277
- default: E(() => [S("div", jD, [
20303
+ default: E(() => [S("div", MD, [
20278
20304
  r(I(v), {
20279
20305
  name: "name",
20280
20306
  type: "text",
@@ -20343,7 +20369,7 @@ var vD = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
20343
20369
  })]),
20344
20370
  _: 1
20345
20371
  }, 8, ["readonly"])) : L("", !0),
20346
- (c.value === "sign-in" || c.value === "sign-up") && d.value ? (R(), w(M, { key: 5 }, [S("div", MD, [S("span", null, N(I(n)("label.or")), 1)]), r(p, {
20372
+ (c.value === "sign-in" || c.value === "sign-up") && d.value ? (R(), w(M, { key: 5 }, [S("div", ND, [S("span", null, N(I(n)("label.or")), 1)]), r(p, {
20347
20373
  modifiers: "vertical",
20348
20374
  class: "gap-xs mt-xs"
20349
20375
  }, {
@@ -20366,7 +20392,7 @@ var vD = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
20366
20392
  }, null, 8, ["disabled", "label"])) : L("", !0)]),
20367
20393
  _: 1
20368
20394
  })], 64)) : L("", !0)
20369
- ]), S("div", ND, [c.value === "sign-in" ? (R(), w(M, { key: 0 }, [y(N(I(n)("auth.noAccount")) + " ", 1), r(u, {
20395
+ ]), S("div", PD, [c.value === "sign-in" ? (R(), w(M, { key: 0 }, [y(N(I(n)("auth.noAccount")) + " ", 1), r(u, {
20370
20396
  type: "button",
20371
20397
  modifiers: "link",
20372
20398
  class: "font-semibold",
@@ -20390,20 +20416,20 @@ var vD = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
20390
20416
  })])]);
20391
20417
  };
20392
20418
  }
20393
- }), [["styles", [".pk-chatbot-auth__flip{transform-style:preserve-3d;perspective:1000px;display:grid}.pk-chatbot-auth__flip-card{backface-visibility:hidden;transform-style:preserve-3d;grid-area:1/1}.pk-chatbot-auth__success-icon{animation:.4s ease-out .3s backwards pk-chatbot-auth-check-pop}.pk-flip-enter-active{animation:.6s ease-out pk-chatbot-auth-flip-in}.pk-flip-leave-active{animation:.6s ease-in pk-chatbot-auth-flip-out}@keyframes pk-chatbot-auth-flip-in{0%{opacity:0;transform:rotateY(-180deg)}to{opacity:1;transform:rotateY(0)}}@keyframes pk-chatbot-auth-flip-out{0%{opacity:1;transform:rotateY(0)}to{opacity:0;transform:rotateY(180deg)}}@keyframes pk-chatbot-auth-check-pop{0%{opacity:0;transform:scale(0)}60%{transform:scale(1.15)}to{opacity:1;transform:scale(1)}}"]]]), FD = "@layer volver.reset,volver.preflight,volver.props;@layer volver.components{.pk-loader{width:var(--spacing-48);height:var(--spacing-48);border-radius:50%;animation:1s linear infinite rotate;position:relative}.pk-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)}}}@layer volver.themes,volver.utilities;";
20419
+ }), [["styles", [".pk-chatbot-auth__flip{transform-style:preserve-3d;perspective:1000px;display:grid}.pk-chatbot-auth__flip-card{backface-visibility:hidden;transform-style:preserve-3d;grid-area:1/1}.pk-chatbot-auth__success-icon{animation:.4s ease-out .3s backwards pk-chatbot-auth-check-pop}.pk-flip-enter-active{animation:.6s ease-out pk-chatbot-auth-flip-in}.pk-flip-leave-active{animation:.6s ease-in pk-chatbot-auth-flip-out}@keyframes pk-chatbot-auth-flip-in{0%{opacity:0;transform:rotateY(-180deg)}to{opacity:1;transform:rotateY(0)}}@keyframes pk-chatbot-auth-flip-out{0%{opacity:1;transform:rotateY(0)}to{opacity:0;transform:rotateY(180deg)}}@keyframes pk-chatbot-auth-check-pop{0%{opacity:0;transform:scale(0)}60%{transform:scale(1.15)}to{opacity:1;transform:scale(1)}}"]]]), ID = "@layer volver.reset,volver.preflight,volver.props;@layer volver.components{.pk-loader{width:var(--spacing-48);height:var(--spacing-48);border-radius:50%;animation:1s linear infinite rotate;position:relative}.pk-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)}}}@layer volver.themes,volver.utilities;";
20394
20420
  //#endregion
20395
20421
  //#region ../../packages/components/src/PkLoader.vue
20396
20422
  t();
20397
- var ID = {};
20398
- function LD(e, t) {
20423
+ var LD = {};
20424
+ function RD(e, t) {
20399
20425
  return R(), w("div", null, [...t[0] ||= [S("div", {
20400
20426
  "aria-hidden": "true",
20401
20427
  class: "pk-loader"
20402
20428
  }, null, -1)]]);
20403
20429
  }
20404
- var RD = /*#__PURE__*/ jt(ID, [["render", LD], ["styles", [FD]]]);
20430
+ var zD = /*#__PURE__*/ jt(LD, [["render", RD], ["styles", [ID]]]);
20405
20431
  t(), k(), fe(), C();
20406
- var zD = { class: "welcome-popup__text" }, BD = ["aria-label"], VD = 100, HD = /*#__PURE__*/ jt(/* @__PURE__ */ b({
20432
+ var BD = { class: "welcome-popup__text" }, VD = ["aria-label"], HD = 100, UD = /*#__PURE__*/ jt(/* @__PURE__ */ b({
20407
20433
  __name: "PkWelcomePopup",
20408
20434
  props: {
20409
20435
  agentId: { type: String },
@@ -20424,7 +20450,7 @@ var zD = { class: "welcome-popup__text" }, BD = ["aria-label"], VD = 100, HD = /
20424
20450
  l.value = [], c.value = !1;
20425
20451
  let t = e.split(/(\s+)/), n = 0;
20426
20452
  function r() {
20427
- n < t.length ? (l.value.push(t[n]), n++, u = setTimeout(r, VD)) : c.value = !0;
20453
+ n < t.length ? (l.value.push(t[n]), n++, u = setTimeout(r, HD)) : c.value = !0;
20428
20454
  }
20429
20455
  r();
20430
20456
  }
@@ -20448,7 +20474,7 @@ var zD = { class: "welcome-popup__text" }, BD = ["aria-label"], VD = 100, HD = /
20448
20474
  key: 0,
20449
20475
  class: "welcome-popup",
20450
20476
  onClick: ue(h, ["stop"])
20451
- }, [S("p", zD, [(R(!0), w(M, null, te(l.value, (e, t) => (R(), w("span", {
20477
+ }, [S("p", BD, [(R(!0), w(M, null, te(l.value, (e, t) => (R(), w("span", {
20452
20478
  key: t,
20453
20479
  class: "welcome-popup__word"
20454
20480
  }, N(e), 1))), 128))]), r(j, null, {
@@ -20464,7 +20490,7 @@ var zD = { class: "welcome-popup__text" }, BD = ["aria-label"], VD = 100, HD = /
20464
20490
  width: "14",
20465
20491
  height: "14",
20466
20492
  fill: "currentColor"
20467
- }, [S("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, BD)) : L("", !0)]),
20493
+ }, [S("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, VD)) : L("", !0)]),
20468
20494
  _: 1
20469
20495
  })])) : L("", !0)]),
20470
20496
  _: 1
@@ -20472,10 +20498,10 @@ var zD = { class: "welcome-popup__text" }, BD = ["aria-label"], VD = 100, HD = /
20472
20498
  }
20473
20499
  }), [["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)}}"]]]);
20474
20500
  t(), C(), k(), fe();
20475
- var UD = {
20501
+ var WD = {
20476
20502
  key: 0,
20477
20503
  class: "floating-chat-widget__launcher"
20478
- }, WD = {
20504
+ }, GD = {
20479
20505
  key: 0,
20480
20506
  class: "w-full h-full",
20481
20507
  xmlns: "http://www.w3.org/2000/svg",
@@ -20483,7 +20509,7 @@ var UD = {
20483
20509
  width: "24",
20484
20510
  height: "24",
20485
20511
  fill: "currentColor"
20486
- }, GD = {
20512
+ }, KD = {
20487
20513
  key: 1,
20488
20514
  class: "w-full h-full",
20489
20515
  xmlns: "http://www.w3.org/2000/svg",
@@ -20491,13 +20517,13 @@ var UD = {
20491
20517
  width: "24",
20492
20518
  height: "24",
20493
20519
  fill: "currentColor"
20494
- }, KD = {
20520
+ }, qD = {
20495
20521
  key: 0,
20496
20522
  class: "floating-chat-widget__chat floating-chat-widget__auth"
20497
- }, qD = {
20523
+ }, JD = {
20498
20524
  key: 0,
20499
20525
  class: "floating-chat-widget__chat floating-chat-widget__loading"
20500
- }, JD = /*#__PURE__*/ jt(/* @__PURE__ */ b({
20526
+ }, YD = /*#__PURE__*/ jt(/* @__PURE__ */ b({
20501
20527
  inheritAttrs: !1,
20502
20528
  __name: "FloatingChatWidget.ce",
20503
20529
  props: {
@@ -20537,7 +20563,7 @@ var UD = {
20537
20563
  }
20538
20564
  },
20539
20565
  setup(e, { expose: t }) {
20540
- BC();
20566
+ VC();
20541
20567
  let n = e;
20542
20568
  uu(n.appinsightsConnectionString), du({
20543
20569
  organizationSlug: n.organizationSlug,
@@ -20557,6 +20583,11 @@ var UD = {
20557
20583
  });
20558
20584
  _(h, (e) => {
20559
20585
  e && du({ userId: e });
20586
+ }), bC({
20587
+ agentId: n.agentId,
20588
+ baseUrl: n.baseUrl,
20589
+ headers: p,
20590
+ userId: h
20560
20591
  }), _(() => d.value.data, (e) => {
20561
20592
  e && a("ready");
20562
20593
  });
@@ -20567,13 +20598,13 @@ var UD = {
20567
20598
  status: e.status
20568
20599
  }), f(e);
20569
20600
  }
20570
- let { agent: oe, branding: C, authMethods: T, requiresAuth: se, notFound: ce, isLoading: le, contrastColor: D, themeClass: de, themeStyle: fe, reload: pe } = RC({
20601
+ let { agent: oe, branding: C, authMethods: T, requiresAuth: se, notFound: ce, isLoading: le, contrastColor: D, themeClass: de, themeStyle: fe, reload: pe } = zC({
20571
20602
  baseUrl: n.baseUrl,
20572
20603
  organizationSlug: () => n.organizationSlug,
20573
20604
  agentId: () => n.agentId,
20574
20605
  headers: p,
20575
20606
  systemTheme: () => n.systemTheme
20576
- }), { authBranding: me } = SC({
20607
+ }), { authBranding: me } = CC({
20577
20608
  agent: oe,
20578
20609
  branding: C,
20579
20610
  authMethods: T,
@@ -20591,7 +20622,7 @@ var UD = {
20591
20622
  n.customCss
20592
20623
  ].filter(Boolean);
20593
20624
  return e.length ? e.join("\n") : void 0;
20594
- }), { authError: M, authSuccess: _e, authLoading: ve, handleSignIn: ye, handleSignUp: be, handleReset: xe, handleSocial: Se } = zC({
20625
+ }), { authError: M, authSuccess: _e, authLoading: ve, handleSignIn: ye, handleSignUp: be, handleReset: xe, handleSocial: Se } = BC({
20595
20626
  signInWithEmail: v,
20596
20627
  signUpWithEmail: b,
20597
20628
  requestPasswordReset: x,
@@ -20634,7 +20665,7 @@ var UD = {
20634
20665
  _: 1
20635
20666
  })) : L("", !0),
20636
20667
  r(j, { name: "slide-bottom" }, {
20637
- default: E(() => [(I(oe) || I(C)) && !I(ce) ? (R(), w("div", UD, [r(HD, {
20668
+ default: E(() => [(I(oe) || I(C)) && !I(ce) ? (R(), w("div", WD, [r(UD, {
20638
20669
  "agent-id": e.agentId,
20639
20670
  message: I(oe)?.interface.initialMessage,
20640
20671
  enabled: !I(l) && I(oe)?.interface?.welcomePopup,
@@ -20648,11 +20679,11 @@ var UD = {
20648
20679
  "aria-label": "chat-button",
20649
20680
  class: "floating-chat-widget__button",
20650
20681
  onClick: ue(u, ["stop"])
20651
- }, [I(l) ? (R(), w("svg", WD, [...n[4] ||= [S("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)]])) : (R(), w("svg", GD, [...n[5] ||= [S("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)]]))])])) : L("", !0)]),
20682
+ }, [I(l) ? (R(), w("svg", GD, [...n[4] ||= [S("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)]])) : (R(), w("svg", KD, [...n[5] ||= [S("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)]]))])])) : L("", !0)]),
20652
20683
  _: 1
20653
20684
  }),
20654
20685
  r(j, null, {
20655
- default: E(() => [I(l) && (I(se) || I(le)) && !(I(oe) && I(d).data) ? (R(), w("div", KD, [I(se) ? (R(), P(PD, {
20686
+ default: E(() => [I(l) && (I(se) || I(le)) && !(I(oe) && I(d).data) ? (R(), w("div", qD, [I(se) ? (R(), P(FD, {
20656
20687
  key: 0,
20657
20688
  "error-message": I(M),
20658
20689
  "onUpdate:errorMessage": n[0] ||= (e) => ge(M) ? M.value = e : null,
@@ -20677,15 +20708,15 @@ var UD = {
20677
20708
  "onSignUp",
20678
20709
  "onRequestReset",
20679
20710
  "onSocial"
20680
- ])) : (R(), P(RD, { key: 1 }))])) : L("", !0)]),
20711
+ ])) : (R(), P(zD, { key: 1 }))])) : L("", !0)]),
20681
20712
  _: 1
20682
20713
  }),
20683
20714
  r(j, null, {
20684
- default: E(() => [I(l) && !I(se) && !I(oe) && !I(le) ? (R(), w("div", qD, [r(RD)])) : L("", !0)]),
20715
+ default: E(() => [I(l) && !I(se) && !I(oe) && !I(le) ? (R(), w("div", JD, [r(zD)])) : L("", !0)]),
20685
20716
  _: 1
20686
20717
  }),
20687
20718
  r(j, null, {
20688
- default: E(() => [I(oe) && I(l) && I(d).data ? (R(), P(_D, {
20719
+ default: E(() => [I(oe) && I(l) && I(d).data ? (R(), P(vD, {
20689
20720
  key: e.agentId,
20690
20721
  ref_key: "chatbotEl",
20691
20722
  ref: o,
@@ -20713,7 +20744,7 @@ var UD = {
20713
20744
  title: t.$t("action.close"),
20714
20745
  onClick: ue(u, ["stop"])
20715
20746
  }, null, 8, ["modifiers", "title"])]),
20716
- "view-auth": E(() => [r(PD, {
20747
+ "view-auth": E(() => [r(FD, {
20717
20748
  "error-message": I(M),
20718
20749
  "onUpdate:errorMessage": n[2] ||= (e) => ge(M) ? M.value = e : null,
20719
20750
  success: I(_e),
@@ -20756,16 +20787,16 @@ var UD = {
20756
20787
  }
20757
20788
  }), [["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:99999997;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,.floating-chat-widget__auth{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}}"]]]);
20758
20789
  t(), C(), k(), fe();
20759
- var YD = {
20790
+ var XD = {
20760
20791
  key: 1,
20761
20792
  class: "embedded-chat-widget embedded-chat-widget--not-found"
20762
- }, XD = {
20793
+ }, ZD = {
20763
20794
  key: 0,
20764
20795
  class: "embedded-chat-widget embedded-chat-widget--auth"
20765
- }, ZD = {
20796
+ }, QD = {
20766
20797
  key: 0,
20767
20798
  class: "embedded-chat-widget embedded-chat-widget--loading"
20768
- }, QD = /*#__PURE__*/ jt(/* @__PURE__ */ b({
20799
+ }, $D = /*#__PURE__*/ jt(/* @__PURE__ */ b({
20769
20800
  inheritAttrs: !1,
20770
20801
  __name: "EmbeddedChatWidget.ce",
20771
20802
  props: {
@@ -20809,7 +20840,7 @@ var YD = {
20809
20840
  }
20810
20841
  },
20811
20842
  setup(e, { expose: t }) {
20812
- BC();
20843
+ VC();
20813
20844
  let n = e, { PkGlobalDialog: i } = nS(), { emit: a } = fS(), o = A(), l = A();
20814
20845
  uu(n.appinsightsConnectionString), du({
20815
20846
  organizationSlug: n.organizationSlug,
@@ -20826,6 +20857,11 @@ var YD = {
20826
20857
  });
20827
20858
  _(m, (e) => {
20828
20859
  e && du({ userId: e });
20860
+ }), bC({
20861
+ agentId: n.agentId,
20862
+ baseUrl: n.baseUrl,
20863
+ headers: f,
20864
+ userId: m
20829
20865
  }), _(() => u.value.data, (e) => {
20830
20866
  e && a("ready");
20831
20867
  });
@@ -20836,13 +20872,13 @@ var YD = {
20836
20872
  status: e.status
20837
20873
  }), d(e);
20838
20874
  }
20839
- let { t: oe } = Oe({ useScope: "global" }), { agent: C, branding: T, authMethods: se, requiresAuth: ce, notFound: le, isLoading: ue, reload: D, themeClass: de, themeStyle: fe } = RC({
20875
+ let { t: oe } = Oe({ useScope: "global" }), { agent: C, branding: T, authMethods: se, requiresAuth: ce, notFound: le, isLoading: ue, reload: D, themeClass: de, themeStyle: fe } = zC({
20840
20876
  baseUrl: n.baseUrl,
20841
20877
  organizationSlug: () => n.organizationSlug,
20842
20878
  agentId: () => n.agentId,
20843
20879
  headers: f,
20844
20880
  systemTheme: () => n.systemTheme
20845
- }), { authBranding: pe } = SC({
20881
+ }), { authBranding: pe } = CC({
20846
20882
  agent: C,
20847
20883
  branding: T,
20848
20884
  authMethods: se,
@@ -20853,7 +20889,7 @@ var YD = {
20853
20889
  baseUrl: n.baseUrl,
20854
20890
  headers: f,
20855
20891
  cookieName: n.cookieName
20856
- }), { authError: me, authSuccess: he, authLoading: k, handleSignIn: M, handleSignUp: _e, handleReset: ve, handleSocial: ye } = zC({
20892
+ }), { authError: me, authSuccess: he, authLoading: k, handleSignIn: M, handleSignUp: _e, handleReset: ve, handleSocial: ye } = BC({
20857
20893
  signInWithEmail: g,
20858
20894
  signUpWithEmail: v,
20859
20895
  requestPasswordReset: b,
@@ -20888,12 +20924,12 @@ var YD = {
20888
20924
  default: E(() => [y(N(Se.value), 1)]),
20889
20925
  _: 1
20890
20926
  })) : L("", !0),
20891
- I(le) ? (R(), w("div", YD, [S("p", null, N(I(oe)("message.agentNotFound")), 1)])) : L("", !0),
20927
+ I(le) ? (R(), w("div", XD, [S("p", null, N(I(oe)("message.agentNotFound")), 1)])) : L("", !0),
20892
20928
  r(j, {
20893
20929
  name: "fade",
20894
20930
  appear: ""
20895
20931
  }, {
20896
- default: E(() => [(I(C) || I(T)) && !I(le) && I(ce) && (!I(u).data?.user?.id || I(u).data?.user?.isAnonymous) ? (R(), w("div", XD, [I(se) ? (R(), P(PD, {
20932
+ default: E(() => [(I(C) || I(T)) && !I(le) && I(ce) && (!I(u).data?.user?.id || I(u).data?.user?.isAnonymous) ? (R(), w("div", ZD, [I(se) ? (R(), P(FD, {
20897
20933
  key: 0,
20898
20934
  "error-message": I(me),
20899
20935
  "onUpdate:errorMessage": n[0] ||= (e) => ge(me) ? me.value = e : null,
@@ -20916,17 +20952,17 @@ var YD = {
20916
20952
  "onSignUp",
20917
20953
  "onRequestReset",
20918
20954
  "onSocial"
20919
- ])) : (R(), P(RD, { key: 1 }))])) : L("", !0)]),
20955
+ ])) : (R(), P(zD, { key: 1 }))])) : L("", !0)]),
20920
20956
  _: 1
20921
20957
  }),
20922
20958
  r(j, {
20923
20959
  name: "fade",
20924
20960
  appear: ""
20925
20961
  }, {
20926
- default: E(() => [I(ue) && !I(le) ? (R(), w("div", ZD, [r(RD)])) : L("", !0)]),
20962
+ default: E(() => [I(ue) && !I(le) ? (R(), w("div", QD, [r(zD)])) : L("", !0)]),
20927
20963
  _: 1
20928
20964
  }),
20929
- I(C) && I(u).data && !I(le) ? (R(), P(_D, {
20965
+ I(C) && I(u).data && !I(le) ? (R(), P(vD, {
20930
20966
  key: 2,
20931
20967
  ref_key: "chatbotEl",
20932
20968
  ref: o,
@@ -20952,7 +20988,7 @@ var YD = {
20952
20988
  }, Te({
20953
20989
  "header-actions": E(() => [s(t.$slots, "header-actions")]),
20954
20990
  actions: E(() => [s(t.$slots, "actions")]),
20955
- "view-auth": E(() => [r(PD, {
20991
+ "view-auth": E(() => [r(FD, {
20956
20992
  "error-message": I(me),
20957
20993
  "onUpdate:errorMessage": n[2] ||= (e) => ge(me) ? me.value = e : null,
20958
20994
  success: I(he),
@@ -20999,7 +21035,7 @@ var YD = {
20999
21035
  //#endregion
21000
21036
  //#region src/lib.ts
21001
21037
  fe();
21002
- function $D(e) {
21038
+ function eO(e) {
21003
21039
  let { t } = bn.global;
21004
21040
  e.use(Zt()), e.use(bn), e.provide(ke, bn), e.use(In, {
21005
21041
  iconsCollections: [Ln, Rn],
@@ -21020,16 +21056,16 @@ function $D(e) {
21020
21056
  pu(e instanceof Error ? e : Error(String(e)), { vueInfo: n });
21021
21057
  };
21022
21058
  }
21023
- function eO(e) {
21059
+ function tO(e) {
21024
21060
  let { styles: t } = e;
21025
21061
  return {
21026
- configureApp: $D,
21062
+ configureApp: eO,
21027
21063
  styles: [mu, ...t ?? []]
21028
21064
  };
21029
21065
  }
21030
- var tO = ve(JD, eO(JD)), nO = ve(QD, eO(QD));
21031
- customElements.define("floating-chat-widget", tO), customElements.define("embedded-chat-widget", nO);
21066
+ var nO = ve(YD, tO(YD)), rO = ve($D, tO($D));
21067
+ customElements.define("floating-chat-widget", nO), customElements.define("embedded-chat-widget", rO);
21032
21068
  //#endregion
21033
- export { nO as EmbeddedChatWidgetCe, tO as FloatingChatWidgetCe };
21069
+ export { rO as EmbeddedChatWidgetCe, nO as FloatingChatWidgetCe };
21034
21070
 
21035
21071
  //# sourceMappingURL=ai-elements.es.js.map