@sorrell/utilities 1.2.5 → 1.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (366) hide show
  1. package/Distribution/PackageExports.Generated.json +132 -0
  2. package/Distribution/Types/Array/Array.Internal.Types.d.cts +43 -0
  3. package/Distribution/Types/Array/Array.Internal.Types.d.cts.map +10 -0
  4. package/Distribution/Types/Array/Array.Internal.Types.d.mts +43 -0
  5. package/Distribution/Types/Array/Array.Internal.Types.d.mts.map +10 -0
  6. package/Distribution/Types/Array/Array.Internal.Types.d.ts +43 -0
  7. package/Distribution/Types/Array/Array.Internal.Types.d.ts.map +1 -0
  8. package/Distribution/Types/Array/Array.Internal.d.cts +16 -0
  9. package/Distribution/Types/Array/Array.Internal.d.cts.map +10 -0
  10. package/Distribution/Types/Array/Array.Internal.d.mts +16 -0
  11. package/Distribution/Types/Array/Array.Internal.d.mts.map +10 -0
  12. package/Distribution/Types/Array/Array.Internal.d.ts +16 -0
  13. package/Distribution/Types/Array/Array.Internal.d.ts.map +1 -0
  14. package/Distribution/Types/Array/Array.Types.d.cts +92 -0
  15. package/Distribution/Types/Array/Array.Types.d.cts.map +10 -0
  16. package/Distribution/Types/Array/Array.Types.d.mts +92 -0
  17. package/Distribution/Types/Array/Array.Types.d.mts.map +10 -0
  18. package/Distribution/Types/Array/Array.Types.d.ts +92 -0
  19. package/Distribution/Types/Array/Array.Types.d.ts.map +1 -0
  20. package/Distribution/Types/Array/Array.d.cts +33 -0
  21. package/Distribution/Types/Array/Array.d.cts.map +10 -0
  22. package/Distribution/Types/Array/Array.d.mts +33 -0
  23. package/Distribution/Types/Array/Array.d.mts.map +10 -0
  24. package/Distribution/Types/Array/Array.d.ts +33 -0
  25. package/Distribution/Types/Array/Array.d.ts.map +1 -0
  26. package/Distribution/Types/Array/index.d.cts +9 -0
  27. package/Distribution/Types/Array/index.d.cts.map +10 -0
  28. package/Distribution/Types/Array/index.d.mts +9 -0
  29. package/Distribution/Types/Array/index.d.mts.map +10 -0
  30. package/Distribution/Types/Array/index.d.ts +9 -0
  31. package/Distribution/Types/Array/index.d.ts.map +1 -0
  32. package/Distribution/Types/Async/Async.Types.d.cts +150 -0
  33. package/Distribution/Types/Async/Async.Types.d.cts.map +10 -0
  34. package/Distribution/Types/Async/Async.Types.d.mts +150 -0
  35. package/Distribution/Types/Async/Async.Types.d.mts.map +10 -0
  36. package/Distribution/Types/Async/Async.Types.d.ts +150 -0
  37. package/Distribution/Types/Async/Async.Types.d.ts.map +1 -0
  38. package/Distribution/Types/Async/Async.d.cts +145 -0
  39. package/Distribution/Types/Async/Async.d.cts.map +10 -0
  40. package/Distribution/Types/Async/Async.d.mts +145 -0
  41. package/Distribution/Types/Async/Async.d.mts.map +10 -0
  42. package/Distribution/Types/Async/Async.d.ts +145 -0
  43. package/Distribution/Types/Async/Async.d.ts.map +1 -0
  44. package/Distribution/Types/Async/index.d.cts +9 -0
  45. package/Distribution/Types/Async/index.d.cts.map +10 -0
  46. package/Distribution/Types/Async/index.d.mts +9 -0
  47. package/Distribution/Types/Async/index.d.mts.map +10 -0
  48. package/Distribution/Types/Async/index.d.ts +9 -0
  49. package/Distribution/Types/Async/index.d.ts.map +1 -0
  50. package/Distribution/Types/Dependency/Dependency.Internal.d.cts +9 -0
  51. package/Distribution/Types/Dependency/Dependency.Internal.d.cts.map +10 -0
  52. package/Distribution/Types/Dependency/Dependency.Internal.d.mts +9 -0
  53. package/Distribution/Types/Dependency/Dependency.Internal.d.mts.map +10 -0
  54. package/Distribution/Types/Dependency/Dependency.Internal.d.ts +9 -0
  55. package/Distribution/Types/Dependency/Dependency.Internal.d.ts.map +1 -0
  56. package/Distribution/Types/Dependency/Dependency.d.cts +65 -0
  57. package/Distribution/Types/Dependency/Dependency.d.cts.map +10 -0
  58. package/Distribution/Types/Dependency/Dependency.d.mts +65 -0
  59. package/Distribution/Types/Dependency/Dependency.d.mts.map +10 -0
  60. package/Distribution/Types/Dependency/Dependency.d.ts +65 -0
  61. package/Distribution/Types/Dependency/Dependency.d.ts.map +1 -0
  62. package/Distribution/Types/Dependency/index.d.cts +13 -0
  63. package/Distribution/Types/Dependency/index.d.cts.map +10 -0
  64. package/Distribution/Types/Dependency/index.d.mts +13 -0
  65. package/Distribution/Types/Dependency/index.d.mts.map +10 -0
  66. package/Distribution/Types/Dependency/index.d.ts +13 -0
  67. package/Distribution/Types/Dependency/index.d.ts.map +1 -0
  68. package/Distribution/Types/Effect/Effect.Types.d.cts +16 -0
  69. package/Distribution/Types/Effect/Effect.Types.d.cts.map +10 -0
  70. package/Distribution/Types/Effect/Effect.Types.d.mts +16 -0
  71. package/Distribution/Types/Effect/Effect.Types.d.mts.map +10 -0
  72. package/Distribution/Types/Effect/Effect.Types.d.ts +16 -0
  73. package/Distribution/Types/Effect/Effect.Types.d.ts.map +1 -0
  74. package/Distribution/Types/Effect/Effect.d.cts +8 -0
  75. package/Distribution/Types/Effect/Effect.d.cts.map +10 -0
  76. package/Distribution/Types/Effect/Effect.d.mts +8 -0
  77. package/Distribution/Types/Effect/Effect.d.mts.map +10 -0
  78. package/Distribution/Types/Effect/Effect.d.ts +8 -0
  79. package/Distribution/Types/Effect/Effect.d.ts.map +1 -0
  80. package/Distribution/Types/Effect/Index.Effect.d.cts +10 -0
  81. package/Distribution/Types/Effect/Index.Effect.d.cts.map +10 -0
  82. package/Distribution/Types/Effect/Index.Effect.d.mts +10 -0
  83. package/Distribution/Types/Effect/Index.Effect.d.mts.map +10 -0
  84. package/Distribution/Types/Effect/Index.Effect.d.ts +10 -0
  85. package/Distribution/Types/Effect/Index.Effect.d.ts.map +1 -0
  86. package/Distribution/Types/Effect/index.d.cts +8 -0
  87. package/Distribution/Types/Effect/index.d.cts.map +10 -0
  88. package/Distribution/Types/Effect/index.d.mts +8 -0
  89. package/Distribution/Types/Effect/index.d.mts.map +10 -0
  90. package/Distribution/Types/Effect/index.d.ts +8 -0
  91. package/Distribution/Types/Effect/index.d.ts.map +1 -0
  92. package/Distribution/Types/FileSystem/FileSystem.Types.d.cts +8 -0
  93. package/Distribution/Types/FileSystem/FileSystem.Types.d.cts.map +10 -0
  94. package/Distribution/Types/FileSystem/FileSystem.Types.d.mts +8 -0
  95. package/Distribution/Types/FileSystem/FileSystem.Types.d.mts.map +10 -0
  96. package/Distribution/Types/FileSystem/FileSystem.Types.d.ts +8 -0
  97. package/Distribution/Types/FileSystem/FileSystem.Types.d.ts.map +1 -0
  98. package/Distribution/Types/FileSystem/FileSystem.d.cts +55 -0
  99. package/Distribution/Types/FileSystem/FileSystem.d.cts.map +10 -0
  100. package/Distribution/Types/FileSystem/FileSystem.d.mts +55 -0
  101. package/Distribution/Types/FileSystem/FileSystem.d.mts.map +10 -0
  102. package/Distribution/Types/FileSystem/FileSystem.d.ts +55 -0
  103. package/Distribution/Types/FileSystem/FileSystem.d.ts.map +1 -0
  104. package/Distribution/Types/FileSystem/index.d.cts +9 -0
  105. package/Distribution/Types/FileSystem/index.d.cts.map +10 -0
  106. package/Distribution/Types/FileSystem/index.d.mts +9 -0
  107. package/Distribution/Types/FileSystem/index.d.mts.map +10 -0
  108. package/Distribution/Types/FileSystem/index.d.ts +9 -0
  109. package/Distribution/Types/FileSystem/index.d.ts.map +1 -0
  110. package/Distribution/Types/Functional/Functional.Internal.Types.d.cts +9 -0
  111. package/Distribution/Types/Functional/Functional.Internal.Types.d.cts.map +10 -0
  112. package/Distribution/Types/Functional/Functional.Internal.Types.d.mts +9 -0
  113. package/Distribution/Types/Functional/Functional.Internal.Types.d.mts.map +10 -0
  114. package/Distribution/Types/Functional/Functional.Internal.Types.d.ts +9 -0
  115. package/Distribution/Types/Functional/Functional.Internal.Types.d.ts.map +1 -0
  116. package/Distribution/Types/Functional/Functional.Internal.d.cts +8 -0
  117. package/Distribution/Types/Functional/Functional.Internal.d.cts.map +10 -0
  118. package/Distribution/Types/Functional/Functional.Internal.d.mts +8 -0
  119. package/Distribution/Types/Functional/Functional.Internal.d.mts.map +10 -0
  120. package/Distribution/Types/Functional/Functional.Internal.d.ts +8 -0
  121. package/Distribution/Types/Functional/Functional.Internal.d.ts.map +1 -0
  122. package/Distribution/Types/Functional/Functional.Types.d.cts +28 -0
  123. package/Distribution/Types/Functional/Functional.Types.d.cts.map +10 -0
  124. package/Distribution/Types/Functional/Functional.Types.d.mts +28 -0
  125. package/Distribution/Types/Functional/Functional.Types.d.mts.map +10 -0
  126. package/Distribution/Types/Functional/Functional.Types.d.ts +28 -0
  127. package/Distribution/Types/Functional/Functional.Types.d.ts.map +1 -0
  128. package/Distribution/Types/Functional/Functional.d.cts +8 -0
  129. package/Distribution/Types/Functional/Functional.d.cts.map +10 -0
  130. package/Distribution/Types/Functional/Functional.d.mts +8 -0
  131. package/Distribution/Types/Functional/Functional.d.mts.map +10 -0
  132. package/Distribution/Types/Functional/Functional.d.ts +8 -0
  133. package/Distribution/Types/Functional/Functional.d.ts.map +1 -0
  134. package/Distribution/Types/Functional/index.d.cts +9 -0
  135. package/Distribution/Types/Functional/index.d.cts.map +10 -0
  136. package/Distribution/Types/Functional/index.d.mts +9 -0
  137. package/Distribution/Types/Functional/index.d.mts.map +10 -0
  138. package/Distribution/Types/Functional/index.d.ts +9 -0
  139. package/Distribution/Types/Functional/index.d.ts.map +1 -0
  140. package/Distribution/Types/Math/Complex.Internal.d.cts +8 -0
  141. package/Distribution/Types/Math/Complex.Internal.d.cts.map +10 -0
  142. package/Distribution/Types/Math/Complex.Internal.d.mts +8 -0
  143. package/Distribution/Types/Math/Complex.Internal.d.mts.map +10 -0
  144. package/Distribution/Types/Math/Complex.Internal.d.ts +8 -0
  145. package/Distribution/Types/Math/Complex.Internal.d.ts.map +1 -0
  146. package/Distribution/Types/Math/Complex.Types.d.cts +69 -0
  147. package/Distribution/Types/Math/Complex.Types.d.cts.map +10 -0
  148. package/Distribution/Types/Math/Complex.Types.d.mts +69 -0
  149. package/Distribution/Types/Math/Complex.Types.d.mts.map +10 -0
  150. package/Distribution/Types/Math/Complex.Types.d.ts +69 -0
  151. package/Distribution/Types/Math/Complex.Types.d.ts.map +1 -0
  152. package/Distribution/Types/Math/Complex.d.cts +63 -0
  153. package/Distribution/Types/Math/Complex.d.cts.map +10 -0
  154. package/Distribution/Types/Math/Complex.d.mts +63 -0
  155. package/Distribution/Types/Math/Complex.d.mts.map +10 -0
  156. package/Distribution/Types/Math/Complex.d.ts +63 -0
  157. package/Distribution/Types/Math/Complex.d.ts.map +1 -0
  158. package/Distribution/Types/Math/Index.Complex.d.cts +9 -0
  159. package/Distribution/Types/Math/Index.Complex.d.cts.map +10 -0
  160. package/Distribution/Types/Math/Index.Complex.d.mts +9 -0
  161. package/Distribution/Types/Math/Index.Complex.d.mts.map +10 -0
  162. package/Distribution/Types/Math/Index.Complex.d.ts +9 -0
  163. package/Distribution/Types/Math/Index.Complex.d.ts.map +1 -0
  164. package/Distribution/Types/Math/Index.Experimental.d.cts +10 -0
  165. package/Distribution/Types/Math/Index.Experimental.d.cts.map +10 -0
  166. package/Distribution/Types/Math/Index.Experimental.d.mts +10 -0
  167. package/Distribution/Types/Math/Index.Experimental.d.mts.map +10 -0
  168. package/Distribution/Types/Math/Index.Experimental.d.ts +10 -0
  169. package/Distribution/Types/Math/Index.Experimental.d.ts.map +1 -0
  170. package/Distribution/Types/Math/Math.Internal.Types.d.cts +47 -0
  171. package/Distribution/Types/Math/Math.Internal.Types.d.cts.map +10 -0
  172. package/Distribution/Types/Math/Math.Internal.Types.d.mts +47 -0
  173. package/Distribution/Types/Math/Math.Internal.Types.d.mts.map +10 -0
  174. package/Distribution/Types/Math/Math.Internal.Types.d.ts +47 -0
  175. package/Distribution/Types/Math/Math.Internal.Types.d.ts.map +1 -0
  176. package/Distribution/Types/Math/Math.Types.d.cts +98 -0
  177. package/Distribution/Types/Math/Math.Types.d.cts.map +10 -0
  178. package/Distribution/Types/Math/Math.Types.d.mts +98 -0
  179. package/Distribution/Types/Math/Math.Types.d.mts.map +10 -0
  180. package/Distribution/Types/Math/Math.Types.d.ts +98 -0
  181. package/Distribution/Types/Math/Math.Types.d.ts.map +1 -0
  182. package/Distribution/Types/Math/Math.d.cts +8 -0
  183. package/Distribution/Types/Math/Math.d.cts.map +10 -0
  184. package/Distribution/Types/Math/Math.d.mts +8 -0
  185. package/Distribution/Types/Math/Math.d.mts.map +10 -0
  186. package/Distribution/Types/Math/Math.d.ts +8 -0
  187. package/Distribution/Types/Math/Math.d.ts.map +1 -0
  188. package/Distribution/Types/Math/Vector.d.cts +102 -0
  189. package/Distribution/Types/Math/Vector.d.cts.map +10 -0
  190. package/Distribution/Types/Math/Vector.d.mts +102 -0
  191. package/Distribution/Types/Math/Vector.d.mts.map +10 -0
  192. package/Distribution/Types/Math/Vector.d.ts +102 -0
  193. package/Distribution/Types/Math/Vector.d.ts.map +1 -0
  194. package/Distribution/Types/Math/index.d.cts +15 -0
  195. package/Distribution/Types/Math/index.d.cts.map +10 -0
  196. package/Distribution/Types/Math/index.d.mts +15 -0
  197. package/Distribution/Types/Math/index.d.mts.map +10 -0
  198. package/Distribution/Types/Math/index.d.ts +15 -0
  199. package/Distribution/Types/Math/index.d.ts.map +1 -0
  200. package/Distribution/Types/Miscellaneous/Utility.Internal.d.cts +9 -0
  201. package/Distribution/Types/Miscellaneous/Utility.Internal.d.cts.map +10 -0
  202. package/Distribution/Types/Miscellaneous/Utility.Internal.d.mts +9 -0
  203. package/Distribution/Types/Miscellaneous/Utility.Internal.d.mts.map +10 -0
  204. package/Distribution/Types/Miscellaneous/Utility.Internal.d.ts +9 -0
  205. package/Distribution/Types/Miscellaneous/Utility.Internal.d.ts.map +1 -0
  206. package/Distribution/Types/Miscellaneous/Utility.Types.d.cts +104 -0
  207. package/Distribution/Types/Miscellaneous/Utility.Types.d.cts.map +10 -0
  208. package/Distribution/Types/Miscellaneous/Utility.Types.d.mts +104 -0
  209. package/Distribution/Types/Miscellaneous/Utility.Types.d.mts.map +10 -0
  210. package/Distribution/Types/Miscellaneous/Utility.Types.d.ts +104 -0
  211. package/Distribution/Types/Miscellaneous/Utility.Types.d.ts.map +1 -0
  212. package/Distribution/Types/Miscellaneous/index.d.cts +8 -0
  213. package/Distribution/Types/Miscellaneous/index.d.cts.map +10 -0
  214. package/Distribution/Types/Miscellaneous/index.d.mts +8 -0
  215. package/Distribution/Types/Miscellaneous/index.d.mts.map +10 -0
  216. package/Distribution/Types/Miscellaneous/index.d.ts +8 -0
  217. package/Distribution/Types/Miscellaneous/index.d.ts.map +1 -0
  218. package/Distribution/Types/Npm/Index.Effect.d.cts +9 -0
  219. package/Distribution/Types/Npm/Index.Effect.d.cts.map +10 -0
  220. package/Distribution/Types/Npm/Index.Effect.d.mts +9 -0
  221. package/Distribution/Types/Npm/Index.Effect.d.mts.map +10 -0
  222. package/Distribution/Types/Npm/Index.Effect.d.ts +9 -0
  223. package/Distribution/Types/Npm/Index.Effect.d.ts.map +1 -0
  224. package/Distribution/Types/Npm/Npm.Effect.Internal.d.cts +17 -0
  225. package/Distribution/Types/Npm/Npm.Effect.Internal.d.cts.map +10 -0
  226. package/Distribution/Types/Npm/Npm.Effect.Internal.d.mts +17 -0
  227. package/Distribution/Types/Npm/Npm.Effect.Internal.d.mts.map +10 -0
  228. package/Distribution/Types/Npm/Npm.Effect.Internal.d.ts +17 -0
  229. package/Distribution/Types/Npm/Npm.Effect.Internal.d.ts.map +1 -0
  230. package/Distribution/Types/Npm/Npm.Effect.Types.d.cts +12 -0
  231. package/Distribution/Types/Npm/Npm.Effect.Types.d.cts.map +10 -0
  232. package/Distribution/Types/Npm/Npm.Effect.Types.d.mts +12 -0
  233. package/Distribution/Types/Npm/Npm.Effect.Types.d.mts.map +10 -0
  234. package/Distribution/Types/Npm/Npm.Effect.Types.d.ts +12 -0
  235. package/Distribution/Types/Npm/Npm.Effect.Types.d.ts.map +1 -0
  236. package/Distribution/Types/Npm/Npm.Effect.d.cts +92 -0
  237. package/Distribution/Types/Npm/Npm.Effect.d.cts.map +10 -0
  238. package/Distribution/Types/Npm/Npm.Effect.d.mts +92 -0
  239. package/Distribution/Types/Npm/Npm.Effect.d.mts.map +10 -0
  240. package/Distribution/Types/Npm/Npm.Effect.d.ts +92 -0
  241. package/Distribution/Types/Npm/Npm.Effect.d.ts.map +1 -0
  242. package/Distribution/Types/Npm/Npm.Error.d.cts +36 -0
  243. package/Distribution/Types/Npm/Npm.Error.d.cts.map +10 -0
  244. package/Distribution/Types/Npm/Npm.Error.d.mts +36 -0
  245. package/Distribution/Types/Npm/Npm.Error.d.mts.map +10 -0
  246. package/Distribution/Types/Npm/Npm.Error.d.ts +36 -0
  247. package/Distribution/Types/Npm/Npm.Error.d.ts.map +1 -0
  248. package/Distribution/Types/Npm/Npm.d.cts +91 -0
  249. package/Distribution/Types/Npm/Npm.d.cts.map +10 -0
  250. package/Distribution/Types/Npm/Npm.d.mts +91 -0
  251. package/Distribution/Types/Npm/Npm.d.mts.map +10 -0
  252. package/Distribution/Types/Npm/Npm.d.ts +91 -0
  253. package/Distribution/Types/Npm/Npm.d.ts.map +1 -0
  254. package/Distribution/Types/Npm/index.d.cts +15 -0
  255. package/Distribution/Types/Npm/index.d.cts.map +10 -0
  256. package/Distribution/Types/Npm/index.d.mts +15 -0
  257. package/Distribution/Types/Npm/index.d.mts.map +10 -0
  258. package/Distribution/Types/Npm/index.d.ts +15 -0
  259. package/Distribution/Types/Npm/index.d.ts.map +1 -0
  260. package/Distribution/Types/Path/Path.d.cts +17 -0
  261. package/Distribution/Types/Path/Path.d.cts.map +10 -0
  262. package/Distribution/Types/Path/Path.d.mts +17 -0
  263. package/Distribution/Types/Path/Path.d.mts.map +10 -0
  264. package/Distribution/Types/Path/Path.d.ts +17 -0
  265. package/Distribution/Types/Path/Path.d.ts.map +1 -0
  266. package/Distribution/Types/Path/index.d.cts +8 -0
  267. package/Distribution/Types/Path/index.d.cts.map +10 -0
  268. package/Distribution/Types/Path/index.d.mts +8 -0
  269. package/Distribution/Types/Path/index.d.mts.map +10 -0
  270. package/Distribution/Types/Path/index.d.ts +8 -0
  271. package/Distribution/Types/Path/index.d.ts.map +1 -0
  272. package/Distribution/Types/Record/Record.Internal.Types.d.cts +32 -0
  273. package/Distribution/Types/Record/Record.Internal.Types.d.cts.map +10 -0
  274. package/Distribution/Types/Record/Record.Internal.Types.d.mts +32 -0
  275. package/Distribution/Types/Record/Record.Internal.Types.d.mts.map +10 -0
  276. package/Distribution/Types/Record/Record.Internal.Types.d.ts +32 -0
  277. package/Distribution/Types/Record/Record.Internal.Types.d.ts.map +1 -0
  278. package/Distribution/Types/Record/Record.Types.d.cts +78 -0
  279. package/Distribution/Types/Record/Record.Types.d.cts.map +10 -0
  280. package/Distribution/Types/Record/Record.Types.d.mts +78 -0
  281. package/Distribution/Types/Record/Record.Types.d.mts.map +10 -0
  282. package/Distribution/Types/Record/Record.Types.d.ts +78 -0
  283. package/Distribution/Types/Record/Record.Types.d.ts.map +1 -0
  284. package/Distribution/Types/Record/Record.d.cts +63 -0
  285. package/Distribution/Types/Record/Record.d.cts.map +10 -0
  286. package/Distribution/Types/Record/Record.d.mts +63 -0
  287. package/Distribution/Types/Record/Record.d.mts.map +10 -0
  288. package/Distribution/Types/Record/Record.d.ts +63 -0
  289. package/Distribution/Types/Record/Record.d.ts.map +1 -0
  290. package/Distribution/Types/Record/index.d.cts +9 -0
  291. package/Distribution/Types/Record/index.d.cts.map +10 -0
  292. package/Distribution/Types/Record/index.d.mts +9 -0
  293. package/Distribution/Types/Record/index.d.mts.map +10 -0
  294. package/Distribution/Types/Record/index.d.ts +9 -0
  295. package/Distribution/Types/Record/index.d.ts.map +1 -0
  296. package/Distribution/Types/String/String.d.cts +28 -0
  297. package/Distribution/Types/String/String.d.cts.map +10 -0
  298. package/Distribution/Types/String/String.d.mts +28 -0
  299. package/Distribution/Types/String/String.d.mts.map +10 -0
  300. package/Distribution/Types/String/String.d.ts +28 -0
  301. package/Distribution/Types/String/String.d.ts.map +1 -0
  302. package/Distribution/Types/String/index.d.cts +8 -0
  303. package/Distribution/Types/String/index.d.cts.map +10 -0
  304. package/Distribution/Types/String/index.d.mts +8 -0
  305. package/Distribution/Types/String/index.d.mts.map +10 -0
  306. package/Distribution/Types/String/index.d.ts +8 -0
  307. package/Distribution/Types/String/index.d.ts.map +1 -0
  308. package/Distribution/Types/index.d.cts +24 -0
  309. package/Distribution/Types/index.d.cts.map +10 -0
  310. package/Distribution/Types/index.d.mts +24 -0
  311. package/Distribution/Types/index.d.mts.map +10 -0
  312. package/Distribution/Types/index.d.ts +24 -0
  313. package/Distribution/Types/index.d.ts.map +1 -0
  314. package/Distribution/array.cjs +51 -0
  315. package/Distribution/array.cjs.map +7 -0
  316. package/Distribution/array.js +28 -0
  317. package/Distribution/array.js.map +7 -0
  318. package/Distribution/async.cjs +174 -0
  319. package/Distribution/async.cjs.map +7 -0
  320. package/Distribution/async.js +151 -0
  321. package/Distribution/async.js.map +7 -0
  322. package/Distribution/complex.cjs +97 -0
  323. package/Distribution/complex.cjs.map +7 -0
  324. package/Distribution/complex.js +74 -0
  325. package/Distribution/complex.js.map +7 -0
  326. package/Distribution/effect.cjs +63 -0
  327. package/Distribution/effect.cjs.map +7 -0
  328. package/Distribution/effect.js +58 -0
  329. package/Distribution/effect.js.map +7 -0
  330. package/Distribution/fs.cjs +128 -0
  331. package/Distribution/fs.cjs.map +7 -0
  332. package/Distribution/fs.js +95 -0
  333. package/Distribution/fs.js.map +7 -0
  334. package/Distribution/functional.cjs +49 -0
  335. package/Distribution/functional.cjs.map +7 -0
  336. package/Distribution/functional.js +26 -0
  337. package/Distribution/functional.js.map +7 -0
  338. package/Distribution/index.cjs +701 -0
  339. package/Distribution/index.cjs.map +7 -0
  340. package/Distribution/index.js +674 -0
  341. package/Distribution/index.js.map +7 -0
  342. package/Distribution/math.cjs +243 -0
  343. package/Distribution/math.cjs.map +7 -0
  344. package/Distribution/math.js +226 -0
  345. package/Distribution/math.js.map +7 -0
  346. package/Distribution/misc.cjs +45 -0
  347. package/Distribution/misc.cjs.map +7 -0
  348. package/Distribution/misc.js +22 -0
  349. package/Distribution/misc.js.map +7 -0
  350. package/Distribution/npm-effect.cjs +130 -0
  351. package/Distribution/npm-effect.cjs.map +7 -0
  352. package/Distribution/npm-effect.js +97 -0
  353. package/Distribution/npm-effect.js.map +7 -0
  354. package/Distribution/npm.cjs +106 -0
  355. package/Distribution/npm.cjs.map +7 -0
  356. package/Distribution/npm.js +73 -0
  357. package/Distribution/npm.js.map +7 -0
  358. package/Distribution/path.cjs +63 -0
  359. package/Distribution/path.cjs.map +7 -0
  360. package/Distribution/path.js +40 -0
  361. package/Distribution/path.js.map +7 -0
  362. package/Distribution/record.cjs +116 -0
  363. package/Distribution/record.cjs.map +7 -0
  364. package/Distribution/record.js +93 -0
  365. package/Distribution/record.js.map +7 -0
  366. package/package.json +11 -1
