@labelbee/lb-components 1.19.0-alpha.2 → 1.19.0-alpha.4

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 (40) hide show
  1. package/dist/assets/annotation/LLMTool/imgFail_cn.svg.js +1 -0
  2. package/dist/assets/annotation/LLMTool/imgFail_en.svg.js +1 -0
  3. package/dist/components/LLMToolView/index.js +1 -1
  4. package/dist/components/LLMToolView/modelAPIView/index.js +1 -1
  5. package/dist/components/LLMToolView/questionView/components/header/index.js +1 -0
  6. package/dist/components/LLMToolView/questionView/components/imgView/index.js +1 -0
  7. package/dist/components/LLMToolView/questionView/components/imgView/index.module.scss.js +1 -0
  8. package/dist/components/LLMToolView/questionView/index.js +1 -1
  9. package/dist/components/LLMToolView/sidebar/components/answerList/index.js +1 -1
  10. package/dist/components/LLMToolView/sidebar/components/answerSort/index.js +1 -1
  11. package/dist/components/LLMToolView/sidebar/components/textEditor/index.js +1 -1
  12. package/dist/components/LLMToolView/sidebar/index.js +1 -1
  13. package/dist/components/LLMToolView/utils/data.js +1 -1
  14. package/dist/constant/index.js +1 -1
  15. package/dist/index.css +31 -1
  16. package/dist/index.js +1 -1
  17. package/dist/types/components/LLMToolView/modelAPIView/index.d.ts +1 -1
  18. package/dist/types/components/LLMToolView/questionView/components/header/index.d.ts +16 -0
  19. package/dist/types/components/LLMToolView/questionView/components/imgView/index.d.ts +8 -0
  20. package/dist/types/components/LLMToolView/questionView/index.d.ts +8 -2
  21. package/dist/types/components/LLMToolView/types.d.ts +2 -0
  22. package/dist/types/constant/index.d.ts +5 -0
  23. package/dist/types/store/ctx.d.ts +1 -1
  24. package/es/assets/annotation/LLMTool/imgFail_cn.svg.js +1 -0
  25. package/es/assets/annotation/LLMTool/imgFail_en.svg.js +1 -0
  26. package/es/components/LLMToolView/index.js +1 -1
  27. package/es/components/LLMToolView/modelAPIView/index.js +1 -1
  28. package/es/components/LLMToolView/questionView/components/header/index.js +1 -0
  29. package/es/components/LLMToolView/questionView/components/imgView/index.js +1 -0
  30. package/es/components/LLMToolView/questionView/components/imgView/index.module.scss.js +1 -0
  31. package/es/components/LLMToolView/questionView/index.js +1 -1
  32. package/es/components/LLMToolView/sidebar/components/answerList/index.js +1 -1
  33. package/es/components/LLMToolView/sidebar/components/answerSort/index.js +1 -1
  34. package/es/components/LLMToolView/sidebar/components/textEditor/index.js +1 -1
  35. package/es/components/LLMToolView/sidebar/index.js +1 -1
  36. package/es/components/LLMToolView/utils/data.js +1 -1
  37. package/es/constant/index.js +1 -1
  38. package/es/index.css +31 -1
  39. package/es/index.js +1 -1
  40. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ "use strict";var img="data:image/svg+xml,%3csvg width='381' height='221' viewBox='0 0 381 221' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3crect width='381' height='221' fill='%23E9EBF1' /%3e %3cpath d='M151.892 166.858L152.368 166.144C154.244 166.354 156.638 166.886 157.996 167.348L157.52 168.118C156.204 167.642 153.796 167.082 151.892 166.858ZM153.278 165.094L153.698 164.464C154.818 164.688 156.218 165.136 157.002 165.486L156.568 166.186C155.798 165.808 154.384 165.332 153.278 165.094ZM153.39 161.048L153.306 161.132C153.768 161.636 154.37 162.098 155.084 162.504C155.84 162.07 156.498 161.58 157.002 161.048H153.39ZM157.87 160.194L158.458 160.558C157.87 161.482 156.988 162.28 155.966 162.952C157.03 163.456 158.262 163.834 159.48 164.058C159.298 164.24 159.032 164.604 158.906 164.842C157.59 164.562 156.274 164.086 155.112 163.456C153.796 164.17 152.34 164.688 150.968 164.996C150.87 164.758 150.646 164.352 150.478 164.142C151.71 163.918 153.04 163.484 154.23 162.938C153.67 162.56 153.152 162.14 152.718 161.692C152.298 162.07 151.878 162.406 151.444 162.686C151.29 162.518 150.94 162.196 150.73 162.056C151.92 161.356 153.11 160.278 153.81 159.144L154.664 159.424C154.51 159.704 154.314 159.97 154.104 160.236H157.702L157.87 160.194ZM150.226 168.566H159.76V158.85H150.226V168.566ZM149.218 157.898H160.782V170.078H159.76V169.49H150.226V170.078H149.218V157.898ZM165.626 161.944V162.28C165.626 162.91 165.612 163.54 165.57 164.17H172.444V170.064H171.338V165.234H165.458C165.234 166.984 164.688 168.678 163.4 170.092C163.232 169.84 162.84 169.462 162.602 169.28C164.366 167.306 164.562 164.73 164.562 162.294V157.66H165.626V160.894H169.588V157.31H170.68V160.894H174.6V161.944H165.626ZM182.888 159.83V160.376C182.622 166.452 182.398 168.524 181.894 169.168C181.614 169.546 181.348 169.658 180.942 169.7C180.578 169.756 180.004 169.756 179.416 169.714C179.388 169.392 179.276 168.944 179.108 168.65C179.696 168.706 180.228 168.72 180.48 168.72C180.704 168.72 180.83 168.664 180.97 168.482C181.362 168.034 181.614 166.102 181.838 160.852H179.864C179.696 164.352 179.178 167.838 177.428 170.008C177.232 169.77 176.882 169.462 176.602 169.308C178.24 167.362 178.702 164.114 178.842 160.852H176.91V159.83H178.87C178.898 158.976 178.898 158.122 178.898 157.324H179.934C179.934 158.136 179.92 158.976 179.892 159.83H182.888ZM184.96 167.838H187.676V160.04H184.96V167.838ZM183.938 159.032H188.74V169.77H187.676V168.846H184.96V169.868H183.938V159.032ZM202.74 159.354L201.97 159.9C201.648 159.382 200.906 158.612 200.276 158.066L201.018 157.59C201.648 158.08 202.418 158.836 202.74 159.354ZM198.176 167.054V167.922C197.336 168.02 196.496 168.104 195.656 168.188V170.022H194.676V168.272C193.318 168.412 192.058 168.538 191.05 168.65L190.938 167.684C191.932 167.614 193.234 167.502 194.676 167.376V165.99H192.856C192.282 165.99 191.862 166.074 191.736 166.186C191.68 165.976 191.54 165.486 191.414 165.234C191.624 165.192 191.834 164.912 192.058 164.534C192.17 164.366 192.352 163.988 192.59 163.526H191.008V162.672H192.968C193.164 162.238 193.346 161.776 193.486 161.314L194.508 161.594C194.368 161.958 194.214 162.322 194.046 162.672H198.162V163.526H193.64C193.346 164.086 193.038 164.632 192.744 165.094H194.676V163.96H195.656V165.094H197.868V165.99H195.656V167.292C196.482 167.222 197.35 167.138 198.176 167.054ZM201.704 162L202.642 162.266C202.152 163.988 201.438 165.64 200.528 167.068C200.92 168.272 201.438 168.944 202.04 168.944C202.39 168.944 202.53 168.342 202.614 166.704C202.824 166.942 203.174 167.138 203.426 167.236C203.258 169.322 202.922 169.952 201.956 169.952C201.046 169.952 200.36 169.252 199.842 168.062C199.24 168.832 198.568 169.518 197.826 170.106C197.658 169.882 197.35 169.574 197.098 169.392C197.994 168.762 198.778 167.922 199.45 166.956C199.03 165.458 198.764 163.498 198.638 161.286H190.798V160.446H194.172V159.256H191.512V158.416H194.172V157.296H195.166V158.416H197.63V159.256H195.166V160.446H198.596C198.54 159.452 198.512 158.388 198.512 157.324H199.534C199.52 158.416 199.534 159.466 199.576 160.446H203.258V161.286H199.632C199.73 163.022 199.926 164.548 200.178 165.78C200.822 164.618 201.354 163.316 201.704 162ZM217.216 164.576H211.896C212.862 166.928 214.696 168.482 217.538 169.112C217.3 169.336 217.006 169.77 216.838 170.064C213.94 169.308 212.106 167.614 211.028 165.01C210.384 167.012 208.844 168.846 205.274 170.078C205.176 169.826 204.854 169.392 204.63 169.182C208.004 168.048 209.432 166.382 210.02 164.576H204.798V163.54H210.258C210.37 162.896 210.398 162.252 210.398 161.608V160.768H207.262C206.842 161.608 206.38 162.364 205.89 162.966C205.666 162.798 205.162 162.532 204.882 162.42C205.96 161.23 206.828 159.382 207.332 157.492L208.424 157.73C208.228 158.416 208.004 159.088 207.724 159.732H210.398V157.296H211.462V159.732H216.026V160.768H211.462V161.608C211.462 162.252 211.434 162.896 211.35 163.54H217.216V164.576ZM220.156 158.906V166.424H219.288V157.968H224.23V166.382H223.32V158.906H220.156ZM222.214 159.858V163.61C222.214 165.682 221.892 168.384 219.232 170.064C219.092 169.868 218.812 169.546 218.588 169.364C221.122 167.908 221.304 165.402 221.304 163.61V159.858H222.214ZM222.06 167.194L222.788 166.76C223.404 167.53 224.188 168.566 224.566 169.196L223.796 169.728C223.432 169.084 222.662 167.992 222.06 167.194ZM229.326 160.684H226.708C226.568 161.104 226.4 161.51 226.218 161.902C226.624 163.372 227.184 164.744 227.926 165.934C228.612 164.576 229.088 162.868 229.326 160.684ZM231.202 160.684H230.222C229.942 163.246 229.354 165.234 228.5 166.774C229.326 167.866 230.306 168.734 231.44 169.28C231.23 169.462 230.95 169.826 230.782 170.05C229.704 169.476 228.766 168.636 227.982 167.614C227.226 168.706 226.302 169.504 225.252 170.078C225.14 169.854 224.818 169.476 224.622 169.322C225.728 168.748 226.652 167.936 227.408 166.816C226.68 165.724 226.106 164.436 225.658 163.05C225.476 163.344 225.294 163.638 225.126 163.89C225 163.694 224.678 163.246 224.482 163.05C225.476 161.678 226.204 159.564 226.624 157.408L227.576 157.618C227.422 158.332 227.24 159.046 227.03 159.732H231.202V160.684Z' fill='%23999999' /%3e %3cpath d='M205 85.625C205 87.1168 205.593 88.5476 206.648 89.6025C207.702 90.6574 209.133 91.25 210.625 91.25C212.117 91.25 213.548 90.6574 214.602 89.6025C215.657 88.5476 216.25 87.1168 216.25 85.625C216.25 84.1332 215.657 82.7024 214.602 81.6475C213.548 80.5926 212.117 80 210.625 80C209.133 80 207.702 80.5926 206.648 81.6475C205.593 82.7024 205 84.1332 205 85.625Z' fill='black' fill-opacity='0.1' /%3e %3cpath d='M228.117 69.11C227.901 68.8622 227.638 68.6593 227.344 68.513C227.05 68.3668 226.73 68.2799 226.402 68.2575L190.762 65.765C190.358 65.7338 189.954 65.8023 189.583 65.9645C189.212 66.1266 188.887 66.3775 188.637 66.695L181.434 75.6675C181.069 76.1225 180.874 76.691 180.883 77.2745C180.893 77.858 181.106 78.4198 181.487 78.8625L192.904 92.14L181.384 107.347L184.234 93.8025C184.329 93.3529 184.298 92.8858 184.144 92.4528C183.991 92.0197 183.721 91.6372 183.364 91.3475L168.407 79.18L174.627 69.36C174.874 68.9694 175.008 68.5179 175.014 68.0557C175.019 67.5936 174.897 67.1388 174.66 66.742C174.423 66.3452 174.081 66.0219 173.671 65.8079C173.261 65.594 172.8 65.4978 172.339 65.53L153.574 66.84C153.247 66.8629 152.927 66.9501 152.633 67.0966C152.339 67.2432 152.076 67.4463 151.861 67.6942C151.645 67.9422 151.481 68.2302 151.377 68.5418C151.273 68.8533 151.231 69.1823 151.254 69.51L155.614 131.855C155.638 132.183 155.726 132.504 155.873 132.798C156.02 133.093 156.224 133.355 156.473 133.57C156.722 133.786 157.011 133.95 157.324 134.054C157.636 134.158 157.966 134.199 158.294 134.175L172.084 133.145C173.462 133.042 174.494 131.842 174.389 130.467C174.284 129.092 173.094 128.042 171.709 128.16L160.424 129.002L159.922 121.775L169.712 120.792C170.039 120.76 170.356 120.663 170.645 120.508C170.935 120.353 171.191 120.142 171.399 119.888C171.607 119.634 171.763 119.341 171.858 119.026C171.953 118.712 171.985 118.382 171.952 118.055C171.883 117.396 171.557 116.791 171.044 116.372C170.531 115.952 169.874 115.752 169.214 115.815L159.574 116.785L156.417 71.655L167.757 70.8625L162.994 78.38C162.667 78.8971 162.54 79.5164 162.639 80.1204C162.738 80.7245 163.054 81.2714 163.529 81.6575L179.029 94.2625L174.439 116.082C174.365 116.466 174.385 116.861 174.497 117.235C174.482 117.527 174.519 117.819 174.607 118.097L178.632 130.172C178.785 130.634 179.07 131.04 179.451 131.342C179.832 131.644 180.293 131.829 180.777 131.872L221.644 135.587C221.976 135.617 222.31 135.581 222.627 135.48C222.944 135.379 223.237 135.216 223.491 135.001C223.744 134.785 223.952 134.522 224.103 134.225C224.253 133.928 224.343 133.604 224.367 133.272L228.724 70.925C228.77 70.2635 228.551 69.6108 228.117 69.11ZM220.389 118.395L188.157 115.297C187.829 115.261 187.498 115.291 187.182 115.384C186.866 115.478 186.572 115.635 186.318 115.844C186.063 116.054 185.854 116.312 185.701 116.605C185.548 116.897 185.456 117.216 185.429 117.545C185.398 117.872 185.431 118.202 185.527 118.516C185.623 118.83 185.78 119.121 185.989 119.375C186.198 119.628 186.455 119.838 186.745 119.992C187.035 120.146 187.352 120.241 187.679 120.272L220.042 123.382L219.552 130.377L182.854 127.04L179.762 117.765L198.107 93.545C198.453 93.0897 198.632 92.5294 198.614 91.9577C198.596 91.3861 198.383 90.8379 198.009 90.405L186.632 77.175L191.717 70.8425L223.559 73.0675L220.389 118.395Z' fill='black' fill-opacity='0.1' /%3e%3c/svg%3e";module.exports=img;
