@nfdi4plants/arctrl 3.0.0-beta.5 → 3.0.0-beta.6

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 (306) hide show
  1. package/dist/ts/node_modules/@fable-org/fable-library-js/Array.js +894 -4
  2. package/dist/ts/node_modules/@fable-org/fable-library-js/Async.js +121 -3
  3. package/dist/ts/node_modules/@fable-org/fable-library-js/BigInt.js +279 -1
  4. package/dist/ts/node_modules/@fable-org/fable-library-js/Char.js +101 -2
  5. package/dist/ts/node_modules/@fable-org/fable-library-js/Choice.js +187 -0
  6. package/dist/ts/node_modules/@fable-org/fable-library-js/CollectionUtil.js +156 -2
  7. package/dist/ts/node_modules/@fable-org/fable-library-js/Date.js +183 -7
  8. package/dist/ts/node_modules/@fable-org/fable-library-js/DateOffset.js +217 -5
  9. package/dist/ts/node_modules/@fable-org/fable-library-js/Decimal.js +154 -5
  10. package/dist/ts/node_modules/@fable-org/fable-library-js/Double.js +20 -1
  11. package/dist/ts/node_modules/@fable-org/fable-library-js/FSharp.Collections.js +30 -0
  12. package/dist/ts/node_modules/@fable-org/fable-library-js/FSharp.Core.js +68 -1
  13. package/dist/ts/node_modules/@fable-org/fable-library-js/Global.js +6 -1
  14. package/dist/ts/node_modules/@fable-org/fable-library-js/Guid.js +98 -1
  15. package/dist/ts/node_modules/@fable-org/fable-library-js/Int32.js +18 -1
  16. package/dist/ts/node_modules/@fable-org/fable-library-js/List.js +601 -5
  17. package/dist/ts/node_modules/@fable-org/fable-library-js/Long.js +10 -1
  18. package/dist/ts/node_modules/@fable-org/fable-library-js/Map.js +760 -16
  19. package/dist/ts/node_modules/@fable-org/fable-library-js/MapUtil.js +26 -1
  20. package/dist/ts/node_modules/@fable-org/fable-library-js/MutableMap.js +18 -8
  21. package/dist/ts/node_modules/@fable-org/fable-library-js/MutableSet.js +36 -4
  22. package/dist/ts/node_modules/@fable-org/fable-library-js/Option.js +35 -1
  23. package/dist/ts/node_modules/@fable-org/fable-library-js/Range.js +26 -1
  24. package/dist/ts/node_modules/@fable-org/fable-library-js/Reflection.js +355 -1
  25. package/dist/ts/node_modules/@fable-org/fable-library-js/RegExp.js +21 -2
  26. package/dist/ts/node_modules/@fable-org/fable-library-js/Result.js +133 -1
  27. package/dist/ts/node_modules/@fable-org/fable-library-js/Seq.js +543 -8
  28. package/dist/ts/node_modules/@fable-org/fable-library-js/Seq2.js +53 -4
  29. package/dist/ts/node_modules/@fable-org/fable-library-js/Set.js +673 -41
  30. package/dist/ts/node_modules/@fable-org/fable-library-js/String.js +197 -4
  31. package/dist/ts/node_modules/@fable-org/fable-library-js/System.Text.js +128 -3
  32. package/dist/ts/node_modules/@fable-org/fable-library-js/SystemException.js +8 -0
  33. package/dist/ts/node_modules/@fable-org/fable-library-js/TimeSpan.js +180 -0
  34. package/dist/ts/node_modules/@fable-org/fable-library-js/Types.js +20 -2
  35. package/dist/ts/node_modules/@fable-org/fable-library-js/Util.js +406 -2
  36. package/dist/ts/node_modules/@fable-org/fable-library-js/lib/big.js +2 -2
  37. package/dist/ts/ts/ARC.d.ts +12 -5
  38. package/dist/ts/ts/ARC.d.ts.map +1 -1
  39. package/dist/ts/ts/ARC.js +172 -93
  40. package/dist/ts/ts/Contract/ARC.d.ts.map +1 -1
  41. package/dist/ts/ts/Contract/ARC.js +8 -1
  42. package/dist/ts/ts/Contract/ArcAssay.js +14 -5
  43. package/dist/ts/ts/Contract/ArcInvestigation.js +10 -1
  44. package/dist/ts/ts/Contract/ArcRun.js +19 -6
  45. package/dist/ts/ts/Contract/ArcStudy.js +19 -6
  46. package/dist/ts/ts/Contract/ArcWorkflow.js +19 -6
  47. package/dist/ts/ts/Contract/Contract.js +42 -1
  48. package/dist/ts/ts/Contract/Datamap.js +61 -17
  49. package/dist/ts/ts/Contract/Git.d.ts.map +1 -1
  50. package/dist/ts/ts/Contract/Git.js +22 -6
  51. package/dist/ts/ts/Contract/License.d.ts +5 -0
  52. package/dist/ts/ts/Contract/License.d.ts.map +1 -0
  53. package/dist/ts/ts/Contract/License.js +34 -0
  54. package/dist/ts/ts/Contract/ValidationPackagesConfig.js +31 -6
  55. package/dist/ts/ts/ContractIO/ContractIO.js +5 -5
  56. package/dist/ts/ts/ContractIO/FileSystemHelper.js +16 -4
  57. package/dist/ts/ts/Conversion.js +321 -48
  58. package/dist/ts/ts/Core/ArcTypes.js +216 -15
  59. package/dist/ts/ts/Core/Comment.js +11 -1
  60. package/dist/ts/ts/Core/CommentList.js +77 -2
  61. package/dist/ts/ts/Core/Conversion.js +123 -43
  62. package/dist/ts/ts/Core/Data.js +9 -2
  63. package/dist/ts/ts/Core/DataContext.js +19 -4
  64. package/dist/ts/ts/Core/DataFile.js +38 -1
  65. package/dist/ts/ts/Core/DataMap.js +111 -5
  66. package/dist/ts/ts/Core/Helper/Collections.js +106 -5
  67. package/dist/ts/ts/Core/Helper/HashCodes.js +4 -4
  68. package/dist/ts/ts/Core/Helper/Identifier.js +100 -2
  69. package/dist/ts/ts/Core/Helper/Regex.js +134 -2
  70. package/dist/ts/ts/Core/Helper/SemVer.js +23 -2
  71. package/dist/ts/ts/Core/IdentifierSetters.js +27 -3
  72. package/dist/ts/ts/Core/OntologyAnnotation.js +4 -1
  73. package/dist/ts/ts/Core/OntologySourceReference.js +8 -1
  74. package/dist/ts/ts/Core/Person.js +8 -1
  75. package/dist/ts/ts/Core/Process/ColumnIndex.js +121 -4
  76. package/dist/ts/ts/Core/Process/Component.js +37 -4
  77. package/dist/ts/ts/Core/Process/Factor.js +9 -4
  78. package/dist/ts/ts/Core/Process/FactorValue.js +61 -4
  79. package/dist/ts/ts/Core/Process/Material.js +14 -4
  80. package/dist/ts/ts/Core/Process/MaterialAttribute.js +41 -3
  81. package/dist/ts/ts/Core/Process/MaterialAttributeValue.js +67 -4
  82. package/dist/ts/ts/Core/Process/MaterialType.js +15 -1
  83. package/dist/ts/ts/Core/Process/Process.js +150 -7
  84. package/dist/ts/ts/Core/Process/ProcessInput.js +48 -8
  85. package/dist/ts/ts/Core/Process/ProcessOutput.js +44 -7
  86. package/dist/ts/ts/Core/Process/ProcessParameterValue.js +10 -5
  87. package/dist/ts/ts/Core/Process/ProcessSequence.js +127 -6
  88. package/dist/ts/ts/Core/Process/Protocol.js +78 -4
  89. package/dist/ts/ts/Core/Process/ProtocolParameter.js +6 -2
  90. package/dist/ts/ts/Core/Process/Sample.js +21 -3
  91. package/dist/ts/ts/Core/Process/Source.js +13 -3
  92. package/dist/ts/ts/Core/Publication.js +8 -1
  93. package/dist/ts/ts/Core/Table/ArcTable.js +34 -25
  94. package/dist/ts/ts/Core/Table/ArcTableAux.js +150 -23
  95. package/dist/ts/ts/Core/Table/ArcTables.js +24 -15
  96. package/dist/ts/ts/Core/Table/CompositeCell.js +7 -3
  97. package/dist/ts/ts/Core/Table/CompositeColumn.js +8 -4
  98. package/dist/ts/ts/Core/Table/CompositeHeader.js +18 -15
  99. package/dist/ts/ts/Core/Template.js +12 -2
  100. package/dist/ts/ts/Core/Templates.js +8 -4
  101. package/dist/ts/ts/Core/Value.js +7 -3
  102. package/dist/ts/ts/CrossAsync.js +11 -1
  103. package/dist/ts/ts/FileSystem/Commit.js +18 -0
  104. package/dist/ts/ts/FileSystem/FileSystem.js +8 -3
  105. package/dist/ts/ts/FileSystem/FileSystemTree.d.ts +1 -0
  106. package/dist/ts/ts/FileSystem/FileSystemTree.d.ts.map +1 -1
  107. package/dist/ts/ts/FileSystem/FileSystemTree.js +20 -13
  108. package/dist/ts/ts/FileSystem/Path.d.ts +2 -0
  109. package/dist/ts/ts/FileSystem/Path.d.ts.map +1 -1
  110. package/dist/ts/ts/FileSystem/Path.js +17 -3
  111. package/dist/ts/ts/Json/Assay.js +26 -26
  112. package/dist/ts/ts/Json/Comment.js +10 -10
  113. package/dist/ts/ts/Json/Data.js +6 -6
  114. package/dist/ts/ts/Json/DataMap/DataContext.js +4 -4
  115. package/dist/ts/ts/Json/DataMap/DataMap.js +2 -2
  116. package/dist/ts/ts/Json/Decode.js +14 -9
  117. package/dist/ts/ts/Json/Encode.js +43 -11
  118. package/dist/ts/ts/Json/Investigation.js +40 -22
  119. package/dist/ts/ts/Json/OntologyAnnotation.js +5 -5
  120. package/dist/ts/ts/Json/OntologySourceReference.js +2 -2
  121. package/dist/ts/ts/Json/Person.js +26 -26
  122. package/dist/ts/ts/Json/Process/Component.js +9 -6
  123. package/dist/ts/ts/Json/Process/Factor.js +3 -3
  124. package/dist/ts/ts/Json/Process/FactorValue.js +8 -8
  125. package/dist/ts/ts/Json/Process/Material.js +9 -9
  126. package/dist/ts/ts/Json/Process/MaterialAttribute.js +1 -1
  127. package/dist/ts/ts/Json/Process/MaterialAttributeValue.js +8 -8
  128. package/dist/ts/ts/Json/Process/Process.js +12 -12
  129. package/dist/ts/ts/Json/Process/ProcessInput.js +4 -4
  130. package/dist/ts/ts/Json/Process/ProcessOutput.js +3 -3
  131. package/dist/ts/ts/Json/Process/ProcessParameterValue.js +10 -7
  132. package/dist/ts/ts/Json/Process/Protocol.js +12 -12
  133. package/dist/ts/ts/Json/Process/ProtocolParameter.js +3 -3
  134. package/dist/ts/ts/Json/Process/Sample.js +14 -14
  135. package/dist/ts/ts/Json/Process/Source.js +9 -9
  136. package/dist/ts/ts/Json/Process/Value.js +1 -1
  137. package/dist/ts/ts/Json/PropertyValue.js +1 -1
  138. package/dist/ts/ts/Json/Publication.js +6 -6
  139. package/dist/ts/ts/Json/ROCrate/LDContext.js +1 -0
  140. package/dist/ts/ts/Json/ROCrate/LDGraph.js +3 -3
  141. package/dist/ts/ts/Json/ROCrate/LDNode.js +19 -19
  142. package/dist/ts/ts/Json/Run.js +7 -7
  143. package/dist/ts/ts/Json/StringTable.js +1 -1
  144. package/dist/ts/ts/Json/Study.js +32 -32
  145. package/dist/ts/ts/Json/Table/ArcTable.js +29 -29
  146. package/dist/ts/ts/Json/Table/CellTable.js +6 -6
  147. package/dist/ts/ts/Json/Table/CompositeCell.js +4 -4
  148. package/dist/ts/ts/Json/Table/CompositeHeader.js +2 -2
  149. package/dist/ts/ts/Json/Table/IOType.js +1 -1
  150. package/dist/ts/ts/Json/Table/OATable.js +7 -7
  151. package/dist/ts/ts/Json/Table/Templates.js +92 -6
  152. package/dist/ts/ts/Json/Workflow.js +11 -11
  153. package/dist/ts/ts/Json/context/rocrate/isa_assay_context.js +27 -1
  154. package/dist/ts/ts/Json/context/rocrate/isa_comment_context.js +17 -1
  155. package/dist/ts/ts/Json/context/rocrate/isa_data_context.js +19 -1
  156. package/dist/ts/ts/Json/context/rocrate/isa_investigation_context.js +27 -1
  157. package/dist/ts/ts/Json/context/rocrate/isa_material_context.js +20 -1
  158. package/dist/ts/ts/Json/context/rocrate/isa_ontology_annotation_context.js +18 -1
  159. package/dist/ts/ts/Json/context/rocrate/isa_ontology_source_reference_context.js +20 -1
  160. package/dist/ts/ts/Json/context/rocrate/isa_organization_context.js +16 -1
  161. package/dist/ts/ts/Json/context/rocrate/isa_person_context.js +25 -1
  162. package/dist/ts/ts/Json/context/rocrate/isa_process_context.js +24 -1
  163. package/dist/ts/ts/Json/context/rocrate/isa_protocol_context.js +23 -1
  164. package/dist/ts/ts/Json/context/rocrate/isa_publication_context.js +20 -1
  165. package/dist/ts/ts/Json/context/rocrate/isa_sample_context.js +19 -1
  166. package/dist/ts/ts/Json/context/rocrate/isa_source_context.js +19 -1
  167. package/dist/ts/ts/Json/context/rocrate/isa_study_context.js +35 -1
  168. package/dist/ts/ts/Json/context/rocrate/rocrate_context.js +61 -0
  169. package/dist/ts/ts/Json.d.ts +13 -1
  170. package/dist/ts/ts/Json.d.ts.map +1 -1
  171. package/dist/ts/ts/Json.js +89 -2
  172. package/dist/ts/ts/JsonIO/Assay.js +15 -3
  173. package/dist/ts/ts/JsonIO/Investigation.js +15 -3
  174. package/dist/ts/ts/JsonIO/LDObject.js +17 -3
  175. package/dist/ts/ts/JsonIO/OntologyAnnotation.js +12 -2
  176. package/dist/ts/ts/JsonIO/Person.d.ts +16 -0
  177. package/dist/ts/ts/JsonIO/Person.d.ts.map +1 -0
  178. package/dist/ts/ts/JsonIO/Person.js +67 -0
  179. package/dist/ts/ts/JsonIO/Run.js +9 -3
  180. package/dist/ts/ts/JsonIO/Study.js +15 -3
  181. package/dist/ts/ts/JsonIO/Table/Compression.js +3 -3
  182. package/dist/ts/ts/JsonIO/Table/Templates.js +60 -5
  183. package/dist/ts/ts/JsonIO/Workflow.js +9 -3
  184. package/dist/ts/ts/License.d.ts +39 -0
  185. package/dist/ts/ts/License.d.ts.map +1 -0
  186. package/dist/ts/ts/License.js +123 -0
  187. package/dist/ts/ts/ROCrate/Generic/Comment.js +5 -1
  188. package/dist/ts/ts/ROCrate/Generic/CreativeWork.d.ts +69 -0
  189. package/dist/ts/ts/ROCrate/Generic/CreativeWork.d.ts.map +1 -0
  190. package/dist/ts/ts/ROCrate/Generic/CreativeWork.js +450 -0
  191. package/dist/ts/ts/ROCrate/Generic/Dataset.d.ts +1 -0
  192. package/dist/ts/ts/ROCrate/Generic/Dataset.d.ts.map +1 -1
  193. package/dist/ts/ts/ROCrate/Generic/Dataset.js +27 -1
  194. package/dist/ts/ts/ROCrate/Generic/DefinedTerm.js +5 -1
  195. package/dist/ts/ts/ROCrate/Generic/File.js +5 -1
  196. package/dist/ts/ts/ROCrate/Generic/LabProcess.js +5 -1
  197. package/dist/ts/ts/ROCrate/Generic/LabProtocol.js +5 -1
  198. package/dist/ts/ts/ROCrate/Generic/Organization.js +5 -1
  199. package/dist/ts/ts/ROCrate/Generic/Person.js +7 -2
  200. package/dist/ts/ts/ROCrate/Generic/PostalAddress.js +5 -1
  201. package/dist/ts/ts/ROCrate/Generic/PropertyValue.js +19 -15
  202. package/dist/ts/ts/ROCrate/Generic/Sample.js +5 -1
  203. package/dist/ts/ts/ROCrate/Generic/ScholarlyArticle.js +5 -1
  204. package/dist/ts/ts/ROCrate/LDContext.js +15 -6
  205. package/dist/ts/ts/ROCrate/LDObject.js +53 -17
  206. package/dist/ts/ts/ROCrateIO.d.ts +9 -3
  207. package/dist/ts/ts/ROCrateIO.d.ts.map +1 -1
  208. package/dist/ts/ts/ROCrateIO.js +67 -14
  209. package/dist/ts/ts/Spreadsheet/AnnotationTable/ArcTable.js +18 -15
  210. package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeCell.js +5 -4
  211. package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeColumn.js +40 -17
  212. package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeHeader.js +4 -4
  213. package/dist/ts/ts/Spreadsheet/ArcAssay.js +30 -15
  214. package/dist/ts/ts/Spreadsheet/ArcInvestigation.js +32 -18
  215. package/dist/ts/ts/Spreadsheet/ArcRun.js +23 -8
  216. package/dist/ts/ts/Spreadsheet/ArcStudy.js +22 -7
  217. package/dist/ts/ts/Spreadsheet/ArcWorkflow.js +23 -8
  218. package/dist/ts/ts/Spreadsheet/CollectionAux.js +75 -5
  219. package/dist/ts/ts/Spreadsheet/DataMap.js +1 -1
  220. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapColumn.js +4 -4
  221. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapHeader.js +8 -8
  222. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapTable.js +4 -4
  223. package/dist/ts/ts/Spreadsheet/Metadata/Assays.js +6 -6
  224. package/dist/ts/ts/Spreadsheet/Metadata/Comment.js +1 -1
  225. package/dist/ts/ts/Spreadsheet/Metadata/Contacts.js +2 -2
  226. package/dist/ts/ts/Spreadsheet/Metadata/Conversions.js +6 -3
  227. package/dist/ts/ts/Spreadsheet/Metadata/DesignDescriptors.js +9 -3
  228. package/dist/ts/ts/Spreadsheet/Metadata/Factors.js +6 -4
  229. package/dist/ts/ts/Spreadsheet/Metadata/OntologyAnnotation.js +7 -5
  230. package/dist/ts/ts/Spreadsheet/Metadata/OntologySourceReference.js +1 -1
  231. package/dist/ts/ts/Spreadsheet/Metadata/Protocols.js +10 -8
  232. package/dist/ts/ts/Spreadsheet/Metadata/Publication.js +5 -5
  233. package/dist/ts/ts/Spreadsheet/Metadata/Run.js +6 -6
  234. package/dist/ts/ts/Spreadsheet/Metadata/SparseTable.js +246 -10
  235. package/dist/ts/ts/Spreadsheet/Metadata/Study.js +19 -13
  236. package/dist/ts/ts/Spreadsheet/Metadata/Workflow.js +5 -5
  237. package/dist/ts/ts/Template.Web.js +5 -1
  238. package/dist/ts/ts/ValidationPackages/ValidationPackage.js +8 -1
  239. package/dist/ts/ts/ValidationPackages/ValidationPackagesConfig.js +10 -3
  240. package/dist/ts/ts/WebRequest/WebRequest.Node.js +1 -0
  241. package/dist/ts/ts/Xlsx.js +41 -1
  242. package/dist/ts/ts/Yaml/ValidationPackage.js +18 -2
  243. package/dist/ts/ts/Yaml/ValidationPackagesConfig.js +5 -2
  244. package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/DynamicObj.fs.js +27 -4
  245. package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/FableJS.fs.js +14 -3
  246. package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/HashCodes.fs.js +30 -4
  247. package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/PropertyHelper.fs.js +5 -1
  248. package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/ReflectionUtils.fs.js +65 -2
  249. package/dist/ts/ts/fable_modules/Fable.Fetch.2.6.0/Fetch.fs.js +257 -1
  250. package/dist/ts/ts/fable_modules/Fable.Promise.3.2.0/Promise.fs.js +71 -1
  251. package/dist/ts/ts/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js +11 -1
  252. package/dist/ts/ts/fable_modules/Fable.SimpleHttp.3.5.0/Http.fs.js +188 -11
  253. package/dist/ts/ts/fable_modules/Fable.SimpleHttp.3.5.0/Types.fs.js +80 -2
  254. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Cells/FsCell.fs.js +63 -4
  255. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Cells/FsCellsCollection.fs.js +17 -7
  256. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/DSL/CellBuilder.fs.js +198 -0
  257. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/DSL/Expression.fs.js +46 -0
  258. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/DSL/RowBuilder.fs.js +131 -0
  259. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/DSL/Types.fs.js +307 -0
  260. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsAddress.fs.js +38 -2
  261. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsColumn.fs.js +11 -4
  262. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsRow.fs.js +12 -5
  263. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsWorkbook.fs.js +9 -2
  264. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsWorksheet.fs.js +14 -7
  265. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/HashCodes.fs.js +31 -1
  266. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Json/Cell.fs.js +65 -0
  267. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Json/Column.fs.js +38 -0
  268. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Json/Row.fs.js +38 -0
  269. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Json/Table.fs.js +34 -0
  270. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Json/Value.fs.js +49 -3
  271. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Json/Workbook.fs.js +44 -0
  272. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Json/Worksheet.fs.js +129 -0
  273. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRange.fs.js +9 -2
  274. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeAddress.fs.js +82 -3
  275. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeBase.fs.js +12 -3
  276. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeColumn.fs.js +17 -2
  277. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeRow.fs.js +9 -2
  278. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Tables/FsTable.fs.js +12 -5
  279. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Tables/FsTableField.fs.js +12 -3
  280. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Cell.fs.js +2 -2
  281. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/FsExtensions.fs.js +42 -3
  282. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Json.fs.js +53 -0
  283. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Table.fs.js +9 -9
  284. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Workbook.fs.js +1 -1
  285. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Worksheet.fs.js +2 -2
  286. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Xlsx.fs.js +5 -1
  287. package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.7.0/Decode.fs.js +730 -23
  288. package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.7.0/Encode.fs.js +192 -7
  289. package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.7.0/Types.fs.js +45 -1
  290. package/dist/ts/ts/fable_modules/Thoth.Json.JavaScript.0.4.1/Decode.fs.js +15 -2
  291. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Decode.fs.js +1383 -15
  292. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Encode.fs.js +45 -4
  293. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Interop/JsInterop.fs.js +10 -0
  294. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Persil.fs.js +5 -5
  295. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Preprocessing.fs.js +16 -6
  296. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Reader.fs.js +26 -23
  297. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/RegexActivePatterns.fs.js +1 -1
  298. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Writer.fs.js +8 -8
  299. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/YAMLiciousTypes.fs.js +18 -2
  300. package/package.json +1 -1
  301. package/dist/ts/ts/FileSystem/DefaultGitattributes.d.ts +0 -2
  302. package/dist/ts/ts/FileSystem/DefaultGitattributes.d.ts.map +0 -1
  303. package/dist/ts/ts/FileSystem/DefaultGitattributes.js +0 -3
  304. package/dist/ts/ts/FileSystem/DefaultGitignore.d.ts +0 -2
  305. package/dist/ts/ts/FileSystem/DefaultGitignore.d.ts.map +0 -1
  306. package/dist/ts/ts/FileSystem/DefaultGitignore.js +0 -3
