@schmitech/chatbot-widget 0.7.0 → 0.7.1
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/{_baseUniq-BRKsqoH--HqBVqMpT.js → _baseUniq-BRKsqoH--cJt5J7YH.js} +1 -1
- package/dist/{arc-pab_su9s-DkImmxyv.js → arc-pab_su9s-BirE34mY.js} +1 -1
- package/dist/{architecture-U656AL7Q-CRlU-eNB-vFayp_Gk.js → architecture-U656AL7Q-CRlU-eNB-1S_uQTlo.js} +2 -2
- package/dist/{architectureDiagram-VXUJARFQ-DqQ8r_6g-DTzMoAeY.js → architectureDiagram-VXUJARFQ-DqQ8r_6g-BGDHAvyW.js} +3 -3
- package/dist/{blockDiagram-VD42YOAC-B-dKfcH3-DKPGmrNb.js → blockDiagram-VD42YOAC-B-dKfcH3-DaStMME0.js} +5 -5
- package/dist/{c4Diagram-YG6GDRKO-DMUPaBEl-CXjiCiKq.js → c4Diagram-YG6GDRKO-DMUPaBEl-RL9QFIcf.js} +2 -2
- package/dist/{channel-HKsfPa5q-B30_3C0d.js → channel-HKsfPa5q-rUwqiYOY.js} +1 -1
- package/dist/chatbot-widget.bundle.js +1 -1
- package/dist/chatbot-widget.es.js +1 -1
- package/dist/chatbot-widget.umd.js +1 -1
- package/dist/{chunk-4BX2VUAB-CX67kh_B-JdLaNmBY.js → chunk-4BX2VUAB-CX67kh_B-CLieQV3-.js} +1 -1
- package/dist/{chunk-55IACEB6-BocSyyvr--btUJ1po.js → chunk-55IACEB6-BocSyyvr-Bn-f_OLg.js} +1 -1
- package/dist/{chunk-B4BG7PRW-CO8QAyfE-p5mLBzD4.js → chunk-B4BG7PRW-CO8QAyfE-BfAVnqXP.js} +4 -4
- package/dist/{chunk-DI55MBZ5-Dw1L6Eos-zQC2oI_e.js → chunk-DI55MBZ5-Dw1L6Eos-DheizR5C.js} +3 -3
- package/dist/{chunk-FMBD7UC4-dPK7Boav-C-fxYlU9.js → chunk-FMBD7UC4-dPK7Boav-X2pgY3eu.js} +1 -1
- package/dist/{chunk-QN33PNHL-vP2PqfVG-ByquTp49.js → chunk-QN33PNHL-vP2PqfVG-DTvnGeUa.js} +1 -1
- package/dist/{chunk-QZHKN3VN-Bcidzu63-ukwvi4Mt.js → chunk-QZHKN3VN-Bcidzu63-CGZ1okvp.js} +1 -1
- package/dist/{chunk-TZMSLE5B-BtljMjlg-DP4v1MME.js → chunk-TZMSLE5B-BtljMjlg-CCe_2ap3.js} +1 -1
- package/dist/{classDiagram-2ON5EDUG-C7cYN9hv-CtX4c_16.js → classDiagram-2ON5EDUG-C7cYN9hv-BeaaxMuB.js} +2 -2
- package/dist/{classDiagram-v2-WZHVMYZB-C7cYN9hv-CtX4c_16.js → classDiagram-v2-WZHVMYZB-C7cYN9hv-BeaaxMuB.js} +2 -2
- package/dist/{clone-DoPb9X13-BkFPVisk.js → clone-DoPb9X13-Cp9Sb7vH.js} +1 -1
- package/dist/{cose-bilkent-S5V4N54A-BGzO4EsH-BNoSF82N.js → cose-bilkent-S5V4N54A-BGzO4EsH-BIqQATFG.js} +1 -1
- package/dist/{dagre-6UL2VRFP-TzNvXCds-Dnr2OGZv.js → dagre-6UL2VRFP-TzNvXCds-DO9etu6a.js} +5 -5
- package/dist/{diagram-PSM6KHXK-BqY4RpUg-BAHxSfLA.js → diagram-PSM6KHXK-BqY4RpUg-DBkV5b1N.js} +4 -4
- package/dist/{diagram-QEK2KX5R-CTjgBsne-D-9APhrR.js → diagram-QEK2KX5R-CTjgBsne-BBBP6X3G.js} +3 -3
- package/dist/{diagram-S2PKOQOG-BqrhTIpA-DvsAaFEx.js → diagram-S2PKOQOG-BqrhTIpA-Bc4JlHqz.js} +3 -3
- package/dist/{erDiagram-Q2GNP2WA-B2hsi_Tl-CQQl2KTS.js → erDiagram-Q2GNP2WA-B2hsi_Tl-C8AfncCT.js} +4 -4
- package/dist/{flowDiagram-NV44I4VS-C03vtt_F-Ds5DxRz1.js → flowDiagram-NV44I4VS-C03vtt_F-Cnb6mZDn.js} +5 -5
- package/dist/{ganttDiagram-JELNMOA3-B3hAg964-D9cHQTuZ.js → ganttDiagram-JELNMOA3-B3hAg964-CsXP-ZfX.js} +1 -1
- package/dist/gitGraph-F6HP7TQM-B-XXB6PA-FzT22ERc.js +7 -0
- package/dist/{gitGraphDiagram-NY62KEGX-ByhMH0yZ-DTWIR_Gp.js → gitGraphDiagram-NY62KEGX-ByhMH0yZ-3PgSj0Tb.js} +4 -4
- package/dist/{graph-BmNkcFEM-CTJN7Ty_.js → graph-BmNkcFEM-C-GbdoDL.js} +2 -2
- package/dist/{index-DU3Jqd59.js → index-BTpDcWCv.js} +35 -36
- package/dist/{index-BXexqYFc-Bn0M0HQB.js → index-BXexqYFc-CRArh8Cq.js} +1 -1
- package/dist/info-NVLQJR56-BJV_yXNb-Aq64Skam.js +7 -0
- package/dist/{infoDiagram-WHAUD3N6-is6Ho4-T-E3qEjHYs.js → infoDiagram-WHAUD3N6-is6Ho4-T-DErGnjwz.js} +2 -2
- package/dist/{journeyDiagram-XKPGCS4Q-CRTOL26C-VvuJ7JPc.js → journeyDiagram-XKPGCS4Q-CRTOL26C-B8qQBlFd.js} +4 -4
- package/dist/{kanban-definition-3W4ZIXB7-CNnO_t6O-BsqhwZAY.js → kanban-definition-3W4ZIXB7-CNnO_t6O-BGvvlkNc.js} +2 -2
- package/dist/{layout-C0kZPebx-CrIgKtBd.js → layout-C0kZPebx-D44PzJfR.js} +4 -4
- package/dist/{mermaid-parser.core-C88_DDui-CHG6v5qB.js → mermaid-parser.core-C88_DDui-B7IhiBVD.js} +10 -10
- package/dist/{min-7Gb0pNxh-Cd_K7Lpk.js → min-7Gb0pNxh-CFulbqFI.js} +2 -2
- package/dist/{mindmap-definition-VGOIOE7T-CJZ2wTTa-D4yK-MK1.js → mindmap-definition-VGOIOE7T-CJZ2wTTa-DPoRn8c0.js} +3 -3
- package/dist/packet-BFZMPI3H-DPt2EftX-CXYjDFrz.js +7 -0
- package/dist/pie-7BOR55EZ-aEOtXZZV-FRF2gFk3.js +7 -0
- package/dist/{pieDiagram-ADFJNKIX-C9OSknjr-DguaGmOm.js → pieDiagram-ADFJNKIX-C9OSknjr-BFY3_6Oo.js} +4 -4
- package/dist/{quadrantDiagram-AYHSOK5B-CW8yuAqv-Dp9c_xnT.js → quadrantDiagram-AYHSOK5B-CW8yuAqv-DcPydd0t.js} +1 -1
- package/dist/radar-NHE76QYJ-Dv7iPziq-DrVK1spY.js +7 -0
- package/dist/{requirementDiagram-UZGBJVZJ-nGPhruO1-DINXeP9u.js → requirementDiagram-UZGBJVZJ-nGPhruO1-CKB0p28g.js} +3 -3
- package/dist/{sankeyDiagram-TZEHDZUN-CmL90u-m-YTiy7xgb.js → sankeyDiagram-TZEHDZUN-CmL90u-m-DDFcX8hI.js} +1 -1
- package/dist/{sequenceDiagram-WL72ISMW-B02VRcnM-B0n6W8Zi.js → sequenceDiagram-WL72ISMW-B02VRcnM-Dg0Q-6FH.js} +3 -3
- package/dist/{stateDiagram-FKZM4ZOC-DjoyLUdz-BEUNa8-U.js → stateDiagram-FKZM4ZOC-DjoyLUdz-RR_i3b6W.js} +4 -4
- package/dist/{stateDiagram-v2-4FDKWEC3-Bq76BTB7-DJxNsvnB.js → stateDiagram-v2-4FDKWEC3-Bq76BTB7-D41BAi03.js} +2 -2
- package/dist/{timeline-definition-IT6M3QCI-CTn0Gm3T-sHrk-A3B.js → timeline-definition-IT6M3QCI-CTn0Gm3T-B70bEeJw.js} +2 -2
- package/dist/treemap-KMMF4GRG-BjgLKKyi-gbF_aEUU.js +7 -0
- package/dist/{xychartDiagram-PRI3JC2R-Cgg6Uija-BysdxdV7.js → xychartDiagram-PRI3JC2R-Cgg6Uija-xZvNGZ4K.js} +1 -1
- package/package.json +1 -1
- package/dist/gitGraph-F6HP7TQM-B-XXB6PA-CXOJho2m.js +0 -7
- package/dist/info-NVLQJR56-BJV_yXNb-CH_hMh0K.js +0 -7
- package/dist/packet-BFZMPI3H-DPt2EftX-Bgsdgnv-.js +0 -7
- package/dist/pie-7BOR55EZ-aEOtXZZV-CT0TLfil.js +0 -7
- package/dist/radar-NHE76QYJ-Dv7iPziq-DzohugO5.js +0 -7
- package/dist/treemap-KMMF4GRG-BjgLKKyi-CXHyJ_sr.js +0 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aS as Q, bH as ir, bI as cr, aK as h, aL as U, bJ as L, bK as lr, aO as sr, by as k, br as P, bL as vr, bM as br, aP as hr, bN as V, bn as N, bo as T, bO as gr, bw as _, aG as pr, bP as x, bQ as dr, aT as yr } from "./index-
|
|
1
|
+
import { aS as Q, bH as ir, bI as cr, aK as h, aL as U, bJ as L, bK as lr, aO as sr, by as k, br as P, bL as vr, bM as br, aP as hr, bN as V, bn as N, bo as T, bO as gr, bw as _, aG as pr, bP as x, bQ as dr, aT as yr } from "./index-BTpDcWCv.js";
|
|
2
2
|
typeof window < "u" && (window.global = window);
|
|
3
3
|
var jr = "[object Symbol]";
|
|
4
4
|
function B(r) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a$ as on, b0 as an, b1 as l, ar as sn, b2 as _, b3 as w, b4 as E, b5 as un, b6 as cn, b7 as S, b8 as e, ap as D, b9 as en, ba as rn, bb as yn } from "./index-
|
|
1
|
+
import { a$ as on, b0 as an, b1 as l, ar as sn, b2 as _, b3 as w, b4 as E, b5 as un, b6 as cn, b7 as S, b8 as e, ap as D, b9 as en, ba as rn, bb as yn } from "./index-BTpDcWCv.js";
|
|
2
2
|
typeof window < "u" && (window.global = window);
|
|
3
3
|
function fn(o) {
|
|
4
4
|
return o.innerRadius;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as o } from "./mermaid-parser.core-C88_DDui-
|
|
2
|
-
import { k as t } from "./mermaid-parser.core-C88_DDui-
|
|
1
|
+
import { N as o } from "./mermaid-parser.core-C88_DDui-B7IhiBVD.js";
|
|
2
|
+
import { k as t } from "./mermaid-parser.core-C88_DDui-B7IhiBVD.js";
|
|
3
3
|
typeof window < "u" && (window.global = window);
|
|
4
4
|
export {
|
|
5
5
|
t as ArchitectureModule,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { M as pt, al as ze, aW as Ve, a as De, h as je, g as $e, s as qe, t as Qe, f as Ke, e as Ze, N as Je, K as ti, _ as ei, P as ii, C as ve, bf as me, bB as ce, j as ri, d as ni, E as oi, bC as ai, bD as si, y as hi } from "./index-
|
|
2
|
-
import { m as li } from "./chunk-4BX2VUAB-CX67kh_B-
|
|
3
|
-
import { j as di } from "./mermaid-parser.core-C88_DDui-
|
|
1
|
+
import { M as pt, al as ze, aW as Ve, a as De, h as je, g as $e, s as qe, t as Qe, f as Ke, e as Ze, N as Je, K as ti, _ as ei, P as ii, C as ve, bf as me, bB as ce, j as ri, d as ni, E as oi, bC as ai, bD as si, y as hi } from "./index-BTpDcWCv.js";
|
|
2
|
+
import { m as li } from "./chunk-4BX2VUAB-CX67kh_B-CLieQV3-.js";
|
|
3
|
+
import { j as di } from "./mermaid-parser.core-C88_DDui-B7IhiBVD.js";
|
|
4
4
|
import { e as Re } from "./cytoscape.esm-CjI2IsL8-Be2K4mI6.js";
|
|
5
5
|
typeof window < "u" && (window.global = window);
|
|
6
6
|
var ge = { exports: {} }, ue = { exports: {} }, fe = { exports: {} }, ci = fe.exports, Le;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { l as ce } from "./chunk-FMBD7UC4-dPK7Boav-
|
|
2
|
-
import { M as g, P as at, d as B, i as he, a as w, N as ue, I as ge, bd as ye, av as pe, aC as be, C as z, az as xe, be as G, bf as Wt, v as fe, r as tt, m as me, bg as we, bh as bt, j as xt, bi as Le } from "./index-
|
|
3
|
-
import { a as Se } from "./clone-DoPb9X13-
|
|
4
|
-
import { Q as ke } from "./graph-BmNkcFEM-
|
|
5
|
-
import { t as _e } from "./channel-HKsfPa5q-
|
|
1
|
+
import { l as ce } from "./chunk-FMBD7UC4-dPK7Boav-X2pgY3eu.js";
|
|
2
|
+
import { M as g, P as at, d as B, i as he, a as w, N as ue, I as ge, bd as ye, av as pe, aC as be, C as z, az as xe, be as G, bf as Wt, v as fe, r as tt, m as me, bg as we, bh as bt, j as xt, bi as Le } from "./index-BTpDcWCv.js";
|
|
3
|
+
import { a as Se } from "./clone-DoPb9X13-Cp9Sb7vH.js";
|
|
4
|
+
import { Q as ke } from "./graph-BmNkcFEM-C-GbdoDL.js";
|
|
5
|
+
import { t as _e } from "./channel-HKsfPa5q-rUwqiYOY.js";
|
|
6
6
|
typeof window < "u" && (window.global = window);
|
|
7
7
|
var ft = function() {
|
|
8
8
|
var e = /* @__PURE__ */ g(function(D, c, p, f) {
|
package/dist/{c4Diagram-YG6GDRKO-DMUPaBEl-CXjiCiKq.js → c4Diagram-YG6GDRKO-DMUPaBEl-RL9QFIcf.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { y as ve, x as Re } from "./chunk-TZMSLE5B-BtljMjlg-
|
|
2
|
-
import { e as De, f as Pe, g as Ne, h as Be, M as g, C as Rt, d as jt, a as de, i as Me, F as je, V as wt, j as fe, k as Le, l as Ye, m as Jt, n as ue } from "./index-
|
|
1
|
+
import { y as ve, x as Re } from "./chunk-TZMSLE5B-BtljMjlg-CCe_2ap3.js";
|
|
2
|
+
import { e as De, f as Pe, g as Ne, h as Be, M as g, C as Rt, d as jt, a as de, i as Me, F as je, V as wt, j as fe, k as Le, l as Ye, m as Jt, n as ue } from "./index-BTpDcWCv.js";
|
|
3
3
|
typeof window < "u" && (window.global = window);
|
|
4
4
|
var Yt = function() {
|
|
5
5
|
var e = /* @__PURE__ */ g(function(z, _, x, b) {
|
|
@@ -9184,7 +9184,7 @@ Take a look at the reducer(s) handling this action type: ${g.type}.
|
|
|
9184
9184
|
to { transform: rotate(360deg); }
|
|
9185
9185
|
}
|
|
9186
9186
|
`})]}),pt.jsx("div",{ref:t,style:{display:"flex",justifyContent:"center",overflow:"auto"}})]}):null},qfn=e=>{var t,n;if(!e)return typeof window<"u"&&(t=window.matchMedia)!=null&&t.call(window,"(prefers-color-scheme: dark)").matches?"dark":"light";const r=e.closest(".markdown-content");if(r){if(r.classList.contains("dark"))return"dark";if(r.classList.contains("light"))return"light"}if(e.closest(".dark"))return"dark";if(e.closest(".light"))return"light";const i=e.closest("[data-theme]");if(i){const a=i.getAttribute("data-theme");if(a==="dark")return"dark";if(a==="light")return"light"}return typeof window<"u"&&(n=window.matchMedia)!=null&&n.call(window,"(prefers-color-scheme: dark)").matches?"dark":"light"},Zfn=(e,t)=>{const[n,r]=Ye.useState("light"),i=Ye.useRef("light");return Ye.useEffect(()=>{var a,o,s;if(t||typeof window>"u"||typeof document>"u")return;const l=()=>{const d=qfn(e.current);d!==i.current&&(i.current=d,r(d))};l();const u=((a=window.matchMedia)==null?void 0:a.call(window,"(prefers-color-scheme: dark)"))??null,A=()=>l();u==null||u.addEventListener("change",A);const h=typeof MutationObserver<"u"?new MutationObserver(()=>l()):null;if(h){const d=((s=(o=e.current)==null?void 0:o.closest)==null?void 0:s.call(o,".markdown-content"))??null;d&&h.observe(d,{attributes:!0,attributeFilter:["class","data-theme"]}),document.body&&h.observe(document.body,{attributes:!0,attributeFilter:["class","data-theme"]})}return()=>{u==null||u.removeEventListener("change",A),h==null||h.disconnect()}},[t]),t??n},_fn={js:"javascript",jsx:"javascript",ts:"typescript",tsx:"tsx",sh:"bash",shell:"bash",shellsession:"bash",yml:"yaml",yaml:"yaml",py:"python",rb:"ruby",kt:"kotlin",md:"markdown",csharp:"csharp","c#":"csharp","c++":"cpp",tf:"hcl",terraform:"hcl",docker:"dockerfile",dotenv:"env",env:"env",plaintext:"text",text:"text"},$fn=e=>{if(!e)return"";const t=e.match(/(?:^|\s)language-([^\s]+)/);if(!t)return"";const n=t[1].toLowerCase().split("{")[0].split("[")[0].split("<")[0].split(":")[0].trim().replace(/[^a-z0-9+#-]+$/g,"");return n?_fn[n]??n:""},e1n=e=>Ye.Children.toArray(e).map(t=>typeof t=="string"||typeof t=="number"?String(t):"").join("").replace(/\n$/,""),Mst=({code:e})=>{const[t,n]=Ye.useState(!1),r=async()=>{try{await navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),2e3)}catch{const i=document.createElement("textarea");i.value=e,i.style.position="fixed",i.style.opacity="0",document.body.appendChild(i),i.select();try{document.execCommand("copy"),n(!0),setTimeout(()=>n(!1),2e3)}catch(a){console.error("Failed to copy code:",a)}document.body.removeChild(i)}};return pt.jsxs("button",{className:"code-copy-button",onClick:r,title:t?"Copied!":"Copy code","aria-label":t?"Copied!":"Copy code to clipboard",children:[t?pt.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:pt.jsx("path",{d:"M13.5 4.5L6 12L2.5 8.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):pt.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[pt.jsx("path",{d:"M5.5 4.5H3.5C2.94772 4.5 2.5 4.94772 2.5 5.5V12.5C2.5 13.0523 2.94772 13.5 3.5 13.5H10.5C11.0523 13.5 11.5 13.0523 11.5 12.5V10.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),pt.jsx("path",{d:"M6.5 2.5H12.5C13.0523 2.5 13.5 2.94772 13.5 3.5V9.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),pt.jsx("path",{d:"M9.5 6.5L13.5 2.5L9.5 2.5V6.5Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),pt.jsx("span",{className:"code-copy-button-text",children:t?"Copied!":"Copy"})]})},t1n=({inline:e,className:t="",children:n,enableGraphs:r=!0,enableMermaid:i=!0,enableSVG:a=!0,enableCharts:o=!0,enableMusic:s=!0,enableSyntaxHighlighting:l=!0,syntaxTheme:u})=>{const A=Ye.useRef(null),h=Zfn(A,u);if(e)return pt.jsx("code",{className:t,children:n});const d=$fn(t),g=e1n(n);if(o&&(d==="chart"||d==="chart-json"||d==="chart-table"))return pt.jsx("div",{ref:A,children:pt.jsx(Jfn,{code:g,language:d})});if(s&&(d==="abc"||d==="music"))return pt.jsx("div",{ref:A,children:pt.jsx(Xfn,{code:g})});if(r){if(d==="mermaid"&&i)return pt.jsx("div",{ref:A,children:pt.jsx(I$t,{code:g})});if(d==="svg"&&a)return pt.jsx("div",{ref:A,children:pt.jsx(Q$t,{code:g})})}if(l&&d){const f=h==="light"?tUt:nUt;try{return pt.jsxs("div",{ref:A,className:"syntax-highlighted-wrapper code-block-container",children:[pt.jsx(Mst,{code:g}),pt.jsx(aOe,{language:d,style:f,customStyle:{margin:"12px 0",borderRadius:"6px",fontSize:"0.9em"},showLineNumbers:!1,children:g})]})}catch(y){console.warn(`Syntax highlighting failed for "${d}". Falling back to plain code block.`,y)}}return pt.jsxs("div",{ref:A,className:`markdown-code-block code-block-container ${t}`.trim(),children:[pt.jsx(Mst,{code:g}),pt.jsx("pre",{style:{margin:0,padding:0,background:"transparent",border:"none"},children:pt.jsx("code",{children:g})})]})},xst=new Set(["div","pre","blockquote","ul","ol","table","thead","tbody","tr","td","th","h1","h2","h3","h4","h5","h6","section","article","figure"]),n1n=({children:e,href:t="",className:n="",...r})=>{const i=Ye.Children.toArray(e).map(A=>typeof A=="string"?A:"").join("").trim(),a=/^https?:\/\//i.test(t),o=!!(a&&i&&kst(i)===kst(t)),s=a?r1n(t):null,l=!!(o&&s),u=["markdown-link",l?"markdown-link--card":"markdown-link--inline",n].filter(Boolean).join(" ");return pt.jsxs("a",{...r,href:t,target:"_blank",rel:"noopener noreferrer",className:u,children:[pt.jsx("span",{className:"markdown-link__content",children:l&&s?pt.jsxs(pt.Fragment,{children:[pt.jsx("span",{className:"markdown-link__hostname",children:s.hostname}),s.path&&s.path!=="/"&&pt.jsx("span",{className:"markdown-link__path",children:s.path})]}):e}),a&&pt.jsx("span",{className:"markdown-link__icon","aria-hidden":"true",children:pt.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:pt.jsx("path",{d:"M8 16L16 8M16 8H9M16 8V15",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})})]})};function kst(e){return e.trim().replace(/\/$/,"")}function r1n(e){try{const t=new URL(e),n=t.hostname.replace(/^www\./i,""),r=`${t.pathname}${t.search}${t.hash}`||"/";return{hostname:n,path:r}}catch{return null}}const i1n=({content:e,className:t="",disableMath:n=!1,enableGraphs:r=!0,enableMermaid:i=!0,enableSVG:a=!0,enableCharts:o=!0,enableMusic:s=!0,enableSyntaxHighlighting:l=!0,syntaxTheme:u="dark"})=>{const A=mDt(e);if(!A)return null;const h=n?[KLe]:[KLe,[IFt,{singleDollarTextMath:!0}]],d=[];n||d.push([nSt,{throwOnError:!1,errorColor:"#cc0000",strict:!1,trust:!0,macros:{"\\RR":"\\mathbb{R}","\\NN":"\\mathbb{N}","\\ZZ":"\\mathbb{Z}","\\QQ":"\\mathbb{Q}","\\CC":"\\mathbb{C}","\\dx":"\\,dx","\\dy":"\\,dy","\\dt":"\\,dt","\\dz":"\\,dz"}}]);const g={a:n1n,code:f=>{const{className:y,children:B,...w}=f,C=y&&/language-/.test(y),I="inline"in f&&typeof f.inline=="boolean"&&f.inline||!C,M=C;return pt.jsx(t1n,{inline:I,className:y,enableGraphs:r,enableMermaid:i,enableSVG:a,enableCharts:o,enableMusic:s,enableSyntaxHighlighting:l,syntaxTheme:u,"data-block-code":M?"true":void 0,...w,children:B})},p:({node:f,...y})=>{var B;const w=Ye.Children.toArray(y.children).filter(I=>!(typeof I=="string"&&I.trim()==="")).some(I=>{if(!Ye.isValidElement(I))return!1;const M=I.props;return(M==null?void 0:M["data-block-code"])==="true"?!0:typeof I.type=="string"?xst.has(I.type):!1}),C=(B=f==null?void 0:f.children)==null?void 0:B.some(I=>{var M;if(I.type==="code")return!0;if(I.type==="element"){if(I.tagName&&xst.has(I.tagName))return!0;if(I.tagName==="code"){const x=(M=I.properties)==null?void 0:M.className;return Array.isArray(x)?x.some(Q=>typeof Q=="string"&&Q.startsWith("language-")):!0}}return!1});return w||C?pt.jsx(pt.Fragment,{children:y.children}):pt.jsx("p",{...y})}};return pt.jsx("div",{className:`markdown-content ${t}`,children:pt.jsx(pNt,{remarkPlugins:h,rehypePlugins:d,components:g,children:A})})},Qst="schmitech-markdown-renderer-styles",a1n=`${ixt}
|
|
9187
|
-
${rxt}`;(()=>{if(typeof document>"u"||document.getElementById(Qst))return;const e=document.createElement("style");e.id=Qst,e.textContent=a1n,document.head.appendChild(e)})();const o1n=e=>{if(!e)return null;let t=e.trim();if(!t.startsWith("#")||(t=t.replace("#",""),t.length===3&&(t=t.split("").map(r=>r+r).join("")),t.length!==6))return null;const n=parseInt(t,16);return[n>>16&255,n>>8&255,n&255]},s1n=e=>{const t=o1n(e);if(!t)return!1;const[n,r,i]=t.map(o=>o/255);return .2126*n+.7152*r+.0722*i<.5},l1n=e=>{const t=e==null?void 0:e.mode;return t==="dark"||t==="light"?t:t==="system"&&typeof window<"u"&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":s1n(e==null?void 0:e.background)?"dark":"light"},c1n=({message:e,index:t,isLatestAssistantMessage:n,showTypingAnimation:r,theme:i,copiedMessageId:a,onCopyToClipboard:o,onMarkMessageAnimated:s,messagesLength:l,scrollToBottom:u,inputRef:A,hasBeenAnimated:h,typingProgressRef:d,isTypingRef:g,setIsAnimating:f,formatTime:y,lastMessageRef:B})=>{const w=Ye.useMemo(()=>l1n(i),[i]),C=w==="dark"?"dark":"light",I=Ye.useMemo(()=>zC("w-full min-w-0",w),[w]),M=Ye.useMemo(()=>JMt(HYe(e.content||"")),[e.content]),x=new Date;x.setMinutes(x.getMinutes()-(l-t));const Q=Ye.useRef(null);return Ye.useEffect(()=>{n&&!h(e.id)&&e.content&&!r&&s(e.id,l,u)},[n,e.id,e.content,r,s,l,u,h]),Ye.useEffect(()=>{const F=Q.current;if(!F||e.role!=="assistant"||!e.content)return;const k=()=>{if(F.scrollWidth>F.clientWidth){F.classList.add("has-horizontal-scroll");const G=F.scrollLeft;F.scrollLeft=G+1,requestAnimationFrame(()=>{F.scrollLeft=G,setTimeout(()=>{F.scrollLeft=G+.5,requestAnimationFrame(()=>{F.scrollLeft=G})},50)})}else F.classList.remove("has-horizontal-scroll")};k();const T=setTimeout(k,100),R=setTimeout(k,500),U=setTimeout(k,1e3),Y=new ResizeObserver(k);Y.observe(F);const X=()=>{F.scrollWidth>F.clientWidth&&k()};return F.addEventListener("mouseenter",X),()=>{clearTimeout(T),clearTimeout(R),clearTimeout(U),Y.disconnect(),F.removeEventListener("mouseenter",X)}},[e.content,e.role]),An.jsx("div",{className:zC("flex",e.role==="user"?"justify-end":"justify-start"),ref:t===l-1?B:null,children:An.jsxs("div",{className:zC("max-w-[85%] rounded-xl p-4 shadow-sm"),style:{background:e.role==="user"?i.message.user:i.message.assistant,color:e.role==="user"?i.message.userText:i.message.assistantText||i.text.primary,border:e.role==="assistant"?`1px solid ${i.input.border}`:"none",width:"100%",maxWidth:"85%",wordWrap:"break-word",overflowWrap:"anywhere",borderRadius:e.role==="assistant"?"0.75rem":void 0},children:[e.role==="assistant"?e.content?An.jsx("div",{ref:Q,className:"markdown-content-wrapper",style:{overflowX:"scroll",overflowY:"visible",width:"100%",maxWidth:"100%",minWidth:0,scrollbarWidth:"thin",scrollbarColor:"rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.15)"},children:An.jsx(i1n,{content:M,className:I,syntaxTheme:C})}):An.jsx("div",{className:"flex items-center gap-2",children:An.jsxs("div",{className:"typing-dots-container",children:[An.jsx("div",{className:"typing-dot"}),An.jsx("div",{className:"typing-dot"}),An.jsx("div",{className:"typing-dot"})]})}):An.jsx("p",{className:"text-base",style:{overflowWrap:"anywhere",wordBreak:"break-word",whiteSpace:"pre-wrap",width:"100%"},children:e.content}),An.jsxs("div",{className:zC("flex text-xs mt-2",e.role==="user"?"justify-start text-white/70":"justify-between text-gray-400"),children:[An.jsx("span",{children:y(x)}),e.role==="assistant"&&!r&&An.jsxs("div",{className:"relative",children:[An.jsx("button",{onClick:()=>o(e.content,e.id),className:"ml-2 p-1 rounded-full",style:{color:i.text.secondary,transition:"color 0.2s ease",background:"transparent",border:"none",outline:"none"},onMouseEnter:F=>{F.currentTarget.style.setProperty("color",i.text.primary,"important"),F.currentTarget.style.setProperty("background","transparent","important")},onMouseLeave:F=>{F.currentTarget.style.setProperty("color",i.text.secondary,"important"),F.currentTarget.style.setProperty("background","transparent","important")},onMouseDown:F=>{F.currentTarget.style.setProperty("color",i.text.primary,"important"),F.currentTarget.style.setProperty("background","transparent","important"),F.currentTarget.style.setProperty("transform","none","important")},onMouseUp:F=>{F.currentTarget.style.setProperty("color",i.text.primary,"important"),F.currentTarget.style.setProperty("background","transparent","important")},"aria-label":"Copy to clipboard",children:a===e.id?An.jsx(s5,{size:16}):An.jsx(u5,{size:16})}),a===e.id&&An.jsx("div",{className:"absolute bottom-full right-0 mb-1 px-2 py-1 text-xs rounded-md shadow-sm animate-fade-in-out whitespace-nowrap",style:{backgroundColor:i.secondary,color:i.text.inverse},children:"Copied!"})]})]})]})})},u1n=Ye.memo(c1n,(e,t)=>e.message.id===t.message.id&&e.message.content===t.message.content&&e.message.role===t.message.role&&e.index===t.index&&e.isLatestAssistantMessage===t.isLatestAssistantMessage&&e.showTypingAnimation===t.showTypingAnimation&&e.copiedMessageId===t.copiedMessageId&&e.messagesLength===t.messagesLength&&e.theme===t.theme),A1n=({messages:e,isLoading:t,theme:n,currentConfig:r,showScrollTop:i,showScrollBottom:a,isAnimating:o,messagesContainerRef:s,messagesEndRef:l,scrollToTop:u,scrollToBottom:A,handleScroll:h,sendMessage:d,focusInput:g,copiedMessageId:f,onCopyToClipboard:y,onMarkMessageAnimated:B,inputRef:w,hasBeenAnimated:C,typingProgressRef:I,isTypingRef:M,setIsAnimating:x,formatTime:Q,lastMessageRef:F,maxSuggestedQuestionLength:k,maxSuggestedQuestionQueryLength:T})=>{const U=(()=>{const X=n.input.background;return!X||X==="transparent"||X.includes("rgba")||X.includes("hsla")?"#ffffff":X.match(/^#[0-9A-Fa-f]{8}$/)?X.substring(0,7):X})(),Y=Ye.useMemo(()=>e.map((X,D)=>{const G=X.role==="assistant"&&D===e.length-1,O=G&&t;return An.jsx(u1n,{message:X,index:D,isLatestAssistantMessage:G,showTypingAnimation:O,theme:n,copiedMessageId:f,onCopyToClipboard:y,onMarkMessageAnimated:B,messagesLength:e.length,scrollToBottom:A,inputRef:w,hasBeenAnimated:C,typingProgressRef:I,isTypingRef:M,setIsAnimating:x,formatTime:Q,lastMessageRef:F},X.id)}),[e,t,n,f,y,B,A,w,C,I,M,x,Q,F]);return An.jsxs("div",{className:"flex-1 overflow-hidden relative",style:{background:U,backgroundColor:U,isolation:"isolate"},children:[An.jsx("div",{className:"absolute inset-0",style:{background:U,backgroundColor:U,zIndex:0,pointerEvents:"none"}}),An.jsxs("div",{ref:s,className:"h-full w-full overflow-y-auto relative messages-container",style:{background:U,backgroundColor:U,overflowY:"auto",overflowX:"hidden",height:"100%",maxHeight:"100%",boxSizing:"border-box",paddingTop:"8px",paddingLeft:"8px",paddingRight:"8px",paddingBottom:"0px",position:"relative",zIndex:1},onScroll:h,children:[i&&An.jsx("button",{onClick:u,className:"sticky top-3 left-[calc(100%-48px)] z-10 flex items-center justify-center p-2 rounded-full shadow-md",style:{backgroundColor:n.primary,color:n.text.inverse},"aria-label":"Scroll to top",title:"Scroll to top",children:An.jsx(c5,{size:Di.BUTTON_SIZES.ICON_SIZES.BUTTON})}),a&&!o&&An.jsx("button",{onClick:()=>A(),className:"sticky bottom-3 left-[calc(100%-48px)] z-10 flex items-center justify-center p-2 rounded-full shadow-md",style:{backgroundColor:n.primary,color:n.text.inverse},"aria-label":"Scroll to bottom",title:"Scroll to bottom",children:An.jsx(l5,{size:Di.BUTTON_SIZES.ICON_SIZES.BUTTON})}),e.length===0?An.jsxs("div",{className:"py-2",children:[An.jsx("div",{className:"w-full px-3 mb-6",children:An.jsxs("div",{className:"max-w-lg mx-auto sm:max-w-2xl",children:[An.jsx("h4",{className:"font-bold text-xl mb-2 px-1 mt-3",style:{color:n.text.primary},children:r.welcome.title}),An.jsx("p",{className:"text-lg px-1",style:{color:n.text.secondary},children:r.welcome.description})]})}),An.jsx("div",{className:"w-full px-3",children:An.jsx("div",{className:"flex flex-col gap-3 max-w-lg mx-auto sm:max-w-2xl",children:r.suggestedQuestions.slice(0,5).map((X,D)=>{var j,z;const G=T??Di.MAX_SUGGESTED_QUESTION_QUERY_LENGTH,O=k??Di.MAX_SUGGESTED_QUESTION_LENGTH,P=((j=X.query)==null?void 0:j.length)>G?X.query.substring(0,G):X.query,H=((z=X.text)==null?void 0:z.length)>O?`${X.text.substring(0,O)}...`:X.text;return An.jsx("button",{onClick:()=>{d(P),setTimeout(()=>{g()},Di.ANIMATIONS.TOGGLE_DELAY)},className:"group w-full text-left transition-all duration-300 ease-in-out transform hover:scale-[1.02] active:scale-[0.98]",style:{minHeight:"48px",background:"transparent"},title:P,children:An.jsx("div",{className:"w-full px-4 py-3 rounded-xl border transition-all duration-300 ease-in-out cursor-pointer group-hover:shadow-md group-active:shadow-sm",style:{background:n.suggestedQuestions.questionsBackground||"#ffffff",borderColor:n.suggestedQuestions.text||"#e5e7eb",color:n.suggestedQuestions.text,fontWeight:500,boxShadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)"},onMouseEnter:K=>{K.currentTarget.style.background=n.suggestedQuestions.highlightedBackground||"#f8fafc",K.currentTarget.style.borderColor=n.primary,K.currentTarget.style.transform="translateY(-1px)",K.currentTarget.style.boxShadow="0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)";const Z=K.currentTarget.querySelector("span");Z&&(Z.style.color="#1F2937")},onMouseLeave:K=>{K.currentTarget.style.background=n.suggestedQuestions.questionsBackground||"#ffffff",K.currentTarget.style.borderColor=n.suggestedQuestions.text||"#e5e7eb",K.currentTarget.style.transform="translateY(0)",K.currentTarget.style.boxShadow="0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)";const Z=K.currentTarget.querySelector("span");Z&&(Z.style.color=n.suggestedQuestions.text||"#1F2937",Z.style.removeProperty("color"))},children:An.jsxs("div",{className:"flex items-center justify-between",children:[An.jsx("span",{className:"text-base leading-relaxed transition-colors duration-200",children:H}),An.jsx("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity duration-200 transform translate-x-1 group-hover:translate-x-0",style:{color:n.primary},children:An.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[An.jsx("path",{d:"M5 12h14"}),An.jsx("path",{d:"m12 5 7 7-7 7"})]})})]})})},D)})})})]}):An.jsxs("div",{className:"space-y-3",children:[Y,t&&e.length===0&&An.jsx("div",{className:"flex justify-start",children:An.jsx("div",{className:"bg-white border border-gray-200 rounded-xl rounded-tl-none max-w-[85%] p-4 shadow-sm",children:An.jsxs("div",{className:"text-gray-500",children:[An.jsx("span",{className:"font-medium text-lg",children:"Thinking"}),An.jsxs("span",{className:"animate-dots ml-1",children:[An.jsx("span",{className:"dot",children:"."}),An.jsx("span",{className:"dot",children:"."}),An.jsx("span",{className:"dot",children:"."})]})]})})}),An.jsx("div",{ref:l})]})]})]})},h1n=Ye.memo(A1n,(e,t)=>e.messages===t.messages&&e.isLoading===t.isLoading&&e.showScrollTop===t.showScrollTop&&e.showScrollBottom===t.showScrollBottom&&e.isAnimating===t.isAnimating&&e.copiedMessageId===t.copiedMessageId&&e.theme===t.theme&&e.currentConfig===t.currentConfig&&e.maxSuggestedQuestionLength===t.maxSuggestedQuestionLength&&e.maxSuggestedQuestionQueryLength===t.maxSuggestedQuestionQueryLength),d1n=({message:e,isFocused:t,isLoading:n,theme:r,inputRef:i,handleMessageChange:a,handleKeyDown:o,handleSendMessage:s,setIsFocused:l})=>{const A=(()=>{const h=r.input.background;return!h||h==="transparent"||h.includes("rgba")||h.includes("hsla")?"#ffffff":h.match(/^#[0-9A-Fa-f]{8}$/)?h.substring(0,7):h})();return An.jsxs("div",{className:"border-t-0 shrink-0 relative",style:{background:A,backgroundColor:A,borderTopLeftRadius:0,borderTopRightRadius:0,zIndex:10,position:"relative",marginTop:"-2px",paddingTop:"18px",paddingLeft:"16px",paddingRight:"16px",paddingBottom:"16px",isolation:"isolate"},children:[An.jsx("div",{className:"absolute inset-0",style:{background:A,backgroundColor:A,zIndex:-2,pointerEvents:"none"}}),An.jsx("div",{className:"absolute inset-0",style:{background:A,backgroundColor:A,zIndex:-1,pointerEvents:"none"}}),An.jsxs("div",{className:"relative rounded-2xl transition-all duration-300 overflow-hidden input-modern shadow-soft",style:{borderColor:r.secondary||r.input.border||"#9ca3af",border:"1.5px solid",background:A,backgroundColor:A,boxShadow:"none",isolation:"isolate",outline:"none",outlineOffset:"0px"},children:[An.jsx("div",{className:"absolute inset-0 rounded-2xl",style:{background:A,backgroundColor:A,zIndex:0,pointerEvents:"none"}}),An.jsx("textarea",{ref:i,value:e,onChange:a,onKeyDown:o,onFocus:()=>l(!0),onBlur:()=>l(!1),placeholder:"Type your message...",maxLength:Di.MAX_MESSAGE_LENGTH,id:"chat-message-input",name:"chat-message-input",className:"w-full resize-none relative",style:{background:A,backgroundColor:A,color:r.text.primary,height:"52px",minHeight:"52px",maxHeight:"120px",overflow:"auto",lineHeight:"1.5",boxSizing:"border-box",fontWeight:"400",textAlign:"left",border:"none",boxShadow:"none",outline:"none",paddingLeft:"24px",paddingRight:"60px",paddingTop:"16px",paddingBottom:"16px",fontSize:"16px",fontFamily:"inherit",position:"relative",zIndex:1}}),An.jsxs("button",{onClick:s,disabled:!e.trim()||n,className:zC("absolute right-3 top-1/2 transform -translate-y-1/2 rounded-xl shrink-0 overflow-hidden group",e.trim()&&!n?"hover:scale-105 transition-all duration-300":"cursor-not-allowed opacity-50"),style:{background:e.trim()&&!n?`linear-gradient(135deg, ${r.secondary}, ${r.secondary}e6)`:"linear-gradient(135deg, #e5e7eb, #f3f4f6)",color:e.trim()&&!n?"white":"#9ca3af",width:"44px",height:"40px",minHeight:"40px",padding:"0",border:"none",boxShadow:"none",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,position:"absolute",zIndex:10,transform:"translateY(-50%)",right:"12px"},"aria-label":"Send message",children:[An.jsx("div",{className:"absolute inset-0 opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:"linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0))"}}),An.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",position:"relative"},children:An.jsx(h5,{size:Di.BUTTON_SIZES.ICON_SIZES.SEND,className:"transition-transform duration-200 drop-shadow-sm",style:{strokeWidth:2,position:"relative",display:"block"}})})]})]})]})},Gle=e=>{var Ge,ue,rt,Se,At,it,je;const[t,n]=Ye.useState(!1),[r,i]=Ye.useState(!1),[a,o]=Ye.useState(!1),[s,l]=Ye.useState(null),{isAnimating:u,typingProgressRef:A,isTypingRef:h,lastMessageRef:d,markMessageAnimated:g,hasBeenAnimated:f,clearAnimationTrackers:y,setIsAnimating:B}=$Mt(),{showScrollTop:w,showScrollBottom:C,messagesContainerRef:I,messagesEndRef:M,shouldScrollRef:x,scrollTimeoutRef:Q,scrollToBottom:F,scrollToTop:k,handleScroll:T}=_Mt(u),[R,U]=Ye.useState(window.innerWidth);Ye.useEffect(()=>{const ze=()=>U(window.innerWidth);return window.addEventListener("resize",ze),()=>window.removeEventListener("resize",ze)},[]);const Y=UC(),[X,D]=Ye.useState({...Y,...e}),G=X.theme||WYe;Ye.useEffect(()=>{e.apiUrl&&e.apiKey&&e.sessionId&&RC(e.apiUrl,e.apiKey,e.sessionId)},[e.apiUrl,e.apiKey,e.sessionId]),Ye.useEffect(()=>{const ze=xe=>{D(Te=>{var be,Ue,ve,tt;return{...Te,...xe.detail,theme:{...Te.theme,...xe.detail.theme,suggestedQuestions:{...(be=Te.theme)==null?void 0:be.suggestedQuestions,...(Ue=xe.detail.theme)==null?void 0:Ue.suggestedQuestions},chatButton:{...(ve=Te.theme)==null?void 0:ve.chatButton,...(tt=xe.detail.theme)==null?void 0:tt.chatButton}}}})};return window.addEventListener("chatbot-config-update",ze),()=>{window.removeEventListener("chatbot-config-update",ze)}},[]),Ye.useEffect(()=>{e&&D(ze=>({...ze,...e}))},[e]),Ye.useEffect(()=>{HMt({MAX_SUGGESTED_QUESTION_LENGTH:e.maxSuggestedQuestionLength??Di.MAX_SUGGESTED_QUESTION_LENGTH,MAX_SUGGESTED_QUESTION_QUERY_LENGTH:e.maxSuggestedQuestionQueryLength??Di.MAX_SUGGESTED_QUESTION_QUERY_LENGTH})},[e.maxSuggestedQuestionLength,e.maxSuggestedQuestionQueryLength]);const{messages:O,isLoading:P,sendMessage:H,deleteConversation:j}=gge(),{message:z,isFocused:K,inputRef:Z,handleMessageChange:_,handleKeyDown:re,handleSendMessage:ie,setIsFocused:le,focusInput:Ee}=ext({onSendMessage:ze=>{x.current=!0,H(ze),setTimeout(()=>F(!0),Di.ANIMATIONS.TOGGLE_DELAY)},isLoading:P,isOpen:t});Ye.useEffect(()=>{O.length===0&&y()},[O.length,y]);const me=()=>{n(!t),t||(i(!1),setTimeout(()=>F(!0),Di.ANIMATIONS.TOGGLE_DELAY))},ce=Ye.useCallback(async(ze,xe)=>{try{await navigator.clipboard.writeText(ze),l(xe),setTimeout(()=>{l(null)},Di.ANIMATIONS.COPY_FEEDBACK_DURATION)}catch(Te){console.error("Failed to copy text: ",Te)}},[]),fe=Ye.useCallback(async()=>{try{await j()}catch(ze){console.error("Failed to delete conversation:",ze)}finally{y()}},[j,y]),pe=Ye.useCallback(ze=>ze.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),[]);Ye.useEffect(()=>{(P||O.length===0)&&F(!0)},[O,P,F]),Ye.useEffect(()=>()=>{Q.current&&clearTimeout(Q.current)},[Q]);const oe={MessageSquare:"MessageSquare",MessageCircle:"MessageCircle",MessageCircleMore:"MoreHorizontal",MessageSquareText:"MessageSquareText",MessageSquareDots:"MessageSquareDot",ChatBubble:"MessageCircle",ChatBubbleLeft:"MessageCircle",ChatBubbleLeftRight:"MessageCircle",ChatBubbleLeftEllipsis:"MessageCircle",ChatBubbleLeftDots:"MessageCircle",HelpCircle:"HelpCircle",QuestionMarkCircle:"HelpCircle",Info:"Info",Lightbulb:"Lightbulb",Sparkles:"Sparkles",Headphones:"Headphones",LifeBuoy:"LifeBuoy",Bot:"Bot",Brain:"Brain",Cpu2:"Cpu",User:"User",Users:"Users",UserCheck:"UserCheck",UserPlus:"UserPlus",UserRound:"UserRound",Smile:"Smile",Phone:"Phone",Mail:"Mail",MailOpen:"MailOpen",Send:"Send",Reply:"Reply",Heart:"Heart",Star:"Star",ThumbsUp:"ThumbsUp",Laugh:"Laugh",Settings:"Settings",Cog:"Settings",Wrench:"Wrench",Tool:"Wrench",Hammer:"Hammer",Home:"Home",Search:"Search",Menu:"Menu",Grid:"Grid3X3",List:"List",Plus:"Plus",Minus:"Minus",X:"X",Check:"Check",ArrowRight:"ArrowRight",Zap:"Zap",Target:"Target",Flag:"Flag",Bookmark:"Bookmark",Gift:"Gift",Bell:"Bell",BellRing:"BellRing",Calendar:"Calendar",Clock:"Clock",MapPin:"MapPin",Globe:"Globe",Link:"Link",Download:"Download",Upload:"Upload",Share:"Share",Copy:"Copy",Edit:"Edit",Trash:"Trash",Eye:"Eye",EyeOff:"EyeOff",Lock:"Lock",Unlock:"Unlock",Shield:"Shield",AlertCircle:"AlertCircle",AlertTriangle:"AlertTriangle",CheckCircle:"CheckCircle",XCircle:"XCircle",MinusCircle:"MinusCircle",PlusCircle:"PlusCircle",Play:"Play",Pause:"Pause",Stop:"Square",SkipBack:"SkipBack",SkipForward:"SkipForward",Volume:"Volume2",VolumeX:"VolumeX",Mic:"Mic",MicOff:"MicOff",Camera:"Camera",Video:"Video",Image:"Image",File:"File",FileText:"FileText",Folder:"Folder",FolderOpen:"FolderOpen",Database:"Database",Server:"Server",Monitor:"Monitor",Smartphone:"Smartphone",Tablet:"Tablet",Laptop:"Laptop",Activity:"Activity"},ye=((Ge=G.chatButton)==null?void 0:Ge.iconName)||"MessageSquare",Ce=oe[ye]||"MessageSquare",he=NMt[Ce]||A5;return An.jsxs("div",{className:"fixed bottom-8 right-8 z-50 flex flex-col items-end font-sans",style:{fontFamily:OMt},children:[t&&An.jsxs("div",{className:"mb-4 w-full rounded-2xl shadow-elegant flex flex-col overflow-hidden border-0 transition-all duration-300 ease-in-out animate-slide-in-up backdrop-blur-lg",style:{background:G.input.background,height:Di.WINDOW_DIMENSIONS.HEIGHT,maxHeight:Di.WINDOW_DIMENSIONS.MAX_HEIGHT,width:GMt(R),minWidth:jMt(R),backdropFilter:"blur(20px)",WebkitBackdropFilter:"blur(20px)",border:"1px solid rgba(255, 255, 255, 0.2)",boxShadow:`
|
|
9187
|
+
${rxt}`;(()=>{if(typeof document>"u"||document.getElementById(Qst))return;const e=document.createElement("style");e.id=Qst,e.textContent=a1n,document.head.appendChild(e)})();const o1n=e=>{if(!e)return null;let t=e.trim();if(!t.startsWith("#")||(t=t.replace("#",""),t.length===3&&(t=t.split("").map(r=>r+r).join("")),t.length!==6))return null;const n=parseInt(t,16);return[n>>16&255,n>>8&255,n&255]},s1n=e=>{const t=o1n(e);if(!t)return!1;const[n,r,i]=t.map(o=>o/255);return .2126*n+.7152*r+.0722*i<.5},l1n=e=>{const t=e==null?void 0:e.mode;return t==="dark"||t==="light"?t:t==="system"&&typeof window<"u"&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":s1n(e==null?void 0:e.background)?"dark":"light"},c1n=({message:e,index:t,isLatestAssistantMessage:n,showTypingAnimation:r,theme:i,copiedMessageId:a,onCopyToClipboard:o,onMarkMessageAnimated:s,messagesLength:l,scrollToBottom:u,inputRef:A,hasBeenAnimated:h,typingProgressRef:d,isTypingRef:g,setIsAnimating:f,formatTime:y,lastMessageRef:B})=>{const w=Ye.useMemo(()=>l1n(i),[i]),C=w==="dark"?"dark":"light",I=Ye.useMemo(()=>zC("w-full min-w-0",w),[w]),M=Ye.useMemo(()=>JMt(HYe(e.content||"")),[e.content]),x=new Date;x.setMinutes(x.getMinutes()-(l-t));const Q=Ye.useRef(null);return Ye.useEffect(()=>{n&&!h(e.id)&&e.content&&!r&&s(e.id,l,u)},[n,e.id,e.content,r,s,l,u,h]),Ye.useEffect(()=>{const F=Q.current;if(!F||e.role!=="assistant"||!e.content)return;const k=()=>{if(F.scrollWidth>F.clientWidth){F.classList.add("has-horizontal-scroll");const G=F.scrollLeft;F.scrollLeft=G+1,requestAnimationFrame(()=>{F.scrollLeft=G,setTimeout(()=>{F.scrollLeft=G+.5,requestAnimationFrame(()=>{F.scrollLeft=G})},50)})}else F.classList.remove("has-horizontal-scroll")};k();const T=setTimeout(k,100),R=setTimeout(k,500),U=setTimeout(k,1e3),Y=new ResizeObserver(k);Y.observe(F);const X=()=>{F.scrollWidth>F.clientWidth&&k()};return F.addEventListener("mouseenter",X),()=>{clearTimeout(T),clearTimeout(R),clearTimeout(U),Y.disconnect(),F.removeEventListener("mouseenter",X)}},[e.content,e.role]),An.jsx("div",{className:zC("flex",e.role==="user"?"justify-end":"justify-start"),ref:t===l-1?B:null,children:An.jsxs("div",{className:zC("max-w-[85%] rounded-xl p-4 shadow-sm"),style:{background:e.role==="user"?i.message.user:i.message.assistant,color:e.role==="user"?i.message.userText:i.message.assistantText||i.text.primary,border:e.role==="assistant"?`1px solid ${i.input.border}`:"none",width:"100%",maxWidth:"85%",wordWrap:"break-word",overflowWrap:"anywhere",borderRadius:e.role==="assistant"?"0.75rem":void 0},children:[e.role==="assistant"?e.content?An.jsx("div",{ref:Q,className:"markdown-content-wrapper",style:{overflowX:"scroll",overflowY:"visible",width:"100%",maxWidth:"100%",minWidth:0,scrollbarWidth:"thin",scrollbarColor:"rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.15)"},children:An.jsx(i1n,{content:M,className:I,syntaxTheme:C})}):An.jsx("div",{className:"flex items-center gap-2",children:An.jsxs("div",{className:"typing-dots-container",children:[An.jsx("div",{className:"typing-dot"}),An.jsx("div",{className:"typing-dot"}),An.jsx("div",{className:"typing-dot"})]})}):An.jsx("p",{className:"text-base",style:{overflowWrap:"anywhere",wordBreak:"break-word",whiteSpace:"pre-wrap",width:"100%"},children:e.content}),An.jsxs("div",{className:zC("flex text-xs mt-2",e.role==="user"?"justify-start text-white/70":"justify-between text-gray-400"),children:[An.jsx("span",{children:y(x)}),e.role==="assistant"&&!r&&An.jsxs("div",{className:"relative",children:[An.jsx("button",{onClick:()=>o(e.content,e.id),className:"ml-2 p-1 rounded-full",style:{color:i.text.secondary,transition:"color 0.2s ease",background:"transparent",border:"none",outline:"none"},onMouseEnter:F=>{F.currentTarget.style.setProperty("color",i.text.primary,"important"),F.currentTarget.style.setProperty("background","transparent","important")},onMouseLeave:F=>{F.currentTarget.style.setProperty("color",i.text.secondary,"important"),F.currentTarget.style.setProperty("background","transparent","important")},onMouseDown:F=>{F.currentTarget.style.setProperty("color",i.text.primary,"important"),F.currentTarget.style.setProperty("background","transparent","important"),F.currentTarget.style.setProperty("transform","none","important")},onMouseUp:F=>{F.currentTarget.style.setProperty("color",i.text.primary,"important"),F.currentTarget.style.setProperty("background","transparent","important")},"aria-label":"Copy to clipboard",children:a===e.id?An.jsx(s5,{size:16}):An.jsx(u5,{size:16})}),a===e.id&&An.jsx("div",{className:"absolute bottom-full right-0 mb-1 px-2 py-1 text-xs rounded-md shadow-sm animate-fade-in-out whitespace-nowrap",style:{backgroundColor:i.secondary,color:i.text.inverse},children:"Copied!"})]})]})]})})},u1n=Ye.memo(c1n,(e,t)=>e.message.id===t.message.id&&e.message.content===t.message.content&&e.message.role===t.message.role&&e.index===t.index&&e.isLatestAssistantMessage===t.isLatestAssistantMessage&&e.showTypingAnimation===t.showTypingAnimation&&e.copiedMessageId===t.copiedMessageId&&e.messagesLength===t.messagesLength&&e.theme===t.theme),A1n=({messages:e,isLoading:t,theme:n,currentConfig:r,showScrollTop:i,showScrollBottom:a,isAnimating:o,messagesContainerRef:s,messagesEndRef:l,scrollToTop:u,scrollToBottom:A,handleScroll:h,sendMessage:d,focusInput:g,copiedMessageId:f,onCopyToClipboard:y,onMarkMessageAnimated:B,inputRef:w,hasBeenAnimated:C,typingProgressRef:I,isTypingRef:M,setIsAnimating:x,formatTime:Q,lastMessageRef:F,maxSuggestedQuestionLength:k,maxSuggestedQuestionQueryLength:T})=>{const U=(()=>{const X=n.input.background;return!X||X==="transparent"||X.includes("rgba")||X.includes("hsla")?"#ffffff":X.match(/^#[0-9A-Fa-f]{8}$/)?X.substring(0,7):X})(),Y=Ye.useMemo(()=>e.map((X,D)=>{const G=X.role==="assistant"&&D===e.length-1,O=G&&t;return An.jsx(u1n,{message:X,index:D,isLatestAssistantMessage:G,showTypingAnimation:O,theme:n,copiedMessageId:f,onCopyToClipboard:y,onMarkMessageAnimated:B,messagesLength:e.length,scrollToBottom:A,inputRef:w,hasBeenAnimated:C,typingProgressRef:I,isTypingRef:M,setIsAnimating:x,formatTime:Q,lastMessageRef:F},X.id)}),[e,t,n,f,y,B,A,w,C,I,M,x,Q,F]);return An.jsxs("div",{className:"flex-1 overflow-hidden relative",style:{background:U,backgroundColor:U,isolation:"isolate"},children:[An.jsx("div",{className:"absolute inset-0",style:{background:U,backgroundColor:U,zIndex:0,pointerEvents:"none"}}),An.jsxs("div",{ref:s,className:"h-full w-full overflow-y-auto relative messages-container",style:{background:U,backgroundColor:U,overflowY:"auto",overflowX:"hidden",height:"100%",maxHeight:"100%",boxSizing:"border-box",paddingTop:"8px",paddingLeft:"8px",paddingRight:"8px",paddingBottom:"0px",position:"relative",zIndex:1},onScroll:h,children:[i&&An.jsx("button",{onClick:u,className:"sticky top-3 left-[calc(100%-48px)] z-10 flex items-center justify-center p-2 rounded-full shadow-md",style:{backgroundColor:n.primary,color:n.text.inverse},"aria-label":"Scroll to top",title:"Scroll to top",children:An.jsx(c5,{size:Di.BUTTON_SIZES.ICON_SIZES.BUTTON})}),a&&!o&&An.jsx("button",{onClick:()=>A(),className:"sticky bottom-3 left-[calc(100%-48px)] z-10 flex items-center justify-center p-2 rounded-full shadow-md",style:{backgroundColor:n.primary,color:n.text.inverse},"aria-label":"Scroll to bottom",title:"Scroll to bottom",children:An.jsx(l5,{size:Di.BUTTON_SIZES.ICON_SIZES.BUTTON})}),e.length===0?An.jsxs("div",{className:"py-2",children:[An.jsx("div",{className:"w-full px-3 mb-6",children:An.jsxs("div",{className:"max-w-lg mx-auto sm:max-w-2xl",children:[An.jsx("h4",{className:"font-bold text-xl mb-2 px-1 mt-3",style:{color:n.text.primary},children:r.welcome.title}),An.jsx("p",{className:"text-lg px-1",style:{color:n.text.secondary},children:r.welcome.description})]})}),An.jsx("div",{className:"w-full px-3",children:An.jsx("div",{className:"flex flex-col gap-3 max-w-lg mx-auto sm:max-w-2xl",children:r.suggestedQuestions.slice(0,5).map((X,D)=>{var j,z;const G=T??Di.MAX_SUGGESTED_QUESTION_QUERY_LENGTH,O=k??Di.MAX_SUGGESTED_QUESTION_LENGTH,P=((j=X.query)==null?void 0:j.length)>G?X.query.substring(0,G):X.query,H=((z=X.text)==null?void 0:z.length)>O?`${X.text.substring(0,O)}...`:X.text;return An.jsx("button",{onClick:()=>{d(P),setTimeout(()=>{g()},Di.ANIMATIONS.TOGGLE_DELAY)},className:"group w-full text-left transition-all duration-300 ease-in-out transform hover:scale-[1.02] active:scale-[0.98]",style:{minHeight:"48px",background:"transparent"},title:P,children:An.jsx("div",{className:"w-full px-4 py-3 rounded-xl transition-all duration-300 ease-in-out cursor-pointer group-hover:shadow-md group-active:shadow-sm",style:{background:n.suggestedQuestions.questionsBackground||"#ffffff",border:`1px solid ${n.suggestedQuestions.text||"#e5e7eb"}`,color:n.suggestedQuestions.text,fontWeight:500,boxShadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)"},onMouseEnter:K=>{K.currentTarget.style.background=n.suggestedQuestions.highlightedBackground||"#f8fafc",K.currentTarget.style.border=`1px solid ${n.primary}`,K.currentTarget.style.transform="translateY(-1px)",K.currentTarget.style.boxShadow="0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)";const Z=K.currentTarget.querySelector("span");Z&&(Z.style.color="#1F2937")},onMouseLeave:K=>{K.currentTarget.style.background=n.suggestedQuestions.questionsBackground||"#ffffff",K.currentTarget.style.border=`1px solid ${n.suggestedQuestions.text||"#e5e7eb"}`,K.currentTarget.style.transform="translateY(0)",K.currentTarget.style.boxShadow="0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)";const Z=K.currentTarget.querySelector("span");Z&&(Z.style.color=n.suggestedQuestions.text||"#1F2937",Z.style.removeProperty("color"))},children:An.jsxs("div",{className:"flex items-center justify-between",children:[An.jsx("span",{className:"text-base leading-relaxed transition-colors duration-200",children:H}),An.jsx("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity duration-200 transform translate-x-1 group-hover:translate-x-0",style:{color:n.primary},children:An.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[An.jsx("path",{d:"M5 12h14"}),An.jsx("path",{d:"m12 5 7 7-7 7"})]})})]})})},D)})})})]}):An.jsxs("div",{className:"space-y-3",children:[Y,t&&e.length===0&&An.jsx("div",{className:"flex justify-start",children:An.jsx("div",{className:"bg-white border border-gray-200 rounded-xl rounded-tl-none max-w-[85%] p-4 shadow-sm",children:An.jsxs("div",{className:"text-gray-500",children:[An.jsx("span",{className:"font-medium text-lg",children:"Thinking"}),An.jsxs("span",{className:"animate-dots ml-1",children:[An.jsx("span",{className:"dot",children:"."}),An.jsx("span",{className:"dot",children:"."}),An.jsx("span",{className:"dot",children:"."})]})]})})}),An.jsx("div",{ref:l})]})]})]})},h1n=Ye.memo(A1n,(e,t)=>e.messages===t.messages&&e.isLoading===t.isLoading&&e.showScrollTop===t.showScrollTop&&e.showScrollBottom===t.showScrollBottom&&e.isAnimating===t.isAnimating&&e.copiedMessageId===t.copiedMessageId&&e.theme===t.theme&&e.currentConfig===t.currentConfig&&e.maxSuggestedQuestionLength===t.maxSuggestedQuestionLength&&e.maxSuggestedQuestionQueryLength===t.maxSuggestedQuestionQueryLength),d1n=({message:e,isFocused:t,isLoading:n,theme:r,inputRef:i,handleMessageChange:a,handleKeyDown:o,handleSendMessage:s,setIsFocused:l})=>{const A=(()=>{const h=r.input.background;return!h||h==="transparent"||h.includes("rgba")||h.includes("hsla")?"#ffffff":h.match(/^#[0-9A-Fa-f]{8}$/)?h.substring(0,7):h})();return An.jsxs("div",{className:"border-t-0 shrink-0 relative",style:{background:A,backgroundColor:A,borderTopLeftRadius:0,borderTopRightRadius:0,zIndex:10,position:"relative",marginTop:"-2px",paddingTop:"18px",paddingLeft:"16px",paddingRight:"16px",paddingBottom:"16px",isolation:"isolate"},children:[An.jsx("div",{className:"absolute inset-0",style:{background:A,backgroundColor:A,zIndex:-2,pointerEvents:"none"}}),An.jsx("div",{className:"absolute inset-0",style:{background:A,backgroundColor:A,zIndex:-1,pointerEvents:"none"}}),An.jsxs("div",{className:"relative rounded-2xl transition-all duration-300 overflow-hidden input-modern shadow-soft",style:{border:`1.5px solid ${r.secondary||r.input.border||"#9ca3af"}`,background:A,backgroundColor:A,boxShadow:"none",isolation:"isolate",outline:"none",outlineOffset:"0px"},children:[An.jsx("div",{className:"absolute inset-0 rounded-2xl",style:{background:A,backgroundColor:A,zIndex:0,pointerEvents:"none"}}),An.jsx("textarea",{ref:i,value:e,onChange:a,onKeyDown:o,onFocus:()=>l(!0),onBlur:()=>l(!1),placeholder:"Type your message...",maxLength:Di.MAX_MESSAGE_LENGTH,id:"chat-message-input",name:"chat-message-input",className:"w-full resize-none relative",style:{background:A,backgroundColor:A,color:r.text.primary,height:"52px",minHeight:"52px",maxHeight:"120px",overflow:"auto",lineHeight:"1.5",boxSizing:"border-box",fontWeight:"400",textAlign:"left",border:"none",boxShadow:"none",outline:"none",paddingLeft:"24px",paddingRight:"60px",paddingTop:"16px",paddingBottom:"16px",fontSize:"16px",fontFamily:"inherit",position:"relative",zIndex:1}}),An.jsxs("button",{onClick:s,disabled:!e.trim()||n,className:zC("absolute right-3 top-1/2 transform -translate-y-1/2 rounded-xl shrink-0 overflow-hidden group",e.trim()&&!n?"hover:scale-105 transition-all duration-300":"cursor-not-allowed opacity-50"),style:{background:e.trim()&&!n?`linear-gradient(135deg, ${r.secondary}, ${r.secondary}e6)`:"linear-gradient(135deg, #e5e7eb, #f3f4f6)",color:e.trim()&&!n?"white":"#9ca3af",width:"44px",height:"40px",minHeight:"40px",padding:"0",border:"none",boxShadow:"none",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,position:"absolute",zIndex:10,transform:"translateY(-50%)",right:"12px"},"aria-label":"Send message",children:[An.jsx("div",{className:"absolute inset-0 opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:"linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0))"}}),An.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",position:"relative"},children:An.jsx(h5,{size:Di.BUTTON_SIZES.ICON_SIZES.SEND,className:"transition-transform duration-200 drop-shadow-sm",style:{strokeWidth:2,position:"relative",display:"block"}})})]})]})]})},Gle=e=>{var Ge,ue,rt,Se,At,it,je;const[t,n]=Ye.useState(!1),[r,i]=Ye.useState(!1),[a,o]=Ye.useState(!1),[s,l]=Ye.useState(null),{isAnimating:u,typingProgressRef:A,isTypingRef:h,lastMessageRef:d,markMessageAnimated:g,hasBeenAnimated:f,clearAnimationTrackers:y,setIsAnimating:B}=$Mt(),{showScrollTop:w,showScrollBottom:C,messagesContainerRef:I,messagesEndRef:M,shouldScrollRef:x,scrollTimeoutRef:Q,scrollToBottom:F,scrollToTop:k,handleScroll:T}=_Mt(u),[R,U]=Ye.useState(window.innerWidth);Ye.useEffect(()=>{const ze=()=>U(window.innerWidth);return window.addEventListener("resize",ze),()=>window.removeEventListener("resize",ze)},[]);const Y=UC(),[X,D]=Ye.useState({...Y,...e}),G=X.theme||WYe;Ye.useEffect(()=>{e.apiUrl&&e.apiKey&&e.sessionId&&RC(e.apiUrl,e.apiKey,e.sessionId)},[e.apiUrl,e.apiKey,e.sessionId]),Ye.useEffect(()=>{const ze=xe=>{D(Te=>{var be,Ue,ve,tt;return{...Te,...xe.detail,theme:{...Te.theme,...xe.detail.theme,suggestedQuestions:{...(be=Te.theme)==null?void 0:be.suggestedQuestions,...(Ue=xe.detail.theme)==null?void 0:Ue.suggestedQuestions},chatButton:{...(ve=Te.theme)==null?void 0:ve.chatButton,...(tt=xe.detail.theme)==null?void 0:tt.chatButton}}}})};return window.addEventListener("chatbot-config-update",ze),()=>{window.removeEventListener("chatbot-config-update",ze)}},[]),Ye.useEffect(()=>{e&&D(ze=>({...ze,...e}))},[e]),Ye.useEffect(()=>{HMt({MAX_SUGGESTED_QUESTION_LENGTH:e.maxSuggestedQuestionLength??Di.MAX_SUGGESTED_QUESTION_LENGTH,MAX_SUGGESTED_QUESTION_QUERY_LENGTH:e.maxSuggestedQuestionQueryLength??Di.MAX_SUGGESTED_QUESTION_QUERY_LENGTH})},[e.maxSuggestedQuestionLength,e.maxSuggestedQuestionQueryLength]);const{messages:O,isLoading:P,sendMessage:H,deleteConversation:j}=gge(),{message:z,isFocused:K,inputRef:Z,handleMessageChange:_,handleKeyDown:re,handleSendMessage:ie,setIsFocused:le,focusInput:Ee}=ext({onSendMessage:ze=>{x.current=!0,H(ze),setTimeout(()=>F(!0),Di.ANIMATIONS.TOGGLE_DELAY)},isLoading:P,isOpen:t});Ye.useEffect(()=>{O.length===0&&y()},[O.length,y]);const me=()=>{n(!t),t||(i(!1),setTimeout(()=>F(!0),Di.ANIMATIONS.TOGGLE_DELAY))},ce=Ye.useCallback(async(ze,xe)=>{try{await navigator.clipboard.writeText(ze),l(xe),setTimeout(()=>{l(null)},Di.ANIMATIONS.COPY_FEEDBACK_DURATION)}catch(Te){console.error("Failed to copy text: ",Te)}},[]),fe=Ye.useCallback(async()=>{try{await j()}catch(ze){console.error("Failed to delete conversation:",ze)}finally{y()}},[j,y]),pe=Ye.useCallback(ze=>ze.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),[]);Ye.useEffect(()=>{(P||O.length===0)&&F(!0)},[O,P,F]),Ye.useEffect(()=>()=>{Q.current&&clearTimeout(Q.current)},[Q]);const oe={MessageSquare:"MessageSquare",MessageCircle:"MessageCircle",MessageCircleMore:"MoreHorizontal",MessageSquareText:"MessageSquareText",MessageSquareDots:"MessageSquareDot",ChatBubble:"MessageCircle",ChatBubbleLeft:"MessageCircle",ChatBubbleLeftRight:"MessageCircle",ChatBubbleLeftEllipsis:"MessageCircle",ChatBubbleLeftDots:"MessageCircle",HelpCircle:"HelpCircle",QuestionMarkCircle:"HelpCircle",Info:"Info",Lightbulb:"Lightbulb",Sparkles:"Sparkles",Headphones:"Headphones",LifeBuoy:"LifeBuoy",Bot:"Bot",Brain:"Brain",Cpu2:"Cpu",User:"User",Users:"Users",UserCheck:"UserCheck",UserPlus:"UserPlus",UserRound:"UserRound",Smile:"Smile",Phone:"Phone",Mail:"Mail",MailOpen:"MailOpen",Send:"Send",Reply:"Reply",Heart:"Heart",Star:"Star",ThumbsUp:"ThumbsUp",Laugh:"Laugh",Settings:"Settings",Cog:"Settings",Wrench:"Wrench",Tool:"Wrench",Hammer:"Hammer",Home:"Home",Search:"Search",Menu:"Menu",Grid:"Grid3X3",List:"List",Plus:"Plus",Minus:"Minus",X:"X",Check:"Check",ArrowRight:"ArrowRight",Zap:"Zap",Target:"Target",Flag:"Flag",Bookmark:"Bookmark",Gift:"Gift",Bell:"Bell",BellRing:"BellRing",Calendar:"Calendar",Clock:"Clock",MapPin:"MapPin",Globe:"Globe",Link:"Link",Download:"Download",Upload:"Upload",Share:"Share",Copy:"Copy",Edit:"Edit",Trash:"Trash",Eye:"Eye",EyeOff:"EyeOff",Lock:"Lock",Unlock:"Unlock",Shield:"Shield",AlertCircle:"AlertCircle",AlertTriangle:"AlertTriangle",CheckCircle:"CheckCircle",XCircle:"XCircle",MinusCircle:"MinusCircle",PlusCircle:"PlusCircle",Play:"Play",Pause:"Pause",Stop:"Square",SkipBack:"SkipBack",SkipForward:"SkipForward",Volume:"Volume2",VolumeX:"VolumeX",Mic:"Mic",MicOff:"MicOff",Camera:"Camera",Video:"Video",Image:"Image",File:"File",FileText:"FileText",Folder:"Folder",FolderOpen:"FolderOpen",Database:"Database",Server:"Server",Monitor:"Monitor",Smartphone:"Smartphone",Tablet:"Tablet",Laptop:"Laptop",Activity:"Activity"},ye=((Ge=G.chatButton)==null?void 0:Ge.iconName)||"MessageSquare",Ce=oe[ye]||"MessageSquare",he=NMt[Ce]||A5;return An.jsxs("div",{className:"fixed bottom-8 right-8 z-50 flex flex-col items-end font-sans",style:{fontFamily:OMt},children:[t&&An.jsxs("div",{className:"mb-4 w-full rounded-2xl shadow-elegant flex flex-col overflow-hidden border-0 transition-all duration-300 ease-in-out animate-slide-in-up backdrop-blur-lg",style:{background:G.input.background,height:Di.WINDOW_DIMENSIONS.HEIGHT,maxHeight:Di.WINDOW_DIMENSIONS.MAX_HEIGHT,width:GMt(R),minWidth:jMt(R),backdropFilter:"blur(20px)",WebkitBackdropFilter:"blur(20px)",border:"1px solid rgba(255, 255, 255, 0.2)",boxShadow:`
|
|
9188
9188
|
0 25px 50px -12px rgba(0, 0, 0, 0.15),
|
|
9189
9189
|
0 0 0 1px rgba(255, 255, 255, 0.1),
|
|
9190
9190
|
inset 0 1px 0 rgba(255, 255, 255, 0.1)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "react";
|
|
2
|
-
import { bR as i, bR as s, bS as b, bT as o, bU as d, bV as g, bW as n, bX as p, bY as f, bZ as r } from "./index-
|
|
2
|
+
import { bR as i, bR as s, bS as b, bT as o, bU as d, bV as g, bW as n, bX as p, bY as f, bZ as r } from "./index-BTpDcWCv.js";
|
|
3
3
|
typeof window < "u" && (window.global = window);
|
|
4
4
|
export {
|
|
5
5
|
i as ChatWidget,
|
|
@@ -9175,7 +9175,7 @@ Take a look at the reducer(s) handling this action type: ${g.type}.
|
|
|
9175
9175
|
to { transform: rotate(360deg); }
|
|
9176
9176
|
}
|
|
9177
9177
|
`})]}),pt.jsx("div",{ref:t,style:{display:"flex",justifyContent:"center",overflow:"auto"}})]}):null},qfn=e=>{var t,n;if(!e)return typeof window<"u"&&(t=window.matchMedia)!=null&&t.call(window,"(prefers-color-scheme: dark)").matches?"dark":"light";const r=e.closest(".markdown-content");if(r){if(r.classList.contains("dark"))return"dark";if(r.classList.contains("light"))return"light"}if(e.closest(".dark"))return"dark";if(e.closest(".light"))return"light";const i=e.closest("[data-theme]");if(i){const a=i.getAttribute("data-theme");if(a==="dark")return"dark";if(a==="light")return"light"}return typeof window<"u"&&(n=window.matchMedia)!=null&&n.call(window,"(prefers-color-scheme: dark)").matches?"dark":"light"},Zfn=(e,t)=>{const[n,r]=Ye.useState("light"),i=Ye.useRef("light");return Ye.useEffect(()=>{var a,o,s;if(t||typeof window>"u"||typeof document>"u")return;const l=()=>{const d=qfn(e.current);d!==i.current&&(i.current=d,r(d))};l();const u=((a=window.matchMedia)==null?void 0:a.call(window,"(prefers-color-scheme: dark)"))??null,A=()=>l();u==null||u.addEventListener("change",A);const h=typeof MutationObserver<"u"?new MutationObserver(()=>l()):null;if(h){const d=((s=(o=e.current)==null?void 0:o.closest)==null?void 0:s.call(o,".markdown-content"))??null;d&&h.observe(d,{attributes:!0,attributeFilter:["class","data-theme"]}),document.body&&h.observe(document.body,{attributes:!0,attributeFilter:["class","data-theme"]})}return()=>{u==null||u.removeEventListener("change",A),h==null||h.disconnect()}},[t]),t??n},_fn={js:"javascript",jsx:"javascript",ts:"typescript",tsx:"tsx",sh:"bash",shell:"bash",shellsession:"bash",yml:"yaml",yaml:"yaml",py:"python",rb:"ruby",kt:"kotlin",md:"markdown",csharp:"csharp","c#":"csharp","c++":"cpp",tf:"hcl",terraform:"hcl",docker:"dockerfile",dotenv:"env",env:"env",plaintext:"text",text:"text"},$fn=e=>{if(!e)return"";const t=e.match(/(?:^|\s)language-([^\s]+)/);if(!t)return"";const n=t[1].toLowerCase().split("{")[0].split("[")[0].split("<")[0].split(":")[0].trim().replace(/[^a-z0-9+#-]+$/g,"");return n?_fn[n]??n:""},e1n=e=>Ye.Children.toArray(e).map(t=>typeof t=="string"||typeof t=="number"?String(t):"").join("").replace(/\n$/,""),Mst=({code:e})=>{const[t,n]=Ye.useState(!1),r=async()=>{try{await navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),2e3)}catch{const i=document.createElement("textarea");i.value=e,i.style.position="fixed",i.style.opacity="0",document.body.appendChild(i),i.select();try{document.execCommand("copy"),n(!0),setTimeout(()=>n(!1),2e3)}catch(a){console.error("Failed to copy code:",a)}document.body.removeChild(i)}};return pt.jsxs("button",{className:"code-copy-button",onClick:r,title:t?"Copied!":"Copy code","aria-label":t?"Copied!":"Copy code to clipboard",children:[t?pt.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:pt.jsx("path",{d:"M13.5 4.5L6 12L2.5 8.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):pt.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[pt.jsx("path",{d:"M5.5 4.5H3.5C2.94772 4.5 2.5 4.94772 2.5 5.5V12.5C2.5 13.0523 2.94772 13.5 3.5 13.5H10.5C11.0523 13.5 11.5 13.0523 11.5 12.5V10.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),pt.jsx("path",{d:"M6.5 2.5H12.5C13.0523 2.5 13.5 2.94772 13.5 3.5V9.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),pt.jsx("path",{d:"M9.5 6.5L13.5 2.5L9.5 2.5V6.5Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),pt.jsx("span",{className:"code-copy-button-text",children:t?"Copied!":"Copy"})]})},t1n=({inline:e,className:t="",children:n,enableGraphs:r=!0,enableMermaid:i=!0,enableSVG:a=!0,enableCharts:o=!0,enableMusic:s=!0,enableSyntaxHighlighting:l=!0,syntaxTheme:u})=>{const A=Ye.useRef(null),h=Zfn(A,u);if(e)return pt.jsx("code",{className:t,children:n});const d=$fn(t),g=e1n(n);if(o&&(d==="chart"||d==="chart-json"||d==="chart-table"))return pt.jsx("div",{ref:A,children:pt.jsx(Jfn,{code:g,language:d})});if(s&&(d==="abc"||d==="music"))return pt.jsx("div",{ref:A,children:pt.jsx(Xfn,{code:g})});if(r){if(d==="mermaid"&&i)return pt.jsx("div",{ref:A,children:pt.jsx(I$t,{code:g})});if(d==="svg"&&a)return pt.jsx("div",{ref:A,children:pt.jsx(Q$t,{code:g})})}if(l&&d){const f=h==="light"?tUt:nUt;try{return pt.jsxs("div",{ref:A,className:"syntax-highlighted-wrapper code-block-container",children:[pt.jsx(Mst,{code:g}),pt.jsx(aOe,{language:d,style:f,customStyle:{margin:"12px 0",borderRadius:"6px",fontSize:"0.9em"},showLineNumbers:!1,children:g})]})}catch(y){console.warn(`Syntax highlighting failed for "${d}". Falling back to plain code block.`,y)}}return pt.jsxs("div",{ref:A,className:`markdown-code-block code-block-container ${t}`.trim(),children:[pt.jsx(Mst,{code:g}),pt.jsx("pre",{style:{margin:0,padding:0,background:"transparent",border:"none"},children:pt.jsx("code",{children:g})})]})},xst=new Set(["div","pre","blockquote","ul","ol","table","thead","tbody","tr","td","th","h1","h2","h3","h4","h5","h6","section","article","figure"]),n1n=({children:e,href:t="",className:n="",...r})=>{const i=Ye.Children.toArray(e).map(A=>typeof A=="string"?A:"").join("").trim(),a=/^https?:\/\//i.test(t),o=!!(a&&i&&kst(i)===kst(t)),s=a?r1n(t):null,l=!!(o&&s),u=["markdown-link",l?"markdown-link--card":"markdown-link--inline",n].filter(Boolean).join(" ");return pt.jsxs("a",{...r,href:t,target:"_blank",rel:"noopener noreferrer",className:u,children:[pt.jsx("span",{className:"markdown-link__content",children:l&&s?pt.jsxs(pt.Fragment,{children:[pt.jsx("span",{className:"markdown-link__hostname",children:s.hostname}),s.path&&s.path!=="/"&&pt.jsx("span",{className:"markdown-link__path",children:s.path})]}):e}),a&&pt.jsx("span",{className:"markdown-link__icon","aria-hidden":"true",children:pt.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:pt.jsx("path",{d:"M8 16L16 8M16 8H9M16 8V15",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})})]})};function kst(e){return e.trim().replace(/\/$/,"")}function r1n(e){try{const t=new URL(e),n=t.hostname.replace(/^www\./i,""),r=`${t.pathname}${t.search}${t.hash}`||"/";return{hostname:n,path:r}}catch{return null}}const i1n=({content:e,className:t="",disableMath:n=!1,enableGraphs:r=!0,enableMermaid:i=!0,enableSVG:a=!0,enableCharts:o=!0,enableMusic:s=!0,enableSyntaxHighlighting:l=!0,syntaxTheme:u="dark"})=>{const A=mDt(e);if(!A)return null;const h=n?[KLe]:[KLe,[IFt,{singleDollarTextMath:!0}]],d=[];n||d.push([nSt,{throwOnError:!1,errorColor:"#cc0000",strict:!1,trust:!0,macros:{"\\RR":"\\mathbb{R}","\\NN":"\\mathbb{N}","\\ZZ":"\\mathbb{Z}","\\QQ":"\\mathbb{Q}","\\CC":"\\mathbb{C}","\\dx":"\\,dx","\\dy":"\\,dy","\\dt":"\\,dt","\\dz":"\\,dz"}}]);const g={a:n1n,code:f=>{const{className:y,children:B,...w}=f,C=y&&/language-/.test(y),I="inline"in f&&typeof f.inline=="boolean"&&f.inline||!C,M=C;return pt.jsx(t1n,{inline:I,className:y,enableGraphs:r,enableMermaid:i,enableSVG:a,enableCharts:o,enableMusic:s,enableSyntaxHighlighting:l,syntaxTheme:u,"data-block-code":M?"true":void 0,...w,children:B})},p:({node:f,...y})=>{var B;const w=Ye.Children.toArray(y.children).filter(I=>!(typeof I=="string"&&I.trim()==="")).some(I=>{if(!Ye.isValidElement(I))return!1;const M=I.props;return(M==null?void 0:M["data-block-code"])==="true"?!0:typeof I.type=="string"?xst.has(I.type):!1}),C=(B=f==null?void 0:f.children)==null?void 0:B.some(I=>{var M;if(I.type==="code")return!0;if(I.type==="element"){if(I.tagName&&xst.has(I.tagName))return!0;if(I.tagName==="code"){const x=(M=I.properties)==null?void 0:M.className;return Array.isArray(x)?x.some(Q=>typeof Q=="string"&&Q.startsWith("language-")):!0}}return!1});return w||C?pt.jsx(pt.Fragment,{children:y.children}):pt.jsx("p",{...y})}};return pt.jsx("div",{className:`markdown-content ${t}`,children:pt.jsx(pNt,{remarkPlugins:h,rehypePlugins:d,components:g,children:A})})},Qst="schmitech-markdown-renderer-styles",a1n=`${ixt}
|
|
9178
|
-
${rxt}`;(()=>{if(typeof document>"u"||document.getElementById(Qst))return;const e=document.createElement("style");e.id=Qst,e.textContent=a1n,document.head.appendChild(e)})();const o1n=e=>{if(!e)return null;let t=e.trim();if(!t.startsWith("#")||(t=t.replace("#",""),t.length===3&&(t=t.split("").map(r=>r+r).join("")),t.length!==6))return null;const n=parseInt(t,16);return[n>>16&255,n>>8&255,n&255]},s1n=e=>{const t=o1n(e);if(!t)return!1;const[n,r,i]=t.map(o=>o/255);return .2126*n+.7152*r+.0722*i<.5},l1n=e=>{const t=e==null?void 0:e.mode;return t==="dark"||t==="light"?t:t==="system"&&typeof window<"u"&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":s1n(e==null?void 0:e.background)?"dark":"light"},c1n=({message:e,index:t,isLatestAssistantMessage:n,showTypingAnimation:r,theme:i,copiedMessageId:a,onCopyToClipboard:o,onMarkMessageAnimated:s,messagesLength:l,scrollToBottom:u,inputRef:A,hasBeenAnimated:h,typingProgressRef:d,isTypingRef:g,setIsAnimating:f,formatTime:y,lastMessageRef:B})=>{const w=Ye.useMemo(()=>l1n(i),[i]),C=w==="dark"?"dark":"light",I=Ye.useMemo(()=>zC("w-full min-w-0",w),[w]),M=Ye.useMemo(()=>JMt(HYe(e.content||"")),[e.content]),x=new Date;x.setMinutes(x.getMinutes()-(l-t));const Q=Ye.useRef(null);return Ye.useEffect(()=>{n&&!h(e.id)&&e.content&&!r&&s(e.id,l,u)},[n,e.id,e.content,r,s,l,u,h]),Ye.useEffect(()=>{const F=Q.current;if(!F||e.role!=="assistant"||!e.content)return;const k=()=>{if(F.scrollWidth>F.clientWidth){F.classList.add("has-horizontal-scroll");const G=F.scrollLeft;F.scrollLeft=G+1,requestAnimationFrame(()=>{F.scrollLeft=G,setTimeout(()=>{F.scrollLeft=G+.5,requestAnimationFrame(()=>{F.scrollLeft=G})},50)})}else F.classList.remove("has-horizontal-scroll")};k();const T=setTimeout(k,100),R=setTimeout(k,500),U=setTimeout(k,1e3),Y=new ResizeObserver(k);Y.observe(F);const X=()=>{F.scrollWidth>F.clientWidth&&k()};return F.addEventListener("mouseenter",X),()=>{clearTimeout(T),clearTimeout(R),clearTimeout(U),Y.disconnect(),F.removeEventListener("mouseenter",X)}},[e.content,e.role]),An.jsx("div",{className:zC("flex",e.role==="user"?"justify-end":"justify-start"),ref:t===l-1?B:null,children:An.jsxs("div",{className:zC("max-w-[85%] rounded-xl p-4 shadow-sm"),style:{background:e.role==="user"?i.message.user:i.message.assistant,color:e.role==="user"?i.message.userText:i.message.assistantText||i.text.primary,border:e.role==="assistant"?`1px solid ${i.input.border}`:"none",width:"100%",maxWidth:"85%",wordWrap:"break-word",overflowWrap:"anywhere",borderRadius:e.role==="assistant"?"0.75rem":void 0},children:[e.role==="assistant"?e.content?An.jsx("div",{ref:Q,className:"markdown-content-wrapper",style:{overflowX:"scroll",overflowY:"visible",width:"100%",maxWidth:"100%",minWidth:0,scrollbarWidth:"thin",scrollbarColor:"rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.15)"},children:An.jsx(i1n,{content:M,className:I,syntaxTheme:C})}):An.jsx("div",{className:"flex items-center gap-2",children:An.jsxs("div",{className:"typing-dots-container",children:[An.jsx("div",{className:"typing-dot"}),An.jsx("div",{className:"typing-dot"}),An.jsx("div",{className:"typing-dot"})]})}):An.jsx("p",{className:"text-base",style:{overflowWrap:"anywhere",wordBreak:"break-word",whiteSpace:"pre-wrap",width:"100%"},children:e.content}),An.jsxs("div",{className:zC("flex text-xs mt-2",e.role==="user"?"justify-start text-white/70":"justify-between text-gray-400"),children:[An.jsx("span",{children:y(x)}),e.role==="assistant"&&!r&&An.jsxs("div",{className:"relative",children:[An.jsx("button",{onClick:()=>o(e.content,e.id),className:"ml-2 p-1 rounded-full",style:{color:i.text.secondary,transition:"color 0.2s ease",background:"transparent",border:"none",outline:"none"},onMouseEnter:F=>{F.currentTarget.style.setProperty("color",i.text.primary,"important"),F.currentTarget.style.setProperty("background","transparent","important")},onMouseLeave:F=>{F.currentTarget.style.setProperty("color",i.text.secondary,"important"),F.currentTarget.style.setProperty("background","transparent","important")},onMouseDown:F=>{F.currentTarget.style.setProperty("color",i.text.primary,"important"),F.currentTarget.style.setProperty("background","transparent","important"),F.currentTarget.style.setProperty("transform","none","important")},onMouseUp:F=>{F.currentTarget.style.setProperty("color",i.text.primary,"important"),F.currentTarget.style.setProperty("background","transparent","important")},"aria-label":"Copy to clipboard",children:a===e.id?An.jsx(s5,{size:16}):An.jsx(u5,{size:16})}),a===e.id&&An.jsx("div",{className:"absolute bottom-full right-0 mb-1 px-2 py-1 text-xs rounded-md shadow-sm animate-fade-in-out whitespace-nowrap",style:{backgroundColor:i.secondary,color:i.text.inverse},children:"Copied!"})]})]})]})})},u1n=Ye.memo(c1n,(e,t)=>e.message.id===t.message.id&&e.message.content===t.message.content&&e.message.role===t.message.role&&e.index===t.index&&e.isLatestAssistantMessage===t.isLatestAssistantMessage&&e.showTypingAnimation===t.showTypingAnimation&&e.copiedMessageId===t.copiedMessageId&&e.messagesLength===t.messagesLength&&e.theme===t.theme),A1n=({messages:e,isLoading:t,theme:n,currentConfig:r,showScrollTop:i,showScrollBottom:a,isAnimating:o,messagesContainerRef:s,messagesEndRef:l,scrollToTop:u,scrollToBottom:A,handleScroll:h,sendMessage:d,focusInput:g,copiedMessageId:f,onCopyToClipboard:y,onMarkMessageAnimated:B,inputRef:w,hasBeenAnimated:C,typingProgressRef:I,isTypingRef:M,setIsAnimating:x,formatTime:Q,lastMessageRef:F,maxSuggestedQuestionLength:k,maxSuggestedQuestionQueryLength:T})=>{const U=(()=>{const X=n.input.background;return!X||X==="transparent"||X.includes("rgba")||X.includes("hsla")?"#ffffff":X.match(/^#[0-9A-Fa-f]{8}$/)?X.substring(0,7):X})(),Y=Ye.useMemo(()=>e.map((X,D)=>{const G=X.role==="assistant"&&D===e.length-1,O=G&&t;return An.jsx(u1n,{message:X,index:D,isLatestAssistantMessage:G,showTypingAnimation:O,theme:n,copiedMessageId:f,onCopyToClipboard:y,onMarkMessageAnimated:B,messagesLength:e.length,scrollToBottom:A,inputRef:w,hasBeenAnimated:C,typingProgressRef:I,isTypingRef:M,setIsAnimating:x,formatTime:Q,lastMessageRef:F},X.id)}),[e,t,n,f,y,B,A,w,C,I,M,x,Q,F]);return An.jsxs("div",{className:"flex-1 overflow-hidden relative",style:{background:U,backgroundColor:U,isolation:"isolate"},children:[An.jsx("div",{className:"absolute inset-0",style:{background:U,backgroundColor:U,zIndex:0,pointerEvents:"none"}}),An.jsxs("div",{ref:s,className:"h-full w-full overflow-y-auto relative messages-container",style:{background:U,backgroundColor:U,overflowY:"auto",overflowX:"hidden",height:"100%",maxHeight:"100%",boxSizing:"border-box",paddingTop:"8px",paddingLeft:"8px",paddingRight:"8px",paddingBottom:"0px",position:"relative",zIndex:1},onScroll:h,children:[i&&An.jsx("button",{onClick:u,className:"sticky top-3 left-[calc(100%-48px)] z-10 flex items-center justify-center p-2 rounded-full shadow-md",style:{backgroundColor:n.primary,color:n.text.inverse},"aria-label":"Scroll to top",title:"Scroll to top",children:An.jsx(c5,{size:Di.BUTTON_SIZES.ICON_SIZES.BUTTON})}),a&&!o&&An.jsx("button",{onClick:()=>A(),className:"sticky bottom-3 left-[calc(100%-48px)] z-10 flex items-center justify-center p-2 rounded-full shadow-md",style:{backgroundColor:n.primary,color:n.text.inverse},"aria-label":"Scroll to bottom",title:"Scroll to bottom",children:An.jsx(l5,{size:Di.BUTTON_SIZES.ICON_SIZES.BUTTON})}),e.length===0?An.jsxs("div",{className:"py-2",children:[An.jsx("div",{className:"w-full px-3 mb-6",children:An.jsxs("div",{className:"max-w-lg mx-auto sm:max-w-2xl",children:[An.jsx("h4",{className:"font-bold text-xl mb-2 px-1 mt-3",style:{color:n.text.primary},children:r.welcome.title}),An.jsx("p",{className:"text-lg px-1",style:{color:n.text.secondary},children:r.welcome.description})]})}),An.jsx("div",{className:"w-full px-3",children:An.jsx("div",{className:"flex flex-col gap-3 max-w-lg mx-auto sm:max-w-2xl",children:r.suggestedQuestions.slice(0,5).map((X,D)=>{var j,z;const G=T??Di.MAX_SUGGESTED_QUESTION_QUERY_LENGTH,O=k??Di.MAX_SUGGESTED_QUESTION_LENGTH,P=((j=X.query)==null?void 0:j.length)>G?X.query.substring(0,G):X.query,H=((z=X.text)==null?void 0:z.length)>O?`${X.text.substring(0,O)}...`:X.text;return An.jsx("button",{onClick:()=>{d(P),setTimeout(()=>{g()},Di.ANIMATIONS.TOGGLE_DELAY)},className:"group w-full text-left transition-all duration-300 ease-in-out transform hover:scale-[1.02] active:scale-[0.98]",style:{minHeight:"48px",background:"transparent"},title:P,children:An.jsx("div",{className:"w-full px-4 py-3 rounded-xl border transition-all duration-300 ease-in-out cursor-pointer group-hover:shadow-md group-active:shadow-sm",style:{background:n.suggestedQuestions.questionsBackground||"#ffffff",borderColor:n.suggestedQuestions.text||"#e5e7eb",color:n.suggestedQuestions.text,fontWeight:500,boxShadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)"},onMouseEnter:K=>{K.currentTarget.style.background=n.suggestedQuestions.highlightedBackground||"#f8fafc",K.currentTarget.style.borderColor=n.primary,K.currentTarget.style.transform="translateY(-1px)",K.currentTarget.style.boxShadow="0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)";const Z=K.currentTarget.querySelector("span");Z&&(Z.style.color="#1F2937")},onMouseLeave:K=>{K.currentTarget.style.background=n.suggestedQuestions.questionsBackground||"#ffffff",K.currentTarget.style.borderColor=n.suggestedQuestions.text||"#e5e7eb",K.currentTarget.style.transform="translateY(0)",K.currentTarget.style.boxShadow="0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)";const Z=K.currentTarget.querySelector("span");Z&&(Z.style.color=n.suggestedQuestions.text||"#1F2937",Z.style.removeProperty("color"))},children:An.jsxs("div",{className:"flex items-center justify-between",children:[An.jsx("span",{className:"text-base leading-relaxed transition-colors duration-200",children:H}),An.jsx("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity duration-200 transform translate-x-1 group-hover:translate-x-0",style:{color:n.primary},children:An.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[An.jsx("path",{d:"M5 12h14"}),An.jsx("path",{d:"m12 5 7 7-7 7"})]})})]})})},D)})})})]}):An.jsxs("div",{className:"space-y-3",children:[Y,t&&e.length===0&&An.jsx("div",{className:"flex justify-start",children:An.jsx("div",{className:"bg-white border border-gray-200 rounded-xl rounded-tl-none max-w-[85%] p-4 shadow-sm",children:An.jsxs("div",{className:"text-gray-500",children:[An.jsx("span",{className:"font-medium text-lg",children:"Thinking"}),An.jsxs("span",{className:"animate-dots ml-1",children:[An.jsx("span",{className:"dot",children:"."}),An.jsx("span",{className:"dot",children:"."}),An.jsx("span",{className:"dot",children:"."})]})]})})}),An.jsx("div",{ref:l})]})]})]})},h1n=Ye.memo(A1n,(e,t)=>e.messages===t.messages&&e.isLoading===t.isLoading&&e.showScrollTop===t.showScrollTop&&e.showScrollBottom===t.showScrollBottom&&e.isAnimating===t.isAnimating&&e.copiedMessageId===t.copiedMessageId&&e.theme===t.theme&&e.currentConfig===t.currentConfig&&e.maxSuggestedQuestionLength===t.maxSuggestedQuestionLength&&e.maxSuggestedQuestionQueryLength===t.maxSuggestedQuestionQueryLength),d1n=({message:e,isFocused:t,isLoading:n,theme:r,inputRef:i,handleMessageChange:a,handleKeyDown:o,handleSendMessage:s,setIsFocused:l})=>{const A=(()=>{const h=r.input.background;return!h||h==="transparent"||h.includes("rgba")||h.includes("hsla")?"#ffffff":h.match(/^#[0-9A-Fa-f]{8}$/)?h.substring(0,7):h})();return An.jsxs("div",{className:"border-t-0 shrink-0 relative",style:{background:A,backgroundColor:A,borderTopLeftRadius:0,borderTopRightRadius:0,zIndex:10,position:"relative",marginTop:"-2px",paddingTop:"18px",paddingLeft:"16px",paddingRight:"16px",paddingBottom:"16px",isolation:"isolate"},children:[An.jsx("div",{className:"absolute inset-0",style:{background:A,backgroundColor:A,zIndex:-2,pointerEvents:"none"}}),An.jsx("div",{className:"absolute inset-0",style:{background:A,backgroundColor:A,zIndex:-1,pointerEvents:"none"}}),An.jsxs("div",{className:"relative rounded-2xl transition-all duration-300 overflow-hidden input-modern shadow-soft",style:{borderColor:r.secondary||r.input.border||"#9ca3af",border:"1.5px solid",background:A,backgroundColor:A,boxShadow:"none",isolation:"isolate",outline:"none",outlineOffset:"0px"},children:[An.jsx("div",{className:"absolute inset-0 rounded-2xl",style:{background:A,backgroundColor:A,zIndex:0,pointerEvents:"none"}}),An.jsx("textarea",{ref:i,value:e,onChange:a,onKeyDown:o,onFocus:()=>l(!0),onBlur:()=>l(!1),placeholder:"Type your message...",maxLength:Di.MAX_MESSAGE_LENGTH,id:"chat-message-input",name:"chat-message-input",className:"w-full resize-none relative",style:{background:A,backgroundColor:A,color:r.text.primary,height:"52px",minHeight:"52px",maxHeight:"120px",overflow:"auto",lineHeight:"1.5",boxSizing:"border-box",fontWeight:"400",textAlign:"left",border:"none",boxShadow:"none",outline:"none",paddingLeft:"24px",paddingRight:"60px",paddingTop:"16px",paddingBottom:"16px",fontSize:"16px",fontFamily:"inherit",position:"relative",zIndex:1}}),An.jsxs("button",{onClick:s,disabled:!e.trim()||n,className:zC("absolute right-3 top-1/2 transform -translate-y-1/2 rounded-xl shrink-0 overflow-hidden group",e.trim()&&!n?"hover:scale-105 transition-all duration-300":"cursor-not-allowed opacity-50"),style:{background:e.trim()&&!n?`linear-gradient(135deg, ${r.secondary}, ${r.secondary}e6)`:"linear-gradient(135deg, #e5e7eb, #f3f4f6)",color:e.trim()&&!n?"white":"#9ca3af",width:"44px",height:"40px",minHeight:"40px",padding:"0",border:"none",boxShadow:"none",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,position:"absolute",zIndex:10,transform:"translateY(-50%)",right:"12px"},"aria-label":"Send message",children:[An.jsx("div",{className:"absolute inset-0 opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:"linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0))"}}),An.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",position:"relative"},children:An.jsx(h5,{size:Di.BUTTON_SIZES.ICON_SIZES.SEND,className:"transition-transform duration-200 drop-shadow-sm",style:{strokeWidth:2,position:"relative",display:"block"}})})]})]})]})},Gle=e=>{var Ge,ue,rt,Se,At,it,je;const[t,n]=Ye.useState(!1),[r,i]=Ye.useState(!1),[a,o]=Ye.useState(!1),[s,l]=Ye.useState(null),{isAnimating:u,typingProgressRef:A,isTypingRef:h,lastMessageRef:d,markMessageAnimated:g,hasBeenAnimated:f,clearAnimationTrackers:y,setIsAnimating:B}=$Mt(),{showScrollTop:w,showScrollBottom:C,messagesContainerRef:I,messagesEndRef:M,shouldScrollRef:x,scrollTimeoutRef:Q,scrollToBottom:F,scrollToTop:k,handleScroll:T}=_Mt(u),[R,U]=Ye.useState(window.innerWidth);Ye.useEffect(()=>{const ze=()=>U(window.innerWidth);return window.addEventListener("resize",ze),()=>window.removeEventListener("resize",ze)},[]);const Y=UC(),[X,D]=Ye.useState({...Y,...e}),G=X.theme||WYe;Ye.useEffect(()=>{e.apiUrl&&e.apiKey&&e.sessionId&&RC(e.apiUrl,e.apiKey,e.sessionId)},[e.apiUrl,e.apiKey,e.sessionId]),Ye.useEffect(()=>{const ze=xe=>{D(Te=>{var be,Ue,ve,tt;return{...Te,...xe.detail,theme:{...Te.theme,...xe.detail.theme,suggestedQuestions:{...(be=Te.theme)==null?void 0:be.suggestedQuestions,...(Ue=xe.detail.theme)==null?void 0:Ue.suggestedQuestions},chatButton:{...(ve=Te.theme)==null?void 0:ve.chatButton,...(tt=xe.detail.theme)==null?void 0:tt.chatButton}}}})};return window.addEventListener("chatbot-config-update",ze),()=>{window.removeEventListener("chatbot-config-update",ze)}},[]),Ye.useEffect(()=>{e&&D(ze=>({...ze,...e}))},[e]),Ye.useEffect(()=>{HMt({MAX_SUGGESTED_QUESTION_LENGTH:e.maxSuggestedQuestionLength??Di.MAX_SUGGESTED_QUESTION_LENGTH,MAX_SUGGESTED_QUESTION_QUERY_LENGTH:e.maxSuggestedQuestionQueryLength??Di.MAX_SUGGESTED_QUESTION_QUERY_LENGTH})},[e.maxSuggestedQuestionLength,e.maxSuggestedQuestionQueryLength]);const{messages:O,isLoading:P,sendMessage:H,deleteConversation:j}=gge(),{message:z,isFocused:K,inputRef:Z,handleMessageChange:_,handleKeyDown:re,handleSendMessage:ie,setIsFocused:le,focusInput:Ee}=ext({onSendMessage:ze=>{x.current=!0,H(ze),setTimeout(()=>F(!0),Di.ANIMATIONS.TOGGLE_DELAY)},isLoading:P,isOpen:t});Ye.useEffect(()=>{O.length===0&&y()},[O.length,y]);const me=()=>{n(!t),t||(i(!1),setTimeout(()=>F(!0),Di.ANIMATIONS.TOGGLE_DELAY))},ce=Ye.useCallback(async(ze,xe)=>{try{await navigator.clipboard.writeText(ze),l(xe),setTimeout(()=>{l(null)},Di.ANIMATIONS.COPY_FEEDBACK_DURATION)}catch(Te){console.error("Failed to copy text: ",Te)}},[]),fe=Ye.useCallback(async()=>{try{await j()}catch(ze){console.error("Failed to delete conversation:",ze)}finally{y()}},[j,y]),pe=Ye.useCallback(ze=>ze.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),[]);Ye.useEffect(()=>{(P||O.length===0)&&F(!0)},[O,P,F]),Ye.useEffect(()=>()=>{Q.current&&clearTimeout(Q.current)},[Q]);const oe={MessageSquare:"MessageSquare",MessageCircle:"MessageCircle",MessageCircleMore:"MoreHorizontal",MessageSquareText:"MessageSquareText",MessageSquareDots:"MessageSquareDot",ChatBubble:"MessageCircle",ChatBubbleLeft:"MessageCircle",ChatBubbleLeftRight:"MessageCircle",ChatBubbleLeftEllipsis:"MessageCircle",ChatBubbleLeftDots:"MessageCircle",HelpCircle:"HelpCircle",QuestionMarkCircle:"HelpCircle",Info:"Info",Lightbulb:"Lightbulb",Sparkles:"Sparkles",Headphones:"Headphones",LifeBuoy:"LifeBuoy",Bot:"Bot",Brain:"Brain",Cpu2:"Cpu",User:"User",Users:"Users",UserCheck:"UserCheck",UserPlus:"UserPlus",UserRound:"UserRound",Smile:"Smile",Phone:"Phone",Mail:"Mail",MailOpen:"MailOpen",Send:"Send",Reply:"Reply",Heart:"Heart",Star:"Star",ThumbsUp:"ThumbsUp",Laugh:"Laugh",Settings:"Settings",Cog:"Settings",Wrench:"Wrench",Tool:"Wrench",Hammer:"Hammer",Home:"Home",Search:"Search",Menu:"Menu",Grid:"Grid3X3",List:"List",Plus:"Plus",Minus:"Minus",X:"X",Check:"Check",ArrowRight:"ArrowRight",Zap:"Zap",Target:"Target",Flag:"Flag",Bookmark:"Bookmark",Gift:"Gift",Bell:"Bell",BellRing:"BellRing",Calendar:"Calendar",Clock:"Clock",MapPin:"MapPin",Globe:"Globe",Link:"Link",Download:"Download",Upload:"Upload",Share:"Share",Copy:"Copy",Edit:"Edit",Trash:"Trash",Eye:"Eye",EyeOff:"EyeOff",Lock:"Lock",Unlock:"Unlock",Shield:"Shield",AlertCircle:"AlertCircle",AlertTriangle:"AlertTriangle",CheckCircle:"CheckCircle",XCircle:"XCircle",MinusCircle:"MinusCircle",PlusCircle:"PlusCircle",Play:"Play",Pause:"Pause",Stop:"Square",SkipBack:"SkipBack",SkipForward:"SkipForward",Volume:"Volume2",VolumeX:"VolumeX",Mic:"Mic",MicOff:"MicOff",Camera:"Camera",Video:"Video",Image:"Image",File:"File",FileText:"FileText",Folder:"Folder",FolderOpen:"FolderOpen",Database:"Database",Server:"Server",Monitor:"Monitor",Smartphone:"Smartphone",Tablet:"Tablet",Laptop:"Laptop",Activity:"Activity"},ye=((Ge=G.chatButton)==null?void 0:Ge.iconName)||"MessageSquare",Ce=oe[ye]||"MessageSquare",he=NMt[Ce]||A5;return An.jsxs("div",{className:"fixed bottom-8 right-8 z-50 flex flex-col items-end font-sans",style:{fontFamily:OMt},children:[t&&An.jsxs("div",{className:"mb-4 w-full rounded-2xl shadow-elegant flex flex-col overflow-hidden border-0 transition-all duration-300 ease-in-out animate-slide-in-up backdrop-blur-lg",style:{background:G.input.background,height:Di.WINDOW_DIMENSIONS.HEIGHT,maxHeight:Di.WINDOW_DIMENSIONS.MAX_HEIGHT,width:GMt(R),minWidth:jMt(R),backdropFilter:"blur(20px)",WebkitBackdropFilter:"blur(20px)",border:"1px solid rgba(255, 255, 255, 0.2)",boxShadow:`
|
|
9178
|
+
${rxt}`;(()=>{if(typeof document>"u"||document.getElementById(Qst))return;const e=document.createElement("style");e.id=Qst,e.textContent=a1n,document.head.appendChild(e)})();const o1n=e=>{if(!e)return null;let t=e.trim();if(!t.startsWith("#")||(t=t.replace("#",""),t.length===3&&(t=t.split("").map(r=>r+r).join("")),t.length!==6))return null;const n=parseInt(t,16);return[n>>16&255,n>>8&255,n&255]},s1n=e=>{const t=o1n(e);if(!t)return!1;const[n,r,i]=t.map(o=>o/255);return .2126*n+.7152*r+.0722*i<.5},l1n=e=>{const t=e==null?void 0:e.mode;return t==="dark"||t==="light"?t:t==="system"&&typeof window<"u"&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":s1n(e==null?void 0:e.background)?"dark":"light"},c1n=({message:e,index:t,isLatestAssistantMessage:n,showTypingAnimation:r,theme:i,copiedMessageId:a,onCopyToClipboard:o,onMarkMessageAnimated:s,messagesLength:l,scrollToBottom:u,inputRef:A,hasBeenAnimated:h,typingProgressRef:d,isTypingRef:g,setIsAnimating:f,formatTime:y,lastMessageRef:B})=>{const w=Ye.useMemo(()=>l1n(i),[i]),C=w==="dark"?"dark":"light",I=Ye.useMemo(()=>zC("w-full min-w-0",w),[w]),M=Ye.useMemo(()=>JMt(HYe(e.content||"")),[e.content]),x=new Date;x.setMinutes(x.getMinutes()-(l-t));const Q=Ye.useRef(null);return Ye.useEffect(()=>{n&&!h(e.id)&&e.content&&!r&&s(e.id,l,u)},[n,e.id,e.content,r,s,l,u,h]),Ye.useEffect(()=>{const F=Q.current;if(!F||e.role!=="assistant"||!e.content)return;const k=()=>{if(F.scrollWidth>F.clientWidth){F.classList.add("has-horizontal-scroll");const G=F.scrollLeft;F.scrollLeft=G+1,requestAnimationFrame(()=>{F.scrollLeft=G,setTimeout(()=>{F.scrollLeft=G+.5,requestAnimationFrame(()=>{F.scrollLeft=G})},50)})}else F.classList.remove("has-horizontal-scroll")};k();const T=setTimeout(k,100),R=setTimeout(k,500),U=setTimeout(k,1e3),Y=new ResizeObserver(k);Y.observe(F);const X=()=>{F.scrollWidth>F.clientWidth&&k()};return F.addEventListener("mouseenter",X),()=>{clearTimeout(T),clearTimeout(R),clearTimeout(U),Y.disconnect(),F.removeEventListener("mouseenter",X)}},[e.content,e.role]),An.jsx("div",{className:zC("flex",e.role==="user"?"justify-end":"justify-start"),ref:t===l-1?B:null,children:An.jsxs("div",{className:zC("max-w-[85%] rounded-xl p-4 shadow-sm"),style:{background:e.role==="user"?i.message.user:i.message.assistant,color:e.role==="user"?i.message.userText:i.message.assistantText||i.text.primary,border:e.role==="assistant"?`1px solid ${i.input.border}`:"none",width:"100%",maxWidth:"85%",wordWrap:"break-word",overflowWrap:"anywhere",borderRadius:e.role==="assistant"?"0.75rem":void 0},children:[e.role==="assistant"?e.content?An.jsx("div",{ref:Q,className:"markdown-content-wrapper",style:{overflowX:"scroll",overflowY:"visible",width:"100%",maxWidth:"100%",minWidth:0,scrollbarWidth:"thin",scrollbarColor:"rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.15)"},children:An.jsx(i1n,{content:M,className:I,syntaxTheme:C})}):An.jsx("div",{className:"flex items-center gap-2",children:An.jsxs("div",{className:"typing-dots-container",children:[An.jsx("div",{className:"typing-dot"}),An.jsx("div",{className:"typing-dot"}),An.jsx("div",{className:"typing-dot"})]})}):An.jsx("p",{className:"text-base",style:{overflowWrap:"anywhere",wordBreak:"break-word",whiteSpace:"pre-wrap",width:"100%"},children:e.content}),An.jsxs("div",{className:zC("flex text-xs mt-2",e.role==="user"?"justify-start text-white/70":"justify-between text-gray-400"),children:[An.jsx("span",{children:y(x)}),e.role==="assistant"&&!r&&An.jsxs("div",{className:"relative",children:[An.jsx("button",{onClick:()=>o(e.content,e.id),className:"ml-2 p-1 rounded-full",style:{color:i.text.secondary,transition:"color 0.2s ease",background:"transparent",border:"none",outline:"none"},onMouseEnter:F=>{F.currentTarget.style.setProperty("color",i.text.primary,"important"),F.currentTarget.style.setProperty("background","transparent","important")},onMouseLeave:F=>{F.currentTarget.style.setProperty("color",i.text.secondary,"important"),F.currentTarget.style.setProperty("background","transparent","important")},onMouseDown:F=>{F.currentTarget.style.setProperty("color",i.text.primary,"important"),F.currentTarget.style.setProperty("background","transparent","important"),F.currentTarget.style.setProperty("transform","none","important")},onMouseUp:F=>{F.currentTarget.style.setProperty("color",i.text.primary,"important"),F.currentTarget.style.setProperty("background","transparent","important")},"aria-label":"Copy to clipboard",children:a===e.id?An.jsx(s5,{size:16}):An.jsx(u5,{size:16})}),a===e.id&&An.jsx("div",{className:"absolute bottom-full right-0 mb-1 px-2 py-1 text-xs rounded-md shadow-sm animate-fade-in-out whitespace-nowrap",style:{backgroundColor:i.secondary,color:i.text.inverse},children:"Copied!"})]})]})]})})},u1n=Ye.memo(c1n,(e,t)=>e.message.id===t.message.id&&e.message.content===t.message.content&&e.message.role===t.message.role&&e.index===t.index&&e.isLatestAssistantMessage===t.isLatestAssistantMessage&&e.showTypingAnimation===t.showTypingAnimation&&e.copiedMessageId===t.copiedMessageId&&e.messagesLength===t.messagesLength&&e.theme===t.theme),A1n=({messages:e,isLoading:t,theme:n,currentConfig:r,showScrollTop:i,showScrollBottom:a,isAnimating:o,messagesContainerRef:s,messagesEndRef:l,scrollToTop:u,scrollToBottom:A,handleScroll:h,sendMessage:d,focusInput:g,copiedMessageId:f,onCopyToClipboard:y,onMarkMessageAnimated:B,inputRef:w,hasBeenAnimated:C,typingProgressRef:I,isTypingRef:M,setIsAnimating:x,formatTime:Q,lastMessageRef:F,maxSuggestedQuestionLength:k,maxSuggestedQuestionQueryLength:T})=>{const U=(()=>{const X=n.input.background;return!X||X==="transparent"||X.includes("rgba")||X.includes("hsla")?"#ffffff":X.match(/^#[0-9A-Fa-f]{8}$/)?X.substring(0,7):X})(),Y=Ye.useMemo(()=>e.map((X,D)=>{const G=X.role==="assistant"&&D===e.length-1,O=G&&t;return An.jsx(u1n,{message:X,index:D,isLatestAssistantMessage:G,showTypingAnimation:O,theme:n,copiedMessageId:f,onCopyToClipboard:y,onMarkMessageAnimated:B,messagesLength:e.length,scrollToBottom:A,inputRef:w,hasBeenAnimated:C,typingProgressRef:I,isTypingRef:M,setIsAnimating:x,formatTime:Q,lastMessageRef:F},X.id)}),[e,t,n,f,y,B,A,w,C,I,M,x,Q,F]);return An.jsxs("div",{className:"flex-1 overflow-hidden relative",style:{background:U,backgroundColor:U,isolation:"isolate"},children:[An.jsx("div",{className:"absolute inset-0",style:{background:U,backgroundColor:U,zIndex:0,pointerEvents:"none"}}),An.jsxs("div",{ref:s,className:"h-full w-full overflow-y-auto relative messages-container",style:{background:U,backgroundColor:U,overflowY:"auto",overflowX:"hidden",height:"100%",maxHeight:"100%",boxSizing:"border-box",paddingTop:"8px",paddingLeft:"8px",paddingRight:"8px",paddingBottom:"0px",position:"relative",zIndex:1},onScroll:h,children:[i&&An.jsx("button",{onClick:u,className:"sticky top-3 left-[calc(100%-48px)] z-10 flex items-center justify-center p-2 rounded-full shadow-md",style:{backgroundColor:n.primary,color:n.text.inverse},"aria-label":"Scroll to top",title:"Scroll to top",children:An.jsx(c5,{size:Di.BUTTON_SIZES.ICON_SIZES.BUTTON})}),a&&!o&&An.jsx("button",{onClick:()=>A(),className:"sticky bottom-3 left-[calc(100%-48px)] z-10 flex items-center justify-center p-2 rounded-full shadow-md",style:{backgroundColor:n.primary,color:n.text.inverse},"aria-label":"Scroll to bottom",title:"Scroll to bottom",children:An.jsx(l5,{size:Di.BUTTON_SIZES.ICON_SIZES.BUTTON})}),e.length===0?An.jsxs("div",{className:"py-2",children:[An.jsx("div",{className:"w-full px-3 mb-6",children:An.jsxs("div",{className:"max-w-lg mx-auto sm:max-w-2xl",children:[An.jsx("h4",{className:"font-bold text-xl mb-2 px-1 mt-3",style:{color:n.text.primary},children:r.welcome.title}),An.jsx("p",{className:"text-lg px-1",style:{color:n.text.secondary},children:r.welcome.description})]})}),An.jsx("div",{className:"w-full px-3",children:An.jsx("div",{className:"flex flex-col gap-3 max-w-lg mx-auto sm:max-w-2xl",children:r.suggestedQuestions.slice(0,5).map((X,D)=>{var j,z;const G=T??Di.MAX_SUGGESTED_QUESTION_QUERY_LENGTH,O=k??Di.MAX_SUGGESTED_QUESTION_LENGTH,P=((j=X.query)==null?void 0:j.length)>G?X.query.substring(0,G):X.query,H=((z=X.text)==null?void 0:z.length)>O?`${X.text.substring(0,O)}...`:X.text;return An.jsx("button",{onClick:()=>{d(P),setTimeout(()=>{g()},Di.ANIMATIONS.TOGGLE_DELAY)},className:"group w-full text-left transition-all duration-300 ease-in-out transform hover:scale-[1.02] active:scale-[0.98]",style:{minHeight:"48px",background:"transparent"},title:P,children:An.jsx("div",{className:"w-full px-4 py-3 rounded-xl transition-all duration-300 ease-in-out cursor-pointer group-hover:shadow-md group-active:shadow-sm",style:{background:n.suggestedQuestions.questionsBackground||"#ffffff",border:`1px solid ${n.suggestedQuestions.text||"#e5e7eb"}`,color:n.suggestedQuestions.text,fontWeight:500,boxShadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)"},onMouseEnter:K=>{K.currentTarget.style.background=n.suggestedQuestions.highlightedBackground||"#f8fafc",K.currentTarget.style.border=`1px solid ${n.primary}`,K.currentTarget.style.transform="translateY(-1px)",K.currentTarget.style.boxShadow="0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)";const Z=K.currentTarget.querySelector("span");Z&&(Z.style.color="#1F2937")},onMouseLeave:K=>{K.currentTarget.style.background=n.suggestedQuestions.questionsBackground||"#ffffff",K.currentTarget.style.border=`1px solid ${n.suggestedQuestions.text||"#e5e7eb"}`,K.currentTarget.style.transform="translateY(0)",K.currentTarget.style.boxShadow="0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)";const Z=K.currentTarget.querySelector("span");Z&&(Z.style.color=n.suggestedQuestions.text||"#1F2937",Z.style.removeProperty("color"))},children:An.jsxs("div",{className:"flex items-center justify-between",children:[An.jsx("span",{className:"text-base leading-relaxed transition-colors duration-200",children:H}),An.jsx("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity duration-200 transform translate-x-1 group-hover:translate-x-0",style:{color:n.primary},children:An.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[An.jsx("path",{d:"M5 12h14"}),An.jsx("path",{d:"m12 5 7 7-7 7"})]})})]})})},D)})})})]}):An.jsxs("div",{className:"space-y-3",children:[Y,t&&e.length===0&&An.jsx("div",{className:"flex justify-start",children:An.jsx("div",{className:"bg-white border border-gray-200 rounded-xl rounded-tl-none max-w-[85%] p-4 shadow-sm",children:An.jsxs("div",{className:"text-gray-500",children:[An.jsx("span",{className:"font-medium text-lg",children:"Thinking"}),An.jsxs("span",{className:"animate-dots ml-1",children:[An.jsx("span",{className:"dot",children:"."}),An.jsx("span",{className:"dot",children:"."}),An.jsx("span",{className:"dot",children:"."})]})]})})}),An.jsx("div",{ref:l})]})]})]})},h1n=Ye.memo(A1n,(e,t)=>e.messages===t.messages&&e.isLoading===t.isLoading&&e.showScrollTop===t.showScrollTop&&e.showScrollBottom===t.showScrollBottom&&e.isAnimating===t.isAnimating&&e.copiedMessageId===t.copiedMessageId&&e.theme===t.theme&&e.currentConfig===t.currentConfig&&e.maxSuggestedQuestionLength===t.maxSuggestedQuestionLength&&e.maxSuggestedQuestionQueryLength===t.maxSuggestedQuestionQueryLength),d1n=({message:e,isFocused:t,isLoading:n,theme:r,inputRef:i,handleMessageChange:a,handleKeyDown:o,handleSendMessage:s,setIsFocused:l})=>{const A=(()=>{const h=r.input.background;return!h||h==="transparent"||h.includes("rgba")||h.includes("hsla")?"#ffffff":h.match(/^#[0-9A-Fa-f]{8}$/)?h.substring(0,7):h})();return An.jsxs("div",{className:"border-t-0 shrink-0 relative",style:{background:A,backgroundColor:A,borderTopLeftRadius:0,borderTopRightRadius:0,zIndex:10,position:"relative",marginTop:"-2px",paddingTop:"18px",paddingLeft:"16px",paddingRight:"16px",paddingBottom:"16px",isolation:"isolate"},children:[An.jsx("div",{className:"absolute inset-0",style:{background:A,backgroundColor:A,zIndex:-2,pointerEvents:"none"}}),An.jsx("div",{className:"absolute inset-0",style:{background:A,backgroundColor:A,zIndex:-1,pointerEvents:"none"}}),An.jsxs("div",{className:"relative rounded-2xl transition-all duration-300 overflow-hidden input-modern shadow-soft",style:{border:`1.5px solid ${r.secondary||r.input.border||"#9ca3af"}`,background:A,backgroundColor:A,boxShadow:"none",isolation:"isolate",outline:"none",outlineOffset:"0px"},children:[An.jsx("div",{className:"absolute inset-0 rounded-2xl",style:{background:A,backgroundColor:A,zIndex:0,pointerEvents:"none"}}),An.jsx("textarea",{ref:i,value:e,onChange:a,onKeyDown:o,onFocus:()=>l(!0),onBlur:()=>l(!1),placeholder:"Type your message...",maxLength:Di.MAX_MESSAGE_LENGTH,id:"chat-message-input",name:"chat-message-input",className:"w-full resize-none relative",style:{background:A,backgroundColor:A,color:r.text.primary,height:"52px",minHeight:"52px",maxHeight:"120px",overflow:"auto",lineHeight:"1.5",boxSizing:"border-box",fontWeight:"400",textAlign:"left",border:"none",boxShadow:"none",outline:"none",paddingLeft:"24px",paddingRight:"60px",paddingTop:"16px",paddingBottom:"16px",fontSize:"16px",fontFamily:"inherit",position:"relative",zIndex:1}}),An.jsxs("button",{onClick:s,disabled:!e.trim()||n,className:zC("absolute right-3 top-1/2 transform -translate-y-1/2 rounded-xl shrink-0 overflow-hidden group",e.trim()&&!n?"hover:scale-105 transition-all duration-300":"cursor-not-allowed opacity-50"),style:{background:e.trim()&&!n?`linear-gradient(135deg, ${r.secondary}, ${r.secondary}e6)`:"linear-gradient(135deg, #e5e7eb, #f3f4f6)",color:e.trim()&&!n?"white":"#9ca3af",width:"44px",height:"40px",minHeight:"40px",padding:"0",border:"none",boxShadow:"none",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,position:"absolute",zIndex:10,transform:"translateY(-50%)",right:"12px"},"aria-label":"Send message",children:[An.jsx("div",{className:"absolute inset-0 opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:"linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0))"}}),An.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",position:"relative"},children:An.jsx(h5,{size:Di.BUTTON_SIZES.ICON_SIZES.SEND,className:"transition-transform duration-200 drop-shadow-sm",style:{strokeWidth:2,position:"relative",display:"block"}})})]})]})]})},Gle=e=>{var Ge,ue,rt,Se,At,it,je;const[t,n]=Ye.useState(!1),[r,i]=Ye.useState(!1),[a,o]=Ye.useState(!1),[s,l]=Ye.useState(null),{isAnimating:u,typingProgressRef:A,isTypingRef:h,lastMessageRef:d,markMessageAnimated:g,hasBeenAnimated:f,clearAnimationTrackers:y,setIsAnimating:B}=$Mt(),{showScrollTop:w,showScrollBottom:C,messagesContainerRef:I,messagesEndRef:M,shouldScrollRef:x,scrollTimeoutRef:Q,scrollToBottom:F,scrollToTop:k,handleScroll:T}=_Mt(u),[R,U]=Ye.useState(window.innerWidth);Ye.useEffect(()=>{const ze=()=>U(window.innerWidth);return window.addEventListener("resize",ze),()=>window.removeEventListener("resize",ze)},[]);const Y=UC(),[X,D]=Ye.useState({...Y,...e}),G=X.theme||WYe;Ye.useEffect(()=>{e.apiUrl&&e.apiKey&&e.sessionId&&RC(e.apiUrl,e.apiKey,e.sessionId)},[e.apiUrl,e.apiKey,e.sessionId]),Ye.useEffect(()=>{const ze=xe=>{D(Te=>{var be,Ue,ve,tt;return{...Te,...xe.detail,theme:{...Te.theme,...xe.detail.theme,suggestedQuestions:{...(be=Te.theme)==null?void 0:be.suggestedQuestions,...(Ue=xe.detail.theme)==null?void 0:Ue.suggestedQuestions},chatButton:{...(ve=Te.theme)==null?void 0:ve.chatButton,...(tt=xe.detail.theme)==null?void 0:tt.chatButton}}}})};return window.addEventListener("chatbot-config-update",ze),()=>{window.removeEventListener("chatbot-config-update",ze)}},[]),Ye.useEffect(()=>{e&&D(ze=>({...ze,...e}))},[e]),Ye.useEffect(()=>{HMt({MAX_SUGGESTED_QUESTION_LENGTH:e.maxSuggestedQuestionLength??Di.MAX_SUGGESTED_QUESTION_LENGTH,MAX_SUGGESTED_QUESTION_QUERY_LENGTH:e.maxSuggestedQuestionQueryLength??Di.MAX_SUGGESTED_QUESTION_QUERY_LENGTH})},[e.maxSuggestedQuestionLength,e.maxSuggestedQuestionQueryLength]);const{messages:O,isLoading:P,sendMessage:H,deleteConversation:j}=gge(),{message:z,isFocused:K,inputRef:Z,handleMessageChange:_,handleKeyDown:re,handleSendMessage:ie,setIsFocused:le,focusInput:Ee}=ext({onSendMessage:ze=>{x.current=!0,H(ze),setTimeout(()=>F(!0),Di.ANIMATIONS.TOGGLE_DELAY)},isLoading:P,isOpen:t});Ye.useEffect(()=>{O.length===0&&y()},[O.length,y]);const me=()=>{n(!t),t||(i(!1),setTimeout(()=>F(!0),Di.ANIMATIONS.TOGGLE_DELAY))},ce=Ye.useCallback(async(ze,xe)=>{try{await navigator.clipboard.writeText(ze),l(xe),setTimeout(()=>{l(null)},Di.ANIMATIONS.COPY_FEEDBACK_DURATION)}catch(Te){console.error("Failed to copy text: ",Te)}},[]),fe=Ye.useCallback(async()=>{try{await j()}catch(ze){console.error("Failed to delete conversation:",ze)}finally{y()}},[j,y]),pe=Ye.useCallback(ze=>ze.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),[]);Ye.useEffect(()=>{(P||O.length===0)&&F(!0)},[O,P,F]),Ye.useEffect(()=>()=>{Q.current&&clearTimeout(Q.current)},[Q]);const oe={MessageSquare:"MessageSquare",MessageCircle:"MessageCircle",MessageCircleMore:"MoreHorizontal",MessageSquareText:"MessageSquareText",MessageSquareDots:"MessageSquareDot",ChatBubble:"MessageCircle",ChatBubbleLeft:"MessageCircle",ChatBubbleLeftRight:"MessageCircle",ChatBubbleLeftEllipsis:"MessageCircle",ChatBubbleLeftDots:"MessageCircle",HelpCircle:"HelpCircle",QuestionMarkCircle:"HelpCircle",Info:"Info",Lightbulb:"Lightbulb",Sparkles:"Sparkles",Headphones:"Headphones",LifeBuoy:"LifeBuoy",Bot:"Bot",Brain:"Brain",Cpu2:"Cpu",User:"User",Users:"Users",UserCheck:"UserCheck",UserPlus:"UserPlus",UserRound:"UserRound",Smile:"Smile",Phone:"Phone",Mail:"Mail",MailOpen:"MailOpen",Send:"Send",Reply:"Reply",Heart:"Heart",Star:"Star",ThumbsUp:"ThumbsUp",Laugh:"Laugh",Settings:"Settings",Cog:"Settings",Wrench:"Wrench",Tool:"Wrench",Hammer:"Hammer",Home:"Home",Search:"Search",Menu:"Menu",Grid:"Grid3X3",List:"List",Plus:"Plus",Minus:"Minus",X:"X",Check:"Check",ArrowRight:"ArrowRight",Zap:"Zap",Target:"Target",Flag:"Flag",Bookmark:"Bookmark",Gift:"Gift",Bell:"Bell",BellRing:"BellRing",Calendar:"Calendar",Clock:"Clock",MapPin:"MapPin",Globe:"Globe",Link:"Link",Download:"Download",Upload:"Upload",Share:"Share",Copy:"Copy",Edit:"Edit",Trash:"Trash",Eye:"Eye",EyeOff:"EyeOff",Lock:"Lock",Unlock:"Unlock",Shield:"Shield",AlertCircle:"AlertCircle",AlertTriangle:"AlertTriangle",CheckCircle:"CheckCircle",XCircle:"XCircle",MinusCircle:"MinusCircle",PlusCircle:"PlusCircle",Play:"Play",Pause:"Pause",Stop:"Square",SkipBack:"SkipBack",SkipForward:"SkipForward",Volume:"Volume2",VolumeX:"VolumeX",Mic:"Mic",MicOff:"MicOff",Camera:"Camera",Video:"Video",Image:"Image",File:"File",FileText:"FileText",Folder:"Folder",FolderOpen:"FolderOpen",Database:"Database",Server:"Server",Monitor:"Monitor",Smartphone:"Smartphone",Tablet:"Tablet",Laptop:"Laptop",Activity:"Activity"},ye=((Ge=G.chatButton)==null?void 0:Ge.iconName)||"MessageSquare",Ce=oe[ye]||"MessageSquare",he=NMt[Ce]||A5;return An.jsxs("div",{className:"fixed bottom-8 right-8 z-50 flex flex-col items-end font-sans",style:{fontFamily:OMt},children:[t&&An.jsxs("div",{className:"mb-4 w-full rounded-2xl shadow-elegant flex flex-col overflow-hidden border-0 transition-all duration-300 ease-in-out animate-slide-in-up backdrop-blur-lg",style:{background:G.input.background,height:Di.WINDOW_DIMENSIONS.HEIGHT,maxHeight:Di.WINDOW_DIMENSIONS.MAX_HEIGHT,width:GMt(R),minWidth:jMt(R),backdropFilter:"blur(20px)",WebkitBackdropFilter:"blur(20px)",border:"1px solid rgba(255, 255, 255, 0.2)",boxShadow:`
|
|
9179
9179
|
0 25px 50px -12px rgba(0, 0, 0, 0.15),
|
|
9180
9180
|
0 0 0 1px rgba(255, 255, 255, 0.1),
|
|
9181
9181
|
inset 0 1px 0 rgba(255, 255, 255, 0.1)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { l as Zt } from "./chunk-FMBD7UC4-dPK7Boav-
|
|
2
|
-
import { d as te } from "./chunk-55IACEB6-BocSyyvr
|
|
3
|
-
import { d as ee } from "./chunk-QN33PNHL-vP2PqfVG-
|
|
4
|
-
import { M as p, a as Ot, C as T, p as se, q as ie, r as It, d as q, h as ae, g as ne, e as re, f as ue, s as le, t as oe, m as L, N as ce, E as he, j as pe, aB as R } from "./index-
|
|
1
|
+
import { l as Zt } from "./chunk-FMBD7UC4-dPK7Boav-X2pgY3eu.js";
|
|
2
|
+
import { d as te } from "./chunk-55IACEB6-BocSyyvr-Bn-f_OLg.js";
|
|
3
|
+
import { d as ee } from "./chunk-QN33PNHL-vP2PqfVG-DTvnGeUa.js";
|
|
4
|
+
import { M as p, a as Ot, C as T, p as se, q as ie, r as It, d as q, h as ae, g as ne, e as re, f as ue, s as le, t as oe, m as L, N as ce, E as he, j as pe, aB as R } from "./index-BTpDcWCv.js";
|
|
5
5
|
typeof window < "u" && (window.global = window);
|
|
6
6
|
var vt = function() {
|
|
7
7
|
var t = /* @__PURE__ */ p(function(N, r, h, n) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d as Jt } from "./chunk-55IACEB6-BocSyyvr
|
|
2
|
-
import { d as te } from "./chunk-QN33PNHL-vP2PqfVG-
|
|
3
|
-
import { M as d, a as T, C as P, q as ee, r as se, g as ie, h as re, f as ae, e as ne, s as oe, t as le, aU as ce, m as K, N as he } from "./index-
|
|
1
|
+
import { d as Jt } from "./chunk-55IACEB6-BocSyyvr-Bn-f_OLg.js";
|
|
2
|
+
import { d as te } from "./chunk-QN33PNHL-vP2PqfVG-DTvnGeUa.js";
|
|
3
|
+
import { M as d, a as T, C as P, q as ee, r as se, g as ie, h as re, f as ae, e as ne, s as oe, t as le, aU as ce, m as K, N as he } from "./index-BTpDcWCv.js";
|
|
4
4
|
typeof window < "u" && (window.global = window);
|
|
5
5
|
var Dt = function() {
|
|
6
6
|
var t = /* @__PURE__ */ d(function(B, r, a, y) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as e, F as s, T as t, k as a } from "./chunk-B4BG7PRW-CO8QAyfE-
|
|
2
|
-
import { M as o } from "./index-
|
|
1
|
+
import { D as e, F as s, T as t, k as a } from "./chunk-B4BG7PRW-CO8QAyfE-BfAVnqXP.js";
|
|
2
|
+
import { M as o } from "./index-BTpDcWCv.js";
|
|
3
3
|
typeof window < "u" && (window.global = window);
|
|
4
4
|
var d = {
|
|
5
5
|
parser: t,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as e, F as s, T as t, k as a } from "./chunk-B4BG7PRW-CO8QAyfE-
|
|
2
|
-
import { M as o } from "./index-
|
|
1
|
+
import { D as e, F as s, T as t, k as a } from "./chunk-B4BG7PRW-CO8QAyfE-BfAVnqXP.js";
|
|
2
|
+
import { M as o } from "./index-BTpDcWCv.js";
|
|
3
3
|
typeof window < "u" && (window.global = window);
|
|
4
4
|
var d = {
|
|
5
5
|
parser: t,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as W, a as j, d as lt, y as gt } from "./index-
|
|
1
|
+
import { M as W, a as j, d as lt, y as gt } from "./index-BTpDcWCv.js";
|
|
2
2
|
import { e as tt } from "./cytoscape.esm-CjI2IsL8-Be2K4mI6.js";
|
|
3
3
|
typeof window < "u" && (window.global = window);
|
|
4
4
|
var V = { exports: {} }, z = { exports: {} }, q = { exports: {} }, ut = q.exports, $;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { M as v, o as R, D as F, U as L, b as j, a as t, C as Y, S as z, x as H, G as U, T as $, v as Q, c as I, w as _, O as q, z as K } from "./index-
|
|
2
|
-
import { Q as G, _ as S } from "./graph-BmNkcFEM-
|
|
3
|
-
import { B as V } from "./layout-C0kZPebx-
|
|
4
|
-
import { a as W } from "./clone-DoPb9X13-
|
|
5
|
-
import { M as k } from "./min-7Gb0pNxh-
|
|
1
|
+
import { M as v, o as R, D as F, U as L, b as j, a as t, C as Y, S as z, x as H, G as U, T as $, v as Q, c as I, w as _, O as q, z as K } from "./index-BTpDcWCv.js";
|
|
2
|
+
import { Q as G, _ as S } from "./graph-BmNkcFEM-C-GbdoDL.js";
|
|
3
|
+
import { B as V } from "./layout-C0kZPebx-D44PzJfR.js";
|
|
4
|
+
import { a as W } from "./clone-DoPb9X13-Cp9Sb7vH.js";
|
|
5
|
+
import { M as k } from "./min-7Gb0pNxh-CFulbqFI.js";
|
|
6
6
|
typeof window < "u" && (window.global = window);
|
|
7
7
|
function X(e) {
|
|
8
8
|
var n = {
|
package/dist/{diagram-PSM6KHXK-BqY4RpUg-BAHxSfLA.js → diagram-PSM6KHXK-BqY4RpUg-DBkV5b1N.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { M as w, K as ee, P as te, al as ie, i as ce, bE as R, a as Q, ao as Y, bF as B, d as K, h as de, g as he, s as pe, t as ue, f as fe, e as me, _ as ye, bG as ge, N as xe } from "./index-
|
|
2
|
-
import { d as Se } from "./chunk-QN33PNHL-vP2PqfVG-
|
|
3
|
-
import { m as ve } from "./chunk-4BX2VUAB-CX67kh_B-
|
|
4
|
-
import { j as be } from "./mermaid-parser.core-C88_DDui-
|
|
1
|
+
import { M as w, K as ee, P as te, al as ie, i as ce, bE as R, a as Q, ao as Y, bF as B, d as K, h as de, g as he, s as pe, t as ue, f as fe, e as me, _ as ye, bG as ge, N as xe } from "./index-BTpDcWCv.js";
|
|
2
|
+
import { d as Se } from "./chunk-QN33PNHL-vP2PqfVG-DTvnGeUa.js";
|
|
3
|
+
import { m as ve } from "./chunk-4BX2VUAB-CX67kh_B-CLieQV3-.js";
|
|
4
|
+
import { j as be } from "./mermaid-parser.core-C88_DDui-B7IhiBVD.js";
|
|
5
5
|
typeof window < "u" && (window.global = window);
|
|
6
6
|
function we(t) {
|
|
7
7
|
var a = 0, n = t.children, r = n && n.length;
|
package/dist/{diagram-QEK2KX5R-CTjgBsne-D-9APhrR.js → diagram-QEK2KX5R-CTjgBsne-BBBP6X3G.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { e as S, f as I, t as E, s as F, g as P, h as z, M as l, al as D, N as R, K as y, _ as j, P as w, a as B, as as G } from "./index-
|
|
2
|
-
import { m as N } from "./chunk-4BX2VUAB-CX67kh_B-
|
|
3
|
-
import { j as _ } from "./mermaid-parser.core-C88_DDui-
|
|
1
|
+
import { e as S, f as I, t as E, s as F, g as P, h as z, M as l, al as D, N as R, K as y, _ as j, P as w, a as B, as as G } from "./index-BTpDcWCv.js";
|
|
2
|
+
import { m as N } from "./chunk-4BX2VUAB-CX67kh_B-CLieQV3-.js";
|
|
3
|
+
import { j as _ } from "./mermaid-parser.core-C88_DDui-B7IhiBVD.js";
|
|
4
4
|
typeof window < "u" && (window.global = window);
|
|
5
5
|
var x = {
|
|
6
6
|
showLegend: !0,
|
package/dist/{diagram-S2PKOQOG-BqrhTIpA-DvsAaFEx.js → diagram-S2PKOQOG-BqrhTIpA-Bc4JlHqz.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { M as g, K as u, al as B, i as C, a as m, h as P, g as S, s as z, t as F, f as W, e as D, _ as E, P as T, N as A } from "./index-
|
|
2
|
-
import { m as M } from "./chunk-4BX2VUAB-CX67kh_B-
|
|
3
|
-
import { j } from "./mermaid-parser.core-C88_DDui-
|
|
1
|
+
import { M as g, K as u, al as B, i as C, a as m, h as P, g as S, s as z, t as F, f as W, e as D, _ as E, P as T, N as A } from "./index-BTpDcWCv.js";
|
|
2
|
+
import { m as M } from "./chunk-4BX2VUAB-CX67kh_B-CLieQV3-.js";
|
|
3
|
+
import { j } from "./mermaid-parser.core-C88_DDui-B7IhiBVD.js";
|
|
4
4
|
typeof window < "u" && (window.global = window);
|
|
5
5
|
var N = E.packet, w, y = (w = class {
|
|
6
6
|
constructor() {
|
package/dist/{erDiagram-Q2GNP2WA-B2hsi_Tl-CQQl2KTS.js → erDiagram-Q2GNP2WA-B2hsi_Tl-C8AfncCT.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as vt } from "./chunk-55IACEB6-BocSyyvr
|
|
2
|
-
import { d as $t } from "./chunk-QN33PNHL-vP2PqfVG-
|
|
3
|
-
import { M as o, h as Dt, g as wt, e as Lt, f as Mt, s as Bt, t as Ft, C as H, a as $, N as Yt, E as Pt, I as Kt, J as Zt, p as zt, q as Gt, d as Ut, r as jt } from "./index-
|
|
4
|
-
import { t as Wt } from "./channel-HKsfPa5q-
|
|
1
|
+
import { d as vt } from "./chunk-55IACEB6-BocSyyvr-Bn-f_OLg.js";
|
|
2
|
+
import { d as $t } from "./chunk-QN33PNHL-vP2PqfVG-DTvnGeUa.js";
|
|
3
|
+
import { M as o, h as Dt, g as wt, e as Lt, f as Mt, s as Bt, t as Ft, C as H, a as $, N as Yt, E as Pt, I as Kt, J as Zt, p as zt, q as Gt, d as Ut, r as jt } from "./index-BTpDcWCv.js";
|
|
4
|
+
import { t as Wt } from "./channel-HKsfPa5q-rUwqiYOY.js";
|
|
5
5
|
typeof window < "u" && (window.global = window);
|
|
6
6
|
var ut = function() {
|
|
7
7
|
var e = /* @__PURE__ */ o(function(m, r, a, n) {
|
package/dist/{flowDiagram-NV44I4VS-C03vtt_F-Ds5DxRz1.js → flowDiagram-NV44I4VS-C03vtt_F-Cnb6mZDn.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { l as We } from "./chunk-FMBD7UC4-dPK7Boav-
|
|
2
|
-
import { M as A, B as Pe, a as Q, C as g1, d as m1, p as qe, q as He, r as se, h as Xe, e as Je, s as Ye, g as Ze, f as Qe, t as et, m as tt, L as st, u as it, A as rt, E as ee, N as at, H as nt, I as ut } from "./index-
|
|
3
|
-
import { d as ot } from "./chunk-55IACEB6-BocSyyvr
|
|
4
|
-
import { d as lt } from "./chunk-QN33PNHL-vP2PqfVG-
|
|
5
|
-
import { t as ct } from "./channel-HKsfPa5q-
|
|
1
|
+
import { l as We } from "./chunk-FMBD7UC4-dPK7Boav-X2pgY3eu.js";
|
|
2
|
+
import { M as A, B as Pe, a as Q, C as g1, d as m1, p as qe, q as He, r as se, h as Xe, e as Je, s as Ye, g as Ze, f as Qe, t as et, m as tt, L as st, u as it, A as rt, E as ee, N as at, H as nt, I as ut } from "./index-BTpDcWCv.js";
|
|
3
|
+
import { d as ot } from "./chunk-55IACEB6-BocSyyvr-Bn-f_OLg.js";
|
|
4
|
+
import { d as lt } from "./chunk-QN33PNHL-vP2PqfVG-DTvnGeUa.js";
|
|
5
|
+
import { t as ct } from "./channel-HKsfPa5q-rUwqiYOY.js";
|
|
6
6
|
typeof window < "u" && (window.global = window);
|
|
7
7
|
var ht = "flowchart-", te, dt = (te = class {
|
|
8
8
|
// cspell:ignore funs
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as Ne, e as ze, t as He, s as Ve, g as Ge, h as Be, M as d, C as lt, d as bt, W as Re, X as Xe, Y as Ue, i as qe, Z as Qe, $ as U, a as st, a0 as re, a1 as se, a2 as je, a3 as Ze, a4 as Je, a5 as Ke, a6 as tn, a7 as en, a8 as nn, a9 as ae, aa as oe, ab as ce, ac as le, ad as ue, m as rn, k as sn, N as an, r as on, ae as Et, af as ve, ag as cn, ah as be, ai as xe, aj as Te, ak as ln, y as St } from "./index-
|
|
1
|
+
import { f as Ne, e as ze, t as He, s as Ve, g as Ge, h as Be, M as d, C as lt, d as bt, W as Re, X as Xe, Y as Ue, i as qe, Z as Qe, $ as U, a as st, a0 as re, a1 as se, a2 as je, a3 as Ze, a4 as Je, a5 as Ke, a6 as tn, a7 as en, a8 as nn, a9 as ae, aa as oe, ab as ce, ac as le, ad as ue, m as rn, k as sn, N as an, r as on, ae as Et, af as ve, ag as cn, ah as be, ai as xe, aj as Te, ak as ln, y as St } from "./index-BTpDcWCv.js";
|
|
2
2
|
typeof window < "u" && (window.global = window);
|
|
3
3
|
function un(t) {
|
|
4
4
|
return t;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { m as Q } from "./chunk-4BX2VUAB-CX67kh_B-
|
|
2
|
-
import { e as X } from "./chunk-QZHKN3VN-Bcidzu63-
|
|
3
|
-
import { t as Z, s as rr, e as tr, f as er, g as or, h as nr, M as m, a as w, d as ar, r as cr, R as ir, N as sr, m as k, K as dr, _ as hr, P as $r, C as mr, Q as lr } from "./index-
|
|
4
|
-
import { j as yr } from "./mermaid-parser.core-C88_DDui-
|
|
1
|
+
import { m as Q } from "./chunk-4BX2VUAB-CX67kh_B-CLieQV3-.js";
|
|
2
|
+
import { e as X } from "./chunk-QZHKN3VN-Bcidzu63-CGZ1okvp.js";
|
|
3
|
+
import { t as Z, s as rr, e as tr, f as er, g as or, h as nr, M as m, a as w, d as ar, r as cr, R as ir, N as sr, m as k, K as dr, _ as hr, P as $r, C as mr, Q as lr } from "./index-BTpDcWCv.js";
|
|
4
|
+
import { j as yr } from "./mermaid-parser.core-C88_DDui-B7IhiBVD.js";
|
|
5
5
|
typeof window < "u" && (window.global = window);
|
|
6
6
|
var u = {
|
|
7
7
|
NORMAL: 0,
|