@pagelines/sdk 1.0.928 → 1.0.930
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BotProvider.js +109 -109
- package/dist/BotProvider.js.map +1 -1
- package/dist/BotWrap.js +1168 -1057
- package/dist/BotWrap.js.map +1 -1
- package/dist/bot/index.d.ts +5 -1
- package/dist/bot/ui/ChatComposer.vue.d.ts +63 -0
- package/dist/bot/ui/ChatDivider.vue.d.ts +13 -0
- package/dist/bot/ui/ChatTurn.vue.d.ts +36 -0
- package/dist/bot.js +48 -48
- package/dist/bot.js.map +1 -1
- package/dist/sdk.css +1 -1
- package/dist/widget.js +51 -51
- package/dist/widget.js.map +1 -1
- package/package.json +1 -1
package/dist/BotProvider.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./rolldown-runtime.js";
|
|
2
2
|
import { SOCIAL_PLATFORMS as e } from "./constants.js";
|
|
3
|
-
import {
|
|
3
|
+
import { _ as t, d as n, f as r, g as i, h as a, n as o, p as s, t as c, u as l, v as u } from "./BotWrap.js";
|
|
4
4
|
import { Bot as d, getColorSchemeOklch as ee } from "@pagelines/core";
|
|
5
5
|
import { Fragment as f, Transition as p, TransitionGroup as m, computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createSlots as b, createTextVNode as x, createVNode as S, defineComponent as C, guardReactiveProps as w, mergeProps as T, normalizeClass as E, normalizeProps as D, normalizeStyle as O, onMounted as k, onUnmounted as te, openBlock as A, ref as j, renderList as M, renderSlot as N, shallowRef as ne, toDisplayString as P, unref as F, watch as I, withCtx as L, withKeys as R, withModifiers as z } from "vue";
|
|
6
6
|
// bot/schema.ts
|
|
@@ -53,21 +53,21 @@ var B = [
|
|
|
53
53
|
__name: "ElAuthGate",
|
|
54
54
|
props: { sdk: {} },
|
|
55
55
|
setup(e) {
|
|
56
|
-
let
|
|
56
|
+
let t = j({
|
|
57
57
|
email: "",
|
|
58
58
|
code: ""
|
|
59
|
-
}),
|
|
59
|
+
}), i = j("email"), a = j(!1), o = {
|
|
60
60
|
email: {
|
|
61
61
|
title: "Enter Your Email",
|
|
62
62
|
button: {
|
|
63
63
|
label: "Continue",
|
|
64
|
-
disabled: () => !
|
|
64
|
+
disabled: () => !t.value.email || a.value
|
|
65
65
|
},
|
|
66
66
|
action: async () => {
|
|
67
67
|
if (!a.value) {
|
|
68
68
|
a.value = !0;
|
|
69
69
|
try {
|
|
70
|
-
await e.sdk.auth.requestAuthCode({ email:
|
|
70
|
+
await e.sdk.auth.requestAuthCode({ email: t.value.email }) && (i.value = "code");
|
|
71
71
|
} finally {
|
|
72
72
|
a.value = !1;
|
|
73
73
|
}
|
|
@@ -78,15 +78,15 @@ var B = [
|
|
|
78
78
|
title: "Enter Verification Code",
|
|
79
79
|
button: {
|
|
80
80
|
label: "Verify",
|
|
81
|
-
disabled: () =>
|
|
81
|
+
disabled: () => t.value.code.length !== 6 || a.value
|
|
82
82
|
},
|
|
83
83
|
action: async () => {
|
|
84
84
|
if (!a.value) {
|
|
85
85
|
a.value = !0;
|
|
86
86
|
try {
|
|
87
87
|
await e.sdk.auth.loginWithCode({
|
|
88
|
-
email:
|
|
89
|
-
code:
|
|
88
|
+
email: t.value.email,
|
|
89
|
+
code: t.value.code
|
|
90
90
|
});
|
|
91
91
|
} finally {
|
|
92
92
|
a.value = !1;
|
|
@@ -94,51 +94,51 @@ var B = [
|
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
},
|
|
97
|
+
}, c = h(() => o[i.value]);
|
|
98
98
|
return I(() => e.sdk.activeUser.value, (e) => {
|
|
99
|
-
e &&
|
|
99
|
+
e && i.value === "code" && console.log("[ElAuthGate] Authentication successful", { email: e.email });
|
|
100
100
|
}), (a, o) => (A(), v("div", {
|
|
101
101
|
"data-test": "auth-form",
|
|
102
|
-
"data-test-mode":
|
|
102
|
+
"data-test-mode": i.value,
|
|
103
103
|
class: "flex flex-col items-center justify-center h-full p-6"
|
|
104
104
|
}, [y("div", U, [
|
|
105
105
|
e.sdk.error.value ? (A(), v("p", W, P(e.sdk.error.value), 1)) : _("", !0),
|
|
106
|
-
y("h3", G, P(
|
|
106
|
+
y("h3", G, P(c.value.title), 1),
|
|
107
107
|
y("div", K, [S(V, null, {
|
|
108
|
-
default: L(() => [
|
|
109
|
-
modelValue:
|
|
110
|
-
"onUpdate:modelValue": o[0] || (o[0] = (e) =>
|
|
108
|
+
default: L(() => [i.value === "email" ? (A(), v("div", q, [S(r, {
|
|
109
|
+
modelValue: t.value.email,
|
|
110
|
+
"onUpdate:modelValue": o[0] || (o[0] = (e) => t.value.email = e),
|
|
111
111
|
"data-test": "auth-email-input",
|
|
112
|
-
onKeyup: R(
|
|
113
|
-
}, null, 8, ["modelValue", "onKeyup"])])) : (A(), v("div", re, [S(
|
|
114
|
-
modelValue:
|
|
115
|
-
"onUpdate:modelValue": o[1] || (o[1] = (e) =>
|
|
112
|
+
onKeyup: R(c.value.action, ["enter"])
|
|
113
|
+
}, null, 8, ["modelValue", "onKeyup"])])) : (A(), v("div", re, [S(n, {
|
|
114
|
+
modelValue: t.value.code,
|
|
115
|
+
"onUpdate:modelValue": o[1] || (o[1] = (e) => t.value.code = e),
|
|
116
116
|
length: 6,
|
|
117
117
|
"focus-first": !0,
|
|
118
118
|
"data-test": "auth-code-input",
|
|
119
|
-
onAutoSubmit:
|
|
119
|
+
onAutoSubmit: c.value.action
|
|
120
120
|
}, null, 8, ["modelValue", "onAutoSubmit"])])), (A(), v("div", {
|
|
121
|
-
key:
|
|
121
|
+
key: c.value.button.label,
|
|
122
122
|
class: "space-y-4 w-full"
|
|
123
|
-
}, [S(
|
|
123
|
+
}, [S(s, {
|
|
124
124
|
theme: "primary",
|
|
125
125
|
size: "md",
|
|
126
126
|
class: "w-full",
|
|
127
127
|
"data-test": "auth-submit",
|
|
128
128
|
loading: e.sdk.loading.value,
|
|
129
|
-
disabled:
|
|
130
|
-
onClick:
|
|
129
|
+
disabled: c.value.button.disabled() || e.sdk.loading.value,
|
|
130
|
+
onClick: c.value.action
|
|
131
131
|
}, {
|
|
132
|
-
default: L(() => [x(P(
|
|
132
|
+
default: L(() => [x(P(c.value.button.label), 1)]),
|
|
133
133
|
_: 1
|
|
134
134
|
}, 8, [
|
|
135
135
|
"loading",
|
|
136
136
|
"disabled",
|
|
137
137
|
"onClick"
|
|
138
|
-
]),
|
|
138
|
+
]), i.value === "code" ? (A(), v("button", {
|
|
139
139
|
key: 0,
|
|
140
140
|
class: "w-full text-xs text-white/50 hover:text-white/70 transition-colors py-2",
|
|
141
|
-
onClick: o[2] || (o[2] = (e) =>
|
|
141
|
+
onClick: o[2] || (o[2] = (e) => i.value = "email")
|
|
142
142
|
}, " Change Email ")) : _("", !0)]))]),
|
|
143
143
|
_: 1
|
|
144
144
|
})])
|
|
@@ -163,7 +163,7 @@ var B = [
|
|
|
163
163
|
}
|
|
164
164
|
},
|
|
165
165
|
setup(t) {
|
|
166
|
-
return (n, r) => (A(), v("div", Y, [S(
|
|
166
|
+
return (n, r) => (A(), v("div", Y, [S(l, {
|
|
167
167
|
bot: t.bot,
|
|
168
168
|
"is-online": t.isOnline
|
|
169
169
|
}, null, 8, ["bot", "is-online"]), y("div", X, [
|
|
@@ -196,15 +196,15 @@ var B = [
|
|
|
196
196
|
}
|
|
197
197
|
},
|
|
198
198
|
setup(e) {
|
|
199
|
-
return (t,
|
|
199
|
+
return (t, n) => (A(), v("div", fe, [y("div", pe, [y("div", me, [y("img", {
|
|
200
200
|
src: e.bot.avatarUrl.value,
|
|
201
201
|
alt: e.bot.displayName.value,
|
|
202
202
|
class: "w-full h-full object-cover",
|
|
203
|
-
onError:
|
|
204
|
-
}, null, 40, he)]), y("div", ge, [e.isOnline ? (A(), v(f, { key: 0 }, [
|
|
203
|
+
onError: n[0] || (n[0] = (...e) => F(a) && F(a)(...e))
|
|
204
|
+
}, null, 40, he)]), y("div", ge, [e.isOnline ? (A(), v(f, { key: 0 }, [n[1] || (n[1] = y("div", {
|
|
205
205
|
class: "size-4 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",
|
|
206
206
|
style: { "animation-duration": "3s" }
|
|
207
|
-
}, null, -1)),
|
|
207
|
+
}, null, -1)), n[2] || (n[2] = y("div", { class: "size-4 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))], 64)) : (A(), v("div", _e))])]), y("div", ve, [y("h1", ye, P(e.bot.displayName.value), 1), y("p", be, P(e.bot.title.value), 1)])]));
|
|
208
208
|
}
|
|
209
209
|
}), Se = { class: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[28px] h-[28px] overflow-hidden" }, Ce = /* @__PURE__ */ C({
|
|
210
210
|
name: "SelfSidebarClose",
|
|
@@ -508,19 +508,19 @@ var B = [
|
|
|
508
508
|
"turnStarted",
|
|
509
509
|
"turnCompleted"
|
|
510
510
|
],
|
|
511
|
-
setup(
|
|
512
|
-
let
|
|
511
|
+
setup(n, { emit: r }) {
|
|
512
|
+
let a = r, c = ne(), d = j(!1), p = j(!1), m = j(), C = j(), T = h(() => c.value?.botMode?.value ?? "self"), R = h(() => c.value?.textState.value.isConnected ?? !1), V = h(() => n.sdk.activeUser.value !== void 0), H = h(() => B.find((e) => e.mode === T.value));
|
|
513
513
|
function createChatController() {
|
|
514
|
-
|
|
514
|
+
c.value && c.value.destroy();
|
|
515
515
|
try {
|
|
516
|
-
|
|
517
|
-
sdk:
|
|
518
|
-
bot:
|
|
519
|
-
context:
|
|
520
|
-
firstMessage:
|
|
521
|
-
...
|
|
522
|
-
onTurnStarted: () =>
|
|
523
|
-
onTurnCompleted: (e) =>
|
|
516
|
+
c.value = new t({
|
|
517
|
+
sdk: n.sdk,
|
|
518
|
+
bot: n.bot,
|
|
519
|
+
context: n.context,
|
|
520
|
+
firstMessage: n.firstMessage,
|
|
521
|
+
...n.createVoiceClientFn ? { createVoiceClientFn: n.createVoiceClientFn } : {},
|
|
522
|
+
onTurnStarted: () => a("turnStarted"),
|
|
523
|
+
onTurnCompleted: (e) => a("turnCompleted", e)
|
|
524
524
|
});
|
|
525
525
|
} catch (e) {
|
|
526
526
|
throw console.error("BotChatController creation failed:", e), e;
|
|
@@ -530,7 +530,7 @@ var B = [
|
|
|
530
530
|
createChatController();
|
|
531
531
|
} catch (e) {
|
|
532
532
|
let t = e instanceof Error ? e.message : "Couldn't initialize your assistant";
|
|
533
|
-
m.value = t,
|
|
533
|
+
m.value = t, a("error", t);
|
|
534
534
|
}
|
|
535
535
|
function applyTheme(e) {
|
|
536
536
|
if (!C.value) return;
|
|
@@ -541,19 +541,19 @@ var B = [
|
|
|
541
541
|
}
|
|
542
542
|
k(() => {
|
|
543
543
|
try {
|
|
544
|
-
applyTheme(
|
|
544
|
+
applyTheme(n.theme), n.chatOnly && c.value && c.value.setMode("chat");
|
|
545
545
|
} catch (e) {
|
|
546
546
|
let t = e instanceof Error ? e.message : "Couldn't initialize your assistant";
|
|
547
|
-
m.value = t,
|
|
547
|
+
m.value = t, a("error", t);
|
|
548
548
|
}
|
|
549
549
|
}), te(() => {
|
|
550
|
-
|
|
551
|
-
}), I(() =>
|
|
550
|
+
c.value && c.value.destroy();
|
|
551
|
+
}), I(() => n.theme, (e) => {
|
|
552
552
|
applyTheme(e);
|
|
553
|
-
}), I(() =>
|
|
554
|
-
t && !e &&
|
|
553
|
+
}), I(() => n.sdk.activeUser.value, (e, t) => {
|
|
554
|
+
t && !e && c.value && c.value.setMode("self");
|
|
555
555
|
});
|
|
556
|
-
let U = h(() => !!(
|
|
556
|
+
let U = h(() => !!(n.bot.cover.value?.src && n.bot.cover.value?.quality === "low") || !!(n.bot.avatar.value?.src && n.bot.avatar.value?.quality === "low")), W = h(() => {
|
|
557
557
|
let e = [U.value ? "backdrop-blur-sm" : ""];
|
|
558
558
|
return U.value && T.value === "self" ? e.push("from-black/80 via-black/60 to-black/80") : T.value === "self" ? e.push("from-black/70 via-black/50 to-black/80") : e.push("from-black/90 via-black/90 to-black/100"), e.join(" ");
|
|
559
559
|
}), G = {
|
|
@@ -562,43 +562,43 @@ var B = [
|
|
|
562
562
|
question: "i-heroicons-question-mark-circle",
|
|
563
563
|
message: "i-heroicons-chat-bubble-left-right",
|
|
564
564
|
sparkles: "i-heroicons-sparkles"
|
|
565
|
-
}, K = h(() =>
|
|
566
|
-
template:
|
|
567
|
-
bot:
|
|
568
|
-
})), q = h(() => G[
|
|
569
|
-
return (
|
|
565
|
+
}, K = h(() => i({
|
|
566
|
+
template: n.buttonText || "Talk to {name}",
|
|
567
|
+
bot: n.bot.toData()
|
|
568
|
+
})), q = h(() => G[n.buttonIcon || "phone"] || G.phone);
|
|
569
|
+
return (t, r) => (A(), v("div", {
|
|
570
570
|
ref_key: "rootElement",
|
|
571
571
|
ref: C,
|
|
572
|
-
key:
|
|
572
|
+
key: n.bot.avatarUrl.value,
|
|
573
573
|
class: "pagelines-sdk @container/bot pagelines-bot w-full h-full overflow-hidden relative",
|
|
574
574
|
"data-test": "bot-chat"
|
|
575
575
|
}, [
|
|
576
|
-
|
|
576
|
+
n.loading ? (A(), v("div", Pe, [S(u, { class: "text-white size-8" })])) : n.bot && !m.value ? (A(), v("div", {
|
|
577
577
|
key: 1,
|
|
578
|
-
class: E(["absolute inset-0",
|
|
579
|
-
style: O(
|
|
580
|
-
"data-quality":
|
|
581
|
-
}, [
|
|
578
|
+
class: E(["absolute inset-0", n.bare ? "" : "bg-cover bg-center bg-no-repeat"]),
|
|
579
|
+
style: O(n.bare ? void 0 : { backgroundImage: `url(${n.bot.avatarUrl.value})` }),
|
|
580
|
+
"data-quality": n.bot.avatar.value?.quality || "none"
|
|
581
|
+
}, [n.bare ? _("", !0) : (A(), v("div", {
|
|
582
582
|
key: 0,
|
|
583
583
|
class: E(["absolute inset-0 bg-gradient-to-br z-0", W.value])
|
|
584
|
-
}, null, 2)), y("div", { class: E(["relative z-10 flex flex-col h-full transition-all duration-500 ease-[cubic-bezier(0.25,1,0.33,1)] will-change-transform",
|
|
584
|
+
}, null, 2)), y("div", { class: E(["relative z-10 flex flex-col h-full transition-all duration-500 ease-[cubic-bezier(0.25,1,0.33,1)] will-change-transform", n.isActive ? "opacity-100 translate-y-0" : "opacity-0 translate-y-2"]) }, [!n.bare || n.hasClose ? (A(), v("div", {
|
|
585
585
|
key: 0,
|
|
586
|
-
class: E(["relative z-30 p-2", !
|
|
587
|
-
}, [
|
|
586
|
+
class: E(["relative z-30 p-2", !n.bare && T.value !== "self" ? "backdrop-blur-lg" : ""])
|
|
587
|
+
}, [n.chatOnly ? (A(), v("div", {
|
|
588
588
|
key: 0,
|
|
589
|
-
class: E(["flex items-center",
|
|
590
|
-
}, [
|
|
591
|
-
src:
|
|
592
|
-
alt:
|
|
589
|
+
class: E(["flex items-center", n.bare ? "justify-end" : ""])
|
|
590
|
+
}, [n.bare ? _("", !0) : (A(), v("div", Ie, [y("img", {
|
|
591
|
+
src: n.bot.avatarUrl.value,
|
|
592
|
+
alt: n.bot.displayName.value,
|
|
593
593
|
class: "size-8 rounded-full object-cover"
|
|
594
|
-
}, null, 8, Le), y("span", Re, P(
|
|
595
|
-
class: E(["flex cursor-pointer items-center rounded-2xl p-3 transition-colors",
|
|
596
|
-
onClick: r[0] || (r[0] = z((e) =>
|
|
594
|
+
}, null, 8, Le), y("span", Re, P(n.bot.displayName.value), 1)])), n.hasClose ? (A(), v("div", ze, [y("button", {
|
|
595
|
+
class: E(["flex cursor-pointer items-center rounded-2xl p-3 transition-colors", n.bare ? "text-theme-500 hover:bg-theme-50" : "text-white/70 hover:bg-white/10"]),
|
|
596
|
+
onClick: r[0] || (r[0] = z((e) => a("close", "button"), ["stop"]))
|
|
597
597
|
}, [...r[7] || (r[7] = [y("i", { class: "size-6 i-tabler-x" }, null, -1)])], 2)])) : _("", !0)], 2)) : (A(), v("div", {
|
|
598
598
|
key: 1,
|
|
599
|
-
class: E(["flex items-center",
|
|
599
|
+
class: E(["flex items-center", n.hasClose ? "" : "justify-between"])
|
|
600
600
|
}, [
|
|
601
|
-
y("div", { class: E(
|
|
601
|
+
y("div", { class: E(n.hasClose ? "flex-1 basis-0" : "") }, [y("button", {
|
|
602
602
|
class: "cursor-pointer p-2 flex items-center gap-2 rounded-2xl text-white/70 hover:bg-white/10 transition-all duration-300 ease-[cubic-bezier(0.25,1,0.33,1)] hover:scale-105 active:scale-95",
|
|
603
603
|
onClick: r[1] || (r[1] = (e) => d.value = !0)
|
|
604
604
|
}, [...r[8] || (r[8] = [y("i", { class: "i-tabler-menu size-7" }, null, -1)])])], 2),
|
|
@@ -610,24 +610,24 @@ var B = [
|
|
|
610
610
|
y("span", Be, P(H.value?.label), 1),
|
|
611
611
|
r[9] || (r[9] = y("i", { class: "i-tabler-chevron-down size-4" }, null, -1))
|
|
612
612
|
], 2),
|
|
613
|
-
|
|
613
|
+
n.hasClose ? (A(), v("div", Ve, [y("button", {
|
|
614
614
|
class: "cursor-pointer flex items-center p-3 rounded-2xl text-white/70 hover:bg-white/10 transition-colors",
|
|
615
|
-
onClick: r[3] || (r[3] = z((e) =>
|
|
615
|
+
onClick: r[3] || (r[3] = z((e) => a("close", "button"), ["stop"]))
|
|
616
616
|
}, [...r[10] || (r[10] = [y("i", { class: "size-6 i-tabler-x" }, null, -1)])])])) : _("", !0)
|
|
617
|
-
], 2))], 2)) : _("", !0),
|
|
617
|
+
], 2))], 2)) : _("", !0), n.chatOnly ? (A(), v("div", {
|
|
618
618
|
key: 1,
|
|
619
|
-
class: E(["relative z-20 flex min-h-0 w-full flex-1 flex-col",
|
|
620
|
-
}, [y("div", { class: E(["min-h-0 w-full flex-1",
|
|
621
|
-
"chat-controller":
|
|
622
|
-
bot:
|
|
619
|
+
class: E(["relative z-20 flex min-h-0 w-full flex-1 flex-col", n.bare ? "" : "px-4"])
|
|
620
|
+
}, [y("div", { class: E(["min-h-0 w-full flex-1", n.bare ? "" : "mx-auto max-w-md"]) }, [S(o, {
|
|
621
|
+
"chat-controller": c.value,
|
|
622
|
+
bot: n.bot,
|
|
623
623
|
scope: V.value ? "private" : "public",
|
|
624
|
-
"empty-state-message":
|
|
625
|
-
variant:
|
|
626
|
-
"show-header": !
|
|
627
|
-
centered:
|
|
628
|
-
}, b({ _: 2 }, [
|
|
624
|
+
"empty-state-message": n.emptyStateMessage,
|
|
625
|
+
variant: n.bare ? "light" : "dark",
|
|
626
|
+
"show-header": !n.bare,
|
|
627
|
+
centered: n.bare
|
|
628
|
+
}, b({ _: 2 }, [t.$slots["empty-heading"] ? {
|
|
629
629
|
name: "empty-heading",
|
|
630
|
-
fn: L((e) => [N(
|
|
630
|
+
fn: L((e) => [N(t.$slots, "empty-heading", D(w(e)))]),
|
|
631
631
|
key: "0"
|
|
632
632
|
} : void 0]), 1032, [
|
|
633
633
|
"chat-controller",
|
|
@@ -640,58 +640,58 @@ var B = [
|
|
|
640
640
|
])], 2)], 2)) : (A(), v(f, { key: 2 }, [T.value === "self" ? (A(), v("div", He, [
|
|
641
641
|
r[11] || (r[11] = y("div", { class: "flex-1 basis-0 mb-12" }, null, -1)),
|
|
642
642
|
S(xe, {
|
|
643
|
-
bot:
|
|
643
|
+
bot: n.bot,
|
|
644
644
|
"is-online": R.value
|
|
645
645
|
}, null, 8, ["bot", "is-online"]),
|
|
646
|
-
y("div", Q, [S(
|
|
646
|
+
y("div", Q, [S(s, {
|
|
647
647
|
theme: "primary",
|
|
648
648
|
size: "lg",
|
|
649
649
|
class: "w-full",
|
|
650
650
|
icon: q.value,
|
|
651
651
|
"data-test": "voice-button",
|
|
652
|
-
onClick: r[4] || (r[4] = (e) =>
|
|
652
|
+
onClick: r[4] || (r[4] = (e) => c.value?.setMode("talk"))
|
|
653
653
|
}, {
|
|
654
654
|
default: L(() => [x(P(K.value), 1)]),
|
|
655
655
|
_: 1
|
|
656
|
-
}, 8, ["icon"]),
|
|
656
|
+
}, 8, ["icon"]), n.bot.accounts.value && n.bot.accounts.value.length > 0 ? (A(), v("div", Ue, [(A(!0), v(f, null, M((n.bot.accounts.value || []).filter((t) => F(e)[t.platform]), (t) => (A(), v("a", {
|
|
657
657
|
key: `${t.platform}-${t.handle}`,
|
|
658
658
|
href: F(e)[t.platform].getUrl(t.handle),
|
|
659
659
|
target: "_blank",
|
|
660
660
|
class: "size-12 rounded-full text-white/60 hover:text-white hover:bg-white/5 border border-white/0 hover:border-white/10 flex items-center justify-center transition-all duration-200 hover:scale-105"
|
|
661
661
|
}, [y("i", { class: E([F(e)[t.platform].icon, "size-5"]) }, null, 2)], 8, We))), 128))])) : _("", !0)])
|
|
662
|
-
])) : T.value === "talk" ? (A(), v("div", Ge, [
|
|
662
|
+
])) : T.value === "talk" ? (A(), v("div", Ge, [n.requireAuth && !V.value ? (A(), g(J, {
|
|
663
663
|
key: 0,
|
|
664
|
-
sdk:
|
|
665
|
-
}, null, 8, ["sdk"])) : (A(), v(f, { key: 1 }, [y("div", null, [y("div", Ke, [S(
|
|
666
|
-
bot:
|
|
664
|
+
sdk: n.sdk
|
|
665
|
+
}, null, 8, ["sdk"])) : (A(), v(f, { key: 1 }, [y("div", null, [y("div", Ke, [S(l, {
|
|
666
|
+
bot: n.bot,
|
|
667
667
|
"is-online": R.value
|
|
668
668
|
}, null, 8, ["bot", "is-online"])])]), S(o, {
|
|
669
|
-
"chat-controller":
|
|
670
|
-
bot:
|
|
671
|
-
}, null, 8, ["chat-controller", "bot"])], 64))])) : (A(), v("div", qe, [y("div", Je, [T.value === "chat" ? (A(), v(f, { key: 0 }, [
|
|
669
|
+
"chat-controller": c.value,
|
|
670
|
+
bot: n.bot
|
|
671
|
+
}, null, 8, ["chat-controller", "bot"])], 64))])) : (A(), v("div", qe, [y("div", Je, [T.value === "chat" ? (A(), v(f, { key: 0 }, [n.requireAuth && !V.value ? (A(), g(J, {
|
|
672
672
|
key: 0,
|
|
673
|
-
sdk:
|
|
673
|
+
sdk: n.sdk
|
|
674
674
|
}, null, 8, ["sdk"])) : (A(), g(o, {
|
|
675
675
|
key: 1,
|
|
676
|
-
"chat-controller":
|
|
677
|
-
bot:
|
|
676
|
+
"chat-controller": c.value,
|
|
677
|
+
bot: n.bot,
|
|
678
678
|
"show-header": ""
|
|
679
679
|
}, null, 8, ["chat-controller", "bot"]))], 64)) : T.value === "info" ? (A(), g(de, {
|
|
680
680
|
key: 1,
|
|
681
|
-
bot:
|
|
681
|
+
bot: n.bot,
|
|
682
682
|
"is-online": R.value
|
|
683
683
|
}, null, 8, ["bot", "is-online"])) : _("", !0)])]))], 64))], 2)], 14, Fe)) : m.value ? (A(), v("div", Ye, [y("div", Xe, [
|
|
684
684
|
r[12] || (r[12] = y("div", { class: "flex justify-center" }, [y("div", { class: "rounded-full bg-red-500/20 flex items-center justify-center size-10" }, [y("i", { class: "i-tabler-alert-circle size-6 text-red-400" })])], -1)),
|
|
685
685
|
r[13] || (r[13] = y("h3", { class: "text-lg font-medium" }, " Bot Error ", -1)),
|
|
686
686
|
y("p", Ze, P(m.value), 1)
|
|
687
687
|
])])) : (A(), v("div", Qe, " Couldn't load your assistant. Please try again later. ")),
|
|
688
|
-
|
|
688
|
+
n.chatOnly ? _("", !0) : (A(), g(Ne, {
|
|
689
689
|
key: 4,
|
|
690
690
|
modelValue: d.value,
|
|
691
691
|
"onUpdate:modelValue": r[5] || (r[5] = (e) => d.value = e),
|
|
692
|
-
bot:
|
|
693
|
-
sdk:
|
|
694
|
-
title:
|
|
692
|
+
bot: n.bot,
|
|
693
|
+
sdk: n.sdk,
|
|
694
|
+
title: n.bot.displayName.value,
|
|
695
695
|
"data-test": "bot-sidebar"
|
|
696
696
|
}, null, 8, [
|
|
697
697
|
"modelValue",
|
|
@@ -699,11 +699,11 @@ var B = [
|
|
|
699
699
|
"sdk",
|
|
700
700
|
"title"
|
|
701
701
|
])),
|
|
702
|
-
|
|
702
|
+
n.chatOnly ? _("", !0) : (A(), g(Me, {
|
|
703
703
|
key: 5,
|
|
704
704
|
modelValue: p.value,
|
|
705
705
|
"onUpdate:modelValue": r[6] || (r[6] = (e) => p.value = e),
|
|
706
|
-
"chat-controller":
|
|
706
|
+
"chat-controller": c.value,
|
|
707
707
|
"data-test": "bot-mode-sidebar"
|
|
708
708
|
}, null, 8, ["modelValue", "chat-controller"]))
|
|
709
709
|
]));
|
|
@@ -733,7 +733,7 @@ var B = [
|
|
|
733
733
|
],
|
|
734
734
|
setup(e, { emit: t }) {
|
|
735
735
|
let n = e, r = t;
|
|
736
|
-
return (e, t) => (A(), g(
|
|
736
|
+
return (e, t) => (A(), g(c, T(n, { class: "bot-provider size-full relative" }), {
|
|
737
737
|
default: L((i) => [S($, {
|
|
738
738
|
sdk: i.sdk,
|
|
739
739
|
bot: i.bot,
|