@appaflytech/wappa-mcp 0.0.1

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.
Files changed (68) hide show
  1. package/.env.example +5 -0
  2. package/LICENSE +21 -0
  3. package/README.md +200 -0
  4. package/dist/auth.d.ts +20 -0
  5. package/dist/auth.d.ts.map +1 -0
  6. package/dist/auth.js +58 -0
  7. package/dist/auth.js.map +1 -0
  8. package/dist/base-components.d.ts +52 -0
  9. package/dist/base-components.d.ts.map +1 -0
  10. package/dist/base-components.js +552 -0
  11. package/dist/base-components.js.map +1 -0
  12. package/dist/client.d.ts +141 -0
  13. package/dist/client.d.ts.map +1 -0
  14. package/dist/client.js +341 -0
  15. package/dist/client.js.map +1 -0
  16. package/dist/index.d.ts +10 -0
  17. package/dist/index.d.ts.map +1 -0
  18. package/dist/index.js +287 -0
  19. package/dist/index.js.map +1 -0
  20. package/dist/tools/components.d.ts +217 -0
  21. package/dist/tools/components.d.ts.map +1 -0
  22. package/dist/tools/components.js +258 -0
  23. package/dist/tools/components.js.map +1 -0
  24. package/dist/tools/dynamic-entities.d.ts +308 -0
  25. package/dist/tools/dynamic-entities.d.ts.map +1 -0
  26. package/dist/tools/dynamic-entities.js +278 -0
  27. package/dist/tools/dynamic-entities.js.map +1 -0
  28. package/dist/tools/entities.d.ts +212 -0
  29. package/dist/tools/entities.d.ts.map +1 -0
  30. package/dist/tools/entities.js +223 -0
  31. package/dist/tools/entities.js.map +1 -0
  32. package/dist/tools/general.d.ts +93 -0
  33. package/dist/tools/general.d.ts.map +1 -0
  34. package/dist/tools/general.js +218 -0
  35. package/dist/tools/general.js.map +1 -0
  36. package/dist/tools/languages.d.ts +157 -0
  37. package/dist/tools/languages.d.ts.map +1 -0
  38. package/dist/tools/languages.js +142 -0
  39. package/dist/tools/languages.js.map +1 -0
  40. package/dist/tools/layouts.d.ts +244 -0
  41. package/dist/tools/layouts.d.ts.map +1 -0
  42. package/dist/tools/layouts.js +218 -0
  43. package/dist/tools/layouts.js.map +1 -0
  44. package/dist/tools/menus.d.ts +154 -0
  45. package/dist/tools/menus.d.ts.map +1 -0
  46. package/dist/tools/menus.js +173 -0
  47. package/dist/tools/menus.js.map +1 -0
  48. package/dist/tools/pages.d.ts +472 -0
  49. package/dist/tools/pages.d.ts.map +1 -0
  50. package/dist/tools/pages.js +465 -0
  51. package/dist/tools/pages.js.map +1 -0
  52. package/dist/tools/queries.d.ts +221 -0
  53. package/dist/tools/queries.d.ts.map +1 -0
  54. package/dist/tools/queries.js +210 -0
  55. package/dist/tools/queries.js.map +1 -0
  56. package/dist/tools/sites.d.ts +187 -0
  57. package/dist/tools/sites.d.ts.map +1 -0
  58. package/dist/tools/sites.js +167 -0
  59. package/dist/tools/sites.js.map +1 -0
  60. package/dist/tools/themes.d.ts +182 -0
  61. package/dist/tools/themes.d.ts.map +1 -0
  62. package/dist/tools/themes.js +175 -0
  63. package/dist/tools/themes.js.map +1 -0
  64. package/dist/tools/widgets.d.ts +216 -0
  65. package/dist/tools/widgets.d.ts.map +1 -0
  66. package/dist/tools/widgets.js +182 -0
  67. package/dist/tools/widgets.js.map +1 -0
  68. package/package.json +50 -0