@@ -1,3 +1,7 @@
1
+ import { toFloat64, fromFloat64 } from './BigInt.js';
2
+ import { ticksToUnixEpochMilliseconds, unixEpochMillisecondsToTicks, parseRaw, dateOffsetToString, DateTime, create as create$1, daysInMonth } from './Date.js';
3
+ import { padWithZeros, compareDates } from './Util.js';
4
+
1
5
  /**
2
6
  * DateTimeOffset functions.
3
7
  *
@@ -15,7 +19,7 @@
15
19
  function DateTimeOffset(value, offset) {
16
20
  checkOffsetInRange(offset);
17
21
  const d = new Date(value);
18
- d.offset = offset != null ? offset : new Date().getTimezoneOffset() * -6e4;
22
+ d.offset = offset != null ? offset : new Date().getTimezoneOffset() * -60000;
19
23
  return d;
20
24
  }
21
25
  function offset(value) {
@@ -35,25 +39,233 @@ function fromDate(date, offset) {
35
39
  let offset2 = 0;
36
40
  switch (date.kind) {
37
41
  case 1 /* DateKind.UTC */:
42
+ if (offset != null && offset !== 0) {
43
+ throw new Error("The UTC Offset for Utc DateTime instances must be 0.");
44
+ }
38
45
  offset2 = 0;
