@epam/ai-dial-chat-hooks 1.1.0-dev.267 → 1.1.0-dev.268

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 (44) hide show
  1. package/files/dial-file-manager-copy-move.util.d.ts +15 -0
  2. package/files/dial-file-manager-copy-move.util.d.ts.map +1 -0
  3. package/files/dial-file-manager-mapping.util.d.ts +35 -0
  4. package/files/dial-file-manager-mapping.util.d.ts.map +1 -0
  5. package/files/dial-file-manager-path.util.d.ts +39 -0
  6. package/files/dial-file-manager-path.util.d.ts.map +1 -0
  7. package/files/dial-file-manager.model.d.ts +26 -0
  8. package/files/dial-file-manager.model.d.ts.map +1 -0
  9. package/files/dial-file-manager.types.d.ts +320 -0
  10. package/files/dial-file-manager.types.d.ts.map +1 -0
  11. package/files/dial-files-api.d.ts +71 -0
  12. package/files/dial-files-api.d.ts.map +1 -0
  13. package/files/download-destination.d.ts +31 -0
  14. package/files/download-destination.d.ts.map +1 -0
  15. package/files/file-manager-variant.d.ts +22 -0
  16. package/files/file-manager-variant.d.ts.map +1 -0
  17. package/files/file-name.d.ts +19 -0
  18. package/files/file-name.d.ts.map +1 -0
  19. package/files/resolve-dial-file-api-path.d.ts +17 -0
  20. package/files/resolve-dial-file-api-path.d.ts.map +1 -0
  21. package/files/string-utils.d.ts +3 -0
  22. package/files/string-utils.d.ts.map +1 -0
  23. package/files/upload-batch.types.d.ts +22 -0
  24. package/files/upload-batch.types.d.ts.map +1 -0
  25. package/files/useDialFileListing/useDialFileListing.d.ts +73 -0
  26. package/files/useDialFileListing/useDialFileListing.d.ts.map +1 -0
  27. package/files/useDialFileManager/useDialFileManager.d.ts +16 -0
  28. package/files/useDialFileManager/useDialFileManager.d.ts.map +1 -0
  29. package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.d.ts +14 -0
  30. package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.d.ts.map +1 -0
  31. package/files/useDialFileMetadata/useDialFileMetadata.d.ts +28 -0
  32. package/files/useDialFileMetadata/useDialFileMetadata.d.ts.map +1 -0
  33. package/files/useDialFileMutations/useDialFileMutations.d.ts +68 -0
  34. package/files/useDialFileMutations/useDialFileMutations.d.ts.map +1 -0
  35. package/files/useDialFileSharing/useDialFileSharing.d.ts +30 -0
  36. package/files/useDialFileSharing/useDialFileSharing.d.ts.map +1 -0
  37. package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts +45 -0
  38. package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts.map +1 -0
  39. package/files/useGridEditingScroll/useGridEditingScroll.d.ts +27 -0
  40. package/files/useGridEditingScroll/useGridEditingScroll.d.ts.map +1 -0
  41. package/index.d.ts +18 -0
  42. package/index.d.ts.map +1 -1
  43. package/index.js +1780 -406
  44. package/package.json +10 -8
