@fv-ui/ai-chat 1.10.0 → 1.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/index.mjs CHANGED
@@ -11,7 +11,7 @@ import 'element-plus/es/components/avatar/style/css';
11
11
  import 'element-plus/es/components/dropdown/style/css';
12
12
  import 'element-plus/es/components/select/style/css';
13
13
  import 'element-plus/es/components/image-viewer/style/css';
14
- import { shallowRef, inject, computed, provide, defineComponent, ref, onBeforeUnmount, openBlock, createElementBlock, Fragment, createElementVNode, createBlock, Teleport, watch, normalizeClass, createTextVNode, toDisplayString, createCommentVNode, normalizeStyle, renderSlot, unref, renderList, isRef, nextTick, onMounted, mergeProps, createSlots, withCtx, createVNode, Transition, getCurrentInstance, useSlots, normalizeProps, guardReactiveProps, reactive, resolveDynamicComponent, markRaw, withModifiers, h, onActivated, useModel, onDeactivated, mergeModels, withDirectives, toHandlers, vShow, watchEffect } from 'vue';
14
+ import { shallowRef, inject, computed, provide, defineComponent, ref, onBeforeUnmount, openBlock, createElementBlock, Fragment, createElementVNode, createBlock, Teleport, watch, normalizeClass, createTextVNode, toDisplayString, createCommentVNode, normalizeStyle, renderSlot, unref, renderList, isRef, nextTick, onMounted, mergeProps, createSlots, withCtx, createVNode, Transition, getCurrentInstance, useSlots, normalizeProps, guardReactiveProps, reactive, resolveDynamicComponent, markRaw, withModifiers, h, onActivated, useModel, onDeactivated, mergeModels, watchEffect, withDirectives, toHandlers, vShow } from 'vue';
15
15
  import { ElMessage, ElAvatar, ElButton, ElIcon, ElPopover, ElDialog, ElScrollbar, ElDropdown, ElDropdownMenu, ElDropdownItem, ElMessageBox, ElImageViewer, ElTooltip, ElInput, ElSelect, ElOption, ElSegmented } from 'element-plus';
16
16
  import * as ElementPlusIconsVue from '@element-plus/icons-vue';
17
17
  import { ArrowDown, Close, Check, Delete, Microphone, Promotion, VideoPause, Loading, SuccessFilled, WarningFilled, CircleCloseFilled, ArrowUp, Picture, Download, Paperclip, RefreshRight, MoreFilled, Search, User, CircleCheck, DocumentCopy, Bottom, CopyDocument, FullScreen, Plus, Clock, ArrowLeft } from '@element-plus/icons-vue';
@@ -38219,7 +38219,7 @@ var __icon_7 = "<?xml version=\"1.0\" standalone=\"no\"?><!DOCTYPE svg PUBLIC \"
38219
38219
 
38220
38220
  var __icon_8 = "<?xml version=\"1.0\" standalone=\"no\"?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"><svg t=\"1791801016916\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"3529\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"200\" height=\"200\"><path d=\"M895.969 336.015l0 575.953c0 26.497-21.498 47.995-47.998 47.995L176.028 959.963c-26.498 0-47.996-21.498-47.996-47.995L128.032 112.033c0-26.498 21.499-47.996 47.996-47.996L623.99 64.037c26.498 0 63.494 15.499 81.994 33.997l155.986 155.987C880.469 272.52 895.969 309.517 895.969 336.015zM831.973 384.011 623.99 384.011c-26.498 0-47.996-21.499-47.996-47.996L575.994 128.032 192.026 128.032l0 767.936 639.946 0L831.972 384.011zM639.99 320.016l187.984 0c-3-8.5-7.5-16.999-11-20.499L660.488 143.03c-3.5-3.5-12-7.999-20.498-10.999L639.99 320.016z\" p-id=\"3530\"></path><path d=\"M783.309 439.426 612.254 800l-102.52 0-18.691-214.441-1.133 0L390.223 800 286.287 800l-45.596-360.574 103.652 0 11.045 227.695 1.133 0 103.936-227.695 104.219 0 16.992 224.977 1.133 0 82.412-224.977L783.309 439.426z\" p-id=\"3531\"></path></svg>";
38221
38221
 