39
46
  break;
40
47
  case 2 /* DateKind.Local */:
41
- offset2 = date.getTimezoneOffset() * -6e4;
48
+ offset2 = date.getTimezoneOffset() * -60000;
49
+ if (offset != null && offset !== offset2) {
50
+ throw new Error("The UTC Offset of the local dateTime parameter does not match the offset argument.");
51
+ }
42
52
  break;
43
53
  case 0 /* DateKind.Unspecified */:
44
54
  default:
45
- {
46
- offset2 = date.getTimezoneOffset() * -6e4;
55
+ if (offset == null) {
56
+ offset2 = date.getTimezoneOffset() * -60000;
57
+ }
58
+ else {
59
+ offset2 = offset;
47
60
  }
48
61
  break;
49
62
  }
50
63
  return DateTimeOffset(date.getTime(), offset2);
51
64
  }
65
+ function fromTicks(ticks, offset) {
66
+ const ms = ticksToUnixEpochMilliseconds(ticks) - offset;
67
+ return DateTimeOffset(ms, offset);
68
+ }
69
+ function fromUnixTimeMilliseconds(ms) {
70
+ return DateTimeOffset(toFloat64(ms), 0);
71
+ }
72
+ function fromUnixTimeSeconds(seconds) {
73
+ return DateTimeOffset(toFloat64(seconds * 1000n), 0);
74
+ }
75
+ function getUtcTicks(date) {
76
+ return unixEpochMillisecondsToTicks(date.getTime(), 0);
77
+ }
78
+ function minValue() {
79
+ // This is "0001-01-01T00:00:00.000Z", actual JS min value is -8640000000000000
80
+ return DateTimeOffset(-62135596800000, 0);
81
+ }
82
+ function maxValue() {
83
+ // This is "9999-12-31T23:59:59.999Z", actual JS max value is 8640000000000000
84
+ return DateTimeOffset(253402300799999, 0);
85
+ }
86
+ function parse(str) {
87
+ const [date, offsetMatch] = parseRaw(str);
88
+ const offset = offsetMatch == null
89
+ ? date.getTimezoneOffset() * -60000
90
+ : (offsetMatch === "Z" ? 0 : offsetMatch * 60000);
91
+ return DateTimeOffset(date.getTime(), offset);
92
+ }
93
+ function tryParse(v, defValue) {
94
+ try {
95
+ defValue.contents = parse(v);
96
+ return true;
97
+ }
98
+ catch (_err) {
99
+ return false;
100
+ }
101
+ }
102
+ function create(year, month, day, h, m, s, ms, offset) {
103
+ if (offset == null) {
104
+ offset = ms;
105
+ ms = 0;
106
+ }
107
+ checkOffsetInRange(offset);
108
+ let date;
109
+ if (offset === 0) {
110
+ date = new Date(Date.UTC(year, month - 1, day, h, m, s, ms));
111
+ if (year <= 99) {
112
+ date.setUTCFullYear(year, month - 1, day);
113
+ }
114
+ }
115
+ else {
116
+ const str = padWithZeros(year, 4) + "-" +
117
+ padWithZeros(month, 2) + "-" +
118
+ padWithZeros(day, 2) + "T" +
119
+ padWithZeros(h, 2) + ":" +
120
+ padWithZeros(m, 2) + ":" +
121
+ padWithZeros(s, 2) + "." +
122
+ padWithZeros(ms, 3) +
123
+ dateOffsetToString(offset);
124
+ date = new Date(str);
125
+ }
126
+ const dateValue = date.getTime();
127
+ if (isNaN(dateValue)) {
128
+ throw new Error("The parameters describe an unrepresentable Date");
129
+ }
130
+ return DateTimeOffset(dateValue, offset);
131
+ }
132
+ function now() {
133
+ const date = new Date();
134
+ const offset = date.getTimezoneOffset() * -60000;
135
+ return DateTimeOffset(date.getTime(), offset);
136
+ }
137
+ function utcNow() {
138
+ const date = now();
139
+ return DateTimeOffset(date.getTime(), 0);
140
+ }
141
+ function toUniversalTime(date) {
142
+ return DateTime(date.getTime(), 1 /* DateKind.UTC */);
143
+ }
144
+ function toLocalTime(date) {
145
+ return DateTime(date.getTime(), 2 /* DateKind.Local */);
146
+ }
147
+ function timeOfDay(d) {
148
+ const d2 = new Date(d.getTime() + (d.offset ?? 0));
149
+ return d2.getUTCHours() * 3600000
150
+ + d2.getUTCMinutes() * 60000
151
+ + d2.getUTCSeconds() * 1000
152
+ + d2.getUTCMilliseconds();
153
+ }
154
+ function date(d) {
155
+ const d2 = new Date(d.getTime() + (d.offset ?? 0));
156
+ return create$1(d2.getUTCFullYear(), d2.getUTCMonth() + 1, d2.getUTCDate(), 0, 0, 0, 0);
157
+ }
158
+ function day(d) {
159
+ return new Date(d.getTime() + (d.offset ?? 0)).getUTCDate();
160
+ }
161
+ function hour(d) {
162
+ return new Date(d.getTime() + (d.offset ?? 0)).getUTCHours();
163
+ }
164
+ function millisecond(d) {
165
+ return new Date(d.getTime() + (d.offset ?? 0)).getUTCMilliseconds();
166
+ }
167
+ function minute(d) {
168
+ return new Date(d.getTime() + (d.offset ?? 0)).getUTCMinutes();
169
+ }
170
+ function month(d) {
171
+ return new Date(d.getTime() + (d.offset ?? 0)).getUTCMonth() + 1;
172
+ }
173
+ function second(d) {
174
+ return new Date(d.getTime() + (d.offset ?? 0)).getUTCSeconds();
175
+ }
176
+ function year(d) {
177
+ return new Date(d.getTime() + (d.offset ?? 0)).getUTCFullYear();
178
+ }
179
+ function dayOfWeek(d) {
180
+ return new Date(d.getTime() + (d.offset ?? 0)).getUTCDay();
181
+ }
182
+ function dayOfYear(d) {
183
+ const d2 = new Date(d.getTime() + (d.offset ?? 0));
184
+ const _year = d2.getUTCFullYear();
185
+ const _month = d2.getUTCMonth() + 1;
186
+ let _day = d2.getUTCDate();
187
+ for (let i = 1; i < _month; i++) {
188
+ _day += daysInMonth(_year, i);
189
+ }
190
+ return _day;
191
+ }
52
192
  function add(d, ts) {
53
193
  return DateTimeOffset(d.getTime() + ts, (d.offset ?? 0));
54
194
  }
