compostjs 0.0.11 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/dist/compost.js +34 -28
  2. package/dist/core.js +94 -73
  3. package/dist/fable_modules/fable-library-js.4.28.0/Array.d.ts +123 -0
  4. package/dist/fable_modules/fable-library-js.4.28.0/Array.js +1242 -0
  5. package/dist/fable_modules/fable-library-js.4.28.0/Async.d.ts +26 -0
  6. package/dist/fable_modules/fable-library-js.4.28.0/Async.js +145 -0
  7. package/dist/fable_modules/fable-library-js.4.28.0/AsyncBuilder.d.ts +59 -0
  8. package/dist/fable_modules/fable-library-js.4.28.0/AsyncBuilder.js +183 -0
  9. package/dist/fable_modules/fable-library-js.4.28.0/BigInt.d.ts +115 -0
  10. package/dist/fable_modules/fable-library-js.4.28.0/BigInt.js +283 -0
  11. package/dist/fable_modules/fable-library-js.4.28.0/BitConverter.d.ts +27 -0
  12. package/dist/fable_modules/fable-library-js.4.28.0/BitConverter.js +138 -0
  13. package/dist/fable_modules/fable-library-js.4.28.0/Boolean.d.ts +3 -0
  14. package/dist/fable_modules/fable-library-js.4.28.0/Boolean.js +21 -0
  15. package/dist/fable_modules/fable-library-js.4.28.0/CHANGELOG.md +100 -0
  16. package/dist/fable_modules/fable-library-js.4.28.0/Char.d.ts +65 -0
  17. package/dist/fable_modules/fable-library-js.4.28.0/Char.js +169 -0
  18. package/dist/fable_modules/fable-library-js.4.28.0/Choice.d.ts +121 -0
  19. package/dist/fable_modules/fable-library-js.4.28.0/Choice.js +184 -0
  20. package/dist/fable_modules/fable-library-js.4.28.0/CollectionUtil.d.ts +7 -0
  21. package/dist/fable_modules/fable-library-js.4.28.0/CollectionUtil.js +182 -0
  22. package/dist/fable_modules/fable-library-js.4.28.0/ConditionalWeakTable.d.ts +9 -0
  23. package/dist/fable_modules/fable-library-js.4.28.0/ConditionalWeakTable.js +21 -0
  24. package/dist/fable_modules/fable-library-js.4.28.0/Date.d.ts +70 -0
  25. package/dist/fable_modules/fable-library-js.4.28.0/Date.js +748 -0
  26. package/dist/fable_modules/fable-library-js.4.28.0/DateOffset.d.ts +63 -0
  27. package/dist/fable_modules/fable-library-js.4.28.0/DateOffset.js +268 -0
  28. package/dist/fable_modules/fable-library-js.4.28.0/DateOnly.d.ts +18 -0
  29. package/dist/fable_modules/fable-library-js.4.28.0/DateOnly.js +124 -0
  30. package/dist/fable_modules/fable-library-js.4.28.0/Decimal.d.ts +45 -0
  31. package/dist/fable_modules/fable-library-js.4.28.0/Decimal.js +212 -0
  32. package/dist/fable_modules/fable-library-js.4.28.0/Double.d.ts +11 -0
  33. package/dist/fable_modules/fable-library-js.4.28.0/Double.js +46 -0
  34. package/dist/fable_modules/fable-library-js.4.28.0/Encoding.d.ts +12 -0
  35. package/dist/fable_modules/fable-library-js.4.28.0/Encoding.js +173 -0
  36. package/dist/fable_modules/fable-library-js.4.28.0/Event.d.ts +31 -0
  37. package/dist/fable_modules/fable-library-js.4.28.0/Event.js +93 -0
  38. package/dist/fable_modules/fable-library-js.4.28.0/FSharp.Collections.d.ts +7 -0
  39. package/dist/fable_modules/fable-library-js.4.28.0/FSharp.Collections.js +27 -0
  40. package/dist/fable_modules/fable-library-js.4.28.0/FSharp.Core.CompilerServices.d.ts +12 -0
  41. package/dist/fable_modules/fable-library-js.4.28.0/FSharp.Core.CompilerServices.js +27 -0
  42. package/dist/fable_modules/fable-library-js.4.28.0/FSharp.Core.d.ts +17 -0
  43. package/dist/fable_modules/fable-library-js.4.28.0/FSharp.Core.js +69 -0
  44. package/dist/fable_modules/fable-library-js.4.28.0/Global.d.ts +24 -0
  45. package/dist/fable_modules/fable-library-js.4.28.0/Global.js +8 -0
  46. package/dist/fable_modules/fable-library-js.4.28.0/Guid.d.ts +10 -0
  47. package/dist/fable_modules/fable-library-js.4.28.0/Guid.js +142 -0
  48. package/dist/fable_modules/fable-library-js.4.28.0/Int32.d.ts +28 -0
  49. package/dist/fable_modules/fable-library-js.4.28.0/Int32.js +135 -0
  50. package/dist/fable_modules/fable-library-js.4.28.0/List.d.ts +143 -0
  51. package/dist/fable_modules/fable-library-js.4.28.0/List.js +1273 -0
  52. package/dist/fable_modules/fable-library-js.4.28.0/Long.d.ts +3 -0
  53. package/dist/fable_modules/fable-library-js.4.28.0/Long.js +46 -0
  54. package/dist/fable_modules/fable-library-js.4.28.0/MailboxProcessor.d.ts +25 -0
  55. package/dist/fable_modules/fable-library-js.4.28.0/MailboxProcessor.js +93 -0
  56. package/dist/fable_modules/fable-library-js.4.28.0/Map.d.ts +178 -0
  57. package/dist/fable_modules/fable-library-js.4.28.0/Map.js +1396 -0
  58. package/dist/fable_modules/fable-library-js.4.28.0/MapUtil.d.ts +12 -0
  59. package/dist/fable_modules/fable-library-js.4.28.0/MapUtil.js +127 -0
  60. package/dist/fable_modules/fable-library-js.4.28.0/MutableMap.d.ts +52 -0
  61. package/dist/fable_modules/fable-library-js.4.28.0/MutableMap.js +327 -0
  62. package/dist/fable_modules/fable-library-js.4.28.0/MutableSet.d.ts +39 -0
  63. package/dist/fable_modules/fable-library-js.4.28.0/MutableSet.js +233 -0
  64. package/dist/fable_modules/fable-library-js.4.28.0/Native.d.ts +2 -0
  65. package/dist/fable_modules/fable-library-js.4.28.0/Native.js +8 -0
  66. package/dist/fable_modules/fable-library-js.4.28.0/Numeric.d.ts +19 -0
  67. package/dist/fable_modules/fable-library-js.4.28.0/Numeric.js +71 -0
  68. package/dist/fable_modules/fable-library-js.4.28.0/Observable.d.ts +32 -0
  69. package/dist/fable_modules/fable-library-js.4.28.0/Observable.js +113 -0
  70. package/dist/fable_modules/fable-library-js.4.28.0/Option.d.ts +28 -0
  71. package/dist/fable_modules/fable-library-js.4.28.0/Option.js +96 -0
  72. package/dist/fable_modules/fable-library-js.4.28.0/README.md +3 -0
  73. package/dist/fable_modules/fable-library-js.4.28.0/Random.d.ts +37 -0
  74. package/dist/fable_modules/fable-library-js.4.28.0/Random.js +170 -0
  75. package/dist/fable_modules/fable-library-js.4.28.0/Range.d.ts +12 -0
  76. package/dist/fable_modules/fable-library-js.4.28.0/Range.js +45 -0
  77. package/dist/fable_modules/fable-library-js.4.28.0/Reflection.d.ts +119 -0
  78. package/dist/fable_modules/fable-library-js.4.28.0/Reflection.js +461 -0
  79. package/dist/fable_modules/fable-library-js.4.28.0/RegExp.d.ts +10 -0
  80. package/dist/fable_modules/fable-library-js.4.28.0/RegExp.js +131 -0
  81. package/dist/fable_modules/fable-library-js.4.28.0/Result.d.ts +37 -0
  82. package/dist/fable_modules/fable-library-js.4.28.0/Result.js +165 -0
  83. package/dist/fable_modules/fable-library-js.4.28.0/Seq.d.ts +165 -0
  84. package/dist/fable_modules/fable-library-js.4.28.0/Seq.js +1378 -0
  85. package/dist/fable_modules/fable-library-js.4.28.0/Seq2.d.ts +18 -0
  86. package/dist/fable_modules/fable-library-js.4.28.0/Seq2.js +111 -0
  87. package/dist/fable_modules/fable-library-js.4.28.0/Set.d.ts +190 -0
  88. package/dist/fable_modules/fable-library-js.4.28.0/Set.js +1789 -0
  89. package/dist/fable_modules/fable-library-js.4.28.0/String.d.ts +58 -0
  90. package/dist/fable_modules/fable-library-js.4.28.0/String.js +554 -0
  91. package/dist/fable_modules/fable-library-js.4.28.0/System.Collections.Generic.d.ts +79 -0
  92. package/dist/fable_modules/fable-library-js.4.28.0/System.Collections.Generic.js +317 -0
  93. package/dist/fable_modules/fable-library-js.4.28.0/System.Text.d.ts +38 -0
  94. package/dist/fable_modules/fable-library-js.4.28.0/System.Text.js +162 -0
  95. package/dist/fable_modules/fable-library-js.4.28.0/SystemException.d.ts +5 -0
  96. package/dist/fable_modules/fable-library-js.4.28.0/SystemException.js +5 -0
  97. package/dist/fable_modules/fable-library-js.4.28.0/TimeOnly.d.ts +15 -0
  98. package/dist/fable_modules/fable-library-js.4.28.0/TimeOnly.js +122 -0
  99. package/dist/fable_modules/fable-library-js.4.28.0/TimeSpan.d.ts +34 -0
  100. package/dist/fable_modules/fable-library-js.4.28.0/TimeSpan.js +177 -0
  101. package/dist/fable_modules/fable-library-js.4.28.0/Timer.d.ts +19 -0
  102. package/dist/fable_modules/fable-library-js.4.28.0/Timer.js +67 -0
  103. package/dist/fable_modules/fable-library-js.4.28.0/Types.d.ts +58 -0
  104. package/dist/fable_modules/fable-library-js.4.28.0/Types.js +208 -0
  105. package/dist/fable_modules/fable-library-js.4.28.0/Unicode.13.0.0.d.ts +2 -0
  106. package/dist/fable_modules/fable-library-js.4.28.0/Unicode.13.0.0.js +4 -0
  107. package/dist/fable_modules/fable-library-js.4.28.0/Uri.d.ts +31 -0
  108. package/dist/fable_modules/fable-library-js.4.28.0/Uri.js +159 -0
  109. package/dist/fable_modules/fable-library-js.4.28.0/Util.d.ts +210 -0
  110. package/dist/fable_modules/fable-library-js.4.28.0/Util.js +769 -0
  111. package/dist/fable_modules/fable-library-js.4.28.0/big.d.ts +338 -0
  112. package/dist/fable_modules/fable-library-js.4.28.0/lib/big.d.ts +5 -0
  113. package/dist/fable_modules/fable-library-js.4.28.0/lib/big.js +825 -0
  114. package/dist/fable_modules/fable-library-js.4.28.0/package.json +24 -0
  115. package/dist/fable_modules/project_cracked.json +1 -0
  116. package/package.json +5 -4
  117. package/.claude/settings.local.json +0 -11
  118. package/copy-latest.sh +0 -1
  119. package/dist/fable-library.2.10.1/Array.js +0 -1336
  120. package/dist/fable-library.2.10.1/Async.js +0 -121
  121. package/dist/fable-library.2.10.1/AsyncBuilder.js +0 -200
  122. package/dist/fable-library.2.10.1/Date.js +0 -501
  123. package/dist/fable-library.2.10.1/Decimal.js +0 -208
  124. package/dist/fable-library.2.10.1/Event.js +0 -193
  125. package/dist/fable-library.2.10.1/Int32.js +0 -157
  126. package/dist/fable-library.2.10.1/List.js +0 -1234
  127. package/dist/fable-library.2.10.1/Long.js +0 -155
  128. package/dist/fable-library.2.10.1/Map.js +0 -1292
  129. package/dist/fable-library.2.10.1/MutableMap.js +0 -360
  130. package/dist/fable-library.2.10.1/MutableSet.js +0 -279
  131. package/dist/fable-library.2.10.1/Observable.js +0 -131
  132. package/dist/fable-library.2.10.1/Option.js +0 -118
  133. package/dist/fable-library.2.10.1/Reflection.js +0 -345
  134. package/dist/fable-library.2.10.1/RegExp.js +0 -118
  135. package/dist/fable-library.2.10.1/Seq.js +0 -917
  136. package/dist/fable-library.2.10.1/Set.js +0 -1692
  137. package/dist/fable-library.2.10.1/String.js +0 -679
  138. package/dist/fable-library.2.10.1/Types.js +0 -308
  139. package/dist/fable-library.2.10.1/Util.js +0 -761
  140. package/dist/helpers.js +0 -31
  141. package/dist/lib/big.js +0 -905
  142. package/dist/lib/long.js +0 -1375
  143. package/index.html +0 -49
