@morscherlab/mint-sdk 1.2.0-beta.1 → 1.2.0-beta.3

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 (1006) hide show
  1. package/README.md +7 -13
  2. package/dist/EmptyState-p90quq8Z.js +0 -2
  3. package/dist/{ExperimentPopover-tLwJ7XF4.js → ExperimentPopover-Bn6PIGHE.js} +5 -10
  4. package/dist/ExperimentPopover-C1e0cd94.js +3 -0
  5. package/dist/ExperimentSelectorModal-DCWTFyos.js +4 -0
  6. package/dist/{ExperimentSelectorModal-DyPAUCLw.js → ExperimentSelectorModal-DGhrJSSV.js} +6 -11
  7. package/dist/SettingsModal-Bpybht86.js +5 -0
  8. package/dist/{SettingsModal-BgKY93zh.js → SettingsModal-wF2btHu6.js} +7 -12
  9. package/dist/{analysisArtifactTypes-DQ0MjwHZ.js → analysisArtifactTypes-ejqR8MX3.js} +0 -2
  10. package/dist/components/JobsStatusTray.vue.d.ts +0 -2
  11. package/dist/components/SmartGroupFieldRecipe.vue.d.ts +2 -2
  12. package/dist/components/SmartGroupManual.vue.d.ts +2 -2
  13. package/dist/components/WellPlate.vue.d.ts +1 -1
  14. package/dist/components/index.d.ts +0 -9
  15. package/dist/components/index.js +6 -6
  16. package/dist/{components-DkHddRMl.js → components-DpyzaeIc.js} +1466 -3375
  17. package/dist/composables/index.d.ts +1 -8
  18. package/dist/composables/index.js +9 -9
  19. package/dist/composables/useAnalysisArtifacts.d.ts +0 -2
  20. package/dist/composables/useAuth.d.ts +0 -2
  21. package/dist/composables/useAutoGroup.d.ts +1 -30
  22. package/dist/composables/useGeneratedAnalysis.d.ts +0 -2
  23. package/dist/composables/useJobsStatusTray.d.ts +4 -17
  24. package/dist/composables/usePluginClient.d.ts +0 -2
  25. package/dist/{composables-C_i90sGS.js → composables-yz8bTkEV.js} +59 -629
  26. package/dist/{experiment-Cq145oEW.js → experiment-D08H_TIH.js} +1 -3
  27. package/dist/experiment-utils-CLnzPPq5.js +0 -2
  28. package/dist/index.js +33 -18
  29. package/dist/jobs.d.ts +1 -15
  30. package/dist/permissions.d.ts +0 -5
  31. package/dist/permissions.js +2 -4
  32. package/dist/stores/index.js +2 -2
  33. package/dist/styles.css +265 -2831
  34. package/dist/tailwind.preset.js +0 -2
  35. package/dist/templates/catalog.d.ts +4 -4
  36. package/dist/templates/index.js +2 -2
  37. package/dist/templates/presets.d.ts +2 -2
  38. package/dist/{templates-DsP51i-S.js → templates-Pbxjdqlh.js} +5 -22
  39. package/dist/types/auto-group.d.ts +0 -7
  40. package/dist/types/componentWorkflowTypes.d.ts +0 -22
  41. package/dist/types/components.d.ts +1 -1
  42. package/dist/types/generated-ui.d.ts +2 -11
  43. package/dist/types/index.d.ts +4 -4
  44. package/dist/types/index.js +1 -1
  45. package/dist/types/jobs.d.ts +3 -11
  46. package/dist/{useApi-J6zFkHmn.js → useApi-yE0re8k-.js} +0 -14
  47. package/dist/{useControlSchema-BDx2Olha.js → useControlSchema-Ds4VeFxt.js} +8 -96
  48. package/dist/{useDropdownState-DSb3BC3N.js → useDropdownState-WIGW6Rr-.js} +0 -2
  49. package/dist/{useExperimentSelector-CV4iNfMS.js → useExperimentSelector-DXqsZuSk.js} +1 -3
  50. package/dist/{useFormBuilder-BLxG3BOX.js → useFormBuilder-1so6QSQL.js} +1 -3
  51. package/dist/{useProtocolTemplates-CS_SQl6U.js → useProtocolTemplates-Cv0ca1AM.js} +32 -478
  52. package/package.json +2 -8
  53. package/dist/EmptyState-p90quq8Z.js.map +0 -1
  54. package/dist/ExperimentPopover-tLwJ7XF4.js.map +0 -1
  55. package/dist/ExperimentSelectorModal-DyPAUCLw.js.map +0 -1
  56. package/dist/SettingsModal-BgKY93zh.js.map +0 -1
  57. package/dist/__stories__/experiment-helpers.d.ts +0 -28
  58. package/dist/__tests__/components/ActionItem.test.d.ts +0 -1
  59. package/dist/__tests__/components/ActionMenu.test.d.ts +0 -1
  60. package/dist/__tests__/components/AppAvatarMenu.test.d.ts +0 -1
  61. package/dist/__tests__/components/AppLayout.test.d.ts +0 -1
  62. package/dist/__tests__/components/AppPluginSwitcher.test.d.ts +0 -1
  63. package/dist/__tests__/components/AppSidebar.test.d.ts +0 -1
  64. package/dist/__tests__/components/AppToastContainer.test.d.ts +0 -1
  65. package/dist/__tests__/components/AppTopBar.navigation.test.d.ts +0 -1
  66. package/dist/__tests__/components/AppTopBar.test.d.ts +0 -1
  67. package/dist/__tests__/components/AppTopBarPageSelector.test.d.ts +0 -1
  68. package/dist/__tests__/components/AppTopBarPillNav.test.d.ts +0 -1
  69. package/dist/__tests__/components/AppTopBarPresence.test.d.ts +0 -1
  70. package/dist/__tests__/components/ArtifactSaveDialog.test.d.ts +0 -1
  71. package/dist/__tests__/components/ArtifactSelectorModal.test.d.ts +0 -1
  72. package/dist/__tests__/components/AutoGroupModal.adapter.test.d.ts +0 -1
  73. package/dist/__tests__/components/BaseInput.test.d.ts +0 -1
  74. package/dist/__tests__/components/BaseModal.test.d.ts +0 -1
  75. package/dist/__tests__/components/BasePill.test.d.ts +0 -1
  76. package/dist/__tests__/components/BaseRadioGroup.test.d.ts +0 -1
  77. package/dist/__tests__/components/BaseSelect.test.d.ts +0 -1
  78. package/dist/__tests__/components/BaseTabs.test.d.ts +0 -1
  79. package/dist/__tests__/components/BaseToggle.test.d.ts +0 -1
  80. package/dist/__tests__/components/BatchProgressList.test.d.ts +0 -1
  81. package/dist/__tests__/components/BioTemplateExperimentWorkspaceView.test.d.ts +0 -1
  82. package/dist/__tests__/components/BioTemplatePackWorkspaceView.test.d.ts +0 -1
  83. package/dist/__tests__/components/BioTemplatePresetWorkspaceView.test.d.ts +0 -1
  84. package/dist/__tests__/components/BioTemplateRenderer.test.d.ts +0 -1
  85. package/dist/__tests__/components/Breadcrumb.test.d.ts +0 -1
  86. package/dist/__tests__/components/Calendar.test.d.ts +0 -1
  87. package/dist/__tests__/components/CalendarGridPanel.test.d.ts +0 -1
  88. package/dist/__tests__/components/CollapsibleCard.test.d.ts +0 -1
  89. package/dist/__tests__/components/ComponentBindingRenderer.test.d.ts +0 -1
  90. package/dist/__tests__/components/ConcentrationInput.test.d.ts +0 -1
  91. package/dist/__tests__/components/ControlWorkspaceView.test.d.ts +0 -1
  92. package/dist/__tests__/components/DataFrame.test.d.ts +0 -1
  93. package/dist/__tests__/components/DatePicker.test.d.ts +0 -1
  94. package/dist/__tests__/components/DateTimePicker.test.d.ts +0 -1
  95. package/dist/__tests__/components/DoseCalculatorVolumeField.test.d.ts +0 -1
  96. package/dist/__tests__/components/DoseDesignWorkspaceView.test.d.ts +0 -1
  97. package/dist/__tests__/components/DropdownButton.test.d.ts +0 -1
  98. package/dist/__tests__/components/EmptyState.test.d.ts +0 -1
  99. package/dist/__tests__/components/ExperimentPopover.test.d.ts +0 -1
  100. package/dist/__tests__/components/ExperimentSelectorModal.test.d.ts +0 -1
  101. package/dist/__tests__/components/FormBuilder.test.d.ts +0 -1
  102. package/dist/__tests__/components/GeneratedPathInput.test.d.ts +0 -1
  103. package/dist/__tests__/components/GeneratedPlotlyResult.test.d.ts +0 -1
  104. package/dist/__tests__/components/GeneratedPluginView.test.d.ts +0 -1
  105. package/dist/__tests__/components/GeneratedResultRenderer.test.d.ts +0 -1
  106. package/dist/__tests__/components/GroupAssigner.test.d.ts +0 -1
  107. package/dist/__tests__/components/InstrumentAlertLog.test.d.ts +0 -1
  108. package/dist/__tests__/components/JobsStatusTray.test.d.ts +0 -1
  109. package/dist/__tests__/components/LcmsSequenceTable.test.d.ts +0 -1
  110. package/dist/__tests__/components/MobileSupportGate.test.d.ts +0 -1
  111. package/dist/__tests__/components/MultiSelect.test.d.ts +0 -1
  112. package/dist/__tests__/components/PlateMapEditorToolbarInternal.test.d.ts +0 -1
  113. package/dist/__tests__/components/PluginIcon.test.d.ts +0 -1
  114. package/dist/__tests__/components/PluginWorkspaceView.controls.test.d.ts +0 -1
  115. package/dist/__tests__/components/PluginWorkspaceView.navigation.test.d.ts +0 -1
  116. package/dist/__tests__/components/PluginWorkspaceView.shell.test.d.ts +0 -1
  117. package/dist/__tests__/components/PluginWorkspaceView.test.d.ts +0 -1
  118. package/dist/__tests__/components/ProgressBar.test.d.ts +0 -1
  119. package/dist/__tests__/components/ProtocolStep.presentation.test.d.ts +0 -1
  120. package/dist/__tests__/components/ProtocolStepEditor.state.test.d.ts +0 -1
  121. package/dist/__tests__/components/ProtocolStepEditor.test.d.ts +0 -1
  122. package/dist/__tests__/components/ProtocolStepParameterField.test.d.ts +0 -1
  123. package/dist/__tests__/components/RackEditor.test.d.ts +0 -1
  124. package/dist/__tests__/components/ReagentList.presentation.test.d.ts +0 -1
  125. package/dist/__tests__/components/ReagentList.test.d.ts +0 -1
  126. package/dist/__tests__/components/RetiredStyles.test.d.ts +0 -1
  127. package/dist/__tests__/components/RuntimeUpdateNotice.test.d.ts +0 -1
  128. package/dist/__tests__/components/SampleHierarchyTree.test.d.ts +0 -1
  129. package/dist/__tests__/components/SampleSelector.colors.test.d.ts +0 -1
  130. package/dist/__tests__/components/SampleSelector.drag.test.d.ts +0 -1
  131. package/dist/__tests__/components/SampleSelector.groups.test.d.ts +0 -1
  132. package/dist/__tests__/components/SampleSelector.selection.test.d.ts +0 -1
  133. package/dist/__tests__/components/SampleSelector.test.d.ts +0 -1
  134. package/dist/__tests__/components/SampleSelectorSampleRow.test.d.ts +0 -1
  135. package/dist/__tests__/components/ScheduleCalendar.test.d.ts +0 -1
  136. package/dist/__tests__/components/SectionCard.test.d.ts +0 -1
  137. package/dist/__tests__/components/SegmentedControl.test.d.ts +0 -1
  138. package/dist/__tests__/components/SequenceProgressBar.test.d.ts +0 -1
  139. package/dist/__tests__/components/SettingsModal.schema.test.d.ts +0 -1
  140. package/dist/__tests__/components/SettingsModal.test.d.ts +0 -1
  141. package/dist/__tests__/components/SmartGroupFieldRecipe.groups.test.d.ts +0 -1
  142. package/dist/__tests__/components/SmartGroupManual.cohorts.test.d.ts +0 -1
  143. package/dist/__tests__/components/TagsInput.test.d.ts +0 -1
  144. package/dist/__tests__/components/ThemeToggle.test.d.ts +0 -1
  145. package/dist/__tests__/components/TimePicker.test.d.ts +0 -1
  146. package/dist/__tests__/components/WellPlate.colors.test.d.ts +0 -1
  147. package/dist/__tests__/components/WellPlate.conditions.test.d.ts +0 -1
  148. package/dist/__tests__/components/WellPlate.geometry.test.d.ts +0 -1
  149. package/dist/__tests__/components/WellPlate.interaction.test.d.ts +0 -1
  150. package/dist/__tests__/components/WellPlate.legend.test.d.ts +0 -1
  151. package/dist/__tests__/components/WellPlate.rendering.test.d.ts +0 -1
  152. package/dist/__tests__/components/WellPlate.sampleDrop.test.d.ts +0 -1
  153. package/dist/__tests__/composables/analysisArtifactTarget.test.d.ts +0 -1
  154. package/dist/__tests__/composables/autoGroup/classKey.test.d.ts +0 -1
  155. package/dist/__tests__/composables/autoGroup/classify.test.d.ts +0 -1
  156. package/dist/__tests__/composables/autoGroup/columns.test.d.ts +0 -1
  157. package/dist/__tests__/composables/autoGroup/compose.test.d.ts +0 -1
  158. package/dist/__tests__/composables/autoGroup/cooccurrence.test.d.ts +0 -1
  159. package/dist/__tests__/composables/autoGroup/fingerprint.test.d.ts +0 -1
  160. package/dist/__tests__/composables/autoGroup/groupByOrder.test.d.ts +0 -1
  161. package/dist/__tests__/composables/autoGroup/groupTree.test.d.ts +0 -1
  162. package/dist/__tests__/composables/autoGroup/integration.test.d.ts +0 -1
  163. package/dist/__tests__/composables/autoGroup/template.test.d.ts +0 -1
  164. package/dist/__tests__/composables/autoGroup/tokenLength.test.d.ts +0 -1
  165. package/dist/__tests__/composables/autoGroup/tokenize.test.d.ts +0 -1
  166. package/dist/__tests__/composables/experiment-utils.test.d.ts +0 -1
  167. package/dist/__tests__/composables/formBuilderRegistry.test.d.ts +0 -1
  168. package/dist/__tests__/composables/resolvePluginFrontendBase.test.d.ts +0 -1
  169. package/dist/__tests__/composables/useAnalysisArtifacts.test.d.ts +0 -1
  170. package/dist/__tests__/composables/useApi.test.d.ts +0 -1
  171. package/dist/__tests__/composables/useAppExperiment.test.d.ts +0 -1
  172. package/dist/__tests__/composables/useAuth.test.d.ts +0 -1
  173. package/dist/__tests__/composables/useAutoGroup.test.d.ts +0 -1
  174. package/dist/__tests__/composables/useAutoGroupInputSources.test.d.ts +0 -1
  175. package/dist/__tests__/composables/useBioTemplatePackWorkspace.test.d.ts +0 -1
  176. package/dist/__tests__/composables/useBioTemplatePresetWorkspace.test.d.ts +0 -1
  177. package/dist/__tests__/composables/useBioTemplateWorkspace.test.d.ts +0 -1
  178. package/dist/__tests__/composables/useCalendarGrid.test.d.ts +0 -1
  179. package/dist/__tests__/composables/useCommandHistory.test.d.ts +0 -1
  180. package/dist/__tests__/composables/useControlSchema.test.d.ts +0 -1
  181. package/dist/__tests__/composables/useDebouncedWatch.test.d.ts +0 -1
  182. package/dist/__tests__/composables/useDropdownState.test.d.ts +0 -1
  183. package/dist/__tests__/composables/useEventListener.test.d.ts +0 -1
  184. package/dist/__tests__/composables/useEventStream.test.d.ts +0 -1
  185. package/dist/__tests__/composables/useExpansionSet.test.d.ts +0 -1
  186. package/dist/__tests__/composables/useExperimentData.test.d.ts +0 -14
  187. package/dist/__tests__/composables/useExperimentSamples.test.d.ts +0 -1
  188. package/dist/__tests__/composables/useExperimentSave.test.d.ts +0 -1
  189. package/dist/__tests__/composables/useExperimentSelector.test.d.ts +0 -1
  190. package/dist/__tests__/composables/useFileImport.test.d.ts +0 -1
  191. package/dist/__tests__/composables/useForm.test.d.ts +0 -1
  192. package/dist/__tests__/composables/useFormBuilder.test.d.ts +0 -1
  193. package/dist/__tests__/composables/useGeneratedAnalysis.test.d.ts +0 -1
  194. package/dist/__tests__/composables/useGroupAssignment.test.d.ts +0 -1
  195. package/dist/__tests__/composables/useJobsStatusTray.test.d.ts +0 -1
  196. package/dist/__tests__/composables/useListSelection.test.d.ts +0 -1
  197. package/dist/__tests__/composables/useMobileSupportGate.test.d.ts +0 -1
  198. package/dist/__tests__/composables/useOptimisticMutation.test.d.ts +0 -1
  199. package/dist/__tests__/composables/usePlatformContext.test.d.ts +0 -1
  200. package/dist/__tests__/composables/usePluginClient.test.d.ts +0 -1
  201. package/dist/__tests__/composables/usePresenceHeartbeat.test.d.ts +0 -1
  202. package/dist/__tests__/composables/useProtocolTemplates.test.d.ts +0 -1
  203. package/dist/__tests__/composables/useRequestSyncState.test.d.ts +0 -1
  204. package/dist/__tests__/composables/useResourceCrud.test.d.ts +0 -1
  205. package/dist/__tests__/composables/useRuntimeAlignment.test.d.ts +0 -1
  206. package/dist/__tests__/composables/useSampleGroups.test.d.ts +0 -1
  207. package/dist/__tests__/composables/useSampleGroups.tree.test.d.ts +0 -1
  208. package/dist/__tests__/composables/useScheduleCalendarLayout.test.d.ts +0 -1
  209. package/dist/__tests__/composables/useSelectionLimit.test.d.ts +0 -1
  210. package/dist/__tests__/composables/useSortedItems.test.d.ts +0 -1
  211. package/dist/__tests__/composables/useTemplateCollection.test.d.ts +0 -1
  212. package/dist/__tests__/composables/useTextSearch.test.d.ts +0 -1
  213. package/dist/__tests__/composables/useTheme.test.d.ts +0 -1
  214. package/dist/__tests__/composables/useTimeUtils.test.d.ts +0 -1
  215. package/dist/__tests__/composables/useWellPainting.test.d.ts +0 -1
  216. package/dist/__tests__/composables/useWellPlateAdapter.test.d.ts +0 -1
  217. package/dist/__tests__/composables/useWellPlateValidation.test.d.ts +0 -1
  218. package/dist/__tests__/docs/extractDocsComponents.test.d.ts +0 -1
  219. package/dist/__tests__/docs/extractDocsExports.test.d.ts +0 -1
  220. package/dist/__tests__/docs/extractDocsParsing.test.d.ts +0 -1
  221. package/dist/__tests__/docs/extractDocsTemplates.test.d.ts +0 -1
  222. package/dist/__tests__/docs/extractDocsTheme.test.d.ts +0 -1
  223. package/dist/__tests__/docs/frontendDocsCatalog.test.d.ts +0 -1
  224. package/dist/__tests__/generatedUi.test.d.ts +0 -1
  225. package/dist/__tests__/stores/experiment.test.d.ts +0 -1
  226. package/dist/__tests__/stores/settings.test.d.ts +0 -1
  227. package/dist/__tests__/templates/templates.test.d.ts +0 -1
  228. package/dist/__tests__/types/GeneratedJsonSchema.test.d.ts +0 -1
  229. package/dist/__tests__/utils/color.test.d.ts +0 -1
  230. package/dist/__tests__/utils/instrument.test.d.ts +0 -1
  231. package/dist/__tests__/utils/jobs.test.d.ts +0 -1
  232. package/dist/__tests__/utils/lcms.test.d.ts +0 -1
  233. package/dist/__tests__/utils/permissions.test.d.ts +0 -1
  234. package/dist/__tests__/utils/rack.test.d.ts +0 -1
  235. package/dist/analysisArtifactTypes-DQ0MjwHZ.js.map +0 -1
  236. package/dist/chunk-BoAXSpZd.js +0 -33
  237. package/dist/components/AuditTrail.vue.d.ts +0 -38
  238. package/dist/components/ColorSlider.vue.d.ts +0 -34
  239. package/dist/components/DoseDesignWorkspaceView.vue.d.ts +0 -149
  240. package/dist/components/FitPanel.vue.d.ts +0 -46
  241. package/dist/components/GroupAssigner.vue.d.ts +0 -25
  242. package/dist/components/RackEditor.vue.d.ts +0 -78
  243. package/dist/components/ReagentEditor.vue.d.ts +0 -30
  244. package/dist/components/ResourceCard.vue.d.ts +0 -50
  245. package/dist/components/ScientificNumber.vue.d.ts +0 -14
  246. package/dist/components-DkHddRMl.js.map +0 -1
  247. package/dist/composables/autoGroupConstants.d.ts +0 -1
  248. package/dist/composables/autoGroupGrouping.d.ts +0 -3
  249. package/dist/composables/useAsync.d.ts +0 -128
  250. package/dist/composables/useAutoGroupInputSources.d.ts +0 -32
  251. package/dist/composables/useCommandHistory.d.ts +0 -29
  252. package/dist/composables/useGroupAssignment.d.ts +0 -31
  253. package/dist/composables/useRackEditor.d.ts +0 -31
  254. package/dist/composables/useResourceCrud.d.ts +0 -40
  255. package/dist/composables/useWellPainting.d.ts +0 -35
  256. package/dist/composables/useWellPlateAdapter.d.ts +0 -36
  257. package/dist/composables-C_i90sGS.js.map +0 -1
  258. package/dist/experiment-Cq145oEW.js.map +0 -1
  259. package/dist/experiment-utils-CLnzPPq5.js.map +0 -1
  260. package/dist/histoire.setup.d.ts +0 -1
  261. package/dist/index.js.map +0 -1
  262. package/dist/install.js +0 -28
  263. package/dist/install.js.map +0 -1
  264. package/dist/permissions.js.map +0 -1
  265. package/dist/plotly.min-c2Sez60c.js +0 -180634
  266. package/dist/plotly.min-c2Sez60c.js.map +0 -1
  267. package/dist/tailwind.preset.js.map +0 -1
  268. package/dist/templates-DsP51i-S.js.map +0 -1
  269. package/dist/useApi-J6zFkHmn.js.map +0 -1
  270. package/dist/useControlSchema-BDx2Olha.js.map +0 -1
  271. package/dist/useDropdownState-DSb3BC3N.js.map +0 -1
  272. package/dist/useExperimentSelector-CV4iNfMS.js.map +0 -1
  273. package/dist/useFormBuilder-BLxG3BOX.js.map +0 -1
  274. package/dist/useProtocolTemplates-CS_SQl6U.js.map +0 -1
  275. package/src/__stories__/experiment-helpers.ts +0 -86
  276. package/src/__tests__/components/ActionItem.test.ts +0 -99
  277. package/src/__tests__/components/ActionMenu.test.ts +0 -120
  278. package/src/__tests__/components/AppAvatarMenu.test.ts +0 -38
  279. package/src/__tests__/components/AppLayout.test.ts +0 -207
  280. package/src/__tests__/components/AppPluginSwitcher.test.ts +0 -44
  281. package/src/__tests__/components/AppSidebar.test.ts +0 -857
  282. package/src/__tests__/components/AppToastContainer.test.ts +0 -37
  283. package/src/__tests__/components/AppTopBar.navigation.test.ts +0 -68
  284. package/src/__tests__/components/AppTopBar.test.ts +0 -1256
  285. package/src/__tests__/components/AppTopBarPageSelector.test.ts +0 -156
  286. package/src/__tests__/components/AppTopBarPillNav.test.ts +0 -125
  287. package/src/__tests__/components/AppTopBarPresence.test.ts +0 -47
  288. package/src/__tests__/components/ArtifactSaveDialog.test.ts +0 -566
  289. package/src/__tests__/components/ArtifactSelectorModal.test.ts +0 -178
  290. package/src/__tests__/components/AutoGroupModal.adapter.test.ts +0 -204
  291. package/src/__tests__/components/BaseInput.test.ts +0 -99
  292. package/src/__tests__/components/BaseModal.test.ts +0 -133
  293. package/src/__tests__/components/BasePill.test.ts +0 -291
  294. package/src/__tests__/components/BaseRadioGroup.test.ts +0 -25
  295. package/src/__tests__/components/BaseSelect.test.ts +0 -73
  296. package/src/__tests__/components/BaseTabs.test.ts +0 -40
  297. package/src/__tests__/components/BaseToggle.test.ts +0 -40
  298. package/src/__tests__/components/BatchProgressList.test.ts +0 -52
  299. package/src/__tests__/components/BioTemplateExperimentWorkspaceView.test.ts +0 -159
  300. package/src/__tests__/components/BioTemplatePackWorkspaceView.test.ts +0 -192
  301. package/src/__tests__/components/BioTemplatePresetWorkspaceView.test.ts +0 -328
  302. package/src/__tests__/components/BioTemplateRenderer.test.ts +0 -96
  303. package/src/__tests__/components/Breadcrumb.test.ts +0 -23
  304. package/src/__tests__/components/Calendar.test.ts +0 -566
  305. package/src/__tests__/components/CalendarGridPanel.test.ts +0 -36
  306. package/src/__tests__/components/CollapsibleCard.test.ts +0 -571
  307. package/src/__tests__/components/ComponentBindingRenderer.test.ts +0 -278
  308. package/src/__tests__/components/ConcentrationInput.test.ts +0 -45
  309. package/src/__tests__/components/ControlWorkspaceView.test.ts +0 -1102
  310. package/src/__tests__/components/DataFrame.test.ts +0 -915
  311. package/src/__tests__/components/DatePicker.test.ts +0 -45
  312. package/src/__tests__/components/DateTimePicker.test.ts +0 -48
  313. package/src/__tests__/components/DoseCalculatorVolumeField.test.ts +0 -53
  314. package/src/__tests__/components/DoseDesignWorkspaceView.test.ts +0 -185
  315. package/src/__tests__/components/DropdownButton.test.ts +0 -494
  316. package/src/__tests__/components/EmptyState.test.ts +0 -23
  317. package/src/__tests__/components/ExperimentPopover.test.ts +0 -143
  318. package/src/__tests__/components/ExperimentSelectorModal.test.ts +0 -143
  319. package/src/__tests__/components/FormBuilder.test.ts +0 -353
  320. package/src/__tests__/components/GeneratedPathInput.test.ts +0 -132
  321. package/src/__tests__/components/GeneratedPlotlyResult.test.ts +0 -117
  322. package/src/__tests__/components/GeneratedPluginView.test.ts +0 -235
  323. package/src/__tests__/components/GeneratedResultRenderer.test.ts +0 -93
  324. package/src/__tests__/components/GroupAssigner.test.ts +0 -48
  325. package/src/__tests__/components/InstrumentAlertLog.test.ts +0 -59
  326. package/src/__tests__/components/JobsStatusTray.test.ts +0 -165
  327. package/src/__tests__/components/LcmsSequenceTable.test.ts +0 -57
  328. package/src/__tests__/components/MobileSupportGate.test.ts +0 -120
  329. package/src/__tests__/components/MultiSelect.test.ts +0 -48
  330. package/src/__tests__/components/PlateMapEditorToolbarInternal.test.ts +0 -54
  331. package/src/__tests__/components/PluginIcon.test.ts +0 -215
  332. package/src/__tests__/components/PluginWorkspaceView.controls.test.ts +0 -156
  333. package/src/__tests__/components/PluginWorkspaceView.navigation.test.ts +0 -102
  334. package/src/__tests__/components/PluginWorkspaceView.shell.test.ts +0 -43
  335. package/src/__tests__/components/PluginWorkspaceView.test.ts +0 -719
  336. package/src/__tests__/components/ProgressBar.test.ts +0 -18
  337. package/src/__tests__/components/ProtocolStep.presentation.test.ts +0 -31
  338. package/src/__tests__/components/ProtocolStepEditor.state.test.ts +0 -165
  339. package/src/__tests__/components/ProtocolStepEditor.test.ts +0 -33
  340. package/src/__tests__/components/ProtocolStepParameterField.test.ts +0 -44
  341. package/src/__tests__/components/RackEditor.test.ts +0 -125
  342. package/src/__tests__/components/ReagentList.presentation.test.ts +0 -68
  343. package/src/__tests__/components/ReagentList.test.ts +0 -82
  344. package/src/__tests__/components/RetiredStyles.test.ts +0 -82
  345. package/src/__tests__/components/RuntimeUpdateNotice.test.ts +0 -14
  346. package/src/__tests__/components/SampleHierarchyTree.test.ts +0 -53
  347. package/src/__tests__/components/SampleSelector.colors.test.ts +0 -49
  348. package/src/__tests__/components/SampleSelector.drag.test.ts +0 -126
  349. package/src/__tests__/components/SampleSelector.groups.test.ts +0 -94
  350. package/src/__tests__/components/SampleSelector.selection.test.ts +0 -56
  351. package/src/__tests__/components/SampleSelector.test.ts +0 -466
  352. package/src/__tests__/components/SampleSelectorSampleRow.test.ts +0 -40
  353. package/src/__tests__/components/ScheduleCalendar.test.ts +0 -44
  354. package/src/__tests__/components/SectionCard.test.ts +0 -181
  355. package/src/__tests__/components/SegmentedControl.test.ts +0 -69
  356. package/src/__tests__/components/SequenceProgressBar.test.ts +0 -39
  357. package/src/__tests__/components/SettingsModal.schema.test.ts +0 -97
  358. package/src/__tests__/components/SettingsModal.test.ts +0 -407
  359. package/src/__tests__/components/SmartGroupFieldRecipe.groups.test.ts +0 -101
  360. package/src/__tests__/components/SmartGroupManual.cohorts.test.ts +0 -97
  361. package/src/__tests__/components/TagsInput.test.ts +0 -75
  362. package/src/__tests__/components/ThemeToggle.test.ts +0 -47
  363. package/src/__tests__/components/TimePicker.test.ts +0 -38
  364. package/src/__tests__/components/WellPlate.colors.test.ts +0 -28
  365. package/src/__tests__/components/WellPlate.conditions.test.ts +0 -68
  366. package/src/__tests__/components/WellPlate.geometry.test.ts +0 -54
  367. package/src/__tests__/components/WellPlate.interaction.test.ts +0 -171
  368. package/src/__tests__/components/WellPlate.legend.test.ts +0 -13
  369. package/src/__tests__/components/WellPlate.rendering.test.ts +0 -122
  370. package/src/__tests__/components/WellPlate.sampleDrop.test.ts +0 -70
  371. package/src/__tests__/composables/analysisArtifactTarget.test.ts +0 -77
  372. package/src/__tests__/composables/autoGroup/classKey.test.ts +0 -25
  373. package/src/__tests__/composables/autoGroup/classify.test.ts +0 -107
  374. package/src/__tests__/composables/autoGroup/columns.test.ts +0 -135
  375. package/src/__tests__/composables/autoGroup/compose.test.ts +0 -226
  376. package/src/__tests__/composables/autoGroup/cooccurrence.test.ts +0 -91
  377. package/src/__tests__/composables/autoGroup/fingerprint.test.ts +0 -122
  378. package/src/__tests__/composables/autoGroup/groupByOrder.test.ts +0 -278
  379. package/src/__tests__/composables/autoGroup/groupTree.test.ts +0 -99
  380. package/src/__tests__/composables/autoGroup/integration.test.ts +0 -75
  381. package/src/__tests__/composables/autoGroup/template.test.ts +0 -70
  382. package/src/__tests__/composables/autoGroup/tokenLength.test.ts +0 -85
  383. package/src/__tests__/composables/autoGroup/tokenize.test.ts +0 -33
  384. package/src/__tests__/composables/experiment-utils.test.ts +0 -63
  385. package/src/__tests__/composables/formBuilderRegistry.test.ts +0 -191
  386. package/src/__tests__/composables/resolvePluginFrontendBase.test.ts +0 -65
  387. package/src/__tests__/composables/useAnalysisArtifacts.test.ts +0 -740
  388. package/src/__tests__/composables/useApi.test.ts +0 -157
  389. package/src/__tests__/composables/useAppExperiment.test.ts +0 -899
  390. package/src/__tests__/composables/useAuth.test.ts +0 -231
  391. package/src/__tests__/composables/useAutoGroup.test.ts +0 -524
  392. package/src/__tests__/composables/useAutoGroupInputSources.test.ts +0 -127
  393. package/src/__tests__/composables/useBioTemplatePackWorkspace.test.ts +0 -125
  394. package/src/__tests__/composables/useBioTemplatePresetWorkspace.test.ts +0 -199
  395. package/src/__tests__/composables/useBioTemplateWorkspace.test.ts +0 -104
  396. package/src/__tests__/composables/useCalendarGrid.test.ts +0 -38
  397. package/src/__tests__/composables/useCommandHistory.test.ts +0 -43
  398. package/src/__tests__/composables/useControlSchema.test.ts +0 -1060
  399. package/src/__tests__/composables/useDebouncedWatch.test.ts +0 -93
  400. package/src/__tests__/composables/useDropdownState.test.ts +0 -95
  401. package/src/__tests__/composables/useEventListener.test.ts +0 -116
  402. package/src/__tests__/composables/useEventStream.test.ts +0 -140
  403. package/src/__tests__/composables/useExpansionSet.test.ts +0 -62
  404. package/src/__tests__/composables/useExperimentData.test.ts +0 -154
  405. package/src/__tests__/composables/useExperimentSamples.test.ts +0 -91
  406. package/src/__tests__/composables/useExperimentSave.test.ts +0 -542
  407. package/src/__tests__/composables/useExperimentSelector.test.ts +0 -338
  408. package/src/__tests__/composables/useFileImport.test.ts +0 -44
  409. package/src/__tests__/composables/useForm.test.ts +0 -263
  410. package/src/__tests__/composables/useFormBuilder.test.ts +0 -994
  411. package/src/__tests__/composables/useGeneratedAnalysis.test.ts +0 -1903
  412. package/src/__tests__/composables/useGroupAssignment.test.ts +0 -73
  413. package/src/__tests__/composables/useJobsStatusTray.test.ts +0 -283
  414. package/src/__tests__/composables/useListSelection.test.ts +0 -66
  415. package/src/__tests__/composables/useMobileSupportGate.test.ts +0 -74
  416. package/src/__tests__/composables/useOptimisticMutation.test.ts +0 -40
  417. package/src/__tests__/composables/usePlatformContext.test.ts +0 -148
  418. package/src/__tests__/composables/usePluginClient.test.ts +0 -1772
  419. package/src/__tests__/composables/usePresenceHeartbeat.test.ts +0 -164
  420. package/src/__tests__/composables/useProtocolTemplates.test.ts +0 -64
  421. package/src/__tests__/composables/useRequestSyncState.test.ts +0 -92
  422. package/src/__tests__/composables/useResourceCrud.test.ts +0 -56
  423. package/src/__tests__/composables/useRuntimeAlignment.test.ts +0 -145
  424. package/src/__tests__/composables/useSampleGroups.test.ts +0 -66
  425. package/src/__tests__/composables/useSampleGroups.tree.test.ts +0 -145
  426. package/src/__tests__/composables/useScheduleCalendarLayout.test.ts +0 -89
  427. package/src/__tests__/composables/useSelectionLimit.test.ts +0 -41
  428. package/src/__tests__/composables/useSortedItems.test.ts +0 -87
  429. package/src/__tests__/composables/useTemplateCollection.test.ts +0 -147
  430. package/src/__tests__/composables/useTextSearch.test.ts +0 -55
  431. package/src/__tests__/composables/useTheme.test.ts +0 -91
  432. package/src/__tests__/composables/useTimeUtils.test.ts +0 -35
  433. package/src/__tests__/composables/useWellPainting.test.ts +0 -52
  434. package/src/__tests__/composables/useWellPlateAdapter.test.ts +0 -50
  435. package/src/__tests__/composables/useWellPlateValidation.test.ts +0 -42
  436. package/src/__tests__/docs/extractDocsComponents.test.ts +0 -156
  437. package/src/__tests__/docs/extractDocsExports.test.ts +0 -92
  438. package/src/__tests__/docs/extractDocsParsing.test.ts +0 -91
  439. package/src/__tests__/docs/extractDocsTemplates.test.ts +0 -53
  440. package/src/__tests__/docs/extractDocsTheme.test.ts +0 -89
  441. package/src/__tests__/docs/frontendDocsCatalog.test.ts +0 -425
  442. package/src/__tests__/fixtures/auto-group/mixed-lc-ms-batch.txt +0 -187
  443. package/src/__tests__/fixtures/templates/dose-response.json +0 -81
  444. package/src/__tests__/fixtures/templates/plate-map.json +0 -54
  445. package/src/__tests__/fixtures/templates/qpcr-plate.json +0 -96
  446. package/src/__tests__/fixtures/templates/sample-sheet.json +0 -71
  447. package/src/__tests__/generatedUi.test.ts +0 -119
  448. package/src/__tests__/stores/experiment.test.ts +0 -300
  449. package/src/__tests__/stores/settings.test.ts +0 -78
  450. package/src/__tests__/templates/templates.test.ts +0 -1185
  451. package/src/__tests__/types/GeneratedJsonSchema.test.ts +0 -62
  452. package/src/__tests__/utils/color.test.ts +0 -96
  453. package/src/__tests__/utils/instrument.test.ts +0 -47
  454. package/src/__tests__/utils/jobs.test.ts +0 -95
  455. package/src/__tests__/utils/lcms.test.ts +0 -73
  456. package/src/__tests__/utils/permissions.test.ts +0 -62
  457. package/src/__tests__/utils/rack.test.ts +0 -120
  458. package/src/components/ActionMenu.story.vue +0 -26
  459. package/src/components/ActionMenu.vue +0 -209
  460. package/src/components/AlertBox.story.vue +0 -204
  461. package/src/components/AlertBox.vue +0 -88
  462. package/src/components/AppAvatarMenu.story.vue +0 -155
  463. package/src/components/AppAvatarMenu.vue +0 -133
  464. package/src/components/AppContainer.story.vue +0 -104
  465. package/src/components/AppContainer.vue +0 -34
  466. package/src/components/AppLayout.story.vue +0 -331
  467. package/src/components/AppLayout.vue +0 -156
  468. package/src/components/AppPluginSwitcher.vue +0 -137
  469. package/src/components/AppSidebar.story.vue +0 -584
  470. package/src/components/AppSidebar.vue +0 -471
  471. package/src/components/AppToastContainer.story.vue +0 -157
  472. package/src/components/AppToastContainer.vue +0 -62
  473. package/src/components/AppTopBar.navigation.ts +0 -60
  474. package/src/components/AppTopBar.story.vue +0 -280
  475. package/src/components/AppTopBar.vue +0 -474
  476. package/src/components/ArtifactSaveDialog.story.vue +0 -319
  477. package/src/components/ArtifactSaveDialog.vue +0 -434
  478. package/src/components/ArtifactSelectorModal.story.vue +0 -295
  479. package/src/components/ArtifactSelectorModal.vue +0 -333
  480. package/src/components/AuditTrail.story.vue +0 -163
  481. package/src/components/AuditTrail.vue +0 -151
  482. package/src/components/AutoGroupModal.adapter.ts +0 -203
  483. package/src/components/AutoGroupModal.story.vue +0 -458
  484. package/src/components/AutoGroupModal.vue +0 -294
  485. package/src/components/Avatar.story.vue +0 -115
  486. package/src/components/Avatar.vue +0 -79
  487. package/src/components/BaseButton.story.vue +0 -96
  488. package/src/components/BaseButton.vue +0 -75
  489. package/src/components/BaseCheckbox.story.vue +0 -100
  490. package/src/components/BaseCheckbox.vue +0 -131
  491. package/src/components/BaseInput.story.vue +0 -98
  492. package/src/components/BaseInput.vue +0 -76
  493. package/src/components/BaseModal.story.vue +0 -335
  494. package/src/components/BaseModal.vue +0 -328
  495. package/src/components/BasePill.story.vue +0 -142
  496. package/src/components/BasePill.vue +0 -89
  497. package/src/components/BaseRadioGroup.story.vue +0 -145
  498. package/src/components/BaseRadioGroup.vue +0 -128
  499. package/src/components/BaseSelect.story.vue +0 -120
  500. package/src/components/BaseSelect.vue +0 -89
  501. package/src/components/BaseSlider.story.vue +0 -122
  502. package/src/components/BaseSlider.vue +0 -126
  503. package/src/components/BaseTabs.story.vue +0 -127
  504. package/src/components/BaseTabs.vue +0 -82
  505. package/src/components/BaseTextarea.story.vue +0 -91
  506. package/src/components/BaseTextarea.vue +0 -62
  507. package/src/components/BaseToggle.story.vue +0 -108
  508. package/src/components/BaseToggle.vue +0 -143
  509. package/src/components/BatchProgressList.story.vue +0 -92
  510. package/src/components/BatchProgressList.vue +0 -181
  511. package/src/components/BioTemplateExperimentWorkspaceView.story.vue +0 -123
  512. package/src/components/BioTemplateExperimentWorkspaceView.vue +0 -350
  513. package/src/components/BioTemplatePackWorkspaceView.story.vue +0 -107
  514. package/src/components/BioTemplatePackWorkspaceView.vue +0 -184
  515. package/src/components/BioTemplatePresetWorkspaceView.story.vue +0 -163
  516. package/src/components/BioTemplatePresetWorkspaceView.vue +0 -408
  517. package/src/components/BioTemplateRenderer.story.vue +0 -57
  518. package/src/components/BioTemplateRenderer.vue +0 -64
  519. package/src/components/Breadcrumb.story.vue +0 -106
  520. package/src/components/Breadcrumb.vue +0 -81
  521. package/src/components/Calendar.story.vue +0 -106
  522. package/src/components/Calendar.vue +0 -367
  523. package/src/components/ChartContainer.story.vue +0 -113
  524. package/src/components/ChartContainer.vue +0 -64
  525. package/src/components/ChemicalFormula.story.vue +0 -102
  526. package/src/components/ChemicalFormula.vue +0 -39
  527. package/src/components/CollapsibleCard.story.vue +0 -135
  528. package/src/components/CollapsibleCard.vue +0 -245
  529. package/src/components/ColorSlider.story.vue +0 -120
  530. package/src/components/ColorSlider.vue +0 -164
  531. package/src/components/ComponentBindingRenderer.story.vue +0 -87
  532. package/src/components/ComponentBindingRenderer.vue +0 -324
  533. package/src/components/ConcentrationInput.story.vue +0 -77
  534. package/src/components/ConcentrationInput.vue +0 -149
  535. package/src/components/ConfirmDialog.story.vue +0 -248
  536. package/src/components/ConfirmDialog.vue +0 -100
  537. package/src/components/ControlWorkspaceView.story.vue +0 -347
  538. package/src/components/ControlWorkspaceView.vue +0 -381
  539. package/src/components/DataFrame.story.vue +0 -148
  540. package/src/components/DataFrame.vue +0 -520
  541. package/src/components/DatePicker.story.vue +0 -119
  542. package/src/components/DatePicker.vue +0 -197
  543. package/src/components/DateTimePicker.story.vue +0 -112
  544. package/src/components/DateTimePicker.vue +0 -271
  545. package/src/components/Divider.story.vue +0 -80
  546. package/src/components/Divider.vue +0 -49
  547. package/src/components/DoseCalculator.story.vue +0 -68
  548. package/src/components/DoseCalculator.vue +0 -416
  549. package/src/components/DoseCalculatorVolumeField.vue +0 -61
  550. package/src/components/DoseDesignWorkspaceView.story.vue +0 -77
  551. package/src/components/DoseDesignWorkspaceView.vue +0 -262
  552. package/src/components/DropdownButton.story.vue +0 -102
  553. package/src/components/DropdownButton.vue +0 -163
  554. package/src/components/EmptyState.story.vue +0 -135
  555. package/src/components/EmptyState.vue +0 -71
  556. package/src/components/ExperimentCodeBadge.story.vue +0 -77
  557. package/src/components/ExperimentCodeBadge.vue +0 -64
  558. package/src/components/ExperimentDataViewer.story.vue +0 -174
  559. package/src/components/ExperimentDataViewer.vue +0 -293
  560. package/src/components/ExperimentPopover.story.vue +0 -442
  561. package/src/components/ExperimentPopover.vue +0 -312
  562. package/src/components/ExperimentSelectorModal.story.vue +0 -381
  563. package/src/components/ExperimentSelectorModal.vue +0 -432
  564. package/src/components/ExperimentTimeline.story.vue +0 -161
  565. package/src/components/ExperimentTimeline.vue +0 -357
  566. package/src/components/FileUploader.story.vue +0 -107
  567. package/src/components/FileUploader.vue +0 -424
  568. package/src/components/FitPanel.story.vue +0 -125
  569. package/src/components/FitPanel.vue +0 -120
  570. package/src/components/FormActions.vue +0 -92
  571. package/src/components/FormBuilder.story.vue +0 -203
  572. package/src/components/FormBuilder.vue +0 -311
  573. package/src/components/FormField.story.vue +0 -132
  574. package/src/components/FormField.vue +0 -59
  575. package/src/components/FormulaInput.story.vue +0 -96
  576. package/src/components/FormulaInput.vue +0 -125
  577. package/src/components/GeneratedPathInput.vue +0 -218
  578. package/src/components/GeneratedPlotlyResult.vue +0 -87
  579. package/src/components/GeneratedPluginView.vue +0 -289
  580. package/src/components/GeneratedResultRenderer.vue +0 -147
  581. package/src/components/GroupAssigner.story.vue +0 -83
  582. package/src/components/GroupAssigner.vue +0 -257
  583. package/src/components/IconButton.story.vue +0 -140
  584. package/src/components/IconButton.vue +0 -73
  585. package/src/components/InstrumentAlertLog.vue +0 -191
  586. package/src/components/InstrumentStateBadge.vue +0 -50
  587. package/src/components/InstrumentStatusCard.vue +0 -188
  588. package/src/components/JobsStatusTray.story.vue +0 -126
  589. package/src/components/JobsStatusTray.vue +0 -392
  590. package/src/components/LcmsSequenceTable.vue +0 -191
  591. package/src/components/LoadingSpinner.story.vue +0 -70
  592. package/src/components/LoadingSpinner.vue +0 -50
  593. package/src/components/MobileSupportGate.story.vue +0 -52
  594. package/src/components/MobileSupportGate.vue +0 -115
  595. package/src/components/MoleculeInput.story.vue +0 -66
  596. package/src/components/MoleculeInput.vue +0 -426
  597. package/src/components/MultiSelect.story.vue +0 -132
  598. package/src/components/MultiSelect.vue +0 -123
  599. package/src/components/NumberInput.story.vue +0 -122
  600. package/src/components/NumberInput.vue +0 -162
  601. package/src/components/PlateMapEditor.story.vue +0 -92
  602. package/src/components/PlateMapEditor.vue +0 -434
  603. package/src/components/PluginIcon.story.vue +0 -103
  604. package/src/components/PluginIcon.vue +0 -158
  605. package/src/components/PluginWorkspaceView.controls.ts +0 -182
  606. package/src/components/PluginWorkspaceView.navigation.ts +0 -106
  607. package/src/components/PluginWorkspaceView.props.ts +0 -169
  608. package/src/components/PluginWorkspaceView.shell.ts +0 -67
  609. package/src/components/PluginWorkspaceView.story.vue +0 -341
  610. package/src/components/PluginWorkspaceView.vue +0 -395
  611. package/src/components/ProgressBar.story.vue +0 -148
  612. package/src/components/ProgressBar.vue +0 -117
  613. package/src/components/ProtocolStep.presentation.ts +0 -31
  614. package/src/components/ProtocolStepEditor.state.ts +0 -104
  615. package/src/components/ProtocolStepEditor.story.vue +0 -69
  616. package/src/components/ProtocolStepEditor.vue +0 -382
  617. package/src/components/ProtocolStepParameterField.vue +0 -134
  618. package/src/components/RackEditor.story.vue +0 -100
  619. package/src/components/RackEditor.vue +0 -442
  620. package/src/components/ReagentEditor.story.vue +0 -153
  621. package/src/components/ReagentEditor.vue +0 -418
  622. package/src/components/ReagentList.presentation.ts +0 -105
  623. package/src/components/ReagentList.story.vue +0 -137
  624. package/src/components/ReagentList.vue +0 -392
  625. package/src/components/ResourceCard.story.vue +0 -150
  626. package/src/components/ResourceCard.vue +0 -161
  627. package/src/components/RuntimeUpdateNotice.vue +0 -51
  628. package/src/components/SampleHierarchyTree.story.vue +0 -161
  629. package/src/components/SampleHierarchyTree.vue +0 -246
  630. package/src/components/SampleLegend.story.vue +0 -91
  631. package/src/components/SampleLegend.vue +0 -119
  632. package/src/components/SampleSelector.colors.ts +0 -48
  633. package/src/components/SampleSelector.drag.ts +0 -164
  634. package/src/components/SampleSelector.groups.ts +0 -109
  635. package/src/components/SampleSelector.selection.ts +0 -64
  636. package/src/components/SampleSelector.story.vue +0 -192
  637. package/src/components/SampleSelector.tree.ts +0 -48
  638. package/src/components/SampleSelector.vue +0 -451
  639. package/src/components/SampleSelectorGroupNode.vue +0 -197
  640. package/src/components/SampleSelectorSampleRow.vue +0 -68
  641. package/src/components/ScheduleCalendar.story.vue +0 -195
  642. package/src/components/ScheduleCalendar.vue +0 -414
  643. package/src/components/ScientificNumber.story.vue +0 -127
  644. package/src/components/ScientificNumber.vue +0 -197
  645. package/src/components/SectionCard.story.vue +0 -163
  646. package/src/components/SectionCard.vue +0 -98
  647. package/src/components/SegmentedControl.story.vue +0 -149
  648. package/src/components/SegmentedControl.vue +0 -94
  649. package/src/components/SequenceInput.story.vue +0 -119
  650. package/src/components/SequenceInput.vue +0 -209
  651. package/src/components/SequenceProgressBar.vue +0 -71
  652. package/src/components/SettingsModal.schema.ts +0 -74
  653. package/src/components/SettingsModal.story.vue +0 -524
  654. package/src/components/SettingsModal.vue +0 -399
  655. package/src/components/Skeleton.story.vue +0 -141
  656. package/src/components/Skeleton.vue +0 -74
  657. package/src/components/SmartGroup.types.ts +0 -98
  658. package/src/components/SmartGroupFieldRecipe.groups.ts +0 -109
  659. package/src/components/SmartGroupFieldRecipe.story.vue +0 -58
  660. package/src/components/SmartGroupFieldRecipe.vue +0 -499
  661. package/src/components/SmartGroupManual.cohorts.ts +0 -112
  662. package/src/components/SmartGroupManual.story.vue +0 -55
  663. package/src/components/SmartGroupManual.vue +0 -398
  664. package/src/components/SmartGroupModal.story.vue +0 -61
  665. package/src/components/SmartGroupModal.vue +0 -61
  666. package/src/components/StatusIndicator.story.vue +0 -99
  667. package/src/components/StatusIndicator.vue +0 -40
  668. package/src/components/StepWizard.story.vue +0 -155
  669. package/src/components/StepWizard.vue +0 -223
  670. package/src/components/TagsInput.story.vue +0 -155
  671. package/src/components/TagsInput.vue +0 -280
  672. package/src/components/ThemeToggle.story.vue +0 -36
  673. package/src/components/ThemeToggle.vue +0 -56
  674. package/src/components/TimePicker.story.vue +0 -96
  675. package/src/components/TimePicker.vue +0 -251
  676. package/src/components/TimeRangeInput.story.vue +0 -104
  677. package/src/components/TimeRangeInput.vue +0 -122
  678. package/src/components/Tooltip.story.vue +0 -138
  679. package/src/components/Tooltip.vue +0 -114
  680. package/src/components/UnitInput.story.vue +0 -194
  681. package/src/components/UnitInput.vue +0 -217
  682. package/src/components/WellPlate.colors.ts +0 -56
  683. package/src/components/WellPlate.conditions.ts +0 -100
  684. package/src/components/WellPlate.geometry.ts +0 -91
  685. package/src/components/WellPlate.interaction.ts +0 -272
  686. package/src/components/WellPlate.legend.ts +0 -8
  687. package/src/components/WellPlate.rendering.ts +0 -105
  688. package/src/components/WellPlate.sampleDrop.ts +0 -73
  689. package/src/components/WellPlate.story.vue +0 -282
  690. package/src/components/WellPlate.vue +0 -497
  691. package/src/components/index.ts +0 -139
  692. package/src/components/internal/ActionItemInternal.vue +0 -82
  693. package/src/components/internal/AppTopBarPageSelectorInternal.vue +0 -127
  694. package/src/components/internal/AppTopBarPillNavInternal.vue +0 -194
  695. package/src/components/internal/CalendarGridPanelInternal.vue +0 -120
  696. package/src/components/internal/FormFieldRendererInternal.vue +0 -68
  697. package/src/components/internal/FormSectionRenderer.vue +0 -78
  698. package/src/components/internal/PlateMapEditorToolbarInternal.vue +0 -128
  699. package/src/components/internal/WellEditPopupInternal.vue +0 -230
  700. package/src/composables/analysisArtifactTarget.ts +0 -53
  701. package/src/composables/autoGroup/classKey.ts +0 -8
  702. package/src/composables/autoGroup/classify.ts +0 -205
  703. package/src/composables/autoGroup/colors.ts +0 -6
  704. package/src/composables/autoGroup/columns.ts +0 -226
  705. package/src/composables/autoGroup/compose.ts +0 -244
  706. package/src/composables/autoGroup/cooccurrence.ts +0 -46
  707. package/src/composables/autoGroup/csv-shim.ts +0 -44
  708. package/src/composables/autoGroup/fingerprint.ts +0 -63
  709. package/src/composables/autoGroup/index.ts +0 -22
  710. package/src/composables/autoGroup/replicatePreGroup.ts +0 -124
  711. package/src/composables/autoGroup/template.ts +0 -126
  712. package/src/composables/autoGroup/tokenLength.ts +0 -53
  713. package/src/composables/autoGroup/tokenize.ts +0 -41
  714. package/src/composables/autoGroup/vocab.json +0 -66
  715. package/src/composables/autoGroupConstants.ts +0 -4
  716. package/src/composables/autoGroupGrouping.ts +0 -148
  717. package/src/composables/controlComponentBindings.ts +0 -80
  718. package/src/composables/controlSchemaAdapters.ts +0 -199
  719. package/src/composables/controlSchemaDoseDesign.ts +0 -222
  720. package/src/composables/controlSchemaFormFields.ts +0 -64
  721. package/src/composables/controlSchemaLayout.ts +0 -59
  722. package/src/composables/controlSchemaModel.ts +0 -172
  723. package/src/composables/controlSchemaNormalize.ts +0 -101
  724. package/src/composables/controlSchemaTypes.ts +0 -372
  725. package/src/composables/controlSchemaUtils.ts +0 -36
  726. package/src/composables/controlWorkspaceOptions.ts +0 -21
  727. package/src/composables/experiment-utils.ts +0 -105
  728. package/src/composables/experimentDesignData.ts +0 -182
  729. package/src/composables/formBuilderRegistry.ts +0 -81
  730. package/src/composables/formBuilderSchema.ts +0 -153
  731. package/src/composables/index.ts +0 -523
  732. package/src/composables/platformContextHelpers.ts +0 -81
  733. package/src/composables/pluginEndpointBuilder.ts +0 -267
  734. package/src/composables/pluginFrontendBase.ts +0 -22
  735. package/src/composables/protocolTemplateCatalog.ts +0 -325
  736. package/src/composables/useAnalysisArtifacts.ts +0 -361
  737. package/src/composables/useApi.ts +0 -319
  738. package/src/composables/useAppExperiment.ts +0 -228
  739. package/src/composables/useAsync.ts +0 -323
  740. package/src/composables/useAuth.ts +0 -455
  741. package/src/composables/useAutoGroup.ts +0 -682
  742. package/src/composables/useAutoGroupInputSources.ts +0 -147
  743. package/src/composables/useBioTemplateComponents.ts +0 -105
  744. package/src/composables/useBioTemplateControls.ts +0 -41
  745. package/src/composables/useBioTemplatePackWorkspace.ts +0 -193
  746. package/src/composables/useBioTemplatePresetWorkspace.ts +0 -326
  747. package/src/composables/useBioTemplateWorkspace.ts +0 -141
  748. package/src/composables/useCalendarGrid.ts +0 -140
  749. package/src/composables/useChemicalFormula.ts +0 -275
  750. package/src/composables/useCommandHistory.ts +0 -113
  751. package/src/composables/useConcentrationUnits.ts +0 -246
  752. package/src/composables/useControlSchema.ts +0 -135
  753. package/src/composables/useControlWorkspace.ts +0 -209
  754. package/src/composables/useDebouncedWatch.ts +0 -119
  755. package/src/composables/useDoseCalculator.ts +0 -370
  756. package/src/composables/useDropdownState.ts +0 -83
  757. package/src/composables/useEventListener.ts +0 -111
  758. package/src/composables/useEventStream.ts +0 -314
  759. package/src/composables/useExpansionSet.ts +0 -117
  760. package/src/composables/useExperimentData.ts +0 -136
  761. package/src/composables/useExperimentSamples.ts +0 -142
  762. package/src/composables/useExperimentSave.ts +0 -344
  763. package/src/composables/useExperimentSelector.ts +0 -408
  764. package/src/composables/useFileImport.ts +0 -231
  765. package/src/composables/useForm.ts +0 -279
  766. package/src/composables/useFormBuilder.ts +0 -292
  767. package/src/composables/useFormValidation.ts +0 -154
  768. package/src/composables/useGeneratedAnalysis.ts +0 -1214
  769. package/src/composables/useGroupAssignment.ts +0 -148
  770. package/src/composables/useJobsStatusTray.ts +0 -326
  771. package/src/composables/useListSelection.ts +0 -158
  772. package/src/composables/useMobileSupportGate.ts +0 -80
  773. package/src/composables/useOptimisticMutation.ts +0 -107
  774. package/src/composables/usePasskey.ts +0 -216
  775. package/src/composables/usePlatformContext.ts +0 -299
  776. package/src/composables/usePluginClient.ts +0 -963
  777. package/src/composables/usePresenceHeartbeat.ts +0 -201
  778. package/src/composables/useProtocolTemplates.ts +0 -212
  779. package/src/composables/useRackEditor.ts +0 -223
  780. package/src/composables/useReagentSeries.ts +0 -91
  781. package/src/composables/useRequestSyncState.ts +0 -126
  782. package/src/composables/useResourceCrud.ts +0 -245
  783. package/src/composables/useRuntimeAlignment.ts +0 -184
  784. package/src/composables/useSampleGroups.ts +0 -211
  785. package/src/composables/useScheduleCalendarLayout.ts +0 -287
  786. package/src/composables/useScheduleDrag.ts +0 -245
  787. package/src/composables/useSelectionLimit.ts +0 -57
  788. package/src/composables/useSequenceUtils.ts +0 -105
  789. package/src/composables/useSortedItems.ts +0 -118
  790. package/src/composables/useTemplateCollection.ts +0 -229
  791. package/src/composables/useTextSearch.ts +0 -60
  792. package/src/composables/useTheme.ts +0 -32
  793. package/src/composables/useTimeUtils.ts +0 -155
  794. package/src/composables/useToast.ts +0 -40
  795. package/src/composables/useWellPainting.ts +0 -187
  796. package/src/composables/useWellPlateAdapter.ts +0 -147
  797. package/src/composables/useWellPlateEditor.ts +0 -425
  798. package/src/composables/useWellPlateValidation.ts +0 -85
  799. package/src/generated/schema.ts +0 -130
  800. package/src/generated-ui/main.ts +0 -21
  801. package/src/histoire.setup.ts +0 -17
  802. package/src/index.ts +0 -67
  803. package/src/install.ts +0 -39
  804. package/src/instrument.ts +0 -90
  805. package/src/jobs.ts +0 -80
  806. package/src/lcms.ts +0 -108
  807. package/src/permissions.ts +0 -144
  808. package/src/plotly-dist.d.ts +0 -3
  809. package/src/stores/auth.ts +0 -205
  810. package/src/stores/experiment.ts +0 -120
  811. package/src/stores/index.ts +0 -3
  812. package/src/stores/settings.ts +0 -232
  813. package/src/styles/components/action-menu.css +0 -59
  814. package/src/styles/components/alert-box.css +0 -150
  815. package/src/styles/components/app-avatar-menu.css +0 -156
  816. package/src/styles/components/app-container.css +0 -33
  817. package/src/styles/components/app-layout.css +0 -180
  818. package/src/styles/components/app-page-selector.css +0 -212
  819. package/src/styles/components/app-pill-nav.css +0 -133
  820. package/src/styles/components/app-plugin-switcher.css +0 -196
  821. package/src/styles/components/app-sidebar.css +0 -392
  822. package/src/styles/components/app-top-bar.css +0 -249
  823. package/src/styles/components/artifact-save-dialog.css +0 -17
  824. package/src/styles/components/artifact-selector-modal.css +0 -216
  825. package/src/styles/components/audit-trail.css +0 -143
  826. package/src/styles/components/avatar.css +0 -73
  827. package/src/styles/components/batch-progress-list.css +0 -196
  828. package/src/styles/components/breadcrumb.css +0 -64
  829. package/src/styles/components/button.css +0 -192
  830. package/src/styles/components/calendar.css +0 -192
  831. package/src/styles/components/chart-container.css +0 -69
  832. package/src/styles/components/checkbox.css +0 -210
  833. package/src/styles/components/chemical-formula.css +0 -46
  834. package/src/styles/components/collapsible-card.css +0 -393
  835. package/src/styles/components/color-slider.css +0 -110
  836. package/src/styles/components/concentration-input.css +0 -17
  837. package/src/styles/components/confirm-dialog.css +0 -59
  838. package/src/styles/components/dataframe.css +0 -554
  839. package/src/styles/components/date-picker.css +0 -243
  840. package/src/styles/components/datetime-picker.css +0 -229
  841. package/src/styles/components/divider.css +0 -63
  842. package/src/styles/components/dose-calculator.css +0 -297
  843. package/src/styles/components/dropdown-button.css +0 -280
  844. package/src/styles/components/empty-state.css +0 -135
  845. package/src/styles/components/experiment-code-badge.css +0 -33
  846. package/src/styles/components/experiment-data-viewer.css +0 -138
  847. package/src/styles/components/experiment-popover.css +0 -563
  848. package/src/styles/components/experiment-selector-modal.css +0 -341
  849. package/src/styles/components/experiment-timeline.css +0 -529
  850. package/src/styles/components/file-uploader.css +0 -310
  851. package/src/styles/components/fit-panel.css +0 -67
  852. package/src/styles/components/form-builder.css +0 -69
  853. package/src/styles/components/form-field.css +0 -48
  854. package/src/styles/components/formula-input.css +0 -103
  855. package/src/styles/components/group-assigner.css +0 -200
  856. package/src/styles/components/icon-button.css +0 -196
  857. package/src/styles/components/input.css +0 -65
  858. package/src/styles/components/instrument-monitor.css +0 -478
  859. package/src/styles/components/jobs-status-tray.css +0 -420
  860. package/src/styles/components/lcms-sequence-table.css +0 -189
  861. package/src/styles/components/loading-spinner.css +0 -67
  862. package/src/styles/components/mobile-support-gate.css +0 -119
  863. package/src/styles/components/modal.css +0 -646
  864. package/src/styles/components/molecule-input.css +0 -186
  865. package/src/styles/components/multi-select.css +0 -131
  866. package/src/styles/components/number-input.css +0 -199
  867. package/src/styles/components/pill.css +0 -188
  868. package/src/styles/components/plate-map-editor.css +0 -464
  869. package/src/styles/components/plugin-icon.css +0 -46
  870. package/src/styles/components/progress-bar.css +0 -133
  871. package/src/styles/components/protocol-step-editor.css +0 -443
  872. package/src/styles/components/rack-editor.css +0 -265
  873. package/src/styles/components/radio-group.css +0 -240
  874. package/src/styles/components/reagent-editor.css +0 -505
  875. package/src/styles/components/reagent-list.css +0 -407
  876. package/src/styles/components/resource-card.css +0 -360
  877. package/src/styles/components/sample-hierarchy-tree.css +0 -310
  878. package/src/styles/components/sample-legend.css +0 -201
  879. package/src/styles/components/sample-selector.css +0 -682
  880. package/src/styles/components/schedule-calendar.css +0 -472
  881. package/src/styles/components/scientific-number.css +0 -63
  882. package/src/styles/components/section-card.css +0 -161
  883. package/src/styles/components/segmented-control.css +0 -194
  884. package/src/styles/components/select.css +0 -77
  885. package/src/styles/components/sequence-input.css +0 -184
  886. package/src/styles/components/sequence-progress-bar.css +0 -63
  887. package/src/styles/components/settings-modal.css +0 -76
  888. package/src/styles/components/skeleton.css +0 -49
  889. package/src/styles/components/slider.css +0 -74
  890. package/src/styles/components/smart-group.css +0 -734
  891. package/src/styles/components/status-indicator.css +0 -66
  892. package/src/styles/components/step-wizard.css +0 -192
  893. package/src/styles/components/tabs.css +0 -103
  894. package/src/styles/components/tags-input.css +0 -195
  895. package/src/styles/components/textarea.css +0 -81
  896. package/src/styles/components/theme-toggle.css +0 -6
  897. package/src/styles/components/time-picker.css +0 -171
  898. package/src/styles/components/time-range-input.css +0 -42
  899. package/src/styles/components/toast.css +0 -91
  900. package/src/styles/components/toggle.css +0 -226
  901. package/src/styles/components/tooltip.css +0 -91
  902. package/src/styles/components/unit-input.css +0 -123
  903. package/src/styles/components/well-edit-popup.css +0 -258
  904. package/src/styles/components/well-plate.css +0 -286
  905. package/src/styles/index.css +0 -93
  906. package/src/styles/variables.css +0 -1150
  907. package/src/tailwind.preset.ts +0 -66
  908. package/src/templates/adapters.ts +0 -137
  909. package/src/templates/assayLookups.ts +0 -33
  910. package/src/templates/assayMatrixAdapters.ts +0 -78
  911. package/src/templates/assayMatrixBuilder.ts +0 -59
  912. package/src/templates/assayNormalizers.ts +0 -34
  913. package/src/templates/builderDefaults.ts +0 -11
  914. package/src/templates/builderIdUtils.ts +0 -20
  915. package/src/templates/builderPresetControls.ts +0 -165
  916. package/src/templates/builderReadUtils.ts +0 -57
  917. package/src/templates/builders.ts +0 -122
  918. package/src/templates/calibrationCurveAdapters.ts +0 -59
  919. package/src/templates/calibrationCurveBuilder.ts +0 -99
  920. package/src/templates/calibrationNormalizers.ts +0 -60
  921. package/src/templates/catalog.ts +0 -245
  922. package/src/templates/componentBindingCatalog.ts +0 -90
  923. package/src/templates/componentBindingHelpers.ts +0 -93
  924. package/src/templates/componentBindings.ts +0 -253
  925. package/src/templates/componentDoseResponseProps.ts +0 -42
  926. package/src/templates/componentGenericProps.ts +0 -77
  927. package/src/templates/componentPlateHelpers.ts +0 -29
  928. package/src/templates/componentPlateMapProps.ts +0 -32
  929. package/src/templates/componentPropsFactory.ts +0 -21
  930. package/src/templates/componentQpcrPlateProps.ts +0 -28
  931. package/src/templates/componentTargetResolvers.ts +0 -69
  932. package/src/templates/componentTemplateProps.ts +0 -78
  933. package/src/templates/controlSchemaClone.ts +0 -32
  934. package/src/templates/controlSchemaConstants.ts +0 -11
  935. package/src/templates/controlSchemaMerge.ts +0 -40
  936. package/src/templates/controlSchemaTargets.ts +0 -87
  937. package/src/templates/controlSchemaTypes.ts +0 -20
  938. package/src/templates/controlSchemas.ts +0 -104
  939. package/src/templates/defaultBioTemplateBuilder.ts +0 -124
  940. package/src/templates/doseResponseAdapters.ts +0 -45
  941. package/src/templates/doseResponseBuilder.ts +0 -44
  942. package/src/templates/elisaAssayCollectionBuilder.ts +0 -62
  943. package/src/templates/flowCytometryAssayCollectionBuilder.ts +0 -41
  944. package/src/templates/flowCytometryPanelBuilder.ts +0 -53
  945. package/src/templates/flowNormalizers.ts +0 -58
  946. package/src/templates/flowPanelAdapters.ts +0 -58
  947. package/src/templates/index.ts +0 -326
  948. package/src/templates/instrumentRunAdapterHelpers.ts +0 -94
  949. package/src/templates/instrumentRunAdapters.ts +0 -163
  950. package/src/templates/instrumentRunBuilder.ts +0 -97
  951. package/src/templates/lcmsBatchCollectionBuilder.ts +0 -38
  952. package/src/templates/lookup.ts +0 -18
  953. package/src/templates/packs.ts +0 -162
  954. package/src/templates/plateGeometry.ts +0 -62
  955. package/src/templates/plateMapAdapters.ts +0 -36
  956. package/src/templates/plateMapBuilder.ts +0 -43
  957. package/src/templates/presetControlSchemas.ts +0 -258
  958. package/src/templates/presets.ts +0 -179
  959. package/src/templates/protocolAdapters.ts +0 -69
  960. package/src/templates/protocolNormalizers.ts +0 -37
  961. package/src/templates/protocolStepsBuilder.ts +0 -36
  962. package/src/templates/qpcrAdapters.ts +0 -104
  963. package/src/templates/qpcrExpressionCollectionBuilder.ts +0 -33
  964. package/src/templates/qpcrPlateBuilder.ts +0 -96
  965. package/src/templates/reagentAdapters.ts +0 -77
  966. package/src/templates/reagentListBuilder.ts +0 -30
  967. package/src/templates/runNormalizers.ts +0 -63
  968. package/src/templates/sampleNormalizers.ts +0 -58
  969. package/src/templates/samplePrepAdapters.ts +0 -63
  970. package/src/templates/samplePrepBuilder.ts +0 -51
  971. package/src/templates/sampleSheetAdapters.ts +0 -75
  972. package/src/templates/sampleSheetBuilder.ts +0 -23
  973. package/src/templates/targetedMetabolomicsCollectionBuilder.ts +0 -79
  974. package/src/templates/targetedMetabolomicsHelpers.ts +0 -102
  975. package/src/templates/templateAdapterTypes.ts +0 -58
  976. package/src/templates/templateControlSchemas.ts +0 -320
  977. package/src/templates/templateCreateOptions.ts +0 -208
  978. package/src/templates/templateEnvelopes.ts +0 -137
  979. package/src/templates/templatePackCollectionBuilder.ts +0 -23
  980. package/src/templates/templatePresetCollectionBuilder.ts +0 -139
  981. package/src/templates/templateQpcrTypes.ts +0 -48
  982. package/src/templates/templateValidators.ts +0 -414
  983. package/src/templates/timeCourseAdapters.ts +0 -73
  984. package/src/templates/timeCourseBuilder.ts +0 -64
  985. package/src/templates/types.ts +0 -493
  986. package/src/templates/wellPlateScreenCollectionBuilder.ts +0 -36
  987. package/src/templates/westernBlotAssayCollectionBuilder.ts +0 -68
  988. package/src/types/analysisArtifactTypes.ts +0 -176
  989. package/src/types/auth.ts +0 -58
  990. package/src/types/auto-group.ts +0 -157
  991. package/src/types/componentLabTypes.ts +0 -235
  992. package/src/types/componentWorkflowTypes.ts +0 -190
  993. package/src/types/components.ts +0 -527
  994. package/src/types/form-builder.ts +0 -207
  995. package/src/types/generated-ui.ts +0 -189
  996. package/src/types/index.ts +0 -299
  997. package/src/types/instrument.ts +0 -62
  998. package/src/types/jobs.ts +0 -70
  999. package/src/types/platform.ts +0 -132
  1000. package/src/utils/color.ts +0 -96
  1001. package/src/utils/formModelSync.ts +0 -52
  1002. package/src/utils/items.ts +0 -28
  1003. package/src/utils/options.ts +0 -23
  1004. package/src/utils/pluginIcon.ts +0 -190
  1005. package/src/utils/rack.ts +0 -209
  1006. package/src/utils/sampleGroupPath.ts +0 -19
