@eka-care/medassist-widget 0.1.82 → 0.1.83-0
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-CardList-C0T8GBYh.js → medassist-widget-CardList-CUT-Skj4.js} +17 -17
- package/dist/{medassist-widget-ChatComposer-CRm0Bvmo.js → medassist-widget-ChatComposer-Cscs6lT3.js} +4 -4
- package/dist/medassist-widget-ChatMessages-CqpYk2z4.js +1083 -0
- package/dist/{medassist-widget-ConnectionStatus-BubGbavD.js → medassist-widget-ConnectionStatus-DjBrbZDa.js} +1 -1
- package/dist/{medassist-widget-DispToastHost-D2_0EipW.js → medassist-widget-DispToastHost-GH71JbwS.js} +2 -2
- package/dist/{medassist-widget-DoctorCard-CX9O7oju.js → medassist-widget-DoctorCard-DY6gcZr3.js} +6 -6
- package/dist/{medassist-widget-FilePreview-Dof_VuUv.js → medassist-widget-FilePreview-CFgLxtqr.js} +2 -2
- package/dist/{medassist-widget-FocusCarousel-DOkY3kxw.js → medassist-widget-FocusCarousel-CDY1oNom.js} +2 -2
- package/dist/{medassist-widget-MediaCard-3gFJ8G9l.js → medassist-widget-MediaCard-BpYxPv4q.js} +1 -1
- package/dist/{medassist-widget-MultiSelect-DMYNXiAC.js → medassist-widget-MultiSelect-2yroeYrx.js} +2 -2
- package/dist/{medassist-widget-ProfileHeader-tjRd6R11.js → medassist-widget-ProfileHeader-DR9Lr71Q.js} +4 -4
- package/dist/{medassist-widget-VoiceAgentScreen-BfWNcUZp.js → medassist-widget-VoiceAgentScreen-lGPPYoRJ.js} +3 -3
- package/dist/medassist-widget-avatar-Dce5W2f_.js +256 -0
- package/dist/{medassist-widget-check-CBkqbFAl.js → medassist-widget-check-CiuoYMR2.js} +1 -1
- package/dist/{medassist-widget-chevron-right-DXVez3hJ.js → medassist-widget-chevron-right-BMU6ZIMl.js} +1 -1
- package/dist/{medassist-widget-main-CvBx4wsw.js → medassist-widget-main-BcTqYheJ.js} +22 -20
- package/dist/{medassist-widget-map-pin-QqnPVlgB.js → medassist-widget-map-pin-DMI_eIkL.js} +1 -1
- package/dist/{medassist-widget-message-square-plus-D5bJkQm2.js → medassist-widget-message-square-plus-CBtZ680g.js} +1 -1
- package/dist/{medassist-widget-mic-uIy1yldF.js → medassist-widget-mic-DWQVxBaT.js} +1 -1
- package/dist/{medassist-widget-x-DptkIHzh.js → medassist-widget-x-DpXIaEQs.js} +1 -1
- package/dist/medassist-widget.css +1 -1
- package/dist/medassist-widget.js +1 -1
- package/package.json +3 -3
- package/dist/medassist-widget-ChatMessages-CwUlThlh.js +0 -7424
- package/dist/medassist-widget-_commonjsHelpers-CqEciG1_.js +0 -31
- package/dist/medassist-widget-avatar-CIkxqi_7.js +0 -233
|
@@ -0,0 +1,1083 @@
|
|
|
1
|
+
import { c as ke, m as et, k as tt, u as t, d as Y, T as Se, y as Ke, a as _, P as q, z as Q, b as O, C as nt, B as L, e as X, S as ce, f as de, A as Oe, g as rt } from "./medassist-widget-main-BcTqYheJ.js";
|
|
2
|
+
import { F as lt } from "./medassist-widget-FilePreview-CFgLxtqr.js";
|
|
3
|
+
const at = [
|
|
4
|
+
["path", { d: "M7 10v12", key: "1qc93n" }],
|
|
5
|
+
[
|
|
6
|
+
"path",
|
|
7
|
+
{
|
|
8
|
+
d: "M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",
|
|
9
|
+
key: "emmmcr"
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
], re = ke("thumbs-up", at);
|
|
13
|
+
const it = [
|
|
14
|
+
["path", { d: "M17 14V2", key: "8ymqnk" }],
|
|
15
|
+
[
|
|
16
|
+
"path",
|
|
17
|
+
{
|
|
18
|
+
d: "M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",
|
|
19
|
+
key: "m61m77"
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
], le = ke("thumbs-down", it);
|
|
23
|
+
const ot = [
|
|
24
|
+
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
|
|
25
|
+
["line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65", key: "13gj7c" }],
|
|
26
|
+
["line", { x1: "11", x2: "11", y1: "8", y2: "14", key: "1vmskp" }],
|
|
27
|
+
["line", { x1: "8", x2: "14", y1: "11", y2: "11", key: "durymu" }]
|
|
28
|
+
], st = ke("zoom-in", ot);
|
|
29
|
+
function W() {
|
|
30
|
+
return W = Object.assign ? Object.assign.bind() : function(n) {
|
|
31
|
+
for (var a = 1; a < arguments.length; a++) {
|
|
32
|
+
var i = arguments[a];
|
|
33
|
+
for (var d in i) Object.prototype.hasOwnProperty.call(i, d) && (n[d] = i[d]);
|
|
34
|
+
}
|
|
35
|
+
return n;
|
|
36
|
+
}, W.apply(this, arguments);
|
|
37
|
+
}
|
|
38
|
+
const ct = ["children", "options"], _e = ["allowFullScreen", "allowTransparency", "autoComplete", "autoFocus", "autoPlay", "cellPadding", "cellSpacing", "charSet", "classId", "colSpan", "contentEditable", "contextMenu", "crossOrigin", "encType", "formAction", "formEncType", "formMethod", "formNoValidate", "formTarget", "frameBorder", "hrefLang", "inputMode", "keyParams", "keyType", "marginHeight", "marginWidth", "maxLength", "mediaGroup", "minLength", "noValidate", "radioGroup", "readOnly", "rowSpan", "spellCheck", "srcDoc", "srcLang", "srcSet", "tabIndex", "useMap"].reduce((n, a) => (n[a.toLowerCase()] = a, n), { class: "className", for: "htmlFor" }), Ae = { amp: "&", apos: "'", gt: ">", lt: "<", nbsp: " ", quot: "“" }, dt = ["style", "script", "pre"], ut = ["src", "href", "data", "formAction", "srcDoc", "action"], ft = /([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi, mt = /\n{2,}$/, Te = /^(\s*>[\s\S]*?)(?=\n\n|$)/, pt = /^ *> ?/gm, ht = /^(?:\[!([^\]]*)\]\n)?([\s\S]*)/, gt = /^ {2,}\n/, bt = /^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/, $e = /^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/, Pe = /^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/, yt = /^(`+)((?:\\`|(?!\1)`|[^`])+)\1/, xt = /^(?:\n *)*\n/, wt = /\r\n?/g, vt = /^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/, kt = /^\[\^([^\]]+)]/, Nt = /\f/g, Ct = /^---[ \t]*\n(.|\n)*\n---[ \t]*\n/, Et = /^\s*?\[(x|\s)\]/, Re = /^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, De = /^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Me = /^([^\n]+)\n *(=|-)\2{2,} *\n/, he = /^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i, St = /&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi, Le = /^<!--[\s\S]*?(?:-->)/, Ot = /^(data|aria|x)-[a-z_][a-z\d_.-]*$/, ge = /^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i, _t = /^\{.*\}$/, At = /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, Tt = /^<([^ >]+[:@\/][^ >]+)>/, $t = /-([a-z])?/gi, ze = /^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/, Pt = /^[^\n]+(?: \n|\n{2,})/, Rt = /^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/, Dt = /^!\[([^\]]*)\] ?\[([^\]]*)\]/, Mt = /^\[([^\]]*)\] ?\[([^\]]*)\]/, Lt = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/, zt = /\t/g, It = /(^ *\||\| *$)/g, Ut = /^ *:-+: *$/, jt = /^ *:-+ *$/, Bt = /^ *-+: *$/, ue = (n) => `(?=[\\s\\S]+?\\1${n ? "\\1" : ""})`, fe = "((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)", Kt = RegExp(`^([*_])\\1${ue(1)}${fe}\\1\\1(?!\\1)`), Ft = RegExp(`^([*_])${ue(0)}${fe}\\1(?!\\1)`), Wt = RegExp(`^(==)${ue(0)}${fe}\\1`), Ht = RegExp(`^(~~)${ue(0)}${fe}\\1`), Vt = /^(:[a-zA-Z0-9-_]+:)/, qt = /^\\([^0-9A-Za-z\s])/, Zt = /\\([^0-9A-Za-z\s])/g, Yt = /^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/, Gt = /^\n+/, Qt = /^([ \t]*)/, Jt = /(?:^|\n)( *)$/, Ne = "(?:\\d+\\.)", Ce = "(?:[*+-])";
|
|
39
|
+
function Fe(n) {
|
|
40
|
+
return "( *)(" + (n === 1 ? Ne : Ce) + ") +";
|
|
41
|
+
}
|
|
42
|
+
const We = Fe(1), He = Fe(2);
|
|
43
|
+
function Ve(n) {
|
|
44
|
+
return RegExp("^" + (n === 1 ? We : He));
|
|
45
|
+
}
|
|
46
|
+
const Xt = Ve(1), en = Ve(2);
|
|
47
|
+
function qe(n) {
|
|
48
|
+
return RegExp("^" + (n === 1 ? We : He) + "[^\\n]*(?:\\n(?!\\1" + (n === 1 ? Ne : Ce) + " )[^\\n]*)*(\\n|$)", "gm");
|
|
49
|
+
}
|
|
50
|
+
const tn = qe(1), nn = qe(2);
|
|
51
|
+
function Ze(n) {
|
|
52
|
+
const a = n === 1 ? Ne : Ce;
|
|
53
|
+
return RegExp("^( *)(" + a + ") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1" + a + " (?!" + a + " ))\\n*|\\s*\\n*$)");
|
|
54
|
+
}
|
|
55
|
+
const Ye = Ze(1), Ge = Ze(2);
|
|
56
|
+
function Ie(n, a) {
|
|
57
|
+
const i = a === 1, d = i ? Ye : Ge, f = i ? tn : nn, g = i ? Xt : en;
|
|
58
|
+
return { t: (m) => g.test(m), o: G(function(m, b) {
|
|
59
|
+
const o = Jt.exec(b.prevCapture);
|
|
60
|
+
return o && (b.list || !b.inline && !b.simple) ? d.exec(m = o[1] + m) : null;
|
|
61
|
+
}), i: 1, u(m, b, o) {
|
|
62
|
+
const v = i ? +m[2] : void 0, E = m[0].replace(mt, `
|
|
63
|
+
`).match(f);
|
|
64
|
+
let T = !1;
|
|
65
|
+
return { items: E.map(function(S, h) {
|
|
66
|
+
const $ = g.exec(S)[0].length, k = RegExp("^ {1," + $ + "}", "gm"), N = S.replace(k, "").replace(g, ""), e = h === E.length - 1, l = N.indexOf(`
|
|
67
|
+
|
|
68
|
+
`) !== -1 || e && T;
|
|
69
|
+
T = l;
|
|
70
|
+
const r = o.inline, c = o.list;
|
|
71
|
+
let s;
|
|
72
|
+
o.list = !0, l ? (o.inline = !1, s = ee(N) + `
|
|
73
|
+
|
|
74
|
+
`) : (o.inline = !0, s = ee(N));
|
|
75
|
+
const u = b(s, o);
|
|
76
|
+
return o.inline = r, o.list = c, u;
|
|
77
|
+
}), ordered: i, start: v };
|
|
78
|
+
}, l: (m, b, o) => n(m.ordered ? "ol" : "ul", { key: o.key, start: m.type === "20" ? m.start : void 0 }, m.items.map(function(v, E) {
|
|
79
|
+
return n("li", { key: E }, b(v, o));
|
|
80
|
+
})) };
|
|
81
|
+
}
|
|
82
|
+
const rn = RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`), ln = /^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;
|
|
83
|
+
function Ue(n) {
|
|
84
|
+
return typeof n == "string";
|
|
85
|
+
}
|
|
86
|
+
function ee(n) {
|
|
87
|
+
let a = n.length;
|
|
88
|
+
for (; a > 0 && n[a - 1] <= " "; ) a--;
|
|
89
|
+
return n.slice(0, a);
|
|
90
|
+
}
|
|
91
|
+
function oe(n, a) {
|
|
92
|
+
return n.startsWith(a);
|
|
93
|
+
}
|
|
94
|
+
function an(n, a, i) {
|
|
95
|
+
if (Array.isArray(i)) {
|
|
96
|
+
for (let d = 0; d < i.length; d++) if (oe(n, i[d])) return !0;
|
|
97
|
+
return !1;
|
|
98
|
+
}
|
|
99
|
+
return i(n, a);
|
|
100
|
+
}
|
|
101
|
+
function J(n) {
|
|
102
|
+
return n.replace(/[ÀÁÂÃÄÅàáâãä忯]/g, "a").replace(/[çÇ]/g, "c").replace(/[ðÐ]/g, "d").replace(/[ÈÉÊËéèêë]/g, "e").replace(/[ÏïÎîÍíÌì]/g, "i").replace(/[Ññ]/g, "n").replace(/[øØœŒÕõÔôÓóÒò]/g, "o").replace(/[ÜüÛûÚúÙù]/g, "u").replace(/[ŸÿÝý]/g, "y").replace(/[^a-z0-9- ]/gi, "").replace(/ /gi, "-").toLowerCase();
|
|
103
|
+
}
|
|
104
|
+
function on(n) {
|
|
105
|
+
return Bt.test(n) ? "right" : Ut.test(n) ? "center" : jt.test(n) ? "left" : null;
|
|
106
|
+
}
|
|
107
|
+
function je(n, a, i, d) {
|
|
108
|
+
const f = i.inTable;
|
|
109
|
+
i.inTable = !0;
|
|
110
|
+
let g = [[]], m = "";
|
|
111
|
+
function b() {
|
|
112
|
+
if (!m) return;
|
|
113
|
+
const o = g[g.length - 1];
|
|
114
|
+
o.push.apply(o, a(m, i)), m = "";
|
|
115
|
+
}
|
|
116
|
+
return n.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((o, v, E) => {
|
|
117
|
+
o.trim() === "|" && (b(), d) ? v !== 0 && v !== E.length - 1 && g.push([]) : m += o;
|
|
118
|
+
}), b(), i.inTable = f, g;
|
|
119
|
+
}
|
|
120
|
+
function sn(n, a, i) {
|
|
121
|
+
i.inline = !0;
|
|
122
|
+
const d = n[2] ? n[2].replace(It, "").split("|").map(on) : [], f = n[3] ? (function(m, b, o) {
|
|
123
|
+
return m.trim().split(`
|
|
124
|
+
`).map(function(v) {
|
|
125
|
+
return je(v, b, o, !0);
|
|
126
|
+
});
|
|
127
|
+
})(n[3], a, i) : [], g = je(n[1], a, i, !!f.length);
|
|
128
|
+
return i.inline = !1, f.length ? { align: d, cells: f, header: g, type: "25" } : { children: g, type: "21" };
|
|
129
|
+
}
|
|
130
|
+
function Be(n, a) {
|
|
131
|
+
return n.align[a] == null ? {} : { textAlign: n.align[a] };
|
|
132
|
+
}
|
|
133
|
+
function G(n) {
|
|
134
|
+
return n.inline = 1, n;
|
|
135
|
+
}
|
|
136
|
+
function F(n) {
|
|
137
|
+
return G(function(a, i) {
|
|
138
|
+
return i.inline ? n.exec(a) : null;
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
function I(n) {
|
|
142
|
+
return G(function(a, i) {
|
|
143
|
+
return i.inline || i.simple ? n.exec(a) : null;
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
function z(n) {
|
|
147
|
+
return function(a, i) {
|
|
148
|
+
return i.inline || i.simple ? null : n.exec(a);
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
function ae(n) {
|
|
152
|
+
return G(function(a) {
|
|
153
|
+
return n.exec(a);
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
const cn = /(javascript|vbscript|data(?!:image)):/i;
|
|
157
|
+
function dn(n) {
|
|
158
|
+
try {
|
|
159
|
+
const a = decodeURIComponent(n).replace(/[^A-Za-z0-9/:]/g, "");
|
|
160
|
+
if (cn.test(a)) return null;
|
|
161
|
+
} catch {
|
|
162
|
+
return null;
|
|
163
|
+
}
|
|
164
|
+
return n;
|
|
165
|
+
}
|
|
166
|
+
function M(n) {
|
|
167
|
+
return n && n.replace(Zt, "$1");
|
|
168
|
+
}
|
|
169
|
+
function se(n, a, i) {
|
|
170
|
+
const d = i.inline || !1, f = i.simple || !1;
|
|
171
|
+
i.inline = !0, i.simple = !0;
|
|
172
|
+
const g = n(a, i);
|
|
173
|
+
return i.inline = d, i.simple = f, g;
|
|
174
|
+
}
|
|
175
|
+
function un(n, a, i) {
|
|
176
|
+
const d = i.inline || !1, f = i.simple || !1;
|
|
177
|
+
i.inline = !1, i.simple = !0;
|
|
178
|
+
const g = n(a, i);
|
|
179
|
+
return i.inline = d, i.simple = f, g;
|
|
180
|
+
}
|
|
181
|
+
function fn(n, a, i) {
|
|
182
|
+
const d = i.inline || !1;
|
|
183
|
+
i.inline = !1;
|
|
184
|
+
const f = n(a, i);
|
|
185
|
+
return i.inline = d, f;
|
|
186
|
+
}
|
|
187
|
+
const be = (n, a, i) => ({ children: se(a, n[2], i) });
|
|
188
|
+
function ye() {
|
|
189
|
+
return {};
|
|
190
|
+
}
|
|
191
|
+
function xe() {
|
|
192
|
+
return null;
|
|
193
|
+
}
|
|
194
|
+
function mn(...n) {
|
|
195
|
+
return n.filter(Boolean).join(" ");
|
|
196
|
+
}
|
|
197
|
+
function we(n, a, i) {
|
|
198
|
+
let d = n;
|
|
199
|
+
const f = a.split(".");
|
|
200
|
+
for (; f.length && (d = d[f[0]], d !== void 0); ) f.shift();
|
|
201
|
+
return d || i;
|
|
202
|
+
}
|
|
203
|
+
function pn(n = "", a = {}) {
|
|
204
|
+
a.overrides = a.overrides || {}, a.namedCodesToUnicode = a.namedCodesToUnicode ? W({}, Ae, a.namedCodesToUnicode) : Ae;
|
|
205
|
+
const i = a.slugify || J, d = a.sanitizer || dn, f = a.createElement || tt, g = [Te, $e, Pe, a.enforceAtxHeadings ? De : Re, Me, ze, Ye, Ge], m = [...g, Pt, he, Le, ge];
|
|
206
|
+
function b(e, l) {
|
|
207
|
+
for (let r = 0; r < e.length; r++) if (e[r].test(l)) return !0;
|
|
208
|
+
return !1;
|
|
209
|
+
}
|
|
210
|
+
function o(e, l, ...r) {
|
|
211
|
+
const c = we(a.overrides, e + ".props", {});
|
|
212
|
+
return f((function(s, u) {
|
|
213
|
+
const y = we(u, s);
|
|
214
|
+
return y ? typeof y == "function" || typeof y == "object" && "render" in y ? y : we(u, s + ".component", s) : s;
|
|
215
|
+
})(e, a.overrides), W({}, l, c, { className: mn(l?.className, c.className) || void 0 }), ...r);
|
|
216
|
+
}
|
|
217
|
+
function v(e) {
|
|
218
|
+
e = e.replace(Ct, "");
|
|
219
|
+
let l = !1;
|
|
220
|
+
a.forceInline ? l = !0 : a.forceBlock || (l = Lt.test(e) === !1);
|
|
221
|
+
const r = k($(l ? e : ee(e).replace(Gt, "") + `
|
|
222
|
+
|
|
223
|
+
`, { inline: l }));
|
|
224
|
+
for (; Ue(r[r.length - 1]) && !r[r.length - 1].trim(); ) r.pop();
|
|
225
|
+
if (a.wrapper === null) return r;
|
|
226
|
+
const c = a.wrapper || (l ? "span" : "div");
|
|
227
|
+
let s;
|
|
228
|
+
if (r.length > 1 || a.forceWrapper) s = r;
|
|
229
|
+
else {
|
|
230
|
+
if (r.length === 1) return s = r[0], typeof s == "string" ? o("span", { key: "outer" }, s) : s;
|
|
231
|
+
s = null;
|
|
232
|
+
}
|
|
233
|
+
return f(c, { key: "outer" }, s);
|
|
234
|
+
}
|
|
235
|
+
function E(e, l) {
|
|
236
|
+
if (!l || !l.trim()) return null;
|
|
237
|
+
const r = l.match(ft);
|
|
238
|
+
return r ? r.reduce(function(c, s) {
|
|
239
|
+
const u = s.indexOf("=");
|
|
240
|
+
if (u !== -1) {
|
|
241
|
+
const y = (function(x) {
|
|
242
|
+
return x.indexOf("-") !== -1 && x.match(Ot) === null && (x = x.replace($t, function(R, P) {
|
|
243
|
+
return P.toUpperCase();
|
|
244
|
+
})), x;
|
|
245
|
+
})(s.slice(0, u)).trim(), C = (function(x) {
|
|
246
|
+
const R = x[0];
|
|
247
|
+
return (R === '"' || R === "'") && x.length >= 2 && x[x.length - 1] === R ? x.slice(1, -1) : x;
|
|
248
|
+
})(s.slice(u + 1).trim()), p = _e[y] || y;
|
|
249
|
+
if (p === "ref") return c;
|
|
250
|
+
const w = c[p] = (function(x, R, P, Ee) {
|
|
251
|
+
return R === "style" ? (function(H) {
|
|
252
|
+
const U = [];
|
|
253
|
+
let j = "", B = !1, te = !1, me = "";
|
|
254
|
+
if (!H) return U;
|
|
255
|
+
for (let K = 0; K < H.length; K++) {
|
|
256
|
+
const D = H[K];
|
|
257
|
+
if (D !== '"' && D !== "'" || B || (te ? D === me && (te = !1, me = "") : (te = !0, me = D)), D === "(" && j.endsWith("url") ? B = !0 : D === ")" && B && (B = !1), D !== ";" || te || B) j += D;
|
|
258
|
+
else {
|
|
259
|
+
const V = j.trim();
|
|
260
|
+
if (V) {
|
|
261
|
+
const pe = V.indexOf(":");
|
|
262
|
+
if (pe > 0) {
|
|
263
|
+
const Je = V.slice(0, pe).trim(), Xe = V.slice(pe + 1).trim();
|
|
264
|
+
U.push([Je, Xe]);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
j = "";
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
const ne = j.trim();
|
|
271
|
+
if (ne) {
|
|
272
|
+
const K = ne.indexOf(":");
|
|
273
|
+
if (K > 0) {
|
|
274
|
+
const D = ne.slice(0, K).trim(), V = ne.slice(K + 1).trim();
|
|
275
|
+
U.push([D, V]);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
return U;
|
|
279
|
+
})(P).reduce(function(H, [U, j]) {
|
|
280
|
+
return H[U.replace(/(-[a-z])/g, (B) => B[1].toUpperCase())] = Ee(j, x, U), H;
|
|
281
|
+
}, {}) : ut.indexOf(R) !== -1 ? Ee(M(P), x, R) : (P.match(_t) && (P = M(P.slice(1, P.length - 1))), P === "true" || P !== "false" && P);
|
|
282
|
+
})(e, y, C, d);
|
|
283
|
+
typeof w == "string" && (he.test(w) || ge.test(w)) && (c[p] = v(w.trim()));
|
|
284
|
+
} else s !== "style" && (c[_e[s] || s] = !0);
|
|
285
|
+
return c;
|
|
286
|
+
}, {}) : null;
|
|
287
|
+
}
|
|
288
|
+
const T = [], S = {}, h = { 0: { t: [">"], o: z(Te), i: 1, u(e, l, r) {
|
|
289
|
+
const [, c, s] = e[0].replace(pt, "").match(ht);
|
|
290
|
+
return { alert: c, children: l(s, r) };
|
|
291
|
+
}, l(e, l, r) {
|
|
292
|
+
const c = { key: r.key };
|
|
293
|
+
return e.alert && (c.className = "markdown-alert-" + i(e.alert.toLowerCase(), J), e.children.unshift({ attrs: {}, children: [{ type: "27", text: e.alert }], noInnerParse: !0, type: "11", tag: "header" })), o("blockquote", c, l(e.children, r));
|
|
294
|
+
} }, 1: { t: [" "], o: ae(gt), i: 1, u: ye, l: (e, l, r) => o("br", { key: r.key }) }, 2: { t: ["--", "__", "**", "- ", "* ", "_ "], o: z(bt), i: 1, u: ye, l: (e, l, r) => o("hr", { key: r.key }) }, 3: { t: [" "], o: z(Pe), i: 0, u: (e) => ({ lang: void 0, text: M(ee(e[0].replace(/^ {4}/gm, ""))) }), l: (e, l, r) => o("pre", { key: r.key }, o("code", W({}, e.attrs, { className: e.lang ? "lang-" + e.lang : "" }), e.text)) }, 4: { t: ["```", "~~~"], o: z($e), i: 0, u: (e) => ({ attrs: E("code", e[3] || ""), lang: e[2] || void 0, text: e[4], type: "3" }) }, 5: { t: ["`"], o: I(yt), i: 3, u: (e) => ({ text: M(e[2]) }), l: (e, l, r) => o("code", { key: r.key }, e.text) }, 6: { t: ["[^"], o: z(vt), i: 0, u: (e) => (T.push({ footnote: e[2], identifier: e[1] }), {}), l: xe }, 7: { t: ["[^"], o: F(kt), i: 1, u: (e) => ({ target: "#" + i(e[1], J), text: e[1] }), l: (e, l, r) => o("a", { key: r.key, href: d(e.target, "a", "href") }, o("sup", { key: r.key }, e.text)) }, 8: { t: ["[ ]", "[x]"], o: F(Et), i: 1, u: (e) => ({ completed: e[1].toLowerCase() === "x" }), l: (e, l, r) => o("input", { checked: e.completed, key: r.key, readOnly: !0, type: "checkbox" }) }, 9: { t: ["#"], o: z(a.enforceAtxHeadings ? De : Re), i: 1, u: (e, l, r) => ({ children: se(l, e[2], r), id: i(e[2], J), level: e[1].length }), l: (e, l, r) => o("h" + e.level, { id: e.id, key: r.key }, l(e.children, r)) }, 10: { t: (e) => {
|
|
295
|
+
const l = e.indexOf(`
|
|
296
|
+
`);
|
|
297
|
+
return l > 0 && l < e.length - 1 && (e[l + 1] === "=" || e[l + 1] === "-");
|
|
298
|
+
}, o: z(Me), i: 1, u: (e, l, r) => ({ children: se(l, e[1], r), level: e[2] === "=" ? 1 : 2, type: "9" }) }, 11: { t: ["<"], o: ae(he), i: 1, u(e, l, r) {
|
|
299
|
+
const [, c] = e[3].match(Qt), s = RegExp("^" + c, "gm"), u = e[3].replace(s, ""), y = b(m, u) ? fn : se, C = e[1].toLowerCase(), p = dt.indexOf(C) !== -1, w = (p ? C : e[1]).trim(), x = { attrs: E(w, e[2]), noInnerParse: p, tag: w };
|
|
300
|
+
if (r.inAnchor = r.inAnchor || C === "a", p) x.text = e[3];
|
|
301
|
+
else {
|
|
302
|
+
const R = r.inHTML;
|
|
303
|
+
r.inHTML = !0, x.children = y(l, u, r), r.inHTML = R;
|
|
304
|
+
}
|
|
305
|
+
return r.inAnchor = !1, x;
|
|
306
|
+
}, l: (e, l, r) => o(e.tag, W({ key: r.key }, e.attrs), e.text || (e.children ? l(e.children, r) : "")) }, 13: { t: ["<"], o: ae(ge), i: 1, u(e) {
|
|
307
|
+
const l = e[1].trim();
|
|
308
|
+
return { attrs: E(l, e[2] || ""), tag: l };
|
|
309
|
+
}, l: (e, l, r) => o(e.tag, W({}, e.attrs, { key: r.key })) }, 12: { t: ["<!--"], o: ae(Le), i: 1, u: () => ({}), l: xe }, 14: { t: ["!["], o: I(ln), i: 1, u: (e) => ({ alt: M(e[1]), target: M(e[2]), title: M(e[3]) }), l: (e, l, r) => o("img", { key: r.key, alt: e.alt || void 0, title: e.title || void 0, src: d(e.target, "img", "src") }) }, 15: { t: ["["], o: F(rn), i: 3, u: (e, l, r) => ({ children: un(l, e[1], r), target: M(e[2]), title: M(e[3]) }), l: (e, l, r) => o("a", { key: r.key, href: d(e.target, "a", "href"), title: e.title }, l(e.children, r)) }, 16: { t: ["<"], o: F(Tt), i: 0, u(e) {
|
|
310
|
+
let l = e[1], r = !1;
|
|
311
|
+
return l.indexOf("@") !== -1 && l.indexOf("//") === -1 && (r = !0, l = l.replace("mailto:", "")), { children: [{ text: l, type: "27" }], target: r ? "mailto:" + l : l, type: "15" };
|
|
312
|
+
} }, 17: { t: (e, l) => !l.inAnchor && !a.disableAutoLink && (oe(e, "http://") || oe(e, "https://")), o: F(At), i: 0, u: (e) => ({ children: [{ text: e[1], type: "27" }], target: e[1], title: void 0, type: "15" }) }, 20: Ie(o, 1), 33: Ie(o, 2), 19: { t: [`
|
|
313
|
+
`], o: z(xt), i: 3, u: ye, l: () => `
|
|
314
|
+
` }, 21: { o: G(function(e, l) {
|
|
315
|
+
if (l.inline || l.simple || l.inHTML && e.indexOf(`
|
|
316
|
+
|
|
317
|
+
`) === -1 && l.prevCapture.indexOf(`
|
|
318
|
+
|
|
319
|
+
`) === -1) return null;
|
|
320
|
+
let r = "", c = 0;
|
|
321
|
+
for (; ; ) {
|
|
322
|
+
const u = e.indexOf(`
|
|
323
|
+
`, c), y = e.slice(c, u === -1 ? void 0 : u + 1);
|
|
324
|
+
if (b(g, y) || (r += y, u === -1 || !y.trim())) break;
|
|
325
|
+
c = u + 1;
|
|
326
|
+
}
|
|
327
|
+
const s = ee(r);
|
|
328
|
+
return s === "" ? null : [r, , s];
|
|
329
|
+
}), i: 3, u: be, l: (e, l, r) => o("p", { key: r.key }, l(e.children, r)) }, 22: { t: ["["], o: F(Rt), i: 0, u: (e) => (S[e[1]] = { target: e[2], title: e[4] }, {}), l: xe }, 23: { t: ["!["], o: I(Dt), i: 0, u: (e) => ({ alt: e[1] ? M(e[1]) : void 0, ref: e[2] }), l: (e, l, r) => S[e.ref] ? o("img", { key: r.key, alt: e.alt, src: d(S[e.ref].target, "img", "src"), title: S[e.ref].title }) : null }, 24: { t: (e) => e[0] === "[" && e.indexOf("](") === -1, o: F(Mt), i: 0, u: (e, l, r) => ({ children: l(e[1], r), fallbackChildren: e[0], ref: e[2] }), l: (e, l, r) => S[e.ref] ? o("a", { key: r.key, href: d(S[e.ref].target, "a", "href"), title: S[e.ref].title }, l(e.children, r)) : o("span", { key: r.key }, e.fallbackChildren) }, 25: { t: ["|"], o: z(ze), i: 1, u: sn, l(e, l, r) {
|
|
330
|
+
const c = e;
|
|
331
|
+
return o("table", { key: r.key }, o("thead", null, o("tr", null, c.header.map(function(s, u) {
|
|
332
|
+
return o("th", { key: u, style: Be(c, u) }, l(s, r));
|
|
333
|
+
}))), o("tbody", null, c.cells.map(function(s, u) {
|
|
334
|
+
return o("tr", { key: u }, s.map(function(y, C) {
|
|
335
|
+
return o("td", { key: C, style: Be(c, C) }, l(y, r));
|
|
336
|
+
}));
|
|
337
|
+
})));
|
|
338
|
+
} }, 27: { o: G(function(e, l) {
|
|
339
|
+
let r;
|
|
340
|
+
return oe(e, ":") && (r = Vt.exec(e)), r || Yt.exec(e);
|
|
341
|
+
}), i: 4, u(e) {
|
|
342
|
+
const l = e[0];
|
|
343
|
+
return { text: l.indexOf("&") === -1 ? l : l.replace(St, (r, c) => a.namedCodesToUnicode[c] || r) };
|
|
344
|
+
}, l: (e) => e.text }, 28: { t: ["**", "__"], o: I(Kt), i: 2, u: (e, l, r) => ({ children: l(e[2], r) }), l: (e, l, r) => o("strong", { key: r.key }, l(e.children, r)) }, 29: { t: (e) => {
|
|
345
|
+
const l = e[0];
|
|
346
|
+
return (l === "*" || l === "_") && e[1] !== l;
|
|
347
|
+
}, o: I(Ft), i: 3, u: (e, l, r) => ({ children: l(e[2], r) }), l: (e, l, r) => o("em", { key: r.key }, l(e.children, r)) }, 30: { t: ["\\"], o: I(qt), i: 1, u: (e) => ({ text: e[1], type: "27" }) }, 31: { t: ["=="], o: I(Wt), i: 3, u: be, l: (e, l, r) => o("mark", { key: r.key }, l(e.children, r)) }, 32: { t: ["~~"], o: I(Ht), i: 3, u: be, l: (e, l, r) => o("del", { key: r.key }, l(e.children, r)) } };
|
|
348
|
+
a.disableParsingRawHTML === !0 && (delete h[11], delete h[13]);
|
|
349
|
+
const $ = (function(e) {
|
|
350
|
+
var l = Object.keys(e);
|
|
351
|
+
function r(c, s) {
|
|
352
|
+
var u = [];
|
|
353
|
+
if (s.prevCapture = s.prevCapture || "", c.trim()) for (; c; ) for (var y = 0; y < l.length; ) {
|
|
354
|
+
var C = l[y], p = e[C];
|
|
355
|
+
if (!p.t || an(c, s, p.t)) {
|
|
356
|
+
var w = p.o(c, s);
|
|
357
|
+
if (w && w[0]) {
|
|
358
|
+
c = c.substring(w[0].length);
|
|
359
|
+
var x = p.u(w, r, s);
|
|
360
|
+
s.prevCapture += w[0], x.type || (x.type = C), u.push(x);
|
|
361
|
+
break;
|
|
362
|
+
}
|
|
363
|
+
y++;
|
|
364
|
+
} else y++;
|
|
365
|
+
}
|
|
366
|
+
return s.prevCapture = "", u;
|
|
367
|
+
}
|
|
368
|
+
return l.sort(function(c, s) {
|
|
369
|
+
return e[c].i - e[s].i || (c < s ? -1 : 1);
|
|
370
|
+
}), function(c, s) {
|
|
371
|
+
return r((function(u) {
|
|
372
|
+
return u.replace(wt, `
|
|
373
|
+
`).replace(Nt, "").replace(zt, " ");
|
|
374
|
+
})(c), s);
|
|
375
|
+
};
|
|
376
|
+
})(h), k = /* @__PURE__ */ (function(e, l) {
|
|
377
|
+
return function r(c, s = {}) {
|
|
378
|
+
if (Array.isArray(c)) {
|
|
379
|
+
const u = s.key, y = [];
|
|
380
|
+
let C = !1;
|
|
381
|
+
for (let p = 0; p < c.length; p++) {
|
|
382
|
+
s.key = p;
|
|
383
|
+
const w = r(c[p], s), x = Ue(w);
|
|
384
|
+
x && C ? y[y.length - 1] += w : w !== null && y.push(w), C = x;
|
|
385
|
+
}
|
|
386
|
+
return s.key = u, y;
|
|
387
|
+
}
|
|
388
|
+
return (function(u, y, C) {
|
|
389
|
+
const p = e[u.type].l;
|
|
390
|
+
return l ? l(() => p(u, y, C), u, y, C) : p(u, y, C);
|
|
391
|
+
})(c, r, s);
|
|
392
|
+
};
|
|
393
|
+
})(h, a.renderRule), N = v(n);
|
|
394
|
+
return T.length ? o("div", null, N, o("footer", { key: "footer" }, T.map(function(e) {
|
|
395
|
+
return o("div", { id: i(e.identifier, J), key: e.identifier }, e.identifier, k($(e.footnote, { inline: !0 })));
|
|
396
|
+
}))) : N;
|
|
397
|
+
}
|
|
398
|
+
const hn = (n) => {
|
|
399
|
+
let { children: a, options: i } = n, d = (function(f, g) {
|
|
400
|
+
if (f == null) return {};
|
|
401
|
+
var m, b, o = {}, v = Object.keys(f);
|
|
402
|
+
for (b = 0; b < v.length; b++) g.indexOf(m = v[b]) >= 0 || (o[m] = f[m]);
|
|
403
|
+
return o;
|
|
404
|
+
})(n, ct);
|
|
405
|
+
return et(pn(a ?? "", i), d);
|
|
406
|
+
}, gn = {
|
|
407
|
+
disableParsingRawHTML: !0,
|
|
408
|
+
forceBlock: !0
|
|
409
|
+
};
|
|
410
|
+
function ve({ children: n }) {
|
|
411
|
+
return /* @__PURE__ */ t(hn, { options: gn, children: n });
|
|
412
|
+
}
|
|
413
|
+
const bn = Q(
|
|
414
|
+
() => Promise.resolve().then(() => En).then((n) => ({ default: n.Pills }))
|
|
415
|
+
), yn = Q(
|
|
416
|
+
() => import("./medassist-widget-MultiSelect-2yroeYrx.js").then((n) => ({ default: n.MultiSelectGroup }))
|
|
417
|
+
), xn = Q(
|
|
418
|
+
() => import("./medassist-widget-FocusCarousel-CDY1oNom.js").then((n) => ({ default: n.FocusCarousel }))
|
|
419
|
+
), wn = Q(
|
|
420
|
+
() => import("./medassist-widget-DoctorCard-DY6gcZr3.js").then((n) => ({ default: n.DoctorCard }))
|
|
421
|
+
), vn = Q(
|
|
422
|
+
() => import("./medassist-widget-CardList-CUT-Skj4.js").then((n) => ({ default: n.CardList }))
|
|
423
|
+
), kn = Q(
|
|
424
|
+
() => import("./medassist-widget-MediaCard-BpYxPv4q.js").then((n) => ({ default: n.MediaCard }))
|
|
425
|
+
);
|
|
426
|
+
function A({ className: n }) {
|
|
427
|
+
return /* @__PURE__ */ t(
|
|
428
|
+
"div",
|
|
429
|
+
{
|
|
430
|
+
className: O(
|
|
431
|
+
"relative overflow-hidden bg-surface-secondary",
|
|
432
|
+
"before:absolute before:inset-0",
|
|
433
|
+
"before:-translate-x-full before:animate-[shimmer_1.4s_infinite]",
|
|
434
|
+
"before:bg-gradient-to-r before:from-transparent before:via-white/40 before:to-transparent",
|
|
435
|
+
n
|
|
436
|
+
)
|
|
437
|
+
}
|
|
438
|
+
);
|
|
439
|
+
}
|
|
440
|
+
function Z({ variant: n }) {
|
|
441
|
+
return n === "pill" ? /* @__PURE__ */ t("div", { className: "flex flex-wrap gap-2 mt-3", "aria-busy": !0, "aria-label": "Loading options", children: [
|
|
442
|
+
/* @__PURE__ */ t(ie, {}),
|
|
443
|
+
/* @__PURE__ */ t(A, { className: "h-8 w-20 rounded-full" }),
|
|
444
|
+
/* @__PURE__ */ t(A, { className: "h-8 w-24 rounded-full" }),
|
|
445
|
+
/* @__PURE__ */ t(A, { className: "h-8 w-16 rounded-full" })
|
|
446
|
+
] }) : n === "media" ? /* @__PURE__ */ t(
|
|
447
|
+
"div",
|
|
448
|
+
{
|
|
449
|
+
className: "mt-3 w-56 rounded-xl border border-border-subtle bg-surface p-3",
|
|
450
|
+
"aria-busy": !0,
|
|
451
|
+
"aria-label": "Loading media",
|
|
452
|
+
children: [
|
|
453
|
+
/* @__PURE__ */ t(ie, {}),
|
|
454
|
+
/* @__PURE__ */ t(A, { className: "h-24 w-full rounded-lg" }),
|
|
455
|
+
/* @__PURE__ */ t("div", { className: "mt-3 space-y-2", children: [
|
|
456
|
+
/* @__PURE__ */ t(A, { className: "h-3 w-3/4 rounded" }),
|
|
457
|
+
/* @__PURE__ */ t(A, { className: "h-3 w-1/2 rounded" })
|
|
458
|
+
] })
|
|
459
|
+
]
|
|
460
|
+
}
|
|
461
|
+
) : n === "input" ? /* @__PURE__ */ t(
|
|
462
|
+
"div",
|
|
463
|
+
{
|
|
464
|
+
className: "mt-3 w-full rounded-xl border border-primary/30 bg-elicitationBg p-4",
|
|
465
|
+
"aria-busy": !0,
|
|
466
|
+
"aria-label": "Loading input",
|
|
467
|
+
children: [
|
|
468
|
+
/* @__PURE__ */ t(ie, {}),
|
|
469
|
+
/* @__PURE__ */ t(A, { className: "h-3 w-32 rounded mb-3" }),
|
|
470
|
+
/* @__PURE__ */ t("div", { className: "space-y-2", children: [
|
|
471
|
+
/* @__PURE__ */ t(A, { className: "h-9 w-full rounded-lg" }),
|
|
472
|
+
/* @__PURE__ */ t(A, { className: "h-9 w-full rounded-lg" }),
|
|
473
|
+
/* @__PURE__ */ t(A, { className: "h-9 w-full rounded-lg" })
|
|
474
|
+
] }),
|
|
475
|
+
/* @__PURE__ */ t(A, { className: "mt-4 h-9 w-full rounded-lg" })
|
|
476
|
+
]
|
|
477
|
+
}
|
|
478
|
+
) : /* @__PURE__ */ t(
|
|
479
|
+
"div",
|
|
480
|
+
{
|
|
481
|
+
className: "mt-3 w-72 rounded-xl border border-border-subtle bg-surface p-4",
|
|
482
|
+
"aria-busy": !0,
|
|
483
|
+
"aria-label": "Loading card",
|
|
484
|
+
children: [
|
|
485
|
+
/* @__PURE__ */ t(ie, {}),
|
|
486
|
+
/* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
|
|
487
|
+
/* @__PURE__ */ t(A, { className: "h-10 w-10 rounded-full" }),
|
|
488
|
+
/* @__PURE__ */ t("div", { className: "flex-1 space-y-2", children: [
|
|
489
|
+
/* @__PURE__ */ t(A, { className: "h-3 w-3/4 rounded" }),
|
|
490
|
+
/* @__PURE__ */ t(A, { className: "h-3 w-1/2 rounded" })
|
|
491
|
+
] })
|
|
492
|
+
] }),
|
|
493
|
+
/* @__PURE__ */ t("div", { className: "mt-4 space-y-2", children: [
|
|
494
|
+
/* @__PURE__ */ t(A, { className: "h-3 w-full rounded" }),
|
|
495
|
+
/* @__PURE__ */ t(A, { className: "h-3 w-5/6 rounded" })
|
|
496
|
+
] }),
|
|
497
|
+
/* @__PURE__ */ t(A, { className: "mt-4 h-9 w-28 rounded-lg" })
|
|
498
|
+
]
|
|
499
|
+
}
|
|
500
|
+
);
|
|
501
|
+
}
|
|
502
|
+
function ie() {
|
|
503
|
+
return /* @__PURE__ */ t("style", { children: "@keyframes shimmer { 100% { transform: translateX(100%); } }" });
|
|
504
|
+
}
|
|
505
|
+
function Nn({
|
|
506
|
+
messageId: n,
|
|
507
|
+
tool_key: a,
|
|
508
|
+
entry: i,
|
|
509
|
+
onSendMessage: d,
|
|
510
|
+
disabled: f
|
|
511
|
+
}) {
|
|
512
|
+
const [g, m] = Y([]), [b, o] = Y({}), [v, E] = Y(!1), [T, S] = Y(5), h = i.component, $ = i.disabled, k = Se(() => i.ui_input, [i.ui_input]);
|
|
513
|
+
Ke(() => {
|
|
514
|
+
h === _.SYNAPSE_COMPONENTS.DOCTOR_CARD && k?.doctor_details && o(k.doctor_details);
|
|
515
|
+
}, [h, k?.doctor_details]);
|
|
516
|
+
const N = async (p) => {
|
|
517
|
+
E(!0), await d({
|
|
518
|
+
message: p.value,
|
|
519
|
+
messageId: n,
|
|
520
|
+
toolCalled: !0,
|
|
521
|
+
selectedComponent: p,
|
|
522
|
+
tool_key: a
|
|
523
|
+
});
|
|
524
|
+
}, e = async (p, w, x) => {
|
|
525
|
+
await d({
|
|
526
|
+
toolCalled: !0,
|
|
527
|
+
selectedComponent: p,
|
|
528
|
+
selected_id: p.doctor_id,
|
|
529
|
+
message: w,
|
|
530
|
+
tool_key: a,
|
|
531
|
+
messageId: n,
|
|
532
|
+
...x && { tool_result: x }
|
|
533
|
+
});
|
|
534
|
+
}, l = async () => {
|
|
535
|
+
await d({
|
|
536
|
+
message: "show more"
|
|
537
|
+
});
|
|
538
|
+
}, r = async () => {
|
|
539
|
+
g.length !== 0 && await d({
|
|
540
|
+
message: g.join(", "),
|
|
541
|
+
messageId: n,
|
|
542
|
+
toolCalled: !0,
|
|
543
|
+
tool_key: a
|
|
544
|
+
});
|
|
545
|
+
}, c = () => {
|
|
546
|
+
const p = h === _.SYNAPSE_COMPONENTS.MULTI && k?.options;
|
|
547
|
+
return p ? Array.isArray(p) ? p.map((w, x) => ({
|
|
548
|
+
id: `option-${x}`,
|
|
549
|
+
label: w.label,
|
|
550
|
+
value: w.value
|
|
551
|
+
})) : Object.keys(p).map((w, x) => ({
|
|
552
|
+
id: `option-${x}`,
|
|
553
|
+
label: w,
|
|
554
|
+
value: w
|
|
555
|
+
})) : [];
|
|
556
|
+
}, s = Se(() => {
|
|
557
|
+
if (h === _.SYNAPSE_COMPONENTS.DOCTOR_CARD)
|
|
558
|
+
return k?.doctors?.filter((w) => !!w && !!w.doctor_id);
|
|
559
|
+
}, [h, k?.doctors]);
|
|
560
|
+
if (!h) return null;
|
|
561
|
+
const u = h === _.SYNAPSE_COMPONENTS.PILL ? k?.options : void 0, y = h === _.SYNAPSE_COMPONENTS.CARD ? k?.cards : void 0, C = h === _.SYNAPSE_COMPONENTS.MEDIA_CARD ? k?.media_card : void 0;
|
|
562
|
+
return /* @__PURE__ */ t("div", { className: "flex justify-end", children: [
|
|
563
|
+
u && /* @__PURE__ */ t(q, { fallback: /* @__PURE__ */ t(Z, { variant: "pill" }), children: /* @__PURE__ */ t("div", { className: `flex ${u.length > 3 ? "flex-col" : "flex-wrap"} gap-2 mt-3`, children: [
|
|
564
|
+
u.slice(0, T).map((p, w) => /* @__PURE__ */ t(
|
|
565
|
+
bn,
|
|
566
|
+
{
|
|
567
|
+
disabled: $ || f || v,
|
|
568
|
+
text: p?.label || "",
|
|
569
|
+
onClick: () => N(p),
|
|
570
|
+
className: "cursor-pointer"
|
|
571
|
+
},
|
|
572
|
+
w
|
|
573
|
+
)),
|
|
574
|
+
u.length > T && /* @__PURE__ */ t(
|
|
575
|
+
"button",
|
|
576
|
+
{
|
|
577
|
+
type: "button",
|
|
578
|
+
disabled: $ || f || v,
|
|
579
|
+
onClick: () => S((p) => p + 5),
|
|
580
|
+
className: O(
|
|
581
|
+
"inline-flex items-center gap-1.5 self-start rounded-lg border border-dashed border-primary",
|
|
582
|
+
"bg-elicitationBg px-3 py-2 text-xs font-semibold text-primary",
|
|
583
|
+
"transition-colors cursor-pointer",
|
|
584
|
+
"disabled:opacity-50 disabled:cursor-not-allowed"
|
|
585
|
+
),
|
|
586
|
+
children: [
|
|
587
|
+
/* @__PURE__ */ t(nt, { className: "w-3.5 h-3.5" }),
|
|
588
|
+
"Show ",
|
|
589
|
+
Math.min(5, u.length - T),
|
|
590
|
+
" more"
|
|
591
|
+
]
|
|
592
|
+
}
|
|
593
|
+
)
|
|
594
|
+
] }) }),
|
|
595
|
+
h === _.SYNAPSE_COMPONENTS.MULTI && k?.options && /* @__PURE__ */ t(q, { fallback: /* @__PURE__ */ t(Z, { variant: "input" }), children: /* @__PURE__ */ t("div", { className: "mt-3 space-y-3 break-words overflow-wrap-anywhere whitespace-pre-wrap bg-elicitationBg border border-primary/40 rounded-xl p-4", children: [
|
|
596
|
+
/* @__PURE__ */ t("h3", { className: "text-xs font-medium text-muted-foreground mb-2", children: "Select multiple options:" }),
|
|
597
|
+
/* @__PURE__ */ t(
|
|
598
|
+
yn,
|
|
599
|
+
{
|
|
600
|
+
options: c(),
|
|
601
|
+
selectedValues: g,
|
|
602
|
+
onSelectionChange: m,
|
|
603
|
+
disabled: $ || f
|
|
604
|
+
}
|
|
605
|
+
),
|
|
606
|
+
/* @__PURE__ */ t(
|
|
607
|
+
L,
|
|
608
|
+
{
|
|
609
|
+
onClick: r,
|
|
610
|
+
disabled: g.length === 0 || $ || f,
|
|
611
|
+
className: O(
|
|
612
|
+
"w-full rounded-lg px-4 py-2 text-sm font-medium transition-all",
|
|
613
|
+
"bg-primary hover:bg-primary/90 text-primary-foreground",
|
|
614
|
+
"disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-primary/50 disabled:text-primary-foreground",
|
|
615
|
+
"shadow-sm hover:shadow-md active:scale-[0.98] "
|
|
616
|
+
),
|
|
617
|
+
children: "Confirm"
|
|
618
|
+
}
|
|
619
|
+
)
|
|
620
|
+
] }) }),
|
|
621
|
+
s && s.length > 0 ? /* @__PURE__ */ t(q, { fallback: /* @__PURE__ */ t(Z, { variant: "card" }), children: /* @__PURE__ */ t(
|
|
622
|
+
xn,
|
|
623
|
+
{
|
|
624
|
+
count: s.length > 1 ? s.length + 1 : s.length,
|
|
625
|
+
renderItem: (p, w) => {
|
|
626
|
+
if (s.length > 1 && p === s.length)
|
|
627
|
+
return /* @__PURE__ */ t(
|
|
628
|
+
"button",
|
|
629
|
+
{
|
|
630
|
+
type: "button",
|
|
631
|
+
onClick: l,
|
|
632
|
+
disabled: f || $,
|
|
633
|
+
className: O(
|
|
634
|
+
"max-w-md w-full h-full flex flex-col items-center justify-center gap-2 px-4",
|
|
635
|
+
"rounded-xl border-2 border-dashed border-black-200 dark:border-white-200 bg-primary/[10%]",
|
|
636
|
+
"transition-colors disabled:opacity-60 disabled:cursor-not-allowed"
|
|
637
|
+
),
|
|
638
|
+
children: [
|
|
639
|
+
/* @__PURE__ */ t(
|
|
640
|
+
"span",
|
|
641
|
+
{
|
|
642
|
+
className: O(
|
|
643
|
+
"flex items-center justify-center",
|
|
644
|
+
"w-10 h-10 rounded-full bg-elicitationBg shadow-sm"
|
|
645
|
+
),
|
|
646
|
+
children: /* @__PURE__ */ t(st, { className: "w-4 h-4 text-primary" })
|
|
647
|
+
}
|
|
648
|
+
),
|
|
649
|
+
/* @__PURE__ */ t("span", { className: "text-primary font-semibold text-sm", children: "Show more" })
|
|
650
|
+
]
|
|
651
|
+
}
|
|
652
|
+
);
|
|
653
|
+
const x = s[p];
|
|
654
|
+
return /* @__PURE__ */ t(q, { fallback: /* @__PURE__ */ t(Z, { variant: "card" }), children: /* @__PURE__ */ t(
|
|
655
|
+
wn,
|
|
656
|
+
{
|
|
657
|
+
doctor: x,
|
|
658
|
+
doctorDetails: b?.[x.doctor_id],
|
|
659
|
+
disabled: f,
|
|
660
|
+
onSelect: e,
|
|
661
|
+
isActive: w
|
|
662
|
+
}
|
|
663
|
+
) }, x.doctor_id);
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
) }) : null,
|
|
667
|
+
y && /* @__PURE__ */ t(q, { fallback: /* @__PURE__ */ t(Z, { variant: "card" }), children: /* @__PURE__ */ t(
|
|
668
|
+
vn,
|
|
669
|
+
{
|
|
670
|
+
cards: y,
|
|
671
|
+
onSelect: async (p) => {
|
|
672
|
+
await d({
|
|
673
|
+
...p,
|
|
674
|
+
toolCalled: !0,
|
|
675
|
+
tool_key: a,
|
|
676
|
+
messageId: n
|
|
677
|
+
});
|
|
678
|
+
},
|
|
679
|
+
orientation: i.orientation,
|
|
680
|
+
disabled: $ || f
|
|
681
|
+
}
|
|
682
|
+
) }),
|
|
683
|
+
C && /* @__PURE__ */ t(q, { fallback: /* @__PURE__ */ t(Z, { variant: "media" }), children: /* @__PURE__ */ t("div", { className: "mt-3", children: /* @__PURE__ */ t(kn, { card: C }) }) })
|
|
684
|
+
] });
|
|
685
|
+
}
|
|
686
|
+
function Cn({
|
|
687
|
+
id: n,
|
|
688
|
+
role: a,
|
|
689
|
+
content: i,
|
|
690
|
+
files: d,
|
|
691
|
+
isLastMessage: f,
|
|
692
|
+
progressMessage: g,
|
|
693
|
+
toolKeys: m,
|
|
694
|
+
userHint: b,
|
|
695
|
+
elicitationState: o,
|
|
696
|
+
toolCallStatus: v,
|
|
697
|
+
onSendMessage: E,
|
|
698
|
+
onToggleFeedback: T,
|
|
699
|
+
disabled: S,
|
|
700
|
+
onClearElicitationState: h,
|
|
701
|
+
isAuthComponent: $,
|
|
702
|
+
isFullScreen: k
|
|
703
|
+
}) {
|
|
704
|
+
const N = a === "user", [e, l] = Y(_.USER_FEEDBACK.NONE), r = X((u) => u.isStreaming), c = (u) => {
|
|
705
|
+
l(u), T(u);
|
|
706
|
+
}, s = !!(i?.trim() || d && d.length > 0 || v || g || b);
|
|
707
|
+
return /* @__PURE__ */ t(ce, { children: [
|
|
708
|
+
s && /* @__PURE__ */ t("div", { className: O("flex", N ? "justify-end" : "justify-start"), children: /* @__PURE__ */ t(
|
|
709
|
+
"div",
|
|
710
|
+
{
|
|
711
|
+
className: O(
|
|
712
|
+
"flex gap-3",
|
|
713
|
+
N ? "flex-row-reverse" : "flex-row",
|
|
714
|
+
N ? "max-w-[60%]" : k ? "w-full" : "max-w-xs"
|
|
715
|
+
),
|
|
716
|
+
children: /* @__PURE__ */ t("div", { className: "flex flex-col", children: [
|
|
717
|
+
/* @__PURE__ */ t(
|
|
718
|
+
de,
|
|
719
|
+
{
|
|
720
|
+
className: O(
|
|
721
|
+
"px-4 py-2 rounded-lg shadow-none break-words overflow-wrap-anywhere whitespace-pre-wrap",
|
|
722
|
+
N ? "bg-primary text-primary-foreground shadow-sm" : O(
|
|
723
|
+
"text-foreground shadow-sm bg-botMessage blur-xs border border-black-200 dark:border-white-200"
|
|
724
|
+
),
|
|
725
|
+
// Fullscreen bot: free-flow text — drop bubble chrome (bg, border, shadow, padding, radius).
|
|
726
|
+
k && !N && "!bg-transparent !shadow-none !border-0 !rounded-none !px-0 !py-0 !backdrop-blur-none !blur-none"
|
|
727
|
+
),
|
|
728
|
+
children: [
|
|
729
|
+
v && !N && /* @__PURE__ */ t("div", { className: "text-xs text-muted-foreground mb-2 pb-2 border-b border-border-subtle", children: v }),
|
|
730
|
+
!v && g && !N && f && /* @__PURE__ */ t("p", { className: "text-sm font-medium text-muted-foreground pb-2", children: g }),
|
|
731
|
+
i && /* @__PURE__ */ t(
|
|
732
|
+
"div",
|
|
733
|
+
{
|
|
734
|
+
className: O(
|
|
735
|
+
"markdown-content",
|
|
736
|
+
k && !N ? "text-base leading-6" : "text-sm"
|
|
737
|
+
),
|
|
738
|
+
children: /* @__PURE__ */ t(ve, { children: `${i} ${!N && r && f ? "..." : ""}` })
|
|
739
|
+
}
|
|
740
|
+
),
|
|
741
|
+
d && d.length > 0 && /* @__PURE__ */ t("div", { className: "mt-2", children: /* @__PURE__ */ t(lt, { files: d, isPreview: !1, className: "" }) }),
|
|
742
|
+
g && !N && f && /* @__PURE__ */ t("p", { className: "text-sm font-medium text-muted-foreground", children: g })
|
|
743
|
+
]
|
|
744
|
+
}
|
|
745
|
+
),
|
|
746
|
+
!b && !N && !r && f && i && e === _.USER_FEEDBACK.NONE && /* @__PURE__ */ t("div", { className: "flex items-center gap-2 self-start mt-1", children: /* @__PURE__ */ t("div", { className: "flex items-center gap-1", children: [
|
|
747
|
+
/* @__PURE__ */ t(
|
|
748
|
+
L,
|
|
749
|
+
{
|
|
750
|
+
variant: "ghost",
|
|
751
|
+
size: "sm",
|
|
752
|
+
className: "h-6 w-6 p-0 hover:bg-muted text-black-500 dark:text-white-500 hover:text-foreground",
|
|
753
|
+
onClick: () => c(_.USER_FEEDBACK.LIKE),
|
|
754
|
+
children: /* @__PURE__ */ t(re, { className: "h-3 w-3" })
|
|
755
|
+
}
|
|
756
|
+
),
|
|
757
|
+
/* @__PURE__ */ t(
|
|
758
|
+
L,
|
|
759
|
+
{
|
|
760
|
+
variant: "ghost",
|
|
761
|
+
size: "sm",
|
|
762
|
+
className: "h-6 w-6 p-0 hover:bg-muted text-black-500 dark:text-white-500 hover:text-foreground",
|
|
763
|
+
onClick: () => c(_.USER_FEEDBACK.DISLIKE),
|
|
764
|
+
children: /* @__PURE__ */ t(le, { className: "h-3 w-3" })
|
|
765
|
+
}
|
|
766
|
+
)
|
|
767
|
+
] }) }),
|
|
768
|
+
!b && !N && !r && f && e === _.USER_FEEDBACK.LIKE && /* @__PURE__ */ t("div", { className: "flex items-center gap-2 self-start mt-1", children: /* @__PURE__ */ t(
|
|
769
|
+
L,
|
|
770
|
+
{
|
|
771
|
+
variant: "ghost",
|
|
772
|
+
size: "sm",
|
|
773
|
+
className: "h-6 w-6 p-0 hover:bg-muted text-primary",
|
|
774
|
+
disabled: !0,
|
|
775
|
+
children: /* @__PURE__ */ t(re, { className: "h-3 w-3" })
|
|
776
|
+
}
|
|
777
|
+
) }),
|
|
778
|
+
!b && !N && !r && f && e === _.USER_FEEDBACK.DISLIKE && /* @__PURE__ */ t("div", { className: "flex items-center gap-2 self-start mt-1", children: /* @__PURE__ */ t(
|
|
779
|
+
L,
|
|
780
|
+
{
|
|
781
|
+
variant: "ghost",
|
|
782
|
+
size: "sm",
|
|
783
|
+
className: "h-6 w-6 p-0 hover:bg-muted text-primary",
|
|
784
|
+
disabled: !0,
|
|
785
|
+
children: /* @__PURE__ */ t(le, { className: "h-3 w-3" })
|
|
786
|
+
}
|
|
787
|
+
) }),
|
|
788
|
+
$ && f && m?.length ? /* @__PURE__ */ t("div", { className: "flex items-center gap-2 self-start mt-1", children: /* @__PURE__ */ t(
|
|
789
|
+
L,
|
|
790
|
+
{
|
|
791
|
+
variant: "link",
|
|
792
|
+
size: "sm",
|
|
793
|
+
className: "h-6 px-0 text-[12px] font-medium text-primary border-b border-dashed border-primary rounded-none bg-transparent no-underline hover:no-underline hover:bg-transparent active:bg-transparent focus-visible:bg-transparent rounded-none",
|
|
794
|
+
onClick: () => {
|
|
795
|
+
const u = m[m.length - 1];
|
|
796
|
+
u && o[u].active && h(u, "Cancel OTP Verification");
|
|
797
|
+
},
|
|
798
|
+
children: "Cancel OTP Verification"
|
|
799
|
+
}
|
|
800
|
+
) }) : null
|
|
801
|
+
] })
|
|
802
|
+
}
|
|
803
|
+
) }),
|
|
804
|
+
m?.map((u) => {
|
|
805
|
+
const y = o[u];
|
|
806
|
+
return y ? /* @__PURE__ */ t(
|
|
807
|
+
Nn,
|
|
808
|
+
{
|
|
809
|
+
messageId: n,
|
|
810
|
+
tool_key: u,
|
|
811
|
+
entry: y,
|
|
812
|
+
onSendMessage: E,
|
|
813
|
+
disabled: S || y.disabled
|
|
814
|
+
},
|
|
815
|
+
u
|
|
816
|
+
) : null;
|
|
817
|
+
}),
|
|
818
|
+
b && !N && /* @__PURE__ */ t("div", { className: "flex justify-start", children: /* @__PURE__ */ t(
|
|
819
|
+
"div",
|
|
820
|
+
{
|
|
821
|
+
className: O(
|
|
822
|
+
"flex gap-3 flex-row",
|
|
823
|
+
k ? "w-full" : "max-w-xs"
|
|
824
|
+
),
|
|
825
|
+
children: /* @__PURE__ */ t("div", { className: "flex flex-col", children: [
|
|
826
|
+
/* @__PURE__ */ t(
|
|
827
|
+
de,
|
|
828
|
+
{
|
|
829
|
+
className: O(
|
|
830
|
+
"px-4 py-2 rounded-lg shadow-none break-words overflow-wrap-anywhere whitespace-pre-wrap",
|
|
831
|
+
"text-foreground shadow-sm bg-botMessage blur-xs border border-black-200 dark:border-white-200",
|
|
832
|
+
k && "!bg-transparent !shadow-none !border-0 !rounded-none !px-0 !py-0 !backdrop-blur-none !blur-none"
|
|
833
|
+
),
|
|
834
|
+
children: /* @__PURE__ */ t(
|
|
835
|
+
"div",
|
|
836
|
+
{
|
|
837
|
+
className: O(
|
|
838
|
+
"markdown-content",
|
|
839
|
+
k ? "text-base leading-6" : "text-sm"
|
|
840
|
+
),
|
|
841
|
+
children: /* @__PURE__ */ t(ve, { children: b })
|
|
842
|
+
}
|
|
843
|
+
)
|
|
844
|
+
}
|
|
845
|
+
),
|
|
846
|
+
!r && f && e === _.USER_FEEDBACK.NONE && /* @__PURE__ */ t("div", { className: "flex items-center gap-2 self-start mt-1", children: /* @__PURE__ */ t("div", { className: "flex items-center gap-1", children: [
|
|
847
|
+
/* @__PURE__ */ t(
|
|
848
|
+
L,
|
|
849
|
+
{
|
|
850
|
+
variant: "ghost",
|
|
851
|
+
size: "sm",
|
|
852
|
+
className: "h-6 w-6 p-0 hover:bg-muted text-black-500 dark:text-white-500 hover:text-foreground",
|
|
853
|
+
onClick: () => c(_.USER_FEEDBACK.LIKE),
|
|
854
|
+
children: /* @__PURE__ */ t(re, { className: "h-3 w-3" })
|
|
855
|
+
}
|
|
856
|
+
),
|
|
857
|
+
/* @__PURE__ */ t(
|
|
858
|
+
L,
|
|
859
|
+
{
|
|
860
|
+
variant: "ghost",
|
|
861
|
+
size: "sm",
|
|
862
|
+
className: "h-6 w-6 p-0 hover:bg-muted text-black-500 dark:text-white-500 hover:text-foreground",
|
|
863
|
+
onClick: () => c(_.USER_FEEDBACK.DISLIKE),
|
|
864
|
+
children: /* @__PURE__ */ t(le, { className: "h-3 w-3" })
|
|
865
|
+
}
|
|
866
|
+
)
|
|
867
|
+
] }) }),
|
|
868
|
+
!r && f && e === _.USER_FEEDBACK.LIKE && /* @__PURE__ */ t("div", { className: "flex items-center gap-2 self-start mt-1", children: /* @__PURE__ */ t(
|
|
869
|
+
L,
|
|
870
|
+
{
|
|
871
|
+
variant: "ghost",
|
|
872
|
+
size: "sm",
|
|
873
|
+
className: "h-6 w-6 p-0 hover:bg-muted text-primary",
|
|
874
|
+
disabled: !0,
|
|
875
|
+
children: /* @__PURE__ */ t(re, { className: "h-3 w-3" })
|
|
876
|
+
}
|
|
877
|
+
) }),
|
|
878
|
+
!r && f && e === _.USER_FEEDBACK.DISLIKE && /* @__PURE__ */ t("div", { className: "flex items-center gap-2 self-start mt-1", children: /* @__PURE__ */ t(
|
|
879
|
+
L,
|
|
880
|
+
{
|
|
881
|
+
variant: "ghost",
|
|
882
|
+
size: "sm",
|
|
883
|
+
className: "h-6 w-6 p-0 hover:bg-muted text-primary",
|
|
884
|
+
disabled: !0,
|
|
885
|
+
children: /* @__PURE__ */ t(le, { className: "h-3 w-3" })
|
|
886
|
+
}
|
|
887
|
+
) })
|
|
888
|
+
] })
|
|
889
|
+
}
|
|
890
|
+
) })
|
|
891
|
+
] });
|
|
892
|
+
}
|
|
893
|
+
function Qe({
|
|
894
|
+
text: n,
|
|
895
|
+
maxWidth: a = "200px",
|
|
896
|
+
className: i = "",
|
|
897
|
+
icon: d,
|
|
898
|
+
onClick: f,
|
|
899
|
+
disabled: g = !1
|
|
900
|
+
}) {
|
|
901
|
+
const [m, b] = Y(!1), o = Oe(null), v = Oe(null);
|
|
902
|
+
return Ke(() => {
|
|
903
|
+
const E = () => {
|
|
904
|
+
if (o.current && v.current) {
|
|
905
|
+
const T = o.current.offsetWidth, S = v.current.scrollWidth;
|
|
906
|
+
b(S > T);
|
|
907
|
+
}
|
|
908
|
+
};
|
|
909
|
+
return E(), window.addEventListener("resize", E), () => window.removeEventListener("resize", E);
|
|
910
|
+
}, [n, a]), n ? /* @__PURE__ */ t(
|
|
911
|
+
"div",
|
|
912
|
+
{
|
|
913
|
+
ref: o,
|
|
914
|
+
onClick: g ? void 0 : f,
|
|
915
|
+
className: O(
|
|
916
|
+
"inline-flex items-center gap-2 rounded-lg border border-primary bg-elicitationBg px-3 py-2 shadow-sm text-xs text-primary cursor-pointer",
|
|
917
|
+
i,
|
|
918
|
+
g ? "opacity-50 cursor-not-allowed" : ""
|
|
919
|
+
),
|
|
920
|
+
style: {
|
|
921
|
+
maxWidth: a,
|
|
922
|
+
WebkitTapHighlightColor: "transparent",
|
|
923
|
+
outline: "none"
|
|
924
|
+
},
|
|
925
|
+
title: n,
|
|
926
|
+
children: [
|
|
927
|
+
d && /* @__PURE__ */ t("span", { className: "text-primary", children: d }),
|
|
928
|
+
/* @__PURE__ */ t("div", { className: "pill-marquee-wrapper", children: /* @__PURE__ */ t(
|
|
929
|
+
"span",
|
|
930
|
+
{
|
|
931
|
+
ref: v,
|
|
932
|
+
className: O(
|
|
933
|
+
"block whitespace-normal",
|
|
934
|
+
m ? "pill-marquee" : ""
|
|
935
|
+
),
|
|
936
|
+
children: n
|
|
937
|
+
}
|
|
938
|
+
) })
|
|
939
|
+
]
|
|
940
|
+
}
|
|
941
|
+
) : null;
|
|
942
|
+
}
|
|
943
|
+
const En = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, Pills: Qe }, Symbol.toStringTag, { value: "Module" }));
|
|
944
|
+
function Sn({
|
|
945
|
+
text: n,
|
|
946
|
+
suggestions: a,
|
|
947
|
+
onSendMessage: i,
|
|
948
|
+
disabled: d,
|
|
949
|
+
isFullScreen: f
|
|
950
|
+
}) {
|
|
951
|
+
if (!n && !a?.length) return null;
|
|
952
|
+
const g = (m) => {
|
|
953
|
+
const b = m.value || m.label || "";
|
|
954
|
+
b && i({ message: b });
|
|
955
|
+
};
|
|
956
|
+
return /* @__PURE__ */ t(ce, { children: [
|
|
957
|
+
n && /* @__PURE__ */ t("div", { className: "flex justify-start", children: /* @__PURE__ */ t(
|
|
958
|
+
"div",
|
|
959
|
+
{
|
|
960
|
+
className: O(
|
|
961
|
+
"flex gap-3 flex-row",
|
|
962
|
+
f ? "w-full" : "max-w-xs"
|
|
963
|
+
),
|
|
964
|
+
children: /* @__PURE__ */ t(
|
|
965
|
+
de,
|
|
966
|
+
{
|
|
967
|
+
className: O(
|
|
968
|
+
"px-4 py-2 rounded-lg shadow-none break-words overflow-wrap-anywhere whitespace-pre-wrap text-foreground shadow-sm bg-botMessage blur-xs border border-black-200 dark:border-white-200",
|
|
969
|
+
f && "!bg-transparent !shadow-none !border-0 !rounded-none !px-0 !py-0 !backdrop-blur-none !blur-none text-black-900"
|
|
970
|
+
),
|
|
971
|
+
children: /* @__PURE__ */ t(
|
|
972
|
+
"div",
|
|
973
|
+
{
|
|
974
|
+
className: O(
|
|
975
|
+
"markdown-content",
|
|
976
|
+
f ? "text-base leading-6" : "text-sm"
|
|
977
|
+
),
|
|
978
|
+
children: /* @__PURE__ */ t(ve, { children: n })
|
|
979
|
+
}
|
|
980
|
+
)
|
|
981
|
+
}
|
|
982
|
+
)
|
|
983
|
+
}
|
|
984
|
+
) }),
|
|
985
|
+
a && a.length > 0 && /* @__PURE__ */ t("div", { className: "flex justify-end", children: /* @__PURE__ */ t(
|
|
986
|
+
"div",
|
|
987
|
+
{
|
|
988
|
+
className: O(
|
|
989
|
+
"flex gap-2 mt-3",
|
|
990
|
+
a.length > 3 ? "flex-col" : "flex-wrap"
|
|
991
|
+
),
|
|
992
|
+
children: a.map((m, b) => /* @__PURE__ */ t(
|
|
993
|
+
Qe,
|
|
994
|
+
{
|
|
995
|
+
text: m.label || "",
|
|
996
|
+
onClick: () => g(m),
|
|
997
|
+
disabled: d,
|
|
998
|
+
className: "cursor-pointer"
|
|
999
|
+
},
|
|
1000
|
+
b
|
|
1001
|
+
))
|
|
1002
|
+
}
|
|
1003
|
+
) })
|
|
1004
|
+
] });
|
|
1005
|
+
}
|
|
1006
|
+
function On({
|
|
1007
|
+
messages: n,
|
|
1008
|
+
onSendMessage: a,
|
|
1009
|
+
onToggleFeedback: i,
|
|
1010
|
+
onClearElicitationState: d,
|
|
1011
|
+
isAuthComponent: f,
|
|
1012
|
+
isFullScreen: g,
|
|
1013
|
+
initialMessage: m,
|
|
1014
|
+
disabled: b
|
|
1015
|
+
}) {
|
|
1016
|
+
const o = X((h) => h.isWaitingForResponse), v = X((h) => h.connectionStatus), E = X((h) => h.elicitationState), T = v === rt.CONNECTED, S = X((h) => h.progressMessage);
|
|
1017
|
+
return n.length === 0 && !S ? /* @__PURE__ */ t(
|
|
1018
|
+
Sn,
|
|
1019
|
+
{
|
|
1020
|
+
text: m?.text,
|
|
1021
|
+
suggestions: m?.suggestions,
|
|
1022
|
+
onSendMessage: a,
|
|
1023
|
+
disabled: b,
|
|
1024
|
+
isFullScreen: g
|
|
1025
|
+
}
|
|
1026
|
+
) : /* @__PURE__ */ t(ce, { children: [
|
|
1027
|
+
(n && n.length > 0 || S) && /* @__PURE__ */ t(ce, { children: n.map((h, $) => /* @__PURE__ */ t(
|
|
1028
|
+
"div",
|
|
1029
|
+
{
|
|
1030
|
+
className: "animate-slideUp scroll-mt-[16px] min-w-0 overflow-hidden",
|
|
1031
|
+
"data-role": h.role,
|
|
1032
|
+
"data-message-id": h.id,
|
|
1033
|
+
id: $ === n.length - 1 ? "last-message" : void 0,
|
|
1034
|
+
children: /* @__PURE__ */ t(
|
|
1035
|
+
Cn,
|
|
1036
|
+
{
|
|
1037
|
+
id: h.id,
|
|
1038
|
+
role: h.role,
|
|
1039
|
+
content: h.content,
|
|
1040
|
+
files: h.files || [],
|
|
1041
|
+
toolKeys: h.tool_keys,
|
|
1042
|
+
userHint: h.userHint,
|
|
1043
|
+
elicitationState: E,
|
|
1044
|
+
timestamp: h.timestamp,
|
|
1045
|
+
onSendMessage: a,
|
|
1046
|
+
isLastMessage: $ === n.length - 1,
|
|
1047
|
+
progressMessage: S,
|
|
1048
|
+
toolCallStatus: h.toolCallStatus,
|
|
1049
|
+
disabled: !T,
|
|
1050
|
+
onToggleFeedback: (k) => i(k, h.id),
|
|
1051
|
+
onClearElicitationState: d,
|
|
1052
|
+
isAuthComponent: f,
|
|
1053
|
+
isFullScreen: g
|
|
1054
|
+
}
|
|
1055
|
+
)
|
|
1056
|
+
},
|
|
1057
|
+
h.id
|
|
1058
|
+
)) }),
|
|
1059
|
+
o && /* @__PURE__ */ t(_n, {})
|
|
1060
|
+
] });
|
|
1061
|
+
}
|
|
1062
|
+
function _n() {
|
|
1063
|
+
return /* @__PURE__ */ t("div", { className: "animate-slideUp", children: /* @__PURE__ */ t("div", { className: "flex justify-start", children: /* @__PURE__ */ t("div", { className: "flex gap-3", children: /* @__PURE__ */ t(de, { className: "px-4 py-2 rounded-lg shadow-none bg-botMessage backdrop-blur-sm text-text-primary shadow-sm", children: /* @__PURE__ */ t(
|
|
1064
|
+
"div",
|
|
1065
|
+
{
|
|
1066
|
+
className: "flex items-center gap-1.5",
|
|
1067
|
+
"aria-label": "Bot is typing",
|
|
1068
|
+
children: [0, 1, 2].map((n) => /* @__PURE__ */ t(
|
|
1069
|
+
"span",
|
|
1070
|
+
{
|
|
1071
|
+
className: "w-2 h-2 rounded-full bg-foreground animate-pulse",
|
|
1072
|
+
style: { animationDelay: `${n * 150}ms` }
|
|
1073
|
+
},
|
|
1074
|
+
n
|
|
1075
|
+
))
|
|
1076
|
+
}
|
|
1077
|
+
) }) }) }) });
|
|
1078
|
+
}
|
|
1079
|
+
const $n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: On }, Symbol.toStringTag, { value: "Module" }));
|
|
1080
|
+
export {
|
|
1081
|
+
$n as C,
|
|
1082
|
+
ve as M
|
|
1083
|
+
};
|