@payloadcms/ui 3.42.0 → 3.43.0-internal.c5bbc84
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/dist/elements/CopyLocaleData/index.d.ts.map +1 -1
- package/dist/elements/CopyLocaleData/index.js +6 -1
- package/dist/elements/CopyLocaleData/index.js.map +1 -1
- package/dist/elements/FolderView/CollectionTypePill/index.d.ts.map +1 -1
- package/dist/elements/FolderView/CollectionTypePill/index.js +13 -10
- package/dist/elements/FolderView/CollectionTypePill/index.js.map +1 -1
- package/dist/elements/FolderView/CurrentFolderActions/index.d.ts.map +1 -1
- package/dist/elements/FolderView/CurrentFolderActions/index.js +17 -11
- package/dist/elements/FolderView/CurrentFolderActions/index.js.map +1 -1
- package/dist/elements/FolderView/Drawers/EditFolderAction/index.d.ts +1 -3
- package/dist/elements/FolderView/Drawers/EditFolderAction/index.d.ts.map +1 -1
- package/dist/elements/FolderView/Drawers/EditFolderAction/index.js +7 -4
- package/dist/elements/FolderView/Drawers/EditFolderAction/index.js.map +1 -1
- package/dist/elements/FolderView/Drawers/MoveToFolder/index.d.ts +1 -0
- package/dist/elements/FolderView/Drawers/MoveToFolder/index.d.ts.map +1 -1
- package/dist/elements/FolderView/Drawers/MoveToFolder/index.js +230 -201
- package/dist/elements/FolderView/Drawers/MoveToFolder/index.js.map +1 -1
- package/dist/elements/FolderView/FolderFileCard/index.d.ts +8 -0
- package/dist/elements/FolderView/FolderFileCard/index.d.ts.map +1 -1
- package/dist/elements/FolderView/FolderFileCard/index.js +82 -0
- package/dist/elements/FolderView/FolderFileCard/index.js.map +1 -1
- package/dist/elements/FolderView/FolderFileTable/index.d.ts +1 -22
- package/dist/elements/FolderView/FolderFileTable/index.d.ts.map +1 -1
- package/dist/elements/FolderView/FolderFileTable/index.js +245 -163
- package/dist/elements/FolderView/FolderFileTable/index.js.map +1 -1
- package/dist/elements/FolderView/ItemCardGrid/index.d.ts +2 -8
- package/dist/elements/FolderView/ItemCardGrid/index.d.ts.map +1 -1
- package/dist/elements/FolderView/ItemCardGrid/index.js +24 -90
- package/dist/elements/FolderView/ItemCardGrid/index.js.map +1 -1
- package/dist/elements/FolderView/SortByPill/index.d.ts.map +1 -1
- package/dist/elements/FolderView/SortByPill/index.js +17 -15
- package/dist/elements/FolderView/SortByPill/index.js.map +1 -1
- package/dist/elements/ListHeader/TitleActions/ListCreateNewDocInFolderButton.d.ts.map +1 -1
- package/dist/elements/ListHeader/TitleActions/ListCreateNewDocInFolderButton.js +8 -10
- package/dist/elements/ListHeader/TitleActions/ListCreateNewDocInFolderButton.js.map +1 -1
- package/dist/exports/client/index.js +22 -22
- package/dist/exports/client/index.js.map +4 -4
- package/dist/exports/rsc/index.d.ts +1 -0
- package/dist/exports/rsc/index.d.ts.map +1 -1
- package/dist/exports/rsc/index.js +1 -0
- package/dist/exports/rsc/index.js.map +1 -1
- package/dist/fields/Relationship/Input.d.ts.map +1 -1
- package/dist/fields/Relationship/Input.js +1 -0
- package/dist/fields/Relationship/Input.js.map +1 -1
- package/dist/providers/Folders/index.d.ts +59 -46
- package/dist/providers/Folders/index.d.ts.map +1 -1
- package/dist/providers/Folders/index.js +163 -572
- package/dist/providers/Folders/index.js.map +1 -1
- package/dist/providers/ServerFunctions/index.d.ts +6 -1
- package/dist/providers/ServerFunctions/index.d.ts.map +1 -1
- package/dist/providers/ServerFunctions/index.js +19 -0
- package/dist/providers/ServerFunctions/index.js.map +1 -1
- package/dist/providers/TableColumns/index.js +1 -0
- package/dist/providers/TableColumns/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/utilities/getFolderResultsComponentAndData.d.ts +29 -0
- package/dist/utilities/getFolderResultsComponentAndData.d.ts.map +1 -0
- package/dist/utilities/getFolderResultsComponentAndData.js +128 -0
- package/dist/utilities/getFolderResultsComponentAndData.js.map +1 -0
- package/dist/views/BrowseByFolder/index.d.ts +1 -4
- package/dist/views/BrowseByFolder/index.d.ts.map +1 -1
- package/dist/views/BrowseByFolder/index.js +219 -158
- package/dist/views/BrowseByFolder/index.js.map +1 -1
- package/dist/views/CollectionFolder/ListSelection/index.d.ts.map +1 -1
- package/dist/views/CollectionFolder/ListSelection/index.js +25 -50
- package/dist/views/CollectionFolder/ListSelection/index.js.map +1 -1
- package/dist/views/CollectionFolder/index.d.ts +1 -1
- package/dist/views/CollectionFolder/index.d.ts.map +1 -1
- package/dist/views/CollectionFolder/index.js +186 -153
- package/dist/views/CollectionFolder/index.js.map +1 -1
- package/package.json +5 -5
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ErrorResult, GetFolderResultsComponentAndDataArgs } from 'payload';
|
|
2
|
+
import type { FolderBreadcrumb, FolderOrDocument } from 'payload/shared';
|
|
3
|
+
type GetFolderResultsComponentAndDataResult = {
|
|
4
|
+
breadcrumbs?: FolderBreadcrumb[];
|
|
5
|
+
documents?: FolderOrDocument[];
|
|
6
|
+
FolderResultsComponent: React.ReactNode;
|
|
7
|
+
subfolders?: FolderOrDocument[];
|
|
8
|
+
};
|
|
9
|
+
type GetFolderResultsComponentAndDataErrorResult = {
|
|
10
|
+
breadcrumbs?: never;
|
|
11
|
+
documents?: never;
|
|
12
|
+
FolderResultsComponent?: never;
|
|
13
|
+
subfolders?: never;
|
|
14
|
+
} & ({
|
|
15
|
+
message: string;
|
|
16
|
+
} | ErrorResult);
|
|
17
|
+
export declare const getFolderResultsComponentAndDataHandler: (args: GetFolderResultsComponentAndDataArgs) => Promise<GetFolderResultsComponentAndDataErrorResult | GetFolderResultsComponentAndDataResult>;
|
|
18
|
+
/**
|
|
19
|
+
* This function is responsible for fetching folder data, building the results component
|
|
20
|
+
* and returns the data and component together.
|
|
21
|
+
*
|
|
22
|
+
*
|
|
23
|
+
* Open ended questions:
|
|
24
|
+
* - If we rerender the results section, does the provider update?? I dont think so, if the provider is on the server.
|
|
25
|
+
* Maybe we should move the provider to the client.
|
|
26
|
+
*/
|
|
27
|
+
export declare const getFolderResultsComponentAndData: ({ activeCollectionSlugs, browseByFolder, displayAs, folderID, req, sort, }: GetFolderResultsComponentAndDataArgs) => Promise<GetFolderResultsComponentAndDataResult>;
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=getFolderResultsComponentAndData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getFolderResultsComponentAndData.d.ts","sourceRoot":"","sources":["../../src/utilities/getFolderResultsComponentAndData.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,WAAW,EACX,oCAAoC,EAErC,MAAM,SAAS,CAAA;AAChB,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAQxE,KAAK,sCAAsC,GAAG;IAC5C,WAAW,CAAC,EAAE,gBAAgB,EAAE,CAAA;IAChC,SAAS,CAAC,EAAE,gBAAgB,EAAE,CAAA;IAC9B,sBAAsB,EAAE,KAAK,CAAC,SAAS,CAAA;IACvC,UAAU,CAAC,EAAE,gBAAgB,EAAE,CAAA;CAChC,CAAA;AAED,KAAK,2CAA2C,GAAG;IACjD,WAAW,CAAC,EAAE,KAAK,CAAA;IACnB,SAAS,CAAC,EAAE,KAAK,CAAA;IACjB,sBAAsB,CAAC,EAAE,KAAK,CAAA;IAC9B,UAAU,CAAC,EAAE,KAAK,CAAA;CACnB,GAAG,CACA;IACE,OAAO,EAAE,MAAM,CAAA;CAChB,GACD,WAAW,CACd,CAAA;AAED,eAAO,MAAM,uCAAuC,SAC5C,oCAAoC,KACzC,OAAO,CACR,2CAA2C,GAAG,sCAAsC,CAsBrF,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,gCAAgC,+EAO1C,oCAAoC,KAAG,OAAO,CAAC,sCAAsC,CA6FvF,CAAA"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { APIError, formatErrors, getFolderData } from 'payload';
|
|
3
|
+
import { buildFolderWhereConstraints } from 'payload/shared';
|
|
4
|
+
import { FolderFileTable } from '../elements/FolderView/FolderFileTable/index.js';
|
|
5
|
+
import { ItemCardGrid } from '../elements/FolderView/ItemCardGrid/index.js';
|
|
6
|
+
export const getFolderResultsComponentAndDataHandler = async args => {
|
|
7
|
+
const {
|
|
8
|
+
req
|
|
9
|
+
} = args;
|
|
10
|
+
try {
|
|
11
|
+
const res = await getFolderResultsComponentAndData(args);
|
|
12
|
+
return res;
|
|
13
|
+
} catch (err) {
|
|
14
|
+
req.payload.logger.error({
|
|
15
|
+
err,
|
|
16
|
+
msg: `There was an error building form state`
|
|
17
|
+
});
|
|
18
|
+
if (err.message === 'Could not find field schema for given path') {
|
|
19
|
+
return {
|
|
20
|
+
message: err.message
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
if (err.message === 'Unauthorized') {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
return formatErrors(err);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* This function is responsible for fetching folder data, building the results component
|
|
31
|
+
* and returns the data and component together.
|
|
32
|
+
*
|
|
33
|
+
*
|
|
34
|
+
* Open ended questions:
|
|
35
|
+
* - If we rerender the results section, does the provider update?? I dont think so, if the provider is on the server.
|
|
36
|
+
* Maybe we should move the provider to the client.
|
|
37
|
+
*/
|
|
38
|
+
export const getFolderResultsComponentAndData = async ({
|
|
39
|
+
activeCollectionSlugs,
|
|
40
|
+
browseByFolder,
|
|
41
|
+
displayAs,
|
|
42
|
+
folderID = undefined,
|
|
43
|
+
req,
|
|
44
|
+
sort
|
|
45
|
+
}) => {
|
|
46
|
+
const {
|
|
47
|
+
payload
|
|
48
|
+
} = req;
|
|
49
|
+
if (!payload.config.folders) {
|
|
50
|
+
throw new APIError('Folders are not enabled in the configuration.');
|
|
51
|
+
}
|
|
52
|
+
let collectionSlug = undefined;
|
|
53
|
+
let documentWhere = undefined;
|
|
54
|
+
let folderWhere = undefined;
|
|
55
|
+
// todo(perf): - collect promises and resolve them in parallel
|
|
56
|
+
for (const activeCollectionSlug of activeCollectionSlugs) {
|
|
57
|
+
if (activeCollectionSlug === payload.config.folders.slug) {
|
|
58
|
+
const folderCollectionConstraints = await buildFolderWhereConstraints({
|
|
59
|
+
collectionConfig: payload.collections[activeCollectionSlug].config,
|
|
60
|
+
folderID,
|
|
61
|
+
localeCode: req?.locale,
|
|
62
|
+
req,
|
|
63
|
+
search: typeof req?.query?.search === 'string' ? req.query.search : undefined,
|
|
64
|
+
sort
|
|
65
|
+
});
|
|
66
|
+
if (folderCollectionConstraints) {
|
|
67
|
+
folderWhere = folderCollectionConstraints;
|
|
68
|
+
}
|
|
69
|
+
} else if (browseByFolder && folderID || !browseByFolder) {
|
|
70
|
+
if (!browseByFolder) {
|
|
71
|
+
collectionSlug = activeCollectionSlug;
|
|
72
|
+
}
|
|
73
|
+
if (!documentWhere) {
|
|
74
|
+
documentWhere = {
|
|
75
|
+
or: []
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
const collectionConstraints = await buildFolderWhereConstraints({
|
|
79
|
+
collectionConfig: payload.collections[activeCollectionSlug].config,
|
|
80
|
+
folderID,
|
|
81
|
+
localeCode: req?.locale,
|
|
82
|
+
req,
|
|
83
|
+
search: typeof req?.query?.search === 'string' ? req.query.search : undefined,
|
|
84
|
+
sort
|
|
85
|
+
});
|
|
86
|
+
if (collectionConstraints) {
|
|
87
|
+
documentWhere.or.push(collectionConstraints);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
const folderData = await getFolderData({
|
|
92
|
+
collectionSlug,
|
|
93
|
+
documentWhere,
|
|
94
|
+
folderID,
|
|
95
|
+
folderWhere,
|
|
96
|
+
req
|
|
97
|
+
});
|
|
98
|
+
let FolderResultsComponent = null;
|
|
99
|
+
if (displayAs === 'grid') {
|
|
100
|
+
FolderResultsComponent = /*#__PURE__*/_jsxs("div", {
|
|
101
|
+
children: [folderData.subfolders.length ? /*#__PURE__*/_jsx(_Fragment, {
|
|
102
|
+
children: /*#__PURE__*/_jsx(ItemCardGrid, {
|
|
103
|
+
items: folderData.subfolders,
|
|
104
|
+
title: 'Folders',
|
|
105
|
+
type: "folder"
|
|
106
|
+
})
|
|
107
|
+
}) : null, folderData.documents.length ? /*#__PURE__*/_jsx(_Fragment, {
|
|
108
|
+
children: /*#__PURE__*/_jsx(ItemCardGrid, {
|
|
109
|
+
items: folderData.documents,
|
|
110
|
+
subfolderCount: folderData.subfolders.length,
|
|
111
|
+
title: 'Documents',
|
|
112
|
+
type: "file"
|
|
113
|
+
})
|
|
114
|
+
}) : null]
|
|
115
|
+
});
|
|
116
|
+
} else {
|
|
117
|
+
FolderResultsComponent = /*#__PURE__*/_jsx(FolderFileTable, {
|
|
118
|
+
showRelationCell: browseByFolder
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
return {
|
|
122
|
+
breadcrumbs: folderData.breadcrumbs,
|
|
123
|
+
documents: folderData.documents,
|
|
124
|
+
FolderResultsComponent,
|
|
125
|
+
subfolders: folderData.subfolders
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
//# sourceMappingURL=getFolderResultsComponentAndData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getFolderResultsComponentAndData.js","names":["APIError","formatErrors","getFolderData","buildFolderWhereConstraints","FolderFileTable","ItemCardGrid","getFolderResultsComponentAndDataHandler","args","req","res","getFolderResultsComponentAndData","err","payload","logger","error","msg","message","activeCollectionSlugs","browseByFolder","displayAs","folderID","undefined","sort","config","folders","collectionSlug","documentWhere","folderWhere","activeCollectionSlug","slug","folderCollectionConstraints","collectionConfig","collections","localeCode","locale","search","query","or","collectionConstraints","push","folderData","FolderResultsComponent","_jsxs","subfolders","length","_jsx","_Fragment","items","title","type","documents","subfolderCount","showRelationCell","breadcrumbs"],"sources":["../../src/utilities/getFolderResultsComponentAndData.tsx"],"sourcesContent":["import type {\n CollectionSlug,\n ErrorResult,\n GetFolderResultsComponentAndDataArgs,\n Where,\n} from 'payload'\nimport type { FolderBreadcrumb, FolderOrDocument } from 'payload/shared'\n\nimport { APIError, formatErrors, getFolderData } from 'payload'\nimport { buildFolderWhereConstraints } from 'payload/shared'\n\nimport { FolderFileTable } from '../elements/FolderView/FolderFileTable/index.js'\nimport { ItemCardGrid } from '../elements/FolderView/ItemCardGrid/index.js'\n\ntype GetFolderResultsComponentAndDataResult = {\n breadcrumbs?: FolderBreadcrumb[]\n documents?: FolderOrDocument[]\n FolderResultsComponent: React.ReactNode\n subfolders?: FolderOrDocument[]\n}\n\ntype GetFolderResultsComponentAndDataErrorResult = {\n breadcrumbs?: never\n documents?: never\n FolderResultsComponent?: never\n subfolders?: never\n} & (\n | {\n message: string\n }\n | ErrorResult\n)\n\nexport const getFolderResultsComponentAndDataHandler = async (\n args: GetFolderResultsComponentAndDataArgs,\n): Promise<\n GetFolderResultsComponentAndDataErrorResult | GetFolderResultsComponentAndDataResult\n> => {\n const { req } = args\n\n try {\n const res = await getFolderResultsComponentAndData(args)\n return res\n } catch (err) {\n req.payload.logger.error({ err, msg: `There was an error building form state` })\n\n if (err.message === 'Could not find field schema for given path') {\n return {\n message: err.message,\n }\n }\n\n if (err.message === 'Unauthorized') {\n return null\n }\n\n return formatErrors(err)\n }\n}\n\n/**\n * This function is responsible for fetching folder data, building the results component\n * and returns the data and component together.\n *\n *\n * Open ended questions:\n * - If we rerender the results section, does the provider update?? I dont think so, if the provider is on the server.\n * Maybe we should move the provider to the client.\n */\nexport const getFolderResultsComponentAndData = async ({\n activeCollectionSlugs,\n browseByFolder,\n displayAs,\n folderID = undefined,\n req,\n sort,\n}: GetFolderResultsComponentAndDataArgs): Promise<GetFolderResultsComponentAndDataResult> => {\n const { payload } = req\n\n if (!payload.config.folders) {\n throw new APIError('Folders are not enabled in the configuration.')\n }\n\n let collectionSlug: CollectionSlug | undefined = undefined\n let documentWhere: undefined | Where = undefined\n let folderWhere: undefined | Where = undefined\n\n // todo(perf): - collect promises and resolve them in parallel\n for (const activeCollectionSlug of activeCollectionSlugs) {\n if (activeCollectionSlug === payload.config.folders.slug) {\n const folderCollectionConstraints = await buildFolderWhereConstraints({\n collectionConfig: payload.collections[activeCollectionSlug].config,\n folderID,\n localeCode: req?.locale,\n req,\n search: typeof req?.query?.search === 'string' ? req.query.search : undefined,\n sort,\n })\n\n if (folderCollectionConstraints) {\n folderWhere = folderCollectionConstraints\n }\n } else if ((browseByFolder && folderID) || !browseByFolder) {\n if (!browseByFolder) {\n collectionSlug = activeCollectionSlug\n }\n\n if (!documentWhere) {\n documentWhere = {\n or: [],\n }\n }\n\n const collectionConstraints = await buildFolderWhereConstraints({\n collectionConfig: payload.collections[activeCollectionSlug].config,\n folderID,\n localeCode: req?.locale,\n req,\n search: typeof req?.query?.search === 'string' ? req.query.search : undefined,\n sort,\n })\n\n if (collectionConstraints) {\n documentWhere.or.push(collectionConstraints)\n }\n }\n }\n\n const folderData = await getFolderData({\n collectionSlug,\n documentWhere,\n folderID,\n folderWhere,\n req,\n })\n\n let FolderResultsComponent = null\n\n if (displayAs === 'grid') {\n FolderResultsComponent = (\n <div>\n {folderData.subfolders.length ? (\n <>\n <ItemCardGrid items={folderData.subfolders} title={'Folders'} type=\"folder\" />\n </>\n ) : null}\n\n {folderData.documents.length ? (\n <>\n <ItemCardGrid\n items={folderData.documents}\n subfolderCount={folderData.subfolders.length}\n title={'Documents'}\n type=\"file\"\n />\n </>\n ) : null}\n </div>\n )\n } else {\n FolderResultsComponent = <FolderFileTable showRelationCell={browseByFolder} />\n }\n\n return {\n breadcrumbs: folderData.breadcrumbs,\n documents: folderData.documents,\n FolderResultsComponent,\n subfolders: folderData.subfolders,\n }\n}\n"],"mappings":";AAQA,SAASA,QAAQ,EAAEC,YAAY,EAAEC,aAAa,QAAQ;AACtD,SAASC,2BAA2B,QAAQ;AAE5C,SAASC,eAAe,QAAQ;AAChC,SAASC,YAAY,QAAQ;AAqB7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K;;WAEnE,MAEHT,UAAA,CAAWU,SAAS,CAACN,MAAM,gBAC1BC,IAAA,CAAAC,SAAA;kBACE,aAAAD,IAAA,CAACxC,YAAA;UACC0C,KAAA,EAAOP,UAAA,CAAWU,SAAS;UAC3BC,cAAA,EAAgBX,UAAA,CAAWG,UAAU,CAACC,MAAM;UAC5CI,KAAA,EAAO;UACPC,IAAA,EAAK;;WAGP;;EAGV,OAAO;IACLR,sBAAA,gBAAyBI,IAAA,CAACzC,eAAA;MAAgBgD,gBAAA,EAAkBlC;;EAC9D;EAEA,OAAO;IACLmC,WAAA,EAAab,UAAA,CAAWa,WAAW;IACnCH,SAAA,EAAWV,UAAA,CAAWU,SAAS;IAC/BT,sBAAA;IACAE,UAAA,EAAYH,UAAA,CAAWG;EACzB;AACF","ignoreList":[]}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import type { FolderListViewClientProps } from 'payload';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import './index.scss';
|
|
4
|
-
export declare function DefaultBrowseByFolderView(
|
|
5
|
-
hasCreatePermissionCollectionSlugs?: string[];
|
|
6
|
-
selectedCollectionSlugs?: string[];
|
|
7
|
-
} & FolderListViewClientProps): React.JSX.Element;
|
|
4
|
+
export declare function DefaultBrowseByFolderView({ activeCollectionFolderSlugs, allCollectionFolderSlugs, allowCreateCollectionSlugs, baseFolderPath, breadcrumbs, documents, folderFieldName, folderID, FolderResultsComponent, search, subfolders, ...restOfProps }: FolderListViewClientProps): React.JSX.Element;
|
|
8
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/views/BrowseByFolder/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/views/BrowseByFolder/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAA;AAKxD,OAAO,KAAmB,MAAM,OAAO,CAAA;AA0BvC,OAAO,cAAc,CAAA;AAIrB,wBAAgB,yBAAyB,CAAC,EACxC,2BAA2B,EAC3B,wBAAwB,EACxB,0BAA0B,EAC1B,cAAc,EACd,WAAW,EACX,SAAS,EACT,eAAe,EACf,QAAQ,EACR,sBAAsB,EACtB,MAAM,EACN,UAAU,EACV,GAAG,WAAW,EACf,EAAE,yBAAyB,qBAkB3B"}
|