@hedhog/admin 0.0.88 → 0.0.90
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/entities/locale.entity.d.ts +0 -1
- package/dist/entities/locale.entity.d.ts.map +1 -1
- package/dist/entities/locale.entity.js +0 -7
- package/dist/entities/locale.entity.js.map +1 -1
- package/dist/locale/dto/create.dto.d.ts +0 -1
- package/dist/locale/dto/create.dto.d.ts.map +1 -1
- package/dist/locale/dto/create.dto.js +0 -4
- package/dist/locale/dto/create.dto.js.map +1 -1
- package/dist/locale/dto/update.dto.d.ts +0 -1
- package/dist/locale/dto/update.dto.d.ts.map +1 -1
- package/dist/locale/dto/update.dto.js +0 -5
- package/dist/locale/dto/update.dto.js.map +1 -1
- package/dist/locale/locale.controller.d.ts +1 -1
- package/dist/locale/locale.controller.d.ts.map +1 -1
- package/dist/locale/locale.controller.js +14 -11
- package/dist/locale/locale.controller.js.map +1 -1
- package/dist/locale/locale.service.d.ts +1 -1
- package/dist/locale/locale.service.d.ts.map +1 -1
- package/dist/locale/locale.service.js +2 -2
- package/dist/locale/locale.service.js.map +1 -1
- package/dist/locale/locale.service.spec.js +0 -5
- package/dist/locale/locale.service.spec.js.map +1 -1
- package/dist/role/guards/role.guard.d.ts.map +1 -1
- package/dist/role/guards/role.guard.js +8 -0
- package/dist/role/guards/role.guard.js.map +1 -1
- package/hedhog.yaml +1 -4
- package/package.json +1 -1
- package/src/entities/locale.entity.ts +0 -6
- package/dist/__migrations/migrate-01.d.ts +0 -6
- package/dist/__migrations/migrate-01.d.ts.map +0 -1
- package/dist/__migrations/migrate-01.js +0 -80
- package/dist/__migrations/migrate-01.js.map +0 -1
- package/dist/__migrations/migrate-02.d.ts +0 -6
- package/dist/__migrations/migrate-02.d.ts.map +0 -1
- package/dist/__migrations/migrate-02.js +0 -68
- package/dist/__migrations/migrate-02.js.map +0 -1
- package/dist/__migrations/migrate-03.d.ts +0 -6
- package/dist/__migrations/migrate-03.d.ts.map +0 -1
- package/dist/__migrations/migrate-03.js +0 -90
- package/dist/__migrations/migrate-03.js.map +0 -1
- package/dist/__migrations/migrate-04.d.ts +0 -6
- package/dist/__migrations/migrate-04.d.ts.map +0 -1
- package/dist/__migrations/migrate-04.js +0 -63
- package/dist/__migrations/migrate-04.js.map +0 -1
- package/dist/__migrations/migrate-05.d.ts +0 -6
- package/dist/__migrations/migrate-05.d.ts.map +0 -1
- package/dist/__migrations/migrate-05.js +0 -100
- package/dist/__migrations/migrate-05.js.map +0 -1
- package/dist/__migrations/migrate-06.d.ts +0 -6
- package/dist/__migrations/migrate-06.d.ts.map +0 -1
- package/dist/__migrations/migrate-06.js +0 -37
- package/dist/__migrations/migrate-06.js.map +0 -1
- package/dist/__migrations/migrate-07.d.ts +0 -6
- package/dist/__migrations/migrate-07.d.ts.map +0 -1
- package/dist/__migrations/migrate-07.js +0 -59
- package/dist/__migrations/migrate-07.js.map +0 -1
- package/dist/__migrations/migrate-08.d.ts +0 -6
- package/dist/__migrations/migrate-08.d.ts.map +0 -1
- package/dist/__migrations/migrate-08.js +0 -39
- package/dist/__migrations/migrate-08.js.map +0 -1
- package/dist/__migrations/migrate-09.d.ts +0 -6
- package/dist/__migrations/migrate-09.d.ts.map +0 -1
- package/dist/__migrations/migrate-09.js +0 -39
- package/dist/__migrations/migrate-09.js.map +0 -1
- package/dist/__migrations/migrate-10.d.ts +0 -6
- package/dist/__migrations/migrate-10.d.ts.map +0 -1
- package/dist/__migrations/migrate-10.js +0 -39
- package/dist/__migrations/migrate-10.js.map +0 -1
- package/dist/__migrations/migrate-11.d.ts +0 -6
- package/dist/__migrations/migrate-11.d.ts.map +0 -1
- package/dist/__migrations/migrate-11.js +0 -39
- package/dist/__migrations/migrate-11.js.map +0 -1
- package/dist/__migrations/migrate-12.d.ts +0 -6
- package/dist/__migrations/migrate-12.d.ts.map +0 -1
- package/dist/__migrations/migrate-12.js +0 -39
- package/dist/__migrations/migrate-12.js.map +0 -1
- package/dist/__migrations/migrate-13.d.ts +0 -6
- package/dist/__migrations/migrate-13.d.ts.map +0 -1
- package/dist/__migrations/migrate-13.js +0 -30
- package/dist/__migrations/migrate-13.js.map +0 -1
- package/dist/__migrations/migrate-14.d.ts +0 -6
- package/dist/__migrations/migrate-14.d.ts.map +0 -1
- package/dist/__migrations/migrate-14.js +0 -83
- package/dist/__migrations/migrate-14.js.map +0 -1
- package/dist/__migrations/migrate-15.d.ts +0 -6
- package/dist/__migrations/migrate-15.d.ts.map +0 -1
- package/dist/__migrations/migrate-15.js +0 -25
- package/dist/__migrations/migrate-15.js.map +0 -1
- package/dist/__migrations/migrate-16.d.ts +0 -6
- package/dist/__migrations/migrate-16.d.ts.map +0 -1
- package/dist/__migrations/migrate-16.js +0 -61
- package/dist/__migrations/migrate-16.js.map +0 -1
- package/dist/__migrations/migrate-17.d.ts +0 -6
- package/dist/__migrations/migrate-17.d.ts.map +0 -1
- package/dist/__migrations/migrate-17.js +0 -31
- package/dist/__migrations/migrate-17.js.map +0 -1
- package/dist/__migrations/migrate-18.d.ts +0 -6
- package/dist/__migrations/migrate-18.d.ts.map +0 -1
- package/dist/__migrations/migrate-18.js +0 -41
- package/dist/__migrations/migrate-18.js.map +0 -1
- package/dist/__migrations/migrate-19.d.ts +0 -6
- package/dist/__migrations/migrate-19.d.ts.map +0 -1
- package/dist/__migrations/migrate-19.js +0 -175
- package/dist/__migrations/migrate-19.js.map +0 -1
- package/dist/__migrations/migrate-20.d.ts +0 -6
- package/dist/__migrations/migrate-20.d.ts.map +0 -1
- package/dist/__migrations/migrate-20.js +0 -310
- package/dist/__migrations/migrate-20.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"locale.entity.d.ts","sourceRoot":"","sources":["../../src/entities/locale.entity.ts"],"names":[],"mappings":"AAEA,qBAGa,MAAM;IAIjB,EAAE,EAAE,MAAM,CAAC;
|
1
|
+
{"version":3,"file":"locale.entity.d.ts","sourceRoot":"","sources":["../../src/entities/locale.entity.ts"],"names":[],"mappings":"AAEA,qBAGa,MAAM;IAIjB,EAAE,EAAE,MAAM,CAAC;IAKX,IAAI,EAAE,MAAM,CAAC;IAKb,MAAM,EAAE,MAAM,CAAC;IAGf,OAAO,EAAE,OAAO,CAAC;CAClB"}
|
@@ -20,13 +20,6 @@ __decorate([
|
|
20
20
|
}),
|
21
21
|
__metadata("design:type", Number)
|
22
22
|
], Locale.prototype, "id", void 0);
|
23
|
-
__decorate([
|
24
|
-
(0, typeorm_1.JoinColumn)(),
|
25
|
-
(0, typeorm_1.Column)({
|
26
|
-
unsigned: true,
|
27
|
-
}),
|
28
|
-
__metadata("design:type", Number)
|
29
|
-
], Locale.prototype, "country_id", void 0);
|
30
23
|
__decorate([
|
31
24
|
(0, typeorm_1.Column)({
|
32
25
|
length: 2,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"locale.entity.js","sourceRoot":"","sources":["../../src/entities/locale.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA6E;AAKtE,IAAM,MAAM,GAAZ,MAAM,MAAM;
|
1
|
+
{"version":3,"file":"locale.entity.js","sourceRoot":"","sources":["../../src/entities/locale.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA6E;AAKtE,IAAM,MAAM,GAAZ,MAAM,MAAM;CAkBlB,CAAA;AAlBY,wBAAM;AAIjB;IAHC,IAAA,gCAAsB,EAAC;QACtB,QAAQ,EAAE,IAAI;KACf,CAAC;;kCACS;AAKX;IAHC,IAAA,gBAAM,EAAC;QACN,MAAM,EAAE,CAAC;KACV,CAAC;;oCACW;AAKb;IAHC,IAAA,gBAAM,EAAC;QACN,MAAM,EAAE,CAAC;KACV,CAAC;;sCACa;AAGf;IADC,IAAA,gBAAM,GAAE;;uCACQ;iBAjBN,MAAM;IAHlB,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,SAAS;KAChB,CAAC;GACW,MAAM,CAkBlB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"create.dto.d.ts","sourceRoot":"","sources":["../../../src/locale/dto/create.dto.ts"],"names":[],"mappings":"AAUA,qBAAa,SAAS;IAEpB,IAAI,EAAE,MAAM,CAAC;IAGb,IAAI,EAAE,MAAM,CAAC;IAGb,MAAM,EAAE,MAAM,CAAC;
|
1
|
+
{"version":3,"file":"create.dto.d.ts","sourceRoot":"","sources":["../../../src/locale/dto/create.dto.ts"],"names":[],"mappings":"AAUA,qBAAa,SAAS;IAEpB,IAAI,EAAE,MAAM,CAAC;IAGb,IAAI,EAAE,MAAM,CAAC;IAGb,MAAM,EAAE,MAAM,CAAC;CAChB"}
|
@@ -26,8 +26,4 @@ __decorate([
|
|
26
26
|
(0, class_validator_1.IsString)(),
|
27
27
|
__metadata("design:type", String)
|
28
28
|
], CreateDTO.prototype, "region", void 0);
|
29
|
-
__decorate([
|
30
|
-
(0, class_validator_1.IsInt)(),
|
31
|
-
__metadata("design:type", Number)
|
32
|
-
], CreateDTO.prototype, "country_id", void 0);
|
33
29
|
//# sourceMappingURL=create.dto.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"create.dto.js","sourceRoot":"","sources":["../../../src/locale/dto/create.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAQyB;AAEzB,MAAa,SAAS;
|
1
|
+
{"version":3,"file":"create.dto.js","sourceRoot":"","sources":["../../../src/locale/dto/create.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAQyB;AAEzB,MAAa,SAAS;CASrB;AATD,8BASC;AAPC;IADC,IAAA,0BAAQ,GAAE;;uCACE;AAGb;IADC,IAAA,0BAAQ,GAAE;;uCACE;AAGb;IADC,IAAA,0BAAQ,GAAE;;yCACI"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"update.dto.d.ts","sourceRoot":"","sources":["../../../src/locale/dto/update.dto.ts"],"names":[],"mappings":"AAUA,qBAAa,SAAS;IAGpB,IAAI,CAAC,EAAE,MAAM,CAAC;IAId,IAAI,CAAC,EAAE,MAAM,CAAC;IAId,MAAM,CAAC,EAAE,MAAM,CAAC;
|
1
|
+
{"version":3,"file":"update.dto.d.ts","sourceRoot":"","sources":["../../../src/locale/dto/update.dto.ts"],"names":[],"mappings":"AAUA,qBAAa,SAAS;IAGpB,IAAI,CAAC,EAAE,MAAM,CAAC;IAId,IAAI,CAAC,EAAE,MAAM,CAAC;IAId,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
@@ -29,9 +29,4 @@ __decorate([
|
|
29
29
|
(0, class_validator_1.IsOptional)(),
|
30
30
|
__metadata("design:type", String)
|
31
31
|
], UpdateDTO.prototype, "region", void 0);
|
32
|
-
__decorate([
|
33
|
-
(0, class_validator_1.IsInt)(),
|
34
|
-
(0, class_validator_1.IsOptional)(),
|
35
|
-
__metadata("design:type", Number)
|
36
|
-
], UpdateDTO.prototype, "country_id", void 0);
|
37
32
|
//# sourceMappingURL=update.dto.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"update.dto.js","sourceRoot":"","sources":["../../../src/locale/dto/update.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAQyB;AAEzB,MAAa,SAAS;
|
1
|
+
{"version":3,"file":"update.dto.js","sourceRoot":"","sources":["../../../src/locale/dto/update.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAQyB;AAEzB,MAAa,SAAS;CAYrB;AAZD,8BAYC;AATC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;uCACC;AAId;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;uCACC;AAId;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;yCACG"}
|
@@ -5,8 +5,8 @@ import { LocaleService } from './locale.service';
|
|
5
5
|
export declare class LocaleController {
|
6
6
|
private readonly localeService;
|
7
7
|
constructor(localeService: LocaleService);
|
8
|
+
getEnables(paginationParams: any, locale: string): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
8
9
|
getTranslations(localeCode: string, namespace: string): Promise<{}>;
|
9
|
-
getEnableds(paginationParams: any, locale: string): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
10
10
|
get(paginationParams: any): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
11
11
|
getById(id: number): Promise<any>;
|
12
12
|
create(data: CreateDTO): Promise<any>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"locale.controller.d.ts","sourceRoot":"","sources":["../../src/locale/locale.controller.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;
|
1
|
+
{"version":3,"file":"locale.controller.d.ts","sourceRoot":"","sources":["../../src/locale/locale.controller.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAIjD,qBACa,gBAAgB;IAGzB,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAKzC,UAAU,CAAe,gBAAgB,KAAA,EAAY,MAAM,EAAE,MAAM;IAMnE,eAAe,CACE,UAAU,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM;IAMjC,GAAG,CAAe,gBAAgB,KAAA;IAKlC,OAAO,CAA4B,EAAE,EAAE,MAAM;IAKnD,MAAM,CAAS,IAAI,EAAE,SAAS;IAKxB,MAAM,CAA4B,EAAE,EAAE,MAAM,EAAU,IAAI,EAAE,SAAS;IAQrE,MAAM,CAAS,IAAI,EAAE,SAAS;CAGrC"}
|
@@ -20,16 +20,17 @@ const delete_dto_1 = require("./dto/delete.dto");
|
|
20
20
|
const update_dto_1 = require("./dto/update.dto");
|
21
21
|
const locale_service_1 = require("./locale.service");
|
22
22
|
const locale_decorator_1 = require("./locale.decorator");
|
23
|
+
const public_decorator_1 = require("../auth/decorators/public.decorator");
|
23
24
|
let LocaleController = class LocaleController {
|
24
25
|
constructor(localeService) {
|
25
26
|
this.localeService = localeService;
|
26
27
|
}
|
28
|
+
async getEnables(paginationParams, locale) {
|
29
|
+
return this.localeService.getEnables(locale, paginationParams);
|
30
|
+
}
|
27
31
|
async getTranslations(localeCode, namespace) {
|
28
32
|
return this.localeService.getTranslations(localeCode, namespace);
|
29
33
|
}
|
30
|
-
async getEnableds(paginationParams, locale) {
|
31
|
-
return this.localeService.getEnableds(locale, paginationParams);
|
32
|
-
}
|
33
34
|
async get(paginationParams) {
|
34
35
|
return this.localeService.get(paginationParams);
|
35
36
|
}
|
@@ -51,6 +52,16 @@ let LocaleController = class LocaleController {
|
|
51
52
|
};
|
52
53
|
exports.LocaleController = LocaleController;
|
53
54
|
__decorate([
|
55
|
+
(0, public_decorator_1.Public)(),
|
56
|
+
(0, common_1.Get)('system/enables'),
|
57
|
+
__param(0, (0, pagination_1.Pagination)()),
|
58
|
+
__param(1, (0, locale_decorator_1.Locale)()),
|
59
|
+
__metadata("design:type", Function),
|
60
|
+
__metadata("design:paramtypes", [Object, String]),
|
61
|
+
__metadata("design:returntype", Promise)
|
62
|
+
], LocaleController.prototype, "getEnables", null);
|
63
|
+
__decorate([
|
64
|
+
(0, public_decorator_1.Public)(),
|
54
65
|
(0, common_1.Get)(':localeCode/:namespace'),
|
55
66
|
__param(0, (0, common_1.Param)('localeCode')),
|
56
67
|
__param(1, (0, common_1.Param)('namespace')),
|
@@ -58,14 +69,6 @@ __decorate([
|
|
58
69
|
__metadata("design:paramtypes", [String, String]),
|
59
70
|
__metadata("design:returntype", Promise)
|
60
71
|
], LocaleController.prototype, "getTranslations", null);
|
61
|
-
__decorate([
|
62
|
-
(0, common_1.Get)('system/enableds'),
|
63
|
-
__param(0, (0, pagination_1.Pagination)()),
|
64
|
-
__param(1, (0, locale_decorator_1.Locale)()),
|
65
|
-
__metadata("design:type", Function),
|
66
|
-
__metadata("design:paramtypes", [Object, String]),
|
67
|
-
__metadata("design:returntype", Promise)
|
68
|
-
], LocaleController.prototype, "getEnableds", null);
|
69
72
|
__decorate([
|
70
73
|
(0, common_1.Get)(),
|
71
74
|
__param(0, (0, pagination_1.Pagination)()),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"locale.controller.js","sourceRoot":"","sources":["../../src/locale/locale.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAgD;AAChD,2CAWwB;AACxB,iDAA6C;AAC7C,iDAA6C;AAC7C,iDAA6C;AAC7C,qDAAiD;AACjD,yDAA4C;
|
1
|
+
{"version":3,"file":"locale.controller.js","sourceRoot":"","sources":["../../src/locale/locale.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAgD;AAChD,2CAWwB;AACxB,iDAA6C;AAC7C,iDAA6C;AAC7C,iDAA6C;AAC7C,qDAAiD;AACjD,yDAA4C;AAC5C,0EAA6D;AAGtD,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAC3B,YAEmB,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;IAC5C,CAAC;IAIE,AAAN,KAAK,CAAC,UAAU,CAAe,gBAAgB,EAAY,MAAc;QACvE,OAAO,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACjE,CAAC;IAIK,AAAN,KAAK,CAAC,eAAe,CACE,UAAkB,EACnB,SAAiB;QAErC,OAAO,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IACnE,CAAC;IAGK,AAAN,KAAK,CAAC,GAAG,CAAe,gBAAgB;QACtC,OAAO,IAAI,C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KAAK,CAAC;IACC,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;IAAc,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAO,sBAAS;;8CAK1E;AAGK;IADL,IAAA,eAAM,GAAE;IACK,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,sBAAS;;8CAEnC;2BA/CU,gBAAgB;IAD5B,IAAA,mBAAU,EAAC,SAAS,CAAC;IAGjB,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,8BAAa,CAAC,CAAC,CAAA;qCACR,8BAAa;GAHpC,gBAAgB,CAgD5B"}
|
@@ -7,7 +7,7 @@ export declare class LocaleService {
|
|
7
7
|
private readonly prismaService;
|
8
8
|
private readonly paginationService;
|
9
9
|
constructor(prismaService: PrismaService, paginationService: PaginationService);
|
10
|
-
|
10
|
+
getEnables(locale: string, paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
11
11
|
parseLocale(locale: string): {
|
12
12
|
code: string;
|
13
13
|
region: string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"locale.service.d.ts","sourceRoot":"","sources":["../../src/locale/locale.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAO/C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBACa,aAAa;IAGtB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAFjB,aAAa,EAAE,aAAa,EAE5B,iBAAiB,EAAE,iBAAiB;IAGjD,
|
1
|
+
{"version":3,"file":"locale.service.d.ts","sourceRoot":"","sources":["../../src/locale/locale.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAO/C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBACa,aAAa;IAGtB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAFjB,aAAa,EAAE,aAAa,EAE5B,iBAAiB,EAAE,iBAAiB;IAGjD,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,aAAa;IAiEhE,WAAW,CAAC,MAAM,EAAE,MAAM;;;;;IAWpB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAwCrD,GAAG,CAAC,gBAAgB,EAAE,aAAa;IAqBnC,OAAO,CAAC,SAAS,EAAE,MAAM;IAMzB,MAAM,CAAC,IAAI,EAAE,SAAS;IAMtB,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,SAAS,CAAA;KAAE;IAOpD,MAAM,CAAC,EAAE,GAAG,EAAE,EAAE,SAAS;CAehC"}
|
@@ -21,8 +21,8 @@ let LocaleService = class LocaleService {
|
|
21
21
|
this.prismaService = prismaService;
|
22
22
|
this.paginationService = paginationService;
|
23
23
|
}
|
24
|
-
async
|
25
|
-
const fields = ['
|
24
|
+
async getEnables(locale, paginationParams) {
|
25
|
+
const fields = ['code', 'region'];
|
26
26
|
const OR = this.prismaService.createInsensitiveSearch(fields, paginationParams);
|
27
27
|
const result = await this.paginationService.paginate(this.prismaService.locales, paginationParams, {
|
28
28
|
where: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"locale.service.js","sourceRoot":"","sources":["../../src/locale/locale.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAsE;AACtE,2CAA+C;AAC/C,2CAKwB;AAMjB,IAAM,aAAa,GAAnB,MAAM,aAAa;IACxB,YAEmB,aAA4B,EAE5B,iBAAoC;QAFpC,kBAAa,GAAb,aAAa,CAAe;QAE5B,sBAAiB,GAAjB,iBAAiB,CAAmB;IACpD,CAAC;IAEJ,KAAK,CAAC,
|
1
|
+
{"version":3,"file":"locale.service.js","sourceRoot":"","sources":["../../src/locale/locale.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAsE;AACtE,2CAA+C;AAC/C,2CAKwB;AAMjB,IAAM,aAAa,GAAnB,MAAM,aAAa;IACxB,YAEmB,aAA4B,EAE5B,iBAAoC;QAFpC,kBAAa,GAAb,aAAa,CAAe;QAE5B,sBAAiB,GAAjB,iBAAiB,CAAmB;IACpD,CAAC;IAEJ,KAAK,CAAC,UAAU,CAAC,MAAc,EAAE,gBAA+B;QAC9D,MAAM,MAAM,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAClC,MAAM,EAAE,GAAU,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAC1D,MAAM,EACN,gBAAgB,CACjB,CAAC;QAEF,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAClD,IAAI,CAAC,aAAa,CAAC,OAAO,EAC1B,gBAAgB,EAChB;YACE,KAAK,EAAE;gBACL,GAAG,EAAE;oBACH;wBACE,OAAO,EAAE,IAAI;qBACd;oBACD;wBACE,EAAE;qBACH;iBACF;aACF;SACF,CACF,CAAC;QAEF,MAAM,KAAK,GAAG,EAAE,CAAC;QAEjB,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;YAC/B,KAAK,CAAC,IAAI,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EAAE,CAAC,8BAAiB,CAAC,CAAC,CAAA;qCADZ,sBAAa;QAET,8BAAiB;GAL5C,aAAa,CAmLzB"}
|
@@ -99,7 +99,6 @@ describe('LocaleService', () => {
|
|
99
99
|
name: 'English',
|
100
100
|
code: 'en',
|
101
101
|
region: 'us',
|
102
|
-
country_id: 1,
|
103
102
|
created_at: new Date(),
|
104
103
|
updated_at: new Date(),
|
105
104
|
};
|
@@ -116,14 +115,12 @@ describe('LocaleService', () => {
|
|
116
115
|
name: 'English',
|
117
116
|
code: 'en',
|
118
117
|
region: 'us',
|
119
|
-
country_id: 1,
|
120
118
|
};
|
121
119
|
const mockLocale = {
|
122
120
|
id: 1,
|
123
121
|
name: 'English',
|
124
122
|
code: 'en',
|
125
123
|
region: 'us',
|
126
|
-
country_id: 1,
|
127
124
|
created_at: new Date(),
|
128
125
|
updated_at: new Date(),
|
129
126
|
};
|
@@ -138,14 +135,12 @@ describe('LocaleService', () => {
|
|
138
135
|
name: 'English Updated',
|
139
136
|
code: 'en',
|
140
137
|
region: 'us',
|
141
|
-
country_id: 1,
|
142
138
|
};
|
143
139
|
const mockLocale = {
|
144
140
|
id: 1,
|
145
141
|
name: 'English Updated',
|
146
142
|
code: 'en',
|
147
143
|
region: 'us',
|
148
|
-
country_id: 1,
|
149
144
|
created_at: new Date(),
|
150
145
|
updated_at: new Date(),
|
151
146
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"locale.service.spec.js","sourceRoot":"","sources":["../../src/locale/locale.service.spec.ts"],"names":[],"mappings":";;AAAA,6CAAsD;AACtD,qDAAiD;AACjD,2CAA+C;AAC/C,mDAI4B;AAC5B,2CAAqD;AAKrD,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,IAAI,OAAsB,CAAC;IAC3B,IAAI,aAA4B,CAAC;IACjC,IAAI,iBAAoC,CAAC;IAEzC,UAAU,CAAC,KAAK,IAAI,EAAE;QACpB,MAAM,MAAM,GAAkB,MAAM,cAAI,C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CAAC,aAAa,CAAC,CAAC;YACnD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC/B,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"role.guard.d.ts","sourceRoot":"","sources":["../../../src/role/guards/role.guard.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,gBAAgB,EAMjB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;
|
1
|
+
{"version":3,"file":"role.guard.d.ts","sourceRoot":"","sources":["../../../src/role/guards/role.guard.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,gBAAgB,EAMjB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAG/C,qBACa,SAAU,YAAW,WAAW;IAEzC,OAAO,CAAC,SAAS;IAEjB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAFf,SAAS,EAAE,SAAS,EAEX,MAAM,EAAE,aAAa;IAGlC,WAAW,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC;IA6F9D,OAAO,CAAC,sBAAsB;CAI/B"}
|
@@ -18,6 +18,7 @@ const core_1 = require("@nestjs/core");
|
|
18
18
|
const constants_1 = require("@nestjs/common/constants");
|
19
19
|
const role_decorator_1 = require("../decorators/role.decorator");
|
20
20
|
const prisma_1 = require("@hedhog/prisma");
|
21
|
+
const public_decorator_1 = require("../../auth/decorators/public.decorator");
|
21
22
|
let RoleGuard = class RoleGuard {
|
22
23
|
constructor(reflector, prisma) {
|
23
24
|
this.reflector = reflector;
|
@@ -25,6 +26,13 @@ let RoleGuard = class RoleGuard {
|
|
25
26
|
}
|
26
27
|
async canActivate(context) {
|
27
28
|
var _a, _b;
|
29
|
+
const isPublic = this.reflector.getAllAndOverride(public_decorator_1.IS_PUBLIC_KEY, [
|
30
|
+
context.getHandler(),
|
31
|
+
context.getClass(),
|
32
|
+
]);
|
33
|
+
if (isPublic) {
|
34
|
+
return true;
|
35
|
+
}
|
28
36
|
const withRole = this.reflector.getAllAndOverride(role_decorator_1.WITH_ROLE, [
|
29
37
|
context.getHandler(),
|
30
38
|
context.getClass(),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"role.guard.js","sourceRoot":"","sources":["../../../src/role/guards/role.guard.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAQwB;AAExB,uCAAyC;AACzC,wDAA2D;AAC3D,iEAAyD;AACzD,2CAA+C;
|
1
|
+
{"version":3,"file":"role.guard.js","sourceRoot":"","sources":["../../../src/role/guards/role.guard.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAQwB;AAExB,uCAAyC;AACzC,wDAA2D;AAC3D,iEAAyD;AACzD,2CAA+C;AAC/C,6EAAuE;AAGhE,IAAM,SAAS,GAAf,MAAM,SAAS;IACpB,YACU,SAAoB,EAEX,MAAqB;QAF9B,cAAS,GAAT,SAAS,CAAW;QAEX,WAAM,GAAN,MAAM,CAAe;IACrC,CAAC;IAEJ,KAAK,CAAC,WAAW,CAAC,OAAyB;;QACzC,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAU,gCAAa,EAAE;YACxE,OAAO,CAAC,UAAU,EAAE;YACpB,OAAO,CAAC,QAAQ,EAAE;SACnB,CAAC,CAAC;QAEH,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAU,0BAAS,EAAE;YACpE,OAAO,CAAC,UAAU,E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8BAAS;oBAAT,SAAS;IADrB,IAAA,mBAAU,GAAE;IAIR,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,sBAAa,CAAC,CAAC,CAAA;qCADrB,gBAAS;QAEH,sBAAa;GAJ7B,SAAS,CAwGrB"}
|
package/hedhog.yaml
CHANGED
package/package.json
CHANGED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"migrate-01.d.ts","sourceRoot":"","sources":["../../src/__migrations/migrate-01.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAS,MAAM,SAAS,CAAC;AAGjE,qBAAa,OAAQ,YAAW,kBAAkB;IACnC,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IA8E3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAG3D"}
|
@@ -1,80 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.Migrate = void 0;
|
4
|
-
const typeorm_1 = require("typeorm");
|
5
|
-
const utils_1 = require("@hedhog/utils");
|
6
|
-
class Migrate {
|
7
|
-
async up(queryRunner) {
|
8
|
-
await queryRunner.createTable(new typeorm_1.Table({
|
9
|
-
name: 'countries',
|
10
|
-
columns: [
|
11
|
-
(0, utils_1.idColumn)(),
|
12
|
-
{
|
13
|
-
name: 'code',
|
14
|
-
type: 'char',
|
15
|
-
length: '3',
|
16
|
-
isNullable: false,
|
17
|
-
},
|
18
|
-
(0, utils_1.timestampColumn)(),
|
19
|
-
(0, utils_1.timestampColumn)('updated_at'),
|
20
|
-
],
|
21
|
-
}), true);
|
22
|
-
await queryRunner.createTable(new typeorm_1.Table({
|
23
|
-
name: 'locales',
|
24
|
-
columns: [
|
25
|
-
(0, utils_1.idColumn)(),
|
26
|
-
{
|
27
|
-
name: 'code',
|
28
|
-
type: 'char',
|
29
|
-
length: '2',
|
30
|
-
isNullable: false,
|
31
|
-
},
|
32
|
-
{
|
33
|
-
name: 'region',
|
34
|
-
type: 'char',
|
35
|
-
length: '2',
|
36
|
-
isNullable: false,
|
37
|
-
},
|
38
|
-
{
|
39
|
-
name: 'enabled',
|
40
|
-
type: 'boolean',
|
41
|
-
default: true,
|
42
|
-
},
|
43
|
-
(0, utils_1.timestampColumn)(),
|
44
|
-
(0, utils_1.timestampColumn)('updated_at'),
|
45
|
-
],
|
46
|
-
}));
|
47
|
-
await queryRunner.createTable(new typeorm_1.Table({
|
48
|
-
name: 'country_translations',
|
49
|
-
columns: [
|
50
|
-
(0, utils_1.foreignColumn)({ name: 'country_id', isPrimary: true }),
|
51
|
-
(0, utils_1.foreignColumn)({ name: 'locale_id', isPrimary: true }),
|
52
|
-
{
|
53
|
-
name: 'name',
|
54
|
-
type: 'varchar',
|
55
|
-
},
|
56
|
-
(0, utils_1.timestampColumn)(),
|
57
|
-
(0, utils_1.timestampColumn)('updated_at'),
|
58
|
-
],
|
59
|
-
foreignKeys: [
|
60
|
-
{
|
61
|
-
columnNames: ['country_id'],
|
62
|
-
referencedColumnNames: ['id'],
|
63
|
-
referencedTableName: 'countries',
|
64
|
-
onDelete: 'CASCADE',
|
65
|
-
},
|
66
|
-
{
|
67
|
-
columnNames: ['locale_id'],
|
68
|
-
referencedColumnNames: ['id'],
|
69
|
-
referencedTableName: 'locales',
|
70
|
-
onDelete: 'CASCADE',
|
71
|
-
},
|
72
|
-
],
|
73
|
-
}));
|
74
|
-
}
|
75
|
-
async down(queryRunner) {
|
76
|
-
await queryRunner.dropTable('locales');
|
77
|
-
}
|
78
|
-
}
|
79
|
-
exports.Migrate = Migrate;
|
80
|
-
//# sourceMappingURL=migrate-01.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"migrate-01.js","sourceRoot":"","sources":["../../src/__migrations/migrate-01.ts"],"names":[],"mappings":";;;AAAA,qCAAiE;AACjE,yCAAyE;AAEz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,SAAS;iBAChB;gBACD,IAAA,uBAAe,GAAE;gBACjB,IAAA,uBAAe,EAAC,YAAY,CAAC;aAC9B;YACD,WAAW,EAAE;gBACX;oBACE,WAAW,EAAE,CAAC,YAAY,CAAC;oBAC3B,qBAAqB,EAAE,CAAC,IAAI,CAAC;oBAC7B,mBAAmB,EAAE,WAAW;oBAChC,QAAQ,EAAE,SAAS;iBACpB;gBACD;oBACE,WAAW,EAAE,CAAC,WAAW,CAAC;oBAC1B,qBAAqB,EAAE,CAAC,IAAI,CAAC;oBAC7B,mBAAmB,EAAE,SAAS;oBAC9B,QAAQ,EAAE,SAAS;iBACpB;aACF;SACF,CAAC,CACH,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;QACxC,MAAM,WAAW,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IACzC,CAAC;CACF;AAlFD,0BAkFC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"migrate-02.d.ts","sourceRoot":"","sources":["../../src/__migrations/migrate-02.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,WAAW,EAGZ,MAAM,SAAS,CAAC;AAGjB,qBAAa,OAAQ,YAAW,kBAAkB;IACnC,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IA+D3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAI3D"}
|
@@ -1,68 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.Migrate = void 0;
|
4
|
-
const typeorm_1 = require("typeorm");
|
5
|
-
const utils_1 = require("@hedhog/utils");
|
6
|
-
class Migrate {
|
7
|
-
async up(queryRunner) {
|
8
|
-
await await queryRunner.createTable(new typeorm_1.Table({
|
9
|
-
name: 'translation_namespaces',
|
10
|
-
columns: [
|
11
|
-
(0, utils_1.idColumn)(),
|
12
|
-
{
|
13
|
-
name: 'name',
|
14
|
-
type: 'varchar',
|
15
|
-
isNullable: false,
|
16
|
-
},
|
17
|
-
(0, utils_1.timestampColumn)(),
|
18
|
-
(0, utils_1.timestampColumn)('updated_at'),
|
19
|
-
],
|
20
|
-
}), true);
|
21
|
-
await queryRunner.createTable(new typeorm_1.Table({
|
22
|
-
name: 'translations',
|
23
|
-
columns: [
|
24
|
-
(0, utils_1.idColumn)(),
|
25
|
-
(0, utils_1.foreignColumn)({ name: 'locale_id' }),
|
26
|
-
(0, utils_1.foreignColumn)({ name: 'namespace_id' }),
|
27
|
-
{
|
28
|
-
name: 'name',
|
29
|
-
type: 'varchar',
|
30
|
-
isNullable: false,
|
31
|
-
},
|
32
|
-
{
|
33
|
-
name: 'value',
|
34
|
-
type: 'varchar',
|
35
|
-
isNullable: false,
|
36
|
-
},
|
37
|
-
(0, utils_1.timestampColumn)(),
|
38
|
-
(0, utils_1.timestampColumn)('updated_at'),
|
39
|
-
],
|
40
|
-
indices: [
|
41
|
-
{
|
42
|
-
columnNames: ['locale_id', 'namespace_id', 'name'],
|
43
|
-
isUnique: true,
|
44
|
-
},
|
45
|
-
],
|
46
|
-
foreignKeys: [
|
47
|
-
new typeorm_1.TableForeignKey({
|
48
|
-
columnNames: ['locale_id'],
|
49
|
-
referencedTableName: 'locales',
|
50
|
-
referencedColumnNames: ['id'],
|
51
|
-
onDelete: 'CASCADE',
|
52
|
-
}),
|
53
|
-
new typeorm_1.TableForeignKey({
|
54
|
-
columnNames: ['namespace_id'],
|
55
|
-
referencedTableName: 'translation_namespaces',
|
56
|
-
referencedColumnNames: ['id'],
|
57
|
-
onDelete: 'CASCADE',
|
58
|
-
}),
|
59
|
-
],
|
60
|
-
}), true);
|
61
|
-
}
|
62
|
-
async down(queryRunner) {
|
63
|
-
await queryRunner.dropTable('translations');
|
64
|
-
await queryRunner.dropTable('translation_namespaces');
|
65
|
-
}
|
66
|
-
}
|
67
|
-
exports.Migrate = Migrate;
|
68
|
-
//# sourceMappingURL=migrate-02.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"migrate-02.js","sourceRoot":"","sources":["../../src/__migrations/migrate-02.ts"],"names":[],"mappings":";;;AAAA,qCAKiB;AACjB,yCAAyE;AAEzE,MAAa,OAAO;IACX,KAAK,CAAC,EAAE,CAAC,WAAwB;QACtC,MAAM,MAAM,WAAW,CAAC,WAAW,CACjC,IAAI,eAAK,CAAC;YACR,IAAI,EAAE,wBAAwB;YAC9B,OAAO,EAAE;gBACP,IAAA,gBAAQ,GAAE;gBACV;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,SAAS;oBACf,UAAU,EAAE,KAAK;iBAClB;gBACD,IAAA,uBAAe,GAAE;gBACjB,IAAA,uBAAe,EAAC,YAAY,CAAC;aAC9B;SACF,CAAC,EACF,IAAI,CACL,CAAC;QAEF,MAAM,WAAW,CAAC,WAAW,CAC3B,IAAI,eAAK,CAAC;YACR,IAAI,EAAE,cAAc;YACpB,OAAO,EAAE;gBACP,IAAA,gBAAQ,GAAE;gBACV,IAAA,qBAAa,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;gBACpC,IAAA,qBAAa,EAAC,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;gBACvC;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,SAAS;oBACf,UAAU,EAAE,KAAK;iBAClB;gBACD;oBACE,IAAI,EAAE,OAAO;oBACb,IAAI,EAAE,SAAS;oBACf,UAAU,EAAE,KAAK;iBAClB;gBACD,IAAA,uBAAe,GAAE;gBACjB,IAAA,uBAAe,EAAC,YAAY,CAAC;aAC9B;YACD,OAAO,EAAE;gBACP;oBACE,WAAW,EAAE,CAAC,WAAW,EAAE,cAAc,EAAE,MAAM,CAAC;oBAClD,QAAQ,EAAE,IAAI;iBACf;aACF;YACD,WAAW,EAAE;gBACX,IAAI,yBAAe,CAAC;oBAClB,WAAW,EAAE,CAAC,WAAW,CAAC;oB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