@lokalise/content-conversion-schemas 5.5.0 → 5.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/common.d.ts +3 -0
- package/dist/api/common.d.ts.map +1 -0
- package/dist/api/common.js +3 -0
- package/dist/api/common.js.map +1 -0
- package/dist/api/contentObjects.d.ts +98 -89
- package/dist/api/contentObjects.d.ts.map +1 -1
- package/dist/api/contentObjects.js +1 -45
- package/dist/api/contentObjects.js.map +1 -1
- package/dist/api/contentObjectsNew.d.ts +261 -9
- package/dist/api/contentObjectsNew.d.ts.map +1 -1
- package/dist/api/contentObjectsNew.js +12 -6
- package/dist/api/contentObjectsNew.js.map +1 -1
- package/dist/api/exportObjects.d.ts.map +1 -1
- package/dist/api/exportObjects.js +2 -1
- package/dist/api/exportObjects.js.map +1 -1
- package/dist/api/generationObjects.d.ts +294 -6
- package/dist/api/generationObjects.d.ts.map +1 -1
- package/dist/api/textUnit.d.ts +202 -0
- package/dist/api/textUnit.d.ts.map +1 -0
- package/dist/api/textUnit.js +54 -0
- package/dist/api/textUnit.js.map +1 -0
- package/dist/events/conversion.d.ts +759 -21
- package/dist/events/conversion.d.ts.map +1 -1
- package/dist/events/export.d.ts.map +1 -1
- package/dist/events/export.js +2 -1
- package/dist/events/export.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/api/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B,eAAO,MAAM,gBAAgB,aAA4B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/api/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA"}
|
|
@@ -19,90 +19,6 @@
|
|
|
19
19
|
* RawContentItem represents the content item before parsing, while ParsedContentItem represents the content item after parsing.
|
|
20
20
|
*/
|
|
21
21
|
import { z } from 'zod/v4';
|
|
22
|
-
export declare const TextCodeTypeEnum: {
|
|
23
|
-
readonly OPENING: "OPENING";
|
|
24
|
-
readonly CLOSING: "CLOSING";
|
|
25
|
-
readonly PLACEHOLDER: "PLACEHOLDER";
|
|
26
|
-
};
|
|
27
|
-
export type TextCodeType = (typeof TextCodeTypeEnum)[keyof typeof TextCodeTypeEnum];
|
|
28
|
-
export declare const TEXT_CODE_SCHEMA: z.ZodObject<{
|
|
29
|
-
id: z.ZodString;
|
|
30
|
-
type: z.ZodEnum<{
|
|
31
|
-
readonly OPENING: "OPENING";
|
|
32
|
-
readonly CLOSING: "CLOSING";
|
|
33
|
-
readonly PLACEHOLDER: "PLACEHOLDER";
|
|
34
|
-
}>;
|
|
35
|
-
value: z.ZodString;
|
|
36
|
-
attributes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
37
|
-
parser: z.ZodDefault<z.ZodLiteral<"okapi">>;
|
|
38
|
-
}, z.core.$strip>;
|
|
39
|
-
export declare const TEXT_SEGMENT_SCHEMA: z.ZodString;
|
|
40
|
-
export declare const TEXT_UNIT_SCHEMA: z.ZodObject<{
|
|
41
|
-
id: z.ZodString;
|
|
42
|
-
name: z.ZodOptional<z.ZodString>;
|
|
43
|
-
locale: z.ZodOptional<z.ZodString>;
|
|
44
|
-
isTranslatable: z.ZodBoolean;
|
|
45
|
-
source: z.ZodObject<{
|
|
46
|
-
textCodes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
47
|
-
id: z.ZodString;
|
|
48
|
-
type: z.ZodEnum<{
|
|
49
|
-
readonly OPENING: "OPENING";
|
|
50
|
-
readonly CLOSING: "CLOSING";
|
|
51
|
-
readonly PLACEHOLDER: "PLACEHOLDER";
|
|
52
|
-
}>;
|
|
53
|
-
value: z.ZodString;
|
|
54
|
-
attributes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
55
|
-
parser: z.ZodDefault<z.ZodLiteral<"okapi">>;
|
|
56
|
-
}, z.core.$strip>>>>;
|
|
57
|
-
hasBeenSegmented: z.ZodBoolean;
|
|
58
|
-
segments: z.ZodArray<z.ZodString>;
|
|
59
|
-
}, z.core.$strip>;
|
|
60
|
-
metadata: z.ZodOptional<z.ZodObject<{
|
|
61
|
-
pptxAttributes: z.ZodOptional<z.ZodObject<{
|
|
62
|
-
slideNumber: z.ZodNumber;
|
|
63
|
-
slideType: z.ZodEnum<{
|
|
64
|
-
readonly LAYOUT: "LAYOUT";
|
|
65
|
-
readonly NOTES: "NOTES";
|
|
66
|
-
readonly MASTER_NOTES: "MASTER_NOTES";
|
|
67
|
-
readonly SLIDE: "SLIDE";
|
|
68
|
-
readonly MASTER_SLIDE: "MASTER_SLIDE";
|
|
69
|
-
readonly CHART: "CHART";
|
|
70
|
-
readonly UNKNOWN: "UNKNOWN";
|
|
71
|
-
}>;
|
|
72
|
-
}, z.core.$strip>>;
|
|
73
|
-
xcstrings: z.ZodOptional<z.ZodObject<{
|
|
74
|
-
state: z.ZodOptional<z.ZodString>;
|
|
75
|
-
shouldTranslate: z.ZodOptional<z.ZodBoolean>;
|
|
76
|
-
extractionState: z.ZodOptional<z.ZodString>;
|
|
77
|
-
localizationType: z.ZodEnum<{
|
|
78
|
-
readonly STRING_UNIT: "STRING_UNIT";
|
|
79
|
-
readonly SUBSTITUTIONS: "SUBSTITUTIONS";
|
|
80
|
-
readonly PLURAL_VARIATION: "PLURAL_VARIATION";
|
|
81
|
-
readonly DEVICE_VARIATION: "DEVICE_VARIATION";
|
|
82
|
-
readonly DEVICE_PLURAL_VARIATION: "DEVICE_PLURAL_VARIATION";
|
|
83
|
-
}>;
|
|
84
|
-
keyPath: z.ZodString;
|
|
85
|
-
device: z.ZodOptional<z.ZodEnum<{
|
|
86
|
-
readonly MAC: "MAC";
|
|
87
|
-
readonly IPHONE: "IPHONE";
|
|
88
|
-
readonly APPLE_WATCH: "APPLE_WATCH";
|
|
89
|
-
readonly IPAD: "IPAD";
|
|
90
|
-
readonly OTHER: "OTHER";
|
|
91
|
-
}>>;
|
|
92
|
-
pluralForm: z.ZodOptional<z.ZodEnum<{
|
|
93
|
-
readonly ZERO: "ZERO";
|
|
94
|
-
readonly ONE: "ONE";
|
|
95
|
-
readonly TWO: "TWO";
|
|
96
|
-
readonly FEW: "FEW";
|
|
97
|
-
readonly MANY: "MANY";
|
|
98
|
-
readonly OTHER: "OTHER";
|
|
99
|
-
}>>;
|
|
100
|
-
formatSpecifier: z.ZodOptional<z.ZodString>;
|
|
101
|
-
argNum: z.ZodOptional<z.ZodNumber>;
|
|
102
|
-
isPlural: z.ZodBoolean;
|
|
103
|
-
}, z.core.$strip>>;
|
|
104
|
-
}, z.core.$strip>>;
|
|
105
|
-
}, z.core.$strip>;
|
|
106
22
|
export declare const RAW_CONTENT_UNIT_SCHEMA: z.ZodObject<{
|
|
107
23
|
id: z.ZodString;
|
|
108
24
|
type: z.ZodEnum<{
|
|
@@ -156,7 +72,6 @@ export declare const PARSED_CONTENT_UNIT_SCHEMA: z.ZodObject<{
|
|
|
156
72
|
textUnits: z.ZodArray<z.ZodObject<{
|
|
157
73
|
id: z.ZodString;
|
|
158
74
|
name: z.ZodOptional<z.ZodString>;
|
|
159
|
-
locale: z.ZodOptional<z.ZodString>;
|
|
160
75
|
isTranslatable: z.ZodBoolean;
|
|
161
76
|
source: z.ZodObject<{
|
|
162
77
|
textCodes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
@@ -173,6 +88,55 @@ export declare const PARSED_CONTENT_UNIT_SCHEMA: z.ZodObject<{
|
|
|
173
88
|
hasBeenSegmented: z.ZodBoolean;
|
|
174
89
|
segments: z.ZodArray<z.ZodString>;
|
|
175
90
|
}, z.core.$strip>;
|
|
91
|
+
targets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
92
|
+
hasBeenSegmented: z.ZodBoolean;
|
|
93
|
+
segments: z.ZodArray<z.ZodString>;
|
|
94
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
95
|
+
pptxAttributes: z.ZodOptional<z.ZodObject<{
|
|
96
|
+
slideNumber: z.ZodNumber;
|
|
97
|
+
slideType: z.ZodEnum<{
|
|
98
|
+
readonly LAYOUT: "LAYOUT";
|
|
99
|
+
readonly NOTES: "NOTES";
|
|
100
|
+
readonly MASTER_NOTES: "MASTER_NOTES";
|
|
101
|
+
readonly SLIDE: "SLIDE";
|
|
102
|
+
readonly MASTER_SLIDE: "MASTER_SLIDE";
|
|
103
|
+
readonly CHART: "CHART";
|
|
104
|
+
readonly UNKNOWN: "UNKNOWN";
|
|
105
|
+
}>;
|
|
106
|
+
}, z.core.$strip>>;
|
|
107
|
+
xcstrings: z.ZodOptional<z.ZodObject<{
|
|
108
|
+
state: z.ZodOptional<z.ZodString>;
|
|
109
|
+
shouldTranslate: z.ZodOptional<z.ZodBoolean>;
|
|
110
|
+
extractionState: z.ZodOptional<z.ZodString>;
|
|
111
|
+
localizationType: z.ZodEnum<{
|
|
112
|
+
readonly STRING_UNIT: "STRING_UNIT";
|
|
113
|
+
readonly SUBSTITUTIONS: "SUBSTITUTIONS";
|
|
114
|
+
readonly PLURAL_VARIATION: "PLURAL_VARIATION";
|
|
115
|
+
readonly DEVICE_VARIATION: "DEVICE_VARIATION";
|
|
116
|
+
readonly DEVICE_PLURAL_VARIATION: "DEVICE_PLURAL_VARIATION";
|
|
117
|
+
}>;
|
|
118
|
+
keyPath: z.ZodString;
|
|
119
|
+
device: z.ZodOptional<z.ZodEnum<{
|
|
120
|
+
readonly MAC: "MAC";
|
|
121
|
+
readonly IPHONE: "IPHONE";
|
|
122
|
+
readonly APPLE_WATCH: "APPLE_WATCH";
|
|
123
|
+
readonly IPAD: "IPAD";
|
|
124
|
+
readonly OTHER: "OTHER";
|
|
125
|
+
}>>;
|
|
126
|
+
pluralForm: z.ZodOptional<z.ZodEnum<{
|
|
127
|
+
readonly ZERO: "ZERO";
|
|
128
|
+
readonly ONE: "ONE";
|
|
129
|
+
readonly TWO: "TWO";
|
|
130
|
+
readonly FEW: "FEW";
|
|
131
|
+
readonly MANY: "MANY";
|
|
132
|
+
readonly OTHER: "OTHER";
|
|
133
|
+
}>>;
|
|
134
|
+
formatSpecifier: z.ZodOptional<z.ZodString>;
|
|
135
|
+
argNum: z.ZodOptional<z.ZodNumber>;
|
|
136
|
+
isPlural: z.ZodBoolean;
|
|
137
|
+
}, z.core.$strip>>;
|
|
138
|
+
}, z.core.$strip>>;
|
|
139
|
+
}, z.core.$strip>>>;
|
|
176
140
|
metadata: z.ZodOptional<z.ZodObject<{
|
|
177
141
|
pptxAttributes: z.ZodOptional<z.ZodObject<{
|
|
178
142
|
slideNumber: z.ZodNumber;
|
|
@@ -289,7 +253,6 @@ export declare const PARSED_CONTENT_ITEM_SCHEMA: z.ZodObject<{
|
|
|
289
253
|
textUnits: z.ZodArray<z.ZodObject<{
|
|
290
254
|
id: z.ZodString;
|
|
291
255
|
name: z.ZodOptional<z.ZodString>;
|
|
292
|
-
locale: z.ZodOptional<z.ZodString>;
|
|
293
256
|
isTranslatable: z.ZodBoolean;
|
|
294
257
|
source: z.ZodObject<{
|
|
295
258
|
textCodes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
@@ -306,6 +269,55 @@ export declare const PARSED_CONTENT_ITEM_SCHEMA: z.ZodObject<{
|
|
|
306
269
|
hasBeenSegmented: z.ZodBoolean;
|
|
307
270
|
segments: z.ZodArray<z.ZodString>;
|
|
308
271
|
}, z.core.$strip>;
|
|
272
|
+
targets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
273
|
+
hasBeenSegmented: z.ZodBoolean;
|
|
274
|
+
segments: z.ZodArray<z.ZodString>;
|
|
275
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
276
|
+
pptxAttributes: z.ZodOptional<z.ZodObject<{
|
|
277
|
+
slideNumber: z.ZodNumber;
|
|
278
|
+
slideType: z.ZodEnum<{
|
|
279
|
+
readonly LAYOUT: "LAYOUT";
|
|
280
|
+
readonly NOTES: "NOTES";
|
|
281
|
+
readonly MASTER_NOTES: "MASTER_NOTES";
|
|
282
|
+
readonly SLIDE: "SLIDE";
|
|
283
|
+
readonly MASTER_SLIDE: "MASTER_SLIDE";
|
|
284
|
+
readonly CHART: "CHART";
|
|
285
|
+
readonly UNKNOWN: "UNKNOWN";
|
|
286
|
+
}>;
|
|
287
|
+
}, z.core.$strip>>;
|
|
288
|
+
xcstrings: z.ZodOptional<z.ZodObject<{
|
|
289
|
+
state: z.ZodOptional<z.ZodString>;
|
|
290
|
+
shouldTranslate: z.ZodOptional<z.ZodBoolean>;
|
|
291
|
+
extractionState: z.ZodOptional<z.ZodString>;
|
|
292
|
+
localizationType: z.ZodEnum<{
|
|
293
|
+
readonly STRING_UNIT: "STRING_UNIT";
|
|
294
|
+
readonly SUBSTITUTIONS: "SUBSTITUTIONS";
|
|
295
|
+
readonly PLURAL_VARIATION: "PLURAL_VARIATION";
|
|
296
|
+
readonly DEVICE_VARIATION: "DEVICE_VARIATION";
|
|
297
|
+
readonly DEVICE_PLURAL_VARIATION: "DEVICE_PLURAL_VARIATION";
|
|
298
|
+
}>;
|
|
299
|
+
keyPath: z.ZodString;
|
|
300
|
+
device: z.ZodOptional<z.ZodEnum<{
|
|
301
|
+
readonly MAC: "MAC";
|
|
302
|
+
readonly IPHONE: "IPHONE";
|
|
303
|
+
readonly APPLE_WATCH: "APPLE_WATCH";
|
|
304
|
+
readonly IPAD: "IPAD";
|
|
305
|
+
readonly OTHER: "OTHER";
|
|
306
|
+
}>>;
|
|
307
|
+
pluralForm: z.ZodOptional<z.ZodEnum<{
|
|
308
|
+
readonly ZERO: "ZERO";
|
|
309
|
+
readonly ONE: "ONE";
|
|
310
|
+
readonly TWO: "TWO";
|
|
311
|
+
readonly FEW: "FEW";
|
|
312
|
+
readonly MANY: "MANY";
|
|
313
|
+
readonly OTHER: "OTHER";
|
|
314
|
+
}>>;
|
|
315
|
+
formatSpecifier: z.ZodOptional<z.ZodString>;
|
|
316
|
+
argNum: z.ZodOptional<z.ZodNumber>;
|
|
317
|
+
isPlural: z.ZodBoolean;
|
|
318
|
+
}, z.core.$strip>>;
|
|
319
|
+
}, z.core.$strip>>;
|
|
320
|
+
}, z.core.$strip>>>;
|
|
309
321
|
metadata: z.ZodOptional<z.ZodObject<{
|
|
310
322
|
pptxAttributes: z.ZodOptional<z.ZodObject<{
|
|
311
323
|
slideNumber: z.ZodNumber;
|
|
@@ -385,7 +397,4 @@ export type RawContentUnit = z.infer<typeof RAW_CONTENT_UNIT_SCHEMA>;
|
|
|
385
397
|
export type ParsedContentUnitMetadata = z.infer<typeof PARSED_CONTENT_UNIT_METADATA_SCHEMA>;
|
|
386
398
|
export type ParsedContentItem = z.infer<typeof PARSED_CONTENT_ITEM_SCHEMA>;
|
|
387
399
|
export type ParsedContentUnit = z.infer<typeof PARSED_CONTENT_UNIT_SCHEMA>;
|
|
388
|
-
export type TextCode = z.infer<typeof TEXT_CODE_SCHEMA>;
|
|
389
|
-
export type TextUnit = z.infer<typeof TEXT_UNIT_SCHEMA>;
|
|
390
|
-
export type TextSegment = z.infer<typeof TEXT_SEGMENT_SCHEMA>;
|
|
391
400
|
//# sourceMappingURL=contentObjects.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contentObjects.d.ts","sourceRoot":"","sources":["../../src/api/contentObjects.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;A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B,CAAC,CAAA"}
|
|
@@ -21,51 +21,7 @@
|
|
|
21
21
|
import { ContentUnitTypeEnum } from '@lokalise/common-api-schemas';
|
|
22
22
|
import { z } from 'zod/v4';
|
|
23
23
|
import { ItemOriginEnum } from "./enums.js";
|
|
24
|
-
import {
|
|
25
|
-
export const TextCodeTypeEnum = {
|
|
26
|
-
OPENING: 'OPENING',
|
|
27
|
-
CLOSING: 'CLOSING',
|
|
28
|
-
PLACEHOLDER: 'PLACEHOLDER',
|
|
29
|
-
};
|
|
30
|
-
export const TEXT_CODE_SCHEMA = z
|
|
31
|
-
.object({
|
|
32
|
-
id: z.string(),
|
|
33
|
-
type: z.enum(TextCodeTypeEnum),
|
|
34
|
-
value: z.string(),
|
|
35
|
-
attributes: z.string().nullish(),
|
|
36
|
-
parser: z
|
|
37
|
-
.literal('okapi')
|
|
38
|
-
.default('okapi')
|
|
39
|
-
.describe('Indicates the parser that generated this text code.'),
|
|
40
|
-
})
|
|
41
|
-
.describe('Represents a text code, which is a special marker in the segment text that can be used for various purposes, such as indicating placeholders.');
|
|
42
|
-
export const TEXT_SEGMENT_SCHEMA = z.string().describe(`Represents a text segment, a smaller part of a larger text.
|
|
43
|
-
Segments are created through segmentation, where a text is broken down into smaller units, such as sentences,
|
|
44
|
-
to facilitate operations like translation and leveraging translation memory.`);
|
|
45
|
-
export const TEXT_UNIT_SCHEMA = z
|
|
46
|
-
.object({
|
|
47
|
-
id: z.string().min(1).describe('Unique identifier of the text unit within a content unit.'),
|
|
48
|
-
name: z
|
|
49
|
-
.string()
|
|
50
|
-
.optional()
|
|
51
|
-
.describe('Name of the text unit, if available. For example json key /myNestedObject/myNestedKey'),
|
|
52
|
-
locale: z
|
|
53
|
-
.string()
|
|
54
|
-
.min(2)
|
|
55
|
-
.max(16)
|
|
56
|
-
.optional()
|
|
57
|
-
.describe('Locale of the text unit. Will be present if content is multilingual.'),
|
|
58
|
-
isTranslatable: z.boolean().describe('Indicates whether the text unit is translatable or not'),
|
|
59
|
-
source: z.object({
|
|
60
|
-
textCodes: TEXT_CODE_SCHEMA.array().nullish(),
|
|
61
|
-
hasBeenSegmented: z
|
|
62
|
-
.boolean()
|
|
63
|
-
.describe('Indicates whether the segmentation was applied to the text unit.'),
|
|
64
|
-
segments: TEXT_SEGMENT_SCHEMA.array().describe('The text parts that make up the text unit. If the text unit has not been segmented, the array will contain a single segment.'),
|
|
65
|
-
}),
|
|
66
|
-
metadata: TEXT_UNIT_METADATA_ATTRIBUTES_SCHEMA.optional().describe('Optional metadata associated with the text unit.'),
|
|
67
|
-
})
|
|
68
|
-
.describe('Represents a text unit, the basic unit of extraction from a parser. May be split further into segments.');
|
|
24
|
+
import { TEXT_UNIT_SCHEMA } from "./textUnit.js";
|
|
69
25
|
export const RAW_CONTENT_UNIT_SCHEMA = z.object({
|
|
70
26
|
id: z
|
|
71
27
|
.string()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contentObjects.js","sourceRoot":"","sources":["../../src/api/contentObjects.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAA;AAClE,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAC3C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"contentObjects.js","sourceRoot":"","sources":["../../src/api/contentObjects.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAA;AAClE,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAEhD,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IA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