@@ -0,0 +1,317 @@
1
+ import { disposeSafe, defaultOf, toIterator, getEnumerator, structuralHash, equals as equals_1, compare } from "./Util.js";
2
+ import { class_type } from "./Reflection.js";
3
+ import { toArray, empty, singleton, append, enumerateWhile, delay } from "./Seq.js";
4
+ import { setItem, initialize, copyTo, fill, item as item_1 } from "./Array.js";
5
+ import { max } from "./Double.js";
6
+ export class Comparer$1 {
7
+ constructor(comparison) {
8
+ this.comparison = comparison;
9
+ }
10
+ Compare(x, y) {
11
+ const _ = this;
12
+ return _.comparison(x, y) | 0;
13
+ }
14
+ }
15
+ export function Comparer$1_$reflection(gen0) {
16
+ return class_type("System.Collections.Generic.Comparer`1", [gen0], Comparer$1);
17
+ }
18
+ export function Comparer$1_$ctor_47C913C(comparison) {
19
+ return new Comparer$1(comparison);
20
+ }
21
+ export function Comparer$1_get_Default() {
22
+ return Comparer$1_$ctor_47C913C(compare);
23
+ }
24
+ export function Comparer$1_Create_47C913C(comparison) {
25
+ return Comparer$1_$ctor_47C913C(comparison);
26
+ }
27
+ export function Comparer$1__Compare_5BDDA0(_, x, y) {
28
+ return _.comparison(x, y);
29
+ }
30
+ export class EqualityComparer$1 {
31
+ constructor(equals, getHashCode) {
32
+ this.equals = equals;
33
+ this.getHashCode = getHashCode;
34
+ }
35
+ Equals(x, y) {
36
+ const _ = this;
37
+ return _.equals(x, y);
38
+ }
39
+ GetHashCode(x) {
40
+ const _ = this;
41
+ return _.getHashCode(x) | 0;
42
+ }
43
+ }
44
+ export function EqualityComparer$1_$reflection(gen0) {
45
+ return class_type("System.Collections.Generic.EqualityComparer`1", [gen0], EqualityComparer$1);
46
+ }
47
+ export function EqualityComparer$1_$ctor_Z6EE254AB(equals, getHashCode) {
48
+ return new EqualityComparer$1(equals, getHashCode);
49
+ }
50
+ export function EqualityComparer$1_get_Default() {
51
+ return EqualityComparer$1_$ctor_Z6EE254AB(equals_1, structuralHash);
52
+ }
53
+ export function EqualityComparer$1_Create_Z6EE254AB(equals, getHashCode) {
54
+ return EqualityComparer$1_$ctor_Z6EE254AB(equals, getHashCode);
55
+ }
56
+ export function EqualityComparer$1__Equals_5BDDA0(_, x, y) {
57
+ return _.equals(x, y);
58
+ }
59
+ export function EqualityComparer$1__GetHashCode_2B595(_, x) {
60
+ return _.getHashCode(x);
61
+ }
62
+ export class Stack$1 {
63
+ constructor(initialContents, initialCount) {
64
+ this.contents = initialContents;
65
+ this.count = (initialCount | 0);
66
+ }
67
+ GetEnumerator() {
68
+ const _ = this;
69
+ return getEnumerator(delay(() => {
70
+ let index = _.count - 1;
71
+ return enumerateWhile(() => (index >= 0), delay(() => append(singleton(item_1(index, _.contents)), delay(() => {
72
+ index = ((index - 1) | 0);
73
+ return empty();
74
+ }))));
75
+ }));
76
+ }
77
+ [Symbol.iterator]() {
78
+ return toIterator(getEnumerator(this));
79
+ }
80
+ "System.Collections.IEnumerable.GetEnumerator"() {
81
+ const this$ = this;
82
+ return getEnumerator(this$);
83
+ }
84
+ }
85
+ export function Stack$1_$reflection(gen0) {
86
+ return class_type("System.Collections.Generic.Stack`1", [gen0], Stack$1);
87
+ }
88
+ function Stack$1_$ctor_Z3B4C077E(initialContents, initialCount) {
89
+ return new Stack$1(initialContents, initialCount);
90
+ }
91
+ export function Stack$1_$ctor_Z524259A4(initialCapacity) {
92
+ return Stack$1_$ctor_Z3B4C077E(fill(new Array(initialCapacity), 0, initialCapacity, null), 0);
93
+ }
94
+ export function Stack$1_$ctor() {
95
+ return Stack$1_$ctor_Z524259A4(4);
96
+ }
97
+ export function Stack$1_$ctor_BB573A(xs) {
98
+ const arr = Array.from(xs);
99
+ return Stack$1_$ctor_Z3B4C077E(arr, arr.length);
100
+ }
101
+ export function Stack$1__Ensure_Z524259A4(_, newSize) {
102
+ const oldSize = _.contents.length | 0;
103
+ if (newSize > oldSize) {
104
+ const old = _.contents;
105
+ _.contents = fill(new Array(max(newSize, oldSize * 2)), 0, max(newSize, oldSize * 2), null);
106
+ copyTo(old, 0, _.contents, 0, _.count);
107
+ }
108
+ }
109
+ export function Stack$1__get_Count(_) {
110
+ return _.count;
111
+ }
112
+ export function Stack$1__Pop(_) {
113
+ _.count = ((_.count - 1) | 0);
114
+ return item_1(_.count, _.contents);
115
+ }
116
+ export function Stack$1__Peek(_) {
117
+ return item_1(_.count - 1, _.contents);
118
+ }
119
+ export function Stack$1__Contains_2B595(_, x) {
120
+ let found = false;
121
+ let i = 0;
122
+ while ((i < _.count) && !found) {
123
+ if (equals_1(x, item_1(i, _.contents))) {
124
+ found = true;
125
+ }
126
+ else {
127
+ i = ((i + 1) | 0);
128
+ }
129
+ }
130
+ return found;
131
+ }
132
+ export function Stack$1__TryPeek_1F3DB691(this$, result) {
133
+ if (this$.count > 0) {
134
+ result.contents = Stack$1__Peek(this$);
135
+ return true;
136
+ }
137
+ else {
138
+ return false;
139
+ }
140
+ }
141
+ export function Stack$1__TryPop_1F3DB691(this$, result) {
142
+ if (this$.count > 0) {
143
+ result.contents = Stack$1__Pop(this$);
144
+ return true;
145
+ }
146
+ else {
147
+ return false;
148
+ }
149
+ }
150
+ export function Stack$1__Push_2B595(this$, x) {
151
+ Stack$1__Ensure_Z524259A4(this$, this$.count + 1);
152
+ this$.contents[this$.count] = x;
153
+ this$.count = ((this$.count + 1) | 0);
154
+ }
155
+ export function Stack$1__Clear(_) {
156
+ _.count = 0;
157
+ fill(_.contents, 0, _.contents.length, defaultOf());
158
+ }
159
+ export function Stack$1__TrimExcess(this$) {
160
+ if ((this$.count / this$.contents.length) > 0.9) {
161
+ Stack$1__Ensure_Z524259A4(this$, this$.count);
162
+ }
163
+ }
164
+ export function Stack$1__ToArray(_) {
165
+ return initialize(_.count, (i) => item_1((_.count - 1) - i, _.contents));
166
+ }
167
+ export class Queue$1 {
168
+ constructor(initialContents, initialCount) {
169
+ this.contents = initialContents;
170
+ this.count = (initialCount | 0);
171
+ this.head = 0;
172
+ this.tail = (((initialCount === this.contents.length) ? 0 : initialCount) | 0);
173
+ }
174
+ GetEnumerator() {
175
+ const _ = this;
176
+ return getEnumerator(Queue$1__toSeq(_));
177
+ }
178
+ [Symbol.iterator]() {
179
+ return toIterator(getEnumerator(this));
180
+ }
181
+ "System.Collections.IEnumerable.GetEnumerator"() {
182
+ const this$ = this;
183
+ return getEnumerator(this$);
184
+ }
185
+ }
186
+ export function Queue$1_$reflection(gen0) {
187
+ return class_type("System.Collections.Generic.Queue`1", [gen0], Queue$1);
188
+ }
189
+ function Queue$1_$ctor_Z3B4C077E(initialContents, initialCount) {
190
+ return new Queue$1(initialContents, initialCount);
191
+ }
192
+ export function Queue$1_$ctor_Z524259A4(initialCapacity) {
193
+ if (initialCapacity < 0) {
194
+ throw new Error("capacity is less than 0");
195
+ }
196
+ return Queue$1_$ctor_Z3B4C077E(fill(new Array(initialCapacity), 0, initialCapacity, null), 0);
197
+ }
198
+ export function Queue$1_$ctor() {
199
+ return Queue$1_$ctor_Z524259A4(4);
200
+ }
201
+ export function Queue$1_$ctor_BB573A(xs) {
202
+ const arr = Array.from(xs);
203
+ return Queue$1_$ctor_Z3B4C077E(arr, arr.length);
204
+ }
205
+ export function Queue$1__get_Count(_) {
206
+ return _.count;
207
+ }
208
+ export function Queue$1__Enqueue_2B595(_, value) {
209
+ if (_.count === Queue$1__size(_)) {
210
+ Queue$1__ensure_Z524259A4(_, _.count + 1);
211
+ }
212
+ _.contents[_.tail] = value;
213
+ _.tail = (((_.tail + 1) % Queue$1__size(_)) | 0);
214
+ _.count = ((_.count + 1) | 0);
215
+ }
216
+ export function Queue$1__Dequeue(_) {
217
+ if (_.count === 0) {
218
+ throw new Error("Queue is empty");
219
+ }
220
+ const value = item_1(_.head, _.contents);
221
+ _.head = (((_.head + 1) % Queue$1__size(_)) | 0);
222
+ _.count = ((_.count - 1) | 0);
223
+ return value;
224
+ }
225
+ export function Queue$1__Peek(_) {
226
+ if (_.count === 0) {
227
+ throw new Error("Queue is empty");
228
+ }
229
+ return item_1(_.head, _.contents);
230
+ }
231
+ export function Queue$1__TryDequeue_1F3DB691(this$, result) {
232
+ if (this$.count === 0) {
233
+ return false;
234
+ }
235
+ else {
236
+ result.contents = Queue$1__Dequeue(this$);
237
+ return true;
238
+ }
239
+ }
240
+ export function Queue$1__TryPeek_1F3DB691(this$, result) {
241
+ if (this$.count === 0) {
242
+ return false;
243
+ }
244
+ else {
245
+ result.contents = Queue$1__Peek(this$);
246
+ return true;
247
+ }
248
+ }
249
+ export function Queue$1__Contains_2B595(_, x) {
250
+ let found = false;
251
+ let i = 0;
252
+ while ((i < _.count) && !found) {
253
+ if (equals_1(x, item_1(Queue$1__toIndex_Z524259A4(_, i), _.contents))) {
254
+ found = true;
255
+ }
256
+ else {
257
+ i = ((i + 1) | 0);
258
+ }
259
+ }
260
+ return found;
261
+ }
262
+ export function Queue$1__Clear(_) {
263
+ _.count = 0;
264
+ _.head = 0;
265
+ _.tail = 0;
266
+ fill(_.contents, 0, Queue$1__size(_), defaultOf());
267
+ }
268
+ export function Queue$1__TrimExcess(_) {
269
+ if ((_.count / _.contents.length) > 0.9) {
270
+ Queue$1__ensure_Z524259A4(_, _.count);
271
+ }
272
+ }
273
+ export function Queue$1__ToArray(_) {
274
+ return toArray(Queue$1__toSeq(_));
275
+ }
276
+ export function Queue$1__CopyTo_Z3B4C077E(_, target, start) {
277
+ let i = start;
278
+ const enumerator = getEnumerator(Queue$1__toSeq(_));
279
+ try {
280
+ while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
281
+ const item = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
282
+ setItem(target, i, item);
283
+ i = ((i + 1) | 0);
284
+ }
285
+ }
286
+ finally {
287
+ disposeSafe(enumerator);
288
+ }
289
+ }
290
+ export function Queue$1__size(this$) {
291
+ return this$.contents.length;
292
+ }
293
+ export function Queue$1__toIndex_Z524259A4(this$, i) {
294
+ return (this$.head + i) % Queue$1__size(this$);
295
+ }
296
+ export function Queue$1__ensure_Z524259A4(this$, requiredSize) {
297
+ const newBuffer = fill(new Array(requiredSize), 0, requiredSize, null);
298
+ if (this$.head < this$.tail) {
299
+ copyTo(this$.contents, this$.head, newBuffer, 0, this$.count);
300
+ }
301
+ else {
302
+ copyTo(this$.contents, this$.head, newBuffer, 0, Queue$1__size(this$) - this$.head);
303
+ copyTo(this$.contents, 0, newBuffer, Queue$1__size(this$) - this$.head, this$.tail);
304
+ }
305
+ this$.head = 0;
306
+ this$.contents = newBuffer;
307
+ this$.tail = (((this$.count === Queue$1__size(this$)) ? 0 : this$.count) | 0);
308
+ }
309
+ export function Queue$1__toSeq(this$) {
310
+ return delay(() => {
311
+ let i = 0;
312
+ return enumerateWhile(() => (i < this$.count), delay(() => append(singleton(item_1(Queue$1__toIndex_Z524259A4(this$, i), this$.contents)), delay(() => {
313
+ i = ((i + 1) | 0);
314
+ return empty();
315
+ }))));
316
+ });
317
+ }
@@ -0,0 +1,38 @@
1
+ import { float64, int32 } from "./Int32.js";
2
+ import { TypeInfo } from "./Reflection.js";
3
+ export declare class StringBuilder {
4
+ readonly buf: string[];
5
+ constructor(value: string, capacity: int32);
6
+ toString(): string;
7
+ }
8
+ export declare function StringBuilder_$reflection(): TypeInfo;
9
+ export declare function StringBuilder_$ctor_Z18115A39(value: string, capacity: int32): StringBuilder;
10
+ export declare function StringBuilder_$ctor_Z524259A4(capacity: int32): StringBuilder;
11
+ export declare function StringBuilder_$ctor_Z721C83C5(value: string): StringBuilder;
12
+ export declare function StringBuilder_$ctor(): StringBuilder;
13
+ export declare function StringBuilder__Append_Z721C83C5(x: StringBuilder, s: string): StringBuilder;
14
+ export declare function StringBuilder__Append_487EF8FB(x: StringBuilder, s: string, startIndex: int32, count: int32): StringBuilder;
15
+ export declare function StringBuilder__Append_244C7CD6(x: StringBuilder, c: string): StringBuilder;
16
+ export declare function StringBuilder__Append_Z524259A4(x: StringBuilder, o: int32): StringBuilder;
17
+ export declare function StringBuilder__Append_5E38073B(x: StringBuilder, o: float64): StringBuilder;
18
+ export declare function StringBuilder__Append_Z1FBCCD16(x: StringBuilder, o: boolean): StringBuilder;
19
+ export declare function StringBuilder__Append_4E60E31B(x: StringBuilder, o: any): StringBuilder;
20
+ export declare function StringBuilder__Append_Z372E4D23(x: StringBuilder, cs: string[]): StringBuilder;
21
+ export declare function StringBuilder__Append_43A65C09(x: StringBuilder, s: StringBuilder): StringBuilder;
22
+ export declare function StringBuilder__AppendFormat_433E080(x: StringBuilder, fmt: string, o: any): StringBuilder;
23
+ export declare function StringBuilder__AppendFormat_Z3B30EC65(x: StringBuilder, fmt: string, o1: any, o2: any): StringBuilder;
24
+ export declare function StringBuilder__AppendFormat_10D165E0(x: StringBuilder, fmt: string, o1: any, o2: any, o3: any): StringBuilder;
25
+ export declare function StringBuilder__AppendFormat_Z17053F5(x: StringBuilder, fmt: string, arr: any[]): StringBuilder;
26
+ export declare function StringBuilder__AppendFormat_Z696D8D1B(x: StringBuilder, provider: any, fmt: string, o: any): StringBuilder;
27
+ export declare function StringBuilder__AppendFormat_26802C9E(x: StringBuilder, provider: any, fmt: string, o1: any, o2: any): StringBuilder;
28
+ export declare function StringBuilder__AppendFormat_Z471ADCBB(x: StringBuilder, provider: any, fmt: string, o1: any, o2: any, o3: any): StringBuilder;
29
+ export declare function StringBuilder__AppendFormat_6C2E3E6E(x: StringBuilder, provider: any, fmt: string, arr: any[]): StringBuilder;
30
+ export declare function StringBuilder__AppendLine(x: StringBuilder): StringBuilder;
31
+ export declare function StringBuilder__AppendLine_Z721C83C5(x: StringBuilder, s: string): StringBuilder;
32
+ export declare function StringBuilder__Clear(x: StringBuilder): StringBuilder;
33
+ export declare function StringBuilder__get_Chars_Z524259A4(x: StringBuilder, index: int32): string;
34
+ export declare function StringBuilder__set_Chars_413E0D0A(x: StringBuilder, index: int32, value: string): void;
35
+ export declare function StringBuilder__Replace_Z766F94C0(x: StringBuilder, oldValue: string, newValue: string): StringBuilder;
36
+ export declare function StringBuilder__Replace_Z384F8060(x: StringBuilder, oldValue: string, newValue: string): StringBuilder;
37
+ export declare function StringBuilder__get_Length(x: StringBuilder): int32;
38
+ export declare function StringBuilder__ToString_Z37302880(x: StringBuilder, firstIndex: int32, length: int32): string;
@@ -0,0 +1,162 @@
1
+ import { replace, format, substring, isNullOrEmpty, join } from "./String.js";
2
+ import { class_type } from "./Reflection.js";
3
+ import { clear, int32ToString } from "./Util.js";
4
+ import { toString } from "./Types.js";
5
+ export class StringBuilder {
6
+ constructor(value, capacity) {
7
+ this.buf = [];
8
+ if (!isNullOrEmpty(value)) {
9
+ void (this.buf.push(value));
10
+ }
11
+ }
12
+ toString() {
13
+ const _ = this;
14
+ return join("", _.buf);
15
+ }
16
+ }
17
+ export function StringBuilder_$reflection() {
18
+ return class_type("System.Text.StringBuilder", undefined, StringBuilder);
19
+ }
20
+ export function StringBuilder_$ctor_Z18115A39(value, capacity) {
21
+ return new StringBuilder(value, capacity);
22
+ }
23
+ export function StringBuilder_$ctor_Z524259A4(capacity) {
24
+ return StringBuilder_$ctor_Z18115A39("", capacity);
25
+ }
26
+ export function StringBuilder_$ctor_Z721C83C5(value) {
27
+ return StringBuilder_$ctor_Z18115A39(value, 16);
28
+ }
29
+ export function StringBuilder_$ctor() {
30
+ return StringBuilder_$ctor_Z18115A39("", 16);
31
+ }
32
+ export function StringBuilder__Append_Z721C83C5(x, s) {
33
+ void (x.buf.push(s));
34
+ return x;
35
+ }
36
+ export function StringBuilder__Append_487EF8FB(x, s, startIndex, count) {
37
+ void (x.buf.push(substring(s, startIndex, count)));
38
+ return x;
39
+ }
40
+ export function StringBuilder__Append_244C7CD6(x, c) {
41
+ void (x.buf.push(c));
42
+ return x;
43
+ }
44
+ export function StringBuilder__Append_Z524259A4(x, o) {
45
+ void (x.buf.push(int32ToString(o)));
46
+ return x;
47
+ }
48
+ export function StringBuilder__Append_5E38073B(x, o) {
49
+ void (x.buf.push(o.toString()));
50
+ return x;
51
+ }
52
+ export function StringBuilder__Append_Z1FBCCD16(x, o) {
53
+ void (x.buf.push(toString(o)));
54
+ return x;
55
+ }
56
+ export function StringBuilder__Append_4E60E31B(x, o) {
57
+ void (x.buf.push(toString(o)));
58
+ return x;
59
+ }
60
+ export function StringBuilder__Append_Z372E4D23(x, cs) {
61
+ void (x.buf.push(cs.join('')));
62
+ return x;
63
+ }
64
+ export function StringBuilder__Append_43A65C09(x, s) {
65
+ void (x.buf.push(toString(s)));
66
+ return x;
67
+ }
68
+ export function StringBuilder__AppendFormat_433E080(x, fmt, o) {
69
+ void (x.buf.push(format(fmt, o)));
70
+ return x;
71
+ }
72
+ export function StringBuilder__AppendFormat_Z3B30EC65(x, fmt, o1, o2) {
73
+ void (x.buf.push(format(fmt, o1, o2)));
74
+ return x;
75
+ }
76
+ export function StringBuilder__AppendFormat_10D165E0(x, fmt, o1, o2, o3) {
77
+ void (x.buf.push(format(fmt, o1, o2, o3)));
78
+ return x;
79
+ }
80
+ export function StringBuilder__AppendFormat_Z17053F5(x, fmt, arr) {
81
+ void (x.buf.push(format(fmt, ...arr)));
82
+ return x;
83
+ }
84
+ export function StringBuilder__AppendFormat_Z696D8D1B(x, provider, fmt, o) {
85
+ void (x.buf.push(format(provider, fmt, o)));
86
+ return x;
87
+ }
88
+ export function StringBuilder__AppendFormat_26802C9E(x, provider, fmt, o1, o2) {
89
+ void (x.buf.push(format(provider, fmt, o1, o2)));
90
+ return x;
91
+ }
92
+ export function StringBuilder__AppendFormat_Z471ADCBB(x, provider, fmt, o1, o2, o3) {
93
+ void (x.buf.push(format(provider, fmt, o1, o2, o3)));
94
+ return x;
95
+ }
96
+ export function StringBuilder__AppendFormat_6C2E3E6E(x, provider, fmt, arr) {
97
+ void (x.buf.push(format(provider, fmt, ...arr)));
98
+ return x;
99
+ }
100
+ export function StringBuilder__AppendLine(x) {
101
+ void (x.buf.push("\n"));
102
+ return x;
103
+ }
104
+ export function StringBuilder__AppendLine_Z721C83C5(x, s) {
105
+ void (x.buf.push(s));
106
+ void (x.buf.push("\n"));
107
+ return x;
108
+ }
109
+ export function StringBuilder__Clear(x) {
110
+ clear(x.buf);
111
+ return x;
112
+ }
113
+ export function StringBuilder__get_Chars_Z524259A4(x, index) {
114
+ let len = 0;
115
+ let i = -1;
116
+ while (((i + 1) < x.buf.length) && (len < index)) {
117
+ i = ((i + 1) | 0);
118
+ len = ((len + x.buf[i].length) | 0);
119
+ }
120
+ if (((index < 0) ? true : (i < 0)) ? true : (i >= x.buf.length)) {
121
+ throw new Error("Index was outside the bounds of the array");
122
+ }
123
+ else {
124
+ const pos = ((len - index) - 1) | 0;
125
+ return x.buf[i][pos];
126
+ }
127
+ }
128
+ export function StringBuilder__set_Chars_413E0D0A(x, index, value) {
129
+ let len = 0;
130
+ let i = -1;
131
+ while (((i + 1) < x.buf.length) && (len < index)) {
132
+ i = ((i + 1) | 0);
133
+ len = ((len + x.buf[i].length) | 0);
134
+ }
135
+ if (((index < 0) ? true : (i < 0)) ? true : (i >= x.buf.length)) {
136
+ throw new Error("Index was outside the bounds of the array");
137
+ }
138
+ else {
139
+ const pos = ((len - index) - 1) | 0;
140
+ x.buf[i] = ((x.buf[i].slice(0, (pos - 1) + 1) + value) + x.buf[i].slice(pos + 1, x.buf[i].length));
141
+ }
142
+ }
143
+ export function StringBuilder__Replace_Z766F94C0(x, oldValue, newValue) {
144
+ for (let i = x.buf.length - 1; i >= 0; i--) {
145
+ x.buf[i] = replace(x.buf[i], oldValue, newValue);
146
+ }
147
+ return x;
148
+ }
149
+ export function StringBuilder__Replace_Z384F8060(x, oldValue, newValue) {
150
+ const str = replace(toString(x), oldValue, newValue);
151
+ return StringBuilder__Append_Z721C83C5(StringBuilder__Clear(x), str);
152
+ }
153
+ export function StringBuilder__get_Length(x) {
154
+ let len = 0;
155
+ for (let i = x.buf.length - 1; i >= 0; i--) {
156
+ len = ((len + x.buf[i].length) | 0);
157
+ }
158
+ return len | 0;
159
+ }
160
+ export function StringBuilder__ToString_Z37302880(x, firstIndex, length) {
161
+ return substring(toString(x), firstIndex, length);
162
+ }
@@ -0,0 +1,5 @@
1
+ import { Exception } from "./Types.js";
2
+ export declare class SystemException extends Exception {
3
+ }
4
+ export declare class TimeoutException extends SystemException {
5
+ }
@@ -0,0 +1,5 @@
1
+ import { Exception } from "./Types.js";
2
+ export class SystemException extends Exception {
3
+ }
4
+ export class TimeoutException extends SystemException {
5
+ }
@@ -0,0 +1,15 @@
1
+ import { FSharpRef } from "./Types.js";
2
+ import { IDateTime } from "./Util.js";
3
+ export declare function create(h?: number, m?: number, s?: number, ms?: number): number;
4
+ export declare function fromTicks(ticks: number | bigint): number;
5
+ export declare function fromTimeSpan(timeSpan: number): number;
6
+ export declare function fromDateTime(d: IDateTime): number;
7
+ export declare function maxValue(): number;
8
+ export declare function add(t: number, ts: number, wrappedDays?: FSharpRef<number>): number;
9
+ export declare function addHours(t: number, h: number): number;
10
+ export declare function addMinutes(t: number, m: number): number;
11
+ export declare function isBetween(t: number, start: number, end: number): boolean;
12
+ export declare function toString(t: number, format?: string, _provider?: any): string;
13
+ export declare function parse(str: string): number;
14
+ export declare function tryParse(v: string, defValue: FSharpRef<number>): boolean;
15
+ export declare function op_Subtraction(left: number, right: number): number;
@@ -0,0 +1,122 @@
1
+ import { hours, minutes, seconds, milliseconds } from "./TimeSpan.js";
2
+ import { padWithZeros } from "./Util.js";
3
+ const millisecondsPerDay = 86400000;
4
+ export function create(h = 0, m = 0, s = 0, ms = 0) {
5
+ if (h < 0 || m < 0 || s < 0 || ms < 0)
6
+ throw new Error("The parameters describe an unrepresentable TimeOnly.");
7
+ return h * 3600000 + m * 60000 + s * 1000 + ms;
8
+ }
9
+ export function fromTicks(ticks) {
10
+ return Number(BigInt(ticks) / 10000n);
11
+ }
12
+ export function fromTimeSpan(timeSpan) {
13
+ if (timeSpan < 0 || timeSpan >= millisecondsPerDay)
14
+ throw new Error("The TimeSpan describes an unrepresentable TimeOnly.");
15
+ return timeSpan;
16
+ }
17
+ export function fromDateTime(d) {
18
+ return d.kind === 1 /* DateKind.UTC */
19
+ ? create(d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(), d.getUTCMilliseconds())
20
+ : create(d.getHours(), d.getMinutes(), d.getSeconds(), d.getMilliseconds());
21
+ }
22
+ export function maxValue() {
23
+ // This is "23:59:59.999"
24
+ return millisecondsPerDay - 1;
25
+ }
26
+ export function add(t, ts, wrappedDays) {
27
+ if (wrappedDays === undefined) {
28
+ const t2 = (t + ts) % millisecondsPerDay;
29
+ return t2 < 0 ? millisecondsPerDay + t2 : t2;
30
+ }
31
+ wrappedDays.contents = ts / millisecondsPerDay;
32
+ let newMs = t + ts % millisecondsPerDay;
33
+ if (newMs < 0) {
34
+ wrappedDays.contents--;
35
+ newMs += millisecondsPerDay;
36
+ }
37
+ else {
38
+ if (newMs >= millisecondsPerDay) {
39
+ wrappedDays.contents++;
40
+ newMs -= millisecondsPerDay;
41
+ }
42
+ }
43
+ return newMs;
44
+ }
45
+ export function addHours(t, h) {
46
+ return add(t, h * 3600000);
47
+ }
48
+ export function addMinutes(t, m) {
49
+ return add(t, m * 60000);
50
+ }
51
+ export function isBetween(t, start, end) {
52
+ return start <= end
53
+ ? (start <= t && end > t)
54
+ : (start <= t || end > t);
55
+ }
56
+ export function toString(t, format = "t", _provider) {
57
+ if (["r", "R", "o", "O", "t", "T"].indexOf(format) === -1) {
58
+ throw new Error("Custom formats are not supported");
59
+ }
60
+ const base = `${padWithZeros(hours(t), 2)}:${padWithZeros(minutes(t), 2)}`;
61
+ if (format === "t")
62
+ return base;
63
+ const s = padWithZeros(seconds(t), 2);
64
+ // We're limited to millisecond precision, so the last 4 digits will always be 0
65
+ return `${base}${format === "o" || format === "O" ? `:${s}.${padWithZeros(milliseconds(t), 3)}0000` : `:${s}`}`;
66
+ }
67
+ export function parse(str) {
68
+ // Allowed format types:
69
+ // hh:mm
70
+ // hh:mm:ss
71
+ // hh:mm:ss.fffffff
72
+ const r = /^\s*([0-1]?\d|2[0-3])\s*:\s*([0-5]?\d)(\s*:\s*([0-5]?\d)(\.(\d+))?)?\s*$/.exec(str);
73
+ if (r != null && r[1] != null && r[2] != null) {
74
+ let ms = 0;
75
+ let s = 0;
76
+ const h = +r[1];
77
+ const m = +r[2];
78
+ if (r[4] != null) {
79
+ s = +r[4];
80
+ }
81
+ if (r[6] != null) {
82
+ // Depending on the number of decimals passed, we need to adapt the numbers
83
+ switch (r[6].length) {
84
+ case 1:
85
+ ms = +r[6] * 100;
86
+ break;
87
+ case 2:
88
+ ms = +r[6] * 10;
89
+ break;
90
+ case 3:
91
+ ms = +r[6];
92
+ break;
93
+ case 4:
94
+ ms = +r[6] / 10;
95
+ break;
96
+ case 5:
97
+ ms = +r[6] / 100;
98
+ break;
99
+ case 6:
100
+ ms = +r[6] / 1000;
101
+ break;
102
+ default:
103
+ ms = +r[6].substring(0, 7) / 10000;
104
+ break;
105
+ }
106
+ }
107
+ return create(h, m, s, Math.trunc(ms));
108
+ }
109
+ throw new Error(`String '${str}' was not recognized as a valid TimeOnly.`);
110
+ }
111
+ export function tryParse(v, defValue) {
112
+ try {
113
+ defValue.contents = parse(v);
114
+ return true;
115
+ }
116
+ catch {
117
+ return false;
118
+ }
119
+ }
120
+ export function op_Subtraction(left, right) {
121
+ return add(left, -right);
122
+ }