@epam/ai-dial-chat-hooks 1.2.5 → 1.3.0-dev.102
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/catalog/catalog-derivations.d.ts +1 -1
- package/catalog/catalog-derivations.d.ts.map +1 -1
- package/catalog/catalog-derivations.js +1 -1
- package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.d.ts +8 -1
- package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.d.ts.map +1 -1
- package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.js +57 -38
- package/conversation/conversation-draft/conversation-draft-store.d.ts +21 -0
- package/conversation/conversation-draft/conversation-draft-store.d.ts.map +1 -0
- package/conversation/conversation-draft/conversation-draft-store.js +84 -0
- package/conversation/conversation-draft/conversation-draft.d.ts +48 -0
- package/conversation/conversation-draft/conversation-draft.d.ts.map +1 -0
- package/conversation/create-chat-stream-api.d.ts +6 -0
- package/conversation/create-chat-stream-api.d.ts.map +1 -1
- package/conversation/create-chat-stream-api.js +28 -23
- package/conversation/useConversationComposerDraft/useConversationComposerDraft.d.ts +39 -0
- package/conversation/useConversationComposerDraft/useConversationComposerDraft.d.ts.map +1 -0
- package/conversation/useConversationComposerDraft/useConversationComposerDraft.js +132 -0
- package/conversation/useConversationStream/useConversationStream.d.ts.map +1 -1
- package/conversation/useConversationStream/useConversationStream.js +233 -219
- package/conversation.js +34 -32
- package/entry-points/conversation.d.ts +3 -0
- package/entry-points/conversation.d.ts.map +1 -1
- package/entry-points/offline-credentials.d.ts +5 -0
- package/entry-points/offline-credentials.d.ts.map +1 -0
- package/entry-points/scheduled-tasks.d.ts +1 -0
- package/entry-points/scheduled-tasks.d.ts.map +1 -1
- package/file-manager.js +21 -21
- package/files/dial-file-manager-mapping.util.d.ts +17 -1
- package/files/dial-file-manager-mapping.util.d.ts.map +1 -1
- package/files/dial-file-manager-mapping.util.js +77 -62
- package/files/useDialFileListing/useDialFileListing.d.ts.map +1 -1
- package/files/useDialFileListing/useDialFileListing.js +56 -53
- package/files/useDialFileMutations/useDialFileMutations.d.ts.map +1 -1
- package/files/useDialFileMutations/useDialFileMutations.js +206 -204
- package/index.d.ts +8 -0
- package/index.d.ts.map +1 -1
- package/index.js +131 -124
- package/mcp-apps/mcp-apps-api-client.d.ts.map +1 -1
- package/mcp-apps/mcp-apps-api-client.js +18 -17
- package/mcp-apps/useMcpAppTools/useMcpAppTools.d.ts.map +1 -1
- package/mcp-apps/useMcpAppTools/useMcpAppTools.js +29 -29
- package/oauth/popup.d.ts.map +1 -1
- package/oauth/popup.js +19 -17
- package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.d.ts.map +1 -1
- package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.js +40 -38
- package/offline-credentials/map-offline-credentials-response.d.ts +17 -0
- package/offline-credentials/map-offline-credentials-response.d.ts.map +1 -0
- package/offline-credentials/map-offline-credentials-response.js +15 -0
- package/offline-credentials/useOfflineCredentialsAuth/useOfflineCredentialsAuth.d.ts +58 -0
- package/offline-credentials/useOfflineCredentialsAuth/useOfflineCredentialsAuth.d.ts.map +1 -0
- package/offline-credentials/useOfflineCredentialsAuth/useOfflineCredentialsAuth.js +37 -0
- package/offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate.d.ts +57 -0
- package/offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate.d.ts.map +1 -0
- package/offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate.js +34 -0
- package/offline-credentials/useOfflineCredentialsLogin/useOfflineCredentialsLogin.d.ts +28 -0
- package/offline-credentials/useOfflineCredentialsLogin/useOfflineCredentialsLogin.d.ts.map +1 -0
- package/offline-credentials/useOfflineCredentialsLogin/useOfflineCredentialsLogin.js +29 -0
- package/offline-credentials.d.ts +2 -0
- package/offline-credentials.js +5 -0
- package/package.json +23 -18
- package/scheduled-task/check-scheduled-task-auth-session-error.d.ts +27 -0
- package/scheduled-task/check-scheduled-task-auth-session-error.d.ts.map +1 -0
- package/scheduled-task/check-scheduled-task-auth-session-error.js +17 -0
- package/scheduled-tasks.js +2 -1
- package/shared/application-schema.d.ts +0 -2
- package/shared/application-schema.d.ts.map +1 -1
- package/shared/application-schema.js +2 -2
- package/useShareLink/useShareLink.d.ts.map +1 -1
- package/useShareLink/useShareLink.js +1 -0
- package/utils.js +10 -10
package/conversation.js
CHANGED
|
@@ -1,33 +1,35 @@
|
|
|
1
1
|
import { buildAnnouncementSignature as e, hasAnnouncementContent as t, hasStructuredAnnouncement as n, sanitizeAnnouncementHtml as r, sanitizeAnnouncementMessageHtml as i } from "./conversation/announcement-message.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
|
|
2
|
+
import { createMemoryConversationDraftStore as a, createWebStorageConversationDraftStore as o } from "./conversation/conversation-draft/conversation-draft-store.js";
|
|
3
|
+
import { DEFAULT_GENERATION_CONFLICT_MESSAGE as s, DEFAULT_GENERATION_PERSISTENCE_ERROR_MESSAGE as c, DEFAULT_STREAM_IDLE_TIMEOUT_MS as l, GenerationConflictError as u, GenerationPersistenceError as d, StopCompletionError as f, StreamInterruptedError as p, StreamUpstreamError as m, createChatStreamApi as h } from "./conversation/create-chat-stream-api.js";
|
|
4
|
+
import { shouldWatchForDisplayNameUpdate as g } from "./conversation/display-name-watch.js";
|
|
5
|
+
import { formatAppVersion as _, sanitizeFooterHtml as v } from "./conversation/footer-message.js";
|
|
6
|
+
import { findDeploymentForConversationId as y, getModelIdCandidatesFromConversationId as b, getModelIdFromConversationId as x } from "./conversation/get-model-id-from-conversation-id.js";
|
|
7
|
+
import { getTimeOfDayGreeting as S } from "./conversation/greeting.js";
|
|
8
|
+
import { createDeploymentChangedMessage as C } from "./conversation/message-factory.js";
|
|
9
|
+
import { getFormSchemaToolSyncKey as w, getLastDeploymentId as T, getLastUserMessageToolConfiguration as E, getLatestToolConfiguration as D, getToolConfigurationFromFormSchema as O, isMessageStreaming as k, messageHasStages as A, normalizeResponseFormat as j } from "./conversation/message-utils.js";
|
|
10
|
+
import { getQuickAppConversationStarters as M } from "./conversation/quick-app-conversation-starters.js";
|
|
11
|
+
import { mapStages as N, toStage as P } from "./conversation/stage.js";
|
|
12
|
+
import { getStarterPopulateText as F, getStartersFromSchema as I } from "./conversation/starter-option.js";
|
|
13
|
+
import { deriveConversationRowActionState as L } from "./conversation/deriveConversationRowActionState/deriveConversationRowActionState.js";
|
|
14
|
+
import { useActiveConversationSync as R } from "./conversation/useActiveConversationSync/useActiveConversationSync.js";
|
|
15
|
+
import { useAsyncConfirmDialog as z } from "./conversation/useAsyncConfirmDialog/useAsyncConfirmDialog.js";
|
|
16
|
+
import { useConversationComposerDraft as B } from "./conversation/useConversationComposerDraft/useConversationComposerDraft.js";
|
|
17
|
+
import { useConversationLookupMaps as V } from "./conversation/useConversationLookupMaps/useConversationLookupMaps.js";
|
|
18
|
+
import { getConversationSource as H, useConversationPanelItems as U } from "./conversation/useConversationPanelItems/useConversationPanelItems.js";
|
|
19
|
+
import { useImportFilePicker as W } from "./conversation/useImportFilePicker/useImportFilePicker.js";
|
|
20
|
+
import { useMessageSelectionReply as G } from "./conversation/useMessageSelectionReply/useMessageSelectionReply.js";
|
|
21
|
+
import { useAttachmentUpload as K } from "./conversation/useAttachmentUpload/useAttachmentUpload.js";
|
|
22
|
+
import { AudioTranscriptionError as q, AudioTranscriptionErrorReason as J } from "./conversation/useTranscribeAudio/audio-transcription-error.js";
|
|
23
|
+
import { useTranscribeAudio as Y } from "./conversation/useTranscribeAudio/useTranscribeAudio.js";
|
|
24
|
+
import { attachmentToDto as X, attachmentsToDtos as Z } from "./conversation/useConversationHandlers/attachment-to-dto.js";
|
|
25
|
+
import { createMessagePair as Q } from "./conversation/useConversationHandlers/message-factory.js";
|
|
26
|
+
import { hasActiveToolConfig as $, isAnswerIncomplete as ee, isMessageChanged as te, shouldRerunGenerationOnEdit as ne } from "./conversation/useConversationHandlers/message-utils.js";
|
|
27
|
+
import { getStarterConversationText as re, getStarterDisplayText as ie, getStarterSubmitText as ae } from "./conversation/useConversationHandlers/starter-option.js";
|
|
28
|
+
import { getConversationPath as oe } from "./conversation/useConversationStream/conversation-path.js";
|
|
29
|
+
import { useConversationHandlers as se } from "./conversation/useConversationHandlers/useConversationHandlers.js";
|
|
30
|
+
import { applyChunkToMessages as ce, mergeStages as le } from "./conversation/useConversationStream/apply-chunk.js";
|
|
31
|
+
import { isAwaitingGenerationResume as ue } from "./conversation/useConversationStream/generation-resume.js";
|
|
32
|
+
import { useConversationStream as de } from "./conversation/useConversationStream/useConversationStream.js";
|
|
33
|
+
import { useChatSettingsFormConfig as fe } from "./useChatSettingsFormConfig/useChatSettingsFormConfig.js";
|
|
34
|
+
import { useToolsMenu as pe } from "./useToolsMenu/useToolsMenu.js";
|
|
35
|
+
export { q as AudioTranscriptionError, J as AudioTranscriptionErrorReason, s as DEFAULT_GENERATION_CONFLICT_MESSAGE, c as DEFAULT_GENERATION_PERSISTENCE_ERROR_MESSAGE, l as DEFAULT_STREAM_IDLE_TIMEOUT_MS, u as GenerationConflictError, d as GenerationPersistenceError, f as StopCompletionError, p as StreamInterruptedError, m as StreamUpstreamError, ce as applyChunkToMessages, X as attachmentToDto, Z as attachmentsToDtos, e as buildAnnouncementSignature, h as createChatStreamApi, C as createDeploymentChangedMessage, a as createMemoryConversationDraftStore, Q as createMessagePair, o as createWebStorageConversationDraftStore, L as deriveConversationRowActionState, y as findDeploymentForConversationId, _ as formatAppVersion, oe as getConversationPath, H as getConversationSource, w as getFormSchemaToolSyncKey, T as getLastDeploymentId, E as getLastUserMessageToolConfiguration, D as getLatestToolConfiguration, b as getModelIdCandidatesFromConversationId, x as getModelIdFromConversationId, M as getQuickAppConversationStarters, re as getStarterConversationText, ie as getStarterDisplayText, F as getStarterPopulateText, ae as getStarterSubmitText, I as getStartersFromSchema, S as getTimeOfDayGreeting, O as getToolConfigurationFromFormSchema, $ as hasActiveToolConfig, t as hasAnnouncementContent, n as hasStructuredAnnouncement, ee as isAnswerIncomplete, ue as isAwaitingGenerationResume, te as isMessageChanged, k as isMessageStreaming, N as mapStages, le as mergeStages, A as messageHasStages, j as normalizeResponseFormat, r as sanitizeAnnouncementHtml, i as sanitizeAnnouncementMessageHtml, v as sanitizeFooterHtml, ne as shouldRerunGenerationOnEdit, g as shouldWatchForDisplayNameUpdate, P as toStage, R as useActiveConversationSync, z as useAsyncConfirmDialog, K as useAttachmentUpload, fe as useChatSettingsFormConfig, B as useConversationComposerDraft, se as useConversationHandlers, V as useConversationLookupMaps, U as useConversationPanelItems, de as useConversationStream, W as useImportFilePicker, G as useMessageSelectionReply, pe as useToolsMenu, Y as useTranscribeAudio };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export * from '../conversation/announcement-message';
|
|
2
|
+
export * from '../conversation/conversation-draft/conversation-draft';
|
|
3
|
+
export * from '../conversation/conversation-draft/conversation-draft-store';
|
|
2
4
|
export * from '../conversation/create-chat-stream-api';
|
|
3
5
|
export * from '../conversation/display-name-watch';
|
|
4
6
|
export * from '../conversation/footer-message';
|
|
@@ -13,6 +15,7 @@ export * from '../conversation/starter-option';
|
|
|
13
15
|
export * from '../conversation/deriveConversationRowActionState/deriveConversationRowActionState';
|
|
14
16
|
export * from '../conversation/useActiveConversationSync/useActiveConversationSync';
|
|
15
17
|
export * from '../conversation/useAsyncConfirmDialog/useAsyncConfirmDialog';
|
|
18
|
+
export * from '../conversation/useConversationComposerDraft/useConversationComposerDraft';
|
|
16
19
|
export * from '../conversation/useConversationLookupMaps/useConversationLookupMaps';
|
|
17
20
|
export * from '../conversation/useConversationPanelItems/useConversationPanelItems';
|
|
18
21
|
export * from '../conversation/useImportFilePicker/useImportFilePicker';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../src/entry-points/conversation.ts"],"names":[],"mappings":"AAAA,cAAc,sCAAsC,CAAC;AACrD,cAAc,wCAAwC,CAAC;AACvD,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mDAAmD,CAAC;AAClE,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mEAAmE,CAAC;AAClF,cAAc,iDAAiD,CAAC;AAChE,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mFAAmF,CAAC;AAClG,cAAc,qEAAqE,CAAC;AACpF,cAAc,6DAA6D,CAAC;AAC5E,cAAc,qEAAqE,CAAC;AACpF,cAAc,qEAAqE,CAAC;AACpF,cAAc,yDAAyD,CAAC;AACxE,cAAc,yDAAyD,CAAC;AACxE,cAAc,8DAA8D,CAAC;AAC7E,cAAc,uDAAuD,CAAC;AACtE,OAAO,EACL,iBAAiB,EACjB,eAAe,GAChB,MAAM,2DAA2D,CAAC;AACnE,OAAO,EACL,iBAAiB,EACjB,KAAK,WAAW,GACjB,MAAM,yDAAyD,CAAC;AACjE,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,2BAA2B,GAC5B,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EACL,0BAA0B,EAC1B,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,wDAAwD,CAAC;AAChE,cAAc,iEAAiE,CAAC;AAChF,OAAO,EACL,oBAAoB,EACpB,WAAW,GACZ,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yDAAyD,CAAC;AAC9F,OAAO,EAAE,0BAA0B,EAAE,MAAM,yDAAyD,CAAC;AACrG,cAAc,6DAA6D,CAAC;AAC5E,cAAc,wDAAwD,CAAC;AACvE,cAAc,8BAA8B,CAAC"}
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../src/entry-points/conversation.ts"],"names":[],"mappings":"AAAA,cAAc,sCAAsC,CAAC;AACrD,cAAc,uDAAuD,CAAC;AACtE,cAAc,6DAA6D,CAAC;AAC5E,cAAc,wCAAwC,CAAC;AACvD,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mDAAmD,CAAC;AAClE,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mEAAmE,CAAC;AAClF,cAAc,iDAAiD,CAAC;AAChE,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mFAAmF,CAAC;AAClG,cAAc,qEAAqE,CAAC;AACpF,cAAc,6DAA6D,CAAC;AAC5E,cAAc,2EAA2E,CAAC;AAC1F,cAAc,qEAAqE,CAAC;AACpF,cAAc,qEAAqE,CAAC;AACpF,cAAc,yDAAyD,CAAC;AACxE,cAAc,yDAAyD,CAAC;AACxE,cAAc,8DAA8D,CAAC;AAC7E,cAAc,uDAAuD,CAAC;AACtE,OAAO,EACL,iBAAiB,EACjB,eAAe,GAChB,MAAM,2DAA2D,CAAC;AACnE,OAAO,EACL,iBAAiB,EACjB,KAAK,WAAW,GACjB,MAAM,yDAAyD,CAAC;AACjE,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,2BAA2B,GAC5B,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EACL,0BAA0B,EAC1B,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,wDAAwD,CAAC;AAChE,cAAc,iEAAiE,CAAC;AAChF,OAAO,EACL,oBAAoB,EACpB,WAAW,GACZ,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yDAAyD,CAAC;AAC9F,OAAO,EAAE,0BAA0B,EAAE,MAAM,yDAAyD,CAAC;AACrG,cAAc,6DAA6D,CAAC;AAC5E,cAAc,wDAAwD,CAAC;AACvE,cAAc,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from '../offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate';
|
|
2
|
+
export * from '../offline-credentials/useOfflineCredentialsLogin/useOfflineCredentialsLogin';
|
|
3
|
+
export * from '../offline-credentials/useOfflineCredentialsAuth/useOfflineCredentialsAuth';
|
|
4
|
+
export * from '../offline-credentials/map-offline-credentials-response';
|
|
5
|
+
//# sourceMappingURL=offline-credentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"offline-credentials.d.ts","sourceRoot":"","sources":["../../src/entry-points/offline-credentials.ts"],"names":[],"mappings":"AAAA,cAAc,4EAA4E,CAAC;AAC3F,cAAc,8EAA8E,CAAC;AAC7F,cAAc,4EAA4E,CAAC;AAC3F,cAAc,yDAAyD,CAAC"}
|
|
@@ -3,6 +3,7 @@ export * from '../scheduled-task/scheduled-task-description';
|
|
|
3
3
|
export * from '../scheduled-task/scheduled-task-preparation';
|
|
4
4
|
export * from '../scheduled-task/scheduled-tasks-api-client';
|
|
5
5
|
export * from '../scheduled-task/scheduled-task-trigger';
|
|
6
|
+
export * from '../scheduled-task/check-scheduled-task-auth-session-error';
|
|
6
7
|
export * from '../scheduled-task/use-scheduled-tasks';
|
|
7
8
|
export * from '../scheduled-task/use-scheduled-task-runs';
|
|
8
9
|
//# sourceMappingURL=scheduled-tasks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduled-tasks.d.ts","sourceRoot":"","sources":["../../src/entry-points/scheduled-tasks.ts"],"names":[],"mappings":"AAAA,cAAc,0CAA0C,CAAC;AACzD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,0CAA0C,CAAC;AACzD,cAAc,uCAAuC,CAAC;AACtD,cAAc,2CAA2C,CAAC"}
|
|
1
|
+
{"version":3,"file":"scheduled-tasks.d.ts","sourceRoot":"","sources":["../../src/entry-points/scheduled-tasks.ts"],"names":[],"mappings":"AAAA,cAAc,0CAA0C,CAAC;AACzD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,0CAA0C,CAAC;AACzD,cAAc,2DAA2D,CAAC;AAC1E,cAAc,uCAAuC,CAAC;AACtD,cAAc,2CAA2C,CAAC"}
|
package/file-manager.js
CHANGED
|
@@ -7,24 +7,24 @@ import { COLUMNS_MY_FILES as m, COLUMNS_ORGANIZATION as h, COLUMNS_SHARED as g,
|
|
|
7
7
|
import { buildSharedItemVirtualPath as C, dialCorePathToRelative as w, findDialFileByPath as T, findFolderByVirtualPath as E, formatOperationFolderName as D, getVirtualPathName as O, hasDialFileWritePermission as k, hasForbiddenNameSymbols as A, hasSamePaths as j, isCopyMoveDuplicateAllowed as M, isShareActionsAllowed as N, normalizeVirtualPath as P, parseNewFolderVirtualPath as F, resolveOwnerCoords as I, resolveSectionByPath as L, unionPathSets as R, withRoutableRootLabels as z } from "./files/dial-file-manager-path.util.js";
|
|
8
8
|
import { resolveDialFileApiPath as B, virtualPathToApiPath as V } from "./files/resolve-dial-file-api-path.js";
|
|
9
9
|
import { prepareCopyItems as H, prepareMoveRenameItems as U } from "./files/dial-file-manager-copy-move.util.js";
|
|
10
|
-
import { buildFromCache as W,
|
|
11
|
-
import { createFilesApiClient as
|
|
12
|
-
import { createUploadFileWithProgress as
|
|
13
|
-
import { openAnnotationAttachment as
|
|
14
|
-
import { getUrlFileName as
|
|
15
|
-
import { annotationToDisplayAttachment as
|
|
16
|
-
import { dialFileToAttachment as
|
|
17
|
-
import { DownloadDestinationType as
|
|
18
|
-
import { prepareDownloadDestination as
|
|
19
|
-
import { deriveActionProfile as
|
|
20
|
-
import { useDialFileListing as
|
|
21
|
-
import { useDialFileMetadata as
|
|
22
|
-
import { useDialFileMutations as
|
|
23
|
-
import { useDialFileSharing as
|
|
24
|
-
import { useDialFileUploadBatch as
|
|
25
|
-
import { useDialFileManager as
|
|
26
|
-
import { useDialFileManagerSections as
|
|
27
|
-
import { useDialFileManagerTabConfig as
|
|
28
|
-
import { useFileAttachmentPicker as
|
|
29
|
-
import { useGridEditingScroll as
|
|
30
|
-
export { m as COLUMNS_MY_FILES, h as COLUMNS_ORGANIZATION, g as COLUMNS_SHARED, _ as CORE_PERMISSION_MAP, v as DATE_OPTIONS, y as DIAL_FILE_MANAGER_SECTION_TABS, u as DialFilesApiUploadMode,
|
|
10
|
+
import { buildFromCache as W, buildSharedSearchScope as G, fetchByTab as K, fetchForSearch as q, findFirstSuccessfulCopyMoveItem as J, mapCorePermissions as Y, mapFileMetadataToDialFile as X, mapSearchItem as Z, mergeCreatedFolderIntoCache as Q, updateEntry as $ } from "./files/dial-file-manager-mapping.util.js";
|
|
11
|
+
import { createFilesApiClient as ee } from "./files/create-files-api.js";
|
|
12
|
+
import { createUploadFileWithProgress as te } from "./files/create-upload-file-with-progress.js";
|
|
13
|
+
import { openAnnotationAttachment as ne } from "./files/annotation.js";
|
|
14
|
+
import { getUrlFileName as re, isExternalSourcePreviewable as ie, resolveExternalSourceContentType as ae } from "./files/source-content.js";
|
|
15
|
+
import { annotationToDisplayAttachment as oe, attachmentDtoToDisplayAttachment as se, attachmentDtosToDisplayAttachments as ce } from "./files/attachment-dto-to-display.js";
|
|
16
|
+
import { dialFileToAttachment as le, dialFilesToAttachments as ue, dialFolderPathToAttachment as de } from "./files/dial-file-to-attachment.js";
|
|
17
|
+
import { DownloadDestinationType as fe } from "./files/download-destination.js";
|
|
18
|
+
import { prepareDownloadDestination as pe } from "./files/prepare-download-destination.js";
|
|
19
|
+
import { deriveActionProfile as me } from "./files/file-manager-variant.js";
|
|
20
|
+
import { useDialFileListing as he } from "./files/useDialFileListing/useDialFileListing.js";
|
|
21
|
+
import { useDialFileMetadata as ge } from "./files/useDialFileMetadata/useDialFileMetadata.js";
|
|
22
|
+
import { useDialFileMutations as _e } from "./files/useDialFileMutations/useDialFileMutations.js";
|
|
23
|
+
import { useDialFileSharing as ve } from "./files/useDialFileSharing/useDialFileSharing.js";
|
|
24
|
+
import { useDialFileUploadBatch as ye } from "./files/useDialFileUploadBatch/useDialFileUploadBatch.js";
|
|
25
|
+
import { useDialFileManager as be } from "./files/useDialFileManager/useDialFileManager.js";
|
|
26
|
+
import { useDialFileManagerSections as xe } from "./files/useDialFileManagerSections/useDialFileManagerSections.js";
|
|
27
|
+
import { useDialFileManagerTabConfig as Se } from "./files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js";
|
|
28
|
+
import { useFileAttachmentPicker as Ce } from "./files/useFileAttachmentPicker/useFileAttachmentPicker.js";
|
|
29
|
+
import { useGridEditingScroll as we } from "@epam/ai-dial-chat-shared";
|
|
30
|
+
export { m as COLUMNS_MY_FILES, h as COLUMNS_ORGANIZATION, g as COLUMNS_SHARED, _ as CORE_PERMISSION_MAP, v as DATE_OPTIONS, y as DIAL_FILE_MANAGER_SECTION_TABS, u as DialFilesApiUploadMode, fe as DownloadDestinationType, d as FileManagerNotificationReason, f as FileNameValidationErrorReason, p as FileOperationKind, b as PATH_SEPARATOR_REGEXP, x as RESERVED_MARKER_NAME, S as UPLOAD_CONCURRENCY, oe as annotationToDisplayAttachment, se as attachmentDtoToDisplayAttachment, ce as attachmentDtosToDisplayAttachments, W as buildFromCache, C as buildSharedItemVirtualPath, G as buildSharedSearchScope, ee as createFilesApiClient, te as createUploadFileWithProgress, me as deriveActionProfile, w as dialCorePathToRelative, le as dialFileToAttachment, ue as dialFilesToAttachments, de as dialFolderPathToAttachment, K as fetchByTab, q as fetchForSearch, T as findDialFileByPath, J as findFirstSuccessfulCopyMoveItem, E as findFolderByVirtualPath, D as formatOperationFolderName, re as getUrlFileName, O as getVirtualPathName, k as hasDialFileWritePermission, A as hasForbiddenNameSymbols, j as hasSamePaths, M as isCopyMoveDuplicateAllowed, r as isDialFileAcceptType, e as isDialFileId, ie as isExternalSourcePreviewable, N as isShareActionsAllowed, Y as mapCorePermissions, X as mapFileMetadataToDialFile, Z as mapSearchItem, Q as mergeCreatedFolderIntoCache, i as mimeTypesToAttachmentExtensionLabels, a as mimeTypesToDialFileAcceptTypes, o as mimeTypesToFileAccept, P as normalizeVirtualPath, ne as openAnnotationAttachment, F as parseNewFolderVirtualPath, H as prepareCopyItems, pe as prepareDownloadDestination, U as prepareMoveRenameItems, B as resolveDialFileApiPath, t as resolveDialFileBucketAndPath, ae as resolveExternalSourceContentType, I as resolveOwnerCoords, n as resolveRelativeDialFilePath, L as resolveSectionByPath, s as sanitizeFileName, c as splitFileNameExtension, l as trimFileNameToByteLimit, R as unionPathSets, $ as updateEntry, he as useDialFileListing, be as useDialFileManager, xe as useDialFileManagerSections, Se as useDialFileManagerTabConfig, ge as useDialFileMetadata, _e as useDialFileMutations, ve as useDialFileSharing, ye as useDialFileUploadBatch, Ce as useFileAttachmentPicker, we as useGridEditingScroll, V as virtualPathToApiPath, z as withRoutableRootLabels };
|
|
@@ -23,7 +23,23 @@ export declare const fetchByTab: (filesApi: DialFilesApi, tab: DialFileManagerTa
|
|
|
23
23
|
export declare const fetchForSearch: (filesApi: DialFilesApi, tab: DialFileManagerTabs, bucket: string, folderPath: string, sharedRootMeta: Map<string, SharedRootMeta>) => Promise<{
|
|
24
24
|
items: ListFilesItemDto[];
|
|
25
25
|
}>;
|
|
26
|
-
|
|
26
|
+
/**
|
|
27
|
+
* Where search results sit in the virtual tree. Shared items are listed flat
|
|
28
|
+
* (a file nested in the owner's bucket is still a root row), so their virtual
|
|
29
|
+
* path cannot be derived from the location inside the owner's bucket.
|
|
30
|
+
*/
|
|
31
|
+
export interface SearchPathScope {
|
|
32
|
+
/** Virtual path of the folder the search runs in, e.g. `/Shared with me`. */
|
|
33
|
+
virtualRoot: string;
|
|
34
|
+
/** Bucket-relative path of that folder; omitted when results are flat children of `virtualRoot`. */
|
|
35
|
+
apiRoot?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Builds the scope for a search on the Shared tab so result rows get the same
|
|
39
|
+
* `path` as the rows `buildFromCache` produces for the same items.
|
|
40
|
+
*/
|
|
41
|
+
export declare const buildSharedSearchScope: (rootLabel: string, folderPath: string, sharedRootMeta: Map<string, SharedRootMeta>) => SearchPathScope | undefined;
|
|
42
|
+
export declare const mapSearchItem: (item: ListFilesItemDto, fallbackBucket: string, rootLabel: string, scope?: SearchPathScope) => DialFile;
|
|
27
43
|
/**
|
|
28
44
|
* Overlays a `FileMetadataResponseDto` response onto the clicked grid row so
|
|
29
45
|
* `fileMetadataPopupOptions.fileMetadata` receives a value structurally
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dial-file-manager-mapping.util.d.ts","sourceRoot":"","sources":["../../src/files/dial-file-manager-mapping.util.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,uBAAuB,EACvB,gBAAgB,EACjB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAK,EACV,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EACjB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EACL,mBAAmB,EAEpB,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"dial-file-manager-mapping.util.d.ts","sourceRoot":"","sources":["../../src/files/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,QAAQ,eAAe,KACtB,QAmDF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,GACpC,UAAU,uBAAuB,EACjC,UAAU,QAAQ,KACjB,QAgBD,CAAC"}
|
|
@@ -1,54 +1,55 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { safeDecodeURI as e } from "../shared/string-utils.js";
|
|
2
|
+
import { CORE_PERMISSION_MAP as t } from "./dial-file-manager.model.js";
|
|
3
|
+
import { buildSharedItemVirtualPath as n, dialCorePathToRelative as r } from "./dial-file-manager-path.util.js";
|
|
4
|
+
import { ListFilesItemDtoNodeTypeEnum as i } from "@epam/ai-dial-chat-api-client";
|
|
5
|
+
import { DialFileManagerTabs as a, DialFileNodeType as o } from "@epam/ai-dial-react-file-manager";
|
|
5
6
|
//#region src/files/dial-file-manager-mapping.util.ts
|
|
6
|
-
var
|
|
7
|
-
if (!
|
|
8
|
-
let n =
|
|
7
|
+
var s = (e) => {
|
|
8
|
+
if (!e?.length) return;
|
|
9
|
+
let n = e.map((e) => t[e.toUpperCase()]).filter((e) => e != null);
|
|
9
10
|
return n.length > 0 ? n : void 0;
|
|
10
|
-
},
|
|
11
|
+
}, c = (e, t) => {
|
|
11
12
|
let n = t.find((e) => e.success);
|
|
12
13
|
if (n != null) return e.find(({ dto: e }) => e.sourcePath === n.sourcePath && e.destinationPath === n.destinationPath) ?? e.find(({ dto: e }) => e.destinationPath === n.destinationPath) ?? e[0];
|
|
13
|
-
},
|
|
14
|
-
let
|
|
15
|
-
if (
|
|
16
|
-
let u =
|
|
17
|
-
return
|
|
18
|
-
let d =
|
|
19
|
-
id:
|
|
14
|
+
}, l = (e, t, n, r, a) => {
|
|
15
|
+
let c = e.get(n);
|
|
16
|
+
if (c == null) return [];
|
|
17
|
+
let u = r.replace(/\/$/, "");
|
|
18
|
+
return c.map((c) => {
|
|
19
|
+
let d = c.nodeType === i.Folder, f = c.name, p = d ? `${u}/${f}/` : `${u}/${f}`, m = {
|
|
20
|
+
id: c.path,
|
|
20
21
|
name: f,
|
|
21
22
|
path: p,
|
|
22
|
-
url:
|
|
23
|
-
parentPath:
|
|
24
|
-
nodeType: d ?
|
|
25
|
-
folderId:
|
|
26
|
-
bucket:
|
|
27
|
-
author:
|
|
28
|
-
resourceType:
|
|
29
|
-
contentLength:
|
|
30
|
-
contentType:
|
|
31
|
-
updatedAt:
|
|
23
|
+
url: c.url,
|
|
24
|
+
parentPath: r,
|
|
25
|
+
nodeType: d ? o.FOLDER : o.ITEM,
|
|
26
|
+
folderId: a,
|
|
27
|
+
bucket: c.bucket,
|
|
28
|
+
author: c.author,
|
|
29
|
+
resourceType: c.resourceType,
|
|
30
|
+
contentLength: c.contentLength,
|
|
31
|
+
contentType: c.contentType,
|
|
32
|
+
updatedAt: c.updatedAt ? new Date(c.updatedAt).toISOString() : void 0
|
|
32
33
|
};
|
|
33
34
|
if (d) {
|
|
34
35
|
let r = `${n}${f}/`;
|
|
35
|
-
m.permissions =
|
|
36
|
+
m.permissions = s(c.permissions) ?? s(t.get(r)), m.items = l(e, t, r, p, c.path);
|
|
36
37
|
}
|
|
37
38
|
return m;
|
|
38
39
|
});
|
|
39
|
-
},
|
|
40
|
+
}, u = (e, t, n, r) => {
|
|
40
41
|
let a = new Map(e), o = [...a.get(t) ?? []], s = {
|
|
41
42
|
name: n.name,
|
|
42
43
|
path: n.path,
|
|
43
44
|
folderId: n.folderId,
|
|
44
|
-
nodeType:
|
|
45
|
+
nodeType: i.Folder,
|
|
45
46
|
bucket: n.bucket,
|
|
46
47
|
parentPath: n.parentPath || void 0,
|
|
47
48
|
url: n.path,
|
|
48
|
-
permissions:
|
|
49
|
+
permissions: r
|
|
49
50
|
};
|
|
50
51
|
return o.some((e) => e.name.toLowerCase() === n.name.toLowerCase()) || o.push(s), a.set(t, o), a;
|
|
51
|
-
},
|
|
52
|
+
}, d = (e, t, n) => {
|
|
52
53
|
if (!e) return e;
|
|
53
54
|
let r = typeof n == "string" ? { status: n } : n, i = e.files.map((e) => e.id === t ? {
|
|
54
55
|
...e,
|
|
@@ -58,16 +59,16 @@ var o = (t) => {
|
|
|
58
59
|
...e,
|
|
59
60
|
files: i
|
|
60
61
|
};
|
|
61
|
-
},
|
|
62
|
-
if (t ===
|
|
63
|
-
if (t ===
|
|
64
|
-
if (
|
|
65
|
-
let t =
|
|
66
|
-
if (
|
|
67
|
-
let
|
|
62
|
+
}, f = (e, t, n, i, o) => {
|
|
63
|
+
if (t === a.All) return Promise.reject(/* @__PURE__ */ Error("fetchByTab cannot list the All tab; list each section instead"));
|
|
64
|
+
if (t === a.Shared) {
|
|
65
|
+
if (i === "") return e.listSharedFiles({ path: void 0 }).then((e) => ({ items: e.items }));
|
|
66
|
+
let t = i.indexOf("/"), n = t === -1 ? i : i.slice(0, t), a = o.get(n);
|
|
67
|
+
if (a) {
|
|
68
|
+
let n = r(a.dialCorePath, a.bucket) + (t === -1 ? "" : i.slice(t + 1));
|
|
68
69
|
return e.listFiles({
|
|
69
|
-
bucket:
|
|
70
|
-
path:
|
|
70
|
+
bucket: a.bucket,
|
|
71
|
+
path: n,
|
|
71
72
|
permissions: !0
|
|
72
73
|
}).then((e) => ({
|
|
73
74
|
items: e.items,
|
|
@@ -76,66 +77,80 @@ var o = (t) => {
|
|
|
76
77
|
}
|
|
77
78
|
return Promise.resolve({ items: [] });
|
|
78
79
|
}
|
|
79
|
-
return t ===
|
|
80
|
-
bucket:
|
|
81
|
-
path:
|
|
80
|
+
return t === a.Organization ? e.listPublicFiles({ path: i || void 0 }).then((e) => ({ items: e.items })) : e.listFiles({
|
|
81
|
+
bucket: n,
|
|
82
|
+
path: i,
|
|
82
83
|
permissions: !0
|
|
83
84
|
}).then((e) => ({
|
|
84
85
|
items: e.items,
|
|
85
86
|
permissions: e.permissions
|
|
86
87
|
}));
|
|
87
|
-
},
|
|
88
|
-
if (t ===
|
|
89
|
-
let t =
|
|
90
|
-
if (!
|
|
91
|
-
let s =
|
|
92
|
-
bucket:
|
|
88
|
+
}, p = async (e, t, n, i, o) => {
|
|
89
|
+
if (t === a.Shared) {
|
|
90
|
+
let t = i.indexOf("/"), n = t === -1 ? i : i.slice(0, t), a = o.get(n);
|
|
91
|
+
if (!a) return { items: [] };
|
|
92
|
+
let s = r(a.dialCorePath, a.bucket) + (t === -1 ? "" : i.slice(t + 1)), { items: c } = await e.listFiles({
|
|
93
|
+
bucket: a.bucket,
|
|
93
94
|
path: s,
|
|
94
95
|
permissions: !0,
|
|
95
96
|
recursive: !0
|
|
96
97
|
});
|
|
97
98
|
return { items: c };
|
|
98
99
|
}
|
|
99
|
-
if (t ===
|
|
100
|
+
if (t === a.Organization) {
|
|
100
101
|
let { items: t } = await e.listPublicFiles({
|
|
101
|
-
path:
|
|
102
|
+
path: i || void 0,
|
|
102
103
|
recursive: !0
|
|
103
104
|
});
|
|
104
105
|
return { items: t };
|
|
105
106
|
}
|
|
106
107
|
let { items: s } = await e.listFiles({
|
|
107
|
-
bucket:
|
|
108
|
-
path:
|
|
108
|
+
bucket: n,
|
|
109
|
+
path: i,
|
|
109
110
|
permissions: !0,
|
|
110
111
|
recursive: !0
|
|
111
112
|
});
|
|
112
113
|
return { items: s };
|
|
113
|
-
},
|
|
114
|
-
|
|
114
|
+
}, m = (e, t, n) => {
|
|
115
|
+
if (t === "") return { virtualRoot: `/${e}` };
|
|
116
|
+
let i = t.indexOf("/"), a = i === -1 ? t : t.slice(0, i), o = n.get(a);
|
|
117
|
+
if (!o) return;
|
|
118
|
+
let s = i === -1 ? "" : t.slice(i + 1);
|
|
119
|
+
return {
|
|
120
|
+
virtualRoot: `/${e}/${t.replace(/\/$/, "")}`,
|
|
121
|
+
apiRoot: r(o.dialCorePath, o.bucket) + s
|
|
122
|
+
};
|
|
123
|
+
}, h = (t) => t.split("/").filter(Boolean).map(e), g = (e, t, a, s) => {
|
|
124
|
+
let c = e.nodeType === i.Folder, l = e.name, u = e.bucket ?? t, d = r(e.url ?? e.path ?? "", u).replace(/\/$/, ""), f = d.lastIndexOf("/"), p = f > 0 ? d.slice(0, f) : "", m;
|
|
125
|
+
if (s) {
|
|
126
|
+
let e = s.apiRoot ? h(p).slice(h(s.apiRoot).length) : [];
|
|
127
|
+
m = [s.virtualRoot, ...e].join("/");
|
|
128
|
+
} else m = n(p, a, !1);
|
|
129
|
+
let g = c ? `${m}/${l}/` : `${m}/${l}`;
|
|
115
130
|
return {
|
|
116
131
|
id: e.path,
|
|
117
|
-
name:
|
|
118
|
-
path:
|
|
132
|
+
name: l,
|
|
133
|
+
path: g,
|
|
119
134
|
url: e.url,
|
|
120
|
-
parentPath:
|
|
121
|
-
nodeType:
|
|
135
|
+
parentPath: m,
|
|
136
|
+
nodeType: c ? o.FOLDER : o.ITEM,
|
|
122
137
|
folderId: e.folderId,
|
|
123
|
-
bucket:
|
|
138
|
+
bucket: u,
|
|
124
139
|
author: e.author,
|
|
125
140
|
contentLength: e.contentLength,
|
|
126
141
|
contentType: e.contentType,
|
|
127
142
|
updatedAt: e.updatedAt ? new Date(e.updatedAt).toISOString() : void 0
|
|
128
143
|
};
|
|
129
|
-
},
|
|
144
|
+
}, _ = (e, t) => ({
|
|
130
145
|
...t,
|
|
131
146
|
bucket: e.bucket ?? t.bucket,
|
|
132
147
|
author: e.author,
|
|
133
148
|
contentLength: e.contentLength,
|
|
134
149
|
contentType: e.contentType,
|
|
135
150
|
resourceType: e.resourceType ?? t.resourceType,
|
|
136
|
-
permissions:
|
|
151
|
+
permissions: s(e.permissions) ?? t.permissions,
|
|
137
152
|
updatedAt: e.updatedAt ? new Date(e.updatedAt).toISOString() : t.updatedAt,
|
|
138
153
|
createdAt: e.createdAt ? new Date(e.createdAt).toISOString() : t.createdAt
|
|
139
154
|
});
|
|
140
155
|
//#endregion
|
|
141
|
-
export {
|
|
156
|
+
export { l as buildFromCache, m as buildSharedSearchScope, f as fetchByTab, p as fetchForSearch, c as findFirstSuccessfulCopyMoveItem, s as mapCorePermissions, _ as mapFileMetadataToDialFile, g as mapSearchItem, u as mergeCreatedFolderIntoCache, d as updateEntry };
|
|
@@ -1 +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;AAGvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EACL,mBAAmB,EAEpB,MAAM,kCAAkC,CAAC;
|
|
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;AAGvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EACL,mBAAmB,EAEpB,MAAM,kCAAkC,CAAC;AAmB1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGtD,gDAAgD;AAChD,MAAM,WAAW,yBAAyB;IACxC,0EAA0E;IAC1E,QAAQ,EAAE,YAAY,CAAC;IACvB,mEAAmE;IACnE,MAAM,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,SAAS,EAAE,MAAM,CAAC;IAClB,8DAA8D;IAC9D,SAAS,EAAE,mBAAmB,CAAC;IAC/B,yEAAyE;IACzE,cAAc,CAAC,EAAE,CAAC,YAAY,EAAE,uBAAuB,KAAK,IAAI,CAAC;IACjE,6GAA6G;IAC7G,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mHAAmH;IACnH,UAAU,CAAC,EAAE,MA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