@vc-shell/framework 2.5.0-pr323.ada2f14 → 2.5.0-pr325.8e7347f

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,7 +1,7 @@
1
1
  import { ref as N, computed as E, shallowRef as We, watch as q, getCurrentInstance as oe, inject as F, isRef as ze, provide as De, defineComponent as X, openBlock as I, createElementBlock as k, createElementVNode as A, createCommentVNode as Z, createStaticVNode as qe, Fragment as Te, renderList as Ze, toDisplayString as z, createVNode as L, createBlock as ue, unref as O, withCtx as G, withKeys as K, withModifiers as H, createTextVNode as be, Transition as Le, normalizeClass as Ne, onUnmounted as Xe, normalizeStyle as Ye } from "vue";
2
- import { c as Y, b as Fe, d as je, B as Qe, e as Je, f as et, N as tt, A as xe, L as nt, g as at, T as ot, a as Ae, _ as de, E as it } from "./VcAiAgentPanel.vue_vue_type_style_index_0_lang-0llGMIi1.js";
3
- import { c as ie } from "./vendor-lodash-es-D2n90GJy.js";
4
- import { u as rt } from "./vendor-vueuse-core-BFa9je5E.js";
2
+ import { c as Y, b as Fe, d as je, B as Qe, e as Je, f as et, N as tt, A as xe, L as nt, g as at, T as ot, a as Ae, _ as de, E as rt } from "./VcAiAgentPanel.vue_vue_type_style_index_0_lang-0llGMIi1.js";
3
+ import { c as re } from "./vendor-lodash-es-D2n90GJy.js";
4
+ import { u as it } from "./vendor-vueuse-core-BFa9je5E.js";
5
5
  import { u as st } from "./vendor-vue-i18n-LO-EJStU.js";
6
6
  const lt = {
7
7
  url: "",
@@ -18,31 +18,31 @@ const lt = {
18
18
  }, Bn = {
19
19
  EMBEDDED_HOST_READY: "EMBEDDED_HOST_READY",
20
20
  AI_CHAT_MESSAGE: "AI_CHAT_MESSAGE"
21
- }, ct = "ai-agent-toggle", dt = "lucide-sparkles", ut = "AI Assistant", re = Y("ai-agent-panel");
21
+ }, ct = "ai-agent-toggle", dt = "lucide-sparkles", ut = "AI Assistant", ie = Y("ai-agent-panel");
22
22
  function pt() {
23
- const e = N("closed"), i = N(!1), a = E(() => e.value !== "closed"), t = E(() => e.value === "expanded"), o = () => {
24
- e.value === "closed" && (e.value = "open", re.debug("Panel opened"));
23
+ const e = N("closed"), r = N(!1), a = E(() => e.value !== "closed"), t = E(() => e.value === "expanded"), o = () => {
24
+ e.value === "closed" && (e.value = "open", ie.debug("Panel opened"));
25
25
  }, l = () => {
26
- e.value = "closed", i.value = !1, re.debug("Panel closed, reset initialized state");
26
+ e.value = "closed", r.value = !1, ie.debug("Panel closed, reset initialized state");
27
27
  };
28
28
  return {
29
29
  panelState: e,
30
30
  isOpen: a,
31
31
  isExpanded: t,
32
- isInitialized: i,
32
+ isInitialized: r,
33
33
  open: o,
34
34
  close: l,
35
35
  toggle: () => {
36
36
  e.value === "closed" ? o() : l();
37
37
  },
38
38
  expand: () => {
39
- e.value === "open" && (e.value = "expanded", re.debug("Panel expanded"));
39
+ e.value === "open" && (e.value = "expanded", ie.debug("Panel expanded"));
40
40
  },
41
41
  collapse: () => {
42
- e.value === "expanded" && (e.value = "open", re.debug("Panel collapsed"));
42
+ e.value === "expanded" && (e.value = "open", ie.debug("Panel collapsed"));
43
43
  },
44
44
  resetInitialized: () => {
45
- i.value = !1;
45
+ r.value = !1;
46
46
  }
47
47
  };
48
48
  }
@@ -56,7 +56,7 @@ function Se(e) {
56
56
  } : { id: "unknown", name: "unknown", title: "Unknown" };
57
57
  }
