chatbot-agentic 1.0.8 → 1.0.10
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/cjs/aws/index.d.ts +4 -0
- package/dist/cjs/aws/services/AWSRekognition.d.ts +4 -1
- package/dist/cjs/aws/services/AWSRekognition.js +37 -1
- package/dist/cjs/aws/services/AWSRekognition.js.map +1 -1
- package/dist/cjs/aws/services/AWSTextTract.d.ts +2 -1
- package/dist/cjs/aws/services/AWSTextTract.js +18 -1
- package/dist/cjs/aws/services/AWSTextTract.js.map +1 -1
- package/dist/esm/aws/index.d.ts +4 -0
- package/dist/esm/aws/services/AWSRekognition.d.ts +4 -1
- package/dist/esm/aws/services/AWSRekognition.js +38 -2
- package/dist/esm/aws/services/AWSRekognition.js.map +1 -1
- package/dist/esm/aws/services/AWSTextTract.d.ts +2 -1
- package/dist/esm/aws/services/AWSTextTract.js +19 -2
- package/dist/esm/aws/services/AWSTextTract.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/aws/index.d.ts
CHANGED
|
@@ -21,8 +21,12 @@ export declare const AWS: {
|
|
|
21
21
|
};
|
|
22
22
|
Rekognition: {
|
|
23
23
|
startLableDetection: (data: import("@aws-sdk/client-rekognition").StartLabelDetectionCommandInput) => Promise<import("@aws-sdk/client-rekognition").StartLabelDetectionCommandOutput>;
|
|
24
|
+
getLabelDetection: (data: import("@aws-sdk/client-rekognition").GetLabelDetectionCommandInput) => Promise<import("@aws-sdk/client-rekognition").GetLabelDetectionCommandOutput>;
|
|
25
|
+
startTextDetection: (data: import("@aws-sdk/client-rekognition").StartTextDetectionCommandInput) => Promise<import("@aws-sdk/client-rekognition").StartTextDetectionCommandOutput>;
|
|
26
|
+
getTextDetection: (data: import("@aws-sdk/client-rekognition").GetTextDetectionCommandInput) => Promise<import("@aws-sdk/client-rekognition").GetTextDetectionCommandOutput>;
|
|
24
27
|
};
|
|
25
28
|
Textract: {
|
|
26
29
|
startDocumentTextDetection: (data: import("@aws-sdk/client-textract").StartDocumentTextDetectionCommandInput) => Promise<import("@aws-sdk/client-textract").StartDocumentTextDetectionCommandOutput>;
|
|
30
|
+
getDocumentTextDetection: (data: import("@aws-sdk/client-textract").GetDocumentTextDetectionCommandInput) => Promise<import("@aws-sdk/client-textract").GetDocumentTextDetectionCommandOutput>;
|
|
27
31
|
};
|
|
28
32
|
};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import { StartLabelDetectionCommandInput } from "@aws-sdk/client-rekognition";
|
|
1
|
+
import { GetLabelDetectionCommandInput, GetTextDetectionCommandInput, StartLabelDetectionCommandInput, StartTextDetectionCommandInput } from "@aws-sdk/client-rekognition";
|
|
2
2
|
export declare const Rekognition: {
|
|
3
3
|
startLableDetection: (data: StartLabelDetectionCommandInput) => Promise<import("@aws-sdk/client-rekognition").StartLabelDetectionCommandOutput>;
|
|
4
|
+
getLabelDetection: (data: GetLabelDetectionCommandInput) => Promise<import("@aws-sdk/client-rekognition").GetLabelDetectionCommandOutput>;
|
|
5
|
+
startTextDetection: (data: StartTextDetectionCommandInput) => Promise<import("@aws-sdk/client-rekognition").StartTextDetectionCommandOutput>;
|
|
6
|
+
getTextDetection: (data: GetTextDetectionCommandInput) => Promise<import("@aws-sdk/client-rekognition").GetTextDetectionCommandOutput>;
|
|
4
7
|
};
|
|
@@ -21,7 +21,43 @@ const startLableDetection = async (data) => {
|
|
|
21
21
|
throw error;
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
|
+
const startTextDetection = async (data) => {
|
|
25
|
+
try {
|
|
26
|
+
const command = new client_rekognition_1.StartTextDetectionCommand(data);
|
|
27
|
+
const response = await client.send(command);
|
|
28
|
+
return response;
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
console.info(`error occured while text lable detection`);
|
|
32
|
+
throw error;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
const getLabelDetection = async (data) => {
|
|
36
|
+
try {
|
|
37
|
+
const command = new client_rekognition_1.GetLabelDetectionCommand(data);
|
|
38
|
+
const response = await client.send(command);
|
|
39
|
+
return response;
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
console.info(`error occured while get lable detection details`);
|
|
43
|
+
throw error;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
const getTextDetection = async (data) => {
|
|
47
|
+
try {
|
|
48
|
+
const command = new client_rekognition_1.GetTextDetectionCommand(data);
|
|
49
|
+
const response = await client.send(command);
|
|
50
|
+
return response;
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
console.info(`error occured while get text detection details`);
|
|
54
|
+
throw error;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
24
57
|
exports.Rekognition = {
|
|
25
|
-
startLableDetection
|
|
58
|
+
startLableDetection,
|
|
59
|
+
getLabelDetection,
|
|
60
|
+
startTextDetection,
|
|
61
|
+
getTextDetection
|
|
26
62
|
};
|
|
27
63
|
//# sourceMappingURL=AWSRekognition.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AWSRekognition.js","sourceRoot":"","sources":["../../../../aws/services/AWSRekognition.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"AWSRekognition.js","sourceRoot":"","sources":["../../../../aws/services/AWSRekognition.ts"],"names":[],"mappings":";;;AAAA,oEAAwS;AAExS,MAAM,WAAW,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,MAAM,CAAC,CAAC;AAC7D,MAAM,SAAS,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,WAAW,CAAC,CAAC;AAClE,MAAM,MAAM,GAAG,IAAI,sCAAiB,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;AAE5D;;;;GAIG;AACH,MAAM,mBAAmB,GAAG,KAAK,EAAE,IAAoC,EAAG,EAAE;IAC1E,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,+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,CAAC,CAAC;QAC5C,OAAO,QAAQ,CAAC;IAClB,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,CAAC,IAAI,CAAC,gDAAgD,CAAC,CAAC;QAC/D,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAA;AAGY,QAAA,WAAW,GAAG;IACxB,mBAAmB;IACnB,iBAAiB;IACjB,kBAAkB;IAClB,gBAAgB;CAClB,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { StartDocumentTextDetectionCommandInput } from "@aws-sdk/client-textract";
|
|
1
|
+
import { StartDocumentTextDetectionCommandInput, GetDocumentTextDetectionCommandInput } from "@aws-sdk/client-textract";
|
|
2
2
|
export declare const Textract: {
|
|
3
3
|
startDocumentTextDetection: (data: StartDocumentTextDetectionCommandInput) => Promise<import("@aws-sdk/client-textract").StartDocumentTextDetectionCommandOutput>;
|
|
4
|
+
getDocumentTextDetection: (data: GetDocumentTextDetectionCommandInput) => Promise<import("@aws-sdk/client-textract").GetDocumentTextDetectionCommandOutput>;
|
|
4
5
|
};
|
|
@@ -21,7 +21,24 @@ const startDocumentTextDetection = async (data) => {
|
|
|
21
21
|
throw error;
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* This is used to get text detection details
|
|
26
|
+
* @param data
|
|
27
|
+
* @returns
|
|
28
|
+
*/
|
|
29
|
+
const getDocumentTextDetection = async (data) => {
|
|
30
|
+
try {
|
|
31
|
+
const command = new client_textract_1.GetDocumentTextDetectionCommand(data);
|
|
32
|
+
const response = await client.send(command);
|
|
33
|
+
return response;
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
console.info(`error occured while get text detection`);
|
|
37
|
+
throw error;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
24
40
|
exports.Textract = {
|
|
25
|
-
startDocumentTextDetection
|
|
41
|
+
startDocumentTextDetection,
|
|
42
|
+
getDocumentTextDetection
|
|
26
43
|
};
|
|
27
44
|
//# sourceMappingURL=AWSTextTract.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AWSTextTract.js","sourceRoot":"","sources":["../../../../aws/services/AWSTextTract.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"AWSTextTract.js","sourceRoot":"","sources":["../../../../aws/services/AWSTextTract.ts"],"names":[],"mappings":";;;AAAA,8DAA6M;AAE7M,MAAM,WAAW,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,MAAM,CAAC,CAAC;AAC7D,MAAM,SAAS,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,WAAW,CAAC,CAAC;AAClE,MAAM,MAAM,GAAG,IAAI,gCAAc,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;AAEzD;;;;GAIG;AACH,MAAM,0BAA0B,GAAG,KAAK,EAAE,IAA2C,EAAG,EAAE;IACxF,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,mDAAiC,CAAC,IAAI,CAAC,CAAC;QAC5D,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5C,OAAO,QAAQ,CAAC;IAClB,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,CAAC,IAAI,CAAC,oCAAoC,CAAC,CAAC;QACnD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAA;AAED;;;;GAIG;AACH,MAAM,wBAAwB,GAAG,KAAK,EAAE,IAAyC,EAAG,EAAE;IACpF,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,iDAA+B,CAAC,IAAI,CAAC,CAAC;QAC1D,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5C,OAAO,QAAQ,CAAC;IAClB,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,CAAC,IAAI,CAAC,wCAAwC,CAAC,CAAC;QACvD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAA;AAEY,QAAA,QAAQ,GAAG;IACrB,0BAA0B;IAC1B,wBAAwB;CAC1B,CAAA"}
|
package/dist/esm/aws/index.d.ts
CHANGED
|
@@ -21,8 +21,12 @@ export declare const AWS: {
|
|
|
21
21
|
};
|
|
22
22
|
Rekognition: {
|
|
23
23
|
startLableDetection: (data: import("@aws-sdk/client-rekognition").StartLabelDetectionCommandInput) => Promise<import("@aws-sdk/client-rekognition").StartLabelDetectionCommandOutput>;
|
|
24
|
+
getLabelDetection: (data: import("@aws-sdk/client-rekognition").GetLabelDetectionCommandInput) => Promise<import("@aws-sdk/client-rekognition").GetLabelDetectionCommandOutput>;
|
|
25
|
+
startTextDetection: (data: import("@aws-sdk/client-rekognition").StartTextDetectionCommandInput) => Promise<import("@aws-sdk/client-rekognition").StartTextDetectionCommandOutput>;
|
|
26
|
+
getTextDetection: (data: import("@aws-sdk/client-rekognition").GetTextDetectionCommandInput) => Promise<import("@aws-sdk/client-rekognition").GetTextDetectionCommandOutput>;
|
|
24
27
|
};
|
|
25
28
|
Textract: {
|
|
26
29
|
startDocumentTextDetection: (data: import("@aws-sdk/client-textract").StartDocumentTextDetectionCommandInput) => Promise<import("@aws-sdk/client-textract").StartDocumentTextDetectionCommandOutput>;
|
|
30
|
+
getDocumentTextDetection: (data: import("@aws-sdk/client-textract").GetDocumentTextDetectionCommandInput) => Promise<import("@aws-sdk/client-textract").GetDocumentTextDetectionCommandOutput>;
|
|
27
31
|
};
|
|
28
32
|
};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import { StartLabelDetectionCommandInput } from "@aws-sdk/client-rekognition";
|
|
1
|
+
import { GetLabelDetectionCommandInput, GetTextDetectionCommandInput, StartLabelDetectionCommandInput, StartTextDetectionCommandInput } from "@aws-sdk/client-rekognition";
|
|
2
2
|
export declare const Rekognition: {
|
|
3
3
|
startLableDetection: (data: StartLabelDetectionCommandInput) => Promise<import("@aws-sdk/client-rekognition").StartLabelDetectionCommandOutput>;
|
|
4
|
+
getLabelDetection: (data: GetLabelDetectionCommandInput) => Promise<import("@aws-sdk/client-rekognition").GetLabelDetectionCommandOutput>;
|
|
5
|
+
startTextDetection: (data: StartTextDetectionCommandInput) => Promise<import("@aws-sdk/client-rekognition").StartTextDetectionCommandOutput>;
|
|
6
|
+
getTextDetection: (data: GetTextDetectionCommandInput) => Promise<import("@aws-sdk/client-rekognition").GetTextDetectionCommandOutput>;
|
|
4
7
|
};
|
|
@@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import { RekognitionClient, StartLabelDetectionCommand } from "@aws-sdk/client-rekognition";
|
|
10
|
+
import { GetLabelDetectionCommand, GetTextDetectionCommand, RekognitionClient, StartLabelDetectionCommand, StartTextDetectionCommand } from "@aws-sdk/client-rekognition";
|
|
11
11
|
const environment = (process.env.NODE_ENVIRONMENT || 'Test');
|
|
12
12
|
const awsRegion = (process.env.AWS_DEFAULT_REGION || 'us-east-1');
|
|
13
13
|
const client = new RekognitionClient({ region: awsRegion });
|
|
@@ -27,7 +27,43 @@ const startLableDetection = (data) => __awaiter(void 0, void 0, void 0, function
|
|
|
27
27
|
throw error;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
+
const startTextDetection = (data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
31
|
+
try {
|
|
32
|
+
const command = new StartTextDetectionCommand(data);
|
|
33
|
+
const response = yield client.send(command);
|
|
34
|
+
return response;
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
console.info(`error occured while text lable detection`);
|
|
38
|
+
throw error;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
const getLabelDetection = (data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
42
|
+
try {
|
|
43
|
+
const command = new GetLabelDetectionCommand(data);
|
|
44
|
+
const response = yield client.send(command);
|
|
45
|
+
return response;
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
console.info(`error occured while get lable detection details`);
|
|
49
|
+
throw error;
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
const getTextDetection = (data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
53
|
+
try {
|
|
54
|
+
const command = new GetTextDetectionCommand(data);
|
|
55
|
+
const response = yield client.send(command);
|
|
56
|
+
return response;
|
|
57
|
+
}
|
|
58
|
+
catch (error) {
|
|
59
|
+
console.info(`error occured while get text detection details`);
|
|
60
|
+
throw error;
|
|
61
|
+
}
|
|
62
|
+
});
|
|
30
63
|
export const Rekognition = {
|
|
31
|
-
startLableDetection
|
|
64
|
+
startLableDetection,
|
|
65
|
+
getLabelDetection,
|
|
66
|
+
startTextDetection,
|
|
67
|
+
getTextDetection
|
|
32
68
|
};
|
|
33
69
|
//# sourceMappingURL=AWSRekognition.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AWSRekognition.js","sourceRoot":"","sources":["../../../../aws/services/AWSRekognition.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAC,0BAA0B,EAAoC,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"AWSRekognition.js","sourceRoot":"","sources":["../../../../aws/services/AWSRekognition.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,wBAAwB,EAAiC,uBAAuB,EAAgC,iBAAiB,EAAC,0BAA0B,EAAkC,yBAAyB,EAAoC,MAAM,6BAA6B,CAAC;AAExS,MAAM,WAAW,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,MAAM,CAAC,CAAC;AAC7D,MAAM,SAAS,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,WA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CAAC;AACH,CAAC,CAAA,CAAA;AAED,MAAM,gBAAgB,GAAG,CAAO,IAAiC,EAAG,EAAE;IACpE,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,uBAAuB,CAAC,IAAI,CAAC,CAAC;QAClD,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5C,OAAO,QAAQ,CAAC;IAClB,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,CAAC,IAAI,CAAC,gDAAgD,CAAC,CAAC;QAC/D,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAA,CAAA;AAGD,MAAM,CAAC,MAAM,WAAW,GAAG;IACxB,mBAAmB;IACnB,iBAAiB;IACjB,kBAAkB;IAClB,gBAAgB;CAClB,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { StartDocumentTextDetectionCommandInput } from "@aws-sdk/client-textract";
|
|
1
|
+
import { StartDocumentTextDetectionCommandInput, GetDocumentTextDetectionCommandInput } from "@aws-sdk/client-textract";
|
|
2
2
|
export declare const Textract: {
|
|
3
3
|
startDocumentTextDetection: (data: StartDocumentTextDetectionCommandInput) => Promise<import("@aws-sdk/client-textract").StartDocumentTextDetectionCommandOutput>;
|
|
4
|
+
getDocumentTextDetection: (data: GetDocumentTextDetectionCommandInput) => Promise<import("@aws-sdk/client-textract").GetDocumentTextDetectionCommandOutput>;
|
|
4
5
|
};
|
|
@@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import { TextractClient, StartDocumentTextDetectionCommand } from "@aws-sdk/client-textract";
|
|
10
|
+
import { TextractClient, StartDocumentTextDetectionCommand, GetDocumentTextDetectionCommand } from "@aws-sdk/client-textract";
|
|
11
11
|
const environment = (process.env.NODE_ENVIRONMENT || 'Test');
|
|
12
12
|
const awsRegion = (process.env.AWS_DEFAULT_REGION || 'us-east-1');
|
|
13
13
|
const client = new TextractClient({ region: awsRegion });
|
|
@@ -27,7 +27,24 @@ const startDocumentTextDetection = (data) => __awaiter(void 0, void 0, void 0, f
|
|
|
27
27
|
throw error;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
+
/**
|
|
31
|
+
* This is used to get text detection details
|
|
32
|
+
* @param data
|
|
33
|
+
* @returns
|
|
34
|
+
*/
|
|
35
|
+
const getDocumentTextDetection = (data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
36
|
+
try {
|
|
37
|
+
const command = new GetDocumentTextDetectionCommand(data);
|
|
38
|
+
const response = yield client.send(command);
|
|
39
|
+
return response;
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
console.info(`error occured while get text detection`);
|
|
43
|
+
throw error;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
30
46
|
export const Textract = {
|
|
31
|
-
startDocumentTextDetection
|
|
47
|
+
startDocumentTextDetection,
|
|
48
|
+
getDocumentTextDetection
|
|
32
49
|
};
|
|
33
50
|
//# sourceMappingURL=AWSTextTract.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AWSTextTract.js","sourceRoot":"","sources":["../../../../aws/services/AWSTextTract.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,cAAc,EAAE,iCAAiC,
|
|
1
|
+
{"version":3,"file":"AWSTextTract.js","sourceRoot":"","sources":["../../../../aws/services/AWSTextTract.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,cAAc,EAAE,iCAAiC,EAAgF,+BAA+B,EAAG,MAAM,0BAA0B,CAAC;AAE7M,MAAM,WAAW,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,MAAM,CAAC,CAAC;AAC7D,MAAM,SAAS,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,I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