@blitzreels/contracts 0.2.2 → 0.2.3
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/editor-command-contract.d.ts +340 -0
- package/dist/editor-command-contract.d.ts.map +1 -0
- package/dist/editor-command-contract.js +117 -0
- package/dist/editor-command-contract.js.map +1 -0
- package/dist/editor-document-contract.d.ts +188 -0
- package/dist/editor-document-contract.d.ts.map +1 -0
- package/dist/editor-document-contract.js +92 -0
- package/dist/editor-document-contract.js.map +1 -0
- package/dist/editor-keyframe-contract.d.ts +111 -0
- package/dist/editor-keyframe-contract.d.ts.map +1 -0
- package/dist/editor-keyframe-contract.js +74 -0
- package/dist/editor-keyframe-contract.js.map +1 -0
- package/dist/generation-catalog-contract.d.ts +24 -0
- package/dist/generation-catalog-contract.d.ts.map +1 -0
- package/dist/generation-catalog-contract.js +24 -0
- package/dist/generation-catalog-contract.js.map +1 -0
- package/dist/generation-resolution.d.ts +24 -0
- package/dist/generation-resolution.d.ts.map +1 -0
- package/dist/generation-resolution.js +67 -0
- package/dist/generation-resolution.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/media-size.d.ts +17 -0
- package/dist/media-size.d.ts.map +1 -0
- package/dist/media-size.js +45 -0
- package/dist/media-size.js.map +1 -0
- package/dist/reframe-options.d.ts +5 -0
- package/dist/reframe-options.d.ts.map +1 -0
- package/dist/reframe-options.js +19 -0
- package/dist/reframe-options.js.map +1 -0
- package/dist/source-view-layout.d.ts +32 -0
- package/dist/source-view-layout.d.ts.map +1 -0
- package/dist/source-view-layout.js +57 -0
- package/dist/source-view-layout.js.map +1 -0
- package/package.json +4 -1
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const editorCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3
|
+
kind: z.ZodLiteral<"keyframes">;
|
|
4
|
+
changes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
5
|
+
kind: z.ZodLiteral<"create">;
|
|
6
|
+
keyframeId: z.ZodNullable<z.ZodString>;
|
|
7
|
+
timelineItemId: z.ZodString;
|
|
8
|
+
property: z.ZodEnum<{
|
|
9
|
+
opacity: "opacity";
|
|
10
|
+
positionX: "positionX";
|
|
11
|
+
positionY: "positionY";
|
|
12
|
+
rotation: "rotation";
|
|
13
|
+
scale: "scale";
|
|
14
|
+
sourceCropHeight: "sourceCropHeight";
|
|
15
|
+
sourceCropWidth: "sourceCropWidth";
|
|
16
|
+
sourceCropX: "sourceCropX";
|
|
17
|
+
sourceCropY: "sourceCropY";
|
|
18
|
+
}>;
|
|
19
|
+
timeSeconds: z.ZodNumber;
|
|
20
|
+
value: z.ZodNumber;
|
|
21
|
+
easing: z.ZodEnum<{
|
|
22
|
+
custom: "custom";
|
|
23
|
+
easeIn: "easeIn";
|
|
24
|
+
easeInOut: "easeInOut";
|
|
25
|
+
easeOut: "easeOut";
|
|
26
|
+
linear: "linear";
|
|
27
|
+
}>;
|
|
28
|
+
bezier: z.ZodNullable<z.ZodObject<{
|
|
29
|
+
x1: z.ZodNumber;
|
|
30
|
+
y1: z.ZodNumber;
|
|
31
|
+
x2: z.ZodNumber;
|
|
32
|
+
y2: z.ZodNumber;
|
|
33
|
+
}, z.core.$strip>>;
|
|
34
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
35
|
+
kind: z.ZodLiteral<"update">;
|
|
36
|
+
keyframeId: z.ZodString;
|
|
37
|
+
timelineItemId: z.ZodString;
|
|
38
|
+
property: z.ZodNullable<z.ZodEnum<{
|
|
39
|
+
opacity: "opacity";
|
|
40
|
+
positionX: "positionX";
|
|
41
|
+
positionY: "positionY";
|
|
42
|
+
rotation: "rotation";
|
|
43
|
+
scale: "scale";
|
|
44
|
+
sourceCropHeight: "sourceCropHeight";
|
|
45
|
+
sourceCropWidth: "sourceCropWidth";
|
|
46
|
+
sourceCropX: "sourceCropX";
|
|
47
|
+
sourceCropY: "sourceCropY";
|
|
48
|
+
}>>;
|
|
49
|
+
timeSeconds: z.ZodNullable<z.ZodNumber>;
|
|
50
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
51
|
+
easing: z.ZodNullable<z.ZodEnum<{
|
|
52
|
+
custom: "custom";
|
|
53
|
+
easeIn: "easeIn";
|
|
54
|
+
easeInOut: "easeInOut";
|
|
55
|
+
easeOut: "easeOut";
|
|
56
|
+
linear: "linear";
|
|
57
|
+
}>>;
|
|
58
|
+
bezier: z.ZodNullable<z.ZodObject<{
|
|
59
|
+
x1: z.ZodNumber;
|
|
60
|
+
y1: z.ZodNumber;
|
|
61
|
+
x2: z.ZodNumber;
|
|
62
|
+
y2: z.ZodNumber;
|
|
63
|
+
}, z.core.$strip>>;
|
|
64
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
65
|
+
kind: z.ZodLiteral<"remove">;
|
|
66
|
+
keyframeId: z.ZodString;
|
|
67
|
+
timelineItemId: z.ZodString;
|
|
68
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
69
|
+
kind: z.ZodLiteral<"removeProperties">;
|
|
70
|
+
timelineItemId: z.ZodString;
|
|
71
|
+
properties: z.ZodArray<z.ZodEnum<{
|
|
72
|
+
opacity: "opacity";
|
|
73
|
+
positionX: "positionX";
|
|
74
|
+
positionY: "positionY";
|
|
75
|
+
rotation: "rotation";
|
|
76
|
+
scale: "scale";
|
|
77
|
+
sourceCropHeight: "sourceCropHeight";
|
|
78
|
+
sourceCropWidth: "sourceCropWidth";
|
|
79
|
+
sourceCropX: "sourceCropX";
|
|
80
|
+
sourceCropY: "sourceCropY";
|
|
81
|
+
}>>;
|
|
82
|
+
}, z.core.$strip>], "kind">>;
|
|
83
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
84
|
+
kind: z.ZodLiteral<"crop">;
|
|
85
|
+
itemId: z.ZodString;
|
|
86
|
+
crop: z.ZodObject<{
|
|
87
|
+
x: z.ZodNumber;
|
|
88
|
+
y: z.ZodNumber;
|
|
89
|
+
width: z.ZodNumber;
|
|
90
|
+
height: z.ZodNumber;
|
|
91
|
+
}, z.core.$strip>;
|
|
92
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
93
|
+
kind: z.ZodLiteral<"move">;
|
|
94
|
+
items: z.ZodArray<z.ZodObject<{
|
|
95
|
+
id: z.ZodString;
|
|
96
|
+
startSeconds: z.ZodNumber;
|
|
97
|
+
layerIndex: z.ZodNumber;
|
|
98
|
+
}, z.core.$strip>>;
|
|
99
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
100
|
+
kind: z.ZodLiteral<"duplicate">;
|
|
101
|
+
items: z.ZodArray<z.ZodObject<{
|
|
102
|
+
id: z.ZodString;
|
|
103
|
+
startSeconds: z.ZodNumber;
|
|
104
|
+
layerIndex: z.ZodNumber;
|
|
105
|
+
}, z.core.$strip>>;
|
|
106
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
107
|
+
kind: z.ZodLiteral<"visibility">;
|
|
108
|
+
itemIds: z.ZodArray<z.ZodString>;
|
|
109
|
+
ignored: z.ZodBoolean;
|
|
110
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
111
|
+
kind: z.ZodLiteral<"remove">;
|
|
112
|
+
itemIds: z.ZodArray<z.ZodString>;
|
|
113
|
+
removeAssociatedCaptions: z.ZodBoolean;
|
|
114
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
115
|
+
kind: z.ZodLiteral<"pack">;
|
|
116
|
+
mode: z.ZodEnum<{
|
|
117
|
+
clips: "clips";
|
|
118
|
+
tracks: "tracks";
|
|
119
|
+
}>;
|
|
120
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
121
|
+
kind: z.ZodLiteral<"group">;
|
|
122
|
+
itemIds: z.ZodArray<z.ZodString>;
|
|
123
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
124
|
+
kind: z.ZodLiteral<"ungroup">;
|
|
125
|
+
groupId: z.ZodString;
|
|
126
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
127
|
+
kind: z.ZodLiteral<"reorderTrack">;
|
|
128
|
+
sourceLayerIndex: z.ZodNumber;
|
|
129
|
+
targetInsertPosition: z.ZodNumber;
|
|
130
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
131
|
+
kind: z.ZodLiteral<"replace">;
|
|
132
|
+
itemId: z.ZodString;
|
|
133
|
+
assetId: z.ZodString;
|
|
134
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
135
|
+
kind: z.ZodLiteral<"transform">;
|
|
136
|
+
itemId: z.ZodString;
|
|
137
|
+
positionX: z.ZodNumber;
|
|
138
|
+
positionY: z.ZodNumber;
|
|
139
|
+
widthPx: z.ZodNullable<z.ZodNumber>;
|
|
140
|
+
heightPx: z.ZodNullable<z.ZodNumber>;
|
|
141
|
+
keepAspectRatio: z.ZodBoolean;
|
|
142
|
+
blurredBackground: z.ZodBoolean;
|
|
143
|
+
fitMode: z.ZodEnum<{
|
|
144
|
+
contain: "contain";
|
|
145
|
+
cover: "cover";
|
|
146
|
+
stretch: "stretch";
|
|
147
|
+
}>;
|
|
148
|
+
opacity: z.ZodNumber;
|
|
149
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
150
|
+
kind: z.ZodLiteral<"audio">;
|
|
151
|
+
itemId: z.ZodString;
|
|
152
|
+
volume: z.ZodNumber;
|
|
153
|
+
fadeInSeconds: z.ZodNumber;
|
|
154
|
+
fadeOutSeconds: z.ZodNumber;
|
|
155
|
+
}, z.core.$strip>], "kind">;
|
|
156
|
+
export declare const editorCommandRequestSchema: z.ZodObject<{
|
|
157
|
+
projectId: z.ZodString;
|
|
158
|
+
expectedRevision: z.ZodNumber;
|
|
159
|
+
command: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
160
|
+
kind: z.ZodLiteral<"keyframes">;
|
|
161
|
+
changes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
162
|
+
kind: z.ZodLiteral<"create">;
|
|
163
|
+
keyframeId: z.ZodNullable<z.ZodString>;
|
|
164
|
+
timelineItemId: z.ZodString;
|
|
165
|
+
property: z.ZodEnum<{
|
|
166
|
+
opacity: "opacity";
|
|
167
|
+
positionX: "positionX";
|
|
168
|
+
positionY: "positionY";
|
|
169
|
+
rotation: "rotation";
|
|
170
|
+
scale: "scale";
|
|
171
|
+
sourceCropHeight: "sourceCropHeight";
|
|
172
|
+
sourceCropWidth: "sourceCropWidth";
|
|
173
|
+
sourceCropX: "sourceCropX";
|
|
174
|
+
sourceCropY: "sourceCropY";
|
|
175
|
+
}>;
|
|
176
|
+
timeSeconds: z.ZodNumber;
|
|
177
|
+
value: z.ZodNumber;
|
|
178
|
+
easing: z.ZodEnum<{
|
|
179
|
+
custom: "custom";
|
|
180
|
+
easeIn: "easeIn";
|
|
181
|
+
easeInOut: "easeInOut";
|
|
182
|
+
easeOut: "easeOut";
|
|
183
|
+
linear: "linear";
|
|
184
|
+
}>;
|
|
185
|
+
bezier: z.ZodNullable<z.ZodObject<{
|
|
186
|
+
x1: z.ZodNumber;
|
|
187
|
+
y1: z.ZodNumber;
|
|
188
|
+
x2: z.ZodNumber;
|
|
189
|
+
y2: z.ZodNumber;
|
|
190
|
+
}, z.core.$strip>>;
|
|
191
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
192
|
+
kind: z.ZodLiteral<"update">;
|
|
193
|
+
keyframeId: z.ZodString;
|
|
194
|
+
timelineItemId: z.ZodString;
|
|
195
|
+
property: z.ZodNullable<z.ZodEnum<{
|
|
196
|
+
opacity: "opacity";
|
|
197
|
+
positionX: "positionX";
|
|
198
|
+
positionY: "positionY";
|
|
199
|
+
rotation: "rotation";
|
|
200
|
+
scale: "scale";
|
|
201
|
+
sourceCropHeight: "sourceCropHeight";
|
|
202
|
+
sourceCropWidth: "sourceCropWidth";
|
|
203
|
+
sourceCropX: "sourceCropX";
|
|
204
|
+
sourceCropY: "sourceCropY";
|
|
205
|
+
}>>;
|
|
206
|
+
timeSeconds: z.ZodNullable<z.ZodNumber>;
|
|
207
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
208
|
+
easing: z.ZodNullable<z.ZodEnum<{
|
|
209
|
+
custom: "custom";
|
|
210
|
+
easeIn: "easeIn";
|
|
211
|
+
easeInOut: "easeInOut";
|
|
212
|
+
easeOut: "easeOut";
|
|
213
|
+
linear: "linear";
|
|
214
|
+
}>>;
|
|
215
|
+
bezier: z.ZodNullable<z.ZodObject<{
|
|
216
|
+
x1: z.ZodNumber;
|
|
217
|
+
y1: z.ZodNumber;
|
|
218
|
+
x2: z.ZodNumber;
|
|
219
|
+
y2: z.ZodNumber;
|
|
220
|
+
}, z.core.$strip>>;
|
|
221
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
222
|
+
kind: z.ZodLiteral<"remove">;
|
|
223
|
+
keyframeId: z.ZodString;
|
|
224
|
+
timelineItemId: z.ZodString;
|
|
225
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
226
|
+
kind: z.ZodLiteral<"removeProperties">;
|
|
227
|
+
timelineItemId: z.ZodString;
|
|
228
|
+
properties: z.ZodArray<z.ZodEnum<{
|
|
229
|
+
opacity: "opacity";
|
|
230
|
+
positionX: "positionX";
|
|
231
|
+
positionY: "positionY";
|
|
232
|
+
rotation: "rotation";
|
|
233
|
+
scale: "scale";
|
|
234
|
+
sourceCropHeight: "sourceCropHeight";
|
|
235
|
+
sourceCropWidth: "sourceCropWidth";
|
|
236
|
+
sourceCropX: "sourceCropX";
|
|
237
|
+
sourceCropY: "sourceCropY";
|
|
238
|
+
}>>;
|
|
239
|
+
}, z.core.$strip>], "kind">>;
|
|
240
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
241
|
+
kind: z.ZodLiteral<"crop">;
|
|
242
|
+
itemId: z.ZodString;
|
|
243
|
+
crop: z.ZodObject<{
|
|
244
|
+
x: z.ZodNumber;
|
|
245
|
+
y: z.ZodNumber;
|
|
246
|
+
width: z.ZodNumber;
|
|
247
|
+
height: z.ZodNumber;
|
|
248
|
+
}, z.core.$strip>;
|
|
249
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
250
|
+
kind: z.ZodLiteral<"move">;
|
|
251
|
+
items: z.ZodArray<z.ZodObject<{
|
|
252
|
+
id: z.ZodString;
|
|
253
|
+
startSeconds: z.ZodNumber;
|
|
254
|
+
layerIndex: z.ZodNumber;
|
|
255
|
+
}, z.core.$strip>>;
|
|
256
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
257
|
+
kind: z.ZodLiteral<"duplicate">;
|
|
258
|
+
items: z.ZodArray<z.ZodObject<{
|
|
259
|
+
id: z.ZodString;
|
|
260
|
+
startSeconds: z.ZodNumber;
|
|
261
|
+
layerIndex: z.ZodNumber;
|
|
262
|
+
}, z.core.$strip>>;
|
|
263
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
264
|
+
kind: z.ZodLiteral<"visibility">;
|
|
265
|
+
itemIds: z.ZodArray<z.ZodString>;
|
|
266
|
+
ignored: z.ZodBoolean;
|
|
267
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
268
|
+
kind: z.ZodLiteral<"remove">;
|
|
269
|
+
itemIds: z.ZodArray<z.ZodString>;
|
|
270
|
+
removeAssociatedCaptions: z.ZodBoolean;
|
|
271
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
272
|
+
kind: z.ZodLiteral<"pack">;
|
|
273
|
+
mode: z.ZodEnum<{
|
|
274
|
+
clips: "clips";
|
|
275
|
+
tracks: "tracks";
|
|
276
|
+
}>;
|
|
277
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
278
|
+
kind: z.ZodLiteral<"group">;
|
|
279
|
+
itemIds: z.ZodArray<z.ZodString>;
|
|
280
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
281
|
+
kind: z.ZodLiteral<"ungroup">;
|
|
282
|
+
groupId: z.ZodString;
|
|
283
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
284
|
+
kind: z.ZodLiteral<"reorderTrack">;
|
|
285
|
+
sourceLayerIndex: z.ZodNumber;
|
|
286
|
+
targetInsertPosition: z.ZodNumber;
|
|
287
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
288
|
+
kind: z.ZodLiteral<"replace">;
|
|
289
|
+
itemId: z.ZodString;
|
|
290
|
+
assetId: z.ZodString;
|
|
291
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
292
|
+
kind: z.ZodLiteral<"transform">;
|
|
293
|
+
itemId: z.ZodString;
|
|
294
|
+
positionX: z.ZodNumber;
|
|
295
|
+
positionY: z.ZodNumber;
|
|
296
|
+
widthPx: z.ZodNullable<z.ZodNumber>;
|
|
297
|
+
heightPx: z.ZodNullable<z.ZodNumber>;
|
|
298
|
+
keepAspectRatio: z.ZodBoolean;
|
|
299
|
+
blurredBackground: z.ZodBoolean;
|
|
300
|
+
fitMode: z.ZodEnum<{
|
|
301
|
+
contain: "contain";
|
|
302
|
+
cover: "cover";
|
|
303
|
+
stretch: "stretch";
|
|
304
|
+
}>;
|
|
305
|
+
opacity: z.ZodNumber;
|
|
306
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
307
|
+
kind: z.ZodLiteral<"audio">;
|
|
308
|
+
itemId: z.ZodString;
|
|
309
|
+
volume: z.ZodNumber;
|
|
310
|
+
fadeInSeconds: z.ZodNumber;
|
|
311
|
+
fadeOutSeconds: z.ZodNumber;
|
|
312
|
+
}, z.core.$strip>], "kind">;
|
|
313
|
+
}, z.core.$strip>;
|
|
314
|
+
export declare const editorCommandReceiptSchema: z.ZodObject<{
|
|
315
|
+
projectId: z.ZodString;
|
|
316
|
+
revision: z.ZodNumber;
|
|
317
|
+
baseRevision: z.ZodNumber;
|
|
318
|
+
mutationReceiptId: z.ZodString;
|
|
319
|
+
replayed: z.ZodBoolean;
|
|
320
|
+
affectedTimelineItemIds: z.ZodArray<z.ZodString>;
|
|
321
|
+
createdTimelineItemIds: z.ZodArray<z.ZodString>;
|
|
322
|
+
deletedTimelineItemIds: z.ZodArray<z.ZodString>;
|
|
323
|
+
warnings: z.ZodArray<z.ZodString>;
|
|
324
|
+
result: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
325
|
+
}, z.core.$strip>;
|
|
326
|
+
export declare const editorCommandPreviewSchema: z.ZodObject<{
|
|
327
|
+
projectId: z.ZodString;
|
|
328
|
+
currentRevision: z.ZodNumber;
|
|
329
|
+
affectedTimelineItemIds: z.ZodArray<z.ZodString>;
|
|
330
|
+
wouldCreateTimelineItemIds: z.ZodArray<z.ZodString>;
|
|
331
|
+
wouldDeleteTimelineItemIds: z.ZodArray<z.ZodString>;
|
|
332
|
+
destructive: z.ZodBoolean;
|
|
333
|
+
changeCount: z.ZodNumber;
|
|
334
|
+
warnings: z.ZodArray<z.ZodString>;
|
|
335
|
+
}, z.core.$strip>;
|
|
336
|
+
export type EditorCommand = z.infer<typeof editorCommandSchema>;
|
|
337
|
+
export type EditorCommandRequest = z.infer<typeof editorCommandRequestSchema>;
|
|
338
|
+
export type EditorCommandReceipt = z.infer<typeof editorCommandReceiptSchema>;
|
|
339
|
+
export type EditorCommandPreview = z.infer<typeof editorCommandPreviewSchema>;
|
|
340
|
+
//# sourceMappingURL=editor-command-contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-command-contract.d.ts","sourceRoot":"","sources":["../src/editor-command-contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAuF9B,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAIrC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;iBAWrC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;iBASrC,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { editorCropSchema, editorKeyframeChangeSchema, } from "./editor-keyframe-contract.js";
|
|
3
|
+
const ids = z
|
|
4
|
+
.array(z.string().min(1))
|
|
5
|
+
.min(1)
|
|
6
|
+
.max(500)
|
|
7
|
+
.refine((values) => new Set(values).size === values.length);
|
|
8
|
+
const position = z.number().min(-10000).max(10000);
|
|
9
|
+
const dimension = z.number().int().min(1).max(10000).nullable();
|
|
10
|
+
export const editorCommandSchema = z.discriminatedUnion("kind", [
|
|
11
|
+
z.object({
|
|
12
|
+
kind: z.literal("keyframes"),
|
|
13
|
+
changes: z.array(editorKeyframeChangeSchema).min(1).max(500),
|
|
14
|
+
}),
|
|
15
|
+
z.object({
|
|
16
|
+
kind: z.literal("crop"),
|
|
17
|
+
itemId: z.string().min(1),
|
|
18
|
+
crop: editorCropSchema,
|
|
19
|
+
}),
|
|
20
|
+
z.object({
|
|
21
|
+
kind: z.literal("move"),
|
|
22
|
+
items: z
|
|
23
|
+
.array(z.object({
|
|
24
|
+
id: z.string().min(1),
|
|
25
|
+
startSeconds: z.number().min(0),
|
|
26
|
+
layerIndex: z.number().int().min(0),
|
|
27
|
+
}))
|
|
28
|
+
.min(1)
|
|
29
|
+
.max(500)
|
|
30
|
+
.refine((items) => new Set(items.map((item) => item.id)).size === items.length),
|
|
31
|
+
}),
|
|
32
|
+
z.object({
|
|
33
|
+
kind: z.literal("duplicate"),
|
|
34
|
+
items: z
|
|
35
|
+
.array(z.object({
|
|
36
|
+
id: z.string().min(1),
|
|
37
|
+
startSeconds: z.number().min(0),
|
|
38
|
+
layerIndex: z.number().int().min(0),
|
|
39
|
+
}))
|
|
40
|
+
.min(1)
|
|
41
|
+
.max(500)
|
|
42
|
+
.refine((items) => new Set(items.map((item) => item.id)).size === items.length),
|
|
43
|
+
}),
|
|
44
|
+
z.object({
|
|
45
|
+
kind: z.literal("visibility"),
|
|
46
|
+
itemIds: ids,
|
|
47
|
+
ignored: z.boolean(),
|
|
48
|
+
}),
|
|
49
|
+
z.object({
|
|
50
|
+
kind: z.literal("remove"),
|
|
51
|
+
itemIds: ids,
|
|
52
|
+
removeAssociatedCaptions: z.boolean(),
|
|
53
|
+
}),
|
|
54
|
+
z.object({ kind: z.literal("pack"), mode: z.enum(["clips", "tracks"]) }),
|
|
55
|
+
z.object({
|
|
56
|
+
kind: z.literal("group"),
|
|
57
|
+
itemIds: ids.refine((values) => values.length >= 2),
|
|
58
|
+
}),
|
|
59
|
+
z.object({ kind: z.literal("ungroup"), groupId: z.string() }),
|
|
60
|
+
z.object({
|
|
61
|
+
kind: z.literal("reorderTrack"),
|
|
62
|
+
sourceLayerIndex: z.number().int().min(0),
|
|
63
|
+
targetInsertPosition: z.number().int().min(0),
|
|
64
|
+
}),
|
|
65
|
+
z.object({
|
|
66
|
+
kind: z.literal("replace"),
|
|
67
|
+
itemId: z.string(),
|
|
68
|
+
assetId: z.string(),
|
|
69
|
+
}),
|
|
70
|
+
z.object({
|
|
71
|
+
kind: z.literal("transform"),
|
|
72
|
+
itemId: z.string(),
|
|
73
|
+
positionX: position,
|
|
74
|
+
positionY: position,
|
|
75
|
+
widthPx: dimension,
|
|
76
|
+
heightPx: dimension,
|
|
77
|
+
keepAspectRatio: z.boolean(),
|
|
78
|
+
blurredBackground: z.boolean(),
|
|
79
|
+
fitMode: z.enum(["cover", "contain", "stretch"]),
|
|
80
|
+
opacity: z.number().min(0).max(1),
|
|
81
|
+
}),
|
|
82
|
+
z.object({
|
|
83
|
+
kind: z.literal("audio"),
|
|
84
|
+
itemId: z.string(),
|
|
85
|
+
volume: z.number().min(0).max(2),
|
|
86
|
+
fadeInSeconds: z.number().min(0),
|
|
87
|
+
fadeOutSeconds: z.number().min(0),
|
|
88
|
+
}),
|
|
89
|
+
]);
|
|
90
|
+
export const editorCommandRequestSchema = z.object({
|
|
91
|
+
projectId: z.string(),
|
|
92
|
+
expectedRevision: z.number().int().min(0),
|
|
93
|
+
command: editorCommandSchema,
|
|
94
|
+
});
|
|
95
|
+
export const editorCommandReceiptSchema = z.object({
|
|
96
|
+
projectId: z.string(),
|
|
97
|
+
revision: z.number(),
|
|
98
|
+
baseRevision: z.number(),
|
|
99
|
+
mutationReceiptId: z.string(),
|
|
100
|
+
replayed: z.boolean(),
|
|
101
|
+
affectedTimelineItemIds: z.array(z.string()),
|
|
102
|
+
createdTimelineItemIds: z.array(z.string()),
|
|
103
|
+
deletedTimelineItemIds: z.array(z.string()),
|
|
104
|
+
warnings: z.array(z.string()),
|
|
105
|
+
result: z.record(z.string(), z.unknown()),
|
|
106
|
+
});
|
|
107
|
+
export const editorCommandPreviewSchema = z.object({
|
|
108
|
+
projectId: z.string(),
|
|
109
|
+
currentRevision: z.number(),
|
|
110
|
+
affectedTimelineItemIds: z.array(z.string()),
|
|
111
|
+
wouldCreateTimelineItemIds: z.array(z.string()),
|
|
112
|
+
wouldDeleteTimelineItemIds: z.array(z.string()),
|
|
113
|
+
destructive: z.boolean(),
|
|
114
|
+
changeCount: z.number(),
|
|
115
|
+
warnings: z.array(z.string()),
|
|
116
|
+
});
|
|
117
|
+
//# sourceMappingURL=editor-command-contract.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-command-contract.js","sourceRoot":"","sources":["../src/editor-command-contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,gBAAgB,EAChB,0BAA0B,GAC3B,MAAM,+BAA+B,CAAC;AAEvC,MAAM,GAAG,GAAG,CAAC;KACV,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;KACxB,GAAG,CAAC,CAAC,CAAC;KACN,GAAG,CAAC,GAAG,CAAC;KACR,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,MAAM,CAAC,CAAC;AAC9D,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACnD,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC;AAEhE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IAC9D,CAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;QAC5B,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;KAC7D,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,CAAC,CAAC,OAA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,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC/C,WAAW,EAAE,CAAC,CAAC,OAAO,EAAE;IACxB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAC9B,CAAC,CAAC"}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const editorSourceViewSchema: z.ZodObject<{
|
|
3
|
+
sourceAssetId: z.ZodNullable<z.ZodString>;
|
|
4
|
+
sourceStartSeconds: z.ZodNumber;
|
|
5
|
+
sourceEndSeconds: z.ZodNumber;
|
|
6
|
+
sourceCropX: z.ZodNumber;
|
|
7
|
+
sourceCropY: z.ZodNumber;
|
|
8
|
+
sourceCropWidth: z.ZodNumber;
|
|
9
|
+
sourceCropHeight: z.ZodNumber;
|
|
10
|
+
canvasX: z.ZodNumber;
|
|
11
|
+
canvasY: z.ZodNumber;
|
|
12
|
+
canvasWidth: z.ZodNullable<z.ZodNumber>;
|
|
13
|
+
canvasHeight: z.ZodNullable<z.ZodNumber>;
|
|
14
|
+
fitMode: z.ZodEnum<{
|
|
15
|
+
contain: "contain";
|
|
16
|
+
cover: "cover";
|
|
17
|
+
stretch: "stretch";
|
|
18
|
+
}>;
|
|
19
|
+
maskShape: z.ZodNullable<z.ZodString>;
|
|
20
|
+
maskRadius: z.ZodNullable<z.ZodNumber>;
|
|
21
|
+
syncGroupId: z.ZodNullable<z.ZodString>;
|
|
22
|
+
plannerMode: z.ZodNullable<z.ZodString>;
|
|
23
|
+
plannerMetadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
export declare const editorTimelineItemSchema: z.ZodObject<{
|
|
26
|
+
id: z.ZodString;
|
|
27
|
+
type: z.ZodString;
|
|
28
|
+
contentType: z.ZodNullable<z.ZodString>;
|
|
29
|
+
contentItemId: z.ZodNullable<z.ZodString>;
|
|
30
|
+
captionId: z.ZodNullable<z.ZodString>;
|
|
31
|
+
mediaAssetId: z.ZodNullable<z.ZodString>;
|
|
32
|
+
parentGroupId: z.ZodNullable<z.ZodString>;
|
|
33
|
+
label: z.ZodString;
|
|
34
|
+
text: z.ZodString;
|
|
35
|
+
startSeconds: z.ZodNumber;
|
|
36
|
+
endSeconds: z.ZodNumber;
|
|
37
|
+
trimStartSeconds: z.ZodNumber;
|
|
38
|
+
trimEndSeconds: z.ZodNumber;
|
|
39
|
+
layerIndex: z.ZodNumber;
|
|
40
|
+
ignored: z.ZodBoolean;
|
|
41
|
+
isSilentZone: z.ZodBoolean;
|
|
42
|
+
isMistake: z.ZodBoolean;
|
|
43
|
+
volume: z.ZodNumber;
|
|
44
|
+
audioFadeInSeconds: z.ZodNumber;
|
|
45
|
+
audioFadeOutSeconds: z.ZodNumber;
|
|
46
|
+
positionX: z.ZodNumber;
|
|
47
|
+
positionY: z.ZodNumber;
|
|
48
|
+
widthPx: z.ZodNullable<z.ZodNumber>;
|
|
49
|
+
heightPx: z.ZodNullable<z.ZodNumber>;
|
|
50
|
+
keepAspectRatio: z.ZodBoolean;
|
|
51
|
+
blurredBackground: z.ZodBoolean;
|
|
52
|
+
sourceView: z.ZodNullable<z.ZodObject<{
|
|
53
|
+
sourceAssetId: z.ZodNullable<z.ZodString>;
|
|
54
|
+
sourceStartSeconds: z.ZodNumber;
|
|
55
|
+
sourceEndSeconds: z.ZodNumber;
|
|
56
|
+
sourceCropX: z.ZodNumber;
|
|
57
|
+
sourceCropY: z.ZodNumber;
|
|
58
|
+
sourceCropWidth: z.ZodNumber;
|
|
59
|
+
sourceCropHeight: z.ZodNumber;
|
|
60
|
+
canvasX: z.ZodNumber;
|
|
61
|
+
canvasY: z.ZodNumber;
|
|
62
|
+
canvasWidth: z.ZodNullable<z.ZodNumber>;
|
|
63
|
+
canvasHeight: z.ZodNullable<z.ZodNumber>;
|
|
64
|
+
fitMode: z.ZodEnum<{
|
|
65
|
+
contain: "contain";
|
|
66
|
+
cover: "cover";
|
|
67
|
+
stretch: "stretch";
|
|
68
|
+
}>;
|
|
69
|
+
maskShape: z.ZodNullable<z.ZodString>;
|
|
70
|
+
maskRadius: z.ZodNullable<z.ZodNumber>;
|
|
71
|
+
syncGroupId: z.ZodNullable<z.ZodString>;
|
|
72
|
+
plannerMode: z.ZodNullable<z.ZodString>;
|
|
73
|
+
plannerMetadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
74
|
+
}, z.core.$strip>>;
|
|
75
|
+
keyframes: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
76
|
+
properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
77
|
+
}, z.core.$strip>;
|
|
78
|
+
export declare const editorMediaSchema: z.ZodObject<{
|
|
79
|
+
id: z.ZodString;
|
|
80
|
+
assetType: z.ZodString;
|
|
81
|
+
audioType: z.ZodNullable<z.ZodString>;
|
|
82
|
+
fileUrl: z.ZodString;
|
|
83
|
+
streamingUrl: z.ZodNullable<z.ZodString>;
|
|
84
|
+
thumbnailUrl: z.ZodNullable<z.ZodString>;
|
|
85
|
+
waveformPeaks: z.ZodArray<z.ZodNumber>;
|
|
86
|
+
sourceWidth: z.ZodNullable<z.ZodNumber>;
|
|
87
|
+
sourceHeight: z.ZodNullable<z.ZodNumber>;
|
|
88
|
+
}, z.core.$strip>;
|
|
89
|
+
export declare const editorDocumentSchema: z.ZodObject<{
|
|
90
|
+
version: z.ZodLiteral<1>;
|
|
91
|
+
projectId: z.ZodString;
|
|
92
|
+
revision: z.ZodNumber;
|
|
93
|
+
name: z.ZodString;
|
|
94
|
+
aspectRatio: z.ZodString;
|
|
95
|
+
canvasWidth: z.ZodNumber;
|
|
96
|
+
canvasHeight: z.ZodNumber;
|
|
97
|
+
fps: z.ZodNumber;
|
|
98
|
+
durationSeconds: z.ZodNumber;
|
|
99
|
+
backgroundColor: z.ZodNullable<z.ZodString>;
|
|
100
|
+
items: z.ZodArray<z.ZodObject<{
|
|
101
|
+
id: z.ZodString;
|
|
102
|
+
type: z.ZodString;
|
|
103
|
+
contentType: z.ZodNullable<z.ZodString>;
|
|
104
|
+
contentItemId: z.ZodNullable<z.ZodString>;
|
|
105
|
+
captionId: z.ZodNullable<z.ZodString>;
|
|
106
|
+
mediaAssetId: z.ZodNullable<z.ZodString>;
|
|
107
|
+
parentGroupId: z.ZodNullable<z.ZodString>;
|
|
108
|
+
label: z.ZodString;
|
|
109
|
+
text: z.ZodString;
|
|
110
|
+
startSeconds: z.ZodNumber;
|
|
111
|
+
endSeconds: z.ZodNumber;
|
|
112
|
+
trimStartSeconds: z.ZodNumber;
|
|
113
|
+
trimEndSeconds: z.ZodNumber;
|
|
114
|
+
layerIndex: z.ZodNumber;
|
|
115
|
+
ignored: z.ZodBoolean;
|
|
116
|
+
isSilentZone: z.ZodBoolean;
|
|
117
|
+
isMistake: z.ZodBoolean;
|
|
118
|
+
volume: z.ZodNumber;
|
|
119
|
+
audioFadeInSeconds: z.ZodNumber;
|
|
120
|
+
audioFadeOutSeconds: z.ZodNumber;
|
|
121
|
+
positionX: z.ZodNumber;
|
|
122
|
+
positionY: z.ZodNumber;
|
|
123
|
+
widthPx: z.ZodNullable<z.ZodNumber>;
|
|
124
|
+
heightPx: z.ZodNullable<z.ZodNumber>;
|
|
125
|
+
keepAspectRatio: z.ZodBoolean;
|
|
126
|
+
blurredBackground: z.ZodBoolean;
|
|
127
|
+
sourceView: z.ZodNullable<z.ZodObject<{
|
|
128
|
+
sourceAssetId: z.ZodNullable<z.ZodString>;
|
|
129
|
+
sourceStartSeconds: z.ZodNumber;
|
|
130
|
+
sourceEndSeconds: z.ZodNumber;
|
|
131
|
+
sourceCropX: z.ZodNumber;
|
|
132
|
+
sourceCropY: z.ZodNumber;
|
|
133
|
+
sourceCropWidth: z.ZodNumber;
|
|
134
|
+
sourceCropHeight: z.ZodNumber;
|
|
135
|
+
canvasX: z.ZodNumber;
|
|
136
|
+
canvasY: z.ZodNumber;
|
|
137
|
+
canvasWidth: z.ZodNullable<z.ZodNumber>;
|
|
138
|
+
canvasHeight: z.ZodNullable<z.ZodNumber>;
|
|
139
|
+
fitMode: z.ZodEnum<{
|
|
140
|
+
contain: "contain";
|
|
141
|
+
cover: "cover";
|
|
142
|
+
stretch: "stretch";
|
|
143
|
+
}>;
|
|
144
|
+
maskShape: z.ZodNullable<z.ZodString>;
|
|
145
|
+
maskRadius: z.ZodNullable<z.ZodNumber>;
|
|
146
|
+
syncGroupId: z.ZodNullable<z.ZodString>;
|
|
147
|
+
plannerMode: z.ZodNullable<z.ZodString>;
|
|
148
|
+
plannerMetadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
149
|
+
}, z.core.$strip>>;
|
|
150
|
+
keyframes: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
151
|
+
properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
152
|
+
}, z.core.$strip>>;
|
|
153
|
+
media: z.ZodArray<z.ZodObject<{
|
|
154
|
+
id: z.ZodString;
|
|
155
|
+
assetType: z.ZodString;
|
|
156
|
+
audioType: z.ZodNullable<z.ZodString>;
|
|
157
|
+
fileUrl: z.ZodString;
|
|
158
|
+
streamingUrl: z.ZodNullable<z.ZodString>;
|
|
159
|
+
thumbnailUrl: z.ZodNullable<z.ZodString>;
|
|
160
|
+
waveformPeaks: z.ZodArray<z.ZodNumber>;
|
|
161
|
+
sourceWidth: z.ZodNullable<z.ZodNumber>;
|
|
162
|
+
sourceHeight: z.ZodNullable<z.ZodNumber>;
|
|
163
|
+
}, z.core.$strip>>;
|
|
164
|
+
tracks: z.ZodArray<z.ZodObject<{
|
|
165
|
+
layerIndex: z.ZodNumber;
|
|
166
|
+
label: z.ZodString;
|
|
167
|
+
itemIds: z.ZodArray<z.ZodString>;
|
|
168
|
+
}, z.core.$strip>>;
|
|
169
|
+
bounds: z.ZodObject<{
|
|
170
|
+
offset: z.ZodNumber;
|
|
171
|
+
limit: z.ZodNumber;
|
|
172
|
+
total: z.ZodNumber;
|
|
173
|
+
returned: z.ZodNumber;
|
|
174
|
+
hasMore: z.ZodBoolean;
|
|
175
|
+
truncated: z.ZodBoolean;
|
|
176
|
+
}, z.core.$strip>;
|
|
177
|
+
}, z.core.$strip>;
|
|
178
|
+
export type EditorDocument = z.infer<typeof editorDocumentSchema>;
|
|
179
|
+
export type EditorTimelineItem = z.infer<typeof editorTimelineItemSchema>;
|
|
180
|
+
export type EditorMedia = z.infer<typeof editorMediaSchema>;
|
|
181
|
+
export type EditorSourceView = z.infer<typeof editorSourceViewSchema>;
|
|
182
|
+
export type GetEditorDocumentOptions = {
|
|
183
|
+
projectId: string;
|
|
184
|
+
offset: number;
|
|
185
|
+
limit: number;
|
|
186
|
+
expectedRevision: number | null;
|
|
187
|
+
};
|
|
188
|
+
//# sourceMappingURL=editor-document-contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-document-contract.d.ts","sourceRoot":"","sources":["../src/editor-document-contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;iBAkBjC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA8BnC,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;iBAU5B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA4B/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,wBAAwB,GAAG;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC,CAAC"}
|