helixlife-expert-cli 0.1.0

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 (523) hide show
  1. package/README.md +159 -0
  2. package/cli/bin/helixlife-expert.js +3 -0
  3. package/cli/dist/core/api/client.d.ts +31 -0
  4. package/cli/dist/core/api/client.d.ts.map +1 -0
  5. package/cli/dist/core/api/client.js +183 -0
  6. package/cli/dist/core/api/client.js.map +1 -0
  7. package/cli/dist/core/api/http.d.ts +3 -0
  8. package/cli/dist/core/api/http.d.ts.map +1 -0
  9. package/cli/dist/core/api/http.js +22 -0
  10. package/cli/dist/core/api/http.js.map +1 -0
  11. package/cli/dist/core/api/response.d.ts +48 -0
  12. package/cli/dist/core/api/response.d.ts.map +1 -0
  13. package/cli/dist/core/api/response.js +84 -0
  14. package/cli/dist/core/api/response.js.map +1 -0
  15. package/cli/dist/core/api/sse.d.ts +6 -0
  16. package/cli/dist/core/api/sse.d.ts.map +1 -0
  17. package/cli/dist/core/api/sse.js +60 -0
  18. package/cli/dist/core/api/sse.js.map +1 -0
  19. package/cli/dist/core/auth/index.d.ts +35 -0
  20. package/cli/dist/core/auth/index.d.ts.map +1 -0
  21. package/cli/dist/core/auth/index.js +150 -0
  22. package/cli/dist/core/auth/index.js.map +1 -0
  23. package/cli/dist/core/env-config.d.ts +16 -0
  24. package/cli/dist/core/env-config.d.ts.map +1 -0
  25. package/cli/dist/core/env-config.js +80 -0
  26. package/cli/dist/core/env-config.js.map +1 -0
  27. package/cli/dist/core/errors.d.ts +20 -0
  28. package/cli/dist/core/errors.d.ts.map +1 -0
  29. package/cli/dist/core/errors.js +28 -0
  30. package/cli/dist/core/errors.js.map +1 -0
  31. package/cli/dist/core/index.d.ts +16 -0
  32. package/cli/dist/core/index.d.ts.map +1 -0
  33. package/cli/dist/core/index.js +16 -0
  34. package/cli/dist/core/index.js.map +1 -0
  35. package/cli/dist/core/interactive.d.ts +18 -0
  36. package/cli/dist/core/interactive.d.ts.map +1 -0
  37. package/cli/dist/core/interactive.js +74 -0
  38. package/cli/dist/core/interactive.js.map +1 -0
  39. package/cli/dist/core/output/index.d.ts +29 -0
  40. package/cli/dist/core/output/index.d.ts.map +1 -0
  41. package/cli/dist/core/output/index.js +153 -0
  42. package/cli/dist/core/output/index.js.map +1 -0
  43. package/cli/dist/core/parse.d.ts +9 -0
  44. package/cli/dist/core/parse.d.ts.map +1 -0
  45. package/cli/dist/core/parse.js +31 -0
  46. package/cli/dist/core/parse.js.map +1 -0
  47. package/cli/dist/core/paths.d.ts +21 -0
  48. package/cli/dist/core/paths.d.ts.map +1 -0
  49. package/cli/dist/core/paths.js +65 -0
  50. package/cli/dist/core/paths.js.map +1 -0
  51. package/cli/dist/core/sse-utils.d.ts +49 -0
  52. package/cli/dist/core/sse-utils.d.ts.map +1 -0
  53. package/cli/dist/core/sse-utils.js +181 -0
  54. package/cli/dist/core/sse-utils.js.map +1 -0
  55. package/cli/dist/core/terminal.d.ts +2 -0
  56. package/cli/dist/core/terminal.d.ts.map +1 -0
  57. package/cli/dist/core/terminal.js +6 -0
  58. package/cli/dist/core/terminal.js.map +1 -0
  59. package/cli/dist/core/token/index.d.ts +5 -0
  60. package/cli/dist/core/token/index.d.ts.map +1 -0
  61. package/cli/dist/core/token/index.js +26 -0
  62. package/cli/dist/core/token/index.js.map +1 -0
  63. package/cli/dist/core/types/config.d.ts +8 -0
  64. package/cli/dist/core/types/config.d.ts.map +1 -0
  65. package/cli/dist/core/types/config.js +30 -0
  66. package/cli/dist/core/types/config.js.map +1 -0
  67. package/cli/dist/core/version.d.ts +2 -0
  68. package/cli/dist/core/version.d.ts.map +1 -0
  69. package/cli/dist/core/version.js +10 -0
  70. package/cli/dist/core/version.js.map +1 -0
  71. package/cli/dist/index.d.ts +2 -0
  72. package/cli/dist/index.d.ts.map +1 -0
  73. package/cli/dist/index.js +23 -0
  74. package/cli/dist/index.js.map +1 -0
  75. package/cli/dist/modules/analysis/constants.d.ts +3 -0
  76. package/cli/dist/modules/analysis/constants.d.ts.map +1 -0
  77. package/cli/dist/modules/analysis/constants.js +3 -0
  78. package/cli/dist/modules/analysis/constants.js.map +1 -0
  79. package/cli/dist/modules/analysis/index.d.ts +3 -0
  80. package/cli/dist/modules/analysis/index.d.ts.map +1 -0
  81. package/cli/dist/modules/analysis/index.js +23 -0
  82. package/cli/dist/modules/analysis/index.js.map +1 -0
  83. package/cli/dist/modules/auth/index.d.ts +3 -0
  84. package/cli/dist/modules/auth/index.d.ts.map +1 -0
  85. package/cli/dist/modules/auth/index.js +76 -0
  86. package/cli/dist/modules/auth/index.js.map +1 -0
  87. package/cli/dist/modules/expert-scaffold.d.ts +27 -0
  88. package/cli/dist/modules/expert-scaffold.d.ts.map +1 -0
  89. package/cli/dist/modules/expert-scaffold.js +25 -0
  90. package/cli/dist/modules/expert-scaffold.js.map +1 -0
  91. package/cli/dist/modules/fund/clinical/apps.d.ts +19 -0
  92. package/cli/dist/modules/fund/clinical/apps.d.ts.map +1 -0
  93. package/cli/dist/modules/fund/clinical/apps.js +14 -0
  94. package/cli/dist/modules/fund/clinical/apps.js.map +1 -0
  95. package/cli/dist/modules/fund/clinical/command-utils.d.ts +4 -0
  96. package/cli/dist/modules/fund/clinical/command-utils.d.ts.map +1 -0
  97. package/cli/dist/modules/fund/clinical/command-utils.js +40 -0
  98. package/cli/dist/modules/fund/clinical/command-utils.js.map +1 -0
  99. package/cli/dist/modules/fund/clinical/commands/article-create.d.ts +9 -0
  100. package/cli/dist/modules/fund/clinical/commands/article-create.d.ts.map +1 -0
  101. package/cli/dist/modules/fund/clinical/commands/article-create.js +99 -0
  102. package/cli/dist/modules/fund/clinical/commands/article-create.js.map +1 -0
  103. package/cli/dist/modules/fund/clinical/commands/article-download.d.ts +30 -0
  104. package/cli/dist/modules/fund/clinical/commands/article-download.d.ts.map +1 -0
  105. package/cli/dist/modules/fund/clinical/commands/article-download.js +153 -0
  106. package/cli/dist/modules/fund/clinical/commands/article-download.js.map +1 -0
  107. package/cli/dist/modules/fund/clinical/commands/four-elements-create.d.ts +7 -0
  108. package/cli/dist/modules/fund/clinical/commands/four-elements-create.d.ts.map +1 -0
  109. package/cli/dist/modules/fund/clinical/commands/four-elements-create.js +81 -0
  110. package/cli/dist/modules/fund/clinical/commands/four-elements-create.js.map +1 -0
  111. package/cli/dist/modules/fund/clinical/commands/four-elements-precheck.d.ts +7 -0
  112. package/cli/dist/modules/fund/clinical/commands/four-elements-precheck.d.ts.map +1 -0
  113. package/cli/dist/modules/fund/clinical/commands/four-elements-precheck.js +76 -0
  114. package/cli/dist/modules/fund/clinical/commands/four-elements-precheck.js.map +1 -0
  115. package/cli/dist/modules/fund/clinical/commands/four-elements-update.d.ts +16 -0
  116. package/cli/dist/modules/fund/clinical/commands/four-elements-update.d.ts.map +1 -0
  117. package/cli/dist/modules/fund/clinical/commands/four-elements-update.js +108 -0
  118. package/cli/dist/modules/fund/clinical/commands/four-elements-update.js.map +1 -0
  119. package/cli/dist/modules/fund/clinical/commands/sample-size.d.ts +14 -0
  120. package/cli/dist/modules/fund/clinical/commands/sample-size.d.ts.map +1 -0
  121. package/cli/dist/modules/fund/clinical/commands/sample-size.js +164 -0
  122. package/cli/dist/modules/fund/clinical/commands/sample-size.js.map +1 -0
  123. package/cli/dist/modules/fund/clinical/commands/topic-evaluation-create.d.ts +25 -0
  124. package/cli/dist/modules/fund/clinical/commands/topic-evaluation-create.d.ts.map +1 -0
  125. package/cli/dist/modules/fund/clinical/commands/topic-evaluation-create.js +228 -0
  126. package/cli/dist/modules/fund/clinical/commands/topic-evaluation-create.js.map +1 -0
  127. package/cli/dist/modules/fund/clinical/commands/topic-evaluation-parameters.d.ts +45 -0
  128. package/cli/dist/modules/fund/clinical/commands/topic-evaluation-parameters.d.ts.map +1 -0
  129. package/cli/dist/modules/fund/clinical/commands/topic-evaluation-parameters.js +211 -0
  130. package/cli/dist/modules/fund/clinical/commands/topic-evaluation-parameters.js.map +1 -0
  131. package/cli/dist/modules/fund/clinical/constants.d.ts +85 -0
  132. package/cli/dist/modules/fund/clinical/constants.d.ts.map +1 -0
  133. package/cli/dist/modules/fund/clinical/constants.js +161 -0
  134. package/cli/dist/modules/fund/clinical/constants.js.map +1 -0
  135. package/cli/dist/modules/fund/clinical/form-rules.d.ts +56 -0
  136. package/cli/dist/modules/fund/clinical/form-rules.d.ts.map +1 -0
  137. package/cli/dist/modules/fund/clinical/form-rules.js +542 -0
  138. package/cli/dist/modules/fund/clinical/form-rules.js.map +1 -0
  139. package/cli/dist/modules/fund/clinical/four-elements.d.ts +46 -0
  140. package/cli/dist/modules/fund/clinical/four-elements.d.ts.map +1 -0
  141. package/cli/dist/modules/fund/clinical/four-elements.js +190 -0
  142. package/cli/dist/modules/fund/clinical/four-elements.js.map +1 -0
  143. package/cli/dist/modules/fund/clinical/index.d.ts +3 -0
  144. package/cli/dist/modules/fund/clinical/index.d.ts.map +1 -0
  145. package/cli/dist/modules/fund/clinical/index.js +176 -0
  146. package/cli/dist/modules/fund/clinical/index.js.map +1 -0
  147. package/cli/dist/modules/fund/clinical/parameters.d.ts +51 -0
  148. package/cli/dist/modules/fund/clinical/parameters.d.ts.map +1 -0
  149. package/cli/dist/modules/fund/clinical/parameters.js +145 -0
  150. package/cli/dist/modules/fund/clinical/parameters.js.map +1 -0
  151. package/cli/dist/modules/fund/clinical/sample-size.d.ts +130 -0
  152. package/cli/dist/modules/fund/clinical/sample-size.d.ts.map +1 -0
  153. package/cli/dist/modules/fund/clinical/sample-size.js +356 -0
  154. package/cli/dist/modules/fund/clinical/sample-size.js.map +1 -0
  155. package/cli/dist/modules/fund/clinical/session-cache.d.ts +25 -0
  156. package/cli/dist/modules/fund/clinical/session-cache.d.ts.map +1 -0
  157. package/cli/dist/modules/fund/clinical/session-cache.js +100 -0
  158. package/cli/dist/modules/fund/clinical/session-cache.js.map +1 -0
  159. package/cli/dist/modules/fund/clinical/sse-utils.d.ts +22 -0
  160. package/cli/dist/modules/fund/clinical/sse-utils.d.ts.map +1 -0
  161. package/cli/dist/modules/fund/clinical/sse-utils.js +80 -0
  162. package/cli/dist/modules/fund/clinical/sse-utils.js.map +1 -0
  163. package/cli/dist/modules/fund/constants.d.ts +3 -0
  164. package/cli/dist/modules/fund/constants.d.ts.map +1 -0
  165. package/cli/dist/modules/fund/constants.js +3 -0
  166. package/cli/dist/modules/fund/constants.js.map +1 -0
  167. package/cli/dist/modules/fund/index.d.ts +3 -0
  168. package/cli/dist/modules/fund/index.d.ts.map +1 -0
  169. package/cli/dist/modules/fund/index.js +28 -0
  170. package/cli/dist/modules/fund/index.js.map +1 -0
  171. package/cli/dist/modules/fund/nsfc/apps.d.ts +54 -0
  172. package/cli/dist/modules/fund/nsfc/apps.d.ts.map +1 -0
  173. package/cli/dist/modules/fund/nsfc/apps.js +76 -0
  174. package/cli/dist/modules/fund/nsfc/apps.js.map +1 -0
  175. package/cli/dist/modules/fund/nsfc/article-cache.d.ts +14 -0
  176. package/cli/dist/modules/fund/nsfc/article-cache.d.ts.map +1 -0
  177. package/cli/dist/modules/fund/nsfc/article-cache.js +79 -0
  178. package/cli/dist/modules/fund/nsfc/article-cache.js.map +1 -0
  179. package/cli/dist/modules/fund/nsfc/commands/article-create.d.ts +8 -0
  180. package/cli/dist/modules/fund/nsfc/commands/article-create.d.ts.map +1 -0
  181. package/cli/dist/modules/fund/nsfc/commands/article-create.js +108 -0
  182. package/cli/dist/modules/fund/nsfc/commands/article-create.js.map +1 -0
  183. package/cli/dist/modules/fund/nsfc/commands/article-download.d.ts +42 -0
  184. package/cli/dist/modules/fund/nsfc/commands/article-download.d.ts.map +1 -0
  185. package/cli/dist/modules/fund/nsfc/commands/article-download.js +189 -0
  186. package/cli/dist/modules/fund/nsfc/commands/article-download.js.map +1 -0
  187. package/cli/dist/modules/fund/nsfc/commands/format-convert.d.ts +9 -0
  188. package/cli/dist/modules/fund/nsfc/commands/format-convert.d.ts.map +1 -0
  189. package/cli/dist/modules/fund/nsfc/commands/format-convert.js +98 -0
  190. package/cli/dist/modules/fund/nsfc/commands/format-convert.js.map +1 -0
  191. package/cli/dist/modules/fund/nsfc/commands/hypothesis-analyze.d.ts +12 -0
  192. package/cli/dist/modules/fund/nsfc/commands/hypothesis-analyze.d.ts.map +1 -0
  193. package/cli/dist/modules/fund/nsfc/commands/hypothesis-analyze.js +351 -0
  194. package/cli/dist/modules/fund/nsfc/commands/hypothesis-analyze.js.map +1 -0
  195. package/cli/dist/modules/fund/nsfc/commands/hypothesis-create.d.ts +21 -0
  196. package/cli/dist/modules/fund/nsfc/commands/hypothesis-create.d.ts.map +1 -0
  197. package/cli/dist/modules/fund/nsfc/commands/hypothesis-create.js +197 -0
  198. package/cli/dist/modules/fund/nsfc/commands/hypothesis-create.js.map +1 -0
  199. package/cli/dist/modules/fund/nsfc/commands/hypothesis-figure.d.ts +9 -0
  200. package/cli/dist/modules/fund/nsfc/commands/hypothesis-figure.d.ts.map +1 -0
  201. package/cli/dist/modules/fund/nsfc/commands/hypothesis-figure.js +120 -0
  202. package/cli/dist/modules/fund/nsfc/commands/hypothesis-figure.js.map +1 -0
  203. package/cli/dist/modules/fund/nsfc/commands/hypothesis-genes-select.d.ts +11 -0
  204. package/cli/dist/modules/fund/nsfc/commands/hypothesis-genes-select.d.ts.map +1 -0
  205. package/cli/dist/modules/fund/nsfc/commands/hypothesis-genes-select.js +125 -0
  206. package/cli/dist/modules/fund/nsfc/commands/hypothesis-genes-select.js.map +1 -0
  207. package/cli/dist/modules/fund/nsfc/commands/hypothesis-pick.d.ts +11 -0
  208. package/cli/dist/modules/fund/nsfc/commands/hypothesis-pick.d.ts.map +1 -0
  209. package/cli/dist/modules/fund/nsfc/commands/hypothesis-pick.js +109 -0
  210. package/cli/dist/modules/fund/nsfc/commands/hypothesis-pick.js.map +1 -0
  211. package/cli/dist/modules/fund/nsfc/commands/outline-confirm.d.ts +9 -0
  212. package/cli/dist/modules/fund/nsfc/commands/outline-confirm.d.ts.map +1 -0
  213. package/cli/dist/modules/fund/nsfc/commands/outline-confirm.js +64 -0
  214. package/cli/dist/modules/fund/nsfc/commands/outline-confirm.js.map +1 -0
  215. package/cli/dist/modules/fund/nsfc/commands/outline-create.d.ts +8 -0
  216. package/cli/dist/modules/fund/nsfc/commands/outline-create.d.ts.map +1 -0
  217. package/cli/dist/modules/fund/nsfc/commands/outline-create.js +103 -0
  218. package/cli/dist/modules/fund/nsfc/commands/outline-create.js.map +1 -0
  219. package/cli/dist/modules/fund/nsfc/commands/research-path-confirm.d.ts +9 -0
  220. package/cli/dist/modules/fund/nsfc/commands/research-path-confirm.d.ts.map +1 -0
  221. package/cli/dist/modules/fund/nsfc/commands/research-path-confirm.js +176 -0
  222. package/cli/dist/modules/fund/nsfc/commands/research-path-confirm.js.map +1 -0
  223. package/cli/dist/modules/fund/nsfc/commands/tech-roadmap.d.ts +9 -0
  224. package/cli/dist/modules/fund/nsfc/commands/tech-roadmap.d.ts.map +1 -0
  225. package/cli/dist/modules/fund/nsfc/commands/tech-roadmap.js +190 -0
  226. package/cli/dist/modules/fund/nsfc/commands/tech-roadmap.js.map +1 -0
  227. package/cli/dist/modules/fund/nsfc/constants.d.ts +96 -0
  228. package/cli/dist/modules/fund/nsfc/constants.d.ts.map +1 -0
  229. package/cli/dist/modules/fund/nsfc/constants.js +156 -0
  230. package/cli/dist/modules/fund/nsfc/constants.js.map +1 -0
  231. package/cli/dist/modules/fund/nsfc/graph-render.d.ts +25 -0
  232. package/cli/dist/modules/fund/nsfc/graph-render.d.ts.map +1 -0
  233. package/cli/dist/modules/fund/nsfc/graph-render.js +212 -0
  234. package/cli/dist/modules/fund/nsfc/graph-render.js.map +1 -0
  235. package/cli/dist/modules/fund/nsfc/index.d.ts +4 -0
  236. package/cli/dist/modules/fund/nsfc/index.d.ts.map +1 -0
  237. package/cli/dist/modules/fund/nsfc/index.js +238 -0
  238. package/cli/dist/modules/fund/nsfc/index.js.map +1 -0
  239. package/cli/dist/modules/fund/nsfc/mermaid-render.d.ts +18 -0
  240. package/cli/dist/modules/fund/nsfc/mermaid-render.d.ts.map +1 -0
  241. package/cli/dist/modules/fund/nsfc/mermaid-render.js +47 -0
  242. package/cli/dist/modules/fund/nsfc/mermaid-render.js.map +1 -0
  243. package/cli/dist/modules/fund/nsfc/parse-hypothesis.d.ts +76 -0
  244. package/cli/dist/modules/fund/nsfc/parse-hypothesis.d.ts.map +1 -0
  245. package/cli/dist/modules/fund/nsfc/parse-hypothesis.js +278 -0
  246. package/cli/dist/modules/fund/nsfc/parse-hypothesis.js.map +1 -0
  247. package/cli/dist/modules/fund/nsfc/parse-outline.d.ts +23 -0
  248. package/cli/dist/modules/fund/nsfc/parse-outline.d.ts.map +1 -0
  249. package/cli/dist/modules/fund/nsfc/parse-outline.js +91 -0
  250. package/cli/dist/modules/fund/nsfc/parse-outline.js.map +1 -0
  251. package/cli/dist/modules/fund/nsfc/png-watermark.d.ts +24 -0
  252. package/cli/dist/modules/fund/nsfc/png-watermark.d.ts.map +1 -0
  253. package/cli/dist/modules/fund/nsfc/png-watermark.js +78 -0
  254. package/cli/dist/modules/fund/nsfc/png-watermark.js.map +1 -0
  255. package/cli/dist/modules/fund/nsfc/prompt-hypothesis.d.ts +20 -0
  256. package/cli/dist/modules/fund/nsfc/prompt-hypothesis.d.ts.map +1 -0
  257. package/cli/dist/modules/fund/nsfc/prompt-hypothesis.js +107 -0
  258. package/cli/dist/modules/fund/nsfc/prompt-hypothesis.js.map +1 -0
  259. package/cli/dist/modules/fund/nsfc/prompt-step2.d.ts +18 -0
  260. package/cli/dist/modules/fund/nsfc/prompt-step2.d.ts.map +1 -0
  261. package/cli/dist/modules/fund/nsfc/prompt-step2.js +107 -0
  262. package/cli/dist/modules/fund/nsfc/prompt-step2.js.map +1 -0
  263. package/cli/dist/modules/fund/nsfc/request-body.d.ts +47 -0
  264. package/cli/dist/modules/fund/nsfc/request-body.d.ts.map +1 -0
  265. package/cli/dist/modules/fund/nsfc/request-body.js +38 -0
  266. package/cli/dist/modules/fund/nsfc/request-body.js.map +1 -0
  267. package/cli/dist/modules/fund/nsfc/session-cache.d.ts +48 -0
  268. package/cli/dist/modules/fund/nsfc/session-cache.d.ts.map +1 -0
  269. package/cli/dist/modules/fund/nsfc/session-cache.js +90 -0
  270. package/cli/dist/modules/fund/nsfc/session-cache.js.map +1 -0
  271. package/cli/dist/modules/fund/nsfc/sse-utils.d.ts +22 -0
  272. package/cli/dist/modules/fund/nsfc/sse-utils.d.ts.map +1 -0
  273. package/cli/dist/modules/fund/nsfc/sse-utils.js +81 -0
  274. package/cli/dist/modules/fund/nsfc/sse-utils.js.map +1 -0
  275. package/cli/dist/modules/fund/nsfc/upload.d.ts +3 -0
  276. package/cli/dist/modules/fund/nsfc/upload.d.ts.map +1 -0
  277. package/cli/dist/modules/fund/nsfc/upload.js +59 -0
  278. package/cli/dist/modules/fund/nsfc/upload.js.map +1 -0
  279. package/cli/dist/modules/fund/nsfc/validate.d.ts +30 -0
  280. package/cli/dist/modules/fund/nsfc/validate.d.ts.map +1 -0
  281. package/cli/dist/modules/fund/nsfc/validate.js +91 -0
  282. package/cli/dist/modules/fund/nsfc/validate.js.map +1 -0
  283. package/cli/dist/modules/literature/commands/workflow-list.d.ts +5 -0
  284. package/cli/dist/modules/literature/commands/workflow-list.d.ts.map +1 -0
  285. package/cli/dist/modules/literature/commands/workflow-list.js +9 -0
  286. package/cli/dist/modules/literature/commands/workflow-list.js.map +1 -0
  287. package/cli/dist/modules/literature/commands/workflow-params.d.ts +6 -0
  288. package/cli/dist/modules/literature/commands/workflow-params.d.ts.map +1 -0
  289. package/cli/dist/modules/literature/commands/workflow-params.js +9 -0
  290. package/cli/dist/modules/literature/commands/workflow-params.js.map +1 -0
  291. package/cli/dist/modules/literature/commands/workflow-run.d.ts +7 -0
  292. package/cli/dist/modules/literature/commands/workflow-run.d.ts.map +1 -0
  293. package/cli/dist/modules/literature/commands/workflow-run.js +10 -0
  294. package/cli/dist/modules/literature/commands/workflow-run.js.map +1 -0
  295. package/cli/dist/modules/literature/constants.d.ts +20 -0
  296. package/cli/dist/modules/literature/constants.d.ts.map +1 -0
  297. package/cli/dist/modules/literature/constants.js +56 -0
  298. package/cli/dist/modules/literature/constants.js.map +1 -0
  299. package/cli/dist/modules/literature/index.d.ts +3 -0
  300. package/cli/dist/modules/literature/index.d.ts.map +1 -0
  301. package/cli/dist/modules/literature/index.js +63 -0
  302. package/cli/dist/modules/literature/index.js.map +1 -0
  303. package/cli/dist/modules/meta/analysis.d.ts +127 -0
  304. package/cli/dist/modules/meta/analysis.d.ts.map +1 -0
  305. package/cli/dist/modules/meta/analysis.js +1165 -0
  306. package/cli/dist/modules/meta/analysis.js.map +1 -0
  307. package/cli/dist/modules/meta/api.d.ts +11 -0
  308. package/cli/dist/modules/meta/api.d.ts.map +1 -0
  309. package/cli/dist/modules/meta/api.js +40 -0
  310. package/cli/dist/modules/meta/api.js.map +1 -0
  311. package/cli/dist/modules/meta/commands.d.ts +3 -0
  312. package/cli/dist/modules/meta/commands.d.ts.map +1 -0
  313. package/cli/dist/modules/meta/commands.js +1185 -0
  314. package/cli/dist/modules/meta/commands.js.map +1 -0
  315. package/cli/dist/modules/meta/constants.d.ts +8 -0
  316. package/cli/dist/modules/meta/constants.d.ts.map +1 -0
  317. package/cli/dist/modules/meta/constants.js +9 -0
  318. package/cli/dist/modules/meta/constants.js.map +1 -0
  319. package/cli/dist/modules/meta/extraction.d.ts +206 -0
  320. package/cli/dist/modules/meta/extraction.d.ts.map +1 -0
  321. package/cli/dist/modules/meta/extraction.js +1248 -0
  322. package/cli/dist/modules/meta/extraction.js.map +1 -0
  323. package/cli/dist/modules/meta/index.d.ts +3 -0
  324. package/cli/dist/modules/meta/index.d.ts.map +1 -0
  325. package/cli/dist/modules/meta/index.js +19 -0
  326. package/cli/dist/modules/meta/index.js.map +1 -0
  327. package/cli/dist/modules/meta/node.d.ts +70 -0
  328. package/cli/dist/modules/meta/node.d.ts.map +1 -0
  329. package/cli/dist/modules/meta/node.js +167 -0
  330. package/cli/dist/modules/meta/node.js.map +1 -0
  331. package/cli/dist/modules/meta/plot-params.d.ts +82 -0
  332. package/cli/dist/modules/meta/plot-params.d.ts.map +1 -0
  333. package/cli/dist/modules/meta/plot-params.js +1179 -0
  334. package/cli/dist/modules/meta/plot-params.js.map +1 -0
  335. package/cli/dist/modules/meta/prisma-flow-docx.d.ts +23 -0
  336. package/cli/dist/modules/meta/prisma-flow-docx.d.ts.map +1 -0
  337. package/cli/dist/modules/meta/prisma-flow-docx.js +302 -0
  338. package/cli/dist/modules/meta/prisma-flow-docx.js.map +1 -0
  339. package/cli/dist/modules/meta/retrieve.d.ts +113 -0
  340. package/cli/dist/modules/meta/retrieve.d.ts.map +1 -0
  341. package/cli/dist/modules/meta/retrieve.js +913 -0
  342. package/cli/dist/modules/meta/retrieve.js.map +1 -0
  343. package/cli/dist/modules/meta/screening.d.ts +179 -0
  344. package/cli/dist/modules/meta/screening.d.ts.map +1 -0
  345. package/cli/dist/modules/meta/screening.js +1255 -0
  346. package/cli/dist/modules/meta/screening.js.map +1 -0
  347. package/cli/dist/modules/meta/topic.d.ts +110 -0
  348. package/cli/dist/modules/meta/topic.d.ts.map +1 -0
  349. package/cli/dist/modules/meta/topic.js +865 -0
  350. package/cli/dist/modules/meta/topic.js.map +1 -0
  351. package/cli/dist/modules/meta/types.d.ts +49 -0
  352. package/cli/dist/modules/meta/types.d.ts.map +1 -0
  353. package/cli/dist/modules/meta/types.js +2 -0
  354. package/cli/dist/modules/meta/types.js.map +1 -0
  355. package/cli/dist/modules/meta/workflow.d.ts +154 -0
  356. package/cli/dist/modules/meta/workflow.d.ts.map +1 -0
  357. package/cli/dist/modules/meta/workflow.js +956 -0
  358. package/cli/dist/modules/meta/workflow.js.map +1 -0
  359. package/cli/dist/modules/meta/writing.d.ts +83 -0
  360. package/cli/dist/modules/meta/writing.d.ts.map +1 -0
  361. package/cli/dist/modules/meta/writing.js +1077 -0
  362. package/cli/dist/modules/meta/writing.js.map +1 -0
  363. package/cli/dist/modules/proposal/artifacts.d.ts +18 -0
  364. package/cli/dist/modules/proposal/artifacts.d.ts.map +1 -0
  365. package/cli/dist/modules/proposal/artifacts.js +43 -0
  366. package/cli/dist/modules/proposal/artifacts.js.map +1 -0
  367. package/cli/dist/modules/proposal/commands/basic-create.d.ts +22 -0
  368. package/cli/dist/modules/proposal/commands/basic-create.d.ts.map +1 -0
  369. package/cli/dist/modules/proposal/commands/basic-create.js +81 -0
  370. package/cli/dist/modules/proposal/commands/basic-create.js.map +1 -0
  371. package/cli/dist/modules/proposal/commands/basic-result.d.ts +24 -0
  372. package/cli/dist/modules/proposal/commands/basic-result.d.ts.map +1 -0
  373. package/cli/dist/modules/proposal/commands/basic-result.js +96 -0
  374. package/cli/dist/modules/proposal/commands/basic-result.js.map +1 -0
  375. package/cli/dist/modules/proposal/commands/bioinfo-params.d.ts +5 -0
  376. package/cli/dist/modules/proposal/commands/bioinfo-params.d.ts.map +1 -0
  377. package/cli/dist/modules/proposal/commands/bioinfo-params.js +9 -0
  378. package/cli/dist/modules/proposal/commands/bioinfo-params.js.map +1 -0
  379. package/cli/dist/modules/proposal/commands/bioinfo-run.d.ts +6 -0
  380. package/cli/dist/modules/proposal/commands/bioinfo-run.d.ts.map +1 -0
  381. package/cli/dist/modules/proposal/commands/bioinfo-run.js +10 -0
  382. package/cli/dist/modules/proposal/commands/bioinfo-run.js.map +1 -0
  383. package/cli/dist/modules/proposal/commands/clinical-list.d.ts +5 -0
  384. package/cli/dist/modules/proposal/commands/clinical-list.d.ts.map +1 -0
  385. package/cli/dist/modules/proposal/commands/clinical-list.js +9 -0
  386. package/cli/dist/modules/proposal/commands/clinical-list.js.map +1 -0
  387. package/cli/dist/modules/proposal/commands/clinical-params.d.ts +6 -0
  388. package/cli/dist/modules/proposal/commands/clinical-params.d.ts.map +1 -0
  389. package/cli/dist/modules/proposal/commands/clinical-params.js +9 -0
  390. package/cli/dist/modules/proposal/commands/clinical-params.js.map +1 -0
  391. package/cli/dist/modules/proposal/commands/clinical-run.d.ts +7 -0
  392. package/cli/dist/modules/proposal/commands/clinical-run.d.ts.map +1 -0
  393. package/cli/dist/modules/proposal/commands/clinical-run.js +10 -0
  394. package/cli/dist/modules/proposal/commands/clinical-run.js.map +1 -0
  395. package/cli/dist/modules/proposal/constants.d.ts +34 -0
  396. package/cli/dist/modules/proposal/constants.d.ts.map +1 -0
  397. package/cli/dist/modules/proposal/constants.js +75 -0
  398. package/cli/dist/modules/proposal/constants.js.map +1 -0
  399. package/cli/dist/modules/proposal/index.d.ts +3 -0
  400. package/cli/dist/modules/proposal/index.d.ts.map +1 -0
  401. package/cli/dist/modules/proposal/index.js +95 -0
  402. package/cli/dist/modules/proposal/index.js.map +1 -0
  403. package/cli/dist/modules/proposal/newidea-env.d.ts +28 -0
  404. package/cli/dist/modules/proposal/newidea-env.d.ts.map +1 -0
  405. package/cli/dist/modules/proposal/newidea-env.js +69 -0
  406. package/cli/dist/modules/proposal/newidea-env.js.map +1 -0
  407. package/cli/dist/modules/proposal/newidea-runner.d.ts +25 -0
  408. package/cli/dist/modules/proposal/newidea-runner.d.ts.map +1 -0
  409. package/cli/dist/modules/proposal/newidea-runner.js +158 -0
  410. package/cli/dist/modules/proposal/newidea-runner.js.map +1 -0
  411. package/cli/dist/modules/proposal/parse.d.ts +25 -0
  412. package/cli/dist/modules/proposal/parse.d.ts.map +1 -0
  413. package/cli/dist/modules/proposal/parse.js +173 -0
  414. package/cli/dist/modules/proposal/parse.js.map +1 -0
  415. package/cli/dist/modules/sci/apps.d.ts +48 -0
  416. package/cli/dist/modules/sci/apps.d.ts.map +1 -0
  417. package/cli/dist/modules/sci/apps.js +43 -0
  418. package/cli/dist/modules/sci/apps.js.map +1 -0
  419. package/cli/dist/modules/sci/article-cache.d.ts +32 -0
  420. package/cli/dist/modules/sci/article-cache.d.ts.map +1 -0
  421. package/cli/dist/modules/sci/article-cache.js +163 -0
  422. package/cli/dist/modules/sci/article-cache.js.map +1 -0
  423. package/cli/dist/modules/sci/article-validate.d.ts +11 -0
  424. package/cli/dist/modules/sci/article-validate.d.ts.map +1 -0
  425. package/cli/dist/modules/sci/article-validate.js +43 -0
  426. package/cli/dist/modules/sci/article-validate.js.map +1 -0
  427. package/cli/dist/modules/sci/commands/article-create.d.ts +46 -0
  428. package/cli/dist/modules/sci/commands/article-create.d.ts.map +1 -0
  429. package/cli/dist/modules/sci/commands/article-create.js +315 -0
  430. package/cli/dist/modules/sci/commands/article-create.js.map +1 -0
  431. package/cli/dist/modules/sci/commands/article-download.d.ts +50 -0
  432. package/cli/dist/modules/sci/commands/article-download.d.ts.map +1 -0
  433. package/cli/dist/modules/sci/commands/article-download.js +281 -0
  434. package/cli/dist/modules/sci/commands/article-download.js.map +1 -0
  435. package/cli/dist/modules/sci/commands/outline.d.ts +36 -0
  436. package/cli/dist/modules/sci/commands/outline.d.ts.map +1 -0
  437. package/cli/dist/modules/sci/commands/outline.js +491 -0
  438. package/cli/dist/modules/sci/commands/outline.js.map +1 -0
  439. package/cli/dist/modules/sci/commands/template.d.ts +9 -0
  440. package/cli/dist/modules/sci/commands/template.d.ts.map +1 -0
  441. package/cli/dist/modules/sci/commands/template.js +12 -0
  442. package/cli/dist/modules/sci/commands/template.js.map +1 -0
  443. package/cli/dist/modules/sci/commands.d.ts +3 -0
  444. package/cli/dist/modules/sci/commands.d.ts.map +1 -0
  445. package/cli/dist/modules/sci/commands.js +108 -0
  446. package/cli/dist/modules/sci/commands.js.map +1 -0
  447. package/cli/dist/modules/sci/constants.d.ts +117 -0
  448. package/cli/dist/modules/sci/constants.d.ts.map +1 -0
  449. package/cli/dist/modules/sci/constants.js +152 -0
  450. package/cli/dist/modules/sci/constants.js.map +1 -0
  451. package/cli/dist/modules/sci/content-source.d.ts +18 -0
  452. package/cli/dist/modules/sci/content-source.d.ts.map +1 -0
  453. package/cli/dist/modules/sci/content-source.js +54 -0
  454. package/cli/dist/modules/sci/content-source.js.map +1 -0
  455. package/cli/dist/modules/sci/index.d.ts +3 -0
  456. package/cli/dist/modules/sci/index.d.ts.map +1 -0
  457. package/cli/dist/modules/sci/index.js +19 -0
  458. package/cli/dist/modules/sci/index.js.map +1 -0
  459. package/cli/dist/modules/sci/outline-transform.d.ts +16 -0
  460. package/cli/dist/modules/sci/outline-transform.d.ts.map +1 -0
  461. package/cli/dist/modules/sci/outline-transform.js +67 -0
  462. package/cli/dist/modules/sci/outline-transform.js.map +1 -0
  463. package/cli/dist/modules/sci/precheck-cache.d.ts +23 -0
  464. package/cli/dist/modules/sci/precheck-cache.d.ts.map +1 -0
  465. package/cli/dist/modules/sci/precheck-cache.js +141 -0
  466. package/cli/dist/modules/sci/precheck-cache.js.map +1 -0
  467. package/cli/dist/modules/sci/prompt-article.d.ts +12 -0
  468. package/cli/dist/modules/sci/prompt-article.d.ts.map +1 -0
  469. package/cli/dist/modules/sci/prompt-article.js +37 -0
  470. package/cli/dist/modules/sci/prompt-article.js.map +1 -0
  471. package/cli/dist/modules/sci/prompt-precheck.d.ts +16 -0
  472. package/cli/dist/modules/sci/prompt-precheck.d.ts.map +1 -0
  473. package/cli/dist/modules/sci/prompt-precheck.js +61 -0
  474. package/cli/dist/modules/sci/prompt-precheck.js.map +1 -0
  475. package/cli/dist/modules/sci/sse-utils.d.ts +50 -0
  476. package/cli/dist/modules/sci/sse-utils.d.ts.map +1 -0
  477. package/cli/dist/modules/sci/sse-utils.js +207 -0
  478. package/cli/dist/modules/sci/sse-utils.js.map +1 -0
  479. package/cli/dist/modules/shared/result-wrapper.d.ts +71 -0
  480. package/cli/dist/modules/shared/result-wrapper.d.ts.map +1 -0
  481. package/cli/dist/modules/shared/result-wrapper.js +95 -0
  482. package/cli/dist/modules/shared/result-wrapper.js.map +1 -0
  483. package/cli/dist/modules/shared/workflow-app/api.d.ts +6 -0
  484. package/cli/dist/modules/shared/workflow-app/api.d.ts.map +1 -0
  485. package/cli/dist/modules/shared/workflow-app/api.js +31 -0
  486. package/cli/dist/modules/shared/workflow-app/api.js.map +1 -0
  487. package/cli/dist/modules/shared/workflow-app/command.d.ts +30 -0
  488. package/cli/dist/modules/shared/workflow-app/command.d.ts.map +1 -0
  489. package/cli/dist/modules/shared/workflow-app/command.js +183 -0
  490. package/cli/dist/modules/shared/workflow-app/command.js.map +1 -0
  491. package/cli/dist/modules/shared/workflow-app/constants.d.ts +12 -0
  492. package/cli/dist/modules/shared/workflow-app/constants.d.ts.map +1 -0
  493. package/cli/dist/modules/shared/workflow-app/constants.js +21 -0
  494. package/cli/dist/modules/shared/workflow-app/constants.js.map +1 -0
  495. package/cli/dist/modules/shared/workflow-app/form.d.ts +21 -0
  496. package/cli/dist/modules/shared/workflow-app/form.d.ts.map +1 -0
  497. package/cli/dist/modules/shared/workflow-app/form.js +123 -0
  498. package/cli/dist/modules/shared/workflow-app/form.js.map +1 -0
  499. package/cli/dist/modules/shared/workflow-app/index.d.ts +8 -0
  500. package/cli/dist/modules/shared/workflow-app/index.d.ts.map +1 -0
  501. package/cli/dist/modules/shared/workflow-app/index.js +7 -0
  502. package/cli/dist/modules/shared/workflow-app/index.js.map +1 -0
  503. package/cli/dist/modules/shared/workflow-app/run.d.ts +15 -0
  504. package/cli/dist/modules/shared/workflow-app/run.d.ts.map +1 -0
  505. package/cli/dist/modules/shared/workflow-app/run.js +71 -0
  506. package/cli/dist/modules/shared/workflow-app/run.js.map +1 -0
  507. package/cli/dist/modules/shared/workflow-app/types.d.ts +74 -0
  508. package/cli/dist/modules/shared/workflow-app/types.d.ts.map +1 -0
  509. package/cli/dist/modules/shared/workflow-app/types.js +3 -0
  510. package/cli/dist/modules/shared/workflow-app/types.js.map +1 -0
  511. package/cli/dist/modules/site-configs.d.ts +4 -0
  512. package/cli/dist/modules/site-configs.d.ts.map +1 -0
  513. package/cli/dist/modules/site-configs.js +21 -0
  514. package/cli/dist/modules/site-configs.js.map +1 -0
  515. package/cli/dist/modules/upgrade/index.d.ts +6 -0
  516. package/cli/dist/modules/upgrade/index.d.ts.map +1 -0
  517. package/cli/dist/modules/upgrade/index.js +105 -0
  518. package/cli/dist/modules/upgrade/index.js.map +1 -0
  519. package/cli/dist/program.d.ts +3 -0
  520. package/cli/dist/program.d.ts.map +1 -0
  521. package/cli/dist/program.js +69 -0
  522. package/cli/dist/program.js.map +1 -0
  523. package/package.json +37 -0
