@glodon-aiot/agent-cli-ui 3.19.0-alpha.27 → 3.19.0-beta.31

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.
Files changed (733) hide show
  1. package/dist/es/index.mjs +8211 -302
  2. package/dist/lib/index.js +16 -326
  3. package/dist/src/utils/reactDomCompat.d.ts +3 -0
  4. package/package.json +10 -13
  5. package/dist/es/AgentClientUI.mjs +0 -150
  6. package/dist/es/Dialog/AgentChat/HistoryItem/FileItem/index.mjs +0 -88
  7. package/dist/es/Dialog/AgentChat/HistoryItem/InputProgress/index.mjs +0 -38
  8. package/dist/es/Dialog/AgentChat/HistoryItem/SearchReference/index.mjs +0 -101
  9. package/dist/es/Dialog/AgentChat/HistoryItem/SessionAction/index.mjs +0 -248
  10. package/dist/es/Dialog/AgentChat/HistoryItem/SessionRefer/ReferItem/index.mjs +0 -86
  11. package/dist/es/Dialog/AgentChat/HistoryItem/SessionRefer/index.mjs +0 -92
  12. package/dist/es/Dialog/AgentChat/HistoryItem/SessionRelated/index.mjs +0 -46
  13. package/dist/es/Dialog/AgentChat/HistoryItem/index.mjs +0 -384
  14. package/dist/es/Dialog/AgentChat/PromptSetting/index.mjs +0 -105
  15. package/dist/es/Dialog/AgentChat/Tools/ConnectToNetwork/index.mjs +0 -92
  16. package/dist/es/Dialog/AgentChat/Tools/PromptManager/PromptList/PromptListItem.mjs +0 -89
  17. package/dist/es/Dialog/AgentChat/Tools/PromptManager/PromptList/PublicPromptList.mjs +0 -47
  18. package/dist/es/Dialog/AgentChat/Tools/PromptManager/PromptList/access/empty.svg.mjs +0 -4
  19. package/dist/es/Dialog/AgentChat/Tools/PromptManager/index.mjs +0 -120
  20. package/dist/es/Dialog/AgentChat/Tools/SessionHistoryDrawer/index.mjs +0 -48
  21. package/dist/es/Dialog/AgentChat/Tools/SessionListDrawer/HistorySessionList/NameEditPanel.mjs +0 -47
  22. package/dist/es/Dialog/AgentChat/Tools/SessionListDrawer/HistorySessionList/SessionItem.mjs +0 -135
  23. package/dist/es/Dialog/AgentChat/Tools/SessionListDrawer/HistorySessionList/index.mjs +0 -119
  24. package/dist/es/Dialog/AgentChat/Tools/SessionListDrawer/index.mjs +0 -44
  25. package/dist/es/Dialog/AgentChat/Tools/UploadKnowledgeFiles/ClearModal/index.mjs +0 -50
  26. package/dist/es/Dialog/AgentChat/Tools/UploadKnowledgeFiles/FileCard/index.mjs +0 -128
  27. package/dist/es/Dialog/AgentChat/Tools/UploadKnowledgeFiles/index.mjs +0 -374
  28. package/dist/es/Dialog/AgentChat/index.mjs +0 -1147
  29. package/dist/es/Dialog/SessionList/index.mjs +0 -401
  30. package/dist/es/Dialog/UploadingPrompt/index.mjs +0 -64
  31. package/dist/es/Dialog/index.mjs +0 -180
  32. package/dist/es/Footer/FooterWarning.mjs +0 -24
  33. package/dist/es/Footer/index.mjs +0 -17
  34. package/dist/es/QuillEditor/index.mjs +0 -278
  35. package/dist/es/ReactTextGenerationUI/components/TextSiders/index.mjs +0 -406
  36. package/dist/es/ReactTextGenerationUI/components/fetchEventSource/fetch.mjs +0 -112
  37. package/dist/es/ReactTextGenerationUI/components/fetchEventSource/parse.mjs +0 -97
  38. package/dist/es/ReactTextGenerationUI/index.mjs +0 -81
  39. package/dist/es/_virtual/_commonjsHelpers.mjs +0 -8
  40. package/dist/es/_virtual/index.mjs +0 -4
  41. package/dist/es/_virtual/index2.mjs +0 -4
  42. package/dist/es/_virtual/index3.mjs +0 -4
  43. package/dist/es/_virtual/lib.mjs +0 -4
  44. package/dist/es/_virtual/prism-core.mjs +0 -4
  45. package/dist/es/_virtual/types.mjs +0 -4
  46. package/dist/es/_virtual/ua-parser.min.mjs +0 -4
  47. package/dist/es/_virtual/utilities.mjs +0 -4
  48. package/dist/es/assets/brand.svg.mjs +0 -4
  49. package/dist/es/assets/doc-icons/doc.svg.mjs +0 -4
  50. package/dist/es/assets/doc-icons/docx.svg.mjs +0 -4
  51. package/dist/es/assets/doc-icons/pdf.svg.mjs +0 -4
  52. package/dist/es/assets/icon.svg.mjs +0 -4
  53. package/dist/es/assets/think.svg.mjs +0 -4
  54. package/dist/es/components/FilePreview/index.mjs +0 -83
  55. package/dist/es/components/Greeting/index.mjs +0 -30
  56. package/dist/es/components/Iconfont/index.mjs +0 -12
  57. package/dist/es/components/JsonDisplay/index.mjs +0 -15
  58. package/dist/es/components/KnowledgeList/KnowledgeSelect/index.mjs +0 -67
  59. package/dist/es/components/KnowledgeList/index.mjs +0 -79
  60. package/dist/es/components/Recommend/RecommendItem.mjs +0 -97
  61. package/dist/es/components/Recommend/index.mjs +0 -76
  62. package/dist/es/components/Recommend/tip.svg.mjs +0 -4
  63. package/dist/es/components/Sider/index.mjs +0 -24
  64. package/dist/es/components/WebLink/index.mjs +0 -26
  65. package/dist/es/constant.mjs +0 -124
  66. package/dist/es/context/SessionContext.mjs +0 -26
  67. package/dist/es/context.mjs +0 -7
  68. package/dist/es/hooks/useSessionState.mjs +0 -6
  69. package/dist/es/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.mjs +0 -9
  70. package/dist/es/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.mjs +0 -8
  71. package/dist/es/node_modules/@babel/runtime/helpers/esm/defineProperty.mjs +0 -12
  72. package/dist/es/node_modules/@babel/runtime/helpers/esm/extends.mjs +0 -13
  73. package/dist/es/node_modules/@babel/runtime/helpers/esm/iterableToArray.mjs +0 -7
  74. package/dist/es/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.mjs +0 -7
  75. package/dist/es/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.mjs +0 -15
  76. package/dist/es/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.mjs +0 -15
  77. package/dist/es/node_modules/@babel/runtime/helpers/esm/toConsumableArray.mjs +0 -10
  78. package/dist/es/node_modules/@babel/runtime/helpers/esm/toPrimitive.mjs +0 -16
  79. package/dist/es/node_modules/@babel/runtime/helpers/esm/toPropertyKey.mjs +0 -9
  80. package/dist/es/node_modules/@babel/runtime/helpers/esm/typeof.mjs +0 -11
  81. package/dist/es/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.mjs +0 -12
  82. package/dist/es/node_modules/@react-spring/animated/dist/react-spring-animated.esm.mjs +0 -201
  83. package/dist/es/node_modules/@react-spring/core/dist/react-spring-core.esm.mjs +0 -1087
  84. package/dist/es/node_modules/@react-spring/rafz/dist/react-spring-rafz.esm.mjs +0 -104
  85. package/dist/es/node_modules/@react-spring/shared/dist/react-spring-shared.esm.mjs +0 -568
  86. package/dist/es/node_modules/@react-spring/web/dist/react-spring-web.esm.mjs +0 -158
  87. package/dist/es/node_modules/@ungap/structured-clone/esm/deserialize.mjs +0 -70
  88. package/dist/es/node_modules/@ungap/structured-clone/esm/index.mjs +0 -11
  89. package/dist/es/node_modules/@ungap/structured-clone/esm/serialize.mjs +0 -124
  90. package/dist/es/node_modules/@ungap/structured-clone/esm/types.mjs +0 -13
  91. package/dist/es/node_modules/@use-gesture/core/dist/actions-fe213e88.esm.mjs +0 -847
  92. package/dist/es/node_modules/@use-gesture/core/dist/maths-0ab39ae9.esm.mjs +0 -35
  93. package/dist/es/node_modules/@use-gesture/core/dist/use-gesture-core.esm.mjs +0 -226
  94. package/dist/es/node_modules/@use-gesture/react/dist/use-gesture-react.esm.mjs +0 -33
  95. package/dist/es/node_modules/antd-mobile/es/components/config-provider/config-provider.mjs +0 -20
  96. package/dist/es/node_modules/antd-mobile/es/components/image-viewer/image-viewer.mjs +0 -76
  97. package/dist/es/node_modules/antd-mobile/es/components/image-viewer/index.mjs +0 -13
  98. package/dist/es/node_modules/antd-mobile/es/components/image-viewer/methods.mjs +0 -34
  99. package/dist/es/node_modules/antd-mobile/es/components/image-viewer/slide.mjs +0 -178
  100. package/dist/es/node_modules/antd-mobile/es/components/image-viewer/slides.mjs +0 -83
  101. package/dist/es/node_modules/antd-mobile/es/components/mask/index.mjs +0 -4
  102. package/dist/es/node_modules/antd-mobile/es/components/mask/mask.mjs +0 -84
  103. package/dist/es/node_modules/antd-mobile/es/components/safe-area/index.mjs +0 -4
  104. package/dist/es/node_modules/antd-mobile/es/components/safe-area/safe-area.mjs +0 -9
  105. package/dist/es/node_modules/antd-mobile/es/global/index.mjs +0 -3
  106. package/dist/es/node_modules/antd-mobile/es/locales/zh-CN.mjs +0 -141
  107. package/dist/es/node_modules/antd-mobile/es/utils/attach-properties-to-component.mjs +0 -9
  108. package/dist/es/node_modules/antd-mobile/es/utils/bound.mjs +0 -7
  109. package/dist/es/node_modules/antd-mobile/es/utils/can-use-dom.mjs +0 -4
  110. package/dist/es/node_modules/antd-mobile/es/utils/convert-px.mjs +0 -9
  111. package/dist/es/node_modules/antd-mobile/es/utils/get-container.mjs +0 -6
  112. package/dist/es/node_modules/antd-mobile/es/utils/get-scroll-parent.mjs +0 -22
  113. package/dist/es/node_modules/antd-mobile/es/utils/matrix.mjs +0 -11
  114. package/dist/es/node_modules/antd-mobile/es/utils/native-props.mjs +0 -12
  115. package/dist/es/node_modules/antd-mobile/es/utils/render-imperatively.mjs +0 -47
  116. package/dist/es/node_modules/antd-mobile/es/utils/render-to-body.mjs +0 -12
  117. package/dist/es/node_modules/antd-mobile/es/utils/render-to-container.mjs +0 -13
  118. package/dist/es/node_modules/antd-mobile/es/utils/render.mjs +0 -52
  119. package/dist/es/node_modules/antd-mobile/es/utils/rubberband.mjs +0 -11
  120. package/dist/es/node_modules/antd-mobile/es/utils/should-render.mjs +0 -10
  121. package/dist/es/node_modules/antd-mobile/es/utils/supports-passive.mjs +0 -15
  122. package/dist/es/node_modules/antd-mobile/es/utils/use-drag-and-pinch.mjs +0 -6
  123. package/dist/es/node_modules/antd-mobile/es/utils/use-initialized.mjs +0 -8
  124. package/dist/es/node_modules/antd-mobile/es/utils/use-lock-scroll.mjs +0 -54
  125. package/dist/es/node_modules/antd-mobile/es/utils/use-touch.mjs +0 -32
  126. package/dist/es/node_modules/antd-mobile/es/utils/with-default-props.mjs +0 -11
  127. package/dist/es/node_modules/antd-mobile/es/utils/with-stop-propagation.mjs +0 -19
  128. package/dist/es/node_modules/ccount/index.mjs +0 -12
  129. package/dist/es/node_modules/character-reference-invalid/index.json.mjs +0 -33
  130. package/dist/es/node_modules/comma-separated-tokens/index.mjs +0 -18
  131. package/dist/es/node_modules/decode-named-character-reference/index.dom.mjs +0 -14
  132. package/dist/es/node_modules/devlop/lib/default.mjs +0 -8
  133. package/dist/es/node_modules/estree-util-is-identifier-name/lib/index.mjs +0 -7
  134. package/dist/es/node_modules/extend/index.mjs +0 -46
  135. package/dist/es/node_modules/hast-util-from-dom/lib/index.mjs +0 -93
  136. package/dist/es/node_modules/hast-util-from-dom/node_modules/web-namespaces/index.mjs +0 -11
  137. package/dist/es/node_modules/hast-util-from-html-isomorphic/lib/browser.mjs +0 -16
  138. package/dist/es/node_modules/hast-util-is-element/lib/index.mjs +0 -61
  139. package/dist/es/node_modules/hast-util-parse-selector/index.mjs +0 -14
  140. package/dist/es/node_modules/hast-util-to-jsx-runtime/lib/index.mjs +0 -298
  141. package/dist/es/node_modules/hast-util-to-jsx-runtime/node_modules/property-information/index.mjs +0 -12
  142. package/dist/es/node_modules/hast-util-to-jsx-runtime/node_modules/property-information/lib/aria.mjs +0 -61
  143. package/dist/es/node_modules/hast-util-to-jsx-runtime/node_modules/property-information/lib/find.mjs +0 -33
  144. package/dist/es/node_modules/hast-util-to-jsx-runtime/node_modules/property-information/lib/hast-to-react.mjs +0 -22
  145. package/dist/es/node_modules/hast-util-to-jsx-runtime/node_modules/property-information/lib/html.mjs +0 -368
  146. package/dist/es/node_modules/hast-util-to-jsx-runtime/node_modules/property-information/lib/normalize.mjs +0 -6
  147. package/dist/es/node_modules/hast-util-to-jsx-runtime/node_modules/property-information/lib/svg.mjs +0 -566
  148. package/dist/es/node_modules/hast-util-to-jsx-runtime/node_modules/property-information/lib/util/case-insensitive-transform.mjs +0 -7
  149. package/dist/es/node_modules/hast-util-to-jsx-runtime/node_modules/property-information/lib/util/case-sensitive-transform.mjs +0 -6
  150. package/dist/es/node_modules/hast-util-to-jsx-runtime/node_modules/property-information/lib/util/create.mjs +0 -14
  151. package/dist/es/node_modules/hast-util-to-jsx-runtime/node_modules/property-information/lib/util/defined-info.mjs +0 -36
  152. package/dist/es/node_modules/hast-util-to-jsx-runtime/node_modules/property-information/lib/util/info.mjs +0 -28
  153. package/dist/es/node_modules/hast-util-to-jsx-runtime/node_modules/property-information/lib/util/merge.mjs +0 -10
  154. package/dist/es/node_modules/hast-util-to-jsx-runtime/node_modules/property-information/lib/util/schema.mjs +0 -21
  155. package/dist/es/node_modules/hast-util-to-jsx-runtime/node_modules/property-information/lib/util/types.mjs +0 -15
  156. package/dist/es/node_modules/hast-util-to-jsx-runtime/node_modules/property-information/lib/xlink.mjs +0 -19
  157. package/dist/es/node_modules/hast-util-to-jsx-runtime/node_modules/property-information/lib/xml.mjs +0 -15
  158. package/dist/es/node_modules/hast-util-to-jsx-runtime/node_modules/property-information/lib/xmlns.mjs +0 -16
  159. package/dist/es/node_modules/hast-util-to-text/lib/index.mjs +0 -223
  160. package/dist/es/node_modules/hast-util-whitespace/lib/index.mjs +0 -10
  161. package/dist/es/node_modules/hastscript/lib/create-h.mjs +0 -126
  162. package/dist/es/node_modules/hastscript/lib/index.mjs +0 -8
  163. package/dist/es/node_modules/hastscript/lib/svg-case-sensitive-tag-names.mjs +0 -4
  164. package/dist/es/node_modules/hastscript/node_modules/hast-util-parse-selector/lib/index.mjs +0 -20
  165. package/dist/es/node_modules/hastscript/node_modules/property-information/index.mjs +0 -12
  166. package/dist/es/node_modules/hastscript/node_modules/property-information/lib/aria.mjs +0 -61
  167. package/dist/es/node_modules/hastscript/node_modules/property-information/lib/find.mjs +0 -33
  168. package/dist/es/node_modules/hastscript/node_modules/property-information/lib/html.mjs +0 -368
  169. package/dist/es/node_modules/hastscript/node_modules/property-information/lib/normalize.mjs +0 -6
  170. package/dist/es/node_modules/hastscript/node_modules/property-information/lib/svg.mjs +0 -566
  171. package/dist/es/node_modules/hastscript/node_modules/property-information/lib/util/case-insensitive-transform.mjs +0 -7
  172. package/dist/es/node_modules/hastscript/node_modules/property-information/lib/util/case-sensitive-transform.mjs +0 -6
  173. package/dist/es/node_modules/hastscript/node_modules/property-information/lib/util/create.mjs +0 -14
  174. package/dist/es/node_modules/hastscript/node_modules/property-information/lib/util/defined-info.mjs +0 -36
  175. package/dist/es/node_modules/hastscript/node_modules/property-information/lib/util/info.mjs +0 -28
  176. package/dist/es/node_modules/hastscript/node_modules/property-information/lib/util/merge.mjs +0 -10
  177. package/dist/es/node_modules/hastscript/node_modules/property-information/lib/util/schema.mjs +0 -21
  178. package/dist/es/node_modules/hastscript/node_modules/property-information/lib/util/types.mjs +0 -15
  179. package/dist/es/node_modules/hastscript/node_modules/property-information/lib/xlink.mjs +0 -19
  180. package/dist/es/node_modules/hastscript/node_modules/property-information/lib/xml.mjs +0 -15
  181. package/dist/es/node_modules/hastscript/node_modules/property-information/lib/xmlns.mjs +0 -16
  182. package/dist/es/node_modules/html-url-attributes/lib/index.mjs +0 -16
  183. package/dist/es/node_modules/is-alphabetical/index.mjs +0 -8
  184. package/dist/es/node_modules/is-alphanumerical/index.mjs +0 -9
  185. package/dist/es/node_modules/is-decimal/index.mjs +0 -8
  186. package/dist/es/node_modules/is-hexadecimal/index.mjs +0 -8
  187. package/dist/es/node_modules/katex/dist/katex.mjs +0 -11700
  188. package/dist/es/node_modules/longest-streak/index.mjs +0 -12
  189. package/dist/es/node_modules/markdown-table/index.mjs +0 -70
  190. package/dist/es/node_modules/mdast-util-find-and-replace/lib/index.mjs +0 -72
  191. package/dist/es/node_modules/mdast-util-find-and-replace/node_modules/escape-string-regexp/index.mjs +0 -8
  192. package/dist/es/node_modules/mdast-util-from-markdown/lib/index.mjs +0 -584
  193. package/dist/es/node_modules/mdast-util-gfm/lib/index.mjs +0 -17
  194. package/dist/es/node_modules/mdast-util-gfm-autolink-literal/lib/index.mjs +0 -136
  195. package/dist/es/node_modules/mdast-util-gfm-footnote/lib/index.mjs +0 -100
  196. package/dist/es/node_modules/mdast-util-gfm-strikethrough/lib/index.mjs +0 -61
  197. package/dist/es/node_modules/mdast-util-gfm-table/lib/index.mjs +0 -170
  198. package/dist/es/node_modules/mdast-util-gfm-task-list-item/lib/index.mjs +0 -72
  199. package/dist/es/node_modules/mdast-util-math/lib/index.mjs +0 -170
  200. package/dist/es/node_modules/mdast-util-phrasing/lib/index.mjs +0 -30
  201. package/dist/es/node_modules/mdast-util-to-hast/lib/footer.mjs +0 -123
  202. package/dist/es/node_modules/mdast-util-to-hast/lib/handlers/blockquote.mjs +0 -12
  203. package/dist/es/node_modules/mdast-util-to-hast/lib/handlers/break.mjs +0 -16
  204. package/dist/es/node_modules/mdast-util-to-hast/lib/handlers/code.mjs +0 -25
  205. package/dist/es/node_modules/mdast-util-to-hast/lib/handlers/delete.mjs +0 -12
  206. package/dist/es/node_modules/mdast-util-to-hast/lib/handlers/emphasis.mjs +0 -12
  207. package/dist/es/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.mjs +0 -31
  208. package/dist/es/node_modules/mdast-util-to-hast/lib/handlers/heading.mjs +0 -12
  209. package/dist/es/node_modules/mdast-util-to-hast/lib/handlers/html.mjs +0 -12
  210. package/dist/es/node_modules/mdast-util-to-hast/lib/handlers/image-reference.mjs +0 -22
  211. package/dist/es/node_modules/mdast-util-to-hast/lib/handlers/image.mjs +0 -17
  212. package/dist/es/node_modules/mdast-util-to-hast/lib/handlers/index.mjs +0 -58
  213. package/dist/es/node_modules/mdast-util-to-hast/lib/handlers/inline-code.mjs +0 -17
  214. package/dist/es/node_modules/mdast-util-to-hast/lib/handlers/link-reference.mjs +0 -21
  215. package/dist/es/node_modules/mdast-util-to-hast/lib/handlers/link.mjs +0 -17
  216. package/dist/es/node_modules/mdast-util-to-hast/lib/handlers/list-item.mjs +0 -65
  217. package/dist/es/node_modules/mdast-util-to-hast/lib/handlers/list.mjs +0 -21
  218. package/dist/es/node_modules/mdast-util-to-hast/lib/handlers/paragraph.mjs +0 -12
  219. package/dist/es/node_modules/mdast-util-to-hast/lib/handlers/root.mjs +0 -10
  220. package/dist/es/node_modules/mdast-util-to-hast/lib/handlers/strong.mjs +0 -12
  221. package/dist/es/node_modules/mdast-util-to-hast/lib/handlers/table-cell.mjs +0 -13
  222. package/dist/es/node_modules/mdast-util-to-hast/lib/handlers/table-row.mjs +0 -26
  223. package/dist/es/node_modules/mdast-util-to-hast/lib/handlers/table.mjs +0 -35
  224. package/dist/es/node_modules/mdast-util-to-hast/lib/handlers/text.mjs +0 -11
  225. package/dist/es/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.mjs +0 -12
  226. package/dist/es/node_modules/mdast-util-to-hast/lib/index.mjs +0 -19
  227. package/dist/es/node_modules/mdast-util-to-hast/lib/revert.mjs +0 -22
  228. package/dist/es/node_modules/mdast-util-to-hast/lib/state.mjs +0 -145
  229. package/dist/es/node_modules/mdast-util-to-hast/node_modules/unist-util-visit/lib/index.mjs +0 -16
  230. package/dist/es/node_modules/mdast-util-to-markdown/lib/handle/blockquote.mjs +0 -12
  231. package/dist/es/node_modules/mdast-util-to-markdown/lib/handle/break.mjs +0 -13
  232. package/dist/es/node_modules/mdast-util-to-markdown/lib/handle/code.mjs +0 -49
  233. package/dist/es/node_modules/mdast-util-to-markdown/lib/handle/definition.mjs +0 -37
  234. package/dist/es/node_modules/mdast-util-to-markdown/lib/handle/emphasis.mjs +0 -37
  235. package/dist/es/node_modules/mdast-util-to-markdown/lib/handle/heading.mjs +0 -44
  236. package/dist/es/node_modules/mdast-util-to-markdown/lib/handle/html.mjs +0 -10
  237. package/dist/es/node_modules/mdast-util-to-markdown/lib/handle/image-reference.mjs +0 -36
  238. package/dist/es/node_modules/mdast-util-to-markdown/lib/handle/image.mjs +0 -40
  239. package/dist/es/node_modules/mdast-util-to-markdown/lib/handle/index.mjs +0 -44
  240. package/dist/es/node_modules/mdast-util-to-markdown/lib/handle/inline-code.mjs +0 -22
  241. package/dist/es/node_modules/mdast-util-to-markdown/lib/handle/link-reference.mjs +0 -36
  242. package/dist/es/node_modules/mdast-util-to-markdown/lib/handle/link.mjs +0 -50
  243. package/dist/es/node_modules/mdast-util-to-markdown/lib/handle/list-item.mjs +0 -19
  244. package/dist/es/node_modules/mdast-util-to-markdown/lib/handle/list.mjs +0 -35
  245. package/dist/es/node_modules/mdast-util-to-markdown/lib/handle/paragraph.mjs +0 -7
  246. package/dist/es/node_modules/mdast-util-to-markdown/lib/handle/root.mjs +0 -9
  247. package/dist/es/node_modules/mdast-util-to-markdown/lib/handle/strong.mjs +0 -37
  248. package/dist/es/node_modules/mdast-util-to-markdown/lib/handle/text.mjs +0 -6
  249. package/dist/es/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.mjs +0 -9
  250. package/dist/es/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.mjs +0 -9
  251. package/dist/es/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.mjs +0 -14
  252. package/dist/es/node_modules/mdast-util-to-markdown/lib/util/check-bullet.mjs +0 -9
  253. package/dist/es/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.mjs +0 -9
  254. package/dist/es/node_modules/mdast-util-to-markdown/lib/util/check-fence.mjs +0 -9
  255. package/dist/es/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.mjs +0 -9
  256. package/dist/es/node_modules/mdast-util-to-markdown/lib/util/check-quote.mjs +0 -9
  257. package/dist/es/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.mjs +0 -9
  258. package/dist/es/node_modules/mdast-util-to-markdown/lib/util/check-rule.mjs +0 -9
  259. package/dist/es/node_modules/mdast-util-to-markdown/lib/util/check-strong.mjs +0 -9
  260. package/dist/es/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.mjs +0 -6
  261. package/dist/es/node_modules/mdast-util-to-markdown/lib/util/encode-info.mjs +0 -67
  262. package/dist/es/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.mjs +0 -9
  263. package/dist/es/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.mjs +0 -13
  264. package/dist/es/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.mjs +0 -15
  265. package/dist/es/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.mjs +0 -15
  266. package/dist/es/node_modules/mdast-util-to-markdown/node_modules/unist-util-visit/lib/index.mjs +0 -16
  267. package/dist/es/node_modules/mdast-util-to-string/lib/index.mjs +0 -29
  268. package/dist/es/node_modules/micromark/lib/constructs.mjs +0 -85
  269. package/dist/es/node_modules/micromark/lib/create-tokenizer.mjs +0 -225
  270. package/dist/es/node_modules/micromark/lib/initialize/content.mjs +0 -37
  271. package/dist/es/node_modules/micromark/lib/initialize/document.mjs +0 -133
  272. package/dist/es/node_modules/micromark/lib/initialize/flow.mjs +0 -33
  273. package/dist/es/node_modules/micromark/lib/initialize/text.mjs +0 -103
  274. package/dist/es/node_modules/micromark/lib/parse.mjs +0 -32
  275. package/dist/es/node_modules/micromark/lib/postprocess.mjs +0 -9
  276. package/dist/es/node_modules/micromark/lib/preprocess.mjs +0 -40
  277. package/dist/es/node_modules/micromark-core-commonmark/lib/attention.mjs +0 -74
  278. package/dist/es/node_modules/micromark-core-commonmark/lib/autolink.mjs +0 -43
  279. package/dist/es/node_modules/micromark-core-commonmark/lib/blank-line.mjs +0 -18
  280. package/dist/es/node_modules/micromark-core-commonmark/lib/block-quote.mjs +0 -42
  281. package/dist/es/node_modules/micromark-core-commonmark/lib/character-escape.mjs +0 -17
  282. package/dist/es/node_modules/micromark-core-commonmark/lib/character-reference.mjs +0 -30
  283. package/dist/es/node_modules/micromark-core-commonmark/lib/code-fenced.mjs +0 -94
  284. package/dist/es/node_modules/micromark-core-commonmark/lib/code-indented.mjs +0 -43
  285. package/dist/es/node_modules/micromark-core-commonmark/lib/code-text.mjs +0 -45
  286. package/dist/es/node_modules/micromark-core-commonmark/lib/content.mjs +0 -50
  287. package/dist/es/node_modules/micromark-core-commonmark/lib/definition.mjs +0 -80
  288. package/dist/es/node_modules/micromark-core-commonmark/lib/hard-break-escape.mjs +0 -17
  289. package/dist/es/node_modules/micromark-core-commonmark/lib/heading-atx.mjs +0 -46
  290. package/dist/es/node_modules/micromark-core-commonmark/lib/html-flow.mjs +0 -144
  291. package/dist/es/node_modules/micromark-core-commonmark/lib/html-text.mjs +0 -102
  292. package/dist/es/node_modules/micromark-core-commonmark/lib/label-end.mjs +0 -152
  293. package/dist/es/node_modules/micromark-core-commonmark/lib/label-start-image.mjs +0 -22
  294. package/dist/es/node_modules/micromark-core-commonmark/lib/label-start-link.mjs +0 -19
  295. package/dist/es/node_modules/micromark-core-commonmark/lib/line-ending.mjs +0 -14
  296. package/dist/es/node_modules/micromark-core-commonmark/lib/list.mjs +0 -90
  297. package/dist/es/node_modules/micromark-core-commonmark/lib/setext-underline.mjs +0 -62
  298. package/dist/es/node_modules/micromark-core-commonmark/lib/thematic-break.mjs +0 -25
  299. package/dist/es/node_modules/micromark-extension-gfm/index.mjs +0 -12
  300. package/dist/es/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.mjs +0 -193
  301. package/dist/es/node_modules/micromark-extension-gfm-footnote/lib/syntax.mjs +0 -192
  302. package/dist/es/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.mjs +0 -68
  303. package/dist/es/node_modules/micromark-extension-gfm-table/lib/edit-map.mjs +0 -71
  304. package/dist/es/node_modules/micromark-extension-gfm-table/lib/infer.mjs +0 -24
  305. package/dist/es/node_modules/micromark-extension-gfm-table/lib/syntax.mjs +0 -147
  306. package/dist/es/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.mjs +0 -45
  307. package/dist/es/node_modules/micromark-extension-math/lib/math-flow.mjs +0 -76
  308. package/dist/es/node_modules/micromark-extension-math/lib/math-text.mjs +0 -48
  309. package/dist/es/node_modules/micromark-extension-math/lib/syntax.mjs +0 -15
  310. package/dist/es/node_modules/micromark-factory-destination/index.mjs +0 -31
  311. package/dist/es/node_modules/micromark-factory-label/index.mjs +0 -28
  312. package/dist/es/node_modules/micromark-factory-space/index.mjs +0 -15
  313. package/dist/es/node_modules/micromark-factory-title/index.mjs +0 -26
  314. package/dist/es/node_modules/micromark-factory-whitespace/index.mjs +0 -12
  315. package/dist/es/node_modules/micromark-util-character/index.mjs +0 -39
  316. package/dist/es/node_modules/micromark-util-chunked/index.mjs +0 -16
  317. package/dist/es/node_modules/micromark-util-classify-character/index.mjs +0 -10
  318. package/dist/es/node_modules/micromark-util-combine-extensions/index.mjs +0 -36
  319. package/dist/es/node_modules/micromark-util-decode-numeric-character-reference/index.mjs +0 -16
  320. package/dist/es/node_modules/micromark-util-decode-string/index.mjs +0 -18
  321. package/dist/es/node_modules/micromark-util-html-tag-name/index.mjs +0 -5
  322. package/dist/es/node_modules/micromark-util-normalize-identifier/index.mjs +0 -6
  323. package/dist/es/node_modules/micromark-util-resolve-all/index.mjs +0 -12
  324. package/dist/es/node_modules/micromark-util-sanitize-uri/index.mjs +0 -23
  325. package/dist/es/node_modules/micromark-util-subtokenize/index.mjs +0 -65
  326. package/dist/es/node_modules/micromark-util-subtokenize/lib/splice-buffer.mjs +0 -175
  327. package/dist/es/node_modules/moment/dist/moment.mjs +0 -2301
  328. package/dist/es/node_modules/parse-entities/decode-entity.browser.mjs +0 -8
  329. package/dist/es/node_modules/parse-entities/index.mjs +0 -83
  330. package/dist/es/node_modules/parse-entities/node_modules/character-entities-legacy/index.json.mjs +0 -217
  331. package/dist/es/node_modules/property-information/find.mjs +0 -25
  332. package/dist/es/node_modules/property-information/html.mjs +0 -10
  333. package/dist/es/node_modules/property-information/lib/aria.mjs +0 -63
  334. package/dist/es/node_modules/property-information/lib/html.mjs +0 -354
  335. package/dist/es/node_modules/property-information/lib/util/case-insensitive-transform.mjs +0 -8
  336. package/dist/es/node_modules/property-information/lib/util/case-sensitive-transform.mjs +0 -7
  337. package/dist/es/node_modules/property-information/lib/util/create.mjs +0 -13
  338. package/dist/es/node_modules/property-information/lib/util/defined-info.mjs +0 -18
  339. package/dist/es/node_modules/property-information/lib/util/info.mjs +0 -19
  340. package/dist/es/node_modules/property-information/lib/util/merge.mjs +0 -11
  341. package/dist/es/node_modules/property-information/lib/util/schema.mjs +0 -10
  342. package/dist/es/node_modules/property-information/lib/util/types.mjs +0 -15
  343. package/dist/es/node_modules/property-information/lib/xlink.mjs +0 -20
  344. package/dist/es/node_modules/property-information/lib/xml.mjs +0 -16
  345. package/dist/es/node_modules/property-information/lib/xmlns.mjs +0 -16
  346. package/dist/es/node_modules/property-information/normalize.mjs +0 -7
  347. package/dist/es/node_modules/react-device-detect/dist/lib.mjs +0 -723
  348. package/dist/es/node_modules/react-markdown/lib/index.mjs +0 -153
  349. package/dist/es/node_modules/react-markdown/node_modules/remark-parse/lib/index.mjs +0 -29
  350. package/dist/es/node_modules/react-markdown/node_modules/unist-util-visit/lib/index.mjs +0 -16
  351. package/dist/es/node_modules/react-syntax-highlighter/dist/esm/checkForListedLanguage.mjs +0 -7
  352. package/dist/es/node_modules/react-syntax-highlighter/dist/esm/create-element.mjs +0 -101
  353. package/dist/es/node_modules/react-syntax-highlighter/dist/esm/highlight.mjs +0 -283
  354. package/dist/es/node_modules/react-syntax-highlighter/dist/esm/languages/prism/supported-languages.mjs +0 -4
  355. package/dist/es/node_modules/react-syntax-highlighter/dist/esm/prism.mjs +0 -10
  356. package/dist/es/node_modules/react-syntax-highlighter/dist/esm/styles/prism/prism.mjs +0 -195
  357. package/dist/es/node_modules/refractor/core.mjs +0 -111
  358. package/dist/es/node_modules/refractor/index.mjs +0 -553
  359. package/dist/es/node_modules/refractor/lang/abap.mjs +0 -60
  360. package/dist/es/node_modules/refractor/lang/abnf.mjs +0 -63
  361. package/dist/es/node_modules/refractor/lang/actionscript.mjs +0 -22
  362. package/dist/es/node_modules/refractor/lang/ada.mjs +0 -28
  363. package/dist/es/node_modules/refractor/lang/agda.mjs +0 -35
  364. package/dist/es/node_modules/refractor/lang/al.mjs +0 -35
  365. package/dist/es/node_modules/refractor/lang/antlr4.mjs +0 -72
  366. package/dist/es/node_modules/refractor/lang/apacheconf.mjs +0 -59
  367. package/dist/es/node_modules/refractor/lang/apex.mjs +0 -69
  368. package/dist/es/node_modules/refractor/lang/apl.mjs +0 -44
  369. package/dist/es/node_modules/refractor/lang/applescript.mjs +0 -26
  370. package/dist/es/node_modules/refractor/lang/aql.mjs +0 -57
  371. package/dist/es/node_modules/refractor/lang/arduino.mjs +0 -20
  372. package/dist/es/node_modules/refractor/lang/arff.mjs +0 -22
  373. package/dist/es/node_modules/refractor/lang/asciidoc.mjs +0 -208
  374. package/dist/es/node_modules/refractor/lang/asm6502.mjs +0 -41
  375. package/dist/es/node_modules/refractor/lang/asmatmel.mjs +0 -53
  376. package/dist/es/node_modules/refractor/lang/aspnet.mjs +0 -53
  377. package/dist/es/node_modules/refractor/lang/autohotkey.mjs +0 -40
  378. package/dist/es/node_modules/refractor/lang/autoit.mjs +0 -43
  379. package/dist/es/node_modules/refractor/lang/avisynth.mjs +0 -167
  380. package/dist/es/node_modules/refractor/lang/avro-idl.mjs +0 -50
  381. package/dist/es/node_modules/refractor/lang/bash.mjs +0 -206
  382. package/dist/es/node_modules/refractor/lang/basic.mjs +0 -29
  383. package/dist/es/node_modules/refractor/lang/batch.mjs +0 -95
  384. package/dist/es/node_modules/refractor/lang/bbcode.mjs +0 -36
  385. package/dist/es/node_modules/refractor/lang/bicep.mjs +0 -72
  386. package/dist/es/node_modules/refractor/lang/birb.mjs +0 -32
  387. package/dist/es/node_modules/refractor/lang/bison.mjs +0 -52
  388. package/dist/es/node_modules/refractor/lang/bnf.mjs +0 -31
  389. package/dist/es/node_modules/refractor/lang/brainfuck.mjs +0 -32
  390. package/dist/es/node_modules/refractor/lang/brightscript.mjs +0 -55
  391. package/dist/es/node_modules/refractor/lang/bro.mjs +0 -39
  392. package/dist/es/node_modules/refractor/lang/bsl.mjs +0 -77
  393. package/dist/es/node_modules/refractor/lang/c.mjs +0 -78
  394. package/dist/es/node_modules/refractor/lang/cfscript.mjs +0 -44
  395. package/dist/es/node_modules/refractor/lang/chaiscript.mjs +0 -65
  396. package/dist/es/node_modules/refractor/lang/cil.mjs +0 -31
  397. package/dist/es/node_modules/refractor/lang/clike.mjs +0 -36
  398. package/dist/es/node_modules/refractor/lang/clojure.mjs +0 -42
  399. package/dist/es/node_modules/refractor/lang/cmake.mjs +0 -41
  400. package/dist/es/node_modules/refractor/lang/cobol.mjs +0 -58
  401. package/dist/es/node_modules/refractor/lang/coffeescript.mjs +0 -86
  402. package/dist/es/node_modules/refractor/lang/concurnas.mjs +0 -69
  403. package/dist/es/node_modules/refractor/lang/coq.mjs +0 -52
  404. package/dist/es/node_modules/refractor/lang/cpp.mjs +0 -98
  405. package/dist/es/node_modules/refractor/lang/crystal.mjs +0 -63
  406. package/dist/es/node_modules/refractor/lang/csharp.mjs +0 -277
  407. package/dist/es/node_modules/refractor/lang/cshtml.mjs +0 -104
  408. package/dist/es/node_modules/refractor/lang/csp.mjs +0 -61
  409. package/dist/es/node_modules/refractor/lang/css-extras.mjs +0 -109
  410. package/dist/es/node_modules/refractor/lang/css.mjs +0 -63
  411. package/dist/es/node_modules/refractor/lang/csv.mjs +0 -16
  412. package/dist/es/node_modules/refractor/lang/cypher.mjs +0 -44
  413. package/dist/es/node_modules/refractor/lang/d.mjs +0 -77
  414. package/dist/es/node_modules/refractor/lang/dart.mjs +0 -72
  415. package/dist/es/node_modules/refractor/lang/dataweave.mjs +0 -49
  416. package/dist/es/node_modules/refractor/lang/dax.mjs +0 -39
  417. package/dist/es/node_modules/refractor/lang/dhall.mjs +0 -74
  418. package/dist/es/node_modules/refractor/lang/diff.mjs +0 -54
  419. package/dist/es/node_modules/refractor/lang/django.mjs +0 -60
  420. package/dist/es/node_modules/refractor/lang/dns-zone-file.mjs +0 -40
  421. package/dist/es/node_modules/refractor/lang/docker.mjs +0 -83
  422. package/dist/es/node_modules/refractor/lang/dot.mjs +0 -75
  423. package/dist/es/node_modules/refractor/lang/ebnf.mjs +0 -32
  424. package/dist/es/node_modules/refractor/lang/editorconfig.mjs +0 -39
  425. package/dist/es/node_modules/refractor/lang/eiffel.mjs +0 -46
  426. package/dist/es/node_modules/refractor/lang/ejs.mjs +0 -33
  427. package/dist/es/node_modules/refractor/lang/elixir.mjs +0 -100
  428. package/dist/es/node_modules/refractor/lang/elm.mjs +0 -54
  429. package/dist/es/node_modules/refractor/lang/erb.mjs +0 -35
  430. package/dist/es/node_modules/refractor/lang/erlang.mjs +0 -47
  431. package/dist/es/node_modules/refractor/lang/etlua.mjs +0 -33
  432. package/dist/es/node_modules/refractor/lang/excel-formula.mjs +0 -74
  433. package/dist/es/node_modules/refractor/lang/factor.mjs +0 -569
  434. package/dist/es/node_modules/refractor/lang/false.mjs +0 -39
  435. package/dist/es/node_modules/refractor/lang/firestore-security-rules.mjs +0 -43
  436. package/dist/es/node_modules/refractor/lang/flow.mjs +0 -31
  437. package/dist/es/node_modules/refractor/lang/fortran.mjs +0 -49
  438. package/dist/es/node_modules/refractor/lang/fsharp.mjs +0 -76
  439. package/dist/es/node_modules/refractor/lang/ftl.mjs +0 -102
  440. package/dist/es/node_modules/refractor/lang/gap.mjs +0 -57
  441. package/dist/es/node_modules/refractor/lang/gcode.mjs +0 -28
  442. package/dist/es/node_modules/refractor/lang/gdscript.mjs +0 -36
  443. package/dist/es/node_modules/refractor/lang/gedcom.mjs +0 -40
  444. package/dist/es/node_modules/refractor/lang/gherkin.mjs +0 -94
  445. package/dist/es/node_modules/refractor/lang/git.mjs +0 -75
  446. package/dist/es/node_modules/refractor/lang/glsl.mjs +0 -18
  447. package/dist/es/node_modules/refractor/lang/gml.mjs +0 -19
  448. package/dist/es/node_modules/refractor/lang/gn.mjs +0 -55
  449. package/dist/es/node_modules/refractor/lang/go-module.mjs +0 -34
  450. package/dist/es/node_modules/refractor/lang/go.mjs +0 -36
  451. package/dist/es/node_modules/refractor/lang/graphql.mjs +0 -133
  452. package/dist/es/node_modules/refractor/lang/groovy.mjs +0 -58
  453. package/dist/es/node_modules/refractor/lang/haml.mjs +0 -132
  454. package/dist/es/node_modules/refractor/lang/handlebars.mjs +0 -46
  455. package/dist/es/node_modules/refractor/lang/haskell.mjs +0 -76
  456. package/dist/es/node_modules/refractor/lang/haxe.mjs +0 -84
  457. package/dist/es/node_modules/refractor/lang/hcl.mjs +0 -68
  458. package/dist/es/node_modules/refractor/lang/hlsl.mjs +0 -31
  459. package/dist/es/node_modules/refractor/lang/hoon.mjs +0 -26
  460. package/dist/es/node_modules/refractor/lang/hpkp.mjs +0 -20
  461. package/dist/es/node_modules/refractor/lang/hsts.mjs +0 -20
  462. package/dist/es/node_modules/refractor/lang/http.mjs +0 -126
  463. package/dist/es/node_modules/refractor/lang/ichigojam.mjs +0 -25
  464. package/dist/es/node_modules/refractor/lang/icon.mjs +0 -32
  465. package/dist/es/node_modules/refractor/lang/icu-message-format.mjs +0 -136
  466. package/dist/es/node_modules/refractor/lang/idris.mjs +0 -30
  467. package/dist/es/node_modules/refractor/lang/iecst.mjs +0 -38
  468. package/dist/es/node_modules/refractor/lang/ignore.mjs +0 -30
  469. package/dist/es/node_modules/refractor/lang/inform7.mjs +0 -69
  470. package/dist/es/node_modules/refractor/lang/ini.mjs +0 -52
  471. package/dist/es/node_modules/refractor/lang/io.mjs +0 -34
  472. package/dist/es/node_modules/refractor/lang/j.mjs +0 -40
  473. package/dist/es/node_modules/refractor/lang/java.mjs +0 -86
  474. package/dist/es/node_modules/refractor/lang/javadoc.mjs +0 -89
  475. package/dist/es/node_modules/refractor/lang/javadoclike.mjs +0 -60
  476. package/dist/es/node_modules/refractor/lang/javascript.mjs +0 -114
  477. package/dist/es/node_modules/refractor/lang/javastacktrace.mjs +0 -146
  478. package/dist/es/node_modules/refractor/lang/jexl.mjs +0 -26
  479. package/dist/es/node_modules/refractor/lang/jolie.mjs +0 -51
  480. package/dist/es/node_modules/refractor/lang/jq.mjs +0 -71
  481. package/dist/es/node_modules/refractor/lang/js-extras.mjs +0 -104
  482. package/dist/es/node_modules/refractor/lang/js-templates.mjs +0 -153
  483. package/dist/es/node_modules/refractor/lang/jsdoc.mjs +0 -83
  484. package/dist/es/node_modules/refractor/lang/json.mjs +0 -36
  485. package/dist/es/node_modules/refractor/lang/json5.mjs +0 -32
  486. package/dist/es/node_modules/refractor/lang/jsonp.mjs +0 -20
  487. package/dist/es/node_modules/refractor/lang/jsstacktrace.mjs +0 -53
  488. package/dist/es/node_modules/refractor/lang/jsx.mjs +0 -61
  489. package/dist/es/node_modules/refractor/lang/julia.mjs +0 -47
  490. package/dist/es/node_modules/refractor/lang/keepalived.mjs +0 -54
  491. package/dist/es/node_modules/refractor/lang/keyman.mjs +0 -55
  492. package/dist/es/node_modules/refractor/lang/kotlin.mjs +0 -81
  493. package/dist/es/node_modules/refractor/lang/kumir.mjs +0 -85
  494. package/dist/es/node_modules/refractor/lang/kusto.mjs +0 -47
  495. package/dist/es/node_modules/refractor/lang/latex.mjs +0 -68
  496. package/dist/es/node_modules/refractor/lang/latte.mjs +0 -68
  497. package/dist/es/node_modules/refractor/lang/less.mjs +0 -51
  498. package/dist/es/node_modules/refractor/lang/lilypond.mjs +0 -77
  499. package/dist/es/node_modules/refractor/lang/liquid.mjs +0 -68
  500. package/dist/es/node_modules/refractor/lang/lisp.mjs +0 -158
  501. package/dist/es/node_modules/refractor/lang/livescript.mjs +0 -119
  502. package/dist/es/node_modules/refractor/lang/llvm.mjs +0 -31
  503. package/dist/es/node_modules/refractor/lang/log.mjs +0 -103
  504. package/dist/es/node_modules/refractor/lang/lolcode.mjs +0 -57
  505. package/dist/es/node_modules/refractor/lang/lua.mjs +0 -29
  506. package/dist/es/node_modules/refractor/lang/magma.mjs +0 -42
  507. package/dist/es/node_modules/refractor/lang/makefile.mjs +0 -42
  508. package/dist/es/node_modules/refractor/lang/markdown.mjs +0 -306
  509. package/dist/es/node_modules/refractor/lang/markup-templating.mjs +0 -74
  510. package/dist/es/node_modules/refractor/lang/markup.mjs +0 -154
  511. package/dist/es/node_modules/refractor/lang/matlab.mjs +0 -25
  512. package/dist/es/node_modules/refractor/lang/maxscript.mjs +0 -70
  513. package/dist/es/node_modules/refractor/lang/mel.mjs +0 -49
  514. package/dist/es/node_modules/refractor/lang/mermaid.mjs +0 -116
  515. package/dist/es/node_modules/refractor/lang/mizar.mjs +0 -24
  516. package/dist/es/node_modules/refractor/lang/mongodb.mjs +0 -287
  517. package/dist/es/node_modules/refractor/lang/monkey.mjs +0 -40
  518. package/dist/es/node_modules/refractor/lang/moonscript.mjs +0 -63
  519. package/dist/es/node_modules/refractor/lang/n1ql.mjs +0 -34
  520. package/dist/es/node_modules/refractor/lang/n4js.mjs +0 -22
  521. package/dist/es/node_modules/refractor/lang/nand2tetris-hdl.mjs +0 -21
  522. package/dist/es/node_modules/refractor/lang/naniscript.mjs +0 -140
  523. package/dist/es/node_modules/refractor/lang/nasm.mjs +0 -31
  524. package/dist/es/node_modules/refractor/lang/neon.mjs +0 -52
  525. package/dist/es/node_modules/refractor/lang/nevod.mjs +0 -125
  526. package/dist/es/node_modules/refractor/lang/nginx.mjs +0 -61
  527. package/dist/es/node_modules/refractor/lang/nim.mjs +0 -54
  528. package/dist/es/node_modules/refractor/lang/nix.mjs +0 -45
  529. package/dist/es/node_modules/refractor/lang/nsis.mjs +0 -37
  530. package/dist/es/node_modules/refractor/lang/objectivec.mjs +0 -23
  531. package/dist/es/node_modules/refractor/lang/ocaml.mjs +0 -64
  532. package/dist/es/node_modules/refractor/lang/opencl.mjs +0 -62
  533. package/dist/es/node_modules/refractor/lang/openqasm.mjs +0 -29
  534. package/dist/es/node_modules/refractor/lang/oz.mjs +0 -37
  535. package/dist/es/node_modules/refractor/lang/parigp.mjs +0 -36
  536. package/dist/es/node_modules/refractor/lang/parser.mjs +0 -80
  537. package/dist/es/node_modules/refractor/lang/pascal.mjs +0 -66
  538. package/dist/es/node_modules/refractor/lang/pascaligo.mjs +0 -70
  539. package/dist/es/node_modules/refractor/lang/pcaxis.mjs +0 -63
  540. package/dist/es/node_modules/refractor/lang/peoplecode.mjs +0 -51
  541. package/dist/es/node_modules/refractor/lang/perl.mjs +0 -134
  542. package/dist/es/node_modules/refractor/lang/php-extras.mjs +0 -29
  543. package/dist/es/node_modules/refractor/lang/php.mjs +0 -301
  544. package/dist/es/node_modules/refractor/lang/phpdoc.mjs +0 -34
  545. package/dist/es/node_modules/refractor/lang/plsql.mjs +0 -30
  546. package/dist/es/node_modules/refractor/lang/powerquery.mjs +0 -44
  547. package/dist/es/node_modules/refractor/lang/powershell.mjs +0 -58
  548. package/dist/es/node_modules/refractor/lang/processing.mjs +0 -25
  549. package/dist/es/node_modules/refractor/lang/prolog.mjs +0 -31
  550. package/dist/es/node_modules/refractor/lang/promql.mjs +0 -74
  551. package/dist/es/node_modules/refractor/lang/properties.mjs +0 -21
  552. package/dist/es/node_modules/refractor/lang/protobuf.mjs +0 -47
  553. package/dist/es/node_modules/refractor/lang/psl.mjs +0 -47
  554. package/dist/es/node_modules/refractor/lang/pug.mjs +0 -173
  555. package/dist/es/node_modules/refractor/lang/puppet.mjs +0 -140
  556. package/dist/es/node_modules/refractor/lang/pure.mjs +0 -72
  557. package/dist/es/node_modules/refractor/lang/purebasic.mjs +0 -63
  558. package/dist/es/node_modules/refractor/lang/purescript.mjs +0 -41
  559. package/dist/es/node_modules/refractor/lang/python.mjs +0 -73
  560. package/dist/es/node_modules/refractor/lang/q.mjs +0 -62
  561. package/dist/es/node_modules/refractor/lang/qml.mjs +0 -67
  562. package/dist/es/node_modules/refractor/lang/qore.mjs +0 -32
  563. package/dist/es/node_modules/refractor/lang/qsharp.mjs +0 -93
  564. package/dist/es/node_modules/refractor/lang/r.mjs +0 -31
  565. package/dist/es/node_modules/refractor/lang/racket.mjs +0 -29
  566. package/dist/es/node_modules/refractor/lang/reason.mjs +0 -33
  567. package/dist/es/node_modules/refractor/lang/regex.mjs +0 -97
  568. package/dist/es/node_modules/refractor/lang/rego.mjs +0 -37
  569. package/dist/es/node_modules/refractor/lang/renpy.mjs +0 -30
  570. package/dist/es/node_modules/refractor/lang/rest.mjs +0 -199
  571. package/dist/es/node_modules/refractor/lang/rip.mjs +0 -41
  572. package/dist/es/node_modules/refractor/lang/roboconf.mjs +0 -39
  573. package/dist/es/node_modules/refractor/lang/robotframework.mjs +0 -95
  574. package/dist/es/node_modules/refractor/lang/ruby.mjs +0 -159
  575. package/dist/es/node_modules/refractor/lang/rust.mjs +0 -122
  576. package/dist/es/node_modules/refractor/lang/sas.mjs +0 -305
  577. package/dist/es/node_modules/refractor/lang/sass.mjs +0 -69
  578. package/dist/es/node_modules/refractor/lang/scala.mjs +0 -59
  579. package/dist/es/node_modules/refractor/lang/scheme.mjs +0 -120
  580. package/dist/es/node_modules/refractor/lang/scss.mjs +0 -82
  581. package/dist/es/node_modules/refractor/lang/shell-session.mjs +0 -69
  582. package/dist/es/node_modules/refractor/lang/smali.mjs +0 -84
  583. package/dist/es/node_modules/refractor/lang/smalltalk.mjs +0 -47
  584. package/dist/es/node_modules/refractor/lang/smarty.mjs +0 -106
  585. package/dist/es/node_modules/refractor/lang/sml.mjs +0 -64
  586. package/dist/es/node_modules/refractor/lang/solidity.mjs +0 -28
  587. package/dist/es/node_modules/refractor/lang/solution-file.mjs +0 -58
  588. package/dist/es/node_modules/refractor/lang/soy.mjs +0 -77
  589. package/dist/es/node_modules/refractor/lang/sparql.mjs +0 -24
  590. package/dist/es/node_modules/refractor/lang/splunk-spl.mjs +0 -36
  591. package/dist/es/node_modules/refractor/lang/sqf.mjs +0 -42
  592. package/dist/es/node_modules/refractor/lang/sql.mjs +0 -42
  593. package/dist/es/node_modules/refractor/lang/squirrel.mjs +0 -50
  594. package/dist/es/node_modules/refractor/lang/stan.mjs +0 -63
  595. package/dist/es/node_modules/refractor/lang/stylus.mjs +0 -141
  596. package/dist/es/node_modules/refractor/lang/swift.mjs +0 -125
  597. package/dist/es/node_modules/refractor/lang/systemd.mjs +0 -65
  598. package/dist/es/node_modules/refractor/lang/t4-cs.mjs +0 -17
  599. package/dist/es/node_modules/refractor/lang/t4-templating.mjs +0 -57
  600. package/dist/es/node_modules/refractor/lang/t4-vb.mjs +0 -17
  601. package/dist/es/node_modules/refractor/lang/tap.mjs +0 -35
  602. package/dist/es/node_modules/refractor/lang/tcl.mjs +0 -51
  603. package/dist/es/node_modules/refractor/lang/textile.mjs +0 -248
  604. package/dist/es/node_modules/refractor/lang/toml.mjs +0 -54
  605. package/dist/es/node_modules/refractor/lang/tremor.mjs +0 -67
  606. package/dist/es/node_modules/refractor/lang/tsx.mjs +0 -22
  607. package/dist/es/node_modules/refractor/lang/tt2.mjs +0 -53
  608. package/dist/es/node_modules/refractor/lang/turtle.mjs +0 -62
  609. package/dist/es/node_modules/refractor/lang/twig.mjs +0 -48
  610. package/dist/es/node_modules/refractor/lang/typescript.mjs +0 -57
  611. package/dist/es/node_modules/refractor/lang/typoscript.mjs +0 -81
  612. package/dist/es/node_modules/refractor/lang/unrealscript.mjs +0 -50
  613. package/dist/es/node_modules/refractor/lang/uorazor.mjs +0 -57
  614. package/dist/es/node_modules/refractor/lang/uri.mjs +0 -92
  615. package/dist/es/node_modules/refractor/lang/v.mjs +0 -85
  616. package/dist/es/node_modules/refractor/lang/vala.mjs +0 -87
  617. package/dist/es/node_modules/refractor/lang/vbnet.mjs +0 -34
  618. package/dist/es/node_modules/refractor/lang/velocity.mjs +0 -75
  619. package/dist/es/node_modules/refractor/lang/verilog.mjs +0 -38
  620. package/dist/es/node_modules/refractor/lang/vhdl.mjs +0 -35
  621. package/dist/es/node_modules/refractor/lang/vim.mjs +0 -22
  622. package/dist/es/node_modules/refractor/lang/visual-basic.mjs +0 -38
  623. package/dist/es/node_modules/refractor/lang/warpscript.mjs +0 -33
  624. package/dist/es/node_modules/refractor/lang/wasm.mjs +0 -36
  625. package/dist/es/node_modules/refractor/lang/web-idl.mjs +0 -89
  626. package/dist/es/node_modules/refractor/lang/wiki.mjs +0 -86
  627. package/dist/es/node_modules/refractor/lang/wolfram.mjs +0 -37
  628. package/dist/es/node_modules/refractor/lang/wren.mjs +0 -97
  629. package/dist/es/node_modules/refractor/lang/xeora.mjs +0 -121
  630. package/dist/es/node_modules/refractor/lang/xml-doc.mjs +0 -35
  631. package/dist/es/node_modules/refractor/lang/xojo.mjs +0 -30
  632. package/dist/es/node_modules/refractor/lang/xquery.mjs +0 -89
  633. package/dist/es/node_modules/refractor/lang/yaml.mjs +0 -78
  634. package/dist/es/node_modules/refractor/lang/yang.mjs +0 -32
  635. package/dist/es/node_modules/refractor/lang/zig.mjs +0 -80
  636. package/dist/es/node_modules/refractor/node_modules/comma-separated-tokens/index.mjs +0 -16
  637. package/dist/es/node_modules/refractor/node_modules/hastscript/factory.mjs +0 -77
  638. package/dist/es/node_modules/refractor/node_modules/hastscript/html.mjs +0 -8
  639. package/dist/es/node_modules/refractor/node_modules/hastscript/index.mjs +0 -5
  640. package/dist/es/node_modules/refractor/node_modules/prismjs/components/prism-core.mjs +0 -720
  641. package/dist/es/node_modules/refractor/node_modules/space-separated-tokens/index.mjs +0 -14
  642. package/dist/es/node_modules/rehype-external-links/lib/index.mjs +0 -34
  643. package/dist/es/node_modules/rehype-external-links/node_modules/is-absolute-url/index.mjs +0 -9
  644. package/dist/es/node_modules/rehype-external-links/node_modules/unist-util-visit/lib/index.mjs +0 -16
  645. package/dist/es/node_modules/rehype-katex/lib/index.mjs +0 -83
  646. package/dist/es/node_modules/remark-gfm/lib/index.mjs +0 -13
  647. package/dist/es/node_modules/remark-math/lib/index.mjs +0 -13
  648. package/dist/es/node_modules/remark-rehype/lib/index.mjs +0 -51
  649. package/dist/es/node_modules/space-separated-tokens/index.mjs +0 -11
  650. package/dist/es/node_modules/style-to-js/cjs/index.mjs +0 -22
  651. package/dist/es/node_modules/style-to-js/cjs/utilities.mjs +0 -18
  652. package/dist/es/node_modules/style-to-js/node_modules/inline-style-parser/index.mjs +0 -93
  653. package/dist/es/node_modules/style-to-js/node_modules/style-to-object/cjs/index.mjs +0 -25
  654. package/dist/es/node_modules/trim-lines/index.mjs +0 -25
  655. package/dist/es/node_modules/tslib/tslib.es6.mjs +0 -30
  656. package/dist/es/node_modules/ua-parser-js/dist/ua-parser.min.mjs +0 -123
  657. package/dist/es/node_modules/unified/lib/callable-instance.mjs +0 -25
  658. package/dist/es/node_modules/unified/lib/index.mjs +0 -525
  659. package/dist/es/node_modules/unified/node_modules/bail/index.mjs +0 -7
  660. package/dist/es/node_modules/unified/node_modules/is-plain-obj/index.mjs +0 -9
  661. package/dist/es/node_modules/unified/node_modules/trough/lib/index.mjs +0 -61
  662. package/dist/es/node_modules/unist-util-find-after/lib/index.mjs +0 -32
  663. package/dist/es/node_modules/unist-util-is/lib/index.mjs +0 -81
  664. package/dist/es/node_modules/unist-util-position/lib/index.mjs +0 -26
  665. package/dist/es/node_modules/unist-util-stringify-position/lib/index.mjs +0 -15
  666. package/dist/es/node_modules/unist-util-visit-parents/lib/color.mjs +0 -6
  667. package/dist/es/node_modules/unist-util-visit-parents/lib/index.mjs +0 -56
  668. package/dist/es/node_modules/vfile/lib/index.mjs +0 -401
  669. package/dist/es/node_modules/vfile/lib/minpath.browser.mjs +0 -120
  670. package/dist/es/node_modules/vfile/lib/minproc.browser.mjs +0 -9
  671. package/dist/es/node_modules/vfile/lib/minurl.browser.mjs +0 -35
  672. package/dist/es/node_modules/vfile/lib/minurl.shared.mjs +0 -7
  673. package/dist/es/node_modules/vfile-message/lib/index.mjs +0 -106
  674. package/dist/es/node_modules/xtend/immutable.mjs +0 -12
  675. package/dist/es/packages/agent-cli-ui/package.json.mjs +0 -164
  676. package/dist/es/packages/react-components/dist/es/Iconfont/index.mjs +0 -8
  677. package/dist/es/packages/react-components/dist/es/components/Copy/index.mjs +0 -43
  678. package/dist/es/packages/react-components/dist/es/components/Markdown/ATag/index.mjs +0 -44
  679. package/dist/es/packages/react-components/dist/es/components/Markdown/Code/index.mjs +0 -64
  680. package/dist/es/packages/react-components/dist/es/components/Markdown/Image/index.mjs +0 -62
  681. package/dist/es/packages/react-components/dist/es/components/Markdown/Video/index.mjs +0 -19
  682. package/dist/es/packages/react-components/dist/es/components/Markdown/index.mjs +0 -80
  683. package/dist/es/packages/react-components/dist/es/index.mjs +0 -10
  684. package/dist/es/packages/react-components/dist/es/utils/clipboard.mjs +0 -38
  685. package/dist/es/packages/react-components/dist/es/utils/markdown/index.mjs +0 -29
  686. package/dist/es/src/global.css +0 -1
  687. package/dist/es/src/image-viewer.css +0 -1
  688. package/dist/es/src/katex.min.css +0 -1
  689. package/dist/es/src/mask.css +0 -1
  690. package/dist/es/src/safe-area.css +0 -1
  691. package/dist/es/src/style.css +0 -1
  692. package/dist/es/src/style10.css +0 -1
  693. package/dist/es/src/style11.css +0 -1
  694. package/dist/es/src/style12.css +0 -1
  695. package/dist/es/src/style13.css +0 -1
  696. package/dist/es/src/style14.css +0 -1
  697. package/dist/es/src/style15.css +0 -1
  698. package/dist/es/src/style16.css +0 -1
  699. package/dist/es/src/style17.css +0 -1
  700. package/dist/es/src/style18.css +0 -1
  701. package/dist/es/src/style19.css +0 -1
  702. package/dist/es/src/style2.css +0 -1
  703. package/dist/es/src/style20.css +0 -1
  704. package/dist/es/src/style21.css +0 -1
  705. package/dist/es/src/style22.css +0 -1
  706. package/dist/es/src/style23.css +0 -1
  707. package/dist/es/src/style24.css +0 -1
  708. package/dist/es/src/style25.css +0 -1
  709. package/dist/es/src/style26.css +0 -1
  710. package/dist/es/src/style27.css +0 -1
  711. package/dist/es/src/style28.css +0 -1
  712. package/dist/es/src/style29.css +0 -1
  713. package/dist/es/src/style3.css +0 -1
  714. package/dist/es/src/style30.css +0 -1
  715. package/dist/es/src/style31.css +0 -1
  716. package/dist/es/src/style32.css +0 -1
  717. package/dist/es/src/style33.css +0 -1
  718. package/dist/es/src/style4.css +0 -1
  719. package/dist/es/src/style5.css +0 -1
  720. package/dist/es/src/style6.css +0 -1
  721. package/dist/es/src/style7.css +0 -1
  722. package/dist/es/src/style8.css +0 -1
  723. package/dist/es/src/style9.css +0 -1
  724. package/dist/es/types.mjs +0 -4
  725. package/dist/es/utils/antdConfig.mjs +0 -15
  726. package/dist/es/utils/index.mjs +0 -41
  727. package/dist/es/utils/scopedMessage.mjs +0 -29
  728. package/dist/lib/index.css +0 -1
  729. package/dist/src/ReactTextGenerationUI/components/fetchEventSourcea/fetch.d.ts +0 -44
  730. package/dist/src/ReactTextGenerationUI/components/fetchEventSourcea/index.d.ts +0 -1
  731. package/dist/src/ReactTextGenerationUI/components/fetchEventSourcea/parse.d.ts +0 -36
  732. package/dist/src/utils/reactCompatibility.d.ts +0 -27
  733. package/dist/src/utils/testAntdPrefix.d.ts +0 -3
