@workglow/tasks 0.0.84 → 0.0.85

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.
@@ -41,6 +41,7 @@ declare const inputSchema: {
41
41
  readonly enum: readonly ["json", "text", "blob", "arraybuffer"];
42
42
  }];
43
43
  readonly title: "Response Type";
44
+ readonly description: "The forced type of response to return. If null, the response type is inferred from the Content-Type header.";
44
45
  readonly default: null;
45
46
  };
46
47
  readonly timeout: {
@@ -82,6 +83,23 @@ declare const outputSchema: {
82
83
  readonly title: "ArrayBuffer";
83
84
  readonly description: "The arraybuffer response";
84
85
  };
86
+ readonly metadata: {
87
+ readonly type: "object";
88
+ readonly properties: {
89
+ readonly contentType: {
90
+ readonly type: "string";
91
+ };
92
+ readonly headers: {
93
+ readonly type: "object";
94
+ readonly additionalProperties: {
95
+ readonly type: "string";
96
+ };
97
+ };
98
+ };
99
+ readonly additionalProperties: false;
100
+ readonly title: "Response Metadata";
101
+ readonly description: "HTTP response metadata including content type and headers";
102
+ };
85
103
  };
86
104
  readonly additionalProperties: false;
87
105
  };
@@ -146,6 +164,7 @@ export declare class FetchUrlTask<Input extends FetchUrlTaskInput = FetchUrlTask
146
164
  readonly enum: readonly ["json", "text", "blob", "arraybuffer"];
147
165
  }];
148
166
  readonly title: "Response Type";
167
+ readonly description: "The forced type of response to return. If null, the response type is inferred from the Content-Type header.";
149
168
  readonly default: null;
150
169
  };
151
170
  readonly timeout: {
@@ -187,6 +206,23 @@ export declare class FetchUrlTask<Input extends FetchUrlTaskInput = FetchUrlTask
187
206
  readonly title: "ArrayBuffer";
188
207
  readonly description: "The arraybuffer response";
189
208
  };
209
+ readonly metadata: {
210
+ readonly type: "object";
211
+ readonly properties: {
212
+ readonly contentType: {
213
+ readonly type: "string";
214
+ };
215
+ readonly headers: {
216
+ readonly type: "object";
217
+ readonly additionalProperties: {
218
+ readonly type: "string";
219
+ };
220
+ };
221
+ };
222
+ readonly additionalProperties: false;
223
+ readonly title: "Response Metadata";
224
+ readonly description: "HTTP response metadata including content type and headers";
225
+ };
190
226
  };
191
227
  readonly additionalProperties: false;
192
228
  };
