arctrl 3.0.0__py3-none-any.whl

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 (511) hide show
  1. arctrl/__init__.py +23 -0
  2. arctrl/cwl.py +12 -0
  3. arctrl/py/CWL/__init__.py +0 -0
  4. arctrl/py/CWL/cwlprocessing_unit.py +221 -0
  5. arctrl/py/CWL/cwltypes.py +364 -0
  6. arctrl/py/CWL/decode.py +3532 -0
  7. arctrl/py/CWL/encode.py +1905 -0
  8. arctrl/py/CWL/expression_tool_description.py +192 -0
  9. arctrl/py/CWL/hash_helpers.py +60 -0
  10. arctrl/py/CWL/inputs.py +122 -0
  11. arctrl/py/CWL/operation_description.py +169 -0
  12. arctrl/py/CWL/outputs.py +171 -0
  13. arctrl/py/CWL/parameter_reference.py +74 -0
  14. arctrl/py/CWL/requirements.py +350 -0
  15. arctrl/py/CWL/tool_description.py +192 -0
  16. arctrl/py/CWL/workflow_description.py +181 -0
  17. arctrl/py/CWL/workflow_steps.py +354 -0
  18. arctrl/py/Contract/__init__.py +0 -0
  19. arctrl/py/Contract/arc.py +89 -0
  20. arctrl/py/Contract/arc_assay.py +125 -0
  21. arctrl/py/Contract/arc_investigation.py +88 -0
  22. arctrl/py/Contract/arc_run.py +291 -0
  23. arctrl/py/Contract/arc_study.py +126 -0
  24. arctrl/py/Contract/arc_workflow.py +213 -0
  25. arctrl/py/Contract/contract.py +153 -0
  26. arctrl/py/Contract/datamap.py +396 -0
  27. arctrl/py/Contract/git.py +116 -0
  28. arctrl/py/Contract/license.py +58 -0
  29. arctrl/py/Contract/validation_packages_config.py +107 -0
  30. arctrl/py/ContractIO/__init__.py +0 -0
  31. arctrl/py/ContractIO/contract_io.py +350 -0
  32. arctrl/py/ContractIO/file_system_helper.py +264 -0
  33. arctrl/py/Conversion/__init__.py +0 -0
  34. arctrl/py/Conversion/assay.py +151 -0
  35. arctrl/py/Conversion/basic.py +559 -0
  36. arctrl/py/Conversion/column_index.py +91 -0
  37. arctrl/py/Conversion/datamap.py +36 -0
  38. arctrl/py/Conversion/date_time.py +32 -0
  39. arctrl/py/Conversion/investigation.py +171 -0
  40. arctrl/py/Conversion/person.py +148 -0
  41. arctrl/py/Conversion/process.py +828 -0
  42. arctrl/py/Conversion/run.py +367 -0
  43. arctrl/py/Conversion/scholarly_article.py +163 -0
  44. arctrl/py/Conversion/study.py +99 -0
  45. arctrl/py/Conversion/table.py +229 -0
  46. arctrl/py/Conversion/workflow.py +680 -0
  47. arctrl/py/Core/Helper/__init__.py +0 -0
  48. arctrl/py/Core/Helper/collections_.py +512 -0
  49. arctrl/py/Core/Helper/date_time.py +26 -0
  50. arctrl/py/Core/Helper/hash_codes.py +60 -0
  51. arctrl/py/Core/Helper/identifier.py +290 -0
  52. arctrl/py/Core/Helper/orcid.py +42 -0
  53. arctrl/py/Core/Helper/printer.py +13 -0
  54. arctrl/py/Core/Helper/regex.py +554 -0
  55. arctrl/py/Core/Helper/sem_ver.py +71 -0
  56. arctrl/py/Core/Helper/url.py +148 -0
  57. arctrl/py/Core/Process/__init__.py +0 -0
  58. arctrl/py/Core/Process/column_index.py +280 -0
  59. arctrl/py/Core/Process/component.py +200 -0
  60. arctrl/py/Core/Process/factor.py +151 -0
  61. arctrl/py/Core/Process/factor_value.py +182 -0
  62. arctrl/py/Core/Process/material.py +74 -0
  63. arctrl/py/Core/Process/material_attribute.py +95 -0
  64. arctrl/py/Core/Process/material_attribute_value.py +184 -0
  65. arctrl/py/Core/Process/material_type.py +45 -0
  66. arctrl/py/Core/Process/process.py +477 -0
  67. arctrl/py/Core/Process/process_input.py +265 -0
  68. arctrl/py/Core/Process/process_output.py +235 -0
  69. arctrl/py/Core/Process/process_parameter_value.py +200 -0
  70. arctrl/py/Core/Process/process_sequence.py +435 -0
  71. arctrl/py/Core/Process/protocol.py +175 -0
  72. arctrl/py/Core/Process/protocol_parameter.py +98 -0
  73. arctrl/py/Core/Process/sample.py +82 -0
  74. arctrl/py/Core/Process/source.py +62 -0
  75. arctrl/py/Core/Table/__init__.py +0 -0
  76. arctrl/py/Core/Table/arc_table.py +1206 -0
  77. arctrl/py/Core/Table/arc_table_aux.py +1308 -0
  78. arctrl/py/Core/Table/arc_tables.py +574 -0
  79. arctrl/py/Core/Table/composite_cell.py +319 -0
  80. arctrl/py/Core/Table/composite_column.py +73 -0
  81. arctrl/py/Core/Table/composite_header.py +739 -0
  82. arctrl/py/Core/__init__.py +0 -0
  83. arctrl/py/Core/arc_types.py +5312 -0
  84. arctrl/py/Core/comment.py +128 -0
  85. arctrl/py/Core/comment_list.py +127 -0
  86. arctrl/py/Core/conversion.py +1375 -0
  87. arctrl/py/Core/data.py +247 -0
  88. arctrl/py/Core/data_context.py +157 -0
  89. arctrl/py/Core/data_file.py +112 -0
  90. arctrl/py/Core/datamap.py +217 -0
  91. arctrl/py/Core/identifier_setters.py +43 -0
  92. arctrl/py/Core/iproperty_value.py +36 -0
  93. arctrl/py/Core/ontology_annotation.py +298 -0
  94. arctrl/py/Core/ontology_source_reference.py +114 -0
  95. arctrl/py/Core/person.py +259 -0
  96. arctrl/py/Core/publication.py +161 -0
  97. arctrl/py/Core/template.py +231 -0
  98. arctrl/py/Core/templates.py +148 -0
  99. arctrl/py/Core/uri.py +11 -0
  100. arctrl/py/Core/value.py +188 -0
  101. arctrl/py/FileSystem/__init__.py +0 -0
  102. arctrl/py/FileSystem/commit.py +21 -0
  103. arctrl/py/FileSystem/default_gitattributes.py +1 -0
  104. arctrl/py/FileSystem/default_gitignore.py +1 -0
  105. arctrl/py/FileSystem/default_license.py +1 -0
  106. arctrl/py/FileSystem/file_system.py +58 -0
  107. arctrl/py/FileSystem/file_system_tree.py +483 -0
  108. arctrl/py/FileSystem/path.py +266 -0
  109. arctrl/py/Json/Datamap/__init__.py +0 -0
  110. arctrl/py/Json/Datamap/data_context.py +101 -0
  111. arctrl/py/Json/Datamap/datamap.py +53 -0
  112. arctrl/py/Json/Process/__init__.py +0 -0
  113. arctrl/py/Json/Process/assay_materials.py +46 -0
  114. arctrl/py/Json/Process/component.py +125 -0
  115. arctrl/py/Json/Process/factor.py +107 -0
  116. arctrl/py/Json/Process/factor_value.py +101 -0
  117. arctrl/py/Json/Process/material.py +226 -0
  118. arctrl/py/Json/Process/material_attribute.py +79 -0
  119. arctrl/py/Json/Process/material_attribute_value.py +101 -0
  120. arctrl/py/Json/Process/material_type.py +53 -0
  121. arctrl/py/Json/Process/process.py +296 -0
  122. arctrl/py/Json/Process/process_input.py +83 -0
  123. arctrl/py/Json/Process/process_output.py +67 -0
  124. arctrl/py/Json/Process/process_parameter_value.py +81 -0
  125. arctrl/py/Json/Process/protocol.py +354 -0
  126. arctrl/py/Json/Process/protocol_parameter.py +91 -0
  127. arctrl/py/Json/Process/sample.py +277 -0
  128. arctrl/py/Json/Process/source.py +214 -0
  129. arctrl/py/Json/Process/study_materials.py +52 -0
  130. arctrl/py/Json/Process/value.py +56 -0
  131. arctrl/py/Json/ROCrate/__init__.py +0 -0
  132. arctrl/py/Json/ROCrate/ldcontext.py +143 -0
  133. arctrl/py/Json/ROCrate/ldgraph.py +117 -0
  134. arctrl/py/Json/ROCrate/ldnode.py +304 -0
  135. arctrl/py/Json/ROCrate/ldref.py +44 -0
  136. arctrl/py/Json/ROCrate/ldvalue.py +102 -0
  137. arctrl/py/Json/Table/__init__.py +0 -0
  138. arctrl/py/Json/Table/arc_table.py +375 -0
  139. arctrl/py/Json/Table/cell_table.py +83 -0
  140. arctrl/py/Json/Table/composite_cell.py +136 -0
  141. arctrl/py/Json/Table/composite_header.py +67 -0
  142. arctrl/py/Json/Table/iotype.py +24 -0
  143. arctrl/py/Json/Table/oatable.py +82 -0
  144. arctrl/py/Json/Table/templates.py +281 -0
  145. arctrl/py/Json/__init__.py +0 -0
  146. arctrl/py/Json/assay.py +600 -0
  147. arctrl/py/Json/comment.py +206 -0
  148. arctrl/py/Json/context/rocrate/__init__.py +0 -0
  149. arctrl/py/Json/context/rocrate/isa_assay_context.py +101 -0
  150. arctrl/py/Json/context/rocrate/isa_comment_context.py +60 -0
  151. arctrl/py/Json/context/rocrate/isa_component_context.py +77 -0
  152. arctrl/py/Json/context/rocrate/isa_data_context.py +74 -0
  153. arctrl/py/Json/context/rocrate/isa_factor_context.py +74 -0
  154. arctrl/py/Json/context/rocrate/isa_factor_value_context.py +84 -0
  155. arctrl/py/Json/context/rocrate/isa_investigation_context.py +110 -0
  156. arctrl/py/Json/context/rocrate/isa_material_attribute_context.py +64 -0
  157. arctrl/py/Json/context/rocrate/isa_material_attribute_value_context.py +80 -0
  158. arctrl/py/Json/context/rocrate/isa_material_context.py +71 -0
  159. arctrl/py/Json/context/rocrate/isa_ontology_annotation_context.py +68 -0
  160. arctrl/py/Json/context/rocrate/isa_ontology_source_reference_context.py +75 -0
  161. arctrl/py/Json/context/rocrate/isa_organization_context.py +55 -0
  162. arctrl/py/Json/context/rocrate/isa_person_context.py +131 -0
  163. arctrl/py/Json/context/rocrate/isa_process_context.py +94 -0
  164. arctrl/py/Json/context/rocrate/isa_process_parameter_value_context.py +80 -0
  165. arctrl/py/Json/context/rocrate/isa_protocol_context.py +97 -0
  166. arctrl/py/Json/context/rocrate/isa_protocol_parameter_context.py +64 -0
  167. arctrl/py/Json/context/rocrate/isa_publication_context.py +78 -0
  168. arctrl/py/Json/context/rocrate/isa_sample_context.py +65 -0
  169. arctrl/py/Json/context/rocrate/isa_source_context.py +66 -0
  170. arctrl/py/Json/context/rocrate/isa_study_context.py +125 -0
  171. arctrl/py/Json/context/rocrate/property_value_context.py +73 -0
  172. arctrl/py/Json/context/rocrate/rocrate_context.py +81 -0
  173. arctrl/py/Json/converter_options.py +23 -0
  174. arctrl/py/Json/data.py +356 -0
  175. arctrl/py/Json/data_file.py +63 -0
  176. arctrl/py/Json/decode.py +271 -0
  177. arctrl/py/Json/encode.py +140 -0
  178. arctrl/py/Json/idtable.py +44 -0
  179. arctrl/py/Json/investigation.py +695 -0
  180. arctrl/py/Json/ontology_annotation.py +404 -0
  181. arctrl/py/Json/ontology_source_reference.py +255 -0
  182. arctrl/py/Json/person.py +658 -0
  183. arctrl/py/Json/property_value.py +359 -0
  184. arctrl/py/Json/publication.py +279 -0
  185. arctrl/py/Json/run.py +275 -0
  186. arctrl/py/Json/string_table.py +87 -0
  187. arctrl/py/Json/study.py +793 -0
  188. arctrl/py/Json/workflow.py +307 -0
  189. arctrl/py/JsonIO/Process/__init__.py +0 -0
  190. arctrl/py/JsonIO/Process/component.py +60 -0
  191. arctrl/py/JsonIO/Process/factor.py +36 -0
  192. arctrl/py/JsonIO/Process/factor_value.py +38 -0
  193. arctrl/py/JsonIO/Process/material.py +60 -0
  194. arctrl/py/JsonIO/Process/material_attribute.py +38 -0
  195. arctrl/py/JsonIO/Process/material_attribute_value.py +60 -0
  196. arctrl/py/JsonIO/Process/material_type.py +36 -0
  197. arctrl/py/JsonIO/Process/process.py +60 -0
  198. arctrl/py/JsonIO/Process/process_input.py +38 -0
  199. arctrl/py/JsonIO/Process/process_output.py +60 -0
  200. arctrl/py/JsonIO/Process/process_parameter_value.py +60 -0
  201. arctrl/py/JsonIO/Process/process_sequence.py +71 -0
  202. arctrl/py/JsonIO/Process/protocol.py +60 -0
  203. arctrl/py/JsonIO/Process/protocol_parameter.py +36 -0
  204. arctrl/py/JsonIO/Process/sample.py +60 -0
  205. arctrl/py/JsonIO/Process/source.py +60 -0
  206. arctrl/py/JsonIO/Process/study_materials.py +52 -0
  207. arctrl/py/JsonIO/Process/value.py +32 -0
  208. arctrl/py/JsonIO/Table/__init__.py +0 -0
  209. arctrl/py/JsonIO/Table/arc_table.py +103 -0
  210. arctrl/py/JsonIO/Table/composite_cell.py +36 -0
  211. arctrl/py/JsonIO/Table/composite_header.py +36 -0
  212. arctrl/py/JsonIO/Table/compression.py +67 -0
  213. arctrl/py/JsonIO/Table/iotype.py +36 -0
  214. arctrl/py/JsonIO/Table/templates.py +113 -0
  215. arctrl/py/JsonIO/__init__.py +0 -0
  216. arctrl/py/JsonIO/assay.py +113 -0
  217. arctrl/py/JsonIO/comment.py +80 -0
  218. arctrl/py/JsonIO/data.py +60 -0
  219. arctrl/py/JsonIO/data_file.py +58 -0
  220. arctrl/py/JsonIO/datamap.py +36 -0
  221. arctrl/py/JsonIO/decode.py +9 -0
  222. arctrl/py/JsonIO/encode.py +1 -0
  223. arctrl/py/JsonIO/investigation.py +91 -0
  224. arctrl/py/JsonIO/ldobject.py +106 -0
  225. arctrl/py/JsonIO/ontology_annotation.py +80 -0
  226. arctrl/py/JsonIO/ontology_source_reference.py +80 -0
  227. arctrl/py/JsonIO/person.py +82 -0
  228. arctrl/py/JsonIO/publication.py +82 -0
  229. arctrl/py/JsonIO/run.py +68 -0
  230. arctrl/py/JsonIO/study.py +114 -0
  231. arctrl/py/JsonIO/workflow.py +68 -0
  232. arctrl/py/ROCrate/ISAProfile/__init__.py +0 -0
  233. arctrl/py/ROCrate/ISAProfile/assay.py +70 -0
  234. arctrl/py/ROCrate/ISAProfile/data.py +65 -0
  235. arctrl/py/ROCrate/ISAProfile/dataset.py +24 -0
  236. arctrl/py/ROCrate/ISAProfile/investigation.py +73 -0
  237. arctrl/py/ROCrate/ISAProfile/lab_process.py +162 -0
  238. arctrl/py/ROCrate/ISAProfile/lab_protocol.py +37 -0
  239. arctrl/py/ROCrate/ISAProfile/person.py +72 -0
  240. arctrl/py/ROCrate/ISAProfile/property_value.py +98 -0
  241. arctrl/py/ROCrate/ISAProfile/sample.py +64 -0
  242. arctrl/py/ROCrate/ISAProfile/scholarly_article.py +98 -0
  243. arctrl/py/ROCrate/ISAProfile/study.py +74 -0
  244. arctrl/py/ROCrate/LDTypes/__init__.py +0 -0
  245. arctrl/py/ROCrate/LDTypes/comment.py +131 -0
  246. arctrl/py/ROCrate/LDTypes/computational_workflow.py +455 -0
  247. arctrl/py/ROCrate/LDTypes/computer_language.py +269 -0
  248. arctrl/py/ROCrate/LDTypes/create_action.py +303 -0
  249. arctrl/py/ROCrate/LDTypes/creative_work.py +566 -0
  250. arctrl/py/ROCrate/LDTypes/dataset.py +943 -0
  251. arctrl/py/ROCrate/LDTypes/defined_term.py +131 -0
  252. arctrl/py/ROCrate/LDTypes/file.py +281 -0
  253. arctrl/py/ROCrate/LDTypes/formal_parameter.py +431 -0
  254. arctrl/py/ROCrate/LDTypes/lab_process.py +352 -0
  255. arctrl/py/ROCrate/LDTypes/lab_protocol.py +395 -0
  256. arctrl/py/ROCrate/LDTypes/organization.py +83 -0
  257. arctrl/py/ROCrate/LDTypes/person.py +484 -0
  258. arctrl/py/ROCrate/LDTypes/postal_address.py +195 -0
  259. arctrl/py/ROCrate/LDTypes/property_value.py +952 -0
  260. arctrl/py/ROCrate/LDTypes/sample.py +202 -0
  261. arctrl/py/ROCrate/LDTypes/scholarly_article.py +229 -0
  262. arctrl/py/ROCrate/LDTypes/software_source_code.py +310 -0
  263. arctrl/py/ROCrate/LDTypes/workflow_invocation.py +48 -0
  264. arctrl/py/ROCrate/LDTypes/workflow_protocol.py +52 -0
  265. arctrl/py/ROCrate/__init__.py +0 -0
  266. arctrl/py/ROCrate/arc_rocrate_metadata.py +39 -0
  267. arctrl/py/ROCrate/dyn_obj_extensions.py +1 -0
  268. arctrl/py/ROCrate/helper.py +8 -0
  269. arctrl/py/ROCrate/ldcontext.py +406 -0
  270. arctrl/py/ROCrate/ldobject.py +1247 -0
  271. arctrl/py/ROCrate/rocrate_context.py +51 -0
  272. arctrl/py/Spreadsheet/AnnotationTable/__init__.py +0 -0
  273. arctrl/py/Spreadsheet/AnnotationTable/arc_table.py +203 -0
  274. arctrl/py/Spreadsheet/AnnotationTable/composite_cell.py +78 -0
  275. arctrl/py/Spreadsheet/AnnotationTable/composite_column.py +305 -0
  276. arctrl/py/Spreadsheet/AnnotationTable/composite_header.py +623 -0
  277. arctrl/py/Spreadsheet/DatamapTable/__init__.py +0 -0
  278. arctrl/py/Spreadsheet/DatamapTable/datamap_column.py +114 -0
  279. arctrl/py/Spreadsheet/DatamapTable/datamap_header.py +621 -0
  280. arctrl/py/Spreadsheet/DatamapTable/datamap_table.py +118 -0
  281. arctrl/py/Spreadsheet/Metadata/__init__.py +0 -0
  282. arctrl/py/Spreadsheet/Metadata/assays.py +125 -0
  283. arctrl/py/Spreadsheet/Metadata/comment.py +77 -0
  284. arctrl/py/Spreadsheet/Metadata/contacts.py +134 -0
  285. arctrl/py/Spreadsheet/Metadata/conversions.py +190 -0
  286. arctrl/py/Spreadsheet/Metadata/design_descriptors.py +34 -0
  287. arctrl/py/Spreadsheet/Metadata/factors.py +107 -0
  288. arctrl/py/Spreadsheet/Metadata/ontology_annotation.py +88 -0
  289. arctrl/py/Spreadsheet/Metadata/ontology_source_reference.py +96 -0
  290. arctrl/py/Spreadsheet/Metadata/protocols.py +146 -0
  291. arctrl/py/Spreadsheet/Metadata/publication.py +122 -0
  292. arctrl/py/Spreadsheet/Metadata/run.py +122 -0
  293. arctrl/py/Spreadsheet/Metadata/sparse_table.py +499 -0
  294. arctrl/py/Spreadsheet/Metadata/study.py +312 -0
  295. arctrl/py/Spreadsheet/Metadata/workflow.py +159 -0
  296. arctrl/py/Spreadsheet/__init__.py +0 -0
  297. arctrl/py/Spreadsheet/arc_assay.py +233 -0
  298. arctrl/py/Spreadsheet/arc_investigation.py +435 -0
  299. arctrl/py/Spreadsheet/arc_run.py +190 -0
  300. arctrl/py/Spreadsheet/arc_study.py +144 -0
  301. arctrl/py/Spreadsheet/arc_workflow.py +177 -0
  302. arctrl/py/Spreadsheet/assembly_info.py +1 -0
  303. arctrl/py/Spreadsheet/collection_aux.py +167 -0
  304. arctrl/py/Spreadsheet/datamap.py +43 -0
  305. arctrl/py/Spreadsheet/template.py +460 -0
  306. arctrl/py/ValidationPackages/__init__.py +0 -0
  307. arctrl/py/ValidationPackages/validation_package.py +82 -0
  308. arctrl/py/ValidationPackages/validation_packages_config.py +132 -0
  309. arctrl/py/WebRequest/__init__.py +0 -0
  310. arctrl/py/WebRequest/web_request.py +9 -0
  311. arctrl/py/WebRequest/web_request_py.py +135 -0
  312. arctrl/py/WorkflowGraph/__init__.py +0 -0
  313. arctrl/py/WorkflowGraph/adapters.py +141 -0
  314. arctrl/py/WorkflowGraph/build_options.py +45 -0
  315. arctrl/py/WorkflowGraph/builder.py +720 -0
  316. arctrl/py/WorkflowGraph/graph_types.py +260 -0
  317. arctrl/py/WorkflowGraph/query_helpers.py +76 -0
  318. arctrl/py/WorkflowGraph/reference_parsing.py +59 -0
  319. arctrl/py/WorkflowGraph/visualization_siren.py +574 -0
  320. arctrl/py/WorkflowGraph/workflow_graph.py +119 -0
  321. arctrl/py/Yaml/__init__.py +0 -0
  322. arctrl/py/Yaml/decode.py +1 -0
  323. arctrl/py/Yaml/encode.py +10 -0
  324. arctrl/py/Yaml/validation_package.py +77 -0
  325. arctrl/py/Yaml/validation_packages_config.py +86 -0
  326. arctrl/py/__init__.py +0 -0
  327. arctrl/py/arc.py +1891 -0
  328. arctrl/py/column_index.py +280 -0
  329. arctrl/py/conversion.py +142 -0
  330. arctrl/py/cross_async.py +76 -0
  331. arctrl/py/cwlrun_resolver.py +228 -0
  332. arctrl/py/fable_modules/dynamic_obj/__init__.py +0 -0
  333. arctrl/py/fable_modules/dynamic_obj/dyn_obj.py +136 -0
  334. arctrl/py/fable_modules/dynamic_obj/dynamic_obj.py +415 -0
  335. arctrl/py/fable_modules/dynamic_obj/fable_js.py +1 -0
  336. arctrl/py/fable_modules/dynamic_obj/fable_py.py +288 -0
  337. arctrl/py/fable_modules/dynamic_obj/hash_codes.py +82 -0
  338. arctrl/py/fable_modules/dynamic_obj/property_helper.py +25 -0
  339. arctrl/py/fable_modules/dynamic_obj/reflection_utils.py +87 -0
  340. arctrl/py/fable_modules/fable_library/__init__.py +0 -0
  341. arctrl/py/fable_modules/fable_library/array_.py +1528 -0
  342. arctrl/py/fable_modules/fable_library/async_.py +377 -0
  343. arctrl/py/fable_modules/fable_library/async_builder.py +379 -0
  344. arctrl/py/fable_modules/fable_library/big_int.py +330 -0
  345. arctrl/py/fable_modules/fable_library/bit_converter.py +131 -0
  346. arctrl/py/fable_modules/fable_library/boolean.py +26 -0
  347. arctrl/py/fable_modules/fable_library/char.py +237 -0
  348. arctrl/py/fable_modules/fable_library/choice.py +212 -0
  349. arctrl/py/fable_modules/fable_library/date.py +779 -0
  350. arctrl/py/fable_modules/fable_library/date_offset.py +79 -0
  351. arctrl/py/fable_modules/fable_library/decimal_.py +190 -0
  352. arctrl/py/fable_modules/fable_library/diagnostics.py +54 -0
  353. arctrl/py/fable_modules/fable_library/double.py +87 -0
  354. arctrl/py/fable_modules/fable_library/encoding.py +41 -0
  355. arctrl/py/fable_modules/fable_library/event.py +206 -0
  356. arctrl/py/fable_modules/fable_library/file.py +107 -0
  357. arctrl/py/fable_modules/fable_library/fsharp_collections.py +52 -0
  358. arctrl/py/fable_modules/fable_library/fsharp_core.py +123 -0
  359. arctrl/py/fable_modules/fable_library/global_.py +63 -0
  360. arctrl/py/fable_modules/fable_library/guid.py +41 -0
  361. arctrl/py/fable_modules/fable_library/int32.py +73 -0
  362. arctrl/py/fable_modules/fable_library/list.py +1788 -0
  363. arctrl/py/fable_modules/fable_library/long.py +240 -0
  364. arctrl/py/fable_modules/fable_library/mailbox_processor.py +179 -0
  365. arctrl/py/fable_modules/fable_library/map.py +1854 -0
  366. arctrl/py/fable_modules/fable_library/map_util.py +148 -0
  367. arctrl/py/fable_modules/fable_library/mutable_map.py +397 -0
  368. arctrl/py/fable_modules/fable_library/mutable_set.py +279 -0
  369. arctrl/py/fable_modules/fable_library/native.py +45 -0
  370. arctrl/py/fable_modules/fable_library/numeric.py +46 -0
  371. arctrl/py/fable_modules/fable_library/observable.py +222 -0
  372. arctrl/py/fable_modules/fable_library/option.py +128 -0
  373. arctrl/py/fable_modules/fable_library/path.py +62 -0
  374. arctrl/py/fable_modules/fable_library/range.py +117 -0
  375. arctrl/py/fable_modules/fable_library/reflection.py +463 -0
  376. arctrl/py/fable_modules/fable_library/reg_exp.py +137 -0
  377. arctrl/py/fable_modules/fable_library/resize_array.py +31 -0
  378. arctrl/py/fable_modules/fable_library/result.py +212 -0
  379. arctrl/py/fable_modules/fable_library/seq.py +1979 -0
  380. arctrl/py/fable_modules/fable_library/seq2.py +221 -0
  381. arctrl/py/fable_modules/fable_library/set.py +2414 -0
  382. arctrl/py/fable_modules/fable_library/singleton_local_time_zone.py +36 -0
  383. arctrl/py/fable_modules/fable_library/string_.py +573 -0
  384. arctrl/py/fable_modules/fable_library/system_collections_generic.py +462 -0
  385. arctrl/py/fable_modules/fable_library/system_text.py +237 -0
  386. arctrl/py/fable_modules/fable_library/task.py +116 -0
  387. arctrl/py/fable_modules/fable_library/task_builder.py +122 -0
  388. arctrl/py/fable_modules/fable_library/thread.py +5 -0
  389. arctrl/py/fable_modules/fable_library/time_span.py +283 -0
  390. arctrl/py/fable_modules/fable_library/timer.py +24 -0
  391. arctrl/py/fable_modules/fable_library/types.py +401 -0
  392. arctrl/py/fable_modules/fable_library/uri.py +109 -0
  393. arctrl/py/fable_modules/fable_library/util.py +2735 -0
  394. arctrl/py/fable_modules/fable_openpyxl/__init__.py +0 -0
  395. arctrl/py/fable_modules/fable_openpyxl/openpyxl.py +362 -0
  396. arctrl/py/fable_modules/fable_python/cognite-sdk/__init__.py +0 -0
  397. arctrl/py/fable_modules/fable_python/cognite-sdk/cognite_sdk.py +22 -0
  398. arctrl/py/fable_modules/fable_python/flask/__init__.py +0 -0
  399. arctrl/py/fable_modules/fable_python/flask/flask.py +34 -0
  400. arctrl/py/fable_modules/fable_python/jupyter/__init__.py +0 -0
  401. arctrl/py/fable_modules/fable_python/jupyter/ipy_widgets.py +47 -0
  402. arctrl/py/fable_modules/fable_python/jupyter/ipython.py +13 -0
  403. arctrl/py/fable_modules/fable_python/stdlib/__init__.py +0 -0
  404. arctrl/py/fable_modules/fable_python/stdlib/ast.py +1 -0
  405. arctrl/py/fable_modules/fable_python/stdlib/asyncio/__init__.py +0 -0
  406. arctrl/py/fable_modules/fable_python/stdlib/asyncio/events.py +17 -0
  407. arctrl/py/fable_modules/fable_python/stdlib/asyncio/futures.py +52 -0
  408. arctrl/py/fable_modules/fable_python/stdlib/asyncio/tasks.py +38 -0
  409. arctrl/py/fable_modules/fable_python/stdlib/base64_.py +1 -0
  410. arctrl/py/fable_modules/fable_python/stdlib/builtins_.py +38 -0
  411. arctrl/py/fable_modules/fable_python/stdlib/html.py +1 -0
  412. arctrl/py/fable_modules/fable_python/stdlib/json.py +1 -0
  413. arctrl/py/fable_modules/fable_python/stdlib/math_.py +1 -0
  414. arctrl/py/fable_modules/fable_python/stdlib/os_.py +1 -0
  415. arctrl/py/fable_modules/fable_python/stdlib/queue_.py +1 -0
  416. arctrl/py/fable_modules/fable_python/stdlib/string_.py +1 -0
  417. arctrl/py/fable_modules/fable_python/stdlib/sys_.py +30 -0
  418. arctrl/py/fable_modules/fable_python/stdlib/time_.py +1 -0
  419. arctrl/py/fable_modules/fable_python/stdlib/tk_inter.py +1 -0
  420. arctrl/py/fable_modules/fs_spreadsheet/Cells/__init__.py +0 -0
  421. arctrl/py/fable_modules/fs_spreadsheet/Cells/fs_cell.py +340 -0
  422. arctrl/py/fable_modules/fs_spreadsheet/Cells/fs_cells_collection.py +466 -0
  423. arctrl/py/fable_modules/fs_spreadsheet/DSL/__init__.py +0 -0
  424. arctrl/py/fable_modules/fs_spreadsheet/DSL/cell_builder.py +214 -0
  425. arctrl/py/fable_modules/fs_spreadsheet/DSL/column_builder.py +139 -0
  426. arctrl/py/fable_modules/fs_spreadsheet/DSL/dsl.py +50 -0
  427. arctrl/py/fable_modules/fs_spreadsheet/DSL/expression.py +65 -0
  428. arctrl/py/fable_modules/fs_spreadsheet/DSL/operators.py +9 -0
  429. arctrl/py/fable_modules/fs_spreadsheet/DSL/row_builder.py +139 -0
  430. arctrl/py/fable_modules/fs_spreadsheet/DSL/sheet_builder.py +118 -0
  431. arctrl/py/fable_modules/fs_spreadsheet/DSL/table_builder.py +122 -0
  432. arctrl/py/fable_modules/fs_spreadsheet/DSL/transform.py +463 -0
  433. arctrl/py/fable_modules/fs_spreadsheet/DSL/types.py +314 -0
  434. arctrl/py/fable_modules/fs_spreadsheet/DSL/workbook_builder.py +106 -0
  435. arctrl/py/fable_modules/fs_spreadsheet/Json/__init__.py +0 -0
  436. arctrl/py/fable_modules/fs_spreadsheet/Json/cell.py +103 -0
  437. arctrl/py/fable_modules/fs_spreadsheet/Json/column.py +70 -0
  438. arctrl/py/fable_modules/fs_spreadsheet/Json/row.py +70 -0
  439. arctrl/py/fable_modules/fs_spreadsheet/Json/table.py +54 -0
  440. arctrl/py/fable_modules/fs_spreadsheet/Json/value.py +93 -0
  441. arctrl/py/fable_modules/fs_spreadsheet/Json/workbook.py +71 -0
  442. arctrl/py/fable_modules/fs_spreadsheet/Json/worksheet.py +216 -0
  443. arctrl/py/fable_modules/fs_spreadsheet/Ranges/__init__.py +0 -0
  444. arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range.py +43 -0
  445. arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range_address.py +190 -0
  446. arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range_base.py +92 -0
  447. arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range_column.py +77 -0
  448. arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range_row.py +48 -0
  449. arctrl/py/fable_modules/fs_spreadsheet/Tables/__init__.py +0 -0
  450. arctrl/py/fable_modules/fs_spreadsheet/Tables/fs_table.py +461 -0
  451. arctrl/py/fable_modules/fs_spreadsheet/Tables/fs_table_field.py +117 -0
  452. arctrl/py/fable_modules/fs_spreadsheet/Tables/fs_table_row.py +23 -0
  453. arctrl/py/fable_modules/fs_spreadsheet/__init__.py +0 -0
  454. arctrl/py/fable_modules/fs_spreadsheet/fs_address.py +236 -0
  455. arctrl/py/fable_modules/fs_spreadsheet/fs_column.py +172 -0
  456. arctrl/py/fable_modules/fs_spreadsheet/fs_row.py +183 -0
  457. arctrl/py/fable_modules/fs_spreadsheet/fs_workbook.py +192 -0
  458. arctrl/py/fable_modules/fs_spreadsheet/fs_worksheet.py +610 -0
  459. arctrl/py/fable_modules/fs_spreadsheet/hash_codes.py +60 -0
  460. arctrl/py/fable_modules/fs_spreadsheet/sheet_builder.py +329 -0
  461. arctrl/py/fable_modules/fs_spreadsheet_py/__init__.py +0 -0
  462. arctrl/py/fable_modules/fs_spreadsheet_py/cell.py +60 -0
  463. arctrl/py/fable_modules/fs_spreadsheet_py/cell_type.py +50 -0
  464. arctrl/py/fable_modules/fs_spreadsheet_py/fs_extension.py +60 -0
  465. arctrl/py/fable_modules/fs_spreadsheet_py/json.py +47 -0
  466. arctrl/py/fable_modules/fs_spreadsheet_py/table.py +54 -0
  467. arctrl/py/fable_modules/fs_spreadsheet_py/workbook.py +41 -0
  468. arctrl/py/fable_modules/fs_spreadsheet_py/worksheet.py +52 -0
  469. arctrl/py/fable_modules/fs_spreadsheet_py/xlsx.py +37 -0
  470. arctrl/py/fable_modules/siren/__init__.py +0 -0
  471. arctrl/py/fable_modules/siren/config.py +1038 -0
  472. arctrl/py/fable_modules/siren/formatting.py +1121 -0
  473. arctrl/py/fable_modules/siren/siren.py +1941 -0
  474. arctrl/py/fable_modules/siren/siren_types.py +1229 -0
  475. arctrl/py/fable_modules/siren/theme_variables.py +517 -0
  476. arctrl/py/fable_modules/siren/util.py +37 -0
  477. arctrl/py/fable_modules/siren/yaml.py +101 -0
  478. arctrl/py/fable_modules/thoth_json_core/__init__.py +0 -0
  479. arctrl/py/fable_modules/thoth_json_core/decode.py +1614 -0
  480. arctrl/py/fable_modules/thoth_json_core/encode.py +305 -0
  481. arctrl/py/fable_modules/thoth_json_core/types.py +181 -0
  482. arctrl/py/fable_modules/thoth_json_python/__init__.py +0 -0
  483. arctrl/py/fable_modules/thoth_json_python/decode.py +112 -0
  484. arctrl/py/fable_modules/thoth_json_python/encode.py +72 -0
  485. arctrl/py/fable_modules/thoth_json_python/python.py +1 -0
  486. arctrl/py/fable_modules/yamlicious/Interop/__init__.py +0 -0
  487. arctrl/py/fable_modules/yamlicious/Interop/js_interop.py +1 -0
  488. arctrl/py/fable_modules/yamlicious/Interop/py_interop.py +7 -0
  489. arctrl/py/fable_modules/yamlicious/__init__.py +0 -0
  490. arctrl/py/fable_modules/yamlicious/decode.py +1784 -0
  491. arctrl/py/fable_modules/yamlicious/encode.py +84 -0
  492. arctrl/py/fable_modules/yamlicious/flow_to_block.py +994 -0
  493. arctrl/py/fable_modules/yamlicious/library.py +10 -0
  494. arctrl/py/fable_modules/yamlicious/persil.py +57 -0
  495. arctrl/py/fable_modules/yamlicious/preprocessing.py +99 -0
  496. arctrl/py/fable_modules/yamlicious/reader.py +739 -0
  497. arctrl/py/fable_modules/yamlicious/regex.py +29 -0
  498. arctrl/py/fable_modules/yamlicious/regex_active_patterns.py +265 -0
  499. arctrl/py/fable_modules/yamlicious/writer.py +175 -0
  500. arctrl/py/fable_modules/yamlicious/yamlicious_types.py +128 -0
  501. arctrl/py/json.py +389 -0
  502. arctrl/py/license.py +169 -0
  503. arctrl/py/rocrate_io.py +242 -0
  504. arctrl/py/template_web.py +23 -0
  505. arctrl/py/xlsx.py +212 -0
  506. arctrl/py/yaml.py +79 -0
  507. arctrl/rocrate.py +21 -0
  508. arctrl-3.0.0.dist-info/METADATA +157 -0
  509. arctrl-3.0.0.dist-info/RECORD +511 -0
  510. arctrl-3.0.0.dist-info/WHEEL +4 -0
  511. arctrl-3.0.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,1614 @@