@@ -0,0 +1,19 @@
1
+ /** Splits a file name into its base and extension, using only the last dot. */
2
+ export declare const splitFileNameExtension: (fileName: string) => {
3
+ base: string;
4
+ extension: string;
5
+ };
6
+ export declare const trimFileNameToByteLimit: (name: string, limit?: number) => string;
7
+ /**
8
+ * Sanitizes a filename for upload by replacing forbidden characters with `_`,
9
+ * trimming trailing dots/whitespace from the base name, and capping the result
10
+ * to 255 UTF-8 bytes.
11
+ *
12
+ * Mutates nothing — returns a new string. The caller (onValidateUpload) is
13
+ * responsible for writing the result back to DialUploadFileItem.name so the
14
+ * ui-kit's subsequent conflict detection sees the sanitized name.
15
+ *
16
+ * If the base name is empty after sanitization, returns the original name unchanged.
17
+ */
18
+ export declare const sanitizeFileName: (name: string) => string;
19
+ //# sourceMappingURL=file-name.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-name.d.ts","sourceRoot":"","sources":["../../src/files/file-name.ts"],"names":[],"mappings":"AAMA,+EAA+E;AAC/E,eAAO,MAAM,sBAAsB,GACjC,UAAU,MAAM,KACf;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAOnC,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,MAAM,MAAM,EAAE,cAAW,KAAG,MAYnE,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,KAAG,MAY/C,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { DialFile } from '@epam/ai-dial-react-file-manager';
2
+ /**
3
+ * Converts a DialFileManager virtual path to an API folder path.
4
+ * e.g. "/My files" → "", "/My files/reports/" → "reports/"
5
+ */
6
+ export declare const virtualPathToApiPath: (virtualPath: string, rootLabel: string) => string;
7
+ /**
8
+ * Returns the parent folder of a path (virtual or API), always trailing-slashed.
9
+ * e.g. "reports/file.txt" -> "reports/", "/My files/reports/" -> "/My files/"
10
+ */
11
+ export declare const getParentFolderPath: (path: string) => string;
12
+ /**
13
+ * Resolves a DialFile to the bucket-relative API path used by files BFF endpoints.
14
+ * Prefers DIAL resource ids when present; otherwise converts DialFile.path virtual paths.
15
+ */
16
+ export declare const resolveDialFileApiPath: (file: DialFile, bucket: string, rootLabel: string) => string;
17
+ //# sourceMappingURL=resolve-dial-file-api-path.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-dial-file-api-path.d.ts","sourceRoot":"","sources":["../../src/files/resolve-dial-file-api-path.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAoCjE;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAC/B,aAAa,MAAM,EACnB,WAAW,MAAM,KAChB,MAiCF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAAI,MAAM,MAAM,KAAG,MAIlD,CAAC;AAOF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GACjC,MAAM,QAAQ,EACd,QAAQ,MAAM,EACd,WAAW,MAAM,KAChB,MAkBF,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Decodes a URI-encoded path segment, returning the original string if decoding fails. */
2
+ export declare const safeDecodeURI: (path: string) => string;
3
+ //# sourceMappingURL=string-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"string-utils.d.ts","sourceRoot":"","sources":["../../src/files/string-utils.ts"],"names":[],"mappings":"AAOA,2FAA2F;AAC3F,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,KAAG,MAM5C,CAAC"}
@@ -0,0 +1,22 @@
1
+ /** Lifecycle status of a single file within an upload batch. */
2
+ export declare enum FileUploadStatus {
3
+ Queued = "queued",
4
+ Uploading = "uploading",
5
+ Completed = "completed",
6
+ Failed = "failed",
7
+ Cancelled = "cancelled"
8
+ }
9
+ /** Progress state for a single file within an upload batch. */
10
+ export interface FileUploadEntry {
11
+ id: string;
12
+ name: string;
13
+ status: FileUploadStatus;
14
+ /** 0–100 while uploading when the transport reports byte progress. */
15
+ percent?: number;
16
+ }
17
+ /** State of an in-progress or just-settled upload batch, as returned by `useDialFileUploadBatch`. */
18
+ export interface FileUploadBatchState {
19
+ files: FileUploadEntry[];
20
+ isOpen: boolean;
21
+ }
22
+ //# sourceMappingURL=upload-batch.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upload-batch.types.d.ts","sourceRoot":"","sources":["../../src/files/upload-batch.types.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,oBAAY,gBAAgB;IAC1B,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB;AAED,+DAA+D;AAC/D,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,gBAAgB,CAAC;IACzB,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,qGAAqG;AACrG,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,MAAM,EAAE,OAAO,CAAC;CACjB"}
@@ -0,0 +1,73 @@
1
+ import { CreateFolderResponseDto, ListFilesItemDto } from '@epam/ai-dial-chat-api-client';
2
+ import { DialFile, DialFileManagerTabs } from '@epam/ai-dial-react-file-manager';
3
+ import { SharedRootMeta } from '../dial-file-manager.model';
4
+ import { FileManagerNotification } from '../dial-file-manager.types';
5
+ import { DialFilesApi } from '../dial-files-api';
6
+ /** Options accepted by `useDialFileListing`. */
7
+ export interface UseDialFileListingOptions {
8
+ /** Injected operation port used for every listing/search network call. */
9
+ filesApi: DialFilesApi;
10
+ /** DIAL Core bucket to browse (used only for the my_files tab). */
11
+ bucket: string;
12
+ /** Display name for the root folder node (e.g. `'My files'`). */
13
+ rootLabel: string;
14
+ /** Active tab — drives listing source and per-tab options. */
15
+ activeTab: DialFileManagerTabs;
16
+ /** Called with a structured event when a folder-load operation fails. */
17
+ onNotification?: (notification: FileManagerNotification) => void;
18
+ }
19
+ /** Values returned by `useDialFileListing`. */
20
+ export interface UseDialFileListingResult {
21
+ items: DialFile[];
22
+ isLoading: boolean;
23
+ error: string | null;
24
+ path: string;
25
+ /** Bucket-relative path of the currently browsed folder (e.g. `"reports/"`, `""` for root). */
26
+ folderPath: string;
27
+ onPathChange: (nextPath?: string) => void;
28
+ retry: () => void;
29
+ onSearchFiles: (folder: string, query: string) => void;
30
+ isSearching: boolean;
31
+ searchResults: DialFile[] | null;
32
+ clearSearchResults: () => void;
33
+ expandedPaths: Set<string>;
34
+ loadedPaths: Set<string>;
35
+ onExpandedPathsChange: (paths: Set<string>) => void;
36
+ onFolderPopupPathChange: (nextPath?: string) => void;
37
+ folderPopupLoadingPaths: Set<string>;
38
+ sharedWithMeIds: string[] | undefined;
39
+ sharedByMePaths: Set<string>;
40
+ currentFolder: DialFile | undefined;
41
+ /** Read-only snapshot of the per-folder listing cache, for `useDialFileUploadBatch`'s overwrite-mode check. */
42
+ cache: Map<string, ListFilesItemDto[]>;
43
+ /** Read-only snapshot of per-folder permissions, for `useDialFileMutations`'s create-folder inherited permissions. */
44
+ listingPermissionsCache: Map<string, string[] | undefined>;
45
+ /** Owner-bucket resolution metadata for the Shared tab, populated by the root listing fetch. */
46
+ sharedRootMetaRef: React.RefObject<Map<string, SharedRootMeta>>;
47
+ /** Imperatively navigates the current folder — used by mutations after a rename/delete of the browsed folder. */
48
+ setFolderPath: React.Dispatch<React.SetStateAction<string>>;
49
+ /**
50
+ * Deletes the given API-path cache keys so the next listing fetch/expand for
51
+ * that folder re-fetches from the server. The only way sibling sub-hooks may
52
+ * invalidate the shared cache (design.md D1).
53
+ */
54
+ invalidateFolders: (apiPaths: string[]) => void;
55
+ /** Merges a just-created folder into its parent's cache entry (optimistic display for create-folder). */
56
+ mergeCreatedFolder: (parentApiPath: string, created: CreateFolderResponseDto, inheritedPermissions?: string[]) => void;
57
+ /** Forces the listing effect to re-fetch the currently browsed folder. */
58
+ bumpRetry: () => void;
59
+ }
60
+ /**
61
+ * Manages DIAL file-storage browsing state: folder listing/navigation, the
62
+ * tree's expand/collapse state, search, and the shared per-folder cache that
63
+ * `useDialFileUploadBatch`/`useDialFileMutations`/`useDialFileSharing` invalidate
64
+ * through `invalidateFolders`/`bumpRetry` after their own mutations settle
65
+ * (design.md D1) — this hook is the sole owner/writer of that cache.
66
+ *
67
+ * Supports three listing sources via `activeTab`:
68
+ * - my_files: user's own bucket via `DialFilesApi.listFiles`
69
+ * - shared: files shared with the user via `DialFilesApi.listSharedFiles`
70
+ * - organization: public bucket via `DialFilesApi.listPublicFiles`
71
+ */
72
+ export declare const useDialFileListing: ({ filesApi, bucket, rootLabel, activeTab, onNotification, }: UseDialFileListingOptions) => UseDialFileListingResult;
73
+ //# sourceMappingURL=useDialFileListing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDialFileListing.d.ts","sourceRoot":"","sources":["../../../src/files/useDialFileListing/useDialFileListing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,gBAAgB,EACjB,MAAM,+BAA+B,CAAC;AAEvC,OAA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qB,EAAE,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;IACpD,uBAAuB,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACrD,uBAAuB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACrC,eAAe,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACtC,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7B,aAAa,EAAE,QAAQ,GAAG,SAAS,CAAC;IACpC,+GAA+G;IAC/G,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,EAAE,CAAC,CAAC;IACvC,sHAAsH;IACtH,uBAAuB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC;IAC3D,gGAAgG;IAChG,iBAAiB,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC;IAChE,iHAAiH;IACjH,aAAa,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IAC5D;;;;OAIG;IACH,iBAAiB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAChD,yGAAyG;IACzG,kBAAkB,EAAE,CAClB,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,uBAAuB,EAChC,oBAAoB,CAAC,EAAE,MAAM,EAAE,KAC5B,IAAI,CAAC;IACV,0EAA0E;IAC1E,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kBAAkB,GAAI,6DAMhC,yBAAyB,KAAG,wBA+lB9B,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { UseDialFileManagerOptions, UseDialFileManagerResult } from '../dial-file-manager.types';
2
+ export type { UseDialFileManagerOptions, UseDialFileManagerResult, } from '../dial-file-manager.types';
3
+ /**
4
+ * Composes the five file-manager sub-hooks — listing/navigation, upload
5
+ * batches, CRUD mutations, sharing, and metadata — into the single flat
6
+ * result `DialFileManagerShell`/`DialFileManagerModal`/`DialFileManagerPage`
7
+ * consume. Cache ownership and cross-hook invalidation stay inside
8
+ * `useDialFileListing`; this composer only wires that hook's
9
+ * `invalidateFolders`/`bumpRetry` into its siblings and derives the handful
10
+ * of tab/actionProfile UI fields that read outputs from more than one
11
+ * sub-hook. Imports neither `react-i18next` nor any application context —
12
+ * every translated string reaches it through `labels`,
13
+ * `disabledNewButtonTooltip`, and `buildValidationErrorMessage`.
14
+ */
15
+ export declare const useDialFileManager: ({ filesApi, bucket, rootLabel, activeTab, onNotification, onOperationSuccess, forbiddenSymbolsRegExp, variant, actionProfile, labels, locale, disabledNewButtonTooltip, downloadDestination, buildValidationErrorMessage, }: UseDialFileManagerOptions) => UseDialFileManagerResult;
16
+ //# sourceMappingURL=useDialFileManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDialFileManager.d.ts","sourceRoot":"","sources":["../../../src/files/useDialFileManager/useDialFileManager.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EACV,yBAAyB,EACzB,wBAAwB,EACzB,MAAM,4BAA4B,CAAC;AAYpC,YAAY,EACV,yBAAyB,EACzB,wBAAwB,GACzB,MAAM,4BAA4B,CAAC;AAEpC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kBAAkB,GAAI,6NAehC,yBAAyB,KAAG,wBA8M9B,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { DialFileManagerTabs, ToolbarOptions } from '@epam/ai-dial-react-file-manager';
2
+ import { TabModel } from '@epam/ai-dial-ui-kit';
3
+ /** Values returned by `useDialFileManagerTabConfig`. */
4
+ export interface UseDialFileManagerTabConfigResult {
5
+ tabs: ToolbarOptions['tabs'];
6
+ }
7
+ /**
8
+ * Filters the file-manager's tab list down to the host's configured set and
9
+ * resets `activeTab` to the highest-priority still-enabled tab when the
10
+ * current one becomes excluded. A `fileManagerTabs` of `undefined` means no
11
+ * restriction — every tab in `allTabs` stays enabled and no reset ever fires.
12
+ */
13
+ export declare const useDialFileManagerTabConfig: (activeTab: DialFileManagerTabs, onTabChange: (tab: DialFileManagerTabs) => void, allTabs: TabModel[] | undefined, fileManagerTabs: string[] | undefined) => UseDialFileManagerTabConfigResult;
14
+ //# sourceMappingURL=useDialFileManagerTabConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDialFileManagerTabConfig.d.ts","sourceRoot":"","sources":["../../../src/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,KAAK,cAAc,EACpB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGrD,wDAAwD;AACxD,MAAM,WAAW,iCAAiC;IAChD,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;CAC9B;AAaD;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,GACtC,WAAW,mBAAmB,EAC9B,aAAa,CAAC,GAAG,EAAE,mBAAmB,KAAK,IAAI,EAC/C,SAAS,QAAQ,EAAE,GAAG,SAAS,EAC/B,iBAAiB,MAAM,EAAE,GAAG,SAAS,KACpC,iCA4BF,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { DialFile } from '@epam/ai-dial-react-file-manager';
2
+ import { FileManagerNotification } from '../dial-file-manager.types';
3
+ import { DialFilesApi } from '../dial-files-api';
4
+ /** Options accepted by `useDialFileMetadata`. */
5
+ export interface UseDialFileMetadataOptions {
6
+ /** Injected operation port used for the metadata network call. */
7
+ filesApi: DialFilesApi;
8
+ /** DIAL Core bucket the current user browses (used only for my_files items). */
9
+ bucket: string;
10
+ /** Display name of the root folder node, used to resolve virtual paths back to API paths. */
11
+ rootLabel: string;
12
+ /** Called with a structured event when the metadata fetch fails. */
13
+ onNotification?: (notification: FileManagerNotification) => void;
14
+ }
15
+ /** Values returned by `useDialFileMetadata`. */
16
+ export interface UseDialFileMetadataResult {
17
+ fileMetadata: DialFile | undefined;
18
+ isFileMetadataLoading: boolean;
19
+ onGetInfo: (file: DialFile) => void;
20
+ clearMetadata: () => void;
21
+ }
22
+ /**
23
+ * Fetches and holds single-file metadata for `fileMetadataPopupOptions` —
24
+ * the only sub-hook with no interaction with the shared listing cache, since
25
+ * viewing metadata never mutates listing state.
26
+ */
27
+ export declare const useDialFileMetadata: ({ filesApi, bucket, rootLabel, onNotification, }: UseDialFileMetadataOptions) => UseDialFileMetadataResult;
28
+ //# sourceMappingURL=useDialFileMetadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDialFileMetadata.d.ts","sourceRoot":"","sources":["../../../src/files/useDialFileMetadata/useDialFileMetadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAIjE,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGtD,iDAAiD;AACjD,MAAM,WAAW,0BAA0B;IACzC,kEAAkE;IAClE,QAAQ,EAAE,YAAY,CAAC;IACvB,gFAAgF;IAChF,MAAM,EAAE,MAAM,CAAC;IACf,6FAA6F;IAC7F,SAAS,EAAE,MAAM,CAAC;IAClB,oEAAoE;IACpE,cAAc,CAAC,EAAE,CAAC,YAAY,EAAE,uBAAuB,KAAK,IAAI,CAAC;CAClE;AAED,gDAAgD;AAChD,MAAM,WAAW,yBAAyB;IACxC,YAAY,EAAE,QAAQ,GAAG,SAAS,CAAC;IACnC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,SAAS,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IACpC,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,kDAKjC,0BAA0B,KAAG,yBA2C/B,CAAC"}
@@ -0,0 +1,68 @@
1
+ import { CreateFolderResponseDto } from '@epam/ai-dial-chat-api-client';
2
+ import { DialCopiedItem, DialDeletedItem, DialFile, DialUploadFileItem, DialFileManagerTabs } from '@epam/ai-dial-react-file-manager';
3
+ import { SharedRootMeta } from '../dial-file-manager.model';
4
+ import { FileManagerNotification, FileNameValidationError, FileOperationSuccessEvent } from '../dial-file-manager.types';
5
+ import { DialFilesApi } from '../dial-files-api';
6
+ import { DownloadDestinationHandlers } from '../download-destination';
7
+ /** Options accepted by `useDialFileMutations`. */
8
+ export interface UseDialFileMutationsOptions {
9
+ /** Injected operation port used for every mutation network call. */
10
+ filesApi: DialFilesApi;
11
+ /** DIAL Core bucket to browse (used only for the my_files tab). */
12
+ bucket: string;
13
+ /** Display name for the root folder node. */
14
+ rootLabel: string;
15
+ /** Active tab — drives owner-bucket resolution for the Shared tab. */
16
+ activeTab: DialFileManagerTabs;
17
+ /** Bucket-relative path of the currently browsed folder, owned by `useDialFileListing`. */
18
+ folderPath: string;
19
+ /** Currently browsed folder node, owned by `useDialFileListing`. */
20
+ currentFolder: DialFile | undefined;
21
+ /** Owner-bucket resolution metadata for the Shared tab, owned by `useDialFileListing`. */
22
+ sharedRootMetaRef: React.RefObject<Map<string, SharedRootMeta>>;
23
+ /** Read-only snapshot of `useDialFileListing`'s per-folder permissions cache. */
24
+ listingPermissionsCache: Map<string, string[] | undefined>;
25
+ /** Deletes the given API-path cache keys so the next fetch re-fetches them. */
26
+ invalidateFolders: (apiPaths: string[]) => void;
27
+ /** Forces `useDialFileListing`'s fetch effect to re-run. */
28
+ bumpRetry: () => void;
29
+ /** Merges a newly created folder into its parent's cache entry, owned by `useDialFileListing`. */
30
+ mergeCreatedFolder: (parentApiPath: string, created: CreateFolderResponseDto, inheritedPermissions?: string[]) => void;
31
+ /** Imperatively navigates the current folder after a rename/delete of the browsed folder. */
32
+ setFolderPath: React.Dispatch<React.SetStateAction<string>>;
33
+ /** Called when a mutation should surface a toast notification. */
34
+ onNotification?: (notification: FileManagerNotification) => void;
35
+ /** Called when a mutation succeeds, instead of invoking an application notification service directly. */
36
+ onOperationSuccess?: (event: FileOperationSuccessEvent) => void;
37
+ /** Host-injected browser "Save As"/auto-download seam for `onDownloadFiles`. */
38
+ downloadDestination: DownloadDestinationHandlers;
39
+ /** Regexp of characters forbidden in file/folder names beyond the path separator. */
40
+ forbiddenSymbolsRegExp?: RegExp;
41
+ }
42
+ /** Values returned by `useDialFileMutations`. */
43
+ export interface UseDialFileMutationsResult {
44
+ isCreatingFolder: boolean;
45
+ isDownloading: boolean;
46
+ isDeleting: boolean;
47
+ isRenaming: boolean;
48
+ isCopying: boolean;
49
+ isMoving: boolean;
50
+ onCreateFolder: (file: DialUploadFileItem, folderPath: string, fileId: string) => Promise<void>;
51
+ onCreateFolderValidate: (name: string, parentFolder: DialFile) => FileNameValidationError | null;
52
+ onDownloadFiles: (dialFiles: DialFile[]) => void;
53
+ onDeleteFiles: (items: DialDeletedItem[], sourceFolder: string) => void;
54
+ onRenameValidate: (value: string, item: DialFile) => FileNameValidationError | null;
55
+ onMoveToFiles: (items: DialCopiedItem[], sourceFolder: string, destinationFolder: string) => void;
56
+ onCopyFiles: (items: DialCopiedItem[], destinationFolder: string) => void;
57
+ cancelCopyMove: () => void;
58
+ }
59
+ /**
60
+ * Manages create-folder, download, delete, rename, copy, and move mutations.
61
+ * Every mutation invalidates the shared listing cache for its affected
62
+ * folders through `invalidateFolders`/`bumpRetry` rather than holding its own
63
+ * cache copy; create-folder additionally uses `mergeCreatedFolder` so a newly
64
+ * created folder appears immediately even when created from a
65
+ * destination-folder popup browsing a different folder than the outer grid.
66
+ */
67
+ export declare const useDialFileMutations: ({ filesApi, bucket, rootLabel, activeTab, folderPath, currentFolder, sharedRootMetaRef, listingPermissionsCache, invalidateFolders, bumpRetry, mergeCreatedFolder, setFolderPath, onNotification, onOperationSuccess, downloadDestination, forbiddenSymbolsRegExp, }: UseDialFileMutationsOptions) => UseDialFileMutationsResult;
68
+ //# sourceMappingURL=useDialFileMutations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDialFileMutations.d.ts","sourceRoot":"","sources":["../../../src/files/useDialFileMutations/useDialFileMutations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,uBAAuB,EAExB,MAAM,+BAA+B,CAAC;AAMvC,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,QAAQ,EACR,kBAAkB,EACnB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,mBAAmB,EAEpB,MAAM,kCAAkC,CAAC;AAe1C,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,uBAAuB,EACvB,uBAAuB,EACvB,yBAAyB,EAC1B,MAAM,4BAA4B,CAAC;AAMpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAO3E,kDAAkD;AAClD,MAAM,WAAW,2BAA2B;IAC1C,oEAAoE;IACpE,QAAQ,EAAE,YAAY,CAAC;IACvB,mEAAmE;IACnE,MAAM,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,SAAS,EAAE,MAAM,CAAC;IAClB,sEAAsE;IACtE,SAAS,EAAE,mBAAmB,CAAC;IAC/B,2FAA2F;IAC3F,UAAU,EAAE,MAAM,CAAC;IACnB,oEAAoE;IACpE,aAAa,EAAE,QAAQ,GAAG,SAAS,CAAC;IACpC,0FAA0F;IAC1F,iBAAiB,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC;IAChE,iFAAiF;IACjF,uBAAuB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC;IAC3D,+EAA+E;IAC/E,iB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,KAAK,IAAI,CAAC;IACxE,gBAAgB,EAAE,CAChB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,QAAQ,KACX,uBAAuB,GAAG,IAAI,CAAC;IACpC,aAAa,EAAE,CACb,KAAK,EAAE,cAAc,EAAE,EACvB,YAAY,EAAE,MAAM,EACpB,iBAAiB,EAAE,MAAM,KACtB,IAAI,CAAC;IACV,WAAW,EAAE,CAAC,KAAK,EAAE,cAAc,EAAE,EAAE,iBAAiB,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1E,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,GAAI,sQAiBlC,2BAA2B,KAAG,0BAqrBhC,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { DialFile } from '@epam/ai-dial-react-file-manager';
2
+ import { FileManagerNotification } from '../dial-file-manager.types';
3
+ import { DialFilesApi } from '../dial-files-api';
4
+ /** Options accepted by `useDialFileSharing`. */
5
+ export interface UseDialFileSharingOptions {
6
+ /** Injected operation port used for every sharing network call. */
7
+ filesApi: DialFilesApi;
8
+ /** DIAL Core bucket to browse (used only for the my_files tab). */
9
+ bucket: string;
10
+ /** Display name for the root folder node. */
11
+ rootLabel: string;
12
+ /** Forces `useDialFileListing`'s fetch effect to re-run after a mutation settles. */
13
+ bumpRetry: () => void;
14
+ /** Called when a sharing mutation fails and should surface a toast notification. */
15
+ onNotification?: (notification: FileManagerNotification) => void;
16
+ }
17
+ /** Values returned by `useDialFileSharing`. */
18
+ export interface UseDialFileSharingResult {
19
+ isUnsharing: boolean;
20
+ isRemovingAccess: boolean;
21
+ onUnshareFiles: (files: DialFile[]) => void;
22
+ onRemoveFilesAccess: (files: DialFile[]) => void;
23
+ }
24
+ /**
25
+ * Manages the unshare/remove-access mutations. Bumps `useDialFileListing`'s
26
+ * shared retry counter after each mutation settles rather than holding its
27
+ * own cache copy.
28
+ */
29
+ export declare const useDialFileSharing: ({ filesApi, bucket, rootLabel, bumpRetry, onNotification, }: UseDialFileSharingOptions) => UseDialFileSharingResult;
30
+ //# sourceMappingURL=useDialFileSharing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDialFileSharing.d.ts","sourceRoot":"","sources":["../../../src/files/useDialFileSharing/useDialFileSharing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAIjE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGtD,gDAAgD;AAChD,MAAM,WAAW,yBAAyB;IACxC,mEAAmE;IACnE,QAAQ,EAAE,YAAY,CAAC;IACvB,mEAAmE;IACnE,MAAM,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,SAAS,EAAE,MAAM,CAAC;IAClB,qFAAqF;IACrF,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,oFAAoF;IACpF,cAAc,CAAC,EAAE,CAAC,YAAY,EAAE,uBAAuB,KAAK,IAAI,CAAC;CAClE;AAED,+CAA+C;AAC/C,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,OAAO,CAAC;IACrB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,IAAI,CAAC;IAC5C,mBAAmB,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,IAAI,CAAC;CAClD;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,6DAMhC,yBAAyB,KAAG,wBAwE9B,CAAC"}
@@ -0,0 +1,45 @@
1
+ import { ListFilesItemDto } from '@epam/ai-dial-chat-api-client';
2
+ import { DialFile, DialUploadFileItem, DialFileManagerTabs } from '@epam/ai-dial-react-file-manager';
3
+ import { SharedRootMeta } from '../dial-file-manager.model';
4
+ import { FileManagerNotification, FileUploadValidationResult } from '../dial-file-manager.types';
5
+ import { DialFilesApi } from '../dial-files-api';
6
+ import { FileUploadBatchState } from '../upload-batch.types';
7
+ /** Options accepted by `useDialFileUploadBatch`. */
8
+ export interface UseDialFileUploadBatchOptions {
9
+ /** Injected operation port used for every upload network call. */
10
+ filesApi: DialFilesApi;
11
+ /** DIAL Core bucket to browse (used only for the my_files tab). */
12
+ bucket: string;
13
+ /** Display name for the root folder node. */
14
+ rootLabel: string;
15
+ /** Active tab — drives owner-bucket resolution for the Shared tab. */
16
+ activeTab: DialFileManagerTabs;
17
+ /** Read-only snapshot of `useDialFileListing`'s cache, used to decide overwrite vs. create-only upload mode. */
18
+ cache: Map<string, ListFilesItemDto[]>;
19
+ /** Owner-bucket resolution metadata for the Shared tab, owned by `useDialFileListing`. */
20
+ sharedRootMetaRef: React.RefObject<Map<string, SharedRootMeta>>;
21
+ /** Deletes the given API-path cache keys so the next fetch re-fetches them. */
22
+ invalidateFolders: (apiPaths: string[]) => void;
23
+ /** Forces `useDialFileListing`'s fetch effect to re-run. */
24
+ bumpRetry: () => void;
25
+ /** Called when an upload batch fails or completes and should surface a toast notification. */
26
+ onNotification?: (notification: FileManagerNotification) => void;
27
+ }
28
+ /** Values returned by `useDialFileUploadBatch`. */
29
+ export interface UseDialFileUploadBatchResult {
30
+ onUploadFiles: (files: DialUploadFileItem[], destinationFolder: string) => void;
31
+ onUploadArchive: (file: File, name: string, destinationFolder: string) => void;
32
+ onValidateUpload: (files: DialUploadFileItem[], existingFiles: DialFile[], destinationFolder: string) => Promise<FileUploadValidationResult>;
33
+ uploadBatchState: FileUploadBatchState | null;
34
+ cancelUpload: () => void;
35
+ clearUploadBatch: () => void;
36
+ }
37
+ /**
38
+ * Manages upload batches (single-file and ZIP-archive extraction), including
39
+ * concurrency-limited progress tracking and abort. Invalidates the shared
40
+ * listing cache for the destination folder through `invalidateFolders`/
41
+ * `bumpRetry` after a batch settles — it never holds its own copy of the
42
+ * cache.
43
+ */
44
+ export declare const useDialFileUploadBatch: ({ filesApi, bucket, rootLabel, activeTab, cache, sharedRootMetaRef, invalidateFolders, bumpRetry, onNotification, }: UseDialFileUploadBatchOptions) => UseDialFileUploadBatchResult;
45
+ //# sourceMappingURL=useDialFileUploadBatch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDialFileUploadBatch.d.ts","sourceRoot":"","sources":["../../../src/files/useDialFileUploadBatch/useDialFileUploadBatch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAEjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EACV,QAAQ,EACR,kBAAkB,EACnB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAKvE,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,uBAAuB,EACvB,0BAA0B,EAC3B,MAAM,4BAA4B,CAAC;AAGpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGtD,OAAO,KAAK,EACV,oBAAoB,EAErB,MAAM,uBAAuB,CAAC;AAwC/B,oDAAoD;AACpD,MAAM,WAAW,6BAA6B;IAC5C,kEAAkE;IAClE,QAAQ,EAAE,YAAY,CAAC;IACvB,mEAAmE;IACnE,MAAM,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,SAAS,EAAE,MAAM,CAAC;IAClB,sEAAsE;IACtE,SAAS,EAAE,mBAAmB,CAAC;IAC/B,gHAAgH;IAChH,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,EAAE,CAAC,CAAC;IACvC,0FAA0F;IAC1F,iBAAiB,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC;IAChE,+EAA+E;IAC/E,iBAAiB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAChD,4DAA4D;IAC5D,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,8FAA8F;IAC9F,cAAc,CAAC,EAAE,CAAC,YAAY,EAAE,uBAAuB,KAAK,IAAI,CAAC;CAClE;AAED,mDAAmD;AACnD,MAAM,WAAW,4BAA4B;IAC3C,aAAa,EAAE,CACb,KAAK,EAAE,kBAAkB,EAAE,EAC3B,iBAAiB,EAAE,MAAM,KACtB,IAAI,CAAC;IACV,eAAe,EAAE,CACf,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,MAAM,EACZ,iBAAiB,EAAE,MAAM,KACtB,IAAI,CAAC;IACV,gBAAgB,EAAE,CAChB,KAAK,EAAE,kBAAkB,EAAE,EAC3B,aAAa,EAAE,QAAQ,EAAE,EACzB,iBAAiB,EAAE,MAAM,KACtB,OAAO,CAAC,0BAA0B,CAAC,CAAC;IACzC,gBAAgB,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAC9C,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,gBAAgB,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,GAAI,qHAUpC,6BAA6B,KAAG,4BAgQlC,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { FileManagerGridRow } from '@epam/ai-dial-react-file-manager';
2
+ import { GridApi, IRowNode } from 'ag-grid-community';
3
+ /** Options accepted by `useGridEditingScroll`. */
4
+ export interface UseGridEditingScrollOptions {
5
+ /** Picks the row to scroll to among the rows newly added since the last `rowDataUpdated`. Defaults to the first row flagged `isTemporary`, or the first new row. */
6
+ resolveTargetNode?: (newNodes: IRowNode<FileManagerGridRow>[]) => IRowNode<FileManagerGridRow> | null;
7
+ }
8
+ /** Values returned by `useGridEditingScroll`. */
9
+ export interface UseGridEditingScrollResult {
10
+ /** Pass to `DialFileManager`'s `onGridApiChange` prop. */
11
+ handleGridApiChange: (api: GridApi<FileManagerGridRow>) => void;
12
+ /** Re-seeds the known-row-id set without scrolling — call on a data-source change such as a tab switch. */
13
+ reset: () => void;
14
+ }
15
+ /**
16
+ * `@epam/ai-dial-react-file-manager`'s `GridOptions` type does not forward raw AG Grid
17
+ * event callbacks (`onCellEditingStarted`/`onRowDataUpdated`), so this hook
18
+ * binds directly to the `GridApi` obtained via `DialFileManager`'s
19
+ * `onGridApiChange` prop and uses AG Grid's own `addEventListener` instead of
20
+ * a `gridOptions` fragment. Scrolls a newly inline-edited or newly-inserted
21
+ * row into view. `handleGridApiChange` takes the raw `GridApi` only to bind
22
+ * to `onGridApiChange` — the narrow AGENTS.md D9 exception for this hook —
23
+ * and never renders, themes, or otherwise exposes AG Grid beyond that one
24
+ * event-binding parameter.
25
+ */
26
+ export declare const useGridEditingScroll: ({ resolveTargetNode, }?: UseGridEditingScrollOptions) => UseGridEditingScrollResult;
27
+ //# sourceMappingURL=useGridEditingScroll.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGridEditingScroll.d.ts","sourceRoot":"","sources":["../../../src/files/useGridEditingScroll/useGridEditingScroll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAEL,OAAO,EACP,QAAQ,EAET,MAAM,mBAAmB,CAAC;AAmC3B,kDAAkD;AAClD,MAAM,WAAW,2BAA2B;IAC1C,oKAAoK;IACpK,iBAAiB,CAAC,EAAE,CAClB,QAAQ,EAAE,QAAQ,CAAC,kBAAkB,CAAC,EAAE,KACrC,QAAQ,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC;CAC1C;AAOD,iDAAiD;AACjD,MAAM,WAAW,0BAA0B;IACzC,0DAA0D;IAC1D,mBAAmB,EAAE,CAAC,GAAG,EAAE,OAAO,CAAC,kBAAkB,CAAC,KAAK,IAAI,CAAC;IAChE,2GAA2G;IAC3G,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB,GAAI,yBAElC,2BAAgC,KAAG,0BAiFrC,CAAC"}
package/index.d.ts CHANGED
@@ -17,6 +17,24 @@ export { getConversationPath } from './conversation/useConversationStream/conver
17
17
  export { isAwaitingGenerationResume } from './conversation/useConversationStream/generation-resume';