58
58
  function ft(e) {
59
- const { userGetter: i, bladeGetter: a, localeGetter: t, tokenGetter: o } = e, l = N(/* @__PURE__ */ new Map()), C = () => {
59
+ const { userGetter: r, bladeGetter: a, localeGetter: t, tokenGetter: o } = e, l = N(/* @__PURE__ */ new Map()), C = () => {
60
60
  const v = a();
61
61
  return v ? l.value.get(v.id) ?? {
62
62
  items: [],
@@ -80,12 +80,12 @@ function ft(e) {
80
80
  buildInitPayload: async () => {
81
81
  const v = o ? await o() ?? void 0 : void 0;
82
82
  return {
83
- userId: i()?.id || "",
83
+ userId: r()?.id || "",
84
84
  locale: t(),
85
85
  blade: Se(a()),
86
86
  contextType: s.value,
87
- items: ie(d.value),
88
- suggestions: u.value ? ie(u.value) : void 0,
87
+ items: re(d.value),
88
+ suggestions: u.value ? re(u.value) : void 0,
89
89
  accessToken: v
90
90
  };
91
91
  },
@@ -94,8 +94,8 @@ function ft(e) {
94
94
  return {
95
95
  blade: Se(a()),
96
96
  contextType: s.value,
97
- items: ie(d.value),
98
- suggestions: u.value ? ie(u.value) : void 0,
97
+ items: re(d.value),
98
+ suggestions: u.value ? re(u.value) : void 0,
99
99
  locale: t(),
100
100
  accessToken: v
101
101
  };
@@ -104,7 +104,7 @@ function ft(e) {
104
104
  }
105
105
  const P = Y("ai-agent-transport");
106
106
  function gt(e) {
107
- const { getConfig: i, isEmbedded: a, navigateToBlade: t, closePanel: o } = e, l = We(null), C = N(!1), d = N(!1), s = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set();
107
+ const { getConfig: r, isEmbedded: a, navigateToBlade: t, closePanel: o } = e, l = We(null), C = N(!1), d = N(!1), s = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set();
108
108
  function g(f, b) {
109
109
  switch (f) {
110
110
  case "NAVIGATE_TO_APP": {
@@ -135,7 +135,7 @@ function gt(e) {
135
135
  });
136
136
  }
137
137
  function p(f) {
138
- const v = i().allowedOrigins ?? [];
138
+ const v = r().allowedOrigins ?? [];
139
139
  if (v.length === 0) {
140
140
  P.warn(
141
141
  "Ignoring postMessage: aiAgentConfig.allowedOrigins is empty. Configure explicit origins to enable the AI agent bridge.",
@@ -193,7 +193,7 @@ function gt(e) {
193
193
  P.warn("Cannot send message: iframe not available");
194
194
  return;
195
195
  }
196
- const b = i().allowedOrigins?.[0];
196
+ const b = r().allowedOrigins?.[0];
197
197
  if (!b || b === "*") {
198
198
  P.error(
199
199
  "Refusing to send to iframe: aiAgentConfig.allowedOrigins must contain an explicit origin. Message dropped to avoid leaking data (including access tokens) to arbitrary origins.",
@@ -208,7 +208,7 @@ function gt(e) {
208
208
  P.warn("Cannot send to parent: not in iframe");
209
209
  return;
210
210
  }
211
- const b = i().parentOrigin;
211
+ const b = r().parentOrigin;
212
212
  if (!b || b === "*") {
213
213
  P.error(
214
214
  "Refusing to send to parent: aiAgentConfig.parentOrigin must be an explicit origin. Message dropped to avoid leaking data (including access tokens) to arbitrary origins.",
@@ -239,7 +239,7 @@ function gt(e) {
239
239
  const se = Y("ai-agent-service");
240
240
  function vt(e) {
241
241
  const {
242
- userGetter: i,
242
+ userGetter: r,
243
243
  bladeGetter: a,
244
244
  localeGetter: t,
245
245
  tokenGetter: o,
@@ -247,7 +247,7 @@ function vt(e) {
247
247
  initialConfig: C,
248
248
  isEmbedded: d = !1
249
249
  } = e, s = N({ ...lt, ...C }), u = pt(), g = ft({
250
- userGetter: i,
250
+ userGetter: r,
251
251
  bladeGetter: a,
252
252
  localeGetter: t,
253
253
  tokenGetter: o
@@ -257,7 +257,7 @@ function vt(e) {
257
257
  navigateToBlade: l,
258
258
  closePanel: () => u.close()
259
259
  }), f = E(() => ({
260
- user: i(),
260
+ user: r(),
261
261
  currentBlade: a(),
262
262
  items: g.contextItems.value
263
263
  })), b = async () => {
@@ -331,7 +331,7 @@ function $e(e) {
331
331
  return new Proxy(
332
332
  {},
333
333
  {
334
- get(i, a) {
334
+ get(r, a) {
335
335
  if (!(typeof a != "string" || a === "then"))
336
336
  return Ct.has(a) ? $e({ ...e, [a]: !0 }) : { key: a, ...e };
337
337
  }
@@ -375,9 +375,9 @@ function mt(e) {
375
375
  function ht(e) {
376
376
  return e in ke ? ke[e] : e.length === 1 ? e.toUpperCase() : e.charAt(0).toUpperCase() + e.slice(1);
377
377
  }
378
- function Ie(e, i) {
379
- const a = !!e.ctrl || !!e.mod && !i, t = !!e.meta || !!e.mod && i, o = [], l = [];
380
- i ? (a && o.push(le.ctrl), e.alt && o.push(le.alt), e.shift && o.push(le.shift), t && o.push(le.meta)) : (a && o.push(ce.ctrl), t && o.push(ce.meta), e.alt && o.push(ce.alt), e.shift && o.push(ce.shift)), a && l.push("Control"), t && l.push("Meta"), e.alt && l.push("Alt"), e.shift && l.push("Shift"), o.push(mt(e.key));
378
+ function Ie(e, r) {
379
+ const a = !!e.ctrl || !!e.mod && !r, t = !!e.meta || !!e.mod && r, o = [], l = [];
380
+ r ? (a && o.push(le.ctrl), e.alt && o.push(le.alt), e.shift && o.push(le.shift), t && o.push(le.meta)) : (a && o.push(ce.ctrl), t && o.push(ce.meta), e.alt && o.push(ce.alt), e.shift && o.push(ce.shift)), a && l.push("Control"), t && l.push("Meta"), e.alt && l.push("Alt"), e.shift && l.push("Shift"), o.push(mt(e.key));
381
381
  const C = [...l, ht(e.key)].join("+");
382
382
  return { parts: o, aria: C };
383
383
  }
@@ -416,15 +416,15 @@ function At(e) {
416
416
  if (e in Me) return Me[e];
417
417
  if (wt(e)) return e.toUpperCase();
418
418
  }
419
- function yt(e, i) {
419
+ function yt(e, r) {
420
420
  const a = bt(e.key);
421
- if (a !== void 0) return i.code === a;
421
+ if (a !== void 0) return r.code === a;
422
422
  const t = At(e.key);
423
- return t !== void 0 ? i.key === t : !1;
423
+ return t !== void 0 ? r.key === t : !1;
424
424
  }
425
- function Bt(e, i, a) {
425
+ function Bt(e, r, a) {
426
426
  const t = !!e.ctrl || !!e.mod && !a, o = !!e.meta || !!e.mod && a, l = !!e.alt, C = !!e.shift;
427
- return i.ctrlKey !== t || i.metaKey !== o || i.altKey !== l || i.shiftKey !== C ? !1 : yt(e, i);
427
+ return r.ctrlKey !== t || r.metaKey !== o || r.altKey !== l || r.shiftKey !== C ? !1 : yt(e, r);
428
428
  }
429
429
  const It = /* @__PURE__ */ new Set([
430
430
  "button",
@@ -440,9 +440,9 @@ const It = /* @__PURE__ */ new Set([
440
440
  function In() {
441
441
  const e = document.activeElement;
442
442
  if (!e) return !1;
443
- const i = e.tagName;
444
- if (i === "INPUT") return !It.has(e.type);
445
- if (i === "TEXTAREA" || i === "SELECT" || e.isContentEditable === !0) return !0;
443
+ const r = e.tagName;
444
+ if (r === "INPUT") return !It.has(e.type);
445
+ if (r === "TEXTAREA" || r === "SELECT" || e.isContentEditable === !0) return !0;
446
446
  const a = e.getAttribute("contenteditable");
447
447
  return a === "true" || a === "";
448
448
  }
@@ -454,7 +454,7 @@ function Re() {
454
454
  return {
455
455
  hotkey: ee,
456
456
  isMac: e,
457
- formatShortcut: (i) => Ie(i, e)
457
+ formatShortcut: (r) => Ie(r, e)
458
458
  };
459
459
  }
460
460
  let Tt, Ge, Ue, St;
@@ -476,12 +476,12 @@ function y(e) {
476
476
  ${Ot}`);
477
477
  }
478
478
  function kt() {
479
- const e = (oe() ? F(Fe, void 0) : void 0) ?? Ge, i = (oe() ? F(je, void 0) : void 0) ?? Ue;
480
- if (!e || !i)
479
+ const e = (oe() ? F(Fe, void 0) : void 0) ?? Ge, r = (oe() ? F(je, void 0) : void 0) ?? Ue;
480
+ if (!e || !r)
481
481
  throw new Error(
482
482
  "[vc-shell] useBlade() failed: BladeStack or BladeMessaging not available. Ensure BladeNavigationPlugin (plugin-v2) is installed."
483
483
  );
484
- const a = e, t = i, o = oe() ? F(Qe, void 0) : void 0, l = oe() ? F(Je, void 0) : void 0, C = E(() => (o || y("id"), o.value.id)), d = E(() => (o || y("param"), o.value.param)), s = E(() => (o || y("options"), o.value.options)), u = E(() => (o || y("query"), o.value.query)), g = E(() => (o || y("closable"), o.value.parentId !== void 0)), p = E(() => (o || y("expanded"), a.activeBlade.value?.id === o.value.id)), f = E(() => (o || y("name"), o.value.name)), b = E(() => {
484
+ const a = e, t = r, o = oe() ? F(Qe, void 0) : void 0, l = oe() ? F(Je, void 0) : void 0, C = E(() => (o || y("id"), o.value.id)), d = E(() => (o || y("param"), o.value.param)), s = E(() => (o || y("options"), o.value.options)), u = E(() => (o || y("query"), o.value.query)), g = E(() => (o || y("closable"), o.value.parentId !== void 0)), p = E(() => (o || y("expanded"), a.activeBlade.value?.id === o.value.id)), f = E(() => (o || y("name"), o.value.name)), b = E(() => {
485
485
  if (!o) return;
486
486
  const m = o.value.id;
487
487
  return a.blades.value.find((B) => B.parentId === m)?.param;
@@ -602,18 +602,18 @@ function kt() {
602
602
  clearBanners: me
603
603
  };
604
604
  }
605
- function Pt(e, i) {
605
+ function Pt(e, r) {
606
606
  return {
607
- id: i.generateId(),
607
+ id: r.generateId(),
608
608
  name: e.name,
609
- url: i.resolveUrl(e.name),
609
+ url: r.resolveUrl(e.name),
610
610
  // workspace blades don't have param when opened first
611
611
  query: e.query,
612
612
  options: e.options,
613
613
  visible: !0
614
614
  };
615
615
  }
616
- function Mt(e, i, a) {
616
+ function Mt(e, r, a) {
617
617
  return {
618
618
  id: a.generateId(),
619
619
  name: e.name,
@@ -621,11 +621,11 @@ function Mt(e, i, a) {
621
621
  param: e.param,
622
622
  query: e.query,
623
623
  options: e.options,
624
- parentId: i,
624
+ parentId: r,
625
625
  visible: !0
626
626
  };
627
627
  }
628
- function Dt(e, i, a) {
628
+ function Dt(e, r, a) {
629
629
  return {
630
630
  id: a.generateId(),
631
631
  name: e.name,
@@ -633,11 +633,11 @@ function Dt(e, i, a) {
633
633
  param: e.param,
634
634
  query: e.query,
635
635
  options: e.options,
636
- parentId: i,
636
+ parentId: r,
637
637
  visible: !0
638
638
  };
639
639
  }
640
- function Lt(e, i, a) {
640
+ function Lt(e, r, a) {
641
641
  return {
642
642
  id: a.generateId(),
643
643
  name: e.name,
@@ -645,7 +645,7 @@ function Lt(e, i, a) {
645
645
  param: e.param,
646
646
  query: e.query,
647
647
  options: e.options,
648
- parentId: i,
648
+ parentId: r,
649
649
  visible: !0
650
650
  };
651
651
  }
@@ -653,7 +653,7 @@ let Nt = 0;
653
653
  function Ft() {
654
654
  return `blade_${++Nt}_${Math.random().toString(36).slice(2, 8)}`;
655
655
  }
656
- function kn(e, i, a = tt) {
656
+ function kn(e, r, a = tt) {
657
657
  const t = N([]), o = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), C = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(), s = E(() => t.value[0]), u = E(() => t.value), g = E(() => {
658
658
  for (let n = t.value.length - 1; n >= 0; n--)
659
659
  if (t.value[n].visible) return t.value[n];
@@ -662,32 +662,32 @@ function kn(e, i, a = tt) {
662
662
  o.delete(n), l.delete(n), C.delete(n), d.delete(n);
663
663
  }
664
664
  function f(n) {
665
- const r = e.getBlade(n);
666
- if (r)
667
- return r.route;
665
+ const i = e.getBlade(n);
666
+ if (i)
667
+ return i.route;
668
668
  }
669
669
  const b = {
670
670
  generateId: Ft,
671
671
  resolveUrl: f
672
672
  };
673
673
  async function v(n) {
674
- for (let r = n.length - 1; r >= 0; r--) {
675
- const c = o.get(n[r].id);
674
+ for (let i = n.length - 1; i >= 0; i--) {
675
+ const c = o.get(n[i].id);
676
676
  if (c && await c())
677
677
  return !0;
678
678
  }
679
679
  return !1;
680
680
  }
681
681
  function _(n) {
682
- for (const r of n)
683
- C.get(r.id)?.(), p(r.id);
682
+ for (const i of n)
683
+ C.get(i.id)?.(), p(i.id);
684
684
  }
685
685
  async function T(n) {
686
686
  if (s.value?.name === n.name) return !1;
687
687
  const c = e.getBlade(n.name);
688
688
  if (!c)
689
689
  throw new Error(`[BladeStack] Blade '${n.name}' not found in registry`);
690
- if (i && c.permissions && !i(c.permissions))
690
+ if (r && c.permissions && !r(c.permissions))
691
691
  return console.warn(`[BladeStack] Access denied to workspace '${n.name}'`), !1;
692
692
  _([...t.value]);
693
693
  const h = Pt(n, b);
@@ -696,25 +696,25 @@ function kn(e, i, a = tt) {
696
696
  async function M(n) {
697
697
  if (!e.getBlade(n.name))
698
698
  throw new Error(`[BladeStack] Blade '${n.name}' not found in registry`);
699
- const r = n.parentId ?? g.value?.id ?? s.value?.id;
700
- if (!r)
699
+ const i = n.parentId ?? g.value?.id ?? s.value?.id;
700
+ if (!i)
701
701
  throw new Error("[BladeStack] Cannot open blade: no parent blade found");
702
- const c = t.value.findIndex((S) => S.id === r);
702
+ const c = t.value.findIndex((S) => S.id === i);
703
703
  if (c === -1)
704
- throw new Error(`[BladeStack] Parent blade '${r}' not found in stack`);
704
+ throw new Error(`[BladeStack] Parent blade '${i}' not found in stack`);
705
705
  const h = t.value.slice(c + 1);
706
706
  if (h.length > 0 && await v(h))
707
- return;
707
+ return !1;
708
708
  _(h);
709
- const w = Mt(n, r, b);
710
- t.value = [...t.value.slice(0, c + 1), w], n.onOpen && l.set(w.id, n.onOpen), n.onClose && C.set(w.id, n.onClose), n.onOpen?.();
709
+ const w = Mt(n, i, b);
710
+ return t.value = [...t.value.slice(0, c + 1), w], n.onOpen && l.set(w.id, n.onOpen), n.onClose && C.set(w.id, n.onClose), n.onOpen?.(), !0;
711
711
  }
712
712
  async function D(n) {
713
- const r = t.value.findIndex((S) => S.id === n);
714
- if (r === -1 || r === 0) return "refused";
715
- const c = t.value.slice(r);
713
+ const i = t.value.findIndex((S) => S.id === n);
714
+ if (i === -1 || i === 0) return "refused";
715
+ const c = t.value.slice(i);
716
716
  if (await v(c)) return "prevented";
717
- _(c), t.value = t.value.slice(0, r);
717
+ _(c), t.value = t.value.slice(0, i);
718
718
  const w = t.value.length - 1;
719
719
  if (w > 0 && !t.value[w].visible) {
720
720
  const S = [...t.value];
@@ -723,46 +723,46 @@ function kn(e, i, a = tt) {
723
723
  return "closed";
724
724
  }
725
725
  async function x(n) {
726
- const r = g.value;
727
- if (!r)
726
+ const i = g.value;
727
+ if (!i)
728
728
  throw new Error("[BladeStack] No active blade to replace");
729
729
  if (!e.getBlade(n.name))
730
730
  throw new Error(`[BladeStack] Blade '${n.name}' not found in registry`);
731
- const c = t.value.findIndex((R) => R.id === r.id);
731
+ const c = t.value.findIndex((R) => R.id === i.id);
732
732
  if (c === -1)
733
- throw new Error(`[BladeStack] Active blade '${r.id}' not found in stack`);
733
+ throw new Error(`[BladeStack] Active blade '${i.id}' not found in stack`);
734
734
  const h = t.value.slice(c + 1);
735
735
  if (h.length > 0) {
736
- if (await v(h)) return;
736
+ if (await v(h)) return !1;
737
737
  _(h);
738
738
  }
739
- const w = Dt(n, r.parentId, b);
740
- _([r]);
739
+ const w = Dt(n, i.parentId, b);
740
+ _([i]);
741
741
  const S = [...t.value.slice(0, c), w, ...t.value.slice(c + 1)];
742
- t.value = S, n.onOpen && l.set(w.id, n.onOpen), n.onClose && C.set(w.id, n.onClose), n.onOpen?.();
742
+ return t.value = S, n.onOpen && l.set(w.id, n.onOpen), n.onClose && C.set(w.id, n.onClose), n.onOpen?.(), !0;
743
743
  }
744
744
  async function U(n) {
745
- const r = g.value;
746
- if (!r)
745
+ const i = g.value;
746
+ if (!i)
747
747
  throw new Error("[BladeStack] No active blade to cover");
748
748
  if (!e.getBlade(n.name))
749
749
  throw new Error(`[BladeStack] Blade '${n.name}' not found in registry`);
750
- const c = t.value.findIndex((R) => R.id === r.id);
750
+ const c = t.value.findIndex((R) => R.id === i.id);
751
751
  if (c === -1)
752
- throw new Error(`[BladeStack] Active blade '${r.id}' not found in stack`);
752
+ throw new Error(`[BladeStack] Active blade '${i.id}' not found in stack`);
753
753
  const h = t.value.slice(c + 1);
754
754
  if (h.length > 0) {
755
- if (await v(h)) return;
755
+ if (await v(h)) return !1;
756
756
  _(h);
757
757
  }
758
- const w = Lt(n, r.id, b), S = t.value.slice(0, c);
759
- S.push({ ...r, visible: !1 }), S.push(w), t.value = S, n.onOpen && l.set(w.id, n.onOpen), n.onClose && C.set(w.id, n.onClose), n.onOpen?.();
758
+ const w = Lt(n, i.id, b), S = t.value.slice(0, c);
759
+ return S.push({ ...i, visible: !1 }), S.push(w), t.value = S, n.onOpen && l.set(w.id, n.onOpen), n.onClose && C.set(w.id, n.onClose), n.onOpen?.(), !0;
760
760
  }
761
761
  async function j(n) {
762
- const r = t.value.findIndex((w) => w.id === n);
763
- if (r === -1) return;
764
- const c = t.value.slice(r + 1);
765
- c.length === 0 || await v(c) || (_(c), t.value = t.value.slice(0, r + 1));
762
+ const i = t.value.findIndex((w) => w.id === n);
763
+ if (i === -1) return !1;
764
+ const c = t.value.slice(i + 1);
765
+ return c.length === 0 || await v(c) ? !1 : (_(c), t.value = t.value.slice(0, i + 1), !0);
766
766
  }
767
767
  function $(n) {
768
768
  g.value?.url && a[n]();
@@ -771,50 +771,50 @@ function kn(e, i, a = tt) {
771
771
  await T(n) && $("push");
772
772
  }
773
773
  async function pe(n) {
774
- await M(n), $("push");
774
+ await M(n) && $("push");
775
775
  }
776
776
  async function fe(n) {
777
- await x(n), $("replace");
777
+ await x(n) && $("replace");
778
778
  }
779
779
  async function ge(n) {
780
- await U(n), $("push");
780
+ await U(n) && $("push");
781
781
  }
782
782
  async function ve(n) {
783
- const r = await D(n);
784
- return r === "closed" && a.replace(), r === "prevented";
783
+ const i = await D(n);
784
+ return i === "closed" && a.replace(), i === "prevented";
785
785
  }
786
786
  async function Ce(n) {
787
- await j(n), a.replace();
787
+ await j(n) && a.replace();
788
788
  }
789
- function me(n, r) {
790
- o.set(n, r);
789
+ function me(n, i) {
790
+ o.set(n, i);
791
791
  }
792
792
  function te(n) {
793
793
  o.delete(n);
794
794
  }
795
- function ne(n, r) {
795
+ function ne(n, i) {
796
796
  const c = t.value.findIndex((w) => w.id === n);
797
797
  if (c === -1) return;
798
798
  const h = [...t.value];
799
- h[c] = { ...h[c], error: r }, t.value = h;
799
+ h[c] = { ...h[c], error: i }, t.value = h;
800
800
  }
801
801
  function he(n) {
802
- const r = t.value.findIndex((h) => h.id === n);
803
- if (r === -1) return;
802
+ const i = t.value.findIndex((h) => h.id === n);
803
+ if (i === -1) return;
804
804
  const c = [...t.value];
805
- c[r] = { ...c[r], error: void 0 }, t.value = c;
805
+ c[i] = { ...c[i], error: void 0 }, t.value = c;
806
806
  }
807
- function _e(n, r) {
807
+ function _e(n, i) {
808
808
  const c = t.value.findIndex((w) => w.id === n);
809
- if (c === -1 || t.value[c].title === r) return;
809
+ if (c === -1 || t.value[c].title === i) return;
810
810
  const h = [...t.value];
811
- h[c] = { ...h[c], title: r }, t.value = h;
811
+ h[c] = { ...h[c], title: i }, t.value = h;
812
812
  }
813
- function m(n, r) {
813
+ function m(n, i) {
814
814
  const c = t.value.findIndex((V) => V.id === n);
815
815
  if (c === -1) return;
816
816
  const h = t.value[c].query ?? {}, w = { ...h };
817
- for (const [V, we] of Object.entries(r))
817
+ for (const [V, we] of Object.entries(i))
818
818
  we === "" || we == null ? delete w[V] : w[V] = we;
819
819
  const S = Object.keys(h), R = Object.keys(w);
820
820
  if (S.length === R.length && R.every((V) => h[V] === w[V]))
@@ -823,22 +823,22 @@ function kn(e, i, a = tt) {
823
823
  Ee[c] = { ...Ee[c], query: w }, t.value = Ee;
824
824
  }
825
825
  function B(n) {
826
- let r = d.get(n);
827
- return r || (r = N(!1), d.set(n, r)), r;
826
+ let i = d.get(n);
827
+ return i || (i = N(!1), d.set(n, i)), i;
828
828
  }
829
829
  function J(n) {
830
830
  return d.get(n)?.value ?? !1;
831
831
  }
832
- function ae(n, r) {
833
- B(n).value = r;
832
+ function ae(n, i) {
833
+ B(n).value = i;
834
834
  }
835
835
  function Ke(n) {
836
- const r = B(n);
837
- r.value = !r.value;
836
+ const i = B(n);
837
+ i.value = !i.value;
838
838
  }
839
839
  function He(n) {
840
- for (const r of t.value)
841
- p(r.id);
840
+ for (const i of t.value)
841
+ p(i.id);
842
842
  t.value = n;
843
843
  }
844
844
  return {
@@ -872,7 +872,7 @@ function $t() {
872
872
  }
873
873
  const W = Y("use-ai-agent");
874
874
  function Pn(e) {
875
- const i = F(nt), { user: a, getAccessToken: t } = at(), { openBlade: o } = kt(), { blades: l, activeBlade: C } = $t(), d = e?.isEmbedded, s = vt({
875
+ const r = F(nt), { user: a, getAccessToken: t } = at(), { openBlade: o } = kt(), { blades: l, activeBlade: C } = $t(), d = e?.isEmbedded, s = vt({
876
876
  userGetter: () => {
877
877
  if (a.value)
878
878
  return {
@@ -892,7 +892,7 @@ function Pn(e) {
892
892
  options: g.options
893
893
  } : null;
894
894
  },
895
- localeGetter: () => i?.currentLocale.value ?? "en",
895
+ localeGetter: () => r?.currentLocale.value ?? "en",
896
896
  tokenGetter: t,
897
897
  navigateToBlade: (g, p, f) => {
898
898
  o({ name: g, param: p, options: f }).then(() => {
@@ -979,7 +979,7 @@ const Rt = ["width", "height"], Gt = ["clip-path"], Ut = {
979
979
  animated: { type: Boolean, default: !1 }
980
980
  },
981
981
  setup(e) {
982
- const i = E(() => `virto-oz-clip-${Math.random().toString(36).substring(2, 11)}`);
982
+ const r = E(() => `virto-oz-clip-${Math.random().toString(36).substring(2, 11)}`);
983
983
  return (a, t) => (I(), k("svg", {
984
984
  width: e.width,
985
985
  height: e.height,
@@ -994,7 +994,7 @@ const Rt = ["width", "height"], Gt = ["clip-path"], Ut = {
994
994
  }, null, -1)),
995
995
  e.animated ? (I(), k("path", Ut)) : (I(), k("g", {
996
996
  key: 0,
997
- "clip-path": `url(#${i.value})`
997
+ "clip-path": `url(#${r.value})`
998
998
  }, [...t[0] || (t[0] = [
999
999
  A("g", { transform: "matrix(0 -0.161514 0.160417 0 49.1357 53.9479)" }, [
1000
1000
  A("foreignObject", {
@@ -1046,7 +1046,7 @@ const Rt = ["width", "height"], Gt = ["clip-path"], Ut = {
1046
1046
  A("defs", null, [
1047
1047
  e.animated ? Z("", !0) : (I(), k("clipPath", {
1048
1048
  key: 0,
1049
- id: i.value
1049
+ id: r.value
1050
1050
  }, [...t[1] || (t[1] = [
1051
1051
  A("path", { d: "M72.9199 46.4165C73.2527 46.9495 73.5831 47.4996 73.9092 48.0679C78.4022 55.8976 79.0605 66.3551 76.7793 76.6079C74.5635 86.5668 69.6096 96.1504 62.9795 102.692L58.1514 105.48C52.5725 108.701 45.699 108.701 40.1201 105.48L21.665 94.8247C29.1398 95.4723 37.0781 94.4072 44.3848 91.9233C54.5984 88.4512 63.7463 82.1497 68.6807 73.6548C75.124 62.5619 75.4351 53.2694 72.9199 46.4165ZM56.5205 29.5093C65.5697 29.5331 75.1259 33.9964 83.0215 40.8853C89.9848 46.9608 95.5441 54.8286 98.2715 62.9478V71.9058C98.2715 78.3478 94.8348 84.301 89.2559 87.522L69.4658 98.9468C74.0688 92.6731 77.4601 84.9996 79.207 77.1479C81.5723 66.517 80.9666 55.3703 76.0654 46.8296C69.6817 35.7054 61.7917 30.789 54.6006 29.5396C55.2271 29.5179 55.867 29.5076 56.5205 29.5093ZM0 50.688C3.16812 57.476 8.04614 63.7935 13.8389 68.853C21.9305 75.9204 31.9368 80.6465 41.7578 80.6724C54.5833 80.706 62.7851 76.3308 67.4629 70.728C67.1684 71.2812 66.8584 71.8408 66.5303 72.4058C61.9844 80.2318 53.417 86.2251 43.584 89.5679C34.4355 92.6779 24.3375 93.4401 15.6328 91.3423L9.01562 87.522C3.43667 84.301 0 78.3478 0 71.9058V50.688ZM26.7559 10.1313C22.5672 16.2131 19.6599 23.483 18.2695 30.9126C16.3077 41.3962 17.3358 52.3558 22.2188 60.8647C28.6034 71.9905 36.4946 76.9061 43.6865 78.1548C43.0594 78.1765 42.4188 78.1868 41.7646 78.1851C32.7113 78.1612 23.2602 73.7801 15.4746 66.98C8.2197 60.6434 2.52684 52.3035 0 43.7075V35.9897C6.33247e-05 29.5479 3.43687 23.5955 9.01562 20.3745L26.7559 10.1313ZM51.2432 31.6978C54.0287 31.7659 57.0796 32.4389 60.1875 33.9976C58.8529 33.7029 57.5584 33.677 56.3965 33.9722L57.0088 36.3833C58.4774 36.0102 60.6741 36.4134 63.0332 37.8237C65.3553 39.212 67.6865 41.4953 69.375 44.5923C70.7081 47.0376 71.6489 50.015 71.8535 53.4839C71.4414 52.1828 70.818 51.0505 69.9824 50.1929L68.2012 51.9282C69.2585 53.0135 70.0076 55.1176 69.9658 57.8657C69.9246 60.5708 69.1121 63.731 67.2744 66.7417C65.8225 69.1203 63.7129 71.4251 60.8086 73.3374C61.7311 72.329 62.4012 71.2217 62.7266 70.0679L60.333 69.3931C59.9218 70.8514 58.4742 72.5523 56.0732 73.8901C53.71 75.207 50.5672 76.0837 47.041 75.9976C44.2551 75.9294 41.204 75.2549 38.0957 73.6958C39.4307 73.9907 40.7254 74.0184 41.8877 73.7231L41.2754 71.312C39.8069 71.6851 37.6101 71.2818 35.251 69.8716C32.9289 68.4834 30.5977 66.2 28.9092 63.103C27.5754 60.6565 26.6337 57.6775 26.4297 54.2065C26.8418 55.5096 27.4661 56.6438 28.3027 57.5024L30.084 55.7661C29.0267 54.6807 28.2775 52.5767 28.3193 49.8286C28.3606 47.1236 29.173 43.9633 31.0107 40.9526C32.4621 38.5751 34.5702 36.2706 37.4727 34.3589C36.5514 35.3666 35.8827 36.4736 35.5576 37.6265L37.9512 38.3013C38.3625 36.8429 39.8101 35.142 42.2109 33.8042C44.5742 32.4874 47.717 31.6116 51.2432 31.6978ZM40.1201 2.4165C45.6991 -0.804509 52.5724 -0.804509 58.1514 2.4165L75.6777 12.5356C68.4683 12.0708 60.8765 13.1991 53.8691 15.6333C43.6671 19.1774 34.5353 25.5492 29.6035 34.0396C23.1612 45.1305 22.8486 54.4223 25.3623 61.2749C25.0301 60.7429 24.7004 60.1936 24.375 59.6265C19.8639 51.765 18.8286 41.4457 20.7139 31.3706C22.4486 22.1007 26.633 13.1734 32.6709 6.71631L40.1201 2.4165ZM54.6855 17.9829C63.3703 14.966 72.9092 14.0715 81.3008 15.7817L89.2559 20.3745C94.8346 23.5955 98.2714 29.5479 98.2715 35.9897V56.4692C95.0606 49.9731 90.2759 43.9144 84.6562 39.0112C76.4636 31.8632 66.3524 27.0488 56.5273 27.0229C43.6978 26.9893 35.4935 31.3659 30.8164 36.9712C31.1117 36.4161 31.4247 35.8554 31.7539 35.2886C36.3024 27.4582 44.8633 21.395 54.6855 17.9829Z" }, null, -1)
1052
1052
  ])], 8, Vt)),
@@ -1066,7 +1066,7 @@ const Rt = ["width", "height"], Gt = ["clip-path"], Ut = {
1066
1066
  separated: { type: Boolean, default: !1 }
1067
1067
  },
1068
1068
  setup(e) {
1069
- return (i, a) => (I(), k("span", Ht, [
1069
+ return (r, a) => (I(), k("span", Ht, [
1070
1070
  (I(!0), k(Te, null, Ze(e.parts, (t, o) => (I(), k(Te, { key: o }, [
1071
1071
  e.separated && o > 0 ? (I(), k("span", Wt, "+")) : Z("", !0),
1072
1072
  A("kbd", zt, z(t), 1)
@@ -1082,7 +1082,7 @@ const Rt = ["width", "height"], Gt = ["clip-path"], Ut = {
1082
1082
  },
1083
1083
  emits: ["close", "expand", "collapse"],
1084
1084
  setup(e) {
1085
- const { t: i } = st(), { isMac: a } = Re(), t = E(() => Ie(ee.escape, a)), o = E(() => Ie(ee.mod.backslash, a)), l = E(() => t.value.aria), C = E(() => o.value.aria);
1085
+ const { t: r } = st(), { isMac: a } = Re(), t = E(() => Ie(ee.escape, a)), o = E(() => Ie(ee.mod.backslash, a)), l = E(() => t.value.aria), C = E(() => o.value.aria);
1086
1086
  return (d, s) => (I(), k("div", qt, [
1087
1087
  A("div", Zt, [
1088
1088
  L(Ve, {
@@ -1103,7 +1103,7 @@ const Rt = ["width", "height"], Gt = ["clip-path"], Ut = {
1103
1103
  }, {
1104
1104
  tooltip: G(() => [
1105
1105
  A("span", en, [
1106
- be(z(O(i)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.RESTORE")) + " ", 1),
1106
+ be(z(O(r)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.RESTORE")) + " ", 1),
1107
1107
  L(Be, {
1108
1108
  parts: o.value.parts,
1109
1109
  separated: !O(a)
@@ -1115,7 +1115,7 @@ const Rt = ["width", "height"], Gt = ["clip-path"], Ut = {
1115
1115
  class: "vc-ai-agent-header__button",
1116
1116
  role: "button",
1117
1117
  tabindex: "0",
1118
- "aria-label": O(i)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.RESTORE"),
1118
+ "aria-label": O(r)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.RESTORE"),
1119
1119
  "aria-keyshortcuts": C.value,
1120
1120
  onClick: s[0] || (s[0] = (u) => d.$emit("collapse")),
1121
1121
  onKeydown: [
@@ -1133,7 +1133,7 @@ const Rt = ["width", "height"], Gt = ["clip-path"], Ut = {
1133
1133
  }, {
1134
1134
  tooltip: G(() => [
1135
1135
  A("span", nn, [
1136
- be(z(O(i)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.MAXIMIZE")) + " ", 1),
1136
+ be(z(O(r)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.MAXIMIZE")) + " ", 1),
1137
1137
  L(Be, {
1138
1138
  parts: o.value.parts,
1139
1139
  separated: !O(a)
@@ -1145,7 +1145,7 @@ const Rt = ["width", "height"], Gt = ["clip-path"], Ut = {
1145
1145
  class: "vc-ai-agent-header__button",
1146
1146
  role: "button",
1147
1147
  tabindex: "0",
1148
- "aria-label": O(i)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.MAXIMIZE"),
1148
+ "aria-label": O(r)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.MAXIMIZE"),
1149
1149
  "aria-keyshortcuts": C.value,
1150
1150
  onClick: s[3] || (s[3] = (u) => d.$emit("expand")),
1151
1151
  onKeydown: [
@@ -1161,7 +1161,7 @@ const Rt = ["width", "height"], Gt = ["clip-path"], Ut = {
1161
1161
  L(O(Ae), { placement: "bottom" }, {
1162
1162
  tooltip: G(() => [
1163
1163
  A("span", on, [
1164
- be(z(O(i)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.CLOSE")) + " ", 1),
1164
+ be(z(O(r)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.CLOSE")) + " ", 1),
1165
1165
  L(Be, {
1166
1166
  parts: t.value.parts,
1167
1167
  separated: !O(a)
@@ -1173,7 +1173,7 @@ const Rt = ["width", "height"], Gt = ["clip-path"], Ut = {
1173
1173
  class: "vc-ai-agent-header__button",
1174
1174
  role: "button",
1175
1175
  tabindex: "0",
1176
- "aria-label": O(i)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.CLOSE"),
1176
+ "aria-label": O(r)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.CLOSE"),
1177
1177
  "aria-keyshortcuts": l.value,
1178
1178
  onClick: s[6] || (s[6] = (u) => d.$emit("close")),
1179
1179
  onKeydown: [
@@ -1198,7 +1198,7 @@ const Rt = ["width", "height"], Gt = ["clip-path"], Ut = {
1198
1198
  text: {}
1199
1199
  },
1200
1200
  setup(e) {
1201
- return (i, a) => (I(), k("div", sn, [
1201
+ return (r, a) => (I(), k("div", sn, [
1202
1202
  A("div", ln, [
1203
1203
  A("div", cn, [
1204
1204
  L(Ve, {
@@ -1220,8 +1220,8 @@ const Rt = ["width", "height"], Gt = ["clip-path"], Ut = {
1220
1220
  url: {}
1221
1221
  },
1222
1222
  emits: ["iframe-ready"],
1223
- setup(e, { emit: i }) {
1224
- const a = Y("ai-agent-iframe"), t = e, o = i, l = N(null), C = N(!0);
1223
+ setup(e, { emit: r }) {
1224
+ const a = Y("ai-agent-iframe"), t = e, o = r, l = N(null), C = N(!0);
1225
1225
  q(
1226
1226
  l,
1227
1227
  (s) => {
@@ -1272,20 +1272,20 @@ const Rt = ["width", "height"], Gt = ["clip-path"], Ut = {
1272
1272
  inert: { type: Boolean }
1273
1273
  },
1274
1274
  setup(e) {
1275
- const { isMac: i } = Re(), a = F(xe), t = F(it, !1);
1275
+ const { isMac: r } = Re(), a = F(xe), t = F(rt, !1);
1276
1276
  a || console.error("[VcAiAgentPanel] AiAgentService not provided");
1277
1277
  const o = E(
1278
1278
  () => a?.config.value ?? { url: "", title: "AI Assistant", width: 362, expandedWidth: 500 }
1279
1279
  ), l = E(() => !t && (a?.isOpen.value ?? !1)), C = E(() => a?.isExpanded.value ?? !1), d = E(() => a?.totalItemsCount.value ?? 0), s = E(() => ({
1280
1280
  width: C.value ? `${o.value.expandedWidth ?? 500}px` : `${o.value.width ?? 362}px`
1281
1281
  })), u = () => a?.closePanel(), g = () => a?.expandPanel(), p = () => a?.collapsePanel(), f = N(null);
1282
- rt(document, "keydown", (v) => {
1282
+ it(document, "keydown", (v) => {
1283
1283
  if (l.value && !v.isComposing && !v.defaultPrevented) {
1284
1284
  if (v.key === "Escape") {
1285
1285
  v.preventDefault(), u();
1286
1286
  return;
1287
1287
  }
1288
- if (Bt(ee.mod.backslash, v, i)) {
1288
+ if (Bt(ee.mod.backslash, v, r)) {
1289
1289
  const _ = document.activeElement;
1290
1290
  if (!_ || !f.value?.contains(_)) return;
1291
1291
  v.preventDefault(), C.value ? p() : g();