@nfdi4plants/arctrl 3.0.0-beta.3 → 3.0.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (380) hide show
  1. package/README.md +2 -0
  2. package/dist/ts/index.js +63 -0
  3. package/dist/ts/node_modules/@fable-org/fable-library-js/Array.js +354 -0
  4. package/dist/ts/node_modules/@fable-org/fable-library-js/Async.js +28 -0
  5. package/dist/ts/node_modules/@fable-org/fable-library-js/AsyncBuilder.js +186 -0
  6. package/dist/ts/node_modules/@fable-org/fable-library-js/BigInt.js +8 -0
  7. package/dist/ts/node_modules/@fable-org/fable-library-js/Boolean.js +24 -0
  8. package/dist/ts/node_modules/@fable-org/fable-library-js/Char.js +73 -0
  9. package/dist/ts/node_modules/@fable-org/fable-library-js/CollectionUtil.js +31 -0
  10. package/dist/ts/node_modules/@fable-org/fable-library-js/Date.js +574 -0
  11. package/dist/ts/node_modules/@fable-org/fable-library-js/DateOffset.js +59 -0
  12. package/dist/ts/node_modules/@fable-org/fable-library-js/Decimal.js +65 -0
  13. package/dist/ts/node_modules/@fable-org/fable-library-js/Double.js +30 -0
  14. package/dist/ts/node_modules/@fable-org/fable-library-js/FSharp.Core.js +5 -0
  15. package/dist/ts/node_modules/@fable-org/fable-library-js/Global.js +5 -0
  16. package/dist/ts/node_modules/@fable-org/fable-library-js/Guid.js +48 -0
  17. package/dist/ts/node_modules/@fable-org/fable-library-js/Int32.js +120 -0
  18. package/dist/ts/node_modules/@fable-org/fable-library-js/List.js +680 -0
  19. package/dist/ts/node_modules/@fable-org/fable-library-js/Long.js +40 -0
  20. package/dist/ts/node_modules/@fable-org/fable-library-js/Map.js +655 -0
  21. package/dist/ts/node_modules/@fable-org/fable-library-js/MapUtil.js +105 -0
  22. package/dist/ts/node_modules/@fable-org/fable-library-js/MutableMap.js +320 -0
  23. package/dist/ts/node_modules/@fable-org/fable-library-js/MutableSet.js +204 -0
  24. package/dist/ts/node_modules/@fable-org/fable-library-js/Native.js +10 -0
  25. package/dist/ts/node_modules/@fable-org/fable-library-js/Numeric.js +73 -0
  26. package/dist/ts/node_modules/@fable-org/fable-library-js/Option.js +65 -0
  27. package/dist/ts/node_modules/@fable-org/fable-library-js/Range.js +23 -0
  28. package/dist/ts/node_modules/@fable-org/fable-library-js/Reflection.js +111 -0
  29. package/dist/ts/node_modules/@fable-org/fable-library-js/RegExp.js +114 -0
  30. package/dist/ts/node_modules/@fable-org/fable-library-js/Result.js +36 -0
  31. package/dist/ts/node_modules/@fable-org/fable-library-js/Seq.js +846 -0
  32. package/dist/ts/node_modules/@fable-org/fable-library-js/Seq2.js +65 -0
  33. package/dist/ts/node_modules/@fable-org/fable-library-js/Set.js +1160 -0
  34. package/dist/ts/node_modules/@fable-org/fable-library-js/String.js +364 -0
  35. package/dist/ts/node_modules/@fable-org/fable-library-js/System.Text.js +40 -0
  36. package/dist/ts/node_modules/@fable-org/fable-library-js/Types.js +193 -0
  37. package/dist/ts/node_modules/@fable-org/fable-library-js/Unicode.13.0.0.js +6 -0
  38. package/dist/ts/node_modules/@fable-org/fable-library-js/Uri.js +160 -0
  39. package/dist/ts/node_modules/@fable-org/fable-library-js/Util.js +367 -0
  40. package/dist/ts/node_modules/@fable-org/fable-library-js/lib/big.js +825 -0
  41. package/dist/ts/ts/ARC.js +914 -0
  42. package/dist/ts/ts/Contract/ARC.js +52 -0
  43. package/dist/ts/ts/Contract/ArcAssay.js +80 -0
  44. package/dist/ts/ts/Contract/ArcInvestigation.js +57 -0
  45. package/dist/ts/ts/Contract/ArcRun.js +76 -0
  46. package/dist/ts/ts/Contract/ArcStudy.js +76 -0
  47. package/dist/ts/ts/Contract/ArcWorkflow.js +77 -0
  48. package/dist/ts/ts/Contract/Contract.js +45 -0
  49. package/dist/ts/ts/Contract/Datamap.js +221 -0
  50. package/dist/ts/ts/Contract/Git.js +57 -0
  51. package/dist/ts/ts/Contract/ValidationPackagesConfig.js +57 -0
  52. package/dist/ts/ts/ContractIO/ContractIO.js +202 -0
  53. package/dist/ts/ts/ContractIO/FileSystemHelper.d.ts +1 -1
  54. package/dist/ts/ts/ContractIO/FileSystemHelper.d.ts.map +1 -1
  55. package/dist/ts/ts/ContractIO/FileSystemHelper.js +273 -0
  56. package/dist/ts/ts/Conversion.js +1247 -0
  57. package/dist/ts/ts/Core/ArcTypes.js +3393 -0
  58. package/dist/ts/ts/Core/Comment.js +91 -0
  59. package/dist/ts/ts/Core/CommentList.js +27 -0
  60. package/dist/ts/ts/Core/Conversion.js +923 -0
  61. package/dist/ts/ts/Core/Data.js +179 -0
  62. package/dist/ts/ts/Core/DataContext.js +108 -0
  63. package/dist/ts/ts/Core/DataFile.js +50 -0
  64. package/dist/ts/ts/Core/DataMap.js +53 -0
  65. package/dist/ts/ts/Core/Helper/Collections.js +323 -0
  66. package/dist/ts/ts/Core/Helper/HashCodes.js +35 -0
  67. package/dist/ts/ts/Core/Helper/Identifier.js +96 -0
  68. package/dist/ts/ts/Core/Helper/ORCID.js +34 -0
  69. package/dist/ts/ts/Core/Helper/Regex.js +296 -0
  70. package/dist/ts/ts/Core/Helper/SemVer.js +31 -0
  71. package/dist/ts/ts/Core/Helper/Url.js +32 -0
  72. package/dist/ts/ts/Core/IdentifierSetters.js +9 -0
  73. package/dist/ts/ts/Core/OntologyAnnotation.js +207 -0
  74. package/dist/ts/ts/Core/OntologySourceReference.js +84 -0
  75. package/dist/ts/ts/Core/Person.js +183 -0
  76. package/dist/ts/ts/Core/Process/ColumnIndex.js +73 -0
  77. package/dist/ts/ts/Core/Process/Component.js +121 -0
  78. package/dist/ts/ts/Core/Process/Factor.js +104 -0
  79. package/dist/ts/ts/Core/Process/FactorValue.js +68 -0
  80. package/dist/ts/ts/Core/Process/Material.js +49 -0
  81. package/dist/ts/ts/Core/Process/MaterialAttribute.js +30 -0
  82. package/dist/ts/ts/Core/Process/MaterialAttributeValue.js +68 -0
  83. package/dist/ts/ts/Core/Process/MaterialType.js +28 -0
  84. package/dist/ts/ts/Core/Process/Process.js +136 -0
  85. package/dist/ts/ts/Core/Process/ProcessInput.js +207 -0
  86. package/dist/ts/ts/Core/Process/ProcessOutput.js +178 -0
  87. package/dist/ts/ts/Core/Process/ProcessParameterValue.js +135 -0
  88. package/dist/ts/ts/Core/Process/ProcessSequence.js +56 -0
  89. package/dist/ts/ts/Core/Process/Protocol.js +54 -0
  90. package/dist/ts/ts/Core/Process/ProtocolParameter.js +69 -0
  91. package/dist/ts/ts/Core/Process/Sample.js +44 -0
  92. package/dist/ts/ts/Core/Process/Source.js +38 -0
  93. package/dist/ts/ts/Core/Publication.js +108 -0
  94. package/dist/ts/ts/Core/Table/ArcTable.js +889 -0
  95. package/dist/ts/ts/Core/Table/ArcTableAux.js +993 -0
  96. package/dist/ts/ts/Core/Table/ArcTables.js +415 -0
  97. package/dist/ts/ts/Core/Table/CompositeCell.js +334 -0
  98. package/dist/ts/ts/Core/Table/CompositeColumn.js +52 -0
  99. package/dist/ts/ts/Core/Table/CompositeHeader.js +792 -0
  100. package/dist/ts/ts/Core/Template.js +180 -0
  101. package/dist/ts/ts/Core/Templates.js +75 -0
  102. package/dist/ts/ts/Core/URI.js +8 -0
  103. package/dist/ts/ts/Core/Value.js +194 -0
  104. package/dist/ts/ts/CrossAsync.js +20 -0
  105. package/dist/ts/ts/FileSystem/DefaultGitattributes.js +3 -0
  106. package/dist/ts/ts/FileSystem/DefaultGitignore.js +3 -0
  107. package/dist/ts/ts/FileSystem/FileSystem.js +48 -0
  108. package/dist/ts/ts/FileSystem/FileSystemTree.js +339 -0
  109. package/dist/ts/ts/FileSystem/Path.js +36 -0
  110. package/dist/ts/ts/Json/Assay.d.ts +1 -1
  111. package/dist/ts/ts/Json/Assay.js +221 -0
  112. package/dist/ts/ts/Json/Comment.d.ts +1 -1
  113. package/dist/ts/ts/Json/Comment.js +112 -0
  114. package/dist/ts/ts/Json/Data.d.ts +1 -1
  115. package/dist/ts/ts/Json/Data.js +138 -0
  116. package/dist/ts/ts/Json/DataFile.d.ts +1 -1
  117. package/dist/ts/ts/Json/DataFile.js +55 -0
  118. package/dist/ts/ts/Json/DataMap/DataContext.d.ts +1 -1
  119. package/dist/ts/ts/Json/DataMap/DataContext.js +39 -0
  120. package/dist/ts/ts/Json/DataMap/DataMap.d.ts +1 -1
  121. package/dist/ts/ts/Json/DataMap/DataMap.js +27 -0
  122. package/dist/ts/ts/Json/Decode.d.ts +2 -2
  123. package/dist/ts/ts/Json/Decode.js +209 -0
  124. package/dist/ts/ts/Json/Encode.d.ts +1 -1
  125. package/dist/ts/ts/Json/Encode.js +65 -0
  126. package/dist/ts/ts/Json/IDTable.d.ts +1 -1
  127. package/dist/ts/ts/Json/IDTable.js +28 -0
  128. package/dist/ts/ts/Json/Investigation.d.ts +1 -1
  129. package/dist/ts/ts/Json/Investigation.js +229 -0
  130. package/dist/ts/ts/Json/OntologyAnnotation.d.ts +1 -1
  131. package/dist/ts/ts/Json/OntologyAnnotation.js +194 -0
  132. package/dist/ts/ts/Json/OntologySourceReference.d.ts +1 -1
  133. package/dist/ts/ts/Json/OntologySourceReference.js +119 -0
  134. package/dist/ts/ts/Json/Person.d.ts +1 -1
  135. package/dist/ts/ts/Json/Person.js +316 -0
  136. package/dist/ts/ts/Json/Process/AssayMaterials.d.ts +1 -1
  137. package/dist/ts/ts/Json/Process/AssayMaterials.js +21 -0
  138. package/dist/ts/ts/Json/Process/Component.d.ts +1 -1
  139. package/dist/ts/ts/Json/Process/Component.js +41 -0
  140. package/dist/ts/ts/Json/Process/Factor.d.ts +1 -1
  141. package/dist/ts/ts/Json/Process/Factor.js +53 -0
  142. package/dist/ts/ts/Json/Process/FactorValue.d.ts +1 -1
  143. package/dist/ts/ts/Json/Process/FactorValue.js +44 -0
  144. package/dist/ts/ts/Json/Process/Material.d.ts +1 -1
  145. package/dist/ts/ts/Json/Process/Material.js +112 -0
  146. package/dist/ts/ts/Json/Process/MaterialAttribute.d.ts +1 -1
  147. package/dist/ts/ts/Json/Process/MaterialAttribute.js +43 -0
  148. package/dist/ts/ts/Json/Process/MaterialAttributeValue.d.ts +1 -1
  149. package/dist/ts/ts/Json/Process/MaterialAttributeValue.js +44 -0
  150. package/dist/ts/ts/Json/Process/MaterialType.d.ts +1 -1
  151. package/dist/ts/ts/Json/Process/MaterialType.js +45 -0
  152. package/dist/ts/ts/Json/Process/Process.d.ts +1 -1
  153. package/dist/ts/ts/Json/Process/Process.js +103 -0
  154. package/dist/ts/ts/Json/Process/ProcessInput.d.ts +1 -1
  155. package/dist/ts/ts/Json/Process/ProcessInput.js +42 -0
  156. package/dist/ts/ts/Json/Process/ProcessOutput.d.ts +1 -1
  157. package/dist/ts/ts/Json/Process/ProcessOutput.js +35 -0
  158. package/dist/ts/ts/Json/Process/ProcessParameterValue.d.ts +1 -1
  159. package/dist/ts/ts/Json/Process/ProcessParameterValue.js +28 -0
  160. package/dist/ts/ts/Json/Process/Protocol.d.ts +1 -1
  161. package/dist/ts/ts/Json/Process/Protocol.js +166 -0
  162. package/dist/ts/ts/Json/Process/ProtocolParameter.d.ts +1 -1
  163. package/dist/ts/ts/Json/Process/ProtocolParameter.js +43 -0
  164. package/dist/ts/ts/Json/Process/Sample.d.ts +1 -1
  165. package/dist/ts/ts/Json/Process/Sample.js +165 -0
  166. package/dist/ts/ts/Json/Process/Source.d.ts +1 -1
  167. package/dist/ts/ts/Json/Process/Source.js +133 -0
  168. package/dist/ts/ts/Json/Process/StudyMaterials.d.ts +1 -1
  169. package/dist/ts/ts/Json/Process/StudyMaterials.js +23 -0
  170. package/dist/ts/ts/Json/Process/Value.d.ts +1 -1
  171. package/dist/ts/ts/Json/Process/Value.js +41 -0
  172. package/dist/ts/ts/Json/PropertyValue.d.ts +1 -1
  173. package/dist/ts/ts/Json/PropertyValue.js +280 -0
  174. package/dist/ts/ts/Json/Publication.d.ts +1 -1
  175. package/dist/ts/ts/Json/Publication.js +123 -0
  176. package/dist/ts/ts/Json/ROCrate/LDContext.d.ts +1 -1
  177. package/dist/ts/ts/Json/ROCrate/LDContext.js +115 -0
  178. package/dist/ts/ts/Json/ROCrate/LDGraph.d.ts +1 -1
  179. package/dist/ts/ts/Json/ROCrate/LDGraph.js +83 -0
  180. package/dist/ts/ts/Json/ROCrate/LDNode.d.ts +1 -1
  181. package/dist/ts/ts/Json/ROCrate/LDNode.js +190 -0
  182. package/dist/ts/ts/Json/ROCrate/LDRef.d.ts +1 -1
  183. package/dist/ts/ts/Json/ROCrate/LDRef.js +24 -0
  184. package/dist/ts/ts/Json/ROCrate/LDValue.d.ts +1 -1
  185. package/dist/ts/ts/Json/ROCrate/LDValue.js +63 -0
  186. package/dist/ts/ts/Json/StringTable.d.ts +1 -1
  187. package/dist/ts/ts/Json/StringTable.js +66 -0
  188. package/dist/ts/ts/Json/Study.d.ts +1 -1
  189. package/dist/ts/ts/Json/Study.js +326 -0
  190. package/dist/ts/ts/Json/Table/ArcTable.d.ts +1 -1
  191. package/dist/ts/ts/Json/Table/ArcTable.js +210 -0
  192. package/dist/ts/ts/Json/Table/CellTable.d.ts +1 -1
  193. package/dist/ts/ts/Json/Table/CellTable.js +53 -0
  194. package/dist/ts/ts/Json/Table/CompositeCell.d.ts +1 -1
  195. package/dist/ts/ts/Json/Table/CompositeCell.js +106 -0
  196. package/dist/ts/ts/Json/Table/CompositeHeader.d.ts +1 -1
  197. package/dist/ts/ts/Json/Table/CompositeHeader.js +121 -0
  198. package/dist/ts/ts/Json/Table/IOType.d.ts +1 -1
  199. package/dist/ts/ts/Json/Table/IOType.js +15 -0
  200. package/dist/ts/ts/Json/Table/OATable.d.ts +1 -1
  201. package/dist/ts/ts/Json/Table/OATable.js +50 -0
  202. package/dist/ts/ts/Json/Table/Templates.d.ts +1 -1
  203. package/dist/ts/ts/Json/Table/Templates.js +15 -0
  204. package/dist/ts/ts/Json/context/rocrate/isa_assay_context.d.ts +1 -1
  205. package/dist/ts/ts/Json/context/rocrate/isa_assay_context.js +61 -0
  206. package/dist/ts/ts/Json/context/rocrate/isa_comment_context.d.ts +1 -1
  207. package/dist/ts/ts/Json/context/rocrate/isa_comment_context.js +29 -0
  208. package/dist/ts/ts/Json/context/rocrate/isa_data_context.d.ts +1 -1
  209. package/dist/ts/ts/Json/context/rocrate/isa_data_context.js +41 -0
  210. package/dist/ts/ts/Json/context/rocrate/isa_investigation_context.d.ts +1 -1
  211. package/dist/ts/ts/Json/context/rocrate/isa_investigation_context.js +69 -0
  212. package/dist/ts/ts/Json/context/rocrate/isa_material_context.d.ts +1 -1
  213. package/dist/ts/ts/Json/context/rocrate/isa_material_context.js +37 -0
  214. package/dist/ts/ts/Json/context/rocrate/isa_ontology_annotation_context.d.ts +1 -1
  215. package/dist/ts/ts/Json/context/rocrate/isa_ontology_annotation_context.js +37 -0
  216. package/dist/ts/ts/Json/context/rocrate/isa_ontology_source_reference_context.d.ts +1 -1
  217. package/dist/ts/ts/Json/context/rocrate/isa_ontology_source_reference_context.js +41 -0
  218. package/dist/ts/ts/Json/context/rocrate/isa_organization_context.d.ts +1 -1
  219. package/dist/ts/ts/Json/context/rocrate/isa_organization_context.js +25 -0
  220. package/dist/ts/ts/Json/context/rocrate/isa_person_context.d.ts +1 -1
  221. package/dist/ts/ts/Json/context/rocrate/isa_person_context.js +86 -0
  222. package/dist/ts/ts/Json/context/rocrate/isa_process_context.d.ts +1 -1
  223. package/dist/ts/ts/Json/context/rocrate/isa_process_context.js +57 -0
  224. package/dist/ts/ts/Json/context/rocrate/isa_protocol_context.d.ts +1 -1
  225. package/dist/ts/ts/Json/context/rocrate/isa_protocol_context.js +61 -0
  226. package/dist/ts/ts/Json/context/rocrate/isa_publication_context.d.ts +1 -1
  227. package/dist/ts/ts/Json/context/rocrate/isa_publication_context.js +45 -0
  228. package/dist/ts/ts/Json/context/rocrate/isa_sample_context.d.ts +1 -1
  229. package/dist/ts/ts/Json/context/rocrate/isa_sample_context.js +33 -0
  230. package/dist/ts/ts/Json/context/rocrate/isa_source_context.d.ts +1 -1
  231. package/dist/ts/ts/Json/context/rocrate/isa_source_context.js +33 -0
  232. package/dist/ts/ts/Json/context/rocrate/isa_study_context.d.ts +1 -1
  233. package/dist/ts/ts/Json/context/rocrate/isa_study_context.js +77 -0
  234. package/dist/ts/ts/Json/context/rocrate/property_value_context.d.ts +1 -1
  235. package/dist/ts/ts/Json/context/rocrate/property_value_context.js +61 -0
  236. package/dist/ts/ts/Json/context/rocrate/rocrate_context.d.ts +1 -1
  237. package/dist/ts/ts/Json.js +171 -0
  238. package/dist/ts/ts/JsonIO/Assay.js +77 -0
  239. package/dist/ts/ts/JsonIO/Investigation.js +77 -0
  240. package/dist/ts/ts/JsonIO/LDObject.js +77 -0
  241. package/dist/ts/ts/JsonIO/OntologyAnnotation.js +56 -0
  242. package/dist/ts/ts/JsonIO/Study.js +77 -0
  243. package/dist/ts/ts/JsonIO/Table/Compression.d.ts +1 -1
  244. package/dist/ts/ts/JsonIO/Table/Compression.js +39 -0
  245. package/dist/ts/ts/JsonIO/Table/Templates.d.ts +1 -1
  246. package/dist/ts/ts/JsonIO/Table/Templates.js +25 -0
  247. package/dist/ts/ts/ROCrate/Generic/Comment.js +103 -0
  248. package/dist/ts/ts/ROCrate/Generic/Dataset.js +624 -0
  249. package/dist/ts/ts/ROCrate/Generic/DefinedTerm.js +103 -0
  250. package/dist/ts/ts/ROCrate/Generic/File.js +184 -0
  251. package/dist/ts/ts/ROCrate/Generic/LabProcess.js +222 -0
  252. package/dist/ts/ts/ROCrate/Generic/LabProtocol.js +257 -0
  253. package/dist/ts/ts/ROCrate/Generic/Organization.js +63 -0
  254. package/dist/ts/ts/ROCrate/Generic/Person.js +377 -0
  255. package/dist/ts/ts/ROCrate/Generic/PostalAddress.js +143 -0
  256. package/dist/ts/ts/ROCrate/Generic/PropertyValue.js +512 -0
  257. package/dist/ts/ts/ROCrate/Generic/Sample.js +131 -0
  258. package/dist/ts/ts/ROCrate/Generic/ScholarlyArticle.js +173 -0
  259. package/dist/ts/ts/ROCrate/Helper.js +7 -0
  260. package/dist/ts/ts/ROCrate/LDContext.js +288 -0
  261. package/dist/ts/ts/ROCrate/LDObject.js +855 -0
  262. package/dist/ts/ts/ROCrate/ROCrateContext.js +39 -0
  263. package/dist/ts/ts/ROCrateIO.d.ts +1 -1
  264. package/dist/ts/ts/ROCrateIO.js +58 -0
  265. package/dist/ts/ts/Spreadsheet/AnnotationTable/ArcTable.d.ts +2 -2
  266. package/dist/ts/ts/Spreadsheet/AnnotationTable/ArcTable.d.ts.map +1 -1
  267. package/dist/ts/ts/Spreadsheet/AnnotationTable/ArcTable.js +149 -0
  268. package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeCell.js +63 -0
  269. package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeColumn.d.ts +2 -2
  270. package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeColumn.d.ts.map +1 -1
  271. package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeColumn.js +108 -0
  272. package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeHeader.js +410 -0
  273. package/dist/ts/ts/Spreadsheet/ArcAssay.d.ts +2 -2
  274. package/dist/ts/ts/Spreadsheet/ArcAssay.d.ts.map +1 -1
  275. package/dist/ts/ts/Spreadsheet/ArcAssay.js +169 -0
  276. package/dist/ts/ts/Spreadsheet/ArcInvestigation.d.ts +2 -2
  277. package/dist/ts/ts/Spreadsheet/ArcInvestigation.d.ts.map +1 -1
  278. package/dist/ts/ts/Spreadsheet/ArcInvestigation.js +316 -0
  279. package/dist/ts/ts/Spreadsheet/ArcRun.d.ts +2 -2
  280. package/dist/ts/ts/Spreadsheet/ArcRun.d.ts.map +1 -1
  281. package/dist/ts/ts/Spreadsheet/ArcRun.js +136 -0
  282. package/dist/ts/ts/Spreadsheet/ArcStudy.d.ts +2 -2
  283. package/dist/ts/ts/Spreadsheet/ArcStudy.d.ts.map +1 -1
  284. package/dist/ts/ts/Spreadsheet/ArcStudy.js +92 -0
  285. package/dist/ts/ts/Spreadsheet/ArcWorkflow.d.ts +2 -2
  286. package/dist/ts/ts/Spreadsheet/ArcWorkflow.d.ts.map +1 -1
  287. package/dist/ts/ts/Spreadsheet/ArcWorkflow.js +125 -0
  288. package/dist/ts/ts/Spreadsheet/CollectionAux.js +34 -0
  289. package/dist/ts/ts/Spreadsheet/DataMap.d.ts +1 -1
  290. package/dist/ts/ts/Spreadsheet/DataMap.d.ts.map +1 -1
  291. package/dist/ts/ts/Spreadsheet/DataMap.js +33 -0
  292. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapColumn.d.ts +2 -2
  293. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapColumn.d.ts.map +1 -1
  294. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapColumn.js +41 -0
  295. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapHeader.d.ts +1 -1
  296. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapHeader.d.ts.map +1 -1
  297. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapHeader.js +418 -0
  298. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapTable.d.ts +3 -3
  299. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapTable.d.ts.map +1 -1
  300. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapTable.js +85 -0
  301. package/dist/ts/ts/Spreadsheet/Metadata/Assays.js +90 -0
  302. package/dist/ts/ts/Spreadsheet/Metadata/Comment.js +58 -0
  303. package/dist/ts/ts/Spreadsheet/Metadata/Contacts.js +85 -0
  304. package/dist/ts/ts/Spreadsheet/Metadata/Conversions.js +133 -0
  305. package/dist/ts/ts/Spreadsheet/Metadata/DesignDescriptors.js +15 -0
  306. package/dist/ts/ts/Spreadsheet/Metadata/Factors.js +74 -0
  307. package/dist/ts/ts/Spreadsheet/Metadata/OntologyAnnotation.js +58 -0
  308. package/dist/ts/ts/Spreadsheet/Metadata/OntologySourceReference.js +62 -0
  309. package/dist/ts/ts/Spreadsheet/Metadata/Protocols.js +94 -0
  310. package/dist/ts/ts/Spreadsheet/Metadata/Publication.js +81 -0
  311. package/dist/ts/ts/Spreadsheet/Metadata/Run.js +91 -0
  312. package/dist/ts/ts/Spreadsheet/Metadata/SparseTable.d.ts +3 -3
  313. package/dist/ts/ts/Spreadsheet/Metadata/SparseTable.d.ts.map +1 -1
  314. package/dist/ts/ts/Spreadsheet/Metadata/SparseTable.js +193 -0
  315. package/dist/ts/ts/Spreadsheet/Metadata/Study.js +238 -0
  316. package/dist/ts/ts/Spreadsheet/Metadata/Workflow.js +105 -0
  317. package/dist/ts/ts/Template.Web.js +22 -0
  318. package/dist/ts/ts/ValidationPackages/ValidationPackage.js +53 -0
  319. package/dist/ts/ts/ValidationPackages/ValidationPackagesConfig.js +78 -0
  320. package/dist/ts/ts/WebRequest/WebRequest.Node.js +13 -0
  321. package/dist/ts/ts/WebRequest/WebRequest.js +19 -0
  322. package/dist/ts/ts/Xlsx.d.ts +1 -1
  323. package/dist/ts/ts/Xlsx.d.ts.map +1 -1
  324. package/dist/ts/ts/Xlsx.js +91 -0
  325. package/dist/ts/ts/Yaml/Encode.js +8 -0
  326. package/dist/ts/ts/Yaml/ValidationPackage.js +26 -0
  327. package/dist/ts/ts/Yaml/ValidationPackagesConfig.js +40 -0
  328. package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/DynamicObj.fs.js +344 -0
  329. package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/FableJS.fs.js +103 -0
  330. package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/HashCodes.fs.js +19 -0
  331. package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/PropertyHelper.fs.js +17 -0
  332. package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/ReflectionUtils.fs.js +7 -0
  333. package/dist/ts/ts/fable_modules/Fable.Exceljs.1.6.0/ExcelJs.fs.js +5 -0
  334. package/dist/ts/ts/fable_modules/Fable.Fetch.2.6.0/Fetch.fs.js +18 -0
  335. package/dist/ts/ts/fable_modules/Fable.Promise.3.2.0/Promise.fs.js +44 -0
  336. package/dist/ts/ts/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js +5 -0
  337. package/dist/ts/ts/fable_modules/Fable.SimpleHttp.3.5.0/Http.fs.js +142 -0
  338. package/dist/ts/ts/fable_modules/Fable.SimpleHttp.3.5.0/Types.fs.js +76 -0
  339. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Cells/FsCell.fs.js +359 -0
  340. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Cells/FsCellsCollection.fs.js +344 -0
  341. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsAddress.fs.js +154 -0
  342. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsColumn.fs.js +116 -0
  343. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsRow.fs.js +126 -0
  344. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsWorkbook.fs.js +135 -0
  345. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsWorksheet.fs.js +422 -0
  346. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/HashCodes.fs.js +5 -0
  347. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Json/Value.fs.js +25 -0
  348. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRange.fs.js +28 -0
  349. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeAddress.fs.js +82 -0
  350. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeBase.fs.js +69 -0
  351. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeColumn.fs.js +42 -0
  352. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeRow.fs.js +29 -0
  353. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Tables/FsTable.fs.js +348 -0
  354. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Tables/FsTableField.fs.js +86 -0
  355. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Cell.fs.js +68 -0
  356. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/FsExtensions.fs.js +12 -0
  357. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Table.fs.js +54 -0
  358. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Workbook.fs.js +33 -0
  359. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Worksheet.fs.js +63 -0
  360. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Xlsx.fs.js +66 -0
  361. package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.7.0/Decode.fs.js +544 -0
  362. package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.7.0/Encode.fs.js +31 -0
  363. package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.7.0/Types.fs.js +38 -0
  364. package/dist/ts/ts/fable_modules/Thoth.Json.JavaScript.0.4.1/Decode.fs.js +79 -0
  365. package/dist/ts/ts/fable_modules/Thoth.Json.JavaScript.0.4.1/Encode.fs.js +57 -0
  366. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Decode.fs.js +235 -0
  367. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Encode.fs.js +16 -0
  368. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Persil.fs.js +45 -0
  369. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Preprocessing.fs.js +89 -0
  370. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Reader.fs.js +480 -0
  371. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Regex.fs.js +11 -0
  372. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/RegexActivePatterns.fs.js +212 -0
  373. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Writer.fs.js +164 -0
  374. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/YAMLiciousTypes.fs.js +136 -0
  375. package/package.json +10 -7
  376. package/dist/ts/__vite-browser-external-2447137e.js +0 -4
  377. package/dist/ts/__vite-browser-external-b3701507.cjs +0 -1
  378. package/dist/ts/arctrl.cjs.js +0 -5691
  379. package/dist/ts/arctrl.es.js +0 -35562
  380. package/dist/ts/arctrl.umd.js +0 -5691
