@kana-ai/edgar-ext-slack 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -25
- package/dist/src/api/client.d.ts +1 -1
- package/dist/src/api/client.js +4 -2
- package/dist/src/api/tags.d.ts +5 -0
- package/dist/src/api/tags.js +100 -0
- package/dist/src/inbound/route.d.ts +3 -1
- package/dist/src/inbound/route.js +100 -16
- package/dist/src/outbound/layout.d.ts +38 -12
- package/dist/src/outbound/layout.js +330 -63
- package/dist/src/outbound/messages.d.ts +17 -3
- package/dist/src/outbound/messages.js +42 -2
- package/dist/src/outbound/places.d.ts +11 -6
- package/dist/src/outbound/places.js +94 -26
- package/dist/src/outbound/progress.js +346 -84
- package/dist/src/outbound/tools.js +2 -3
- package/dist/src/outbound/words.d.ts +56 -8
- package/dist/src/outbound/words.js +126 -13
- package/dist/src/schemas/config.d.ts +1 -0
- package/dist/src/schemas/config.js +5 -1
- package/dist/src/schemas/events.d.ts +66 -3
- package/dist/src/schemas/events.js +65 -5
- package/dist/src/schemas/slack.d.ts +19 -2
- package/dist/src/schemas/slack.js +19 -4
- package/edgar-extension.json +1 -1
- package/package.json +3 -3
- package/schemas/config.json +9 -1
|
@@ -28,10 +28,18 @@ export async function post(ctx, channel, thread, text, extra = {}) {
|
|
|
28
28
|
export async function update(ctx, channel, ts, text, extra = {}) {
|
|
29
29
|
return await written(ctx, "chat.update", { channel, ts, text, ...extra });
|
|
30
30
|
}
|
|
31
|
-
/**
|
|
31
|
+
/** Deletes the message at `ts`; a message that is already gone is no failure. */
|
|
32
|
+
export async function remove(ctx, channel, ts) {
|
|
33
|
+
const deleted = await slack(ctx, "chat.delete", { channel, ts }, answer);
|
|
34
|
+
return deleted.ok || deleted.error.kind === "not_found" ? ok(undefined) : deleted;
|
|
35
|
+
}
|
|
36
|
+
/** The most messages of a channel's history that `findInChannel` reads, newest first, and how many each page of a channel's history holds; Slack advises at most 200 a page. */
|
|
37
|
+
const HISTORY_MESSAGES = 1000;
|
|
38
|
+
const HISTORY_PAGE = 200;
|
|
39
|
+
/** The messages of the thread, or of the channel's newest `HISTORY_PAGE` messages, each with its metadata. */
|
|
32
40
|
export async function listed(ctx, channel, thread) {
|
|
33
41
|
const all = thread === undefined
|
|
34
|
-
? await slack(ctx, "conversations.history", { channel, limit:
|
|
42
|
+
? await slack(ctx, "conversations.history", { channel, limit: HISTORY_PAGE, include_all_metadata: true }, messages)
|
|
35
43
|
: await slack(ctx, "conversations.replies", { channel, ts: thread, limit: 200, include_all_metadata: true }, messages);
|
|
36
44
|
return all.ok ? ok(all.value.messages) : all;
|
|
37
45
|
}
|
|
@@ -46,6 +54,24 @@ export async function findMarked(ctx, channel, thread, kind, match) {
|
|
|
46
54
|
const all = await listed(ctx, channel, thread);
|
|
47
55
|
return all.ok ? ok(newestMarked(all.value, kind, match)) : all;
|
|
48
56
|
}
|
|
57
|
+
/** The newest message of the channel's newest `HISTORY_MESSAGES` whose metadata is `kind` and passes `match`, read page by page, newest first, up to the first page that holds one. A page that fails, such as a rate limit that outlasts the client's waits, fails the answer and never reads as none, so a caller never opens a second thread for a card that has one. */
|
|
58
|
+
export async function findInChannel(ctx, channel, kind, match) {
|
|
59
|
+
let cursor;
|
|
60
|
+
for (let seen = 0; seen < HISTORY_MESSAGES;) {
|
|
61
|
+
const args = { channel, limit: HISTORY_PAGE, include_all_metadata: true, cursor };
|
|
62
|
+
const page = await slack(ctx, "conversations.history", args, messages);
|
|
63
|
+
if (!page.ok)
|
|
64
|
+
return page;
|
|
65
|
+
const found = newestMarked(page.value.messages, kind, match);
|
|
66
|
+
if (found !== undefined)
|
|
67
|
+
return ok(found);
|
|
68
|
+
seen += page.value.messages.length;
|
|
69
|
+
cursor = page.value.response_metadata?.next_cursor;
|
|
70
|
+
if (cursor === undefined || cursor === "" || page.value.messages.length === 0)
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
return ok(undefined);
|
|
74
|
+
}
|
|
49
75
|
/** How long a relayed reply waits for its answer before a new reply no longer counts as one more while EDGAR is busy: the built-in answer's two stages time out within it. */
|
|
50
76
|
const WAIT_MINUTES = 30;
|
|
51
77
|
/** The notes of `all` that say EDGAR put a person's reply on a card and that no run has answered yet, oldest first; with `now`, only those of the last `WAIT_MINUTES`. */
|
|
@@ -102,6 +128,20 @@ export async function dmChannel(ctx, to) {
|
|
|
102
128
|
const conversation = await slack(ctx, "conversations.open", { users: user }, opened);
|
|
103
129
|
return conversation.ok ? ok(conversation.value.channel.id) : conversation;
|
|
104
130
|
}
|
|
131
|
+
/** The reactions EDGAR puts on a person's message: `seen` as soon as it takes the message, then `done` once it answered or acted on it, or `failed` when it could not. */
|
|
132
|
+
export const REACTION = { seen: "eyes", done: "white_check_mark", failed: "x" };
|
|
133
|
+
/** Puts the reaction `name` on the message at `ts`, or takes it off with `off`. A reaction is a hint to the person: a refusal, such as one that is already there, is one log line and never fails the delivery. */
|
|
134
|
+
export async function react(ctx, channel, ts, name, off = false) {
|
|
135
|
+
const method = off ? "reactions.remove" : "reactions.add";
|
|
136
|
+
const set = await slack(ctx, method, { channel, timestamp: ts, name }, answer);
|
|
137
|
+
if (!set.ok)
|
|
138
|
+
ctx.log(`${method} ${name}: ${set.error.message} (${set.error.cause ?? "no cause"})`);
|
|
139
|
+
}
|
|
140
|
+
/** Swaps the `seen` reaction on the message at `ts` for `done` when EDGAR answered or acted on it, else for `failed`. */
|
|
141
|
+
export async function reacted(ctx, channel, ts, worked) {
|
|
142
|
+
await react(ctx, channel, ts, REACTION.seen, true);
|
|
143
|
+
await react(ctx, channel, ts, worked ? REACTION.done : REACTION.failed);
|
|
144
|
+
}
|
|
105
145
|
/** The session status is a hint to the person; a failed status call is logged and never fails the delivery. */
|
|
106
146
|
export async function status(ctx, origin, value, title) {
|
|
107
147
|
const args = {
|
|
@@ -2,6 +2,7 @@ import type { Origin } from "@kana-ai/edgar-contracts/rpc";
|
|
|
2
2
|
import { type Failure, type NoteCard, type Result, type RunEvent } from "@kana-ai/edgar-sdk";
|
|
3
3
|
import { type SlackCtx } from "#api/client";
|
|
4
4
|
import { type Config } from "#schemas/config";
|
|
5
|
+
import { type RootView } from "#schemas/events";
|
|
5
6
|
/** The conversation of a run's messages: the Slack thread its card came from, else `[extensions.slack] channel`, else the DM of the first `dm` entry; `direct` marks the DM. */
|
|
6
7
|
export interface Home {
|
|
7
8
|
readonly channel: string;
|
|
@@ -18,18 +19,22 @@ export interface Spot {
|
|
|
18
19
|
readonly thread: string | undefined;
|
|
19
20
|
}
|
|
20
21
|
/** The Slack user id of a card's assignee, from the first of these that names one: the `people` entry of that name, the operator of that name, the assignee itself when it is an email. An entry that is an email is the user that `users.lookupByEmail` finds, kept for the life of the process. None when nothing names one. An email that finds no user, or an answer that is not a user id, leaves the name as it is and writes one line to the log, which names `message`, so the message is still posted and never holds a mention that Slack cannot read. */
|
|
21
|
-
export declare function mentioned(ctx: SlackCtx, run: string, message: "the end note" | "the approval question" | "the question", assignee: string, settings: Config): Promise<string | undefined>;
|
|
22
|
+
export declare function mentioned(ctx: SlackCtx, run: string, message: "the end note" | "the approval question" | "the question" | "the card's first message", assignee: string, settings: Config): Promise<string | undefined>;
|
|
23
|
+
/** Who stopped a run, as its end note writes them: a mention of the Slack person that the move's `<person>@slack` names by Slack id, by `people` or as an operator, else the name as the engine recorded it. */
|
|
24
|
+
export declare function stopperOf(ctx: SlackCtx, run: string, by: string, settings: Config): Promise<string>;
|
|
25
|
+
/** The people of `entries` as a message tags them, after the mentions of `known`, each once and at most `MAX_TAGS`: a mention of the Slack id that the engine found for them in `[people]`, else of the user that `mentioned` finds for their email or name, else their name or login as text with one log line, so nobody is dropped. An email is never written. */
|
|
26
|
+
export declare function taggedOf(ctx: SlackCtx, run: string, message: "the end note" | "the question", entries: readonly Readonly<Record<string, string>>[], settings: Config, known?: readonly string[]): Promise<readonly string[]>;
|
|
22
27
|
/** The DM conversation of a `dm` entry, which a card's thread needs to be found again. */
|
|
23
28
|
export declare function directOf(ctx: SlackCtx, entry: string): Promise<Result<string, Failure>>;
|
|
24
29
|
/** The home of a run, or none when the card did not come from Slack and neither `channel` nor `dm` is set. */
|
|
25
30
|
export declare function homeOf(ctx: SlackCtx, event: RunEvent, settings: Config): Promise<Result<Home | undefined, Failure>>;
|
|
26
|
-
/** The first message of the card's thread in `channel`, found by the card's
|
|
27
|
-
export declare function rootOf(ctx: SlackCtx, channel: string, card: NoteCard, run: string): Promise<Result<string, Failure>>;
|
|
31
|
+
/** The first message of the card's thread in `channel`, found by the card id or link among the channel's newest 1,000 messages, posted when the card has none there, given `run` and the card's newest link and title when it lacks them, and changed in place to show each part of `view` over what it showed; answers its `ts`. */
|
|
32
|
+
export declare function rootOf(ctx: SlackCtx, channel: string, card: NoteCard, run: string, view?: RootView): Promise<Result<string, Failure>>;
|
|
33
|
+
/** `rootOf` that never posts: the card's first message in `channel`, given `run` as `rootOf` gives it, or none when the card has no thread there. */
|
|
34
|
+
export declare function joinedRoot(ctx: SlackCtx, channel: string, card: NoteCard, run: string, view?: RootView): Promise<Result<string | undefined, Failure>>;
|
|
28
35
|
/** The card's thread of a run: the Slack thread its card came from, else the thread whose first message lists the run. */
|
|
29
36
|
export declare function threadOf(ctx: SlackCtx, event: RunEvent, home: Home): Promise<Result<string | undefined, Failure>>;
|
|
30
|
-
/** The thread a new run's messages go in: the Slack thread its card came from, else the card's thread, opened by the run's first message about the card; a run with no card has none. */
|
|
31
|
-
export declare function openThread(ctx: SlackCtx, event: RunEvent, home: Home): Promise<Result<string | undefined, Failure>>;
|
|
32
37
|
/** The thread of a message that a person must see, for a run that can have no plan: the thread of `threadOf`, else the thread of `card`, which gets the run, so a run that a comment started still writes under its card. */
|
|
33
38
|
export declare function cardThread(ctx: SlackCtx, event: RunEvent, home: Home, card: NoteCard | undefined): Promise<Result<string | undefined, Failure>>;
|
|
34
39
|
/** The card's thread in `channel`, opened by the card's line when the conversation has none, or none when `places` already holds that conversation. */
|
|
35
|
-
export declare function oneMore(ctx: SlackCtx, channel: string, card: NoteCard | undefined, run: string, places: readonly Spot[]): Promise<Result<Spot | undefined, Failure>>;
|
|
40
|
+
export declare function oneMore(ctx: SlackCtx, channel: string, card: NoteCard | undefined, run: string, places: readonly Spot[], view: RootView): Promise<Result<Spot | undefined, Failure>>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { err, ok, permanentFailure, } from "@kana-ai/edgar-sdk";
|
|
2
2
|
import { slack } from "#api/client";
|
|
3
|
-
import { style } from "#outbound/layout";
|
|
4
|
-
import {
|
|
3
|
+
import { rootLayout, style } from "#outbound/layout";
|
|
4
|
+
import { findInChannel, mark, post, update } from "#outbound/messages";
|
|
5
5
|
import { email, userId } from "#schemas/config";
|
|
6
|
-
import { cardRoot, slackOrigin } from "#schemas/events";
|
|
6
|
+
import { cardRoot, rootView, slackOrigin } from "#schemas/events";
|
|
7
7
|
import { opened, userInfo } from "#schemas/slack";
|
|
8
8
|
/** The runs a card's first message keeps; an older run of the card finds no thread. */
|
|
9
9
|
const MAX_RUNS = 20;
|
|
@@ -39,6 +39,43 @@ export async function mentioned(ctx, run, message, assignee, settings) {
|
|
|
39
39
|
ctx.log(`run ${run}: ${message} greets nobody for ${assignee}, because users.lookupByEmail gave no user for ${entry} (${user.ok ? "not a user id" : user.error.kind})`);
|
|
40
40
|
return undefined;
|
|
41
41
|
}
|
|
42
|
+
/** Who stopped a run, as its end note writes them: a mention of the Slack person that the move's `<person>@slack` names by Slack id, by `people` or as an operator, else the name as the engine recorded it. */
|
|
43
|
+
export async function stopperOf(ctx, run, by, settings) {
|
|
44
|
+
const person = by.endsWith("@slack") ? by.slice(0, -"@slack".length) : undefined;
|
|
45
|
+
if (person === undefined)
|
|
46
|
+
return style.text(by);
|
|
47
|
+
if (userId.safeParse(person).success)
|
|
48
|
+
return `<@${person}>`;
|
|
49
|
+
const user = await mentioned(ctx, run, "the end note", person, settings);
|
|
50
|
+
return user === undefined ? style.text(person) : `<@${user}>`;
|
|
51
|
+
}
|
|
52
|
+
/** The most people one message tags. */
|
|
53
|
+
const MAX_TAGS = 5;
|
|
54
|
+
/** The people of `entries` as a message tags them, after the mentions of `known`, each once and at most `MAX_TAGS`: a mention of the Slack id that the engine found for them in `[people]`, else of the user that `mentioned` finds for their email or name, else their name or login as text with one log line, so nobody is dropped. An email is never written. */
|
|
55
|
+
export async function taggedOf(ctx, run, message, entries, settings, known = []) {
|
|
56
|
+
const out = [];
|
|
57
|
+
for (const entry of entries) {
|
|
58
|
+
if (out.length >= MAX_TAGS)
|
|
59
|
+
break;
|
|
60
|
+
const tag = await tagOf(ctx, run, message, entry, settings);
|
|
61
|
+
if (tag !== undefined && !out.includes(tag))
|
|
62
|
+
out.push(tag);
|
|
63
|
+
}
|
|
64
|
+
return [...out, ...known.filter((tag) => !out.includes(tag))].slice(0, MAX_TAGS);
|
|
65
|
+
}
|
|
66
|
+
async function tagOf(ctx, run, message, entry, settings) {
|
|
67
|
+
const own = entry["slack"];
|
|
68
|
+
if (own !== undefined && userId.safeParse(own).success)
|
|
69
|
+
return `<@${own}>`;
|
|
70
|
+
for (const given of [entry["email"], entry["name"]]) {
|
|
71
|
+
const user = given === undefined ? undefined : await mentioned(ctx, run, message, given, settings);
|
|
72
|
+
if (user !== undefined)
|
|
73
|
+
return `<@${user}>`;
|
|
74
|
+
}
|
|
75
|
+
const text = entry["name"] ?? entry["github"];
|
|
76
|
+
ctx.log(`run ${run}: ${message} tags nobody for ${text ?? "a person"}, as no person of [people] with a Slack id has that id`);
|
|
77
|
+
return text === undefined ? undefined : style.text(text);
|
|
78
|
+
}
|
|
42
79
|
/** The DM conversation of a `dm` entry, which a card's thread needs to be found again. */
|
|
43
80
|
export async function directOf(ctx, entry) {
|
|
44
81
|
const user = await recipient(ctx, entry);
|
|
@@ -66,21 +103,59 @@ export async function homeOf(ctx, event, settings) {
|
|
|
66
103
|
const direct = await directOf(ctx, first);
|
|
67
104
|
return direct.ok ? ok({ channel: direct.value, origin: undefined, direct: true }) : direct;
|
|
68
105
|
}
|
|
69
|
-
/** The
|
|
70
|
-
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
106
|
+
/** The part of a card's link up to its id: a tracker such as Linear puts the title after the id, so the link changes when the card is retitled. */
|
|
107
|
+
function upTo(url, id) {
|
|
108
|
+
const at = url.indexOf(`/${id}/`);
|
|
109
|
+
return at === -1 ? url : url.slice(0, at + id.length + 1);
|
|
110
|
+
}
|
|
111
|
+
/** Whether the metadata of a card's first message names `card`: by the card id, else, for a message that keeps no id, by the link up to the card id. */
|
|
112
|
+
function sameCard(payload, card) {
|
|
113
|
+
const { id, card: link } = payload;
|
|
114
|
+
if (typeof id === "string" && card.id !== undefined)
|
|
115
|
+
return id === card.id;
|
|
116
|
+
if (typeof link !== "string")
|
|
117
|
+
return false;
|
|
118
|
+
return (link === card.url || (card.id !== undefined && upTo(link, card.id) === upTo(card.url, card.id)));
|
|
119
|
+
}
|
|
120
|
+
/** The first message of the card's thread in `channel`, found by the card id or link among the channel's newest 1,000 messages, posted when the card has none there, given `run` and the card's newest link and title when it lacks them, and changed in place to show each part of `view` over what it showed; answers its `ts`. */
|
|
121
|
+
export async function rootOf(ctx, channel, card, run, view = {}) {
|
|
122
|
+
const found = await findInChannel(ctx, channel, "edgar_card", (p) => sameCard(p, card));
|
|
123
|
+
return found.ok ? await keepRoot(ctx, channel, card, run, view, found.value) : found;
|
|
124
|
+
}
|
|
125
|
+
/** `rootOf` that never posts: the card's first message in `channel`, given `run` as `rootOf` gives it, or none when the card has no thread there. */
|
|
126
|
+
export async function joinedRoot(ctx, channel, card, run, view = {}) {
|
|
127
|
+
const found = await findInChannel(ctx, channel, "edgar_card", (p) => sameCard(p, card));
|
|
128
|
+
if (!found.ok || found.value === undefined)
|
|
129
|
+
return found.ok ? ok(undefined) : found;
|
|
130
|
+
return await keepRoot(ctx, channel, card, run, view, found.value);
|
|
131
|
+
}
|
|
132
|
+
/** The card's first message `found` in `channel` written as `rootOf` says, or posted when there is none. Only the card's newest run, the last that the message lists, or a run new to it, sets the card's link and title, so a run that started before a retitle never brings the old title back. */
|
|
133
|
+
async function keepRoot(ctx, channel, card, run, view, found) {
|
|
134
|
+
const kept = cardRoot.safeParse(found?.metadata?.event_payload);
|
|
75
135
|
const runs = kept.success ? kept.data.runs : [];
|
|
76
|
-
const
|
|
77
|
-
|
|
136
|
+
const before = rootView.safeParse(kept.data?.["view"]).data ?? {};
|
|
137
|
+
const shown = { ...before, ...view };
|
|
138
|
+
const ts = found?.ts;
|
|
139
|
+
const same = JSON.stringify(shown) === JSON.stringify(before);
|
|
140
|
+
const newest = !kept.success || !runs.includes(run) || runs.at(-1) === run;
|
|
141
|
+
const named = newest
|
|
142
|
+
? card
|
|
143
|
+
: { ...card, url: kept.data.card, title: kept.data.title ?? card.title };
|
|
144
|
+
const current = kept.data?.card === named.url && (kept.data.title ?? named.title) === named.title;
|
|
145
|
+
if (ts !== undefined && runs.includes(run) && same && current)
|
|
78
146
|
return ok(ts);
|
|
79
|
-
const
|
|
80
|
-
const
|
|
147
|
+
const listed = runs.includes(run) ? runs : [...runs, run].slice(-MAX_RUNS);
|
|
148
|
+
const metadata = mark("edgar_card", {
|
|
149
|
+
card: named.url,
|
|
150
|
+
...(card.id === undefined ? {} : { id: card.id }),
|
|
151
|
+
title: named.title,
|
|
152
|
+
runs: listed,
|
|
153
|
+
...(Object.keys(shown).length === 0 ? {} : { view: shown }),
|
|
154
|
+
});
|
|
155
|
+
const { text, blocks } = rootLayout(named, shown);
|
|
81
156
|
const written = ts === undefined
|
|
82
|
-
? await post(ctx, channel, undefined, text, { metadata })
|
|
83
|
-
: await update(ctx, channel, ts, text, { metadata });
|
|
157
|
+
? await post(ctx, channel, undefined, text, { metadata, blocks })
|
|
158
|
+
: await update(ctx, channel, ts, text, { metadata, blocks });
|
|
84
159
|
return written.ok ? ok(written.value.ts) : written;
|
|
85
160
|
}
|
|
86
161
|
/** The card's thread of a run: the Slack thread its card came from, else the thread whose first message lists the run. */
|
|
@@ -88,16 +163,9 @@ export async function threadOf(ctx, event, home) {
|
|
|
88
163
|
if (home.origin !== undefined)
|
|
89
164
|
return ok(home.origin.thread);
|
|
90
165
|
const lists = (p) => cardRoot.safeParse(p).data?.runs.includes(event.run) === true;
|
|
91
|
-
const found = await
|
|
166
|
+
const found = await findInChannel(ctx, home.channel, "edgar_card", lists);
|
|
92
167
|
return found.ok ? ok(found.value?.ts) : found;
|
|
93
168
|
}
|
|
94
|
-
/** The thread a new run's messages go in: the Slack thread its card came from, else the card's thread, opened by the run's first message about the card; a run with no card has none. */
|
|
95
|
-
export async function openThread(ctx, event, home) {
|
|
96
|
-
if (home.origin !== undefined)
|
|
97
|
-
return ok(home.origin.thread);
|
|
98
|
-
const card = noteCard(runCard.safeParse(event.payload).data);
|
|
99
|
-
return card === undefined ? ok(undefined) : await rootOf(ctx, home.channel, card, event.run);
|
|
100
|
-
}
|
|
101
169
|
/** The thread of a message that a person must see, for a run that can have no plan: the thread of `threadOf`, else the thread of `card`, which gets the run, so a run that a comment started still writes under its card. */
|
|
102
170
|
export async function cardThread(ctx, event, home, card) {
|
|
103
171
|
const thread = await threadOf(ctx, event, home);
|
|
@@ -106,9 +174,9 @@ export async function cardThread(ctx, event, home, card) {
|
|
|
106
174
|
return await rootOf(ctx, home.channel, card, event.run);
|
|
107
175
|
}
|
|
108
176
|
/** The card's thread in `channel`, opened by the card's line when the conversation has none, or none when `places` already holds that conversation. */
|
|
109
|
-
export async function oneMore(ctx, channel, card, run, places) {
|
|
177
|
+
export async function oneMore(ctx, channel, card, run, places, view) {
|
|
110
178
|
if (places.some((place) => place.channel === channel))
|
|
111
179
|
return ok(undefined);
|
|
112
|
-
const thread = card === undefined ? ok(undefined) : await rootOf(ctx, channel, card, run);
|
|
180
|
+
const thread = card === undefined ? ok(undefined) : await rootOf(ctx, channel, card, run, view);
|
|
113
181
|
return thread.ok ? ok({ channel, thread: thread.value }) : thread;
|
|
114
182
|
}
|