18
18
  export * from './conversation/useConversationStream/useConversationStream';
19
19
  export * from './conversation-sources/useConversationSources/useConversationSources';
20
+ export * from './files/dial-files-api';
21
+ export * from './files/dial-file-manager.types';
22
+ export * from './files/dial-file-manager.model';
23
+ export * from './files/dial-file-manager-copy-move.util';
24
+ export * from './files/dial-file-manager-mapping.util';
25
+ export * from './files/dial-file-manager-path.util';
26
+ export * from './files/download-destination';
27
+ export * from './files/file-manager-variant';
28
+ export { sanitizeFileName } from './files/file-name';
29
+ export * from './files/upload-batch.types';
30
+ export * from './files/useDialFileListing/useDialFileListing';
31
+ export * from './files/useDialFileManager/useDialFileManager';
32
+ export * from './files/useDialFileManagerTabConfig/useDialFileManagerTabConfig';
33
+ export * from './files/useDialFileMetadata/useDialFileMetadata';
34
+ export * from './files/useDialFileMutations/useDialFileMutations';
35
+ export * from './files/useDialFileSharing/useDialFileSharing';
36
+ export * from './files/useDialFileUploadBatch/useDialFileUploadBatch';
37
+ export * from './files/useGridEditingScroll/useGridEditingScroll';
20
38
  export * from './useChatSettingsFormConfig/useChatSettingsFormConfig';
21
39
  export * from './usePageFileDrag/usePageFileDrag';
22
40
  export * from './usePanelMaxWidth/usePanelMaxWidth';
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sDAAsD,CAAC;AACrE,cAAc,8DAA8D,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,0DAA0D,CAAC;AAC3F,OAAO,EACL,YAAY,EACZ,aAAa,GACd,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0DAA0D,CAAC;AAChG,cAAc,4CAA4C,CAAC;AAC3D,cAAc,wDAAwD,CA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