@@ -0,0 +1,92 @@
1
+ /**
2
+ * @file Array.Types.ts
3
+ * @author Gage Sorrell <gage@sorrell.sh>
4
+ * @copyright (c) 2026 Gage Sorrell
5
+ * @license MIT
6
+ */
7
+ import type { DefinedOnlyOption, MaybeDefinedOption, ReadonlyOption } from "./Array.Internal.ts";
8
+ import type { NoOptions, TOptions } from "../Miscellaneous/Utility.Types.ts";
9
+ import type { TBuildStaticTArray } from "./Array.Internal.Types.ts";
10
+ import type { TIsNonNegativeInteger } from "../Math/Math.Types.ts";
11
+ /**
12
+ * An `Array` type, which is optionally customizable via an {@link OptionsType}.
13
+ *
14
+ * @template ElementType - The type of the elements in the array.
15
+ * @template OptionsType - *(Optional)* The {@link Options:type | options type} for this type.
16
+ */
17
+ export type TArray<ElementType, OptionsType extends Options = NoOptions> = Options.DefinedOnly extends OptionsType ? Options.MaybeDefined extends OptionsType ? never : Options.Readonly extends OptionsType ? ReadonlyArray<Exclude<ElementType, undefined>> : Array<Exclude<ElementType, undefined>> : Options.MaybeDefined extends OptionsType ? Options.Readonly extends OptionsType ? ReadonlyArray<ElementType | undefined> : Array<ElementType | undefined> : Options.Readonly extends OptionsType ? ReadonlyArray<ElementType> : Array<ElementType>;
18
+ /**
19
+ * The union of all `Array` types exported by the `@sorrell/utilities` {@link Array}
20
+ * module, as well as the built-in `Array` type.
21
+ *
22
+ * @note This union does *not* include {@link TMaybeArray}.
23
+ * If you wish to include {@link TMaybeArray}, use {@link TArrayTypeUnsafe}.
24
+ *
25
+ * @template ElementType - The type of the elements in the array.
26
+ * @template OptionsType - *(Optional)* The {@link Options:type | options type} for this type.
27
+ * @template ArraySize - The number of {@link ElementType | ElementTypes} in this `Array`. The
28
+ * only type in this union that uses this type parameter is {@link TStaticArray}.
29
+ */
30
+ export type TArrayType<ElementType = unknown, OptionsType extends Options = NoOptions, ArraySize extends number = number> = TArray<ElementType, OptionsType> | TNonemptyArray<ElementType, OptionsType> | TStaticArray<ElementType, ArraySize, OptionsType> | Array<ElementType>;
31
+ /**
32
+ * The union of all `Array` types exported by the `@sorrell/utilities` {@link Array}
33
+ * module, as well as the built-in `Array` type.
34
+ *
35
+ * @note This union includes {@link TMaybeArray}. If you do not wish to include
36
+ * {@link TMaybeArray} in the union, use {@link TArrayType} instead.
37
+ *
38
+ * @template ElementType - The type of the elements in the array.
39
+ * @template OptionsType - *(Optional)* The {@link Options:type | options type} for this type.
40
+ * @template ArraySize - The number of {@link ElementType | ElementTypes} in this `Array`. The
41
+ * only type in this union that uses this type parameter is {@link TStaticArray}.
42
+ */
43
+ export type TArrayTypeUnsafe<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number> = TArrayType<ElementType, OptionsType, ArraySize> | TMaybeArray<ElementType>;
44
+ /**
45
+ * The union of a given {@link ElementType}, and `Array<ElementType>`.
46
+ *
47
+ * @template ElementType - The type of this, or the type of this `Array`.
48
+ * @template OptionsType - *(Optional)* The {@link Options:type | options type} for this type.
49
+ */
50
+ export type TMaybeArray<ElementType, OptionsType extends Options = NoOptions> = ElementType | TArray<ElementType, OptionsType>;
51
+ /**
52
+ * The union of a given {@link ElementType}, and `Array<ElementType>`.
53
+ *
54
+ * @template ElementType - The type of this, or the type of this `Array`.
55
+ * @template ArraySize - The number of {@link ElementType | ElementTypes} in this `Array`.
56
+ * This must be an integer.
57
+ * @template OptionsType - *(Optional)* The {@link Options:type | options type} for this type.
58
+ */
59
+ export type TStaticArray<ElementType, ArraySize extends number, OptionsType extends Options = NoOptions> = ArraySize extends ArraySize ? number extends ArraySize ? TArray<ElementType, OptionsType> : TIsNonNegativeInteger<ArraySize> extends true ? TBuildStaticTArray<ElementType, ArraySize, OptionsType> : never : never;
60
+ /**
61
+ * An `Array<ElementType>` that is nonempty.
62
+ *
63
+ * @template ElementType - The type of the elements in the array.
64
+ * @template OptionsType - *(Optional)* The {@link Options:type | options type} for this type.
65
+ */
66
+ export type TNonemptyArray<ElementType, OptionsType extends Options = NoOptions> = Options.DefinedOnly extends OptionsType ? Options.MaybeDefined extends OptionsType ? never : Options.Readonly extends OptionsType ? readonly [Exclude<ElementType, undefined>, ...Array<Exclude<ElementType, undefined>>] : [Exclude<ElementType, undefined>, ...Array<Exclude<ElementType, undefined>>] : Options.MaybeDefined extends OptionsType ? Options.Readonly extends OptionsType ? readonly [ElementType | undefined, ...Array<ElementType | undefined>] : [ElementType | undefined, ...Array<ElementType | undefined>] : Options.Readonly extends OptionsType ? readonly [ElementType, ...Array<ElementType>] : [ElementType, ...Array<ElementType>];
67
+ /**
68
+ * Options for the types defined in the {@link Array} module.
69
+ *
70
+ * The only invalid combinations are those that contain both
71
+ * {@link Options!DefinedOnly} *and* {@link Options!MaybeDefined}.
72
+ */
73
+ export type Options = TOptions<Options.Readonly | Options.DefinedOnly | Options.MaybeDefined>;
74
+ export declare namespace Options {
75
+ /**
76
+ * Specifies that the given array type in the `@sorrell/utilities` `Array` module
77
+ * should use `ReadonlyArray` internally.
78
+ */
79
+ type Readonly = typeof ReadonlyOption;
80
+ /** Specifies that `undefined` must extend the given `ElementType`. */
81
+ type MaybeDefined = typeof MaybeDefinedOption;
82
+ /** Specifies that the given `ElementType` must *not* include `undefined`. */
83
+ type DefinedOnly = typeof DefinedOnlyOption;
84
+ type None = NoOptions;
85
+ }
86
+ /**
87
+ * The type returned by {@link FilterDefined}.
88
+ *
89
+ * @template ElementType - The type of the elements in the array.
90
+ */
91
+ export type FilteredArray<ElementType> = TArray<Exclude<ElementType, undefined>>;
92
+ //# sourceMappingURL=Array.Types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Array.Types.d.ts","sourceRoot":"","sources":["../../../Source/Array/Array.Types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACjG,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnE;;;;;GAKG;AACH,MAAM,MAAM,MAAM,CACd,WAAW,EACX,WAAW,SAAS,OAAO,GAAG,SAAS,IAEvC,OAAO,CAAC,WAAW,SAAS,WAAW,GACjC,OAAO,CAAC,YAAY,SAAS,WAAW,GACpC,KAAK,GACL,OAAO,CAAC,QAAQ,SAAS,WAAW,GAChC,aAAa,CAAC,OAAO,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,GAC9C,KAAK,CAAC,OAAO,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,GAC9C,OAAO,CAAC,YAAY,SAAS,WAAW,GACpC,OAAO,CAAC,QAAQ,SAAS,WAAW,GAChC,aAAa,CAAC,WAAW,GAAG,SAAS,CAAC,GACtC,KAAK,CAAC,WAAW,GAAG,SAAS,CAAC,GAClC,OAAO,CAAC,QAAQ,SAAS,WAAW,GAChC,aAAa,CAAC,WAAW,CAAC,GAC1B,KAAK,CAAC,WAAW,CAAC,CAAC;AAErC;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,UAAU,CAClB,WAAW,GAAG,OAAO,EACrB,WAAW,SAAS,OAA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} from "./Array.Types.cjs";
8
+ import type { NoOptions } from "../Miscellaneous/Utility.Types.cjs";
9
+ /**
10
+ * Filter out all instances of `undefined` from a given {@link Array:param}.
11
+ * @param Array - The array to filter.
12
+ *
13
+ * @template ElementType - The type of the elements in the array.
14
+ *
15
+ * @returns {TArrayType<Exclude<ElementType, undefined>, Exclude<OptionsType, Options.MaybeDefined>>}
16
+ * A new `Array` of type `Exclude<ElementType, undefined>` and `OptionsType` that is the given
17
+ * {@link OptionsType}, with the {@link Options.MaybeDefined} option removed.
18
+ *
19
+ * @example With the given {@link ElementType} including `undefined`.
20
+ * ```typescript
21
+ * const MaybeOddNumbers: TArray<number | undefined> = [ 1, 3, undefined, 5 ];
22
+ * const OddNumbers: TArray<number> = FilterDefined(MaybeOddNumbers);
23
+ * ```
24
+ * @example With the given {@link OptionsType} including `Options.MaybeDefined`.
25
+ * ```typescript
26
+ * const MaybeOddNumbers: TArray<number, Options.MaybeDefined> = [ 1, 3, undefined, 5 ];
27
+ * const OddNumbers: TArray<number> = FilterDefined(MaybeOddNumbers);
28
+ * ```
29
+ */
30
+ export declare function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType, OptionsType | Options.MaybeDefined, ArraySize>): FilteredArray<ElementType>;
31
+ export declare function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType | undefined, OptionsType, ArraySize>): FilteredArray<ElementType>;
32
+ export declare function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType | undefined, OptionsType | Options.MaybeDefined, ArraySize>): FilteredArray<ElementType>;
33
+ //# sourceMappingURL=Array.d.cts.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "file": "Array.d.cts",
4
+ "sourceRoot": "",
5
+ "sources": [
6
+ "../../../Source/Array/Array.ts"
7
+ ],
8
+ "names": [],
9
+ "mappings": "AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,aAAa,CACzB,WAAW,EACX,WAAW,SAAS,OAAO,GAAG,SAAS,EACvC,SAAS,SAAS,MAAM,GAAG,MAAM,EAEjC,KAAK,EAAE,UAAU,CACb,WAAW,EACX,WAAW,GAAG,OAAO,CAAC,YAAY,EAClC,SAAS,CACZ,GACF,aAAa,CAAC,WAAW,CAAC,CAAC;AAC9B,wBAAgB,aAAa,CACzB,WAAW,EACX,WAAW,SAAS,OAAO,GAAG,SAAS,EACvC,SAAS,SAAS,MAAM,GAAG,MAAM,EAEjC,KAAK,EAAE,UAAU,CACb,WAAW,GAAG,SAAS,EACvB,WAAW,EACX,SAAS,CACZ,GACF,aAAa,CAAC,WAAW,CAAC,CAAC;AAC9B,wBAAgB,aAAa,CACzB,WAAW,EACX,WAAW,SAAS,OAAO,GAAG,SAAS,EACvC,SAAS,SAAS,MAAM,GAAG,MAAM,EAEjC,KAAK,EAAE,UAAU,CACb,WAAW,GAAG,SAAS,EACvB,WAAW,GAAG,OAAO,CAAC,YAAY,EAClC,SAAS,CACZ,GACF,aAAa,CAAC,WAAW,CAAC,CAAC"
10
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * @file Array.ts
3
+ * @author Gage Sorrell <gage@sorrell.sh>
4
+ * @copyright (c) 2026 Gage Sorrell
5
+ * @license MIT
6
+ */
7
+ import type { FilteredArray, Options, TArrayType } from "./Array.Types.mjs";
8
+ import type { NoOptions } from "../Miscellaneous/Utility.Types.mjs";
9
+ /**
10
+ * Filter out all instances of `undefined` from a given {@link Array:param}.
11
+ * @param Array - The array to filter.
12
+ *
13
+ * @template ElementType - The type of the elements in the array.
14
+ *
15
+ * @returns {TArrayType<Exclude<ElementType, undefined>, Exclude<OptionsType, Options.MaybeDefined>>}
16
+ * A new `Array` of type `Exclude<ElementType, undefined>` and `OptionsType` that is the given
17
+ * {@link OptionsType}, with the {@link Options.MaybeDefined} option removed.
18
+ *
19
+ * @example With the given {@link ElementType} including `undefined`.
20
+ * ```typescript
21
+ * const MaybeOddNumbers: TArray<number | undefined> = [ 1, 3, undefined, 5 ];
22
+ * const OddNumbers: TArray<number> = FilterDefined(MaybeOddNumbers);
23
+ * ```
24
+ * @example With the given {@link OptionsType} including `Options.MaybeDefined`.
25
+ * ```typescript
26
+ * const MaybeOddNumbers: TArray<number, Options.MaybeDefined> = [ 1, 3, undefined, 5 ];
27
+ * const OddNumbers: TArray<number> = FilterDefined(MaybeOddNumbers);
28
+ * ```
29
+ */
30
+ export declare function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType, OptionsType | Options.MaybeDefined, ArraySize>): FilteredArray<ElementType>;
31
+ export declare function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType | undefined, OptionsType, ArraySize>): FilteredArray<ElementType>;
32
+ export declare function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType | undefined, OptionsType | Options.MaybeDefined, ArraySize>): FilteredArray<ElementType>;
33
+ //# sourceMappingURL=Array.d.mts.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "file": "Array.d.mts",
4
+ "sourceRoot": "",
5
+ "sources": [
6
+ "../../../Source/Array/Array.ts"
7
+ ],
8
+ "names": [],
9
+ "mappings": "AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,aAAa,CACzB,WAAW,EACX,WAAW,SAAS,OAAO,GAAG,SAAS,EACvC,SAAS,SAAS,MAAM,GAAG,MAAM,EAEjC,KAAK,EAAE,UAAU,CACb,WAAW,EACX,WAAW,GAAG,OAAO,CAAC,YAAY,EAClC,SAAS,CACZ,GACF,aAAa,CAAC,WAAW,CAAC,CAAC;AAC9B,wBAAgB,aAAa,CACzB,WAAW,EACX,WAAW,SAAS,OAAO,GAAG,SAAS,EACvC,SAAS,SAAS,MAAM,GAAG,MAAM,EAEjC,KAAK,EAAE,UAAU,CACb,WAAW,GAAG,SAAS,EACvB,WAAW,EACX,SAAS,CACZ,GACF,aAAa,CAAC,WAAW,CAAC,CAAC;AAC9B,wBAAgB,aAAa,CACzB,WAAW,EACX,WAAW,SAAS,OAAO,GAAG,SAAS,EACvC,SAAS,SAAS,MAAM,GAAG,MAAM,EAEjC,KAAK,EAAE,UAAU,CACb,WAAW,GAAG,SAAS,EACvB,WAAW,GAAG,OAAO,CAAC,YAAY,EAClC,SAAS,CACZ,GACF,aAAa,CAAC,WAAW,CAAC,CAAC"
10
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * @file Array.ts
3
+ * @author Gage Sorrell <gage@sorrell.sh>
4
+ * @copyright (c) 2026 Gage Sorrell
5
+ * @license MIT
6
+ */
7
+ import type { FilteredArray, Options, TArrayType } from "./Array.Types.ts";
8
+ import type { NoOptions } from "../Miscellaneous/Utility.Types.ts";
9
+ /**
10
+ * Filter out all instances of `undefined` from a given {@link Array:param}.
11
+ * @param Array - The array to filter.
12
+ *
13
+ * @template ElementType - The type of the elements in the array.
14
+ *
15
+ * @returns {TArrayType<Exclude<ElementType, undefined>, Exclude<OptionsType, Options.MaybeDefined>>}
16
+ * A new `Array` of type `Exclude<ElementType, undefined>` and `OptionsType` that is the given
17
+ * {@link OptionsType}, with the {@link Options.MaybeDefined} option removed.
18
+ *
19
+ * @example With the given {@link ElementType} including `undefined`.
20
+ * ```typescript
21
+ * const MaybeOddNumbers: TArray<number | undefined> = [ 1, 3, undefined, 5 ];
22
+ * const OddNumbers: TArray<number> = FilterDefined(MaybeOddNumbers);
23
+ * ```
24
+ * @example With the given {@link OptionsType} including `Options.MaybeDefined`.
25
+ * ```typescript
26
+ * const MaybeOddNumbers: TArray<number, Options.MaybeDefined> = [ 1, 3, undefined, 5 ];
27
+ * const OddNumbers: TArray<number> = FilterDefined(MaybeOddNumbers);
28
+ * ```
29
+ */
30
+ export declare function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType, OptionsType | Options.MaybeDefined, ArraySize>): FilteredArray<ElementType>;
31
+ export declare function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType | undefined, OptionsType, ArraySize>): FilteredArray<ElementType>;
32
+ export declare function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType | undefined, OptionsType | Options.MaybeDefined, ArraySize>): FilteredArray<ElementType>;
33
+ //# sourceMappingURL=Array.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Array.d.ts","sourceRoot":"","sources":["../../../Source/Array/Array.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,aAAa,CACzB,WAAW,EACX,WAAW,SAAS,OAAO,GAAG,SAAS,EACvC,SAAS,SAAS,MAAM,GAAG,MAAM,EAEjC,KAAK,EAAE,UAAU,CACb,WAAW,EACX,WAAW,GAAG,OAAO,CAAC,YAAY,EAClC,SAAS,CACZ,GACF,aAAa,CAAC,WAAW,CAAC,CAAC;AAC9B,wBAAgB,aAAa,CACzB,WAAW,EACX,WAAW,SAAS,OAAO,GAAG,SAAS,EACvC,SAAS,SAAS,MAAM,GAAG,MAAM,EAEjC,KAAK,EAAE,UAAU,CACb,WAAW,GAAG,SAAS,EACvB,WAAW,EACX,SAAS,CACZ,GACF,aAAa,CAAC,WAAW,CAAC,CAAC;AAC9B,wBAAgB,aAAa,CACzB,WAAW,EACX,WAAW,SAAS,OAAO,GAAG,SAAS,EACvC,SAAS,SAAS,MAAM,GAAG,MAAM,EAEjC,KAAK,EAAE,UAAU,CACb,WAAW,GAAG,SAAS,EACvB,WAAW,GAAG,OAAO,CAAC,YAAY,EAClC,SAAS,CACZ,GACF,aAAa,CAAC,WAAW,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @file index.ts
3
+ * @author Gage Sorrell <gage@sorrell.sh>
4
+ * @copyright (c) 2026 Gage Sorrell
5
+ * @license MIT
6
+ */
7
+ export * from "./Array.cjs";
8
+ export * from "./Array.Types.cjs";
9
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "file": "index.d.cts",
4
+ "sourceRoot": "",
5
+ "sources": [
6
+ "../../../Source/Array/index.ts"
7
+ ],
8
+ "names": [],
9
+ "mappings": "AAAA;;;;;GAKG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"
10
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @file index.ts
3
+ * @author Gage Sorrell <gage@sorrell.sh>
4
+ * @copyright (c) 2026 Gage Sorrell
5
+ * @license MIT
6
+ */
7
+ export * from "./Array.mjs";
8
+ export * from "./Array.Types.mjs";
9
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "file": "index.d.mts",
4
+ "sourceRoot": "",
5
+ "sources": [
6
+ "../../../Source/Array/index.ts"
7
+ ],
8
+ "names": [],
9
+ "mappings": "AAAA;;;;;GAKG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"
10
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @file index.ts
3
+ * @author Gage Sorrell <gage@sorrell.sh>
4
+ * @copyright (c) 2026 Gage Sorrell
5
+ * @license MIT
6
+ */
7
+ export * from "./Array.ts";
8
+ export * from "./Array.Types.ts";
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../Source/Array/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,150 @@
1
+ /**
2
+ * @file Promise.Types.ts
3
+ * @author Gage Sorrell <gage@sorrell.sh>
4
+ * @copyright (c) 2026 Gage Sorrell
5
+ * @license MIT
6
+ */
7
+ import type { TExtractFunction, TFunction } from "../Functional/index.cjs";
8
+ import type { TPromise, TPromiseLike } from "./Async.cjs";
9
+ /**
10
+ * @template DataType - The {@link Data} type of this.
11
+ *
12
+ * @property {DataType | undefined} Data - The data returned by the corresponding
13
+ * `async` function or `Promise<DataType>`,
14
+ * iff it resolved successfully. Otherwise, it is `undefined`.
15
+ *
16
+ * @property {undefined | unknown} Error - The error thrown by the corresponding
17
+ * `async` function or `Promise<DataType>`. This is `undefined` iff the
18
+ * corresponding `async` function or `Promise<DataType>` resolved successfully.
19
+ */
20
+ export type TTryResult<DataType> = {
21
+ Data: DataType;
22
+ Error: undefined;
23
+ } | {
24
+ Data: undefined;
25
+ Error: unknown | undefined;
26
+ };
27
+ /**
28
+ * An `async` function or `Promise` of the given {@link DataType}.
29
+ * This is the type of the argument of {@link Try}.
30
+ *
31
+ * @template DataType - The type of the data that the `async` function or `Promise<DataType>`.
32
+ */
33
+ export type TTrySource<DataType> = Promise<DataType> | (() => DataType) | (() => Promise<DataType>);
34
+ /**
35
+ * The type of the function passed to the `then` method of a `Promise`.
36
+ *
37
+ * @template ParameterType - The type of the parameter passed to the function.
38
+ * @template ReturnType - The type of the value returned by the function.
39
+ */
40
+ export type TThen<ParameterType = unknown, ReturnType = unknown> = (Value: ParameterType) => ReturnType;
41
+ /**
42
+ * The type of the function passed to the `catch` method of a `Promise`.
43
+ *
44
+ * @template Type - The type of the value returned by the `catch` function.
45
+ */
46
+ export type TPromiseCatchFunction<Type = unknown> = Parameters<TExtractFunction<Promise<Type>["catch"]>>[0];
47
+ /**
48
+ * Maps a function type to union of two functions, each with the original
49
+ * argument vector type. One return type is wrapped with `Promise`, and
50
+ * the other is not. The nuance regarding the return type is elaborated
51
+ * upon in the note below.
52
+ *
53
+ * @note It is expected that in *most* cases, the given {@link FunctionType}
54
+ * is a regular, synchronous function type (*i.e.*, its return type is *not*
55
+ * a `Promise`), but if it *does* return a `Promise`, the default behavior
56
+ * is to assume that this is the intended async form of the resulting union,
57
+ * and the type wrapped in the `Promise` will be inferred. If the given
58
+ * {@link FunctionType} returns a `Promise` but is intended to be the *synchronous*
59
+ * form, then {@link RetainPromiseFlag} should be set to `true`.
60
+ *
61
+ * @template FunctionType - The function type from which this union is constructed.
62
+ * @template RetainPromiseFlag - If `true` and `ReturnType<{@link FunctionType}> extends
63
+ * Promise<unknown>`, then the {@link FunctionType} will be treated as the synchronous
64
+ * form, and the other type in this union will return a `Promise<Promise<infer ResolveType>>`.
65
+ */
66
+ export type TMaybeAsync<FunctionType extends TFunction, RetainPromiseFlag extends boolean = false> = FunctionType extends TFunction<infer ArgumentVectorType, infer ReturnType> ? ReturnType extends Promise<infer ResolveType> ? RetainPromiseFlag extends true ? TFunction<ArgumentVectorType, ReturnType> : TFunction<ArgumentVectorType, ResolveType> : (TFunction<ArgumentVectorType, ReturnType> | TFunction<ArgumentVectorType, Promise<ReturnType>>) : never;
67
+ /**
68
+ * A function that is an argument of a given {@link PromiseConstructorLike}`, which is called when
69
+ * the {@link PromiseLike} created by the given {@link PromiseConstructorLike} resolves, if it resolves.
70
+ *
71
+ * @param Value - The value to which the given {@link PromiseLike} will resolve by calling this.
72
+ *
73
+ * @template ResolveType - The type to which the given {@link PromiseLike} will resolve by calling this.
74
+ */
75
+ export type TResolve<ResolveType> = (Value: ResolveType | PromiseLike<ResolveType>) => void;
76
+ /**
77
+ * A function that is called by a given {@link PromiseLike}`, if the given {@link PromiseLike} resolves.
78
+ *
79
+ * @param Value - The value to which the given {@link PromiseLike} resolves when this is called,
80
+ * if it resolves (this is called precisely when the given {@link PromiseLike} resolves).
81
+ *
82
+ * @template ResolveType - The type to which the given {@link PromiseLike} provides once it has
83
+ * resolved, if it resolves.
84
+ *
85
+ * @template Result1Type - The type to which the resulting {@link PromiseLike} will resolve, if it resolves.
86
+ */
87
+ export type TOnFulfilled<ResolveType, Result1Type = ResolveType> = {
88
+ (Value: ResolveType): Result1Type | PromiseLike<Result1Type>;
89
+ };
90
+ /**
91
+ * A function that is called by a given {@link Promise}`, if the given {@link Promise} rejects.
92
+ *
93
+ * @param Reason - The reason for why given {@link Promise} rejects when this is called,
94
+ * if it rejects (this is called precisely when the given {@link Promise} rejects).
95
+ *
96
+ * @template RejectType - The type to which the given {@link Promise} provides once it has
97
+ * rejected, if it rejects.
98
+ *
99
+ * @returns {Result2Type | PromiseLike<Result2Type>} A {@link PromiseLike} that resolves when this function
100
+ * has finished handling the rejection of the {@link Promise} which received this function via
101
+ * {@link Promise["catch"]}.
102
+ */
103
+ export type TOnRejected<RejectType> = {
104
+ (Reason: unknown): RejectType | PromiseLike<RejectType>;
105
+ };
106
+ /**
107
+ * A function that is an argument of a given {@link PromiseConstructorLike}`, which is called when
108
+ * the {@link PromiseLike} created by the given {@link PromiseConstructorLike} rejects, if it rejects.
109
+ *
110
+ * @param Reason - The reason for why given {@link PromiseLike} will reject by calling this.
111
+ *
112
+ * @template RejectType - The type to which the given {@link PromiseLike} will by calling this.
113
+ */
114
+ export type TReject<RejectType = unknown> = (Reason: RejectType) => void;
115
+ /**
116
+ * The argument of a {@link TPromise} (or other {@link PromiseLike}), such that a new
117
+ * {@link PromiseLike} is created by the given constructor using this argument.
118
+ *
119
+ * @param Resolve - The function that, if called, will cause the {@link PromiseLike}
120
+ * constructed with this to resolve.
121
+ *
122
+ * @param Reject - The function that, if called, will cause the {@link PromiseLike}
123
+ * constructed with this to resolve.
124
+ *
125
+ * @template ResolveType - The type to which the {@link PromiseLike} constructed with this will be resolved,
126
+ * if it resolves.
127
+ *
128
+ * @template RejectType - The type to which the {@link PromiseLike} constructed with this will be rejected,
129
+ * if it rejects.
130
+ *
131
+ * @returns {void} This does not return anything; control flow is handled entirely by calling either
132
+ * {@link Resolve} or {@link Reject}.
133
+ */
134
+ export type TPromiseExecutor<ResolveType, RejectType = never> = {
135
+ (Resolve?: TResolve<ResolveType>, Reject?: TReject<RejectType>): void;
136
+ };
137
+ /**
138
+ * The type of the argument used to construct a {@link TPromise}.
139
+ *
140
+ * @template ResolveType - The type to which the {@link TPromise} constructed with
141
+ * this argument will resolve, if it resolves.
142
+ */
143
+ export type TPromiseCtorArgument<ResolveType> = TPromiseExecutor<ResolveType> | TPromise<ResolveType> | Promise<ResolveType>;
144
+ /**
145
+ * Either a given {@link ResultType}, or a {@link TPromiseLike} of a given {@link ResultType}.
146
+ *
147
+ * @template ResultType - The type which is either this, or of which this is a {@link PromiseLike}.
148
+ */
149
+ export type TMaybePromiseLike<ResultType> = ResultType | TPromiseLike<ResultType>;
150
+ //# sourceMappingURL=Async.Types.d.cts.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "file": "Async.Types.d.cts",
4
+ "sourceRoot": "",
5
+ "sources": [
6
+ "../../../Source/Async/Async.Types.ts"
7
+ ],
8
+ "names": [],
9
+ "mappings": "AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAEzD;;;;;;;;;;GAUG;AACH,MAAM,MAAM,UAAU,CAAC,QAAQ,IACzB;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,KA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E5F;;;;;;;;;;GAUG;AACH,MAAM,MAAM,YAAY,CACpB,WAAW,EACX,WAAW,GAAG,WAAW,IAEzB;IACI,CAAC,KAAK,EAAE,WAAW,GACb,WAAW,GACX,WAAW,CAAC,WAAW,CAAC,CAAC;CAClC,CAAC;AAEN;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,WAAW,CAAC,UAAU,IAC9B;IACI,CAAC,MAAM,EAAE,OAAO,GACV,UAAU,GACV,WAAW,CAAC,UAAU,CAAC,CAAC;CACjC,CAAC;AAEN;;;;;;;GAOG;AACH,MAAM,MAAM,OAAO,CAAC,UAAU,GAAG,OAAO,IAAI,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;AAEzE;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,gBAAgB,CAAC,WAAW,EAAE,UAAU,GAAG,KAAK,IACxD;IACI,CACI,OAAO,CAAC,EAAE,QAAQ,CAAC,WAAW,CAAC,EAC/B,MAAM,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,GAC7B,IAAI,CAAC;CACX,CAAC;AAEN;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,CAAC,WAAW,IACtC,gBAAgB,CAAC,WAAW,CAAC,GAC7B,QAAQ,CAAC,WAAW,CAAC,GACrB,OAAO,CAAC,WAAW,CAAC,CAAC;AAE3B;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,CAAC,UAAU,IAClC,UAAU,GACV,YAAY,CAAC,UAAU,CAAC,CAAC"
10
+ }
@@ -0,0 +1,150 @@
1
+ /**
2
+ * @file Promise.Types.ts
3
+ * @author Gage Sorrell <gage@sorrell.sh>
4
+ * @copyright (c) 2026 Gage Sorrell
5
+ * @license MIT
6
+ */
7
+ import type { TExtractFunction, TFunction } from "../Functional/index.mjs";
8
+ import type { TPromise, TPromiseLike } from "./Async.mjs";
9
+ /**
10
+ * @template DataType - The {@link Data} type of this.
11
+ *
12
+ * @property {DataType | undefined} Data - The data returned by the corresponding
13
+ * `async` function or `Promise<DataType>`,
14
+ * iff it resolved successfully. Otherwise, it is `undefined`.
15
+ *
16
+ * @property {undefined | unknown} Error - The error thrown by the corresponding
17
+ * `async` function or `Promise<DataType>`. This is `undefined` iff the
18
+ * corresponding `async` function or `Promise<DataType>` resolved successfully.
19
+ */
20
+ export type TTryResult<DataType> = {
21
+ Data: DataType;
22
+ Error: undefined;
23
+ } | {
24
+ Data: undefined;
25
+ Error: unknown | undefined;
26
+ };
27
+ /**
28
+ * An `async` function or `Promise` of the given {@link DataType}.
29
+ * This is the type of the argument of {@link Try}.
30
+ *
31
+ * @template DataType - The type of the data that the `async` function or `Promise<DataType>`.
32
+ */
33
+ export type TTrySource<DataType> = Promise<DataType> | (() => DataType) | (() => Promise<DataType>);
34
+ /**
35
+ * The type of the function passed to the `then` method of a `Promise`.
36
+ *
37
+ * @template ParameterType - The type of the parameter passed to the function.
38
+ * @template ReturnType - The type of the value returned by the function.
39
+ */
40
+ export type TThen<ParameterType = unknown, ReturnType = unknown> = (Value: ParameterType) => ReturnType;
41
+ /**
42
+ * The type of the function passed to the `catch` method of a `Promise`.
43
+ *
44
+ * @template Type - The type of the value returned by the `catch` function.
45
+ */
46
+ export type TPromiseCatchFunction<Type = unknown> = Parameters<TExtractFunction<Promise<Type>["catch"]>>[0];
47
+ /**
48
+ * Maps a function type to union of two functions, each with the original
49
+ * argument vector type. One return type is wrapped with `Promise`, and
50
+ * the other is not. The nuance regarding the return type is elaborated
51
+ * upon in the note below.
52
+ *
53
+ * @note It is expected that in *most* cases, the given {@link FunctionType}
54
+ * is a regular, synchronous function type (*i.e.*, its return type is *not*
55
+ * a `Promise`), but if it *does* return a `Promise`, the default behavior
56
+ * is to assume that this is the intended async form of the resulting union,
57
+ * and the type wrapped in the `Promise` will be inferred. If the given
58
+ * {@link FunctionType} returns a `Promise` but is intended to be the *synchronous*
59
+ * form, then {@link RetainPromiseFlag} should be set to `true`.
60
+ *
61
+ * @template FunctionType - The function type from which this union is constructed.
62
+ * @template RetainPromiseFlag - If `true` and `ReturnType<{@link FunctionType}> extends
63
+ * Promise<unknown>`, then the {@link FunctionType} will be treated as the synchronous
64
+ * form, and the other type in this union will return a `Promise<Promise<infer ResolveType>>`.
65
+ */
66
+ export type TMaybeAsync<FunctionType extends TFunction, RetainPromiseFlag extends boolean = false> = FunctionType extends TFunction<infer ArgumentVectorType, infer ReturnType> ? ReturnType extends Promise<infer ResolveType> ? RetainPromiseFlag extends true ? TFunction<ArgumentVectorType, ReturnType> : TFunction<ArgumentVectorType, ResolveType> : (TFunction<ArgumentVectorType, ReturnType> | TFunction<ArgumentVectorType, Promise<ReturnType>>) : never;
67
+ /**
68
+ * A function that is an argument of a given {@link PromiseConstructorLike}`, which is called when
69
+ * the {@link PromiseLike} created by the given {@link PromiseConstructorLike} resolves, if it resolves.
70
+ *
71
+ * @param Value - The value to which the given {@link PromiseLike} will resolve by calling this.
72
+ *
73
+ * @template ResolveType - The type to which the given {@link PromiseLike} will resolve by calling this.
74
+ */
75
+ export type TResolve<ResolveType> = (Value: ResolveType | PromiseLike<ResolveType>) => void;
76
+ /**
77
+ * A function that is called by a given {@link PromiseLike}`, if the given {@link PromiseLike} resolves.
78
+ *
79
+ * @param Value - The value to which the given {@link PromiseLike} resolves when this is called,
80
+ * if it resolves (this is called precisely when the given {@link PromiseLike} resolves).
81
+ *
82
+ * @template ResolveType - The type to which the given {@link PromiseLike} provides once it has
83
+ * resolved, if it resolves.
84
+ *
85
+ * @template Result1Type - The type to which the resulting {@link PromiseLike} will resolve, if it resolves.
86
+ */
87
+ export type TOnFulfilled<ResolveType, Result1Type = ResolveType> = {
88
+ (Value: ResolveType): Result1Type | PromiseLike<Result1Type>;
89
+ };
90
+ /**
91
+ * A function that is called by a given {@link Promise}`, if the given {@link Promise} rejects.
92
+ *
93
+ * @param Reason - The reason for why given {@link Promise} rejects when this is called,
94
+ * if it rejects (this is called precisely when the given {@link Promise} rejects).
95
+ *
96
+ * @template RejectType - The type to which the given {@link Promise} provides once it has
97
+ * rejected, if it rejects.
98
+ *
99
+ * @returns {Result2Type | PromiseLike<Result2Type>} A {@link PromiseLike} that resolves when this function
100
+ * has finished handling the rejection of the {@link Promise} which received this function via
101
+ * {@link Promise["catch"]}.
102
+ */
103
+ export type TOnRejected<RejectType> = {
104
+ (Reason: unknown): RejectType | PromiseLike<RejectType>;
105
+ };
106
+ /**
107
+ * A function that is an argument of a given {@link PromiseConstructorLike}`, which is called when
108
+ * the {@link PromiseLike} created by the given {@link PromiseConstructorLike} rejects, if it rejects.
109
+ *
110
+ * @param Reason - The reason for why given {@link PromiseLike} will reject by calling this.
111
+ *
112
+ * @template RejectType - The type to which the given {@link PromiseLike} will by calling this.
113
+ */
114
+ export type TReject<RejectType = unknown> = (Reason: RejectType) => void;
115
+ /**
116
+ * The argument of a {@link TPromise} (or other {@link PromiseLike}), such that a new
117
+ * {@link PromiseLike} is created by the given constructor using this argument.
118
+ *
119
+ * @param Resolve - The function that, if called, will cause the {@link PromiseLike}
120
+ * constructed with this to resolve.
121
+ *
122
+ * @param Reject - The function that, if called, will cause the {@link PromiseLike}
123
+ * constructed with this to resolve.
124
+ *
125
+ * @template ResolveType - The type to which the {@link PromiseLike} constructed with this will be resolved,
126
+ * if it resolves.
127
+ *
128
+ * @template RejectType - The type to which the {@link PromiseLike} constructed with this will be rejected,
129
+ * if it rejects.
130
+ *
131
+ * @returns {void} This does not return anything; control flow is handled entirely by calling either
132
+ * {@link Resolve} or {@link Reject}.
133
+ */
134
+ export type TPromiseExecutor<ResolveType, RejectType = never> = {
135
+ (Resolve?: TResolve<ResolveType>, Reject?: TReject<RejectType>): void;
136
+ };
137
+ /**
138
+ * The type of the argument used to construct a {@link TPromise}.
139
+ *
140
+ * @template ResolveType - The type to which the {@link TPromise} constructed with
141
+ * this argument will resolve, if it resolves.
142
+ */
143
+ export type TPromiseCtorArgument<ResolveType> = TPromiseExecutor<ResolveType> | TPromise<ResolveType> | Promise<ResolveType>;
144
+ /**
145
+ * Either a given {@link ResultType}, or a {@link TPromiseLike} of a given {@link ResultType}.
146
+ *
147
+ * @template ResultType - The type which is either this, or of which this is a {@link PromiseLike}.
148
+ */
149
+ export type TMaybePromiseLike<ResultType> = ResultType | TPromiseLike<ResultType>;
150
+ //# sourceMappingURL=Async.Types.d.mts.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "file": "Async.Types.d.mts",
4
+ "sourceRoot": "",
5
+ "sources": [
6
+ "../../../Source/Async/Async.Types.ts"
7
+ ],
8
+ "names": [],
9
+ "mappings": "AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAEzD;;;;;;;;;;GAUG;AACH,MAAM,MAAM,UAAU,CAAC,QAAQ,IACzB;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,SAAS,CAAC;CACpB,GACC;IACE,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,OAAO,GAAG,SAAS,CAAC;CAC9B,CAAC;AAEN;;;;;GAKG;AACH,MAAM,MAAM,UAAU,CAAC,QAAQ,IACzB,OAAO,CAAC,QAAQ,CAAC,GACjB,CAAC,MAAM,QAAQ,CAAC,GAChB,CAAC,MAAM,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;AAEhC;;;;;GAKG;AACH,MAAM,MAAM,KAAK,CACb,aAAa,GAAG,OAAO,EACvB,UAAU,GAAG,OAAO,IAEpB,CAAC,KAAK,EAAE,aAAa,KAAK,UAAU,CAAC;AAIzC;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,CAAC,IAAI,GAAG,OAAO,IAC5C,UAAU,CAAC,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE5D;;;;;;;;;;;;;;;;;;G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