38222
- var defaultAvatarSvg = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"240\" height=\"240\" viewBox=\"0 0 240 240\" fill=\"none\" role=\"img\" aria-labelledby=\"title\">\r\n <title id=\"title\">FVAI 彩色 AI 图标</title>\r\n <g id=\"silhouette\" fill=\"#0E6BFD\">\r\n <path d=\"M83.084 26.906 C84.997 26.252 87.572 26.808 89.135 28.287 C90.564 29.639 91.147 31.761 91.930 33.611 C92.713 35.460 93.696 37.036 95.048 38.382 C96.401 39.728 98.123 40.843 99.915 41.705 C101.707 42.568 103.569 43.178 105.028 44.504 C106.556 45.892 107.643 48.065 107.147 49.880 C106.695 51.532 104.931 52.887 103.144 53.792 C101.181 54.786 99.190 55.238 97.421 56.044 C94.041 57.586 91.469 60.423 89.433 63.969 C88.463 65.658 87.615 67.509 86.082 68.532 C84.323 69.707 81.663 69.793 79.918 68.814 C78.249 67.877 77.418 65.965 76.666 63.899 C75.913 61.833 75.239 59.613 73.864 59.272 C72.550 58.945 70.597 60.333 69.040 61.717 C67.733 62.879 66.704 64.039 65.929 65.430 C63.822 69.209 63.579 74.693 66.110 78.596 C67.115 80.146 68.558 81.446 70.100 81.830 C71.961 82.294 73.967 81.424 75.983 80.646 C84.097 77.516 92.378 75.892 101.009 74.631 C110.691 73.216 120.813 72.259 130.945 72.434 C140.555 72.601 150.173 73.787 159.161 75.161 C163.629 75.843 167.941 76.572 172.542 78.163 C174.797 78.942 177.120 79.928 178.618 79.040 C179.993 78.225 180.672 75.832 181.801 74.037 C182.828 72.403 184.228 71.266 185.824 70.294 C187.577 69.227 189.567 68.361 191.580 67.917 C195.747 66.997 200.009 67.888 203.908 69.699 C211.016 73.001 216.917 79.357 218.477 87.132 C218.946 89.467 219.023 91.931 217.834 94.090 C216.834 95.907 214.935 97.509 214.435 99.073 C213.959 100.563 214.752 102.019 215.901 103.468 C216.857 104.673 218.059 105.873 219.195 107.087 C224.860 113.139 228.886 119.533 232.006 126.452 C235.445 134.075 237.784 142.336 238.479 151.091 C239.245 160.734 238.016 170.976 234.985 179.606 C233.661 183.373 231.995 186.832 229.850 190.333 C228.014 193.330 225.828 196.357 223.395 199.082 C218.159 204.949 211.783 209.415 205.095 212.791 C197.513 216.618 189.532 219.042 181.044 220.535 C176.436 221.345 171.678 221.881 166.905 222.310 C161.943 222.756 156.964 223.087 151.918 223.284 C141.769 223.681 131.345 223.537 120.980 223.515 C110.476 223.492 100.032 223.592 89.873 222.850 C80.605 222.174 71.574 220.795 63.046 218.354 C55.267 216.126 47.907 213.014 41.100 208.234 C35.240 204.119 29.790 198.769 25.784 192.899 C21.026 185.927 18.304 178.224 16.756 169.882 C15.863 165.071 15.361 160.048 15.531 155.072 C15.683 150.608 16.377 146.182 17.323 141.918 C19.150 133.678 21.918 126.047 26.125 118.868 C28.044 115.593 30.263 112.413 32.777 109.393 C35.025 106.694 37.508 104.122 39.873 101.433 C40.550 100.663 41.217 99.884 41.425 99.007 C41.652 98.049 41.330 96.975 41.037 95.897 C40.403 93.556 39.913 91.199 39.735 88.856 C39.379 84.169 40.273 79.536 41.856 75.173 C44.383 68.206 48.665 61.926 54.925 57.492 C56.576 56.323 58.364 55.282 60.150 54.354 C61.043 53.891 61.935 53.455 62.309 52.900 C62.648 52.397 62.561 51.796 62.409 51.055 C62.040 49.264 61.288 46.654 62.100 44.934 C62.878 43.288 65.087 42.458 67.103 41.648 C71.043 40.066 74.241 38.563 76.560 35.228 C78.591 32.306 79.948 27.979 83.084 26.906 Z\"/>\r\n </g>\r\n <g id=\"shell\" fill=\"#FDFDFE\">\r\n <path d=\"M112.152 80.916 C119.318 80.410 126.733 80.289 133.993 80.467 C140.731 80.633 147.336 81.056 153.835 81.882 C160.092 82.676 166.250 83.844 172.099 85.396 C177.389 86.800 182.426 88.518 187.385 90.909 C196.356 95.235 205.070 101.762 212.008 109.429 C219.109 117.276 224.349 126.317 227.338 136.157 C229.176 142.207 230.162 148.558 230.266 155.016 C230.366 161.248 229.643 167.579 227.969 173.463 C226.435 178.854 224.101 183.869 220.820 188.486 C217.991 192.467 214.458 196.152 210.622 199.219 C201.899 206.191 191.608 209.969 180.877 212.296 C174.813 213.610 168.609 214.461 162.195 214.907 C155.591 215.367 148.764 215.398 142.021 215.625 C138.484 215.744 134.970 215.918 131.485 216.046 C128.000 216.174 124.543 216.258 121.074 216.217 C117.699 216.177 114.312 216.020 110.894 215.881 C107.613 215.747 104.303 215.630 101.010 215.495 C94.151 215.214 87.366 214.857 80.807 213.947 C74.839 213.119 69.058 211.834 63.509 210.013 C58.266 208.294 53.230 206.097 48.458 203.058 C44.343 200.438 40.425 197.191 37.067 193.529 C33.582 189.728 30.701 185.480 28.664 180.935 C26.293 175.643 25.067 169.948 24.540 163.928 C23.936 157.018 24.254 149.678 25.504 142.966 C26.560 137.302 28.280 132.085 30.695 127.090 C32.970 122.385 35.861 117.877 39.245 113.619 C42.313 109.758 45.787 106.101 49.508 102.877 C57.685 95.792 67.059 90.793 76.997 87.426 C82.462 85.573 88.098 84.215 93.861 83.173 C99.805 82.098 105.884 81.359 112.152 80.916 Z\"/>\r\n </g>\r\n <g id=\"face\" fill=\"#0D2B5D\">\r\n <path d=\"M105.132 109.027 C115.851 108.263 127.107 108.140 138.035 108.452 C148.244 108.743 158.167 109.414 167.823 110.868 C176.690 112.204 185.332 114.201 192.901 118.900 C199.263 122.849 204.868 128.708 208.236 135.358 C210.268 139.372 211.485 143.675 212.152 148.224 C212.895 153.293 212.954 158.668 212.221 163.764 C211.596 168.115 210.393 172.262 208.367 176.056 C206.602 179.363 204.211 182.401 201.426 184.849 C195.238 190.289 187.106 192.817 178.845 194.342 C174.028 195.231 169.167 195.778 164.195 196.046 C159.224 196.313 154.141 196.300 149.026 196.330 C127.650 196.455 105.702 197.329 84.908 195.686 C75.484 194.941 66.297 193.679 58.439 189.064 C55.236 187.182 52.254 184.743 49.836 181.889 C47.241 178.823 45.297 175.278 43.984 171.481 C42.387 166.865 41.724 161.875 41.739 156.977 C41.754 152.302 42.388 147.709 43.735 143.243 C45.977 135.810 50.195 128.726 55.953 123.564 C61.985 118.156 69.707 114.858 77.563 112.863 C81.981 111.740 86.441 111.030 90.978 110.442 C95.606 109.843 100.315 109.370 105.132 109.027 Z\"/>\r\n </g>\r\n <g id=\"expression\" fill=\"#1CFBFD\">\r\n <path d=\"M93.209 124.933 C95.233 123.833 98.231 124.251 100.599 124.974 C102.606 125.587 104.160 126.419 105.954 127.425 C107.588 128.341 109.422 129.400 110.415 131.050 C111.339 132.584 111.535 134.629 110.110 135.315 C109.155 135.774 107.473 135.623 106.658 134.859 C106.283 134.508 106.091 134.026 105.786 133.638 C105.533 133.316 105.203 133.058 104.867 132.794 C103.313 131.573 101.636 130.225 99.559 129.844 C97.201 129.411 94.327 130.222 92.760 128.789 C92.100 128.186 91.672 127.185 91.877 126.388 C92.036 125.772 92.575 125.278 93.209 124.933 Z\"/>\r\n <path d=\"M176.980 135.822 C178.159 135.877 179.517 137.016 179.688 138.114 C179.841 139.102 179.033 140.055 178.084 140.707 C176.336 141.906 174.111 142.079 172.100 142.747 C169.967 143.455 168.076 144.719 165.929 145.311 C164.917 145.591 163.848 145.721 162.846 146.096 C162.259 146.315 161.695 146.619 161.128 146.931 C160.727 147.152 160.324 147.377 159.913 147.421 C158.713 147.550 157.437 146.138 157.299 144.929 C157.174 143.841 157.970 142.916 158.914 142.282 C160.654 141.112 162.901 140.926 164.907 140.252 C167.034 139.538 168.892 138.276 171.073 137.694 C172.101 137.420 173.200 137.297 174.176 136.886 C175.152 136.475 176.005 135.776 176.980 135.822 Z\"/>\r\n <!-- 两眼等大缩小:以各自圆心为中心同目标尺寸缩放(左 0.60 / 右 0.68,缩后均约 17 视窗单位宽);\r\n 缩放放外层 g(呈现属性),CSS translate 跟随放内层 path(id 锚点),互不覆盖 -->\r\n <g transform=\"translate(90.95 157.09) scale(0.60) translate(-90.95 -157.09)\">\r\n <path id=\"fvai-eye-left\" d=\"M90.254 138.697 C94.493 137.812 99.056 140.181 101.660 143.848 C104.243 147.484 104.900 152.396 104.595 156.985 C104.302 161.386 103.124 165.489 100.463 169.063 C98.087 172.254 94.529 175.024 90.815 175.486 C86.619 176.007 82.223 173.582 79.732 170.045 C77.210 166.463 76.640 161.743 77.000 157.388 C77.353 153.124 78.596 149.211 81.192 145.570 C83.454 142.397 86.743 139.431 90.254 138.697 Z\"/>\r\n </g>\r\n <g transform=\"translate(168.50 163.18) scale(0.68) translate(-168.50 -163.18)\">\r\n <path id=\"fvai-eye-right\" d=\"M166.255 147.848 C169.868 146.680 174.301 147.738 176.994 150.387 C179.623 152.972 180.593 157.072 180.646 161.005 C180.699 165.035 179.790 168.891 177.715 172.216 C175.889 175.144 173.159 177.660 170.040 178.504 C166.751 179.393 163.029 178.422 160.502 176.061 C157.910 173.639 156.576 169.755 156.297 165.969 C155.998 161.898 156.920 157.941 158.962 154.424 C160.670 151.483 163.162 148.849 166.255 147.848 Z\"/>\r\n </g>\r\n <path d=\"M118.057 165.765 C118.701 165.534 119.503 165.756 120.307 166.099 C120.727 166.279 121.148 166.491 121.564 166.702 C122.776 167.314 123.945 167.905 125.177 168.260 C127.867 169.035 130.853 168.684 133.915 167.993 C135.417 167.653 136.937 167.232 137.998 167.638 C138.890 167.978 139.459 168.902 139.575 169.935 C139.801 171.954 138.300 174.391 136.475 175.959 C134.324 177.806 131.724 178.444 128.992 178.547 C126.393 178.645 123.675 178.259 121.392 177.140 C119.438 176.183 117.802 174.689 116.939 172.554 C116.355 171.108 116.124 169.367 116.518 167.885 C116.778 166.902 117.313 166.032 118.057 165.765 Z\"/>\r\n </g>\r\n</svg>\r\n";
38222
+ var defaultAvatarSvg = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"240\" height=\"240\" viewBox=\"0 0 240 240\" fill=\"none\" role=\"img\" aria-label=\"AI Chat\">\r\n <g id=\"silhouette\" fill=\"#0E6BFD\">\r\n <path d=\"M83.084 26.906 C84.997 26.252 87.572 26.808 89.135 28.287 C90.564 29.639 91.147 31.761 91.930 33.611 C92.713 35.460 93.696 37.036 95.048 38.382 C96.401 39.728 98.123 40.843 99.915 41.705 C101.707 42.568 103.569 43.178 105.028 44.504 C106.556 45.892 107.643 48.065 107.147 49.880 C106.695 51.532 104.931 52.887 103.144 53.792 C101.181 54.786 99.190 55.238 97.421 56.044 C94.041 57.586 91.469 60.423 89.433 63.969 C88.463 65.658 87.615 67.509 86.082 68.532 C84.323 69.707 81.663 69.793 79.918 68.814 C78.249 67.877 77.418 65.965 76.666 63.899 C75.913 61.833 75.239 59.613 73.864 59.272 C72.550 58.945 70.597 60.333 69.040 61.717 C67.733 62.879 66.704 64.039 65.929 65.430 C63.822 69.209 63.579 74.693 66.110 78.596 C67.115 80.146 68.558 81.446 70.100 81.830 C71.961 82.294 73.967 81.424 75.983 80.646 C84.097 77.516 92.378 75.892 101.009 74.631 C110.691 73.216 120.813 72.259 130.945 72.434 C140.555 72.601 150.173 73.787 159.161 75.161 C163.629 75.843 167.941 76.572 172.542 78.163 C174.797 78.942 177.120 79.928 178.618 79.040 C179.993 78.225 180.672 75.832 181.801 74.037 C182.828 72.403 184.228 71.266 185.824 70.294 C187.577 69.227 189.567 68.361 191.580 67.917 C195.747 66.997 200.009 67.888 203.908 69.699 C211.016 73.001 216.917 79.357 218.477 87.132 C218.946 89.467 219.023 91.931 217.834 94.090 C216.834 95.907 214.935 97.509 214.435 99.073 C213.959 100.563 214.752 102.019 215.901 103.468 C216.857 104.673 218.059 105.873 219.195 107.087 C224.860 113.139 228.886 119.533 232.006 126.452 C235.445 134.075 237.784 142.336 238.479 151.091 C239.245 160.734 238.016 170.976 234.985 179.606 C233.661 183.373 231.995 186.832 229.850 190.333 C228.014 193.330 225.828 196.357 223.395 199.082 C218.159 204.949 211.783 209.415 205.095 212.791 C197.513 216.618 189.532 219.042 181.044 220.535 C176.436 221.345 171.678 221.881 166.905 222.310 C161.943 222.756 156.964 223.087 151.918 223.284 C141.769 223.681 131.345 223.537 120.980 223.515 C110.476 223.492 100.032 223.592 89.873 222.850 C80.605 222.174 71.574 220.795 63.046 218.354 C55.267 216.126 47.907 213.014 41.100 208.234 C35.240 204.119 29.790 198.769 25.784 192.899 C21.026 185.927 18.304 178.224 16.756 169.882 C15.863 165.071 15.361 160.048 15.531 155.072 C15.683 150.608 16.377 146.182 17.323 141.918 C19.150 133.678 21.918 126.047 26.125 118.868 C28.044 115.593 30.263 112.413 32.777 109.393 C35.025 106.694 37.508 104.122 39.873 101.433 C40.550 100.663 41.217 99.884 41.425 99.007 C41.652 98.049 41.330 96.975 41.037 95.897 C40.403 93.556 39.913 91.199 39.735 88.856 C39.379 84.169 40.273 79.536 41.856 75.173 C44.383 68.206 48.665 61.926 54.925 57.492 C56.576 56.323 58.364 55.282 60.150 54.354 C61.043 53.891 61.935 53.455 62.309 52.900 C62.648 52.397 62.561 51.796 62.409 51.055 C62.040 49.264 61.288 46.654 62.100 44.934 C62.878 43.288 65.087 42.458 67.103 41.648 C71.043 40.066 74.241 38.563 76.560 35.228 C78.591 32.306 79.948 27.979 83.084 26.906 Z\"/>\r\n </g>\r\n <g id=\"shell\" fill=\"#FDFDFE\">\r\n <path d=\"M112.152 80.916 C119.318 80.410 126.733 80.289 133.993 80.467 C140.731 80.633 147.336 81.056 153.835 81.882 C160.092 82.676 166.250 83.844 172.099 85.396 C177.389 86.800 182.426 88.518 187.385 90.909 C196.356 95.235 205.070 101.762 212.008 109.429 C219.109 117.276 224.349 126.317 227.338 136.157 C229.176 142.207 230.162 148.558 230.266 155.016 C230.366 161.248 229.643 167.579 227.969 173.463 C226.435 178.854 224.101 183.869 220.820 188.486 C217.991 192.467 214.458 196.152 210.622 199.219 C201.899 206.191 191.608 209.969 180.877 212.296 C174.813 213.610 168.609 214.461 162.195 214.907 C155.591 215.367 148.764 215.398 142.021 215.625 C138.484 215.744 134.970 215.918 131.485 216.046 C128.000 216.174 124.543 216.258 121.074 216.217 C117.699 216.177 114.312 216.020 110.894 215.881 C107.613 215.747 104.303 215.630 101.010 215.495 C94.151 215.214 87.366 214.857 80.807 213.947 C74.839 213.119 69.058 211.834 63.509 210.013 C58.266 208.294 53.230 206.097 48.458 203.058 C44.343 200.438 40.425 197.191 37.067 193.529 C33.582 189.728 30.701 185.480 28.664 180.935 C26.293 175.643 25.067 169.948 24.540 163.928 C23.936 157.018 24.254 149.678 25.504 142.966 C26.560 137.302 28.280 132.085 30.695 127.090 C32.970 122.385 35.861 117.877 39.245 113.619 C42.313 109.758 45.787 106.101 49.508 102.877 C57.685 95.792 67.059 90.793 76.997 87.426 C82.462 85.573 88.098 84.215 93.861 83.173 C99.805 82.098 105.884 81.359 112.152 80.916 Z\"/>\r\n </g>\r\n <g id=\"face\" fill=\"#0D2B5D\">\r\n <path d=\"M105.132 109.027 C115.851 108.263 127.107 108.140 138.035 108.452 C148.244 108.743 158.167 109.414 167.823 110.868 C176.690 112.204 185.332 114.201 192.901 118.900 C199.263 122.849 204.868 128.708 208.236 135.358 C210.268 139.372 211.485 143.675 212.152 148.224 C212.895 153.293 212.954 158.668 212.221 163.764 C211.596 168.115 210.393 172.262 208.367 176.056 C206.602 179.363 204.211 182.401 201.426 184.849 C195.238 190.289 187.106 192.817 178.845 194.342 C174.028 195.231 169.167 195.778 164.195 196.046 C159.224 196.313 154.141 196.300 149.026 196.330 C127.650 196.455 105.702 197.329 84.908 195.686 C75.484 194.941 66.297 193.679 58.439 189.064 C55.236 187.182 52.254 184.743 49.836 181.889 C47.241 178.823 45.297 175.278 43.984 171.481 C42.387 166.865 41.724 161.875 41.739 156.977 C41.754 152.302 42.388 147.709 43.735 143.243 C45.977 135.810 50.195 128.726 55.953 123.564 C61.985 118.156 69.707 114.858 77.563 112.863 C81.981 111.740 86.441 111.030 90.978 110.442 C95.606 109.843 100.315 109.370 105.132 109.027 Z\"/>\r\n </g>\r\n <g id=\"expression\" fill=\"#1CFBFD\">\r\n <path d=\"M93.209 124.933 C95.233 123.833 98.231 124.251 100.599 124.974 C102.606 125.587 104.160 126.419 105.954 127.425 C107.588 128.341 109.422 129.400 110.415 131.050 C111.339 132.584 111.535 134.629 110.110 135.315 C109.155 135.774 107.473 135.623 106.658 134.859 C106.283 134.508 106.091 134.026 105.786 133.638 C105.533 133.316 105.203 133.058 104.867 132.794 C103.313 131.573 101.636 130.225 99.559 129.844 C97.201 129.411 94.327 130.222 92.760 128.789 C92.100 128.186 91.672 127.185 91.877 126.388 C92.036 125.772 92.575 125.278 93.209 124.933 Z\"/>\r\n <path d=\"M176.980 135.822 C178.159 135.877 179.517 137.016 179.688 138.114 C179.841 139.102 179.033 140.055 178.084 140.707 C176.336 141.906 174.111 142.079 172.100 142.747 C169.967 143.455 168.076 144.719 165.929 145.311 C164.917 145.591 163.848 145.721 162.846 146.096 C162.259 146.315 161.695 146.619 161.128 146.931 C160.727 147.152 160.324 147.377 159.913 147.421 C158.713 147.550 157.437 146.138 157.299 144.929 C157.174 143.841 157.970 142.916 158.914 142.282 C160.654 141.112 162.901 140.926 164.907 140.252 C167.034 139.538 168.892 138.276 171.073 137.694 C172.101 137.420 173.200 137.297 174.176 136.886 C175.152 136.475 176.005 135.776 176.980 135.822 Z\"/>\r\n <!-- 两眼等大缩小:以各自圆心为中心同目标尺寸缩放(左 0.60 / 右 0.68,缩后均约 17 视窗单位宽);\r\n 缩放放外层 g(呈现属性),CSS translate 跟随放内层 path(id 锚点),互不覆盖 -->\r\n <g transform=\"translate(90.95 157.09) scale(0.60) translate(-90.95 -157.09)\">\r\n <path id=\"fvai-eye-left\" d=\"M90.254 138.697 C94.493 137.812 99.056 140.181 101.660 143.848 C104.243 147.484 104.900 152.396 104.595 156.985 C104.302 161.386 103.124 165.489 100.463 169.063 C98.087 172.254 94.529 175.024 90.815 175.486 C86.619 176.007 82.223 173.582 79.732 170.045 C77.210 166.463 76.640 161.743 77.000 157.388 C77.353 153.124 78.596 149.211 81.192 145.570 C83.454 142.397 86.743 139.431 90.254 138.697 Z\"/>\r\n </g>\r\n <g transform=\"translate(168.50 163.18) scale(0.68) translate(-168.50 -163.18)\">\r\n <path id=\"fvai-eye-right\" d=\"M166.255 147.848 C169.868 146.680 174.301 147.738 176.994 150.387 C179.623 152.972 180.593 157.072 180.646 161.005 C180.699 165.035 179.790 168.891 177.715 172.216 C175.889 175.144 173.159 177.660 170.040 178.504 C166.751 179.393 163.029 178.422 160.502 176.061 C157.910 173.639 156.576 169.755 156.297 165.969 C155.998 161.898 156.920 157.941 158.962 154.424 C160.670 151.483 163.162 148.849 166.255 147.848 Z\"/>\r\n </g>\r\n <path d=\"M118.057 165.765 C118.701 165.534 119.503 165.756 120.307 166.099 C120.727 166.279 121.148 166.491 121.564 166.702 C122.776 167.314 123.945 167.905 125.177 168.260 C127.867 169.035 130.853 168.684 133.915 167.993 C135.417 167.653 136.937 167.232 137.998 167.638 C138.890 167.978 139.459 168.902 139.575 169.935 C139.801 171.954 138.300 174.391 136.475 175.959 C134.324 177.806 131.724 178.444 128.992 178.547 C126.393 178.645 123.675 178.259 121.392 177.140 C119.438 176.183 117.802 174.689 116.939 172.554 C116.355 171.108 116.124 169.367 116.518 167.885 C116.778 166.902 117.313 166.032 118.057 165.765 Z\"/>\r\n </g>\r\n</svg>\r\n";
38223
38223
 
