@eka-care/medassist-widget 0.1.107-dev.2 → 0.1.107
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
CHANGED
|
@@ -10745,41 +10745,34 @@ function hl() {
|
|
|
10745
10745
|
}
|
|
10746
10746
|
const fl = (e) => Object.fromEntries(
|
|
10747
10747
|
Object.entries(e).filter(([, t]) => t !== void 0)
|
|
10748
|
-
),
|
|
10748
|
+
), Dm = (e) => e ? e.split(" ").map((t) => t[0]).slice(0, 2).join("").toUpperCase() : "DR", Fm = (e) => {
|
|
10749
10749
|
const t = new Date(e), n = t.toLocaleDateString(void 0, { weekday: "short" }), r = t.toLocaleDateString(void 0, { day: "2-digit" }), o = t.toLocaleDateString(void 0, { month: "short" });
|
|
10750
10750
|
return { weekday: n, dayNum: r, month: o };
|
|
10751
|
-
},
|
|
10751
|
+
}, Um = (e) => {
|
|
10752
10752
|
const t = new Date(e);
|
|
10753
10753
|
return isNaN(t.getTime()) ? e : t.toLocaleDateString("en-GB", { day: "numeric", month: "long", year: "numeric" });
|
|
10754
|
-
},
|
|
10754
|
+
}, Vm = (e, t) => {
|
|
10755
10755
|
const n = new Date(e);
|
|
10756
10756
|
return n.setUTCDate(n.getUTCDate() + t), n.toISOString().slice(0, 10);
|
|
10757
|
-
},
|
|
10758
|
-
if (!e.length && !t.length && n) {
|
|
10759
|
-
const o = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), s = n || o;
|
|
10760
|
-
return Array.from({ length: 3 }, (l, i) => ({
|
|
10761
|
-
date: Vh(s, i),
|
|
10762
|
-
slots: []
|
|
10763
|
-
}));
|
|
10764
|
-
}
|
|
10757
|
+
}, Vh = (e = [], t = []) => {
|
|
10765
10758
|
if (!e.length) return t;
|
|
10766
10759
|
if (!t.length) return e;
|
|
10767
|
-
const
|
|
10768
|
-
for (const
|
|
10769
|
-
const
|
|
10770
|
-
if (
|
|
10771
|
-
|
|
10760
|
+
const n = e.map((r) => ({ ...r }));
|
|
10761
|
+
for (const r of t) {
|
|
10762
|
+
const o = r.date ? n.findIndex((s) => s.date === r.date) : -1;
|
|
10763
|
+
if (o === -1)
|
|
10764
|
+
n.push({ ...r });
|
|
10772
10765
|
else {
|
|
10773
|
-
const
|
|
10774
|
-
|
|
10775
|
-
...
|
|
10776
|
-
...fl(
|
|
10777
|
-
slots:
|
|
10766
|
+
const s = n[o];
|
|
10767
|
+
n[o] = {
|
|
10768
|
+
...s,
|
|
10769
|
+
...fl(r),
|
|
10770
|
+
slots: r.slots ?? s.slots
|
|
10778
10771
|
};
|
|
10779
10772
|
}
|
|
10780
10773
|
}
|
|
10781
|
-
return
|
|
10782
|
-
},
|
|
10774
|
+
return n;
|
|
10775
|
+
}, $h = (e = [], t = []) => {
|
|
10783
10776
|
if (!e.length) return t;
|
|
10784
10777
|
if (!t.length) return e;
|
|
10785
10778
|
const n = e.map((r) => ({ ...r }));
|
|
@@ -10792,14 +10785,14 @@ const fl = (e) => Object.fromEntries(
|
|
|
10792
10785
|
n[o] = {
|
|
10793
10786
|
...s,
|
|
10794
10787
|
...fl(r),
|
|
10795
|
-
availability:
|
|
10788
|
+
availability: Vh(s.availability, r.availability)
|
|
10796
10789
|
};
|
|
10797
10790
|
}
|
|
10798
10791
|
}
|
|
10799
10792
|
return n;
|
|
10800
|
-
}, di = (e) => !!e && Array.isArray(e.doctors),
|
|
10793
|
+
}, di = (e) => !!e && Array.isArray(e.doctors), zh = (e, t, n) => e ? t ? n !== O.SYNAPSE_COMPONENTS.DOCTOR_CARD ? t : !di(e) || !di(t) ? e : {
|
|
10801
10794
|
...t,
|
|
10802
|
-
doctors:
|
|
10795
|
+
doctors: $h(e.doctors, t.doctors),
|
|
10803
10796
|
doctor_details: {
|
|
10804
10797
|
...e.doctor_details || {},
|
|
10805
10798
|
...t.doctor_details || {}
|
|
@@ -10807,7 +10800,7 @@ const fl = (e) => Object.fromEntries(
|
|
|
10807
10800
|
} : e : t, gt = (e) => {
|
|
10808
10801
|
const t = e;
|
|
10809
10802
|
return t?.message ? t.error?.msg || t.message : e instanceof Error ? e.message : "An unexpected error occurred";
|
|
10810
|
-
},
|
|
10803
|
+
}, Bh = ({
|
|
10811
10804
|
environment: e,
|
|
10812
10805
|
connectionType: t,
|
|
10813
10806
|
baseUrl: n,
|
|
@@ -10992,7 +10985,7 @@ const fl = (e) => Object.fromEntries(
|
|
|
10992
10985
|
if (!I?.messageId || !I?.data || !I?.data?.details?.component || !I?.data?.tool_id)
|
|
10993
10986
|
return;
|
|
10994
10987
|
v && he(!1);
|
|
10995
|
-
const { messageId: B, data: q } = I, re = q.tool_id, ae = `${B}::${re}`, De = oe.getState().elicitationState[ae], Je = q.details?.component, Ve = I?.data?.details?._meta?.tool_result, Dt = q.details?.input, Ne =
|
|
10988
|
+
const { messageId: B, data: q } = I, re = q.tool_id, ae = `${B}::${re}`, De = oe.getState().elicitationState[ae], Je = q.details?.component, Ve = I?.data?.details?._meta?.tool_result, Dt = q.details?.input, Ne = zh(De?.ui_input, Dt, Je);
|
|
10996
10989
|
let Ge = I.data.details?._meta?.disp_toast_msg;
|
|
10997
10990
|
const nt = q?.details?._meta?.schema?.required || [];
|
|
10998
10991
|
switch (q?.details?.status) {
|
|
@@ -11486,11 +11479,11 @@ const fl = (e) => Object.fromEntries(
|
|
|
11486
11479
|
}
|
|
11487
11480
|
}
|
|
11488
11481
|
};
|
|
11489
|
-
},
|
|
11490
|
-
function
|
|
11482
|
+
}, Hh = 32, jh = 100, Gh = 320;
|
|
11483
|
+
function Wh() {
|
|
11491
11484
|
return typeof window > "u" || !window.matchMedia ? !1 : window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
11492
11485
|
}
|
|
11493
|
-
function
|
|
11486
|
+
function qh({
|
|
11494
11487
|
messageCount: e,
|
|
11495
11488
|
isStreaming: t,
|
|
11496
11489
|
isFirstMessage: n,
|
|
@@ -11499,7 +11492,7 @@ function Yh({
|
|
|
11499
11492
|
const o = Y(null), s = Y(null), [l, i] = F(!1), c = Y(null), d = Y(!1), m = Y("auto"), u = Y(!0), p = de(() => o.current?.querySelector(
|
|
11500
11493
|
"[data-radix-scroll-area-viewport]"
|
|
11501
11494
|
) || null, []), h = de(
|
|
11502
|
-
(y) =>
|
|
11495
|
+
(y) => Wh() ? "auto" : y,
|
|
11503
11496
|
[]
|
|
11504
11497
|
), _ = de(
|
|
11505
11498
|
(y) => {
|
|
@@ -11527,7 +11520,7 @@ function Yh({
|
|
|
11527
11520
|
if (!e || !u.current) return;
|
|
11528
11521
|
const y = setTimeout(
|
|
11529
11522
|
() => b("auto"),
|
|
11530
|
-
|
|
11523
|
+
Gh
|
|
11531
11524
|
);
|
|
11532
11525
|
return () => clearTimeout(y);
|
|
11533
11526
|
}, [r, e, b]), $(() => {
|
|
@@ -11541,7 +11534,7 @@ function Yh({
|
|
|
11541
11534
|
}
|
|
11542
11535
|
const w = () => {
|
|
11543
11536
|
const { scrollTop: M, scrollHeight: k, clientHeight: D } = T;
|
|
11544
|
-
return k - M - D <=
|
|
11537
|
+
return k - M - D <= Hh;
|
|
11545
11538
|
};
|
|
11546
11539
|
u.current = !0;
|
|
11547
11540
|
let v = 0;
|
|
@@ -11555,7 +11548,7 @@ function Yh({
|
|
|
11555
11548
|
T.addEventListener("scroll", N, { passive: !0 }), g = () => T.removeEventListener("scroll", N), f = new ResizeObserver(() => {
|
|
11556
11549
|
if (!u.current) return;
|
|
11557
11550
|
const M = Date.now();
|
|
11558
|
-
M - E <
|
|
11551
|
+
M - E < jh || (E = M, v++, b("auto"));
|
|
11559
11552
|
}), f.observe(x);
|
|
11560
11553
|
};
|
|
11561
11554
|
return C(), () => {
|
|
@@ -11570,7 +11563,7 @@ function Yh({
|
|
|
11570
11563
|
};
|
|
11571
11564
|
}
|
|
11572
11565
|
const to = "eka-medassist-agent-config";
|
|
11573
|
-
function
|
|
11566
|
+
function Yh(e) {
|
|
11574
11567
|
try {
|
|
11575
11568
|
const t = localStorage.getItem(to);
|
|
11576
11569
|
return (t ? JSON.parse(t) : {})[e]?.feedback_hidden === !0;
|
|
@@ -11578,14 +11571,14 @@ function Kh(e) {
|
|
|
11578
11571
|
return !1;
|
|
11579
11572
|
}
|
|
11580
11573
|
}
|
|
11581
|
-
function
|
|
11574
|
+
function Kh(e) {
|
|
11582
11575
|
try {
|
|
11583
11576
|
const t = localStorage.getItem(to), n = t ? JSON.parse(t) : {};
|
|
11584
11577
|
n[e] || (n[e] = {}), n[e].feedback_hidden = !0, localStorage.setItem(to, JSON.stringify(n));
|
|
11585
11578
|
} catch {
|
|
11586
11579
|
}
|
|
11587
11580
|
}
|
|
11588
|
-
function
|
|
11581
|
+
function Zh({ isOpen: e, agentId: t, config: n }) {
|
|
11589
11582
|
const {
|
|
11590
11583
|
state: r,
|
|
11591
11584
|
isMuted: o,
|
|
@@ -11626,7 +11619,7 @@ function Xh({ isOpen: e, agentId: t, config: n }) {
|
|
|
11626
11619
|
sendMessageFeedback: Xe,
|
|
11627
11620
|
clearElicitationState: Xt,
|
|
11628
11621
|
sendSessionFeedback: Jt
|
|
11629
|
-
} =
|
|
11622
|
+
} = Bh({
|
|
11630
11623
|
environment: n.environment,
|
|
11631
11624
|
connectionType: n.connectionType,
|
|
11632
11625
|
baseUrl: n.baseUrl ? n.baseUrl : void 0,
|
|
@@ -11640,13 +11633,13 @@ function Xh({ isOpen: e, agentId: t, config: n }) {
|
|
|
11640
11633
|
l();
|
|
11641
11634
|
}, []);
|
|
11642
11635
|
const Lt = () => {
|
|
11643
|
-
n.feedback && !
|
|
11636
|
+
n.feedback && !Yh(t) ? M(!0) : n.onClose();
|
|
11644
11637
|
}, Qt = async (j, ie) => {
|
|
11645
11638
|
await Jt(j, ie), M(!1), n.onClose();
|
|
11646
11639
|
}, Un = () => {
|
|
11647
11640
|
M(!1), n.onClose();
|
|
11648
11641
|
}, Vo = () => {
|
|
11649
|
-
|
|
11642
|
+
Kh(t), M(!1), n.onClose();
|
|
11650
11643
|
}, $o = () => {
|
|
11651
11644
|
M(!1);
|
|
11652
11645
|
}, zo = ce.length > 0, pr = ce.length === 1, A = ue(() => {
|
|
@@ -11662,7 +11655,7 @@ function Xh({ isOpen: e, agentId: t, config: n }) {
|
|
|
11662
11655
|
messagesEndRef: ae,
|
|
11663
11656
|
showScrollButton: Le,
|
|
11664
11657
|
scrollToBottom: De
|
|
11665
|
-
} =
|
|
11658
|
+
} = qh({
|
|
11666
11659
|
messageCount: ce.length,
|
|
11667
11660
|
isStreaming: Q,
|
|
11668
11661
|
isFirstMessage: pr,
|
|
@@ -11811,7 +11804,7 @@ function Rt() {
|
|
|
11811
11804
|
return e;
|
|
11812
11805
|
}, Rt.apply(this, arguments);
|
|
11813
11806
|
}
|
|
11814
|
-
const
|
|
11807
|
+
const Xh = ["children", "options"], ui = ["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((e, t) => (e[t.toLowerCase()] = t, e), { class: "className", for: "htmlFor" }), hi = { amp: "&", apos: "'", gt: ">", lt: "<", nbsp: " ", quot: "“" }, Jh = ["style", "script", "pre"], Qh = ["src", "href", "data", "formAction", "srcDoc", "action"], ef = /([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi, tf = /\n{2,}$/, fi = /^(\s*>[\s\S]*?)(?=\n\n|$)/, nf = /^ *> ?/gm, rf = /^(?:\[!([^\]]*)\]\n)?([\s\S]*)/, of = /^ {2,}\n/, sf = /^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/, mi = /^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/, pi = /^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/, af = /^(`+)((?:\\`|(?!\1)`|[^`])+)\1/, lf = /^(?:\n *)*\n/, cf = /\r\n?/g, df = /^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/, uf = /^\[\^([^\]]+)]/, hf = /\f/g, ff = /^---[ \t]*\n(.|\n)*\n---[ \t]*\n/, mf = /^\s*?\[(x|\s)\]/, gi = /^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, _i = /^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Ei = /^([^\n]+)\n *(=|-)\2{2,} *\n/, Fr = /^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i, pf = /&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi, bi = /^<!--[\s\S]*?(?:-->)/, gf = /^(data|aria|x)-[a-z_][a-z\d_.-]*$/, Ur = /^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i, _f = /^\{.*\}$/, Ef = /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, bf = /^<([^ >]+[:@\/][^ >]+)>/, yf = /-([a-z])?/gi, yi = /^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/, vf = /^[^\n]+(?: \n|\n{2,})/, Sf = /^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/, wf = /^!\[([^\]]*)\] ?\[([^\]]*)\]/, Cf = /^\[([^\]]*)\] ?\[([^\]]*)\]/, Tf = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/, xf = /\t/g, Nf = /(^ *\||\| *$)/g, kf = /^ *:-+: *$/, If = /^ *:-+ *$/, Af = /^ *-+: *$/, fr = (e) => `(?=[\\s\\S]+?\\1${e ? "\\1" : ""})`, mr = "((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)", Rf = RegExp(`^([*_])\\1${fr(1)}${mr}\\1\\1(?!\\1)`), Mf = RegExp(`^([*_])${fr(0)}${mr}\\1(?!\\1)`), Of = RegExp(`^(==)${fr(0)}${mr}\\1`), Pf = RegExp(`^(~~)${fr(0)}${mr}\\1`), Lf = /^(:[a-zA-Z0-9-_]+:)/, Df = /^\\([^0-9A-Za-z\s])/, Ff = /\\([^0-9A-Za-z\s])/g, Uf = /^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/, Vf = /^\n+/, $f = /^([ \t]*)/, zf = /(?:^|\n)( *)$/, Fo = "(?:\\d+\\.)", Uo = "(?:[*+-])";
|
|
11815
11808
|
function ml(e) {
|
|
11816
11809
|
return "( *)(" + (e === 1 ? Fo : Uo) + ") +";
|
|
11817
11810
|
}
|
|
@@ -11819,23 +11812,23 @@ const pl = ml(1), gl = ml(2);
|
|
|
11819
11812
|
function _l(e) {
|
|
11820
11813
|
return RegExp("^" + (e === 1 ? pl : gl));
|
|
11821
11814
|
}
|
|
11822
|
-
const
|
|
11815
|
+
const Bf = _l(1), Hf = _l(2);
|
|
11823
11816
|
function El(e) {
|
|
11824
11817
|
return RegExp("^" + (e === 1 ? pl : gl) + "[^\\n]*(?:\\n(?!\\1" + (e === 1 ? Fo : Uo) + " )[^\\n]*)*(\\n|$)", "gm");
|
|
11825
11818
|
}
|
|
11826
|
-
const
|
|
11819
|
+
const jf = El(1), Gf = El(2);
|
|
11827
11820
|
function bl(e) {
|
|
11828
11821
|
const t = e === 1 ? Fo : Uo;
|
|
11829
11822
|
return RegExp("^( *)(" + t + ") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1" + t + " (?!" + t + " ))\\n*|\\s*\\n*$)");
|
|
11830
11823
|
}
|
|
11831
11824
|
const yl = bl(1), vl = bl(2);
|
|
11832
11825
|
function vi(e, t) {
|
|
11833
|
-
const n = t === 1, r = n ? yl : vl, o = n ?
|
|
11826
|
+
const n = t === 1, r = n ? yl : vl, o = n ? jf : Gf, s = n ? Bf : Hf;
|
|
11834
11827
|
return { t: (l) => s.test(l), o: qt(function(l, i) {
|
|
11835
|
-
const c =
|
|
11828
|
+
const c = zf.exec(i.prevCapture);
|
|
11836
11829
|
return c && (i.list || !i.inline && !i.simple) ? r.exec(l = c[1] + l) : null;
|
|
11837
11830
|
}), i: 1, u(l, i, c) {
|
|
11838
|
-
const d = n ? +l[2] : void 0, m = l[0].replace(
|
|
11831
|
+
const d = n ? +l[2] : void 0, m = l[0].replace(tf, `
|
|
11839
11832
|
`).match(o);
|
|
11840
11833
|
let u = !1;
|
|
11841
11834
|
return { items: m.map(function(p, h) {
|
|
@@ -11855,7 +11848,7 @@ function vi(e, t) {
|
|
|
11855
11848
|
return e("li", { key: m }, i(d, c));
|
|
11856
11849
|
})) };
|
|
11857
11850
|
}
|
|
11858
|
-
const
|
|
11851
|
+
const Wf = RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`), qf = /^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;
|
|
11859
11852
|
function Si(e) {
|
|
11860
11853
|
return typeof e == "string";
|
|
11861
11854
|
}
|
|
@@ -11867,7 +11860,7 @@ function An(e) {
|
|
|
11867
11860
|
function Jn(e, t) {
|
|
11868
11861
|
return e.startsWith(t);
|
|
11869
11862
|
}
|
|
11870
|
-
function
|
|
11863
|
+
function Yf(e, t, n) {
|
|
11871
11864
|
if (Array.isArray(n)) {
|
|
11872
11865
|
for (let r = 0; r < n.length; r++) if (Jn(e, n[r])) return !0;
|
|
11873
11866
|
return !1;
|
|
@@ -11877,8 +11870,8 @@ function Kf(e, t, n) {
|
|
|
11877
11870
|
function xn(e) {
|
|
11878
11871
|
return e.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();
|
|
11879
11872
|
}
|
|
11880
|
-
function
|
|
11881
|
-
return
|
|
11873
|
+
function Kf(e) {
|
|
11874
|
+
return Af.test(e) ? "right" : kf.test(e) ? "center" : If.test(e) ? "left" : null;
|
|
11882
11875
|
}
|
|
11883
11876
|
function wi(e, t, n, r) {
|
|
11884
11877
|
const o = n.inTable;
|
|
@@ -11893,9 +11886,9 @@ function wi(e, t, n, r) {
|
|
|
11893
11886
|
c.trim() === "|" && (i(), r) ? d !== 0 && d !== m.length - 1 && s.push([]) : l += c;
|
|
11894
11887
|
}), i(), n.inTable = o, s;
|
|
11895
11888
|
}
|
|
11896
|
-
function
|
|
11889
|
+
function Zf(e, t, n) {
|
|
11897
11890
|
n.inline = !0;
|
|
11898
|
-
const r = e[2] ? e[2].replace(
|
|
11891
|
+
const r = e[2] ? e[2].replace(Nf, "").split("|").map(Kf) : [], o = e[3] ? (function(l, i, c) {
|
|
11899
11892
|
return l.trim().split(`
|
|
11900
11893
|
`).map(function(d) {
|
|
11901
11894
|
return wi(d, i, c, !0);
|
|
@@ -11929,18 +11922,18 @@ function Yn(e) {
|
|
|
11929
11922
|
return e.exec(t);
|
|
11930
11923
|
});
|
|
11931
11924
|
}
|
|
11932
|
-
const
|
|
11933
|
-
function
|
|
11925
|
+
const Xf = /(javascript|vbscript|data(?!:image)):/i;
|
|
11926
|
+
function Jf(e) {
|
|
11934
11927
|
try {
|
|
11935
11928
|
const t = decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g, "");
|
|
11936
|
-
if (
|
|
11929
|
+
if (Xf.test(t)) return null;
|
|
11937
11930
|
} catch {
|
|
11938
11931
|
return null;
|
|
11939
11932
|
}
|
|
11940
11933
|
return e;
|
|
11941
11934
|
}
|
|
11942
11935
|
function ot(e) {
|
|
11943
|
-
return e && e.replace(
|
|
11936
|
+
return e && e.replace(Ff, "$1");
|
|
11944
11937
|
}
|
|
11945
11938
|
function Qn(e, t, n) {
|
|
11946
11939
|
const r = n.inline || !1, o = n.simple || !1;
|
|
@@ -11948,13 +11941,13 @@ function Qn(e, t, n) {
|
|
|
11948
11941
|
const s = e(t, n);
|
|
11949
11942
|
return n.inline = r, n.simple = o, s;
|
|
11950
11943
|
}
|
|
11951
|
-
function
|
|
11944
|
+
function Qf(e, t, n) {
|
|
11952
11945
|
const r = n.inline || !1, o = n.simple || !1;
|
|
11953
11946
|
n.inline = !1, n.simple = !0;
|
|
11954
11947
|
const s = e(t, n);
|
|
11955
11948
|
return n.inline = r, n.simple = o, s;
|
|
11956
11949
|
}
|
|
11957
|
-
function
|
|
11950
|
+
function em(e, t, n) {
|
|
11958
11951
|
const r = n.inline || !1;
|
|
11959
11952
|
n.inline = !1;
|
|
11960
11953
|
const o = e(t, n);
|
|
@@ -11967,7 +11960,7 @@ function $r() {
|
|
|
11967
11960
|
function zr() {
|
|
11968
11961
|
return null;
|
|
11969
11962
|
}
|
|
11970
|
-
function
|
|
11963
|
+
function tm(...e) {
|
|
11971
11964
|
return e.filter(Boolean).join(" ");
|
|
11972
11965
|
}
|
|
11973
11966
|
function Br(e, t, n) {
|
|
@@ -11976,9 +11969,9 @@ function Br(e, t, n) {
|
|
|
11976
11969
|
for (; o.length && (r = r[o[0]], r !== void 0); ) o.shift();
|
|
11977
11970
|
return r || n;
|
|
11978
11971
|
}
|
|
11979
|
-
function
|
|
11972
|
+
function nm(e = "", t = {}) {
|
|
11980
11973
|
t.overrides = t.overrides || {}, t.namedCodesToUnicode = t.namedCodesToUnicode ? Rt({}, hi, t.namedCodesToUnicode) : hi;
|
|
11981
|
-
const n = t.slugify || xn, r = t.sanitizer ||
|
|
11974
|
+
const n = t.slugify || xn, r = t.sanitizer || Jf, o = t.createElement || $e, s = [fi, mi, pi, t.enforceAtxHeadings ? _i : gi, Ei, yi, yl, vl], l = [...s, vf, Fr, bi, Ur];
|
|
11982
11975
|
function i(f, g) {
|
|
11983
11976
|
for (let E = 0; E < f.length; E++) if (f[E].test(g)) return !0;
|
|
11984
11977
|
return !1;
|
|
@@ -11988,13 +11981,13 @@ function rm(e = "", t = {}) {
|
|
|
11988
11981
|
return o((function(T, S) {
|
|
11989
11982
|
const x = Br(S, T);
|
|
11990
11983
|
return x ? typeof x == "function" || typeof x == "object" && "render" in x ? x : Br(S, T + ".component", T) : T;
|
|
11991
|
-
})(f, t.overrides), Rt({}, g, C, { className:
|
|
11984
|
+
})(f, t.overrides), Rt({}, g, C, { className: tm(g?.className, C.className) || void 0 }), ...E);
|
|
11992
11985
|
}
|
|
11993
11986
|
function d(f) {
|
|
11994
|
-
f = f.replace(
|
|
11987
|
+
f = f.replace(ff, "");
|
|
11995
11988
|
let g = !1;
|
|
11996
|
-
t.forceInline ? g = !0 : t.forceBlock || (g =
|
|
11997
|
-
const E = b(_(g ? f : An(f).replace(
|
|
11989
|
+
t.forceInline ? g = !0 : t.forceBlock || (g = Tf.test(f) === !1);
|
|
11990
|
+
const E = b(_(g ? f : An(f).replace(Vf, "") + `
|
|
11998
11991
|
|
|
11999
11992
|
`, { inline: g }));
|
|
12000
11993
|
for (; Si(E[E.length - 1]) && !E[E.length - 1].trim(); ) E.pop();
|
|
@@ -12010,12 +12003,12 @@ function rm(e = "", t = {}) {
|
|
|
12010
12003
|
}
|
|
12011
12004
|
function m(f, g) {
|
|
12012
12005
|
if (!g || !g.trim()) return null;
|
|
12013
|
-
const E = g.match(
|
|
12006
|
+
const E = g.match(ef);
|
|
12014
12007
|
return E ? E.reduce(function(C, T) {
|
|
12015
12008
|
const S = T.indexOf("=");
|
|
12016
12009
|
if (S !== -1) {
|
|
12017
12010
|
const x = (function(M) {
|
|
12018
|
-
return M.indexOf("-") !== -1 && M.match(
|
|
12011
|
+
return M.indexOf("-") !== -1 && M.match(gf) === null && (M = M.replace(yf, function(k, D) {
|
|
12019
12012
|
return D.toUpperCase();
|
|
12020
12013
|
})), M;
|
|
12021
12014
|
})(T.slice(0, S)).trim(), w = (function(M) {
|
|
@@ -12054,7 +12047,7 @@ function rm(e = "", t = {}) {
|
|
|
12054
12047
|
return W;
|
|
12055
12048
|
})(D).reduce(function(z, [W, Z]) {
|
|
12056
12049
|
return z[W.replace(/(-[a-z])/g, (R) => R[1].toUpperCase())] = H(Z, M, W), z;
|
|
12057
|
-
}, {}) :
|
|
12050
|
+
}, {}) : Qh.indexOf(k) !== -1 ? H(ot(D), M, k) : (D.match(_f) && (D = ot(D.slice(1, D.length - 1))), D === "true" || D !== "false" && D);
|
|
12058
12051
|
})(f, x, w, r);
|
|
12059
12052
|
typeof N == "string" && (Fr.test(N) || Ur.test(N)) && (C[v] = d(N.trim()));
|
|
12060
12053
|
} else T !== "style" && (C[ui[T] || T] = !0);
|
|
@@ -12062,17 +12055,17 @@ function rm(e = "", t = {}) {
|
|
|
12062
12055
|
}, {}) : null;
|
|
12063
12056
|
}
|
|
12064
12057
|
const u = [], p = {}, h = { 0: { t: [">"], o: lt(fi), i: 1, u(f, g, E) {
|
|
12065
|
-
const [, C, T] = f[0].replace(
|
|
12058
|
+
const [, C, T] = f[0].replace(nf, "").match(rf);
|
|
12066
12059
|
return { alert: C, children: g(T, E) };
|
|
12067
12060
|
}, l(f, g, E) {
|
|
12068
12061
|
const C = { key: E.key };
|
|
12069
12062
|
return f.alert && (C.className = "markdown-alert-" + n(f.alert.toLowerCase(), xn), f.children.unshift({ attrs: {}, children: [{ type: "27", text: f.alert }], noInnerParse: !0, type: "11", tag: "header" })), c("blockquote", C, g(f.children, E));
|
|
12070
|
-
} }, 1: { t: [" "], o: Yn(
|
|
12063
|
+
} }, 1: { t: [" "], o: Yn(of), i: 1, u: $r, l: (f, g, E) => c("br", { key: E.key }) }, 2: { t: ["--", "__", "**", "- ", "* ", "_ "], o: lt(sf), i: 1, u: $r, l: (f, g, E) => c("hr", { key: E.key }) }, 3: { t: [" "], o: lt(pi), i: 0, u: (f) => ({ lang: void 0, text: ot(An(f[0].replace(/^ {4}/gm, ""))) }), l: (f, g, E) => c("pre", { key: E.key }, c("code", Rt({}, f.attrs, { className: f.lang ? "lang-" + f.lang : "" }), f.text)) }, 4: { t: ["```", "~~~"], o: lt(mi), i: 0, u: (f) => ({ attrs: m("code", f[3] || ""), lang: f[2] || void 0, text: f[4], type: "3" }) }, 5: { t: ["`"], o: _t(af), i: 3, u: (f) => ({ text: ot(f[2]) }), l: (f, g, E) => c("code", { key: E.key }, f.text) }, 6: { t: ["[^"], o: lt(df), i: 0, u: (f) => (u.push({ footnote: f[2], identifier: f[1] }), {}), l: zr }, 7: { t: ["[^"], o: At(uf), i: 1, u: (f) => ({ target: "#" + n(f[1], xn), text: f[1] }), l: (f, g, E) => c("a", { key: E.key, href: r(f.target, "a", "href") }, c("sup", { key: E.key }, f.text)) }, 8: { t: ["[ ]", "[x]"], o: At(mf), i: 1, u: (f) => ({ completed: f[1].toLowerCase() === "x" }), l: (f, g, E) => c("input", { checked: f.completed, key: E.key, readOnly: !0, type: "checkbox" }) }, 9: { t: ["#"], o: lt(t.enforceAtxHeadings ? _i : gi), i: 1, u: (f, g, E) => ({ children: Qn(g, f[2], E), id: n(f[2], xn), level: f[1].length }), l: (f, g, E) => c("h" + f.level, { id: f.id, key: E.key }, g(f.children, E)) }, 10: { t: (f) => {
|
|
12071
12064
|
const g = f.indexOf(`
|
|
12072
12065
|
`);
|
|
12073
12066
|
return g > 0 && g < f.length - 1 && (f[g + 1] === "=" || f[g + 1] === "-");
|
|
12074
12067
|
}, o: lt(Ei), i: 1, u: (f, g, E) => ({ children: Qn(g, f[1], E), level: f[2] === "=" ? 1 : 2, type: "9" }) }, 11: { t: ["<"], o: Yn(Fr), i: 1, u(f, g, E) {
|
|
12075
|
-
const [, C] = f[3].match(
|
|
12068
|
+
const [, C] = f[3].match($f), T = RegExp("^" + C, "gm"), S = f[3].replace(T, ""), x = i(l, S) ? em : Qn, w = f[1].toLowerCase(), v = Jh.indexOf(w) !== -1, N = (v ? w : f[1]).trim(), M = { attrs: m(N, f[2]), noInnerParse: v, tag: N };
|
|
12076
12069
|
if (E.inAnchor = E.inAnchor || w === "a", v) M.text = f[3];
|
|
12077
12070
|
else {
|
|
12078
12071
|
const k = E.inHTML;
|
|
@@ -12082,11 +12075,11 @@ function rm(e = "", t = {}) {
|
|
|
12082
12075
|
}, l: (f, g, E) => c(f.tag, Rt({ key: E.key }, f.attrs), f.text || (f.children ? g(f.children, E) : "")) }, 13: { t: ["<"], o: Yn(Ur), i: 1, u(f) {
|
|
12083
12076
|
const g = f[1].trim();
|
|
12084
12077
|
return { attrs: m(g, f[2] || ""), tag: g };
|
|
12085
|
-
}, l: (f, g, E) => c(f.tag, Rt({}, f.attrs, { key: E.key })) }, 12: { t: ["<!--"], o: Yn(bi), i: 1, u: () => ({}), l: zr }, 14: { t: ["!["], o: _t(
|
|
12078
|
+
}, l: (f, g, E) => c(f.tag, Rt({}, f.attrs, { key: E.key })) }, 12: { t: ["<!--"], o: Yn(bi), i: 1, u: () => ({}), l: zr }, 14: { t: ["!["], o: _t(qf), i: 1, u: (f) => ({ alt: ot(f[1]), target: ot(f[2]), title: ot(f[3]) }), l: (f, g, E) => c("img", { key: E.key, alt: f.alt || void 0, title: f.title || void 0, src: r(f.target, "img", "src") }) }, 15: { t: ["["], o: At(Wf), i: 3, u: (f, g, E) => ({ children: Qf(g, f[1], E), target: ot(f[2]), title: ot(f[3]) }), l: (f, g, E) => c("a", { key: E.key, href: r(f.target, "a", "href"), title: f.title }, g(f.children, E)) }, 16: { t: ["<"], o: At(bf), i: 0, u(f) {
|
|
12086
12079
|
let g = f[1], E = !1;
|
|
12087
12080
|
return g.indexOf("@") !== -1 && g.indexOf("//") === -1 && (E = !0, g = g.replace("mailto:", "")), { children: [{ text: g, type: "27" }], target: E ? "mailto:" + g : g, type: "15" };
|
|
12088
|
-
} }, 17: { t: (f, g) => !g.inAnchor && !t.disableAutoLink && (Jn(f, "http://") || Jn(f, "https://")), o: At(
|
|
12089
|
-
`], o: lt(
|
|
12081
|
+
} }, 17: { t: (f, g) => !g.inAnchor && !t.disableAutoLink && (Jn(f, "http://") || Jn(f, "https://")), o: At(Ef), i: 0, u: (f) => ({ children: [{ text: f[1], type: "27" }], target: f[1], title: void 0, type: "15" }) }, 20: vi(c, 1), 33: vi(c, 2), 19: { t: [`
|
|
12082
|
+
`], o: lt(lf), i: 3, u: $r, l: () => `
|
|
12090
12083
|
` }, 21: { o: qt(function(f, g) {
|
|
12091
12084
|
if (g.inline || g.simple || g.inHTML && f.indexOf(`
|
|
12092
12085
|
|
|
@@ -12102,7 +12095,7 @@ function rm(e = "", t = {}) {
|
|
|
12102
12095
|
}
|
|
12103
12096
|
const T = An(E);
|
|
12104
12097
|
return T === "" ? null : [E, , T];
|
|
12105
|
-
}), i: 3, u: Vr, l: (f, g, E) => c("p", { key: E.key }, g(f.children, E)) }, 22: { t: ["["], o: At(
|
|
12098
|
+
}), i: 3, u: Vr, l: (f, g, E) => c("p", { key: E.key }, g(f.children, E)) }, 22: { t: ["["], o: At(Sf), i: 0, u: (f) => (p[f[1]] = { target: f[2], title: f[4] }, {}), l: zr }, 23: { t: ["!["], o: _t(wf), i: 0, u: (f) => ({ alt: f[1] ? ot(f[1]) : void 0, ref: f[2] }), l: (f, g, E) => p[f.ref] ? c("img", { key: E.key, alt: f.alt, src: r(p[f.ref].target, "img", "src"), title: p[f.ref].title }) : null }, 24: { t: (f) => f[0] === "[" && f.indexOf("](") === -1, o: At(Cf), i: 0, u: (f, g, E) => ({ children: g(f[1], E), fallbackChildren: f[0], ref: f[2] }), l: (f, g, E) => p[f.ref] ? c("a", { key: E.key, href: r(p[f.ref].target, "a", "href"), title: p[f.ref].title }, g(f.children, E)) : c("span", { key: E.key }, f.fallbackChildren) }, 25: { t: ["|"], o: lt(yi), i: 1, u: Zf, l(f, g, E) {
|
|
12106
12099
|
const C = f;
|
|
12107
12100
|
return c("table", { key: E.key }, c("thead", null, c("tr", null, C.header.map(function(T, S) {
|
|
12108
12101
|
return c("th", { key: S, style: Ci(C, S) }, g(T, E));
|
|
@@ -12113,14 +12106,14 @@ function rm(e = "", t = {}) {
|
|
|
12113
12106
|
})));
|
|
12114
12107
|
} }, 27: { o: qt(function(f, g) {
|
|
12115
12108
|
let E;
|
|
12116
|
-
return Jn(f, ":") && (E =
|
|
12109
|
+
return Jn(f, ":") && (E = Lf.exec(f)), E || Uf.exec(f);
|
|
12117
12110
|
}), i: 4, u(f) {
|
|
12118
12111
|
const g = f[0];
|
|
12119
|
-
return { text: g.indexOf("&") === -1 ? g : g.replace(
|
|
12120
|
-
}, l: (f) => f.text }, 28: { t: ["**", "__"], o: _t(
|
|
12112
|
+
return { text: g.indexOf("&") === -1 ? g : g.replace(pf, (E, C) => t.namedCodesToUnicode[C] || E) };
|
|
12113
|
+
}, l: (f) => f.text }, 28: { t: ["**", "__"], o: _t(Rf), i: 2, u: (f, g, E) => ({ children: g(f[2], E) }), l: (f, g, E) => c("strong", { key: E.key }, g(f.children, E)) }, 29: { t: (f) => {
|
|
12121
12114
|
const g = f[0];
|
|
12122
12115
|
return (g === "*" || g === "_") && f[1] !== g;
|
|
12123
|
-
}, o: _t(
|
|
12116
|
+
}, o: _t(Mf), i: 3, u: (f, g, E) => ({ children: g(f[2], E) }), l: (f, g, E) => c("em", { key: E.key }, g(f.children, E)) }, 30: { t: ["\\"], o: _t(Df), i: 1, u: (f) => ({ text: f[1], type: "27" }) }, 31: { t: ["=="], o: _t(Of), i: 3, u: Vr, l: (f, g, E) => c("mark", { key: E.key }, g(f.children, E)) }, 32: { t: ["~~"], o: _t(Pf), i: 3, u: Vr, l: (f, g, E) => c("del", { key: E.key }, g(f.children, E)) } };
|
|
12124
12117
|
t.disableParsingRawHTML === !0 && (delete h[11], delete h[13]);
|
|
12125
12118
|
const _ = (function(f) {
|
|
12126
12119
|
var g = Object.keys(f);
|
|
@@ -12128,7 +12121,7 @@ function rm(e = "", t = {}) {
|
|
|
12128
12121
|
var S = [];
|
|
12129
12122
|
if (T.prevCapture = T.prevCapture || "", C.trim()) for (; C; ) for (var x = 0; x < g.length; ) {
|
|
12130
12123
|
var w = g[x], v = f[w];
|
|
12131
|
-
if (!v.t ||
|
|
12124
|
+
if (!v.t || Yf(C, T, v.t)) {
|
|
12132
12125
|
var N = v.o(C, T);
|
|
12133
12126
|
if (N && N[0]) {
|
|
12134
12127
|
C = C.substring(N[0].length);
|
|
@@ -12145,8 +12138,8 @@ function rm(e = "", t = {}) {
|
|
|
12145
12138
|
return f[C].i - f[T].i || (C < T ? -1 : 1);
|
|
12146
12139
|
}), function(C, T) {
|
|
12147
12140
|
return E((function(S) {
|
|
12148
|
-
return S.replace(
|
|
12149
|
-
`).replace(
|
|
12141
|
+
return S.replace(cf, `
|
|
12142
|
+
`).replace(hf, "").replace(xf, " ");
|
|
12150
12143
|
})(C), T);
|
|
12151
12144
|
};
|
|
12152
12145
|
})(h), b = /* @__PURE__ */ (function(f, g) {
|
|
@@ -12171,32 +12164,32 @@ function rm(e = "", t = {}) {
|
|
|
12171
12164
|
return c("div", { id: n(f.identifier, xn), key: f.identifier }, f.identifier, b(_(f.footnote, { inline: !0 })));
|
|
12172
12165
|
}))) : y;
|
|
12173
12166
|
}
|
|
12174
|
-
const
|
|
12167
|
+
const rm = (e) => {
|
|
12175
12168
|
let { children: t, options: n } = e, r = (function(o, s) {
|
|
12176
12169
|
if (o == null) return {};
|
|
12177
12170
|
var l, i, c = {}, d = Object.keys(o);
|
|
12178
12171
|
for (i = 0; i < d.length; i++) s.indexOf(l = d[i]) >= 0 || (c[l] = o[l]);
|
|
12179
12172
|
return c;
|
|
12180
|
-
})(e,
|
|
12181
|
-
return vt(
|
|
12182
|
-
},
|
|
12173
|
+
})(e, Xh);
|
|
12174
|
+
return vt(nm(t ?? "", n), r);
|
|
12175
|
+
}, om = {
|
|
12183
12176
|
disableParsingRawHTML: !0,
|
|
12184
12177
|
forceBlock: !0
|
|
12185
12178
|
};
|
|
12186
12179
|
function no({ children: e }) {
|
|
12187
|
-
return /* @__PURE__ */ a(
|
|
12180
|
+
return /* @__PURE__ */ a(rm, { options: om, children: e });
|
|
12188
12181
|
}
|
|
12189
|
-
const
|
|
12190
|
-
() => Promise.resolve().then(() =>
|
|
12191
|
-
),
|
|
12182
|
+
const sm = ze(
|
|
12183
|
+
() => Promise.resolve().then(() => fm).then((e) => ({ default: e.Pills }))
|
|
12184
|
+
), im = ze(
|
|
12192
12185
|
() => import("./medassist-widget-MultiSelect-BnExX-Ty.js").then((e) => ({ default: e.MultiSelectGroup }))
|
|
12193
|
-
),
|
|
12186
|
+
), am = ze(
|
|
12194
12187
|
() => import("./medassist-widget-FocusCarousel-BsLIZftX.js").then((e) => ({ default: e.FocusCarousel }))
|
|
12188
|
+
), lm = ze(
|
|
12189
|
+
() => import("./medassist-widget-DoctorCard-DH9Bk806.js").then((e) => ({ default: e.DoctorCard }))
|
|
12195
12190
|
), cm = ze(
|
|
12196
|
-
() => import("./medassist-widget-DoctorCard-H-PKOqlH.js").then((e) => ({ default: e.DoctorCard }))
|
|
12197
|
-
), dm = ze(
|
|
12198
12191
|
() => import("./medassist-widget-CardList-CYHOG9Tn.js").then((e) => ({ default: e.CardList }))
|
|
12199
|
-
),
|
|
12192
|
+
), dm = ze(
|
|
12200
12193
|
() => import("./medassist-widget-MediaCard-yhz2Z0ZQ.js").then((e) => ({ default: e.MediaCard }))
|
|
12201
12194
|
);
|
|
12202
12195
|
function Ae({ className: e }) {
|
|
@@ -12278,7 +12271,7 @@ function $t({ variant: e }) {
|
|
|
12278
12271
|
function Kn() {
|
|
12279
12272
|
return /* @__PURE__ */ a("style", { children: "@keyframes shimmer { 100% { transform: translateX(100%); } }" });
|
|
12280
12273
|
}
|
|
12281
|
-
function
|
|
12274
|
+
function um({
|
|
12282
12275
|
messageId: e,
|
|
12283
12276
|
tool_key: t,
|
|
12284
12277
|
entry: n,
|
|
@@ -12341,7 +12334,7 @@ function hm({
|
|
|
12341
12334
|
return /* @__PURE__ */ a("div", { className: "flex justify-end", children: [
|
|
12342
12335
|
S && /* @__PURE__ */ a(Re, { fallback: /* @__PURE__ */ a($t, { variant: "pill" }), children: /* @__PURE__ */ a("div", { className: `flex ${S.length > 3 ? "flex-col" : "flex-wrap"} gap-2 mt-3`, children: [
|
|
12343
12336
|
S.slice(0, u).map((v, N) => /* @__PURE__ */ a(
|
|
12344
|
-
|
|
12337
|
+
sm,
|
|
12345
12338
|
{
|
|
12346
12339
|
disabled: _ || o || d,
|
|
12347
12340
|
text: v?.label || "",
|
|
@@ -12374,7 +12367,7 @@ function hm({
|
|
|
12374
12367
|
h === O.SYNAPSE_COMPONENTS.MULTI && b?.options && /* @__PURE__ */ a(Re, { fallback: /* @__PURE__ */ a($t, { variant: "input" }), children: /* @__PURE__ */ a("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: [
|
|
12375
12368
|
/* @__PURE__ */ a("h3", { className: "text-xs font-medium text-muted-foreground mb-2", children: "Select multiple options:" }),
|
|
12376
12369
|
/* @__PURE__ */ a(
|
|
12377
|
-
|
|
12370
|
+
im,
|
|
12378
12371
|
{
|
|
12379
12372
|
options: C(),
|
|
12380
12373
|
selectedValues: s,
|
|
@@ -12398,7 +12391,7 @@ function hm({
|
|
|
12398
12391
|
)
|
|
12399
12392
|
] }) }),
|
|
12400
12393
|
T && T.length > 0 ? /* @__PURE__ */ a(Re, { fallback: /* @__PURE__ */ a($t, { variant: "card" }), children: /* @__PURE__ */ a(
|
|
12401
|
-
|
|
12394
|
+
am,
|
|
12402
12395
|
{
|
|
12403
12396
|
count: T.length > 1 ? T.length + 1 : T.length,
|
|
12404
12397
|
renderItem: (v, N) => {
|
|
@@ -12431,7 +12424,7 @@ function hm({
|
|
|
12431
12424
|
);
|
|
12432
12425
|
const M = T[v];
|
|
12433
12426
|
return /* @__PURE__ */ a(Re, { fallback: /* @__PURE__ */ a($t, { variant: "card" }), children: /* @__PURE__ */ a(
|
|
12434
|
-
|
|
12427
|
+
lm,
|
|
12435
12428
|
{
|
|
12436
12429
|
doctor: M,
|
|
12437
12430
|
doctorDetails: i?.[M.doctor_id],
|
|
@@ -12444,7 +12437,7 @@ function hm({
|
|
|
12444
12437
|
}
|
|
12445
12438
|
) }) : null,
|
|
12446
12439
|
x && /* @__PURE__ */ a(Re, { fallback: /* @__PURE__ */ a($t, { variant: "card" }), children: /* @__PURE__ */ a(
|
|
12447
|
-
|
|
12440
|
+
cm,
|
|
12448
12441
|
{
|
|
12449
12442
|
cards: x,
|
|
12450
12443
|
onSelect: async (v) => {
|
|
@@ -12459,10 +12452,10 @@ function hm({
|
|
|
12459
12452
|
disabled: _ || o
|
|
12460
12453
|
}
|
|
12461
12454
|
) }),
|
|
12462
|
-
w && /* @__PURE__ */ a(Re, { fallback: /* @__PURE__ */ a($t, { variant: "media" }), children: /* @__PURE__ */ a("div", { className: "mt-3", children: /* @__PURE__ */ a(
|
|
12455
|
+
w && /* @__PURE__ */ a(Re, { fallback: /* @__PURE__ */ a($t, { variant: "media" }), children: /* @__PURE__ */ a("div", { className: "mt-3", children: /* @__PURE__ */ a(dm, { card: w }) }) })
|
|
12463
12456
|
] });
|
|
12464
12457
|
}
|
|
12465
|
-
function
|
|
12458
|
+
function hm({
|
|
12466
12459
|
id: e,
|
|
12467
12460
|
role: t,
|
|
12468
12461
|
content: n,
|
|
@@ -12583,7 +12576,7 @@ function fm({
|
|
|
12583
12576
|
l?.map((S) => {
|
|
12584
12577
|
const x = c[S];
|
|
12585
12578
|
return x ? /* @__PURE__ */ a(
|
|
12586
|
-
|
|
12579
|
+
um,
|
|
12587
12580
|
{
|
|
12588
12581
|
messageId: e,
|
|
12589
12582
|
tool_key: S,
|
|
@@ -12721,8 +12714,8 @@ function Sl({
|
|
|
12721
12714
|
}
|
|
12722
12715
|
) : null;
|
|
12723
12716
|
}
|
|
12724
|
-
const
|
|
12725
|
-
function
|
|
12717
|
+
const fm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, Pills: Sl }, Symbol.toStringTag, { value: "Module" }));
|
|
12718
|
+
function mm({
|
|
12726
12719
|
text: e,
|
|
12727
12720
|
suggestions: t,
|
|
12728
12721
|
onSendMessage: n,
|
|
@@ -12784,7 +12777,7 @@ function pm({
|
|
|
12784
12777
|
) })
|
|
12785
12778
|
] });
|
|
12786
12779
|
}
|
|
12787
|
-
function
|
|
12780
|
+
function pm({
|
|
12788
12781
|
messages: e,
|
|
12789
12782
|
onSendMessage: t,
|
|
12790
12783
|
onToggleFeedback: n,
|
|
@@ -12796,7 +12789,7 @@ function gm({
|
|
|
12796
12789
|
}) {
|
|
12797
12790
|
const c = oe((h) => h.isWaitingForResponse), d = oe((h) => h.connectionStatus), m = oe((h) => h.elicitationState), u = d === ke.CONNECTED, p = oe((h) => h.progressMessage);
|
|
12798
12791
|
return e.length === 0 && !p ? /* @__PURE__ */ a(
|
|
12799
|
-
|
|
12792
|
+
mm,
|
|
12800
12793
|
{
|
|
12801
12794
|
text: l?.text,
|
|
12802
12795
|
suggestions: l?.suggestions,
|
|
@@ -12813,7 +12806,7 @@ function gm({
|
|
|
12813
12806
|
"data-message-id": h.id,
|
|
12814
12807
|
id: _ === e.length - 1 ? "last-message" : void 0,
|
|
12815
12808
|
children: /* @__PURE__ */ a(
|
|
12816
|
-
|
|
12809
|
+
hm,
|
|
12817
12810
|
{
|
|
12818
12811
|
id: h.id,
|
|
12819
12812
|
role: h.role,
|
|
@@ -12837,10 +12830,10 @@ function gm({
|
|
|
12837
12830
|
},
|
|
12838
12831
|
h.id
|
|
12839
12832
|
)) }),
|
|
12840
|
-
c && /* @__PURE__ */ a(
|
|
12833
|
+
c && /* @__PURE__ */ a(gm, {})
|
|
12841
12834
|
] });
|
|
12842
12835
|
}
|
|
12843
|
-
function
|
|
12836
|
+
function gm() {
|
|
12844
12837
|
return /* @__PURE__ */ a("div", { className: "animate-slideUp", children: /* @__PURE__ */ a("div", { className: "flex justify-start", children: /* @__PURE__ */ a("div", { className: "flex gap-3", children: /* @__PURE__ */ a(Wt, { className: "px-4 py-2 rounded-lg shadow-none bg-botMessage backdrop-blur-sm text-text-primary shadow-sm", children: /* @__PURE__ */ a(
|
|
12845
12838
|
"div",
|
|
12846
12839
|
{
|
|
@@ -12937,8 +12930,8 @@ function Ti({
|
|
|
12937
12930
|
}
|
|
12938
12931
|
);
|
|
12939
12932
|
}
|
|
12940
|
-
const
|
|
12941
|
-
function
|
|
12933
|
+
const _m = ze(() => import("./medassist-widget-VoiceAgentScreen-BK0p37RC.js"));
|
|
12934
|
+
function Em({
|
|
12942
12935
|
isOpen: e,
|
|
12943
12936
|
agentId: t,
|
|
12944
12937
|
config: n
|
|
@@ -12982,7 +12975,7 @@ function bm({
|
|
|
12982
12975
|
handleSessionFeedbackSkip: J,
|
|
12983
12976
|
handleDontShowAgain: ee,
|
|
12984
12977
|
handleCloseModal: se
|
|
12985
|
-
} =
|
|
12978
|
+
} = Zh({ isOpen: e, agentId: t, config: n });
|
|
12986
12979
|
$(() => {
|
|
12987
12980
|
C.length || N("auto");
|
|
12988
12981
|
}, [C.length, N]);
|
|
@@ -13049,7 +13042,7 @@ function bm({
|
|
|
13049
13042
|
}
|
|
13050
13043
|
) : void 0,
|
|
13051
13044
|
children: z ? /* @__PURE__ */ a(Re, { fallback: /* @__PURE__ */ a(xi, {}), children: /* @__PURE__ */ a(
|
|
13052
|
-
|
|
13045
|
+
_m,
|
|
13053
13046
|
{
|
|
13054
13047
|
state: D,
|
|
13055
13048
|
isMuted: H,
|
|
@@ -13082,7 +13075,7 @@ function bm({
|
|
|
13082
13075
|
g && /* @__PURE__ */ a("div", { className: "text-xs text-[var(--color-muted-foreground)] text-center mb-2", children: "Just now" }),
|
|
13083
13076
|
!g && /* @__PURE__ */ a("div", { className: "text-xs text-[var(--color-muted-foreground)] text-center", children: Ce }),
|
|
13084
13077
|
/* @__PURE__ */ a(Re, { fallback: /* @__PURE__ */ a(Gu, {}), children: /* @__PURE__ */ a(
|
|
13085
|
-
|
|
13078
|
+
pm,
|
|
13086
13079
|
{
|
|
13087
13080
|
messages: C,
|
|
13088
13081
|
onSendMessage: T,
|
|
@@ -13146,7 +13139,7 @@ function ro(e) {
|
|
|
13146
13139
|
return new Error("Unknown error");
|
|
13147
13140
|
}
|
|
13148
13141
|
}
|
|
13149
|
-
class
|
|
13142
|
+
class bm extends Ye {
|
|
13150
13143
|
state = { error: null };
|
|
13151
13144
|
static getDerivedStateFromError(t) {
|
|
13152
13145
|
return { error: ro(t) };
|
|
@@ -13156,7 +13149,7 @@ class ym extends Ye {
|
|
|
13156
13149
|
}
|
|
13157
13150
|
render() {
|
|
13158
13151
|
return this.state.error ? /* @__PURE__ */ a(
|
|
13159
|
-
|
|
13152
|
+
Sm,
|
|
13160
13153
|
{
|
|
13161
13154
|
error: this.state.error,
|
|
13162
13155
|
componentStack: this.state.componentStack,
|
|
@@ -13172,10 +13165,10 @@ class ym extends Ye {
|
|
|
13172
13165
|
) : this.props.children;
|
|
13173
13166
|
}
|
|
13174
13167
|
}
|
|
13175
|
-
function
|
|
13168
|
+
function ym({ error: e }) {
|
|
13176
13169
|
throw e;
|
|
13177
13170
|
}
|
|
13178
|
-
function
|
|
13171
|
+
function vm(e) {
|
|
13179
13172
|
const [t, n] = F(null);
|
|
13180
13173
|
return $(() => {
|
|
13181
13174
|
if (typeof window > "u") return;
|
|
@@ -13187,9 +13180,9 @@ function Sm(e) {
|
|
|
13187
13180
|
return window.addEventListener("error", r), window.addEventListener("unhandledrejection", o), () => {
|
|
13188
13181
|
window.removeEventListener("error", r), window.removeEventListener("unhandledrejection", o);
|
|
13189
13182
|
};
|
|
13190
|
-
}, []), /* @__PURE__ */ a(
|
|
13183
|
+
}, []), /* @__PURE__ */ a(bm, { ...e, children: t ? /* @__PURE__ */ a(ym, { error: t }) : e.children });
|
|
13191
13184
|
}
|
|
13192
|
-
function
|
|
13185
|
+
function Sm({
|
|
13193
13186
|
error: e,
|
|
13194
13187
|
title: t,
|
|
13195
13188
|
titleImg: n,
|
|
@@ -13257,7 +13250,7 @@ function wm({
|
|
|
13257
13250
|
}
|
|
13258
13251
|
);
|
|
13259
13252
|
}
|
|
13260
|
-
function
|
|
13253
|
+
function wm({ agentId: e, config: t }) {
|
|
13261
13254
|
const [n, r] = F(!1);
|
|
13262
13255
|
$(() => {
|
|
13263
13256
|
r(!0);
|
|
@@ -13266,7 +13259,7 @@ function Cm({ agentId: e, config: t }) {
|
|
|
13266
13259
|
r(!1), t?.onClose?.();
|
|
13267
13260
|
};
|
|
13268
13261
|
return /* @__PURE__ */ a(
|
|
13269
|
-
|
|
13262
|
+
vm,
|
|
13270
13263
|
{
|
|
13271
13264
|
title: t.title ?? "Medi Clinic",
|
|
13272
13265
|
titleImg: t.theme?.titleImg,
|
|
@@ -13277,7 +13270,7 @@ function Cm({ agentId: e, config: t }) {
|
|
|
13277
13270
|
displayMode: t.displayMode,
|
|
13278
13271
|
theme: t.theme,
|
|
13279
13272
|
children: /* @__PURE__ */ a(vu, { children: /* @__PURE__ */ a(
|
|
13280
|
-
|
|
13273
|
+
Em,
|
|
13281
13274
|
{
|
|
13282
13275
|
isOpen: n,
|
|
13283
13276
|
agentId: e,
|
|
@@ -13294,13 +13287,13 @@ function Cm({ agentId: e, config: t }) {
|
|
|
13294
13287
|
}
|
|
13295
13288
|
);
|
|
13296
13289
|
}
|
|
13297
|
-
const
|
|
13290
|
+
const Cm = (e, t, n) => {
|
|
13298
13291
|
const r = n || {}, o = Wl(e);
|
|
13299
13292
|
return o.render(
|
|
13300
|
-
/* @__PURE__ */ a(_e, { children: /* @__PURE__ */ a(
|
|
13293
|
+
/* @__PURE__ */ a(_e, { children: /* @__PURE__ */ a(wm, { agentId: t, config: r }) })
|
|
13301
13294
|
), o;
|
|
13302
13295
|
};
|
|
13303
|
-
typeof window < "u" && (window.renderMedAssist =
|
|
13296
|
+
typeof window < "u" && (window.renderMedAssist = Cm);
|
|
13304
13297
|
export {
|
|
13305
13298
|
Y as A,
|
|
13306
13299
|
le as B,
|
|
@@ -13324,20 +13317,20 @@ export {
|
|
|
13324
13317
|
Pt as g,
|
|
13325
13318
|
Mt as h,
|
|
13326
13319
|
L as i,
|
|
13327
|
-
|
|
13320
|
+
Fm as j,
|
|
13328
13321
|
Tu as k,
|
|
13329
13322
|
ol as l,
|
|
13330
13323
|
oh as m,
|
|
13331
13324
|
sl as n,
|
|
13332
|
-
|
|
13325
|
+
Dm as o,
|
|
13333
13326
|
ku as p,
|
|
13334
13327
|
de as q,
|
|
13335
13328
|
no as r,
|
|
13336
|
-
|
|
13337
|
-
|
|
13329
|
+
Cm as renderMedAssist,
|
|
13330
|
+
Vm as s,
|
|
13338
13331
|
Wt as t,
|
|
13339
13332
|
a as u,
|
|
13340
|
-
|
|
13333
|
+
Um as v,
|
|
13341
13334
|
xu as w,
|
|
13342
13335
|
Iu as x,
|
|
13343
13336
|
$ as y
|