195
+ function addDays(d, v) {
196
+ return add(d, v * 86400000);
197
+ }
198
+ function addHours(d, v) {
199
+ return add(d, v * 3600000);
200
+ }
201
+ function addMinutes(d, v) {
202
+ return add(d, v * 60000);
203
+ }
204
+ function addSeconds(d, v) {
205
+ return add(d, v * 1000);
206
+ }
207
+ function addMilliseconds(d, v) {
208
+ return add(d, v);
209
+ }
210
+ function addTicks(d, v) {
211
+ return add(d, toFloat64(v / 10000n));
212
+ }
213
+ function addYears(d, v) {
214
+ const newMonth = d.getUTCMonth() + 1;
215
+ const newYear = d.getUTCFullYear() + v;
216
+ const _daysInMonth = daysInMonth(newYear, newMonth);
217
+ const newDay = Math.min(_daysInMonth, d.getUTCDate());
218
+ return create(newYear, newMonth, newDay, d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(), d.getUTCMilliseconds(), (d.offset ?? 0));
219
+ }
220
+ function addMonths(d, v) {
221
+ const d2 = new Date(d.getTime() + (d.offset ?? 0));
222
+ let newMonth = d2.getUTCMonth() + 1 + v;
223
+ let newMonth_ = 0;
224
+ let yearOffset = 0;
225
+ if (newMonth > 12) {
226
+ newMonth_ = newMonth % 12;
227
+ yearOffset = Math.floor(newMonth / 12);
228
+ newMonth = newMonth_;
229
+ }
230
+ else if (newMonth < 1) {
231
+ newMonth_ = 12 + newMonth % 12;
232
+ yearOffset = Math.floor(newMonth / 12) + (newMonth_ === 12 ? -1 : 0);
233
+ newMonth = newMonth_;
234
+ }
235
+ const newYear = d2.getUTCFullYear() + yearOffset;
236
+ const _daysInMonth = daysInMonth(newYear, newMonth);
237
+ const newDay = Math.min(_daysInMonth, d2.getUTCDate());
238
+ return create(newYear, newMonth, newDay, d2.getUTCHours(), d2.getUTCMinutes(), d2.getUTCSeconds(), d2.getUTCMilliseconds(), (d.offset ?? 0));
239
+ }
240
+ function subtract(d, that) {
241
+ return typeof that === "number"
242
+ ? DateTimeOffset(d.getTime() - that, (d.offset ?? 0))
243
+ : d.getTime() - that.getTime();
244
+ }
245
+ function equals(d1, d2) {
246
+ return d1.getTime() === d2.getTime();
247
+ }
248
+ function equalsExact(d1, d2) {
249
+ return d1.getTime() === d2.getTime() && d1.offset === d2.offset;
250
+ }
251
+ function compare(d1, d2) {
252
+ return compareDates(d1, d2);
253
+ }
254
+ const compareTo = compare;
55
255
  function op_Addition(x, y) {
56
256
  return add(x, y);
57
257
  }
