@magnusopera/fscript 0.87.2 → 0.88.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.
@@ -0,0 +1,1997 @@
1
+
2
+ import { filter, zip, append, contains, tail as tail_2, head as head_2, isEmpty, cons, reverse, singleton, empty, map, ofArray, foldBack } from "../fable_modules/fable-library-js.5.24.0/List.js";
3
+ import { Scheme, Type } from "./Types.js";
4
+ import { FSharpMap__get_Item, ofList } from "../fable_modules/fable-library-js.5.24.0/Map.js";
5
+ import { round, curry2, sign, Exception, stringHash, equals, comparePrimitives } from "../fable_modules/fable-library-js.5.24.0/Util.js";
6
+ import { ofSeq, ofList as ofList_1 } from "../fable_modules/fable-library-js.5.24.0/Set.js";
7
+ import { concat, replicate, padRight, padLeft, indexOf, replace, compareOrdinal, substring, trimEnd, split, join, startsWith } from "../fable_modules/fable-library-js.5.24.0/String.js";
8
+ import { item, setItem, fill, fold } from "../fable_modules/fable-library-js.5.24.0/Array.js";
9
+ import { map as map_1, delay, toArray, forAll } from "../fable_modules/fable-library-js.5.24.0/Seq.js";
10
+ import { Value } from "./Value.js";
11
+ import { compare, toInt32_unchecked, fromFloat64, max, min, toFloat64, abs, equals as equals_1, fromInt32, toInt64_unchecked } from "../fable_modules/fable-library-js.5.24.0/BigInt.js";
12
+ import { isInfinity, max as max_1, min as min_1 } from "../fable_modules/fable-library-js.5.24.0/Double.js";
13
+
14
+ function fn(arguments$, result) {
15
+ return foldBack((argument, result_1) => (new Type(/* TFun */ 11, [argument, result_1])), arguments$, result);
16
+ }
17
+
18
+ export const patternInput$00408 = [new Type(/* TVar */ 15, [0]), new Type(/* TVar */ 15, [1]), new Type(/* TVar */ 15, [2]), new Type(/* TVar */ 15, [3])];
19
+
20
+ export const s = patternInput$00408[3];
21
+
22
+ export const k = patternInput$00408[2];
23
+
24
+ export const b = patternInput$00408[1];
25
+
26
+ const a = patternInput$00408[0];
27
+
28
+ export const versionFields = ofArray(["Major", "Minor", "Patch", "PreRelease", "Build"]);
29
+
30
+ export const versionType = new Type(/* TRecord */ 8, [ofList(map((name) => [name, Type.TString], versionFields), {
31
+ Compare: (x, y) => (comparePrimitives(x, y) | 0),
32
+ })]);
33
+
34
+ export const signatures = ofArray([["String.compare", new Scheme(empty(), fn(ofArray([Type.TString, Type.TString]), Type.TInt)), ofArray(["left", "right"])], ["Int.abs", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TInt, Type.TInt])), singleton("value")], ["Int.sign", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TInt, Type.TInt])), singleton("value")], ["Int.min", new Scheme(empty(), fn(ofArray([Type.TInt, Type.TInt]), Type.TInt)), ofArray(["left", "right"])], ["Int.max", new Scheme(empty(), fn(ofArray([Type.TInt, Type.TInt]), Type.TInt)), ofArray(["left", "right"])], ["Int.clamp", new Scheme(empty(), fn(ofArray([Type.TInt, Type.TInt, Type.TInt]), Type.TInt)), ofArray(["minimum", "maximum", "value"])], ["Float.abs", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TFloat, Type.TFloat])), singleton("value")], ["Float.sign", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TFloat, Type.TInt])), singleton("value")], ["Float.min", new Scheme(empty(), fn(ofArray([Type.TFloat, Type.TFloat]), Type.TFloat)), ofArray(["left", "right"])], ["Float.max", new Scheme(empty(), fn(ofArray([Type.TFloat, Type.TFloat]), Type.TFloat)), ofArray(["left", "right"])], ["Float.clamp", new Scheme(empty(), fn(ofArray([Type.TFloat, Type.TFloat, Type.TFloat]), Type.TFloat)), ofArray(["minimum", "maximum", "value"])], ["Float.floor", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TFloat, Type.TFloat])), singleton("value")], ["Float.ceil", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TFloat, Type.TFloat])), singleton("value")], ["Float.round", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TFloat, Type.TFloat])), singleton("value")], ["Float.truncate", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TFloat, Type.TFloat])), singleton("value")], ["Float.sqrt", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TFloat, Type.TFloat])), singleton("value")], ["Float.log", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TFloat, Type.TFloat])), singleton("value")], ["Float.log10", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TFloat, Type.TFloat])), singleton("value")], ["Float.exp", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TFloat, Type.TFloat])), singleton("value")], ["Float.sin", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TFloat, Type.TFloat])), singleton("value")], ["Float.cos", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TFloat, Type.TFloat])), singleton("value")], ["Float.tan", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TFloat, Type.TFloat])), singleton("value")], ["Float.asin", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TFloat, Type.TFloat])), singleton("value")], ["Float.acos", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TFloat, Type.TFloat])), singleton("value")], ["Float.atan", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TFloat, Type.TFloat])), singleton("value")], ["Float.pow", new Scheme(empty(), fn(ofArray([Type.TFloat, Type.TFloat]), Type.TFloat)), ofArray(["left", "right"])], ["Float.atan2", new Scheme(empty(), fn(ofArray([Type.TFloat, Type.TFloat]), Type.TFloat)), ofArray(["left", "right"])], ["Float.isNaN", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TFloat, Type.TBool])), singleton("value")], ["Float.isInfinity", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TFloat, Type.TBool])), singleton("value")], ["Float.isFinite", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TFloat, Type.TBool])), singleton("value")], ["Float.pi", new Scheme(empty(), Type.TFloat), empty()], ["Int.toFloat", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TInt, Type.TFloat])), singleton("value")], ["Float.tryToInt", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TFloat, new Type(/* TOption */ 10, [Type.TInt])])), singleton("value")], ["String.length", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TString, Type.TInt])), singleton("source")], ["String.isEmpty", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TString, Type.TBool])), singleton("source")], ["String.isWhiteSpace", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TString, Type.TBool])), singleton("source")], ["String.trim", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TString, Type.TString])), singleton("source")], ["String.trimStart", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TString, Type.TString])), singleton("source")], ["String.trimEnd", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TString, Type.TString])), singleton("source")], ["String.splitLines", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TString, new Type(/* TList */ 5, [Type.TString])])), singleton("source")], ["String.startsWith", new Scheme(empty(), fn(ofArray([Type.TString, Type.TString]), Type.TBool)), ofArray(["value", "source"])], ["String.contains", new Scheme(empty(), fn(ofArray([Type.TString, Type.TString]), Type.TBool)), ofArray(["value", "source"])], ["String.padLeft", new Scheme(empty(), fn(ofArray([Type.TInt, Type.TString]), Type.TString)), ofArray(["count", "source"])], ["String.padRight", new Scheme(empty(), fn(ofArray([Type.TInt, Type.TString]), Type.TString)), ofArray(["count", "source"])], ["String.repeat", new Scheme(empty(), fn(ofArray([Type.TInt, Type.TString]), Type.TString)), ofArray(["count", "source"])], ["List.isEmpty", new Scheme(singleton(0), fn(singleton(new Type(/* TList */ 5, [a])), Type.TBool)), singleton("values")], ["List.forall", new Scheme(singleton(0), fn(ofArray([fn(singleton(a), Type.TBool), new Type(/* TList */ 5, [a])]), Type.TBool)), ofArray(["predicate", "values"])], ["List.mapi", new Scheme(ofArray([0, 1]), fn(ofArray([fn(ofArray([Type.TInt, a]), b), new Type(/* TList */ 5, [a])]), new Type(/* TList */ 5, [b]))), ofArray(["mapper", "values"])], ["List.indexed", new Scheme(singleton(0), fn(singleton(new Type(/* TList */ 5, [a])), new Type(/* TList */ 5, [new Type(/* TTuple */ 7, [ofArray([Type.TInt, a])])]))), singleton("values")], ["List.init", new Scheme(singleton(0), fn(ofArray([Type.TInt, fn(singleton(Type.TInt), a)]), new Type(/* TList */ 5, [a]))), ofArray(["count", "initializer"])], ["List.take", new Scheme(singleton(0), fn(ofArray([Type.TInt, new Type(/* TList */ 5, [a])]), new Type(/* TList */ 5, [a]))), ofArray(["count", "values"])], ["List.skip", new Scheme(singleton(0), fn(ofArray([Type.TInt, new Type(/* TList */ 5, [a])]), new Type(/* TList */ 5, [a]))), ofArray(["count", "values"])], ["List.takeWhile", new Scheme(singleton(0), fn(ofArray([fn(singleton(a), Type.TBool), new Type(/* TList */ 5, [a])]), new Type(/* TList */ 5, [a]))), ofArray(["predicate", "values"])], ["List.skipWhile", new Scheme(singleton(0), fn(ofArray([fn(singleton(a), Type.TBool), new Type(/* TList */ 5, [a])]), new Type(/* TList */ 5, [a]))), ofArray(["predicate", "values"])], ["List.partition", new Scheme(singleton(0), fn(ofArray([fn(singleton(a), Type.TBool), new Type(/* TList */ 5, [a])]), new Type(/* TTuple */ 7, [ofArray([new Type(/* TList */ 5, [a]), new Type(/* TList */ 5, [a])])]))), ofArray(["predicate", "values"])], ["List.zip", new Scheme(ofArray([0, 1]), fn(ofArray([new Type(/* TList */ 5, [a]), new Type(/* TList */ 5, [b])]), new Type(/* TList */ 5, [new Type(/* TTuple */ 7, [ofArray([a, b])])]))), ofArray(["left", "right"])], ["List.unzip", new Scheme(ofArray([0, 1]), fn(singleton(new Type(/* TList */ 5, [new Type(/* TTuple */ 7, [ofArray([a, b])])])), new Type(/* TTuple */ 7, [ofArray([new Type(/* TList */ 5, [a]), new Type(/* TList */ 5, [b])])]))), singleton("pairs")], ["List.chunkBySize", new Scheme(singleton(0), fn(ofArray([Type.TInt, new Type(/* TList */ 5, [a])]), new Type(/* TList */ 5, [new Type(/* TList */ 5, [a])]))), ofArray(["size", "values"])], ["List.scan", new Scheme(ofArray([0, 3]), fn(ofArray([fn(ofArray([s, a]), s), s, new Type(/* TList */ 5, [a])]), new Type(/* TList */ 5, [s]))), ofArray(["folder", "state", "values"])], ["List.sortWith", new Scheme(singleton(0), fn(ofArray([fn(ofArray([a, a]), Type.TInt), new Type(/* TList */ 5, [a])]), new Type(/* TList */ 5, [a]))), ofArray(["comparer", "values"])], ["List.sortBy", new Scheme(ofArray([0, 2]), fn(ofArray([fn(singleton(a), k), new Type(/* TList */ 5, [a])]), new Type(/* TList */ 5, [a]))), ofArray(["projection", "values"])], ["List.distinctBy", new Scheme(ofArray([0, 2]), fn(ofArray([fn(singleton(a), k), new Type(/* TList */ 5, [a])]), new Type(/* TList */ 5, [a]))), ofArray(["projection", "values"])], ["List.groupBy", new Scheme(ofArray([0, 2]), fn(ofArray([fn(singleton(a), k), new Type(/* TList */ 5, [a])]), new Type(/* TList */ 5, [new Type(/* TTuple */ 7, [ofArray([k, new Type(/* TList */ 5, [a])])])]))), ofArray(["projection", "values"])], ["List.countBy", new Scheme(ofArray([0, 2]), fn(ofArray([fn(singleton(a), k), new Type(/* TList */ 5, [a])]), new Type(/* TList */ 5, [new Type(/* TTuple */ 7, [ofArray([k, Type.TInt])])]))), ofArray(["projection", "values"])], ["Map.keys", new Scheme(ofArray([0, 2]), fn(singleton(new Type(/* TMap */ 9, [k, a])), new Type(/* TList */ 5, [k]))), singleton("values")], ["Map.values", new Scheme(ofArray([0, 2]), fn(singleton(new Type(/* TMap */ 9, [k, a])), new Type(/* TList */ 5, [a]))), singleton("values")], ["Map.toList", new Scheme(ofArray([0, 2]), fn(singleton(new Type(/* TMap */ 9, [k, a])), new Type(/* TList */ 5, [new Type(/* TTuple */ 7, [ofArray([k, a])])]))), singleton("values")], ["Map.exists", new Scheme(ofArray([0, 2]), fn(ofArray([fn(ofArray([k, a]), Type.TBool), new Type(/* TMap */ 9, [k, a])]), Type.TBool)), ofArray(["predicate", "values"])], ["Map.forall", new Scheme(ofArray([0, 2]), fn(ofArray([fn(ofArray([k, a]), Type.TBool), new Type(/* TMap */ 9, [k, a])]), Type.TBool)), ofArray(["predicate", "values"])], ["Map.update", new Scheme(ofArray([0, 2]), fn(ofArray([k, fn(singleton(new Type(/* TOption */ 10, [a])), new Type(/* TOption */ 10, [a])), new Type(/* TMap */ 9, [k, a])]), new Type(/* TMap */ 9, [k, a]))), ofArray(["key", "updater", "values"])], ["Map.mergeWith", new Scheme(ofArray([0, 2]), fn(ofArray([fn(ofArray([k, a, a]), a), new Type(/* TMap */ 9, [k, a]), new Type(/* TMap */ 9, [k, a])]), new Type(/* TMap */ 9, [k, a]))), ofArray(["resolver", "left", "right"])], ["Option.bind", new Scheme(ofArray([0, 1]), fn(ofArray([fn(singleton(a), new Type(/* TOption */ 10, [b])), new Type(/* TOption */ 10, [a])]), new Type(/* TOption */ 10, [b]))), ofArray(["binder", "value"])], ["Option.flatten", new Scheme(singleton(0), fn(singleton(new Type(/* TOption */ 10, [new Type(/* TOption */ 10, [a])])), new Type(/* TOption */ 10, [a]))), singleton("value")], ["Option.filter", new Scheme(singleton(0), fn(ofArray([fn(singleton(a), Type.TBool), new Type(/* TOption */ 10, [a])]), new Type(/* TOption */ 10, [a]))), ofArray(["predicate", "value"])], ["Option.orElse", new Scheme(singleton(0), fn(ofArray([new Type(/* TOption */ 10, [a]), new Type(/* TOption */ 10, [a])]), new Type(/* TOption */ 10, [a]))), ofArray(["fallback", "value"])], ["Option.orElseWith", new Scheme(singleton(0), fn(ofArray([fn(singleton(Type.TUnit), new Type(/* TOption */ 10, [a])), new Type(/* TOption */ 10, [a])]), new Type(/* TOption */ 10, [a]))), ofArray(["fallback", "value"])], ["Option.map2", new Scheme(ofArray([0, 1, 3]), fn(ofArray([fn(ofArray([a, b]), s), new Type(/* TOption */ 10, [a]), new Type(/* TOption */ 10, [b])]), new Type(/* TOption */ 10, [s]))), ofArray(["mapper", "left", "right"])], ["Option.toList", new Scheme(singleton(0), fn(singleton(new Type(/* TOption */ 10, [a])), new Type(/* TList */ 5, [a]))), singleton("value")], ["Path.normalize", new Scheme(empty(), fn(singleton(Type.TString), Type.TString)), singleton("path")], ["Path.isAbsolute", new Scheme(empty(), fn(singleton(Type.TString), Type.TBool)), singleton("path")], ["Path.combine", new Scheme(empty(), fn(ofArray([Type.TString, Type.TString]), Type.TString)), ofArray(["left", "right"])], ["Path.fileName", new Scheme(empty(), fn(singleton(Type.TString), Type.TString)), singleton("path")], ["Path.extension", new Scheme(empty(), fn(singleton(Type.TString), new Type(/* TOption */ 10, [Type.TString]))), singleton("path")], ["Path.fileNameWithoutExtension", new Scheme(empty(), fn(singleton(Type.TString), Type.TString)), singleton("path")], ["Path.parent", new Scheme(empty(), fn(singleton(Type.TString), new Type(/* TOption */ 10, [Type.TString]))), singleton("path")], ["Path.relative", new Scheme(empty(), fn(ofArray([Type.TString, Type.TString]), new Type(/* TOption */ 10, [Type.TString]))), ofArray(["basePath", "targetPath"])], ["Glob.isMatch", new Scheme(empty(), fn(ofArray([Type.TString, Type.TString]), Type.TBool)), ofArray(["pattern", "path"])], ["Glob.filter", new Scheme(empty(), fn(ofArray([Type.TString, new Type(/* TList */ 5, [Type.TString])]), new Type(/* TList */ 5, [Type.TString]))), ofArray(["pattern", "paths"])], ["SemVer.tryParse", new Scheme(empty(), fn(singleton(Type.TString), new Type(/* TOption */ 10, [versionType]))), singleton("version")], ["SemVer.format", new Scheme(empty(), fn(singleton(versionType), Type.TString)), singleton("version")], ["SemVer.compare", new Scheme(empty(), fn(ofArray([Type.TString, Type.TString]), new Type(/* TOption */ 10, [Type.TInt]))), ofArray(["left", "right"])]]);
35
+
36
+ export const names = ofList_1(map((tupledArg) => tupledArg[0], signatures), {
37
+ Compare: (x, y) => (comparePrimitives(x, y) | 0),
38
+ });
39
+
40
+ export const totalFunctions = ofSeq(["String.compare", "Int.min", "Int.max", "Float.abs", "Float.min", "Float.max", "Float.floor", "Float.ceil", "Float.round", "Float.truncate", "Float.sqrt", "Float.log", "Float.log10", "Float.exp", "Float.sin", "Float.cos", "Float.tan", "Float.asin", "Float.acos", "Float.atan", "Float.pow", "Float.atan2", "Float.isNaN", "Float.isInfinity", "Float.isFinite", "Float.pi", "Int.toFloat", "Float.tryToInt", "String.length", "String.isEmpty", "String.isWhiteSpace", "String.trim", "String.trimStart", "String.trimEnd", "String.splitLines", "String.startsWith", "String.contains"], {
41
+ Compare: (x, y) => (comparePrimitives(x, y) | 0),
42
+ });
43
+
44
+ export function normalizePath(path) {
45
+ const absolute = startsWith(path, "/", 4);
46
+ const text = join("/", reverse(fold((acc, part) => {
47
+ let matchResult, head_1, tail_1;
48
+ switch (part) {
49
+ case "":
50
+ case ".": {
51
+ matchResult = 0;
52
+ break;
53
+ }
54
+ case "..": {
55
+ if (!isEmpty(acc)) {
56
+ if (head_2(acc) !== "..") {
57
+ matchResult = 1;
58
+ head_1 = head_2(acc);
59
+ tail_1 = tail_2(acc);
60
+ }
61
+ else if (absolute) {
62
+ matchResult = 2;
63
+ }
64
+ else {
65
+ matchResult = 3;
66
+ }
67
+ }
68
+ else if (absolute) {
69
+ matchResult = 2;
70
+ }
71
+ else {
72
+ matchResult = 3;
73
+ }
74
+ break;
75
+ }
76
+ default:
77
+ matchResult = 3;
78
+ }
79
+ switch (matchResult) {
80
+ case 0:
81
+ return acc;
82
+ case 1:
83
+ return tail_1;
84
+ case 2:
85
+ return acc;
86
+ default:
87
+ return cons(part, acc);
88
+ }
89
+ }, empty(), split(path, ["/"], undefined, 0))));
90
+ if (absolute) {
91
+ return "/" + text;
92
+ }
93
+ else if (text === "") {
94
+ return ".";
95
+ }
96
+ else {
97
+ return text;
98
+ }
99
+ }
100
+
101
+ export function fileName(path) {
102
+ const path_1 = trimEnd(path, "/");
103
+ return substring(path_1, path_1.lastIndexOf("/") + 1);
104
+ }
105
+
106
+ export function relativePath(basis, target) {
107
+ const matchValue = normalizePath(basis);
108
+ const target_1 = normalizePath(target);
109
+ const basis_1 = matchValue;
110
+ if (startsWith(basis_1, "/", 4) !== startsWith(target_1, "/", 4)) {
111
+ return undefined;
112
+ }
113
+ else {
114
+ const parts = (path) => {
115
+ let array;
116
+ return ofArray((array = split(path, ["/"], undefined, 0), array.filter((part) => {
117
+ if (part !== "") {
118
+ return part !== ".";
119
+ }
120
+ else {
121
+ return false;
122
+ }
123
+ })));
124
+ };
125
+ const removeCommon = (left_mut, right_mut) => {
126
+ removeCommon:
127
+ while (true) {
128
+ const left = left_mut, right = right_mut;
129
+ let matchResult, a_2, b_2, xs_1, ys_1;
130
+ if (!isEmpty(left)) {
131
+ if (!isEmpty(right)) {
132
+ if (equals(head_2(left), head_2(right))) {
133
+ matchResult = 0;
134
+ a_2 = head_2(left);
135
+ b_2 = head_2(right);
136
+ xs_1 = tail_2(left);
137
+ ys_1 = tail_2(right);
138
+ }
139
+ else {
140
+ matchResult = 1;
141
+ }
142
+ }
143
+ else {
144
+ matchResult = 1;
145
+ }
146
+ }
147
+ else {
148
+ matchResult = 1;
149
+ }
150
+ switch (matchResult) {
151
+ case 0: {
152
+ left_mut = xs_1;
153
+ right_mut = ys_1;
154
+ continue removeCommon;
155
+ }
156
+ default:
157
+ return [left, right];
158
+ }
159
+ break;
160
+ }
161
+ };
162
+ const patternInput_1 = removeCommon(parts(basis_1), parts(target_1));
163
+ const left_1 = patternInput_1[0];
164
+ if (contains("..", left_1, {
165
+ Equals: (x, y) => (x === y),
166
+ GetHashCode: (x) => (stringHash(x) | 0),
167
+ })) {
168
+ return undefined;
169
+ }
170
+ else {
171
+ return normalizePath(join("/", append(map((_arg) => "..", left_1), patternInput_1[1])));
172
+ }
173
+ }
174
+ }
175
+
176
+ function segmentMatch(pattern, text) {
177
+ let previous = fill(new Array(text.length + 1), 0, text.length + 1, false);
178
+ setItem(previous, 0, true);
179
+ for (let tokenIndex = 0; tokenIndex <= (pattern.length - 1); tokenIndex++) {
180
+ const token = pattern[tokenIndex];
181
+ const current = fill(new Array(text.length + 1), 0, text.length + 1, false);
182
+ if (token === "*") {
183
+ setItem(current, 0, item(0, previous));
184
+ }
185
+ for (let index = 1; index <= text.length; index++) {
186
+ setItem(current, index, (token === "*") ? (item(index, previous) ? true : item(index - 1, current)) : (item(index - 1, previous) && ((token === "?") ? true : (token === text[index - 1]))));
187
+ }
188
+ previous = current;
189
+ }
190
+ return item(text.length, previous);
191
+ }
192
+
193
+ export function globMatch(pattern, path) {
194
+ const tokens = split(pattern, ["/"], undefined, 0);
195
+ const parts = split(path, ["/"], undefined, 0);
196
+ if (tokens.some((token) => {
197
+ if (token.indexOf("**") >= 0) {
198
+ return token !== "**";
199
+ }
200
+ else {
201
+ return false;
202
+ }
203
+ })) {
204
+ throw new Exception("Glob ** must occupy an entire path segment. (Parameter \'pattern\')");
205
+ }
206
+ let previous = fill(new Array(parts.length + 1), 0, parts.length + 1, false);
207
+ setItem(previous, 0, true);
208
+ for (let idx = 0; idx <= (tokens.length - 1); idx++) {
209
+ const token_1 = item(idx, tokens);
210
+ const current = fill(new Array(parts.length + 1), 0, parts.length + 1, false);
211
+ if (token_1 === "**") {
212
+ setItem(current, 0, item(0, previous));
213
+ }
214
+ for (let index = 1; index <= parts.length; index++) {
215
+ setItem(current, index, (token_1 === "**") ? (item(index, previous) ? true : (item(index - 1, current) && (item(index - 1, parts) !== ""))) : (item(index - 1, previous) && segmentMatch(token_1, item(index - 1, parts))));
216
+ }
217
+ previous = current;
218
+ }
219
+ return item(parts.length, previous);
220
+ }
221
+
222
+ function digits(text) {
223
+ if (text.length > 0) {
224
+ return forAll((c) => {
225
+ if (c >= "0") {
226
+ return c <= "9";
227
+ }
228
+ else {
229
+ return false;
230
+ }
231
+ }, text.split(""));
232
+ }
233
+ else {
234
+ return false;
235
+ }
236
+ }
237
+
238
+ function numericIdentifier(text) {
239
+ if (digits(text)) {
240
+ if (text === "0") {
241
+ return true;
242
+ }
243
+ else {
244
+ return !startsWith(text, "0", 4);
245
+ }
246
+ }
247
+ else {
248
+ return false;
249
+ }
250
+ }
251
+
252
+ function validIdentifiers(allowLeadingZeros, text) {
253
+ const array = split(text, ["."], undefined, 0);
254
+ return array.every((part) => {
255
+ if ((part.length > 0) && forAll((c) => {
256
+ if ((((c >= "0") && (c <= "9")) ? true : ((c >= "a") && (c <= "z"))) ? true : ((c >= "A") && (c <= "Z"))) {
257
+ return true;
258
+ }
259
+ else {
260
+ return c === "-";
261
+ }
262
+ }, part.split(""))) {
263
+ if (allowLeadingZeros ? true : !digits(part)) {
264
+ return true;
265
+ }
266
+ else {
267
+ return numericIdentifier(part);
268
+ }
269
+ }
270
+ else {
271
+ return false;
272
+ }
273
+ });
274
+ }
275
+
276
+ /**
277
+ * Decimal components remain strings so SemVer precedence has no integer size limit.
278
+ */
279
+ export function parseVersion(text) {
280
+ const splitOnce = (separator, value) => {
281
+ const matchValue = value.indexOf(separator) | 0;
282
+ if (matchValue === -1) {
283
+ return [value, ""];
284
+ }
285
+ else {
286
+ const index = matchValue | 0;
287
+ return [substring(value, 0, index), substring(value, index + 1)];
288
+ }
289
+ };
290
+ const patternInput = splitOnce("+", text);
291
+ const withoutBuild = patternInput[0];
292
+ const build = patternInput[1];
293
+ const patternInput_1 = splitOnce("-", withoutBuild);
294
+ const prerelease = patternInput_1[1];
295
+ const numbers = split(patternInput_1[0], ["."], undefined, 0);
296
+ if ((((numbers.length !== 3) ? true : !numbers.every(numericIdentifier)) ? true : ((text.indexOf("+") >= 0) && !validIdentifiers(true, build))) ? true : ((withoutBuild.indexOf("-") >= 0) && !validIdentifiers(false, prerelease))) {
297
+ return undefined;
298
+ }
299
+ else {
300
+ return [item(0, numbers), item(1, numbers), item(2, numbers), prerelease, build];
301
+ }
302
+ }
303
+
304
+ export function formatVersion(parts) {
305
+ const text = (join(".", parts.slice(0, 2 + 1)) + ((item(3, parts) === "") ? "" : ("-" + item(3, parts)))) + ((item(4, parts) === "") ? "" : ("+" + item(4, parts)));
306
+ if (parseVersion(text) == null) {
307
+ throw new Exception("Invalid semantic version components. (Parameter \'version\')");
308
+ }
309
+ return text;
310
+ }
311
+
312
+ export function compareVersions(left, right) {
313
+ const ordinal = (a_1, b_1) => (sign(compareOrdinal(a_1, b_1)) | 0);
314
+ const number = (a_2, b_2) => {
315
+ if (a_2.length === b_2.length) {
316
+ return ordinal(a_2, b_2) | 0;
317
+ }
318
+ else {
319
+ return comparePrimitives(a_2.length, b_2.length) | 0;
320
+ }
321
+ };
322
+ const compareParts = (comparePart_mut, left_1_mut, right_1_mut) => {
323
+ compareParts:
324
+ while (true) {
325
+ const comparePart = comparePart_mut, left_1 = left_1_mut, right_1 = right_1_mut;
326
+ if (!isEmpty(left_1)) {
327
+ if (!isEmpty(right_1)) {
328
+ const order = comparePart(head_2(left_1))(head_2(right_1)) | 0;
329
+ if (order === 0) {
330
+ comparePart_mut = comparePart;
331
+ left_1_mut = tail_2(left_1);
332
+ right_1_mut = tail_2(right_1);
333
+ continue compareParts;
334
+ }
335
+ else {
336
+ return order | 0;
337
+ }
338
+ }
339
+ else {
340
+ return 1;
341
+ }
342
+ }
343
+ else if (isEmpty(right_1)) {
344
+ return 0;
345
+ }
346
+ else {
347
+ return -1;
348
+ }
349
+ break;
350
+ }
351
+ };
352
+ const core = compareParts(curry2(number), ofArray(left.slice(0, 2 + 1)), ofArray(right.slice(0, 2 + 1))) | 0;
353
+ if (core !== 0) {
354
+ return core | 0;
355
+ }
356
+ else if (item(3, left) === item(3, right)) {
357
+ return 0;
358
+ }
359
+ else if (item(3, left) === "") {
360
+ return 1;
361
+ }
362
+ else if (item(3, right) === "") {
363
+ return -1;
364
+ }
365
+ else {
366
+ return compareParts((a_4) => ((b_4) => {
367
+ const matchValue_1 = digits(a_4);
368
+ const matchValue_2 = digits(b_4);
369
+ return (matchValue_1 ? (matchValue_2 ? number(a_4, b_4) : -1) : (matchValue_2 ? 1 : ordinal(a_4, b_4))) | 0;
370
+ }), ofArray(split(item(3, left), ["."], undefined, 0)), ofArray(split(item(3, right), ["."], undefined, 0))) | 0;
371
+ }
372
+ }
373
+
374
+ function versionValue(parts) {
375
+ return new Value(/* VRecord */ 7, [ofList(zip(versionFields, map((Item) => (new Value(/* VString */ 4, [Item])), ofArray(parts))), {
376
+ Compare: (x, y) => (comparePrimitives(x, y) | 0),
377
+ })]);
378
+ }
379
+
380
+ function whitespace(c) {
381
+ if (((((((((((c >= "\t") && (c <= "\r")) ? true : (c === " ")) ? true : (c === "\u0085")) ? true : (c === " ")) ? true : (c === " ")) ? true : ((c >= " ") && (c <= " "))) ? true : (c === "\u2028")) ? true : (c === "\u2029")) ? true : (c === " ")) ? true : (c === " ")) {
382
+ return true;
383
+ }
384
+ else {
385
+ return c === " ";
386
+ }
387
+ }
388
+
389
+ function trimText(left, right, text) {
390
+ let start = 0;
391
+ let finish = text.length;
392
+ if (left) {
393
+ while ((start < finish) && whitespace(text[start])) {
394
+ start = ((start + 1) | 0);
395
+ }
396
+ }
397
+ if (right) {
398
+ while ((finish > start) && whitespace(text[finish - 1])) {
399
+ finish = ((finish - 1) | 0);
400
+ }
401
+ }
402
+ return substring(text, start, finish - start);
403
+ }
404
+
405
+ export function invokeScalar(name, arguments$) {
406
+ let option_1, option_3, n, n_1, n_2;
407
+ let matchResult, left, right, x_6, x_7, x_8, y, x_9, y_1, high_2, low_2, x_10, x_11, x_12, x_13, y_2, x_14, y_3, high_3, low_3, x_15, x_16, x_17, x_18, x_19, x_20, x_21, x_22, x_23, x_24, x_25, x_26, x_27, x_28, x_29, x_30, y_4, x_31, y_5, x_32, x_33, x_34, x_35, x_36, x_37, x_38, x_39, x_40, x_41, x_42, x_43, needle, x_44, needle_1, x_45, n_3, x_46, n_4, x_47, n_5, x_48, path, path_1, left_1, right_1, path_2, path_3, path_4, path_5, basis, target, path_6, pattern, paths, pattern_1, text, fields, left_2, right_2;
408
+ switch (name) {
409
+ case "String.compare": {
410
+ if (!isEmpty(arguments$)) {
411
+ if (head_2(arguments$).tag === 4) {
412
+ if (!isEmpty(tail_2(arguments$))) {
413
+ if (head_2(tail_2(arguments$)).tag === 4) {
414
+ if (isEmpty(tail_2(tail_2(arguments$)))) {
415
+ matchResult = 0;
416
+ left = head_2(arguments$).fields[0];
417
+ right = head_2(tail_2(arguments$)).fields[0];
418
+ }
419
+ else {
420
+ matchResult = 58;
421
+ }
422
+ }
423
+ else {
424
+ matchResult = 58;
425
+ }
426
+ }
427
+ else {
428
+ matchResult = 58;
429
+ }
430
+ }
431
+ else {
432
+ matchResult = 58;
433
+ }
434
+ }
435
+ else {
436
+ matchResult = 58;
437
+ }
438
+ break;
439
+ }
440
+ case "Int.abs": {
441
+ if (!isEmpty(arguments$)) {
442
+ if (head_2(arguments$).tag === 1) {
443
+ if (isEmpty(tail_2(arguments$))) {
444
+ matchResult = 1;
445
+ x_6 = head_2(arguments$).fields[0];
446
+ }
447
+ else {
448
+ matchResult = 58;
449
+ }
450
+ }
451
+ else {
452
+ matchResult = 58;
453
+ }
454
+ }
455
+ else {
456
+ matchResult = 58;
457
+ }
458
+ break;
459
+ }
460
+ case "Int.sign": {
461
+ if (!isEmpty(arguments$)) {
462
+ if (head_2(arguments$).tag === 1) {
463
+ if (isEmpty(tail_2(arguments$))) {
464
+ matchResult = 2;
465
+ x_7 = head_2(arguments$).fields[0];
466
+ }
467
+ else {
468
+ matchResult = 58;
469
+ }
470
+ }
471
+ else {
472
+ matchResult = 58;
473
+ }
474
+ }
475
+ else {
476
+ matchResult = 58;
477
+ }
478
+ break;
479
+ }
480
+ case "Int.min": {
481
+ if (!isEmpty(arguments$)) {
482
+ if (head_2(arguments$).tag === 1) {
483
+ if (!isEmpty(tail_2(arguments$))) {
484
+ if (head_2(tail_2(arguments$)).tag === 1) {
485
+ if (isEmpty(tail_2(tail_2(arguments$)))) {
486
+ matchResult = 3;
487
+ x_8 = head_2(arguments$).fields[0];
488
+ y = head_2(tail_2(arguments$)).fields[0];
489
+ }
490
+ else {
491
+ matchResult = 58;
492
+ }
493
+ }
494
+ else {
495
+ matchResult = 58;
496
+ }
497
+ }
498
+ else {
499
+ matchResult = 58;
500
+ }
501
+ }
502
+ else {
503
+ matchResult = 58;
504
+ }
505
+ }
506
+ else {
507
+ matchResult = 58;
508
+ }
509
+ break;
510
+ }
511
+ case "Int.max": {
512
+ if (!isEmpty(arguments$)) {
513
+ if (head_2(arguments$).tag === 1) {
514
+ if (!isEmpty(tail_2(arguments$))) {
515
+ if (head_2(tail_2(arguments$)).tag === 1) {
516
+ if (isEmpty(tail_2(tail_2(arguments$)))) {
517
+ matchResult = 4;
518
+ x_9 = head_2(arguments$).fields[0];
519
+ y_1 = head_2(tail_2(arguments$)).fields[0];
520
+ }
521
+ else {
522
+ matchResult = 58;
523
+ }
524
+ }
525
+ else {
526
+ matchResult = 58;
527
+ }
528
+ }
529
+ else {
530
+ matchResult = 58;
531
+ }
532
+ }
533
+ else {
534
+ matchResult = 58;
535
+ }
536
+ }
537
+ else {
538
+ matchResult = 58;
539
+ }
540
+ break;
541
+ }
542
+ case "Int.clamp": {
543
+ if (!isEmpty(arguments$)) {
544
+ if (head_2(arguments$).tag === 1) {
545
+ if (!isEmpty(tail_2(arguments$))) {
546
+ if (head_2(tail_2(arguments$)).tag === 1) {
547
+ if (!isEmpty(tail_2(tail_2(arguments$)))) {
548
+ if (head_2(tail_2(tail_2(arguments$))).tag === 1) {
549
+ if (isEmpty(tail_2(tail_2(tail_2(arguments$))))) {
550
+ if (compare(head_2(arguments$).fields[0], head_2(tail_2(arguments$)).fields[0]) <= 0) {
551
+ matchResult = 5;
552
+ high_2 = head_2(tail_2(arguments$)).fields[0];
553
+ low_2 = head_2(arguments$).fields[0];
554
+ x_10 = head_2(tail_2(tail_2(arguments$))).fields[0];
555
+ }
556
+ else {
557
+ matchResult = 58;
558
+ }
559
+ }
560
+ else {
561
+ matchResult = 58;
562
+ }
563
+ }
564
+ else {
565
+ matchResult = 58;
566
+ }
567
+ }
568
+ else {
569
+ matchResult = 58;
570
+ }
571
+ }
572
+ else {
573
+ matchResult = 58;
574
+ }
575
+ }
576
+ else {
577
+ matchResult = 58;
578
+ }
579
+ }
580
+ else {
581
+ matchResult = 58;
582
+ }
583
+ }
584
+ else {
585
+ matchResult = 58;
586
+ }
587
+ break;
588
+ }
589
+ case "Float.abs": {
590
+ if (!isEmpty(arguments$)) {
591
+ if (head_2(arguments$).tag === 2) {
592
+ if (isEmpty(tail_2(arguments$))) {
593
+ matchResult = 6;
594
+ x_11 = head_2(arguments$).fields[0];
595
+ }
596
+ else {
597
+ matchResult = 58;
598
+ }
599
+ }
600
+ else {
601
+ matchResult = 58;
602
+ }
603
+ }
604
+ else {
605
+ matchResult = 58;
606
+ }
607
+ break;
608
+ }
609
+ case "Float.sign": {
610
+ if (!isEmpty(arguments$)) {
611
+ if (head_2(arguments$).tag === 2) {
612
+ if (isEmpty(tail_2(arguments$))) {
613
+ if (!Number.isNaN(head_2(arguments$).fields[0])) {
614
+ matchResult = 7;
615
+ x_12 = head_2(arguments$).fields[0];
616
+ }
617
+ else {
618
+ matchResult = 58;
619
+ }
620
+ }
621
+ else {
622
+ matchResult = 58;
623
+ }
624
+ }
625
+ else {
626
+ matchResult = 58;
627
+ }
628
+ }
629
+ else {
630
+ matchResult = 58;
631
+ }
632
+ break;
633
+ }
634
+ case "Float.min": {
635
+ if (!isEmpty(arguments$)) {
636
+ if (head_2(arguments$).tag === 2) {
637
+ if (!isEmpty(tail_2(arguments$))) {
638
+ if (head_2(tail_2(arguments$)).tag === 2) {
639
+ if (isEmpty(tail_2(tail_2(arguments$)))) {
640
+ matchResult = 8;
641
+ x_13 = head_2(arguments$).fields[0];
642
+ y_2 = head_2(tail_2(arguments$)).fields[0];
643
+ }
644
+ else {
645
+ matchResult = 58;
646
+ }
647
+ }
648
+ else {
649
+ matchResult = 58;
650
+ }
651
+ }
652
+ else {
653
+ matchResult = 58;
654
+ }
655
+ }
656
+ else {
657
+ matchResult = 58;
658
+ }
659
+ }
660
+ else {
661
+ matchResult = 58;
662
+ }
663
+ break;
664
+ }
665
+ case "Float.max": {
666
+ if (!isEmpty(arguments$)) {
667
+ if (head_2(arguments$).tag === 2) {
668
+ if (!isEmpty(tail_2(arguments$))) {
669
+ if (head_2(tail_2(arguments$)).tag === 2) {
670
+ if (isEmpty(tail_2(tail_2(arguments$)))) {
671
+ matchResult = 9;
672
+ x_14 = head_2(arguments$).fields[0];
673
+ y_3 = head_2(tail_2(arguments$)).fields[0];
674
+ }
675
+ else {
676
+ matchResult = 58;
677
+ }
678
+ }
679
+ else {
680
+ matchResult = 58;
681
+ }
682
+ }
683
+ else {
684
+ matchResult = 58;
685
+ }
686
+ }
687
+ else {
688
+ matchResult = 58;
689
+ }
690
+ }
691
+ else {
692
+ matchResult = 58;
693
+ }
694
+ break;
695
+ }
696
+ case "Float.clamp": {
697
+ if (!isEmpty(arguments$)) {
698
+ if (head_2(arguments$).tag === 2) {
699
+ if (!isEmpty(tail_2(arguments$))) {
700
+ if (head_2(tail_2(arguments$)).tag === 2) {
701
+ if (!isEmpty(tail_2(tail_2(arguments$)))) {
702
+ if (head_2(tail_2(tail_2(arguments$))).tag === 2) {
703
+ if (isEmpty(tail_2(tail_2(tail_2(arguments$))))) {
704
+ if (head_2(arguments$).fields[0] <= head_2(tail_2(arguments$)).fields[0]) {
705
+ matchResult = 10;
706
+ high_3 = head_2(tail_2(arguments$)).fields[0];
707
+ low_3 = head_2(arguments$).fields[0];
708
+ x_15 = head_2(tail_2(tail_2(arguments$))).fields[0];
709
+ }
710
+ else {
711
+ matchResult = 58;
712
+ }
713
+ }
714
+ else {
715
+ matchResult = 58;
716
+ }
717
+ }
718
+ else {
719
+ matchResult = 58;
720
+ }
721
+ }
722
+ else {
723
+ matchResult = 58;
724
+ }
725
+ }
726
+ else {
727
+ matchResult = 58;
728
+ }
729
+ }
730
+ else {
731
+ matchResult = 58;
732
+ }
733
+ }
734
+ else {
735
+ matchResult = 58;
736
+ }
737
+ }
738
+ else {
739
+ matchResult = 58;
740
+ }
741
+ break;
742
+ }
743
+ case "Float.floor": {
744
+ if (!isEmpty(arguments$)) {
745
+ if (head_2(arguments$).tag === 2) {
746
+ if (isEmpty(tail_2(arguments$))) {
747
+ matchResult = 11;
748
+ x_16 = head_2(arguments$).fields[0];
749
+ }
750
+ else {
751
+ matchResult = 58;
752
+ }
753
+ }
754
+ else {
755
+ matchResult = 58;
756
+ }
757
+ }
758
+ else {
759
+ matchResult = 58;
760
+ }
761
+ break;
762
+ }
763
+ case "Float.ceil": {
764
+ if (!isEmpty(arguments$)) {
765
+ if (head_2(arguments$).tag === 2) {
766
+ if (isEmpty(tail_2(arguments$))) {
767
+ matchResult = 12;
768
+ x_17 = head_2(arguments$).fields[0];
769
+ }
770
+ else {
771
+ matchResult = 58;
772
+ }
773
+ }
774
+ else {
775
+ matchResult = 58;
776
+ }
777
+ }
778
+ else {
779
+ matchResult = 58;
780
+ }
781
+ break;
782
+ }
783
+ case "Float.round": {
784
+ if (!isEmpty(arguments$)) {
785
+ if (head_2(arguments$).tag === 2) {
786
+ if (isEmpty(tail_2(arguments$))) {
787
+ matchResult = 13;
788
+ x_18 = head_2(arguments$).fields[0];
789
+ }
790
+ else {
791
+ matchResult = 58;
792
+ }
793
+ }
794
+ else {
795
+ matchResult = 58;
796
+ }
797
+ }
798
+ else {
799
+ matchResult = 58;
800
+ }
801
+ break;
802
+ }
803
+ case "Float.truncate": {
804
+ if (!isEmpty(arguments$)) {
805
+ if (head_2(arguments$).tag === 2) {
806
+ if (isEmpty(tail_2(arguments$))) {
807
+ matchResult = 14;
808
+ x_19 = head_2(arguments$).fields[0];
809
+ }
810
+ else {
811
+ matchResult = 58;
812
+ }
813
+ }
814
+ else {
815
+ matchResult = 58;
816
+ }
817
+ }
818
+ else {
819
+ matchResult = 58;
820
+ }
821
+ break;
822
+ }
823
+ case "Float.sqrt": {
824
+ if (!isEmpty(arguments$)) {
825
+ if (head_2(arguments$).tag === 2) {
826
+ if (isEmpty(tail_2(arguments$))) {
827
+ matchResult = 15;
828
+ x_20 = head_2(arguments$).fields[0];
829
+ }
830
+ else {
831
+ matchResult = 58;
832
+ }
833
+ }
834
+ else {
835
+ matchResult = 58;
836
+ }
837
+ }
838
+ else {
839
+ matchResult = 58;
840
+ }
841
+ break;
842
+ }
843
+ case "Float.log": {
844
+ if (!isEmpty(arguments$)) {
845
+ if (head_2(arguments$).tag === 2) {
846
+ if (isEmpty(tail_2(arguments$))) {
847
+ matchResult = 16;
848
+ x_21 = head_2(arguments$).fields[0];
849
+ }
850
+ else {
851
+ matchResult = 58;
852
+ }
853
+ }
854
+ else {
855
+ matchResult = 58;
856
+ }
857
+ }
858
+ else {
859
+ matchResult = 58;
860
+ }
861
+ break;
862
+ }
863
+ case "Float.log10": {
864
+ if (!isEmpty(arguments$)) {
865
+ if (head_2(arguments$).tag === 2) {
866
+ if (isEmpty(tail_2(arguments$))) {
867
+ matchResult = 17;
868
+ x_22 = head_2(arguments$).fields[0];
869
+ }
870
+ else {
871
+ matchResult = 58;
872
+ }
873
+ }
874
+ else {
875
+ matchResult = 58;
876
+ }
877
+ }
878
+ else {
879
+ matchResult = 58;
880
+ }
881
+ break;
882
+ }
883
+ case "Float.exp": {
884
+ if (!isEmpty(arguments$)) {
885
+ if (head_2(arguments$).tag === 2) {
886
+ if (isEmpty(tail_2(arguments$))) {
887
+ matchResult = 18;
888
+ x_23 = head_2(arguments$).fields[0];
889
+ }
890
+ else {
891
+ matchResult = 58;
892
+ }
893
+ }
894
+ else {
895
+ matchResult = 58;
896
+ }
897
+ }
898
+ else {
899
+ matchResult = 58;
900
+ }
901
+ break;
902
+ }
903
+ case "Float.sin": {
904
+ if (!isEmpty(arguments$)) {
905
+ if (head_2(arguments$).tag === 2) {
906
+ if (isEmpty(tail_2(arguments$))) {
907
+ matchResult = 19;
908
+ x_24 = head_2(arguments$).fields[0];
909
+ }
910
+ else {
911
+ matchResult = 58;
912
+ }
913
+ }
914
+ else {
915
+ matchResult = 58;
916
+ }
917
+ }
918
+ else {
919
+ matchResult = 58;
920
+ }
921
+ break;
922
+ }
923
+ case "Float.cos": {
924
+ if (!isEmpty(arguments$)) {
925
+ if (head_2(arguments$).tag === 2) {
926
+ if (isEmpty(tail_2(arguments$))) {
927
+ matchResult = 20;
928
+ x_25 = head_2(arguments$).fields[0];
929
+ }
930
+ else {
931
+ matchResult = 58;
932
+ }
933
+ }
934
+ else {
935
+ matchResult = 58;
936
+ }
937
+ }
938
+ else {
939
+ matchResult = 58;
940
+ }
941
+ break;
942
+ }
943
+ case "Float.tan": {
944
+ if (!isEmpty(arguments$)) {
945
+ if (head_2(arguments$).tag === 2) {
946
+ if (isEmpty(tail_2(arguments$))) {
947
+ matchResult = 21;
948
+ x_26 = head_2(arguments$).fields[0];
949
+ }
950
+ else {
951
+ matchResult = 58;
952
+ }
953
+ }
954
+ else {
955
+ matchResult = 58;
956
+ }
957
+ }
958
+ else {
959
+ matchResult = 58;
960
+ }
961
+ break;
962
+ }
963
+ case "Float.asin": {
964
+ if (!isEmpty(arguments$)) {
965
+ if (head_2(arguments$).tag === 2) {
966
+ if (isEmpty(tail_2(arguments$))) {
967
+ matchResult = 22;
968
+ x_27 = head_2(arguments$).fields[0];
969
+ }
970
+ else {
971
+ matchResult = 58;
972
+ }
973
+ }
974
+ else {
975
+ matchResult = 58;
976
+ }
977
+ }
978
+ else {
979
+ matchResult = 58;
980
+ }
981
+ break;
982
+ }
983
+ case "Float.acos": {
984
+ if (!isEmpty(arguments$)) {
985
+ if (head_2(arguments$).tag === 2) {
986
+ if (isEmpty(tail_2(arguments$))) {
987
+ matchResult = 23;
988
+ x_28 = head_2(arguments$).fields[0];
989
+ }
990
+ else {
991
+ matchResult = 58;
992
+ }
993
+ }
994
+ else {
995
+ matchResult = 58;
996
+ }
997
+ }
998
+ else {
999
+ matchResult = 58;
1000
+ }
1001
+ break;
1002
+ }
1003
+ case "Float.atan": {
1004
+ if (!isEmpty(arguments$)) {
1005
+ if (head_2(arguments$).tag === 2) {
1006
+ if (isEmpty(tail_2(arguments$))) {
1007
+ matchResult = 24;
1008
+ x_29 = head_2(arguments$).fields[0];
1009
+ }
1010
+ else {
1011
+ matchResult = 58;
1012
+ }
1013
+ }
1014
+ else {
1015
+ matchResult = 58;
1016
+ }
1017
+ }
1018
+ else {
1019
+ matchResult = 58;
1020
+ }
1021
+ break;
1022
+ }
1023
+ case "Float.pow": {
1024
+ if (!isEmpty(arguments$)) {
1025
+ if (head_2(arguments$).tag === 2) {
1026
+ if (!isEmpty(tail_2(arguments$))) {
1027
+ if (head_2(tail_2(arguments$)).tag === 2) {
1028
+ if (isEmpty(tail_2(tail_2(arguments$)))) {
1029
+ matchResult = 25;
1030
+ x_30 = head_2(arguments$).fields[0];
1031
+ y_4 = head_2(tail_2(arguments$)).fields[0];
1032
+ }
1033
+ else {
1034
+ matchResult = 58;
1035
+ }
1036
+ }
1037
+ else {
1038
+ matchResult = 58;
1039
+ }
1040
+ }
1041
+ else {
1042
+ matchResult = 58;
1043
+ }
1044
+ }
1045
+ else {
1046
+ matchResult = 58;
1047
+ }
1048
+ }
1049
+ else {
1050
+ matchResult = 58;
1051
+ }
1052
+ break;
1053
+ }
1054
+ case "Float.atan2": {
1055
+ if (!isEmpty(arguments$)) {
1056
+ if (head_2(arguments$).tag === 2) {
1057
+ if (!isEmpty(tail_2(arguments$))) {
1058
+ if (head_2(tail_2(arguments$)).tag === 2) {
1059
+ if (isEmpty(tail_2(tail_2(arguments$)))) {
1060
+ matchResult = 26;
1061
+ x_31 = head_2(arguments$).fields[0];
1062
+ y_5 = head_2(tail_2(arguments$)).fields[0];
1063
+ }
1064
+ else {
1065
+ matchResult = 58;
1066
+ }
1067
+ }
1068
+ else {
1069
+ matchResult = 58;
1070
+ }
1071
+ }
1072
+ else {
1073
+ matchResult = 58;
1074
+ }
1075
+ }
1076
+ else {
1077
+ matchResult = 58;
1078
+ }
1079
+ }
1080
+ else {
1081
+ matchResult = 58;
1082
+ }
1083
+ break;
1084
+ }
1085
+ case "Float.isNaN": {
1086
+ if (!isEmpty(arguments$)) {
1087
+ if (head_2(arguments$).tag === 2) {
1088
+ if (isEmpty(tail_2(arguments$))) {
1089
+ matchResult = 27;
1090
+ x_32 = head_2(arguments$).fields[0];
1091
+ }
1092
+ else {
1093
+ matchResult = 58;
1094
+ }
1095
+ }
1096
+ else {
1097
+ matchResult = 58;
1098
+ }
1099
+ }
1100
+ else {
1101
+ matchResult = 58;
1102
+ }
1103
+ break;
1104
+ }
1105
+ case "Float.isInfinity": {
1106
+ if (!isEmpty(arguments$)) {
1107
+ if (head_2(arguments$).tag === 2) {
1108
+ if (isEmpty(tail_2(arguments$))) {
1109
+ matchResult = 28;
1110
+ x_33 = head_2(arguments$).fields[0];
1111
+ }
1112
+ else {
1113
+ matchResult = 58;
1114
+ }
1115
+ }
1116
+ else {
1117
+ matchResult = 58;
1118
+ }
1119
+ }
1120
+ else {
1121
+ matchResult = 58;
1122
+ }
1123
+ break;
1124
+ }
1125
+ case "Float.isFinite": {
1126
+ if (!isEmpty(arguments$)) {
1127
+ if (head_2(arguments$).tag === 2) {
1128
+ if (isEmpty(tail_2(arguments$))) {
1129
+ matchResult = 29;
1130
+ x_34 = head_2(arguments$).fields[0];
1131
+ }
1132
+ else {
1133
+ matchResult = 58;
1134
+ }
1135
+ }
1136
+ else {
1137
+ matchResult = 58;
1138
+ }
1139
+ }
1140
+ else {
1141
+ matchResult = 58;
1142
+ }
1143
+ break;
1144
+ }
1145
+ case "Float.pi": {
1146
+ if (isEmpty(arguments$)) {
1147
+ matchResult = 30;
1148
+ }
1149
+ else {
1150
+ matchResult = 58;
1151
+ }
1152
+ break;
1153
+ }
1154
+ case "Int.toFloat": {
1155
+ if (!isEmpty(arguments$)) {
1156
+ if (head_2(arguments$).tag === 1) {
1157
+ if (isEmpty(tail_2(arguments$))) {
1158
+ matchResult = 31;
1159
+ x_35 = head_2(arguments$).fields[0];
1160
+ }
1161
+ else {
1162
+ matchResult = 58;
1163
+ }
1164
+ }
1165
+ else {
1166
+ matchResult = 58;
1167
+ }
1168
+ }
1169
+ else {
1170
+ matchResult = 58;
1171
+ }
1172
+ break;
1173
+ }
1174
+ case "Float.tryToInt": {
1175
+ if (!isEmpty(arguments$)) {
1176
+ if (head_2(arguments$).tag === 2) {
1177
+ if (isEmpty(tail_2(arguments$))) {
1178
+ matchResult = 32;
1179
+ x_36 = head_2(arguments$).fields[0];
1180
+ }
1181
+ else {
1182
+ matchResult = 58;
1183
+ }
1184
+ }
1185
+ else {
1186
+ matchResult = 58;
1187
+ }
1188
+ }
1189
+ else {
1190
+ matchResult = 58;
1191
+ }
1192
+ break;
1193
+ }
1194
+ case "String.length": {
1195
+ if (!isEmpty(arguments$)) {
1196
+ if (head_2(arguments$).tag === 4) {
1197
+ if (isEmpty(tail_2(arguments$))) {
1198
+ matchResult = 33;
1199
+ x_37 = head_2(arguments$).fields[0];
1200
+ }
1201
+ else {
1202
+ matchResult = 58;
1203
+ }
1204
+ }
1205
+ else {
1206
+ matchResult = 58;
1207
+ }
1208
+ }
1209
+ else {
1210
+ matchResult = 58;
1211
+ }
1212
+ break;
1213
+ }
1214
+ case "String.isEmpty": {
1215
+ if (!isEmpty(arguments$)) {
1216
+ if (head_2(arguments$).tag === 4) {
1217
+ if (isEmpty(tail_2(arguments$))) {
1218
+ matchResult = 34;
1219
+ x_38 = head_2(arguments$).fields[0];
1220
+ }
1221
+ else {
1222
+ matchResult = 58;
1223
+ }
1224
+ }
1225
+ else {
1226
+ matchResult = 58;
1227
+ }
1228
+ }
1229
+ else {
1230
+ matchResult = 58;
1231
+ }
1232
+ break;
1233
+ }
1234
+ case "String.isWhiteSpace": {
1235
+ if (!isEmpty(arguments$)) {
1236
+ if (head_2(arguments$).tag === 4) {
1237
+ if (isEmpty(tail_2(arguments$))) {
1238
+ matchResult = 35;
1239
+ x_39 = head_2(arguments$).fields[0];
1240
+ }
1241
+ else {
1242
+ matchResult = 58;
1243
+ }
1244
+ }
1245
+ else {
1246
+ matchResult = 58;
1247
+ }
1248
+ }
1249
+ else {
1250
+ matchResult = 58;
1251
+ }
1252
+ break;
1253
+ }
1254
+ case "String.trim": {
1255
+ if (!isEmpty(arguments$)) {
1256
+ if (head_2(arguments$).tag === 4) {
1257
+ if (isEmpty(tail_2(arguments$))) {
1258
+ matchResult = 36;
1259
+ x_40 = head_2(arguments$).fields[0];
1260
+ }
1261
+ else {
1262
+ matchResult = 58;
1263
+ }
1264
+ }
1265
+ else {
1266
+ matchResult = 58;
1267
+ }
1268
+ }
1269
+ else {
1270
+ matchResult = 58;
1271
+ }
1272
+ break;
1273
+ }
1274
+ case "String.trimStart": {
1275
+ if (!isEmpty(arguments$)) {
1276
+ if (head_2(arguments$).tag === 4) {
1277
+ if (isEmpty(tail_2(arguments$))) {
1278
+ matchResult = 37;
1279
+ x_41 = head_2(arguments$).fields[0];
1280
+ }
1281
+ else {
1282
+ matchResult = 58;
1283
+ }
1284
+ }
1285
+ else {
1286
+ matchResult = 58;
1287
+ }
1288
+ }
1289
+ else {
1290
+ matchResult = 58;
1291
+ }
1292
+ break;
1293
+ }
1294
+ case "String.trimEnd": {
1295
+ if (!isEmpty(arguments$)) {
1296
+ if (head_2(arguments$).tag === 4) {
1297
+ if (isEmpty(tail_2(arguments$))) {
1298
+ matchResult = 38;
1299
+ x_42 = head_2(arguments$).fields[0];
1300
+ }
1301
+ else {
1302
+ matchResult = 58;
1303
+ }
1304
+ }
1305
+ else {
1306
+ matchResult = 58;
1307
+ }
1308
+ }
1309
+ else {
1310
+ matchResult = 58;
1311
+ }
1312
+ break;
1313
+ }
1314
+ case "String.splitLines": {
1315
+ if (!isEmpty(arguments$)) {
1316
+ if (head_2(arguments$).tag === 4) {
1317
+ if (isEmpty(tail_2(arguments$))) {
1318
+ matchResult = 39;
1319
+ x_43 = head_2(arguments$).fields[0];
1320
+ }
1321
+ else {
1322
+ matchResult = 58;
1323
+ }
1324
+ }
1325
+ else {
1326
+ matchResult = 58;
1327
+ }
1328
+ }
1329
+ else {
1330
+ matchResult = 58;
1331
+ }
1332
+ break;
1333
+ }
1334
+ case "String.startsWith": {
1335
+ if (!isEmpty(arguments$)) {
1336
+ if (head_2(arguments$).tag === 4) {
1337
+ if (!isEmpty(tail_2(arguments$))) {
1338
+ if (head_2(tail_2(arguments$)).tag === 4) {
1339
+ if (isEmpty(tail_2(tail_2(arguments$)))) {
1340
+ matchResult = 40;
1341
+ needle = head_2(arguments$).fields[0];
1342
+ x_44 = head_2(tail_2(arguments$)).fields[0];
1343
+ }
1344
+ else {
1345
+ matchResult = 58;
1346
+ }
1347
+ }
1348
+ else {
1349
+ matchResult = 58;
1350
+ }
1351
+ }
1352
+ else {
1353
+ matchResult = 58;
1354
+ }
1355
+ }
1356
+ else {
1357
+ matchResult = 58;
1358
+ }
1359
+ }
1360
+ else {
1361
+ matchResult = 58;
1362
+ }
1363
+ break;
1364
+ }
1365
+ case "String.contains": {
1366
+ if (!isEmpty(arguments$)) {
1367
+ if (head_2(arguments$).tag === 4) {
1368
+ if (!isEmpty(tail_2(arguments$))) {
1369
+ if (head_2(tail_2(arguments$)).tag === 4) {
1370
+ if (isEmpty(tail_2(tail_2(arguments$)))) {
1371
+ matchResult = 41;
1372
+ needle_1 = head_2(arguments$).fields[0];
1373
+ x_45 = head_2(tail_2(arguments$)).fields[0];
1374
+ }
1375
+ else {
1376
+ matchResult = 58;
1377
+ }
1378
+ }
1379
+ else {
1380
+ matchResult = 58;
1381
+ }
1382
+ }
1383
+ else {
1384
+ matchResult = 58;
1385
+ }
1386
+ }
1387
+ else {
1388
+ matchResult = 58;
1389
+ }
1390
+ }
1391
+ else {
1392
+ matchResult = 58;
1393
+ }
1394
+ break;
1395
+ }
1396
+ case "String.padLeft": {
1397
+ if (!isEmpty(arguments$)) {
1398
+ if (head_2(arguments$).tag === 1) {
1399
+ if (!isEmpty(tail_2(arguments$))) {
1400
+ if (head_2(tail_2(arguments$)).tag === 4) {
1401
+ if (isEmpty(tail_2(tail_2(arguments$)))) {
1402
+ if ((n = head_2(arguments$).fields[0], (compare(n, 0n) >= 0) && (compare(n, toInt64_unchecked(fromInt32(2147483647))) <= 0))) {
1403
+ matchResult = 42;
1404
+ n_3 = head_2(arguments$).fields[0];
1405
+ x_46 = head_2(tail_2(arguments$)).fields[0];
1406
+ }
1407
+ else {
1408
+ matchResult = 58;
1409
+ }
1410
+ }
1411
+ else {
1412
+ matchResult = 58;
1413
+ }
1414
+ }
1415
+ else {
1416
+ matchResult = 58;
1417
+ }
1418
+ }
1419
+ else {
1420
+ matchResult = 58;
1421
+ }
1422
+ }
1423
+ else {
1424
+ matchResult = 58;
1425
+ }
1426
+ }
1427
+ else {
1428
+ matchResult = 58;
1429
+ }
1430
+ break;
1431
+ }
1432
+ case "String.padRight": {
1433
+ if (!isEmpty(arguments$)) {
1434
+ if (head_2(arguments$).tag === 1) {
1435
+ if (!isEmpty(tail_2(arguments$))) {
1436
+ if (head_2(tail_2(arguments$)).tag === 4) {
1437
+ if (isEmpty(tail_2(tail_2(arguments$)))) {
1438
+ if ((n_1 = head_2(arguments$).fields[0], (compare(n_1, 0n) >= 0) && (compare(n_1, toInt64_unchecked(fromInt32(2147483647))) <= 0))) {
1439
+ matchResult = 43;
1440
+ n_4 = head_2(arguments$).fields[0];
1441
+ x_47 = head_2(tail_2(arguments$)).fields[0];
1442
+ }
1443
+ else {
1444
+ matchResult = 58;
1445
+ }
1446
+ }
1447
+ else {
1448
+ matchResult = 58;
1449
+ }
1450
+ }
1451
+ else {
1452
+ matchResult = 58;
1453
+ }
1454
+ }
1455
+ else {
1456
+ matchResult = 58;
1457
+ }
1458
+ }
1459
+ else {
1460
+ matchResult = 58;
1461
+ }
1462
+ }
1463
+ else {
1464
+ matchResult = 58;
1465
+ }
1466
+ break;
1467
+ }
1468
+ case "String.repeat": {
1469
+ if (!isEmpty(arguments$)) {
1470
+ if (head_2(arguments$).tag === 1) {
1471
+ if (!isEmpty(tail_2(arguments$))) {
1472
+ if (head_2(tail_2(arguments$)).tag === 4) {
1473
+ if (isEmpty(tail_2(tail_2(arguments$)))) {
1474
+ if ((n_2 = head_2(arguments$).fields[0], (compare(n_2, 0n) >= 0) && (compare(n_2, toInt64_unchecked(fromInt32(2147483647))) <= 0))) {
1475
+ matchResult = 44;
1476
+ n_5 = head_2(arguments$).fields[0];
1477
+ x_48 = head_2(tail_2(arguments$)).fields[0];
1478
+ }
1479
+ else {
1480
+ matchResult = 58;
1481
+ }
1482
+ }
1483
+ else {
1484
+ matchResult = 58;
1485
+ }
1486
+ }
1487
+ else {
1488
+ matchResult = 58;
1489
+ }
1490
+ }
1491
+ else {
1492
+ matchResult = 58;
1493
+ }
1494
+ }
1495
+ else {
1496
+ matchResult = 58;
1497
+ }
1498
+ }
1499
+ else {
1500
+ matchResult = 58;
1501
+ }
1502
+ break;
1503
+ }
1504
+ case "Path.normalize": {
1505
+ if (!isEmpty(arguments$)) {
1506
+ if (head_2(arguments$).tag === 4) {
1507
+ if (isEmpty(tail_2(arguments$))) {
1508
+ matchResult = 45;
1509
+ path = head_2(arguments$).fields[0];
1510
+ }
1511
+ else {
1512
+ matchResult = 58;
1513
+ }
1514
+ }
1515
+ else {
1516
+ matchResult = 58;
1517
+ }
1518
+ }
1519
+ else {
1520
+ matchResult = 58;
1521
+ }
1522
+ break;
1523
+ }
1524
+ case "Path.isAbsolute": {
1525
+ if (!isEmpty(arguments$)) {
1526
+ if (head_2(arguments$).tag === 4) {
1527
+ if (isEmpty(tail_2(arguments$))) {
1528
+ matchResult = 46;
1529
+ path_1 = head_2(arguments$).fields[0];
1530
+ }
1531
+ else {
1532
+ matchResult = 58;
1533
+ }
1534
+ }
1535
+ else {
1536
+ matchResult = 58;
1537
+ }
1538
+ }
1539
+ else {
1540
+ matchResult = 58;
1541
+ }
1542
+ break;
1543
+ }
1544
+ case "Path.combine": {
1545
+ if (!isEmpty(arguments$)) {
1546
+ if (head_2(arguments$).tag === 4) {
1547
+ if (!isEmpty(tail_2(arguments$))) {
1548
+ if (head_2(tail_2(arguments$)).tag === 4) {
1549
+ if (isEmpty(tail_2(tail_2(arguments$)))) {
1550
+ matchResult = 47;
1551
+ left_1 = head_2(arguments$).fields[0];
1552
+ right_1 = head_2(tail_2(arguments$)).fields[0];
1553
+ }
1554
+ else {
1555
+ matchResult = 58;
1556
+ }
1557
+ }
1558
+ else {
1559
+ matchResult = 58;
1560
+ }
1561
+ }
1562
+ else {
1563
+ matchResult = 58;
1564
+ }
1565
+ }
1566
+ else {
1567
+ matchResult = 58;
1568
+ }
1569
+ }
1570
+ else {
1571
+ matchResult = 58;
1572
+ }
1573
+ break;
1574
+ }
1575
+ case "Path.fileName": {
1576
+ if (!isEmpty(arguments$)) {
1577
+ if (head_2(arguments$).tag === 4) {
1578
+ if (isEmpty(tail_2(arguments$))) {
1579
+ matchResult = 48;
1580
+ path_2 = head_2(arguments$).fields[0];
1581
+ }
1582
+ else {
1583
+ matchResult = 58;
1584
+ }
1585
+ }
1586
+ else {
1587
+ matchResult = 58;
1588
+ }
1589
+ }
1590
+ else {
1591
+ matchResult = 58;
1592
+ }
1593
+ break;
1594
+ }
1595
+ case "Path.extension": {
1596
+ if (!isEmpty(arguments$)) {
1597
+ if (head_2(arguments$).tag === 4) {
1598
+ if (isEmpty(tail_2(arguments$))) {
1599
+ matchResult = 49;
1600
+ path_3 = head_2(arguments$).fields[0];
1601
+ }
1602
+ else {
1603
+ matchResult = 58;
1604
+ }
1605
+ }
1606
+ else {
1607
+ matchResult = 58;
1608
+ }
1609
+ }
1610
+ else {
1611
+ matchResult = 58;
1612
+ }
1613
+ break;
1614
+ }
1615
+ case "Path.fileNameWithoutExtension": {
1616
+ if (!isEmpty(arguments$)) {
1617
+ if (head_2(arguments$).tag === 4) {
1618
+ if (isEmpty(tail_2(arguments$))) {
1619
+ matchResult = 50;
1620
+ path_4 = head_2(arguments$).fields[0];
1621
+ }
1622
+ else {
1623
+ matchResult = 58;
1624
+ }
1625
+ }
1626
+ else {
1627
+ matchResult = 58;
1628
+ }
1629
+ }
1630
+ else {
1631
+ matchResult = 58;
1632
+ }
1633
+ break;
1634
+ }
1635
+ case "Path.parent": {
1636
+ if (!isEmpty(arguments$)) {
1637
+ if (head_2(arguments$).tag === 4) {
1638
+ if (isEmpty(tail_2(arguments$))) {
1639
+ matchResult = 51;
1640
+ path_5 = head_2(arguments$).fields[0];
1641
+ }
1642
+ else {
1643
+ matchResult = 58;
1644
+ }
1645
+ }
1646
+ else {
1647
+ matchResult = 58;
1648
+ }
1649
+ }
1650
+ else {
1651
+ matchResult = 58;
1652
+ }
1653
+ break;
1654
+ }
1655
+ case "Path.relative": {
1656
+ if (!isEmpty(arguments$)) {
1657
+ if (head_2(arguments$).tag === 4) {
1658
+ if (!isEmpty(tail_2(arguments$))) {
1659
+ if (head_2(tail_2(arguments$)).tag === 4) {
1660
+ if (isEmpty(tail_2(tail_2(arguments$)))) {
1661
+ matchResult = 52;
1662
+ basis = head_2(arguments$).fields[0];
1663
+ target = head_2(tail_2(arguments$)).fields[0];
1664
+ }
1665
+ else {
1666
+ matchResult = 58;
1667
+ }
1668
+ }
1669
+ else {
1670
+ matchResult = 58;
1671
+ }
1672
+ }
1673
+ else {
1674
+ matchResult = 58;
1675
+ }
1676
+ }
1677
+ else {
1678
+ matchResult = 58;
1679
+ }
1680
+ }
1681
+ else {
1682
+ matchResult = 58;
1683
+ }
1684
+ break;
1685
+ }
1686
+ case "Glob.isMatch": {
1687
+ if (!isEmpty(arguments$)) {
1688
+ if (head_2(arguments$).tag === 4) {
1689
+ if (!isEmpty(tail_2(arguments$))) {
1690
+ if (head_2(tail_2(arguments$)).tag === 4) {
1691
+ if (isEmpty(tail_2(tail_2(arguments$)))) {
1692
+ matchResult = 53;
1693
+ path_6 = head_2(tail_2(arguments$)).fields[0];
1694
+ pattern = head_2(arguments$).fields[0];
1695
+ }
1696
+ else {
1697
+ matchResult = 58;
1698
+ }
1699
+ }
1700
+ else {
1701
+ matchResult = 58;
1702
+ }
1703
+ }
1704
+ else {
1705
+ matchResult = 58;
1706
+ }
1707
+ }
1708
+ else {
1709
+ matchResult = 58;
1710
+ }
1711
+ }
1712
+ else {
1713
+ matchResult = 58;
1714
+ }
1715
+ break;
1716
+ }
1717
+ case "Glob.filter": {
1718
+ if (!isEmpty(arguments$)) {
1719
+ if (head_2(arguments$).tag === 4) {
1720
+ if (!isEmpty(tail_2(arguments$))) {
1721
+ if (head_2(tail_2(arguments$)).tag === 5) {
1722
+ if (isEmpty(tail_2(tail_2(arguments$)))) {
1723
+ matchResult = 54;
1724
+ paths = head_2(tail_2(arguments$)).fields[0];
1725
+ pattern_1 = head_2(arguments$).fields[0];
1726
+ }
1727
+ else {
1728
+ matchResult = 58;
1729
+ }
1730
+ }
1731
+ else {
1732
+ matchResult = 58;
1733
+ }
1734
+ }
1735
+ else {
1736
+ matchResult = 58;
1737
+ }
1738
+ }
1739
+ else {
1740
+ matchResult = 58;
1741
+ }
1742
+ }
1743
+ else {
1744
+ matchResult = 58;
1745
+ }
1746
+ break;
1747
+ }
1748
+ case "SemVer.tryParse": {
1749
+ if (!isEmpty(arguments$)) {
1750
+ if (head_2(arguments$).tag === 4) {
1751
+ if (isEmpty(tail_2(arguments$))) {
1752
+ matchResult = 55;
1753
+ text = head_2(arguments$).fields[0];
1754
+ }
1755
+ else {
1756
+ matchResult = 58;
1757
+ }
1758
+ }
1759
+ else {
1760
+ matchResult = 58;
1761
+ }
1762
+ }
1763
+ else {
1764
+ matchResult = 58;
1765
+ }
1766
+ break;
1767
+ }
1768
+ case "SemVer.format": {
1769
+ if (!isEmpty(arguments$)) {
1770
+ if (head_2(arguments$).tag === 7) {
1771
+ if (isEmpty(tail_2(arguments$))) {
1772
+ matchResult = 56;
1773
+ fields = head_2(arguments$).fields[0];
1774
+ }
1775
+ else {
1776
+ matchResult = 58;
1777
+ }
1778
+ }
1779
+ else {
1780
+ matchResult = 58;
1781
+ }
1782
+ }
1783
+ else {
1784
+ matchResult = 58;
1785
+ }
1786
+ break;
1787
+ }
1788
+ case "SemVer.compare": {
1789
+ if (!isEmpty(arguments$)) {
1790
+ if (head_2(arguments$).tag === 4) {
1791
+ if (!isEmpty(tail_2(arguments$))) {
1792
+ if (head_2(tail_2(arguments$)).tag === 4) {
1793
+ if (isEmpty(tail_2(tail_2(arguments$)))) {
1794
+ matchResult = 57;
1795
+ left_2 = head_2(arguments$).fields[0];
1796
+ right_2 = head_2(tail_2(arguments$)).fields[0];
1797
+ }
1798
+ else {
1799
+ matchResult = 58;
1800
+ }
1801
+ }
1802
+ else {
1803
+ matchResult = 58;
1804
+ }
1805
+ }
1806
+ else {
1807
+ matchResult = 58;
1808
+ }
1809
+ }
1810
+ else {
1811
+ matchResult = 58;
1812
+ }
1813
+ }
1814
+ else {
1815
+ matchResult = 58;
1816
+ }
1817
+ break;
1818
+ }
1819
+ default:
1820
+ matchResult = 58;
1821
+ }
1822
+ switch (matchResult) {
1823
+ case 0:
1824
+ return new Value(/* VInt */ 1, [toInt64_unchecked(fromInt32(sign(compareOrdinal(left, right))))]);
1825
+ case 1: {
1826
+ if (equals_1(x_6, -9223372036854775808n)) {
1827
+ throw new Exception("Integer overflow. (Parameter \'value\')");
1828
+ }
1829
+ return new Value(/* VInt */ 1, [abs(x_6)]);
1830
+ }
1831
+ case 2:
1832
+ return new Value(/* VInt */ 1, [toInt64_unchecked(fromInt32(sign(toFloat64(x_7))))]);
1833
+ case 3:
1834
+ return new Value(/* VInt */ 1, [min(x_8, y)]);
1835
+ case 4:
1836
+ return new Value(/* VInt */ 1, [max(x_9, y_1)]);
1837
+ case 5:
1838
+ return new Value(/* VInt */ 1, [max(low_2, min(high_2, x_10))]);
1839
+ case 6:
1840
+ return new Value(/* VFloat */ 2, [Math.abs(x_11)]);
1841
+ case 7:
1842
+ return new Value(/* VInt */ 1, [toInt64_unchecked(fromInt32(sign(x_12)))]);
1843
+ case 8:
1844
+ return new Value(/* VFloat */ 2, [min_1(x_13, y_2)]);
1845
+ case 9:
1846
+ return new Value(/* VFloat */ 2, [max_1(x_14, y_3)]);
1847
+ case 10:
1848
+ return new Value(/* VFloat */ 2, [max_1(low_3, min_1(high_3, x_15))]);
1849
+ case 11:
1850
+ return new Value(/* VFloat */ 2, [Math.floor(x_16)]);
1851
+ case 12:
1852
+ return new Value(/* VFloat */ 2, [Math.ceil(x_17)]);
1853
+ case 13:
1854
+ return new Value(/* VFloat */ 2, [round(x_18)]);
1855
+ case 14:
1856
+ return new Value(/* VFloat */ 2, [Math.trunc(x_19)]);
1857
+ case 15:
1858
+ return new Value(/* VFloat */ 2, [Math.sqrt(x_20)]);
1859
+ case 16:
1860
+ return new Value(/* VFloat */ 2, [Math.log(x_21)]);
1861
+ case 17:
1862
+ return new Value(/* VFloat */ 2, [Math.log10(x_22)]);
1863
+ case 18:
1864
+ return new Value(/* VFloat */ 2, [Math.exp(x_23)]);
1865
+ case 19:
1866
+ return new Value(/* VFloat */ 2, [Math.sin(x_24)]);
1867
+ case 20:
1868
+ return new Value(/* VFloat */ 2, [Math.cos(x_25)]);
1869
+ case 21:
1870
+ return new Value(/* VFloat */ 2, [Math.tan(x_26)]);
1871
+ case 22:
1872
+ return new Value(/* VFloat */ 2, [Math.asin(x_27)]);
1873
+ case 23:
1874
+ return new Value(/* VFloat */ 2, [Math.acos(x_28)]);
1875
+ case 24:
1876
+ return new Value(/* VFloat */ 2, [Math.atan(x_29)]);
1877
+ case 25:
1878
+ return new Value(/* VFloat */ 2, [Math.pow(x_30, y_4)]);
1879
+ case 26:
1880
+ return new Value(/* VFloat */ 2, [Math.atan2(x_31, y_5)]);
1881
+ case 27:
1882
+ return new Value(/* VBool */ 3, [Number.isNaN(x_32)]);
1883
+ case 28:
1884
+ return new Value(/* VBool */ 3, [isInfinity(x_33)]);
1885
+ case 29:
1886
+ return new Value(/* VBool */ 3, [!(Number.isNaN(x_34) ? true : isInfinity(x_34))]);
1887
+ case 30:
1888
+ return new Value(/* VFloat */ 2, [3.141592653589793]);
1889
+ case 31:
1890
+ return new Value(/* VFloat */ 2, [toFloat64(x_35)]);
1891
+ case 32:
1892
+ return new Value(/* VOption */ 9, [((Number.isNaN(x_36) ? true : (x_36 < -9.223372036854776E+18)) ? true : (x_36 >= 9.223372036854776E+18)) ? undefined : (new Value(/* VInt */ 1, [toInt64_unchecked(fromFloat64(x_36))]))]);
1893
+ case 33:
1894
+ return new Value(/* VInt */ 1, [toInt64_unchecked(fromInt32(x_37.length))]);
1895
+ case 34:
1896
+ return new Value(/* VBool */ 3, [x_38.length === 0]);
1897
+ case 35:
1898
+ return new Value(/* VBool */ 3, [forAll(whitespace, x_39.split(""))]);
1899
+ case 36:
1900
+ return new Value(/* VString */ 4, [trimText(true, true, x_40)]);
1901
+ case 37:
1902
+ return new Value(/* VString */ 4, [trimText(true, false, x_41)]);
1903
+ case 38:
1904
+ return new Value(/* VString */ 4, [trimText(false, true, x_42)]);
1905
+ case 39:
1906
+ return new Value(/* VList */ 5, [map((Item) => (new Value(/* VString */ 4, [Item])), ofArray(split(replace(replace(x_43, "\r\n", "\n"), "\r", "\n"), ["\n"], undefined, 0)))]);
1907
+ case 40:
1908
+ return new Value(/* VBool */ 3, [startsWith(x_44, needle, 4)]);
1909
+ case 41:
1910
+ return new Value(/* VBool */ 3, [indexOf(x_45, needle_1, 4) >= 0]);
1911
+ case 42:
1912
+ return new Value(/* VString */ 4, [padLeft(x_46, ~~toInt32_unchecked(n_3))]);
1913
+ case 43:
1914
+ return new Value(/* VString */ 4, [padRight(x_47, ~~toInt32_unchecked(n_4))]);
1915
+ case 44:
1916
+ return new Value(/* VString */ 4, [replicate(~~toInt32_unchecked(n_5), x_48)]);
1917
+ case 45:
1918
+ return new Value(/* VString */ 4, [normalizePath(path)]);
1919
+ case 46:
1920
+ return new Value(/* VBool */ 3, [startsWith(path_1, "/", 4)]);
1921
+ case 47:
1922
+ return new Value(/* VString */ 4, [normalizePath(startsWith(right_1, "/", 4) ? right_1 : ((left_1 === "") ? right_1 : ((left_1 + "/") + right_1)))]);
1923
+ case 48:
1924
+ return new Value(/* VString */ 4, [fileName(path_2)]);
1925
+ case 49: {
1926
+ const name_1 = fileName(path_3);
1927
+ const dot = name_1.lastIndexOf(".") | 0;
1928
+ return new Value(/* VOption */ 9, [((dot <= 0) ? true : (dot === (name_1.length - 1))) ? undefined : (new Value(/* VString */ 4, [substring(name_1, dot)]))]);
1929
+ }
1930
+ case 50: {
1931
+ const name_2 = fileName(path_4);
1932
+ const dot_1 = name_2.lastIndexOf(".") | 0;
1933
+ return new Value(/* VString */ 4, [(dot_1 <= 0) ? name_2 : substring(name_2, 0, dot_1)]);
1934
+ }
1935
+ case 51: {
1936
+ const normalized = normalizePath(path_5);
1937
+ const slash = normalized.lastIndexOf("/") | 0;
1938
+ return new Value(/* VOption */ 9, [((normalized === "/") ? true : (normalized === ".")) ? undefined : ((slash < 0) ? (new Value(/* VString */ 4, ["."])) : ((slash === 0) ? (new Value(/* VString */ 4, ["/"])) : (new Value(/* VString */ 4, [substring(normalized, 0, slash)]))))]);
1939
+ }
1940
+ case 52:
1941
+ return new Value(/* VOption */ 9, [(option_1 = relativePath(basis, target), (option_1 != null) ? (new Value(/* VString */ 4, [option_1])) : undefined)]);
1942
+ case 53:
1943
+ return new Value(/* VBool */ 3, [globMatch(pattern, path_6)]);
1944
+ case 54: {
1945
+ globMatch(pattern_1, "");
1946
+ return new Value(/* VList */ 5, [filter((_arg) => {
1947
+ if (_arg.tag === 4) {
1948
+ return globMatch(pattern_1, _arg.fields[0]);
1949
+ }
1950
+ else {
1951
+ return false;
1952
+ }
1953
+ }, paths)]);
1954
+ }
1955
+ case 55:
1956
+ return new Value(/* VOption */ 9, [(option_3 = parseVersion(text), (option_3 != null) ? versionValue(option_3) : undefined)]);
1957
+ case 56:
1958
+ return new Value(/* VString */ 4, [formatVersion(toArray(delay(() => map_1((name_3) => {
1959
+ const matchValue_1 = FSharpMap__get_Item(fields, name_3);
1960
+ if (matchValue_1.tag === 4) {
1961
+ return matchValue_1.fields[0];
1962
+ }
1963
+ else {
1964
+ throw new Exception("Invalid semantic version (Parameter \'version\')");
1965
+ }
1966
+ }, versionFields))))]);
1967
+ case 57: {
1968
+ const matchValue_2 = parseVersion(left_2);
1969
+ const matchValue_3 = parseVersion(right_2);
1970
+ let matchResult_1, a_1, b_1;
1971
+ if (matchValue_2 != null) {
1972
+ if (matchValue_3 != null) {
1973
+ matchResult_1 = 0;
1974
+ a_1 = matchValue_2;
1975
+ b_1 = matchValue_3;
1976
+ }
1977
+ else {
1978
+ matchResult_1 = 1;
1979
+ }
1980
+ }
1981
+ else {
1982
+ matchResult_1 = 1;
1983
+ }
1984
+ switch (matchResult_1) {
1985
+ case 0:
1986
+ return new Value(/* VOption */ 9, [new Value(/* VInt */ 1, [toInt64_unchecked(fromInt32(compareVersions(a_1, b_1)))])]);
1987
+ default:
1988
+ return new Value(/* VOption */ 9, [undefined]);
1989
+ }
1990
+ }
1991
+ default:
1992
+ throw new Exception(concat("Invalid arguments to ", name, ".") + " (Parameter \'arguments\')");
1993
+ }
1994
+ }
1995
+
1996
+ export const runtimeSignatures = ofArray([["Encoding.utf8Encode", new Scheme(empty(), fn(singleton(Type.TString), new Type(/* TOption */ 10, [new Type(/* TList */ 5, [Type.TInt])]))), singleton("text")], ["Encoding.utf8Decode", new Scheme(empty(), fn(singleton(new Type(/* TList */ 5, [Type.TInt])), new Type(/* TOption */ 10, [Type.TString]))), singleton("bytes")], ["Encoding.base64Encode", new Scheme(empty(), fn(singleton(new Type(/* TList */ 5, [Type.TInt])), new Type(/* TOption */ 10, [Type.TString]))), singleton("bytes")], ["Encoding.base64Decode", new Scheme(empty(), fn(singleton(Type.TString), new Type(/* TOption */ 10, [new Type(/* TList */ 5, [Type.TInt])]))), singleton("text")], ["Encoding.hexEncode", new Scheme(empty(), fn(singleton(new Type(/* TList */ 5, [Type.TInt])), new Type(/* TOption */ 10, [Type.TString]))), singleton("bytes")], ["Encoding.hexDecode", new Scheme(empty(), fn(singleton(Type.TString), new Type(/* TOption */ 10, [new Type(/* TList */ 5, [Type.TInt])]))), singleton("text")], ["Encoding.uriEncode", new Scheme(empty(), fn(singleton(Type.TString), new Type(/* TOption */ 10, [Type.TString]))), singleton("text")], ["Encoding.uriDecode", new Scheme(empty(), fn(singleton(Type.TString), new Type(/* TOption */ 10, [Type.TString]))), singleton("text")], ["Hash.sha256", new Scheme(empty(), fn(singleton(Type.TString), new Type(/* TOption */ 10, [Type.TString]))), singleton("text")], ["Hash.sha256Bytes", new Scheme(empty(), fn(singleton(new Type(/* TList */ 5, [Type.TInt])), new Type(/* TOption */ 10, [Type.TString]))), singleton("bytes")]]);
1997
+