@nfdi4plants/arctrl 1.0.7 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (335) hide show
  1. package/ARC.js +47 -11
  2. package/Contract/Contract.js +3 -3
  3. package/Contracts/Contracts.ArcTypes.js +30 -18
  4. package/Contracts/Contracts.Git.js +4 -4
  5. package/FileSystem/Commit.js +2 -2
  6. package/FileSystem/FileSystem.js +4 -4
  7. package/FileSystem/FileSystemTree.js +8 -8
  8. package/FileSystem/Path.js +2 -2
  9. package/FileSystemTree.js +1 -1
  10. package/ISA/ISA/ArcTypes/ArcTable.js +23 -31
  11. package/ISA/ISA/ArcTypes/ArcTableAux.js +27 -16
  12. package/ISA/ISA/ArcTypes/ArcTables.js +11 -11
  13. package/ISA/ISA/ArcTypes/ArcTypes.js +118 -83
  14. package/ISA/ISA/ArcTypes/CompositeCell.js +4 -4
  15. package/ISA/ISA/ArcTypes/CompositeColumn.js +8 -7
  16. package/ISA/ISA/ArcTypes/CompositeHeader.js +5 -5
  17. package/ISA/ISA/ArcTypes/CompositeRow.js +1 -1
  18. package/ISA/ISA/Builder/Types.js +5 -5
  19. package/ISA/ISA/Fable.js +6 -6
  20. package/ISA/ISA/Helper.js +15 -13
  21. package/ISA/ISA/Identifier.js +1 -1
  22. package/ISA/ISA/JsonTypes/Assay.js +8 -8
  23. package/ISA/ISA/JsonTypes/AssayMaterials.js +4 -4
  24. package/ISA/ISA/JsonTypes/ColumnIndex.js +5 -5
  25. package/ISA/ISA/JsonTypes/Comment.js +3 -3
  26. package/ISA/ISA/JsonTypes/CommentList.js +4 -4
  27. package/ISA/ISA/JsonTypes/Component.js +4 -4
  28. package/ISA/ISA/JsonTypes/Data.js +4 -4
  29. package/ISA/ISA/JsonTypes/DataFile.js +2 -2
  30. package/ISA/ISA/JsonTypes/Factor.js +6 -6
  31. package/ISA/ISA/JsonTypes/FactorValue.js +5 -5
  32. package/ISA/ISA/JsonTypes/Investigation.js +6 -6
  33. package/ISA/ISA/JsonTypes/Material.js +5 -5
  34. package/ISA/ISA/JsonTypes/MaterialAttribute.js +3 -3
  35. package/ISA/ISA/JsonTypes/MaterialAttributeValue.js +5 -5
  36. package/ISA/ISA/JsonTypes/MaterialType.js +2 -2
  37. package/ISA/ISA/JsonTypes/OntologyAnnotation.js +6 -6
  38. package/ISA/ISA/JsonTypes/OntologySourceReference.js +6 -6
  39. package/ISA/ISA/JsonTypes/Person.js +23 -8
  40. package/ISA/ISA/JsonTypes/Process.js +13 -13
  41. package/ISA/ISA/JsonTypes/ProcessInput.js +5 -5
  42. package/ISA/ISA/JsonTypes/ProcessOutput.js +5 -5
  43. package/ISA/ISA/JsonTypes/ProcessParameterValue.js +5 -5
  44. package/ISA/ISA/JsonTypes/ProcessSequence.js +6 -6
  45. package/ISA/ISA/JsonTypes/Protocol.js +6 -6
  46. package/ISA/ISA/JsonTypes/ProtocolParameter.js +3 -3
  47. package/ISA/ISA/JsonTypes/Publication.js +6 -6
  48. package/ISA/ISA/JsonTypes/Sample.js +5 -5
  49. package/ISA/ISA/JsonTypes/Source.js +5 -5
  50. package/ISA/ISA/JsonTypes/Study.js +8 -8
  51. package/ISA/ISA/JsonTypes/StudyMaterials.js +4 -4
  52. package/ISA/ISA/JsonTypes/Value.js +22 -29
  53. package/ISA/ISA/Regex.js +3 -3
  54. package/ISA/ISA.Json/ArcTypes/ArcAssay.js +157 -65
  55. package/ISA/ISA.Json/ArcTypes/ArcInvestigation.js +78 -49
  56. package/ISA/ISA.Json/ArcTypes/ArcStudy.js +136 -24
  57. package/ISA/ISA.Json/ArcTypes/ArcTable.js +183 -21
  58. package/ISA/ISA.Json/ArcTypes/CellTable.js +40 -0
  59. package/ISA/ISA.Json/ArcTypes/CompositeCell.js +34 -23
  60. package/ISA/ISA.Json/ArcTypes/CompositeHeader.js +18 -46
  61. package/ISA/ISA.Json/ArcTypes/IOType.js +11 -13
  62. package/ISA/ISA.Json/ArcTypes/OATable.js +42 -0
  63. package/ISA/ISA.Json/Assay.js +71 -47
  64. package/ISA/ISA.Json/Comment.js +31 -35
  65. package/ISA/ISA.Json/ConverterOptions.js +19 -1
  66. package/ISA/ISA.Json/Data.js +119 -137
  67. package/ISA/ISA.Json/Decode.js +51 -36
  68. package/ISA/ISA.Json/Factor.js +90 -90
  69. package/ISA/ISA.Json/GEncode.js +31 -6
  70. package/ISA/ISA.Json/Investigation.js +54 -79
  71. package/ISA/ISA.Json/Material.js +103 -104
  72. package/ISA/ISA.Json/Ontology.js +99 -92
  73. package/ISA/ISA.Json/Person.js +47 -65
  74. package/ISA/ISA.Json/Process.js +144 -130
  75. package/ISA/ISA.Json/Protocol.js +144 -105
  76. package/ISA/ISA.Json/Publication.js +34 -40
  77. package/ISA/ISA.Json/StringTable.js +44 -0
  78. package/ISA/ISA.Json/Study.js +70 -96
  79. package/ISA/ISA.Json/context/rocrate/isa_assay_context.js +34 -0
  80. package/ISA/ISA.Json/context/rocrate/isa_comment_context.js +23 -0
  81. package/ISA/ISA.Json/context/rocrate/isa_component_context.js +24 -0
  82. package/ISA/ISA.Json/context/rocrate/isa_data_context.js +25 -0
  83. package/ISA/ISA.Json/context/rocrate/isa_factor_context.js +25 -0
  84. package/ISA/ISA.Json/context/rocrate/isa_factor_value_context.js +25 -0
  85. package/ISA/ISA.Json/context/rocrate/isa_investigation_context.js +33 -0
  86. package/ISA/ISA.Json/context/rocrate/isa_material_attribute_context.js +23 -0
  87. package/ISA/ISA.Json/context/rocrate/isa_material_attribute_value_context.js +25 -0
  88. package/ISA/ISA.Json/context/rocrate/isa_material_context.js +26 -0
  89. package/ISA/ISA.Json/context/rocrate/isa_ontology_annotation_context.js +25 -0
  90. package/ISA/ISA.Json/context/rocrate/isa_ontology_source_reference_context.js +26 -0
  91. package/ISA/ISA.Json/context/rocrate/isa_organization_context.js +22 -0
  92. package/ISA/ISA.Json/context/rocrate/isa_person_context.js +31 -0
  93. package/ISA/ISA.Json/context/rocrate/isa_process_context.js +31 -0
  94. package/ISA/ISA.Json/context/rocrate/isa_process_parameter_value_context.js +25 -0
  95. package/ISA/ISA.Json/context/rocrate/isa_protocol_context.js +30 -0
  96. package/ISA/ISA.Json/context/rocrate/isa_protocol_parameter_context.js +23 -0
  97. package/ISA/ISA.Json/context/rocrate/isa_publication_context.js +27 -0
  98. package/ISA/ISA.Json/context/rocrate/isa_sample_context.js +26 -0
  99. package/ISA/ISA.Json/context/rocrate/isa_source_context.js +25 -0
  100. package/ISA/ISA.Json/context/rocrate/isa_study_context.js +42 -0
  101. package/ISA/ISA.Json/context/rocrate/rocrate_context.js +25 -0
  102. package/ISA/ISA.Spreadsheet/AnnotationTable/ArcTable.js +56 -43
  103. package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeCell.js +3 -3
  104. package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeColumn.js +11 -11
  105. package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeHeader.js +5 -5
  106. package/ISA/ISA.Spreadsheet/ArcAssay.js +100 -88
  107. package/ISA/ISA.Spreadsheet/ArcInvestigation.js +12 -12
  108. package/ISA/ISA.Spreadsheet/ArcStudy.js +36 -24
  109. package/ISA/ISA.Spreadsheet/CollectionAux.js +8 -8
  110. package/ISA/ISA.Spreadsheet/Metadata/Assays.js +5 -5
  111. package/ISA/ISA.Spreadsheet/Metadata/Comment.js +31 -20
  112. package/ISA/ISA.Spreadsheet/Metadata/Contacts.js +5 -5
  113. package/ISA/ISA.Spreadsheet/Metadata/Conversions.js +5 -5
  114. package/ISA/ISA.Spreadsheet/Metadata/DesignDescriptors.js +1 -1
  115. package/ISA/ISA.Spreadsheet/Metadata/Factors.js +5 -5
  116. package/ISA/ISA.Spreadsheet/Metadata/OntologyAnnotation.js +5 -5
  117. package/ISA/ISA.Spreadsheet/Metadata/OntologySourceReference.js +5 -5
  118. package/ISA/ISA.Spreadsheet/Metadata/Protocols.js +5 -5
  119. package/ISA/ISA.Spreadsheet/Metadata/Publication.js +5 -5
  120. package/ISA/ISA.Spreadsheet/Metadata/SparseTable.js +28 -23
  121. package/ISA/ISA.Spreadsheet/Metadata/Study.js +8 -8
  122. package/README.md +20 -3
  123. package/SemVer.js +6 -6
  124. package/Templates/Template.Json.js +43 -36
  125. package/Templates/Template.Spreadsheet.js +12 -12
  126. package/Templates/Template.Web.js +4 -4
  127. package/Templates/Template.js +7 -7
  128. package/Templates/Templates.js +7 -7
  129. package/WebRequest/WebRequest.Node.js +15 -0
  130. package/WebRequest/WebRequest.js +10 -29
  131. package/fable_modules/Fable.Fetch.2.6.0/Fetch.fs.js +7 -7
  132. package/fable_modules/Fable.Promise.2.2.2/Promise.fs.js +3 -3
  133. package/fable_modules/Fable.SimpleHttp.3.5.0/Http.fs.js +8 -8
  134. package/fable_modules/Fable.SimpleHttp.3.5.0/Types.fs.js +2 -2
  135. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Cells/FsCell.fs.js +14 -14
  136. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Cells/FsCellsCollection.fs.js +6 -6
  137. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/CellBuilder.fs.js +4 -4
  138. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/ColumnBuilder.fs.js +3 -3
  139. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/DSL.fs.js +2 -2
  140. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/Expression.fs.js +1 -1
  141. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/RowBuilder.fs.js +3 -3
  142. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/SheetBuilder.fs.js +3 -3
  143. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/TableBuilder.fs.js +3 -3
  144. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/Transform.fs.js +6 -6
  145. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/Types.fs.js +4 -4
  146. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/WorkbookBuilder.fs.js +3 -3
  147. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsAddress.fs +22 -8
  148. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsAddress.fs.js +24 -14
  149. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsColumn.fs.js +3 -3
  150. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsRow.fs.js +3 -3
  151. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsWorkbook.fs.js +6 -6
  152. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsWorksheet.fs +12 -6
  153. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsWorksheet.fs.js +21 -17
  154. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRange.fs.js +3 -3
  155. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRangeAddress.fs.js +4 -3
  156. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRangeBase.fs.js +3 -3
  157. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRangeColumn.fs.js +3 -3
  158. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRangeRow.fs.js +1 -1
  159. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/SheetBuilder.fs.js +8 -8
  160. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Tables/FsTable.fs.js +7 -7
  161. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Tables/FsTableField.fs.js +4 -4
  162. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Tables/FsTableRow.fs.js +1 -1
  163. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/obj/Release/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +3 -3
  164. package/fable_modules/Thoth.Json.Core.0.2.1/Decode.fs +1390 -0
  165. package/fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js +1230 -0
  166. package/fable_modules/Thoth.Json.Core.0.2.1/Encode.fs +233 -0
  167. package/fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js +113 -0
  168. package/fable_modules/Thoth.Json.Core.0.2.1/Thoth.Json.Core.fableproj +28 -0
  169. package/fable_modules/Thoth.Json.Core.0.2.1/Types.fs +76 -0
  170. package/fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js +33 -0
  171. package/fable_modules/Thoth.Json.Core.0.2.1/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
  172. package/fable_modules/{Thoth.Json.10.1.0/obj/Release/netstandard2.0/Thoth.Json.AssemblyInfo.fs → Thoth.Json.Core.0.2.1/obj/Debug/netstandard2.0/Thoth.Json.Core.AssemblyInfo.fs} +8 -7
  173. package/fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs +79 -0
  174. package/fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js +85 -0
  175. package/fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs +32 -0
  176. package/fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js +45 -0
  177. package/fable_modules/Thoth.Json.JavaScript.0.1.0/Thoth.Json.JavaScript.fableproj +21 -0
  178. package/fable_modules/Thoth.Json.JavaScript.0.1.0/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
  179. package/fable_modules/Thoth.Json.JavaScript.0.1.0/obj/Debug/netstandard2.0/Thoth.Json.JavaScript.AssemblyInfo.fs +18 -0
  180. package/fable_modules/Thoth.Json.JavaScript.0.1.0/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
  181. package/fable_modules/Thoth.Json.JavaScript.0.1.0/obj/Release/netstandard2.0/Thoth.Json.JavaScript.AssemblyInfo.fs +19 -0
  182. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Array.d.ts +4 -1
  183. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Array.js +124 -86
  184. package/fable_modules/fable-library-js.4.13.0/CHANGELOG.md +29 -0
  185. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Choice.d.ts +0 -17
  186. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Choice.js +0 -43
  187. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Date.js +3 -2
  188. package/fable_modules/fable-library-js.4.13.0/FSharp.Core.CompilerServices.d.ts +12 -0
  189. package/fable_modules/fable-library-js.4.13.0/FSharp.Core.CompilerServices.js +27 -0
  190. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/List.js +3 -3
  191. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Map.js +3 -3
  192. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/MutableMap.js +2 -1
  193. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/MutableSet.js +2 -1
  194. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Random.js +7 -7
  195. package/fable_modules/fable-library-js.4.13.0/Result.d.ts +37 -0
  196. package/fable_modules/fable-library-js.4.13.0/Result.js +165 -0
  197. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Set.js +2 -2
  198. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/String.d.ts +1 -0
  199. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/String.js +8 -5
  200. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/System.Collections.Generic.d.ts +15 -7
  201. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/System.Collections.Generic.js +46 -36
  202. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/System.Text.d.ts +9 -1
  203. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/System.Text.js +60 -8
  204. package/fable_modules/fable-library-js.4.13.0/big.d.ts +338 -0
  205. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/package.json +4 -3
  206. package/fable_modules/project_cracked.json +1 -1
  207. package/package.json +1 -1
  208. package/ISA/ISA.Json/Validation/Fable.js +0 -69
  209. package/ISA/ISA.Json/Validation/JsonSchemaValidation.js +0 -88
  210. package/ISA/ISA.Json/Validation/ValidationResult.js +0 -45
  211. package/fable_modules/Thoth.Json.10.1.0/Decode.fs +0 -1366
  212. package/fable_modules/Thoth.Json.10.1.0/Decode.fs.js +0 -1798
  213. package/fable_modules/Thoth.Json.10.1.0/Encode.fs +0 -621
  214. package/fable_modules/Thoth.Json.10.1.0/Encode.fs.js +0 -472
  215. package/fable_modules/Thoth.Json.10.1.0/Extra.fs +0 -31
  216. package/fable_modules/Thoth.Json.10.1.0/Extra.fs.js +0 -8
  217. package/fable_modules/Thoth.Json.10.1.0/Thoth.Json.fableproj +0 -30
  218. package/fable_modules/Thoth.Json.10.1.0/Types.fs +0 -59
  219. package/fable_modules/Thoth.Json.10.1.0/Types.fs.js +0 -98
  220. package/fable_modules/Thoth.Json.10.1.0/package.json +0 -5
  221. package/fable_modules/fable-library.4.5.0/CHANGELOG.md +0 -11
  222. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Cells/FsCell.fs +0 -0
  223. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Cells/FsCellsCollection.fs +0 -0
  224. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/CellBuilder.fs +0 -0
  225. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/ColumnBuilder.fs +0 -0
  226. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/DSL.fs +0 -0
  227. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/Expression.fs +0 -0
  228. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/Operators.fs +0 -0
  229. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/Operators.fs.js +0 -0
  230. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/RowBuilder.fs +0 -0
  231. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/SheetBuilder.fs +0 -0
  232. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/TableBuilder.fs +0 -0
  233. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/Transform.fs +0 -0
  234. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/Types.fs +0 -0
  235. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/WorkbookBuilder.fs +0 -0
  236. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsColumn.fs +0 -0
  237. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsRow.fs +0 -0
  238. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsSpreadsheet.fableproj +0 -0
  239. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsWorkbook.fs +0 -0
  240. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRange.fs +0 -0
  241. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRangeAddress.fs +0 -0
  242. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRangeBase.fs +0 -0
  243. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRangeColumn.fs +0 -0
  244. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRangeRow.fs +0 -0
  245. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/SheetBuilder.fs +0 -0
  246. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Tables/FsTable.fs +0 -0
  247. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Tables/FsTableField.fs +0 -0
  248. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Tables/FsTableRow.fs +0 -0
  249. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
  250. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/obj/Debug/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +0 -0
  251. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
  252. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Async.d.ts +0 -0
  253. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Async.js +0 -0
  254. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/AsyncBuilder.d.ts +0 -0
  255. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/AsyncBuilder.js +0 -0
  256. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/BigInt.d.ts +0 -0
  257. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/BigInt.js +0 -0
  258. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/BitConverter.d.ts +0 -0
  259. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/BitConverter.js +0 -0
  260. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Boolean.d.ts +0 -0
  261. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Boolean.js +0 -0
  262. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Char.d.ts +0 -0
  263. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Char.js +0 -0
  264. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Date.d.ts +0 -0
  265. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/DateOffset.d.ts +0 -0
  266. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/DateOffset.js +0 -0
  267. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/DateOnly.d.ts +0 -0
  268. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/DateOnly.js +0 -0
  269. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Decimal.d.ts +0 -0
  270. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Decimal.js +0 -0
  271. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Double.d.ts +0 -0
  272. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Double.js +0 -0
  273. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Encoding.d.ts +0 -0
  274. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Encoding.js +0 -0
  275. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Event.d.ts +0 -0
  276. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Event.js +0 -0
  277. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/FSharp.Collections.d.ts +0 -0
  278. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/FSharp.Collections.js +0 -0
  279. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/FSharp.Core.d.ts +0 -0
  280. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/FSharp.Core.js +0 -0
  281. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Global.d.ts +0 -0
  282. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Global.js +0 -0
  283. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Guid.d.ts +0 -0
  284. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Guid.js +0 -0
  285. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Int32.d.ts +0 -0
  286. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Int32.js +0 -0
  287. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/List.d.ts +0 -0
  288. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Long.d.ts +0 -0
  289. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Long.js +0 -0
  290. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/MailboxProcessor.d.ts +0 -0
  291. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/MailboxProcessor.js +0 -0
  292. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Map.d.ts +0 -0
  293. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/MapUtil.d.ts +0 -0
  294. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/MapUtil.js +0 -0
  295. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/MutableMap.d.ts +0 -0
  296. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/MutableSet.d.ts +0 -0
  297. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Native.d.ts +0 -0
  298. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Native.js +0 -0
  299. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Numeric.d.ts +0 -0
  300. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Numeric.js +0 -0
  301. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Observable.d.ts +0 -0
  302. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Observable.js +0 -0
  303. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Option.d.ts +0 -0
  304. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Option.js +0 -0
  305. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/README.md +0 -0
  306. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Random.d.ts +0 -0
  307. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Range.d.ts +0 -0
  308. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Range.js +0 -0
  309. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Reflection.d.ts +0 -0
  310. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Reflection.js +0 -0
  311. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/RegExp.d.ts +0 -0
  312. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/RegExp.js +0 -0
  313. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Seq.d.ts +0 -0
  314. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Seq.js +0 -0
  315. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Seq2.d.ts +0 -0
  316. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Seq2.js +0 -0
  317. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Set.d.ts +0 -0
  318. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/SystemException.d.ts +0 -0
  319. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/SystemException.js +0 -0
  320. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/TimeOnly.d.ts +0 -0
  321. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/TimeOnly.js +0 -0
  322. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/TimeSpan.d.ts +0 -0
  323. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/TimeSpan.js +0 -0
  324. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Timer.d.ts +0 -0
  325. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Timer.js +0 -0
  326. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Types.d.ts +0 -0
  327. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Types.js +0 -0
  328. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Unicode.13.0.0.d.ts +0 -0
  329. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Unicode.13.0.0.js +0 -0
  330. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Uri.d.ts +0 -0
  331. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Uri.js +0 -0
  332. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Util.d.ts +0 -0
  333. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Util.js +0 -0
  334. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/lib/big.d.ts +0 -0
  335. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/lib/big.js +0 -0
