@automattic/agenttic-ui 0.1.11 → 0.1.13
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/components/chat/ChatInput.d.ts.map +1 -1
- package/dist/components/composable/AgentUISuggestions.d.ts +2 -1
- package/dist/components/composable/AgentUISuggestions.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2050 -41
- package/package.json +2 -5
- package/dist/_basePickBy-Co6w2C-t.js +0 -151
- package/dist/_baseUniq-BbhifY2s.js +0 -614
- package/dist/abap-Y8Dl9g_6.js +0 -6
- package/dist/actionscript-3-DZzbMeqX.js +0 -6
- package/dist/ada-vP6ak0IW.js +0 -6
- package/dist/andromeeda-uXNdzNpk.js +0 -4
- package/dist/angular-html-BmadGEgW.js +0 -32
- package/dist/angular-ts-D-QQnnGT.js +0 -21
- package/dist/apache-BUjz-sD2.js +0 -6
- package/dist/apex-D_wPycVx.js +0 -6
- package/dist/apl-sitt7C8I.js +0 -16
- package/dist/applescript-BPx7YFFu.js +0 -6
- package/dist/ara-Z2fSOxSw.js +0 -6
- package/dist/arc-DMQNivgh.js +0 -83
- package/dist/architecture-O4VJ6CD3-CrsUkgBe.js +0 -5
- package/dist/architectureDiagram-KFL7JDKH-BCeU_Tkj.js +0 -4665
- package/dist/asciidoc-B-pCoB3G.js +0 -6
- package/dist/asm-BTWLY5ym.js +0 -6
- package/dist/astro-DHnp0xIo.js +0 -18
- package/dist/aurora-x-BwoVEUWZ.js +0 -4
- package/dist/awk-Fb0P9dkn.js +0 -6
- package/dist/ayu-dark-CxPZkpb2.js +0 -4
- package/dist/ballerina-oZK-YekG.js +0 -6
- package/dist/bat-0FvbqU9S.js +0 -6
- package/dist/beancount-DEfTbbFX.js +0 -6
- package/dist/berry-PwsHPR_K.js +0 -6
- package/dist/bibtex-EULQRLY5.js +0 -6
- package/dist/bicep-DFU2oTl7.js +0 -6
- package/dist/blade-OPzGcV14.js +0 -20
- package/dist/blockDiagram-ZYB65J3Q-eNfG2owp.js +0 -2265
- package/dist/bsl-NkNNwerW.js +0 -8
- package/dist/c-eeMepfLm.js +0 -6
- package/dist/c4Diagram-AAMF2YG6-CEVcZg_d.js +0 -1581
- package/dist/cadence-DMRWHJp4.js +0 -6
- package/dist/cairo-DM6WF2e3.js +0 -8
- package/dist/catppuccin-frappe-DlGpEc12.js +0 -4
- package/dist/catppuccin-latte-DDI4I_Rd.js +0 -4
- package/dist/catppuccin-macchiato-BBzuZG5U.js +0 -4
- package/dist/catppuccin-mocha-CwrFPXRy.js +0 -4
- package/dist/channel-DwkBtswx.js +0 -5
- package/dist/chunk-ANTBXLJU-DjsG4Faa.js +0 -9
- package/dist/chunk-FHKO5MBM-DvgpKHah.js +0 -15
- package/dist/chunk-GLLZNHP4-BS9MWsNn.js +0 -19
- package/dist/chunk-JBRWN2VN-BB1oFn95.js +0 -1376
- package/dist/chunk-LXBSTHXV-DoWWvL-R.js +0 -1382
- package/dist/chunk-NRVI72HA-CN8BG5Yn.js +0 -20
- package/dist/chunk-OMD6QJNC-D7UKmZm8.js +0 -64
- package/dist/chunk-WVR4S24B-D3bw0yi4.js +0 -8
- package/dist/clarity-BseSxcHx.js +0 -6
- package/dist/classDiagram-3BZAVTQC-DhpbenB7.js +0 -16
- package/dist/classDiagram-v2-QTMF73CY-DhpbenB7.js +0 -16
- package/dist/clojure-CXJfHrL3.js +0 -6
- package/dist/clone-DmrWxu_i.js +0 -8
- package/dist/cmake-BJz8BOTU.js +0 -6
- package/dist/cobol-4A8XjHhj.js +0 -10
- package/dist/codeowners-Bt9yU6NX.js +0 -6
- package/dist/codeql-DHkodjjI.js +0 -6
- package/dist/coffee-Dl27lzbd.js +0 -8
- package/dist/common-lisp-EVqT9Zhp.js +0 -6
- package/dist/coq-B0L9upzn.js +0 -6
- package/dist/cpp-Cj177cuW.js +0 -18
- package/dist/crystal-ymVvJzbZ.js +0 -18
- package/dist/csharp-DmxfTLWR.js +0 -6
- package/dist/css-CECN5uSL.js +0 -6
- package/dist/csv-CmYOceLb.js +0 -6
- package/dist/cue-ZzumE7IT.js +0 -6
- package/dist/cypher-jpdmjtA6.js +0 -6
- package/dist/cytoscape.esm-ZmItrg9y.js +0 -18731
- package/dist/d-CBagWSwH.js +0 -6
- package/dist/dagre-2BBEFEWP-DWbEdWsD.js +0 -447
- package/dist/dark-plus-pUHDTVV0.js +0 -4
- package/dist/dart-6ObCrKr9.js +0 -6
- package/dist/dax-CcDT-8dH.js +0 -6
- package/dist/defaultLocale-D7EN2tov.js +0 -171
- package/dist/desktop-B93p9R9O.js +0 -6
- package/dist/diagram-4IRLE6MV-Q8q6qm5n.js +0 -534
- package/dist/diagram-GUPCWM2R-B8VhFieT.js +0 -143
- package/dist/diagram-RP2FKANI-CYWUKKLB.js +0 -221
- package/dist/diff-BxzP2J8R.js +0 -6
- package/dist/docker-CsHqm9tx.js +0 -6
- package/dist/dotenv-BMjVjUL1.js +0 -6
- package/dist/dracula-BtZx2Kac.js +0 -4
- package/dist/dracula-soft-BKa-aqBv.js +0 -4
- package/dist/dream-maker-PAx17jaB.js +0 -6
- package/dist/edge-_LvgTcmu.js +0 -12
- package/dist/elixir-BTCUAmQk.js +0 -8
- package/dist/elm-BtNbw_Cd.js +0 -8
- package/dist/emacs-lisp-Cfxdx5D-.js +0 -6
- package/dist/erDiagram-HZWUO2LU-CC0RhTpv.js +0 -842
- package/dist/erb-D0PIpZCP.js +0 -10
- package/dist/erlang-xM7DPKQj.js +0 -8
- package/dist/everforest-dark-DMCBqXCK.js +0 -4
- package/dist/everforest-light-BbXl82Em.js +0 -4
- package/dist/fennel-N4WcXuKx.js +0 -6
- package/dist/fish-B6QqlqeT.js +0 -6
- package/dist/flowDiagram-THRYKUMA-B00E_hY6.js +0 -1627
- package/dist/fluent-BMXUxfv1.js +0 -6
- package/dist/fortran-fixed-form-DUsA-VGo.js +0 -8
- package/dist/fortran-free-form-DPIT_jbP.js +0 -6
- package/dist/fsharp-BTdsmEUN.js +0 -8
- package/dist/ganttDiagram-WV7ZQ7D5-Cv2vsghm.js +0 -2499
- package/dist/gdresource-DLfsylRW.js +0 -10
- package/dist/gdscript-9lm8qppb.js +0 -6
- package/dist/gdshader-Bk8fF6yr.js +0 -6
- package/dist/genie-DzUvd7U9.js +0 -6
- package/dist/gherkin-DHRaV0YP.js +0 -6
- package/dist/git-commit-Bd32YZ0K.js +0 -8
- package/dist/git-rebase-ZWUFO_T4.js +0 -8
- package/dist/gitGraph-ZV4HHKMB-Bj31zYat.js +0 -5
- package/dist/gitGraphDiagram-OJR772UL-BGrYC5q0.js +0 -712
- package/dist/github-dark-DenFmJkN.js +0 -4
- package/dist/github-dark-default-BJPUVz4H.js +0 -4
- package/dist/github-dark-dimmed-DUshB20C.js +0 -4
- package/dist/github-dark-high-contrast-D3aGCnF8.js +0 -4
- package/dist/github-light-JYsPkUQd.js +0 -4
- package/dist/github-light-default-D99KPAby.js +0 -4
- package/dist/github-light-high-contrast-BbmZE-Mp.js +0 -4
- package/dist/gleam-Bv284lvN.js +0 -6
- package/dist/glimmer-js-CkxRszZZ.js +0 -14
- package/dist/glimmer-ts-Bi6BYQCn.js +0 -14
- package/dist/glsl-CkUcVZNK.js +0 -8
- package/dist/gnuplot-yPG9-sE_.js +0 -6
- package/dist/go-ChxJuLYK.js +0 -6
- package/dist/graph-DaSuptw6.js +0 -247
- package/dist/graphql-BLaPX4fU.js +0 -14
- package/dist/groovy-CJQTphOW.js +0 -6
- package/dist/gruvbox-dark-hard-C2ND4cMr.js +0 -4
- package/dist/gruvbox-dark-medium-C8k4c8au.js +0 -4
- package/dist/gruvbox-dark-soft-xx9Q6FaG.js +0 -4
- package/dist/gruvbox-light-hard-BpUXv5in.js +0 -4
- package/dist/gruvbox-light-medium-D3XFCoU1.js +0 -4
- package/dist/gruvbox-light-soft-u7hpfz6Z.js +0 -4
- package/dist/hack-Bx1jMtBC.js +0 -10
- package/dist/haml-6FagfhCM.js +0 -10
- package/dist/handlebars-Bd5Y4M6I.js +0 -14
- package/dist/haskell-WeIwNIP6.js +0 -6
- package/dist/haxe-TztHsm5T.js +0 -6
- package/dist/hcl-D438OF-I.js +0 -6
- package/dist/hjson-DYBUbqOl.js +0 -6
- package/dist/hlsl-Bk8TCZNL.js +0 -6
- package/dist/houston-BDYrDoDW.js +0 -4
- package/dist/html-7XVNRwN7.js +0 -10
- package/dist/html-derivative-BNxZ5Yf6.js +0 -8
- package/dist/http-WC357zBG.js +0 -14
- package/dist/hxml-GbqSQCLa.js +0 -8
- package/dist/hy-Brt5EZ7-.js +0 -6
- package/dist/imba-CimUv-Uh.js +0 -6
- package/dist/index-DR9mkSeU.js +0 -29474
- package/dist/info-63CPKGFF-DnZM8nKQ.js +0 -5
- package/dist/infoDiagram-DDUCL6P7-ClQolrbt.js +0 -24
- package/dist/ini-BZIuRIvJ.js +0 -6
- package/dist/init-DjUOC4st.js +0 -16
- package/dist/java-DY6VlHhP.js +0 -6
- package/dist/javascript-Dp1Jmi5H.js +0 -6
- package/dist/jinja-WEhOU5ES.js +0 -11
- package/dist/jison-c2JI40PB.js +0 -8
- package/dist/journeyDiagram-FFXJYRFH-P_IVMTj2.js +0 -836
- package/dist/json-DxJze_jm.js +0 -6
- package/dist/json5-BT4Fjg39.js +0 -6
- package/dist/jsonc-CHjZD8gR.js +0 -6
- package/dist/jsonl-BGuvDmy9.js +0 -6
- package/dist/jsonnet-Bx2cfsXg.js +0 -6
- package/dist/jssm-BcADi6EI.js +0 -6
- package/dist/jsx-BtKADgXT.js +0 -6
- package/dist/julia-DcoDQokW.js +0 -16
- package/dist/kanagawa-dragon-CiKur4Hl.js +0 -4
- package/dist/kanagawa-lotus-BKu-smKu.js +0 -4
- package/dist/kanagawa-wave-CQwozSzG.js +0 -4
- package/dist/kanban-definition-KOZQBZVT-Uk8JKe_b.js +0 -720
- package/dist/kotlin-ByBMgTeR.js +0 -6
- package/dist/kusto-VWFLl2T0.js +0 -6
- package/dist/laserwave-6a00oqik.js +0 -4
- package/dist/latex-MZCpjnva.js +0 -8
- package/dist/layout-BHKAMNdk.js +0 -1324
- package/dist/lean-DXqEE_d1.js +0 -6
- package/dist/less-B1GLI2Di.js +0 -6
- package/dist/light-plus-CZuVqSLX.js +0 -4
- package/dist/linear-UAzexi4b.js +0 -255
- package/dist/liquid-3HHuHOZ2.js +0 -14
- package/dist/llvm-6RQLId6G.js +0 -6
- package/dist/log-Al8wyEFV.js +0 -6
- package/dist/logo-DBa4JDzV.js +0 -6
- package/dist/lua-kX5WP_P5.js +0 -8
- package/dist/luau-BeoZWRh5.js +0 -6
- package/dist/make-CsMclxtr.js +0 -6
- package/dist/markdown-CiI2E98D.js +0 -6
- package/dist/marko-L-KhXzqZ.js +0 -14
- package/dist/material-theme-D6KBX41T.js +0 -4
- package/dist/material-theme-darker-CkRroheE.js +0 -4
- package/dist/material-theme-lighter-BUBw43Yz.js +0 -4
- package/dist/material-theme-ocean-ClGX14Ja.js +0 -4
- package/dist/material-theme-palenight-C1RVm8K1.js +0 -4
- package/dist/matlab-BOAaUVP0.js +0 -6
- package/dist/mdc-DPBWa7dN.js +0 -12
- package/dist/mdx-BOhZZUJ8.js +0 -6
- package/dist/mermaid-B0ixDHKN.js +0 -6
- package/dist/mermaid-parser.core-FuzJzmL7.js +0 -12921
- package/dist/mermaid.core-D7qBd055.js +0 -14002
- package/dist/min-dark-C7ak0t6c.js +0 -4
- package/dist/min-light-CKFxVcPp.js +0 -4
- package/dist/mindmap-definition-LNHGMQRG-D1C2-kkn.js +0 -3229
- package/dist/mipsasm-CTx18fBl.js +0 -6
- package/dist/mojo-BD611d7o.js +0 -6
- package/dist/monokai-C1KBYcO0.js +0 -4
- package/dist/move-653S600C.js +0 -6
- package/dist/narrat-DmhDCBs-.js +0 -6
- package/dist/nextflow-D1Zd9cNl.js +0 -6
- package/dist/nginx-5vhPAEw3.js +0 -8
- package/dist/night-owl-Bm2rzalh.js +0 -4
- package/dist/nim-Fi8wNe6i.js +0 -20
- package/dist/nix-ceY58Dty.js +0 -6
- package/dist/nord-CC5OiUXg.js +0 -4
- package/dist/nushell-Be2rueDv.js +0 -6
- package/dist/objective-c-Itk8tzmv.js +0 -6
- package/dist/objective-cpp-DGt5UKRO.js +0 -6
- package/dist/ocaml-eSVK32Eg.js +0 -6
- package/dist/one-dark-pro-DTA3VF0_.js +0 -4
- package/dist/one-light-D9sNaUtq.js +0 -4
- package/dist/ordinal-DfAQgscy.js +0 -61
- package/dist/packet-HUATNLJX-B5EJOyma.js +0 -5
- package/dist/pascal-xy8pJNns.js +0 -6
- package/dist/perl-BoEn6HmT.js +0 -16
- package/dist/php-BRU9zhoN.js +0 -18
- package/dist/pie-WTHONI2E-Bl1BKqE7.js +0 -5
- package/dist/pieDiagram-DBDJKBY4-BkVTsR1n.js +0 -161
- package/dist/plastic-CSTz3KZp.js +0 -4
- package/dist/plsql-pVbGZfOv.js +0 -6
- package/dist/po-BNfHvqmm.js +0 -6
- package/dist/poimandres-C-VADXHD.js +0 -4
- package/dist/polar-CAZahv3u.js +0 -6
- package/dist/postcss-05aHdL-n.js +0 -6
- package/dist/powerquery-DI9HkTvs.js +0 -6
- package/dist/powershell-Clc4ydu-.js +0 -6
- package/dist/prisma-FZjmVtSl.js +0 -6
- package/dist/prolog-C5-yg4TO.js +0 -6
- package/dist/proto-MmCPeFAD.js +0 -6
- package/dist/pug-CJWI-qSo.js +0 -12
- package/dist/puppet-CUJHmnxV.js +0 -6
- package/dist/purescript-rUfGld-4.js +0 -6
- package/dist/python-BFNSHbwJ.js +0 -6
- package/dist/qml-D3ATcgGh.js +0 -8
- package/dist/qmldir-BInDYbpo.js +0 -6
- package/dist/qss-AeJTysr_.js +0 -6
- package/dist/quadrantDiagram-YPSRARAO-D1el8UE7.js +0 -1024
- package/dist/r-Bm0uF0U2.js +0 -6
- package/dist/racket-B83wSAja.js +0 -6
- package/dist/radar-NJJJXTRR-Ba8Estdw.js +0 -5
- package/dist/raku-nEQ4ZJJ7.js +0 -6
- package/dist/razor-BPFYEoc9.js +0 -10
- package/dist/red-7y8PH7HH.js +0 -4
- package/dist/reg-m_s_Kiip.js +0 -6
- package/dist/regexp-BazyLpPg.js +0 -6
- package/dist/rel-BcRfyd6Q.js +0 -6
- package/dist/requirementDiagram-EGVEC5DT-DL1bEAjs.js +0 -852
- package/dist/riscv-Ce8MAQLP.js +0 -6
- package/dist/rose-pine-Cr4kwgAY.js +0 -4
- package/dist/rose-pine-dawn-ClRRUdXX.js +0 -4
- package/dist/rose-pine-moon-ucNn3Gm8.js +0 -4
- package/dist/rst-B6mPMsKo.js +0 -22
- package/dist/ruby-DInklMmU.js +0 -30
- package/dist/rust-CLzF9zIN.js +0 -6
- package/dist/sankeyDiagram-HRAUVNP4-Dyr3TqRu.js +0 -810
- package/dist/sas-fpEvgATw.js +0 -8
- package/dist/sass-DxHp5rTx.js +0 -6
- package/dist/scala-D4grkFkl.js +0 -6
- package/dist/scheme-BCRWuEm4.js +0 -6
- package/dist/scss-B1FaCqwR.js +0 -8
- package/dist/sdbl-B7T8abf4.js +0 -6
- package/dist/sequenceDiagram-4MX5Z3NR-CaMVkEvG.js +0 -2283
- package/dist/shaderlab-Cr62-Wb4.js +0 -8
- package/dist/shellscript-InADTalH.js +0 -6
- package/dist/shellsession-DiDJNQdy.js +0 -8
- package/dist/slack-dark-i7wN4OET.js +0 -4
- package/dist/slack-ochin-ndHf0LoP.js +0 -4
- package/dist/smalltalk-BlI1_OkM.js +0 -6
- package/dist/snazzy-light-BlSJXAu4.js +0 -4
- package/dist/solarized-dark-UTmkh7lw.js +0 -4
- package/dist/solarized-light-BheCkDPT.js +0 -4
- package/dist/solidity-CneOhxmR.js +0 -6
- package/dist/soy-LybuU3Y_.js +0 -8
- package/dist/sparql-B0KWFEri.js +0 -8
- package/dist/splunk-CRXR8A9s.js +0 -6
- package/dist/sql-Cn_v3PB0.js +0 -6
- package/dist/ssh-config-DP-hNVbF.js +0 -6
- package/dist/stata-B8c5fTjX.js +0 -8
- package/dist/stateDiagram-UUKSUZ4H-D-xTiq6H.js +0 -263
- package/dist/stateDiagram-v2-EYPG3UTE-BK5bFTpp.js +0 -16
- package/dist/stylus-CyKEU1Ej.js +0 -6
- package/dist/svelte-BjDUPxZ1.js +0 -14
- package/dist/swift-_uF_96_m.js +0 -6
- package/dist/synthwave-84-NU3C_KFZ.js +0 -4
- package/dist/system-verilog-BCm7smPJ.js +0 -6
- package/dist/systemd-C-4qm6XH.js +0 -6
- package/dist/talonscript-CFF3LF_O.js +0 -6
- package/dist/tasl-Cg_WBUAe.js +0 -6
- package/dist/tcl-DN7buRTF.js +0 -6
- package/dist/templ-Brj2RH7A.js +0 -12
- package/dist/terraform-DGvcn9zM.js +0 -6
- package/dist/tex-CmrLTxbG.js +0 -8
- package/dist/timeline-definition-3HZDQTIS-DbCuAY-N.js +0 -801
- package/dist/tokyo-night-DP4TmcQl.js +0 -4
- package/dist/toml-DY62mUL_.js +0 -6
- package/dist/treemap-75Q7IDZK-RcudvwLc.js +0 -5
- package/dist/ts-tags-CZMzuZh-.js +0 -41
- package/dist/tsv-BtvSkaG0.js +0 -6
- package/dist/tsx-B8rCNbgL.js +0 -6
- package/dist/turtle-_H59FV7D.js +0 -6
- package/dist/twig-GjIxYqCX.js +0 -18
- package/dist/typescript-mg6ATTE8.js +0 -6
- package/dist/typespec-Djmco60m.js +0 -6
- package/dist/typst-D_1QKWns.js +0 -6
- package/dist/v-BW14IZv7.js +0 -6
- package/dist/vala-uxaPR7d1.js +0 -6
- package/dist/vb-D8_c5-KN.js +0 -6
- package/dist/verilog-B-bybjPF.js +0 -6
- package/dist/vesper-BckBta1U.js +0 -4
- package/dist/vhdl-CUlNa8ac.js +0 -6
- package/dist/viml-DsfA-sWm.js +0 -6
- package/dist/vitesse-black-BoGvW84i.js +0 -4
- package/dist/vitesse-dark-Cym-eLtO.js +0 -4
- package/dist/vitesse-light-CcmG315c.js +0 -4
- package/dist/vue-D-ba2-Rx.js +0 -31
- package/dist/vue-html-Dn2ZoOSz.js +0 -10
- package/dist/vue-vine-Jmfkm6lF.js +0 -20
- package/dist/vyper-CPQuu50u.js +0 -6
- package/dist/wasm-BBXxrAl7.js +0 -6
- package/dist/wasm-DQxwEHae.js +0 -7
- package/dist/wenyan-pbVjoM9_.js +0 -6
- package/dist/wgsl-DY4iK1q1.js +0 -6
- package/dist/wikitext-Z-MoUasO.js +0 -6
- package/dist/wit-CQMQOlTg.js +0 -6
- package/dist/wolfram-Dz4KXISs.js +0 -6
- package/dist/xml-C2J0sS9M.js +0 -8
- package/dist/xsl-BmSZphgC.js +0 -8
- package/dist/xychartDiagram-FDP5SA34-NGeBTA9Y.js +0 -1340
- package/dist/yaml-DaO7k5B1.js +0 -6
- package/dist/zenscript-CxBjpf9c.js +0 -6
- package/dist/zig-Vm0PO9wB.js +0 -6
package/dist/index.js
CHANGED
|
@@ -1,43 +1,2052 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs as T, jsx as n, Fragment as Ht } from "react/jsx-runtime";
|
|
2
|
+
import * as te from "react";
|
|
3
|
+
import ee, { useState as W, useEffect as E, useCallback as m, useRef as I, createContext as Ee, useContext as Ae, useId as Se, memo as xe, useMemo as Oe } from "react";
|
|
4
|
+
import { motion as M, AnimatePresence as Tt, useMotionValue as Mt, useDragControls as ne, animate as Pt } from "framer-motion";
|
|
5
|
+
import { __ as Ct } from "@wordpress/i18n";
|
|
6
|
+
import { Slot as Ne } from "@radix-ui/react-slot";
|
|
7
|
+
import Re from "streamdown";
|
|
8
|
+
import './index.css';function V(...e) {
|
|
9
|
+
return e.flat().filter(Boolean).map((t) => typeof t == "string" ? t : typeof t == "object" && !Array.isArray(t) && t !== null ? Object.entries(t).filter(([o, r]) => r).map(([o]) => o).join(" ") : "").join(" ").trim();
|
|
10
|
+
}
|
|
11
|
+
function oe(e) {
|
|
12
|
+
const t = e || "collapsed", [o, r] = W(t);
|
|
13
|
+
E(() => {
|
|
14
|
+
e !== void 0 && r(e);
|
|
15
|
+
}, [e]);
|
|
16
|
+
const s = o !== "collapsed" && o !== "compact", a = m(() => {
|
|
17
|
+
r("expanded");
|
|
18
|
+
}, []), i = m(() => {
|
|
19
|
+
r(t);
|
|
20
|
+
}, [t]), f = m(() => {
|
|
21
|
+
r(
|
|
22
|
+
(u) => u === "collapsed" ? "compact" : "collapsed"
|
|
23
|
+
);
|
|
24
|
+
}, []);
|
|
25
|
+
return {
|
|
26
|
+
state: o,
|
|
27
|
+
initialState: t,
|
|
28
|
+
setState: r,
|
|
29
|
+
isOpen: s,
|
|
30
|
+
open: a,
|
|
31
|
+
close: i,
|
|
32
|
+
toggle: f
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function ae({
|
|
36
|
+
value: e,
|
|
37
|
+
setValue: t,
|
|
38
|
+
onSubmit: o,
|
|
39
|
+
isProcessing: r
|
|
40
|
+
}) {
|
|
41
|
+
const s = I(null), a = m(() => {
|
|
42
|
+
t(""), s.current && (s.current.style.height = "auto", setTimeout(() => {
|
|
43
|
+
var u;
|
|
44
|
+
(u = s.current) == null || u.focus();
|
|
45
|
+
}, 100));
|
|
46
|
+
}, [t]), i = m(() => {
|
|
47
|
+
const u = s.current;
|
|
48
|
+
if (!u)
|
|
49
|
+
return;
|
|
50
|
+
u.style.height = "auto";
|
|
51
|
+
const h = u.scrollHeight, p = 40, v = 200;
|
|
52
|
+
u.style.height = `${Math.min(
|
|
53
|
+
Math.max(h, p),
|
|
54
|
+
v
|
|
55
|
+
)}px`;
|
|
56
|
+
}, []), f = m(
|
|
57
|
+
(u) => {
|
|
58
|
+
u.key === "Enter" && !u.shiftKey && !r && e.trim() && (u.preventDefault(), o(e.trim()), a());
|
|
59
|
+
},
|
|
60
|
+
[e, r, o, a]
|
|
61
|
+
);
|
|
62
|
+
return E(() => {
|
|
63
|
+
i();
|
|
64
|
+
}, [e, i]), {
|
|
65
|
+
value: e,
|
|
66
|
+
setValue: t,
|
|
67
|
+
clear: a,
|
|
68
|
+
textareaRef: s,
|
|
69
|
+
handleKeyDown: f,
|
|
70
|
+
adjustHeight: i
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
const ie = Ct("Ask anything", "a8c-agenttic"), Zt = {
|
|
74
|
+
type: "spring",
|
|
75
|
+
stiffness: 300,
|
|
76
|
+
damping: 30
|
|
77
|
+
}, lt = {
|
|
78
|
+
type: "spring",
|
|
79
|
+
damping: 40,
|
|
80
|
+
stiffness: 500,
|
|
81
|
+
mass: 0.8
|
|
82
|
+
}, Vt = {
|
|
83
|
+
...lt,
|
|
84
|
+
stiffness: 1e3,
|
|
85
|
+
damping: 90
|
|
86
|
+
}, $t = {
|
|
87
|
+
type: "spring",
|
|
88
|
+
damping: 40,
|
|
89
|
+
stiffness: 500,
|
|
90
|
+
mass: 0.8
|
|
91
|
+
}, re = {
|
|
92
|
+
hidden: {
|
|
93
|
+
opacity: 0
|
|
94
|
+
},
|
|
95
|
+
visible: {
|
|
96
|
+
opacity: 1,
|
|
97
|
+
transition: Zt
|
|
98
|
+
},
|
|
99
|
+
exit: {
|
|
100
|
+
opacity: 0,
|
|
101
|
+
transition: { ...Zt, duration: 0.1 }
|
|
102
|
+
}
|
|
103
|
+
}, De = () => {
|
|
104
|
+
if (typeof window > "u")
|
|
105
|
+
return { left: 0, right: 0, top: 0, bottom: 0 };
|
|
106
|
+
const e = 20;
|
|
107
|
+
return {
|
|
108
|
+
left: e,
|
|
109
|
+
right: window.innerWidth - 400 - e,
|
|
110
|
+
// Assuming max width of 400px
|
|
111
|
+
top: e,
|
|
112
|
+
bottom: window.innerHeight - 60 - e
|
|
113
|
+
// Assuming collapsed height of 60px
|
|
114
|
+
};
|
|
115
|
+
}, Me = {
|
|
116
|
+
"0%": { backgroundPosition: "-200% 0" },
|
|
117
|
+
"100%": { backgroundPosition: "200% 0" }
|
|
118
|
+
}, Xn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
119
|
+
__proto__: null,
|
|
120
|
+
fadeVariants: re,
|
|
121
|
+
fastSpring: lt,
|
|
122
|
+
fastSpringWithDelay: Vt,
|
|
123
|
+
getDragConstraints: De,
|
|
124
|
+
morphSpring: $t,
|
|
125
|
+
springConfig: Zt,
|
|
126
|
+
thinkingGradientKeyframes: Me
|
|
127
|
+
}, Symbol.toStringTag, { value: "Module" })), Pe = "button-module_button", Ve = "button-module_pressed", He = "button-module_primary", $e = "button-module_ghost", Fe = "button-module_outline", ke = "button-module_transparent", Ue = "button-module_link", Ge = "button-module_icon", We = "button-module_sm", Be = "button-module_lg", Ze = "button-module_withTextAndIcon", Lt = {
|
|
128
|
+
button: Pe,
|
|
129
|
+
pressed: Ve,
|
|
130
|
+
primary: He,
|
|
131
|
+
ghost: $e,
|
|
132
|
+
outline: Fe,
|
|
133
|
+
transparent: ke,
|
|
134
|
+
link: Ue,
|
|
135
|
+
icon: Ge,
|
|
136
|
+
sm: We,
|
|
137
|
+
lg: Be,
|
|
138
|
+
withTextAndIcon: Ze
|
|
139
|
+
}, Y = te.forwardRef(
|
|
140
|
+
function({
|
|
141
|
+
className: t,
|
|
142
|
+
variant: o = "primary",
|
|
143
|
+
size: r,
|
|
144
|
+
icon: s,
|
|
145
|
+
children: a,
|
|
146
|
+
asChild: i = !1,
|
|
147
|
+
pressed: f = !1,
|
|
148
|
+
...u
|
|
149
|
+
}, h) {
|
|
150
|
+
const p = i ? Ne : "button", v = !!s, y = r || (v && !a ? "icon" : void 0);
|
|
151
|
+
return /* @__PURE__ */ T(
|
|
152
|
+
p,
|
|
153
|
+
{
|
|
154
|
+
ref: h,
|
|
155
|
+
"data-slot": "button",
|
|
156
|
+
className: V(
|
|
157
|
+
Lt.button,
|
|
158
|
+
Lt[o],
|
|
159
|
+
y && Lt[y],
|
|
160
|
+
v && a ? Lt.withTextAndIcon : void 0,
|
|
161
|
+
f ? Lt.pressed : void 0,
|
|
162
|
+
t
|
|
163
|
+
),
|
|
164
|
+
"aria-pressed": f,
|
|
165
|
+
...u,
|
|
166
|
+
children: [
|
|
167
|
+
s,
|
|
168
|
+
a
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
);
|
|
174
|
+
Y.displayName = "Button";
|
|
175
|
+
function se({ className: e, size: t = 24 }) {
|
|
176
|
+
return /* @__PURE__ */ n(
|
|
177
|
+
"svg",
|
|
178
|
+
{
|
|
179
|
+
className: e,
|
|
180
|
+
width: t,
|
|
181
|
+
height: t,
|
|
182
|
+
viewBox: "0 0 24 24",
|
|
183
|
+
fill: "none",
|
|
184
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
185
|
+
children: /* @__PURE__ */ n(
|
|
186
|
+
"path",
|
|
187
|
+
{
|
|
188
|
+
d: "M19.6611 11.5224L16.3782 10.39C15.0799 9.94387 14.0561 8.92011 13.61 7.62181L12.4775 4.33887C12.3231 3.88704 11.6769 3.88704 11.5225 4.33887L10.39 7.62181C9.94388 8.92011 8.9201 9.94387 7.6218 10.39L4.33887 11.5224C3.88704 11.6768 3.88704 12.3231 4.33887 12.4776L7.6218 13.61C8.9201 14.0561 9.94388 15.0799 10.39 16.3782L11.5225 19.6611C11.6769 20.113 12.3231 20.113 12.4775 19.6611L13.61 16.3782C14.0561 15.0799 15.0799 14.0561 16.3782 13.61L19.6611 12.4776C20.113 12.3231 20.113 11.6768 19.6611 11.5224ZM15.8291 12.2431L14.1876 12.8093C13.5356 13.0323 13.0266 13.5471 12.8036 14.1934L12.2374 15.8348C12.1572 16.0636 11.837 16.0636 11.7569 15.8348L11.1907 14.1934C10.9677 13.5414 10.4529 13.0323 9.80662 12.8093L8.16515 12.2431C7.93637 12.163 7.93637 11.8427 8.16515 11.7626L9.80662 11.1964C10.4586 10.9734 10.9677 10.4586 11.1907 9.81233L11.7569 8.17087C11.837 7.94209 12.1572 7.94209 12.2374 8.17087L12.8036 9.81233C13.0266 10.4643 13.5414 10.9734 14.1876 11.1964L15.8291 11.7626C16.0579 11.8427 16.0579 12.163 15.8291 12.2431Z",
|
|
189
|
+
fill: "currentColor"
|
|
190
|
+
}
|
|
191
|
+
)
|
|
192
|
+
}
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
const Ye = "CollapsedView-module_button", Ke = {
|
|
196
|
+
button: Ye
|
|
197
|
+
};
|
|
198
|
+
function ce({
|
|
199
|
+
icon: e = /* @__PURE__ */ n(se, { size: 36 }),
|
|
200
|
+
onClick: t,
|
|
201
|
+
onHover: o,
|
|
202
|
+
focusOnMount: r = !1
|
|
203
|
+
}) {
|
|
204
|
+
const s = I(null), a = I(r);
|
|
205
|
+
return E(() => {
|
|
206
|
+
a.current && s.current && s.current.focus(), a.current = !1;
|
|
207
|
+
}, [a, s]), /* @__PURE__ */ n(
|
|
208
|
+
M.div,
|
|
209
|
+
{
|
|
210
|
+
"data-slot": "collapsed-view",
|
|
211
|
+
layout: "preserve-aspect",
|
|
212
|
+
layoutId: "collapsed-button",
|
|
213
|
+
initial: {
|
|
214
|
+
opacity: 0,
|
|
215
|
+
scale: 0.5
|
|
216
|
+
},
|
|
217
|
+
animate: {
|
|
218
|
+
opacity: 1,
|
|
219
|
+
scale: 1,
|
|
220
|
+
transition: {
|
|
221
|
+
...$t,
|
|
222
|
+
delay: 0.2
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
exit: {
|
|
226
|
+
opacity: 0,
|
|
227
|
+
scale: 0,
|
|
228
|
+
transition: {
|
|
229
|
+
duration: 0.15
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
children: /* @__PURE__ */ n(
|
|
233
|
+
Y,
|
|
234
|
+
{
|
|
235
|
+
ref: s,
|
|
236
|
+
onClick: t,
|
|
237
|
+
onMouseEnter: o,
|
|
238
|
+
variant: "link",
|
|
239
|
+
className: Ke.button,
|
|
240
|
+
icon: e,
|
|
241
|
+
"aria-label": Ct("Open chat", "a8c-agenttic")
|
|
242
|
+
}
|
|
243
|
+
)
|
|
244
|
+
}
|
|
245
|
+
);
|
|
246
|
+
}
|
|
247
|
+
const Xe = "Textarea-module_textarea", je = {
|
|
248
|
+
textarea: Xe
|
|
249
|
+
}, le = te.forwardRef(
|
|
250
|
+
({ className: e, ...t }, o) => /* @__PURE__ */ n(
|
|
251
|
+
"textarea",
|
|
252
|
+
{
|
|
253
|
+
"data-slot": "textarea",
|
|
254
|
+
className: je.textarea,
|
|
255
|
+
ref: o,
|
|
256
|
+
...t
|
|
257
|
+
}
|
|
258
|
+
)
|
|
259
|
+
);
|
|
260
|
+
le.displayName = "Textarea";
|
|
261
|
+
function ze({ className: e, size: t = 24 }) {
|
|
262
|
+
return /* @__PURE__ */ n(
|
|
263
|
+
"svg",
|
|
264
|
+
{
|
|
265
|
+
width: t,
|
|
266
|
+
height: t,
|
|
267
|
+
viewBox: "0 0 24 24",
|
|
268
|
+
fill: "none",
|
|
269
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
270
|
+
className: e,
|
|
271
|
+
children: /* @__PURE__ */ n(
|
|
272
|
+
"path",
|
|
273
|
+
{
|
|
274
|
+
d: "M12.2197 5C12.4186 5 12.6094 5.07902 12.75 5.21967L17 9.46967C17.2929 9.76256 17.2929 10.2374 17 10.5303C16.7071 10.8232 16.2322 10.8232 15.9393 10.5303L12.9697 7.56067V18.25C12.9697 18.6642 12.6339 19 12.2197 19C11.8055 19 11.4697 18.6642 11.4697 18.25V7.56065L8.5 10.5303C8.2071 10.8232 7.73223 10.8232 7.43934 10.5303C7.14644 10.2374 7.14645 9.76256 7.43934 9.46967L11.6894 5.21967C11.83 5.07902 12.0208 5 12.2197 5Z",
|
|
275
|
+
fill: "currentColor"
|
|
276
|
+
}
|
|
277
|
+
)
|
|
278
|
+
}
|
|
279
|
+
);
|
|
280
|
+
}
|
|
281
|
+
function qe({ className: e, size: t = 24 }) {
|
|
282
|
+
return /* @__PURE__ */ n(
|
|
283
|
+
"svg",
|
|
284
|
+
{
|
|
285
|
+
width: t,
|
|
286
|
+
height: t,
|
|
287
|
+
viewBox: "0 0 24 24",
|
|
288
|
+
fill: "none",
|
|
289
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
290
|
+
className: e,
|
|
291
|
+
children: /* @__PURE__ */ n(
|
|
292
|
+
"rect",
|
|
293
|
+
{
|
|
294
|
+
x: "7",
|
|
295
|
+
y: "7",
|
|
296
|
+
width: "10",
|
|
297
|
+
height: "10",
|
|
298
|
+
rx: "2",
|
|
299
|
+
fill: "currentColor"
|
|
300
|
+
}
|
|
301
|
+
)
|
|
302
|
+
}
|
|
303
|
+
);
|
|
304
|
+
}
|
|
305
|
+
const Je = "ChatInput-module_container", Qe = "ChatInput-module_textareaContainer", tn = "ChatInput-module_actions", en = "ChatInput-module_button", pt = {
|
|
306
|
+
container: Je,
|
|
307
|
+
textareaContainer: Qe,
|
|
308
|
+
actions: tn,
|
|
309
|
+
button: en
|
|
310
|
+
};
|
|
311
|
+
function nn({ className: e, size: t = 24 }) {
|
|
312
|
+
return /* @__PURE__ */ n(
|
|
313
|
+
"svg",
|
|
314
|
+
{
|
|
315
|
+
className: e,
|
|
316
|
+
width: t,
|
|
317
|
+
height: t,
|
|
318
|
+
viewBox: "0 0 24 24",
|
|
319
|
+
fill: "none",
|
|
320
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
321
|
+
children: /* @__PURE__ */ n(
|
|
322
|
+
"path",
|
|
323
|
+
{
|
|
324
|
+
fillRule: "evenodd",
|
|
325
|
+
clipRule: "evenodd",
|
|
326
|
+
d: "M18.0045 13.4451L12 7.9864L5.9955 13.4451L7.00451 14.5549L12 10.0136L16.9955 14.5549L18.0045 13.4451Z",
|
|
327
|
+
fill: "currentColor"
|
|
328
|
+
}
|
|
329
|
+
)
|
|
330
|
+
}
|
|
331
|
+
);
|
|
332
|
+
}
|
|
333
|
+
const on = "AnimatedPlaceholder-module_container", an = {
|
|
334
|
+
container: on
|
|
335
|
+
};
|
|
336
|
+
function rn({
|
|
337
|
+
texts: e,
|
|
338
|
+
interval: t = 3e3,
|
|
339
|
+
className: o = ""
|
|
340
|
+
}) {
|
|
341
|
+
const [r, s] = W(0);
|
|
342
|
+
return E(() => {
|
|
343
|
+
const a = setInterval(() => {
|
|
344
|
+
s(
|
|
345
|
+
(i) => (i + 1) % e.length
|
|
346
|
+
);
|
|
347
|
+
}, t);
|
|
348
|
+
return () => clearInterval(a);
|
|
349
|
+
}, [e.length, t]), /* @__PURE__ */ n(Tt, { mode: "wait", children: /* @__PURE__ */ n(
|
|
350
|
+
M.span,
|
|
351
|
+
{
|
|
352
|
+
"data-slot": "animated-placeholder",
|
|
353
|
+
className: V(an.container, o),
|
|
354
|
+
initial: { opacity: 0, y: 8 },
|
|
355
|
+
animate: { opacity: 1, y: 0 },
|
|
356
|
+
exit: { opacity: 0, y: -8 },
|
|
357
|
+
transition: {
|
|
358
|
+
duration: 0.3,
|
|
359
|
+
ease: [0.4, 0, 0.2, 1]
|
|
360
|
+
// Matches --transition-colors cubic-bezier
|
|
361
|
+
},
|
|
362
|
+
children: e[r]
|
|
363
|
+
},
|
|
364
|
+
r
|
|
365
|
+
) });
|
|
366
|
+
}
|
|
367
|
+
const ue = Ee(null);
|
|
368
|
+
function ut() {
|
|
369
|
+
const e = Ae(ue);
|
|
370
|
+
if (!e)
|
|
371
|
+
throw new Error(
|
|
372
|
+
"useAgentUIContext must be used within an AgentUIContainer"
|
|
373
|
+
);
|
|
374
|
+
return e;
|
|
375
|
+
}
|
|
376
|
+
function zt({ children: e, value: t }) {
|
|
377
|
+
return /* @__PURE__ */ n(ue.Provider, { value: t, children: e });
|
|
378
|
+
}
|
|
379
|
+
function Kt({
|
|
380
|
+
value: e,
|
|
381
|
+
onChange: t,
|
|
382
|
+
onSubmit: o,
|
|
383
|
+
onKeyDown: r,
|
|
384
|
+
textareaRef: s,
|
|
385
|
+
placeholder: a = ie,
|
|
386
|
+
isProcessing: i,
|
|
387
|
+
onBlur: f,
|
|
388
|
+
fromCompact: u = !1,
|
|
389
|
+
onExpand: h,
|
|
390
|
+
showExpandButton: p = !0,
|
|
391
|
+
focusOnMount: v = !1,
|
|
392
|
+
customActions: y = [],
|
|
393
|
+
actionOrder: _ = "before-submit",
|
|
394
|
+
onStop: b,
|
|
395
|
+
disabled: L = !1,
|
|
396
|
+
className: O
|
|
397
|
+
}) {
|
|
398
|
+
const D = Se(), N = (e.trim() || i) && !L, { variant: H, floatingChatState: c } = ut(), $ = (d) => d.endsWith("…") ? d : `${d}…`, B = Array.isArray(a);
|
|
399
|
+
let P;
|
|
400
|
+
B ? P = a.map($) : a ? P = $(a) : P = "";
|
|
401
|
+
const tt = I(v);
|
|
402
|
+
E(() => {
|
|
403
|
+
tt.current && s.current && s.current.focus(), tt.current = !1;
|
|
404
|
+
}, [tt, s]);
|
|
405
|
+
const K = () => y.map((d) => /* @__PURE__ */ n(
|
|
406
|
+
Y,
|
|
407
|
+
{
|
|
408
|
+
className: d.className || pt.button,
|
|
409
|
+
onClick: d.onClick,
|
|
410
|
+
disabled: d.disabled,
|
|
411
|
+
variant: d.variant || "ghost",
|
|
412
|
+
icon: d.icon,
|
|
413
|
+
"aria-label": d["aria-label"]
|
|
414
|
+
},
|
|
415
|
+
d.id
|
|
416
|
+
)), F = () => H === "embedded" || c === "expanded" ? null : p && h ? /* @__PURE__ */ n(
|
|
417
|
+
Y,
|
|
418
|
+
{
|
|
419
|
+
className: pt.button,
|
|
420
|
+
onClick: h,
|
|
421
|
+
variant: "ghost",
|
|
422
|
+
icon: /* @__PURE__ */ n(nn, {}),
|
|
423
|
+
"aria-label": Ct("Expand conversation", "a8c-agenttic")
|
|
424
|
+
}
|
|
425
|
+
) : null, l = () => {
|
|
426
|
+
if (i && !b)
|
|
427
|
+
return null;
|
|
428
|
+
const d = () => {
|
|
429
|
+
i && b ? b() : o();
|
|
430
|
+
};
|
|
431
|
+
return /* @__PURE__ */ n(
|
|
432
|
+
Y,
|
|
433
|
+
{
|
|
434
|
+
className: pt.button,
|
|
435
|
+
onClick: d,
|
|
436
|
+
disabled: !N,
|
|
437
|
+
variant: "primary",
|
|
438
|
+
icon: i ? /* @__PURE__ */ n(qe, {}) : /* @__PURE__ */ n(ze, {}),
|
|
439
|
+
"aria-label": i ? Ct("Stop processing", "a8c-agenttic") : Ct("Send message", "a8c-agenttic")
|
|
440
|
+
}
|
|
441
|
+
);
|
|
442
|
+
};
|
|
443
|
+
return /* @__PURE__ */ T("div", { "data-slot": "chat-input", className: pt.container, children: [
|
|
444
|
+
/* @__PURE__ */ T(
|
|
445
|
+
M.div,
|
|
446
|
+
{
|
|
447
|
+
className: pt.textareaContainer,
|
|
448
|
+
initial: {
|
|
449
|
+
opacity: 0
|
|
450
|
+
},
|
|
451
|
+
animate: {
|
|
452
|
+
opacity: 1,
|
|
453
|
+
scale: 1,
|
|
454
|
+
transition: e.trim() ? { duration: 0 } : Vt
|
|
455
|
+
},
|
|
456
|
+
children: [
|
|
457
|
+
!e && B && /* @__PURE__ */ n(
|
|
458
|
+
rn,
|
|
459
|
+
{
|
|
460
|
+
texts: P
|
|
461
|
+
}
|
|
462
|
+
),
|
|
463
|
+
/* @__PURE__ */ n(
|
|
464
|
+
le,
|
|
465
|
+
{
|
|
466
|
+
id: D,
|
|
467
|
+
ref: s,
|
|
468
|
+
value: e,
|
|
469
|
+
onChange: (d) => t(d.target.value),
|
|
470
|
+
onKeyDown: r,
|
|
471
|
+
onBlur: f,
|
|
472
|
+
placeholder: B ? "" : P,
|
|
473
|
+
rows: 1
|
|
474
|
+
}
|
|
475
|
+
)
|
|
476
|
+
]
|
|
477
|
+
}
|
|
478
|
+
),
|
|
479
|
+
/* @__PURE__ */ T(
|
|
480
|
+
M.div,
|
|
481
|
+
{
|
|
482
|
+
className: pt.actions,
|
|
483
|
+
initial: {
|
|
484
|
+
opacity: u ? 1 : 0,
|
|
485
|
+
scale: u ? 1 : 0.5
|
|
486
|
+
},
|
|
487
|
+
animate: {
|
|
488
|
+
opacity: 1,
|
|
489
|
+
scale: 1,
|
|
490
|
+
transition: e.trim() ? { duration: 0 } : lt
|
|
491
|
+
},
|
|
492
|
+
children: [
|
|
493
|
+
F(),
|
|
494
|
+
_ === "before-submit" && K(),
|
|
495
|
+
l(),
|
|
496
|
+
_ === "after-submit" && K()
|
|
497
|
+
]
|
|
498
|
+
}
|
|
499
|
+
)
|
|
500
|
+
] });
|
|
501
|
+
}
|
|
502
|
+
const sn = "Suggestions-module_container", cn = "Suggestions-module_vertical", Gt = {
|
|
503
|
+
container: sn,
|
|
504
|
+
vertical: cn
|
|
505
|
+
}, Xt = ({
|
|
506
|
+
className: e,
|
|
507
|
+
suggestions: t,
|
|
508
|
+
onSubmit: o,
|
|
509
|
+
layout: r = "horizontal",
|
|
510
|
+
visible: s = !0
|
|
511
|
+
}) => {
|
|
512
|
+
const a = (i) => {
|
|
513
|
+
o && o(i.prompt);
|
|
514
|
+
};
|
|
515
|
+
return !t || t.length === 0 ? null : /* @__PURE__ */ n(Tt, { children: t && t.length > 0 && s && /* @__PURE__ */ n(
|
|
516
|
+
M.div,
|
|
517
|
+
{
|
|
518
|
+
className: V(
|
|
519
|
+
Gt.container,
|
|
520
|
+
r === "vertical" ? Gt.vertical : "",
|
|
521
|
+
e
|
|
522
|
+
),
|
|
523
|
+
initial: { opacity: 0, y: "-80%" },
|
|
524
|
+
animate: { opacity: 1, y: "-100%" },
|
|
525
|
+
exit: { opacity: 0, y: "-80%" },
|
|
526
|
+
transition: Vt,
|
|
527
|
+
children: t.map(
|
|
528
|
+
(i, f) => /* @__PURE__ */ n(
|
|
529
|
+
M.div,
|
|
530
|
+
{
|
|
531
|
+
initial: { opacity: 0, y: 10 },
|
|
532
|
+
animate: { opacity: 1, y: 0 },
|
|
533
|
+
exit: { opacity: 0, y: 10 },
|
|
534
|
+
transition: {
|
|
535
|
+
...Vt,
|
|
536
|
+
delay: f * 0.05
|
|
537
|
+
},
|
|
538
|
+
children: /* @__PURE__ */ n(
|
|
539
|
+
Y,
|
|
540
|
+
{
|
|
541
|
+
onClick: () => a(i),
|
|
542
|
+
variant: r === "vertical" ? "transparent" : "outline",
|
|
543
|
+
size: r === "vertical" ? "lg" : void 0,
|
|
544
|
+
className: Gt.button,
|
|
545
|
+
children: i.label
|
|
546
|
+
}
|
|
547
|
+
)
|
|
548
|
+
},
|
|
549
|
+
i.id
|
|
550
|
+
)
|
|
551
|
+
)
|
|
552
|
+
}
|
|
553
|
+
) });
|
|
554
|
+
};
|
|
555
|
+
function ln() {
|
|
556
|
+
const e = I(/* @__PURE__ */ new Map()), t = m((a) => {
|
|
557
|
+
const i = e.current.get(a);
|
|
558
|
+
i && (clearTimeout(i), e.current.delete(a));
|
|
559
|
+
}, []), o = m(
|
|
560
|
+
(a, i, f) => {
|
|
561
|
+
t(a);
|
|
562
|
+
const u = setTimeout(i, f);
|
|
563
|
+
return e.current.set(a, u), u;
|
|
564
|
+
},
|
|
565
|
+
[t]
|
|
566
|
+
), r = m(() => {
|
|
567
|
+
e.current.forEach((a) => {
|
|
568
|
+
clearTimeout(a);
|
|
569
|
+
}), e.current.clear();
|
|
570
|
+
}, []), s = m((a) => e.current.has(a), []);
|
|
571
|
+
return E(() => r, [r]), {
|
|
572
|
+
setNamedTimeout: o,
|
|
573
|
+
clearNamedTimeout: t,
|
|
574
|
+
clearAllTimeouts: r,
|
|
575
|
+
hasTimeout: s
|
|
576
|
+
};
|
|
577
|
+
}
|
|
578
|
+
const un = 4e3, dn = 400;
|
|
579
|
+
function de({
|
|
580
|
+
value: e,
|
|
581
|
+
onChange: t,
|
|
582
|
+
onSubmit: o,
|
|
583
|
+
onKeyDown: r,
|
|
584
|
+
textareaRef: s,
|
|
585
|
+
placeholder: a,
|
|
586
|
+
isProcessing: i,
|
|
587
|
+
onBlur: f,
|
|
588
|
+
onExpand: u,
|
|
589
|
+
showExpandButton: h = !0,
|
|
590
|
+
focusOnMount: p = !1,
|
|
591
|
+
customActions: v,
|
|
592
|
+
actionOrder: y,
|
|
593
|
+
onStop: _,
|
|
594
|
+
suggestions: b,
|
|
595
|
+
clearSuggestions: L
|
|
596
|
+
}) {
|
|
597
|
+
const [O, D] = W(!1), { setNamedTimeout: N, clearAllTimeouts: H } = ln(), c = m(
|
|
598
|
+
($) => {
|
|
599
|
+
t($), L == null || L();
|
|
600
|
+
},
|
|
601
|
+
[t, L]
|
|
602
|
+
);
|
|
603
|
+
return E(() => {
|
|
604
|
+
if (H(), e) {
|
|
605
|
+
D(!1);
|
|
606
|
+
return;
|
|
607
|
+
}
|
|
608
|
+
if (!b || b.length === 0) {
|
|
609
|
+
D(!1);
|
|
610
|
+
return;
|
|
611
|
+
}
|
|
612
|
+
D(!0), N(
|
|
613
|
+
"hide-suggestions",
|
|
614
|
+
() => {
|
|
615
|
+
D(!1), N(
|
|
616
|
+
"clear-suggestions",
|
|
617
|
+
() => {
|
|
618
|
+
L == null || L();
|
|
619
|
+
},
|
|
620
|
+
dn
|
|
621
|
+
);
|
|
622
|
+
},
|
|
623
|
+
un
|
|
624
|
+
);
|
|
625
|
+
}, [
|
|
626
|
+
e,
|
|
627
|
+
b,
|
|
628
|
+
H,
|
|
629
|
+
N,
|
|
630
|
+
L
|
|
631
|
+
]), /* @__PURE__ */ T(Ht, { children: [
|
|
632
|
+
/* @__PURE__ */ n(
|
|
633
|
+
Kt,
|
|
634
|
+
{
|
|
635
|
+
value: e,
|
|
636
|
+
onChange: t,
|
|
637
|
+
onSubmit: o,
|
|
638
|
+
onKeyDown: r,
|
|
639
|
+
textareaRef: s,
|
|
640
|
+
placeholder: a,
|
|
641
|
+
isProcessing: i,
|
|
642
|
+
onBlur: f,
|
|
643
|
+
onExpand: u,
|
|
644
|
+
showExpandButton: h,
|
|
645
|
+
focusOnMount: p,
|
|
646
|
+
customActions: v,
|
|
647
|
+
actionOrder: y,
|
|
648
|
+
onStop: _
|
|
649
|
+
}
|
|
650
|
+
),
|
|
651
|
+
!e && /* @__PURE__ */ n(
|
|
652
|
+
Xt,
|
|
653
|
+
{
|
|
654
|
+
suggestions: b,
|
|
655
|
+
onSubmit: c,
|
|
656
|
+
layout: "vertical",
|
|
657
|
+
visible: O
|
|
658
|
+
}
|
|
659
|
+
)
|
|
660
|
+
] });
|
|
661
|
+
}
|
|
662
|
+
function me({ className: e, size: t = 24 }) {
|
|
663
|
+
return /* @__PURE__ */ n(
|
|
664
|
+
"svg",
|
|
665
|
+
{
|
|
666
|
+
className: e,
|
|
667
|
+
width: t,
|
|
668
|
+
height: t,
|
|
669
|
+
viewBox: "0 0 24 24",
|
|
670
|
+
fill: "none",
|
|
671
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
672
|
+
children: /* @__PURE__ */ n(
|
|
673
|
+
"path",
|
|
674
|
+
{
|
|
675
|
+
d: "M12.0001 13.0607L16.4697 17.5304L17.5304 16.4697L13.0607 12.0001L17.5304 7.53039L16.4697 6.46973L12.0001 10.9394L7.5304 6.46973L6.46973 7.53039L10.9394 12.0001L6.46974 16.4697L7.5304 17.5304L12.0001 13.0607Z",
|
|
676
|
+
fill: "currentColor"
|
|
677
|
+
}
|
|
678
|
+
)
|
|
679
|
+
}
|
|
680
|
+
);
|
|
681
|
+
}
|
|
682
|
+
const mn = "ChatHeader-module_container", fn = {
|
|
683
|
+
container: mn
|
|
684
|
+
};
|
|
685
|
+
function fe({ onClose: e, className: t }) {
|
|
686
|
+
return /* @__PURE__ */ n(
|
|
687
|
+
M.div,
|
|
688
|
+
{
|
|
689
|
+
"data-slot": "chat-header",
|
|
690
|
+
"data-draggable": "true",
|
|
691
|
+
className: fn.container,
|
|
692
|
+
initial: { opacity: 0 },
|
|
693
|
+
animate: { opacity: 1 },
|
|
694
|
+
transition: { ...lt, delay: 0.1 },
|
|
695
|
+
children: e && /* @__PURE__ */ n(
|
|
696
|
+
Y,
|
|
697
|
+
{
|
|
698
|
+
variant: "ghost",
|
|
699
|
+
icon: /* @__PURE__ */ n(me, {}),
|
|
700
|
+
onClick: e,
|
|
701
|
+
"aria-label": Ct("Close conversation", "a8c-agenttic")
|
|
702
|
+
}
|
|
703
|
+
)
|
|
704
|
+
}
|
|
705
|
+
);
|
|
706
|
+
}
|
|
707
|
+
const hn = "Notice-module_container", pn = "Notice-module_containerWithIcon", Cn = "Notice-module_content", gn = "Notice-module_actions", vn = "Notice-module_icon", wn = "Notice-module_dismissible", J = {
|
|
708
|
+
container: hn,
|
|
709
|
+
containerWithIcon: pn,
|
|
710
|
+
content: Cn,
|
|
711
|
+
actions: gn,
|
|
712
|
+
icon: vn,
|
|
713
|
+
dismissible: wn
|
|
714
|
+
};
|
|
715
|
+
function he({
|
|
716
|
+
icon: e,
|
|
717
|
+
message: t,
|
|
718
|
+
action: o,
|
|
719
|
+
dismissible: r = !0,
|
|
720
|
+
onDismiss: s,
|
|
721
|
+
className: a,
|
|
722
|
+
status: i
|
|
723
|
+
}) {
|
|
724
|
+
return /* @__PURE__ */ T(
|
|
725
|
+
"div",
|
|
726
|
+
{
|
|
727
|
+
"data-slot": "notice",
|
|
728
|
+
className: V(
|
|
729
|
+
J.container,
|
|
730
|
+
{
|
|
731
|
+
[J.containerWithIcon]: !!e,
|
|
732
|
+
[J.isSuccess]: i === "success",
|
|
733
|
+
[J.isWarning]: i === "warning",
|
|
734
|
+
[J.isError]: i === "error"
|
|
735
|
+
},
|
|
736
|
+
a
|
|
737
|
+
),
|
|
738
|
+
children: [
|
|
739
|
+
/* @__PURE__ */ T("div", { className: J.content, children: [
|
|
740
|
+
e && /* @__PURE__ */ n("div", { className: J.icon, children: e }),
|
|
741
|
+
/* @__PURE__ */ n("span", { children: t })
|
|
742
|
+
] }),
|
|
743
|
+
/* @__PURE__ */ T("div", { className: J.actions, children: [
|
|
744
|
+
o && /* @__PURE__ */ n(Y, { onClick: o.onClick, variant: "link", children: o.label }),
|
|
745
|
+
r && s && /* @__PURE__ */ n(
|
|
746
|
+
Y,
|
|
747
|
+
{
|
|
748
|
+
className: J.dismissible,
|
|
749
|
+
onClick: s,
|
|
750
|
+
variant: "ghost",
|
|
751
|
+
size: "sm",
|
|
752
|
+
icon: /* @__PURE__ */ n(me, {})
|
|
753
|
+
}
|
|
754
|
+
)
|
|
755
|
+
] })
|
|
756
|
+
]
|
|
757
|
+
}
|
|
758
|
+
);
|
|
759
|
+
}
|
|
760
|
+
const Ln = "ChatFooter-module_container", Yt = {
|
|
761
|
+
container: Ln
|
|
762
|
+
};
|
|
763
|
+
function yn({
|
|
764
|
+
inputValue: e,
|
|
765
|
+
onInputChange: t,
|
|
766
|
+
onSubmit: o,
|
|
767
|
+
onKeyDown: r,
|
|
768
|
+
textareaRef: s,
|
|
769
|
+
placeholder: a,
|
|
770
|
+
isProcessing: i,
|
|
771
|
+
onStop: f,
|
|
772
|
+
fromCompact: u = !1,
|
|
773
|
+
onExpand: h,
|
|
774
|
+
disabled: p,
|
|
775
|
+
notice: v,
|
|
776
|
+
suggestions: y,
|
|
777
|
+
clearSuggestions: _,
|
|
778
|
+
focusOnMount: b,
|
|
779
|
+
customActions: L,
|
|
780
|
+
actionOrder: O
|
|
781
|
+
}) {
|
|
782
|
+
const D = m(
|
|
783
|
+
(N) => {
|
|
784
|
+
t(N), _ == null || _();
|
|
785
|
+
},
|
|
786
|
+
[t, _]
|
|
787
|
+
);
|
|
788
|
+
return /* @__PURE__ */ T(
|
|
789
|
+
M.div,
|
|
790
|
+
{
|
|
791
|
+
"data-slot": "chat-footer",
|
|
792
|
+
className: Yt.container,
|
|
793
|
+
initial: { opacity: 0, scale: 1 },
|
|
794
|
+
animate: { opacity: 1, scale: 1 },
|
|
795
|
+
transition: { ...lt },
|
|
796
|
+
children: [
|
|
797
|
+
!e && /* @__PURE__ */ n(
|
|
798
|
+
Xt,
|
|
799
|
+
{
|
|
800
|
+
suggestions: y,
|
|
801
|
+
onSubmit: D
|
|
802
|
+
}
|
|
803
|
+
),
|
|
804
|
+
v && /* @__PURE__ */ n(
|
|
805
|
+
he,
|
|
806
|
+
{
|
|
807
|
+
icon: v.icon,
|
|
808
|
+
message: v.message,
|
|
809
|
+
action: v.action,
|
|
810
|
+
dismissible: v.dismissible,
|
|
811
|
+
onDismiss: v.onDismiss
|
|
812
|
+
}
|
|
813
|
+
),
|
|
814
|
+
/* @__PURE__ */ n(
|
|
815
|
+
Kt,
|
|
816
|
+
{
|
|
817
|
+
value: e,
|
|
818
|
+
onChange: t,
|
|
819
|
+
onSubmit: o,
|
|
820
|
+
onKeyDown: r,
|
|
821
|
+
textareaRef: s,
|
|
822
|
+
placeholder: a,
|
|
823
|
+
isProcessing: i,
|
|
824
|
+
onStop: f,
|
|
825
|
+
fromCompact: u,
|
|
826
|
+
onExpand: h,
|
|
827
|
+
showExpandButton: !1,
|
|
828
|
+
focusOnMount: b,
|
|
829
|
+
customActions: L,
|
|
830
|
+
actionOrder: O,
|
|
831
|
+
disabled: p
|
|
832
|
+
}
|
|
833
|
+
)
|
|
834
|
+
]
|
|
835
|
+
}
|
|
836
|
+
);
|
|
837
|
+
}
|
|
838
|
+
const In = "MessageActions-module_container", qt = {
|
|
839
|
+
container: In
|
|
840
|
+
};
|
|
841
|
+
function Jt({ message: e }) {
|
|
842
|
+
return !e.actions || e.actions.length === 0 ? null : /* @__PURE__ */ n(
|
|
843
|
+
"div",
|
|
844
|
+
{
|
|
845
|
+
className: qt.container,
|
|
846
|
+
"data-visible": "true",
|
|
847
|
+
role: "toolbar",
|
|
848
|
+
"aria-label": "Message actions",
|
|
849
|
+
children: e.actions.map((t) => /* @__PURE__ */ n(
|
|
850
|
+
Y,
|
|
851
|
+
{
|
|
852
|
+
className: qt.button,
|
|
853
|
+
icon: t.icon,
|
|
854
|
+
onClick: () => t.onClick(e),
|
|
855
|
+
variant: "ghost",
|
|
856
|
+
size: "sm",
|
|
857
|
+
type: "button",
|
|
858
|
+
disabled: t.disabled,
|
|
859
|
+
pressed: t.pressed,
|
|
860
|
+
title: t.tooltip || t.label,
|
|
861
|
+
"aria-label": t.label,
|
|
862
|
+
...t.tooltip && { title: t.tooltip },
|
|
863
|
+
children: t.showLabel ? t.label : void 0
|
|
864
|
+
},
|
|
865
|
+
t.id
|
|
866
|
+
))
|
|
867
|
+
}
|
|
868
|
+
);
|
|
869
|
+
}
|
|
870
|
+
const bn = "Message-module_message", Tn = "Message-module_user", _n = "Message-module_bubble", En = "Message-module_error", An = "Message-module_content", Dt = {
|
|
871
|
+
message: bn,
|
|
872
|
+
user: Tn,
|
|
873
|
+
bubble: _n,
|
|
874
|
+
error: En,
|
|
875
|
+
content: An
|
|
876
|
+
}, Sn = ee.forwardRef(
|
|
877
|
+
function({ message: t, messageRenderer: o = Re }, r) {
|
|
878
|
+
const s = () => /* @__PURE__ */ n(Ht, { children: t.content.map((a, i) => {
|
|
879
|
+
if (a.type === "text" && a.text)
|
|
880
|
+
return /* @__PURE__ */ n(o, { children: a.text }, i);
|
|
881
|
+
if (a.type === "component" && a.component) {
|
|
882
|
+
const f = a.component;
|
|
883
|
+
return /* @__PURE__ */ n(
|
|
884
|
+
f,
|
|
885
|
+
{
|
|
886
|
+
...a.componentProps || {}
|
|
887
|
+
},
|
|
888
|
+
i
|
|
889
|
+
);
|
|
890
|
+
}
|
|
891
|
+
return null;
|
|
892
|
+
}) });
|
|
893
|
+
return /* @__PURE__ */ T(
|
|
894
|
+
M.div,
|
|
895
|
+
{
|
|
896
|
+
ref: r,
|
|
897
|
+
variants: re,
|
|
898
|
+
initial: "hidden",
|
|
899
|
+
animate: "visible",
|
|
900
|
+
"data-slot": "message",
|
|
901
|
+
"data-role": t.role,
|
|
902
|
+
className: V(Dt.message, Dt[t.role]),
|
|
903
|
+
children: [
|
|
904
|
+
/* @__PURE__ */ T("div", { className: Dt.content, children: [
|
|
905
|
+
/* @__PURE__ */ n("div", { className: Dt.bubble, children: s() }),
|
|
906
|
+
t.role !== "user" && /* @__PURE__ */ n(Jt, { message: t })
|
|
907
|
+
] }),
|
|
908
|
+
t.role === "user" && /* @__PURE__ */ n(Jt, { message: t })
|
|
909
|
+
]
|
|
910
|
+
}
|
|
911
|
+
);
|
|
912
|
+
}
|
|
913
|
+
), xn = "Messages-module_container", On = "Messages-module_emptyState", Wt = {
|
|
914
|
+
container: xn,
|
|
915
|
+
emptyState: On
|
|
916
|
+
}, Nn = "Thinking-module_container", Rn = "Thinking-module_icon", Dn = "Thinking-module_content", Bt = {
|
|
917
|
+
container: Nn,
|
|
918
|
+
icon: Rn,
|
|
919
|
+
content: Dn
|
|
920
|
+
}, Mn = xe(
|
|
921
|
+
ee.forwardRef(
|
|
922
|
+
function({ content: t = "Thinking…" }, o) {
|
|
923
|
+
const r = Oe(() => /* @__PURE__ */ n(se, {}), []);
|
|
924
|
+
return /* @__PURE__ */ T(
|
|
925
|
+
"div",
|
|
926
|
+
{
|
|
927
|
+
ref: o,
|
|
928
|
+
"data-slot": "thinking",
|
|
929
|
+
className: Bt.container,
|
|
930
|
+
children: [
|
|
931
|
+
/* @__PURE__ */ n("div", { className: Bt.icon, children: r }),
|
|
932
|
+
/* @__PURE__ */ n("span", { className: Bt.content, children: t })
|
|
933
|
+
]
|
|
934
|
+
}
|
|
935
|
+
);
|
|
936
|
+
}
|
|
937
|
+
)
|
|
938
|
+
);
|
|
939
|
+
function pe({
|
|
940
|
+
messages: e,
|
|
941
|
+
isProcessing: t,
|
|
942
|
+
error: o,
|
|
943
|
+
emptyView: r,
|
|
944
|
+
messageRenderer: s,
|
|
945
|
+
className: a
|
|
946
|
+
}) {
|
|
947
|
+
const i = I(null), f = I([]), u = I(!0), h = I(null);
|
|
948
|
+
return E(() => {
|
|
949
|
+
const p = e.length > f.current.length;
|
|
950
|
+
if (u.current && e.length > 0 && i.current ? i.current.scrollTop = i.current.scrollHeight : p && !u.current && i.current && i.current.scrollTo({
|
|
951
|
+
top: i.current.scrollHeight,
|
|
952
|
+
behavior: "smooth"
|
|
953
|
+
}), p && h.current) {
|
|
954
|
+
const y = e.slice(
|
|
955
|
+
f.current.length
|
|
956
|
+
).filter(
|
|
957
|
+
(_) => _.role === "agent"
|
|
958
|
+
);
|
|
959
|
+
if (y.length > 0) {
|
|
960
|
+
const b = y[y.length - 1].content.filter((L) => L.type === "text").map((L) => L.text).join(" ");
|
|
961
|
+
b && (h.current.textContent = b);
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
u.current && (u.current = !1), f.current = e;
|
|
965
|
+
}, [e]), e.length === 0 ? r ? /* @__PURE__ */ n(
|
|
966
|
+
"div",
|
|
967
|
+
{
|
|
968
|
+
"data-slot": "messages",
|
|
969
|
+
className: `${Wt.container} ${Wt.emptyState}`,
|
|
970
|
+
ref: i,
|
|
971
|
+
children: r
|
|
972
|
+
}
|
|
973
|
+
) : null : /* @__PURE__ */ T(Ht, { children: [
|
|
974
|
+
/* @__PURE__ */ n(
|
|
975
|
+
"div",
|
|
976
|
+
{
|
|
977
|
+
ref: h,
|
|
978
|
+
"aria-live": "polite",
|
|
979
|
+
"aria-atomic": "true",
|
|
980
|
+
style: {
|
|
981
|
+
position: "absolute",
|
|
982
|
+
left: "-10000px",
|
|
983
|
+
width: "1px",
|
|
984
|
+
height: "1px",
|
|
985
|
+
overflow: "hidden"
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
),
|
|
989
|
+
/* @__PURE__ */ n(
|
|
990
|
+
"div",
|
|
991
|
+
{
|
|
992
|
+
"data-slot": "messages",
|
|
993
|
+
className: Wt.container,
|
|
994
|
+
ref: i,
|
|
995
|
+
children: /* @__PURE__ */ T(Tt, { mode: "popLayout", children: [
|
|
996
|
+
e.map((p) => /* @__PURE__ */ n(
|
|
997
|
+
Sn,
|
|
998
|
+
{
|
|
999
|
+
message: p,
|
|
1000
|
+
messageRenderer: s
|
|
1001
|
+
},
|
|
1002
|
+
p.id
|
|
1003
|
+
)),
|
|
1004
|
+
t && /* @__PURE__ */ n(Mn, {}),
|
|
1005
|
+
o && /* @__PURE__ */ n(
|
|
1006
|
+
"div",
|
|
1007
|
+
{
|
|
1008
|
+
className: "error-message",
|
|
1009
|
+
style: {
|
|
1010
|
+
color: "var(--color-destructive)",
|
|
1011
|
+
padding: "1rem",
|
|
1012
|
+
textAlign: "center"
|
|
1013
|
+
},
|
|
1014
|
+
children: o
|
|
1015
|
+
}
|
|
1016
|
+
)
|
|
1017
|
+
] })
|
|
1018
|
+
}
|
|
1019
|
+
)
|
|
1020
|
+
] });
|
|
1021
|
+
}
|
|
1022
|
+
const Pn = "ConversationView-module_container", Vn = "ConversationView-module_withHeader", bt = {
|
|
1023
|
+
container: Pn,
|
|
1024
|
+
withHeader: Vn
|
|
1025
|
+
};
|
|
1026
|
+
function Qt({
|
|
1027
|
+
messages: e,
|
|
1028
|
+
error: t,
|
|
1029
|
+
inputValue: o,
|
|
1030
|
+
onInputChange: r,
|
|
1031
|
+
onSubmit: s,
|
|
1032
|
+
onKeyDown: a,
|
|
1033
|
+
textareaRef: i,
|
|
1034
|
+
placeholder: f,
|
|
1035
|
+
isProcessing: u,
|
|
1036
|
+
onStop: h,
|
|
1037
|
+
fromCompact: p = !1,
|
|
1038
|
+
showHeader: v = !1,
|
|
1039
|
+
onClose: y,
|
|
1040
|
+
onExpand: _,
|
|
1041
|
+
notice: b,
|
|
1042
|
+
emptyView: L,
|
|
1043
|
+
suggestions: O,
|
|
1044
|
+
clearSuggestions: D,
|
|
1045
|
+
messageRenderer: N,
|
|
1046
|
+
focusOnMount: H = !1
|
|
1047
|
+
}) {
|
|
1048
|
+
return E(() => {
|
|
1049
|
+
const c = ($) => {
|
|
1050
|
+
$.key === "Escape" && y && y();
|
|
1051
|
+
};
|
|
1052
|
+
return document.addEventListener("keydown", c), () => document.removeEventListener("keydown", c);
|
|
1053
|
+
}, [y]), /* @__PURE__ */ T(
|
|
1054
|
+
"div",
|
|
1055
|
+
{
|
|
1056
|
+
"data-slot": "conversation-view",
|
|
1057
|
+
className: `${bt.container}${v ? ` ${bt.withHeader}` : ""}`,
|
|
1058
|
+
children: [
|
|
1059
|
+
v && /* @__PURE__ */ n(fe, { onClose: y }),
|
|
1060
|
+
/* @__PURE__ */ n(
|
|
1061
|
+
pe,
|
|
1062
|
+
{
|
|
1063
|
+
messages: e,
|
|
1064
|
+
isProcessing: u,
|
|
1065
|
+
error: t,
|
|
1066
|
+
emptyView: L,
|
|
1067
|
+
messageRenderer: N
|
|
1068
|
+
}
|
|
1069
|
+
),
|
|
1070
|
+
/* @__PURE__ */ n(
|
|
1071
|
+
yn,
|
|
1072
|
+
{
|
|
1073
|
+
inputValue: o,
|
|
1074
|
+
onInputChange: r,
|
|
1075
|
+
onSubmit: s,
|
|
1076
|
+
onKeyDown: a,
|
|
1077
|
+
textareaRef: i,
|
|
1078
|
+
placeholder: f,
|
|
1079
|
+
isProcessing: u,
|
|
1080
|
+
onStop: h,
|
|
1081
|
+
fromCompact: p,
|
|
1082
|
+
onExpand: _,
|
|
1083
|
+
notice: b,
|
|
1084
|
+
suggestions: O,
|
|
1085
|
+
clearSuggestions: D,
|
|
1086
|
+
focusOnMount: H
|
|
1087
|
+
}
|
|
1088
|
+
)
|
|
1089
|
+
]
|
|
1090
|
+
}
|
|
1091
|
+
);
|
|
1092
|
+
}
|
|
1093
|
+
const Hn = "Chat-module_container", $n = "Chat-module_embedded", Fn = "Chat-module_floating", kn = "Chat-module_content", Z = {
|
|
1094
|
+
container: Hn,
|
|
1095
|
+
embedded: $n,
|
|
1096
|
+
floating: Fn,
|
|
1097
|
+
content: kn
|
|
1098
|
+
}, S = {
|
|
1099
|
+
COLLAPSED_SIZE: 56,
|
|
1100
|
+
COMPACT_WIDTH: 372,
|
|
1101
|
+
EXPANDED_HEIGHT: 520,
|
|
1102
|
+
AUTO_COLLAPSE_DELAY: 1500,
|
|
1103
|
+
BORDER_RADIUS: 24,
|
|
1104
|
+
PADDING: 16,
|
|
1105
|
+
VIEWPORT_OFFSET: 16
|
|
1106
|
+
}, yt = {
|
|
1107
|
+
SPRING_CONFIG: {
|
|
1108
|
+
type: "spring",
|
|
1109
|
+
damping: 25,
|
|
1110
|
+
stiffness: 300
|
|
1111
|
+
},
|
|
1112
|
+
VELOCITY_MULTIPLIER: 0.1,
|
|
1113
|
+
NON_DRAGGABLE_SELECTORS: [
|
|
1114
|
+
'[data-slot="message"]',
|
|
1115
|
+
'[data-slot="chat-input"]',
|
|
1116
|
+
'[data-slot="chat-footer"]'
|
|
1117
|
+
].join(", ")
|
|
1118
|
+
};
|
|
1119
|
+
function jn({
|
|
1120
|
+
messages: e,
|
|
1121
|
+
isProcessing: t,
|
|
1122
|
+
error: o,
|
|
1123
|
+
onSubmit: r,
|
|
1124
|
+
variant: s = "floating",
|
|
1125
|
+
triggerIcon: a,
|
|
1126
|
+
placeholder: i = ie,
|
|
1127
|
+
notice: f,
|
|
1128
|
+
onOpen: u,
|
|
1129
|
+
onExpand: h,
|
|
1130
|
+
onClose: p,
|
|
1131
|
+
onStop: v,
|
|
1132
|
+
emptyView: y,
|
|
1133
|
+
floatingChatState: _,
|
|
1134
|
+
suggestions: b,
|
|
1135
|
+
clearSuggestions: L,
|
|
1136
|
+
messageRenderer: O,
|
|
1137
|
+
className: D
|
|
1138
|
+
}) {
|
|
1139
|
+
const [N, H] = W(""), c = oe(_), $ = I(!1), B = I(!1), P = I(!1), [tt, K] = W(!1);
|
|
1140
|
+
E(() => {
|
|
1141
|
+
$.current = !1, B.current = !1, P.current = !1;
|
|
1142
|
+
}, [c.state]);
|
|
1143
|
+
const F = I(/* @__PURE__ */ new Set()), l = m(() => {
|
|
1144
|
+
F.current.forEach((g) => {
|
|
1145
|
+
clearTimeout(g);
|
|
1146
|
+
}), F.current.clear();
|
|
1147
|
+
}, []), d = ae({
|
|
1148
|
+
value: N,
|
|
1149
|
+
setValue: H,
|
|
1150
|
+
onSubmit: async (g) => {
|
|
1151
|
+
c.state !== "expanded" && (h == null || h()), c.setState("expanded"), await r(g);
|
|
1152
|
+
},
|
|
1153
|
+
isProcessing: t
|
|
1154
|
+
}), [gt, vt] = W(56), [wt, _t] = W(
|
|
1155
|
+
"left"
|
|
1156
|
+
), k = I(null), et = I(null), w = I(null), nt = Mt(0), ot = Mt(0), at = ne(), Ft = m(() => {
|
|
1157
|
+
$.current = !0, c.open(), u == null || u();
|
|
1158
|
+
}, [c, u]), X = m(() => {
|
|
1159
|
+
var A, U, G;
|
|
1160
|
+
const g = (U = (A = w.current) == null ? void 0 : A.ownerDocument) == null ? void 0 : U.activeElement;
|
|
1161
|
+
return !(g && ((G = w.current) != null && G.contains(g)) || N.trim());
|
|
1162
|
+
}, [N, w]), dt = (g) => g === "collapsed" ? S.COLLAPSED_SIZE : g === "compact" ? gt : S.EXPANDED_HEIGHT, j = m(() => {
|
|
1163
|
+
if (c.state === "collapsed" && (c.setState("compact"), c.initialState === "collapsed")) {
|
|
1164
|
+
const g = setTimeout(() => {
|
|
1165
|
+
c.state === "compact" && X() && c.setState("collapsed"), F.current.delete(g);
|
|
1166
|
+
}, S.AUTO_COLLAPSE_DELAY);
|
|
1167
|
+
F.current.add(g);
|
|
1168
|
+
}
|
|
1169
|
+
}, [c, X]), Q = m(() => {
|
|
1170
|
+
if (c.initialState === "collapsed" && c.state === "compact" && X()) {
|
|
1171
|
+
const g = setTimeout(() => {
|
|
1172
|
+
c.state === "compact" && X() && c.setState("collapsed"), F.current.delete(g);
|
|
1173
|
+
}, S.AUTO_COLLAPSE_DELAY);
|
|
1174
|
+
F.current.add(g);
|
|
1175
|
+
}
|
|
1176
|
+
}, [c, X]), z = m(async () => {
|
|
1177
|
+
if (d.value.trim()) {
|
|
1178
|
+
const g = d.value.trim();
|
|
1179
|
+
d.clear(), c.state !== "expanded" && (h == null || h()), c.setState("expanded"), await r(g);
|
|
1180
|
+
}
|
|
1181
|
+
}, [d, r, c, h]), it = m(() => {
|
|
1182
|
+
P.current = !0, h == null || h(), c.setState("expanded");
|
|
1183
|
+
}, [h, c]), kt = m(() => {
|
|
1184
|
+
B.current = !0, d.clear(), c.close(), p && p();
|
|
1185
|
+
}, [d, c, p]), rt = m(
|
|
1186
|
+
(g) => {
|
|
1187
|
+
if (!w.current || !et.current)
|
|
1188
|
+
return null;
|
|
1189
|
+
const A = w.current.getBoundingClientRect(), U = et.current.getBoundingClientRect(), G = window.getComputedStyle(w.current), mt = new DOMMatrixReadOnly(G.transform), St = A.x - mt.e, ct = A.y - mt.f, xt = (g ?? wt) === "left" ? U.left : U.right - S.COMPACT_WIDTH, C = U.bottom - S.EXPANDED_HEIGHT;
|
|
1190
|
+
return {
|
|
1191
|
+
x: xt - St,
|
|
1192
|
+
y: C - ct
|
|
1193
|
+
};
|
|
1194
|
+
},
|
|
1195
|
+
[wt]
|
|
1196
|
+
), st = m(
|
|
1197
|
+
(g) => {
|
|
1198
|
+
g.target.closest(
|
|
1199
|
+
yt.NON_DRAGGABLE_SELECTORS
|
|
1200
|
+
) || at.start(g.nativeEvent);
|
|
1201
|
+
},
|
|
1202
|
+
[at]
|
|
1203
|
+
), Ut = m(
|
|
1204
|
+
(g, A) => {
|
|
1205
|
+
const U = A.point.x, G = S.COMPACT_WIDTH, mt = (window.innerWidth - G) / 2, ct = U < mt ? "left" : "right";
|
|
1206
|
+
_t(ct);
|
|
1207
|
+
const ft = rt(ct);
|
|
1208
|
+
ft && (Pt(nt, ft.x, {
|
|
1209
|
+
...yt.SPRING_CONFIG,
|
|
1210
|
+
velocity: A.velocity.x * yt.VELOCITY_MULTIPLIER
|
|
1211
|
+
}), Pt(ot, ft.y, {
|
|
1212
|
+
...yt.SPRING_CONFIG,
|
|
1213
|
+
velocity: A.velocity.y * yt.VELOCITY_MULTIPLIER
|
|
1214
|
+
}));
|
|
1215
|
+
},
|
|
1216
|
+
[nt, ot, rt]
|
|
1217
|
+
), Et = I(c.state), At = Et.current === "compact" && c.state === "expanded";
|
|
1218
|
+
return E(() => {
|
|
1219
|
+
l(), Et.current = c.state;
|
|
1220
|
+
}, [c.state, l]), E(() => {
|
|
1221
|
+
if (c.state !== "expanded")
|
|
1222
|
+
return;
|
|
1223
|
+
const g = () => {
|
|
1224
|
+
const A = rt();
|
|
1225
|
+
A && (nt.set(A.x), ot.set(A.y));
|
|
1226
|
+
};
|
|
1227
|
+
return window.addEventListener("resize", g), () => window.removeEventListener("resize", g);
|
|
1228
|
+
}, [c.state, nt, ot, rt]), E(() => {
|
|
1229
|
+
const g = F.current;
|
|
1230
|
+
return () => {
|
|
1231
|
+
g.forEach((A) => {
|
|
1232
|
+
clearTimeout(A);
|
|
1233
|
+
}), g.clear();
|
|
1234
|
+
};
|
|
1235
|
+
}, []), E(() => {
|
|
1236
|
+
if (c.state === "compact" && k.current) {
|
|
1237
|
+
const g = k.current.scrollHeight + S.PADDING;
|
|
1238
|
+
vt(g);
|
|
1239
|
+
}
|
|
1240
|
+
}, [c.state, d.value]), s === "embedded" ? /* @__PURE__ */ n(
|
|
1241
|
+
"div",
|
|
1242
|
+
{
|
|
1243
|
+
"data-slot": "chat-embedded",
|
|
1244
|
+
className: V(D, Z.container, Z.embedded),
|
|
1245
|
+
children: /* @__PURE__ */ n(
|
|
1246
|
+
Qt,
|
|
1247
|
+
{
|
|
1248
|
+
messages: e,
|
|
1249
|
+
inputValue: d.value,
|
|
1250
|
+
onInputChange: d.setValue,
|
|
1251
|
+
onSubmit: z,
|
|
1252
|
+
onKeyDown: d.handleKeyDown,
|
|
1253
|
+
textareaRef: d.textareaRef,
|
|
1254
|
+
placeholder: i,
|
|
1255
|
+
isProcessing: t,
|
|
1256
|
+
onStop: v,
|
|
1257
|
+
showHeader: !1,
|
|
1258
|
+
notice: f,
|
|
1259
|
+
suggestions: b,
|
|
1260
|
+
clearSuggestions: L,
|
|
1261
|
+
error: o,
|
|
1262
|
+
emptyView: y,
|
|
1263
|
+
messageRenderer: O,
|
|
1264
|
+
onExpand: it,
|
|
1265
|
+
focusOnMount: P.current
|
|
1266
|
+
}
|
|
1267
|
+
)
|
|
1268
|
+
}
|
|
1269
|
+
) : /* @__PURE__ */ T(Ht, { children: [
|
|
1270
|
+
/* @__PURE__ */ n(
|
|
1271
|
+
"div",
|
|
1272
|
+
{
|
|
1273
|
+
ref: et,
|
|
1274
|
+
style: {
|
|
1275
|
+
position: "fixed",
|
|
1276
|
+
top: S.VIEWPORT_OFFSET,
|
|
1277
|
+
left: S.VIEWPORT_OFFSET,
|
|
1278
|
+
right: S.VIEWPORT_OFFSET,
|
|
1279
|
+
bottom: S.VIEWPORT_OFFSET,
|
|
1280
|
+
pointerEvents: "none"
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1283
|
+
),
|
|
1284
|
+
/* @__PURE__ */ n(
|
|
1285
|
+
M.div,
|
|
1286
|
+
{
|
|
1287
|
+
ref: w,
|
|
1288
|
+
"data-slot": "chat-floating",
|
|
1289
|
+
className: V(D, Z.container, Z.floating, {
|
|
1290
|
+
animating: tt
|
|
1291
|
+
}),
|
|
1292
|
+
onMouseLeave: c.state === "compact" ? Q : void 0,
|
|
1293
|
+
drag: c.state === "expanded",
|
|
1294
|
+
dragControls: at,
|
|
1295
|
+
dragListener: !1,
|
|
1296
|
+
dragConstraints: et,
|
|
1297
|
+
dragMomentum: !1,
|
|
1298
|
+
dragElastic: 0.1,
|
|
1299
|
+
dragTransition: { power: 0.1, timeConstant: 100 },
|
|
1300
|
+
onDragEnd: Ut,
|
|
1301
|
+
onPointerDown: st,
|
|
1302
|
+
style: {
|
|
1303
|
+
x: nt,
|
|
1304
|
+
y: ot,
|
|
1305
|
+
bottom: S.VIEWPORT_OFFSET,
|
|
1306
|
+
left: S.VIEWPORT_OFFSET
|
|
1307
|
+
},
|
|
1308
|
+
children: /* @__PURE__ */ n(
|
|
1309
|
+
M.div,
|
|
1310
|
+
{
|
|
1311
|
+
layout: !0,
|
|
1312
|
+
className: Z.content,
|
|
1313
|
+
initial: !1,
|
|
1314
|
+
animate: {
|
|
1315
|
+
width: c.state === "collapsed" ? S.COLLAPSED_SIZE : S.COMPACT_WIDTH,
|
|
1316
|
+
height: dt(c.state),
|
|
1317
|
+
x: c.state === "collapsed" && wt === "right" ? S.COMPACT_WIDTH - S.COLLAPSED_SIZE : 0,
|
|
1318
|
+
transition: d.value.trim() ? { duration: 0 } : $t
|
|
1319
|
+
},
|
|
1320
|
+
onAnimationStart: () => K(!0),
|
|
1321
|
+
onAnimationComplete: () => K(!1),
|
|
1322
|
+
style: {
|
|
1323
|
+
borderRadius: S.BORDER_RADIUS
|
|
1324
|
+
},
|
|
1325
|
+
children: /* @__PURE__ */ T(Tt, { mode: "wait", children: [
|
|
1326
|
+
c.state === "collapsed" && /* @__PURE__ */ n(
|
|
1327
|
+
ce,
|
|
1328
|
+
{
|
|
1329
|
+
icon: a,
|
|
1330
|
+
onClick: Ft,
|
|
1331
|
+
onHover: j,
|
|
1332
|
+
focusOnMount: B.current
|
|
1333
|
+
},
|
|
1334
|
+
"collapsed"
|
|
1335
|
+
),
|
|
1336
|
+
c.state === "compact" && /* @__PURE__ */ n("div", { ref: k, children: /* @__PURE__ */ n(
|
|
1337
|
+
de,
|
|
1338
|
+
{
|
|
1339
|
+
value: d.value,
|
|
1340
|
+
onChange: d.setValue,
|
|
1341
|
+
onSubmit: z,
|
|
1342
|
+
onKeyDown: d.handleKeyDown,
|
|
1343
|
+
textareaRef: d.textareaRef,
|
|
1344
|
+
placeholder: i,
|
|
1345
|
+
isProcessing: t,
|
|
1346
|
+
onBlur: Q,
|
|
1347
|
+
onExpand: it,
|
|
1348
|
+
showExpandButton: !d.value.trim(),
|
|
1349
|
+
focusOnMount: $.current,
|
|
1350
|
+
onStop: v,
|
|
1351
|
+
suggestions: b,
|
|
1352
|
+
clearSuggestions: L
|
|
1353
|
+
},
|
|
1354
|
+
"compact"
|
|
1355
|
+
) }),
|
|
1356
|
+
c.state === "expanded" && /* @__PURE__ */ n(
|
|
1357
|
+
Qt,
|
|
1358
|
+
{
|
|
1359
|
+
messages: e,
|
|
1360
|
+
inputValue: d.value,
|
|
1361
|
+
onInputChange: d.setValue,
|
|
1362
|
+
onSubmit: z,
|
|
1363
|
+
onKeyDown: d.handleKeyDown,
|
|
1364
|
+
textareaRef: d.textareaRef,
|
|
1365
|
+
placeholder: i,
|
|
1366
|
+
isProcessing: t,
|
|
1367
|
+
onStop: v,
|
|
1368
|
+
showHeader: !0,
|
|
1369
|
+
onClose: kt,
|
|
1370
|
+
fromCompact: At,
|
|
1371
|
+
notice: f,
|
|
1372
|
+
suggestions: b,
|
|
1373
|
+
clearSuggestions: L,
|
|
1374
|
+
error: o,
|
|
1375
|
+
emptyView: y,
|
|
1376
|
+
messageRenderer: O,
|
|
1377
|
+
onExpand: it,
|
|
1378
|
+
focusOnMount: P.current
|
|
1379
|
+
},
|
|
1380
|
+
"expanded"
|
|
1381
|
+
)
|
|
1382
|
+
] })
|
|
1383
|
+
}
|
|
1384
|
+
)
|
|
1385
|
+
}
|
|
1386
|
+
)
|
|
1387
|
+
] });
|
|
1388
|
+
}
|
|
1389
|
+
const x = {
|
|
1390
|
+
COLLAPSED_SIZE: 56,
|
|
1391
|
+
COMPACT_WIDTH: 372,
|
|
1392
|
+
EXPANDED_HEIGHT: 520,
|
|
1393
|
+
AUTO_COLLAPSE_DELAY: 1500,
|
|
1394
|
+
BORDER_RADIUS: 24,
|
|
1395
|
+
PADDING: 16,
|
|
1396
|
+
VIEWPORT_OFFSET: 16
|
|
1397
|
+
}, It = {
|
|
1398
|
+
SPRING_CONFIG: {
|
|
1399
|
+
type: "spring",
|
|
1400
|
+
damping: 25,
|
|
1401
|
+
stiffness: 300
|
|
1402
|
+
},
|
|
1403
|
+
VELOCITY_MULTIPLIER: 0.1,
|
|
1404
|
+
NON_DRAGGABLE_SELECTORS: [
|
|
1405
|
+
'[data-slot="message"]',
|
|
1406
|
+
'[data-slot="chat-input"]',
|
|
1407
|
+
'[data-slot="chat-footer"]'
|
|
1408
|
+
].join(", ")
|
|
1409
|
+
};
|
|
1410
|
+
function Ce({
|
|
1411
|
+
children: e,
|
|
1412
|
+
messages: t,
|
|
1413
|
+
isProcessing: o,
|
|
1414
|
+
error: r,
|
|
1415
|
+
onSubmit: s,
|
|
1416
|
+
variant: a = "floating",
|
|
1417
|
+
triggerIcon: i,
|
|
1418
|
+
placeholder: f,
|
|
1419
|
+
notice: u,
|
|
1420
|
+
onOpen: h,
|
|
1421
|
+
onExpand: p,
|
|
1422
|
+
onClose: v,
|
|
1423
|
+
onStop: y,
|
|
1424
|
+
emptyView: _,
|
|
1425
|
+
floatingChatState: b,
|
|
1426
|
+
suggestions: L,
|
|
1427
|
+
clearSuggestions: O,
|
|
1428
|
+
messageRenderer: D,
|
|
1429
|
+
className: N,
|
|
1430
|
+
inputValue: H,
|
|
1431
|
+
onInputChange: c,
|
|
1432
|
+
...$
|
|
1433
|
+
}) {
|
|
1434
|
+
const B = H !== void 0, [P, tt] = W(""), K = B ? H : P, F = B ? c : tt, l = oe(b), d = I(!1), gt = I(!1), vt = I(!1), [wt, _t] = W(!1);
|
|
1435
|
+
E(() => {
|
|
1436
|
+
d.current = !1, gt.current = !1, vt.current = !1;
|
|
1437
|
+
}, [l.state]);
|
|
1438
|
+
const k = I(/* @__PURE__ */ new Set()), et = m(() => {
|
|
1439
|
+
k.current.forEach((C) => {
|
|
1440
|
+
clearTimeout(C);
|
|
1441
|
+
}), k.current.clear();
|
|
1442
|
+
}, []), w = ae({
|
|
1443
|
+
value: K,
|
|
1444
|
+
setValue: F,
|
|
1445
|
+
onSubmit: async (C) => {
|
|
1446
|
+
l.state !== "expanded" && (p == null || p()), l.setState("expanded"), await s(C);
|
|
1447
|
+
},
|
|
1448
|
+
isProcessing: o
|
|
1449
|
+
}), [nt, ot] = W(56), [at, Ft] = W(
|
|
1450
|
+
"left"
|
|
1451
|
+
), X = I(null), dt = I(null), j = I(null), Q = Mt(0), z = Mt(0), it = ne(), kt = m(
|
|
1452
|
+
(C) => {
|
|
1453
|
+
w.setValue(C), O == null || O();
|
|
1454
|
+
},
|
|
1455
|
+
[w.setValue, O]
|
|
1456
|
+
), rt = m(() => {
|
|
1457
|
+
d.current = !0, l.open(), h == null || h();
|
|
1458
|
+
}, [l, h]), st = m(() => {
|
|
1459
|
+
var R, q, ht;
|
|
1460
|
+
const C = (q = (R = j.current) == null ? void 0 : R.ownerDocument) == null ? void 0 : q.activeElement;
|
|
1461
|
+
return !(C && ((ht = j.current) != null && ht.contains(C)) || K.trim());
|
|
1462
|
+
}, [K, j]), Ut = (C) => C === "collapsed" ? x.COLLAPSED_SIZE : C === "compact" ? nt : x.EXPANDED_HEIGHT, Et = m(() => {
|
|
1463
|
+
if (l.state === "collapsed" && (l.setState("compact"), l.initialState === "collapsed")) {
|
|
1464
|
+
const C = setTimeout(() => {
|
|
1465
|
+
l.state === "compact" && st() && l.setState("collapsed"), k.current.delete(C);
|
|
1466
|
+
}, x.AUTO_COLLAPSE_DELAY);
|
|
1467
|
+
k.current.add(C);
|
|
1468
|
+
}
|
|
1469
|
+
}, [l, st]), At = m(() => {
|
|
1470
|
+
if (l.initialState === "collapsed" && l.state === "compact" && st()) {
|
|
1471
|
+
const C = setTimeout(() => {
|
|
1472
|
+
l.state === "compact" && st() && l.setState("collapsed"), k.current.delete(C);
|
|
1473
|
+
}, x.AUTO_COLLAPSE_DELAY);
|
|
1474
|
+
k.current.add(C);
|
|
1475
|
+
}
|
|
1476
|
+
}, [l, st]), g = m(async () => {
|
|
1477
|
+
if (w.value.trim()) {
|
|
1478
|
+
const C = w.value.trim();
|
|
1479
|
+
w.clear(), l.state !== "expanded" && (p == null || p()), l.setState("expanded"), await s(C);
|
|
1480
|
+
}
|
|
1481
|
+
}, [w, s, l, p]), A = m(() => {
|
|
1482
|
+
vt.current = !0, p == null || p(), l.setState("expanded");
|
|
1483
|
+
}, [p, l]), U = m(() => {
|
|
1484
|
+
gt.current = !0, w.clear(), l.close(), v && v();
|
|
1485
|
+
}, [w, l, v]), G = m(
|
|
1486
|
+
(C) => {
|
|
1487
|
+
if (!j.current || !dt.current)
|
|
1488
|
+
return null;
|
|
1489
|
+
const R = j.current.getBoundingClientRect(), q = dt.current.getBoundingClientRect(), ht = window.getComputedStyle(j.current), Ot = new DOMMatrixReadOnly(ht.transform), jt = R.x - Ot.e, Nt = R.y - Ot.f, Te = (C ?? at) === "left" ? q.left : q.right - x.COMPACT_WIDTH, _e = q.bottom - x.EXPANDED_HEIGHT;
|
|
1490
|
+
return {
|
|
1491
|
+
x: Te - jt,
|
|
1492
|
+
y: _e - Nt
|
|
1493
|
+
};
|
|
1494
|
+
},
|
|
1495
|
+
[at]
|
|
1496
|
+
), mt = m(
|
|
1497
|
+
(C) => {
|
|
1498
|
+
C.target.closest(
|
|
1499
|
+
It.NON_DRAGGABLE_SELECTORS
|
|
1500
|
+
) || it.start(C.nativeEvent);
|
|
1501
|
+
},
|
|
1502
|
+
[it]
|
|
1503
|
+
), St = m(
|
|
1504
|
+
(C, R) => {
|
|
1505
|
+
const q = R.point.x, ht = x.COMPACT_WIDTH, Ot = (window.innerWidth - ht) / 2, Nt = q < Ot ? "left" : "right";
|
|
1506
|
+
Ft(Nt);
|
|
1507
|
+
const Rt = G(Nt);
|
|
1508
|
+
Rt && (Pt(Q, Rt.x, {
|
|
1509
|
+
...It.SPRING_CONFIG,
|
|
1510
|
+
velocity: R.velocity.x * It.VELOCITY_MULTIPLIER
|
|
1511
|
+
}), Pt(z, Rt.y, {
|
|
1512
|
+
...It.SPRING_CONFIG,
|
|
1513
|
+
velocity: R.velocity.y * It.VELOCITY_MULTIPLIER
|
|
1514
|
+
}));
|
|
1515
|
+
},
|
|
1516
|
+
[Q, z, G]
|
|
1517
|
+
), ct = I(l.state), ft = ct.current === "compact" && l.state === "expanded";
|
|
1518
|
+
E(() => {
|
|
1519
|
+
et(), ct.current = l.state;
|
|
1520
|
+
}, [l.state, et]), E(() => {
|
|
1521
|
+
if (l.state !== "expanded")
|
|
1522
|
+
return;
|
|
1523
|
+
const C = () => {
|
|
1524
|
+
const R = G();
|
|
1525
|
+
R && (Q.set(R.x), z.set(R.y));
|
|
1526
|
+
};
|
|
1527
|
+
return window.addEventListener("resize", C), () => window.removeEventListener("resize", C);
|
|
1528
|
+
}, [l.state, Q, z, G]), E(() => {
|
|
1529
|
+
const C = k.current;
|
|
1530
|
+
return () => {
|
|
1531
|
+
C.forEach((R) => {
|
|
1532
|
+
clearTimeout(R);
|
|
1533
|
+
}), C.clear();
|
|
1534
|
+
};
|
|
1535
|
+
}, []), E(() => {
|
|
1536
|
+
if (l.state === "compact" && X.current) {
|
|
1537
|
+
const C = X.current.scrollHeight + x.PADDING;
|
|
1538
|
+
ot(C);
|
|
1539
|
+
}
|
|
1540
|
+
}, [l.state, w.value]);
|
|
1541
|
+
const xt = {
|
|
1542
|
+
// Core data
|
|
1543
|
+
messages: t,
|
|
1544
|
+
isProcessing: o,
|
|
1545
|
+
error: r,
|
|
1546
|
+
// Input state
|
|
1547
|
+
inputValue: w.value,
|
|
1548
|
+
setInputValue: w.setValue,
|
|
1549
|
+
clearInput: w.clear,
|
|
1550
|
+
textareaRef: w.textareaRef,
|
|
1551
|
+
handleKeyDown: w.handleKeyDown,
|
|
1552
|
+
// Actions
|
|
1553
|
+
onSubmit: s,
|
|
1554
|
+
handleSubmit: g,
|
|
1555
|
+
onStop: y,
|
|
1556
|
+
// UI state
|
|
1557
|
+
variant: a,
|
|
1558
|
+
placeholder: f,
|
|
1559
|
+
emptyView: _,
|
|
1560
|
+
messageRenderer: D,
|
|
1561
|
+
// Floating chat specific
|
|
1562
|
+
floatingChatState: l.state,
|
|
1563
|
+
triggerIcon: i,
|
|
1564
|
+
onOpen: rt,
|
|
1565
|
+
onExpand: A,
|
|
1566
|
+
onClose: U,
|
|
1567
|
+
// Suggestions
|
|
1568
|
+
suggestions: L,
|
|
1569
|
+
clearSuggestions: O,
|
|
1570
|
+
handleSuggestionSubmit: kt,
|
|
1571
|
+
// Notice
|
|
1572
|
+
notice: u,
|
|
1573
|
+
// Internal state for components
|
|
1574
|
+
focusOnMount: vt.current,
|
|
1575
|
+
fromCompact: ft,
|
|
1576
|
+
showExpandButton: !w.value.trim()
|
|
1577
|
+
};
|
|
1578
|
+
return a === "embedded" ? /* @__PURE__ */ n(zt, { value: xt, children: /* @__PURE__ */ n(
|
|
1579
|
+
"div",
|
|
1580
|
+
{
|
|
1581
|
+
"data-slot": "chat-embedded",
|
|
1582
|
+
className: V(
|
|
1583
|
+
N,
|
|
1584
|
+
Z.container,
|
|
1585
|
+
Z.embedded
|
|
1586
|
+
),
|
|
1587
|
+
children: e
|
|
1588
|
+
}
|
|
1589
|
+
) }) : /* @__PURE__ */ T(zt, { value: xt, children: [
|
|
1590
|
+
/* @__PURE__ */ n(
|
|
1591
|
+
"div",
|
|
1592
|
+
{
|
|
1593
|
+
ref: dt,
|
|
1594
|
+
style: {
|
|
1595
|
+
position: "fixed",
|
|
1596
|
+
top: x.VIEWPORT_OFFSET,
|
|
1597
|
+
left: x.VIEWPORT_OFFSET,
|
|
1598
|
+
right: x.VIEWPORT_OFFSET,
|
|
1599
|
+
bottom: x.VIEWPORT_OFFSET,
|
|
1600
|
+
pointerEvents: "none"
|
|
1601
|
+
}
|
|
1602
|
+
}
|
|
1603
|
+
),
|
|
1604
|
+
/* @__PURE__ */ n(
|
|
1605
|
+
M.div,
|
|
1606
|
+
{
|
|
1607
|
+
ref: j,
|
|
1608
|
+
"data-slot": "chat-floating",
|
|
1609
|
+
className: V(N, Z.container, Z.floating, {
|
|
1610
|
+
animating: wt
|
|
1611
|
+
}),
|
|
1612
|
+
onMouseLeave: l.state === "compact" ? At : void 0,
|
|
1613
|
+
drag: l.state === "expanded",
|
|
1614
|
+
dragControls: it,
|
|
1615
|
+
dragListener: !1,
|
|
1616
|
+
dragConstraints: dt,
|
|
1617
|
+
dragMomentum: !1,
|
|
1618
|
+
dragElastic: 0.1,
|
|
1619
|
+
dragTransition: { power: 0.1, timeConstant: 100 },
|
|
1620
|
+
onDragEnd: St,
|
|
1621
|
+
onPointerDown: mt,
|
|
1622
|
+
style: {
|
|
1623
|
+
x: Q,
|
|
1624
|
+
y: z,
|
|
1625
|
+
bottom: x.VIEWPORT_OFFSET,
|
|
1626
|
+
left: x.VIEWPORT_OFFSET
|
|
1627
|
+
},
|
|
1628
|
+
children: /* @__PURE__ */ n(
|
|
1629
|
+
M.div,
|
|
1630
|
+
{
|
|
1631
|
+
layout: !0,
|
|
1632
|
+
className: Z.content,
|
|
1633
|
+
initial: !1,
|
|
1634
|
+
animate: {
|
|
1635
|
+
width: l.state === "collapsed" ? x.COLLAPSED_SIZE : x.COMPACT_WIDTH,
|
|
1636
|
+
height: Ut(l.state),
|
|
1637
|
+
x: l.state === "collapsed" && at === "right" ? x.COMPACT_WIDTH - x.COLLAPSED_SIZE : 0,
|
|
1638
|
+
transition: w.value.trim() ? { duration: 0 } : $t
|
|
1639
|
+
},
|
|
1640
|
+
onAnimationStart: () => _t(!0),
|
|
1641
|
+
onAnimationComplete: () => _t(!1),
|
|
1642
|
+
style: {
|
|
1643
|
+
borderRadius: x.BORDER_RADIUS
|
|
1644
|
+
},
|
|
1645
|
+
children: /* @__PURE__ */ T(Tt, { mode: "wait", children: [
|
|
1646
|
+
l.state === "collapsed" && /* @__PURE__ */ n(
|
|
1647
|
+
ce,
|
|
1648
|
+
{
|
|
1649
|
+
icon: i,
|
|
1650
|
+
onClick: rt,
|
|
1651
|
+
onHover: Et,
|
|
1652
|
+
focusOnMount: gt.current
|
|
1653
|
+
},
|
|
1654
|
+
"collapsed"
|
|
1655
|
+
),
|
|
1656
|
+
l.state === "compact" && /* @__PURE__ */ n("div", { ref: X, children: /* @__PURE__ */ n(
|
|
1657
|
+
de,
|
|
1658
|
+
{
|
|
1659
|
+
value: w.value,
|
|
1660
|
+
onChange: w.setValue,
|
|
1661
|
+
onSubmit: g,
|
|
1662
|
+
onKeyDown: w.handleKeyDown,
|
|
1663
|
+
textareaRef: w.textareaRef,
|
|
1664
|
+
placeholder: f,
|
|
1665
|
+
isProcessing: o,
|
|
1666
|
+
onBlur: At,
|
|
1667
|
+
onExpand: A,
|
|
1668
|
+
showExpandButton: !w.value.trim(),
|
|
1669
|
+
focusOnMount: d.current,
|
|
1670
|
+
onStop: y,
|
|
1671
|
+
suggestions: L,
|
|
1672
|
+
clearSuggestions: O
|
|
1673
|
+
},
|
|
1674
|
+
"compact"
|
|
1675
|
+
) }),
|
|
1676
|
+
l.state === "expanded" && e
|
|
1677
|
+
] })
|
|
1678
|
+
}
|
|
1679
|
+
)
|
|
1680
|
+
}
|
|
1681
|
+
)
|
|
1682
|
+
] });
|
|
1683
|
+
}
|
|
1684
|
+
function ge({ className: e } = {}) {
|
|
1685
|
+
const { onClose: t } = ut();
|
|
1686
|
+
return /* @__PURE__ */ n(fe, { onClose: t, className: e });
|
|
1687
|
+
}
|
|
1688
|
+
function ve({ className: e } = {}) {
|
|
1689
|
+
const { messages: t, isProcessing: o, error: r, emptyView: s, messageRenderer: a } = ut();
|
|
1690
|
+
return /* @__PURE__ */ n(
|
|
1691
|
+
pe,
|
|
1692
|
+
{
|
|
1693
|
+
messages: t,
|
|
1694
|
+
isProcessing: o,
|
|
1695
|
+
error: r,
|
|
1696
|
+
emptyView: s,
|
|
1697
|
+
messageRenderer: a,
|
|
1698
|
+
className: e
|
|
1699
|
+
}
|
|
1700
|
+
);
|
|
1701
|
+
}
|
|
1702
|
+
function we({
|
|
1703
|
+
className: e,
|
|
1704
|
+
disabled: t,
|
|
1705
|
+
customActions: o,
|
|
1706
|
+
actionOrder: r
|
|
1707
|
+
} = {}) {
|
|
1708
|
+
const {
|
|
1709
|
+
inputValue: s,
|
|
1710
|
+
setInputValue: a,
|
|
1711
|
+
handleSubmit: i,
|
|
1712
|
+
handleKeyDown: f,
|
|
1713
|
+
textareaRef: u,
|
|
1714
|
+
placeholder: h,
|
|
1715
|
+
isProcessing: p,
|
|
1716
|
+
onStop: v,
|
|
1717
|
+
fromCompact: y,
|
|
1718
|
+
onExpand: _,
|
|
1719
|
+
showExpandButton: b,
|
|
1720
|
+
focusOnMount: L
|
|
1721
|
+
} = ut();
|
|
1722
|
+
return /* @__PURE__ */ n(
|
|
1723
|
+
Kt,
|
|
1724
|
+
{
|
|
1725
|
+
value: s,
|
|
1726
|
+
onChange: a,
|
|
1727
|
+
onSubmit: i,
|
|
1728
|
+
onKeyDown: f,
|
|
1729
|
+
textareaRef: u,
|
|
1730
|
+
placeholder: h,
|
|
1731
|
+
isProcessing: p,
|
|
1732
|
+
onStop: v,
|
|
1733
|
+
fromCompact: y,
|
|
1734
|
+
onExpand: _,
|
|
1735
|
+
showExpandButton: b,
|
|
1736
|
+
focusOnMount: L,
|
|
1737
|
+
disabled: t,
|
|
1738
|
+
customActions: o,
|
|
1739
|
+
actionOrder: r,
|
|
1740
|
+
className: e
|
|
1741
|
+
}
|
|
1742
|
+
);
|
|
1743
|
+
}
|
|
1744
|
+
function Le({
|
|
1745
|
+
className: e,
|
|
1746
|
+
showSuggestions: t,
|
|
1747
|
+
onSelect: o
|
|
1748
|
+
} = {}) {
|
|
1749
|
+
const { suggestions: r, handleSuggestionSubmit: s, inputValue: a } = ut(), i = m(
|
|
1750
|
+
(f) => {
|
|
1751
|
+
try {
|
|
1752
|
+
o == null || o(f);
|
|
1753
|
+
} catch (u) {
|
|
1754
|
+
console.warn("Suggestions onSelect callback failed:", u);
|
|
1755
|
+
}
|
|
1756
|
+
s(f);
|
|
1757
|
+
},
|
|
1758
|
+
[o, s]
|
|
1759
|
+
);
|
|
1760
|
+
return a && !t ? null : /* @__PURE__ */ n(
|
|
1761
|
+
Xt,
|
|
1762
|
+
{
|
|
1763
|
+
suggestions: r,
|
|
1764
|
+
onSubmit: i,
|
|
1765
|
+
className: e
|
|
1766
|
+
}
|
|
1767
|
+
);
|
|
1768
|
+
}
|
|
1769
|
+
function ye({ className: e } = {}) {
|
|
1770
|
+
const { notice: t } = ut();
|
|
1771
|
+
return t ? /* @__PURE__ */ n(
|
|
1772
|
+
he,
|
|
1773
|
+
{
|
|
1774
|
+
icon: t.icon,
|
|
1775
|
+
message: t.message,
|
|
1776
|
+
action: t.action,
|
|
1777
|
+
dismissible: t.dismissible,
|
|
1778
|
+
onDismiss: t.onDismiss,
|
|
1779
|
+
className: e
|
|
1780
|
+
}
|
|
1781
|
+
) : null;
|
|
1782
|
+
}
|
|
1783
|
+
function Ie({
|
|
1784
|
+
children: e,
|
|
1785
|
+
className: t
|
|
1786
|
+
} = {}) {
|
|
1787
|
+
return e ? /* @__PURE__ */ n(
|
|
1788
|
+
M.div,
|
|
1789
|
+
{
|
|
1790
|
+
"data-slot": "chat-footer",
|
|
1791
|
+
className: V(Yt.container, t),
|
|
1792
|
+
initial: { opacity: 0, scale: 1 },
|
|
1793
|
+
animate: { opacity: 1, scale: 1 },
|
|
1794
|
+
transition: { ...lt },
|
|
1795
|
+
children: e
|
|
1796
|
+
}
|
|
1797
|
+
) : /* @__PURE__ */ T(
|
|
1798
|
+
M.div,
|
|
1799
|
+
{
|
|
1800
|
+
"data-slot": "chat-footer",
|
|
1801
|
+
className: V(Yt.container, t),
|
|
1802
|
+
initial: { opacity: 0, scale: 1 },
|
|
1803
|
+
animate: { opacity: 1, scale: 1 },
|
|
1804
|
+
transition: { ...lt },
|
|
1805
|
+
children: [
|
|
1806
|
+
/* @__PURE__ */ n(Le, {}),
|
|
1807
|
+
/* @__PURE__ */ n(ye, {}),
|
|
1808
|
+
/* @__PURE__ */ n(we, {})
|
|
1809
|
+
]
|
|
1810
|
+
}
|
|
1811
|
+
);
|
|
1812
|
+
}
|
|
1813
|
+
function be({
|
|
1814
|
+
showHeader: e = !0,
|
|
1815
|
+
children: t,
|
|
1816
|
+
className: o
|
|
1817
|
+
} = {}) {
|
|
1818
|
+
const { onClose: r } = ut();
|
|
1819
|
+
return E(() => {
|
|
1820
|
+
const s = (a) => {
|
|
1821
|
+
a.key === "Escape" && r && r();
|
|
1822
|
+
};
|
|
1823
|
+
return document.addEventListener("keydown", s), () => document.removeEventListener("keydown", s);
|
|
1824
|
+
}, [r]), t ? /* @__PURE__ */ n(
|
|
1825
|
+
"div",
|
|
1826
|
+
{
|
|
1827
|
+
"data-slot": "conversation-view",
|
|
1828
|
+
className: `${bt.container}${o ? ` ${o}` : ""}`,
|
|
1829
|
+
children: t
|
|
1830
|
+
}
|
|
1831
|
+
) : /* @__PURE__ */ T(
|
|
1832
|
+
"div",
|
|
1833
|
+
{
|
|
1834
|
+
"data-slot": "conversation-view",
|
|
1835
|
+
className: `${bt.container}${e ? ` ${bt.withHeader}` : ""}${o ? ` ${o}` : ""}`,
|
|
1836
|
+
children: [
|
|
1837
|
+
e && /* @__PURE__ */ n(ge, {}),
|
|
1838
|
+
/* @__PURE__ */ n(ve, {}),
|
|
1839
|
+
/* @__PURE__ */ n(Ie, {})
|
|
1840
|
+
]
|
|
1841
|
+
}
|
|
1842
|
+
);
|
|
1843
|
+
}
|
|
1844
|
+
const Un = {
|
|
1845
|
+
// Core container with state management
|
|
1846
|
+
Container: Ce,
|
|
1847
|
+
// Individual composable components
|
|
1848
|
+
Header: ge,
|
|
1849
|
+
Messages: ve,
|
|
1850
|
+
Input: we,
|
|
1851
|
+
Suggestions: Le,
|
|
1852
|
+
Notice: ye,
|
|
1853
|
+
// Convenience wrappers
|
|
1854
|
+
Footer: Ie,
|
|
1855
|
+
ConversationView: be
|
|
1856
|
+
}, zn = Object.assign(
|
|
1857
|
+
(e) => /* @__PURE__ */ n(
|
|
1858
|
+
Ce,
|
|
1859
|
+
{
|
|
1860
|
+
...e,
|
|
1861
|
+
className: V("agenttic", e.className),
|
|
1862
|
+
children: /* @__PURE__ */ n(
|
|
1863
|
+
be,
|
|
1864
|
+
{
|
|
1865
|
+
showHeader: e.variant === "floating"
|
|
1866
|
+
}
|
|
1867
|
+
)
|
|
1868
|
+
}
|
|
1869
|
+
),
|
|
1870
|
+
Un
|
|
1871
|
+
);
|
|
1872
|
+
function qn({ className: e, size: t = 24 }) {
|
|
1873
|
+
return /* @__PURE__ */ n(
|
|
1874
|
+
"svg",
|
|
1875
|
+
{
|
|
1876
|
+
width: t,
|
|
1877
|
+
height: t,
|
|
1878
|
+
viewBox: "0 0 24 24",
|
|
1879
|
+
fill: "none",
|
|
1880
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1881
|
+
className: e,
|
|
1882
|
+
children: /* @__PURE__ */ n(
|
|
1883
|
+
"path",
|
|
1884
|
+
{
|
|
1885
|
+
d: "M6.97288 17.25C6.97288 17.3881 7.08481 17.5 7.22288 17.5L8.5 17.5L8.5 12.875L7.22288 12.875C7.08481 12.875 6.97288 12.9869 6.97288 13.125L6.97288 17.25ZM16.3725 17.5C17.1129 17.5 17.7434 16.9587 17.8549 16.2256L18.4819 13.1006C18.6199 12.1924 17.9175 11.3752 17.0004 11.375L14.0698 11.375C13.8509 11.3749 13.6429 11.2794 13.5004 11.1133C13.358 10.9469 13.2949 10.7261 13.3286 10.5098L13.7602 7.74023C13.8309 7.28511 13.4792 6.875 13.02 6.875L13.0141 6.87891L10 12.5L10 17.5L16.3725 17.5ZM5.47288 13.125C5.47288 12.1585 6.25638 11.375 7.22288 11.375L9.01216 11.375L11.6811 6.19238C11.9394 5.69079 12.4558 5.3751 13.02 5.375C14.4008 5.375 15.4552 6.6078 15.2426 7.97168L14.9458 9.875L17.0004 9.875C18.8366 9.87517 20.2413 11.511 19.9653 13.3262L19.3374 16.4512C19.1145 17.9166 17.8548 19 16.3725 19L7.22288 19C6.25638 19 5.47288 18.2165 5.47288 17.25L5.47288 13.125Z",
|
|
1886
|
+
fill: "currentColor"
|
|
1887
|
+
}
|
|
1888
|
+
)
|
|
1889
|
+
}
|
|
1890
|
+
);
|
|
1891
|
+
}
|
|
1892
|
+
function Jn({ className: e, size: t = 24 }) {
|
|
1893
|
+
return /* @__PURE__ */ n(
|
|
1894
|
+
"svg",
|
|
1895
|
+
{
|
|
1896
|
+
width: t,
|
|
1897
|
+
height: t,
|
|
1898
|
+
viewBox: "0 0 24 24",
|
|
1899
|
+
fill: "none",
|
|
1900
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1901
|
+
className: e,
|
|
1902
|
+
"aria-hidden": "true",
|
|
1903
|
+
children: /* @__PURE__ */ n(
|
|
1904
|
+
"path",
|
|
1905
|
+
{
|
|
1906
|
+
d: "M6.97288 6.75C6.97288 6.61194 7.08481 6.5 7.22288 6.5L8.5 6.5L8.5 11.125L7.22288 11.125C7.08481 11.125 6.97288 11.0131 6.97288 10.875L6.97288 6.75ZM16.3725 6.5C17.1129 6.5 17.7434 7.0413 17.8549 7.77438L18.4819 10.8994C18.6199 11.8076 17.9175 12.6248 17.0004 12.625L14.0698 12.625C13.8509 12.6251 13.6429 12.7206 13.5004 12.8867C13.358 13.0531 13.2949 13.2739 13.3286 13.4902L13.7602 16.2598C13.8309 16.7149 13.4792 17.125 13.02 17.125L13.0141 17.1211L10 11.5L10 6.5L16.3725 6.5ZM5.47288 10.875C5.47288 11.8415 6.25638 12.625 7.22288 12.625L9.01216 12.625L11.6811 17.8076C11.9394 18.3092 12.4558 18.6249 13.02 18.625C14.4008 18.625 15.4552 17.3922 15.2426 16.0283L14.9458 14.125L17.0004 14.125C18.8366 14.1248 20.2413 12.489 19.9653 10.6738L19.3374 7.54883C19.1145 6.08344 17.8548 5 16.3725 5L7.22288 5C6.25638 5 5.47288 5.78348 5.47288 6.75L5.47288 10.875Z",
|
|
1907
|
+
fill: "currentColor"
|
|
1908
|
+
}
|
|
1909
|
+
)
|
|
1910
|
+
}
|
|
1911
|
+
);
|
|
1912
|
+
}
|
|
1913
|
+
function Qn({ className: e, size: t = 24 }) {
|
|
1914
|
+
return /* @__PURE__ */ n(
|
|
1915
|
+
"svg",
|
|
1916
|
+
{
|
|
1917
|
+
width: t,
|
|
1918
|
+
height: t,
|
|
1919
|
+
viewBox: "0 0 24 24",
|
|
1920
|
+
fill: "none",
|
|
1921
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1922
|
+
className: e,
|
|
1923
|
+
"aria-hidden": "true",
|
|
1924
|
+
children: /* @__PURE__ */ n(
|
|
1925
|
+
"path",
|
|
1926
|
+
{
|
|
1927
|
+
d: "M14.5 12C14.5 11.1716 13.8284 10.5 13 10.5H8C7.17157 10.5 6.5 11.1716 6.5 12V17C6.5 17.8284 7.17157 18.5 8 18.5H13C13.8284 18.5 14.5 17.8284 14.5 17V12ZM16 14.5H16.5C17.3284 14.5 18 13.8284 18 13V8C18 7.17157 17.3284 6.5 16.5 6.5H11C10.1716 6.5 9.5 7.17157 9.5 8V9H13C14.6569 9 16 10.3431 16 12V14.5ZM19.5 13C19.5 14.6569 18.1569 16 16.5 16H16V17C16 18.6569 14.6569 20 13 20H8C6.34315 20 5 18.6569 5 17V12C5 10.3431 6.34315 9 8 9V8C8 6.34315 9.34315 5 11 5H16.5C18.1569 5 19.5 6.34315 19.5 8V13Z",
|
|
1928
|
+
fill: "currentColor"
|
|
1929
|
+
}
|
|
1930
|
+
)
|
|
1931
|
+
}
|
|
1932
|
+
);
|
|
1933
|
+
}
|
|
1934
|
+
function to({ className: e, size: t = 24 }) {
|
|
1935
|
+
return /* @__PURE__ */ n(
|
|
1936
|
+
"svg",
|
|
1937
|
+
{
|
|
1938
|
+
width: t,
|
|
1939
|
+
height: t,
|
|
1940
|
+
viewBox: "0 0 24 24",
|
|
1941
|
+
fill: "none",
|
|
1942
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1943
|
+
className: e,
|
|
1944
|
+
"aria-hidden": "true",
|
|
1945
|
+
children: /* @__PURE__ */ n(
|
|
1946
|
+
"path",
|
|
1947
|
+
{
|
|
1948
|
+
fillRule: "evenodd",
|
|
1949
|
+
clipRule: "evenodd",
|
|
1950
|
+
d: "M19 12C19 13.8565 18.2625 15.637 16.9497 16.9497C15.637 18.2625 13.8565 19 12 19C10.1435 19 8.36301 18.2625 7.05025 16.9497C5.7375 15.637 5 13.8565 5 12C5 10.1435 5.7375 8.36301 7.05025 7.05025C8.36301 5.7375 10.1435 5 12 5C13.8565 5 15.637 5.7375 16.9497 7.05025C18.2625 8.36301 19 10.1435 19 12ZM17.6875 12C17.6875 13.5084 17.0883 14.9551 16.0217 16.0217C14.9551 17.0883 13.5084 17.6875 12 17.6875V6.3125C13.5084 6.3125 14.9551 6.91172 16.0217 7.97833C17.0883 9.04494 17.6875 10.4916 17.6875 12Z",
|
|
1951
|
+
fill: "currentColor"
|
|
1952
|
+
}
|
|
1953
|
+
)
|
|
1954
|
+
}
|
|
1955
|
+
);
|
|
1956
|
+
}
|
|
1957
|
+
function eo({ className: e, size: t = 24 }) {
|
|
1958
|
+
return /* @__PURE__ */ n(
|
|
1959
|
+
"svg",
|
|
1960
|
+
{
|
|
1961
|
+
width: t,
|
|
1962
|
+
height: t,
|
|
1963
|
+
viewBox: "0 0 24 24",
|
|
1964
|
+
fill: "none",
|
|
1965
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1966
|
+
className: e,
|
|
1967
|
+
children: /* @__PURE__ */ n(
|
|
1968
|
+
"path",
|
|
1969
|
+
{
|
|
1970
|
+
fillRule: "evenodd",
|
|
1971
|
+
clipRule: "evenodd",
|
|
1972
|
+
d: "M11.2222 6.55556C8.6449 6.55556 6.55556 8.6449 6.55556 11.2222C6.55556 13.7996 8.6449 15.8889 11.2222 15.8889C13.7996 15.8889 15.8889 13.7996 15.8889 11.2222C15.8889 8.6449 13.7996 6.55556 11.2222 6.55556ZM5 11.2222C5 7.78579 7.78579 5 11.2222 5C14.6587 5 17.4445 7.78579 17.4445 11.2222C17.4445 12.6601 16.9567 13.9841 16.1377 15.0377L18.7722 17.6722C19.0759 17.976 19.0759 18.4685 18.7722 18.7722C18.4685 19.0759 17.976 19.0759 17.6722 18.7722L15.0377 16.1377C13.9841 16.9567 12.6601 17.4445 11.2222 17.4445C7.78579 17.4445 5 14.6587 5 11.2222Z",
|
|
1973
|
+
fill: "currentColor"
|
|
1974
|
+
}
|
|
1975
|
+
)
|
|
1976
|
+
}
|
|
1977
|
+
);
|
|
1978
|
+
}
|
|
1979
|
+
function no({ className: e, size: t = 24 }) {
|
|
1980
|
+
return /* @__PURE__ */ T(
|
|
1981
|
+
"svg",
|
|
1982
|
+
{
|
|
1983
|
+
width: t,
|
|
1984
|
+
height: t,
|
|
1985
|
+
viewBox: "0 0 24 24",
|
|
1986
|
+
fill: "none",
|
|
1987
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1988
|
+
className: e,
|
|
1989
|
+
children: [
|
|
1990
|
+
/* @__PURE__ */ n(
|
|
1991
|
+
"path",
|
|
1992
|
+
{
|
|
1993
|
+
d: "M11.2222 14.3333C12.9404 14.3333 14.3333 12.9404 14.3333 11.2222C14.3333 9.50401 12.9404 8.11111 11.2222 8.11111C9.50401 8.11111 8.11111 9.50401 8.11111 11.2222C8.11111 12.9404 9.50401 14.3333 11.2222 14.3333Z",
|
|
1994
|
+
fill: "currentColor"
|
|
1995
|
+
}
|
|
1996
|
+
),
|
|
1997
|
+
/* @__PURE__ */ n(
|
|
1998
|
+
"path",
|
|
1999
|
+
{
|
|
2000
|
+
fillRule: "evenodd",
|
|
2001
|
+
clipRule: "evenodd",
|
|
2002
|
+
d: "M11.2222 6.55556C8.6449 6.55556 6.55556 8.6449 6.55556 11.2222C6.55556 13.7996 8.6449 15.8889 11.2222 15.8889C13.7996 15.8889 15.8889 13.7996 15.8889 11.2222C15.8889 8.6449 13.7996 6.55556 11.2222 6.55556ZM5 11.2222C5 7.78579 7.78579 5 11.2222 5C14.6587 5 17.4445 7.78579 17.4445 11.2222C17.4445 12.6601 16.9567 13.9841 16.1377 15.0377L18.7722 17.6722C19.0759 17.976 19.0759 18.4685 18.7722 18.7722C18.4685 19.0759 17.976 19.0759 17.6722 18.7722L15.0377 16.1377C13.9841 16.9567 12.6601 17.4445 11.2222 17.4445C7.78579 17.4445 5 14.6587 5 11.2222Z",
|
|
2003
|
+
fill: "currentColor"
|
|
2004
|
+
}
|
|
2005
|
+
)
|
|
2006
|
+
]
|
|
2007
|
+
}
|
|
2008
|
+
);
|
|
2009
|
+
}
|
|
2
2010
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
2011
|
+
zn as AgentUI,
|
|
2012
|
+
Ce as AgentUIContainer,
|
|
2013
|
+
be as AgentUIConversationView,
|
|
2014
|
+
Ie as AgentUIFooter,
|
|
2015
|
+
ge as AgentUIHeader,
|
|
2016
|
+
we as AgentUIInput,
|
|
2017
|
+
ve as AgentUIMessages,
|
|
2018
|
+
ye as AgentUINotice,
|
|
2019
|
+
zt as AgentUIProvider,
|
|
2020
|
+
Le as AgentUISuggestions,
|
|
2021
|
+
rn as AnimatedPlaceholder,
|
|
2022
|
+
ze as ArrowUpIcon,
|
|
2023
|
+
se as BigSkyIcon,
|
|
2024
|
+
jn as Chat,
|
|
2025
|
+
yn as ChatFooter,
|
|
2026
|
+
fe as ChatHeader,
|
|
2027
|
+
Kt as ChatInput,
|
|
2028
|
+
nn as ChevronUpIcon,
|
|
2029
|
+
ce as CollapsedView,
|
|
2030
|
+
de as CompactView,
|
|
2031
|
+
Qt as ConversationView,
|
|
2032
|
+
Qn as CopyIcon,
|
|
2033
|
+
Sn as Message,
|
|
2034
|
+
Jt as MessageActions,
|
|
2035
|
+
pe as Messages,
|
|
2036
|
+
he as Notice,
|
|
2037
|
+
qe as StopIcon,
|
|
2038
|
+
to as StylesIcon,
|
|
2039
|
+
Xt as Suggestions,
|
|
2040
|
+
Mn as ThinkingMessage,
|
|
2041
|
+
Jn as ThumbsDownIcon,
|
|
2042
|
+
qn as ThumbsUpIcon,
|
|
2043
|
+
me as XIcon,
|
|
2044
|
+
eo as ZoomIcon,
|
|
2045
|
+
no as ZoomIconFilled,
|
|
2046
|
+
Xn as animations,
|
|
2047
|
+
V as cn,
|
|
2048
|
+
zn as default,
|
|
2049
|
+
ut as useAgentUIContext,
|
|
2050
|
+
oe as useChat,
|
|
2051
|
+
ae as useInput
|
|
43
2052
|
};
|