@@ -1 +1 @@
1
- {"version":3,"file":"FetchUrlTask.d.ts","sourceRoot":"","sources":["../../src/task/FetchUrlTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAEL,kBAAkB,EAClB,GAAG,EAGJ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,cAAc,EACd,YAAY,EACZ,kBAAkB,EAKnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5D,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+CkB,CAAC;AAEpC,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;CAsBiB,CAAC;AAEpC,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAC/D,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AAEjE,MAAM,MAAM,kBAAkB,GAAG,kBAAkB,CAAC;AA+DpD;;;GAGG;AACH,qBAAa,WAAW,CACtB,KAAK,SAAS,iBAAiB,GAAG,iBAAiB,EACnD,MAAM,GAAG,kBAAkB,CAC3B,SAAQ,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC;gBACd,MAAM,GAAE,kBAAkB,GAAG;QAAE,KAAK,EAAE,KAAK,CAAA;KAA2B;IAGlF,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAiB;IAC7C;;OAEG;IACG,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC;CA8E1E;AAED;;GAEG;AACH,qBAAa,YAAY,CACvB,KAAK,SAAS,iBAAiB,GAAG,iB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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAI1B;;;;OAIG;IACa,YAAY,IAAI,cAAc;gBAiDlC,KAAK,GAAE,KAAmB,EAAE,MAAM,GAAE,MAAqB;IASrE;;;OAGG;IACa,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI;cA4BjC,mBAAmB,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;CAgBxF;AAID,eAAO,MAAM,QAAQ,GACnB,OAAO,iBAAiB,EACxB,SAAQ,kBAAuB,KAC9B,OAAO,CAAC,kBAAkB,CAG5B,CAAC;AAEF,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,QAAQ;QAChB,KAAK,EAAE,cAAc,CAAC,iBAAiB,EAAE,kBAAkB,EAAE,kBAAkB,CAAC,CAAC;KAClF;CACF"}
@@ -0,0 +1,162 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Steven Roussey <sroussey@gmail.com>
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { CreateWorkflow, IExecuteContext, JobQueueTaskConfig, Task } from "@workglow/task-graph";
7
+ import { DataPortSchema, FromSchema } from "@workglow/util";
8
+ import { FetchUrlTaskOutput } from "./FetchUrlTask";
9
+ declare const inputSchema: {
10
+ readonly type: "object";
11
+ readonly properties: {
12
+ readonly url: {
13
+ readonly type: "string";
14
+ readonly title: "URL";
15
+ readonly description: "URL to load document from (http://, https://)";
16
+ readonly format: "uri";
17
+ };
18
+ readonly format: {
19
+ readonly type: "string";
20
+ readonly enum: readonly ["text", "markdown", "json", "csv", "pdf", "image", "html", "auto"];
21
+ readonly title: "Format";
22
+ readonly description: "File format (auto-detected from URL if 'auto')";
23
+ readonly default: "auto";
24
+ };
25
+ };
26
+ readonly required: readonly ["url"];
27
+ readonly additionalProperties: false;
28
+ };
29
+ declare const outputSchema: {
30
+ readonly type: "object";
31
+ readonly properties: {
32
+ readonly text: {
33
+ readonly type: "string";
34
+ readonly title: "Text";
35
+ readonly description: "Text content (for text, markdown, html formats)";
36
+ };
37
+ readonly json: {
38
+ readonly title: "JSON";
39
+ readonly description: "Parsed JSON object or array";
40
+ };
41
+ readonly csv: {
42
+ readonly type: "array";
43
+ readonly title: "CSV";
44
+ readonly description: "Parsed CSV data as array of objects";
45
+ };
46
+ readonly image: {
47
+ readonly type: "string";
48
+ readonly title: "Image";
49
+ readonly description: "Base64 data URL for image files";
50
+ readonly format: "image:data-uri";
51
+ };
52
+ readonly pdf: {
53
+ readonly type: "string";
54
+ readonly title: "PDF";
55
+ readonly description: "Base64 data URL for PDF files";
56
+ };
57
+ readonly metadata: {
58
+ readonly type: "object";
59
+ readonly properties: {
60
+ readonly url: {
61
+ readonly type: "string";
62
+ };
63
+ readonly format: {
64
+ readonly type: "string";
65
+ };
66
+ readonly size: {
67
+ readonly type: "number";
68
+ };
69
+ readonly title: {
70
+ readonly type: "string";
71
+ };
72
+ readonly mimeType: {
73
+ readonly type: "string";
74
+ };
75
+ };
76
+ readonly additionalProperties: false;
77
+ readonly title: "Metadata";
78
+ readonly description: "File metadata";
79
+ };
80
+ };
81
+ readonly required: readonly ["metadata"];
82
+ readonly additionalProperties: false;
83
+ };
84
+ export type FileLoaderTaskInput = FromSchema<typeof inputSchema>;
85
+ export type FileLoaderTaskOutput = FromSchema<typeof outputSchema>;
86
+ /**
87
+ * Task for loading documents from URLs (including file:// URLs).
88
+ * Works in all environments (browser, Node.js, Bun) by using fetch API.
89
+ * For server-only filesystem path access, see FileLoaderServerTask.
90
+ */
91
+ export declare class FileLoaderTask extends Task<FileLoaderTaskInput, FileLoaderTaskOutput, JobQueueTaskConfig> {
92
+ static type: string;
93
+ static category: string;
94
+ static title: string;
95
+ static description: string;
96
+ static cacheable: boolean;
97
+ static inputSchema(): DataPortSchema;
98
+ static outputSchema(): DataPortSchema;
99
+ execute(input: FileLoaderTaskInput, context: IExecuteContext): Promise<FileLoaderTaskOutput>;
100
+ /**
101
+ * Parse JSON content
102
+ */
103
+ protected parseJsonContent(content: string): unknown;
104
+ /**
105
+ * Parse CSV content into array of objects
106
+ */
107
+ protected parseCsvContent(content: string): Array<Record<string, string>>;
108
+ /**
109
+ * Parse the fetch response into typed outputs
110
+ */
111
+ protected parseResponse(response: FetchUrlTaskOutput, url: string, detectedFormat: "text" | "markdown" | "json" | "csv" | "pdf" | "image" | "html"): Promise<{
112
+ readonly text: string | undefined;
113
+ readonly json: unknown | undefined;
114
+ readonly csv: Array<Record<string, string>> | undefined;
115
+ readonly image: string | undefined;
116
+ readonly pdf: string | undefined;
117
+ readonly size: number;
118
+ readonly mimeType: string;
119
+ }>;
120
+ /**
121
+ * Detect the appropriate response type for fetching based on the detected format
122
+ * @param detectedFormat - The detected format
123
+ * @returns The appropriate response type
124
+ */
125
+ protected detectResponseType(detectedFormat: string): "text" | "json" | "blob" | "arraybuffer";
126
+ /**
127
+ *
128
+ * @param url - The URL to detect the format from
129
+ * @param format - The format (assuming "auto" if not provided)
130
+ * @returns
131
+ */
132
+ protected detectFormat(url: string, format: "text" | "markdown" | "json" | "csv" | "pdf" | "image" | "html" | "auto"): "text" | "markdown" | "json" | "csv" | "pdf" | "image" | "html";
133
+ /**
134
+ * Get image MIME type based on URL extension
135
+ */
136
+ protected getImageMimeType(url: string): string;
137
+ /**
138
+ * Convert Blob to base64 data URL
139
+ */
140
+ protected blobToBase64DataURL(blob: Blob, mimeType: string): Promise<string>;
141
+ }
142
+ export declare const fileLoader: (input: FileLoaderTaskInput, config?: JobQueueTaskConfig) => Promise<{
143
+ text?: string | undefined;
144
+ json?: unknown;
145
+ csv?: unknown[] | undefined;
146
+ pdf?: string | undefined;
147
+ image?: string | undefined;
148
+ metadata: {
149
+ format?: string | undefined;
150
+ title?: string | undefined;
151
+ url?: string | undefined;
152
+ size?: number | undefined;
153
+ mimeType?: string | undefined;
154
+ };
155
+ }>;
156
+ declare module "@workglow/task-graph" {
157
+ interface Workflow {
158
+ fileLoader: CreateWorkflow<FileLoaderTaskInput, FileLoaderTaskOutput, JobQueueTaskConfig>;
159
+ }
160
+ }
161
+ export {};
162
+ //# sourceMappingURL=FileLoaderTask.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileLoaderTask.d.ts","sourceRoot":"","sources":["../../src/task/FileLoaderTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,IAAI,EAIL,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5D,OAAO,EAAgB,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAElE,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;CAmBkB,CAAC;AAEpC,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CiB,CAAC;AAEpC,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AACjE,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AAEnE;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,IAAI,CACtC,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,CACnB;IACC,OAAc,IAAI,SAAoB;IACtC,OAAc,QAAQ,SAAc;IACpC,OAAc,KAAK,SAAiB;IACpC,OAAc,WAAW,SAAkD;IAC3E,OAAc,SAAS,UAAQ;WAEjB,WAAW,IAAI,cAAc;WAI7B,YAAY,IAAI,cAAc;IAItC,OAAO,CACX,KAAK,EAAE,mBAAmB,EAC1B,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,oBAAoB,CAAC;IA0DhC;;OAEG;IACH,SAAS,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAIpD;;OAEG;IACH,SAAS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AAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAwBnF;AAID,eAAO,MAAM,UAAU,GAAI,OAAO,mBAAmB,EAAE,SAAS,kBAAkB;;;;;;;;;;;;;EAEjF,CAAC;AAEF,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,QAAQ;QAChB,UAAU,EAAE,cAAc,CAAC,mBAAmB,EAAE,oBAAoB,EAAE,kBAAkB,CAAC,CAAC;KAC3F;CACF"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Steven Roussey <sroussey@gmail.com>
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { CreateWorkflow, IExecuteContext, JobQueueTaskConfig } from "@workglow/task-graph";
7
+ import { FileLoaderTask as BaseFileLoaderTask, FileLoaderTaskInput, FileLoaderTaskOutput } from "./FileLoaderTask";
8
+ export { FileLoaderTaskInput, FileLoaderTaskOutput };
9
+ /**
10
+ * Server-only task for loading documents from the filesystem.
11
+ * Uses Node.js/Bun file APIs directly for better performance.
12
+ * Only available in Node.js and Bun environments.
13
+ *
14
+ * For cross-platform document loading (including browser), use FileLoaderTask with URLs.
15
+ */
16
+ export declare class FileLoaderTask extends BaseFileLoaderTask {
17
+ execute(input: FileLoaderTaskInput, context: IExecuteContext): Promise<FileLoaderTaskOutput>;
18
+ }
19
+ export declare const fileLoader: (input: FileLoaderTaskInput, config?: JobQueueTaskConfig) => Promise<{
20
+ text?: string | undefined;
21
+ json?: unknown;
22
+ csv?: unknown[] | undefined;
23
+ pdf?: string | undefined;
24
+ image?: string | undefined;
25
+ metadata: {
26
+ format?: string | undefined;
27
+ title?: string | undefined;
28
+ url?: string | undefined;
29
+ size?: number | undefined;
30
+ mimeType?: string | undefined;
31
+ };
32
+ }>;
33
+ declare module "@workglow/task-graph" {
34
+ interface Workflow {
35
+ fileLoaderServer: CreateWorkflow<FileLoaderTaskInput, FileLoaderTaskOutput, JobQueueTaskConfig>;
36
+ }
37
+ }
38
+ //# sourceMappingURL=FileLoaderTask.server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileLoaderTask.server.d.ts","sourceRoot":"","sources":["../../src/task/FileLoaderTask.server.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,cAAc,EACd,eAAe,EACf,kBAAkB,EAInB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EACL,cAAc,IAAI,kBAAkB,EACpC,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,CAAC;AAErD;;;;;;GAMG;AACH,qBAAa,cAAe,SAAQ,kBAAkB;IAC9C,OAAO,CACX,KAAK,EAAE,mBAAmB,EAC1B,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,oBAAoB,CAAC;CAiLjC;AAKD,eAAO,MAAM,UAAU,GAAI,OAAO,mBAAmB,EAAE,SAAS,kBAAkB;;;;;;;;;;;;;EAEjF,CAAC;AAEF,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,QAAQ;QAChB,gBAAgB,EAAE,cAAc,CAAC,mBAAmB,EAAE,oBAAoB,EAAE,kBAAkB,CAAC,CAAC;KACjG;CACF"}
package/dist/types.d.ts CHANGED
@@ -3,5 +3,6 @@
3
3
  * Copyright 2025 Steven Roussey <sroussey@gmail.com>
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- export * from "./index";
6
+ export * from "./common";
7
+ export * from "./task/FileLoaderTask";
7
8
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,uBAAuB,CAAC"}
package/package.json CHANGED
@@ -1,25 +1,31 @@
1
1
  {
2
2
  "name": "@workglow/tasks",
3
3
  "type": "module",
4
- "version": "0.0.84",
4
+ "version": "0.0.85",
5
5
  "description": "Pre-built task implementations for Workglow, including common AI operations and utility functions.",
6
6
  "scripts": {
7
7
  "watch": "concurrently -c 'auto' 'bun:watch-*'",
8
- "watch-code": "bun build --watch --no-clear-screen --target=browser --sourcemap=external --packages=external --outdir ./dist ./src/index.ts",
8
+ "watch-browser": "bun build --watch --no-clear-screen --target=browser --sourcemap=external --packages=external --outdir ./dist ./src/browser.ts",
9
+ "watch-node": "bun build --watch --no-clear-screen --target=node --sourcemap=external --packages=external --outdir ./dist ./src/node.ts",
10
+ "watch-bun": "bun build --watch --no-clear-screen --target=bun --sourcemap=external --packages=external --outdir ./dist ./src/bun.ts",
9
11
  "watch-types": "tsc --watch --preserveWatchOutput",
10
- "build-package": "bun run build-clean && concurrently -c 'auto' -n 'code,types' 'bun run build-code' 'bun run build-types'",
12
+ "build-package": "bun run build-clean && concurrently -c 'auto' -n 'browser,node,bun,types' 'bun run build-browser' 'bun run build-node' 'bun run build-bun' 'bun run build-types'",
11
13
  "build-clean": "rm -fr dist/*",
12
- "build-code": "bun build --target=browser --sourcemap=external --packages=external --outdir ./dist ./src/index.ts",
14
+ "build-browser": "bun build --target=browser --sourcemap=external --packages=external --outdir ./dist ./src/browser.ts",
15
+ "build-node": "bun build --target=node --sourcemap=external --packages=external --outdir ./dist ./src/node.ts",
16
+ "build-bun": "bun build --target=bun --sourcemap=external --packages=external --outdir ./dist ./src/bun.ts",
13
17
  "build-types": "rm -f tsconfig.tsbuildinfo && tsc",
14
18
  "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
15
19
  "test": "bun test",
16
- "prepare": "node -e \"const pkg=require('./package.json');pkg.exports['.'].bun='./dist/index.js';pkg.exports['.'].types='./dist/types.d.ts';require('fs').writeFileSync('package.json',JSON.stringify(pkg,null,2))\""
20
+ "prepare": "node -e \"const pkg=require('./package.json');pkg.exports['.'].bun='./dist/bun.js';pkg.exports['.'].types='./dist/types.d.ts';require('fs').writeFileSync('package.json',JSON.stringify(pkg,null,2))\""
17
21
  },
18
22
  "exports": {
19
23
  ".": {
20
- "bun": "./dist/index.js",
24
+ "react-native": "./dist/browser.js",
25
+ "browser": "./dist/browser.js",
26
+ "bun": "./dist/bun.js",
21
27
  "types": "./dist/types.d.ts",
22
- "import": "./dist/index.js"
28
+ "import": "./dist/node.js"
23
29
  }
24
30
  },
25
31
  "files": [
@@ -30,10 +36,10 @@
30
36
  "access": "public"
31
37
  },
32
38
  "peerDependencies": {
33
- "@workglow/task-graph": "0.0.84",
34
- "@workglow/util": "0.0.84",
35
- "@workglow/job-queue": "0.0.84",
36
- "@workglow/storage": "0.0.84"
39
+ "@workglow/task-graph": "0.0.85",
40
+ "@workglow/util": "0.0.85",
41
+ "@workglow/job-queue": "0.0.85",
42
+ "@workglow/storage": "0.0.85"
37
43
  },
38
44
  "peerDependenciesMeta": {
39
45
  "@workglow/task-graph": {
@@ -50,9 +56,12 @@
50
56
  }
51
57
  },
52
58
  "devDependencies": {
53
- "@workglow/job-queue": "0.0.84",
54
- "@workglow/storage": "0.0.84",
55
- "@workglow/task-graph": "0.0.84",
56
- "@workglow/util": "0.0.84"
59
+ "@workglow/job-queue": "0.0.85",
60
+ "@workglow/storage": "0.0.85",
61
+ "@workglow/task-graph": "0.0.85",
62
+ "@workglow/util": "0.0.85"
63
+ },
64
+ "dependencies": {
65
+ "csv-parse": "^6.1.0"
57
66
  }
58
67
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC"}