@@ -0,0 +1,258 @@
1
+ /**
2
+ * MCP Tools for WAP Component CRUD operations
3
+ */
4
+ import { BASE_COMPONENTS, findBaseComponent } from "../base-components.js";
5
+ export function getComponentTools(client) {
6
+ return {
7
+ // ─── List Components ───────────────────────────────────
8
+ list_components: {
9
+ description: "WAP Admin API üzerinden tüm bileşenleri (components) listeler. Sayfalama ve filtreleme destekler.",
10
+ inputSchema: {
11
+ type: "object",
12
+ properties: {
13
+ skip: {
14
+ type: "number",
15
+ description: "Atlanacak kayıt sayısı (sayfalama için)",
16
+ },
17
+ take: {
18
+ type: "number",
19
+ description: "Alınacak kayıt sayısı (varsayılan: 50)",
20
+ },
21
+ term: {
22
+ type: "string",
23
+ description: "Arama terimi (isme göre filtrele)",
24
+ },
25
+ },
26
+ },
27
+ handler: async (args) => {
28
+ const params = {};
29
+ if (args.skip !== undefined)
30
+ params.skip = String(args.skip);
31
+ if (args.take !== undefined)
32
+ params.take = String(args.take);
33
+ if (args.term)
34
+ params.term = args.term;
35
+ const result = await client.getComponents(params);
36
+ return {
37
+ content: [
38
+ { type: "text", text: JSON.stringify(result, null, 2) },
39
+ ],
40
+ };
41
+ },
42
+ },
43
+ // ─── Get Component ─────────────────────────────────────
44
+ get_component: {
45
+ description: "Belirli bir bileşenin detaylarını getirir. GUID gönderilirse API'ye gider; kebab-case isim (örn: 'heading', 'container') gönderilirse önce base (built-in) bileşenler arasında arar, bulamazsa API'ye gider.",
46
+ inputSchema: {
47
+ type: "object",
48
+ properties: {
49
+ id: {
50
+ type: "string",
51
+ description: "Bileşen ID (GUID) veya kebab-case bileşen adı (örn: 'heading', 'container', 'row')",
52
+ },
53
+ },
54
+ required: ["id"],
55
+ },
56
+ handler: async (args) => {
57
+ // If id looks like a name (not a GUID), check base components first
58
+ const isGuid = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(args.id);
59
+ if (!isGuid) {
60
+ const base = findBaseComponent(args.id);
61
+ if (base) {
62
+ return {
63
+ content: [
64
+ {
65
+ type: "text",
66
+ text: JSON.stringify({ source: "base-component", data: base }, null, 2),
67
+ },
68
+ ],
69
+ };
70
+ }
71
+ }
72
+ const result = await client.getComponent(args.id);
73
+ return {
74
+ content: [
75
+ { type: "text", text: JSON.stringify(result, null, 2) },
76
+ ],
77
+ };
78
+ },
79
+ },
80
+ // ─── Create Component ──────────────────────────────────
81
+ create_component: {
82
+ description: `WAP Admin API üzerinde yeni bir bileşen (component) oluşturur.
83
+ 'definition': { props: [...] } formatında nesne (object) olarak gönderin.
84
+ 'type': 'element' | 'wrapper' | 'custom' | 'ecommerce' (varsayılan: 'element')
85
+ 'accessType': 0=public (varsayılan), 1=private`,
86
+ inputSchema: {
87
+ type: "object",
88
+ properties: {
89
+ name: {
90
+ type: "string",
91
+ description: 'Bileşen adı (kebab-case, örn: "hero-banner")',
92
+ },
93
+ title: {
94
+ type: "string",
95
+ description: 'Bileşen başlığı (örn: "Hero Banner")',
96
+ },
97
+ definition: {
98
+ type: "object",
99
+ description: "Component schema: { props: [ { name, type, title, required?, options? } ] }",
100
+ },
101
+ type: {
102
+ type: "string",
103
+ description: "Bileşen tipi: element | wrapper | custom | ecommerce (varsayılan: element)",
104
+ },
105
+ droppable: {
106
+ type: "boolean",
107
+ description: "Sürükle-bırak ile başka bileşenler eklenebilir mi? (varsayılan: true)",
108
+ },
109
+ description: {
110
+ type: "string",
111
+ description: "Bileşen açıklaması",
112
+ },
113
+ icon: {
114
+ type: "string",
115
+ description: 'Admin panelinde gösterilecek ikon adı (varsayılan: "puzzle-piece")',
116
+ },
117
+ accessType: {
118
+ type: "number",
119
+ description: "Erişim tipi: 0=public (varsayılan), 1=private",
120
+ },
121
+ },
122
+ required: ["name", "title", "definition"],
123
+ },
124
+ handler: async (args) => {
125
+ // definition can come as object or JSON string — normalize to object
126
+ let definition = args.definition;
127
+ if (typeof definition === "string") {
128
+ try {
129
+ definition = JSON.parse(definition);
130
+ }
131
+ catch {
132
+ /* keep as-is */
133
+ }
134
+ }
135
+ const result = await client.createComponent({
136
+ name: args.name,
137
+ title: args.title,
138
+ definition,
139
+ type: args.type ?? "element",
140
+ droppable: args.droppable ?? true,
141
+ description: args.description,
142
+ icon: args.icon ?? "puzzle-piece",
143
+ accessType: args.accessType ?? 0,
144
+ });
145
+ return {
146
+ content: [
147
+ { type: "text", text: JSON.stringify(result, null, 2) },
148
+ ],
149
+ };
150
+ },
151
+ },
152
+ // ─── Update Component ──────────────────────────────────
153
+ update_component: {
154
+ description: "Mevcut bir bileşeni günceller. Sadece değiştirmek istediğiniz alanları gönderin.",
155
+ inputSchema: {
156
+ type: "object",
157
+ properties: {
158
+ id: { type: "string", description: "Güncellenecek bileşen ID" },
159
+ name: { type: "string", description: "Yeni bileşen adı" },
160
+ title: { type: "string", description: "Yeni bileşen başlığı" },
161
+ definition: {
162
+ type: "object",
163
+ description: "Güncellenmiş schema: { props: [...] }",
164
+ },
165
+ type: {
166
+ type: "string",
167
+ description: "Bileşen tipi: element | wrapper | custom | ecommerce",
168
+ },
169
+ droppable: { type: "boolean" },
170
+ description: { type: "string" },
171
+ icon: { type: "string" },
172
+ accessType: { type: "number" },
173
+ },
174
+ required: ["id"],
175
+ },
176
+ handler: async (args) => {
177
+ const { id, ...rest } = args;
178
+ // normalize definition if string
179
+ if (typeof rest.definition === "string") {
180
+ try {
181
+ rest.definition = JSON.parse(rest.definition);
182
+ }
183
+ catch {
184
+ /* keep */
185
+ }
186
+ }
187
+ const result = await client.updateComponent(id, rest);
188
+ return {
189
+ content: [
190
+ { type: "text", text: JSON.stringify(result, null, 2) },
191
+ ],
192
+ };
193
+ },
194
+ },
195
+ // ─── List Base Components ──────────────────────────────
196
+ list_base_components: {
197
+ description: "Sistemde yerleşik olarak gelen base (built-in) bileşenleri listeler. Bu bileşenler API'de değil MCP içinde tutulur. isMobile:false olanlar sadece web builder'da, isMobile:true olanlar hem web hem mobilde kullanılır. Schema'yı değiştirmek için wappa-mcp/src/base-components.ts dosyasını düzenleyin.",
198
+ inputSchema: {
199
+ type: "object",
200
+ properties: {
201
+ isMobile: {
202
+ type: "boolean",
203
+ description: "true → yalnızca mobil bileşenleri, false → yalnızca web bileşenlerini getir. Boş bırakılırsa hepsi döner.",
204
+ },
205
+ type: {
206
+ type: "string",
207
+ description: "element | wrapper — bileşen tipine göre filtrele",
208
+ },
209
+ },
210
+ },
211
+ handler: async (args) => {
212
+ let result = BASE_COMPONENTS;
213
+ if (args.isMobile !== undefined) {
214
+ result = result.filter((c) => c.isMobile === args.isMobile);
215
+ }
216
+ if (args.type) {
217
+ result = result.filter((c) => c.type === args.type);
218
+ }
219
+ return {
220
+ content: [
221
+ {
222
+ type: "text",
223
+ text: JSON.stringify(result.map((c) => ({
224
+ id: c.id,
225
+ title: c.title,
226
+ type: c.type,
227
+ isMobile: c.isMobile,
228
+ droppable: c.droppable,
229
+ description: c.description,
230
+ propCount: c.definition.props.length,
231
+ })), null, 2),
232
+ },
233
+ ],
234
+ };
235
+ },
236
+ },
237
+ // ─── Delete Component ──────────────────────────────────
238
+ delete_component: {
239
+ description: "Bir bileşeni siler. DİKKAT: Bu işlem geri alınamaz!",
240
+ inputSchema: {
241
+ type: "object",
242
+ properties: {
243
+ id: { type: "string", description: "Silinecek bileşen ID" },
244
+ },
245
+ required: ["id"],
246
+ },
247
+ handler: async (args) => {
248
+ const result = await client.deleteComponent(args.id);
249
+ return {
250
+ content: [
251
+ { type: "text", text: JSON.stringify(result, null, 2) },
252
+ ],
253
+ };
254
+ },
255
+ },
256
+ };
257
+ }
258
+ //# sourceMappingURL=components.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components.js","sourceRoot":"","sources":["../../src/tools/components.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE3E,MAAM,UAAU,iBAAiB,CAAC,MAAiB;IACjD,OAAO;QACL,0DAA0D;QAC1D,eAAe,EAAE;YACf,WAAW,EACT,mGAAmG;YACrG,WAAW,EAAE;gBACX,IAAI,EAAE,QAAiB;gBACvB,UAAU,EAAE;oBACV,IAAI,EAAE;wBACJ,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,yCAAyC;qBACvD;oBACD,IAAI,EAAE;wBACJ,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,wCAAwC;qBACtD;oBACD,IAAI,EAAE;wBACJ,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,mCAAmC;qBACjD;iBACF;aACF;YACD,OAAO,EAAE,KAAK,EAAE,IAIf,EAAE,EAAE;gBACH,MAAM,MAAM,GAA2B,EAAE,CAAC;gBAC1C,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS;oBAAE,MAAM,CAAC,IAAI,GAAG,MA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,CAAC,IAAI,CAAC;aACjB;YACD,OAAO,EAAE,KAAK,EAAE,IAAoB,EAAE,EAAE;gBACtC,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBACrD,OAAO;oBACL,OAAO,EAAE;wBACP,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE;qBACjE;iBACF,CAAC;YACJ,CAAC;SACF;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,308 @@
1
+ /**
2
+ * MCP Tools for WAP Dynamic Entity Records CRUD
3
+ * DynamicEntities = actual data records stored in entity-defined tables
4
+ * entityId = the Entity schema GUID (table definition)
5
+ * id = the individual record GUID
6
+ */
7
+ import { WapClient } from "../client.js";
8
+ export declare function getDynamicEntityTools(client: WapClient): {
9
+ list_dynamic_entity_records: {
10
+ description: string;
11
+ inputSchema: {
12
+ type: "object";
13
+ properties: {
14
+ entityId: {
15
+ type: string;
16
+ description: string;
17
+ };
18
+ status: {
19
+ type: string;
20
+ description: string;
21
+ enum: string[];
22
+ };
23
+ pageIndex: {
24
+ type: string;
25
+ description: string;
26
+ };
27
+ pageLength: {
28
+ type: string;
29
+ description: string;
30
+ };
31
+ order: {
32
+ type: string;
33
+ description: string;
34
+ };
35
+ isDescending: {
36
+ type: string;
37
+ description: string;
38
+ };
39
+ };
40
+ required: string[];
41
+ };
42
+ handler: (args: {
43
+ entityId: string;
44
+ status?: string;
45
+ pageIndex?: number;
46
+ pageLength?: number;
47
+ order?: string;
48
+ isDescending?: boolean;
49
+ }) => Promise<{
50
+ content: {
51
+ type: "text";
52
+ text: string;
53
+ }[];
54
+ }>;
55
+ };
56
+ get_dynamic_entity_record: {
57
+ description: string;
58
+ inputSchema: {
59
+ type: "object";
60
+ properties: {
61
+ entityId: {
62
+ type: string;
63
+ description: string;
64
+ };
65
+ id: {
66
+ type: string;
67
+ description: string;
68
+ };
69
+ };
70
+ required: string[];
71
+ };
72
+ handler: (args: {
73
+ entityId: string;
74
+ id: string;
75
+ }) => Promise<{
76
+ content: {
77
+ type: "text";
78
+ text: string;
79
+ }[];
80
+ }>;
81
+ };
82
+ create_dynamic_entity_record: {
83
+ description: string;
84
+ inputSchema: {
85
+ type: "object";
86
+ properties: {
87
+ entityId: {
88
+ type: string;
89
+ description: string;
90
+ };
91
+ status: {
92
+ type: string;
93
+ description: string;
94
+ enum: string[];
95
+ };
96
+ columns: {
97
+ type: string;
98
+ description: string;
99
+ };
100
+ };
101
+ required: string[];
102
+ };
103
+ handler: (args: {
104
+ entityId: string;
105
+ status?: string;
106
+ columns: unknown[];
107
+ }) => Promise<{
108
+ content: {
109
+ type: "text";
110
+ text: string;
111
+ }[];
112
+ }>;
113
+ };
114
+ update_dynamic_entity_record: {
115
+ description: string;
116
+ inputSchema: {
117
+ type: "object";
118
+ properties: {
119
+ entityId: {
120
+ type: string;
121
+ description: string;
122
+ };
123
+ id: {
124
+ type: string;
125
+ description: string;
126
+ };
127
+ status: {
128
+ type: string;
129
+ description: string;
130
+ enum: string[];
131
+ };
132
+ columns: {
133
+ type: string;
134
+ description: string;
135
+ };
136
+ };
137
+ required: string[];
138
+ };
139
+ handler: (args: {
140
+ entityId: string;
141
+ id: string;
142
+ status?: string;
143
+ columns: unknown[];
144
+ }) => Promise<{
145
+ content: {
146
+ type: "text";
147
+ text: string;
148
+ }[];
149
+ }>;
150
+ };
151
+ update_dynamic_entity_status: {
152
+ description: string;
153
+ inputSchema: {
154
+ type: "object";
155
+ properties: {
156
+ entityId: {
157
+ type: string;
158
+ description: string;
159
+ };
160
+ id: {
161
+ type: string;
162
+ description: string;
163
+ };
164
+ status: {
165
+ type: string;
166
+ description: string;
167
+ enum: string[];
168
+ };
169
+ };
170
+ required: string[];
171
+ };
172
+ handler: (args: {
173
+ entityId: string;
174
+ id: string;
175
+ status: string;
176
+ }) => Promise<{
177
+ content: {
178
+ type: "text";
179
+ text: string;
180
+ }[];
181
+ }>;
182
+ };
183
+ delete_dynamic_entity_record: {
184
+ description: string;
185
+ inputSchema: {
186
+ type: "object";
187
+ properties: {
188
+ entityId: {
189
+ type: string;
190
+ description: string;
191
+ };
192
+ id: {
193
+ type: string;
194
+ description: string;
195
+ };
196
+ };
197
+ required: string[];
198
+ };
199
+ handler: (args: {
200
+ entityId: string;
201
+ id: string;
202
+ }) => Promise<{
203
+ content: {
204
+ type: "text";
205
+ text: string;
206
+ }[];
207
+ }>;
208
+ };
209
+ clone_dynamic_entity_record: {
210
+ description: string;
211
+ inputSchema: {
212
+ type: "object";
213
+ properties: {
214
+ entityId: {
215
+ type: string;
216
+ description: string;
217
+ };
218
+ id: {
219
+ type: string;
220
+ description: string;
221
+ };
222
+ };
223
+ required: string[];
224
+ };
225
+ handler: (args: {
226
+ entityId: string;
227
+ id: string;
228
+ }) => Promise<{
229
+ content: {
230
+ type: "text";
231
+ text: string;
232
+ }[];
233
+ }>;
234
+ };
235
+ create_dynamic_entity_localization: {
236
+ description: string;
237
+ inputSchema: {
238
+ type: "object";
239
+ properties: {
240
+ entityId: {
241
+ type: string;
242
+ description: string;
243
+ };
244
+ id: {
245
+ type: string;
246
+ description: string;
247
+ };
248
+ sourceLanguageId: {
249
+ type: string;
250
+ description: string;
251
+ };
252
+ useTranslateApi: {
253
+ type: string;
254
+ description: string;
255
+ };
256
+ };
257
+ required: string[];
258
+ };
259
+ handler: (args: {
260
+ entityId: string;
261
+ id: string;
262
+ sourceLanguageId: string;
263
+ useTranslateApi?: boolean;
264
+ }) => Promise<{
265
+ content: {
266
+ type: "text";
267
+ text: string;
268
+ }[];
269
+ }>;
270
+ };
271
+ get_dynamic_entity_versions: {
272
+ description: string;
273
+ inputSchema: {
274
+ type: "object";
275
+ properties: {
276
+ entityId: {
277
+ type: string;
278
+ description: string;
279
+ };
280
+ id: {
281
+ type: string;
282
+ description: string;
283
+ };
284
+ pageIndex: {
285
+ type: string;
286
+ description: string;
287
+ };
288
+ pageLength: {
289
+ type: string;
290
+ description: string;
291
+ };
292
+ };
293
+ required: string[];
294
+ };
295
+ handler: (args: {
296
+ entityId: string;
297
+ id: string;
298
+ pageIndex?: number;
299
+ pageLength?: number;
300
+ }) => Promise<{
301
+ content: {
302
+ type: "text";
303
+ text: string;
304
+ }[];
305
+ }>;
306
+ };
307
+ };
308
+ //# sourceMappingURL=dynamic-entities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamic-entities.d.ts","sourceRoot":"","sources":["../../src/tools/dynamic-entities.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAgC3B;YACpB,QAAQ,EAAE,MAAM,CAAC;YACjB,MAAM,CAAC,EAAE,MAAM,CAAC;YAChB,SAAS,CAAC,EAAE,MAAM,CAAC;YACnB,UAAU,CAAC,EAAE,MAAM,CAAC;YACpB,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,YAAY,CAAC,EAAE,OAAO,CAAC;SACxB;;;;;;;;;;;;;;;;;;;;;;;wBA+BqB;YAAE,QAAQ,EAAE,MAAM,CAAC;YAAC,EAAE,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAwChC;YACpB,QAAQ,EAAE,MAAM,CAAC;YACjB,MAAM,CAAC,EAAE,MAAM,CAAC;YAChB,OAAO,EAAE,OAAO,EAAE,CAAC;SACpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAmCqB;YACpB,QAAQ,EAAE,MAAM,CAAC;YACjB,EAAE,EAAE,MAAM,CAAC;YACX,MAAM,CAAC,EAAE,MAAM,CAAC;YAChB,OAAO,EAAE,OAAO,EAAE,CAAC;SACpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAkCqB;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