@@ -1,1147 +0,0 @@
1
- var Hn = Object.defineProperty, jn = Object.defineProperties;
2
- var $n = Object.getOwnPropertyDescriptors;
3
- var jt = Object.getOwnPropertySymbols;
4
- var zn = Object.prototype.hasOwnProperty, Vn = Object.prototype.propertyIsEnumerable;
5
- var He = (b, h, i) => h in b ? Hn(b, h, { enumerable: !0, configurable: !0, writable: !0, value: i }) : b[h] = i, je = (b, h) => {
6
- for (var i in h || (h = {}))
7
- zn.call(h, i) && He(b, i, h[i]);
8
- if (jt)
9
- for (var i of jt(h))
10
- Vn.call(h, i) && He(b, i, h[i]);
11
- return b;
12
- }, $e = (b, h) => jn(b, $n(h));
13
- var j = (b, h, i) => (He(b, typeof h != "symbol" ? h + "" : h, i), i);
14
- var $ = (b, h, i) => new Promise((A, e) => {
15
- var I = (T) => {
16
- try {
17
- x(i.next(T));
18
- } catch (R) {
19
- e(R);
20
- }
21
- }, z = (T) => {
22
- try {
23
- x(i.throw(T));
24
- } catch (R) {
25
- e(R);
26
- }
27
- }, x = (T) => T.done ? A(T.value) : Promise.resolve(T.value).then(I, z);
28
- x((i = i.apply(b, h)).next());
29
- });
30
- import { jsx as g, jsxs as U, Fragment as Bn } from "react/jsx-runtime";
31
- import { memo as _n, forwardRef as qn, useState as p, useRef as K, useContext as Wn, useEffect as N, useMemo as Kn, useImperativeHandle as Sn } from "react";
32
- /* empty css */import { Spin as $t, Divider as Yn, Button as G, Space as Ee, Upload as Qn, Tooltip as Xn, Popover as Gn, notification as se, message as Zn } from "antd";
33
- import re from "../../components/Iconfont/index.mjs";
34
- import { IHistoryRole as ae, ApplicationTypes as S, ChatMessageRole as zt, PromptVariableType as Ne } from "@glodon-aiot/apis";
35
- import Wt from "./HistoryItem/index.mjs";
36
- import Kt from "dayjs";
37
- import { v4 as _e } from "uuid";
38
- import Jn from "../../context.mjs";
39
- import { configuration as ei } from "@glodon-aiot/bot-client-sdk";
40
- import { MAX_KNOWLEDGES_AND_FILES_COUNT as Vt, NET_OPEN_STATUS as le, MB as ti } from "../../constant.mjs";
41
- import ni from "../../components/FilePreview/index.mjs";
42
- import { calcKnowledgesLeafCount as ii, getImageExtension as Bt, fileTypes as oi } from "../../utils/index.mjs";
43
- import { withAgentCliMessage as si } from "../../utils/scopedMessage.mjs";
44
- import ri from "../../QuillEditor/index.mjs";
45
- import ai from "../../components/Recommend/index.mjs";
46
- import li from "../../components/Greeting/index.mjs";
47
- import ci from "../../Footer/index.mjs";
48
- import { PlusOutlined as di } from "@ant-design/icons";
49
- import fi from "./Tools/UploadKnowledgeFiles/index.mjs";
50
- import gi from "../UploadingPrompt/index.mjs";
51
- import ui from "./PromptSetting/index.mjs";
52
- import { useMemoizedFn as ze } from "ahooks";
53
- import pi from "./Tools/SessionListDrawer/index.mjs";
54
- import hi from "./Tools/SessionHistoryDrawer/index.mjs";
55
- import mi from "react-infinite-scroll-component";
56
- import yi from "./Tools/ConnectToNetwork/index.mjs";
57
- import vi from "./Tools/PromptManager/index.mjs";
58
- import { useSessionState as wi } from "../../hooks/useSessionState.mjs";
59
- import ki from "../../assets/icon.svg.mjs";
60
- const bi = _n(Wt), _t = {
61
- icon: ki,
62
- text: "今天我能帮你什么?"
63
- };
64
- class he {
65
- constructor(h, i, A, e, I) {
66
- j(this, "messageTime");
67
- j(this, "isWaiting");
68
- j(this, "messageId");
69
- j(this, "isContext");
70
- j(this, "actions");
71
- j(this, "reference");
72
- j(this, "isSensitive");
73
- j(this, "isSuspend");
74
- j(this, "imageContent");
75
- // 新增:支持对话型应用的图片内容
76
- j(this, "comment");
77
- this.content = h, this.sessionId = i, this.role = A, this.files = e, this.content = h, this.role = A, this.sessionId = i, this.files = e, this.imageContent = I, this.messageTime = Kt(/* @__PURE__ */ new Date()).format("YYYY-MM-DD HH:mm:ss"), this.isWaiting = !1, this.messageId = _e(), this.isContext = !1, this.actions = [], this.reference = [], this.isSensitive = !1, this.isSuspend = !1, this.comment = {
78
- isAgree: 0
79
- };
80
- }
81
- }
82
- const qt = 10, Z = 5, Ve = 20, Be = (b, h, i, A) => {
83
- let e = b;
84
- if (A === S.Agent) {
85
- if (i && i.length > 0) {
86
- const I = i.map((z) => `[${z.name.replace(/\.[^/.]+$/, "")}](${z.url})`).join(`
87
- `);
88
- e = I ? `${I}
89
- ${e}` : e;
90
- }
91
- if (h && h.length > 0) {
92
- const I = h.filter(Boolean).map((z) => `![](${z})`).join(`
93
- `);
94
- e = I ? `${I}
95
- ${e}` : e;
96
- }
97
- }
98
- return e;
99
- }, xi = (b) => {
100
- const h = Math.floor(b / 3600), i = Math.floor(b % 3600 / 60), A = b % 60, e = (I) => String(I).padStart(2, "0");
101
- return `${e(h)}:${e(i)}:${e(A)}`;
102
- }, no = qn((b, h) => {
103
- var bt, xt, Ct, It, Et, Nt, Lt, Pt, Dt, Tt, Rt, Ot, Ft, Ut;
104
- const {
105
- application: i,
106
- docViewerUrl: A = "",
107
- currentSession: e,
108
- onCreateSession: I,
109
- embeddingService: z,
110
- setCurrentSession: x,
111
- networkStatus: T,
112
- setNetworkStatus: R
113
- } = b, [w, L] = p([]), [St, me] = p(), [Le, qe] = p(), O = K(null), {
114
- service: M,
115
- agentClient: P,
116
- depId: Yt,
117
- footer: Qt,
118
- transform: f,
119
- defaultInput: Pe,
120
- onMessage: ye,
121
- onHistoryLoad: We,
122
- beforeMessageSend: _,
123
- bodyStyle: Xt,
124
- disabled: F,
125
- features: a,
126
- popupContainer: Y,
127
- icon: Gt,
128
- sider: Zt,
129
- mode: Jt,
130
- silencedSeconds: De
131
- } = Wn(Jn), [Ke, Te] = p(!1), y = K(w), Se = K(void 0), [en, tn] = p(0), [ce, ve] = p([]), [J, we] = p([]), [Ye, Qe] = p(0), [Xe, nn] = p(!1);
132
- N(() => {
133
- nn(Ye > 0);
134
- }, [Ye]);
135
- const ke = K(null), [Ge, on] = p([]), [Ze, ee] = p(!1), [Je, sn] = p(!1), [rn, an] = p(""), [ln, te] = p(), [ne, de] = p({}), fe = K(null), et = K(null), Re = K(null), [tt, cn] = p(!1), [dn, fn] = p([]), [gn, be] = p(!0), [un, pn] = p(!0), [nt, V] = p(!1), [Oe, q] = p(!1), [it, hn] = p(!1), [H, ge] = p(typeof (a == null ? void 0 : a.promptVariables) == "object" ? a.promptVariables.default || [] : []), [mn, yn] = p(() => {
136
- const t = typeof (a == null ? void 0 : a.knowledges) == "object" && a.knowledges.default || void 0;
137
- if (t) {
138
- if (Array.isArray(t) && t.some((r) => Array.isArray(r.fileIds) && r.fileIds.length === 0))
139
- throw Error("fileIds cannot be an empty array");
140
- if (ii(t) > Vt)
141
- throw Error(`knowledges and fileIds total count cannot exceed ${Vt}`);
142
- }
143
- return t;
144
- }), [ot, Q] = p(!1), [st, ue] = p(!1), [vn, pe] = p(typeof (a == null ? void 0 : a.connectNetwork) == "object" && typeof (a == null ? void 0 : a.connectNetwork.default) == "boolean" ? a.connectNetwork.default : !1), [rt, xe] = p(!1), [wn, W] = p(!1), [kn, bn] = p(null), [Ce, X] = p(!1), [at, lt] = p(!1), {
145
- isSwitchingToExistingSession: ct,
146
- setIsSwitchingToExistingSession: Ie
147
- } = wi(), ie = K(null), [Fe, xn] = p("");
148
- N(() => {
149
- if (!De)
150
- return;
151
- let t = xi(De);
152
- xn(t);
153
- }, [De]), N(() => {
154
- if (bn(e), e === null)
155
- W(!1);
156
- else if (e === void 0)
157
- W(!0);
158
- else {
159
- if (kn === null) {
160
- if (ct) {
161
- W(!0), Ie(!1);
162
- return;
163
- }
164
- W(!1);
165
- return;
166
- }
167
- e.ready ? W(!1) : W(!0);
168
- }
169
- }, [e, e == null ? void 0 : e.ready, ct]), N(() => {
170
- var o, r;
171
- e && (y.current = []), L([]);
172
- const t = O.current;
173
- if (t && t.scrollTo({
174
- top: 0
175
- }), !((o = e == null ? void 0 : e.data) != null && o.id))
176
- return;
177
- if (q(!1), V(!1), (r = e.messages) != null && r.length) {
178
- const c = [...e.messages.filter((l) => l == null ? void 0 : l.messageId)].reverse();
179
- y.current = [...c], L([...c]), W(!1);
180
- }
181
- const n = (s) => {
182
- var c;
183
- (c = e == null ? void 0 : e.data) != null && c.id && (y.current = [...s].reverse(), L([...s].reverse()), !s || s.length < 10 ? ue(!1) : ue(!0), W(!1), We && We({
184
- applicationId: i.id,
185
- sessionId: e.data.id,
186
- histories: s
187
- }));
188
- };
189
- return e.addEventListener("history:loaded", n), () => {
190
- y.current = [], L([]), e == null || e.removeEventListener("history:loaded", n);
191
- };
192
- }, [e]), N(() => {
193
- const t = () => {
194
- var n;
195
- (n = e == null ? void 0 : e.data) != null && n.id && (e.promptVariables && ge(e.promptVariables.sort((o, r) => o.key.localeCompare(r.key))), e.knowledges && yn(e.knowledges), R(e.netOpen));
196
- };
197
- return e == null || e.addEventListener("data:updated", t), () => {
198
- e == null || e.removeEventListener("data:updated", t);
199
- };
200
- }, [e]), N(() => {
201
- var n;
202
- if (!((n = e == null ? void 0 : e.data) != null && n.id))
203
- return;
204
- const t = (o) => {
205
- var r;
206
- console.error(o.message, o.cause, "e.case"), se.config({
207
- getContainer: () => (Y == null ? void 0 : Y.current) || document.body,
208
- prefixCls: "gbot-notification"
209
- }), se.error({
210
- message: ((r = o.cause) == null ? void 0 : r.message) || o.message
211
- }), se.config({
212
- getContainer: void 0,
213
- prefixCls: "gbot-notification"
214
- });
215
- };
216
- return e.addEventListener("error", t), () => {
217
- e == null || e.removeEventListener("error", t);
218
- };
219
- }, [e]);
220
- const Cn = () => {
221
- var o;
222
- if (!((o = e == null ? void 0 : e.data) != null && o.id) || !(i != null && i.id))
223
- return;
224
- const t = e.data.id, n = w[w.length - 1];
225
- if (n && n.isContext) {
226
- D("success", "已开启新话题");
227
- return;
228
- } else
229
- e.clear().then(() => {
230
- const r = new he("", t, ae.System);
231
- r.isContext = !0, L([r, ...w]);
232
- });
233
- };
234
- N(() => {
235
- i != null && i.id && (M == null || M.getRecommendQues(i.id).then((t) => {
236
- on(t);
237
- }));
238
- }, [Yt, i]);
239
- const dt = (t) => $(void 0, null, function* () {
240
- var u, E;
241
- if (F) {
242
- D("error", "发送功能被禁用");
243
- return;
244
- }
245
- const n = t || St;
246
- if (!(n != null && n.trim())) {
247
- D("error", "请输入你想问的");
248
- return;
249
- }
250
- if (!(H == null ? void 0 : H.every((C) => !!(C != null && C.value))))
251
- if (f != null && f.promptVariables) {
252
- D("error", "变量值不能为空");
253
- return;
254
- } else
255
- console.error("变量值不能为空", H == null ? void 0 : H.map((C) => !!(C != null && C.value)));
256
- if (Oe) {
257
- D("error", "正在回复中");
258
- return;
259
- }
260
- if (Ke) {
261
- D("error", "等待初始化");
262
- return;
263
- }
264
- if (!gn) {
265
- D("error", "正在解析文件");
266
- return;
267
- }
268
- if (Xe) {
269
- D("error", "正在上传图片");
270
- return;
271
- }
272
- ve([]), we([]);
273
- const r = (u = e == null ? void 0 : e.data) == null ? void 0 : u.id;
274
- if (!r) {
275
- if (Ce)
276
- return;
277
- X(!0), I == null || I({
278
- netOpen: T ? le.OPEN : le.CLOSE
279
- }).then((C) => {
280
- var m, B;
281
- Q(!0), R(!!((m = C.data) != null && m.netOpen)), pe(!!((B = C.data) != null && B.enableNetOpen)), Ue(C).then(() => {
282
- x == null || x(C), Q(!1), qe(n);
283
- });
284
- }).catch((C) => {
285
- X(!1);
286
- });
287
- return;
288
- }
289
- if (Ce)
290
- return;
291
- X(!0), xe(!0);
292
- const s = Be(n, J, ne[r], (i == null ? void 0 : i.type) || 0);
293
- let c;
294
- try {
295
- _ ? c = yield _ == null ? void 0 : _({
296
- applicationId: i.id,
297
- sessionId: r,
298
- message: {
299
- content: s,
300
- sessionId: r,
301
- role: zt.User,
302
- files: ne[r]
303
- }
304
- }) : c = !0;
305
- } catch (C) {
306
- c = !1;
307
- }
308
- if (xe(!1), c === !1) {
309
- X(!1);
310
- return;
311
- }
312
- let l = n;
313
- typeof c == "object" && (l = c.content || n);
314
- const d = yield (() => new Promise((C) => {
315
- ge((m) => (C(m), m));
316
- }))();
317
- if (!(yield e.setPromptVariables(d))) {
318
- X(!1);
319
- return;
320
- }
321
- ((E = ne[r]) == null ? void 0 : E.length) > 0 ? In(l) : Ae(l);
322
- }), Ue = (t) => new Promise((n, o) => $(void 0, null, function* () {
323
- const c = (t == null ? void 0 : t.promptVariables).filter((l) => l.type ? !((l.type === Ne.User || l.type === void 0) && l.key === "query") && !((l.type === Ne.System || l.type === void 0) && l.key === "datetime") : l.key !== "query").map((l) => {
324
- var d;
325
- const v = (d = H.find((k) => k.key === l.key && k.type === l.type)) == null ? void 0 : d.value;
326
- return l.value = v || "", l;
327
- });
328
- ge(c.sort((l, v) => l.key.localeCompare(v.key))), yield t == null ? void 0 : t.setPromptVariables(c).catch((l) => {
329
- console.error(l), D("error", l.message);
330
- }), n();
331
- })), In = (t) => {
332
- var s, c, l;
333
- if (be(!1), !((s = e == null ? void 0 : e.data) != null && s.id) || !(i != null && i.id))
334
- return;
335
- const n = ((c = e.data) == null ? void 0 : c.id) || "";
336
- let o = [], r = /* @__PURE__ */ new Set();
337
- (l = ne[n]) == null || l.forEach((v) => {
338
- r.has(v.id) || (o.push(v), r.add(v.id));
339
- }), be(!0), Ae(t, o);
340
- };
341
- N(() => {
342
- if (!Le || !e)
343
- return;
344
- const t = Le, n = () => $(void 0, null, function* () {
345
- xe(!0);
346
- const o = Be(t, J, ne[e.id], (i == null ? void 0 : i.type) || 0);
347
- let r;
348
- try {
349
- _ ? r = yield _ == null ? void 0 : _({
350
- applicationId: i.id,
351
- sessionId: e.id,
352
- message: {
353
- content: o,
354
- sessionId: e.id,
355
- role: zt.User,
356
- files: ne[e.id]
357
- }
358
- }) : r = !0;
359
- } catch (s) {
360
- r = !1;
361
- }
362
- if (xe(!1), r === !1) {
363
- X(!1);
364
- return;
365
- }
366
- Ae(t), qe(void 0);
367
- });
368
- return e.ready ? n() : e.addEventListener("ready", n, !0), () => {
369
- e == null || e.removeEventListener("ready", n);
370
- };
371
- }, [Le, e]);
372
- const Ae = (t, n) => $(void 0, null, function* () {
373
- var u, E, C;
374
- const o = (u = e == null ? void 0 : e.data) == null ? void 0 : u.id;
375
- if (!o)
376
- return;
377
- q(!0), V(!0);
378
- const r = Be(t, J, n, (i == null ? void 0 : i.type) || 0);
379
- let s;
380
- if (i.type === S.Agent)
381
- s = void 0;
382
- else if (i.type === S.Dialog && ((E = i.arrange) != null && E.length) && i.arrange[0].visionOpen) {
383
- const m = J && J.length ? J.filter(Boolean) : [];
384
- s = m.length ? m : void 0;
385
- } else
386
- s = void 0;
387
- const c = new he(
388
- r,
389
- o,
390
- ae.User,
391
- n,
392
- s
393
- // 新增:传入图片内容
394
- );
395
- me(void 0), te(void 0), y.current = [c, ...w], L(y.current), i.id && ye && ye({
396
- applicationId: i.id,
397
- sessionId: o,
398
- message: c
399
- });
400
- const l = new he("", o, ae.System);
401
- l.isWaiting = !0, y.current = [l, ...y.current], L(y.current);
402
- const v = (n == null ? void 0 : n.map((m) => m.id)) || [], d = {
403
- stream: ei.stream,
404
- referenceFirst: !1
405
- };
406
- if (f != null && f.promptVariables) {
407
- const m = H == null ? void 0 : H.reduce((B, oe) => (B[oe.key] = oe.value, B), {});
408
- d.formatValues = m;
409
- }
410
- if (f != null && f.knowledges) {
411
- const m = mn;
412
- d.knowledges = m;
413
- }
414
- const k = {
415
- text: r,
416
- fileIds: v,
417
- files: n
418
- };
419
- s && s.length > 0 && (k.imageContent = s), yield e.send(k, d), de({
420
- [o]: []
421
- }), (C = fe.current) == null || C.update(), ve([]), we([]), X(!1);
422
- });
423
- N(() => {
424
- var v;
425
- const t = (v = e == null ? void 0 : e.data) == null ? void 0 : v.id;
426
- if (!t)
427
- return;
428
- let n = null, o = null;
429
- const r = () => {
430
- n = null, o && (L([o, ...y.current]), o = null);
431
- }, s = () => {
432
- n !== null && (cancelAnimationFrame(n), n = null, o = null);
433
- }, c = (d) => {
434
- if (!d.sessionId || d.sessionId && d.sessionId !== Se.current || d.role === ae.User)
435
- return;
436
- if (d.index === -1 && d.code !== 200 && d.code !== 11915 && d.code !== 11916 && (s(), V(!1), q(!1), y.current = y.current.filter((E) => !E.isWaiting), L([...y.current]), y.current = [...y.current], d.content)) {
437
- se.config({
438
- getContainer: () => (Y == null ? void 0 : Y.current) || document.body,
439
- prefixCls: "gbot-notification"
440
- }), se.error({
441
- message: d.content
442
- }), se.config({
443
- getContainer: void 0,
444
- prefixCls: "gbot-notification"
445
- });
446
- return;
447
- }
448
- const k = d.actions || [], u = new he(d.content, t, ae.Robot);
449
- if (u.messageId = d.messageId || _e(), u.reasoningContent = d.reasoningContent, u.searchReference = d.searchReference, u.thinkingSecs = d.thinkingSecs, u.thinkingStatus = d.thinkingStatus, u.actions = k, u.isLoading = !0, u.searchingStatus = d.searchingStatus, y.current = y.current.filter((E) => !E.isWaiting).filter((E) => !E.isReplying), d.index === void 0) {
450
- o = u, n === null && (n = requestAnimationFrame(r));
451
- return;
452
- }
453
- s(), (d.code === 11915 || d.code === 11916) && (V(!1), q(!1), u.isLoading = !1, u.content = d.code === 11916 ? "尊敬的用户您好,让我们换个话题再聊聊吧。" : "请您换个问题问我吧~", u.isSensitive = !0, L([u, ...y.current])), d.index === -2 && (V(!1), q(!1), u.isLoading = !1, u.content = "回答已中止~", u.isSuspend = !0, L([u, ...y.current])), d.index === -1 && (V(!1), q(!1), u.isLoading = !1, u.reference = d.reference, L([u, ...y.current]), i.id && ye && ye({
454
- applicationId: i.id,
455
- sessionId: t,
456
- message: u
457
- })), d.index === -3 && (V(!1), q(!1), u.isLoading = !1, u.reference = d.reference, u.relatedQuesion = d.relatedQuesion, L([u, ...y.current]));
458
- }, l = () => {
459
- e.addEventListener("message:updated", c);
460
- };
461
- return e.ready ? e.addEventListener("message:updated", c) : e.addEventListener("ready", l), () => {
462
- s(), e == null || e.removeEventListener("message:updated", c), e == null || e.removeEventListener("ready", l);
463
- };
464
- }, [e]), N(() => {
465
- if (!e) {
466
- Te(!1);
467
- return;
468
- }
469
- const t = (n) => {
470
- Te(n);
471
- };
472
- return Te(e.frozen), e.addEventListener("frozen", t), () => {
473
- e == null || e.removeEventListener("frozen", t);
474
- };
475
- }, [e]), N(() => {
476
- if (!P)
477
- return;
478
- const t = P.questionContextMaxLength || 4e3;
479
- tn(t);
480
- }, [P, M]), N(() => {
481
- Pe && te(Pe.text);
482
- }, [Pe]);
483
- const D = (t, n, o) => {
484
- si(Y, () => {
485
- Zn.open({
486
- type: t,
487
- content: n,
488
- key: o
489
- });
490
- });
491
- }, ft = (t) => {
492
- const n = t.size;
493
- return n <= 0 ? (D("error", "该文件为空,请重新上传"), !1) : n > Ve * ti ? (D("error", `图片须小于${Ve}M`), !1) : (ve((o) => o.length >= Z ? (D("warning", `图片最多上传${Z}张`), o) : [...o, t]), !1);
494
- }, En = () => {
495
- var t;
496
- return (i.type === S.Agent && (f == null ? void 0 : f.imageUpload) || i.type === S.Dialog && ((t = i.arrange) == null ? void 0 : t.length) && !!i.arrange[0].visionOpen && (f == null ? void 0 : f.imageUpload)) && !F;
497
- }, Nn = () => !!z && (f == null ? void 0 : f.fileUpload) && (i == null ? void 0 : i.id) && !F, gt = (t) => {
498
- var E, C;
499
- const n = Array.from(t || []).filter(Boolean);
500
- if (!n.length)
501
- return;
502
- const o = En(), r = Nn(), s = [], c = [];
503
- let l = 0, v = 0, d = 0;
504
- n.forEach((m) => {
505
- var At, Mt, Ht;
506
- if (((At = m.type) == null ? void 0 : At.startsWith("image/")) || !!Bt(m.name)) {
507
- o ? s.push(m) : l++;
508
- return;
509
- }
510
- const oe = (Ht = (Mt = m.name) == null ? void 0 : Mt.split(".").pop()) == null ? void 0 : Ht.toLowerCase();
511
- if (oi.includes(m.type) || ["pdf", "doc", "docx"].includes(oe || "")) {
512
- r ? c.push(m) : v++;
513
- return;
514
- }
515
- d++;
516
- });
517
- const k = [], u = l + v + d;
518
- if (!r && !o)
519
- u && k.push(`当前不支持上传文件/图片,已忽略${u}个文件`);
520
- else if (r && !o) {
521
- const m = l + d;
522
- m && k.push(`仅支持上传 .doc/.docx/.pdf 文件,已忽略${m}个其他类型文件`);
523
- } else if (!r && o) {
524
- const m = v + d;
525
- m && k.push(`仅支持上传图片(.jpg/.jpeg/.png/.bmp),已忽略${m}个其他类型文件`);
526
- } else
527
- d && k.push(`存在不支持的文件类型,已忽略${d}个文件`);
528
- if (k.length && D("warning", k.join(";"), "precheck-warn"), s.length) {
529
- const m = Math.max(0, Z - ce.length), B = s.slice(0, m);
530
- B.forEach((oe) => ft(oe)), s.length > B.length && D("warning", `最多上传${Z}张图片`);
531
- }
532
- c.length && ((C = (E = fe.current) == null ? void 0 : E.appendFiles) == null || C.call(E, c));
533
- }, ut = (t) => {
534
- var o;
535
- const n = (o = t.clipboardData) == null ? void 0 : o.files;
536
- n && n.length && (t.preventDefault(), t.stopPropagation(), gt(n));
537
- }, pt = (t) => {
538
- t.preventDefault();
539
- }, ht = (t) => {
540
- var o;
541
- t.preventDefault(), t.stopPropagation();
542
- const n = (o = t.dataTransfer) == null ? void 0 : o.files;
543
- n && n.length && gt(n);
544
- }, mt = () => $(void 0, null, function* () {
545
- var t;
546
- return (t = e == null ? void 0 : e.data) != null && t.id ? e : (ie.current || (ie.current = new Promise((n, o) => {
547
- Q(!0), I == null || I({
548
- netOpen: T ? le.OPEN : le.CLOSE
549
- }).then((r) => {
550
- var s, c;
551
- x == null || x(r), Q(!1), R(!!((s = r.data) != null && s.netOpen)), pe(!!((c = r.data) != null && c.enableNetOpen)), Ue(r), n(r);
552
- }).catch((r) => {
553
- ie.current = null, o(r);
554
- });
555
- })), ie.current);
556
- }), Ln = (t) => $(void 0, null, function* () {
557
- const n = yield mt();
558
- return Pn(n, t);
559
- }), Pn = (t, n) => {
560
- const o = Bt(n.name);
561
- return new Promise((r) => {
562
- var c;
563
- const s = {
564
- files: [`${_e()}.${o}`],
565
- isv: "minio",
566
- knowledgeId: ((c = t.data) == null ? void 0 : c.id) || "",
567
- type: 1
568
- };
569
- M == null || M.postTicket(s).then((l) => {
570
- M.uploadMinioFile(l.minio, n).then(() => {
571
- var u, E;
572
- const v = (u = l.minio.endpoints) == null ? void 0 : u[0], d = l.minio.bucket, k = (E = l.minio.fileKeys) == null ? void 0 : E[0];
573
- r(`${l.minio.useSSL ? "https:" : location.protocol}//${v}/${d}/${k}`);
574
- }).catch(() => {
575
- });
576
- }).catch(() => {
577
- });
578
- });
579
- };
580
- N(() => {
581
- const t = O.current;
582
- t && !it && t.scrollTo({
583
- top: t.scrollHeight
584
- });
585
- }, [w]);
586
- const yt = (t, n) => new Promise((o) => {
587
- if (!n.file.url || !(i != null && i.id))
588
- return o();
589
- const r = $e(je({}, n.file), {
590
- type: 1
591
- });
592
- M == null || M.postApplicationIdSessionKnowledgeSessionFile(i == null ? void 0 : i.id, t, r).finally(() => {
593
- var s;
594
- (s = fe.current) == null || s.update().finally(o);
595
- });
596
- }), Dn = () => {
597
- var t;
598
- (t = e == null ? void 0 : e.data) != null && t.id && (V(!1), e.suspend());
599
- }, Tn = (t) => {
600
- const n = O.current;
601
- n && setTimeout(() => {
602
- n.scrollTo({
603
- top: n.scrollHeight,
604
- behavior: t == null ? void 0 : t.behavior
605
- });
606
- }, t == null ? void 0 : t.ms);
607
- }, Rn = () => {
608
- if (!O.current)
609
- return;
610
- const t = O.current.scrollTop <= -80;
611
- hn(t);
612
- }, On = ze((t) => {
613
- var n, o;
614
- (n = ke.current) == null || n.update(t), (o = ke.current) == null || o.focus();
615
- }), Fn = ze((t) => {
616
- dt(t);
617
- }), Un = ze(() => {
618
- var n;
619
- if (!((n = e == null ? void 0 : e.data) != null && n.id))
620
- return;
621
- y.current = [...w.slice(1, w.length)], L(y.current);
622
- const t = new he("", e.data.id, ae.System);
623
- t.isWaiting = !0, y.current = [t, ...y.current], L(y.current), q(!0), V(!0), e.answerAgain();
624
- });
625
- N(() => {
626
- var t, n;
627
- Se.current = (t = e == null ? void 0 : e.data) == null ? void 0 : t.id, !ot && ((n = Re.current) == null || n.clear());
628
- }, [e]);
629
- const An = () => {
630
- var o;
631
- if (!((o = e == null ? void 0 : e.data) != null && o.id))
632
- return;
633
- const n = w[w.length - 1].messageTime;
634
- e.fetchMessages({
635
- endTime: n,
636
- pageSize: qt
637
- }).then((r) => {
638
- const s = r || [];
639
- if (!s || !(s != null && s.length)) {
640
- ue(!1);
641
- return;
642
- }
643
- s.length < 10 ? ue(!1) : ue(!0), L([...w, ...s.reverse()]);
644
- });
645
- }, Mn = (t) => $(void 0, null, function* () {
646
- var n, o;
647
- if (!((n = e == null ? void 0 : e.data) != null && n.id))
648
- R(t);
649
- else {
650
- if (yield e.setNetOpen(t), !((o = e.data) != null && o.id))
651
- return;
652
- R(t);
653
- }
654
- }), Me = () => $(void 0, null, function* () {
655
- e ? e.fetchData().then((t) => {
656
- var n;
657
- (n = e == null ? void 0 : e.data) != null && n.id && (R(t.netOpen), pe(t.enableNetOpen));
658
- }) : (R(typeof (a == null ? void 0 : a.connectNetwork) == "object" && typeof (a == null ? void 0 : a.connectNetwork.default) == "boolean" ? a.connectNetwork.default : !1), pe(i.arrange[0].enableNetOpen));
659
- });
660
- N(() => {
661
- Me();
662
- }, [e]), N(() => {
663
- let t = null, n = null;
664
- const o = () => {
665
- var k, u;
666
- if (!O.current)
667
- return;
668
- const s = document.getElementById("chat-main"), c = (k = O.current) == null ? void 0 : k.querySelector(".infinite-scroll-component__outerdiv"), l = (u = O.current) == null ? void 0 : u.querySelector(".infinite-scroll-component");
669
- if (!c || !l || !s)
670
- return;
671
- const v = s.offsetHeight;
672
- if (l.offsetHeight <= v) {
673
- if (c.style.height === "100%")
674
- return;
675
- c.style.height = "100%";
676
- } else {
677
- if (c.style.height === "auto")
678
- return;
679
- c.style.height = "auto";
680
- }
681
- }, r = () => {
682
- var l;
683
- if (typeof ResizeObserver == "undefined" || !O.current)
684
- return;
685
- const s = document.getElementById("chat-main"), c = (l = O.current) == null ? void 0 : l.querySelector(".infinite-scroll-component");
686
- !c || !s || (n = new ResizeObserver(() => {
687
- o();
688
- }), n.observe(c), n.observe(s));
689
- };
690
- return t = requestAnimationFrame(() => {
691
- o(), r();
692
- }), () => {
693
- t !== null && cancelAnimationFrame(t), n == null || n.disconnect();
694
- };
695
- }, [w]), N(() => {
696
- if (e)
697
- return;
698
- const t = () => {
699
- const r = ((P == null ? void 0 : P.promptVariables) || []).filter((s) => s.type ? !(s.type === Ne.User && s.key === "query") && !(s.type === Ne.System && s.key === "datetime") && s.status === 1 : s.key !== "query" && s.status === 1).map((s, c) => {
700
- var v, d;
701
- let l = "";
702
- return typeof (a == null ? void 0 : a.promptVariables) == "object" && (l = ((d = (v = a.promptVariables.default) == null ? void 0 : v.find((k) => k.key === s.key && k.type === s.type)) == null ? void 0 : d.value) || ""), {
703
- id: c + "",
704
- key: s.key,
705
- name: s.name,
706
- value: l,
707
- type: s.type
708
- };
709
- });
710
- ge([...r].sort((s, c) => s.key.localeCompare(c.key)));
711
- };
712
- return P != null && P.ready ? t() : P == null || P.addEventListener("ready", t), () => {
713
- P == null || P.removeEventListener("ready", t);
714
- };
715
- }, [e, P, a == null ? void 0 : a.promptVariables]);
716
- const vt = () => I == null ? void 0 : I({
717
- netOpen: T ? le.OPEN : le.CLOSE
718
- }).then((t) => {
719
- var n, o;
720
- return x == null || x(t), Q(!1), R(!!((n = t.data) != null && n.netOpen)), pe(!!((o = t.data) != null && o.enableNetOpen)), Ue(t), t;
721
- }), wt = !!w.length, kt = Kn(() => {
722
- var t;
723
- return i.arrange && ((t = i.arrange[0]) != null && t.openingContent) ? /* @__PURE__ */ g(Wt, {
724
- application: i,
725
- history: {
726
- role: 1,
727
- content: i.arrange[0].openingContent,
728
- code: 200,
729
- messageId: "opening-message",
730
- sessionId: "",
731
- reference: [],
732
- searchReference: [],
733
- messageTime: Kt(Date.now()).format("YYYY-MM-DD HH:mm:ss"),
734
- actions: [],
735
- isLoading: !1
736
- },
737
- actions: wt,
738
- markdown: a == null ? void 0 : a.markdown
739
- }) : null;
740
- }, [i == null ? void 0 : i.arrange, wt]);
741
- return Sn(h, () => ({
742
- getCurrentInputText: () => {
743
- var t;
744
- return (t = ke.current) == null ? void 0 : t.getCurrentText();
745
- }
746
- })), N(() => {
747
- var n;
748
- const t = (n = e == null ? void 0 : e.data) == null ? void 0 : n.id;
749
- t && de((o) => $e(je({}, o), {
750
- [t]: []
751
- }));
752
- }, [(bt = e == null ? void 0 : e.data) == null ? void 0 : bt.id]), /* @__PURE__ */ U("div", {
753
- className: "agent-chat",
754
- children: [wn ? /* @__PURE__ */ g("div", {
755
- className: "session-loading",
756
- children: /* @__PURE__ */ g($t, {})
757
- }) : /* @__PURE__ */ U(Bn, {
758
- children: [(f == null ? void 0 : f.promptVariables) && /* @__PURE__ */ g(ui, {
759
- ref: et,
760
- appId: i.id,
761
- currentSession: e,
762
- promptVariables: H,
763
- setPromptVariables: ge,
764
- setCurrentSession: x
765
- }), /* @__PURE__ */ U("div", {
766
- className: "chat-main",
767
- id: "chat-main",
768
- style: Xt,
769
- children: [/* @__PURE__ */ g("div", {
770
- className: "chat-main-wrapper",
771
- id: "scrollableDiv",
772
- style: {
773
- height: "100%",
774
- overflowY: "auto",
775
- display: "flex",
776
- flexDirection: "column-reverse"
777
- },
778
- ref: O,
779
- onScroll: Rn,
780
- children: (xt = e == null ? void 0 : e.data) != null && xt.id && (w != null && w.length) ? /* @__PURE__ */ U(mi, {
781
- dataLength: w.length,
782
- next: An,
783
- style: {
784
- display: "flex",
785
- flexDirection: "column-reverse",
786
- overflowX: "hidden"
787
- },
788
- inverse: !0,
789
- endMessage: w.length > qt && // 少于一页不展示这个提示
790
- ((Ct = O.current) != null && Ct.scrollTop) && ((It = O.current) == null ? void 0 : It.scrollTop) < -10 ? /* @__PURE__ */ g(Yn, {
791
- plain: !0,
792
- children: "没有更多数据了"
793
- }) : null,
794
- hasMore: st,
795
- loader: /* @__PURE__ */ g("div", {
796
- style: {
797
- height: "50px",
798
- textAlign: "center",
799
- overflow: "hidden"
800
- },
801
- children: /* @__PURE__ */ g($t, {})
802
- }),
803
- scrollableTarget: "scrollableDiv",
804
- children: [w.map((t, n) => /* @__PURE__ */ g(bi, {
805
- application: i,
806
- currentSession: e,
807
- history: t,
808
- docViewerUrl: A,
809
- isLastHistory: n === 0,
810
- onRelatedClick: Fn,
811
- onAgainClick: Un,
812
- onEditClick: On,
813
- markdown: a == null ? void 0 : a.markdown
814
- }, t.messageId + n)), !st && kt]
815
- }) : /* @__PURE__ */ U("div", {
816
- className: "main-empty",
817
- children: [(a == null ? void 0 : a.greeting) !== !1 && /* @__PURE__ */ g(li, {
818
- text: (
819
- // 第一优先级:features配置
820
- a != null && a.greeting && typeof a.greeting == "object" && a.greeting.text !== void 0 ? a.greeting.text : (
821
- // 第二优先级:application.arrange[0].greetings
822
- (Et = i.arrange) != null && Et.length && ((Nt = i.arrange[0]) != null && Nt.greetings) ? i.arrange[0].greetings : (
823
- // 第三优先级:默认文本
824
- _t.text
825
- )
826
- )
827
- ),
828
- icon: a === void 0 || a.greeting === !0 || ((Lt = a.greeting) == null ? void 0 : Lt.icon) === void 0 ? Gt || _t.icon : a.greeting.icon,
829
- children: !!Ge.length && (((a == null ? void 0 : a.greeting) === void 0 || (a == null ? void 0 : a.greeting)) === !0 || typeof (a == null ? void 0 : a.greeting) == "object" && a.greeting.questions !== !1) && /* @__PURE__ */ g(ai, {
830
- ref: Re,
831
- sid: (Pt = e == null ? void 0 : e.data) == null ? void 0 : Pt.id,
832
- isRecommendClearing: Ze,
833
- data: Ge,
834
- layoutBreakpoints: typeof (a == null ? void 0 : a.greeting) == "object" ? a.greeting.layoutBreakpoints : void 0,
835
- onItemClick: (t) => {
836
- var o, r, s;
837
- if (me(t == null ? void 0 : t.question), te(t == null ? void 0 : t.question), Ze)
838
- return;
839
- t != null && t.id && ee(!0);
840
- const n = (o = e == null ? void 0 : e.data) == null ? void 0 : o.id;
841
- f != null && f.fileUpload ? (s = (r = fe.current) == null ? void 0 : r.clear()) == null || s.then(() => {
842
- var c, l;
843
- t != null && t.id && (n ? (c = yt(n, t)) == null || c.finally(() => {
844
- ee(!1);
845
- }) : (ee(!1), Q(!0), (l = vt()) == null || l.then((v) => {
846
- var d;
847
- (d = yt(v.id, t)) == null || d.finally(() => {
848
- ee(!1);
849
- });
850
- })));
851
- }) : n ? ee(!1) : (ee(!1), Q(!0), vt());
852
- }
853
- })
854
- }), kt]
855
- })
856
- }), nt && /* @__PURE__ */ g("div", {
857
- className: "session-stop",
858
- children: /* @__PURE__ */ g(G, {
859
- type: "primary",
860
- style: {
861
- background: "white"
862
- },
863
- ghost: !0,
864
- size: "small",
865
- icon: /* @__PURE__ */ g(re, {
866
- type: "icon-zantinghuida",
867
- style: {
868
- fontSize: 16
869
- }
870
- }),
871
- onClick: () => Dn(),
872
- children: "停止回答"
873
- })
874
- }), it && (w == null ? void 0 : w.length) > 0 && /* @__PURE__ */ g("div", {
875
- className: "back-bottom",
876
- children: /* @__PURE__ */ g(G, {
877
- size: "small",
878
- onClick: () => Tn({
879
- behavior: "smooth"
880
- }),
881
- type: "link",
882
- icon: /* @__PURE__ */ g(re, {
883
- type: "icon-yijianhuidaodibu",
884
- style: {
885
- fontSize: 24
886
- }
887
- })
888
- })
889
- })]
890
- }), /* @__PURE__ */ g("div", {
891
- className: "chat-footer",
892
- children: /* @__PURE__ */ U("div", {
893
- className: "chat-footer-input",
894
- children: [ce.length > 0 && /* @__PURE__ */ g("div", {
895
- className: "input-files",
896
- children: ce.map((t, n) => /* @__PURE__ */ g(ni, {
897
- className: "thumb-40",
898
- file: t,
899
- actions: {
900
- upload: (o) => $(void 0, null, function* () {
901
- Qe((r) => r + 1);
902
- try {
903
- return yield Ln(o);
904
- } finally {
905
- Qe((r) => Math.max(0, r - 1));
906
- }
907
- }),
908
- remove: () => {
909
- ve((o) => o.filter((r, s) => s !== n)), we((o) => o.filter((r, s) => s !== n));
910
- }
911
- },
912
- onUrlChange: (o) => {
913
- we((r) => {
914
- const s = [...r];
915
- return s[n] = o, s;
916
- });
917
- }
918
- }, n))
919
- }), /* @__PURE__ */ U("div", {
920
- className: "footer-upload-action-wrapper",
921
- children: [/* @__PURE__ */ U(Ee, {
922
- className: "footer-upload-action",
923
- onClick: (t) => t.preventDefault(),
924
- children: [/* @__PURE__ */ U(Ee, {
925
- children: [(i.type === S.Agent && (f == null ? void 0 : f.imageUpload) || i.type === S.Dialog && ((Dt = i.arrange) == null ? void 0 : Dt.length) && !!i.arrange[0].visionOpen && (f == null ? void 0 : f.imageUpload)) && /* @__PURE__ */ g(Qn, {
926
- multiple: !0,
927
- disabled: ce.length >= Z || F,
928
- accept: ".jpg, .png, .jpeg,.bmp",
929
- listType: "picture-card",
930
- beforeUpload: ft,
931
- className: "footer-upload-picture",
932
- showUploadList: !1,
933
- children: ce.length < Z ? /* @__PURE__ */ g(Xn, {
934
- placement: "topLeft",
935
- overlayClassName: "footer-upload-tooltip",
936
- title: /* @__PURE__ */ g("div", {
937
- children: `支持上传.jpg .png .jpeg
938
- .bmp格式的图片数据,单文件最大${Ve}M,最多${Z}张`
939
- }),
940
- children: /* @__PURE__ */ g(G, {
941
- type: "text",
942
- className: "camera-out-btn",
943
- style: {
944
- width: "22px",
945
- position: "relative",
946
- bottom: "-2px"
947
- },
948
- icon: /* @__PURE__ */ g(re, {
949
- type: "icon-shangchuantupian",
950
- className: "icon-tianjia",
951
- style: {
952
- fontSize: "22px"
953
- }
954
- })
955
- })
956
- }) : /* @__PURE__ */ g(G, {
957
- type: "text",
958
- className: "camera-out-btn",
959
- style: {
960
- width: "22px",
961
- position: "relative",
962
- bottom: "-2px"
963
- },
964
- disabled: !0,
965
- icon: /* @__PURE__ */ g(re, {
966
- type: "icon-shangchuantupian",
967
- className: "icon-tianjia",
968
- style: {
969
- fontSize: "22px"
970
- }
971
- })
972
- })
973
- }), z && (f != null && f.fileUpload) && (i != null && i.id) ? /* @__PURE__ */ g(fi, {
974
- appId: i == null ? void 0 : i.id,
975
- ref: fe,
976
- isFirstSession: ot,
977
- docViewerUrl: A,
978
- onStatusChange: (t) => $(void 0, null, function* () {
979
- t !== "process" ? (be(!0), Me()) : be(!1);
980
- }),
981
- createSession: () => mt().then((t) => {
982
- var o;
983
- return ((o = t.data) == null ? void 0 : o.id) || "";
984
- }),
985
- sid: (Tt = e == null ? void 0 : e.data) == null ? void 0 : Tt.id,
986
- disabled: Oe || F,
987
- afterFileAdd: (t, n) => {
988
- n && de((o) => {
989
- const r = o[n] || [];
990
- return {
991
- [n]: [...r, t]
992
- };
993
- });
994
- },
995
- afterFileDelete: (t) => {
996
- var o;
997
- const n = (o = e == null ? void 0 : e.data) == null ? void 0 : o.id;
998
- n && de((r) => {
999
- const s = r[n] || [];
1000
- return {
1001
- [n]: s.filter((c) => c.id !== t)
1002
- };
1003
- });
1004
- },
1005
- onFileListChange: (t) => {
1006
- fn(t);
1007
- },
1008
- shouldContinue: un,
1009
- afterFilesClear: () => {
1010
- var n;
1011
- const t = (n = e == null ? void 0 : e.data) == null ? void 0 : n.id;
1012
- t && (de({
1013
- [t]: []
1014
- }), Me());
1015
- }
1016
- }) : null, (f == null ? void 0 : f.prompt) && (i == null ? void 0 : i.id) && /* @__PURE__ */ g(vi, {
1017
- appId: i.id,
1018
- list: [],
1019
- search: Je ? rn : "",
1020
- onPromptSelect: (t) => {
1021
- te(t.context), me(t.context);
1022
- },
1023
- disabled: F
1024
- })]
1025
- }), /* @__PURE__ */ U(Ee, {
1026
- children: [(f == null ? void 0 : f.connectNetwork) && i.type === S.Dialog && ((Rt = i.arrange) == null ? void 0 : Rt.length) && !!i.arrange[0].enableNetOpen && /* @__PURE__ */ g(yi, {
1027
- sessionId: (Ot = e == null ? void 0 : e.data) == null ? void 0 : Ot.id,
1028
- netStatus: T,
1029
- enable: typeof (a == null ? void 0 : a.connectNetwork) == "object" && typeof (a == null ? void 0 : a.connectNetwork.diabled) == "boolean" ? !(a != null && a.connectNetwork.diabled) : vn,
1030
- disabledTip: e ? void 0 : "网络访问已被禁用",
1031
- onNetStatusChange: (t) => {
1032
- Mn(t);
1033
- }
1034
- }), (f == null ? void 0 : f.sessionList) && /* @__PURE__ */ g(pi, {
1035
- currentSessionId: (Ft = e == null ? void 0 : e.data) == null ? void 0 : Ft.id,
1036
- onSessionChange: (t, n) => {
1037
- te(void 0), Ie(!0), x == null || x(n);
1038
- },
1039
- disabled: F
1040
- }), Zt && Jt === "float" && /* @__PURE__ */ g("div", {
1041
- className: "session-history-drawer-component",
1042
- children: /* @__PURE__ */ g(Gn, {
1043
- placement: "topRight",
1044
- showArrow: !1,
1045
- overlayClassName: "session-history-overlay",
1046
- overlayStyle: {
1047
- padding: "4px"
1048
- },
1049
- getPopupContainer: (t) => t.parentNode,
1050
- content: "会话历史记录",
1051
- children: /* @__PURE__ */ g(G, {
1052
- className: "history-overlay-action",
1053
- disabled: F,
1054
- type: "text",
1055
- icon: /* @__PURE__ */ g(re, {
1056
- type: "icon-lishijilu",
1057
- style: {
1058
- fontSize: 24
1059
- }
1060
- }),
1061
- onClick: () => lt(!0)
1062
- })
1063
- })
1064
- }), (f == null ? void 0 : f.sessionOpen) && /* @__PURE__ */ g(G, {
1065
- icon: /* @__PURE__ */ g(di, {}),
1066
- className: "add-btn",
1067
- type: "primary",
1068
- disabled: nt || !e || !w.length || F,
1069
- onClick: () => {
1070
- var t, n;
1071
- Ie(!1), x == null || x(null), ie.current = null, R(!1), (t = et.current) == null || t.clear(), (n = Re.current) == null || n.clear();
1072
- },
1073
- children: "新会话"
1074
- })]
1075
- })]
1076
- }), !!Fe && /* @__PURE__ */ g("div", {
1077
- className: "remainingSeconds-mark"
1078
- })]
1079
- }), /* @__PURE__ */ U("div", {
1080
- className: "footer-textarea",
1081
- onPaste: ut,
1082
- onPasteCapture: ut,
1083
- onDrop: ht,
1084
- onDropCapture: ht,
1085
- onDragOver: pt,
1086
- onDragOverCapture: pt,
1087
- children: [/* @__PURE__ */ g(ri, {
1088
- ref: ke,
1089
- maxLength: en,
1090
- text: ln,
1091
- networkStatus: !1,
1092
- loading: rt || Ce,
1093
- disabled: Ke || Xe || F || rt || Ce,
1094
- onTextSend: dt,
1095
- onChange: (t, n) => {
1096
- te(t);
1097
- const o = n.getText().replace(/[\n\s]+$/, "");
1098
- me(o), an(o), Je || sn(!0);
1099
- },
1100
- clearAction: /* @__PURE__ */ g(Ee, {
1101
- size: 0,
1102
- children: /* @__PURE__ */ g(G, {
1103
- type: "link",
1104
- disabled: Oe || F,
1105
- ghost: !0,
1106
- icon: /* @__PURE__ */ g(re, {
1107
- style: {
1108
- fontSize: 22
1109
- },
1110
- type: "icon-qingchujiyi"
1111
- }),
1112
- onClick: () => Cn()
1113
- })
1114
- })
1115
- }), !!Fe && /* @__PURE__ */ U("div", {
1116
- className: "remainingSeconds-time",
1117
- children: ["您之前对话触发敏感词拦截,当前处于禁言状态,暂时无法发送消息,剩余禁言时长", Fe]
1118
- })]
1119
- })]
1120
- })
1121
- }), /* @__PURE__ */ g(ci, {
1122
- tips: Qt
1123
- }), tt && /* @__PURE__ */ g(gi, {
1124
- isvisible: tt,
1125
- files: dn,
1126
- sessionId: (Ut = e == null ? void 0 : e.data) == null ? void 0 : Ut.id,
1127
- onClose: (t) => {
1128
- cn(!1), pn(!1);
1129
- }
1130
- })]
1131
- }), at && /* @__PURE__ */ g(hi, {
1132
- currentSession: e,
1133
- application: i,
1134
- networkStatus: T,
1135
- setCurrentSession: x,
1136
- disabled: F,
1137
- isSessionHistoryVisible: at,
1138
- setIsSessionHistoryVisible: lt,
1139
- onSessionChange: (t) => {
1140
- Ie(!0);
1141
- }
1142
- })]
1143
- });
1144
- });
1145
- export {
1146
- no as default
1147
- };