@eka-care/medassist-widget 0.1.121-dev.0 → 0.1.121
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/medassist-widget.js +445 -447
- package/package.json +1 -1
package/dist/medassist-widget.js
CHANGED
|
@@ -6,7 +6,7 @@ function ut(e, t) {
|
|
|
6
6
|
function To(e) {
|
|
7
7
|
e && e.parentNode && e.parentNode.removeChild(e);
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function qe(e, t, n) {
|
|
10
10
|
var r, o, s, l = {};
|
|
11
11
|
for (s in t) s == "key" ? r = t[s] : s == "ref" ? o = t[s] : l[s] = t[s];
|
|
12
12
|
if (arguments.length > 2 && (l.children = arguments.length > 3 ? Kn.call(arguments, 2) : n), typeof e == "function" && e.defaultProps != null) for (s in e.defaultProps) l[s] === void 0 && (l[s] = e.defaultProps[s]);
|
|
@@ -223,7 +223,7 @@ function nc(e, t, n) {
|
|
|
223
223
|
}
|
|
224
224
|
function jn(e, t, n) {
|
|
225
225
|
var r, o, s, l;
|
|
226
|
-
t == document && (t = document.documentElement), q.__ && q.__(e, t), o = (r = typeof n == "function") ? null : n && n.__k || t.__k, s = [], l = [], No(t, e = (!r && n || t).__k =
|
|
226
|
+
t == document && (t = document.documentElement), q.__ && q.__(e, t), o = (r = typeof n == "function") ? null : n && n.__k || t.__k, s = [], l = [], No(t, e = (!r && n || t).__k = qe(pe, null, [e]), o || yr, yr, t.namespaceURI, !r && n ? [n] : o ? null : t.firstChild ? Kn.call(t.childNodes) : null, s, !r && n ? n : o ? o.__e : t.firstChild, r, l), ca(s, e, l);
|
|
227
227
|
}
|
|
228
228
|
function ha(e, t) {
|
|
229
229
|
jn(e, t, ha);
|
|
@@ -500,7 +500,7 @@ function Fo(e, t) {
|
|
|
500
500
|
return s != o.ref && s && (typeof s == "function" ? s(null) : s.current = null), t ? !t(this.props, o) || s != o.ref : mo(this.props, o);
|
|
501
501
|
}
|
|
502
502
|
function r(o) {
|
|
503
|
-
return this.shouldComponentUpdate = n,
|
|
503
|
+
return this.shouldComponentUpdate = n, qe(e, o);
|
|
504
504
|
}
|
|
505
505
|
return r.displayName = "Memo(" + (e.displayName || e.name) + ")", r.__f = r.prototype.isReactComponent = !0, r.type = e, r;
|
|
506
506
|
}
|
|
@@ -521,7 +521,7 @@ function J(e) {
|
|
|
521
521
|
}
|
|
522
522
|
var vs = function(e, t) {
|
|
523
523
|
return e == null ? null : bt(bt(e).map(t));
|
|
524
|
-
},
|
|
524
|
+
}, Je = { map: vs, forEach: vs, count: function(e) {
|
|
525
525
|
return e ? bt(e).length : 0;
|
|
526
526
|
}, only: function(e) {
|
|
527
527
|
var t = bt(e);
|
|
@@ -554,7 +554,7 @@ function Ea(e) {
|
|
|
554
554
|
var t = e.__ && e.__.__c;
|
|
555
555
|
return t && t.__a && t.__a(e);
|
|
556
556
|
}
|
|
557
|
-
function
|
|
557
|
+
function Ke(e) {
|
|
558
558
|
var t, n, r, o = null;
|
|
559
559
|
function s(l) {
|
|
560
560
|
if (t || (t = e()).then(function(i) {
|
|
@@ -563,7 +563,7 @@ function qe(e) {
|
|
|
563
563
|
n = i, r = !0;
|
|
564
564
|
}), n) throw n;
|
|
565
565
|
if (!r) throw t;
|
|
566
|
-
return o ?
|
|
566
|
+
return o ? qe(o, l) : null;
|
|
567
567
|
}
|
|
568
568
|
return s.displayName = "Lazy", s.__f = !0, s;
|
|
569
569
|
}
|
|
@@ -603,8 +603,8 @@ q.unmount = function(e) {
|
|
|
603
603
|
}
|
|
604
604
|
this.__b = null;
|
|
605
605
|
}
|
|
606
|
-
var o = t.__a &&
|
|
607
|
-
return o && (o.__u &= -33), [
|
|
606
|
+
var o = t.__a && qe(pe, null, e.fallback);
|
|
607
|
+
return o && (o.__u &= -33), [qe(pe, null, t.__a ? null : e.children), o];
|
|
608
608
|
};
|
|
609
609
|
var Cs = function(e, t, n) {
|
|
610
610
|
if (++n[1] === n[0] && e.l.delete(t), e.props.revealOrder && (e.props.revealOrder[0] !== "t" || !e.l.size)) for (n = e.i; n; ) {
|
|
@@ -632,10 +632,10 @@ function uc(e) {
|
|
|
632
632
|
this.childNodes.splice(this.childNodes.indexOf(o) >>> 1, 1), t.h.removeChild(o);
|
|
633
633
|
} };
|
|
634
634
|
}
|
|
635
|
-
jn(
|
|
635
|
+
jn(qe(dc, { context: t.context }, e.__v), t.v);
|
|
636
636
|
}
|
|
637
637
|
function ya(e, t) {
|
|
638
|
-
var n =
|
|
638
|
+
var n = qe(uc, { __v: e, h: t });
|
|
639
639
|
return n.containerInfo = t, n;
|
|
640
640
|
}
|
|
641
641
|
(en.prototype = new rt()).__a = function(e) {
|
|
@@ -717,19 +717,19 @@ var va = { ReactCurrentDispatcher: { current: { readContext: function(e) {
|
|
|
717
717
|
return Vo.__n[e.__c].props.value;
|
|
718
718
|
}, useCallback: le, useContext: Ct, useDebugValue: ko, useDeferredValue: Po, useEffect: z, useId: Ao, useImperativeHandle: Ro, useInsertionEffect: Do, useLayoutEffect: wt, useMemo: fe, useReducer: ln, useRef: W, useState: F, useSyncExternalStore: Io, useTransition: Lo } } }, Ec = "18.3.1";
|
|
719
719
|
function wa(e) {
|
|
720
|
-
return
|
|
720
|
+
return qe.bind(null, e);
|
|
721
721
|
}
|
|
722
|
-
function
|
|
722
|
+
function Qe(e) {
|
|
723
723
|
return !!e && e.$$typeof === ba;
|
|
724
724
|
}
|
|
725
725
|
function Ca(e) {
|
|
726
|
-
return
|
|
726
|
+
return Qe(e) && e.type === pe;
|
|
727
727
|
}
|
|
728
728
|
function Ta(e) {
|
|
729
729
|
return !!e && typeof e.displayName == "string" && e.displayName.indexOf("Memo(") == 0;
|
|
730
730
|
}
|
|
731
731
|
function At(e) {
|
|
732
|
-
return
|
|
732
|
+
return Qe(e) ? rc.apply(null, arguments) : e;
|
|
733
733
|
}
|
|
734
734
|
function zo(e) {
|
|
735
735
|
return !!e.__k && (jn(null, e), !0);
|
|
@@ -746,8 +746,8 @@ var xa = function(e, t) {
|
|
|
746
746
|
};
|
|
747
747
|
var r = e(t);
|
|
748
748
|
return q.debounceRendering = n, r;
|
|
749
|
-
}, ka =
|
|
750
|
-
const Aa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, Children:
|
|
749
|
+
}, ka = Qe, zn = { useState: F, useId: Ao, useReducer: ln, useEffect: z, useLayoutEffect: wt, useInsertionEffect: Do, useTransition: Lo, useDeferredValue: Po, useSyncExternalStore: Io, startTransition: Mo, useRef: W, useImperativeHandle: Ro, useMemo: fe, useCallback: le, useContext: Ct, useDebugValue: ko, version: "18.3.1", Children: Je, render: Uo, hydrate: Sa, unmountComponentAtNode: zo, createPortal: ya, createElement: qe, createContext: St, createFactory: wa, cloneElement: At, createRef: sa, Fragment: pe, isValidElement: Qe, isElement: ka, isFragment: Ca, isMemo: Ta, findDOMNode: Na, Component: rt, PureComponent: vr, memo: Fo, forwardRef: J, flushSync: Ra, unstable_batchedUpdates: xa, StrictMode: pe, Suspense: Le, SuspenseList: en, lazy: Ke, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: va };
|
|
750
|
+
const Aa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, Children: Je, Component: rt, Fragment: pe, PureComponent: vr, StrictMode: pe, Suspense: Le, SuspenseList: en, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: va, cloneElement: At, createContext: St, createElement: qe, createFactory: wa, createPortal: ya, createRef: sa, default: zn, findDOMNode: Na, flushSync: Ra, forwardRef: J, hydrate: Sa, isElement: ka, isFragment: Ca, isMemo: Ta, isValidElement: Qe, lazy: Ke, memo: Fo, render: Uo, startTransition: Mo, unmountComponentAtNode: zo, unstable_batchedUpdates: xa, useCallback: le, useContext: Ct, useDebugValue: ko, useDeferredValue: Po, useEffect: z, useErrorBoundary: sc, useId: Ao, useImperativeHandle: Ro, useInsertionEffect: Do, useLayoutEffect: wt, useMemo: fe, useReducer: ln, useRef: W, useState: F, useSyncExternalStore: Io, useTransition: Lo, version: Ec }, Symbol.toStringTag, { value: "Module" }));
|
|
751
751
|
function yc(e) {
|
|
752
752
|
return {
|
|
753
753
|
// eslint-disable-next-line
|
|
@@ -787,10 +787,10 @@ function qt(...e) {
|
|
|
787
787
|
// @__NO_SIDE_EFFECTS__
|
|
788
788
|
function bc(e) {
|
|
789
789
|
const t = /* @__PURE__ */ Sc(e), n = J((r, o) => {
|
|
790
|
-
const { children: s, ...l } = r, i =
|
|
790
|
+
const { children: s, ...l } = r, i = Je.toArray(s), c = i.find(wc);
|
|
791
791
|
if (c) {
|
|
792
|
-
const d = c.props.children, f = i.map((u) => u === c ?
|
|
793
|
-
return /* @__PURE__ */ a(t, { ...l, ref: o, children:
|
|
792
|
+
const d = c.props.children, f = i.map((u) => u === c ? Je.count(d) > 1 ? Je.only(null) : Qe(d) ? d.props.children : null : u);
|
|
793
|
+
return /* @__PURE__ */ a(t, { ...l, ref: o, children: Qe(d) ? At(d, void 0, f) : null });
|
|
794
794
|
}
|
|
795
795
|
return /* @__PURE__ */ a(t, { ...l, ref: o, children: s });
|
|
796
796
|
});
|
|
@@ -800,17 +800,17 @@ function bc(e) {
|
|
|
800
800
|
function Sc(e) {
|
|
801
801
|
const t = J((n, r) => {
|
|
802
802
|
const { children: o, ...s } = n;
|
|
803
|
-
if (
|
|
803
|
+
if (Qe(o)) {
|
|
804
804
|
const l = Tc(o), i = Cc(s, o.props);
|
|
805
805
|
return o.type !== pe && (i.ref = r ? Bo(r, l) : l), At(o, i);
|
|
806
806
|
}
|
|
807
|
-
return
|
|
807
|
+
return Je.count(o) > 1 ? Je.only(null) : null;
|
|
808
808
|
});
|
|
809
809
|
return t.displayName = `${e}.SlotClone`, t;
|
|
810
810
|
}
|
|
811
811
|
var vc = Symbol("radix.slottable");
|
|
812
812
|
function wc(e) {
|
|
813
|
-
return
|
|
813
|
+
return Qe(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === vc;
|
|
814
814
|
}
|
|
815
815
|
function Cc(e, t) {
|
|
816
816
|
const n = { ...t };
|
|
@@ -857,7 +857,7 @@ function xc(e, t) {
|
|
|
857
857
|
return ln((n, r) => t[n][r] ?? n, e);
|
|
858
858
|
}
|
|
859
859
|
var Jn = (e) => {
|
|
860
|
-
const { present: t, children: n } = e, r = Rc(t), o = typeof n == "function" ? n({ present: r.isPresent }) :
|
|
860
|
+
const { present: t, children: n } = e, r = Rc(t), o = typeof n == "function" ? n({ present: r.isPresent }) : Je.only(n), s = qt(r.ref, kc(o));
|
|
861
861
|
return typeof n == "function" || r.isPresent ? At(o, { ref: s }) : null;
|
|
862
862
|
};
|
|
863
863
|
Jn.displayName = "Presence";
|
|
@@ -1677,7 +1677,7 @@ function Wo() {
|
|
|
1677
1677
|
return En.BaseConnection = n, En;
|
|
1678
1678
|
}
|
|
1679
1679
|
var zr = {}, Ps;
|
|
1680
|
-
function
|
|
1680
|
+
function et() {
|
|
1681
1681
|
return Ps || (Ps = 1, (function(e) {
|
|
1682
1682
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.ValidationError = e.ConfigurationError = e.StoreError = e.MessageError = e.SessionError = e.FileError = e.AuthenticationError = e.RecordingError = e.ConnectionError = e.InternalServerError = e.RateLimitError = e.MethodNotAllowedError = e.NotFoundError = e.PermissionDeniedError = e.UnauthorizedError = e.BadRequestError = e.APIConnectionTimeoutError = e.APIUserAbortError = e.APIError = e.SynapseError = e.SynapseErrorCode = void 0, e.normalizeError = w, e.SynapseErrorCode = {
|
|
1683
1683
|
API: "API_ERROR",
|
|
@@ -1893,7 +1893,7 @@ var Ls;
|
|
|
1893
1893
|
function ja() {
|
|
1894
1894
|
if (Ls) return _n;
|
|
1895
1895
|
Ls = 1, Object.defineProperty(_n, "__esModule", { value: !0 }), _n.WebSocketConnection = void 0;
|
|
1896
|
-
const e = /* @__PURE__ */ Wo(), t = /* @__PURE__ */ Qn(), n = /* @__PURE__ */
|
|
1896
|
+
const e = /* @__PURE__ */ Wo(), t = /* @__PURE__ */ Qn(), n = /* @__PURE__ */ et();
|
|
1897
1897
|
class r extends e.BaseConnection {
|
|
1898
1898
|
conversationId;
|
|
1899
1899
|
socket = null;
|
|
@@ -2011,7 +2011,7 @@ var bn = {}, Ds;
|
|
|
2011
2011
|
function Ya() {
|
|
2012
2012
|
if (Ds) return bn;
|
|
2013
2013
|
Ds = 1, Object.defineProperty(bn, "__esModule", { value: !0 }), bn.SSEConnection = void 0;
|
|
2014
|
-
const e = /* @__PURE__ */ Wo(), t = /* @__PURE__ */ Qn(), n = /* @__PURE__ */
|
|
2014
|
+
const e = /* @__PURE__ */ Wo(), t = /* @__PURE__ */ Qn(), n = /* @__PURE__ */ et();
|
|
2015
2015
|
class r extends e.BaseConnection {
|
|
2016
2016
|
conversationId;
|
|
2017
2017
|
config;
|
|
@@ -2180,7 +2180,7 @@ var Fs;
|
|
|
2180
2180
|
function Ga() {
|
|
2181
2181
|
return Fs || (Fs = 1, (function(e) {
|
|
2182
2182
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.ConnectionFactory = e.ConnectionType = void 0;
|
|
2183
|
-
const t = /* @__PURE__ */ ja(), n = /* @__PURE__ */ Ya(), r = /* @__PURE__ */
|
|
2183
|
+
const t = /* @__PURE__ */ ja(), n = /* @__PURE__ */ Ya(), r = /* @__PURE__ */ et();
|
|
2184
2184
|
e.ConnectionType = {
|
|
2185
2185
|
SOCKET: "socket",
|
|
2186
2186
|
HTTP_STREAM: "http_stream"
|
|
@@ -2226,7 +2226,7 @@ var vn = {}, wn = {}, Vs;
|
|
|
2226
2226
|
function qo() {
|
|
2227
2227
|
if (Vs) return wn;
|
|
2228
2228
|
Vs = 1, Object.defineProperty(wn, "__esModule", { value: !0 }), wn.HttpClient = void 0;
|
|
2229
|
-
const e = /* @__PURE__ */
|
|
2229
|
+
const e = /* @__PURE__ */ et();
|
|
2230
2230
|
let t = class {
|
|
2231
2231
|
baseUrl;
|
|
2232
2232
|
headers;
|
|
@@ -2519,7 +2519,7 @@ var Ys;
|
|
|
2519
2519
|
function Zc() {
|
|
2520
2520
|
if (Ys) return Rn;
|
|
2521
2521
|
Ys = 1, Object.defineProperty(Rn, "__esModule", { value: !0 }), Rn.TokenManager = void 0;
|
|
2522
|
-
const e = /* @__PURE__ */
|
|
2522
|
+
const e = /* @__PURE__ */ et(), t = /* @__PURE__ */ Ka();
|
|
2523
2523
|
let n = class {
|
|
2524
2524
|
auth;
|
|
2525
2525
|
httpClient;
|
|
@@ -2683,7 +2683,7 @@ var Ws;
|
|
|
2683
2683
|
function Za() {
|
|
2684
2684
|
if (Ws) return vn;
|
|
2685
2685
|
Ws = 1, Object.defineProperty(vn, "__esModule", { value: !0 }), vn.ResourceManager = void 0;
|
|
2686
|
-
const e = /* @__PURE__ */ qo(), t = /* @__PURE__ */ qa(), n = /* @__PURE__ */
|
|
2686
|
+
const e = /* @__PURE__ */ qo(), t = /* @__PURE__ */ qa(), n = /* @__PURE__ */ et(), r = /* @__PURE__ */ Kc(), o = /* @__PURE__ */ Ko(), s = /* @__PURE__ */ Zc(), l = /* @__PURE__ */ Xc();
|
|
2687
2687
|
class i {
|
|
2688
2688
|
resourceConfig;
|
|
2689
2689
|
httpClient;
|
|
@@ -2916,7 +2916,7 @@ var Hr = {}, Ks;
|
|
|
2916
2916
|
function Jc() {
|
|
2917
2917
|
return Ks || (Ks = 1, (function(e) {
|
|
2918
2918
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.Filemanager = e.MAX_FILE_SIZE = void 0;
|
|
2919
|
-
const t = /* @__PURE__ */
|
|
2919
|
+
const t = /* @__PURE__ */ et();
|
|
2920
2920
|
e.MAX_FILE_SIZE = 3 * 1024 * 1024;
|
|
2921
2921
|
class n {
|
|
2922
2922
|
pendingFiles = [];
|
|
@@ -3102,7 +3102,7 @@ var On = {}, Xs;
|
|
|
3102
3102
|
function Qc() {
|
|
3103
3103
|
if (Xs) return On;
|
|
3104
3104
|
Xs = 1, Object.defineProperty(On, "__esModule", { value: !0 }), On.AudioManager = void 0;
|
|
3105
|
-
const e = /* @__PURE__ */
|
|
3105
|
+
const e = /* @__PURE__ */ et();
|
|
3106
3106
|
class t {
|
|
3107
3107
|
mediaRecorder = null;
|
|
3108
3108
|
mediaStream = null;
|
|
@@ -3317,7 +3317,7 @@ var Js;
|
|
|
3317
3317
|
function Xa() {
|
|
3318
3318
|
if (Js) return An;
|
|
3319
3319
|
Js = 1, Object.defineProperty(An, "__esModule", { value: !0 }), An.MessageManager = void 0;
|
|
3320
|
-
const e = /* @__PURE__ */ Zo(), t = /* @__PURE__ */ Jc(), n = /* @__PURE__ */ Tr(), r = /* @__PURE__ */ Qc(), o = /* @__PURE__ */
|
|
3320
|
+
const e = /* @__PURE__ */ Zo(), t = /* @__PURE__ */ Jc(), n = /* @__PURE__ */ Tr(), r = /* @__PURE__ */ Qc(), o = /* @__PURE__ */ et();
|
|
3321
3321
|
let s = class {
|
|
3322
3322
|
connection = null;
|
|
3323
3323
|
callbacks = null;
|
|
@@ -3828,7 +3828,7 @@ var ri;
|
|
|
3828
3828
|
function nd() {
|
|
3829
3829
|
if (ri) return In;
|
|
3830
3830
|
ri = 1, Object.defineProperty(In, "__esModule", { value: !0 }), In.VoiceAgent = void 0;
|
|
3831
|
-
const e = /* @__PURE__ */ Go(), t = /* @__PURE__ */ td(), n = /* @__PURE__ */
|
|
3831
|
+
const e = /* @__PURE__ */ Go(), t = /* @__PURE__ */ td(), n = /* @__PURE__ */ et(), r = /* @__PURE__ */ Qa(), o = 3e3, s = 8, l = 3600 * 1e3, i = 600;
|
|
3832
3832
|
function c(f, u) {
|
|
3833
3833
|
return new Promise((p) => {
|
|
3834
3834
|
if (f.iceGatheringState === "complete") {
|
|
@@ -4015,7 +4015,7 @@ var oi;
|
|
|
4015
4015
|
function rd() {
|
|
4016
4016
|
if (oi) return gn;
|
|
4017
4017
|
oi = 1, Object.defineProperty(gn, "__esModule", { value: !0 }), gn.SynapseSDK = void 0;
|
|
4018
|
-
const e = /* @__PURE__ */ Ga(), t = /* @__PURE__ */ Qn(), n = /* @__PURE__ */ Wa(), r = /* @__PURE__ */ Za(), o = /* @__PURE__ */ Xa(), s = /* @__PURE__ */ Tr(), l = /* @__PURE__ */ Go(), i = /* @__PURE__ */
|
|
4018
|
+
const e = /* @__PURE__ */ Ga(), t = /* @__PURE__ */ Qn(), n = /* @__PURE__ */ Wa(), r = /* @__PURE__ */ Za(), o = /* @__PURE__ */ Xa(), s = /* @__PURE__ */ Tr(), l = /* @__PURE__ */ Go(), i = /* @__PURE__ */ et(), c = /* @__PURE__ */ Ja(), d = /* @__PURE__ */ ed(), f = /* @__PURE__ */ Zo(), u = /* @__PURE__ */ nd();
|
|
4019
4019
|
class p {
|
|
4020
4020
|
connection = null;
|
|
4021
4021
|
messageManager;
|
|
@@ -4819,34 +4819,34 @@ function ad() {
|
|
|
4819
4819
|
};
|
|
4820
4820
|
return Ln.ToolCall = t, Ln;
|
|
4821
4821
|
}
|
|
4822
|
-
var
|
|
4822
|
+
var He = {}, ci;
|
|
4823
4823
|
function ld() {
|
|
4824
|
-
if (ci) return
|
|
4825
|
-
ci = 1, Object.defineProperty(
|
|
4824
|
+
if (ci) return He;
|
|
4825
|
+
ci = 1, Object.defineProperty(He, "__esModule", { value: !0 }), He.SYNAPSE_EICITATION_STATUS = He.SYNAPSE_CTA_ACTIONS = He.SYNAPSE_TOOL_FORMATS = He.SYNAPSE_TOOL_CALLBACK_NAME = He.SYNAPSE_COMPONENTS = He.SYNAPSE_TOOL_NAME = void 0;
|
|
4826
4826
|
var e;
|
|
4827
4827
|
(function(l) {
|
|
4828
4828
|
l.MOBILE_VERIFICATION = "mobile_verification", l.AVAILABILITY_DATES = "availability_dates", l.AVAILABILITY_SLOTS = "availability_slots", l.DOCTOR_AVAILABILITY = "doctor_availability", l.DOCTOR_DETAILS = "doctor_details", l.GET_LOCATION = "get_location";
|
|
4829
|
-
})(e || (
|
|
4829
|
+
})(e || (He.SYNAPSE_TOOL_NAME = e = {}));
|
|
4830
4830
|
var t;
|
|
4831
4831
|
(function(l) {
|
|
4832
4832
|
l.MOBILE = "mobile_number", l.OTP = "otp", l.EMAIL = "email_address", l.PILL = "pills", l.MULTI = "multi", l.DOCTOR_CARD = "doctor_card", l.CARD = "card", l.MEDIA_CARD = "media_card";
|
|
4833
|
-
})(t || (
|
|
4833
|
+
})(t || (He.SYNAPSE_COMPONENTS = t = {}));
|
|
4834
4834
|
var n;
|
|
4835
4835
|
(function(l) {
|
|
4836
4836
|
l.DOCTOR_AVAILABILITY = "get_doctor_availability", l.AVAILABILITY_DATES = "get_available_dates", l.AVAILABILITY_SLOTS = "get_available_slots", l.MOBILE_VERIFICATION = "verify_mobile_number", l.DOCTOR_DETAILS = "get_doctor_details";
|
|
4837
|
-
})(n || (
|
|
4837
|
+
})(n || (He.SYNAPSE_TOOL_CALLBACK_NAME = n = {}));
|
|
4838
4838
|
var r;
|
|
4839
4839
|
(function(l) {
|
|
4840
4840
|
l.DEFAULT = "default", l.CUSTOM = "custom";
|
|
4841
|
-
})(r || (
|
|
4841
|
+
})(r || (He.SYNAPSE_TOOL_FORMATS = r = {}));
|
|
4842
4842
|
var o;
|
|
4843
4843
|
(function(l) {
|
|
4844
4844
|
l.TOOL_CALL = "tool_call", l.PROMPT = "prompt";
|
|
4845
|
-
})(o || (
|
|
4845
|
+
})(o || (He.SYNAPSE_CTA_ACTIONS = o = {}));
|
|
4846
4846
|
var s;
|
|
4847
4847
|
return (function(l) {
|
|
4848
4848
|
l.PROGRESS = "progress", l.SUCCESS = "success", l.FAILURE = "failure";
|
|
4849
|
-
})(s || (
|
|
4849
|
+
})(s || (He.SYNAPSE_EICITATION_STATUS = s = {})), He;
|
|
4850
4850
|
}
|
|
4851
4851
|
var Wr = {}, di;
|
|
4852
4852
|
function cd() {
|
|
@@ -4856,7 +4856,7 @@ var Dn = {}, ui;
|
|
|
4856
4856
|
function dd() {
|
|
4857
4857
|
if (ui) return Dn;
|
|
4858
4858
|
ui = 1, Object.defineProperty(Dn, "__esModule", { value: !0 }), Dn.ErrorUtils = void 0;
|
|
4859
|
-
const e = /* @__PURE__ */
|
|
4859
|
+
const e = /* @__PURE__ */ et();
|
|
4860
4860
|
class t {
|
|
4861
4861
|
/**
|
|
4862
4862
|
* Check if an error is a specific API error type
|
|
@@ -5028,7 +5028,7 @@ function md() {
|
|
|
5028
5028
|
Object.defineProperty(e, "HttpClient", { enumerable: !0, get: function() {
|
|
5029
5029
|
return m.HttpClient;
|
|
5030
5030
|
} });
|
|
5031
|
-
var g = /* @__PURE__ */
|
|
5031
|
+
var g = /* @__PURE__ */ et();
|
|
5032
5032
|
Object.defineProperty(e, "SynapseError", { enumerable: !0, get: function() {
|
|
5033
5033
|
return g.SynapseError;
|
|
5034
5034
|
} }), Object.defineProperty(e, "APIError", { enumerable: !0, get: function() {
|
|
@@ -5390,13 +5390,13 @@ const pd = (e, t) => {
|
|
|
5390
5390
|
"left-bottom"
|
|
5391
5391
|
], w = () => [...N(), V, U], C = () => ["auto", "hidden", "clip", "visible", "scroll"], v = () => ["auto", "contain", "none"], T = () => [V, U, c], b = () => [Jt, "full", "auto", ...T()], k = () => [Nt, "none", "subgrid", V, U], O = () => ["auto", {
|
|
5392
5392
|
span: ["full", Nt, V, U]
|
|
5393
|
-
}, Nt, V, U], A = () => [Nt, "auto", V, U], $ = () => ["auto", "min", "max", "fr", V, U], re = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], K = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], ue = () => ["auto", ...T()], oe = () => [Jt, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...T()],
|
|
5393
|
+
}, Nt, V, U], A = () => [Nt, "auto", V, U], $ = () => ["auto", "min", "max", "fr", V, U], re = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], K = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], ue = () => ["auto", ...T()], oe = () => [Jt, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...T()], M = () => [e, V, U], B = () => [...N(), bi, yi, {
|
|
5394
5394
|
position: [V, U]
|
|
5395
5395
|
}], ie = () => ["no-repeat", {
|
|
5396
5396
|
repeat: ["", "x", "y", "space", "round"]
|
|
5397
5397
|
}], H = () => ["auto", "cover", "contain", Xd, qd, {
|
|
5398
5398
|
size: [V, U]
|
|
5399
|
-
}],
|
|
5399
|
+
}], G = () => [Kr, Un, Bt], Z = () => [
|
|
5400
5400
|
// Deprecated since Tailwind CSS v4.0.0
|
|
5401
5401
|
"",
|
|
5402
5402
|
"none",
|
|
@@ -5404,14 +5404,14 @@ const pd = (e, t) => {
|
|
|
5404
5404
|
d,
|
|
5405
5405
|
V,
|
|
5406
5406
|
U
|
|
5407
|
-
], X = () => ["", te, Un, Bt],
|
|
5407
|
+
], X = () => ["", te, Un, Bt], Te = () => ["solid", "dashed", "dotted", "double"], _e = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], ce = () => [te, Kr, bi, yi], Be = () => [
|
|
5408
5408
|
// Deprecated since Tailwind CSS v4.0.0
|
|
5409
5409
|
"",
|
|
5410
5410
|
"none",
|
|
5411
5411
|
m,
|
|
5412
5412
|
V,
|
|
5413
5413
|
U
|
|
5414
|
-
],
|
|
5414
|
+
], Ye = () => ["none", te, V, U], D = () => ["none", te, V, U], ye = () => [te, V, U], he = () => [Jt, "full", ...T()];
|
|
5415
5415
|
return {
|
|
5416
5416
|
cacheSize: 500,
|
|
5417
5417
|
theme: {
|
|
@@ -6226,14 +6226,14 @@ const pd = (e, t) => {
|
|
|
6226
6226
|
* @see https://v3.tailwindcss.com/docs/placeholder-color
|
|
6227
6227
|
*/
|
|
6228
6228
|
"placeholder-color": [{
|
|
6229
|
-
placeholder:
|
|
6229
|
+
placeholder: M()
|
|
6230
6230
|
}],
|
|
6231
6231
|
/**
|
|
6232
6232
|
* Text Color
|
|
6233
6233
|
* @see https://tailwindcss.com/docs/text-color
|
|
6234
6234
|
*/
|
|
6235
6235
|
"text-color": [{
|
|
6236
|
-
text:
|
|
6236
|
+
text: M()
|
|
6237
6237
|
}],
|
|
6238
6238
|
/**
|
|
6239
6239
|
* Text Decoration
|
|
@@ -6245,7 +6245,7 @@ const pd = (e, t) => {
|
|
|
6245
6245
|
* @see https://tailwindcss.com/docs/text-decoration-style
|
|
6246
6246
|
*/
|
|
6247
6247
|
"text-decoration-style": [{
|
|
6248
|
-
decoration: [...
|
|
6248
|
+
decoration: [...Te(), "wavy"]
|
|
6249
6249
|
}],
|
|
6250
6250
|
/**
|
|
6251
6251
|
* Text Decoration Thickness
|
|
@@ -6259,7 +6259,7 @@ const pd = (e, t) => {
|
|
|
6259
6259
|
* @see https://tailwindcss.com/docs/text-decoration-color
|
|
6260
6260
|
*/
|
|
6261
6261
|
"text-decoration-color": [{
|
|
6262
|
-
decoration:
|
|
6262
|
+
decoration: M()
|
|
6263
6263
|
}],
|
|
6264
6264
|
/**
|
|
6265
6265
|
* Text Underline Offset
|
|
@@ -6397,49 +6397,49 @@ const pd = (e, t) => {
|
|
|
6397
6397
|
* @see https://tailwindcss.com/docs/background-color
|
|
6398
6398
|
*/
|
|
6399
6399
|
"bg-color": [{
|
|
6400
|
-
bg:
|
|
6400
|
+
bg: M()
|
|
6401
6401
|
}],
|
|
6402
6402
|
/**
|
|
6403
6403
|
* Gradient Color Stops From Position
|
|
6404
6404
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
6405
6405
|
*/
|
|
6406
6406
|
"gradient-from-pos": [{
|
|
6407
|
-
from:
|
|
6407
|
+
from: G()
|
|
6408
6408
|
}],
|
|
6409
6409
|
/**
|
|
6410
6410
|
* Gradient Color Stops Via Position
|
|
6411
6411
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
6412
6412
|
*/
|
|
6413
6413
|
"gradient-via-pos": [{
|
|
6414
|
-
via:
|
|
6414
|
+
via: G()
|
|
6415
6415
|
}],
|
|
6416
6416
|
/**
|
|
6417
6417
|
* Gradient Color Stops To Position
|
|
6418
6418
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
6419
6419
|
*/
|
|
6420
6420
|
"gradient-to-pos": [{
|
|
6421
|
-
to:
|
|
6421
|
+
to: G()
|
|
6422
6422
|
}],
|
|
6423
6423
|
/**
|
|
6424
6424
|
* Gradient Color Stops From
|
|
6425
6425
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
6426
6426
|
*/
|
|
6427
6427
|
"gradient-from": [{
|
|
6428
|
-
from:
|
|
6428
|
+
from: M()
|
|
6429
6429
|
}],
|
|
6430
6430
|
/**
|
|
6431
6431
|
* Gradient Color Stops Via
|
|
6432
6432
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
6433
6433
|
*/
|
|
6434
6434
|
"gradient-via": [{
|
|
6435
|
-
via:
|
|
6435
|
+
via: M()
|
|
6436
6436
|
}],
|
|
6437
6437
|
/**
|
|
6438
6438
|
* Gradient Color Stops To
|
|
6439
6439
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
6440
6440
|
*/
|
|
6441
6441
|
"gradient-to": [{
|
|
6442
|
-
to:
|
|
6442
|
+
to: M()
|
|
6443
6443
|
}],
|
|
6444
6444
|
// ---------------
|
|
6445
6445
|
// --- Borders ---
|
|
@@ -6641,91 +6641,91 @@ const pd = (e, t) => {
|
|
|
6641
6641
|
* @see https://tailwindcss.com/docs/border-style
|
|
6642
6642
|
*/
|
|
6643
6643
|
"border-style": [{
|
|
6644
|
-
border: [...
|
|
6644
|
+
border: [...Te(), "hidden", "none"]
|
|
6645
6645
|
}],
|
|
6646
6646
|
/**
|
|
6647
6647
|
* Divide Style
|
|
6648
6648
|
* @see https://tailwindcss.com/docs/border-style#setting-the-divider-style
|
|
6649
6649
|
*/
|
|
6650
6650
|
"divide-style": [{
|
|
6651
|
-
divide: [...
|
|
6651
|
+
divide: [...Te(), "hidden", "none"]
|
|
6652
6652
|
}],
|
|
6653
6653
|
/**
|
|
6654
6654
|
* Border Color
|
|
6655
6655
|
* @see https://tailwindcss.com/docs/border-color
|
|
6656
6656
|
*/
|
|
6657
6657
|
"border-color": [{
|
|
6658
|
-
border:
|
|
6658
|
+
border: M()
|
|
6659
6659
|
}],
|
|
6660
6660
|
/**
|
|
6661
6661
|
* Border Color X
|
|
6662
6662
|
* @see https://tailwindcss.com/docs/border-color
|
|
6663
6663
|
*/
|
|
6664
6664
|
"border-color-x": [{
|
|
6665
|
-
"border-x":
|
|
6665
|
+
"border-x": M()
|
|
6666
6666
|
}],
|
|
6667
6667
|
/**
|
|
6668
6668
|
* Border Color Y
|
|
6669
6669
|
* @see https://tailwindcss.com/docs/border-color
|
|
6670
6670
|
*/
|
|
6671
6671
|
"border-color-y": [{
|
|
6672
|
-
"border-y":
|
|
6672
|
+
"border-y": M()
|
|
6673
6673
|
}],
|
|
6674
6674
|
/**
|
|
6675
6675
|
* Border Color S
|
|
6676
6676
|
* @see https://tailwindcss.com/docs/border-color
|
|
6677
6677
|
*/
|
|
6678
6678
|
"border-color-s": [{
|
|
6679
|
-
"border-s":
|
|
6679
|
+
"border-s": M()
|
|
6680
6680
|
}],
|
|
6681
6681
|
/**
|
|
6682
6682
|
* Border Color E
|
|
6683
6683
|
* @see https://tailwindcss.com/docs/border-color
|
|
6684
6684
|
*/
|
|
6685
6685
|
"border-color-e": [{
|
|
6686
|
-
"border-e":
|
|
6686
|
+
"border-e": M()
|
|
6687
6687
|
}],
|
|
6688
6688
|
/**
|
|
6689
6689
|
* Border Color Top
|
|
6690
6690
|
* @see https://tailwindcss.com/docs/border-color
|
|
6691
6691
|
*/
|
|
6692
6692
|
"border-color-t": [{
|
|
6693
|
-
"border-t":
|
|
6693
|
+
"border-t": M()
|
|
6694
6694
|
}],
|
|
6695
6695
|
/**
|
|
6696
6696
|
* Border Color Right
|
|
6697
6697
|
* @see https://tailwindcss.com/docs/border-color
|
|
6698
6698
|
*/
|
|
6699
6699
|
"border-color-r": [{
|
|
6700
|
-
"border-r":
|
|
6700
|
+
"border-r": M()
|
|
6701
6701
|
}],
|
|
6702
6702
|
/**
|
|
6703
6703
|
* Border Color Bottom
|
|
6704
6704
|
* @see https://tailwindcss.com/docs/border-color
|
|
6705
6705
|
*/
|
|
6706
6706
|
"border-color-b": [{
|
|
6707
|
-
"border-b":
|
|
6707
|
+
"border-b": M()
|
|
6708
6708
|
}],
|
|
6709
6709
|
/**
|
|
6710
6710
|
* Border Color Left
|
|
6711
6711
|
* @see https://tailwindcss.com/docs/border-color
|
|
6712
6712
|
*/
|
|
6713
6713
|
"border-color-l": [{
|
|
6714
|
-
"border-l":
|
|
6714
|
+
"border-l": M()
|
|
6715
6715
|
}],
|
|
6716
6716
|
/**
|
|
6717
6717
|
* Divide Color
|
|
6718
6718
|
* @see https://tailwindcss.com/docs/divide-color
|
|
6719
6719
|
*/
|
|
6720
6720
|
"divide-color": [{
|
|
6721
|
-
divide:
|
|
6721
|
+
divide: M()
|
|
6722
6722
|
}],
|
|
6723
6723
|
/**
|
|
6724
6724
|
* Outline Style
|
|
6725
6725
|
* @see https://tailwindcss.com/docs/outline-style
|
|
6726
6726
|
*/
|
|
6727
6727
|
"outline-style": [{
|
|
6728
|
-
outline: [...
|
|
6728
|
+
outline: [...Te(), "none", "hidden"]
|
|
6729
6729
|
}],
|
|
6730
6730
|
/**
|
|
6731
6731
|
* Outline Offset
|
|
@@ -6746,7 +6746,7 @@ const pd = (e, t) => {
|
|
|
6746
6746
|
* @see https://tailwindcss.com/docs/outline-color
|
|
6747
6747
|
*/
|
|
6748
6748
|
"outline-color": [{
|
|
6749
|
-
outline:
|
|
6749
|
+
outline: M()
|
|
6750
6750
|
}],
|
|
6751
6751
|
// ---------------
|
|
6752
6752
|
// --- Effects ---
|
|
@@ -6770,7 +6770,7 @@ const pd = (e, t) => {
|
|
|
6770
6770
|
* @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color
|
|
6771
6771
|
*/
|
|
6772
6772
|
"shadow-color": [{
|
|
6773
|
-
shadow:
|
|
6773
|
+
shadow: M()
|
|
6774
6774
|
}],
|
|
6775
6775
|
/**
|
|
6776
6776
|
* Inset Box Shadow
|
|
@@ -6784,7 +6784,7 @@ const pd = (e, t) => {
|
|
|
6784
6784
|
* @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color
|
|
6785
6785
|
*/
|
|
6786
6786
|
"inset-shadow-color": [{
|
|
6787
|
-
"inset-shadow":
|
|
6787
|
+
"inset-shadow": M()
|
|
6788
6788
|
}],
|
|
6789
6789
|
/**
|
|
6790
6790
|
* Ring Width
|
|
@@ -6805,7 +6805,7 @@ const pd = (e, t) => {
|
|
|
6805
6805
|
* @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color
|
|
6806
6806
|
*/
|
|
6807
6807
|
"ring-color": [{
|
|
6808
|
-
ring:
|
|
6808
|
+
ring: M()
|
|
6809
6809
|
}],
|
|
6810
6810
|
/**
|
|
6811
6811
|
* Ring Offset Width
|
|
@@ -6823,7 +6823,7 @@ const pd = (e, t) => {
|
|
|
6823
6823
|
* @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
|
|
6824
6824
|
*/
|
|
6825
6825
|
"ring-offset-color": [{
|
|
6826
|
-
"ring-offset":
|
|
6826
|
+
"ring-offset": M()
|
|
6827
6827
|
}],
|
|
6828
6828
|
/**
|
|
6829
6829
|
* Inset Ring Width
|
|
@@ -6837,7 +6837,7 @@ const pd = (e, t) => {
|
|
|
6837
6837
|
* @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color
|
|
6838
6838
|
*/
|
|
6839
6839
|
"inset-ring-color": [{
|
|
6840
|
-
"inset-ring":
|
|
6840
|
+
"inset-ring": M()
|
|
6841
6841
|
}],
|
|
6842
6842
|
/**
|
|
6843
6843
|
* Text Shadow
|
|
@@ -6851,7 +6851,7 @@ const pd = (e, t) => {
|
|
|
6851
6851
|
* @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color
|
|
6852
6852
|
*/
|
|
6853
6853
|
"text-shadow-color": [{
|
|
6854
|
-
"text-shadow":
|
|
6854
|
+
"text-shadow": M()
|
|
6855
6855
|
}],
|
|
6856
6856
|
/**
|
|
6857
6857
|
* Opacity
|
|
@@ -6902,10 +6902,10 @@ const pd = (e, t) => {
|
|
|
6902
6902
|
"mask-linear-to": ce()
|
|
6903
6903
|
}],
|
|
6904
6904
|
"mask-image-linear-from-color": [{
|
|
6905
|
-
"mask-linear-from":
|
|
6905
|
+
"mask-linear-from": M()
|
|
6906
6906
|
}],
|
|
6907
6907
|
"mask-image-linear-to-color": [{
|
|
6908
|
-
"mask-linear-to":
|
|
6908
|
+
"mask-linear-to": M()
|
|
6909
6909
|
}],
|
|
6910
6910
|
"mask-image-t-from-pos": [{
|
|
6911
6911
|
"mask-t-from": ce()
|
|
@@ -6914,10 +6914,10 @@ const pd = (e, t) => {
|
|
|
6914
6914
|
"mask-t-to": ce()
|
|
6915
6915
|
}],
|
|
6916
6916
|
"mask-image-t-from-color": [{
|
|
6917
|
-
"mask-t-from":
|
|
6917
|
+
"mask-t-from": M()
|
|
6918
6918
|
}],
|
|
6919
6919
|
"mask-image-t-to-color": [{
|
|
6920
|
-
"mask-t-to":
|
|
6920
|
+
"mask-t-to": M()
|
|
6921
6921
|
}],
|
|
6922
6922
|
"mask-image-r-from-pos": [{
|
|
6923
6923
|
"mask-r-from": ce()
|
|
@@ -6926,10 +6926,10 @@ const pd = (e, t) => {
|
|
|
6926
6926
|
"mask-r-to": ce()
|
|
6927
6927
|
}],
|
|
6928
6928
|
"mask-image-r-from-color": [{
|
|
6929
|
-
"mask-r-from":
|
|
6929
|
+
"mask-r-from": M()
|
|
6930
6930
|
}],
|
|
6931
6931
|
"mask-image-r-to-color": [{
|
|
6932
|
-
"mask-r-to":
|
|
6932
|
+
"mask-r-to": M()
|
|
6933
6933
|
}],
|
|
6934
6934
|
"mask-image-b-from-pos": [{
|
|
6935
6935
|
"mask-b-from": ce()
|
|
@@ -6938,10 +6938,10 @@ const pd = (e, t) => {
|
|
|
6938
6938
|
"mask-b-to": ce()
|
|
6939
6939
|
}],
|
|
6940
6940
|
"mask-image-b-from-color": [{
|
|
6941
|
-
"mask-b-from":
|
|
6941
|
+
"mask-b-from": M()
|
|
6942
6942
|
}],
|
|
6943
6943
|
"mask-image-b-to-color": [{
|
|
6944
|
-
"mask-b-to":
|
|
6944
|
+
"mask-b-to": M()
|
|
6945
6945
|
}],
|
|
6946
6946
|
"mask-image-l-from-pos": [{
|
|
6947
6947
|
"mask-l-from": ce()
|
|
@@ -6950,10 +6950,10 @@ const pd = (e, t) => {
|
|
|
6950
6950
|
"mask-l-to": ce()
|
|
6951
6951
|
}],
|
|
6952
6952
|
"mask-image-l-from-color": [{
|
|
6953
|
-
"mask-l-from":
|
|
6953
|
+
"mask-l-from": M()
|
|
6954
6954
|
}],
|
|
6955
6955
|
"mask-image-l-to-color": [{
|
|
6956
|
-
"mask-l-to":
|
|
6956
|
+
"mask-l-to": M()
|
|
6957
6957
|
}],
|
|
6958
6958
|
"mask-image-x-from-pos": [{
|
|
6959
6959
|
"mask-x-from": ce()
|
|
@@ -6962,10 +6962,10 @@ const pd = (e, t) => {
|
|
|
6962
6962
|
"mask-x-to": ce()
|
|
6963
6963
|
}],
|
|
6964
6964
|
"mask-image-x-from-color": [{
|
|
6965
|
-
"mask-x-from":
|
|
6965
|
+
"mask-x-from": M()
|
|
6966
6966
|
}],
|
|
6967
6967
|
"mask-image-x-to-color": [{
|
|
6968
|
-
"mask-x-to":
|
|
6968
|
+
"mask-x-to": M()
|
|
6969
6969
|
}],
|
|
6970
6970
|
"mask-image-y-from-pos": [{
|
|
6971
6971
|
"mask-y-from": ce()
|
|
@@ -6974,10 +6974,10 @@ const pd = (e, t) => {
|
|
|
6974
6974
|
"mask-y-to": ce()
|
|
6975
6975
|
}],
|
|
6976
6976
|
"mask-image-y-from-color": [{
|
|
6977
|
-
"mask-y-from":
|
|
6977
|
+
"mask-y-from": M()
|
|
6978
6978
|
}],
|
|
6979
6979
|
"mask-image-y-to-color": [{
|
|
6980
|
-
"mask-y-to":
|
|
6980
|
+
"mask-y-to": M()
|
|
6981
6981
|
}],
|
|
6982
6982
|
"mask-image-radial": [{
|
|
6983
6983
|
"mask-radial": [V, U]
|
|
@@ -6989,10 +6989,10 @@ const pd = (e, t) => {
|
|
|
6989
6989
|
"mask-radial-to": ce()
|
|
6990
6990
|
}],
|
|
6991
6991
|
"mask-image-radial-from-color": [{
|
|
6992
|
-
"mask-radial-from":
|
|
6992
|
+
"mask-radial-from": M()
|
|
6993
6993
|
}],
|
|
6994
6994
|
"mask-image-radial-to-color": [{
|
|
6995
|
-
"mask-radial-to":
|
|
6995
|
+
"mask-radial-to": M()
|
|
6996
6996
|
}],
|
|
6997
6997
|
"mask-image-radial-shape": [{
|
|
6998
6998
|
"mask-radial": ["circle", "ellipse"]
|
|
@@ -7016,10 +7016,10 @@ const pd = (e, t) => {
|
|
|
7016
7016
|
"mask-conic-to": ce()
|
|
7017
7017
|
}],
|
|
7018
7018
|
"mask-image-conic-from-color": [{
|
|
7019
|
-
"mask-conic-from":
|
|
7019
|
+
"mask-conic-from": M()
|
|
7020
7020
|
}],
|
|
7021
7021
|
"mask-image-conic-to-color": [{
|
|
7022
|
-
"mask-conic-to":
|
|
7022
|
+
"mask-conic-to": M()
|
|
7023
7023
|
}],
|
|
7024
7024
|
/**
|
|
7025
7025
|
* Mask Mode
|
|
@@ -7091,7 +7091,7 @@ const pd = (e, t) => {
|
|
|
7091
7091
|
* @see https://tailwindcss.com/docs/blur
|
|
7092
7092
|
*/
|
|
7093
7093
|
blur: [{
|
|
7094
|
-
blur:
|
|
7094
|
+
blur: Be()
|
|
7095
7095
|
}],
|
|
7096
7096
|
/**
|
|
7097
7097
|
* Brightness
|
|
@@ -7126,7 +7126,7 @@ const pd = (e, t) => {
|
|
|
7126
7126
|
* @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color
|
|
7127
7127
|
*/
|
|
7128
7128
|
"drop-shadow-color": [{
|
|
7129
|
-
"drop-shadow":
|
|
7129
|
+
"drop-shadow": M()
|
|
7130
7130
|
}],
|
|
7131
7131
|
/**
|
|
7132
7132
|
* Grayscale
|
|
@@ -7181,7 +7181,7 @@ const pd = (e, t) => {
|
|
|
7181
7181
|
* @see https://tailwindcss.com/docs/backdrop-blur
|
|
7182
7182
|
*/
|
|
7183
7183
|
"backdrop-blur": [{
|
|
7184
|
-
"backdrop-blur":
|
|
7184
|
+
"backdrop-blur": Be()
|
|
7185
7185
|
}],
|
|
7186
7186
|
/**
|
|
7187
7187
|
* Backdrop Brightness
|
|
@@ -7358,28 +7358,28 @@ const pd = (e, t) => {
|
|
|
7358
7358
|
* @see https://tailwindcss.com/docs/rotate
|
|
7359
7359
|
*/
|
|
7360
7360
|
rotate: [{
|
|
7361
|
-
rotate:
|
|
7361
|
+
rotate: Ye()
|
|
7362
7362
|
}],
|
|
7363
7363
|
/**
|
|
7364
7364
|
* Rotate X
|
|
7365
7365
|
* @see https://tailwindcss.com/docs/rotate
|
|
7366
7366
|
*/
|
|
7367
7367
|
"rotate-x": [{
|
|
7368
|
-
"rotate-x":
|
|
7368
|
+
"rotate-x": Ye()
|
|
7369
7369
|
}],
|
|
7370
7370
|
/**
|
|
7371
7371
|
* Rotate Y
|
|
7372
7372
|
* @see https://tailwindcss.com/docs/rotate
|
|
7373
7373
|
*/
|
|
7374
7374
|
"rotate-y": [{
|
|
7375
|
-
"rotate-y":
|
|
7375
|
+
"rotate-y": Ye()
|
|
7376
7376
|
}],
|
|
7377
7377
|
/**
|
|
7378
7378
|
* Rotate Z
|
|
7379
7379
|
* @see https://tailwindcss.com/docs/rotate
|
|
7380
7380
|
*/
|
|
7381
7381
|
"rotate-z": [{
|
|
7382
|
-
"rotate-z":
|
|
7382
|
+
"rotate-z": Ye()
|
|
7383
7383
|
}],
|
|
7384
7384
|
/**
|
|
7385
7385
|
* Scale
|
|
@@ -7497,7 +7497,7 @@ const pd = (e, t) => {
|
|
|
7497
7497
|
* @see https://tailwindcss.com/docs/accent-color
|
|
7498
7498
|
*/
|
|
7499
7499
|
accent: [{
|
|
7500
|
-
accent:
|
|
7500
|
+
accent: M()
|
|
7501
7501
|
}],
|
|
7502
7502
|
/**
|
|
7503
7503
|
* Appearance
|
|
@@ -7511,7 +7511,7 @@ const pd = (e, t) => {
|
|
|
7511
7511
|
* @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
|
|
7512
7512
|
*/
|
|
7513
7513
|
"caret-color": [{
|
|
7514
|
-
caret:
|
|
7514
|
+
caret: M()
|
|
7515
7515
|
}],
|
|
7516
7516
|
/**
|
|
7517
7517
|
* Color Scheme
|
|
@@ -7757,7 +7757,7 @@ const pd = (e, t) => {
|
|
|
7757
7757
|
* @see https://tailwindcss.com/docs/fill
|
|
7758
7758
|
*/
|
|
7759
7759
|
fill: [{
|
|
7760
|
-
fill: ["none", ...
|
|
7760
|
+
fill: ["none", ...M()]
|
|
7761
7761
|
}],
|
|
7762
7762
|
/**
|
|
7763
7763
|
* Stroke Width
|
|
@@ -7771,7 +7771,7 @@ const pd = (e, t) => {
|
|
|
7771
7771
|
* @see https://tailwindcss.com/docs/stroke
|
|
7772
7772
|
*/
|
|
7773
7773
|
stroke: [{
|
|
7774
|
-
stroke: ["none", ...
|
|
7774
|
+
stroke: ["none", ...M()]
|
|
7775
7775
|
}],
|
|
7776
7776
|
// ---------------------
|
|
7777
7777
|
// --- Accessibility ---
|
|
@@ -7904,10 +7904,10 @@ function _l(e) {
|
|
|
7904
7904
|
const t = /* @__PURE__ */ lu(e), n = J((r, o) => {
|
|
7905
7905
|
let { children: s, ...l } = r;
|
|
7906
7906
|
gl(s) && typeof xr == "function" && (s = xr(s._payload));
|
|
7907
|
-
const i =
|
|
7907
|
+
const i = Je.toArray(s), c = i.find(du);
|
|
7908
7908
|
if (c) {
|
|
7909
|
-
const d = c.props.children, f = i.map((u) => u === c ?
|
|
7910
|
-
return /* @__PURE__ */ a(t, { ...l, ref: o, children:
|
|
7909
|
+
const d = c.props.children, f = i.map((u) => u === c ? Je.count(d) > 1 ? Je.only(null) : Qe(d) ? d.props.children : null : u);
|
|
7910
|
+
return /* @__PURE__ */ a(t, { ...l, ref: o, children: Qe(d) ? At(d, void 0, f) : null });
|
|
7911
7911
|
}
|
|
7912
7912
|
return /* @__PURE__ */ a(t, { ...l, ref: o, children: s });
|
|
7913
7913
|
});
|
|
@@ -7918,17 +7918,17 @@ var au = /* @__PURE__ */ _l("Slot");
|
|
|
7918
7918
|
function lu(e) {
|
|
7919
7919
|
const t = J((n, r) => {
|
|
7920
7920
|
let { children: o, ...s } = n;
|
|
7921
|
-
if (gl(o) && typeof xr == "function" && (o = xr(o._payload)),
|
|
7921
|
+
if (gl(o) && typeof xr == "function" && (o = xr(o._payload)), Qe(o)) {
|
|
7922
7922
|
const l = hu(o), i = uu(s, o.props);
|
|
7923
7923
|
return o.type !== pe && (i.ref = r ? Bo(r, l) : l), At(o, i);
|
|
7924
7924
|
}
|
|
7925
|
-
return
|
|
7925
|
+
return Je.count(o) > 1 ? Je.only(null) : null;
|
|
7926
7926
|
});
|
|
7927
7927
|
return t.displayName = `${e}.SlotClone`, t;
|
|
7928
7928
|
}
|
|
7929
7929
|
var cu = Symbol("radix.slottable");
|
|
7930
7930
|
function du(e) {
|
|
7931
|
-
return
|
|
7931
|
+
return Qe(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === cu;
|
|
7932
7932
|
}
|
|
7933
7933
|
function uu(e, t) {
|
|
7934
7934
|
const n = { ...t };
|
|
@@ -8041,7 +8041,7 @@ const yu = J(
|
|
|
8041
8041
|
children: s,
|
|
8042
8042
|
iconNode: l,
|
|
8043
8043
|
...i
|
|
8044
|
-
}, c) =>
|
|
8044
|
+
}, c) => qe(
|
|
8045
8045
|
"svg",
|
|
8046
8046
|
{
|
|
8047
8047
|
ref: c,
|
|
@@ -8055,14 +8055,14 @@ const yu = J(
|
|
|
8055
8055
|
...i
|
|
8056
8056
|
},
|
|
8057
8057
|
[
|
|
8058
|
-
...l.map(([d, f]) =>
|
|
8058
|
+
...l.map(([d, f]) => qe(d, f)),
|
|
8059
8059
|
...Array.isArray(s) ? s : [s]
|
|
8060
8060
|
]
|
|
8061
8061
|
)
|
|
8062
8062
|
);
|
|
8063
8063
|
const De = (e, t) => {
|
|
8064
8064
|
const n = J(
|
|
8065
|
-
({ className: r, ...o }, s) =>
|
|
8065
|
+
({ className: r, ...o }, s) => qe(yu, {
|
|
8066
8066
|
ref: s,
|
|
8067
8067
|
iconNode: t,
|
|
8068
8068
|
className: El(
|
|
@@ -8339,7 +8339,7 @@ const _o = (e) => (t) => {
|
|
|
8339
8339
|
USER: "user",
|
|
8340
8340
|
ASSISTANT: "assistant"
|
|
8341
8341
|
};
|
|
8342
|
-
var Ee = /* @__PURE__ */ ((e) => (e.IDLE = "idle", e.LISTENING = "listening", e.ERROR = "error", e.PROCESSING = "processing", e.TRANSCRIBING = "transcribing", e))(Ee || {}),
|
|
8342
|
+
var Ee = /* @__PURE__ */ ((e) => (e.IDLE = "idle", e.LISTENING = "listening", e.ERROR = "error", e.PROCESSING = "processing", e.TRANSCRIBING = "transcribing", e))(Ee || {}), Ce = /* @__PURE__ */ ((e) => (e.CONNECTED = "connected", e.NOT_CONNECTED = "not_connected", e.CONNECTING = "connecting", e))(Ce || {});
|
|
8343
8343
|
let yt = "";
|
|
8344
8344
|
const Wn = (e) => `med-assist-store-${e}`, Qu = (e) => {
|
|
8345
8345
|
yt = Wn(e);
|
|
@@ -8354,7 +8354,7 @@ const Wn = (e) => `med-assist-store-${e}`, Qu = (e) => {
|
|
|
8354
8354
|
showRetryButton: !1,
|
|
8355
8355
|
chats: {},
|
|
8356
8356
|
inlineText: null,
|
|
8357
|
-
connectionStatus:
|
|
8357
|
+
connectionStatus: Ce.CONNECTING,
|
|
8358
8358
|
streamingTimeoutId: null,
|
|
8359
8359
|
responseTimeoutId: null,
|
|
8360
8360
|
lastStreamingActivity: null,
|
|
@@ -8373,7 +8373,7 @@ const Wn = (e) => `med-assist-store-${e}`, Qu = (e) => {
|
|
|
8373
8373
|
userId: "",
|
|
8374
8374
|
level: "",
|
|
8375
8375
|
context: null
|
|
8376
|
-
},
|
|
8376
|
+
}, Y = Zu()(
|
|
8377
8377
|
Ju(
|
|
8378
8378
|
(e, t) => ({
|
|
8379
8379
|
sessionId: "",
|
|
@@ -8399,7 +8399,7 @@ const Wn = (e) => `med-assist-store-${e}`, Qu = (e) => {
|
|
|
8399
8399
|
setUserId: (n) => e({ userId: n }),
|
|
8400
8400
|
context: null,
|
|
8401
8401
|
setContext: (n) => e({ context: n }),
|
|
8402
|
-
connectionStatus:
|
|
8402
|
+
connectionStatus: Ce.CONNECTING,
|
|
8403
8403
|
setConnectionStatus: (n) => e({ connectionStatus: n }),
|
|
8404
8404
|
isStreaming: !1,
|
|
8405
8405
|
setIsStreaming: (n) => e({ isStreaming: n }),
|
|
@@ -8548,7 +8548,7 @@ const Wn = (e) => `med-assist-store-${e}`, Qu = (e) => {
|
|
|
8548
8548
|
}
|
|
8549
8549
|
} catch {
|
|
8550
8550
|
}
|
|
8551
|
-
|
|
8551
|
+
Y.setState(Sl), n && Y.setState(n);
|
|
8552
8552
|
}, Qo = St(null), th = ({ children: e }) => {
|
|
8553
8553
|
const [t, n] = F(null);
|
|
8554
8554
|
return /* @__PURE__ */ a(Qo.Provider, { value: { synapse: t, setSynapse: n }, children: e });
|
|
@@ -8563,7 +8563,7 @@ const Wn = (e) => `med-assist-store-${e}`, Qu = (e) => {
|
|
|
8563
8563
|
throw new Error("useSynapseSetter must be used within a SynapseProvider");
|
|
8564
8564
|
return e.setSynapse;
|
|
8565
8565
|
}, oh = () => {
|
|
8566
|
-
const [e, t] = F(P.VOICE_AGENT_STATE.IDLE), [n, r] = F(!1), o = nh(), { setError: s } =
|
|
8566
|
+
const [e, t] = F(P.VOICE_AGENT_STATE.IDLE), [n, r] = F(!1), o = nh(), { setError: s } = Y();
|
|
8567
8567
|
z(() => {
|
|
8568
8568
|
if (!o) return;
|
|
8569
8569
|
const f = o.voice, u = (y) => {
|
|
@@ -8892,7 +8892,7 @@ function Ri(e, t) {
|
|
|
8892
8892
|
i(`--popover-${y}`, `var(--${p}-${y})`);
|
|
8893
8893
|
i("--secondary", s ? "0 0% 15%" : "0 0% 96.1%"), i("--surface-secondary", s ? "0 0% 15%" : "0 0% 96.1%"), i("--secondary-foreground", s ? "0 0% 98%" : "0 0% 9%"), i("--muted", s ? "0 0% 15%" : "0 0% 96.1%"), i("--accent", c), i("--accent-foreground", Qr(c)), o ? i("--surface", s ? "0 0% 0% / 0.6" : "0 0% 100% / 0.6") : i("--surface", s ? "0 0% 10%" : "0 0% 94.1%"), i("--surface-tertiary", s ? "0 0% 12%" : "0 0% 98%"), i("--border-subtle", s ? "0 0% 20%" : "0 0% 89.8%"), i("--border-medium", s ? "0 0% 30%" : "0 0% 80%"), i("--text-primary", s ? "0 0% 100%" : "0 0% 3.9%"), i("--text-secondary", s ? "0 0% 70%" : "0 0% 45.1%"), i("--text-tertiary", s ? "0 0% 60%" : "0 0% 63.9%"), i("--text-muted", s ? "0 0% 70%" : "0 0% 45.1%"), i("--border", s ? "0 0% 20%" : "0 0% 89.8%"), i("--input", s ? "0 0% 20%" : "0 0% 89.8%"), o ? (i("--theme-background-image", `url(${t.backgroundImage})`), i("--theme-background-blur", ph), i("--theme-background-overlay", mh), u instanceof HTMLElement && u.classList.add("theme-with-background")) : (i("--theme-background-image", "none"), i("--theme-background-blur", "0px"), i("--theme-background-overlay", "rgba(0, 0, 0, 0)"), u instanceof HTMLElement && u.classList.remove("theme-with-background"));
|
|
8894
8894
|
}
|
|
8895
|
-
function
|
|
8895
|
+
function je({ className: e, style: t }) {
|
|
8896
8896
|
return /* @__PURE__ */ a(
|
|
8897
8897
|
"div",
|
|
8898
8898
|
{
|
|
@@ -8915,15 +8915,15 @@ function wh() {
|
|
|
8915
8915
|
/* @__PURE__ */ a(tr, {}),
|
|
8916
8916
|
/* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
|
|
8917
8917
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-3", children: [
|
|
8918
|
-
/* @__PURE__ */ a(
|
|
8918
|
+
/* @__PURE__ */ a(je, { className: "w-12 h-12 rounded-full flex-shrink-0" }),
|
|
8919
8919
|
/* @__PURE__ */ a("div", { className: "flex flex-col gap-1.5", children: [
|
|
8920
|
-
/* @__PURE__ */ a(
|
|
8921
|
-
/* @__PURE__ */ a(
|
|
8920
|
+
/* @__PURE__ */ a(je, { className: "h-5 w-32 rounded-md" }),
|
|
8921
|
+
/* @__PURE__ */ a(je, { className: "h-3 w-20 rounded-md" })
|
|
8922
8922
|
] })
|
|
8923
8923
|
] }),
|
|
8924
8924
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
8925
|
-
/* @__PURE__ */ a(
|
|
8926
|
-
/* @__PURE__ */ a(
|
|
8925
|
+
/* @__PURE__ */ a(je, { className: "h-8 w-8 rounded-full" }),
|
|
8926
|
+
/* @__PURE__ */ a(je, { className: "h-8 w-8 rounded-full" })
|
|
8927
8927
|
] })
|
|
8928
8928
|
] })
|
|
8929
8929
|
] });
|
|
@@ -8941,12 +8941,12 @@ function Ch() {
|
|
|
8941
8941
|
padding: "4px 8px"
|
|
8942
8942
|
},
|
|
8943
8943
|
children: [
|
|
8944
|
-
/* @__PURE__ */ a("div", { className: "px-2 pt-2 pb-1", children: /* @__PURE__ */ a(
|
|
8944
|
+
/* @__PURE__ */ a("div", { className: "px-2 pt-2 pb-1", children: /* @__PURE__ */ a(je, { className: "h-5 w-3/5 rounded-md" }) }),
|
|
8945
8945
|
/* @__PURE__ */ a("div", { className: "flex items-center justify-between px-1 py-1", children: [
|
|
8946
|
-
/* @__PURE__ */ a(
|
|
8946
|
+
/* @__PURE__ */ a(je, { className: "h-9 w-9 rounded-full" }),
|
|
8947
8947
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
8948
|
-
/* @__PURE__ */ a(
|
|
8949
|
-
/* @__PURE__ */ a(
|
|
8948
|
+
/* @__PURE__ */ a(je, { className: "h-9 w-9 rounded-full" }),
|
|
8949
|
+
/* @__PURE__ */ a(je, { className: "h-10 w-10 rounded-full" })
|
|
8950
8950
|
] })
|
|
8951
8951
|
] })
|
|
8952
8952
|
]
|
|
@@ -8957,9 +8957,9 @@ function Ch() {
|
|
|
8957
8957
|
function Th() {
|
|
8958
8958
|
return /* @__PURE__ */ a("div", { className: "space-y-3 py-2", children: [
|
|
8959
8959
|
/* @__PURE__ */ a(tr, {}),
|
|
8960
|
-
/* @__PURE__ */ a(
|
|
8961
|
-
/* @__PURE__ */ a(
|
|
8962
|
-
/* @__PURE__ */ a(
|
|
8960
|
+
/* @__PURE__ */ a(je, { className: "h-16 w-3/4 rounded-2xl" }),
|
|
8961
|
+
/* @__PURE__ */ a(je, { className: "h-10 w-1/2 rounded-2xl ml-auto" }),
|
|
8962
|
+
/* @__PURE__ */ a(je, { className: "h-16 w-2/3 rounded-2xl" })
|
|
8963
8963
|
] });
|
|
8964
8964
|
}
|
|
8965
8965
|
function Nh() {
|
|
@@ -8975,7 +8975,7 @@ function Nh() {
|
|
|
8975
8975
|
"div",
|
|
8976
8976
|
{
|
|
8977
8977
|
className: L("flex", t.role === "user" ? "justify-end" : "justify-start"),
|
|
8978
|
-
children: /* @__PURE__ */ a(
|
|
8978
|
+
children: /* @__PURE__ */ a(je, { className: L("rounded-lg", t.size) })
|
|
8979
8979
|
},
|
|
8980
8980
|
n
|
|
8981
8981
|
))
|
|
@@ -8986,8 +8986,8 @@ function xh({ rows: e = 5 }) {
|
|
|
8986
8986
|
return /* @__PURE__ */ a("div", { "aria-hidden": "true", children: [
|
|
8987
8987
|
/* @__PURE__ */ a(tr, {}),
|
|
8988
8988
|
Array.from({ length: e }, (n, r) => /* @__PURE__ */ a("div", { className: "flex flex-col gap-1 w-full px-4 py-3", children: [
|
|
8989
|
-
/* @__PURE__ */ a(
|
|
8990
|
-
/* @__PURE__ */ a(
|
|
8989
|
+
/* @__PURE__ */ a(je, { className: L("h-5 rounded-md", t[r % t.length]) }),
|
|
8990
|
+
/* @__PURE__ */ a(je, { className: "h-3.5 w-16 rounded-md" })
|
|
8991
8991
|
] }, r))
|
|
8992
8992
|
] });
|
|
8993
8993
|
}
|
|
@@ -9252,7 +9252,7 @@ function jh({
|
|
|
9252
9252
|
onOpenSessionDrawer: f,
|
|
9253
9253
|
historyEnabled: u = !1
|
|
9254
9254
|
}) {
|
|
9255
|
-
const p = Fl(), m = $h() && !p, g =
|
|
9255
|
+
const p = Fl(), m = $h() && !p, g = Y((A) => A.displayMode) === "full", S = Y((A) => A.initialDisplayMode) === "full", E = (g ? !1 : c) ? "text-primary-foreground hover:text-white hover:bg-black-100" : "text-foreground", _ = Y((A) => A.connectionStatus), N = Y((A) => A.level) === "user", [w, C] = F(!1), v = W(null), T = fe(() => i === "connected" || i === "connecting" || i === "listening" || i === "speaking" || i === "thinking", [i]), b = le(() => {
|
|
9256
9256
|
w || (C(!0), v.current && clearTimeout(v.current), v.current = setTimeout(() => {
|
|
9257
9257
|
v.current = null, C(!1);
|
|
9258
9258
|
}, 6e3), l());
|
|
@@ -10339,16 +10339,16 @@ function sf({
|
|
|
10339
10339
|
"rounded-full transition-all duration-200 ",
|
|
10340
10340
|
l ? "bg-gradient-to-r from-rose-400 via-primary to-indigo-500 text-white ring-2 ring-white/60 animate-pulse shadow-[0_0_20px_rgba(139,92,246,0.45)]" : re ? "text-primary/50 cursor-not-allowed shadow-none" : "text-foreground hover:bg-primary hover:text-primary-foreground"
|
|
10341
10341
|
), ue = (H) => {
|
|
10342
|
-
const
|
|
10343
|
-
|
|
10342
|
+
const G = Array.from(H.target.files || []);
|
|
10343
|
+
G.length > 0 && r(G);
|
|
10344
10344
|
}, oe = () => {
|
|
10345
10345
|
d || (C.current && (C.current.value = ""), C.current?.click());
|
|
10346
|
-
},
|
|
10346
|
+
}, M = (H) => {
|
|
10347
10347
|
H.key === "Enter" && !H.shiftKey && A && !d && (H.preventDefault(), n());
|
|
10348
10348
|
}, B = (H) => {
|
|
10349
10349
|
H.style.height = "auto", H.style.overflow = "hidden";
|
|
10350
|
-
const
|
|
10351
|
-
H.style.height =
|
|
10350
|
+
const G = H.scrollHeight, Z = w ? 20 : 28, X = 120, Te = Math.max(Z, Math.min(G, X));
|
|
10351
|
+
H.style.height = Te + "px", G > X ? H.style.overflow = "auto" : H.style.overflow = "hidden";
|
|
10352
10352
|
}, ie = (H) => {
|
|
10353
10353
|
B(H.currentTarget);
|
|
10354
10354
|
};
|
|
@@ -10442,7 +10442,7 @@ function sf({
|
|
|
10442
10442
|
fontWeight: 400,
|
|
10443
10443
|
padding: 0
|
|
10444
10444
|
},
|
|
10445
|
-
onKeyPress:
|
|
10445
|
+
onKeyPress: M,
|
|
10446
10446
|
title: "Enter your message",
|
|
10447
10447
|
"aria-label": "Enter your message",
|
|
10448
10448
|
className: L(
|
|
@@ -10607,7 +10607,7 @@ function sf({
|
|
|
10607
10607
|
fontSize: "16px",
|
|
10608
10608
|
lineHeight: "1.4"
|
|
10609
10609
|
},
|
|
10610
|
-
onKeyPress:
|
|
10610
|
+
onKeyPress: M,
|
|
10611
10611
|
title: "Enter your message",
|
|
10612
10612
|
"aria-label": "Enter your message",
|
|
10613
10613
|
className: L(
|
|
@@ -10752,7 +10752,7 @@ function af({ message: e, onDismiss: t }) {
|
|
|
10752
10752
|
] });
|
|
10753
10753
|
}
|
|
10754
10754
|
function lf() {
|
|
10755
|
-
const e =
|
|
10755
|
+
const e = Y((r) => r.toastMessage), t = Y((r) => r.setToastMessage), n = le(() => {
|
|
10756
10756
|
t(null);
|
|
10757
10757
|
}, [t]);
|
|
10758
10758
|
return z(() => {
|
|
@@ -10794,7 +10794,7 @@ function cf({ isOpen: e, onClose: t, botName: n }) {
|
|
|
10794
10794
|
)
|
|
10795
10795
|
] }) });
|
|
10796
10796
|
}
|
|
10797
|
-
const df =
|
|
10797
|
+
const df = Ke(() => import("./medassist-widget-mood-angry-BQqxy8gg.js").then((e) => ({ default: e.MoodAngry }))), uf = Ke(() => import("./medassist-widget-mood-bad-BBDRkdRc.js").then((e) => ({ default: e.MoodBad }))), hf = Ke(() => import("./medassist-widget-mood-neutral-CbcKAQbC.js").then((e) => ({ default: e.MoodNeutral }))), ff = Ke(() => import("./medassist-widget-mood-poor-t4w5iE4B.js").then((e) => ({ default: e.MoodPoor }))), mf = Ke(() => import("./medassist-widget-mood-happy-oLG7NUhq.js").then((e) => ({ default: e.MoodHappy }))), pf = [
|
|
10798
10798
|
{ label: "Took longer than expected", value: "took_longer" },
|
|
10799
10799
|
{ label: "Asking too many questions", value: "too_many_questions" },
|
|
10800
10800
|
{ label: "Irrelevant response", value: "irrelevant_response" },
|
|
@@ -10953,13 +10953,13 @@ function Vl({
|
|
|
10953
10953
|
theme: v,
|
|
10954
10954
|
feedbackModal: T
|
|
10955
10955
|
}) {
|
|
10956
|
-
const [b, k] = F(!1), [O, A] = F(!1), [$, re] = F(!1), K = W(null), ue =
|
|
10956
|
+
const [b, k] = F(!1), [O, A] = F(!1), [$, re] = F(!1), K = W(null), ue = Y((D) => D.level), oe = S, M = oe === "full", B = W(null), [ie, H] = F("");
|
|
10957
10957
|
z(() => {
|
|
10958
10958
|
B.current !== null && B.current !== oe && H(
|
|
10959
10959
|
oe === "full" ? "Switched to fullscreen mode" : oe === "widget" ? "Switched to widget mode" : "Switched to mobile layout"
|
|
10960
10960
|
), B.current = oe;
|
|
10961
10961
|
}, [oe]);
|
|
10962
|
-
const
|
|
10962
|
+
const G = fe(() => _h(v), [v]), { setIsMobile: Z } = Y((D) => D), X = !!N, Te = async (D) => {
|
|
10963
10963
|
if (!(!m?.onSend || O)) {
|
|
10964
10964
|
A(!0);
|
|
10965
10965
|
try {
|
|
@@ -10971,9 +10971,9 @@ function Vl({
|
|
|
10971
10971
|
};
|
|
10972
10972
|
z(() => {
|
|
10973
10973
|
if (!K.current) return;
|
|
10974
|
-
const D = oe === "full" ? { ...
|
|
10975
|
-
Ri(K.current, D), oe === "full" && !
|
|
10976
|
-
}, [
|
|
10974
|
+
const D = oe === "full" ? { ...G, headerTinted: !1 } : G;
|
|
10975
|
+
Ri(K.current, D), oe === "full" && !G.backgroundImage ? (K.current.style.setProperty("--background", "0 0% 100%"), K.current.style.setProperty("--widget-bg-overlay", "transparent")) : (K.current.style.removeProperty("--background"), K.current.style.removeProperty("--widget-bg-overlay"), Ri(K.current, G));
|
|
10976
|
+
}, [G, oe]), z(() => {
|
|
10977
10977
|
const D = () => {
|
|
10978
10978
|
const ye = window?.innerWidth ?? 0, he = navigator?.userAgent?.toLowerCase() ?? "", me = ye < 768 || /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(
|
|
10979
10979
|
he
|
|
@@ -10984,14 +10984,14 @@ function Vl({
|
|
|
10984
10984
|
}, []), wt(() => {
|
|
10985
10985
|
if (!e || !b || !K.current) return;
|
|
10986
10986
|
const D = K.current;
|
|
10987
|
-
let ye = null, he = null, me = null,
|
|
10988
|
-
const
|
|
10987
|
+
let ye = null, he = null, me = null, Ze = window.visualViewport?.offsetTop ?? 0, $e = 0;
|
|
10988
|
+
const xe = 2, Fe = 80;
|
|
10989
10989
|
if (window.visualViewport) {
|
|
10990
10990
|
const ke = () => {
|
|
10991
10991
|
if (D && window.visualViewport) {
|
|
10992
|
-
const
|
|
10992
|
+
const Ge = window.visualViewport.height, tt = window.visualViewport.offsetTop;
|
|
10993
10993
|
ye = requestAnimationFrame(() => {
|
|
10994
|
-
D.style.transition = "none", D.style.top = `${tt}px`, D.style.left = "0", D.style.right = "0", D.style.bottom = "auto", D.style.width = "100vw", D.style.height = `${
|
|
10994
|
+
D.style.transition = "none", D.style.top = `${tt}px`, D.style.left = "0", D.style.right = "0", D.style.bottom = "auto", D.style.width = "100vw", D.style.height = `${Ge}px`, D.style.maxHeight = `${Ge}px`, D.style.minHeight = `${Ge}px`, he && clearTimeout(he), he = setTimeout(() => {
|
|
10995
10995
|
D.style.transition = "";
|
|
10996
10996
|
}, 100);
|
|
10997
10997
|
});
|
|
@@ -11000,9 +11000,9 @@ function Vl({
|
|
|
11000
11000
|
ke();
|
|
11001
11001
|
}, Ae = () => {
|
|
11002
11002
|
if (!D || !window.visualViewport) return;
|
|
11003
|
-
const
|
|
11004
|
-
Math.abs(
|
|
11005
|
-
D.style.transition = "none", D.style.top = `${
|
|
11003
|
+
const Ge = window.visualViewport.offsetTop, tt = Date.now();
|
|
11004
|
+
Math.abs(Ge - Ze) < xe || tt - $e < Fe || ($e = tt, Ze = Ge, ye = requestAnimationFrame(() => {
|
|
11005
|
+
D.style.transition = "none", D.style.top = `${Ge}px`, me && clearTimeout(me), me = setTimeout(() => {
|
|
11006
11006
|
D.style.transition = "";
|
|
11007
11007
|
}, 150);
|
|
11008
11008
|
}));
|
|
@@ -11022,20 +11022,20 @@ function Vl({
|
|
|
11022
11022
|
}
|
|
11023
11023
|
}, [e, b]), z(() => {
|
|
11024
11024
|
if (e) {
|
|
11025
|
-
const D = K.current, ye = window.scrollY, he = document.body.style.cssText, me = document.documentElement.style.overflow,
|
|
11026
|
-
document.body.style.position = "fixed", document.body.style.top = `-${ye}px`, document.body.style.left = "0", document.body.style.right = "0", document.body.style.width = "100%", document.body.style.overflow = "hidden", document.documentElement.style.overflow = "hidden",
|
|
11027
|
-
let
|
|
11028
|
-
const
|
|
11029
|
-
|
|
11025
|
+
const D = K.current, ye = window.scrollY, he = document.body.style.cssText, me = document.documentElement.style.overflow, Ze = window.innerWidth - document.documentElement.clientWidth;
|
|
11026
|
+
document.body.style.position = "fixed", document.body.style.top = `-${ye}px`, document.body.style.left = "0", document.body.style.right = "0", document.body.style.width = "100%", document.body.style.overflow = "hidden", document.documentElement.style.overflow = "hidden", Ze > 0 && !b && (document.body.style.paddingRight = `${Ze}px`);
|
|
11027
|
+
let $e = 0;
|
|
11028
|
+
const xe = (ke) => {
|
|
11029
|
+
$e = ke.touches[0].clientY;
|
|
11030
11030
|
}, Fe = (ke) => {
|
|
11031
11031
|
if (ke.touches.length !== 1) return;
|
|
11032
|
-
const ft =
|
|
11033
|
-
|
|
11032
|
+
const ft = $e - ke.touches[0].clientY;
|
|
11033
|
+
$e = ke.touches[0].clientY;
|
|
11034
11034
|
let Ae = ke.target;
|
|
11035
11035
|
for (; Ae && Ae !== D; ) {
|
|
11036
|
-
const { overflowY:
|
|
11037
|
-
if ((
|
|
11038
|
-
const { scrollTop: tt, scrollHeight:
|
|
11036
|
+
const { overflowY: Ge } = window.getComputedStyle(Ae);
|
|
11037
|
+
if ((Ge === "auto" || Ge === "scroll") && Ae.scrollHeight > Ae.clientHeight) {
|
|
11038
|
+
const { scrollTop: tt, scrollHeight: Xe, clientHeight: Ot } = Ae, st = tt <= 0 && ft < 0, It = tt + Ot >= Xe - 1 && ft > 0;
|
|
11039
11039
|
if (!st && !It) return;
|
|
11040
11040
|
break;
|
|
11041
11041
|
}
|
|
@@ -11043,45 +11043,45 @@ function Vl({
|
|
|
11043
11043
|
}
|
|
11044
11044
|
ke.preventDefault();
|
|
11045
11045
|
};
|
|
11046
|
-
return D && (D.addEventListener("touchstart",
|
|
11047
|
-
D && (D.removeEventListener("touchstart",
|
|
11046
|
+
return D && (D.addEventListener("touchstart", xe, { passive: !0 }), D.addEventListener("touchmove", Fe, { passive: !1 })), () => {
|
|
11047
|
+
D && (D.removeEventListener("touchstart", xe), D.removeEventListener("touchmove", Fe)), document.body.style.cssText = he, document.documentElement.style.overflow = me, window.scrollTo(0, ye);
|
|
11048
11048
|
};
|
|
11049
11049
|
}
|
|
11050
11050
|
}, [e, b]);
|
|
11051
11051
|
const { position: _e, elementRef: ce } = hh({
|
|
11052
|
-
enabled: e && !b && !
|
|
11052
|
+
enabled: e && !b && !M
|
|
11053
11053
|
});
|
|
11054
11054
|
z(() => {
|
|
11055
11055
|
K.current && (ce.current = K.current);
|
|
11056
11056
|
}, [ce]);
|
|
11057
|
-
const
|
|
11057
|
+
const Be = L(
|
|
11058
11058
|
// Base isolation styles - prevents host website interference
|
|
11059
11059
|
"synapse-chat-widget-container",
|
|
11060
11060
|
"fixed m-0 p-0",
|
|
11061
11061
|
"box-border",
|
|
11062
11062
|
// Only apply transition for desktop widget, disable for mobile/fullscreen to prevent flickering
|
|
11063
|
-
!b && !
|
|
11063
|
+
!b && !M ? "transition-all duration-300" : "",
|
|
11064
11064
|
// Positioning
|
|
11065
|
-
b ? "w-screen h-[100svh]" :
|
|
11065
|
+
b ? "w-screen h-[100svh]" : M ? "w-screen h-screen" : "w-96 h-[600px]",
|
|
11066
11066
|
// Z-index - highest possible
|
|
11067
11067
|
"z-[2147483647]",
|
|
11068
11068
|
// Visibility
|
|
11069
11069
|
e ? "opacity-100 pointer-events-auto" : "opacity-0 pointer-events-none scale-95"
|
|
11070
|
-
),
|
|
11070
|
+
), Ye = L(
|
|
11071
11071
|
"w-full h-full relative",
|
|
11072
11072
|
"bg-background",
|
|
11073
11073
|
"shadow-2xl",
|
|
11074
11074
|
"flex",
|
|
11075
11075
|
"overflow-hidden",
|
|
11076
|
-
|
|
11077
|
-
b ? "rounded-none border-0 flex-col" :
|
|
11076
|
+
G.backgroundImage ? "theme-with-background" : "",
|
|
11077
|
+
b ? "rounded-none border-0 flex-col" : M ? "rounded-none border-0 flex-row" : "rounded-3xl flex-col"
|
|
11078
11078
|
);
|
|
11079
11079
|
return /* @__PURE__ */ a(
|
|
11080
11080
|
"div",
|
|
11081
11081
|
{
|
|
11082
11082
|
ref: K,
|
|
11083
11083
|
"data-mode": oe,
|
|
11084
|
-
className:
|
|
11084
|
+
className: Be,
|
|
11085
11085
|
style: {
|
|
11086
11086
|
// Reset only essential properties that might interfere
|
|
11087
11087
|
margin: 0,
|
|
@@ -11099,7 +11099,7 @@ function Vl({
|
|
|
11099
11099
|
// Fullscreen desktop: fill viewport edge-to-edge — only when open.
|
|
11100
11100
|
// When closed, skipping these styles + display:none below ensures the
|
|
11101
11101
|
// (invisible) shell doesn't sit over the launcher button.
|
|
11102
|
-
...
|
|
11102
|
+
...M && e && {
|
|
11103
11103
|
top: 0,
|
|
11104
11104
|
left: 0,
|
|
11105
11105
|
right: 0,
|
|
@@ -11110,9 +11110,9 @@ function Vl({
|
|
|
11110
11110
|
// Hard-hide the shell when closed in fullscreen so its 100vw/100vh
|
|
11111
11111
|
// pointer-events-none layer (still positioned at top:0/left:0 even
|
|
11112
11112
|
// with opacity-0) cannot occlude the launcher button.
|
|
11113
|
-
...
|
|
11113
|
+
...M && !e && { display: "none" },
|
|
11114
11114
|
// Draggable position for desktop widget (not mobile, not fullscreen)
|
|
11115
|
-
...!b && !
|
|
11115
|
+
...!b && !M && {
|
|
11116
11116
|
left: `${_e.x}px`,
|
|
11117
11117
|
top: `${_e.y}px`,
|
|
11118
11118
|
bottom: "auto",
|
|
@@ -11128,7 +11128,7 @@ function Vl({
|
|
|
11128
11128
|
width: "100vw",
|
|
11129
11129
|
maxHeight: "100svh",
|
|
11130
11130
|
height: "100svh",
|
|
11131
|
-
backgroundColor:
|
|
11131
|
+
backgroundColor: G.backgroundImage ? "transparent" : "hsl(var(--background))"
|
|
11132
11132
|
}
|
|
11133
11133
|
// Ensure proper font rendering
|
|
11134
11134
|
// WebkitFontSmoothing: "antialiased",
|
|
@@ -11176,8 +11176,8 @@ function Vl({
|
|
|
11176
11176
|
/* @__PURE__ */ a(
|
|
11177
11177
|
sn,
|
|
11178
11178
|
{
|
|
11179
|
-
className:
|
|
11180
|
-
"data-text-color":
|
|
11179
|
+
className: Ye,
|
|
11180
|
+
"data-text-color": G.textColor,
|
|
11181
11181
|
style: b ? void 0 : { border: "1.5px solid hsl(var(--primary) / 0.5)" },
|
|
11182
11182
|
children: [
|
|
11183
11183
|
/* @__PURE__ */ a(
|
|
@@ -11200,19 +11200,19 @@ function Vl({
|
|
|
11200
11200
|
children: ie
|
|
11201
11201
|
}
|
|
11202
11202
|
),
|
|
11203
|
-
!
|
|
11203
|
+
!G.backgroundImage && /* @__PURE__ */ a(
|
|
11204
11204
|
"div",
|
|
11205
11205
|
{
|
|
11206
11206
|
className: "absolute inset-0 pointer-events-none",
|
|
11207
11207
|
style: { backgroundColor: "var(--widget-bg-overlay)" }
|
|
11208
11208
|
}
|
|
11209
11209
|
),
|
|
11210
|
-
|
|
11210
|
+
G.backgroundImage && /* @__PURE__ */ a(
|
|
11211
11211
|
"div",
|
|
11212
11212
|
{
|
|
11213
11213
|
className: "absolute inset-0 -z-10",
|
|
11214
11214
|
style: {
|
|
11215
|
-
backgroundImage: `url(${
|
|
11215
|
+
backgroundImage: `url(${G.backgroundImage})`,
|
|
11216
11216
|
backgroundSize: "cover",
|
|
11217
11217
|
backgroundPosition: "center",
|
|
11218
11218
|
backgroundRepeat: "no-repeat",
|
|
@@ -11222,12 +11222,12 @@ function Vl({
|
|
|
11222
11222
|
}
|
|
11223
11223
|
}
|
|
11224
11224
|
),
|
|
11225
|
-
|
|
11225
|
+
G.backgroundImage && /* @__PURE__ */ a(
|
|
11226
11226
|
"div",
|
|
11227
11227
|
{
|
|
11228
11228
|
className: "absolute inset-0 -z-10",
|
|
11229
11229
|
style: {
|
|
11230
|
-
backgroundColor:
|
|
11230
|
+
backgroundColor: G.textColor === "white" ? "rgba(0, 0, 0, 0.4)" : "rgba(255, 255, 255, 0.4)"
|
|
11231
11231
|
}
|
|
11232
11232
|
}
|
|
11233
11233
|
),
|
|
@@ -11250,18 +11250,18 @@ function Vl({
|
|
|
11250
11250
|
onDontShowAgain: T.onDontShowAgain
|
|
11251
11251
|
}
|
|
11252
11252
|
),
|
|
11253
|
-
|
|
11254
|
-
ue === "user" && !
|
|
11253
|
+
M && i,
|
|
11254
|
+
ue === "user" && !M && c,
|
|
11255
11255
|
/* @__PURE__ */ a("div", { className: "flex-1 flex flex-col min-w-0 min-h-0 h-full", children: [
|
|
11256
11256
|
/* @__PURE__ */ a("div", { className: "flex-shrink-0 sticky top-0 z-50 synapse-chat-widget-header", style: {
|
|
11257
11257
|
// Same trick as the footer — solid bg layer + translucent overlay,
|
|
11258
11258
|
// so chat content scrolling under the sticky header is hidden.
|
|
11259
|
-
...
|
|
11259
|
+
...M ? { background: "transparent" } : {
|
|
11260
11260
|
backgroundColor: "hsl(var(--background))",
|
|
11261
11261
|
backgroundImage: "linear-gradient(var(--header-bg), var(--header-bg))"
|
|
11262
11262
|
},
|
|
11263
11263
|
borderBottom: "0.5px solid var(--header-stroke)",
|
|
11264
|
-
...!b && !
|
|
11264
|
+
...!b && !M && {
|
|
11265
11265
|
cursor: e ? "grab" : "default"
|
|
11266
11266
|
}
|
|
11267
11267
|
}, children: /* @__PURE__ */ a(Le, { fallback: /* @__PURE__ */ a(wh, {}), children: /* @__PURE__ */ a(
|
|
@@ -11275,19 +11275,19 @@ function Vl({
|
|
|
11275
11275
|
iconUrl: r,
|
|
11276
11276
|
startNewConversation: o,
|
|
11277
11277
|
voiceAgentState: C,
|
|
11278
|
-
headerTinted:
|
|
11278
|
+
headerTinted: M ? !1 : G.headerTinted,
|
|
11279
11279
|
onToggleDisplayMode: h,
|
|
11280
|
-
onOpenSessionDrawer:
|
|
11280
|
+
onOpenSessionDrawer: M ? void 0 : E,
|
|
11281
11281
|
historyEnabled: _
|
|
11282
11282
|
}
|
|
11283
11283
|
) }) }),
|
|
11284
11284
|
(() => {
|
|
11285
|
-
const D =
|
|
11285
|
+
const D = M && !!d, ye = m && C === P.VOICE_AGENT_STATE.IDLE ? /* @__PURE__ */ a(Le, { fallback: /* @__PURE__ */ a(Ch, {}), children: /* @__PURE__ */ a(
|
|
11286
11286
|
sf,
|
|
11287
11287
|
{
|
|
11288
11288
|
value: m.value,
|
|
11289
11289
|
onChange: m.onChange,
|
|
11290
|
-
onSend: X ?
|
|
11290
|
+
onSend: X ? Te : m.onSend,
|
|
11291
11291
|
onFileChange: m.onFileChange,
|
|
11292
11292
|
onRemoveFile: m.onRemoveFile,
|
|
11293
11293
|
onRecording: m.onRecording,
|
|
@@ -11298,7 +11298,7 @@ function Vl({
|
|
|
11298
11298
|
isMobile: b,
|
|
11299
11299
|
placeholder: m.placeholder,
|
|
11300
11300
|
recordingStatus: m.recordingStatus,
|
|
11301
|
-
theme:
|
|
11301
|
+
theme: G,
|
|
11302
11302
|
onStartNewChat: o,
|
|
11303
11303
|
showStartNewChatButton: s,
|
|
11304
11304
|
isVoiceAgentActive: m.isVoiceAgentActive,
|
|
@@ -11306,7 +11306,7 @@ function Vl({
|
|
|
11306
11306
|
allowed: m.allowed,
|
|
11307
11307
|
isAuthComponent: N,
|
|
11308
11308
|
activeElicitationState: w,
|
|
11309
|
-
isFullScreen:
|
|
11309
|
+
isFullScreen: M && !D
|
|
11310
11310
|
}
|
|
11311
11311
|
) }) : null, he = {
|
|
11312
11312
|
fontFamily: "Inter, system-ui, -apple-system, sans-serif",
|
|
@@ -11318,7 +11318,7 @@ function Vl({
|
|
|
11318
11318
|
"Session ID: ",
|
|
11319
11319
|
y
|
|
11320
11320
|
] }) }),
|
|
11321
|
-
|
|
11321
|
+
M ? (
|
|
11322
11322
|
// Fullscreen desktop always shows the full explicit disclaimer
|
|
11323
11323
|
// text (Figma reply-box footer) instead of the "Powered by"
|
|
11324
11324
|
// watermark — there's room for it and no floating-widget chrome.
|
|
@@ -11369,13 +11369,13 @@ function Vl({
|
|
|
11369
11369
|
]
|
|
11370
11370
|
}
|
|
11371
11371
|
)
|
|
11372
|
-
] }),
|
|
11372
|
+
] }), Ze = d && M ? d({
|
|
11373
11373
|
composer: D ? ye : null,
|
|
11374
11374
|
composerFooter: D ? me : null
|
|
11375
11375
|
}) : null;
|
|
11376
11376
|
return /* @__PURE__ */ a(pe, { children: [
|
|
11377
11377
|
/* @__PURE__ */ a("div", { className: "flex-1 min-h-0 overflow-hidden flex flex-col relative", children: [
|
|
11378
|
-
|
|
11378
|
+
Ze ?? l,
|
|
11379
11379
|
/* @__PURE__ */ a(lf, {})
|
|
11380
11380
|
] }),
|
|
11381
11381
|
m && !D && /* @__PURE__ */ a(
|
|
@@ -11399,7 +11399,7 @@ function Vl({
|
|
|
11399
11399
|
// : "0.5px solid var(--footer-stroke)",
|
|
11400
11400
|
},
|
|
11401
11401
|
children: [
|
|
11402
|
-
/* @__PURE__ */ a("div", { className: L(
|
|
11402
|
+
/* @__PURE__ */ a("div", { className: L(M && "max-w-2xl mx-auto w-full"), children: ye }),
|
|
11403
11403
|
me
|
|
11404
11404
|
]
|
|
11405
11405
|
}
|
|
@@ -11897,53 +11897,53 @@ const $t = (e) => {
|
|
|
11897
11897
|
force: s
|
|
11898
11898
|
// onInlineText,
|
|
11899
11899
|
}) => {
|
|
11900
|
-
const [l, i] = F([]), c = W([]), [d, f] = F(!1), [u, p] = F(!1), y = W(/* @__PURE__ */ new Map()), m = W(0), [g, S] = F(!1), [h, E] = F([]), _ = W(null), N = rh(), w = W(null), { isOnline: C } = zl(), v = W(!1), T =
|
|
11900
|
+
const [l, i] = F([]), c = W([]), [d, f] = F(!1), [u, p] = F(!1), y = W(/* @__PURE__ */ new Map()), m = W(0), [g, S] = F(!1), [h, E] = F([]), _ = W(null), N = rh(), w = W(null), { isOnline: C } = zl(), v = W(!1), T = Y((R) => R.agentId), b = Y((R) => R.sessionId), k = Y((R) => R.isStreaming), O = Y((R) => R.isWaitingForResponse), A = Y((R) => R.initialMessage), $ = Y((R) => R.userId), re = Y((R) => R.fileUploadPerSession), {
|
|
11901
11901
|
setSessionId: K,
|
|
11902
11902
|
setRefreshToken: ue,
|
|
11903
11903
|
setSessToken: oe,
|
|
11904
|
-
setLevel:
|
|
11904
|
+
setLevel: M,
|
|
11905
11905
|
setError: B,
|
|
11906
11906
|
setConnectionStatus: ie,
|
|
11907
11907
|
setShowRetryButton: H,
|
|
11908
|
-
setStartNewConnection:
|
|
11908
|
+
setStartNewConnection: G,
|
|
11909
11909
|
setIsStreaming: Z,
|
|
11910
11910
|
setIsWaitingForResponse: X,
|
|
11911
|
-
setProgressMessage:
|
|
11911
|
+
setProgressMessage: Te,
|
|
11912
11912
|
setRecordingStatus: _e,
|
|
11913
11913
|
clearSession: ce,
|
|
11914
|
-
clearUser:
|
|
11915
|
-
addMessageToSession:
|
|
11914
|
+
clearUser: Be,
|
|
11915
|
+
addMessageToSession: Ye,
|
|
11916
11916
|
getMessagesForSession: D,
|
|
11917
11917
|
setMessagesForSession: ye,
|
|
11918
11918
|
updateMessageInSession: he,
|
|
11919
11919
|
setUserId: me,
|
|
11920
|
-
setFileUploadPerSession:
|
|
11921
|
-
setToastMessage:
|
|
11922
|
-
upsertElicitationState:
|
|
11920
|
+
setFileUploadPerSession: Ze,
|
|
11921
|
+
setToastMessage: $e,
|
|
11922
|
+
upsertElicitationState: xe,
|
|
11923
11923
|
setElicitationState: Fe,
|
|
11924
11924
|
setInitialMessage: ke,
|
|
11925
11925
|
setSessionInitialMessage: ft
|
|
11926
|
-
} =
|
|
11926
|
+
} = Y.getState();
|
|
11927
11927
|
z(() => {
|
|
11928
11928
|
if (!C)
|
|
11929
11929
|
B({
|
|
11930
11930
|
title: "No internet connection",
|
|
11931
11931
|
description: "Please check your internet connection."
|
|
11932
|
-
}), ie(
|
|
11932
|
+
}), ie(Ce.NOT_CONNECTED);
|
|
11933
11933
|
else if (!g)
|
|
11934
|
-
ie(
|
|
11935
|
-
else if (
|
|
11936
|
-
ie(
|
|
11934
|
+
ie(Ce.CONNECTING);
|
|
11935
|
+
else if (Xe())
|
|
11936
|
+
ie(Ce.CONNECTED), st();
|
|
11937
11937
|
else {
|
|
11938
|
-
const { showRetryButton: R, startNewConnection: x, error:
|
|
11939
|
-
(R || x ||
|
|
11938
|
+
const { showRetryButton: R, startNewConnection: x, error: I } = Y.getState();
|
|
11939
|
+
(R || x || I) && !Xe() && st();
|
|
11940
11940
|
}
|
|
11941
11941
|
}, [C, g]), z(() => {
|
|
11942
11942
|
b && (i((R) => {
|
|
11943
|
-
const x = new Set(R.map((
|
|
11943
|
+
const x = new Set(R.map((I) => I.id));
|
|
11944
11944
|
return [
|
|
11945
11945
|
...R,
|
|
11946
|
-
...(D(b) || []).filter((
|
|
11946
|
+
...(D(b) || []).filter((I) => !x.has(I.id))
|
|
11947
11947
|
];
|
|
11948
11948
|
}), E([]));
|
|
11949
11949
|
}, [b]), z(() => {
|
|
@@ -11953,17 +11953,17 @@ const $t = (e) => {
|
|
|
11953
11953
|
agentId: T,
|
|
11954
11954
|
...o && { authToken: o },
|
|
11955
11955
|
// Persisted refresh token lets the init exchange resume the same identity after a reload.
|
|
11956
|
-
...
|
|
11957
|
-
refreshToken:
|
|
11956
|
+
...Y.getState().refreshToken && {
|
|
11957
|
+
refreshToken: Y.getState().refreshToken
|
|
11958
11958
|
},
|
|
11959
|
-
...
|
|
11960
|
-
sessToken:
|
|
11959
|
+
...Y.getState().sessToken && {
|
|
11960
|
+
sessToken: Y.getState().sessToken
|
|
11961
11961
|
},
|
|
11962
11962
|
// Persisted level: with a seeded pair the SDK skips the exchange, so
|
|
11963
11963
|
// this is its only way to know whether it acts for a user or a guest —
|
|
11964
11964
|
// which is what its guest-vs-authenticated recovery branches on.
|
|
11965
|
-
...
|
|
11966
|
-
level:
|
|
11965
|
+
...Y.getState().level && {
|
|
11966
|
+
level: Y.getState().level
|
|
11967
11967
|
},
|
|
11968
11968
|
...s && { force: s },
|
|
11969
11969
|
environment: e,
|
|
@@ -11972,7 +11972,7 @@ const $t = (e) => {
|
|
|
11972
11972
|
callbacks: {
|
|
11973
11973
|
onError: (x) => {
|
|
11974
11974
|
if (typeof navigator < "u" && !navigator.onLine) {
|
|
11975
|
-
ie(
|
|
11975
|
+
ie(Ce.NOT_CONNECTED), B({
|
|
11976
11976
|
title: "No internet connection",
|
|
11977
11977
|
description: "Will reconnect automatically when internet is restored."
|
|
11978
11978
|
});
|
|
@@ -11980,36 +11980,34 @@ const $t = (e) => {
|
|
|
11980
11980
|
}
|
|
11981
11981
|
if (x.reason)
|
|
11982
11982
|
switch (x.reason) {
|
|
11983
|
-
case P.SYNAPSE_RECOVERY_REASON.SESSION_FORBIDDEN:
|
|
11984
|
-
|
|
11985
|
-
return;
|
|
11986
|
-
case P.SYNAPSE_RECOVERY_REASON.AUTH_EXPIRED:
|
|
11987
|
-
window.postMessage(
|
|
11983
|
+
case P.SYNAPSE_RECOVERY_REASON.SESSION_FORBIDDEN: {
|
|
11984
|
+
Y.getState().level !== "user" ? (Be(), _.current?.clearTokens(), Pt()) : (Be(), window.postMessage(
|
|
11988
11985
|
{ type: "AUTH_EXPIRED", message: "Authentication expired" },
|
|
11989
11986
|
"*"
|
|
11990
|
-
), ie(
|
|
11987
|
+
), ie(Ce.NOT_CONNECTED), B({
|
|
11991
11988
|
title: "Session expired",
|
|
11992
11989
|
description: "Your session has expired. Please reload the page to continue."
|
|
11993
|
-
});
|
|
11990
|
+
}));
|
|
11994
11991
|
return;
|
|
11992
|
+
}
|
|
11995
11993
|
case P.SYNAPSE_RECOVERY_REASON.SESSION_NOT_FOUND:
|
|
11996
|
-
B(null), ie(
|
|
11994
|
+
B(null), ie(Ce.NOT_CONNECTED), G(!0);
|
|
11997
11995
|
return;
|
|
11998
11996
|
case P.SYNAPSE_RECOVERY_REASON.RETRY_LATER:
|
|
11999
|
-
ie(
|
|
11997
|
+
ie(Ce.CONNECTING);
|
|
12000
11998
|
return;
|
|
12001
11999
|
}
|
|
12002
12000
|
switch (x.code) {
|
|
12003
12001
|
case P.SynapseErrorCode.API:
|
|
12004
12002
|
case P.SynapseErrorCode.SESSION: {
|
|
12005
|
-
const
|
|
12006
|
-
Q && be ? (
|
|
12003
|
+
const I = x, j = I.context?.stage === "tokenRefresh" || I.status === 401, se = I.status === 404 || I?.context?.staus === 404, Q = I.status === 403, be = Y.getState().level !== "user";
|
|
12004
|
+
Q && be ? (Be(), _.current?.clearTokens(), Pt()) : j || Q && !be ? (Be(), window.postMessage(
|
|
12007
12005
|
{ type: "AUTH_EXPIRED", message: "Authentication expired" },
|
|
12008
12006
|
"*"
|
|
12009
|
-
), ie(
|
|
12007
|
+
), ie(Ce.NOT_CONNECTED), B({
|
|
12010
12008
|
title: "Session expired",
|
|
12011
12009
|
description: "Your session has expired. Please reload the page to continue."
|
|
12012
|
-
})) : se ?
|
|
12010
|
+
})) : se ? G(!0) : (ie(Ce.NOT_CONNECTED), B({
|
|
12013
12011
|
title: "Something went wrong!",
|
|
12014
12012
|
description: $t(x)
|
|
12015
12013
|
}), H(!0));
|
|
@@ -12022,7 +12020,7 @@ const $t = (e) => {
|
|
|
12022
12020
|
});
|
|
12023
12021
|
break;
|
|
12024
12022
|
case P.SynapseErrorCode.CONNECTION:
|
|
12025
|
-
|
|
12023
|
+
Xe() || (ie(Ce.NOT_CONNECTED), m.current < 2 ? (m.current = m.current + 1, Ae(b)) : (H(!0), B({
|
|
12026
12024
|
title: "Trying to connect...",
|
|
12027
12025
|
description: $t(x)
|
|
12028
12026
|
})));
|
|
@@ -12036,8 +12034,8 @@ const $t = (e) => {
|
|
|
12036
12034
|
}
|
|
12037
12035
|
},
|
|
12038
12036
|
onTokenExchange: (x) => {
|
|
12039
|
-
const
|
|
12040
|
-
(!!x?.user_id && !!
|
|
12037
|
+
const I = Y.getState().userId;
|
|
12038
|
+
(!!x?.user_id && !!I && x.user_id !== I || x?.userid_change_detected) && ce(), x?.refresh_token && ue(x.refresh_token), x?.sess_token && oe(x.sess_token), x?.level && M(x.level), x?.user_id && me(x.user_id);
|
|
12041
12039
|
}
|
|
12042
12040
|
},
|
|
12043
12041
|
...n && { serverUrl: n },
|
|
@@ -12050,16 +12048,16 @@ const $t = (e) => {
|
|
|
12050
12048
|
c.current = l;
|
|
12051
12049
|
}, [l]), z(() => {
|
|
12052
12050
|
const R = c.current[c.current.length - 1];
|
|
12053
|
-
!R?.role || !b || (R?.role === ze.USER && !R.isStored ?
|
|
12054
|
-
const
|
|
12055
|
-
return
|
|
12051
|
+
!R?.role || !b || (R?.role === ze.USER && !R.isStored ? Ye(b, { ...R, isStored: !0 }) : !k && !R.isStored && (i((x) => {
|
|
12052
|
+
const I = [...x];
|
|
12053
|
+
return I[I.length - 1] = {
|
|
12056
12054
|
...R,
|
|
12057
12055
|
isStored: !0
|
|
12058
|
-
},
|
|
12059
|
-
}),
|
|
12056
|
+
}, I;
|
|
12057
|
+
}), Ye(b, { ...R, isStored: !0 })));
|
|
12060
12058
|
}, [l, k]), z(() => () => {
|
|
12061
12059
|
const R = c.current[c.current.length - 1];
|
|
12062
|
-
R && !R?.isStored && b &&
|
|
12060
|
+
R && !R?.isStored && b && Ye(b, { ...R, isStored: !0 });
|
|
12063
12061
|
}, []), z(() => (w.current && (clearTimeout(w.current), w.current = null), O && !k ? w.current = setTimeout(() => {
|
|
12064
12062
|
X(!1), w.current = null;
|
|
12065
12063
|
}, 3e4) : k && w.current && (clearTimeout(w.current), w.current = null), () => {
|
|
@@ -12067,43 +12065,43 @@ const $t = (e) => {
|
|
|
12067
12065
|
}), [O, k, X]);
|
|
12068
12066
|
const Ae = async (R, x = !1) => {
|
|
12069
12067
|
try {
|
|
12070
|
-
const
|
|
12068
|
+
const I = await _.current?.startSession(
|
|
12071
12069
|
R ? { session_id: R } : void 0
|
|
12072
12070
|
);
|
|
12073
|
-
if (
|
|
12074
|
-
ke(
|
|
12075
|
-
const j =
|
|
12076
|
-
j && ft(j,
|
|
12077
|
-
}
|
|
12078
|
-
|
|
12079
|
-
} catch (
|
|
12080
|
-
if (
|
|
12081
|
-
const j =
|
|
12082
|
-
se ||
|
|
12071
|
+
if (I?.session_id && K(I.session_id), I?.user_id && me(I.user_id), I?.initial_message) {
|
|
12072
|
+
ke(I.initial_message);
|
|
12073
|
+
const j = I.session_id || R;
|
|
12074
|
+
j && ft(j, I.initial_message);
|
|
12075
|
+
}
|
|
12076
|
+
I?.error?.msg && $e(I.error.msg);
|
|
12077
|
+
} catch (I) {
|
|
12078
|
+
if (I?.reason) return;
|
|
12079
|
+
const j = I, se = j.context?.stage === "tokenRefresh" || j.status === 401, Q = j.status === 404 || j.context?.status == 404, Re = j.status === 403, be = Y.getState().level !== "user";
|
|
12080
|
+
se || Re && !be ? (Be(), window.postMessage(
|
|
12083
12081
|
{ type: "AUTH_EXPIRED", message: "Authentication expired" },
|
|
12084
12082
|
"*"
|
|
12085
|
-
), ie(
|
|
12083
|
+
), ie(Ce.NOT_CONNECTED), B({
|
|
12086
12084
|
title: "Session expired",
|
|
12087
12085
|
description: "Your session has expired. Please reload the page to continue."
|
|
12088
|
-
})) : Q ? (B(null), ie(
|
|
12086
|
+
})) : Q ? (B(null), ie(Ce.NOT_CONNECTED), G(!0)) : Re && be && !x ? (Be(), _.current?.clearTokens(), st(), await Ae(void 0, !0)) : (B({
|
|
12089
12087
|
title: "Connection Lost!",
|
|
12090
|
-
description: $t(
|
|
12088
|
+
description: $t(I)
|
|
12091
12089
|
}), H(!0));
|
|
12092
12090
|
}
|
|
12093
|
-
},
|
|
12094
|
-
const x =
|
|
12091
|
+
}, Ge = async (R) => {
|
|
12092
|
+
const x = Y.getState().chats[R];
|
|
12095
12093
|
if (x?.length)
|
|
12096
12094
|
return i(x), x;
|
|
12097
|
-
const
|
|
12098
|
-
if (
|
|
12095
|
+
const I = y.current.get(R);
|
|
12096
|
+
if (I) return I;
|
|
12099
12097
|
const j = (async () => {
|
|
12100
12098
|
try {
|
|
12101
12099
|
const se = await _.current?.getSessionMessages(R);
|
|
12102
12100
|
if (!se?.length) return [];
|
|
12103
|
-
const { messages: Q, elicitations:
|
|
12104
|
-
return Object.keys(
|
|
12105
|
-
...
|
|
12106
|
-
...
|
|
12101
|
+
const { messages: Q, elicitations: Re } = Df(se);
|
|
12102
|
+
return Object.keys(Re).length && Fe({
|
|
12103
|
+
...Y.getState().elicitationState,
|
|
12104
|
+
...Re
|
|
12107
12105
|
}), ye(R, Q), i(Q), Q;
|
|
12108
12106
|
} catch {
|
|
12109
12107
|
return [];
|
|
@@ -12127,41 +12125,41 @@ const $t = (e) => {
|
|
|
12127
12125
|
return;
|
|
12128
12126
|
}
|
|
12129
12127
|
if (f(!0), R) {
|
|
12130
|
-
ie(
|
|
12128
|
+
ie(Ce.CONNECTING), i([]), await ce(), await _?.current?.endSession(), st(), await Ae(), It();
|
|
12131
12129
|
return;
|
|
12132
12130
|
}
|
|
12133
|
-
const
|
|
12134
|
-
j !==
|
|
12131
|
+
const I = Y.getState()?.sessionId, j = x || I || void 0;
|
|
12132
|
+
j !== I && (Ot(), i([]), j && await Ge(j)), await Ae(j), It();
|
|
12135
12133
|
} catch {
|
|
12136
12134
|
} finally {
|
|
12137
12135
|
f(!1);
|
|
12138
12136
|
}
|
|
12139
|
-
},
|
|
12137
|
+
}, Xe = () => _.current?.isConnected() ?? !1, Ot = () => {
|
|
12140
12138
|
_.current?.endSession();
|
|
12141
12139
|
}, st = () => {
|
|
12142
|
-
m.current = 0, H(!1),
|
|
12140
|
+
m.current = 0, H(!1), G(!1), B(null);
|
|
12143
12141
|
}, It = () => {
|
|
12144
12142
|
_.current?.on(P.SYNAPSE_REALTIME_EVENTS.MESSAGE_CHUNK, (R) => {
|
|
12145
12143
|
const x = R;
|
|
12146
12144
|
if (x.data?.text && x.messageId) {
|
|
12147
|
-
k || (X(!1), Z(!0)),
|
|
12148
|
-
const
|
|
12145
|
+
k || (X(!1), Z(!0)), Xe() && ie(Ce.CONNECTED), st();
|
|
12146
|
+
const I = x.data.text, j = x.messageId, se = v.current;
|
|
12149
12147
|
v.current = !1, i((Q) => {
|
|
12150
|
-
const
|
|
12151
|
-
if (
|
|
12152
|
-
const be = [...Q], Ue = se &&
|
|
12148
|
+
const Re = Q[Q.length - 1];
|
|
12149
|
+
if (Re && Re.id === j && Re.role === ze.ASSISTANT) {
|
|
12150
|
+
const be = [...Q], Ue = se && Re.content.length > 0 && !/\s$/.test(Re.content) && !/^\s/.test(I) ? `
|
|
12153
12151
|
|
|
12154
12152
|
` : "";
|
|
12155
12153
|
return be[be.length - 1] = {
|
|
12156
|
-
...
|
|
12157
|
-
content:
|
|
12154
|
+
...Re,
|
|
12155
|
+
content: Re.content + Ue + I
|
|
12158
12156
|
}, be;
|
|
12159
12157
|
} else
|
|
12160
12158
|
return [
|
|
12161
12159
|
...Q,
|
|
12162
12160
|
{
|
|
12163
12161
|
id: j,
|
|
12164
|
-
content:
|
|
12162
|
+
content: I,
|
|
12165
12163
|
role: ze.ASSISTANT,
|
|
12166
12164
|
timestamp: jt(Date.now()),
|
|
12167
12165
|
isStored: !1
|
|
@@ -12170,9 +12168,9 @@ const $t = (e) => {
|
|
|
12170
12168
|
});
|
|
12171
12169
|
}
|
|
12172
12170
|
}), _.current?.on(P.SYNAPSE_REALTIME_EVENTS.END_OF_STREAM, () => {
|
|
12173
|
-
v.current = !1, Z(!1),
|
|
12171
|
+
v.current = !1, Z(!1), Te(null), X(!1);
|
|
12174
12172
|
}), _.current?.on(P.SYNAPSE_REALTIME_EVENTS.CONNECTED, () => {
|
|
12175
|
-
st(), ie(
|
|
12173
|
+
st(), ie(Ce.CONNECTED);
|
|
12176
12174
|
}), _.current?.on(
|
|
12177
12175
|
P.SYNAPSE_REALTIME_EVENTS.TOOL_CALL,
|
|
12178
12176
|
(R) => {
|
|
@@ -12181,19 +12179,19 @@ const $t = (e) => {
|
|
|
12181
12179
|
if (!x?.messageId || !x?.data || !x?.data?.details?.component || !x?.data?.tool_id)
|
|
12182
12180
|
return;
|
|
12183
12181
|
O && X(!1);
|
|
12184
|
-
const { messageId:
|
|
12182
|
+
const { messageId: I, data: j } = x, se = j.tool_id, Q = `${I}::${se}`, be = Y.getState().elicitationState[Q], Ue = j.details?.component, We = x?.data?.details?._meta?.tool_result, Zt = j.details?.input, Ie = Of(be?.input, Zt, Ue);
|
|
12185
12183
|
let it = x.data.details?._meta?.disp_toast_msg;
|
|
12186
12184
|
const mt = j?.details?._meta?.schema?.required || [];
|
|
12187
12185
|
switch (j?.details?.status) {
|
|
12188
12186
|
case P.SYNAPSE_EICITATION_STATUS.PROGRESS: {
|
|
12189
12187
|
const Me = x?.data?.details?.input || {}, Ve = mt.reduce((lt, gt) => (Me[gt] !== void 0 && (lt[gt] = Me[gt]), lt), {}), ne = { ...be?.server_input || {}, ...Ve }, nt = mt.filter((lt) => !ne[lt]), Tt = x.data.details?._meta?.mcp_meta_fields || [];
|
|
12190
|
-
|
|
12188
|
+
xe(Q, {
|
|
12191
12189
|
tool_id: se,
|
|
12192
12190
|
active: !0,
|
|
12193
12191
|
disabled: !1,
|
|
12194
12192
|
input: Ie,
|
|
12195
12193
|
server_input: ne,
|
|
12196
|
-
messageId:
|
|
12194
|
+
messageId: I,
|
|
12197
12195
|
required: mt,
|
|
12198
12196
|
component: Ue,
|
|
12199
12197
|
pattern: x.data.details?._meta?.schema?.properties?.[x.data.details?.component]?.pattern,
|
|
@@ -12202,7 +12200,7 @@ const $t = (e) => {
|
|
|
12202
12200
|
type: x.data.details?._meta?.schema?.properties?.[x.data.details?.component]?.type,
|
|
12203
12201
|
disp_toast_msg: x.data.details?._meta?.disp_toast_msg,
|
|
12204
12202
|
description: x.data.details?._meta?.schema?.properties?.[x.data.details?.component]?.description,
|
|
12205
|
-
tool_result:
|
|
12203
|
+
tool_result: We,
|
|
12206
12204
|
orientation: x.data.details?._meta?.orientation,
|
|
12207
12205
|
...Tt.length && { mcp_meta_fields: Tt },
|
|
12208
12206
|
...nt ? { toolSelectionNames: nt } : {},
|
|
@@ -12211,7 +12209,7 @@ const $t = (e) => {
|
|
|
12211
12209
|
break;
|
|
12212
12210
|
}
|
|
12213
12211
|
case P.SYNAPSE_EICITATION_STATUS.SUCCESS: {
|
|
12214
|
-
|
|
12212
|
+
xe(Q, {
|
|
12215
12213
|
...be || {},
|
|
12216
12214
|
tool_id: se,
|
|
12217
12215
|
// disabled: !isActiveComponent(component),
|
|
@@ -12219,46 +12217,46 @@ const $t = (e) => {
|
|
|
12219
12217
|
//Oce BE changes for messsage id is done, we will change this
|
|
12220
12218
|
active: ru(Ue),
|
|
12221
12219
|
//to continue tool calls
|
|
12222
|
-
messageId:
|
|
12220
|
+
messageId: I,
|
|
12223
12221
|
component: Ue,
|
|
12224
12222
|
input: Ie,
|
|
12225
|
-
tool_result:
|
|
12223
|
+
tool_result: We,
|
|
12226
12224
|
send_to_llm: !0
|
|
12227
12225
|
//to send the tool results immediately after success
|
|
12228
12226
|
});
|
|
12229
12227
|
break;
|
|
12230
12228
|
}
|
|
12231
12229
|
case P.SYNAPSE_EICITATION_STATUS.FAILURE: {
|
|
12232
|
-
|
|
12230
|
+
xe(Q, {
|
|
12233
12231
|
...be || {},
|
|
12234
12232
|
tool_id: se,
|
|
12235
12233
|
active: !1,
|
|
12236
|
-
messageId:
|
|
12234
|
+
messageId: I,
|
|
12237
12235
|
response_value: { label: j?.details?._meta?.disp_message || "Tool call failed" },
|
|
12238
|
-
tool_result:
|
|
12236
|
+
tool_result: We,
|
|
12239
12237
|
disabled: !0
|
|
12240
12238
|
});
|
|
12241
12239
|
break;
|
|
12242
12240
|
}
|
|
12243
12241
|
default:
|
|
12244
|
-
|
|
12242
|
+
xe(Q, {
|
|
12245
12243
|
tool_id: se,
|
|
12246
12244
|
disabled: !1,
|
|
12247
12245
|
active: !1,
|
|
12248
|
-
messageId:
|
|
12249
|
-
tool_result:
|
|
12246
|
+
messageId: I,
|
|
12247
|
+
tool_result: We,
|
|
12250
12248
|
input: Ie,
|
|
12251
12249
|
// send_to_llm: true,
|
|
12252
12250
|
component: Ue
|
|
12253
12251
|
});
|
|
12254
12252
|
}
|
|
12255
|
-
it &&
|
|
12253
|
+
it && $e(it);
|
|
12256
12254
|
const pt = x?.data?.details?._meta?.user_hint;
|
|
12257
12255
|
i((Me) => {
|
|
12258
|
-
let ne = Me[Me.length - 1]?.id ===
|
|
12256
|
+
let ne = Me[Me.length - 1]?.id === I ? Me.length - 1 : Me.findIndex?.((nt) => nt.id === I);
|
|
12259
12257
|
if (ne == -1) {
|
|
12260
12258
|
const nt = {
|
|
12261
|
-
id:
|
|
12259
|
+
id: I,
|
|
12262
12260
|
content: x.data?.details?.input?.text || "",
|
|
12263
12261
|
role: ze.ASSISTANT,
|
|
12264
12262
|
tool_keys: [Q],
|
|
@@ -12275,21 +12273,21 @@ const $t = (e) => {
|
|
|
12275
12273
|
tool_keys: [.../* @__PURE__ */ new Set([...Me[ne].tool_keys || [], Q])],
|
|
12276
12274
|
...pt ? { userHint: pt } : {}
|
|
12277
12275
|
};
|
|
12278
|
-
Me[ne] = nt, he(b,
|
|
12276
|
+
Me[ne] = nt, he(b, I, nt);
|
|
12279
12277
|
}
|
|
12280
12278
|
return [...Me];
|
|
12281
12279
|
});
|
|
12282
|
-
const Lt = x?.data?.details?._meta?.disp_message, hn =
|
|
12283
|
-
if ((!hn[Q]?.active || hn[Q]?.send_to_llm) && (Lt || Object.keys(
|
|
12280
|
+
const Lt = x?.data?.details?._meta?.disp_message, hn = Y.getState().elicitationState;
|
|
12281
|
+
if ((!hn[Q]?.active || hn[Q]?.send_to_llm) && (Lt || Object.keys(We || {}).length))
|
|
12284
12282
|
try {
|
|
12285
|
-
Mt({ message: Lt || "", tool_result:
|
|
12283
|
+
Mt({ message: Lt || "", tool_result: We, toolCalled: !0, tool_key: Q });
|
|
12286
12284
|
} catch {
|
|
12287
12285
|
}
|
|
12288
12286
|
}
|
|
12289
12287
|
), _.current?.on(P.SYNAPSE_REALTIME_EVENTS.DISCONNECTED, (R) => {
|
|
12290
12288
|
if (R?.reason === P.DisconnectionReason.CLIENT_CLOSED) return;
|
|
12291
12289
|
const x = typeof navigator < "u" && !navigator.onLine;
|
|
12292
|
-
if (ie(
|
|
12290
|
+
if (ie(Ce.NOT_CONNECTED), x) {
|
|
12293
12291
|
B({
|
|
12294
12292
|
title: "No internet connection",
|
|
12295
12293
|
description: "Will reconnect automatically when internet is restored."
|
|
@@ -12302,17 +12300,17 @@ const $t = (e) => {
|
|
|
12302
12300
|
})) : (B({
|
|
12303
12301
|
title: "Something went wrong!",
|
|
12304
12302
|
description: "Please start a new Chat."
|
|
12305
|
-
}),
|
|
12303
|
+
}), G(!0));
|
|
12306
12304
|
}), _.current?.on(P.SYNAPSE_REALTIME_EVENTS.ERROR, (R) => {
|
|
12307
12305
|
switch (R?.data?.code) {
|
|
12308
12306
|
case P.SYNAPSE_REALTIME_ERROR_CODES.SESSION_INACTIVE:
|
|
12309
|
-
|
|
12307
|
+
G(!0), _e(Ee.IDLE);
|
|
12310
12308
|
return;
|
|
12311
12309
|
case P.SYNAPSE_REALTIME_ERROR_CODES.SESSION_TOKEN_MISMATCH:
|
|
12312
12310
|
B({
|
|
12313
12311
|
title: "Session not found",
|
|
12314
12312
|
description: "Please start a new chat from onError callback"
|
|
12315
|
-
}),
|
|
12313
|
+
}), G(!0), _e(Ee.IDLE);
|
|
12316
12314
|
return;
|
|
12317
12315
|
case P.SYNAPSE_REALTIME_ERROR_CODES.SESSION_NOT_OWNED:
|
|
12318
12316
|
Pt();
|
|
@@ -12364,30 +12362,30 @@ const $t = (e) => {
|
|
|
12364
12362
|
}
|
|
12365
12363
|
}), _.current?.on(P.SYNAPSE_REALTIME_EVENTS.AUDIO_TRANSCRIPT, async (R) => {
|
|
12366
12364
|
const x = R;
|
|
12367
|
-
x?.data?.text && (i((
|
|
12365
|
+
x?.data?.text && (i((I) => [...I, {
|
|
12368
12366
|
id: Date.now().toString(),
|
|
12369
12367
|
content: x.data.text || "",
|
|
12370
12368
|
role: ze.USER,
|
|
12371
12369
|
timestamp: jt(Date.now()),
|
|
12372
12370
|
isStored: !0
|
|
12373
|
-
}]), _e(Ee.IDLE)), Z(!1), X(!1),
|
|
12371
|
+
}]), _e(Ee.IDLE)), Z(!1), X(!1), Te(null);
|
|
12374
12372
|
}), _.current?.on(P.SYNAPSE_REALTIME_EVENTS.PROGRESS_MESSAGE, (R) => {
|
|
12375
12373
|
v.current = !0;
|
|
12376
12374
|
const x = R;
|
|
12377
|
-
x.data?.text && (X(!1),
|
|
12375
|
+
x.data?.text && (X(!1), Te(x.data.text));
|
|
12378
12376
|
}), _.current?.on(P.SYNAPSE_REALTIME_EVENTS.TOOL_START, (R) => {
|
|
12379
12377
|
v.current = !0;
|
|
12380
12378
|
const x = R;
|
|
12381
12379
|
if (x.data?.name && x.messageId) {
|
|
12382
|
-
const
|
|
12380
|
+
const I = x.messageId;
|
|
12383
12381
|
i((j) => {
|
|
12384
12382
|
const se = j[j.length - 1];
|
|
12385
|
-
if (se && se.id ===
|
|
12383
|
+
if (se && se.id === I && se.role === ze.ASSISTANT) {
|
|
12386
12384
|
const Q = [...j];
|
|
12387
12385
|
return Q[Q.length - 1] = {
|
|
12388
12386
|
...se,
|
|
12389
12387
|
toolCallStatus: `Calling tool: ${x.data.name}...`
|
|
12390
|
-
}, b && he(b,
|
|
12388
|
+
}, b && he(b, I, {
|
|
12391
12389
|
toolCallStatus: `Calling tool: ${x.data.name}...`
|
|
12392
12390
|
}), Q;
|
|
12393
12391
|
}
|
|
@@ -12398,15 +12396,15 @@ const $t = (e) => {
|
|
|
12398
12396
|
v.current = !0;
|
|
12399
12397
|
const x = R;
|
|
12400
12398
|
if (x.data?.name && x.messageId) {
|
|
12401
|
-
const
|
|
12399
|
+
const I = x.messageId;
|
|
12402
12400
|
i((j) => {
|
|
12403
12401
|
const se = j[j.length - 1];
|
|
12404
|
-
if (se && se.id ===
|
|
12402
|
+
if (se && se.id === I && se.role === ze.ASSISTANT) {
|
|
12405
12403
|
const Q = [...j];
|
|
12406
12404
|
return Q[Q.length - 1] = {
|
|
12407
12405
|
...se,
|
|
12408
12406
|
toolCallStatus: "Tool call completed."
|
|
12409
|
-
}, b && he(b,
|
|
12407
|
+
}, b && he(b, I, {
|
|
12410
12408
|
toolCallStatus: "Tool call completed."
|
|
12411
12409
|
}), Q;
|
|
12412
12410
|
}
|
|
@@ -12417,16 +12415,16 @@ const $t = (e) => {
|
|
|
12417
12415
|
}, Mt = async ({
|
|
12418
12416
|
message: R,
|
|
12419
12417
|
files: x,
|
|
12420
|
-
audio:
|
|
12418
|
+
audio: I,
|
|
12421
12419
|
toolCalled: j,
|
|
12422
12420
|
selectedComponent: se,
|
|
12423
12421
|
resend: Q,
|
|
12424
|
-
tool_declined:
|
|
12422
|
+
tool_declined: Re,
|
|
12425
12423
|
tool_result: be,
|
|
12426
12424
|
tool_key: Ue
|
|
12427
12425
|
}) => {
|
|
12428
|
-
const
|
|
12429
|
-
if (!(!j && (!x || x.length === 0) && !R?.trim() && !
|
|
12426
|
+
const We = Y.getState().elicitationState, Zt = Object.values(We).some((Ie) => Ie.active);
|
|
12427
|
+
if (!(!j && (!x || x.length === 0) && !R?.trim() && !I?.audio && !se && !Zt && !be && !Object.keys(be || {}).length)) {
|
|
12430
12428
|
if (x && x.length > 3) {
|
|
12431
12429
|
B({
|
|
12432
12430
|
title: "Maximum 3 files are allowed to be sent at a time",
|
|
@@ -12448,30 +12446,30 @@ const $t = (e) => {
|
|
|
12448
12446
|
description: `${Ie <= 0 ? "Maximum file upload limit reached" : `You have ${Ie} file${Ie === 1 ? "" : "s"} upload${Ie === 1 ? "" : "s"} left`}`
|
|
12449
12447
|
});
|
|
12450
12448
|
return;
|
|
12451
|
-
} else x && x.length &&
|
|
12452
|
-
B(null), H(!1),
|
|
12449
|
+
} else x && x.length && Ze(re + x.length);
|
|
12450
|
+
B(null), H(!1), Xe() && ie(Ce.CONNECTED);
|
|
12453
12451
|
try {
|
|
12454
12452
|
const Ie = l.length == 2 && h.length == 2 ? h : null;
|
|
12455
12453
|
let it = null, mt = null;
|
|
12456
|
-
const pt = l.length - 1, Lt = pt >= 0 ? l[pt] : null, Me =
|
|
12454
|
+
const pt = l.length - 1, Lt = pt >= 0 ? l[pt] : null, Me = Y.getState().elicitationState, Ve = Ue || null, ne = Ve ? Me[Ve] : void 0, Tt = ne?.component === P.SYNAPSE_COMPONENTS.DOCTOR_CARD || ne?.component === P.SYNAPSE_COMPONENTS.CARD ? !!ne && !be && !!ne.active : !!ne?.active, lt = !!(x || []).length || !!I?.audio || !!Re || !Tt || !j, gt = se ? se.label : void 0, Xt = ne?.component === P.SYNAPSE_COMPONENTS.PILL && typeof gt == "string" ? gt : null;
|
|
12457
12455
|
if (!lt && Tt && Ve && ne?.messageId) {
|
|
12458
|
-
const ee = ne.toolSelectionNames?.length ? ne.toolSelectionNames : ne.required?.filter((
|
|
12456
|
+
const ee = ne.toolSelectionNames?.length ? ne.toolSelectionNames : ne.required?.filter((we) => !ne.server_input?.[we]) ?? [], Ne = ee.reduce((we, Se) => {
|
|
12459
12457
|
if (se) {
|
|
12460
12458
|
const pn = se[Se];
|
|
12461
|
-
pn !== void 0 && (
|
|
12462
|
-
} else ee.length === 1 && (
|
|
12463
|
-
return
|
|
12464
|
-
}, {}), ct = ne.mcp_meta_fields?.reduce((
|
|
12459
|
+
pn !== void 0 && (we[Se] = pn);
|
|
12460
|
+
} else ee.length === 1 && (we[Se] = R);
|
|
12461
|
+
return we;
|
|
12462
|
+
}, {}), ct = ne.mcp_meta_fields?.reduce((we, Se) => (ee.includes(Se) ? we[Se] = Ne[Se] : ne.server_input?.[Se] && (we[Se] = ne.server_input[Se]), Q && !we.is_resend && (we.is_resend = Q), we), {}), fn = Object.keys(ne.server_input || {})?.reduce((we, Se) => {
|
|
12465
12463
|
const pn = !Object.keys(ct || {})?.includes(Se), cs = !!ne.server_input?.[Se];
|
|
12466
|
-
return (Q ? pn && cs : pn && ne.required?.includes(Se) && cs) && (
|
|
12467
|
-
}, {}), Lr = Q ? {} : (ne.required || ee).reduce((
|
|
12464
|
+
return (Q ? pn && cs : pn && ne.required?.includes(Se) && cs) && (we[Se] = ne.server_input?.[Se]), we;
|
|
12465
|
+
}, {}), Lr = Q ? {} : (ne.required || ee).reduce((we, Se) => (Object.keys(ct || {}).includes(Se) || (Ne[Se] !== void 0 ? we[Se] = Ne[Se] : se && se[Se] !== void 0 && (we[Se] = se[Se])), we), {}), mn = {
|
|
12468
12466
|
...fn || {},
|
|
12469
12467
|
//existing inputs
|
|
12470
12468
|
...Lr,
|
|
12471
12469
|
...Object.keys(ct || {}).length && { mcp_meta_fields: ct }
|
|
12472
12470
|
};
|
|
12473
12471
|
if (!Object.keys(mn).length) return;
|
|
12474
|
-
await
|
|
12472
|
+
await xe(Ve, {
|
|
12475
12473
|
...ne,
|
|
12476
12474
|
server_input: {
|
|
12477
12475
|
...ne.server_input || {},
|
|
@@ -12480,16 +12478,16 @@ const $t = (e) => {
|
|
|
12480
12478
|
});
|
|
12481
12479
|
try {
|
|
12482
12480
|
await rr(ne.tool_id, ne.messageId, mn), it = !0;
|
|
12483
|
-
} catch (
|
|
12484
|
-
await _.current?.sendMessage({ tool_result: { ...ne.tool_result, error: `Tool call failed: ${$t(
|
|
12481
|
+
} catch (we) {
|
|
12482
|
+
await _.current?.sendMessage({ tool_result: { ...ne.tool_result, error: `Tool call failed: ${$t(we)}` } }), mt = "Tool call failed", xe(Ve, {
|
|
12485
12483
|
...ne,
|
|
12486
12484
|
active: !1,
|
|
12487
12485
|
disabled: !0,
|
|
12488
|
-
response_value: { label: `Tool call failed: ${$t(
|
|
12486
|
+
response_value: { label: `Tool call failed: ${$t(we)}` }
|
|
12489
12487
|
});
|
|
12490
12488
|
}
|
|
12491
12489
|
} else {
|
|
12492
|
-
const ee = Lt?.id,
|
|
12490
|
+
const ee = Lt?.id, Ne = ee ? Object.entries(We).filter(([fn, Lr]) => {
|
|
12493
12491
|
const [mn] = fn.split("::");
|
|
12494
12492
|
return mn === ee && Lr.active;
|
|
12495
12493
|
}) : [], ct = be ?? ne?.tool_result;
|
|
@@ -12497,18 +12495,18 @@ const $t = (e) => {
|
|
|
12497
12495
|
// Always a string — a tool_result forward with no user text sends "".
|
|
12498
12496
|
message: R ?? "",
|
|
12499
12497
|
files: x,
|
|
12500
|
-
audio:
|
|
12498
|
+
audio: I,
|
|
12501
12499
|
...Ie && { initial_prompts: Ie },
|
|
12502
|
-
...
|
|
12500
|
+
...Re || Ne.length > 0 ? {
|
|
12503
12501
|
tool_declined: !0,
|
|
12504
12502
|
tool_id: ne?.tool_id || ""
|
|
12505
12503
|
} : {},
|
|
12506
12504
|
...ct && { tool_result: ct }
|
|
12507
12505
|
});
|
|
12508
12506
|
}
|
|
12509
|
-
(R || x && x.length > 0 ||
|
|
12507
|
+
(R || x && x.length > 0 || I?.audio || Xt || mt) && (i((ee) => {
|
|
12510
12508
|
if (it) return ee;
|
|
12511
|
-
const
|
|
12509
|
+
const Ne = ee.length === 0 && A?.text ? [{
|
|
12512
12510
|
id: "initial-bot-message",
|
|
12513
12511
|
content: A.text,
|
|
12514
12512
|
role: ze.ASSISTANT,
|
|
@@ -12517,27 +12515,27 @@ const $t = (e) => {
|
|
|
12517
12515
|
}] : [];
|
|
12518
12516
|
return [
|
|
12519
12517
|
...ee,
|
|
12520
|
-
...
|
|
12518
|
+
...Ne,
|
|
12521
12519
|
{
|
|
12522
12520
|
id: Date.now().toString(),
|
|
12523
12521
|
content: Xt || mt || R || "",
|
|
12524
12522
|
files: x || [],
|
|
12525
|
-
audio:
|
|
12523
|
+
audio: I,
|
|
12526
12524
|
role: ze.USER,
|
|
12527
12525
|
timestamp: jt(Date.now()),
|
|
12528
12526
|
isStored: !1
|
|
12529
12527
|
}
|
|
12530
12528
|
];
|
|
12531
12529
|
}), it || X(!0), it = null);
|
|
12532
|
-
const Pr =
|
|
12530
|
+
const Pr = Y.getState().elicitationState, ae = /* @__PURE__ */ new Set();
|
|
12533
12531
|
Ve && ae.add(Ve), Lt?.tool_keys?.forEach((ee) => ae.add(ee)), ae.forEach((ee) => {
|
|
12534
|
-
const
|
|
12535
|
-
|
|
12536
|
-
...
|
|
12532
|
+
const Ne = Pr[ee];
|
|
12533
|
+
Ne && xe(ee, {
|
|
12534
|
+
...Ne,
|
|
12537
12535
|
...lt && { active: !1, disabled: !0 },
|
|
12538
12536
|
...ee === Ve ? {
|
|
12539
12537
|
response_value: {
|
|
12540
|
-
...
|
|
12538
|
+
...Ne?.response_value || {},
|
|
12541
12539
|
label: Xt || R || ""
|
|
12542
12540
|
}
|
|
12543
12541
|
} : {}
|
|
@@ -12572,14 +12570,14 @@ const $t = (e) => {
|
|
|
12572
12570
|
}
|
|
12573
12571
|
}, Mr = () => {
|
|
12574
12572
|
_.current?.endRecording();
|
|
12575
|
-
}, rr = async (R, x,
|
|
12573
|
+
}, rr = async (R, x, I) => {
|
|
12576
12574
|
try {
|
|
12577
|
-
if (!
|
|
12575
|
+
if (!Xe())
|
|
12578
12576
|
throw new Error("Not connected to the server");
|
|
12579
12577
|
await _.current?.callTool(
|
|
12580
12578
|
R,
|
|
12581
12579
|
x,
|
|
12582
|
-
|
|
12580
|
+
I
|
|
12583
12581
|
);
|
|
12584
12582
|
} catch (j) {
|
|
12585
12583
|
throw j;
|
|
@@ -12587,8 +12585,8 @@ const $t = (e) => {
|
|
|
12587
12585
|
}, Pt = async () => {
|
|
12588
12586
|
st(), await ce(), await tt({ forceNewSession: !0 });
|
|
12589
12587
|
}, un = async () => {
|
|
12590
|
-
if (
|
|
12591
|
-
ie(
|
|
12588
|
+
if (Xe()) {
|
|
12589
|
+
ie(Ce.CONNECTED);
|
|
12592
12590
|
const R = c.current[c.current.length - 1];
|
|
12593
12591
|
if (R && R.role === ze.USER)
|
|
12594
12592
|
try {
|
|
@@ -12600,16 +12598,16 @@ const $t = (e) => {
|
|
|
12600
12598
|
});
|
|
12601
12599
|
} catch {
|
|
12602
12600
|
}
|
|
12603
|
-
} else if (ie(
|
|
12601
|
+
} else if (ie(Ce.NOT_CONNECTED), m.current < 2) {
|
|
12604
12602
|
m.current++;
|
|
12605
|
-
const { sessionId: R } =
|
|
12603
|
+
const { sessionId: R } = Y.getState();
|
|
12606
12604
|
await Ae(R);
|
|
12607
12605
|
} else m.current === 2 ? (m.current++, H(!0), B({
|
|
12608
12606
|
title: "Trying to connect..."
|
|
12609
12607
|
})) : (B({
|
|
12610
12608
|
title: "Something went wrong!",
|
|
12611
12609
|
description: "Please start a new chat."
|
|
12612
|
-
}),
|
|
12610
|
+
}), G(!0));
|
|
12613
12611
|
};
|
|
12614
12612
|
return {
|
|
12615
12613
|
sendMessage: Mt,
|
|
@@ -12637,14 +12635,14 @@ const $t = (e) => {
|
|
|
12637
12635
|
if (!A?.suggestions?.length || !R)
|
|
12638
12636
|
return;
|
|
12639
12637
|
const x = A.suggestions.find(
|
|
12640
|
-
(
|
|
12638
|
+
(I) => I.value === R
|
|
12641
12639
|
);
|
|
12642
12640
|
if (!x || !x.response) {
|
|
12643
12641
|
await Mt({ message: R });
|
|
12644
12642
|
return;
|
|
12645
12643
|
}
|
|
12646
|
-
i((
|
|
12647
|
-
...
|
|
12644
|
+
i((I) => [
|
|
12645
|
+
...I,
|
|
12648
12646
|
{
|
|
12649
12647
|
id: Date.now().toString(),
|
|
12650
12648
|
content: R,
|
|
@@ -12653,8 +12651,8 @@ const $t = (e) => {
|
|
|
12653
12651
|
isStored: !1
|
|
12654
12652
|
}
|
|
12655
12653
|
]), X(!0), await ou(1e3), X(!1), i(
|
|
12656
|
-
(
|
|
12657
|
-
...
|
|
12654
|
+
(I) => [
|
|
12655
|
+
...I,
|
|
12658
12656
|
{
|
|
12659
12657
|
id: Date.now().toString(),
|
|
12660
12658
|
content: x.response || "Please try again",
|
|
@@ -12665,22 +12663,22 @@ const $t = (e) => {
|
|
|
12665
12663
|
]
|
|
12666
12664
|
), E([{ role: "user", text: R }, { role: "assistant", text: x.response }]);
|
|
12667
12665
|
},
|
|
12668
|
-
sendMessageFeedback: async (R, x,
|
|
12669
|
-
if (
|
|
12666
|
+
sendMessageFeedback: async (R, x, I) => {
|
|
12667
|
+
if (Xe())
|
|
12670
12668
|
try {
|
|
12671
|
-
await _.current?.sendMessageFeedback(x, R,
|
|
12669
|
+
await _.current?.sendMessageFeedback(x, R, I);
|
|
12672
12670
|
} catch {
|
|
12673
12671
|
}
|
|
12674
12672
|
},
|
|
12675
12673
|
sendSessionFeedback: async (R, x) => {
|
|
12676
|
-
if (!(!
|
|
12674
|
+
if (!(!Xe() || !R?.length && !x))
|
|
12677
12675
|
try {
|
|
12678
12676
|
await _.current?.sendSessionFeedback(R, x);
|
|
12679
12677
|
} catch {
|
|
12680
12678
|
}
|
|
12681
12679
|
},
|
|
12682
12680
|
clearElicitationState: async (R, x) => {
|
|
12683
|
-
const
|
|
12681
|
+
const I = Y.getState().elicitationState, j = R ? I[R] : void 0;
|
|
12684
12682
|
try {
|
|
12685
12683
|
await Mt({
|
|
12686
12684
|
message: x || "User aborted elicitation",
|
|
@@ -12690,7 +12688,7 @@ const $t = (e) => {
|
|
|
12690
12688
|
});
|
|
12691
12689
|
} catch {
|
|
12692
12690
|
} finally {
|
|
12693
|
-
R && j &&
|
|
12691
|
+
R && j && xe(R, { ...j, active: !1, disabled: !0 });
|
|
12694
12692
|
}
|
|
12695
12693
|
}
|
|
12696
12694
|
};
|
|
@@ -12803,7 +12801,7 @@ function Yf({ isOpen: e, agentId: t, config: n }) {
|
|
|
12803
12801
|
toggleMute: c
|
|
12804
12802
|
} = oh(), d = () => {
|
|
12805
12803
|
r === P.VOICE_AGENT_STATE.IDLE && s();
|
|
12806
|
-
}, f = r !== P.VOICE_AGENT_STATE.IDLE, [u, p] = F(""), [y, m] = F(!1), g =
|
|
12804
|
+
}, f = r !== P.VOICE_AGENT_STATE.IDLE, [u, p] = F(""), [y, m] = F(!1), g = Y((ae) => ae.setDisplayMode), [S, h] = F(
|
|
12807
12805
|
n.displayMode === "full" ? "full" : "widget"
|
|
12808
12806
|
), E = () => h((ae) => ae === "full" ? "widget" : "full"), N = Fl() ? "mobile" : S, [w, C] = F([]), v = W(!1), [T, b] = F(!1), [k, O] = F(!1), A = W(null), {
|
|
12809
12807
|
setAgentId: $,
|
|
@@ -12811,30 +12809,30 @@ function Yf({ isOpen: e, agentId: t, config: n }) {
|
|
|
12811
12809
|
showRetryButton: K,
|
|
12812
12810
|
clearError: ue,
|
|
12813
12811
|
error: oe,
|
|
12814
|
-
connectionStatus:
|
|
12812
|
+
connectionStatus: M,
|
|
12815
12813
|
recordingStatus: B,
|
|
12816
12814
|
isWaitingForResponse: ie,
|
|
12817
12815
|
isStreaming: H,
|
|
12818
|
-
setError:
|
|
12816
|
+
setError: G,
|
|
12819
12817
|
sessionId: Z,
|
|
12820
12818
|
setContext: X,
|
|
12821
|
-
initialMessage:
|
|
12819
|
+
initialMessage: Te,
|
|
12822
12820
|
setInitialMessage: _e,
|
|
12823
12821
|
sessionInitialMessages: ce,
|
|
12824
|
-
setInitialDisplayMode:
|
|
12825
|
-
clearSession:
|
|
12826
|
-
} =
|
|
12822
|
+
setInitialDisplayMode: Be,
|
|
12823
|
+
clearSession: Ye
|
|
12824
|
+
} = Y(), D = Y((ae) => ae.elicitationState), ye = Y((ae) => ae.level), he = n?.theme?.feature === !0, {
|
|
12827
12825
|
incomingMessages: me,
|
|
12828
|
-
loading:
|
|
12829
|
-
isLoadingSessionMessages:
|
|
12830
|
-
sendMessage:
|
|
12826
|
+
loading: Ze,
|
|
12827
|
+
isLoadingSessionMessages: $e,
|
|
12828
|
+
sendMessage: xe,
|
|
12831
12829
|
startSession: Fe,
|
|
12832
12830
|
isReady: ke,
|
|
12833
12831
|
startRecording: ft,
|
|
12834
12832
|
stopRecording: Ae,
|
|
12835
|
-
handleRetry:
|
|
12833
|
+
handleRetry: Ge,
|
|
12836
12834
|
isValidFile: tt,
|
|
12837
|
-
sendMessageFeedback:
|
|
12835
|
+
sendMessageFeedback: Xe,
|
|
12838
12836
|
clearElicitationState: Ot,
|
|
12839
12837
|
sendSessionFeedback: st,
|
|
12840
12838
|
getPastSessions: It
|
|
@@ -12866,13 +12864,13 @@ function Yf({ isOpen: e, agentId: t, config: n }) {
|
|
|
12866
12864
|
z(() => {
|
|
12867
12865
|
!he || N !== "full" || ye !== "user" || Kt();
|
|
12868
12866
|
}, [he, N, ye, Z, Kt]), z(() => {
|
|
12869
|
-
t && (A.current !== t && (Qu(t), eh(t), $(t), n.force &&
|
|
12867
|
+
t && (A.current !== t && (Qu(t), eh(t), $(t), n.force && Ye(), (n.displayMode === "full" || n.displayMode === "widget") && (g(n.displayMode), Be(n.displayMode)), n?.context && Object.keys(n?.context || {}).length && X(n.context), (n?.initialMessage?.text || n?.initialMessage?.suggestions?.length) && _e(n.initialMessage), A.current = t), e && ke && !v.current && (v.current = !0, Fe({ forceNewSession: !1 })));
|
|
12870
12868
|
}, [e, ke, t]), z(() => () => {
|
|
12871
12869
|
l();
|
|
12872
12870
|
}, []);
|
|
12873
12871
|
const x = () => {
|
|
12874
12872
|
n.feedback && !Hf(t) ? O(!0) : n.onClose();
|
|
12875
|
-
},
|
|
12873
|
+
}, I = async (ae, ee) => {
|
|
12876
12874
|
await st(ae, ee), O(!1), n.onClose();
|
|
12877
12875
|
}, j = () => {
|
|
12878
12876
|
O(!1), n.onClose();
|
|
@@ -12880,12 +12878,12 @@ function Yf({ isOpen: e, agentId: t, config: n }) {
|
|
|
12880
12878
|
jf(t), O(!1), n.onClose();
|
|
12881
12879
|
}, Q = () => {
|
|
12882
12880
|
O(!1);
|
|
12883
|
-
},
|
|
12881
|
+
}, Re = me.length > 0, be = me.length === 1, Ue = fe(() => {
|
|
12884
12882
|
const ae = me[me.length - 1], ee = ae?.tool_keys?.[ae.tool_keys.length - 1];
|
|
12885
12883
|
if (!ee) return null;
|
|
12886
|
-
const
|
|
12887
|
-
return
|
|
12888
|
-
}, [me, D]),
|
|
12884
|
+
const Ne = D[ee];
|
|
12885
|
+
return Ne?.active ? { ...Ne, tool_key: ee } : null;
|
|
12886
|
+
}, [me, D]), We = fe(() => (Z ? ce[Z] : void 0) ?? Te ?? n?.initialMessage ?? null, [Z, ce, Te, n?.initialMessage]), Zt = fe(() => !!We?.text || !!We?.suggestions?.length, [We]), Ie = fe(() => Zt && me?.length === 0 && !$e, [me, Zt, $e]), it = fe(() => Ue ? Ue.component === P.SYNAPSE_COMPONENTS.MOBILE || Ue.component === P.SYNAPSE_COMPONENTS.OTP || Ue.component === P.SYNAPSE_COMPONENTS.EMAIL : !1, [Ue]), {
|
|
12889
12887
|
scrollAreaRef: mt,
|
|
12890
12888
|
messagesEndRef: pt,
|
|
12891
12889
|
showScrollButton: Lt,
|
|
@@ -12895,26 +12893,26 @@ function Yf({ isOpen: e, agentId: t, config: n }) {
|
|
|
12895
12893
|
isStreaming: H,
|
|
12896
12894
|
isFirstMessage: be,
|
|
12897
12895
|
resolvedMode: N
|
|
12898
|
-
}), Me =
|
|
12896
|
+
}), Me = M === P.ConnectionStatus.CONNECTED, Ve = ie || H, ne = fe(() => B === Ee.IDLE ? null : B === Ee.LISTENING ? "Listening..." : B === Ee.PROCESSING ? "Processing..." : B === Ee.TRANSCRIBING ? "Transcribing..." : null, [B]), nt = ne && B !== Ee.IDLE ? ne : ie || H ? "Please wait for the response..." : "Type a reply…", Tt = async (ae) => {
|
|
12899
12897
|
if (Ve)
|
|
12900
12898
|
return;
|
|
12901
12899
|
const ee = ae?.message ?? u;
|
|
12902
|
-
(ee.trim() || y || T || ae?.resend) && (w.length > 0 ? (await
|
|
12900
|
+
(ee.trim() || y || T || ae?.resend) && (w.length > 0 ? (await xe({
|
|
12903
12901
|
files: w,
|
|
12904
12902
|
message: ee.trim()
|
|
12905
|
-
}), C([]), b(!1)) : ee.trim() ? await
|
|
12903
|
+
}), C([]), b(!1)) : ee.trim() ? await xe({ ...ae, message: ee.trim() }) : ae?.resend && await xe(ae), p(""), m(!1), b(!1));
|
|
12906
12904
|
}, lt = (ae) => {
|
|
12907
12905
|
if (ae && ae.length > 0) {
|
|
12908
|
-
const ee = ae.filter((
|
|
12906
|
+
const ee = ae.filter((Ne) => !!tt(Ne));
|
|
12909
12907
|
if (ee?.length + w.length > 3) {
|
|
12910
|
-
|
|
12908
|
+
G({
|
|
12911
12909
|
title: "You can only upload up to 3 files at a time",
|
|
12912
12910
|
description: "Please remove some files and try again."
|
|
12913
12911
|
});
|
|
12914
12912
|
return;
|
|
12915
12913
|
}
|
|
12916
|
-
if (ee?.length > 0 && ee.reduce((
|
|
12917
|
-
|
|
12914
|
+
if (ee?.length > 0 && ee.reduce((Ne, ct) => Ne + ct.size, 0) > 10 * 1024 * 1024) {
|
|
12915
|
+
G({
|
|
12918
12916
|
title: `Total file size limit of ${dh} MB exceeded`,
|
|
12919
12917
|
description: "Please reduce the size of the files or try again with less files"
|
|
12920
12918
|
});
|
|
@@ -12928,8 +12926,8 @@ function Yf({ isOpen: e, agentId: t, config: n }) {
|
|
|
12928
12926
|
C((ee) => (b((ee?.length ?? 0) + (ae?.length ?? 0) > 0), [...ee, ...ae]));
|
|
12929
12927
|
}, gt = (ae) => {
|
|
12930
12928
|
C((ee) => {
|
|
12931
|
-
const
|
|
12932
|
-
return b(
|
|
12929
|
+
const Ne = ee.filter((ct, fn) => fn !== ae);
|
|
12930
|
+
return b(Ne.length > 0), Ne;
|
|
12933
12931
|
});
|
|
12934
12932
|
}, Xt = async () => {
|
|
12935
12933
|
if (y)
|
|
@@ -12984,27 +12982,27 @@ function Yf({ isOpen: e, agentId: t, config: n }) {
|
|
|
12984
12982
|
showRetryButton: K,
|
|
12985
12983
|
clearError: ue,
|
|
12986
12984
|
error: oe,
|
|
12987
|
-
connectionStatus:
|
|
12985
|
+
connectionStatus: M,
|
|
12988
12986
|
isStreaming: H,
|
|
12989
12987
|
sessionId: Z,
|
|
12990
12988
|
activeElicitation: Ue,
|
|
12991
12989
|
// Derived
|
|
12992
|
-
inConversation:
|
|
12990
|
+
inConversation: Re,
|
|
12993
12991
|
isFirstMessage: be,
|
|
12994
12992
|
isEmptyChat: Ie,
|
|
12995
12993
|
isAuthComponent: it,
|
|
12996
12994
|
isConnected: Me,
|
|
12997
12995
|
isComposerDisabled: Ve,
|
|
12998
|
-
loading:
|
|
12999
|
-
isLoadingSessionMessages:
|
|
13000
|
-
initialMessage:
|
|
12996
|
+
loading: Ze,
|
|
12997
|
+
isLoadingSessionMessages: $e,
|
|
12998
|
+
initialMessage: We,
|
|
13001
12999
|
// Chat hook values
|
|
13002
13000
|
incomingMessages: me,
|
|
13003
|
-
sendMessage:
|
|
13001
|
+
sendMessage: xe,
|
|
13004
13002
|
startSession: Fe,
|
|
13005
|
-
sendMessageFeedback:
|
|
13003
|
+
sendMessageFeedback: Xe,
|
|
13006
13004
|
clearElicitationState: Ot,
|
|
13007
|
-
handleRetry:
|
|
13005
|
+
handleRetry: Ge,
|
|
13008
13006
|
// Handlers
|
|
13009
13007
|
handleSendMessage: Tt,
|
|
13010
13008
|
handleFileChange: lt,
|
|
@@ -13014,7 +13012,7 @@ function Yf({ isOpen: e, agentId: t, config: n }) {
|
|
|
13014
13012
|
handleClose: x,
|
|
13015
13013
|
// Feedback modal
|
|
13016
13014
|
showFeedbackModal: k,
|
|
13017
|
-
handleSessionFeedbackSubmit:
|
|
13015
|
+
handleSessionFeedbackSubmit: I,
|
|
13018
13016
|
handleSessionFeedbackSkip: j,
|
|
13019
13017
|
handleDontShowAgain: se,
|
|
13020
13018
|
handleCloseModal: Q,
|
|
@@ -13219,7 +13217,7 @@ function ao(e, t, n) {
|
|
|
13219
13217
|
}
|
|
13220
13218
|
function Zm(e = "", t = {}) {
|
|
13221
13219
|
t.overrides = t.overrides || {}, t.namedCodesToUnicode = t.namedCodesToUnicode ? Yt({}, Vi, t.namedCodesToUnicode) : Vi;
|
|
13222
|
-
const n = t.slugify || Vn, r = t.sanitizer || Gm, o = t.createElement ||
|
|
13220
|
+
const n = t.slugify || Vn, r = t.sanitizer || Gm, o = t.createElement || qe, s = [zi, Bi, $i, t.enforceAtxHeadings ? ji : Hi, Yi, Wi, ql, Kl], l = [...s, pm, no, Gi, ro];
|
|
13223
13221
|
function i(h, E) {
|
|
13224
13222
|
for (let _ = 0; _ < h.length; _++) if (h[_].test(E)) return !0;
|
|
13225
13223
|
return !1;
|
|
@@ -13267,17 +13265,17 @@ function Zm(e = "", t = {}) {
|
|
|
13267
13265
|
const k = N[b] = (function(O, A, $, re) {
|
|
13268
13266
|
return A === "style" ? (function(K) {
|
|
13269
13267
|
const ue = [];
|
|
13270
|
-
let oe = "",
|
|
13268
|
+
let oe = "", M = !1, B = !1, ie = "";
|
|
13271
13269
|
if (!K) return ue;
|
|
13272
|
-
for (let
|
|
13273
|
-
const Z = K[
|
|
13274
|
-
if (Z !== '"' && Z !== "'" ||
|
|
13270
|
+
for (let G = 0; G < K.length; G++) {
|
|
13271
|
+
const Z = K[G];
|
|
13272
|
+
if (Z !== '"' && Z !== "'" || M || (B ? Z === ie && (B = !1, ie = "") : (B = !0, ie = Z)), Z === "(" && oe.endsWith("url") ? M = !0 : Z === ")" && M && (M = !1), Z !== ";" || B || M) oe += Z;
|
|
13275
13273
|
else {
|
|
13276
13274
|
const X = oe.trim();
|
|
13277
13275
|
if (X) {
|
|
13278
|
-
const
|
|
13279
|
-
if (
|
|
13280
|
-
const _e = X.slice(0,
|
|
13276
|
+
const Te = X.indexOf(":");
|
|
13277
|
+
if (Te > 0) {
|
|
13278
|
+
const _e = X.slice(0, Te).trim(), ce = X.slice(Te + 1).trim();
|
|
13281
13279
|
ue.push([_e, ce]);
|
|
13282
13280
|
}
|
|
13283
13281
|
}
|
|
@@ -13286,15 +13284,15 @@ function Zm(e = "", t = {}) {
|
|
|
13286
13284
|
}
|
|
13287
13285
|
const H = oe.trim();
|
|
13288
13286
|
if (H) {
|
|
13289
|
-
const
|
|
13290
|
-
if (
|
|
13291
|
-
const Z = H.slice(0,
|
|
13287
|
+
const G = H.indexOf(":");
|
|
13288
|
+
if (G > 0) {
|
|
13289
|
+
const Z = H.slice(0, G).trim(), X = H.slice(G + 1).trim();
|
|
13292
13290
|
ue.push([Z, X]);
|
|
13293
13291
|
}
|
|
13294
13292
|
}
|
|
13295
13293
|
return ue;
|
|
13296
13294
|
})($).reduce(function(K, [ue, oe]) {
|
|
13297
|
-
return K[ue.replace(/(-[a-z])/g, (
|
|
13295
|
+
return K[ue.replace(/(-[a-z])/g, (M) => M[1].toUpperCase())] = re(oe, O, ue), K;
|
|
13298
13296
|
}, {}) : qf.indexOf(A) !== -1 ? re(dt($), O, A) : ($.match(um) && ($ = dt($.slice(1, $.length - 1))), $ === "true" || $ !== "false" && $);
|
|
13299
13297
|
})(h, v, T, r);
|
|
13300
13298
|
typeof k == "string" && (no.test(k) || ro.test(k)) && (N[b] = d(k.trim()));
|
|
@@ -13427,17 +13425,17 @@ const Xm = (e) => {
|
|
|
13427
13425
|
function vo({ children: e }) {
|
|
13428
13426
|
return /* @__PURE__ */ a(Xm, { options: Jm, children: e });
|
|
13429
13427
|
}
|
|
13430
|
-
const Qm =
|
|
13428
|
+
const Qm = Ke(
|
|
13431
13429
|
() => Promise.resolve().then(() => ap).then((e) => ({ default: e.Pills }))
|
|
13432
|
-
), ep =
|
|
13430
|
+
), ep = Ke(
|
|
13433
13431
|
() => import("./medassist-widget-MultiSelect-BnExX-Ty.js").then((e) => ({ default: e.MultiSelectGroup }))
|
|
13434
|
-
), tp =
|
|
13432
|
+
), tp = Ke(
|
|
13435
13433
|
() => import("./medassist-widget-FocusCarousel-C8sm1Tm0.js").then((e) => ({ default: e.FocusCarousel }))
|
|
13436
|
-
), np =
|
|
13434
|
+
), np = Ke(
|
|
13437
13435
|
() => import("./medassist-widget-DoctorCard-Cn_E83qL.js").then((e) => ({ default: e.DoctorCard }))
|
|
13438
|
-
), rp =
|
|
13436
|
+
), rp = Ke(
|
|
13439
13437
|
() => import("./medassist-widget-CardList-Dx2bzaVC.js").then((e) => ({ default: e.CardList }))
|
|
13440
|
-
), op =
|
|
13438
|
+
), op = Ke(
|
|
13441
13439
|
() => import("./medassist-widget-MediaCard-yhz2Z0ZQ.js").then((e) => ({ default: e.MediaCard }))
|
|
13442
13440
|
);
|
|
13443
13441
|
function Pe({ className: e }) {
|
|
@@ -13721,7 +13719,7 @@ function ip({
|
|
|
13721
13719
|
isAuthComponent: m,
|
|
13722
13720
|
isFullScreen: g
|
|
13723
13721
|
}) {
|
|
13724
|
-
const S = t === "user", [h, E] = F(P.USER_FEEDBACK.NONE), _ =
|
|
13722
|
+
const S = t === "user", [h, E] = F(P.USER_FEEDBACK.NONE), _ = Y((C) => C.isStreaming), N = (C) => {
|
|
13725
13723
|
E(C), u(C);
|
|
13726
13724
|
}, w = !!(n?.trim() || r && r.length > 0 || d || s || i);
|
|
13727
13725
|
return /* @__PURE__ */ a(pe, { children: [
|
|
@@ -14035,7 +14033,7 @@ function cp({
|
|
|
14035
14033
|
initialMessage: l,
|
|
14036
14034
|
disabled: i
|
|
14037
14035
|
}) {
|
|
14038
|
-
const c =
|
|
14036
|
+
const c = Y((u) => u.isWaitingForResponse), d = Y((u) => u.elicitationState), f = Y((u) => u.progressMessage);
|
|
14039
14037
|
return e.length === 0 && !f ? /* @__PURE__ */ a(
|
|
14040
14038
|
lp,
|
|
14041
14039
|
{
|
|
@@ -14177,7 +14175,7 @@ function Ji({
|
|
|
14177
14175
|
}
|
|
14178
14176
|
);
|
|
14179
14177
|
}
|
|
14180
|
-
const up =
|
|
14178
|
+
const up = Ke(() => import("./medassist-widget-VoiceAgentScreen-BK0p37RC.js"));
|
|
14181
14179
|
function hp({
|
|
14182
14180
|
isOpen: e,
|
|
14183
14181
|
agentId: t,
|
|
@@ -14215,28 +14213,28 @@ function hp({
|
|
|
14215
14213
|
isMuted: K,
|
|
14216
14214
|
isVoiceAgentActive: ue,
|
|
14217
14215
|
disconnectVoiceAgent: oe,
|
|
14218
|
-
resetVoiceAgent:
|
|
14216
|
+
resetVoiceAgent: M,
|
|
14219
14217
|
toggleMute: B,
|
|
14220
14218
|
handleClose: ie,
|
|
14221
14219
|
isHistoryEnabled: H,
|
|
14222
|
-
isSessionDrawerOpen:
|
|
14220
|
+
isSessionDrawerOpen: G,
|
|
14223
14221
|
pastSessions: Z,
|
|
14224
14222
|
isLoadingPastSessions: X,
|
|
14225
|
-
openSessionDrawer:
|
|
14223
|
+
openSessionDrawer: Te,
|
|
14226
14224
|
closeSessionDrawer: _e,
|
|
14227
14225
|
userLevel: ce,
|
|
14228
|
-
isSidebarCollapsed:
|
|
14229
|
-
toggleSidebar:
|
|
14226
|
+
isSidebarCollapsed: Be,
|
|
14227
|
+
toggleSidebar: Ye,
|
|
14230
14228
|
showFeedbackModal: D,
|
|
14231
14229
|
handleSessionFeedbackSubmit: ye,
|
|
14232
14230
|
handleSessionFeedbackSkip: he,
|
|
14233
14231
|
handleDontShowAgain: me,
|
|
14234
|
-
handleCloseModal:
|
|
14232
|
+
handleCloseModal: Ze
|
|
14235
14233
|
} = Yf({ isOpen: e, agentId: t, config: n });
|
|
14236
14234
|
z(() => {
|
|
14237
14235
|
w.length || O("auto");
|
|
14238
14236
|
}, [w.length, O]);
|
|
14239
|
-
const
|
|
14237
|
+
const $e = fe(
|
|
14240
14238
|
() => (/* @__PURE__ */ new Date()).toLocaleString("en-US", {
|
|
14241
14239
|
weekday: "long",
|
|
14242
14240
|
hour: "2-digit",
|
|
@@ -14244,15 +14242,15 @@ function hp({
|
|
|
14244
14242
|
hour12: !0
|
|
14245
14243
|
}),
|
|
14246
14244
|
[]
|
|
14247
|
-
),
|
|
14245
|
+
), xe = H && o === "full" && ce === "user" ? /* @__PURE__ */ a(
|
|
14248
14246
|
Sf,
|
|
14249
14247
|
{
|
|
14250
14248
|
sessions: Z,
|
|
14251
14249
|
activeSessionId: p,
|
|
14252
14250
|
onSelectSession: (Fe) => v({ sessionId: Fe }),
|
|
14253
14251
|
onNewChat: () => v({ forceNewSession: !0 }),
|
|
14254
|
-
isCollapsed:
|
|
14255
|
-
onToggle:
|
|
14252
|
+
isCollapsed: Be,
|
|
14253
|
+
onToggle: Ye,
|
|
14256
14254
|
isLoading: X
|
|
14257
14255
|
}
|
|
14258
14256
|
) : void 0;
|
|
@@ -14266,7 +14264,7 @@ function hp({
|
|
|
14266
14264
|
config: n.feedback,
|
|
14267
14265
|
onSubmit: ye,
|
|
14268
14266
|
onSkip: he,
|
|
14269
|
-
onClose:
|
|
14267
|
+
onClose: Ze,
|
|
14270
14268
|
onDontShowAgain: me
|
|
14271
14269
|
} : void 0,
|
|
14272
14270
|
showCloseButton: n.showCloseButton,
|
|
@@ -14285,12 +14283,12 @@ function hp({
|
|
|
14285
14283
|
activeElicitation: y,
|
|
14286
14284
|
voiceAgentState: re,
|
|
14287
14285
|
chatComposer: A,
|
|
14288
|
-
onOpenSessionDrawer: H ?
|
|
14286
|
+
onOpenSessionDrawer: H ? Te : void 0,
|
|
14289
14287
|
historyEnabled: H,
|
|
14290
14288
|
sessionDrawer: H ? /* @__PURE__ */ a(
|
|
14291
14289
|
Cf,
|
|
14292
14290
|
{
|
|
14293
|
-
isOpen:
|
|
14291
|
+
isOpen: G,
|
|
14294
14292
|
onClose: _e,
|
|
14295
14293
|
sessions: Z,
|
|
14296
14294
|
activeSessionId: p,
|
|
@@ -14300,7 +14298,7 @@ function hp({
|
|
|
14300
14298
|
onNewChat: () => v({ forceNewSession: !0 })
|
|
14301
14299
|
}
|
|
14302
14300
|
) : void 0,
|
|
14303
|
-
sidebar:
|
|
14301
|
+
sidebar: xe,
|
|
14304
14302
|
fullScreenEmptyState: E ? (Fe) => /* @__PURE__ */ a(
|
|
14305
14303
|
xf,
|
|
14306
14304
|
{
|
|
@@ -14330,7 +14328,7 @@ function hp({
|
|
|
14330
14328
|
state: re,
|
|
14331
14329
|
isMuted: K,
|
|
14332
14330
|
onEndCall: oe,
|
|
14333
|
-
onClose:
|
|
14331
|
+
onClose: M,
|
|
14334
14332
|
onToggleMute: B,
|
|
14335
14333
|
agentName: n.title,
|
|
14336
14334
|
iconUrl: n.iconUrl,
|
|
@@ -14357,7 +14355,7 @@ function hp({
|
|
|
14357
14355
|
children: [
|
|
14358
14356
|
_ ? /* @__PURE__ */ a(Nh, {}) : /* @__PURE__ */ a(pe, { children: [
|
|
14359
14357
|
h && /* @__PURE__ */ a("div", { className: "text-xs text-[var(--color-muted-foreground)] text-center mb-2", children: "Just now" }),
|
|
14360
|
-
!h && /* @__PURE__ */ a("div", { className: "text-xs text-[var(--color-muted-foreground)] text-center", children:
|
|
14358
|
+
!h && /* @__PURE__ */ a("div", { className: "text-xs text-[var(--color-muted-foreground)] text-center", children: $e }),
|
|
14361
14359
|
/* @__PURE__ */ a(Le, { fallback: /* @__PURE__ */ a(Th, {}), children: /* @__PURE__ */ a(
|
|
14362
14360
|
cp,
|
|
14363
14361
|
{
|