@pagelines/sdk 1.0.932 → 1.0.934

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.
@@ -1,10 +1,10 @@
1
1
  import "./rolldown-runtime.js";
2
2
  import { SOCIAL_PLATFORMS as e } from "./constants.js";
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
- import { Bot as d, getColorSchemeOklch as ee } from "@pagelines/core";
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";
3
+ import { _ as t, d as n, f as r, g as i, m as a, n as o, p as s, t as c, v as ee, y as te } from "./BotWrap.js";
4
+ import { Bot as l, getColorSchemeOklch as ne } from "@pagelines/core";
5
+ import { Fragment as u, Transition as d, TransitionGroup as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createSlots as v, createTextVNode as y, createVNode as b, defineComponent as x, guardReactiveProps as S, mergeProps as C, normalizeClass as w, normalizeProps as T, normalizeStyle as E, onMounted as D, onUnmounted as re, openBlock as O, ref as k, renderList as A, renderSlot as j, shallowRef as M, toDisplayString as N, unref as P, watch as F, withCtx as I, withKeys as L, withModifiers as R } from "vue";
6
6
  // bot/schema.ts
7
- var B = [
7
+ var z = [
8
8
  {
9
9
  mode: "self",
10
10
  label: "Overview",
@@ -25,7 +25,7 @@ var B = [
25
25
  label: "About",
26
26
  icon: "i-tabler-user-circle"
27
27
  }
28
- ], V = /* @__PURE__ */ C({
28
+ ], B = /* @__PURE__ */ x({
29
29
  __name: "EffectTransitionList",
30
30
  props: {
31
31
  disabled: {
@@ -35,41 +35,41 @@ var B = [
35
35
  mode: { default: "block" }
36
36
  },
37
37
  setup(e) {
38
- return (t, n) => (A(), g(m, { name: e.disabled ? "" : "nlist" }, {
39
- default: L(() => [N(t.$slots, "default")]),
38
+ return (t, n) => (O(), m(f, { name: e.disabled ? "" : "nlist" }, {
39
+ default: I(() => [j(t.$slots, "default")]),
40
40
  _: 3
41
41
  }, 8, ["name"]));
42
42
  }
43
- }), H = ["data-test-mode"], U = { class: "w-full max-w-xs space-y-12" }, W = {
43
+ }), V = ["data-test-mode"], H = { class: "w-full max-w-xs space-y-12" }, U = {
44
44
  key: 0,
45
45
  class: "text-xs text-theme-400 text-center"
46
- }, G = { class: "text-base font-light text-white text-center" }, K = { class: "space-y-6 relative" }, q = {
46
+ }, W = { class: "text-base font-light text-white text-center" }, G = { class: "space-y-6 relative" }, K = {
47
47
  key: "email-field",
48
48
  class: "w-full"
49
- }, re = {
49
+ }, q = {
50
50
  key: "code-field",
51
51
  class: "w-full"
52
- }, J = /* @__PURE__ */ C({
52
+ }, J = /* @__PURE__ */ x({
53
53
  __name: "ElAuthGate",
54
54
  props: { sdk: {} },
55
55
  setup(e) {
56
- let t = j({
56
+ let t = k({
57
57
  email: "",
58
58
  code: ""
59
- }), i = j("email"), a = j(!1), o = {
59
+ }), n = k("email"), i = k(!1), o = {
60
60
  email: {
61
61
  title: "Enter Your Email",
62
62
  button: {
63
63
  label: "Continue",
64
- disabled: () => !t.value.email || a.value
64
+ disabled: () => !t.value.email || i.value
65
65
  },
66
66
  action: async () => {
67
- if (!a.value) {
68
- a.value = !0;
67
+ if (!i.value) {
68
+ i.value = !0;
69
69
  try {
70
- await e.sdk.auth.requestAuthCode({ email: t.value.email }) && (i.value = "code");
70
+ await e.sdk.auth.requestAuthCode({ email: t.value.email }) && (n.value = "code");
71
71
  } finally {
72
- a.value = !1;
72
+ i.value = !1;
73
73
  }
74
74
  }
75
75
  }
@@ -78,49 +78,49 @@ var B = [
78
78
  title: "Enter Verification Code",
79
79
  button: {
80
80
  label: "Verify",
81
- disabled: () => t.value.code.length !== 6 || a.value
81
+ disabled: () => t.value.code.length !== 6 || i.value
82
82
  },
83
83
  action: async () => {
84
- if (!a.value) {
85
- a.value = !0;
84
+ if (!i.value) {
85
+ i.value = !0;
86
86
  try {
87
87
  await e.sdk.auth.loginWithCode({
88
88
  email: t.value.email,
89
89
  code: t.value.code
90
90
  });
91
91
  } finally {
92
- a.value = !1;
92
+ i.value = !1;
93
93
  }
94
94
  }
95
95
  }
96
96
  }
97
- }, c = h(() => o[i.value]);
98
- return I(() => e.sdk.activeUser.value, (e) => {
99
- e && i.value === "code" && console.log("[ElAuthGate] Authentication successful", { email: e.email });
100
- }), (a, o) => (A(), v("div", {
97
+ }, c = p(() => o[n.value]);
98
+ return F(() => e.sdk.activeUser.value, (e) => {
99
+ e && n.value === "code" && console.log("[ElAuthGate] Authentication successful", { email: e.email });
100
+ }), (i, o) => (O(), g("div", {
101
101
  "data-test": "auth-form",
102
- "data-test-mode": i.value,
102
+ "data-test-mode": n.value,
103
103
  class: "flex flex-col items-center justify-center h-full p-6"
104
- }, [y("div", U, [
105
- e.sdk.error.value ? (A(), v("p", W, P(e.sdk.error.value), 1)) : _("", !0),
106
- y("h3", G, P(c.value.title), 1),
107
- y("div", K, [S(V, null, {
108
- default: L(() => [i.value === "email" ? (A(), v("div", q, [S(r, {
104
+ }, [_("div", H, [
105
+ e.sdk.error.value ? (O(), g("p", U, N(e.sdk.error.value), 1)) : h("", !0),
106
+ _("h3", W, N(c.value.title), 1),
107
+ _("div", G, [b(B, null, {
108
+ default: I(() => [n.value === "email" ? (O(), g("div", K, [b(s, {
109
109
  modelValue: t.value.email,
110
110
  "onUpdate:modelValue": o[0] || (o[0] = (e) => t.value.email = e),
111
111
  "data-test": "auth-email-input",
112
- onKeyup: R(c.value.action, ["enter"])
113
- }, null, 8, ["modelValue", "onKeyup"])])) : (A(), v("div", re, [S(n, {
112
+ onKeyup: L(c.value.action, ["enter"])
113
+ }, null, 8, ["modelValue", "onKeyup"])])) : (O(), g("div", q, [b(r, {
114
114
  modelValue: t.value.code,
115
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
119
  onAutoSubmit: c.value.action
120
- }, null, 8, ["modelValue", "onAutoSubmit"])])), (A(), v("div", {
120
+ }, null, 8, ["modelValue", "onAutoSubmit"])])), (O(), g("div", {
121
121
  key: c.value.button.label,
122
122
  class: "space-y-4 w-full"
123
- }, [S(s, {
123
+ }, [b(a, {
124
124
  theme: "primary",
125
125
  size: "md",
126
126
  class: "w-full",
@@ -129,20 +129,20 @@ var B = [
129
129
  disabled: c.value.button.disabled() || e.sdk.loading.value,
130
130
  onClick: c.value.action
131
131
  }, {
132
- default: L(() => [x(P(c.value.button.label), 1)]),
132
+ default: I(() => [y(N(c.value.button.label), 1)]),
133
133
  _: 1
134
134
  }, 8, [
135
135
  "loading",
136
136
  "disabled",
137
137
  "onClick"
138
- ]), i.value === "code" ? (A(), v("button", {
138
+ ]), n.value === "code" ? (O(), g("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) => i.value = "email")
142
- }, " Change Email ")) : _("", !0)]))]),
141
+ onClick: o[2] || (o[2] = (e) => n.value = "email")
142
+ }, " Change Email ")) : h("", !0)]))]),
143
143
  _: 1
144
144
  })])
145
- ])], 8, H));
145
+ ])], 8, V));
146
146
  }
147
147
  }), Y = { class: "flex-1 flex flex-col min-h-0 py-6 space-y-6 h-full overflow-scroll [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden relative" }, X = { class: "flex-1 space-y-6 pb-12" }, ie = {
148
148
  key: 0,
@@ -153,7 +153,7 @@ var B = [
153
153
  }, se = ["href"], ce = {
154
154
  key: 2,
155
155
  class: "space-y-3"
156
- }, le = { class: "grid grid-cols-2 gap-3" }, ue = ["href"], de = /* @__PURE__ */ C({
156
+ }, le = { class: "grid grid-cols-2 gap-3" }, ue = ["href"], de = /* @__PURE__ */ x({
157
157
  __name: "ElBotAbout",
158
158
  props: {
159
159
  bot: {},
@@ -163,30 +163,30 @@ var B = [
163
163
  }
164
164
  },
165
165
  setup(t) {
166
- return (n, r) => (A(), v("div", Y, [S(l, {
166
+ return (r, i) => (O(), g("div", Y, [b(n, {
167
167
  bot: t.bot,
168
168
  "is-online": t.isOnline
169
- }, null, 8, ["bot", "is-online"]), y("div", X, [
170
- t.bot.summary.value ? (A(), v("div", ie, [r[0] || (r[0] = y("h3", { class: "font-medium text-white/50" }, " About ", -1)), y("p", ae, P(t.bot.summary.value), 1)])) : _("", !0),
171
- t.bot.email.value ? (A(), v("div", oe, [r[2] || (r[2] = y("h3", { class: "text-sm font-medium text-white/90" }, " Contact ", -1)), y("a", {
169
+ }, null, 8, ["bot", "is-online"]), _("div", X, [
170
+ t.bot.summary.value ? (O(), g("div", ie, [i[0] || (i[0] = _("h3", { class: "font-medium text-white/50" }, " About ", -1)), _("p", ae, N(t.bot.summary.value), 1)])) : h("", !0),
171
+ t.bot.email.value ? (O(), g("div", oe, [i[2] || (i[2] = _("h3", { class: "text-sm font-medium text-white/90" }, " Contact ", -1)), _("a", {
172
172
  href: `mailto:${t.bot.email.value}`,
173
173
  target: "_blank",
174
174
  rel: "noopener noreferrer",
175
175
  class: "relative inline-flex items-center justify-center gap-2 rounded-full px-4 py-2 font-medium transition-colors duration-200 focus:outline-none active:opacity-80 cursor-pointer bg-white/5 hover:bg-white/10 border border-white/10 text-white/80 text-sm justify-start h-10 w-full"
176
- }, [...r[1] || (r[1] = [y("span", { class: "i-heroicons-envelope flex items-center size-[1.1em] mt-[-.07em]" }, null, -1), x(" Email ", -1)])], 8, se)])) : _("", !0),
177
- t.bot.accounts.value && t.bot.accounts.value.length > 0 ? (A(), v("div", ce, [r[3] || (r[3] = y("h3", { class: "text-sm font-medium text-white/90" }, " Links ", -1)), y("div", le, [(A(!0), v(f, null, M(t.bot.accounts.value, (t) => (A(), v("a", {
176
+ }, [...i[1] || (i[1] = [_("span", { class: "i-heroicons-envelope flex items-center size-[1.1em] mt-[-.07em]" }, null, -1), y(" Email ", -1)])], 8, se)])) : h("", !0),
177
+ t.bot.accounts.value && t.bot.accounts.value.length > 0 ? (O(), g("div", ce, [i[3] || (i[3] = _("h3", { class: "text-sm font-medium text-white/90" }, " Links ", -1)), _("div", le, [(O(!0), g(u, null, A(t.bot.accounts.value, (t) => (O(), g("a", {
178
178
  key: `${t.platform}-${t.handle}`,
179
- href: F(e)[t.platform].getUrl(t.handle),
179
+ href: P(e)[t.platform].getUrl(t.handle),
180
180
  target: "_blank",
181
181
  rel: "noopener noreferrer",
182
182
  class: "relative inline-flex items-center justify-center gap-2 rounded-full px-4 py-2 font-medium transition-colors duration-200 focus:outline-none active:opacity-80 cursor-pointer bg-white/10 hover:bg-white/20 border border-white/20 text-white/80 text-sm"
183
- }, [y("span", { class: E(["flex items-center size-[1.1em] mt-[-.07em]", F(e)[t.platform].icon]) }, null, 2), x(" " + P(F(e)[t.platform].label), 1)], 8, ue))), 128))])])) : _("", !0)
183
+ }, [_("span", { class: w(["flex items-center size-[1.1em] mt-[-.07em]", P(e)[t.platform].icon]) }, null, 2), y(" " + N(P(e)[t.platform].label), 1)], 8, ue))), 128))])])) : h("", !0)
184
184
  ])]));
185
185
  }
186
186
  }), fe = { class: "flex flex-col items-center text-center gap-4" }, pe = { class: "relative flex-shrink-0" }, me = { class: "w-20 h-20 sm:w-24 sm:h-24 rounded-full overflow-hidden border-4 border-white" }, he = ["src", "alt"], ge = { class: "absolute top-1.5 right-1.5" }, _e = {
187
187
  key: 1,
188
188
  class: "size-4 bg-theme-400 rounded-full ring-2 ring-white"
189
- }, ve = { class: "min-w-0" }, ye = { class: "text-3xl font-light text-white mb-2 truncate" }, be = { class: "text-base font-light text-white/60 line-clamp-1" }, xe = /* @__PURE__ */ C({
189
+ }, ve = { class: "min-w-0" }, ye = { class: "text-3xl font-light text-white mb-2 truncate" }, be = { class: "text-base font-light text-white/60 line-clamp-1" }, xe = /* @__PURE__ */ x({
190
190
  __name: "ElBotHeader",
191
191
  props: {
192
192
  bot: {},
@@ -196,37 +196,37 @@ var B = [
196
196
  }
197
197
  },
198
198
  setup(e) {
199
- return (t, n) => (A(), v("div", fe, [y("div", pe, [y("div", me, [y("img", {
199
+ return (t, n) => (O(), g("div", fe, [_("div", pe, [_("div", me, [_("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: 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", {
203
+ onError: n[0] || (n[0] = (...e) => P(i) && P(i)(...e))
204
+ }, null, 40, he)]), _("div", ge, [e.isOnline ? (O(), g(u, { key: 0 }, [n[1] || (n[1] = _("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)), 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)])]));
207
+ }, null, -1)), n[2] || (n[2] = _("div", { class: "size-4 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))], 64)) : (O(), g("div", _e))])]), _("div", ve, [_("h1", ye, N(e.bot.displayName.value), 1), _("p", be, N(e.bot.title.value), 1)])]));
208
208
  }
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({
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__ */ x({
210
210
  name: "SelfSidebarClose",
211
211
  __name: "BotSidebarClose",
212
212
  emits: ["click"],
213
213
  setup(e) {
214
- let t = j(!1);
215
- return k(() => {
214
+ let t = k(!1);
215
+ return D(() => {
216
216
  setTimeout(() => {
217
217
  t.value = !0;
218
218
  }, 100);
219
- }), (e, n) => (A(), v("a", {
219
+ }), (e, n) => (O(), g("a", {
220
220
  class: "close block cursor-pointer w-[60px] h-[60px] rounded-full transition-all duration-1000 ease-[cubic-bezier(0.25,1,0.33,1)] hover:scale-110 active:scale-90 hover:rotate-90",
221
221
  onClick: n[0] || (n[0] = (t) => e.$emit("click", t))
222
- }, [n[1] || (n[1] = y("span", { class: "absolute inset-0 rounded-full transition-all" }, null, -1)), y("span", Se, [y("span", {
223
- class: E(["absolute h-full w-[3px] rounded-[5px] left-[13px] transition-all duration-[400ms] ease-[cubic-bezier(0.52,0.01,0.16,1)]", t.value ? "translate-y-0 translate-x-0 rotate-45" : "translate-y-[30px] -translate-x-[30px] rotate-0"]),
222
+ }, [n[1] || (n[1] = _("span", { class: "absolute inset-0 rounded-full transition-all" }, null, -1)), _("span", Se, [_("span", {
223
+ class: w(["absolute h-full w-[3px] rounded-[5px] left-[13px] transition-all duration-[400ms] ease-[cubic-bezier(0.52,0.01,0.16,1)]", t.value ? "translate-y-0 translate-x-0 rotate-45" : "translate-y-[30px] -translate-x-[30px] rotate-0"]),
224
224
  style: {
225
225
  "background-color": "currentColor",
226
226
  "transition-delay": "0.15s"
227
227
  }
228
- }, null, 2), y("span", {
229
- class: E(["absolute h-full w-[3px] rounded-[5px] left-[13px] transition-all duration-[400ms] ease-[cubic-bezier(0.52,0.01,0.16,1)]", t.value ? "translate-y-0 translate-x-0 -rotate-45" : "-translate-y-[30px] -translate-x-[30px] rotate-0"]),
228
+ }, null, 2), _("span", {
229
+ class: w(["absolute h-full w-[3px] rounded-[5px] left-[13px] transition-all duration-[400ms] ease-[cubic-bezier(0.52,0.01,0.16,1)]", t.value ? "translate-y-0 translate-x-0 -rotate-45" : "-translate-y-[30px] -translate-x-[30px] rotate-0"]),
230
230
  style: {
231
231
  "background-color": "currentColor",
232
232
  "transition-delay": "0.45s"
@@ -242,7 +242,7 @@ var B = [
242
242
  }, De = ["disabled", "onClick"], Oe = { class: "flex items-center gap-3" }, ke = { class: "flex-1" }, Ae = {
243
243
  key: 0,
244
244
  class: "text-xs text-white/50 mt-0.5"
245
- }, je = { class: "p-6" }, Z = /* @__PURE__ */ C({
245
+ }, je = { class: "p-6" }, Z = /* @__PURE__ */ x({
246
246
  name: "ElSidebar",
247
247
  inheritAttrs: !1,
248
248
  __name: "ElSidebar",
@@ -255,17 +255,17 @@ var B = [
255
255
  },
256
256
  emits: ["update:modelValue"],
257
257
  setup(e, { emit: t }) {
258
- let n = e, r = t, i = n.position || "left", a = n.widthClasses || "w-[80%] max-w-[300px]", o = h({
258
+ let n = e, r = t, i = n.position || "left", a = n.widthClasses || "w-[80%] max-w-[300px]", o = p({
259
259
  get: () => n.modelValue,
260
260
  set: (e) => r("update:modelValue", e)
261
- }), s = h(() => n.items.filter((e) => !e.isHidden));
261
+ }), s = p(() => n.items.filter((e) => !e.isHidden));
262
262
  function handleItemClick(e) {
263
263
  e.isDisabled || (e.onClick ? e.onClick({
264
264
  item: e,
265
265
  event: new MouseEvent("click")
266
266
  }) : e.href && (e.href.includes("http") ? window.open(e.href, e.target || "_self")?.focus() : window.location.href = e.href), o.value = !1);
267
267
  }
268
- let c = h(() => i === "left" ? {
268
+ let c = p(() => i === "left" ? {
269
269
  enter: "-translate-x-full",
270
270
  leave: "-translate-x-full",
271
271
  position: "justify-start",
@@ -276,7 +276,7 @@ var B = [
276
276
  position: "justify-end",
277
277
  closeButton: "-left-16"
278
278
  });
279
- return (t, n) => (A(), v(f, null, [S(p, {
279
+ return (t, n) => (O(), g(u, null, [b(d, {
280
280
  "enter-active-class": "transition-opacity duration-300 ease-out",
281
281
  "leave-active-class": "transition-opacity duration-200 ease-in",
282
282
  "enter-from-class": "opacity-0",
@@ -284,13 +284,13 @@ var B = [
284
284
  "leave-from-class": "opacity-100",
285
285
  "leave-to-class": "opacity-0"
286
286
  }, {
287
- default: L(() => [o.value ? (A(), v("div", {
287
+ default: I(() => [o.value ? (O(), g("div", {
288
288
  key: 0,
289
289
  class: "absolute inset-0 z-40 bg-black/50 backdrop-blur-sm",
290
290
  onClick: n[0] || (n[0] = (e) => o.value = !1)
291
- })) : _("", !0)]),
291
+ })) : h("", !0)]),
292
292
  _: 1
293
- }), S(p, {
293
+ }), b(d, {
294
294
  "enter-active-class": "transition-all duration-500 ease-[cubic-bezier(0.25,1,0.33,1)]",
295
295
  "leave-active-class": "transition-all duration-400 ease-[cubic-bezier(0.25,1,0.33,1)]",
296
296
  "enter-from-class": c.value.enter,
@@ -298,49 +298,49 @@ var B = [
298
298
  "leave-from-class": "translate-x-0",
299
299
  "leave-to-class": c.value.leave
300
300
  }, {
301
- default: L(() => [o.value ? (A(), v("div", {
301
+ default: I(() => [o.value ? (O(), g("div", {
302
302
  key: 0,
303
- class: E(["absolute inset-0 z-50 flex", c.value.position]),
303
+ class: w(["absolute inset-0 z-50 flex", c.value.position]),
304
304
  onClick: n[3] || (n[3] = (e) => o.value = !1)
305
- }, [y("div", {
306
- class: E(["relative h-full shadow-2xl bg-black/30 backdrop-blur-xl flex flex-col justify-center", F(a)]),
307
- onClick: n[2] || (n[2] = z(() => {}, ["stop"]))
305
+ }, [_("div", {
306
+ class: w(["relative h-full shadow-2xl bg-black/30 backdrop-blur-xl flex flex-col justify-center", P(a)]),
307
+ onClick: n[2] || (n[2] = R(() => {}, ["stop"]))
308
308
  }, [
309
- S(Ce, {
310
- class: E(["absolute top-4 z-10 text-white", c.value.closeButton]),
309
+ b(Ce, {
310
+ class: w(["absolute top-4 z-10 text-white", c.value.closeButton]),
311
311
  onClick: n[1] || (n[1] = (e) => o.value = !1)
312
312
  }, null, 8, ["class"]),
313
- e.title ? (A(), v("div", we, [y("h3", Te, P(e.title), 1)])) : _("", !0),
314
- t.$slots.header ? (A(), v("div", Ee, [N(t.$slots, "header")])) : _("", !0),
315
- y("div", { class: E(["flex-1 p-6 space-y-2 overflow-y-auto", {
313
+ e.title ? (O(), g("div", we, [_("h3", Te, N(e.title), 1)])) : h("", !0),
314
+ t.$slots.header ? (O(), g("div", Ee, [j(t.$slots, "header")])) : h("", !0),
315
+ _("div", { class: w(["flex-1 p-6 space-y-2 overflow-y-auto", {
316
316
  "pt-6": !e.title && !t.$slots.header,
317
317
  "pt-4": e.title || t.$slots.header
318
- }]) }, [S(m, {
318
+ }]) }, [b(f, {
319
319
  "enter-active-class": "transition-all duration-400 ease-[cubic-bezier(0.25,1,0.33,1)]",
320
320
  "leave-active-class": "transition-all duration-200 ease-[cubic-bezier(0.25,1,0.33,1)]",
321
- "enter-from-class": F(i) === "left" ? "-translate-x-4 opacity-0" : "translate-x-4 opacity-0",
321
+ "enter-from-class": P(i) === "left" ? "-translate-x-4 opacity-0" : "translate-x-4 opacity-0",
322
322
  "enter-to-class": "translate-x-0 opacity-100",
323
323
  "leave-from-class": "translate-x-0 opacity-100",
324
- "leave-to-class": F(i) === "left" ? "-translate-x-4 opacity-0" : "translate-x-4 opacity-0"
324
+ "leave-to-class": P(i) === "left" ? "-translate-x-4 opacity-0" : "translate-x-4 opacity-0"
325
325
  }, {
326
- default: L(() => [(A(!0), v(f, null, M(s.value, (e, t) => (A(), v("button", {
326
+ default: I(() => [(O(!0), g(u, null, A(s.value, (e, t) => (O(), g("button", {
327
327
  key: e.key || e.label || t,
328
- style: O({ transitionDelay: `${t * 40}ms` }),
329
- class: E(["cursor-pointer w-full text-left p-3 rounded-xl transition-all duration-200 ease-[cubic-bezier(0.25,1,0.33,1)] group", [e.isActive ? "bg-primary-500/20 border border-primary-500/40" : "hover:bg-white/10", e.isDisabled && "opacity-50 cursor-not-allowed"]]),
328
+ style: E({ transitionDelay: `${t * 40}ms` }),
329
+ class: w(["cursor-pointer w-full text-left p-3 rounded-xl transition-all duration-200 ease-[cubic-bezier(0.25,1,0.33,1)] group", [e.isActive ? "bg-primary-500/20 border border-primary-500/40" : "hover:bg-white/10", e.isDisabled && "opacity-50 cursor-not-allowed"]]),
330
330
  disabled: e.isDisabled,
331
331
  onClick: (t) => handleItemClick(e)
332
- }, [y("div", Oe, [e.icon?.src ? (A(), v("i", {
332
+ }, [_("div", Oe, [e.icon?.src ? (O(), g("i", {
333
333
  key: 0,
334
- class: E(["size-5 flex-shrink-0 transition-transform duration-200 ease-[cubic-bezier(0.25,1,0.33,1)] group-hover:scale-110", [e.icon.src, e.isActive ? "text-primary-400" : "text-white/70 group-hover:text-white"]])
335
- }, null, 2)) : _("", !0), y("div", ke, [y("div", { class: E(["font-medium text-sm", e.isActive ? "text-primary-300" : "text-white"]) }, P(e.label), 3), e.subLabel ? (A(), v("div", Ae, P(e.subLabel), 1)) : _("", !0)])])], 14, De))), 128))]),
334
+ class: w(["size-5 flex-shrink-0 transition-transform duration-200 ease-[cubic-bezier(0.25,1,0.33,1)] group-hover:scale-110", [e.icon.src, e.isActive ? "text-primary-400" : "text-white/70 group-hover:text-white"]])
335
+ }, null, 2)) : h("", !0), _("div", ke, [_("div", { class: w(["font-medium text-sm", e.isActive ? "text-primary-300" : "text-white"]) }, N(e.label), 3), e.subLabel ? (O(), g("div", Ae, N(e.subLabel), 1)) : h("", !0)])])], 14, De))), 128))]),
336
336
  _: 1
337
337
  }, 8, ["enter-from-class", "leave-to-class"])], 2),
338
- y("div", je, [N(t.$slots, "footer")])
339
- ], 2)], 2)) : _("", !0)]),
338
+ _("div", je, [j(t.$slots, "footer")])
339
+ ], 2)], 2)) : h("", !0)]),
340
340
  _: 3
341
341
  }, 8, ["enter-from-class", "leave-to-class"])], 64));
342
342
  }
343
- }), Me = /* @__PURE__ */ C({
343
+ }), Me = /* @__PURE__ */ x({
344
344
  name: "BotModeSidebar",
345
345
  __name: "ElBotModeSidebar",
346
346
  props: {
@@ -349,10 +349,10 @@ var B = [
349
349
  },
350
350
  emits: ["update:modelValue"],
351
351
  setup(e, { emit: t }) {
352
- let n = e, r = t, i = h({
352
+ let n = e, r = t, i = p({
353
353
  get: () => n.modelValue,
354
354
  set: (e) => r("update:modelValue", e)
355
- }), a = h(() => n.chatController?.botMode?.value ?? "self"), o = h(() => B.map((e) => ({
355
+ }), a = p(() => n.chatController?.botMode?.value ?? "self"), o = p(() => z.map((e) => ({
356
356
  key: e.mode,
357
357
  icon: { src: e.icon },
358
358
  label: e.label,
@@ -361,7 +361,7 @@ var B = [
361
361
  n.chatController?.setMode(e.mode);
362
362
  }
363
363
  })));
364
- return (e, t) => (A(), g(Z, {
364
+ return (e, t) => (O(), m(Z, {
365
365
  modelValue: i.value,
366
366
  "onUpdate:modelValue": t[0] || (t[0] = (e) => i.value = e),
367
367
  items: o.value,
@@ -370,7 +370,7 @@ var B = [
370
370
  "width-classes": "w-[80%] max-w-[255px]"
371
371
  }, null, 8, ["modelValue", "items"]));
372
372
  }
373
- }), Ne = /* @__PURE__ */ C({
373
+ }), Ne = /* @__PURE__ */ x({
374
374
  name: "BotSidebar",
375
375
  __name: "ElBotSidebar",
376
376
  props: {
@@ -381,10 +381,10 @@ var B = [
381
381
  },
382
382
  emits: ["update:modelValue"],
383
383
  setup(e, { emit: t }) {
384
- let n = e, r = t, i = h({
384
+ let n = e, r = t, i = p({
385
385
  get: () => n.modelValue,
386
386
  set: (e) => r("update:modelValue", e)
387
- }), a = h(() => {
387
+ }), a = p(() => {
388
388
  let e = [
389
389
  {
390
390
  key: "share",
@@ -423,7 +423,7 @@ var B = [
423
423
  }
424
424
  }), e;
425
425
  });
426
- return (t, n) => (A(), g(Z, {
426
+ return (t, n) => (O(), m(Z, {
427
427
  modelValue: i.value,
428
428
  "onUpdate:modelValue": n[0] || (n[0] = (e) => i.value = e),
429
429
  items: a.value,
@@ -465,7 +465,7 @@ var B = [
465
465
  }, Xe = { class: "text-center max-w-md space-y-4" }, Ze = { class: "text-sm text-white/70 leading-relaxed" }, Qe = {
466
466
  key: 3,
467
467
  class: "bg-white/10 backdrop-blur-sm text-white/70 flex items-center justify-center h-full"
468
- }, $ = /* @__PURE__ */ C({
468
+ }, $ = /* @__PURE__ */ x({
469
469
  __name: "BotChat",
470
470
  props: {
471
471
  sdk: {},
@@ -508,19 +508,19 @@ var B = [
508
508
  "turnStarted",
509
509
  "turnCompleted"
510
510
  ],
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));
511
+ setup(r, { emit: i }) {
512
+ let s = i, c = M(), l = k(!1), d = k(!1), f = k(), x = k(), C = p(() => c.value?.botMode?.value ?? "self"), L = p(() => c.value?.textState.value.isConnected ?? !1), B = p(() => r.sdk.activeUser.value !== void 0), V = p(() => z.find((e) => e.mode === C.value));
513
513
  function createChatController() {
514
514
  c.value && c.value.destroy();
515
515
  try {
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)
516
+ c.value = new ee({
517
+ sdk: r.sdk,
518
+ bot: r.bot,
519
+ context: r.context,
520
+ firstMessage: r.firstMessage,
521
+ ...r.createVoiceClientFn ? { createVoiceClientFn: r.createVoiceClientFn } : {},
522
+ onTurnStarted: () => s("turnStarted"),
523
+ onTurnCompleted: (e) => s("turnCompleted", e)
524
524
  });
525
525
  } catch (e) {
526
526
  throw console.error("BotChatController creation failed:", e), e;
@@ -530,104 +530,104 @@ 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, a("error", t);
533
+ f.value = t, s("error", t);
534
534
  }
535
535
  function applyTheme(e) {
536
- if (!C.value) return;
537
- let t = ee(e);
536
+ if (!x.value) return;
537
+ let t = ne(e);
538
538
  Object.entries(t).forEach(([e, t]) => {
539
- C.value.style.setProperty(`--primary-${e}`, t);
539
+ x.value.style.setProperty(`--primary-${e}`, t);
540
540
  });
541
541
  }
542
- k(() => {
542
+ D(() => {
543
543
  try {
544
- applyTheme(n.theme), n.chatOnly && c.value && c.value.setMode("chat");
544
+ applyTheme(r.theme), r.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, a("error", t);
547
+ f.value = t, s("error", t);
548
548
  }
549
- }), te(() => {
549
+ }), re(() => {
550
550
  c.value && c.value.destroy();
551
- }), I(() => n.theme, (e) => {
551
+ }), F(() => r.theme, (e) => {
552
552
  applyTheme(e);
553
- }), I(() => n.sdk.activeUser.value, (e, t) => {
553
+ }), F(() => r.sdk.activeUser.value, (e, t) => {
554
554
  t && !e && c.value && c.value.setMode("self");
555
555
  });
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
- let e = [U.value ? "backdrop-blur-sm" : ""];
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
- }), G = {
556
+ let H = p(() => !!(r.bot.cover.value?.src && r.bot.cover.value?.quality === "low") || !!(r.bot.avatar.value?.src && r.bot.avatar.value?.quality === "low")), U = p(() => {
557
+ let e = [H.value ? "backdrop-blur-sm" : ""];
558
+ return H.value && C.value === "self" ? e.push("from-black/80 via-black/60 to-black/80") : C.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
+ }), W = {
560
560
  phone: "i-heroicons-phone",
561
561
  calendar: "i-heroicons-calendar",
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(() => 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", {
565
+ }, G = p(() => t({
566
+ template: r.buttonText || "Talk to {name}",
567
+ bot: r.bot.toData()
568
+ })), K = p(() => W[r.buttonIcon || "phone"] || W.phone);
569
+ return (t, i) => (O(), g("div", {
570
570
  ref_key: "rootElement",
571
- ref: C,
572
- key: n.bot.avatarUrl.value,
571
+ ref: x,
572
+ key: r.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
- n.loading ? (A(), v("div", Pe, [S(u, { class: "text-white size-8" })])) : n.bot && !m.value ? (A(), v("div", {
576
+ r.loading ? (O(), g("div", Pe, [b(te, { class: "text-white size-8" })])) : r.bot && !f.value ? (O(), g("div", {
577
577
  key: 1,
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", {
578
+ class: w(["absolute inset-0", r.bare ? "" : "bg-cover bg-center bg-no-repeat"]),
579
+ style: E(r.bare ? void 0 : { backgroundImage: `url(${r.bot.avatarUrl.value})` }),
580
+ "data-quality": r.bot.avatar.value?.quality || "none"
581
+ }, [r.bare ? h("", !0) : (O(), g("div", {
582
582
  key: 0,
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", n.isActive ? "opacity-100 translate-y-0" : "opacity-0 translate-y-2"]) }, [!n.bare || n.hasClose ? (A(), v("div", {
583
+ class: w(["absolute inset-0 bg-gradient-to-br z-0", U.value])
584
+ }, null, 2)), _("div", { class: w(["relative z-10 flex flex-col h-full transition-all duration-500 ease-[cubic-bezier(0.25,1,0.33,1)] will-change-transform", r.isActive ? "opacity-100 translate-y-0" : "opacity-0 translate-y-2"]) }, [!r.bare || r.hasClose ? (O(), g("div", {
585
585
  key: 0,
586
- class: E(["relative z-30 p-2", !n.bare && T.value !== "self" ? "backdrop-blur-lg" : ""])
587
- }, [n.chatOnly ? (A(), v("div", {
586
+ class: w(["relative z-30 p-2", !r.bare && C.value !== "self" ? "backdrop-blur-lg" : ""])
587
+ }, [r.chatOnly ? (O(), g("div", {
588
588
  key: 0,
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,
589
+ class: w(["flex items-center", r.bare ? "justify-end" : ""])
590
+ }, [r.bare ? h("", !0) : (O(), g("div", Ie, [_("img", {
591
+ src: r.bot.avatarUrl.value,
592
+ alt: r.bot.displayName.value,
593
593
  class: "size-8 rounded-full object-cover"
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
- }, [...r[7] || (r[7] = [y("i", { class: "size-6 i-tabler-x" }, null, -1)])], 2)])) : _("", !0)], 2)) : (A(), v("div", {
594
+ }, null, 8, Le), _("span", Re, N(r.bot.displayName.value), 1)])), r.hasClose ? (O(), g("div", ze, [_("button", {
595
+ class: w(["flex cursor-pointer items-center rounded-2xl p-3 transition-colors", r.bare ? "text-theme-500 hover:bg-theme-50" : "text-white/70 hover:bg-white/10"]),
596
+ onClick: i[0] || (i[0] = R((e) => s("close", "button"), ["stop"]))
597
+ }, [...i[7] || (i[7] = [_("i", { class: "size-6 i-tabler-x" }, null, -1)])], 2)])) : h("", !0)], 2)) : (O(), g("div", {
598
598
  key: 1,
599
- class: E(["flex items-center", n.hasClose ? "" : "justify-between"])
599
+ class: w(["flex items-center", r.hasClose ? "" : "justify-between"])
600
600
  }, [
601
- y("div", { class: E(n.hasClose ? "flex-1 basis-0" : "") }, [y("button", {
601
+ _("div", { class: w(r.hasClose ? "flex-1 basis-0" : "") }, [_("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
- onClick: r[1] || (r[1] = (e) => d.value = !0)
604
- }, [...r[8] || (r[8] = [y("i", { class: "i-tabler-menu size-7" }, null, -1)])])], 2),
605
- y("button", {
606
- class: E(["flex items-center gap-2 px-3.5 py-3 rounded-2xl text-white/90 hover:bg-white/10 transition-all cursor-pointer flex-grow-0", { "bg-white/10": p.value }]),
607
- onClick: r[2] || (r[2] = (e) => p.value = !0)
603
+ onClick: i[1] || (i[1] = (e) => l.value = !0)
604
+ }, [...i[8] || (i[8] = [_("i", { class: "i-tabler-menu size-7" }, null, -1)])])], 2),
605
+ _("button", {
606
+ class: w(["flex items-center gap-2 px-3.5 py-3 rounded-2xl text-white/90 hover:bg-white/10 transition-all cursor-pointer flex-grow-0", { "bg-white/10": d.value }]),
607
+ onClick: i[2] || (i[2] = (e) => d.value = !0)
608
608
  }, [
609
- y("i", { class: E([H.value?.icon, "size-4 opacity-60"]) }, null, 2),
610
- y("span", Be, P(H.value?.label), 1),
611
- r[9] || (r[9] = y("i", { class: "i-tabler-chevron-down size-4" }, null, -1))
609
+ _("i", { class: w([V.value?.icon, "size-4 opacity-60"]) }, null, 2),
610
+ _("span", Be, N(V.value?.label), 1),
611
+ i[9] || (i[9] = _("i", { class: "i-tabler-chevron-down size-4" }, null, -1))
612
612
  ], 2),
613
- n.hasClose ? (A(), v("div", Ve, [y("button", {
613
+ r.hasClose ? (O(), g("div", Ve, [_("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) => a("close", "button"), ["stop"]))
616
- }, [...r[10] || (r[10] = [y("i", { class: "size-6 i-tabler-x" }, null, -1)])])])) : _("", !0)
617
- ], 2))], 2)) : _("", !0), n.chatOnly ? (A(), v("div", {
615
+ onClick: i[3] || (i[3] = R((e) => s("close", "button"), ["stop"]))
616
+ }, [...i[10] || (i[10] = [_("i", { class: "size-6 i-tabler-x" }, null, -1)])])])) : h("", !0)
617
+ ], 2))], 2)) : h("", !0), r.chatOnly ? (O(), g("div", {
618
618
  key: 1,
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, {
619
+ class: w(["relative z-20 flex min-h-0 w-full flex-1 flex-col", r.bare ? "" : "px-4"])
620
+ }, [_("div", { class: w(["min-h-0 w-full flex-1", r.bare ? "" : "mx-auto max-w-md"]) }, [b(o, {
621
621
  "chat-controller": c.value,
622
- bot: n.bot,
623
- scope: V.value ? "private" : "public",
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"] ? {
622
+ bot: r.bot,
623
+ scope: B.value ? "private" : "public",
624
+ "empty-state-message": r.emptyStateMessage,
625
+ variant: r.bare ? "light" : "dark",
626
+ "show-header": !r.bare,
627
+ centered: r.bare
628
+ }, v({ _: 2 }, [t.$slots["empty-heading"] ? {
629
629
  name: "empty-heading",
630
- fn: L((e) => [N(t.$slots, "empty-heading", D(w(e)))]),
630
+ fn: I((e) => [j(t.$slots, "empty-heading", T(S(e)))]),
631
631
  key: "0"
632
632
  } : void 0]), 1032, [
633
633
  "chat-controller",
@@ -637,61 +637,61 @@ var B = [
637
637
  "variant",
638
638
  "show-header",
639
639
  "centered"
640
- ])], 2)], 2)) : (A(), v(f, { key: 2 }, [T.value === "self" ? (A(), v("div", He, [
641
- r[11] || (r[11] = y("div", { class: "flex-1 basis-0 mb-12" }, null, -1)),
642
- S(xe, {
643
- bot: n.bot,
644
- "is-online": R.value
640
+ ])], 2)], 2)) : (O(), g(u, { key: 2 }, [C.value === "self" ? (O(), g("div", He, [
641
+ i[11] || (i[11] = _("div", { class: "flex-1 basis-0 mb-12" }, null, -1)),
642
+ b(xe, {
643
+ bot: r.bot,
644
+ "is-online": L.value
645
645
  }, null, 8, ["bot", "is-online"]),
646
- y("div", Q, [S(s, {
646
+ _("div", Q, [b(a, {
647
647
  theme: "primary",
648
648
  size: "lg",
649
649
  class: "w-full",
650
- icon: q.value,
650
+ icon: K.value,
651
651
  "data-test": "voice-button",
652
- onClick: r[4] || (r[4] = (e) => c.value?.setMode("talk"))
652
+ onClick: i[4] || (i[4] = (e) => c.value?.setMode("talk"))
653
653
  }, {
654
- default: L(() => [x(P(K.value), 1)]),
654
+ default: I(() => [y(N(G.value), 1)]),
655
655
  _: 1
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", {
656
+ }, 8, ["icon"]), r.bot.accounts.value && r.bot.accounts.value.length > 0 ? (O(), g("div", Ue, [(O(!0), g(u, null, A((r.bot.accounts.value || []).filter((t) => P(e)[t.platform]), (t) => (O(), g("a", {
657
657
  key: `${t.platform}-${t.handle}`,
658
- href: F(e)[t.platform].getUrl(t.handle),
658
+ href: P(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
- }, [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, [n.requireAuth && !V.value ? (A(), g(J, {
661
+ }, [_("i", { class: w([P(e)[t.platform].icon, "size-5"]) }, null, 2)], 8, We))), 128))])) : h("", !0)])
662
+ ])) : C.value === "talk" ? (O(), g("div", Ge, [r.requireAuth && !B.value ? (O(), m(J, {
663
663
  key: 0,
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
- "is-online": R.value
668
- }, null, 8, ["bot", "is-online"])])]), S(o, {
664
+ sdk: r.sdk
665
+ }, null, 8, ["sdk"])) : (O(), g(u, { key: 1 }, [_("div", null, [_("div", Ke, [b(n, {
666
+ bot: r.bot,
667
+ "is-online": L.value
668
+ }, null, 8, ["bot", "is-online"])])]), b(o, {
669
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, {
670
+ bot: r.bot
671
+ }, null, 8, ["chat-controller", "bot"])], 64))])) : (O(), g("div", qe, [_("div", Je, [C.value === "chat" ? (O(), g(u, { key: 0 }, [r.requireAuth && !B.value ? (O(), m(J, {
672
672
  key: 0,
673
- sdk: n.sdk
674
- }, null, 8, ["sdk"])) : (A(), g(o, {
673
+ sdk: r.sdk
674
+ }, null, 8, ["sdk"])) : (O(), m(o, {
675
675
  key: 1,
676
676
  "chat-controller": c.value,
677
- bot: n.bot,
677
+ bot: r.bot,
678
678
  "show-header": ""
679
- }, null, 8, ["chat-controller", "bot"]))], 64)) : T.value === "info" ? (A(), g(de, {
679
+ }, null, 8, ["chat-controller", "bot"]))], 64)) : C.value === "info" ? (O(), m(de, {
680
680
  key: 1,
681
- bot: n.bot,
682
- "is-online": R.value
683
- }, null, 8, ["bot", "is-online"])) : _("", !0)])]))], 64))], 2)], 14, Fe)) : m.value ? (A(), v("div", Ye, [y("div", Xe, [
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
- r[13] || (r[13] = y("h3", { class: "text-lg font-medium" }, " Bot Error ", -1)),
686
- y("p", Ze, P(m.value), 1)
687
- ])])) : (A(), v("div", Qe, " Couldn't load your assistant. Please try again later. ")),
688
- n.chatOnly ? _("", !0) : (A(), g(Ne, {
681
+ bot: r.bot,
682
+ "is-online": L.value
683
+ }, null, 8, ["bot", "is-online"])) : h("", !0)])]))], 64))], 2)], 14, Fe)) : f.value ? (O(), g("div", Ye, [_("div", Xe, [
684
+ i[12] || (i[12] = _("div", { class: "flex justify-center" }, [_("div", { class: "rounded-full bg-red-500/20 flex items-center justify-center size-10" }, [_("i", { class: "i-tabler-alert-circle size-6 text-red-400" })])], -1)),
685
+ i[13] || (i[13] = _("h3", { class: "text-lg font-medium" }, " Bot Error ", -1)),
686
+ _("p", Ze, N(f.value), 1)
687
+ ])])) : (O(), g("div", Qe, " Couldn't load your assistant. Please try again later. ")),
688
+ r.chatOnly ? h("", !0) : (O(), m(Ne, {
689
689
  key: 4,
690
- modelValue: d.value,
691
- "onUpdate:modelValue": r[5] || (r[5] = (e) => d.value = e),
692
- bot: n.bot,
693
- sdk: n.sdk,
694
- title: n.bot.displayName.value,
690
+ modelValue: l.value,
691
+ "onUpdate:modelValue": i[5] || (i[5] = (e) => l.value = e),
692
+ bot: r.bot,
693
+ sdk: r.sdk,
694
+ title: r.bot.displayName.value,
695
695
  "data-test": "bot-sidebar"
696
696
  }, null, 8, [
697
697
  "modelValue",
@@ -699,16 +699,16 @@ var B = [
699
699
  "sdk",
700
700
  "title"
701
701
  ])),
702
- n.chatOnly ? _("", !0) : (A(), g(Me, {
702
+ r.chatOnly ? h("", !0) : (O(), m(Me, {
703
703
  key: 5,
704
- modelValue: p.value,
705
- "onUpdate:modelValue": r[6] || (r[6] = (e) => p.value = e),
704
+ modelValue: d.value,
705
+ "onUpdate:modelValue": i[6] || (i[6] = (e) => d.value = e),
706
706
  "chat-controller": c.value,
707
707
  "data-test": "bot-mode-sidebar"
708
708
  }, null, 8, ["modelValue", "chat-controller"]))
709
709
  ]));
710
710
  }
711
- }), $e = /* @__PURE__ */ C({
711
+ }), $e = /* @__PURE__ */ x({
712
712
  __name: "BotProvider",
713
713
  props: {
714
714
  sdk: {},
@@ -733,8 +733,8 @@ var B = [
733
733
  ],
734
734
  setup(e, { emit: t }) {
735
735
  let n = e, r = t;
736
- return (e, t) => (A(), g(c, T(n, { class: "bot-provider size-full relative" }), {
737
- default: L((i) => [S($, {
736
+ return (e, t) => (O(), m(c, C(n, { class: "bot-provider size-full relative" }), {
737
+ default: I((i) => [b($, {
738
738
  sdk: i.sdk,
739
739
  bot: i.bot,
740
740
  context: i.context,
@@ -751,9 +751,9 @@ var B = [
751
751
  onError: t[1] || (t[1] = (e) => r("error", e)),
752
752
  onTurnStarted: t[2] || (t[2] = (e) => r("turnStarted")),
753
753
  onTurnCompleted: t[3] || (t[3] = (e) => r("turnCompleted", e))
754
- }, b({ _: 2 }, [e.$slots["empty-heading"] ? {
754
+ }, v({ _: 2 }, [e.$slots["empty-heading"] ? {
755
755
  name: "empty-heading",
756
- fn: L((t) => [N(e.$slots, "empty-heading", D(w(t)))]),
756
+ fn: I((t) => [j(e.$slots, "empty-heading", T(S(t)))]),
757
757
  key: "0"
758
758
  } : void 0]), 1032, [
759
759
  "sdk",
@@ -771,6 +771,6 @@ var B = [
771
771
  }, 16));
772
772
  }
773
773
  });
774
- export { d as i, $ as n, B as r, $e as t };
774
+ export { l as i, $ as n, z as r, $e as t };
775
775
 
776
776
  //# sourceMappingURL=BotProvider.js.map