@mckit/schematics 0.0.21 → 0.0.23
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/README.md +77 -10
- package/package.json +1 -1
- package/src/collection.json +5 -0
- package/src/core/create-file-with-template.js +1 -0
- package/src/core/create-file-with-template.js.map +1 -1
- package/src/create-crud/files/__class__-form.modal.ts.template +28 -0
- package/src/create-crud/files/__class__.component.html.template +28 -0
- package/src/create-crud/files/__class__.component.scss.template +0 -0
- package/src/create-crud/files/__class__.component.ts.template +57 -0
- package/src/create-crud/files/__class__.service.ts.template +12 -0
- package/src/create-crud/index.d.ts +6 -0
- package/src/create-crud/index.js +71 -0
- package/src/create-crud/index.js.map +1 -0
- package/src/create-crud/schema.json +15 -0
- package/src/set-tenant-backend/index.js +1 -0
- package/src/set-tenant-backend/index.js.map +1 -1
package/README.md
CHANGED
|
@@ -1,28 +1,95 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @mckit/schematics
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`@mckit/schematics` es una colección de Angular Schematics diseñada para acelerar y facilitar el desarrollo de proyectos en Angular mediante la generación de código boilerplate, la configuración de funcionalidades y la implementación de patrones recurrentes.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## 🚀 Empezando (Getting Started)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
### Instalación
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Primero, asegúrate de tener instalado el Angular CLI. Si deseas usar los schematics globalmente para pruebas, también necesitarás `@angular-devkit/schematics-cli`.
|
|
10
10
|
|
|
11
|
+
```bash
|
|
12
|
+
npm install -g @angular-devkit/schematics-cli
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Para instalar `@mckit/schematics` en tu proyecto:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @mckit/schematics --save-dev
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## 🛠 Schematics Disponibles (Generadores)
|
|
22
|
+
|
|
23
|
+
A continuación se detalla la lista de comandos disponibles provistos por este paquete. Puedes ejecutarlos usando el Angular CLI (`ng generate` o `ng g`).
|
|
24
|
+
|
|
25
|
+
### 1. `init`
|
|
26
|
+
Configura un proyecto nuevo con los ajustes base de MCKit.
|
|
27
|
+
```bash
|
|
28
|
+
ng generate @mckit/schematics:init
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### 2. `add-login-page`
|
|
32
|
+
Configura y genera una página de inicio de sesión (Login/Sign-in) estándar para la aplicación.
|
|
33
|
+
```bash
|
|
34
|
+
ng generate @mckit/schematics:add-login-page
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### 3. `install-layout-fuse`
|
|
38
|
+
Instala y configura la plantilla/layout de Fuse en la aplicación.
|
|
39
|
+
```bash
|
|
40
|
+
ng generate @mckit/schematics:install-layout-fuse
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### 4. `addTable`
|
|
44
|
+
Genera un nuevo componente de tabla (Table) basado en un esquema o configuración predefinida.
|
|
45
|
+
```bash
|
|
46
|
+
ng generate @mckit/schematics:addTable
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### 5. `set-tenant-backend`
|
|
50
|
+
Configura una arquitectura backend multi-tenant (multi-inquilino) para el proyecto.
|
|
51
|
+
```bash
|
|
52
|
+
ng generate @mckit/schematics:set-tenant-backend
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### 6. `mc-schematic`
|
|
56
|
+
Un schematic en blanco utilizado como punto de partida.
|
|
57
|
+
```bash
|
|
58
|
+
ng generate @mckit/schematics:mc-schematic
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## 💻 Desarrollo y Testing (Development & Testing)
|
|
62
|
+
|
|
63
|
+
Si deseas contribuir o probar los schematics de manera local.
|
|
64
|
+
|
|
65
|
+
### Pruebas Locales (Local Testing)
|
|
66
|
+
Puedes usar la herramienta de línea de comandos `schematics`, que actúa igual que el comando `generate` del Angular CLI, pero orientada al testing y soporte de modo debug.
|
|
67
|
+
|
|
68
|
+
Revisa la documentación con:
|
|
11
69
|
```bash
|
|
12
70
|
schematics --help
|
|
13
71
|
```
|
|
14
72
|
|
|
15
|
-
### Unit Testing
|
|
73
|
+
### Pruebas Unitarias (Unit Testing)
|
|
74
|
+
El proyecto usa Jasmine como entorno de pruebas. Para ejecutar las pruebas unitarias:
|
|
75
|
+
```bash
|
|
76
|
+
npm run test
|
|
77
|
+
```
|
|
78
|
+
Este comando compilará los archivos TypeScript y ejecutará los tests (`*_spec.ts`).
|
|
16
79
|
|
|
17
|
-
|
|
80
|
+
### Compilación (Build)
|
|
81
|
+
Para compilar los schematics manualmente (TypeScript a JavaScript):
|
|
82
|
+
```bash
|
|
83
|
+
npm run build
|
|
84
|
+
```
|
|
18
85
|
|
|
19
|
-
|
|
86
|
+
## 📦 Publicación (Publishing)
|
|
20
87
|
|
|
21
|
-
|
|
88
|
+
Para publicar una nueva versión de los schematics a NPM:
|
|
22
89
|
|
|
23
90
|
```bash
|
|
24
91
|
npm run build
|
|
25
92
|
npm publish
|
|
26
93
|
```
|
|
27
94
|
|
|
28
|
-
|
|
95
|
+
¡Asegúrate de incrementar la versión (`version`) en el archivo `package.json` antes de publicar!
|
package/package.json
CHANGED
package/src/collection.json
CHANGED
|
@@ -22,6 +22,11 @@
|
|
|
22
22
|
"factory": "./add-table/index#addTable",
|
|
23
23
|
"schema": "./add-table/schema.json"
|
|
24
24
|
},
|
|
25
|
+
"create-crud": {
|
|
26
|
+
"description": "Create Crud",
|
|
27
|
+
"factory": "./create-crud/index#createCrud",
|
|
28
|
+
"schema": "./create-crud/schema.json"
|
|
29
|
+
},
|
|
25
30
|
"set-tenant-backend": {
|
|
26
31
|
"description": "Set multi tenant backend",
|
|
27
32
|
"factory": "./set-tenant-backend/index#install"
|
|
@@ -13,6 +13,7 @@ function createFileWithTemplate(tree, dirname, fileName, template, vars) {
|
|
|
13
13
|
let content = fs.readFileSync(filePath, 'utf8');
|
|
14
14
|
// Replace vars
|
|
15
15
|
Object.keys(vars).forEach(key => {
|
|
16
|
+
content = content.replace(new RegExp(`{{ ${key} }}`, 'g'), vars[key]);
|
|
16
17
|
content = content.replace(new RegExp(`{{${key}}}`, 'g'), vars[key]);
|
|
17
18
|
});
|
|
18
19
|
tree.create(fileName, content);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-file-with-template.js","sourceRoot":"","sources":["create-file-with-template.ts"],"names":[],"mappings":";;AAIA,
|
|
1
|
+
{"version":3,"file":"create-file-with-template.js","sourceRoot":"","sources":["create-file-with-template.ts"],"names":[],"mappings":";;AAIA,wDAiBC;AApBD,yBAAyB;AACzB,6BAA6B;AAE7B,SAAgB,sBAAsB,CAAC,IAAU,EAAE,OAAe,EAAE,QAAgB,EAAE,QAAgB,EAAE,IAA+B;IACrI,2BAA2B;IAC3B,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC1B,OAAO;IACT,CAAC;IAED,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,GAAG,QAAQ,CAAC,CAAC;IACzD,IAAI,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC5B,IAAI,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAChD,eAAe;QACf,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YAC9B,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,MAAM,GAAG,KAAK,EAAE,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;YACtE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,KAAK,GAAG,IAAI,EAAE,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QACtE,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACjC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { inject, Injectable } from '@angular/core';
|
|
2
|
+
import { Validators } from '@angular/forms';
|
|
3
|
+
import { {{ classNameCamel }} } from '../entities/{{kebabName}}.entity';
|
|
4
|
+
import { HiddenField, IftaTextField, MCBaseHttpFormModalService, MCEventModalForm } from '@mckit/form';
|
|
5
|
+
import { Observable } from 'rxjs';
|
|
6
|
+
import { {{ classNameCamel }}Service } from '../services/{{kebabName}}.service';
|
|
7
|
+
|
|
8
|
+
@Injectable({
|
|
9
|
+
providedIn: 'root'
|
|
10
|
+
})
|
|
11
|
+
export class {{ classNameCamel }}FormModal extends MCBaseHttpFormModalService<{{ classNameCamel }}> {
|
|
12
|
+
|
|
13
|
+
{{kebabName}}Service = inject({{ classNameCamel }}Service);
|
|
14
|
+
|
|
15
|
+
override open(): Observable<MCEventModalForm> {
|
|
16
|
+
return super.open({
|
|
17
|
+
title: '{{ classNameCamel }} Form',
|
|
18
|
+
httpService: this.{{kebabName}}Service,
|
|
19
|
+
identifierField: 'id'
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
getFields() {
|
|
24
|
+
return [
|
|
25
|
+
{{fields}}
|
|
26
|
+
];
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<mc-odata-page
|
|
2
|
+
[breadcrumb]="breadcrumb"
|
|
3
|
+
[title]="'{{ classNameCamel }} page'"
|
|
4
|
+
[subtitle]="'Description of page'"
|
|
5
|
+
[key]="'{{kebabName}}-list-page'"
|
|
6
|
+
[httpService]="httpService"
|
|
7
|
+
[columns]="columns"
|
|
8
|
+
[searchFieldsKey]="searchFieldsKey" >
|
|
9
|
+
|
|
10
|
+
<ng-template mcRightHeaderTemplate>
|
|
11
|
+
<p-button label="Add" styleClass="ml-3" (onClick)="onClickAdd()" />
|
|
12
|
+
</ng-template>
|
|
13
|
+
|
|
14
|
+
<ng-template mcThTemplate="actions"></ng-template>
|
|
15
|
+
|
|
16
|
+
<ng-template mcTdTemplate="status" let-row>
|
|
17
|
+
@if(row.status == 1){
|
|
18
|
+
<p-tag severity="success" value="Active" />
|
|
19
|
+
} @else {
|
|
20
|
+
<p-tag severity="secondary" value="Inactive" />
|
|
21
|
+
}
|
|
22
|
+
</ng-template>
|
|
23
|
+
|
|
24
|
+
<ng-template mcTdTemplate="actions" let-row>
|
|
25
|
+
<mc-actions-column [item]="row" (onEdit)="onClickEdit($event)" (onRemove)="onClickRemove($event)"></mc-actions-column>
|
|
26
|
+
</ng-template>
|
|
27
|
+
|
|
28
|
+
</mc-odata-page>
|
|
File without changes
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { Component, inject, OnInit, viewChild, DestroyRef } from '@angular/core';
|
|
3
|
+
import { MCOdataPage, MCRightHeaderTemplateDirective } from '@mckit/odata';
|
|
4
|
+
import { MenuItem } from 'primeng/api';
|
|
5
|
+
import { ButtonModule } from 'primeng/button';
|
|
6
|
+
import { MCActionsColumn, MCTdTemplateDirective, MCThTemplateDirective } from '@mckit/table';
|
|
7
|
+
import { {{classNameCamel}}Service } from '../../services/{{kebabName}}.service';
|
|
8
|
+
import { TagModule } from 'primeng/tag';
|
|
9
|
+
import { DialogService } from 'primeng/dynamicdialog';
|
|
10
|
+
import { MCHttpFormModalService } from '@mckit/form';
|
|
11
|
+
import { {{classNameCamel}}FormModal } from '../../modals/{{kebabName}}-form.modal';
|
|
12
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
13
|
+
|
|
14
|
+
@Component({
|
|
15
|
+
selector: 'app-{{kebabName}}-list-page',
|
|
16
|
+
imports: [CommonModule, MCOdataPage, ButtonModule, MCThTemplateDirective, MCTdTemplateDirective, MCActionsColumn, MCRightHeaderTemplateDirective, TagModule],
|
|
17
|
+
providers: [DialogService, MCHttpFormModalService, {{classNameCamel}}FormModal],
|
|
18
|
+
templateUrl: './{{kebabName}}-list-page.html',
|
|
19
|
+
styleUrl: './{{kebabName}}-list-page.scss'
|
|
20
|
+
})
|
|
21
|
+
export class {{classNameCamel}} {
|
|
22
|
+
|
|
23
|
+
odataPage = viewChild(MCOdataPage);
|
|
24
|
+
|
|
25
|
+
breadcrumb: MenuItem[] = [
|
|
26
|
+
{ label: 'Home', routerLink: '/' },
|
|
27
|
+
{ label: '{{classNameCamel}}' }
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
httpService = inject({{classNameCamel}}Service);
|
|
31
|
+
|
|
32
|
+
{{kebabName}}FormModal = inject({{classNameCamel}}FormModal);
|
|
33
|
+
|
|
34
|
+
destroyRef = inject(DestroyRef);
|
|
35
|
+
|
|
36
|
+
columns = [
|
|
37
|
+
{{columns}}
|
|
38
|
+
];
|
|
39
|
+
|
|
40
|
+
searchFieldsKey = ['title'];
|
|
41
|
+
|
|
42
|
+
onClickAdd() {
|
|
43
|
+
this.onClickEdit(new {{classNameCamel}}());
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
onClickEdit(item: any) {
|
|
47
|
+
this.{{kebabName}}FormModal.open(item)
|
|
48
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
49
|
+
.subscribe(() => {
|
|
50
|
+
this.odataPage()?.loadItems();
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
onClickRemove(item: any) {
|
|
55
|
+
this.odataPage()?.onClickRemove(item);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { {{ classNameCamel }} } from '../entities/{{kebabName}}.entity';
|
|
3
|
+
import { MCApiRestHttpService } from '@mckit/core';
|
|
4
|
+
import { environment } from '../../../../environments/environment';
|
|
5
|
+
|
|
6
|
+
@Injectable({
|
|
7
|
+
providedIn: 'root'
|
|
8
|
+
})
|
|
9
|
+
export class {{ classNameCamel }}Service extends MCApiRestHttpService < {{ classNameCamel }}> {
|
|
10
|
+
override pathModel = '{{kebabName}}s';
|
|
11
|
+
override baseUrl: string = environment.baseUrl;
|
|
12
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createCrud = createCrud;
|
|
4
|
+
const run_command_1 = require("../core/run-command");
|
|
5
|
+
const create_file_with_template_1 = require("../core/create-file-with-template");
|
|
6
|
+
const get_properties_by_class_1 = require("../core/get-properties-by-class");
|
|
7
|
+
function createCrud(_options) {
|
|
8
|
+
return (tree, _context) => {
|
|
9
|
+
if (!_options.name) {
|
|
10
|
+
throw new Error('El parámetro "name" es obligatorio.');
|
|
11
|
+
}
|
|
12
|
+
// Install the required dependencies
|
|
13
|
+
(0, run_command_1.runCommand)('npm install --save @mckit/table @mckit/odata @mckit/filter @mckit/layout-core @mckit/form', _context);
|
|
14
|
+
// Config base path for features
|
|
15
|
+
const className = _options.name;
|
|
16
|
+
let featureName = _options.name.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, '$1-$2').toLowerCase();
|
|
17
|
+
if (featureName.charAt(0) === '-') {
|
|
18
|
+
featureName = featureName.substring(1);
|
|
19
|
+
}
|
|
20
|
+
const featurePath = 'src/app/features/' + featureName;
|
|
21
|
+
// Create service
|
|
22
|
+
(0, create_file_with_template_1.createFileWithTemplate)(tree, __dirname, `${featurePath}/services/${featureName}.service.ts`, '__class__.service.ts.template', {
|
|
23
|
+
'kebabName': featureName,
|
|
24
|
+
'classNameCamel': className
|
|
25
|
+
});
|
|
26
|
+
// Get properties by class
|
|
27
|
+
let classProperty = (0, get_properties_by_class_1.getPropertiesByClass)(tree, _options.name);
|
|
28
|
+
// Generate content for fields variable
|
|
29
|
+
let fields = '';
|
|
30
|
+
classProperty.properties.forEach((property) => {
|
|
31
|
+
if (property == 'id') {
|
|
32
|
+
fields += `HiddenField.init('id', 'Id'),
|
|
33
|
+
`;
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
fields += `IftaTextField.init('${property}', '${property}'),
|
|
37
|
+
`;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
// Create form modal
|
|
41
|
+
(0, create_file_with_template_1.createFileWithTemplate)(tree, __dirname, `${featurePath}/modals/${featureName}-form.modal.ts`, '__class__-form.modal.ts.template', {
|
|
42
|
+
'kebabName': featureName,
|
|
43
|
+
'classNameCamel': className,
|
|
44
|
+
'fields': fields
|
|
45
|
+
});
|
|
46
|
+
// Create HTML file
|
|
47
|
+
(0, create_file_with_template_1.createFileWithTemplate)(tree, __dirname, `${featurePath}/pages/${featureName}-list-page/${featureName}-list-page.html`, '__class__.component.html.template', {
|
|
48
|
+
'kebabName': featureName,
|
|
49
|
+
'classNameCamel': className
|
|
50
|
+
});
|
|
51
|
+
// Create SCSS file
|
|
52
|
+
(0, create_file_with_template_1.createFileWithTemplate)(tree, __dirname, `${featurePath}/pages/${featureName}-list-page/${featureName}-list-page.scss`, '__class__.component.scss.template', {
|
|
53
|
+
'className': featureName
|
|
54
|
+
});
|
|
55
|
+
// Generate content for columns variable
|
|
56
|
+
let columns = '';
|
|
57
|
+
classProperty.properties.forEach((property) => {
|
|
58
|
+
columns += `{ field: '${property}', title: '${property}', isShow: true, isSortable: true },
|
|
59
|
+
`;
|
|
60
|
+
});
|
|
61
|
+
columns += "{ field: 'actions', title: 'Actions', isShow: true, isSortable: false }";
|
|
62
|
+
// Create TS file
|
|
63
|
+
(0, create_file_with_template_1.createFileWithTemplate)(tree, __dirname, `${featurePath}/pages/${featureName}-list-page/${featureName}-list-page.ts`, '__class__.component.ts.template', {
|
|
64
|
+
'kebabName': featureName,
|
|
65
|
+
'classNameCamel': className,
|
|
66
|
+
'columns': columns
|
|
67
|
+
});
|
|
68
|
+
return tree;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EAAE,OAAO;SACnB,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "MCKitSchematicsCreateCrud",
|
|
4
|
+
"title": "Generate a new crud",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"name": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "Ruta de la entidad"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"required": [
|
|
13
|
+
"name"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
@@ -58,6 +58,7 @@ function install(_options) {
|
|
|
58
58
|
@source "../node_modules/@mckit/tenant";
|
|
59
59
|
`);
|
|
60
60
|
// Replace App Component
|
|
61
|
+
tree.overwrite('src/app/app.html', '<router-outlet />');
|
|
61
62
|
tree.overwrite('src/app/app.ts', (_a = (0, get_content_by_file_1.getContentByFile)(__dirname, 'app.ts.template')) !== null && _a !== void 0 ? _a : '');
|
|
62
63
|
// Create Footer Layout
|
|
63
64
|
tree.create('src/app/shared/components/footer-layout/footer-layout.component.scss', '');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;AA8CA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;AA8CA,0BA2EC;AAxHD,qDAAiD;AACjD,iDAA6C;AAC7C,qEAA+D;AAC/D,uEAAiE;AACjE,+DAA0D;AAE1D,SAAS,gBAAgB,CAAC,IAAU,EAAE,QAA0B;IAC9D,MAAM,QAAQ,GAAG,uBAAuB,CAAC;IAEzC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC3B,OAAO;IACT,CAAC;IAED,MAAM,UAAU,GAAG,IAAI,CAAC,I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