38224
38224
  var __icon_10 = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\"><path d=\"M614.4 183.62368c26.2144 46.94016 22.40512 116.85888-3.39968 199.31136h184.89344c82.86208 0 142.99136 72.45824 121.2416 145.94048l-82.7392 278.9376c-14.90944 50.25792-64.55296 85.11488-121.20064 85.11488H386.90816A79.70816 79.70816 0 0 1 307.2 813.21984V409.10848c0-17.6128 11.79648-32.768 27.4432-40.79616a168.46848 168.46848 0 0 0 81.7152-93.184c21.66784-59.76064 14.21312-105.55392 38.13376-135.24992 23.9616-29.65504 49.88928-24.90368 71.8848-24.90368 27.0336 0 66.02752 22.89664 88.02304 68.64896zM204.8 380.928A61.44 61.44 0 0 1 266.24 442.368v389.12a61.44 61.44 0 1 1-122.88 0v-389.12a61.44 61.44 0 0 1 61.44-61.44z\" fill=\"currentColor\"></path></svg>\r\n";
38225
38225
 
@@ -42174,7 +42174,7 @@ var _sfc_main$4 = /* @__PURE__ */ defineComponent({
42174
42174
  }
42175
42175
  });
42176
42176
 
42177
- var defaultAvatar = new URL('assets/fvai-avatar-Ba11Fd2U.svg', import.meta.url).href;
42177
+ var defaultAvatar = new URL('assets/fvai-avatar-BGJ98eKE.svg', import.meta.url).href;
42178
42178
 
