@labelbee/lb-components 1.22.0-beta.5 → 1.23.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (499) hide show
  1. package/dist/assets/annotation/LLMTool/empty.svg.js +1 -1
  2. package/dist/assets/annotation/LLMTool/imgFail_cn.svg.js +1 -1
  3. package/dist/assets/annotation/LLMTool/imgFail_en.svg.js +1 -1
  4. package/dist/assets/annotation/LLMTool/loading.svg.js +1 -1
  5. package/dist/assets/annotation/audio/clip.svg.js +1 -1
  6. package/dist/assets/annotation/audio/clipA.svg.js +1 -1
  7. package/dist/assets/annotation/audio/clipASmall.svg.js +1 -1
  8. package/dist/assets/annotation/audio/clipSmall.svg.js +1 -1
  9. package/dist/assets/annotation/audio/delete.svg.js +1 -1
  10. package/dist/assets/annotation/audio/loop.svg.js +1 -1
  11. package/dist/assets/annotation/audio/loopA.svg.js +1 -1
  12. package/dist/assets/annotation/audio/progressDot.svg.js +1 -1
  13. package/dist/assets/annotation/audio/progressDotA.svg.js +1 -1
  14. package/dist/assets/annotation/audio/tag.svg.js +1 -1
  15. package/dist/assets/annotation/audio/tagA.svg.js +1 -1
  16. package/dist/assets/annotation/common/icon_adapt.svg.js +1 -1
  17. package/dist/assets/annotation/common/icon_adapt_black.svg.js +1 -1
  18. package/dist/assets/annotation/common/icon_back.svg.js +1 -1
  19. package/dist/assets/annotation/common/icon_backA.svg.js +1 -1
  20. package/dist/assets/annotation/common/icon_clear.svg.js +1 -1
  21. package/dist/assets/annotation/common/icon_clearSmall.svg.js +1 -1
  22. package/dist/assets/annotation/common/icon_clearSmall_a.svg.js +1 -1
  23. package/dist/assets/annotation/common/icon_clear_a.svg.js +1 -1
  24. package/dist/assets/annotation/common/icon_esc.svg.js +1 -1
  25. package/dist/assets/annotation/common/icon_invalid.svg.js +1 -1
  26. package/dist/assets/annotation/common/icon_invalid_a.svg.js +1 -1
  27. package/dist/assets/annotation/common/icon_left_squareOutlined.svg.js +1 -1
  28. package/dist/assets/annotation/common/icon_menu_fold.svg.js +1 -1
  29. package/dist/assets/annotation/common/icon_next.svg.js +1 -1
  30. package/dist/assets/annotation/common/icon_nextA.svg.js +1 -1
  31. package/dist/assets/annotation/common/icon_r.svg.js +1 -1
  32. package/dist/assets/annotation/common/icon_rA.svg.js +1 -1
  33. package/dist/assets/annotation/common/icon_right_squareOutlined.svg.js +1 -1
  34. package/dist/assets/annotation/common/icon_save.svg.js +1 -1
  35. package/dist/assets/annotation/common/icon_saveA.svg.js +1 -1
  36. package/dist/assets/annotation/image/brightness.svg.js +1 -1
  37. package/dist/assets/annotation/image/contrast.svg.js +1 -1
  38. package/dist/assets/annotation/image/icon_yuantu.svg.js +1 -1
  39. package/dist/assets/annotation/image/saturation.svg.js +1 -1
  40. package/dist/assets/annotation/lineTool/icon_line.svg.js +1 -1
  41. package/dist/assets/annotation/lineTool/icon_line_a.svg.js +1 -1
  42. package/dist/assets/annotation/pointCloudTool/addSvg.svg.js +1 -1
  43. package/dist/assets/annotation/pointCloudTool/cancel.svg.js +1 -1
  44. package/dist/assets/annotation/pointCloudTool/changePointCloudValid.svg.js +1 -1
  45. package/dist/assets/annotation/pointCloudTool/circleSelector.svg.js +1 -1
  46. package/dist/assets/annotation/pointCloudTool/circleSelector_a.svg.js +1 -1
  47. package/dist/assets/annotation/pointCloudTool/clearSvg.svg.js +1 -1
  48. package/dist/assets/annotation/pointCloudTool/copy.svg.js +1 -1
  49. package/dist/assets/annotation/pointCloudTool/coverMode.svg.js +1 -1
  50. package/dist/assets/annotation/pointCloudTool/finish.svg.js +1 -1
  51. package/dist/assets/annotation/pointCloudTool/highlight.svg.js +1 -0
  52. package/dist/assets/annotation/pointCloudTool/highlight_a.svg.js +1 -0
  53. package/dist/assets/annotation/pointCloudTool/lassoSelector.svg.js +1 -1
  54. package/dist/assets/annotation/pointCloudTool/lassoSelector_a.svg.js +1 -1
  55. package/dist/assets/annotation/pointCloudTool/leftArrow.svg.js +1 -0
  56. package/dist/assets/annotation/pointCloudTool/nextBox.svg.js +1 -1
  57. package/dist/assets/annotation/pointCloudTool/nodata.svg.js +1 -1
  58. package/dist/assets/annotation/pointCloudTool/patse.svg.js +1 -1
  59. package/dist/assets/annotation/pointCloudTool/prevBox.svg.js +1 -1
  60. package/dist/assets/annotation/pointCloudTool/rightArrow.svg.js +1 -0
  61. package/dist/assets/annotation/pointCloudTool/rotate180_black.svg.js +1 -1
  62. package/dist/assets/annotation/pointCloudTool/selectAll.svg.js +1 -1
  63. package/dist/assets/annotation/pointCloudTool/selectMultiple.svg.js +1 -1
  64. package/dist/assets/annotation/pointCloudTool/unCoverMode.svg.js +1 -1
  65. package/dist/assets/annotation/pointCloudTool/unitAttribute.svg.js +1 -1
  66. package/dist/assets/annotation/pointCloudTool/unitAttributeForbid.svg.js +1 -1
  67. package/dist/assets/annotation/pointCloudTool/unitAttributeHover.svg.js +1 -1
  68. package/dist/assets/annotation/pointTool/icon_point.svg.js +1 -1
  69. package/dist/assets/annotation/pointTool/icon_point_a.svg.js +1 -1
  70. package/dist/assets/annotation/polygonTool/icon_polygon.svg.js +1 -1
  71. package/dist/assets/annotation/polygonTool/icon_polygon_a.svg.js +1 -1
  72. package/dist/assets/annotation/rectTool/icon_rect.svg.js +1 -1
  73. package/dist/assets/annotation/rectTool/icon_rect_a.svg.js +1 -1
  74. package/dist/assets/annotation/toolHotKeyIcon/deleteRemark.svg.js +1 -1
  75. package/dist/assets/annotation/toolHotKeyIcon/icon_alttab_kj.svg.js +1 -1
  76. package/dist/assets/annotation/toolHotKeyIcon/icon_back_kj.svg.js +1 -1
  77. package/dist/assets/annotation/toolHotKeyIcon/icon_cencel_kj.svg.js +1 -1
  78. package/dist/assets/annotation/toolHotKeyIcon/icon_del_kj.svg.js +1 -1
  79. package/dist/assets/annotation/toolHotKeyIcon/icon_down.svg.js +1 -1
  80. package/dist/assets/annotation/toolHotKeyIcon/icon_eraser.svg.js +1 -1
  81. package/dist/assets/annotation/toolHotKeyIcon/icon_eyeLock_kj.svg.js +1 -1
  82. package/dist/assets/annotation/toolHotKeyIcon/icon_forward_kj.svg.js +1 -1
  83. package/dist/assets/annotation/toolHotKeyIcon/icon_frameActive_kj.svg.js +1 -1
  84. package/dist/assets/annotation/toolHotKeyIcon/icon_frameChange_kj.svg.js +1 -1
  85. package/dist/assets/annotation/toolHotKeyIcon/icon_frameNull_kj.svg.js +1 -1
  86. package/dist/assets/annotation/toolHotKeyIcon/icon_frame_kj.svg.js +1 -1
  87. package/dist/assets/annotation/toolHotKeyIcon/icon_fullView_kj.svg.js +1 -1
  88. package/dist/assets/annotation/toolHotKeyIcon/icon_kj1.svg.js +1 -1
  89. package/dist/assets/annotation/toolHotKeyIcon/icon_kj_h.svg.js +1 -1
  90. package/dist/assets/annotation/toolHotKeyIcon/icon_last_kj.svg.js +1 -1
  91. package/dist/assets/annotation/toolHotKeyIcon/icon_lineActive_kj.svg.js +1 -1
  92. package/dist/assets/annotation/toolHotKeyIcon/icon_lineChange_kj.svg.js +1 -1
  93. package/dist/assets/annotation/toolHotKeyIcon/icon_lineCont_kj.svg.js +1 -1
  94. package/dist/assets/annotation/toolHotKeyIcon/icon_lineDel_kj.svg.js +1 -1
  95. package/dist/assets/annotation/toolHotKeyIcon/icon_lineInsert_kj.svg.js +1 -1
  96. package/dist/assets/annotation/toolHotKeyIcon/icon_lineNull_kj.svg.js +1 -1
  97. package/dist/assets/annotation/toolHotKeyIcon/icon_lineSpecial_kj.svg.js +1 -1
  98. package/dist/assets/annotation/toolHotKeyIcon/icon_line_kj.svg.js +1 -1
  99. package/dist/assets/annotation/toolHotKeyIcon/icon_line_static.svg.js +1 -1
  100. package/dist/assets/annotation/toolHotKeyIcon/icon_loupe_kj.svg.js +1 -1
  101. package/dist/assets/annotation/toolHotKeyIcon/icon_mouse_left_kj.svg.js +1 -1
  102. package/dist/assets/annotation/toolHotKeyIcon/icon_mouse_middle_kj.svg.js +1 -1
  103. package/dist/assets/annotation/toolHotKeyIcon/icon_mouse_right_kj.svg.js +1 -1
  104. package/dist/assets/annotation/toolHotKeyIcon/icon_move_kj.svg.js +1 -1
  105. package/dist/assets/annotation/toolHotKeyIcon/icon_next_kj.svg.js +1 -1
  106. package/dist/assets/annotation/toolHotKeyIcon/icon_noDisplay.svg.js +1 -1
  107. package/dist/assets/annotation/toolHotKeyIcon/icon_playPause.svg.js +1 -1
  108. package/dist/assets/annotation/toolHotKeyIcon/icon_pointActive_kj.svg.js +1 -1
  109. package/dist/assets/annotation/toolHotKeyIcon/icon_pointNull_kj.svg.js +1 -1
  110. package/dist/assets/annotation/toolHotKeyIcon/icon_point_kj.svg.js +1 -1
  111. package/dist/assets/annotation/toolHotKeyIcon/icon_polygonActive_kj.svg.js +1 -1
  112. package/dist/assets/annotation/toolHotKeyIcon/icon_polygonChange_kj.svg.js +1 -1
  113. package/dist/assets/annotation/toolHotKeyIcon/icon_polygonCut_kj.svg.js +1 -1
  114. package/dist/assets/annotation/toolHotKeyIcon/icon_polygonDel_kj.svg.js +1 -1
  115. package/dist/assets/annotation/toolHotKeyIcon/icon_polygonInsert_kj.svg.js +1 -1
  116. package/dist/assets/annotation/toolHotKeyIcon/icon_polygonMerge_kj.svg.js +1 -1
  117. package/dist/assets/annotation/toolHotKeyIcon/icon_polygonNull_kj.svg.js +1 -1
  118. package/dist/assets/annotation/toolHotKeyIcon/icon_reform_kj.svg.js +1 -1
  119. package/dist/assets/annotation/toolHotKeyIcon/icon_reload_kj.svg.js +1 -1
  120. package/dist/assets/annotation/toolHotKeyIcon/icon_save_kj.svg.js +1 -1
  121. package/dist/assets/annotation/toolHotKeyIcon/icon_scribble.svg.js +1 -1
  122. package/dist/assets/annotation/toolHotKeyIcon/icon_segment.svg.js +1 -1
  123. package/dist/assets/annotation/toolHotKeyIcon/icon_speed_kj.svg.js +1 -1
  124. package/dist/assets/annotation/toolHotKeyIcon/icon_straightLine_kj.svg.js +1 -1
  125. package/dist/assets/annotation/toolHotKeyIcon/icon_strokeEnlarge.svg.js +1 -1
  126. package/dist/assets/annotation/toolHotKeyIcon/icon_strokeReduction.svg.js +1 -1
  127. package/dist/assets/annotation/toolHotKeyIcon/icon_tab_kj.svg.js +1 -1
  128. package/dist/assets/annotation/toolHotKeyIcon/icon_tag_kj.svg.js +1 -1
  129. package/dist/assets/annotation/toolHotKeyIcon/icon_unGrip_kj.svg.js +1 -1
  130. package/dist/assets/annotation/toolHotKeyIcon/icon_up.svg.js +1 -1
  131. package/dist/assets/annotation/toolHotKeyIcon/nextRemark.svg.js +1 -1
  132. package/dist/assets/annotation/toolHotKeyIcon/preRemark.svg.js +1 -1
  133. package/dist/assets/annotation/toolHotKeyIcon/setValid.svg.js +1 -1
  134. package/dist/assets/annotation/video/icon_clip.svg.js +1 -1
  135. package/dist/assets/annotation/video/icon_keyboard_h.svg.js +1 -1
  136. package/dist/assets/annotation/video/icon_timePoint.svg.js +1 -1
  137. package/dist/assets/annotation/video/icon_videoCut.svg.js +1 -1
  138. package/dist/assets/annotation/video/icon_videoCutting.svg.js +1 -1
  139. package/dist/assets/attributeIcon/eraser.svg.js +1 -1
  140. package/dist/assets/attributeIcon/eraser_a.svg.js +1 -1
  141. package/dist/assets/attributeIcon/icon_eyeLock_a.svg.js +1 -1
  142. package/dist/assets/attributeIcon/icon_eyeLock_h.svg.js +1 -1
  143. package/dist/assets/attributeIcon/pen.svg.js +1 -1
  144. package/dist/assets/attributeIcon/pen_a.svg.js +1 -1
  145. package/dist/assets/attributeIcon/zoomUp.svg.js +1 -1
  146. package/dist/assets/predictTracking/icon.svg.js +1 -1
  147. package/dist/assets/toolStyle/icon_border.svg.js +1 -1
  148. package/dist/assets/toolStyle/icon_borderColor.svg.js +1 -1
  149. package/dist/assets/toolStyle/icon_defaultSize.svg.js +1 -1
  150. package/dist/assets/toolStyle/icon_opacityFill.svg.js +1 -1
  151. package/dist/assets/toolStyle/icon_opacityStroke.svg.js +1 -1
  152. package/dist/components/LLMToolView/index.js +1 -1
  153. package/dist/components/LLMToolView/questionView/components/header/index.js +1 -1
  154. package/dist/components/LLMToolView/sidebar/components/answerList/index.js +1 -1
  155. package/dist/components/LLMToolView/sidebar/components/answerSort/index.js +1 -1
  156. package/dist/components/LLMToolView/sidebar/components/determineGroup/index.js +1 -1
  157. package/dist/components/LLMToolView/sidebar/components/scoreGroupButton/index.js +1 -1
  158. package/dist/components/LLMToolView/sidebar/components/textEditor/index.js +1 -1
  159. package/dist/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
  160. package/dist/components/LLMToolView/sidebar/index.js +1 -1
  161. package/dist/components/LLMToolView/utils/data.js +1 -1
  162. package/dist/components/NLPToolView/index.js +1 -1
  163. package/dist/components/NLPToolView/textContent/extraMask.js +1 -0
  164. package/dist/components/NLPToolView/textContent/index.js +1 -1
  165. package/dist/components/messageMaskLayer/index.js +1 -0
  166. package/dist/components/pointCloudView/PointCloudContext.js +1 -1
  167. package/dist/components/pointCloudView/PointCloudTopView.js +1 -1
  168. package/dist/components/tagList/components/overall/index.js +1 -0
  169. package/dist/components/tagList/components/portion/index.js +1 -0
  170. package/dist/components/tagList/index.js +1 -0
  171. package/dist/components/tagList/index.module.scss.js +1 -0
  172. package/dist/constant/index.js +1 -1
  173. package/dist/index.css +70 -2
  174. package/dist/index.js +1 -1
  175. package/dist/store/annotatedBox/index.js +1 -0
  176. package/dist/types/components/LLMToolView/index.d.ts +2 -0
  177. package/dist/types/components/LLMToolView/sidebar/components/answerList/index.d.ts +3 -10
  178. package/dist/types/components/LLMToolView/sidebar/components/answerSort/index.d.ts +1 -1
  179. package/dist/types/components/LLMToolView/sidebar/components/determineGroup/index.d.ts +1 -1
  180. package/dist/types/components/LLMToolView/sidebar/components/scoreGroupButton/index.d.ts +1 -1
  181. package/dist/types/components/LLMToolView/sidebar/components/textEditor/index.d.ts +1 -1
  182. package/dist/types/components/LLMToolView/sidebar/components/textInputBox/index.d.ts +1 -1
  183. package/dist/types/components/LLMToolView/sidebar/index.d.ts +1 -3
  184. package/dist/types/components/LLMToolView/types.d.ts +27 -0
  185. package/dist/types/components/LLMToolView/utils/data.d.ts +14 -0
  186. package/dist/types/components/NLPToolView/index.d.ts +5 -4
  187. package/dist/types/components/NLPToolView/textContent/extraMask.d.ts +12 -0
  188. package/dist/types/components/NLPToolView/textContent/index.d.ts +6 -8
  189. package/dist/types/components/NLPToolView/types.d.ts +18 -11
  190. package/dist/types/components/messageMaskLayer/index.d.ts +11 -0
  191. package/dist/types/components/pointCloudView/PointCloudContext.d.ts +3 -0
  192. package/dist/types/components/tagList/components/overall/index.d.ts +4 -0
  193. package/dist/types/components/tagList/components/portion/index.d.ts +4 -0
  194. package/dist/types/components/tagList/index.d.ts +4 -0
  195. package/dist/types/components/tagList/types.d.ts +23 -0
  196. package/dist/types/constant/index.d.ts +0 -4
  197. package/dist/types/index.d.ts +3 -1
  198. package/dist/types/store/annotatedBox/index.d.ts +14 -0
  199. package/dist/types/views/MainView/NLPLayout/index.d.ts +5 -3
  200. package/dist/types/views/MainView/sidebar/NLPSidebar/indicatorDetermine.d.ts +1 -1
  201. package/dist/types/views/MainView/sidebar/PointCloudToolSidebar/components/annotatedBox/index.d.ts +9 -0
  202. package/dist/types/views/MainView/sidebar/PointCloudToolSidebar/components/findTrackIDIndex/arrow.d.ts +8 -0
  203. package/dist/types/views/MainView/sidebar/PointCloudToolSidebar/components/findTrackIDIndex/index.d.ts +11 -0
  204. package/dist/types/views/MainView/sidebar/SwitchAttributeList/index.d.ts +0 -1
  205. package/dist/utils/audio.js +1 -1
  206. package/dist/views/MainView/LLMLayout/index.js +1 -1
  207. package/dist/views/MainView/NLPLayout/index.js +1 -1
  208. package/dist/views/MainView/sidebar/AnnotationText/index.js +1 -1
  209. package/dist/views/MainView/sidebar/NLPSidebar/index.js +1 -1
  210. package/dist/views/MainView/sidebar/NLPSidebar/indicatorDetermine.js +1 -1
  211. package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/annotatedBox/index.js +1 -0
  212. package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/annotatedBox/index.module.scss.js +1 -0
  213. package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/findTrackIDIndex/arrow.js +1 -0
  214. package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/findTrackIDIndex/index.js +1 -0
  215. package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/findTrackIDIndex/index.module.scss.js +1 -0
  216. package/dist/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
  217. package/dist/views/MainView/sidebar/SwitchAttributeList/index.js +1 -1
  218. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/LLM/index.js +1 -1
  219. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/common/index.js +1 -1
  220. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/polygon/index.js +1 -1
  221. package/es/App.js +1 -1
  222. package/es/assets/annotation/LLMTool/empty.svg.js +1 -1
  223. package/es/assets/annotation/LLMTool/imgFail_cn.svg.js +1 -1
  224. package/es/assets/annotation/LLMTool/imgFail_en.svg.js +1 -1
  225. package/es/assets/annotation/LLMTool/loading.svg.js +1 -1
  226. package/es/assets/annotation/audio/clip.svg.js +1 -1
  227. package/es/assets/annotation/audio/clipA.svg.js +1 -1
  228. package/es/assets/annotation/audio/clipASmall.svg.js +1 -1
  229. package/es/assets/annotation/audio/clipSmall.svg.js +1 -1
  230. package/es/assets/annotation/audio/delete.svg.js +1 -1
  231. package/es/assets/annotation/audio/loop.svg.js +1 -1
  232. package/es/assets/annotation/audio/loopA.svg.js +1 -1
  233. package/es/assets/annotation/audio/progressDot.svg.js +1 -1
  234. package/es/assets/annotation/audio/progressDotA.svg.js +1 -1
  235. package/es/assets/annotation/audio/tag.svg.js +1 -1
  236. package/es/assets/annotation/audio/tagA.svg.js +1 -1
  237. package/es/assets/annotation/common/icon_adapt.svg.js +1 -1
  238. package/es/assets/annotation/common/icon_adapt_black.svg.js +1 -1
  239. package/es/assets/annotation/common/icon_back.svg.js +1 -1
  240. package/es/assets/annotation/common/icon_backA.svg.js +1 -1
  241. package/es/assets/annotation/common/icon_clear.svg.js +1 -1
  242. package/es/assets/annotation/common/icon_clearSmall.svg.js +1 -1
  243. package/es/assets/annotation/common/icon_clearSmall_a.svg.js +1 -1
  244. package/es/assets/annotation/common/icon_clear_a.svg.js +1 -1
  245. package/es/assets/annotation/common/icon_esc.svg.js +1 -1
  246. package/es/assets/annotation/common/icon_invalid.svg.js +1 -1
  247. package/es/assets/annotation/common/icon_invalid_a.svg.js +1 -1
  248. package/es/assets/annotation/common/icon_left_squareOutlined.svg.js +1 -1
  249. package/es/assets/annotation/common/icon_menu_fold.svg.js +1 -1
  250. package/es/assets/annotation/common/icon_next.svg.js +1 -1
  251. package/es/assets/annotation/common/icon_nextA.svg.js +1 -1
  252. package/es/assets/annotation/common/icon_r.svg.js +1 -1
  253. package/es/assets/annotation/common/icon_rA.svg.js +1 -1
  254. package/es/assets/annotation/common/icon_right_squareOutlined.svg.js +1 -1
  255. package/es/assets/annotation/common/icon_save.svg.js +1 -1
  256. package/es/assets/annotation/common/icon_saveA.svg.js +1 -1
  257. package/es/assets/annotation/image/brightness.svg.js +1 -1
  258. package/es/assets/annotation/image/contrast.svg.js +1 -1
  259. package/es/assets/annotation/image/icon_yuantu.svg.js +1 -1
  260. package/es/assets/annotation/image/saturation.svg.js +1 -1
  261. package/es/assets/annotation/lineTool/icon_line.svg.js +1 -1
  262. package/es/assets/annotation/lineTool/icon_line_a.svg.js +1 -1
  263. package/es/assets/annotation/pointCloudTool/addSvg.svg.js +1 -1
  264. package/es/assets/annotation/pointCloudTool/cancel.svg.js +1 -1
  265. package/es/assets/annotation/pointCloudTool/changePointCloudValid.svg.js +1 -1
  266. package/es/assets/annotation/pointCloudTool/circleSelector.svg.js +1 -1
  267. package/es/assets/annotation/pointCloudTool/circleSelector_a.svg.js +1 -1
  268. package/es/assets/annotation/pointCloudTool/clearSvg.svg.js +1 -1
  269. package/es/assets/annotation/pointCloudTool/copy.svg.js +1 -1
  270. package/es/assets/annotation/pointCloudTool/coverMode.svg.js +1 -1
  271. package/es/assets/annotation/pointCloudTool/finish.svg.js +1 -1
  272. package/es/assets/annotation/pointCloudTool/highlight.svg.js +1 -0
  273. package/es/assets/annotation/pointCloudTool/highlight_a.svg.js +1 -0
  274. package/es/assets/annotation/pointCloudTool/lassoSelector.svg.js +1 -1
  275. package/es/assets/annotation/pointCloudTool/lassoSelector_a.svg.js +1 -1
  276. package/es/assets/annotation/pointCloudTool/leftArrow.svg.js +1 -0
  277. package/es/assets/annotation/pointCloudTool/nextBox.svg.js +1 -1
  278. package/es/assets/annotation/pointCloudTool/nodata.svg.js +1 -1
  279. package/es/assets/annotation/pointCloudTool/patse.svg.js +1 -1
  280. package/es/assets/annotation/pointCloudTool/prevBox.svg.js +1 -1
  281. package/es/assets/annotation/pointCloudTool/rightArrow.svg.js +1 -0
  282. package/es/assets/annotation/pointCloudTool/rotate180_black.svg.js +1 -1
  283. package/es/assets/annotation/pointCloudTool/selectAll.svg.js +1 -1
  284. package/es/assets/annotation/pointCloudTool/selectMultiple.svg.js +1 -1
  285. package/es/assets/annotation/pointCloudTool/unCoverMode.svg.js +1 -1
  286. package/es/assets/annotation/pointCloudTool/unitAttribute.svg.js +1 -1
  287. package/es/assets/annotation/pointCloudTool/unitAttributeForbid.svg.js +1 -1
  288. package/es/assets/annotation/pointCloudTool/unitAttributeHover.svg.js +1 -1
  289. package/es/assets/annotation/pointTool/icon_point.svg.js +1 -1
  290. package/es/assets/annotation/pointTool/icon_point_a.svg.js +1 -1
  291. package/es/assets/annotation/polygonTool/icon_polygon.svg.js +1 -1
  292. package/es/assets/annotation/polygonTool/icon_polygon_a.svg.js +1 -1
  293. package/es/assets/annotation/rectTool/icon_rect.svg.js +1 -1
  294. package/es/assets/annotation/rectTool/icon_rect_a.svg.js +1 -1
  295. package/es/assets/annotation/toolHotKeyIcon/deleteRemark.svg.js +1 -1
  296. package/es/assets/annotation/toolHotKeyIcon/icon_alttab_kj.svg.js +1 -1
  297. package/es/assets/annotation/toolHotKeyIcon/icon_back_kj.svg.js +1 -1
  298. package/es/assets/annotation/toolHotKeyIcon/icon_cencel_kj.svg.js +1 -1
  299. package/es/assets/annotation/toolHotKeyIcon/icon_del_kj.svg.js +1 -1
  300. package/es/assets/annotation/toolHotKeyIcon/icon_down.svg.js +1 -1
  301. package/es/assets/annotation/toolHotKeyIcon/icon_eraser.svg.js +1 -1
  302. package/es/assets/annotation/toolHotKeyIcon/icon_eyeLock_kj.svg.js +1 -1
  303. package/es/assets/annotation/toolHotKeyIcon/icon_forward_kj.svg.js +1 -1
  304. package/es/assets/annotation/toolHotKeyIcon/icon_frameActive_kj.svg.js +1 -1
  305. package/es/assets/annotation/toolHotKeyIcon/icon_frameChange_kj.svg.js +1 -1
  306. package/es/assets/annotation/toolHotKeyIcon/icon_frameNull_kj.svg.js +1 -1
  307. package/es/assets/annotation/toolHotKeyIcon/icon_frame_kj.svg.js +1 -1
  308. package/es/assets/annotation/toolHotKeyIcon/icon_fullView_kj.svg.js +1 -1
  309. package/es/assets/annotation/toolHotKeyIcon/icon_kj1.svg.js +1 -1
  310. package/es/assets/annotation/toolHotKeyIcon/icon_kj_h.svg.js +1 -1
  311. package/es/assets/annotation/toolHotKeyIcon/icon_last_kj.svg.js +1 -1
  312. package/es/assets/annotation/toolHotKeyIcon/icon_lineActive_kj.svg.js +1 -1
  313. package/es/assets/annotation/toolHotKeyIcon/icon_lineChange_kj.svg.js +1 -1
  314. package/es/assets/annotation/toolHotKeyIcon/icon_lineCont_kj.svg.js +1 -1
  315. package/es/assets/annotation/toolHotKeyIcon/icon_lineDel_kj.svg.js +1 -1
  316. package/es/assets/annotation/toolHotKeyIcon/icon_lineInsert_kj.svg.js +1 -1
  317. package/es/assets/annotation/toolHotKeyIcon/icon_lineNull_kj.svg.js +1 -1
  318. package/es/assets/annotation/toolHotKeyIcon/icon_lineSpecial_kj.svg.js +1 -1
  319. package/es/assets/annotation/toolHotKeyIcon/icon_line_kj.svg.js +1 -1
  320. package/es/assets/annotation/toolHotKeyIcon/icon_line_static.svg.js +1 -1
  321. package/es/assets/annotation/toolHotKeyIcon/icon_loupe_kj.svg.js +1 -1
  322. package/es/assets/annotation/toolHotKeyIcon/icon_mouse_left_kj.svg.js +1 -1
  323. package/es/assets/annotation/toolHotKeyIcon/icon_mouse_middle_kj.svg.js +1 -1
  324. package/es/assets/annotation/toolHotKeyIcon/icon_mouse_right_kj.svg.js +1 -1
  325. package/es/assets/annotation/toolHotKeyIcon/icon_move_kj.svg.js +1 -1
  326. package/es/assets/annotation/toolHotKeyIcon/icon_next_kj.svg.js +1 -1
  327. package/es/assets/annotation/toolHotKeyIcon/icon_noDisplay.svg.js +1 -1
  328. package/es/assets/annotation/toolHotKeyIcon/icon_playPause.svg.js +1 -1
  329. package/es/assets/annotation/toolHotKeyIcon/icon_pointActive_kj.svg.js +1 -1
  330. package/es/assets/annotation/toolHotKeyIcon/icon_pointNull_kj.svg.js +1 -1
  331. package/es/assets/annotation/toolHotKeyIcon/icon_point_kj.svg.js +1 -1
  332. package/es/assets/annotation/toolHotKeyIcon/icon_polygonActive_kj.svg.js +1 -1
  333. package/es/assets/annotation/toolHotKeyIcon/icon_polygonChange_kj.svg.js +1 -1
  334. package/es/assets/annotation/toolHotKeyIcon/icon_polygonCut_kj.svg.js +1 -1
  335. package/es/assets/annotation/toolHotKeyIcon/icon_polygonDel_kj.svg.js +1 -1
  336. package/es/assets/annotation/toolHotKeyIcon/icon_polygonInsert_kj.svg.js +1 -1
  337. package/es/assets/annotation/toolHotKeyIcon/icon_polygonMerge_kj.svg.js +1 -1
  338. package/es/assets/annotation/toolHotKeyIcon/icon_polygonNull_kj.svg.js +1 -1
  339. package/es/assets/annotation/toolHotKeyIcon/icon_reform_kj.svg.js +1 -1
  340. package/es/assets/annotation/toolHotKeyIcon/icon_reload_kj.svg.js +1 -1
  341. package/es/assets/annotation/toolHotKeyIcon/icon_save_kj.svg.js +1 -1
  342. package/es/assets/annotation/toolHotKeyIcon/icon_scribble.svg.js +1 -1
  343. package/es/assets/annotation/toolHotKeyIcon/icon_segment.svg.js +1 -1
  344. package/es/assets/annotation/toolHotKeyIcon/icon_speed_kj.svg.js +1 -1
  345. package/es/assets/annotation/toolHotKeyIcon/icon_straightLine_kj.svg.js +1 -1
  346. package/es/assets/annotation/toolHotKeyIcon/icon_strokeEnlarge.svg.js +1 -1
  347. package/es/assets/annotation/toolHotKeyIcon/icon_strokeReduction.svg.js +1 -1
  348. package/es/assets/annotation/toolHotKeyIcon/icon_tab_kj.svg.js +1 -1
  349. package/es/assets/annotation/toolHotKeyIcon/icon_tag_kj.svg.js +1 -1
  350. package/es/assets/annotation/toolHotKeyIcon/icon_unGrip_kj.svg.js +1 -1
  351. package/es/assets/annotation/toolHotKeyIcon/icon_up.svg.js +1 -1
  352. package/es/assets/annotation/toolHotKeyIcon/nextRemark.svg.js +1 -1
  353. package/es/assets/annotation/toolHotKeyIcon/preRemark.svg.js +1 -1
  354. package/es/assets/annotation/toolHotKeyIcon/setValid.svg.js +1 -1
  355. package/es/assets/annotation/video/icon_clip.svg.js +1 -1
  356. package/es/assets/annotation/video/icon_keyboard_h.svg.js +1 -1
  357. package/es/assets/annotation/video/icon_timePoint.svg.js +1 -1
  358. package/es/assets/annotation/video/icon_videoCut.svg.js +1 -1
  359. package/es/assets/annotation/video/icon_videoCutting.svg.js +1 -1
  360. package/es/assets/attributeIcon/eraser.svg.js +1 -1
  361. package/es/assets/attributeIcon/eraser_a.svg.js +1 -1
  362. package/es/assets/attributeIcon/icon_eyeLock_a.svg.js +1 -1
  363. package/es/assets/attributeIcon/icon_eyeLock_h.svg.js +1 -1
  364. package/es/assets/attributeIcon/pen.svg.js +1 -1
  365. package/es/assets/attributeIcon/pen_a.svg.js +1 -1
  366. package/es/assets/attributeIcon/zoomUp.svg.js +1 -1
  367. package/es/assets/predictTracking/icon.svg.js +1 -1
  368. package/es/assets/toolStyle/icon_border.svg.js +1 -1
  369. package/es/assets/toolStyle/icon_borderColor.svg.js +1 -1
  370. package/es/assets/toolStyle/icon_defaultSize.svg.js +1 -1
  371. package/es/assets/toolStyle/icon_opacityFill.svg.js +1 -1
  372. package/es/assets/toolStyle/icon_opacityStroke.svg.js +1 -1
  373. package/es/components/LLMToolView/index.js +1 -1
  374. package/es/components/LLMToolView/modelAPIView/index.js +1 -1
  375. package/es/components/LLMToolView/questionView/components/header/index.js +1 -1
  376. package/es/components/LLMToolView/questionView/components/imgView/index.js +1 -1
  377. package/es/components/LLMToolView/questionView/index.js +1 -1
  378. package/es/components/LLMToolView/sidebar/components/answerList/index.js +1 -1
  379. package/es/components/LLMToolView/sidebar/components/answerSort/index.js +1 -1
  380. package/es/components/LLMToolView/sidebar/components/determineGroup/index.js +1 -1
  381. package/es/components/LLMToolView/sidebar/components/scoreGroupButton/index.js +1 -1
  382. package/es/components/LLMToolView/sidebar/components/textEditor/index.js +2 -2
  383. package/es/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
  384. package/es/components/LLMToolView/sidebar/index.js +1 -1
  385. package/es/components/LLMToolView/utils/data.js +1 -1
  386. package/es/components/NLPToolView/index.js +1 -1
  387. package/es/components/NLPToolView/textContent/extraMask.js +1 -0
  388. package/es/components/NLPToolView/textContent/index.js +1 -1
  389. package/es/components/attributeList/components/limitPopover/index.js +1 -1
  390. package/es/components/audioAnnotate/audioContext/index.js +1 -1
  391. package/es/components/audioAnnotate/audioSide/LabelDetailPopover/index.js +1 -1
  392. package/es/components/audioAnnotate/audioSide/clipSidebar/index.js +1 -1
  393. package/es/components/audioAnnotate/audioSide/labelSidebar/index.js +1 -1
  394. package/es/components/audioAnnotate/tagResultShow/index.js +1 -1
  395. package/es/components/audioPlayer/clipRegion/index.js +1 -1
  396. package/es/components/audioPlayer/clipTip/index.js +1 -1
  397. package/es/components/audioPlayer/combineTip/index.js +1 -1
  398. package/es/components/audioPlayer/progressDot/index.js +1 -1
  399. package/es/components/audioPlayer/zoomSlider/index.js +1 -1
  400. package/es/components/checkboxList/index.js +1 -1
  401. package/es/components/colorPalette/index.js +1 -1
  402. package/es/components/customAntd/IconWithText/index.js +1 -1
  403. package/es/components/diffMatchPatchComponent/index.js +2 -2
  404. package/es/components/fileException/FileError.js +1 -1
  405. package/es/components/fileException/FileInvalid.js +1 -1
  406. package/es/components/fileException/index.js +1 -1
  407. package/es/components/invalidPage/index.js +1 -1
  408. package/es/components/latexEditor/index.js +1 -1
  409. package/es/components/markdownView/index.js +1 -1
  410. package/es/components/measureCanvas/index.js +1 -1
  411. package/es/components/messageMaskLayer/index.js +1 -0
  412. package/es/components/pointCloud2DRectOperationView/index.js +1 -1
  413. package/es/components/pointCloudView/PointCloud2DSingleView.js +1 -1
  414. package/es/components/pointCloudView/PointCloud2DView.js +1 -1
  415. package/es/components/pointCloudView/PointCloud3DView.js +1 -1
  416. package/es/components/pointCloudView/PointCloudContext.js +1 -1
  417. package/es/components/pointCloudView/PointCloudInfos.js +1 -1
  418. package/es/components/pointCloudView/PointCloudSegment.js +1 -1
  419. package/es/components/pointCloudView/PointCloudSegment2DView.js +1 -1
  420. package/es/components/pointCloudView/PointCloudSegmentStatus.js +1 -1
  421. package/es/components/pointCloudView/PointCloudSegmentToolbar.js +1 -1
  422. package/es/components/pointCloudView/PointCloudTopView.js +1 -1
  423. package/es/components/pointCloudView/components/HighlightVisible/index.js +1 -1
  424. package/es/components/pointCloudView/components/PointCloudSizeSlider/index.js +1 -1
  425. package/es/components/pointCloudView/components/TitleButton/index.js +1 -1
  426. package/es/components/pointCloudView/components/UnifyParamsModal/index.js +1 -1
  427. package/es/components/pointCloudView/components/sideAndBackOverView/index.js +1 -1
  428. package/es/components/pointCloudView/index.js +1 -1
  429. package/es/components/predictTracking/predictTrackingIcon/index.js +1 -1
  430. package/es/components/predictTracking/previewResult/index.js +1 -1
  431. package/es/components/tagList/components/overall/index.js +1 -0
  432. package/es/components/tagList/components/portion/index.js +1 -0
  433. package/es/components/tagList/index.js +1 -0
  434. package/es/components/tagList/index.module.scss.js +1 -0
  435. package/es/components/videoAnnotate/index.js +1 -1
  436. package/es/components/videoAnnotate/videoClipTool/components/annotatedList/index.js +1 -1
  437. package/es/components/videoAnnotate/videoClipTool/components/resizableSnippet/index.js +1 -1
  438. package/es/components/videoAnnotate/videoClipTool/components/timeSliceRange/index.js +1 -1
  439. package/es/components/videoAnnotate/videoClipTool/components/videoClipToolHotkey/index.js +1 -1
  440. package/es/components/videoAnnotate/videoClipTool/components/videoTimeSlicesOverVideo/index.js +1 -1
  441. package/es/components/videoAnnotate/videoClipTool/components/videoTrack/index.js +1 -1
  442. package/es/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptorI18nProvider.js +1 -1
  443. package/es/components/videoPlayer/VideoTagLayer.js +1 -1
  444. package/es/components/videoPlayer/VideoTextLayer.js +2 -2
  445. package/es/components/videoPlayer/components/SpeedController/index.js +1 -1
  446. package/es/components/videoPlayer/components/controller/index.js +1 -1
  447. package/es/components/videoPlayer/index.js +1 -1
  448. package/es/constant/index.js +1 -1
  449. package/es/hooks/useSafeSate.js +1 -1
  450. package/es/index.css +70 -2
  451. package/es/index.js +1 -1
  452. package/es/store/annotatedBox/index.js +1 -0
  453. package/es/utils/audio.js +1 -1
  454. package/es/views/MainView/LLMLayout/index.js +1 -1
  455. package/es/views/MainView/NLPLayout/index.js +1 -1
  456. package/es/views/MainView/annotationOperation/index.js +1 -1
  457. package/es/views/MainView/annotationTips/index.js +1 -1
  458. package/es/views/MainView/index.js +1 -1
  459. package/es/views/MainView/sidebar/AnnotationText/index.js +1 -1
  460. package/es/views/MainView/sidebar/GeneralOperation/index.js +1 -1
  461. package/es/views/MainView/sidebar/GeneralOperation/useOperationList.js +1 -1
  462. package/es/views/MainView/sidebar/NLPSidebar/NLPAnnotatedList.js +1 -1
  463. package/es/views/MainView/sidebar/NLPSidebar/index.js +1 -1
  464. package/es/views/MainView/sidebar/NLPSidebar/indicatorDetermine.js +1 -1
  465. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/annotatedBox/index.js +1 -0
  466. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/annotatedBox/index.module.scss.js +1 -0
  467. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/batchUpdateModal/index.js +1 -1
  468. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/findTrackIDIndex/arrow.js +1 -0
  469. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/findTrackIDIndex/index.js +1 -0
  470. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/findTrackIDIndex/index.module.scss.js +1 -0
  471. package/es/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
  472. package/es/views/MainView/sidebar/ScribbleSidebar/index.js +1 -1
  473. package/es/views/MainView/sidebar/SwitchAttributeList/index.js +1 -1
  474. package/es/views/MainView/sidebar/TextAreaFormat/index.js +1 -1
  475. package/es/views/MainView/sidebar/TextToolSidebar/index.js +1 -1
  476. package/es/views/MainView/sidebar/ToolIcons.js +1 -1
  477. package/es/views/MainView/sidebar/index.js +1 -1
  478. package/es/views/MainView/toolFooter/AnnotatedAttributes/index.js +1 -1
  479. package/es/views/MainView/toolFooter/FooterPopover.js +1 -1
  480. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/LLM/index.js +1 -1
  481. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/common/index.js +1 -1
  482. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.js +1 -1
  483. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/polygon/index.js +1 -1
  484. package/es/views/MainView/toolFooter/FooterTips/index.js +1 -1
  485. package/es/views/MainView/toolFooter/HiddenTips/index.js +1 -1
  486. package/es/views/MainView/toolFooter/PageNumber/index.js +1 -1
  487. package/es/views/MainView/toolFooter/Pagination.js +1 -1
  488. package/es/views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.js +1 -1
  489. package/es/views/MainView/toolFooter/ZoomController/index.js +1 -1
  490. package/es/views/MainView/toolFooter/index.js +1 -1
  491. package/es/views/MainView/toolHeader/ExportData/index.js +1 -1
  492. package/es/views/MainView/toolHeader/StepSwitch/index.js +1 -1
  493. package/es/views/MainView/toolHeader/SwitchPattern/index.js +1 -1
  494. package/es/views/MainView/toolHeader/headerOption/index.js +1 -1
  495. package/es/views/MainView/toolHeader/index.js +1 -1
  496. package/package.json +9 -6
  497. package/dist/components/NLPToolView/textContent/remarkMask.js +0 -1
  498. package/dist/types/components/NLPToolView/textContent/remarkMask.d.ts +0 -12
  499. package/es/components/NLPToolView/textContent/remarkMask.js +0 -1