@@ -1,19 +1,25 @@
1
- import { value as value_19 } from "../../fable_modules/fable-library.4.5.0/Option.js";
1
+ import { value as value_13 } from "../../fable_modules/fable-library-js.4.13.0/Option.js";
2
2
  import { URIModule_toString } from "../ISA/JsonTypes/URI.js";
3
- import { toString, nil, object as object_18 } from "../../fable_modules/Thoth.Json.10.1.0/Encode.fs.js";
4
- import { choose } from "../../fable_modules/fable-library.4.5.0/List.js";
5
- import { uncurry2, equals } from "../../fable_modules/fable-library.4.5.0/Util.js";
6
- import { empty, singleton, append, delay, toList } from "../../fable_modules/fable-library.4.5.0/Seq.js";
7
- import { ConverterOptions__set_IncludeType_Z1FBCCD16, ConverterOptions__set_SetID_Z1FBCCD16, ConverterOptions_$ctor, ConverterOptions__get_IncludeType, ConverterOptions__get_SetID } from "./ConverterOptions.js";
8
- import { tryInclude } from "./GEncode.js";
3
+ import { ofArray, choose } from "../../fable_modules/fable-library-js.4.13.0/List.js";
4
+ import { equals } from "../../fable_modules/fable-library-js.4.13.0/Util.js";
5
+ import { Json } from "../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
6
+ import { empty, singleton, append, delay, toList } from "../../fable_modules/fable-library-js.4.13.0/Seq.js";
7
+ import { ConverterOptions__set_IncludeContext_Z1FBCCD16, ConverterOptions__set_IncludeType_Z1FBCCD16, ConverterOptions__set_SetID_Z1FBCCD16, ConverterOptions_$ctor, ConverterOptions__get_IncludeContext, ConverterOptions__get_IncludeType, ConverterOptions__get_SetID } from "./ConverterOptions.js";
8
+ import { tryIncludeList, tryInclude } from "./GEncode.js";
9
+ import { list as list_1 } from "../../fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js";
9
10
  import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "./Ontology.js";
