@northtalk/ts 0.0.0-stage → 0.2.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.
- package/LICENSE +21 -0
- package/README.md +59 -2
- package/UNICODE-LICENSE.txt +39 -0
- package/base64-DORMd3Hv.js +6621 -0
- package/binary-value-CEmh60GC.d.ts +15 -0
- package/capabilities-CH0FkRMq.js +1301 -0
- package/checker-Dc1jl2WH.js +6657 -0
- package/core-DptnvQT9.d.ts +14 -0
- package/debug-CQBxKnJB.d.ts +3065 -0
- package/debug.d.ts +3 -0
- package/debug.js +2 -0
- package/driver.d.ts +41 -0
- package/driver.js +152 -0
- package/encoding-nlrpj-Pb.js +99 -0
- package/engine-BGaJ9dAk.js +326 -0
- package/engine-vbYInVYF.d.ts +86 -0
- package/errors-LYJZ_c8h.js +3735 -0
- package/group-B742gg4T.js +10170 -0
- package/http-capability-CSTkw1Yt.js +728 -0
- package/http.d.ts +59 -0
- package/http.js +465 -0
- package/index.d.ts +651 -0
- package/index.js +44 -0
- package/manifest-BscyH_rW.d.ts +70 -0
- package/manifest-DjsxDSuB.js +129 -0
- package/message-layer.d.ts +12 -0
- package/message-layer.js +4 -0
- package/notify.d.ts +3 -0
- package/notify.js +2 -0
- package/objects-DJ3QtCCs.d.ts +640 -0
- package/objects-Db7IB5vQ.js +91 -0
- package/operation-promises-EgZXG5N_.js +23 -0
- package/package.json +70 -4
- package/readers-BFPuosPk.d.ts +25 -0
- package/readers-CjJHKHvH.js +482 -0
- package/request-pump-binary-DdY3X-yl.js +2246 -0
- package/router--71qvxtY.js +343 -0
- package/router-Zhrw5l__.d.ts +55 -0
- package/session.d.ts +9 -0
- package/session.js +3510 -0
- package/setup.d.ts +3 -0
- package/setup.js +193 -0
- package/sha256-B_kyYw3Z.js +124 -0
- package/sqlite.d.ts +74 -0
- package/sqlite.js +529 -0
- package/store-capability-OZp4hXmj.js +390 -0
- package/store-hJrRULMx.js +60 -0
- package/store.d.ts +21 -0
- package/store.js +4 -0
- package/user-capability-BK4Asg7D.js +276 -0
- package/wasm.d.ts +243 -0
- package/wasm.js +1737 -0
|
@@ -0,0 +1,3735 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/persistent-tree.ts
|
|
3
|
+
const total = (t) => t?.total ?? 0;
|
|
4
|
+
const height = (t) => t?.height ?? 0;
|
|
5
|
+
const node = (key, value, span, left, right) => ({
|
|
6
|
+
key,
|
|
7
|
+
value,
|
|
8
|
+
span,
|
|
9
|
+
left,
|
|
10
|
+
right,
|
|
11
|
+
height: 1 + Math.max(height(left), height(right)),
|
|
12
|
+
total: span + total(left) + total(right)
|
|
13
|
+
});
|
|
14
|
+
const balance = (key, value, span, left, right) => {
|
|
15
|
+
if (height(left) > height(right) + 1) {
|
|
16
|
+
let l = left;
|
|
17
|
+
if (height(l.right) > height(l.left)) {
|
|
18
|
+
const r = l.right;
|
|
19
|
+
l = node(r.key, r.value, r.span, node(l.key, l.value, l.span, l.left, r.left), r.right);
|
|
20
|
+
}
|
|
21
|
+
return node(l.key, l.value, l.span, l.left, node(key, value, span, l.right, right));
|
|
22
|
+
}
|
|
23
|
+
if (height(right) > height(left) + 1) {
|
|
24
|
+
let r = right;
|
|
25
|
+
if (height(r.left) > height(r.right)) {
|
|
26
|
+
const l = r.left;
|
|
27
|
+
r = node(l.key, l.value, l.span, l.left, node(r.key, r.value, r.span, l.right, r.right));
|
|
28
|
+
}
|
|
29
|
+
return node(r.key, r.value, r.span, node(key, value, span, left, r.left), r.right);
|
|
30
|
+
}
|
|
31
|
+
return node(key, value, span, left, right);
|
|
32
|
+
};
|
|
33
|
+
const find = (t, key) => {
|
|
34
|
+
while (t) {
|
|
35
|
+
if (key === t.key) return t;
|
|
36
|
+
t = key < t.key ? t.left : t.right;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
const put = (t, key, value, span = 1) => {
|
|
40
|
+
if (!t) return node(key, value, span);
|
|
41
|
+
if (key === t.key) return node(key, value, span, t.left, t.right);
|
|
42
|
+
return key < t.key ? balance(t.key, t.value, t.span, put(t.left, key, value, span), t.right) : balance(t.key, t.value, t.span, t.left, put(t.right, key, value, span));
|
|
43
|
+
};
|
|
44
|
+
const remove = (t, key) => {
|
|
45
|
+
if (!t) return;
|
|
46
|
+
if (key < t.key) return balance(t.key, t.value, t.span, remove(t.left, key), t.right);
|
|
47
|
+
if (key > t.key) return balance(t.key, t.value, t.span, t.left, remove(t.right, key));
|
|
48
|
+
if (!t.left) return t.right;
|
|
49
|
+
if (!t.right) return t.left;
|
|
50
|
+
let next = t.right;
|
|
51
|
+
while (next.left) next = next.left;
|
|
52
|
+
return balance(next.key, next.value, next.span, t.left, remove(t.right, next.key));
|
|
53
|
+
};
|
|
54
|
+
/** Find an element by zero-based sequence position, returning its chunk offset. */
|
|
55
|
+
const at = (t, i) => {
|
|
56
|
+
if (i < 0 || i >= total(t)) return;
|
|
57
|
+
while (t) {
|
|
58
|
+
const left = total(t.left);
|
|
59
|
+
if (i < left) t = t.left;
|
|
60
|
+
else if (i < left + t.span) return {
|
|
61
|
+
node: t,
|
|
62
|
+
offset: i - left
|
|
63
|
+
};
|
|
64
|
+
else {
|
|
65
|
+
i -= left + t.span;
|
|
66
|
+
t = t.right;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
const values = function* (t) {
|
|
71
|
+
if (t) {
|
|
72
|
+
yield* values(t.left);
|
|
73
|
+
yield t.value;
|
|
74
|
+
yield* values(t.right);
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region src/list-storage.ts
|
|
79
|
+
const chunkSize = 32;
|
|
80
|
+
/** Replacement keeps the tree's shape, spans and endpoint keys unchanged. */
|
|
81
|
+
const replaceItem = (root, i, value) => {
|
|
82
|
+
const offset = total(root.left);
|
|
83
|
+
let left = root.left;
|
|
84
|
+
let right = root.right;
|
|
85
|
+
let chunk = root.value;
|
|
86
|
+
if (i < offset) left = replaceItem(left, i, value);
|
|
87
|
+
else if (i >= offset + root.span) right = replaceItem(right, i - offset - root.span, value);
|
|
88
|
+
else {
|
|
89
|
+
const copy = chunk.slice();
|
|
90
|
+
copy[i - offset] = value;
|
|
91
|
+
chunk = copy;
|
|
92
|
+
}
|
|
93
|
+
return {
|
|
94
|
+
key: root.key,
|
|
95
|
+
value: chunk,
|
|
96
|
+
span: root.span,
|
|
97
|
+
left,
|
|
98
|
+
right,
|
|
99
|
+
height: root.height,
|
|
100
|
+
total: root.total
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
/** A persistent sequence of small chunks. Growth and point edits copy only a
|
|
104
|
+
* chunk and its AVL path, including when extending a retained older List. */
|
|
105
|
+
var ListStorage = class ListStorage {
|
|
106
|
+
#root;
|
|
107
|
+
#first;
|
|
108
|
+
#last;
|
|
109
|
+
constructor(root, first, last) {
|
|
110
|
+
this.#root = root;
|
|
111
|
+
this.#first = first;
|
|
112
|
+
this.#last = last;
|
|
113
|
+
}
|
|
114
|
+
static copy(items) {
|
|
115
|
+
let root;
|
|
116
|
+
let key = 0;
|
|
117
|
+
for (let i = 0; i < items.length; i += chunkSize) {
|
|
118
|
+
const chunk = items.slice(i, i + chunkSize);
|
|
119
|
+
root = put(root, key++, chunk, chunk.length);
|
|
120
|
+
}
|
|
121
|
+
return new ListStorage(root, 0, key - 1);
|
|
122
|
+
}
|
|
123
|
+
get length() {
|
|
124
|
+
return total(this.#root);
|
|
125
|
+
}
|
|
126
|
+
index(i) {
|
|
127
|
+
const found = at(this.#root, i);
|
|
128
|
+
return found?.node.value[found.offset];
|
|
129
|
+
}
|
|
130
|
+
set(i, value) {
|
|
131
|
+
if (value !== void 0) return new ListStorage(replaceItem(this.#root, i, value), this.#first, this.#last);
|
|
132
|
+
const found = at(this.#root, i);
|
|
133
|
+
const chunk = [...found.node.value];
|
|
134
|
+
chunk.splice(found.offset, 1);
|
|
135
|
+
const root = chunk.length ? put(this.#root, found.node.key, chunk, chunk.length) : remove(this.#root, found.node.key);
|
|
136
|
+
const first = at(root, 0)?.node.key ?? 0;
|
|
137
|
+
const last = at(root, total(root) - 1)?.node.key ?? -1;
|
|
138
|
+
return new ListStorage(root, first, last);
|
|
139
|
+
}
|
|
140
|
+
extend(count, item, prepend) {
|
|
141
|
+
if (count === 0) return this;
|
|
142
|
+
let root = this.#root;
|
|
143
|
+
let first = this.#first;
|
|
144
|
+
let last = this.#last;
|
|
145
|
+
let done = 0;
|
|
146
|
+
const edge = at(root, prepend ? 0 : total(root) - 1)?.node;
|
|
147
|
+
if (edge && edge.span < chunkSize) {
|
|
148
|
+
const n = Math.min(count, chunkSize - edge.span);
|
|
149
|
+
const added = Array.from({ length: n }, (_, i) => item(prepend ? count - n + i : i));
|
|
150
|
+
const chunk = prepend ? [...added, ...edge.value] : [...edge.value, ...added];
|
|
151
|
+
root = put(root, edge.key, chunk, chunk.length);
|
|
152
|
+
done = n;
|
|
153
|
+
}
|
|
154
|
+
while (done < count) {
|
|
155
|
+
const n = Math.min(chunkSize, count - done);
|
|
156
|
+
const chunk = Array.from({ length: n }, (_, i) => item(prepend ? count - done - n + i : done + i));
|
|
157
|
+
const key = !root ? 0 : prepend ? first - 1 : last + 1;
|
|
158
|
+
root = put(root, key, chunk, n);
|
|
159
|
+
if (prepend || total(root) === n) first = key;
|
|
160
|
+
if (!prepend || total(root) === n) last = key;
|
|
161
|
+
done += n;
|
|
162
|
+
}
|
|
163
|
+
return new ListStorage(root, first, last);
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
//#endregion
|
|
167
|
+
//#region src/map-storage.ts
|
|
168
|
+
/** Lookup and insertion order have separate persistent trees. Replacing a key
|
|
169
|
+
* keeps its ordinal; deleting and reinserting assigns a new final ordinal. */
|
|
170
|
+
var MapStorage = class MapStorage {
|
|
171
|
+
#keys;
|
|
172
|
+
#order;
|
|
173
|
+
#next;
|
|
174
|
+
#pairs;
|
|
175
|
+
constructor(keys, order, next) {
|
|
176
|
+
this.#keys = keys;
|
|
177
|
+
this.#order = order;
|
|
178
|
+
this.#next = next;
|
|
179
|
+
}
|
|
180
|
+
static copy(pairs) {
|
|
181
|
+
let result = new MapStorage(void 0, void 0, 0);
|
|
182
|
+
for (const [key, value] of pairs) result = result.set(key, value);
|
|
183
|
+
return result;
|
|
184
|
+
}
|
|
185
|
+
get length() {
|
|
186
|
+
return total(this.#order);
|
|
187
|
+
}
|
|
188
|
+
has(key) {
|
|
189
|
+
return find(this.#keys, key) !== void 0;
|
|
190
|
+
}
|
|
191
|
+
get(key) {
|
|
192
|
+
const found = find(this.#keys, key);
|
|
193
|
+
return found ? find(this.#order, found.value).value[1] : void 0;
|
|
194
|
+
}
|
|
195
|
+
pairs() {
|
|
196
|
+
this.#pairs ??= Object.freeze([...values(this.#order)]);
|
|
197
|
+
return this.#pairs;
|
|
198
|
+
}
|
|
199
|
+
set(key, value) {
|
|
200
|
+
const found = find(this.#keys, key);
|
|
201
|
+
if (value === void 0) return found ? new MapStorage(remove(this.#keys, key), remove(this.#order, found.value), this.#next) : this;
|
|
202
|
+
const ordinal = found?.value ?? this.#next;
|
|
203
|
+
const pair = Object.freeze([key, value]);
|
|
204
|
+
return new MapStorage(found ? this.#keys : put(this.#keys, key, ordinal), put(this.#order, ordinal, pair), this.#next + (found ? 0 : 1));
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
//#endregion
|
|
208
|
+
//#region src/dates.ts
|
|
209
|
+
const US_PER_SECOND = 1000000n;
|
|
210
|
+
const US_PER_DAY = 86400n * US_PER_SECOND;
|
|
211
|
+
/** The current wall-clock time as epoch microseconds, for `pump`. */
|
|
212
|
+
const nowMicros = () => BigInt(Date.now()) * 1000n;
|
|
213
|
+
/** Whether a mathematical deadline can cross the Host boundary as an Instant. */
|
|
214
|
+
const isInstant = (us) => us >= -62135596800000000n && us < 253402300800000000n;
|
|
215
|
+
/** A date or time past the range; `year` is the year it would have been. */
|
|
216
|
+
var DateRangeError = class extends Error {
|
|
217
|
+
year;
|
|
218
|
+
name = "DateRangeError";
|
|
219
|
+
constructor(year) {
|
|
220
|
+
super(`the year ${year} is outside 1 to 9999`);
|
|
221
|
+
this.year = year;
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
const floorDiv = (a, b) => {
|
|
225
|
+
const q = a / b;
|
|
226
|
+
return a % b !== 0n && a < 0n !== b < 0n ? q - 1n : q;
|
|
227
|
+
};
|
|
228
|
+
const daysFromCivil = (y, m, d) => {
|
|
229
|
+
const year = m <= 2 ? y - 1n : y;
|
|
230
|
+
const era = floorDiv(year, 400n);
|
|
231
|
+
const yoe = year - era * 400n;
|
|
232
|
+
const doy = BigInt(Math.floor((153 * (m + (m > 2 ? -3 : 9)) + 2) / 5) + d - 1);
|
|
233
|
+
const doe = yoe * 365n + yoe / 4n - yoe / 100n + doy;
|
|
234
|
+
return era * 146097n + doe - 719468n;
|
|
235
|
+
};
|
|
236
|
+
const civilFromDays = (z) => {
|
|
237
|
+
const shifted = z + 719468n;
|
|
238
|
+
const era = floorDiv(shifted, 146097n);
|
|
239
|
+
const doe = shifted - era * 146097n;
|
|
240
|
+
const yoe = (doe - doe / 1460n + doe / 36524n - doe / 146096n) / 365n;
|
|
241
|
+
const doy = doe - (365n * yoe + yoe / 4n - yoe / 100n);
|
|
242
|
+
const mp = (5n * doy + 2n) / 153n;
|
|
243
|
+
const d = Number(doy - (153n * mp + 2n) / 5n + 1n);
|
|
244
|
+
const m = Number(mp + (mp < 10n ? 3n : -9n));
|
|
245
|
+
return [
|
|
246
|
+
yoe + era * 400n + (m <= 2 ? 1n : 0n),
|
|
247
|
+
m,
|
|
248
|
+
d
|
|
249
|
+
];
|
|
250
|
+
};
|
|
251
|
+
const isLeap = (y) => y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
|
|
252
|
+
const daysIn = (y, m) => [
|
|
253
|
+
31,
|
|
254
|
+
isLeap(y) ? 29 : 28,
|
|
255
|
+
31,
|
|
256
|
+
30,
|
|
257
|
+
31,
|
|
258
|
+
30,
|
|
259
|
+
31,
|
|
260
|
+
31,
|
|
261
|
+
30,
|
|
262
|
+
31,
|
|
263
|
+
30,
|
|
264
|
+
31
|
|
265
|
+
][m - 1];
|
|
266
|
+
const inRange = (year) => {
|
|
267
|
+
if (year < 1n || year > 9999n) throw new DateRangeError(year);
|
|
268
|
+
return Number(year);
|
|
269
|
+
};
|
|
270
|
+
/** The Civil Date of a day number and an optional time of day, in range. */
|
|
271
|
+
const civilOfDays = (days, us) => {
|
|
272
|
+
const [y, month, day] = civilFromDays(days);
|
|
273
|
+
return {
|
|
274
|
+
year: inRange(y),
|
|
275
|
+
month,
|
|
276
|
+
day,
|
|
277
|
+
us
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
/** A Civil Date's day number since 1970-01-01. */
|
|
281
|
+
const civilDays = (c) => daysFromCivil(BigInt(c.year), c.month, c.day);
|
|
282
|
+
/** A date-time as microseconds on a timeline with every day 86400 s long. */
|
|
283
|
+
const civilUs = (c) => civilDays(c) * US_PER_DAY + (c.us ?? 0n);
|
|
284
|
+
const civilOfUs = (us) => {
|
|
285
|
+
const days = floorDiv(us, US_PER_DAY);
|
|
286
|
+
return civilOfDays(days, us - days * US_PER_DAY);
|
|
287
|
+
};
|
|
288
|
+
/** An Instant, as epoch microseconds, checked against the range in UTC. */
|
|
289
|
+
const checkInstant = (us) => {
|
|
290
|
+
civilOfUs(us);
|
|
291
|
+
return us;
|
|
292
|
+
};
|
|
293
|
+
const whole = (n) => typeof n === "number" && Number.isInteger(n);
|
|
294
|
+
/** A Civil Date from its fields, or a reason it isn't one. */
|
|
295
|
+
const civilFromFields = (f) => {
|
|
296
|
+
if (![
|
|
297
|
+
f.year,
|
|
298
|
+
f.month,
|
|
299
|
+
f.day
|
|
300
|
+
].every(whole)) return "a year, month and day are integers";
|
|
301
|
+
if (f.month < 1 || f.month > 12) return "a month is from 1 to 12";
|
|
302
|
+
if (f.year < 1 || f.year > 9999) return "a year is from 1 to 9999";
|
|
303
|
+
if (f.day < 1 || f.day > daysIn(f.year, f.month)) return `that month has no day ${f.day}`;
|
|
304
|
+
const time = [
|
|
305
|
+
f.hour,
|
|
306
|
+
f.minute,
|
|
307
|
+
f.second,
|
|
308
|
+
f.microsecond
|
|
309
|
+
];
|
|
310
|
+
if (time.every((t) => t === void 0)) return {
|
|
311
|
+
year: f.year,
|
|
312
|
+
month: f.month,
|
|
313
|
+
day: f.day,
|
|
314
|
+
us: null
|
|
315
|
+
};
|
|
316
|
+
const [h = 0, mi = 0, s = 0, n = 0] = time;
|
|
317
|
+
if (![
|
|
318
|
+
h,
|
|
319
|
+
mi,
|
|
320
|
+
s,
|
|
321
|
+
n
|
|
322
|
+
].every(whole) || h < 0 || h > 23 || mi < 0 || mi > 59 || s < 0 || s > 59 || n < 0 || n > 999999) return "a time of day is from 00:00:00 to 23:59:59.999999";
|
|
323
|
+
return {
|
|
324
|
+
year: f.year,
|
|
325
|
+
month: f.month,
|
|
326
|
+
day: f.day,
|
|
327
|
+
us: BigInt(h * 3600 + mi * 60 + s) * US_PER_SECOND + BigInt(n)
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
/** A Civil Date's fields, as the Host reads them. */
|
|
331
|
+
const civilFields = (c) => {
|
|
332
|
+
const base = {
|
|
333
|
+
year: c.year,
|
|
334
|
+
month: c.month,
|
|
335
|
+
day: c.day
|
|
336
|
+
};
|
|
337
|
+
if (c.us === null) return base;
|
|
338
|
+
const seconds = Number(c.us / US_PER_SECOND);
|
|
339
|
+
return {
|
|
340
|
+
...base,
|
|
341
|
+
hour: Math.floor(seconds / 3600),
|
|
342
|
+
minute: Math.floor(seconds / 60) % 60,
|
|
343
|
+
second: seconds % 60,
|
|
344
|
+
microsecond: Number(c.us % US_PER_SECOND)
|
|
345
|
+
};
|
|
346
|
+
};
|
|
347
|
+
const two = (n) => String(n).padStart(2, "0");
|
|
348
|
+
const timeText = (us) => {
|
|
349
|
+
const seconds = Number(us / US_PER_SECOND);
|
|
350
|
+
const fraction = (us % US_PER_SECOND).toString().padStart(6, "0").replace(/0+$/, "");
|
|
351
|
+
return `${two(Math.floor(seconds / 3600))}:${two(Math.floor(seconds / 60) % 60)}:${two(seconds % 60)}${fraction ? `.${fraction}` : ""}`;
|
|
352
|
+
};
|
|
353
|
+
const dateText = (y, m, d) => `${String(y).padStart(4, "0")}-${two(m)}-${two(d)}`;
|
|
354
|
+
/** A Civil Date's text form: `2026-09-27`, or `2026-09-27T14:30:00.5`. */
|
|
355
|
+
const civilText = (c) => dateText(c.year, c.month, c.day) + (c.us === null ? "" : `T${timeText(c.us)}`);
|
|
356
|
+
/** An Instant's text form, always in UTC: `2026-09-27T13:30:00Z`. */
|
|
357
|
+
const formatInstant = (us) => {
|
|
358
|
+
const days = floorDiv(us, US_PER_DAY);
|
|
359
|
+
const [y, m, d] = civilFromDays(days);
|
|
360
|
+
return `${dateText(Number(y), m, d)}T${timeText(us - days * US_PER_DAY)}Z`;
|
|
361
|
+
};
|
|
362
|
+
const civilPattern = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,6}))?)?/;
|
|
363
|
+
const readCivil = (s) => {
|
|
364
|
+
const m = civilPattern.exec(s);
|
|
365
|
+
if (!m) return;
|
|
366
|
+
const [y, mo, d] = m.slice(1, 4).map(Number);
|
|
367
|
+
if (y === 0 && mo >= 1 && mo <= 12 && d >= 1 && d <= daysIn(4, mo)) throw new DateRangeError(0n);
|
|
368
|
+
const fields = m[4] === void 0 ? {
|
|
369
|
+
year: y,
|
|
370
|
+
month: mo,
|
|
371
|
+
day: d
|
|
372
|
+
} : {
|
|
373
|
+
year: y,
|
|
374
|
+
month: mo,
|
|
375
|
+
day: d,
|
|
376
|
+
hour: Number(m[4]),
|
|
377
|
+
minute: Number(m[5]),
|
|
378
|
+
second: Number(m[6]),
|
|
379
|
+
microsecond: Number((m[7] ?? "").padEnd(6, "0"))
|
|
380
|
+
};
|
|
381
|
+
const c = civilFromFields(fields);
|
|
382
|
+
return typeof c === "string" ? void 0 : {
|
|
383
|
+
c,
|
|
384
|
+
rest: s.slice(m[0].length)
|
|
385
|
+
};
|
|
386
|
+
};
|
|
387
|
+
/** `as civil date`: exactly the text form, or undefined. Throws DateRangeError for year 0. */
|
|
388
|
+
const parseCivil = (s) => {
|
|
389
|
+
const read = readCivil(s);
|
|
390
|
+
return read && read.rest === "" ? read.c : void 0;
|
|
391
|
+
};
|
|
392
|
+
/**
|
|
393
|
+
* `as instant`: a date-time, then `Z` or a numeric offset of less than 24
|
|
394
|
+
* hours, converted to UTC; or undefined. Throws DateRangeError past the range.
|
|
395
|
+
*/
|
|
396
|
+
const parseInstantText = (s) => {
|
|
397
|
+
const read = readCivil(s);
|
|
398
|
+
if (!read || read.c.us === null) return;
|
|
399
|
+
let offset = 0n;
|
|
400
|
+
if (read.rest !== "Z") {
|
|
401
|
+
const m = /^([+-])(\d{2}):(\d{2})$/.exec(read.rest);
|
|
402
|
+
if (!m || Number(m[3]) > 59 || Number(m[2]) > 23) return;
|
|
403
|
+
offset = (m[1] === "-" ? -1n : 1n) * BigInt(Number(m[2]) * 3600 + Number(m[3]) * 60) * US_PER_SECOND;
|
|
404
|
+
}
|
|
405
|
+
return checkInstant(civilUs(read.c) - offset);
|
|
406
|
+
};
|
|
407
|
+
/** An Instant's display form as epoch microseconds, for the Host and the Trace. */
|
|
408
|
+
const parseInstant = (s) => {
|
|
409
|
+
let us;
|
|
410
|
+
try {
|
|
411
|
+
us = s.endsWith("Z") ? parseInstantText(s) : void 0;
|
|
412
|
+
} catch (error) {
|
|
413
|
+
if (!(error instanceof DateRangeError)) throw error;
|
|
414
|
+
}
|
|
415
|
+
return us ?? invalidValue(`Not an Instant: ${s}`);
|
|
416
|
+
};
|
|
417
|
+
/** Months since year 0, and back, for calendar arithmetic. */
|
|
418
|
+
const addMonths = (c, months) => {
|
|
419
|
+
const total = BigInt(c.year) * 12n + BigInt(c.month - 1) + months;
|
|
420
|
+
const year = floorDiv(total, 12n);
|
|
421
|
+
const month = Number(total - year * 12n) + 1;
|
|
422
|
+
const y = inRange(year);
|
|
423
|
+
return {
|
|
424
|
+
year: y,
|
|
425
|
+
month,
|
|
426
|
+
day: Math.min(c.day, daysIn(y, month)),
|
|
427
|
+
us: c.us
|
|
428
|
+
};
|
|
429
|
+
};
|
|
430
|
+
/** ISO 8601: 1 for Monday to 7 for Sunday. 1970-01-01 was a Thursday. */
|
|
431
|
+
const weekday = (c) => Number((civilDays(c) % 7n + 10n) % 7n) + 1;
|
|
432
|
+
const dayOfYear = (c) => Number(civilDays(c) - daysFromCivil(BigInt(c.year), 1, 1)) + 1;
|
|
433
|
+
/** ISO 8601 week numbering: the week with the year's first Thursday is week 1. */
|
|
434
|
+
const isoWeek = (c) => {
|
|
435
|
+
const thursday = civilDays(c) - BigInt(weekday(c)) + 4n;
|
|
436
|
+
const [y] = civilFromDays(thursday);
|
|
437
|
+
const week = Number((thursday - daysFromCivil(y, 1, 1)) / 7n) + 1;
|
|
438
|
+
return {
|
|
439
|
+
year: Number(y),
|
|
440
|
+
week
|
|
441
|
+
};
|
|
442
|
+
};
|
|
443
|
+
//#endregion
|
|
444
|
+
//#region src/decimal.ts
|
|
445
|
+
var ArithmeticError = class extends Error {
|
|
446
|
+
code;
|
|
447
|
+
constructor(code) {
|
|
448
|
+
super(code);
|
|
449
|
+
this.code = code;
|
|
450
|
+
this.name = "ArithmeticError";
|
|
451
|
+
}
|
|
452
|
+
};
|
|
453
|
+
const DIGITS = 34;
|
|
454
|
+
const MIN_EXPONENT = -6176;
|
|
455
|
+
const LIMIT = 10n ** BigInt(DIGITS);
|
|
456
|
+
const parseDec = (canonical) => {
|
|
457
|
+
const negative = canonical.startsWith("-");
|
|
458
|
+
const [whole, fraction = ""] = (negative ? canonical.slice(1) : canonical).split(".");
|
|
459
|
+
return {
|
|
460
|
+
negative,
|
|
461
|
+
coefficient: BigInt(whole + fraction),
|
|
462
|
+
exponent: -fraction.length
|
|
463
|
+
};
|
|
464
|
+
};
|
|
465
|
+
const formatDec = ({ coefficient, exponent, negative }) => {
|
|
466
|
+
let digits = coefficient.toString();
|
|
467
|
+
if (exponent < 0) {
|
|
468
|
+
digits = digits.padStart(-exponent + 1, "0");
|
|
469
|
+
digits = `${digits.slice(0, exponent)}.${digits.slice(exponent)}`;
|
|
470
|
+
}
|
|
471
|
+
return `${negative && coefficient !== 0n ? "-" : ""}${digits}`;
|
|
472
|
+
};
|
|
473
|
+
const digitCount = (n) => n === 0n ? 0 : n.toString().length;
|
|
474
|
+
const POWERS = Array.from({ length: 70 }, (_, i) => 10n ** BigInt(i));
|
|
475
|
+
const pow10 = (n) => POWERS[n] ?? 10n ** BigInt(n);
|
|
476
|
+
/** Whether a Dec fits chapter 3's limits, so it needs no further checks. */
|
|
477
|
+
const withinLimits = (d) => d.coefficient < LIMIT && d.exponent >= MIN_EXPONENT && d.exponent <= 0;
|
|
478
|
+
const exact = (negative, c, ideal) => c < LIMIT && ideal >= MIN_EXPONENT && ideal <= 0 ? {
|
|
479
|
+
negative: negative && c !== 0n,
|
|
480
|
+
coefficient: c,
|
|
481
|
+
exponent: ideal
|
|
482
|
+
} : null;
|
|
483
|
+
const roundAt = (n, d, e, t) => {
|
|
484
|
+
let num = n;
|
|
485
|
+
let den = d;
|
|
486
|
+
if (e >= t) num *= pow10(e - t);
|
|
487
|
+
else den *= pow10(t - e);
|
|
488
|
+
const q = num / den;
|
|
489
|
+
const twice = 2n * (num - q * den);
|
|
490
|
+
if (twice > den || twice === den && q % 2n === 1n) return q + 1n;
|
|
491
|
+
return q;
|
|
492
|
+
};
|
|
493
|
+
/**
|
|
494
|
+
* Round the exact non-negative value n/d × 10^e, then pick the exponent
|
|
495
|
+
* nearest `ideal` among the ways to write the rounded value.
|
|
496
|
+
*/
|
|
497
|
+
const result = (negative, n, d, e, ideal) => {
|
|
498
|
+
if (n === 0n) return {
|
|
499
|
+
negative: false,
|
|
500
|
+
coefficient: 0n,
|
|
501
|
+
exponent: Math.min(0, Math.max(MIN_EXPONENT, ideal))
|
|
502
|
+
};
|
|
503
|
+
let t = e + digitCount(n) - digitCount(d) - DIGITS;
|
|
504
|
+
let c = roundAt(n, d, e, t);
|
|
505
|
+
while (digitCount(c) > DIGITS) c = roundAt(n, d, e, ++t);
|
|
506
|
+
for (;;) {
|
|
507
|
+
const finer = roundAt(n, d, e, t - 1);
|
|
508
|
+
if (digitCount(finer) > DIGITS) break;
|
|
509
|
+
t--;
|
|
510
|
+
c = finer;
|
|
511
|
+
}
|
|
512
|
+
if (t < MIN_EXPONENT) {
|
|
513
|
+
t = MIN_EXPONENT;
|
|
514
|
+
c = roundAt(n, d, e, t);
|
|
515
|
+
}
|
|
516
|
+
if (c === 0n) return result(false, 0n, 1n, 0, ideal);
|
|
517
|
+
if (t > 0 || c * pow10(Math.max(0, t)) >= LIMIT) throw new ArithmeticError("overflow");
|
|
518
|
+
let trailing = 0;
|
|
519
|
+
while (c % pow10(trailing + 1) === 0n) trailing++;
|
|
520
|
+
const coarsest = Math.min(0, t + trailing);
|
|
521
|
+
const finest = Math.max(MIN_EXPONENT, t - (DIGITS - digitCount(c)));
|
|
522
|
+
const exponent = Math.min(coarsest, Math.max(finest, ideal));
|
|
523
|
+
return {
|
|
524
|
+
negative,
|
|
525
|
+
coefficient: exponent >= t ? c / pow10(exponent - t) : c * pow10(t - exponent),
|
|
526
|
+
exponent
|
|
527
|
+
};
|
|
528
|
+
};
|
|
529
|
+
const aligned = (a, b) => {
|
|
530
|
+
const e = Math.min(a.exponent, b.exponent);
|
|
531
|
+
return {
|
|
532
|
+
sa: (a.negative ? -1n : 1n) * a.coefficient * pow10(a.exponent - e),
|
|
533
|
+
sb: (b.negative ? -1n : 1n) * b.coefficient * pow10(b.exponent - e),
|
|
534
|
+
e
|
|
535
|
+
};
|
|
536
|
+
};
|
|
537
|
+
const signed = (value, d, e, ideal) => result(value < 0n, value < 0n ? -value : value, d, e, ideal);
|
|
538
|
+
/**
|
|
539
|
+
* The exact value num/den × 10^exponent (den > 0) rounded once, with any
|
|
540
|
+
* trailing zeros after the point dropped: chapter 7's correctly rounded form.
|
|
541
|
+
*/
|
|
542
|
+
const roundRatio = (num, den, exponent) => signed(num, den, exponent, 0);
|
|
543
|
+
const add = (a, b) => {
|
|
544
|
+
const { sa, sb, e } = aligned(a, b);
|
|
545
|
+
const sum = sa + sb;
|
|
546
|
+
return exact(sum < 0n, sum < 0n ? -sum : sum, e) ?? signed(sum, 1n, e, e);
|
|
547
|
+
};
|
|
548
|
+
const subtract = (a, b) => add(a, negate(b));
|
|
549
|
+
const multiply = (a, b) => exact(a.negative !== b.negative, a.coefficient * b.coefficient, a.exponent + b.exponent) ?? result(a.negative !== b.negative, a.coefficient * b.coefficient, 1n, a.exponent + b.exponent, a.exponent + b.exponent);
|
|
550
|
+
const exactQuotient = (negative, n, d, ideal) => {
|
|
551
|
+
if (n === 0n) return exact(false, 0n, Math.min(0, Math.max(MIN_EXPONENT, ideal)));
|
|
552
|
+
let c = n / d;
|
|
553
|
+
let exponent = ideal;
|
|
554
|
+
if (c * d !== n) {
|
|
555
|
+
if (c >= LIMIT / 10n || ideal === MIN_EXPONENT) return null;
|
|
556
|
+
const scale = Math.min(DIGITS + digitCount(d) - digitCount(n), ideal - MIN_EXPONENT);
|
|
557
|
+
const scaled = n * pow10(scale);
|
|
558
|
+
c = scaled / d;
|
|
559
|
+
if (c * d !== scaled) return null;
|
|
560
|
+
exponent -= scale;
|
|
561
|
+
const digits = c.toString();
|
|
562
|
+
let end = digits.length;
|
|
563
|
+
const target = Math.min(0, ideal);
|
|
564
|
+
while (end > 1 && digits[end - 1] === "0" && exponent < target) {
|
|
565
|
+
end--;
|
|
566
|
+
exponent++;
|
|
567
|
+
}
|
|
568
|
+
c /= pow10(digits.length - end);
|
|
569
|
+
}
|
|
570
|
+
if (exponent > 0) {
|
|
571
|
+
if (exponent >= DIGITS) return null;
|
|
572
|
+
c *= pow10(exponent);
|
|
573
|
+
exponent = 0;
|
|
574
|
+
}
|
|
575
|
+
return exact(negative, c, exponent);
|
|
576
|
+
};
|
|
577
|
+
const divide = (a, b) => {
|
|
578
|
+
if (b.coefficient === 0n) throw new ArithmeticError("division by zero");
|
|
579
|
+
const negative = a.negative !== b.negative;
|
|
580
|
+
const ideal = a.exponent - b.exponent;
|
|
581
|
+
return exactQuotient(negative, a.coefficient, b.coefficient, ideal) ?? result(negative, a.coefficient, b.coefficient, ideal, ideal);
|
|
582
|
+
};
|
|
583
|
+
const quotient = (a, b) => {
|
|
584
|
+
if (b.coefficient === 0n) throw new ArithmeticError("division by zero");
|
|
585
|
+
const { sa, sb } = aligned(a, b);
|
|
586
|
+
return sa / sb;
|
|
587
|
+
};
|
|
588
|
+
const div = (a, b) => {
|
|
589
|
+
const q = quotient(a, b);
|
|
590
|
+
return exact(q < 0n, q < 0n ? -q : q, 0) ?? signed(q, 1n, 0, 0);
|
|
591
|
+
};
|
|
592
|
+
const mod = (a, b) => {
|
|
593
|
+
if (b.coefficient === 0n) throw new ArithmeticError("division by zero");
|
|
594
|
+
const { sa, sb, e } = aligned(a, b);
|
|
595
|
+
const r = sa % sb;
|
|
596
|
+
return {
|
|
597
|
+
negative: r < 0n,
|
|
598
|
+
coefficient: r < 0n ? -r : r,
|
|
599
|
+
exponent: e
|
|
600
|
+
};
|
|
601
|
+
};
|
|
602
|
+
const negate = (a) => ({
|
|
603
|
+
...a,
|
|
604
|
+
negative: a.coefficient !== 0n && !a.negative
|
|
605
|
+
});
|
|
606
|
+
/** `a ^ n` for an integer n: the exact power, rounded once. */
|
|
607
|
+
const powerInteger = (a, n) => {
|
|
608
|
+
if (n === 0n) return {
|
|
609
|
+
negative: false,
|
|
610
|
+
coefficient: 1n,
|
|
611
|
+
exponent: 0
|
|
612
|
+
};
|
|
613
|
+
const m = n < 0n ? -n : n;
|
|
614
|
+
const negative = a.negative && m % 2n === 1n;
|
|
615
|
+
const ideal = Number(n) * a.exponent;
|
|
616
|
+
if (a.coefficient === 0n) {
|
|
617
|
+
if (n < 0n) throw new ArithmeticError("division by zero");
|
|
618
|
+
return result(false, 0n, 1n, 0, ideal);
|
|
619
|
+
}
|
|
620
|
+
const magnitude = Number(m) * (Math.log10(Number(a.coefficient.toString().slice(0, 17))) + digitCount(a.coefficient) - Math.min(17, digitCount(a.coefficient)) + a.exponent);
|
|
621
|
+
if (Number(m) > 1e5 && Math.abs(magnitude) > 7e3) {
|
|
622
|
+
if (n > 0n === magnitude > 0) throw new ArithmeticError("overflow");
|
|
623
|
+
return result(false, 0n, 1n, 0, ideal);
|
|
624
|
+
}
|
|
625
|
+
const c = a.coefficient ** m;
|
|
626
|
+
const e = a.exponent * Number(m);
|
|
627
|
+
return n > 0n ? result(negative, c, 1n, e, ideal) : result(negative, 1n, c, -e, ideal);
|
|
628
|
+
};
|
|
629
|
+
/** -1, 0 or 1, comparing by value. */
|
|
630
|
+
const compareDec = (a, b) => {
|
|
631
|
+
const { sa, sb } = aligned(a, b);
|
|
632
|
+
return sa < sb ? -1 : sa > sb ? 1 : 0;
|
|
633
|
+
};
|
|
634
|
+
const isInteger = (a) => a.exponent === 0 || a.coefficient % pow10(-a.exponent) === 0n;
|
|
635
|
+
/** The integer value of a number that is one. */
|
|
636
|
+
const integerOf = (a) => (a.negative ? -1n : 1n) * (a.coefficient / pow10(-a.exponent));
|
|
637
|
+
const decOf = (n) => ({
|
|
638
|
+
negative: n < 0n,
|
|
639
|
+
coefficient: n < 0n ? -n : n,
|
|
640
|
+
exponent: 0
|
|
641
|
+
});
|
|
642
|
+
const digitsOf = (a) => Math.max(1, digitCount(a.coefficient));
|
|
643
|
+
//#endregion
|
|
644
|
+
//#region src/generated/unicode.ts
|
|
645
|
+
const unicodeVersion = "18.0.0";
|
|
646
|
+
const decomposition$1 = "hhCBgGAAAAABAAAAAAAABAAAAACAAAACAAAAABAAAAAAAABAAAAACAAAABAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAACAAAAAAAADAAABAAAAAEAAAAADAAAAACAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAA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CBAB+BwDByCvW0de9EKrGvEAA7GAnCUCwBAAABAAAAAAAAAAAAAjCPmBAA2B6BLjC4EBAAAABEGDmGAAAAAAAAAAAAAAAAAAwWAAAAEDAAAAAA+/CtEgDqRAAAApD0udEgBwC0IlB3Eb5BlB/CMvHBACFB0B2Hw5ThYAAteiH1Ey0BBoBAAElFA9RhC9JeAAgBAAAAAABmCAAAAxBAAAgGpBO5BAlCwB+BsCJqDAyFAwCQYD5CxDDXjDA7HA+D2DAzDtIAiIE8EzCSxClNiIBxCpNsvQguC7B5lBslTokF8BADAICAe0ELICgB+rDBCBBkDgF3L9B8PAA+HAzHCHF6OtDAUADAAEBDBKEDHAACCBCDAABAABABAMEADACAAFFBABAAAAAAAAAAAABAAAAAAAAAAAHAAAAAAAAAAABBEABAAGDAABABAAAABABCABAACAAAAAAABGAAADICECBCDEENABABACCAAACABBEAAAABAAAAAAAAAAAAAAAABAABADBADBAAAAAADABABAABACBAAAAAAAAAAHAEFBABBBEARAHADABBAAAAAGBABACAEBDAGAABBAGABAAAAkBABAAAAAAABBDCBABAAABDACAfAAAABBAJBBAAARCAAAABABBAAAAGGBAAEAAAAAAAADEBABBCAAAACBCBCAADAAAAAAAAACBAAAAAAABAGECAAAAAAAAAAAAABAAAAAAABABAEGBABBCAEHEBDCCBABGQGBEAGADBAAAAAABAGFAABCBDCECECFCAGACACACABCAHIHIHAACACAJCACACAJKALMNOPQRSTUVWXYZaACTLWAbcdefgBbcdhBiBACACACjBAACAACACkBACACACACACACACACACAACACAAAACACAACACACACACefgBACACAlBmBACAlBmBAlBmBlBmBlBmBmBlBmBnBoBlBmBmBmBmBpBmBqBrBmBsBCCCDtBuBvBuBuBAmBAClBmBCAmBmBmBAKJACACmBACACACCACACACACAIACAlBmBACAmBlBmBlBAFCACAFCAAACACAIwBCEABKCxBAHCACAFAFAAFACAFCAAmBAxBKBJyBzBAAAAmBmBmBACmBlBmBAACAAAmBmB0BACACCACAAFCmBACAAAACACACACACCCACACACACmBmBmBmBlBAmBlBmBlBmBlBlBmBlBmBAAmBmBlBAmBlBmBlBmBmBlBmBmBlBmBlBmBmBmBmBmBlBmBmBmBmBFA1BFCDF2BDCACAADFDDAAAAAAAAABCAACAAAACAlB", [
|
|
680
|
+
230,
|
|
681
|
+
232,
|
|
682
|
+
220,
|
|
683
|
+
216,
|
|
684
|
+
202,
|
|
685
|
+
1,
|
|
686
|
+
240,
|
|
687
|
+
233,
|
|
688
|
+
234,
|
|
689
|
+
222,
|
|
690
|
+
228,
|
|
691
|
+
10,
|
|
692
|
+
11,
|
|
693
|
+
12,
|
|
694
|
+
13,
|
|
695
|
+
14,
|
|
696
|
+
15,
|
|
697
|
+
16,
|
|
698
|
+
17,
|
|
699
|
+
18,
|
|
700
|
+
19,
|
|
701
|
+
20,
|
|
702
|
+
21,
|
|
703
|
+
22,
|
|
704
|
+
23,
|
|
705
|
+
24,
|
|
706
|
+
25,
|
|
707
|
+
30,
|
|
708
|
+
31,
|
|
709
|
+
32,
|
|
710
|
+
27,
|
|
711
|
+
28,
|
|
712
|
+
29,
|
|
713
|
+
33,
|
|
714
|
+
34,
|
|
715
|
+
35,
|
|
716
|
+
36,
|
|
717
|
+
7,
|
|
718
|
+
9,
|
|
719
|
+
84,
|
|
720
|
+
91,
|
|
721
|
+
103,
|
|
722
|
+
107,
|
|
723
|
+
118,
|
|
724
|
+
122,
|
|
725
|
+
129,
|
|
726
|
+
130,
|
|
727
|
+
132,
|
|
728
|
+
214,
|
|
729
|
+
218,
|
|
730
|
+
224,
|
|
731
|
+
8,
|
|
732
|
+
26,
|
|
733
|
+
6,
|
|
734
|
+
226
|
|
735
|
+
]];
|
|
736
|
+
const folding$1 = "9vBAhCAAAAAAAAAAAAAAAAAAAAAAAAA6CKAAAAAAAAAAAAAAAAAAAAAABAAAAAAhBBBBBBBBBBBBBBBBBBBBBBBBDBBCBBBBBBBCBBBBBBBBBBBBBBBBBBBBBBBABBBBABBABAACAAABABAADABABBBABCBABAABBADHABABABBBBBBBBCB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DDDADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDMDADADA", [
|
|
741
|
+
"Control",
|
|
742
|
+
"LF",
|
|
743
|
+
"CR",
|
|
744
|
+
"Extend",
|
|
745
|
+
"Prepend",
|
|
746
|
+
"SpacingMark",
|
|
747
|
+
"L",
|
|
748
|
+
"V",
|
|
749
|
+
"T",
|
|
750
|
+
"ZWJ",
|
|
751
|
+
"LV",
|
|
752
|
+
"LVT",
|
|
753
|
+
"Regional_Indicator"
|
|
754
|
+
]];
|
|
755
|
+
const indic = ["jPgYzInIBBBBmCwBQlDCCBjBe7C6BJYBBBrB7BqBBSABEEDACUBTBBDCBCIJEBCMMC5BEECDeDLSBBBCEBEUVABTBBBCBBIFEBCNQ7BBMJoBDQBCBFBAHBHd6BCBDBHLcTABCIJKdoCECBIxCCMiDCLpCbBB3BBBFBJ5BCBBACAQCAAADHAAACGAO/VydcdeMABICAAJtBB1DiB2DEJG7GCEBBBBCGCwBPHGAEAAeMBBCAAALoBBDB4BC4EBBEGABmGtQiG+/CtEgDqRpD0udBgBwCwIDEZF3EaNmBZBsBGDACCCfABKqBCCMITBGBBwBBCFBeBIpGKCEw5ThXQuL9SiH1El0BABFABBCElF9RhC9JegBmCxB7D2BpBCKxBCH9BAABAAPCrBM0BBIC/CCGC9EDV5BBBMJODLBCBCCBCBEABO1CCBXxCCBCBBrHCGBb1CCBqDBClDBCBjIBlGCCBBAKAEwECEfAAABAIIACAGBAwD1CBBpGBByCCBB6DDBBBoCDB4CAhILCBCFAXlnFGomLDguC7B4gB/BxCLrlThzECgP8BDICe0ELICgB+7BEIOWBwqBBCBBkDgF3L9B8P+HzHCHF6OtDw1CghjYgEvDGsBABBCKUAGFBDAaKIADICECIXfkBAAHAGHBHATGADAADAABABBABABBCABABTGBEAEBABAFATGBEABDAEBABAAAAAAAATPACCCABCBAABACDBBBlBBADAABAAACAAAGHAIGBAAANEBKjBAqBDFAABAFBDCABCDMABAAACDCBBzBBGAIAAACABACBACBA0BAGAAHJAgCDBgBJBAHIBdDCABBCABAEHBCMGAABB/BAgBCAfFBDJBBAAABABRAHKACCjBADBAEAIEFBBAAPCAABACBBAKBAaAAAAPPBAAEACBDDCcCABDEBEPKDAOABCDBACjBEFAAAAABIADACDAAAHBBAAAAGEJAAlBAFAACBAABHCAAAFAABBADBBBHABAAHAADEIBGAHBXACAADBAAJnBFADAAFCnBMAAAACAGFAVGBBFABGABAAAABBMhBEBAAAOLCEGADABBtBWBEFHGDCCBAB2BxBAAEOGQGBEAGADDBAABAGGE/CvHAAAAAAAAAAAAAAAAAAAAAAAAAAABAAACABABABBBBAAACABBABAAAAAAAAAABBBBAAACABAABBBBAAACABBABAAAAAAABBAAAACABAAAAAAAAAABAAACAAAAAAAAAAAAAAAAAAAAAAAABAACAABBABABBBABAAABAAAAAABAAAACAAAAAAAAAAAABAACAAAAAABBAACBAABAACABBAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAABBAAACBABBAAAAABBBABAAAAABACBAAAAAAAAAABAAABBBACAAAAAAAAAAAAAAAAABAACABBAAAAAAAAAAAAAAAAAAAABBBBAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBAACAAAABABACACBAABAACBAAAAAAAAAAAAAAAAAAABAABBAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", [
|
|
756
|
+
"Extend",
|
|
757
|
+
"Consonant",
|
|
758
|
+
"Linker"
|
|
759
|
+
]];
|
|
760
|
+
const pictographic$1 = "8EpFEt8HM4GW6CPvLMmFZEnGnHKJ6BBJCCCECBCDDIFBFLCBBSCSBBDFCELFCFBBUFBCECCBCBBGDGKPCEBEBLwBJOO0LvOTzBE6mBM5SBqrvDnBkDPPOlBwDMOCUbKUCBJGCCBCCBFBLBHCMCCENCIJFMICBEGDGwBFCDBC8Gb4BKoBeMCJMBB4COgIAAAAAAFBBAAKCABAADEAABAAABAABCAALBABAABFABBABBBBABABBFDAAAFAAAAAAABAAAACAB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CBGC9EDV5BDlBDmCNBBO1CCBX0CBEBuHGBb1CCBqDBCBlDBCBjIBgIBEwECEgBoBCIJCuBBmGBBpGBByCCBB6DDBBBoCDBhCWiIL0BFBX1mFGomLDguC7BJ8PoBiP/BgCBN8/PBB+kDB8yECgP+BJCe0EWj9BEIOWB9oBBCBBFhBgFwL9B7P+HzHCHFJwOtDv1ChgjYegEAAAAAAAAAB/FBABAGBABsBABBCAFKAAUAHJDAAaKKAAXCABI5BAAHAGBAAADABABABBCABABAEBABFAAADADBAAAAAACCDBBAAAABBBBDABAACAAGIAIAGBAAANEBKjBADFBBBCDABAAACCBBBBGAKAAEABACBACBAAGAAHJAAgCDAEAAIBDBCABACHBFCMGAAB+BAkDACCCCBEBAAEEJAAQgBBCAAfAADEAFCAFADJADBhBACDBAAABABRAHKCADBABFBBAAAAACBBAABBAECAAAAQPAPAAAAAAAAABACAAEFpBNCBDCABDAEABAGPKDAOABCDBAAACEHABIDACABAAAHBBAGEFAAABHCAAFABBDBBBHABAAFAAADEIBBAADBAJFDAFCMBACAGFAVGBBFABGABAAAABBEAAAQOLCEGDCBAQBBBDGBBDtBWBCPGDCB2BxBAAEO5BQGBE9BANADEBAABAAGHEA/CvH";
|
|
764
|
+
//#endregion
|
|
765
|
+
//#region src/unicode.ts
|
|
766
|
+
const unpack = (text) => {
|
|
767
|
+
const numbers = [];
|
|
768
|
+
let value = 0, scale = 1;
|
|
769
|
+
for (let i = 0; i < text.length; i++) {
|
|
770
|
+
const c = text.charCodeAt(i);
|
|
771
|
+
const digit = c >= 97 ? c - 71 : c >= 65 ? c - 65 : c >= 48 ? c + 4 : c === 43 ? 62 : 63;
|
|
772
|
+
value += (digit & 31) * scale;
|
|
773
|
+
if (digit & 32) scale *= 32;
|
|
774
|
+
else {
|
|
775
|
+
numbers.push(value);
|
|
776
|
+
value = 0;
|
|
777
|
+
scale = 1;
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
return numbers;
|
|
781
|
+
};
|
|
782
|
+
const unzigzag = (n) => n & 1 ? -(n + 1) / 2 : n / 2;
|
|
783
|
+
const ranges = (text, values) => {
|
|
784
|
+
const numbers = unpack(text);
|
|
785
|
+
const count = numbers[0];
|
|
786
|
+
const starts = new Uint32Array(count);
|
|
787
|
+
const ends = new Uint32Array(count);
|
|
788
|
+
const indexes = values.length > 1 ? new Uint8Array(count) : void 0;
|
|
789
|
+
let previous = -1;
|
|
790
|
+
for (let i = 0; i < count; i++) {
|
|
791
|
+
starts[i] = previous + 1 + numbers[1 + i];
|
|
792
|
+
previous = ends[i] = starts[i] + numbers[1 + count + i];
|
|
793
|
+
if (indexes) indexes[i] = numbers[1 + 2 * count + i];
|
|
794
|
+
}
|
|
795
|
+
return {
|
|
796
|
+
ends,
|
|
797
|
+
indexes,
|
|
798
|
+
starts,
|
|
799
|
+
values
|
|
800
|
+
};
|
|
801
|
+
};
|
|
802
|
+
const set = (text) => ranges(text, [1]);
|
|
803
|
+
const lookup = (table, cp, fallback) => {
|
|
804
|
+
const { starts, ends } = table;
|
|
805
|
+
let lo = 0, hi = starts.length - 1;
|
|
806
|
+
while (lo <= hi) {
|
|
807
|
+
const mid = lo + hi >>> 1;
|
|
808
|
+
if (cp < starts[mid]) hi = mid - 1;
|
|
809
|
+
else if (cp > ends[mid]) lo = mid + 1;
|
|
810
|
+
else return table.values[table.indexes ? table.indexes[mid] : 0];
|
|
811
|
+
}
|
|
812
|
+
return fallback;
|
|
813
|
+
};
|
|
814
|
+
const mapping = (text, lists) => {
|
|
815
|
+
const numbers = unpack(text);
|
|
816
|
+
const [count, fromPrevious] = numbers;
|
|
817
|
+
const lengths = lists ? 2 + count : 0;
|
|
818
|
+
const firsts = 2 + (lists ? 2 : 1) * count;
|
|
819
|
+
let next = firsts + count;
|
|
820
|
+
const result = /* @__PURE__ */ new Map();
|
|
821
|
+
let key = -1, first = 0, other = 0;
|
|
822
|
+
for (let i = 0; i < count; i++) {
|
|
823
|
+
key += numbers[2 + i] + 1;
|
|
824
|
+
first = (fromPrevious ? first : key) + unzigzag(numbers[firsts + i]);
|
|
825
|
+
const values = [first];
|
|
826
|
+
for (let n = lists ? numbers[lengths + i] : 1; n > 1; n--) {
|
|
827
|
+
other += unzigzag(numbers[next++]);
|
|
828
|
+
values.push(other);
|
|
829
|
+
}
|
|
830
|
+
result.set(key, values);
|
|
831
|
+
}
|
|
832
|
+
return result;
|
|
833
|
+
};
|
|
834
|
+
const category = ranges(...category$1);
|
|
835
|
+
const combining = ranges(...combining$1);
|
|
836
|
+
const grapheme = ranges(...grapheme$1);
|
|
837
|
+
const indicTable = ranges(...indic);
|
|
838
|
+
const pictographic = set(pictographic$1);
|
|
839
|
+
const whitespace = set(whitespace$1);
|
|
840
|
+
const cased = set(cased$1);
|
|
841
|
+
const caseIgnorable = set(caseIgnorable$1);
|
|
842
|
+
const decomposition = mapping(decomposition$1, true);
|
|
843
|
+
const folding = new Map(Array.from(mapping(folding$1, false), ([cp, [folded]]) => [cp, folded]));
|
|
844
|
+
const uppercase = mapping(uppercase$1, true);
|
|
845
|
+
const lowercase = mapping(lowercase$1, true);
|
|
846
|
+
const finalSigma = mapping(finalSigma$1, true);
|
|
847
|
+
const composition = /* @__PURE__ */ new Map();
|
|
848
|
+
{
|
|
849
|
+
const excluded = /* @__PURE__ */ new Set();
|
|
850
|
+
let key = -1;
|
|
851
|
+
for (const gap of unpack(compositionExclusions)) excluded.add(key += gap + 1);
|
|
852
|
+
for (const [cp, parts] of decomposition) if (parts.length === 2 && !excluded.has(cp)) composition.set(parts[0] * 1114112 + parts[1], cp);
|
|
853
|
+
}
|
|
854
|
+
const surrogate = /[\uD800-\uDFFF]/;
|
|
855
|
+
const surrogatePair = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
|
|
856
|
+
const assertScalarText = (s) => {
|
|
857
|
+
if (typeof s !== "string") invalidValue("Text must be a string");
|
|
858
|
+
if (!surrogate.test(s)) return;
|
|
859
|
+
for (let i = 0; i < s.length; i++) {
|
|
860
|
+
const cp = s.charCodeAt(i);
|
|
861
|
+
if (cp >= 55296 && cp <= 56319) {
|
|
862
|
+
const next = s.charCodeAt(++i);
|
|
863
|
+
if (!(next >= 56320 && next <= 57343)) invalidValue("Text contains a lone surrogate");
|
|
864
|
+
} else if (cp >= 56320 && cp <= 57343) invalidValue("Text contains a lone surrogate");
|
|
865
|
+
}
|
|
866
|
+
};
|
|
867
|
+
/** Unicode scalar values in `s`, each lone surrogate counting as one. */
|
|
868
|
+
const scalarCount = (s) => surrogate.test(s) ? s.length - (s.match(surrogatePair)?.length ?? 0) : s.length;
|
|
869
|
+
const combiningClass = (cp) => lookup(combining, cp, 0);
|
|
870
|
+
const generalCategory = (cp) => lookup(category, cp, "Cn");
|
|
871
|
+
const isWhiteSpace = (cp) => lookup(whitespace, cp, 0) === 1;
|
|
872
|
+
const fromPoints = (cps) => cps.map((cp) => String.fromCodePoint(cp)).join("");
|
|
873
|
+
const SBASE = 44032;
|
|
874
|
+
const LBASE = 4352;
|
|
875
|
+
const VBASE = 4449;
|
|
876
|
+
const TBASE = 4519;
|
|
877
|
+
const LCOUNT = 19;
|
|
878
|
+
const VCOUNT = 21;
|
|
879
|
+
const TCOUNT = 28;
|
|
880
|
+
const NCOUNT = 588;
|
|
881
|
+
const SCOUNT = LCOUNT * NCOUNT;
|
|
882
|
+
const decompose = (cp, output) => {
|
|
883
|
+
const index = cp - SBASE;
|
|
884
|
+
if (index >= 0 && index < SCOUNT) {
|
|
885
|
+
output.push(LBASE + Math.floor(index / NCOUNT), VBASE + Math.floor(index % NCOUNT / TCOUNT));
|
|
886
|
+
if (index % TCOUNT) output.push(TBASE + index % TCOUNT);
|
|
887
|
+
} else {
|
|
888
|
+
const parts = decomposition.get(cp);
|
|
889
|
+
if (parts) for (const part of parts) decompose(part, output);
|
|
890
|
+
else output.push(cp);
|
|
891
|
+
}
|
|
892
|
+
};
|
|
893
|
+
const compose = (a, b) => {
|
|
894
|
+
if (a >= LBASE && a < 4371 && b >= VBASE && b < 4470) return SBASE + ((a - LBASE) * VCOUNT + b - VBASE) * TCOUNT;
|
|
895
|
+
const index = a - SBASE;
|
|
896
|
+
if (index >= 0 && index < SCOUNT && index % TCOUNT === 0 && b > TBASE && b < 4547) return a + b - TBASE;
|
|
897
|
+
return composition.get(a * 1114112 + b);
|
|
898
|
+
};
|
|
899
|
+
const belowCombining = /^[^\u0300-\uFFFF]*$/;
|
|
900
|
+
const normalizeNFC = (s) => {
|
|
901
|
+
if (typeof s === "string" && belowCombining.test(s)) return s;
|
|
902
|
+
assertScalarText(s);
|
|
903
|
+
const decomposed = [];
|
|
904
|
+
for (const ch of s) decompose(ch.codePointAt(0), decomposed);
|
|
905
|
+
const ordered = [];
|
|
906
|
+
let marks = [];
|
|
907
|
+
const flush = () => {
|
|
908
|
+
marks.sort((a, b) => a.ccc - b.ccc);
|
|
909
|
+
for (const mark of marks) ordered.push(mark.cp);
|
|
910
|
+
marks = [];
|
|
911
|
+
};
|
|
912
|
+
for (const cp of decomposed) {
|
|
913
|
+
const ccc = combiningClass(cp);
|
|
914
|
+
if (ccc === 0) {
|
|
915
|
+
flush();
|
|
916
|
+
ordered.push(cp);
|
|
917
|
+
} else marks.push({
|
|
918
|
+
cp,
|
|
919
|
+
ccc
|
|
920
|
+
});
|
|
921
|
+
}
|
|
922
|
+
flush();
|
|
923
|
+
const result = [];
|
|
924
|
+
let starter = -1, previousClass = 0;
|
|
925
|
+
for (const cp of ordered) {
|
|
926
|
+
const ccc = combiningClass(cp);
|
|
927
|
+
const combined = starter >= 0 && (previousClass === 0 || previousClass < ccc) ? compose(result[starter], cp) : void 0;
|
|
928
|
+
if (combined !== void 0) result[starter] = combined;
|
|
929
|
+
else {
|
|
930
|
+
if (ccc === 0) starter = result.length;
|
|
931
|
+
result.push(cp);
|
|
932
|
+
previousClass = ccc;
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
return fromPoints(result);
|
|
936
|
+
};
|
|
937
|
+
const control = (p) => p === "Control" || p === "CR" || p === "LF";
|
|
938
|
+
/** UTF-16 offsets for slicing storage, including both ends; positions count the intervals. */
|
|
939
|
+
const characterBoundaries = (s) => {
|
|
940
|
+
assertScalarText(s);
|
|
941
|
+
const boundaries = [0];
|
|
942
|
+
let offset = 0, previous = "", regionalCount = 0;
|
|
943
|
+
let linker = false, pictographicExtend = false, pictographicZWJ = false;
|
|
944
|
+
for (const ch of s) {
|
|
945
|
+
const cp = ch.codePointAt(0);
|
|
946
|
+
const current = lookup(grapheme, cp, "Other");
|
|
947
|
+
const indic = lookup(indicTable, cp, "None");
|
|
948
|
+
const pic = lookup(pictographic, cp, 0) === 1;
|
|
949
|
+
let breaks = true;
|
|
950
|
+
if (previous === "CR" && current === "LF") breaks = false;
|
|
951
|
+
else if (control(previous) || control(current)) breaks = true;
|
|
952
|
+
else if (previous === "L" && [
|
|
953
|
+
"L",
|
|
954
|
+
"V",
|
|
955
|
+
"LV",
|
|
956
|
+
"LVT"
|
|
957
|
+
].includes(current)) breaks = false;
|
|
958
|
+
else if (["LV", "V"].includes(previous) && ["V", "T"].includes(current)) breaks = false;
|
|
959
|
+
else if (["LVT", "T"].includes(previous) && current === "T") breaks = false;
|
|
960
|
+
else if ([
|
|
961
|
+
"Extend",
|
|
962
|
+
"ZWJ",
|
|
963
|
+
"SpacingMark"
|
|
964
|
+
].includes(current) || previous === "Prepend") breaks = false;
|
|
965
|
+
else if (linker && indic === "Consonant") breaks = false;
|
|
966
|
+
else if (pictographicZWJ && pic) breaks = false;
|
|
967
|
+
else if (previous === "Regional_Indicator" && current === "Regional_Indicator" && regionalCount % 2 === 1) breaks = false;
|
|
968
|
+
if (offset > 0 && breaks) boundaries.push(offset);
|
|
969
|
+
linker = indic === "Linker" || indic === "Extend" && linker;
|
|
970
|
+
pictographicZWJ = current === "ZWJ" && pictographicExtend;
|
|
971
|
+
pictographicExtend = pic || current === "Extend" && pictographicExtend;
|
|
972
|
+
regionalCount = current === "Regional_Indicator" ? regionalCount + 1 : 0;
|
|
973
|
+
previous = current;
|
|
974
|
+
offset += ch.length;
|
|
975
|
+
}
|
|
976
|
+
if (offset > 0) boundaries.push(offset);
|
|
977
|
+
return boundaries;
|
|
978
|
+
};
|
|
979
|
+
const simpleFold = (s) => {
|
|
980
|
+
assertScalarText(s);
|
|
981
|
+
return Array.from(s, (ch) => String.fromCodePoint(folding.get(ch.codePointAt(0)) ?? ch.codePointAt(0))).join("");
|
|
982
|
+
};
|
|
983
|
+
const upper = (s) => {
|
|
984
|
+
assertScalarText(s);
|
|
985
|
+
return normalizeNFC(Array.from(s, (ch) => fromPoints(uppercase.get(ch.codePointAt(0)) ?? [ch.codePointAt(0)])).join(""));
|
|
986
|
+
};
|
|
987
|
+
const lower = (s) => {
|
|
988
|
+
assertScalarText(s);
|
|
989
|
+
const cps = Array.from(s, (ch) => ch.codePointAt(0));
|
|
990
|
+
const afterCased = [];
|
|
991
|
+
let context = false;
|
|
992
|
+
for (let i = cps.length - 1; i >= 0; i--) {
|
|
993
|
+
afterCased[i] = context;
|
|
994
|
+
if (!lookup(caseIgnorable, cps[i], 0)) context = Boolean(lookup(cased, cps[i], 0));
|
|
995
|
+
}
|
|
996
|
+
context = false;
|
|
997
|
+
const output = [];
|
|
998
|
+
for (let i = 0; i < cps.length; i++) {
|
|
999
|
+
const cp = cps[i];
|
|
1000
|
+
const sigma = context && !afterCased[i] ? finalSigma.get(cp) : void 0;
|
|
1001
|
+
output.push(fromPoints(sigma ?? lowercase.get(cp) ?? [cp]));
|
|
1002
|
+
if (!lookup(caseIgnorable, cp, 0)) context = Boolean(lookup(cased, cp, 0));
|
|
1003
|
+
}
|
|
1004
|
+
return normalizeNFC(output.join(""));
|
|
1005
|
+
};
|
|
1006
|
+
//#endregion
|
|
1007
|
+
//#region src/generated/syntax.ts
|
|
1008
|
+
const grammar = {
|
|
1009
|
+
"reserved": [
|
|
1010
|
+
"after",
|
|
1011
|
+
"catch",
|
|
1012
|
+
"else",
|
|
1013
|
+
"end",
|
|
1014
|
+
"finally",
|
|
1015
|
+
"for",
|
|
1016
|
+
"function",
|
|
1017
|
+
"given",
|
|
1018
|
+
"if",
|
|
1019
|
+
"match",
|
|
1020
|
+
"offer",
|
|
1021
|
+
"on",
|
|
1022
|
+
"repeat",
|
|
1023
|
+
"then",
|
|
1024
|
+
"try",
|
|
1025
|
+
"until",
|
|
1026
|
+
"when",
|
|
1027
|
+
"where",
|
|
1028
|
+
"while",
|
|
1029
|
+
"add",
|
|
1030
|
+
"ask",
|
|
1031
|
+
"delete",
|
|
1032
|
+
"divide",
|
|
1033
|
+
"exit",
|
|
1034
|
+
"let",
|
|
1035
|
+
"multiply",
|
|
1036
|
+
"pass",
|
|
1037
|
+
"put",
|
|
1038
|
+
"replace",
|
|
1039
|
+
"return",
|
|
1040
|
+
"send",
|
|
1041
|
+
"set",
|
|
1042
|
+
"subtract",
|
|
1043
|
+
"tell",
|
|
1044
|
+
"throw",
|
|
1045
|
+
"veto",
|
|
1046
|
+
"wait",
|
|
1047
|
+
"and",
|
|
1048
|
+
"be",
|
|
1049
|
+
"in",
|
|
1050
|
+
"into",
|
|
1051
|
+
"is",
|
|
1052
|
+
"not",
|
|
1053
|
+
"of",
|
|
1054
|
+
"or",
|
|
1055
|
+
"the",
|
|
1056
|
+
"to",
|
|
1057
|
+
"false",
|
|
1058
|
+
"it",
|
|
1059
|
+
"me",
|
|
1060
|
+
"nothing",
|
|
1061
|
+
"true"
|
|
1062
|
+
],
|
|
1063
|
+
"labels": {
|
|
1064
|
+
"reserved": ["to"],
|
|
1065
|
+
"excluded": [
|
|
1066
|
+
"from",
|
|
1067
|
+
"otherwise",
|
|
1068
|
+
"with"
|
|
1069
|
+
]
|
|
1070
|
+
},
|
|
1071
|
+
"chunk": [
|
|
1072
|
+
{
|
|
1073
|
+
"singular": "character",
|
|
1074
|
+
"plural": "characters"
|
|
1075
|
+
},
|
|
1076
|
+
{
|
|
1077
|
+
"singular": "word",
|
|
1078
|
+
"plural": "words"
|
|
1079
|
+
},
|
|
1080
|
+
{
|
|
1081
|
+
"singular": "line",
|
|
1082
|
+
"plural": "lines"
|
|
1083
|
+
},
|
|
1084
|
+
{
|
|
1085
|
+
"singular": "item",
|
|
1086
|
+
"plural": "items"
|
|
1087
|
+
},
|
|
1088
|
+
{
|
|
1089
|
+
"singular": "byte",
|
|
1090
|
+
"plural": "bytes"
|
|
1091
|
+
},
|
|
1092
|
+
{
|
|
1093
|
+
"singular": "code point",
|
|
1094
|
+
"plural": "code points"
|
|
1095
|
+
}
|
|
1096
|
+
],
|
|
1097
|
+
"ordinals": [
|
|
1098
|
+
"first",
|
|
1099
|
+
"second",
|
|
1100
|
+
"third",
|
|
1101
|
+
"fourth",
|
|
1102
|
+
"fifth",
|
|
1103
|
+
"sixth",
|
|
1104
|
+
"seventh",
|
|
1105
|
+
"eighth",
|
|
1106
|
+
"ninth",
|
|
1107
|
+
"tenth",
|
|
1108
|
+
"last"
|
|
1109
|
+
],
|
|
1110
|
+
"properties": [
|
|
1111
|
+
"length",
|
|
1112
|
+
"keys",
|
|
1113
|
+
"values",
|
|
1114
|
+
"items",
|
|
1115
|
+
"lines",
|
|
1116
|
+
"words",
|
|
1117
|
+
"characters",
|
|
1118
|
+
"bytes",
|
|
1119
|
+
"code points"
|
|
1120
|
+
],
|
|
1121
|
+
"follow": [
|
|
1122
|
+
"as",
|
|
1123
|
+
"before",
|
|
1124
|
+
"begins",
|
|
1125
|
+
"by",
|
|
1126
|
+
"can",
|
|
1127
|
+
"collecting",
|
|
1128
|
+
"comes",
|
|
1129
|
+
"contains",
|
|
1130
|
+
"delimited",
|
|
1131
|
+
"div",
|
|
1132
|
+
"does",
|
|
1133
|
+
"ends",
|
|
1134
|
+
"from",
|
|
1135
|
+
"ignoring",
|
|
1136
|
+
"matches",
|
|
1137
|
+
"mod",
|
|
1138
|
+
"otherwise",
|
|
1139
|
+
"times",
|
|
1140
|
+
"whose",
|
|
1141
|
+
"with"
|
|
1142
|
+
],
|
|
1143
|
+
"decision": [
|
|
1144
|
+
"and-wait",
|
|
1145
|
+
"any-message",
|
|
1146
|
+
"as-in-build",
|
|
1147
|
+
"begins-with",
|
|
1148
|
+
"binary-field",
|
|
1149
|
+
"can-be",
|
|
1150
|
+
"capture",
|
|
1151
|
+
"choose-offer",
|
|
1152
|
+
"chunk-word",
|
|
1153
|
+
"code-point",
|
|
1154
|
+
"comes",
|
|
1155
|
+
"delimited-by",
|
|
1156
|
+
"does-not",
|
|
1157
|
+
"during",
|
|
1158
|
+
"element-count",
|
|
1159
|
+
"every-chunk",
|
|
1160
|
+
"every-match",
|
|
1161
|
+
"ignoring-case",
|
|
1162
|
+
"is-a",
|
|
1163
|
+
"kind",
|
|
1164
|
+
"map-key",
|
|
1165
|
+
"next-repeat",
|
|
1166
|
+
"optional-key",
|
|
1167
|
+
"ordinal",
|
|
1168
|
+
"ordering-words",
|
|
1169
|
+
"pattern-anchor",
|
|
1170
|
+
"replace-first",
|
|
1171
|
+
"script-variable",
|
|
1172
|
+
"target",
|
|
1173
|
+
"wait-from",
|
|
1174
|
+
"when-contains",
|
|
1175
|
+
"with-timeout"
|
|
1176
|
+
],
|
|
1177
|
+
"text_patterns": {
|
|
1178
|
+
"keywords": [
|
|
1179
|
+
"character",
|
|
1180
|
+
"characters",
|
|
1181
|
+
"digit",
|
|
1182
|
+
"digits",
|
|
1183
|
+
"letter",
|
|
1184
|
+
"letters",
|
|
1185
|
+
"punctuation",
|
|
1186
|
+
"space",
|
|
1187
|
+
"spaces",
|
|
1188
|
+
"text",
|
|
1189
|
+
"whitespace",
|
|
1190
|
+
"word",
|
|
1191
|
+
"words"
|
|
1192
|
+
],
|
|
1193
|
+
"classes": [
|
|
1194
|
+
"lowercase letter",
|
|
1195
|
+
"lowercase letters",
|
|
1196
|
+
"uppercase letter",
|
|
1197
|
+
"uppercase letters"
|
|
1198
|
+
],
|
|
1199
|
+
"anchors": [
|
|
1200
|
+
"line end",
|
|
1201
|
+
"line start",
|
|
1202
|
+
"text end",
|
|
1203
|
+
"text start",
|
|
1204
|
+
"word break"
|
|
1205
|
+
],
|
|
1206
|
+
"phrases": [
|
|
1207
|
+
"one or more of",
|
|
1208
|
+
"optional",
|
|
1209
|
+
"zero or more of"
|
|
1210
|
+
]
|
|
1211
|
+
},
|
|
1212
|
+
"binary_patterns": {
|
|
1213
|
+
"integer_types": [
|
|
1214
|
+
"int8",
|
|
1215
|
+
"int16",
|
|
1216
|
+
"int32",
|
|
1217
|
+
"int64",
|
|
1218
|
+
"uint8",
|
|
1219
|
+
"uint16",
|
|
1220
|
+
"uint32",
|
|
1221
|
+
"uint64"
|
|
1222
|
+
],
|
|
1223
|
+
"size_units": [
|
|
1224
|
+
"bit",
|
|
1225
|
+
"bits",
|
|
1226
|
+
"byte",
|
|
1227
|
+
"bytes"
|
|
1228
|
+
],
|
|
1229
|
+
"byte_orders": ["big", "little"]
|
|
1230
|
+
}
|
|
1231
|
+
};
|
|
1232
|
+
const units = [
|
|
1233
|
+
{
|
|
1234
|
+
"name": "mg",
|
|
1235
|
+
"kind": "mass",
|
|
1236
|
+
"calendar": false,
|
|
1237
|
+
"factor": ["0.000001", "1"]
|
|
1238
|
+
},
|
|
1239
|
+
{
|
|
1240
|
+
"name": "g",
|
|
1241
|
+
"kind": "mass",
|
|
1242
|
+
"calendar": false,
|
|
1243
|
+
"factor": ["0.001", "1"]
|
|
1244
|
+
},
|
|
1245
|
+
{
|
|
1246
|
+
"name": "kg",
|
|
1247
|
+
"kind": "mass",
|
|
1248
|
+
"calendar": false,
|
|
1249
|
+
"factor": ["1", "1"]
|
|
1250
|
+
},
|
|
1251
|
+
{
|
|
1252
|
+
"name": "lb",
|
|
1253
|
+
"kind": "mass",
|
|
1254
|
+
"calendar": false,
|
|
1255
|
+
"factor": ["0.45359237", "1"]
|
|
1256
|
+
},
|
|
1257
|
+
{
|
|
1258
|
+
"name": "oz",
|
|
1259
|
+
"kind": "mass",
|
|
1260
|
+
"calendar": false,
|
|
1261
|
+
"factor": ["0.028349523125", "1"]
|
|
1262
|
+
},
|
|
1263
|
+
{
|
|
1264
|
+
"name": "mm",
|
|
1265
|
+
"kind": "length",
|
|
1266
|
+
"calendar": false,
|
|
1267
|
+
"factor": ["0.001", "1"]
|
|
1268
|
+
},
|
|
1269
|
+
{
|
|
1270
|
+
"name": "cm",
|
|
1271
|
+
"kind": "length",
|
|
1272
|
+
"calendar": false,
|
|
1273
|
+
"factor": ["0.01", "1"]
|
|
1274
|
+
},
|
|
1275
|
+
{
|
|
1276
|
+
"name": "m",
|
|
1277
|
+
"kind": "length",
|
|
1278
|
+
"calendar": false,
|
|
1279
|
+
"factor": ["1", "1"]
|
|
1280
|
+
},
|
|
1281
|
+
{
|
|
1282
|
+
"name": "km",
|
|
1283
|
+
"kind": "length",
|
|
1284
|
+
"calendar": false,
|
|
1285
|
+
"factor": ["1000", "1"]
|
|
1286
|
+
},
|
|
1287
|
+
{
|
|
1288
|
+
"name": "inch",
|
|
1289
|
+
"plural": "inches",
|
|
1290
|
+
"kind": "length",
|
|
1291
|
+
"calendar": false,
|
|
1292
|
+
"factor": ["0.0254", "1"]
|
|
1293
|
+
},
|
|
1294
|
+
{
|
|
1295
|
+
"name": "ft",
|
|
1296
|
+
"kind": "length",
|
|
1297
|
+
"calendar": false,
|
|
1298
|
+
"factor": ["0.3048", "1"]
|
|
1299
|
+
},
|
|
1300
|
+
{
|
|
1301
|
+
"name": "yd",
|
|
1302
|
+
"kind": "length",
|
|
1303
|
+
"calendar": false,
|
|
1304
|
+
"factor": ["0.9144", "1"]
|
|
1305
|
+
},
|
|
1306
|
+
{
|
|
1307
|
+
"name": "mi",
|
|
1308
|
+
"kind": "length",
|
|
1309
|
+
"calendar": false,
|
|
1310
|
+
"factor": ["1609.344", "1"]
|
|
1311
|
+
},
|
|
1312
|
+
{
|
|
1313
|
+
"name": "mL",
|
|
1314
|
+
"kind": "volume",
|
|
1315
|
+
"calendar": false,
|
|
1316
|
+
"factor": ["0.001", "1"]
|
|
1317
|
+
},
|
|
1318
|
+
{
|
|
1319
|
+
"name": "L",
|
|
1320
|
+
"kind": "volume",
|
|
1321
|
+
"calendar": false,
|
|
1322
|
+
"factor": ["1", "1"]
|
|
1323
|
+
},
|
|
1324
|
+
{
|
|
1325
|
+
"name": "ms",
|
|
1326
|
+
"kind": "exact duration",
|
|
1327
|
+
"calendar": false,
|
|
1328
|
+
"factor": ["0.001", "1"]
|
|
1329
|
+
},
|
|
1330
|
+
{
|
|
1331
|
+
"name": "s",
|
|
1332
|
+
"kind": "exact duration",
|
|
1333
|
+
"calendar": false,
|
|
1334
|
+
"factor": ["1", "1"]
|
|
1335
|
+
},
|
|
1336
|
+
{
|
|
1337
|
+
"name": "min",
|
|
1338
|
+
"kind": "exact duration",
|
|
1339
|
+
"calendar": false,
|
|
1340
|
+
"factor": ["60", "1"]
|
|
1341
|
+
},
|
|
1342
|
+
{
|
|
1343
|
+
"name": "hr",
|
|
1344
|
+
"kind": "exact duration",
|
|
1345
|
+
"calendar": false,
|
|
1346
|
+
"factor": ["3600", "1"]
|
|
1347
|
+
},
|
|
1348
|
+
{
|
|
1349
|
+
"name": "day",
|
|
1350
|
+
"plural": "days",
|
|
1351
|
+
"kind": "exact duration",
|
|
1352
|
+
"calendar": false,
|
|
1353
|
+
"factor": ["86400", "1"]
|
|
1354
|
+
},
|
|
1355
|
+
{
|
|
1356
|
+
"name": "week",
|
|
1357
|
+
"plural": "weeks",
|
|
1358
|
+
"kind": "exact duration",
|
|
1359
|
+
"calendar": false,
|
|
1360
|
+
"factor": ["604800", "1"]
|
|
1361
|
+
},
|
|
1362
|
+
{
|
|
1363
|
+
"name": "month",
|
|
1364
|
+
"plural": "months",
|
|
1365
|
+
"kind": "calendar duration",
|
|
1366
|
+
"calendar": true,
|
|
1367
|
+
"factor": ["1", "1"]
|
|
1368
|
+
},
|
|
1369
|
+
{
|
|
1370
|
+
"name": "year",
|
|
1371
|
+
"plural": "years",
|
|
1372
|
+
"kind": "calendar duration",
|
|
1373
|
+
"calendar": true,
|
|
1374
|
+
"factor": ["12", "1"]
|
|
1375
|
+
},
|
|
1376
|
+
{
|
|
1377
|
+
"name": "degC",
|
|
1378
|
+
"kind": "temperature difference",
|
|
1379
|
+
"calendar": false,
|
|
1380
|
+
"factor": ["1", "1"]
|
|
1381
|
+
},
|
|
1382
|
+
{
|
|
1383
|
+
"name": "degF",
|
|
1384
|
+
"kind": "temperature difference",
|
|
1385
|
+
"calendar": false,
|
|
1386
|
+
"factor": ["5", "9"]
|
|
1387
|
+
},
|
|
1388
|
+
{
|
|
1389
|
+
"name": "USD",
|
|
1390
|
+
"kind": "USD",
|
|
1391
|
+
"calendar": false,
|
|
1392
|
+
"factor": ["1", "1"]
|
|
1393
|
+
},
|
|
1394
|
+
{
|
|
1395
|
+
"name": "EUR",
|
|
1396
|
+
"kind": "EUR",
|
|
1397
|
+
"calendar": false,
|
|
1398
|
+
"factor": ["1", "1"]
|
|
1399
|
+
},
|
|
1400
|
+
{
|
|
1401
|
+
"name": "GBP",
|
|
1402
|
+
"kind": "GBP",
|
|
1403
|
+
"calendar": false,
|
|
1404
|
+
"factor": ["1", "1"]
|
|
1405
|
+
},
|
|
1406
|
+
{
|
|
1407
|
+
"name": "JPY",
|
|
1408
|
+
"kind": "JPY",
|
|
1409
|
+
"calendar": false,
|
|
1410
|
+
"factor": ["1", "1"]
|
|
1411
|
+
},
|
|
1412
|
+
{
|
|
1413
|
+
"name": "CHF",
|
|
1414
|
+
"kind": "CHF",
|
|
1415
|
+
"calendar": false,
|
|
1416
|
+
"factor": ["1", "1"]
|
|
1417
|
+
},
|
|
1418
|
+
{
|
|
1419
|
+
"name": "CNY",
|
|
1420
|
+
"kind": "CNY",
|
|
1421
|
+
"calendar": false,
|
|
1422
|
+
"factor": ["1", "1"]
|
|
1423
|
+
},
|
|
1424
|
+
{
|
|
1425
|
+
"name": "CAD",
|
|
1426
|
+
"kind": "CAD",
|
|
1427
|
+
"calendar": false,
|
|
1428
|
+
"factor": ["1", "1"]
|
|
1429
|
+
},
|
|
1430
|
+
{
|
|
1431
|
+
"name": "AUD",
|
|
1432
|
+
"kind": "AUD",
|
|
1433
|
+
"calendar": false,
|
|
1434
|
+
"factor": ["1", "1"]
|
|
1435
|
+
},
|
|
1436
|
+
{
|
|
1437
|
+
"name": "INR",
|
|
1438
|
+
"kind": "INR",
|
|
1439
|
+
"calendar": false,
|
|
1440
|
+
"factor": ["1", "1"]
|
|
1441
|
+
},
|
|
1442
|
+
{
|
|
1443
|
+
"name": "SEK",
|
|
1444
|
+
"kind": "SEK",
|
|
1445
|
+
"calendar": false,
|
|
1446
|
+
"factor": ["1", "1"]
|
|
1447
|
+
}
|
|
1448
|
+
];
|
|
1449
|
+
const unitKinds = [
|
|
1450
|
+
"mass",
|
|
1451
|
+
"length",
|
|
1452
|
+
"volume",
|
|
1453
|
+
"exact duration",
|
|
1454
|
+
"calendar duration",
|
|
1455
|
+
"temperature difference",
|
|
1456
|
+
"USD",
|
|
1457
|
+
"EUR",
|
|
1458
|
+
"GBP",
|
|
1459
|
+
"JPY",
|
|
1460
|
+
"CHF",
|
|
1461
|
+
"CNY",
|
|
1462
|
+
"CAD",
|
|
1463
|
+
"AUD",
|
|
1464
|
+
"INR",
|
|
1465
|
+
"SEK"
|
|
1466
|
+
];
|
|
1467
|
+
const unitKindTable = [
|
|
1468
|
+
{
|
|
1469
|
+
"name": "mass",
|
|
1470
|
+
"dimension": "mass",
|
|
1471
|
+
"factor": "1"
|
|
1472
|
+
},
|
|
1473
|
+
{
|
|
1474
|
+
"name": "length",
|
|
1475
|
+
"dimension": "length",
|
|
1476
|
+
"factor": "1"
|
|
1477
|
+
},
|
|
1478
|
+
{
|
|
1479
|
+
"name": "volume",
|
|
1480
|
+
"dimension": "length^3",
|
|
1481
|
+
"factor": "0.001"
|
|
1482
|
+
},
|
|
1483
|
+
{
|
|
1484
|
+
"name": "exact duration",
|
|
1485
|
+
"dimension": "time",
|
|
1486
|
+
"factor": "1"
|
|
1487
|
+
},
|
|
1488
|
+
{
|
|
1489
|
+
"name": "calendar duration",
|
|
1490
|
+
"dimension": "calendar",
|
|
1491
|
+
"factor": "1"
|
|
1492
|
+
},
|
|
1493
|
+
{
|
|
1494
|
+
"name": "temperature difference",
|
|
1495
|
+
"dimension": "temperature",
|
|
1496
|
+
"factor": "1"
|
|
1497
|
+
},
|
|
1498
|
+
{
|
|
1499
|
+
"name": "USD",
|
|
1500
|
+
"dimension": "USD",
|
|
1501
|
+
"factor": "1"
|
|
1502
|
+
},
|
|
1503
|
+
{
|
|
1504
|
+
"name": "EUR",
|
|
1505
|
+
"dimension": "EUR",
|
|
1506
|
+
"factor": "1"
|
|
1507
|
+
},
|
|
1508
|
+
{
|
|
1509
|
+
"name": "GBP",
|
|
1510
|
+
"dimension": "GBP",
|
|
1511
|
+
"factor": "1"
|
|
1512
|
+
},
|
|
1513
|
+
{
|
|
1514
|
+
"name": "JPY",
|
|
1515
|
+
"dimension": "JPY",
|
|
1516
|
+
"factor": "1"
|
|
1517
|
+
},
|
|
1518
|
+
{
|
|
1519
|
+
"name": "CHF",
|
|
1520
|
+
"dimension": "CHF",
|
|
1521
|
+
"factor": "1"
|
|
1522
|
+
},
|
|
1523
|
+
{
|
|
1524
|
+
"name": "CNY",
|
|
1525
|
+
"dimension": "CNY",
|
|
1526
|
+
"factor": "1"
|
|
1527
|
+
},
|
|
1528
|
+
{
|
|
1529
|
+
"name": "CAD",
|
|
1530
|
+
"dimension": "CAD",
|
|
1531
|
+
"factor": "1"
|
|
1532
|
+
},
|
|
1533
|
+
{
|
|
1534
|
+
"name": "AUD",
|
|
1535
|
+
"dimension": "AUD",
|
|
1536
|
+
"factor": "1"
|
|
1537
|
+
},
|
|
1538
|
+
{
|
|
1539
|
+
"name": "INR",
|
|
1540
|
+
"dimension": "INR",
|
|
1541
|
+
"factor": "1"
|
|
1542
|
+
},
|
|
1543
|
+
{
|
|
1544
|
+
"name": "SEK",
|
|
1545
|
+
"dimension": "SEK",
|
|
1546
|
+
"factor": "1"
|
|
1547
|
+
}
|
|
1548
|
+
];
|
|
1549
|
+
const diagnosticCodes = [
|
|
1550
|
+
"unknown name",
|
|
1551
|
+
"not a value",
|
|
1552
|
+
"name clash",
|
|
1553
|
+
"duplicate name",
|
|
1554
|
+
"duplicate offer",
|
|
1555
|
+
"not in recovery",
|
|
1556
|
+
"leaves recovery catch",
|
|
1557
|
+
"duplicate key",
|
|
1558
|
+
"unknown kind",
|
|
1559
|
+
"no conversion",
|
|
1560
|
+
"bad number",
|
|
1561
|
+
"pattern too large",
|
|
1562
|
+
"wrong argument count",
|
|
1563
|
+
"wrong argument",
|
|
1564
|
+
"wrong labels",
|
|
1565
|
+
"unknown operation",
|
|
1566
|
+
"wrong mode",
|
|
1567
|
+
"missing and wait",
|
|
1568
|
+
"needless and wait",
|
|
1569
|
+
"can't suspend here",
|
|
1570
|
+
"unknown import",
|
|
1571
|
+
"import cycle",
|
|
1572
|
+
"missing grant",
|
|
1573
|
+
"not in a library",
|
|
1574
|
+
"not in a script",
|
|
1575
|
+
"not in a lambda",
|
|
1576
|
+
"not in a guard",
|
|
1577
|
+
"not in a whose",
|
|
1578
|
+
"not in a join",
|
|
1579
|
+
"empty join",
|
|
1580
|
+
"not in a timeout",
|
|
1581
|
+
"empty timeout",
|
|
1582
|
+
"leaves finally",
|
|
1583
|
+
"outside a loop",
|
|
1584
|
+
"veto outside a decision",
|
|
1585
|
+
"after a suspension",
|
|
1586
|
+
"wrong message",
|
|
1587
|
+
"bad suffixes",
|
|
1588
|
+
"can't write",
|
|
1589
|
+
"not a property",
|
|
1590
|
+
"not constant",
|
|
1591
|
+
"default order",
|
|
1592
|
+
"initialiser failed",
|
|
1593
|
+
"nothing to fold",
|
|
1594
|
+
"no item chunk",
|
|
1595
|
+
"capture in repetition",
|
|
1596
|
+
"rest not last",
|
|
1597
|
+
"bits not whole bytes"
|
|
1598
|
+
];
|
|
1599
|
+
const builtins = [
|
|
1600
|
+
{
|
|
1601
|
+
"name": "min",
|
|
1602
|
+
"kind": "function",
|
|
1603
|
+
"contract": {
|
|
1604
|
+
"required": 1,
|
|
1605
|
+
"total": 1,
|
|
1606
|
+
"variadic": true
|
|
1607
|
+
}
|
|
1608
|
+
},
|
|
1609
|
+
{
|
|
1610
|
+
"name": "max",
|
|
1611
|
+
"kind": "function",
|
|
1612
|
+
"contract": {
|
|
1613
|
+
"required": 1,
|
|
1614
|
+
"total": 1,
|
|
1615
|
+
"variadic": true
|
|
1616
|
+
}
|
|
1617
|
+
},
|
|
1618
|
+
{
|
|
1619
|
+
"name": "codePoint",
|
|
1620
|
+
"kind": "function",
|
|
1621
|
+
"contract": {
|
|
1622
|
+
"required": 1,
|
|
1623
|
+
"total": 1,
|
|
1624
|
+
"variadic": false
|
|
1625
|
+
}
|
|
1626
|
+
},
|
|
1627
|
+
{
|
|
1628
|
+
"name": "fromCodePoint",
|
|
1629
|
+
"kind": "function",
|
|
1630
|
+
"contract": {
|
|
1631
|
+
"required": 1,
|
|
1632
|
+
"total": 1,
|
|
1633
|
+
"variadic": false
|
|
1634
|
+
}
|
|
1635
|
+
},
|
|
1636
|
+
{
|
|
1637
|
+
"name": "upper",
|
|
1638
|
+
"kind": "function",
|
|
1639
|
+
"contract": {
|
|
1640
|
+
"required": 1,
|
|
1641
|
+
"total": 1,
|
|
1642
|
+
"variadic": false
|
|
1643
|
+
}
|
|
1644
|
+
},
|
|
1645
|
+
{
|
|
1646
|
+
"name": "lower",
|
|
1647
|
+
"kind": "function",
|
|
1648
|
+
"contract": {
|
|
1649
|
+
"required": 1,
|
|
1650
|
+
"total": 1,
|
|
1651
|
+
"variadic": false
|
|
1652
|
+
}
|
|
1653
|
+
},
|
|
1654
|
+
{
|
|
1655
|
+
"name": "offset",
|
|
1656
|
+
"kind": "function",
|
|
1657
|
+
"contract": {
|
|
1658
|
+
"required": 2,
|
|
1659
|
+
"total": 2,
|
|
1660
|
+
"variadic": false
|
|
1661
|
+
}
|
|
1662
|
+
},
|
|
1663
|
+
{
|
|
1664
|
+
"name": "isDisposed",
|
|
1665
|
+
"kind": "function",
|
|
1666
|
+
"contract": {
|
|
1667
|
+
"required": 1,
|
|
1668
|
+
"total": 1,
|
|
1669
|
+
"variadic": false
|
|
1670
|
+
}
|
|
1671
|
+
},
|
|
1672
|
+
{
|
|
1673
|
+
"name": "objectKind",
|
|
1674
|
+
"kind": "function",
|
|
1675
|
+
"contract": {
|
|
1676
|
+
"required": 1,
|
|
1677
|
+
"total": 1,
|
|
1678
|
+
"variadic": false
|
|
1679
|
+
}
|
|
1680
|
+
},
|
|
1681
|
+
{
|
|
1682
|
+
"name": "rangeStart",
|
|
1683
|
+
"kind": "function",
|
|
1684
|
+
"contract": {
|
|
1685
|
+
"required": 1,
|
|
1686
|
+
"total": 1,
|
|
1687
|
+
"variadic": false
|
|
1688
|
+
}
|
|
1689
|
+
},
|
|
1690
|
+
{
|
|
1691
|
+
"name": "rangeEnd",
|
|
1692
|
+
"kind": "function",
|
|
1693
|
+
"contract": {
|
|
1694
|
+
"required": 1,
|
|
1695
|
+
"total": 1,
|
|
1696
|
+
"variadic": false
|
|
1697
|
+
}
|
|
1698
|
+
},
|
|
1699
|
+
{
|
|
1700
|
+
"name": "kindOf",
|
|
1701
|
+
"kind": "function",
|
|
1702
|
+
"contract": {
|
|
1703
|
+
"required": 1,
|
|
1704
|
+
"total": 1,
|
|
1705
|
+
"variadic": false
|
|
1706
|
+
}
|
|
1707
|
+
},
|
|
1708
|
+
{
|
|
1709
|
+
"name": "conforms",
|
|
1710
|
+
"kind": "function",
|
|
1711
|
+
"contract": {
|
|
1712
|
+
"required": 2,
|
|
1713
|
+
"total": 2,
|
|
1714
|
+
"variadic": false
|
|
1715
|
+
}
|
|
1716
|
+
},
|
|
1717
|
+
{
|
|
1718
|
+
"name": "check",
|
|
1719
|
+
"kind": "function",
|
|
1720
|
+
"contract": {
|
|
1721
|
+
"required": 2,
|
|
1722
|
+
"total": 2,
|
|
1723
|
+
"variadic": false
|
|
1724
|
+
}
|
|
1725
|
+
},
|
|
1726
|
+
{
|
|
1727
|
+
"name": "explain",
|
|
1728
|
+
"kind": "function",
|
|
1729
|
+
"contract": {
|
|
1730
|
+
"required": 2,
|
|
1731
|
+
"total": 2,
|
|
1732
|
+
"variadic": false
|
|
1733
|
+
}
|
|
1734
|
+
},
|
|
1735
|
+
{
|
|
1736
|
+
"name": "functionArity",
|
|
1737
|
+
"kind": "function",
|
|
1738
|
+
"contract": {
|
|
1739
|
+
"required": 1,
|
|
1740
|
+
"total": 1,
|
|
1741
|
+
"variadic": false
|
|
1742
|
+
}
|
|
1743
|
+
},
|
|
1744
|
+
{
|
|
1745
|
+
"name": "functionName",
|
|
1746
|
+
"kind": "function",
|
|
1747
|
+
"contract": {
|
|
1748
|
+
"required": 1,
|
|
1749
|
+
"total": 1,
|
|
1750
|
+
"variadic": false
|
|
1751
|
+
}
|
|
1752
|
+
},
|
|
1753
|
+
{
|
|
1754
|
+
"name": "abs",
|
|
1755
|
+
"kind": "function",
|
|
1756
|
+
"contract": {
|
|
1757
|
+
"required": 1,
|
|
1758
|
+
"total": 1,
|
|
1759
|
+
"variadic": false
|
|
1760
|
+
}
|
|
1761
|
+
},
|
|
1762
|
+
{
|
|
1763
|
+
"name": "floor",
|
|
1764
|
+
"kind": "function",
|
|
1765
|
+
"contract": {
|
|
1766
|
+
"required": 1,
|
|
1767
|
+
"total": 1,
|
|
1768
|
+
"variadic": false
|
|
1769
|
+
}
|
|
1770
|
+
},
|
|
1771
|
+
{
|
|
1772
|
+
"name": "ceiling",
|
|
1773
|
+
"kind": "function",
|
|
1774
|
+
"contract": {
|
|
1775
|
+
"required": 1,
|
|
1776
|
+
"total": 1,
|
|
1777
|
+
"variadic": false
|
|
1778
|
+
}
|
|
1779
|
+
},
|
|
1780
|
+
{
|
|
1781
|
+
"name": "truncate",
|
|
1782
|
+
"kind": "function",
|
|
1783
|
+
"contract": {
|
|
1784
|
+
"required": 1,
|
|
1785
|
+
"total": 1,
|
|
1786
|
+
"variadic": false
|
|
1787
|
+
}
|
|
1788
|
+
},
|
|
1789
|
+
{
|
|
1790
|
+
"name": "round",
|
|
1791
|
+
"kind": "function",
|
|
1792
|
+
"contract": {
|
|
1793
|
+
"required": 1,
|
|
1794
|
+
"total": 3,
|
|
1795
|
+
"variadic": false
|
|
1796
|
+
}
|
|
1797
|
+
},
|
|
1798
|
+
{
|
|
1799
|
+
"name": "sqrt",
|
|
1800
|
+
"kind": "function",
|
|
1801
|
+
"contract": {
|
|
1802
|
+
"required": 1,
|
|
1803
|
+
"total": 1,
|
|
1804
|
+
"variadic": false
|
|
1805
|
+
}
|
|
1806
|
+
},
|
|
1807
|
+
{
|
|
1808
|
+
"name": "exp",
|
|
1809
|
+
"kind": "function",
|
|
1810
|
+
"contract": {
|
|
1811
|
+
"required": 1,
|
|
1812
|
+
"total": 1,
|
|
1813
|
+
"variadic": false
|
|
1814
|
+
}
|
|
1815
|
+
},
|
|
1816
|
+
{
|
|
1817
|
+
"name": "ln",
|
|
1818
|
+
"kind": "function",
|
|
1819
|
+
"contract": {
|
|
1820
|
+
"required": 1,
|
|
1821
|
+
"total": 1,
|
|
1822
|
+
"variadic": false
|
|
1823
|
+
}
|
|
1824
|
+
},
|
|
1825
|
+
{
|
|
1826
|
+
"name": "log10",
|
|
1827
|
+
"kind": "function",
|
|
1828
|
+
"contract": {
|
|
1829
|
+
"required": 1,
|
|
1830
|
+
"total": 1,
|
|
1831
|
+
"variadic": false
|
|
1832
|
+
}
|
|
1833
|
+
},
|
|
1834
|
+
{
|
|
1835
|
+
"name": "power",
|
|
1836
|
+
"kind": "function",
|
|
1837
|
+
"contract": {
|
|
1838
|
+
"required": 2,
|
|
1839
|
+
"total": 2,
|
|
1840
|
+
"variadic": false
|
|
1841
|
+
}
|
|
1842
|
+
},
|
|
1843
|
+
{
|
|
1844
|
+
"name": "sin",
|
|
1845
|
+
"kind": "function",
|
|
1846
|
+
"contract": {
|
|
1847
|
+
"required": 1,
|
|
1848
|
+
"total": 1,
|
|
1849
|
+
"variadic": false
|
|
1850
|
+
}
|
|
1851
|
+
},
|
|
1852
|
+
{
|
|
1853
|
+
"name": "cos",
|
|
1854
|
+
"kind": "function",
|
|
1855
|
+
"contract": {
|
|
1856
|
+
"required": 1,
|
|
1857
|
+
"total": 1,
|
|
1858
|
+
"variadic": false
|
|
1859
|
+
}
|
|
1860
|
+
},
|
|
1861
|
+
{
|
|
1862
|
+
"name": "tan",
|
|
1863
|
+
"kind": "function",
|
|
1864
|
+
"contract": {
|
|
1865
|
+
"required": 1,
|
|
1866
|
+
"total": 1,
|
|
1867
|
+
"variadic": false
|
|
1868
|
+
}
|
|
1869
|
+
},
|
|
1870
|
+
{
|
|
1871
|
+
"name": "asin",
|
|
1872
|
+
"kind": "function",
|
|
1873
|
+
"contract": {
|
|
1874
|
+
"required": 1,
|
|
1875
|
+
"total": 1,
|
|
1876
|
+
"variadic": false
|
|
1877
|
+
}
|
|
1878
|
+
},
|
|
1879
|
+
{
|
|
1880
|
+
"name": "acos",
|
|
1881
|
+
"kind": "function",
|
|
1882
|
+
"contract": {
|
|
1883
|
+
"required": 1,
|
|
1884
|
+
"total": 1,
|
|
1885
|
+
"variadic": false
|
|
1886
|
+
}
|
|
1887
|
+
},
|
|
1888
|
+
{
|
|
1889
|
+
"name": "atan",
|
|
1890
|
+
"kind": "function",
|
|
1891
|
+
"contract": {
|
|
1892
|
+
"required": 1,
|
|
1893
|
+
"total": 1,
|
|
1894
|
+
"variadic": false
|
|
1895
|
+
}
|
|
1896
|
+
},
|
|
1897
|
+
{
|
|
1898
|
+
"name": "atan2",
|
|
1899
|
+
"kind": "function",
|
|
1900
|
+
"contract": {
|
|
1901
|
+
"required": 2,
|
|
1902
|
+
"total": 2,
|
|
1903
|
+
"variadic": false
|
|
1904
|
+
}
|
|
1905
|
+
},
|
|
1906
|
+
{
|
|
1907
|
+
"name": "degrees",
|
|
1908
|
+
"kind": "function",
|
|
1909
|
+
"contract": {
|
|
1910
|
+
"required": 1,
|
|
1911
|
+
"total": 1,
|
|
1912
|
+
"variadic": false
|
|
1913
|
+
}
|
|
1914
|
+
},
|
|
1915
|
+
{
|
|
1916
|
+
"name": "radians",
|
|
1917
|
+
"kind": "function",
|
|
1918
|
+
"contract": {
|
|
1919
|
+
"required": 1,
|
|
1920
|
+
"total": 1,
|
|
1921
|
+
"variadic": false
|
|
1922
|
+
}
|
|
1923
|
+
},
|
|
1924
|
+
{
|
|
1925
|
+
"name": "random",
|
|
1926
|
+
"kind": "function",
|
|
1927
|
+
"contract": {
|
|
1928
|
+
"required": 1,
|
|
1929
|
+
"total": 1,
|
|
1930
|
+
"variadic": false
|
|
1931
|
+
}
|
|
1932
|
+
},
|
|
1933
|
+
{
|
|
1934
|
+
"name": "fromFloat64",
|
|
1935
|
+
"kind": "function",
|
|
1936
|
+
"contract": {
|
|
1937
|
+
"required": 1,
|
|
1938
|
+
"total": 2,
|
|
1939
|
+
"variadic": false
|
|
1940
|
+
}
|
|
1941
|
+
},
|
|
1942
|
+
{
|
|
1943
|
+
"name": "fromFloat32",
|
|
1944
|
+
"kind": "function",
|
|
1945
|
+
"contract": {
|
|
1946
|
+
"required": 1,
|
|
1947
|
+
"total": 2,
|
|
1948
|
+
"variadic": false
|
|
1949
|
+
}
|
|
1950
|
+
},
|
|
1951
|
+
{
|
|
1952
|
+
"name": "toFloat64",
|
|
1953
|
+
"kind": "function",
|
|
1954
|
+
"contract": {
|
|
1955
|
+
"required": 1,
|
|
1956
|
+
"total": 2,
|
|
1957
|
+
"variadic": false
|
|
1958
|
+
}
|
|
1959
|
+
},
|
|
1960
|
+
{
|
|
1961
|
+
"name": "toFloat32",
|
|
1962
|
+
"kind": "function",
|
|
1963
|
+
"contract": {
|
|
1964
|
+
"required": 1,
|
|
1965
|
+
"total": 2,
|
|
1966
|
+
"variadic": false
|
|
1967
|
+
}
|
|
1968
|
+
},
|
|
1969
|
+
{
|
|
1970
|
+
"name": "year",
|
|
1971
|
+
"kind": "function",
|
|
1972
|
+
"contract": {
|
|
1973
|
+
"required": 1,
|
|
1974
|
+
"total": 1,
|
|
1975
|
+
"variadic": false
|
|
1976
|
+
}
|
|
1977
|
+
},
|
|
1978
|
+
{
|
|
1979
|
+
"name": "month",
|
|
1980
|
+
"kind": "function",
|
|
1981
|
+
"contract": {
|
|
1982
|
+
"required": 1,
|
|
1983
|
+
"total": 1,
|
|
1984
|
+
"variadic": false
|
|
1985
|
+
}
|
|
1986
|
+
},
|
|
1987
|
+
{
|
|
1988
|
+
"name": "day",
|
|
1989
|
+
"kind": "function",
|
|
1990
|
+
"contract": {
|
|
1991
|
+
"required": 1,
|
|
1992
|
+
"total": 1,
|
|
1993
|
+
"variadic": false
|
|
1994
|
+
}
|
|
1995
|
+
},
|
|
1996
|
+
{
|
|
1997
|
+
"name": "hour",
|
|
1998
|
+
"kind": "function",
|
|
1999
|
+
"contract": {
|
|
2000
|
+
"required": 1,
|
|
2001
|
+
"total": 1,
|
|
2002
|
+
"variadic": false
|
|
2003
|
+
}
|
|
2004
|
+
},
|
|
2005
|
+
{
|
|
2006
|
+
"name": "minute",
|
|
2007
|
+
"kind": "function",
|
|
2008
|
+
"contract": {
|
|
2009
|
+
"required": 1,
|
|
2010
|
+
"total": 1,
|
|
2011
|
+
"variadic": false
|
|
2012
|
+
}
|
|
2013
|
+
},
|
|
2014
|
+
{
|
|
2015
|
+
"name": "second",
|
|
2016
|
+
"kind": "function",
|
|
2017
|
+
"contract": {
|
|
2018
|
+
"required": 1,
|
|
2019
|
+
"total": 1,
|
|
2020
|
+
"variadic": false
|
|
2021
|
+
}
|
|
2022
|
+
},
|
|
2023
|
+
{
|
|
2024
|
+
"name": "microsecond",
|
|
2025
|
+
"kind": "function",
|
|
2026
|
+
"contract": {
|
|
2027
|
+
"required": 1,
|
|
2028
|
+
"total": 1,
|
|
2029
|
+
"variadic": false
|
|
2030
|
+
}
|
|
2031
|
+
},
|
|
2032
|
+
{
|
|
2033
|
+
"name": "weekday",
|
|
2034
|
+
"kind": "function",
|
|
2035
|
+
"contract": {
|
|
2036
|
+
"required": 1,
|
|
2037
|
+
"total": 1,
|
|
2038
|
+
"variadic": false
|
|
2039
|
+
}
|
|
2040
|
+
},
|
|
2041
|
+
{
|
|
2042
|
+
"name": "dayOfYear",
|
|
2043
|
+
"kind": "function",
|
|
2044
|
+
"contract": {
|
|
2045
|
+
"required": 1,
|
|
2046
|
+
"total": 1,
|
|
2047
|
+
"variadic": false
|
|
2048
|
+
}
|
|
2049
|
+
},
|
|
2050
|
+
{
|
|
2051
|
+
"name": "isoWeek",
|
|
2052
|
+
"kind": "function",
|
|
2053
|
+
"contract": {
|
|
2054
|
+
"required": 1,
|
|
2055
|
+
"total": 1,
|
|
2056
|
+
"variadic": false
|
|
2057
|
+
}
|
|
2058
|
+
},
|
|
2059
|
+
{
|
|
2060
|
+
"name": "isoWeekYear",
|
|
2061
|
+
"kind": "function",
|
|
2062
|
+
"contract": {
|
|
2063
|
+
"required": 1,
|
|
2064
|
+
"total": 1,
|
|
2065
|
+
"variadic": false
|
|
2066
|
+
}
|
|
2067
|
+
},
|
|
2068
|
+
{
|
|
2069
|
+
"name": "hasTime",
|
|
2070
|
+
"kind": "function",
|
|
2071
|
+
"contract": {
|
|
2072
|
+
"required": 1,
|
|
2073
|
+
"total": 1,
|
|
2074
|
+
"variadic": false
|
|
2075
|
+
}
|
|
2076
|
+
},
|
|
2077
|
+
{
|
|
2078
|
+
"name": "toCivil",
|
|
2079
|
+
"kind": "function",
|
|
2080
|
+
"contract": {
|
|
2081
|
+
"required": 2,
|
|
2082
|
+
"total": 2,
|
|
2083
|
+
"variadic": false
|
|
2084
|
+
}
|
|
2085
|
+
},
|
|
2086
|
+
{
|
|
2087
|
+
"name": "toInstant",
|
|
2088
|
+
"kind": "function",
|
|
2089
|
+
"contract": {
|
|
2090
|
+
"required": 2,
|
|
2091
|
+
"total": 2,
|
|
2092
|
+
"variadic": false
|
|
2093
|
+
}
|
|
2094
|
+
},
|
|
2095
|
+
{
|
|
2096
|
+
"name": "pi",
|
|
2097
|
+
"kind": "constant"
|
|
2098
|
+
},
|
|
2099
|
+
{
|
|
2100
|
+
"name": "newline",
|
|
2101
|
+
"kind": "constant"
|
|
2102
|
+
},
|
|
2103
|
+
{
|
|
2104
|
+
"name": "tab",
|
|
2105
|
+
"kind": "constant"
|
|
2106
|
+
},
|
|
2107
|
+
{
|
|
2108
|
+
"name": "quote",
|
|
2109
|
+
"kind": "constant"
|
|
2110
|
+
},
|
|
2111
|
+
{
|
|
2112
|
+
"name": "offerAvailable",
|
|
2113
|
+
"kind": "function",
|
|
2114
|
+
"contract": {
|
|
2115
|
+
"required": 1,
|
|
2116
|
+
"total": 1,
|
|
2117
|
+
"variadic": false
|
|
2118
|
+
}
|
|
2119
|
+
}
|
|
2120
|
+
];
|
|
2121
|
+
const libraryExports = [
|
|
2122
|
+
{
|
|
2123
|
+
"library": "text",
|
|
2124
|
+
"name": "pad",
|
|
2125
|
+
"kind": "function",
|
|
2126
|
+
"contract": {
|
|
2127
|
+
"required": 2,
|
|
2128
|
+
"total": 3,
|
|
2129
|
+
"variadic": false
|
|
2130
|
+
}
|
|
2131
|
+
},
|
|
2132
|
+
{
|
|
2133
|
+
"library": "text",
|
|
2134
|
+
"name": "padLeft",
|
|
2135
|
+
"kind": "function",
|
|
2136
|
+
"contract": {
|
|
2137
|
+
"required": 2,
|
|
2138
|
+
"total": 3,
|
|
2139
|
+
"variadic": false
|
|
2140
|
+
}
|
|
2141
|
+
},
|
|
2142
|
+
{
|
|
2143
|
+
"library": "text",
|
|
2144
|
+
"name": "trim",
|
|
2145
|
+
"kind": "function",
|
|
2146
|
+
"contract": {
|
|
2147
|
+
"required": 1,
|
|
2148
|
+
"total": 1,
|
|
2149
|
+
"variadic": false
|
|
2150
|
+
}
|
|
2151
|
+
},
|
|
2152
|
+
{
|
|
2153
|
+
"library": "text",
|
|
2154
|
+
"name": "trimStart",
|
|
2155
|
+
"kind": "function",
|
|
2156
|
+
"contract": {
|
|
2157
|
+
"required": 1,
|
|
2158
|
+
"total": 1,
|
|
2159
|
+
"variadic": false
|
|
2160
|
+
}
|
|
2161
|
+
},
|
|
2162
|
+
{
|
|
2163
|
+
"library": "text",
|
|
2164
|
+
"name": "trimEnd",
|
|
2165
|
+
"kind": "function",
|
|
2166
|
+
"contract": {
|
|
2167
|
+
"required": 1,
|
|
2168
|
+
"total": 1,
|
|
2169
|
+
"variadic": false
|
|
2170
|
+
}
|
|
2171
|
+
},
|
|
2172
|
+
{
|
|
2173
|
+
"library": "text",
|
|
2174
|
+
"name": "split",
|
|
2175
|
+
"kind": "function",
|
|
2176
|
+
"contract": {
|
|
2177
|
+
"required": 2,
|
|
2178
|
+
"total": 2,
|
|
2179
|
+
"variadic": false
|
|
2180
|
+
}
|
|
2181
|
+
},
|
|
2182
|
+
{
|
|
2183
|
+
"library": "text",
|
|
2184
|
+
"name": "join",
|
|
2185
|
+
"kind": "function",
|
|
2186
|
+
"contract": {
|
|
2187
|
+
"required": 1,
|
|
2188
|
+
"total": 2,
|
|
2189
|
+
"variadic": false
|
|
2190
|
+
}
|
|
2191
|
+
},
|
|
2192
|
+
{
|
|
2193
|
+
"library": "text",
|
|
2194
|
+
"name": "repeated",
|
|
2195
|
+
"kind": "function",
|
|
2196
|
+
"contract": {
|
|
2197
|
+
"required": 2,
|
|
2198
|
+
"total": 2,
|
|
2199
|
+
"variadic": false
|
|
2200
|
+
}
|
|
2201
|
+
},
|
|
2202
|
+
{
|
|
2203
|
+
"library": "text",
|
|
2204
|
+
"name": "lastOffset",
|
|
2205
|
+
"kind": "function",
|
|
2206
|
+
"contract": {
|
|
2207
|
+
"required": 2,
|
|
2208
|
+
"total": 2,
|
|
2209
|
+
"variadic": false
|
|
2210
|
+
}
|
|
2211
|
+
},
|
|
2212
|
+
{
|
|
2213
|
+
"library": "text",
|
|
2214
|
+
"name": "format",
|
|
2215
|
+
"kind": "function",
|
|
2216
|
+
"contract": {
|
|
2217
|
+
"required": 2,
|
|
2218
|
+
"total": 2,
|
|
2219
|
+
"variadic": false
|
|
2220
|
+
}
|
|
2221
|
+
},
|
|
2222
|
+
{
|
|
2223
|
+
"library": "text",
|
|
2224
|
+
"name": "formatNumber",
|
|
2225
|
+
"kind": "function",
|
|
2226
|
+
"contract": {
|
|
2227
|
+
"required": 2,
|
|
2228
|
+
"total": 3,
|
|
2229
|
+
"variadic": false
|
|
2230
|
+
}
|
|
2231
|
+
},
|
|
2232
|
+
{
|
|
2233
|
+
"library": "text",
|
|
2234
|
+
"name": "parseNumber",
|
|
2235
|
+
"kind": "function",
|
|
2236
|
+
"contract": {
|
|
2237
|
+
"required": 2,
|
|
2238
|
+
"total": 2,
|
|
2239
|
+
"variadic": false
|
|
2240
|
+
}
|
|
2241
|
+
},
|
|
2242
|
+
{
|
|
2243
|
+
"library": "list",
|
|
2244
|
+
"name": "sum",
|
|
2245
|
+
"kind": "function",
|
|
2246
|
+
"contract": {
|
|
2247
|
+
"required": 1,
|
|
2248
|
+
"total": 1,
|
|
2249
|
+
"variadic": false
|
|
2250
|
+
}
|
|
2251
|
+
},
|
|
2252
|
+
{
|
|
2253
|
+
"library": "list",
|
|
2254
|
+
"name": "average",
|
|
2255
|
+
"kind": "function",
|
|
2256
|
+
"contract": {
|
|
2257
|
+
"required": 1,
|
|
2258
|
+
"total": 1,
|
|
2259
|
+
"variadic": false
|
|
2260
|
+
}
|
|
2261
|
+
},
|
|
2262
|
+
{
|
|
2263
|
+
"library": "list",
|
|
2264
|
+
"name": "zip",
|
|
2265
|
+
"kind": "function",
|
|
2266
|
+
"contract": {
|
|
2267
|
+
"required": 2,
|
|
2268
|
+
"total": 2,
|
|
2269
|
+
"variadic": false
|
|
2270
|
+
}
|
|
2271
|
+
},
|
|
2272
|
+
{
|
|
2273
|
+
"library": "list",
|
|
2274
|
+
"name": "unique",
|
|
2275
|
+
"kind": "function",
|
|
2276
|
+
"contract": {
|
|
2277
|
+
"required": 1,
|
|
2278
|
+
"total": 1,
|
|
2279
|
+
"variadic": false
|
|
2280
|
+
}
|
|
2281
|
+
},
|
|
2282
|
+
{
|
|
2283
|
+
"library": "list",
|
|
2284
|
+
"name": "reverse",
|
|
2285
|
+
"kind": "function",
|
|
2286
|
+
"contract": {
|
|
2287
|
+
"required": 1,
|
|
2288
|
+
"total": 1,
|
|
2289
|
+
"variadic": false
|
|
2290
|
+
}
|
|
2291
|
+
},
|
|
2292
|
+
{
|
|
2293
|
+
"library": "list",
|
|
2294
|
+
"name": "flatten",
|
|
2295
|
+
"kind": "function",
|
|
2296
|
+
"contract": {
|
|
2297
|
+
"required": 1,
|
|
2298
|
+
"total": 1,
|
|
2299
|
+
"variadic": false
|
|
2300
|
+
}
|
|
2301
|
+
},
|
|
2302
|
+
{
|
|
2303
|
+
"library": "list",
|
|
2304
|
+
"name": "sort",
|
|
2305
|
+
"kind": "function",
|
|
2306
|
+
"contract": {
|
|
2307
|
+
"required": 1,
|
|
2308
|
+
"total": 2,
|
|
2309
|
+
"variadic": false
|
|
2310
|
+
}
|
|
2311
|
+
},
|
|
2312
|
+
{
|
|
2313
|
+
"library": "list",
|
|
2314
|
+
"name": "sortBy",
|
|
2315
|
+
"kind": "function",
|
|
2316
|
+
"contract": {
|
|
2317
|
+
"required": 2,
|
|
2318
|
+
"total": 3,
|
|
2319
|
+
"variadic": false
|
|
2320
|
+
}
|
|
2321
|
+
},
|
|
2322
|
+
{
|
|
2323
|
+
"library": "list",
|
|
2324
|
+
"name": "sortWith",
|
|
2325
|
+
"kind": "function",
|
|
2326
|
+
"contract": {
|
|
2327
|
+
"required": 2,
|
|
2328
|
+
"total": 3,
|
|
2329
|
+
"variadic": false
|
|
2330
|
+
}
|
|
2331
|
+
},
|
|
2332
|
+
{
|
|
2333
|
+
"library": "list",
|
|
2334
|
+
"name": "filter",
|
|
2335
|
+
"kind": "function",
|
|
2336
|
+
"contract": {
|
|
2337
|
+
"required": 2,
|
|
2338
|
+
"total": 2,
|
|
2339
|
+
"variadic": false
|
|
2340
|
+
}
|
|
2341
|
+
},
|
|
2342
|
+
{
|
|
2343
|
+
"library": "list",
|
|
2344
|
+
"name": "map",
|
|
2345
|
+
"kind": "function",
|
|
2346
|
+
"contract": {
|
|
2347
|
+
"required": 2,
|
|
2348
|
+
"total": 2,
|
|
2349
|
+
"variadic": false
|
|
2350
|
+
}
|
|
2351
|
+
},
|
|
2352
|
+
{
|
|
2353
|
+
"library": "list",
|
|
2354
|
+
"name": "reduce",
|
|
2355
|
+
"kind": "function",
|
|
2356
|
+
"contract": {
|
|
2357
|
+
"required": 3,
|
|
2358
|
+
"total": 3,
|
|
2359
|
+
"variadic": false
|
|
2360
|
+
}
|
|
2361
|
+
},
|
|
2362
|
+
{
|
|
2363
|
+
"library": "list",
|
|
2364
|
+
"name": "group",
|
|
2365
|
+
"kind": "function",
|
|
2366
|
+
"contract": {
|
|
2367
|
+
"required": 2,
|
|
2368
|
+
"total": 2,
|
|
2369
|
+
"variadic": false
|
|
2370
|
+
}
|
|
2371
|
+
},
|
|
2372
|
+
{
|
|
2373
|
+
"library": "list",
|
|
2374
|
+
"name": "partition",
|
|
2375
|
+
"kind": "function",
|
|
2376
|
+
"contract": {
|
|
2377
|
+
"required": 2,
|
|
2378
|
+
"total": 2,
|
|
2379
|
+
"variadic": false
|
|
2380
|
+
}
|
|
2381
|
+
},
|
|
2382
|
+
{
|
|
2383
|
+
"library": "list",
|
|
2384
|
+
"name": "any",
|
|
2385
|
+
"kind": "function",
|
|
2386
|
+
"contract": {
|
|
2387
|
+
"required": 2,
|
|
2388
|
+
"total": 2,
|
|
2389
|
+
"variadic": false
|
|
2390
|
+
}
|
|
2391
|
+
},
|
|
2392
|
+
{
|
|
2393
|
+
"library": "list",
|
|
2394
|
+
"name": "all",
|
|
2395
|
+
"kind": "function",
|
|
2396
|
+
"contract": {
|
|
2397
|
+
"required": 2,
|
|
2398
|
+
"total": 2,
|
|
2399
|
+
"variadic": false
|
|
2400
|
+
}
|
|
2401
|
+
},
|
|
2402
|
+
{
|
|
2403
|
+
"library": "list",
|
|
2404
|
+
"name": "find",
|
|
2405
|
+
"kind": "function",
|
|
2406
|
+
"contract": {
|
|
2407
|
+
"required": 2,
|
|
2408
|
+
"total": 2,
|
|
2409
|
+
"variadic": false
|
|
2410
|
+
}
|
|
2411
|
+
},
|
|
2412
|
+
{
|
|
2413
|
+
"library": "list",
|
|
2414
|
+
"name": "indexOf",
|
|
2415
|
+
"kind": "function",
|
|
2416
|
+
"contract": {
|
|
2417
|
+
"required": 2,
|
|
2418
|
+
"total": 2,
|
|
2419
|
+
"variadic": false
|
|
2420
|
+
}
|
|
2421
|
+
},
|
|
2422
|
+
{
|
|
2423
|
+
"library": "map",
|
|
2424
|
+
"name": "merge",
|
|
2425
|
+
"kind": "function",
|
|
2426
|
+
"contract": {
|
|
2427
|
+
"required": 2,
|
|
2428
|
+
"total": 2,
|
|
2429
|
+
"variadic": false
|
|
2430
|
+
}
|
|
2431
|
+
},
|
|
2432
|
+
{
|
|
2433
|
+
"library": "map",
|
|
2434
|
+
"name": "without",
|
|
2435
|
+
"kind": "function",
|
|
2436
|
+
"contract": {
|
|
2437
|
+
"required": 2,
|
|
2438
|
+
"total": 2,
|
|
2439
|
+
"variadic": false
|
|
2440
|
+
}
|
|
2441
|
+
},
|
|
2442
|
+
{
|
|
2443
|
+
"library": "map",
|
|
2444
|
+
"name": "pick",
|
|
2445
|
+
"kind": "function",
|
|
2446
|
+
"contract": {
|
|
2447
|
+
"required": 2,
|
|
2448
|
+
"total": 2,
|
|
2449
|
+
"variadic": false
|
|
2450
|
+
}
|
|
2451
|
+
},
|
|
2452
|
+
{
|
|
2453
|
+
"library": "map",
|
|
2454
|
+
"name": "entries",
|
|
2455
|
+
"kind": "function",
|
|
2456
|
+
"contract": {
|
|
2457
|
+
"required": 1,
|
|
2458
|
+
"total": 1,
|
|
2459
|
+
"variadic": false
|
|
2460
|
+
}
|
|
2461
|
+
},
|
|
2462
|
+
{
|
|
2463
|
+
"library": "map",
|
|
2464
|
+
"name": "fromEntries",
|
|
2465
|
+
"kind": "function",
|
|
2466
|
+
"contract": {
|
|
2467
|
+
"required": 1,
|
|
2468
|
+
"total": 1,
|
|
2469
|
+
"variadic": false
|
|
2470
|
+
}
|
|
2471
|
+
},
|
|
2472
|
+
{
|
|
2473
|
+
"library": "map",
|
|
2474
|
+
"name": "mapValues",
|
|
2475
|
+
"kind": "function",
|
|
2476
|
+
"contract": {
|
|
2477
|
+
"required": 2,
|
|
2478
|
+
"total": 2,
|
|
2479
|
+
"variadic": false
|
|
2480
|
+
}
|
|
2481
|
+
},
|
|
2482
|
+
{
|
|
2483
|
+
"library": "map",
|
|
2484
|
+
"name": "lookup",
|
|
2485
|
+
"kind": "function",
|
|
2486
|
+
"contract": {
|
|
2487
|
+
"required": 2,
|
|
2488
|
+
"total": 3,
|
|
2489
|
+
"variadic": false
|
|
2490
|
+
}
|
|
2491
|
+
},
|
|
2492
|
+
{
|
|
2493
|
+
"library": "map",
|
|
2494
|
+
"name": "transform",
|
|
2495
|
+
"kind": "function",
|
|
2496
|
+
"contract": {
|
|
2497
|
+
"required": 2,
|
|
2498
|
+
"total": 2,
|
|
2499
|
+
"variadic": false
|
|
2500
|
+
}
|
|
2501
|
+
},
|
|
2502
|
+
{
|
|
2503
|
+
"library": "bytes",
|
|
2504
|
+
"name": "toHex",
|
|
2505
|
+
"kind": "function",
|
|
2506
|
+
"contract": {
|
|
2507
|
+
"required": 1,
|
|
2508
|
+
"total": 1,
|
|
2509
|
+
"variadic": false
|
|
2510
|
+
}
|
|
2511
|
+
},
|
|
2512
|
+
{
|
|
2513
|
+
"library": "bytes",
|
|
2514
|
+
"name": "fromHex",
|
|
2515
|
+
"kind": "function",
|
|
2516
|
+
"contract": {
|
|
2517
|
+
"required": 1,
|
|
2518
|
+
"total": 1,
|
|
2519
|
+
"variadic": false
|
|
2520
|
+
}
|
|
2521
|
+
},
|
|
2522
|
+
{
|
|
2523
|
+
"library": "bytes",
|
|
2524
|
+
"name": "toBase64",
|
|
2525
|
+
"kind": "function",
|
|
2526
|
+
"contract": {
|
|
2527
|
+
"required": 1,
|
|
2528
|
+
"total": 1,
|
|
2529
|
+
"variadic": false
|
|
2530
|
+
}
|
|
2531
|
+
},
|
|
2532
|
+
{
|
|
2533
|
+
"library": "bytes",
|
|
2534
|
+
"name": "fromBase64",
|
|
2535
|
+
"kind": "function",
|
|
2536
|
+
"contract": {
|
|
2537
|
+
"required": 1,
|
|
2538
|
+
"total": 1,
|
|
2539
|
+
"variadic": false
|
|
2540
|
+
}
|
|
2541
|
+
},
|
|
2542
|
+
{
|
|
2543
|
+
"library": "bytes",
|
|
2544
|
+
"name": "toBase64Url",
|
|
2545
|
+
"kind": "function",
|
|
2546
|
+
"contract": {
|
|
2547
|
+
"required": 1,
|
|
2548
|
+
"total": 1,
|
|
2549
|
+
"variadic": false
|
|
2550
|
+
}
|
|
2551
|
+
},
|
|
2552
|
+
{
|
|
2553
|
+
"library": "bytes",
|
|
2554
|
+
"name": "fromBase64Url",
|
|
2555
|
+
"kind": "function",
|
|
2556
|
+
"contract": {
|
|
2557
|
+
"required": 1,
|
|
2558
|
+
"total": 1,
|
|
2559
|
+
"variadic": false
|
|
2560
|
+
}
|
|
2561
|
+
},
|
|
2562
|
+
{
|
|
2563
|
+
"library": "bytes",
|
|
2564
|
+
"name": "decodeText",
|
|
2565
|
+
"kind": "function",
|
|
2566
|
+
"contract": {
|
|
2567
|
+
"required": 1,
|
|
2568
|
+
"total": 3,
|
|
2569
|
+
"variadic": false
|
|
2570
|
+
}
|
|
2571
|
+
},
|
|
2572
|
+
{
|
|
2573
|
+
"library": "bytes",
|
|
2574
|
+
"name": "encodeText",
|
|
2575
|
+
"kind": "function",
|
|
2576
|
+
"contract": {
|
|
2577
|
+
"required": 1,
|
|
2578
|
+
"total": 2,
|
|
2579
|
+
"variadic": false
|
|
2580
|
+
}
|
|
2581
|
+
},
|
|
2582
|
+
{
|
|
2583
|
+
"library": "json",
|
|
2584
|
+
"name": "decodeJson",
|
|
2585
|
+
"kind": "function",
|
|
2586
|
+
"contract": {
|
|
2587
|
+
"required": 1,
|
|
2588
|
+
"total": 1,
|
|
2589
|
+
"variadic": false
|
|
2590
|
+
}
|
|
2591
|
+
},
|
|
2592
|
+
{
|
|
2593
|
+
"library": "json",
|
|
2594
|
+
"name": "encodeJson",
|
|
2595
|
+
"kind": "function",
|
|
2596
|
+
"contract": {
|
|
2597
|
+
"required": 1,
|
|
2598
|
+
"total": 1,
|
|
2599
|
+
"variadic": false
|
|
2600
|
+
}
|
|
2601
|
+
},
|
|
2602
|
+
{
|
|
2603
|
+
"library": "date",
|
|
2604
|
+
"name": "makeDate",
|
|
2605
|
+
"kind": "function",
|
|
2606
|
+
"contract": {
|
|
2607
|
+
"required": 3,
|
|
2608
|
+
"total": 3,
|
|
2609
|
+
"variadic": false
|
|
2610
|
+
}
|
|
2611
|
+
},
|
|
2612
|
+
{
|
|
2613
|
+
"library": "date",
|
|
2614
|
+
"name": "makeDateTime",
|
|
2615
|
+
"kind": "function",
|
|
2616
|
+
"contract": {
|
|
2617
|
+
"required": 5,
|
|
2618
|
+
"total": 7,
|
|
2619
|
+
"variadic": false
|
|
2620
|
+
}
|
|
2621
|
+
},
|
|
2622
|
+
{
|
|
2623
|
+
"library": "date",
|
|
2624
|
+
"name": "atTime",
|
|
2625
|
+
"kind": "function",
|
|
2626
|
+
"contract": {
|
|
2627
|
+
"required": 3,
|
|
2628
|
+
"total": 5,
|
|
2629
|
+
"variadic": false
|
|
2630
|
+
}
|
|
2631
|
+
},
|
|
2632
|
+
{
|
|
2633
|
+
"library": "date",
|
|
2634
|
+
"name": "dateOnly",
|
|
2635
|
+
"kind": "function",
|
|
2636
|
+
"contract": {
|
|
2637
|
+
"required": 1,
|
|
2638
|
+
"total": 1,
|
|
2639
|
+
"variadic": false
|
|
2640
|
+
}
|
|
2641
|
+
},
|
|
2642
|
+
{
|
|
2643
|
+
"library": "date",
|
|
2644
|
+
"name": "daysInMonth",
|
|
2645
|
+
"kind": "function",
|
|
2646
|
+
"contract": {
|
|
2647
|
+
"required": 1,
|
|
2648
|
+
"total": 1,
|
|
2649
|
+
"variadic": false
|
|
2650
|
+
}
|
|
2651
|
+
},
|
|
2652
|
+
{
|
|
2653
|
+
"library": "date",
|
|
2654
|
+
"name": "isLeapYear",
|
|
2655
|
+
"kind": "function",
|
|
2656
|
+
"contract": {
|
|
2657
|
+
"required": 1,
|
|
2658
|
+
"total": 1,
|
|
2659
|
+
"variadic": false
|
|
2660
|
+
}
|
|
2661
|
+
},
|
|
2662
|
+
{
|
|
2663
|
+
"library": "date",
|
|
2664
|
+
"name": "formatDate",
|
|
2665
|
+
"kind": "function",
|
|
2666
|
+
"contract": {
|
|
2667
|
+
"required": 2,
|
|
2668
|
+
"total": 2,
|
|
2669
|
+
"variadic": false
|
|
2670
|
+
}
|
|
2671
|
+
},
|
|
2672
|
+
{
|
|
2673
|
+
"library": "date",
|
|
2674
|
+
"name": "parseDate",
|
|
2675
|
+
"kind": "function",
|
|
2676
|
+
"contract": {
|
|
2677
|
+
"required": 2,
|
|
2678
|
+
"total": 2,
|
|
2679
|
+
"variadic": false
|
|
2680
|
+
}
|
|
2681
|
+
},
|
|
2682
|
+
{
|
|
2683
|
+
"library": "date",
|
|
2684
|
+
"name": "splitDuration",
|
|
2685
|
+
"kind": "function",
|
|
2686
|
+
"contract": {
|
|
2687
|
+
"required": 1,
|
|
2688
|
+
"total": 1,
|
|
2689
|
+
"variadic": false
|
|
2690
|
+
}
|
|
2691
|
+
},
|
|
2692
|
+
{
|
|
2693
|
+
"library": "date",
|
|
2694
|
+
"name": "monthsBetween",
|
|
2695
|
+
"kind": "function",
|
|
2696
|
+
"contract": {
|
|
2697
|
+
"required": 2,
|
|
2698
|
+
"total": 2,
|
|
2699
|
+
"variadic": false
|
|
2700
|
+
}
|
|
2701
|
+
},
|
|
2702
|
+
{
|
|
2703
|
+
"library": "date",
|
|
2704
|
+
"name": "epoch",
|
|
2705
|
+
"kind": "constant"
|
|
2706
|
+
},
|
|
2707
|
+
{
|
|
2708
|
+
"library": "units",
|
|
2709
|
+
"name": "celsiusToFahrenheit",
|
|
2710
|
+
"kind": "function",
|
|
2711
|
+
"contract": {
|
|
2712
|
+
"required": 1,
|
|
2713
|
+
"total": 1,
|
|
2714
|
+
"variadic": false
|
|
2715
|
+
}
|
|
2716
|
+
},
|
|
2717
|
+
{
|
|
2718
|
+
"library": "units",
|
|
2719
|
+
"name": "fahrenheitToCelsius",
|
|
2720
|
+
"kind": "function",
|
|
2721
|
+
"contract": {
|
|
2722
|
+
"required": 1,
|
|
2723
|
+
"total": 1,
|
|
2724
|
+
"variadic": false
|
|
2725
|
+
}
|
|
2726
|
+
},
|
|
2727
|
+
{
|
|
2728
|
+
"library": "units",
|
|
2729
|
+
"name": "celsiusToKelvin",
|
|
2730
|
+
"kind": "function",
|
|
2731
|
+
"contract": {
|
|
2732
|
+
"required": 1,
|
|
2733
|
+
"total": 1,
|
|
2734
|
+
"variadic": false
|
|
2735
|
+
}
|
|
2736
|
+
},
|
|
2737
|
+
{
|
|
2738
|
+
"library": "units",
|
|
2739
|
+
"name": "kelvinToCelsius",
|
|
2740
|
+
"kind": "function",
|
|
2741
|
+
"contract": {
|
|
2742
|
+
"required": 1,
|
|
2743
|
+
"total": 1,
|
|
2744
|
+
"variadic": false
|
|
2745
|
+
}
|
|
2746
|
+
},
|
|
2747
|
+
{
|
|
2748
|
+
"library": "units",
|
|
2749
|
+
"name": "fahrenheitToKelvin",
|
|
2750
|
+
"kind": "function",
|
|
2751
|
+
"contract": {
|
|
2752
|
+
"required": 1,
|
|
2753
|
+
"total": 1,
|
|
2754
|
+
"variadic": false
|
|
2755
|
+
}
|
|
2756
|
+
},
|
|
2757
|
+
{
|
|
2758
|
+
"library": "units",
|
|
2759
|
+
"name": "kelvinToFahrenheit",
|
|
2760
|
+
"kind": "function",
|
|
2761
|
+
"contract": {
|
|
2762
|
+
"required": 1,
|
|
2763
|
+
"total": 1,
|
|
2764
|
+
"variadic": false
|
|
2765
|
+
}
|
|
2766
|
+
}
|
|
2767
|
+
];
|
|
2768
|
+
//#endregion
|
|
2769
|
+
//#region src/units.ts
|
|
2770
|
+
const owned = /* @__PURE__ */ new WeakSet();
|
|
2771
|
+
/** Take ownership once, copying and freezing every caller-owned slot. */
|
|
2772
|
+
const ownUnit = (spec) => {
|
|
2773
|
+
if (owned.has(spec)) return spec;
|
|
2774
|
+
const unit = Object.freeze(spec.map((slot) => Object.freeze({
|
|
2775
|
+
unit: slot.unit,
|
|
2776
|
+
exponent: slot.exponent
|
|
2777
|
+
})));
|
|
2778
|
+
owned.add(unit);
|
|
2779
|
+
return unit;
|
|
2780
|
+
};
|
|
2781
|
+
/** A Unit that can't be written, or a combination chapter 3 refuses. */
|
|
2782
|
+
var UnitError = class extends Error {
|
|
2783
|
+
name = "UnitError";
|
|
2784
|
+
};
|
|
2785
|
+
const entries = /* @__PURE__ */ new Map();
|
|
2786
|
+
for (const u of units) {
|
|
2787
|
+
const entry = {
|
|
2788
|
+
name: u.name,
|
|
2789
|
+
kind: u.kind,
|
|
2790
|
+
calendar: u.calendar,
|
|
2791
|
+
factor: [parseDec(u.factor[0]), parseDec(u.factor[1])],
|
|
2792
|
+
..."plural" in u && u.plural ? { plural: u.plural } : {}
|
|
2793
|
+
};
|
|
2794
|
+
entries.set(u.name, entry);
|
|
2795
|
+
if (entry.plural) entries.set(entry.plural, entry);
|
|
2796
|
+
}
|
|
2797
|
+
const kindOrder = new Map(unitKinds.map((k, i) => [k, i]));
|
|
2798
|
+
const kinds = new Map(unitKindTable.map((k) => [k.name, {
|
|
2799
|
+
dimension: k.dimension,
|
|
2800
|
+
factor: parseDec(k.factor)
|
|
2801
|
+
}]));
|
|
2802
|
+
const unitEntry = (name) => entries.get(name);
|
|
2803
|
+
const entryOf = (slot) => entries.get(slot.unit);
|
|
2804
|
+
/**
|
|
2805
|
+
* Read a Unit as source spells it (chapter 1, Units): factors joined by `*`,
|
|
2806
|
+
* at most one `/`, exponents after `^`, and a leading `1/` for a Unit with
|
|
2807
|
+
* only a denominator. A Unit has one Unit in each slot, so a Unit Kind's
|
|
2808
|
+
* factors name one Unit, and their exponents add (`m*m` is `m^2`).
|
|
2809
|
+
*/
|
|
2810
|
+
const parseUnit = (text) => {
|
|
2811
|
+
const body = text.startsWith("1/") ? text.slice(2) : text;
|
|
2812
|
+
let sign = text.startsWith("1/") ? -1 : 1;
|
|
2813
|
+
const slots = [];
|
|
2814
|
+
let calendar = false;
|
|
2815
|
+
const parts = body.split(/([*/])/);
|
|
2816
|
+
let slashes = sign < 0 ? 1 : 0;
|
|
2817
|
+
for (let i = 0; i < parts.length; i += 2) {
|
|
2818
|
+
if (parts[i - 1] === "/") {
|
|
2819
|
+
sign = -1;
|
|
2820
|
+
slashes++;
|
|
2821
|
+
}
|
|
2822
|
+
const [name, power] = parts[i].split("^");
|
|
2823
|
+
const entry = entries.get(name);
|
|
2824
|
+
if (!entry) throw new UnitError(`\`${name}\` is not a Unit`);
|
|
2825
|
+
if (power !== void 0 && !/^[1-9]\d*$/.test(power)) throw new UnitError("an exponent must be a positive integer");
|
|
2826
|
+
const exponent = sign * (power ? Number(power) : 1);
|
|
2827
|
+
const slot = slots.find((s) => entryOf(s).kind === entry.kind);
|
|
2828
|
+
if (slot && slot.unit !== entry.name) throw new UnitError(`\`${slot.unit}\` and \`${entry.name}\` are two Units of the Unit Kind ${entry.kind}`);
|
|
2829
|
+
if (slot) slot.exponent += exponent;
|
|
2830
|
+
else slots.push({
|
|
2831
|
+
unit: entry.name,
|
|
2832
|
+
exponent
|
|
2833
|
+
});
|
|
2834
|
+
calendar ||= entry.calendar && (parts.length > 1 || power !== void 0 || sign < 0);
|
|
2835
|
+
}
|
|
2836
|
+
if (slashes > 1) throw new UnitError("a Compound Unit has at most one `/`");
|
|
2837
|
+
if (calendar) throw new UnitError("a Calendar Unit can't be part of a Compound Unit");
|
|
2838
|
+
return ownUnit(ordered(slots));
|
|
2839
|
+
};
|
|
2840
|
+
const ordered = (slots) => slots.filter((slot) => slot.exponent !== 0).sort((a, b) => kindOrder.get(entryOf(a).kind) - kindOrder.get(entryOf(b).kind));
|
|
2841
|
+
const factor = (slot) => Math.abs(slot.exponent) === 1 ? slot.unit : `${slot.unit}^${Math.abs(slot.exponent)}`;
|
|
2842
|
+
/**
|
|
2843
|
+
* A Unit in normal form (chapter 3): numerator factors, then `/` and the
|
|
2844
|
+
* denominator's, each in Kind order. A word Unit standing alone is plural
|
|
2845
|
+
* unless the magnitude is exactly 1, when `number` is given.
|
|
2846
|
+
*/
|
|
2847
|
+
const printUnit = (spec, number) => {
|
|
2848
|
+
const top = spec.filter((slot) => slot.exponent > 0);
|
|
2849
|
+
const bottom = spec.filter((slot) => slot.exponent < 0);
|
|
2850
|
+
if (number !== void 0 && top.length === 1 && !bottom.length && top[0].exponent === 1) {
|
|
2851
|
+
const entry = entryOf(top[0]);
|
|
2852
|
+
const one = /^-?1(?:\.0+)?$/.test(number);
|
|
2853
|
+
return entry.plural && !one ? entry.plural : entry.name;
|
|
2854
|
+
}
|
|
2855
|
+
return (top.length ? top.map(factor).join("*") : "1") + (bottom.length ? `/${bottom.map(factor).join("*")}` : "");
|
|
2856
|
+
};
|
|
2857
|
+
const texts = /* @__PURE__ */ new WeakMap();
|
|
2858
|
+
const unitText = (spec, number) => {
|
|
2859
|
+
if (number !== void 0 || !owned.has(spec)) return printUnit(spec, number);
|
|
2860
|
+
let text = texts.get(spec);
|
|
2861
|
+
if (text === void 0) {
|
|
2862
|
+
text = printUnit(spec);
|
|
2863
|
+
texts.set(spec, text);
|
|
2864
|
+
}
|
|
2865
|
+
return text;
|
|
2866
|
+
};
|
|
2867
|
+
/** A Unit's dimension: each base dimension's exponent, Calendar Units apart. */
|
|
2868
|
+
const dimension = (spec) => {
|
|
2869
|
+
const total = /* @__PURE__ */ new Map();
|
|
2870
|
+
for (const slot of spec) for (const part of kinds.get(entryOf(slot).kind).dimension.split("*")) {
|
|
2871
|
+
const [base, power] = part.split("^");
|
|
2872
|
+
total.set(base, (total.get(base) ?? 0) + slot.exponent * (power ? Number(power) : 1));
|
|
2873
|
+
}
|
|
2874
|
+
return [...total].filter(([, exponent]) => exponent !== 0).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0).map(([base, exponent]) => `${base}^${exponent}`).join("*");
|
|
2875
|
+
};
|
|
2876
|
+
const dimensions = /* @__PURE__ */ new WeakMap();
|
|
2877
|
+
const dimensionOf = (spec) => {
|
|
2878
|
+
if (!owned.has(spec)) return dimension(spec);
|
|
2879
|
+
let signature = dimensions.get(spec);
|
|
2880
|
+
if (signature === void 0) {
|
|
2881
|
+
signature = dimension(spec);
|
|
2882
|
+
dimensions.set(spec, signature);
|
|
2883
|
+
}
|
|
2884
|
+
return signature;
|
|
2885
|
+
};
|
|
2886
|
+
const sameDimension = (a, b) => dimensionOf(a) === dimensionOf(b);
|
|
2887
|
+
const factorsOf = (spec) => {
|
|
2888
|
+
const top = [];
|
|
2889
|
+
const bottom = [];
|
|
2890
|
+
const one = (d) => d.coefficient === 1n && d.exponent === 0;
|
|
2891
|
+
for (const slot of spec) {
|
|
2892
|
+
const entry = entryOf(slot);
|
|
2893
|
+
const kindFactor = kinds.get(entry.kind).factor;
|
|
2894
|
+
const [n, d] = entry.factor;
|
|
2895
|
+
const [same, other] = slot.exponent > 0 ? [top, bottom] : [bottom, top];
|
|
2896
|
+
for (let i = 0; i < Math.abs(slot.exponent); i++) {
|
|
2897
|
+
same.push(n);
|
|
2898
|
+
if (!one(d)) other.push(d);
|
|
2899
|
+
if (!one(kindFactor)) same.push(kindFactor);
|
|
2900
|
+
}
|
|
2901
|
+
}
|
|
2902
|
+
return {
|
|
2903
|
+
top,
|
|
2904
|
+
bottom
|
|
2905
|
+
};
|
|
2906
|
+
};
|
|
2907
|
+
const factorPlans = /* @__PURE__ */ new WeakMap();
|
|
2908
|
+
const factorsFor = (spec) => {
|
|
2909
|
+
if (!owned.has(spec)) return factorsOf(spec);
|
|
2910
|
+
const cached = factorPlans.get(spec);
|
|
2911
|
+
if (cached) return cached;
|
|
2912
|
+
const { top, bottom } = factorsOf(spec);
|
|
2913
|
+
const plan = Object.freeze({
|
|
2914
|
+
top: Object.freeze(top),
|
|
2915
|
+
bottom: Object.freeze(bottom)
|
|
2916
|
+
});
|
|
2917
|
+
if (top.length + bottom.length <= 128) factorPlans.set(spec, plan);
|
|
2918
|
+
return plan;
|
|
2919
|
+
};
|
|
2920
|
+
/** A value in the Unit, into Base Units: times each numerator factor, then over each denominator one. */
|
|
2921
|
+
const toBase = (value, spec) => {
|
|
2922
|
+
const { top, bottom } = factorsFor(spec);
|
|
2923
|
+
let v = value;
|
|
2924
|
+
for (const f of top) v = multiply(v, f);
|
|
2925
|
+
for (const f of bottom) v = divide(v, f);
|
|
2926
|
+
return v;
|
|
2927
|
+
};
|
|
2928
|
+
/** A value in Base Units, into the Unit: times each denominator factor, then over each numerator one. */
|
|
2929
|
+
const fromBase = (value, spec) => {
|
|
2930
|
+
const { top, bottom } = factorsFor(spec);
|
|
2931
|
+
let v = value;
|
|
2932
|
+
for (const f of bottom) v = multiply(v, f);
|
|
2933
|
+
for (const f of top) v = divide(v, f);
|
|
2934
|
+
return v;
|
|
2935
|
+
};
|
|
2936
|
+
const checkCalendar = (spec) => {
|
|
2937
|
+
const calendar = spec.find((slot) => entryOf(slot).calendar);
|
|
2938
|
+
if (calendar && (spec.length > 1 || calendar.exponent !== 1)) throw new UnitError("a Calendar Unit stands alone");
|
|
2939
|
+
return spec;
|
|
2940
|
+
};
|
|
2941
|
+
/**
|
|
2942
|
+
* The Unit of `a * b` or `a / b` (chapter 3, Quantity arithmetic): the left
|
|
2943
|
+
* operand's, with each of the right operand's slots converted into the
|
|
2944
|
+
* left's Unit for that slot, its exponents added, or kept when the left has
|
|
2945
|
+
* none.
|
|
2946
|
+
*/
|
|
2947
|
+
const combineSlots = (a, b, op) => {
|
|
2948
|
+
const slots = a.map((slot) => ({ ...slot }));
|
|
2949
|
+
for (const slot of b) {
|
|
2950
|
+
const exponent = op === "multiply" ? slot.exponent : -slot.exponent;
|
|
2951
|
+
const kind = entryOf(slot).kind;
|
|
2952
|
+
const left = slots.find((s) => entryOf(s).kind === kind);
|
|
2953
|
+
if (left) left.exponent += exponent;
|
|
2954
|
+
else slots.push({
|
|
2955
|
+
unit: slot.unit,
|
|
2956
|
+
exponent
|
|
2957
|
+
});
|
|
2958
|
+
}
|
|
2959
|
+
return ownUnit(checkCalendar(ordered(slots)));
|
|
2960
|
+
};
|
|
2961
|
+
let combinations = /* @__PURE__ */ new WeakMap();
|
|
2962
|
+
let combinationCount = 0;
|
|
2963
|
+
/** Reuse combinations of owned Units, retaining at most 256 results. */
|
|
2964
|
+
const combine = (a, b, op) => {
|
|
2965
|
+
if (!owned.has(a) || !owned.has(b)) return combineSlots(a, b, op);
|
|
2966
|
+
const cached = combinations.get(a)?.get(b)?.[op];
|
|
2967
|
+
if (cached) return cached;
|
|
2968
|
+
const result = combineSlots(a, b, op);
|
|
2969
|
+
if (combinationCount === 256) {
|
|
2970
|
+
combinations = /* @__PURE__ */ new WeakMap();
|
|
2971
|
+
combinationCount = 0;
|
|
2972
|
+
}
|
|
2973
|
+
let right = combinations.get(a);
|
|
2974
|
+
if (!right) {
|
|
2975
|
+
right = /* @__PURE__ */ new WeakMap();
|
|
2976
|
+
combinations.set(a, right);
|
|
2977
|
+
}
|
|
2978
|
+
const pair = right.get(b) ?? {};
|
|
2979
|
+
pair[op] = result;
|
|
2980
|
+
right.set(b, pair);
|
|
2981
|
+
combinationCount++;
|
|
2982
|
+
return result;
|
|
2983
|
+
};
|
|
2984
|
+
/** The Unit of `q ^ n`: each exponent times `n`. */
|
|
2985
|
+
const powerOf = (spec, n) => ownUnit(checkCalendar(spec.map((slot) => ({
|
|
2986
|
+
unit: slot.unit,
|
|
2987
|
+
exponent: slot.exponent * n
|
|
2988
|
+
}))));
|
|
2989
|
+
//#endregion
|
|
2990
|
+
//#region src/values.ts
|
|
2991
|
+
const valueToken = Symbol("Value");
|
|
2992
|
+
const SAFE = BigInt(Number.MAX_SAFE_INTEGER);
|
|
2993
|
+
const frozenParts = (parts) => Object.freeze({
|
|
2994
|
+
coefficient: parts.coefficient,
|
|
2995
|
+
exponent: parts.exponent,
|
|
2996
|
+
negative: parts.negative && parts.coefficient !== 0n
|
|
2997
|
+
});
|
|
2998
|
+
const decimalToken = Symbol("Decimal");
|
|
2999
|
+
let makeValue;
|
|
3000
|
+
let extendListValue;
|
|
3001
|
+
let editListValue;
|
|
3002
|
+
let editMapValue;
|
|
3003
|
+
let makeDecimal;
|
|
3004
|
+
let makeSmallDecimal;
|
|
3005
|
+
/** Internal: a Decimal's cached, immutable arithmetic representation. */
|
|
3006
|
+
let decimalParts;
|
|
3007
|
+
/**
|
|
3008
|
+
* Internal: a Decimal's value as a JS number when it is a safe integer
|
|
3009
|
+
* written with exponent 0, or NaN. The fast paths compute on it directly.
|
|
3010
|
+
*/
|
|
3011
|
+
let smallInteger;
|
|
3012
|
+
let isDecimal;
|
|
3013
|
+
var Decimal = class Decimal {
|
|
3014
|
+
#canonical;
|
|
3015
|
+
#parts;
|
|
3016
|
+
#small;
|
|
3017
|
+
constructor(token, canonical, parts, small) {
|
|
3018
|
+
if (token !== decimalToken) invalidValue("Use a numeric constructor");
|
|
3019
|
+
this.#canonical = canonical;
|
|
3020
|
+
this.#parts = parts && frozenParts(parts);
|
|
3021
|
+
this.#small = small;
|
|
3022
|
+
Object.freeze(this);
|
|
3023
|
+
}
|
|
3024
|
+
static {
|
|
3025
|
+
isDecimal = (input) => typeof input === "object" && input !== null && #small in input;
|
|
3026
|
+
makeDecimal = (canonical, parts) => new Decimal(decimalToken, canonical, parts, parts.exponent === 0 && parts.coefficient <= SAFE ? Number(parts.coefficient) * (parts.negative ? -1 : 1) + 0 : NaN);
|
|
3027
|
+
makeSmallDecimal = (n) => new Decimal(decimalToken, void 0, void 0, n);
|
|
3028
|
+
decimalParts = (decimal) => decimal.#parts ??= frozenParts({
|
|
3029
|
+
coefficient: BigInt(Math.abs(decimal.#small)),
|
|
3030
|
+
exponent: 0,
|
|
3031
|
+
negative: decimal.#small < 0
|
|
3032
|
+
});
|
|
3033
|
+
smallInteger = (decimal) => decimal.#small;
|
|
3034
|
+
}
|
|
3035
|
+
toString() {
|
|
3036
|
+
return this.#canonical ??= String(this.#small);
|
|
3037
|
+
}
|
|
3038
|
+
toBigInt() {
|
|
3039
|
+
const parts = decimalParts(this);
|
|
3040
|
+
if (!isInteger(parts)) invalidValue("Decimal is not an integer");
|
|
3041
|
+
return integerOf(parts);
|
|
3042
|
+
}
|
|
3043
|
+
toNumberLossy() {
|
|
3044
|
+
return Number(this.toString());
|
|
3045
|
+
}
|
|
3046
|
+
};
|
|
3047
|
+
/** Immutable, opaque value. Host code uses the named constructors. */
|
|
3048
|
+
var Value = class Value {
|
|
3049
|
+
#data;
|
|
3050
|
+
kind;
|
|
3051
|
+
constructor(token, kind, payload) {
|
|
3052
|
+
if (token !== valueToken) invalidValue("Use a named Value constructor");
|
|
3053
|
+
this.kind = kind;
|
|
3054
|
+
this.#data = payload;
|
|
3055
|
+
Object.freeze(this);
|
|
3056
|
+
}
|
|
3057
|
+
static {
|
|
3058
|
+
makeValue = (kind, payload) => new Value(valueToken, kind, payload);
|
|
3059
|
+
editListValue = (current, i, value) => makeValue("list", current.#data.set(i, value));
|
|
3060
|
+
editMapValue = (current, key, value) => {
|
|
3061
|
+
const storage = current.#data;
|
|
3062
|
+
const next = storage.set(key, value);
|
|
3063
|
+
return next === storage ? current : makeValue("map", next);
|
|
3064
|
+
};
|
|
3065
|
+
extendListValue = (current, part, prepend, all) => {
|
|
3066
|
+
const storage = current.#data;
|
|
3067
|
+
const added = all ? part.#data : void 0;
|
|
3068
|
+
const result = storage.extend(added?.length ?? 1, (i) => added ? added.index(i) : part, prepend);
|
|
3069
|
+
return result === storage ? current : makeValue("list", result);
|
|
3070
|
+
};
|
|
3071
|
+
}
|
|
3072
|
+
static isValue(input) {
|
|
3073
|
+
return typeof input === "object" && input !== null && #data in input;
|
|
3074
|
+
}
|
|
3075
|
+
asText() {
|
|
3076
|
+
return this.kind === "text" ? this.#data : void 0;
|
|
3077
|
+
}
|
|
3078
|
+
asBool() {
|
|
3079
|
+
return this.kind === "boolean" ? this.#data : void 0;
|
|
3080
|
+
}
|
|
3081
|
+
asDecimal() {
|
|
3082
|
+
return this.kind === "number" ? this.#data : void 0;
|
|
3083
|
+
}
|
|
3084
|
+
/** A Quantity's number and its Unit in normal form, as the Host reads it. */
|
|
3085
|
+
asQuantity() {
|
|
3086
|
+
if (this.kind !== "quantity") return;
|
|
3087
|
+
const q = this.#data;
|
|
3088
|
+
return {
|
|
3089
|
+
number: q.number,
|
|
3090
|
+
unit: unitText(q.unit)
|
|
3091
|
+
};
|
|
3092
|
+
}
|
|
3093
|
+
/** The Abstract Machine's view of a Quantity: its Unit's slots. */
|
|
3094
|
+
asQuantityRef() {
|
|
3095
|
+
return this.kind === "quantity" ? this.#data : void 0;
|
|
3096
|
+
}
|
|
3097
|
+
/** An Instant as epoch microseconds. */
|
|
3098
|
+
asInstant() {
|
|
3099
|
+
return this.kind === "instant" ? this.#data : void 0;
|
|
3100
|
+
}
|
|
3101
|
+
/** A Civil Date's fields; a date-only value has no time fields. */
|
|
3102
|
+
asCivilDate() {
|
|
3103
|
+
return this.kind === "civil date" ? civilFields(this.#data) : void 0;
|
|
3104
|
+
}
|
|
3105
|
+
/** The Abstract Machine's view of a Civil Date. */
|
|
3106
|
+
civilRef() {
|
|
3107
|
+
return this.kind === "civil date" ? this.#data : void 0;
|
|
3108
|
+
}
|
|
3109
|
+
/** A copy of the bytes. */
|
|
3110
|
+
asBytes() {
|
|
3111
|
+
return this.kind === "bytes" ? this.#data.slice() : void 0;
|
|
3112
|
+
}
|
|
3113
|
+
/** The Abstract Machine's view of Bytes, which it never writes to. */
|
|
3114
|
+
bytesView() {
|
|
3115
|
+
return this.kind === "bytes" ? this.#data : void 0;
|
|
3116
|
+
}
|
|
3117
|
+
asRange() {
|
|
3118
|
+
if (this.kind !== "range") return;
|
|
3119
|
+
const [from, to] = this.#data;
|
|
3120
|
+
return {
|
|
3121
|
+
from,
|
|
3122
|
+
to
|
|
3123
|
+
};
|
|
3124
|
+
}
|
|
3125
|
+
/** A Function Value's Home Script, its only Host-visible read. */
|
|
3126
|
+
homeScript() {
|
|
3127
|
+
return this.kind === "function" ? this.#data.home : void 0;
|
|
3128
|
+
}
|
|
3129
|
+
/** A Text Pattern's canonical source, for display. */
|
|
3130
|
+
patternSource() {
|
|
3131
|
+
return this.kind === "pattern" ? this.#data.source : void 0;
|
|
3132
|
+
}
|
|
3133
|
+
asPattern() {
|
|
3134
|
+
return this.kind === "pattern" ? this.#data : void 0;
|
|
3135
|
+
}
|
|
3136
|
+
/** The Host Object handle this value stands for (chapter 9). */
|
|
3137
|
+
asObject() {
|
|
3138
|
+
return this.kind === "object" ? this.#data.handle.handle : void 0;
|
|
3139
|
+
}
|
|
3140
|
+
/** A Host Object's kind, id and handle. */
|
|
3141
|
+
asObjectRef() {
|
|
3142
|
+
return this.kind === "object" ? this.#data : void 0;
|
|
3143
|
+
}
|
|
3144
|
+
/** The Abstract Machine's view of a Function Value. */
|
|
3145
|
+
asFunction() {
|
|
3146
|
+
return this.kind === "function" ? this.#data : void 0;
|
|
3147
|
+
}
|
|
3148
|
+
get length() {
|
|
3149
|
+
return this.kind === "list" ? this.#data.length : 0;
|
|
3150
|
+
}
|
|
3151
|
+
index(i) {
|
|
3152
|
+
if (this.kind !== "list" || !Number.isInteger(i) || i < 1) return nothing;
|
|
3153
|
+
return this.#data.index(i - 1) ?? nothing;
|
|
3154
|
+
}
|
|
3155
|
+
get(key) {
|
|
3156
|
+
const nfc = normalizeNFC(key);
|
|
3157
|
+
return this.kind === "map" ? this.#data.get(nfc) ?? nothing : nothing;
|
|
3158
|
+
}
|
|
3159
|
+
/** Internal: the frozen pairs themselves, without copying. */
|
|
3160
|
+
mapPairs() {
|
|
3161
|
+
return this.kind === "map" ? this.#data.pairs() : void 0;
|
|
3162
|
+
}
|
|
3163
|
+
get mapSize() {
|
|
3164
|
+
return this.kind === "map" ? this.#data.length : 0;
|
|
3165
|
+
}
|
|
3166
|
+
hasKey(key) {
|
|
3167
|
+
return this.kind === "map" && this.#data.has(normalizeNFC(key));
|
|
3168
|
+
}
|
|
3169
|
+
entries() {
|
|
3170
|
+
return this.kind === "map" ? this.#data.pairs().map(([k, v]) => [k, v]) : [];
|
|
3171
|
+
}
|
|
3172
|
+
equals(other) {
|
|
3173
|
+
requireValue(other);
|
|
3174
|
+
const proven = /* @__PURE__ */ new Map();
|
|
3175
|
+
const pending = [[
|
|
3176
|
+
this,
|
|
3177
|
+
other,
|
|
3178
|
+
false
|
|
3179
|
+
]];
|
|
3180
|
+
while (pending.length) {
|
|
3181
|
+
const [left, right, finish] = pending.pop();
|
|
3182
|
+
if (finish) {
|
|
3183
|
+
let set = proven.get(left);
|
|
3184
|
+
if (!set) {
|
|
3185
|
+
set = /* @__PURE__ */ new Set();
|
|
3186
|
+
proven.set(left, set);
|
|
3187
|
+
}
|
|
3188
|
+
set.add(right);
|
|
3189
|
+
continue;
|
|
3190
|
+
}
|
|
3191
|
+
if (left === right || proven.get(left)?.has(right)) continue;
|
|
3192
|
+
if (left.kind !== right.kind) return false;
|
|
3193
|
+
switch (left.kind) {
|
|
3194
|
+
case "nothing": break;
|
|
3195
|
+
case "text":
|
|
3196
|
+
case "boolean":
|
|
3197
|
+
case "instant":
|
|
3198
|
+
if (left.#data !== right.#data) return false;
|
|
3199
|
+
break;
|
|
3200
|
+
case "number":
|
|
3201
|
+
if (numericIdentity(left.asDecimal()) !== numericIdentity(right.asDecimal())) return false;
|
|
3202
|
+
break;
|
|
3203
|
+
case "list":
|
|
3204
|
+
if (left.length !== right.length) return false;
|
|
3205
|
+
pending.push([
|
|
3206
|
+
left,
|
|
3207
|
+
right,
|
|
3208
|
+
true
|
|
3209
|
+
]);
|
|
3210
|
+
for (let i = 1; i <= left.length; i++) pending.push([
|
|
3211
|
+
left.index(i),
|
|
3212
|
+
right.index(i),
|
|
3213
|
+
false
|
|
3214
|
+
]);
|
|
3215
|
+
break;
|
|
3216
|
+
case "pattern":
|
|
3217
|
+
if (left.patternSource() !== right.patternSource()) return false;
|
|
3218
|
+
break;
|
|
3219
|
+
case "civil date": {
|
|
3220
|
+
const a = left.#data;
|
|
3221
|
+
const b = right.#data;
|
|
3222
|
+
if (a.year !== b.year || a.month !== b.month || a.day !== b.day || a.us !== b.us) return false;
|
|
3223
|
+
break;
|
|
3224
|
+
}
|
|
3225
|
+
case "bytes":
|
|
3226
|
+
if (compareBytes(left.#data, right.#data)) return false;
|
|
3227
|
+
break;
|
|
3228
|
+
case "quantity":
|
|
3229
|
+
if (!quantitiesEqual(left.asQuantityRef(), right.asQuantityRef())) return false;
|
|
3230
|
+
break;
|
|
3231
|
+
case "range": {
|
|
3232
|
+
const a = left.asRange();
|
|
3233
|
+
const b = right.asRange();
|
|
3234
|
+
pending.push([
|
|
3235
|
+
left,
|
|
3236
|
+
right,
|
|
3237
|
+
true
|
|
3238
|
+
], [
|
|
3239
|
+
a.from,
|
|
3240
|
+
b.from,
|
|
3241
|
+
false
|
|
3242
|
+
], [
|
|
3243
|
+
a.to,
|
|
3244
|
+
b.to,
|
|
3245
|
+
false
|
|
3246
|
+
]);
|
|
3247
|
+
break;
|
|
3248
|
+
}
|
|
3249
|
+
case "object":
|
|
3250
|
+
if (left.asObjectRef().handle !== right.asObjectRef().handle) return false;
|
|
3251
|
+
break;
|
|
3252
|
+
case "function": {
|
|
3253
|
+
const a = left.asFunction();
|
|
3254
|
+
const b = right.asFunction();
|
|
3255
|
+
if (a.home !== b.home || a.identity !== b.identity || a.captures.length !== b.captures.length) return false;
|
|
3256
|
+
pending.push([
|
|
3257
|
+
left,
|
|
3258
|
+
right,
|
|
3259
|
+
true
|
|
3260
|
+
]);
|
|
3261
|
+
a.captures.forEach(([, v], i) => pending.push([
|
|
3262
|
+
v,
|
|
3263
|
+
b.captures[i][1],
|
|
3264
|
+
false
|
|
3265
|
+
]));
|
|
3266
|
+
break;
|
|
3267
|
+
}
|
|
3268
|
+
case "map": {
|
|
3269
|
+
const rhs = new Map(right.entries());
|
|
3270
|
+
const entries = left.#data.pairs();
|
|
3271
|
+
if (entries.length !== rhs.size) return false;
|
|
3272
|
+
pending.push([
|
|
3273
|
+
left,
|
|
3274
|
+
right,
|
|
3275
|
+
true
|
|
3276
|
+
]);
|
|
3277
|
+
for (const [k, v] of entries) {
|
|
3278
|
+
const match = rhs.get(k);
|
|
3279
|
+
if (!match) return false;
|
|
3280
|
+
pending.push([
|
|
3281
|
+
v,
|
|
3282
|
+
match,
|
|
3283
|
+
false
|
|
3284
|
+
]);
|
|
3285
|
+
}
|
|
3286
|
+
break;
|
|
3287
|
+
}
|
|
3288
|
+
}
|
|
3289
|
+
}
|
|
3290
|
+
return true;
|
|
3291
|
+
}
|
|
3292
|
+
toString() {
|
|
3293
|
+
const pending = [this];
|
|
3294
|
+
const output = [];
|
|
3295
|
+
while (pending.length) {
|
|
3296
|
+
const next = pending.pop();
|
|
3297
|
+
if (typeof next === "string") {
|
|
3298
|
+
output.push(next);
|
|
3299
|
+
continue;
|
|
3300
|
+
}
|
|
3301
|
+
switch (next.kind) {
|
|
3302
|
+
case "nothing":
|
|
3303
|
+
output.push("nothing");
|
|
3304
|
+
break;
|
|
3305
|
+
case "boolean":
|
|
3306
|
+
output.push(next.#data ? "true" : "false");
|
|
3307
|
+
break;
|
|
3308
|
+
case "number":
|
|
3309
|
+
output.push(next.asDecimal().toString());
|
|
3310
|
+
break;
|
|
3311
|
+
case "text":
|
|
3312
|
+
output.push(displayText(next.#data));
|
|
3313
|
+
break;
|
|
3314
|
+
case "list": {
|
|
3315
|
+
output.push("[");
|
|
3316
|
+
pending.push("]");
|
|
3317
|
+
const items = next.#data;
|
|
3318
|
+
for (let i = items.length - 1; i >= 0; i--) {
|
|
3319
|
+
if (i < items.length - 1) pending.push(", ");
|
|
3320
|
+
pending.push(items.index(i));
|
|
3321
|
+
}
|
|
3322
|
+
break;
|
|
3323
|
+
}
|
|
3324
|
+
case "range": {
|
|
3325
|
+
const { from, to } = next.asRange();
|
|
3326
|
+
pending.push(to, "..", from);
|
|
3327
|
+
break;
|
|
3328
|
+
}
|
|
3329
|
+
case "pattern":
|
|
3330
|
+
output.push(next.patternSource());
|
|
3331
|
+
break;
|
|
3332
|
+
case "instant":
|
|
3333
|
+
output.push(formatInstant(next.#data));
|
|
3334
|
+
break;
|
|
3335
|
+
case "civil date":
|
|
3336
|
+
output.push(civilText(next.#data));
|
|
3337
|
+
break;
|
|
3338
|
+
case "bytes":
|
|
3339
|
+
output.push(bytesDisplay(next.#data));
|
|
3340
|
+
break;
|
|
3341
|
+
case "quantity": {
|
|
3342
|
+
const q = next.asQuantityRef();
|
|
3343
|
+
const n = q.number.toString();
|
|
3344
|
+
output.push(`${n} ${unitText(q.unit, n)}`);
|
|
3345
|
+
break;
|
|
3346
|
+
}
|
|
3347
|
+
case "object": {
|
|
3348
|
+
const o = next.asObjectRef();
|
|
3349
|
+
output.push(`<object ${o.kind} ${displayText(o.id)}>`);
|
|
3350
|
+
break;
|
|
3351
|
+
}
|
|
3352
|
+
case "function": {
|
|
3353
|
+
const fn = next.asFunction();
|
|
3354
|
+
output.push(`<function ${fn.displayHome ?? fn.home}:${fn.place}`);
|
|
3355
|
+
pending.push(">");
|
|
3356
|
+
if (fn.captures.length) pending.push(makeValue("map", MapStorage.copy(fn.captures)), " ");
|
|
3357
|
+
break;
|
|
3358
|
+
}
|
|
3359
|
+
case "map": {
|
|
3360
|
+
output.push("{");
|
|
3361
|
+
pending.push("}");
|
|
3362
|
+
const entries = next.#data.pairs();
|
|
3363
|
+
for (let i = entries.length - 1; i >= 0; i--) {
|
|
3364
|
+
const [k, v] = entries[i];
|
|
3365
|
+
if (i < entries.length - 1) pending.push(", ");
|
|
3366
|
+
pending.push(v, `${displayKey(k)}: `);
|
|
3367
|
+
}
|
|
3368
|
+
break;
|
|
3369
|
+
}
|
|
3370
|
+
}
|
|
3371
|
+
}
|
|
3372
|
+
return output.join("");
|
|
3373
|
+
}
|
|
3374
|
+
};
|
|
3375
|
+
const requireValue = (value) => {
|
|
3376
|
+
if (!Value.isValue(value)) invalidValue("Expected a Value from a named constructor");
|
|
3377
|
+
};
|
|
3378
|
+
const nothing = makeValue("nothing", void 0);
|
|
3379
|
+
const bool = (b) => {
|
|
3380
|
+
if (typeof b !== "boolean") invalidValue("Boolean must be true or false");
|
|
3381
|
+
return makeValue("boolean", b);
|
|
3382
|
+
};
|
|
3383
|
+
const text = (s) => makeValue("text", normalizeNFC(s));
|
|
3384
|
+
const trimWhiteSpace = (s) => {
|
|
3385
|
+
const boundaries = characterBoundaries(s);
|
|
3386
|
+
let first = 0, last = boundaries.length - 1;
|
|
3387
|
+
while (first < last && isWhiteSpace(s.codePointAt(boundaries[first]))) first++;
|
|
3388
|
+
while (last > first && isWhiteSpace(s.codePointAt(boundaries[last - 1]))) last--;
|
|
3389
|
+
return s.slice(boundaries[first], boundaries[last]);
|
|
3390
|
+
};
|
|
3391
|
+
/** Decimal digits of an unsigned number-syntax literal, or null past chapter 3's limits. */
|
|
3392
|
+
const literalDigits = (s) => {
|
|
3393
|
+
if (s.startsWith("0x")) {
|
|
3394
|
+
const hex = s.slice(2).replace(/^0+/, "") || "0";
|
|
3395
|
+
if (hex.length > 29) return null;
|
|
3396
|
+
s = BigInt(`0x${hex}`).toString();
|
|
3397
|
+
}
|
|
3398
|
+
const [integer, fraction = ""] = s.split(".");
|
|
3399
|
+
const whole = integer.replace(/^0+/, "") || "0";
|
|
3400
|
+
return (whole + fraction).replace(/^0+/, "").length > 34 || whole.length > 34 || fraction.length > 6176 ? null : {
|
|
3401
|
+
whole,
|
|
3402
|
+
fraction
|
|
3403
|
+
};
|
|
3404
|
+
};
|
|
3405
|
+
const dec = (s) => {
|
|
3406
|
+
if (typeof s !== "string") invalidValue("Decimal must be text");
|
|
3407
|
+
s = trimWhiteSpace(s);
|
|
3408
|
+
if (!/^-?(?:\d+(?:\.\d+)?|0x[\dA-Fa-f]+)$/.test(s)) invalidValue("Invalid decimal syntax");
|
|
3409
|
+
const negative = s.startsWith("-");
|
|
3410
|
+
const digits = literalDigits(negative ? s.slice(1) : s);
|
|
3411
|
+
if (!digits) invalidValue("Decimal exceeds the value limits");
|
|
3412
|
+
const { whole, fraction } = digits;
|
|
3413
|
+
const zero = !/[1-9]/.test(whole + fraction);
|
|
3414
|
+
const canonical = `${negative && !zero ? "-" : ""}${whole}${fraction.length ? `.${fraction}` : ""}`;
|
|
3415
|
+
return makeValue("number", makeDecimal(canonical, {
|
|
3416
|
+
coefficient: BigInt(whole + fraction),
|
|
3417
|
+
exponent: fraction.length ? -fraction.length : 0,
|
|
3418
|
+
negative: negative && !zero
|
|
3419
|
+
}));
|
|
3420
|
+
};
|
|
3421
|
+
/** Internal: a checked arithmetic result, retaining its coefficient directly. */
|
|
3422
|
+
/** A safe integer as a number Value, without BigInt or text work. */
|
|
3423
|
+
const smallNumber = (n) => makeValue("number", makeSmallDecimal(n + 0));
|
|
3424
|
+
const canonicalNumber = (parts) => makeValue("number", makeDecimal(formatDec(parts), parts));
|
|
3425
|
+
/** ECMAScript's shortest round-trip digits, expanded without rounding. */
|
|
3426
|
+
const num = (n) => {
|
|
3427
|
+
if (typeof n !== "number" && typeof n !== "bigint") invalidValue("Number must be a number or bigint");
|
|
3428
|
+
if (typeof n === "number" && !Number.isFinite(n)) invalidValue("Number must be finite");
|
|
3429
|
+
const raw = n.toString();
|
|
3430
|
+
if (!/[Ee]/.test(raw)) return dec(raw);
|
|
3431
|
+
const [mantissa, exp] = raw.split("e");
|
|
3432
|
+
const negative = mantissa.startsWith("-");
|
|
3433
|
+
const [whole, fraction = ""] = (negative ? mantissa.slice(1) : mantissa).split(".");
|
|
3434
|
+
const digits = whole + fraction;
|
|
3435
|
+
const point = whole.length + Number(exp);
|
|
3436
|
+
const expanded = point <= 0 ? `0.${"0".repeat(-point)}${digits}` : point >= digits.length ? digits + "0".repeat(point - digits.length) : `${digits.slice(0, point)}.${digits.slice(point)}`;
|
|
3437
|
+
return dec((negative ? "-" : "") + expanded);
|
|
3438
|
+
};
|
|
3439
|
+
const numericIdentity = (d) => d.toString().replace(/(\.\d*?)0+$/, "$1").replace(/\.$/, "");
|
|
3440
|
+
const list = (...vs) => listValues(vs);
|
|
3441
|
+
/** Two numbers, or two Quantities of one dimension, kept as given (ADR 0034). */
|
|
3442
|
+
const range = (from, to) => {
|
|
3443
|
+
requireValue(from);
|
|
3444
|
+
requireValue(to);
|
|
3445
|
+
const numbers = from.kind === "number" && to.kind === "number";
|
|
3446
|
+
const quantities = from.kind === "quantity" && to.kind === "quantity" && sameDimension(from.asQuantityRef().unit, to.asQuantityRef().unit);
|
|
3447
|
+
if (!numbers && !quantities) invalidValue("A range needs two numbers, or two Quantities of one dimension");
|
|
3448
|
+
return makeValue("range", Object.freeze([from, to]));
|
|
3449
|
+
};
|
|
3450
|
+
/**
|
|
3451
|
+
* A Quantity of a number Value in a Unit spelled as a Script spells it, such
|
|
3452
|
+
* as `"kg"`. A Unit whose slots all drop, such as `"m/m"`, leaves the number.
|
|
3453
|
+
*/
|
|
3454
|
+
const quantity = (n, unit) => {
|
|
3455
|
+
requireValue(n);
|
|
3456
|
+
if (n.kind !== "number") invalidValue("A Quantity needs a number");
|
|
3457
|
+
if (typeof unit !== "string") invalidValue("A Quantity needs a Unit");
|
|
3458
|
+
let spec;
|
|
3459
|
+
try {
|
|
3460
|
+
spec = parseUnit(unit);
|
|
3461
|
+
} catch (error) {
|
|
3462
|
+
if (error instanceof UnitError) return invalidValue(`Not a Unit: ${unit}: ${error.message}`);
|
|
3463
|
+
throw error;
|
|
3464
|
+
}
|
|
3465
|
+
return spec.length ? quantityOf(n.asDecimal(), spec) : n;
|
|
3466
|
+
};
|
|
3467
|
+
/** A Quantity of a Unit already in Kind order; the Abstract Machine's constructor. */
|
|
3468
|
+
const quantityOf = (n, unit) => makeValue("quantity", Object.freeze({
|
|
3469
|
+
number: n,
|
|
3470
|
+
unit: ownUnit(unit)
|
|
3471
|
+
}));
|
|
3472
|
+
const quantitiesEqual = (a, b) => sameDimension(a.unit, b.unit) && compareDec(toBase(decimalParts(a.number), a.unit), toBase(decimalParts(b.number), b.unit)) === 0;
|
|
3473
|
+
/** An Instant, from epoch microseconds; a JS Date is never accepted. */
|
|
3474
|
+
const instant = (epochMicros) => {
|
|
3475
|
+
if (typeof epochMicros !== "bigint") invalidValue("An Instant needs epoch microseconds as a bigint");
|
|
3476
|
+
try {
|
|
3477
|
+
return instantOf(checkInstant(epochMicros));
|
|
3478
|
+
} catch (error) {
|
|
3479
|
+
if (error instanceof DateRangeError) return invalidValue(`An Instant ${error.message}`);
|
|
3480
|
+
throw error;
|
|
3481
|
+
}
|
|
3482
|
+
};
|
|
3483
|
+
const instantOf = (us) => makeValue("instant", us);
|
|
3484
|
+
/** A Civil Date, from its fields or from text in the `as civil date` form. */
|
|
3485
|
+
const civilDate = (f) => {
|
|
3486
|
+
if (typeof f === "string") {
|
|
3487
|
+
let c;
|
|
3488
|
+
try {
|
|
3489
|
+
c = parseCivil(f);
|
|
3490
|
+
} catch (error) {
|
|
3491
|
+
if (!(error instanceof DateRangeError)) throw error;
|
|
3492
|
+
}
|
|
3493
|
+
return c ? civilOf(c) : invalidValue(`Not a Civil Date: ${f}`);
|
|
3494
|
+
}
|
|
3495
|
+
if (typeof f !== "object" || f === null) invalidValue("A Civil Date needs fields or text");
|
|
3496
|
+
const c = civilFromFields(f);
|
|
3497
|
+
return typeof c === "string" ? invalidValue(`Not a Civil Date: ${c}`) : civilOf(c);
|
|
3498
|
+
};
|
|
3499
|
+
const civilOf = (c) => makeValue("civil date", Object.freeze({ ...c }));
|
|
3500
|
+
/** Bytes, copied in. */
|
|
3501
|
+
const bytes = (b) => {
|
|
3502
|
+
if (!ArrayBuffer.isView(b) || Object.prototype.toString.call(b) !== "[object Uint8Array]") invalidValue("Bytes need a Uint8Array");
|
|
3503
|
+
return bytesOf(b.slice());
|
|
3504
|
+
};
|
|
3505
|
+
/** Bytes the Abstract Machine made, and never writes to again. */
|
|
3506
|
+
const bytesOf = (b) => makeValue("bytes", b);
|
|
3507
|
+
/** Bytes ordered byte by byte, unsigned, with a prefix first. */
|
|
3508
|
+
const compareBytes = (a, b) => {
|
|
3509
|
+
for (let i = 0; i < Math.min(a.length, b.length); i++) if (a[i] !== b[i]) return a[i] < b[i] ? -1 : 1;
|
|
3510
|
+
return a.length === b.length ? 0 : a.length < b.length ? -1 : 1;
|
|
3511
|
+
};
|
|
3512
|
+
/** Bytes' display form, their `<<…>>` build: `<<0x0D, 0x0A>>`. */
|
|
3513
|
+
const bytesDisplay = (b) => `<<${Array.from(b, (x) => `0x${x.toString(16).toUpperCase().padStart(2, "0")}`).join(", ")}>>`;
|
|
3514
|
+
/** A Text Pattern value; only the Abstract Machine makes one. */
|
|
3515
|
+
const patternValue = (ref) => makeValue("pattern", Object.freeze({ ...ref }));
|
|
3516
|
+
/** A Host Object value; only a Group makes one. */
|
|
3517
|
+
const objectValue = (ref) => makeValue("object", Object.freeze({ ...ref }));
|
|
3518
|
+
/** A Function Value; only the Abstract Machine makes one. */
|
|
3519
|
+
const functionValue = (ref) => makeValue("function", Object.freeze({
|
|
3520
|
+
...ref,
|
|
3521
|
+
captures: Object.freeze([...ref.captures])
|
|
3522
|
+
}));
|
|
3523
|
+
const listValues = (vs) => {
|
|
3524
|
+
vs.forEach(requireValue);
|
|
3525
|
+
return makeValue("list", ListStorage.copy(vs));
|
|
3526
|
+
};
|
|
3527
|
+
/** Internal List growth; the operation validates both operands' kinds. */
|
|
3528
|
+
const extendList = (current, part, prepend, all) => extendListValue(current, part, prepend, all);
|
|
3529
|
+
/** Internal: replace or delete one existing List item, zero-based. */
|
|
3530
|
+
const listWithItem = (v, i, value) => editListValue(v, i, value);
|
|
3531
|
+
/**
|
|
3532
|
+
* Internal: a Map with one normalised key set, or removed when `value` is
|
|
3533
|
+
* undefined. The other pairs are already checked and frozen, so they're shared.
|
|
3534
|
+
*/
|
|
3535
|
+
const mapWithEntry = (m, nfc, value) => editMapValue(m, nfc, value);
|
|
3536
|
+
const map = (input) => {
|
|
3537
|
+
if (input === null || input === void 0 || typeof input[Symbol.iterator] !== "function") invalidValue("Map requires ordered entries");
|
|
3538
|
+
const seen = /* @__PURE__ */ new Set();
|
|
3539
|
+
const pairs = [];
|
|
3540
|
+
for (const entry of input) {
|
|
3541
|
+
if (!Array.isArray(entry) || entry.length !== 2) invalidValue("Map entries must be key/Value pairs");
|
|
3542
|
+
const [key, value] = entry;
|
|
3543
|
+
const nfc = normalizeNFC(key);
|
|
3544
|
+
requireValue(value);
|
|
3545
|
+
if (seen.has(nfc)) invalidValue(`Duplicate map key: ${displayText(nfc)}`);
|
|
3546
|
+
seen.add(nfc);
|
|
3547
|
+
pairs.push([nfc, value]);
|
|
3548
|
+
}
|
|
3549
|
+
return makeValue("map", MapStorage.copy(pairs));
|
|
3550
|
+
};
|
|
3551
|
+
const record = (input) => {
|
|
3552
|
+
if (typeof input !== "object" || input === null || ![null, Object.prototype].includes(Object.getPrototypeOf(input))) invalidValue("Record requires a plain object");
|
|
3553
|
+
const pairs = Object.entries(input);
|
|
3554
|
+
for (const [key] of pairs) {
|
|
3555
|
+
const n = Number(key);
|
|
3556
|
+
if (Number.isInteger(n) && n >= 0 && n < 4294967295 && String(n) === key) invalidValue("Record has an integer-like key; use map");
|
|
3557
|
+
}
|
|
3558
|
+
return map(pairs);
|
|
3559
|
+
};
|
|
3560
|
+
const hiddenCodePoint = (cp) => cp <= 31 || cp >= 127 && cp <= 159 || cp === 1564 || cp === 8206 || cp === 8207 || cp >= 8232 && cp <= 8238 || cp >= 8294 && cp <= 8297 || cp === 65279;
|
|
3561
|
+
const quoteOrHidden = /[\u0000-\u001f"\u007f-\u009f\u061c\u200e\u200f\u2028-\u202e\u2066-\u2069\ufeff]/;
|
|
3562
|
+
const displayText = (s) => {
|
|
3563
|
+
if (!quoteOrHidden.test(s)) return `"${s}"`;
|
|
3564
|
+
const pieces = [];
|
|
3565
|
+
let run = "";
|
|
3566
|
+
const flush = () => {
|
|
3567
|
+
if (run) {
|
|
3568
|
+
pieces.push(`"${run}"`);
|
|
3569
|
+
run = "";
|
|
3570
|
+
}
|
|
3571
|
+
};
|
|
3572
|
+
for (const ch of s) {
|
|
3573
|
+
const cp = ch.codePointAt(0);
|
|
3574
|
+
if (cp === 34 || hiddenCodePoint(cp)) {
|
|
3575
|
+
flush();
|
|
3576
|
+
pieces.push(cp === 34 ? "quote" : cp === 10 ? "newline" : cp === 9 ? "tab" : `fromCodePoint(${cp})`);
|
|
3577
|
+
} else run += ch;
|
|
3578
|
+
}
|
|
3579
|
+
flush();
|
|
3580
|
+
return pieces.length ? pieces.join(" & ") : "\"\"";
|
|
3581
|
+
};
|
|
3582
|
+
const displayKey = (key) => {
|
|
3583
|
+
if (key !== "offer" && /^[A-Z_a-z]\w*$/.test(key)) return key;
|
|
3584
|
+
const display = displayText(key);
|
|
3585
|
+
return display.startsWith("\"") ? display : `"" & ${display}`;
|
|
3586
|
+
};
|
|
3587
|
+
/** Every Function reachable through a Host value must belong to its receiving Group. */
|
|
3588
|
+
const functionsBelongTo = (values, group) => {
|
|
3589
|
+
const work = [...values];
|
|
3590
|
+
const seen = /* @__PURE__ */ new Set();
|
|
3591
|
+
while (work.length) {
|
|
3592
|
+
const value = work.pop();
|
|
3593
|
+
if (seen.has(value)) continue;
|
|
3594
|
+
seen.add(value);
|
|
3595
|
+
if (value.kind === "function") {
|
|
3596
|
+
const fn = value.asFunction();
|
|
3597
|
+
if (fn.group !== group) return false;
|
|
3598
|
+
for (const [, capture] of fn.captures) work.push(capture);
|
|
3599
|
+
} else if (value.kind === "list") for (let i = 1; i <= value.length; i++) work.push(value.index(i));
|
|
3600
|
+
else if (value.kind === "map") for (const [, entry] of value.entries()) work.push(entry);
|
|
3601
|
+
}
|
|
3602
|
+
return true;
|
|
3603
|
+
};
|
|
3604
|
+
/**
|
|
3605
|
+
* Tooling's source form: the display form, with the substitutions that make it
|
|
3606
|
+
* source that reads back as an equal value with the same display form. Nothing
|
|
3607
|
+
* about it is normative (ADR 0028). An unreadable value keeps its display form.
|
|
3608
|
+
*/
|
|
3609
|
+
const sourceForm = (value) => {
|
|
3610
|
+
const pending = [value];
|
|
3611
|
+
const output = [];
|
|
3612
|
+
while (pending.length) {
|
|
3613
|
+
const next = pending.pop();
|
|
3614
|
+
if (typeof next === "string") {
|
|
3615
|
+
output.push(next);
|
|
3616
|
+
continue;
|
|
3617
|
+
}
|
|
3618
|
+
switch (next.kind) {
|
|
3619
|
+
case "text":
|
|
3620
|
+
output.push(sourceText(next.asText()));
|
|
3621
|
+
break;
|
|
3622
|
+
case "civil date":
|
|
3623
|
+
output.push(`(${displayText(next.toString())} as civil date)`);
|
|
3624
|
+
break;
|
|
3625
|
+
case "instant":
|
|
3626
|
+
output.push(`(${displayText(next.toString())} as instant)`);
|
|
3627
|
+
break;
|
|
3628
|
+
case "list":
|
|
3629
|
+
output.push("[");
|
|
3630
|
+
pending.push("]");
|
|
3631
|
+
for (let i = next.length; i >= 1; i--) {
|
|
3632
|
+
if (i < next.length) pending.push(", ");
|
|
3633
|
+
pending.push(next.index(i));
|
|
3634
|
+
}
|
|
3635
|
+
break;
|
|
3636
|
+
case "range": {
|
|
3637
|
+
const { from, to } = next.asRange();
|
|
3638
|
+
pending.push(to, "..", from);
|
|
3639
|
+
break;
|
|
3640
|
+
}
|
|
3641
|
+
case "map": {
|
|
3642
|
+
output.push("{");
|
|
3643
|
+
pending.push("}");
|
|
3644
|
+
const entries = next.entries();
|
|
3645
|
+
for (let i = entries.length - 1; i >= 0; i--) {
|
|
3646
|
+
const [k, v] = entries[i];
|
|
3647
|
+
if (i < entries.length - 1) pending.push(", ");
|
|
3648
|
+
pending.push(v, `${sourceKey(k)}: `);
|
|
3649
|
+
}
|
|
3650
|
+
break;
|
|
3651
|
+
}
|
|
3652
|
+
default: output.push(next.toString());
|
|
3653
|
+
}
|
|
3654
|
+
}
|
|
3655
|
+
return output.join("");
|
|
3656
|
+
};
|
|
3657
|
+
/** A value is readable when it contains no Function Value or Host Object. */
|
|
3658
|
+
const isReadable = (value) => {
|
|
3659
|
+
const work = [value];
|
|
3660
|
+
while (work.length) {
|
|
3661
|
+
const next = work.pop();
|
|
3662
|
+
if (next.kind === "function" || next.kind === "object") return false;
|
|
3663
|
+
if (next.kind === "list") for (let i = 1; i <= next.length; i++) work.push(next.index(i));
|
|
3664
|
+
else if (next.kind === "map") work.push(...next.entries().map(([, v]) => v));
|
|
3665
|
+
else if (next.kind === "range") {
|
|
3666
|
+
const { from, to } = next.asRange();
|
|
3667
|
+
work.push(from, to);
|
|
3668
|
+
}
|
|
3669
|
+
}
|
|
3670
|
+
return true;
|
|
3671
|
+
};
|
|
3672
|
+
const sourceText = (s) => {
|
|
3673
|
+
const display = displayText(s);
|
|
3674
|
+
return display === `"${s}"` ? display : backtickText(s);
|
|
3675
|
+
};
|
|
3676
|
+
const sourceKey = (key) => key !== "offer" && /^[A-Z_a-z]\w*$/.test(key) ? key : sourceText(key);
|
|
3677
|
+
const backtickText = (s) => {
|
|
3678
|
+
let out = "";
|
|
3679
|
+
const chars = [...s];
|
|
3680
|
+
chars.forEach((ch, i) => {
|
|
3681
|
+
const cp = ch.codePointAt(0);
|
|
3682
|
+
if (ch === "`" || ch === "\\" || ch === "$" && chars[i + 1] === "{") out += `\\${ch}`;
|
|
3683
|
+
else if (hiddenCodePoint(cp)) out += cp === 10 ? String.raw`\n` : cp === 9 ? String.raw`\t` : String.raw`\u{${cp.toString(16).toUpperCase()}}`;
|
|
3684
|
+
else out += ch;
|
|
3685
|
+
});
|
|
3686
|
+
return `\`${out}\``;
|
|
3687
|
+
};
|
|
3688
|
+
//#endregion
|
|
3689
|
+
//#region src/errors.ts
|
|
3690
|
+
var HostError = class extends Error {
|
|
3691
|
+
code;
|
|
3692
|
+
constructor(code, message = code) {
|
|
3693
|
+
super(message);
|
|
3694
|
+
this.code = code;
|
|
3695
|
+
this.name = "HostError";
|
|
3696
|
+
}
|
|
3697
|
+
};
|
|
3698
|
+
const invalidValue = (message) => {
|
|
3699
|
+
throw new HostError("invalid value", message);
|
|
3700
|
+
};
|
|
3701
|
+
/** A rejected Load (chapter 9): its diagnostics, in order. */
|
|
3702
|
+
var LoadError = class extends Error {
|
|
3703
|
+
diagnostics;
|
|
3704
|
+
constructor(diagnostics) {
|
|
3705
|
+
super(diagnostics.map((d) => `${d.code} at ${d.line}:${d.col}`).join(", "));
|
|
3706
|
+
this.diagnostics = diagnostics;
|
|
3707
|
+
this.name = "LoadError";
|
|
3708
|
+
}
|
|
3709
|
+
};
|
|
3710
|
+
/** Load shedding at a Delivery's call, not a bug (chapter 9, Deliveries). */
|
|
3711
|
+
var MailboxFull = class extends Error {
|
|
3712
|
+
name = "MailboxFull";
|
|
3713
|
+
};
|
|
3714
|
+
/**
|
|
3715
|
+
* A Script-level error as the Host sees it, such as a Request's `send failed`
|
|
3716
|
+
* or a `run end`'s error. Its `data` is a map, or Nothing. A `send failed`
|
|
3717
|
+
* also carries its `reason` from `data`.
|
|
3718
|
+
*/
|
|
3719
|
+
var ScriptError = class extends Error {
|
|
3720
|
+
code;
|
|
3721
|
+
data;
|
|
3722
|
+
reason;
|
|
3723
|
+
constructor(code, message, data = nothing) {
|
|
3724
|
+
super(message);
|
|
3725
|
+
this.code = code;
|
|
3726
|
+
this.data = data;
|
|
3727
|
+
this.name = "ScriptError";
|
|
3728
|
+
this.reason = code === "send failed" ? data.get("reason").asText() : void 0;
|
|
3729
|
+
}
|
|
3730
|
+
};
|
|
3731
|
+
/** The rejection of a Request whose receiver's Run ended without answering. */
|
|
3732
|
+
const sendFailed = (reason) => new ScriptError("send failed", `No answer came: the receiver's Run ended ${reason}`, map([["reason", text(reason)]]));
|
|
3733
|
+
const hostDetail = (error) => error instanceof Error ? `${error.name}: ${error.message}` : `the Host threw ${typeof error === "symbol" ? error.toString() : String(error)}`;
|
|
3734
|
+
//#endregion
|
|
3735
|
+
export { powerOf as $, parseInstantText as $t, listWithItem as A, mod as At, range as B, addMonths as Bt, hiddenCodePoint as C, decOf as Ct, isReadable as D, formatDec as Dt, isDecimal as E, divide as Et, num as F, subtract as Ft, sourceForm as G, civilUs as Gt, requireValue as H, civilDays as Ht, objectValue as I, withinLimits as It, UnitError as J, isInstant as Jt, text as K, dayOfYear as Kt, patternValue as L, DateRangeError as Lt, map as M, negate as Mt, mapWithEntry as N, powerInteger as Nt, list as O, integerOf as Ot, nothing as P, roundRatio as Pt, parseUnit as Q, parseInstant as Qt, quantity as R, US_PER_DAY as Rt, functionsBelongTo as S, compareDec as St, instantOf as T, div as Tt, smallInteger as U, civilOfDays as Ut, record as V, checkInstant as Vt, smallNumber as W, civilOfUs as Wt, fromBase as X, nowMicros as Xt, combine as Y, isoWeek as Yt, ownUnit as Z, parseCivil as Zt, dec as _, simpleFold as _t, hostDetail as a, diagnosticCodes as at, extendList as b, ArithmeticError as bt, Decimal as c, unitKinds as ct, bytes as d, characterBoundaries as dt, weekday as en, sameDimension as et, bytesOf as f, generalCategory as ft, compareBytes as g, scalarCount as gt, civilOf as h, normalizeNFC as ht, ScriptError as i, builtins as it, literalDigits as j, multiply as jt, listValues as k, isInteger as kt, Value as l, units as lt, civilDate as m, lower as mt, LoadError as n, unitEntry as nt, invalidValue as o, grammar as ot, canonicalNumber as p, isWhiteSpace as pt, trimWhiteSpace as q, formatInstant as qt, MailboxFull as r, unitText as rt, sendFailed as s, libraryExports as st, HostError as t, toBase as tt, bool as u, assertScalarText as ut, decimalParts as v, upper as vt, instant as w, digitsOf as wt, functionValue as x, add as xt, displayText as y, unicodeVersion as yt, quantityOf as z, US_PER_SECOND as zt };
|