42179
42179
  const DRAFT_SESSION_ID = "__draft__";
42180
42180
 
@@ -43531,7 +43531,7 @@ const _hoisted_16 = {
43531
43531
  const SESSION_HISTORY_LIMIT = 20;
43532
43532
  const historyPageSize = 20;
43533
43533
  const DRAWER_DRAG_THRESHOLD = 100;
43534
- const EDGE_SNAP_DELAY = 500;
43534
+ const EDGE_SNAP_DELAY = 300;
43535
43535
  var _sfc_main$1 = /* @__PURE__ */ defineComponent({
43536
43536
  ...{ name: "FvAiChatWidget" },
43537
43537
  __name: "index",
@@ -43543,7 +43543,7 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
43543
43543
  position: { type: String, required: false, default: "right" },
43544
43544
  offsetTop: { type: Number, required: false, default: 0 },
43545
43545
  offsetBottom: { type: Number, required: false, default: 0 },
43546
- mode: { type: String, required: false, default: "drawer" },
43546
+ mode: { type: String, required: false, default: void 0 },
43547
43547
  floatingHeight: { type: String, required: false, default: "" },
43548
43548
  showModeToggle: { type: Boolean, required: false, default: false },
43549
43549
  storageKey: { type: String, required: false, default: "fv-ai-chat-widget" },
@@ -43837,16 +43837,36 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
43837
43837
  return;
43838
43838
  }
43839
43839
  const pos = await storage.get(posKey);
43840
- if (pos && Number.isFinite(pos.left) && Number.isFinite(pos.top) && mode.value === "floating") {
43841
- floatingPos.value = clampPos(pos);
43840
+ if (!pos || typeof pos !== "object") {
43841
+ if (mode.value === "floating") initFloatingPos();
43842
+ return;
43843
+ }
43844
+ if ("mode" in pos && pos.mode === "drawer") {
43845
+ if (pos.side === "left" || pos.side === "right") {
43846
+ drawerSide.value = pos.side;
43847
+ if (modePropExplicit && mode.value === "floating") {
43848
+ initFloatingPos();
43849
+ return;
43850
+ }
43851
+ }
43852
+ if (!modePropExplicit) mode.value = "drawer";
43853
+ } else if ("left" in pos && Number.isFinite(pos.left) && Number.isFinite(pos.top)) {
43854
+ if (modePropExplicit && mode.value === "drawer") return;
43855
+ mode.value = "floating";
43856
+ floatingPos.value = clampPos({ left: pos.left, top: pos.top });
43857
+ void persistPosition();
43842
43858
  } else if (mode.value === "floating") {
43843
43859
  initFloatingPos();
43844
43860
  }
43845
43861
  });
43846
43862
  async function persistPosition() {
43847
43863
  const key = resolvePositionKey();
43848
- if (!key || mode.value !== "floating" || !floatingPos.value) return;
43849
- await storage.set(key, { ...floatingPos.value });
43864
+ if (!key) return;
43865
+ if (mode.value === "drawer") {
43866
+ await storage.set(key, { mode: "drawer", side: drawerSide.value });
43867
+ } else if (floatingPos.value) {
43868
+ await storage.set(key, { mode: "floating", ...floatingPos.value });
43869
+ }
43850
43870
  }
43851
43871
  async function persistWidth() {
43852
43872
  const key = resolveWidthKey();
@@ -43875,12 +43895,14 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
43875
43895
  window.innerHeight - props.offsetTop - props.offsetBottom - 80
43876
43896
  );
43877
43897
  }