@@ -1 +0,0 @@
1
- {"version":3,"file":"templates-DsP51i-S.js","names":[],"sources":["../src/templates/builderReadUtils.ts","../src/templates/templateEnvelopes.ts","../src/templates/lookup.ts","../src/templates/catalog.ts","../src/templates/packs.ts","../src/templates/presets.ts","../src/templates/componentTargetResolvers.ts","../src/templates/componentBindingHelpers.ts","../src/templates/componentBindingCatalog.ts","../src/templates/plateGeometry.ts","../src/templates/templateValidators.ts","../src/templates/assayMatrixAdapters.ts","../src/templates/calibrationCurveAdapters.ts","../src/templates/flowPanelAdapters.ts","../src/templates/instrumentRunAdapterHelpers.ts","../src/templates/instrumentRunAdapters.ts","../src/templates/protocolAdapters.ts","../src/templates/qpcrAdapters.ts","../src/templates/reagentAdapters.ts","../src/templates/samplePrepAdapters.ts","../src/templates/sampleSheetAdapters.ts","../src/templates/timeCourseAdapters.ts","../src/templates/plateMapAdapters.ts","../src/templates/doseResponseAdapters.ts","../src/templates/adapters.ts","../src/templates/componentPlateHelpers.ts","../src/templates/componentPropsFactory.ts","../src/templates/componentDoseResponseProps.ts","../src/templates/componentGenericProps.ts","../src/templates/componentPlateMapProps.ts","../src/templates/componentQpcrPlateProps.ts","../src/templates/componentTemplateProps.ts","../src/templates/componentBindings.ts","../src/templates/builderPresetControls.ts","../src/templates/builderDefaults.ts","../src/templates/builderIdUtils.ts","../src/templates/plateMapBuilder.ts","../src/templates/sampleNormalizers.ts","../src/templates/sampleSheetBuilder.ts","../src/templates/samplePrepBuilder.ts","../src/templates/calibrationNormalizers.ts","../src/templates/doseResponseBuilder.ts","../src/templates/calibrationCurveBuilder.ts","../src/templates/protocolNormalizers.ts","../src/templates/timeCourseBuilder.ts","../src/templates/protocolStepsBuilder.ts","../src/templates/assayLookups.ts","../src/templates/assayNormalizers.ts","../src/templates/assayMatrixBuilder.ts","../src/templates/reagentListBuilder.ts","../src/templates/flowNormalizers.ts","../src/templates/flowCytometryPanelBuilder.ts","../src/templates/runNormalizers.ts","../src/templates/instrumentRunBuilder.ts","../src/templates/qpcrPlateBuilder.ts","../src/templates/qpcrExpressionCollectionBuilder.ts","../src/templates/lcmsBatchCollectionBuilder.ts","../src/templates/targetedMetabolomicsHelpers.ts","../src/templates/targetedMetabolomicsCollectionBuilder.ts","../src/templates/elisaAssayCollectionBuilder.ts","../src/templates/flowCytometryAssayCollectionBuilder.ts","../src/templates/westernBlotAssayCollectionBuilder.ts","../src/templates/defaultBioTemplateBuilder.ts","../src/templates/templatePackCollectionBuilder.ts","../src/templates/wellPlateScreenCollectionBuilder.ts","../src/templates/templatePresetCollectionBuilder.ts","../src/templates/controlSchemaClone.ts","../src/templates/controlSchemaMerge.ts","../src/templates/controlSchemaTargets.ts","../src/templates/controlSchemaConstants.ts","../src/templates/templateControlSchemas.ts","../src/templates/presetControlSchemas.ts","../src/templates/controlSchemas.ts"],"sourcesContent":["export function isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value)\n}\n\nexport function readStringList(value: unknown, fallback: string[]): string[] {\n if (Array.isArray(value)) {\n const items = value.map(item => String(item).trim()).filter(Boolean)\n return items.length ? items : fallback\n }\n if (typeof value === 'string') {\n const items = value.split(',').map(item => item.trim()).filter(Boolean)\n return items.length ? items : fallback\n }\n return fallback\n}\n\nexport function readNumberList(value: unknown, fallback: number[]): number[] {\n const rawItems = Array.isArray(value)\n ? value\n : typeof value === 'string'\n ? value.split(',')\n : []\n const items = rawItems\n .map(item => Number(String(item).trim()))\n .filter(item => Number.isFinite(item))\n return items.length ? items : fallback\n}\n\nexport function readString(value: unknown, fallback: string): string {\n return typeof value === 'string' && value.trim() ? value.trim() : fallback\n}\n\nexport function readOptionalString(value: unknown): string | undefined {\n return typeof value === 'string' && value.trim() ? value.trim() : undefined\n}\n\nexport function readInteger(value: unknown, fallback: number): number {\n const parsed = typeof value === 'number'\n ? value\n : typeof value === 'string'\n ? Number(value)\n : Number.NaN\n return Number.isFinite(parsed) ? Math.max(1, Math.round(parsed)) : fallback\n}\n\nexport function readNumber(value: unknown, fallback: number): number {\n const parsed = typeof value === 'number'\n ? value\n : typeof value === 'string'\n ? Number(value)\n : Number.NaN\n return Number.isFinite(parsed) ? parsed : fallback\n}\n\nexport function readBoolean(value: unknown, fallback: boolean): boolean {\n return typeof value === 'boolean' ? value : fallback\n}\n","import type {\n BioTemplateEnvelope,\n TemplateCollection,\n TemplateCollectionEnvelope,\n TemplateId,\n} from './types'\nimport { isRecord } from './builderReadUtils'\n\nexport const TEMPLATE_COLLECTION_KEY = 'templates'\n\nexport function createTemplateEnvelope<TData>(\n templateId: TemplateId,\n data: TData,\n metadata: Record<string, unknown> = {},\n templateVersion = '1.0'\n): BioTemplateEnvelope<TData> {\n return {\n template_id: templateId,\n template_version: templateVersion,\n kind: 'experiment-design',\n data,\n metadata,\n }\n}\n\nexport function createTemplateCollection(\n templates: Array<BioTemplateEnvelope<unknown>>,\n metadata?: Record<string, unknown>\n): TemplateCollectionEnvelope {\n const collection: TemplateCollection = {}\n for (const template of templates) {\n assertGenericTemplateEnvelope(template)\n const templateId = template.template_id\n if (collection[templateId]) {\n throw new Error(`Duplicate template_id '${templateId}' in template collection.`)\n }\n collection[templateId] = template\n }\n\n return metadata === undefined\n ? { [TEMPLATE_COLLECTION_KEY]: collection }\n : { [TEMPLATE_COLLECTION_KEY]: collection, metadata }\n}\n\nexport function extractTemplateCollection(value: unknown): TemplateCollection {\n if (isEnvelope<unknown>(value)) {\n assertGenericTemplateEnvelope(value)\n return { [value.template_id]: value }\n }\n if (!isRecord(value)) {\n throw new Error('Template collection payload must be an object.')\n }\n\n const rawCollection = value[TEMPLATE_COLLECTION_KEY]\n if (rawCollection === undefined) {\n return {}\n }\n if (!isRecord(rawCollection)) {\n throw new Error('Template collection must be an object.')\n }\n\n const collection: TemplateCollection = {}\n for (const [templateId, template] of Object.entries(rawCollection)) {\n assertGenericTemplateEnvelope(template)\n if (template.template_id !== templateId) {\n throw new Error(\n `Template collection key '${templateId}' does not match envelope template_id '${template.template_id}'.`\n )\n }\n collection[templateId] = template\n }\n return collection\n}\n\nexport function ensureTemplateFromCollection<TTemplate extends BioTemplateEnvelope<unknown>>(\n value: unknown,\n templateId: TemplateId | string\n): TTemplate {\n const collection = extractTemplateCollection(value)\n const template = collection[templateId]\n if (!template) {\n throw new Error(`Template '${templateId}' was not found in template collection.`)\n }\n assertTemplateEnvelope(template, templateId)\n return template as TTemplate\n}\n\nexport function assertTemplateEnvelope<TData>(\n value: unknown,\n templateId: TemplateId | string\n): asserts value is BioTemplateEnvelope<TData> {\n assertGenericTemplateEnvelope(value)\n if (value.template_id !== templateId) {\n throw new Error(`Expected template_id '${templateId}', got '${String(value.template_id)}'.`)\n }\n}\n\nexport function ensureTemplateEnvelope<TTemplate extends BioTemplateEnvelope<unknown>>(\n value: unknown,\n templateId: TemplateId | string\n): TTemplate {\n assertTemplateEnvelope(value, templateId)\n return value as TTemplate\n}\n\nexport function getTemplateData<TData>(\n template: BioTemplateEnvelope<TData> | TData,\n templateId?: TemplateId | string\n): TData {\n if (isEnvelope<TData>(template)) {\n if (templateId) assertTemplateEnvelope<TData>(template, templateId)\n return template.data\n }\n return template\n}\n\nfunction assertGenericTemplateEnvelope(value: unknown): asserts value is BioTemplateEnvelope<unknown> {\n if (!isRecord(value)) {\n throw new Error('Template envelope must be an object.')\n }\n if (typeof value.template_id !== 'string' || value.template_id.length === 0) {\n throw new Error('Template envelope requires a template_id string.')\n }\n if (typeof value.template_version !== 'string' || value.template_version.length === 0) {\n throw new Error('Template envelope requires a template_version string.')\n }\n if (!isRecord(value.data)) {\n throw new Error('Template envelope data must be an object.')\n }\n if ('metadata' in value && !isRecord(value.metadata)) {\n throw new Error('Template envelope metadata must be an object.')\n }\n}\n\nfunction isEnvelope<TData>(value: unknown): value is BioTemplateEnvelope<TData> {\n return isRecord(value) && 'template_id' in value && 'data' in value\n}\n","/** Normalize human-facing template lookup terms so spaces, hyphens, and underscores behave the same. */\nexport function normalizeTemplateLookupKey(value: string): string {\n return value.trim().toLowerCase().replace(/[\\s_-]+/g, '-')\n}\n\nexport function templateIdentifierMatches(query: string, identifiers: readonly string[]): boolean {\n const normalizedQuery = normalizeTemplateLookupKey(query)\n return identifiers.some(value => normalizeTemplateLookupKey(value) === normalizedQuery)\n}\n\nexport function templateSearchMatches(query: string, values: readonly string[]): boolean {\n const lowerQuery = query.trim().toLowerCase()\n const normalizedQuery = normalizeTemplateLookupKey(query)\n return values.some(value =>\n value.toLowerCase().includes(lowerQuery)\n || normalizeTemplateLookupKey(value).includes(normalizedQuery),\n )\n}\n","import type { TemplateId } from './types'\n\nimport { templateIdentifierMatches, templateSearchMatches } from './lookup'\n\nexport interface BioTemplateCatalogEntry {\n name: TemplateId\n template_id: TemplateId\n template_version: string\n label: string\n category: 'bio-data'\n purpose: string\n aliases: readonly string[]\n python_import: string\n python_example: string\n frontend_import: string\n frontend_adapters: readonly string[]\n components: readonly string[]\n add_command: string\n}\n\nexport const bioTemplateCatalog = [\n {\n name: 'plate-map',\n template_id: 'plate-map',\n template_version: '1.0',\n label: 'Plate map',\n category: 'bio-data',\n purpose: 'Plate layout, wells, sample assignments, and sample legend data.',\n aliases: ['wellplate', 'well-plate', 'plate layout', 'plate-map editor'],\n python_import: 'from mint_sdk.templates import PlateMapTemplate, save_template',\n python_example: 'PlateMapTemplate.create_96_well(name=\"Plate 1\", samples=[\"Control\", \"Treatment\"])',\n frontend_import: \"import { toPlateMapEditorState, toWellPlateWells } from '@morscherlab/mint-sdk/templates'\",\n frontend_adapters: ['toPlateMapEditorState', 'toWellPlateWells'],\n components: ['PlateMapEditor', 'WellPlate', 'SampleLegend'],\n add_command: 'mint add data-template plate-map --page',\n },\n {\n name: 'sample-sheet',\n template_id: 'sample-sheet',\n template_version: '1.0',\n label: 'Sample sheet',\n category: 'bio-data',\n purpose: 'Tabular sample metadata, display columns, and group definitions.',\n aliases: ['sample metadata', 'sample table', 'metadata sheet', 'csv samples'],\n python_import: 'from mint_sdk.templates import SampleSheetTemplate, save_template',\n python_example: 'SampleSheetTemplate.from_rows([{\"sample_id\": \"S001\", \"name\": \"Control 1\", \"group\": \"Control\"}])',\n frontend_import: \"import { toTemplateDataFrame, toSampleOptions } from '@morscherlab/mint-sdk/templates'\",\n frontend_adapters: ['toTemplateDataFrame', 'toSampleDataFrame', 'toSampleRows', 'toSampleColumns', 'toSampleOptions'],\n components: ['DataFrame', 'SampleSelector', 'AutoGroupModal', 'GroupAssigner'],\n add_command: 'mint add data-template sample-sheet --page',\n },\n {\n name: 'sample-prep',\n template_id: 'sample-prep',\n template_version: '1.0',\n label: 'Sample prep',\n category: 'bio-data',\n purpose: 'Extraction, dilution, normalization, transfer, source/destination, volume, reagent, and status steps.',\n aliases: ['sample preparation', 'extraction', 'dilution', 'normalization', 'prep steps'],\n python_import: 'from mint_sdk.templates import SamplePrepTemplate, save_template',\n python_example: 'SamplePrepTemplate.create([\"S001\", \"S002\"], prep_type=\"extraction\", output_volume=50)',\n frontend_import: \"import { toSamplePrepDataFrame, toTemplateDataFrame } from '@morscherlab/mint-sdk/templates'\",\n frontend_adapters: ['toTemplateDataFrame', 'toSamplePrepDataFrame', 'toSamplePrepRows', 'toSamplePrepColumns'],\n components: ['DataFrame', 'ProtocolStepEditor', 'SampleSelector', 'WellPlate'],\n add_command: 'mint add data-template sample-prep --page',\n },\n {\n name: 'dose-response',\n template_id: 'dose-response',\n template_version: '1.0',\n label: 'Dose response',\n category: 'bio-data',\n purpose: 'Compounds, concentration series, controls, replicates, and optional plate layout.',\n aliases: [\n 'drug response',\n 'concentration series',\n 'dose curve',\n 'dose design',\n 'dose planner',\n 'dose calculator',\n 'drp',\n ],\n python_import: 'from mint_sdk.templates import ControlDefinition, DoseResponseTemplate, save_template',\n python_example: 'DoseResponseTemplate.create({\"Compound A\": [10, 1, 0.1]}, unit=\"uM\", replicates=3)',\n frontend_import: \"import { toDoseConditions, toDoseLayoutState } from '@morscherlab/mint-sdk/templates'\",\n frontend_adapters: ['toDoseConditions', 'toDoseLayoutState'],\n components: ['DoseCalculator', 'ReagentEditor', 'WellPlate'],\n add_command: 'mint add data-template dose-response --page',\n },\n {\n name: 'calibration-curve',\n template_id: 'calibration-curve',\n template_version: '1.0',\n label: 'Calibration curve',\n category: 'bio-data',\n purpose: 'Standard curves, blank/QC points, fitted model settings, and acceptance thresholds.',\n aliases: ['standard curve', 'calibration', 'quantitation', 'qc acceptance', 'calibrator'],\n python_import: 'from mint_sdk.templates import CalibrationCurveTemplate, save_template',\n python_example: 'CalibrationCurveTemplate.create([0.1, 1, 10, 100], analyte=\"Glucose\", unit=\"uM\")',\n frontend_import: \"import { toCalibrationCurveDataFrame, toTemplateDataFrame } from '@morscherlab/mint-sdk/templates'\",\n frontend_adapters: ['toTemplateDataFrame', 'toCalibrationCurveDataFrame', 'toCalibrationCurveRows', 'toCalibrationCurveColumns'],\n components: ['DataFrame', 'FitPanel', 'ChartContainer'],\n add_command: 'mint add data-template calibration-curve --page',\n },\n {\n name: 'time-course',\n template_id: 'time-course',\n template_version: '1.0',\n label: 'Time course',\n category: 'bio-data',\n purpose: 'Longitudinal time points, conditions, replicates, and scheduled samples.',\n aliases: ['longitudinal', 'time series', 'sampling schedule', 'kinetics'],\n python_import: 'from mint_sdk.templates import TimeCourseTemplate, save_template',\n python_example: 'TimeCourseTemplate.create([0, 6, 24], unit=\"hour\", conditions=[\"Control\", \"Treatment\"], replicates=3)',\n frontend_import: \"import { toTemplateDataFrame, toTimeCourseSteps } from '@morscherlab/mint-sdk/templates'\",\n frontend_adapters: ['toTemplateDataFrame', 'toTimeCourseDataFrame', 'toTimeCourseRows', 'toTimeCourseSteps', 'toTimeCourseColumns'],\n components: ['ExperimentTimeline', 'DataFrame', 'ScheduleCalendar'],\n add_command: 'mint add data-template time-course --page',\n },\n {\n name: 'protocol-steps',\n template_id: 'protocol-steps',\n template_version: '1.0',\n label: 'Protocol steps',\n category: 'bio-data',\n purpose: 'Ordered experiment protocol steps, durations, statuses, and run-sheet parameters.',\n aliases: ['protocol', 'run sheet', 'workflow', 'method steps', 'sop'],\n python_import: 'from mint_sdk.templates import ProtocolStepsTemplate, save_template',\n python_example: 'ProtocolStepsTemplate.create([\"Seed cells\", \"Add treatment\", \"Measure viability\"])',\n frontend_import: \"import { toProtocolSteps, toTemplateDataFrame } from '@morscherlab/mint-sdk/templates'\",\n frontend_adapters: ['toTemplateDataFrame', 'toProtocolSteps', 'toProtocolDataFrame'],\n components: ['ExperimentTimeline', 'ProtocolStepEditor', 'DataFrame'],\n add_command: 'mint add data-template protocol-steps --page',\n },\n {\n name: 'assay-matrix',\n template_id: 'assay-matrix',\n template_version: '1.0',\n label: 'Assay matrix',\n category: 'bio-data',\n purpose: 'Sample-by-feature measurement matrices for omics, plate-reader, and marker assays.',\n aliases: ['omics matrix', 'measurement matrix', 'readout matrix', 'feature table'],\n python_import: 'from mint_sdk.templates import AssayMatrixTemplate, save_template',\n python_example: 'AssayMatrixTemplate.create(samples=[\"S001\", \"S002\"], features=[\"Lactate\", \"Glucose\"])',\n frontend_import: \"import { toAssayMatrixSampleOptions, toTemplateDataFrame } from '@morscherlab/mint-sdk/templates'\",\n frontend_adapters: ['toTemplateDataFrame', 'toAssayMatrixDataFrame', 'toAssayMatrixRows', 'toAssayMatrixColumns', 'toAssayMatrixSampleOptions'],\n components: ['DataFrame', 'ChartContainer', 'SampleSelector'],\n add_command: 'mint add data-template assay-matrix --page',\n },\n {\n name: 'reagent-list',\n template_id: 'reagent-list',\n template_version: '1.0',\n label: 'Reagent list',\n category: 'bio-data',\n purpose: 'Experiment reagents, catalog numbers, lots, storage, locations, and stock status.',\n aliases: ['reagents', 'inventory', 'antibodies', 'primers', 'compound stocks'],\n python_import: 'from mint_sdk.templates import ReagentListTemplate, save_template',\n python_example: 'ReagentListTemplate.create([\"DMSO\", \"Compound A\", \"Anti-HA antibody\"])',\n frontend_import: \"import { toReagentListItems, toTemplateDataFrame } from '@morscherlab/mint-sdk/templates'\",\n frontend_adapters: ['toTemplateDataFrame', 'toReagentDataFrame', 'toReagentListItems'],\n components: ['ReagentList', 'DataFrame', 'ReagentEditor'],\n add_command: 'mint add data-template reagent-list --page',\n },\n {\n name: 'flow-cytometry-panel',\n template_id: 'flow-cytometry-panel',\n template_version: '1.0',\n label: 'Flow cytometry panel',\n category: 'bio-data',\n purpose: 'Flow-cytometry markers, fluorophores, detectors, compensation controls, and panel metadata.',\n aliases: ['flow panel', 'facs panel', 'cytometry panel', 'antibody panel'],\n python_import: 'from mint_sdk.templates import FlowCytometryPanelTemplate, save_template',\n python_example: 'FlowCytometryPanelTemplate.create([\"CD3\", \"CD4\", \"CD8\"], instrument=\"BD LSRFortessa\")',\n frontend_import: \"import { toFlowPanelDataFrame, toTemplateDataFrame } from '@morscherlab/mint-sdk/templates'\",\n frontend_adapters: ['toTemplateDataFrame', 'toFlowPanelDataFrame', 'toFlowPanelRows', 'toFlowPanelColumns'],\n components: ['DataFrame', 'ReagentList', 'SampleSelector'],\n add_command: 'mint add data-template flow-cytometry-panel --page',\n },\n {\n name: 'instrument-run',\n template_id: 'instrument-run',\n template_version: '1.0',\n label: 'Instrument run',\n category: 'bio-data',\n purpose: 'Instrument sequence tables, sample queues, methods, QC, blanks, and acquisition status.',\n aliases: ['run queue', 'sequence table', 'sample queue', 'lcms run', 'instrument sequence', 'batch run'],\n python_import: 'from mint_sdk.templates import InstrumentRunTemplate, save_template',\n python_example: 'InstrumentRunTemplate.create([\"S001\", \"S002\"], instrument=\"LC-MS\")',\n frontend_import: \"import { toInstrumentRunDataFrame, toInstrumentRunScheduleEvents, toInstrumentRunSteps, toTemplateDataFrame } from '@morscherlab/mint-sdk/templates'\",\n frontend_adapters: ['toTemplateDataFrame', 'toInstrumentRunDataFrame', 'toInstrumentRunRows', 'toInstrumentRunColumns', 'toInstrumentRunSteps', 'toInstrumentRunScheduleEvents'],\n components: ['DataFrame', 'ExperimentTimeline', 'ScheduleCalendar', 'SampleSelector'],\n add_command: 'mint add data-template instrument-run --page',\n },\n {\n name: 'qpcr-plate',\n template_id: 'qpcr-plate',\n template_version: '1.0',\n label: 'qPCR plate',\n category: 'bio-data',\n purpose: 'qPCR/ddPCR plate layouts, samples, targets, replicate reactions, controls, and Cq fields.',\n aliases: ['qpcr', 'qPCR', 'ddpcr', 'rt-qpcr', 'gene expression', 'primer plate'],\n python_import: 'from mint_sdk.templates import QpcrPlateTemplate, save_template',\n python_example: 'QpcrPlateTemplate.create(samples=[\"Control\", \"Treatment\"], targets=[\"ACTB\", \"GAPDH\"], replicates=3)',\n frontend_import: \"import { toQpcrDataFrame, toQpcrWellPlateWells, toTemplateDataFrame } from '@morscherlab/mint-sdk/templates'\",\n frontend_adapters: ['toTemplateDataFrame', 'toQpcrDataFrame', 'toQpcrRows', 'toQpcrColumns', 'toQpcrWellPlateWells'],\n components: ['DataFrame', 'WellPlate', 'SampleSelector'],\n add_command: 'mint add data-template qpcr-plate --page',\n },\n] as const satisfies readonly BioTemplateCatalogEntry[]\n\nexport function listBioTemplateCatalog(): readonly BioTemplateCatalogEntry[] {\n return bioTemplateCatalog\n}\n\nexport function getBioTemplateInfo(name: string): BioTemplateCatalogEntry | undefined {\n return bioTemplateCatalog.find(entry => {\n const identifiers = [\n entry.name,\n entry.template_id,\n entry.label,\n ...entry.aliases,\n ]\n return templateIdentifierMatches(name, identifiers)\n })\n}\n\nexport function searchBioTemplateCatalog(query: string): readonly BioTemplateCatalogEntry[] {\n const normalized = query.trim().toLowerCase()\n if (!normalized) return bioTemplateCatalog\n\n return bioTemplateCatalog.filter(entry => templateSearchMatches(normalized, [\n entry.name,\n entry.template_id,\n entry.label,\n entry.purpose,\n entry.python_import,\n entry.python_example,\n entry.frontend_import,\n entry.add_command,\n ...entry.aliases,\n ...entry.frontend_adapters,\n ...entry.components,\n ]))\n}\n","import { bioTemplateCatalog } from './catalog'\nimport type { TemplateId, TemplatePackId } from './types'\n\nimport { templateIdentifierMatches, templateSearchMatches } from './lookup'\n\nexport interface BioTemplatePackEntry {\n name: TemplatePackId\n label: string\n category: 'bio-template-pack'\n purpose: string\n templates: readonly TemplateId[]\n aliases: readonly string[]\n frontend_adapters: readonly string[]\n components: readonly string[]\n add_command: string\n docs_command: string\n}\n\ninterface BioTemplatePackDefinition {\n name: TemplatePackId\n label: string\n purpose: string\n templates: readonly TemplateId[]\n aliases: readonly string[]\n}\n\nconst templateInfoById = new Map(\n bioTemplateCatalog.map(entry => [entry.template_id, entry]),\n)\n\nfunction collectTemplateField(\n templateIds: readonly TemplateId[],\n field: 'frontend_adapters' | 'components',\n): readonly string[] {\n const values: string[] = []\n for (const templateId of templateIds) {\n const entry = templateInfoById.get(templateId)\n if (!entry) {\n throw new Error(`Unknown bio template in pack catalog: ${templateId}`)\n }\n for (const value of entry[field]) {\n if (!values.includes(value)) {\n values.push(value)\n }\n }\n }\n return values\n}\n\nfunction createPack(definition: BioTemplatePackDefinition): BioTemplatePackEntry {\n return {\n ...definition,\n category: 'bio-template-pack',\n frontend_adapters: collectTemplateField(definition.templates, 'frontend_adapters'),\n components: collectTemplateField(definition.templates, 'components'),\n add_command: `mint add data-template-pack ${definition.name} --page`,\n docs_command: `mint docs template-pack ${definition.name}`,\n }\n}\n\nconst bioTemplatePackDefinitions = [\n {\n name: 'cell-culture-screen',\n label: 'Cell culture screen',\n purpose: 'Plate layout, sample metadata, sample prep, reagents, protocol, dose-response, and flow-panel setup.',\n templates: [\n 'sample-sheet',\n 'sample-prep',\n 'plate-map',\n 'reagent-list',\n 'protocol-steps',\n 'dose-response',\n 'flow-cytometry-panel',\n ],\n aliases: ['cell culture', 'screen', 'drug screen', 'plate screen'],\n },\n {\n name: 'omics-assay',\n label: 'Omics assay',\n purpose: 'Sample metadata, sample prep, reagents, protocol, instrument run queue, calibration curve, and measurement matrix.',\n templates: [\n 'sample-sheet',\n 'sample-prep',\n 'reagent-list',\n 'protocol-steps',\n 'instrument-run',\n 'calibration-curve',\n 'assay-matrix',\n ],\n aliases: [\n 'omics',\n 'metabolomics',\n 'metabolism',\n 'metabolite profiling',\n 'proteomics',\n 'assay matrix',\n 'lcms',\n 'standard curve',\n ],\n },\n {\n name: 'longitudinal-study',\n label: 'Longitudinal study',\n purpose: 'Sample metadata, time-course schedule, protocol, and measurement matrix.',\n templates: [\n 'sample-sheet',\n 'time-course',\n 'protocol-steps',\n 'assay-matrix',\n ],\n aliases: ['time series', 'time-course study', 'kinetics', 'longitudinal'],\n },\n {\n name: 'molecular-assay',\n label: 'Molecular assay',\n purpose: 'Sample metadata, sample prep, reagents, protocol, instrument run queue, calibration curve, and qPCR/ddPCR plate setup.',\n templates: [\n 'sample-sheet',\n 'sample-prep',\n 'reagent-list',\n 'protocol-steps',\n 'instrument-run',\n 'calibration-curve',\n 'qpcr-plate',\n ],\n aliases: ['molecular', 'qpcr', 'qPCR', 'gene expression', 'rt-qpcr', 'ddpcr'],\n },\n] as const satisfies readonly BioTemplatePackDefinition[]\n\nexport const bioTemplatePacks = bioTemplatePackDefinitions.map(createPack) as readonly BioTemplatePackEntry[]\n\nexport function listBioTemplatePacks(): readonly BioTemplatePackEntry[] {\n return bioTemplatePacks\n}\n\nexport function getBioTemplatePackInfo(name: string): BioTemplatePackEntry | undefined {\n return bioTemplatePacks.find(entry => {\n const identifiers = [\n entry.name,\n entry.label,\n ...entry.aliases,\n ]\n return templateIdentifierMatches(name, identifiers)\n })\n}\n\nexport function searchBioTemplatePacks(query: string): readonly BioTemplatePackEntry[] {\n const normalized = query.trim().toLowerCase()\n if (!normalized) return bioTemplatePacks\n\n return bioTemplatePacks.filter(entry => templateSearchMatches(normalized, [\n entry.name,\n entry.label,\n entry.purpose,\n entry.add_command,\n entry.docs_command,\n ...entry.templates,\n ...entry.aliases,\n ...entry.frontend_adapters,\n ...entry.components,\n ]))\n}\n","import type { TemplateId, TemplatePresetId } from './types'\n\nimport { templateIdentifierMatches, templateSearchMatches } from './lookup'\n\nexport interface BioTemplatePresetEntry {\n name: TemplatePresetId\n label: string\n category: 'bio-template-preset'\n purpose: string\n templates: readonly TemplateId[]\n aliases: readonly string[]\n python_import: string\n python_example: string\n frontend_import: string\n frontend_adapters: readonly string[]\n components: readonly string[]\n}\n\nexport const bioTemplatePresets = [\n {\n name: 'wellplate-screen',\n label: 'Well-plate screen',\n category: 'bio-template-preset',\n purpose: 'Plate map, sample sheet, and dose-response payloads for plate-based screening assays.',\n templates: ['plate-map', 'sample-sheet', 'dose-response'],\n aliases: [\n 'wellplate',\n 'well-plate screen',\n 'drug screen',\n 'plate screen',\n 'dose response plate',\n 'dose design',\n 'dose planner',\n ],\n python_import: 'from mint_sdk.templates import create_wellplate_screen_collection, save_template_collection',\n python_example: 'create_wellplate_screen_collection(samples=[\"Control\", \"Treatment\"], compounds={\"Drug A\": [10, 1, 0.1]}, unit=\"uM\")',\n frontend_import: \"import { createWellPlateScreenCollection, toPlateMapEditorState, toTemplateDataFrame } from '@morscherlab/mint-sdk/templates'\",\n frontend_adapters: ['toPlateMapEditorState', 'toTemplateDataFrame', 'toDoseConditions'],\n components: ['PlateMapEditor', 'WellPlate', 'DataFrame', 'DoseCalculator'],\n },\n {\n name: 'qpcr-expression',\n label: 'qPCR expression',\n category: 'bio-template-preset',\n purpose: 'Sample metadata and qPCR/ddPCR plate layout for target-expression assays.',\n templates: ['sample-sheet', 'qpcr-plate'],\n aliases: ['qpcr', 'qPCR', 'rt-qpcr', 'ddpcr', 'gene expression', 'primer plate'],\n python_import: 'from mint_sdk.templates import create_qpcr_expression_collection, save_template_collection',\n python_example: 'create_qpcr_expression_collection(samples=[\"Control\", \"Treatment\"], targets=[\"ACTB\", \"GAPDH\"], replicates=3)',\n frontend_import: \"import { createQpcrExpressionCollection, toQpcrWellPlateWells, toTemplateDataFrame } from '@morscherlab/mint-sdk/templates'\",\n frontend_adapters: ['toTemplateDataFrame', 'toQpcrDataFrame', 'toQpcrWellPlateWells'],\n components: ['DataFrame', 'WellPlate', 'SampleSelector'],\n },\n {\n name: 'lcms-batch',\n label: 'LC-MS batch',\n category: 'bio-template-preset',\n purpose: 'Sample metadata, instrument queue, and assay matrix payloads for omics acquisition batches.',\n templates: ['sample-sheet', 'instrument-run', 'assay-matrix'],\n aliases: [\n 'lcms',\n 'lc-ms',\n 'mass spec batch',\n 'omics batch',\n 'metabolomics',\n 'metabolism',\n 'metabolite profiling',\n 'run queue',\n 'sequence table',\n ],\n python_import: 'from mint_sdk.templates import create_lcms_batch_collection, save_template_collection',\n python_example: 'create_lcms_batch_collection(samples=[\"S001\", \"S002\"], features=[\"Glucose\", \"Lactate\"], instrument=\"LC-MS\")',\n frontend_import: \"import { createLcmsBatchCollection, toAssayMatrixSampleOptions, toInstrumentRunDataFrame, toInstrumentRunScheduleEvents, toInstrumentRunSteps, toTemplateDataFrame } from '@morscherlab/mint-sdk/templates'\",\n frontend_adapters: ['toTemplateDataFrame', 'toInstrumentRunDataFrame', 'toInstrumentRunSteps', 'toInstrumentRunScheduleEvents', 'toAssayMatrixDataFrame', 'toAssayMatrixSampleOptions'],\n components: ['DataFrame', 'ExperimentTimeline', 'ScheduleCalendar', 'ChartContainer', 'SampleSelector'],\n },\n {\n name: 'targeted-metabolomics',\n label: 'Targeted metabolomics',\n category: 'bio-template-preset',\n purpose: 'Sample metadata, extraction prep, internal standards, LC/GC-MS sequence, calibration curve, and metabolite readout matrix for quantitative metabolomics.',\n templates: ['sample-sheet', 'sample-prep', 'reagent-list', 'instrument-run', 'calibration-curve', 'assay-matrix'],\n aliases: [\n 'targeted metabolomics',\n 'quantitative metabolomics',\n 'lc-ms metabolomics',\n 'gc-ms metabolomics',\n 'targeted lcms',\n 'metabolite quantitation',\n 'mass spec quantitation',\n 'internal standards',\n 'peak area ratio',\n ],\n python_import: 'from mint_sdk.templates import create_targeted_metabolomics_collection, save_template_collection',\n python_example: 'create_targeted_metabolomics_collection(samples=[\"S001\", \"S002\"], metabolites=[\"Glucose\", \"Lactate\"], internal_standards=[\"13C Glucose\"], instrument=\"LC-MS\")',\n frontend_import: \"import { createTargetedMetabolomicsCollection, toInstrumentRunDataFrame, toCalibrationCurveDataFrame, toAssayMatrixDataFrame, toTemplateDataFrame } from '@morscherlab/mint-sdk/templates'\",\n frontend_adapters: ['toTemplateDataFrame', 'toSamplePrepDataFrame', 'toReagentDataFrame', 'toInstrumentRunDataFrame', 'toInstrumentRunSteps', 'toInstrumentRunScheduleEvents', 'toCalibrationCurveDataFrame', 'toAssayMatrixDataFrame', 'toAssayMatrixSampleOptions'],\n components: ['DataFrame', 'ReagentList', 'ExperimentTimeline', 'ScheduleCalendar', 'FitPanel', 'ChartContainer', 'SampleSelector'],\n },\n {\n name: 'elisa-assay',\n label: 'ELISA assay',\n category: 'bio-template-preset',\n purpose: 'Plate layout, sample metadata, standard curve, and readout matrix for ELISA and plate-reader assays.',\n templates: ['plate-map', 'sample-sheet', 'calibration-curve', 'assay-matrix'],\n aliases: ['elisa', 'plate reader assay', 'standard curve plate', 'absorbance assay', 'immunoassay'],\n python_import: 'from mint_sdk.templates import create_elisa_assay_collection, save_template_collection',\n python_example: 'create_elisa_assay_collection(samples=[\"Control\", \"Treatment\"], analyte=\"IL-6\", standard_concentrations=[1000, 100, 10, 1], unit=\"pg/mL\")',\n frontend_import: \"import { createElisaAssayCollection, toPlateMapEditorState, toTemplateDataFrame } from '@morscherlab/mint-sdk/templates'\",\n frontend_adapters: ['toPlateMapEditorState', 'toTemplateDataFrame', 'toCalibrationCurveDataFrame'],\n components: ['PlateMapEditor', 'WellPlate', 'DataFrame', 'FitPanel', 'ChartContainer'],\n },\n {\n name: 'flow-cytometry-assay',\n label: 'Flow cytometry assay',\n category: 'bio-template-preset',\n purpose: 'Sample metadata, antibody marker panel, compensation controls, and readout matrix for flow-cytometry assays.',\n templates: ['sample-sheet', 'flow-cytometry-panel', 'assay-matrix'],\n aliases: [\n 'flow cytometry',\n 'facs',\n 'facs panel',\n 'flow panel',\n 'immune phenotyping',\n 'immunophenotyping',\n ],\n python_import: 'from mint_sdk.templates import create_flow_cytometry_assay_collection, save_template_collection',\n python_example: 'create_flow_cytometry_assay_collection(samples=[\"Control\", \"Treatment\"], markers=[\"CD3\", \"CD4\", \"CD8\"], instrument=\"BD LSRFortessa\")',\n frontend_import: \"import { createFlowCytometryAssayCollection, toFlowPanelDataFrame, toTemplateDataFrame } from '@morscherlab/mint-sdk/templates'\",\n frontend_adapters: ['toTemplateDataFrame', 'toFlowPanelDataFrame', 'toAssayMatrixDataFrame'],\n components: ['DataFrame', 'SampleSelector', 'ChartContainer'],\n },\n {\n name: 'western-blot-assay',\n label: 'Western blot assay',\n category: 'bio-template-preset',\n purpose: 'Sample metadata, antibody/reagent list, protocol steps, and normalized protein readout matrix for Western blot assays.',\n templates: ['sample-sheet', 'reagent-list', 'protocol-steps', 'assay-matrix'],\n aliases: ['western blot', 'western-blot', 'immunoblot', 'protein blot', 'protein expression'],\n python_import: 'from mint_sdk.templates import create_western_blot_assay_collection, save_template_collection',\n python_example: 'create_western_blot_assay_collection(samples=[\"Control\", \"Treatment\"], targets=[\"pERK\", \"ERK\"], loading_control=\"ACTB\")',\n frontend_import: \"import { createWesternBlotAssayCollection, toReagentDataFrame, toProtocolDataFrame, toTemplateDataFrame } from '@morscherlab/mint-sdk/templates'\",\n frontend_adapters: ['toTemplateDataFrame', 'toReagentDataFrame', 'toProtocolDataFrame'],\n components: ['DataFrame', 'ReagentList', 'ExperimentTimeline', 'SampleSelector'],\n },\n] as const satisfies readonly BioTemplatePresetEntry[]\n\nexport function listBioTemplatePresets(): readonly BioTemplatePresetEntry[] {\n return bioTemplatePresets\n}\n\nexport function getBioTemplatePresetInfo(name: string): BioTemplatePresetEntry | undefined {\n return bioTemplatePresets.find(entry => {\n const identifiers = [\n entry.name,\n entry.label,\n ...entry.aliases,\n ]\n return templateIdentifierMatches(name, identifiers)\n })\n}\n\nexport function searchBioTemplatePresets(query: string): readonly BioTemplatePresetEntry[] {\n const normalized = query.trim().toLowerCase()\n if (!normalized) return bioTemplatePresets\n\n return bioTemplatePresets.filter(entry => templateSearchMatches(normalized, [\n entry.name,\n entry.label,\n entry.purpose,\n entry.python_import,\n entry.python_example,\n entry.frontend_import,\n ...entry.templates,\n ...entry.aliases,\n ...entry.frontend_adapters,\n ...entry.components,\n ]))\n}\n","import { extractTemplateCollection } from './templateEnvelopes'\nimport { getBioTemplateInfo } from './catalog'\nimport { getBioTemplatePackInfo } from './packs'\nimport { getBioTemplatePresetInfo } from './presets'\nimport type {\n BioTemplateEnvelope,\n TemplateCollectionEnvelope,\n TemplateId,\n TemplatePackId,\n TemplatePresetId,\n} from './types'\n\ntype BioTemplateComponentTarget =\n | TemplateId\n | TemplatePackId\n | TemplatePresetId\n | string\n | BioTemplateEnvelope<unknown>\n | TemplateCollectionEnvelope\n\nexport function resolveComponentTemplateIds(target: BioTemplateComponentTarget): TemplateId[] {\n if (typeof target === 'string') {\n const preset = getBioTemplatePresetInfo(target)\n if (preset) return [...preset.templates]\n const pack = getBioTemplatePackInfo(target)\n if (pack) return [...pack.templates]\n const template = getBioTemplateInfo(target)\n return template ? [template.template_id] : []\n }\n\n if (isTemplateEnvelope(target)) {\n const template = getBioTemplateInfo(target.template_id)\n return template ? [template.template_id] : []\n }\n\n const presetName = collectionPresetName(target)\n if (presetName) {\n const preset = getBioTemplatePresetInfo(presetName)\n if (preset) return [...preset.templates]\n }\n\n const packName = collectionPackName(target)\n if (packName) {\n const pack = getBioTemplatePackInfo(packName)\n if (pack) return [...pack.templates]\n }\n\n return Object.keys(extractTemplateCollection(target))\n .map(templateId => getBioTemplateInfo(templateId)?.template_id)\n .filter((templateId): templateId is TemplateId => templateId !== undefined)\n}\n\nexport function isTemplateEnvelope(value: unknown): value is BioTemplateEnvelope<unknown> {\n return isRecord(value) && typeof value.template_id === 'string' && 'data' in value\n}\n\nfunction collectionPresetName(value: unknown): string | undefined {\n if (!isRecord(value) || !isRecord(value.metadata)) return undefined\n return typeof value.metadata.preset === 'string' ? value.metadata.preset : undefined\n}\n\nfunction collectionPackName(value: unknown): string | undefined {\n if (!isRecord(value) || !isRecord(value.metadata)) return undefined\n return typeof value.metadata.pack === 'string' ? value.metadata.pack : undefined\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null\n}\n","interface CloneableComponentBinding {\n adapters: readonly string[]\n props: readonly string[]\n}\n\ninterface NamedComponentBinding {\n template_id: string\n component: string\n}\n\ninterface ComponentImportStatement {\n statement: string\n}\n\nexport function cloneBindingMap<TName extends string, TBinding extends CloneableComponentBinding>(\n bindings: Record<TName, readonly TBinding[]>\n): Record<TName, TBinding[]> {\n const result = {} as Record<TName, TBinding[]>\n for (const name of Object.keys(bindings) as TName[]) {\n result[name] = cloneBindings(bindings[name])\n }\n return result\n}\n\nexport function cloneBindings<TBinding extends CloneableComponentBinding>(\n bindings: readonly TBinding[]\n): TBinding[] {\n return bindings.map(cloneBinding)\n}\n\nexport function cloneBinding<TBinding extends CloneableComponentBinding>(binding: TBinding): TBinding {\n return {\n ...binding,\n adapters: [...binding.adapters],\n props: [...binding.props],\n }\n}\n\nexport function uniquePropsName(\n binding: NamedComponentBinding,\n usedNames: Map<string, number>\n): string {\n const base = toCamelIdentifier(`${binding.template_id} ${binding.component} props`)\n const count = usedNames.get(base) ?? 0\n usedNames.set(base, count + 1)\n return count === 0 ? base : `${base}${count + 1}`\n}\n\nfunction toCamelIdentifier(value: string): string {\n const words = value\n .replace(/([a-z0-9])([A-Z])/g, '$1 $2')\n .split(/[^A-Za-z0-9]+/)\n .filter(Boolean)\n\n if (words.length === 0) return 'componentProps'\n\n return words\n .map((word, index) => {\n const lower = word.toLowerCase()\n return index === 0 ? lower : lower.charAt(0).toUpperCase() + lower.slice(1)\n })\n .join('')\n}\n\nexport function toVueSfc(\n imports: readonly ComponentImportStatement[],\n setupLines: readonly string[],\n template: string,\n includeTargetTypeImport: boolean\n): string {\n const importLines = [\n ...imports.map(item => item.statement),\n \"import { toBioTemplateComponentProps } from '@morscherlab/mint-sdk/templates'\",\n ...(includeTargetTypeImport\n ? [\"import type { BioTemplateEnvelope, TemplateCollectionEnvelope } from '@morscherlab/mint-sdk/templates'\"]\n : []),\n ]\n const templateLines = template\n ? template.split('\\n').map(line => ` ${line}`).join('\\n')\n : ''\n\n return [\n '<script setup lang=\"ts\">',\n ...importLines,\n '',\n ...setupLines,\n '</script>',\n '',\n '<template>',\n templateLines,\n '</template>',\n ].join('\\n')\n}\n","import type { TemplateId } from './types'\n\ninterface ComponentBinding {\n id: string\n template_id: TemplateId\n component: string\n adapters: readonly string[]\n props: readonly string[]\n description: string\n importPath: '@morscherlab/mint-sdk'\n}\n\nexport const templateComponentBindings = {\n 'plate-map': [\n binding('plate-map', 'PlateMapEditor', ['toPlateMapEditorState'], ['modelValue', 'format', 'samples'], 'Edit plate layouts from plate-map template data.'),\n binding('plate-map', 'WellPlate', ['toWellPlateWells'], ['format', 'wells', 'sampleColors', 'legendItems'], 'Render the active plate as a well grid.'),\n ],\n 'sample-sheet': [\n binding('sample-sheet', 'DataFrame', ['toTemplateDataFrame'], ['data', 'columns', 'rowKey'], 'Render sample metadata as a sortable table.'),\n binding('sample-sheet', 'SampleSelector', ['toSampleOptions'], ['samples', 'modelValue'], 'Select samples from sample-sheet records.'),\n ],\n 'sample-prep': [\n binding('sample-prep', 'DataFrame', ['toTemplateDataFrame'], ['data', 'columns', 'rowKey'], 'Render preparation steps as a table.'),\n ],\n 'dose-response': [\n binding('dose-response', 'DoseCalculator', ['toDoseConditions'], ['mode', 'targetWells'], 'Configure serial dilution and apply concentrations to wells.'),\n binding('dose-response', 'WellPlate', ['toDoseLayoutState'], ['format', 'wells', 'sampleColors', 'legendItems'], 'Render the optional dose-response plate layout.'),\n ],\n 'calibration-curve': [\n binding('calibration-curve', 'DataFrame', ['toTemplateDataFrame'], ['data', 'columns', 'rowKey'], 'Render standards, QC, blanks, and response values.'),\n ],\n 'time-course': [\n binding('time-course', 'ExperimentTimeline', ['toTimeCourseSteps'], ['modelValue', 'orientation'], 'Render time points as an ordered timeline.'),\n binding('time-course', 'DataFrame', ['toTemplateDataFrame'], ['data', 'columns', 'rowKey'], 'Render longitudinal samples as a table.'),\n ],\n 'protocol-steps': [\n binding('protocol-steps', 'ExperimentTimeline', ['toProtocolSteps'], ['modelValue', 'orientation', 'editable'], 'Render protocol steps as an editable timeline.'),\n binding('protocol-steps', 'DataFrame', ['toTemplateDataFrame'], ['data', 'columns', 'rowKey'], 'Render protocol steps as a table.'),\n ],\n 'assay-matrix': [\n binding('assay-matrix', 'DataFrame', ['toTemplateDataFrame'], ['data', 'columns', 'rowKey'], 'Render sample-by-feature measurements.'),\n binding('assay-matrix', 'SampleSelector', ['toAssayMatrixSampleOptions'], ['samples', 'modelValue'], 'Select samples from assay-matrix records.'),\n ],\n 'reagent-list': [\n binding('reagent-list', 'ReagentList', ['toReagentListItems'], ['modelValue'], 'Render reagents with lot, storage, and stock metadata.'),\n binding('reagent-list', 'DataFrame', ['toTemplateDataFrame'], ['data', 'columns', 'rowKey'], 'Render reagents as a table.'),\n ],\n 'flow-cytometry-panel': [\n binding('flow-cytometry-panel', 'DataFrame', ['toTemplateDataFrame'], ['data', 'columns', 'rowKey'], 'Render markers, fluorophores, detectors, and controls.'),\n ],\n 'instrument-run': [\n binding('instrument-run', 'DataFrame', ['toTemplateDataFrame'], ['data', 'columns', 'rowKey'], 'Render acquisition queues, methods, QC, and run status.'),\n binding(\n 'instrument-run',\n 'ScheduleCalendar',\n ['toInstrumentRunScheduleEvents'],\n ['modelValue', 'events', 'view', 'readonly', 'showNavigation', 'showViewToggle'],\n 'Render acquisition queues as a scheduled run calendar.',\n ),\n binding(\n 'instrument-run',\n 'ExperimentTimeline',\n ['toInstrumentRunSteps'],\n ['modelValue', 'orientation', 'showDuration', 'editable'],\n 'Render acquisition queues as an ordered run timeline.',\n ),\n ],\n 'qpcr-plate': [\n binding('qpcr-plate', 'WellPlate', ['toQpcrWellPlateWells'], ['format', 'wells', 'sampleColors', 'legendItems'], 'Render qPCR reactions on a well plate.'),\n binding('qpcr-plate', 'DataFrame', ['toTemplateDataFrame'], ['data', 'columns', 'rowKey'], 'Render qPCR reactions, targets, controls, and Cq values.'),\n ],\n} satisfies Record<TemplateId, readonly ComponentBinding[]>\n\nfunction binding(\n templateId: TemplateId,\n component: string,\n adapters: readonly string[],\n props: readonly string[],\n description: string\n): ComponentBinding {\n return {\n id: `${templateId}:${component}`,\n template_id: templateId,\n component,\n adapters,\n props,\n description,\n importPath: '@morscherlab/mint-sdk',\n }\n}\n","import type { WellPlateFormat } from '../types'\n\nconst PLATE_DIMENSIONS: Record<number, readonly [number, number]> = {\n 6: [2, 3],\n 12: [3, 4],\n 24: [4, 6],\n 48: [6, 8],\n 54: [6, 9],\n 96: [8, 12],\n 384: [16, 24],\n}\n\nexport function wellIdsForFormat(format: number): string[] {\n const dimensions = PLATE_DIMENSIONS[format]\n if (!dimensions) {\n throw new Error(`Unsupported plate format '${format}'.`)\n }\n const [rows, cols] = dimensions\n return Array.from({ length: rows }, (_, row) =>\n Array.from({ length: cols }, (_col, col) => `${rowLabel(row)}${col + 1}`)\n ).flat()\n}\n\nexport function assertWellInFormat(wellId: string, format: number): void {\n const dimensions = PLATE_DIMENSIONS[format]\n if (!dimensions) {\n throw new Error(`Unsupported plate format '${format}'.`)\n }\n const match = /^([A-Z]+)([1-9][0-9]*)$/.exec(wellId.toUpperCase())\n if (!match) {\n throw new Error(`Invalid well id '${wellId}'.`)\n }\n const row = rowIndex(match[1])\n const col = Number(match[2]) - 1\n const [rows, cols] = dimensions\n if (row < 0 || col < 0 || row >= rows || col >= cols) {\n throw new Error(`Well '${wellId}' is outside a ${format}-well plate.`)\n }\n}\n\nexport function readPlateFormat(value: unknown, fallback: WellPlateFormat): WellPlateFormat {\n const parsed = typeof value === 'number'\n ? value\n : typeof value === 'string'\n ? Number(value)\n : Number.NaN\n return parsed in PLATE_DIMENSIONS ? (parsed as WellPlateFormat) : fallback\n}\n\nfunction rowLabel(index: number): string {\n let label = ''\n let current = index\n while (true) {\n label = String.fromCharCode(65 + (current % 26)) + label\n current = Math.floor(current / 26) - 1\n if (current < 0) return label\n }\n}\n\nfunction rowIndex(label: string): number {\n return [...label].reduce((value, char) => value * 26 + char.charCodeAt(0) - 64, 0) - 1\n}\n","import type {\n AssayMatrixTemplateData,\n CalibrationCurveTemplateData,\n DoseResponseTemplateData,\n FlowCytometryPanelTemplateData,\n InstrumentRunTemplateData,\n PlateMapTemplateData,\n ProtocolStepsTemplateData,\n QpcrPlateTemplateData,\n ReagentListTemplateData,\n SamplePrepTemplateData,\n SampleSheetTemplateData,\n TimeCourseTemplateData,\n} from './types'\nimport { assertWellInFormat } from './plateGeometry'\n\nexport function validatePlateMapData(data: PlateMapTemplateData): void {\n if (!Array.isArray(data.plates) || data.plates.length === 0) {\n throw new Error('Plate-map template requires at least one plate.')\n }\n const sampleIds = new Set(data.samples.map(sample => sample.id))\n if (sampleIds.size !== data.samples.length) {\n throw new Error('Plate-map sample ids must be unique.')\n }\n for (const plate of data.plates) {\n for (const [wellId, well] of Object.entries(plate.wells)) {\n if (well.id !== wellId) {\n throw new Error(`Well key '${wellId}' does not match well id '${well.id}'.`)\n }\n if (well.sampleType && !sampleIds.has(well.sampleType)) {\n throw new Error(`Well '${well.id}' references unknown sample '${well.sampleType}'.`)\n }\n }\n }\n}\n\nexport function validateSampleSheetData(data: SampleSheetTemplateData): void {\n if (!Array.isArray(data.samples) || data.samples.length === 0) {\n throw new Error('Sample-sheet template requires at least one sample.')\n }\n const sampleIds = new Set(data.samples.map(sample => sample.sampleId))\n if (sampleIds.size !== data.samples.length) {\n throw new Error('Sample-sheet sample ids must be unique.')\n }\n for (const group of data.groups) {\n for (const sampleId of group.samples) {\n if (!sampleIds.has(sampleId)) {\n throw new Error(`Group '${group.name}' references unknown sample '${sampleId}'.`)\n }\n }\n }\n}\n\nexport function validateSamplePrepData(data: SamplePrepTemplateData): void {\n if (!data.protocolName) {\n throw new Error('Sample-prep template requires protocolName.')\n }\n if (!Array.isArray(data.steps) || data.steps.length === 0) {\n throw new Error('Sample-prep template requires at least one step.')\n }\n const stepIds = new Set(data.steps.map(step => step.id))\n if (stepIds.size !== data.steps.length) {\n throw new Error('Sample-prep step ids must be unique.')\n }\n const orders = new Set(data.steps.map(step => step.order))\n if (orders.size !== data.steps.length) {\n throw new Error('Sample-prep step orders must be unique.')\n }\n for (const step of data.steps) {\n if (!step.id || !step.name) {\n throw new Error('Sample-prep steps require id and name.')\n }\n if (step.order < 0) {\n throw new Error(`Sample-prep step '${step.id}' has a negative order.`)\n }\n if (!step.volumeUnit) {\n throw new Error(`Sample-prep step '${step.id}' requires volumeUnit.`)\n }\n if (step.inputVolume !== undefined && step.inputVolume < 0) {\n throw new Error(`Sample-prep step '${step.id}' has a negative input volume.`)\n }\n if (step.outputVolume !== undefined && step.outputVolume < 0) {\n throw new Error(`Sample-prep step '${step.id}' has a negative output volume.`)\n }\n if (step.durationMin !== undefined && step.durationMin < 0) {\n throw new Error(`Sample-prep step '${step.id}' has a negative duration.`)\n }\n if (!step.sourceSampleId && !step.destinationSampleId && !step.reagentId) {\n throw new Error(`Sample-prep step '${step.id}' requires a source, destination, or reagent.`)\n }\n }\n}\n\nexport function validateDoseResponseData(data: DoseResponseTemplateData): void {\n if (!Array.isArray(data.compounds) || data.compounds.length === 0) {\n throw new Error('Dose-response template requires at least one compound.')\n }\n if (!data.unit) {\n throw new Error('Dose-response template requires a unit.')\n }\n if (data.replicates < 1) {\n throw new Error('Dose-response replicates must be at least 1.')\n }\n for (const compound of data.compounds) {\n if (compound.concentrations.length === 0) {\n throw new Error(`Compound '${compound.name}' requires at least one concentration.`)\n }\n if (compound.concentrations.some(value => value < 0)) {\n throw new Error(`Compound '${compound.name}' has a negative concentration.`)\n }\n }\n}\n\nexport function validateCalibrationCurveData(data: CalibrationCurveTemplateData): void {\n if (!data.analyte) {\n throw new Error('Calibration-curve template requires an analyte.')\n }\n if (!data.xUnit) {\n throw new Error('Calibration-curve template requires xUnit.')\n }\n if (!data.responseUnit) {\n throw new Error('Calibration-curve template requires responseUnit.')\n }\n if (!Array.isArray(data.points) || data.points.length === 0) {\n throw new Error('Calibration-curve template requires at least one point.')\n }\n if (data.acceptance.minRSquared < 0 || data.acceptance.minRSquared > 1) {\n throw new Error('Calibration-curve minRSquared must be between 0 and 1.')\n }\n if (data.acceptance.standardTolerancePercent < 0 || data.acceptance.qcTolerancePercent < 0) {\n throw new Error('Calibration-curve tolerances cannot be negative.')\n }\n\n const pointIds = new Set(data.points.map(point => point.id))\n if (pointIds.size !== data.points.length) {\n throw new Error('Calibration-curve point ids must be unique.')\n }\n const orders = new Set(data.points.map(point => point.order))\n if (orders.size !== data.points.length) {\n throw new Error('Calibration-curve point orders must be unique.')\n }\n\n let standards = 0\n for (const point of data.points) {\n if (!point.id || !point.level) {\n throw new Error('Calibration-curve points require id and level.')\n }\n if (!point.unit) {\n throw new Error(`Calibration-curve point '${point.id}' requires unit.`)\n }\n if (point.order < 0) {\n throw new Error(`Calibration-curve point '${point.id}' has a negative order.`)\n }\n if (point.concentration < 0) {\n throw new Error(`Calibration-curve point '${point.id}' has a negative concentration.`)\n }\n if ((point.role === 'standard' || point.role === 'qc') && point.concentration <= 0) {\n throw new Error(`Calibration-curve point '${point.id}' requires positive concentration.`)\n }\n if (point.replicate < 1) {\n throw new Error(`Calibration-curve point '${point.id}' replicate must be at least 1.`)\n }\n if (point.role === 'standard' && point.include) {\n standards += 1\n }\n }\n\n if (standards < 2) {\n throw new Error('Calibration-curve template requires at least two included standards.')\n }\n if (data.acceptance.requireBlank && !data.points.some(point => point.role === 'blank')) {\n throw new Error('Calibration-curve template requires a blank point when requireBlank is true.')\n }\n}\n\nexport function validateTimeCourseData(data: TimeCourseTemplateData): void {\n if (!Array.isArray(data.timepoints) || data.timepoints.length === 0) {\n throw new Error('Time-course template requires at least one time point.')\n }\n if (!Array.isArray(data.conditions) || data.conditions.length === 0) {\n throw new Error('Time-course template requires at least one condition.')\n }\n const timepointIds = new Set(data.timepoints.map(timepoint => timepoint.id))\n if (timepointIds.size !== data.timepoints.length) {\n throw new Error('Time-course time point ids must be unique.')\n }\n const conditionIds = new Set(data.conditions.map(condition => condition.id))\n if (conditionIds.size !== data.conditions.length) {\n throw new Error('Time-course condition ids must be unique.')\n }\n const sampleIds = new Set(data.samples.map(sample => sample.sampleId))\n if (sampleIds.size !== data.samples.length) {\n throw new Error('Time-course sample ids must be unique.')\n }\n for (const sample of data.samples) {\n if (!timepointIds.has(sample.timepointId)) {\n throw new Error(`Sample '${sample.sampleId}' references unknown time point.`)\n }\n if (!conditionIds.has(sample.conditionId)) {\n throw new Error(`Sample '${sample.sampleId}' references unknown condition.`)\n }\n }\n}\n\nexport function validateProtocolStepsData(data: ProtocolStepsTemplateData): void {\n if (!Array.isArray(data.steps) || data.steps.length === 0) {\n throw new Error('Protocol-steps template requires at least one step.')\n }\n const stepIds = new Set(data.steps.map(step => step.id))\n if (stepIds.size !== data.steps.length) {\n throw new Error('Protocol-steps ids must be unique.')\n }\n const orders = new Set(data.steps.map(step => step.order))\n if (orders.size !== data.steps.length) {\n throw new Error('Protocol-steps orders must be unique.')\n }\n for (const step of data.steps) {\n if (!step.id) {\n throw new Error('Protocol step id is required.')\n }\n if (!step.name) {\n throw new Error(`Protocol step '${step.id}' requires a name.`)\n }\n if (step.duration !== undefined && step.duration < 0) {\n throw new Error(`Protocol step '${step.id}' has a negative duration.`)\n }\n if (step.order < 0) {\n throw new Error(`Protocol step '${step.id}' has a negative order.`)\n }\n }\n}\n\nexport function validateAssayMatrixData(data: AssayMatrixTemplateData): void {\n if (!Array.isArray(data.samples) || data.samples.length === 0) {\n throw new Error('Assay-matrix template requires at least one sample.')\n }\n if (!Array.isArray(data.features) || data.features.length === 0) {\n throw new Error('Assay-matrix template requires at least one feature.')\n }\n const sampleIds = new Set(data.samples.map(sample => sample.sampleId))\n if (sampleIds.size !== data.samples.length) {\n throw new Error('Assay-matrix sample ids must be unique.')\n }\n const featureIds = new Set(data.features.map(feature => feature.id))\n if (featureIds.size !== data.features.length) {\n throw new Error('Assay-matrix feature ids must be unique.')\n }\n const measurementIds = new Set<string>()\n for (const measurement of data.measurements) {\n const key = `${measurement.sampleId}:${measurement.featureId}`\n if (measurementIds.has(key)) {\n throw new Error(`Duplicate assay measurement for '${key}'.`)\n }\n measurementIds.add(key)\n if (!sampleIds.has(measurement.sampleId)) {\n throw new Error(`Measurement references unknown sample '${measurement.sampleId}'.`)\n }\n if (!featureIds.has(measurement.featureId)) {\n throw new Error(`Measurement references unknown feature '${measurement.featureId}'.`)\n }\n }\n}\n\nexport function validateReagentListData(data: ReagentListTemplateData): void {\n if (!Array.isArray(data.reagents) || data.reagents.length === 0) {\n throw new Error('Reagent-list template requires at least one reagent.')\n }\n const reagentIds = new Set(data.reagents.map(reagent => reagent.id))\n if (reagentIds.size !== data.reagents.length) {\n throw new Error('Reagent-list reagent ids must be unique.')\n }\n for (const reagent of data.reagents) {\n if (!reagent.id) {\n throw new Error('Reagent-list reagent id is required.')\n }\n if (!reagent.name) {\n throw new Error(`Reagent '${reagent.id}' requires a name.`)\n }\n if (reagent.stockLevel !== undefined && reagent.stockLevel < 0) {\n throw new Error(`Reagent '${reagent.id}' has a negative stock level.`)\n }\n }\n}\n\nexport function validateFlowCytometryPanelData(data: FlowCytometryPanelTemplateData): void {\n if (!Array.isArray(data.markers) || data.markers.length === 0) {\n throw new Error('Flow-cytometry panel template requires at least one marker.')\n }\n const markerIds = new Set(data.markers.map(marker => marker.id))\n if (markerIds.size !== data.markers.length) {\n throw new Error('Flow-cytometry panel marker ids must be unique.')\n }\n const controlIds = new Set(data.controls.map(control => control.id))\n if (controlIds.size !== data.controls.length) {\n throw new Error('Flow-cytometry panel control ids must be unique.')\n }\n for (const marker of data.markers) {\n if (!marker.id) {\n throw new Error('Flow-cytometry panel marker id is required.')\n }\n if (!marker.marker) {\n throw new Error(`Flow-cytometry panel marker '${marker.id}' requires a marker name.`)\n }\n }\n for (const control of data.controls) {\n if (!control.id) {\n throw new Error('Flow-cytometry panel control id is required.')\n }\n if (!control.name) {\n throw new Error(`Flow-cytometry panel control '${control.id}' requires a name.`)\n }\n if (control.markerId && !markerIds.has(control.markerId)) {\n throw new Error(`Flow-cytometry panel control '${control.id}' references unknown marker '${control.markerId}'.`)\n }\n }\n}\n\nexport function validateInstrumentRunData(data: InstrumentRunTemplateData): void {\n if (!Array.isArray(data.methods) || data.methods.length === 0) {\n throw new Error('Instrument-run template requires at least one method.')\n }\n if (!Array.isArray(data.items) || data.items.length === 0) {\n throw new Error('Instrument-run template requires at least one run item.')\n }\n const methodIds = new Set(data.methods.map(method => method.id))\n if (methodIds.size !== data.methods.length) {\n throw new Error('Instrument-run method ids must be unique.')\n }\n for (const method of data.methods) {\n if (!method.id || !method.name) {\n throw new Error('Instrument-run methods require id and name.')\n }\n }\n const itemIds = new Set(data.items.map(item => item.id))\n if (itemIds.size !== data.items.length) {\n throw new Error('Instrument-run item ids must be unique.')\n }\n const orders = new Set(data.items.map(item => item.order))\n if (orders.size !== data.items.length) {\n throw new Error('Instrument-run item orders must be unique.')\n }\n for (const item of data.items) {\n if (!item.id) {\n throw new Error('Instrument-run items require id.')\n }\n if (!methodIds.has(item.methodId)) {\n throw new Error(`Instrument-run item '${item.id}' references unknown method '${item.methodId}'.`)\n }\n if (item.kind === 'sample' && !item.sampleId) {\n throw new Error(`Instrument-run sample item '${item.id}' requires sampleId.`)\n }\n if (item.order < 0) {\n throw new Error(`Instrument-run item '${item.id}' has a negative order.`)\n }\n if (item.injectionVolume !== undefined && item.injectionVolume < 0) {\n throw new Error(`Instrument-run item '${item.id}' has a negative injection volume.`)\n }\n if (item.expectedDurationMin !== undefined && item.expectedDurationMin < 0) {\n throw new Error(`Instrument-run item '${item.id}' has a negative expected duration.`)\n }\n }\n}\n\nexport function validateQpcrPlateData(data: QpcrPlateTemplateData): void {\n if (!Array.isArray(data.samples) || data.samples.length === 0) {\n throw new Error('qPCR plate template requires at least one sample.')\n }\n if (!Array.isArray(data.targets) || data.targets.length === 0) {\n throw new Error('qPCR plate template requires at least one target.')\n }\n if (!Array.isArray(data.reactions) || data.reactions.length === 0) {\n throw new Error('qPCR plate template requires at least one reaction.')\n }\n const sampleIds = new Set(data.samples.map(sample => sample.sampleId))\n if (sampleIds.size !== data.samples.length) {\n throw new Error('qPCR plate sample ids must be unique.')\n }\n const targetIds = new Set(data.targets.map(target => target.id))\n if (targetIds.size !== data.targets.length) {\n throw new Error('qPCR plate target ids must be unique.')\n }\n const reactionIds = new Set(data.reactions.map(reaction => reaction.id))\n if (reactionIds.size !== data.reactions.length) {\n throw new Error('qPCR plate reaction ids must be unique.')\n }\n const wellIds = new Set(data.reactions.map(reaction => reaction.wellId))\n if (wellIds.size !== data.reactions.length) {\n throw new Error('qPCR plate reaction wells must be unique.')\n }\n for (const reaction of data.reactions) {\n assertWellInFormat(reaction.wellId, data.format)\n if (!reaction.id) {\n throw new Error('qPCR reaction id is required.')\n }\n if (!reaction.targetId || !targetIds.has(reaction.targetId)) {\n throw new Error(`qPCR reaction '${reaction.id}' references unknown target '${reaction.targetId}'.`)\n }\n if (reaction.sampleId && !sampleIds.has(reaction.sampleId)) {\n throw new Error(`qPCR reaction '${reaction.id}' references unknown sample '${reaction.sampleId}'.`)\n }\n if (reaction.controlKind === 'sample' && !reaction.sampleId) {\n throw new Error(`qPCR sample reaction '${reaction.id}' requires sampleId.`)\n }\n if (reaction.replicate < 1) {\n throw new Error(`qPCR reaction '${reaction.id}' replicate must be at least 1.`)\n }\n if (reaction.cq !== undefined && reaction.cq !== null && reaction.cq < 0) {\n throw new Error(`qPCR reaction '${reaction.id}' has a negative Cq.`)\n }\n if (reaction.quantity !== undefined && reaction.quantity !== null && reaction.quantity < 0) {\n throw new Error(`qPCR reaction '${reaction.id}' has a negative quantity.`)\n }\n }\n}\n","import type { SelectOption } from '../types'\nimport { getTemplateData } from './templateEnvelopes'\nimport { validateAssayMatrixData } from './templateValidators'\nimport type {\n AssayMatrixColumnsAdapterResult,\n AssayMatrixDataFrameAdapterResult,\n AssayMatrixRowsAdapterResult,\n AssayMatrixSampleOptionsAdapterResult,\n AssayMatrixTemplate,\n AssayMatrixTemplateData,\n} from './types'\n\nexport function toAssayMatrixRows(\n template: AssayMatrixTemplate | AssayMatrixTemplateData\n): AssayMatrixRowsAdapterResult {\n const data = getTemplateData(template, 'assay-matrix')\n validateAssayMatrixData(data)\n const measurements = new Map(\n data.measurements.map(measurement => [\n `${measurement.sampleId}:${measurement.featureId}`,\n measurement.value ?? null,\n ])\n )\n\n return data.samples.map(sample => {\n const row: Record<string, unknown> = {\n sampleId: sample.sampleId,\n name: sample.name,\n group: sample.group,\n ...(sample.metadata ?? {}),\n }\n for (const feature of data.features) {\n row[feature.id] = measurements.get(`${sample.sampleId}:${feature.id}`) ?? null\n }\n return row\n })\n}\n\nexport function toAssayMatrixColumns(\n template: AssayMatrixTemplate | AssayMatrixTemplateData\n): AssayMatrixColumnsAdapterResult {\n const data = getTemplateData(template, 'assay-matrix')\n validateAssayMatrixData(data)\n return [\n { key: 'sampleId', label: 'Sample ID', sortable: true },\n { key: 'name', label: 'Name', sortable: true },\n { key: 'group', label: 'Group', sortable: true },\n ...data.features.map(feature => ({\n key: feature.id,\n label: feature.unit ? `${feature.name} (${feature.unit})` : feature.name,\n sortable: true,\n align: 'right' as const,\n })),\n ]\n}\n\nexport function toAssayMatrixDataFrame(\n template: AssayMatrixTemplate | AssayMatrixTemplateData\n): AssayMatrixDataFrameAdapterResult {\n return {\n data: toAssayMatrixRows(template),\n columns: toAssayMatrixColumns(template),\n rowKey: 'sampleId',\n }\n}\n\n/** Convert an assay-matrix template into SampleSelector options derived from assay samples. */\nexport function toAssayMatrixSampleOptions(\n template: AssayMatrixTemplate | AssayMatrixTemplateData\n): AssayMatrixSampleOptionsAdapterResult {\n const data = getTemplateData(template, 'assay-matrix')\n validateAssayMatrixData(data)\n return data.samples.map((sample): SelectOption<string> => ({\n value: sample.sampleId,\n label: sample.name ?? sample.sampleId,\n description: sample.group,\n }))\n}\n","import { getTemplateData } from './templateEnvelopes'\nimport { validateCalibrationCurveData } from './templateValidators'\nimport type {\n CalibrationCurveColumnsAdapterResult,\n CalibrationCurveDataFrameAdapterResult,\n CalibrationCurveRowsAdapterResult,\n CalibrationCurveTemplate,\n CalibrationCurveTemplateData,\n} from './types'\n\nexport function toCalibrationCurveRows(\n template: CalibrationCurveTemplate | CalibrationCurveTemplateData\n): CalibrationCurveRowsAdapterResult {\n const data = getTemplateData(template, 'calibration-curve')\n validateCalibrationCurveData(data)\n return [...data.points]\n .sort((a, b) => a.order - b.order)\n .map(point => ({\n id: point.id,\n order: point.order,\n role: point.role,\n level: point.level,\n concentration: point.concentration,\n unit: point.unit,\n expectedResponse: point.expectedResponse,\n response: point.response,\n replicate: point.replicate,\n include: point.include,\n status: point.status,\n analyte: data.analyte,\n model: data.model,\n ...(point.metadata ?? {}),\n }))\n}\n\nexport function toCalibrationCurveColumns(): CalibrationCurveColumnsAdapterResult {\n return [\n { key: 'order', label: 'Order', sortable: true, align: 'right' },\n { key: 'role', label: 'Role', sortable: true },\n { key: 'level', label: 'Level', sortable: true },\n { key: 'concentration', label: 'Concentration', sortable: true, align: 'right' },\n { key: 'unit', label: 'Unit', sortable: true },\n { key: 'expectedResponse', label: 'Expected', sortable: true, align: 'right' },\n { key: 'response', label: 'Response', sortable: true, align: 'right' },\n { key: 'replicate', label: 'Replicate', sortable: true, align: 'right' },\n { key: 'include', label: 'Include', sortable: true },\n { key: 'status', label: 'Status', sortable: true },\n ]\n}\n\nexport function toCalibrationCurveDataFrame(\n template: CalibrationCurveTemplate | CalibrationCurveTemplateData\n): CalibrationCurveDataFrameAdapterResult {\n return {\n data: toCalibrationCurveRows(template),\n columns: toCalibrationCurveColumns(),\n rowKey: 'id',\n }\n}\n","import { getTemplateData } from './templateEnvelopes'\nimport { validateFlowCytometryPanelData } from './templateValidators'\nimport type {\n FlowCytometryPanelTemplate,\n FlowCytometryPanelTemplateData,\n FlowPanelColumnsAdapterResult,\n FlowPanelDataFrameAdapterResult,\n FlowPanelRowsAdapterResult,\n} from './types'\n\nexport function toFlowPanelRows(\n template: FlowCytometryPanelTemplate | FlowCytometryPanelTemplateData\n): FlowPanelRowsAdapterResult {\n const data = getTemplateData(template, 'flow-cytometry-panel')\n validateFlowCytometryPanelData(data)\n return data.markers.map(marker => {\n const markerControls = data.controls\n .filter(control => control.markerId === marker.id)\n .map(control => control.name)\n .join(', ')\n return {\n id: marker.id,\n marker: marker.marker,\n fluorophore: marker.fluorophore,\n detector: marker.detector,\n clone: marker.clone,\n reagentId: marker.reagentId,\n purpose: marker.purpose,\n compensationRequired: marker.compensationRequired,\n controls: markerControls,\n instrument: data.instrument,\n ...(marker.metadata ?? {}),\n }\n })\n}\n\nexport function toFlowPanelColumns(): FlowPanelColumnsAdapterResult {\n return [\n { key: 'marker', label: 'Marker', sortable: true },\n { key: 'fluorophore', label: 'Fluorophore', sortable: true },\n { key: 'detector', label: 'Detector', sortable: true },\n { key: 'clone', label: 'Clone', sortable: true },\n { key: 'purpose', label: 'Purpose', sortable: true },\n { key: 'compensationRequired', label: 'Compensation', sortable: true },\n { key: 'controls', label: 'Controls' },\n { key: 'instrument', label: 'Instrument', sortable: true },\n ]\n}\n\nexport function toFlowPanelDataFrame(\n template: FlowCytometryPanelTemplate | FlowCytometryPanelTemplateData\n): FlowPanelDataFrameAdapterResult {\n return {\n data: toFlowPanelRows(template),\n columns: toFlowPanelColumns(),\n rowKey: 'id',\n }\n}\n","import type {\n ProtocolStepStatus,\n ProtocolStepType,\n ScheduleEventStatus,\n} from '../types'\nimport type {\n InstrumentRunItem,\n InstrumentRunItemKind,\n InstrumentRunStatus,\n} from './types'\n\nexport function instrumentRunStepType(kind: InstrumentRunItemKind): ProtocolStepType {\n switch (kind) {\n case 'wash':\n return 'wash'\n case 'blank':\n case 'qc':\n case 'standard':\n case 'calibration':\n case 'sample':\n return 'measurement'\n default:\n return 'custom'\n }\n}\n\nexport function instrumentRunStepStatus(status: InstrumentRunStatus): ProtocolStepStatus {\n switch (status) {\n case 'running':\n return 'in_progress'\n case 'completed':\n return 'completed'\n case 'failed':\n return 'failed'\n case 'skipped':\n return 'skipped'\n case 'planned':\n case 'queued':\n default:\n return 'pending'\n }\n}\n\nexport function instrumentRunScheduleStatus(status: InstrumentRunStatus): ScheduleEventStatus {\n switch (status) {\n case 'running':\n return 'in-progress'\n case 'completed':\n return 'confirmed'\n case 'failed':\n case 'skipped':\n return 'cancelled'\n case 'planned':\n case 'queued':\n default:\n return 'pending'\n }\n}\n\nexport function instrumentRunScheduleColor(kind: InstrumentRunItem['kind']): string {\n switch (kind) {\n case 'blank':\n return '#64748b'\n case 'qc':\n return '#8b5cf6'\n case 'standard':\n case 'calibration':\n return '#f59e0b'\n case 'wash':\n return '#06b6d4'\n case 'sample':\n return '#2563eb'\n default:\n return '#475569'\n }\n}\n\nexport function dateFromMetadata(\n metadata: Record<string, unknown> | undefined,\n keys: readonly string[]\n): Date | undefined {\n if (!metadata) return undefined\n for (const key of keys) {\n const value = metadata[key]\n if (!(typeof value === 'string' || value instanceof Date)) continue\n const date = new Date(value)\n if (!Number.isNaN(date.getTime())) return date\n }\n return undefined\n}\n\nexport function addMinutes(date: Date, minutes: number): Date {\n return new Date(date.getTime() + minutes * 60_000)\n}\n","import type {\n ProtocolStep,\n ScheduleEvent,\n} from '../types'\nimport { getTemplateData } from './templateEnvelopes'\nimport { validateInstrumentRunData } from './templateValidators'\nimport type {\n InstrumentRunColumnsAdapterResult,\n InstrumentRunDataFrameAdapterResult,\n InstrumentRunRowsAdapterResult,\n InstrumentRunScheduleEventsAdapterResult,\n InstrumentRunStepsAdapterResult,\n InstrumentRunTemplate,\n InstrumentRunTemplateData,\n} from './types'\nimport {\n addMinutes,\n dateFromMetadata,\n instrumentRunScheduleColor,\n instrumentRunScheduleStatus,\n instrumentRunStepStatus,\n instrumentRunStepType,\n} from './instrumentRunAdapterHelpers'\n\nexport function toInstrumentRunRows(\n template: InstrumentRunTemplate | InstrumentRunTemplateData\n): InstrumentRunRowsAdapterResult {\n const data = getTemplateData(template, 'instrument-run')\n validateInstrumentRunData(data)\n const methods = new Map(data.methods.map(method => [method.id, method]))\n return [...data.items]\n .sort((a, b) => a.order - b.order)\n .map(item => {\n const method = methods.get(item.methodId)\n return {\n id: item.id,\n order: item.order,\n kind: item.kind,\n sampleId: item.sampleId,\n name: item.name ?? item.sampleId ?? item.kind,\n method: method?.name ?? item.methodId,\n vial: item.vial,\n plateId: item.plateId,\n wellId: item.wellId,\n injectionVolume: item.injectionVolume,\n expectedDurationMin: item.expectedDurationMin,\n status: item.status,\n instrument: data.instrument ?? method?.instrument,\n ...(item.metadata ?? {}),\n }\n })\n}\n\nexport function toInstrumentRunColumns(): InstrumentRunColumnsAdapterResult {\n return [\n { key: 'order', label: 'Order', sortable: true, align: 'right' },\n { key: 'kind', label: 'Kind', sortable: true },\n { key: 'sampleId', label: 'Sample ID', sortable: true },\n { key: 'name', label: 'Name', sortable: true },\n { key: 'method', label: 'Method', sortable: true },\n { key: 'vial', label: 'Vial', sortable: true },\n { key: 'wellId', label: 'Well', sortable: true },\n { key: 'injectionVolume', label: 'Injection', sortable: true, align: 'right' },\n { key: 'expectedDurationMin', label: 'Duration', sortable: true, align: 'right' },\n { key: 'status', label: 'Status', sortable: true },\n { key: 'instrument', label: 'Instrument', sortable: true },\n ]\n}\n\nexport function toInstrumentRunDataFrame(\n template: InstrumentRunTemplate | InstrumentRunTemplateData\n): InstrumentRunDataFrameAdapterResult {\n return {\n data: toInstrumentRunRows(template),\n columns: toInstrumentRunColumns(),\n rowKey: 'id',\n }\n}\n\n/** Convert an instrument-run template into ExperimentTimeline protocol steps for acquisition queue previews. */\nexport function toInstrumentRunSteps(\n template: InstrumentRunTemplate | InstrumentRunTemplateData\n): InstrumentRunStepsAdapterResult {\n const data = getTemplateData(template, 'instrument-run')\n validateInstrumentRunData(data)\n const methods = new Map(data.methods.map(method => [method.id, method]))\n return [...data.items]\n .sort((a, b) => a.order - b.order)\n .map((item): ProtocolStep => {\n const method = methods.get(item.methodId)\n const name = item.name ?? item.sampleId ?? item.kind\n return {\n id: item.id,\n type: instrumentRunStepType(item.kind),\n name,\n description: [\n item.kind,\n method?.name,\n item.vial ? `Vial ${item.vial}` : undefined,\n item.wellId ? `Well ${item.wellId}` : undefined,\n ]\n .filter(Boolean)\n .join(' / '),\n duration: item.expectedDurationMin,\n status: instrumentRunStepStatus(item.status),\n parameters: {\n kind: item.kind,\n sampleId: item.sampleId,\n methodId: item.methodId,\n method: method?.name,\n vial: item.vial,\n plateId: item.plateId,\n wellId: item.wellId,\n injectionVolume: item.injectionVolume,\n instrument: data.instrument ?? method?.instrument,\n },\n order: item.order,\n }\n })\n}\n\n/** Convert an instrument-run template into readonly ScheduleCalendar events ordered by run queue timing. */\nexport function toInstrumentRunScheduleEvents(\n template: InstrumentRunTemplate | InstrumentRunTemplateData\n): InstrumentRunScheduleEventsAdapterResult {\n const data = getTemplateData(template, 'instrument-run')\n validateInstrumentRunData(data)\n const methods = new Map(data.methods.map(method => [method.id, method]))\n let cursor = dateFromMetadata(data.metadata, ['scheduledStart', 'runStart', 'start', 'startedAt'])\n ?? new Date('2024-01-01T08:00:00.000Z')\n\n return [...data.items]\n .sort((a, b) => a.order - b.order)\n .map((item): ScheduleEvent => {\n const method = methods.get(item.methodId)\n const start = dateFromMetadata(item.metadata, ['scheduledStart', 'start', 'startedAt']) ?? cursor\n const end = dateFromMetadata(item.metadata, ['scheduledEnd', 'end', 'completedAt'])\n ?? addMinutes(start, Math.max(item.expectedDurationMin ?? 10, 1))\n cursor = end\n\n return {\n id: item.id,\n title: item.name ?? item.sampleId ?? item.kind,\n start: start.toISOString(),\n end: end.toISOString(),\n color: instrumentRunScheduleColor(item.kind),\n status: instrumentRunScheduleStatus(item.status),\n draggable: false,\n resizable: false,\n metadata: {\n kind: item.kind,\n sampleId: item.sampleId,\n methodId: item.methodId,\n method: method?.name,\n vial: item.vial,\n plateId: item.plateId,\n wellId: item.wellId,\n injectionVolume: item.injectionVolume,\n instrument: data.instrument ?? method?.instrument,\n },\n }\n })\n}\n","import { getTemplateData } from './templateEnvelopes'\nimport { validateProtocolStepsData } from './templateValidators'\nimport type {\n ProtocolColumnsAdapterResult,\n ProtocolDataFrameAdapterResult,\n ProtocolRowsAdapterResult,\n ProtocolStepsAdapterResult,\n ProtocolStepsTemplate,\n ProtocolStepsTemplateData,\n} from './types'\n\nexport function toProtocolSteps(\n template: ProtocolStepsTemplate | ProtocolStepsTemplateData\n): ProtocolStepsAdapterResult {\n const data = getTemplateData(template, 'protocol-steps')\n validateProtocolStepsData(data)\n return [...data.steps]\n .sort((a, b) => a.order - b.order)\n .map(step => ({\n id: step.id,\n type: step.type,\n name: step.name,\n description: step.description,\n duration: step.duration,\n status: step.status,\n parameters: step.parameters,\n order: step.order,\n }))\n}\n\nexport function toProtocolRows(\n template: ProtocolStepsTemplate | ProtocolStepsTemplateData\n): ProtocolRowsAdapterResult {\n const data = getTemplateData(template, 'protocol-steps')\n validateProtocolStepsData(data)\n return [...data.steps]\n .sort((a, b) => a.order - b.order)\n .map(step => ({\n id: step.id,\n order: step.order,\n type: step.type,\n name: step.name,\n description: step.description,\n duration: step.duration,\n status: step.status,\n ...(step.metadata ?? {}),\n }))\n}\n\nexport function toProtocolColumns(): ProtocolColumnsAdapterResult {\n return [\n { key: 'order', label: 'Order', sortable: true, align: 'right' },\n { key: 'name', label: 'Name', sortable: true },\n { key: 'type', label: 'Type', sortable: true },\n { key: 'duration', label: 'Duration', sortable: true, align: 'right' },\n { key: 'status', label: 'Status', sortable: true },\n { key: 'description', label: 'Description', sortable: true },\n ]\n}\n\nexport function toProtocolDataFrame(\n template: ProtocolStepsTemplate | ProtocolStepsTemplateData\n): ProtocolDataFrameAdapterResult {\n return {\n data: toProtocolRows(template),\n columns: toProtocolColumns(),\n rowKey: 'id',\n }\n}\n","import type { Well } from '../types'\nimport { getTemplateData } from './templateEnvelopes'\nimport { validateQpcrPlateData } from './templateValidators'\nimport type {\n QpcrColumnsAdapterResult,\n QpcrDataFrameAdapterResult,\n QpcrPlateTemplate,\n QpcrPlateTemplateData,\n QpcrRowsAdapterResult,\n QpcrWellMapAdapterResult,\n} from './types'\n\nexport function toQpcrRows(\n template: QpcrPlateTemplate | QpcrPlateTemplateData\n): QpcrRowsAdapterResult {\n const data = getTemplateData(template, 'qpcr-plate')\n validateQpcrPlateData(data)\n const samples = new Map(data.samples.map(sample => [sample.sampleId, sample]))\n const targets = new Map(data.targets.map(target => [target.id, target]))\n\n return data.reactions.map(reaction => {\n const sample = reaction.sampleId ? samples.get(reaction.sampleId) : undefined\n const target = targets.get(reaction.targetId)\n return {\n id: reaction.id,\n wellId: reaction.wellId,\n sampleId: reaction.sampleId,\n sample: sample?.name ?? reaction.sampleId ?? reaction.controlKind,\n group: sample?.group,\n targetId: reaction.targetId,\n target: target?.name ?? reaction.targetId,\n replicate: reaction.replicate,\n controlKind: reaction.controlKind,\n cq: reaction.cq ?? null,\n quantity: reaction.quantity ?? null,\n flags: reaction.flags.join(', '),\n instrument: data.instrument,\n chemistry: data.chemistry,\n ...(reaction.metadata ?? {}),\n }\n })\n}\n\nexport function toQpcrColumns(): QpcrColumnsAdapterResult {\n return [\n { key: 'wellId', label: 'Well', sortable: true },\n { key: 'sample', label: 'Sample', sortable: true },\n { key: 'group', label: 'Group', sortable: true },\n { key: 'target', label: 'Target', sortable: true },\n { key: 'replicate', label: 'Replicate', sortable: true, align: 'right' },\n { key: 'controlKind', label: 'Control', sortable: true },\n { key: 'cq', label: 'Cq', sortable: true, align: 'right' },\n { key: 'quantity', label: 'Quantity', sortable: true, align: 'right' },\n { key: 'flags', label: 'Flags' },\n ]\n}\n\nexport function toQpcrDataFrame(\n template: QpcrPlateTemplate | QpcrPlateTemplateData\n): QpcrDataFrameAdapterResult {\n return {\n data: toQpcrRows(template),\n columns: toQpcrColumns(),\n rowKey: 'id',\n }\n}\n\nexport function toQpcrWellPlateWells(\n template: QpcrPlateTemplate | QpcrPlateTemplateData\n): QpcrWellMapAdapterResult {\n const data = getTemplateData(template, 'qpcr-plate')\n validateQpcrPlateData(data)\n return Object.fromEntries(data.reactions.map(reaction => {\n const [row, col] = wellPositionFromId(reaction.wellId)\n return [\n reaction.wellId,\n {\n id: reaction.wellId,\n row,\n col,\n state: 'filled' as const,\n sampleType: reaction.sampleId ?? reaction.controlKind,\n value: reaction.cq ?? undefined,\n metadata: {\n reactionId: reaction.id,\n sampleId: reaction.sampleId,\n targetId: reaction.targetId,\n replicate: reaction.replicate,\n controlKind: reaction.controlKind,\n },\n } satisfies Well,\n ]\n }))\n}\n\nfunction wellPositionFromId(wellId: string): [number, number] {\n const match = /^([A-Z]+)([1-9][0-9]*)$/.exec(wellId.toUpperCase())\n if (!match) {\n throw new Error(`Invalid well id '${wellId}'.`)\n }\n const row = [...match[1]].reduce((value, char) => value * 26 + char.charCodeAt(0) - 64, 0) - 1\n const col = Number(match[2]) - 1\n return [row, col]\n}\n","import { getTemplateData } from './templateEnvelopes'\nimport { validateReagentListData } from './templateValidators'\nimport type {\n ReagentColumnsAdapterResult,\n ReagentDataFrameAdapterResult,\n ReagentListItemsAdapterResult,\n ReagentListTemplate,\n ReagentListTemplateData,\n ReagentRowsAdapterResult,\n} from './types'\n\nexport function toReagentListItems(\n template: ReagentListTemplate | ReagentListTemplateData\n): ReagentListItemsAdapterResult {\n const data = getTemplateData(template, 'reagent-list')\n validateReagentListData(data)\n return data.reagents.map(reagent => ({\n id: reagent.id,\n name: reagent.name,\n catalogNumber: reagent.catalogNumber,\n lotNumber: reagent.lotNumber,\n expiryDate: reagent.expiryDate,\n storageCondition: reagent.storageCondition,\n location: reagent.location,\n stockLevel: reagent.stockLevel,\n stockUnit: reagent.stockUnit,\n supplier: reagent.supplier,\n url: reagent.url,\n }))\n}\n\nexport function toReagentRows(\n template: ReagentListTemplate | ReagentListTemplateData\n): ReagentRowsAdapterResult {\n const data = getTemplateData(template, 'reagent-list')\n validateReagentListData(data)\n return data.reagents.map(reagent => ({\n id: reagent.id,\n name: reagent.name,\n kind: reagent.kind,\n catalogNumber: reagent.catalogNumber,\n lotNumber: reagent.lotNumber,\n expiryDate: reagent.expiryDate,\n storageCondition: reagent.storageCondition,\n location: reagent.location,\n stockLevel: reagent.stockLevel,\n stockUnit: reagent.stockUnit,\n supplier: reagent.supplier,\n concentration: reagent.concentration,\n ...(reagent.metadata ?? {}),\n }))\n}\n\nexport function toReagentColumns(): ReagentColumnsAdapterResult {\n return [\n { key: 'name', label: 'Name', sortable: true },\n { key: 'kind', label: 'Kind', sortable: true },\n { key: 'catalogNumber', label: 'Catalog', sortable: true },\n { key: 'lotNumber', label: 'Lot', sortable: true },\n { key: 'expiryDate', label: 'Expiry', sortable: true },\n { key: 'storageCondition', label: 'Storage', sortable: true },\n { key: 'location', label: 'Location', sortable: true },\n { key: 'stockLevel', label: 'Stock', sortable: true, align: 'right' },\n { key: 'stockUnit', label: 'Unit', sortable: true },\n { key: 'supplier', label: 'Supplier', sortable: true },\n ]\n}\n\nexport function toReagentDataFrame(\n template: ReagentListTemplate | ReagentListTemplateData\n): ReagentDataFrameAdapterResult {\n return {\n data: toReagentRows(template),\n columns: toReagentColumns(),\n rowKey: 'id',\n }\n}\n","import { getTemplateData } from './templateEnvelopes'\nimport { validateSamplePrepData } from './templateValidators'\nimport type {\n SamplePrepColumnsAdapterResult,\n SamplePrepDataFrameAdapterResult,\n SamplePrepRowsAdapterResult,\n SamplePrepTemplate,\n SamplePrepTemplateData,\n} from './types'\n\nexport function toSamplePrepRows(\n template: SamplePrepTemplate | SamplePrepTemplateData\n): SamplePrepRowsAdapterResult {\n const data = getTemplateData(template, 'sample-prep')\n validateSamplePrepData(data)\n return [...data.steps]\n .sort((a, b) => a.order - b.order)\n .map(step => ({\n id: step.id,\n order: step.order,\n type: step.type,\n name: step.name,\n sourceSampleId: step.sourceSampleId,\n sourceWellId: step.sourceWellId,\n destinationSampleId: step.destinationSampleId,\n destinationWellId: step.destinationWellId,\n reagentId: step.reagentId,\n inputVolume: step.inputVolume,\n outputVolume: step.outputVolume,\n volumeUnit: step.volumeUnit,\n durationMin: step.durationMin,\n status: step.status,\n protocolName: data.protocolName,\n ...(step.metadata ?? {}),\n }))\n}\n\nexport function toSamplePrepColumns(): SamplePrepColumnsAdapterResult {\n return [\n { key: 'order', label: 'Order', sortable: true, align: 'right' },\n { key: 'type', label: 'Type', sortable: true },\n { key: 'name', label: 'Step', sortable: true },\n { key: 'sourceSampleId', label: 'Source', sortable: true },\n { key: 'sourceWellId', label: 'Source well', sortable: true },\n { key: 'destinationSampleId', label: 'Destination', sortable: true },\n { key: 'destinationWellId', label: 'Destination well', sortable: true },\n { key: 'reagentId', label: 'Reagent', sortable: true },\n { key: 'inputVolume', label: 'Input', sortable: true, align: 'right' },\n { key: 'outputVolume', label: 'Output', sortable: true, align: 'right' },\n { key: 'volumeUnit', label: 'Unit', sortable: true },\n { key: 'status', label: 'Status', sortable: true },\n ]\n}\n\nexport function toSamplePrepDataFrame(\n template: SamplePrepTemplate | SamplePrepTemplateData\n): SamplePrepDataFrameAdapterResult {\n return {\n data: toSamplePrepRows(template),\n columns: toSamplePrepColumns(),\n rowKey: 'id',\n }\n}\n","import type {\n DataFrameColumn,\n SelectOption,\n} from '../types'\nimport { getTemplateData } from './templateEnvelopes'\nimport { validateSampleSheetData } from './templateValidators'\nimport type {\n SampleColumnsAdapterResult,\n SampleDataFrameAdapterResult,\n SampleOptionsAdapterResult,\n SampleRowsAdapterResult,\n SampleSheetTemplate,\n SampleSheetTemplateData,\n} from './types'\n\nexport function toSampleRows(\n template: SampleSheetTemplate | SampleSheetTemplateData\n): SampleRowsAdapterResult {\n const data = getTemplateData(template, 'sample-sheet')\n validateSampleSheetData(data)\n return data.samples.map(sample => ({\n sampleId: sample.sampleId,\n name: sample.name,\n group: sample.group,\n batch: sample.batch,\n replicate: sample.replicate,\n plateId: sample.plateId,\n wellId: sample.wellId,\n ...(sample.metadata ?? {}),\n }))\n}\n\nexport function toSampleColumns(\n template: SampleSheetTemplate | SampleSheetTemplateData\n): SampleColumnsAdapterResult {\n const data = getTemplateData(template, 'sample-sheet')\n validateSampleSheetData(data)\n return data.columns.map((column): DataFrameColumn<Record<string, unknown>> => ({\n key: sampleColumnKey(column.id),\n label: column.label,\n sortable: true,\n align: column.type === 'number' || column.type === 'integer' ? 'right' : 'left',\n }))\n}\n\nexport function toSampleDataFrame(\n template: SampleSheetTemplate | SampleSheetTemplateData\n): SampleDataFrameAdapterResult {\n return {\n data: toSampleRows(template),\n columns: toSampleColumns(template),\n rowKey: 'sampleId',\n }\n}\n\nexport function toSampleOptions(\n template: SampleSheetTemplate | SampleSheetTemplateData\n): SampleOptionsAdapterResult {\n const data = getTemplateData(template, 'sample-sheet')\n validateSampleSheetData(data)\n return data.samples.map((sample): SelectOption<string> => ({\n value: sample.sampleId,\n label: sample.name ?? sample.sampleId,\n description: [sample.group, sample.batch].filter(Boolean).join(' / ') || undefined,\n }))\n}\n\nfunction sampleColumnKey(columnId: string): string {\n const aliases: Record<string, string> = {\n sample_id: 'sampleId',\n plate_id: 'plateId',\n well_id: 'wellId',\n }\n return aliases[columnId] ?? columnId\n}\n","import { getTemplateData } from './templateEnvelopes'\nimport { validateTimeCourseData } from './templateValidators'\nimport type {\n TimeCourseColumnsAdapterResult,\n TimeCourseDataFrameAdapterResult,\n TimeCourseRowsAdapterResult,\n TimeCourseStepsAdapterResult,\n TimeCourseTemplate,\n TimeCourseTemplateData,\n} from './types'\n\nexport function toTimeCourseRows(\n template: TimeCourseTemplate | TimeCourseTemplateData\n): TimeCourseRowsAdapterResult {\n const data = getTemplateData(template, 'time-course')\n validateTimeCourseData(data)\n const timepoints = new Map(data.timepoints.map(timepoint => [timepoint.id, timepoint]))\n const conditions = new Map(data.conditions.map(condition => [condition.id, condition]))\n\n return data.samples.map(sample => {\n const timepoint = timepoints.get(sample.timepointId)\n const condition = conditions.get(sample.conditionId)\n return {\n sampleId: sample.sampleId,\n condition: condition?.name ?? sample.conditionId,\n timepoint: timepoint?.label ?? sample.timepointId,\n value: timepoint?.value,\n unit: timepoint?.unit,\n replicate: sample.replicate,\n ...(sample.metadata ?? {}),\n }\n })\n}\n\nexport function toTimeCourseColumns(): TimeCourseColumnsAdapterResult {\n return [\n { key: 'sampleId', label: 'Sample ID', sortable: true },\n { key: 'condition', label: 'Condition', sortable: true },\n { key: 'timepoint', label: 'Time Point', sortable: true },\n { key: 'value', label: 'Value', sortable: true, align: 'right' },\n { key: 'unit', label: 'Unit', sortable: true },\n { key: 'replicate', label: 'Replicate', sortable: true, align: 'right' },\n ]\n}\n\nexport function toTimeCourseDataFrame(\n template: TimeCourseTemplate | TimeCourseTemplateData\n): TimeCourseDataFrameAdapterResult {\n return {\n data: toTimeCourseRows(template),\n columns: toTimeCourseColumns(),\n rowKey: 'sampleId',\n }\n}\n\nexport function toTimeCourseSteps(\n template: TimeCourseTemplate | TimeCourseTemplateData\n): TimeCourseStepsAdapterResult {\n const data = getTemplateData(template, 'time-course')\n validateTimeCourseData(data)\n return data.timepoints.map((timepoint, index) => ({\n id: timepoint.id,\n type: 'measurement',\n name: timepoint.label,\n description: `${data.conditions.length} condition${data.conditions.length === 1 ? '' : 's'}`,\n status: 'pending',\n order: index,\n parameters: {\n value: timepoint.value,\n unit: timepoint.unit,\n },\n }))\n}\n","import type {\n PlateMapEditorState,\n} from '../types'\nimport { getTemplateData } from './templateEnvelopes'\nimport { validatePlateMapData } from './templateValidators'\nimport type {\n PlateMapEditorAdapterResult,\n PlateMapTemplate,\n PlateMapTemplateData,\n WellMapAdapterResult,\n} from './types'\n\nexport function toPlateMapEditorState(\n template: PlateMapTemplate | PlateMapTemplateData\n): PlateMapEditorAdapterResult {\n const data = getTemplateData(template, 'plate-map')\n validatePlateMapData(data)\n const activePlateId = data.activePlateId ?? data.plates[0].id\n return {\n plates: data.plates,\n activePlateId,\n samples: data.samples,\n selectedWells: data.selectedWells ?? [],\n activeSampleId: data.activeSampleId,\n } satisfies PlateMapEditorState\n}\n\nexport function toWellPlateWells(\n template: PlateMapTemplate | PlateMapTemplateData,\n plateId?: string\n): WellMapAdapterResult {\n const state = toPlateMapEditorState(template)\n const plate = state.plates.find(candidate => candidate.id === (plateId ?? state.activePlateId))\n ?? state.plates[0]\n return plate.wells\n}\n","import type {\n PlateCondition,\n PlateMapEditorState,\n} from '../types'\nimport { toPlateMapEditorState } from './plateMapAdapters'\nimport { getTemplateData } from './templateEnvelopes'\nimport { validateDoseResponseData } from './templateValidators'\nimport type {\n DoseConditionsAdapterResult,\n DoseResponseTemplate,\n DoseResponseTemplateData,\n} from './types'\n\nconst CONDITION_COLORS = [\n '#3B82F6',\n '#10B981',\n '#EF4444',\n '#F59E0B',\n '#8B5CF6',\n '#F97316',\n '#06B6D4',\n '#14B8A6',\n '#6B7280',\n]\n\nexport function toDoseConditions(\n template: DoseResponseTemplate | DoseResponseTemplateData\n): DoseConditionsAdapterResult {\n const data = getTemplateData(template, 'dose-response')\n validateDoseResponseData(data)\n return data.compounds.map((compound, index): PlateCondition => ({\n label: compound.name,\n color: String(compound.metadata?.color ?? CONDITION_COLORS[index % CONDITION_COLORS.length]),\n concentrations: compound.concentrations,\n unit: data.unit,\n }))\n}\n\nexport function toDoseLayoutState(\n template: DoseResponseTemplate | DoseResponseTemplateData\n): PlateMapEditorState | undefined {\n const data = getTemplateData(template, 'dose-response')\n validateDoseResponseData(data)\n return data.layout ? toPlateMapEditorState(data.layout) : undefined\n}\n","import type { Well } from '../types'\nimport type {\n AssayMatrixTemplate,\n BioTemplateEnvelope,\n CalibrationCurveTemplate,\n DataFrameTemplate,\n FlowCytometryPanelTemplate,\n InstrumentRunTemplate,\n ProtocolStepsTemplate,\n QpcrPlateTemplate,\n ReagentListTemplate,\n SamplePrepTemplate,\n SampleSheetTemplate,\n TimeCourseTemplate,\n TemplateDataFrameAdapterResult,\n} from './types'\nimport { toAssayMatrixDataFrame } from './assayMatrixAdapters'\nimport { toCalibrationCurveDataFrame } from './calibrationCurveAdapters'\nimport { toFlowPanelDataFrame } from './flowPanelAdapters'\nimport { toInstrumentRunDataFrame } from './instrumentRunAdapters'\nimport { toProtocolDataFrame } from './protocolAdapters'\nimport { toQpcrDataFrame } from './qpcrAdapters'\nimport { toReagentDataFrame } from './reagentAdapters'\nimport { toSamplePrepDataFrame } from './samplePrepAdapters'\nimport { toSampleDataFrame } from './sampleSheetAdapters'\nimport { toTimeCourseDataFrame } from './timeCourseAdapters'\n\nexport {\n toAssayMatrixColumns,\n toAssayMatrixDataFrame,\n toAssayMatrixRows,\n toAssayMatrixSampleOptions,\n} from './assayMatrixAdapters'\n\nexport {\n toCalibrationCurveColumns,\n toCalibrationCurveDataFrame,\n toCalibrationCurveRows,\n} from './calibrationCurveAdapters'\n\nexport {\n toDoseConditions,\n toDoseLayoutState,\n} from './doseResponseAdapters'\n\nexport {\n toFlowPanelColumns,\n toFlowPanelDataFrame,\n toFlowPanelRows,\n} from './flowPanelAdapters'\n\nexport {\n toInstrumentRunColumns,\n toInstrumentRunDataFrame,\n toInstrumentRunRows,\n toInstrumentRunScheduleEvents,\n toInstrumentRunSteps,\n} from './instrumentRunAdapters'\n\nexport {\n toPlateMapEditorState,\n toWellPlateWells,\n} from './plateMapAdapters'\n\nexport {\n toProtocolColumns,\n toProtocolDataFrame,\n toProtocolRows,\n toProtocolSteps,\n} from './protocolAdapters'\n\nexport {\n toQpcrColumns,\n toQpcrDataFrame,\n toQpcrRows,\n toQpcrWellPlateWells,\n} from './qpcrAdapters'\n\nexport {\n toReagentColumns,\n toReagentDataFrame,\n toReagentListItems,\n toReagentRows,\n} from './reagentAdapters'\n\nexport {\n toSamplePrepColumns,\n toSamplePrepDataFrame,\n toSamplePrepRows,\n} from './samplePrepAdapters'\n\nexport {\n toSampleColumns,\n toSampleDataFrame,\n toSampleOptions,\n toSampleRows,\n} from './sampleSheetAdapters'\n\nexport {\n toTimeCourseColumns,\n toTimeCourseDataFrame,\n toTimeCourseRows,\n toTimeCourseSteps,\n} from './timeCourseAdapters'\n\nexport function toTemplateDataFrame(\n template: DataFrameTemplate | BioTemplateEnvelope<unknown>\n): TemplateDataFrameAdapterResult {\n switch (template.template_id) {\n case 'sample-sheet':\n return toSampleDataFrame(template as SampleSheetTemplate)\n case 'sample-prep':\n return toSamplePrepDataFrame(template as SamplePrepTemplate)\n case 'calibration-curve':\n return toCalibrationCurveDataFrame(template as CalibrationCurveTemplate)\n case 'time-course':\n return toTimeCourseDataFrame(template as TimeCourseTemplate)\n case 'protocol-steps':\n return toProtocolDataFrame(template as ProtocolStepsTemplate)\n case 'assay-matrix':\n return toAssayMatrixDataFrame(template as AssayMatrixTemplate)\n case 'reagent-list':\n return toReagentDataFrame(template as ReagentListTemplate)\n case 'flow-cytometry-panel':\n return toFlowPanelDataFrame(template as FlowCytometryPanelTemplate)\n case 'instrument-run':\n return toInstrumentRunDataFrame(template as InstrumentRunTemplate)\n case 'qpcr-plate':\n return toQpcrDataFrame(template as QpcrPlateTemplate)\n default:\n throw new Error(`Template '${String(template.template_id)}' does not expose a DataFrame adapter.`)\n }\n}\n\nexport function toWellMapArray(wells: Record<string, Well>): Well[] {\n return Object.values(wells)\n}\n","import type {\n PlateMapEditorState,\n WellLegendItem,\n} from '../types'\n\nexport function activePlateFromState(state: PlateMapEditorState) {\n return state.plates.find(plate => plate.id === state.activePlateId) ?? state.plates[0]\n}\n\nexport function sampleColorsFromPlateState(state: PlateMapEditorState): Record<string, string> {\n return Object.fromEntries(\n state.samples\n .filter(sample => sample.color)\n .map(sample => [sample.id, sample.color as string])\n )\n}\n\nexport function legendItemsFromPlateState(state: PlateMapEditorState): WellLegendItem[] {\n return state.samples.map((sample, index) => ({\n type: sample.id,\n label: sample.name,\n color: sample.color ?? colorForIndex(index),\n }))\n}\n\nexport function colorForIndex(index: number): string {\n const colors = ['#3B82F6', '#10B981', '#EF4444', '#F59E0B', '#8B5CF6', '#F97316', '#06B6D4', '#14B8A6']\n return colors[index % colors.length]\n}\n","import { cloneBinding } from './componentBindingHelpers'\nimport { templateComponentBindings } from './componentBindingCatalog'\nimport type {\n BioTemplateComponentPropsBinding,\n} from './componentBindings'\nimport type { TemplateId } from './types'\n\nexport function propsBinding(\n templateId: TemplateId,\n component: string,\n propsObject: Record<string, unknown>\n): BioTemplateComponentPropsBinding {\n const matched = templateComponentBindings[templateId].find(binding => binding.component === component)\n if (!matched) {\n throw new Error(`No component binding registered for '${templateId}' and '${component}'.`)\n }\n return {\n ...cloneBinding(matched),\n propsObject,\n }\n}\n","import {\n toDoseConditions,\n toDoseLayoutState,\n} from './adapters'\nimport {\n activePlateFromState,\n sampleColorsFromPlateState,\n} from './componentPlateHelpers'\nimport { propsBinding } from './componentPropsFactory'\nimport type { BioTemplateComponentPropsBinding } from './componentBindings'\nimport type { DoseResponseTemplate } from './types'\n\nexport function doseResponseProps(template: DoseResponseTemplate): BioTemplateComponentPropsBinding[] {\n const conditions = toDoseConditions(template)\n const layout = toDoseLayoutState(template)\n const targetWells = layout ? Object.keys(activePlateFromState(layout).wells) : []\n const props = [\n propsBinding('dose-response', 'DoseCalculator', {\n mode: 'serial',\n targetWells,\n disabled: conditions.length === 0,\n }),\n ]\n\n if (layout) {\n const plate = activePlateFromState(layout)\n props.push(propsBinding('dose-response', 'WellPlate', {\n format: plate.format,\n wells: plate.wells,\n sampleColors: sampleColorsFromPlateState(layout),\n legendItems: conditions.map(condition => ({\n type: condition.label,\n label: condition.label,\n color: condition.color,\n })),\n showLegend: true,\n showSampleTypeIndicator: true,\n }))\n }\n\n return props\n}\n","import {\n toAssayMatrixSampleOptions,\n toInstrumentRunScheduleEvents,\n toReagentListItems,\n toSampleOptions,\n toTemplateDataFrame,\n} from './adapters'\nimport { propsBinding } from './componentPropsFactory'\nimport type { BioTemplateComponentPropsBinding } from './componentBindings'\nimport type {\n AssayMatrixTemplate,\n DataFrameTemplate,\n InstrumentRunTemplate,\n ProtocolStepsTemplate,\n ReagentListTemplate,\n SampleSheetTemplate,\n TemplateId,\n TimeCourseTemplate,\n} from './types'\n\nexport function dataFrameProps(template: DataFrameTemplate): BioTemplateComponentPropsBinding {\n const frame = toTemplateDataFrame(template)\n return propsBinding(template.template_id as TemplateId, 'DataFrame', {\n ...frame,\n searchable: true,\n sortable: true,\n size: 'sm',\n })\n}\n\nexport function sampleSelectorProps(template: SampleSheetTemplate): BioTemplateComponentPropsBinding {\n const options = toSampleOptions(template)\n return propsBinding('sample-sheet', 'SampleSelector', {\n samples: options.map(option => option.label),\n modelValue: [],\n })\n}\n\nexport function assayMatrixSampleSelectorProps(template: AssayMatrixTemplate): BioTemplateComponentPropsBinding {\n const options = toAssayMatrixSampleOptions(template)\n return propsBinding('assay-matrix', 'SampleSelector', {\n samples: options.map(option => option.label),\n modelValue: [],\n })\n}\n\nexport function timelineProps(\n template: TimeCourseTemplate | ProtocolStepsTemplate | InstrumentRunTemplate,\n steps: unknown[],\n editable = false\n): BioTemplateComponentPropsBinding {\n return propsBinding(template.template_id as TemplateId, 'ExperimentTimeline', {\n modelValue: steps,\n orientation: 'vertical',\n editable,\n })\n}\n\nexport function scheduleCalendarProps(template: InstrumentRunTemplate): BioTemplateComponentPropsBinding {\n const events = toInstrumentRunScheduleEvents(template)\n return propsBinding('instrument-run', 'ScheduleCalendar', {\n modelValue: events[0]?.start,\n events,\n view: 'day',\n readonly: true,\n showNavigation: false,\n showViewToggle: false,\n })\n}\n\nexport function reagentListProps(template: ReagentListTemplate): BioTemplateComponentPropsBinding {\n return propsBinding('reagent-list', 'ReagentList', {\n modelValue: toReagentListItems(template),\n searchable: true,\n sortable: true,\n })\n}\n","import {\n toPlateMapEditorState,\n toWellPlateWells,\n} from './adapters'\nimport {\n activePlateFromState,\n legendItemsFromPlateState,\n sampleColorsFromPlateState,\n} from './componentPlateHelpers'\nimport { propsBinding } from './componentPropsFactory'\nimport type { BioTemplateComponentPropsBinding } from './componentBindings'\nimport type { PlateMapTemplate } from './types'\n\nexport function plateMapProps(template: PlateMapTemplate): BioTemplateComponentPropsBinding[] {\n const state = toPlateMapEditorState(template)\n const plate = activePlateFromState(state)\n return [\n propsBinding('plate-map', 'PlateMapEditor', {\n modelValue: state,\n format: plate.format,\n samples: state.samples,\n }),\n propsBinding('plate-map', 'WellPlate', {\n format: plate.format,\n wells: toWellPlateWells(template),\n sampleColors: sampleColorsFromPlateState(state),\n legendItems: legendItemsFromPlateState(state),\n showLegend: true,\n showSampleTypeIndicator: true,\n }),\n ]\n}\n","import type { WellLegendItem } from '../types'\nimport { toQpcrWellPlateWells } from './adapters'\nimport { colorForIndex } from './componentPlateHelpers'\nimport { getTemplateData } from './templateEnvelopes'\nimport { dataFrameProps } from './componentGenericProps'\nimport { propsBinding } from './componentPropsFactory'\nimport type { BioTemplateComponentPropsBinding } from './componentBindings'\nimport type { QpcrPlateTemplate } from './types'\n\nexport function qpcrPlateProps(template: QpcrPlateTemplate): BioTemplateComponentPropsBinding[] {\n const data = getTemplateData(template, 'qpcr-plate')\n const frame = dataFrameProps(template)\n return [\n propsBinding('qpcr-plate', 'WellPlate', {\n format: data.format,\n wells: toQpcrWellPlateWells(template),\n sampleColors: Object.fromEntries(data.samples.map((sample, index) => [sample.sampleId, colorForIndex(index)])),\n legendItems: data.samples.map((sample, index): WellLegendItem => ({\n type: sample.sampleId,\n label: sample.name ?? sample.sampleId,\n color: colorForIndex(index),\n })),\n showLegend: true,\n showSampleTypeIndicator: true,\n }),\n frame,\n ]\n}\n","import {\n toInstrumentRunSteps,\n toProtocolSteps,\n toTimeCourseSteps,\n} from './adapters'\nimport { doseResponseProps } from './componentDoseResponseProps'\nimport {\n assayMatrixSampleSelectorProps,\n dataFrameProps,\n reagentListProps,\n sampleSelectorProps,\n scheduleCalendarProps,\n timelineProps,\n} from './componentGenericProps'\nimport { plateMapProps } from './componentPlateMapProps'\nimport { qpcrPlateProps } from './componentQpcrPlateProps'\nimport type { BioTemplateComponentPropsBinding } from './componentBindings'\nimport type {\n AssayMatrixTemplate,\n BioTemplateEnvelope,\n DataFrameTemplate,\n DoseResponseTemplate,\n InstrumentRunTemplate,\n PlateMapTemplate,\n ProtocolStepsTemplate,\n QpcrPlateTemplate,\n ReagentListTemplate,\n SampleSheetTemplate,\n TimeCourseTemplate,\n} from './types'\n\nexport function propsForTemplate(template: BioTemplateEnvelope<unknown>): BioTemplateComponentPropsBinding[] {\n switch (template.template_id) {\n case 'plate-map':\n return plateMapProps(template as PlateMapTemplate)\n case 'sample-sheet':\n return [\n dataFrameProps(template as DataFrameTemplate),\n sampleSelectorProps(template as SampleSheetTemplate),\n ]\n case 'sample-prep':\n case 'calibration-curve':\n case 'flow-cytometry-panel':\n return [dataFrameProps(template as DataFrameTemplate)]\n case 'assay-matrix':\n return [\n dataFrameProps(template as DataFrameTemplate),\n assayMatrixSampleSelectorProps(template as AssayMatrixTemplate),\n ]\n case 'instrument-run':\n return [\n dataFrameProps(template as DataFrameTemplate),\n scheduleCalendarProps(template as InstrumentRunTemplate),\n timelineProps(template as InstrumentRunTemplate, toInstrumentRunSteps(template as InstrumentRunTemplate)),\n ]\n case 'dose-response':\n return doseResponseProps(template as DoseResponseTemplate)\n case 'time-course':\n return [\n timelineProps(template as TimeCourseTemplate, toTimeCourseSteps(template as TimeCourseTemplate)),\n dataFrameProps(template as DataFrameTemplate),\n ]\n case 'protocol-steps':\n return [\n timelineProps(template as ProtocolStepsTemplate, toProtocolSteps(template as ProtocolStepsTemplate), true),\n dataFrameProps(template as DataFrameTemplate),\n ]\n case 'reagent-list':\n return [\n reagentListProps(template as ReagentListTemplate),\n dataFrameProps(template as DataFrameTemplate),\n ]\n case 'qpcr-plate':\n return qpcrPlateProps(template as QpcrPlateTemplate)\n default:\n return []\n }\n}\n","import { extractTemplateCollection } from './templateEnvelopes'\nimport {\n isTemplateEnvelope,\n resolveComponentTemplateIds,\n} from './componentTargetResolvers'\nimport {\n cloneBinding,\n cloneBindingMap,\n cloneBindings,\n toVueSfc,\n uniquePropsName,\n} from './componentBindingHelpers'\nimport { templateComponentBindings } from './componentBindingCatalog'\nimport { propsForTemplate } from './componentTemplateProps'\nimport type {\n BioTemplateEnvelope,\n TemplateCollectionEnvelope,\n TemplateId,\n TemplatePackId,\n TemplatePresetId,\n} from './types'\n\nexport type BioTemplateComponentTarget =\n | TemplateId\n | TemplatePackId\n | TemplatePresetId\n | string\n | BioTemplateEnvelope<unknown>\n | TemplateCollectionEnvelope\n\nexport interface BioTemplateComponentBinding {\n id: string\n template_id: TemplateId\n component: string\n adapters: readonly string[]\n props: readonly string[]\n description: string\n importPath: '@morscherlab/mint-sdk'\n}\n\nexport interface BioTemplateComponentPropsBinding extends BioTemplateComponentBinding {\n propsObject: Record<string, unknown>\n}\n\nexport interface BioTemplateResolvedComponentBinding extends Omit<BioTemplateComponentBinding, 'props'> {\n /** Prop names advertised by the static template/component compatibility catalog. */\n propNames: readonly string[]\n /** Concrete props ready for direct `v-bind=\"componentBindingsById[id].props\"` use. */\n props: Record<string, unknown>\n /** Backward-compatible alias for callers that already consume componentProps entries. */\n propsObject: Record<string, unknown>\n}\n\nexport type BioTemplateComponentBindingsById = Record<string, BioTemplateResolvedComponentBinding>\nexport type BioTemplateComponentPropsById = Record<string, Record<string, unknown>>\nexport type BioTemplateComponentPropsByComponent = Record<string, Record<string, unknown>[]>\n\nexport interface BioTemplateComponentPropsLookupOptions {\n templateId?: TemplateId\n id?: string\n}\n\nexport interface BioTemplateComponentImport {\n importPath: BioTemplateComponentBinding['importPath']\n components: string[]\n statement: string\n}\n\nexport interface BioTemplateComponentSnippet extends BioTemplateComponentBinding {\n propsName: string\n propsExpression: string\n template: string\n}\n\nexport interface BioTemplateComponentSnippetOptions {\n propsVariable?: string\n}\n\nexport interface BioTemplateComponentUsageOptions extends BioTemplateComponentSnippetOptions {\n targetExpression?: string\n targetPropName?: string\n}\n\nexport interface BioTemplateComponentUsage {\n imports: BioTemplateComponentImport[]\n componentProps: BioTemplateComponentPropsBinding[]\n snippets: BioTemplateComponentSnippet[]\n propsDeclarations: string[]\n scriptSetup: string\n template: string\n sfc: string\n}\n\nexport function listBioTemplateComponentBindings(): Record<TemplateId, BioTemplateComponentBinding[]> {\n return cloneBindingMap(templateComponentBindings)\n}\n\nexport function getBioTemplateComponentBindings(\n target: BioTemplateComponentTarget\n): BioTemplateComponentBinding[] {\n const templateIds = resolveComponentTemplateIds(target)\n return templateIds.flatMap(templateId => cloneBindings(templateComponentBindings[templateId]))\n}\n\nexport function toBioTemplateComponentProps(\n target: BioTemplateEnvelope<unknown> | TemplateCollectionEnvelope\n): BioTemplateComponentPropsBinding[] {\n if (isTemplateEnvelope(target)) {\n return propsForTemplate(target)\n }\n\n const collection = extractTemplateCollection(target)\n return Object.values(collection).flatMap(template => propsForTemplate(template))\n}\n\n/** Return resolved component bindings with concrete props for direct slot rendering. */\nexport function toBioTemplateComponentBindings(\n target: BioTemplateEnvelope<unknown> | TemplateCollectionEnvelope,\n): BioTemplateResolvedComponentBinding[] {\n return toBioTemplateComponentProps(target).map(toResolvedComponentBinding)\n}\n\n/** Return resolved component bindings keyed by stable template component id. */\nexport function toBioTemplateComponentBindingsById(\n target: BioTemplateEnvelope<unknown> | TemplateCollectionEnvelope,\n): BioTemplateComponentBindingsById {\n return Object.fromEntries(\n toBioTemplateComponentBindings(target).map(binding => [binding.id, binding]),\n )\n}\n\n/** Return component props keyed by stable binding id for direct `v-bind=\"componentPropsById[id]\"` use. */\nexport function toBioTemplateComponentPropsById(\n target: BioTemplateEnvelope<unknown> | TemplateCollectionEnvelope,\n): BioTemplateComponentPropsById {\n return Object.fromEntries(\n toBioTemplateComponentProps(target).map(binding => [binding.id, binding.propsObject]),\n )\n}\n\n/** Return component props grouped by SDK component name for direct WellPlate/DoseCalculator binding. */\nexport function toBioTemplateComponentPropsByComponent(\n target: BioTemplateEnvelope<unknown> | TemplateCollectionEnvelope,\n): BioTemplateComponentPropsByComponent {\n const grouped: BioTemplateComponentPropsByComponent = {}\n for (const binding of toBioTemplateComponentProps(target)) {\n const props = grouped[binding.component] ?? []\n props.push(binding.propsObject)\n grouped[binding.component] = props\n }\n return grouped\n}\n\n/** Return the first props object for an SDK component, optionally restricted by template id or binding id. */\nexport function getBioTemplateComponentProps(\n target: BioTemplateEnvelope<unknown> | TemplateCollectionEnvelope,\n component: string,\n options: BioTemplateComponentPropsLookupOptions = {},\n): Record<string, unknown> | undefined {\n return toBioTemplateComponentProps(target).find((binding) => {\n if (binding.component !== component) return false\n if (options.id !== undefined && binding.id !== options.id) return false\n if (options.templateId !== undefined && binding.template_id !== options.templateId) return false\n return true\n })?.propsObject\n}\n\nfunction toResolvedComponentBinding(\n binding: BioTemplateComponentPropsBinding,\n): BioTemplateResolvedComponentBinding {\n const { props: propNames, propsObject, ...rest } = binding\n return {\n ...rest,\n propNames,\n props: propsObject,\n propsObject,\n }\n}\n\nexport function toBioTemplateComponentImports(\n target: BioTemplateComponentTarget\n): BioTemplateComponentImport[] {\n const groups = new Map<BioTemplateComponentBinding['importPath'], string[]>()\n\n for (const binding of getBioTemplateComponentBindings(target)) {\n const components = groups.get(binding.importPath) ?? []\n if (!components.includes(binding.component)) components.push(binding.component)\n groups.set(binding.importPath, components)\n }\n\n return Array.from(groups.entries()).map(([importPath, components]) => ({\n importPath,\n components,\n statement: `import { ${components.join(', ')} } from '${importPath}'`,\n }))\n}\n\nexport function toBioTemplateComponentSnippets(\n target: BioTemplateEnvelope<unknown> | TemplateCollectionEnvelope,\n options: BioTemplateComponentSnippetOptions = {}\n): BioTemplateComponentSnippet[] {\n const propsVariable = options.propsVariable ?? 'componentProps'\n const usedNames = new Map<string, number>()\n\n return toBioTemplateComponentProps(target).map((binding, index) => {\n const propsName = uniquePropsName(binding, usedNames)\n const propsExpression = `${propsVariable}[${index}].propsObject`\n return {\n ...cloneBinding(binding),\n propsName,\n propsExpression,\n template: `<${binding.component} v-bind=\"${propsExpression}\" />`,\n }\n })\n}\n\nexport function toBioTemplateComponentUsage(\n target: BioTemplateEnvelope<unknown> | TemplateCollectionEnvelope,\n options: BioTemplateComponentUsageOptions = {}\n): BioTemplateComponentUsage {\n const propsVariable = options.propsVariable ?? 'componentProps'\n const usesGeneratedTargetProp = options.targetExpression === undefined\n const targetPropName = options.targetPropName ?? 'templateCollection'\n const targetExpression = options.targetExpression ?? `props.${targetPropName}`\n const componentProps = toBioTemplateComponentProps(target)\n const snippets = toBioTemplateComponentSnippets(target, { propsVariable }).map(snippet => ({\n ...snippet,\n propsExpression: snippet.propsName,\n template: `<${snippet.component} v-bind=\"${snippet.propsName}\" />`,\n }))\n const propsDeclarations = snippets.map(\n (snippet, index) => `const ${snippet.propsName} = ${propsVariable}[${index}].propsObject`\n )\n const setupLines = [\n ...(usesGeneratedTargetProp\n ? [`const props = defineProps<{ ${targetPropName}: BioTemplateEnvelope<unknown> | TemplateCollectionEnvelope }>()`]\n : []),\n `const ${propsVariable} = toBioTemplateComponentProps(${targetExpression})`,\n ...propsDeclarations,\n ]\n const imports = toBioTemplateComponentImports(target)\n const template = snippets.map(snippet => snippet.template).join('\\n')\n\n return {\n imports,\n componentProps,\n snippets,\n propsDeclarations,\n scriptSetup: setupLines.join('\\n'),\n template,\n sfc: toVueSfc(imports, setupLines, template, usesGeneratedTargetProp),\n }\n}\n","import {\n readBoolean,\n readInteger,\n readNumber,\n readNumberList,\n readOptionalString,\n readString,\n readStringList,\n} from './builderReadUtils'\nimport { readPlateFormat } from './plateGeometry'\nimport { getBioTemplatePresetInfo } from './presets'\nimport type {\n CreateElisaAssayCollectionOptions,\n CreateFlowCytometryAssayCollectionOptions,\n CreateLcmsBatchCollectionOptions,\n CreateQpcrExpressionCollectionOptions,\n CreateQpcrPlateTemplateOptions,\n CreateSamplePrepTemplateOptions,\n CreateTargetedMetabolomicsCollectionOptions,\n CreateWellPlateScreenCollectionOptions,\n CreateWesternBlotAssayCollectionOptions,\n TemplatePresetId,\n} from './types'\n\nexport type BioTemplateControlValues = Record<string, unknown>\n\nexport function bioTemplatePresetControlValuesToOptions(\n name: 'wellplate-screen',\n values: BioTemplateControlValues\n): CreateWellPlateScreenCollectionOptions\nexport function bioTemplatePresetControlValuesToOptions(\n name: 'qpcr-expression',\n values: BioTemplateControlValues\n): CreateQpcrExpressionCollectionOptions\nexport function bioTemplatePresetControlValuesToOptions(\n name: 'lcms-batch',\n values: BioTemplateControlValues\n): CreateLcmsBatchCollectionOptions\nexport function bioTemplatePresetControlValuesToOptions(\n name: 'targeted-metabolomics',\n values: BioTemplateControlValues\n): CreateTargetedMetabolomicsCollectionOptions\nexport function bioTemplatePresetControlValuesToOptions(\n name: 'elisa-assay',\n values: BioTemplateControlValues\n): CreateElisaAssayCollectionOptions\nexport function bioTemplatePresetControlValuesToOptions(\n name: 'flow-cytometry-assay',\n values: BioTemplateControlValues\n): CreateFlowCytometryAssayCollectionOptions\nexport function bioTemplatePresetControlValuesToOptions(\n name: 'western-blot-assay',\n values: BioTemplateControlValues\n): CreateWesternBlotAssayCollectionOptions\nexport function bioTemplatePresetControlValuesToOptions(\n name: TemplatePresetId | string,\n values: BioTemplateControlValues\n):\n | CreateWellPlateScreenCollectionOptions\n | CreateQpcrExpressionCollectionOptions\n | CreateLcmsBatchCollectionOptions\n | CreateTargetedMetabolomicsCollectionOptions\n | CreateElisaAssayCollectionOptions\n | CreateFlowCytometryAssayCollectionOptions\n | CreateWesternBlotAssayCollectionOptions\nexport function bioTemplatePresetControlValuesToOptions(\n name: TemplatePresetId | string,\n values: BioTemplateControlValues\n):\n | CreateWellPlateScreenCollectionOptions\n | CreateQpcrExpressionCollectionOptions\n | CreateLcmsBatchCollectionOptions\n | CreateTargetedMetabolomicsCollectionOptions\n | CreateElisaAssayCollectionOptions\n | CreateFlowCytometryAssayCollectionOptions\n | CreateWesternBlotAssayCollectionOptions {\n const preset = getBioTemplatePresetInfo(name)\n if (!preset) {\n throw new Error(`Unknown template preset '${name}'.`)\n }\n\n if (preset.name === 'wellplate-screen') {\n return {\n samples: readStringList(values.sampleNames, ['Control', 'Treatment']),\n plateName: readString(values.plateName, 'Screen plate'),\n plateFormat: readPlateFormat(values.plateFormat, 96),\n unit: readString(values.unit, 'uM'),\n replicates: readInteger(values.replicates, 3),\n }\n }\n\n if (preset.name === 'qpcr-expression') {\n return {\n samples: readStringList(values.sampleNames, ['Control', 'Treatment']),\n targets: readStringList(values.targets, ['ACTB', 'GAPDH']),\n chemistry: readString(values.chemistry, 'sybr') as CreateQpcrPlateTemplateOptions['chemistry'],\n format: readPlateFormat(values.plateFormat, 96),\n includeNoTemplateControls: readBoolean(values.includeNoTemplateControls, true),\n replicates: readInteger(values.replicates, 3),\n instrument: readOptionalString(values.instrument),\n }\n }\n\n if (preset.name === 'lcms-batch') {\n return {\n samples: readStringList(values.sampleNames, ['S001', 'S002']),\n features: readStringList(values.featureNames, ['Glucose', 'Lactate']),\n instrument: readString(values.instrument, 'LC-MS'),\n method: readString(values.method, 'Default method'),\n includeQc: readBoolean(values.includeQc, true),\n }\n }\n\n if (preset.name === 'targeted-metabolomics') {\n return {\n samples: readStringList(values.sampleNames, ['S001', 'S002']),\n metabolites: readStringList(values.metaboliteNames, ['Glucose', 'Lactate', 'Pyruvate']),\n internalStandards: readStringList(\n values.internalStandards,\n ['Stable isotope internal standard mix'],\n ),\n standardConcentrations: readNumberList(values.standardConcentrations, [0.1, 1, 10, 100]),\n concentrationUnit: readString(values.concentrationUnit, 'uM'),\n responseUnit: readString(values.responseUnit, 'peak area ratio'),\n calibrationAnalyte: readOptionalString(values.calibrationAnalyte),\n instrument: readString(values.instrument, 'LC-MS'),\n method: readString(values.method, 'Targeted metabolomics'),\n prepType: readString(values.prepType, 'extraction') as CreateSamplePrepTemplateOptions['prepType'],\n outputVolume: readNumber(values.outputVolume, 50),\n includeQc: readBoolean(values.includeQc, true),\n }\n }\n\n if (preset.name === 'elisa-assay') {\n return {\n samples: readStringList(values.sampleNames, ['Control', 'Treatment']),\n analyte: readString(values.analyte, 'Analyte'),\n standardConcentrations: readNumberList(values.standardConcentrations, [1000, 100, 10, 1]),\n unit: readString(values.unit, 'pg/mL'),\n responseUnit: readString(values.responseUnit, 'OD450'),\n plateName: readString(values.plateName, 'ELISA plate'),\n plateFormat: readPlateFormat(values.plateFormat, 96),\n }\n }\n\n if (preset.name === 'flow-cytometry-assay') {\n return {\n samples: readStringList(values.sampleNames, ['Control', 'Treatment']),\n markers: readStringList(values.markers, ['CD3', 'CD4', 'CD8']),\n features: readStringList(values.featureNames, ['CD3+ cells', 'CD4+ cells', 'CD8+ cells']),\n instrument: readString(values.instrument, 'Flow cytometer'),\n includeDefaultControls: readBoolean(values.includeDefaultControls, true),\n }\n }\n\n if (preset.name === 'western-blot-assay') {\n return {\n samples: readStringList(values.sampleNames, ['Control', 'Treatment']),\n targets: readStringList(values.targets, ['Target protein']),\n loadingControl: readString(values.loadingControl, 'ACTB'),\n }\n }\n\n throw new Error(`Unknown template preset '${name}'.`)\n}\n","export const DEFAULT_SAMPLE_COLORS = [\n '#3B82F6',\n '#10B981',\n '#EF4444',\n '#F59E0B',\n '#8B5CF6',\n '#F97316',\n '#06B6D4',\n '#14B8A6',\n '#6B7280',\n]\n","export function sampleIdFromName(name: string, index: number): string {\n return idFromName(name, `sample-${index + 1}`)\n}\n\nexport function compoundIdFromName(name: string, index: number): string {\n return idFromName(name, `compound-${index + 1}`)\n}\n\nexport function idFromName(name: string, fallback: string): string {\n const slug = name.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '')\n return slug || fallback\n}\n\nexport function timepointId(value: number, unit: string, index: number): string {\n const raw = Number.isInteger(value)\n ? String(value)\n : String(value).replace(/0+$/, '').replace(/\\.$/, '')\n const token = raw.replace('.', 'p')\n return token ? `t${token}-${unit}` : `timepoint-${index + 1}`\n}\n","import { DEFAULT_SAMPLE_COLORS } from './builderDefaults'\nimport { sampleIdFromName } from './builderIdUtils'\nimport { createTemplateEnvelope } from './templateEnvelopes'\nimport type {\n CreatePlateMapTemplateOptions,\n PlateMapTemplate,\n TemplateSample,\n} from './types'\n\nexport function createPlateMapTemplate(\n options: CreatePlateMapTemplateOptions = {}\n): PlateMapTemplate {\n const {\n id = 'plate-1',\n name = 'Plate 1',\n format = 96,\n samples = [],\n metadata = {},\n } = options\n\n const sampleDefinitions = samples.map((sample, index): TemplateSample => {\n if (typeof sample !== 'string') return sample\n return {\n id: sampleIdFromName(sample, index),\n name: sample,\n color: DEFAULT_SAMPLE_COLORS[index % DEFAULT_SAMPLE_COLORS.length],\n }\n })\n\n return createTemplateEnvelope('plate-map', {\n plates: [\n {\n id,\n name,\n format,\n wells: {},\n },\n ],\n samples: sampleDefinitions,\n activePlateId: id,\n selectedWells: [],\n }, metadata)\n}\n","import type {\n SamplePrepStep,\n SamplePrepStepInput,\n SampleRecord,\n} from './types'\nimport {\n idFromName,\n sampleIdFromName,\n} from './builderIdUtils'\n\nexport function normalizeSampleRecord(sample: SampleRecord): SampleRecord {\n return {\n ...sample,\n metadata: sample.metadata ?? {},\n }\n}\n\nexport function presetSampleRecords(samples: Array<string | SampleRecord>): SampleRecord[] {\n return samples.map((sample, index) => {\n if (typeof sample !== 'string') return normalizeSampleRecord(sample)\n return {\n sampleId: sampleIdFromName(sample, index),\n name: sample,\n metadata: {},\n }\n })\n}\n\nexport function normalizeSamplePrepStep(\n step: SamplePrepStepInput,\n prepType: SamplePrepStep['type'],\n volumeUnit: string,\n order: number,\n index: number\n): SamplePrepStep {\n const type = step.type ?? prepType\n const sourceSampleId = step.sourceSampleId\n const name = step.name || `Prepare ${sourceSampleId ?? index + 1}`\n return {\n id: step.id || idFromName(name, `${type}-${index + 1}`),\n order: step.order ?? order,\n type,\n name,\n sourceSampleId,\n sourcePlateId: step.sourcePlateId,\n sourceWellId: step.sourceWellId,\n destinationSampleId: step.destinationSampleId,\n destinationPlateId: step.destinationPlateId,\n destinationWellId: step.destinationWellId,\n reagentId: step.reagentId,\n inputVolume: step.inputVolume,\n outputVolume: step.outputVolume,\n volumeUnit: step.volumeUnit || volumeUnit,\n durationMin: step.durationMin,\n status: step.status ?? 'planned',\n metadata: step.metadata ?? {},\n }\n}\n","import { normalizeSampleRecord } from './sampleNormalizers'\nimport { createTemplateEnvelope } from './templateEnvelopes'\nimport { validateSampleSheetData } from './templateValidators'\nimport type {\n CreateSampleSheetTemplateOptions,\n SampleSheetTemplate,\n SampleSheetTemplateData,\n} from './types'\n\nexport function createSampleSheetTemplate(\n options: CreateSampleSheetTemplateOptions\n): SampleSheetTemplate {\n const data: SampleSheetTemplateData = {\n samples: options.samples.map(normalizeSampleRecord),\n columns: options.columns ?? [\n { id: 'sampleId', label: 'Sample ID', type: 'string', required: true, groupable: false },\n { id: 'name', label: 'Name', type: 'string', required: false, groupable: false },\n ],\n groups: options.groups ?? [],\n }\n validateSampleSheetData(data)\n return createTemplateEnvelope('sample-sheet', data, options.metadata ?? {})\n}\n","import { idFromName } from './builderIdUtils'\nimport { normalizeSamplePrepStep } from './sampleNormalizers'\nimport { createTemplateEnvelope } from './templateEnvelopes'\nimport { validateSamplePrepData } from './templateValidators'\nimport type {\n CreateSamplePrepTemplateOptions,\n SamplePrepStep,\n SamplePrepTemplate,\n SamplePrepTemplateData,\n} from './types'\n\nexport function createSamplePrepTemplate(\n options: CreateSamplePrepTemplateOptions\n): SamplePrepTemplate {\n const prepType = options.prepType ?? 'extraction'\n const volumeUnit = options.volumeUnit ?? 'uL'\n const steps: SamplePrepStep[] = []\n let order = 1\n\n for (const [index, sample] of options.samples.entries()) {\n if (typeof sample !== 'string') {\n const step = normalizeSamplePrepStep(sample, prepType, volumeUnit, order, index)\n steps.push(step)\n order = Math.max(order, step.order + 1)\n continue\n }\n const sourceSampleId = idFromName(sample, `sample-${index + 1}`)\n steps.push({\n id: `${sourceSampleId}-prep`,\n order,\n type: prepType,\n name: `Prepare ${sample}`,\n sourceSampleId,\n destinationSampleId: `${sourceSampleId}-prepared`,\n inputVolume: options.inputVolume,\n outputVolume: options.outputVolume,\n volumeUnit,\n status: 'planned',\n metadata: {},\n })\n order += 1\n }\n\n const data: SamplePrepTemplateData = {\n protocolName: options.protocolName ?? 'Sample preparation',\n steps,\n metadata: options.metadata ?? {},\n }\n validateSamplePrepData(data)\n return createTemplateEnvelope('sample-prep', data, options.metadata ?? {})\n}\n","import type {\n CalibrationAcceptance,\n CalibrationPoint,\n CalibrationPointInput,\n CompoundDoseSeries,\n ControlDefinition,\n} from './types'\nimport { idFromName } from './builderIdUtils'\n\nexport function normalizeCompound(compound: CompoundDoseSeries): CompoundDoseSeries {\n return {\n ...compound,\n concentrations: [...compound.concentrations].sort((a, b) => b - a),\n metadata: compound.metadata ?? {},\n }\n}\n\nexport function normalizeCalibrationAcceptance(\n acceptance?: Partial<CalibrationAcceptance>,\n requireBlank = true\n): CalibrationAcceptance {\n return {\n minRSquared: acceptance?.minRSquared ?? 0.99,\n standardTolerancePercent: acceptance?.standardTolerancePercent ?? 15,\n qcTolerancePercent: acceptance?.qcTolerancePercent ?? 20,\n requireBlank: acceptance?.requireBlank ?? requireBlank,\n metadata: acceptance?.metadata ?? {},\n }\n}\n\nexport function normalizeCalibrationPoint(\n point: CalibrationPointInput,\n unit: string,\n order: number,\n index: number\n): CalibrationPoint {\n const role = point.role ?? 'standard'\n const level = point.level || `${role.charAt(0).toUpperCase()}${role.slice(1)} ${index + 1}`\n return {\n id: point.id || idFromName(level, `${role}-${index + 1}`),\n order: point.order ?? order,\n role,\n level,\n concentration: point.concentration ?? 0,\n unit: point.unit || unit,\n expectedResponse: point.expectedResponse,\n response: point.response,\n replicate: point.replicate ?? 1,\n include: point.include ?? true,\n status: point.status ?? 'planned',\n metadata: point.metadata ?? {},\n }\n}\n\nexport function normalizeControl(control: ControlDefinition): ControlDefinition {\n return {\n ...control,\n metadata: control.metadata ?? {},\n }\n}\n","import { compoundIdFromName } from './builderIdUtils'\nimport {\n normalizeCompound,\n normalizeControl,\n} from './calibrationNormalizers'\nimport {\n createTemplateEnvelope,\n getTemplateData,\n} from './templateEnvelopes'\nimport { validateDoseResponseData } from './templateValidators'\nimport type {\n CreateDoseResponseTemplateOptions,\n DoseResponseTemplate,\n DoseResponseTemplateData,\n PlateMapTemplateData,\n} from './types'\n\nexport function createDoseResponseTemplate(\n options: CreateDoseResponseTemplateOptions\n): DoseResponseTemplate {\n const compounds = Array.isArray(options.compounds)\n ? options.compounds.map(normalizeCompound)\n : Object.entries(options.compounds).map(([name, concentrations], index) => normalizeCompound({\n id: compoundIdFromName(name, index),\n name,\n concentrations,\n metadata: {},\n }))\n\n const layout = options.layout\n ? getTemplateData<PlateMapTemplateData>(options.layout)\n : undefined\n\n const data: DoseResponseTemplateData = {\n compounds,\n unit: options.unit,\n replicates: options.replicates ?? 1,\n controls: (options.controls ?? []).map(normalizeControl),\n layout,\n metadata: options.metadata ?? {},\n }\n validateDoseResponseData(data)\n return createTemplateEnvelope('dose-response', data, options.metadata ?? {})\n}\n","import { idFromName } from './builderIdUtils'\nimport {\n normalizeCalibrationAcceptance,\n normalizeCalibrationPoint,\n} from './calibrationNormalizers'\nimport { createTemplateEnvelope } from './templateEnvelopes'\nimport { validateCalibrationCurveData } from './templateValidators'\nimport type {\n CalibrationCurveTemplate,\n CalibrationCurveTemplateData,\n CalibrationPoint,\n CreateCalibrationCurveTemplateOptions,\n} from './types'\n\nexport function createCalibrationCurveTemplate(\n options: CreateCalibrationCurveTemplateOptions\n): CalibrationCurveTemplate {\n const unit = options.unit ?? 'uM'\n const points: CalibrationPoint[] = []\n let order = 1\n\n if (options.includeBlank !== false) {\n points.push({\n id: 'blank',\n order,\n role: 'blank',\n level: 'Blank',\n concentration: 0,\n unit,\n replicate: 1,\n include: true,\n status: 'planned',\n metadata: {},\n })\n order += 1\n }\n\n const standardValues: number[] = []\n for (const [index, concentration] of options.concentrations.entries()) {\n if (typeof concentration !== 'number') {\n const point = normalizeCalibrationPoint(concentration, unit, order, index)\n points.push(point)\n if (point.role === 'standard') standardValues.push(point.concentration)\n order = Math.max(order, point.order + 1)\n continue\n }\n standardValues.push(concentration)\n points.push({\n id: `std-${index + 1}`,\n order,\n role: 'standard',\n level: `Standard ${index + 1}`,\n concentration,\n unit,\n replicate: 1,\n include: true,\n status: 'planned',\n metadata: {},\n })\n order += 1\n }\n\n if (options.includeQc !== false) {\n const positiveValues = [...standardValues].filter(value => value > 0).sort((a, b) => a - b)\n const qcValues = positiveValues.length === 0\n ? []\n : positiveValues[0] === positiveValues[positiveValues.length - 1]\n ? [positiveValues[0]]\n : [positiveValues[0], positiveValues[positiveValues.length - 1]]\n for (const [index, concentration] of qcValues.entries()) {\n const level = index === 0 ? 'QC low' : 'QC high'\n points.push({\n id: idFromName(level, `qc-${index + 1}`),\n order,\n role: 'qc',\n level,\n concentration,\n unit,\n replicate: 1,\n include: true,\n status: 'planned',\n metadata: {},\n })\n order += 1\n }\n }\n\n const data: CalibrationCurveTemplateData = {\n analyte: options.analyte ?? 'Analyte',\n model: options.model ?? 'linear',\n xUnit: unit,\n responseUnit: options.responseUnit ?? 'response',\n points,\n acceptance: normalizeCalibrationAcceptance(options.acceptance, options.includeBlank !== false),\n metadata: options.metadata ?? {},\n }\n validateCalibrationCurveData(data)\n return createTemplateEnvelope('calibration-curve', data, options.metadata ?? {})\n}\n","import type {\n ProtocolStepRecord,\n TimeCourseCondition,\n TimePoint,\n} from './types'\nimport { idFromName } from './builderIdUtils'\n\nexport function normalizeTimePoint(timepoint: TimePoint): TimePoint {\n return {\n ...timepoint,\n metadata: timepoint.metadata ?? {},\n }\n}\n\nexport function normalizeCondition(condition: TimeCourseCondition): TimeCourseCondition {\n return {\n ...condition,\n metadata: condition.metadata ?? {},\n }\n}\n\nexport function normalizeProtocolStep(\n step: Partial<ProtocolStepRecord> & { name: string },\n index: number\n): ProtocolStepRecord {\n return {\n id: step.id ?? idFromName(step.name, `step-${index + 1}`),\n type: step.type ?? 'custom',\n name: step.name,\n description: step.description,\n duration: step.duration,\n status: step.status ?? 'pending',\n parameters: step.parameters ?? {},\n order: step.order ?? index,\n metadata: step.metadata ?? {},\n }\n}\n","import { DEFAULT_SAMPLE_COLORS } from './builderDefaults'\nimport {\n idFromName,\n timepointId,\n} from './builderIdUtils'\nimport {\n normalizeCondition,\n normalizeTimePoint,\n} from './protocolNormalizers'\nimport { createTemplateEnvelope } from './templateEnvelopes'\nimport { validateTimeCourseData } from './templateValidators'\nimport type {\n CreateTimeCourseTemplateOptions,\n TimeCourseCondition,\n TimeCourseTemplate,\n TimeCourseTemplateData,\n TimePoint,\n} from './types'\n\nexport function createTimeCourseTemplate(\n options: CreateTimeCourseTemplateOptions\n): TimeCourseTemplate {\n const timepoints = options.timepoints.map((timepoint, index): TimePoint => {\n if (typeof timepoint !== 'number') return normalizeTimePoint(timepoint)\n return {\n id: timepointId(timepoint, options.unit, index),\n label: `${timepoint} ${options.unit}`,\n value: timepoint,\n unit: options.unit,\n metadata: {},\n }\n }).sort((a, b) => a.value - b.value)\n\n const conditions = options.conditions.map((condition, index): TimeCourseCondition => {\n if (typeof condition !== 'string') return normalizeCondition(condition)\n return {\n id: idFromName(condition, `condition-${index + 1}`),\n name: condition,\n color: DEFAULT_SAMPLE_COLORS[index % DEFAULT_SAMPLE_COLORS.length],\n metadata: {},\n }\n })\n\n const samples = conditions.flatMap(condition =>\n timepoints.flatMap(timepoint =>\n Array.from({ length: options.replicates ?? 1 }, (_, index) => ({\n sampleId: `${condition.id}-${timepoint.id}-r${index + 1}`,\n conditionId: condition.id,\n timepointId: timepoint.id,\n replicate: index + 1,\n metadata: {},\n }))\n )\n )\n\n const data: TimeCourseTemplateData = {\n timepoints,\n conditions,\n samples,\n metadata: options.metadata ?? {},\n }\n validateTimeCourseData(data)\n return createTemplateEnvelope('time-course', data, options.metadata ?? {})\n}\n","import { idFromName } from './builderIdUtils'\nimport { normalizeProtocolStep } from './protocolNormalizers'\nimport { createTemplateEnvelope } from './templateEnvelopes'\nimport { validateProtocolStepsData } from './templateValidators'\nimport type {\n CreateProtocolStepsTemplateOptions,\n ProtocolStepRecord,\n ProtocolStepsTemplate,\n ProtocolStepsTemplateData,\n} from './types'\n\nexport function createProtocolStepsTemplate(\n options: CreateProtocolStepsTemplateOptions\n): ProtocolStepsTemplate {\n const steps = options.steps.map((step, index): ProtocolStepRecord => {\n if (typeof step === 'string') {\n return {\n id: idFromName(step, `step-${index + 1}`),\n type: 'custom',\n name: step,\n status: 'pending',\n parameters: {},\n order: index,\n metadata: {},\n }\n }\n return normalizeProtocolStep(step, index)\n }).sort((a, b) => a.order - b.order)\n\n const data: ProtocolStepsTemplateData = {\n steps,\n metadata: options.metadata ?? {},\n }\n validateProtocolStepsData(data)\n return createTemplateEnvelope('protocol-steps', data, options.metadata ?? {})\n}\n","import type {\n AssayFeature,\n AssaySample,\n} from './types'\nimport { idFromName } from './builderIdUtils'\n\nexport function createAssaySampleLookup(samples: AssaySample[]): Map<string, string> {\n const lookup = new Map<string, string>()\n for (const sample of samples) {\n addLookupAlias(lookup, sample.sampleId, sample.sampleId)\n if (sample.name) {\n addLookupAlias(lookup, sample.name, sample.sampleId)\n addLookupAlias(lookup, idFromName(sample.name, sample.sampleId), sample.sampleId)\n }\n }\n return lookup\n}\n\nexport function createAssayFeatureLookup(features: AssayFeature[]): Map<string, string> {\n const lookup = new Map<string, string>()\n for (const feature of features) {\n addLookupAlias(lookup, feature.id, feature.id)\n addLookupAlias(lookup, feature.name, feature.id)\n addLookupAlias(lookup, idFromName(feature.name, feature.id), feature.id)\n }\n return lookup\n}\n\nfunction addLookupAlias(lookup: Map<string, string>, alias: string, value: string): void {\n if (!lookup.has(alias)) {\n lookup.set(alias, value)\n }\n}\n","import type {\n AssayFeature,\n AssaySample,\n ReagentRecord,\n ReagentTemplateInput,\n} from './types'\n\nexport function normalizeAssaySample(sample: AssaySample): AssaySample {\n return {\n ...sample,\n metadata: sample.metadata ?? {},\n }\n}\n\nexport function normalizeAssayFeature(feature: AssayFeature): AssayFeature {\n return {\n ...feature,\n metadata: feature.metadata ?? {},\n }\n}\n\nexport function normalizeReagent(reagent: ReagentTemplateInput): ReagentRecord {\n return {\n ...reagent,\n expiryDate: normalizeDateString(reagent.expiryDate),\n kind: reagent.kind ?? 'reagent',\n metadata: reagent.metadata ?? {},\n }\n}\n\nfunction normalizeDateString(value: Date | string | null | undefined): string | undefined {\n if (value === undefined || value === null) return undefined\n return value instanceof Date ? value.toISOString() : value\n}\n","import {\n createAssayFeatureLookup,\n createAssaySampleLookup,\n} from './assayLookups'\nimport {\n normalizeAssayFeature,\n normalizeAssaySample,\n} from './assayNormalizers'\nimport { idFromName } from './builderIdUtils'\nimport { createTemplateEnvelope } from './templateEnvelopes'\nimport { validateAssayMatrixData } from './templateValidators'\nimport type {\n AssayFeature,\n AssayMatrixTemplate,\n AssayMatrixTemplateData,\n AssaySample,\n CreateAssayMatrixTemplateOptions,\n} from './types'\n\nexport function createAssayMatrixTemplate(\n options: CreateAssayMatrixTemplateOptions\n): AssayMatrixTemplate {\n const samples = options.samples.map((sample, index): AssaySample => {\n if (typeof sample !== 'string') return normalizeAssaySample(sample)\n return {\n sampleId: idFromName(sample, `sample-${index + 1}`),\n name: sample,\n metadata: {},\n }\n })\n const features = options.features.map((feature, index): AssayFeature => {\n if (typeof feature !== 'string') return normalizeAssayFeature(feature)\n return {\n id: idFromName(feature, `feature-${index + 1}`),\n name: feature,\n type: 'readout',\n metadata: {},\n }\n })\n const sampleLookup = createAssaySampleLookup(samples)\n const featureLookup = createAssayFeatureLookup(features)\n const measurements = Object.entries(options.values ?? {}).flatMap(([sampleId, featureValues]) =>\n Object.entries(featureValues).map(([featureId, value]) => ({\n sampleId: sampleLookup.get(sampleId) ?? sampleId,\n featureId: featureLookup.get(featureId) ?? featureId,\n value,\n metadata: {},\n }))\n )\n\n const data: AssayMatrixTemplateData = {\n samples,\n features,\n measurements,\n metadata: options.metadata ?? {},\n }\n validateAssayMatrixData(data)\n return createTemplateEnvelope('assay-matrix', data, options.metadata ?? {})\n}\n","import { normalizeReagent } from './assayNormalizers'\nimport { idFromName } from './builderIdUtils'\nimport { createTemplateEnvelope } from './templateEnvelopes'\nimport { validateReagentListData } from './templateValidators'\nimport type {\n CreateReagentListTemplateOptions,\n ReagentListTemplate,\n ReagentListTemplateData,\n ReagentRecord,\n} from './types'\n\nexport function createReagentListTemplate(\n options: CreateReagentListTemplateOptions\n): ReagentListTemplate {\n const reagents = options.reagents.map((reagent, index): ReagentRecord => {\n if (typeof reagent !== 'string') return normalizeReagent(reagent)\n return {\n id: idFromName(reagent, `reagent-${index + 1}`),\n name: reagent,\n kind: 'reagent',\n metadata: {},\n }\n })\n const data: ReagentListTemplateData = {\n reagents,\n metadata: options.metadata ?? {},\n }\n validateReagentListData(data)\n return createTemplateEnvelope('reagent-list', data, options.metadata ?? {})\n}\n","import type {\n FlowPanelControl,\n FlowPanelMarker,\n} from './types'\nimport { idFromName } from './builderIdUtils'\n\nexport function normalizeFlowMarker(\n marker: Partial<FlowPanelMarker> & { marker: string },\n index: number\n): FlowPanelMarker {\n return {\n id: marker.id ?? idFromName(marker.marker, `marker-${index + 1}`),\n marker: marker.marker,\n fluorophore: marker.fluorophore ?? 'unassigned',\n detector: marker.detector,\n clone: marker.clone,\n reagentId: marker.reagentId,\n purpose: marker.purpose ?? 'phenotype',\n compensationRequired: marker.compensationRequired ?? true,\n metadata: marker.metadata ?? {},\n }\n}\n\nexport function normalizeFlowControl(\n control: Partial<FlowPanelControl> & { name: string },\n index: number\n): FlowPanelControl {\n return {\n id: control.id ?? idFromName(control.name, `control-${index + 1}`),\n name: control.name,\n kind: control.kind ?? 'other',\n markerId: control.markerId,\n required: control.required ?? true,\n metadata: control.metadata ?? {},\n }\n}\n\nexport function defaultFlowControls(markers: FlowPanelMarker[]): FlowPanelControl[] {\n return [\n {\n id: 'unstained',\n name: 'Unstained',\n kind: 'unstained',\n required: true,\n metadata: {},\n },\n ...markers\n .filter(marker => marker.compensationRequired)\n .map(marker => ({\n id: `${marker.id}-single-stain`,\n name: `${marker.marker} single stain`,\n kind: 'single-stain' as const,\n markerId: marker.id,\n required: true,\n metadata: {},\n })),\n ]\n}\n","import { idFromName } from './builderIdUtils'\nimport {\n defaultFlowControls,\n normalizeFlowControl,\n normalizeFlowMarker,\n} from './flowNormalizers'\nimport { createTemplateEnvelope } from './templateEnvelopes'\nimport { validateFlowCytometryPanelData } from './templateValidators'\nimport type {\n CreateFlowCytometryPanelTemplateOptions,\n FlowCytometryPanelTemplate,\n FlowCytometryPanelTemplateData,\n FlowPanelControl,\n FlowPanelMarker,\n} from './types'\n\nexport function createFlowCytometryPanelTemplate(\n options: CreateFlowCytometryPanelTemplateOptions\n): FlowCytometryPanelTemplate {\n const markers = options.markers.map((marker, index): FlowPanelMarker => {\n if (typeof marker !== 'string') return normalizeFlowMarker(marker, index)\n return {\n id: idFromName(marker, `marker-${index + 1}`),\n marker,\n fluorophore: 'unassigned',\n purpose: 'phenotype',\n compensationRequired: true,\n metadata: {},\n }\n })\n const controls = options.controls === undefined\n ? options.includeDefaultControls === false\n ? []\n : defaultFlowControls(markers)\n : options.controls.map((control, index): FlowPanelControl => {\n if (typeof control !== 'string') return normalizeFlowControl(control, index)\n return {\n id: idFromName(control, `control-${index + 1}`),\n name: control,\n kind: 'other',\n required: true,\n metadata: {},\n }\n })\n const data: FlowCytometryPanelTemplateData = {\n markers,\n controls,\n instrument: options.instrument,\n metadata: options.metadata ?? {},\n }\n validateFlowCytometryPanelData(data)\n return createTemplateEnvelope('flow-cytometry-panel', data, options.metadata ?? {})\n}\n","import type {\n InstrumentMethod,\n InstrumentRunItem,\n QpcrSample,\n QpcrTarget,\n} from './types'\nimport { idFromName } from './builderIdUtils'\n\nexport function normalizeInstrumentMethod(\n method: Partial<InstrumentMethod> & { name?: string },\n fallbackInstrument?: string\n): InstrumentMethod {\n const name = method.name || method.id || 'Default method'\n return {\n id: method.id || idFromName(name, 'method-1'),\n name,\n instrument: method.instrument ?? fallbackInstrument,\n acquisitionMode: method.acquisitionMode,\n metadata: method.metadata ?? {},\n }\n}\n\nexport function normalizeInstrumentRunItem(\n item: Partial<InstrumentRunItem> & { name?: string; sampleId?: string },\n defaultMethodId: string,\n fallbackOrder: number,\n index: number\n): InstrumentRunItem {\n const kind = item.kind ?? 'sample'\n const sampleId = item.sampleId || (kind === 'sample'\n ? idFromName(item.name ?? `Sample ${index + 1}`, `sample-${index + 1}`)\n : undefined)\n const label = item.name ?? sampleId ?? kind\n return {\n id: item.id || idFromName(label, `${kind}-${index + 1}`),\n order: item.order ?? fallbackOrder,\n kind,\n sampleId,\n name: item.name,\n methodId: item.methodId || defaultMethodId,\n vial: item.vial,\n plateId: item.plateId,\n wellId: item.wellId,\n injectionVolume: item.injectionVolume,\n expectedDurationMin: item.expectedDurationMin,\n status: item.status ?? 'planned',\n metadata: item.metadata ?? {},\n }\n}\n\nexport function normalizeQpcrSample(sample: QpcrSample): QpcrSample {\n return {\n ...sample,\n metadata: sample.metadata ?? {},\n }\n}\n\nexport function normalizeQpcrTarget(target: QpcrTarget): QpcrTarget {\n return {\n ...target,\n metadata: target.metadata ?? {},\n }\n}\n","import { idFromName } from './builderIdUtils'\nimport {\n normalizeInstrumentMethod,\n normalizeInstrumentRunItem,\n} from './runNormalizers'\nimport { createTemplateEnvelope } from './templateEnvelopes'\nimport { validateInstrumentRunData } from './templateValidators'\nimport type {\n CreateInstrumentRunTemplateOptions,\n InstrumentRunItem,\n InstrumentRunTemplate,\n InstrumentRunTemplateData,\n} from './types'\n\nexport function createInstrumentRunTemplate(\n options: CreateInstrumentRunTemplateOptions\n): InstrumentRunTemplate {\n const method = typeof options.method === 'string' || options.method === undefined\n ? {\n id: idFromName(options.method ?? 'Default method', 'method-1'),\n name: options.method ?? 'Default method',\n instrument: options.instrument,\n metadata: {},\n }\n : normalizeInstrumentMethod(options.method, options.instrument)\n const items: InstrumentRunItem[] = []\n let order = 1\n\n if (options.includeBlanks !== false) {\n items.push({\n id: 'blank-start',\n order,\n kind: 'blank',\n name: 'Blank start',\n methodId: method.id,\n status: 'planned',\n metadata: {},\n })\n order += 1\n }\n\n if (options.includeQc !== false) {\n items.push({\n id: 'qc-start',\n order,\n kind: 'qc',\n name: 'QC start',\n methodId: method.id,\n status: 'planned',\n metadata: {},\n })\n order += 1\n }\n\n for (const [index, item] of options.items.entries()) {\n if (typeof item !== 'string') {\n const normalized = normalizeInstrumentRunItem(item, method.id, order, index)\n items.push(normalized)\n order = Math.max(order, normalized.order + 1)\n continue\n }\n const sampleId = idFromName(item, `sample-${index + 1}`)\n items.push({\n id: `${sampleId}-run`,\n order,\n kind: 'sample',\n sampleId,\n name: item,\n methodId: method.id,\n status: 'planned',\n metadata: {},\n })\n order += 1\n }\n\n if (options.includeQc !== false) {\n items.push({\n id: 'qc-end',\n order,\n kind: 'qc',\n name: 'QC end',\n methodId: method.id,\n status: 'planned',\n metadata: {},\n })\n }\n\n const data: InstrumentRunTemplateData = {\n runId: 'run-1',\n instrument: options.instrument,\n methods: [method],\n items,\n metadata: options.metadata ?? {},\n }\n validateInstrumentRunData(data)\n return createTemplateEnvelope('instrument-run', data, options.metadata ?? {})\n}\n","import { idFromName } from './builderIdUtils'\nimport { wellIdsForFormat } from './plateGeometry'\nimport {\n normalizeQpcrSample,\n normalizeQpcrTarget,\n} from './runNormalizers'\nimport { createTemplateEnvelope } from './templateEnvelopes'\nimport { validateQpcrPlateData } from './templateValidators'\nimport type {\n CreateQpcrPlateTemplateOptions,\n QpcrPlateTemplate,\n QpcrPlateTemplateData,\n QpcrReaction,\n QpcrSample,\n QpcrTarget,\n} from './types'\n\nexport function createQpcrPlateTemplate(\n options: CreateQpcrPlateTemplateOptions\n): QpcrPlateTemplate {\n const format = options.format ?? 96\n const replicates = options.replicates ?? 3\n if (replicates < 1) {\n throw new Error('qPCR replicates must be at least 1.')\n }\n\n const samples = options.samples.map((sample, index): QpcrSample => {\n if (typeof sample !== 'string') return normalizeQpcrSample(sample)\n return {\n sampleId: idFromName(sample, `sample-${index + 1}`),\n name: sample,\n metadata: {},\n }\n })\n const targets = options.targets.map((target, index): QpcrTarget => {\n if (typeof target !== 'string') return normalizeQpcrTarget(target)\n return {\n id: idFromName(target, `target-${index + 1}`),\n name: target,\n metadata: {},\n }\n })\n const wells = wellIdsForFormat(format)\n let wellIndex = 0\n const reactions: QpcrReaction[] = []\n\n for (const sample of samples) {\n for (const target of targets) {\n for (let replicate = 1; replicate <= replicates; replicate += 1) {\n const wellId = wells[wellIndex]\n if (!wellId) throw new Error(`qPCR plate format ${format} does not have enough wells.`)\n reactions.push({\n id: `${sample.sampleId}-${target.id}-r${replicate}`,\n wellId,\n sampleId: sample.sampleId,\n targetId: target.id,\n replicate,\n controlKind: 'sample',\n flags: [],\n metadata: {},\n })\n wellIndex += 1\n }\n }\n }\n\n if (options.includeNoTemplateControls !== false) {\n for (const target of targets) {\n const wellId = wells[wellIndex]\n if (!wellId) throw new Error(`qPCR plate format ${format} does not have enough wells.`)\n reactions.push({\n id: `ntc-${target.id}`,\n wellId,\n targetId: target.id,\n replicate: 1,\n controlKind: 'no-template',\n flags: [],\n metadata: {},\n })\n wellIndex += 1\n }\n }\n\n const data: QpcrPlateTemplateData = {\n plateId: 'qpcr-plate-1',\n format,\n samples,\n targets,\n reactions,\n instrument: options.instrument,\n chemistry: options.chemistry ?? 'sybr',\n metadata: options.metadata ?? {},\n }\n validateQpcrPlateData(data)\n return createTemplateEnvelope('qpcr-plate', data, options.metadata ?? {})\n}\n","import { createQpcrPlateTemplate } from './qpcrPlateBuilder'\nimport { createSampleSheetTemplate } from './sampleSheetBuilder'\nimport { presetSampleRecords } from './sampleNormalizers'\nimport { createTemplateCollection } from './templateEnvelopes'\nimport type {\n CreateQpcrExpressionCollectionOptions,\n TemplateCollectionEnvelope,\n} from './types'\n\nexport function createQpcrExpressionCollection(\n options: CreateQpcrExpressionCollectionOptions = {}\n): TemplateCollectionEnvelope {\n const sampleRecords = presetSampleRecords(options.samples ?? ['Control', 'Treatment'])\n const sampleSheet = createSampleSheetTemplate({ samples: sampleRecords })\n const qpcr = createQpcrPlateTemplate({\n samples: sampleRecords.map(sample => ({\n sampleId: sample.sampleId,\n name: sample.name,\n group: sample.group,\n metadata: sample.metadata ?? {},\n })),\n targets: options.targets ?? ['ACTB', 'GAPDH'],\n chemistry: options.chemistry,\n format: options.format,\n includeNoTemplateControls: options.includeNoTemplateControls,\n replicates: options.replicates ?? 3,\n instrument: options.instrument,\n })\n return createTemplateCollection(\n [sampleSheet, qpcr],\n { preset: 'qpcr-expression', ...(options.metadata ?? {}) }\n )\n}\n","import { createAssayMatrixTemplate } from './assayMatrixBuilder'\nimport { createInstrumentRunTemplate } from './instrumentRunBuilder'\nimport { createSampleSheetTemplate } from './sampleSheetBuilder'\nimport { presetSampleRecords } from './sampleNormalizers'\nimport { createTemplateCollection } from './templateEnvelopes'\nimport type {\n CreateLcmsBatchCollectionOptions,\n TemplateCollectionEnvelope,\n} from './types'\n\nexport function createLcmsBatchCollection(\n options: CreateLcmsBatchCollectionOptions = {}\n): TemplateCollectionEnvelope {\n const sampleRecords = presetSampleRecords(options.samples ?? ['S001', 'S002'])\n const sampleSheet = createSampleSheetTemplate({ samples: sampleRecords })\n const instrumentRun = createInstrumentRunTemplate({\n items: sampleRecords.map(sample => ({\n sampleId: sample.sampleId,\n name: sample.name ?? sample.sampleId,\n })),\n method: options.method ?? 'Default method',\n instrument: options.instrument ?? 'LC-MS',\n includeQc: options.includeQc,\n })\n const assayMatrix = createAssayMatrixTemplate({\n samples: sampleRecords.map(sample => ({\n sampleId: sample.sampleId,\n name: sample.name,\n group: sample.group,\n metadata: sample.metadata ?? {},\n })),\n features: options.features ?? ['Glucose', 'Lactate'],\n })\n return createTemplateCollection(\n [sampleSheet, instrumentRun, assayMatrix],\n { preset: 'lcms-batch', ...(options.metadata ?? {}) }\n )\n}\n","import type {\n AssayFeature,\n CalibrationPoint,\n InstrumentRunItemInput,\n ReagentTemplateInput,\n SampleRecord,\n} from './types'\nimport {\n normalizeAssayFeature,\n normalizeReagent,\n} from './assayNormalizers'\nimport { idFromName } from './builderIdUtils'\n\nexport function normalizeMetaboliteFeatures(\n metabolites: Array<string | AssayFeature>,\n responseUnit: string,\n): AssayFeature[] {\n return metabolites.map((metabolite, index) => {\n if (typeof metabolite === 'string') {\n return {\n id: idFromName(metabolite, `metabolite-${index + 1}`),\n name: metabolite,\n type: 'metabolite',\n unit: responseUnit,\n metadata: { quantitation: 'targeted' },\n }\n }\n\n const feature = normalizeAssayFeature(metabolite)\n return {\n ...feature,\n type: feature.type ?? 'metabolite',\n unit: feature.unit ?? responseUnit,\n metadata: {\n quantitation: 'targeted',\n ...feature.metadata,\n },\n }\n })\n}\n\nexport function normalizeInternalStandardReagents(\n internalStandards: Array<string | ReagentTemplateInput>,\n): ReagentTemplateInput[] {\n return internalStandards.map((standard, index) => {\n if (typeof standard === 'string') {\n return {\n id: idFromName(standard, `internal-standard-${index + 1}`),\n name: standard,\n kind: 'compound',\n metadata: { role: 'internal-standard' },\n }\n }\n\n const reagent = normalizeReagent(standard)\n return {\n ...reagent,\n kind: standard.kind ?? 'compound',\n metadata: {\n role: 'internal-standard',\n ...reagent.metadata,\n },\n }\n })\n}\n\nexport function targetedMetabolomicsRunItems(\n samples: SampleRecord[],\n calibrationPoints: CalibrationPoint[],\n includeQc: boolean,\n): InstrumentRunItemInput[] {\n const calibrationItems = calibrationPoints\n .filter(point => point.role !== 'qc' || includeQc)\n .filter(point => point.role === 'blank' || point.role === 'standard' || point.role === 'qc')\n .map((point): InstrumentRunItemInput => ({\n id: `${point.id}-run`,\n kind: calibrationRunItemKind(point.role),\n name: point.level,\n metadata: {\n concentration: point.concentration,\n unit: point.unit,\n role: point.role,\n },\n }))\n\n const sampleItems = samples.map((sample): InstrumentRunItemInput => ({\n sampleId: sample.sampleId,\n name: sample.name ?? sample.sampleId,\n kind: 'sample',\n }))\n\n return [...calibrationItems, ...sampleItems]\n}\n\nexport function firstFeatureName(features: AssayFeature[], fallback: string): string {\n return features.find(feature => feature.name)?.name ?? fallback\n}\n\nfunction calibrationRunItemKind(role: CalibrationPoint['role']): 'blank' | 'standard' | 'qc' {\n if (role === 'blank' || role === 'standard' || role === 'qc') return role\n return 'standard'\n}\n","import { createAssayMatrixTemplate } from './assayMatrixBuilder'\nimport { createCalibrationCurveTemplate } from './calibrationCurveBuilder'\nimport { createInstrumentRunTemplate } from './instrumentRunBuilder'\nimport { createReagentListTemplate } from './reagentListBuilder'\nimport { createSamplePrepTemplate } from './samplePrepBuilder'\nimport { createSampleSheetTemplate } from './sampleSheetBuilder'\nimport { presetSampleRecords } from './sampleNormalizers'\nimport {\n firstFeatureName,\n normalizeInternalStandardReagents,\n normalizeMetaboliteFeatures,\n targetedMetabolomicsRunItems,\n} from './targetedMetabolomicsHelpers'\nimport { createTemplateCollection } from './templateEnvelopes'\nimport type {\n CreateTargetedMetabolomicsCollectionOptions,\n TemplateCollectionEnvelope,\n} from './types'\n\nexport function createTargetedMetabolomicsCollection(\n options: CreateTargetedMetabolomicsCollectionOptions = {}\n): TemplateCollectionEnvelope {\n const sampleRecords = presetSampleRecords(options.samples ?? ['S001', 'S002'])\n const responseUnit = options.responseUnit ?? 'peak area ratio'\n const concentrationUnit = options.concentrationUnit ?? 'uM'\n const metaboliteFeatures = normalizeMetaboliteFeatures(\n options.metabolites ?? ['Glucose', 'Lactate', 'Pyruvate'],\n responseUnit,\n )\n const sampleSheet = createSampleSheetTemplate({ samples: sampleRecords })\n const samplePrep = createSamplePrepTemplate({\n samples: sampleRecords.map(sample => sample.sampleId),\n prepType: options.prepType ?? 'extraction',\n protocolName: 'Metabolomics sample preparation',\n outputVolume: options.outputVolume ?? 50,\n metadata: { assay: 'targeted-metabolomics' },\n })\n const reagents = createReagentListTemplate({\n reagents: normalizeInternalStandardReagents(\n options.internalStandards ?? ['Stable isotope internal standard mix'],\n ),\n metadata: { assay: 'targeted-metabolomics' },\n })\n const calibrationCurve = createCalibrationCurveTemplate({\n concentrations: options.standardConcentrations ?? [0.1, 1, 10, 100],\n analyte: options.calibrationAnalyte ?? firstFeatureName(metaboliteFeatures, 'Metabolite panel'),\n unit: concentrationUnit,\n responseUnit,\n model: 'linear-weighted-1-x',\n includeQc: options.includeQc,\n metadata: { assay: 'targeted-metabolomics' },\n })\n const instrumentRun = createInstrumentRunTemplate({\n items: targetedMetabolomicsRunItems(\n sampleRecords,\n calibrationCurve.data.points,\n options.includeQc !== false,\n ),\n method: options.method ?? 'Targeted metabolomics',\n instrument: options.instrument ?? 'LC-MS',\n includeBlanks: false,\n includeQc: false,\n metadata: { assay: 'targeted-metabolomics' },\n })\n const assayMatrix = createAssayMatrixTemplate({\n samples: sampleRecords.map(sample => ({\n sampleId: sample.sampleId,\n name: sample.name,\n group: sample.group,\n metadata: sample.metadata ?? {},\n })),\n features: metaboliteFeatures,\n metadata: { assay: 'targeted-metabolomics', responseUnit },\n })\n return createTemplateCollection(\n [sampleSheet, samplePrep, reagents, instrumentRun, calibrationCurve, assayMatrix],\n { preset: 'targeted-metabolomics', ...(options.metadata ?? {}) }\n )\n}\n","import { createAssayMatrixTemplate } from './assayMatrixBuilder'\nimport { DEFAULT_SAMPLE_COLORS } from './builderDefaults'\nimport { idFromName } from './builderIdUtils'\nimport { createCalibrationCurveTemplate } from './calibrationCurveBuilder'\nimport { createPlateMapTemplate } from './plateMapBuilder'\nimport { createSampleSheetTemplate } from './sampleSheetBuilder'\nimport { presetSampleRecords } from './sampleNormalizers'\nimport { createTemplateCollection } from './templateEnvelopes'\nimport type {\n CreateElisaAssayCollectionOptions,\n TemplateCollectionEnvelope,\n} from './types'\n\nexport function createElisaAssayCollection(\n options: CreateElisaAssayCollectionOptions = {}\n): TemplateCollectionEnvelope {\n const sampleRecords = presetSampleRecords(options.samples ?? ['Control', 'Treatment'])\n const analyte = options.analyte ?? 'Analyte'\n const responseUnit = options.responseUnit ?? 'OD450'\n const plate = createPlateMapTemplate({\n name: options.plateName ?? 'ELISA plate',\n format: options.plateFormat ?? 96,\n samples: [\n { id: 'blank', name: 'Blank' },\n { id: 'standard', name: 'Standards' },\n { id: 'qc', name: 'QC' },\n ...sampleRecords.map((sample, index) => ({\n id: sample.sampleId,\n name: sample.name ?? sample.sampleId,\n color: DEFAULT_SAMPLE_COLORS[index % DEFAULT_SAMPLE_COLORS.length],\n })),\n ],\n })\n const sampleSheet = createSampleSheetTemplate({ samples: sampleRecords })\n const calibrationCurve = createCalibrationCurveTemplate({\n concentrations: options.standardConcentrations ?? [1000, 100, 10, 1],\n analyte,\n unit: options.unit ?? 'pg/mL',\n responseUnit,\n model: 'four-parameter-logistic',\n })\n const assayMatrix = createAssayMatrixTemplate({\n samples: sampleRecords.map(sample => ({\n sampleId: sample.sampleId,\n name: sample.name,\n group: sample.group,\n metadata: sample.metadata ?? {},\n })),\n features: [{\n id: idFromName(analyte, 'analyte'),\n name: analyte,\n type: 'protein',\n unit: responseUnit,\n metadata: {},\n }],\n metadata: { analyte, responseUnit },\n })\n return createTemplateCollection(\n [plate, sampleSheet, calibrationCurve, assayMatrix],\n { preset: 'elisa-assay', ...(options.metadata ?? {}) }\n )\n}\n","import { createAssayMatrixTemplate } from './assayMatrixBuilder'\nimport { createFlowCytometryPanelTemplate } from './flowCytometryPanelBuilder'\nimport { createSampleSheetTemplate } from './sampleSheetBuilder'\nimport { presetSampleRecords } from './sampleNormalizers'\nimport { createTemplateCollection } from './templateEnvelopes'\nimport type {\n CreateFlowCytometryAssayCollectionOptions,\n TemplateCollectionEnvelope,\n} from './types'\n\nexport function createFlowCytometryAssayCollection(\n options: CreateFlowCytometryAssayCollectionOptions = {}\n): TemplateCollectionEnvelope {\n const sampleRecords = presetSampleRecords(options.samples ?? ['Control', 'Treatment'])\n const markers = options.markers ?? ['CD3', 'CD4', 'CD8']\n const sampleSheet = createSampleSheetTemplate({ samples: sampleRecords })\n const flowPanel = createFlowCytometryPanelTemplate({\n markers,\n instrument: options.instrument ?? 'Flow cytometer',\n includeDefaultControls: options.includeDefaultControls,\n })\n const assayMatrix = createAssayMatrixTemplate({\n samples: sampleRecords.map(sample => ({\n sampleId: sample.sampleId,\n name: sample.name,\n group: sample.group,\n metadata: sample.metadata ?? {},\n })),\n features: options.features ?? flowPanel.data.markers.map(marker => ({\n id: marker.id,\n name: `${marker.marker}+ cells`,\n type: 'cell',\n unit: '%',\n metadata: { marker: marker.marker, fluorophore: marker.fluorophore },\n })),\n })\n return createTemplateCollection(\n [sampleSheet, flowPanel, assayMatrix],\n { preset: 'flow-cytometry-assay', ...(options.metadata ?? {}) }\n )\n}\n","import { createAssayMatrixTemplate } from './assayMatrixBuilder'\nimport { idFromName } from './builderIdUtils'\nimport { createProtocolStepsTemplate } from './protocolStepsBuilder'\nimport { createReagentListTemplate } from './reagentListBuilder'\nimport { createSampleSheetTemplate } from './sampleSheetBuilder'\nimport { presetSampleRecords } from './sampleNormalizers'\nimport { createTemplateCollection } from './templateEnvelopes'\nimport type {\n CreateWesternBlotAssayCollectionOptions,\n TemplateCollectionEnvelope,\n} from './types'\n\nexport function createWesternBlotAssayCollection(\n options: CreateWesternBlotAssayCollectionOptions = {}\n): TemplateCollectionEnvelope {\n const sampleRecords = presetSampleRecords(options.samples ?? ['Control', 'Treatment'])\n const loadingControl = options.loadingControl ?? 'ACTB'\n const targetNames = (options.targets ?? ['Target protein']).map(target =>\n typeof target === 'string' ? target : target.name ?? target.id\n )\n const featureNames = loadingControl && !targetNames.includes(loadingControl)\n ? [...targetNames, loadingControl]\n : targetNames\n const sampleSheet = createSampleSheetTemplate({ samples: sampleRecords })\n const reagentList = createReagentListTemplate({\n reagents: [\n { id: 'primary-antibody', name: 'Primary antibody', kind: 'antibody', storageCondition: '4C' },\n { id: 'secondary-antibody', name: 'Secondary antibody', kind: 'antibody', storageCondition: '4C' },\n { id: 'lysis-buffer', name: 'Lysis buffer', kind: 'buffer', storageCondition: '4C' },\n { id: 'blocking-buffer', name: 'Blocking buffer', kind: 'buffer', storageCondition: '4C' },\n { id: 'wash-buffer', name: 'TBST wash buffer', kind: 'buffer', storageCondition: 'RT' },\n { id: 'substrate', name: 'Detection substrate', kind: 'reagent', storageCondition: '4C' },\n ],\n metadata: { assay: 'western-blot' },\n })\n const protocol = createProtocolStepsTemplate({\n steps: [\n { id: 'lyse-samples', type: 'addition', name: 'Lyse samples', duration: 30 },\n { id: 'run-gel', type: 'custom', name: 'Run SDS-PAGE', duration: 90 },\n { id: 'transfer', type: 'transfer', name: 'Transfer to membrane', duration: 60 },\n { id: 'block', type: 'incubation', name: 'Block membrane', duration: 60 },\n { id: 'primary-antibody', type: 'incubation', name: 'Primary antibody incubation', duration: 960 },\n { id: 'secondary-antibody', type: 'incubation', name: 'Secondary antibody incubation', duration: 60 },\n { id: 'detect', type: 'measurement', name: 'Detect and quantify bands', duration: 30 },\n ],\n metadata: { assay: 'western-blot' },\n })\n const assayMatrix = createAssayMatrixTemplate({\n samples: sampleRecords.map(sample => ({\n sampleId: sample.sampleId,\n name: sample.name,\n group: sample.group,\n metadata: sample.metadata ?? {},\n })),\n features: featureNames.map((feature, index) => ({\n id: idFromName(feature, `feature-${index + 1}`),\n name: feature,\n type: 'protein',\n unit: 'relative intensity',\n metadata: { loadingControl: feature === loadingControl },\n })),\n metadata: { assay: 'western-blot', loadingControl },\n })\n return createTemplateCollection(\n [sampleSheet, reagentList, protocol, assayMatrix],\n { preset: 'western-blot-assay', ...(options.metadata ?? {}) }\n )\n}\n","import { getBioTemplateInfo } from './catalog'\nimport { createAssayMatrixTemplate } from './assayMatrixBuilder'\nimport { createCalibrationCurveTemplate } from './calibrationCurveBuilder'\nimport { createDoseResponseTemplate } from './doseResponseBuilder'\nimport { createFlowCytometryPanelTemplate } from './flowCytometryPanelBuilder'\nimport { createInstrumentRunTemplate } from './instrumentRunBuilder'\nimport { createPlateMapTemplate } from './plateMapBuilder'\nimport { createProtocolStepsTemplate } from './protocolStepsBuilder'\nimport { createQpcrPlateTemplate } from './qpcrPlateBuilder'\nimport { createReagentListTemplate } from './reagentListBuilder'\nimport { createSamplePrepTemplate } from './samplePrepBuilder'\nimport { createSampleSheetTemplate } from './sampleSheetBuilder'\nimport { createTimeCourseTemplate } from './timeCourseBuilder'\nimport type {\n BioTemplateEnvelope,\n TemplateId,\n} from './types'\n\nexport function createDefaultBioTemplate(templateId: TemplateId | string): BioTemplateEnvelope<unknown> {\n const template = getBioTemplateInfo(templateId)\n if (!template) {\n throw new Error(`Unknown bio template '${templateId}'.`)\n }\n\n switch (template.template_id) {\n case 'plate-map':\n return createPlateMapTemplate({\n name: 'Plate 1',\n samples: ['Control', 'Treatment'],\n })\n case 'sample-sheet':\n return createSampleSheetTemplate({\n samples: [\n { sampleId: 'S001', name: 'Control 1', group: 'Control' },\n { sampleId: 'S002', name: 'Treatment 1', group: 'Treatment' },\n ],\n })\n case 'sample-prep':\n return createSamplePrepTemplate({\n samples: ['S001', 'S002'],\n prepType: 'extraction',\n outputVolume: 50,\n })\n case 'dose-response':\n return createDoseResponseTemplate({\n compounds: {\n 'Compound A': [10, 1, 0.1],\n },\n unit: 'uM',\n replicates: 3,\n })\n case 'calibration-curve':\n return createCalibrationCurveTemplate({\n concentrations: [0.1, 1, 10, 100],\n analyte: 'Analyte',\n unit: 'uM',\n })\n case 'time-course':\n return createTimeCourseTemplate({\n timepoints: [0, 6, 24],\n unit: 'hour',\n conditions: ['Control', 'Treatment'],\n replicates: 3,\n })\n case 'protocol-steps':\n return createProtocolStepsTemplate({\n steps: [\n {\n id: 'seed-cells',\n type: 'addition',\n name: 'Seed cells',\n description: 'Add cells to wells or culture vessels.',\n duration: 15,\n },\n {\n id: 'incubate-overnight',\n type: 'incubation',\n name: 'Incubate overnight',\n duration: 960,\n parameters: { temperature: '37 C', co2: '5%' },\n },\n {\n id: 'measure-readout',\n type: 'measurement',\n name: 'Measure readout',\n duration: 45,\n },\n ],\n })\n case 'assay-matrix':\n return createAssayMatrixTemplate({\n samples: ['S001', 'S002'],\n features: ['Lactate', 'Glucose'],\n values: {\n s001: { lactate: 1.2, glucose: 5.4 },\n s002: { lactate: 2.1, glucose: 4.8 },\n },\n })\n case 'reagent-list':\n return createReagentListTemplate({\n reagents: ['DMSO', 'Compound A', 'Anti-HA antibody'],\n })\n case 'flow-cytometry-panel':\n return createFlowCytometryPanelTemplate({\n markers: ['CD3', 'CD4', 'CD8'],\n instrument: 'BD LSRFortessa',\n })\n case 'instrument-run':\n return createInstrumentRunTemplate({\n items: ['S001', 'S002'],\n instrument: 'LC-MS',\n method: 'Default method',\n })\n case 'qpcr-plate':\n return createQpcrPlateTemplate({\n samples: ['Control', 'Treatment'],\n targets: ['ACTB', 'GAPDH'],\n replicates: 3,\n instrument: 'QuantStudio',\n })\n default:\n throw new Error(`Unknown bio template '${templateId}'.`)\n }\n}\n","import { getBioTemplatePackInfo } from './packs'\nimport { createDefaultBioTemplate } from './defaultBioTemplateBuilder'\nimport { createTemplateCollection } from './templateEnvelopes'\nimport type {\n CreateBioTemplatePackCollectionOptions,\n TemplateCollectionEnvelope,\n TemplatePackId,\n} from './types'\n\nexport function createBioTemplatePackCollection(\n name: TemplatePackId | string,\n options: CreateBioTemplatePackCollectionOptions = {},\n): TemplateCollectionEnvelope {\n const pack = getBioTemplatePackInfo(name)\n if (!pack) {\n throw new Error(`Unknown template pack '${name}'.`)\n }\n\n return createTemplateCollection(\n pack.templates.map(templateId => createDefaultBioTemplate(templateId)),\n { pack: pack.name, ...(options.metadata ?? {}) },\n )\n}\n","import { DEFAULT_SAMPLE_COLORS } from './builderDefaults'\nimport { createDoseResponseTemplate } from './doseResponseBuilder'\nimport { createPlateMapTemplate } from './plateMapBuilder'\nimport { createSampleSheetTemplate } from './sampleSheetBuilder'\nimport { presetSampleRecords } from './sampleNormalizers'\nimport { createTemplateCollection } from './templateEnvelopes'\nimport type {\n CreateWellPlateScreenCollectionOptions,\n TemplateCollectionEnvelope,\n} from './types'\n\nexport function createWellPlateScreenCollection(\n options: CreateWellPlateScreenCollectionOptions = {}\n): TemplateCollectionEnvelope {\n const sampleRecords = presetSampleRecords(options.samples ?? ['Control', 'Treatment'])\n const plate = createPlateMapTemplate({\n name: options.plateName ?? 'Screen plate',\n format: options.plateFormat ?? 96,\n samples: sampleRecords.map((sample, index) => ({\n id: sample.sampleId,\n name: sample.name ?? sample.sampleId,\n color: DEFAULT_SAMPLE_COLORS[index % DEFAULT_SAMPLE_COLORS.length],\n })),\n })\n const sampleSheet = createSampleSheetTemplate({ samples: sampleRecords })\n const doseResponse = createDoseResponseTemplate({\n compounds: options.compounds ?? { 'Compound A': [10, 1, 0.1] },\n unit: options.unit ?? 'uM',\n replicates: options.replicates ?? 3,\n layout: plate,\n })\n return createTemplateCollection(\n [plate, sampleSheet, doseResponse],\n { preset: 'wellplate-screen', ...(options.metadata ?? {}) }\n )\n}\n","import { bioTemplatePresetControlValuesToOptions } from './builderPresetControls'\nimport type { BioTemplateControlValues } from './builderPresetControls'\nimport { createElisaAssayCollection } from './elisaAssayCollectionBuilder'\nimport { createFlowCytometryAssayCollection } from './flowCytometryAssayCollectionBuilder'\nimport { createLcmsBatchCollection } from './lcmsBatchCollectionBuilder'\nimport { getBioTemplatePresetInfo } from './presets'\nimport { createQpcrExpressionCollection } from './qpcrExpressionCollectionBuilder'\nimport { createTargetedMetabolomicsCollection } from './targetedMetabolomicsCollectionBuilder'\nimport { createWellPlateScreenCollection } from './wellPlateScreenCollectionBuilder'\nimport { createWesternBlotAssayCollection } from './westernBlotAssayCollectionBuilder'\nimport type {\n CreateElisaAssayCollectionOptions,\n CreateFlowCytometryAssayCollectionOptions,\n CreateLcmsBatchCollectionOptions,\n CreateQpcrExpressionCollectionOptions,\n CreateTargetedMetabolomicsCollectionOptions,\n CreateWellPlateScreenCollectionOptions,\n CreateWesternBlotAssayCollectionOptions,\n TemplateCollectionEnvelope,\n TemplatePresetId,\n} from './types'\n\nexport function createBioTemplatePresetCollection(\n name: 'wellplate-screen',\n options?: CreateWellPlateScreenCollectionOptions\n): TemplateCollectionEnvelope\nexport function createBioTemplatePresetCollection(\n name: 'qpcr-expression',\n options?: CreateQpcrExpressionCollectionOptions\n): TemplateCollectionEnvelope\nexport function createBioTemplatePresetCollection(\n name: 'lcms-batch',\n options?: CreateLcmsBatchCollectionOptions\n): TemplateCollectionEnvelope\nexport function createBioTemplatePresetCollection(\n name: 'targeted-metabolomics',\n options?: CreateTargetedMetabolomicsCollectionOptions\n): TemplateCollectionEnvelope\nexport function createBioTemplatePresetCollection(\n name: 'elisa-assay',\n options?: CreateElisaAssayCollectionOptions\n): TemplateCollectionEnvelope\nexport function createBioTemplatePresetCollection(\n name: 'flow-cytometry-assay',\n options?: CreateFlowCytometryAssayCollectionOptions\n): TemplateCollectionEnvelope\nexport function createBioTemplatePresetCollection(\n name: 'western-blot-assay',\n options?: CreateWesternBlotAssayCollectionOptions\n): TemplateCollectionEnvelope\nexport function createBioTemplatePresetCollection(\n name: string,\n options?:\n | CreateWellPlateScreenCollectionOptions\n | CreateQpcrExpressionCollectionOptions\n | CreateLcmsBatchCollectionOptions\n | CreateTargetedMetabolomicsCollectionOptions\n | CreateElisaAssayCollectionOptions\n | CreateFlowCytometryAssayCollectionOptions\n | CreateWesternBlotAssayCollectionOptions\n): TemplateCollectionEnvelope\nexport function createBioTemplatePresetCollection(\n name: TemplatePresetId | string,\n options:\n | CreateWellPlateScreenCollectionOptions\n | CreateQpcrExpressionCollectionOptions\n | CreateLcmsBatchCollectionOptions\n | CreateTargetedMetabolomicsCollectionOptions\n | CreateElisaAssayCollectionOptions\n | CreateFlowCytometryAssayCollectionOptions\n | CreateWesternBlotAssayCollectionOptions = {}\n): TemplateCollectionEnvelope {\n const preset = getBioTemplatePresetInfo(name)\n if (!preset) {\n throw new Error(`Unknown template preset '${name}'.`)\n }\n if (preset.name === 'wellplate-screen') {\n return createWellPlateScreenCollection(options as CreateWellPlateScreenCollectionOptions)\n }\n if (preset.name === 'qpcr-expression') {\n return createQpcrExpressionCollection(options as CreateQpcrExpressionCollectionOptions)\n }\n if (preset.name === 'lcms-batch') {\n return createLcmsBatchCollection(options as CreateLcmsBatchCollectionOptions)\n }\n if (preset.name === 'targeted-metabolomics') {\n return createTargetedMetabolomicsCollection(options as CreateTargetedMetabolomicsCollectionOptions)\n }\n if (preset.name === 'elisa-assay') {\n return createElisaAssayCollection(options as CreateElisaAssayCollectionOptions)\n }\n if (preset.name === 'flow-cytometry-assay') {\n return createFlowCytometryAssayCollection(options as CreateFlowCytometryAssayCollectionOptions)\n }\n if (preset.name === 'western-blot-assay') {\n return createWesternBlotAssayCollection(options as CreateWesternBlotAssayCollectionOptions)\n }\n throw new Error(`Unknown template preset '${name}'.`)\n}\n\nexport function createBioTemplatePresetCollectionFromControls(\n name: 'wellplate-screen',\n values: BioTemplateControlValues\n): TemplateCollectionEnvelope\nexport function createBioTemplatePresetCollectionFromControls(\n name: 'qpcr-expression',\n values: BioTemplateControlValues\n): TemplateCollectionEnvelope\nexport function createBioTemplatePresetCollectionFromControls(\n name: 'lcms-batch',\n values: BioTemplateControlValues\n): TemplateCollectionEnvelope\nexport function createBioTemplatePresetCollectionFromControls(\n name: 'targeted-metabolomics',\n values: BioTemplateControlValues\n): TemplateCollectionEnvelope\nexport function createBioTemplatePresetCollectionFromControls(\n name: 'elisa-assay',\n values: BioTemplateControlValues\n): TemplateCollectionEnvelope\nexport function createBioTemplatePresetCollectionFromControls(\n name: 'flow-cytometry-assay',\n values: BioTemplateControlValues\n): TemplateCollectionEnvelope\nexport function createBioTemplatePresetCollectionFromControls(\n name: 'western-blot-assay',\n values: BioTemplateControlValues\n): TemplateCollectionEnvelope\nexport function createBioTemplatePresetCollectionFromControls(\n name: TemplatePresetId | string,\n values: BioTemplateControlValues\n): TemplateCollectionEnvelope\nexport function createBioTemplatePresetCollectionFromControls(\n name: TemplatePresetId | string,\n values: BioTemplateControlValues\n): TemplateCollectionEnvelope {\n const options = bioTemplatePresetControlValuesToOptions(name, values)\n return createBioTemplatePresetCollection(name, options)\n}\n","import type {\n BioTemplateControlSchema,\n} from './controlSchemaTypes'\n\nexport function cloneSchemaMap<TName extends string>(\n schemas: Record<TName, BioTemplateControlSchema>\n): Record<TName, BioTemplateControlSchema> {\n const result = {} as Record<TName, BioTemplateControlSchema>\n for (const name of Object.keys(schemas) as TName[]) {\n result[name] = cloneControlSchema(schemas[name])\n }\n return result\n}\n\nexport function cloneControlSchema(schema: BioTemplateControlSchema): BioTemplateControlSchema {\n return Object.fromEntries(\n Object.entries(schema).map(([name, definition]) => [name, cloneControlDefinition(definition)])\n )\n}\n\nexport function cloneControlDefinition(\n definition: BioTemplateControlSchema[string]\n): BioTemplateControlSchema[string] {\n return {\n ...definition,\n options: definition.options ? [...definition.options] : undefined,\n props: definition.props ? { ...definition.props } : undefined,\n sidebar: typeof definition.sidebar === 'object' && definition.sidebar !== null\n ? { ...definition.sidebar }\n : definition.sidebar,\n }\n}\n","import {\n getBioTemplateInfo,\n} from './catalog'\nimport {\n cloneControlDefinition,\n} from './controlSchemaClone'\nimport type {\n BioTemplateControlSchema,\n} from './controlSchemaTypes'\nimport type {\n TemplateId,\n} from './types'\n\nexport function mergeTemplateControlSchemas(\n templateIds: TemplateId[],\n templateSchemas: Record<TemplateId, BioTemplateControlSchema>\n): BioTemplateControlSchema {\n const merged: BioTemplateControlSchema = {}\n for (const templateId of templateIds) {\n const schema = templateSchemas[templateId]\n const template = getBioTemplateInfo(templateId)\n for (const [name, definition] of Object.entries(schema)) {\n const key = `${camelize(templateId)}${capitalize(name)}`\n merged[key] = {\n ...cloneControlDefinition(definition),\n section: definition.section ?? templateId,\n sectionLabel: definition.sectionLabel ?? template?.label ?? templateId,\n }\n }\n }\n return merged\n}\n\nfunction camelize(value: string): string {\n return value.replace(/-([a-z0-9])/g, (_, char: string) => char.toUpperCase())\n}\n\nfunction capitalize(value: string): string {\n return value.charAt(0).toUpperCase() + value.slice(1)\n}\n","import {\n getBioTemplateInfo,\n} from './catalog'\nimport {\n getBioTemplatePackInfo,\n} from './packs'\nimport {\n getBioTemplatePresetInfo,\n} from './presets'\nimport {\n extractTemplateCollection,\n} from './templateEnvelopes'\nimport type {\n BioTemplateEnvelope,\n TemplateId,\n TemplatePresetId,\n} from './types'\nimport type {\n BioTemplateControlTarget,\n} from './controlSchemaTypes'\n\nexport type ControlSchemaResolvedTarget =\n | { kind: 'template'; name: TemplateId }\n | { kind: 'pack'; templates: TemplateId[] }\n | { kind: 'preset'; name: TemplatePresetId }\n | { kind: 'collection'; templates: TemplateId[] }\n\nexport function resolveControlSchemaTarget(\n target: BioTemplateControlTarget\n): ControlSchemaResolvedTarget | undefined {\n if (typeof target === 'string') {\n const preset = getBioTemplatePresetInfo(target)\n if (preset) return { kind: 'preset', name: preset.name }\n const pack = getBioTemplatePackInfo(target)\n if (pack) return { kind: 'pack', templates: [...pack.templates] }\n const template = getBioTemplateInfo(target)\n if (template) return { kind: 'template', name: template.template_id }\n return undefined\n }\n\n if (isTemplateEnvelope(target)) {\n const template = getBioTemplateInfo(target.template_id)\n return template ? { kind: 'template', name: template.template_id } : undefined\n }\n\n const presetName = collectionPresetName(target)\n if (presetName) {\n const preset = getBioTemplatePresetInfo(presetName)\n if (preset) return { kind: 'preset', name: preset.name }\n }\n\n const packName = collectionPackName(target)\n if (packName) {\n const pack = getBioTemplatePackInfo(packName)\n if (pack) return { kind: 'pack', templates: [...pack.templates] }\n }\n\n const collection = extractTemplateCollection(target)\n const templateIds = Object.keys(collection)\n .map(id => getBioTemplateInfo(id)?.template_id)\n .filter((id): id is TemplateId => id !== undefined)\n return templateIds.length > 0 ? { kind: 'collection', templates: templateIds } : undefined\n}\n\nexport function describeControlTarget(target: BioTemplateControlTarget): string {\n if (typeof target === 'string') return target\n if (isTemplateEnvelope(target)) return target.template_id\n return collectionPresetName(target) ?? collectionPackName(target) ?? 'template collection'\n}\n\nfunction isTemplateEnvelope(value: unknown): value is BioTemplateEnvelope<unknown> {\n return isRecord(value) && typeof value.template_id === 'string' && 'data' in value\n}\n\nfunction collectionPresetName(value: unknown): string | undefined {\n if (!isRecord(value) || !isRecord(value.metadata)) return undefined\n return typeof value.metadata.preset === 'string' ? value.metadata.preset : undefined\n}\n\nfunction collectionPackName(value: unknown): string | undefined {\n if (!isRecord(value) || !isRecord(value.metadata)) return undefined\n return typeof value.metadata.pack === 'string' ? value.metadata.pack : undefined\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null\n}\n","export const ICONS = {\n plate: ['M4 4h16v16H4z', 'M8 4v16', 'M12 4v16', 'M16 4v16', 'M4 8h16', 'M4 12h16', 'M4 16h16'],\n samples: ['M16 21v-2a4 4 0 0 0-8 0v2', 'M12 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8'],\n dose: ['M10 2v8L4 20h16l-6-10V2', 'M8 2h8', 'M7 14h10'],\n table: ['M3 5h18', 'M3 12h18', 'M3 19h18', 'M8 5v14', 'M16 5v14'],\n run: ['M4 17l6-6 4 4 6-8', 'M4 21h16'],\n settings: ['M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8', 'M4 12h2', 'M18 12h2', 'M12 4v2', 'M12 18v2'],\n}\n\nexport const PLATE_FORMAT_OPTIONS = [6, 12, 24, 48, 96, 384] as const\nexport const CONCENTRATION_UNITS = ['nM', 'uM', 'mM', 'ug/mL', 'mg/mL'] as const\n","import {\n CONCENTRATION_UNITS,\n ICONS,\n PLATE_FORMAT_OPTIONS,\n} from './controlSchemaConstants'\nimport type {\n BioTemplateControlSchema,\n} from './controlSchemaTypes'\nimport type {\n TemplateId,\n} from './types'\n\nexport const templateControlSchemas = {\n 'plate-map': {\n plateName: {\n label: 'Plate name',\n default: 'Plate 1',\n section: 'layout',\n sectionLabel: 'Layout',\n sectionSubtitle: 'Plate geometry',\n view: 'design',\n sidebar: { icon: ICONS.plate, iconColor: '#6366f1', iconBg: '#e0e7ff' },\n },\n plateFormat: {\n label: 'Format',\n default: 96,\n options: PLATE_FORMAT_OPTIONS,\n section: 'layout',\n view: 'design',\n },\n sampleNames: {\n type: 'tags',\n label: 'Samples',\n default: ['Control', 'Treatment'],\n section: 'samples',\n sectionLabel: 'Samples',\n sectionSubtitle: 'Groups and legend',\n view: 'design',\n sidebar: { icon: ICONS.samples, iconColor: '#10b981', iconBg: '#d1fae5' },\n },\n },\n 'sample-sheet': {\n sampleCount: {\n type: 'number',\n label: 'Sample count',\n default: 2,\n min: 1,\n max: 10000,\n section: 'samples',\n sectionLabel: 'Samples',\n sectionSubtitle: 'Metadata table',\n view: 'design',\n sidebar: { icon: ICONS.samples, iconColor: '#10b981', iconBg: '#d1fae5' },\n },\n includeGroups: {\n label: 'Include groups',\n default: true,\n section: 'samples',\n view: 'design',\n },\n includeBatch: {\n label: 'Include batch',\n default: false,\n section: 'columns',\n sectionLabel: 'Columns',\n view: 'design',\n sidebar: { icon: ICONS.table, iconColor: '#0ea5e9', iconBg: '#e0f2fe' },\n },\n },\n 'sample-prep': {\n prepType: {\n label: 'Prep type',\n default: 'extraction',\n options: ['extraction', 'dilution', 'normalization', 'transfer', 'quench', 'custom'],\n section: 'protocol',\n sectionLabel: 'Protocol',\n sectionSubtitle: 'Prep workflow',\n view: 'design',\n sidebar: { icon: ICONS.run, iconColor: '#f97316', iconBg: '#ffedd5' },\n },\n volumeUnit: {\n label: 'Volume unit',\n default: 'uL',\n options: ['uL', 'mL'],\n section: 'protocol',\n view: 'design',\n },\n outputVolume: {\n type: 'number',\n label: 'Output volume',\n default: 50,\n min: 0,\n section: 'protocol',\n view: 'design',\n },\n },\n 'dose-response': {\n unit: {\n label: 'Dose unit',\n default: 'uM',\n options: CONCENTRATION_UNITS,\n section: 'dose',\n sectionLabel: 'Dose Design',\n sectionSubtitle: 'Concentration series',\n view: 'design',\n sidebar: { icon: ICONS.dose, iconColor: '#8b5cf6', iconBg: '#ede9fe' },\n },\n replicates: {\n type: 'number',\n label: 'Replicates',\n default: 3,\n min: 1,\n max: 24,\n section: 'dose',\n view: 'design',\n },\n includePlateLayout: {\n label: 'Create plate layout',\n default: true,\n section: 'layout',\n sectionLabel: 'Layout',\n sectionSubtitle: 'Well assignment',\n view: 'design',\n sidebar: { icon: ICONS.plate, iconColor: '#6366f1', iconBg: '#e0e7ff', defaultOpen: false },\n },\n },\n 'calibration-curve': {\n analyte: {\n label: 'Analyte',\n default: 'Analyte',\n section: 'standards',\n sectionLabel: 'Standards',\n sectionSubtitle: 'Curve setup',\n view: 'analysis',\n sidebar: { icon: ICONS.dose, iconColor: '#8b5cf6', iconBg: '#ede9fe' },\n },\n model: {\n label: 'Model',\n default: 'linear',\n options: ['linear', 'linear-weighted-1-x', 'linear-weighted-1-x2', 'quadratic', 'four-parameter-logistic'],\n section: 'fit',\n sectionLabel: 'Fit',\n view: 'analysis',\n sidebar: { icon: ICONS.settings, iconColor: '#6366f1', iconBg: '#e0e7ff' },\n },\n minRSquared: {\n type: 'number',\n label: 'Minimum R squared',\n default: 0.99,\n min: 0,\n max: 1,\n props: { step: 0.001 },\n section: 'fit',\n view: 'analysis',\n },\n },\n 'time-course': {\n timeUnit: {\n label: 'Time unit',\n default: 'hour',\n options: ['second', 'minute', 'hour', 'day', 'week'],\n section: 'schedule',\n sectionLabel: 'Schedule',\n sectionSubtitle: 'Sampling timeline',\n view: 'design',\n sidebar: { icon: ICONS.run, iconColor: '#0ea5e9', iconBg: '#e0f2fe' },\n },\n replicates: {\n type: 'number',\n label: 'Replicates',\n default: 3,\n min: 1,\n max: 24,\n section: 'samples',\n sectionLabel: 'Samples',\n view: 'design',\n sidebar: { icon: ICONS.samples, iconColor: '#10b981', iconBg: '#d1fae5' },\n },\n },\n 'protocol-steps': {\n defaultDuration: {\n type: 'number',\n label: 'Default duration',\n default: 30,\n min: 0,\n section: 'protocol',\n sectionLabel: 'Protocol',\n sectionSubtitle: 'Step defaults',\n view: 'design',\n sidebar: { icon: ICONS.run, iconColor: '#f97316', iconBg: '#ffedd5' },\n props: { suffix: 'min' },\n },\n editable: {\n label: 'Editable timeline',\n default: true,\n section: 'protocol',\n view: 'design',\n },\n },\n 'assay-matrix': {\n featureType: {\n label: 'Feature type',\n default: 'metabolite',\n options: ['metabolite', 'protein', 'gene', 'cell', 'compound', 'readout', 'other'],\n section: 'features',\n sectionLabel: 'Features',\n sectionSubtitle: 'Measurement matrix',\n view: 'analysis',\n sidebar: { icon: ICONS.table, iconColor: '#0ea5e9', iconBg: '#e0f2fe' },\n },\n normalizeValues: {\n label: 'Normalize values',\n default: false,\n section: 'analysis',\n sectionLabel: 'Analysis',\n view: 'analysis',\n sidebar: { icon: ICONS.settings, iconColor: '#6366f1', iconBg: '#e0e7ff', defaultOpen: false },\n },\n },\n 'reagent-list': {\n reagentKind: {\n label: 'Reagent kind',\n default: 'reagent',\n options: ['compound', 'antibody', 'primer', 'enzyme', 'buffer', 'media', 'kit', 'reagent', 'other'],\n section: 'inventory',\n sectionLabel: 'Inventory',\n sectionSubtitle: 'Reagent metadata',\n view: 'design',\n sidebar: { icon: ICONS.table, iconColor: '#10b981', iconBg: '#d1fae5' },\n },\n trackStock: {\n label: 'Track stock level',\n default: true,\n section: 'inventory',\n view: 'design',\n },\n },\n 'flow-cytometry-panel': {\n markers: {\n type: 'tags',\n label: 'Markers',\n default: ['CD3', 'CD4', 'CD8'],\n section: 'panel',\n sectionLabel: 'Panel',\n sectionSubtitle: 'Markers and controls',\n view: 'design',\n sidebar: { icon: ICONS.table, iconColor: '#0ea5e9', iconBg: '#e0f2fe' },\n },\n instrument: {\n label: 'Instrument',\n default: 'Flow cytometer',\n section: 'panel',\n sectionLabel: 'Panel',\n sectionSubtitle: 'Markers and controls',\n view: 'design',\n sidebar: { icon: ICONS.settings, iconColor: '#6366f1', iconBg: '#e0e7ff' },\n },\n includeDefaultControls: {\n label: 'Default controls',\n default: true,\n section: 'panel',\n view: 'design',\n },\n },\n 'instrument-run': {\n instrument: {\n label: 'Instrument',\n default: 'LC-MS',\n options: ['LC-MS', 'GC-MS', 'Orbitrap', 'Triple quadrupole', 'Plate reader', 'Other'],\n section: 'acquisition',\n sectionLabel: 'Acquisition',\n sectionSubtitle: 'Run queue',\n view: 'run',\n sidebar: { icon: ICONS.run, iconColor: '#ef4444', iconBg: '#fee2e2' },\n },\n method: {\n label: 'Method',\n default: 'Default method',\n section: 'acquisition',\n view: 'run',\n },\n includeQc: {\n label: 'Include QC',\n default: true,\n section: 'quality',\n sectionLabel: 'Quality Control',\n view: 'run',\n sidebar: { icon: ICONS.settings, iconColor: '#6366f1', iconBg: '#e0e7ff', defaultOpen: false },\n },\n },\n 'qpcr-plate': {\n chemistry: {\n label: 'Chemistry',\n default: 'sybr',\n options: ['sybr', 'taqman', 'probe', 'evagreen', 'other'],\n section: 'assay',\n sectionLabel: 'Assay',\n sectionSubtitle: 'qPCR setup',\n view: 'design',\n sidebar: { icon: ICONS.plate, iconColor: '#6366f1', iconBg: '#e0e7ff' },\n },\n replicates: {\n type: 'number',\n label: 'Replicates',\n default: 3,\n min: 1,\n max: 12,\n section: 'assay',\n view: 'design',\n },\n includeNoTemplateControls: {\n label: 'No-template controls',\n default: true,\n section: 'controls',\n sectionLabel: 'Controls',\n view: 'design',\n sidebar: { icon: ICONS.settings, iconColor: '#8b5cf6', iconBg: '#ede9fe', defaultOpen: false },\n },\n },\n} satisfies Record<TemplateId, BioTemplateControlSchema>\n","import {\n CONCENTRATION_UNITS,\n ICONS,\n PLATE_FORMAT_OPTIONS,\n} from './controlSchemaConstants'\nimport type {\n BioTemplateControlSchema,\n} from './controlSchemaTypes'\nimport {\n templateControlSchemas,\n} from './templateControlSchemas'\nimport type {\n TemplatePresetId,\n} from './types'\n\nexport const presetControlSchemas = {\n 'wellplate-screen': {\n ...templateControlSchemas['plate-map'],\n ...templateControlSchemas['dose-response'],\n sampleNames: {\n ...templateControlSchemas['plate-map'].sampleNames,\n default: ['Control', 'Treatment'],\n },\n },\n 'qpcr-expression': {\n sampleNames: {\n type: 'tags',\n label: 'Samples',\n default: ['Control', 'Treatment'],\n section: 'samples',\n sectionLabel: 'Samples',\n sectionSubtitle: 'Expression groups',\n view: 'design',\n sidebar: { icon: ICONS.samples, iconColor: '#10b981', iconBg: '#d1fae5' },\n },\n targets: {\n type: 'tags',\n label: 'Targets',\n default: ['ACTB', 'GAPDH'],\n section: 'assay',\n sectionLabel: 'Assay',\n view: 'design',\n sidebar: { icon: ICONS.plate, iconColor: '#6366f1', iconBg: '#e0e7ff' },\n },\n ...templateControlSchemas['qpcr-plate'],\n },\n 'lcms-batch': {\n sampleNames: {\n type: 'tags',\n label: 'Samples',\n default: ['S001', 'S002'],\n section: 'samples',\n sectionLabel: 'Samples',\n sectionSubtitle: 'Batch samples',\n view: 'run',\n sidebar: { icon: ICONS.samples, iconColor: '#10b981', iconBg: '#d1fae5' },\n },\n featureNames: {\n type: 'tags',\n label: 'Features',\n default: ['Glucose', 'Lactate'],\n section: 'features',\n sectionLabel: 'Features',\n view: 'analysis',\n sidebar: { icon: ICONS.table, iconColor: '#0ea5e9', iconBg: '#e0f2fe' },\n },\n ...templateControlSchemas['instrument-run'],\n ...templateControlSchemas['assay-matrix'],\n },\n 'targeted-metabolomics': {\n sampleNames: {\n type: 'tags',\n label: 'Samples',\n default: ['S001', 'S002'],\n section: 'samples',\n sectionLabel: 'Samples',\n sectionSubtitle: 'Unknowns and QC pool',\n view: 'run',\n sidebar: { icon: ICONS.samples, iconColor: '#10b981', iconBg: '#d1fae5' },\n },\n metaboliteNames: {\n type: 'tags',\n label: 'Metabolites',\n default: ['Glucose', 'Lactate', 'Pyruvate'],\n section: 'features',\n sectionLabel: 'Metabolites',\n sectionSubtitle: 'Quantitation panel',\n view: 'analysis',\n sidebar: { icon: ICONS.table, iconColor: '#0ea5e9', iconBg: '#e0f2fe' },\n },\n internalStandards: {\n type: 'tags',\n label: 'Internal standards',\n default: ['Stable isotope internal standard mix'],\n section: 'standards',\n sectionLabel: 'Standards',\n sectionSubtitle: 'Calibration and internal standards',\n view: 'analysis',\n sidebar: { icon: ICONS.dose, iconColor: '#8b5cf6', iconBg: '#ede9fe' },\n },\n standardConcentrations: {\n type: 'tags',\n label: 'Calibration levels',\n default: ['0.1', '1', '10', '100'],\n section: 'standards',\n view: 'analysis',\n },\n concentrationUnit: {\n label: 'Concentration unit',\n default: 'uM',\n options: CONCENTRATION_UNITS,\n section: 'standards',\n view: 'analysis',\n },\n responseUnit: {\n label: 'Response unit',\n default: 'peak area ratio',\n section: 'readout',\n sectionLabel: 'Readout',\n view: 'analysis',\n sidebar: { icon: ICONS.table, iconColor: '#0ea5e9', iconBg: '#e0f2fe' },\n },\n instrument: {\n ...templateControlSchemas['instrument-run'].instrument,\n default: 'LC-MS',\n },\n method: {\n ...templateControlSchemas['instrument-run'].method,\n default: 'Targeted metabolomics',\n },\n prepType: {\n ...templateControlSchemas['sample-prep'].prepType,\n default: 'extraction',\n },\n outputVolume: templateControlSchemas['sample-prep'].outputVolume,\n includeQc: templateControlSchemas['instrument-run'].includeQc,\n },\n 'elisa-assay': {\n sampleNames: {\n type: 'tags',\n label: 'Samples',\n default: ['Control', 'Treatment'],\n section: 'samples',\n sectionLabel: 'Samples',\n sectionSubtitle: 'Unknowns and controls',\n view: 'design',\n sidebar: { icon: ICONS.samples, iconColor: '#10b981', iconBg: '#d1fae5' },\n },\n analyte: {\n label: 'Analyte',\n default: 'Analyte',\n section: 'standards',\n sectionLabel: 'Standards',\n sectionSubtitle: 'Calibration setup',\n view: 'analysis',\n sidebar: { icon: ICONS.dose, iconColor: '#8b5cf6', iconBg: '#ede9fe' },\n },\n standardConcentrations: {\n type: 'tags',\n label: 'Standards',\n default: ['1000', '100', '10', '1'],\n section: 'standards',\n view: 'analysis',\n },\n unit: {\n label: 'Concentration unit',\n default: 'pg/mL',\n options: ['pg/mL', 'ng/mL', 'ug/mL', 'nM', 'uM'],\n section: 'standards',\n view: 'analysis',\n },\n responseUnit: {\n label: 'Response unit',\n default: 'OD450',\n section: 'readout',\n sectionLabel: 'Readout',\n view: 'analysis',\n sidebar: { icon: ICONS.table, iconColor: '#0ea5e9', iconBg: '#e0f2fe' },\n },\n plateName: {\n label: 'Plate name',\n default: 'ELISA plate',\n section: 'layout',\n sectionLabel: 'Layout',\n sectionSubtitle: 'Plate geometry',\n view: 'design',\n sidebar: { icon: ICONS.plate, iconColor: '#6366f1', iconBg: '#e0e7ff' },\n },\n plateFormat: {\n label: 'Format',\n default: 96,\n options: PLATE_FORMAT_OPTIONS,\n section: 'layout',\n view: 'design',\n },\n },\n 'flow-cytometry-assay': {\n sampleNames: {\n type: 'tags',\n label: 'Samples',\n default: ['Control', 'Treatment'],\n section: 'samples',\n sectionLabel: 'Samples',\n sectionSubtitle: 'Assay groups',\n view: 'design',\n sidebar: { icon: ICONS.samples, iconColor: '#10b981', iconBg: '#d1fae5' },\n },\n markers: {\n ...templateControlSchemas['flow-cytometry-panel'].markers,\n default: ['CD3', 'CD4', 'CD8'],\n },\n featureNames: {\n type: 'tags',\n label: 'Readouts',\n default: ['CD3+ cells', 'CD4+ cells', 'CD8+ cells'],\n section: 'features',\n sectionLabel: 'Readouts',\n sectionSubtitle: 'Assay matrix columns',\n view: 'analysis',\n sidebar: { icon: ICONS.table, iconColor: '#0ea5e9', iconBg: '#e0f2fe' },\n },\n instrument: {\n ...templateControlSchemas['flow-cytometry-panel'].instrument,\n default: 'Flow cytometer',\n },\n includeDefaultControls: templateControlSchemas['flow-cytometry-panel'].includeDefaultControls,\n },\n 'western-blot-assay': {\n sampleNames: {\n type: 'tags',\n label: 'Samples',\n default: ['Control', 'Treatment'],\n section: 'samples',\n sectionLabel: 'Samples',\n sectionSubtitle: 'Blot lanes and groups',\n view: 'design',\n sidebar: { icon: ICONS.samples, iconColor: '#10b981', iconBg: '#d1fae5' },\n },\n targets: {\n type: 'tags',\n label: 'Targets',\n default: ['Target protein'],\n section: 'assay',\n sectionLabel: 'Assay',\n sectionSubtitle: 'Protein targets',\n view: 'design',\n sidebar: { icon: ICONS.table, iconColor: '#0ea5e9', iconBg: '#e0f2fe' },\n },\n loadingControl: {\n label: 'Loading control',\n default: 'ACTB',\n section: 'normalization',\n sectionLabel: 'Normalization',\n view: 'analysis',\n sidebar: { icon: ICONS.settings, iconColor: '#6366f1', iconBg: '#e0e7ff' },\n },\n },\n} satisfies Record<TemplatePresetId, BioTemplateControlSchema>\n","import {\n controlsToFormSchema,\n controlsToSectionFormSchemas,\n controlsToSidebarPanels,\n getControlDefaults,\n useControlSchema,\n type ControlSchemaOptions,\n type UseControlSchemaReturn,\n} from '../composables/useControlSchema'\nimport {\n cloneControlSchema,\n cloneSchemaMap,\n} from './controlSchemaClone'\nimport {\n mergeTemplateControlSchemas,\n} from './controlSchemaMerge'\nimport {\n describeControlTarget,\n resolveControlSchemaTarget,\n} from './controlSchemaTargets'\nimport {\n presetControlSchemas,\n} from './presetControlSchemas'\nimport {\n templateControlSchemas,\n} from './templateControlSchemas'\nimport type {\n TemplateId,\n TemplatePresetId,\n} from './types'\nimport type {\n BioTemplateControlSchema,\n BioTemplateControlTarget,\n} from './controlSchemaTypes'\n\nexport type {\n BioTemplateControlSchema,\n BioTemplateControlTarget,\n} from './controlSchemaTypes'\n\nexport function listBioTemplateControlSchemas(): Record<TemplateId, BioTemplateControlSchema> {\n return cloneSchemaMap(templateControlSchemas)\n}\n\nexport function listBioTemplatePresetControlSchemas(): Record<TemplatePresetId, BioTemplateControlSchema> {\n return cloneSchemaMap(presetControlSchemas)\n}\n\nexport function getBioTemplateControlSchema(\n target: BioTemplateControlTarget\n): BioTemplateControlSchema | undefined {\n const resolved = resolveControlSchemaTarget(target)\n if (!resolved) return undefined\n\n if (resolved.kind === 'template') {\n return cloneControlSchema(templateControlSchemas[resolved.name])\n }\n if (resolved.kind === 'preset') {\n return cloneControlSchema(presetControlSchemas[resolved.name])\n }\n return mergeTemplateControlSchemas(resolved.templates, templateControlSchemas)\n}\n\nexport function requireBioTemplateControlSchema(\n target: BioTemplateControlTarget\n): BioTemplateControlSchema {\n const schema = getBioTemplateControlSchema(target)\n if (!schema) {\n throw new Error(`No built-in control schema found for '${describeControlTarget(target)}'.`)\n }\n return schema\n}\n\nexport function createBioTemplateControlToolkit(\n target: BioTemplateControlTarget,\n options: ControlSchemaOptions = {}\n): UseControlSchemaReturn<BioTemplateControlSchema> {\n return useControlSchema(requireBioTemplateControlSchema(target), options)\n}\n\nexport function bioTemplateControlsToFormSchema(\n target: BioTemplateControlTarget,\n options: ControlSchemaOptions = {}\n) {\n return controlsToFormSchema(requireBioTemplateControlSchema(target), options)\n}\n\nexport function bioTemplateControlsToSidebarPanels(\n target: BioTemplateControlTarget,\n options: ControlSchemaOptions = {}\n) {\n return controlsToSidebarPanels(requireBioTemplateControlSchema(target), options)\n}\n\nexport function bioTemplateControlsToSectionFormSchemas(\n target: BioTemplateControlTarget,\n options: ControlSchemaOptions = {}\n) {\n return controlsToSectionFormSchemas(requireBioTemplateControlSchema(target), options)\n}\n\nexport function getBioTemplateControlDefaults(target: BioTemplateControlTarget) {\n return getControlDefaults(requireBioTemplateControlSchema(target))\n}\n"],"mappings":";;AAAA,SAAgB,WAAS,OAAkD;AACzE,QAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,MAAM;;AAG7E,SAAgB,eAAe,OAAgB,UAA8B;AAC3E,KAAI,MAAM,QAAQ,MAAM,EAAE;EACxB,MAAM,QAAQ,MAAM,KAAI,SAAQ,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,OAAO,QAAQ;AACpE,SAAO,MAAM,SAAS,QAAQ;;AAEhC,KAAI,OAAO,UAAU,UAAU;EAC7B,MAAM,QAAQ,MAAM,MAAM,IAAI,CAAC,KAAI,SAAQ,KAAK,MAAM,CAAC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