@@ -1 +1 @@
1
- import m,{useContext as N,useState as w,useEffect as d}from"react";import{connect as Q}from"react-redux";import{LabelBeeContext as $,LLMContext as b}from"../../store/ctx.js";import{message as k}from"antd";import{ELLMDataType as p,prefix as B}from"../../constant/index.js";import{Layout as K}from"antd/es";import W from"./questionView/index.js";import{useTranslation as z}from"react-i18next";import G from"../../views/MainView/annotationTips/index.js";import{getCurrentResultFromResultList as H}from"./utils/data.js";import{getStepConfig as J}from"../../store/annotation/reducer.js";import{jsonParser as O}from"../../utils/index.js";const C=`${B}-LLMView`,U=f=>{const{annotation:g,checkMode:x=!0,tips:j,showTips:q}=f,{imgIndex:n,imgList:s,stepList:L,step:v}=g,{hoverKey:_,modelAPIResponse:y,setModelAPIResponse:T,newAnswerList:l}=N(b),[E,P]=w([]),[R,V]=w(""),[e,A]=w(),{t:h}=z();return d(()=>{let t;if(!x)return t=setInterval(()=>{k.info(h("EfficientListening"))},1e3*60),()=>{t&&clearInterval(t)}},[]),d(()=>{var t,o,i,r,M,I;if(!s[n])return;const S=((t=e==null?void 0:e.dataType)==null?void 0:t.prompt)===p.Picture,D=((o=e==null?void 0:e.dataType)==null?void 0:o.response)===p.Picture,a=(i=s[n])==null?void 0:i.questionList,u=(r=s[n])==null?void 0:r.llmFile,F=S?u==null?void 0:u.question:a==null?void 0:a.question;V(F);let c=(a==null?void 0:a.answerList)||[];D&&(c=(u==null?void 0:u.answerList)||[]),((M=e==null?void 0:e.dataType)==null?void 0:M.response)===p.None&&(c=[]),((I=e==null?void 0:e.dataType)==null?void 0:I.response)===p.Text&&(l==null?void 0:l.length)>0&&(c=l),P(c)},[n,l,e]),d(()=>{var t;if(!s[n])return;const o=(t=s[n])!=null?t:{},i=H(o==null?void 0:o.result),r=(i==null?void 0:i.length)>0?i[0]:i;T((r==null?void 0:r.modelAPIResponse)||[])},[n]),d(()=>{var t;if(L&&v){const o=(t=J(L,v))==null?void 0:t.config;A(O(o))}},[L,v]),m.createElement(K,{className:C},m.createElement("div",{className:`${C}-question`},q===!0&&m.createElement(G,{tips:j}),m.createElement(W,{hoverKey:_,question:R,answerList:E,modelAPIResponse:y,setModelAPIResponse:T,checkMode:x,annotation:g,LLMConfig:e})))},X=f=>({annotation:f.annotation});var Y=Q(X,null,null,{context:$})(U);export{Y as default};
1
+ import a,{useContext as N,useState as f,useEffect as u}from"react";import{connect as $}from"react-redux";import{LabelBeeContext as U,LLMContext as B}from"../../store/ctx.js";import{message as K}from"antd";import{ELLMDataType as v,prefix as W}from"../../constant/index.js";import{Layout as z}from"antd/es";import G from"./questionView/index.js";import{useTranslation as H}from"react-i18next";import J from"../../views/MainView/annotationTips/index.js";import{getCurrentResultFromResultList as O}from"./utils/data.js";import{getStepConfig as X}from"../../store/annotation/reducer.js";import{jsonParser as Y}from"../../utils/index.js";import Z from"../messageMaskLayer/index.js";const C=`${W}-LLMView`,ee=L=>{const{annotation:x,checkMode:M=!0,tips:q,showTips:A,drawLayerSlot:T}=L,{imgIndex:n,imgList:l,stepList:g,step:w,toolInstance:s}=x,{hoverKey:E,modelAPIResponse:R,setModelAPIResponse:I,newAnswerList:d}=N(B),[P,V]=f([]),[S,h]=f(""),[t,k]=f(),{t:y}=H(),[,Q]=f(0);return u(()=>{let e;if(!M)return e=setInterval(()=>{K.info(y("EfficientListening"))},1e3*60),()=>{e&&clearInterval(e)}},[]),u(()=>{if(s)return s.on("validUpdated",()=>{Q(e=>e+1)}),()=>{s.unbindAll("validUpdated")}},[s]),u(()=>{var e,o,i,r,_,j;if(!l[n])return;const b=((e=t==null?void 0:t.dataType)==null?void 0:e.prompt)===v.Picture,D=((o=t==null?void 0:t.dataType)==null?void 0:o.response)===v.Picture,c=(i=l[n])==null?void 0:i.questionList,m=(r=l[n])==null?void 0:r.llmFile,F=b?m==null?void 0:m.question:c==null?void 0:c.question;h(F);let p=(c==null?void 0:c.answerList)||[];D&&(p=(m==null?void 0:m.answerList)||[]),((_=t==null?void 0:t.dataType)==null?void 0:_.response)===v.None&&(p=[]),((j=t==null?void 0:t.dataType)==null?void 0:j.response)===v.Text&&(d==null?void 0:d.length)>0&&(p=d),V(p)},[n,d,t]),u(()=>{var e;if(!l[n])return;const o=(e=l[n])!=null?e:{},i=O(o==null?void 0:o.result),r=(i==null?void 0:i.length)>0?i[0]:i;I((r==null?void 0:r.modelAPIResponse)||[])},[n]),u(()=>{var e;if(g&&w){const o=(e=X(g,w))==null?void 0:e.config;k(Y(o))}},[g,w]),a.createElement(z,{className:C},!(s==null?void 0:s.valid)&&a.createElement(Z,{message:y("InvalidQuestionAndSkip")}),T==null?void 0:T({}),a.createElement("div",{className:`${C}-question`},A===!0&&a.createElement(J,{tips:q}),a.createElement(G,{hoverKey:E,question:S,answerList:P,modelAPIResponse:R,setModelAPIResponse:I,checkMode:M,annotation:x,LLMConfig:t})))},te=L=>({annotation:L.annotation});var ne=$(te,null,null,{context:U})(ee);export{ne as default};
@@ -1 +1 @@
1
- import{Tag as F}from"antd";import p from"classnames";import t,{useState as _,useEffect as P,useCallback as x}from"react";import b from"../../../assets/annotation/LLMTool/loading.svg.js";import j from"../../markdownView/index.js";import{EDataFormatType as N}from"../../../constant/index.js";import{getStepConfig as R}from"../../../store/annotation/reducer.js";import{jsonParser as $}from"../../../utils/index.js";import{SyncOutlined as T,InfoCircleFilled as V}from"@ant-design/icons";import{LLMViewCls as v}from"../questionView/index.js";import{i18n as I}from"@labelbee/lb-utils";var S=(r,e,l)=>new Promise((o,m)=>{var d=n=>{try{i(l.next(n))}catch(s){m(s)}},w=n=>{try{i(l.throw(n))}catch(s){m(s)}},i=n=>n.done?o(n.value):Promise.resolve(n.value).then(d,w);i((l=l.apply(r,e)).next())});const D=({dataFormatType:r,answer:e})=>r===N.Markdown?t.createElement(j,{value:e}):t.createElement("span",null,e),G=(r,e)=>{var l;return(l=e.find(o=>o.id===r))==null?void 0:l.answer},q=r=>{var e;const{annotation:l={},checkMode:o,dataFormatType:m,modelAPIResponse:d,question:w,setModelAPIResponse:i}=r,{stepList:n,step:s,toolInstance:E}=l,[M,L]=_(),[c,A]=_([]),{enableModelAPI:u=!1,modelAPIConfigList:f=[]}=M||{};P(()=>{E&&(E.loading=(c==null?void 0:c.length)>0)},[c]);const g=x(a=>{i==null||i(y=>{let h=!1;const C=y.map(k=>k.id===a.id?(h=!0,a):k);return h||C.push(a),C})},[d]);return P(()=>{var a;if(n&&s){const y=(a=R(n,s))==null?void 0:a.config;L($(y))}},[n,s]),u?(e=f==null?void 0:f.map)==null?void 0:e.call(f,a=>t.createElement(z,{dataFormatType:m,config:a,modelAPIResponse:d,key:a==null?void 0:a.id,toolInstance:E,setLoadingModelIDs:A,question:w,updateModelAPIResponse:g,checkMode:o})):null},B=()=>t.createElement("div",{className:p({[`${v}__loading`]:!0})},I.t("AnswersAreBeingGenerated"),t.createElement("img",{src:b})),O=()=>t.createElement("span",{className:p({[`${v}__failed`]:!0})},I.t("AnswerGenerationFailedPleaseTryAgainLater")," ",t.createElement(V,null)),z=({dataFormatType:r,config:e,modelAPIResponse:l,toolInstance:o,setLoadingModelIDs:m,question:d,updateModelAPIResponse:w,checkMode:i})=>{const[n,s]=_(!1),[E,M]=_(!1),L=G(e==null?void 0:e.id,l),c=u=>{s(u),m(f=>u?[...f,e==null?void 0:e.id]:f.filter(g=>g!==(e==null?void 0:e.id)))},A=()=>S(void 0,null,function*(){c(!0),M(!1);try{const u=yield o==null?void 0:o.getAPIAnswer(e,d);w({id:e==null?void 0:e.id,answer:u,name:e==null?void 0:e.name})}catch(u){M(!0)}finally{c(!1)}});return P(()=>{M(!1)},[d]),t.createElement("div",{className:p({[`${v}__content`]:!0}),key:e==null?void 0:e.id},t.createElement(F,{style:{color:"#666FFF",background:"#eeefff",height:"20px",padding:"0px 8px",border:"none"}},e==null?void 0:e.name),t.createElement("div",{className:p({[`${v}__answer`]:!0})},!n&&L&&t.createElement(D,{dataFormatType:r,answer:L}),t.createElement("div",{className:p({[`${v}__message`]:!0})},n?t.createElement(B,null):E&&t.createElement(O,null)),!n&&!i&&t.createElement("div",{className:p({[`${v}__footer`]:!0})},t.createElement("span",{onClick:A},I.t("ReGenerate"),t.createElement(T,null)))))};export{q as default};
1
+ import{Tag as F}from"antd";import p from"classnames";import t,{useState as L,useEffect as P,useCallback as x}from"react";import b from"../../../assets/annotation/LLMTool/loading.svg.js";import j from"../../markdownView/index.js";import{EDataFormatType as N}from"../../../constant/index.js";import{getStepConfig as R}from"../../../store/annotation/reducer.js";import{jsonParser as $}from"../../../utils/index.js";import{SyncOutlined as T,InfoCircleFilled as V}from"@ant-design/icons";import{LLMViewCls as v}from"../questionView/index.js";import{i18n as I}from"@labelbee/lb-utils";var S=(r,e,l)=>new Promise((o,m)=>{var d=n=>{try{i(l.next(n))}catch(s){m(s)}},w=n=>{try{i(l.throw(n))}catch(s){m(s)}},i=n=>n.done?o(n.value):Promise.resolve(n.value).then(d,w);i((l=l.apply(r,e)).next())});const D=({dataFormatType:r,answer:e})=>r===N.Markdown?t.createElement(j,{value:e}):t.createElement("span",null,e),G=(r,e)=>{var l;return(l=e.find(o=>o.id===r))==null?void 0:l.answer},q=r=>{var e;const{annotation:l={},checkMode:o,dataFormatType:m,modelAPIResponse:d,question:w,setModelAPIResponse:i}=r,{stepList:n,step:s,toolInstance:E}=l,[_,M]=L(),[c,A]=L([]),{enableModelAPI:u=!1,modelAPIConfigList:f=[]}=_||{};P(()=>{E&&(E.loading=(c==null?void 0:c.length)>0)},[c]);const g=x(a=>{i==null||i(y=>{let h=!1;const C=y.map(k=>k.id===a.id?(h=!0,a):k);return h||C.push(a),C})},[d]);return P(()=>{var a;if(n&&s){const y=(a=R(n,s))==null?void 0:a.config;M($(y))}},[n,s]),u?(e=f==null?void 0:f.map)==null?void 0:e.call(f,a=>t.createElement(z,{dataFormatType:m,config:a,modelAPIResponse:d,key:a==null?void 0:a.id,toolInstance:E,setLoadingModelIDs:A,question:w,updateModelAPIResponse:g,checkMode:o})):null},B=()=>t.createElement("div",{className:p({[`${v}__loading`]:!0})},I.t("AnswersAreBeingGenerated"),t.createElement("img",{src:b})),O=()=>t.createElement("span",{className:p({[`${v}__failed`]:!0})},I.t("AnswerGenerationFailedPleaseTryAgainLater")," ",t.createElement(V,null)),z=({dataFormatType:r,config:e,modelAPIResponse:l,toolInstance:o,setLoadingModelIDs:m,question:d,updateModelAPIResponse:w,checkMode:i})=>{const[n,s]=L(!1),[E,_]=L(!1),M=G(e==null?void 0:e.id,l),c=u=>{s(u),m(f=>u?[...f,e==null?void 0:e.id]:f.filter(g=>g!==(e==null?void 0:e.id)))},A=()=>S(void 0,null,function*(){c(!0),_(!1);try{const u=yield o==null?void 0:o.getAPIAnswer(e,d);w({id:e==null?void 0:e.id,answer:u,name:e==null?void 0:e.name})}catch(u){_(!0)}finally{c(!1)}});return P(()=>{_(!1)},[d]),t.createElement("div",{className:p({[`${v}__content`]:!0}),key:e==null?void 0:e.id},t.createElement(F,{style:{color:"#666FFF",background:"#eeefff",height:"20px",padding:"0px 8px",border:"none"}},e==null?void 0:e.name),t.createElement("div",{className:p({[`${v}__answer`]:!0})},!n&&M&&t.createElement(D,{dataFormatType:r,answer:M}),t.createElement("div",{className:p({[`${v}__message`]:!0})},n?t.createElement(B,null):E&&t.createElement(O,null)),!n&&!i&&t.createElement("div",{className:p({[`${v}__footer`]:!0})},t.createElement("span",{onClick:A},I.t("ReGenerate"),t.createElement(T,null)))))};export{q as default};
@@ -1 +1 @@
1
- import e from"react";import{useTranslation as p}from"react-i18next";import{Resizable as f}from"re-resizable";import{Radio as i,Image as u}from"antd";import{EDataFormatType as m,prefix as g}from"../../../../../constant/index.js";import{FileTextOutlined as E}from"@ant-design/icons";import x from"../../../../markdownView/index.js";import{isString as w,isObject as h}from"lodash";import{i18n as y}from"@labelbee/lb-utils";import b from"../../../../../assets/annotation/LLMTool/imgFail_cn.svg.js";import v from"../../../../../assets/annotation/LLMTool/imgFail_en.svg.js";const s=`${g}-LLMView`,L=({question:t,dataFormatType:o,isImg:n})=>{const r=w(t)?t:"",a=y.language==="en"?v:b;if(n){const l=h(t)?t==null?void 0:t.url:"";return e.createElement(u,{src:l||a,width:400,fallback:a})}return e.createElement("div",{style:{whiteSpace:"pre-wrap"}},o===m.Markdown?e.createElement(x,{value:r}):r)},T=t=>{const{question:o,dataFormatType:n,setDataFormatType:r,isImg:a}=t,l=300,{t:c}=p();return e.createElement(f,{defaultSize:{width:"100%",height:l},minHeight:l,enable:{bottom:!0},style:{padding:"26px 32px",borderBottom:"1px solid #EBEBEB",overflow:"hidden"}},e.createElement("div",{className:`${s}__title`,style:{display:"flex",justifyContent:"space-between"}},c("Title"),!a&&e.createElement("span",{style:{display:"flex"}},e.createElement(i.Group,{value:n,onChange:d=>{r(d.target.value)}},e.createElement(i.Button,{value:m.Default,style:{textAlign:"center",width:"52px"}},"</>"),e.createElement(i.Button,{value:m.Markdown,style:{textAlign:"center",width:"52px"}},e.createElement(E,null))),e.createElement("span",{style:{marginLeft:"8px",width:"4px",background:"#1890ff"}}))),e.createElement("div",{className:`${s}__headerContent`},e.createElement(L,{question:o,dataFormatType:n,isImg:a})))};export{T as default};
1
+ import e from"react";import{useTranslation as p}from"react-i18next";import{Resizable as f}from"re-resizable";import{Radio as i,Image as u}from"antd";import{EDataFormatType as m,prefix as g}from"../../../../../constant/index.js";import{FileTextOutlined as E}from"@ant-design/icons";import x from"../../../../markdownView/index.js";import{isString as w,isObject as y}from"lodash";import{i18n as b}from"@labelbee/lb-utils";import h from"../../../../../assets/annotation/LLMTool/imgFail_cn.svg.js";import v from"../../../../../assets/annotation/LLMTool/imgFail_en.svg.js";const s=`${g}-LLMView`,L=({question:t,dataFormatType:o,isImg:n})=>{const r=w(t)?t:"",a=b.language==="en"?v:h;if(n){const l=y(t)?t==null?void 0:t.url:"";return e.createElement(u,{src:l||a,fallback:a})}return e.createElement("div",{style:{whiteSpace:"pre-wrap"}},o===m.Markdown?e.createElement(x,{value:r}):r)},T=t=>{const{question:o,dataFormatType:n,setDataFormatType:r,isImg:a}=t,l=300,{t:c}=p();return e.createElement(f,{defaultSize:{width:"100%",height:l},minHeight:l,enable:{bottom:!0},style:{padding:"26px 32px",borderBottom:"1px solid #EBEBEB",overflow:"hidden"}},e.createElement("div",{className:`${s}__title`,style:{display:"flex",justifyContent:"space-between"}},c("Title"),!a&&e.createElement("span",{style:{display:"flex"}},e.createElement(i.Group,{value:n,onChange:d=>{r(d.target.value)}},e.createElement(i.Button,{value:m.Default,style:{textAlign:"center",width:"52px"}},"</>"),e.createElement(i.Button,{value:m.Markdown,style:{textAlign:"center",width:"52px"}},e.createElement(E,null))),e.createElement("span",{style:{marginLeft:"8px",width:"4px",background:"#1890ff"}}))),e.createElement("div",{className:`${s}__headerContent`},e.createElement(L,{question:o,dataFormatType:n,isImg:a})))};export{T as default};
@@ -1 +1 @@
1
- import t from"react";import{Tag as i,Image as c}from"antd";import{prefix as g}from"../../../../../constant/index.js";import d from"classnames";import f from"../../../../../assets/annotation/LLMTool/imgFail_cn.svg.js";import p from"../../../../../assets/annotation/LLMTool/imgFail_en.svg.js";import{i18n as u}from"@labelbee/lb-utils";import a from"./index.module.scss.js";const s=`${g}-LLMView`,v=m=>{const{answerList:o,hoverKey:r}=m,l=u.language==="en"?p:f;return t.createElement("div",{className:a.imgView},o.map((e,n)=>t.createElement("div",{key:n,className:a.item},t.createElement(i,{className:`${s}-tag`},e==null?void 0:e.order),t.createElement("div",{className:d({[`${a.image}`]:!0,[`${s}__contentActive`]:r===(e==null?void 0:e.order)})},t.createElement(c,{src:e==null?void 0:e.url,fallback:l})))))};export{v as default};
1
+ import t from"react";import{Tag as i,Image as c}from"antd";import{prefix as g}from"../../../../../constant/index.js";import d from"classnames";import f from"../../../../../assets/annotation/LLMTool/imgFail_cn.svg.js";import u from"../../../../../assets/annotation/LLMTool/imgFail_en.svg.js";import{i18n as p}from"@labelbee/lb-utils";import a from"./index.module.scss.js";const s=`${g}-LLMView`,v=m=>{const{answerList:o,hoverKey:r}=m,l=p.language==="en"?u:f;return t.createElement("div",{className:a.imgView},o.map((e,n)=>t.createElement("div",{key:n,className:a.item},t.createElement(i,{className:`${s}-tag`},e==null?void 0:e.order),t.createElement("div",{className:d({[`${a.image}`]:!0,[`${s}__contentActive`]:r===(e==null?void 0:e.order)})},t.createElement(c,{src:e==null?void 0:e.url,fallback:l})))))};export{v as default};
@@ -1 +1 @@
1
- import r,{useState as j,useEffect as C}from"react";import{Tag as O}from"antd";import{EDataFormatType as v,ELLMDataType as w,prefix as S}from"../../../constant/index.js";import b from"classnames";import{I18nextProvider as N,useTranslation as $}from"react-i18next";import{i18n as E}from"@labelbee/lb-utils";import D from"../../markdownView/index.js";import k from"../modelAPIView/index.js";import R from"../../diffMatchPatchComponent/index.js";import F from"./components/header/index.js";import q from"./components/imgView/index.js";import{isString as B}from"lodash";var H=Object.defineProperty,_=Object.getOwnPropertySymbols,Q=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,g=(e,t,n)=>t in e?H(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,K=(e,t)=>{for(var n in t||(t={}))Q.call(t,n)&&g(e,n,t[n]);if(_)for(var n of _(t))W.call(t,n)&&g(e,n,t[n]);return e};const l=`${S}-LLMView`,z=({i:e,dataFormatType:t,isTextControl:n})=>{var i;return t===v.Markdown?r.createElement(D,{value:(i=e==null?void 0:e.newAnswer)!=null?i:e==null?void 0:e.answer}):n?r.createElement("div",{style:{width:"100%",overflowWrap:"break-word"}},r.createElement(R,{originString:e==null?void 0:e.answer,currentString:e==null?void 0:e.newAnswer})):r.createElement("div",{style:{whiteSpace:"pre-wrap"}},(e==null?void 0:e.newAnswer)||(e==null?void 0:e.answer))},G=e=>{var t,n;const{hoverKey:i,answerList:d,question:m,lang:u,modelAPIResponse:x,setModelAPIResponse:y,checkMode:P=!0,LLMConfig:a,answerHeaderSlot:h}=e,[c,I]=j(v.Default),A=((t=a==null?void 0:a.dataType)==null?void 0:t.prompt)===w.Picture,M=((n=a==null?void 0:a.dataType)==null?void 0:n.response)===w.Picture,{t:T}=$();C(()=>{var o;u&&((o=E)==null||o.changeLanguage(u))},[]);const V=o=>{var s;return(a==null?void 0:a.isTextEdit)?!!((s=((a==null?void 0:a.textEdit)||[]).filter(f=>(f==null?void 0:f.title)===o.order)[0])==null?void 0:s.textControl):!1},L=r.createElement("div",null,d.map((o,s)=>{const p=V(o);return r.createElement("div",{className:b({[`${l}__content`]:!0,[`${l}__contentActive`]:i===(o==null?void 0:o.order)}),key:s},r.createElement(O,{className:`${l}-tag`},o==null?void 0:o.order),r.createElement(z,{i:o,isTextControl:p,dataFormatType:c}))}),B(m)&&r.createElement(k,{dataFormatType:c,modelAPIResponse:x,question:m,setModelAPIResponse:y,checkMode:P,annotation:e.annotation}));return r.createElement("div",{className:l},r.createElement(F,{question:m,dataFormatType:c,setDataFormatType:I,isImg:A}),r.createElement("div",{className:`${l}__textBox`},r.createElement("div",{className:`${l}__title`},T("Answer")," ",h),M?r.createElement(q,{hoverKey:i,answerList:d}):L))},J=e=>r.createElement(N,{i18n:E},r.createElement(G,K({},e)));export{l as LLMViewCls,J as default};
1
+ import r,{useState as j,useEffect as C}from"react";import{Tag as O}from"antd";import{EDataFormatType as v,ELLMDataType as w,prefix as S}from"../../../constant/index.js";import b from"classnames";import{I18nextProvider as N,useTranslation as $}from"react-i18next";import{i18n as _}from"@labelbee/lb-utils";import D from"../../markdownView/index.js";import k from"../modelAPIView/index.js";import R from"../../diffMatchPatchComponent/index.js";import F from"./components/header/index.js";import q from"./components/imgView/index.js";import{isString as B}from"lodash";var H=Object.defineProperty,E=Object.getOwnPropertySymbols,Q=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,g=(e,t,n)=>t in e?H(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,K=(e,t)=>{for(var n in t||(t={}))Q.call(t,n)&&g(e,n,t[n]);if(E)for(var n of E(t))W.call(t,n)&&g(e,n,t[n]);return e};const l=`${S}-LLMView`,z=({i:e,dataFormatType:t,isTextControl:n})=>{var i;return t===v.Markdown?r.createElement(D,{value:(i=e==null?void 0:e.newAnswer)!=null?i:e==null?void 0:e.answer}):n?r.createElement("div",{style:{width:"100%",overflowWrap:"break-word"}},r.createElement(R,{originString:e==null?void 0:e.answer,currentString:e==null?void 0:e.newAnswer})):r.createElement("div",{style:{whiteSpace:"pre-wrap"}},(e==null?void 0:e.newAnswer)||(e==null?void 0:e.answer))},G=e=>{var t,n;const{hoverKey:i,answerList:d,question:m,lang:u,modelAPIResponse:x,setModelAPIResponse:y,checkMode:P=!0,LLMConfig:a,answerHeaderSlot:h}=e,[c,I]=j(v.Default),A=((t=a==null?void 0:a.dataType)==null?void 0:t.prompt)===w.Picture,M=((n=a==null?void 0:a.dataType)==null?void 0:n.response)===w.Picture,{t:T}=$();C(()=>{var o;u&&((o=_)==null||o.changeLanguage(u))},[]);const V=o=>{var s;return(a==null?void 0:a.isTextEdit)?!!((s=((a==null?void 0:a.textEdit)||[]).filter(f=>(f==null?void 0:f.title)===o.order)[0])==null?void 0:s.textControl):!1},L=r.createElement("div",null,d.map((o,s)=>{const p=V(o);return r.createElement("div",{className:b({[`${l}__content`]:!0,[`${l}__contentActive`]:i===(o==null?void 0:o.order)}),key:s},r.createElement(O,{className:`${l}-tag`},o==null?void 0:o.order),r.createElement(z,{i:o,isTextControl:p,dataFormatType:c}))}),B(m)&&r.createElement(k,{dataFormatType:c,modelAPIResponse:x,question:m,setModelAPIResponse:y,checkMode:P,annotation:e.annotation}));return r.createElement("div",{className:l},r.createElement(F,{question:m,dataFormatType:c,setDataFormatType:I,isImg:A}),r.createElement("div",{className:`${l}__textBox`},r.createElement("div",{className:`${l}__title`},T("Answer")," ",h),M?r.createElement(q,{hoverKey:i,answerList:d}):L))},J=e=>r.createElement(N,{i18n:_},r.createElement(G,K({},e)));export{l as LLMViewCls,J as default};
@@ -1 +1 @@
1
- import r,{useContext as N}from"react";import{prefix as _}from"../../../../../constant/index.js";import{Collapse as L,Tag as G,Popover as O}from"antd";import{useTranslation as P}from"react-i18next";import H from"../scoreGroupButton/index.js";import K from"../determineGroup/index.js";import{LLMContext as R}from"../../../../../store/ctx.js";import{classnames as q}from"../../../../../utils/index.js";import{InfoCircleOutlined as z}from"@ant-design/icons";import{expandIconFuc as J}from"../../../../../views/MainView/sidebar/TagSidebar/index.js";import{isBoolean as Q}from"lodash";import W from"../../../../longText/index.js";import X from"../textEditor/index.js";var j;(function(a){a[a.Finish=0]="Finish",a[a.UnFinish=1]="UnFinish",a[a.Default=2]="Default"})(j||(j={}));const{Panel:Y}=L,x=`${_}-LLMSidebar`,Z=a=>{const{list:E=[],LLMConfig:F,updateValue:w,checkMode:y}=a,{hoverKey:$,setHoverKey:C}=N(R),{t:k}=P(),D=y,M=e=>{const{indicatorScore:t=[],indicatorDetermine:n=[],textEdit:s=[],isTextEdit:S=!1}=F||{};let o=2;if((t==null?void 0:t.length)>0){if(t.some(l=>{var i,d;return!((i=e==null?void 0:e.indicatorScore)==null?void 0:i[l.value])||((d=e==null?void 0:e.indicatorScore)==null?void 0:d[l.value])>Number(l==null?void 0:l.score)}))return o=1,o;o=0}if((n==null?void 0:n.length)>0){if(n.some(l=>{var i;const d=(i=e==null?void 0:e.indicatorDetermine)==null?void 0:i[l.value];return!Q(d)}))return o=1,o;o=0}if(S&&(s==null?void 0:s.length)>0){const c=s.filter(f=>(f==null?void 0:f.title)===e.order)[0],{min:l}=c||{},i=(e==null?void 0:e.newAnswer)||"";if(l&&(i==null?void 0:i.length)<Number(l))return o=1,o;o=0}return o},U=e=>{const t=M(e);let n=(e==null?void 0:e.order)||"";switch(t){case 0:return{backgroundColor:"#D9FFDF",fontColor:"#36B34A",tagText:`${n} ${k("Finished")}`,tagStatus:t};case 1:return{backgroundColor:"#FFD9D9",fontColor:"#F26549",tagText:`${n} ${k("Unfinished")}`,tagStatus:t};default:return{backgroundColor:"#EBEBEB",fontColor:"#999999",tagText:n,tagStatus:t}}},A=(e,t)=>t.filter(n=>(n==null?void 0:n.title)===e.order)[0];return r.createElement(L,{bordered:!1,expandIcon:J,expandIconPosition:"end",defaultActiveKey:E.length>0?E.map((e,t)=>t):void 0,style:{margin:"16px 0px",background:"#fff"}},E.map((e,t)=>{const{indicatorScore:n=[],indicatorDetermine:s=[],textEdit:S=[],isTextEdit:o=!1}=F||{},{backgroundColor:c,fontColor:l,tagText:i,tagStatus:d}=U(e),f=A(e,S)||{},B=r.createElement("div",{style:{display:"flex",width:"500px",alignItems:"center",whiteSpace:"nowrap"},onMouseMove:()=>{C(e.order)},onMouseLeave:()=>{C(-1)}},r.createElement(G,{color:c,style:{color:l,padding:"0px 8px"}},i),e.answer&&r.createElement("span",{style:{textOverflow:"ellipsis",overflow:"hidden",lineHeight:"32px",paddingRight:"24px"}},e.answer));return r.createElement(Y,{header:B,key:t,className:q({[`${x}-panel`]:!0,[`${x}-panelHover`]:$===e.order,[`${x}-errorPanel`]:d===1})},(n==null?void 0:n.length)>0&&n.map((u,b)=>{var m;const{label:v,text:p,value:g,score:h}=u,T=r.createElement("div",{className:`${x}-indicatorScore`},r.createElement(W,{text:v,openByText:!0}),p&&r.createElement(O,{placement:"bottom",content:p,overlayClassName:`${x}-indicatorScore-title`},r.createElement(z,{style:{margin:"0px 4px",cursor:"pointer"}})));return v&&h?r.createElement(H,{score:h,title:T,selectScore:(m=e==null?void 0:e.indicatorScore)==null?void 0:m[g],updateScore:I=>{const V={key:g,value:I};w({order:e.order,value:V,key:"indicatorScore"})},key:b,isDisableAll:D}):null}),(s==null?void 0:s.length)>0&&s.map((u,b)=>{var m;const{label:v,value:p}=u;return v?r.createElement(K,{selectValue:(m=e==null?void 0:e.indicatorDetermine)==null?void 0:m[p],title:v,updateValue:g=>{const h={key:p,value:g};w({order:e.order,value:h,key:"indicatorDetermine"})},key:b,isDisableAll:D}):null}),o&&r.createElement(X,{checkMode:y,newAnswer:e==null?void 0:e.newAnswer,textEditObject:f,updateValue:u=>{w({order:e.order,value:u,key:"textEdit"})},answerIndex:t}))}))};export{Z as default};
1
+ import o,{useContext as N}from"react";import{prefix as P}from"../../../../../constant/index.js";import{Collapse as k,Tag as G,Popover as O}from"antd";import{useTranslation as H}from"react-i18next";import K from"../scoreGroupButton/index.js";import R from"../determineGroup/index.js";import{LLMContext as q}from"../../../../../store/ctx.js";import{classnames as z}from"../../../../../utils/index.js";import{InfoCircleOutlined as J}from"@ant-design/icons";import{expandIconFuc as Q}from"../../../../../views/MainView/sidebar/TagSidebar/index.js";import{isBoolean as W}from"lodash";import X from"../../../../longText/index.js";import Y from"../textEditor/index.js";import Z from"../../../../tagList/components/portion/index.js";var D;(function(a){a[a.Finish=0]="Finish",a[a.UnFinish=1]="UnFinish",a[a.Default=2]="Default"})(D||(D={}));const{Panel:ee}=k,f=`${P}-LLMSidebar`,te=a=>{const{list:w=[],LLMConfig:y,updateValue:x,disabeledAll:g}=a,{hoverKey:j,setHoverKey:C}=N(q),{t:L}=H(),T=e=>{const{indicatorScore:t=[],indicatorDetermine:n=[],textEdit:s=[],isTextEdit:S=!1}=y||{};let r=2;if((t==null?void 0:t.length)>0){if(t.some(l=>{var i,c;return!((i=e==null?void 0:e.indicatorScore)==null?void 0:i[l.value])||((c=e==null?void 0:e.indicatorScore)==null?void 0:c[l.value])>Number(l==null?void 0:l.score)}))return r=1,r;r=0}if((n==null?void 0:n.length)>0){if(n.some(l=>{var i;const c=(i=e==null?void 0:e.indicatorDetermine)==null?void 0:i[l.value];return!W(c)}))return r=1,r;r=0}if(S&&(s==null?void 0:s.length)>0){const d=s.filter(h=>(h==null?void 0:h.title)===e.order)[0],{min:l}=d||{},i=(e==null?void 0:e.newAnswer)||"";if(l&&(i==null?void 0:i.length)<Number(l))return r=1,r;r=0}return r},$=e=>{const t=T(e);let n=(e==null?void 0:e.order)||"";switch(t){case 0:return{backgroundColor:"#D9FFDF",fontColor:"#36B34A",tagText:`${n} ${L("Finished")}`,tagStatus:t};case 1:return{backgroundColor:"#FFD9D9",fontColor:"#F26549",tagText:`${n} ${L("Unfinished")}`,tagStatus:t};default:return{backgroundColor:"#EBEBEB",fontColor:"#999999",tagText:n,tagStatus:t}}},B=(e,t)=>t.filter(n=>(n==null?void 0:n.title)===e.order)[0];return o.createElement(k,{bordered:!1,expandIcon:Q,expandIconPosition:"end",defaultActiveKey:w.length>0?w.map((e,t)=>t):void 0,style:{marginBottom:"16px",background:"#fff"}},w.map((e,t)=>{const{indicatorScore:n=[],indicatorDetermine:s=[],textEdit:S=[],isTextEdit:r=!1,inputList:d=[],tagInputListConfigurable:l}=y||{},{backgroundColor:i,fontColor:c,tagText:h,tagStatus:U}=$(e),A=B(e,S)||{},M=o.createElement("div",{style:{display:"flex",width:"500px",alignItems:"center",whiteSpace:"nowrap"},onMouseMove:()=>{C(e.order)},onMouseLeave:()=>{C(-1)}},o.createElement(G,{color:i,style:{color:c,padding:"0px 8px"}},h),e.answer&&o.createElement("span",{style:{textOverflow:"ellipsis",overflow:"hidden",lineHeight:"32px",paddingRight:"24px"}},e.answer));return o.createElement(ee,{header:M,key:t,className:z({[`${f}-panel`]:!0,[`${f}-panelHover`]:j===e.order,[`${f}-errorPanel`]:U===1})},l&&(d==null?void 0:d.length)>0&&o.createElement(Z,{inputList:d,selectedTags:(e==null?void 0:e.tagList)||{},updateValue:u=>{x({order:e.order,value:u,key:"tagList"})},disabeledAll:g}),(n==null?void 0:n.length)>0&&n.map((u,F)=>{var m;const{label:v,text:p,value:E,score:b}=u,I=o.createElement("div",{className:`${f}-indicatorScore`},o.createElement(X,{text:v,openByText:!0}),p&&o.createElement(O,{placement:"bottom",content:p,overlayClassName:`${f}-indicatorScore-title`},o.createElement(J,{style:{margin:"0px 4px",cursor:"pointer"}})));return v&&b?o.createElement(K,{score:b,title:I,selectScore:(m=e==null?void 0:e.indicatorScore)==null?void 0:m[E],updateScore:V=>{const _={key:E,value:V};x({order:e.order,value:_,key:"indicatorScore"})},key:F,disabeledAll:g}):null}),(s==null?void 0:s.length)>0&&s.map((u,F)=>{var m;const{label:v,value:p}=u;return v?o.createElement(R,{selectValue:(m=e==null?void 0:e.indicatorDetermine)==null?void 0:m[p],title:v,updateValue:E=>{const b={key:p,value:E};x({order:e.order,value:b,key:"indicatorDetermine"})},key:F,disabeledAll:g}):null}),r&&o.createElement(Y,{disabeledAll:g,newAnswer:e==null?void 0:e.newAnswer,textEditObject:A,updateValue:u=>{x({order:e.order,value:u,key:"textEdit"})},answerIndex:t}))}))};export{te as default};
@@ -1 +1 @@
1
- import s,{useReducer as ee,useContext as te,useState as A,useEffect as K}from"react";import{prefix as ne}from"../../../../../constant/index.js";import{Tag as oe}from"antd";import{useTranslation as U}from"react-i18next";import{LeftOutlined as ie}from"@ant-design/icons";import{classnames as re}from"../../../../../utils/index.js";import{isArray as se,cloneDeep as ae}from"lodash";import{MathUtils as y}from"@labelbee/lb-annotation";import{LLMContext as le}from"../../../../../store/ctx.js";var ce=Object.defineProperty,de=Object.defineProperties,pe=Object.getOwnPropertyDescriptors,X=Object.getOwnPropertySymbols,ue=Object.prototype.hasOwnProperty,me=Object.prototype.propertyIsEnumerable,Y=(i,p,a)=>p in i?ce(i,p,{enumerable:!0,configurable:!0,writable:!0,value:a}):i[p]=a,H=(i,p)=>{for(var a in p||(p={}))ue.call(p,a)&&Y(i,a,p[a]);if(X)for(var a of X(p))me.call(p,a)&&Y(i,a,p[a]);return i},fe=(i,p)=>de(i,pe(p)),g;(function(i){i.Top="Top",i.Right="Right",i.Bottom="Bottom",i.Left="Left"})(g||(g={}));const b=`${ne}-LLMSidebar-contentBox`,ge=()=>{const{t:i}=U();return s.createElement("div",{className:`${b}__navigation`},s.createElement("span",null,i("Best")),s.createElement("div",{style:{display:"flex",alignItems:"center"}},s.createElement(ie,null),s.createElement("div",{style:{height:0,border:"1px solid #999999",width:"450px"}})),s.createElement("span",null,i("Worst")))},ve=i=>{const[,p]=ee(e=>e+1,0),{sortList:a,setSortList:M,waitSortList:k,checkMode:J}=i,{setHoverKey:j}=te(le),Q=J,[N,_]=A(void 0),[B,F]=A(void 0),[h,W]=A([]),{t:I}=U();K(()=>{W(k)},[k]),K(()=>{G()},[JSON.stringify(a)]);const O=({item:e,operation:t,id:n})=>{const o={[`border${N}`]:"2px solid #8C9AFF"};return s.createElement("div",H({key:`${e==null?void 0:e.id}`,color:"#EBEBEB",id:n,className:re({[`${b}__answerTag`]:!0}),style:B===(e==null?void 0:e.id)&&N?o:void 0,draggable:Q||!(e==null?void 0:e.id)?"":"true",onMouseMove:()=>{j(e.id)},onMouseLeave:()=>{j(-1)}},t),e==null?void 0:e.title)},w=(e,t)=>({x:(e.x+t.x)/2,y:(e.y+t.y)/2}),q=(e,t)=>{const n=y.getLineLength(e,w(t.tl,t.tr)),o=y.getLineLength(e,w(t.tr,t.tr)),c=y.getLineLength(e,w(t.bl,t.br)),d=y.getLineLength(e,w(t.tl,t.bl));return{minDistance:Math.min(n,o,c,d),toTopDistance:n,toRightDistance:o,toBottompDistance:c,toLeftDistance:d}},z=(e,t)=>{const{minDistance:n,toTopDistance:o,toRightDistance:c,toBottompDistance:d,toLeftDistance:u}=q(e,t);switch(n){case o:_(g.Top);break;case c:_(g.Right);break;case d:_(g.Bottom);break;case u:_(g.Left);break}},G=()=>{const e=document.getElementById("sortBox");if(e==null?void 0:e.childNodes){let t=[];e.childNodes.forEach((n,o)=>{var c;let d=n;((c=n==null?void 0:n.childNodes)==null?void 0:c.length)>1&&(d=n.childNodes[0]);const u=d.getBoundingClientRect()||{},{bottom:r,top:m,left:l,right:f,width:v,height:x,x:$,y:C}=u,R={x:l+v/2,y:m+x/2},T={tl:{x:$,y:C},tr:{x:f,y:m},br:{x:f,y:r},bl:{x:l,y:r}},V=a[o].reduce((Z,E)=>{let D=E;return se(E)&&E.length>1&&(D=E[0]),D=fe(H({},D),{tagCenterPoint:R,tagVertexPoint:T}),[...Z,D]},[]);t.push(V)}),M(t)}},P=e=>{var t,n,o,c,d,u;const r=e.pageX,m=e.pageY,l={x:r,y:m};let f=a;if((f==null?void 0:f.length)>0){let v=f[0];for(let x=0;x<f.length;x++)if(x>0){const $=(t=f[x][0])==null?void 0:t.tagCenterPoint,C=(n=v[0])==null?void 0:n.tagCenterPoint,R=y.getLineLength(l,$),T=y.getLineLength(l,C);R<T&&(v=a[x])}if(!l.x||!l.y)return;if(L(e.target.id)===((o=v[0])==null?void 0:o.id)){F(void 0);return}F((c=v[0])==null?void 0:c.id),((d=v[0])==null?void 0:d.tagVertexPoint)&&l&&z(l,(u=v[0])==null?void 0:u.tagVertexPoint)}},S=e=>{var t;const{target:n}=e;let o=-1,c=-1,d=-1,u=[],r=ae(a);if(d=r.findIndex(m=>m[0].id===Number(B)),((t=n==null?void 0:n.parentNode)==null?void 0:t.parentNode.id)==="sortBox"){o=L(n.parentNode.id);const m=L(n.id);u=r[~~o].filter(f=>f.id===~~m);const l=r[~~o].findIndex(f=>f.id===~~m);r[~~o].splice(l,1)}if((n==null?void 0:n.parentNode.id)==="sortBox"){if(!B)return;o=L(n.id),c=r.findIndex(l=>l[0].id===o);const m=r.find(l=>l[0].id===o);m&&(u=m),r.splice(c,1),d=r.findIndex(l=>l[0].id===~~B)}switch(n.parentNode.id==="waitBox"&&(o=L(n.id),c=h.findIndex(m=>m.id===o),u=[h[c]],h.splice(c,1)),N){case g.Left:r.splice(d,0,u);break;case g.Right:r.splice(d+1,0,u);break;case g.Top:case g.Bottom:r[d].push(...u);break;default:r.push(u);break}M(r),_(void 0),p()},L=e=>{const t=e.indexOf("-");return Number(e.substring(t+1,e.length))};return s.createElement("div",{style:{padding:"0px 16px",marginBottom:"16px"}},s.createElement("div",{className:`${b}__title`},s.createElement("span",null,I("RankingQualityOfAnswers")),h.length>0&&s.createElement(oe,{color:"#FFD9D9",style:{color:"#F26549",marginLeft:8}},I("Unfinished"))),s.createElement("div",null,s.createElement("div",{style:{display:"flex",alignItems:"center"}},s.createElement("span",{style:{marginRight:"16px"}},I("ToBeSorted")),s.createElement("div",{id:"waitBox",className:`${b}__answerBox`},h.length>0&&h.map(e=>O({item:e,id:`waitBoxItem-${e==null?void 0:e.id}`,operation:{onDrag:P,onDragEnd:S}})))),s.createElement(ge,null),s.createElement("div",{id:"sortBox",className:`${b}__answerBox`},a.map((e,t)=>{var n;return e.length>1?s.createElement("div",{key:`item-${t}`,id:`sortBox-${t}`},e.map(o=>O({item:o,id:`sortBoxItem-${o==null?void 0:o.id}`,operation:{onDrag:P,onDragEnd:S}}))):O({item:e[0],id:`sortBox-${(n=e[0])==null?void 0:n.id}`,operation:{onDrag:P,onDragEnd:S}})}))))};export{ve as default};
1
+ import s,{useReducer as Z,useContext as ee,useState as A,useEffect as K}from"react";import{prefix as te}from"../../../../../constant/index.js";import{Tag as ne}from"antd";import{useTranslation as U}from"react-i18next";import{LeftOutlined as oe}from"@ant-design/icons";import{classnames as ie}from"../../../../../utils/index.js";import{isArray as re,cloneDeep as se}from"lodash";import{MathUtils as _}from"@labelbee/lb-annotation";import{LLMContext as ae}from"../../../../../store/ctx.js";var le=Object.defineProperty,ce=Object.defineProperties,de=Object.getOwnPropertyDescriptors,X=Object.getOwnPropertySymbols,pe=Object.prototype.hasOwnProperty,ue=Object.prototype.propertyIsEnumerable,Y=(i,p,a)=>p in i?le(i,p,{enumerable:!0,configurable:!0,writable:!0,value:a}):i[p]=a,H=(i,p)=>{for(var a in p||(p={}))pe.call(p,a)&&Y(i,a,p[a]);if(X)for(var a of X(p))ue.call(p,a)&&Y(i,a,p[a]);return i},fe=(i,p)=>ce(i,de(p)),g;(function(i){i.Top="Top",i.Right="Right",i.Bottom="Bottom",i.Left="Left"})(g||(g={}));const b=`${te}-LLMSidebar-contentBox`,me=()=>{const{t:i}=U();return s.createElement("div",{className:`${b}__navigation`},s.createElement("span",null,i("Best")),s.createElement("div",{style:{display:"flex",alignItems:"center"}},s.createElement(oe,null),s.createElement("div",{style:{height:0,border:"1px solid #999999",width:"450px"}})),s.createElement("span",null,i("Worst")))},ge=i=>{const[,p]=Z(e=>e+1,0),{sortList:a,setSortList:M,waitSortList:j,disabeledAll:J}=i,{setHoverKey:k}=ee(ae),[N,y]=A(void 0),[B,F]=A(void 0),[h,Q]=A([]),{t:I}=U();K(()=>{Q(j)},[j]),K(()=>{z()},[JSON.stringify(a)]);const O=({item:e,operation:t,id:n})=>{const o={[`border${N}`]:"2px solid #8C9AFF"};return s.createElement("div",H({key:`${e==null?void 0:e.id}`,color:"#EBEBEB",id:n,className:ie({[`${b}__answerTag`]:!0}),style:B===(e==null?void 0:e.id)&&N?o:void 0,draggable:J||!(e==null?void 0:e.id)?"":"true",onMouseMove:()=>{k(e.id)},onMouseLeave:()=>{k(-1)}},t),e==null?void 0:e.title)},w=(e,t)=>({x:(e.x+t.x)/2,y:(e.y+t.y)/2}),W=(e,t)=>{const n=_.getLineLength(e,w(t.tl,t.tr)),o=_.getLineLength(e,w(t.tr,t.tr)),c=_.getLineLength(e,w(t.bl,t.br)),d=_.getLineLength(e,w(t.tl,t.bl));return{minDistance:Math.min(n,o,c,d),toTopDistance:n,toRightDistance:o,toBottompDistance:c,toLeftDistance:d}},q=(e,t)=>{const{minDistance:n,toTopDistance:o,toRightDistance:c,toBottompDistance:d,toLeftDistance:u}=W(e,t);switch(n){case o:y(g.Top);break;case c:y(g.Right);break;case d:y(g.Bottom);break;case u:y(g.Left);break}},z=()=>{const e=document.getElementById("sortBox");if(e==null?void 0:e.childNodes){let t=[];e.childNodes.forEach((n,o)=>{var c;let d=n;((c=n==null?void 0:n.childNodes)==null?void 0:c.length)>1&&(d=n.childNodes[0]);const u=d.getBoundingClientRect()||{},{bottom:r,top:f,left:l,right:m,width:v,height:x,x:$,y:C}=u,R={x:l+v/2,y:f+x/2},T={tl:{x:$,y:C},tr:{x:m,y:f},br:{x:m,y:r},bl:{x:l,y:r}},G=a[o].reduce((V,E)=>{let D=E;return re(E)&&E.length>1&&(D=E[0]),D=fe(H({},D),{tagCenterPoint:R,tagVertexPoint:T}),[...V,D]},[]);t.push(G)}),M(t)}},P=e=>{var t,n,o,c,d,u;const r=e.pageX,f=e.pageY,l={x:r,y:f};let m=a;if((m==null?void 0:m.length)>0){let v=m[0];for(let x=0;x<m.length;x++)if(x>0){const $=(t=m[x][0])==null?void 0:t.tagCenterPoint,C=(n=v[0])==null?void 0:n.tagCenterPoint,R=_.getLineLength(l,$),T=_.getLineLength(l,C);R<T&&(v=a[x])}if(!l.x||!l.y)return;if(L(e.target.id)===((o=v[0])==null?void 0:o.id)){F(void 0);return}F((c=v[0])==null?void 0:c.id),((d=v[0])==null?void 0:d.tagVertexPoint)&&l&&q(l,(u=v[0])==null?void 0:u.tagVertexPoint)}},S=e=>{var t;const{target:n}=e;let o=-1,c=-1,d=-1,u=[],r=se(a);if(d=r.findIndex(f=>f[0].id===Number(B)),((t=n==null?void 0:n.parentNode)==null?void 0:t.parentNode.id)==="sortBox"){o=L(n.parentNode.id);const f=L(n.id);u=r[~~o].filter(m=>m.id===~~f);const l=r[~~o].findIndex(m=>m.id===~~f);r[~~o].splice(l,1)}if((n==null?void 0:n.parentNode.id)==="sortBox"){if(!B)return;o=L(n.id),c=r.findIndex(l=>l[0].id===o);const f=r.find(l=>l[0].id===o);f&&(u=f),r.splice(c,1),d=r.findIndex(l=>l[0].id===~~B)}switch(n.parentNode.id==="waitBox"&&(o=L(n.id),c=h.findIndex(f=>f.id===o),u=[h[c]],h.splice(c,1)),N){case g.Left:r.splice(d,0,u);break;case g.Right:r.splice(d+1,0,u);break;case g.Top:case g.Bottom:r[d].push(...u);break;default:r.push(u);break}M(r),y(void 0),p()},L=e=>{const t=e.indexOf("-");return Number(e.substring(t+1,e.length))};return s.createElement("div",{style:{padding:"0px 16px",marginBottom:"16px"}},s.createElement("div",{className:`${b}__title`},s.createElement("span",null,I("RankingQualityOfAnswers")),h.length>0&&s.createElement(ne,{color:"#FFD9D9",style:{color:"#F26549",marginLeft:8}},I("Unfinished"))),s.createElement("div",null,s.createElement("div",{style:{display:"flex",alignItems:"center"}},s.createElement("span",{style:{marginRight:"16px"}},I("ToBeSorted")),s.createElement("div",{id:"waitBox",className:`${b}__answerBox`},h.length>0&&h.map(e=>O({item:e,id:`waitBoxItem-${e==null?void 0:e.id}`,operation:{onDrag:P,onDragEnd:S}})))),s.createElement(me,null),s.createElement("div",{id:"sortBox",className:`${b}__answerBox`},a.map((e,t)=>{var n;return e.length>1?s.createElement("div",{key:`item-${t}`,id:`sortBox-${t}`},e.map(o=>O({item:o,id:`sortBoxItem-${o==null?void 0:o.id}`,operation:{onDrag:P,onDragEnd:S}}))):O({item:e[0],id:`sortBox-${(n=e[0])==null?void 0:n.id}`,operation:{onDrag:P,onDragEnd:S}})}))))};export{ge as default};
@@ -1 +1 @@
1
- import e from"react";import{prefix as m}from"../../../../../constant/index.js";import{Radio as t}from"antd";import{useTranslation as c}from"react-i18next";import u from"../../../../longText/index.js";const p=r=>{const{title:n,selectValue:o,isDisableAll:l,updateValue:i}=r,{t:a}=c();return e.createElement("div",{className:`${m}-LLMSidebar-contentBox`},e.createElement("span",{style:{width:"160px"}},e.createElement(u,{text:n,openByText:!0})),e.createElement(t.Group,{value:o,onChange:s=>i(s.target.value),disabled:l},e.createElement(t,{value:!0,key:1},a("Yes")),e.createElement(t,{value:!1,key:2},a("No"))))};export{p as default};
1
+ import e from"react";import{prefix as s}from"../../../../../constant/index.js";import{Radio as t}from"antd";import{useTranslation as c}from"react-i18next";import u from"../../../../longText/index.js";const d=r=>{const{title:n,selectValue:o,disabeledAll:l,updateValue:i}=r,{t:a}=c();return e.createElement("div",{className:`${s}-LLMSidebar-contentBox`},e.createElement("span",{style:{width:"160px"}},e.createElement(u,{text:n,openByText:!0})),e.createElement(t.Group,{value:o,onChange:m=>i(m.target.value),disabled:l},e.createElement(t,{value:!0,key:1},a("Yes")),e.createElement(t,{value:!1,key:2},a("No"))))};export{d as default};
@@ -1 +1 @@
1
- import t from"react";import{prefix as p}from"../../../../../constant/index.js";import{Radio as a}from"antd";const d=o=>{const{title:n,score:l=5,selectScore:s,updateScore:c,isDisableAll:i}=o,m=Array.from({length:l},(e,r)=>r+1);return t.createElement("div",{className:`${p}-LLMSidebar-contentBox`},t.createElement("span",{style:{width:"100px"}},n),t.createElement(a.Group,{value:s,onChange:e=>c(Number(e.target.value)),disabled:i},m.map((e,r)=>t.createElement(a.Button,{value:e,key:r,style:{padding:"0px 16px"}},e))))};export{d as default};
1
+ import t from"react";import{prefix as p}from"../../../../../constant/index.js";import{Radio as r}from"antd";const i=o=>{const{title:n,score:l=5,selectScore:c,updateScore:s,disabeledAll:d}=o,m=Array.from({length:l},(e,a)=>a+1);return t.createElement("div",{className:`${p}-LLMSidebar-contentBox`},t.createElement("span",{style:{width:"100px"}},n),t.createElement(r.Group,{value:c,onChange:e=>s(Number(e.target.value)),disabled:d},m.map((e,a)=>t.createElement(r.Button,{value:e,key:a,style:{padding:"0px 16px"}},e))))};export{i as default};
@@ -1,2 +1,2 @@
1
- import e,{useEffect as S}from"react";import{Form as m,Popover as _,Input as j,message as L}from"antd";import{useTranslation as N}from"react-i18next";import{InfoCircleOutlined as k}from"@ant-design/icons";import M from"../../../../markdownView/index.js";import O from"../../../../latexEditor/index.js";import d from"./index.module.scss.js";const R=h=>{const{checkMode:x,newAnswer:p,textEditObject:w,updateValue:f,answerIndex:g}=h,{max:a,min:c,isLaText:v}=w,{TextArea:b}=j,[l]=m.useForm(),{t:o}=N(),y=o("LeastCharacterError",{num:c});S(()=>{l.setFieldsValue({value:p}),x||l.validateFields()},[p]);const V=n=>{var t,u;const I=`inputTextarea_${g}`,r=document.getElementById(I),s=r.value||"",E=(t=r==null?void 0:r.selectionStart)!=null?t:s.length,T=(u=r.selectionEnd)!=null?u:s.length,F=s.substring(0,E),C=s.substring(T,s.length),i=F+n+C;if(a&&(i==null?void 0:i.length)>a){L.error(o("MaximumCharacterError",{num:a}));return}r.value=i,l.setFieldsValue({value:i}),f(i),r.selectionStart=E+n.length,r.selectionEnd=E+n.length,r.focus()};return e.createElement(m,{form:l,onValuesChange:(n,t)=>{const u=t.value;f(u)},className:d.form},e.createElement(m.Item,{name:"title",style:{marginBottom:"8px"},label:e.createElement(e.Fragment,null,o("AnswerTextEdit"),e.createElement(_,{placement:"bottom",content:o("ShowEditingResultDifferencesInTextModeOnly")},e.createElement(k,{style:{margin:"0px 4px",cursor:"pointer"}}))),colon:!1,required:!!c}),v&&e.createElement(O,{onSelectLatex:V,disabled:x}),e.createElement(m.Item,{name:"value",style:{marginBottom:24},rules:[{validator:(n,t="")=>c&&(t==null?void 0:t.length)<Number(c)?Promise.reject(y):Promise.resolve()}]},e.createElement(b,{maxLength:a,autoSize:{minRows:4,maxRows:10},allowClear:!0,disabled:x,showCount:!!a,style:{width:"100%"},id:`inputTextarea_${g}`})),v&&e.createElement(m.Item,{shouldUpdate:!0,noStyle:!0},()=>{const n=l.getFieldValue("value")||"",t=n.replace(/\n/g,`
2
- `);return e.createElement("div",{className:d.outputDisplay},e.createElement("div",{className:d.title},o("OutputDisplay")),e.createElement("div",{className:d.content},n?e.createElement(M,{value:t}):""))}))};export{R as default};
1
+ import e,{useEffect as C}from"react";import{Form as m,Popover as S,Input as j,message as L}from"antd";import{useTranslation as N}from"react-i18next";import{InfoCircleOutlined as A}from"@ant-design/icons";import O from"../../../../markdownView/index.js";import R from"../../../../latexEditor/index.js";import d from"./index.module.scss.js";const k=h=>{const{disabeledAll:x,newAnswer:p,textEditObject:w,updateValue:f,answerIndex:g}=h,{max:a,min:u,isLaText:v}=w,{TextArea:b}=j,[l]=m.useForm(),{t:o}=N(),y=o("LeastCharacterError",{num:u});C(()=>{l.setFieldsValue({value:p}),x||l.validateFields()},[p]);const V=n=>{var t,c;const I=`inputTextarea_${g}`,r=document.getElementById(I),s=r.value||"",E=(t=r==null?void 0:r.selectionStart)!=null?t:s.length,T=(c=r.selectionEnd)!=null?c:s.length,_=s.substring(0,E),F=s.substring(T,s.length),i=_+n+F;if(a&&(i==null?void 0:i.length)>a){L.error(o("MaximumCharacterError",{num:a}));return}r.value=i,l.setFieldsValue({value:i}),f(i),r.selectionStart=E+n.length,r.selectionEnd=E+n.length,r.focus()};return e.createElement(m,{form:l,onValuesChange:(n,t)=>{const c=t.value;f(c)},className:d.form},e.createElement(m.Item,{name:"title",style:{marginBottom:"8px"},label:e.createElement(e.Fragment,null,o("AnswerTextEdit"),e.createElement(S,{placement:"bottom",content:o("ShowEditingResultDifferencesInTextModeOnly")},e.createElement(A,{style:{margin:"0px 4px",cursor:"pointer"}}))),colon:!1,required:!!u}),v&&e.createElement(R,{onSelectLatex:V,disabled:x}),e.createElement(m.Item,{name:"value",style:{marginBottom:24},rules:[{validator:(n,t="")=>u&&(t==null?void 0:t.length)<Number(u)?Promise.reject(y):Promise.resolve()}]},e.createElement(b,{maxLength:a,autoSize:{minRows:4,maxRows:10},allowClear:!0,disabled:x,showCount:!!a,style:{width:"100%"},id:`inputTextarea_${g}`})),v&&e.createElement(m.Item,{shouldUpdate:!0,noStyle:!0},()=>{const n=l.getFieldValue("value")||"",t=n.replace(/\n/g,`
2
+ `);return e.createElement("div",{className:d.outputDisplay},e.createElement("div",{className:d.title},o("OutputDisplay")),e.createElement("div",{className:d.content},n?e.createElement(O,{value:t}):""))}))};export{k as default};
@@ -1,2 +1,2 @@
1
- import r,{useEffect as j}from"react";import{Form as g,Input as F,message as L}from"antd";import N from"classnames";import{useTranslation as C}from"react-i18next";import{isArray as S}from"lodash";import D from"../../../../latexEditor/index.js";import _ from"./index.module.scss.js";import k from"../../../../markdownView/index.js";var A=Object.defineProperty,B=Object.defineProperties,M=Object.getOwnPropertyDescriptors,P=Object.getOwnPropertySymbols,R=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable,I=(a,e,t)=>e in a?A(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,q=(a,e)=>{for(var t in e||(e={}))R.call(e,t)&&I(a,t,e[t]);if(P)for(var t of P(e))$.call(e,t)&&I(a,t,e[t]);return a},z=(a,e)=>B(a,M(e));const U=a=>{const{checkMode:e,LLMConfig:t,textAttribute:h,setText:O}=a,y=(t==null?void 0:t.text)&&S(t.text)?t==null?void 0:t.text:[],{TextArea:T}=F,[v]=g.useForm(),{t:w}=C();j(()=>{const s=y.map((u,n)=>{var c;const m=(h==null?void 0:h.filter(l=>(l==null?void 0:l.textId)===(u==null?void 0:u.textId)))||[];return z(q({},u),{value:(c=m[0])==null?void 0:c.value})});v.setFieldsValue({text:s})},[y,h]);const V=({newText:s,fieldName:u,max:n})=>{var c,m;const l=`textInput_${u}`,o=document.getElementById(l),d=o.value||"",f=(c=o==null?void 0:o.selectionStart)!=null?c:d.length,p=(m=o.selectionEnd)!=null?m:d.length,E=d.substring(0,f),x=d.substring(p,d.length),i=E+s+x;if(n&&(i==null?void 0:i.length)>n){L.error(w("MaximumCharacterError",{num:n}));return}o.value=i,v.setFields([{name:["text",u,"value"],value:i,errors:[]}]),b(),o.selectionStart=f+s.length,o.selectionEnd=f+s.length,o.focus()},b=()=>{const s=v.getFieldValue("text");O(s)};return r.createElement(g,{form:v},r.createElement(g.List,{name:"text"},(s,u)=>r.createElement(r.Fragment,null,s.map((n,c)=>{const{max:m,min:l,title:o,tip:d,isLaText:f}=y[n.name]||{},p=o,E=w("LeastCharacterError",{num:l});return r.createElement("div",{style:{display:"flex",flexDirection:"column",marginBottom:"16px"},key:c},p&&r.createElement(g.Item,{name:[n.name,"title"],extra:d,className:_.textTitle,required:!!l,label:" ",colon:!1},o,p&&r.createElement("span",{className:N({clearText:!0,clearText__disabled:e}),style:{verticalAlign:"initial"},onClick:()=>{e||(v.setFields([{name:["text",n.name,"value"],value:void 0,errors:l?[E]:[]}]),b())}})),f&&p&&r.createElement(D,{onSelectLatex:x=>V({newText:x,fieldName:n.name,max:m}),disabled:e}),p&&r.createElement(g.Item,{name:[n.name,"value"],style:{marginBottom:24},rules:[{validator:(x,i)=>l&&(i==null?void 0:i.length)<Number(l)?Promise.reject(E):Promise.resolve()}],initialValue:void 0},r.createElement(T,{maxLength:m,disabled:e,showCount:!!m,autoSize:{minRows:4,maxRows:10},style:{width:"100%"},id:`textInput_${n.name}`,onChange:()=>b()})),f&&p&&r.createElement(g.Item,{shouldUpdate:!0,noStyle:!0},()=>{const x=v.getFieldValue(["text",n.name,"value"])||"",i=x.replace(/\n/g,`
2
- `);return r.createElement("div",{className:_.outputDisplay},r.createElement("div",{className:_.title},w("OutputDisplay")),r.createElement("div",{className:_.content},x?r.createElement(k,{value:i}):""))}))}))))};export{U as default};
1
+ import r,{useEffect as j}from"react";import{Form as g,Input as F,message as L}from"antd";import N from"classnames";import{useTranslation as C}from"react-i18next";import{isArray as S}from"lodash";import A from"../../../../latexEditor/index.js";import E from"./index.module.scss.js";import D from"../../../../markdownView/index.js";var B=Object.defineProperty,R=Object.defineProperties,k=Object.getOwnPropertyDescriptors,P=Object.getOwnPropertySymbols,M=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable,I=(a,e,t)=>e in a?B(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,q=(a,e)=>{for(var t in e||(e={}))M.call(e,t)&&I(a,t,e[t]);if(P)for(var t of P(e))$.call(e,t)&&I(a,t,e[t]);return a},z=(a,e)=>R(a,k(e));const U=a=>{const{disabeledAll:e,LLMConfig:t,textAttribute:y,setText:O}=a,h=(t==null?void 0:t.text)&&S(t.text)?t==null?void 0:t.text:[],{TextArea:T}=F,[v]=g.useForm(),{t:w}=C();j(()=>{const s=h.map((u,n)=>{var c;const m=(y==null?void 0:y.filter(o=>(o==null?void 0:o.textId)===(u==null?void 0:u.textId)))||[];return z(q({},u),{value:(c=m[0])==null?void 0:c.value})});v.setFieldsValue({text:s})},[h,y]);const V=({newText:s,fieldName:u,max:n})=>{var c,m;const o=`textInput_${u}`,l=document.getElementById(o),d=l.value||"",f=(c=l==null?void 0:l.selectionStart)!=null?c:d.length,p=(m=l.selectionEnd)!=null?m:d.length,_=d.substring(0,f),x=d.substring(p,d.length),i=_+s+x;if(n&&(i==null?void 0:i.length)>n){L.error(w("MaximumCharacterError",{num:n}));return}l.value=i,v.setFields([{name:["text",u,"value"],value:i,errors:[]}]),b(),l.selectionStart=f+s.length,l.selectionEnd=f+s.length,l.focus()},b=()=>{const s=v.getFieldValue("text");O(s)};return r.createElement(g,{form:v},r.createElement(g.List,{name:"text"},(s,u)=>r.createElement(r.Fragment,null,s.map((n,c)=>{const{max:m,min:o,title:l,tip:d,isLaText:f}=h[n.name]||{},p=l,_=w("LeastCharacterError",{num:o});return r.createElement("div",{style:{display:"flex",flexDirection:"column",marginBottom:"16px"},key:c},p&&r.createElement(g.Item,{name:[n.name,"title"],extra:d,className:E.textTitle,required:!!o,label:" ",colon:!1},l,p&&r.createElement("span",{className:N({clearText:!0,clearText__disabled:e}),style:{verticalAlign:"initial"},onClick:()=>{e||(v.setFields([{name:["text",n.name,"value"],value:void 0,errors:o?[_]:[]}]),b())}})),f&&p&&r.createElement(A,{onSelectLatex:x=>V({newText:x,fieldName:n.name,max:m}),disabled:e}),p&&r.createElement(g.Item,{name:[n.name,"value"],style:{marginBottom:24},rules:[{validator:(x,i)=>o&&(i==null?void 0:i.length)<Number(o)?Promise.reject(_):Promise.resolve()}],initialValue:void 0},r.createElement(T,{maxLength:m,disabled:e,showCount:!!m,autoSize:{minRows:4,maxRows:10},style:{width:"100%"},id:`textInput_${n.name}`,onChange:()=>b()})),f&&p&&r.createElement(g.Item,{shouldUpdate:!0,noStyle:!0},()=>{const x=v.getFieldValue(["text",n.name,"value"])||"",i=x.replace(/\n/g,`
2
+ `);return r.createElement("div",{className:E.outputDisplay},r.createElement("div",{className:E.title},w("OutputDisplay")),r.createElement("div",{className:E.content},x?r.createElement(D,{value:i}):""))}))}))))};export{U as default};
@@ -1 +1 @@
1
- import u,{useContext as B,useState as F,useEffect as y}from"react";import{prefix as tt}from"../../../constant/index.js";import{Empty as et,Button as nt}from"antd";import rt from"./components/answerSort/index.js";import{connect as ot}from"react-redux";import{isString as st,isNumber as it,isObject as lt}from"lodash";import at from"./components/answerList/index.js";import{LabelBeeContext as ct,LLMContext as K}from"../../../store/ctx.js";import{jsonParser as q}from"../../../utils/index.js";import{getStepConfig as dt}from"../../../store/annotation/reducer.js";import{useCustomToolInstance as ut}from"../../../hooks/annotation.js";import{PageForward as C}from"../../../store/annotation/actionCreators.js";import{cKeyCode as mt,EToolName as pt}from"@labelbee/lb-annotation";import{useTranslation as ft}from"react-i18next";import{getCurrentResultFromResultList as J,formatSort as V}from"../utils/data.js";import wt from"../../../assets/annotation/LLMTool/empty.svg.js";import vt from"./components/textInputBox/index.js";var gt=Object.defineProperty,Lt=Object.defineProperties,xt=Object.getOwnPropertyDescriptors,W=Object.getOwnPropertySymbols,St=Object.prototype.hasOwnProperty,bt=Object.prototype.propertyIsEnumerable,k=(c,s,m)=>s in c?gt(c,s,{enumerable:!0,configurable:!0,writable:!0,value:m}):c[s]=m,w=(c,s)=>{for(var m in s||(s={}))St.call(s,m)&&k(c,m,s[m]);if(W)for(var m of W(s))bt.call(s,m)&&k(c,m,s[m]);return c},g=(c,s)=>Lt(c,xt(s));const Et=mt.default,j=`${tt}-sidebar`,_t=c=>{var s;const{annotation:m,dispatch:S,checkMode:b}=c,{imgIndex:E,imgList:A,stepList:P,step:T,skipBeforePageTurning:_}=m,{modelAPIResponse:O}=B(K),{t:N}=ft(),d=(s=A[E])!=null?s:{},z=q(d==null?void 0:d.result),{toolInstanceRef:D}=ut({basicInfo:z}),[v,G]=F(),{setNewAnswerList:H}=B(K),[i,h]=F({});y(()=>{var t;if(P&&T){const e=(t=dt(P,T))==null?void 0:t.config;G(q(e))}},[T,JSON.stringify(P)]),y(()=>{if(!d||E===-1)return;const t=J(d==null?void 0:d.result);let e=(t==null?void 0:t.answerList)?t:d==null?void 0:d.questionList,r=[],l=[],n=[];(e==null?void 0:e.answerList)&&(r=Q(e.answerList)||[],l=M(e.answerList).newSort,n=M(e.answerList).waitSorts),h({newSort:l,waitSorts:n,answerList:r,textAttribute:t==null?void 0:t.textAttribute})},[E,v]),y(()=>{const{newSort:t,answerList:e,textAttribute:r}=i;D.current.exportData=()=>{const o=V(t||[]);return[[{answerList:e,sort:o,textAttribute:r,id:d==null?void 0:d.id,modelAPIResponse:O}],{}]};const l=V(t||[]),n={answerList:e,sort:l,textAttribute:r,id:d==null?void 0:d.id,toolName:pt.LLM,modelAPIResponse:O};D.current.currentPageResult=n,H(e||[])},[i,O]),y(()=>(window.addEventListener("keydown",I),()=>{window.removeEventListener("keydown",I)}),[]);const Q=t=>{const{isTextEdit:e,textEdit:r=[]}=v||{};return e?t.map(n=>{var o,a;return((o=r.filter(p=>p.title===n.order)[0])==null?void 0:o.isFillAnswer)?g(w({},n),{newAnswer:(a=n==null?void 0:n.newAnswer)!=null?a:n.answer}):n}):t},I=t=>{if(t.ctrlKey&&t.keyCode===Et.Enter){if(_){_(()=>S(C()));return}S(C())}},M=t=>{var e;let r=[],l=[];if((t==null?void 0:t.length)>0){const n=J(d==null?void 0:d.result),o=(n==null?void 0:n.length)>0?n[0]:n;((e=o==null?void 0:o.sort)==null?void 0:e.length)>0&&(l=o.sort.reduce((a,f)=>{let p=[{title:f[0],id:f[0]}];return f.length>1&&(p=f.map(L=>({title:L,id:L}))),[...a,p]},[])),t.forEach(a=>{l.some(p=>p.length>1?p.some(L=>L.id===a.order):p[0].id===a.order)||r.push({title:a.order,id:a.order})})}return{newSort:l,waitSorts:r}},U=({order:t,value:e,key:r})=>{const{answerList:l}=i,n=l==null?void 0:l.map(o=>{var a;if((o==null?void 0:o.order)===t){if(r==="textEdit"&&st(e))return g(w({},o),{newAnswer:e});if(it(e))return g(w({},o),{score:e});if(lt(e)&&r){const f={[e==null?void 0:e.key]:e.value},p=(a=o[r])!=null?a:{};return g(w({},o),{[r]:w(w({},p),f)})}}return o});h(g(w({},i),{answerList:n||[]}))};if((()=>{var t,e;const{indicatorScore:r=[],indicatorDetermine:l=[],text:n=[],enableSort:o,isTextEdit:a}=v||{},f=((t=r==null?void 0:r.filter(x=>x.label&&x.value&&x.score))==null?void 0:t.length)>0,p=((e=l==null?void 0:l.filter(x=>x.label&&x.value))==null?void 0:e.length)>0,L=(n==null?void 0:n.length)>0;return!(f||p||L||o||a)})())return u.createElement("div",{className:`${j}`},u.createElement("div",{className:`${j}__content`,style:{display:"flex",justifyContent:"center",alignItems:"center"}},u.createElement(et,{description:u.createElement("span",{style:{color:"#ccc"}},N("NoScoringScale")),imageStyle:{width:200,height:200},image:u.createElement("img",{src:wt})})));const{indicatorScore:R=[],indicatorDetermine:$=[],enableSort:X,isTextEdit:Y}=v||{},Z=((i==null?void 0:i.answerList)||[]).length>0&&(($==null?void 0:$.length)>0||(R==null?void 0:R.length)>0||Y);return u.createElement("div",{className:`${j}`},u.createElement("div",{className:`${j}__content`},X&&u.createElement(rt,{waitSortList:(i==null?void 0:i.waitSorts)||[],sortList:(i==null?void 0:i.newSort)||[],setSortList:t=>{h(g(w({},i),{newSort:t}))},checkMode:b}),Z&&u.createElement(at,{list:(i==null?void 0:i.answerList)||[],LLMConfig:v,updateValue:U,checkMode:b}),(v==null?void 0:v.text)&&u.createElement("div",{style:{padding:"0px 16px",marginTop:"16px"}},u.createElement(vt,{textAttribute:(i==null?void 0:i.textAttribute)||[],LLMConfig:v,setText:t=>h(g(w({},i),{textAttribute:t})),checkMode:b}))),u.createElement("div",{style:{margin:"24px 16px",display:"flex"}},(A==null?void 0:A.length)-1!==E&&u.createElement(nt,{type:"primary",style:{marginLeft:"auto"},onClick:()=>{if(_){_(()=>S(C()));return}S(C())},disabled:b},N("Save"))))},ht=c=>({annotation:c.annotation});var yt=ot(ht,null,null,{context:ct})(_t);export{yt as default};
1
+ import r,{useContext as k,useState as R,useEffect as E}from"react";import{prefix as rt}from"../../../constant/index.js";import{Empty as it,Button as st}from"antd";import at from"./components/answerSort/index.js";import{connect as lt}from"react-redux";import{isBoolean as ct,isString as dt,isNumber as ut,isObject as mt}from"lodash";import pt from"./components/answerList/index.js";import{LabelBeeContext as ft,LLMContext as K}from"../../../store/ctx.js";import{jsonParser as q}from"../../../utils/index.js";import{getStepConfig as vt}from"../../../store/annotation/reducer.js";import{useCustomToolInstance as gt}from"../../../hooks/annotation.js";import{PageForward as h}from"../../../store/annotation/actionCreators.js";import{cKeyCode as Lt,EToolName as xt}from"@labelbee/lb-annotation";import{useTranslation as wt}from"react-i18next";import{getCurrentResultFromResultList as St,getRenderDataByResult as _t,formatSort as bt}from"../utils/data.js";import yt from"../../../assets/annotation/LLMTool/empty.svg.js";import Et from"./components/textInputBox/index.js";import ht from"../../tagList/components/overall/index.js";var Ct=Object.defineProperty,jt=Object.defineProperties,Pt=Object.getOwnPropertyDescriptors,z=Object.getOwnPropertySymbols,Tt=Object.prototype.hasOwnProperty,At=Object.prototype.propertyIsEnumerable,F=(s,i,l)=>i in s?Ct(s,i,{enumerable:!0,configurable:!0,writable:!0,value:l}):s[i]=l,d=(s,i)=>{for(var l in i||(i={}))Tt.call(i,l)&&F(s,l,i[l]);if(z)for(var l of z(i))At.call(i,l)&&F(s,l,i[l]);return s},p=(s,i)=>jt(s,Pt(i));const Ot=Lt.default,C=`${rt}-sidebar`,Rt=s=>{var i;const{annotation:l,dispatch:w,checkMode:W}=s,{imgIndex:S,imgList:j,stepList:P,step:T,skipBeforePageTurning:_}=l,{modelAPIResponse:I,setModelAPIResponse:G}=k(K),{t:b}=wt(),u=(i=j[S])!=null?i:{},J=q(u==null?void 0:u.result),{toolInstanceRef:m}=gt({basicInfo:J}),[f,Q]=R(),[,U]=R(0),{setNewAnswerList:H}=k(K),[n,L]=R({}),x=!m.current.valid||W;E(()=>{var t;if(P&&T){const e=(t=vt(P,T))==null?void 0:t.config;Q(q(e))}},[T,JSON.stringify(P)]),E(()=>{!u||S===-1||(m.current.setValid=N,m.current.clearResult=X,D())},[S,f]);const X=()=>{D(u==null?void 0:u.questionList)},N=t=>{var e;ct(t)&&(m.current.valid=t,(e=m.current)==null||e.emit("validUpdated"),U(o=>o+1))},D=t=>{var e;const o=St(u==null?void 0:u.result);let a=u==null?void 0:u.questionList;(o==null?void 0:o.answerList)&&m.current.valid&&(a=o),t&&(a=t,o.sort=[],o.valid=(e=m.current.valid)!=null?e:!0),N(o.valid);const v=_t(f,a);L(d({},v)),G([])};E(()=>{const{newSort:t,answerList:e,textAttribute:o,tagList:a}=n,v=bt(t||[]),c={answerList:e,sort:v,tagList:a,textAttribute:o,id:u==null?void 0:u.id,modelAPIResponse:I,valid:m.current.valid};m.current.exportData=()=>[[c],{valid:m.current.valid}],m.current.currentPageResult=p(d({},c),{toolName:xt.LLM}),H(e||[])},[n,I]),E(()=>(window.addEventListener("keydown",M),()=>{window.removeEventListener("keydown",M)}),[]);const M=t=>{if(t.ctrlKey&&t.keyCode===Ot.Enter){if(_){_(()=>w(h()));return}w(h())}},Y=({order:t,value:e,key:o})=>{const{answerList:a}=n,v=a==null?void 0:a.map(c=>{var y;if((c==null?void 0:c.order)===t){if(o==="textEdit"&&dt(e))return p(d({},c),{newAnswer:e});if(ut(e))return p(d({},c),{score:e});if(mt(e)&&o){const A={[e==null?void 0:e.key]:e.value},O=(y=c[o])!=null?y:{};return p(d({},c),{[o]:d(d({},O),A)})}}return c});L(p(d({},n),{answerList:v||[]}))};if((()=>{var t,e;const{indicatorScore:o=[],indicatorDetermine:a=[],text:v=[],enableSort:c,isTextEdit:y}=f||{},A=((t=o==null?void 0:o.filter(g=>g.label&&g.value&&g.score))==null?void 0:t.length)>0,O=((e=a==null?void 0:a.filter(g=>g.label&&g.value))==null?void 0:e.length)>0,ot=(v==null?void 0:v.length)>0;return!(A||O||ot||c||y)})())return r.createElement("div",{className:`${C}`},r.createElement("div",{className:`${C}__content`,style:{display:"flex",justifyContent:"center",alignItems:"center"}},r.createElement(it,{description:r.createElement("span",{style:{color:"#ccc"}},b("NoScoringScale")),imageStyle:{width:200,height:200},image:r.createElement("img",{src:yt})})));const{indicatorScore:B=[],indicatorDetermine:$=[],enableSort:Z,isTextEdit:tt,inputList:V=[],tagInputListConfigurable:et}=f||{},nt=((n==null?void 0:n.answerList)||[]).length>0&&(($==null?void 0:$.length)>0||(B==null?void 0:B.length)>0||tt);return r.createElement("div",{className:`${C}`},r.createElement("div",{className:`${C}__content`},r.createElement("div",{style:{fontSize:"18px",fontWeight:500,padding:"0px 16px",marginTop:"16px"}},b("GlobalAnnotation")),Z&&r.createElement(at,{waitSortList:(n==null?void 0:n.waitSorts)||[],sortList:(n==null?void 0:n.newSort)||[],setSortList:t=>{L(p(d({},n),{newSort:t}))},disabeledAll:x}),et&&V.length&&r.createElement(ht,{inputList:V,selectedTags:(n==null?void 0:n.tagList)||{},updateValue:t=>{const{key:e,value:o}=t,a=n==null?void 0:n.tagList;L(p(d({},n),{tagList:p(d({},a),{[e]:o})}))},disabeledAll:x}),(f==null?void 0:f.text)&&r.createElement("div",{style:{padding:"0px 16px",marginTop:"16px"}},r.createElement(Et,{textAttribute:(n==null?void 0:n.textAttribute)||[],LLMConfig:f,setText:t=>L(p(d({},n),{textAttribute:t})),disabeledAll:x})),r.createElement("div",{style:{fontSize:"18px",fontWeight:500,padding:"0px 16px",marginTop:"16px"}},b("QualifiedAnnotation")),r.createElement("div",null,nt&&r.createElement(pt,{list:(n==null?void 0:n.answerList)||[],LLMConfig:f,updateValue:Y,disabeledAll:x}))),r.createElement("div",{style:{margin:"24px 16px",display:"flex"}},(j==null?void 0:j.length)-1!==S&&r.createElement(st,{type:"primary",style:{marginLeft:"auto"},onClick:()=>{if(_){_(()=>w(h()));return}w(h())},disabled:x},b("Save"))))},It=s=>({annotation:s.annotation});var Nt=lt(It,null,null,{context:ft})(Rt);export{Nt as default};
@@ -1 +1 @@
1
- import{jsonParser as u}from"../../../utils/index.js";const a=l=>{var o,n;const t=u(l),r="step_1";return(n=(o=t==null?void 0:t[r])==null?void 0:o.result[0])!=null?n:{}},i=l=>l.reduce((n,t)=>{var r;let s=t;return t.length>1?s=t.map(e=>e==null?void 0:e.id):s=[(r=t[0])==null?void 0:r.id],[...n,s]},[]);export{i as formatSort,a as getCurrentResultFromResultList};
1
+ import{isArray as h}from"lodash";import{jsonParser as L}from"../../../utils/index.js";var O=Object.defineProperty,P=Object.defineProperties,S=Object.getOwnPropertyDescriptors,w=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,g=(l,t,r)=>t in l?O(l,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[t]=r,v=(l,t)=>{for(var r in t||(t={}))b.call(t,r)&&g(l,r,t[r]);if(w)for(var r of w(t))A.call(t,r)&&g(l,r,t[r]);return l},c=(l,t)=>P(l,S(t));const E=l=>{var t,r,n;const i=L(l),o="step_1",e=(r=(t=i==null?void 0:i[o])==null?void 0:t.result[0])!=null?r:{};return c(v({},e),{valid:(n=e==null?void 0:e.valid)!=null?n:!0})},x=l=>l.reduce((r,n)=>{var i;let o=n;return n.length>1?o=n.map(e=>e==null?void 0:e.id):o=[(i=n[0])==null?void 0:i.id],[...r,o]},[]),p=(l,t)=>{let r={};return l.forEach(n=>{var i;let o=[];t&&t[n==null?void 0:n.value]?o=t[n.value]:((i=n==null?void 0:n.subSelected)==null?void 0:i.length)>0&&n.subSelected.forEach(e=>{(e==null?void 0:e.isDefault)&&(e==null?void 0:e.value)&&o.push(e.value)}),o.length>0&&(r=c(v({},r),{[n.value]:o}))}),r},f=(l,t)=>{var r;let n=[],i=[];if((l==null?void 0:l.length)>0){const o=h(t)?t[0]:t;((r=o==null?void 0:o.sort)==null?void 0:r.length)>0&&(i=o.sort.reduce((e,s)=>{let a=[{title:s[0],id:s[0]}];return s.length>1&&(a=s.map(u=>({title:u,id:u}))),[...e,a]},[])),l.forEach(e=>{i.some(a=>a.length>1?a.some(u=>u.id===e.order):a[0].id===e.order)||n.push({title:e.order,id:e.order})})}return{newSort:i,waitSorts:n}},m=(l,t)=>{const{isTextEdit:r,textEdit:n=[],inputList:i=[]}=t||{};return r?l.map(e=>{var s,a;const u=i.filter(d=>!(d==null?void 0:d.isOverall))||[],_=p(u,e==null?void 0:e.tagList);return((s=n.filter(d=>d.title===e.order)[0])==null?void 0:s.isFillAnswer)?c(v({},e),{newAnswer:(a=e==null?void 0:e.newAnswer)!=null?a:e.answer,tagList:_}):c(v({},e),{tagList:_})}):l},j=(l,t)=>{var r;let n=[],i=[],o=[],e={};(t==null?void 0:t.answerList)&&(n=m(t.answerList,l)||[],i=f(t.answerList,t).newSort,o=f(t.answerList,t).waitSorts);const s=((r=l==null?void 0:l.inputList)==null?void 0:r.filter(a=>a==null?void 0:a.isOverall))||[];return e=p(s,t==null?void 0:t.tagList),{newSort:i,waitSorts:o,answerList:n,tagList:e,textAttribute:t==null?void 0:t.textAttribute}};export{x as formatSort,E as getCurrentResultFromResultList,j as getRenderDataByResult,p as getTagResult,f as getWaitSortList,m as initAnswerList};
@@ -1 +1 @@
1
- import f,{useContext as U,useState as p,useMemo as L,useEffect as A}from"react";import{connect as X}from"react-redux";import{LabelBeeContext as Y,NLPContext as Z}from"../../store/ctx.js";import{prefix as tt}from"../../constant/index.js";import et from"./textContent/index.js";import{useTranslation as nt}from"react-i18next";import ot from"../../views/MainView/annotationTips/index.js";import{getStepConfig as rt}from"../../store/annotation/reducer.js";import{jsonParser as it}from"../../utils/index.js";import{getCurrentResultFromResultList as at}from"../LLMToolView/utils/data.js";import{useCustomToolInstance as st}from"../../hooks/annotation.js";import{uuid as ct}from"@labelbee/lb-annotation";var lt=Object.defineProperty,ut=Object.defineProperties,dt=Object.getOwnPropertyDescriptors,O=Object.getOwnPropertySymbols,mt=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable,T=(o,e,r)=>e in o?lt(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,y=(o,e)=>{for(var r in e||(e={}))mt.call(e,r)&&T(o,r,e[r]);if(O)for(var r of O(e))ft.call(e,r)&&T(o,r,e[r]);return o},j=(o,e)=>ut(o,dt(e));const D=`${tt}-NLPView`,pt=o=>{const{annotation:e,checkMode:r,tips:S,showTips:N,remarkLayer:C,remark:R,activeToolPanel:V}=o,{imgIndex:l,imgList:m,stepList:x,step:v}=e,{highlightKey:k,setHighlightKey:E}=U(Z),{toolInstanceRef:i}=st(),[P,I]=p(""),[g,M]=p([]),[K,$]=p([{content:""}]),[a,u]=p({id:1,newText:"",indicatorDetermine:{},textAnnotation:[]}),B=L(()=>(a==null?void 0:a.textAnnotation)?a.textAnnotation.filter(t=>g.length===0||g.includes(t.attribute)):[],[a,g]);nt();const _=L(()=>{var t;if(x&&v){const n=(t=rt(x,v))==null?void 0:t.config;return it(n)}},[x,v]);A(()=>{var t;if(!m[l])return;const n=(t=m[l])==null?void 0:t.textData;$(n)},[l,_]),A(()=>{var t;if(!m[l])return;const n=(t=m[l])!=null?t:{},c=at(n==null?void 0:n.result);u(c)},[l]),A(()=>{i.current.exportData=()=>[[a],{}],i.current.setResult=()=>{},i.current.updateResult=t=>{u(t)},i.current.clearResult=F,i.current.setDefaultAttribute=H,i.current.setHighlightKey=E,i.current.deleteTextAnnotation=Q,i.current.setAttributeLockList=q,w()},[a]);const w=()=>{i.current.emit("changeAttributeSidebar"),i.current.emit("changeIndicatorDetermine")},H=t=>{i.current.defaultAttribute=t,I(t),w()},q=t=>{M(t)},F=()=>{u({id:1,newText:"",indicatorDetermine:{},textAnnotation:[]}),w()},Q=t=>{u(n=>j(y({},n),{textAnnotation:n.textAnnotation.filter(c=>c.id!==t)}))},W=t=>{var n;if(t===""||r)return;let c=window.getSelection();const{anchorOffset:d=0,focusOffset:s=0,anchorNode:G,focusNode:J}=c||{};if(G===J){let b=Math.min(d,s),h=Math.max(d,s);if(z(b,h,P,a==null?void 0:a.textAnnotation))return;u(j(y({},a),{textAnnotation:[...(a==null?void 0:a.textAnnotation)||[],{id:ct(8,62),start:b,end:h,attribute:P,text:t}]})),(n=window.getSelection())==null||n.empty()}},z=(t,n,c,d)=>d==null?void 0:d.some(s=>(s==null?void 0:s.start)===t&&(s==null?void 0:s.end)===n&&(s==null?void 0:s.attribute)===c);return f.createElement("div",{className:D},f.createElement("div",{className:`${D}-question`},N===!0&&f.createElement(ot,{tips:S}),f.createElement(et,{highlightKey:k,textData:K,checkMode:r,NLPConfig:_,textAnnotation:B,onSelectionChange:W,remarkLayer:C,remark:R,activeToolPanel:V})))},xt=o=>({annotation:o.annotation});var vt=X(xt,null,null,{context:Y})(pt);export{vt as default};
1
+ import m,{useContext as ct,useState as f,useMemo as I,useEffect as w}from"react";import{connect as ut}from"react-redux";import{LabelBeeContext as lt,NLPContext as dt}from"../../store/ctx.js";import{prefix as ft}from"../../constant/index.js";import pt from"./textContent/index.js";import mt from"../../views/MainView/annotationTips/index.js";import{getStepConfig as gt}from"../../store/annotation/reducer.js";import{jsonParser as vt}from"../../utils/index.js";import{getCurrentResultFromResultList as xt}from"../LLMToolView/utils/data.js";import{useCustomToolInstance as At}from"../../hooks/annotation.js";import{uuid as bt}from"@labelbee/lb-annotation";var _t=Object.defineProperty,ht=Object.defineProperties,wt=Object.getOwnPropertyDescriptors,M=Object.getOwnPropertySymbols,Pt=Object.prototype.hasOwnProperty,Lt=Object.prototype.propertyIsEnumerable,k=(o,e,r)=>e in o?_t(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,g=(o,e)=>{for(var r in e||(e={}))Pt.call(e,r)&&k(o,r,e[r]);if(M)for(var r of M(e))Lt.call(e,r)&&k(o,r,e[r]);return o},v=(o,e)=>ht(o,wt(e));const B=`${ft}-NLPView`,yt=o=>{const{annotation:e,checkMode:r,tips:K,showTips:$,extraLayer:H,extraData:q,onChangeAnnotation:P,customAnnotationData:F}=o,{imgIndex:u,imgList:p,stepList:x,step:A}=e,{highlightKey:Q,setHighlightKey:W}=ct(dt),{toolInstanceRef:i}=At(),[L,z]=f(""),[b,G]=f([]),[_,J]=f(void 0),[U,X]=f([{content:""}]),[s,l]=f({id:1,newText:"",indicatorDetermine:{},textAnnotation:[]}),Y=I(()=>(s==null?void 0:s.textAnnotation)?(_&&(s.textAnnotation=_),s.textAnnotation.filter(t=>b.length===0||b.includes(t.attribute))):[],[s,b,_]),y=I(()=>{var t;if(x&&A){const n=(t=gt(x,A))==null?void 0:t.config;return vt(n)}},[x,A]);w(()=>{var t;if(!p[u])return;const n=(t=p[u])==null?void 0:t.textData;X(n)},[u,y]),w(()=>{var t;if(!p[u])return;const n=(t=p[u])!=null?t:{},c=xt(n==null?void 0:n.result);l(c)},[u]),w(()=>{i.current.exportData=()=>[[s],{}],i.current.setResult=()=>{},i.current.updateResult=t=>{l(t)},i.current.clearResult=nt,i.current.setDefaultAttribute=Z,i.current.setHighlightKey=W,i.current.deleteTextAnnotation=ot,i.current.setAttributeLockList=tt,i.current.setVisibleResult=et,h()},[s]);const h=()=>{i.current.emit("changeAttributeSidebar"),i.current.emit("changeIndicatorDetermine")},Z=t=>{i.current.defaultAttribute=t,z(t),h()},tt=t=>{G(t)},et=t=>{J(t)},nt=()=>{l({id:1,newText:"",indicatorDetermine:{},textAnnotation:[]}),h()},ot=t=>{l(n=>v(g({},n),{textAnnotation:n.textAnnotation.filter(c=>c.id!==t)}))},rt=(t,n)=>{var c,d;if(n===""||!t)return;const a=window.getSelection(),{anchorOffset:D=0,focusOffset:O=0,anchorNode:st,focusNode:at}=a||{};if(st===at){const C=Math.min(D,O),S=Math.max(D,O);let j;if((t==null?void 0:t.current)&&a){const T=(c=t.current)==null?void 0:c.getBoundingClientRect(),N=a.getRangeAt(0).getBoundingClientRect(),V=N.right-T.left,E=N.top-T.top;V&&E&&(j={left:V,top:E})}const R={id:bt(8,62),start:C,end:S,text:n};if(typeof P=="function"){P(v(g({},R),{endPosition:j}));return}if(it(C,S,L,s==null?void 0:s.textAnnotation)||r)return;l(v(g({},s),{textAnnotation:[...(s==null?void 0:s.textAnnotation)||[],v(g({},R),{attribute:L})]})),(d=window.getSelection())==null||d.empty()}},it=(t,n,c,d)=>d==null?void 0:d.some(a=>(a==null?void 0:a.start)===t&&(a==null?void 0:a.end)===n&&(a==null?void 0:a.attribute)===c);return m.createElement("div",{className:B},m.createElement("div",{className:`${B}-question`},$===!0&&m.createElement(mt,{tips:K}),m.createElement(pt,{highlightKey:Q,textData:U,NLPConfig:y,textAnnotation:Y,onSelectionChange:rt,extraLayer:H,extraData:q,customAnnotationData:F})))},Dt=o=>({annotation:o.annotation});var Ot=ut(Dt,null,null,{context:lt})(yt);export{Ot as default};
@@ -0,0 +1 @@
1
+ import s from"lodash";import r from"react";var u=({splitIntervals:d,extraData:t})=>r.createElement("div",{style:{position:"absolute",top:0,left:0,backgroundColor:"transparent",color:"transparent"}},d.map((o,n)=>{var l;const e=s.last(o.extraAnnotations);let i=`2px solid ${((l=o==null?void 0:o.extraAnnotations)==null?void 0:l.find(a=>(a==null?void 0:a.auditID)===(t==null?void 0:t.hoverAuditID)))?"#ffc60a":"#fcdf7e"}`;return(t==null?void 0:t.isShowRemark)||(i=""),e?r.createElement("span",{style:{borderBottom:i,padding:"2px 0px"},id:e==null?void 0:e.id,key:n},o.text):r.createElement("span",{key:n},o.text)}));export{u as default};
@@ -1 +1 @@
1
- import i,{useRef as F,useState as L,useMemo as C,useEffect as E}from"react";import{I18nextProvider as G,useTranslation as J}from"react-i18next";import{i18n as T,toolStyleConverter as X}from"@labelbee/lb-utils";import{TOOL_PANEL_KEY as j,prefix as Z}from"../../../constant/index.js";import{useTextSelection as tt}from"ahooks";import A from"lodash";import{uuid as et,CommonToolUtils as nt}from"@labelbee/lb-annotation";import ot from"../../../constant/styleString.js";import{getIntervals as D}from"../utils/index.js";import{classnames as rt}from"../../../utils/index.js";import lt from"./remarkMask.js";var it=Object.defineProperty,M=Object.getOwnPropertySymbols,at=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable,B=(e,o,n)=>o in e?it(e,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[o]=n,ct=(e,o)=>{for(var n in o||(o={}))at.call(o,n)&&B(e,n,o[n]);if(M)for(var n of M(o))st.call(o,n)&&B(e,n,o[n]);return e};const P=`${Z}-NLPView`,ut=({remarkLayer:e,remarkStyle:o,setRemarkStyle:n,setRemarkResut:g,remarkResut:S})=>{if(e)return e({style:o,onClose:()=>{var k;n(void 0),g({}),(k=window.getSelection())==null||k.empty()},submitData:S})},mt=e=>{const{highlightKey:o,textData:n,lang:g,checkMode:S=!0,NLPConfig:k,onSelectionChange:b,textAnnotation:R,remark:s,activeToolPanel:h}=e,{enableRemark:V,displayRemarkList:f}=s||{},w=h?h!==j.Remark:!1,{t:$}=J(),c=F(null),y=tt(c),[p,I]=L({}),[q,_]=L(void 0),v=C(()=>{var t;return(t=n==null?void 0:n[0])==null?void 0:t.content},[n]),K=C(()=>{const t=A.clone(f);return(p==null?void 0:p.start)&&t.push(p),D(v,t!=null?t:[],"remarkAnnotations")},[f,p,v]),H=C(()=>D(v,R!=null?R:[],"annotations"),[R,v]),Q=(t="")=>{const a=nt.jsonParser(ot);return X.getColorByConfig({attribute:t,config:k,style:a})};E(()=>{var t;g&&((t=T)==null||t.changeLanguage(g))},[]),E(()=>{V&&!w?U(y.text):h&&h===j.Tool&&(b==null||b(y.text))},[y.text]),E(()=>{if(!(s==null?void 0:s.editAuditID))return;const t=f.filter(l=>l.auditID===s.editAuditID)[0],a=t==null?void 0:t.id,r=document.getElementById(a);if(r&&c.current){const l=r.getBoundingClientRect(),u=c.current.getBoundingClientRect(),m=l.right-u.left,d=l.bottom-u.top-r.offsetHeight;m&&d&&_({left:m,top:d})}},[s==null?void 0:s.editAuditID]);const U=t=>{var a;if(t==="")return;let r=window.getSelection();const{anchorOffset:l=0,focusOffset:u=0,anchorNode:m,focusNode:d}=r||{};if(m===d){let W=Math.min(l,u),Y=Math.max(l,u);if(y&&(c==null?void 0:c.current)&&r){const O=(a=c.current)==null?void 0:a.getBoundingClientRect(),N=r.getRangeAt(0).getBoundingClientRect(),x={left:N.right-O.left,top:N.top-O.top};x.left&&x.left&&_(x)}const z={id:et(8,62),start:W,end:Y,text:t};I(z)}};return i.createElement("div",null,i.createElement("div",{className:`${P}-question-title`},$("textTool")),i.createElement("div",{className:rt({[`${P}-question-content`]:!0}),style:{position:"relative"},onDoubleClick:t=>{t.preventDefault()}},i.createElement("div",{style:{position:"relative"}},H.map((t,a)=>{var r;const l=A.last(t.annotations);if(l){const u=Q(l.attribute),m=(r=t==null?void 0:t.annotations)==null?void 0:r.find(d=>d.id===o);return i.createElement("span",{style:{backgroundColor:u.valid.stroke,color:m?"white":void 0,padding:"2px 0px"},key:a},t.text)}else return i.createElement("span",{key:a},t.text)}),(f==null?void 0:f.length)>0&&i.createElement(lt,{remarkSplitIntervals:K,remark:s}),!w&&ut({remarkLayer:e==null?void 0:e.remarkLayer,setRemarkStyle:_,remarkStyle:q,remarkResut:p,setRemarkResut:I}),i.createElement("div",{className:`${P}-question-content-mask`,ref:c},v))))},dt=e=>i.createElement(G,{i18n:T},i.createElement(mt,ct({},e)));export{dt as default};
1
+ import r,{useRef as V,useState as D,useMemo as b,useEffect as _}from"react";import{I18nextProvider as $,useTranslation as q}from"react-i18next";import{i18n as R,toolStyleConverter as H}from"@labelbee/lb-utils";import{prefix as K}from"../../../constant/index.js";import{useTextSelection as Q}from"ahooks";import j from"lodash";import{CommonToolUtils as U}from"@labelbee/lb-annotation";import W from"../../../constant/styleString.js";import{getIntervals as k}from"../utils/index.js";import{classnames as z}from"../../../utils/index.js";import F from"./extraMask.js";var G=Object.defineProperty,O=Object.getOwnPropertySymbols,J=Object.prototype.hasOwnProperty,X=Object.prototype.propertyIsEnumerable,A=(n,o,e)=>o in n?G(n,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[o]=e,Y=(n,o)=>{for(var e in o||(o={}))J.call(o,e)&&A(n,e,o[e]);if(O)for(var e of O(o))X.call(o,e)&&A(n,e,o[e]);return n};const I=`${K}-NLPView`,Z=({extraLayer:n,extraStyle:o,setExtraStyle:e,setExtraResut:u,extraResut:h})=>{if(typeof n=="function"&&e&&u)return n({style:o,onClose:()=>{var d;e(void 0),u(void 0),(d=window.getSelection())==null||d.empty()},submitData:h})},tt=n=>{const{highlightKey:o,textData:e,lang:u,NLPConfig:h,onSelectionChange:d,textAnnotation:E,extraData:s,customAnnotationData:C}=n,{displayRemarkList:m=[]}=s||{},{t:L}=q(),f=V(null),P=Q(f),[p,w]=D(),[N,g]=D(void 0),v=b(()=>{var t;return(t=e==null?void 0:e[0])==null?void 0:t.content},[e]),T=b(()=>{const t=j.clone(m);return(p==null?void 0:p.start)&&t.push(p),k(v,t!=null?t:[],"extraAnnotations")},[m,p,v]),B=b(()=>k(v,E!=null?E:[],"annotations"),[E,v]);_(()=>{if(C){const{id:t,start:l,end:c,text:a,endPosition:i}=C;w({id:t,start:l,end:c,text:a}),g(i)}},[C]);const M=(t="")=>{const l=U.jsonParser(W);return H.getColorByConfig({attribute:t,config:h,style:l})};return _(()=>{var t;u&&((t=R)==null||t.changeLanguage(u))},[]),_(()=>{d==null||d(f,P.text)},[P.text]),_(()=>{var t;if(!(s==null?void 0:s.editAuditID))return;const l=m.filter(i=>(i==null?void 0:i.auditID)===s.editAuditID)[0],c=(t=l==null?void 0:l.id)!=null?t:"",a=document.getElementById(c);if(a&&f.current){const i=a.getBoundingClientRect(),x=f.current.getBoundingClientRect(),y=i.right-x.left,S=i.bottom-x.top-a.offsetHeight;y&&S&&g&&g({left:y,top:S})}},[s==null?void 0:s.editAuditID]),r.createElement("div",null,r.createElement("div",{className:`${I}-question-title`},L("textTool")),r.createElement("div",{className:z({[`${I}-question-content`]:!0}),style:{position:"relative"},onDoubleClick:t=>{t.preventDefault()}},r.createElement("div",{style:{position:"relative"}},B.map((t,l)=>{var c;const a=j.last(t.annotations);if(a){const i=M(a.attribute),x=(c=t==null?void 0:t.annotations)==null?void 0:c.find(y=>y.id===o);return r.createElement("span",{style:{backgroundColor:i.valid.stroke,color:x?"white":void 0,padding:"2px 0px"},key:l},t.text)}else return r.createElement("span",{key:l},t.text)}),(m==null?void 0:m.length)>0&&r.createElement(F,{splitIntervals:T,extraData:s}),Z({extraLayer:n==null?void 0:n.extraLayer,setExtraStyle:g,extraStyle:N,extraResut:p,setExtraResut:w}),r.createElement("div",{className:`${I}-question-content-mask`,ref:f},v))))},et=n=>r.createElement($,{i18n:R},r.createElement(tt,Y({},n)));export{et as default};
@@ -1 +1 @@
1
- import e from"react";import{Tooltip as B}from"antd";import H from"../../../../assets/toolStyle/icon_defaultSize.svg.js";import{useTranslation as N}from"react-i18next";const W=({limit:l,updateSize:r})=>{var c,u,s,m;const{t}=N(),d={and:t("And"),or:t("Or")},a=(c=l==null?void 0:l.sizeLimit)==null?void 0:c.defaultSize,i=(u=l==null?void 0:l.sizeLimit)==null?void 0:u.sizeRange,o=((s=l==null?void 0:l.sizeLimit)==null?void 0:s.logicalCondition)||[],g=l==null?void 0:l.positionLimit,{heightDefault:$,depthDefault:v,widthDefault:E}=a||{},{heightMax:f,heightMin:x,depthMax:L,depthMin:M,widthMax:z,widthMin:R}=i||{},{XMin:T,XMax:w,YMin:y,YMax:S,ZMin:_,ZMax:C}=g||{},D=o.length>0||i,p=n=>{switch(n){case"width":return t("Length");case"height":return t("Width");case"depth":return t("Height")}return""};return e.createElement(B,{color:"rgba(0, 0, 0, 0.75)",title:e.createElement("div",{style:{padding:"8px"}},a&&e.createElement("div",{style:{marginBottom:"24px"}},e.createElement("div",null,"\u3010",t("DefaultSize"),"\u3011"),e.createElement("span",null,`${t("Length")}: ${E}m\u3001`),e.createElement("span",null,`${t("Width")}: ${$}m\u3001`),e.createElement("span",null,`${t("Height")}: ${v}m`)),D&&e.createElement("div",{style:{marginBottom:"24px"}},e.createElement("div",null,"*",t("NormalSizeRange")),i&&e.createElement("span",null,"(",e.createElement("span",null,`${t("Length")}: ${R}~${z}m\u3001`),e.createElement("span",null,`${t("Width")}: ${x}~${f}m\u3001`),e.createElement("span",null,`${t("Height")}: ${M}~${L}m`),")"),o.length>0&&e.createElement(e.Fragment,null,i?` ${d[(m=o[0])==null?void 0:m.logical]} `:null,e.createElement("span",null,"(",o.map((n,h)=>{const X=p(n==null?void 0:n.dimensionLeft),b=p(n==null?void 0:n.dimensionRight);return e.createElement("span",{key:h},h!==0?` ${d[n==null?void 0:n.logical]} `:null,`${X} ${n==null?void 0:n.condition} ${b} `)}),")"))),g&&e.createElement("div",null,e.createElement("div",null,"*",t("NormalCenterPointRange")),e.createElement("span",null,`X: ${T}~${w}\u3001`),e.createElement("span",null,`Y: ${y}~${S}\u3001`),e.createElement("span",null,`Z: ${_}~${C}`))),placement:"bottomRight"},e.createElement("img",{src:H,style:{margin:"0px 8px"},onClick:n=>{n.preventDefault(),a&&(r==null||r(a))}}))};export{W as default};
1
+ import e from"react";import{Tooltip as B}from"antd";import H from"../../../../assets/toolStyle/icon_defaultSize.svg.js";import{useTranslation as N}from"react-i18next";const W=({limit:l,updateSize:r})=>{var u,c,s,m;const{t}=N(),d={and:t("And"),or:t("Or")},a=(u=l==null?void 0:l.sizeLimit)==null?void 0:u.defaultSize,i=(c=l==null?void 0:l.sizeLimit)==null?void 0:c.sizeRange,o=((s=l==null?void 0:l.sizeLimit)==null?void 0:s.logicalCondition)||[],g=l==null?void 0:l.positionLimit,{heightDefault:$,depthDefault:v,widthDefault:E}=a||{},{heightMax:f,heightMin:x,depthMax:L,depthMin:M,widthMax:z,widthMin:R}=i||{},{XMin:_,XMax:T,YMin:w,YMax:y,ZMin:S,ZMax:C}=g||{},D=o.length>0||i,p=n=>{switch(n){case"width":return t("Length");case"height":return t("Width");case"depth":return t("Height")}return""};return e.createElement(B,{color:"rgba(0, 0, 0, 0.75)",title:e.createElement("div",{style:{padding:"8px"}},a&&e.createElement("div",{style:{marginBottom:"24px"}},e.createElement("div",null,"\u3010",t("DefaultSize"),"\u3011"),e.createElement("span",null,`${t("Length")}: ${E}m\u3001`),e.createElement("span",null,`${t("Width")}: ${$}m\u3001`),e.createElement("span",null,`${t("Height")}: ${v}m`)),D&&e.createElement("div",{style:{marginBottom:"24px"}},e.createElement("div",null,"*",t("NormalSizeRange")),i&&e.createElement("span",null,"(",e.createElement("span",null,`${t("Length")}: ${R}~${z}m\u3001`),e.createElement("span",null,`${t("Width")}: ${x}~${f}m\u3001`),e.createElement("span",null,`${t("Height")}: ${M}~${L}m`),")"),o.length>0&&e.createElement(e.Fragment,null,i?` ${d[(m=o[0])==null?void 0:m.logical]} `:null,e.createElement("span",null,"(",o.map((n,h)=>{const X=p(n==null?void 0:n.dimensionLeft),b=p(n==null?void 0:n.dimensionRight);return e.createElement("span",{key:h},h!==0?` ${d[n==null?void 0:n.logical]} `:null,`${X} ${n==null?void 0:n.condition} ${b} `)}),")"))),g&&e.createElement("div",null,e.createElement("div",null,"*",t("NormalCenterPointRange")),e.createElement("span",null,`X: ${_}~${T}\u3001`),e.createElement("span",null,`Y: ${w}~${y}\u3001`),e.createElement("span",null,`Z: ${S}~${C}`))),placement:"bottomRight"},e.createElement("img",{src:H,style:{margin:"0px 8px"},onClick:n=>{n.preventDefault(),a&&(r==null||r(a))}}))};export{W as default};
@@ -1 +1 @@
1
- import{RightOutlined as f}from"@ant-design/icons";import t,{useMemo as p,useContext as b,useState as u,useEffect as A}from"react";import{Input as g}from"antd";import{useSetState as x}from"ahooks";import a from"./index.module.scss.js";var s;(function(o){o.before="\u524D\u6587",o.after="\u540E\u6587"})(s||(s={}));const v=o=>{const{audioContext:e}=o;if(!e||!e.visible)return null;const{content:i,type:n}=e;return t.createElement(E,{title:s==null?void 0:s[n],content:i})},E=o=>{const[e,i]=u(!0),[n,m]=u(""),{title:C,content:l}=o,r=()=>{i(!e)};return A(()=>{m(l),i(!0)},[l]),t.createElement("div",{className:a.audioContextContainer},t.createElement("div",{className:a.title},t.createElement(f,{style:{marginRight:8},rotate:e?90:0,onClick:r}),t.createElement("span",{onClick:r},C)),e&&t.createElement("div",{className:a.content},t.createElement(g.TextArea,{bordered:!1,value:n,disabled:!0,style:{padding:0},autoSize:!0})))},c={selectedAttribute:"",selectedRegion:{},attributeLockList:[],clipConfigurable:!1,clipAttributeConfigurable:!1,clipAttributeList:[],clipTextConfigurable:!1,combined:!1,segment:!1},d=t.createContext({audioClipState:c,setAudioClipState:()=>{}}),S=()=>b(d),y=({children:o})=>{const[e,i]=x(c),n=p(()=>({audioClipState:e,setAudioClipState:i}),[e,i]);return t.createElement(d.Provider,{value:n},o)};export{y as AudioClipProvider,s as EContextType,v as default,S as useAudioClipStore};
1
+ import{RightOutlined as C}from"@ant-design/icons";import t,{useMemo as p,useContext as b,useState as u,useEffect as A}from"react";import{Input as g}from"antd";import{useSetState as x}from"ahooks";import a from"./index.module.scss.js";var s;(function(o){o.before="\u524D\u6587",o.after="\u540E\u6587"})(s||(s={}));const v=o=>{const{audioContext:e}=o;if(!e||!e.visible)return null;const{content:i,type:n}=e;return t.createElement(E,{title:s==null?void 0:s[n],content:i})},E=o=>{const[e,i]=u(!0),[n,m]=u(""),{title:f,content:l}=o,r=()=>{i(!e)};return A(()=>{m(l),i(!0)},[l]),t.createElement("div",{className:a.audioContextContainer},t.createElement("div",{className:a.title},t.createElement(C,{style:{marginRight:8},rotate:e?90:0,onClick:r}),t.createElement("span",{onClick:r},f)),e&&t.createElement("div",{className:a.content},t.createElement(g.TextArea,{bordered:!1,value:n,disabled:!0,style:{padding:0},autoSize:!0})))},c={selectedAttribute:"",selectedRegion:{},attributeLockList:[],clipConfigurable:!1,clipAttributeConfigurable:!1,clipAttributeList:[],clipTextConfigurable:!1,combined:!1,segment:!1},d=t.createContext({audioClipState:c,setAudioClipState:()=>{}}),S=()=>b(d),y=({children:o})=>{const[e,i]=x(c),n=p(()=>({audioClipState:e,setAudioClipState:i}),[e,i]);return t.createElement(d.Provider,{value:n},o)};export{y as AudioClipProvider,s as EContextType,v as default,S as useAudioClipStore};
@@ -1 +1 @@
1
- import{Popover as _,Spin as F}from"antd";import t,{useState as y,useEffect as O}from"react";import n from"./index.module.scss.js";var P=Object.defineProperty,c=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,E=(a,r,e)=>r in a?P(a,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[r]=e,v=(a,r)=>{for(var e in r||(r={}))u.call(r,e)&&E(a,e,r[e]);if(c)for(var e of c(r))d.call(r,e)&&E(a,e,r[e]);return a},C=(a,r)=>{var e={};for(var l in a)u.call(a,l)&&r.indexOf(l)<0&&(e[l]=a[l]);if(a!=null&&c)for(var l of c(a))r.indexOf(l)<0&&d.call(a,l)&&(e[l]=a[l]);return e};const w=a=>{var r=a,{src:e}=r,l=C(r,["src"]);const[m,i]=y(null);return O(()=>{if(e){const s=new Image;s.src=e,s.onload=()=>{i(s)}}},[e]),t.createElement(F,{spinning:!m},m?t.createElement("img",v({src:e},l)):t.createElement("div",v({style:{height:230}},l)))},B=({children:a,labelDetail:r,visible:e,style:l})=>{if(!e)return t.createElement("div",null,a);let m=null;if(!r)m=t.createElement("div",{className:n.errorMsg},"\u91CA\u4E49\u8BCD\u5178\u91CC\u6CA1\u6709\u6B64\u7F16\u53F7\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u3002");else{const{nameZH:i,nameEN:s,descriptionEN:p,descriptionZH:f,imgList:N,no:g}=r;m=t.createElement("div",{className:n.content},t.createElement("div",{className:n.nameList},t.createElement("div",{className:n.nameZH},i),t.createElement("div",{className:n.nameEN},s),t.createElement("div",{className:n.number},g)),t.createElement("div",{className:n.item},t.createElement("div",{className:n.title},t.createElement("span",{className:n.dot}),"\u4E2D\u82F1\u63CF\u8FF0"),t.createElement("div",{className:n.contentZH},f),t.createElement("div",{className:n.contentEN},p)),t.createElement("div",{className:n.item},t.createElement("div",{className:n.title},t.createElement("span",{className:n.dot}),"\u56FE\u7247\u793A\u4F8B"),N.map(o=>t.createElement(w,{key:o.key,className:n.img,src:o.url}))))}return t.createElement(_,{destroyTooltipOnHide:!0,placement:"leftTop",content:m,trigger:"hover"},t.createElement("div",{style:l},a))};export{B as default};
1
+ import{Popover as _,Spin as F}from"antd";import t,{useState as y,useEffect as O}from"react";import n from"./index.module.scss.js";var P=Object.defineProperty,c=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,E=(a,r,e)=>r in a?P(a,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[r]=e,v=(a,r)=>{for(var e in r||(r={}))u.call(r,e)&&E(a,e,r[e]);if(c)for(var e of c(r))d.call(r,e)&&E(a,e,r[e]);return a},C=(a,r)=>{var e={};for(var l in a)u.call(a,l)&&r.indexOf(l)<0&&(e[l]=a[l]);if(a!=null&&c)for(var l of c(a))r.indexOf(l)<0&&d.call(a,l)&&(e[l]=a[l]);return e};const w=a=>{var r=a,{src:e}=r,l=C(r,["src"]);const[m,i]=y(null);return O(()=>{if(e){const s=new Image;s.src=e,s.onload=()=>{i(s)}}},[e]),t.createElement(F,{spinning:!m},m?t.createElement("img",v({src:e},l)):t.createElement("div",v({style:{height:230}},l)))},B=({children:a,labelDetail:r,visible:e,style:l})=>{if(!e)return t.createElement("div",null,a);let m=null;if(!r)m=t.createElement("div",{className:n.errorMsg},"\u91CA\u4E49\u8BCD\u5178\u91CC\u6CA1\u6709\u6B64\u7F16\u53F7\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u3002");else{const{nameZH:i,nameEN:s,descriptionEN:f,descriptionZH:p,imgList:N,no:g}=r;m=t.createElement("div",{className:n.content},t.createElement("div",{className:n.nameList},t.createElement("div",{className:n.nameZH},i),t.createElement("div",{className:n.nameEN},s),t.createElement("div",{className:n.number},g)),t.createElement("div",{className:n.item},t.createElement("div",{className:n.title},t.createElement("span",{className:n.dot}),"\u4E2D\u82F1\u63CF\u8FF0"),t.createElement("div",{className:n.contentZH},p),t.createElement("div",{className:n.contentEN},f)),t.createElement("div",{className:n.item},t.createElement("div",{className:n.title},t.createElement("span",{className:n.dot}),"\u56FE\u7247\u793A\u4F8B"),N.map(o=>t.createElement(w,{key:o.key,className:n.img,src:o.url}))))}return t.createElement(_,{destroyTooltipOnHide:!0,placement:"leftTop",content:m,trigger:"hover"},t.createElement("div",{style:l},a))};export{B as default};
@@ -1 +1 @@
1
- import t from"react";import L from"../../../attributeList/index.js";import{EventBus as v}from"@labelbee/lb-annotation";import $ from"../../../../assets/annotation/audio/clipSmall.svg.js";import R from"../../../../assets/annotation/audio/clipASmall.svg.js";import T from"../../../../assets/annotation/audio/delete.svg.js";import k from"../../../../assets/annotation/audio/loopA.svg.js";import{getAttributeShowText as F,timeFormat as b}from"../../../../utils/audio.js";import I from"../../../longText/index.js";import{classnames as D}from"../../../../utils/index.js";import i from"./index.module.scss.js";import{useTranslation as B}from"react-i18next";var V=Object.defineProperty,q=Object.defineProperties,z=Object.getOwnPropertyDescriptors,E=Object.getOwnPropertySymbols,G=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable,_=(a,e,r)=>e in a?V(a,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[e]=r,S=(a,e)=>{for(var r in e||(e={}))G.call(e,r)&&_(a,r,e[r]);if(E)for(var r of E(e))H.call(e,r)&&_(a,r,e[r]);return a},x=(a,e)=>q(a,z(e));const J=a=>{const{regions:e=[],updateRegion:r,useAudioClipStore:y}=a,{audioClipState:C,setAudioClipState:u}=y(),{t:n}=B(),{selectedAttribute:j,selectedRegion:d,clipTextConfigurable:g,clipAttributeList:m,clipAttributeConfigurable:c}=C,{id:l}=d,N=s=>{if(e.length&&l){const o=e.find(p=>p.id===l);r(x(S({},o),{attribute:s}))}u({selectedAttribute:s})},f=[{label:"\u65E0\u5C5E\u6027",value:"",key:"\u65E0\u5C5E\u6027"},...m.map(s=>x(S({},s),{label:s.key}))];return t.createElement("div",{className:i.clipSidebar},t.createElement("div",{className:i.clipResults},t.createElement("div",{className:i.title},n("ClippedAudio")),e.length>0?t.createElement("div",{className:i.regions},e.map(s=>{const{id:o,attribute:p,text:A,start:O,end:P}=s,h=o===l&&d.loop,w=`${c?F(p,f):""}${c&&g?"\uFF0C":""}${g?`${n("textTool")}\uFF1A${A}`:""}`;return t.createElement("div",{className:D({[i.region]:!0,[i.selected]:o===l}),key:o,onClick:()=>{v.emit("setSelectedRegion",{id:o,playImmediately:!0})}},t.createElement("div",{className:i.label},h&&t.createElement("img",{src:k}),t.createElement("div",{className:i.text},t.createElement(I,{text:w}))),t.createElement("div",{className:i.time},t.createElement("img",{src:l===o?R:$}),b(O,"ss.SSS")," -",b(P,"ss.SSS")),t.createElement("div",{className:i.delete,onClick:()=>{v.emit("removeRegionById",o)}},t.createElement("img",{src:T})))})):t.createElement("div",{className:i.empty},n("NoClippedData"))),c&&(m==null?void 0:m.length)>0&&t.createElement("div",{className:i.attributeList},t.createElement(L,{list:f,attributeChanged:N,selectedAttribute:j,attributeLockChange:s=>{u({attributeLockList:s})}})))};export{J as default};
1
+ import t from"react";import L from"../../../attributeList/index.js";import{EventBus as v}from"@labelbee/lb-annotation";import $ from"../../../../assets/annotation/audio/clipSmall.svg.js";import R from"../../../../assets/annotation/audio/clipASmall.svg.js";import T from"../../../../assets/annotation/audio/delete.svg.js";import k from"../../../../assets/annotation/audio/loopA.svg.js";import{getAttributeShowText as F,timeFormat as b}from"../../../../utils/audio.js";import I from"../../../longText/index.js";import{classnames as D}from"../../../../utils/index.js";import i from"./index.module.scss.js";import{useTranslation as B}from"react-i18next";var V=Object.defineProperty,q=Object.defineProperties,z=Object.getOwnPropertyDescriptors,E=Object.getOwnPropertySymbols,G=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable,_=(a,e,r)=>e in a?V(a,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[e]=r,S=(a,e)=>{for(var r in e||(e={}))G.call(e,r)&&_(a,r,e[r]);if(E)for(var r of E(e))H.call(e,r)&&_(a,r,e[r]);return a},x=(a,e)=>q(a,z(e));const J=a=>{const{regions:e=[],updateRegion:r,useAudioClipStore:y}=a,{audioClipState:C,setAudioClipState:d}=y(),{t:n}=B(),{selectedAttribute:j,selectedRegion:p,clipTextConfigurable:g,clipAttributeList:m,clipAttributeConfigurable:c}=C,{id:l}=p,N=s=>{if(e.length&&l){const o=e.find(u=>u.id===l);r(x(S({},o),{attribute:s}))}d({selectedAttribute:s})},f=[{label:"\u65E0\u5C5E\u6027",value:"",key:"\u65E0\u5C5E\u6027"},...m.map(s=>x(S({},s),{label:s.key}))];return t.createElement("div",{className:i.clipSidebar},t.createElement("div",{className:i.clipResults},t.createElement("div",{className:i.title},n("ClippedAudio")),e.length>0?t.createElement("div",{className:i.regions},e.map(s=>{const{id:o,attribute:u,text:A,start:O,end:P}=s,h=o===l&&p.loop,w=`${c?F(u,f):""}${c&&g?"\uFF0C":""}${g?`${n("textTool")}\uFF1A${A}`:""}`;return t.createElement("div",{className:D({[i.region]:!0,[i.selected]:o===l}),key:o,onClick:()=>{v.emit("setSelectedRegion",{id:o,playImmediately:!0})}},t.createElement("div",{className:i.label},h&&t.createElement("img",{src:k}),t.createElement("div",{className:i.text},t.createElement(I,{text:w}))),t.createElement("div",{className:i.time},t.createElement("img",{src:l===o?R:$}),b(O,"ss.SSS")," -",b(P,"ss.SSS")),t.createElement("div",{className:i.delete,onClick:()=>{v.emit("removeRegionById",o)}},t.createElement("img",{src:T})))})):t.createElement("div",{className:i.empty},n("NoClippedData"))),c&&(m==null?void 0:m.length)>0&&t.createElement("div",{className:i.attributeList},t.createElement(L,{list:f,attributeChanged:N,selectedAttribute:j,attributeLockChange:s=>{d({attributeLockList:s})}})))};export{J as default};
@@ -1 +1 @@
1
- import T from"../../../attributeList/index.js";import _ from"../../../checkboxList/index.js";import{CaretRightOutlined as j}from"@ant-design/icons";import{Collapse as x,Tooltip as B,Badge as R}from"antd";import{cloneDeep as V}from"lodash";import t,{Component as F}from"react";import u from"./index.module.scss.js";import k from"../LabelDetailPopover/index.js";import A from"../labelFilterInput/index.js";import{TagUtils as O}from"@labelbee/lb-annotation";import M from"../../../../assets/annotation/common/icon_clearSmall.svg.js";import $ from"../../../../assets/annotation/common/icon_clearSmall_a.svg.js";import{withTranslation as U}from"react-i18next";const H=(i,l)=>w(i,l,"#666FFF"),w=(i,l,s)=>{if(!i||!l)return i;const a=i.indexOf(l);return a===-1?i:t.createElement(t.Fragment,null,i.slice(0,a),t.createElement("span",{style:{color:s}},l),i.slice(a+l.length))},{Panel:W}=x;class q extends F{constructor(l){super(l);this.sideBar=t.createRef(),this.updateScrollTop=s=>{var a;this.sideBar.current&&((a=this.sideBar.current.children[s])==null||a.scrollIntoView({block:"center"}))},this.setExpendKeyList=(s,a,p,m)=>{const r=V(s);r[a]===""||m===!0?r[a]=p:r[a]="",this.setState({expandKeyList:r})},this.setInputValue=s=>{this.setState({inputValue:s.target.value})},this.state={hoverDeleteIndex:-1,expandKeyList:l.labelInfoSet.map(s=>s.value),inputValue:""}}shouldComponentUpdate(l,s){var a;const{labelSelectedList:p,labelInfoSet:m}=l;if((this.props.labelInfoSet.length!==l.labelInfoSet.length||this.state.inputValue!==s.inputValue)&&this.setState({expandKeyList:l.labelInfoSet.map(r=>r.value)}),p[0]!==this.props.labelSelectedList[0]&&l.labelSelectedList.length===1){const r=p[0],f=(a=m.filter((v,c)=>c===r)[0])==null?void 0:a.value;return this.setExpendKeyList(this.state.expandKeyList,r,f,!0),!0}return l.labelSelectedList.length===1&&this.updateScrollTop(p[0]),(this.props.imgIndex!==l.imgIndex||this.props.graphIndex!==l.graphIndex)&&this.updateScrollTop(0),!0}render(){const{labelInfoSet:l,labelSelectedList:s,tagResult:a,clearResult:p,entityMap:m,t:r}=this.props,{hoverDeleteIndex:f,expandKeyList:v,inputValue:c}=this.state,K=l;let L=!1;l.forEach(o=>{const{subSelected:h=[]}=o;o.hasShow=!1,h.forEach(e=>{const{key:n}=e;if(!c){e.showLabel=e.key,e.show=!0;return}n.indexOf(c)>-1?(e.showLabel=H(n,c),e.show=!0,o.hasShow=!0):(e.showLabel=e.key,e.show=!1)}),o.hasShow&&(L=!0)});const D=o=>s.length>0&&s[0]===o?t.createElement("span",{className:u.keyDownIconActive},o+1):t.createElement("span",{className:u.keyDownIcon},o+1),N=({isActive:o})=>t.createElement(j,{rotate:o?90:0}),y=(o,h=-1)=>{if(!!o)return o.map((e,n)=>{var E,S,I;if(e.subSelected){if(c&&!e.hasShow)return null;const b=O.judgeResultIsInInputList(e.value,a==null?void 0:a[e.value],K);return t.createElement(x,{bordered:!1,expandIcon:N,key:`collapse_${n}_${h+1}`,onChange:()=>this.setExpendKeyList(v,n,e.value),activeKey:[v[n]]},t.createElement(W,{header:t.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},t.createElement("span",null,e.key,t.createElement(B,{placement:"bottom",title:r("ClearThisOption")},t.createElement("img",{style:{marginLeft:5,cursor:"pointer"},onClick:g=>{g.stopPropagation(),p(e.value)},src:f===n||b?$:M,onMouseEnter:()=>{this.setState({hoverDeleteIndex:n})},onMouseLeave:()=>{this.setState({hoverDeleteIndex:-1})}})),b&&v[n]===""&&t.createElement(R,{color:"#87d068"})),!c&&this.props.labelInfoSet.length>1&&D(n)),key:e.value},t.createElement("div",{className:u.level,style:{backgroundColor:s.length>0&&s[0]===n?"rgba(158, 158, 158, 0.18)":""}},y(e.subSelected,n))))}else{const b=this.props.labelInfoSet[h]?this.props.labelInfoSet[h].value:0,g=((S=(E=a==null?void 0:a[b])==null?void 0:E.split(";"))==null?void 0:S.indexOf(e.value))>-1?e.value:"",C=m==null?void 0:m.get(e.value);if(((I=this.props.labelInfoSet[h])==null?void 0:I.isMulti)===!0){let d=n+1;return typeof d=="number"&&d<=9&&d>=0||(d="-"),(e==null?void 0:e.show)&&t.createElement("div",{className:u.singleBar},t.createElement(k,{labelDetail:C,visible:this.props.dynamicTag},t.createElement(_,{attributeChanged:()=>this.props.setLabel(h,n),selectedAttribute:[g],list:[{value:e.value,label:e.key,showLabel:e.showLabel}],num:d})))}else return(e==null?void 0:e.show)&&t.createElement("div",{className:u.singleBar},t.createElement(k,{labelDetail:C,visible:this.props.dynamicTag},t.createElement(T,{attributeChanged:()=>this.props.setLabel(h,n),selectedAttribute:g,list:[{value:e.value,label:e.key}],num:n+1})))}})};return l.length===0?t.createElement("div",{style:{padding:20,textAlign:"center"}},r("NoConfiguration")):t.createElement("div",{className:u.filterContainer},t.createElement("div",{className:u.filterInputContainer},t.createElement(A,{value:c,onChange:this.setInputValue})),t.createElement("div",{className:u.filterContent},t.createElement("div",{className:u.main,ref:this.sideBar},y(l),!!c&&!L&&t.createElement("div",{style:{textAlign:"center",color:"#999"}},r("NoData")))))}}const z=U()(q);export{z as default,w as highlightKeyword};
1
+ import N from"../../../attributeList/index.js";import T from"../../../checkboxList/index.js";import{CaretRightOutlined as j}from"@ant-design/icons";import{Collapse as x,Tooltip as B,Badge as R}from"antd";import{cloneDeep as V}from"lodash";import t,{Component as F}from"react";import u from"./index.module.scss.js";import k from"../LabelDetailPopover/index.js";import A from"../labelFilterInput/index.js";import{TagUtils as O}from"@labelbee/lb-annotation";import M from"../../../../assets/annotation/common/icon_clearSmall.svg.js";import $ from"../../../../assets/annotation/common/icon_clearSmall_a.svg.js";import{withTranslation as U}from"react-i18next";const H=(i,l)=>w(i,l,"#666FFF"),w=(i,l,s)=>{if(!i||!l)return i;const a=i.indexOf(l);return a===-1?i:t.createElement(t.Fragment,null,i.slice(0,a),t.createElement("span",{style:{color:s}},l),i.slice(a+l.length))},{Panel:W}=x;class q extends F{constructor(l){super(l);this.sideBar=t.createRef(),this.updateScrollTop=s=>{var a;this.sideBar.current&&((a=this.sideBar.current.children[s])==null||a.scrollIntoView({block:"center"}))},this.setExpendKeyList=(s,a,p,m)=>{const r=V(s);r[a]===""||m===!0?r[a]=p:r[a]="",this.setState({expandKeyList:r})},this.setInputValue=s=>{this.setState({inputValue:s.target.value})},this.state={hoverDeleteIndex:-1,expandKeyList:l.labelInfoSet.map(s=>s.value),inputValue:""}}shouldComponentUpdate(l,s){var a;const{labelSelectedList:p,labelInfoSet:m}=l;if((this.props.labelInfoSet.length!==l.labelInfoSet.length||this.state.inputValue!==s.inputValue)&&this.setState({expandKeyList:l.labelInfoSet.map(r=>r.value)}),p[0]!==this.props.labelSelectedList[0]&&l.labelSelectedList.length===1){const r=p[0],f=(a=m.filter((v,c)=>c===r)[0])==null?void 0:a.value;return this.setExpendKeyList(this.state.expandKeyList,r,f,!0),!0}return l.labelSelectedList.length===1&&this.updateScrollTop(p[0]),(this.props.imgIndex!==l.imgIndex||this.props.graphIndex!==l.graphIndex)&&this.updateScrollTop(0),!0}render(){const{labelInfoSet:l,labelSelectedList:s,tagResult:a,clearResult:p,entityMap:m,t:r}=this.props,{hoverDeleteIndex:f,expandKeyList:v,inputValue:c}=this.state,K=l;let L=!1;l.forEach(o=>{const{subSelected:h=[]}=o;o.hasShow=!1,h.forEach(e=>{const{key:n}=e;if(!c){e.showLabel=e.key,e.show=!0;return}n.indexOf(c)>-1?(e.showLabel=H(n,c),e.show=!0,o.hasShow=!0):(e.showLabel=e.key,e.show=!1)}),o.hasShow&&(L=!0)});const _=o=>s.length>0&&s[0]===o?t.createElement("span",{className:u.keyDownIconActive},o+1):t.createElement("span",{className:u.keyDownIcon},o+1),D=({isActive:o})=>t.createElement(j,{rotate:o?90:0}),y=(o,h=-1)=>{if(!!o)return o.map((e,n)=>{var E,S,I;if(e.subSelected){if(c&&!e.hasShow)return null;const b=O.judgeResultIsInInputList(e.value,a==null?void 0:a[e.value],K);return t.createElement(x,{bordered:!1,expandIcon:D,key:`collapse_${n}_${h+1}`,onChange:()=>this.setExpendKeyList(v,n,e.value),activeKey:[v[n]]},t.createElement(W,{header:t.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},t.createElement("span",null,e.key,t.createElement(B,{placement:"bottom",title:r("ClearThisOption")},t.createElement("img",{style:{marginLeft:5,cursor:"pointer"},onClick:g=>{g.stopPropagation(),p(e.value)},src:f===n||b?$:M,onMouseEnter:()=>{this.setState({hoverDeleteIndex:n})},onMouseLeave:()=>{this.setState({hoverDeleteIndex:-1})}})),b&&v[n]===""&&t.createElement(R,{color:"#87d068"})),!c&&this.props.labelInfoSet.length>1&&_(n)),key:e.value},t.createElement("div",{className:u.level,style:{backgroundColor:s.length>0&&s[0]===n?"rgba(158, 158, 158, 0.18)":""}},y(e.subSelected,n))))}else{const b=this.props.labelInfoSet[h]?this.props.labelInfoSet[h].value:0,g=((S=(E=a==null?void 0:a[b])==null?void 0:E.split(";"))==null?void 0:S.indexOf(e.value))>-1?e.value:"",C=m==null?void 0:m.get(e.value);if(((I=this.props.labelInfoSet[h])==null?void 0:I.isMulti)===!0){let d=n+1;return typeof d=="number"&&d<=9&&d>=0||(d="-"),(e==null?void 0:e.show)&&t.createElement("div",{className:u.singleBar},t.createElement(k,{labelDetail:C,visible:this.props.dynamicTag},t.createElement(T,{attributeChanged:()=>this.props.setLabel(h,n),selectedAttribute:[g],list:[{value:e.value,label:e.key,showLabel:e.showLabel}],num:d})))}else return(e==null?void 0:e.show)&&t.createElement("div",{className:u.singleBar},t.createElement(k,{labelDetail:C,visible:this.props.dynamicTag},t.createElement(N,{attributeChanged:()=>this.props.setLabel(h,n),selectedAttribute:g,list:[{value:e.value,label:e.key}],num:n+1})))}})};return l.length===0?t.createElement("div",{style:{padding:20,textAlign:"center"}},r("NoConfiguration")):t.createElement("div",{className:u.filterContainer},t.createElement("div",{className:u.filterInputContainer},t.createElement(A,{value:c,onChange:this.setInputValue})),t.createElement("div",{className:u.filterContent},t.createElement("div",{className:u.main,ref:this.sideBar},y(l),!!c&&!L&&t.createElement("div",{style:{textAlign:"center",color:"#999"}},r("NoData")))))}}const z=U()(q);export{z as default,w as highlightKeyword};
@@ -1 +1 @@
1
- import l,{useState as h,useEffect as p}from"react";import r from"./index.module.scss.js";import{EventBus as i,TagUtils as y}from"@labelbee/lb-annotation";const v=u=>{const{result:a,labelInfoSet:n,isCheck:m,hasPromptLayer:c}=u,[b,g]=h(!0),o=c?40:0;if(p(()=>(i.on("toggleShowLabel",e=>{g(e)}),()=>{i.unbindAll("toggleShowLabel")}),[]),!a||!n||!b)return null;const t=y.getTagNameList(a,n);return(t==null?void 0:t.length)===0?null:l.createElement("div",{className:r.labelContainer,style:m?{height:245,top:o}:{bottom:108,top:o}},l.createElement("div",{id:"label",className:r.label,key:`tagSet_${0}`},t.map((e,f)=>{const s=e.value.filter(d=>d);return!(e==null?void 0:e.keyName)||s.length===0?null:l.createElement("div",{key:f},e.keyName,": ",s.join(" \u3001 "))})))};export{v as default};
1
+ import l,{useState as h,useEffect as p}from"react";import r from"./index.module.scss.js";import{EventBus as i,TagUtils as y}from"@labelbee/lb-annotation";const v=u=>{const{result:a,labelInfoSet:n,isCheck:m,hasPromptLayer:c}=u,[b,f]=h(!0),o=c?40:0;if(p(()=>(i.on("toggleShowLabel",e=>{f(e)}),()=>{i.unbindAll("toggleShowLabel")}),[]),!a||!n||!b)return null;const t=y.getTagNameList(a,n);return(t==null?void 0:t.length)===0?null:l.createElement("div",{className:r.labelContainer,style:m?{height:245,top:o}:{bottom:108,top:o}},l.createElement("div",{id:"label",className:r.label,key:`tagSet_${0}`},t.map((e,g)=>{const s=e.value.filter(d=>d);return!(e==null?void 0:e.keyName)||s.length===0?null:l.createElement("div",{key:g},e.keyName,": ",s.join(" \u3001 "))})))};export{v as default};
@@ -1 +1 @@
1
- import t,{useRef as k}from"react";import S from"react-dom";import{useAudioClipStore as $}from"../../audioAnnotate/audioContext/index.js";import{getAttributeColor as w,getAttributeFontColor as N,updateColorOpacity as O,getAttributeShowText as T}from"../../../utils/audio.js";import F from"../../../assets/annotation/audio/loop.svg.js";import{Typography as P}from"antd";import{useClickAway as D}from"ahooks";import{classnames as I}from"../../../utils/index.js";import r from"./index.module.scss.js";const{Paragraph:M}=P,q=m=>{const{audioClipState:f,setAudioClipState:g}=$(),{clipAttributeList:i,clipAttributeConfigurable:b,clipTextConfigurable:x,selectedRegion:n}=f,c=k(null),{el:C,region:h,edgeAdsorption:y,clipping:A,instance:d}=m,{attribute:s="",text:v="",id:l,start:E,end:R}=h,{id:a}=n,o=w(s,i),u={color:N(s,i),backgroundColor:o},e={border:`2px solid ${o}`};if(l===a)e.backgroundColor=O(o,.6),e.borderLeft=`2px solid ${o}`,e.borderRight=`2px solid ${o}`;else if(d==null||d.setLoop(!1),e.borderLeft=`2px solid ${o}`,e.borderRight=`2px solid ${o}`,A){const p=Object.values(y);p.includes(E)&&(e.borderLeft="3px dashed #fff"),p.includes(R)&&(e.borderRight="3px dashed #fff")}D(()=>{l===a&&g({selectedRegion:{}})},c,["contextmenu"]);const j=l===a&&n.loop,L=t.createElement("div",{style:e,ref:c,className:I({[r.container]:!0})},j&&t.createElement("div",{className:r.loop},t.createElement("img",{src:F})),b&&t.createElement("div",null,t.createElement("div",{style:u,className:r.attribute},T(s,[{value:"",key:"\u65E0\u5C5E\u6027"},...i]))),x&&t.createElement(M,{ellipsis:{rows:2},className:r.text,style:u},"\u6587\u672C:",v));return t.createElement(t.Fragment,null,S.createPortal(L,C))};export{q as default};
1
+ import t,{useRef as k}from"react";import S from"react-dom";import{useAudioClipStore as $}from"../../audioAnnotate/audioContext/index.js";import{getAttributeColor as w,getAttributeFontColor as N,updateColorOpacity as O,getAttributeShowText as T}from"../../../utils/audio.js";import F from"../../../assets/annotation/audio/loop.svg.js";import{Typography as P}from"antd";import{useClickAway as _}from"ahooks";import{classnames as D}from"../../../utils/index.js";import r from"./index.module.scss.js";const{Paragraph:I}=P,M=m=>{const{audioClipState:f,setAudioClipState:g}=$(),{clipAttributeList:i,clipAttributeConfigurable:b,clipTextConfigurable:x,selectedRegion:n}=f,c=k(null),{el:C,region:h,edgeAdsorption:y,clipping:A,instance:d}=m,{attribute:s="",text:v="",id:l,start:E,end:R}=h,{id:a}=n,o=w(s,i),u={color:N(s,i),backgroundColor:o},e={border:`2px solid ${o}`};if(l===a)e.backgroundColor=O(o,.6),e.borderLeft=`2px solid ${o}`,e.borderRight=`2px solid ${o}`;else if(d==null||d.setLoop(!1),e.borderLeft=`2px solid ${o}`,e.borderRight=`2px solid ${o}`,A){const p=Object.values(y);p.includes(E)&&(e.borderLeft="3px dashed #fff"),p.includes(R)&&(e.borderRight="3px dashed #fff")}_(()=>{l===a&&g({selectedRegion:{}})},c,["contextmenu"]);const j=l===a&&n.loop,L=t.createElement("div",{style:e,ref:c,className:D({[r.container]:!0})},j&&t.createElement("div",{className:r.loop},t.createElement("img",{src:F})),b&&t.createElement("div",null,t.createElement("div",{style:u,className:r.attribute},T(s,[{value:"",key:"\u65E0\u5C5E\u6027"},...i]))),x&&t.createElement(I,{ellipsis:{rows:2},className:r.text,style:u},"\u6587\u672C:",v));return t.createElement(t.Fragment,null,S.createPortal(L,C))};export{M as default};
@@ -1 +1 @@
1
- import g,{useRef as R,useEffect as v}from"react";import{useAudioClipStore as C}from"../../audioAnnotate/audioContext/index.js";import{timeFormat as d}from"../../../utils/audio.js";import x from"../index.module.scss.js";const y=a=>{var e,n,o,l;const s=R(null),{getRegionInstanceById:i,clipping:m}=a,{audioClipState:f}=C(),{selectedRegion:p}=f,{id:t}=p,{start:r,end:u}=(e=i==null?void 0:i(t!=null?t:""))!=null?e:{};if(v(()=>{s.current=document.querySelector(`[data-id=${t}]`)},[t]),[t,m,r,u].some(c=>!c&&c!==0))return null;const S=(l=(o=(n=s.current)==null?void 0:n.getBoundingClientRect())==null?void 0:o.left)!=null?l:0;return g.createElement("div",{className:x.tips,style:{left:S,top:75}},d(r,"ss.SSS")," - ",d(u,"ss.SSS"))};export{y as default};
1
+ import g,{useRef as R,useEffect as _}from"react";import{useAudioClipStore as v}from"../../audioAnnotate/audioContext/index.js";import{timeFormat as d}from"../../../utils/audio.js";import C from"../index.module.scss.js";const x=a=>{var e,n,o,l;const s=R(null),{getRegionInstanceById:i,clipping:f}=a,{audioClipState:m}=v(),{selectedRegion:p}=m,{id:t}=p,{start:u,end:r}=(e=i==null?void 0:i(t!=null?t:""))!=null?e:{};if(_(()=>{s.current=document.querySelector(`[data-id=${t}]`)},[t]),[t,f,u,r].some(c=>!c&&c!==0))return null;const S=(l=(o=(n=s.current)==null?void 0:n.getBoundingClientRect())==null?void 0:o.left)!=null?l:0;return g.createElement("div",{className:C.tips,style:{left:S,top:75}},d(u,"ss.SSS")," - ",d(r,"ss.SSS"))};export{x as default};
@@ -1 +1 @@
1
- import a from"react";import{useAudioClipStore as c}from"../../audioAnnotate/audioContext/index.js";import{useMouse as m,useHover as u}from"ahooks";import l from"../index.module.scss.js";import{useTranslation as p}from"react-i18next";const d=e=>{const{t:i}=p(),{container:o}=e,{audioClipState:s}=c(),{combined:n}=s,t=m(o),r=u(o);return!o||!n||!r?null:a.createElement("div",{className:l.tips,style:{left:t.clientX+20,top:t.clientY-20}},i("AudioCombineTip"))};export{d as default};
1
+ import a from"react";import{useAudioClipStore as c}from"../../audioAnnotate/audioContext/index.js";import{useMouse as m,useHover as u}from"ahooks";import l from"../index.module.scss.js";import{useTranslation as d}from"react-i18next";const p=e=>{const{t:i}=d(),{container:t}=e,{audioClipState:s}=c(),{combined:n}=s,o=m(t),r=u(t);return!t||!n||!r?null:a.createElement("div",{className:l.tips,style:{left:o.clientX+20,top:o.clientY-20}},i("AudioCombineTip"))};export{p as default};
@@ -1 +1 @@
1
- import e,{useRef as a}from"react";import m from"../../../assets/annotation/audio/progressDot.svg.js";import n from"../../../assets/annotation/audio/progressDotA.svg.js";import i from"./index.module.scss.js";import{useHover as g}from"ahooks";const l=o=>{const s=a(null),t=g(s),{playPercentage:r}=o;return e.createElement("div",{className:i.progressDot,style:{left:r},ref:s},e.createElement("img",{src:t?n:m,draggable:!1}))};export{l as default};
1
+ import e,{useRef as a}from"react";import m from"../../../assets/annotation/audio/progressDot.svg.js";import n from"../../../assets/annotation/audio/progressDotA.svg.js";import i from"./index.module.scss.js";import{useHover as l}from"ahooks";const g=o=>{const s=a(null),t=l(s),{playPercentage:r}=o;return e.createElement("div",{className:i.progressDot,style:{left:r},ref:s},e.createElement("img",{src:t?n:m,draggable:!1}))};export{g as default};
@@ -1 +1 @@
1
- import t,{useEffect as p}from"react";import{ZoomOutOutlined as y,ZoomInOutlined as E}from"@ant-design/icons";import{Slider as k}from"antd";import{precisionAdd as v,precisionMinus as x}from"../../../utils/audio.js";import{cKeyCode as C}from"@labelbee/lb-annotation";import{useLatest as h}from"ahooks";import Z from"./index.module.scss.js";import{useTranslation as b}from"react-i18next";const l=C.default,o={min:1,max:150,ratio:1},g=d=>{const{onChange:u,zoom:r}=d,{t:f}=b(),i=h(r),n=e=>{u(e)},s={fontSize:14,margin:"0 8px",cursor:"pointer"},a=()=>{const e=v(i.current,o.ratio);n(e)},c=()=>{const e=x(i.current,o.ratio);n(e)},m=e=>{switch(e.keyCode){case l.I:e.ctrlKey&&a();break;case l.O:e.ctrlKey&&(e.preventDefault(),c());break}};return p(()=>(document.addEventListener("keydown",m),()=>{document.removeEventListener("keydown",m)}),[]),t.createElement("div",{className:Z.sliderContainer},t.createElement("div",null,f("Scale")),t.createElement(y,{style:s,onClick:c}),t.createElement("div",{style:{width:120}},t.createElement(k,{min:o.min,max:o.max,step:o.ratio,onChange:n,value:r})),t.createElement(E,{style:s,onClick:a}))};export{o as audioZoomInfo,g as default};
1
+ import t,{useEffect as p}from"react";import{ZoomOutOutlined as y,ZoomInOutlined as E}from"@ant-design/icons";import{Slider as k}from"antd";import{precisionAdd as v,precisionMinus as x}from"../../../utils/audio.js";import{cKeyCode as C}from"@labelbee/lb-annotation";import{useLatest as h}from"ahooks";import Z from"./index.module.scss.js";import{useTranslation as b}from"react-i18next";const l=C.default,o={min:1,max:150,ratio:1},g=d=>{const{onChange:u,zoom:r}=d,{t:f}=b(),i=h(r),n=e=>{u(e)},a={fontSize:14,margin:"0 8px",cursor:"pointer"},s=()=>{const e=v(i.current,o.ratio);n(e)},c=()=>{const e=x(i.current,o.ratio);n(e)},m=e=>{switch(e.keyCode){case l.I:e.ctrlKey&&s();break;case l.O:e.ctrlKey&&(e.preventDefault(),c());break}};return p(()=>(document.addEventListener("keydown",m),()=>{document.removeEventListener("keydown",m)}),[]),t.createElement("div",{className:Z.sliderContainer},t.createElement("div",null,f("Scale")),t.createElement(y,{style:a,onClick:c}),t.createElement("div",{style:{width:120}},t.createElement(k,{min:o.min,max:o.max,step:o.ratio,onChange:n,value:r})),t.createElement(E,{style:a,onClick:s}))};export{o as audioZoomInfo,g as default};
@@ -1 +1 @@
1
- import{Checkbox as u}from"antd/es";import e from"react";const o=t=>{const a=e.useRef(null),s=t.list||[];return e.createElement("div",{className:"sensebee-checkbox-group"},e.createElement(u.Group,{name:"checkboxgroup",value:t.selectedAttribute,onChange:()=>t.attributeChanged()},s.map((l,c)=>{var n;return e.createElement(u,{value:l.value,ref:a,onFocus:()=>{var r;(r=a==null?void 0:a.current)==null||r.blur()},key:c},e.createElement("span",{className:"sensebee-checkbox-label",title:l.label},l.label),e.createElement("span",{className:"sensebee-checkbox-num"},(n=t==null?void 0:t.num)!=null?n:c))})))};export{o as default};
1
+ import{Checkbox as r}from"antd/es";import e from"react";const o=t=>{const a=e.useRef(null),s=t.list||[];return e.createElement("div",{className:"sensebee-checkbox-group"},e.createElement(r.Group,{name:"checkboxgroup",value:t.selectedAttribute,onChange:()=>t.attributeChanged()},s.map((l,c)=>{var n;return e.createElement(r,{value:l.value,ref:a,onFocus:()=>{var u;(u=a==null?void 0:a.current)==null||u.blur()},key:c},e.createElement("span",{className:"sensebee-checkbox-label",title:l.label},l.label),e.createElement("span",{className:"sensebee-checkbox-num"},(n=t==null?void 0:t.num)!=null?n:c))})))};export{o as default};
@@ -1 +1 @@
1
- import c from"react";import{RgbaColorPicker as a}from"react-colorful";import{toRGBAObj as s,toRGBAStr as m}from"../../utils/colorUtils.js";const n=o=>{const{setColor:t,defaultColor:r}=o;return c.createElement(a,{color:s(r),onChange:e=>{const l=m(e);t(l)}})};export{n as default};
1
+ import c from"react";import{RgbaColorPicker as a}from"react-colorful";import{toRGBAObj as s,toRGBAStr as f}from"../../utils/colorUtils.js";const m=o=>{const{setColor:t,defaultColor:r}=o;return c.createElement(a,{color:s(r),onChange:e=>{const l=f(e);t(l)}})};export{m as default};
@@ -1 +1 @@
1
- import{componentCls as i}from"../../../constant/index.js";import n from"react";var p=Object.defineProperty,v=Object.defineProperties,d=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,s=(e,r,t)=>r in e?p(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,O=(e,r)=>{for(var t in r||(r={}))c.call(r,t)&&s(e,t,r[t]);if(o)for(var t of o(r))l.call(r,t)&&s(e,t,r[t]);return e},P=(e,r)=>v(e,d(r)),g=(e,r)=>{var t={};for(var a in e)c.call(e,a)&&r.indexOf(a)<0&&(t[a]=e[a]);if(e!=null&&o)for(var a of o(e))r.indexOf(a)<0&&l.call(e,a)&&(t[a]=e[a]);return t};const y=e=>{const r=e,{Icon:t,text:a,iconChildren:f}=r,m=g(r,["Icon","text","iconChildren"]),_=e.marginLeft===void 0?30:e.marginLeft;return n.createElement("div",P(O({},m),{className:i}),n.createElement("div",{className:`${i}__iconWithText`,style:{marginLeft:_}},n.createElement("div",{className:"iconGroup"},n.createElement(t,{className:"icon"}),f),n.createElement("span",{className:"name"},a)))};export{y as default};
1
+ import{componentCls as i}from"../../../constant/index.js";import n from"react";var p=Object.defineProperty,v=Object.defineProperties,d=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,s=(e,r,t)=>r in e?p(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,O=(e,r)=>{for(var t in r||(r={}))l.call(r,t)&&s(e,t,r[t]);if(o)for(var t of o(r))c.call(r,t)&&s(e,t,r[t]);return e},P=(e,r)=>v(e,d(r)),g=(e,r)=>{var t={};for(var a in e)l.call(e,a)&&r.indexOf(a)<0&&(t[a]=e[a]);if(e!=null&&o)for(var a of o(e))r.indexOf(a)<0&&c.call(e,a)&&(t[a]=e[a]);return t};const y=e=>{const r=e,{Icon:t,text:a,iconChildren:f}=r,m=g(r,["Icon","text","iconChildren"]),_=e.marginLeft===void 0?30:e.marginLeft;return n.createElement("div",P(O({},m),{className:i}),n.createElement("div",{className:`${i}__iconWithText`,style:{marginLeft:_}},n.createElement("div",{className:"iconGroup"},n.createElement(t,{className:"icon"}),f),n.createElement("span",{className:"name"},a)))};export{y as default};
@@ -1,2 +1,2 @@
1
- import r from"react";import{uuid as l}from"@labelbee/lb-annotation";import m from"diff-match-patch";const c={added:{color:"#36B34A",backgroundColor:"#D9FFDF"},removed:{color:"#F26549",backgroundColor:"#FFD9D9",textDecoration:"line-through"}},s=({originString:f="",currentString:i=""})=>{const d=new m().diff_main(f,i).map(n=>{const e=n[0];let t=n[1];if((e===-1||e===1)&&!/\S/.test(t)){const a=t.match(/(\S)*(\r\n|\r|\n)/g);a&&(e===-1&&(t="\u21B5".repeat(a.length)),e===1&&(t=`\u21B5
2
- `.repeat(a.length)))}let o;return e===1&&(o=c.added),e===-1&&(o=c.removed),r.createElement("span",{style:o,key:l()},t)});return r.createElement("span",{style:{whiteSpace:"pre-wrap"}},d)};export{s as default};
1
+ import r from"react";import{uuid as l}from"@labelbee/lb-annotation";import m from"diff-match-patch";const c={added:{color:"#36B34A",backgroundColor:"#D9FFDF"},removed:{color:"#F26549",backgroundColor:"#FFD9D9",textDecoration:"line-through"}},s=({originString:f="",currentString:d=""})=>{const i=new m().diff_main(f,d).map(n=>{const e=n[0];let t=n[1];if((e===-1||e===1)&&!/\S/.test(t)){const a=t.match(/(\S)*(\r\n|\r|\n)/g);a&&(e===-1&&(t="\u21B5".repeat(a.length)),e===1&&(t=`\u21B5
2
+ `.repeat(a.length)))}let o;return e===1&&(o=c.added),e===-1&&(o=c.removed),r.createElement("span",{style:o,key:l()},t)});return r.createElement("span",{style:{whiteSpace:"pre-wrap"}},i)};export{s as default};
@@ -1 +1 @@
1
- import{ReloadOutlined as g}from"@ant-design/icons";import{Button as p}from"antd/es";import e from"react";import{useTranslation as u}from"react-i18next";const y=n=>{const{width:o,height:i,reloadImage:a,hideSetInvalidTips:s,ignoreOffsetY:c,backgroundColor:r,fileType:m="image"}=n,{t:l}=u(),d=c?0:40,t=n.layerStyle||{position:"absolute",left:0,top:d,cursor:"initial",zIndex:20,fontSize:12};o&&i?Object.assign(t,{width:o,height:i}):Object.assign(t,{bottom:0,right:0}),r&&Object.assign(t,{backgroundColor:r});const f={position:"absolute",top:"30%",left:"50%",transform:"translate(-50%, -50%)"};return e.createElement("div",{style:t},e.createElement("div",{style:f},e.createElement("div",{style:{textAlign:"center",marginBottom:10}},e.createElement(p,{type:"primary",shape:"circle",icon:e.createElement(g,null),onClick:a})),e.createElement("div",null,`${l(`${m}ErrorAndReload`)}${s?"":l("orMaskAsInvalid")}`)))};export{y as default};
1
+ import{ReloadOutlined as u}from"@ant-design/icons";import{Button as g}from"antd/es";import e from"react";import{useTranslation as p}from"react-i18next";const y=n=>{const{width:o,height:i,reloadImage:a,hideSetInvalidTips:s,ignoreOffsetY:c,backgroundColor:r,fileType:m="image"}=n,{t:l}=p(),d=c?0:40,t=n.layerStyle||{position:"absolute",left:0,top:d,cursor:"initial",zIndex:20,fontSize:12};o&&i?Object.assign(t,{width:o,height:i}):Object.assign(t,{bottom:0,right:0}),r&&Object.assign(t,{backgroundColor:r});const f={position:"absolute",top:"30%",left:"50%",transform:"translate(-50%, -50%)"};return e.createElement("div",{style:t},e.createElement("div",{style:f},e.createElement("div",{style:{textAlign:"center",marginBottom:10}},e.createElement(g,{type:"primary",shape:"circle",icon:e.createElement(u,null),onClick:a})),e.createElement("div",null,`${l(`${m}ErrorAndReload`)}${s?"":l("orMaskAsInvalid")}`)))};export{y as default};
@@ -1 +1 @@
1
- import i from"react";import{useTranslation as r}from"react-i18next";const a=({fileType:t="image",isValid:e})=>{const{t:n}=r();return e?null:i.createElement("div",{style:{position:"absolute",inset:0,color:"white",display:"flex",alignItems:"center",fontSize:30,opacity:.7,background:"rgba(255, 87, 34, 1)",justifyContent:"center"}},n(`${t}InvalidAndSkip`))};export{a as default};
1
+ import i from"react";import{useTranslation as a}from"react-i18next";const r=({fileType:t="image",isValid:e})=>{const{t:n}=a();return e?null:i.createElement("div",{style:{position:"absolute",inset:0,color:"white",display:"flex",alignItems:"center",fontSize:30,opacity:.7,background:"rgba(255, 87, 34, 1)",justifyContent:"center"}},n(`${t}InvalidAndSkip`))};export{r as default};
@@ -1 +1 @@
1
- import a from"react";import n from"./FileError.js";import p from"./FileInvalid.js";var f=Object.defineProperty,l=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,i=(t,r,e)=>r in t?f(t,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[r]=e,o=(t,r)=>{for(var e in r||(r={}))m.call(r,e)&&i(t,e,r[e]);if(l)for(var e of l(r))c.call(r,e)&&i(t,e,r[e]);return t};const u=({invalidProps:t,errorProps:r,fileType:e})=>t.isValid?r.isError?a.createElement(n,o({},o({fileType:e},r))):null:a.createElement(p,o({},o({fileType:e},t)));export{u as default};
1
+ import a from"react";import n from"./FileError.js";import f from"./FileInvalid.js";var p=Object.defineProperty,l=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,i=(t,r,e)=>r in t?p(t,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[r]=e,o=(t,r)=>{for(var e in r||(r={}))m.call(r,e)&&i(t,e,r[e]);if(l)for(var e of l(r))u.call(r,e)&&i(t,e,r[e]);return t};const _=({invalidProps:t,errorProps:r,fileType:e})=>t.isValid?r.isError?a.createElement(n,o({},o({fileType:e},r))):null:a.createElement(f,o({},o({fileType:e},t)));export{_ as default};
@@ -1 +1 @@
1
- import a from"react";const r=o=>{const{width:e,height:i,isVideo:n,isAudio:s}=o,u=n?"\u89C6\u9891":s?"\u97F3\u9891":"\u56FE\u7247",t={position:"absolute",left:0,top:0,background:"rgba(255, 87, 34, 1)",overflow:"hidden",color:"white",display:"flex",justifyContent:"center",alignItems:"center",fontSize:30,opacity:.7,zIndex:10,cursor:"initial"};return e&&i?Object.assign(t,{width:e,height:i}):Object.assign(t,{bottom:0,right:0}),a.createElement("div",{style:t},`\u65E0\u6548${u}\uFF0C\u8BF7\u8DF3\u8FC7`)};export{r as default};
1
+ import a from"react";const r=o=>{const{width:e,height:i,isVideo:n,isAudio:u}=o,s=n?"\u89C6\u9891":u?"\u97F3\u9891":"\u56FE\u7247",t={position:"absolute",left:0,top:0,background:"rgba(255, 87, 34, 1)",overflow:"hidden",color:"white",display:"flex",justifyContent:"center",alignItems:"center",fontSize:30,opacity:.7,zIndex:10,cursor:"initial"};return e&&i?Object.assign(t,{width:e,height:i}):Object.assign(t,{bottom:0,right:0}),a.createElement("div",{style:t},`\u65E0\u6548${s}\uFF0C\u8BF7\u8DF3\u8FC7`)};export{r as default};
@@ -1 +1 @@
1
- import n,{useState as N,useRef as x}from"react";import{Dropdown as $,Spin as w,Tooltip as L,Button as f}from"antd";import{RightOutlined as A}from"@ant-design/icons";import{latexList as k}from"./constant/config.js";import y from"../markdownView/index.js";import o from"./index.module.scss.js";import E from"classnames";import{useTranslation as h}from"react-i18next";const C=({data:i,columnIndex:p,onSelectLatex:v,setActiveKeys:c,activeKeys:s,getInitActiveKey:u,disabled:d})=>{var a,t;const{t:r}=h();return((a=i==null?void 0:i.children)==null?void 0:a.some(e=>!(e==null?void 0:e.children)))&&(i==null?void 0:i.children)?n.createElement("div",{className:o.lastNode},i.children.map(e=>{const m=` $$${e.key}$$ `;return(e==null?void 0:e.remark)?n.createElement(L,{placement:"top",title:e==null?void 0:e.remark,key:e.key},n.createElement(f,{key:e.key,className:o.markdownItem,onClick:()=>{v(m)},disabled:d},n.createElement(y,{value:m}))):n.createElement(f,{key:e.key,className:o.markdownItem,onClick:()=>{v(m)},disabled:d},n.createElement(y,{value:m}))})):n.createElement("div",{className:o.itemList},(t=i==null?void 0:i.children)==null?void 0:t.map(e=>n.createElement("div",{key:e.key,onClick:()=>{const m=u(e),g=[...s.slice(0,p+1),...m];c(g)},className:E({[`${o.item}`]:!0,[`${o.itemActive}`]:s.includes(e.key)})},r(e.label||""),n.createElement(A,{style:{marginLeft:4,fontSize:10}}))))},I=({onSelectLatex:i,disabled:p})=>{const{t:v}=h(),[c,s]=N([]),u=x(null),d=(t,r)=>{for(const l of t){if((l==null?void 0:l.key)===r)return l;if(l==null?void 0:l.children){const e=d(l.children,r);if(e)return e}}return null},a=(t,r=[])=>{var l;const e=r;return e.push(t.key),(t==null?void 0:t.children)&&((l=t==null?void 0:t.children)==null?void 0:l.length)>0&&a(t.children[0],e),e};return n.createElement("div",{className:o.latexEditor,ref:u},k.map(t=>n.createElement($,{dropdownRender:()=>n.createElement(w,{spinning:c.length===0},n.createElement("div",{className:o.dropContent},c.map((r,l)=>{const e=d(k,r);return n.createElement("div",{key:r},n.createElement(C,{data:e,columnIndex:l,onSelectLatex:i,setActiveKeys:s,activeKeys:c,getInitActiveKey:a,disabled:p}))}))),key:t.key,className:E({[`${o.latexHeaderTitle}`]:!0,[`${o.itemActive}`]:c.includes(t.key)}),getPopupContainer:()=>(u==null?void 0:u.current)||document.body,trigger:["click"],onOpenChange:r=>{if(r){const l=a(t);s(l)}else s([])}},n.createElement("span",null,v(t.label)))))};export{I as default};
1
+ import n,{useState as N,useRef as x}from"react";import{Dropdown as $,Spin as w,Tooltip as L,Button as p}from"antd";import{RightOutlined as A}from"@ant-design/icons";import{latexList as k}from"./constant/config.js";import y from"../markdownView/index.js";import o from"./index.module.scss.js";import E from"classnames";import{useTranslation as h}from"react-i18next";const C=({data:i,columnIndex:f,onSelectLatex:v,setActiveKeys:c,activeKeys:s,getInitActiveKey:u,disabled:d})=>{var a,t;const{t:r}=h();return((a=i==null?void 0:i.children)==null?void 0:a.some(e=>!(e==null?void 0:e.children)))&&(i==null?void 0:i.children)?n.createElement("div",{className:o.lastNode},i.children.map(e=>{const m=` $$${e.key}$$ `;return(e==null?void 0:e.remark)?n.createElement(L,{placement:"top",title:e==null?void 0:e.remark,key:e.key},n.createElement(p,{key:e.key,className:o.markdownItem,onClick:()=>{v(m)},disabled:d},n.createElement(y,{value:m}))):n.createElement(p,{key:e.key,className:o.markdownItem,onClick:()=>{v(m)},disabled:d},n.createElement(y,{value:m}))})):n.createElement("div",{className:o.itemList},(t=i==null?void 0:i.children)==null?void 0:t.map(e=>n.createElement("div",{key:e.key,onClick:()=>{const m=u(e),g=[...s.slice(0,f+1),...m];c(g)},className:E({[`${o.item}`]:!0,[`${o.itemActive}`]:s.includes(e.key)})},r(e.label||""),n.createElement(A,{style:{marginLeft:4,fontSize:10}}))))},I=({onSelectLatex:i,disabled:f})=>{const{t:v}=h(),[c,s]=N([]),u=x(null),d=(t,r)=>{for(const l of t){if((l==null?void 0:l.key)===r)return l;if(l==null?void 0:l.children){const e=d(l.children,r);if(e)return e}}return null},a=(t,r=[])=>{var l;const e=r;return e.push(t.key),(t==null?void 0:t.children)&&((l=t==null?void 0:t.children)==null?void 0:l.length)>0&&a(t.children[0],e),e};return n.createElement("div",{className:o.latexEditor,ref:u},k.map(t=>n.createElement($,{dropdownRender:()=>n.createElement(w,{spinning:c.length===0},n.createElement("div",{className:o.dropContent},c.map((r,l)=>{const e=d(k,r);return n.createElement("div",{key:r},n.createElement(C,{data:e,columnIndex:l,onSelectLatex:i,setActiveKeys:s,activeKeys:c,getInitActiveKey:a,disabled:f}))}))),key:t.key,className:E({[`${o.latexHeaderTitle}`]:!0,[`${o.itemActive}`]:c.includes(t.key)}),getPopupContainer:()=>(u==null?void 0:u.current)||document.body,trigger:["click"],onOpenChange:r=>{if(r){const l=a(t);s(l)}else s([])}},n.createElement("span",null,v(t.label)))))};export{I as default};