@@ -0,0 +1 @@
1
+ "use strict";var img="data:image/svg+xml,%3csvg width='381' height='221' viewBox='0 0 381 221' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3crect width='381' height='221' fill='%23E9EBF1' /%3e %3cpath d='M126.04 169.182C123.954 169.182 122.358 168.062 122.358 164.758V158.738H123.66V164.8C123.66 167.278 124.71 168.048 126.04 168.048C127.412 168.048 128.49 167.278 128.49 164.8V158.738H129.736V164.758C129.736 168.062 128.14 169.182 126.04 169.182ZM132.378 169V161.398H133.428L133.54 162.49H133.582C134.31 161.776 135.094 161.202 136.13 161.202C137.726 161.202 138.454 162.238 138.454 164.184V169H137.18V164.352C137.18 162.924 136.746 162.322 135.738 162.322C134.954 162.322 134.422 162.714 133.652 163.484V169H132.378ZM142.686 169.182C141.412 169.182 140.46 168.398 140.46 167.026C140.46 165.374 141.902 164.548 145.136 164.184C145.136 163.204 144.814 162.266 143.568 162.266C142.686 162.266 141.888 162.672 141.286 163.078L140.782 162.196C141.482 161.748 142.56 161.202 143.778 161.202C145.626 161.202 146.41 162.448 146.41 164.324V169H145.36L145.248 168.09H145.206C144.478 168.692 143.624 169.182 142.686 169.182ZM143.05 168.16C143.792 168.16 144.394 167.81 145.136 167.152V165.024C142.574 165.332 141.706 165.962 141.706 166.942C141.706 167.81 142.294 168.16 143.05 168.16ZM152.185 169.182C151.485 169.182 150.687 168.832 150.015 168.216H149.973L149.861 169H148.839V157.856H150.113V160.908L150.071 162.28C150.757 161.678 151.611 161.202 152.451 161.202C154.425 161.202 155.489 162.742 155.489 165.066C155.489 167.684 153.935 169.182 152.185 169.182ZM151.975 168.118C153.235 168.118 154.159 166.984 154.159 165.094C154.159 163.414 153.599 162.28 152.157 162.28C151.513 162.28 150.841 162.644 150.113 163.33V167.32C150.785 167.908 151.471 168.118 151.975 168.118ZM158.837 169.182C157.885 169.182 157.493 168.566 157.493 167.488V157.856H158.767V167.572C158.767 167.964 158.935 168.118 159.131 168.118C159.201 168.118 159.257 168.118 159.397 168.09L159.579 169.07C159.397 169.14 159.173 169.182 158.837 169.182ZM164.551 169.182C162.535 169.182 160.911 167.712 160.911 165.206C160.911 162.742 162.577 161.202 164.341 161.202C166.273 161.202 167.365 162.602 167.365 164.772C167.365 165.052 167.337 165.318 167.309 165.5H162.185C162.269 167.124 163.263 168.16 164.705 168.16C165.447 168.16 166.049 167.936 166.609 167.558L167.071 168.398C166.399 168.832 165.587 169.182 164.551 169.182ZM162.171 164.59H166.245C166.245 163.05 165.545 162.224 164.355 162.224C163.277 162.224 162.325 163.092 162.171 164.59ZM174.762 169.182C173.138 169.182 172.592 168.174 172.592 166.648V162.434H171.458V161.468L172.648 161.398L172.802 159.27H173.866V161.398H175.924V162.434H173.866V166.676C173.866 167.614 174.16 168.146 175.042 168.146C175.308 168.146 175.658 168.048 175.91 167.95L176.162 168.902C175.728 169.042 175.224 169.182 174.762 169.182ZM180.394 169.182C178.532 169.182 176.866 167.726 176.866 165.206C176.866 162.672 178.532 161.202 180.394 161.202C182.256 161.202 183.922 162.672 183.922 165.206C183.922 167.726 182.256 169.182 180.394 169.182ZM180.394 168.118C181.71 168.118 182.606 166.956 182.606 165.206C182.606 163.456 181.71 162.266 180.394 162.266C179.078 162.266 178.196 163.456 178.196 165.206C178.196 166.956 179.078 168.118 180.394 168.118ZM190.405 169.182C189.453 169.182 189.061 168.566 189.061 167.488V157.856H190.335V167.572C190.335 167.964 190.503 168.118 190.699 168.118C190.769 168.118 190.825 168.118 190.965 168.09L191.147 169.07C190.965 169.14 190.741 169.182 190.405 169.182ZM196.008 169.182C194.146 169.182 192.48 167.726 192.48 165.206C192.48 162.672 194.146 161.202 196.008 161.202C197.87 161.202 199.536 162.672 199.536 165.206C199.536 167.726 197.87 169.182 196.008 169.182ZM196.008 168.118C197.324 168.118 198.22 166.956 198.22 165.206C198.22 163.456 197.324 162.266 196.008 162.266C194.692 162.266 193.81 163.456 193.81 165.206C193.81 166.956 194.692 168.118 196.008 168.118ZM203.075 169.182C201.801 169.182 200.849 168.398 200.849 167.026C200.849 165.374 202.291 164.548 205.525 164.184C205.525 163.204 205.203 162.266 203.957 162.266C203.075 162.266 202.277 162.672 201.675 163.078L201.171 162.196C201.871 161.748 202.949 161.202 204.167 161.202C206.015 161.202 206.799 162.448 206.799 164.324V169H205.749L205.637 168.09H205.595C204.867 168.692 204.013 169.182 203.075 169.182ZM203.439 168.16C204.181 168.16 204.783 167.81 205.525 167.152V165.024C202.963 165.332 202.095 165.962 202.095 166.942C202.095 167.81 202.683 168.16 203.439 168.16ZM211.817 169.182C209.913 169.182 208.681 167.74 208.681 165.206C208.681 162.742 210.235 161.202 211.971 161.202C212.867 161.202 213.441 161.538 214.113 162.098L214.043 160.782V157.856H215.317V169H214.281L214.155 168.104H214.127C213.525 168.692 212.727 169.182 211.817 169.182ZM212.097 168.118C212.797 168.118 213.413 167.768 214.043 167.068V163.078C213.399 162.504 212.825 162.28 212.195 162.28C210.963 162.28 209.997 163.456 209.997 165.192C209.997 167.026 210.753 168.118 212.097 168.118ZM221.04 169V161.398H222.314V169H221.04ZM221.684 159.83C221.18 159.83 220.802 159.48 220.802 159.004C220.802 158.486 221.18 158.178 221.684 158.178C222.188 158.178 222.566 158.486 222.566 159.004C222.566 159.48 222.188 159.83 221.684 159.83ZM224.895 169V161.398H225.945L226.057 162.504H226.099C226.757 161.776 227.555 161.202 228.465 161.202C229.627 161.202 230.257 161.762 230.565 162.658C231.349 161.804 232.147 161.202 233.071 161.202C234.639 161.202 235.381 162.238 235.381 164.184V169H234.107V164.352C234.107 162.924 233.659 162.322 232.693 162.322C232.105 162.322 231.489 162.7 230.775 163.484V169H229.501V164.352C229.501 162.924 229.053 162.322 228.087 162.322C227.513 162.322 226.869 162.7 226.169 163.484V169H224.895ZM239.606 169.182C238.332 169.182 237.38 168.398 237.38 167.026C237.38 165.374 238.822 164.548 242.056 164.184C242.056 163.204 241.734 162.266 240.488 162.266C239.606 162.266 238.808 162.672 238.206 163.078L237.702 162.196C238.402 161.748 239.48 161.202 240.698 161.202C242.546 161.202 243.33 162.448 243.33 164.324V169H242.28L242.168 168.09H242.126C241.398 168.692 240.544 169.182 239.606 169.182ZM239.97 168.16C240.712 168.16 241.314 167.81 242.056 167.152V165.024C239.494 165.332 238.626 165.962 238.626 166.942C238.626 167.81 239.214 168.16 239.97 168.16ZM248.321 172.5C246.459 172.5 245.171 171.772 245.171 170.456C245.171 169.812 245.591 169.196 246.305 168.734V168.678C245.899 168.44 245.605 168.034 245.605 167.432C245.605 166.802 246.067 166.298 246.459 166.018V165.962C245.955 165.556 245.465 164.828 245.465 163.918C245.465 162.252 246.781 161.202 248.321 161.202C248.741 161.202 249.119 161.3 249.385 161.398H252.031V162.378H250.477C250.841 162.728 251.093 163.288 251.093 163.946C251.093 165.57 249.861 166.592 248.321 166.592C247.943 166.592 247.523 166.494 247.187 166.326C246.907 166.564 246.697 166.816 246.697 167.236C246.697 167.726 247.005 168.062 248.027 168.062H249.511C251.275 168.062 252.157 168.622 252.157 169.868C252.157 171.282 250.673 172.5 248.321 172.5ZM248.321 165.724C249.189 165.724 249.931 165.024 249.931 163.918C249.931 162.812 249.217 162.14 248.321 162.14C247.425 162.14 246.697 162.798 246.697 163.918C246.697 165.024 247.439 165.724 248.321 165.724ZM248.503 171.632C249.959 171.632 250.925 170.862 250.925 170.064C250.925 169.364 250.379 169.126 249.371 169.126H248.055C247.775 169.126 247.411 169.084 247.075 169C246.529 169.392 246.291 169.84 246.291 170.288C246.291 171.1 247.117 171.632 248.503 171.632ZM256.508 169.182C254.492 169.182 252.868 167.712 252.868 165.206C252.868 162.742 254.534 161.202 256.298 161.202C258.23 161.202 259.322 162.602 259.322 164.772C259.322 165.052 259.294 165.318 259.266 165.5H254.142C254.226 167.124 255.22 168.16 256.662 168.16C257.404 168.16 258.006 167.936 258.566 167.558L259.028 168.398C258.356 168.832 257.544 169.182 256.508 169.182ZM254.128 164.59H258.202C258.202 163.05 257.502 162.224 256.312 162.224C255.234 162.224 254.282 163.092 254.128 164.59Z' fill='%23999999' /%3e %3cpath d='M205 85.625C205 87.1168 205.593 88.5476 206.648 89.6025C207.702 90.6574 209.133 91.25 210.625 91.25C212.117 91.25 213.548 90.6574 214.602 89.6025C215.657 88.5476 216.25 87.1168 216.25 85.625C216.25 84.1332 215.657 82.7024 214.602 81.6475C213.548 80.5926 212.117 80 210.625 80C209.133 80 207.702 80.5926 206.648 81.6475C205.593 82.7024 205 84.1332 205 85.625Z' fill='black' fill-opacity='0.1' /%3e %3cpath d='M228.117 69.11C227.901 68.8622 227.638 68.6593 227.344 68.513C227.05 68.3668 226.73 68.2799 226.402 68.2575L190.762 65.765C190.358 65.7338 189.954 65.8023 189.583 65.9645C189.212 66.1266 188.887 66.3775 188.637 66.695L181.434 75.6675C181.069 76.1225 180.874 76.691 180.883 77.2745C180.893 77.858 181.106 78.4198 181.487 78.8625L192.904 92.14L181.384 107.347L184.234 93.8025C184.329 93.3529 184.298 92.8858 184.144 92.4528C183.991 92.0197 183.721 91.6372 183.364 91.3475L168.407 79.18L174.627 69.36C174.874 68.9694 175.008 68.5179 175.014 68.0557C175.019 67.5936 174.897 67.1388 174.66 66.742C174.423 66.3452 174.081 66.0219 173.671 65.8079C173.261 65.594 172.8 65.4978 172.339 65.53L153.574 66.84C153.247 66.8629 152.927 66.9501 152.633 67.0966C152.339 67.2432 152.076 67.4463 151.861 67.6942C151.645 67.9422 151.481 68.2302 151.377 68.5418C151.273 68.8533 151.231 69.1823 151.254 69.51L155.614 131.855C155.638 132.183 155.726 132.504 155.873 132.798C156.02 133.093 156.224 133.355 156.473 133.57C156.722 133.786 157.011 133.95 157.324 134.054C157.636 134.158 157.966 134.199 158.294 134.175L172.084 133.145C173.462 133.042 174.494 131.842 174.389 130.467C174.284 129.092 173.094 128.042 171.709 128.16L160.424 129.002L159.922 121.775L169.712 120.792C170.039 120.76 170.356 120.663 170.645 120.508C170.935 120.353 171.191 120.142 171.399 119.888C171.607 119.634 171.763 119.341 171.858 119.026C171.953 118.712 171.985 118.382 171.952 118.055C171.883 117.396 171.557 116.791 171.044 116.372C170.531 115.952 169.874 115.752 169.214 115.815L159.574 116.785L156.417 71.655L167.757 70.8625L162.994 78.38C162.667 78.8971 162.54 79.5164 162.639 80.1204C162.738 80.7245 163.054 81.2714 163.529 81.6575L179.029 94.2625L174.439 116.082C174.365 116.466 174.385 116.861 174.497 117.235C174.482 117.527 174.519 117.819 174.607 118.097L178.632 130.172C178.785 130.634 179.07 131.04 179.451 131.342C179.832 131.644 180.293 131.829 180.777 131.872L221.644 135.587C221.976 135.617 222.31 135.581 222.627 135.48C222.944 135.379 223.237 135.216 223.491 135.001C223.744 134.785 223.952 134.522 224.103 134.225C224.253 133.928 224.343 133.604 224.367 133.272L228.724 70.925C228.77 70.2635 228.551 69.6108 228.117 69.11ZM220.389 118.395L188.157 115.297C187.829 115.261 187.498 115.291 187.182 115.384C186.866 115.478 186.572 115.635 186.318 115.844C186.063 116.054 185.854 116.312 185.701 116.605C185.548 116.897 185.456 117.216 185.429 117.545C185.398 117.872 185.431 118.202 185.527 118.516C185.623 118.83 185.78 119.121 185.989 119.375C186.198 119.628 186.455 119.838 186.745 119.992C187.035 120.146 187.352 120.241 187.679 120.272L220.042 123.382L219.552 130.377L182.854 127.04L179.762 117.765L198.107 93.545C198.453 93.0897 198.632 92.5294 198.614 91.9577C198.596 91.3861 198.383 90.8379 198.009 90.405L186.632 77.175L191.717 70.8425L223.559 73.0675L220.389 118.395Z' fill='black' fill-opacity='0.1' /%3e%3c/svg%3e";module.exports=img;
@@ -1 +1 @@
1
- "use strict";var React=require("react"),reactRedux=require("react-redux"),ctx=require("../../store/ctx.js"),antd=require("antd"),index$3=require("../../constant/index.js"),es=require("antd/es"),index$2=require("./questionView/index.js"),reactI18next=require("react-i18next"),index$1=require("../../views/MainView/annotationTips/index.js"),data=require("./utils/data.js"),reducer=require("../../store/annotation/reducer.js"),index=require("../../utils/index.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const LLMViewCls=`${index$3.prefix}-LLMView`,LLMToolView=e=>{const{annotation:c,checkMode:d=!0,tips:q,showTips:p}=e,{imgIndex:n,imgList:a,stepList:o,step:u}=c,{hoverKey:g,modelAPIResponse:m,setModelAPIResponse:f,newAnswerList:l}=React.useContext(ctx.LLMContext),[w,M]=React.useState([]),[j,C]=React.useState(""),[R,E]=React.useState(),{t:I}=reactI18next.useTranslation();return React.useEffect(()=>{let t;if(!d)return t=setInterval(()=>{antd.message.info(I("EfficientListening"))},1e3*60),()=>{t&&clearInterval(t)}},[]),React.useEffect(()=>{var t,r;if(!a[n])return;const s=(t=a[n])==null?void 0:t.questionList,v=(r=a[n])!=null?r:{},i=data.getCurrentResultFromResultList(v==null?void 0:v.result),L=(i==null?void 0:i.length)>0?i[0]:i;C(s==null?void 0:s.question);let x=(s==null?void 0:s.answerList)||[];l.length>0&&(x=l),M(x),f((L==null?void 0:L.modelAPIResponse)||[])},[n,l]),React.useEffect(()=>{var t;if(o&&u){const r=(t=reducer.getStepConfig(o,u))==null?void 0:t.config;E(index.jsonParser(r))}},[o,u]),React__default.default.createElement(es.Layout,{className:LLMViewCls},React__default.default.createElement("div",{className:`${LLMViewCls}-question`},p===!0&&React__default.default.createElement(index$1,{tips:q}),React__default.default.createElement(index$2.default,{hoverKey:g,question:j,answerList:w,modelAPIResponse:m,setModelAPIResponse:f,checkMode:d,annotation:c,LLMConfig:R})))},mapStateToProps=e=>({annotation:e.annotation});var LLMToolView$1=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(LLMToolView);module.exports=LLMToolView$1;
1
+ "use strict";var React=require("react"),reactRedux=require("react-redux"),ctx=require("../../store/ctx.js"),antd=require("antd"),index=require("../../constant/index.js"),es=require("antd/es"),index$3=require("./questionView/index.js"),reactI18next=require("react-i18next"),index$2=require("../../views/MainView/annotationTips/index.js"),data=require("./utils/data.js"),reducer=require("../../store/annotation/reducer.js"),index$1=require("../../utils/index.js");function _interopDefaultLegacy(n){return n&&typeof n=="object"&&"default"in n?n:{default:n}}var React__default=_interopDefaultLegacy(React);const LLMViewCls=`${index.prefix}-LLMView`,LLMToolView=n=>{const{annotation:L,checkMode:p=!0,tips:g,showTips:w}=n,{imgIndex:s,imgList:a,stepList:v,step:f}=L,{hoverKey:M,modelAPIResponse:T,setModelAPIResponse:x,newAnswerList:l}=React.useContext(ctx.LLMContext),[E,y]=React.useState([]),[I,_]=React.useState(""),[t,j]=React.useState(),{t:C}=reactI18next.useTranslation();return React.useEffect(()=>{let e;if(!p)return e=setInterval(()=>{antd.message.info(C("EfficientListening"))},1e3*60),()=>{e&&clearInterval(e)}},[]),React.useEffect(()=>{var e,i,r,o,q,m;if(!a[s])return;const R=((e=t==null?void 0:t.dataType)==null?void 0:e.prompt)===index.ELLMDataType.Picture,D=((i=t==null?void 0:t.dataType)==null?void 0:i.response)===index.ELLMDataType.Picture,u=(r=a[s])==null?void 0:r.questionList,c=(o=a[s])==null?void 0:o.llmFile,P=R?c==null?void 0:c.question:u==null?void 0:u.question;_(P);let d=(u==null?void 0:u.answerList)||[];D&&(d=(c==null?void 0:c.answerList)||[]),((q=t==null?void 0:t.dataType)==null?void 0:q.response)===index.ELLMDataType.None&&(d=[]),((m=t==null?void 0:t.dataType)==null?void 0:m.response)===index.ELLMDataType.Text&&(l==null?void 0:l.length)>0&&(d=l),y(d)},[s,l,t]),React.useEffect(()=>{var e;if(!a[s])return;const i=(e=a[s])!=null?e:{},r=data.getCurrentResultFromResultList(i==null?void 0:i.result),o=(r==null?void 0:r.length)>0?r[0]:r;x((o==null?void 0:o.modelAPIResponse)||[])},[s]),React.useEffect(()=>{var e;if(v&&f){const i=(e=reducer.getStepConfig(v,f))==null?void 0:e.config;j(index$1.jsonParser(i))}},[v,f]),React__default.default.createElement(es.Layout,{className:LLMViewCls},React__default.default.createElement("div",{className:`${LLMViewCls}-question`},w===!0&&React__default.default.createElement(index$2,{tips:g}),React__default.default.createElement(index$3.default,{hoverKey:M,question:I,answerList:E,modelAPIResponse:T,setModelAPIResponse:x,checkMode:p,annotation:L,LLMConfig:t})))},mapStateToProps=n=>({annotation:n.annotation});var LLMToolView$1=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(LLMToolView);module.exports=LLMToolView$1;
@@ -1 +1 @@
1
- "use strict";var antd=require("antd"),classNames=require("classnames"),React=require("react"),loading=require("../../../assets/annotation/LLMTool/loading.svg.js"),index$4=require("../../longText/index.js"),index$3=require("../../markdownView/index.js"),index$2=require("../../../constant/index.js"),reducer=require("../../../store/annotation/reducer.js"),index=require("../../../utils/index.js"),icons=require("@ant-design/icons"),index$1=require("../questionView/index.js"),lbUtils=require("@labelbee/lb-utils");function _interopDefaultLegacy(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var classNames__default=_interopDefaultLegacy(classNames),React__default=_interopDefaultLegacy(React),__async=(t,e,n)=>new Promise((l,u)=>{var o=a=>{try{r(n.next(a))}catch(d){u(d)}},c=a=>{try{r(n.throw(a))}catch(d){u(d)}},r=a=>a.done?l(a.value):Promise.resolve(a.value).then(o,c);r((n=n.apply(t,e)).next())});const RenderContent=({dataFormatType:t,answer:e})=>t===index$2.EDataFormatType.Markdown?React__default.default.createElement(index$3,{value:e}):React__default.default.createElement(index$4,{wordCount:1e3,text:e}),getAnswer=(t,e)=>{var n;return(n=e.find(l=>l.id===t))==null?void 0:n.answer},ModelAPIView=t=>{var e;const{annotation:n={},checkMode:l,dataFormatType:u,modelAPIResponse:o,question:c,setModelAPIResponse:r}=t,{stepList:a,step:d,toolInstance:f}=n,[v,m]=React.useState(),{enableModelAPI:p=!1,modelAPIConfigList:i=[]}=v||{},g=s=>{let L=!1;const w=o.map(_=>_.id===s.id?(L=!0,s):_);L||w.push(s),r==null||r(w)};return React.useEffect(()=>{var s;if(a&&d){const L=(s=reducer.getStepConfig(a,d))==null?void 0:s.config;m(index.jsonParser(L))}},[a,d]),p?(e=i==null?void 0:i.map)==null?void 0:e.call(i,s=>React__default.default.createElement(ModelAPIContent,{dataFormatType:u,config:s,modelAPIResponse:o,key:s==null?void 0:s.id,toolInstance:f,question:c,updateModelAPIResponse:g,checkMode:l})):null},LoadingMessage=()=>React__default.default.createElement("div",{className:classNames__default.default({[`${index$1.LLMViewCls}__loading`]:!0})},lbUtils.i18n.t("AnswersAreBeingGenerated"),React__default.default.createElement("img",{src:loading})),FailedMessage=()=>React__default.default.createElement("span",{className:classNames__default.default({[`${index$1.LLMViewCls}__failed`]:!0})},lbUtils.i18n.t("AnswerGenerationFailedPleaseTryAgainLater")," ",React__default.default.createElement(icons.InfoCircleFilled,null)),ModelAPIContent=({dataFormatType:t,config:e,modelAPIResponse:n,toolInstance:l,question:u,updateModelAPIResponse:o,checkMode:c})=>{const[r,a]=React.useState(!1),[d,f]=React.useState(!1),v=getAnswer(e==null?void 0:e.id,n),m=i=>{a(i),l&&(l.loading=i)},p=()=>__async(void 0,null,function*(){m(!0),f(!1);try{const i=yield l==null?void 0:l.getAPIAnswer(e,u);o({id:e==null?void 0:e.id,answer:i})}catch(i){f(!0)}finally{m(!1)}});return React__default.default.createElement("div",{className:classNames__default.default({[`${index$1.LLMViewCls}__content`]:!0}),key:e==null?void 0:e.id},React__default.default.createElement(antd.Tag,{style:{color:"#666FFF",background:"#eeefff",height:"20px",padding:"0px 8px",border:"none"}},e==null?void 0:e.name),React__default.default.createElement("div",{className:classNames__default.default({[`${index$1.LLMViewCls}__answer`]:!0})},!r&&v&&React__default.default.createElement(RenderContent,{dataFormatType:t,answer:v}),React__default.default.createElement("div",{className:classNames__default.default({[`${index$1.LLMViewCls}__message`]:!0})},r?React__default.default.createElement(LoadingMessage,null):d&&React__default.default.createElement(FailedMessage,null)),!r&&!c&&React__default.default.createElement("div",{className:classNames__default.default({[`${index$1.LLMViewCls}__footer`]:!0})},React__default.default.createElement("span",{onClick:p},lbUtils.i18n.t("ReGenerate"),React__default.default.createElement(icons.SyncOutlined,null)))))};module.exports=ModelAPIView;
1
+ "use strict";var antd=require("antd"),classNames=require("classnames"),React=require("react"),loading=require("../../../assets/annotation/LLMTool/loading.svg.js"),index$3=require("../../markdownView/index.js"),index$2=require("../../../constant/index.js"),reducer=require("../../../store/annotation/reducer.js"),index=require("../../../utils/index.js"),icons=require("@ant-design/icons"),index$1=require("../questionView/index.js"),lbUtils=require("@labelbee/lb-utils");function _interopDefaultLegacy(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var classNames__default=_interopDefaultLegacy(classNames),React__default=_interopDefaultLegacy(React),__async=(t,e,l)=>new Promise((s,o)=>{var u=a=>{try{d(l.next(a))}catch(r){o(r)}},v=a=>{try{d(l.throw(a))}catch(r){o(r)}},d=a=>a.done?s(a.value):Promise.resolve(a.value).then(u,v);d((l=l.apply(t,e)).next())});const RenderContent=({dataFormatType:t,answer:e})=>t===index$2.EDataFormatType.Markdown?React__default.default.createElement(index$3,{value:e}):React__default.default.createElement("span",null,e),getAnswer=(t,e)=>{var l;return(l=e.find(s=>s.id===t))==null?void 0:l.answer},ModelAPIView=t=>{var e;const{annotation:l={},checkMode:s,dataFormatType:o,modelAPIResponse:u,question:v,setModelAPIResponse:d}=t,{stepList:a,step:r,toolInstance:m}=l,[L,p]=React.useState(),[c,w]=React.useState([]),{enableModelAPI:i=!1,modelAPIConfigList:f=[]}=L||{};React.useEffect(()=>{m&&(m.loading=(c==null?void 0:c.length)>0)},[c]);const M=React.useCallback(n=>{d==null||d(_=>{let E=!1;const y=_.map(g=>g.id===n.id?(E=!0,n):g);return E||y.push(n),y})},[u]);return React.useEffect(()=>{var n;if(a&&r){const _=(n=reducer.getStepConfig(a,r))==null?void 0:n.config;p(index.jsonParser(_))}},[a,r]),i?(e=f==null?void 0:f.map)==null?void 0:e.call(f,n=>React__default.default.createElement(ModelAPIContent,{dataFormatType:o,config:n,modelAPIResponse:u,key:n==null?void 0:n.id,toolInstance:m,setLoadingModelIDs:w,question:v,updateModelAPIResponse:M,checkMode:s})):null},LoadingMessage=()=>React__default.default.createElement("div",{className:classNames__default.default({[`${index$1.LLMViewCls}__loading`]:!0})},lbUtils.i18n.t("AnswersAreBeingGenerated"),React__default.default.createElement("img",{src:loading})),FailedMessage=()=>React__default.default.createElement("span",{className:classNames__default.default({[`${index$1.LLMViewCls}__failed`]:!0})},lbUtils.i18n.t("AnswerGenerationFailedPleaseTryAgainLater")," ",React__default.default.createElement(icons.InfoCircleFilled,null)),ModelAPIContent=({dataFormatType:t,config:e,modelAPIResponse:l,toolInstance:s,setLoadingModelIDs:o,question:u,updateModelAPIResponse:v,checkMode:d})=>{const[a,r]=React.useState(!1),[m,L]=React.useState(!1),p=getAnswer(e==null?void 0:e.id,l),c=i=>{r(i),o(f=>i?[...f,e==null?void 0:e.id]:f.filter(M=>M!==(e==null?void 0:e.id)))},w=()=>__async(void 0,null,function*(){c(!0),L(!1);try{const i=yield s==null?void 0:s.getAPIAnswer(e,u);v({id:e==null?void 0:e.id,answer:i,name:e==null?void 0:e.name})}catch(i){L(!0)}finally{c(!1)}});return React.useEffect(()=>{L(!1)},[u]),React__default.default.createElement("div",{className:classNames__default.default({[`${index$1.LLMViewCls}__content`]:!0}),key:e==null?void 0:e.id},React__default.default.createElement(antd.Tag,{style:{color:"#666FFF",background:"#eeefff",height:"20px",padding:"0px 8px",border:"none"}},e==null?void 0:e.name),React__default.default.createElement("div",{className:classNames__default.default({[`${index$1.LLMViewCls}__answer`]:!0})},!a&&p&&React__default.default.createElement(RenderContent,{dataFormatType:t,answer:p}),React__default.default.createElement("div",{className:classNames__default.default({[`${index$1.LLMViewCls}__message`]:!0})},a?React__default.default.createElement(LoadingMessage,null):m&&React__default.default.createElement(FailedMessage,null)),!a&&!d&&React__default.default.createElement("div",{className:classNames__default.default({[`${index$1.LLMViewCls}__footer`]:!0})},React__default.default.createElement("span",{onClick:w},lbUtils.i18n.t("ReGenerate"),React__default.default.createElement(icons.SyncOutlined,null)))))};module.exports=ModelAPIView;
@@ -0,0 +1 @@
1
+ "use strict";var React=require("react"),reactI18next=require("react-i18next"),reResizable=require("re-resizable"),antd=require("antd"),index=require("../../../../../constant/index.js"),icons=require("@ant-design/icons"),index$1=require("../../../../markdownView/index.js"),_=require("lodash"),lbUtils=require("@labelbee/lb-utils"),imgFail_cn=require("../../../../../assets/annotation/LLMTool/imgFail_cn.svg.js"),imgFail_en=require("../../../../../assets/annotation/LLMTool/imgFail_en.svg.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const LLMViewCls=`${index.prefix}-LLMView`,Content=({question:e,dataFormatType:n,isImg:a})=>{const r=_.isString(e)?e:"",t=lbUtils.i18n.language==="en"?imgFail_en:imgFail_cn;if(a){const l=_.isObject(e)?e==null?void 0:e.url:"";return React__default.default.createElement(antd.Image,{src:l||t,width:400,fallback:t})}return React__default.default.createElement("div",{style:{whiteSpace:"pre-wrap"}},n===index.EDataFormatType.Markdown?React__default.default.createElement(index$1,{value:r}):r)},Header=e=>{const{question:n,dataFormatType:a,setDataFormatType:r,isImg:t}=e,l=300,{t:i}=reactI18next.useTranslation();return React__default.default.createElement(reResizable.Resizable,{defaultSize:{width:"100%",height:l},minHeight:l,enable:{bottom:!0},style:{padding:"26px 32px",borderBottom:"1px solid #EBEBEB",overflow:"hidden"}},React__default.default.createElement("div",{className:`${LLMViewCls}__title`,style:{display:"flex",justifyContent:"space-between"}},i("Title"),!t&&React__default.default.createElement("span",{style:{display:"flex"}},React__default.default.createElement(antd.Radio.Group,{value:a,onChange:s=>{r(s.target.value)}},React__default.default.createElement(antd.Radio.Button,{value:index.EDataFormatType.Default,style:{textAlign:"center",width:"52px"}},"</>"),React__default.default.createElement(antd.Radio.Button,{value:index.EDataFormatType.Markdown,style:{textAlign:"center",width:"52px"}},React__default.default.createElement(icons.FileTextOutlined,null))),React__default.default.createElement("span",{style:{marginLeft:"8px",width:"4px",background:"#1890ff"}}))),React__default.default.createElement("div",{className:`${LLMViewCls}__headerContent`},React__default.default.createElement(Content,{question:n,dataFormatType:a,isImg:t})))};module.exports=Header;
@@ -0,0 +1 @@
1
+ "use strict";var React=require("react"),antd=require("antd"),index=require("../../../../../constant/index.js"),classNames=require("classnames"),imgFail_cn=require("../../../../../assets/annotation/LLMTool/imgFail_cn.svg.js"),imgFail_en=require("../../../../../assets/annotation/LLMTool/imgFail_en.svg.js"),lbUtils=require("@labelbee/lb-utils"),index_module=require("./index.module.scss.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),classNames__default=_interopDefaultLegacy(classNames);const LLMViewCls=`${index.prefix}-LLMView`,ImgView=e=>{const{answerList:t,hoverKey:r}=e,l=lbUtils.i18n.language==="en"?imgFail_en:imgFail_cn;return React__default.default.createElement("div",{className:index_module.imgView},t.map((a,s)=>React__default.default.createElement("div",{key:s,className:index_module.item},React__default.default.createElement(antd.Tag,{className:`${LLMViewCls}__tag`},a==null?void 0:a.order),React__default.default.createElement("div",{className:classNames__default.default({[`${index_module.image}`]:!0,[`${LLMViewCls}__contentActive`]:r===(a==null?void 0:a.order)})},React__default.default.createElement(antd.Image,{src:a==null?void 0:a.url,fallback:l})))))};module.exports=ImgView;
@@ -0,0 +1 @@
1
+ "use strict";var styles={imgView:"index-module_imgView__wmxDk",item:"index-module_item__-80YI",image:"index-module_image__V49oW","ant-image":"index-module_ant-image__pOA-I"};module.exports=styles;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),antd=require("antd"),index=require("../../../constant/index.js"),classNames=require("classnames"),reactI18next=require("react-i18next"),lbUtils=require("@labelbee/lb-utils"),index$1=require("../../markdownView/index.js"),icons=require("@ant-design/icons"),index$2=require("../modelAPIView/index.js"),index$3=require("../../diffMatchPatchComponent/index.js"),reResizable=require("re-resizable");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),classNames__default=_interopDefaultLegacy(classNames),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,a)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,__spreadValues=(e,t)=>{for(var a in t||(t={}))__hasOwnProp.call(t,a)&&__defNormalProp(e,a,t[a]);if(__getOwnPropSymbols)for(var a of __getOwnPropSymbols(t))__propIsEnum.call(t,a)&&__defNormalProp(e,a,t[a]);return e};const LLMViewCls=`${index.prefix}-LLMView`,Header=({setDataFormatType:e,dataFormatType:t})=>{const{t:a}=reactI18next.useTranslation();return React__default.default.createElement("div",{className:`${LLMViewCls}__title`,style:{display:"flex",justifyContent:"space-between"}},a("Title"),React__default.default.createElement("span",{style:{display:"flex"}},React__default.default.createElement(antd.Radio.Group,{value:t,onChange:n=>{e(n.target.value)}},React__default.default.createElement(antd.Radio.Button,{value:index.EDataFormatType.Default,style:{textAlign:"center",width:"52px"}},"</>"),React__default.default.createElement(antd.Radio.Button,{value:index.EDataFormatType.Markdown,style:{textAlign:"center",width:"52px"}},React__default.default.createElement(icons.FileTextOutlined,null))),React__default.default.createElement("span",{style:{marginLeft:"8px",width:"4px",background:"#1890ff"}})))},RenderAnswer=({i:e,dataFormatType:t,isTextControl:a})=>{var n;return t===index.EDataFormatType.Markdown?React__default.default.createElement(index$1,{value:(n=e==null?void 0:e.newAnswer)!=null?n:e==null?void 0:e.answer}):a?React__default.default.createElement(index$3,{originString:e==null?void 0:e.answer,currentString:e==null?void 0:e.newAnswer}):React__default.default.createElement("div",null,e==null?void 0:e.answer)},QuestionView=e=>{const{hoverKey:t,answerList:a,question:n,lang:d,modelAPIResponse:f,setModelAPIResponse:m,checkMode:v=!0,LLMConfig:l}=e,[o,p]=React.useState(index.EDataFormatType.Default),u=200,{t:E}=reactI18next.useTranslation();React.useEffect(()=>{var r;d&&((r=lbUtils.i18n)==null||r.changeLanguage(d))},[]);const x=r=>{var i;return(l==null?void 0:l.isTextEdit)?!!((i=((l==null?void 0:l.textEdit)||[]).filter(c=>(c==null?void 0:c.title)===r.order)[0])==null?void 0:i.textControl):!1};return React__default.default.createElement("div",{className:LLMViewCls},React__default.default.createElement(reResizable.Resizable,{defaultSize:{width:"100%",height:u},minHeight:u,enable:{bottom:!0},style:{padding:"26px 32px",borderBottom:"1px solid #EBEBEB",overflow:"hidden"}},React__default.default.createElement(Header,{setDataFormatType:p,dataFormatType:o}),React__default.default.createElement("div",{className:`${LLMViewCls}__headerContent`},o===index.EDataFormatType.Markdown?React__default.default.createElement(index$1,{value:n}):n)),React__default.default.createElement("div",{className:`${LLMViewCls}__textBox`},React__default.default.createElement("div",{className:`${LLMViewCls}__title`},E("Answer")),a.map((r,i)=>{const s=x(r);return React__default.default.createElement("div",{className:classNames__default.default({[`${LLMViewCls}__content`]:!0,[`${LLMViewCls}__contentActive`]:t===(r==null?void 0:r.order)}),key:i},React__default.default.createElement(antd.Tag,{style:{color:"#666FFF",background:"#eeefff",height:"20px",padding:"0px 8px",border:"none"}},r==null?void 0:r.order),React__default.default.createElement(RenderAnswer,{i:r,isTextControl:s,dataFormatType:o}))}),React__default.default.createElement(index$2,{dataFormatType:o,modelAPIResponse:f,question:n,setModelAPIResponse:m,checkMode:v,annotation:e.annotation})))},WrapQuestionView=e=>React__default.default.createElement(reactI18next.I18nextProvider,{i18n:lbUtils.i18n},React__default.default.createElement(QuestionView,__spreadValues({},e)));exports.LLMViewCls=LLMViewCls,exports.default=WrapQuestionView;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),antd=require("antd"),index=require("../../../constant/index.js"),classNames=require("classnames"),reactI18next=require("react-i18next"),lbUtils=require("@labelbee/lb-utils"),index$4=require("../../markdownView/index.js"),index$1=require("../modelAPIView/index.js"),index$5=require("../../diffMatchPatchComponent/index.js"),index$2=require("./components/header/index.js"),index$3=require("./components/imgView/index.js"),_=require("lodash");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),classNames__default=_interopDefaultLegacy(classNames),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,r)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__spreadValues=(e,t)=>{for(var r in t||(t={}))__hasOwnProp.call(t,r)&&__defNormalProp(e,r,t[r]);if(__getOwnPropSymbols)for(var r of __getOwnPropSymbols(t))__propIsEnum.call(t,r)&&__defNormalProp(e,r,t[r]);return e};const LLMViewCls=`${index.prefix}-LLMView`,RenderAnswer=({i:e,dataFormatType:t,isTextControl:r})=>{var l;return t===index.EDataFormatType.Markdown?React__default.default.createElement(index$4,{value:(l=e==null?void 0:e.newAnswer)!=null?l:e==null?void 0:e.answer}):r?React__default.default.createElement(index$5,{originString:e==null?void 0:e.answer,currentString:e==null?void 0:e.newAnswer}):React__default.default.createElement("div",{style:{whiteSpace:"pre-wrap"}},e==null?void 0:e.answer)},QuestionView=e=>{var t,r;const{hoverKey:l,answerList:u,question:i,lang:d,modelAPIResponse:f,setModelAPIResponse:m,checkMode:p=!0,LLMConfig:n}=e,[s,w]=React.useState(index.EDataFormatType.Default),x=((t=n==null?void 0:n.dataType)==null?void 0:t.prompt)===index.ELLMDataType.Picture,E=((r=n==null?void 0:n.dataType)==null?void 0:r.response)===index.ELLMDataType.Picture,{t:g}=reactI18next.useTranslation();React.useEffect(()=>{var a;d&&((a=lbUtils.i18n)==null||a.changeLanguage(d))},[]);const y=a=>{var o;return(n==null?void 0:n.isTextEdit)?!!((o=((n==null?void 0:n.textEdit)||[]).filter(v=>(v==null?void 0:v.title)===a.order)[0])==null?void 0:o.textControl):!1},L=React__default.default.createElement("div",null,u.map((a,o)=>{const c=y(a);return React__default.default.createElement("div",{className:classNames__default.default({[`${LLMViewCls}__content`]:!0,[`${LLMViewCls}__contentActive`]:l===(a==null?void 0:a.order)}),key:o},React__default.default.createElement(antd.Tag,{className:`${LLMViewCls}__tag`},a==null?void 0:a.order),React__default.default.createElement(RenderAnswer,{i:a,isTextControl:c,dataFormatType:s}))}),_.isString(i)&&React__default.default.createElement(index$1,{dataFormatType:s,modelAPIResponse:f,question:i,setModelAPIResponse:m,checkMode:p,annotation:e.annotation}));return React__default.default.createElement("div",{className:LLMViewCls},React__default.default.createElement(index$2,{question:i,dataFormatType:s,setDataFormatType:w,isImg:x}),React__default.default.createElement("div",{className:`${LLMViewCls}__textBox`},React__default.default.createElement("div",{className:`${LLMViewCls}__title`},g("Answer")),E?React__default.default.createElement(index$3,{hoverKey:l,answerList:u}):L))},WrapQuestionView=e=>React__default.default.createElement(reactI18next.I18nextProvider,{i18n:lbUtils.i18n},React__default.default.createElement(QuestionView,__spreadValues({},e)));exports.LLMViewCls=LLMViewCls,exports.default=WrapQuestionView;
@@ -1 +1 @@
1
- "use strict";var React=require("react"),index$5=require("../../../../../constant/index.js"),antd=require("antd"),reactI18next=require("react-i18next"),index$2=require("../scoreGroupButton/index.js"),index$3=require("../determineGroup/index.js"),ctx=require("../../../../../store/ctx.js"),index$1=require("../../../../../utils/index.js"),icons=require("@ant-design/icons"),index=require("../../../../../views/MainView/sidebar/TagSidebar/index.js"),_=require("lodash"),index$6=require("../../../../longText/index.js"),index$4=require("../textEditor/index.js");function _interopDefaultLegacy(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var React__default=_interopDefaultLegacy(React),ETagType;(function(t){t[t.Finish=0]="Finish",t[t.UnFinish=1]="UnFinish",t[t.Default=2]="Default"})(ETagType||(ETagType={}));const{Panel}=antd.Collapse,LLMSidebarCls=`${index$5.prefix}-LLMSidebar`,AnswerList=t=>{const{list:g=[],LLMConfig:F,updateValue:h,checkMode:S}=t,{hoverKey:$,setHoverKey:w}=React.useContext(ctx.LLMContext),{t:y}=reactI18next.useTranslation(),C=S,k=e=>{const{indicatorScore:n=[],indicatorDetermine:r=[],textEdit:a=[],isTextEdit:E=!1}=F||{};let o=2;if((n==null?void 0:n.length)>0){if(n.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((r==null?void 0:r.length)>0){if(r.some(l=>{var i;const d=(i=e==null?void 0:e.indicatorDetermine)==null?void 0:i[l.value];return!_.isBoolean(d)}))return o=1,o;o=0}if(E&&(a==null?void 0:a.length)>0){const s=a.filter(f=>(f==null?void 0:f.title)===e.order)[0],{min:l}=s,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},q=e=>{const n=k(e);let r=e.order;switch(n){case 0:return{backgroundColor:"#D9FFDF",fontColor:"#36B34A",tagText:`${r} ${y("Finished")}`,tagStatus:n};case 1:return{backgroundColor:"#FFD9D9",fontColor:"#F26549",tagText:`${r} ${y("Unfinished")}`,tagStatus:n};default:return{backgroundColor:"#EBEBEB",fontColor:"#999999",tagText:r,tagStatus:n}}},D=(e,n)=>n.filter(r=>(r==null?void 0:r.title)===e.order)[0];return React__default.default.createElement(antd.Collapse,{bordered:!1,expandIcon:index.expandIconFuc,expandIconPosition:"end",defaultActiveKey:g.length>0?g.map((e,n)=>n):void 0,style:{margin:"16px 0px"}},g.map((e,n)=>{const{indicatorScore:r=[],indicatorDetermine:a=[],textEdit:E=[],isTextEdit:o=!1}=F||{},{backgroundColor:s,fontColor:l,tagText:i,tagStatus:d}=q(e),f=D(e,E)||{},j=React__default.default.createElement("div",{style:{display:"flex",width:"500px",alignItems:"center",whiteSpace:"nowrap"},onMouseMove:()=>{w(e.order)},onMouseLeave:()=>{w(-1)}},React__default.default.createElement(antd.Tag,{color:s,style:{color:l,padding:"0px 8px"}},i),React__default.default.createElement("span",{style:{textOverflow:"ellipsis",overflow:"hidden",lineHeight:"32px",paddingRight:"24px"}},e.answer));return React__default.default.createElement(Panel,{header:j,key:n,className:index$1.classnames({[`${LLMSidebarCls}-panel`]:!0,[`${LLMSidebarCls}-panelHover`]:$===e.order,[`${LLMSidebarCls}-errorPanel`]:d===1})},(r==null?void 0:r.length)>0&&r.map((u,b)=>{var c;const{label:v,text:x,value:p,score:m}=u,L=React__default.default.createElement("div",{className:`${LLMSidebarCls}-indicatorScore`},React__default.default.createElement(index$6,{text:v,openByText:!0}),x&&React__default.default.createElement(antd.Popover,{placement:"bottom",content:x,overlayClassName:`${LLMSidebarCls}-indicatorScore-title`},React__default.default.createElement(icons.InfoCircleOutlined,{style:{margin:"0px 4px",cursor:"pointer"}})));return v&&m?React__default.default.createElement(index$2,{score:m,title:L,selectScore:(c=e==null?void 0:e.indicatorScore)==null?void 0:c[p],updateScore:M=>{const U={key:p,value:M};h({order:e.order,value:U,key:"indicatorScore"})},key:b,isDisableAll:C}):null}),(a==null?void 0:a.length)>0&&a.map((u,b)=>{var c;const{label:v,value:x}=u;return v?React__default.default.createElement(index$3,{selectValue:(c=e==null?void 0:e.indicatorDetermine)==null?void 0:c[x],title:v,updateValue:p=>{const m={key:x,value:p};h({order:e.order,value:m,key:"indicatorDetermine"})},key:b,isDisableAll:C}):null}),o&&React__default.default.createElement(index$4,{checkMode:S,newAnswer:e==null?void 0:e.newAnswer,textEditObject:f,updateValue:u=>{h({order:e.order,value:u,key:"textEdit"})}}))}))};module.exports=AnswerList;
1
+ "use strict";var React=require("react"),index$5=require("../../../../../constant/index.js"),antd=require("antd"),reactI18next=require("react-i18next"),index$2=require("../scoreGroupButton/index.js"),index$3=require("../determineGroup/index.js"),ctx=require("../../../../../store/ctx.js"),index$1=require("../../../../../utils/index.js"),icons=require("@ant-design/icons"),index=require("../../../../../views/MainView/sidebar/TagSidebar/index.js"),_=require("lodash"),index$6=require("../../../../longText/index.js"),index$4=require("../textEditor/index.js");function _interopDefaultLegacy(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var React__default=_interopDefaultLegacy(React),ETagType;(function(t){t[t.Finish=0]="Finish",t[t.UnFinish=1]="UnFinish",t[t.Default=2]="Default"})(ETagType||(ETagType={}));const{Panel}=antd.Collapse,LLMSidebarCls=`${index$5.prefix}-LLMSidebar`,AnswerList=t=>{const{list:g=[],LLMConfig:w,updateValue:h,checkMode:F}=t,{hoverKey:$,setHoverKey:S}=React.useContext(ctx.LLMContext),{t:y}=reactI18next.useTranslation(),C=F,k=e=>{const{indicatorScore:n=[],indicatorDetermine:r=[],textEdit:i=[],isTextEdit:E=!1}=w||{};let o=2;if((n==null?void 0:n.length)>0){if(n.some(l=>{var a,d;return!((a=e==null?void 0:e.indicatorScore)==null?void 0:a[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((r==null?void 0:r.length)>0){if(r.some(l=>{var a;const d=(a=e==null?void 0:e.indicatorDetermine)==null?void 0:a[l.value];return!_.isBoolean(d)}))return o=1,o;o=0}if(E&&(i==null?void 0:i.length)>0){const s=i.filter(f=>(f==null?void 0:f.title)===e.order)[0],{min:l}=s||{},a=(e==null?void 0:e.newAnswer)||"";if(l&&(a==null?void 0:a.length)<Number(l))return o=1,o;o=0}return o},q=e=>{const n=k(e);let r=e.order;switch(n){case 0:return{backgroundColor:"#D9FFDF",fontColor:"#36B34A",tagText:`${r} ${y("Finished")}`,tagStatus:n};case 1:return{backgroundColor:"#FFD9D9",fontColor:"#F26549",tagText:`${r} ${y("Unfinished")}`,tagStatus:n};default:return{backgroundColor:"#EBEBEB",fontColor:"#999999",tagText:r,tagStatus:n}}},D=(e,n)=>n.filter(r=>(r==null?void 0:r.title)===e.order)[0];return React__default.default.createElement(antd.Collapse,{bordered:!1,expandIcon:index.expandIconFuc,expandIconPosition:"end",defaultActiveKey:g.length>0?g.map((e,n)=>n):void 0,style:{margin:"16px 0px"}},g.map((e,n)=>{const{indicatorScore:r=[],indicatorDetermine:i=[],textEdit:E=[],isTextEdit:o=!1}=w||{},{backgroundColor:s,fontColor:l,tagText:a,tagStatus:d}=q(e),f=D(e,E)||{},j=React__default.default.createElement("div",{style:{display:"flex",width:"500px",alignItems:"center",whiteSpace:"nowrap"},onMouseMove:()=>{S(e.order)},onMouseLeave:()=>{S(-1)}},React__default.default.createElement(antd.Tag,{color:s,style:{color:l,padding:"0px 8px"}},a),e.answer&&React__default.default.createElement("span",{style:{textOverflow:"ellipsis",overflow:"hidden",lineHeight:"32px",paddingRight:"24px"}},e.answer));return React__default.default.createElement(Panel,{header:j,key:n,className:index$1.classnames({[`${LLMSidebarCls}-panel`]:!0,[`${LLMSidebarCls}-panelHover`]:$===e.order,[`${LLMSidebarCls}-errorPanel`]:d===1})},(r==null?void 0:r.length)>0&&r.map((u,b)=>{var c;const{label:v,text:x,value:p,score:m}=u,L=React__default.default.createElement("div",{className:`${LLMSidebarCls}-indicatorScore`},React__default.default.createElement(index$6,{text:v,openByText:!0}),x&&React__default.default.createElement(antd.Popover,{placement:"bottom",content:x,overlayClassName:`${LLMSidebarCls}-indicatorScore-title`},React__default.default.createElement(icons.InfoCircleOutlined,{style:{margin:"0px 4px",cursor:"pointer"}})));return v&&m?React__default.default.createElement(index$2,{score:m,title:L,selectScore:(c=e==null?void 0:e.indicatorScore)==null?void 0:c[p],updateScore:M=>{const U={key:p,value:M};h({order:e.order,value:U,key:"indicatorScore"})},key:b,isDisableAll:C}):null}),(i==null?void 0:i.length)>0&&i.map((u,b)=>{var c;const{label:v,value:x}=u;return v?React__default.default.createElement(index$3,{selectValue:(c=e==null?void 0:e.indicatorDetermine)==null?void 0:c[x],title:v,updateValue:p=>{const m={key:x,value:p};h({order:e.order,value:m,key:"indicatorDetermine"})},key:b,isDisableAll:C}):null}),o&&React__default.default.createElement(index$4,{checkMode:F,newAnswer:e==null?void 0:e.newAnswer,textEditObject:f,updateValue:u=>{h({order:e.order,value:u,key:"textEdit"})}}))}))};module.exports=AnswerList;
@@ -1 +1 @@
1
- "use strict";var React=require("react"),index=require("../../../../../constant/index.js"),antd=require("antd"),reactI18next=require("react-i18next"),icons=require("@ant-design/icons"),index$1=require("../../../../../utils/index.js"),_=require("lodash"),lbAnnotation=require("@labelbee/lb-annotation"),ctx=require("../../../../../store/ctx.js");function _interopDefaultLegacy(i){return i&&typeof i=="object"&&"default"in i?i:{default:i}}var React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(i,c,a)=>c in i?__defProp(i,c,{enumerable:!0,configurable:!0,writable:!0,value:a}):i[c]=a,__spreadValues=(i,c)=>{for(var a in c||(c={}))__hasOwnProp.call(c,a)&&__defNormalProp(i,a,c[a]);if(__getOwnPropSymbols)for(var a of __getOwnPropSymbols(c))__propIsEnum.call(c,a)&&__defNormalProp(i,a,c[a]);return i},__spreadProps=(i,c)=>__defProps(i,__getOwnPropDescs(c)),EDirection;(function(i){i.Top="Top",i.Right="Right",i.Bottom="Bottom",i.Left="Left"})(EDirection||(EDirection={}));const contentBoxCls=`${index.prefix}-LLMSidebar-contentBox`,Navigation=()=>{const{t:i}=reactI18next.useTranslation();return React__default.default.createElement("div",{className:`${contentBoxCls}__navigation`},React__default.default.createElement("span",null,i("Best")),React__default.default.createElement("div",{style:{display:"flex",alignItems:"center"}},React__default.default.createElement(icons.LeftOutlined,null),React__default.default.createElement("div",{style:{height:0,border:"1px solid #999999",width:"450px"}})),React__default.default.createElement("span",null,i("Worst")))},AnswerSort=i=>{const[,c]=React.useReducer(e=>e+1,0),{sortList:a,setSortList:P,waitSortList:R,checkMode:C}=i,{setHoverKey:T}=React.useContext(ctx.LLMContext),q=C,[w,x]=React.useState(void 0),[y,A]=React.useState(void 0),[m,j]=React.useState([]),{t:E}=reactI18next.useTranslation();React.useEffect(()=>{j(R)},[R]),React.useEffect(()=>{F()},[JSON.stringify(a)]);const D=({item:e,operation:t,id:n})=>{const o={[`border${w}`]:"2px solid #8C9AFF"};return React__default.default.createElement("div",__spreadValues({key:`${e==null?void 0:e.id}`,color:"#EBEBEB",id:n,className:index$1.classnames({[`${contentBoxCls}__answerTag`]:!0}),style:y===(e==null?void 0:e.id)&&w?o:void 0,draggable:q?"":"true",onMouseMove:()=>{T(e.id)},onMouseLeave:()=>{T(-1)}},t),e==null?void 0:e.title)},b=(e,t)=>({x:(e.x+t.x)/2,y:(e.y+t.y)/2}),k=(e,t)=>{const n=lbAnnotation.MathUtils.getLineLength(e,b(t.tl,t.tr)),o=lbAnnotation.MathUtils.getLineLength(e,b(t.tr,t.tr)),l=lbAnnotation.MathUtils.getLineLength(e,b(t.bl,t.br)),d=lbAnnotation.MathUtils.getLineLength(e,b(t.tl,t.bl));return{minDistance:Math.min(n,o,l,d),toTopDistance:n,toRightDistance:o,toBottompDistance:l,toLeftDistance:d}},U=(e,t)=>{const{minDistance:n,toTopDistance:o,toRightDistance:l,toBottompDistance:d,toLeftDistance:u}=k(e,t);switch(n){case o:x(EDirection.Top);break;case l:x(EDirection.Right);break;case d:x(EDirection.Bottom);break;case u:x(EDirection.Left);break}},F=()=>{const e=document.getElementById("sortBox");if(e==null?void 0:e.childNodes){let t=[];e.childNodes.forEach((n,o)=>{var l;let d=n;((l=n==null?void 0:n.childNodes)==null?void 0:l.length)>1&&(d=n.childNodes[0]);const u=d.getBoundingClientRect()||{},{bottom:r,top:f,left:s,right:p,width:g,height:v,x:O,y:S}=u,M={x:s+g/2,y:f+v/2},$={tl:{x:O,y:S},tr:{x:p,y:f},br:{x:p,y:r},bl:{x:s,y:r}},K=a[o].reduce((X,L)=>{let B=L;return _.isArray(L)&&L.length>1&&(B=L[0]),B=__spreadProps(__spreadValues({},B),{tagCenterPoint:M,tagVertexPoint:$}),[...X,B]},[]);t.push(K)}),P(t)}},N=e=>{var t,n,o,l,d,u;const r=e.pageX,f=e.pageY,s={x:r,y:f};let p=a;if((p==null?void 0:p.length)>0){let g=p[0];for(let v=0;v<p.length;v++)if(v>0){const O=(t=p[v][0])==null?void 0:t.tagCenterPoint,S=(n=g[0])==null?void 0:n.tagCenterPoint,M=lbAnnotation.MathUtils.getLineLength(s,O),$=lbAnnotation.MathUtils.getLineLength(s,S);M<$&&(g=a[v])}if(!s.x||!s.y)return;if(h(e.target.id)===((o=g[0])==null?void 0:o.id)){A(void 0);return}A((l=g[0])==null?void 0:l.id),((d=g[0])==null?void 0:d.tagVertexPoint)&&s&&U(s,(u=g[0])==null?void 0:u.tagVertexPoint)}},I=e=>{var t;const{target:n}=e;let o=-1,l=-1,d=-1,u=[],r=_.cloneDeep(a);if(d=r.findIndex(f=>f[0].id===Number(y)),((t=n==null?void 0:n.parentNode)==null?void 0:t.parentNode.id)==="sortBox"){o=h(n.parentNode.id);const f=h(n.id);u=r[~~o].filter(p=>p.id===~~f);const s=r[~~o].findIndex(p=>p.id===~~f);r[~~o].splice(s,1)}if((n==null?void 0:n.parentNode.id)==="sortBox"){if(!y)return;o=h(n.id),l=r.findIndex(s=>s[0].id===o);const f=r.find(s=>s[0].id===o);f&&(u=f),r.splice(l,1),d=r.findIndex(s=>s[0].id===~~y)}switch(n.parentNode.id==="waitBox"&&(o=h(n.id),l=m.findIndex(f=>f.id===o),u=[m[l]],m.splice(l,1)),w){case EDirection.Left:r.splice(d,0,u);break;case EDirection.Right:r.splice(d+1,0,u);break;case EDirection.Top:case EDirection.Bottom:r[d].push(...u);break;default:r.push(u);break}P(r),x(void 0),c()},h=e=>{const t=e.indexOf("-");return Number(e.substring(t+1,e.length))};return React__default.default.createElement("div",{style:{padding:"0px 16px",marginBottom:"16px"}},React__default.default.createElement("div",{className:`${contentBoxCls}__title`},React__default.default.createElement("span",null,E("RankingQualityOfAnswers")),m.length>0&&React__default.default.createElement(antd.Tag,{color:"#FFD9D9",style:{color:"#F26549",marginLeft:8}},E("Unfinished"))),React__default.default.createElement("div",null,React__default.default.createElement("div",{style:{display:"flex",alignItems:"center"}},React__default.default.createElement("span",{style:{marginRight:"16px"}},E("ToBeSorted")),React__default.default.createElement("div",{id:"waitBox",className:`${contentBoxCls}__answerBox`},m.length>0&&m.map(e=>D({item:e,id:`waitBoxItem-${e==null?void 0:e.id}`,operation:{onDrag:N,onDragEnd:I}})))),React__default.default.createElement(Navigation,null),React__default.default.createElement("div",{id:"sortBox",className:`${contentBoxCls}__answerBox`},a.map((e,t)=>{var n;return e.length>1?React__default.default.createElement("div",{key:`item-${t}`,id:`sortBox-${t}`},e.map(o=>D({item:o,id:`sortBoxItem-${o==null?void 0:o.id}`,operation:{onDrag:N,onDragEnd:I}}))):D({item:e[0],id:`sortBox-${(n=e[0])==null?void 0:n.id}`,operation:{onDrag:N,onDragEnd:I}})}))))};module.exports=AnswerSort;
1
+ "use strict";var React=require("react"),index=require("../../../../../constant/index.js"),antd=require("antd"),reactI18next=require("react-i18next"),icons=require("@ant-design/icons"),index$1=require("../../../../../utils/index.js"),_=require("lodash"),lbAnnotation=require("@labelbee/lb-annotation"),ctx=require("../../../../../store/ctx.js");function _interopDefaultLegacy(o){return o&&typeof o=="object"&&"default"in o?o:{default:o}}var React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(o,c,a)=>c in o?__defProp(o,c,{enumerable:!0,configurable:!0,writable:!0,value:a}):o[c]=a,__spreadValues=(o,c)=>{for(var a in c||(c={}))__hasOwnProp.call(c,a)&&__defNormalProp(o,a,c[a]);if(__getOwnPropSymbols)for(var a of __getOwnPropSymbols(c))__propIsEnum.call(c,a)&&__defNormalProp(o,a,c[a]);return o},__spreadProps=(o,c)=>__defProps(o,__getOwnPropDescs(c)),EDirection;(function(o){o.Top="Top",o.Right="Right",o.Bottom="Bottom",o.Left="Left"})(EDirection||(EDirection={}));const contentBoxCls=`${index.prefix}-LLMSidebar-contentBox`,Navigation=()=>{const{t:o}=reactI18next.useTranslation();return React__default.default.createElement("div",{className:`${contentBoxCls}__navigation`},React__default.default.createElement("span",null,o("Best")),React__default.default.createElement("div",{style:{display:"flex",alignItems:"center"}},React__default.default.createElement(icons.LeftOutlined,null),React__default.default.createElement("div",{style:{height:0,border:"1px solid #999999",width:"450px"}})),React__default.default.createElement("span",null,o("Worst")))},AnswerSort=o=>{const[,c]=React.useReducer(e=>e+1,0),{sortList:a,setSortList:P,waitSortList:R,checkMode:C}=o,{setHoverKey:T}=React.useContext(ctx.LLMContext),q=C,[w,x]=React.useState(void 0),[y,A]=React.useState(void 0),[m,j]=React.useState([]),{t:E}=reactI18next.useTranslation();React.useEffect(()=>{j(R)},[R]),React.useEffect(()=>{F()},[JSON.stringify(a)]);const D=({item:e,operation:t,id:n})=>{const i={[`border${w}`]:"2px solid #8C9AFF"};return React__default.default.createElement("div",__spreadValues({key:`${e==null?void 0:e.id}`,color:"#EBEBEB",id:n,className:index$1.classnames({[`${contentBoxCls}__answerTag`]:!0}),style:y===(e==null?void 0:e.id)&&w?i:void 0,draggable:q&&!(e==null?void 0:e.id)?"":"true",onMouseMove:()=>{T(e.id)},onMouseLeave:()=>{T(-1)}},t),e==null?void 0:e.title)},b=(e,t)=>({x:(e.x+t.x)/2,y:(e.y+t.y)/2}),k=(e,t)=>{const n=lbAnnotation.MathUtils.getLineLength(e,b(t.tl,t.tr)),i=lbAnnotation.MathUtils.getLineLength(e,b(t.tr,t.tr)),l=lbAnnotation.MathUtils.getLineLength(e,b(t.bl,t.br)),d=lbAnnotation.MathUtils.getLineLength(e,b(t.tl,t.bl));return{minDistance:Math.min(n,i,l,d),toTopDistance:n,toRightDistance:i,toBottompDistance:l,toLeftDistance:d}},U=(e,t)=>{const{minDistance:n,toTopDistance:i,toRightDistance:l,toBottompDistance:d,toLeftDistance:u}=k(e,t);switch(n){case i:x(EDirection.Top);break;case l:x(EDirection.Right);break;case d:x(EDirection.Bottom);break;case u:x(EDirection.Left);break}},F=()=>{const e=document.getElementById("sortBox");if(e==null?void 0:e.childNodes){let t=[];e.childNodes.forEach((n,i)=>{var l;let d=n;((l=n==null?void 0:n.childNodes)==null?void 0:l.length)>1&&(d=n.childNodes[0]);const u=d.getBoundingClientRect()||{},{bottom:r,top:f,left:s,right:p,width:g,height:v,x:O,y:S}=u,M={x:s+g/2,y:f+v/2},$={tl:{x:O,y:S},tr:{x:p,y:f},br:{x:p,y:r},bl:{x:s,y:r}},K=a[i].reduce((X,L)=>{let B=L;return _.isArray(L)&&L.length>1&&(B=L[0]),B=__spreadProps(__spreadValues({},B),{tagCenterPoint:M,tagVertexPoint:$}),[...X,B]},[]);t.push(K)}),P(t)}},N=e=>{var t,n,i,l,d,u;const r=e.pageX,f=e.pageY,s={x:r,y:f};let p=a;if((p==null?void 0:p.length)>0){let g=p[0];for(let v=0;v<p.length;v++)if(v>0){const O=(t=p[v][0])==null?void 0:t.tagCenterPoint,S=(n=g[0])==null?void 0:n.tagCenterPoint,M=lbAnnotation.MathUtils.getLineLength(s,O),$=lbAnnotation.MathUtils.getLineLength(s,S);M<$&&(g=a[v])}if(!s.x||!s.y)return;if(h(e.target.id)===((i=g[0])==null?void 0:i.id)){A(void 0);return}A((l=g[0])==null?void 0:l.id),((d=g[0])==null?void 0:d.tagVertexPoint)&&s&&U(s,(u=g[0])==null?void 0:u.tagVertexPoint)}},I=e=>{var t;const{target:n}=e;let i=-1,l=-1,d=-1,u=[],r=_.cloneDeep(a);if(d=r.findIndex(f=>f[0].id===Number(y)),((t=n==null?void 0:n.parentNode)==null?void 0:t.parentNode.id)==="sortBox"){i=h(n.parentNode.id);const f=h(n.id);u=r[~~i].filter(p=>p.id===~~f);const s=r[~~i].findIndex(p=>p.id===~~f);r[~~i].splice(s,1)}if((n==null?void 0:n.parentNode.id)==="sortBox"){if(!y)return;i=h(n.id),l=r.findIndex(s=>s[0].id===i);const f=r.find(s=>s[0].id===i);f&&(u=f),r.splice(l,1),d=r.findIndex(s=>s[0].id===~~y)}switch(n.parentNode.id==="waitBox"&&(i=h(n.id),l=m.findIndex(f=>f.id===i),u=[m[l]],m.splice(l,1)),w){case EDirection.Left:r.splice(d,0,u);break;case EDirection.Right:r.splice(d+1,0,u);break;case EDirection.Top:case EDirection.Bottom:r[d].push(...u);break;default:r.push(u);break}P(r),x(void 0),c()},h=e=>{const t=e.indexOf("-");return Number(e.substring(t+1,e.length))};return React__default.default.createElement("div",{style:{padding:"0px 16px",marginBottom:"16px"}},React__default.default.createElement("div",{className:`${contentBoxCls}__title`},React__default.default.createElement("span",null,E("RankingQualityOfAnswers")),m.length>0&&React__default.default.createElement(antd.Tag,{color:"#FFD9D9",style:{color:"#F26549",marginLeft:8}},E("Unfinished"))),React__default.default.createElement("div",null,React__default.default.createElement("div",{style:{display:"flex",alignItems:"center"}},React__default.default.createElement("span",{style:{marginRight:"16px"}},E("ToBeSorted")),React__default.default.createElement("div",{id:"waitBox",className:`${contentBoxCls}__answerBox`},m.length>0&&m.map(e=>D({item:e,id:`waitBoxItem-${e==null?void 0:e.id}`,operation:{onDrag:N,onDragEnd:I}})))),React__default.default.createElement(Navigation,null),React__default.default.createElement("div",{id:"sortBox",className:`${contentBoxCls}__answerBox`},a.map((e,t)=>{var n;return e.length>1?React__default.default.createElement("div",{key:`item-${t}`,id:`sortBox-${t}`},e.map(i=>D({item:i,id:`sortBoxItem-${i==null?void 0:i.id}`,operation:{onDrag:N,onDragEnd:I}}))):D({item:e[0],id:`sortBox-${(n=e[0])==null?void 0:n.id}`,operation:{onDrag:N,onDragEnd:I}})}))))};module.exports=AnswerSort;
@@ -1 +1 @@
1
- "use strict";var React=require("react"),antd=require("antd"),reactI18next=require("react-i18next"),icons=require("@ant-design/icons");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const TextEditor=e=>{const{checkMode:o,newAnswer:l,textEditObject:u,updateValue:i}=e,{max:s,min:r}=u,{TextArea:c}=antd.Input,[a]=antd.Form.useForm(),{t:n}=reactI18next.useTranslation(),m=n("LeastCharacterError",{num:r});return React.useEffect(()=>{a.setFieldsValue({value:l}),o||a.validateFields()},[l]),React__default.default.createElement(antd.Form,{form:a,onValuesChange:(d,t)=>{const f=t.value;i(f)},style:{marginBottom:"16px"}},React__default.default.createElement("div",{style:{marginBottom:"16px"}},n("AnswerTextEdit"),React__default.default.createElement(antd.Popover,{placement:"bottom",content:n("ShowEditingResultDifferencesInTextModeOnly")},React__default.default.createElement(icons.InfoCircleOutlined,{style:{margin:"0px 4px",cursor:"pointer"}}))),React__default.default.createElement(antd.Form.Item,{name:"value",style:{marginBottom:8},rules:[{validator:(d,t="")=>r&&(t==null?void 0:t.length)<Number(r)?Promise.reject(m):Promise.resolve()}]},React__default.default.createElement(c,{maxLength:s,autoSize:{minRows:4,maxRows:10},allowClear:!0,disabled:o,showCount:!!s,style:{width:"100%"}})))};module.exports=TextEditor;
1
+ "use strict";var React=require("react"),antd=require("antd"),reactI18next=require("react-i18next"),icons=require("@ant-design/icons");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const TextEditor=e=>{const{checkMode:o,newAnswer:l,textEditObject:u,updateValue:i}=e,{max:s,min:t}=u,{TextArea:c}=antd.Input,[a]=antd.Form.useForm(),{t:n}=reactI18next.useTranslation(),m=n("LeastCharacterError",{num:t});return React.useEffect(()=>{a.setFieldsValue({value:l}),o||a.validateFields()},[l]),React__default.default.createElement(antd.Form,{form:a,onValuesChange:(d,r)=>{const f=r.value;i(f)},style:{marginBottom:"16px"}},React__default.default.createElement(antd.Form.Item,{name:"title",style:{marginBottom:"16px"},label:" ",colon:!1,required:!!t},n("AnswerTextEdit"),React__default.default.createElement(antd.Popover,{placement:"bottom",content:n("ShowEditingResultDifferencesInTextModeOnly")},React__default.default.createElement(icons.InfoCircleOutlined,{style:{margin:"0px 4px",cursor:"pointer"}}))),React__default.default.createElement(antd.Form.Item,{name:"value",style:{marginBottom:8},rules:[{validator:(d,r="")=>t&&(r==null?void 0:r.length)<Number(t)?Promise.reject(m):Promise.resolve()}]},React__default.default.createElement(c,{maxLength:s,autoSize:{minRows:4,maxRows:10},allowClear:!0,disabled:o,showCount:!!s,style:{width:"100%"}})))};module.exports=TextEditor;
@@ -1 +1 @@
1
- "use strict";var React=require("react"),index$4=require("../../../constant/index.js"),antd=require("antd"),index$1=require("./components/answerSort/index.js"),reactRedux=require("react-redux"),_=require("lodash"),index$2=require("./components/answerList/index.js"),ctx=require("../../../store/ctx.js"),index=require("../../../utils/index.js"),reducer=require("../../../store/annotation/reducer.js"),annotation=require("../../../hooks/annotation.js"),actionCreators=require("../../../store/annotation/actionCreators.js"),lbAnnotation=require("@labelbee/lb-annotation"),reactI18next=require("react-i18next"),data=require("../utils/data.js"),empty=require("../../../assets/annotation/LLMTool/empty.svg.js"),index$3=require("./components/textInputBox/index.js");function _interopDefaultLegacy(n){return n&&typeof n=="object"&&"default"in n?n:{default:n}}var React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(n,o,l)=>o in n?__defProp(n,o,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[o]=l,__spreadValues=(n,o)=>{for(var l in o||(o={}))__hasOwnProp.call(o,l)&&__defNormalProp(n,l,o[l]);if(__getOwnPropSymbols)for(var l of __getOwnPropSymbols(o))__propIsEnum.call(o,l)&&__defNormalProp(n,l,o[l]);return n},__spreadProps=(n,o)=>__defProps(n,__getOwnPropDescs(o));const EKeyCode=lbAnnotation.cKeyCode.default,sidebarCls=`${index$4.prefix}-sidebar`,LLMToolSidebar=n=>{var o;const{annotation:l,dispatch:g,checkMode:w}=n,{imgIndex:b,imgList:h,stepList:y,step:C,skipBeforePageTurning:L}=l,{modelAPIResponse:P}=React.useContext(ctx.LLMContext),{t:j}=reactI18next.useTranslation(),a=(o=h[b])!=null?o:{},$=index.jsonParser(a==null?void 0:a.result),{toolInstanceRef:q}=annotation.useCustomToolInstance({basicInfo:$}),[v,I]=React.useState(),[p,A]=React.useState([]),[E,T]=React.useState(void 0),[S,D]=React.useState([]),[M,F]=React.useState([]),{setNewAnswerList:B}=React.useContext(ctx.LLMContext);React.useEffect(()=>{var e;if(y&&C){const t=(e=reducer.getStepConfig(y,C))==null?void 0:e.config;I(index.jsonParser(t))}},[y,C]),React.useEffect(()=>{if(!a)return;const e=data.getCurrentResultFromResultList(a==null?void 0:a.result);let t=(e==null?void 0:e.answerList)?e:a==null?void 0:a.questionList;if(t==null?void 0:t.answerList){W(t.answerList);const s=K(t.answerList)||[];A(s)}T(e==null?void 0:e.textAttribute)},[b,a,v]),React.useEffect(()=>{q.current.exportData=()=>{const s=data.formatSort(S);return[[{answerList:p,sort:s,textAttribute:E,id:a==null?void 0:a.id,modelAPIResponse:P}],{}]};const e=data.formatSort(S),t={answerList:p,sort:e,textAttribute:E,id:a==null?void 0:a.id,toolName:lbAnnotation.EToolName.LLM,modelAPIResponse:P};q.current.currentPageResult=t,B(p)},[p,S,E,P]),React.useEffect(()=>(window.addEventListener("keydown",O),()=>{window.removeEventListener("keydown",O)}),[]);const K=e=>{const{isTextEdit:t,textEdit:s=[]}=v||{};return t?e.map(r=>{var u,i;return((u=s.filter(f=>f.title===r.order)[0])==null?void 0:u.isFillAnswer)?__spreadProps(__spreadValues({},r),{newAnswer:(i=r==null?void 0:r.newAnswer)!=null?i:r.answer}):r}):e},O=e=>{if(e.ctrlKey&&e.keyCode===EKeyCode.Enter){if(L){L(()=>g(actionCreators.PageForward()));return}g(actionCreators.PageForward())}},W=e=>{var t;let s=[],c=[];if((e==null?void 0:e.length)>0){const r=data.getCurrentResultFromResultList(a==null?void 0:a.result),u=(r==null?void 0:r.length)>0?r[0]:r;((t=u==null?void 0:u.sort)==null?void 0:t.length)>0&&(c=u.sort.reduce((i,d)=>{let f=[{title:d[0],id:d[0]}];return d.length>1&&(f=d.map(m=>({title:m,id:m}))),[...i,f]},[])),e.forEach(i=>{c.some(f=>f.length>1?f.some(m=>m.id===i.order):f[0].id===i.order)||s.push({title:i.order,id:i.order})})}D(c),F(s)},V=({order:e,value:t,key:s})=>{const c=p==null?void 0:p.map(r=>{var u;if((r==null?void 0:r.order)===e){if(s==="textEdit")return __spreadProps(__spreadValues({},r),{newAnswer:t});if(_.isNumber(t))return __spreadProps(__spreadValues({},r),{score:t});if(_.isObject(t)&&s){const i={[t==null?void 0:t.key]:t.value},d=(u=r[s])!=null?u:{};return __spreadProps(__spreadValues({},r),{[s]:__spreadValues(__spreadValues({},d),i)})}}return r});A(c)};if((()=>{var e,t;const{indicatorScore:s=[],indicatorDetermine:c=[],text:r=[],enableSort:u,isTextEdit:i}=v||{},d=((e=s==null?void 0:s.filter(x=>x.label&&x.value&&x.score))==null?void 0:e.length)>0,f=((t=c==null?void 0:c.filter(x=>x.label&&x.value))==null?void 0:t.length)>0,m=(r==null?void 0:r.length)>0;return!(d||f||m||u||i)})())return React__default.default.createElement("div",{className:`${sidebarCls}`},React__default.default.createElement("div",{className:`${sidebarCls}__content`,style:{display:"flex",justifyContent:"center",alignItems:"center"}},React__default.default.createElement(antd.Empty,{description:React__default.default.createElement("span",{style:{color:"#ccc"}},j("NoScoringScale")),imageStyle:{width:200,height:200},image:React__default.default.createElement("img",{src:empty})})));const{indicatorScore:N=[],indicatorDetermine:R=[],enableSort:k,isTextEdit:z}=v||{},G=p.length>0&&((R==null?void 0:R.length)>0||(N==null?void 0:N.length)>0||z);return React__default.default.createElement("div",{className:`${sidebarCls}`},React__default.default.createElement("div",{className:`${sidebarCls}__content`},k&&React__default.default.createElement(index$1,{waitSortList:M,sortList:S,setSortList:D,checkMode:w}),G&&React__default.default.createElement(index$2,{list:p,LLMConfig:v,updateValue:V,checkMode:w}),(v==null?void 0:v.text)&&React__default.default.createElement("div",{style:{padding:"0px 16px",marginTop:"16px"}},React__default.default.createElement(index$3,{textAttribute:E||[],LLMConfig:v,setText:T,checkMode:w}))),React__default.default.createElement("div",{style:{margin:"24px 16px",display:"flex"}},(h==null?void 0:h.length)-1!==b&&React__default.default.createElement(antd.Button,{type:"primary",style:{marginLeft:"auto"},onClick:()=>{if(L){L(()=>g(actionCreators.PageForward()));return}g(actionCreators.PageForward())},disabled:w},j("Save"))))},mapStateToProps=n=>({annotation:n.annotation});var LLMToolSidebar$1=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(LLMToolSidebar);module.exports=LLMToolSidebar$1;
1
+ "use strict";var React=require("react"),index$4=require("../../../constant/index.js"),antd=require("antd"),index$1=require("./components/answerSort/index.js"),reactRedux=require("react-redux"),_=require("lodash"),index$2=require("./components/answerList/index.js"),ctx=require("../../../store/ctx.js"),index=require("../../../utils/index.js"),reducer=require("../../../store/annotation/reducer.js"),annotation=require("../../../hooks/annotation.js"),actionCreators=require("../../../store/annotation/actionCreators.js"),lbAnnotation=require("@labelbee/lb-annotation"),reactI18next=require("react-i18next"),data=require("../utils/data.js"),empty=require("../../../assets/annotation/LLMTool/empty.svg.js"),index$3=require("./components/textInputBox/index.js");function _interopDefaultLegacy(n){return n&&typeof n=="object"&&"default"in n?n:{default:n}}var React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(n,i,c)=>i in n?__defProp(n,i,{enumerable:!0,configurable:!0,writable:!0,value:c}):n[i]=c,__spreadValues=(n,i)=>{for(var c in i||(i={}))__hasOwnProp.call(i,c)&&__defNormalProp(n,c,i[c]);if(__getOwnPropSymbols)for(var c of __getOwnPropSymbols(i))__propIsEnum.call(i,c)&&__defNormalProp(n,c,i[c]);return n},__spreadProps=(n,i)=>__defProps(n,__getOwnPropDescs(i));const EKeyCode=lbAnnotation.cKeyCode.default,sidebarCls=`${index$4.prefix}-sidebar`,LLMToolSidebar=n=>{var i;const{annotation:c,dispatch:x,checkMode:g}=n,{imgIndex:L,imgList:b,stepList:h,step:y,skipBeforePageTurning:S}=c,{modelAPIResponse:C}=React.useContext(ctx.LLMContext),{t:P}=reactI18next.useTranslation(),d=(i=b[L])!=null?i:{},N=index.jsonParser(d==null?void 0:d.result),{toolInstanceRef:j}=annotation.useCustomToolInstance({basicInfo:N}),[w,R]=React.useState(),{setNewAnswerList:D}=React.useContext(ctx.LLMContext),[a,E]=React.useState({});React.useEffect(()=>{var t;if(h&&y){const e=(t=reducer.getStepConfig(h,y))==null?void 0:t.config;R(index.jsonParser(e))}},[y,JSON.stringify(h)]),React.useEffect(()=>{if(!d||L===-1)return;const t=data.getCurrentResultFromResultList(d==null?void 0:d.result);let e=(t==null?void 0:t.answerList)?t:d==null?void 0:d.questionList,o=[],l=[],r=[];(e==null?void 0:e.answerList)&&(o=$(e.answerList)||[],l=A(e.answerList).newSort,r=A(e.answerList).waitSorts),E({newSort:l,waitSorts:r,answerList:o,text:t==null?void 0:t.textAttribute})},[L,w]),React.useEffect(()=>{const{newSort:t,answerList:e,text:o}=a;j.current.exportData=()=>{const s=data.formatSort(t||[]);return[[{answerList:e,sort:s,textAttribute:o,id:d==null?void 0:d.id,modelAPIResponse:C}],{}]};const l=data.formatSort(t||[]),r={answerList:e,sort:l,textAttribute:o,id:d==null?void 0:d.id,toolName:lbAnnotation.EToolName.LLM,modelAPIResponse:C};j.current.currentPageResult=r,D(e||[])},[a,C]),React.useEffect(()=>(window.addEventListener("keydown",q),()=>{window.removeEventListener("keydown",q)}),[]);const $=t=>{const{isTextEdit:e,textEdit:o=[]}=w||{};return e?t.map(r=>{var s,u;return((s=o.filter(f=>f.title===r.order)[0])==null?void 0:s.isFillAnswer)?__spreadProps(__spreadValues({},r),{newAnswer:(u=r==null?void 0:r.newAnswer)!=null?u:r.answer}):r}):t},q=t=>{if(t.ctrlKey&&t.keyCode===EKeyCode.Enter){if(S){S(()=>x(actionCreators.PageForward()));return}x(actionCreators.PageForward())}},A=t=>{var e;let o=[],l=[];if((t==null?void 0:t.length)>0){const r=data.getCurrentResultFromResultList(d==null?void 0:d.result),s=(r==null?void 0:r.length)>0?r[0]:r;((e=s==null?void 0:s.sort)==null?void 0:e.length)>0&&(l=s.sort.reduce((u,v)=>{let f=[{title:v[0],id:v[0]}];return v.length>1&&(f=v.map(p=>({title:p,id:p}))),[...u,f]},[])),t.forEach(u=>{l.some(f=>f.length>1?f.some(p=>p.id===u.order):f[0].id===u.order)||o.push({title:u.order,id:u.order})})}return{newSort:l,waitSorts:o}},I=({order:t,value:e,key:o})=>{const{answerList:l}=a,r=l==null?void 0:l.map(s=>{var u;if((s==null?void 0:s.order)===t){if(o==="textEdit"&&_.isString(e))return __spreadProps(__spreadValues({},s),{newAnswer:e});if(_.isNumber(e))return __spreadProps(__spreadValues({},s),{score:e});if(_.isObject(e)&&o){const v={[e==null?void 0:e.key]:e.value},f=(u=s[o])!=null?u:{};return __spreadProps(__spreadValues({},s),{[o]:__spreadValues(__spreadValues({},f),v)})}}return s});E(__spreadProps(__spreadValues({},a),{answerList:r||[]}))};if((()=>{var t,e;const{indicatorScore:o=[],indicatorDetermine:l=[],text:r=[],enableSort:s,isTextEdit:u}=w||{},v=((t=o==null?void 0:o.filter(m=>m.label&&m.value&&m.score))==null?void 0:t.length)>0,f=((e=l==null?void 0:l.filter(m=>m.label&&m.value))==null?void 0:e.length)>0,p=(r==null?void 0:r.length)>0;return!(v||f||p||s||u)})())return React__default.default.createElement("div",{className:`${sidebarCls}`},React__default.default.createElement("div",{className:`${sidebarCls}__content`,style:{display:"flex",justifyContent:"center",alignItems:"center"}},React__default.default.createElement(antd.Empty,{description:React__default.default.createElement("span",{style:{color:"#ccc"}},P("NoScoringScale")),imageStyle:{width:200,height:200},image:React__default.default.createElement("img",{src:empty})})));const{indicatorScore:T=[],indicatorDetermine:O=[],enableSort:M,isTextEdit:F}=w||{},B=((a==null?void 0:a.answerList)||[]).length>0&&((O==null?void 0:O.length)>0||(T==null?void 0:T.length)>0||F);return React__default.default.createElement("div",{className:`${sidebarCls}`},React__default.default.createElement("div",{className:`${sidebarCls}__content`},M&&React__default.default.createElement(index$1,{waitSortList:(a==null?void 0:a.waitSorts)||[],sortList:(a==null?void 0:a.newSort)||[],setSortList:t=>{E(__spreadProps(__spreadValues({},a),{newSort:t}))},checkMode:g}),B&&React__default.default.createElement(index$2,{list:(a==null?void 0:a.answerList)||[],LLMConfig:w,updateValue:I,checkMode:g}),(w==null?void 0:w.text)&&React__default.default.createElement("div",{style:{padding:"0px 16px",marginTop:"16px"}},React__default.default.createElement(index$3,{textAttribute:(a==null?void 0:a.text)||[],LLMConfig:w,setText:t=>E(__spreadProps(__spreadValues({},a),{text:t})),checkMode:g}))),React__default.default.createElement("div",{style:{margin:"24px 16px",display:"flex"}},(b==null?void 0:b.length)-1!==L&&React__default.default.createElement(antd.Button,{type:"primary",style:{marginLeft:"auto"},onClick:()=>{if(S){S(()=>x(actionCreators.PageForward()));return}x(actionCreators.PageForward())},disabled:g},P("Save"))))},mapStateToProps=n=>({annotation:n.annotation});var LLMToolSidebar$1=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(LLMToolSidebar);module.exports=LLMToolSidebar$1;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index=require("../../../utils/index.js");const getCurrentResultFromResultList=s=>{var n,r;const t=index.jsonParser(s),e="step_1";return(r=(n=t==null?void 0:t[e])==null?void 0:n.result[0])!=null?r:{}},formatSort=s=>s.reduce((r,t)=>{let e=t;return t.length>1?e=t.map(o=>o.id):e=[t[0].id],[...r,e]},[]);exports.formatSort=formatSort,exports.getCurrentResultFromResultList=getCurrentResultFromResultList;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index=require("../../../utils/index.js");const getCurrentResultFromResultList=n=>{var o,e;const t=index.jsonParser(n),r="step_1";return(e=(o=t==null?void 0:t[r])==null?void 0:o.result[0])!=null?e:{}},formatSort=n=>n.reduce((e,t)=>{var r;let s=t;return t.length>1?s=t.map(u=>u==null?void 0:u.id):s=[(r=t[0])==null?void 0:r.id],[...e,s]},[]);exports.formatSort=formatSort,exports.getCurrentResultFromResultList=getCurrentResultFromResultList;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.EStepType=void 0,function(a){a[a.Check=0]="Check",a[a.ANNOTATION=1]="ANNOTATION",a[a.QUALITY_INSPECTION=2]="QUALITY_INSPECTION",a[a.PRE_ANNOTATION=3]="PRE_ANNOTATION",a[a.MANUAL_CORRECTION=4]="MANUAL_CORRECTION"}(exports.EStepType||(exports.EStepType={})),exports.ESubmitType=void 0,function(a){a[a.Backward=1]="Backward",a[a.Forward=2]="Forward",a[a.Jump=3]="Jump",a[a.Quit=4]="Quit",a[a.Export=5]="Export",a[a.StepChanged=6]="StepChanged",a[a.Save=7]="Save",a[a.BatchUpdateTrackID=8]="BatchUpdateTrackID",a[a.BatchUpdateImgList=9]="BatchUpdateImgList",a[a.SyncImgList=10001]="SyncImgList",a[a.SyncCurrentPageData=10002]="SyncCurrentPageData"}(exports.ESubmitType||(exports.ESubmitType={}));const prefix="bee",componentCls=`${prefix}-component`;exports.EDataFormatType=void 0,function(a){a.Default="default",a.Markdown="markdown"}(exports.EDataFormatType||(exports.EDataFormatType={})),exports.componentCls=componentCls,exports.prefix=prefix;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.EStepType=void 0,function(o){o[o.Check=0]="Check",o[o.ANNOTATION=1]="ANNOTATION",o[o.QUALITY_INSPECTION=2]="QUALITY_INSPECTION",o[o.PRE_ANNOTATION=3]="PRE_ANNOTATION",o[o.MANUAL_CORRECTION=4]="MANUAL_CORRECTION"}(exports.EStepType||(exports.EStepType={})),exports.ESubmitType=void 0,function(o){o[o.Backward=1]="Backward",o[o.Forward=2]="Forward",o[o.Jump=3]="Jump",o[o.Quit=4]="Quit",o[o.Export=5]="Export",o[o.StepChanged=6]="StepChanged",o[o.Save=7]="Save",o[o.BatchUpdateTrackID=8]="BatchUpdateTrackID",o[o.BatchUpdateImgList=9]="BatchUpdateImgList",o[o.SyncImgList=10001]="SyncImgList",o[o.SyncCurrentPageData=10002]="SyncCurrentPageData"}(exports.ESubmitType||(exports.ESubmitType={}));const prefix="bee",componentCls=`${prefix}-component`;exports.EDataFormatType=void 0,function(o){o.Default="default",o.Markdown="markdown"}(exports.EDataFormatType||(exports.EDataFormatType={})),exports.ELLMDataType=void 0,function(o){o.Picture="picture",o.Text="text",o.None="none"}(exports.ELLMDataType||(exports.ELLMDataType={})),exports.componentCls=componentCls,exports.prefix=prefix;
package/dist/index.css CHANGED
@@ -2,6 +2,29 @@
2
2
  .index-module_markdownView__B6eyL h2 {
3
3
  border-bottom: none !important;
4
4
  }
5
+ .index-module_imgView__wmxDk {
6
+ display: flex;
7
+ flex-wrap: wrap;
8
+ }
9
+ .index-module_imgView__wmxDk .index-module_item__-80YI {
10
+ margin: 0px 40px 40px 0px;
11
+ min-width: 400px;
12
+ max-width: 500px;
13
+ display: flex;
14
+ height: 300px;
15
+ }
16
+ .index-module_imgView__wmxDk .index-module_item__-80YI .index-module_image__V49oW {
17
+ height: 260px;
18
+ min-width: 300px;
19
+ flex: 1;
20
+ background: #E9EBF1;
21
+ display: flex;
22
+ justify-content: center;
23
+ align-content: center;
24
+ }
25
+ .index-module_imgView__wmxDk .index-module_item__-80YI .index-module_image__V49oW .index-module_ant-image__pOA-I {
26
+ display: flex;
27
+ }
5
28
  .index-module_speedControllerWrap__aFz7r {
6
29
  display: flex;
7
30
  color: white;
@@ -2431,10 +2454,17 @@
2431
2454
  margin-bottom: 24px;
2432
2455
  width: 100%;
2433
2456
  }
2457
+ .bee-LLMView__tag {
2458
+ color: #666FFF;
2459
+ background: #eeefff;
2460
+ height: 20px;
2461
+ padding: 0px 8px;
2462
+ border: none;
2463
+ }
2434
2464
  .bee-LLMView__headerContent {
2435
2465
  font-weight: 500;
2436
2466
  font-size: 14px;
2437
- overflow-y: auto;
2467
+ overflow: auto;
2438
2468
  height: calc(100% - 54px);
2439
2469
  }
2440
2470
  .bee-LLMView__contentActive {
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index$1=require("./components/AnnotationView/index.js"),pointCloudAnnotationView=require("./components/AnnotationView/pointCloudAnnotationView.js"),index$2=require("./components/LLMToolView/questionView/index.js"),lbUtils=require("@labelbee/lb-utils"),React=require("react"),reactI18next=require("react-i18next"),reactRedux=require("react-redux"),App=require("./App.js"),configureStore=require("./configureStore.js"),actionCreators=require("./store/annotation/actionCreators.js"),TagToolInstanceAdaptorI18nProvider=require("./components/videoPlayer/TagToolInstanceAdaptorI18nProvider.js"),PointCloudContext=require("./components/pointCloudView/PointCloudContext.js"),ctx=require("./store/ctx.js"),index$4=require("./components/predictTracking/predictTrackingIcon/index.js"),index$3=require("./components/LLMToolView/index.js"),index$5=require("./views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.js"),index$6=require("./constant/index.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,r)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__spreadValues=(e,t)=>{for(var r in t||(t={}))__hasOwnProp.call(t,r)&&__defNormalProp(e,r,t[r]);if(__getOwnPropSymbols)for(var r of __getOwnPropSymbols(t))__propIsEnum.call(t,r)&&__defNormalProp(e,r,t[r]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t));const store=configureStore(),OutputApp=(e,t)=>{const[r,a]=React.useState();return React.useImperativeHandle(t,()=>({toolInstance:r,annotationEngine:store.getState().annotation.annotationEngine,pageBackwardActions:()=>store.dispatch(actionCreators.PageBackward()),pageForwardActions:()=>store.dispatch(actionCreators.PageForward()),pageJump:o=>{const n=~~o-1;store.dispatch(actionCreators.PageJump(n))},hello:()=>alert("hello labelBee!!!")}),[r]),React__default.default.createElement(reactRedux.Provider,{store,context:ctx.LabelBeeContext},React__default.default.createElement(reactI18next.I18nextProvider,{i18n:lbUtils.i18n},React__default.default.createElement(PointCloudContext.PointCloudProvider,null,React__default.default.createElement(App,__spreadProps(__spreadValues({},e),{setToolInstance:o=>{var n;a(o),(n=e.onLoad)==null||n.call(e,{toolInstance:o})}})))))};var index=React__default.default.forwardRef(OutputApp);exports.AnnotationView=index$1,exports.PointCloudAnnotationView=pointCloudAnnotationView,exports.QuestionView=index$2.default,Object.defineProperty(exports,"i18n",{enumerable:!0,get:function(){return lbUtils.i18n}}),exports.VideoTagTool=TagToolInstanceAdaptorI18nProvider.VideoTagTool,exports.PredictTracking=index$4,exports.LLMToolView=index$3,exports.SwitchCuboidBoxIn2DView=index$5,Object.defineProperty(exports,"EDataFormatType",{enumerable:!0,get:function(){return index$6.EDataFormatType}}),Object.defineProperty(exports,"EStepType",{enumerable:!0,get:function(){return index$6.EStepType}}),Object.defineProperty(exports,"ESubmitType",{enumerable:!0,get:function(){return index$6.ESubmitType}}),exports.componentCls=index$6.componentCls,exports.prefix=index$6.prefix,exports.default=index,exports.store=store;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index$1=require("./components/AnnotationView/index.js"),pointCloudAnnotationView=require("./components/AnnotationView/pointCloudAnnotationView.js"),index$2=require("./components/LLMToolView/questionView/index.js"),lbUtils=require("@labelbee/lb-utils"),React=require("react"),reactI18next=require("react-i18next"),reactRedux=require("react-redux"),App=require("./App.js"),configureStore=require("./configureStore.js"),actionCreators=require("./store/annotation/actionCreators.js"),TagToolInstanceAdaptorI18nProvider=require("./components/videoPlayer/TagToolInstanceAdaptorI18nProvider.js"),PointCloudContext=require("./components/pointCloudView/PointCloudContext.js"),ctx=require("./store/ctx.js"),index$4=require("./components/predictTracking/predictTrackingIcon/index.js"),index$3=require("./components/LLMToolView/index.js"),index$5=require("./views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.js"),index$6=require("./constant/index.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,r)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__spreadValues=(e,t)=>{for(var r in t||(t={}))__hasOwnProp.call(t,r)&&__defNormalProp(e,r,t[r]);if(__getOwnPropSymbols)for(var r of __getOwnPropSymbols(t))__propIsEnum.call(t,r)&&__defNormalProp(e,r,t[r]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t));const store=configureStore(),OutputApp=(e,t)=>{const[r,a]=React.useState();return React.useImperativeHandle(t,()=>({toolInstance:r,annotationEngine:store.getState().annotation.annotationEngine,pageBackwardActions:()=>store.dispatch(actionCreators.PageBackward()),pageForwardActions:()=>store.dispatch(actionCreators.PageForward()),pageJump:o=>{const n=~~o-1;store.dispatch(actionCreators.PageJump(n))},hello:()=>alert("hello labelBee!!!")}),[r]),React__default.default.createElement(reactRedux.Provider,{store,context:ctx.LabelBeeContext},React__default.default.createElement(reactI18next.I18nextProvider,{i18n:lbUtils.i18n},React__default.default.createElement(PointCloudContext.PointCloudProvider,null,React__default.default.createElement(App,__spreadProps(__spreadValues({},e),{setToolInstance:o=>{var n;a(o),(n=e.onLoad)==null||n.call(e,{toolInstance:o})}})))))};var index=React__default.default.forwardRef(OutputApp);exports.AnnotationView=index$1,exports.PointCloudAnnotationView=pointCloudAnnotationView,exports.QuestionView=index$2.default,Object.defineProperty(exports,"i18n",{enumerable:!0,get:function(){return lbUtils.i18n}}),exports.VideoTagTool=TagToolInstanceAdaptorI18nProvider.VideoTagTool,exports.PredictTracking=index$4,exports.LLMToolView=index$3,exports.SwitchCuboidBoxIn2DView=index$5,Object.defineProperty(exports,"EDataFormatType",{enumerable:!0,get:function(){return index$6.EDataFormatType}}),Object.defineProperty(exports,"ELLMDataType",{enumerable:!0,get:function(){return index$6.ELLMDataType}}),Object.defineProperty(exports,"EStepType",{enumerable:!0,get:function(){return index$6.EStepType}}),Object.defineProperty(exports,"ESubmitType",{enumerable:!0,get:function(){return index$6.ESubmitType}}),exports.componentCls=index$6.componentCls,exports.prefix=index$6.prefix,exports.default=index,exports.store=store;
@@ -7,7 +7,7 @@ interface IProps {
7
7
  annotation?: any;
8
8
  modelAPIResponse: IModelAPIAnswer[];
9
9
  question: string;
10
- setModelAPIResponse?: (data: IModelAPIAnswer[]) => void;
10
+ setModelAPIResponse?: React.Dispatch<React.SetStateAction<IModelAPIAnswer[]>>;
11
11
  }
12
12
  declare const ModelAPIView: React.FC<IProps>;
13
13
  export default ModelAPIView;
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { EDataFormatType } from '@/constant';
3
+ interface IProps {
4
+ question: string | {
5
+ id: number;
6
+ path: string;
7
+ url: string;
8
+ processedUrl: string;
9
+ thumbnail: string;
10
+ };
11
+ dataFormatType: EDataFormatType;
12
+ setDataFormatType: (v: EDataFormatType) => void;
13
+ isImg?: boolean;
14
+ }
15
+ declare const Header: (props: IProps) => React.JSX.Element;
16
+ export default Header;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { IAnswerList } from '@/components/LLMToolView/types';
3
+ interface IProps {
4
+ hoverKey?: number;
5
+ answerList: IAnswerList[];
6
+ }
7
+ declare const ImgView: (props: IProps) => React.JSX.Element;
8
+ export default ImgView;
@@ -2,10 +2,16 @@ import React from 'react';
2
2
  import { IAnswerList, IModelAPIAnswer, ILLMToolConfig } from '@/components/LLMToolView/types';
3
3
  interface IProps {
4
4
  hoverKey?: number;
5
- question: string;
5
+ question: string | {
6
+ id: number;
7
+ path: string;
8
+ url: string;
9
+ processedUrl: string;
10
+ thumbnail: string;
11
+ };
6
12
  answerList: IAnswerList[];
7
13
  modelAPIResponse: IModelAPIAnswer[];
8
- setModelAPIResponse?: (data: IModelAPIAnswer[]) => void;
14
+ setModelAPIResponse?: React.Dispatch<React.SetStateAction<IModelAPIAnswer[]>>;
9
15
  lang?: string;
10
16
  checkMode?: boolean;
11
17
  annotation?: any;
@@ -19,10 +19,12 @@ export interface IAnswerList {
19
19
  [key: string]: boolean;
20
20
  };
21
21
  newAnswer?: string;
22
+ url?: string;
22
23
  }
23
24
  export interface IModelAPIAnswer {
24
25
  id: string;
25
26
  answer: string;
27
+ name: string;
26
28
  }
27
29
  declare interface IModelAPIConfig {
28
30
  id: string;
@@ -24,3 +24,8 @@ export declare enum EDataFormatType {
24
24
  Default = "default",
25
25
  Markdown = "markdown"
26
26
  }
27
+ export declare enum ELLMDataType {
28
+ Picture = "picture",
29
+ Text = "text",
30
+ None = "none"
31
+ }
@@ -6,7 +6,7 @@ interface ILLMContext {
6
6
  newAnswerList: IAnswerList[];
7
7
  setHoverKey: (value: number) => void;
8
8
  modelAPIResponse: IModelAPIAnswer[];
9
- setModelAPIResponse: (value: IModelAPIAnswer[]) => void;
9
+ setModelAPIResponse: React.Dispatch<React.SetStateAction<IModelAPIAnswer[]>>;
10
10
  setNewAnswerList: (value: IAnswerList[]) => void;
11
11
  }
12
12
  export declare const LabelBeeContext: any;
@@ -0,0 +1 @@
1
+ var C="data:image/svg+xml,%3csvg width='381' height='221' viewBox='0 0 381 221' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3crect width='381' height='221' fill='%23E9EBF1' /%3e %3cpath d='M151.892 166.858L152.368 166.144C154.244 166.354 156.638 166.886 157.996 167.348L157.52 168.118C156.204 167.642 153.796 167.082 151.892 166.858ZM153.278 165.094L153.698 164.464C154.818 164.688 156.218 165.136 157.002 165.486L156.568 166.186C155.798 165.808 154.384 165.332 153.278 165.094ZM153.39 161.048L153.306 161.132C153.768 161.636 154.37 162.098 155.084 162.504C155.84 162.07 156.498 161.58 157.002 161.048H153.39ZM157.87 160.194L158.458 160.558C157.87 161.482 156.988 162.28 155.966 162.952C157.03 163.456 158.262 163.834 159.48 164.058C159.298 164.24 159.032 164.604 158.906 164.842C157.59 164.562 156.274 164.086 155.112 163.456C153.796 164.17 152.34 164.688 150.968 164.996C150.87 164.758 150.646 164.352 150.478 164.142C151.71 163.918 153.04 163.484 154.23 162.938C153.67 162.56 153.152 162.14 152.718 161.692C152.298 162.07 151.878 162.406 151.444 162.686C151.29 162.518 150.94 162.196 150.73 162.056C151.92 161.356 153.11 160.278 153.81 159.144L154.664 159.424C154.51 159.704 154.314 159.97 154.104 160.236H157.702L157.87 160.194ZM150.226 168.566H159.76V158.85H150.226V168.566ZM149.218 157.898H160.782V170.078H159.76V169.49H150.226V170.078H149.218V157.898ZM165.626 161.944V162.28C165.626 162.91 165.612 163.54 165.57 164.17H172.444V170.064H171.338V165.234H165.458C165.234 166.984 164.688 168.678 163.4 170.092C163.232 169.84 162.84 169.462 162.602 169.28C164.366 167.306 164.562 164.73 164.562 162.294V157.66H165.626V160.894H169.588V157.31H170.68V160.894H174.6V161.944H165.626ZM182.888 159.83V160.376C182.622 166.452 182.398 168.524 181.894 169.168C181.614 169.546 181.348 169.658 180.942 169.7C180.578 169.756 180.004 169.756 179.416 169.714C179.388 169.392 179.276 168.944 179.108 168.65C179.696 168.706 180.228 168.72 180.48 168.72C180.704 168.72 180.83 168.664 180.97 168.482C181.362 168.034 181.614 166.102 181.838 160.852H179.864C179.696 164.352 179.178 167.838 177.428 170.008C177.232 169.77 176.882 169.462 176.602 169.308C178.24 167.362 178.702 164.114 178.842 160.852H176.91V159.83H178.87C178.898 158.976 178.898 158.122 178.898 157.324H179.934C179.934 158.136 179.92 158.976 179.892 159.83H182.888ZM184.96 167.838H187.676V160.04H184.96V167.838ZM183.938 159.032H188.74V169.77H187.676V168.846H184.96V169.868H183.938V159.032ZM202.74 159.354L201.97 159.9C201.648 159.382 200.906 158.612 200.276 158.066L201.018 157.59C201.648 158.08 202.418 158.836 202.74 159.354ZM198.176 167.054V167.922C197.336 168.02 196.496 168.104 195.656 168.188V170.022H194.676V168.272C193.318 168.412 192.058 168.538 191.05 168.65L190.938 167.684C191.932 167.614 193.234 167.502 194.676 167.376V165.99H192.856C192.282 165.99 191.862 166.074 191.736 166.186C191.68 165.976 191.54 165.486 191.414 165.234C191.624 165.192 191.834 164.912 192.058 164.534C192.17 164.366 192.352 163.988 192.59 163.526H191.008V162.672H192.968C193.164 162.238 193.346 161.776 193.486 161.314L194.508 161.594C194.368 161.958 194.214 162.322 194.046 162.672H198.162V163.526H193.64C193.346 164.086 193.038 164.632 192.744 165.094H194.676V163.96H195.656V165.094H197.868V165.99H195.656V167.292C196.482 167.222 197.35 167.138 198.176 167.054ZM201.704 162L202.642 162.266C202.152 163.988 201.438 165.64 200.528 167.068C200.92 168.272 201.438 168.944 202.04 168.944C202.39 168.944 202.53 168.342 202.614 166.704C202.824 166.942 203.174 167.138 203.426 167.236C203.258 169.322 202.922 169.952 201.956 169.952C201.046 169.952 200.36 169.252 199.842 168.062C199.24 168.832 198.568 169.518 197.826 170.106C197.658 169.882 197.35 169.574 197.098 169.392C197.994 168.762 198.778 167.922 199.45 166.956C199.03 165.458 198.764 163.498 198.638 161.286H190.798V160.446H194.172V159.256H191.512V158.416H194.172V157.296H195.166V158.416H197.63V159.256H195.166V160.446H198.596C198.54 159.452 198.512 158.388 198.512 157.324H199.534C199.52 158.416 199.534 159.466 199.576 160.446H203.258V161.286H199.632C199.73 163.022 199.926 164.548 200.178 165.78C200.822 164.618 201.354 163.316 201.704 162ZM217.216 164.576H211.896C212.862 166.928 214.696 168.482 217.538 169.112C217.3 169.336 217.006 169.77 216.838 170.064C213.94 169.308 212.106 167.614 211.028 165.01C210.384 167.012 208.844 168.846 205.274 170.078C205.176 169.826 204.854 169.392 204.63 169.182C208.004 168.048 209.432 166.382 210.02 164.576H204.798V163.54H210.258C210.37 162.896 210.398 162.252 210.398 161.608V160.768H207.262C206.842 161.608 206.38 162.364 205.89 162.966C205.666 162.798 205.162 162.532 204.882 162.42C205.96 161.23 206.828 159.382 207.332 157.492L208.424 157.73C208.228 158.416 208.004 159.088 207.724 159.732H210.398V157.296H211.462V159.732H216.026V160.768H211.462V161.608C211.462 162.252 211.434 162.896 211.35 163.54H217.216V164.576ZM220.156 158.906V166.424H219.288V157.968H224.23V166.382H223.32V158.906H220.156ZM222.214 159.858V163.61C222.214 165.682 221.892 168.384 219.232 170.064C219.092 169.868 218.812 169.546 218.588 169.364C221.122 167.908 221.304 165.402 221.304 163.61V159.858H222.214ZM222.06 167.194L222.788 166.76C223.404 167.53 224.188 168.566 224.566 169.196L223.796 169.728C223.432 169.084 222.662 167.992 222.06 167.194ZM229.326 160.684H226.708C226.568 161.104 226.4 161.51 226.218 161.902C226.624 163.372 227.184 164.744 227.926 165.934C228.612 164.576 229.088 162.868 229.326 160.684ZM231.202 160.684H230.222C229.942 163.246 229.354 165.234 228.5 166.774C229.326 167.866 230.306 168.734 231.44 169.28C231.23 169.462 230.95 169.826 230.782 170.05C229.704 169.476 228.766 168.636 227.982 167.614C227.226 168.706 226.302 169.504 225.252 170.078C225.14 169.854 224.818 169.476 224.622 169.322C225.728 168.748 226.652 167.936 227.408 166.816C226.68 165.724 226.106 164.436 225.658 163.05C225.476 163.344 225.294 163.638 225.126 163.89C225 163.694 224.678 163.246 224.482 163.05C225.476 161.678 226.204 159.564 226.624 157.408L227.576 157.618C227.422 158.332 227.24 159.046 227.03 159.732H231.202V160.684Z' fill='%23999999' /%3e %3cpath d='M205 85.625C205 87.1168 205.593 88.5476 206.648 89.6025C207.702 90.6574 209.133 91.25 210.625 91.25C212.117 91.25 213.548 90.6574 214.602 89.6025C215.657 88.5476 216.25 87.1168 216.25 85.625C216.25 84.1332 215.657 82.7024 214.602 81.6475C213.548 80.5926 212.117 80 210.625 80C209.133 80 207.702 80.5926 206.648 81.6475C205.593 82.7024 205 84.1332 205 85.625Z' fill='black' fill-opacity='0.1' /%3e %3cpath d='M228.117 69.11C227.901 68.8622 227.638 68.6593 227.344 68.513C227.05 68.3668 226.73 68.2799 226.402 68.2575L190.762 65.765C190.358 65.7338 189.954 65.8023 189.583 65.9645C189.212 66.1266 188.887 66.3775 188.637 66.695L181.434 75.6675C181.069 76.1225 180.874 76.691 180.883 77.2745C180.893 77.858 181.106 78.4198 181.487 78.8625L192.904 92.14L181.384 107.347L184.234 93.8025C184.329 93.3529 184.298 92.8858 184.144 92.4528C183.991 92.0197 183.721 91.6372 183.364 91.3475L168.407 79.18L174.627 69.36C174.874 68.9694 175.008 68.5179 175.014 68.0557C175.019 67.5936 174.897 67.1388 174.66 66.742C174.423 66.3452 174.081 66.0219 173.671 65.8079C173.261 65.594 172.8 65.4978 172.339 65.53L153.574 66.84C153.247 66.8629 152.927 66.9501 152.633 67.0966C152.339 67.2432 152.076 67.4463 151.861 67.6942C151.645 67.9422 151.481 68.2302 151.377 68.5418C151.273 68.8533 151.231 69.1823 151.254 69.51L155.614 131.855C155.638 132.183 155.726 132.504 155.873 132.798C156.02 133.093 156.224 133.355 156.473 133.57C156.722 133.786 157.011 133.95 157.324 134.054C157.636 134.158 157.966 134.199 158.294 134.175L172.084 133.145C173.462 133.042 174.494 131.842 174.389 130.467C174.284 129.092 173.094 128.042 171.709 128.16L160.424 129.002L159.922 121.775L169.712 120.792C170.039 120.76 170.356 120.663 170.645 120.508C170.935 120.353 171.191 120.142 171.399 119.888C171.607 119.634 171.763 119.341 171.858 119.026C171.953 118.712 171.985 118.382 171.952 118.055C171.883 117.396 171.557 116.791 171.044 116.372C170.531 115.952 169.874 115.752 169.214 115.815L159.574 116.785L156.417 71.655L167.757 70.8625L162.994 78.38C162.667 78.8971 162.54 79.5164 162.639 80.1204C162.738 80.7245 163.054 81.2714 163.529 81.6575L179.029 94.2625L174.439 116.082C174.365 116.466 174.385 116.861 174.497 117.235C174.482 117.527 174.519 117.819 174.607 118.097L178.632 130.172C178.785 130.634 179.07 131.04 179.451 131.342C179.832 131.644 180.293 131.829 180.777 131.872L221.644 135.587C221.976 135.617 222.31 135.581 222.627 135.48C222.944 135.379 223.237 135.216 223.491 135.001C223.744 134.785 223.952 134.522 224.103 134.225C224.253 133.928 224.343 133.604 224.367 133.272L228.724 70.925C228.77 70.2635 228.551 69.6108 228.117 69.11ZM220.389 118.395L188.157 115.297C187.829 115.261 187.498 115.291 187.182 115.384C186.866 115.478 186.572 115.635 186.318 115.844C186.063 116.054 185.854 116.312 185.701 116.605C185.548 116.897 185.456 117.216 185.429 117.545C185.398 117.872 185.431 118.202 185.527 118.516C185.623 118.83 185.78 119.121 185.989 119.375C186.198 119.628 186.455 119.838 186.745 119.992C187.035 120.146 187.352 120.241 187.679 120.272L220.042 123.382L219.552 130.377L182.854 127.04L179.762 117.765L198.107 93.545C198.453 93.0897 198.632 92.5294 198.614 91.9577C198.596 91.3861 198.383 90.8379 198.009 90.405L186.632 77.175L191.717 70.8425L223.559 73.0675L220.389 118.395Z' fill='black' fill-opacity='0.1' /%3e%3c/svg%3e";export{C as default};
@@ -0,0 +1 @@
1
+ var C="data:image/svg+xml,%3csvg width='381' height='221' viewBox='0 0 381 221' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3crect width='381' height='221' fill='%23E9EBF1' /%3e %3cpath d='M126.04 169.182C123.954 169.182 122.358 168.062 122.358 164.758V158.738H123.66V164.8C123.66 167.278 124.71 168.048 126.04 168.048C127.412 168.048 128.49 167.278 128.49 164.8V158.738H129.736V164.758C129.736 168.062 128.14 169.182 126.04 169.182ZM132.378 169V161.398H133.428L133.54 162.49H133.582C134.31 161.776 135.094 161.202 136.13 161.202C137.726 161.202 138.454 162.238 138.454 164.184V169H137.18V164.352C137.18 162.924 136.746 162.322 135.738 162.322C134.954 162.322 134.422 162.714 133.652 163.484V169H132.378ZM142.686 169.182C141.412 169.182 140.46 168.398 140.46 167.026C140.46 165.374 141.902 164.548 145.136 164.184C145.136 163.204 144.814 162.266 143.568 162.266C142.686 162.266 141.888 162.672 141.286 163.078L140.782 162.196C141.482 161.748 142.56 161.202 143.778 161.202C145.626 161.202 146.41 162.448 146.41 164.324V169H145.36L145.248 168.09H145.206C144.478 168.692 143.624 169.182 142.686 169.182ZM143.05 168.16C143.792 168.16 144.394 167.81 145.136 167.152V165.024C142.574 165.332 141.706 165.962 141.706 166.942C141.706 167.81 142.294 168.16 143.05 168.16ZM152.185 169.182C151.485 169.182 150.687 168.832 150.015 168.216H149.973L149.861 169H148.839V157.856H150.113V160.908L150.071 162.28C150.757 161.678 151.611 161.202 152.451 161.202C154.425 161.202 155.489 162.742 155.489 165.066C155.489 167.684 153.935 169.182 152.185 169.182ZM151.975 168.118C153.235 168.118 154.159 166.984 154.159 165.094C154.159 163.414 153.599 162.28 152.157 162.28C151.513 162.28 150.841 162.644 150.113 163.33V167.32C150.785 167.908 151.471 168.118 151.975 168.118ZM158.837 169.182C157.885 169.182 157.493 168.566 157.493 167.488V157.856H158.767V167.572C158.767 167.964 158.935 168.118 159.131 168.118C159.201 168.118 159.257 168.118 159.397 168.09L159.579 169.07C159.397 169.14 159.173 169.182 158.837 169.182ZM164.551 169.182C162.535 169.182 160.911 167.712 160.911 165.206C160.911 162.742 162.577 161.202 164.341 161.202C166.273 161.202 167.365 162.602 167.365 164.772C167.365 165.052 167.337 165.318 167.309 165.5H162.185C162.269 167.124 163.263 168.16 164.705 168.16C165.447 168.16 166.049 167.936 166.609 167.558L167.071 168.398C166.399 168.832 165.587 169.182 164.551 169.182ZM162.171 164.59H166.245C166.245 163.05 165.545 162.224 164.355 162.224C163.277 162.224 162.325 163.092 162.171 164.59ZM174.762 169.182C173.138 169.182 172.592 168.174 172.592 166.648V162.434H171.458V161.468L172.648 161.398L172.802 159.27H173.866V161.398H175.924V162.434H173.866V166.676C173.866 167.614 174.16 168.146 175.042 168.146C175.308 168.146 175.658 168.048 175.91 167.95L176.162 168.902C175.728 169.042 175.224 169.182 174.762 169.182ZM180.394 169.182C178.532 169.182 176.866 167.726 176.866 165.206C176.866 162.672 178.532 161.202 180.394 161.202C182.256 161.202 183.922 162.672 183.922 165.206C183.922 167.726 182.256 169.182 180.394 169.182ZM180.394 168.118C181.71 168.118 182.606 166.956 182.606 165.206C182.606 163.456 181.71 162.266 180.394 162.266C179.078 162.266 178.196 163.456 178.196 165.206C178.196 166.956 179.078 168.118 180.394 168.118ZM190.405 169.182C189.453 169.182 189.061 168.566 189.061 167.488V157.856H190.335V167.572C190.335 167.964 190.503 168.118 190.699 168.118C190.769 168.118 190.825 168.118 190.965 168.09L191.147 169.07C190.965 169.14 190.741 169.182 190.405 169.182ZM196.008 169.182C194.146 169.182 192.48 167.726 192.48 165.206C192.48 162.672 194.146 161.202 196.008 161.202C197.87 161.202 199.536 162.672 199.536 165.206C199.536 167.726 197.87 169.182 196.008 169.182ZM196.008 168.118C197.324 168.118 198.22 166.956 198.22 165.206C198.22 163.456 197.324 162.266 196.008 162.266C194.692 162.266 193.81 163.456 193.81 165.206C193.81 166.956 194.692 168.118 196.008 168.118ZM203.075 169.182C201.801 169.182 200.849 168.398 200.849 167.026C200.849 165.374 202.291 164.548 205.525 164.184C205.525 163.204 205.203 162.266 203.957 162.266C203.075 162.266 202.277 162.672 201.675 163.078L201.171 162.196C201.871 161.748 202.949 161.202 204.167 161.202C206.015 161.202 206.799 162.448 206.799 164.324V169H205.749L205.637 168.09H205.595C204.867 168.692 204.013 169.182 203.075 169.182ZM203.439 168.16C204.181 168.16 204.783 167.81 205.525 167.152V165.024C202.963 165.332 202.095 165.962 202.095 166.942C202.095 167.81 202.683 168.16 203.439 168.16ZM211.817 169.182C209.913 169.182 208.681 167.74 208.681 165.206C208.681 162.742 210.235 161.202 211.971 161.202C212.867 161.202 213.441 161.538 214.113 162.098L214.043 160.782V157.856H215.317V169H214.281L214.155 168.104H214.127C213.525 168.692 212.727 169.182 211.817 169.182ZM212.097 168.118C212.797 168.118 213.413 167.768 214.043 167.068V163.078C213.399 162.504 212.825 162.28 212.195 162.28C210.963 162.28 209.997 163.456 209.997 165.192C209.997 167.026 210.753 168.118 212.097 168.118ZM221.04 169V161.398H222.314V169H221.04ZM221.684 159.83C221.18 159.83 220.802 159.48 220.802 159.004C220.802 158.486 221.18 158.178 221.684 158.178C222.188 158.178 222.566 158.486 222.566 159.004C222.566 159.48 222.188 159.83 221.684 159.83ZM224.895 169V161.398H225.945L226.057 162.504H226.099C226.757 161.776 227.555 161.202 228.465 161.202C229.627 161.202 230.257 161.762 230.565 162.658C231.349 161.804 232.147 161.202 233.071 161.202C234.639 161.202 235.381 162.238 235.381 164.184V169H234.107V164.352C234.107 162.924 233.659 162.322 232.693 162.322C232.105 162.322 231.489 162.7 230.775 163.484V169H229.501V164.352C229.501 162.924 229.053 162.322 228.087 162.322C227.513 162.322 226.869 162.7 226.169 163.484V169H224.895ZM239.606 169.182C238.332 169.182 237.38 168.398 237.38 167.026C237.38 165.374 238.822 164.548 242.056 164.184C242.056 163.204 241.734 162.266 240.488 162.266C239.606 162.266 238.808 162.672 238.206 163.078L237.702 162.196C238.402 161.748 239.48 161.202 240.698 161.202C242.546 161.202 243.33 162.448 243.33 164.324V169H242.28L242.168 168.09H242.126C241.398 168.692 240.544 169.182 239.606 169.182ZM239.97 168.16C240.712 168.16 241.314 167.81 242.056 167.152V165.024C239.494 165.332 238.626 165.962 238.626 166.942C238.626 167.81 239.214 168.16 239.97 168.16ZM248.321 172.5C246.459 172.5 245.171 171.772 245.171 170.456C245.171 169.812 245.591 169.196 246.305 168.734V168.678C245.899 168.44 245.605 168.034 245.605 167.432C245.605 166.802 246.067 166.298 246.459 166.018V165.962C245.955 165.556 245.465 164.828 245.465 163.918C245.465 162.252 246.781 161.202 248.321 161.202C248.741 161.202 249.119 161.3 249.385 161.398H252.031V162.378H250.477C250.841 162.728 251.093 163.288 251.093 163.946C251.093 165.57 249.861 166.592 248.321 166.592C247.943 166.592 247.523 166.494 247.187 166.326C246.907 166.564 246.697 166.816 246.697 167.236C246.697 167.726 247.005 168.062 248.027 168.062H249.511C251.275 168.062 252.157 168.622 252.157 169.868C252.157 171.282 250.673 172.5 248.321 172.5ZM248.321 165.724C249.189 165.724 249.931 165.024 249.931 163.918C249.931 162.812 249.217 162.14 248.321 162.14C247.425 162.14 246.697 162.798 246.697 163.918C246.697 165.024 247.439 165.724 248.321 165.724ZM248.503 171.632C249.959 171.632 250.925 170.862 250.925 170.064C250.925 169.364 250.379 169.126 249.371 169.126H248.055C247.775 169.126 247.411 169.084 247.075 169C246.529 169.392 246.291 169.84 246.291 170.288C246.291 171.1 247.117 171.632 248.503 171.632ZM256.508 169.182C254.492 169.182 252.868 167.712 252.868 165.206C252.868 162.742 254.534 161.202 256.298 161.202C258.23 161.202 259.322 162.602 259.322 164.772C259.322 165.052 259.294 165.318 259.266 165.5H254.142C254.226 167.124 255.22 168.16 256.662 168.16C257.404 168.16 258.006 167.936 258.566 167.558L259.028 168.398C258.356 168.832 257.544 169.182 256.508 169.182ZM254.128 164.59H258.202C258.202 163.05 257.502 162.224 256.312 162.224C255.234 162.224 254.282 163.092 254.128 164.59Z' fill='%23999999' /%3e %3cpath d='M205 85.625C205 87.1168 205.593 88.5476 206.648 89.6025C207.702 90.6574 209.133 91.25 210.625 91.25C212.117 91.25 213.548 90.6574 214.602 89.6025C215.657 88.5476 216.25 87.1168 216.25 85.625C216.25 84.1332 215.657 82.7024 214.602 81.6475C213.548 80.5926 212.117 80 210.625 80C209.133 80 207.702 80.5926 206.648 81.6475C205.593 82.7024 205 84.1332 205 85.625Z' fill='black' fill-opacity='0.1' /%3e %3cpath d='M228.117 69.11C227.901 68.8622 227.638 68.6593 227.344 68.513C227.05 68.3668 226.73 68.2799 226.402 68.2575L190.762 65.765C190.358 65.7338 189.954 65.8023 189.583 65.9645C189.212 66.1266 188.887 66.3775 188.637 66.695L181.434 75.6675C181.069 76.1225 180.874 76.691 180.883 77.2745C180.893 77.858 181.106 78.4198 181.487 78.8625L192.904 92.14L181.384 107.347L184.234 93.8025C184.329 93.3529 184.298 92.8858 184.144 92.4528C183.991 92.0197 183.721 91.6372 183.364 91.3475L168.407 79.18L174.627 69.36C174.874 68.9694 175.008 68.5179 175.014 68.0557C175.019 67.5936 174.897 67.1388 174.66 66.742C174.423 66.3452 174.081 66.0219 173.671 65.8079C173.261 65.594 172.8 65.4978 172.339 65.53L153.574 66.84C153.247 66.8629 152.927 66.9501 152.633 67.0966C152.339 67.2432 152.076 67.4463 151.861 67.6942C151.645 67.9422 151.481 68.2302 151.377 68.5418C151.273 68.8533 151.231 69.1823 151.254 69.51L155.614 131.855C155.638 132.183 155.726 132.504 155.873 132.798C156.02 133.093 156.224 133.355 156.473 133.57C156.722 133.786 157.011 133.95 157.324 134.054C157.636 134.158 157.966 134.199 158.294 134.175L172.084 133.145C173.462 133.042 174.494 131.842 174.389 130.467C174.284 129.092 173.094 128.042 171.709 128.16L160.424 129.002L159.922 121.775L169.712 120.792C170.039 120.76 170.356 120.663 170.645 120.508C170.935 120.353 171.191 120.142 171.399 119.888C171.607 119.634 171.763 119.341 171.858 119.026C171.953 118.712 171.985 118.382 171.952 118.055C171.883 117.396 171.557 116.791 171.044 116.372C170.531 115.952 169.874 115.752 169.214 115.815L159.574 116.785L156.417 71.655L167.757 70.8625L162.994 78.38C162.667 78.8971 162.54 79.5164 162.639 80.1204C162.738 80.7245 163.054 81.2714 163.529 81.6575L179.029 94.2625L174.439 116.082C174.365 116.466 174.385 116.861 174.497 117.235C174.482 117.527 174.519 117.819 174.607 118.097L178.632 130.172C178.785 130.634 179.07 131.04 179.451 131.342C179.832 131.644 180.293 131.829 180.777 131.872L221.644 135.587C221.976 135.617 222.31 135.581 222.627 135.48C222.944 135.379 223.237 135.216 223.491 135.001C223.744 134.785 223.952 134.522 224.103 134.225C224.253 133.928 224.343 133.604 224.367 133.272L228.724 70.925C228.77 70.2635 228.551 69.6108 228.117 69.11ZM220.389 118.395L188.157 115.297C187.829 115.261 187.498 115.291 187.182 115.384C186.866 115.478 186.572 115.635 186.318 115.844C186.063 116.054 185.854 116.312 185.701 116.605C185.548 116.897 185.456 117.216 185.429 117.545C185.398 117.872 185.431 118.202 185.527 118.516C185.623 118.83 185.78 119.121 185.989 119.375C186.198 119.628 186.455 119.838 186.745 119.992C187.035 120.146 187.352 120.241 187.679 120.272L220.042 123.382L219.552 130.377L182.854 127.04L179.762 117.765L198.107 93.545C198.453 93.0897 198.632 92.5294 198.614 91.9577C198.596 91.3861 198.383 90.8379 198.009 90.405L186.632 77.175L191.717 70.8425L223.559 73.0675L220.389 118.395Z' fill='black' fill-opacity='0.1' /%3e%3c/svg%3e";export{C as default};
@@ -1 +1 @@
1
- import i,{useContext as P,useState as m,useEffect as f}from"react";import{connect as S}from"react-redux";import{LabelBeeContext as _,LLMContext as $}from"../../store/ctx.js";import{message as b}from"antd";import{prefix as y}from"../../constant/index.js";import{Layout as D}from"antd/es";import N from"./questionView/index.js";import{useTranslation as Q}from"react-i18next";import k from"../../views/MainView/annotationTips/index.js";import{getCurrentResultFromResultList as B}from"./utils/data.js";import{getStepConfig as F}from"../../store/annotation/reducer.js";import{jsonParser as K}from"../../utils/index.js";const g=`${y}-LLMView`,W=r=>{const{annotation:p,checkMode:L=!0,tips:M,showTips:C}=r,{imgIndex:e,imgList:a,stepList:l,step:u}=p,{hoverKey:j,modelAPIResponse:R,setModelAPIResponse:d,newAnswerList:c}=P($),[T,V]=m([]),[q,A]=m(""),[E,I]=m(),{t:h}=Q();return f(()=>{let t;if(!L)return t=setInterval(()=>{b.info(h("EfficientListening"))},1e3*60),()=>{t&&clearInterval(t)}},[]),f(()=>{var t,n;if(!a[e])return;const o=(t=a[e])==null?void 0:t.questionList,v=(n=a[e])!=null?n:{},s=B(v==null?void 0:v.result),w=(s==null?void 0:s.length)>0?s[0]:s;A(o==null?void 0:o.question);let x=(o==null?void 0:o.answerList)||[];c.length>0&&(x=c),V(x),d((w==null?void 0:w.modelAPIResponse)||[])},[e,c]),f(()=>{var t;if(l&&u){const n=(t=F(l,u))==null?void 0:t.config;I(K(n))}},[l,u]),i.createElement(D,{className:g},i.createElement("div",{className:`${g}-question`},C===!0&&i.createElement(k,{tips:M}),i.createElement(N,{hoverKey:j,question:q,answerList:T,modelAPIResponse:R,setModelAPIResponse:d,checkMode:L,annotation:p,LLMConfig:E})))},z=r=>({annotation:r.annotation});var G=S(z,null,null,{context:_})(W);export{G as default};
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 +1 @@
1
- import{Tag as x}from"antd";import u from"classnames";import t,{useState as _,useEffect as C}from"react";import h from"../../../assets/annotation/LLMTool/loading.svg.js";import F from"../../longText/index.js";import j from"../../markdownView/index.js";import{EDataFormatType as k}from"../../../constant/index.js";import{getStepConfig as I}from"../../../store/annotation/reducer.js";import{jsonParser as N}from"../../../utils/index.js";import{SyncOutlined as R,InfoCircleFilled as T}from"@ant-design/icons";import{LLMViewCls as f}from"../questionView/index.js";import{i18n as A}from"@labelbee/lb-utils";var b=(s,e,r)=>new Promise((a,m)=>{var c=n=>{try{l(r.next(n))}catch(i){m(i)}},p=n=>{try{l(r.throw(n))}catch(i){m(i)}},l=n=>n.done?a(n.value):Promise.resolve(n.value).then(c,p);l((r=r.apply(s,e)).next())});const $=({dataFormatType:s,answer:e})=>s===k.Markdown?t.createElement(j,{value:e}):t.createElement(F,{wordCount:1e3,text:e}),V=(s,e)=>{var r;return(r=e.find(a=>a.id===s))==null?void 0:r.answer},S=s=>{var e;const{annotation:r={},checkMode:a,dataFormatType:m,modelAPIResponse:c,question:p,setModelAPIResponse:l}=s,{stepList:n,step:i,toolInstance:v}=r,[g,w]=_(),{enableModelAPI:L=!1,modelAPIConfigList:d=[]}=g||{},P=o=>{let E=!1;const M=c.map(y=>y.id===o.id?(E=!0,o):y);E||M.push(o),l==null||l(M)};return C(()=>{var o;if(n&&i){const E=(o=I(n,i))==null?void 0:o.config;w(N(E))}},[n,i]),L?(e=d==null?void 0:d.map)==null?void 0:e.call(d,o=>t.createElement(B,{dataFormatType:m,config:o,modelAPIResponse:c,key:o==null?void 0:o.id,toolInstance:v,question:p,updateModelAPIResponse:P,checkMode:a})):null},G=()=>t.createElement("div",{className:u({[`${f}__loading`]:!0})},A.t("AnswersAreBeingGenerated"),t.createElement("img",{src:h})),q=()=>t.createElement("span",{className:u({[`${f}__failed`]:!0})},A.t("AnswerGenerationFailedPleaseTryAgainLater")," ",t.createElement(T,null)),B=({dataFormatType:s,config:e,modelAPIResponse:r,toolInstance:a,question:m,updateModelAPIResponse:c,checkMode:p})=>{const[l,n]=_(!1),[i,v]=_(!1),g=V(e==null?void 0:e.id,r),w=d=>{n(d),a&&(a.loading=d)},L=()=>b(void 0,null,function*(){w(!0),v(!1);try{const d=yield a==null?void 0:a.getAPIAnswer(e,m);c({id:e==null?void 0:e.id,answer:d})}catch(d){v(!0)}finally{w(!1)}});return t.createElement("div",{className:u({[`${f}__content`]:!0}),key:e==null?void 0:e.id},t.createElement(x,{style:{color:"#666FFF",background:"#eeefff",height:"20px",padding:"0px 8px",border:"none"}},e==null?void 0:e.name),t.createElement("div",{className:u({[`${f}__answer`]:!0})},!l&&g&&t.createElement($,{dataFormatType:s,answer:g}),t.createElement("div",{className:u({[`${f}__message`]:!0})},l?t.createElement(G,null):i&&t.createElement(q,null)),!l&&!p&&t.createElement("div",{className:u({[`${f}__footer`]:!0})},t.createElement("span",{onClick:L},A.t("ReGenerate"),t.createElement(R,null)))))};export{S as default};
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};
@@ -0,0 +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};
@@ -0,0 +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};
@@ -0,0 +1 @@
1
+ var e={imgView:"index-module_imgView__wmxDk",item:"index-module_item__-80YI",image:"index-module_image__V49oW","ant-image":"index-module_ant-image__pOA-I"};export{e as default};
@@ -1 +1 @@
1
- import t,{useState as T,useEffect as C}from"react";import{Tag as L,Radio as m}from"antd";import{EDataFormatType as i,prefix as O}from"../../../constant/index.js";import V from"classnames";import{I18nextProvider as B,useTranslation as E}from"react-i18next";import{i18n as w}from"@labelbee/lb-utils";import x from"../../markdownView/index.js";import{FileTextOutlined as F}from"@ant-design/icons";import I from"../modelAPIView/index.js";import N from"../../diffMatchPatchComponent/index.js";import{Resizable as j}from"re-resizable";var k=Object.defineProperty,_=Object.getOwnPropertySymbols,$=Object.prototype.hasOwnProperty,D=Object.prototype.propertyIsEnumerable,g=(e,n,r)=>n in e?k(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,R=(e,n)=>{for(var r in n||(n={}))$.call(n,r)&&g(e,r,n[r]);if(_)for(var r of _(n))D.call(n,r)&&g(e,r,n[r]);return e};const l=`${O}-LLMView`,S=({setDataFormatType:e,dataFormatType:n})=>{const{t:r}=E();return t.createElement("div",{className:`${l}__title`,style:{display:"flex",justifyContent:"space-between"}},r("Title"),t.createElement("span",{style:{display:"flex"}},t.createElement(m.Group,{value:n,onChange:o=>{e(o.target.value)}},t.createElement(m.Button,{value:i.Default,style:{textAlign:"center",width:"52px"}},"</>"),t.createElement(m.Button,{value:i.Markdown,style:{textAlign:"center",width:"52px"}},t.createElement(F,null))),t.createElement("span",{style:{marginLeft:"8px",width:"4px",background:"#1890ff"}})))},H=({i:e,dataFormatType:n,isTextControl:r})=>{var o;return n===i.Markdown?t.createElement(x,{value:(o=e==null?void 0:e.newAnswer)!=null?o:e==null?void 0:e.answer}):r?t.createElement(N,{originString:e==null?void 0:e.answer,currentString:e==null?void 0:e.newAnswer}):t.createElement("div",null,e==null?void 0:e.answer)},z=e=>{const{hoverKey:n,answerList:r,question:o,lang:u,modelAPIResponse:y,setModelAPIResponse:h,checkMode:b=!0,LLMConfig:s}=e,[c,P]=T(i.Default),p=200,{t:A}=E();C(()=>{var a;u&&((a=w)==null||a.changeLanguage(u))},[]);const M=a=>{var d;return(s==null?void 0:s.isTextEdit)?!!((d=((s==null?void 0:s.textEdit)||[]).filter(v=>(v==null?void 0:v.title)===a.order)[0])==null?void 0:d.textControl):!1};return t.createElement("div",{className:l},t.createElement(j,{defaultSize:{width:"100%",height:p},minHeight:p,enable:{bottom:!0},style:{padding:"26px 32px",borderBottom:"1px solid #EBEBEB",overflow:"hidden"}},t.createElement(S,{setDataFormatType:P,dataFormatType:c}),t.createElement("div",{className:`${l}__headerContent`},c===i.Markdown?t.createElement(x,{value:o}):o)),t.createElement("div",{className:`${l}__textBox`},t.createElement("div",{className:`${l}__title`},A("Answer")),r.map((a,d)=>{const f=M(a);return t.createElement("div",{className:V({[`${l}__content`]:!0,[`${l}__contentActive`]:n===(a==null?void 0:a.order)}),key:d},t.createElement(L,{style:{color:"#666FFF",background:"#eeefff",height:"20px",padding:"0px 8px",border:"none"}},a==null?void 0:a.order),t.createElement(H,{i:a,isTextControl:f,dataFormatType:c}))}),t.createElement(I,{dataFormatType:c,modelAPIResponse:y,question:o,setModelAPIResponse:h,checkMode:b,annotation:e.annotation})))},G=e=>t.createElement(B,{i18n:w},t.createElement(z,R({},e)));export{l as LLMViewCls,G as default};
1
+ import n,{useState as L,useEffect as j}from"react";import{Tag as C}from"antd";import{EDataFormatType as v,ELLMDataType as w,prefix as O}from"../../../constant/index.js";import N from"classnames";import{I18nextProvider as S,useTranslation as b}from"react-i18next";import{i18n as _}from"@labelbee/lb-utils";import $ from"../../markdownView/index.js";import D from"../modelAPIView/index.js";import R from"../../diffMatchPatchComponent/index.js";import k from"./components/header/index.js";import F from"./components/imgView/index.js";import{isString as q}from"lodash";var B=Object.defineProperty,E=Object.getOwnPropertySymbols,Q=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable,g=(e,t,r)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,K=(e,t)=>{for(var r in t||(t={}))Q.call(t,r)&&g(e,r,t[r]);if(E)for(var r of E(t))H.call(t,r)&&g(e,r,t[r]);return e};const l=`${O}-LLMView`,W=({i:e,dataFormatType:t,isTextControl:r})=>{var i;return t===v.Markdown?n.createElement($,{value:(i=e==null?void 0:e.newAnswer)!=null?i:e==null?void 0:e.answer}):r?n.createElement(R,{originString:e==null?void 0:e.answer,currentString:e==null?void 0:e.newAnswer}):n.createElement("div",{style:{whiteSpace:"pre-wrap"}},e==null?void 0:e.answer)},z=e=>{var t,r;const{hoverKey:i,answerList:d,question:m,lang:u,modelAPIResponse:x,setModelAPIResponse:y,checkMode:P=!0,LLMConfig:a}=e,[c,I]=L(v.Default),h=((t=a==null?void 0:a.dataType)==null?void 0:t.prompt)===w.Picture,M=((r=a==null?void 0:a.dataType)==null?void 0:r.response)===w.Picture,{t:T}=b();j(()=>{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},A=n.createElement("div",null,d.map((o,s)=>{const p=V(o);return n.createElement("div",{className:N({[`${l}__content`]:!0,[`${l}__contentActive`]:i===(o==null?void 0:o.order)}),key:s},n.createElement(C,{className:`${l}__tag`},o==null?void 0:o.order),n.createElement(W,{i:o,isTextControl:p,dataFormatType:c}))}),q(m)&&n.createElement(D,{dataFormatType:c,modelAPIResponse:x,question:m,setModelAPIResponse:y,checkMode:P,annotation:e.annotation}));return n.createElement("div",{className:l},n.createElement(k,{question:m,dataFormatType:c,setDataFormatType:I,isImg:h}),n.createElement("div",{className:`${l}__textBox`},n.createElement("div",{className:`${l}__title`},T("Answer")),M?n.createElement(F,{hoverKey:i,answerList:d}):A))},G=e=>n.createElement(S,{i18n:_},n.createElement(z,K({},e)));export{l as LLMViewCls,G 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:w,updateValue:S,checkMode:y}=a,{hoverKey:$,setHoverKey:C}=N(R),{t:k}=P(),D=y,M=e=>{const{indicatorScore:t=[],indicatorDetermine:n=[],textEdit:s=[],isTextEdit:F=!1}=w||{};let o=2;if((t==null?void 0:t.length)>0){if(t.some(i=>{var l,d;return!((l=e==null?void 0:e.indicatorScore)==null?void 0:l[i.value])||((d=e==null?void 0:e.indicatorScore)==null?void 0:d[i.value])>Number(i==null?void 0:i.score)}))return o=1,o;o=0}if((n==null?void 0:n.length)>0){if(n.some(i=>{var l;const d=(l=e==null?void 0:e.indicatorDetermine)==null?void 0:l[i.value];return!Q(d)}))return o=1,o;o=0}if(F&&(s==null?void 0:s.length)>0){const c=s.filter(f=>(f==null?void 0:f.title)===e.order)[0],{min:i}=c,l=(e==null?void 0:e.newAnswer)||"";if(i&&(l==null?void 0:l.length)<Number(i))return o=1,o;o=0}return o},U=e=>{const t=M(e);let n=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"}},E.map((e,t)=>{const{indicatorScore:n=[],indicatorDetermine:s=[],textEdit:F=[],isTextEdit:o=!1}=w||{},{backgroundColor:c,fontColor:i,tagText:l,tagStatus:d}=U(e),f=A(e,F)||{},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:i,padding:"0px 8px"}},l),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:V=>{const I={key:g,value:V};S({order:e.order,value:I,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};S({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=>{S({order:e.order,value:u,key:"textEdit"})}}))}))};export{Z as default};
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:b,updateValue:S,checkMode:y}=a,{hoverKey:$,setHoverKey:C}=N(R),{t:k}=P(),D=y,M=e=>{const{indicatorScore:t=[],indicatorDetermine:n=[],textEdit:s=[],isTextEdit:w=!1}=b||{};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(w&&(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.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"}},E.map((e,t)=>{const{indicatorScore:n=[],indicatorDetermine:s=[],textEdit:w=[],isTextEdit:o=!1}=b||{},{backgroundColor:c,fontColor:l,tagText:i,tagStatus:d}=U(e),f=A(e,w)||{},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,F)=>{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:V=>{const I={key:g,value:V};S({order:e.order,value:I,key:"indicatorScore"})},key:F,isDisableAll:D}):null}),(s==null?void 0:s.length)>0&&s.map((u,F)=>{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};S({order:e.order,value:h,key:"indicatorDetermine"})},key:F,isDisableAll:D}):null}),o&&r.createElement(X,{checkMode:y,newAnswer:e==null?void 0:e.newAnswer,textEditObject:f,updateValue:u=>{S({order:e.order,value:u,key:"textEdit"})}}))}))};export{Z 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,me=Object.prototype.hasOwnProperty,ue=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={}))me.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)=>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?"":"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:m}=q(e,t);switch(n){case o:_(g.Top);break;case c:_(g.Right);break;case d:_(g.Bottom);break;case m:_(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 m=d.getBoundingClientRect()||{},{bottom:r,top:u,left:l,right:f,width:v,height:x,x:$,y:C}=m,R={x:l+v/2,y:u+x/2},T={tl:{x:$,y:C},tr:{x:f,y:u},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,m;const r=e.pageX,u=e.pageY,l={x:r,y:u};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,(m=v[0])==null?void 0:m.tagVertexPoint)}},S=e=>{var t;const{target:n}=e;let o=-1,c=-1,d=-1,m=[],r=ae(a);if(d=r.findIndex(u=>u[0].id===Number(B)),((t=n==null?void 0:n.parentNode)==null?void 0:t.parentNode.id)==="sortBox"){o=L(n.parentNode.id);const u=L(n.id);m=r[~~o].filter(f=>f.id===~~u);const l=r[~~o].findIndex(f=>f.id===~~u);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 u=r.find(l=>l[0].id===o);u&&(m=u),r.splice(c,1),d=r.findIndex(l=>l[0].id===~~B)}switch(n.parentNode.id==="waitBox"&&(o=L(n.id),c=h.findIndex(u=>u.id===o),m=[h[c]],h.splice(c,1)),N){case g.Left:r.splice(d,0,m);break;case g.Right:r.splice(d+1,0,m);break;case g.Top:case g.Bottom:r[d].push(...m);break;default:r.push(m);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 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 +1 @@
1
- import e,{useEffect as E}from"react";import{Form as a,Popover as g,Input as v}from"antd";import{useTranslation as w}from"react-i18next";import{InfoCircleOutlined as h}from"@ant-design/icons";const y=i=>{const{checkMode:s,newAnswer:l,textEditObject:c,updateValue:u}=i,{max:m,min:r}=c,{TextArea:d}=v,[o]=a.useForm(),{t:n}=w(),f=n("LeastCharacterError",{num:r});return E(()=>{o.setFieldsValue({value:l}),s||o.validateFields()},[l]),e.createElement(a,{form:o,onValuesChange:(p,t)=>{const x=t.value;u(x)},style:{marginBottom:"16px"}},e.createElement("div",{style:{marginBottom:"16px"}},n("AnswerTextEdit"),e.createElement(g,{placement:"bottom",content:n("ShowEditingResultDifferencesInTextModeOnly")},e.createElement(h,{style:{margin:"0px 4px",cursor:"pointer"}}))),e.createElement(a.Item,{name:"value",style:{marginBottom:8},rules:[{validator:(p,t="")=>r&&(t==null?void 0:t.length)<Number(r)?Promise.reject(f):Promise.resolve()}]},e.createElement(d,{maxLength:m,autoSize:{minRows:4,maxRows:10},allowClear:!0,disabled:s,showCount:!!m,style:{width:"100%"}})))};export{y as default};
1
+ import e,{useEffect as E}from"react";import{Form as o,Popover as g,Input as w}from"antd";import{useTranslation as h}from"react-i18next";import{InfoCircleOutlined as v}from"@ant-design/icons";const y=i=>{const{checkMode:l,newAnswer:s,textEditObject:c,updateValue:u}=i,{max:m,min:t}=c,{TextArea:d}=w,[n]=o.useForm(),{t:a}=h(),f=a("LeastCharacterError",{num:t});return E(()=>{n.setFieldsValue({value:s}),l||n.validateFields()},[s]),e.createElement(o,{form:n,onValuesChange:(p,r)=>{const x=r.value;u(x)},style:{marginBottom:"16px"}},e.createElement(o.Item,{name:"title",style:{marginBottom:"16px"},label:" ",colon:!1,required:!!t},a("AnswerTextEdit"),e.createElement(g,{placement:"bottom",content:a("ShowEditingResultDifferencesInTextModeOnly")},e.createElement(v,{style:{margin:"0px 4px",cursor:"pointer"}}))),e.createElement(o.Item,{name:"value",style:{marginBottom:8},rules:[{validator:(p,r="")=>t&&(r==null?void 0:r.length)<Number(t)?Promise.reject(f):Promise.resolve()}]},e.createElement(d,{maxLength:m,autoSize:{minRows:4,maxRows:10},allowClear:!0,disabled:l,showCount:!!m,style:{width:"100%"}})))};export{y as default};
@@ -1 +1 @@
1
- import a,{useContext as W,useState as L,useEffect as y}from"react";import{prefix as it}from"../../../constant/index.js";import{Empty as lt,Button as at}from"antd";import ct from"./components/answerSort/index.js";import{connect as dt}from"react-redux";import{isNumber as ut,isObject as mt}from"lodash";import pt from"./components/answerList/index.js";import{LabelBeeContext as ft,LLMContext as V}from"../../../store/ctx.js";import{jsonParser as k}from"../../../utils/index.js";import{getStepConfig as vt}from"../../../store/annotation/reducer.js";import{useCustomToolInstance as gt}from"../../../hooks/annotation.js";import{PageForward as C}from"../../../store/annotation/actionCreators.js";import{cKeyCode as xt,EToolName as wt}from"@labelbee/lb-annotation";import{useTranslation as Lt}from"react-i18next";import{getCurrentResultFromResultList as z,formatSort as G}from"../utils/data.js";import Et from"../../../assets/annotation/LLMTool/empty.svg.js";import _t from"./components/textInputBox/index.js";var bt=Object.defineProperty,St=Object.defineProperties,ht=Object.getOwnPropertyDescriptors,H=Object.getOwnPropertySymbols,yt=Object.prototype.hasOwnProperty,Ct=Object.prototype.propertyIsEnumerable,J=(i,r,c)=>r in i?bt(i,r,{enumerable:!0,configurable:!0,writable:!0,value:c}):i[r]=c,w=(i,r)=>{for(var c in r||(r={}))yt.call(r,c)&&J(i,c,r[c]);if(H)for(var c of H(r))Ct.call(r,c)&&J(i,c,r[c]);return i},j=(i,r)=>St(i,ht(r));const jt=xt.default,P=`${it}-sidebar`,Pt=i=>{var r;const{annotation:c,dispatch:E,checkMode:_}=i,{imgIndex:A,imgList:T,stepList:O,step:D,skipBeforePageTurning:b}=c,{modelAPIResponse:N}=W(V),{t:I}=Lt(),s=(r=T[A])!=null?r:{},Q=k(s==null?void 0:s.result),{toolInstanceRef:M}=gt({basicInfo:Q}),[f,U]=L(),[v,R]=L([]),[S,$]=L(void 0),[h,B]=L([]),[X,Y]=L([]),{setNewAnswerList:Z}=W(V);y(()=>{var t;if(O&&D){const e=(t=vt(O,D))==null?void 0:t.config;U(k(e))}},[O,D]),y(()=>{if(!s)return;const t=z(s==null?void 0:s.result);let e=(t==null?void 0:t.answerList)?t:s==null?void 0:s.questionList;if(e==null?void 0:e.answerList){et(e.answerList);const o=tt(e.answerList)||[];R(o)}$(t==null?void 0:t.textAttribute)},[A,s,f]),y(()=>{M.current.exportData=()=>{const o=G(h);return[[{answerList:v,sort:o,textAttribute:S,id:s==null?void 0:s.id,modelAPIResponse:N}],{}]};const t=G(h),e={answerList:v,sort:t,textAttribute:S,id:s==null?void 0:s.id,toolName:wt.LLM,modelAPIResponse:N};M.current.currentPageResult=e,Z(v)},[v,h,S,N]),y(()=>(window.addEventListener("keydown",F),()=>{window.removeEventListener("keydown",F)}),[]);const tt=t=>{const{isTextEdit:e,textEdit:o=[]}=f||{};return e?t.map(n=>{var d,l;return((d=o.filter(p=>p.title===n.order)[0])==null?void 0:d.isFillAnswer)?j(w({},n),{newAnswer:(l=n==null?void 0:n.newAnswer)!=null?l:n.answer}):n}):t},F=t=>{if(t.ctrlKey&&t.keyCode===jt.Enter){if(b){b(()=>E(C()));return}E(C())}},et=t=>{var e;let o=[],u=[];if((t==null?void 0:t.length)>0){const n=z(s==null?void 0:s.result),d=(n==null?void 0:n.length)>0?n[0]:n;((e=d==null?void 0:d.sort)==null?void 0:e.length)>0&&(u=d.sort.reduce((l,m)=>{let p=[{title:m[0],id:m[0]}];return m.length>1&&(p=m.map(g=>({title:g,id:g}))),[...l,p]},[])),t.forEach(l=>{u.some(p=>p.length>1?p.some(g=>g.id===l.order):p[0].id===l.order)||o.push({title:l.order,id:l.order})})}B(u),Y(o)},nt=({order:t,value:e,key:o})=>{const u=v==null?void 0:v.map(n=>{var d;if((n==null?void 0:n.order)===t){if(o==="textEdit")return j(w({},n),{newAnswer:e});if(ut(e))return j(w({},n),{score:e});if(mt(e)&&o){const l={[e==null?void 0:e.key]:e.value},m=(d=n[o])!=null?d:{};return j(w({},n),{[o]:w(w({},m),l)})}}return n});R(u)};if((()=>{var t,e;const{indicatorScore:o=[],indicatorDetermine:u=[],text:n=[],enableSort:d,isTextEdit:l}=f||{},m=((t=o==null?void 0:o.filter(x=>x.label&&x.value&&x.score))==null?void 0:t.length)>0,p=((e=u==null?void 0:u.filter(x=>x.label&&x.value))==null?void 0:e.length)>0,g=(n==null?void 0:n.length)>0;return!(m||p||g||d||l)})())return a.createElement("div",{className:`${P}`},a.createElement("div",{className:`${P}__content`,style:{display:"flex",justifyContent:"center",alignItems:"center"}},a.createElement(lt,{description:a.createElement("span",{style:{color:"#ccc"}},I("NoScoringScale")),imageStyle:{width:200,height:200},image:a.createElement("img",{src:Et})})));const{indicatorScore:K=[],indicatorDetermine:q=[],enableSort:rt,isTextEdit:ot}=f||{},st=v.length>0&&((q==null?void 0:q.length)>0||(K==null?void 0:K.length)>0||ot);return a.createElement("div",{className:`${P}`},a.createElement("div",{className:`${P}__content`},rt&&a.createElement(ct,{waitSortList:X,sortList:h,setSortList:B,checkMode:_}),st&&a.createElement(pt,{list:v,LLMConfig:f,updateValue:nt,checkMode:_}),(f==null?void 0:f.text)&&a.createElement("div",{style:{padding:"0px 16px",marginTop:"16px"}},a.createElement(_t,{textAttribute:S||[],LLMConfig:f,setText:$,checkMode:_}))),a.createElement("div",{style:{margin:"24px 16px",display:"flex"}},(T==null?void 0:T.length)-1!==A&&a.createElement(at,{type:"primary",style:{marginLeft:"auto"},onClick:()=>{if(b){b(()=>E(C()));return}E(C())},disabled:_},I("Save"))))},At=i=>({annotation:i.annotation});var Tt=dt(At,null,null,{context:ft})(Pt);export{Tt as default};
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,Et=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))Et.call(s,m)&&k(c,m,s[m]);return c},g=(c,s)=>Lt(c,xt(s));const _t=mt.default,j=`${tt}-sidebar`,bt=c=>{var s;const{annotation:m,dispatch:S,checkMode:E}=c,{imgIndex:_,imgList:P,stepList:A,step:T,skipBeforePageTurning:b}=m,{modelAPIResponse:O}=B(K),{t:N}=ft(),d=(s=P[_])!=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(A&&T){const e=(t=dt(A,T))==null?void 0:t.config;G(q(e))}},[T,JSON.stringify(A)]),y(()=>{if(!d||_===-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,text:t==null?void 0:t.textAttribute})},[_,v]),y(()=>{const{newSort:t,answerList:e,text: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===_t.Enter){if(b){b(()=>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:E}),Z&&u.createElement(at,{list:(i==null?void 0:i.answerList)||[],LLMConfig:v,updateValue:U,checkMode:E}),(v==null?void 0:v.text)&&u.createElement("div",{style:{padding:"0px 16px",marginTop:"16px"}},u.createElement(vt,{textAttribute:(i==null?void 0:i.text)||[],LLMConfig:v,setText:t=>h(g(w({},i),{text:t})),checkMode:E}))),u.createElement("div",{style:{margin:"24px 16px",display:"flex"}},(P==null?void 0:P.length)-1!==_&&u.createElement(nt,{type:"primary",style:{marginLeft:"auto"},onClick:()=>{if(b){b(()=>S(C()));return}S(C())},disabled:E},N("Save"))))},ht=c=>({annotation:c.annotation});var yt=ot(ht,null,null,{context:ct})(bt);export{yt as default};
@@ -1 +1 @@
1
- import{jsonParser as l}from"../../../utils/index.js";const i=r=>{var e,n;const t=l(r),s="step_1";return(n=(e=t==null?void 0:t[s])==null?void 0:e.result[0])!=null?n:{}},u=r=>r.reduce((n,t)=>{let s=t;return t.length>1?s=t.map(o=>o.id):s=[t[0].id],[...n,s]},[]);export{u as formatSort,i as getCurrentResultFromResultList};
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 +1 @@
1
- var n;(function(a){a[a.Check=0]="Check",a[a.ANNOTATION=1]="ANNOTATION",a[a.QUALITY_INSPECTION=2]="QUALITY_INSPECTION",a[a.PRE_ANNOTATION=3]="PRE_ANNOTATION",a[a.MANUAL_CORRECTION=4]="MANUAL_CORRECTION"})(n||(n={}));var c;(function(a){a[a.Backward=1]="Backward",a[a.Forward=2]="Forward",a[a.Jump=3]="Jump",a[a.Quit=4]="Quit",a[a.Export=5]="Export",a[a.StepChanged=6]="StepChanged",a[a.Save=7]="Save",a[a.BatchUpdateTrackID=8]="BatchUpdateTrackID",a[a.BatchUpdateImgList=9]="BatchUpdateImgList",a[a.SyncImgList=10001]="SyncImgList",a[a.SyncCurrentPageData=10002]="SyncCurrentPageData"})(c||(c={}));const N="bee",I=`${N}-component`;var r;(function(a){a.Default="default",a.Markdown="markdown"})(r||(r={}));export{r as EDataFormatType,n as EStepType,c as ESubmitType,I as componentCls,N as prefix};
1
+ var n;(function(a){a[a.Check=0]="Check",a[a.ANNOTATION=1]="ANNOTATION",a[a.QUALITY_INSPECTION=2]="QUALITY_INSPECTION",a[a.PRE_ANNOTATION=3]="PRE_ANNOTATION",a[a.MANUAL_CORRECTION=4]="MANUAL_CORRECTION"})(n||(n={}));var c;(function(a){a[a.Backward=1]="Backward",a[a.Forward=2]="Forward",a[a.Jump=3]="Jump",a[a.Quit=4]="Quit",a[a.Export=5]="Export",a[a.StepChanged=6]="StepChanged",a[a.Save=7]="Save",a[a.BatchUpdateTrackID=8]="BatchUpdateTrackID",a[a.BatchUpdateImgList=9]="BatchUpdateImgList",a[a.SyncImgList=10001]="SyncImgList",a[a.SyncCurrentPageData=10002]="SyncCurrentPageData"})(c||(c={}));const o="bee",I=`${o}-component`;var r;(function(a){a.Default="default",a.Markdown="markdown"})(r||(r={}));var N;(function(a){a.Picture="picture",a.Text="text",a.None="none"})(N||(N={}));export{r as EDataFormatType,N as ELLMDataType,n as EStepType,c as ESubmitType,I as componentCls,o as prefix};
package/es/index.css CHANGED
@@ -2,6 +2,29 @@
2
2
  .index-module_markdownView__B6eyL h2 {
3
3
  border-bottom: none !important;
4
4
  }
5
+ .index-module_imgView__wmxDk {
6
+ display: flex;
7
+ flex-wrap: wrap;
8
+ }
9
+ .index-module_imgView__wmxDk .index-module_item__-80YI {
10
+ margin: 0px 40px 40px 0px;
11
+ min-width: 400px;
12
+ max-width: 500px;
13
+ display: flex;
14
+ height: 300px;
15
+ }
16
+ .index-module_imgView__wmxDk .index-module_item__-80YI .index-module_image__V49oW {
17
+ height: 260px;
18
+ min-width: 300px;
19
+ flex: 1;
20
+ background: #E9EBF1;
21
+ display: flex;
22
+ justify-content: center;
23
+ align-content: center;
24
+ }
25
+ .index-module_imgView__wmxDk .index-module_item__-80YI .index-module_image__V49oW .index-module_ant-image__pOA-I {
26
+ display: flex;
27
+ }
5
28
  .index-module_speedControllerWrap__aFz7r {
6
29
  display: flex;
7
30
  color: white;
@@ -2431,10 +2454,17 @@
2431
2454
  margin-bottom: 24px;
2432
2455
  width: 100%;
2433
2456
  }
2457
+ .bee-LLMView__tag {
2458
+ color: #666FFF;
2459
+ background: #eeefff;
2460
+ height: 20px;
2461
+ padding: 0px 8px;
2462
+ border: none;
2463
+ }
2434
2464
  .bee-LLMView__headerContent {
2435
2465
  font-weight: 500;
2436
2466
  font-size: 14px;
2437
- overflow-y: auto;
2467
+ overflow: auto;
2438
2468
  height: calc(100% - 54px);
2439
2469
  }
2440
2470
  .bee-LLMView__contentActive {
package/es/index.js CHANGED
@@ -1 +1 @@
1
- export{default as AnnotationView}from"./components/AnnotationView/index.js";export{default as PointCloudAnnotationView}from"./components/AnnotationView/pointCloudAnnotationView.js";export{default as QuestionView}from"./components/LLMToolView/questionView/index.js";import{i18n as c}from"@labelbee/lb-utils";export{i18n}from"@labelbee/lb-utils";import n,{useState as d,useImperativeHandle as m}from"react";import{I18nextProvider as f}from"react-i18next";import{Provider as u}from"react-redux";import w from"./App.js";import x from"./configureStore.js";import{PageBackward as P,PageForward as g,PageJump as v}from"./store/annotation/actionCreators.js";export{VideoTagTool}from"./components/videoPlayer/TagToolInstanceAdaptorI18nProvider.js";import{PointCloudProvider as _}from"./components/pointCloudView/PointCloudContext.js";import{LabelBeeContext as j}from"./store/ctx.js";export{default as PredictTracking}from"./components/predictTracking/predictTrackingIcon/index.js";export{default as LLMToolView}from"./components/LLMToolView/index.js";export{default as SwitchCuboidBoxIn2DView}from"./views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.js";export{EDataFormatType,EStepType,ESubmitType,componentCls,prefix}from"./constant/index.js";var V=Object.defineProperty,b=Object.defineProperties,T=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,I=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,s=(o,e,t)=>e in o?V(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,y=(o,e)=>{for(var t in e||(e={}))I.call(e,t)&&s(o,t,e[t]);if(p)for(var t of p(e))O.call(e,t)&&s(o,t,e[t]);return o},A=(o,e)=>b(o,T(e));const r=x(),C=(o,e)=>{const[t,l]=d();return m(e,()=>({toolInstance:t,annotationEngine:r.getState().annotation.annotationEngine,pageBackwardActions:()=>r.dispatch(P()),pageForwardActions:()=>r.dispatch(g()),pageJump:a=>{const i=~~a-1;r.dispatch(v(i))},hello:()=>alert("hello labelBee!!!")}),[t]),n.createElement(u,{store:r,context:j},n.createElement(f,{i18n:c},n.createElement(_,null,n.createElement(w,A(y({},o),{setToolInstance:a=>{var i;l(a),(i=o.onLoad)==null||i.call(o,{toolInstance:a})}})))))};var E=n.forwardRef(C);export{E as default,r as store};
1
+ export{default as AnnotationView}from"./components/AnnotationView/index.js";export{default as PointCloudAnnotationView}from"./components/AnnotationView/pointCloudAnnotationView.js";export{default as QuestionView}from"./components/LLMToolView/questionView/index.js";import{i18n as c}from"@labelbee/lb-utils";export{i18n}from"@labelbee/lb-utils";import n,{useState as d,useImperativeHandle as m}from"react";import{I18nextProvider as f}from"react-i18next";import{Provider as u}from"react-redux";import w from"./App.js";import x from"./configureStore.js";import{PageBackward as P,PageForward as g,PageJump as v}from"./store/annotation/actionCreators.js";export{VideoTagTool}from"./components/videoPlayer/TagToolInstanceAdaptorI18nProvider.js";import{PointCloudProvider as _}from"./components/pointCloudView/PointCloudContext.js";import{LabelBeeContext as j}from"./store/ctx.js";export{default as PredictTracking}from"./components/predictTracking/predictTrackingIcon/index.js";export{default as LLMToolView}from"./components/LLMToolView/index.js";export{default as SwitchCuboidBoxIn2DView}from"./views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.js";export{EDataFormatType,ELLMDataType,EStepType,ESubmitType,componentCls,prefix}from"./constant/index.js";var T=Object.defineProperty,V=Object.defineProperties,b=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,I=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,s=(o,e,t)=>e in o?T(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,y=(o,e)=>{for(var t in e||(e={}))I.call(e,t)&&s(o,t,e[t]);if(p)for(var t of p(e))O.call(e,t)&&s(o,t,e[t]);return o},E=(o,e)=>V(o,b(e));const r=x(),A=(o,e)=>{const[t,l]=d();return m(e,()=>({toolInstance:t,annotationEngine:r.getState().annotation.annotationEngine,pageBackwardActions:()=>r.dispatch(P()),pageForwardActions:()=>r.dispatch(g()),pageJump:a=>{const i=~~a-1;r.dispatch(v(i))},hello:()=>alert("hello labelBee!!!")}),[t]),n.createElement(u,{store:r,context:j},n.createElement(f,{i18n:c},n.createElement(_,null,n.createElement(w,E(y({},o),{setToolInstance:a=>{var i;l(a),(i=o.onLoad)==null||i.call(o,{toolInstance:a})}})))))};var C=n.forwardRef(A);export{C as default,r as store};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@labelbee/lb-components",
3
- "version": "1.19.0-alpha.2",
3
+ "version": "1.19.0-alpha.4",
4
4
  "description": "Provide a complete library of annotation components",
5
5
  "main": "./dist/index.js",
6
6
  "es": "./es/index.js",