@glodon-aiot/agent-cli-ui 2.4.7

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 (406) hide show
  1. package/README.git.md +73 -0
  2. package/README.lib.md +135 -0
  3. package/dist/es/AgentClientUI.mjs +155 -0
  4. package/dist/es/Dialog/AgentChat/index.mjs +757 -0
  5. package/dist/es/Dialog/AgentChat/style.less.mjs +4 -0
  6. package/dist/es/Dialog/ConnectToNetwork/index.mjs +92 -0
  7. package/dist/es/Dialog/ConnectToNetwork/style.less.mjs +4 -0
  8. package/dist/es/Dialog/FileCard/doc-icons/doc.svg.mjs +4 -0
  9. package/dist/es/Dialog/FileCard/doc-icons/docx.svg.mjs +4 -0
  10. package/dist/es/Dialog/FileCard/doc-icons/pdf.svg.mjs +4 -0
  11. package/dist/es/Dialog/FileCard/index.mjs +142 -0
  12. package/dist/es/Dialog/FileCard/style.less.mjs +4 -0
  13. package/dist/es/Dialog/FilePreview/index.mjs +90 -0
  14. package/dist/es/Dialog/FilePreview/style.less.mjs +4 -0
  15. package/dist/es/Dialog/Greeting/index.mjs +31 -0
  16. package/dist/es/Dialog/Greeting/style.less.mjs +4 -0
  17. package/dist/es/Dialog/HistoryContent/index.mjs +14 -0
  18. package/dist/es/Dialog/HistoryContent/style.less.mjs +4 -0
  19. package/dist/es/Dialog/HistoryItem/index.mjs +355 -0
  20. package/dist/es/Dialog/HistoryItem/style.less.mjs +4 -0
  21. package/dist/es/Dialog/HistoryItem/think.svg.mjs +4 -0
  22. package/dist/es/Dialog/KnowledgeDoc/index.mjs +46 -0
  23. package/dist/es/Dialog/KnowledgeDoc/style.less.mjs +4 -0
  24. package/dist/es/Dialog/KnowledgeList/KnowledgeSelect/index.mjs +68 -0
  25. package/dist/es/Dialog/KnowledgeList/KnowledgeSelect/style.less.mjs +4 -0
  26. package/dist/es/Dialog/KnowledgeList/index.mjs +69 -0
  27. package/dist/es/Dialog/KnowledgeList/style.less.mjs +4 -0
  28. package/dist/es/Dialog/PromptManager/PromptList/PromptListItem.mjs +89 -0
  29. package/dist/es/Dialog/PromptManager/PromptList/PublicPromptList.mjs +48 -0
  30. package/dist/es/Dialog/PromptManager/PromptList/access/empty.svg.mjs +4 -0
  31. package/dist/es/Dialog/PromptManager/PromptList/style.less.mjs +4 -0
  32. package/dist/es/Dialog/PromptManager/index.mjs +128 -0
  33. package/dist/es/Dialog/PromptManager/style.less.mjs +4 -0
  34. package/dist/es/Dialog/PromptSetting/index.mjs +130 -0
  35. package/dist/es/Dialog/PromptSetting/style.less.mjs +4 -0
  36. package/dist/es/Dialog/Recommend/RecommendItem.mjs +96 -0
  37. package/dist/es/Dialog/Recommend/index.mjs +60 -0
  38. package/dist/es/Dialog/Recommend/style.less.mjs +4 -0
  39. package/dist/es/Dialog/Recommend/tip.svg.mjs +4 -0
  40. package/dist/es/Dialog/ReferCollapse/index.mjs +65 -0
  41. package/dist/es/Dialog/ReferCollapse/style.less.mjs +4 -0
  42. package/dist/es/Dialog/SearchReference/index.mjs +64 -0
  43. package/dist/es/Dialog/SearchReference/style.less.mjs +4 -0
  44. package/dist/es/Dialog/SessionAction/index.mjs +232 -0
  45. package/dist/es/Dialog/SessionAction/style.less.mjs +4 -0
  46. package/dist/es/Dialog/SessionList/index.mjs +197 -0
  47. package/dist/es/Dialog/SessionList/style.less.mjs +4 -0
  48. package/dist/es/Dialog/SessionListDrawer/HistorySessionList/NameEditPanel.mjs +48 -0
  49. package/dist/es/Dialog/SessionListDrawer/HistorySessionList/SessionItem.mjs +142 -0
  50. package/dist/es/Dialog/SessionListDrawer/HistorySessionList/doc-icons/doc.svg.mjs +4 -0
  51. package/dist/es/Dialog/SessionListDrawer/HistorySessionList/doc-icons/docx.svg.mjs +4 -0
  52. package/dist/es/Dialog/SessionListDrawer/HistorySessionList/doc-icons/pdf.svg.mjs +4 -0
  53. package/dist/es/Dialog/SessionListDrawer/HistorySessionList/index.mjs +120 -0
  54. package/dist/es/Dialog/SessionListDrawer/HistorySessionList/style.less.mjs +4 -0
  55. package/dist/es/Dialog/SessionListDrawer/index.mjs +44 -0
  56. package/dist/es/Dialog/SessionListDrawer/style.less.mjs +4 -0
  57. package/dist/es/Dialog/SessionRefer/ReferItem/index.mjs +94 -0
  58. package/dist/es/Dialog/SessionRefer/ReferItem/style.less.mjs +4 -0
  59. package/dist/es/Dialog/SessionRefer/index.mjs +86 -0
  60. package/dist/es/Dialog/SessionRefer/style.less.mjs +4 -0
  61. package/dist/es/Dialog/SessionRelated/index.mjs +43 -0
  62. package/dist/es/Dialog/SessionRelated/style.less.mjs +4 -0
  63. package/dist/es/Dialog/UploadKnowledgeFiles/ClearModal/index.mjs +51 -0
  64. package/dist/es/Dialog/UploadKnowledgeFiles/ClearModal/style.less.mjs +4 -0
  65. package/dist/es/Dialog/UploadKnowledgeFiles/index.mjs +368 -0
  66. package/dist/es/Dialog/UploadKnowledgeFiles/style.less.mjs +4 -0
  67. package/dist/es/Dialog/UploadingPrompt/index.mjs +67 -0
  68. package/dist/es/Dialog/UploadingPrompt/style.less.mjs +4 -0
  69. package/dist/es/Dialog/index.mjs +128 -0
  70. package/dist/es/Dialog/style.less.mjs +4 -0
  71. package/dist/es/FileCard/doc-icons/doc.svg.mjs +4 -0
  72. package/dist/es/FileCard/doc-icons/docx.svg.mjs +4 -0
  73. package/dist/es/FileCard/doc-icons/pdf.svg.mjs +4 -0
  74. package/dist/es/FileItem/index.mjs +85 -0
  75. package/dist/es/FileItem/style.less.mjs +4 -0
  76. package/dist/es/Footer/FooterWarning.mjs +25 -0
  77. package/dist/es/Footer/index.mjs +18 -0
  78. package/dist/es/Footer/style.less.mjs +4 -0
  79. package/dist/es/Iconfont/index.mjs +12 -0
  80. package/dist/es/InputProgress/index.mjs +39 -0
  81. package/dist/es/InputProgress/style.less.mjs +4 -0
  82. package/dist/es/QuillEditor/index.mjs +219 -0
  83. package/dist/es/QuillEditor/style.less.mjs +4 -0
  84. package/dist/es/_virtual/_cloneBuffer.mjs +4 -0
  85. package/dist/es/_virtual/_commonjsHelpers.mjs +8 -0
  86. package/dist/es/_virtual/_nodeUtil.mjs +4 -0
  87. package/dist/es/_virtual/index.mjs +4 -0
  88. package/dist/es/_virtual/index2.mjs +4 -0
  89. package/dist/es/_virtual/index3.mjs +4 -0
  90. package/dist/es/_virtual/index4.mjs +4 -0
  91. package/dist/es/_virtual/isBuffer.mjs +4 -0
  92. package/dist/es/_virtual/jsx-runtime.mjs +7 -0
  93. package/dist/es/_virtual/jsx-runtime2.mjs +4 -0
  94. package/dist/es/_virtual/minio-zj.mjs +4 -0
  95. package/dist/es/_virtual/react-jsx-runtime.production.min.mjs +4 -0
  96. package/dist/es/assets/brand.svg.mjs +4 -0
  97. package/dist/es/assets/icon.svg.mjs +4 -0
  98. package/dist/es/components/Copy/index.mjs +44 -0
  99. package/dist/es/components/Copy/style.less.mjs +4 -0
  100. package/dist/es/components/JsonDisplay/index.mjs +16 -0
  101. package/dist/es/components/JsonDisplay/style.less.mjs +4 -0
  102. package/dist/es/components/Markdown/Code/index.mjs +69 -0
  103. package/dist/es/components/Markdown/Image/index.mjs +26 -0
  104. package/dist/es/components/Markdown/index.mjs +48 -0
  105. package/dist/es/components/Markdown/style.less.mjs +4 -0
  106. package/dist/es/components/WebLink/index.mjs +26 -0
  107. package/dist/es/constant.mjs +96 -0
  108. package/dist/es/context.mjs +7 -0
  109. package/dist/es/favicon.ico +0 -0
  110. package/dist/es/favicon2.ico +0 -0
  111. package/dist/es/font/font_4108228_4w5nlhafpte.js +1 -0
  112. package/dist/es/font/font_4439177_0sppkcnqiqgs.js +1 -0
  113. package/dist/es/font/gos-font.js +64 -0
  114. package/dist/es/images/empty.svg +40 -0
  115. package/dist/es/images/loading.gif +0 -0
  116. package/dist/es/images/logo.png +0 -0
  117. package/dist/es/images/map-example.png +0 -0
  118. package/dist/es/images/sketch.png +0 -0
  119. package/dist/es/index.html +43 -0
  120. package/dist/es/index.mjs +325 -0
  121. package/dist/es/logo192.png +0 -0
  122. package/dist/es/logo512.png +0 -0
  123. package/dist/es/manifest.json +25 -0
  124. package/dist/es/node_modules/@babel/runtime/helpers/esm/extends.mjs +13 -0
  125. package/dist/es/node_modules/@glodon-aiot/minio/dist/minio-zj.mjs +26485 -0
  126. package/dist/es/node_modules/@socket.io/component-emitter/lib/esm/index.mjs +54 -0
  127. package/dist/es/node_modules/ahooks/es/useKeyPress/index.mjs +221 -0
  128. package/dist/es/node_modules/ahooks/es/useLatest/index.mjs +8 -0
  129. package/dist/es/node_modules/ahooks/es/useMemoizedFn/index.mjs +19 -0
  130. package/dist/es/node_modules/ahooks/es/useUnmount/index.mjs +17 -0
  131. package/dist/es/node_modules/ahooks/es/utils/createEffectWithTarget.mjs +27 -0
  132. package/dist/es/node_modules/ahooks/es/utils/depsAreSame.mjs +11 -0
  133. package/dist/es/node_modules/ahooks/es/utils/depsEqual.mjs +7 -0
  134. package/dist/es/node_modules/ahooks/es/utils/domTarget.mjs +13 -0
  135. package/dist/es/node_modules/ahooks/es/utils/index.mjs +12 -0
  136. package/dist/es/node_modules/ahooks/es/utils/isAppleDevice.mjs +5 -0
  137. package/dist/es/node_modules/ahooks/es/utils/isBrowser.mjs +5 -0
  138. package/dist/es/node_modules/ahooks/es/utils/isDev.mjs +5 -0
  139. package/dist/es/node_modules/ahooks/es/utils/useDeepCompareWithTarget.mjs +11 -0
  140. package/dist/es/node_modules/ahooks/es/utils/useEffectWithTarget.mjs +7 -0
  141. package/dist/es/node_modules/antd/es/calendar/locale/zh_CN.mjs +4 -0
  142. package/dist/es/node_modules/antd/es/date-picker/locale/zh_CN.mjs +23 -0
  143. package/dist/es/node_modules/antd/es/locale/zh_CN.mjs +132 -0
  144. package/dist/es/node_modules/antd/es/time-picker/locale/zh_CN.mjs +8 -0
  145. package/dist/es/node_modules/base64-js/index.mjs +47 -0
  146. package/dist/es/node_modules/buffer/index.mjs +927 -0
  147. package/dist/es/node_modules/classnames/index.mjs +42 -0
  148. package/dist/es/node_modules/copy-to-clipboard/index.mjs +46 -0
  149. package/dist/es/node_modules/engine.io-client/build/esm/contrib/has-cors.mjs +9 -0
  150. package/dist/es/node_modules/engine.io-client/build/esm/contrib/parseqs.mjs +18 -0
  151. package/dist/es/node_modules/engine.io-client/build/esm/contrib/parseuri.mjs +24 -0
  152. package/dist/es/node_modules/engine.io-client/build/esm/contrib/yeast.mjs +19 -0
  153. package/dist/es/node_modules/engine.io-client/build/esm/globalThis.browser.mjs +4 -0
  154. package/dist/es/node_modules/engine.io-client/build/esm/socket.mjs +317 -0
  155. package/dist/es/node_modules/engine.io-client/build/esm/transport.mjs +113 -0
  156. package/dist/es/node_modules/engine.io-client/build/esm/transports/index.mjs +11 -0
  157. package/dist/es/node_modules/engine.io-client/build/esm/transports/polling.mjs +273 -0
  158. package/dist/es/node_modules/engine.io-client/build/esm/transports/websocket-constructor.browser.mjs +8 -0
  159. package/dist/es/node_modules/engine.io-client/build/esm/transports/websocket.mjs +87 -0
  160. package/dist/es/node_modules/engine.io-client/build/esm/transports/webtransport.mjs +52 -0
  161. package/dist/es/node_modules/engine.io-client/build/esm/transports/xmlhttprequest.browser.mjs +21 -0
  162. package/dist/es/node_modules/engine.io-client/build/esm/util.mjs +23 -0
  163. package/dist/es/node_modules/engine.io-parser/build/esm/commons.mjs +21 -0
  164. package/dist/es/node_modules/engine.io-parser/build/esm/contrib/base64-arraybuffer.mjs +14 -0
  165. package/dist/es/node_modules/engine.io-parser/build/esm/decodePacket.browser.mjs +39 -0
  166. package/dist/es/node_modules/engine.io-parser/build/esm/encodePacket.browser.mjs +28 -0
  167. package/dist/es/node_modules/engine.io-parser/build/esm/index.mjs +105 -0
  168. package/dist/es/node_modules/ieee754/index.mjs +28 -0
  169. package/dist/es/node_modules/js-base64/base64.mjs +31 -0
  170. package/dist/es/node_modules/lodash/_Hash.mjs +22 -0
  171. package/dist/es/node_modules/lodash/_ListCache.mjs +22 -0
  172. package/dist/es/node_modules/lodash/_Map.mjs +6 -0
  173. package/dist/es/node_modules/lodash/_MapCache.mjs +22 -0
  174. package/dist/es/node_modules/lodash/_Stack.mjs +20 -0
  175. package/dist/es/node_modules/lodash/_Symbol.mjs +5 -0
  176. package/dist/es/node_modules/lodash/_Uint8Array.mjs +5 -0
  177. package/dist/es/node_modules/lodash/_apply.mjs +17 -0
  178. package/dist/es/node_modules/lodash/_arrayLikeKeys.mjs +21 -0
  179. package/dist/es/node_modules/lodash/_assignMergeValue.mjs +10 -0
  180. package/dist/es/node_modules/lodash/_assignValue.mjs +11 -0
  181. package/dist/es/node_modules/lodash/_assocIndexOf.mjs +12 -0
  182. package/dist/es/node_modules/lodash/_baseAssignValue.mjs +14 -0
  183. package/dist/es/node_modules/lodash/_baseCreate.mjs +17 -0
  184. package/dist/es/node_modules/lodash/_baseFor.mjs +5 -0
  185. package/dist/es/node_modules/lodash/_baseGetTag.mjs +11 -0
  186. package/dist/es/node_modules/lodash/_baseIsArguments.mjs +10 -0
  187. package/dist/es/node_modules/lodash/_baseIsNative.mjs +15 -0
  188. package/dist/es/node_modules/lodash/_baseIsTypedArray.mjs +13 -0
  189. package/dist/es/node_modules/lodash/_baseKeysIn.mjs +16 -0
  190. package/dist/es/node_modules/lodash/_baseMerge.mjs +22 -0
  191. package/dist/es/node_modules/lodash/_baseMergeDeep.mjs +33 -0
  192. package/dist/es/node_modules/lodash/_baseRest.mjs +11 -0
  193. package/dist/es/node_modules/lodash/_baseSetToString.mjs +14 -0
  194. package/dist/es/node_modules/lodash/_baseTimes.mjs +9 -0
  195. package/dist/es/node_modules/lodash/_baseTrim.mjs +9 -0
  196. package/dist/es/node_modules/lodash/_baseUnary.mjs +9 -0
  197. package/dist/es/node_modules/lodash/_cloneArrayBuffer.mjs +10 -0
  198. package/dist/es/node_modules/lodash/_cloneBuffer.mjs +17 -0
  199. package/dist/es/node_modules/lodash/_cloneTypedArray.mjs +10 -0
  200. package/dist/es/node_modules/lodash/_copyArray.mjs +10 -0
  201. package/dist/es/node_modules/lodash/_copyObject.mjs +16 -0
  202. package/dist/es/node_modules/lodash/_coreJsData.mjs +5 -0
  203. package/dist/es/node_modules/lodash/_createAssigner.mjs +17 -0
  204. package/dist/es/node_modules/lodash/_createBaseFor.mjs +14 -0
  205. package/dist/es/node_modules/lodash/_defineProperty.mjs +11 -0
  206. package/dist/es/node_modules/lodash/_freeGlobal.mjs +5 -0
  207. package/dist/es/node_modules/lodash/_getMapData.mjs +10 -0
  208. package/dist/es/node_modules/lodash/_getNative.mjs +11 -0
  209. package/dist/es/node_modules/lodash/_getPrototype.mjs +5 -0
  210. package/dist/es/node_modules/lodash/_getRawTag.mjs +16 -0
  211. package/dist/es/node_modules/lodash/_getValue.mjs +7 -0
  212. package/dist/es/node_modules/lodash/_hashClear.mjs +9 -0
  213. package/dist/es/node_modules/lodash/_hashDelete.mjs +8 -0
  214. package/dist/es/node_modules/lodash/_hashGet.mjs +14 -0
  215. package/dist/es/node_modules/lodash/_hashHas.mjs +10 -0
  216. package/dist/es/node_modules/lodash/_hashSet.mjs +10 -0
  217. package/dist/es/node_modules/lodash/_initCloneObject.mjs +11 -0
  218. package/dist/es/node_modules/lodash/_isIndex.mjs +9 -0
  219. package/dist/es/node_modules/lodash/_isIterateeCall.mjs +15 -0
  220. package/dist/es/node_modules/lodash/_isKeyable.mjs +8 -0
  221. package/dist/es/node_modules/lodash/_isMasked.mjs +12 -0
  222. package/dist/es/node_modules/lodash/_isPrototype.mjs +9 -0
  223. package/dist/es/node_modules/lodash/_listCacheClear.mjs +7 -0
  224. package/dist/es/node_modules/lodash/_listCacheDelete.mjs +13 -0
  225. package/dist/es/node_modules/lodash/_listCacheGet.mjs +10 -0
  226. package/dist/es/node_modules/lodash/_listCacheHas.mjs +9 -0
  227. package/dist/es/node_modules/lodash/_listCacheSet.mjs +10 -0
  228. package/dist/es/node_modules/lodash/_mapCacheClear.mjs +15 -0
  229. package/dist/es/node_modules/lodash/_mapCacheDelete.mjs +10 -0
  230. package/dist/es/node_modules/lodash/_mapCacheGet.mjs +9 -0
  231. package/dist/es/node_modules/lodash/_mapCacheHas.mjs +9 -0
  232. package/dist/es/node_modules/lodash/_mapCacheSet.mjs +10 -0
  233. package/dist/es/node_modules/lodash/_nativeCreate.mjs +5 -0
  234. package/dist/es/node_modules/lodash/_nativeKeysIn.mjs +11 -0
  235. package/dist/es/node_modules/lodash/_nodeUtil.mjs +17 -0
  236. package/dist/es/node_modules/lodash/_objectToString.mjs +8 -0
  237. package/dist/es/node_modules/lodash/_overArg.mjs +9 -0
  238. package/dist/es/node_modules/lodash/_overRest.mjs +16 -0
  239. package/dist/es/node_modules/lodash/_root.mjs +5 -0
  240. package/dist/es/node_modules/lodash/_safeGet.mjs +8 -0
  241. package/dist/es/node_modules/lodash/_setToString.mjs +6 -0
  242. package/dist/es/node_modules/lodash/_shortOut.mjs +17 -0
  243. package/dist/es/node_modules/lodash/_stackClear.mjs +9 -0
  244. package/dist/es/node_modules/lodash/_stackDelete.mjs +8 -0
  245. package/dist/es/node_modules/lodash/_stackGet.mjs +7 -0
  246. package/dist/es/node_modules/lodash/_stackHas.mjs +7 -0
  247. package/dist/es/node_modules/lodash/_stackSet.mjs +18 -0
  248. package/dist/es/node_modules/lodash/_toSource.mjs +18 -0
  249. package/dist/es/node_modules/lodash/_trimmedEndIndex.mjs +10 -0
  250. package/dist/es/node_modules/lodash/constant.mjs +9 -0
  251. package/dist/es/node_modules/lodash/debounce.mjs +57 -0
  252. package/dist/es/node_modules/lodash/eq.mjs +7 -0
  253. package/dist/es/node_modules/lodash/identity.mjs +7 -0
  254. package/dist/es/node_modules/lodash/isArguments.mjs +10 -0
  255. package/dist/es/node_modules/lodash/isArray.mjs +4 -0
  256. package/dist/es/node_modules/lodash/isArrayLike.mjs +10 -0
  257. package/dist/es/node_modules/lodash/isArrayLikeObject.mjs +10 -0
  258. package/dist/es/node_modules/lodash/isBuffer.mjs +12 -0
  259. package/dist/es/node_modules/lodash/isFunction.mjs +13 -0
  260. package/dist/es/node_modules/lodash/isLength.mjs +8 -0
  261. package/dist/es/node_modules/lodash/isObject.mjs +8 -0
  262. package/dist/es/node_modules/lodash/isObjectLike.mjs +7 -0
  263. package/dist/es/node_modules/lodash/isPlainObject.mjs +17 -0
  264. package/dist/es/node_modules/lodash/isSymbol.mjs +10 -0
  265. package/dist/es/node_modules/lodash/isTypedArray.mjs +7 -0
  266. package/dist/es/node_modules/lodash/keysIn.mjs +11 -0
  267. package/dist/es/node_modules/lodash/merge.mjs +10 -0
  268. package/dist/es/node_modules/lodash/now.mjs +7 -0
  269. package/dist/es/node_modules/lodash/stubFalse.mjs +7 -0
  270. package/dist/es/node_modules/lodash/toNumber.mjs +23 -0
  271. package/dist/es/node_modules/lodash/toPlainObject.mjs +10 -0
  272. package/dist/es/node_modules/object-assign/index.mjs +34 -0
  273. package/dist/es/node_modules/rc-pagination/es/locale/zh_CN.mjs +18 -0
  274. package/dist/es/node_modules/rc-picker/es/locale/zh_CN.mjs +31 -0
  275. package/dist/es/node_modules/react/cjs/react-jsx-runtime.production.min.mjs +45 -0
  276. package/dist/es/node_modules/react/jsx-runtime.mjs +8 -0
  277. package/dist/es/node_modules/react-fast-compare/index.mjs +78 -0
  278. package/dist/es/node_modules/react-infinite-scroll-component/dist/index.es.mjs +188 -0
  279. package/dist/es/node_modules/react-quill/dist/quill.snow.css.mjs +4 -0
  280. package/dist/es/node_modules/socket.io-client/build/esm/contrib/backo2.mjs +26 -0
  281. package/dist/es/node_modules/socket.io-client/build/esm/index.mjs +25 -0
  282. package/dist/es/node_modules/socket.io-client/build/esm/manager.mjs +242 -0
  283. package/dist/es/node_modules/socket.io-client/build/esm/on.mjs +8 -0
  284. package/dist/es/node_modules/socket.io-client/build/esm/socket.mjs +608 -0
  285. package/dist/es/node_modules/socket.io-client/build/esm/url.mjs +19 -0
  286. package/dist/es/node_modules/socket.io-parser/build/esm/binary.mjs +52 -0
  287. package/dist/es/node_modules/socket.io-parser/build/esm/index.mjs +203 -0
  288. package/dist/es/node_modules/socket.io-parser/build/esm/is-binary.mjs +26 -0
  289. package/dist/es/node_modules/toggle-selection/index.mjs +25 -0
  290. package/dist/es/node_modules/tslib/tslib.es6.mjs +15 -0
  291. package/dist/es/node_modules/uuid/dist/esm-browser/native.mjs +6 -0
  292. package/dist/es/node_modules/uuid/dist/esm-browser/rng.mjs +10 -0
  293. package/dist/es/node_modules/uuid/dist/esm-browser/stringify.mjs +9 -0
  294. package/dist/es/node_modules/uuid/dist/esm-browser/v4.mjs +19 -0
  295. package/dist/es/packages/agent-cli-sdk/src/AgentSession.mjs +243 -0
  296. package/dist/es/packages/agent-cli-sdk/src/BotClient.mjs +242 -0
  297. package/dist/es/packages/agent-cli-sdk/src/Config.mjs +34 -0
  298. package/dist/es/packages/agent-cli-sdk/src/DialogSession.mjs +281 -0
  299. package/dist/es/packages/agent-cli-sdk/src/EventBus.mjs +64 -0
  300. package/dist/es/packages/agent-cli-sdk/src/Logger.mjs +31 -0
  301. package/dist/es/packages/agent-cli-sdk/src/PayloadTypes.mjs +4 -0
  302. package/dist/es/packages/agent-cli-sdk/src/Session.mjs +527 -0
  303. package/dist/es/packages/agent-cli-sdk/src/api/fetchEventSource/fetch.mjs +112 -0
  304. package/dist/es/packages/agent-cli-sdk/src/api/fetchEventSource/parse.mjs +97 -0
  305. package/dist/es/packages/agent-cli-sdk/src/api/index.mjs +48 -0
  306. package/dist/es/packages/agent-cli-sdk/src/utils.mjs +11 -0
  307. package/dist/es/packages/apis/dist/es/aecpilot/cosntant.mjs +5 -0
  308. package/dist/es/packages/apis/dist/es/aecpilot/model.mjs +9 -0
  309. package/dist/es/packages/apis/dist/es/aecpilotui/index.mjs +8 -0
  310. package/dist/es/packages/apis/dist/es/agentcliui/index.mjs +414 -0
  311. package/dist/es/packages/apis/dist/es/base/index.mjs +154 -0
  312. package/dist/es/packages/apis/dist/es/cvforce/index.mjs +431 -0
  313. package/dist/es/packages/apis/dist/es/cvforce/model.mjs +6 -0
  314. package/dist/es/packages/apis/dist/es/node_modules/uuid/dist/esm-browser/native.mjs +6 -0
  315. package/dist/es/packages/apis/dist/es/node_modules/uuid/dist/esm-browser/rng.mjs +10 -0
  316. package/dist/es/packages/apis/dist/es/node_modules/uuid/dist/esm-browser/stringify.mjs +9 -0
  317. package/dist/es/packages/apis/dist/es/node_modules/uuid/dist/esm-browser/v4.mjs +19 -0
  318. package/dist/es/packages/apis/dist/es/utils/fetchEventSource/fetch.mjs +106 -0
  319. package/dist/es/packages/apis/dist/es/utils/fetchEventSource/parse.mjs +97 -0
  320. package/dist/es/robots.txt +3 -0
  321. package/dist/es/style.less.mjs +4 -0
  322. package/dist/es/types.mjs +4 -0
  323. package/dist/es/utils/clipboard.mjs +38 -0
  324. package/dist/es/utils/index.mjs +33 -0
  325. package/dist/lib/favicon.ico +0 -0
  326. package/dist/lib/favicon2.ico +0 -0
  327. package/dist/lib/font/font_4108228_4w5nlhafpte.js +1 -0
  328. package/dist/lib/font/font_4439177_0sppkcnqiqgs.js +1 -0
  329. package/dist/lib/font/gos-font.js +64 -0
  330. package/dist/lib/images/empty.svg +40 -0
  331. package/dist/lib/images/loading.gif +0 -0
  332. package/dist/lib/images/logo.png +0 -0
  333. package/dist/lib/images/map-example.png +0 -0
  334. package/dist/lib/images/sketch.png +0 -0
  335. package/dist/lib/index.html +43 -0
  336. package/dist/lib/index.js +169 -0
  337. package/dist/lib/logo192.png +0 -0
  338. package/dist/lib/logo512.png +0 -0
  339. package/dist/lib/manifest.json +25 -0
  340. package/dist/lib/robots.txt +3 -0
  341. package/dist/src/AgentClientUI.d.ts +4 -0
  342. package/dist/src/ConnectToNetwork/index.d.ts +13 -0
  343. package/dist/src/Dialog/AgentChat/index.d.ts +17 -0
  344. package/dist/src/Dialog/ChatEmptyView/index.d.ts +6 -0
  345. package/dist/src/Dialog/ConnectToNetwork/index.d.ts +13 -0
  346. package/dist/src/Dialog/FileCard/index.d.ts +22 -0
  347. package/dist/src/Dialog/FilePreview/index.d.ts +20 -0
  348. package/dist/src/Dialog/Greeting/index.d.ts +7 -0
  349. package/dist/src/Dialog/HistoryContent/index.d.ts +5 -0
  350. package/dist/src/Dialog/HistoryItem/index.d.ts +17 -0
  351. package/dist/src/Dialog/KnowledgeDoc/index.d.ts +9 -0
  352. package/dist/src/Dialog/KnowledgeList/KnowledgeSelect/index.d.ts +12 -0
  353. package/dist/src/Dialog/KnowledgeList/index.d.ts +13 -0
  354. package/dist/src/Dialog/PromptManager/PromptList/EditPromptModal/index.d.ts +11 -0
  355. package/dist/src/Dialog/PromptManager/PromptList/PrivatePromptList.d.ts +12 -0
  356. package/dist/src/Dialog/PromptManager/PromptList/PromptListItem.d.ts +13 -0
  357. package/dist/src/Dialog/PromptManager/PromptList/PublicPromptList.d.ts +12 -0
  358. package/dist/src/Dialog/PromptManager/index.d.ts +13 -0
  359. package/dist/src/Dialog/PromptSetting/index.d.ts +14 -0
  360. package/dist/src/Dialog/Recommend/RecommendItem.d.ts +12 -0
  361. package/dist/src/Dialog/Recommend/index.d.ts +14 -0
  362. package/dist/src/Dialog/ReferCollapse/index.d.ts +8 -0
  363. package/dist/src/Dialog/SearchReference/index.d.ts +7 -0
  364. package/dist/src/Dialog/SessionAction/index.d.ts +11 -0
  365. package/dist/src/Dialog/SessionList/index.d.ts +20 -0
  366. package/dist/src/Dialog/SessionListDrawer/HistorySessionList/NameEditPanel.d.ts +9 -0
  367. package/dist/src/Dialog/SessionListDrawer/HistorySessionList/SessionItem.d.ts +16 -0
  368. package/dist/src/Dialog/SessionListDrawer/HistorySessionList/index.d.ts +9 -0
  369. package/dist/src/Dialog/SessionListDrawer/index.d.ts +9 -0
  370. package/dist/src/Dialog/SessionRefer/ReferItem/index.d.ts +9 -0
  371. package/dist/src/Dialog/SessionRefer/index.d.ts +8 -0
  372. package/dist/src/Dialog/SessionRelated/index.d.ts +9 -0
  373. package/dist/src/Dialog/UploadFiles/ClearModal/index.d.ts +7 -0
  374. package/dist/src/Dialog/UploadFiles/index.d.ts +21 -0
  375. package/dist/src/Dialog/UploadKnowledgeFiles/ClearModal/index.d.ts +7 -0
  376. package/dist/src/Dialog/UploadKnowledgeFiles/index.d.ts +22 -0
  377. package/dist/src/Dialog/UploadingPrompt/index.d.ts +9 -0
  378. package/dist/src/Dialog/index.d.ts +9 -0
  379. package/dist/src/FileCard/index.d.ts +21 -0
  380. package/dist/src/FileItem/index.d.ts +11 -0
  381. package/dist/src/Footer/FooterWarning.d.ts +8 -0
  382. package/dist/src/Footer/index.d.ts +7 -0
  383. package/dist/src/Greeting/index.d.ts +7 -0
  384. package/dist/src/Iconfont/font_4108228_8te6zfkclqu.d.ts +0 -0
  385. package/dist/src/Iconfont/font_4439177_7rytwlvbmjj.d.ts +0 -0
  386. package/dist/src/Iconfont/index.d.ts +3 -0
  387. package/dist/src/InputProgress/index.d.ts +7 -0
  388. package/dist/src/QuillEditor/index.d.ts +19 -0
  389. package/dist/src/components/Copy/index.d.ts +5 -0
  390. package/dist/src/components/Header/index.d.ts +6 -0
  391. package/dist/src/components/JsonDisplay/index.d.ts +6 -0
  392. package/dist/src/components/Markdown/Code/index.d.ts +3 -0
  393. package/dist/src/components/Markdown/Image/index.d.ts +3 -0
  394. package/dist/src/components/Markdown/index.d.ts +6 -0
  395. package/dist/src/components/PDFViewer/index.d.ts +7 -0
  396. package/dist/src/components/WebLink/index.d.ts +7 -0
  397. package/dist/src/constant.d.ts +11 -0
  398. package/dist/src/context.d.ts +5 -0
  399. package/dist/src/index.d.ts +33 -0
  400. package/dist/src/types.d.ts +183 -0
  401. package/dist/src/utils/clipboard.d.ts +11 -0
  402. package/dist/src/utils/fetchEventSource/fetch.d.ts +44 -0
  403. package/dist/src/utils/fetchEventSource/index.d.ts +1 -0
  404. package/dist/src/utils/fetchEventSource/parse.d.ts +36 -0
  405. package/dist/src/utils/index.d.ts +17 -0
  406. package/package.json +138 -0