258
+ function op_Subtraction(x, y) {
259
+ return subtract(x, y);
260
+ }
261
+ function toOffset(d, offset) {
262
+ return DateTimeOffset(d.getTime(), offset);
263
+ }
264
+ function toUnixTimeMilliseconds(d) {
265
+ return fromFloat64(d.getTime());
266
+ }
267
+ function toUnixTimeSeconds(d) {
268
+ return fromFloat64(d.getTime() / 1000.0);
269
+ }
58
270
 
59
- export { add, DateTimeOffset as default, fromDate, offset, op_Addition };
271
+ export { add, addDays, addHours, addMilliseconds, addMinutes, addMonths, addSeconds, addTicks, addYears, compare, compareTo, create, date, day, dayOfWeek, dayOfYear, DateTimeOffset as default, equals, equalsExact, fromDate, fromTicks, fromUnixTimeMilliseconds, fromUnixTimeSeconds, getUtcTicks, hour, maxValue, millisecond, minValue, minute, month, now, offset, op_Addition, op_Subtraction, parse, second, subtract, timeOfDay, toLocalTime, toOffset, toUniversalTime, toUnixTimeMilliseconds, toUnixTimeSeconds, tryParse, utcNow, year };
@@ -23,10 +23,75 @@ Big.prototype[symbol] = function () {
23
23
  };