@@ -0,0 +1,542 @@
1
+ // 临床选题评估表单规则:显隐、排序、选项裁剪、必填、校验、预检输出解析
2
+ // 移植自 helix-workbench-platform/src/hooks/topicEvaluationFormRules.ts
3
+ import { DISEASE_OBJECTIVE_VALUE, DIAGNOSTIC_OBJECTIVE_VALUE, PROGNOSIS_OBJECTIVE_VALUE, RESEARCH_OBJECTIVE_KEY, YES_NO_OPTIONS, YES_NO_SEGMENTED_FIELD_KEYS, normalizeYesNoFieldValue, } from "./constants.js";
4
+ // ============================================================
5
+ // placeholder
6
+ // ============================================================
7
+ const placeholderMap = {
8
+ P: "请输入研究人群(Population),例如:30-60岁女性、新生儿等。",
9
+ I: "请输入干预(Intervention),例如:胸腔镜辅助微创二尖瓣成形术。",
10
+ C: "请输入对照(Control),例如:常规开胸二尖瓣手术治疗。",
11
+ O: "请输入主要结局",
12
+ F: "请输入预后因子",
13
+ exposure_range1: "请选择类型",
14
+ exposure_range2: "请选择类型",
15
+ exposure_type1: "请输入",
16
+ exposure_type2: "请输入",
17
+ };
18
+ const diagnosticPicoPlaceholderMap = {
19
+ P: "请输入研究人群或疾病,例如:胰腺癌。",
20
+ I: "请输入待检测或评估的方法/工具/标志物等,例如:ELISA检测血清CA-199。",
21
+ C: "请输入金标准方法/工具/标志物等,例如:组织病理活检。",
22
+ };
23
+ export function getTopicEvaluationFieldPlaceholder(fieldKey, researchObjective) {
24
+ if (researchObjective === DIAGNOSTIC_OBJECTIVE_VALUE) {
25
+ const diagnostic = diagnosticPicoPlaceholderMap[fieldKey];
26
+ if (diagnostic !== undefined)
27
+ return diagnostic;
28
+ }
29
+ return placeholderMap[fieldKey];
30
+ }
31
+ /**
32
+ * 对齐网页输入框 placeholder:
33
+ * 优先固定文案表;否则 paragraph/string 回退为「请输入{展示名}」。
34
+ */
35
+ export function resolveTopicEvaluationFieldPlaceholder(field, researchObjective) {
36
+ const mapped = getTopicEvaluationFieldPlaceholder(field.key, researchObjective);
37
+ if (mapped)
38
+ return mapped;
39
+ const displayName = getFieldDisplayName(field, researchObjective);
40
+ if (field.type === "select" || YES_NO_SEGMENTED_FIELD_KEYS.has(field.key)) {
41
+ return isDropdownExposureField(field.key)
42
+ ? "请选择类型"
43
+ : `请选择${displayName}`;
44
+ }
45
+ return `请输入${displayName}`;
46
+ }
47
+ // ============================================================
48
+ // select 选项联动隐藏(对齐 FORM_HIDE_OPTIONS_CONDITIONS)
49
+ // ============================================================
50
+ export const FORM_HIDE_OPTIONS_CONDITIONS = {
51
+ Study_design: {
52
+ 临床试验: { Temporal_direction: ["回顾性"] },
53
+ },
54
+ Research_Objective: {
55
+ 病因: {
56
+ Study_design: ["临床试验", "病例对照", "横断面"],
57
+ Temporal_direction: ["回顾性"],
58
+ },
59
+ 疗效: { Study_design: ["病例对照", "横断面"] },
60
+ 预后: { Study_design: ["病例对照", "横断面"] },
61
+ 诊断: { Study_design: ["临床试验"] },
62
+ },
63
+ };
64
+ const WATCH_KEYS_FOR_HIDE_OPTIONS = Object.keys(FORM_HIDE_OPTIONS_CONDITIONS);
65
+ // ============================================================
66
+ // 字段显隐(对齐 FormItemShowMap + shouldShowField)
67
+ // ============================================================
68
+ const FormItemShowMap = {
69
+ Temporal_direction: { [RESEARCH_OBJECTIVE_KEY]: ["疗效", "预后", "病因"] },
70
+ I: { [RESEARCH_OBJECTIVE_KEY]: ["疗效", "预后", "诊断"] },
71
+ C: { [RESEARCH_OBJECTIVE_KEY]: ["疗效", "诊断"] },
72
+ exposure_range1: { [RESEARCH_OBJECTIVE_KEY]: ["病因"] },
73
+ exposure_type1: { [RESEARCH_OBJECTIVE_KEY]: ["病因"] },
74
+ exposure_range2: { [RESEARCH_OBJECTIVE_KEY]: ["病因"] },
75
+ exposure_type2: { [RESEARCH_OBJECTIVE_KEY]: ["病因"] },
76
+ O: { [RESEARCH_OBJECTIVE_KEY]: ["病因", "预后"] },
77
+ F: { [RESEARCH_OBJECTIVE_KEY]: ["预后"] },
78
+ Prognosis_model: { [RESEARCH_OBJECTIVE_KEY]: ["预后"] },
79
+ Assess_prognosis: { [RESEARCH_OBJECTIVE_KEY]: ["预后"] },
80
+ diagnostic_model: { [RESEARCH_OBJECTIVE_KEY]: ["诊断"] },
81
+ };
82
+ /**
83
+ * 字段在哪些研究类别下可见。
84
+ * 返回 undefined 表示始终可见(不受研究类别显隐表约束)。
85
+ */
86
+ export function getFieldVisibleObjectives(fieldKey) {
87
+ const allowed = FormItemShowMap[fieldKey]?.[RESEARCH_OBJECTIVE_KEY];
88
+ return allowed?.length ? [...allowed] : undefined;
89
+ }
90
+ export function shouldShowField(fieldKey, inputs, researchObjective, assessPrognosis) {
91
+ const rules = FormItemShowMap[fieldKey];
92
+ if (rules) {
93
+ const allowed = rules[RESEARCH_OBJECTIVE_KEY];
94
+ if (allowed?.length) {
95
+ const value = researchObjective ?? "";
96
+ if (!allowed.includes(value))
97
+ return false;
98
+ }
99
+ }
100
+ if (fieldKey === "I" && researchObjective === PROGNOSIS_OBJECTIVE_VALUE) {
101
+ const assess = normalizeYesNoFieldValue(assessPrognosis);
102
+ if (assess === "否")
103
+ return false;
104
+ }
105
+ if (!rules)
106
+ return true;
107
+ const allowed = rules[RESEARCH_OBJECTIVE_KEY];
108
+ if (!allowed?.length)
109
+ return true;
110
+ return allowed.includes(researchObjective ?? "");
111
+ }
112
+ // ============================================================
113
+ // 选项裁剪(对齐 getEffectiveSelectOptions)
114
+ // ============================================================
115
+ export function getEffectiveSelectOptions(fieldKey, item, allInputs) {
116
+ if (YES_NO_SEGMENTED_FIELD_KEYS.has(fieldKey)) {
117
+ return [...YES_NO_OPTIONS];
118
+ }
119
+ if (item.type !== "select")
120
+ return item.options || [];
121
+ let options = [...(item.options || [])];
122
+ for (const [watchField, valueToFieldHides] of Object.entries(FORM_HIDE_OPTIONS_CONDITIONS)) {
123
+ const watchValue = allInputs[watchField];
124
+ if (!watchValue)
125
+ continue;
126
+ const fieldHides = valueToFieldHides[watchValue];
127
+ if (!fieldHides || typeof fieldHides !== "object")
128
+ continue;
129
+ const toHide = fieldHides[fieldKey];
130
+ if (!toHide?.length)
131
+ continue;
132
+ options = options.filter((opt) => !toHide.includes(opt));
133
+ }
134
+ return options;
135
+ }
136
+ /**
137
+ * 对齐页面的选项联动 effect:当裁剪后只剩一个有效选项时自动写入。
138
+ * 多选字段仍保留用户输入,交由选择器/校验处理。
139
+ */
140
+ export function normalizeSingleEffectiveSelectValues(fields, inputs) {
141
+ const values = { ...inputs };
142
+ const autoSelected = {};
143
+ // Study_design 会进一步影响 Temporal_direction;两轮足以稳定依赖链。
144
+ for (let pass = 0; pass < 2; pass += 1) {
145
+ for (const field of fields) {
146
+ const isSelect = field.type === "select" ||
147
+ YES_NO_SEGMENTED_FIELD_KEYS.has(field.key);
148
+ if (!isSelect)
149
+ continue;
150
+ const effective = getEffectiveSelectOptions(field.key, field, values);
151
+ if (effective.length !== 1)
152
+ continue;
153
+ const only = effective[0];
154
+ autoSelected[field.key] = only;
155
+ values[field.key] = only;
156
+ }
157
+ }
158
+ return { values, autoSelected };
159
+ }
160
+ export function getHideOptionsWatchSignature(inputs) {
161
+ return WATCH_KEYS_FOR_HIDE_OPTIONS.map((k) => inputs[k] ?? "").join("\0");
162
+ }
163
+ /** 下拉大类(与页面分段 radio / Select 分流一致) */
164
+ export function isDropdownExposureField(fieldKey) {
165
+ return fieldKey === "exposure_range1" || fieldKey === "exposure_range2";
166
+ }
167
+ // ============================================================
168
+ // 默认值(对齐 buildInitialParameterValues)
169
+ // ============================================================
170
+ export function buildInitialParameterValues(fields) {
171
+ const acc = {};
172
+ for (const item of fields) {
173
+ if (YES_NO_SEGMENTED_FIELD_KEYS.has(item.key)) {
174
+ acc[item.key] = normalizeYesNoFieldValue(undefined);
175
+ }
176
+ else if (item.type === "select") {
177
+ if (item.key === "exposure_range1") {
178
+ acc[item.key] = item.options?.[0] ?? "";
179
+ }
180
+ else if (isDropdownExposureField(item.key)) {
181
+ acc[item.key] = "";
182
+ }
183
+ else {
184
+ acc[item.key] = String(item.options?.[0] ?? "");
185
+ }
186
+ }
187
+ else {
188
+ acc[item.key] = "";
189
+ }
190
+ }
191
+ return acc;
192
+ }
193
+ // ============================================================
194
+ // 有效必填(对齐 getEffectiveFieldRequired)
195
+ // ============================================================
196
+ export function getEffectiveFieldRequired(field, inputs, isVisible) {
197
+ if (!isVisible)
198
+ return false;
199
+ const ro = inputs[RESEARCH_OBJECTIVE_KEY];
200
+ if (ro === DISEASE_OBJECTIVE_VALUE && field.key === "exposure_range1") {
201
+ return true;
202
+ }
203
+ return field.required;
204
+ }
205
+ // ============================================================
206
+ // 展示名(对齐 getFieldDisplayName)
207
+ // ============================================================
208
+ export function getFieldDisplayName(field, researchObjective) {
209
+ if (field.key === "I" && researchObjective === DIAGNOSTIC_OBJECTIVE_VALUE) {
210
+ return "待评价的诊断实验(Index Test)";
211
+ }
212
+ return field.name;
213
+ }
214
+ // ============================================================
215
+ // 排序(对齐 applyTopicEvaluationDisplayOrder)
216
+ // ============================================================
217
+ const FORM_DISPLAY_ORDER = [
218
+ "Research_Objective",
219
+ "Study_design",
220
+ "Temporal_direction",
221
+ "hospitals",
222
+ "P",
223
+ "I",
224
+ "C",
225
+ "exposure_range1",
226
+ "exposure_range2",
227
+ "exposure_type1",
228
+ "exposure_type2",
229
+ "O",
230
+ "F",
231
+ "Prognosis_model",
232
+ "Assess_prognosis",
233
+ "diagnostic_model",
234
+ ];
235
+ const PROGNOSIS_FORM_DISPLAY_ORDER = [
236
+ "Research_Objective",
237
+ "Study_design",
238
+ "Temporal_direction",
239
+ "hospitals",
240
+ "P",
241
+ "Assess_prognosis",
242
+ "I",
243
+ "F",
244
+ "Prognosis_model",
245
+ "O",
246
+ ];
247
+ const DIAGNOSTIC_FORM_DISPLAY_ORDER = [
248
+ "Research_Objective",
249
+ "Study_design",
250
+ "hospitals",
251
+ "diagnostic_model",
252
+ "P",
253
+ "I",
254
+ "C",
255
+ ];
256
+ const FIELD_ORDER_MAP = new Map(FORM_DISPLAY_ORDER.map((key, index) => [key, index]));
257
+ const PROGNOSIS_FIELD_ORDER_MAP = new Map(PROGNOSIS_FORM_DISPLAY_ORDER.map((key, index) => [key, index]));
258
+ const DIAGNOSTIC_FIELD_ORDER_MAP = new Map(DIAGNOSTIC_FORM_DISPLAY_ORDER.map((key, index) => [key, index]));
259
+ export function applyTopicEvaluationDisplayOrder(fields, researchObjective) {
260
+ const orderMap = researchObjective === PROGNOSIS_OBJECTIVE_VALUE
261
+ ? PROGNOSIS_FIELD_ORDER_MAP
262
+ : researchObjective === DIAGNOSTIC_OBJECTIVE_VALUE
263
+ ? DIAGNOSTIC_FIELD_ORDER_MAP
264
+ : FIELD_ORDER_MAP;
265
+ return [...fields].sort((a, b) => {
266
+ const aOrder = orderMap.get(a.key) ?? Number.MAX_SAFE_INTEGER;
267
+ const bOrder = orderMap.get(b.key) ?? Number.MAX_SAFE_INTEGER;
268
+ return aOrder - bOrder;
269
+ });
270
+ }
271
+ // ============================================================
272
+ // 收集可见字段值
273
+ // ============================================================
274
+ export function collectVisibleFieldValues(visibleFields, inputs) {
275
+ const values = {};
276
+ for (const field of visibleFields) {
277
+ values[field.key] = inputs[field.key] ?? "";
278
+ }
279
+ return values;
280
+ }
281
+ /** 仅保留 trim 后非空的字段(对齐 pickNonEmptyTopicEvaluationFieldValues) */
282
+ export function pickNonEmptyTopicEvaluationFieldValues(values) {
283
+ return Object.fromEntries(Object.entries(values).filter(([, v]) => String(v ?? "").trim() !== ""));
284
+ }
285
+ export function validateTopicEvaluationForm(visibleFields, inputs) {
286
+ const nextErrors = {};
287
+ const ro = inputs[RESEARCH_OBJECTIVE_KEY];
288
+ for (const field of visibleFields) {
289
+ const required = getEffectiveFieldRequired(field, inputs, true);
290
+ const value = String(inputs[field.key] ?? "").trim();
291
+ if (required && !value) {
292
+ const label = getFieldDisplayName(field, ro);
293
+ const tip = field.type === "select" ? "选择" : "输入";
294
+ nextErrors[field.key] = `请先${tip}${label},再点击预检~`;
295
+ continue;
296
+ }
297
+ const isSelect = field.type === "select" ||
298
+ YES_NO_SEGMENTED_FIELD_KEYS.has(field.key);
299
+ if (value && isSelect) {
300
+ const effective = getEffectiveSelectOptions(field.key, field, inputs);
301
+ if (!effective.includes(value)) {
302
+ const label = getFieldDisplayName(field, ro);
303
+ nextErrors[field.key] =
304
+ `${label}的选项“${value}”无效,可选:${effective.join(" / ")}`;
305
+ }
306
+ }
307
+ }
308
+ // 病因暴露因素交叉规则
309
+ if (ro === DISEASE_OBJECTIVE_VALUE) {
310
+ const exposureRange1 = String(inputs.exposure_range1 ?? "").trim();
311
+ const exposureRange2 = String(inputs.exposure_range2 ?? "").trim();
312
+ const exposureType1 = String(inputs.exposure_type1 ?? "").trim();
313
+ const exposureType2 = String(inputs.exposure_type2 ?? "").trim();
314
+ if (exposureRange1 && exposureRange2 && exposureRange1 === exposureRange2) {
315
+ nextErrors.exposure_range1 = nextErrors.exposure_range1 || "大类1 和大类2 不能相同";
316
+ nextErrors.exposure_range2 = nextErrors.exposure_range2 || "大类1 和大类2 不能相同";
317
+ }
318
+ if (exposureRange1 && exposureRange2) {
319
+ if (!exposureType1) {
320
+ nextErrors.exposure_type1 = nextErrors.exposure_type1 || "当两个大类都有值时,具体因素为必填项";
321
+ }
322
+ if (!exposureType2) {
323
+ nextErrors.exposure_type2 = nextErrors.exposure_type2 || "当两个大类都有值时,具体因素为必填项";
324
+ }
325
+ }
326
+ }
327
+ if (Object.keys(nextErrors).length > 0) {
328
+ const firstMessage = Object.values(nextErrors)[0];
329
+ return { ok: false, errors: nextErrors, firstMessage };
330
+ }
331
+ const values = {};
332
+ for (const field of visibleFields) {
333
+ values[field.key] = inputs[field.key] ?? "";
334
+ }
335
+ return { ok: true, values };
336
+ }
337
+ // ============================================================
338
+ // 表单快照漂移检测(对齐 isTopicEvaluationFormDriftedFromSnapshot)
339
+ // ============================================================
340
+ function normalizeTopicEvaluationCompareValue(fieldKey, raw) {
341
+ if (YES_NO_SEGMENTED_FIELD_KEYS.has(fieldKey)) {
342
+ return normalizeYesNoFieldValue(raw);
343
+ }
344
+ return String(raw ?? "").trim();
345
+ }
346
+ export function isTopicEvaluationFormDriftedFromSnapshot(snapshot, current, allFields) {
347
+ const snapshotRo = snapshot[RESEARCH_OBJECTIVE_KEY];
348
+ const snapshotAssessPrognosis = snapshot["Assess_prognosis"];
349
+ const ordered = applyTopicEvaluationDisplayOrder(allFields, snapshotRo);
350
+ const fieldsAtPrecheck = ordered.filter((item) => shouldShowField(item.key, snapshot, snapshotRo, snapshotAssessPrognosis));
351
+ for (const field of fieldsAtPrecheck) {
352
+ const key = field.key;
353
+ if (normalizeTopicEvaluationCompareValue(key, snapshot[key]) !==
354
+ normalizeTopicEvaluationCompareValue(key, current[key])) {
355
+ return true;
356
+ }
357
+ }
358
+ return false;
359
+ }
360
+ // ============================================================
361
+ // 结果区标题(对齐 buildTopicEvaluationTitle)
362
+ // ============================================================
363
+ export function buildTopicEvaluationTitle(values) {
364
+ const P = values.P?.trim() ?? "";
365
+ const I = values.I?.trim() ?? "";
366
+ const C = values.C?.trim() ?? "";
367
+ const researchObjective = values[RESEARCH_OBJECTIVE_KEY]?.trim() ?? "";
368
+ const studyDesign = values.Study_design?.trim() ?? "";
369
+ const temporalDirection = values.Temporal_direction?.trim() ?? "";
370
+ const hospitals = values.hospitals?.trim() ?? "";
371
+ const subject = [P, I, C].filter(Boolean).join("");
372
+ const studyType = [hospitals, temporalDirection, studyDesign].filter(Boolean).join("");
373
+ let title = "";
374
+ if (subject)
375
+ title += `基于${subject}的`;
376
+ if (researchObjective)
377
+ title += researchObjective;
378
+ title += "研究";
379
+ if (studyType) {
380
+ const typePart = studyType.endsWith("研究") ? studyType : `${studyType}研究`;
381
+ title += `:${typePart}`;
382
+ }
383
+ return title;
384
+ }
385
+ const RESULT_STATUS_TOKENS = new Set(["success", "succeeded", "failure", "failed"]);
386
+ function outcomeFromResultField(o) {
387
+ const r = typeof o.result === "string" ? o.result.trim().toLowerCase() : "";
388
+ if (r === "success" || r === "succeeded")
389
+ return "success";
390
+ if (r === "failed" || r === "failure")
391
+ return "failed";
392
+ return null;
393
+ }
394
+ const PRECHECK_STATUS_OUTPUT_KEYS = new Set([
395
+ "result",
396
+ "status",
397
+ "outcome",
398
+ "evaluation_result",
399
+ "pre_check_pass",
400
+ "pass",
401
+ ]);
402
+ const PRECHECK_CONTENT_KEY_PRIORITY = [
403
+ "content",
404
+ "text",
405
+ "answer",
406
+ "output",
407
+ ];
408
+ function outputSectionLabel(key) {
409
+ const normalized = key.toLowerCase();
410
+ if (normalized.includes("example") ||
411
+ normalized.includes("sample") ||
412
+ key.includes("示例")) {
413
+ return "填写示例";
414
+ }
415
+ if (normalized.includes("suggest") ||
416
+ normalized.includes("advice") ||
417
+ key.includes("建议")) {
418
+ return "修改建议";
419
+ }
420
+ return "";
421
+ }
422
+ function stringifyPrecheckOutputValue(key, value) {
423
+ if (typeof value === "string") {
424
+ const text = value.trim();
425
+ if (!text || RESULT_STATUS_TOKENS.has(text.toLowerCase()))
426
+ return "";
427
+ const label = outputSectionLabel(key);
428
+ if (label &&
429
+ !text.includes(label) &&
430
+ !/^#{1,6}\s+/m.test(text)) {
431
+ return `## ${label}\n\n${text}`;
432
+ }
433
+ return text;
434
+ }
435
+ if (Array.isArray(value)) {
436
+ return value
437
+ .map((item) => stringifyPrecheckOutputValue(key, item))
438
+ .filter(Boolean)
439
+ .join("\n");
440
+ }
441
+ if (value && typeof value === "object") {
442
+ const rows = Object.entries(value)
443
+ .map(([childKey, childValue]) => {
444
+ if (typeof childValue !== "string" &&
445
+ typeof childValue !== "number") {
446
+ return "";
447
+ }
448
+ const text = String(childValue).trim();
449
+ return text ? `- ${childKey}:${text}` : "";
450
+ })
451
+ .filter(Boolean);
452
+ if (!rows.length)
453
+ return "";
454
+ const label = outputSectionLabel(key);
455
+ return `${label ? `## ${label}\n\n` : ""}${rows.join("\n")}`;
456
+ }
457
+ return "";
458
+ }
459
+ function appendDistinctContent(parts, candidate) {
460
+ const text = candidate.trim();
461
+ if (!text)
462
+ return;
463
+ for (let index = 0; index < parts.length; index += 1) {
464
+ const existing = parts[index];
465
+ if (existing.includes(text))
466
+ return;
467
+ if (text.includes(existing)) {
468
+ parts[index] = text;
469
+ return;
470
+ }
471
+ }
472
+ parts.push(text);
473
+ }
474
+ /**
475
+ * 网页把 parse 后的单个 content 交给 MarkdownPreview。
476
+ * 工作流可能把「修改建议」「填写示例」拆成多个 outputs 字段,因此 CLI
477
+ * 需要先将所有可展示片段合成同一段完整 Markdown,不能只取第一个字段。
478
+ */
479
+ export function pickCompleteTopicEvaluationContent(outputs) {
480
+ const parts = [];
481
+ const consumedKeys = new Set();
482
+ for (const key of PRECHECK_CONTENT_KEY_PRIORITY) {
483
+ if (!(key in outputs))
484
+ continue;
485
+ consumedKeys.add(key);
486
+ appendDistinctContent(parts, stringifyPrecheckOutputValue(key, outputs[key]));
487
+ }
488
+ for (const [key, value] of Object.entries(outputs)) {
489
+ if (consumedKeys.has(key) ||
490
+ PRECHECK_STATUS_OUTPUT_KEYS.has(key.toLowerCase()) ||
491
+ key.toLowerCase().includes("workflow_run") ||
492
+ key.toLowerCase().includes("reference")) {
493
+ continue;
494
+ }
495
+ appendDistinctContent(parts, stringifyPrecheckOutputValue(key, value));
496
+ }
497
+ const result = typeof outputs.result === "string"
498
+ ? outputs.result.trim()
499
+ : "";
500
+ if (parts.length === 0 &&
501
+ result &&
502
+ !RESULT_STATUS_TOKENS.has(result.toLowerCase())) {
503
+ parts.push(result);
504
+ }
505
+ return parts.join("\n\n");
506
+ }
507
+ function isFailureOutput(o) {
508
+ const r = typeof o.result === "string" ? o.result.trim().toLowerCase() : "";
509
+ if (r === "failure" || r === "failed")
510
+ return true;
511
+ if (r === "success" || r === "succeeded")
512
+ return false;
513
+ const pass = o.pre_check_pass ?? o.pass;
514
+ if (pass === false || pass === "false" || pass === 0)
515
+ return true;
516
+ if (o.outcome === "failure")
517
+ return true;
518
+ if (o.evaluation_result === "failed" || o.evaluation_result === "failure")
519
+ return true;
520
+ if (o.status === "failed" && o.pass !== true && o.pass !== "true")
521
+ return true;
522
+ const text = typeof o.text === "string" ? o.text.trim() : "";
523
+ if (text.startsWith("预检失败"))
524
+ return true;
525
+ return false;
526
+ }
527
+ export function parseTopicEvaluationOutputs(outputs) {
528
+ if (!outputs || typeof outputs !== "object") {
529
+ return { outcome: "success", content: "" };
530
+ }
531
+ const o = outputs;
532
+ const fromResult = outcomeFromResultField(o);
533
+ const content = pickCompleteTopicEvaluationContent(o);
534
+ if (fromResult !== null) {
535
+ return { outcome: fromResult, content };
536
+ }
537
+ return {
538
+ outcome: isFailureOutput(o) ? "failed" : "success",
539
+ content,
540
+ };
541
+ }
542
+ //# sourceMappingURL=form-rules.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-rules.js","sourceRoot":"","sources":["../../../../src/modules/fund/clinical/form-rules.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,qEAAqE;AACrE,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,yBAAyB,EACzB,sBAAsB,EACtB,cAAc,EACd,2BAA2B,EAC3B,wBAAwB,GAEzB,MAAM,gBAAgB,CAAC;AAExB,+DAA+D;AAC/D,cAAc;AACd,+DAA+D;AAE/D,MAAM,cAAc,GAA2B;IAC7C,CAAC,EAAE,uCAAuC;IAC1C,CAAC,EAAE,uCAAuC;IAC1C,CAAC,EAAE,gCAAgC;IACnC,CAAC,EAAE,SAAS;IACZ,CAAC,EAAE,SAAS;IACZ,eAAe,EAAE,OAAO;IACxB,eAAe,EAAE,OAAO;IACxB,cAAc,EAAE,KAAK;IACrB,cAAc,EAAE,KAAK;CACtB,CAAC;AAEF,MAAM,4BAA4B,GAA2B;IAC3D,CAAC,EAAE,oBAAoB;IACvB,CAAC,EAAE,0CAA0C;IAC7C,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AC;IAC7C,CAAC;IACD,MAAM,CAAC,GAAG,OAAkC,CAAC;IAC7C,MAAM,UAAU,GAAG,sBAAsB,CAAC,CAAC,CAAC,CAAC;IAC7C,MAAM,OAAO,GAAG,kCAAkC,CAAC,CAAC,CAAC,CAAC;IACtD,IAAI,UAAU,KAAK,IAAI,EAAE,CAAC;QACxB,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC;IAC1C,CAAC;IACD,OAAO;QACL,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;QAClD,OAAO;KACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,46 @@
1
+ export interface DesignEditableOption {
2
+ label: string;
3
+ description: string;
4
+ }
5
+ export interface DesignEditableField {
6
+ field: string;
7
+ ori_label: string;
8
+ new_label: string;
9
+ value_option: DesignEditableOption[];
10
+ }
11
+ export interface ClinicalFourElementsDraft {
12
+ design: string;
13
+ purpose: string;
14
+ outcome: string;
15
+ /** 展示用的样本量计算结果 */
16
+ sample: string;
17
+ /** 预检和全文工作流使用的完整参数包 */
18
+ sampleParam: string;
19
+ designEditableFields: DesignEditableField[];
20
+ }
21
+ export interface ClinicalFourElementsProofread {
22
+ content: string;
23
+ outcome: "success" | "failed";
24
+ }
25
+ export declare const EMPTY_CLINICAL_FOUR_ELEMENTS_DRAFT: ClinicalFourElementsDraft;
26
+ /**
27
+ * 对齐原站 ClinicalFourElementsCheck:
28
+ * `canEditDesign = (design_editable_fields?.length ?? 0) > 0`
29
+ */
30
+ export declare function canEditFourElementsDesign(draft: Pick<ClinicalFourElementsDraft, "designEditableFields">): boolean;
31
+ /** 初次四要素/目的同步 outputs:优先 new_*,兼容旧字段。 */
32
+ export declare function pickClinicalFourElementsFromOutputs(outputs: Record<string, unknown>): ClinicalFourElementsDraft;
33
+ /** 仅用非空工作流结果覆盖本地草稿,避免迟到空值抹掉编辑。 */
34
+ export declare function mergeClinicalFourElementsDraft(previous: ClinicalFourElementsDraft, outputs: Record<string, unknown>): ClinicalFourElementsDraft;
35
+ export declare function patchOutcomeSampleFromOutputs(draft: ClinicalFourElementsDraft, outputs: Record<string, unknown>): ClinicalFourElementsDraft;
36
+ export declare function buildPurposeSyncInputs(topicInputs: Record<string, string>, draft: ClinicalFourElementsDraft): Record<string, string>;
37
+ export declare function fourElementsDraftToWorkflowInputs(draft: ClinicalFourElementsDraft): Record<string, string>;
38
+ export declare function validateFourElementsText(value: string, label: "研究目的" | "结局指标"): string;
39
+ export declare function validateFourElementsDraft(draft: ClinicalFourElementsDraft): Record<string, string>;
40
+ /** 研究设计只能选择工作流字典内的 label。 */
41
+ export declare function applyDesignEditableFieldSelections(draft: ClinicalFourElementsDraft, selections: Record<string, string>): ClinicalFourElementsDraft;
42
+ export declare function isFourElementsDraftDrifted(snapshot: Record<string, string> | null | undefined, draft: ClinicalFourElementsDraft): boolean;
43
+ export declare function parseFourElementsProofreadOutputs(outputs: Record<string, unknown>): ClinicalFourElementsProofread;
44
+ /** 对齐网页 Proofread 的临床 Markdown 标题预处理。 */
45
+ export declare function preprocessClinicalMarkdown(markdown: string): string;
46
+ //# sourceMappingURL=four-elements.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"four-elements.d.ts","sourceRoot":"","sources":["../../../../src/modules/fund/clinical/four-elements.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,oBAAoB,EAAE,CAAC;CACtC;AAED,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,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