10
- import { list as list_1, string, object as object_19 } from "../../fable_modules/Thoth.Json.10.1.0/Decode.fs.js";
11
- import { fromJsonString, uri } from "./Decode.js";
11
+ import { context_jsonvalue } from "./context/rocrate/isa_protocol_parameter_context.js";
12
+ import { list as list_2, string, object } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
13
+ import { uri } from "./Decode.js";
12
14
  import { ProtocolParameter } from "../ISA/JsonTypes/ProtocolParameter.js";
13
- import { replace } from "../../fable_modules/fable-library.4.5.0/String.js";
14
- import { Result_Map } from "../../fable_modules/fable-library.4.5.0/Choice.js";
15
+ import { fromString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
16
+ import { replace, printf, toText } from "../../fable_modules/fable-library-js.4.13.0/String.js";
17
+ import { toString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
18
+ import { context_jsonvalue as context_jsonvalue_1 } from "./context/rocrate/isa_component_context.js";
19
+ import { Result_Map } from "../../fable_modules/fable-library-js.4.13.0/Result.js";
15
20
  import { Component, Component_decomposeName_Z721C83C5 } from "../ISA/JsonTypes/Component.js";
16
- import { decoder as decoder_3, encoder } from "./Comment.js";
21
+ import { decoder as decoder_1, encoder } from "./Comment.js";
22
+ import { context_jsonvalue as context_jsonvalue_2 } from "./context/rocrate/isa_protocol_context.js";
17
23
  import { Protocol } from "../ISA/JsonTypes/Protocol.js";
18
24
 
19
25
  export function ProtocolParameter_genID(pp) {
@@ -35,7 +41,7 @@ export function ProtocolParameter_genID(pp) {
35
41
  }
36
42
  switch (matchResult) {
37
43
  case 0:
38
- return "#Param_" + value_19(n_1.ID);
44
+ return "#Param_" + value_13(n_1.ID);
39
45
  default:
40
46
  return "#EmptyProtocolParameter";
41
47
  }
@@ -46,36 +52,32 @@ export function ProtocolParameter_genID(pp) {
46
52
  }
47
53
 
48
54
  export function ProtocolParameter_encoder(options, oa) {
49
- return object_18(choose((tupledArg) => {
55
+ return new Json(5, [choose((tupledArg) => {
50
56
  const v = tupledArg[1];
51
- if (equals(v, nil)) {
57
+ if (equals(v, new Json(3, []))) {
52
58
  return void 0;
53
59
  }
54
60
  else {
55
61
  return [tupledArg[0], v];
56
62
  }
57
- }, toList(delay(() => {
58
- let value, s;
59
- return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = ProtocolParameter_genID(oa), (typeof value === "string") ? ((s = value, s)) : nil)]) : singleton(tryInclude("@id", (value_2) => {
60
- let s_1;
61
- const value_3 = value_2;
62
- return (typeof value_3 === "string") ? ((s_1 = value_3, s_1)) : nil;
63
- }, oa["ID"])), delay(() => {
64
- let value_5, s_2;
65
- return append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", (value_5 = "ProtocolParameter", (typeof value_5 === "string") ? ((s_2 = value_5, s_2)) : nil)]) : empty(), delay(() => singleton(tryInclude("parameterName", (oa_1) => OntologyAnnotation_encoder(options, oa_1), oa["ParameterName"]))));
66
- }));
67
- }))));
63
+ }, toList(delay(() => append(ConverterOptions__get_SetID(options) ? singleton(["@id", new Json(0, [ProtocolParameter_genID(oa)])]) : singleton(tryInclude("@id", (value_1) => (new Json(0, [value_1])), oa.ID)), delay(() => append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", list_1(ofArray([new Json(0, ["ProtocolParameter"]), new Json(0, ["ArcProtocolParameter"])]))]) : empty(), delay(() => append(singleton(tryInclude("parameterName", (oa_1) => OntologyAnnotation_encoder(options, oa_1), oa.ParameterName)), delay(() => (ConverterOptions__get_IncludeContext(options) ? singleton(["@context", context_jsonvalue]) : empty()))))))))))]);
68
64
  }
69
65
 
70
66
  export function ProtocolParameter_decoder(options) {
71
- return (path) => ((v) => object_19((get$) => {
67
+ return object((get$) => {
72
68
  let objectArg, arg_3, objectArg_1;
73
- return new ProtocolParameter((objectArg = get$.Optional, objectArg.Field("@id", uri)), (arg_3 = OntologyAnnotation_decoder(options), (objectArg_1 = get$.Optional, objectArg_1.Field("parameterName", uncurry2(arg_3)))));
74
- }, path, v));
69
+ return new ProtocolParameter((objectArg = get$.Optional, objectArg.Field("@id", uri)), (arg_3 = OntologyAnnotation_decoder(options), (objectArg_1 = get$.Optional, objectArg_1.Field("parameterName", arg_3))));
70
+ });
75
71
  }
76
72
 
77
73
  export function ProtocolParameter_fromJsonString(s) {
78
- return fromJsonString(uncurry2(ProtocolParameter_decoder(ConverterOptions_$ctor())), s);
74
+ const matchValue = fromString(ProtocolParameter_decoder(ConverterOptions_$ctor()), s);
75
+ if (matchValue.tag === 1) {
76
+ throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
77
+ }
78
+ else {
79
+ return matchValue.fields[0];
80
+ }
79
81
  }
80
82
 
81
83
  export function ProtocolParameter_toString(p) {
@@ -85,11 +87,16 @@ export function ProtocolParameter_toString(p) {
85
87
  /**
86
88
  * exports in json-ld format
87
89
  */
88
- export function ProtocolParameter_toStringLD(p) {
90
+ export function ProtocolParameter_toJsonldString(p) {
89
91
  let returnVal;
90
92
  return toString(2, ProtocolParameter_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), p));
91
93
  }
92
94
 
95
+ export function ProtocolParameter_toJsonldStringWithContext(a) {
96
+ let returnVal;
97
+ return toString(2, ProtocolParameter_encoder((returnVal = ConverterOptions_$ctor(), (((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), ConverterOptions__set_IncludeContext_Z1FBCCD16(returnVal, true)), returnVal)), a));
98
+ }
99
+
93
100
  export function Component_genID(c) {
94
101
  const matchValue = c.ComponentName;
95
102
  if (matchValue == null) {
@@ -101,48 +108,47 @@ export function Component_genID(c) {
101
108
  }
102
109
 
103
110
  export function Component_encoder(options, oa) {
104
- return object_18(choose((tupledArg) => {
111
+ return new Json(5, [choose((tupledArg) => {
105
112
  const v = tupledArg[1];
106
- if (equals(v, nil)) {
113
+ if (equals(v, new Json(3, []))) {
107
114
  return void 0;
108
115
  }
109
116
  else {
110
117
  return [tupledArg[0], v];
111
118
  }
112
- }, toList(delay(() => {
113
- let value, s;
114
- return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = Component_genID(oa), (typeof value === "string") ? ((s = value, s)) : nil)]) : empty(), delay(() => {
115
- let value_2, s_1;
116
- return append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", (value_2 = "Component", (typeof value_2 === "string") ? ((s_1 = value_2, s_1)) : nil)]) : empty(), delay(() => append(singleton(tryInclude("componentName", (value_4) => {
117
- let s_2;
118
- const value_5 = value_4;
119
- return (typeof value_5 === "string") ? ((s_2 = value_5, s_2)) : nil;
120
- }, oa["ComponentName"])), delay(() => singleton(tryInclude("componentType", (oa_1) => OntologyAnnotation_encoder(options, oa_1), oa["ComponentType"]))))));
121
- }));
122
- }))));
123
- }
124
-
125
- export function Component_decoder(options, s, json) {
126
- return Result_Map((c) => {
127
- let patternInput;
128
- const matchValue = c.ComponentName;
129
- if (matchValue == null) {
130
- patternInput = [void 0, void 0];
131
- }
132
- else {
133
- const tupledArg = Component_decomposeName_Z721C83C5(matchValue);
134
- patternInput = [tupledArg[0], tupledArg[1]];
135
- }
136
- return new Component(c.ComponentName, patternInput[0], patternInput[1], c.ComponentType);
137
- }, object_19((get$) => {
138
- let objectArg, arg_3, objectArg_1;
139
- return new Component((objectArg = get$.Optional, objectArg.Field("componentName", uri)), void 0, void 0, (arg_3 = OntologyAnnotation_decoder(options), (objectArg_1 = get$.Optional, objectArg_1.Field("componentType", uncurry2(arg_3)))));
140
- }, s, json));
119
+ }, toList(delay(() => append(ConverterOptions__get_SetID(options) ? singleton(["@id", new Json(0, [Component_genID(oa)])]) : empty(), delay(() => append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", list_1(ofArray([new Json(0, ["Component"]), new Json(0, ["ArcComponent"])]))]) : empty(), delay(() => append(singleton(tryInclude("componentName", (value_3) => (new Json(0, [value_3])), oa.ComponentName)), delay(() => append(singleton(tryInclude("componentType", (oa_1) => OntologyAnnotation_encoder(options, oa_1), oa.ComponentType)), delay(() => (ConverterOptions__get_IncludeContext(options) ? singleton(["@context", context_jsonvalue_1]) : empty()))))))))))))]);
120
+ }
121
+
122
+ export function Component_decoder(options) {
123
+ return {
124
+ Decode(s, json) {
125
+ return Result_Map((c) => {
126
+ let patternInput;
127
+ const matchValue = c.ComponentName;
128
+ if (matchValue == null) {
129
+ patternInput = [void 0, void 0];
130
+ }
131
+ else {
132
+ const tupledArg = Component_decomposeName_Z721C83C5(matchValue);
133
+ patternInput = [tupledArg[0], tupledArg[1]];
134
+ }
135
+ return new Component(c.ComponentName, patternInput[0], patternInput[1], c.ComponentType);
136
+ }, object((get$) => {
137
+ let objectArg, arg_3, objectArg_1;
138
+ return new Component((objectArg = get$.Optional, objectArg.Field("componentName", uri)), void 0, void 0, (arg_3 = OntologyAnnotation_decoder(options), (objectArg_1 = get$.Optional, objectArg_1.Field("componentType", arg_3))));
139
+ }).Decode(s, json));
140
+ },
141
+ };
141
142
  }
142
143
 
143
144
  export function Component_fromJsonString(s) {
144
- let options;
145
- return fromJsonString(uncurry2((options = ConverterOptions_$ctor(), (s_1) => ((json) => Component_decoder(options, s_1, json)))), s);
145
+ const matchValue = fromString(Component_decoder(ConverterOptions_$ctor()), s);
146
+ if (matchValue.tag === 1) {
147
+ throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
148
+ }
149
+ else {
150
+ return matchValue.fields[0];
151
+ }
146
152
  }
147
153
 
148
154
  export function Component_toJsonString(p) {
@@ -152,19 +158,67 @@ export function Component_toJsonString(p) {
152
158
  /**
153
159
  * exports in json-ld format
154
160
  */
155
- export function Component_toStringLD(p) {
161
+ export function Component_toJsonldString(p) {
156
162
  let returnVal;
157
163
  return toString(2, Component_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), p));
158
164
  }
159
165
 
160
- export function Protocol_genID(p) {
166
+ export function Component_toJsonldStringWithContext(a) {
167
+ let returnVal;
168
+ return toString(2, Component_encoder((returnVal = ConverterOptions_$ctor(), (((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), ConverterOptions__set_IncludeContext_Z1FBCCD16(returnVal, true)), returnVal)), a));
169
+ }
170
+
171
+ export function Protocol_genID(studyName, assayName, processName, p) {
161
172
  const matchValue = p.ID;
162
173
  if (matchValue == null) {
163
174
  const matchValue_1 = p.Uri;
164
175
  if (matchValue_1 == null) {
165
176
  const matchValue_2 = p.Name;
166
177
  if (matchValue_2 == null) {
167
- return "#EmptyProtocol";
178
+ let matchResult, an, pn, sn, pn_1, sn_1, pn_2;
179
+ if (studyName == null) {
180
+ if (assayName == null) {
181
+ if (processName != null) {
182
+ matchResult = 2;
183
+ pn_2 = processName;
184
+ }
185
+ else {
186
+ matchResult = 3;
187
+ }
188
+ }
189
+ else {
190
+ matchResult = 3;
191
+ }
192
+ }
193
+ else if (assayName == null) {
194
+ if (processName != null) {
195
+ matchResult = 1;
196
+ pn_1 = processName;
197
+ sn_1 = studyName;
198
+ }
199
+ else {
200
+ matchResult = 3;
201
+ }
202
+ }
203
+ else if (processName != null) {
204
+ matchResult = 0;
205
+ an = assayName;
206
+ pn = processName;
207
+ sn = studyName;
208
+ }
209
+ else {
210
+ matchResult = 3;
211
+ }
212
+ switch (matchResult) {
213
+ case 0:
214
+ return (((("#Protocol_" + replace(sn, " ", "_")) + "_") + replace(an, " ", "_")) + "_") + replace(pn, " ", "_");
215
+ case 1:
216
+ return (("#Protocol_" + replace(sn_1, " ", "_")) + "_") + replace(pn_1, " ", "_");
217
+ case 2:
218
+ return "#Protocol_" + replace(pn_2, " ", "_");
219
+ default:
220
+ return "#EmptyProtocol";
221
+ }
168
222
  }
169
223
  else {
170
224
  return "#Protocol_" + replace(matchValue_2, " ", "_");
@@ -179,64 +233,49 @@ export function Protocol_genID(p) {
179
233
  }
180
234
  }
181
235
 
182
- export function Protocol_encoder(options, oa) {
183
- return object_18(choose((tupledArg) => {
236
+ export function Protocol_encoder(options, studyName, assayName, processName, oa) {
237
+ return new Json(5, [choose((tupledArg) => {
184
238
  const v = tupledArg[1];
185
- if (equals(v, nil)) {
239
+ if (equals(v, new Json(3, []))) {
186
240
  return void 0;
187
241
  }
188
242
  else {
189
243
  return [tupledArg[0], v];
190
244
  }
191
- }, toList(delay(() => {
192
- let value, s;
193
- return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = Protocol_genID(oa), (typeof value === "string") ? ((s = value, s)) : nil)]) : singleton(tryInclude("@id", (value_2) => {
194
- let s_1;
195
- const value_3 = value_2;
196
- return (typeof value_3 === "string") ? ((s_1 = value_3, s_1)) : nil;
197
- }, oa["ID"])), delay(() => {
198
- let value_5, s_2;
199
- return append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", (value_5 = "Protocol", (typeof value_5 === "string") ? ((s_2 = value_5, s_2)) : nil)]) : empty(), delay(() => append(singleton(tryInclude("name", (value_7) => {
200
- let s_3;
201
- const value_8 = value_7;
202
- return (typeof value_8 === "string") ? ((s_3 = value_8, s_3)) : nil;
203
- }, oa["Name"])), delay(() => append(singleton(tryInclude("protocolType", (oa_1) => OntologyAnnotation_encoder(options, oa_1), oa["ProtocolType"])), delay(() => append(singleton(tryInclude("description", (value_10) => {
204
- let s_4;
205
- const value_11 = value_10;
206
- return (typeof value_11 === "string") ? ((s_4 = value_11, s_4)) : nil;
207
- }, oa["Description"])), delay(() => append(singleton(tryInclude("uri", (value_13) => {
208
- let s_5;
209
- const value_14 = value_13;
210
- return (typeof value_14 === "string") ? ((s_5 = value_14, s_5)) : nil;
211
- }, oa["Uri"])), delay(() => append(singleton(tryInclude("version", (value_16) => {
212
- let s_6;
213
- const value_17 = value_16;
214
- return (typeof value_17 === "string") ? ((s_6 = value_17, s_6)) : nil;
215
- }, oa["Version"])), delay(() => append(singleton(tryInclude("parameters", (oa_2) => ProtocolParameter_encoder(options, oa_2), oa["Parameters"])), delay(() => append(singleton(tryInclude("components", (oa_3) => Component_encoder(options, oa_3), oa["Components"])), delay(() => singleton(tryInclude("comments", (comment) => encoder(options, comment), oa["Comments"]))))))))))))))))));
216
- }));
217
- }))));
245
+ }, toList(delay(() => append(ConverterOptions__get_SetID(options) ? singleton(["@id", new Json(0, [Protocol_genID(studyName, assayName, processName, oa)])]) : singleton(tryInclude("@id", (value_1) => (new Json(0, [value_1])), oa.ID)), delay(() => append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", list_1(ofArray([new Json(0, ["Protocol"]), new Json(0, ["ArcProtocol"])]))]) : empty(), delay(() => append(singleton(tryInclude("name", (value_5) => (new Json(0, [value_5])), oa.Name)), delay(() => append(singleton(tryInclude("protocolType", (oa_1) => OntologyAnnotation_encoder(options, oa_1), oa.ProtocolType)), delay(() => append(singleton(tryInclude("description", (value_7) => (new Json(0, [value_7])), oa.Description)), delay(() => append(singleton(tryInclude("uri", (value_9) => (new Json(0, [value_9])), oa.Uri)), delay(() => append(singleton(tryInclude("version", (value_11) => (new Json(0, [value_11])), oa.Version)), delay(() => append(singleton(tryIncludeList("parameters", (oa_2) => ProtocolParameter_encoder(options, oa_2), oa.Parameters)), delay(() => append(singleton(tryIncludeList("components", (oa_3) => Component_encoder(options, oa_3), oa.Components)), delay(() => append(singleton(tryIncludeList("comments", (comment) => encoder(options, comment), oa.Comments)), delay(() => (ConverterOptions__get_IncludeContext(options) ? singleton(["@context", context_jsonvalue_2]) : empty()))))))))))))))))))))))))]);
218
246
  }
219
247
 
220
248
  export function Protocol_decoder(options) {
221
- return (path_6) => ((v) => object_19((get$) => {
222
- let objectArg, objectArg_1, arg_5, objectArg_2, objectArg_3, objectArg_4, objectArg_5, arg_13, decoder, objectArg_6, objectArg_7, arg_17, decoder_2, objectArg_8;
223
- return new Protocol((objectArg = get$.Optional, objectArg.Field("@id", uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("name", string)), (arg_5 = OntologyAnnotation_decoder(options), (objectArg_2 = get$.Optional, objectArg_2.Field("protocolType", uncurry2(arg_5)))), (objectArg_3 = get$.Optional, objectArg_3.Field("description", string)), (objectArg_4 = get$.Optional, objectArg_4.Field("uri", uri)), (objectArg_5 = get$.Optional, objectArg_5.Field("version", string)), (arg_13 = ((decoder = ProtocolParameter_decoder(options), (path_3) => ((value_3) => list_1(uncurry2(decoder), path_3, value_3)))), (objectArg_6 = get$.Optional, objectArg_6.Field("parameters", uncurry2(arg_13)))), (objectArg_7 = get$.Optional, objectArg_7.Field("components", (path_4, value_4) => list_1((s_2, json_2) => Component_decoder(options, s_2, json_2), path_4, value_4))), (arg_17 = ((decoder_2 = decoder_3(options), (path_5) => ((value_5) => list_1(uncurry2(decoder_2), path_5, value_5)))), (objectArg_8 = get$.Optional, objectArg_8.Field("comments", uncurry2(arg_17)))));
224
- }, path_6, v));
249
+ return object((get$) => {
250
+ let objectArg, objectArg_1, arg_5, objectArg_2, objectArg_3, objectArg_4, objectArg_5, arg_13, objectArg_6, arg_15, objectArg_7, arg_17, objectArg_8;
251
+ return new Protocol((objectArg = get$.Optional, objectArg.Field("@id", uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("name", string)), (arg_5 = OntologyAnnotation_decoder(options), (objectArg_2 = get$.Optional, objectArg_2.Field("protocolType", arg_5))), (objectArg_3 = get$.Optional, objectArg_3.Field("description", string)), (objectArg_4 = get$.Optional, objectArg_4.Field("uri", uri)), (objectArg_5 = get$.Optional, objectArg_5.Field("version", string)), (arg_13 = list_2(ProtocolParameter_decoder(options)), (objectArg_6 = get$.Optional, objectArg_6.Field("parameters", arg_13))), (arg_15 = list_2(Component_decoder(options)), (objectArg_7 = get$.Optional, objectArg_7.Field("components", arg_15))), (arg_17 = list_2(decoder_1(options)), (objectArg_8 = get$.Optional, objectArg_8.Field("comments", arg_17))));
252
+ });
225
253
  }
226
254
 
227
255
  export function Protocol_fromJsonString(s) {
228
- return fromJsonString(uncurry2(Protocol_decoder(ConverterOptions_$ctor())), s);
256
+ const matchValue = fromString(Protocol_decoder(ConverterOptions_$ctor()), s);
257
+ if (matchValue.tag === 1) {
258
+ throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
259
+ }
260
+ else {
261
+ return matchValue.fields[0];
262
+ }
229
263
  }
230
264
 
231
265
  export function Protocol_toJsonString(p) {
232
- return toString(2, Protocol_encoder(ConverterOptions_$ctor(), p));
266
+ return toString(2, Protocol_encoder(ConverterOptions_$ctor(), void 0, void 0, void 0, p));
233
267
  }
234
268
 
235
269
  /**
236
270
  * exports in json-ld format
237
271
  */
238
- export function Protocol_toStringLD(p) {
272
+ export function Protocol_toJsonldString(p) {
273
+ let returnVal;
274
+ return toString(2, Protocol_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), void 0, void 0, void 0, p));
275
+ }
276
+
277
+ export function Protocol_toJsonldStringWithContext(a) {
239
278
  let returnVal;
240
- return toString(2, Protocol_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), p));
279
+ return toString(2, Protocol_encoder((returnVal = ConverterOptions_$ctor(), (((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), ConverterOptions__set_IncludeContext_Z1FBCCD16(returnVal, true)), returnVal)), void 0, void 0, void 0, a));
241
280
  }
242
281
 
@@ -1,15 +1,18 @@
1
- import { replace } from "../../fable_modules/fable-library.4.5.0/String.js";
2
- import { toString, nil, object as object_12 } from "../../fable_modules/Thoth.Json.10.1.0/Encode.fs.js";
3
- import { choose } from "../../fable_modules/fable-library.4.5.0/List.js";
4
- import { uncurry2, equals } from "../../fable_modules/fable-library.4.5.0/Util.js";
5
- import { empty, singleton, append, delay, toList } from "../../fable_modules/fable-library.4.5.0/Seq.js";
6
- import { ConverterOptions__set_IncludeType_Z1FBCCD16, ConverterOptions__set_SetID_Z1FBCCD16, ConverterOptions_$ctor, ConverterOptions__get_IncludeType, ConverterOptions__get_SetID } from "./ConverterOptions.js";
7
- import { tryInclude } from "./GEncode.js";
1
+ import { printf, toText, replace } from "../../fable_modules/fable-library-js.4.13.0/String.js";
2
+ import { ofArray, choose } from "../../fable_modules/fable-library-js.4.13.0/List.js";
3
+ import { equals } from "../../fable_modules/fable-library-js.4.13.0/Util.js";
4
+ import { Json } from "../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
5
+ import { empty, singleton, append, delay, toList } from "../../fable_modules/fable-library-js.4.13.0/Seq.js";
6
+ import { ConverterOptions__set_IncludeContext_Z1FBCCD16, ConverterOptions__set_IncludeType_Z1FBCCD16, ConverterOptions__set_SetID_Z1FBCCD16, ConverterOptions_$ctor, ConverterOptions__get_IncludeContext, ConverterOptions__get_IncludeType, ConverterOptions__get_SetID } from "./ConverterOptions.js";
7
+ import { tryIncludeArray, tryInclude } from "./GEncode.js";
8
8
  import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "./Ontology.js";
9
9
  import { decoder as decoder_2, encoder as encoder_1 } from "./Comment.js";
10
- import { array, string, object as object_13 } from "../../fable_modules/Thoth.Json.10.1.0/Decode.fs.js";
11
- import { fromJsonString as fromJsonString_1, uri } from "./Decode.js";
10
+ import { context_jsonvalue } from "./context/rocrate/isa_publication_context.js";
11
+ import { uri, object } from "./Decode.js";
12
+ import { array, string } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
12
13
  import { Publication } from "../ISA/JsonTypes/Publication.js";
14
+ import { fromString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
15
+ import { toString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
13
16
 
14
17
  export function genID(p) {
15
18
  const matchValue = p.DOI;
@@ -34,48 +37,34 @@ export function genID(p) {
34
37
  }
35
38
 
36
39
  export function encoder(options, oa) {
37
- return object_12(choose((tupledArg) => {
40
+ return new Json(5, [choose((tupledArg) => {
38
41
  const v = tupledArg[1];
39
- if (equals(v, nil)) {
42
+ if (equals(v, new Json(3, []))) {
40
43
  return void 0;
41
44
  }
42
45
  else {
43
46
  return [tupledArg[0], v];
44
47
  }
45
- }, toList(delay(() => {
46
- let value, s;
47
- return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = genID(oa), (typeof value === "string") ? ((s = value, s)) : nil)]) : empty(), delay(() => {
48
- let value_2, s_1;
49
- return append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", (value_2 = "Publication", (typeof value_2 === "string") ? ((s_1 = value_2, s_1)) : nil)]) : empty(), delay(() => append(singleton(tryInclude("pubMedID", (value_4) => {
50
- let s_2;
51
- const value_5 = value_4;
52
- return (typeof value_5 === "string") ? ((s_2 = value_5, s_2)) : nil;
53
- }, oa["PubMedID"])), delay(() => append(singleton(tryInclude("doi", (value_7) => {
54
- let s_3;
55
- const value_8 = value_7;
56
- return (typeof value_8 === "string") ? ((s_3 = value_8, s_3)) : nil;
57
- }, oa["DOI"])), delay(() => append(singleton(tryInclude("authorList", (value_10) => {
58
- let s_4;
59
- const value_11 = value_10;
60
- return (typeof value_11 === "string") ? ((s_4 = value_11, s_4)) : nil;
61
- }, oa["Authors"])), delay(() => append(singleton(tryInclude("title", (value_13) => {
62
- let s_5;
63
- const value_14 = value_13;
64
- return (typeof value_14 === "string") ? ((s_5 = value_14, s_5)) : nil;
65
- }, oa["Title"])), delay(() => append(singleton(tryInclude("status", (oa_1) => OntologyAnnotation_encoder(options, oa_1), oa["Status"])), delay(() => singleton(tryInclude("comments", (comment) => encoder_1(options, comment), oa["Comments"]))))))))))))));
66
- }));
67
- }))));
48
+ }, toList(delay(() => append(ConverterOptions__get_SetID(options) ? singleton(["@id", new Json(0, [genID(oa)])]) : empty(), delay(() => append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", new Json(0, ["Publication"])]) : empty(), delay(() => append(singleton(tryInclude("pubMedID", (value_2) => (new Json(0, [value_2])), oa.PubMedID)), delay(() => append(singleton(tryInclude("doi", (value_4) => (new Json(0, [value_4])), oa.DOI)), delay(() => append(singleton(tryInclude("authorList", (value_6) => (new Json(0, [value_6])), oa.Authors)), delay(() => append(singleton(tryInclude("title", (value_8) => (new Json(0, [value_8])), oa.Title)), delay(() => append(singleton(tryInclude("status", (oa_1) => OntologyAnnotation_encoder(options, oa_1), oa.Status)), delay(() => append(singleton(tryIncludeArray("comments", (comment) => encoder_1(options, comment), oa.Comments)), delay(() => (ConverterOptions__get_IncludeContext(options) ? singleton(["@context", context_jsonvalue]) : empty()))))))))))))))))))))]);
68
49
  }
69
50
 
51
+ export const allowedFields = ofArray(["@id", "pubMedID", "doi", "authorList", "title", "status", "comments", "@type", "@context"]);
52
+
70
53
  export function decoder(options) {
71
- return (path_4) => ((v) => object_13((get$) => {
72
- let objectArg, objectArg_1, objectArg_2, objectArg_3, arg_9, objectArg_4, arg_11, decoder_1, objectArg_5;
73
- return new Publication((objectArg = get$.Optional, objectArg.Field("pubMedID", uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("doi", string)), (objectArg_2 = get$.Optional, objectArg_2.Field("authorList", string)), (objectArg_3 = get$.Optional, objectArg_3.Field("title", string)), (arg_9 = OntologyAnnotation_decoder(options), (objectArg_4 = get$.Optional, objectArg_4.Field("status", uncurry2(arg_9)))), (arg_11 = ((decoder_1 = decoder_2(options), (path_3) => ((value_3) => array(uncurry2(decoder_1), path_3, value_3)))), (objectArg_5 = get$.Optional, objectArg_5.Field("comments", uncurry2(arg_11)))));
74
- }, path_4, v));
54
+ return object(allowedFields, (get$) => {
55
+ let objectArg, objectArg_1, objectArg_2, objectArg_3, arg_9, objectArg_4, arg_11, objectArg_5;
56
+ return new Publication((objectArg = get$.Optional, objectArg.Field("pubMedID", uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("doi", string)), (objectArg_2 = get$.Optional, objectArg_2.Field("authorList", string)), (objectArg_3 = get$.Optional, objectArg_3.Field("title", string)), (arg_9 = OntologyAnnotation_decoder(options), (objectArg_4 = get$.Optional, objectArg_4.Field("status", arg_9))), (arg_11 = array(decoder_2(options)), (objectArg_5 = get$.Optional, objectArg_5.Field("comments", arg_11))));
57
+ });
75
58
  }
76
59
 
77
60
  export function fromJsonString(s) {
78
- return fromJsonString_1(uncurry2(decoder(ConverterOptions_$ctor())), s);
61
+ const matchValue = fromString(decoder(ConverterOptions_$ctor()), s);
62
+ if (matchValue.tag === 1) {
63
+ throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
64
+ }
65
+ else {
66
+ return matchValue.fields[0];
67
+ }
79
68
  }
80
69
 
81
70
  export function toJsonString(p) {
@@ -85,8 +74,13 @@ export function toJsonString(p) {
85
74
  /**
86
75
  * exports in json-ld format
87
76
  */
88
- export function toStringLD(p) {
77
+ export function toJsonldString(p) {
89
78
  let returnVal;
90
79
  return toString(2, encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), p));
91
80
  }
92
81
 
82
+ export function toJsonldStringWithContext(a) {
83
+ let returnVal;
84
+ return toString(2, encoder((returnVal = ConverterOptions_$ctor(), (((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), ConverterOptions__set_IncludeContext_Z1FBCCD16(returnVal, true)), returnVal)), a));
85
+ }
86
+
@@ -0,0 +1,44 @@
1
+ import { item, map, setItem, fill } from "../../fable_modules/fable-library-js.4.13.0/Array.js";
2
+ import { iterate } from "../../fable_modules/fable-library-js.4.13.0/Seq.js";
3
+ import { Json } from "../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
4
+ import { int, string, array as array_1 } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
5
+ import { Dict_tryFind } from "../ISA/Helper.js";
6
+ import { addToDict } from "../../fable_modules/fable-library-js.4.13.0/MapUtil.js";
7
+ import { FSharpResult$2 } from "../../fable_modules/fable-library-js.4.13.0/Result.js";
8
+
9
+ export function StringTable_arrayFromMap(otm) {
10
+ const a = fill(new Array(otm.size), 0, otm.size, "");
11
+ iterate((kv) => {
12
+ setItem(a, kv[1], kv[0]);
13
+ }, otm);
14
+ return a;
15
+ }
16
+
17
+ export function StringTable_encoder(ot) {
18
+ return new Json(6, [map((value) => (new Json(0, [value])), ot)]);
19
+ }
20
+
21
+ export const StringTable_decoder = array_1(string);
22
+
23
+ export function StringTable_encodeString(otm, s) {
24
+ const matchValue = Dict_tryFind(s, otm);
25
+ if (matchValue == null) {
26
+ const i_1 = otm.size | 0;
27
+ addToDict(otm, s, i_1);
28
+ return new Json(7, [i_1 >>> 0]);
29
+ }
30
+ else {
31
+ const i = matchValue | 0;
32
+ return new Json(7, [i >>> 0]);
33
+ }
34
+ }
35
+
36
+ export function StringTable_decodeString(ot) {
37
+ return {
38
+ Decode(s, json) {
39
+ const matchValue = int.Decode(s, json);
40
+ return (matchValue.tag === 1) ? (new FSharpResult$2(1, [matchValue.fields[0]])) : (new FSharpResult$2(0, [item(matchValue.fields[0], ot)]));
41
+ },
42
+ };
43
+ }
44
+