24
24
  };
25
25
  const get_Zero = new Big(0);
26
- new Big(1);
27
- new Big(-1);
28
- new Big("79228162514264337593543950335");
29
- new Big("-79228162514264337593543950335");
26
+ const get_One = new Big(1);
27
+ const get_MinusOne = new Big(-1);
28
+ const get_MaxValue = new Big("79228162514264337593543950335");
29
+ const get_MinValue = new Big("-79228162514264337593543950335");
30
+ function compare(x, y) {
31
+ return x.cmp(y);
32
+ }
33
+ function equals(x, y) {
34
+ return !x.cmp(y);
35
+ }
36
+ function abs(x) { return x.abs(); }
37
+ function sign(x) { return x.lt(get_Zero) ? -1 : x.gt(get_Zero) ? 1 : 0; }
38
+ function max(x, y) { return x.gt(y) ? x : y; }
39
+ function min(x, y) { return x.lt(y) ? x : y; }
40
+ function maxMagnitude(x, y) { return abs(x).gt(abs(y)) ? x : y; }
41
+ function minMagnitude(x, y) { return abs(x).lt(abs(y)) ? x : y; }
42
+ function clamp(x, min, max) {
43
+ return x.lt(min) ? min : x.gt(max) ? max : x;
44
+ }
45
+ function round(x, digits = 0) {
46
+ return x.round(digits, 2 /* ROUND_HALF_EVEN */);
47
+ }
48
+ function truncate(x) {
49
+ return x.round(0, 0 /* ROUND_DOWN */);
50
+ }
51
+ function ceiling(x) {
52
+ return x.round(0, x.cmp(0) >= 0 ? 3 /* ROUND_UP */ : 0 /* ROUND_DOWN */);
53
+ }
54
+ function floor(x) {
55
+ return x.round(0, x.cmp(0) >= 0 ? 0 /* ROUND_DOWN */ : 3 /* ROUND_UP */);
56
+ }
57
+ function pow(x, n) {
58
+ return x.pow(n);
59
+ }
60
+ function sqrt(x) {
61
+ return x.sqrt();
62
+ }
63
+ function op_Addition(x, y) {
64
+ return x.add(y);
65
+ }
66
+ function op_Subtraction(x, y) {
67
+ return x.sub(y);
68
+ }
69
+ function op_Multiply(x, y) {
70
+ return x.mul(y);
71
+ }
72
+ function op_Division(x, y) {
73
+ return x.div(y);
74
+ }
75
+ function op_Modulus(x, y) {
76
+ return x.mod(y);
77
+ }
78
+ function op_UnaryNegation(x) {
79
+ const x2 = new Big(x);
80
+ x2.s = -x2.s || 0;
81
+ return x2;
82
+ }
83
+ function op_UnaryPlus(x) {
84
+ return x;
85
+ }
86
+ const add = op_Addition;
87
+ const subtract = op_Subtraction;
88
+ const multiply = op_Multiply;
89
+ const divide = op_Division;
90
+ const remainder = op_Modulus;
91
+ const negate = op_UnaryNegation;
92
+ function toString(x) {
93
+ return x.toString();
94
+ }
30
95
  function tryParse(str, defValue) {
31
96
  try {
32
97
  defValue.contents = new Big(str.trim());
@@ -45,6 +110,90 @@ function parse(str) {
45
110
  throw new Error(`The input string ${str} was not in a correct format.`);
46
111
  }
47
112
  }
113
+ function toNumber(x) {
114
+ return +x;
115
+ }
116
+ function decimalToHex(dec, bitSize) {
117
+ const hex = new Uint8Array(bitSize / 4 | 0);
118
+ let hexCount = 1;
119
+ for (let d = 0; d < dec.length; d++) {
120
+ let value = dec[d];
121
+ for (let i = 0; i < hexCount; i++) {
122
+ const digit = hex[i] * 10 + value | 0;
123
+ hex[i] = digit & 0xF;
124
+ value = digit >> 4;
125
+ }
126
+ if (value !== 0) {
127
+ hex[hexCount++] = value;
128
+ }
129
+ }
130
+ return hex.slice(0, hexCount); // digits in reverse order
131
+ }
132
+ function hexToDecimal(hex, bitSize) {
133
+ const dec = new Uint8Array(bitSize * 301 / 1000 + 1 | 0);
134
+ let decCount = 1;
135
+ for (let d = hex.length - 1; d >= 0; d--) {
136
+ let carry = hex[d];
137
+ for (let i = 0; i < decCount; i++) {
138
+ const val = dec[i] * 16 + carry | 0;
139
+ dec[i] = (val % 10) | 0;
140
+ carry = (val / 10) | 0;
141
+ }
142
+ while (carry > 0) {
143
+ dec[decCount++] = (carry % 10) | 0;
144
+ carry = (carry / 10) | 0;
145
+ }
146
+ }
147
+ return dec.slice(0, decCount); // digits in reverse order
148
+ }
149
+ function setInt32Bits(hexDigits, bits, offset) {
150
+ for (let i = 0; i < 8; i++) {
151
+ hexDigits[offset + i] = (bits >> (i * 4)) & 0xF;
152
+ }
153
+ }
154
+ function getInt32Bits(hexDigits, offset) {
155
+ let bits = 0;
156
+ for (let i = 0; i < 8; i++) {
157
+ bits = bits | (hexDigits[offset + i] << (i * 4));
158
+ }
159
+ return bits;
160
+ }
161
+ function fromIntArray(bits) {
162
+ return fromInts(bits[0], bits[1], bits[2], bits[3]);
163
+ }
164
+ function fromInts(low, mid, high, signExp) {
165
+ const isNegative = signExp < 0;
166
+ const scale = (signExp >> 16) & 0x7F;
167
+ return fromParts(low, mid, high, isNegative, scale);
168
+ }
169
+ function fromParts(low, mid, high, isNegative, scale) {
170
+ const bitSize = 96;
171
+ const hexDigits = new Uint8Array(bitSize / 4);
172
+ setInt32Bits(hexDigits, low, 0);
173
+ setInt32Bits(hexDigits, mid, 8);
174
+ setInt32Bits(hexDigits, high, 16);
175
+ const decDigits = hexToDecimal(hexDigits, bitSize);
176
+ scale = scale & 0x7F;
177
+ const big = new Big(0);
178
+ big.c = Array.from(decDigits.reverse());
179
+ big.e = decDigits.length - scale - 1;
180
+ big.s = isNegative ? -1 : 1;
181
+ const d = new Big(big);
182
+ return d;
183
+ }
184
+ function getBits(d) {
185
+ const bitSize = 96;
186
+ const decDigits = Uint8Array.from(d.c);
187
+ const hexDigits = decimalToHex(decDigits, bitSize);
188
+ const low = getInt32Bits(hexDigits, 0);
189
+ const mid = getInt32Bits(hexDigits, 8);
190
+ const high = getInt32Bits(hexDigits, 16);
191
+ const decStr = d.toString();
192
+ const dotPos = decStr.indexOf(".");
193
+ const scale = dotPos < 0 ? 0 : decStr.length - dotPos - 1;
194
+ const signExp = ((scale & 0x7F) << 16) | (d.s < 0 ? 0x80000000 : 0);
195
+ return [low, mid, high, signExp];
196
+ }
48
197
  // export function makeRangeStepFunction(step: Decimal, last: Decimal) {
49
198
  // const stepComparedWithZero = step.cmp(get_Zero);
50
199
  // if (stepComparedWithZero === 0) {
@@ -62,4 +211,4 @@ function parse(str) {
62
211
  // };
63
212
  // }
64
213
 
65
- export { Big as default, get_Zero, parse, tryParse };
214
+ export { abs, add, ceiling, clamp, compare, Big as default, divide, equals, floor, fromIntArray, fromInts, fromParts, getBits, get_MaxValue, get_MinValue, get_MinusOne, get_One, get_Zero, max, maxMagnitude, min, minMagnitude, multiply, negate, op_Addition, op_Division, op_Modulus, op_Multiply, op_Subtraction, op_UnaryNegation, op_UnaryPlus, parse, pow, remainder, round, sign, sqrt, subtract, toNumber, toString, truncate, tryParse };
@@ -20,11 +20,30 @@ function parse(str) {
20
20
  throw new Error(`The input string ${str} was not in a correct format.`);
21
21
  }
22
22
  }
23
+ // JS Number.isFinite function evals false for NaN
24
+ function isPositiveInfinity(x) {
25
+ return x === Number.POSITIVE_INFINITY;
26
+ }
27
+ function isNegativeInfinity(x) {
28
+ return x === Number.NEGATIVE_INFINITY;
29
+ }
30
+ function isInfinity(x) {
31
+ return x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY;
32
+ }
23
33
  function max(x, y) {
24
34
  return x > y ? x : y;
25
35
  }
26
36
  function min(x, y) {
27
37
  return x < y ? x : y;
28
38
  }
39
+ function maxMagnitude(x, y) {
40
+ return Math.abs(x) > Math.abs(y) ? x : y;
41
+ }
42
+ function minMagnitude(x, y) {
43
+ return Math.abs(x) < Math.abs(y) ? x : y;
44
+ }
45
+ function clamp(x, min, max) {
46
+ return x < min ? min : x > max ? max : x;
47
+ }
29
48
 
30
- export { max, min, parse, tryParse };
49
+ export { clamp, isInfinity, isNegativeInfinity, isPositiveInfinity, max, maxMagnitude, min, minMagnitude, parse, tryParse };
@@ -0,0 +1,30 @@
1
+ import { structuralHash, equals, physicalHash, compare } from './Util.js';
2
+
3
+ function HashIdentity_FromFunctions(hash, eq) {
4
+ return {
5
+ Equals(x, y) {
6
+ return eq(x, y);
7
+ },
8
+ GetHashCode(x_1) {
9
+ return hash(x_1);
10
+ },
11
+ };
12
+ }
13
+ function HashIdentity_Structural() {
14
+ return HashIdentity_FromFunctions(structuralHash, equals);
15
+ }
16
+ function HashIdentity_Reference() {
17
+ return HashIdentity_FromFunctions(physicalHash, (e, e_1) => (e === e_1));
18
+ }
19
+ function ComparisonIdentity_FromFunction(comparer) {
20
+ return {
21
+ Compare(x, y) {
22
+ return comparer(x, y);
23
+ },
24
+ };
25
+ }
26
+ function ComparisonIdentity_Structural() {
27
+ return ComparisonIdentity_FromFunction(compare);
28
+ }
29
+
30
+ export { ComparisonIdentity_FromFunction, ComparisonIdentity_Structural, HashIdentity_FromFunctions, HashIdentity_Reference, HashIdentity_Structural };
@@ -1,5 +1,72 @@
1
+ import { structuralHash, equals, defaultOf, disposeSafe } from './Util.js';
2
+ import { ComparisonIdentity_Structural, HashIdentity_Structural } from './FSharp.Collections.js';
3
+ import { StringBuilder__Append_Z721C83C5 } from './System.Text.js';
4
+
5
+ const LanguagePrimitives_GenericEqualityComparer = {
6
+ "System.Collections.IEqualityComparer.Equals541DA560"(x, y) {
7
+ return equals(x, y);
8
+ },
9
+ "System.Collections.IEqualityComparer.GetHashCode4E60E31B"(x_1) {
10
+ return structuralHash(x_1);
11
+ },
12
+ };
13
+ const LanguagePrimitives_GenericEqualityERComparer = {
14
+ "System.Collections.IEqualityComparer.Equals541DA560"(x, y) {
15
+ return equals(x, y);
16
+ },
17
+ "System.Collections.IEqualityComparer.GetHashCode4E60E31B"(x_1) {
18
+ return structuralHash(x_1);
19
+ },
20
+ };
21
+ function LanguagePrimitives_FastGenericComparer() {
22
+ return ComparisonIdentity_Structural();
23
+ }
24
+ function LanguagePrimitives_FastGenericComparerFromTable() {
25
+ return ComparisonIdentity_Structural();
26
+ }
27
+ function LanguagePrimitives_FastGenericEqualityComparer() {
28
+ return HashIdentity_Structural();
29
+ }
30
+ function LanguagePrimitives_FastGenericEqualityComparerFromTable() {
31
+ return HashIdentity_Structural();
32
+ }
33
+ function Operators_Failure(message) {
34
+ return new Error(message);
35
+ }
36
+ function Operators_FailurePattern(exn) {
37
+ return exn.message;
38
+ }
1
39
  function Operators_NullArg(x) {
2
40
  throw new Error(x);
3
41
  }
42
+ function Operators_Using(resource, action) {
43
+ try {
44
+ return action(resource);
45
+ }
46
+ finally {
47
+ if (equals(resource, defaultOf())) {
48
+ }
49
+ else {
50
+ let copyOfStruct = resource;
51
+ disposeSafe(copyOfStruct);
52
+ }
53
+ }
54
+ }
55
+ function Operators_Lock(_lockObj, action) {
56
+ return action();
57
+ }
58
+ function ExtraTopLevelOperators_LazyPattern(input) {
59
+ return input.Value;
60
+ }
61
+ function PrintfModule_PrintFormatToStringBuilderThen(continuation, builder, format) {
62
+ return format.cont((s) => {
63
+ StringBuilder__Append_Z721C83C5(builder, s);
64
+ return continuation();
65
+ });
66
+ }
67
+ function PrintfModule_PrintFormatToStringBuilder(builder, format) {
68
+ return PrintfModule_PrintFormatToStringBuilderThen(() => {
69
+ }, builder, format);
70
+ }
4
71
 
5
- export { Operators_NullArg };
72
+ export { ExtraTopLevelOperators_LazyPattern, LanguagePrimitives_FastGenericComparer, LanguagePrimitives_FastGenericComparerFromTable, LanguagePrimitives_FastGenericEqualityComparer, LanguagePrimitives_FastGenericEqualityComparerFromTable, LanguagePrimitives_GenericEqualityComparer, LanguagePrimitives_GenericEqualityERComparer, Operators_Failure, Operators_FailurePattern, Operators_Lock, Operators_NullArg, Operators_Using, PrintfModule_PrintFormatToStringBuilder, PrintfModule_PrintFormatToStringBuilderThen };
@@ -1,5 +1,10 @@
1
1
  const SR_indexOutOfBounds = "The index was outside the range of elements in the collection.";
2
2
  const SR_inputWasEmpty = "Collection was empty.";
3
+ const SR_inputMustBeNonNegative = "The input must be non-negative.";
4
+ const SR_inputSequenceEmpty = "The input sequence was empty.";
5
+ const SR_inputSequenceTooLong = "The input sequence contains more than one element.";
3
6
  const SR_keyNotFoundAlt = "An index satisfying the predicate was not found in the collection.";
7
+ const SR_differentLengths = "The collections had different lengths.";
8
+ const SR_notEnoughElements = "The input sequence has an insufficient number of elements.";
4
9
 
5
- export { SR_indexOutOfBounds, SR_inputWasEmpty, SR_keyNotFoundAlt };
10
+ export { SR_differentLengths, SR_indexOutOfBounds, SR_inputMustBeNonNegative, SR_inputSequenceEmpty, SR_inputSequenceTooLong, SR_inputWasEmpty, SR_keyNotFoundAlt, SR_notEnoughElements };
@@ -6,6 +6,28 @@ import { trim } from './String.js';
6
6
  const guidRegex = /^[\(\{]{0,2}[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[\)\}]{0,2}$/;
7
7
  const guidRegexNoHyphen = /^([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12})$/;
8
8
  const guidRegexHex = /^\{0x[0-9a-f]{8},(0x[0-9a-f]{4},){2}\{(0x[0-9a-f]{2},){7}0x[0-9a-f]{2}\}\}$/;
9
+ const guidHexCaptures = /^([0-9a-f]{8})-(([0-9a-f]{4})-)(([0-9a-f]{4})-)([0-9a-f]{2})([0-9a-f]{2})-([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/;
10
+ function toString(str, format, _provider) {
11
+ if (format && format?.length > 0) {
12
+ switch (format) {
13
+ case "N":
14
+ return str.replace(/-/g, '');
15
+ case "D":
16
+ return str;
17
+ case "B":
18
+ return "{" + str + "}";
19
+ case "P":
20
+ return "(" + str + ")";
21
+ case "X":
22
+ return str.replace(guidHexCaptures, "{0x$1,0x$3,0x$5,{0x$6,0x$7,0x$8,0x$9,0x$10,0x$11,0x$12,0x$13}}");
23
+ default:
24
+ throw new Error("Unrecognized Guid print format");
25
+ }
26
+ }
27
+ else {
28
+ return str;
29
+ }
30
+ }
9
31
  /** Validates UUID as specified in RFC4122 (versions 1-5). */
10
32
  function parse(str) {
11
33
  function hyphenateGuid(str) {
@@ -44,5 +66,80 @@ function newGuid() {
44
66
  }
45
67
  return b;
46
68
  }
69
+ // Maps for number <-> hex string conversion
70
+ let _convertMapsInitialized = false;
71
+ let _byteToHex;
72
+ let _hexToByte;
73
+ function initConvertMaps() {
74
+ _byteToHex = new Array(256);
75
+ _hexToByte = {};
76
+ for (let i = 0; i < 256; i++) {
77
+ _byteToHex[i] = (i + 0x100).toString(16).substr(1);
78
+ _hexToByte[_byteToHex[i]] = i;
79
+ }
80
+ _convertMapsInitialized = true;
81
+ }
82
+ /** Parse a UUID into it's component bytes */
83
+ // Adapted from https://github.com/zefferus/uuid-parse
84
+ function guidToArray(s) {
85
+ if (!_convertMapsInitialized) {
86
+ initConvertMaps();
87
+ }
88
+ let i = 0;
89
+ const buf = new Uint8Array(16);
90
+ s.toLowerCase().replace(/[0-9a-f]{2}/g, ((oct) => {
91
+ switch (i) {
92
+ // .NET saves first three byte groups with different endianness
93
+ // See https://stackoverflow.com/a/16722909/3922220
94
+ case 0:
95
+ case 1:
96
+ case 2:
97
+ case 3:
98
+ buf[3 - i++] = _hexToByte[oct];
99
+ break;
100
+ case 4:
101
+ case 5:
102
+ buf[9 - i++] = _hexToByte[oct];
103
+ break;
104
+ case 6:
105
+ case 7:
106
+ buf[13 - i++] = _hexToByte[oct];
107
+ break;
108
+ case 8:
109
+ case 9:
110
+ case 10:
111
+ case 11:
112
+ case 12:
113
+ case 13:
114
+ case 14:
115
+ case 15:
116
+ buf[i++] = _hexToByte[oct];
117
+ break;
118
+ }
119
+ }));
120
+ // Zero out remaining bytes if string was short
121
+ while (i < 16) {
122
+ buf[i++] = 0;
123
+ }
124
+ return buf;
125
+ }
126
+ /** Convert UUID byte array into a string */
127
+ function arrayToGuid(buf) {
128
+ if (buf.length !== 16) {
129
+ throw new Error("Byte array for GUID must be exactly 16 bytes long");
130
+ }
131
+ if (!_convertMapsInitialized) {
132
+ initConvertMaps();
133
+ }
134
+ const guid = _byteToHex[buf[3]] + _byteToHex[buf[2]] +
135
+ _byteToHex[buf[1]] + _byteToHex[buf[0]] + "-" +
136
+ _byteToHex[buf[5]] + _byteToHex[buf[4]] + "-" +
137
+ _byteToHex[buf[7]] + _byteToHex[buf[6]] + "-" +
138
+ _byteToHex[buf[8]] + _byteToHex[buf[9]] + "-" +
139
+ _byteToHex[buf[10]] + _byteToHex[buf[11]] +
140
+ _byteToHex[buf[12]] + _byteToHex[buf[13]] +
141
+ _byteToHex[buf[14]] + _byteToHex[buf[15]];
142
+ return guid;
143
+ }
47
144
 
48
- export { newGuid, parse, tryParse };
145
+ export { arrayToGuid, guidToArray, newGuid, parse, toString, tryParse };