@things-factory/geography 4.3.591 → 4.3.671

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 (65) hide show
  1. package/package.json +4 -4
  2. package/server/service/geo-country/geo-country-type.ts +3 -0
  3. package/server/service/geo-country/geo-country.ts +4 -0
  4. package/dist-server/controllers/index.js +0 -1
  5. package/dist-server/controllers/index.js.map +0 -1
  6. package/dist-server/index.js +0 -21
  7. package/dist-server/index.js.map +0 -1
  8. package/dist-server/middlewares/index.js +0 -8
  9. package/dist-server/middlewares/index.js.map +0 -1
  10. package/dist-server/migrations/index.js +0 -12
  11. package/dist-server/migrations/index.js.map +0 -1
  12. package/dist-server/routes.js +0 -25
  13. package/dist-server/routes.js.map +0 -1
  14. package/dist-server/service/geo-area/geo-area-mutation.js +0 -119
  15. package/dist-server/service/geo-area/geo-area-mutation.js.map +0 -1
  16. package/dist-server/service/geo-area/geo-area-query.js +0 -126
  17. package/dist-server/service/geo-area/geo-area-query.js.map +0 -1
  18. package/dist-server/service/geo-area/geo-area-type.js +0 -113
  19. package/dist-server/service/geo-area/geo-area-type.js.map +0 -1
  20. package/dist-server/service/geo-area/geo-area.js +0 -108
  21. package/dist-server/service/geo-area/geo-area.js.map +0 -1
  22. package/dist-server/service/geo-area/index.js +0 -9
  23. package/dist-server/service/geo-area/index.js.map +0 -1
  24. package/dist-server/service/geo-city/geo-city-mutation.js +0 -119
  25. package/dist-server/service/geo-city/geo-city-mutation.js.map +0 -1
  26. package/dist-server/service/geo-city/geo-city-query.js +0 -97
  27. package/dist-server/service/geo-city/geo-city-query.js.map +0 -1
  28. package/dist-server/service/geo-city/geo-city-type.js +0 -81
  29. package/dist-server/service/geo-city/geo-city-type.js.map +0 -1
  30. package/dist-server/service/geo-city/geo-city.js +0 -104
  31. package/dist-server/service/geo-city/geo-city.js.map +0 -1
  32. package/dist-server/service/geo-city/index.js +0 -9
  33. package/dist-server/service/geo-city/index.js.map +0 -1
  34. package/dist-server/service/geo-continent/geo-continent-mutation.js +0 -119
  35. package/dist-server/service/geo-continent/geo-continent-mutation.js.map +0 -1
  36. package/dist-server/service/geo-continent/geo-continent-query.js +0 -75
  37. package/dist-server/service/geo-continent/geo-continent-query.js.map +0 -1
  38. package/dist-server/service/geo-continent/geo-continent-type.js +0 -65
  39. package/dist-server/service/geo-continent/geo-continent-type.js.map +0 -1
  40. package/dist-server/service/geo-continent/geo-continent.js +0 -74
  41. package/dist-server/service/geo-continent/geo-continent.js.map +0 -1
  42. package/dist-server/service/geo-continent/index.js +0 -9
  43. package/dist-server/service/geo-continent/index.js.map +0 -1
  44. package/dist-server/service/geo-country/geo-country-mutation.js +0 -119
  45. package/dist-server/service/geo-country/geo-country-mutation.js.map +0 -1
  46. package/dist-server/service/geo-country/geo-country-query.js +0 -112
  47. package/dist-server/service/geo-country/geo-country-query.js.map +0 -1
  48. package/dist-server/service/geo-country/geo-country-type.js +0 -73
  49. package/dist-server/service/geo-country/geo-country-type.js.map +0 -1
  50. package/dist-server/service/geo-country/geo-country.js +0 -91
  51. package/dist-server/service/geo-country/geo-country.js.map +0 -1
  52. package/dist-server/service/geo-country/index.js +0 -9
  53. package/dist-server/service/geo-country/index.js.map +0 -1
  54. package/dist-server/service/geo-state/geo-state-mutation.js +0 -119
  55. package/dist-server/service/geo-state/geo-state-mutation.js.map +0 -1
  56. package/dist-server/service/geo-state/geo-state-query.js +0 -86
  57. package/dist-server/service/geo-state/geo-state-query.js.map +0 -1
  58. package/dist-server/service/geo-state/geo-state-type.js +0 -81
  59. package/dist-server/service/geo-state/geo-state-type.js.map +0 -1
  60. package/dist-server/service/geo-state/geo-state.js +0 -94
  61. package/dist-server/service/geo-state/geo-state.js.map +0 -1
  62. package/dist-server/service/geo-state/index.js +0 -9
  63. package/dist-server/service/geo-state/index.js.map +0 -1
  64. package/dist-server/service/index.js +0 -48
  65. package/dist-server/service/index.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/geo-area/index.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,qDAA+C;AAC/C,2DAAqD;AAExC,QAAA,QAAQ,GAAG,CAAC,kBAAO,CAAC,CAAA;AACpB,QAAA,SAAS,GAAG,CAAC,6BAAY,EAAE,mCAAe,CAAC,CAAA"}