43878
- const mode = ref(props.mode);
43898
+ const mode = ref(props.mode ?? "drawer");
43899
+ let modePropExplicit = props.mode !== void 0;
43879
43900
  const drawerSide = ref(props.position);
43880
43901
  watch(
43881
43902
  () => props.position,
43882
43903
  (p) => {
43883
43904
  drawerSide.value = p;
43905
+ if (mode.value === "drawer") void persistPosition();
43884
43906
  }
43885
43907
  );
43886
43908
  const isMaximized = ref(false);
@@ -43903,14 +43925,17 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
43903
43925
  mode.value = "drawer";
43904
43926
  floatingPos.value = null;
43905
43927
  }
43928
+ void persistPosition();
43906
43929
  }
43907
43930
  watch(
43908
43931
  () => props.mode,
43909
43932
  (m) => {
43910
- if (m === mode.value) return;
43933
+ if (m === void 0 || m === mode.value) return;
43934
+ modePropExplicit = true;
43911
43935
  mode.value = m;
43912
43936
  if (m === "floating") initFloatingPos();
43913
43937
  else floatingPos.value = null;
43938
+ void persistPosition();
43914
43939
  }
43915
43940
  );
43916
43941
  const panelStyle = computed(() => {
@@ -44060,9 +44085,8 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
44060
44085
  mode.value = "drawer";
44061
44086
  drawerSide.value = snapHint.value;
44062
44087
  floatingPos.value = null;
44063
- } else {
44064
- void persistPosition();
44065
44088
  }
44089
+ void persistPosition();
44066
44090
  isDragging.value = false;
44067
44091
  dragStartPos = null;
44068
44092
  drawerDragActive = false;
@@ -44071,10 +44095,31 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
44071
44095
  document.removeEventListener("mousemove", onDragMove);
44072
44096
  document.removeEventListener("mouseup", onDragEnd);
44073
44097
  }
