@agentshouse/mdruntime 0.1.0-c49444f2a8fc6 → 0.1.0-c4d7cf2ec26a6
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/dist/acceptance.d.ts +6 -0
- package/dist/acceptance.d.ts.map +1 -0
- package/dist/acceptance.js +386 -0
- package/dist/actions.d.ts +20 -0
- package/dist/actions.d.ts.map +1 -0
- package/dist/actions.js +251 -0
- package/dist/adapter.d.ts +6 -0
- package/dist/adapter.d.ts.map +1 -1
- package/dist/bootstrap.js +1 -0
- package/dist/cell.d.ts +6 -0
- package/dist/cell.d.ts.map +1 -0
- package/dist/cell.js +9 -0
- package/dist/change.d.ts.map +1 -1
- package/dist/change.js +4 -2
- package/dist/chat-types.d.ts +5 -0
- package/dist/chat-types.d.ts.map +1 -0
- package/dist/chat-types.js +13 -0
- package/dist/client.d.ts +12 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +1 -0
- package/dist/compile.d.ts +5 -0
- package/dist/compile.d.ts.map +1 -1
- package/dist/compile.js +190 -59
- package/dist/connection.d.ts +5 -143
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +101 -5309
- package/dist/conversation-live.d.ts +136 -0
- package/dist/conversation-live.d.ts.map +1 -0
- package/dist/conversation-live.js +248 -0
- package/dist/conversation-row.d.ts.map +1 -1
- package/dist/conversation-row.js +7 -1
- package/dist/conversation.d.ts +22 -35
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js +827 -972
- package/dist/discovery.d.ts +10 -0
- package/dist/discovery.d.ts.map +1 -0
- package/dist/discovery.js +175 -0
- package/dist/durability.d.ts +9 -0
- package/dist/durability.d.ts.map +1 -1
- package/dist/figures.d.ts +49 -0
- package/dist/figures.d.ts.map +1 -0
- package/dist/figures.js +197 -0
- package/dist/holdings.d.ts +29 -0
- package/dist/holdings.d.ts.map +1 -0
- package/dist/holdings.js +95 -0
- package/dist/host.d.ts +1 -0
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +7 -4
- package/dist/index.d.ts +16 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/install.d.ts +56 -0
- package/dist/install.d.ts.map +1 -0
- package/dist/install.js +554 -0
- package/dist/lifecycle.d.ts +7 -0
- package/dist/lifecycle.d.ts.map +1 -0
- package/dist/lifecycle.js +268 -0
- package/dist/listing.d.ts +53 -0
- package/dist/listing.d.ts.map +1 -0
- package/dist/listing.js +176 -0
- package/dist/live.d.ts.map +1 -1
- package/dist/live.js +0 -2
- package/dist/locks.d.ts +9 -0
- package/dist/locks.d.ts.map +1 -0
- package/dist/locks.js +61 -0
- package/dist/log.d.ts +1 -0
- package/dist/log.d.ts.map +1 -1
- package/dist/lost.d.ts +5 -0
- package/dist/lost.d.ts.map +1 -0
- package/dist/lost.js +61 -0
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +1 -0
- package/dist/messages.d.ts +1 -1
- package/dist/messages.d.ts.map +1 -1
- package/dist/messages.js +3 -3
- package/dist/models.d.ts +14 -0
- package/dist/models.d.ts.map +1 -0
- package/dist/models.js +195 -0
- package/dist/observation.d.ts.map +1 -1
- package/dist/observation.js +12 -17
- package/dist/opened.js +3 -3
- package/dist/opening.d.ts +4 -0
- package/dist/opening.d.ts.map +1 -0
- package/dist/opening.js +57 -0
- package/dist/outcome.d.ts +4 -1
- package/dist/outcome.d.ts.map +1 -1
- package/dist/outcome.js +3 -0
- package/dist/parts.d.ts +1 -0
- package/dist/parts.d.ts.map +1 -1
- package/dist/parts.js +8 -0
- package/dist/paths.d.ts +1 -0
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +22 -0
- package/dist/preparation.d.ts +20 -0
- package/dist/preparation.d.ts.map +1 -0
- package/dist/preparation.js +226 -0
- package/dist/queries.d.ts +16 -0
- package/dist/queries.d.ts.map +1 -0
- package/dist/queries.js +272 -0
- package/dist/query.d.ts +10 -0
- package/dist/query.d.ts.map +1 -1
- package/dist/questions.d.ts +2 -0
- package/dist/questions.d.ts.map +1 -1
- package/dist/questions.js +5 -1
- package/dist/reach.d.ts +3 -1
- package/dist/reach.d.ts.map +1 -1
- package/dist/reach.js +11 -0
- package/dist/react.d.ts +7 -1
- package/dist/react.d.ts.map +1 -1
- package/dist/readiness.d.ts +0 -1
- package/dist/readiness.d.ts.map +1 -1
- package/dist/reads.d.ts +37 -0
- package/dist/reads.d.ts.map +1 -0
- package/dist/reads.js +171 -0
- package/dist/refusal.d.ts +5 -0
- package/dist/refusal.d.ts.map +1 -0
- package/dist/refusal.js +56 -0
- package/dist/replica.d.ts +1 -3
- package/dist/replica.d.ts.map +1 -1
- package/dist/replica.js +3 -2
- package/dist/room-draft.d.ts +1 -1
- package/dist/room-draft.d.ts.map +1 -1
- package/dist/room-draft.js +2 -2
- package/dist/room-drafts.d.ts +24 -0
- package/dist/room-drafts.d.ts.map +1 -0
- package/dist/room-drafts.js +217 -0
- package/dist/runtime.d.ts +43 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +1 -0
- package/dist/save.d.ts +5 -1
- package/dist/save.d.ts.map +1 -1
- package/dist/save.js +12 -14
- package/dist/saves.d.ts +70 -0
- package/dist/saves.d.ts.map +1 -0
- package/dist/saves.js +1005 -0
- package/dist/seed.d.ts +11 -2
- package/dist/seed.d.ts.map +1 -1
- package/dist/seed.js +71 -0
- package/dist/shared.d.ts +1 -6
- package/dist/shared.d.ts.map +1 -1
- package/dist/shared.js +13 -95
- package/dist/shown.d.ts +31 -0
- package/dist/shown.d.ts.map +1 -0
- package/dist/shown.js +292 -0
- package/dist/socket/admission.d.ts +7 -0
- package/dist/socket/admission.d.ts.map +1 -0
- package/dist/socket/admission.js +39 -0
- package/dist/socket/answers.d.ts +6 -0
- package/dist/socket/answers.d.ts.map +1 -0
- package/dist/socket/answers.js +20 -0
- package/dist/socket/lanes.d.ts +20 -0
- package/dist/socket/lanes.d.ts.map +1 -0
- package/dist/socket/lanes.js +77 -0
- package/dist/socket/reads.d.ts +10 -0
- package/dist/socket/reads.d.ts.map +1 -0
- package/dist/socket/reads.js +31 -0
- package/dist/socket/rooms.d.ts +44 -0
- package/dist/socket/rooms.d.ts.map +1 -0
- package/dist/socket/rooms.js +90 -0
- package/dist/socket/session.d.ts +39 -0
- package/dist/socket/session.d.ts.map +1 -0
- package/dist/socket/session.js +23 -0
- package/dist/socket.d.ts +70 -0
- package/dist/socket.d.ts.map +1 -0
- package/dist/socket.js +175 -0
- package/dist/source.d.ts.map +1 -1
- package/dist/source.js +5 -4
- package/dist/store/fences.d.ts +16 -0
- package/dist/store/fences.d.ts.map +1 -0
- package/dist/store/fences.js +26 -0
- package/dist/store/installs.d.ts +30 -0
- package/dist/store/installs.d.ts.map +1 -0
- package/dist/store/installs.js +34 -0
- package/dist/store/readiness.d.ts +10 -0
- package/dist/store/readiness.d.ts.map +1 -0
- package/dist/store/readiness.js +52 -0
- package/dist/store/records.d.ts +212 -0
- package/dist/store/records.d.ts.map +1 -0
- package/dist/store/records.js +431 -0
- package/dist/store/room-held.d.ts +8 -0
- package/dist/store/room-held.d.ts.map +1 -0
- package/dist/store/room-held.js +17 -0
- package/dist/store/space.d.ts +11 -0
- package/dist/store/space.d.ts.map +1 -0
- package/dist/store/space.js +41 -0
- package/dist/store/watchers.d.ts +17 -0
- package/dist/store/watchers.d.ts.map +1 -0
- package/dist/store/watchers.js +56 -0
- package/dist/store/writes.d.ts +24 -0
- package/dist/store/writes.d.ts.map +1 -0
- package/dist/store/writes.js +125 -0
- package/dist/store.d.ts +111 -206
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +142 -398
- package/dist/stored.d.ts +1 -1
- package/dist/stored.d.ts.map +1 -1
- package/dist/stored.js +25 -11
- package/dist/surface.d.ts +88 -0
- package/dist/surface.d.ts.map +1 -0
- package/dist/surface.js +223 -0
- package/dist/sync.d.ts +19 -0
- package/dist/sync.d.ts.map +1 -0
- package/dist/sync.js +532 -0
- package/dist/tables.d.ts +32 -4
- package/dist/tables.d.ts.map +1 -1
- package/dist/tables.js +42 -8
- package/dist/tallies.d.ts +18 -0
- package/dist/tallies.d.ts.map +1 -0
- package/dist/tallies.js +129 -0
- package/dist/wire.d.ts +8 -1
- package/dist/wire.d.ts.map +1 -1
- package/dist/wire.js +4 -0
- package/package.json +2 -2
package/dist/compile.js
CHANGED
|
@@ -3,11 +3,11 @@ import { binaryRecord } from './binary.js';
|
|
|
3
3
|
import { documentKey, pathOfKey, roomOfKey } from './rows.js';
|
|
4
4
|
import { FROM_START, MAXIMUM_WINDOW } from './windows.js';
|
|
5
5
|
const { all, any, exists, fragment, grouped, joined, listed } = sql;
|
|
6
|
-
const VISIBLE = (alias) => `${alias}.visible = 1 AND ${alias}.present = 1 AND ${alias}.queried = 1`;
|
|
6
|
+
export const VISIBLE = (alias) => `${alias}.visible = 1 AND ${alias}.present = 1 AND ${alias}.queried = 1`;
|
|
7
7
|
function located(alias) {
|
|
8
8
|
return fragment(`(SELECT k.locator FROM replica_keys k WHERE k.key = ${alias}.key)`);
|
|
9
9
|
}
|
|
10
|
-
function within(alias, path) {
|
|
10
|
+
export function within(alias, path) {
|
|
11
11
|
return fragment(`(${alias}.path = ? OR (${alias}.path >= ? AND ${alias}.path < ?))`, [
|
|
12
12
|
path,
|
|
13
13
|
`${path}/`,
|
|
@@ -116,7 +116,18 @@ const GROUP_TIES = {
|
|
|
116
116
|
locale: undefined,
|
|
117
117
|
localeOptions: undefined,
|
|
118
118
|
};
|
|
119
|
-
|
|
119
|
+
const GREATEST = { ...GROUP_ORDER, direction: 'desc', nulls: 'last' };
|
|
120
|
+
const TIMES = {
|
|
121
|
+
created: { value: 'd.created', instant: 'd.created_instant' },
|
|
122
|
+
updated: { value: "(d.change ->> '$.time')", instant: 'd.changed_instant' },
|
|
123
|
+
};
|
|
124
|
+
function subfolderOf(column, prefix) {
|
|
125
|
+
const root = prefix ?? '';
|
|
126
|
+
const base = root === '' ? '' : `${root}/`;
|
|
127
|
+
const rest = `substr(${column}, length(?) + 1)`;
|
|
128
|
+
return fragment(`(CASE WHEN ${column} = ? THEN NULL WHEN instr(${rest}, '/') = 0 THEN ${column} ELSE ? || substr(${rest}, 1, instr(${rest}, '/') - 1) END)`, [root, base, base, base, base]);
|
|
129
|
+
}
|
|
130
|
+
function keyTerm(key, ordering, index, prefix) {
|
|
120
131
|
if (key.of === 'field') {
|
|
121
132
|
const alias = `o${index}`;
|
|
122
133
|
return {
|
|
@@ -133,13 +144,37 @@ function keyTerm(key, ordering, index) {
|
|
|
133
144
|
], ''),
|
|
134
145
|
};
|
|
135
146
|
}
|
|
147
|
+
if (key.of === 'size') {
|
|
148
|
+
return {
|
|
149
|
+
term: {
|
|
150
|
+
ordering,
|
|
151
|
+
kind: fragment("(CASE WHEN d.bytes IS NULL THEN 'null' ELSE 'number' END)"),
|
|
152
|
+
value: fragment('d.bytes'),
|
|
153
|
+
},
|
|
154
|
+
join: null,
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
if (key.of === 'created' || key.of === 'updated') {
|
|
158
|
+
const { value, instant } = TIMES[key.of];
|
|
159
|
+
return {
|
|
160
|
+
term: {
|
|
161
|
+
ordering,
|
|
162
|
+
kind: fragment(`(CASE WHEN ${value} IS NULL THEN 'null' ELSE 'string' END)`),
|
|
163
|
+
value: fragment(value),
|
|
164
|
+
instant: fragment(instant),
|
|
165
|
+
},
|
|
166
|
+
join: null,
|
|
167
|
+
};
|
|
168
|
+
}
|
|
136
169
|
const expression = key.of === 'room'
|
|
137
170
|
? located('d')
|
|
138
171
|
: key.of === 'path'
|
|
139
172
|
? fragment('d.path')
|
|
140
173
|
: key.of === 'type'
|
|
141
174
|
? fragment('d.type')
|
|
142
|
-
:
|
|
175
|
+
: key.of === 'subfolder'
|
|
176
|
+
? subfolderOf('d.folder', prefix)
|
|
177
|
+
: fragment('d.folder');
|
|
143
178
|
return {
|
|
144
179
|
term: {
|
|
145
180
|
ordering,
|
|
@@ -160,16 +195,17 @@ function decoded(kind, value) {
|
|
|
160
195
|
return JSON.parse(value);
|
|
161
196
|
return null;
|
|
162
197
|
}
|
|
198
|
+
function sortedOf(kind, value, instant) {
|
|
199
|
+
return sql.sortValue(kind, decoded(kind, value), instant);
|
|
200
|
+
}
|
|
163
201
|
function sortedValue(row, index) {
|
|
164
|
-
|
|
165
|
-
return sql.sortValue(kind, decoded(kind, row[`v${index}`]), row[`i${index}`]);
|
|
202
|
+
return sortedOf(row[`k${index}`], row[`v${index}`], row[`i${index}`]);
|
|
166
203
|
}
|
|
167
204
|
function decodedKey(key, row, index) {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
return
|
|
171
|
-
|
|
172
|
-
return row[`v${index}`] ?? null;
|
|
205
|
+
const kind = row[`k${index}`];
|
|
206
|
+
if (key.of === 'field' && (kind === null || kind === undefined))
|
|
207
|
+
return undefined;
|
|
208
|
+
return sortedValue(row, index);
|
|
173
209
|
}
|
|
174
210
|
function instantOf(term) {
|
|
175
211
|
return term.instant ?? fragment('NULL');
|
|
@@ -277,8 +313,8 @@ function sectionsOf(sections, names) {
|
|
|
277
313
|
function documentOf(shape, room, row, linked) {
|
|
278
314
|
const path = row.path;
|
|
279
315
|
const type = row.type;
|
|
280
|
-
const fileId = row.file_id
|
|
281
|
-
const revision = row.revision
|
|
316
|
+
const fileId = row.file_id;
|
|
317
|
+
const revision = row.revision;
|
|
282
318
|
if (type === null) {
|
|
283
319
|
const binary = row.binary === null ? null : JSON.parse(row.binary);
|
|
284
320
|
const content = row.content ?? null;
|
|
@@ -291,11 +327,13 @@ function documentOf(shape, room, row, linked) {
|
|
|
291
327
|
binaryFile: binaryRecord(path, binary, revision ?? undefined),
|
|
292
328
|
}),
|
|
293
329
|
...(shape.markdown && content !== null ? { markdown: content } : {}),
|
|
330
|
+
...(shape.change ? { change: changeOf(row) } : {}),
|
|
294
331
|
...(shape.fileId ? { fileId } : {}),
|
|
295
332
|
...(shape.revision ? { revision } : {}),
|
|
333
|
+
...heldFacts(shape, row),
|
|
296
334
|
};
|
|
297
335
|
}
|
|
298
|
-
const read =
|
|
336
|
+
const read = shape.sections !== null || shape.preamble ? parse(row.content, path) : null;
|
|
299
337
|
const body = read?.ok === true ? read.document : null;
|
|
300
338
|
const fields = JSON.parse(row.fields ?? '{}');
|
|
301
339
|
return {
|
|
@@ -315,13 +353,19 @@ function documentOf(shape, room, row, linked) {
|
|
|
315
353
|
...(shape.preamble && body !== null ? { preamble: body.preamble } : {}),
|
|
316
354
|
...(shape.markdown ? { markdown: row.content } : {}),
|
|
317
355
|
...(shape.backlinks ? { backlinks: linked.get(documentKey(room, path)) ?? [] } : {}),
|
|
318
|
-
...(shape.change
|
|
319
|
-
? {
|
|
320
|
-
change: row.change === null ? null : JSON.parse(row.change),
|
|
321
|
-
}
|
|
322
|
-
: {}),
|
|
356
|
+
...(shape.change ? { change: changeOf(row) } : {}),
|
|
323
357
|
...(shape.fileId ? { fileId } : {}),
|
|
324
358
|
...(shape.revision ? { revision } : {}),
|
|
359
|
+
...heldFacts(shape, row),
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
function changeOf(row) {
|
|
363
|
+
return row.change === null ? null : JSON.parse(row.change);
|
|
364
|
+
}
|
|
365
|
+
function heldFacts(shape, row) {
|
|
366
|
+
return {
|
|
367
|
+
...(shape.size ? { size: row.bytes === null ? null : Number(row.bytes) } : {}),
|
|
368
|
+
...(shape.created ? { created: row.created } : {}),
|
|
325
369
|
};
|
|
326
370
|
}
|
|
327
371
|
function backlinksOf(connection, bound, rows) {
|
|
@@ -333,8 +377,8 @@ function backlinksOf(connection, bound, rows) {
|
|
|
333
377
|
held.push(row.path);
|
|
334
378
|
byKey.set(key, held);
|
|
335
379
|
}
|
|
380
|
+
const reach = reached(bound, 's');
|
|
336
381
|
for (const [key, targets] of byKey) {
|
|
337
|
-
const reach = reached(bound, 's');
|
|
338
382
|
const room = bound.rooms.find((one) => one.key === key).locator;
|
|
339
383
|
const found = connection.rows(`SELECT target, path, type, field FROM (SELECT l.target, s.path, s.type, l.field, ROW_NUMBER() OVER (PARTITION BY l.target ORDER BY s.path, l.field) AS rank FROM (SELECT DISTINCT doc, target, field FROM replica_links WHERE key = ? AND kind = 'field' AND target IN (SELECT value FROM json_each(?))) l JOIN replica_entries s ON s.id = l.doc AND ${VISIBLE('s')} WHERE ${reach.sql}) WHERE rank <= ? ORDER BY target, path, field`, [key, JSON.stringify(targets), ...reach.bind, MAXIMUM_WINDOW]);
|
|
340
384
|
for (const row of found) {
|
|
@@ -347,7 +391,7 @@ function backlinksOf(connection, bound, rows) {
|
|
|
347
391
|
return linked;
|
|
348
392
|
}
|
|
349
393
|
function documents(connection, bound, plan, shape, budget) {
|
|
350
|
-
const terms = shape.orderBy.map(({ key, options }, index) => keyTerm(key, orderingOf(options), index));
|
|
394
|
+
const terms = shape.orderBy.map(({ key, options }, index) => keyTerm(key, orderingOf(options), index, plan.root.pathPrefix));
|
|
351
395
|
const filter = filtered(bound, plan);
|
|
352
396
|
const cursor = plan.after?.values ?? null;
|
|
353
397
|
const room = located('d');
|
|
@@ -368,7 +412,7 @@ function documents(connection, bound, plan, shape, budget) {
|
|
|
368
412
|
? null
|
|
369
413
|
: sql.following(terms.map(({ term }, index) => sql.beyond(bound.collate, term, cursor[index])), tie);
|
|
370
414
|
const selected = joined([
|
|
371
|
-
fragment('SELECT d.id, d.key, d.path, d.type, d.binary, d.revision, d.fields, d.change, d.file_id'),
|
|
415
|
+
fragment('SELECT d.id, d.key, d.path, d.type, d.binary, d.revision, d.fields, d.change, d.file_id, d.bytes, d.created'),
|
|
372
416
|
...terms.map(({ term }, index) => joined([
|
|
373
417
|
fragment(`, ${term.kind.sql} AS k${index}`, term.kind.bind),
|
|
374
418
|
fragment(`, ${term.value.sql} AS v${index}`, term.value.bind),
|
|
@@ -437,16 +481,18 @@ function withContent(connection, rows, budget) {
|
|
|
437
481
|
.map((row) => [row.id, row.content]));
|
|
438
482
|
return kept.map((row) => ({ ...row, content: held.get(row.id) ?? null }));
|
|
439
483
|
}
|
|
440
|
-
function storedFolders(bound, plan) {
|
|
484
|
+
function storedFolders(bound, plan, subfolder) {
|
|
441
485
|
if (plan.paths !== null || plan.fileIds !== null)
|
|
442
486
|
return null;
|
|
443
487
|
if (plan.hop !== null || plan.backlinks !== null)
|
|
444
488
|
return null;
|
|
489
|
+
if (subfolder && plan.folder !== null)
|
|
490
|
+
return null;
|
|
445
491
|
const whole = bound.rooms.filter(({ locator }) => bound.reach === null || bound.reach.rooms.includes(locator));
|
|
446
492
|
if (whole.length === 0)
|
|
447
493
|
return null;
|
|
448
494
|
const keys = whole.map(({ key }) => key);
|
|
449
|
-
const prefix = plan.root.pathPrefix;
|
|
495
|
+
const prefix = plan.root.pathPrefix ?? '';
|
|
450
496
|
const outside = (bound.reach?.areas ?? []).flatMap((area) => {
|
|
451
497
|
const key = bound.keys.get(area.room);
|
|
452
498
|
if (key === undefined)
|
|
@@ -454,27 +500,51 @@ function storedFolders(bound, plan) {
|
|
|
454
500
|
const fence = fenced('f', key, area, true);
|
|
455
501
|
return [fragment(`NOT ${grouped(fence).sql}`, fence.bind)];
|
|
456
502
|
});
|
|
503
|
+
const under = prefix === ''
|
|
504
|
+
? subfolder
|
|
505
|
+
? [fragment("f.path <> ''")]
|
|
506
|
+
: []
|
|
507
|
+
: [
|
|
508
|
+
subfolder
|
|
509
|
+
? fragment('(f.path >= ? AND f.path < ?)', [`${prefix}/`, `${prefix}0`])
|
|
510
|
+
: within('f', prefix),
|
|
511
|
+
];
|
|
457
512
|
return all([
|
|
458
513
|
fragment(`f.key IN ${listed(keys).sql} AND f.layer = 0 AND f.present = 1`, keys),
|
|
459
514
|
...outside,
|
|
460
|
-
...
|
|
461
|
-
|
|
462
|
-
: [
|
|
463
|
-
fragment('(f.path = ? OR (f.path >= ? AND f.path < ?))', [
|
|
464
|
-
prefix,
|
|
465
|
-
`${prefix}/`,
|
|
466
|
-
`${prefix}0`,
|
|
467
|
-
]),
|
|
468
|
-
]),
|
|
515
|
+
...under,
|
|
516
|
+
...(plan.outside ?? []).map((folder) => fragment(`NOT ${within('f', folder).sql}`, within('f', folder).bind)),
|
|
469
517
|
...(plan.folder === null ? [] : [fragment('f.path = ?', [plan.folder])]),
|
|
470
518
|
]);
|
|
471
519
|
}
|
|
520
|
+
const SIZES = [
|
|
521
|
+
'CASE WHEN d.binary IS NULL THEN 1 ELSE 0 END AS dn',
|
|
522
|
+
'CASE WHEN d.binary IS NULL THEN d.bytes ELSE 0 END AS ds',
|
|
523
|
+
'CASE WHEN d.binary IS NULL THEN 0 ELSE 1 END AS fn',
|
|
524
|
+
'CASE WHEN d.binary IS NULL THEN 0 ELSE d.bytes END AS fs',
|
|
525
|
+
];
|
|
526
|
+
const LATEST = "d.changed_instant || ' ' || (d.change ->> '$.time') AS u";
|
|
527
|
+
function greatestTerm(ordering) {
|
|
528
|
+
return { ordering, kind: fragment('gk'), value: fragment('gv'), instant: fragment('gi') };
|
|
529
|
+
}
|
|
530
|
+
function latestOf(held) {
|
|
531
|
+
if (typeof held !== 'string')
|
|
532
|
+
return null;
|
|
533
|
+
return held.slice(held.indexOf(' ') + 1);
|
|
534
|
+
}
|
|
472
535
|
function groups(connection, bound, plan, shape) {
|
|
536
|
+
const prefix = plan.root.pathPrefix;
|
|
473
537
|
const keyed = shape.groupBy.map((key, index) => {
|
|
474
|
-
const { term, join } = keyTerm(key, GROUP_ORDER, index);
|
|
538
|
+
const { term, join } = keyTerm(key, GROUP_ORDER, index, prefix);
|
|
475
539
|
const kind = fragment(`COALESCE(${term.kind.sql}, 'null')`, term.kind.bind);
|
|
476
540
|
return { term: { ...term, kind }, join };
|
|
477
541
|
});
|
|
542
|
+
const ordering = shape.orderBy.map(({ by }) => by);
|
|
543
|
+
const sized = shape.size || ordering.includes('size');
|
|
544
|
+
const dated = shape.updated || ordering.includes('updated');
|
|
545
|
+
const greatest = shape.greatest === null
|
|
546
|
+
? null
|
|
547
|
+
: keyTerm({ of: 'field', field: shape.greatest }, GREATEST, keyed.length, prefix);
|
|
478
548
|
const filter = filtered(bound, plan);
|
|
479
549
|
const inner = joined([
|
|
480
550
|
fragment('SELECT '),
|
|
@@ -483,40 +553,93 @@ function groups(connection, bound, plan, shape) {
|
|
|
483
553
|
fragment(`, ${term.value.sql} AS v${index}`, term.value.bind),
|
|
484
554
|
fragment(`, ${instantOf(term).sql} AS i${index}`, instantOf(term).bind),
|
|
485
555
|
], '')), ', '),
|
|
486
|
-
fragment(', 1 AS n
|
|
487
|
-
...
|
|
556
|
+
fragment(['', '1 AS n', ...(sized ? SIZES : []), ...(dated ? [LATEST] : [])].join(', ')),
|
|
557
|
+
...(greatest === null
|
|
558
|
+
? []
|
|
559
|
+
: [
|
|
560
|
+
fragment(`, ${greatest.term.kind.sql} AS gk`, greatest.term.kind.bind),
|
|
561
|
+
fragment(`, ${greatest.term.value.sql} AS gv`, greatest.term.value.bind),
|
|
562
|
+
fragment(`, ${instantOf(greatest.term).sql} AS gi`, instantOf(greatest.term).bind),
|
|
563
|
+
]),
|
|
564
|
+
fragment(' FROM replica_entries d'),
|
|
565
|
+
...[...keyed, ...(greatest === null ? [] : [greatest])].flatMap(({ join }) => join === null ? [] : [fragment(' '), join]),
|
|
488
566
|
fragment(' WHERE '),
|
|
489
567
|
filter,
|
|
490
568
|
], '');
|
|
491
|
-
const
|
|
492
|
-
|
|
493
|
-
|
|
569
|
+
const only = shape.groupBy.length === 1 ? shape.groupBy[0].of : null;
|
|
570
|
+
const subfolder = only === 'subfolder';
|
|
571
|
+
const folders = only === 'folder' || subfolder ? storedFolders(bound, plan, subfolder) : null;
|
|
572
|
+
const folderKey = subfolder ? subfolderOf('f.path', prefix) : fragment('f.path');
|
|
573
|
+
const zeros = [
|
|
574
|
+
...(sized ? ['0', '0', '0', '0'] : []),
|
|
575
|
+
...(dated ? ['NULL'] : []),
|
|
576
|
+
...(greatest === null ? [] : ['NULL', 'NULL', 'NULL']),
|
|
577
|
+
];
|
|
494
578
|
const source = folders === null
|
|
495
579
|
? inner
|
|
496
580
|
: joined([
|
|
497
581
|
inner,
|
|
498
|
-
fragment(
|
|
582
|
+
fragment(` UNION ALL SELECT 'string' AS k0, ${folderKey.sql} AS v0, NULL AS i0, 0 AS n${zeros.map((one) => `, ${one}`).join('')} FROM replica_folders f WHERE `, folderKey.bind),
|
|
499
583
|
folders,
|
|
500
584
|
], '');
|
|
501
|
-
const columns = keyed
|
|
502
|
-
.map((_, index) => `k${index}, min(v${index}) AS v${index}, i${index}`)
|
|
503
|
-
.join(', ');
|
|
504
585
|
const held = keyed
|
|
505
586
|
.map((_, index) => `k${index}, i${index}, CASE WHEN i${index} IS NULL THEN v${index} END`)
|
|
506
587
|
.join(', ');
|
|
507
|
-
const
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
588
|
+
const ranked = greatest === null
|
|
589
|
+
? source
|
|
590
|
+
: joined([
|
|
591
|
+
fragment(`SELECT *, ROW_NUMBER() OVER (PARTITION BY ${held} ORDER BY `),
|
|
592
|
+
sql.sorted(bound.collate, greatestTerm(GREATEST)),
|
|
593
|
+
fragment(', gv) AS gr FROM ('),
|
|
594
|
+
source,
|
|
595
|
+
fragment(')'),
|
|
596
|
+
], '');
|
|
597
|
+
const columns = [
|
|
598
|
+
...keyed.map((_, index) => `k${index}, min(v${index}) AS v${index}, i${index}`),
|
|
599
|
+
'sum(n) AS n',
|
|
600
|
+
...(sized ? ['sum(dn) AS dn', 'sum(ds) AS ds', 'sum(fn) AS fn', 'sum(fs) AS fs'] : []),
|
|
601
|
+
...(dated ? ['max(u) AS u'] : []),
|
|
602
|
+
...(greatest === null
|
|
603
|
+
? []
|
|
604
|
+
: ['gk', 'gv', 'gi'].map((column) => `min(CASE WHEN gr = 1 THEN ${column} END) AS ${column}`)),
|
|
605
|
+
].join(', ');
|
|
606
|
+
const outer = (index, order) => ({
|
|
607
|
+
ordering: order,
|
|
514
608
|
kind: fragment(`k${index}`),
|
|
515
609
|
value: fragment(`v${index}`),
|
|
516
610
|
});
|
|
517
|
-
const
|
|
518
|
-
|
|
519
|
-
|
|
611
|
+
const termOf = (by, order) => {
|
|
612
|
+
if (by === 'count')
|
|
613
|
+
return { ordering: order, kind: fragment("'number'"), value: fragment('n') };
|
|
614
|
+
if (by === 'size') {
|
|
615
|
+
return { ordering: order, kind: fragment("'number'"), value: fragment('(ds + fs)') };
|
|
616
|
+
}
|
|
617
|
+
if (by === 'updated') {
|
|
618
|
+
return {
|
|
619
|
+
ordering: order,
|
|
620
|
+
kind: fragment("(CASE WHEN u IS NULL THEN 'null' ELSE 'string' END)"),
|
|
621
|
+
value: fragment("substr(u, instr(u, ' ') + 1)"),
|
|
622
|
+
instant: fragment("substr(u, 1, instr(u, ' ') - 1)"),
|
|
623
|
+
};
|
|
624
|
+
}
|
|
625
|
+
if (by === 'greatest')
|
|
626
|
+
return greatestTerm(order);
|
|
627
|
+
return { ...outer(by, order), instant: fragment(`i${by}`) };
|
|
628
|
+
};
|
|
629
|
+
const valueOf = (row, by) => {
|
|
630
|
+
if (by === 'count')
|
|
631
|
+
return Number(row.n);
|
|
632
|
+
if (by === 'size')
|
|
633
|
+
return Number(row.ds) + Number(row.fs);
|
|
634
|
+
if (by === 'updated') {
|
|
635
|
+
const text = latestOf(row.u);
|
|
636
|
+
return text === null ? null : sql.sortValue('string', text, row.u.split(' ')[0]);
|
|
637
|
+
}
|
|
638
|
+
if (by === 'greatest')
|
|
639
|
+
return sortedOf(row.gk, row.gv, row.gi);
|
|
640
|
+
return sortedValue(row, by);
|
|
641
|
+
};
|
|
642
|
+
const ordered = shape.orderBy.map(({ by, direction, nulls }) => termOf(by, { ...GROUP_ORDER, direction, nulls: nulls ?? GROUP_ORDER.nulls }));
|
|
520
643
|
const ties = keyed.flatMap((_, index) => [
|
|
521
644
|
{ ...outer(index, GROUP_TIES), total: true },
|
|
522
645
|
{ ordering: GROUP_TIES, kind: fragment("'string'"), value: fragment(`k${index}`) },
|
|
@@ -533,7 +656,7 @@ function groups(connection, bound, plan, shape) {
|
|
|
533
656
|
: sql.following(ordered.map((term, index) => sql.beyond(bound.collate, term, cursor[index])), sql.following(ties
|
|
534
657
|
.slice(0, -1)
|
|
535
658
|
.map((term, index) => sql.beyond(bound.collate, term, tieValues[index])), sql.beyond(bound.collate, ties.at(-1), tieValues.at(-1)).beyond));
|
|
536
|
-
const grouping = joined([fragment(`SELECT ${columns}
|
|
659
|
+
const grouping = joined([fragment(`SELECT ${columns} FROM (`), ranked, fragment(`) GROUP BY ${held}`)], '');
|
|
537
660
|
const windowed = joined([
|
|
538
661
|
fragment('SELECT * FROM ('),
|
|
539
662
|
grouping,
|
|
@@ -546,16 +669,24 @@ function groups(connection, bound, plan, shape) {
|
|
|
546
669
|
const rows = connection.rows(windowed.sql, windowed.bind);
|
|
547
670
|
const kept = plan.limit === null ? rows : rows.slice(0, plan.limit);
|
|
548
671
|
const keyOf = (row) => keyed.map((_, index) => decoded(row[`k${index}`], row[`v${index}`]));
|
|
549
|
-
const found = kept.map((row) => ({
|
|
672
|
+
const found = kept.map((row) => ({
|
|
673
|
+
key: keyOf(row),
|
|
674
|
+
count: Number(row.n),
|
|
675
|
+
...(shape.size
|
|
676
|
+
? {
|
|
677
|
+
documents: { count: Number(row.dn), size: Number(row.ds) },
|
|
678
|
+
files: { count: Number(row.fn), size: Number(row.fs) },
|
|
679
|
+
}
|
|
680
|
+
: {}),
|
|
681
|
+
...(shape.updated ? { updated: latestOf(row.u) } : {}),
|
|
682
|
+
...(shape.greatest === null ? {} : { greatest: decoded(row.gk, row.gv) }),
|
|
683
|
+
}));
|
|
550
684
|
const last = kept.at(-1);
|
|
551
685
|
const next = plan.limit === null || rows.length <= plan.limit
|
|
552
686
|
? undefined
|
|
553
687
|
: last === undefined
|
|
554
688
|
? (plan.after?.text ?? FROM_START)
|
|
555
|
-
: cursorOf([
|
|
556
|
-
...shape.orderBy.map(({ by }) => by === 'count' ? Number(last.n) : sortedValue(last, by)),
|
|
557
|
-
keyOf(last),
|
|
558
|
-
]);
|
|
689
|
+
: cursorOf([...shape.orderBy.map(({ by }) => valueOf(last, by)), keyOf(last)]);
|
|
559
690
|
const total = plan.total
|
|
560
691
|
? Number(connection.rows(joined([fragment('SELECT count(*) AS held FROM ('), grouping, fragment(')')], '').sql, grouping.bind)[0].held)
|
|
561
692
|
: undefined;
|
package/dist/connection.d.ts
CHANGED
|
@@ -1,53 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type
|
|
3
|
-
import { type Observation } from './observation.js';
|
|
4
|
-
import { type DocumentResult, type GroupResult, type PendingResult } from './query.js';
|
|
5
|
-
import { type EntrySeed } from './seed.js';
|
|
6
|
-
import { type SearchRequest, type SearchResult } from './search.js';
|
|
7
|
-
import { type Adapter, type Authorization, type Member, type ProviderRefusal, type ServiceMode } from './adapter.js';
|
|
8
|
-
import { type ChatDraftSurface, type ConversationAgent, type ConversationEntry, type ConversationOptions, type ConversationSurface, type ConversationView } from './conversation.js';
|
|
9
|
-
import { type WrittenBy } from './change.js';
|
|
10
|
-
import type { Open } from './open.js';
|
|
11
|
-
import { type AttachAnswer, type BinaryLinkAnswer, type CallResult, type HeldBinaryAnswer, type HeldShownAnswer, type HistoryAnswer, type QueueEntry, type Resolution } from './outcome.js';
|
|
1
|
+
import type { Adapter, Authorization } from './adapter.js';
|
|
2
|
+
import { type RuntimeShell } from './durability.js';
|
|
12
3
|
import { type Recovery } from './recovery.js';
|
|
13
|
-
import { type
|
|
14
|
-
import { type
|
|
15
|
-
import { type SyncStatus } from './status.js';
|
|
16
|
-
import { type RuntimeShell, type UnsentWork } from './durability.js';
|
|
17
|
-
import { type CodeAvailability, type Persistence, type Readiness } from './readiness.js';
|
|
18
|
-
import type { RuntimeDatabase } from './tables.js';
|
|
19
|
-
import { type NarrowedView, type PortReach, type RuntimeView } from './reach.js';
|
|
20
|
-
export type AppTypedSelection = {
|
|
21
|
-
roots: readonly string[];
|
|
22
|
-
model: TypesResult;
|
|
23
|
-
};
|
|
24
|
-
export type AppRoom = {
|
|
25
|
-
name: string;
|
|
26
|
-
locator: string;
|
|
27
|
-
handle: string;
|
|
28
|
-
operations: import('./adapter.js').OperationScopes;
|
|
29
|
-
replica: import('./adapter.js').ReplicaAdmission;
|
|
30
|
-
model: TypesResult;
|
|
31
|
-
typedSelection: AppTypedSelection | null;
|
|
32
|
-
providerOwnedPaths: readonly string[];
|
|
33
|
-
roomVersion: string | null;
|
|
34
|
-
documents: number;
|
|
35
|
-
synchronizationAvailable: boolean;
|
|
36
|
-
refusal: ProviderRefusal | null;
|
|
37
|
-
locked: boolean;
|
|
38
|
-
};
|
|
39
|
-
export type RoomSchemas = {
|
|
40
|
-
collection: TypesResult;
|
|
41
|
-
typedSelection: TypesResult | null;
|
|
42
|
-
};
|
|
43
|
-
type RefusalReason = 'missing-required-guarantee' | 'revoked-authorization';
|
|
44
|
-
export type ConnectionRefusalCode = Open<RefusalReason>;
|
|
45
|
-
export type ConnectionRefusal = {
|
|
46
|
-
code: ConnectionRefusalCode;
|
|
47
|
-
retryable: boolean;
|
|
48
|
-
reauthorizationOffered: boolean;
|
|
49
|
-
refusal: ProviderRefusal | null;
|
|
50
|
-
};
|
|
4
|
+
import { type RuntimeDatabase } from './store.js';
|
|
5
|
+
import { type ComposedRuntime } from './surface.js';
|
|
51
6
|
export type MdRuntimeOptions = {
|
|
52
7
|
adapter: Adapter;
|
|
53
8
|
shell: RuntimeShell;
|
|
@@ -56,100 +11,7 @@ export type MdRuntimeOptions = {
|
|
|
56
11
|
signal?: AbortSignal;
|
|
57
12
|
recovery?: Recovery;
|
|
58
13
|
usableWhenHeld?: readonly string[];
|
|
59
|
-
|
|
60
|
-
export type SaveResult = {
|
|
61
|
-
outcome: 'saved';
|
|
62
|
-
identifier: string;
|
|
63
|
-
} | ({
|
|
64
|
-
outcome: 'refused';
|
|
65
|
-
} & SaveRefusal);
|
|
66
|
-
export type SavedRoomDraft = {
|
|
67
|
-
readonly path: string;
|
|
68
|
-
readonly revision: string;
|
|
69
|
-
};
|
|
70
|
-
export type SavedParts = {
|
|
71
|
-
readonly path: string;
|
|
72
|
-
readonly parts: RoomDraftParts;
|
|
73
|
-
};
|
|
74
|
-
export type RoomDraftSurface = {
|
|
75
|
-
list(): Promise<readonly RoomDraft[]>;
|
|
76
|
-
read(room: string, path: string): Promise<RoomDraft | null>;
|
|
77
|
-
write(room: string, path: string, revision: string | null, parts: unknown, next?: string): Promise<RoomDraftWrite>;
|
|
78
|
-
discard(room: string, path: string, revision: string): Promise<RoomDraftWrite>;
|
|
79
|
-
};
|
|
80
|
-
export type PresentationSurface = {
|
|
81
|
-
read(app: string): Promise<unknown>;
|
|
82
|
-
write(app: string, value: unknown): Promise<void>;
|
|
83
|
-
edit(app: string, members: Readonly<Record<string, unknown>>): Promise<void>;
|
|
84
|
-
};
|
|
85
|
-
export type BinaryFileSurface = {
|
|
86
|
-
read(room: string, path: string, revision?: string): Promise<HeldBinaryAnswer>;
|
|
87
|
-
link(room: string, path: string, revision?: string): Promise<BinaryLinkAnswer>;
|
|
88
|
-
show(room: string, path: string, revision?: string): Promise<HeldShownAnswer>;
|
|
89
|
-
attach(room: string, file: File): Promise<AttachAnswer>;
|
|
90
|
-
part(file: string, part: number): Promise<Uint8Array | null>;
|
|
91
|
-
};
|
|
92
|
-
export type HistoryQuery = {
|
|
93
|
-
revision?: string;
|
|
94
|
-
pageToken?: string;
|
|
95
|
-
};
|
|
96
|
-
export type MdRuntime = {
|
|
97
|
-
loaded(): Promise<void>;
|
|
98
|
-
rooms(): Promise<readonly AppRoom[]>;
|
|
99
|
-
query: {
|
|
100
|
-
(query: DocumentQuery): Promise<DocumentResult | PendingResult>;
|
|
101
|
-
(query: GroupQuery): Promise<GroupResult | PendingResult>;
|
|
102
|
-
};
|
|
103
|
-
search(request: SearchRequest): Promise<SearchResult>;
|
|
104
|
-
types(locator: string): Promise<RoomSchemas>;
|
|
105
|
-
roomDraft: RoomDraftSurface;
|
|
106
|
-
conversation: ConversationSurface;
|
|
107
|
-
chatDraft: ChatDraftSurface;
|
|
108
|
-
presentation: PresentationSurface;
|
|
109
|
-
save(room: string, roomDrafts: readonly SavedRoomDraft[], writtenBy?: WrittenBy): Promise<SaveResult>;
|
|
110
|
-
saveParts(room: string, parts: readonly SavedParts[], writtenBy?: WrittenBy): Promise<SaveResult>;
|
|
111
|
-
history(locator: string, path: string, query?: HistoryQuery): Promise<HistoryAnswer>;
|
|
112
|
-
resolve(room: string, path: string, destination: string): Promise<Resolution>;
|
|
113
|
-
binaryFile: BinaryFileSurface;
|
|
114
|
-
call(name: string, input: unknown): Promise<CallResult>;
|
|
115
|
-
reached(locator: string, roomVersion: string, path?: string): Promise<boolean>;
|
|
116
|
-
log(): string;
|
|
117
|
-
persistence(): boolean;
|
|
118
|
-
retry(): Promise<void>;
|
|
119
|
-
cleanUp(): Promise<number>;
|
|
120
|
-
unsent(): Promise<readonly UnsentWork[]>;
|
|
121
|
-
reset(): Promise<void>;
|
|
122
|
-
observe: {
|
|
123
|
-
(topic: 'rooms'): Promise<Observation<readonly AppRoom[]>>;
|
|
124
|
-
(topic: 'readiness'): Promise<Observation<Readiness>>;
|
|
125
|
-
(topic: 'connection-refusal'): Promise<Observation<ConnectionRefusal | null>>;
|
|
126
|
-
(topic: 'storage-loss'): Promise<Observation<string | null>>;
|
|
127
|
-
(topic: 'sync-status'): Promise<Observation<SyncStatus>>;
|
|
128
|
-
(topic: 'service-mode'): Promise<Observation<ServiceMode>>;
|
|
129
|
-
(topic: 'member'): Promise<Observation<Member | null>>;
|
|
130
|
-
(topic: 'authority-changes'): Promise<Observation<number>>;
|
|
131
|
-
(topic: 'query', query: DocumentQuery): Promise<Observation<DocumentResult | PendingResult>>;
|
|
132
|
-
(topic: 'query', query: GroupQuery): Promise<Observation<GroupResult | PendingResult>>;
|
|
133
|
-
(topic: 'queue', locator: string): Promise<Observation<readonly QueueEntry[]>>;
|
|
134
|
-
(topic: 'room-drafts'): Promise<Observation<readonly RoomDraft[]>>;
|
|
135
|
-
(topic: 'presentation', app: string): Promise<Observation<unknown>>;
|
|
136
|
-
(topic: 'conversation', conversation: string, options: ConversationOptions): Promise<Observation<ConversationView>>;
|
|
137
|
-
(topic: 'conversations'): Promise<Observation<readonly ConversationEntry[]>>;
|
|
138
|
-
(topic: 'agents'): Promise<Observation<readonly ConversationAgent[]>>;
|
|
139
|
-
};
|
|
140
|
-
reauthorize(): Promise<void>;
|
|
141
|
-
};
|
|
142
|
-
export type RuntimeTopic = 'rooms' | 'readiness' | 'connection-refusal' | 'storage-loss' | 'sync-status' | 'service-mode' | 'member' | 'authority-changes' | 'query' | 'queue' | 'room-drafts' | 'presentation' | 'conversation' | 'conversations' | 'agents';
|
|
143
|
-
export type ReadinessPort = {
|
|
144
|
-
readonly target: string;
|
|
145
|
-
readonly code: CodeAvailability;
|
|
146
|
-
};
|
|
147
|
-
export type ComposedRuntime = RuntimeView & {
|
|
148
|
-
seed(entry: EntrySeed): void;
|
|
149
|
-
stop(): Promise<void>;
|
|
150
|
-
persisted(answer: Persistence): void;
|
|
151
|
-
within(reach: PortReach | null, port: ReadinessPort): NarrowedView;
|
|
14
|
+
build?: string;
|
|
152
15
|
};
|
|
153
16
|
export declare function composeRuntime(options: MdRuntimeOptions): ComposedRuntime;
|
|
154
|
-
export {};
|
|
155
17
|
//# sourceMappingURL=connection.d.ts.map
|
package/dist/connection.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../src/connection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../src/connection.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAsB,MAAM,cAAc,CAAC;AAG/E,OAAO,EAAmB,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAUrE,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAK9D,OAAO,EAAe,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,EAAmB,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAGrE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,YAAY,CAAC;IACpB,QAAQ,EAAE,eAAe,CAAC;IAC1B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAIF,wBAAgB,cAAc,CAAC,OAAO,EAAE,gBAAgB,GAAG,eAAe,CA+FzE"}
|