report-CarslS7n.js 80 KB

12345678910111213
  1. import{J as r,K as Me,r as ie,o,N as l,a as e,O as L,Q as W,V as ge,W as M,X as $,Y as y,b as x,w as ae,Z as re,c as Bt,$ as S,a0 as Ps,a1 as z,v as R,d as Wt,a2 as Ls,a3 as me,H as Rt,a4 as Jt,a5 as Be,a6 as Oe,a7 as zs,a8 as qe,a9 as vt,aa as ne,ab as Os,ac as Bs,ad as G,ae as pt,af as qs,ag as qt,ah as Vs,ai as Ae,aj as Gs,ak as Vt,al as Ws,am as Rs,an as Js,ao as Ns,ap as Ks,aq as Fs,ar as Qs}from"./vendor-f-XNYvyw.js";import{S as Ys}from"./index-C742_e10.js";import{_ as Hs}from"./index.vue_vue_type_style_index_0_scoped_2125171d_lang-Dtl7QzQB.js";import{_ as Ce}from"./index-Dr4sKxjc.js";const js="/assets/logoa-BfYir6wW.png",Xs="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAyBJREFUWEftlkmojmEUx3//naRYmRVRZIiiDCVTRBky3UwLd8MGa4pcQ7F2bdiQTBnLEBaGUrhFkUth4ZZrXLkb7I733J7v9tzXO9zvpVh46u3re9/nnPN/znPO/3/EX16qGt/MZgP++Lon6V4VX78L4G4IOuc/gD+aATNbDewHVkpqrXK3NRszGwucA/ZIOp/2lVkDZvYGGAW8ANbEIMysPzAeGAdMDQ5bwt5WSV8ygvve15JG9xSAo74IjEkCnZfU4IZm1gxsKcnIYUlbw34/uWfzFbAqK5u5XRBS1+TBzWw5cAzoGwVv8/YL/70dh0ffOoBGSZcTPw5ib95VlrahmU0GHkfOr3l9SPK0dy0z8+vYmexdHL2eIulJUcZ6AuA9MDg4acgqpBQQT7mf2tcHSUMqAzAzP9G+4KD0NFHxxVnbJck7KnMV1cBA4GOwOippc0nxdftsZkeSDGwKLwdJ+pRlXwRgYdJmN4LRDEkP6wQwHXgQbBZJupkLIAhL13dnNTPbDhwA2iUNqyd4dBXvgKHADkkHs+J0ZsDMmpKf3TVDSTKzM05CwBlJ6yoCOJ1wwNqET85KWmtJoMiPM2NTEYCTwPqkv49LaqwIwLljI3BK0oYiADVd74wTrsDZ7FDioE3SiIoA3gaC2iapOfcKspyb2Vzgdvg2LU08ZYACMT0K++ZJulNvF7jofA5G1xJGW1IWNP6eMOjViBUHxCIV7ytkwpT4lLJgVP0xG3aJU10ZiJx9jUSolA1T2tEhqV9R5nqiBa6ElyInR0NndCMmM3Pi8YqvsZ+brABaJH3IA1EmxwckLQunuhKJkvtrB+4HxzMD4dTieMClyUT1HLjuhFZXEUZjlE8y8UASi1PeoTrFx8xcS04A84HvXpBZIH7JQCq4j2RefC+jmnDHk8IzMbx/Bjz1JxYdM5sF+PzQB/gBjExfR95MWBskuwVPtVkvSe7Uqby3pG85fOIgXIg8AzVe6dpaWAPxydPOQ6ZqI9ncounZr6NuOS4jnQDAr8jXhKrje2kb5gH5FwAsCCO3Y7wg6VZZ1ioxYRWn9dj8BApzYTC98kdgAAAAAElFTkSuQmCC",Zs="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAABFNJREFUWEe1V12IVVUU/taeh6keegismEwmGCPP3ntyKMpRoUas6A+xKCoxKmkyLdLChwizP0KiVBSnsohoaKQ/kQiL0hSissCXu9eemPGlUIgiCqa3GWav7rqcO4zjnTlnxtuGy92c++1vfXud9XcJJVeWZQ8R0TYiOsTMG0seK4TRTAhr7UUAHgTwFBG1K1ZEBmKMawqZSwKmFeC9f0BEtgO4POd6C8B6AMuY+YeS/IWwhgK894+JiBrUVUkp3WmM+QXAMDN3FbLOAnCWAO/90yLyRs7Rp+/bWruJiHYCeI6ZX50FfyH0DAHe+60i8lJ+6kVmfkH31to9RPSEiPTGGN8pZJ0FYEJAZ2fnkpTSj3mgbY8xPlvncc59CuBuIlodQjg4C/5C6IQA59wHANY2inLn3NcAbgJwCzPrvmmrJsBau4KIjujeGLOkUqn8NNmCc24/gPs0JZm5v2nWAdQEOOc+q0b7XUQ0EEI4K8frMQBgCzO/3lQB3vuVIvJNTnozM9f3E3accxqM2wD0M7MWpqYtstZuIKK9InIkxriyEbO1NiOiCOAPZr60adb1FXjvd4rIJhF5P8b48HTkzrnvASxNKa0aHBz8vFkiyDn3BYDbieiVEMLWGQTUXoMGawihoafmIkoFDANYCGAdM783HYk2JiLS7OgQkUdjjO/OxeDUMypA8oc9zHxsJlLn3JMAdiuGiG4LIXx5riJUwCkA84no3hDCJ0WEzrmjAG5UHDPP2M6LuGoXcc5pa+0WkY0xxr6iQ1mWLTDG/DYJdzUzV4rOTfe7puHH1RS7pypmovkUkWVZttwY810ddy4xoQJ2ENHmqluPMXNPkfH6711dXW1jY2MfAViex8SR8fHx3WVStNpblqrHjTGntQ7cKiKHlMQYc0mlUvmzrIju7u7zR0ZGdhFR7yRv/AXgaDVIf9bCpR8iuiClNK9a8OYBUG8vVryI/FrvBSc1vQBsYOY3ywqo47z316SUeo0xd4hIW4nzmsKPpJTW1QVo79dJZ4iIukMI/5QgaQjJsuw6IlpmjFmQUro4v/WIiPwuIifUM0S0X0QujDFeURPgvb9KRHTm01U6GOci0lr7IRHpwLs5xrhr8kBS98L/JmLSbHlKRBbHGP8+o5A45w4AWJ3frLAyzsYDzrm1AHTq0iq6JoQwUNtPJXHOnQZwWf68KROQ914H2j258fUhhLfrdhuWUmvtcSK6Pk+VfcaYfSGEE7O5sWI7OjpaW1tbtxDRy7nxZ0IIOybzTFvLnXOPA5gozdX0UiGHR0dHvxoaGvp3JjGLFi1a2NLSsoaI7q8OuVfmxp8PIdSElBKgIGttT7WIvAbg2inntGsOikisNrHBlFK7MaadiNpERF/fCgDn5Wf6jTF9lUrleCPRpbpZHkA6LZUu1QAOiMjeGOO3M3mrlIA6gfd+VUrphrx9z8//uOq3VtLhanSfTCmdNMYMhxAOl4mZ/wA1oMF+HdM3kAAAAABJRU5ErkJggg==",ea="/assets/avter-DUp3luTf.png",Gt="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1735280866862'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='17804'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='32'%20height='32'%3e%3cpath%20d='M474%20152m8%200l60%200q8%200%208%208l0%20704q0%208-8%208l-60%200q-8%200-8-8l0-704q0-8%208-8Z'%20fill='%2381bdfe'%20p-id='17805'%3e%3c/path%3e%3cpath%20d='M168%20474m8%200l672%200q8%200%208%208l0%2060q0%208-8%208l-672%200q-8%200-8-8l0-60q0-8%208-8Z'%20fill='%2381bdfe'%20p-id='17806'%3e%3c/path%3e%3c/svg%3e",ta="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABSUlEQVR4AbSTPU7EMBCFEzqKXIAjJCmRULpwCRoaCjgC9WZrjgAtDZcgXYQEVAlKScUFgkSX8I0xI2fXxTrajebZ4xm/54l/jqI9f4cXzPO8DMHmD2qFiFRgYsJzCIQDKjjGVDCO4xsi67Zt4xAIx3Jxo0gFp2k6IVIDY1mWXYPUDJymKIpjtyJSteXiOoJm5DSsegkunJBxh2E4w1kBr2mF3qw/eCphqiyl38QSwTsr4q1yieCtFVzbftYtEXwVBW6CHqCM/+EVTNP0igklhyJXCXd38wqO4yirf3Md3naX+pvpFez7/pO0/No7fZB5BUWB6h7Bk/gukiR5YaxPDX9mKsh+fZHRu9V13QP4IDazpml+OBD3hGWvhWvmqSDV3BNZcWGnEAjHcnGdp8eqFYiJnodAOEC3QCtExBjJOgSG5DRbgk5ukfsLAAD//+lbKp0AAAAGSURBVAMAr6jDKdZkcgQAAAAASUVORK5CYII=",Ve="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1736386047967'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='2366'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='16'%20height='16'%3e%3cpath%20d='M545.322667%20615.808L248.021333%20329.258667a33.706667%2033.706667%200%200%200-46.421333%200c-12.8%2012.373333-12.8%2032.384%200%2044.714666L544%20704l342.4-330.026667c12.8-12.373333%2012.8-32.341333%200-44.714666a33.706667%2033.706667%200%200%200-46.421333%200l-294.656%20286.549333z'%20fill='%23000000'%20p-id='2367'%3e%3c/path%3e%3c/svg%3e",sa="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAACVUlEQVR4AayTPUhbURTHX7J06GAttJTSyaGl7yYvCbWDUErTQpdOBXUqtlu3tlD3BkK7VBBKdfBjEkFQFPwYIoIIOviFw8sXDhJx0cUtEMyXvxPN4768hCAYzp977v+c87/n3HfjN27511bQsqy7wWAwHggEfofD4Xvtzm8pGIlEHiPyr1KpnCNy4fP5CqVS6QxuPBQKPYVrah5BCp6DqWKxmKHiJJlM3rFtO24D8eEOy+XyLjlLpmm+Yu8yR5CxekhaJrpON9sUd4C/7A34GPgmvnCgg5yE3++fg9/nWnolJnAEq9XqDMQCyY/o5j9+zSiIMXaOzX3xWWsmOZLLZpT4kFLKxDccQTadJEyyuoxOesEOSBF4AFx2XdOZz+ePJKALFmj9mZAN+IGYzQTDdJJoiBlKKZPYaS6XK0hMFzyh4KWQOhhtjX0cjKTT6UVWl3FYD3e5Xyd1wU1IjyBcO+umw4N6ki64AtkNbmoWXcr91uocQS53FeYhz6eLtZl18ZXf6AHu/Al7izebZq2ZIyg7Wl8EQ+I3wVu4X8Ax7vw7m0Q2m5VnhWu4no2RSqV+wn7k5HesjTbBFNE6ySSv8Qf510gN7pW5OhSK+/jEyWtKKef1Cw/+MPI6q4HYCybZIPdrJpM5Fq4OjyDPZJrEfjBLYZ8k0lkM+EAUTsT24AfIHWN1mUdQoiTOIthPF+N0NSicgK4/w83jDyA+xeqxpoKSJaKM/h7/A6J7YItDvsD1tRIj1/1RhNDBP2OH4ihdTYM58YXTcxr9lh3qiXz9YYHOtfIvAQAA//8HOb/RAAAABklEQVQDAB+FDDjdUQJeAAAAAElFTkSuQmCC",aa="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1735280492544'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='4326'%20width='32'%20height='32'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cpath%20d='M442.514286%2073.142857c82.529524%2064.24381%20140.239238%20126.610286%20173.129143%20187.099429%2031.158857%2057.295238%2043.666286%20115.907048%2037.546666%20175.835428l-1.219047%209.996191%206.095238-4.973715a174.055619%20174.055619%200%200%200%2049.249524-69.607619l2.681904-7.411809%207.704381-23.04c82.285714%2055.734857%20123.440762%20150.064762%20123.440762%20283.062857C841.142857%20823.515429%20665.795048%20950.857143%20521.654857%20950.857143c-144.11581%200-308.224-85.333333-334.750476-263.875048-26.550857-178.541714%2083.480381-261.90019%20158.427429-378.197333C395.288381%20231.253333%20427.690667%20152.697905%20442.514286%2073.142857z%20m33.718857%20154.575238c-17.554286%2041.447619-39.424%2082.407619-65.536%20122.904381l-8.313905%2012.653714c-8.411429%2012.507429-17.310476%2024.941714-28.818286%2040.374858l-40.96%2054.467047c-63.634286%2086.869333-80.944762%20136.021333-68.851809%20217.526857%2017.92%20120.441905%20128.341333%20197.778286%20257.901714%20197.778286%20120.905143%200%20241.785905-110.933333%20241.785905-249.344%200-61.976381-9.825524-111.323429-29.110857-149.699048-8.240762%209.411048-17.237333%2018.285714-26.965334%2026.59962l-159.085714%20130.023619%2026.697143-195.364572c6.41219-46.811429-2.462476-92.208762-27.648-138.483809-13.214476-24.30781-31.98781-49.737143-56.368762-76.166096l-8.338286-8.850285-6.387809%2015.579428z'%20p-id='4327'%20fill='%23ff4d4f'%3e%3c/path%3e%3c/svg%3e",oa="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1735287774232'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1465'%20width='16'%20height='16'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cpath%20d='M563.8%20512l262.5-312.9c4.4-5.2%200.7-13.1-6.1-13.1h-79.8c-4.7%200-9.2%202.1-12.3%205.7L511.6%20449.8%20295.1%20191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8%200-10.5%207.9-6.1%2013.1L459.4%20512%20196.9%20824.9c-4.4%205.2-0.7%2013.1%206.1%2013.1h79.8c4.7%200%209.2-2.1%2012.3-5.7l216.5-258.1%20216.5%20258.1c3%203.6%207.5%205.7%2012.3%205.7h79.8c6.8%200%2010.5-7.9%206.1-13.1L563.8%20512z'%20p-id='1466'%3e%3c/path%3e%3c/svg%3e",la="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1735280690063'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='8850'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='32'%20height='32'%3e%3cpath%20d='M1022.955204%20556.24776c0%20100.19191-81.516572%20181.698249-181.718715%20181.698249l-185.637977%200c-11.2973%200-20.466124-9.168824-20.466124-20.466124%200-11.307533%209.168824-20.466124%2020.466124-20.466124l185.637977%200c77.628008%200%20140.786467-63.148226%20140.786467-140.766001%200-77.423347-62.841234-140.448776-140.203182-140.766001-0.419556%200.030699-0.828878%200.051165-1.248434%200.061398-5.935176%200.153496-11.665691-2.302439-15.666818-6.702656-4.001127-4.41045-5.884011-10.345626-5.157463-16.250102%201.330298-10.806113%201.944282-19.760043%201.944282-28.192086%200-60.763922-23.658839-117.874641-66.617234-160.833035-42.968627-42.958394-100.089579-66.617234-160.843268-66.617234-47.368844%200-92.742241%2014.449084-131.208321%2041.781592-37.616736%2026.738991-65.952084%2063.700811-81.925894%20106.884332-2.425236%206.54916-8.012488%2011.399631-14.827707%2012.893658-6.815219%201.483794-13.927197-0.603751-18.859533-5.536087-19.289322-19.340487-44.943608-29.982872-72.245418-29.982872-56.322773%200-102.146425%2045.813419-102.146425%20102.125959%200%200.317225%200.040932%200.982374%200.092098%201.627057%200.061398%200.920976%200.122797%201.831718%200.153496%202.762927%200.337691%209.465582-5.863545%2017.928325-15.001669%2020.455891-32.356942%208.943696-61.541635%2028.550243-82.181721%2055.217602-21.305235%2027.516704-32.571836%2060.508096-32.571836%2095.41307%200%2086.244246%2070.188572%20156.422585%20156.443052%20156.422585l169.981393%200c11.2973%200%2020.466124%209.15859%2020.466124%2020.466124%200%2011.2973-9.168824%2020.466124-20.466124%2020.466124l-169.981393%200c-108.828614%200-197.3753-88.536452-197.3753-197.354833%200-44.053332%2014.223956-85.712127%2041.126676-120.473839%2022.809495-29.450752%2053.897537-52.086285%2088.710414-64.816215%205.065366-74.322729%2067.149353-133.2447%20142.751215-133.2447%2028.386514%200%2055.504128%208.217149%2078.651314%2023.52581%2019.657712-39.868009%2048.842405-74.169233%2085.497233-100.212376%2045.434795-32.295544%2099.004875-49.354058%20154.918325-49.354058%2071.692832%200%20139.087778%2027.915793%20189.782368%2078.600149%2050.694589%2050.694589%2078.610382%20118.089535%2078.610382%20189.782368%200%203.704368-0.102331%207.470135-0.296759%2011.368932C952.633602%20386.245901%201022.955204%20463.188294%201022.955204%20556.24776z'%20p-id='8851'%3e%3c/path%3e%3cpath%20d='M629.258611%20589.106122c-3.990894%203.990894-9.230222%205.996574-14.46955%205.996574s-10.478655-2.00568-14.46955-5.996574l-67.087954-67.077721%200%20358.689289c0%2011.307533-9.15859%2020.466124-20.466124%2020.466124-11.307533%200-20.466124-9.15859-20.466124-20.466124l0-358.689289-67.087954%2067.077721c-7.992021%207.992021-20.947078%207.992021-28.939099%200s-7.992021-20.957311%200-28.949332l102.023628-102.013395c7.992021-7.992021%2020.947078-7.992021%2028.939099%200l102.023628%20102.013395C637.250632%20568.148811%20637.250632%20581.114101%20629.258611%20589.106122z'%20p-id='8852'%3e%3c/path%3e%3c/svg%3e",na="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1735280632344'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='7700'%20width='32'%20height='32'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cpath%20d='M924.672%20126.976q36.864%2036.864%2054.784%2082.432t17.92%2093.696-17.92%2093.696-54.784%2082.432l-392.192%20389.12q-36.864%2036.864-90.624%2061.44t-113.664%2028.672-122.368-16.384-115.712-73.728q-52.224-52.224-72.704-113.152t-16.384-121.344%2028.16-113.664%2060.928-90.112l348.16-345.088q9.216-9.216%2027.136-4.608t27.136%2013.824q8.192%209.216%2013.312%2027.136t-4.096%2027.136l-347.136%20344.064q-27.648%2027.648-46.08%2064.512t-21.504%2078.848%2012.288%2084.992%2055.296%2082.944q35.84%2035.84%2079.36%2050.688t86.528%2012.288%2081.92-18.944%2066.56-44.032l391.168-388.096q27.648-27.648%2039.424-57.344t11.264-58.88-13.824-56.832-36.864-51.2q-44.032-43.008-98.816-40.448t-110.08%2057.856l-353.28%20351.232q-23.552%2023.552-23.04%2052.224t18.944%2047.104q22.528%2022.528%2051.712%2018.432t47.616-22.528l320.512-318.464q9.216-9.216%2027.136-4.608t27.136%2013.824%2014.336%2027.136-4.096%2027.136l-321.536%20318.464q-36.864%2036.864-70.656%2051.2t-63.488%2012.8-55.296-15.872-47.104-34.816q-17.408-16.384-31.232-41.984t-15.872-56.32%2010.752-65.536%2049.664-70.656q18.432-18.432%2032.768-33.792%2012.288-13.312%2023.04-23.552t11.776-11.264l285.696-284.672q36.864-36.864%2080.384-57.856t88.576-24.064%2088.576%2012.288%2080.384%2052.224z'%20p-id='7701'%20fill='%231e1e1e'%3e%3c/path%3e%3c/svg%3e",ia="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1735280808939'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='15804'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='32'%20height='32'%3e%3cpath%20d='M873.8816%20150.1184C973.9264%20250.2656%201024%20370.8928%201024%20512c0%20141.2096-50.0736%20261.8368-150.1184%20361.8816C773.7344%20973.9264%20653.1072%201024%20512%201024c-141.1072%200-261.7344-50.0736-361.8816-150.1184C50.0736%20773.8368%200%20653.2096%200%20512c0-141.1072%2050.0736-261.7344%20150.1184-361.8816C250.2656%2050.0736%20370.8928%200%20512%200%20653.1072%200%20773.7344%2050.0736%20873.8816%20150.1184zM819.712%20526.7456%20507.0848%20211.6608%20192%20526.7456l56.6272%2054.1696%20219.0336-219.0336%200%20477.4912%2078.7456%200L546.4064%20361.8816l219.0336%20219.0336L819.712%20526.7456z'%20p-id='15805'%20fill='%234096ff'%3e%3c/path%3e%3c/svg%3e",ra="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1735295375625'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='3239'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='16'%20height='16'%3e%3cpath%20d='M659.748571%20245.272381l-51.687619-51.687619-318.439619%20318.585905%20318.415238%20318.268952%2051.712-51.736381-266.703238-266.556952z'%20p-id='3240'%3e%3c/path%3e%3c/svg%3e",ca="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1735295357873'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='2254'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='16'%20height='16'%3e%3cpath%20d='M605.086476%20512.146286L338.358857%20245.272381l51.760762-51.687619%20318.415238%20318.585905L390.095238%20830.415238l-51.687619-51.736381z'%20p-id='2255'%3e%3c/path%3e%3c/svg%3e",ua="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1735287324782'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1522'%20width='32'%20height='32'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cpath%20d='M616.746667%2085.333333L896%20347.904V853.333333a85.333333%2085.333333%200%200%201-85.333333%2085.333334H213.333333a85.333333%2085.333333%200%200%201-85.333333-85.333334V170.666667a85.333333%2085.333333%200%200%201%2085.333333-85.333334h403.413334z%20m244.352%20295.381334L581.802667%20118.186667v177.237333a85.333333%2085.333333%200%200%200%2085.333333%2085.333333h193.962667z%20m-107.264%2076.373333h-49.152l-79.488%20227.157333-109.354667-227.114666h-13.226667l-110.506666%20226.688-77.824-226.688H265.130667l113.749333%20328.192h13.226667l117.12-239.36%20114.858666%20239.36h13.781334l115.968-328.192z'%20fill='%235197e8'%20p-id='1523'%3e%3c/path%3e%3c/svg%3e",da="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1735378230313'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='3218'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='16'%20height='16'%3e%3cpath%20d='M784%20371.2c-16-25.6-35.2-44.8-44.8-54.4-9.6-9.6-28.8-9.6-38.4%203.2-9.6%209.6-9.6%2028.8%203.2%2038.4%203.2%203.2%206.4%206.4%209.6%209.6%209.6%209.6%2019.2%2022.4%2025.6%2035.2%2057.6%2086.4%2057.6%20179.2-38.4%20278.4-9.6%209.6-9.6%2028.8%200%2038.4%209.6%209.6%2028.8%209.6%2038.4%200C851.2%20598.4%20851.2%20476.8%20784%20371.2z'%20p-id='3219'%3e%3c/path%3e%3cpath%20d='M896%20246.4c-16-25.6-35.2-48-54.4-70.4-9.6-12.8-19.2-19.2-25.6-25.6-9.6-9.6-28.8-9.6-38.4%203.2-9.6%209.6-9.6%2028.8%203.2%2038.4%203.2%203.2%2012.8%209.6%2022.4%2022.4%2016%2019.2%2032%2038.4%2048%2064%20105.6%20160%20105.6%20336-70.4%20518.4-9.6%209.6-9.6%2028.8%200%2038.4%209.6%209.6%2028.8%209.6%2038.4%200C1014.4%20630.4%201014.4%20425.6%20896%20246.4z'%20p-id='3220'%3e%3c/path%3e%3cpath%20d='M483.2%2086.4l-217.6%20185.6-108.8%200c-57.6%200-108.8%2048-108.8%20108.8l0%20272c0%2060.8%2048%20108.8%20108.8%20108.8l96%200%20230.4%20182.4c54.4%2041.6%20105.6%2016%20105.6-51.2l0-755.2C588.8%2067.2%20534.4%2041.6%20483.2%2086.4zM534.4%20889.6c0%2022.4-3.2%2022.4-19.2%209.6l-236.8-185.6c-3.2-3.2-9.6-6.4-16-6.4l-105.6%200c-28.8%200-54.4-25.6-54.4-54.4l0-272c0-28.8%2025.6-54.4%2054.4-54.4l118.4%200c6.4%200%2012.8-3.2%2016-6.4l224-192c16-12.8%2016-12.8%2016%206.4L531.2%20889.6z'%20p-id='3221'%3e%3c/path%3e%3c/svg%3e",ht="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1736386332100'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='3350'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='16'%20height='16'%3e%3cpath%20d='M923.04%20689.226667L515.786667%20281.973333a5.333333%205.333333%200%200%200-7.573334%200l-407.253333%20407.253334a5.333333%205.333333%200%200%200%200%207.573333l45.226667%2045.226667a5.333333%205.333333%200%200%200%207.573333%200l354.453333-354.453334a5.333333%205.333333%200%200%201%207.573334%200l354.453333%20354.453334a5.333333%205.333333%200%200%200%207.573333%200l45.226667-45.226667a5.333333%205.333333%200%200%200%200-7.573333z'%20p-id='3351'%3e%3c/path%3e%3c/svg%3e",pa={class:"model-config"},va=["src"],ha={class:"config-panel"},ga={class:"model-list"},ma={class:"model-header"},fa={class:"model-title"},ya={class:"model-form"},wa={class:"form-item"},_a={class:"form-item"},ka={key:0,class:"form-item"},Aa={class:"form-item"},Ca={class:"form-item"},ba={class:"action-buttons"},Sa={__name:"index",setup(m){const p=[{label:"主流模型",options:[{label:"ChatGPT",value:"chatgpt",endpoint:"https://api.openai.com/v1"},{label:"Claude",value:"claude",endpoint:"https://api.anthropic.com"},{label:"GPT-4",value:"gpt4",endpoint:"https://api.openai.com/v1"}]},{label:"开源模型",options:[{label:"DeepSeek",value:"deepseek",endpoint:"https://api.deepseek.com/v1"},{label:"Ollama",value:"ollama",endpoint:"http://localhost:11434"},{label:"ChatGLM",value:"chatglm",endpoint:"https://api.zhipuai.cn/v1"}]},{label:"国内模型",options:[{label:"阿里通义千问",value:"qianwen",endpoint:"https://dashscope.aliyuncs.com/api/v1"},{label:"百度文心一言",value:"wenxin",endpoint:"https://aip.baidubce.com/rpc/2.0/ai_custom/v1"},{label:"讯飞星火",value:"spark",endpoint:"https://spark-api.xf-yun.com/v1"}]},{label:"其他",options:[{label:"自定义模型",value:"custom",endpoint:""}]}],h=r(!1),C=r(!1),v=r(!1),k=r([{type:"",key:"",endpoint:"",name:""}]),c=r([]),w=async()=>{v.value=!0;try{const d=(await z.get("https://aiapi.raycos.com.cn/api/models")).data;if(console.log(d),d.code===2e3){const D=d.data.models.map(J=>({label:J.name,value:J.type,description:J.description||""}));c.value=[{label:"API模型",options:D},...p]}}catch(u){console.error("获取模型列表失败:",u),R.error("获取模型列表失败")}finally{v.value=!1}},Z=u=>({chatgpt:"请输入 OpenAI API Key",gpt4:"请输入 OpenAI API Key",claude:"请输入 Anthropic API Key",deepseek:"请输入 DeepSeek API Key",qianwen:"请输入阿里云 API Key",wenxin:"请输入百度 API Key",spark:"请输入讯飞 API Key",chatglm:"请输入智谱 API Key",ollama:"可选:请输入访问密钥",custom:"请输入 API Key"})[u]||"请输入 API Key",H=(u,d)=>{const D=k.value[d],J=c.value.flatMap(fe=>fe.options).find(fe=>fe.value===u);J&&(D.endpoint=J.endpoint,D.name=J.label)},P=()=>{h.value=!h.value},E=()=>{k.value.push({type:"",key:"",endpoint:"",name:""})},_=u=>{if(k.value.length===1){R.warning("至少保留一个模型配置");return}k.value.splice(u,1)},N=u=>!(!u.type||!u.key||u.type==="ollama"&&!u.endpoint||u.type==="custom"&&(!u.name||!u.endpoint)),j=async()=>{if(k.value.some(d=>!N(d))){R.error("请填写完整的模型信息");return}C.value=!0;try{localStorage.setItem("modelConfig",JSON.stringify(k.value)),R.success("配置保存成功")}catch{R.error("配置保存失败")}finally{C.value=!1}},f=()=>{const u=localStorage.getItem("modelConfig");u&&(k.value=JSON.parse(u))};return Me(async()=>{f(),await w()}),(u,d)=>{const D=ie("a-button"),J=ie("a-select-option"),fe=ie("a-select-opt-group"),je=ie("a-select"),be=ie("a-input-password"),F=ie("a-input");return o(),l("div",pa,[e("div",{class:"config-header",onClick:P},[d[0]||(d[0]=e("img",{src:Hs,alt:"setting",class:"config-icon"},null,-1)),d[1]||(d[1]=e("span",null,"模型配置",-1)),e("img",{src:h.value?L(ht):L(Ve),alt:"toggle",class:"toggle-icon"},null,8,va)]),W(e("div",ha,[e("div",ga,[(o(!0),l(M,null,$(k.value,(b,q)=>(o(),l("div",{key:q,class:"model-item"},[e("div",ma,[e("span",fa,"模型 "+y(q+1),1),x(D,{type:"link",danger:"",size:"small",onClick:U=>_(q)},{default:ae(()=>d[2]||(d[2]=[re("删除")])),_:2},1032,["onClick"])]),e("div",ya,[e("div",wa,[d[3]||(d[3]=e("label",null,"选择模型",-1)),x(je,{style:{width:"200px"},value:b.type,"onUpdate:value":U=>b.type=U,placeholder:"请选择模型",onChange:U=>H(U,q)},{default:ae(()=>[(o(!0),l(M,null,$(c.value,U=>(o(),Bt(fe,{key:U.label,label:U.label},{default:ae(()=>[(o(!0),l(M,null,$(U.options,ce=>(o(),Bt(J,{key:ce.value,value:ce.value},{default:ae(()=>[re(y(ce.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["label"]))),128))]),_:2},1032,["value","onUpdate:value","onChange"])]),b.type?(o(),l(M,{key:0},[e("div",_a,[d[4]||(d[4]=e("label",null,"API Key",-1)),x(be,{value:b.key,"onUpdate:value":U=>b.key=U,placeholder:Z(b.type)},null,8,["value","onUpdate:value","placeholder"])]),b.type==="ollama"?(o(),l("div",ka,[d[5]||(d[5]=e("label",null,"服务器地址",-1)),x(F,{value:b.endpoint,"onUpdate:value":U=>b.endpoint=U,placeholder:"例如: http://localhost:11434"},null,8,["value","onUpdate:value"])])):S("",!0),b.type==="custom"?(o(),l(M,{key:1},[e("div",Aa,[d[6]||(d[6]=e("label",null,"模型名称",-1)),x(F,{value:b.name,"onUpdate:value":U=>b.name=U,placeholder:"请输入自定义模型名称"},null,8,["value","onUpdate:value"])]),e("div",Ca,[d[7]||(d[7]=e("label",null,"服务器地址",-1)),x(F,{value:b.endpoint,"onUpdate:value":U=>b.endpoint=U,placeholder:"请输入API地址"},null,8,["value","onUpdate:value"])])],64)):S("",!0)],64)):S("",!0)])]))),128))]),x(D,{type:"dashed",block:"",class:"add-model-btn",onClick:E},{default:ae(()=>[x(L(Ps)),d[8]||(d[8]=re(" 添加模型 "))]),_:1}),e("div",ba,[x(D,{type:"primary",loading:C.value,onClick:j},{default:ae(()=>d[9]||(d[9]=[re(" 保存配置 ")])),_:1},8,["loading"])])],512),[[ge,h.value]])])}}},xa=Ce(Sa,[["__scopeId","data-v-e8e9ff38"]]),Da=Wt({name:"SearchResults",components:{FileSearchOutlined:Ls},props:{searchResults:{type:Array,default:()=>[]},loading:{type:Boolean,default:!1},total:{type:Number,default:0},message:{type:String,default:""},enableWebSearch:{type:Boolean,default:!0}},emits:["update:total","update:enableWebSearch"],setup(m,{emit:p}){const h=r([]),C=r(!1),v=r(""),k=r(!1),c=r(m.total),w=r(m.enableWebSearch);me(()=>m.total,_=>{c.value=_}),me(()=>m.searchResults,_=>{h.value=_,C.value=h.value.length<m.total},{immediate:!0}),me(()=>m.message,_=>{_&&m.enableWebSearch&&(v.value=_)}),me(()=>m.enableWebSearch,_=>{w.value=_,_||P()});const Z=_=>Rt(_).format("YYYY-MM-DD"),H=async()=>{if(!(!v.value.trim()||k.value||!m.enableWebSearch)){k.value=!0;try{const _=await z.post("https://aiapi.raycos.com.cn/api/web-search-results/",{query:v.value,num_results:20,page:1,page_size:20,engine:"bing"});console.log("API Response:",_.data),_.data&&_.data.code===200&&(h.value=_.data.data.result||[],console.log("Total Results:",_.data.data.total),c.value=_.data.data.total||0,p("update:total",_.data.data.total||0))}catch(_){console.error("Web search failed:",_),h.value=[],c.value=0,p("update:total",0)}finally{k.value=!1}}},P=()=>{v.value="",h.value=[],c.value=0,p("update:total",0)},E=()=>{w.value=!w.value,p("update:enableWebSearch",w.value)};return{displayResults:h,loading:m.loading,total:c,hasMore:C,formatDate:Z,searchQuery:v,isSearching:k,handleSearch:H,clearSearch:P,isSearchEnabled:w,toggleSearch:E}}}),Ia={class:"search-results"},Ta={key:0,class:"results-list"},Ma={class:"result-title"},Ea=["href"],$a={class:"result-url"},Ua={class:"result-snippet"},Pa={class:"result-meta"},La={class:"result-date"},za={class:"result-source"},Oa={key:0,class:"loading-more",ref:"loadingTrigger"},Ba={key:0,class:"loading-spinner"},qa={key:1},Va={key:1,class:"no-results"};function Ga(m,p,h,C,v,k){return o(),l("div",Ia,[e("div",{class:"results-container",ref:"resultsContainer",onScroll:p[0]||(p[0]=(...c)=>m.handleScroll&&m.handleScroll(...c))},[m.displayResults.length>0?(o(),l("div",Ta,[(o(!0),l(M,null,$(m.displayResults,(c,w)=>(o(),l("div",{key:w,class:"result-item"},[e("h3",Ma,[e("a",{href:c.link,target:"_blank",rel:"noopener noreferrer"},y(c.title),9,Ea)]),e("p",$a,y(c.link),1),e("p",Ua,y(c.snippet),1),e("div",Pa,[e("span",La,y(m.formatDate(c.date)),1),e("span",za,y(c.source),1)])]))),128)),m.hasMore?(o(),l("div",Oa,[m.loading?(o(),l("div",Ba)):(o(),l("span",qa,"Loading more results..."))],512)):S("",!0)])):(o(),l("div",Va))],544)])}const Wa=Ce(Da,[["render",Ga],["__scopeId","data-v-23d582dd"]]),Ra="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAVZJREFUOE+l079Ll1EUBvDP/b73G9HeIISDUxiOtQTiEGFOCipE0BiELQ0KgoOgk/Rjk5zdGnL2L2hyMRIHocEpaGgsvfrq1feFF339Wni3e885z3mec58T3PCEXvWRJSwkrsy7MhB5h6cYqgEiH/EnMV83bgUoWA086vDymO9NBpEVPEsMZZBLAJHPGEhMYD9SZoBb3D9gNxdFFjGXuBMKpgJTjVnk4if4XSWfART8CNxO9FXv2yUrIXcoma4BjviCo/peM6iKPmTWibeRkVMyy2cAvaZ8IX4vsl/l343s/C9A1l837I9stUnYOP371Cahy0zJTGKw4EXgdejyqjwfWn0G07m+X80hVnlrGE1sFnzqsHvpGwvWAo8Lxv+yV1Puso6vh6x2eYPZQx72MtJwh+kWI2UPTHZ4fsC366w8igcNK2dp7xNj+NnqxOZy3WiZ/nXLTwAE1GVpm7M6FwAAAABJRU5ErkJggg==",Ja={class:"voice-config"},Na=["src"],Ka={class:"config-panel"},Fa={class:"config-item"},Qa={class:"voice-select-container"},Ya=["value"],Ha={class:"config-item"},ja={class:"slider-container"},Xa={class:"slider-value"},Za={class:"config-item",style:{display:"flex","justify-content":"space-around"}},eo=["disabled"],to=["disabled"],so={__name:"index",setup(m){const p=Jt(),h=r(!1),C=r([]),v=Be({role:"",speed:1,language:"zh"}),k=r(!1),c=r(!1),w=r(null),Z=async()=>{try{const u=(await z.get("https://aiapi.raycos.com.cn/chatbot/current_voice_config")).data.data;if(console.log("Current config:",u),u&&u.voice_name&&C.value.length>0){const d=C.value.find(D=>D.name===u.voice_name);console.log("Matched voice:",d),d&&(v.role=d.id,v.speed=u.speed||1,v.language=d.language,_())}}catch(f){console.error("获取当前语音配置失败:",f)}},H=async()=>{try{const u=(await z.get("https://aiapi.raycos.com.cn/chatbot/list_voices")).data.data.voices;C.value=Object.values(u).flat(),console.log("Voice list:",C.value),await Z()}catch(f){console.error("获取语音列表失败:",f)}},P=f=>({"zh-cn":"中文","en-us":"英文","ja-jp":"日语","ko-kr":"韩语"})[f]||f;Me(()=>{H()});const E=()=>{h.value=!h.value},_=()=>{p.commit("updateVoiceConfig",{...v})},N=async()=>{if(v.role){k.value=!0;try{const f=new FormData;f.append("voice_id",v.role),await z.post("https://aiapi.raycos.com.cn/switch_voice_config",f,{headers:{"Content-Type":"multipart/form-data"}})}catch(f){console.error("切换语音失败:",f),alert("语音切换失败")}finally{k.value=!1}}},j=async()=>{if(!(!v.role||c.value))try{c.value=!0;const u=(await z.get(`https://aiapi.raycos.com.cn/get_voice_preview?voice_id=${v.role}`)).data;if(u.code!==200)throw new Error(u.msg||"获取音频失败");w.value&&(w.value.pause(),w.value=null);let d;if(u.audio&&u.audio.startsWith("data:audio"))d=new Audio(u.audio);else if(u.audio_url){const J=u.audio_url.startsWith("http")?u.audio_url:`https://aiapi.raycos.com.cn${u.audio_url}`;d=new Audio(J)}else throw new Error("无效的音频数据");w.value=d,d.onended=()=>{c.value=!1,w.value=null},d.onerror=D=>{console.error("音频播放失败:",D),c.value=!1,w.value=null,alert("试听失败")},d.oncanplaythrough=async()=>{try{await d.play()}catch(D){console.error("播放音频失败:",D),c.value=!1,w.value=null,alert("播放失败")}}}catch(f){console.error("试听失败:",f),c.value=!1,alert(f.message||"试听失败")}};return Oe(()=>{w.value&&(w.value.pause(),w.value=null)}),(f,u)=>(o(),l("div",Ja,[e("div",{class:"config-header",onClick:E},[u[2]||(u[2]=e("img",{src:Ra,alt:"voice",class:"config-icon"},null,-1)),u[3]||(u[3]=e("span",null,"语音配置",-1)),e("img",{src:h.value?L(ht):L(Ve),alt:"toggle",class:"toggle-icon"},null,8,Na)]),W(e("div",Ka,[e("div",Fa,[u[4]||(u[4]=e("label",null,"语音角色",-1)),e("div",Qa,[W(e("select",{"onUpdate:modelValue":u[0]||(u[0]=d=>v.role=d),onChange:_},[(o(!0),l(M,null,$(C.value,d=>(o(),l("option",{key:d.id,value:d.id},y(d.name+"_"+d.gender)+" ("+y(P(d.language))+") ",9,Ya))),128))],544),[[zs,v.role]])])]),e("div",Ha,[u[5]||(u[5]=e("label",null,"语速",-1)),e("div",ja,[W(e("input",{type:"range","onUpdate:modelValue":u[1]||(u[1]=d=>v.speed=d),min:"0.5",max:"2",step:"0.1",onChange:_},null,544),[[qe,v.speed]]),e("span",Xa,y(v.speed)+"x",1)])]),e("div",Za,[e("button",{class:"preview-button",onClick:j,disabled:c.value},y(c.value?"播放中...":"试听"),9,eo),e("button",{class:"switch-button",onClick:N,disabled:k.value},y(k.value?"切换中...":"切换语音"),9,to)])],512),[[ge,h.value]])]))}},ao=Ce(so,[["__scopeId","data-v-8bc2e758"]]),oo="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='64%2064%20896%20896'%20width='16'%20height='16'%20fill='currentColor'%3e%3cpath%20d='M832%2064H192c-17.7%200-32%2014.3-32%2032v832c0%2017.7%2014.3%2032%2032%2032h640c17.7%200%2032-14.3%2032-32V96c0-17.7-14.3-32-32-32zm-260%2072h96v209.9L621.5%20312%20572%20347.4V136zm220%20752H232V136h280v296.9c0%203.3%201%206.6%203%209.3a15.9%2015.9%200%200%200%2022.3%203.7l83.8-59.9%2081.4%2059.4c2.7%202%206%203.1%209.3%203.1%208.8%200%2016-7.2%2016-16V136h64v752z'/%3e%3c/svg%3e",lo={class:"knowledge-config"},no=["src"],io={class:"config-panel"},ro={class:"knowledge-list"},co={class:"group-header"},uo={class:"checkbox-list"},po={class:"item-desc"},vo={class:"action-buttons"},ho={__name:"index",setup(m){const p=r([]),h=r(!1),C=r(!1),v=Be({product:[],tech:[],industry:[]}),k=()=>{h.value=!h.value},c=async()=>{C.value=!0;try{localStorage.setItem("knowledgeConfig",JSON.stringify(v)),R.success("知识库配置保存成功")}catch{R.error("知识库配置保存失败")}finally{C.value=!1}},w=()=>{const P=localStorage.getItem("knowledgeConfig");if(P){const E=JSON.parse(P);Object.keys(E).forEach(_=>{v[_]=E[_]})}},Z=async P=>{try{const E=new URLSearchParams;return E.append("page",1),E.append("kb_id",P),E.append("pageSize",9999),(await z.post("https://aiapi.raycos.com.cn/docType/selectTypeList",E,{headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:`JWT ${localStorage.getItem("token")}`}})).data.data||[]}catch(E){return console.error("获取知识库子项失败:",E),[]}},H=async()=>{try{const E=await z.post("https://aiapi.raycos.com.cn/kbm/selectBucketInfo",{user_id:2},{headers:{Authorization:`JWT ${localStorage.getItem("token")}`}}),_=await Promise.all(E.data.data.map(async N=>{const j=await Z(N.id);return console.log(j),{label:N.name,key:N.id,items:j.map(f=>({label:f.name,value:f.id}))}}));p.value=_,p.value.forEach(N=>{v[N.key]||(v[N.key]=[])})}catch(P){R.error("获取知识库信息失败"),console.error("获取知识库信息失败:",P)}};return Me(async()=>{await H(),w()}),(P,E)=>{const _=ie("a-checkbox"),N=ie("a-checkbox-group"),j=ie("a-button");return o(),l("div",lo,[e("div",{class:"config-header",onClick:k},[E[0]||(E[0]=e("img",{src:oo,alt:"knowledge",class:"config-icon"},null,-1)),E[1]||(E[1]=e("span",null,"知识库配置",-1)),e("img",{src:h.value?L(ht):L(Ve),alt:"toggle",class:"toggle-icon"},null,8,no)]),W(e("div",io,[e("div",ro,[(o(!0),l(M,null,$(p.value,f=>(o(),l("div",{class:"knowledge-group",key:f.label},[e("div",co,y(f.label),1),e("div",uo,[x(N,{value:v[f.key],"onUpdate:value":u=>v[f.key]=u},{default:ae(()=>[(o(!0),l(M,null,$(f.items,u=>(o(),l("div",{key:u.value,class:"checkbox-item"},[x(_,{value:u.value},{default:ae(()=>[re(y(u.label)+" ",1),e("span",po,y(u.description),1)]),_:2},1032,["value"])]))),128))]),_:2},1032,["value","onUpdate:value"])])]))),128))]),e("div",vo,[x(j,{type:"primary",loading:C.value,onClick:c},{default:ae(()=>E[2]||(E[2]=[re(" 保存配置 ")])),_:1},8,["loading"])])],512),[[ge,h.value]])])}}},go=Ce(ho,[["__scopeId","data-v-6b9363c0"]]),mo=Wt({name:"KnowledgeResults",props:{searchResults:{type:Array,default:()=>[]},loading:{type:Boolean,default:!1},total:{type:Number,default:0},message:{type:String,default:""},searchType:{type:String,default:"remote",validator:m=>["remote","local"].includes(m)},showTranslation:{type:Boolean,default:!0}},emits:["update:enableSearch","search","translate"],setup(m,{emit:p}){const h=r(""),C=r(!1),v=r(!1),k=r([]),c=r(1),w=r(20),Z=vt(()=>m.searchType==="local"?"搜索本地知识库...":"搜索远程知识库...");me(()=>m.searchResults,f=>{console.log("New search results:",f),k.value=f.map(u=>({...u,translation:u.translation||""}))}),me(()=>m.message,f=>{f&&(h.value=f,H())});const H=async()=>{if(!(!h.value.trim()||C.value)){C.value=!0,c.value=1;try{p("search",{query:h.value,page:c.value,pageSize:w.value,type:m.searchType,needTranslation:m.showTranslation})}finally{C.value=!1}}},P=async()=>{if(!(C.value||!v.value)){C.value=!0,c.value+=1;try{p("search",{query:h.value,page:c.value,pageSize:w.value,type:m.searchType})}finally{C.value=!1}}};return{searchQuery:h,isSearching:C,displayResults:k,hasMore:v,handleSearch:H,clearSearch:()=>{h.value="",k.value=[],c.value=1,p("update:enableSearch",!1)},formatDate:f=>Rt(f).format("YYYY-MM-DD HH:mm"),handleScroll:f=>{const{scrollTop:u,scrollHeight:d,clientHeight:D}=f.target;d-u-D<50&&!C.value&&v.value&&P()},placeholder:Z,formatContent:f=>{if(!f)return"";const u=h.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return f.replace(new RegExp(u,"gi"),d=>`<span class="highlight">${d}</span>`)}}}}),fo={class:"knowledge-results"},yo={class:"result-title"},wo=["href"],_o=["innerHTML"],ko={key:0,class:"result-translation"},Ao={class:"translation-content"},Co={class:"result-meta"},bo={class:"result-source"},So={class:"result-date"},xo={key:0,class:"load-more"},Do={key:1,class:"loading-state"},Io={key:2,class:"empty-state"};function To(m,p,h,C,v,k){return o(),l("div",fo,[p[4]||(p[4]=e("div",{class:"search-box"},null,-1)),!m.loading&&m.searchResults.length>0?(o(),l("div",{key:0,class:"results-container",ref:"resultsContainer",onScroll:p[0]||(p[0]=(...c)=>m.handleScroll&&m.handleScroll(...c))},[(o(!0),l(M,null,$(m.displayResults,c=>(o(),l("div",{key:c.id,class:"result-item"},[e("h3",yo,[e("a",{href:c.link,target:"_blank",rel:"noopener noreferrer"},y(c.title),9,wo)]),e("div",{class:"result-content",innerHTML:m.formatContent(c.content)},null,8,_o),c.translation?(o(),l("div",ko,[p[1]||(p[1]=e("span",{class:"translation-label"},"中文释义:",-1)),e("span",Ao,y(c.translation),1)])):S("",!0),e("div",Co,[e("span",bo,"来源: "+y(c.source||"知识库"),1),e("span",So,y(m.formatDate(c.date)),1)])]))),128)),m.hasMore?(o(),l("div",xo,p[2]||(p[2]=[e("div",{class:"loading-spinner"},null,-1),e("span",null,"加载更多...",-1)]))):S("",!0)],544)):m.loading?(o(),l("div",Do,p[3]||(p[3]=[e("div",{class:"loading-spinner"},null,-1),e("p",null,"正在搜索...",-1)]))):(o(),l("div",Io))])}const Mo=Ce(mo,[["render",To],["__scopeId","data-v-c3cce166"]]),Eo={name:"ChangePasswordDialog",props:{visible:{type:Boolean,default:!1}},data(){return{formData:{old_password:"",new_password:"",confirm_password:""}}},methods:{closeDialog(){this.$emit("update:visible",!1),this.resetForm()},resetForm(){this.formData={old_password:"",new_password:"",confirm_password:""}},async handleSubmit(){var m,p;if(!this.formData.old_password){this.$message.error("请输入原密码");return}if(!this.formData.new_password){this.$message.error("请输入新密码");return}if(!this.formData.confirm_password){this.$message.error("请确认新密码");return}if(this.formData.new_password!==this.formData.confirm_password){this.$message.error("两次输入的新密码不一致");return}try{const h=await z.post("https://aiapi.raycos.com.cn/user/change_password",{old_password:this.formData.old_password,new_password:this.formData.new_password,confirm_password:this.formData.confirm_password},{headers:{Authorization:`JWT ${localStorage.getItem("token")}`}});if(h.data.code===200){this.$message.success("密码修改成功"),this.closeDialog();try{await z.post("https://aiapi.raycos.com.cn/user/logout",{},{headers:{Authorization:`JWT ${localStorage.getItem("token")}`}}),localStorage.removeItem("token"),this.$router.push("/login")}catch(C){console.error("退出登录失败:",C),localStorage.removeItem("token"),this.$router.push("/login")}}else this.$message.error(h.data.message||"密码修改失败")}catch(h){this.$message.error("密码修改失败:"+(((p=(m=h.response)==null?void 0:m.data)==null?void 0:p.message)||h.message))}}}},$o={class:"dialog-content"},Uo={class:"dialog-header"},Po={class:"dialog-body"},Lo={class:"form-group"},zo={class:"form-group"},Oo={class:"form-group"},Bo={class:"dialog-footer"};function qo(m,p,h,C,v,k){return h.visible?(o(),l("div",{key:0,class:"dialog-overlay",onClick:p[6]||(p[6]=ne((...c)=>k.closeDialog&&k.closeDialog(...c),["self"]))},[e("div",$o,[e("div",Uo,[p[7]||(p[7]=e("h3",null,"修改密码",-1)),e("button",{class:"close-button",onClick:p[0]||(p[0]=(...c)=>k.closeDialog&&k.closeDialog(...c))},"×")]),e("div",Po,[e("div",Lo,[p[8]||(p[8]=e("label",null,"原密码:",-1)),W(e("input",{type:"password","onUpdate:modelValue":p[1]||(p[1]=c=>v.formData.old_password=c),placeholder:"请输入原密码"},null,512),[[qe,v.formData.old_password]])]),e("div",zo,[p[9]||(p[9]=e("label",null,"新密码:",-1)),W(e("input",{type:"password","onUpdate:modelValue":p[2]||(p[2]=c=>v.formData.new_password=c),placeholder:"请输入新密码"},null,512),[[qe,v.formData.new_password]])]),e("div",Oo,[p[10]||(p[10]=e("label",null,"确认密码:",-1)),W(e("input",{type:"password","onUpdate:modelValue":p[3]||(p[3]=c=>v.formData.confirm_password=c),placeholder:"请确认新密码"},null,512),[[qe,v.formData.confirm_password]])])]),e("div",Bo,[e("button",{class:"cancel-button",onClick:p[4]||(p[4]=(...c)=>k.closeDialog&&k.closeDialog(...c))},"取消"),e("button",{class:"confirm-button",onClick:p[5]||(p[5]=(...c)=>k.handleSubmit&&k.handleSubmit(...c))},"确认")])])])):S("",!0)}const Vo=Ce(Eo,[["render",qo],["__scopeId","data-v-b963ecb7"]]),Go={key:0,class:"progress-modal-overlay"},Wo={class:"progress-modal"},Ro={class:"progress-list"},Jo={class:"progress-info"},No={class:"progress-title"},Ko={class:"progress-percentage"},Fo={class:"progress-bar-container"},Qo={class:"progress-status"},Yo={class:"header"},Ho={class:"user-profile-bar"},jo={class:"user-info-bar"},Xo=["title"],Zo={key:1,class:"theme-icon",src:Zs,alt:"切换到深色模式"},el={class:"user-name"},tl={class:"user-name",style:{"margin-left":"10px"}},sl={class:"dropdown-menu"},al=["src"],ol={class:"conversation-list"},ll=["onClick"],nl={class:"config-container"},il={class:"chat"},rl={key:0,class:"welcome-section",style:{"margin-top":"-220px"}},cl={class:"suggestion-section"},ul={class:"cards-container"},dl={class:"suggestion-card"},pl={key:0,class:"suggestion-items"},vl={class:"questions-list"},hl=["onClick"],gl={key:1,class:"suggestion-items"},ml=["onClick"],fl={key:1,class:"welcome-section",style:{"margin-top":"-220px"}},yl={class:"suggestion-section"},wl={class:"cards-container"},_l={class:"suggestion-card"},kl={class:"card-header"},Al={key:0},Cl={key:1},bl={key:0,class:"card-subtitle"},Sl={key:1,class:"suggestion-items"},xl=["onClick"],Dl={key:2,class:"suggestion-items"},Il=["onClick"],Tl={key:0,class:"thinking-steps-stream"},Ml={key:0,class:"typing-indicator"},El={class:"message-bubble"},$l={class:"message-content"},Ul={key:0,class:"thinking-steps"},Pl={class:"step-content"},Ll={key:0,class:"image-preview"},zl=["src"],Ol={key:1,class:"video-preview"},Bl=["src"],ql={key:2,class:"file-info-display"},Vl=["src"],Gl={class:"file-details"},Wl=["title"],Rl={class:"file-size"},Jl=["innerHTML"],Nl={key:3},Kl={key:4,style:{"background-color":"#f5f5f5",padding:"12px","border-radius":"8px",margin:"8px 0"}},Fl={style:{"margin-bottom":"6px","border-bottom":"1px dashed #e5e5e5"}},Ql={style:{"margin-bottom":"6px","border-bottom":"1px dashed #e5e5e5"}},Yl={style:{"margin-bottom":"6px","border-bottom":"1px dashed #e5e5e5"}},Hl={style:{"margin-bottom":"6px"}},jl=["onClick"],Xl={key:5,class:"audio-controls"},Zl=["onClick"],en={key:0,class:"wave-animation"},tn=["src"],sn={key:0,style:{width:"80%"},class:"recommended-questions"},an={class:"questions-list"},on=["onClick"],ln={class:"input-container"},nn={class:"left_item",style:{display:"flex"}},rn={class:"search-toggle-item",style:{width:"33%"}},cn={class:"toggle-content"},un={class:"toggle-switch"},dn=["disabled"],pn={class:"search-toggle-item",style:{width:"33%"}},vn={class:"toggle-content"},hn={class:"toggle-switch"},gn={class:"search-toggle-item",style:{width:"33%"}},mn={class:"toggle-content"},fn={class:"toggle-switch"},yn={class:"search-toggle-item"},wn={class:"toggle-content"},_n=["value","disabled"],kn={key:0,value:""},An={key:1,value:""},Cn=["value"],bn={key:0,class:"attachments-panel"},Sn={class:"panel-content"},xn={key:0,style:{display:"flex","justify-content":"center"}},Dn={key:0,class:"upload-loading"},In={key:1},Tn={class:"file-list"},Mn={key:0,class:"file-loading"},En=["src"],$n=["src"],Un=["src"],Pn=["onClick"],Ln={key:0,class:"file-info"},zn={class:"file-name"},On={class:"file-size"},Bn={class:"input-wrapper"},qn={key:0,class:"loading-btn"},Vn={key:1,src:ia,alt:"send"},Gn={key:0,class:"fab-dots"},Wn={class:"option-content option-content--below"},Rn={class:"option-content option-content--below"},Jn={class:"option-content option-content--below"},Nn={key:0},Kn={style:{height:"91vh",overflow:"auto"},class:"file-list"},Fn={id:"stepsContainer",class:"steps-container"},Qn=["innerHTML"],Yn={class:"right-menu-content"},Hn={class:"panel-container"},jn={class:"panel-container"},Xn={class:"document-preview"},Zn={class:"preview-container"},ei={key:0,class:"direct-preview"},ti={class:"preview-header"},si={class:"preview-body"},ai=["src"],oi=["src"],li={key:2},ni={key:3},ii=["src"],ri={key:5,class:"file-preview"},ci={class:"panel-container"},ui=0,di=800,pi={__name:"report",setup(m){const p=new Os({html:!0,linkify:!0,typographer:!0});r(!1);const h=r(""),C=r(!1),v=r(!1),k=r(null),c=r([]),w=r([]);r(!1);const Z=r(1),H=r(1),P=r(null),E=Jt(),_=Vs(),N=()=>{_.push("/role")},j=r(!1),f=()=>{j.value=!0},u=()=>{j.value=!1},d=r([{id:1,title:"当前会话",messages:[]}]),D=r(!1),J=r(null),fe=(s,t="content",i="displayContent",a=15,n=35)=>{if(!s)return Promise.resolve();const g=s[t]||"";s[i]="";let I=0;return new Promise(T=>{const X=()=>{if(I>=g.length)return T();const le=g[I];s[i]+=le,I+=1;const B=/[\u4e00-\u9fa5]/.test(le)?n:a;Ae(()=>{requestAnimationFrame(()=>{setTimeout(X,B)})})};X()})},je=async(s,t=0)=>{var i;try{if(console.log("message",t),!s||!Array.isArray(s.thinkingSteps))return;for(let a=t;a<s.thinkingSteps.length;a+=1){console.log("message.thinkingSteps",s.thinkingSteps);const n=s.thinkingSteps[a];n.displayContent||(n.displayContent=""),await fe(n)}}catch(a){console.error("animateThinkingStepsForMessage error:",a);for(let n=t;n<(((i=s.thinkingSteps)==null?void 0:i.length)||0);n+=1){const g=s.thinkingSteps[n];g&&(g.displayContent=g.content||"")}}},be=r(null),F=r(!1),b=r(null),q=r(null),U=r(!1),ce=r(null),gt=r(!1),mt=r([]),ft=r([]);let Ee=null;const Ge=r([]),Xe=r(!1),Ze=r(0),V=r(!1),oe=r(!1),$e=r(!1),ye=r(!1),ue=r(!1),et=r([]),tt=r(0),st=r(!1),We=r(""),at=r(!1),Nt=r([]),ot=r(!1),de=r([]),we=r([]),Re=r(!1),Kt=(s,t)=>{switch(s){case"html_start":We.value="";break;case"html_chunk":t&&typeof t.html=="string"&&(We.value+=t.html,Ae(()=>{const i=document.getElementById("resultContent");i&&(i.scrollTop=i.scrollHeight)}));break;case"html_end":break;case"init_steps":at.value=!0,Ft(t.steps);break;case"step_update":Yt(t.step_id,t.status,t.details,t.progress);break;case"final_summary":break;case"stream_end":at.value=!1;break;case"error":console.error("SSE错误:",t.message);break}},Ft=s=>{const t=document.getElementById("stepsList");t&&(t.innerHTML="",Nt.value=s,s.forEach(i=>{t.appendChild(Qt(i))}))},Qt=s=>{const t=document.createElement("div");return t.className=`step ${s.status}`,t.id=`step-${s.step_id}`,t.innerHTML=`
  2. <div class="step-header">
  3. <div class="step-header-content">
  4. <div class="step-icon" style="display: none;">${yt(s.status)}</div>
  5. <div class="step-name">${s.name||s.step_id}</div>
  6. </div>
  7. </div>
  8. <div class="step-details" style="margin-bottom:15px;">${s.details||""}</div>
  9. <div class="progress-bar">
  10. <div class="progress-fill" style="width: ${s.progress||0}%"></div>
  11. </div>
  12. `,t},Yt=(s,t,i,a)=>{const n=document.getElementById(`step-${s}`);n&&(n.className=`step ${t}`,n.querySelector(".step-icon").textContent=yt(t),i&&(n.querySelector(".step-details").textContent=i),a!==void 0&&(n.querySelector(".progress-fill").style.width=`${a}%`))},yt=s=>{switch(s){case"pending":return"⏳";case"running":return"🔄";case"completed":return"✅";case"error":return"❌";default:return"⏳"}},ee=r(!1),Se=()=>{$e.value=window.innerWidth<=768,$e.value?(v.value=!0,oe.value=!0):(v.value=!1,oe.value=!1)};Me(()=>{Se(),window.addEventListener("resize",Se)});const _e=r(!1),wt=()=>{console.log(_e.value),_e.value=!_e.value},Ht=()=>{oe.value=!oe.value,$e.value&&(document.body.style.overflow=oe.value?"auto":"hidden",oe.value||(v.value=!0)),document.querySelector(".chat")&&(document.querySelector(".chat").style.left=oe.value?"460px":"260px")},jt=()=>{v.value=!1,document.querySelector(".chat")&&(document.querySelector(".chat").style.right=`${O.value}px`)},Xt=async()=>{gt.value=!0;try{const s=await z.get("https://aiapi.raycos.com.cn/api/document/summary?limit=2",{headers:{Authorization:`JWT ${localStorage.getItem("token")}`}});console.log("API Response:",s.data),s.data.status===200&&(ce.value=s.data.data,console.log("Document Summary:",ce.value),es())}catch(s){console.error("获取文档摘要失败:",s)}finally{gt.value=!1}},_t=s=>{ot.value=!0;const t={id:Date.now(),title:s.description||"处理步骤",value:0,status:"进行中..."};de.value.push(t);const i=setInterval(()=>{const a=de.value.findIndex(n=>n.id===t.id);a!==-1&&(de.value[a].value+=5,de.value[a].value>=100&&(clearInterval(i),de.value[a].status="完成",de.value[a].value=100))},100)},Zt=()=>{ot.value=!1,de.value=[]},es=()=>{Ee&&clearInterval(Ee);const s=()=>{var t;if(!((t=ce.value)!=null&&t.length)){console.log("没有可用的文档摘要数据");return}try{const i=ce.value[0];if(i!=null&&i.questions){const n=[...i.questions.map(g=>({question:g}))].sort(()=>.5-Math.random());mt.value=n.slice(0,3)}}catch(i){console.error("处理第一篇文档问题失败:",i)}try{const i=ce.value[1];if(i!=null&&i.questions){const n=[...i.questions.map(g=>({question:g}))].sort(()=>.5-Math.random());ft.value=n.slice(0,3)}}catch(i){console.error("处理第二篇文档问题失败:",i)}};s(),Ee=setInterval(s,5e3)},ts=s=>{console.log("QA clicked:",s),s!=null&&s.question&&(h.value=s.question||s.title,Ke())},kt=async()=>{try{const s=await z.get("https://aiapi.raycos.com.cn/api/agents/commands/",{headers:{Authorization:`JWT ${localStorage.getItem("token")}`}});console.log(s.data),s.data&&(we.value=s.data.data.commands,Re.value=!0)}catch(s){console.error("获取推荐问题失败:",s),Re.value=!1}},Je=s=>{h.value=s,Ke()};Oe(()=>{Ee&&clearInterval(Ee)});const At=()=>{C.value=!C.value},ss=s=>{c.value=c.value.filter(t=>t!==s),c.value.length===0?(O.value=0,document.querySelector(".chat")&&(document.querySelector(".chat").style.right="0px")):(O.value=450,document.querySelector(".chat")&&(document.querySelector(".chat").style.right=`${O.value}px`)),console.log(c.value.length)},Ct=()=>{var s;U.value||(s=k.value)==null||s.click()},bt=async s=>{try{const t=new FormData;t.append("file",s);const i=await z.post("https://aiapi.raycos.com.cn/upload/file",t,{headers:{"Content-Type":"multipart/form-data"}});if(i.data.status===2e3)return i.data.data.fileUrl;throw new Error(i.data.message||"文件上传失败")}catch(t){throw console.error("文件上传失败:",t),t}},St=async s=>{const t=Array.from(s.target.files);if(t.length===0)return;const i=10*1024*1024;if(t.filter(n=>!!(xe(n)&&n.size>i)).length>0){alert("Video files must not exceed 10MB"),s.target.value="";return}U.value=!0,O.value=450;try{for(const n of t){const g={name:n.name,size:n.size,sizeFormatted:xt(n.size),type:n.type,isUploading:!0};c.value.push(g);try{const I=await bt(n),T=c.value.findIndex(X=>X.name===n.name);T!==-1&&c.value.splice(T,1,{...g,url:I,isUploading:!1})}catch(I){c.value=c.value.filter(T=>T.name!==n.name),console.error("单个文件上传失败:",I)}}}catch(n){console.error("文件上传失败:",n)}finally{U.value=!1,s.target.value="",c.value.length>0&&(ve.value="preview",v.value=!1,document.querySelector(".chat")&&(document.querySelector(".chat").style.right=`${O.value}px`))}t.length>0&&V.value&&(V.value=!1)},xt=s=>{if(!s||isNaN(s))return"0 B";const t=1024,i=["B","KB","MB","GB"],a=Math.floor(Math.log(s)/Math.log(t));return parseFloat((s/Math.pow(t,a)).toFixed(2))+" "+i[a]},Dt=s=>s.url&&pe(s)?s.url:ua,pe=s=>{var a,n,g;const t=["jpg","jpeg","png","gif","webp"],i=((g=(n=(a=s.name)==null?void 0:a.split("."))==null?void 0:n.pop())==null?void 0:g.toLowerCase())||"";return t.includes(i)},xe=s=>{var a,n,g;const t=["mp4","webm","ogg"],i=((g=(n=(a=s.name)==null?void 0:a.split("."))==null?void 0:n.pop())==null?void 0:g.toLowerCase())||"";return t.includes(i)},as=s=>{const t=s.name.split(".").pop().toLowerCase(),i=["jpg","jpeg","png","gif","webp"],a=["mp4","webm","ogg"];return i.includes(t)?"image":a.includes(t)?"video":"document"},os=()=>{P.value&&Ae(()=>{P.value.scrollTop=P.value.scrollHeight})},Ne=r(""),De=r(null),Ke=async()=>{var X,le;const s=localStorage.getItem("token");if(!s){_.push("/login");return}if(D.value){D.value=!1,De.value&&(De.value.abort(),De.value=null),J.value&&(clearTimeout(J.value),J.value=null);return}if(!h.value.trim()&&c.value.length===0||D.value)return;D.value=!0,os();const t=h.value.trim();h.value="",V.value?(Pe.value=t,ls(t).catch(B=>{console.error("Web search failed:",B)})):ye.value&&(Pe.value=t,$t({query:t,page:1,pageSize:20}));const i=[],a=[],n=[];c.value.forEach(B=>{const se=as(B);se==="image"?i.push(B.url):se==="video"?a.push(B.url):n.push(B.url)});const g={id:Date.now(),role:"user",content:t,displayContent:t,files:c.value.map(B=>({name:B.name,size:B.sizeFormatted,type:B.type,url:B.url}))};w.value.push(g);const I=r(""),T=Be({id:Date.now()+1,role:"assistant",content:"思考中...",displayContent:"思考中...",isLoading:!0});w.value.push(T);try{if(De.value=new AbortController,ee.value){const B={query:t};let se=null;We.value="";try{const Q=await fetch("https://aiapi.raycos.com.cn/api/agents/database/streaming/",{method:"POST",headers:{Authorization:`JWT ${s}`,"Content-Type":"application/json"},body:JSON.stringify(B)});if(!Q.ok)throw new Error("SSE请求失败");se=Q.body.getReader();const ut=new TextDecoder;let ze="",he="",Ie="";for(;;){const{done:dt,value:$s}=await se.read();if(dt)break;ze+=ut.decode($s,{stream:!0});const Ot=ze.split(`
  13. `);ze=Ot.pop()||"";for(const Te of Ot)if(Te.startsWith("event:"))he=Te.substring(6).trim();else if(Te.startsWith("data:"))try{const Ye=Te.substring(5).trim();if(Ye){const A=JSON.parse(Ye);if(Kt(he||"message",A),he==="thinking_process"){console.log(A),T.thinkingSteps=[...Array.isArray(A.alternative_approaches)?A.alternative_approaches:[],...Array.isArray(A.key_insights)?A.key_insights:[],...Array.isArray(A.reasoning_steps)?A.reasoning_steps:[]].map(Us=>({content:Us,displayContent:""}));const Y=[];typeof A.analysis_approach=="string"&&A.analysis_approach.trim()&&Y.push({content:`${A.analysis_approach}`,displayContent:""}),typeof A.business_impact=="string"&&A.business_impact.trim()&&Y.push({content:`${A.business_impact}`,displayContent:""}),A.model_version!=null&&`${A.model_version}`.trim()!==""&&Y.push({content:`${A.model_version}`,displayContent:""}),A.processing_time!=null&&`${A.processing_time}`.trim()!==""&&Y.push({content:`${A.processing_time}`,displayContent:""}),typeof A.query_intent=="string"&&A.query_intent.trim()&&Y.push({content:`${A.query_intent}`,displayContent:""}),typeof A.risk_assessment=="string"&&A.risk_assessment.trim()&&Y.push({content:`${A.risk_assessment}`,displayContent:""}),A.technical_constraints!=null&&`${A.technical_constraints}`.trim()!==""&&Y.push({content:`${A.technical_constraints}`,displayContent:""});const He=T.thinkingSteps.length;T.thinkingSteps=[...T.thinkingSteps,...Y],Y.length>0&&(console.log("tempAiMessage",T),Ae(()=>{requestAnimationFrame(()=>{je(T,0)})}))}if(he==="final_summary"){A.summary&&A.summary.startsWith("命令集提示:")?await kt():Re.value=!1,w.value=w.value.filter(He=>He.id!==T.id);const Y=Be({id:Date.now()+2,role:"assistant",content:A.summary,summaryHtml:A.html_content,analysis_result:A.analysis_result,automation_plan:A.automation_plan,thinkingSteps:[],displayContent:"",audioData:null,showRecommendedQuestions:Re.value||!1});D.value=!0,I.value=A.html_content,w.value.push(Y);try{await It(Y)}catch(He){console.error("打字效果出错:",He),Y.displayContent=Y.content}finally{D.value=!1}}}}catch(Ye){console.error("Failed to parse SSE data:",Te,Ye)}else Te===""&&(he="")}}catch(Q){throw console.error("请求或处理过程出错:",Q),Q}finally{if(se)try{await se.cancel()}catch(Q){console.error("关闭reader时出错:",Q)}}}else{const B=V.value?"https://aiapi.raycos.com.cn/api/chat/web-search-llm/":"https://aiapi.raycos.com.cn/api/chat/online/multimodal",se=await z.post(B,{message:t,chat_config_id:"2",user_id:"13365429324",session_id:Ne.value,source:"pc",image_urls:i,video_urls:a,documents:n,merchant_id:JSON.parse(localStorage.getItem("userInfo")).merchant.merchant_id,model_type:Ut.value.type,model_name:Ut.value.name},{headers:{Authorization:`JWT ${localStorage.getItem("token")}`},signal:De.value.signal});w.value=w.value.filter(dt=>dt.id!==T.id);const Q=V.value?se.data.data:se.data,ut=V.value?Q.answer:Q.choices[0].message.content,ze=V.value?(X=Q.audio_info)==null?void 0:X.audio:(le=Q.audio_info)==null?void 0:le.audio,he=(V.value,Q.session_id);he&&(Ne.value=he);const Ie=Be({id:Date.now()+2,role:"assistant",content:ut,displayContent:"",audioData:ze||null});w.value.push(Ie),Ie.audioData&&!F.value&&await Pt(Ie.audioData,Ie.id),await It(Ie)}}catch(B){console.error("发送消息失败:",B),w.value=w.value.filter(se=>se.id!==T.id),w.value.push({id:Date.now()+2,role:"assistant",content:"发送消息失败,请重试",displayContent:"发送消息失败,请重试"})}finally{D.value=!1,De.value=null}},ls=async s=>{Xe.value=!0;try{const t=await z.post("https://aiapi.raycos.com.cn/api/web-search-results/",{query:s,num_results:20,page:1,page_size:20,engine:"tavily"});console.log(t),t.data&&t.data.code===200&&(Ge.value=t.data.data.result||[],console.log(Ge.value),Ze.value=t.data.data.total||0)}catch(t){console.error("Web search failed:",t),Ge.value=[],Ze.value=0}finally{Xe.value=!1}},It=async s=>{if(!s||!s.content){console.error("Invalid message or content is missing");return}return new Promise(t=>{let n=0;s.displayContent="";const g=()=>{if(n<s.content.length&&D.value){let I="";const T=s.content[n];if(/[\u4e00-\u9fa5]/.test(T))I=T;else if(/[.,!?;,。!?;]/.test(T))I=T;else if(T===" "&&n+1<s.content.length){let le=n+1;for(;le<s.content.length&&!/[\s\n]/.test(s.content[le]);)le++;I=s.content.substring(n,le)}else I=T;s.displayContent=s.content.substring(0,n)+I,n+=I.length;const X=I.length>1?50:20;J.value=setTimeout(g,X)}else D.value||(s.displayContent=s.content),t()};g()})},ns=()=>{H.value++;const s={id:Date.now(),title:`New Conversation ${H.value}`,messages:[]};d.value.push(s),Ne.value="",Tt(s.id)},Tt=s=>{Z.value=s;const t=d.value.find(i=>i.id===s);w.value=t?t.messages:[],Ne.value=""},is=async s=>{if(U.value)return;const t=Array.from(s.dataTransfer.files);if(t.length===0)return;const i=10*1024*1024;t.filter(a=>!!(xe(a)&&a.size>i)),U.value=!0;try{for(const a of t){const n={name:a.name,size:a.size,sizeFormatted:xt(a.size),type:a.type,isUploading:!0};c.value.push(n);try{const g=await bt(a),I=c.value.findIndex(T=>T.name===a.name);I!==-1&&c.value.splice(I,1,{...n,url:g,isUploading:!1})}catch(g){c.value=c.value.filter(I=>I.name!==a.name),console.error("单个文件上传失败:",g)}}}catch(a){console.error("文件上传失败:",a)}finally{U.value=!1,c.value.length>0&&(ve.value="preview",v.value=!1,document.querySelector(".chat")&&(document.querySelector(".chat").style.right=`${O.value}px`))}t.length>0&&V.value&&(V.value=!1)},rs=s=>{s.audioData?b.value===s.id?Ue():Pt(s.audioData,s.id):b.value===s.id?Ue():cs(s.content,s.id)},cs=async(s,t)=>{try{if(b.value&&b.value!==t&&Ue(),b.value===t)return;const i=await z.post("https://aiapi.raycos.com.cn/api/voices/play_text",{text:s},{headers:{Authorization:`JWT ${localStorage.getItem("token")}`}});if(i.data.code===200){const a=new Audio(`https://aiapi.raycos.com.cn${i.data.audio_url}`);q.value=a,b.value=t,F.value=!0,a.onended=()=>{b.value=null,q.value=null,F.value=!1},a.onerror=n=>{console.error("播放文本失败:",n),R.error("播放失败,请稍后重试"),b.value=null,q.value=null,F.value=!1},await a.play()}}catch(i){console.error("播放文本失败:",i),R.error("播放失败,请稍后重试"),b.value=null,q.value=null,F.value=!1}},Ue=()=>{be.value&&(be.value.pause(),be.value.currentTime=0,be.value=null),q.value&&(q.value.pause(),q.value.currentTime=0,q.value=null),F.value=!1,b.value=null};Oe(()=>{Ue()});const us=s=>s?p.render(s):"",O=r(0),Mt=s=>{s.preventDefault();const t=s.type==="mousedown"?s.clientX:s.touches[0].clientX,i=O.value,a=g=>{if(v.value)return;const I=g.type==="mousemove"?g.clientX:g.touches[0].clientX,T=t-I;let X=Math.min(Math.max(i+T,ui),di);O.value=X,document.querySelector(".chat")&&(document.querySelector(".chat").style.right=`${X}px`,X==800?document.querySelector(".input-container").style.width="97%":document.querySelector(".input-container").style.width="98%")},n=()=>{document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",n),document.removeEventListener("touchmove",a),document.removeEventListener("touchend",n)};document.addEventListener("mousemove",a),document.addEventListener("mouseup",n),document.addEventListener("touchmove",a),document.addEventListener("touchend",n)};r(!0);const Pe=r(""),ds=s=>{console.log(V),V.value=s,s&&(jt(),ve.value="search")},ve=r("search"),ps=r(!1),lt=()=>{ps.value=window.innerWidth<=480};Oe(()=>{window.removeEventListener("resize",lt)});const Et=r(!1),nt=()=>{Et.value=window.innerWidth<=768};Oe(()=>{window.removeEventListener("resize",nt)});const vs=vt(()=>(Se(),!v.value)),hs=r([]);me(ee,async s=>{if(console.log("智能体状态:",s),s){O.value=450,v.value=!1,document.querySelector(".chat")&&(document.querySelector(".chat").style.right=`${O.value}px`);const t=await z.get("https://aiapi.raycos.com.cn/api/agents/notifications/stream/",{headers:{Authorization:`JWT ${localStorage.getItem("token")}`}});console.log("API Response:",t.data),hs.value=t.data.notifications,ye.value=!1,V.value=!1}else v.value=!0,ye.value||(O.value=0,document.querySelector(".chat")&&(document.querySelector(".chat").style.right="460px",document.querySelector(".input-container").style.width="98%"))});const gs=async s=>{if(s.target.checked){O.value=450,await Ae();const t=document.querySelector(".chat");t?t.style.right=`${O.value}px`:console.warn("未找到聊天容器元素"),V.value=!1,ee.value=!1,ve.value="knowledge",h.value.trim()&&$t({query:h.value,page:1,pageSize:20})}else{O.value=0,await Ae();const t=document.querySelector(".chat");document.querySelector(".input-container").style.width="98%",t?t.style.right="460px":console.warn("未找到聊天容器元素")}},$t=async s=>{if(!(!s.query.trim()||!ye.value)){st.value=!0;try{const t=await z.post("https://aiapi.raycos.com.cn/chataids/mysql_fuzzy_search/",{keywords:s.query,documents:[],document_ids:[],limit:5},{headers:{Authorization:`JWT ${localStorage.getItem("token")}`}});console.log(t),t.data&&t.data.status===200&&(et.value=t.data.data.data||[],tt.value=t.data.data.data.total||0)}catch(t){console.error("Knowledge search failed:",t),et.value=[],tt.value=0}finally{st.value=!1}}},ms=s=>{s.target.checked?(O.value=450,document.querySelector(".chat")&&(document.querySelector(".chat").style.right=`${O.value}px`),ye.value=!1,ee.value=!1,ve.value="search",h.value.trim()&&(Pe.value=h.value)):(O.value=0,document.querySelector(".chat")&&(document.querySelector(".chat").style.right="460px"))},fs="https://aiapi.raycos.com.cn",ke=r([]),Le=r(null),Fe=r(!1),Ut=vt(()=>{if(!Le.value||!ke.value.length)return{type:"",name:""};const s=ke.value.find(t=>t.id===Le.value);return{type:(s==null?void 0:s.type)||"",name:(s==null?void 0:s.name)||""}}),ys=async()=>{Fe.value=!0;try{const t=await(await fetch(`${fs}/api/models?merchant_id=${JSON.parse(localStorage.getItem("userInfo")).merchant.merchant_id}`)).json();console.log(t),t.code===2e3&&(ke.value=(t.data.models||[]).map(i=>({id:i.id,name:i.name,type:i.type||i.model_type||"default"})),ke.value.length>0&&(Le.value=ke.value[0].id))}catch(s){console.error("Failed to fetch models:",s)}finally{Fe.value=!1}},ws=s=>{Le.value=s},it=r({name:"",role:""});Me(()=>{nt(),window.addEventListener("resize",nt),lt(),window.addEventListener("resize",lt),Se(),window.addEventListener("resize",Se),ys(),Xt();const s=localStorage.getItem("userInfo");if(s)try{it.value=JSON.parse(s)}catch(t){console.error("解析用户信息失败:",t)}});const rt=r(!1),_s=()=>{rt.value=!0,_e.value=!1},ks=async()=>{try{await z.post("https://aiapi.raycos.com.cn/user/logout",{},{headers:{Authorization:`JWT ${localStorage.getItem("token")}`}}),localStorage.removeItem("token"),localStorage.removeItem("userInfo"),localStorage.removeItem("permissions"),localStorage.removeItem("username"),localStorage.removeItem("mobile"),E.commit("app/setUser",{user:{},permission:[],auth:{}}),_e.value=!1,_.push("/login")}catch(s){console.error("退出登录失败:",s),localStorage.clear(),_.push("/login")}},As=async()=>{var s,t;try{const i=await z.post("https://aiapi.raycos.com.cn/user/create_invitation",{},{headers:{Authorization:`JWT ${localStorage.getItem("token")}`}});if(console.log(i),i.data.code===200){R.success("创建邀请成功");const a=`${window.location.protocol}//${window.location.host}`;window.location.href=`${a}${i.data.data.invitation_link}`}else R.error(i.data.message||"创建邀请失败")}catch(i){console.error("创建邀请失败:",i),R.error(((t=(s=i.response)==null?void 0:s.data)==null?void 0:t.message)||"创建邀请失败,请稍后重试")}_e.value=!1},Pt=async(s,t)=>{try{if(b.value&&b.value!==t&&Ue(),b.value===t)return;const i=new Audio(s);q.value=i,b.value=t,F.value=!0,i.onended=()=>{b.value=null,q.value=null,F.value=!1},i.onerror=a=>{console.error("播放音频失败:",a),R.error("播放失败,请稍后重试"),b.value=null,q.value=null,F.value=!1},await i.play()}catch(i){console.error("播放音频失败:",i),R.error("播放失败,请稍后重试"),b.value=null,q.value=null,F.value=!1}},te=r(!1),ct=s=>{document.documentElement.classList.toggle("dark-theme",s)},Cs=()=>{te.value=!te.value,localStorage.setItem("theme",te.value?"dark":"light"),ct(te.value)},Lt=()=>{const s=document.querySelector(".fab");s&&s.classList.add("animated"),ue.value=!ue.value},bs=()=>{console.log("回复功能"),R.info("回复功能")},Ss=async()=>{ee.value=!0,await kt()};Me(()=>{document.querySelector(".chat")&&(document.querySelector(".chat").style.right="460px"),Se();const s=localStorage.getItem("theme");s?te.value=s==="dark":te.value=window.matchMedia("(prefers-color-scheme: dark)").matches,ct(te.value),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",i=>{localStorage.getItem("theme")||(te.value=i.matches,ct(i.matches))})});const xs=r({xls:!1,minColLength:15,minRowLength:50,widthOffset:50,heightOffset:30,forceRender:!0,maxSheetLength:10,showGridLines:!0,defaultFontSize:12,defaultRowHeight:24,autoFitColumn:!0,overflowColumns:!0,showToolbar:!0}),zt=()=>{console.log("Excel文件渲染完成"),Ae(()=>{window.dispatchEvent(new Event("resize"))})},Ds=s=>{console.error("Excel文件渲染失败:",s),R.error("Excel预览失败:"+(s.message||"请尝试下载后查看"))},Is=s=>{var n,g,I;if(!s)return!1;const t=["doc","docx"],i=((I=(g=(n=s.name)==null?void 0:n.split("."))==null?void 0:g.pop())==null?void 0:I.toLowerCase())||"",a=t.includes(i);return a&&s.type?s.type==="application/msword"||s.type==="application/vnd.openxmlformats-officedocument.wordprocessingml.document":a},Ts=s=>{var a,n,g;if(!s)return!1;const t=["xls","xlsx"],i=((g=(n=(a=s.name)==null?void 0:a.split("."))==null?void 0:n.pop())==null?void 0:g.toLowerCase())||"";return t.includes(i)},Ms=s=>{var t,i;return s&&((i=(t=s.name)==null?void 0:t.toLowerCase())==null?void 0:i.endsWith(".pdf"))||!1},K=r(null);me(()=>c.value,s=>{s&&s.length>0?K.value=s[s.length-1]:K.value=null},{immediate:!0,deep:!0});const Es=()=>{K.value=null},Qe=r([]);return(s,t)=>{const i=ie("a-drawer");return o(),l("div",{class:G(["layout",{"dark-theme":te.value}])},[x(Vo,{visible:rt.value,"onUpdate:visible":t[0]||(t[0]=a=>rt.value=a)},null,8,["visible"]),ot.value?(o(),l("div",Go,[e("div",Wo,[e("div",{class:"progress-modal-header"},[t[8]||(t[8]=e("h3",null,"处理进度",-1)),e("button",{class:"close-btn",onClick:Zt},"×")]),e("div",Ro,[(o(!0),l(M,null,$(de.value,(a,n)=>(o(),l("div",{key:n,class:"progress-item"},[e("div",Jo,[e("span",No,y(a.title),1),e("span",Ko,y(a.value)+"%",1)]),e("div",Fo,[e("div",{class:"progress-bar",style:qt({width:a.value+"%"})},null,4)]),e("div",Qo,y(a.status),1)]))),128))])])])):S("",!0),e("div",Yo,[e("div",Ho,[t[13]||(t[13]=e("div",{class:"logo"},[e("img",{src:js,alt:"logo",class:"logo-img"})],-1)),e("div",jo,[e("div",{class:"theme-switch",onClick:Cs,title:te.value?"切换到浅色模式":"切换到深色模式"},[x(Bs,{name:"theme-icon",mode:"out-in"},{default:ae(()=>[te.value?(o(),l("img",{key:te.value,src:Xs,alt:"切换到浅色模式",class:"theme-icon"})):(o(),l("img",Zo))]),_:1})],8,Xo),$e.value?S("",!0):(o(),l("div",{key:0,class:"user-info",onClick:wt},[e("div",el,"商户名称:"+y(it.value.merchant_name||"未登录用户"),1),e("div",tl,"当前用户:"+y(it.value.username||"未登录用户"),1)])),e("div",{class:"avatar",onClick:wt},t[9]||(t[9]=[e("img",{src:ea,alt:"用户头像"},null,-1)]))]),W(e("div",sl,[e("div",{class:"dropdown-item",onClick:_s},t[10]||(t[10]=[e("i",{class:"fas fa-key"},null,-1),re(" 修改密码 ")])),e("div",{class:"dropdown-item",onClick:As},t[11]||(t[11]=[e("i",{class:"fas fa-user-plus"},null,-1),re(" 创建邀请 ")])),e("div",{class:"dropdown-item",onClick:ks},t[12]||(t[12]=[e("i",{class:"fas fa-sign-out-alt"},null,-1),re(" 退出登录 ")]))],512),[[ge,_e.value]])])]),e("div",{class:G(["collapse-left-button",{"menu-collapsed":oe.value}]),onClick:Ht},[e("img",{src:oe.value?L(ca):L(ra),alt:"toggle",class:"collapse-icon"},null,8,al)],2),e("div",{class:G(["menu",{collapsed:oe.value}])},[e("button",{class:"new-conversation-btn",onClick:ns},t[14]||(t[14]=[e("img",{class:"tab-icon",src:Gt,alt:""},null,-1),e("span",null,"New Conversation",-1)])),e("div",ol,[(o(!0),l(M,null,$(d.value,a=>(o(),l("div",{key:a.id,class:G(["conversation-item",{active:Z.value===a.id}]),onClick:n=>Tt(a.id)},y(a.title),11,ll))),128))]),e("div",nl,[e("div",{class:"config-header",style:{"border-bottom":"1px solid #e5e5e5"},onClick:f},t[15]||(t[15]=[e("img",{src:ta,alt:"permission",class:"config-icon"},null,-1),e("span",{style:{color:"#333333"}},"系统配置",-1),e("img",{src:Ve,alt:"permission",style:{"margin-left":"auto"},class:"config-icon"},null,-1)])),x(i,{title:"系统配置图",placement:"right",width:1e3,visible:j.value,onClose:u},{default:ae(()=>[x(Ys)]),_:1},8,["visible"]),e("div",{class:"config-header",onClick:N},t[16]||(t[16]=[e("img",{src:sa,alt:"permission",class:"config-icon"},null,-1),e("span",{style:{color:"#333333"}},"角色及权限管理",-1),e("img",{src:Ve,alt:"permission",style:{"margin-left":"auto"},class:"config-icon"},null,-1)])),x(go),x(xa),x(ao)])],2),e("div",il,[t[43]||(t[43]=e("div",{class:"chat-header"},[e("h2",null,"智能助手"),e("div",{class:"chat-status"},[e("span",{class:"status-indicator online"}),e("span",null,"在线")])],-1)),w.value.length===0&&we.value.length!==0?(o(),l("div",rl,[e("div",cl,[e("div",ul,[e("div",dl,[ee.value?(o(),l("div",gl,[(o(!0),l(M,null,$(we.value,(a,n)=>(o(),l("div",{key:n,class:"suggestion-item",onClick:g=>Je(a.example)},y(a.example),9,ml))),128))])):(o(),l("div",pl,[e("div",vl,[(o(!0),l(M,null,$(we.value,(a,n)=>(o(),l("div",{key:n,class:"question-item",onClick:g=>Je(a.example)},y(a.example),9,hl))),128))])]))])])])])):S("",!0),w.value.length===0&&we.value.length===0?(o(),l("div",fl,[e("div",yl,[t[18]||(t[18]=e("h3",null,"嗨,我是你的智能助手",-1)),e("div",wl,[e("div",_l,[e("div",kl,[t[17]||(t[17]=e("img",{src:aa,alt:"hot topics",class:"tab-icon"},null,-1)),ee.value?(o(),l("h4",Cl,"待处理问题")):(o(),l("h4",Al,"推荐问题"))]),ee.value?S("",!0):(o(),l("p",bl,"为您精选的热门问题")),ee.value?(o(),l("div",Dl,[(o(!0),l(M,null,$(we.value,(a,n)=>(o(),l("div",{key:n,class:"suggestion-item",onClick:g=>Je(a.example)},y(a.example),9,Il))),128))])):(o(),l("div",Sl,[(o(!0),l(M,null,$([...mt.value,...ft.value],(a,n)=>(o(),l("div",{key:n,class:"suggestion-item",onClick:g=>ts(a)},y(a.question),9,xl))),128))]))])])])])):S("",!0),w.value.length!==0?(o(),l("div",{key:2,class:"message-list",ref_key:"messageList",ref:P},[Qe.value&&Qe.value.length>0?(o(),l("div",Tl,[(o(!0),l(M,null,$(Qe.value,(a,n)=>(o(),l("div",{key:n,class:G(["thinking-step-stream",[a.type,{"fade-in":!0}]])},[re(y(a.displayContent!==void 0?a.displayContent:a.content)+" ",1),n===Qe.value.length-1?(o(),l("div",Ml,t[19]||(t[19]=[e("span",null,null,-1),e("span",null,null,-1),e("span",null,null,-1)]))):S("",!0)],2))),128))])):S("",!0),(o(!0),l(M,null,$(w.value,a=>(o(),l("div",{key:a.id,class:G(["message-item",a.role==="user"?"user":"assistant"])},[e("div",El,[e("div",$l,[a.thinkingSteps&&a.thinkingSteps.length>0?(o(),l("div",Ul,[(o(!0),l(M,null,$(a.thinkingSteps,(n,g)=>(o(),l("div",{key:g,class:"thinking-step"},[e("div",Pl,y(n.displayContent!==void 0?n.displayContent:n.content),1)]))),128))])):S("",!0),a.role==="user"&&a.files?(o(!0),l(M,{key:1},$(a.files,n=>(o(),l("div",{key:n.name,class:"file-message"},[pe(n)?(o(),l("div",Ll,[e("img",{src:n.url,class:"preview-image"},null,8,zl)])):xe(n)?(o(),l("div",Ol,[e("video",{controls:"",class:"preview-video",src:n.url,preload:"metadata"}," Your browser does not support the video tag. ",8,Bl)])):(o(),l("div",ql,[e("img",{src:Dt(n),class:"file-type-icon"},null,8,Vl),e("div",Gl,[e("span",{class:"file-name",title:n.name},y(n.name),9,Wl),e("span",Rl,y(n.size),1)])]))]))),128)):S("",!0),a.role==="assistant"?(o(),l("div",{key:2,class:"message-text",innerHTML:us(a.displayContent)},null,8,Jl)):(o(),l("div",Nl,y(a.content),1)),a.analysis_result?(o(),l("div",Kl,[(o(!0),l(M,null,$(a.analysis_result.insights,n=>(o(),l("div",Fl,y(n.message),1))),256)),(o(!0),l(M,null,$(a.analysis_result.issues,n=>(o(),l("div",Ql,y(n.message),1))),256)),(o(!0),l(M,null,$(a.analysis_result.recommendations,n=>(o(),l("div",Yl,y(n.description),1))),256)),(o(!0),l(M,null,$(a.automation_plan.steps,n=>(o(),l("div",Hl,[e("a",{href:"#",onClick:g=>_t(n),style:{color:"#0066cc","text-decoration":"none"}},y(n.description),9,jl)]))),256))])):S("",!0),a.role==="assistant"?(o(),l("div",Xl,[e("button",{class:"audio-btn",onClick:n=>rs(a)},[b.value===a.id?(o(),l("div",en,t[20]||(t[20]=[e("span",{class:"wave-bar"},null,-1),e("span",{class:"wave-bar"},null,-1),e("span",{class:"wave-bar"},null,-1),e("span",{class:"wave-bar"},null,-1)]))):(o(),l("img",{key:1,src:L(da),alt:"播放",class:"audio-icon"},null,8,tn))],8,Zl)])):S("",!0)])]),a.role==="assistant"&&a.showRecommendedQuestions?(o(),l("div",sn,[t[21]||(t[21]=e("div",{class:"questions-header"},null,-1)),e("div",an,[(o(!0),l(M,null,$(we.value,(n,g)=>(o(),l("div",{key:g,class:"question-item",onClick:I=>Je(n.example)},y(n.example),9,on))),128))])])):S("",!0)],2))),128))],512)):S("",!0),e("div",ln,[e("div",{class:G(["search-toggles",{compact:Et.value}])},[e("div",nn,[e("div",rn,[e("div",cn,[x(L(Gs)),t[23]||(t[23]=e("span",{class:"toggle-text"},"互联网",-1)),e("div",un,[W(e("input",{type:"checkbox",id:"webSearchToggle","onUpdate:modelValue":t[1]||(t[1]=a=>V.value=a),onChange:ms,disabled:c.value.length>0,class:"toggle-input"},null,40,dn),[[pt,V.value]]),e("label",{for:"webSearchToggle",class:G(["toggle-label",{disabled:c.value.length>0}])},t[22]||(t[22]=[e("span",{class:"toggle-slider"},null,-1)]),2)])])]),e("div",pn,[e("div",vn,[x(L(Vt)),t[25]||(t[25]=e("span",{class:"toggle-text"},"知识库",-1)),e("div",hn,[W(e("input",{type:"checkbox",id:"knowledgeSearchToggle","onUpdate:modelValue":t[2]||(t[2]=a=>ye.value=a),onChange:gs,class:"toggle-input"},null,544),[[pt,ye.value]]),t[24]||(t[24]=e("label",{for:"knowledgeSearchToggle",class:"toggle-label"},[e("span",{class:"toggle-slider"})],-1))])])]),e("div",gn,[e("div",mn,[x(L(Vt)),t[27]||(t[27]=e("span",{class:"toggle-text"},"智能体",-1)),e("div",fn,[W(e("input",{type:"checkbox",id:"inferenceModelId","onUpdate:modelValue":t[3]||(t[3]=a=>ee.value=a),class:"toggle-input"},null,512),[[pt,ee.value]]),t[26]||(t[26]=e("label",{for:"inferenceModelId",class:"toggle-label"},[e("span",{class:"toggle-slider"})],-1))])])])]),e("div",yn,[e("div",wn,[e("select",{class:"model-select",value:Le.value,onChange:t[4]||(t[4]=a=>ws(a.target.value)),disabled:Fe.value},[Fe.value?(o(),l("option",kn,"加载中...")):ke.value.length===0?(o(),l("option",An,"无可用模型")):S("",!0),(o(!0),l(M,null,$(ke.value,a=>(o(),l("option",{key:a.id,value:a.id},y(a.name),9,Cn))),128))],40,_n)])])],2),C.value?(o(),l("div",bn,[e("div",Sn,[e("div",{class:"attachments-header"},[t[29]||(t[29]=e("span",null,"Attachments",-1)),e("button",{class:"close-btn",onClick:At},t[28]||(t[28]=[e("img",{src:oa,alt:""},null,-1)]))]),c.value.length===0?(o(),l("div",xn,[e("div",{class:G(["upload-area",{"has-files":c.value.length>0}]),onClick:Ct,onDrop:ne(is,["prevent"]),onDragover:t[5]||(t[5]=ne(()=>{},["prevent"])),onDragenter:t[6]||(t[6]=ne(()=>{},["prevent"]))},[U.value?(o(),l("div",Dn,t[30]||(t[30]=[e("div",{class:"loading-spinner"},null,-1),e("div",{class:"upload-text"},"Uploading...",-1)]))):(o(),l(M,{key:1},[t[31]||(t[31]=e("img",{src:la,alt:"upload",class:"upload-icon"},null,-1)),t[32]||(t[32]=e("div",{class:"upload-text"},"Upload files",-1)),t[33]||(t[33]=e("div",{class:"upload-hint"}," Click or drag files to this area to upload ",-1))],64)),e("input",{type:"file",ref_key:"fileInput",ref:k,style:{display:"none"},onChange:St,multiple:""},null,544)],34)])):S("",!0),c.value.length!==0?(o(),l("div",In,[e("div",Tn,[(o(!0),l(M,null,$(c.value,a=>(o(),l("div",{key:a.name,class:G(["file-item",{"is-image":pe(a)}])},[e("div",{class:G(pe(a)?"file-wrapper":"")},[a.isUploading?(o(),l("div",Mn,t[34]||(t[34]=[e("div",{class:"loading-spinner"},null,-1)]))):pe(a)?(o(),l("img",{key:1,src:a.url,alt:"file",class:"file-icon"},null,8,En)):xe(a)?(o(),l("video",{key:2,src:a.url,class:"file-icon",preload:"metadata"}," Your browser does not support the video tag. ",8,$n)):(o(),l("img",{key:3,src:Dt(a),alt:"file",class:G(pe(a)||xe(a)?"file-icon":"")},null,10,Un)),a.isUploading?S("",!0):(o(),l("button",{key:4,class:"remove-btn",onClick:ne(n=>ss(a),["stop"])}," × ",8,Pn))],2),pe(a)?S("",!0):(o(),l("div",Ln,[e("span",zn,y(a.name),1),e("span",On,y(a.sizeFormatted),1)]))],2))),128)),e("button",{class:"add-more-btn",onClick:ne(Ct,["stop"])},t[35]||(t[35]=[e("img",{src:Gt,alt:"add"},null,-1)]))]),e("input",{type:"file",ref_key:"fileInput",ref:k,style:{display:"none"},onChange:St,multiple:""},null,544)])):S("",!0)])])):S("",!0),e("div",Bn,[e("button",{class:"attachment-btn",onClick:At},t[36]||(t[36]=[e("img",{src:na,alt:"attachment",class:"tab-icon"},null,-1)])),W(e("input",{type:"text",class:"message-input","onUpdate:modelValue":t[7]||(t[7]=a=>h.value=a),onKeyup:qs(Ke,["enter"]),placeholder:"Type a message..."},null,544),[[qe,h.value]]),e("button",{class:"send-btn",onClick:Ke},[D.value?(o(),l("span",qn,t[37]||(t[37]=[e("span",{class:"loading-square"},null,-1)]))):(o(),l("img",Vn))])])]),e("div",{class:G(["fab",{open:ue.value}]),onClick:Lt},[ue.value?S("",!0):(o(),l("div",Gn,t[38]||(t[38]=[e("span",null,null,-1),e("span",null,null,-1),e("span",null,null,-1)]))),e("div",{class:G(["option reply",{open:ue.value}]),onClick:ne(bs,["stop"])},[e("div",Wn,[x(L(Ws),{class:"option-icon"}),t[39]||(t[39]=e("span",{class:"option-label"},"查看",-1))])],2),e("div",{class:G(["option love",{open:ue.value}]),onClick:ne(_t,["stop"])},[e("div",Rn,[x(L(Rs),{class:"option-icon"}),t[40]||(t[40]=e("span",{class:"option-label"},"任务",-1))])],2),e("div",{class:G(["option delete",{open:ue.value}]),onClick:ne(Ss,["stop"])},[e("div",Jn,[x(L(Js),{class:"option-icon"}),t[41]||(t[41]=e("span",{class:"option-label"},"命令集",-1))])],2),ue.value?(o(),l("div",{key:1,class:"close",onClick:ne(Lt,["stop"])},t[42]||(t[42]=[e("i",{class:"material-icons"},"close",-1)]))):S("",!0)],2)]),$e.value?S("",!0):(o(),l("div",{key:1,class:G(["right_menu",{collapsed:!vs.value}]),style:qt({width:O.value+"px"})},[ee.value?(o(),l("div",Nn,[e("div",Kn,[W(e("div",Fn,t[44]||(t[44]=[e("h3",{class:"steps-title"},"处理步骤",-1),e("div",{id:"stepsList"},null,-1)]),512),[[ge,at.value]]),e("div",{id:"resultContent",innerHTML:We.value},null,8,Qn)])])):S("",!0),e("div",{class:"resize-handle",onMousedown:Mt,onTouchstart:Mt},null,32),e("div",Yn,[W(e("div",Hn,[x(Wa,{searchResults:Ge.value,loading:Xe.value,total:Ze.value,enableWebSearch:V.value,message:Pe.value,"onUpdate:enableWebSearch":ds},null,8,["searchResults","loading","total","enableWebSearch","message"])],512),[[ge,ve.value==="search"]]),W(e("div",jn,[t[46]||(t[46]=e("div",{class:"preview-header"},[e("span",null,"文档预览")],-1)),e("div",Xn,[e("div",Zn,[K.value?(o(),l("div",ei,[e("div",ti,[e("span",null,y(K.value.name),1),e("button",{class:"close-btn",onClick:Es},[x(L(Ns))])]),e("div",si,[pe(K.value)?(o(),l("img",{key:0,src:K.value.url,class:"preview-image",alt:"preview"},null,8,ai)):xe(K.value)?(o(),l("video",{key:1,src:K.value.url,controls:"",class:"preview-video"},null,8,oi)):Is(K.value)?(o(),l("div",li,[x(L(Ks),{src:K.value.url,class:"doc-preview",onRendered:zt,onError:s.handleError},null,8,["src","onError"])])):Ts(K.value)?(o(),l("div",ni,[x(L(Fs),{options:xs.value,onRendered:zt,onError:Ds,src:K.value.url,class:"doc-preview"},null,8,["options","src"])])):Ms(K.value)?(o(),l("iframe",{key:4,src:K.value.url,style:{width:"100%",height:"100%"},frameborder:"0"},null,8,ii)):(o(),l("div",ri,[x(L(Qs),{class:"large-icon"}),t[45]||(t[45]=e("p",null,"该文件类型暂不支持预览",-1))]))])])):S("",!0)])])],512),[[ge,ve.value==="preview"]]),W(e("div",ci,[x(Mo,{searchResults:et.value,loading:st.value,total:tt.value,message:Pe.value},null,8,["searchResults","loading","total","message"])],512),[[ge,ve.value==="knowledge"]])])],6))],2)}}},fi=Ce(pi,[["__scopeId","data-v-dc411374"]]);export{fi as default};