44098
+ let widgetResizeRaf = 0;
44099
+ function onWindowResize() {
44100
+ if (widgetResizeRaf) return;
44101
+ widgetResizeRaf = requestAnimationFrame(() => {
44102
+ widgetResizeRaf = 0;
44103
+ if (mode.value !== "floating" || !floatingPos.value) return;
44104
+ const clamped = clampPos(floatingPos.value);
44105
+ floatingPos.value = clamped;
44106
+ void persistPosition();
44107
+ });
44108
+ }
44109
+ watchEffect((onCleanup) => {
44110
+ if (mode.value !== "floating") return;
44111
+ window.addEventListener("resize", onWindowResize, { passive: true });
44112
+ onCleanup(() => {
44113
+ window.removeEventListener("resize", onWindowResize);
44114
+ if (widgetResizeRaf) cancelAnimationFrame(widgetResizeRaf);
44115
+ widgetResizeRaf = 0;
44116
+ });
44117
+ });
44074
44118
  onBeforeUnmount(() => {
44075
44119
  onResizeEnd();
44076
44120
  onDragEnd();
44077
44121
  clearSnap();
44122
+ if (widgetResizeRaf) cancelAnimationFrame(widgetResizeRaf);
44078
44123
  });
44079
44124
  function open() {
44080
44125
  emit("update:modelValue", true);
@@ -44445,6 +44490,7 @@ const _hoisted_1 = { class: "fv-ai-launcher-icon" };
44445
44490
  const _hoisted_2 = ["innerHTML"];
44446
44491
  const _hoisted_3 = ["src"];
44447
44492
  const DRAG_THRESHOLD = 4;
44493
+ const SNAP_RADIUS = 96;
44448
44494
  const EYE_MAX_DXY = 6;
44449
44495
  const EYE_TRACK_RANGE = 6;
44450
44496
  var _sfc_main = /* @__PURE__ */ defineComponent({
@@ -44501,7 +44547,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
44501
44547
  origTop: 0,
44502
44548
  moved: false
44503
44549
  };
44504
- const dragPos = ref(null);
44550
+ const posMode = ref("corner");
44551
+ const activePlacement = ref(resolvedPlacement.value);
44552
+ const freePos = ref(null);
44553
+ const isSnapping = ref(false);
44505
44554
  const storage = createLocalStorageAdapter();
44506
44555
  function resolvePositionKey() {
44507
44556
  if (!props.storageKey || !props.rememberPosition) return null;
@@ -44514,19 +44563,91 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
44514
44563
  top: Math.min(Math.max(pos.top, 0), Math.max(0, window.innerHeight - size))
44515
44564
  };
44516
44565
  }
44566
+ function cornerAnchor(placement) {
44567
+ const size = props.size;
44568
+ const ox = resolvedOffsetX.value;
44569
+ const oy = resolvedOffsetY.value;
44570
+ const iw = window.innerWidth;
44571
+ const ih = window.innerHeight;
44572
+ switch (placement) {
44573
+ case "top-left":
44574
+ return { left: ox + size / 2, top: oy + size / 2 };
44575
+ case "top-right":
44576
+ return { left: iw - ox - size / 2, top: oy + size / 2 };
44577
+ case "bottom-left":
44578
+ return { left: ox + size / 2, top: ih - oy - size / 2 };
44579
+ case "bottom-right":
44580
+ return { left: iw - ox - size / 2, top: ih - oy - size / 2 };
44581
+ }
44582
+ }
44583
+ function detectCornerSnap(pos) {
44584
+ const center = { left: pos.left + props.size / 2, top: pos.top + props.size / 2 };
44585
+ const corners = ["top-left", "top-right", "bottom-left", "bottom-right"];
44586
+ let best = null;
44587
+ let bestDist = SNAP_RADIUS;
44588
+ for (const c of corners) {
44589
+ const anchor = cornerAnchor(c);
44590
+ const dist = Math.hypot(center.left - anchor.left, center.top - anchor.top);
44591
+ if (dist < bestDist) {
44592
+ bestDist = dist;
44593
+ best = c;
44594
+ }
44595
+ }
44596
+ return best;
44597
+ }
44598
+ function snapToCorner(placement) {
44599
+ if (isSnapping.value) return;
44600
+ isSnapping.value = true;
44601
+ const anchor = cornerAnchor(placement);
44602
+ const size = props.size;
44603
+ freePos.value = {
44604
+ left: anchor.left - size / 2,
44605
+ top: anchor.top - size / 2
44606
+ };
44607
+ activePlacement.value = placement;
44608
+ const el = rootEl.value;
44609
+ if (!el) {
44610
+ isSnapping.value = false;
44611
+ posMode.value = "corner";
44612
+ freePos.value = null;
44613
+ return;
44614
+ }
44615
+ let settled = false;
44616
+ const settle = () => {
44617
+ if (settled) return;
44618
+ settled = true;
44619
+ isSnapping.value = false;
44620
+ posMode.value = "corner";
44621
+ freePos.value = null;
44622
+ void persistPosition();
44623
+ };
44624
+ el.addEventListener("transitionend", settle, { once: true });
44625
+ setTimeout(settle, 350);
44626
+ }
44627
+ async function persistPosition() {
44628
+ const key = resolvePositionKey();
44629
+ if (!key) return;
44630
+ if (posMode.value === "corner") {
44631
+ await storage.set(key, { mode: "corner", placement: activePlacement.value });
44632
+ } else if (freePos.value) {
44633
+ await storage.set(key, { mode: "free", ...freePos.value });
44634
+ }
44635
+ }
44517
44636
  onMounted(async () => {
44518
44637
  const key = resolvePositionKey();
44519
44638
  if (!key || !dragEnabled.value) return;
44520
- const pos = await storage.get(key);
44521
- if (pos && Number.isFinite(pos.left) && Number.isFinite(pos.top)) {
44522
- dragPos.value = clampPos(pos);
44639
+ const raw = await storage.get(key);
44640
+ if (!raw) return;
44641
+ if ("mode" in raw && raw.mode === "corner") {
44642
+ if (raw.placement && ["top-left", "top-right", "bottom-left", "bottom-right"].includes(raw.placement)) {
44643
+ activePlacement.value = raw.placement;
44644
+ }
44645
+ } else if ("left" in raw && Number.isFinite(raw.left) && Number.isFinite(raw.top)) {
44646
+ posMode.value = "free";
44647
+ freePos.value = clampPos({ left: raw.left, top: raw.top });
44648
+ void persistPosition();
44523
44649
  }
44524
44650
  });
44525
- async function persistPosition() {
44526
- const key = resolvePositionKey();
44527
- if (!key || !dragPos.value) return;
44528
- await storage.set(key, { ...dragPos.value });
44529
- }
44530
44651
  function onPointerDown(ev) {
44531
44652
  if (!dragEnabled.value || ev.button !== 0) return;
44532
44653
  const el = rootEl.value;
@@ -44549,12 +44670,16 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
44549
44670
  const dy = ev.clientY - dragState.startY;
44550
44671
  if (!dragState.moved && Math.hypot(dx, dy) < DRAG_THRESHOLD) return;
44551
44672
  dragState.moved = true;
44673
+ if (posMode.value === "corner") {
44674
+ posMode.value = "free";
44675
+ freePos.value = { left: dragState.origLeft, top: dragState.origTop };
44676
+ }
44552
44677
  const el = rootEl.value;
44553
44678
  if (!el) return;
44554
44679
  const size = el.offsetWidth || props.size;
44555
44680
  const left = Math.min(Math.max(dragState.origLeft + dx, 0), window.innerWidth - size);
44556
44681
  const top = Math.min(Math.max(dragState.origTop + dy, 0), window.innerHeight - size);
44557
- dragPos.value = { left, top };
44682
+ freePos.value = { left, top };
44558
44683
  }
44559
44684
  function onPointerUp(ev) {
44560
44685
  if (ev.pointerId !== dragState.pointerId) return;
@@ -44566,9 +44691,14 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
44566
44691
  el.removeEventListener("pointercancel", onPointerUp);
44567
44692
  }
44568
44693
  dragState.pointerId = -1;
44569
- if (dragState.moved && dragPos.value) {
44570
- emit("drag-end", { ...dragPos.value });
44571
- void persistPosition();
44694
+ if (dragState.moved && freePos.value) {
44695
+ emit("drag-end", { ...freePos.value });
44696
+ const snapped = detectCornerSnap(freePos.value);
44697
+ if (snapped) {
44698
+ snapToCorner(snapped);
44699
+ } else {
44700
+ void persistPosition();
44701
+ }
44572
44702
  }
44573
44703
  }
44574
44704
  onBeforeUnmount(() => {
@@ -44579,6 +44709,34 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
44579
44709
  el.removeEventListener("pointercancel", onPointerUp);
44580
44710
  }
44581
44711
  });
44712
+ let resizeRaf = 0;
44713
+ function onWindowResize() {
44714
+ if (resizeRaf) return;
44715
+ resizeRaf = requestAnimationFrame(() => {
44716
+ resizeRaf = 0;
44717
+ if (posMode.value !== "free" || !freePos.value) return;
44718
+ const clamped = clampPos(freePos.value);
44719
+ freePos.value = clamped;
44720
+ const snapped = detectCornerSnap(clamped);
44721
+ if (snapped) {
44722
+ snapToCorner(snapped);
44723
+ } else {
44724
+ void persistPosition();
44725
+ }
44726
+ });
44727
+ }
44728
+ watchEffect((onCleanup) => {
44729
+ if (posMode.value !== "free" || !dragEnabled.value) return;
44730
+ window.addEventListener("resize", onWindowResize, { passive: true });
44731
+ onCleanup(() => {
44732
+ window.removeEventListener("resize", onWindowResize);
44733
+ if (resizeRaf) cancelAnimationFrame(resizeRaf);
44734
+ resizeRaf = 0;
44735
+ });
44736
+ });
44737
+ onBeforeUnmount(() => {
44738
+ if (resizeRaf) cancelAnimationFrame(resizeRaf);
44739
+ });
44582
44740
  function onClickGuard(ev) {
44583
44741
  if (dragState.moved) {
44584
44742
  dragState.moved = false;
@@ -44649,14 +44807,16 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
44649
44807
  }
44650
44808
  });