@@ -0,0 +1,993 @@
1
+ import { CompositeCell } from './CompositeCell.js';
2
+ import { op_UnaryNegation_Int32 } from '../../../node_modules/@fable-org/fable-library-js/Int32.js';
3
+ import { value, bind } from '../../../node_modules/@fable-org/fable-library-js/Option.js';
4
+ import { safeHash, getEnumerator, disposeSafe, defaultOf, toIterator, compare, comparePrimitives, equals } from '../../../node_modules/@fable-org/fable-library-js/Util.js';
5
+ import { addToDict, getItemFromDict, tryGetValue } from '../../../node_modules/@fable-org/fable-library-js/MapUtil.js';
6
+ import { Union, FSharpRef, toString } from '../../../node_modules/@fable-org/fable-library-js/Types.js';
7
+ import { isEmpty, max, toList, iterateIndexed, iterate, delay, length, filter, tryFindIndex, item, collect, singleton, empty as empty$1, map } from '../../../node_modules/@fable-org/fable-library-js/Seq.js';
8
+ import { ResizeArray_map, ResizeArray_init, ResizeArray_iteri, ResizeArray_create, List_tryPickAndRemove } from '../Helper/Collections.js';
9
+ import { toFail, toConsole, printf } from '../../../node_modules/@fable-org/fable-library-js/String.js';
10
+ import { rangeDouble } from '../../../node_modules/@fable-org/fable-library-js/Range.js';
11
+ import { ofSeq, empty, length as length$1, isEmpty as isEmpty$1, tail, head, cons, exists, pick, mapIndexed } from '../../../node_modules/@fable-org/fable-library-js/List.js';
12
+ import { max as max$1 } from '../../../node_modules/@fable-org/fable-library-js/Double.js';
13
+ import { setItem } from '../../../node_modules/@fable-org/fable-library-js/Array.js';
14
+
15
+ function getEmptyCellForHeader(header, columCellOption) {
16
+ const matchValue = header.IsTermColumn;
17
+ if (matchValue) {
18
+ let matchResult;
19
+ if (columCellOption == null) {
20
+ matchResult = 0;
21
+ } else {
22
+ switch (value(columCellOption).tag) {
23
+ case /* Term */
24
+ 0: {
25
+ matchResult = 0;
26
+ break;
27
+ }
28
+ case /* Unitized */
29
+ 2: {
30
+ matchResult = 1;
31
+ break;
32
+ }
33
+ default:
34
+ matchResult = 2;
35
+ }
36
+ }
37
+ switch (matchResult) {
38
+ case 0:
39
+ return CompositeCell.emptyTerm;
40
+ case 1:
41
+ return CompositeCell.emptyUnitized;
42
+ default:
43
+ throw new Error("[extendBodyCells] This should never happen, IsTermColumn header must be paired with either term or unitized cell.");
44
+ }
45
+ } else {
46
+ return CompositeCell.emptyFreeText;
47
+ }
48
+ }
49
+ function ensureCellHashInValueMap(value, valueMap) {
50
+ const hash = safeHash(value) | 0;
51
+ if (valueMap.has(hash)) {
52
+ return hash | 0;
53
+ } else {
54
+ addToDict(valueMap, hash, value);
55
+ return hash | 0;
56
+ }
57
+ }
58
+ function ColumnValueRefs_Constant(Item) {
59
+ return new ColumnValueRefs(0, [Item]);
60
+ }
61
+ function ColumnValueRefs_Sparse(Item) {
62
+ return new ColumnValueRefs(1, [Item]);
63
+ }
64
+ class ColumnValueRefs extends Union {
65
+ constructor(tag, fields) {
66
+ super();
67
+ this.tag = tag;
68
+ this.fields = fields;
69
+ }
70
+ cases() {
71
+ return ["Constant", "Sparse"];
72
+ }
73
+ }
74
+ function ColumnValueRefs__Copy(this$) {
75
+ if (this$.tag === /* Sparse */
76
+ 1) {
77
+ const values = this$.fields[0];
78
+ const d = /* @__PURE__ */ new Map([]);
79
+ iterate((v) => {
80
+ addToDict(d, v[0], v[1]);
81
+ }, values);
82
+ return ColumnValueRefs_Sparse(d);
83
+ } else {
84
+ return ColumnValueRefs_Constant(this$.fields[0]);
85
+ }
86
+ }
87
+ function ColumnValueRefs__ToSparse_Z524259A4(this$, rowCount) {
88
+ if (this$.tag === /* Sparse */
89
+ 1) {
90
+ return ColumnValueRefs_Sparse(this$.fields[0]);
91
+ } else {
92
+ const valueHash = this$.fields[0] | 0;
93
+ const d = /* @__PURE__ */ new Map([]);
94
+ for (let i = 0; i <= rowCount - 1; i++) {
95
+ addToDict(d, i, valueHash);
96
+ }
97
+ return ColumnValueRefs_Sparse(d);
98
+ }
99
+ }
100
+ function ColumnValueRefs_fromCellColumn_14896151(column, previousRowCount, valueMap) {
101
+ const l = length(column) | 0;
102
+ const cells = /* @__PURE__ */ new Map([]);
103
+ if (l === 0) {
104
+ return ColumnValueRefs_Sparse(cells);
105
+ } else {
106
+ let current;
107
+ const hash = ensureCellHashInValueMap(item(0, column), valueMap) | 0;
108
+ if (l >= previousRowCount) {
109
+ current = ColumnValueRefs_Constant(hash);
110
+ } else {
111
+ addToDict(cells, 0, hash);
112
+ current = ColumnValueRefs_Sparse(cells);
113
+ }
114
+ iterateIndexed((i, cell) => {
115
+ const hash_1 = ensureCellHashInValueMap(cell, valueMap) | 0;
116
+ if (current.tag === /* Sparse */
117
+ 1) {
118
+ const cells_2 = current.fields[0];
119
+ cells_2.set(i, hash_1);
120
+ } else if (current.fields[0] === hash_1) {
121
+ current.fields[0] | 0;
122
+ } else {
123
+ const cellHash_2 = current.fields[0] | 0;
124
+ const cells_1 = /* @__PURE__ */ new Map([]);
125
+ for (let j = 0; j <= i - 1; j++) {
126
+ cells_1.set(j, cellHash_2);
127
+ }
128
+ cells_1.set(i, hash_1);
129
+ current = ColumnValueRefs_Sparse(cells_1);
130
+ }
131
+ }, column);
132
+ return current;
133
+ }
134
+ }
135
+ function ColumnValueRefs__ToCellColumn_Z2609C9DD(this$, valueMap, rowCount, header) {
136
+ if (this$.tag === /* Sparse */
137
+ 1) {
138
+ const values = this$.fields[0];
139
+ const defaultCell = values.size === 0 ? getEmptyCellForHeader(header, void 0) : getEmptyCellForHeader(header, getItemFromDict(valueMap, getItemFromDict(values, max(values.keys(), {
140
+ Compare: comparePrimitives
141
+ }) - 1)));
142
+ return ResizeArray_init(rowCount, (i_1) => values.has(i_1) ? getItemFromDict(valueMap, getItemFromDict(values, i_1)) : defaultCell);
143
+ } else {
144
+ return ResizeArray_create(rowCount, getItemFromDict(valueMap, this$.fields[0]));
145
+ }
146
+ }
147
+ class ArcTableValues {
148
+ constructor(cols, valueMap, rowCount) {
149
+ this._columns = cols;
150
+ this._valueMap = valueMap;
151
+ this._rowCount = rowCount | 0;
152
+ }
153
+ get Columns() {
154
+ const this$ = this;
155
+ return this$._columns;
156
+ }
157
+ set Columns(columns) {
158
+ const this$ = this;
159
+ this$._columns = columns;
160
+ }
161
+ get ColumnCount() {
162
+ const this$ = this;
163
+ return (isEmpty(this$._columns) ? 0 : 1 + max(this$._columns.keys(), {
164
+ Compare: comparePrimitives
165
+ })) | 0;
166
+ }
167
+ get ValueMap() {
168
+ const this$ = this;
169
+ return this$._valueMap;
170
+ }
171
+ set ValueMap(valueMap) {
172
+ const this$ = this;
173
+ this$._valueMap = valueMap;
174
+ }
175
+ get RowCount() {
176
+ const this$ = this;
177
+ return this$._rowCount | 0;
178
+ }
179
+ set RowCount(rowCount) {
180
+ const this$ = this;
181
+ if (rowCount > 0 && rowCount < this$._rowCount) {
182
+ let enumerator = getEnumerator(this$._columns);
183
+ try {
184
+ while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
185
+ const matchValue = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]()[1];
186
+ if (matchValue.tag === /* Sparse */
187
+ 1) {
188
+ const values = matchValue.fields[0];
189
+ const enumerator_1 = getEnumerator(toList(values.keys()));
190
+ try {
191
+ while (enumerator_1["System.Collections.IEnumerator.MoveNext"]()) {
192
+ const key = enumerator_1["System.Collections.Generic.IEnumerator`1.get_Current"]() | 0;
193
+ if (key >= rowCount) {
194
+ values.delete(key);
195
+ }
196
+ }
197
+ } finally {
198
+ disposeSafe(enumerator_1);
199
+ }
200
+ }
201
+ }
202
+ } finally {
203
+ disposeSafe(enumerator);
204
+ }
205
+ }
206
+ this$._rowCount = rowCount | 0;
207
+ }
208
+ static fromCellColumns(columns) {
209
+ const rowCount = (columns.length === 0 ? 0 : max(ResizeArray_map((c) => c.length, columns), {
210
+ Compare: comparePrimitives
211
+ })) | 0;
212
+ const valueMap = /* @__PURE__ */ new Map([]);
213
+ const parsedColumns = /* @__PURE__ */ new Map([]);
214
+ iterateIndexed((i, column) => {
215
+ addToDict(parsedColumns, i, ColumnValueRefs_fromCellColumn_14896151(column, rowCount, valueMap));
216
+ }, columns);
217
+ return new ArcTableValues(parsedColumns, valueMap, rowCount);
218
+ }
219
+ static fromRefColumns(columns, valueMap, rowCount) {
220
+ const parsedColumns = /* @__PURE__ */ new Map([]);
221
+ iterateIndexed((i, column) => {
222
+ addToDict(parsedColumns, i, column);
223
+ }, columns);
224
+ return new ArcTableValues(parsedColumns, valueMap, rowCount);
225
+ }
226
+ static init() {
227
+ const valueMap = /* @__PURE__ */ new Map([]);
228
+ return new ArcTableValues(/* @__PURE__ */ new Map([]), valueMap, 0);
229
+ }
230
+ ToCellColumns(headers) {
231
+ const this$ = this;
232
+ return ResizeArray_init(headers.length, (i) => {
233
+ const header = headers[i];
234
+ return ColumnValueRefs__ToCellColumn_Z2609C9DD(getItemFromDict(this$._columns, i), this$._valueMap, this$._rowCount, header);
235
+ });
236
+ }
237
+ RescanValueMap() {
238
+ const this$ = this;
239
+ const newValueMap = /* @__PURE__ */ new Map([]);
240
+ let enumerator = getEnumerator(this$._columns);
241
+ try {
242
+ while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
243
+ const kv = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
244
+ const matchValue = kv[1];
245
+ if (matchValue.tag === /* Sparse */
246
+ 1) {
247
+ const values = matchValue.fields[0];
248
+ let enumerator_1 = getEnumerator(values);
249
+ try {
250
+ while (enumerator_1["System.Collections.IEnumerator.MoveNext"]()) {
251
+ const ckv = enumerator_1["System.Collections.Generic.IEnumerator`1.get_Current"]();
252
+ const hash_1 = ensureCellHashInValueMap(getItemFromDict(this$._valueMap, ckv[1]), newValueMap) | 0;
253
+ values.set(ckv[0], hash_1);
254
+ }
255
+ } finally {
256
+ disposeSafe(enumerator_1);
257
+ }
258
+ } else {
259
+ const valueHash = matchValue.fields[0] | 0;
260
+ const hash = ensureCellHashInValueMap(getItemFromDict(this$._valueMap, valueHash), newValueMap) | 0;
261
+ this$._columns.set(kv[0], ColumnValueRefs_Constant(hash));
262
+ }
263
+ }
264
+ } finally {
265
+ disposeSafe(enumerator);
266
+ }
267
+ this$._valueMap = newValueMap;
268
+ }
269
+ Copy() {
270
+ const this$ = this;
271
+ const nextValueMap = /* @__PURE__ */ new Map([]);
272
+ iterate((kv) => {
273
+ addToDict(nextValueMap, kv[0], kv[1].Copy());
274
+ }, this$._valueMap);
275
+ const nextColumns = /* @__PURE__ */ new Map([]);
276
+ iterate((kv_1) => {
277
+ addToDict(nextColumns, kv_1[0], ColumnValueRefs__Copy(kv_1[1]));
278
+ }, this$._columns);
279
+ return new ArcTableValues(nextColumns, nextValueMap, this$._rowCount);
280
+ }
281
+ GetHashCode() {
282
+ const this$ = this;
283
+ let hash = 0;
284
+ for (let i = 0; i <= this$.ColumnCount - 1; i++) {
285
+ let matchValue;
286
+ const dict = this$._columns;
287
+ let patternInput;
288
+ let outArg = defaultOf();
289
+ patternInput = [tryGetValue(dict, i, new FSharpRef(() => outArg, (v) => {
290
+ outArg = v;
291
+ })), outArg];
292
+ matchValue = patternInput[0] ? patternInput[1] : void 0;
293
+ if (matchValue != null) {
294
+ if (value(matchValue).tag === /* Sparse */
295
+ 1) {
296
+ const values = value(matchValue).fields[0];
297
+ let enumerator = getEnumerator(values);
298
+ try {
299
+ while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
300
+ const kv = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
301
+ hash = -1640531527 + kv[0] + (hash << 6) + (hash >> 2) | 0;
302
+ hash = -1640531527 + kv[1] + (hash << 6) + (hash >> 2) | 0;
303
+ }
304
+ } finally {
305
+ disposeSafe(enumerator);
306
+ }
307
+ } else {
308
+ const valueHash = value(matchValue).fields[0] | 0;
309
+ for (let i_1 = 0; i_1 <= this$._rowCount - 1; i_1++) {
310
+ hash = -1640531527 + i_1 + (hash << 6) + (hash >> 2) | 0;
311
+ hash = -1640531527 + valueHash + (hash << 6) + (hash >> 2) | 0;
312
+ }
313
+ }
314
+ }
315
+ }
316
+ return hash | 0;
317
+ }
318
+ Equals(other) {
319
+ let other_1;
320
+ const this$ = this;
321
+ return other instanceof ArcTableValues && (other_1 = other, safeHash(this$) === safeHash(other_1));
322
+ }
323
+ Item(crIndices) {
324
+ const this$ = this;
325
+ const row = crIndices[1] | 0;
326
+ const col = crIndices[0] | 0;
327
+ if (row > this$.RowCount - 1) {
328
+ const arg_1 = this$.RowCount | 0;
329
+ toFail(printf("Row index %d is out of bounds for ArcTableValues with row count %d."))(row)(arg_1);
330
+ }
331
+ if (col > this$.ColumnCount - 1) {
332
+ const arg_3 = this$.ColumnCount | 0;
333
+ toFail(printf("Column index %d is out of bounds for ArcTableValues with column count %d."))(col)(arg_3);
334
+ }
335
+ let matchValue;
336
+ const dict = this$._columns;
337
+ let patternInput;
338
+ let outArg = defaultOf();
339
+ patternInput = [tryGetValue(dict, col, new FSharpRef(() => outArg, (v) => {
340
+ outArg = v;
341
+ })), outArg];
342
+ matchValue = patternInput[0] ? patternInput[1] : void 0;
343
+ if (matchValue != null) {
344
+ const colValueRefs = value(matchValue);
345
+ if (colValueRefs.tag === /* Sparse */
346
+ 1) {
347
+ const values = colValueRefs.fields[0];
348
+ return values.has(row) ? getItemFromDict(this$._valueMap, getItemFromDict(values, row)) : toFail(printf("Row value for index %d does not exist in column %d of ArcTableValues."))(row)(col);
349
+ } else {
350
+ const valueHash = colValueRefs.fields[0] | 0;
351
+ return getItemFromDict(this$._valueMap, valueHash);
352
+ }
353
+ } else {
354
+ return toFail(printf("Column %d does not exist in ArcTableValues."))(col);
355
+ }
356
+ }
357
+ GetEnumerator() {
358
+ const this$ = this;
359
+ return getEnumerator(delay(() => collect((colI) => {
360
+ let matchValue;
361
+ const dict = this$._columns;
362
+ let patternInput;
363
+ let outArg = defaultOf();
364
+ patternInput = [tryGetValue(dict, colI, new FSharpRef(() => outArg, (v) => {
365
+ outArg = v;
366
+ })), outArg];
367
+ matchValue = patternInput[0] ? patternInput[1] : void 0;
368
+ if (matchValue != null) {
369
+ const matchValue_1 = value(matchValue);
370
+ if (matchValue_1.tag === /* Sparse */
371
+ 1) {
372
+ const values = matchValue_1.fields[0];
373
+ return collect((rowI_1) => values.has(rowI_1) ? singleton([[colI, rowI_1], getItemFromDict(this$._valueMap, getItemFromDict(values, rowI_1))]) : empty$1(), rangeDouble(0, 1, this$._rowCount - 1));
374
+ } else {
375
+ const valueHash = matchValue_1.fields[0] | 0;
376
+ return map((rowI) => [[colI, rowI], getItemFromDict(this$._valueMap, valueHash)], rangeDouble(0, 1, this$._rowCount - 1));
377
+ }
378
+ } else {
379
+ return empty$1();
380
+ }
381
+ }, rangeDouble(0, 1, this$.ColumnCount - 1))));
382
+ }
383
+ [Symbol.iterator]() {
384
+ return toIterator(getEnumerator(this));
385
+ }
386
+ "System.Collections.IEnumerable.GetEnumerator"() {
387
+ const this$ = this;
388
+ return getEnumerator(this$);
389
+ }
390
+ }
391
+ function $007CIsUniqueExistingHeader$007C_$007C(existingHeaders, input) {
392
+ switch (input.tag) {
393
+ case /* Parameter */
394
+ 3:
395
+ case /* Factor */
396
+ 2:
397
+ case /* Characteristic */
398
+ 1:
399
+ case /* Component */
400
+ 0:
401
+ case /* FreeText */
402
+ 13:
403
+ return void 0;
404
+ case /* Output */
405
+ 12:
406
+ return tryFindIndex((h) => h.tag === /* Output */
407
+ 12, existingHeaders);
408
+ case /* Input */
409
+ 11:
410
+ return tryFindIndex((h_1) => h_1.tag === /* Input */
411
+ 11, existingHeaders);
412
+ default:
413
+ return tryFindIndex((h_2) => equals(h_2, input), existingHeaders);
414
+ }
415
+ }
416
+ function tryFindDuplicateUnique(newHeader, existingHeaders) {
417
+ const activePatternResult = $007CIsUniqueExistingHeader$007C_$007C(existingHeaders, newHeader);
418
+ if (activePatternResult != null) {
419
+ const index = value(activePatternResult) | 0;
420
+ return index;
421
+ } else {
422
+ return void 0;
423
+ }
424
+ }
425
+ function tryFindDuplicateUniqueInArray(existingHeaders) {
426
+ const loop = (i_mut, duplicateList_mut, headerList_mut) => {
427
+ loop:
428
+ while (true) {
429
+ const i = i_mut, duplicateList = duplicateList_mut, headerList = headerList_mut;
430
+ let matchResult, header, tail$1;
431
+ if (isEmpty$1(headerList)) {
432
+ matchResult = 0;
433
+ } else if (isEmpty$1(tail(headerList))) {
434
+ matchResult = 0;
435
+ } else {
436
+ matchResult = 1;
437
+ header = head(headerList);
438
+ tail$1 = tail(headerList);
439
+ }
440
+ switch (matchResult) {
441
+ case 0:
442
+ return duplicateList;
443
+ default: {
444
+ const hasDuplicate = tryFindDuplicateUnique(header, tail$1);
445
+ i_mut = i + 1;
446
+ duplicateList_mut = hasDuplicate != null ? cons({
447
+ HeaderType: header,
448
+ Index1: i,
449
+ Index2: value(hasDuplicate)
450
+ }, duplicateList) : duplicateList;
451
+ headerList_mut = tail$1;
452
+ continue loop;
453
+ }
454
+ }
455
+ }
456
+ };
457
+ return loop(0, empty(), ofSeq(filter((x) => !x.IsTermColumn, existingHeaders)));
458
+ }
459
+ function SanityChecks_validateColumnIndex(index, columnCount, allowAppend) {
460
+ let x, y;
461
+ if (index < 0) {
462
+ throw new Error("Cannot insert CompositeColumn at index < 0.");
463
+ }
464
+ if (x = index | 0, y = columnCount | 0, allowAppend ? compare(x, y) > 0 : compare(x, y) >= 0) {
465
+ throw new Error(`Specified index is out of table range! Table contains only ${columnCount} columns.`);
466
+ }
467
+ }
468
+ function SanityChecks_validateRowIndex(index, rowCount, allowAppend) {
469
+ let x, y;
470
+ if (index < 0) {
471
+ throw new Error("Cannot insert CompositeColumn at index < 0.");
472
+ }
473
+ if (x = index | 0, y = rowCount | 0, allowAppend ? compare(x, y) > 0 : compare(x, y) >= 0) {
474
+ throw new Error(`Specified index is out of table range! Table contains only ${rowCount} rows.`);
475
+ }
476
+ }
477
+ function SanityChecks_validateColumn(column) {
478
+ column.Validate(true);
479
+ }
480
+ function SanityChecks_validateCellColumns(headers, columns, raiseException) {
481
+ let isValid = true;
482
+ let en = getEnumerator(headers);
483
+ let colIndex = 0;
484
+ if (headers.length !== columns.length && columns.length !== 0) {
485
+ ((message) => {
486
+ throw new Error(message);
487
+ } )(`Invalid table. Number of headers (${headers.length}) does not match number of columns (${columns.length}).`);
488
+ isValid = false;
489
+ }
490
+ while (isValid && en["System.Collections.IEnumerator.MoveNext"]() && columns.length !== 0) {
491
+ const header = en["System.Collections.Generic.IEnumerator`1.get_Current"]();
492
+ let colEn = getEnumerator(columns[colIndex]);
493
+ colIndex = colIndex + 1 | 0;
494
+ while (isValid && colEn["System.Collections.IEnumerator.MoveNext"]()) {
495
+ const cell = colEn["System.Collections.Generic.IEnumerator`1.get_Current"]();
496
+ const headerIsData = header.IsDataColumn;
497
+ const headerIsFreetext = !header.IsTermColumn && !header.IsDataColumn;
498
+ const cellIsNotFreetext = !cell.isFreeText;
499
+ if (headerIsData && (!cell.isData && cellIsNotFreetext)) {
500
+ ((message_1) => {
501
+ throw new Error(message_1);
502
+ } )(`Invalid combination of header \`${header}\` and cell \`${cell}\`. Data header should contain either Data or Freetext cells.`);
503
+ isValid = false;
504
+ }
505
+ if (headerIsFreetext && cellIsNotFreetext) {
506
+ ((message_2) => {
507
+ throw new Error(message_2);
508
+ } )(`Invalid combination of header \`${header}\` and cell \`${cell}\`. Freetext header should not contain non-freetext cells.`);
509
+ isValid = false;
510
+ }
511
+ }
512
+ }
513
+ return isValid;
514
+ }
515
+ function SanityChecks_validateArcTableValues(headers, values, raiseException) {
516
+ let clo;
517
+ let isValid = true;
518
+ let colIndex = 0;
519
+ if (headers.length !== values.ColumnCount && values.ColumnCount !== 0) {
520
+ (raiseException ? (message) => {
521
+ throw new Error(message);
522
+ } : (clo = toConsole(printf("%s")), (arg) => {
523
+ clo(arg);
524
+ }))(`Invalid table. Number of headers (${headers.length}) does not match number of columns (${values.ColumnCount}).`);
525
+ isValid = false;
526
+ }
527
+ if (values.RowCount !== 0 && values.ColumnCount !== 0) {
528
+ while (isValid && colIndex < values.ColumnCount) {
529
+ const header = headers[colIndex];
530
+ let matchValue;
531
+ const key = colIndex | 0;
532
+ const dict = values.Columns;
533
+ let patternInput;
534
+ let outArg = defaultOf();
535
+ patternInput = [tryGetValue(dict, key, new FSharpRef(() => outArg, (v) => {
536
+ outArg = v;
537
+ })), outArg];
538
+ matchValue = patternInput[0] ? patternInput[1] : void 0;
539
+ if (matchValue != null) {
540
+ if (value(matchValue).tag === /* Sparse */
541
+ 1) {
542
+ const column = value(matchValue).fields[0];
543
+ let enumerator = getEnumerator(column);
544
+ try {
545
+ while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
546
+ const kv = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
547
+ const cell_1 = getItemFromDict(values.ValueMap, kv[1]);
548
+ if (!cell_1.ValidateAgainstHeader(header, raiseException)) {
549
+ isValid = false;
550
+ }
551
+ }
552
+ } finally {
553
+ disposeSafe(enumerator);
554
+ }
555
+ } else {
556
+ const hash = value(matchValue).fields[0] | 0;
557
+ const cell = getItemFromDict(values.ValueMap, hash);
558
+ if (!cell.ValidateAgainstHeader(header, raiseException)) {
559
+ isValid = false;
560
+ }
561
+ }
562
+ }
563
+ colIndex = colIndex + 1 | 0;
564
+ }
565
+ }
566
+ return isValid;
567
+ }
568
+ function Unchecked_tryGetCellAt(column, row, values) {
569
+ let dict, patternInput, outArg;
570
+ return bind((col) => {
571
+ if (col.tag === /* Sparse */
572
+ 1) {
573
+ const vals = col.fields[0];
574
+ if (vals.has(row)) {
575
+ return getItemFromDict(values.ValueMap, getItemFromDict(vals, row));
576
+ } else {
577
+ return void 0;
578
+ }
579
+ } else {
580
+ const valueHash = col.fields[0] | 0;
581
+ return getItemFromDict(values.ValueMap, valueHash);
582
+ }
583
+ }, (dict = values.Columns, patternInput = (outArg = defaultOf(), [tryGetValue(dict, column, new FSharpRef(() => outArg, (v) => {
584
+ outArg = v;
585
+ })), outArg]), patternInput[0] ? patternInput[1] : void 0));
586
+ }
587
+ function Unchecked_getCellWithDefault(column, row, headers, values) {
588
+ if (headers.length <= column) {
589
+ const arg_1 = headers.length | 0;
590
+ toFail(printf("Column index %d is out of bounds for ArcTableValues with column count %d."))(column)(arg_1);
591
+ }
592
+ let matchValue;
593
+ const dict = values.Columns;
594
+ let patternInput;
595
+ let outArg = defaultOf();
596
+ patternInput = [tryGetValue(dict, column, new FSharpRef(() => outArg, (v) => {
597
+ outArg = v;
598
+ })), outArg];
599
+ matchValue = patternInput[0] ? patternInput[1] : void 0;
600
+ if (matchValue == null) {
601
+ if (row < values.RowCount) {
602
+ return CompositeCell.emptyFreeText;
603
+ } else {
604
+ return getEmptyCellForHeader(headers[column], void 0);
605
+ }
606
+ } else {
607
+ const col = value(matchValue);
608
+ if (col.tag === /* Sparse */
609
+ 1) {
610
+ const vals = col.fields[0];
611
+ if (vals.has(row)) {
612
+ return getItemFromDict(values.ValueMap, getItemFromDict(vals, row));
613
+ } else if (vals.size === 0) {
614
+ return getEmptyCellForHeader(headers[column], void 0);
615
+ } else {
616
+ const header_1 = headers[column];
617
+ const maxI = max(vals.keys(), {
618
+ Compare: comparePrimitives
619
+ }) | 0;
620
+ return getEmptyCellForHeader(header_1, getItemFromDict(values.ValueMap, getItemFromDict(vals, maxI)));
621
+ }
622
+ } else {
623
+ const valueHash = col.fields[0] | 0;
624
+ return getItemFromDict(values.ValueMap, valueHash);
625
+ }
626
+ }
627
+ }
628
+ function Unchecked_setCellAt(columnIndex, rowIndex, c, values) {
629
+ if (rowIndex + 1 > values.RowCount) {
630
+ values.RowCount = rowIndex + 1 | 0;
631
+ }
632
+ let matchValue;
633
+ const dict = values.Columns;
634
+ let patternInput;
635
+ let outArg = defaultOf();
636
+ patternInput = [tryGetValue(dict, columnIndex, new FSharpRef(() => outArg, (v) => {
637
+ outArg = v;
638
+ })), outArg];
639
+ matchValue = patternInput[0] ? patternInput[1] : void 0;
640
+ if (matchValue != null) {
641
+ const col = value(matchValue);
642
+ if (col.tag === /* Sparse */
643
+ 1) {
644
+ const vals = col.fields[0];
645
+ const key_1 = rowIndex | 0;
646
+ const value = ensureCellHashInValueMap(c, values.ValueMap) | 0;
647
+ const dict_1 = vals;
648
+ if (dict_1.has(key_1)) {
649
+ dict_1.set(key_1, value);
650
+ } else {
651
+ addToDict(dict_1, key_1, value);
652
+ }
653
+ } else {
654
+ const valueHash = col.fields[0] | 0;
655
+ const hash_2 = ensureCellHashInValueMap(c, values.ValueMap) | 0;
656
+ if (hash_2 === valueHash) ; else {
657
+ const d = /* @__PURE__ */ new Map([]);
658
+ for (let i = 0; i <= values.RowCount - 1; i++) {
659
+ if (i === rowIndex) {
660
+ addToDict(d, i, hash_2);
661
+ } else {
662
+ addToDict(d, i, valueHash);
663
+ }
664
+ }
665
+ values.Columns.set(columnIndex, ColumnValueRefs_Sparse(d));
666
+ }
667
+ }
668
+ } else if (values.RowCount <= 1 && rowIndex === 0) {
669
+ const hash = ensureCellHashInValueMap(c, values.ValueMap) | 0;
670
+ addToDict(values.Columns, columnIndex, ColumnValueRefs_Constant(hash));
671
+ } else {
672
+ const newColumn = /* @__PURE__ */ new Map([]);
673
+ addToDict(newColumn, rowIndex, ensureCellHashInValueMap(c, values.ValueMap));
674
+ addToDict(values.Columns, columnIndex, ColumnValueRefs_Sparse(newColumn));
675
+ }
676
+ }
677
+ function Unchecked_removeCellAt(columnIndex, rowIndex, values) {
678
+ let matchValue;
679
+ const dict = values.Columns;
680
+ let patternInput;
681
+ let outArg = defaultOf();
682
+ patternInput = [tryGetValue(dict, columnIndex, new FSharpRef(() => outArg, (v) => {
683
+ outArg = v;
684
+ })), outArg];
685
+ matchValue = patternInput[0] ? patternInput[1] : void 0;
686
+ if (matchValue != null) {
687
+ const col = value(matchValue);
688
+ if (col.tag === /* Sparse */
689
+ 1) {
690
+ const vals = col.fields[0];
691
+ if (vals.has(rowIndex)) {
692
+ vals.delete(rowIndex);
693
+ if (vals.size === 0) {
694
+ values.Columns.delete(columnIndex);
695
+ }
696
+ }
697
+ } else {
698
+ col.fields[0] | 0;
699
+ if (rowIndex === 0 && values.RowCount === 1) {
700
+ values.Columns.delete(columnIndex);
701
+ }
702
+ }
703
+ }
704
+ }
705
+ function Unchecked_moveCellTo(fromCol, fromRow, toCol, toRow, values) {
706
+ const matchValue = Unchecked_tryGetCellAt(fromCol, fromRow, values);
707
+ if (matchValue == null) ; else {
708
+ const cell = value(matchValue);
709
+ Unchecked_removeCellAt(fromCol, fromRow, values);
710
+ Unchecked_setCellAt(toCol, toRow, cell, values);
711
+ }
712
+ }
713
+ function Unchecked_removeHeader(index, headers) {
714
+ headers.splice(index, 1);
715
+ }
716
+ function Unchecked_removeColumnCells(colIndex, values) {
717
+ values.Columns.delete(colIndex);
718
+ }
719
+ function Unchecked_removeColumnCells_withIndexChange(colIndex, columnCount, values) {
720
+ if (colIndex < columnCount - 1) {
721
+ const cols = /* @__PURE__ */ new Map([]);
722
+ iterate((kv) => {
723
+ const cI = kv[0] | 0;
724
+ if (cI > colIndex) {
725
+ addToDict(cols, cI - 1, kv[1]);
726
+ } else if (cI < colIndex) {
727
+ addToDict(cols, cI, kv[1]);
728
+ }
729
+ }, values.Columns);
730
+ values.Columns = cols;
731
+ } else {
732
+ Unchecked_removeColumnCells(colIndex, values);
733
+ }
734
+ }
735
+ function Unchecked_removeRowCells_withIndexChange(rowIndex, values) {
736
+ if (rowIndex === 0 && values.RowCount === 1) {
737
+ values.RowCount = 0;
738
+ values.Columns = /* @__PURE__ */ new Map([]);
739
+ } else {
740
+ iterate((kv) => {
741
+ const matchValue = kv[1];
742
+ if (matchValue.tag === /* Sparse */
743
+ 1) {
744
+ const vals = matchValue.fields[0];
745
+ if (rowIndex < values.RowCount - 1) {
746
+ const col = /* @__PURE__ */ new Map([]);
747
+ iterate((kv_1) => {
748
+ const rI = kv_1[0] | 0;
749
+ if (rI > rowIndex) {
750
+ addToDict(col, rI - 1, kv_1[1]);
751
+ } else if (rI < rowIndex) {
752
+ addToDict(col, rI, kv_1[1]);
753
+ }
754
+ }, vals);
755
+ values.Columns.set(kv[0], ColumnValueRefs_Sparse(col));
756
+ } else {
757
+ vals.delete(rowIndex);
758
+ }
759
+ }
760
+ }, values.Columns);
761
+ values.RowCount = values.RowCount - 1 | 0;
762
+ }
763
+ }
764
+ function Unchecked_moveColumnCellsTo(fromCol, toCol, values) {
765
+ let matchValue;
766
+ const dict = values.Columns;
767
+ let patternInput;
768
+ let outArg = defaultOf();
769
+ patternInput = [tryGetValue(dict, fromCol, new FSharpRef(() => outArg, (v) => {
770
+ outArg = v;
771
+ })), outArg];
772
+ matchValue = patternInput[0] ? patternInput[1] : void 0;
773
+ if (matchValue != null) {
774
+ const col = value(matchValue);
775
+ Unchecked_removeColumnCells(fromCol, values);
776
+ const key_1 = toCol | 0;
777
+ const value$1 = col;
778
+ const dict_1 = values.Columns;
779
+ if (dict_1.has(key_1)) {
780
+ dict_1.set(key_1, value$1);
781
+ } else {
782
+ addToDict(dict_1, key_1, value$1);
783
+ }
784
+ }
785
+ }
786
+ function Unchecked_addRefColumn(newHeader, newCol, rowCount, index, forceReplace, onlyHeaders, headers, values) {
787
+ let numberOfNewColumns = 1;
788
+ let index_1 = index;
789
+ const hasDuplicateUnique = tryFindDuplicateUnique(newHeader, headers);
790
+ if (!forceReplace && hasDuplicateUnique != null) {
791
+ throw new Error(`Invalid new column \`${newHeader}\`. Table already contains header of the same type on index \`${value(hasDuplicateUnique)}\``);
792
+ }
793
+ if (rowCount > values.RowCount) {
794
+ values.RowCount = rowCount | 0;
795
+ let enumerator = getEnumerator(values.Columns);
796
+ try {
797
+ while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
798
+ const kv = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
799
+ values.Columns.set(kv[0], ColumnValueRefs__ToSparse_Z524259A4(kv[1], values.RowCount));
800
+ }
801
+ } finally {
802
+ disposeSafe(enumerator);
803
+ }
804
+ }
805
+ if (rowCount < values.RowCount && hasDuplicateUnique != null && forceReplace && values.Columns.size === 1) {
806
+ values.RowCount = rowCount | 0;
807
+ }
808
+ if (hasDuplicateUnique != null) {
809
+ numberOfNewColumns = 0;
810
+ index_1 = value(hasDuplicateUnique) | 0;
811
+ }
812
+ const matchValue = headers.length | 0;
813
+ values.RowCount | 0;
814
+ const startColCount = matchValue | 0;
815
+ if (hasDuplicateUnique != null) {
816
+ Unchecked_removeHeader(index_1, headers);
817
+ }
818
+ headers.splice(index_1, 0, newHeader);
819
+ if (index_1 < startColCount && hasDuplicateUnique == null) {
820
+ const lastColumnIndex = max$1(startColCount - 1, 0) | 0;
821
+ for (let columnIndex = lastColumnIndex; columnIndex >= index_1; columnIndex--) {
822
+ Unchecked_moveColumnCellsTo(columnIndex, columnIndex + numberOfNewColumns, values);
823
+ }
824
+ }
825
+ if (!onlyHeaders) {
826
+ const key = index_1 | 0;
827
+ const value = newCol;
828
+ const dict = values.Columns;
829
+ if (dict.has(key)) {
830
+ dict.set(key, value);
831
+ } else {
832
+ addToDict(dict, key, value);
833
+ }
834
+ }
835
+ }
836
+ function Unchecked_addColumn(newHeader, newCells, index, forceReplace, onlyHeaders, headers, values) {
837
+ Unchecked_addRefColumn(newHeader, ColumnValueRefs_fromCellColumn_14896151(newCells, values.RowCount, values.ValueMap), length(newCells), index, forceReplace, onlyHeaders, headers, values);
838
+ }
839
+ function Unchecked_addColumnFill(newHeader, newCell, index, forceReplace, onlyHeaders, headers, values) {
840
+ Unchecked_addRefColumn(newHeader, ColumnValueRefs_Constant(ensureCellHashInValueMap(newCell, values.ValueMap)), 1, index, forceReplace, onlyHeaders, headers, values);
841
+ }
842
+ function Unchecked_addEmptyRow(index, values) {
843
+ if (index < values.RowCount && values.ColumnCount !== 0) {
844
+ let enumerator = getEnumerator(values.Columns);
845
+ try {
846
+ while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
847
+ const matchValue = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]()[1];
848
+ if (matchValue.tag === /* Sparse */
849
+ 1) {
850
+ const dict = matchValue.fields[0];
851
+ const maxIndex = max(dict.keys(), {
852
+ Compare: comparePrimitives
853
+ }) | 0;
854
+ for (let i = maxIndex; i >= index + 1 - 1; i--) {
855
+ if (dict.has(i)) {
856
+ const v = getItemFromDict(dict, i) | 0;
857
+ dict.delete(i);
858
+ addToDict(dict, i + 1, v);
859
+ }
860
+ }
861
+ } else {
862
+ const valueHash = matchValue.fields[0] | 0;
863
+ }
864
+ }
865
+ } finally {
866
+ disposeSafe(enumerator);
867
+ }
868
+ }
869
+ values.RowCount = values.RowCount + 1 | 0;
870
+ }
871
+ function Unchecked_addRow(index, newCells, headers, values) {
872
+ const rowCount = values.RowCount | 0;
873
+ const columnCount = values.ColumnCount | 0;
874
+ if (index < rowCount) {
875
+ const lastRowIndex = max$1(rowCount - 1, 0) | 0;
876
+ for (let rowIndex = lastRowIndex; rowIndex >= index; rowIndex--) {
877
+ for (let columnIndex = 0; columnIndex <= columnCount - 1; columnIndex++) {
878
+ Unchecked_moveCellTo(columnIndex, rowIndex, columnIndex, rowIndex + 1, values);
879
+ }
880
+ }
881
+ }
882
+ ResizeArray_iteri((columnIndex_1, cell) => {
883
+ Unchecked_setCellAt(columnIndex_1, index, cell, values);
884
+ }, newCells);
885
+ }
886
+ function Unchecked_addRows(index, newRows, headers, values) {
887
+ const rowCount = values.RowCount | 0;
888
+ const columnCount = values.ColumnCount | 0;
889
+ const numNewRows = newRows.length | 0;
890
+ if (index < rowCount) {
891
+ const lastRowIndex = max$1(rowCount - 1, 0) | 0;
892
+ for (let rowIndex = lastRowIndex; rowIndex >= index; rowIndex--) {
893
+ for (let columnIndex = 0; columnIndex <= columnCount - 1; columnIndex++) {
894
+ Unchecked_moveCellTo(columnIndex, rowIndex, columnIndex, rowIndex + numNewRows, values);
895
+ }
896
+ }
897
+ }
898
+ let currentRowIndex = index;
899
+ let enumerator = getEnumerator(newRows);
900
+ try {
901
+ while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
902
+ const setNewCells = ResizeArray_iteri((columnIndex_1, cell) => {
903
+ Unchecked_setCellAt(columnIndex_1, currentRowIndex, cell, values);
904
+ }, enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]());
905
+ currentRowIndex = currentRowIndex + 1 | 0;
906
+ }
907
+ } finally {
908
+ disposeSafe(enumerator);
909
+ }
910
+ }
911
+ function Unchecked_compositeHeaderMainColumnEqual(ch1, ch2) {
912
+ return toString(ch1) === toString(ch2);
913
+ }
914
+ function Unchecked_moveColumnTo(fromCol, toCol, headers, values) {
915
+ const patternInput = fromCol < toCol ? [-1, fromCol + 1, toCol] : [1, fromCol - 1, toCol];
916
+ const shiftStart = patternInput[1] | 0;
917
+ const shiftEnd = patternInput[2] | 0;
918
+ const shift = patternInput[0] | 0;
919
+ const header = headers[fromCol];
920
+ const enumerator = getEnumerator(toList(rangeDouble(shiftStart, op_UnaryNegation_Int32(shift), shiftEnd)));
921
+ try {
922
+ while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
923
+ const c = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]() | 0;
924
+ setItem(headers, c + shift, headers[c]);
925
+ }
926
+ } finally {
927
+ disposeSafe(enumerator);
928
+ }
929
+ setItem(headers, toCol, header);
930
+ const col = getItemFromDict(values.Columns, fromCol);
931
+ const enumerator_1 = getEnumerator(toList(rangeDouble(shiftStart, op_UnaryNegation_Int32(shift), shiftEnd)));
932
+ try {
933
+ while (enumerator_1["System.Collections.IEnumerator.MoveNext"]()) {
934
+ const c_1 = enumerator_1["System.Collections.Generic.IEnumerator`1.get_Current"]() | 0;
935
+ values.Columns.set(c_1 + shift, getItemFromDict(values.Columns, c_1));
936
+ }
937
+ } finally {
938
+ disposeSafe(enumerator_1);
939
+ }
940
+ values.Columns.set(toCol, col);
941
+ }
942
+ function Unchecked_alignByHeaders(keepOrder, rows) {
943
+ const headers = [];
944
+ const values = ArcTableValues.init();
945
+ values.RowCount = length$1(rows) | 0;
946
+ const loop = (colI_mut, rows_2_mut) => {
947
+ loop:
948
+ while (true) {
949
+ const colI = colI_mut, rows_2 = rows_2_mut;
950
+ if (!exists((arg) => !isEmpty$1(arg), rows_2)) {
951
+ return [headers, values];
952
+ } else {
953
+ const firstElem = pick((l) => isEmpty$1(l) ? void 0 : head(l), rows_2)[0];
954
+ void headers.push(firstElem);
955
+ colI_mut = colI + 1;
956
+ rows_2_mut = mapIndexed((rowI, l_1) => {
957
+ if (keepOrder) {
958
+ if (!isEmpty$1(l_1)) {
959
+ if (Unchecked_compositeHeaderMainColumnEqual(head(l_1)[0], firstElem)) {
960
+ Unchecked_setCellAt(colI, rowI, head(l_1)[1], values);
961
+ return tail(l_1);
962
+ } else {
963
+ return l_1;
964
+ }
965
+ } else {
966
+ return empty();
967
+ }
968
+ } else {
969
+ const patternInput = List_tryPickAndRemove((tupledArg) => {
970
+ if (Unchecked_compositeHeaderMainColumnEqual(tupledArg[0], firstElem)) {
971
+ return tupledArg[1];
972
+ } else {
973
+ return void 0;
974
+ }
975
+ }, l_1);
976
+ const newL = patternInput[1];
977
+ const firstMatch = patternInput[0];
978
+ if (firstMatch == null) {
979
+ return newL;
980
+ } else {
981
+ Unchecked_setCellAt(colI, rowI, value(firstMatch), values);
982
+ return newL;
983
+ }
984
+ }
985
+ }, rows_2);
986
+ continue loop;
987
+ }
988
+ }
989
+ };
990
+ return loop(0, rows);
991
+ }
992
+
993
+ export { $007CIsUniqueExistingHeader$007C_$007C, ArcTableValues, ColumnValueRefs, ColumnValueRefs_Constant, ColumnValueRefs_Sparse, ColumnValueRefs__Copy, ColumnValueRefs__ToCellColumn_Z2609C9DD, ColumnValueRefs__ToSparse_Z524259A4, ColumnValueRefs_fromCellColumn_14896151, SanityChecks_validateArcTableValues, SanityChecks_validateCellColumns, SanityChecks_validateColumn, SanityChecks_validateColumnIndex, SanityChecks_validateRowIndex, Unchecked_addColumn, Unchecked_addColumnFill, Unchecked_addEmptyRow, Unchecked_addRefColumn, Unchecked_addRow, Unchecked_addRows, Unchecked_alignByHeaders, Unchecked_compositeHeaderMainColumnEqual, Unchecked_getCellWithDefault, Unchecked_moveCellTo, Unchecked_moveColumnCellsTo, Unchecked_moveColumnTo, Unchecked_removeCellAt, Unchecked_removeColumnCells, Unchecked_removeColumnCells_withIndexChange, Unchecked_removeHeader, Unchecked_removeRowCells_withIndexChange, Unchecked_setCellAt, Unchecked_tryGetCellAt, ensureCellHashInValueMap, getEmptyCellForHeader, tryFindDuplicateUnique, tryFindDuplicateUniqueInArray };