1
+ from __future__ import annotations
2
+ from abc import abstractmethod
3
+ from collections.abc import Callable
4
+ from decimal import Decimal
5
+ from typing import (Any, Protocol, Generic, TypeVar)
6
+ from ..fable_library.array_ import (fold as fold_1, fill)
7
+ from ..fable_library.big_int import (from_int32, try_parse as try_parse_4)
8
+ from ..fable_library.date import (min_value, try_parse as try_parse_6)
9
+ from ..fable_library.decimal_ import (Decimal as Decimal_1, try_parse as try_parse_5)
10
+ from ..fable_library.guid import try_parse as try_parse_1
11
+ from ..fable_library.int32 import try_parse as try_parse_2
12
+ from ..fable_library.list import (map as map_1, try_last, FSharpList, fold, empty, append, singleton, of_seq, reverse as reverse_1, cons, is_empty, head as head_1, tail as tail_1, length)
13
+ from ..fable_library.long import (to_number, from_number, try_parse as try_parse_3)
14
+ from ..fable_library.map import (of_list, of_seq as of_seq_1)
15
+ from ..fable_library.option import (some, default_arg, value as value_7)
16
+ from ..fable_library.reflection import (TypeInfo, class_type)
17
+ from ..fable_library.result import (FSharpResult_2, Result_MapError, Result_Map)
18
+ from ..fable_library.seq import (reverse, append as append_1, to_list)
19
+ from ..fable_library.string_ import join
20
+ from ..fable_library.time_span import (create, try_parse as try_parse_7)
21
+ from ..fable_library.types import (FSharpRef, int8, uint8, int16 as int16_1, uint16 as uint16_1, uint32 as uint32_1, int64 as int64_1, uint64 as uint64_1, float32 as float32_1, Array)
22
+ from ..fable_library.util import (int32_to_string, IEnumerable_1, to_enumerable, compare_primitives, compare)
23
+ from .types import (ErrorReason_1, IDecoderHelpers_1, Decoder_1)
24
+
25
+ _JSONVALUE = TypeVar("_JSONVALUE")
26
+
27
+ _T = TypeVar("_T")
28
+
29
+ __A_ = TypeVar("__A_")
30
+
31
+ _VALUE = TypeVar("_VALUE")
32
+
33
+ _VALUE_ = TypeVar("_VALUE_")
34
+
35
+ __A = TypeVar("__A")
36
+
37
+ _OUTPUT_ = TypeVar("_OUTPUT_")
38
+
39
+ _A_ = TypeVar("_A_")
40
+
41
+ __C_ = TypeVar("__C_")
42
+
43
+ _B_ = TypeVar("_B_")
44
+
45
+ _A = TypeVar("_A")
46
+
47
+ _B = TypeVar("_B")
48
+
49
+ _OUTPUT = TypeVar("_OUTPUT")
50
+
51
+ __B_ = TypeVar("__B_")
52
+
53
+ __D_ = TypeVar("__D_")
54
+
55
+ _C_ = TypeVar("_C_")
56
+
57
+ _C = TypeVar("_C")
58
+
59
+ __E_ = TypeVar("__E_")
60
+
61
+ _D_ = TypeVar("_D_")
62
+
63
+ _D = TypeVar("_D")
64
+
65
+ __F_ = TypeVar("__F_")
66
+
67
+ _E_ = TypeVar("_E_")
68
+
69
+ _E = TypeVar("_E")
70
+
71
+ __G_ = TypeVar("__G_")
72
+
73
+ _F_ = TypeVar("_F_")
74
+
75
+ _F = TypeVar("_F")
76
+
77
+ __H_ = TypeVar("__H_")
78
+
79
+ _G_ = TypeVar("_G_")
80
+
81
+ _G = TypeVar("_G")
82
+
83
+ __I_ = TypeVar("__I_")
84
+
85
+ _H_ = TypeVar("_H_")
86
+
87
+ _H = TypeVar("_H")
88
+
89
+ _JSONVALUE_ = TypeVar("_JSONVALUE_")
90
+
91
+ _T2 = TypeVar("_T2")
92
+
93
+ _T1 = TypeVar("_T1")
94
+
95
+ _T3 = TypeVar("_T3")
96
+
97
+ _T4 = TypeVar("_T4")
98
+
99
+ _T5 = TypeVar("_T5")
100
+
101
+ _T6 = TypeVar("_T6")
102
+
103
+ _T7 = TypeVar("_T7")
104
+
105
+ _T8 = TypeVar("_T8")
106
+
107
+ _KEY_ = TypeVar("_KEY_")
108
+
109
+ _KEY = TypeVar("_KEY")
110
+
111
+ def Helpers_prependPath(path: str, err_: str, err__1: ErrorReason_1[Any]) -> tuple[str, ErrorReason_1[_JSONVALUE]]:
112
+ err: tuple[str, ErrorReason_1[_JSONVALUE]] = (err_, err__1)
113
+ return (path + err[0], err[1])
114
+
115
+
116
+ def generic_msg(helpers: IDecoderHelpers_1[Any], msg: str, value_1: Any, new_line: bool) -> str:
117
+ try:
118
+ return ((("Expecting " + msg) + " but instead got:") + ("\n" if new_line else " ")) + helpers.any_to_string(value_1)
119
+
120
+ except Exception as match_value:
121
+ return (("Expecting " + msg) + " but decoder failed. Couldn\'t report given value due to circular structure.") + ("\n" if new_line else " ")
122
+
123
+
124
+
125
+ def error_to_string(helpers: IDecoderHelpers_1[Any], path: str, error: ErrorReason_1[Any]) -> str:
126
+ def mapping(error_1: tuple[str, ErrorReason_1[_JSONVALUE]], helpers: Any=helpers, path: Any=path, error: Any=error) -> str:
127
+ tupled_arg: tuple[str, ErrorReason_1[_JSONVALUE]] = Helpers_prependPath(path, error_1[0], error_1[1])
128
+ return error_to_string(helpers, tupled_arg[0], tupled_arg[1])
129
+
130
+ reason_1: str = generic_msg(helpers, error.fields[0], error.fields[1], True) if (error.tag == 2) else (((generic_msg(helpers, error.fields[0], error.fields[1], False) + "\nReason: ") + error.fields[2]) if (error.tag == 1) else (generic_msg(helpers, error.fields[0], error.fields[1], True) if (error.tag == 3) else ((generic_msg(helpers, error.fields[0], error.fields[1], True) + (("\nNode `" + error.fields[2]) + "` is unkown.")) if (error.tag == 4) else (((("Expecting " + error.fields[0]) + ".\n") + helpers.any_to_string(error.fields[1])) if (error.tag == 5) else (("The following errors were found:\n\n" + join("\n\n", map_1(mapping, error.fields[0]))) if (error.tag == 7) else (("The following `failure` occurred with the decoder: " + error.fields[0]) if (error.tag == 6) else generic_msg(helpers, error.fields[0], error.fields[1], False)))))))
131
+ if error.tag == 7:
132
+ return reason_1
133
+
134
+ else:
135
+ return (("Error at: `" + path) + "`\n") + reason_1
136
+
137
+
138
+
139
+ def Advanced_fromValue(helpers: IDecoderHelpers_1[Any], decoder: Decoder_1[Any], value_1: Any) -> FSharpResult_2[Any, str]:
140
+ match_value: FSharpResult_2[_T, tuple[str, ErrorReason_1[_JSONVALUE]]] = decoder.Decode(helpers, value_1)
141
+ if match_value.tag == 1:
142
+ error: tuple[str, ErrorReason_1[_JSONVALUE]] = match_value.fields[0]
143
+ return FSharpResult_2(1, error_to_string(helpers, error[0], error[1]))
144
+
145
+ else:
146
+ return FSharpResult_2(0, match_value.fields[0])
147
+
148
+
149
+
150
+ class ObjectExpr283(Decoder_1[str]):
151
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any) -> FSharpResult_2[str, tuple[str, ErrorReason_1[__A_]]]:
152
+ return FSharpResult_2(0, helpers.as_string(value_1)) if helpers.is_string(value_1) else FSharpResult_2(1, ("", ErrorReason_1(0, "a string", value_1)))
153
+
154
+
155
+ string: Decoder_1[str] = ObjectExpr283()
156
+
157
+ class ObjectExpr284(Decoder_1[str]):
158
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any) -> FSharpResult_2[str, tuple[str, ErrorReason_1[__A_]]]:
159
+ if helpers.is_string(value_1):
160
+ str_1: str = helpers.as_string(value_1)
161
+ return FSharpResult_2(0, str_1[0]) if (len(str_1) == 1) else FSharpResult_2(1, ("", ErrorReason_1(0, "a single character string", value_1)))
162
+
163
+ else:
164
+ return FSharpResult_2(1, ("", ErrorReason_1(0, "a char", value_1)))
165
+
166
+
167
+
168
+ char: Decoder_1[str] = ObjectExpr284()
169
+
170
+ class ObjectExpr287(Decoder_1[str]):
171
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any) -> FSharpResult_2[str, tuple[str, ErrorReason_1[__A_]]]:
172
+ if helpers.is_string(value_1):
173
+ match_value: tuple[bool, str]
174
+ out_arg: str = "00000000-0000-0000-0000-000000000000"
175
+ def _arrow285(__unit: None=None) -> str:
176
+ return out_arg
177
+
178
+ def _arrow286(v: str) -> None:
179
+ nonlocal out_arg
180
+ out_arg = v
181
+
182
+ match_value = (try_parse_1(helpers.as_string(value_1), FSharpRef(_arrow285, _arrow286)), out_arg)
183
+ return FSharpResult_2(0, match_value[1]) if match_value[0] else FSharpResult_2(1, ("", ErrorReason_1(0, "a guid", value_1)))
184
+
185
+ else:
186
+ return FSharpResult_2(1, ("", ErrorReason_1(0, "a guid", value_1)))
187
+
188
+
189
+
190
+ guid: Decoder_1[str] = ObjectExpr287()
191
+
192
+ class ObjectExpr288(Decoder_1[None]):
193
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any) -> FSharpResult_2[None, tuple[str, ErrorReason_1[__A_]]]:
194
+ return FSharpResult_2(0, None) if helpers.is_null_value(value_1) else FSharpResult_2(1, ("", ErrorReason_1(0, "null", value_1)))
195
+
196
+
197
+ unit: Decoder_1[None] = ObjectExpr288()
198
+
199
+ class ObjectExpr291(Decoder_1[int8]):
200
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_2: Any) -> FSharpResult_2[int8, tuple[str, ErrorReason_1[__A_]]]:
201
+ if helpers.is_number(value_2):
202
+ if helpers.is_integral_value(value_2):
203
+ float_value: float = helpers.as_float(value_2)
204
+ return FSharpResult_2(0, (int(float_value) + 0x80 & 0xFF) - 0x80) if ((float_value <= int8(127)) if (int8(-128) <= float_value) else False) else FSharpResult_2(1, ("", ErrorReason_1(1, "a sbyte", value_2, "Value was either too large or too small for a sbyte")))
205
+
206
+ else:
207
+ return FSharpResult_2(1, ("", ErrorReason_1(1, "a sbyte", value_2, "Value is not an integral value")))
208
+
209
+
210
+ elif helpers.is_string(value_2):
211
+ match_value: tuple[bool, int8]
212
+ out_arg: int8 = int8(0) or 0
213
+ def _arrow289(__unit: None=None) -> int8:
214
+ return out_arg
215
+
216
+ def _arrow290(v: int8) -> None:
217
+ nonlocal out_arg
218
+ out_arg = v or 0
219
+
220
+ match_value = (try_parse_2(helpers.as_string(value_2), 511, False, 8, FSharpRef(_arrow289, _arrow290)), out_arg)
221
+ return FSharpResult_2(0, match_value[1]) if match_value[0] else FSharpResult_2(1, ("", ErrorReason_1(0, "a sbyte", value_2)))
222
+
223
+ else:
224
+ return FSharpResult_2(1, ("", ErrorReason_1(0, "a sbyte", value_2)))
225
+
226
+
227
+
228
+ sbyte: Decoder_1[int8] = ObjectExpr291()
229
+
230
+ class ObjectExpr294(Decoder_1[uint8]):
231
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_2: Any) -> FSharpResult_2[uint8, tuple[str, ErrorReason_1[__A_]]]:
232
+ if helpers.is_number(value_2):
233
+ if helpers.is_integral_value(value_2):
234
+ float_value: float = helpers.as_float(value_2)
235
+ return FSharpResult_2(0, int(float_value+0x100 if float_value < 0 else float_value) & 0xFF) if ((float_value <= uint8(255)) if (uint8(0) <= float_value) else False) else FSharpResult_2(1, ("", ErrorReason_1(1, "a byte", value_2, "Value was either too large or too small for a byte")))
236
+
237
+ else:
238
+ return FSharpResult_2(1, ("", ErrorReason_1(1, "a byte", value_2, "Value is not an integral value")))
239
+
240
+
241
+ elif helpers.is_string(value_2):
242
+ match_value: tuple[bool, uint8]
243
+ out_arg: uint8 = uint8(0)
244
+ def _arrow292(__unit: None=None) -> uint8:
245
+ return out_arg
246
+
247
+ def _arrow293(v: uint8) -> None:
248
+ nonlocal out_arg
249
+ out_arg = v
250
+
251
+ match_value = (try_parse_2(helpers.as_string(value_2), 511, True, 8, FSharpRef(_arrow292, _arrow293)), out_arg)
252
+ return FSharpResult_2(0, match_value[1]) if match_value[0] else FSharpResult_2(1, ("", ErrorReason_1(0, "a byte", value_2)))
253
+
254
+ else:
255
+ return FSharpResult_2(1, ("", ErrorReason_1(0, "a byte", value_2)))
256
+
257
+
258
+
259
+ byte: Decoder_1[uint8] = ObjectExpr294()
260
+
261
+ class ObjectExpr297(Decoder_1[int16_1]):
262
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_2: Any) -> FSharpResult_2[int16_1, tuple[str, ErrorReason_1[__A_]]]:
263
+ if helpers.is_number(value_2):
264
+ if helpers.is_integral_value(value_2):
265
+ float_value: float = helpers.as_float(value_2)
266
+ return FSharpResult_2(0, (int(float_value) + 0x8000 & 0xFFFF) - 0x8000) if ((float_value <= int16_1(32767)) if (int16_1(-32768) <= float_value) else False) else FSharpResult_2(1, ("", ErrorReason_1(1, "an int16", value_2, "Value was either too large or too small for an int16")))
267
+
268
+ else:
269
+ return FSharpResult_2(1, ("", ErrorReason_1(1, "an int16", value_2, "Value is not an integral value")))
270
+
271
+
272
+ elif helpers.is_string(value_2):
273
+ match_value: tuple[bool, int16_1]
274
+ out_arg: int16_1 = int16_1(0) or 0
275
+ def _arrow295(__unit: None=None) -> int16_1:
276
+ return out_arg
277
+
278
+ def _arrow296(v: int16_1) -> None:
279
+ nonlocal out_arg
280
+ out_arg = v or 0
281
+
282
+ match_value = (try_parse_2(helpers.as_string(value_2), 511, False, 16, FSharpRef(_arrow295, _arrow296)), out_arg)
283
+ return FSharpResult_2(0, match_value[1]) if match_value[0] else FSharpResult_2(1, ("", ErrorReason_1(0, "an int16", value_2)))
284
+
285
+ else:
286
+ return FSharpResult_2(1, ("", ErrorReason_1(0, "an int16", value_2)))
287
+
288
+
289
+
290
+ int16: Decoder_1[int16_1] = ObjectExpr297()
291
+
292
+ class ObjectExpr300(Decoder_1[uint16_1]):
293
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_2: Any) -> FSharpResult_2[uint16_1, tuple[str, ErrorReason_1[__A_]]]:
294
+ if helpers.is_number(value_2):
295
+ if helpers.is_integral_value(value_2):
296
+ float_value: float = helpers.as_float(value_2)
297
+ return FSharpResult_2(0, int(float_value+0x10000 if float_value < 0 else float_value) & 0xFFFF) if ((float_value <= uint16_1(65535)) if (uint16_1(0) <= float_value) else False) else FSharpResult_2(1, ("", ErrorReason_1(1, "an uint16", value_2, "Value was either too large or too small for an uint16")))
298
+
299
+ else:
300
+ return FSharpResult_2(1, ("", ErrorReason_1(1, "an uint16", value_2, "Value is not an integral value")))
301
+
302
+
303
+ elif helpers.is_string(value_2):
304
+ match_value: tuple[bool, uint16_1]
305
+ out_arg: uint16_1 = uint16_1(0)
306
+ def _arrow298(__unit: None=None) -> uint16_1:
307
+ return out_arg
308
+
309
+ def _arrow299(v: uint16_1) -> None:
310
+ nonlocal out_arg
311
+ out_arg = v
312
+
313
+ match_value = (try_parse_2(helpers.as_string(value_2), 511, True, 16, FSharpRef(_arrow298, _arrow299)), out_arg)
314
+ return FSharpResult_2(0, match_value[1]) if match_value[0] else FSharpResult_2(1, ("", ErrorReason_1(0, "an uint16", value_2)))
315
+
316
+ else:
317
+ return FSharpResult_2(1, ("", ErrorReason_1(0, "an uint16", value_2)))
318
+
319
+
320
+
321
+ uint16: Decoder_1[uint16_1] = ObjectExpr300()
322
+
323
+ class ObjectExpr304(Decoder_1[int]):
324
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_2: Any) -> FSharpResult_2[int, tuple[str, ErrorReason_1[__A_]]]:
325
+ if helpers.is_number(value_2):
326
+ if helpers.is_integral_value(value_2):
327
+ float_value: float = helpers.as_float(value_2)
328
+ return FSharpResult_2(0, int(float_value)) if ((float_value <= 2147483647) if (-2147483648 <= float_value) else False) else FSharpResult_2(1, ("", ErrorReason_1(1, "an int", value_2, "Value was either too large or too small for an int")))
329
+
330
+ else:
331
+ return FSharpResult_2(1, ("", ErrorReason_1(1, "an int", value_2, "Value is not an integral value")))
332
+
333
+
334
+ elif helpers.is_string(value_2):
335
+ match_value: tuple[bool, int]
336
+ out_arg: int = 0
337
+ def _arrow301(__unit: None=None) -> int:
338
+ return out_arg
339
+
340
+ def _arrow302(v: int) -> None:
341
+ nonlocal out_arg
342
+ out_arg = v or 0
343
+
344
+ match_value = (try_parse_2(helpers.as_string(value_2), 511, False, 32, FSharpRef(_arrow301, _arrow302)), out_arg)
345
+ return FSharpResult_2(0, match_value[1]) if match_value[0] else FSharpResult_2(1, ("", ErrorReason_1(0, "an int", value_2)))
346
+
347
+ else:
348
+ return FSharpResult_2(1, ("", ErrorReason_1(0, "an int", value_2)))
349
+
350
+
351
+
352
+ int_1: Decoder_1[int] = ObjectExpr304()
353
+
354
+ class ObjectExpr307(Decoder_1[uint32_1]):
355
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_2: Any) -> FSharpResult_2[uint32_1, tuple[str, ErrorReason_1[__A_]]]:
356
+ if helpers.is_number(value_2):
357
+ if helpers.is_integral_value(value_2):
358
+ float_value: float = helpers.as_float(value_2)
359
+ return FSharpResult_2(0, int(float_value+0x100000000 if float_value < 0 else float_value)) if ((float_value <= uint32_1(4294967295)) if (uint32_1(0) <= float_value) else False) else FSharpResult_2(1, ("", ErrorReason_1(1, "an uint32", value_2, "Value was either too large or too small for an uint32")))
360
+
361
+ else:
362
+ return FSharpResult_2(1, ("", ErrorReason_1(1, "an uint32", value_2, "Value is not an integral value")))
363
+
364
+
365
+ elif helpers.is_string(value_2):
366
+ match_value: tuple[bool, uint32_1]
367
+ out_arg: uint32_1 = uint32_1(0)
368
+ def _arrow305(__unit: None=None) -> uint32_1:
369
+ return out_arg
370
+
371
+ def _arrow306(v: uint32_1) -> None:
372
+ nonlocal out_arg
373
+ out_arg = v
374
+
375
+ match_value = (try_parse_2(helpers.as_string(value_2), 511, True, 32, FSharpRef(_arrow305, _arrow306)), out_arg)
376
+ return FSharpResult_2(0, match_value[1]) if match_value[0] else FSharpResult_2(1, ("", ErrorReason_1(0, "an uint32", value_2)))
377
+
378
+ else:
379
+ return FSharpResult_2(1, ("", ErrorReason_1(0, "an uint32", value_2)))
380
+
381
+
382
+
383
+ uint32: Decoder_1[uint32_1] = ObjectExpr307()
384
+
385
+ class ObjectExpr310(Decoder_1[int64_1]):
386
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_2: Any) -> FSharpResult_2[int64_1, tuple[str, ErrorReason_1[__A_]]]:
387
+ if helpers.is_number(value_2):
388
+ if helpers.is_integral_value(value_2):
389
+ float_value: float = helpers.as_float(value_2)
390
+ return FSharpResult_2(0, from_number(float_value, False)) if ((float_value <= to_number(int64_1(9223372036854775807))) if (to_number(int64_1(-9223372036854775808)) <= float_value) else False) else FSharpResult_2(1, ("", ErrorReason_1(1, "an int64", value_2, "Value was either too large or too small for an int64")))
391
+
392
+ else:
393
+ return FSharpResult_2(1, ("", ErrorReason_1(1, "an int64", value_2, "Value is not an integral value")))
394
+
395
+
396
+ elif helpers.is_string(value_2):
397
+ match_value: tuple[bool, int64_1]
398
+ out_arg: int64_1 = int64_1(0)
399
+ def _arrow308(__unit: None=None) -> int64_1:
400
+ return out_arg
401
+
402
+ def _arrow309(v: int64_1) -> None:
403
+ nonlocal out_arg
404
+ out_arg = v
405
+
406
+ match_value = (try_parse_3(helpers.as_string(value_2), 511, False, 64, FSharpRef(_arrow308, _arrow309)), out_arg)
407
+ return FSharpResult_2(0, match_value[1]) if match_value[0] else FSharpResult_2(1, ("", ErrorReason_1(0, "an int64", value_2)))
408
+
409
+ else:
410
+ return FSharpResult_2(1, ("", ErrorReason_1(0, "an int64", value_2)))
411
+
412
+
413
+
414
+ int64: Decoder_1[int64_1] = ObjectExpr310()
415
+
416
+ class ObjectExpr313(Decoder_1[uint64_1]):
417
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_2: Any) -> FSharpResult_2[uint64_1, tuple[str, ErrorReason_1[__A_]]]:
418
+ if helpers.is_number(value_2):
419
+ if helpers.is_integral_value(value_2):
420
+ float_value: float = helpers.as_float(value_2)
421
+ return FSharpResult_2(0, from_number(float_value, True)) if ((float_value <= to_number(uint64_1(18446744073709551615))) if (to_number(uint64_1(0)) <= float_value) else False) else FSharpResult_2(1, ("", ErrorReason_1(1, "an uint64", value_2, "Value was either too large or too small for an uint64")))
422
+
423
+ else:
424
+ return FSharpResult_2(1, ("", ErrorReason_1(1, "an uint64", value_2, "Value is not an integral value")))
425
+
426
+
427
+ elif helpers.is_string(value_2):
428
+ match_value: tuple[bool, uint64_1]
429
+ out_arg: uint64_1 = uint64_1(0)
430
+ def _arrow311(__unit: None=None) -> uint64_1:
431
+ return out_arg
432
+
433
+ def _arrow312(v: uint64_1) -> None:
434
+ nonlocal out_arg
435
+ out_arg = v
436
+
437
+ match_value = (try_parse_3(helpers.as_string(value_2), 511, True, 64, FSharpRef(_arrow311, _arrow312)), out_arg)
438
+ return FSharpResult_2(0, match_value[1]) if match_value[0] else FSharpResult_2(1, ("", ErrorReason_1(0, "an uint64", value_2)))
439
+
440
+ else:
441
+ return FSharpResult_2(1, ("", ErrorReason_1(0, "an uint64", value_2)))
442
+
443
+
444
+
445
+ uint64: Decoder_1[uint64_1] = ObjectExpr313()
446
+
447
+ class ObjectExpr316(Decoder_1[int]):
448
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any) -> FSharpResult_2[int, tuple[str, ErrorReason_1[__A_]]]:
449
+ if helpers.is_number(value_1):
450
+ return FSharpResult_2(0, from_int32(helpers.as_int(value_1)))
451
+
452
+ elif helpers.is_string(value_1):
453
+ parse_result: tuple[bool, int]
454
+ out_arg: int = from_int32(0)
455
+ def _arrow314(__unit: None=None) -> int:
456
+ return out_arg
457
+
458
+ def _arrow315(v: int) -> None:
459
+ nonlocal out_arg
460
+ out_arg = v
461
+
462
+ parse_result = (try_parse_4(helpers.as_string(value_1), FSharpRef(_arrow314, _arrow315)), out_arg)
463
+ return FSharpResult_2(0, parse_result[1]) if parse_result[0] else FSharpResult_2(1, ("", ErrorReason_1(0, "a bigint", value_1)))
464
+
465
+ else:
466
+ return FSharpResult_2(1, ("", ErrorReason_1(0, "a bigint", value_1)))
467
+
468
+
469
+
470
+ bigint: Decoder_1[int] = ObjectExpr316()
471
+
472
+ class ObjectExpr317(Decoder_1[bool]):
473
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any) -> FSharpResult_2[bool, tuple[str, ErrorReason_1[__A_]]]:
474
+ return FSharpResult_2(0, helpers.as_boolean(value_1)) if helpers.is_boolean(value_1) else FSharpResult_2(1, ("", ErrorReason_1(0, "a boolean", value_1)))
475
+
476
+
477
+ bool_1: Decoder_1[bool] = ObjectExpr317()
478
+
479
+ class ObjectExpr318(Decoder_1[float]):
480
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any) -> FSharpResult_2[float, tuple[str, ErrorReason_1[__A_]]]:
481
+ return FSharpResult_2(0, helpers.as_float(value_1)) if helpers.is_number(value_1) else FSharpResult_2(1, ("", ErrorReason_1(0, "a float", value_1)))
482
+
483
+
484
+ float_1: Decoder_1[float] = ObjectExpr318()
485
+
486
+ class ObjectExpr319(Decoder_1[float32_1]):
487
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any) -> FSharpResult_2[float32_1, tuple[str, ErrorReason_1[__A_]]]:
488
+ return FSharpResult_2(0, helpers.as_float32(value_1)) if helpers.is_number(value_1) else FSharpResult_2(1, ("", ErrorReason_1(0, "a float32", value_1)))
489
+
490
+
491
+ float32: Decoder_1[float32_1] = ObjectExpr319()
492
+
493
+ class ObjectExpr322(Decoder_1[Decimal]):
494
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any) -> FSharpResult_2[Decimal, tuple[str, ErrorReason_1[__A_]]]:
495
+ if helpers.is_number(value_1):
496
+ return FSharpResult_2(0, Decimal_1(helpers.as_float(value_1)))
497
+
498
+ elif helpers.is_string(value_1):
499
+ match_value: tuple[bool, Decimal]
500
+ out_arg: Decimal = Decimal_1(0)
501
+ def _arrow320(__unit: None=None) -> Decimal:
502
+ return out_arg
503
+
504
+ def _arrow321(v: Decimal) -> None:
505
+ nonlocal out_arg
506
+ out_arg = v
507
+
508
+ match_value = (try_parse_5(helpers.as_string(value_1), FSharpRef(_arrow320, _arrow321)), out_arg)
509
+ return FSharpResult_2(0, match_value[1]) if match_value[0] else FSharpResult_2(1, ("", ErrorReason_1(0, "a decimal", value_1)))
510
+
511
+ else:
512
+ return FSharpResult_2(1, ("", ErrorReason_1(0, "a decimal", value_1)))
513
+
514
+
515
+
516
+ decimal: Decoder_1[Decimal] = ObjectExpr322()
517
+
518
+ class ObjectExpr325(Decoder_1[Any]):
519
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any) -> FSharpResult_2[Any, tuple[str, ErrorReason_1[__A_]]]:
520
+ if helpers.is_string(value_1):
521
+ match_value: tuple[bool, Any]
522
+ out_arg: Any = min_value()
523
+ def _arrow323(__unit: None=None) -> Any:
524
+ return out_arg
525
+
526
+ def _arrow324(v: Any) -> None:
527
+ nonlocal out_arg
528
+ out_arg = v
529
+
530
+ match_value = (try_parse_6(helpers.as_string(value_1), FSharpRef(_arrow323, _arrow324)), out_arg)
531
+ return FSharpResult_2(0, match_value[1]) if match_value[0] else FSharpResult_2(1, ("", ErrorReason_1(0, "a datetime", value_1)))
532
+
533
+ else:
534
+ return FSharpResult_2(1, ("", ErrorReason_1(0, "a datetime", value_1)))
535
+
536
+
537
+
538
+ datetime_local: Decoder_1[Any] = ObjectExpr325()
539
+
540
+ class ObjectExpr328(Decoder_1[Any]):
541
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any) -> FSharpResult_2[Any, tuple[str, ErrorReason_1[__A_]]]:
542
+ if helpers.is_string(value_1):
543
+ match_value: tuple[bool, Any]
544
+ out_arg: Any = create(0)
545
+ def _arrow326(__unit: None=None) -> Any:
546
+ return out_arg
547
+
548
+ def _arrow327(v: Any) -> None:
549
+ nonlocal out_arg
550
+ out_arg = v
551
+
552
+ match_value = (try_parse_7(helpers.as_string(value_1), FSharpRef(_arrow326, _arrow327)), out_arg)
553
+ return FSharpResult_2(0, match_value[1]) if match_value[0] else FSharpResult_2(1, ("", ErrorReason_1(0, "a timespan", value_1)))
554
+
555
+ else:
556
+ return FSharpResult_2(1, ("", ErrorReason_1(0, "a timespan", value_1)))
557
+
558
+
559
+
560
+ timespan: Decoder_1[Any] = ObjectExpr328()
561
+
562
+ def decode_maybe_null(helpers: IDecoderHelpers_1[Any], path: str, decoder: Decoder_1[Any], value_1: Any) -> FSharpResult_2[Any | None, tuple[str, ErrorReason_1[_JSONVALUE]]]:
563
+ if helpers.is_null_value(value_1):
564
+ return FSharpResult_2(0, None)
565
+
566
+ else:
567
+ match_value: FSharpResult_2[_VALUE, tuple[str, ErrorReason_1[_JSONVALUE]]] = decoder.Decode(helpers, value_1)
568
+ if match_value.tag == 1:
569
+ def _arrow329(__unit: None=None, helpers: Any=helpers, path: Any=path, decoder: Any=decoder, value_1: Any=value_1) -> tuple[str, ErrorReason_1[_JSONVALUE]]:
570
+ tupled_arg: tuple[str, ErrorReason_1[_JSONVALUE]] = match_value.fields[0]
571
+ return Helpers_prependPath(path, tupled_arg[0], tupled_arg[1])
572
+
573
+ return FSharpResult_2(1, _arrow329())
574
+
575
+ else:
576
+ return FSharpResult_2(0, some(match_value.fields[0]))
577
+
578
+
579
+
580
+
581
+ def optional(field_name: str, decoder: Decoder_1[Any]) -> Decoder_1[Any | None]:
582
+ class ObjectExpr330(Decoder_1[_VALUE_ | None]):
583
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, field_name: Any=field_name, decoder: Any=decoder) -> FSharpResult_2[_VALUE_ | None, tuple[str, ErrorReason_1[__A_]]]:
584
+ return (decode_maybe_null(helpers, "." + field_name, decoder, helpers.get_property(field_name, value_1)) if helpers.has_property(field_name, value_1) else FSharpResult_2(0, None)) if helpers.is_object(value_1) else FSharpResult_2(1, ("", ErrorReason_1(2, "an object", value_1)))
585
+
586
+ return ObjectExpr330()
587
+
588
+
589
+ def bad_path_error(field_names: FSharpList[str], current_path: str | None, value_1: Any) -> FSharpResult_2[Any, tuple[str, ErrorReason_1[__A]]]:
590
+ return FSharpResult_2(1, ("." + default_arg(current_path, join(".", field_names)), ErrorReason_1(4, ("an object with path `" + join(".", field_names)) + "`", value_1, default_arg(try_last(field_names), ""))))
591
+
592
+
593
+ def map2(ctor: Callable[[_A, _B], _OUTPUT], d1: Decoder_1[Any], d2: Decoder_1[Any]) -> Decoder_1[Any]:
594
+ class ObjectExpr331(Decoder_1[_OUTPUT_]):
595
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, ctor: Any=ctor, d1: Any=d1, d2: Any=d2) -> FSharpResult_2[_OUTPUT_, tuple[str, ErrorReason_1[__C_]]]:
596
+ match_value: FSharpResult_2[_A_, tuple[str, ErrorReason_1[__C_]]] = d1.Decode(helpers, value_1)
597
+ match_value_1: FSharpResult_2[_B_, tuple[str, ErrorReason_1[__C_]]] = d2.Decode(helpers, value_1)
598
+ copy_of_struct: FSharpResult_2[_A_, tuple[str, ErrorReason_1[__C_]]] = match_value
599
+ if copy_of_struct.tag == 1:
600
+ return FSharpResult_2(1, copy_of_struct.fields[0])
601
+
602
+ else:
603
+ copy_of_struct_1: FSharpResult_2[_B_, tuple[str, ErrorReason_1[__C_]]] = match_value_1
604
+ return FSharpResult_2(1, copy_of_struct_1.fields[0]) if (copy_of_struct_1.tag == 1) else FSharpResult_2(0, ctor(copy_of_struct.fields[0], copy_of_struct_1.fields[0]))
605
+
606
+
607
+ return ObjectExpr331()
608
+
609
+
610
+ def optional_at(field_names: FSharpList[str], decoder: Decoder_1[Any]) -> Decoder_1[Any | None]:
611
+ class ObjectExpr332(Decoder_1[_VALUE_ | None]):
612
+ def Decode(self, helpers: IDecoderHelpers_1[Any], first_value: Any, field_names: Any=field_names, decoder: Any=decoder) -> FSharpResult_2[_VALUE_ | None, tuple[str, ErrorReason_1[__A_]]]:
613
+ def folder(tupled_arg: tuple[str, __A_, FSharpResult_2[_VALUE_ | None, tuple[str, ErrorReason_1[__A_]]] | None], field_1: str) -> tuple[str, __A_, FSharpResult_2[_VALUE_ | None, tuple[str, ErrorReason_1[__A_]]] | None]:
614
+ cur_path: str = tupled_arg[0]
615
+ cur_value: __A_ = tupled_arg[1]
616
+ res: FSharpResult_2[_VALUE_ | None, tuple[str, ErrorReason_1[__A_]]] | None = tupled_arg[2]
617
+ if res is None:
618
+ if helpers.is_null_value(cur_value):
619
+ return (cur_path, cur_value, FSharpResult_2(0, None))
620
+
621
+ elif helpers.is_object(cur_value):
622
+ if helpers.has_property(field_1, cur_value):
623
+ return ((cur_path + ".") + field_1, helpers.get_property(field_1, cur_value), None)
624
+
625
+ else:
626
+ return (cur_path, cur_value, FSharpResult_2(0, None))
627
+
628
+
629
+ else:
630
+ return (cur_path, cur_value, FSharpResult_2(1, (cur_path, ErrorReason_1(2, "an object", cur_value))))
631
+
632
+
633
+ else:
634
+ return (cur_path, cur_value, res)
635
+
636
+
637
+ _arg: tuple[str, __A_, FSharpResult_2[_VALUE_ | None, tuple[str, ErrorReason_1[__A_]]] | None] = fold(folder, ("", first_value, None), field_names)
638
+ if _arg[2] is None:
639
+ last_value: __A_ = _arg[1]
640
+ return FSharpResult_2(0, None) if helpers.is_null_value(last_value) else decode_maybe_null(helpers, _arg[0], decoder, last_value)
641
+
642
+ else:
643
+ return _arg[2]
644
+
645
+
646
+ return ObjectExpr332()
647
+
648
+
649
+ def field(field_name: str, decoder: Decoder_1[Any]) -> Decoder_1[Any]:
650
+ class ObjectExpr333(Decoder_1[_VALUE_]):
651
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, field_name: Any=field_name, decoder: Any=decoder) -> FSharpResult_2[_VALUE_, tuple[str, ErrorReason_1[__A_]]]:
652
+ if helpers.is_object(value_1):
653
+ if helpers.has_property(field_name, value_1):
654
+ field_value: __A_ = helpers.get_property(field_name, value_1)
655
+ path: str = "." + field_name
656
+ def mapping(tupled_arg: tuple[str, ErrorReason_1[__A_]]) -> tuple[str, ErrorReason_1[__A_]]:
657
+ return Helpers_prependPath(path, tupled_arg[0], tupled_arg[1])
658
+
659
+ return Result_MapError(mapping, decoder.Decode(helpers, field_value))
660
+
661
+ else:
662
+ return FSharpResult_2(1, ("", ErrorReason_1(3, ("an object with a field named `" + field_name) + "`", value_1)))
663
+
664
+
665
+ else:
666
+ return FSharpResult_2(1, ("", ErrorReason_1(2, "an object", value_1)))
667
+
668
+
669
+ return ObjectExpr333()
670
+
671
+
672
+ def at(field_names: FSharpList[str], decoder: Decoder_1[Any]) -> Decoder_1[Any]:
673
+ class ObjectExpr334(Decoder_1[_VALUE_]):
674
+ def Decode(self, helpers: IDecoderHelpers_1[Any], first_value: Any, field_names: Any=field_names, decoder: Any=decoder) -> FSharpResult_2[_VALUE_, tuple[str, ErrorReason_1[__A_]]]:
675
+ def folder(tupled_arg: tuple[str, __A_, FSharpResult_2[_VALUE_, tuple[str, ErrorReason_1[__A_]]] | None], field_1: str) -> tuple[str, __A_, FSharpResult_2[_VALUE_, tuple[str, ErrorReason_1[__A_]]] | None]:
676
+ cur_path: str = tupled_arg[0]
677
+ cur_value: __A_ = tupled_arg[1]
678
+ res: FSharpResult_2[_VALUE_, tuple[str, ErrorReason_1[__A_]]] | None = tupled_arg[2]
679
+ if res is None:
680
+ if helpers.is_null_value(cur_value):
681
+ return (cur_path, cur_value, bad_path_error(field_names, cur_path, first_value))
682
+
683
+ elif helpers.is_object(cur_value):
684
+ if helpers.has_property(field_1, cur_value):
685
+ return ((cur_path + ".") + field_1, helpers.get_property(field_1, cur_value), None)
686
+
687
+ else:
688
+ return (cur_path, cur_value, bad_path_error(field_names, None, first_value))
689
+
690
+
691
+ else:
692
+ return (cur_path, cur_value, FSharpResult_2(1, (cur_path, ErrorReason_1(2, "an object", cur_value))))
693
+
694
+
695
+ else:
696
+ return (cur_path, cur_value, res)
697
+
698
+
699
+ _arg: tuple[str, __A_, FSharpResult_2[_VALUE_, tuple[str, ErrorReason_1[__A_]]] | None] = fold(folder, ("", first_value, None), field_names)
700
+ def mapping(tupled_arg_1: tuple[str, ErrorReason_1[__A_]]) -> tuple[str, ErrorReason_1[__A_]]:
701
+ return Helpers_prependPath(_arg[0], tupled_arg_1[0], tupled_arg_1[1])
702
+
703
+ return Result_MapError(mapping, decoder.Decode(helpers, _arg[1])) if (_arg[2] is None) else _arg[2]
704
+
705
+ return ObjectExpr334()
706
+
707
+
708
+ def index(requested_index: int, decoder: Decoder_1[Any]) -> Decoder_1[Any]:
709
+ class ObjectExpr335(Decoder_1[_VALUE_]):
710
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, requested_index: Any=requested_index, decoder: Any=decoder) -> FSharpResult_2[_VALUE_, tuple[str, ErrorReason_1[__A_]]]:
711
+ if helpers.is_array(value_1):
712
+ v_array: Array[__A_] = helpers.as_array(value_1)
713
+ path: str = (".[" + int32_to_string(requested_index)) + "]"
714
+ def mapping(tupled_arg: tuple[str, ErrorReason_1[__A_]]) -> tuple[str, ErrorReason_1[__A_]]:
715
+ return Helpers_prependPath(path, tupled_arg[0], tupled_arg[1])
716
+
717
+ return Result_MapError(mapping, decoder.Decode(helpers, v_array[requested_index])) if (requested_index < len(v_array)) else FSharpResult_2(1, (path, ErrorReason_1(5, ((("a longer array. Need index `" + int32_to_string(requested_index)) + "` but there are only `") + int32_to_string(len(v_array))) + "` entries", value_1)))
718
+
719
+ else:
720
+ return FSharpResult_2(1, ("", ErrorReason_1(0, "an array", value_1)))
721
+
722
+
723
+ return ObjectExpr335()
724
+
725
+
726
+ def list_1(decoder: Decoder_1[Any]) -> Decoder_1[FSharpList[Any]]:
727
+ class ObjectExpr337(Decoder_1[FSharpList[_VALUE_]]):
728
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, decoder: Any=decoder) -> FSharpResult_2[FSharpList[_VALUE_], tuple[str, ErrorReason_1[__A_]]]:
729
+ if helpers.is_array(value_1):
730
+ tokens: Array[__A_] = helpers.as_array(value_1)
731
+ i: int = 0
732
+ result: FSharpList[_VALUE_] = empty()
733
+ error: tuple[str, ErrorReason_1[__A_]] | None = None
734
+ while (error is None) if (i < len(tokens)) else False:
735
+ value_2: __A_ = tokens[i]
736
+ match_value: FSharpResult_2[_VALUE_, tuple[str, ErrorReason_1[__A_]]] = decoder.Decode(helpers, value_2)
737
+ if match_value.tag == 1:
738
+ def _arrow336(__unit: None=None) -> tuple[str, ErrorReason_1[__A_]]:
739
+ tupled_arg: tuple[str, ErrorReason_1[__A_]] = match_value.fields[0]
740
+ return Helpers_prependPath((".[" + int32_to_string(i)) + "]", tupled_arg[0], tupled_arg[1])
741
+
742
+ x: tuple[str, ErrorReason_1[__A_]] | None = _arrow336()
743
+ error = x
744
+
745
+ else:
746
+ result = append(result, singleton(match_value.fields[0]))
747
+
748
+ i = (i + 1) or 0
749
+ return FSharpResult_2(0, result) if (error is None) else FSharpResult_2(1, value_7(error))
750
+
751
+ else:
752
+ return FSharpResult_2(1, ("", ErrorReason_1(0, "a list", value_1)))
753
+
754
+
755
+ return ObjectExpr337()
756
+
757
+
758
+ def resize_array(decoder: Decoder_1[Any]) -> Decoder_1[Array[Any]]:
759
+ class ObjectExpr339(Decoder_1[Array[_VALUE_]]):
760
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, decoder: Any=decoder) -> FSharpResult_2[Array[_VALUE_], tuple[str, ErrorReason_1[__A_]]]:
761
+ if helpers.is_array(value_1):
762
+ tokens: Array[__A_] = helpers.as_array(value_1)
763
+ i: int = 0
764
+ result: Array[_VALUE_] = []
765
+ error: tuple[str, ErrorReason_1[__A_]] | None = None
766
+ while (error is None) if (i < len(tokens)) else False:
767
+ value_2: __A_ = tokens[i]
768
+ match_value: FSharpResult_2[_VALUE_, tuple[str, ErrorReason_1[__A_]]] = decoder.Decode(helpers, value_2)
769
+ if match_value.tag == 1:
770
+ def _arrow338(__unit: None=None) -> tuple[str, ErrorReason_1[__A_]]:
771
+ tupled_arg: tuple[str, ErrorReason_1[__A_]] = match_value.fields[0]
772
+ return Helpers_prependPath((".[" + int32_to_string(i)) + "]", tupled_arg[0], tupled_arg[1])
773
+
774
+ error = _arrow338()
775
+
776
+ else:
777
+ (result.append(match_value.fields[0]))
778
+
779
+ i = (i + 1) or 0
780
+ return FSharpResult_2(0, list(result)) if (error is None) else FSharpResult_2(1, value_7(error))
781
+
782
+ else:
783
+ return FSharpResult_2(1, ("", ErrorReason_1(0, "a ResizeArray", value_1)))
784
+
785
+
786
+ return ObjectExpr339()
787
+
788
+
789
+ def seq(decoder: Decoder_1[Any]) -> Decoder_1[IEnumerable_1[Any]]:
790
+ class ObjectExpr341(Decoder_1[IEnumerable_1[_VALUE_]]):
791
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, decoder: Any=decoder) -> FSharpResult_2[IEnumerable_1[_VALUE_], tuple[str, ErrorReason_1[__A_]]]:
792
+ if helpers.is_array(value_1):
793
+ i: int = -1
794
+ def folder(acc: FSharpResult_2[IEnumerable_1[_VALUE_], tuple[str, ErrorReason_1[__A_]]], value_2: __A_) -> FSharpResult_2[IEnumerable_1[_VALUE_], tuple[str, ErrorReason_1[__A_]]]:
795
+ nonlocal i
796
+ i = (i + 1) or 0
797
+ if acc.tag == 0:
798
+ match_value: FSharpResult_2[_VALUE_, tuple[str, ErrorReason_1[__A_]]] = decoder.Decode(helpers, value_2)
799
+ if match_value.tag == 0:
800
+ return FSharpResult_2(0, append_1(to_enumerable([match_value.fields[0]]), acc.fields[0]))
801
+
802
+ else:
803
+ def _arrow340(__unit: None=None, acc: Any=acc, value_2: Any=value_2) -> tuple[str, ErrorReason_1[__A_]]:
804
+ tupled_arg: tuple[str, ErrorReason_1[__A_]] = match_value.fields[0]
805
+ return Helpers_prependPath((".[" + int32_to_string(i)) + "]", tupled_arg[0], tupled_arg[1])
806
+
807
+ return FSharpResult_2(1, _arrow340())
808
+
809
+
810
+ else:
811
+ return acc
812
+
813
+
814
+ return Result_Map(reverse, fold_1(folder, FSharpResult_2(0, to_enumerable([])), helpers.as_array(value_1)))
815
+
816
+ else:
817
+ return FSharpResult_2(1, ("", ErrorReason_1(0, "a seq", value_1)))
818
+
819
+
820
+ return ObjectExpr341()
821
+
822
+
823
+ def array(decoder: Decoder_1[Any]) -> Decoder_1[Array[Any]]:
824
+ class ObjectExpr343(Decoder_1[Array[_VALUE_]]):
825
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, decoder: Any=decoder) -> FSharpResult_2[Array[_VALUE_], tuple[str, ErrorReason_1[__A_]]]:
826
+ if helpers.is_array(value_1):
827
+ i: int = -1
828
+ tokens: Array[__A_] = helpers.as_array(value_1)
829
+ def folder(acc: FSharpResult_2[Array[_VALUE_], tuple[str, ErrorReason_1[__A_]]], value_2: __A_) -> FSharpResult_2[Array[_VALUE_], tuple[str, ErrorReason_1[__A_]]]:
830
+ nonlocal i
831
+ i = (i + 1) or 0
832
+ if acc.tag == 0:
833
+ acc_1: Array[_VALUE_] = acc.fields[0]
834
+ match_value: FSharpResult_2[_VALUE_, tuple[str, ErrorReason_1[__A_]]] = decoder.Decode(helpers, value_2)
835
+ if match_value.tag == 0:
836
+ acc_1[i] = match_value.fields[0]
837
+ return FSharpResult_2(0, acc_1)
838
+
839
+ else:
840
+ def _arrow342(__unit: None=None, acc: Any=acc, value_2: Any=value_2) -> tuple[str, ErrorReason_1[__A_]]:
841
+ tupled_arg: tuple[str, ErrorReason_1[__A_]] = match_value.fields[0]
842
+ return Helpers_prependPath((".[" + int32_to_string(i)) + "]", tupled_arg[0], tupled_arg[1])
843
+
844
+ return FSharpResult_2(1, _arrow342())
845
+
846
+
847
+ else:
848
+ return acc
849
+
850
+
851
+ return fold_1(folder, FSharpResult_2(0, fill([0] * len(tokens), 0, len(tokens), None)), tokens)
852
+
853
+ else:
854
+ return FSharpResult_2(1, ("", ErrorReason_1(0, "an array", value_1)))
855
+
856
+
857
+ return ObjectExpr343()
858
+
859
+
860
+ class ObjectExpr344(Decoder_1[FSharpList[str]]):
861
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any) -> FSharpResult_2[FSharpList[str], tuple[str, ErrorReason_1[__A_]]]:
862
+ return FSharpResult_2(0, of_seq(helpers.get_properties(value_1))) if helpers.is_object(value_1) else FSharpResult_2(1, ("", ErrorReason_1(0, "an object", value_1)))
863
+
864
+
865
+ keys: Decoder_1[FSharpList[str]] = ObjectExpr344()
866
+
867
+ def key_value_pairs(decoder: Decoder_1[Any]) -> Decoder_1[FSharpList[tuple[str, _VALUE]]]:
868
+ class ObjectExpr345(Decoder_1[FSharpList[tuple[str, _VALUE_]]]):
869
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, decoder: Any=decoder) -> FSharpResult_2[FSharpList[tuple[str, _VALUE_]], tuple[str, ErrorReason_1[__A_]]]:
870
+ match_value: FSharpResult_2[FSharpList[str], tuple[str, ErrorReason_1[__A_]]] = keys.Decode(helpers, value_1)
871
+ def folder(acc: FSharpResult_2[FSharpList[tuple[str, _VALUE_]], tuple[str, ErrorReason_1[__A_]]], prop: str) -> FSharpResult_2[FSharpList[tuple[str, _VALUE_]], tuple[str, ErrorReason_1[__A_]]]:
872
+ if acc.tag == 0:
873
+ field_value: __A_ = helpers.get_property(prop, value_1)
874
+ match_value_1: FSharpResult_2[_VALUE_, tuple[str, ErrorReason_1[__A_]]] = decoder.Decode(helpers, field_value)
875
+ if match_value_1.tag == 0:
876
+ return FSharpResult_2(0, cons((prop, match_value_1.fields[0]), acc.fields[0]))
877
+
878
+ else:
879
+ return FSharpResult_2(1, match_value_1.fields[0])
880
+
881
+
882
+ else:
883
+ return acc
884
+
885
+
886
+ return FSharpResult_2(1, match_value.fields[0]) if (match_value.tag == 1) else Result_Map(reverse_1, fold(folder, FSharpResult_2(0, empty()), match_value.fields[0]))
887
+
888
+ return ObjectExpr345()
889
+
890
+
891
+ def one_of(decoders: FSharpList[Decoder_1[Any]]) -> Decoder_1[Any]:
892
+ class ObjectExpr346(Decoder_1[_VALUE_]):
893
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, decoders: Any=decoders) -> FSharpResult_2[_VALUE_, tuple[str, ErrorReason_1[__A_]]]:
894
+ def runner(decoders_1_mut: FSharpList[Decoder_1[_VALUE_]], errors_mut: FSharpList[tuple[str, ErrorReason_1[__A_]]]) -> FSharpResult_2[_VALUE_, tuple[str, ErrorReason_1[__A_]]]:
895
+ while True:
896
+ (decoders_1, errors) = (decoders_1_mut, errors_mut)
897
+ if is_empty(decoders_1):
898
+ return FSharpResult_2(1, ("", ErrorReason_1(7, errors)))
899
+
900
+ else:
901
+ match_value: FSharpResult_2[_VALUE_, tuple[str, ErrorReason_1[__A_]]] = head_1(decoders_1).Decode(helpers, value_1)
902
+ if match_value.tag == 1:
903
+ decoders_1_mut = tail_1(decoders_1)
904
+ errors_mut = append(errors, singleton(match_value.fields[0]))
905
+ continue
906
+
907
+ else:
908
+ return FSharpResult_2(0, match_value.fields[0])
909
+
910
+
911
+ break
912
+
913
+ return runner(decoders, empty())
914
+
915
+ return ObjectExpr346()
916
+
917
+
918
+ def nil(output: Any | None=None) -> Decoder_1[Any]:
919
+ class ObjectExpr347(Decoder_1[_A_]):
920
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, output: Any=output) -> FSharpResult_2[_A_, tuple[str, ErrorReason_1[__B_]]]:
921
+ return FSharpResult_2(0, output) if helpers.is_null_value(value_1) else FSharpResult_2(1, ("", ErrorReason_1(0, "null", value_1)))
922
+
923
+ return ObjectExpr347()
924
+
925
+
926
+ def value(_arg: Any, v: Any) -> FSharpResult_2[Any, Any]:
927
+ return FSharpResult_2(0, v)
928
+
929
+
930
+ def succeed(output: Any | None=None) -> Decoder_1[Any]:
931
+ class ObjectExpr348(Decoder_1[_A_]):
932
+ def Decode(self, _arg: IDecoderHelpers_1[Any], _arg_1: Any, output: Any=output) -> FSharpResult_2[_A_, tuple[str, ErrorReason_1[__B_]]]:
933
+ return FSharpResult_2(0, output)
934
+
935
+ return ObjectExpr348()
936
+
937
+
938
+ def fail(msg: str) -> Decoder_1[Any]:
939
+ class ObjectExpr349(Decoder_1[_A_]):
940
+ def Decode(self, _arg: IDecoderHelpers_1[Any], _arg_1: Any, msg: Any=msg) -> FSharpResult_2[_A_, tuple[str, ErrorReason_1[__B_]]]:
941
+ return FSharpResult_2(1, ("", ErrorReason_1(6, msg)))
942
+
943
+ return ObjectExpr349()
944
+
945
+
946
+ def and_then(cb: Callable[[_A], Decoder_1[_B]], decoder: Decoder_1[Any]) -> Decoder_1[Any]:
947
+ class ObjectExpr350(Decoder_1[_B_]):
948
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, cb: Any=cb, decoder: Any=decoder) -> FSharpResult_2[_B_, tuple[str, ErrorReason_1[__C_]]]:
949
+ match_value: FSharpResult_2[_A_, tuple[str, ErrorReason_1[__C_]]] = decoder.Decode(helpers, value_1)
950
+ return cb(match_value.fields[0]).Decode(helpers, value_1) if (match_value.tag == 0) else FSharpResult_2(1, match_value.fields[0])
951
+
952
+ return ObjectExpr350()
953
+
954
+
955
+ def all(decoders: FSharpList[Decoder_1[Any]]) -> Decoder_1[FSharpList[Any]]:
956
+ class ObjectExpr351(Decoder_1[FSharpList[_A_]]):
957
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, decoders: Any=decoders) -> FSharpResult_2[FSharpList[_A_], tuple[str, ErrorReason_1[__B_]]]:
958
+ def runner(decoders_1_mut: FSharpList[Decoder_1[_A_]], values_mut: FSharpList[_A_]) -> FSharpResult_2[FSharpList[_A_], tuple[str, ErrorReason_1[__B_]]]:
959
+ while True:
960
+ (decoders_1, values) = (decoders_1_mut, values_mut)
961
+ if is_empty(decoders_1):
962
+ return FSharpResult_2(0, values)
963
+
964
+ else:
965
+ match_value: FSharpResult_2[_A_, tuple[str, ErrorReason_1[__B_]]] = head_1(decoders_1).Decode(helpers, value_1)
966
+ if match_value.tag == 1:
967
+ return FSharpResult_2(1, match_value.fields[0])
968
+
969
+ else:
970
+ decoders_1_mut = tail_1(decoders_1)
971
+ values_mut = append(values, singleton(match_value.fields[0]))
972
+ continue
973
+
974
+
975
+ break
976
+
977
+ return runner(decoders, empty())
978
+
979
+ return ObjectExpr351()
980
+
981
+
982
+ def map(ctor: Callable[[_A], _OUTPUT], d1: Decoder_1[Any]) -> Decoder_1[Any]:
983
+ class ObjectExpr352(Decoder_1[_OUTPUT_]):
984
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, ctor: Any=ctor, d1: Any=d1) -> FSharpResult_2[_OUTPUT_, tuple[str, ErrorReason_1[__B_]]]:
985
+ match_value: FSharpResult_2[_A_, tuple[str, ErrorReason_1[__B_]]] = d1.Decode(helpers, value_1)
986
+ return FSharpResult_2(1, match_value.fields[0]) if (match_value.tag == 1) else FSharpResult_2(0, ctor(match_value.fields[0]))
987
+
988
+ return ObjectExpr352()
989
+
990
+
991
+ def map3(ctor: Callable[[_A, _B, _C], _OUTPUT], d1: Decoder_1[Any], d2: Decoder_1[Any], d3: Decoder_1[Any]) -> Decoder_1[Any]:
992
+ class ObjectExpr353(Decoder_1[_OUTPUT_]):
993
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, ctor: Any=ctor, d1: Any=d1, d2: Any=d2, d3: Any=d3) -> FSharpResult_2[_OUTPUT_, tuple[str, ErrorReason_1[__D_]]]:
994
+ match_value: FSharpResult_2[_A_, tuple[str, ErrorReason_1[__D_]]] = d1.Decode(helpers, value_1)
995
+ match_value_1: FSharpResult_2[_B_, tuple[str, ErrorReason_1[__D_]]] = d2.Decode(helpers, value_1)
996
+ match_value_2: FSharpResult_2[_C_, tuple[str, ErrorReason_1[__D_]]] = d3.Decode(helpers, value_1)
997
+ copy_of_struct: FSharpResult_2[_A_, tuple[str, ErrorReason_1[__D_]]] = match_value
998
+ if copy_of_struct.tag == 1:
999
+ return FSharpResult_2(1, copy_of_struct.fields[0])
1000
+
1001
+ else:
1002
+ copy_of_struct_1: FSharpResult_2[_B_, tuple[str, ErrorReason_1[__D_]]] = match_value_1
1003
+ if copy_of_struct_1.tag == 1:
1004
+ return FSharpResult_2(1, copy_of_struct_1.fields[0])
1005
+
1006
+ else:
1007
+ copy_of_struct_2: FSharpResult_2[_C_, tuple[str, ErrorReason_1[__D_]]] = match_value_2
1008
+ return FSharpResult_2(1, copy_of_struct_2.fields[0]) if (copy_of_struct_2.tag == 1) else FSharpResult_2(0, ctor(copy_of_struct.fields[0], copy_of_struct_1.fields[0], copy_of_struct_2.fields[0]))
1009
+
1010
+
1011
+
1012
+ return ObjectExpr353()
1013
+
1014
+
1015
+ def map4(ctor: Callable[[_A, _B, _C, _D], _OUTPUT], d1: Decoder_1[Any], d2: Decoder_1[Any], d3: Decoder_1[Any], d4: Decoder_1[Any]) -> Decoder_1[Any]:
1016
+ class ObjectExpr354(Decoder_1[_OUTPUT_]):
1017
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, ctor: Any=ctor, d1: Any=d1, d2: Any=d2, d3: Any=d3, d4: Any=d4) -> FSharpResult_2[_OUTPUT_, tuple[str, ErrorReason_1[__E_]]]:
1018
+ match_value: FSharpResult_2[_A_, tuple[str, ErrorReason_1[__E_]]] = d1.Decode(helpers, value_1)
1019
+ match_value_1: FSharpResult_2[_B_, tuple[str, ErrorReason_1[__E_]]] = d2.Decode(helpers, value_1)
1020
+ match_value_2: FSharpResult_2[_C_, tuple[str, ErrorReason_1[__E_]]] = d3.Decode(helpers, value_1)
1021
+ match_value_3: FSharpResult_2[_D_, tuple[str, ErrorReason_1[__E_]]] = d4.Decode(helpers, value_1)
1022
+ copy_of_struct: FSharpResult_2[_A_, tuple[str, ErrorReason_1[__E_]]] = match_value
1023
+ if copy_of_struct.tag == 1:
1024
+ return FSharpResult_2(1, copy_of_struct.fields[0])
1025
+
1026
+ else:
1027
+ copy_of_struct_1: FSharpResult_2[_B_, tuple[str, ErrorReason_1[__E_]]] = match_value_1
1028
+ if copy_of_struct_1.tag == 1:
1029
+ return FSharpResult_2(1, copy_of_struct_1.fields[0])
1030
+
1031
+ else:
1032
+ copy_of_struct_2: FSharpResult_2[_C_, tuple[str, ErrorReason_1[__E_]]] = match_value_2
1033
+ if copy_of_struct_2.tag == 1:
1034
+ return FSharpResult_2(1, copy_of_struct_2.fields[0])
1035
+
1036
+ else:
1037
+ copy_of_struct_3: FSharpResult_2[_D_, tuple[str, ErrorReason_1[__E_]]] = match_value_3
1038
+ return FSharpResult_2(1, copy_of_struct_3.fields[0]) if (copy_of_struct_3.tag == 1) else FSharpResult_2(0, ctor(copy_of_struct.fields[0], copy_of_struct_1.fields[0], copy_of_struct_2.fields[0], copy_of_struct_3.fields[0]))
1039
+
1040
+
1041
+
1042
+
1043
+ return ObjectExpr354()
1044
+
1045
+
1046
+ def map5(ctor: Callable[[_A, _B, _C, _D, _E], _OUTPUT], d1: Decoder_1[Any], d2: Decoder_1[Any], d3: Decoder_1[Any], d4: Decoder_1[Any], d5: Decoder_1[Any]) -> Decoder_1[Any]:
1047
+ class ObjectExpr355(Decoder_1[_OUTPUT_]):
1048
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, ctor: Any=ctor, d1: Any=d1, d2: Any=d2, d3: Any=d3, d4: Any=d4, d5: Any=d5) -> FSharpResult_2[_OUTPUT_, tuple[str, ErrorReason_1[__F_]]]:
1049
+ match_value: FSharpResult_2[_A_, tuple[str, ErrorReason_1[__F_]]] = d1.Decode(helpers, value_1)
1050
+ match_value_1: FSharpResult_2[_B_, tuple[str, ErrorReason_1[__F_]]] = d2.Decode(helpers, value_1)
1051
+ match_value_2: FSharpResult_2[_C_, tuple[str, ErrorReason_1[__F_]]] = d3.Decode(helpers, value_1)
1052
+ match_value_3: FSharpResult_2[_D_, tuple[str, ErrorReason_1[__F_]]] = d4.Decode(helpers, value_1)
1053
+ match_value_4: FSharpResult_2[_E_, tuple[str, ErrorReason_1[__F_]]] = d5.Decode(helpers, value_1)
1054
+ copy_of_struct: FSharpResult_2[_A_, tuple[str, ErrorReason_1[__F_]]] = match_value
1055
+ if copy_of_struct.tag == 1:
1056
+ return FSharpResult_2(1, copy_of_struct.fields[0])
1057
+
1058
+ else:
1059
+ copy_of_struct_1: FSharpResult_2[_B_, tuple[str, ErrorReason_1[__F_]]] = match_value_1
1060
+ if copy_of_struct_1.tag == 1:
1061
+ return FSharpResult_2(1, copy_of_struct_1.fields[0])
1062
+
1063
+ else:
1064
+ copy_of_struct_2: FSharpResult_2[_C_, tuple[str, ErrorReason_1[__F_]]] = match_value_2
1065
+ if copy_of_struct_2.tag == 1:
1066
+ return FSharpResult_2(1, copy_of_struct_2.fields[0])
1067
+
1068
+ else:
1069
+ copy_of_struct_3: FSharpResult_2[_D_, tuple[str, ErrorReason_1[__F_]]] = match_value_3
1070
+ if copy_of_struct_3.tag == 1:
1071
+ return FSharpResult_2(1, copy_of_struct_3.fields[0])
1072
+
1073
+ else:
1074
+ copy_of_struct_4: FSharpResult_2[_E_, tuple[str, ErrorReason_1[__F_]]] = match_value_4
1075
+ return FSharpResult_2(1, copy_of_struct_4.fields[0]) if (copy_of_struct_4.tag == 1) else FSharpResult_2(0, ctor(copy_of_struct.fields[0], copy_of_struct_1.fields[0], copy_of_struct_2.fields[0], copy_of_struct_3.fields[0], copy_of_struct_4.fields[0]))
1076
+
1077
+
1078
+
1079
+
1080
+
1081
+ return ObjectExpr355()
1082
+
1083
+
1084
+ def map6(ctor: Callable[[_A, _B, _C, _D, _E, _F], _OUTPUT], d1: Decoder_1[Any], d2: Decoder_1[Any], d3: Decoder_1[Any], d4: Decoder_1[Any], d5: Decoder_1[Any], d6: Decoder_1[Any]) -> Decoder_1[Any]:
1085
+ class ObjectExpr356(Decoder_1[_OUTPUT_]):
1086
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, ctor: Any=ctor, d1: Any=d1, d2: Any=d2, d3: Any=d3, d4: Any=d4, d5: Any=d5, d6: Any=d6) -> FSharpResult_2[_OUTPUT_, tuple[str, ErrorReason_1[__G_]]]:
1087
+ match_value: FSharpResult_2[_A_, tuple[str, ErrorReason_1[__G_]]] = d1.Decode(helpers, value_1)
1088
+ match_value_1: FSharpResult_2[_B_, tuple[str, ErrorReason_1[__G_]]] = d2.Decode(helpers, value_1)
1089
+ match_value_2: FSharpResult_2[_C_, tuple[str, ErrorReason_1[__G_]]] = d3.Decode(helpers, value_1)
1090
+ match_value_3: FSharpResult_2[_D_, tuple[str, ErrorReason_1[__G_]]] = d4.Decode(helpers, value_1)
1091
+ match_value_4: FSharpResult_2[_E_, tuple[str, ErrorReason_1[__G_]]] = d5.Decode(helpers, value_1)
1092
+ match_value_5: FSharpResult_2[_F_, tuple[str, ErrorReason_1[__G_]]] = d6.Decode(helpers, value_1)
1093
+ copy_of_struct: FSharpResult_2[_A_, tuple[str, ErrorReason_1[__G_]]] = match_value
1094
+ if copy_of_struct.tag == 1:
1095
+ return FSharpResult_2(1, copy_of_struct.fields[0])
1096
+
1097
+ else:
1098
+ copy_of_struct_1: FSharpResult_2[_B_, tuple[str, ErrorReason_1[__G_]]] = match_value_1
1099
+ if copy_of_struct_1.tag == 1:
1100
+ return FSharpResult_2(1, copy_of_struct_1.fields[0])
1101
+
1102
+ else:
1103
+ copy_of_struct_2: FSharpResult_2[_C_, tuple[str, ErrorReason_1[__G_]]] = match_value_2
1104
+ if copy_of_struct_2.tag == 1:
1105
+ return FSharpResult_2(1, copy_of_struct_2.fields[0])
1106
+
1107
+ else:
1108
+ copy_of_struct_3: FSharpResult_2[_D_, tuple[str, ErrorReason_1[__G_]]] = match_value_3
1109
+ if copy_of_struct_3.tag == 1:
1110
+ return FSharpResult_2(1, copy_of_struct_3.fields[0])
1111
+
1112
+ else:
1113
+ copy_of_struct_4: FSharpResult_2[_E_, tuple[str, ErrorReason_1[__G_]]] = match_value_4
1114
+ if copy_of_struct_4.tag == 1:
1115
+ return FSharpResult_2(1, copy_of_struct_4.fields[0])
1116
+
1117
+ else:
1118
+ copy_of_struct_5: FSharpResult_2[_F_, tuple[str, ErrorReason_1[__G_]]] = match_value_5
1119
+ return FSharpResult_2(1, copy_of_struct_5.fields[0]) if (copy_of_struct_5.tag == 1) else FSharpResult_2(0, ctor(copy_of_struct.fields[0], copy_of_struct_1.fields[0], copy_of_struct_2.fields[0], copy_of_struct_3.fields[0], copy_of_struct_4.fields[0], copy_of_struct_5.fields[0]))
1120
+
1121
+
1122
+
1123
+
1124
+
1125
+
1126
+ return ObjectExpr356()
1127
+
1128
+
1129
+ def map7(ctor: Callable[[_A, _B, _C, _D, _E, _F, _G], _OUTPUT], d1: Decoder_1[Any], d2: Decoder_1[Any], d3: Decoder_1[Any], d4: Decoder_1[Any], d5: Decoder_1[Any], d6: Decoder_1[Any], d7: Decoder_1[Any]) -> Decoder_1[Any]:
1130
+ class ObjectExpr357(Decoder_1[_OUTPUT_]):
1131
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, ctor: Any=ctor, d1: Any=d1, d2: Any=d2, d3: Any=d3, d4: Any=d4, d5: Any=d5, d6: Any=d6, d7: Any=d7) -> FSharpResult_2[_OUTPUT_, tuple[str, ErrorReason_1[__H_]]]:
1132
+ match_value: FSharpResult_2[_A_, tuple[str, ErrorReason_1[__H_]]] = d1.Decode(helpers, value_1)
1133
+ match_value_1: FSharpResult_2[_B_, tuple[str, ErrorReason_1[__H_]]] = d2.Decode(helpers, value_1)
1134
+ match_value_2: FSharpResult_2[_C_, tuple[str, ErrorReason_1[__H_]]] = d3.Decode(helpers, value_1)
1135
+ match_value_3: FSharpResult_2[_D_, tuple[str, ErrorReason_1[__H_]]] = d4.Decode(helpers, value_1)
1136
+ match_value_4: FSharpResult_2[_E_, tuple[str, ErrorReason_1[__H_]]] = d5.Decode(helpers, value_1)
1137
+ match_value_5: FSharpResult_2[_F_, tuple[str, ErrorReason_1[__H_]]] = d6.Decode(helpers, value_1)
1138
+ match_value_6: FSharpResult_2[_G_, tuple[str, ErrorReason_1[__H_]]] = d7.Decode(helpers, value_1)
1139
+ copy_of_struct: FSharpResult_2[_A_, tuple[str, ErrorReason_1[__H_]]] = match_value
1140
+ if copy_of_struct.tag == 1:
1141
+ return FSharpResult_2(1, copy_of_struct.fields[0])
1142
+
1143
+ else:
1144
+ copy_of_struct_1: FSharpResult_2[_B_, tuple[str, ErrorReason_1[__H_]]] = match_value_1
1145
+ if copy_of_struct_1.tag == 1:
1146
+ return FSharpResult_2(1, copy_of_struct_1.fields[0])
1147
+
1148
+ else:
1149
+ copy_of_struct_2: FSharpResult_2[_C_, tuple[str, ErrorReason_1[__H_]]] = match_value_2
1150
+ if copy_of_struct_2.tag == 1:
1151
+ return FSharpResult_2(1, copy_of_struct_2.fields[0])
1152
+
1153
+ else:
1154
+ copy_of_struct_3: FSharpResult_2[_D_, tuple[str, ErrorReason_1[__H_]]] = match_value_3
1155
+ if copy_of_struct_3.tag == 1:
1156
+ return FSharpResult_2(1, copy_of_struct_3.fields[0])
1157
+
1158
+ else:
1159
+ copy_of_struct_4: FSharpResult_2[_E_, tuple[str, ErrorReason_1[__H_]]] = match_value_4
1160
+ if copy_of_struct_4.tag == 1:
1161
+ return FSharpResult_2(1, copy_of_struct_4.fields[0])
1162
+
1163
+ else:
1164
+ copy_of_struct_5: FSharpResult_2[_F_, tuple[str, ErrorReason_1[__H_]]] = match_value_5
1165
+ if copy_of_struct_5.tag == 1:
1166
+ return FSharpResult_2(1, copy_of_struct_5.fields[0])
1167
+
1168
+ else:
1169
+ copy_of_struct_6: FSharpResult_2[_G_, tuple[str, ErrorReason_1[__H_]]] = match_value_6
1170
+ return FSharpResult_2(1, copy_of_struct_6.fields[0]) if (copy_of_struct_6.tag == 1) else FSharpResult_2(0, ctor(copy_of_struct.fields[0], copy_of_struct_1.fields[0], copy_of_struct_2.fields[0], copy_of_struct_3.fields[0], copy_of_struct_4.fields[0], copy_of_struct_5.fields[0], copy_of_struct_6.fields[0]))
1171
+
1172
+
1173
+
1174
+
1175
+
1176
+
1177
+
1178
+ return ObjectExpr357()
1179
+
1180
+
1181
+ def map8(ctor: Callable[[_A, _B, _C, _D, _E, _F, _G, _H], _OUTPUT], d1: Decoder_1[Any], d2: Decoder_1[Any], d3: Decoder_1[Any], d4: Decoder_1[Any], d5: Decoder_1[Any], d6: Decoder_1[Any], d7: Decoder_1[Any], d8: Decoder_1[Any]) -> Decoder_1[Any]:
1182
+ class ObjectExpr358(Decoder_1[_OUTPUT_]):
1183
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, ctor: Any=ctor, d1: Any=d1, d2: Any=d2, d3: Any=d3, d4: Any=d4, d5: Any=d5, d6: Any=d6, d7: Any=d7, d8: Any=d8) -> FSharpResult_2[_OUTPUT_, tuple[str, ErrorReason_1[__I_]]]:
1184
+ match_value: FSharpResult_2[_A_, tuple[str, ErrorReason_1[__I_]]] = d1.Decode(helpers, value_1)
1185
+ match_value_1: FSharpResult_2[_B_, tuple[str, ErrorReason_1[__I_]]] = d2.Decode(helpers, value_1)
1186
+ match_value_2: FSharpResult_2[_C_, tuple[str, ErrorReason_1[__I_]]] = d3.Decode(helpers, value_1)
1187
+ match_value_3: FSharpResult_2[_D_, tuple[str, ErrorReason_1[__I_]]] = d4.Decode(helpers, value_1)
1188
+ match_value_4: FSharpResult_2[_E_, tuple[str, ErrorReason_1[__I_]]] = d5.Decode(helpers, value_1)
1189
+ match_value_5: FSharpResult_2[_F_, tuple[str, ErrorReason_1[__I_]]] = d6.Decode(helpers, value_1)
1190
+ match_value_6: FSharpResult_2[_G_, tuple[str, ErrorReason_1[__I_]]] = d7.Decode(helpers, value_1)
1191
+ match_value_7: FSharpResult_2[_H_, tuple[str, ErrorReason_1[__I_]]] = d8.Decode(helpers, value_1)
1192
+ copy_of_struct: FSharpResult_2[_A_, tuple[str, ErrorReason_1[__I_]]] = match_value
1193
+ if copy_of_struct.tag == 1:
1194
+ return FSharpResult_2(1, copy_of_struct.fields[0])
1195
+
1196
+ else:
1197
+ copy_of_struct_1: FSharpResult_2[_B_, tuple[str, ErrorReason_1[__I_]]] = match_value_1
1198
+ if copy_of_struct_1.tag == 1:
1199
+ return FSharpResult_2(1, copy_of_struct_1.fields[0])
1200
+
1201
+ else:
1202
+ copy_of_struct_2: FSharpResult_2[_C_, tuple[str, ErrorReason_1[__I_]]] = match_value_2
1203
+ if copy_of_struct_2.tag == 1:
1204
+ return FSharpResult_2(1, copy_of_struct_2.fields[0])
1205
+
1206
+ else:
1207
+ copy_of_struct_3: FSharpResult_2[_D_, tuple[str, ErrorReason_1[__I_]]] = match_value_3
1208
+ if copy_of_struct_3.tag == 1:
1209
+ return FSharpResult_2(1, copy_of_struct_3.fields[0])
1210
+
1211
+ else:
1212
+ copy_of_struct_4: FSharpResult_2[_E_, tuple[str, ErrorReason_1[__I_]]] = match_value_4
1213
+ if copy_of_struct_4.tag == 1:
1214
+ return FSharpResult_2(1, copy_of_struct_4.fields[0])
1215
+
1216
+ else:
1217
+ copy_of_struct_5: FSharpResult_2[_F_, tuple[str, ErrorReason_1[__I_]]] = match_value_5
1218
+ if copy_of_struct_5.tag == 1:
1219
+ return FSharpResult_2(1, copy_of_struct_5.fields[0])
1220
+
1221
+ else:
1222
+ copy_of_struct_6: FSharpResult_2[_G_, tuple[str, ErrorReason_1[__I_]]] = match_value_6
1223
+ if copy_of_struct_6.tag == 1:
1224
+ return FSharpResult_2(1, copy_of_struct_6.fields[0])
1225
+
1226
+ else:
1227
+ copy_of_struct_7: FSharpResult_2[_H_, tuple[str, ErrorReason_1[__I_]]] = match_value_7
1228
+ return FSharpResult_2(1, copy_of_struct_7.fields[0]) if (copy_of_struct_7.tag == 1) else FSharpResult_2(0, ctor(copy_of_struct.fields[0], copy_of_struct_1.fields[0], copy_of_struct_2.fields[0], copy_of_struct_3.fields[0], copy_of_struct_4.fields[0], copy_of_struct_5.fields[0], copy_of_struct_6.fields[0], copy_of_struct_7.fields[0]))
1229
+
1230
+
1231
+
1232
+
1233
+
1234
+
1235
+
1236
+
1237
+ return ObjectExpr358()
1238
+
1239
+
1240
+ def lossy_option(decoder: Decoder_1[Any]) -> Decoder_1[Any | None]:
1241
+ class ObjectExpr359(Decoder_1[_VALUE_ | None]):
1242
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, decoder: Any=decoder) -> FSharpResult_2[_VALUE_ | None, tuple[str, ErrorReason_1[__A_]]]:
1243
+ return FSharpResult_2(0, None) if helpers.is_null_value(value_1) else Result_Map(some, decoder.Decode(helpers, value_1))
1244
+
1245
+ return ObjectExpr359()
1246
+
1247
+
1248
+ def lossless_option(decoder: Decoder_1[Any]) -> Decoder_1[Any | None]:
1249
+ def cb_1(type_name: str, decoder: Any=decoder) -> Decoder_1[_VALUE | None]:
1250
+ if type_name == "option":
1251
+ def cb(state: str, type_name: Any=type_name) -> Decoder_1[_VALUE | None]:
1252
+ if state == "none":
1253
+ return succeed(None)
1254
+
1255
+ elif state == "some":
1256
+ def ctor(Value: _VALUE | None=None, state: Any=state) -> _VALUE | None:
1257
+ return some(Value)
1258
+
1259
+ return map(ctor, field("$value", decoder))
1260
+
1261
+ else:
1262
+ return fail("Expecting a state field with value \'none\' or \'some\' but got " + state)
1263
+
1264
+
1265
+ return and_then(cb, field("$case", string))
1266
+
1267
+ else:
1268
+ return fail("Expecting an Option type but got " + type_name)
1269
+
1270
+
1271
+ return and_then(cb_1, field("$type", string))
1272
+
1273
+
1274
+ def and_map(__unit: None=None) -> Callable[[Decoder_1[_A], Decoder_1[Callable[[_A], _B]]], Decoder_1[_B]]:
1275
+ def _arrow361(d: Decoder_1[_A]) -> Callable[[Decoder_1[Callable[[_A], _B]]], Decoder_1[_B]]:
1276
+ def _arrow360(d_1: Decoder_1[Callable[[_A], _B]]) -> Decoder_1[_B]:
1277
+ def ctor(arg: _A, func: Callable[[_A], _B]) -> _B:
1278
+ return func(arg)
1279
+
1280
+ return map2(ctor, d, d_1)
1281
+
1282
+ return _arrow360
1283
+
1284
+ return _arrow361
1285
+
1286
+
1287
+ class IRequiredGetter(Protocol):
1288
+ @abstractmethod
1289
+ def At(self, __arg0: FSharpList[str], __arg1: Decoder_1[_A]) -> _A:
1290
+ ...
1291
+
1292
+ @abstractmethod
1293
+ def Field(self, __arg0: str, __arg1: Decoder_1[_A]) -> _A:
1294
+ ...
1295
+
1296
+ @abstractmethod
1297
+ def Raw(self, __arg0: Decoder_1[_A]) -> _A:
1298
+ ...
1299
+
1300
+
1301
+ class IOptionalGetter(Protocol):
1302
+ @abstractmethod
1303
+ def At(self, __arg0: FSharpList[str], __arg1: Decoder_1[_A]) -> _A | None:
1304
+ ...
1305
+
1306
+ @abstractmethod
1307
+ def Field(self, __arg0: str, __arg1: Decoder_1[_A]) -> _A | None:
1308
+ ...
1309
+
1310
+ @abstractmethod
1311
+ def Raw(self, __arg0: Decoder_1[_A]) -> _A | None:
1312
+ ...
1313
+
1314
+
1315
+ class IGetters(Protocol):
1316
+ @property
1317
+ @abstractmethod
1318
+ def Optional(self) -> IOptionalGetter:
1319
+ ...
1320
+
1321
+ @property
1322
+ @abstractmethod
1323
+ def Required(self) -> IRequiredGetter:
1324
+ ...
1325
+
1326
+
1327
+ def unwrap_with(errors: Array[tuple[str, ErrorReason_1[_JSONVALUE]]], helpers: IDecoderHelpers_1[Any], decoder: Decoder_1[Any], value_1: Any) -> Any:
1328
+ match_value: FSharpResult_2[_T, tuple[str, ErrorReason_1[_JSONVALUE]]] = decoder.Decode(helpers, value_1)
1329
+ if match_value.tag == 1:
1330
+ (errors.append(match_value.fields[0]))
1331
+ return None
1332
+
1333
+ else:
1334
+ return match_value.fields[0]
1335
+
1336
+
1337
+
1338
+ def _expr366(gen0: TypeInfo, gen1: TypeInfo) -> TypeInfo:
1339
+ return class_type("Thoth.Json.Core.Decode.Getters`2", [gen0, gen1], Getters_2)
1340
+
1341
+
1342
+ class Getters_2(Generic[_JSONVALUE, _T]):
1343
+ def __init__(self, helpers: IDecoderHelpers_1[Any], value_1: Any) -> None:
1344
+ self.errors: Array[tuple[str, ErrorReason_1[_JSONVALUE]]] = []
1345
+ def _arrow363(__unit: None=None) -> IRequiredGetter:
1346
+ _this: Any = self
1347
+ class ObjectExpr362(IRequiredGetter):
1348
+ def Field(self, field_name: str, decoder: Decoder_1[Any]) -> Any:
1349
+ return unwrap_with(_this.errors, helpers, field(field_name, decoder), value_1)
1350
+
1351
+ def At(self, field_names: FSharpList[str], decoder_1: Decoder_1[Any]) -> Any:
1352
+ return unwrap_with(_this.errors, helpers, at(field_names, decoder_1), value_1)
1353
+
1354
+ def Raw(self, decoder_2: Decoder_1[Any]) -> Any:
1355
+ return unwrap_with(_this.errors, helpers, decoder_2, value_1)
1356
+
1357
+ return ObjectExpr362()
1358
+
1359
+ self.required: IRequiredGetter = _arrow363()
1360
+ def _arrow365(__unit: None=None) -> IOptionalGetter:
1361
+ _this_1: Any = self
1362
+ class ObjectExpr364(IOptionalGetter):
1363
+ def Field(self, field_name_1: str, decoder_3: Decoder_1[Any]) -> Any | None:
1364
+ return unwrap_with(_this_1.errors, helpers, optional(field_name_1, decoder_3), value_1)
1365
+
1366
+ def At(self, field_names_1: FSharpList[str], decoder_4: Decoder_1[Any]) -> Any | None:
1367
+ return unwrap_with(_this_1.errors, helpers, optional_at(field_names_1, decoder_4), value_1)
1368
+
1369
+ def Raw(self, decoder_5: Decoder_1[Any]) -> Any | None:
1370
+ match_value: FSharpResult_2[__A_, tuple[str, ErrorReason_1[_JSONVALUE_]]] = decoder_5.Decode(helpers, value_1)
1371
+ if match_value.tag == 1:
1372
+ reason: ErrorReason_1[_JSONVALUE_] = match_value.fields[0][1]
1373
+ error: tuple[str, ErrorReason_1[_JSONVALUE_]] = match_value.fields[0]
1374
+ (pattern_matching_result, v_1) = (None, None)
1375
+ if reason.tag == 1:
1376
+ pattern_matching_result = 0
1377
+ v_1 = reason.fields[1]
1378
+
1379
+ elif reason.tag == 2:
1380
+ pattern_matching_result = 0
1381
+ v_1 = reason.fields[1]
1382
+
1383
+ elif (reason.tag == 3) or (reason.tag == 4):
1384
+ pattern_matching_result = 1
1385
+
1386
+ elif ((reason.tag == 5) or (reason.tag == 6)) or (reason.tag == 7):
1387
+ pattern_matching_result = 2
1388
+
1389
+ else:
1390
+ pattern_matching_result = 0
1391
+ v_1 = reason.fields[1]
1392
+
1393
+ if pattern_matching_result == 0:
1394
+ if helpers.is_null_value(v_1):
1395
+ return None
1396
+
1397
+ else:
1398
+ (_this_1.errors.append(error))
1399
+ return None
1400
+
1401
+
1402
+ elif pattern_matching_result == 1:
1403
+ return None
1404
+
1405
+ elif pattern_matching_result == 2:
1406
+ (_this_1.errors.append(error))
1407
+ return None
1408
+
1409
+
1410
+ else:
1411
+ return some(match_value.fields[0])
1412
+
1413
+
1414
+ return ObjectExpr364()
1415
+
1416
+ self.optional: IOptionalGetter = _arrow365()
1417
+
1418
+ @property
1419
+ def Required(self, __unit: None=None) -> IRequiredGetter:
1420
+ __: Getters_2[_JSONVALUE, _T] = self
1421
+ return __.required
1422
+
1423
+ @property
1424
+ def Optional(self, __unit: None=None) -> IOptionalGetter:
1425
+ __: Getters_2[_JSONVALUE, _T] = self
1426
+ return __.optional
1427
+
1428
+
1429
+ Getters_2_reflection = _expr366
1430
+
1431
+ def Getters_2__ctor_Z4BE6C149(helpers: IDecoderHelpers_1[Any], value_1: Any) -> Getters_2[_JSONVALUE]:
1432
+ return Getters_2(helpers, value_1)
1433
+
1434
+
1435
+ def Getters_2__get_Errors(__: Getters_2[Any, Any]) -> FSharpList[tuple[str, ErrorReason_1[_JSONVALUE]]]:
1436
+ return to_list(__.errors)
1437
+
1438
+
1439
+ def object(builder: Callable[[IGetters], _VALUE]) -> Decoder_1[Any]:
1440
+ class ObjectExpr367(Decoder_1[_VALUE_]):
1441
+ def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, builder: Any=builder) -> FSharpResult_2[_VALUE_, tuple[str, ErrorReason_1[__A_]]]:
1442
+ getters: Getters_2[__A_, Any] = Getters_2__ctor_Z4BE6C149(helpers, value_1)
1443
+ result: _VALUE_ = builder(getters)
1444
+ match_value: FSharpList[tuple[str, ErrorReason_1[__A_]]] = Getters_2__get_Errors(getters)
1445
+ if not is_empty(match_value):
1446
+ errors: FSharpList[tuple[str, ErrorReason_1[__A_]]] = match_value
1447
+ return FSharpResult_2(1, ("", ErrorReason_1(7, errors))) if (length(errors) > 1) else FSharpResult_2(1, head_1(match_value))
1448
+
1449
+ else:
1450
+ return FSharpResult_2(0, result)
1451
+
1452
+
1453
+ return ObjectExpr367()
1454
+
1455
+
1456
+ def tuple2(decoder1: Decoder_1[Any], decoder2: Decoder_1[Any]) -> Decoder_1[tuple[_T1, _T2]]:
1457
+ def cb_1(v1: _T1 | None=None, decoder1: Any=decoder1, decoder2: Any=decoder2) -> Decoder_1[tuple[_T1, _T2]]:
1458
+ def cb(v2: _T2 | None=None, v1: Any=v1) -> Decoder_1[tuple[_T1, _T2]]:
1459
+ return succeed((v1, v2))
1460
+
1461
+ return and_then(cb, index(1, decoder2))
1462
+
1463
+ return and_then(cb_1, index(0, decoder1))
1464
+
1465
+
1466
+ def tuple3(decoder1: Decoder_1[Any], decoder2: Decoder_1[Any], decoder3: Decoder_1[Any]) -> Decoder_1[tuple[_T1, _T2, _T3]]:
1467
+ def cb_2(v1: _T1 | None=None, decoder1: Any=decoder1, decoder2: Any=decoder2, decoder3: Any=decoder3) -> Decoder_1[tuple[_T1, _T2, _T3]]:
1468
+ def cb_1(v2: _T2 | None=None, v1: Any=v1) -> Decoder_1[tuple[_T1, _T2, _T3]]:
1469
+ def cb(v3: _T3 | None=None, v2: Any=v2) -> Decoder_1[tuple[_T1, _T2, _T3]]:
1470
+ return succeed((v1, v2, v3))
1471
+
1472
+ return and_then(cb, index(2, decoder3))
1473
+
1474
+ return and_then(cb_1, index(1, decoder2))
1475
+
1476
+ return and_then(cb_2, index(0, decoder1))
1477
+
1478
+
1479
+ def tuple4(decoder1: Decoder_1[Any], decoder2: Decoder_1[Any], decoder3: Decoder_1[Any], decoder4: Decoder_1[Any]) -> Decoder_1[tuple[_T1, _T2, _T3, _T4]]:
1480
+ def cb_3(v1: _T1 | None=None, decoder1: Any=decoder1, decoder2: Any=decoder2, decoder3: Any=decoder3, decoder4: Any=decoder4) -> Decoder_1[tuple[_T1, _T2, _T3, _T4]]:
1481
+ def cb_2(v2: _T2 | None=None, v1: Any=v1) -> Decoder_1[tuple[_T1, _T2, _T3, _T4]]:
1482
+ def cb_1(v3: _T3 | None=None, v2: Any=v2) -> Decoder_1[tuple[_T1, _T2, _T3, _T4]]:
1483
+ def cb(v4: _T4 | None=None, v3: Any=v3) -> Decoder_1[tuple[_T1, _T2, _T3, _T4]]:
1484
+ return succeed((v1, v2, v3, v4))
1485
+
1486
+ return and_then(cb, index(3, decoder4))
1487
+
1488
+ return and_then(cb_1, index(2, decoder3))
1489
+
1490
+ return and_then(cb_2, index(1, decoder2))
1491
+
1492
+ return and_then(cb_3, index(0, decoder1))
1493
+
1494
+
1495
+ def tuple5(decoder1: Decoder_1[Any], decoder2: Decoder_1[Any], decoder3: Decoder_1[Any], decoder4: Decoder_1[Any], decoder5: Decoder_1[Any]) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5]]:
1496
+ def cb_4(v1: _T1 | None=None, decoder1: Any=decoder1, decoder2: Any=decoder2, decoder3: Any=decoder3, decoder4: Any=decoder4, decoder5: Any=decoder5) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5]]:
1497
+ def cb_3(v2: _T2 | None=None, v1: Any=v1) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5]]:
1498
+ def cb_2(v3: _T3 | None=None, v2: Any=v2) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5]]:
1499
+ def cb_1(v4: _T4 | None=None, v3: Any=v3) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5]]:
1500
+ def cb(v5: _T5 | None=None, v4: Any=v4) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5]]:
1501
+ return succeed((v1, v2, v3, v4, v5))
1502
+
1503
+ return and_then(cb, index(4, decoder5))
1504
+
1505
+ return and_then(cb_1, index(3, decoder4))
1506
+
1507
+ return and_then(cb_2, index(2, decoder3))
1508
+
1509
+ return and_then(cb_3, index(1, decoder2))
1510
+
1511
+ return and_then(cb_4, index(0, decoder1))
1512
+
1513
+
1514
+ def tuple6(decoder1: Decoder_1[Any], decoder2: Decoder_1[Any], decoder3: Decoder_1[Any], decoder4: Decoder_1[Any], decoder5: Decoder_1[Any], decoder6: Decoder_1[Any]) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6]]:
1515
+ def cb_5(v1: _T1 | None=None, decoder1: Any=decoder1, decoder2: Any=decoder2, decoder3: Any=decoder3, decoder4: Any=decoder4, decoder5: Any=decoder5, decoder6: Any=decoder6) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6]]:
1516
+ def cb_4(v2: _T2 | None=None, v1: Any=v1) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6]]:
1517
+ def cb_3(v3: _T3 | None=None, v2: Any=v2) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6]]:
1518
+ def cb_2(v4: _T4 | None=None, v3: Any=v3) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6]]:
1519
+ def cb_1(v5: _T5 | None=None, v4: Any=v4) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6]]:
1520
+ def cb(v6: _T6 | None=None, v5: Any=v5) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6]]:
1521
+ return succeed((v1, v2, v3, v4, v5, v6))
1522
+
1523
+ return and_then(cb, index(5, decoder6))
1524
+
1525
+ return and_then(cb_1, index(4, decoder5))
1526
+
1527
+ return and_then(cb_2, index(3, decoder4))
1528
+
1529
+ return and_then(cb_3, index(2, decoder3))
1530
+
1531
+ return and_then(cb_4, index(1, decoder2))
1532
+
1533
+ return and_then(cb_5, index(0, decoder1))
1534
+
1535
+
1536
+ def tuple7(decoder1: Decoder_1[Any], decoder2: Decoder_1[Any], decoder3: Decoder_1[Any], decoder4: Decoder_1[Any], decoder5: Decoder_1[Any], decoder6: Decoder_1[Any], decoder7: Decoder_1[Any]) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6, _T7]]:
1537
+ def cb_6(v1: _T1 | None=None, decoder1: Any=decoder1, decoder2: Any=decoder2, decoder3: Any=decoder3, decoder4: Any=decoder4, decoder5: Any=decoder5, decoder6: Any=decoder6, decoder7: Any=decoder7) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6, _T7]]:
1538
+ def cb_5(v2: _T2 | None=None, v1: Any=v1) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6, _T7]]:
1539
+ def cb_4(v3: _T3 | None=None, v2: Any=v2) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6, _T7]]:
1540
+ def cb_3(v4: _T4 | None=None, v3: Any=v3) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6, _T7]]:
1541
+ def cb_2(v5: _T5 | None=None, v4: Any=v4) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6, _T7]]:
1542
+ def cb_1(v6: _T6 | None=None, v5: Any=v5) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6, _T7]]:
1543
+ def cb(v7: _T7 | None=None, v6: Any=v6) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6, _T7]]:
1544
+ return succeed((v1, v2, v3, v4, v5, v6, v7))
1545
+
1546
+ return and_then(cb, index(6, decoder7))
1547
+
1548
+ return and_then(cb_1, index(5, decoder6))
1549
+
1550
+ return and_then(cb_2, index(4, decoder5))
1551
+
1552
+ return and_then(cb_3, index(3, decoder4))
1553
+
1554
+ return and_then(cb_4, index(2, decoder3))
1555
+
1556
+ return and_then(cb_5, index(1, decoder2))
1557
+
1558
+ return and_then(cb_6, index(0, decoder1))
1559
+
1560
+
1561
+ def tuple8(decoder1: Decoder_1[Any], decoder2: Decoder_1[Any], decoder3: Decoder_1[Any], decoder4: Decoder_1[Any], decoder5: Decoder_1[Any], decoder6: Decoder_1[Any], decoder7: Decoder_1[Any], decoder8: Decoder_1[Any]) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8]]:
1562
+ def cb_7(v1: _T1 | None=None, decoder1: Any=decoder1, decoder2: Any=decoder2, decoder3: Any=decoder3, decoder4: Any=decoder4, decoder5: Any=decoder5, decoder6: Any=decoder6, decoder7: Any=decoder7, decoder8: Any=decoder8) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8]]:
1563
+ def cb_6(v2: _T2 | None=None, v1: Any=v1) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8]]:
1564
+ def cb_5(v3: _T3 | None=None, v2: Any=v2) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8]]:
1565
+ def cb_4(v4: _T4 | None=None, v3: Any=v3) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8]]:
1566
+ def cb_3(v5: _T5 | None=None, v4: Any=v4) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8]]:
1567
+ def cb_2(v6: _T6 | None=None, v5: Any=v5) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8]]:
1568
+ def cb_1(v7: _T7 | None=None, v6: Any=v6) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8]]:
1569
+ def cb(v8: _T8 | None=None, v7: Any=v7) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8]]:
1570
+ return succeed((v1, v2, v3, v4, v5, v6, v7, v8))
1571
+
1572
+ return and_then(cb, index(7, decoder8))
1573
+
1574
+ return and_then(cb_1, index(6, decoder7))
1575
+
1576
+ return and_then(cb_2, index(5, decoder6))
1577
+
1578
+ return and_then(cb_3, index(4, decoder5))
1579
+
1580
+ return and_then(cb_4, index(3, decoder4))
1581
+
1582
+ return and_then(cb_5, index(2, decoder3))
1583
+
1584
+ return and_then(cb_6, index(1, decoder2))
1585
+
1586
+ return and_then(cb_7, index(0, decoder1))
1587
+
1588
+
1589
+ def dict_1(decoder: Decoder_1[Any]) -> Decoder_1[Any]:
1590
+ def _arrow369(elements: FSharpList[tuple[str, _VALUE]], decoder: Any=decoder) -> Any:
1591
+ class ObjectExpr368:
1592
+ @property
1593
+ def Compare(self) -> Callable[[str, str], int]:
1594
+ return compare_primitives
1595
+
1596
+ return of_list(elements, ObjectExpr368())
1597
+
1598
+ return map(_arrow369, key_value_pairs(decoder))
1599
+
1600
+
1601
+ def map_0027(key_decoder: Decoder_1[Any], value_decoder: Decoder_1[Any]) -> Decoder_1[Any]:
1602
+ def _arrow371(elements: Array[tuple[_KEY, _VALUE]], key_decoder: Any=key_decoder, value_decoder: Any=value_decoder) -> Any:
1603
+ class ObjectExpr370:
1604
+ @property
1605
+ def Compare(self) -> Callable[[_KEY_, _KEY_], int]:
1606
+ return compare
1607
+
1608
+ return of_seq_1(elements, ObjectExpr370())
1609
+
1610
+ return map(_arrow371, array(tuple2(key_decoder, value_decoder)))
1611
+
1612
+
1613
+ __all__ = ["Helpers_prependPath", "generic_msg", "error_to_string", "Advanced_fromValue", "string", "char", "guid", "unit", "sbyte", "byte", "int16", "uint16", "int_1", "uint32", "int64", "uint64", "bigint", "bool_1", "float_1", "float32", "decimal", "datetime_local", "timespan", "decode_maybe_null", "optional", "bad_path_error", "map2", "optional_at", "field", "at", "index", "list_1", "resize_array", "seq", "array", "keys", "key_value_pairs", "one_of", "nil", "value", "succeed", "fail", "and_then", "all", "map", "map3", "map4", "map5", "map6", "map7", "map8", "lossy_option", "lossless_option", "and_map", "unwrap_with", "Getters_2_reflection", "Getters_2__get_Errors", "object", "tuple2", "tuple3", "tuple4", "tuple5", "tuple6", "tuple7", "tuple8", "dict_1", "map_0027"]
1614
+