44651
44809
  const rootClass = computed(() => [
44652
- ...resolvedPlacement.value.split("-").map((axis) => `is-${axis}`),
44810
+ // 四角模式下角定位类读 activePlacement(记忆/吸附可改);自由模式下无意义,由 is-dragged 抑制
44811
+ ...(posMode.value === "corner" ? activePlacement.value.split("-") : []).map((axis) => `is-${axis}`),
44653
44812
  {
44654
44813
  "is-floating": props.floating,
44655
44814
  "is-interactive": props.interactive,
44656
44815
  // 非交互无激活语义;交互态激活高亮仅视觉
44657
44816
  "is-active": props.interactive && props.modelValue,
44658
44817
  "is-draggable": dragEnabled.value,
44659
- "is-dragged": !!dragPos.value
44818
+ "is-dragged": posMode.value === "free",
44819
+ "is-snapping": isSnapping.value
44660
44820
  }
44661
44821
  ]);
44662
44822
  const rootStyle = computed(() => ({
@@ -44664,7 +44824,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
44664
44824
  "--fv-launcher-offset-x": `${resolvedOffsetX.value}px`,
44665
44825
  "--fv-launcher-offset-y": `${resolvedOffsetY.value}px`,
44666
44826
  ...props.floating && props.zIndex !== void 0 ? { "--fv-launcher-z-index": `${props.zIndex}` } : null,
44667
- ...dragPos.value ? { left: `${dragPos.value.left}px`, top: `${dragPos.value.top}px` } : null
44827
+ ...freePos.value ? { left: `${freePos.value.left}px`, top: `${freePos.value.top}px` } : null
44668
44828
  }));
44669
44829
  return (_ctx, _cache) => {
44670
44830
  return openBlock(), createBlock(resolveDynamicComponent(__props.interactive ? "button" : "span"), {