@@ -0,0 +1,273 @@
1
+ import { Transport as d } from "../transport.mjs";
2
+ import { yeast as l } from "../contrib/yeast.mjs";
3
+ import { decodePayload as c, encodePayload as p } from "../../../../engine.io-parser/build/esm/index.mjs";
4
+ import { XHR as a, createCookieJar as u } from "./xmlhttprequest.browser.mjs";
5
+ import { Emitter as f } from "../../../../@socket.io/component-emitter/lib/esm/index.mjs";
6
+ import { installTimerFunctions as m, pick as y } from "../util.mjs";
7
+ import { globalThisShim as x } from "../globalThis.browser.mjs";
8
+ function q() {
9
+ }
10
+ const v = function() {
11
+ return new a({
12
+ xdomain: !1
13
+ }).responseType != null;
14
+ }();
15
+ class S extends d {
16
+ /**
17
+ * XHR Polling constructor.
18
+ *
19
+ * @param {Object} opts
20
+ * @package
21
+ */
22
+ constructor(t) {
23
+ if (super(t), this.polling = !1, typeof location != "undefined") {
24
+ const e = location.protocol === "https:";
25
+ let i = location.port;
26
+ i || (i = e ? "443" : "80"), this.xd = typeof location != "undefined" && t.hostname !== location.hostname || i !== t.port;
27
+ }
28
+ const s = t && t.forceBase64;
29
+ this.supportsBinary = v && !s, this.opts.withCredentials && (this.cookieJar = u());
30
+ }
31
+ get name() {
32
+ return "polling";
33
+ }
34
+ /**
35
+ * Opens the socket (triggers polling). We write a PING message to determine
36
+ * when the transport is open.
37
+ *
38
+ * @protected
39
+ */
40
+ doOpen() {
41
+ this.poll();
42
+ }
43
+ /**
44
+ * Pauses polling.
45
+ *
46
+ * @param {Function} onPause - callback upon buffers are flushed and transport is paused
47
+ * @package
48
+ */
49
+ pause(t) {
50
+ this.readyState = "pausing";
51
+ const s = () => {
52
+ this.readyState = "paused", t();
53
+ };
54
+ if (this.polling || !this.writable) {
55
+ let e = 0;
56
+ this.polling && (e++, this.once("pollComplete", function() {
57
+ --e || s();
58
+ })), this.writable || (e++, this.once("drain", function() {
59
+ --e || s();
60
+ }));
61
+ } else
62
+ s();
63
+ }
64
+ /**
65
+ * Starts polling cycle.
66
+ *
67
+ * @private
68
+ */
69
+ poll() {
70
+ this.polling = !0, this.doPoll(), this.emitReserved("poll");
71
+ }
72
+ /**
73
+ * Overloads onData to detect payloads.
74
+ *
75
+ * @protected
76
+ */
77
+ onData(t) {
78
+ const s = (e) => {
79
+ if (this.readyState === "opening" && e.type === "open" && this.onOpen(), e.type === "close")
80
+ return this.onClose({
81
+ description: "transport closed by the server"
82
+ }), !1;
83
+ this.onPacket(e);
84
+ };
85
+ c(t, this.socket.binaryType).forEach(s), this.readyState !== "closed" && (this.polling = !1, this.emitReserved("pollComplete"), this.readyState === "open" && this.poll());
86
+ }
87
+ /**
88
+ * For polling, send a close packet.
89
+ *
90
+ * @protected
91
+ */
92
+ doClose() {
93
+ const t = () => {
94
+ this.write([{
95
+ type: "close"
96
+ }]);
97
+ };
98
+ this.readyState === "open" ? t() : this.once("open", t);
99
+ }
100
+ /**
101
+ * Writes a packets payload.
102
+ *
103
+ * @param {Array} packets - data packets
104
+ * @protected
105
+ */
106
+ write(t) {
107
+ this.writable = !1, p(t, (s) => {
108
+ this.doWrite(s, () => {
109
+ this.writable = !0, this.emitReserved("drain");
110
+ });
111
+ });
112
+ }
113
+ /**
114
+ * Generates uri for connection.
115
+ *
116
+ * @private
117
+ */
118
+ uri() {
119
+ const t = this.opts.secure ? "https" : "http", s = this.query || {};
120
+ return this.opts.timestampRequests !== !1 && (s[this.opts.timestampParam] = l()), !this.supportsBinary && !s.sid && (s.b64 = 1), this.createUri(t, s);
121
+ }
122
+ /**
123
+ * Creates a request.
124
+ *
125
+ * @param {String} method
126
+ * @private
127
+ */
128
+ request(t = {}) {
129
+ return Object.assign(t, {
130
+ xd: this.xd,
131
+ cookieJar: this.cookieJar
132
+ }, this.opts), new o(this.uri(), t);
133
+ }
134
+ /**
135
+ * Sends data.
136
+ *
137
+ * @param {String} data to send.
138
+ * @param {Function} called upon flush.
139
+ * @private
140
+ */
141
+ doWrite(t, s) {
142
+ const e = this.request({
143
+ method: "POST",
144
+ data: t
145
+ });
146
+ e.on("success", s), e.on("error", (i, h) => {
147
+ this.onError("xhr post error", i, h);
148
+ });
149
+ }
150
+ /**
151
+ * Starts a poll cycle.
152
+ *
153
+ * @private
154
+ */
155
+ doPoll() {
156
+ const t = this.request();
157
+ t.on("data", this.onData.bind(this)), t.on("error", (s, e) => {
158
+ this.onError("xhr poll error", s, e);
159
+ }), this.pollXhr = t;
160
+ }
161
+ }
162
+ class o extends f {
163
+ /**
164
+ * Request constructor
165
+ *
166
+ * @param {Object} options
167
+ * @package
168
+ */
169
+ constructor(t, s) {
170
+ super(), m(this, s), this.opts = s, this.method = s.method || "GET", this.uri = t, this.data = s.data !== void 0 ? s.data : null, this.create();
171
+ }
172
+ /**
173
+ * Creates the XHR object and sends the request.
174
+ *
175
+ * @private
176
+ */
177
+ create() {
178
+ var t;
179
+ const s = y(this.opts, "agent", "pfx", "key", "passphrase", "cert", "ca", "ciphers", "rejectUnauthorized", "autoUnref");
180
+ s.xdomain = !!this.opts.xd;
181
+ const e = this.xhr = new a(s);
182
+ try {
183
+ e.open(this.method, this.uri, !0);
184
+ try {
185
+ if (this.opts.extraHeaders) {
186
+ e.setDisableHeaderCheck && e.setDisableHeaderCheck(!0);
187
+ for (let i in this.opts.extraHeaders)
188
+ this.opts.extraHeaders.hasOwnProperty(i) && e.setRequestHeader(i, this.opts.extraHeaders[i]);
189
+ }
190
+ } catch (i) {
191
+ }
192
+ if (this.method === "POST")
193
+ try {
194
+ e.setRequestHeader("Content-type", "text/plain;charset=UTF-8");
195
+ } catch (i) {
196
+ }
197
+ try {
198
+ e.setRequestHeader("Accept", "*/*");
199
+ } catch (i) {
200
+ }
201
+ (t = this.opts.cookieJar) === null || t === void 0 || t.addCookies(e), "withCredentials" in e && (e.withCredentials = this.opts.withCredentials), this.opts.requestTimeout && (e.timeout = this.opts.requestTimeout), e.onreadystatechange = () => {
202
+ var i;
203
+ e.readyState === 3 && ((i = this.opts.cookieJar) === null || i === void 0 || i.parseCookies(e)), e.readyState === 4 && (e.status === 200 || e.status === 1223 ? this.onLoad() : this.setTimeoutFn(() => {
204
+ this.onError(typeof e.status == "number" ? e.status : 0);
205
+ }, 0));
206
+ }, e.send(this.data);
207
+ } catch (i) {
208
+ this.setTimeoutFn(() => {
209
+ this.onError(i);
210
+ }, 0);
211
+ return;
212
+ }
213
+ typeof document != "undefined" && (this.index = o.requestsCount++, o.requests[this.index] = this);
214
+ }
215
+ /**
216
+ * Called upon error.
217
+ *
218
+ * @private
219
+ */
220
+ onError(t) {
221
+ this.emitReserved("error", t, this.xhr), this.cleanup(!0);
222
+ }
223
+ /**
224
+ * Cleans up house.
225
+ *
226
+ * @private
227
+ */
228
+ cleanup(t) {
229
+ if (!(typeof this.xhr == "undefined" || this.xhr === null)) {
230
+ if (this.xhr.onreadystatechange = q, t)
231
+ try {
232
+ this.xhr.abort();
233
+ } catch (s) {
234
+ }
235
+ typeof document != "undefined" && delete o.requests[this.index], this.xhr = null;
236
+ }
237
+ }
238
+ /**
239
+ * Called upon load.
240
+ *
241
+ * @private
242
+ */
243
+ onLoad() {
244
+ const t = this.xhr.responseText;
245
+ t !== null && (this.emitReserved("data", t), this.emitReserved("success"), this.cleanup());
246
+ }
247
+ /**
248
+ * Aborts the request.
249
+ *
250
+ * @package
251
+ */
252
+ abort() {
253
+ this.cleanup();
254
+ }
255
+ }
256
+ o.requestsCount = 0;
257
+ o.requests = {};
258
+ if (typeof document != "undefined") {
259
+ if (typeof attachEvent == "function")
260
+ attachEvent("onunload", n);
261
+ else if (typeof addEventListener == "function") {
262
+ const r = "onpagehide" in x ? "pagehide" : "unload";
263
+ addEventListener(r, n, !1);
264
+ }
265
+ }
266
+ function n() {
267
+ for (let r in o.requests)
268
+ o.requests.hasOwnProperty(r) && o.requests[r].abort();
269
+ }
270
+ export {
271
+ S as Polling,
272
+ o as Request
273
+ };
@@ -0,0 +1,8 @@
1
+ import { globalThisShim as o } from "../globalThis.browser.mjs";
2
+ const s = (() => typeof Promise == "function" && typeof Promise.resolve == "function" ? (e) => Promise.resolve().then(e) : (e, r) => r(e, 0))(), n = o.WebSocket || o.MozWebSocket, c = !0, l = "arraybuffer";
3
+ export {
4
+ n as WebSocket,
5
+ l as defaultBinaryType,
6
+ s as nextTick,
7
+ c as usingBrowserWebSocket
8
+ };
@@ -0,0 +1,87 @@
1
+ import { Transport as c } from "../transport.mjs";
2
+ import { yeast as h } from "../contrib/yeast.mjs";
3
+ import { pick as p } from "../util.mjs";
4
+ import { usingBrowserWebSocket as i, WebSocket as r, nextTick as d } from "./websocket-constructor.browser.mjs";
5
+ import { encodePacket as u } from "../../../../engine.io-parser/build/esm/encodePacket.browser.mjs";
6
+ import "../../../../engine.io-parser/build/esm/commons.mjs";
7
+ import "../../../../engine.io-parser/build/esm/contrib/base64-arraybuffer.mjs";
8
+ const n = typeof navigator != "undefined" && typeof navigator.product == "string" && navigator.product.toLowerCase() === "reactnative";
9
+ class B extends c {
10
+ /**
11
+ * WebSocket transport constructor.
12
+ *
13
+ * @param {Object} opts - connection options
14
+ * @protected
15
+ */
16
+ constructor(t) {
17
+ super(t), this.supportsBinary = !t.forceBase64;
18
+ }
19
+ get name() {
20
+ return "websocket";
21
+ }
22
+ doOpen() {
23
+ if (!this.check())
24
+ return;
25
+ const t = this.uri(), e = this.opts.protocols, s = n ? {} : p(this.opts, "agent", "perMessageDeflate", "pfx", "key", "passphrase", "cert", "ca", "ciphers", "rejectUnauthorized", "localAddress", "protocolVersion", "origin", "maxPayload", "family", "checkServerIdentity");
26
+ this.opts.extraHeaders && (s.headers = this.opts.extraHeaders);
27
+ try {
28
+ this.ws = i && !n ? e ? new r(t, e) : new r(t) : new r(t, e, s);
29
+ } catch (o) {
30
+ return this.emitReserved("error", o);
31
+ }
32
+ this.ws.binaryType = this.socket.binaryType, this.addEventListeners();
33
+ }
34
+ /**
35
+ * Adds event listeners to the socket
36
+ *
37
+ * @private
38
+ */
39
+ addEventListeners() {
40
+ this.ws.onopen = () => {
41
+ this.opts.autoUnref && this.ws._socket.unref(), this.onOpen();
42
+ }, this.ws.onclose = (t) => this.onClose({
43
+ description: "websocket connection closed",
44
+ context: t
45
+ }), this.ws.onmessage = (t) => this.onData(t.data), this.ws.onerror = (t) => this.onError("websocket error", t);
46
+ }
47
+ write(t) {
48
+ this.writable = !1;
49
+ for (let e = 0; e < t.length; e++) {
50
+ const s = t[e], o = e === t.length - 1;
51
+ u(s, this.supportsBinary, (a) => {
52
+ const m = {};
53
+ try {
54
+ i && this.ws.send(a);
55
+ } catch (w) {
56
+ }
57
+ o && d(() => {
58
+ this.writable = !0, this.emitReserved("drain");
59
+ }, this.setTimeoutFn);
60
+ });
61
+ }
62
+ }
63
+ doClose() {
64
+ typeof this.ws != "undefined" && (this.ws.close(), this.ws = null);
65
+ }
66
+ /**
67
+ * Generates uri for connection.
68
+ *
69
+ * @private
70
+ */
71
+ uri() {
72
+ const t = this.opts.secure ? "wss" : "ws", e = this.query || {};
73
+ return this.opts.timestampRequests && (e[this.opts.timestampParam] = h()), this.supportsBinary || (e.b64 = 1), this.createUri(t, e);
74
+ }
75
+ /**
76
+ * Feature detection for WebSocket.
77
+ *
78
+ * @return {Boolean} whether this transport is available.
79
+ * @private
80
+ */
81
+ check() {
82
+ return !!r;
83
+ }
84
+ }
85
+ export {
86
+ B as WS
87
+ };
@@ -0,0 +1,52 @@
1
+ import { Transport as h } from "../transport.mjs";
2
+ import { nextTick as c } from "./websocket-constructor.browser.mjs";
3
+ import { createPacketDecoderStream as p, createPacketEncoderStream as d } from "../../../../engine.io-parser/build/esm/index.mjs";
4
+ class f extends h {
5
+ get name() {
6
+ return "webtransport";
7
+ }
8
+ doOpen() {
9
+ typeof WebTransport == "function" && (this.transport = new WebTransport(this.createUri("https"), this.opts.transportOptions[this.name]), this.transport.closed.then(() => {
10
+ this.onClose();
11
+ }).catch((t) => {
12
+ this.onError("webtransport error", t);
13
+ }), this.transport.ready.then(() => {
14
+ this.transport.createBidirectionalStream().then((t) => {
15
+ const e = p(Number.MAX_SAFE_INTEGER, this.socket.binaryType), i = t.readable.pipeThrough(e).getReader(), r = d();
16
+ r.readable.pipeTo(t.writable), this.writer = r.writable.getWriter();
17
+ const s = () => {
18
+ i.read().then(({
19
+ done: n,
20
+ value: a
21
+ }) => {
22
+ n || (this.onPacket(a), s());
23
+ }).catch((n) => {
24
+ });
25
+ };
26
+ s();
27
+ const o = {
28
+ type: "open"
29
+ };
30
+ this.query.sid && (o.data = `{"sid":"${this.query.sid}"}`), this.writer.write(o).then(() => this.onOpen());
31
+ });
32
+ }));
33
+ }
34
+ write(t) {
35
+ this.writable = !1;
36
+ for (let e = 0; e < t.length; e++) {
37
+ const i = t[e], r = e === t.length - 1;
38
+ this.writer.write(i).then(() => {
39
+ r && c(() => {
40
+ this.writable = !0, this.emitReserved("drain");
41
+ }, this.setTimeoutFn);
42
+ });
43
+ }
44
+ }
45
+ doClose() {
46
+ var t;
47
+ (t = this.transport) === null || t === void 0 || t.close();
48
+ }
49
+ }
50
+ export {
51
+ f as WT
52
+ };
@@ -0,0 +1,21 @@
1
+ import { hasCORS as i } from "../contrib/has-cors.mjs";
2
+ import { globalThisShim as n } from "../globalThis.browser.mjs";
3
+ function a(e) {
4
+ const t = e.xdomain;
5
+ try {
6
+ if (typeof XMLHttpRequest != "undefined" && (!t || i))
7
+ return new XMLHttpRequest();
8
+ } catch (o) {
9
+ }
10
+ if (!t)
11
+ try {
12
+ return new n[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP");
13
+ } catch (o) {
14
+ }
15
+ }
16
+ function f() {
17
+ }
18
+ export {
19
+ a as XHR,
20
+ f as createCookieJar
21
+ };
@@ -0,0 +1,23 @@
1
+ import { globalThisShim as r } from "./globalThis.browser.mjs";
2
+ function f(e, ...t) {
3
+ return t.reduce((i, n) => (e.hasOwnProperty(n) && (i[n] = e[n]), i), {});
4
+ }
5
+ const l = r.setTimeout, s = r.clearTimeout;
6
+ function m(e, t) {
7
+ t.useNativeTimers ? (e.setTimeoutFn = l.bind(r), e.clearTimeoutFn = s.bind(r)) : (e.setTimeoutFn = r.setTimeout.bind(r), e.clearTimeoutFn = r.clearTimeout.bind(r));
8
+ }
9
+ const T = 1.33;
10
+ function h(e) {
11
+ return typeof e == "string" ? o(e) : Math.ceil((e.byteLength || e.size) * T);
12
+ }
13
+ function o(e) {
14
+ let t = 0, i = 0;
15
+ for (let n = 0, u = e.length; n < u; n++)
16
+ t = e.charCodeAt(n), t < 128 ? i += 1 : t < 2048 ? i += 2 : t < 55296 || t >= 57344 ? i += 3 : (n++, i += 4);
17
+ return i;
18
+ }
19
+ export {
20
+ h as byteLength,
21
+ m as installTimerFunctions,
22
+ f as pick
23
+ };
@@ -0,0 +1,21 @@
1
+ const e = /* @__PURE__ */ Object.create(null);
2
+ e.open = "0";
3
+ e.close = "1";
4
+ e.ping = "2";
5
+ e.pong = "3";
6
+ e.message = "4";
7
+ e.upgrade = "5";
8
+ e.noop = "6";
9
+ const o = /* @__PURE__ */ Object.create(null);
10
+ Object.keys(e).forEach((r) => {
11
+ o[e[r]] = r;
12
+ });
13
+ const t = {
14
+ type: "error",
15
+ data: "parser error"
16
+ };
17
+ export {
18
+ t as ERROR_PACKET,
19
+ e as PACKET_TYPES,
20
+ o as PACKET_TYPES_REVERSE
21
+ };
@@ -0,0 +1,14 @@
1
+ const i = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", r = typeof Uint8Array == "undefined" ? [] : new Uint8Array(256);
2
+ for (let e = 0; e < i.length; e++)
3
+ r[i.charCodeAt(e)] = e;
4
+ const g = (e) => {
5
+ let t = e.length * 0.75, y = e.length, n, o = 0, h, d, c, l;
6
+ e[e.length - 1] === "=" && (t--, e[e.length - 2] === "=" && t--);
7
+ const A = new ArrayBuffer(t), f = new Uint8Array(A);
8
+ for (n = 0; n < y; n += 4)
9
+ h = r[e.charCodeAt(n)], d = r[e.charCodeAt(n + 1)], c = r[e.charCodeAt(n + 2)], l = r[e.charCodeAt(n + 3)], f[o++] = h << 2 | d >> 4, f[o++] = (d & 15) << 4 | c >> 2, f[o++] = (c & 3) << 6 | l & 63;
10
+ return A;
11
+ };
12
+ export {
13
+ g as decode
14
+ };
@@ -0,0 +1,39 @@
1
+ import { PACKET_TYPES_REVERSE as s, ERROR_PACKET as n } from "./commons.mjs";
2
+ import { decode as u } from "./contrib/base64-arraybuffer.mjs";
3
+ const o = typeof ArrayBuffer == "function", a = (r, e) => {
4
+ if (typeof r != "string")
5
+ return {
6
+ type: "message",
7
+ data: f(r, e)
8
+ };
9
+ const t = r.charAt(0);
10
+ return t === "b" ? {
11
+ type: "message",
12
+ data: i(r.substring(1), e)
13
+ } : s[t] ? r.length > 1 ? {
14
+ type: s[t],
15
+ data: r.substring(1)
16
+ } : {
17
+ type: s[t]
18
+ } : n;
19
+ }, i = (r, e) => {
20
+ if (o) {
21
+ const t = u(r);
22
+ return f(t, e);
23
+ } else
24
+ return {
25
+ base64: !0,
26
+ data: r
27
+ };
28
+ }, f = (r, e) => {
29
+ switch (e) {
30
+ case "blob":
31
+ return r instanceof Blob ? r : new Blob([r]);
32
+ case "arraybuffer":
33
+ default:
34
+ return r instanceof ArrayBuffer ? r : r.buffer;
35
+ }
36
+ };
37
+ export {
38
+ a as decodePacket
39
+ };
@@ -0,0 +1,28 @@
1
+ import { PACKET_TYPES as B } from "./commons.mjs";
2
+ const u = typeof Blob == "function" || typeof Blob != "undefined" && Object.prototype.toString.call(Blob) === "[object BlobConstructor]", s = typeof ArrayBuffer == "function", y = (e) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(e) : e && e.buffer instanceof ArrayBuffer, c = ({
3
+ type: e,
4
+ data: r
5
+ }, n, t) => u && r instanceof Blob ? n ? t(r) : o(r, t) : s && (r instanceof ArrayBuffer || y(r)) ? n ? t(r) : o(new Blob([r]), t) : t(B[e] + (r || "")), o = (e, r) => {
6
+ const n = new FileReader();
7
+ return n.onload = function() {
8
+ const t = n.result.split(",")[1];
9
+ r("b" + (t || ""));
10
+ }, n.readAsDataURL(e);
11
+ };
12
+ function i(e) {
13
+ return e instanceof Uint8Array ? e : e instanceof ArrayBuffer ? new Uint8Array(e) : new Uint8Array(e.buffer, e.byteOffset, e.byteLength);
14
+ }
15
+ let f;
16
+ function l(e, r) {
17
+ if (u && e.data instanceof Blob)
18
+ return e.data.arrayBuffer().then(i).then(r);
19
+ if (s && (e.data instanceof ArrayBuffer || y(e.data)))
20
+ return r(i(e.data));
21
+ c(e, !1, (n) => {
22
+ f || (f = new TextEncoder()), r(f.encode(n));
23
+ });
24
+ }
25
+ export {
26
+ c as encodePacket,
27
+ l as encodePacketToBinary
28
+ };
@@ -0,0 +1,105 @@
1
+ import { encodePacket as b, encodePacketToBinary as m } from "./encodePacket.browser.mjs";
2
+ import { decodePacket as h } from "./decodePacket.browser.mjs";
3
+ import { ERROR_PACKET as g } from "./commons.mjs";
4
+ const y = String.fromCharCode(30), A = (r, a) => {
5
+ const n = r.length, t = new Array(n);
6
+ let e = 0;
7
+ r.forEach((i, l) => {
8
+ b(i, !1, (f) => {
9
+ t[l] = f, ++e === n && a(t.join(y));
10
+ });
11
+ });
12
+ }, D = (r, a) => {
13
+ const n = r.split(y), t = [];
14
+ for (let e = 0; e < n.length; e++) {
15
+ const i = h(n[e], a);
16
+ if (t.push(i), i.type === "error")
17
+ break;
18
+ }
19
+ return t;
20
+ };
21
+ function E() {
22
+ return new TransformStream({
23
+ transform(r, a) {
24
+ m(r, (n) => {
25
+ const t = n.length;
26
+ let e;
27
+ if (t < 126)
28
+ e = new Uint8Array(1), new DataView(e.buffer).setUint8(0, t);
29
+ else if (t < 65536) {
30
+ e = new Uint8Array(3);
31
+ const i = new DataView(e.buffer);
32
+ i.setUint8(0, 126), i.setUint16(1, t);
33
+ } else {
34
+ e = new Uint8Array(9);
35
+ const i = new DataView(e.buffer);
36
+ i.setUint8(0, 127), i.setBigUint64(1, BigInt(t));
37
+ }
38
+ r.data && typeof r.data != "string" && (e[0] |= 128), a.enqueue(e), a.enqueue(n);
39
+ });
40
+ }
41
+ });
42
+ }
43
+ let d;
44
+ function s(r) {
45
+ return r.reduce((a, n) => a + n.length, 0);
46
+ }
47
+ function c(r, a) {
48
+ if (r[0].length === a)
49
+ return r.shift();
50
+ const n = new Uint8Array(a);
51
+ let t = 0;
52
+ for (let e = 0; e < a; e++)
53
+ n[e] = r[0][t++], t === r[0].length && (r.shift(), t = 0);
54
+ return r.length && t < r[0].length && (r[0] = r[0].slice(t)), n;
55
+ }
56
+ function T(r, a) {
57
+ d || (d = new TextDecoder());
58
+ const n = [];
59
+ let t = 0, e = -1, i = !1;
60
+ return new TransformStream({
61
+ transform(l, f) {
62
+ for (n.push(l); ; ) {
63
+ if (t === 0) {
64
+ if (s(n) < 1)
65
+ break;
66
+ const o = c(n, 1);
67
+ i = (o[0] & 128) === 128, e = o[0] & 127, e < 126 ? t = 3 : e === 126 ? t = 1 : t = 2;
68
+ } else if (t === 1) {
69
+ if (s(n) < 2)
70
+ break;
71
+ const o = c(n, 2);
72
+ e = new DataView(o.buffer, o.byteOffset, o.length).getUint16(0), t = 3;
73
+ } else if (t === 2) {
74
+ if (s(n) < 8)
75
+ break;
76
+ const o = c(n, 8), u = new DataView(o.buffer, o.byteOffset, o.length), w = u.getUint32(0);
77
+ if (w > Math.pow(2, 53 - 32) - 1) {
78
+ f.enqueue(g);
79
+ break;
80
+ }
81
+ e = w * Math.pow(2, 32) + u.getUint32(4), t = 3;
82
+ } else {
83
+ if (s(n) < e)
84
+ break;
85
+ const o = c(n, e);
86
+ f.enqueue(h(i ? o : d.decode(o), a)), t = 0;
87
+ }
88
+ if (e === 0 || e > r) {
89
+ f.enqueue(g);
90
+ break;
91
+ }
92
+ }
93
+ }
94
+ });
95
+ }
96
+ const x = 4;
97
+ export {
98
+ T as createPacketDecoderStream,
99
+ E as createPacketEncoderStream,
100
+ h as decodePacket,
101
+ D as decodePayload,
102
+ b as encodePacket,
103
+ A as encodePayload,
104
+ x as protocol
105
+ };