@@ -1,119 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.GeoCityMutation = void 0;
16
- const type_graphql_1 = require("type-graphql");
17
- const typeorm_1 = require("typeorm");
18
- const geo_city_1 = require("./geo-city");
19
- const geo_city_type_1 = require("./geo-city-type");
20
- let GeoCityMutation = class GeoCityMutation {
21
- async createGeoCity(geoCity, context) {
22
- const { user, tx } = context.state;
23
- return await tx.getRepository(geo_city_1.GeoCity).save(Object.assign(Object.assign({}, geoCity), { creator: user, updater: user }));
24
- }
25
- async updateGeoCity(id, patch, context) {
26
- const { user, tx } = context.state;
27
- const repository = tx.getRepository(geo_city_1.GeoCity);
28
- const geoCity = await repository.findOne({
29
- where: { id }
30
- });
31
- return await repository.save(Object.assign(Object.assign(Object.assign({}, geoCity), patch), { updater: user }));
32
- }
33
- async updateMultipleGeoCity(patches, context) {
34
- const { user, tx } = context.state;
35
- let results = [];
36
- const _createRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === '+');
37
- const _updateRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === 'M');
38
- const geoCityRepo = tx.getRepository(geo_city_1.GeoCity);
39
- if (_createRecords.length > 0) {
40
- for (let i = 0; i < _createRecords.length; i++) {
41
- const newRecord = _createRecords[i];
42
- const result = await geoCityRepo.save(Object.assign(Object.assign({}, newRecord), { creator: user, updater: user }));
43
- results.push(Object.assign(Object.assign({}, result), { cuFlag: '+' }));
44
- }
45
- }
46
- if (_updateRecords.length > 0) {
47
- for (let i = 0; i < _updateRecords.length; i++) {
48
- const newRecord = _updateRecords[i];
49
- const geoCity = await geoCityRepo.findOne(newRecord.id);
50
- const result = await geoCityRepo.save(Object.assign(Object.assign(Object.assign({}, geoCity), newRecord), { updater: user }));
51
- results.push(Object.assign(Object.assign({}, result), { cuFlag: 'M' }));
52
- }
53
- }
54
- return results;
55
- }
56
- async deleteGeoCity(id, context) {
57
- const { tx } = context.state;
58
- await tx.getRepository(geo_city_1.GeoCity).delete({ id });
59
- return true;
60
- }
61
- async deleteGeoCities(ids, context) {
62
- const { tx } = context.state;
63
- await tx.getRepository(geo_city_1.GeoCity).delete({
64
- id: (0, typeorm_1.In)(ids)
65
- });
66
- return true;
67
- }
68
- };
69
- __decorate([
70
- (0, type_graphql_1.Directive)('@transaction'),
71
- (0, type_graphql_1.Mutation)(returns => geo_city_1.GeoCity, { description: 'To create new GeoCity' }),
72
- __param(0, (0, type_graphql_1.Arg)('geoCity')),
73
- __param(1, (0, type_graphql_1.Ctx)()),
74
- __metadata("design:type", Function),
75
- __metadata("design:paramtypes", [geo_city_type_1.NewGeoCity, Object]),
76
- __metadata("design:returntype", Promise)
77
- ], GeoCityMutation.prototype, "createGeoCity", null);
78
- __decorate([
79
- (0, type_graphql_1.Directive)('@transaction'),
80
- (0, type_graphql_1.Mutation)(returns => geo_city_1.GeoCity, { description: 'To modify GeoCity information' }),
81
- __param(0, (0, type_graphql_1.Arg)('id')),
82
- __param(1, (0, type_graphql_1.Arg)('patch')),
83
- __param(2, (0, type_graphql_1.Ctx)()),
84
- __metadata("design:type", Function),
85
- __metadata("design:paramtypes", [String, geo_city_type_1.GeoCityPatch, Object]),
86
- __metadata("design:returntype", Promise)
87
- ], GeoCityMutation.prototype, "updateGeoCity", null);
88
- __decorate([
89
- (0, type_graphql_1.Directive)('@transaction'),
90
- (0, type_graphql_1.Mutation)(returns => [geo_city_1.GeoCity], { description: "To modify multiple GeoCities' information" }),
91
- __param(0, (0, type_graphql_1.Arg)('patches', type => [geo_city_type_1.GeoCityPatch])),
92
- __param(1, (0, type_graphql_1.Ctx)()),
93
- __metadata("design:type", Function),
94
- __metadata("design:paramtypes", [Array, Object]),
95
- __metadata("design:returntype", Promise)
96
- ], GeoCityMutation.prototype, "updateMultipleGeoCity", null);
97
- __decorate([
98
- (0, type_graphql_1.Directive)('@transaction'),
99
- (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete GeoCity' }),
100
- __param(0, (0, type_graphql_1.Arg)('id')),
101
- __param(1, (0, type_graphql_1.Ctx)()),
102
- __metadata("design:type", Function),
103
- __metadata("design:paramtypes", [String, Object]),
104
- __metadata("design:returntype", Promise)
105
- ], GeoCityMutation.prototype, "deleteGeoCity", null);
106
- __decorate([
107
- (0, type_graphql_1.Directive)('@transaction'),
108
- (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete multiple geoCitys' }),
109
- __param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
110
- __param(1, (0, type_graphql_1.Ctx)()),
111
- __metadata("design:type", Function),
112
- __metadata("design:paramtypes", [Array, Object]),
113
- __metadata("design:returntype", Promise)
114
- ], GeoCityMutation.prototype, "deleteGeoCities", null);
115
- GeoCityMutation = __decorate([
116
- (0, type_graphql_1.Resolver)(geo_city_1.GeoCity)
117
- ], GeoCityMutation);
118
- exports.GeoCityMutation = GeoCityMutation;
119
- //# sourceMappingURL=geo-city-mutation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"geo-city-mutation.js","sourceRoot":"","sources":["../../../server/service/geo-city/geo-city-mutation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAAsE;AACtE,qCAA4B;AAC5B,yCAAoC;AACpC,mDAA0D;AAGnD,IAAM,eAAe,GAArB,MAAM,eAAe;IAGpB,AAAN,KAAK,CAAC,aAAa,CAAiB,OAAmB,EAAS,OAAY;QAC1E,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAElC,OAAO,MAAM,EAAE,CAAC,aAAa,CAAC,kBAAO,CAAC,CAAC,IAAI,iCACtC,OAAO,KACV,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,aAAa,CAAY,EAAU,EAAgB,KAAmB,EAAS,OAAY;QAC/F,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAElC,MAAM,UAAU,GAAG,EAAE,CAAC,aAAa,CAAC,kBAAO,CAAC,CAAA;QAC5C,MAAM,OAAO,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC;YACvC,KAAK,EAAE,EAAE,EAAE,EAAE;SACd,CAAC,CAAA;QAEF,OAAO,MAAM,UAAU,CAAC,IAAI,+CACvB,OAAO,GACP,KAAK,KACR,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,qBAAqB,CACe,OAAuB,EACxD,OAAY;QAEnB,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAElC,IAAI,OAAO,GAAG,EAAE,CAAA;QAChB,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,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AAC,SAAS,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,4BAAY,CAAC,CAAC,CAAA;IACtC,WAAA,IAAA,kBAAG,GAAE,CAAA;;;;4DAuCP;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,mBAAmB,EAAE,CAAC;IAC9C,WAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,WAAA,IAAA,kBAAG,GAAE,CAAA;;;;oDAKhD;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC;IACtD,WAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAAiB,WAAA,IAAA,kBAAG,GAAE,CAAA;;;;sDAQxE;AA9FU,eAAe;IAD3B,IAAA,uBAAQ,EAAC,kBAAO,CAAC;GACL,eAAe,CA+F3B;AA/FY,0CAAe"}
@@ -1,97 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
- var _a;
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.GeoCityQuery = void 0;
17
- const auth_base_1 = require("@things-factory/auth-base");
18
- const shell_1 = require("@things-factory/shell");
19
- const type_graphql_1 = require("type-graphql");
20
- const typeorm_1 = require("typeorm");
21
- const geo_country_1 = require("../geo-country/geo-country");
22
- const geo_state_1 = require("../geo-state/geo-state");
23
- const geo_city_1 = require("./geo-city");
24
- const geo_city_type_1 = require("./geo-city-type");
25
- let GeoCityQuery = class GeoCityQuery {
26
- async geoCity(id, context) {
27
- return await (0, typeorm_1.getRepository)(geo_city_1.GeoCity).findOne({
28
- where: { id }
29
- });
30
- }
31
- async geoCities(params, context) {
32
- const convertedParams = (0, shell_1.convertListParams)(params);
33
- const [items, total] = await (0, typeorm_1.getRepository)(geo_city_1.GeoCity).findAndCount(convertedParams);
34
- return { items, total };
35
- }
36
- async geoCountry(geoCity) {
37
- return await (0, typeorm_1.getRepository)(geo_country_1.GeoCountry).findOne(geoCity.geoCountryId);
38
- }
39
- async geoState(geoCity) {
40
- return await (0, typeorm_1.getRepository)(geo_state_1.GeoState).findOne(geoCity.geoStateId);
41
- }
42
- async updater(geoCity) {
43
- return await (0, typeorm_1.getRepository)(auth_base_1.User).findOne(geoCity.updaterId);
44
- }
45
- async creator(geoCity) {
46
- return await (0, typeorm_1.getRepository)(auth_base_1.User).findOne(geoCity.creatorId);
47
- }
48
- };
49
- __decorate([
50
- (0, type_graphql_1.Query)(returns => geo_city_1.GeoCity, { description: 'To fetch a GeoCity' }),
51
- __param(0, (0, type_graphql_1.Arg)('id')),
52
- __param(1, (0, type_graphql_1.Ctx)()),
53
- __metadata("design:type", Function),
54
- __metadata("design:paramtypes", [String, Object]),
55
- __metadata("design:returntype", Promise)
56
- ], GeoCityQuery.prototype, "geoCity", null);
57
- __decorate([
58
- (0, type_graphql_1.Query)(returns => geo_city_type_1.GeoCityList, { description: 'To fetch multiple GeoCities' }),
59
- __param(0, (0, type_graphql_1.Args)()),
60
- __param(1, (0, type_graphql_1.Ctx)()),
61
- __metadata("design:type", Function),
62
- __metadata("design:paramtypes", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object, Object]),
63
- __metadata("design:returntype", Promise)
64
- ], GeoCityQuery.prototype, "geoCities", null);
65
- __decorate([
66
- (0, type_graphql_1.FieldResolver)(type => geo_country_1.GeoCountry),
67
- __param(0, (0, type_graphql_1.Root)()),
68
- __metadata("design:type", Function),
69
- __metadata("design:paramtypes", [geo_city_1.GeoCity]),
70
- __metadata("design:returntype", Promise)
71
- ], GeoCityQuery.prototype, "geoCountry", null);
72
- __decorate([
73
- (0, type_graphql_1.FieldResolver)(type => geo_state_1.GeoState),
74
- __param(0, (0, type_graphql_1.Root)()),
75
- __metadata("design:type", Function),
76
- __metadata("design:paramtypes", [geo_city_1.GeoCity]),
77
- __metadata("design:returntype", Promise)
78
- ], GeoCityQuery.prototype, "geoState", null);
79
- __decorate([
80
- (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
81
- __param(0, (0, type_graphql_1.Root)()),
82
- __metadata("design:type", Function),
83
- __metadata("design:paramtypes", [geo_city_1.GeoCity]),
84
- __metadata("design:returntype", Promise)
85
- ], GeoCityQuery.prototype, "updater", null);
86
- __decorate([
87
- (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
88
- __param(0, (0, type_graphql_1.Root)()),
89
- __metadata("design:type", Function),
90
- __metadata("design:paramtypes", [geo_city_1.GeoCity]),
91
- __metadata("design:returntype", Promise)
92
- ], GeoCityQuery.prototype, "creator", null);
93
- GeoCityQuery = __decorate([
94
- (0, type_graphql_1.Resolver)(geo_city_1.GeoCity)
95
- ], GeoCityQuery);
96
- exports.GeoCityQuery = GeoCityQuery;
97
- //# sourceMappingURL=geo-city-query.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"geo-city-query.js","sourceRoot":"","sources":["../../../server/service/geo-city/geo-city-query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BAAI,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;IAC7D,CAAC;CACF,CAAA;AAjCO;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,kBAAO,EAAE,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAC;IAClD,WAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,WAAA,IAAA,kBAAG,GAAE,CAAA;;;;2CAI1C;AAGK;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,2BAAW,EAAE,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC;IAC7D,WAAA,IAAA,mBAAI,GAAE,CAAA;IAAqB,WAAA,IAAA,kBAAG,GAAE,CAAA;;yDAAjB,iBAAS,oBAAT,iBAAS;;6CAKxC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,wBAAU,CAAC;IAChB,WAAA,IAAA,mBAAI,GAAE,CAAA;;qCAAU,kBAAO;;8CAExC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,oBAAQ,CAAC;IAChB,WAAA,IAAA,mBAAI,GAAE,CAAA;;qCAAU,kBAAO;;4CAEtC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,WAAA,IAAA,mBAAI,GAAE,CAAA;;qCAAU,kBAAO;;2CAErC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,WAAA,IAAA,mBAAI,GAAE,CAAA;;qCAAU,kBAAO;;2CAErC;AAlCU,YAAY;IADxB,IAAA,uBAAQ,EAAC,kBAAO,CAAC;GACL,YAAY,CAmCxB;AAnCY,oCAAY"}
@@ -1,81 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.GeoCityList = exports.GeoCityPatch = exports.NewGeoCity = void 0;
13
- const type_graphql_1 = require("type-graphql");
14
- const geo_city_1 = require("./geo-city");
15
- let NewGeoCity = class NewGeoCity {
16
- };
17
- __decorate([
18
- (0, type_graphql_1.Field)(),
19
- __metadata("design:type", String)
20
- ], NewGeoCity.prototype, "name", void 0);
21
- __decorate([
22
- (0, type_graphql_1.Field)({ nullable: true }),
23
- __metadata("design:type", String)
24
- ], NewGeoCity.prototype, "description", void 0);
25
- __decorate([
26
- (0, type_graphql_1.Field)({ nullable: true }),
27
- __metadata("design:type", String)
28
- ], NewGeoCity.prototype, "latitude", void 0);
29
- __decorate([
30
- (0, type_graphql_1.Field)({ nullable: true }),
31
- __metadata("design:type", String)
32
- ], NewGeoCity.prototype, "longitude", void 0);
33
- NewGeoCity = __decorate([
34
- (0, type_graphql_1.InputType)()
35
- ], NewGeoCity);
36
- exports.NewGeoCity = NewGeoCity;
37
- let GeoCityPatch = class GeoCityPatch {
38
- };
39
- __decorate([
40
- (0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
41
- __metadata("design:type", String)
42
- ], GeoCityPatch.prototype, "id", void 0);
43
- __decorate([
44
- (0, type_graphql_1.Field)({ nullable: true }),
45
- __metadata("design:type", String)
46
- ], GeoCityPatch.prototype, "name", void 0);
47
- __decorate([
48
- (0, type_graphql_1.Field)({ nullable: true }),
49
- __metadata("design:type", String)
50
- ], GeoCityPatch.prototype, "description", void 0);
51
- __decorate([
52
- (0, type_graphql_1.Field)({ nullable: true }),
53
- __metadata("design:type", String)
54
- ], GeoCityPatch.prototype, "latitude", void 0);
55
- __decorate([
56
- (0, type_graphql_1.Field)({ nullable: true }),
57
- __metadata("design:type", String)
58
- ], GeoCityPatch.prototype, "longitude", void 0);
59
- __decorate([
60
- (0, type_graphql_1.Field)(),
61
- __metadata("design:type", String)
62
- ], GeoCityPatch.prototype, "cuFlag", void 0);
63
- GeoCityPatch = __decorate([
64
- (0, type_graphql_1.InputType)()
65
- ], GeoCityPatch);
66
- exports.GeoCityPatch = GeoCityPatch;
67
- let GeoCityList = class GeoCityList {
68
- };
69
- __decorate([
70
- (0, type_graphql_1.Field)(type => [geo_city_1.GeoCity]),
71
- __metadata("design:type", Array)
72
- ], GeoCityList.prototype, "items", void 0);
73
- __decorate([
74
- (0, type_graphql_1.Field)(type => type_graphql_1.Int),
75
- __metadata("design:type", Number)
76
- ], GeoCityList.prototype, "total", void 0);
77
- GeoCityList = __decorate([
78
- (0, type_graphql_1.ObjectType)()
79
- ], GeoCityList);
80
- exports.GeoCityList = GeoCityList;
81
- //# sourceMappingURL=geo-city-type.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"geo-city-type.js","sourceRoot":"","sources":["../../../server/service/geo-city/geo-city-type.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAoE;AACpE,yCAAoC;AAG7B,IAAM,UAAU,GAAhB,MAAM,UAAU;CAYtB,CAAA;AAXC;IAAC,IAAA,oBAAK,GAAE;;wCACI;AAEZ;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACN;AAEpB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACT;AAEjB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACR;AAXP,UAAU;IADtB,IAAA,wBAAS,GAAE;GACC,UAAU,CAYtB;AAZY,gCAAU;AAehB,IAAM,YAAY,GAAlB,MAAM,YAAY;CAkBxB,CAAA;AAjBC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCAC3B;AAEX;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACb;AAEb;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACN;AAEpB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACT;AAEjB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACR;AAElB;IAAC,IAAA,oBAAK,GAAE;;4CACM;AAjBH,YAAY;IADxB,IAAA,wBAAS,GAAE;GACC,YAAY,CAkBxB;AAlBY,oCAAY;AAqBlB,IAAM,WAAW,GAAjB,MAAM,WAAW;CAMvB,CAAA;AALC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,kBAAO,CAAC,CAAC;;0CACT;AAEhB;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;0CACN;AALF,WAAW;IADvB,IAAA,yBAAU,GAAE;GACA,WAAW,CAMvB;AANY,kCAAW"}
@@ -1,104 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var _a, _b;
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.GeoCity = void 0;
14
- const auth_base_1 = require("@things-factory/auth-base");
15
- const type_graphql_1 = require("type-graphql");
16
- const typeorm_1 = require("typeorm");
17
- const geo_country_1 = require("../geo-country/geo-country");
18
- const geo_state_1 = require("../geo-state/geo-state");
19
- let GeoCity = class GeoCity {
20
- };
21
- __decorate([
22
- (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
23
- (0, type_graphql_1.Field)(type => type_graphql_1.ID),
24
- __metadata("design:type", String)
25
- ], GeoCity.prototype, "id", void 0);
26
- __decorate([
27
- (0, typeorm_1.ManyToOne)(type => geo_country_1.GeoCountry),
28
- (0, type_graphql_1.Field)(),
29
- __metadata("design:type", geo_country_1.GeoCountry)
30
- ], GeoCity.prototype, "geoCountry", void 0);
31
- __decorate([
32
- (0, typeorm_1.RelationId)((geoCity) => geoCity.geoCountry),
33
- __metadata("design:type", String)
34
- ], GeoCity.prototype, "geoCountryId", void 0);
35
- __decorate([
36
- (0, typeorm_1.ManyToOne)(type => geo_state_1.GeoState),
37
- (0, type_graphql_1.Field)({ nullable: true }),
38
- __metadata("design:type", geo_state_1.GeoState)
39
- ], GeoCity.prototype, "geoState", void 0);
40
- __decorate([
41
- (0, typeorm_1.RelationId)((geoCity) => geoCity.geoState),
42
- __metadata("design:type", String)
43
- ], GeoCity.prototype, "geoStateId", void 0);
44
- __decorate([
45
- (0, typeorm_1.Column)(),
46
- (0, type_graphql_1.Field)(),
47
- __metadata("design:type", String)
48
- ], GeoCity.prototype, "name", void 0);
49
- __decorate([
50
- (0, typeorm_1.Column)({
51
- nullable: true
52
- }),
53
- (0, type_graphql_1.Field)({ nullable: true }),
54
- __metadata("design:type", String)
55
- ], GeoCity.prototype, "description", void 0);
56
- __decorate([
57
- (0, typeorm_1.Column)({ nullable: true }),
58
- (0, type_graphql_1.Field)({ nullable: true }),
59
- __metadata("design:type", String)
60
- ], GeoCity.prototype, "latitude", void 0);
61
- __decorate([
62
- (0, typeorm_1.Column)({ nullable: true }),
63
- (0, type_graphql_1.Field)({ nullable: true }),
64
- __metadata("design:type", String)
65
- ], GeoCity.prototype, "longitude", void 0);
66
- __decorate([
67
- (0, typeorm_1.CreateDateColumn)(),
68
- (0, type_graphql_1.Field)({ nullable: true }),
69
- __metadata("design:type", Date)
70
- ], GeoCity.prototype, "createdAt", void 0);
71
- __decorate([
72
- (0, typeorm_1.UpdateDateColumn)(),
73
- (0, type_graphql_1.Field)({ nullable: true }),
74
- __metadata("design:type", Date)
75
- ], GeoCity.prototype, "updatedAt", void 0);
76
- __decorate([
77
- (0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
78
- nullable: true
79
- }),
80
- (0, type_graphql_1.Field)({ nullable: true }),
81
- __metadata("design:type", typeof (_a = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _a : Object)
82
- ], GeoCity.prototype, "creator", void 0);
83
- __decorate([
84
- (0, typeorm_1.RelationId)((geoCity) => geoCity.creator),
85
- __metadata("design:type", String)
86
- ], GeoCity.prototype, "creatorId", void 0);
87
- __decorate([
88
- (0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
89
- nullable: true
90
- }),
91
- (0, type_graphql_1.Field)({ nullable: true }),
92
- __metadata("design:type", typeof (_b = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _b : Object)
93
- ], GeoCity.prototype, "updater", void 0);
94
- __decorate([
95
- (0, typeorm_1.RelationId)((geoCity) => geoCity.creator),
96
- __metadata("design:type", String)
97
- ], GeoCity.prototype, "updaterId", void 0);
98
- GeoCity = __decorate([
99
- (0, typeorm_1.Entity)(),
100
- (0, typeorm_1.Index)('ix_geo_city_0', (geoCity) => [geoCity.geoCountry, geoCity.name, geoCity.geoState], { unique: true }),
101
- (0, type_graphql_1.ObjectType)({ description: 'Entity for GeoCity' })
102
- ], GeoCity);
103
- exports.GeoCity = GeoCity;
104
- //# sourceMappingURL=geo-city.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"geo-city.js","sourceRoot":"","sources":["../../../server/service/geo-city/geo-city.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,yDAAgD;AAChD,+CAAoD;AACpD,qCASgB;AAChB,4DAAuD;AACvD,sDAAiD;AAK1C,IAAM,OAAO,GAAb,MAAM,OAAO;CA8DnB,CAAA;AA7DC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;mCACC;AAEnB;IAAC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,wBAAU,CAAC;IAC7B,IAAA,oBAAK,GAAE;8BACI,wBAAU;2CAAA;AAEtB;IAAC,IAAA,oBAAU,EAAC,CAAC,OAAgB,EAAE,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC;;6CAChC;AAErB;IAAC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,oBAAQ,CAAC;IAC3B,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACf,oBAAQ;yCAAA;AAEnB;IAAC,IAAA,oBAAU,EAAC,CAAC,OAAgB,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC;;2CAChC;AAEnB;IAAC,IAAA,gBAAM,GAAE;IACR,IAAA,oBAAK,GAAE;;qCACI;AAEZ;IAAC,IAAA,gBAAM,EAAC;QACN,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACN;AAEpB;IAAC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC1B,IAAA,o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E,IAAI,EAAE,CAAC;IACpH,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAC;GACrC,OAAO,CA8DnB;AA9DY,0BAAO"}
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolvers = exports.entities = void 0;
4
- const geo_city_1 = require("./geo-city");
5
- const geo_city_query_1 = require("./geo-city-query");
6
- const geo_city_mutation_1 = require("./geo-city-mutation");
7
- exports.entities = [geo_city_1.GeoCity];
8
- exports.resolvers = [geo_city_query_1.GeoCityQuery, geo_city_mutation_1.GeoCityMutation];
9
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/geo-city/index.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,qDAA+C;AAC/C,2DAAqD;AAExC,QAAA,QAAQ,GAAG,CAAC,kBAAO,CAAC,CAAA;AACpB,QAAA,SAAS,GAAG,CAAC,6BAAY,EAAE,mCAAe,CAAC,CAAA"}
@@ -1,119 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.GeoContinentMutation = void 0;
16
- const type_graphql_1 = require("type-graphql");
17
- const typeorm_1 = require("typeorm");
18
- const geo_continent_1 = require("./geo-continent");
19
- const geo_continent_type_1 = require("./geo-continent-type");
20
- let GeoContinentMutation = class GeoContinentMutation {
21
- async createGeoContinent(geoContinent, context) {
22
- const { user, tx } = context.state;
23
- return await tx.getRepository(geo_continent_1.GeoContinent).save(Object.assign(Object.assign({}, geoContinent), { creator: user, updater: user }));
24
- }
25
- async updateGeoContinent(id, patch, context) {
26
- const { user, tx } = context.state;
27
- const repository = tx.getRepository(geo_continent_1.GeoContinent);
28
- const geoContinent = await repository.findOne({
29
- where: { id }
30
- });
31
- return await repository.save(Object.assign(Object.assign(Object.assign({}, geoContinent), patch), { updater: user }));
32
- }
33
- async updateMultipleGeoContinent(patches, context) {
34
- const { user, tx } = context.state;
35
- let results = [];
36
- const _createRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === '+');
37
- const _updateRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === 'M');
38
- const geoContinentRepo = tx.getRepository(geo_continent_1.GeoContinent);
39
- if (_createRecords.length > 0) {
40
- for (let i = 0; i < _createRecords.length; i++) {
41
- const newRecord = _createRecords[i];
42
- const result = await geoContinentRepo.save(Object.assign(Object.assign({}, newRecord), { creator: user, updater: user }));
43
- results.push(Object.assign(Object.assign({}, result), { cuFlag: '+' }));
44
- }
45
- }
46
- if (_updateRecords.length > 0) {
47
- for (let i = 0; i < _updateRecords.length; i++) {
48
- const newRecord = _updateRecords[i];
49
- const geoContinent = await geoContinentRepo.findOne(newRecord.id);
50
- const result = await geoContinentRepo.save(Object.assign(Object.assign(Object.assign({}, geoContinent), newRecord), { updater: user }));
51
- results.push(Object.assign(Object.assign({}, result), { cuFlag: 'M' }));
52
- }
53
- }
54
- return results;
55
- }
56
- async deleteGeoContinent(id, context) {
57
- const { tx } = context.state;
58
- await tx.getRepository(geo_continent_1.GeoContinent).delete({ id });
59
- return true;
60
- }
61
- async deleteGeoContinents(ids, context) {
62
- const { tx } = context.state;
63
- await tx.getRepository(geo_continent_1.GeoContinent).delete({
64
- id: (0, typeorm_1.In)(ids)
65
- });
66
- return true;
67
- }
68
- };
69
- __decorate([
70
- (0, type_graphql_1.Directive)('@transaction'),
71
- (0, type_graphql_1.Mutation)(returns => geo_continent_1.GeoContinent, { description: 'To create new GeoContinent' }),
72
- __param(0, (0, type_graphql_1.Arg)('geoContinent')),
73
- __param(1, (0, type_graphql_1.Ctx)()),
74
- __metadata("design:type", Function),
75
- __metadata("design:paramtypes", [geo_continent_type_1.NewGeoContinent, Object]),
76
- __metadata("design:returntype", Promise)
77
- ], GeoContinentMutation.prototype, "createGeoContinent", null);
78
- __decorate([
79
- (0, type_graphql_1.Directive)('@transaction'),
80
- (0, type_graphql_1.Mutation)(returns => geo_continent_1.GeoContinent, { description: 'To modify GeoContinent information' }),
81
- __param(0, (0, type_graphql_1.Arg)('id')),
82
- __param(1, (0, type_graphql_1.Arg)('patch')),
83
- __param(2, (0, type_graphql_1.Ctx)()),
84
- __metadata("design:type", Function),
85
- __metadata("design:paramtypes", [String, geo_continent_type_1.GeoContinentPatch, Object]),
86
- __metadata("design:returntype", Promise)
87
- ], GeoContinentMutation.prototype, "updateGeoContinent", null);
88
- __decorate([
89
- (0, type_graphql_1.Directive)('@transaction'),
90
- (0, type_graphql_1.Mutation)(returns => [geo_continent_1.GeoContinent], { description: "To modify multiple GeoContinents' information" }),
91
- __param(0, (0, type_graphql_1.Arg)('patches', type => [geo_continent_type_1.GeoContinentPatch])),
92
- __param(1, (0, type_graphql_1.Ctx)()),
93
- __metadata("design:type", Function),
94
- __metadata("design:paramtypes", [Array, Object]),
95
- __metadata("design:returntype", Promise)
96
- ], GeoContinentMutation.prototype, "updateMultipleGeoContinent", null);
97
- __decorate([
98
- (0, type_graphql_1.Directive)('@transaction'),
99
- (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete GeoContinent' }),
100
- __param(0, (0, type_graphql_1.Arg)('id')),
101
- __param(1, (0, type_graphql_1.Ctx)()),
102
- __metadata("design:type", Function),
103
- __metadata("design:paramtypes", [String, Object]),
104
- __metadata("design:returntype", Promise)
105
- ], GeoContinentMutation.prototype, "deleteGeoContinent", null);
106
- __decorate([
107
- (0, type_graphql_1.Directive)('@transaction'),
108
- (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete multiple geoContinents' }),
109
- __param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
110
- __param(1, (0, type_graphql_1.Ctx)()),
111
- __metadata("design:type", Function),
112
- __metadata("design:paramtypes", [Array, Object]),
113
- __metadata("design:returntype", Promise)
114
- ], GeoContinentMutation.prototype, "deleteGeoContinents", null);
115
- GeoContinentMutation = __decorate([
116
- (0, type_graphql_1.Resolver)(geo_continent_1.GeoContinent)
117
- ], GeoContinentMutation);
118
- exports.GeoContinentMutation = GeoContinentMutation;
119
- //# sourceMappingURL=geo-continent-mutation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"geo-continent-mutation.js","sourceRoot":"","sources":["../../../server/service/geo-continent/geo-continent-mutation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAAsE;AACtE,qCAA4B;AAC5B,mDAA8C;AAC9C,6DAAyE;AAGlE,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAGzB,AAAN,KAAK,CAAC,kBAAkB,CACD,YAA6B,EAC3C,OAAY;QAEnB,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAElC,OAAO,MAAM,EAAE,CAAC,aAAa,CAAC,4BAAY,CAAC,CAAC,IAAI,iCAC3C,YAAY,KACf,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,kBAAkB,CACX,EAAU,EACP,KAAwB,EAC/B,OAAY;QAEnB,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAElC,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