@c-rex/utils 0.0.3 → 0.0.6

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/package.json CHANGED
@@ -1,27 +1,24 @@
1
1
  {
2
2
  "name": "@c-rex/utils",
3
- "version": "0.0.3",
4
- "main": "dist/index.js",
5
- "module": "dist/index.mjs",
6
- "types": "dist/index.d.ts",
3
+ "version": "0.0.6",
7
4
  "files": [
8
- "dist"
5
+ "src"
9
6
  ],
10
7
  "publishConfig": {
11
8
  "access": "public"
12
9
  },
13
10
  "exports": {
14
11
  ".": {
15
- "types": "./dist/index.d.ts",
16
- "import": "./dist/index.mjs",
17
- "require": "./dist/index.js",
18
- "default": "./dist/index.js"
12
+ "types": "./src/index.ts",
13
+ "import": "./src/index.ts",
14
+ "require": "./src/index.ts",
15
+ "default": "./src/index.ts"
19
16
  },
20
17
  "./package.json": "./package.json"
21
18
  },
22
19
  "scripts": {
23
- "dev": "tsup src/index.ts --format cjs,esm --dts --watch",
24
- "build": "tsup src/index.ts --format cjs,esm --dts",
20
+ "dev": "echo 'Nothing to build using raw TypeScript files'",
21
+ "build": "echo 'No build needed'",
25
22
  "test:watch": "jest --watch",
26
23
  "test": "jest"
27
24
  },
@@ -0,0 +1,57 @@
1
+ import { TreeOfContent } from "@c-rex/interfaces";
2
+ import { generateBreadcrumbItems } from "../breadcrumbs";
3
+
4
+ describe("generateBreadcrumbItems", () => {
5
+ const treeOfContent: TreeOfContent[] = [
6
+ {
7
+ label: "Test",
8
+ id: "test",
9
+ link: "/test",
10
+ active: true,
11
+ children: [
12
+ {
13
+ label: "Value1",
14
+ id: "value1",
15
+ link: "/test/value1",
16
+ active: true,
17
+ children: []
18
+ }
19
+ ]
20
+ },
21
+ {
22
+ label: "Test2",
23
+ id: "test2",
24
+ link: "/test2",
25
+ active: false,
26
+ children: []
27
+ }
28
+ ]
29
+
30
+ it("should generate breadcrumb items", () => {
31
+ const result = generateBreadcrumbItems(treeOfContent);
32
+ expect(result).toEqual([
33
+ {
34
+ label: "Test",
35
+ id: "test",
36
+ link: "/test",
37
+ active: true,
38
+ children: [
39
+ {
40
+ label: "Value1",
41
+ id: "value1",
42
+ link: "/test/value1",
43
+ active: true,
44
+ children: []
45
+ }
46
+ ]
47
+ },
48
+ {
49
+ label: "Value1",
50
+ id: "value1",
51
+ link: "/test/value1",
52
+ active: true,
53
+ children: []
54
+ }
55
+ ])
56
+ })
57
+ })
@@ -0,0 +1,9 @@
1
+ import { TreeOfContent } from "@c-rex/interfaces";
2
+ import { cn } from "../classMerge";
3
+
4
+ describe("cn", () => {
5
+ it("should generate merged class names", () => {
6
+ const result = cn("test", "test2", "test3");
7
+ expect(result).toEqual("test test2 test3");
8
+ })
9
+ })
@@ -0,0 +1,61 @@
1
+ import { updateUrlWithParams, generateQueryParams, createParams } from "../";
2
+ import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime";
3
+
4
+ describe("createParams", () => {
5
+ it("should create parameters", () => {
6
+ const params = ["value1", "value2"];
7
+ const result = createParams(params, "key");
8
+ expect(result).toEqual([
9
+ { key: "key", value: "value1" },
10
+ { key: "key", value: "value2" },
11
+ ]);
12
+ });
13
+ });
14
+
15
+ describe("updateUrlWithParams", () => {
16
+ it("should update the URL with given parameters", () => {
17
+ const mockRouter = {
18
+ push: jest.fn(),
19
+ pathname: "test",
20
+ query: {},
21
+ };
22
+
23
+ const params = [{ key: "page", value: "1" }];
24
+ updateUrlWithParams(mockRouter as unknown as AppRouterInstance, params);
25
+
26
+ expect(mockRouter.push).toHaveBeenCalledWith("/?page=1");
27
+ });
28
+ });
29
+
30
+ describe("generateQueryParams", () => {
31
+ it("should generate query parameters from an object", () => {
32
+ const params = [
33
+ { key: "key1", value: "value1" },
34
+ { key: "key2", value: "value2" },
35
+ ];
36
+ const queryParams = generateQueryParams(params);
37
+ expect(queryParams).toBe("key1=value1&key2=value2");
38
+ });
39
+
40
+ it("should generate query parameters with only one object", () => {
41
+ const params = [{ key: "key1", value: "value1" }];
42
+ const queryParams = generateQueryParams(params);
43
+ expect(queryParams).toBe("key1=value1");
44
+ });
45
+ });
46
+
47
+ /*
48
+ describe("getFlagIcon", () => {
49
+ it("should return the flag icon", () => {
50
+ const flag = "US";
51
+ const result = getFlagIcon(flag);
52
+ expect(result).not.toBeNull();
53
+ })
54
+
55
+ it("should return null", () => {
56
+ const flag = "ABC";
57
+ const result = getFlagIcon(flag);
58
+ expect(result).toBeNull();
59
+ })
60
+ })
61
+ */
@@ -0,0 +1,16 @@
1
+ import { TreeOfContent } from "@c-rex/interfaces";
2
+
3
+ export const generateBreadcrumbItems = (
4
+ treeOfContent: TreeOfContent[],
5
+ ): TreeOfContent[] => {
6
+ const result: TreeOfContent[] = [];
7
+
8
+ treeOfContent.forEach((item) => {
9
+ if (item.active) {
10
+ const filteredChildren = generateBreadcrumbItems(item.children);
11
+ result.push(item, ...filteredChildren);
12
+ }
13
+ });
14
+
15
+ return result;
16
+ };
@@ -0,0 +1,6 @@
1
+ import { clsx, type ClassValue } from "clsx";
2
+ import { twMerge } from "tailwind-merge";
3
+
4
+ export function cn(...inputs: ClassValue[]) {
5
+ return twMerge(clsx(inputs));
6
+ }
package/src/index.ts ADDED
@@ -0,0 +1,4 @@
1
+ export * from './utils';
2
+ export * from './treeOfContent';
3
+ export * from './breadcrumbs';
4
+ export * from './classMerge';
@@ -0,0 +1,83 @@
1
+ /*
2
+ import { DirectoryNodesService } from "@c-rex/services";
3
+
4
+ import { DirectoryNodes } from "@c-rex/interfaces";
5
+ import { informationUnitsDirectories } from "@c-rex/interfaces";
6
+ import { TreeOfContent } from "@c-rex/interfaces";
7
+
8
+ export const generateTreeOfContent = async (
9
+ directoryNodes: DirectoryNodes[],
10
+ ): Promise<TreeOfContent[]> => {
11
+
12
+ const service = new DirectoryNodesService();
13
+
14
+ if (directoryNodes.length == 0) return [];
15
+ if (directoryNodes[0] == undefined) return [];
16
+
17
+ let id = directoryNodes[0].shortId;
18
+ let response = await service.getItem(id);
19
+ const childList = await getChildrenInfo(response.childNodes);
20
+ let result: TreeOfContent[] = childList;
21
+
22
+ while (response.parents != undefined) {
23
+ if (response.informationUnits[0] == undefined) return result;
24
+ if (response.labels[0] == undefined) return result;
25
+ if (response.parents[0] == undefined) return result;
26
+
27
+ const infoId = response.informationUnits[0].shortId;
28
+ const aux = {
29
+ active: true,
30
+ label: response.labels[0].value,
31
+ id: response.shortId,
32
+ link: `/info/${infoId}`,
33
+ children: [...result],
34
+ };
35
+ id = response.parents[0].shortId;
36
+ response = await service.getItem(id);
37
+
38
+ const tree = await getChildrenInfo(response.childNodes, aux);
39
+
40
+ result = [...tree];
41
+ }
42
+
43
+ return result;
44
+ };
45
+
46
+ const getChildrenInfo = async (
47
+ childNodes: informationUnitsDirectories[],
48
+ childItem?: TreeOfContent,
49
+ ): Promise<TreeOfContent[]> => {
50
+ const result: TreeOfContent[] = [];
51
+ if (childNodes == undefined) return result;
52
+
53
+ for (const item of childNodes) {
54
+ if (item.labels[0] == undefined) break;
55
+
56
+ const infoId = await getLink(item.shortId);
57
+ let resultItem: TreeOfContent = {
58
+ active: false,
59
+ label: item.labels[0].value,
60
+ link: `/info/${infoId}`,
61
+ id: item.shortId,
62
+ children: [],
63
+ };
64
+
65
+ if (childItem?.id == item.shortId) {
66
+ resultItem = childItem;
67
+ }
68
+ result.push(resultItem);
69
+ }
70
+
71
+ return result;
72
+ };
73
+
74
+ const getLink = async (id: string): Promise<string> => {
75
+
76
+ const service = new DirectoryNodesService();
77
+ const response = await service.getItem(id);
78
+ if (response.informationUnits == undefined) return "";
79
+ if (response.informationUnits[0] == undefined) return "";
80
+
81
+ return response.informationUnits[0].shortId;
82
+ };
83
+ */
package/src/utils.ts ADDED
@@ -0,0 +1,45 @@
1
+
2
+ import { QueryParams } from '@c-rex/types';
3
+ //import * as Flags from 'country-flag-icons/react/3x2';
4
+ //import { AppRouterInstance } from 'next/dist/shared/lib/app-router-context.shared-runtime';
5
+
6
+ export const createParams = (fieldsList: string[], key: string = "Fields") =>
7
+ fieldsList.map((item) => ({
8
+ key: key,
9
+ value: item,
10
+ }));
11
+
12
+ export const updateUrlWithParams = (
13
+ //router: AppRouterInstance,
14
+ router: any,
15
+ params: QueryParams[],
16
+ ) => {
17
+ const searchParams = new URLSearchParams(window.location.search);
18
+
19
+ params.forEach((param) => {
20
+ searchParams.set(param.key, param.value.toString());
21
+ });
22
+
23
+ const queryString = searchParams.toString();
24
+ router.push(`${window.location.pathname}?${queryString}`);
25
+ };
26
+
27
+ export const generateQueryParams = (params: QueryParams[]): string => {
28
+ const queryParams = params
29
+ .map(
30
+ (param) =>
31
+ `${encodeURIComponent(param.key)}=${encodeURIComponent(param.value)}`,
32
+ )
33
+ .join("&");
34
+ return queryParams;
35
+ };
36
+
37
+ /*
38
+ export const getFlagIcon = (countryCode: string): JSX.Element | null => {
39
+ if (countryCode === undefined) return null;
40
+
41
+ return Flags[countryCode] || null;
42
+ };
43
+
44
+
45
+ */
package/dist/index.d.mts DELETED
@@ -1,20 +0,0 @@
1
- import { TreeOfContent } from '@c-rex/interfaces';
2
- import { ClassValue } from 'clsx';
3
-
4
- type QueryParams = {
5
- key: string;
6
- value: string;
7
- };
8
-
9
- declare const createParams: (fieldsList: string[], key?: string) => {
10
- key: string;
11
- value: string;
12
- }[];
13
- declare const updateUrlWithParams: (router: any, params: QueryParams[]) => void;
14
- declare const generateQueryParams: (params: QueryParams[]) => string;
15
-
16
- declare const generateBreadcrumbItems: (treeOfContent: TreeOfContent[]) => TreeOfContent[];
17
-
18
- declare function cn(...inputs: ClassValue[]): string;
19
-
20
- export { cn, createParams, generateBreadcrumbItems, generateQueryParams, updateUrlWithParams };
package/dist/index.d.ts DELETED
@@ -1,20 +0,0 @@
1
- import { TreeOfContent } from '@c-rex/interfaces';
2
- import { ClassValue } from 'clsx';
3
-
4
- type QueryParams = {
5
- key: string;
6
- value: string;
7
- };
8
-
9
- declare const createParams: (fieldsList: string[], key?: string) => {
10
- key: string;
11
- value: string;
12
- }[];
13
- declare const updateUrlWithParams: (router: any, params: QueryParams[]) => void;
14
- declare const generateQueryParams: (params: QueryParams[]) => string;
15
-
16
- declare const generateBreadcrumbItems: (treeOfContent: TreeOfContent[]) => TreeOfContent[];
17
-
18
- declare function cn(...inputs: ClassValue[]): string;
19
-
20
- export { cn, createParams, generateBreadcrumbItems, generateQueryParams, updateUrlWithParams };
package/dist/index.js DELETED
@@ -1,77 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/index.ts
21
- var index_exports = {};
22
- __export(index_exports, {
23
- cn: () => cn,
24
- createParams: () => createParams,
25
- generateBreadcrumbItems: () => generateBreadcrumbItems,
26
- generateQueryParams: () => generateQueryParams,
27
- updateUrlWithParams: () => updateUrlWithParams
28
- });
29
- module.exports = __toCommonJS(index_exports);
30
-
31
- // src/utils.ts
32
- var createParams = (fieldsList, key = "Fields") => fieldsList.map((item) => ({
33
- key,
34
- value: item
35
- }));
36
- var updateUrlWithParams = (router, params) => {
37
- const searchParams = new URLSearchParams(window.location.search);
38
- params.forEach((param) => {
39
- searchParams.set(param.key, param.value.toString());
40
- });
41
- const queryString = searchParams.toString();
42
- router.push(`${window.location.pathname}?${queryString}`);
43
- };
44
- var generateQueryParams = (params) => {
45
- const queryParams = params.map(
46
- (param) => `${encodeURIComponent(param.key)}=${encodeURIComponent(param.value)}`
47
- ).join("&");
48
- return queryParams;
49
- };
50
-
51
- // src/breadcrumbs.ts
52
- var generateBreadcrumbItems = (treeOfContent) => {
53
- const result = [];
54
- treeOfContent.forEach((item) => {
55
- if (item.active) {
56
- const filteredChildren = generateBreadcrumbItems(item.children);
57
- result.push(item, ...filteredChildren);
58
- }
59
- });
60
- return result;
61
- };
62
-
63
- // src/classMerge.ts
64
- var import_clsx = require("clsx");
65
- var import_tailwind_merge = require("tailwind-merge");
66
- function cn(...inputs) {
67
- return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
68
- }
69
- // Annotate the CommonJS export names for ESM import in node:
70
- 0 && (module.exports = {
71
- cn,
72
- createParams,
73
- generateBreadcrumbItems,
74
- generateQueryParams,
75
- updateUrlWithParams
76
- });
77
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/index.ts","../src/utils.ts","../src/breadcrumbs.ts","../src/classMerge.ts"],"sourcesContent":["export * from './utils';\nexport * from './treeOfContent';\nexport * from './breadcrumbs';\nexport * from './classMerge';","\nimport { QueryParams } from '@c-rex/types';\n//import * as Flags from 'country-flag-icons/react/3x2';\n//import { AppRouterInstance } from 'next/dist/shared/lib/app-router-context.shared-runtime';\n\nexport const createParams = (fieldsList: string[], key: string = \"Fields\") =>\n fieldsList.map((item) => ({\n key: key,\n value: item,\n }));\n\nexport const updateUrlWithParams = (\n //router: AppRouterInstance,\n router: any,\n params: QueryParams[],\n) => {\n const searchParams = new URLSearchParams(window.location.search);\n\n params.forEach((param) => {\n searchParams.set(param.key, param.value.toString());\n });\n\n const queryString = searchParams.toString();\n router.push(`${window.location.pathname}?${queryString}`);\n};\n\nexport const generateQueryParams = (params: QueryParams[]): string => {\n const queryParams = params\n .map(\n (param) =>\n `${encodeURIComponent(param.key)}=${encodeURIComponent(param.value)}`,\n )\n .join(\"&\");\n return queryParams;\n};\n\n/*\nexport const getFlagIcon = (countryCode: string): JSX.Element | null => {\n if (countryCode === undefined) return null;\n \n return Flags[countryCode] || null;\n};\n\n\n*/","import { TreeOfContent } from \"@c-rex/interfaces\";\n\nexport const generateBreadcrumbItems = (\n treeOfContent: TreeOfContent[],\n): TreeOfContent[] => {\n const result: TreeOfContent[] = [];\n\n treeOfContent.forEach((item) => {\n if (item.active) {\n const filteredChildren = generateBreadcrumbItems(item.children);\n result.push(item, ...filteredChildren);\n }\n });\n\n return result;\n};\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACKO,IAAM,eAAe,CAAC,YAAsB,MAAc,aAC7D,WAAW,IAAI,CAAC,UAAU;AAAA,EACtB;AAAA,EACA,OAAO;AACX,EAAE;AAEC,IAAM,sBAAsB,CAE/B,QACA,WACC;AACD,QAAM,eAAe,IAAI,gBAAgB,OAAO,SAAS,MAAM;AAE/D,SAAO,QAAQ,CAAC,UAAU;AACtB,iBAAa,IAAI,MAAM,KAAK,MAAM,MAAM,SAAS,CAAC;AAAA,EACtD,CAAC;AAED,QAAM,cAAc,aAAa,SAAS;AAC1C,SAAO,KAAK,GAAG,OAAO,SAAS,QAAQ,IAAI,WAAW,EAAE;AAC5D;AAEO,IAAM,sBAAsB,CAAC,WAAkC;AAClE,QAAM,cAAc,OACf;AAAA,IACG,CAAC,UACG,GAAG,mBAAmB,MAAM,GAAG,CAAC,IAAI,mBAAmB,MAAM,KAAK,CAAC;AAAA,EAC3E,EACC,KAAK,GAAG;AACb,SAAO;AACX;;;AChCO,IAAM,0BAA0B,CACnC,kBACkB;AAClB,QAAM,SAA0B,CAAC;AAEjC,gBAAc,QAAQ,CAAC,SAAS;AAC5B,QAAI,KAAK,QAAQ;AACb,YAAM,mBAAmB,wBAAwB,KAAK,QAAQ;AAC9D,aAAO,KAAK,MAAM,GAAG,gBAAgB;AAAA,IACzC;AAAA,EACJ,CAAC;AAED,SAAO;AACX;;;ACfA,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AACxC,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC/B;","names":[]}
package/dist/index.mjs DELETED
@@ -1,46 +0,0 @@
1
- // src/utils.ts
2
- var createParams = (fieldsList, key = "Fields") => fieldsList.map((item) => ({
3
- key,
4
- value: item
5
- }));
6
- var updateUrlWithParams = (router, params) => {
7
- const searchParams = new URLSearchParams(window.location.search);
8
- params.forEach((param) => {
9
- searchParams.set(param.key, param.value.toString());
10
- });
11
- const queryString = searchParams.toString();
12
- router.push(`${window.location.pathname}?${queryString}`);
13
- };
14
- var generateQueryParams = (params) => {
15
- const queryParams = params.map(
16
- (param) => `${encodeURIComponent(param.key)}=${encodeURIComponent(param.value)}`
17
- ).join("&");
18
- return queryParams;
19
- };
20
-
21
- // src/breadcrumbs.ts
22
- var generateBreadcrumbItems = (treeOfContent) => {
23
- const result = [];
24
- treeOfContent.forEach((item) => {
25
- if (item.active) {
26
- const filteredChildren = generateBreadcrumbItems(item.children);
27
- result.push(item, ...filteredChildren);
28
- }
29
- });
30
- return result;
31
- };
32
-
33
- // src/classMerge.ts
34
- import { clsx } from "clsx";
35
- import { twMerge } from "tailwind-merge";
36
- function cn(...inputs) {
37
- return twMerge(clsx(inputs));
38
- }
39
- export {
40
- cn,
41
- createParams,
42
- generateBreadcrumbItems,
43
- generateQueryParams,
44
- updateUrlWithParams
45
- };
46
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/utils.ts","../src/breadcrumbs.ts","../src/classMerge.ts"],"sourcesContent":["\nimport { QueryParams } from '@c-rex/types';\n//import * as Flags from 'country-flag-icons/react/3x2';\n//import { AppRouterInstance } from 'next/dist/shared/lib/app-router-context.shared-runtime';\n\nexport const createParams = (fieldsList: string[], key: string = \"Fields\") =>\n fieldsList.map((item) => ({\n key: key,\n value: item,\n }));\n\nexport const updateUrlWithParams = (\n //router: AppRouterInstance,\n router: any,\n params: QueryParams[],\n) => {\n const searchParams = new URLSearchParams(window.location.search);\n\n params.forEach((param) => {\n searchParams.set(param.key, param.value.toString());\n });\n\n const queryString = searchParams.toString();\n router.push(`${window.location.pathname}?${queryString}`);\n};\n\nexport const generateQueryParams = (params: QueryParams[]): string => {\n const queryParams = params\n .map(\n (param) =>\n `${encodeURIComponent(param.key)}=${encodeURIComponent(param.value)}`,\n )\n .join(\"&\");\n return queryParams;\n};\n\n/*\nexport const getFlagIcon = (countryCode: string): JSX.Element | null => {\n if (countryCode === undefined) return null;\n \n return Flags[countryCode] || null;\n};\n\n\n*/","import { TreeOfContent } from \"@c-rex/interfaces\";\n\nexport const generateBreadcrumbItems = (\n treeOfContent: TreeOfContent[],\n): TreeOfContent[] => {\n const result: TreeOfContent[] = [];\n\n treeOfContent.forEach((item) => {\n if (item.active) {\n const filteredChildren = generateBreadcrumbItems(item.children);\n result.push(item, ...filteredChildren);\n }\n });\n\n return result;\n};\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":";AAKO,IAAM,eAAe,CAAC,YAAsB,MAAc,aAC7D,WAAW,IAAI,CAAC,UAAU;AAAA,EACtB;AAAA,EACA,OAAO;AACX,EAAE;AAEC,IAAM,sBAAsB,CAE/B,QACA,WACC;AACD,QAAM,eAAe,IAAI,gBAAgB,OAAO,SAAS,MAAM;AAE/D,SAAO,QAAQ,CAAC,UAAU;AACtB,iBAAa,IAAI,MAAM,KAAK,MAAM,MAAM,SAAS,CAAC;AAAA,EACtD,CAAC;AAED,QAAM,cAAc,aAAa,SAAS;AAC1C,SAAO,KAAK,GAAG,OAAO,SAAS,QAAQ,IAAI,WAAW,EAAE;AAC5D;AAEO,IAAM,sBAAsB,CAAC,WAAkC;AAClE,QAAM,cAAc,OACf;AAAA,IACG,CAAC,UACG,GAAG,mBAAmB,MAAM,GAAG,CAAC,IAAI,mBAAmB,MAAM,KAAK,CAAC;AAAA,EAC3E,EACC,KAAK,GAAG;AACb,SAAO;AACX;;;AChCO,IAAM,0BAA0B,CACnC,kBACkB;AAClB,QAAM,SAA0B,CAAC;AAEjC,gBAAc,QAAQ,CAAC,SAAS;AAC5B,QAAI,KAAK,QAAQ;AACb,YAAM,mBAAmB,wBAAwB,KAAK,QAAQ;AAC9D,aAAO,KAAK,MAAM,GAAG,gBAAgB;AAAA,IACzC;AAAA,EACJ,CAAC;AAED,SAAO;AACX;;;ACfA,SAAS,YAA6B;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AACxC,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC/B;","names":[]}